2 #line 3 "xbt/graphxml.c"
4 #define YY_INT_ALIGNED short int
6 /* A lexical scanner generated by flex */
8 #define yy_create_buffer xbt_graph_parse__create_buffer
9 #define yy_delete_buffer xbt_graph_parse__delete_buffer
10 #define yy_flex_debug xbt_graph_parse__flex_debug
11 #define yy_init_buffer xbt_graph_parse__init_buffer
12 #define yy_flush_buffer xbt_graph_parse__flush_buffer
13 #define yy_load_buffer_state xbt_graph_parse__load_buffer_state
14 #define yy_switch_to_buffer xbt_graph_parse__switch_to_buffer
15 #define yyin xbt_graph_parse_in
16 #define yyleng xbt_graph_parse_leng
17 #define yylex xbt_graph_parse_lex
18 #define yylineno xbt_graph_parse_lineno
19 #define yyout xbt_graph_parse_out
20 #define yyrestart xbt_graph_parse_restart
21 #define yytext xbt_graph_parse_text
22 #define yywrap xbt_graph_parse_wrap
23 #define yyalloc xbt_graph_parse_alloc
24 #define yyrealloc xbt_graph_parse_realloc
25 #define yyfree xbt_graph_parse_free
28 #define YY_FLEX_MAJOR_VERSION 2
29 #define YY_FLEX_MINOR_VERSION 5
30 #define YY_FLEX_SUBMINOR_VERSION 34
31 #if YY_FLEX_SUBMINOR_VERSION > 0
35 /* First, we deal with platform-specific or compiler-specific issues. */
37 /* begin standard C headers. */
43 /* end standard C headers. */
45 /* flex integer type definitions */
50 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
52 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
54 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
55 * if you want the limit (max/min) macros for int types.
57 #ifndef __STDC_LIMIT_MACROS
58 #define __STDC_LIMIT_MACROS 1
62 typedef int8_t flex_int8_t;
63 typedef uint8_t flex_uint8_t;
64 typedef int16_t flex_int16_t;
65 typedef uint16_t flex_uint16_t;
66 typedef int32_t flex_int32_t;
67 typedef uint32_t flex_uint32_t;
69 typedef signed char flex_int8_t;
70 typedef short int flex_int16_t;
71 typedef int flex_int32_t;
72 typedef unsigned char flex_uint8_t;
73 typedef unsigned short int flex_uint16_t;
74 typedef unsigned int flex_uint32_t;
77 /* Limits of integral types. */
79 #define INT8_MIN (-128)
82 #define INT16_MIN (-32767-1)
85 #define INT32_MIN (-2147483647-1)
88 #define INT8_MAX (127)
91 #define INT16_MAX (32767)
94 #define INT32_MAX (2147483647)
97 #define UINT8_MAX (255U)
100 #define UINT16_MAX (65535U)
103 #define UINT32_MAX (4294967295U)
106 #endif /* ! FLEXINT_H */
110 /* The "const" storage-class-modifier is valid. */
113 #else /* ! __cplusplus */
115 /* C99 requires __STDC__ to be defined as 1. */
116 #if defined (__STDC__)
120 #endif /* defined (__STDC__) */
121 #endif /* ! __cplusplus */
124 #define yyconst const
129 /* Returned upon end-of-file. */
132 /* Promotes a possibly negative, possibly signed char to an unsigned
133 * integer for use as an array index. If the signed char is negative,
134 * we want to instead treat it as an 8-bit unsigned char, hence the
137 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
139 /* Enter a start condition. This macro really ought to take a parameter,
140 * but we do it the disgusting crufty way forced on us by the ()-less
141 * definition of BEGIN.
143 #define BEGIN (yy_start) = 1 + 2 *
145 /* Translate the current start state into a value that can be later handed
146 * to BEGIN to return to the state. The YYSTATE alias is for lex
149 #define YY_START (((yy_start) - 1) / 2)
150 #define YYSTATE YY_START
152 /* Action number for EOF rule of a given start state. */
153 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
155 /* Special action meaning "start processing a new file". */
156 #define YY_NEW_FILE xbt_graph_parse_restart(xbt_graph_parse_in )
158 #define YY_END_OF_BUFFER_CHAR 0
160 /* Size of default input buffer. */
162 #define YY_BUF_SIZE 16384
165 /* The state buf must be large enough to hold one state per character in the main buffer.
167 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
169 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
170 #define YY_TYPEDEF_YY_BUFFER_STATE
171 typedef struct yy_buffer_state *YY_BUFFER_STATE;
174 extern int xbt_graph_parse_leng;
176 extern FILE *xbt_graph_parse_in, *xbt_graph_parse_out;
178 #define EOB_ACT_CONTINUE_SCAN 0
179 #define EOB_ACT_END_OF_FILE 1
180 #define EOB_ACT_LAST_MATCH 2
182 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
183 * access to the local variable yy_act. Since yyless() is a macro, it would break
184 * existing scanners that call yyless() from OUTSIDE xbt_graph_parse_lex.
185 * One obvious solution it to make yy_act a global. I tried that, and saw
186 * a 5% performance hit in a non-xbt_graph_parse_lineno scanner, because yy_act is
187 * normally declared as a register variable-- so it is not worth it.
189 #define YY_LESS_LINENO(n) \
192 for ( yyl = n; yyl < xbt_graph_parse_leng; ++yyl )\
193 if ( xbt_graph_parse_text[yyl] == '\n' )\
194 --xbt_graph_parse_lineno;\
197 /* Return all but the first "n" matched characters back to the input stream. */
201 /* Undo effects of setting up xbt_graph_parse_text. */ \
202 int yyless_macro_arg = (n); \
203 YY_LESS_LINENO(yyless_macro_arg);\
204 *yy_cp = (yy_hold_char); \
205 YY_RESTORE_YY_MORE_OFFSET \
206 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
207 YY_DO_BEFORE_ACTION; /* set up xbt_graph_parse_text again */ \
211 #define unput(c) yyunput( c, (yytext_ptr) )
213 /* The following is because we cannot portably get our hands on size_t
214 * (without autoconf's help, which isn't available because we want
215 * flex-generated scanners to compile on their own).
216 * Given that the standard has decreed that size_t exists since 1989,
217 * I guess we can afford to depend on it. Manoj.
220 #ifndef YY_TYPEDEF_YY_SIZE_T
221 #define YY_TYPEDEF_YY_SIZE_T
222 typedef size_t yy_size_t;
225 #ifndef YY_STRUCT_YY_BUFFER_STATE
226 #define YY_STRUCT_YY_BUFFER_STATE
227 struct yy_buffer_state
231 char *yy_ch_buf; /* input buffer */
232 char *yy_buf_pos; /* current position in input buffer */
234 /* Size of input buffer in bytes, not including room for EOB
237 yy_size_t yy_buf_size;
239 /* Number of characters read into yy_ch_buf, not including EOB
244 /* Whether we "own" the buffer - i.e., we know we created it,
245 * and can realloc() it to grow it, and should free() it to
248 int yy_is_our_buffer;
250 /* Whether this is an "interactive" input source; if so, and
251 * if we're using stdio for input, then we want to use getc()
252 * instead of fread(), to make sure we stop fetching input after
255 int yy_is_interactive;
257 /* Whether we're considered to be at the beginning of a line.
258 * If so, '^' rules will be active on the next match, otherwise
263 int yy_bs_lineno; /**< The line count. */
264 int yy_bs_column; /**< The column count. */
266 /* Whether to try to fill the input buffer when we reach the
271 int yy_buffer_status;
273 #define YY_BUFFER_NEW 0
274 #define YY_BUFFER_NORMAL 1
275 /* When an EOF's been seen but there's still some text to process
276 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
277 * shouldn't try reading from the input source any more. We might
278 * still have a bunch of tokens to match, though, because of
279 * possible backing-up.
281 * When we actually see the EOF, we change the status to "new"
282 * (via xbt_graph_parse_restart()), so that the user can continue scanning by
283 * just pointing xbt_graph_parse_in at a new input file.
285 #define YY_BUFFER_EOF_PENDING 2
288 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
290 /* Stack of input buffers. */
291 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
292 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
293 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
295 /* We provide macros for accessing buffer states in case in the
296 * future we want to put the buffer states in a more general
299 * Returns the top of the stack, or NULL.
301 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
302 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
305 /* Same as previous macro, but useful when we know that the buffer stack is not
306 * NULL or when we need an lvalue. For internal use only.
308 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
310 /* yy_hold_char holds the character lost when xbt_graph_parse_text is formed. */
311 static char yy_hold_char;
312 static int yy_n_chars; /* number of characters read into yy_ch_buf */
313 int xbt_graph_parse_leng;
315 /* Points to current character in buffer. */
316 static char *yy_c_buf_p = (char *) 0;
317 static int yy_init = 0; /* whether we need to initialize */
318 static int yy_start = 0; /* start state number */
320 /* Flag which is used to allow xbt_graph_parse_wrap()'s to do buffer switches
321 * instead of setting up a fresh xbt_graph_parse_in. A bit of a hack ...
323 static int yy_did_buffer_switch_on_eof;
325 void xbt_graph_parse_restart (FILE *input_file );
326 void xbt_graph_parse__switch_to_buffer (YY_BUFFER_STATE new_buffer );
327 YY_BUFFER_STATE xbt_graph_parse__create_buffer (FILE *file,int size );
328 void xbt_graph_parse__delete_buffer (YY_BUFFER_STATE b );
329 void xbt_graph_parse__flush_buffer (YY_BUFFER_STATE b );
330 void xbt_graph_parse_push_buffer_state (YY_BUFFER_STATE new_buffer );
331 void xbt_graph_parse_pop_buffer_state (void );
333 static void xbt_graph_parse_ensure_buffer_stack (void );
334 static void xbt_graph_parse__load_buffer_state (void );
335 static void xbt_graph_parse__init_buffer (YY_BUFFER_STATE b,FILE *file );
337 #define YY_FLUSH_BUFFER xbt_graph_parse__flush_buffer(YY_CURRENT_BUFFER )
339 YY_BUFFER_STATE xbt_graph_parse__scan_buffer (char *base,yy_size_t size );
340 YY_BUFFER_STATE xbt_graph_parse__scan_string (yyconst char *yy_str );
341 YY_BUFFER_STATE xbt_graph_parse__scan_bytes (yyconst char *bytes,int len );
343 void *xbt_graph_parse_alloc (yy_size_t );
344 void *xbt_graph_parse_realloc (void *,yy_size_t );
345 void xbt_graph_parse_free (void * );
347 #define yy_new_buffer xbt_graph_parse__create_buffer
349 #define yy_set_interactive(is_interactive) \
351 if ( ! YY_CURRENT_BUFFER ){ \
352 xbt_graph_parse_ensure_buffer_stack (); \
353 YY_CURRENT_BUFFER_LVALUE = \
354 xbt_graph_parse__create_buffer(xbt_graph_parse_in,YY_BUF_SIZE ); \
356 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
359 #define yy_set_bol(at_bol) \
361 if ( ! YY_CURRENT_BUFFER ){\
362 xbt_graph_parse_ensure_buffer_stack (); \
363 YY_CURRENT_BUFFER_LVALUE = \
364 xbt_graph_parse__create_buffer(xbt_graph_parse_in,YY_BUF_SIZE ); \
366 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
369 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
371 /* Begin user sect3 */
373 #define xbt_graph_parse_wrap(n) 1
374 #define YY_SKIP_YYWRAP
376 typedef unsigned char YY_CHAR;
378 FILE *xbt_graph_parse_in = (FILE *) 0, *xbt_graph_parse_out = (FILE *) 0;
380 typedef int yy_state_type;
382 extern int xbt_graph_parse_lineno;
384 int xbt_graph_parse_lineno = 1;
386 extern char *xbt_graph_parse_text;
387 #define yytext_ptr xbt_graph_parse_text
389 static yy_state_type yy_get_previous_state (void );
390 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
391 static int yy_get_next_buffer (void );
392 static void yy_fatal_error (yyconst char msg[] );
394 /* Done after the current pattern has been matched and before the
395 * corresponding action - sets up xbt_graph_parse_text.
397 #define YY_DO_BEFORE_ACTION \
398 (yytext_ptr) = yy_bp; \
399 xbt_graph_parse_leng = (size_t) (yy_cp - yy_bp); \
400 (yy_hold_char) = *yy_cp; \
402 (yy_c_buf_p) = yy_cp;
404 #define YY_NUM_RULES 92
405 #define YY_END_OF_BUFFER 93
406 /* This struct is not used in this scanner,
407 but its presence is necessary. */
410 flex_int32_t yy_verify;
413 static yyconst flex_int16_t yy_accept[564] =
415 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
416 0, 0, 0, 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 93, 91, 17, 10, 10, 17, 17, 71, 10, 71,
421 5, 6, 5, 8, 9, 8, 87, 79, 80, 88,
422 85, 88, 86, 90, 79, 80, 90, 91, 26, 10,
423 26, 26, 26, 24, 26, 30, 10, 30, 30, 91,
424 91, 30, 91, 45, 10, 45, 45, 45, 43, 45,
426 45, 45, 45, 49, 10, 49, 91, 66, 10, 66,
427 66, 66, 64, 66, 66, 66, 66, 66, 70, 10,
428 70, 88, 87, 10, 0, 2, 2, 0, 4, 7,
429 82, 81, 0, 0, 0, 0, 0, 0, 0, 25,
430 27, 27, 0, 0, 0, 0, 0, 0, 44, 46,
431 46, 46, 46, 46, 0, 65, 67, 67, 67, 67,
432 67, 67, 67, 0, 0, 0, 0, 0, 0, 0,
433 3, 0, 0, 0, 0, 0, 0, 0, 89, 0,
434 27, 0, 0, 0, 0, 0, 0, 0, 46, 46,
435 46, 46, 0, 0, 67, 67, 67, 67, 67, 67,
437 0, 0, 0, 84, 0, 16, 1, 0, 0, 77,
438 0, 0, 0, 74, 73, 0, 0, 27, 0, 0,
439 29, 0, 0, 0, 0, 0, 0, 46, 46, 46,
440 46, 0, 0, 48, 0, 67, 67, 67, 67, 67,
441 67, 0, 0, 69, 0, 0, 0, 0, 78, 72,
442 0, 0, 0, 27, 0, 51, 0, 32, 31, 50,
443 0, 0, 46, 0, 0, 46, 0, 0, 0, 67,
444 67, 0, 0, 67, 67, 0, 0, 0, 0, 0,
445 12, 0, 75, 76, 19, 27, 0, 51, 18, 32,
446 31, 50, 0, 38, 37, 0, 0, 0, 36, 35,
448 46, 0, 0, 63, 62, 0, 0, 67, 0, 55,
449 54, 67, 67, 0, 0, 0, 0, 0, 11, 19,
450 27, 0, 18, 0, 34, 33, 46, 0, 47, 0,
451 53, 52, 0, 0, 0, 0, 0, 0, 0, 68,
452 0, 0, 0, 0, 27, 0, 28, 46, 0, 61,
453 60, 0, 57, 56, 0, 59, 58, 0, 0, 0,
454 0, 27, 46, 83, 0, 0, 0, 27, 46, 46,
455 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
456 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
457 40, 39, 0, 42, 41, 0, 0, 0, 0, 0,
459 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
460 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
461 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
462 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
463 0, 0, 0, 12, 0, 12, 0, 0, 21, 0,
464 20, 0, 0, 0, 0, 0, 0, 0, 23, 22,
465 0, 0, 0, 0, 0, 0, 0, 11, 0, 0,
466 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
467 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
468 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
470 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
471 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
472 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
473 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
474 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
475 0, 0, 0, 0, 0, 0, 13, 0, 0, 14,
479 static yyconst flex_int32_t yy_ec[256] =
481 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
482 1, 2, 4, 1, 1, 1, 1, 1, 1, 1,
483 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
484 1, 2, 5, 6, 7, 1, 1, 8, 9, 1,
485 1, 1, 1, 1, 10, 11, 12, 13, 13, 13,
486 13, 13, 13, 13, 13, 13, 13, 14, 15, 16,
487 17, 18, 19, 1, 20, 21, 22, 23, 24, 21,
488 14, 14, 14, 14, 14, 14, 25, 14, 26, 27,
489 14, 14, 28, 29, 14, 14, 14, 14, 30, 14,
490 31, 1, 32, 1, 33, 1, 34, 35, 36, 37,
492 38, 39, 40, 41, 42, 14, 14, 43, 44, 45,
493 46, 47, 48, 49, 50, 51, 52, 53, 14, 54,
494 55, 14, 1, 1, 1, 1, 1, 1, 1, 1,
495 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
496 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
497 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
498 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
499 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
500 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
501 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
503 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
504 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
505 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
506 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
507 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
511 static yyconst flex_int32_t yy_meta[56] =
513 1, 2, 2, 2, 1, 1, 1, 1, 1, 3,
514 3, 1, 4, 5, 1, 1, 1, 6, 1, 7,
515 7, 7, 7, 7, 5, 5, 5, 5, 5, 5,
516 1, 1, 5, 7, 7, 7, 7, 7, 7, 5,
517 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
521 static yyconst flex_int16_t yy_base[594] =
523 0, 0, 0, 3, 6, 9, 24, 27, 11, 14,
524 15, 17, 29, 38, 45, 52, 59, 61, 67, 70,
525 93, 135, 73, 76, 111, 114, 117, 153, 156, 159,
526 176, 179, 182, 185, 200, 203, 206, 209, 225, 0,
527 279, 282, 285, 288, 304, 0, 358, 361, 363, 365,
528 1585, 1586, 1586, 380, 383, 47, 62, 1586, 386, 171,
529 1586, 1586, 1574, 1586, 1586, 1565, 1586, 1578, 1578, 365,
530 1586, 1586, 1586, 1586, 1576, 1576, 1546, 375, 1586, 389,
531 1559, 0, 195, 1586, 1526, 1586, 398, 391, 399, 402,
532 411, 414, 393, 1586, 420, 1557, 0, 401, 1586, 1540,
534 1539, 1538, 1525, 1586, 458, 422, 427, 1586, 464, 1552,
535 0, 409, 1586, 1535, 1, 1534, 1521, 1532, 1586, 467,
536 438, 1560, 1532, 470, 34, 1509, 1586, 1552, 1543, 1586,
537 1586, 1586, 69, 40, 1509, 1508, 1506, 1539, 1507, 1586,
538 0, 1532, 1514, 1516, 1503, 1505, 1504, 1512, 1586, 0,
539 1497, 1512, 1502, 1495, 1499, 1586, 0, 1492, 1507, 1496,
540 1496, 1487, 1489, 1499, 1505, 1517, 1516, 1523, 108, 1488,
541 1586, 75, 0, 1484, 1484, 1514, 1513, 1481, 1586, 1492,
542 1483, 473, 476, 1484, 1489, 1485, 1484, 1480, 1485, 1480,
543 1479, 1474, 479, 482, 1481, 1476, 1473, 1474, 1462, 1470,
545 485, 502, 1487, 1586, 1490, 1586, 1586, 110, 1464, 1586,
546 1491, 1490, 1454, 1586, 1586, 1452, 1455, 1452, 505, 508,
547 1586, 511, 1462, 1452, 1460, 1459, 1458, 514, 1452, 530,
548 1443, 533, 538, 1586, 546, 550, 1450, 1373, 555, 1387,
549 1375, 558, 566, 1586, 571, 1387, 435, 575, 1586, 1586,
550 1392, 1389, 1356, 1354, 578, 583, 1346, 588, 595, 598,
551 601, 604, 612, 617, 624, 1263, 620, 633, 637, 645,
552 1263, 649, 661, 1264, 1250, 653, 1280, 472, 1280, 657,
553 1586, 1279, 1586, 1586, 670, 1260, 674, 677, 680, 683,
554 686, 694, 697, 1586, 1586, 705, 710, 721, 1586, 1586,
556 1248, 729, 732, 1586, 1586, 740, 746, 756, 759, 1586,
557 1586, 767, 772, 775, 1264, 32, 104, 153, 1586, 778,
558 1226, 783, 788, 793, 1586, 1586, 1230, 801, 1586, 804,
559 1586, 1586, 812, 818, 828, 831, 839, 844, 855, 1586,
560 1234, 146, 179, 147, 1212, 858, 1586, 1215, 861, 1586,
561 1586, 875, 1586, 1586, 883, 1586, 1586, 1111, 891, 175,
562 445, 1066, 119, 1586, 894, 181, 89, 897, 900, 903,
563 501, 360, 399, 480, 475, 919, 922, 938, 941, 949,
564 954, 506, 509, 526, 599, 624, 965, 654, 678, 973,
565 1586, 1586, 981, 1586, 1586, 417, 176, 594, 548, 989,
567 1058, 1003, 1016, 937, 992, 407, 995, 998, 1001, 1018,
568 930, 918, 922, 910, 1026, 1029, 1035, 1038, 1055, 1063,
569 1081, 1113, 819, 790, 733, 616, 710, 1073, 721, 1131,
570 748, 284, 1149, 1181, 557, 565, 458, 449, 537, 770,
571 676, 805, 278, 369, 285, 291, 1076, 293, 1586, 211,
572 1586, 708, 693, 727, 162, 110, 76, 1105, 1586, 1586,
573 352, 735, 794, 5, 199, 820, 474, 1586, 1144, 850,
574 1173, 1199, 1207, 1212, 591, 754, 1220, 799, 831, 749,
575 833, 834, 848, 862, 897, 684, 791, 900, 912, 895,
576 901, 483, 808, 920, 930, 836, 890, 627, 892, 941,
578 962, 971, 993, 818, 873, 1005, 1007, 954, 960, 702,
579 872, 963, 1008, 1027, 1092, 1017, 1025, 1151, 1160, 1031,
580 1084, 1093, 1152, 1176, 1188, 1161, 1209, 1033, 1087, 1217,
581 1221, 1123, 1155, 1088, 1108, 1215, 1216, 1120, 1156, 1218,
582 1219, 1222, 1223, 1224, 1225, 1239, 1240, 1226, 1228, 1241,
583 1242, 1264, 1258, 1260, 1268, 1277, 1586, 1281, 1285, 1586,
584 1288, 1586, 1586, 1306, 1313, 1320, 1327, 1334, 1341, 1348,
585 1355, 1362, 1369, 1376, 1381, 1386, 1391, 1398, 1401, 1404,
586 1407, 1414, 1418, 1424, 1430, 1436, 1443, 1450, 1457, 1464,
591 static yyconst flex_int16_t yy_def[594] =
593 564, 564, 565, 565, 565, 565, 566, 566, 567, 567,
594 568, 568, 569, 569, 569, 569, 570, 570, 564, 564,
595 571, 571, 572, 572, 572, 572, 564, 564, 572, 572,
596 564, 564, 572, 572, 572, 572, 564, 564, 563, 39,
597 573, 573, 564, 564, 563, 45, 574, 574, 569, 569,
598 563, 563, 563, 563, 563, 563, 563, 563, 563, 563,
599 563, 563, 563, 563, 563, 563, 563, 563, 563, 563,
600 563, 563, 563, 563, 563, 563, 563, 563, 563, 563,
601 563, 575, 563, 563, 575, 563, 563, 563, 563, 563,
602 563, 563, 563, 563, 563, 563, 576, 563, 563, 576,
604 576, 576, 576, 563, 563, 563, 563, 563, 563, 563,
605 577, 563, 563, 577, 577, 577, 577, 577, 563, 563,
606 563, 563, 563, 563, 578, 563, 563, 563, 563, 563,
607 563, 563, 563, 563, 563, 563, 563, 563, 563, 563,
608 575, 575, 579, 563, 563, 563, 563, 563, 563, 576,
609 576, 576, 576, 576, 580, 563, 577, 577, 577, 577,
610 577, 577, 577, 581, 563, 563, 582, 563, 582, 563,
611 563, 563, 583, 563, 563, 563, 563, 563, 563, 563,
612 575, 584, 584, 563, 563, 563, 563, 563, 576, 576,
613 576, 576, 585, 585, 577, 577, 577, 577, 577, 577,
615 586, 586, 563, 563, 582, 563, 563, 582, 563, 563,
616 583, 563, 563, 563, 563, 563, 563, 575, 563, 584,
617 563, 584, 563, 563, 563, 563, 563, 576, 576, 576,
618 576, 563, 585, 563, 585, 577, 577, 577, 577, 577,
619 577, 563, 586, 563, 586, 563, 582, 587, 563, 563,
620 563, 563, 563, 575, 584, 563, 563, 563, 563, 563,
621 563, 563, 576, 563, 563, 576, 585, 563, 563, 577,
622 577, 563, 563, 577, 577, 586, 563, 582, 587, 587,
623 563, 587, 563, 563, 563, 575, 584, 563, 563, 563,
624 563, 563, 563, 563, 563, 563, 563, 563, 563, 563,
626 576, 585, 563, 563, 563, 563, 563, 577, 563, 563,
627 563, 577, 577, 586, 563, 582, 587, 587, 563, 563,
628 575, 584, 563, 563, 563, 563, 576, 563, 563, 563,
629 563, 563, 563, 563, 563, 563, 563, 563, 563, 563,
630 563, 582, 587, 587, 575, 563, 563, 576, 563, 563,
631 563, 563, 563, 563, 563, 563, 563, 563, 582, 587,
632 587, 575, 576, 563, 582, 587, 587, 575, 576, 576,
633 582, 582, 582, 587, 587, 563, 563, 563, 563, 563,
634 563, 582, 582, 582, 587, 587, 563, 563, 563, 563,
635 563, 563, 563, 563, 563, 582, 582, 582, 587, 587,
637 563, 563, 563, 563, 582, 582, 582, 587, 587, 587,
638 563, 563, 563, 563, 582, 582, 582, 587, 587, 587,
639 588, 589, 563, 563, 563, 563, 582, 582, 582, 587,
640 590, 591, 588, 589, 563, 563, 563, 563, 582, 582,
641 582, 590, 587, 592, 591, 593, 587, 563, 563, 563,
642 563, 582, 582, 582, 592, 563, 593, 587, 563, 563,
643 582, 582, 582, 563, 582, 582, 582, 563, 582, 582,
644 582, 582, 582, 582, 582, 582, 582, 582, 582, 582,
645 582, 582, 582, 582, 582, 582, 582, 582, 582, 582,
646 582, 582, 582, 582, 582, 582, 582, 582, 582, 582,
648 582, 582, 582, 582, 582, 582, 582, 582, 582, 582,
649 582, 582, 582, 582, 582, 582, 582, 582, 582, 582,
650 582, 582, 582, 582, 582, 582, 582, 582, 582, 582,
651 582, 582, 582, 582, 582, 582, 582, 582, 582, 582,
652 582, 582, 582, 582, 582, 582, 582, 582, 582, 582,
653 582, 582, 582, 582, 582, 582, 563, 582, 582, 563,
654 582, 563, 0, 563, 563, 563, 563, 563, 563, 563,
655 563, 563, 563, 563, 563, 563, 563, 563, 563, 563,
656 563, 563, 563, 563, 563, 563, 563, 563, 563, 563,
661 static yyconst flex_int16_t yy_nxt[1642] =
663 563, 54, 55, 54, 54, 55, 54, 54, 55, 54,
664 54, 55, 54, 62, 563, 56, 62, 65, 56, 65,
665 63, 57, 468, 63, 57, 59, 55, 59, 59, 55,
666 59, 68, 69, 66, 159, 66, 70, 71, 160, 60,
667 68, 69, 60, 168, 72, 70, 71, 68, 69, 206,
668 73, 125, 70, 72, 68, 69, 169, 73, 342, 70,
669 72, 75, 76, 75, 76, 126, 125, 72, 55, 55,
670 55, 55, 55, 55, 87, 55, 87, 87, 55, 87,
671 127, 172, 78, 174, 456, 78, 175, 172, 88, 210,
672 77, 88, 77, 79, 80, 55, 80, 79, 79, 79,
674 79, 79, 79, 79, 81, 79, 281, 79, 83, 79,
675 84, 79, 87, 55, 87, 87, 55, 87, 55, 55,
676 55, 281, 173, 79, 79, 206, 89, 206, 464, 89,
677 375, 247, 90, 208, 85, 79, 80, 55, 80, 79,
678 79, 79, 79, 79, 79, 79, 81, 79, 343, 79,
679 83, 79, 84, 79, 55, 55, 55, 87, 55, 87,
680 87, 55, 87, 206, 281, 79, 79, 456, 90, 359,
681 281, 88, 369, 370, 88, 128, 85, 55, 55, 55,
682 55, 55, 55, 87, 55, 87, 87, 55, 87, 127,
683 344, 91, 281, 206, 91, 361, 281, 89, 281, 128,
685 89, 87, 55, 87, 87, 55, 87, 55, 55, 55,
686 55, 55, 55, 127, 360, 92, 206, 374, 92, 460,
687 366, 93, 406, 469, 93, 94, 95, 55, 95, 94,
688 94, 94, 94, 94, 94, 94, 96, 94, 97, 94,
689 98, 94, 99, 94, 97, 97, 97, 97, 97, 97,
690 97, 97, 97, 97, 97, 94, 94, 97, 97, 97,
691 97, 100, 97, 97, 97, 97, 97, 101, 97, 102,
692 97, 103, 97, 97, 97, 97, 97, 97, 97, 97,
693 105, 55, 105, 105, 55, 105, 55, 55, 55, 55,
694 55, 55, 443, 443, 106, 281, 282, 106, 459, 456,
696 107, 446, 446, 107, 108, 109, 55, 109, 108, 108,
697 108, 108, 108, 108, 108, 110, 108, 111, 108, 112,
698 108, 113, 108, 111, 111, 111, 111, 111, 111, 111,
699 111, 111, 111, 111, 108, 108, 111, 111, 111, 111,
700 114, 111, 111, 111, 111, 111, 115, 111, 116, 111,
701 111, 111, 111, 117, 118, 111, 111, 111, 111, 120,
702 55, 120, 120, 55, 120, 68, 69, 68, 69, 206,
703 70, 133, 70, 121, 456, 465, 121, 206, 122, 128,
704 122, 124, 124, 124, 124, 124, 124, 124, 124, 124,
705 124, 124, 124, 127, 123, 128, 123, 128, 134, 124,
707 124, 124, 143, 128, 135, 128, 128, 136, 383, 127,
708 143, 127, 137, 128, 139, 128, 206, 127, 128, 127,
709 127, 124, 124, 124, 206, 143, 128, 127, 144, 127,
710 145, 128, 127, 155, 206, 146, 144, 146, 145, 148,
711 127, 145, 128, 147, 384, 127, 146, 416, 144, 164,
712 145, 148, 206, 145, 405, 147, 127, 451, 147, 124,
713 124, 124, 281, 278, 144, 124, 124, 124, 124, 124,
714 124, 124, 124, 124, 219, 219, 219, 219, 219, 219,
715 232, 232, 232, 232, 232, 232, 242, 242, 242, 206,
716 221, 206, 281, 221, 367, 450, 234, 281, 471, 234,
718 206, 316, 244, 242, 242, 242, 219, 219, 219, 219,
719 219, 219, 219, 219, 219, 261, 261, 261, 206, 244,
720 386, 385, 221, 206, 222, 221, 206, 235, 221, 498,
721 262, 264, 264, 264, 232, 232, 232, 382, 245, 232,
722 232, 232, 397, 206, 255, 396, 265, 232, 232, 232,
723 234, 268, 268, 268, 206, 234, 272, 272, 272, 242,
724 242, 242, 398, 234, 452, 281, 269, 242, 242, 242,
725 449, 273, 242, 242, 242, 244, 280, 280, 280, 219,
726 219, 219, 267, 244, 288, 288, 288, 408, 244, 290,
727 290, 290, 281, 282, 448, 221, 291, 291, 291, 292,
729 292, 292, 261, 261, 261, 293, 293, 293, 206, 294,
730 276, 206, 295, 296, 296, 296, 281, 262, 264, 264,
731 264, 232, 232, 232, 287, 298, 298, 298, 297, 299,
732 480, 407, 300, 265, 268, 268, 268, 234, 303, 303,
733 303, 281, 304, 399, 206, 305, 306, 306, 306, 269,
734 272, 272, 272, 438, 242, 242, 242, 302, 280, 280,
735 280, 307, 309, 309, 309, 273, 310, 504, 400, 311,
736 244, 320, 320, 320, 281, 219, 219, 219, 288, 288,
737 288, 323, 323, 323, 290, 290, 290, 291, 291, 291,
738 314, 221, 401, 206, 317, 292, 292, 292, 293, 293,
740 293, 206, 294, 454, 402, 295, 296, 296, 296, 318,
741 206, 324, 324, 324, 322, 325, 403, 492, 326, 206,
742 462, 297, 298, 298, 298, 206, 299, 206, 404, 300,
743 328, 328, 328, 303, 303, 303, 461, 304, 206, 439,
744 305, 306, 306, 306, 206, 516, 329, 330, 330, 330,
745 441, 331, 206, 443, 332, 463, 307, 333, 333, 333,
746 309, 309, 309, 466, 310, 444, 206, 311, 335, 335,
747 335, 206, 334, 337, 337, 337, 339, 339, 339, 320,
748 320, 320, 437, 336, 346, 346, 346, 206, 338, 323,
749 323, 323, 340, 481, 324, 324, 324, 486, 325, 453,
751 347, 326, 328, 328, 328, 330, 330, 330, 206, 331,
752 443, 206, 332, 333, 333, 333, 206, 467, 329, 349,
753 349, 349, 444, 350, 493, 206, 351, 436, 334, 335,
754 335, 335, 352, 352, 352, 206, 353, 206, 484, 354,
755 337, 337, 337, 470, 336, 355, 355, 355, 206, 356,
756 206, 206, 357, 206, 499, 338, 339, 339, 339, 346,
757 346, 346, 349, 349, 349, 206, 350, 206, 435, 351,
758 485, 510, 340, 488, 473, 347, 352, 352, 352, 206,
759 353, 487, 502, 354, 355, 355, 355, 489, 356, 206,
760 206, 357, 365, 365, 365, 365, 365, 365, 376, 376,
762 376, 378, 378, 378, 380, 380, 380, 206, 206, 206,
763 490, 206, 206, 377, 206, 517, 379, 206, 206, 381,
764 376, 376, 376, 387, 387, 387, 511, 388, 496, 206,
765 389, 371, 505, 372, 497, 377, 503, 206, 373, 378,
766 378, 378, 390, 390, 390, 491, 391, 206, 494, 392,
767 380, 380, 380, 500, 379, 393, 393, 393, 206, 394,
768 495, 426, 395, 501, 425, 381, 387, 387, 387, 424,
769 388, 206, 423, 389, 390, 390, 390, 206, 391, 206,
770 206, 392, 393, 393, 393, 414, 394, 506, 206, 395,
771 409, 409, 409, 415, 415, 415, 417, 417, 417, 418,
773 418, 418, 409, 409, 409, 410, 281, 514, 507, 206,
774 206, 508, 206, 515, 419, 281, 518, 410, 281, 420,
775 420, 420, 206, 421, 206, 206, 422, 415, 415, 415,
776 428, 428, 428, 509, 206, 281, 417, 417, 417, 418,
777 418, 418, 206, 206, 206, 512, 206, 513, 206, 413,
778 206, 412, 206, 427, 419, 281, 430, 430, 430, 522,
779 431, 519, 429, 432, 420, 420, 420, 523, 421, 534,
780 520, 422, 281, 526, 428, 428, 428, 458, 458, 458,
781 281, 279, 279, 279, 279, 279, 279, 279, 279, 279,
782 206, 411, 279, 281, 282, 279, 279, 279, 281, 279,
784 440, 206, 368, 528, 206, 206, 458, 458, 458, 206,
785 206, 279, 279, 279, 279, 279, 279, 279, 279, 279,
786 279, 279, 281, 535, 279, 206, 527, 279, 279, 279,
787 281, 279, 430, 430, 430, 521, 431, 206, 540, 432,
788 206, 364, 317, 279, 279, 472, 472, 472, 281, 279,
789 279, 279, 279, 279, 447, 279, 279, 279, 541, 538,
790 279, 206, 529, 279, 279, 279, 281, 279, 206, 206,
791 544, 532, 206, 206, 474, 474, 474, 206, 206, 279,
792 279, 279, 279, 279, 279, 279, 279, 279, 279, 447,
793 206, 539, 279, 206, 524, 279, 279, 279, 281, 279,
795 472, 472, 472, 525, 475, 206, 545, 476, 477, 477,
796 477, 279, 279, 474, 474, 474, 206, 478, 530, 533,
797 479, 477, 477, 477, 206, 482, 206, 536, 483, 206,
798 531, 537, 206, 206, 206, 206, 206, 206, 206, 206,
799 206, 206, 206, 206, 552, 206, 555, 363, 552, 362,
800 555, 542, 543, 358, 546, 547, 206, 206, 206, 206,
801 550, 551, 553, 558, 554, 556, 556, 556, 558, 559,
802 559, 559, 548, 549, 348, 206, 345, 206, 556, 556,
803 556, 557, 561, 561, 561, 560, 559, 559, 559, 561,
804 561, 561, 341, 327, 557, 321, 319, 281, 562, 315,
806 313, 312, 560, 308, 301, 562, 52, 52, 52, 52,
807 52, 52, 52, 53, 53, 53, 53, 53, 53, 53,
808 58, 58, 58, 58, 58, 58, 58, 61, 61, 61,
809 61, 61, 61, 61, 64, 64, 64, 64, 64, 64,
810 64, 67, 67, 67, 67, 67, 67, 67, 74, 74,
811 74, 74, 74, 74, 74, 82, 82, 82, 82, 82,
812 82, 82, 86, 86, 86, 86, 86, 86, 86, 104,
813 104, 104, 104, 104, 104, 104, 119, 119, 119, 119,
814 119, 119, 119, 141, 141, 141, 289, 141, 150, 150,
815 150, 286, 150, 157, 157, 157, 285, 157, 167, 167,
817 167, 167, 167, 284, 167, 182, 283, 182, 193, 277,
818 193, 201, 275, 201, 205, 205, 205, 205, 205, 205,
819 205, 211, 274, 271, 211, 220, 220, 220, 220, 220,
820 220, 233, 233, 233, 233, 233, 233, 243, 243, 243,
821 243, 243, 243, 279, 279, 279, 279, 279, 279, 279,
822 433, 433, 433, 433, 433, 433, 433, 434, 434, 434,
823 434, 434, 434, 434, 442, 442, 442, 442, 442, 442,
824 442, 445, 445, 445, 445, 445, 445, 445, 455, 455,
825 455, 455, 455, 455, 455, 457, 457, 457, 457, 457,
826 457, 457, 270, 266, 263, 260, 259, 258, 257, 256,
828 254, 253, 252, 251, 250, 249, 248, 206, 246, 241,
829 240, 239, 238, 237, 236, 231, 230, 229, 228, 227,
830 226, 225, 224, 223, 218, 217, 216, 215, 214, 213,
831 212, 209, 207, 206, 204, 203, 202, 200, 199, 198,
832 197, 196, 195, 194, 192, 191, 190, 189, 188, 187,
833 186, 185, 184, 183, 181, 180, 179, 178, 177, 176,
834 171, 168, 170, 166, 165, 163, 162, 161, 158, 156,
835 154, 153, 152, 151, 149, 142, 140, 138, 132, 131,
836 132, 131, 130, 129, 563, 51, 563, 563, 563, 563,
837 563, 563, 563, 563, 563, 563, 563, 563, 563, 563,
839 563, 563, 563, 563, 563, 563, 563, 563, 563, 563,
840 563, 563, 563, 563, 563, 563, 563, 563, 563, 563,
841 563, 563, 563, 563, 563, 563, 563, 563, 563, 563,
842 563, 563, 563, 563, 563, 563, 563, 563, 563, 563,
846 static yyconst flex_int16_t yy_chk[1642] =
848 0, 3, 3, 3, 4, 4, 4, 5, 5, 5,
849 6, 6, 6, 9, 0, 3, 10, 11, 4, 12,
850 9, 5, 464, 10, 6, 7, 7, 7, 8, 8,
851 8, 13, 13, 11, 115, 12, 13, 13, 115, 7,
852 14, 14, 8, 125, 13, 14, 14, 15, 15, 316,
853 15, 56, 15, 14, 16, 16, 125, 16, 316, 16,
854 15, 17, 17, 18, 18, 56, 57, 16, 19, 19,
855 19, 20, 20, 20, 23, 23, 23, 24, 24, 24,
856 57, 133, 19, 134, 457, 20, 134, 172, 23, 172,
857 17, 24, 18, 21, 21, 21, 21, 21, 21, 21,
859 21, 21, 21, 21, 21, 21, 367, 21, 21, 21,
860 21, 21, 25, 25, 25, 26, 26, 26, 27, 27,
861 27, 317, 133, 21, 21, 169, 25, 208, 456, 26,
862 367, 208, 27, 169, 21, 22, 22, 22, 22, 22,
863 22, 22, 22, 22, 22, 22, 22, 22, 317, 22,
864 22, 22, 22, 22, 28, 28, 28, 29, 29, 29,
865 30, 30, 30, 342, 344, 22, 22, 455, 28, 342,
866 318, 29, 363, 363, 30, 60, 22, 31, 31, 31,
867 32, 32, 32, 33, 33, 33, 34, 34, 34, 60,
868 318, 31, 360, 397, 32, 344, 343, 33, 366, 83,
870 34, 35, 35, 35, 36, 36, 36, 37, 37, 37,
871 38, 38, 38, 83, 343, 35, 465, 366, 36, 450,
872 360, 37, 397, 465, 38, 39, 39, 39, 39, 39,
873 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
874 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
875 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
876 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
877 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
878 41, 41, 41, 42, 42, 42, 43, 43, 43, 44,
879 44, 44, 432, 445, 41, 443, 443, 42, 448, 446,
881 43, 432, 445, 44, 45, 45, 45, 45, 45, 45,
882 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
883 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
884 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
885 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
886 45, 45, 45, 45, 45, 45, 45, 45, 45, 47,
887 47, 47, 48, 48, 48, 49, 49, 50, 50, 461,
888 49, 70, 50, 47, 444, 461, 48, 372, 49, 78,
889 50, 54, 54, 54, 55, 55, 55, 59, 59, 59,
890 80, 80, 80, 78, 49, 88, 50, 93, 70, 87,
892 87, 87, 88, 89, 70, 98, 90, 70, 372, 88,
893 89, 93, 70, 112, 78, 91, 373, 89, 92, 98,
894 90, 95, 95, 95, 406, 92, 106, 112, 88, 91,
895 88, 107, 92, 106, 396, 88, 89, 93, 89, 90,
896 106, 90, 121, 89, 373, 107, 90, 406, 91, 121,
897 91, 92, 247, 92, 396, 91, 121, 438, 92, 105,
898 105, 105, 361, 247, 107, 109, 109, 109, 120, 120,
899 120, 124, 124, 124, 182, 182, 182, 183, 183, 183,
900 193, 193, 193, 194, 194, 194, 201, 201, 201, 278,
901 182, 467, 375, 183, 361, 437, 193, 374, 467, 194,
903 492, 278, 201, 202, 202, 202, 219, 219, 219, 220,
904 220, 220, 222, 222, 222, 228, 228, 228, 371, 202,
905 375, 374, 219, 382, 183, 220, 383, 194, 222, 492,
906 228, 230, 230, 230, 232, 232, 232, 371, 202, 233,
907 233, 233, 383, 384, 222, 382, 230, 235, 235, 235,
908 232, 236, 236, 236, 439, 233, 239, 239, 239, 242,
909 242, 242, 384, 235, 439, 399, 236, 243, 243, 243,
910 436, 239, 245, 245, 245, 242, 248, 248, 248, 255,
911 255, 255, 235, 243, 256, 256, 256, 399, 245, 258,
912 258, 258, 248, 248, 435, 255, 259, 259, 259, 260,
914 260, 260, 261, 261, 261, 262, 262, 262, 475, 262,
915 245, 398, 262, 263, 263, 263, 385, 261, 264, 264,
916 264, 267, 267, 267, 255, 265, 265, 265, 263, 265,
917 475, 398, 265, 264, 268, 268, 268, 267, 269, 269,
918 269, 386, 269, 385, 498, 269, 270, 270, 270, 268,
919 272, 272, 272, 426, 276, 276, 276, 267, 280, 280,
920 280, 270, 273, 273, 273, 272, 273, 498, 386, 273,
921 276, 285, 285, 285, 280, 287, 287, 287, 288, 288,
922 288, 289, 289, 289, 290, 290, 290, 291, 291, 291,
923 276, 287, 388, 441, 280, 292, 292, 292, 293, 293,
925 293, 486, 293, 441, 388, 293, 296, 296, 296, 280,
926 453, 297, 297, 297, 287, 297, 389, 486, 297, 510,
927 453, 296, 298, 298, 298, 452, 298, 427, 389, 298,
928 302, 302, 302, 303, 303, 303, 452, 303, 429, 427,
929 303, 306, 306, 306, 454, 510, 302, 307, 307, 307,
930 429, 307, 462, 431, 307, 454, 306, 308, 308, 308,
931 309, 309, 309, 462, 309, 431, 480, 309, 312, 312,
932 312, 476, 308, 313, 313, 313, 314, 314, 314, 320,
933 320, 320, 425, 312, 322, 322, 322, 440, 313, 323,
934 323, 323, 314, 476, 324, 324, 324, 480, 324, 440,
936 322, 324, 328, 328, 328, 330, 330, 330, 487, 330,
937 442, 463, 330, 333, 333, 333, 478, 463, 328, 334,
938 334, 334, 442, 334, 487, 493, 334, 424, 333, 335,
939 335, 335, 336, 336, 336, 504, 336, 466, 478, 336,
940 337, 337, 337, 466, 335, 338, 338, 338, 479, 338,
941 481, 482, 338, 496, 493, 337, 339, 339, 339, 346,
942 346, 346, 349, 349, 349, 483, 349, 470, 423, 349,
943 479, 504, 339, 482, 470, 346, 352, 352, 352, 484,
944 352, 481, 496, 352, 355, 355, 355, 483, 355, 511,
945 505, 355, 359, 359, 359, 365, 365, 365, 368, 368,
947 368, 369, 369, 369, 370, 370, 370, 497, 359, 499,
948 484, 365, 490, 368, 485, 511, 369, 488, 491, 370,
949 376, 376, 376, 377, 377, 377, 505, 377, 490, 489,
950 377, 365, 499, 365, 491, 376, 497, 494, 365, 378,
951 378, 378, 379, 379, 379, 485, 379, 495, 488, 379,
952 380, 380, 380, 494, 378, 381, 381, 381, 500, 381,
953 489, 414, 381, 495, 413, 380, 387, 387, 387, 412,
954 387, 508, 411, 387, 390, 390, 390, 509, 390, 501,
955 512, 390, 393, 393, 393, 404, 393, 500, 502, 393,
956 400, 400, 400, 405, 405, 405, 407, 407, 407, 408,
958 408, 408, 409, 409, 409, 400, 400, 508, 501, 405,
959 503, 502, 407, 509, 408, 408, 512, 409, 409, 410,
960 410, 410, 506, 410, 507, 513, 410, 415, 415, 415,
961 416, 416, 416, 503, 516, 410, 417, 417, 417, 418,
962 418, 418, 517, 415, 514, 506, 416, 507, 520, 403,
963 528, 402, 417, 415, 418, 418, 419, 419, 419, 516,
964 419, 513, 417, 419, 420, 420, 420, 517, 420, 528,
965 514, 420, 419, 520, 428, 428, 428, 447, 447, 447,
966 420, 421, 421, 421, 421, 421, 421, 421, 421, 421,
967 428, 401, 421, 447, 447, 421, 421, 421, 421, 421,
969 428, 521, 362, 522, 529, 534, 458, 458, 458, 515,
970 522, 421, 421, 422, 422, 422, 422, 422, 422, 422,
971 422, 422, 458, 529, 422, 535, 521, 422, 422, 422,
972 422, 422, 430, 430, 430, 515, 430, 538, 534, 430,
973 532, 358, 458, 422, 422, 469, 469, 469, 430, 433,
974 433, 433, 433, 433, 433, 433, 433, 433, 535, 532,
975 433, 469, 523, 433, 433, 433, 433, 433, 518, 523,
976 538, 526, 533, 539, 471, 471, 471, 519, 526, 433,
977 433, 434, 434, 434, 434, 434, 434, 434, 434, 434,
978 471, 533, 434, 524, 518, 434, 434, 434, 434, 434,
980 472, 472, 472, 519, 472, 525, 539, 472, 473, 473,
981 473, 434, 434, 474, 474, 474, 472, 474, 524, 527,
982 474, 477, 477, 477, 473, 477, 527, 530, 477, 474,
983 525, 531, 536, 537, 530, 540, 541, 477, 531, 542,
984 543, 544, 545, 548, 546, 549, 550, 348, 547, 345,
985 551, 536, 537, 341, 540, 541, 546, 547, 550, 551,
986 544, 545, 548, 553, 549, 552, 552, 552, 554, 555,
987 555, 555, 542, 543, 327, 553, 321, 554, 556, 556,
988 556, 552, 558, 558, 558, 555, 559, 559, 559, 561,
989 561, 561, 315, 301, 556, 286, 282, 279, 558, 277,
991 275, 274, 559, 271, 266, 561, 564, 564, 564, 564,
992 564, 564, 564, 565, 565, 565, 565, 565, 565, 565,
993 566, 566, 566, 566, 566, 566, 566, 567, 567, 567,
994 567, 567, 567, 567, 568, 568, 568, 568, 568, 568,
995 568, 569, 569, 569, 569, 569, 569, 569, 570, 570,
996 570, 570, 570, 570, 570, 571, 571, 571, 571, 571,
997 571, 571, 572, 572, 572, 572, 572, 572, 572, 573,
998 573, 573, 573, 573, 573, 573, 574, 574, 574, 574,
999 574, 574, 574, 575, 575, 575, 257, 575, 576, 576,
1000 576, 254, 576, 577, 577, 577, 253, 577, 578, 578,
1002 578, 578, 578, 252, 578, 579, 251, 579, 580, 246,
1003 580, 581, 241, 581, 582, 582, 582, 582, 582, 582,
1004 582, 583, 240, 238, 583, 584, 584, 584, 584, 584,
1005 584, 585, 585, 585, 585, 585, 585, 586, 586, 586,
1006 586, 586, 586, 587, 587, 587, 587, 587, 587, 587,
1007 588, 588, 588, 588, 588, 588, 588, 589, 589, 589,
1008 589, 589, 589, 589, 590, 590, 590, 590, 590, 590,
1009 590, 591, 591, 591, 591, 591, 591, 591, 592, 592,
1010 592, 592, 592, 592, 592, 593, 593, 593, 593, 593,
1011 593, 593, 237, 231, 229, 227, 226, 225, 224, 223,
1013 218, 217, 216, 213, 212, 211, 209, 205, 203, 200,
1014 199, 198, 197, 196, 195, 192, 191, 190, 189, 188,
1015 187, 186, 185, 184, 181, 180, 178, 177, 176, 175,
1016 174, 170, 168, 167, 166, 165, 164, 163, 162, 161,
1017 160, 159, 158, 155, 154, 153, 152, 151, 148, 147,
1018 146, 145, 144, 143, 142, 139, 138, 137, 136, 135,
1019 129, 128, 126, 123, 122, 118, 117, 116, 114, 110,
1020 103, 102, 101, 100, 96, 85, 81, 77, 76, 75,
1021 69, 68, 66, 63, 51, 563, 563, 563, 563, 563,
1022 563, 563, 563, 563, 563, 563, 563, 563, 563, 563,
1024 563, 563, 563, 563, 563, 563, 563, 563, 563, 563,
1025 563, 563, 563, 563, 563, 563, 563, 563, 563, 563,
1026 563, 563, 563, 563, 563, 563, 563, 563, 563, 563,
1027 563, 563, 563, 563, 563, 563, 563, 563, 563, 563,
1031 /* Table of booleans, true if rule could match eol. */
1032 static yyconst flex_int32_t yy_rule_can_match_eol[93] =
1034 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1,
1035 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1036 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1037 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1038 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, };
1040 static yy_state_type yy_last_accepting_state;
1041 static char *yy_last_accepting_cpos;
1043 extern int xbt_graph_parse__flex_debug;
1044 int xbt_graph_parse__flex_debug = 0;
1046 /* The intent behind this definition is that it'll catch
1047 * any uses of REJECT which flex missed.
1049 #define REJECT reject_used_but_not_detected
1050 #define yymore() yymore_used_but_not_detected
1051 #define YY_MORE_ADJ 0
1052 #define YY_RESTORE_YY_MORE_OFFSET
1053 char *xbt_graph_parse_text;
1054 /* Validating XML processor for xbt/graphxml.dtd.
1055 * Generated 2007/12/19 15:09:56.
1057 * This program was generated with the FleXML XML processor generator.
1058 * FleXML is Copyright (C) 1999-2005 Kristoffer Rose. All rights reserved.
1059 * FleXML is Copyright (C) 2003-2006 Martin Quinson. All rights reserved.
1060 * (Id: flexml.pl,v 1.63 2007/10/11 14:46:08 mquinson Exp).
1062 * There are two, intertwined parts to this program, part A and part B.
1067 * Some parts, here collectively called "Part A", are found in the
1068 * FleXML package. They are Copyright (C) 1999-2005 Kristoffer Rose
1069 * and Copyright (C) 2003-2006 Martin Quinson. All rights reserved.
1071 * You can redistribute, use, perform, display and/or modify "Part A"
1072 * provided the following two conditions hold:
1074 * 1. The program is distributed WITHOUT ANY WARRANTY from the author of
1075 * FleXML; without even the implied warranty of MERCHANTABILITY or
1076 * FITNESS FOR A PARTICULAR PURPOSE.
1078 * 2. The program distribution conditions do not in any way affect the
1079 * distribution conditions of the FleXML system used to generate this
1080 * file or any version of FleXML derived from that system.
1082 * Notice that these are explicit rights granted to you for files
1083 * generated by the FleXML system. For your rights in connection with
1084 * the FleXML system itself please consult the GNU General Public License.
1089 * The other parts, here collectively called "Part B", and which came
1090 * from the DTD used by FleXML to generate this program, can be
1091 * distributed (or not, as the case may be) under the terms of whoever
1092 * wrote them, provided these terms respect and obey the two conditions
1093 * above under the heading "Part A".
1095 * The author of and contributors to FleXML specifically disclaim
1096 * any copyright interest in "Part B", unless "Part B" was written
1097 * by the author of or contributors to FleXML.
1101 /* Version strings. */
1102 const char rcs_graphxml_flexml_skeleton[] =
1103 "$" "Id: skel,v 1.40 2007/10/11 09:57:24 mquinson Exp $";
1104 const char rcs_graphxml_flexml[] =
1105 "$" "Id: flexml.pl,v 1.63 2007/10/11 14:46:08 mquinson Exp $";
1108 #include <stdlib.h> /* for realloc() -- needed here when using flex 2.5.4 */
1115 #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__TOS_WIN__)
1116 # ifndef __STRICT_ANSI__
1118 # include <process.h>
1121 # include <unistd.h>
1124 #ifndef FLEXML_INDEXSTACKSIZE
1125 #define FLEXML_INDEXSTACKSIZE 1000
1128 /* Generated definitions. */
1129 #define FLEXML_yylineno
1130 #ifndef FLEXML_BUFFERSTACKSIZE
1131 #define FLEXML_BUFFERSTACKSIZE 1000000
1133 #define FLEXML_NEED_BUFFERLIT
1135 /* XML processor api. */
1136 /* FleXML-provided data. */
1137 int graphxml_pcdata_ix;
1138 extern char *graphxml_bufferstack;
1139 #define graphxml_pcdata (graphxml_bufferstack + graphxml_pcdata_ix)
1140 AT_graphxml_node_name AX_graphxml_node_name;
1141 #define A_graphxml_node_name (graphxml_bufferstack + AX_graphxml_node_name)
1142 AT_graphxml_edge_source AX_graphxml_edge_source;
1143 #define A_graphxml_edge_source (graphxml_bufferstack + AX_graphxml_edge_source)
1144 AT_graphxml_node_position_y AX_graphxml_node_position_y;
1145 #define A_graphxml_node_position_y (graphxml_bufferstack + AX_graphxml_node_position_y)
1146 AT_graphxml_node_position_x AX_graphxml_node_position_x;
1147 #define A_graphxml_node_position_x (graphxml_bufferstack + AX_graphxml_node_position_x)
1148 AT_graphxml_edge_data AX_graphxml_edge_data;
1149 #define A_graphxml_edge_data (graphxml_bufferstack + AX_graphxml_edge_data)
1150 AT_graphxml_edge_target AX_graphxml_edge_target;
1151 #define A_graphxml_edge_target (graphxml_bufferstack + AX_graphxml_edge_target)
1152 AT_graphxml_graph_isDirected AX_graphxml_graph_isDirected;
1153 #define A_graphxml_graph_isDirected AX_graphxml_graph_isDirected
1154 AT_graphxml_node_label AX_graphxml_node_label;
1155 #define A_graphxml_node_label (graphxml_bufferstack + AX_graphxml_node_label)
1156 AT_graphxml_node_data AX_graphxml_node_data;
1157 #define A_graphxml_node_data (graphxml_bufferstack + AX_graphxml_node_data)
1158 AT_graphxml_edge_label AX_graphxml_edge_label;
1159 #define A_graphxml_edge_label (graphxml_bufferstack + AX_graphxml_edge_label)
1160 AT_graphxml_edge_length AX_graphxml_edge_length;
1161 #define A_graphxml_edge_length (graphxml_bufferstack + AX_graphxml_edge_length)
1162 AT_graphxml_edge_name AX_graphxml_edge_name;
1163 #define A_graphxml_edge_name (graphxml_bufferstack + AX_graphxml_edge_name)
1167 # define ENTER(state) debug_enter(state,#state)
1168 # define LEAVE debug_leave()
1169 # define SET(state) debug_set(state,#state)
1170 static void debug_enter(int, const char*);
1171 static void debug_leave(void);
1172 static void debug_set(int, const char*);
1174 # define ENTER(state) (yy_push_state(state))
1175 # define LEAVE (yy_pop_state())
1176 # define SET(state) BEGIN(state)
1179 /* Generic actions. */
1180 #define SKIP /*skip*/
1181 #define SUCCEED CLEANUP; return 0
1183 #define FAIL return fail
1184 static int fail(const char*, ...);
1186 enum {flexml_max_err_msg_size = 512};
1187 static char flexml_err_msg[flexml_max_err_msg_size];
1188 const char * graphxml_parse_err_msg()
1190 return flexml_err_msg;
1192 static void reset_graphxml_parse_err_msg()
1194 flexml_err_msg[0] = '\0';
1198 static void cleanup(void);
1199 #define CLEANUP cleanup()
1201 /* Text buffer stack handling. */
1202 char *graphxml_bufferstack = NULL;
1203 static int blimit = FLEXML_BUFFERSTACKSIZE;
1204 static int bnext = 1;
1206 static int *indexstack = NULL;
1207 static int ilimit = FLEXML_INDEXSTACKSIZE;
1208 static int inext = 1;
1210 #define BUFFERSET(P) (P = bnext)
1211 #define BUFFERPUTC(C) (ck_blimit(), graphxml_bufferstack[bnext++] = (C))
1212 #define BUFFERDONE (BUFFERPUTC('\0'))
1214 #define BUFFERLITERAL(C, P) graphxml_bufferliteral(C, &(P), xbt_graph_parse_text)
1216 /* after this is called, there are at least 2 slots left in the stack */
1217 static int ck_blimit()
1219 if (bnext >= blimit) {
1220 blimit += FLEXML_BUFFERSTACKSIZE + 2;
1222 char *temp = (char *) realloc(graphxml_bufferstack, blimit);
1224 graphxml_bufferstack = temp;
1230 /* after this is called, there are at least 2 slots left in the stack */
1231 static int ck_ilimit()
1233 if (inext >= ilimit) {
1234 ilimit += FLEXML_INDEXSTACKSIZE + 2;
1236 int *temp = (int *) realloc(indexstack, ilimit);
1244 #ifdef FLEXML_NEED_BUFFERLIT
1245 static void graphxml_bufferliteral(char c, int* pp, const char* text)
1247 const char *s = (c ? strchr(text,c) : text-1), *e = strrchr(text,c);
1248 assert(s <= e); BUFFERSET(*pp);
1250 if (isspace(*s) && c) { BUFFERPUTC(' '); while (isspace(*s)) ++s; }
1251 else BUFFERPUTC(*s);
1257 static void pushbuffer(int p)
1260 indexstack[inext++] = p;
1261 indexstack[inext++] = bnext;
1264 static int popbuffer(void)
1267 bnext = indexstack[--inext];
1268 return indexstack[--inext];
1271 /* General internal entities are `unput' back onto the input stream... */
1272 #define ENTITYTEXT(T) \
1273 { char *s = (T), *e = s+strlen(s);\
1274 while (--e >= s) { unput(*e); }}
1276 /* Flex standard options. */
1277 #define YY_NO_INPUT 1
1278 /* Flex user-requested options. */
1279 /* XML character classes (currently restricted to ASCII). */
1280 /* "Common syntactic structures." */
1281 /* "Names and Tokens." */
1282 /* Miscellaneous. */
1283 /* Parser states (flex `exclusive start conditions'):
1285 * PROLOG the XML prolog of the document before <?xml...>
1286 * DOCTYPE the XML prolog of the document after <?xml...>
1287 * EPILOG after the root element
1288 * INCOMMENT inside an XML comment <!--....-->
1289 * INPI inside an XML PI <?...?>
1290 * VALUE1 inside a '...'-delimited literal
1291 * VALUE2 inside a "..."-delimited literal
1292 * CDATA inside a <![CDATA[...] ]> section.
1293 * ROOT_<tag> expect root element <tag>
1294 * AL_<tag> inside the attribute list for <tag>
1295 * IN_<tag> inside a <tag> with element contents (ready for end tag)
1296 * IMPOSSIBLE dummy to permit disabling rules; must be last
1300 const char* *graphxml_statenames=NULL;
1311 #define ROOT_graphxml_graph 9
1312 #define AL_graphxml_graph 10
1313 #define S_graphxml_graph 11
1314 #define S_graphxml_graph_1 12
1315 #define S_graphxml_graph_2 13
1316 #define S_graphxml_graph_3 14
1317 #define S_graphxml_graph_4 15
1318 #define S_graphxml_graph_5 16
1319 #define E_graphxml_graph 17
1320 #define ROOT_graphxml_node 18
1321 #define AL_graphxml_node 19
1322 #define E_graphxml_node 20
1323 #define ROOT_graphxml_edge 21
1324 #define AL_graphxml_edge 22
1325 #define E_graphxml_edge 23
1326 #define IMPOSSIBLE 24
1328 #ifndef YY_NO_UNISTD_H
1329 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1330 * down here because we want the user's section 1 to have been scanned first.
1331 * The user has a chance to override it with an option.
1333 #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__TOS_WIN__)
1334 # ifndef __STRICT_ANSI__
1336 # include <process.h>
1339 # include <unistd.h>
1343 #ifndef YY_EXTRA_TYPE
1344 #define YY_EXTRA_TYPE void *
1347 static int yy_init_globals (void );
1349 /* Macros after this point can all be overridden by user definitions in
1353 #ifndef YY_SKIP_YYWRAP
1355 extern "C" int xbt_graph_parse_wrap (void );
1357 extern int xbt_graph_parse_wrap (void );
1362 static void yy_flex_strncpy (char *,yyconst char *,int );
1365 #ifdef YY_NEED_STRLEN
1366 static int yy_flex_strlen (yyconst char * );
1372 static int yyinput (void );
1374 static int input (void );
1379 static int yy_start_stack_ptr = 0;
1380 static int yy_start_stack_depth = 0;
1381 static int *yy_start_stack = NULL;
1383 static void yy_push_state (int new_state );
1385 static void yy_pop_state (void );
1387 /* Amount of stuff to slurp up with each read. */
1388 #ifndef YY_READ_BUF_SIZE
1389 #define YY_READ_BUF_SIZE 8192
1392 /* Copy whatever the last rule matched to the standard output. */
1394 /* This used to be an fputs(), but since the string might contain NUL's,
1395 * we now use fwrite().
1397 #define ECHO fwrite( xbt_graph_parse_text, xbt_graph_parse_leng, 1, xbt_graph_parse_out )
1400 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1401 * is returned in "result".
1404 #define YY_INPUT(buf,result,max_size) \
1405 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1409 for ( n = 0; n < max_size && \
1410 (c = getc( xbt_graph_parse_in )) != EOF && c != '\n'; ++n ) \
1411 buf[n] = (char) c; \
1413 buf[n++] = (char) c; \
1414 if ( c == EOF && ferror( xbt_graph_parse_in ) ) \
1415 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1421 while ( (result = fread(buf, 1, max_size, xbt_graph_parse_in))==0 && ferror(xbt_graph_parse_in)) \
1423 if( errno != EINTR) \
1425 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1429 clearerr(xbt_graph_parse_in); \
1436 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1437 * we don't want an extra ';' after the "return" because that will cause
1438 * some compilers to complain about unreachable statements.
1441 #define yyterminate() return YY_NULL
1444 /* Number of entries by which start-condition stack grows. */
1445 #ifndef YY_START_STACK_INCR
1446 #define YY_START_STACK_INCR 25
1449 /* Report a fatal error. */
1450 #ifndef YY_FATAL_ERROR
1451 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1454 /* end tables serialization structures and prototypes */
1456 /* Default declaration of generated scanner - a define so the user can
1457 * easily add parameters.
1460 #define YY_DECL_IS_OURS 1
1462 extern int xbt_graph_parse_lex (void);
1464 #define YY_DECL int xbt_graph_parse_lex (void)
1465 #endif /* !YY_DECL */
1467 /* Code executed at the beginning of each rule, after xbt_graph_parse_text and xbt_graph_parse_leng
1470 #ifndef YY_USER_ACTION
1471 #define YY_USER_ACTION
1474 /* Code executed at the end of each rule. */
1476 #define YY_BREAK break;
1479 #define YY_RULE_SETUP \
1482 /** The main scanner function which does all the work.
1486 register yy_state_type yy_current_state;
1487 register char *yy_cp, *yy_bp;
1488 register int yy_act;
1490 /* Bypass Flex's default INITIAL state and begin by parsing the XML prolog. */
1492 reset_graphxml_parse_err_msg();
1493 graphxml_bufferstack = (char *) malloc(FLEXML_BUFFERSTACKSIZE);
1494 assert(graphxml_bufferstack);
1498 for (i = 0; i < blimit; i++) {
1499 graphxml_bufferstack[i] = '\377';
1503 graphxml_bufferstack[0] = '\0';
1504 indexstack = (int *) malloc(FLEXML_INDEXSTACKSIZE * sizeof(int));
1510 graphxml_bufferliteral('\0', &bnext, "-1.0");
1511 graphxml_bufferliteral('\0', &bnext, "-1.0");
1512 graphxml_bufferliteral('\0', &bnext, "-1.0");
1513 if(!graphxml_statenames) {graphxml_statenames= (const char **)calloc(IMPOSSIBLE,sizeof(char*));
1514 graphxml_statenames[PROLOG] = NULL;
1515 graphxml_statenames[DOCTYPE] = NULL;
1516 graphxml_statenames[EPILOG] = NULL;
1517 graphxml_statenames[INCOMMENT] = NULL;
1518 graphxml_statenames[INPI] = NULL;
1519 graphxml_statenames[VALUE1] = NULL;
1520 graphxml_statenames[VALUE2] = NULL;
1521 graphxml_statenames[CDATA] = NULL;
1522 graphxml_statenames[ROOT_graphxml_graph] = NULL;
1523 graphxml_statenames[AL_graphxml_graph] = NULL;
1524 graphxml_statenames[S_graphxml_graph] = "graph";
1525 graphxml_statenames[S_graphxml_graph_1] = "graph";
1526 graphxml_statenames[S_graphxml_graph_2] = "graph";
1527 graphxml_statenames[S_graphxml_graph_3] = "graph";
1528 graphxml_statenames[S_graphxml_graph_4] = "graph";
1529 graphxml_statenames[S_graphxml_graph_5] = "graph";
1530 graphxml_statenames[E_graphxml_graph] = "graph";
1531 graphxml_statenames[ROOT_graphxml_node] = NULL;
1532 graphxml_statenames[AL_graphxml_node] = NULL;
1533 graphxml_statenames[E_graphxml_node] = "node";
1534 graphxml_statenames[ROOT_graphxml_edge] = NULL;
1535 graphxml_statenames[AL_graphxml_edge] = NULL;
1536 graphxml_statenames[E_graphxml_edge] = "edge";
1539 /* COMMENTS and PIs: handled uniformly for efficiency. */
1550 (yy_start) = 1; /* first start state */
1552 if ( ! xbt_graph_parse_in )
1553 xbt_graph_parse_in = stdin;
1555 if ( ! xbt_graph_parse_out )
1556 xbt_graph_parse_out = stdout;
1558 if ( ! YY_CURRENT_BUFFER ) {
1559 xbt_graph_parse_ensure_buffer_stack ();
1560 YY_CURRENT_BUFFER_LVALUE =
1561 xbt_graph_parse__create_buffer(xbt_graph_parse_in,YY_BUF_SIZE );
1564 xbt_graph_parse__load_buffer_state( );
1567 while ( 1 ) /* loops until end-of-file is reached */
1569 yy_cp = (yy_c_buf_p);
1571 /* Support of xbt_graph_parse_text. */
1572 *yy_cp = (yy_hold_char);
1574 /* yy_bp points to the position in yy_ch_buf of the start of
1579 yy_current_state = (yy_start);
1583 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1584 if ( yy_accept[yy_current_state] )
1586 (yy_last_accepting_state) = yy_current_state;
1587 (yy_last_accepting_cpos) = yy_cp;
1589 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1591 yy_current_state = (int) yy_def[yy_current_state];
1592 if ( yy_current_state >= 564 )
1593 yy_c = yy_meta[(unsigned int) yy_c];
1595 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1598 while ( yy_base[yy_current_state] != 1586 );
1601 yy_act = yy_accept[yy_current_state];
1603 { /* have to back up */
1604 yy_cp = (yy_last_accepting_cpos);
1605 yy_current_state = (yy_last_accepting_state);
1606 yy_act = yy_accept[yy_current_state];
1609 YY_DO_BEFORE_ACTION;
1611 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
1614 for ( yyl = 0; yyl < xbt_graph_parse_leng; ++yyl )
1615 if ( xbt_graph_parse_text[yyl] == '\n' )
1617 xbt_graph_parse_lineno++;
1621 do_action: /* This label is used only to access EOF actions. */
1624 { /* beginning of action switch */
1625 case 0: /* must back up */
1626 /* undo the effects of YY_DO_BEFORE_ACTION */
1627 *yy_cp = (yy_hold_char);
1628 yy_cp = (yy_last_accepting_cpos);
1629 yy_current_state = (yy_last_accepting_state);
1630 goto yy_find_action;
1648 /* rule 6 can match eol */
1652 case YY_STATE_EOF(INCOMMENT):
1653 FAIL("EOF in comment.");
1662 /* rule 9 can match eol */
1666 case YY_STATE_EOF(INPI):
1667 FAIL("EOF in PI (processing instruction).");
1670 /* SPACES: skipped uniformly */
1672 /* rule 10 can match eol */
1676 /* PROLOG: determine root element and process it. */
1679 /* rule 11 can match eol */
1684 /* rule 12 can match eol */
1686 FAIL("Bad declaration %s.",xbt_graph_parse_text);
1690 /* rule 13 can match eol */
1692 SET(ROOT_graphxml_edge);
1695 /* rule 14 can match eol */
1697 SET(ROOT_graphxml_node);
1700 /* rule 15 can match eol */
1702 SET(ROOT_graphxml_graph);
1705 /* rule 16 can match eol */
1707 FAIL("Bad declaration %s.",xbt_graph_parse_text);
1711 FAIL("Unexpected character `%c' in prolog.", xbt_graph_parse_text[0]);
1713 case YY_STATE_EOF(PROLOG):
1714 case YY_STATE_EOF(DOCTYPE):
1715 FAIL("EOF in prolog.");
1718 /* RULES DERIVED FROM DTD. */
1719 /* <!-- Small DTD for xbt graphs. --> */
1720 /* isDirected (true|false) "true"
1723 /* rule 18 can match eol */
1725 FAIL("Starting tag <graph> is not allowed here.");
1728 /* rule 19 can match eol */
1731 AX_graphxml_graph_isDirected = A_graphxml_graph_isDirected_true;
1732 ENTER(AL_graphxml_graph); pushbuffer(0);
1737 /* rule 20 can match eol */
1739 /* rule 21 can match eol */
1741 A_graphxml_graph_isDirected = A_graphxml_graph_isDirected_true;
1744 /* rule 22 can match eol */
1746 /* rule 23 can match eol */
1748 A_graphxml_graph_isDirected = A_graphxml_graph_isDirected_false;
1753 LEAVE; STag_graphxml_graph();graphxml_pcdata_ix = 0; ENTER(S_graphxml_graph);
1759 LEAVE; STag_graphxml_graph(); graphxml_pcdata_ix = 0; ETag_graphxml_graph(); popbuffer(); /* attribute */
1761 case ROOT_graphxml_graph: SET(EPILOG); break;
1767 FAIL("Unexpected character `%c' in attribute list of graph element.", xbt_graph_parse_text[0]);
1771 FAIL("Bad attribute `%s' in `graph' element start tag.",xbt_graph_parse_text);
1773 case YY_STATE_EOF(AL_graphxml_graph):
1774 FAIL("EOF in attribute list of `graph' element.");
1778 /* rule 28 can match eol */
1782 ETag_graphxml_graph();
1783 popbuffer(); /* attribute */
1785 case ROOT_graphxml_graph: SET(EPILOG); break;
1790 /* rule 29 can match eol */
1792 FAIL("Unexpected end-tag `%s': `</graph>' expected.",xbt_graph_parse_text);
1796 FAIL("Unexpected character `%c': `</graph>' expected.",xbt_graph_parse_text[0]);
1798 case YY_STATE_EOF(S_graphxml_graph_1):
1799 case YY_STATE_EOF(E_graphxml_graph):
1800 case YY_STATE_EOF(S_graphxml_graph_3):
1801 case YY_STATE_EOF(S_graphxml_graph_5):
1802 case YY_STATE_EOF(S_graphxml_graph):
1803 FAIL("Premature EOF: `</graph>' expected.");
1807 * name CDATA #REQUIRED
1809 * position_x CDATA "-1.0"
1810 * position_y CDATA "-1.0"
1813 /* rule 31 can match eol */
1815 FAIL("Starting tag <node> is not allowed here.");
1818 /* rule 32 can match eol */
1821 AX_graphxml_node_label = 0;
1822 AX_graphxml_node_name = 0;
1823 AX_graphxml_node_data = 0;
1824 AX_graphxml_node_position_x = 1;
1825 AX_graphxml_node_position_y = 6;
1826 ENTER(AL_graphxml_node); pushbuffer(0);
1831 /* rule 33 can match eol */
1833 ENTER(VALUE1); BUFFERSET(AX_graphxml_node_label);
1836 /* rule 34 can match eol */
1838 ENTER(VALUE2); BUFFERSET(AX_graphxml_node_label);
1841 /* rule 35 can match eol */
1843 ENTER(VALUE1); BUFFERSET(AX_graphxml_node_name);
1846 /* rule 36 can match eol */
1848 ENTER(VALUE2); BUFFERSET(AX_graphxml_node_name);
1851 /* rule 37 can match eol */
1853 ENTER(VALUE1); BUFFERSET(AX_graphxml_node_data);
1856 /* rule 38 can match eol */
1858 ENTER(VALUE2); BUFFERSET(AX_graphxml_node_data);
1861 /* rule 39 can match eol */
1863 ENTER(VALUE1); BUFFERSET(AX_graphxml_node_position_x);
1866 /* rule 40 can match eol */
1868 ENTER(VALUE2); BUFFERSET(AX_graphxml_node_position_x);
1871 /* rule 41 can match eol */
1873 ENTER(VALUE1); BUFFERSET(AX_graphxml_node_position_y);
1876 /* rule 42 can match eol */
1878 ENTER(VALUE2); BUFFERSET(AX_graphxml_node_position_y);
1883 if (!AX_graphxml_node_name) FAIL("Required attribute `name' not set for `node' element.");
1884 LEAVE; STag_graphxml_node();graphxml_pcdata_ix = 0; ENTER(E_graphxml_node);
1890 if (!AX_graphxml_node_name) FAIL("Required attribute `name' not set for `node' element.");
1891 LEAVE; STag_graphxml_node(); graphxml_pcdata_ix = 0; ETag_graphxml_node(); popbuffer(); /* attribute */
1893 case S_graphxml_graph_2: case S_graphxml_graph_3: case S_graphxml_graph: SET(S_graphxml_graph_3); break;
1894 case ROOT_graphxml_node: SET(EPILOG); break;
1900 FAIL("Unexpected character `%c' in attribute list of node element.", xbt_graph_parse_text[0]);
1904 FAIL("Bad attribute `%s' in `node' element start tag.",xbt_graph_parse_text);
1906 case YY_STATE_EOF(AL_graphxml_node):
1907 FAIL("EOF in attribute list of `node' element.");
1911 /* rule 47 can match eol */
1915 ETag_graphxml_node();
1916 popbuffer(); /* attribute */
1918 case S_graphxml_graph_2: case S_graphxml_graph_3: case S_graphxml_graph: SET(S_graphxml_graph_3); break;
1919 case ROOT_graphxml_node: SET(EPILOG); break;
1924 /* rule 48 can match eol */
1926 FAIL("Unexpected end-tag `%s': `</node>' expected.",xbt_graph_parse_text);
1930 FAIL("Unexpected character `%c': `</node>' expected.",xbt_graph_parse_text[0]);
1932 case YY_STATE_EOF(E_graphxml_node):
1933 FAIL("Premature EOF: `</node>' expected.");
1937 * name CDATA #IMPLIED
1938 * source CDATA #REQUIRED
1939 * target CDATA #REQUIRED
1940 * length CDATA "-1.0"
1944 /* rule 50 can match eol */
1946 FAIL("Starting tag <edge> is not allowed here.");
1949 /* rule 51 can match eol */
1952 AX_graphxml_edge_label = 0;
1953 AX_graphxml_edge_name = 0;
1954 AX_graphxml_edge_source = 0;
1955 AX_graphxml_edge_target = 0;
1956 AX_graphxml_edge_length = 11;
1957 AX_graphxml_edge_data = 0;
1958 ENTER(AL_graphxml_edge); pushbuffer(0);
1963 /* rule 52 can match eol */
1965 ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_label);
1968 /* rule 53 can match eol */
1970 ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_label);
1973 /* rule 54 can match eol */
1975 ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_name);
1978 /* rule 55 can match eol */
1980 ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_name);
1983 /* rule 56 can match eol */
1985 ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_source);
1988 /* rule 57 can match eol */
1990 ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_source);
1993 /* rule 58 can match eol */
1995 ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_target);
1998 /* rule 59 can match eol */
2000 ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_target);
2003 /* rule 60 can match eol */
2005 ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_length);
2008 /* rule 61 can match eol */
2010 ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_length);
2013 /* rule 62 can match eol */
2015 ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_data);
2018 /* rule 63 can match eol */
2020 ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_data);
2025 if (!AX_graphxml_edge_source) FAIL("Required attribute `source' not set for `edge' element.");
2026 if (!AX_graphxml_edge_target) FAIL("Required attribute `target' not set for `edge' element.");
2027 LEAVE; STag_graphxml_edge();graphxml_pcdata_ix = 0; ENTER(E_graphxml_edge);
2033 if (!AX_graphxml_edge_source) FAIL("Required attribute `source' not set for `edge' element.");
2034 if (!AX_graphxml_edge_target) FAIL("Required attribute `target' not set for `edge' element.");
2035 LEAVE; STag_graphxml_edge(); graphxml_pcdata_ix = 0; ETag_graphxml_edge(); popbuffer(); /* attribute */
2037 case S_graphxml_graph_1: case S_graphxml_graph_3: case S_graphxml_graph_5: case S_graphxml_graph_4: case S_graphxml_graph: SET(S_graphxml_graph_5); break;
2038 case ROOT_graphxml_edge: SET(EPILOG); break;
2044 FAIL("Unexpected character `%c' in attribute list of edge element.", xbt_graph_parse_text[0]);
2048 FAIL("Bad attribute `%s' in `edge' element start tag.",xbt_graph_parse_text);
2050 case YY_STATE_EOF(AL_graphxml_edge):
2051 FAIL("EOF in attribute list of `edge' element.");
2055 /* rule 68 can match eol */
2059 ETag_graphxml_edge();
2060 popbuffer(); /* attribute */
2062 case S_graphxml_graph_1: case S_graphxml_graph_3: case S_graphxml_graph_5: case S_graphxml_graph_4: case S_graphxml_graph: SET(S_graphxml_graph_5); break;
2063 case ROOT_graphxml_edge: SET(EPILOG); break;
2068 /* rule 69 can match eol */
2070 FAIL("Unexpected end-tag `%s': `</edge>' expected.",xbt_graph_parse_text);
2074 FAIL("Unexpected character `%c': `</edge>' expected.",xbt_graph_parse_text[0]);
2076 case YY_STATE_EOF(E_graphxml_edge):
2077 FAIL("Premature EOF: `</edge>' expected.");
2080 /* EPILOG: after the root element. */
2084 {SET(PROLOG); yyless(0); CLEANUP; return -1;}
2086 case YY_STATE_EOF(EPILOG):
2090 /* CHARACTER DATA. */
2092 /* Non-defined standard entities... */
2113 /* Character entities. */
2116 BUFFERPUTC((unsigned char)atoi(xbt_graph_parse_text+2));
2120 BUFFERPUTC((unsigned char)strtol(xbt_graph_parse_text+3,NULL,16));
2124 /* rule 79 can match eol */
2126 /* rule 80 can match eol */
2128 /* rule 81 can match eol */
2130 /* rule 82 can match eol */
2141 FAIL("Unexpected `]""]>' in character data.");
2148 case YY_STATE_EOF(VALUE1):
2149 FAIL("EOF in literal (\"'\" expected).");
2156 case YY_STATE_EOF(VALUE2):
2157 FAIL("EOF in literal (`\"' expected).");
2161 /* rule 87 can match eol */
2163 BUFFERPUTC(xbt_graph_parse_text[0]);
2167 FAIL("Spurious `%c' in character data.",xbt_graph_parse_text[0]);
2174 /* "]""]" BUFFERPUTC(xbt_graph_parse_text[0]); BUFFERPUTC(xbt_graph_parse_text[1]); */
2177 BUFFERPUTC(xbt_graph_parse_text[0]);
2179 case YY_STATE_EOF(CDATA):
2180 FAIL("EOF in CDATA section.");
2183 /* Impossible rules to avoid warnings from flex(1). */
2184 /* Ideally, this should be replaced by code in flexml.pl that
2185 generates just the states not covered by other rules. */
2188 /* rule 91 can match eol */
2190 FAIL("Syntax error on character `%c'.", xbt_graph_parse_text[0]);
2197 case YY_STATE_EOF(INITIAL):
2198 case YY_STATE_EOF(ROOT_graphxml_graph):
2199 case YY_STATE_EOF(S_graphxml_graph_2):
2200 case YY_STATE_EOF(S_graphxml_graph_4):
2201 case YY_STATE_EOF(ROOT_graphxml_node):
2202 case YY_STATE_EOF(ROOT_graphxml_edge):
2203 case YY_STATE_EOF(IMPOSSIBLE):
2206 case YY_END_OF_BUFFER:
2208 /* Amount of text matched not including the EOB char. */
2209 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2211 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2212 *yy_cp = (yy_hold_char);
2213 YY_RESTORE_YY_MORE_OFFSET
2215 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2217 /* We're scanning a new file or input source. It's
2218 * possible that this happened because the user
2219 * just pointed xbt_graph_parse_in at a new source and called
2220 * xbt_graph_parse_lex(). If so, then we have to assure
2221 * consistency between YY_CURRENT_BUFFER and our
2222 * globals. Here is the right place to do so, because
2223 * this is the first action (other than possibly a
2224 * back-up) that will match for the new input source.
2226 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2227 YY_CURRENT_BUFFER_LVALUE->yy_input_file = xbt_graph_parse_in;
2228 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2231 /* Note that here we test for yy_c_buf_p "<=" to the position
2232 * of the first EOB in the buffer, since yy_c_buf_p will
2233 * already have been incremented past the NUL character
2234 * (since all states make transitions on EOB to the
2235 * end-of-buffer state). Contrast this with the test
2238 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2239 { /* This was really a NUL. */
2240 yy_state_type yy_next_state;
2242 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2244 yy_current_state = yy_get_previous_state( );
2246 /* Okay, we're now positioned to make the NUL
2247 * transition. We couldn't have
2248 * yy_get_previous_state() go ahead and do it
2249 * for us because it doesn't know how to deal
2250 * with the possibility of jamming (and we don't
2251 * want to build jamming into it because then it
2252 * will run more slowly).
2255 yy_next_state = yy_try_NUL_trans( yy_current_state );
2257 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2259 if ( yy_next_state )
2261 /* Consume the NUL. */
2262 yy_cp = ++(yy_c_buf_p);
2263 yy_current_state = yy_next_state;
2269 yy_cp = (yy_c_buf_p);
2270 goto yy_find_action;
2274 else switch ( yy_get_next_buffer( ) )
2276 case EOB_ACT_END_OF_FILE:
2278 (yy_did_buffer_switch_on_eof) = 0;
2280 if ( xbt_graph_parse_wrap( ) )
2282 /* Note: because we've taken care in
2283 * yy_get_next_buffer() to have set up
2284 * xbt_graph_parse_text, we can now set up
2285 * yy_c_buf_p so that if some total
2286 * hoser (like flex itself) wants to
2287 * call the scanner after we return the
2288 * YY_NULL, it'll still work - another
2289 * YY_NULL will get returned.
2291 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2293 yy_act = YY_STATE_EOF(YY_START);
2299 if ( ! (yy_did_buffer_switch_on_eof) )
2305 case EOB_ACT_CONTINUE_SCAN:
2307 (yytext_ptr) + yy_amount_of_matched_text;
2309 yy_current_state = yy_get_previous_state( );
2311 yy_cp = (yy_c_buf_p);
2312 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2315 case EOB_ACT_LAST_MATCH:
2317 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2319 yy_current_state = yy_get_previous_state( );
2321 yy_cp = (yy_c_buf_p);
2322 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2323 goto yy_find_action;
2330 "fatal flex scanner internal error--no action found" );
2331 } /* end of action switch */
2332 } /* end of scanning one token */
2333 } /* end of xbt_graph_parse_lex */
2335 /* yy_get_next_buffer - try to read in a new buffer
2337 * Returns a code representing an action:
2338 * EOB_ACT_LAST_MATCH -
2339 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2340 * EOB_ACT_END_OF_FILE - end of file
2342 static int yy_get_next_buffer (void)
2344 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2345 register char *source = (yytext_ptr);
2346 register int number_to_move, i;
2349 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2351 "fatal flex scanner internal error--end of buffer missed" );
2353 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2354 { /* Don't try to fill the buffer, so this is an EOF. */
2355 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2357 /* We matched a single character, the EOB, so
2358 * treat this as a final EOF.
2360 return EOB_ACT_END_OF_FILE;
2365 /* We matched some text prior to the EOB, first
2368 return EOB_ACT_LAST_MATCH;
2372 /* Try to read more data. */
2374 /* First move last chars to start of buffer. */
2375 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
2377 for ( i = 0; i < number_to_move; ++i )
2378 *(dest++) = *(source++);
2380 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2381 /* don't do the read, it's not guaranteed to return an EOF,
2384 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2389 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2391 while ( num_to_read <= 0 )
2392 { /* Not enough room in the buffer - grow it. */
2394 /* just a shorter name for the current buffer */
2395 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
2397 int yy_c_buf_p_offset =
2398 (int) ((yy_c_buf_p) - b->yy_ch_buf);
2400 if ( b->yy_is_our_buffer )
2402 int new_size = b->yy_buf_size * 2;
2404 if ( new_size <= 0 )
2405 b->yy_buf_size += b->yy_buf_size / 8;
2407 b->yy_buf_size *= 2;
2409 b->yy_ch_buf = (char *)
2410 /* Include room in for 2 EOB chars. */
2411 xbt_graph_parse_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
2414 /* Can't grow it, we don't own it. */
2417 if ( ! b->yy_ch_buf )
2419 "fatal error - scanner input buffer overflow" );
2421 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2423 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2428 if ( num_to_read > YY_READ_BUF_SIZE )
2429 num_to_read = YY_READ_BUF_SIZE;
2431 /* Read in more data. */
2432 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2433 (yy_n_chars), (size_t) num_to_read );
2435 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2438 if ( (yy_n_chars) == 0 )
2440 if ( number_to_move == YY_MORE_ADJ )
2442 ret_val = EOB_ACT_END_OF_FILE;
2443 xbt_graph_parse_restart(xbt_graph_parse_in );
2448 ret_val = EOB_ACT_LAST_MATCH;
2449 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2450 YY_BUFFER_EOF_PENDING;
2455 ret_val = EOB_ACT_CONTINUE_SCAN;
2457 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2458 /* Extend the array by 50%, plus the number we really need. */
2459 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2460 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) xbt_graph_parse_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
2461 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2462 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2465 (yy_n_chars) += number_to_move;
2466 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2467 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2469 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2474 /* yy_get_previous_state - get the state just before the EOB char was reached */
2476 static yy_state_type yy_get_previous_state (void)
2478 register yy_state_type yy_current_state;
2479 register char *yy_cp;
2481 yy_current_state = (yy_start);
2483 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2485 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2486 if ( yy_accept[yy_current_state] )
2488 (yy_last_accepting_state) = yy_current_state;
2489 (yy_last_accepting_cpos) = yy_cp;
2491 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2493 yy_current_state = (int) yy_def[yy_current_state];
2494 if ( yy_current_state >= 564 )
2495 yy_c = yy_meta[(unsigned int) yy_c];
2497 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2500 return yy_current_state;
2503 /* yy_try_NUL_trans - try to make a transition on the NUL character
2506 * next_state = yy_try_NUL_trans( current_state );
2508 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2510 register int yy_is_jam;
2511 register char *yy_cp = (yy_c_buf_p);
2513 register YY_CHAR yy_c = 1;
2514 if ( yy_accept[yy_current_state] )
2516 (yy_last_accepting_state) = yy_current_state;
2517 (yy_last_accepting_cpos) = yy_cp;
2519 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2521 yy_current_state = (int) yy_def[yy_current_state];
2522 if ( yy_current_state >= 564 )
2523 yy_c = yy_meta[(unsigned int) yy_c];
2525 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2526 yy_is_jam = (yy_current_state == 563);
2528 return yy_is_jam ? 0 : yy_current_state;
2533 static int yyinput (void)
2535 static int input (void)
2541 *(yy_c_buf_p) = (yy_hold_char);
2543 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2545 /* yy_c_buf_p now points to the character we want to return.
2546 * If this occurs *before* the EOB characters, then it's a
2547 * valid NUL; if not, then we've hit the end of the buffer.
2549 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2550 /* This was really a NUL. */
2551 *(yy_c_buf_p) = '\0';
2554 { /* need more input */
2555 int offset = (yy_c_buf_p) - (yytext_ptr);
2558 switch ( yy_get_next_buffer( ) )
2560 case EOB_ACT_LAST_MATCH:
2561 /* This happens because yy_g_n_b()
2562 * sees that we've accumulated a
2563 * token and flags that we need to
2564 * try matching the token before
2565 * proceeding. But for input(),
2566 * there's no matching to consider.
2567 * So convert the EOB_ACT_LAST_MATCH
2568 * to EOB_ACT_END_OF_FILE.
2571 /* Reset buffer status. */
2572 xbt_graph_parse_restart(xbt_graph_parse_in );
2576 case EOB_ACT_END_OF_FILE:
2578 if ( xbt_graph_parse_wrap( ) )
2581 if ( ! (yy_did_buffer_switch_on_eof) )
2590 case EOB_ACT_CONTINUE_SCAN:
2591 (yy_c_buf_p) = (yytext_ptr) + offset;
2597 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2598 *(yy_c_buf_p) = '\0'; /* preserve xbt_graph_parse_text */
2599 (yy_hold_char) = *++(yy_c_buf_p);
2603 xbt_graph_parse_lineno++;
2608 #endif /* ifndef YY_NO_INPUT */
2610 /** Immediately switch to a different input stream.
2611 * @param input_file A readable stream.
2613 * @note This function does not reset the start condition to @c INITIAL .
2615 void xbt_graph_parse_restart (FILE * input_file )
2618 if ( ! YY_CURRENT_BUFFER ){
2619 xbt_graph_parse_ensure_buffer_stack ();
2620 YY_CURRENT_BUFFER_LVALUE =
2621 xbt_graph_parse__create_buffer(xbt_graph_parse_in,YY_BUF_SIZE );
2624 xbt_graph_parse__init_buffer(YY_CURRENT_BUFFER,input_file );
2625 xbt_graph_parse__load_buffer_state( );
2628 /** Switch to a different input buffer.
2629 * @param new_buffer The new input buffer.
2632 void xbt_graph_parse__switch_to_buffer (YY_BUFFER_STATE new_buffer )
2635 /* TODO. We should be able to replace this entire function body
2637 * xbt_graph_parse_pop_buffer_state();
2638 * xbt_graph_parse_push_buffer_state(new_buffer);
2640 xbt_graph_parse_ensure_buffer_stack ();
2641 if ( YY_CURRENT_BUFFER == new_buffer )
2644 if ( YY_CURRENT_BUFFER )
2646 /* Flush out information for old buffer. */
2647 *(yy_c_buf_p) = (yy_hold_char);
2648 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2649 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2652 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2653 xbt_graph_parse__load_buffer_state( );
2655 /* We don't actually know whether we did this switch during
2656 * EOF (xbt_graph_parse_wrap()) processing, but the only time this flag
2657 * is looked at is after xbt_graph_parse_wrap() is called, so it's safe
2658 * to go ahead and always set it.
2660 (yy_did_buffer_switch_on_eof) = 1;
2663 static void xbt_graph_parse__load_buffer_state (void)
2665 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2666 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2667 xbt_graph_parse_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2668 (yy_hold_char) = *(yy_c_buf_p);
2671 /** Allocate and initialize an input buffer state.
2672 * @param file A readable stream.
2673 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2675 * @return the allocated buffer state.
2677 YY_BUFFER_STATE xbt_graph_parse__create_buffer (FILE * file, int size )
2681 b = (YY_BUFFER_STATE) xbt_graph_parse_alloc(sizeof( struct yy_buffer_state ) );
2683 YY_FATAL_ERROR( "out of dynamic memory in xbt_graph_parse__create_buffer()" );
2685 b->yy_buf_size = size;
2687 /* yy_ch_buf has to be 2 characters longer than the size given because
2688 * we need to put in 2 end-of-buffer characters.
2690 b->yy_ch_buf = (char *) xbt_graph_parse_alloc(b->yy_buf_size + 2 );
2691 if ( ! b->yy_ch_buf )
2692 YY_FATAL_ERROR( "out of dynamic memory in xbt_graph_parse__create_buffer()" );
2694 b->yy_is_our_buffer = 1;
2696 xbt_graph_parse__init_buffer(b,file );
2701 /** Destroy the buffer.
2702 * @param b a buffer created with xbt_graph_parse__create_buffer()
2705 void xbt_graph_parse__delete_buffer (YY_BUFFER_STATE b )
2711 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2712 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2714 if ( b->yy_is_our_buffer )
2715 xbt_graph_parse_free((void *) b->yy_ch_buf );
2717 xbt_graph_parse_free((void *) b );
2721 extern int isatty (int );
2722 #endif /* __cplusplus */
2724 /* Initializes or reinitializes a buffer.
2725 * This function is sometimes called more than once on the same buffer,
2726 * such as during a xbt_graph_parse_restart() or at EOF.
2728 static void xbt_graph_parse__init_buffer (YY_BUFFER_STATE b, FILE * file )
2733 xbt_graph_parse__flush_buffer(b );
2735 b->yy_input_file = file;
2736 b->yy_fill_buffer = 1;
2738 /* If b is the current buffer, then xbt_graph_parse__init_buffer was _probably_
2739 * called from xbt_graph_parse_restart() or through yy_get_next_buffer.
2740 * In that case, we don't want to reset the lineno or column.
2742 if (b != YY_CURRENT_BUFFER){
2743 b->yy_bs_lineno = 1;
2744 b->yy_bs_column = 0;
2747 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2752 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2753 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2756 void xbt_graph_parse__flush_buffer (YY_BUFFER_STATE b )
2763 /* We always need two end-of-buffer characters. The first causes
2764 * a transition to the end-of-buffer state. The second causes
2765 * a jam in that state.
2767 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2768 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2770 b->yy_buf_pos = &b->yy_ch_buf[0];
2773 b->yy_buffer_status = YY_BUFFER_NEW;
2775 if ( b == YY_CURRENT_BUFFER )
2776 xbt_graph_parse__load_buffer_state( );
2779 /** Pushes the new state onto the stack. The new state becomes
2780 * the current state. This function will allocate the stack
2782 * @param new_buffer The new state.
2785 void xbt_graph_parse_push_buffer_state (YY_BUFFER_STATE new_buffer )
2787 if (new_buffer == NULL)
2790 xbt_graph_parse_ensure_buffer_stack();
2792 /* This block is copied from xbt_graph_parse__switch_to_buffer. */
2793 if ( YY_CURRENT_BUFFER )
2795 /* Flush out information for old buffer. */
2796 *(yy_c_buf_p) = (yy_hold_char);
2797 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2798 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2801 /* Only push if top exists. Otherwise, replace top. */
2802 if (YY_CURRENT_BUFFER)
2803 (yy_buffer_stack_top)++;
2804 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2806 /* copied from xbt_graph_parse__switch_to_buffer. */
2807 xbt_graph_parse__load_buffer_state( );
2808 (yy_did_buffer_switch_on_eof) = 1;
2811 /** Removes and deletes the top of the stack, if present.
2812 * The next element becomes the new top.
2815 void xbt_graph_parse_pop_buffer_state (void)
2817 if (!YY_CURRENT_BUFFER)
2820 xbt_graph_parse__delete_buffer(YY_CURRENT_BUFFER );
2821 YY_CURRENT_BUFFER_LVALUE = NULL;
2822 if ((yy_buffer_stack_top) > 0)
2823 --(yy_buffer_stack_top);
2825 if (YY_CURRENT_BUFFER) {
2826 xbt_graph_parse__load_buffer_state( );
2827 (yy_did_buffer_switch_on_eof) = 1;
2831 /* Allocates the stack if it does not exist.
2832 * Guarantees space for at least one push.
2834 static void xbt_graph_parse_ensure_buffer_stack (void)
2838 if (!(yy_buffer_stack)) {
2840 /* First allocation is just for 2 elements, since we don't know if this
2841 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2842 * immediate realloc on the next call.
2845 (yy_buffer_stack) = (struct yy_buffer_state**)xbt_graph_parse_alloc
2846 (num_to_alloc * sizeof(struct yy_buffer_state*)
2848 if ( ! (yy_buffer_stack) )
2849 YY_FATAL_ERROR( "out of dynamic memory in xbt_graph_parse_ensure_buffer_stack()" );
2851 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2853 (yy_buffer_stack_max) = num_to_alloc;
2854 (yy_buffer_stack_top) = 0;
2858 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2860 /* Increase the buffer to prepare for a possible push. */
2861 int grow_size = 8 /* arbitrary grow size */;
2863 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2864 (yy_buffer_stack) = (struct yy_buffer_state**)xbt_graph_parse_realloc
2866 num_to_alloc * sizeof(struct yy_buffer_state*)
2868 if ( ! (yy_buffer_stack) )
2869 YY_FATAL_ERROR( "out of dynamic memory in xbt_graph_parse_ensure_buffer_stack()" );
2871 /* zero only the new slots.*/
2872 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2873 (yy_buffer_stack_max) = num_to_alloc;
2877 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2878 * @param base the character buffer
2879 * @param size the size in bytes of the character buffer
2881 * @return the newly allocated buffer state object.
2883 YY_BUFFER_STATE xbt_graph_parse__scan_buffer (char * base, yy_size_t size )
2888 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2889 base[size-1] != YY_END_OF_BUFFER_CHAR )
2890 /* They forgot to leave room for the EOB's. */
2893 b = (YY_BUFFER_STATE) xbt_graph_parse_alloc(sizeof( struct yy_buffer_state ) );
2895 YY_FATAL_ERROR( "out of dynamic memory in xbt_graph_parse__scan_buffer()" );
2897 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2898 b->yy_buf_pos = b->yy_ch_buf = base;
2899 b->yy_is_our_buffer = 0;
2900 b->yy_input_file = 0;
2901 b->yy_n_chars = b->yy_buf_size;
2902 b->yy_is_interactive = 0;
2904 b->yy_fill_buffer = 0;
2905 b->yy_buffer_status = YY_BUFFER_NEW;
2907 xbt_graph_parse__switch_to_buffer(b );
2912 /** Setup the input buffer state to scan a string. The next call to xbt_graph_parse_lex() will
2913 * scan from a @e copy of @a str.
2914 * @param yystr a NUL-terminated string to scan
2916 * @return the newly allocated buffer state object.
2917 * @note If you want to scan bytes that may contain NUL values, then use
2918 * xbt_graph_parse__scan_bytes() instead.
2920 YY_BUFFER_STATE xbt_graph_parse__scan_string (yyconst char * yystr )
2923 return xbt_graph_parse__scan_bytes(yystr,strlen(yystr) );
2926 /** Setup the input buffer state to scan the given bytes. The next call to xbt_graph_parse_lex() will
2927 * scan from a @e copy of @a bytes.
2928 * @param bytes the byte buffer to scan
2929 * @param len the number of bytes in the buffer pointed to by @a bytes.
2931 * @return the newly allocated buffer state object.
2933 YY_BUFFER_STATE xbt_graph_parse__scan_bytes (yyconst char * yybytes, int _yybytes_len )
2940 /* Get memory for full buffer, including space for trailing EOB's. */
2941 n = _yybytes_len + 2;
2942 buf = (char *) xbt_graph_parse_alloc(n );
2944 YY_FATAL_ERROR( "out of dynamic memory in xbt_graph_parse__scan_bytes()" );
2946 for ( i = 0; i < _yybytes_len; ++i )
2947 buf[i] = yybytes[i];
2949 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2951 b = xbt_graph_parse__scan_buffer(buf,n );
2953 YY_FATAL_ERROR( "bad buffer in xbt_graph_parse__scan_bytes()" );
2955 /* It's okay to grow etc. this buffer, and we should throw it
2956 * away when we're done.
2958 b->yy_is_our_buffer = 1;
2963 static void yy_push_state (int new_state )
2965 if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
2969 (yy_start_stack_depth) += YY_START_STACK_INCR;
2970 new_size = (yy_start_stack_depth) * sizeof( int );
2972 if ( ! (yy_start_stack) )
2973 (yy_start_stack) = (int *) xbt_graph_parse_alloc(new_size );
2976 (yy_start_stack) = (int *) xbt_graph_parse_realloc((void *) (yy_start_stack),new_size );
2978 if ( ! (yy_start_stack) )
2979 YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
2982 (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
2987 static void yy_pop_state (void)
2989 if ( --(yy_start_stack_ptr) < 0 )
2990 YY_FATAL_ERROR( "start-condition stack underflow" );
2992 BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
2995 #ifndef YY_EXIT_FAILURE
2996 #define YY_EXIT_FAILURE 2
2999 static void yy_fatal_error (yyconst char* msg )
3001 (void) fprintf( stderr, "%s\n", msg );
3002 exit( YY_EXIT_FAILURE );
3005 /* Redefine yyless() so it works in section 3 code. */
3011 /* Undo effects of setting up xbt_graph_parse_text. */ \
3012 int yyless_macro_arg = (n); \
3013 YY_LESS_LINENO(yyless_macro_arg);\
3014 xbt_graph_parse_text[xbt_graph_parse_leng] = (yy_hold_char); \
3015 (yy_c_buf_p) = xbt_graph_parse_text + yyless_macro_arg; \
3016 (yy_hold_char) = *(yy_c_buf_p); \
3017 *(yy_c_buf_p) = '\0'; \
3018 xbt_graph_parse_leng = yyless_macro_arg; \
3022 /* Accessor methods (get/set functions) to struct members. */
3024 /** Get the current line number.
3027 int xbt_graph_parse_get_lineno (void)
3030 return xbt_graph_parse_lineno;
3033 /** Get the input stream.
3036 FILE *xbt_graph_parse_get_in (void)
3038 return xbt_graph_parse_in;
3041 /** Get the output stream.
3044 FILE *xbt_graph_parse_get_out (void)
3046 return xbt_graph_parse_out;
3049 /** Get the length of the current token.
3052 int xbt_graph_parse_get_leng (void)
3054 return xbt_graph_parse_leng;
3057 /** Get the current token.
3061 char *xbt_graph_parse_get_text (void)
3063 return xbt_graph_parse_text;
3066 /** Set the current line number.
3067 * @param line_number
3070 void xbt_graph_parse_set_lineno (int line_number )
3073 xbt_graph_parse_lineno = line_number;
3076 /** Set the input stream. This does not discard the current
3078 * @param in_str A readable stream.
3080 * @see xbt_graph_parse__switch_to_buffer
3082 void xbt_graph_parse_set_in (FILE * in_str )
3084 xbt_graph_parse_in = in_str ;
3087 void xbt_graph_parse_set_out (FILE * out_str )
3089 xbt_graph_parse_out = out_str ;
3092 int xbt_graph_parse_get_debug (void)
3094 return xbt_graph_parse__flex_debug;
3097 void xbt_graph_parse_set_debug (int bdebug )
3099 xbt_graph_parse__flex_debug = bdebug ;
3102 static int yy_init_globals (void)
3104 /* Initialization is the same as for the non-reentrant scanner.
3105 * This function is called from xbt_graph_parse_lex_destroy(), so don't allocate here.
3108 /* We do not touch xbt_graph_parse_lineno unless the option is enabled. */
3109 xbt_graph_parse_lineno = 1;
3111 (yy_buffer_stack) = 0;
3112 (yy_buffer_stack_top) = 0;
3113 (yy_buffer_stack_max) = 0;
3114 (yy_c_buf_p) = (char *) 0;
3118 (yy_start_stack_ptr) = 0;
3119 (yy_start_stack_depth) = 0;
3120 (yy_start_stack) = NULL;
3122 /* Defined in main.c */
3124 xbt_graph_parse_in = stdin;
3125 xbt_graph_parse_out = stdout;
3127 xbt_graph_parse_in = (FILE *) 0;
3128 xbt_graph_parse_out = (FILE *) 0;
3131 /* For future reference: Set errno on error, since we are called by
3132 * xbt_graph_parse_lex_init()
3137 /* xbt_graph_parse_lex_destroy is for both reentrant and non-reentrant scanners. */
3138 int xbt_graph_parse_lex_destroy (void)
3141 /* Pop the buffer stack, destroying each element. */
3142 while(YY_CURRENT_BUFFER){
3143 xbt_graph_parse__delete_buffer(YY_CURRENT_BUFFER );
3144 YY_CURRENT_BUFFER_LVALUE = NULL;
3145 xbt_graph_parse_pop_buffer_state();
3148 /* Destroy the stack itself. */
3149 xbt_graph_parse_free((yy_buffer_stack) );
3150 (yy_buffer_stack) = NULL;
3152 /* Destroy the start condition stack. */
3153 xbt_graph_parse_free((yy_start_stack) );
3154 (yy_start_stack) = NULL;
3156 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3157 * xbt_graph_parse_lex() is called, initialization will occur. */
3164 * Internal utility routines.
3168 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
3171 for ( i = 0; i < n; ++i )
3176 #ifdef YY_NEED_STRLEN
3177 static int yy_flex_strlen (yyconst char * s )
3180 for ( n = 0; s[n]; ++n )
3187 void *xbt_graph_parse_alloc (yy_size_t size )
3189 return (void *) malloc( size );
3192 void *xbt_graph_parse_realloc (void * ptr, yy_size_t size )
3194 /* The cast to (char *) in the following accommodates both
3195 * implementations that use char* generic pointers, and those
3196 * that use void* generic pointers. It works with the latter
3197 * because both ANSI C and C++ allow castless assignment from
3198 * any pointer type to void*, and deal with argument conversions
3199 * as though doing an assignment.
3201 return (void *) realloc( (char *) ptr, size );
3204 void xbt_graph_parse_free (void * ptr )
3206 free( (char *) ptr ); /* see xbt_graph_parse_realloc() for (char *) cast */
3209 #define YYTABLES_NAME "yytables"
3211 /* Element context stack lookup. */
3212 int graphxml_element_context(int i)
3214 return (0<i && i<yy_start_stack_depth
3215 ? yy_start_stack[yy_start_stack_ptr - i]
3220 void print_yy_stack(char* fmt, ...)
3222 int i = 0; va_list ap; va_start(ap, fmt);
3223 vfprintf(stderr, fmt, ap);
3224 if (graphxml_statenames) {
3225 for (i=1; i<yy_start_stack_ptr; i++) {
3226 fprintf(stderr, "%s/", graphxml_statenames[yy_start_stack[i] ]);
3228 fprintf(stderr,"%s\n", graphxml_statenames[YY_START]);
3233 void print_graphxml_bufferstack()
3236 fputs("Buffer: ", stderr);
3237 for (i = 0; i < blimit; i++) {
3238 if ( graphxml_bufferstack[i] == '\377' ) break;
3239 putc(graphxml_bufferstack[i], stderr);
3244 static void debug_enter(int state, const char* statename) {
3245 yy_push_state(state);
3246 if (xbt_graph_parse__flex_debug) {
3247 print_yy_stack("--ENTER(%s) : ",statename);
3248 print_graphxml_bufferstack();
3252 static void debug_leave(void) {
3253 if (xbt_graph_parse__flex_debug) {
3254 print_yy_stack("--LEAVE : ");
3255 print_graphxml_bufferstack();
3260 static void debug_set(int state, const char* statename) {
3262 if (xbt_graph_parse__flex_debug) print_yy_stack("--SET(%s) : ",statename);
3266 static void cleanup(void)
3268 if (graphxml_statenames) {
3269 free(graphxml_statenames);
3270 graphxml_statenames = NULL;
3272 free(graphxml_bufferstack);
3273 graphxml_bufferstack = NULL;
3279 static int fail(const char* fmt, ...)
3281 int chars_left, used;
3282 va_list ap; va_start(ap, fmt);
3283 #ifdef FLEXML_yylineno
3284 used = sprintf(flexml_err_msg,
3285 "Invalid XML (XML input line %d, state %d): ",
3286 xbt_graph_parse_lineno, YY_START);
3288 used = sprintf(flexml_err_msg,
3289 "Invalid XML (state %d): ",
3292 chars_left = flexml_max_err_msg_size - used - 1;
3293 vsnprintf(flexml_err_msg + used, chars_left, fmt, ap);
3296 #ifndef FLEXML_quiet_parser
3297 /* print directly to sdterr */
3298 fprintf(stderr, "%s\n", flexml_err_msg);
3299 flexml_err_msg[0] = '\0';