1 #line 2 "xbt/graphxml.c"
3 #line 4 "xbt/graphxml.c"
5 #define YY_INT_ALIGNED short int
7 /* A lexical scanner generated by flex */
10 #define YY_FLEX_MAJOR_VERSION 2
11 #define YY_FLEX_MINOR_VERSION 5
12 #define YY_FLEX_SUBMINOR_VERSION 33
13 #if YY_FLEX_SUBMINOR_VERSION > 0
17 /* First, we deal with platform-specific or compiler-specific issues. */
19 /* begin standard C headers. */
25 /* end standard C headers. */
27 /* flex integer type definitions */
32 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
34 #if __STDC_VERSION__ >= 199901L
36 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
37 * if you want the limit (max/min) macros for int types.
39 #ifndef __STDC_LIMIT_MACROS
40 #define __STDC_LIMIT_MACROS 1
44 typedef int8_t flex_int8_t;
45 typedef uint8_t flex_uint8_t;
46 typedef int16_t flex_int16_t;
47 typedef uint16_t flex_uint16_t;
48 typedef int32_t flex_int32_t;
49 typedef uint32_t flex_uint32_t;
51 typedef signed char flex_int8_t;
52 typedef short int flex_int16_t;
53 typedef int flex_int32_t;
54 typedef unsigned char flex_uint8_t;
55 typedef unsigned short int flex_uint16_t;
56 typedef unsigned int flex_uint32_t;
59 /* Limits of integral types. */
61 #define INT8_MIN (-128)
64 #define INT16_MIN (-32767-1)
67 #define INT32_MIN (-2147483647-1)
70 #define INT8_MAX (127)
73 #define INT16_MAX (32767)
76 #define INT32_MAX (2147483647)
79 #define UINT8_MAX (255U)
82 #define UINT16_MAX (65535U)
85 #define UINT32_MAX (4294967295U)
88 #endif /* ! FLEXINT_H */
92 /* The "const" storage-class-modifier is valid. */
95 #else /* ! __cplusplus */
101 #endif /* __STDC__ */
102 #endif /* ! __cplusplus */
105 #define yyconst const
110 /* Returned upon end-of-file. */
113 /* Promotes a possibly negative, possibly signed char to an unsigned
114 * integer for use as an array index. If the signed char is negative,
115 * we want to instead treat it as an 8-bit unsigned char, hence the
118 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
120 /* Enter a start condition. This macro really ought to take a parameter,
121 * but we do it the disgusting crufty way forced on us by the ()-less
122 * definition of BEGIN.
124 #define BEGIN (yy_start) = 1 + 2 *
126 /* Translate the current start state into a value that can be later handed
127 * to BEGIN to return to the state. The YYSTATE alias is for lex
130 #define YY_START (((yy_start) - 1) / 2)
131 #define YYSTATE YY_START
133 /* Action number for EOF rule of a given start state. */
134 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
136 /* Special action meaning "start processing a new file". */
137 #define YY_NEW_FILE xbt_graph_parse_restart(xbt_graph_parse_in )
139 #define YY_END_OF_BUFFER_CHAR 0
141 /* Size of default input buffer. */
143 #define YY_BUF_SIZE 16384
146 /* The state buf must be large enough to hold one state per character in the main buffer.
148 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
150 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
151 #define YY_TYPEDEF_YY_BUFFER_STATE
152 typedef struct yy_buffer_state *YY_BUFFER_STATE;
155 extern int xbt_graph_parse_leng;
157 extern FILE *xbt_graph_parse_in, *xbt_graph_parse_out;
159 #define EOB_ACT_CONTINUE_SCAN 0
160 #define EOB_ACT_END_OF_FILE 1
161 #define EOB_ACT_LAST_MATCH 2
163 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
164 * access to the local variable yy_act. Since yyless() is a macro, it would break
165 * existing scanners that call yyless() from OUTSIDE xbt_graph_parse_lex.
166 * One obvious solution it to make yy_act a global. I tried that, and saw
167 * a 5% performance hit in a non-xbt_graph_parse_lineno scanner, because yy_act is
168 * normally declared as a register variable-- so it is not worth it.
170 #define YY_LESS_LINENO(n) \
173 for ( yyl = n; yyl < xbt_graph_parse_leng; ++yyl )\
174 if ( xbt_graph_parse_text[yyl] == '\n' )\
175 --xbt_graph_parse_lineno;\
178 /* Return all but the first "n" matched characters back to the input stream. */
182 /* Undo effects of setting up xbt_graph_parse_text. */ \
183 int yyless_macro_arg = (n); \
184 YY_LESS_LINENO(yyless_macro_arg);\
185 *yy_cp = (yy_hold_char); \
186 YY_RESTORE_YY_MORE_OFFSET \
187 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
188 YY_DO_BEFORE_ACTION; /* set up xbt_graph_parse_text again */ \
192 #define unput(c) yyunput( c, (yytext_ptr) )
194 /* The following is because we cannot portably get our hands on size_t
195 * (without autoconf's help, which isn't available because we want
196 * flex-generated scanners to compile on their own).
199 #ifndef YY_TYPEDEF_YY_SIZE_T
200 #define YY_TYPEDEF_YY_SIZE_T
201 typedef unsigned int yy_size_t;
204 #ifndef YY_STRUCT_YY_BUFFER_STATE
205 #define YY_STRUCT_YY_BUFFER_STATE
206 struct yy_buffer_state
210 char *yy_ch_buf; /* input buffer */
211 char *yy_buf_pos; /* current position in input buffer */
213 /* Size of input buffer in bytes, not including room for EOB
216 yy_size_t yy_buf_size;
218 /* Number of characters read into yy_ch_buf, not including EOB
223 /* Whether we "own" the buffer - i.e., we know we created it,
224 * and can realloc() it to grow it, and should free() it to
227 int yy_is_our_buffer;
229 /* Whether this is an "interactive" input source; if so, and
230 * if we're using stdio for input, then we want to use getc()
231 * instead of fread(), to make sure we stop fetching input after
234 int yy_is_interactive;
236 /* Whether we're considered to be at the beginning of a line.
237 * If so, '^' rules will be active on the next match, otherwise
242 int yy_bs_lineno; /**< The line count. */
243 int yy_bs_column; /**< The column count. */
245 /* Whether to try to fill the input buffer when we reach the
250 int yy_buffer_status;
252 #define YY_BUFFER_NEW 0
253 #define YY_BUFFER_NORMAL 1
254 /* When an EOF's been seen but there's still some text to process
255 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
256 * shouldn't try reading from the input source any more. We might
257 * still have a bunch of tokens to match, though, because of
258 * possible backing-up.
260 * When we actually see the EOF, we change the status to "new"
261 * (via xbt_graph_parse_restart()), so that the user can continue scanning by
262 * just pointing xbt_graph_parse_in at a new input file.
264 #define YY_BUFFER_EOF_PENDING 2
267 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
269 /* Stack of input buffers. */
270 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
271 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
272 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
274 /* We provide macros for accessing buffer states in case in the
275 * future we want to put the buffer states in a more general
278 * Returns the top of the stack, or NULL.
280 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
281 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
284 /* Same as previous macro, but useful when we know that the buffer stack is not
285 * NULL or when we need an lvalue. For internal use only.
287 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
289 /* yy_hold_char holds the character lost when xbt_graph_parse_text is formed. */
290 static char yy_hold_char;
291 static int yy_n_chars; /* number of characters read into yy_ch_buf */
292 int xbt_graph_parse_leng;
294 /* Points to current character in buffer. */
295 static char *yy_c_buf_p = (char *) 0;
296 static int yy_init = 0; /* whether we need to initialize */
297 static int yy_start = 0; /* start state number */
299 /* Flag which is used to allow xbt_graph_parse_wrap()'s to do buffer switches
300 * instead of setting up a fresh xbt_graph_parse_in. A bit of a hack ...
302 static int yy_did_buffer_switch_on_eof;
304 void xbt_graph_parse_restart (FILE *input_file );
305 void xbt_graph_parse__switch_to_buffer (YY_BUFFER_STATE new_buffer );
306 YY_BUFFER_STATE xbt_graph_parse__create_buffer (FILE *file,int size );
307 void xbt_graph_parse__delete_buffer (YY_BUFFER_STATE b );
308 void xbt_graph_parse__flush_buffer (YY_BUFFER_STATE b );
309 void xbt_graph_parse_push_buffer_state (YY_BUFFER_STATE new_buffer );
310 void xbt_graph_parse_pop_buffer_state (void );
312 static void xbt_graph_parse_ensure_buffer_stack (void );
313 static void xbt_graph_parse__load_buffer_state (void );
314 static void xbt_graph_parse__init_buffer (YY_BUFFER_STATE b,FILE *file );
316 #define YY_FLUSH_BUFFER xbt_graph_parse__flush_buffer(YY_CURRENT_BUFFER )
318 YY_BUFFER_STATE xbt_graph_parse__scan_buffer (char *base,yy_size_t size );
319 YY_BUFFER_STATE xbt_graph_parse__scan_string (yyconst char *yy_str );
320 YY_BUFFER_STATE xbt_graph_parse__scan_bytes (yyconst char *bytes,int len );
322 void *xbt_graph_parse_alloc (yy_size_t );
323 void *xbt_graph_parse_realloc (void *,yy_size_t );
324 void xbt_graph_parse_free (void * );
326 #define yy_new_buffer xbt_graph_parse__create_buffer
328 #define yy_set_interactive(is_interactive) \
330 if ( ! YY_CURRENT_BUFFER ){ \
331 xbt_graph_parse_ensure_buffer_stack (); \
332 YY_CURRENT_BUFFER_LVALUE = \
333 xbt_graph_parse__create_buffer(xbt_graph_parse_in,YY_BUF_SIZE ); \
335 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
338 #define yy_set_bol(at_bol) \
340 if ( ! YY_CURRENT_BUFFER ){\
341 xbt_graph_parse_ensure_buffer_stack (); \
342 YY_CURRENT_BUFFER_LVALUE = \
343 xbt_graph_parse__create_buffer(xbt_graph_parse_in,YY_BUF_SIZE ); \
345 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
348 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
350 /* Begin user sect3 */
352 #define xbt_graph_parse_wrap() 1
353 #define YY_SKIP_YYWRAP
355 typedef unsigned char YY_CHAR;
357 FILE *xbt_graph_parse_in = (FILE *) 0, *xbt_graph_parse_out = (FILE *) 0;
359 typedef int yy_state_type;
361 extern int xbt_graph_parse_lineno;
363 int xbt_graph_parse_lineno = 1;
365 extern char *xbt_graph_parse_text;
366 #define yytext_ptr xbt_graph_parse_text
368 static yy_state_type yy_get_previous_state (void );
369 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
370 static int yy_get_next_buffer (void );
371 static void yy_fatal_error (yyconst char msg[] );
373 /* Done after the current pattern has been matched and before the
374 * corresponding action - sets up xbt_graph_parse_text.
376 #define YY_DO_BEFORE_ACTION \
377 (yytext_ptr) = yy_bp; \
378 xbt_graph_parse_leng = (size_t) (yy_cp - yy_bp); \
379 (yy_hold_char) = *yy_cp; \
381 (yy_c_buf_p) = yy_cp;
383 #define YY_NUM_RULES 79
384 #define YY_END_OF_BUFFER 80
385 /* This struct is not used in this scanner,
386 but its presence is necessary. */
389 flex_int32_t yy_verify;
392 static yyconst flex_int16_t yy_accept[497] =
394 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
395 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
396 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
397 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
398 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
399 80, 78, 17, 10, 10, 17, 17, 58, 10, 58,
400 5, 6, 5, 8, 9, 8, 74, 66, 67, 75,
401 72, 75, 73, 77, 66, 67, 77, 78, 21, 10,
402 21, 21, 21, 19, 25, 10, 25, 25, 78, 78,
403 25, 33, 10, 33, 33, 33, 31, 33, 33, 37,
405 10, 37, 53, 10, 53, 53, 53, 51, 53, 53,
406 53, 53, 53, 57, 10, 57, 75, 74, 10, 0,
407 2, 2, 0, 4, 7, 69, 68, 0, 0, 0,
408 0, 0, 0, 0, 20, 22, 0, 0, 0, 32,
409 34, 34, 34, 0, 52, 54, 54, 54, 54, 54,
410 54, 0, 0, 0, 0, 0, 0, 0, 3, 0,
411 0, 0, 0, 0, 0, 0, 76, 0, 0, 0,
412 0, 0, 34, 34, 0, 0, 54, 54, 54, 54,
413 54, 0, 0, 0, 71, 0, 16, 1, 0, 0,
414 64, 0, 0, 0, 61, 60, 0, 0, 0, 0,
416 24, 0, 0, 0, 34, 34, 0, 0, 36, 0,
417 54, 54, 54, 54, 54, 0, 0, 56, 0, 0,
418 0, 0, 65, 59, 0, 0, 0, 0, 38, 26,
419 34, 0, 0, 0, 54, 54, 0, 0, 54, 54,
420 0, 0, 0, 0, 0, 12, 0, 62, 63, 18,
421 0, 38, 26, 0, 0, 0, 30, 29, 0, 54,
422 0, 0, 0, 42, 41, 54, 54, 0, 0, 0,
423 0, 0, 11, 18, 0, 0, 28, 27, 0, 35,
424 54, 0, 40, 39, 0, 0, 0, 0, 0, 55,
425 0, 0, 0, 0, 0, 23, 54, 0, 44, 43,
427 0, 46, 45, 0, 0, 0, 0, 54, 70, 0,
428 0, 0, 54, 0, 0, 0, 0, 0, 0, 0,
429 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
430 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
431 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
432 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
433 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
434 0, 0, 0, 0, 0, 0, 12, 0, 12, 0,
435 0, 48, 0, 47, 0, 0, 0, 0, 0, 0,
436 0, 50, 49, 0, 0, 0, 0, 0, 0, 0,
438 11, 0, 0, 0, 0, 0, 0, 0, 0, 0,
439 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
440 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
441 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
442 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
443 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
444 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
445 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
446 0, 0, 0, 0, 0, 0, 0, 0, 0, 13,
451 static yyconst flex_int32_t yy_ec[256] =
453 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
454 1, 2, 4, 1, 1, 1, 1, 1, 1, 1,
455 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
456 1, 2, 5, 6, 7, 1, 1, 8, 9, 1,
457 1, 1, 1, 1, 10, 11, 12, 13, 13, 13,
458 13, 13, 13, 13, 13, 13, 13, 14, 15, 16,
459 17, 18, 19, 1, 20, 21, 22, 23, 24, 21,
460 14, 14, 14, 14, 14, 14, 25, 14, 26, 27,
461 14, 14, 28, 29, 14, 14, 14, 14, 30, 14,
462 31, 1, 32, 1, 14, 1, 33, 34, 35, 36,
464 37, 38, 39, 40, 41, 14, 14, 42, 43, 44,
465 45, 46, 47, 48, 49, 50, 51, 52, 14, 53,
466 14, 14, 1, 1, 1, 1, 1, 1, 1, 1,
467 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
468 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
469 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
470 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
471 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
472 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
473 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
475 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
476 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
477 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
478 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
479 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
483 static yyconst flex_int32_t yy_meta[54] =
485 1, 2, 2, 2, 1, 1, 1, 1, 1, 3,
486 3, 1, 4, 5, 1, 1, 1, 6, 1, 7,
487 7, 7, 7, 7, 5, 5, 5, 5, 5, 5,
488 1, 1, 7, 7, 7, 7, 7, 7, 5, 5,
489 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
493 static yyconst flex_int16_t yy_base[527] =
495 0, 0, 0, 3, 6, 9, 24, 27, 11, 14,
496 15, 17, 29, 38, 45, 52, 59, 61, 67, 70,
497 93, 125, 73, 76, 143, 146, 149, 164, 167, 170,
498 173, 188, 191, 194, 197, 212, 215, 218, 234, 0,
499 286, 289, 292, 295, 311, 0, 363, 366, 368, 370,
500 1424, 1425, 1425, 111, 114, 47, 62, 1425, 117, 159,
501 1425, 1425, 1413, 1425, 1425, 1404, 1425, 1417, 1417, 368,
502 1425, 1425, 1425, 1425, 1415, 1415, 1385, 372, 1425, 221,
503 1398, 0, 183, 1425, 1425, 385, 380, 385, 375, 376,
504 393, 1425, 423, 1397, 0, 207, 1425, 1381, 1380, 1425,
506 426, 404, 1425, 429, 1394, 0, 401, 1425, 1362, 1377,
507 1376, 1363, 1374, 1425, 432, 432, 1401, 1373, 436, 34,
508 1351, 1425, 1393, 1384, 1425, 1425, 1425, 37, 39, 1351,
509 1350, 1348, 1380, 1349, 1425, 0, 1357, 1359, 1349, 1425,
510 0, 1359, 1349, 1347, 1425, 0, 1367, 1355, 1345, 1336,
511 1338, 1348, 1353, 1365, 1364, 1371, 137, 1337, 1425, 145,
512 0, 1333, 1333, 1362, 1361, 1330, 1425, 1341, 439, 443,
513 1266, 1268, 1257, 1254, 446, 450, 1247, 1248, 1241, 1225,
514 1229, 456, 463, 1164, 1425, 1167, 1425, 1425, 17, 1142,
515 1425, 1168, 1167, 1132, 1425, 1425, 1130, 1133, 467, 474,
517 1425, 480, 1141, 1140, 1134, 484, 500, 503, 1425, 506,
518 1126, 1127, 512, 1133, 1129, 523, 528, 1425, 531, 1142,
519 385, 534, 1425, 1425, 1148, 1147, 1117, 541, 552, 558,
520 561, 564, 570, 580, 1109, 586, 589, 593, 1108, 1090,
521 605, 1112, 378, 1108, 608, 1425, 1106, 1425, 1425, 611,
522 616, 625, 628, 633, 637, 645, 1425, 1425, 655, 1084,
523 659, 662, 675, 1425, 1425, 683, 686, 689, 1033, 282,
524 143, 70, 1425, 692, 695, 702, 1425, 1425, 712, 1425,
525 954, 715, 1425, 1425, 723, 729, 739, 742, 750, 1425,
526 978, 161, 104, 136, 755, 1425, 951, 758, 1425, 1425,
528 768, 1425, 1425, 953, 776, 163, 444, 892, 1425, 779,
529 191, 164, 782, 193, 185, 445, 438, 455, 785, 789,
530 457, 479, 504, 188, 476, 801, 473, 501, 510, 41,
531 532, 562, 809, 843, 827, 839, 808, 817, 576, 826,
532 829, 834, 839, 780, 763, 724, 712, 851, 856, 859,
533 863, 880, 888, 906, 938, 626, 587, 556, 520, 603,
534 898, 637, 956, 664, 292, 974, 1006, 482, 511, 435,
535 446, 365, 692, 530, 731, 285, 415, 471, 409, 901,
536 301, 1425, 297, 1425, 557, 684, 651, 224, 104, 75,
537 930, 1425, 1425, 553, 654, 620, 5, 711, 710, 751,
539 1425, 969, 783, 998, 1024, 1032, 1037, 586, 635, 1045,
540 757, 831, 604, 691, 832, 846, 702, 791, 567, 782,
541 881, 913, 807, 855, 788, 850, 860, 918, 917, 948,
542 683, 877, 950, 985, 909, 912, 737, 946, 977, 979,
543 967, 1011, 1014, 1026, 1027, 1034, 1035, 1038, 1040, 1041,
544 1042, 1043, 1047, 1048, 806, 1056, 1050, 1052, 1061, 1066,
545 729, 1055, 1077, 1082, 1078, 1079, 1053, 1057, 1080, 1081,
546 1058, 1083, 1084, 1086, 1087, 1088, 1091, 1092, 1105, 1103,
547 1095, 1100, 1123, 1116, 1140, 1129, 1121, 1146, 1149, 1425,
548 1152, 1157, 1425, 1169, 1425, 1425, 1187, 1194, 1201, 1208,
550 1215, 1222, 1229, 1236, 1243, 1250, 1257, 1262, 1267, 1272,
551 1279, 1282, 1285, 1288, 1295, 1299, 1305, 1311, 1317, 1324,
552 1331, 1338, 1345, 1352, 1359, 1366
555 static yyconst flex_int16_t yy_def[527] =
557 497, 497, 498, 498, 498, 498, 499, 499, 500, 500,
558 501, 501, 502, 502, 502, 502, 503, 503, 497, 497,
559 504, 504, 505, 505, 505, 505, 497, 497, 505, 505,
560 497, 497, 505, 505, 505, 505, 497, 497, 496, 39,
561 506, 506, 497, 497, 496, 45, 507, 507, 502, 502,
562 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
563 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
564 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
565 496, 508, 496, 496, 496, 496, 496, 496, 496, 496,
566 496, 496, 496, 496, 509, 496, 496, 509, 509, 496,
568 496, 496, 496, 496, 496, 510, 496, 496, 510, 510,
569 510, 510, 510, 496, 496, 496, 496, 496, 496, 511,
570 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
571 496, 496, 496, 496, 496, 508, 512, 496, 496, 496,
572 509, 509, 509, 513, 496, 510, 510, 510, 510, 510,
573 510, 514, 496, 496, 515, 496, 515, 496, 496, 496,
574 516, 496, 496, 496, 496, 496, 496, 496, 517, 517,
575 496, 496, 509, 509, 518, 518, 510, 510, 510, 510,
576 510, 519, 519, 496, 496, 515, 496, 496, 515, 496,
577 496, 516, 496, 496, 496, 496, 496, 496, 496, 517,
579 496, 517, 496, 496, 509, 509, 496, 518, 496, 518,
580 510, 510, 510, 510, 510, 496, 519, 496, 519, 496,
581 515, 520, 496, 496, 496, 496, 496, 517, 496, 496,
582 509, 496, 496, 518, 510, 510, 496, 496, 510, 510,
583 519, 496, 515, 520, 520, 496, 520, 496, 496, 496,
584 517, 496, 496, 496, 496, 496, 496, 496, 518, 510,
585 496, 496, 496, 496, 496, 510, 510, 519, 496, 515,
586 520, 520, 496, 496, 517, 496, 496, 496, 496, 496,
587 510, 496, 496, 496, 496, 496, 496, 496, 496, 496,
588 496, 515, 520, 520, 496, 496, 510, 496, 496, 496,
590 496, 496, 496, 496, 515, 520, 520, 510, 496, 515,
591 520, 520, 510, 515, 515, 515, 520, 520, 496, 496,
592 515, 515, 515, 520, 520, 496, 496, 496, 515, 515,
593 515, 520, 520, 496, 496, 496, 496, 515, 515, 515,
594 520, 520, 520, 496, 496, 496, 496, 515, 515, 515,
595 520, 520, 520, 521, 522, 496, 496, 496, 496, 515,
596 515, 515, 520, 523, 524, 521, 522, 496, 496, 496,
597 496, 515, 515, 515, 523, 520, 525, 524, 526, 520,
598 496, 496, 496, 496, 515, 515, 515, 525, 496, 526,
599 520, 496, 496, 515, 515, 515, 496, 515, 515, 515,
601 496, 515, 515, 515, 515, 515, 515, 515, 515, 515,
602 515, 515, 515, 515, 515, 515, 515, 515, 515, 515,
603 515, 515, 515, 515, 515, 515, 515, 515, 515, 515,
604 515, 515, 515, 515, 515, 515, 515, 515, 515, 515,
605 515, 515, 515, 515, 515, 515, 515, 515, 515, 515,
606 515, 515, 515, 515, 515, 515, 515, 515, 515, 515,
607 515, 515, 515, 515, 515, 515, 515, 515, 515, 515,
608 515, 515, 515, 515, 515, 515, 515, 515, 515, 515,
609 515, 515, 515, 515, 515, 515, 515, 515, 515, 496,
610 515, 515, 496, 515, 496, 0, 496, 496, 496, 496,
612 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
613 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
614 496, 496, 496, 496, 496, 496
617 static yyconst flex_int16_t yy_nxt[1479] =
619 496, 54, 55, 54, 54, 55, 54, 54, 55, 54,
620 54, 55, 54, 62, 496, 56, 62, 65, 56, 65,
621 63, 57, 401, 63, 57, 59, 55, 59, 59, 55,
622 59, 68, 69, 66, 187, 66, 70, 71, 221, 60,
623 68, 69, 60, 156, 72, 70, 71, 68, 69, 160,
624 73, 120, 70, 72, 68, 69, 157, 73, 187, 70,
625 72, 75, 76, 75, 76, 121, 120, 72, 55, 55,
626 55, 55, 55, 55, 86, 55, 86, 86, 55, 86,
627 122, 162, 78, 389, 163, 78, 339, 246, 87, 161,
628 77, 87, 77, 79, 80, 55, 80, 79, 79, 79,
630 79, 79, 79, 79, 81, 79, 294, 79, 83, 79,
631 84, 79, 119, 119, 119, 119, 119, 119, 119, 119,
632 119, 246, 397, 79, 79, 79, 80, 55, 80, 79,
633 79, 79, 79, 79, 79, 79, 81, 79, 306, 79,
634 83, 79, 84, 79, 86, 55, 86, 86, 55, 86,
635 55, 55, 55, 246, 187, 79, 79, 160, 88, 191,
636 246, 88, 189, 123, 89, 55, 55, 55, 86, 55,
637 86, 86, 55, 86, 55, 55, 55, 122, 187, 89,
638 246, 246, 87, 307, 305, 87, 293, 123, 90, 55,
639 55, 55, 86, 55, 86, 86, 55, 86, 86, 55,
641 86, 122, 187, 90, 318, 246, 88, 311, 246, 88,
642 187, 123, 91, 86, 55, 86, 55, 55, 55, 55,
643 55, 55, 119, 119, 119, 122, 317, 91, 321, 389,
644 89, 332, 322, 89, 92, 93, 55, 93, 92, 92,
645 92, 92, 92, 92, 92, 94, 92, 95, 92, 96,
646 92, 97, 92, 95, 95, 95, 95, 95, 95, 95,
647 95, 95, 95, 95, 92, 92, 95, 95, 95, 95,
648 95, 95, 95, 95, 95, 98, 95, 99, 95, 95,
649 95, 95, 95, 95, 95, 95, 95, 101, 55, 101,
650 101, 55, 101, 55, 55, 55, 55, 55, 55, 187,
652 376, 102, 246, 247, 102, 393, 392, 90, 292, 379,
653 90, 103, 104, 55, 104, 103, 103, 103, 103, 103,
654 103, 103, 105, 103, 106, 103, 107, 103, 108, 103,
655 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
656 106, 103, 103, 106, 106, 106, 106, 106, 106, 106,
657 106, 109, 110, 106, 111, 106, 106, 106, 106, 112,
658 113, 106, 106, 106, 115, 55, 115, 115, 55, 115,
659 68, 69, 68, 69, 128, 70, 123, 70, 116, 123,
660 123, 116, 187, 117, 123, 117, 119, 119, 119, 123,
661 122, 137, 385, 122, 122, 187, 137, 123, 122, 118,
663 129, 118, 187, 122, 137, 123, 130, 270, 123, 131,
664 134, 122, 138, 243, 132, 144, 138, 389, 139, 122,
665 389, 138, 122, 139, 119, 119, 119, 119, 119, 119,
666 119, 119, 119, 119, 119, 119, 123, 119, 119, 119,
667 199, 199, 199, 152, 199, 199, 199, 207, 207, 207,
668 122, 207, 207, 207, 384, 246, 201, 216, 216, 216,
669 201, 246, 187, 209, 216, 216, 216, 209, 199, 199,
670 199, 383, 246, 218, 187, 199, 199, 199, 324, 376,
671 218, 199, 199, 199, 201, 232, 232, 232, 379, 323,
672 202, 201, 312, 246, 210, 329, 187, 201, 219, 325,
674 233, 207, 207, 207, 207, 207, 207, 207, 207, 207,
675 334, 330, 228, 237, 237, 237, 382, 209, 381, 333,
676 209, 187, 335, 209, 216, 216, 216, 187, 238, 216,
677 216, 216, 216, 216, 216, 245, 245, 245, 336, 331,
678 218, 234, 199, 199, 199, 218, 338, 187, 218, 187,
679 337, 246, 247, 252, 252, 252, 371, 387, 201, 253,
680 253, 253, 254, 254, 254, 232, 232, 232, 340, 241,
681 187, 256, 256, 256, 187, 257, 398, 255, 258, 246,
682 233, 207, 207, 207, 187, 394, 251, 261, 261, 261,
683 237, 237, 237, 187, 263, 263, 263, 209, 264, 425,
685 341, 265, 262, 187, 370, 238, 216, 216, 216, 245,
686 245, 245, 274, 274, 274, 349, 259, 199, 199, 199,
687 187, 187, 218, 369, 413, 246, 252, 252, 252, 253,
688 253, 253, 372, 201, 254, 254, 254, 187, 276, 276,
689 276, 268, 277, 400, 271, 278, 256, 256, 256, 255,
690 257, 419, 187, 258, 187, 275, 279, 279, 279, 272,
691 261, 261, 261, 282, 282, 282, 374, 283, 187, 376,
692 284, 187, 280, 414, 368, 262, 263, 263, 263, 396,
693 264, 377, 399, 265, 285, 285, 285, 287, 287, 287,
694 289, 289, 289, 274, 274, 274, 295, 295, 295, 286,
696 187, 187, 288, 276, 276, 276, 290, 277, 187, 187,
697 278, 395, 296, 279, 279, 279, 282, 282, 282, 187,
698 283, 386, 437, 284, 285, 285, 285, 187, 187, 280,
699 298, 298, 298, 403, 299, 402, 376, 300, 420, 286,
700 287, 287, 287, 301, 301, 301, 187, 302, 377, 423,
701 303, 289, 289, 289, 187, 288, 295, 295, 295, 298,
702 298, 298, 359, 299, 467, 358, 300, 290, 187, 301,
703 301, 301, 296, 302, 187, 404, 303, 310, 310, 310,
704 310, 310, 310, 319, 319, 319, 319, 319, 319, 443,
705 326, 326, 326, 187, 327, 417, 187, 328, 320, 187,
707 187, 320, 326, 326, 326, 187, 327, 406, 187, 328,
708 342, 342, 342, 357, 426, 314, 461, 315, 348, 348,
709 348, 356, 316, 187, 187, 343, 246, 350, 350, 350,
710 351, 351, 351, 431, 187, 342, 342, 342, 424, 429,
711 353, 353, 353, 187, 354, 352, 246, 355, 187, 187,
712 343, 246, 348, 348, 348, 347, 246, 361, 361, 361,
713 350, 350, 350, 187, 351, 351, 351, 187, 187, 418,
714 421, 346, 187, 187, 345, 344, 187, 187, 360, 352,
715 246, 363, 363, 363, 422, 364, 362, 430, 365, 353,
716 353, 353, 433, 354, 187, 432, 355, 246, 187, 361,
718 361, 361, 391, 391, 391, 246, 244, 244, 244, 244,
719 244, 244, 244, 244, 244, 187, 438, 244, 246, 247,
720 244, 244, 244, 246, 244, 373, 187, 313, 427, 187,
721 187, 391, 391, 391, 187, 187, 244, 244, 244, 244,
722 244, 244, 244, 244, 244, 244, 244, 246, 441, 244,
723 434, 442, 244, 244, 244, 246, 244, 363, 363, 363,
724 428, 364, 435, 187, 365, 187, 271, 187, 244, 244,
725 405, 405, 405, 246, 244, 244, 244, 244, 244, 380,
726 244, 244, 244, 309, 187, 244, 187, 308, 244, 244,
727 244, 246, 244, 436, 187, 439, 187, 304, 444, 407,
729 407, 407, 187, 297, 244, 244, 244, 244, 244, 244,
730 244, 244, 244, 244, 380, 187, 445, 244, 446, 447,
731 244, 244, 244, 246, 244, 405, 405, 405, 187, 408,
732 440, 187, 409, 410, 410, 410, 244, 244, 407, 407,
733 407, 187, 411, 187, 187, 412, 410, 410, 410, 187,
734 415, 187, 187, 416, 187, 187, 449, 187, 187, 187,
735 187, 291, 187, 448, 187, 187, 462, 187, 450, 187,
736 187, 465, 187, 187, 187, 187, 466, 453, 187, 451,
737 454, 455, 456, 187, 457, 458, 452, 469, 459, 460,
738 468, 463, 470, 464, 187, 187, 187, 187, 187, 187,
740 187, 187, 473, 187, 187, 187, 474, 477, 187, 187,
741 485, 485, 187, 471, 472, 475, 476, 187, 281, 479,
742 187, 480, 187, 273, 488, 246, 483, 484, 488, 491,
743 486, 269, 478, 187, 491, 487, 481, 482, 187, 267,
744 187, 489, 489, 489, 266, 260, 187, 492, 492, 492,
745 489, 489, 489, 494, 494, 494, 250, 490, 492, 492,
746 492, 249, 248, 493, 242, 240, 490, 239, 236, 495,
747 494, 494, 494, 235, 493, 231, 230, 229, 227, 226,
748 225, 224, 223, 222, 187, 220, 495, 52, 52, 52,
749 52, 52, 52, 52, 53, 53, 53, 53, 53, 53,
751 53, 58, 58, 58, 58, 58, 58, 58, 61, 61,
752 61, 61, 61, 61, 61, 64, 64, 64, 64, 64,
753 64, 64, 67, 67, 67, 67, 67, 67, 67, 74,
754 74, 74, 74, 74, 74, 74, 82, 82, 82, 82,
755 82, 82, 82, 85, 85, 85, 85, 85, 85, 85,
756 100, 100, 100, 100, 100, 100, 100, 114, 114, 114,
757 114, 114, 114, 114, 136, 136, 136, 215, 136, 141,
758 141, 141, 214, 141, 146, 146, 146, 213, 146, 155,
759 155, 155, 155, 155, 212, 155, 169, 211, 169, 175,
760 206, 175, 182, 205, 182, 186, 186, 186, 186, 186,
762 186, 186, 192, 204, 203, 192, 200, 200, 200, 200,
763 200, 200, 208, 208, 208, 208, 208, 208, 217, 217,
764 217, 217, 217, 217, 244, 244, 244, 244, 244, 244,
765 244, 366, 366, 366, 366, 366, 366, 366, 367, 367,
766 367, 367, 367, 367, 367, 375, 375, 375, 375, 375,
767 375, 375, 378, 378, 378, 378, 378, 378, 378, 388,
768 388, 388, 388, 388, 388, 388, 390, 390, 390, 390,
769 390, 390, 390, 198, 197, 196, 195, 194, 193, 190,
770 188, 187, 185, 184, 183, 181, 180, 179, 178, 177,
771 176, 174, 173, 172, 171, 170, 168, 167, 166, 165,
773 164, 159, 156, 158, 154, 153, 151, 150, 149, 148,
774 147, 145, 143, 142, 140, 135, 133, 127, 126, 127,
775 126, 125, 124, 496, 51, 496, 496, 496, 496, 496,
776 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
777 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
778 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
779 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
780 496, 496, 496, 496, 496, 496, 496, 496
783 static yyconst flex_int16_t yy_chk[1479] =
785 0, 3, 3, 3, 4, 4, 4, 5, 5, 5,
786 6, 6, 6, 9, 0, 3, 10, 11, 4, 12,
787 9, 5, 397, 10, 6, 7, 7, 7, 8, 8,
788 8, 13, 13, 11, 189, 12, 13, 13, 189, 7,
789 14, 14, 8, 120, 13, 14, 14, 15, 15, 128,
790 15, 56, 15, 14, 16, 16, 120, 16, 330, 16,
791 15, 17, 17, 18, 18, 56, 57, 16, 19, 19,
792 19, 20, 20, 20, 23, 23, 23, 24, 24, 24,
793 57, 129, 19, 390, 129, 20, 330, 272, 23, 128,
794 17, 24, 18, 21, 21, 21, 21, 21, 21, 21,
796 21, 21, 21, 21, 21, 21, 272, 21, 21, 21,
797 21, 21, 54, 54, 54, 55, 55, 55, 59, 59,
798 59, 293, 389, 21, 21, 22, 22, 22, 22, 22,
799 22, 22, 22, 22, 22, 22, 22, 22, 293, 22,
800 22, 22, 22, 22, 25, 25, 25, 26, 26, 26,
801 27, 27, 27, 294, 157, 22, 22, 160, 25, 160,
802 271, 26, 157, 60, 27, 28, 28, 28, 29, 29,
803 29, 30, 30, 30, 31, 31, 31, 60, 292, 28,
804 306, 312, 29, 294, 292, 30, 271, 83, 31, 32,
805 32, 32, 33, 33, 33, 34, 34, 34, 35, 35,
807 35, 83, 315, 32, 312, 324, 33, 306, 311, 34,
808 314, 96, 35, 36, 36, 36, 37, 37, 37, 38,
809 38, 38, 80, 80, 80, 96, 311, 36, 314, 388,
810 37, 324, 315, 38, 39, 39, 39, 39, 39, 39,
811 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
812 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
813 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
814 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
815 39, 39, 39, 39, 39, 39, 39, 41, 41, 41,
816 42, 42, 42, 43, 43, 43, 44, 44, 44, 270,
818 365, 41, 376, 376, 42, 383, 381, 43, 270, 365,
819 44, 45, 45, 45, 45, 45, 45, 45, 45, 45,
820 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
821 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
822 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
823 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
824 45, 45, 45, 45, 47, 47, 47, 48, 48, 48,
825 49, 49, 50, 50, 70, 49, 78, 50, 47, 89,
826 90, 48, 372, 49, 87, 50, 86, 86, 86, 88,
827 78, 87, 372, 89, 90, 243, 88, 91, 87, 49,
829 70, 50, 221, 88, 91, 107, 70, 243, 102, 70,
830 78, 91, 90, 221, 70, 102, 87, 379, 89, 107,
831 377, 88, 102, 87, 93, 93, 93, 101, 101, 101,
832 104, 104, 104, 115, 115, 115, 116, 119, 119, 119,
833 169, 169, 169, 116, 170, 170, 170, 175, 175, 175,
834 116, 176, 176, 176, 371, 317, 169, 182, 182, 182,
835 170, 307, 316, 175, 183, 183, 183, 176, 199, 199,
836 199, 370, 318, 182, 321, 200, 200, 200, 317, 378,
837 183, 202, 202, 202, 199, 206, 206, 206, 378, 316,
838 170, 200, 307, 325, 176, 321, 322, 202, 183, 318,
840 206, 207, 207, 207, 208, 208, 208, 210, 210, 210,
841 327, 322, 202, 213, 213, 213, 369, 207, 368, 325,
842 208, 323, 327, 210, 216, 216, 216, 329, 213, 217,
843 217, 217, 219, 219, 219, 222, 222, 222, 328, 323,
844 216, 210, 228, 228, 228, 217, 329, 374, 219, 331,
845 328, 222, 222, 229, 229, 229, 359, 374, 228, 230,
846 230, 230, 231, 231, 231, 232, 232, 232, 331, 219,
847 394, 233, 233, 233, 385, 233, 394, 231, 233, 332,
848 232, 234, 234, 234, 419, 385, 228, 236, 236, 236,
849 237, 237, 237, 339, 238, 238, 238, 234, 238, 419,
851 332, 238, 236, 408, 358, 237, 241, 241, 241, 245,
852 245, 245, 250, 250, 250, 339, 234, 251, 251, 251,
853 360, 413, 241, 357, 408, 245, 252, 252, 252, 253,
854 253, 253, 360, 251, 254, 254, 254, 396, 255, 255,
855 255, 241, 255, 396, 245, 255, 256, 256, 256, 254,
856 256, 413, 409, 256, 362, 251, 259, 259, 259, 245,
857 261, 261, 261, 262, 262, 262, 362, 262, 387, 364,
858 262, 395, 259, 409, 356, 261, 263, 263, 263, 387,
859 263, 364, 395, 263, 266, 266, 266, 267, 267, 267,
860 268, 268, 268, 274, 274, 274, 275, 275, 275, 266,
862 431, 386, 267, 276, 276, 276, 268, 276, 414, 373,
863 276, 386, 275, 279, 279, 279, 282, 282, 282, 417,
864 282, 373, 431, 282, 285, 285, 285, 399, 398, 279,
865 286, 286, 286, 399, 286, 398, 375, 286, 414, 285,
866 287, 287, 287, 288, 288, 288, 461, 288, 375, 417,
867 288, 289, 289, 289, 437, 287, 295, 295, 295, 298,
868 298, 298, 347, 298, 461, 346, 298, 289, 400, 301,
869 301, 301, 295, 301, 411, 400, 301, 305, 305, 305,
870 310, 310, 310, 313, 313, 313, 319, 319, 319, 437,
871 320, 320, 320, 305, 320, 411, 310, 320, 313, 420,
873 403, 319, 326, 326, 326, 425, 326, 403, 418, 326,
874 333, 333, 333, 345, 420, 310, 455, 310, 338, 338,
875 338, 344, 310, 455, 423, 333, 333, 340, 340, 340,
876 341, 341, 341, 425, 338, 342, 342, 342, 418, 423,
877 343, 343, 343, 340, 343, 341, 341, 343, 412, 415,
878 342, 342, 348, 348, 348, 337, 343, 349, 349, 349,
879 350, 350, 350, 416, 351, 351, 351, 426, 348, 412,
880 415, 336, 424, 349, 335, 334, 350, 427, 348, 351,
881 351, 352, 352, 352, 416, 352, 350, 424, 352, 353,
882 353, 353, 427, 353, 432, 426, 353, 352, 421, 361,
884 361, 361, 380, 380, 380, 353, 354, 354, 354, 354,
885 354, 354, 354, 354, 354, 361, 432, 354, 380, 380,
886 354, 354, 354, 354, 354, 361, 435, 308, 421, 436,
887 422, 391, 391, 391, 429, 428, 354, 354, 355, 355,
888 355, 355, 355, 355, 355, 355, 355, 391, 435, 355,
889 428, 436, 355, 355, 355, 355, 355, 363, 363, 363,
890 422, 363, 429, 438, 363, 430, 391, 433, 355, 355,
891 402, 402, 402, 363, 366, 366, 366, 366, 366, 366,
892 366, 366, 366, 304, 441, 366, 402, 297, 366, 366,
893 366, 366, 366, 430, 439, 433, 440, 291, 438, 404,
895 404, 404, 434, 281, 366, 366, 367, 367, 367, 367,
896 367, 367, 367, 367, 367, 404, 439, 367, 440, 441,
897 367, 367, 367, 367, 367, 405, 405, 405, 442, 405,
898 434, 443, 405, 406, 406, 406, 367, 367, 407, 407,
899 407, 405, 407, 444, 445, 407, 410, 410, 410, 406,
900 410, 446, 447, 410, 407, 448, 443, 449, 450, 451,
901 452, 269, 410, 442, 453, 454, 456, 457, 444, 458,
902 467, 459, 462, 456, 468, 471, 460, 447, 459, 445,
903 448, 449, 450, 460, 451, 452, 446, 463, 453, 454,
904 462, 457, 464, 458, 463, 465, 466, 469, 470, 464,
906 472, 473, 467, 474, 475, 476, 468, 471, 477, 478,
907 479, 480, 481, 465, 466, 469, 470, 482, 260, 473,
908 480, 474, 479, 247, 484, 244, 477, 478, 483, 487,
909 481, 242, 472, 484, 486, 482, 475, 476, 487, 240,
910 483, 485, 485, 485, 239, 235, 486, 488, 488, 488,
911 489, 489, 489, 491, 491, 491, 227, 485, 492, 492,
912 492, 226, 225, 488, 220, 215, 489, 214, 212, 491,
913 494, 494, 494, 211, 492, 205, 204, 203, 198, 197,
914 194, 193, 192, 190, 186, 184, 494, 497, 497, 497,
915 497, 497, 497, 497, 498, 498, 498, 498, 498, 498,
917 498, 499, 499, 499, 499, 499, 499, 499, 500, 500,
918 500, 500, 500, 500, 500, 501, 501, 501, 501, 501,
919 501, 501, 502, 502, 502, 502, 502, 502, 502, 503,
920 503, 503, 503, 503, 503, 503, 504, 504, 504, 504,
921 504, 504, 504, 505, 505, 505, 505, 505, 505, 505,
922 506, 506, 506, 506, 506, 506, 506, 507, 507, 507,
923 507, 507, 507, 507, 508, 508, 508, 181, 508, 509,
924 509, 509, 180, 509, 510, 510, 510, 179, 510, 511,
925 511, 511, 511, 511, 178, 511, 512, 177, 512, 513,
926 174, 513, 514, 173, 514, 515, 515, 515, 515, 515,
928 515, 515, 516, 172, 171, 516, 517, 517, 517, 517,
929 517, 517, 518, 518, 518, 518, 518, 518, 519, 519,
930 519, 519, 519, 519, 520, 520, 520, 520, 520, 520,
931 520, 521, 521, 521, 521, 521, 521, 521, 522, 522,
932 522, 522, 522, 522, 522, 523, 523, 523, 523, 523,
933 523, 523, 524, 524, 524, 524, 524, 524, 524, 525,
934 525, 525, 525, 525, 525, 525, 526, 526, 526, 526,
935 526, 526, 526, 168, 166, 165, 164, 163, 162, 158,
936 156, 155, 154, 153, 152, 151, 150, 149, 148, 147,
937 144, 143, 142, 139, 138, 137, 134, 133, 132, 131,
939 130, 124, 123, 121, 118, 117, 113, 112, 111, 110,
940 109, 105, 99, 98, 94, 81, 77, 76, 75, 69,
941 68, 66, 63, 51, 496, 496, 496, 496, 496, 496,
942 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
943 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
944 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
945 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
946 496, 496, 496, 496, 496, 496, 496, 496
949 /* Table of booleans, true if rule could match eol. */
950 static yyconst flex_int32_t yy_rule_can_match_eol[80] =
952 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0,
953 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1,
954 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0,
955 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0,
958 static yy_state_type yy_last_accepting_state;
959 static char *yy_last_accepting_cpos;
961 extern int xbt_graph_parse__flex_debug;
962 int xbt_graph_parse__flex_debug = 0;
964 /* The intent behind this definition is that it'll catch
965 * any uses of REJECT which flex missed.
967 #define REJECT reject_used_but_not_detected
968 #define yymore() yymore_used_but_not_detected
969 #define YY_MORE_ADJ 0
970 #define YY_RESTORE_YY_MORE_OFFSET
971 char *xbt_graph_parse_text;
972 #line 1 "xbt/graphxml.l"
973 /* Validating XML processor for graphxml.dtd.
974 * Generated 2006/03/21 12:59:33.
976 * This program was generated with the FleXML XML processor generator.
977 * FleXML is Copyright © 1999-2005 Kristoffer Rose. All rights reserved.
978 * (Id: flexml.pl,v 1.46 2006/03/21 08:24:12 legranda Exp).
980 * There are two, intertwined parts to this program, part A and part B.
985 * Some parts, here collectively called "Part A", are found in the
986 * FleXML package. They are Copyright © 1999-2005 Kristoffer Rose.
987 * All rights reserved.
989 * You can redistribute, use, perform, display and/or modify "Part A"
990 * provided the following two conditions hold:
992 * 1. The program is distributed WITHOUT ANY WARRANTY from the author of
993 * FleXML; without even the implied warranty of MERCHANTABILITY or
994 * FITNESS FOR A PARTICULAR PURPOSE.
996 * 2. The program distribution conditions do not in any way affect the
997 * distribution conditions of the FleXML system used to generate this
998 * file or any version of FleXML derived from that system.
1000 * Notice that these are explicit rights granted to you for files
1001 * generated by the FleXML system. For your rights in connection with
1002 * the FleXML system itself please consult the GNU General Public License.
1007 * The other parts, here collectively called "Part B", and which came
1008 * from the DTD used by FleXML to generate this program, can be
1009 * distributed (or not, as the case may be) under the terms of whoever
1010 * wrote them, provided these terms respect and obey the two conditions
1011 * above under the heading "Part A".
1013 * The author of and contributors to FleXML specifically disclaim
1014 * any copyright interest in "Part B", unless "Part B" was written
1015 * by the author of or contributors to FleXML.
1018 #line 48 "xbt/graphxml.l"
1020 /* Version strings. */
1021 const char rcs_graphxml_flexml_skeleton[] =
1022 "$" "Id: skel,v 1.27 2006/03/21 08:24:12 legranda Exp $";
1023 const char rcs_graphxml_flexml[] =
1024 "$" "Id: flexml.pl,v 1.46 2006/03/21 08:24:12 legranda Exp $";
1034 /* Generated definitions. */
1035 #define FLEXML_yylineno
1036 #define FLEXML_BUFFERSTACKSIZE 1000000
1038 /* XML processor api. */
1039 /* FleXML-provided data. */
1041 AT_graphxml_edge_target A_graphxml_edge_target;
1042 AT_graphxml_node_name A_graphxml_node_name;
1043 AT_graphxml_node_label A_graphxml_node_label;
1044 AT_graphxml_edge_label A_graphxml_edge_label;
1045 AT_graphxml_edge_source A_graphxml_edge_source;
1046 AT_graphxml_edge_isDirected A_graphxml_edge_isDirected;
1047 AT_graphxml_edge_name A_graphxml_edge_name;
1051 # define ENTER(state) debug_enter(state,#state)
1052 # define LEAVE debug_leave()
1053 # define SET(state) debug_set(state,#state)
1054 static void debug_enter(int, const char*);
1055 static void debug_leave(void);
1056 static void debug_set(int, const char*);
1058 # define ENTER(state) (yy_push_state(state))
1059 # define LEAVE (yy_pop_state())
1060 # define SET(state) BEGIN(state)
1063 /* Generic actions. */
1064 #define SKIP /*skip*/
1065 #define SUCCEED CLEANUP; return 0
1067 #define FAIL return fail
1068 static int fail(const char*, ...);
1069 const char * graphxml_parse_err_msg(void);
1072 static void cleanup(void);
1073 #define CLEANUP cleanup()
1075 /* Text buffer stack handling. */
1076 char bufferstack[FLEXML_BUFFERSTACKSIZE];
1077 static char* limit = bufferstack + FLEXML_BUFFERSTACKSIZE;
1078 typedef struct BufferLast_s {
1079 struct BufferLast_s *old; char* saved; char new1[1];
1081 #ifdef FLEXML_HasMixed
1082 static BufferLast* last = (BufferLast*)0;
1084 static char* next = bufferstack;
1086 #define BUFFERSET(P) (P = next)
1087 #define BUFFERPUTC(C) (assert(next<limit), *(next++) = (C))
1088 #define BUFFERDONE (BUFFERPUTC('\0'))
1090 #define BUFFERLITERAL(C,P) bufferliteral(C,&(P),xbt_graph_parse_text)
1091 static void bufferliteral(char c, const char** pp, char* text)
1093 char *s = strchr(text,c), *e = strrchr(text,c);
1094 assert(s <= e); BUFFERSET(*pp);
1096 if (isspace(*s)) { BUFFERPUTC(' '); while (isspace(*s)) ++s; }
1097 else BUFFERPUTC(*s);
1102 #ifdef FLEXML_HasMixed
1103 static void pushbuffer(char* p)
1105 BufferLast* l = (BufferLast*)next;
1106 assert(next < limit);
1113 static char* popbuffer(void)
1115 BufferLast* l = last;
1116 assert(last != (BufferLast*)0);
1123 /* General internal entities are `unput' back onto the input stream... */
1124 #define ENTITYTEXT(T) \
1125 { char *s = (T), *e = s+strlen(s);\
1126 while (--e >= s) { unput(*e); }}
1127 /* Flex standard options. */
1128 #define YY_NO_INPUT 1
1129 /* Flex user-requested options. */
1130 /* XML character classes (currently restricted to ASCII). */
1131 /* "Common syntactic structures." */
1132 /* "Names and Tokens." */
1133 /* Miscellaneous. */
1134 /* Parser states (flex `exclusive start conditions'):
1136 * PROLOG the XML prolog of the document before <?xml...>
1137 * DOCTYPE the XML prolog of the document after <?xml...>
1138 * EPILOG after the root element
1139 * INCOMMENT inside an XML comment <!--....-->
1140 * INPI inside an XML PI <?...?>
1141 * VALUE1 inside a '...'-delimited literal
1142 * VALUE2 inside a "..."-delimited literal
1143 * CDATA inside a <![CDATA[...] ]> section.
1144 * ROOT_<tag> expect root element <tag>
1145 * AL_<tag> inside the attribute list for <tag>
1146 * IN_<tag> inside a <tag> with element contents (ready for end tag)
1147 * IMPOSSIBLE dummy to permit disabling rules; must be last
1154 #line 210 "xbt/graphxml.l"
1156 const char* *graphxml_statenames=NULL;
1157 #line 1158 "xbt/graphxml.c"
1168 #define ROOT_graphxml_graph 9
1169 #define AL_graphxml_graph 10
1170 #define S_graphxml_graph 11
1171 #define S_graphxml_graph_1 12
1172 #define S_graphxml_graph_2 13
1173 #define S_graphxml_graph_3 14
1174 #define S_graphxml_graph_4 15
1175 #define S_graphxml_graph_5 16
1176 #define E_graphxml_graph 17
1177 #define ROOT_graphxml_node 18
1178 #define AL_graphxml_node 19
1179 #define E_graphxml_node 20
1180 #define ROOT_graphxml_edge 21
1181 #define AL_graphxml_edge 22
1182 #define E_graphxml_edge 23
1183 #define IMPOSSIBLE 24
1185 #ifndef YY_NO_UNISTD_H
1186 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1187 * down here because we want the user's section 1 to have been scanned first.
1188 * The user has a chance to override it with an option.
1193 #ifndef YY_EXTRA_TYPE
1194 #define YY_EXTRA_TYPE void *
1197 static int yy_init_globals (void );
1199 /* Macros after this point can all be overridden by user definitions in
1203 #ifndef YY_SKIP_YYWRAP
1205 extern "C" int xbt_graph_parse_wrap (void );
1207 extern int xbt_graph_parse_wrap (void );
1212 static void yy_flex_strncpy (char *,yyconst char *,int );
1215 #ifdef YY_NEED_STRLEN
1216 static int yy_flex_strlen (yyconst char * );
1222 static int yyinput (void );
1224 static int input (void );
1229 static int yy_start_stack_ptr = 0;
1230 static int yy_start_stack_depth = 0;
1231 static int *yy_start_stack = NULL;
1233 static void yy_push_state (int new_state );
1235 static void yy_pop_state (void );
1237 /* Amount of stuff to slurp up with each read. */
1238 #ifndef YY_READ_BUF_SIZE
1239 #define YY_READ_BUF_SIZE 8192
1242 /* Copy whatever the last rule matched to the standard output. */
1244 /* This used to be an fputs(), but since the string might contain NUL's,
1245 * we now use fwrite().
1247 #define ECHO (void) fwrite( xbt_graph_parse_text, xbt_graph_parse_leng, 1, xbt_graph_parse_out )
1250 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1251 * is returned in "result".
1254 #define YY_INPUT(buf,result,max_size) \
1255 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1259 for ( n = 0; n < max_size && \
1260 (c = getc( xbt_graph_parse_in )) != EOF && c != '\n'; ++n ) \
1261 buf[n] = (char) c; \
1263 buf[n++] = (char) c; \
1264 if ( c == EOF && ferror( xbt_graph_parse_in ) ) \
1265 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1271 while ( (result = fread(buf, 1, max_size, xbt_graph_parse_in))==0 && ferror(xbt_graph_parse_in)) \
1273 if( errno != EINTR) \
1275 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1279 clearerr(xbt_graph_parse_in); \
1286 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1287 * we don't want an extra ';' after the "return" because that will cause
1288 * some compilers to complain about unreachable statements.
1291 #define yyterminate() return YY_NULL
1294 /* Number of entries by which start-condition stack grows. */
1295 #ifndef YY_START_STACK_INCR
1296 #define YY_START_STACK_INCR 25
1299 /* Report a fatal error. */
1300 #ifndef YY_FATAL_ERROR
1301 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1304 /* end tables serialization structures and prototypes */
1306 /* Default declaration of generated scanner - a define so the user can
1307 * easily add parameters.
1310 #define YY_DECL_IS_OURS 1
1312 extern int xbt_graph_parse_lex (void);
1314 #define YY_DECL int xbt_graph_parse_lex (void)
1315 #endif /* !YY_DECL */
1317 /* Code executed at the beginning of each rule, after xbt_graph_parse_text and xbt_graph_parse_leng
1320 #ifndef YY_USER_ACTION
1321 #define YY_USER_ACTION
1324 /* Code executed at the end of each rule. */
1326 #define YY_BREAK break;
1329 #define YY_RULE_SETUP \
1332 /** The main scanner function which does all the work.
1336 register yy_state_type yy_current_state;
1337 register char *yy_cp, *yy_bp;
1338 register int yy_act;
1340 #line 214 "xbt/graphxml.l"
1343 /* Bypass Flex's default INITIAL state and begin by parsing the XML prolog. */
1347 if(!graphxml_statenames) {graphxml_statenames= (const char **)calloc(IMPOSSIBLE,sizeof(char*));
1348 graphxml_statenames[PROLOG] = NULL;
1349 graphxml_statenames[DOCTYPE] = NULL;
1350 graphxml_statenames[EPILOG] = NULL;
1351 graphxml_statenames[INCOMMENT] = NULL;
1352 graphxml_statenames[INPI] = NULL;
1353 graphxml_statenames[VALUE1] = NULL;
1354 graphxml_statenames[VALUE2] = NULL;
1355 graphxml_statenames[CDATA] = NULL;
1356 graphxml_statenames[ROOT_graphxml_graph] = NULL;
1357 graphxml_statenames[AL_graphxml_graph] = NULL;
1358 graphxml_statenames[S_graphxml_graph] = "graph";
1359 graphxml_statenames[S_graphxml_graph_1] = "graph";
1360 graphxml_statenames[S_graphxml_graph_2] = "graph";
1361 graphxml_statenames[S_graphxml_graph_3] = "graph";
1362 graphxml_statenames[S_graphxml_graph_4] = "graph";
1363 graphxml_statenames[S_graphxml_graph_5] = "graph";
1364 graphxml_statenames[E_graphxml_graph] = "graph";
1365 graphxml_statenames[ROOT_graphxml_node] = NULL;
1366 graphxml_statenames[AL_graphxml_node] = NULL;
1367 graphxml_statenames[E_graphxml_node] = "node";
1368 graphxml_statenames[ROOT_graphxml_edge] = NULL;
1369 graphxml_statenames[AL_graphxml_edge] = NULL;
1370 graphxml_statenames[E_graphxml_edge] = "edge";
1373 /* COMMENTS and PIs: handled uniformly for efficiency. */
1375 #line 1376 "xbt/graphxml.c"
1386 (yy_start) = 1; /* first start state */
1388 if ( ! xbt_graph_parse_in )
1389 xbt_graph_parse_in = stdin;
1391 if ( ! xbt_graph_parse_out )
1392 xbt_graph_parse_out = stdout;
1394 if ( ! YY_CURRENT_BUFFER ) {
1395 xbt_graph_parse_ensure_buffer_stack ();
1396 YY_CURRENT_BUFFER_LVALUE =
1397 xbt_graph_parse__create_buffer(xbt_graph_parse_in,YY_BUF_SIZE );
1400 xbt_graph_parse__load_buffer_state( );
1403 while ( 1 ) /* loops until end-of-file is reached */
1405 yy_cp = (yy_c_buf_p);
1407 /* Support of xbt_graph_parse_text. */
1408 *yy_cp = (yy_hold_char);
1410 /* yy_bp points to the position in yy_ch_buf of the start of
1415 yy_current_state = (yy_start);
1419 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1420 if ( yy_accept[yy_current_state] )
1422 (yy_last_accepting_state) = yy_current_state;
1423 (yy_last_accepting_cpos) = yy_cp;
1425 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1427 yy_current_state = (int) yy_def[yy_current_state];
1428 if ( yy_current_state >= 497 )
1429 yy_c = yy_meta[(unsigned int) yy_c];
1431 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1434 while ( yy_base[yy_current_state] != 1425 );
1437 yy_act = yy_accept[yy_current_state];
1439 { /* have to back up */
1440 yy_cp = (yy_last_accepting_cpos);
1441 yy_current_state = (yy_last_accepting_state);
1442 yy_act = yy_accept[yy_current_state];
1445 YY_DO_BEFORE_ACTION;
1447 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
1450 for ( yyl = 0; yyl < xbt_graph_parse_leng; ++yyl )
1451 if ( xbt_graph_parse_text[yyl] == '\n' )
1453 xbt_graph_parse_lineno++;
1457 do_action: /* This label is used only to access EOF actions. */
1460 { /* beginning of action switch */
1461 case 0: /* must back up */
1462 /* undo the effects of YY_DO_BEFORE_ACTION */
1463 *yy_cp = (yy_hold_char);
1464 yy_cp = (yy_last_accepting_cpos);
1465 yy_current_state = (yy_last_accepting_state);
1466 goto yy_find_action;
1470 #line 249 "xbt/graphxml.l"
1475 #line 250 "xbt/graphxml.l"
1482 #line 253 "xbt/graphxml.l"
1486 #line 255 "xbt/graphxml.l"
1488 #line 256 "xbt/graphxml.l"
1490 /* rule 6 can match eol */
1492 #line 256 "xbt/graphxml.l"
1495 case YY_STATE_EOF(INCOMMENT):
1496 #line 257 "xbt/graphxml.l"
1497 FAIL("EOF in comment.");
1503 #line 260 "xbt/graphxml.l"
1507 #line 262 "xbt/graphxml.l"
1509 /* rule 9 can match eol */
1511 #line 262 "xbt/graphxml.l"
1514 case YY_STATE_EOF(INPI):
1515 #line 263 "xbt/graphxml.l"
1516 FAIL("EOF in PI (processing instruction).");
1519 /* SPACES: skipped uniformly */
1521 /* rule 10 can match eol */
1523 #line 268 "xbt/graphxml.l"
1526 /* PROLOG: determine root element and process it. */
1529 /* rule 11 can match eol */
1531 #line 273 "xbt/graphxml.l"
1535 /* rule 12 can match eol */
1537 #line 274 "xbt/graphxml.l"
1538 FAIL("Bad declaration %s.",xbt_graph_parse_text);
1543 /* rule 13 can match eol */
1545 #line 278 "xbt/graphxml.l"
1546 SET(ROOT_graphxml_edge);
1549 /* rule 14 can match eol */
1551 #line 279 "xbt/graphxml.l"
1552 SET(ROOT_graphxml_node);
1555 /* rule 15 can match eol */
1557 #line 280 "xbt/graphxml.l"
1558 SET(ROOT_graphxml_graph);
1561 /* rule 16 can match eol */
1563 #line 281 "xbt/graphxml.l"
1564 FAIL("Bad declaration %s.",xbt_graph_parse_text);
1568 #line 282 "xbt/graphxml.l"
1569 FAIL("Unexpected character `%c' in prolog.", xbt_graph_parse_text[0]);
1571 case YY_STATE_EOF(PROLOG):
1572 case YY_STATE_EOF(DOCTYPE):
1573 #line 283 "xbt/graphxml.l"
1574 FAIL("EOF in prolog.");
1577 /* RULES DERIVED FROM DTD. */
1578 /* <!-- Small DTD for xbt graphs. --> */
1580 /* rule 18 can match eol */
1582 #line 290 "xbt/graphxml.l"
1584 ENTER(AL_graphxml_graph);
1590 #line 295 "xbt/graphxml.l"
1592 LEAVE; STag_graphxml_graph();pcdata = NULL; ENTER(S_graphxml_graph);
1597 #line 298 "xbt/graphxml.l"
1599 LEAVE; STag_graphxml_graph(); pcdata = NULL; ETag_graphxml_graph();
1601 case ROOT_graphxml_graph: SET(EPILOG); break;
1607 #line 304 "xbt/graphxml.l"
1608 FAIL("Unexpected character `%c' in attribute list of graph element.", xbt_graph_parse_text[0]);
1612 #line 305 "xbt/graphxml.l"
1613 FAIL("Bad attribute `%s' in `graph' element start tag.",xbt_graph_parse_text);
1615 case YY_STATE_EOF(AL_graphxml_graph):
1616 #line 306 "xbt/graphxml.l"
1617 FAIL("EOF in attribute list of `graph' element.");
1622 /* rule 23 can match eol */
1624 #line 310 "xbt/graphxml.l"
1627 ETag_graphxml_graph();
1629 case ROOT_graphxml_graph: SET(EPILOG); break;
1634 /* rule 24 can match eol */
1636 #line 317 "xbt/graphxml.l"
1637 FAIL("Unexpected end-tag `%s': `</graph>' expected.",xbt_graph_parse_text);
1641 #line 318 "xbt/graphxml.l"
1642 FAIL("Unexpected character `%c': `</graph>' expected.",xbt_graph_parse_text[0]);
1644 case YY_STATE_EOF(S_graphxml_graph_1):
1645 case YY_STATE_EOF(E_graphxml_graph):
1646 case YY_STATE_EOF(S_graphxml_graph_3):
1647 case YY_STATE_EOF(S_graphxml_graph_5):
1648 case YY_STATE_EOF(S_graphxml_graph):
1649 #line 319 "xbt/graphxml.l"
1650 FAIL("Premature EOF: `</graph>' expected.");
1654 * name CDATA #REQUIRED
1657 /* rule 26 can match eol */
1659 #line 326 "xbt/graphxml.l"
1661 A_graphxml_node_label = NULL;
1662 A_graphxml_node_name = NULL;
1663 ENTER(AL_graphxml_node);
1668 /* rule 27 can match eol */
1670 #line 333 "xbt/graphxml.l"
1671 ENTER(VALUE1); BUFFERSET(A_graphxml_node_label);
1674 /* rule 28 can match eol */
1676 #line 334 "xbt/graphxml.l"
1677 ENTER(VALUE2); BUFFERSET(A_graphxml_node_label);
1680 /* rule 29 can match eol */
1682 #line 336 "xbt/graphxml.l"
1683 ENTER(VALUE1); BUFFERSET(A_graphxml_node_name);
1686 /* rule 30 can match eol */
1688 #line 337 "xbt/graphxml.l"
1689 ENTER(VALUE2); BUFFERSET(A_graphxml_node_name);
1693 #line 339 "xbt/graphxml.l"
1695 if (!A_graphxml_node_name) FAIL("Required attribute `name' not set for `node' element.");
1696 LEAVE; STag_graphxml_node();pcdata = NULL; ENTER(E_graphxml_node);
1701 #line 343 "xbt/graphxml.l"
1703 if (!A_graphxml_node_name) FAIL("Required attribute `name' not set for `node' element.");
1704 LEAVE; STag_graphxml_node(); pcdata = NULL; ETag_graphxml_node();
1706 case S_graphxml_graph_2: case S_graphxml_graph_3: case S_graphxml_graph: SET(S_graphxml_graph_3); break;
1707 case ROOT_graphxml_node: SET(EPILOG); break;
1713 #line 351 "xbt/graphxml.l"
1714 FAIL("Unexpected character `%c' in attribute list of node element.", xbt_graph_parse_text[0]);
1718 #line 352 "xbt/graphxml.l"
1719 FAIL("Bad attribute `%s' in `node' element start tag.",xbt_graph_parse_text);
1721 case YY_STATE_EOF(AL_graphxml_node):
1722 #line 353 "xbt/graphxml.l"
1723 FAIL("EOF in attribute list of `node' element.");
1728 /* rule 35 can match eol */
1730 #line 357 "xbt/graphxml.l"
1733 ETag_graphxml_node();
1735 case S_graphxml_graph_2: case S_graphxml_graph_3: case S_graphxml_graph: SET(S_graphxml_graph_3); break;
1736 case ROOT_graphxml_node: SET(EPILOG); break;
1741 /* rule 36 can match eol */
1743 #line 365 "xbt/graphxml.l"
1744 FAIL("Unexpected end-tag `%s': `</node>' expected.",xbt_graph_parse_text);
1748 #line 366 "xbt/graphxml.l"
1749 FAIL("Unexpected character `%c': `</node>' expected.",xbt_graph_parse_text[0]);
1751 case YY_STATE_EOF(E_graphxml_node):
1752 #line 367 "xbt/graphxml.l"
1753 FAIL("Premature EOF: `</node>' expected.");
1757 * name CDATA #IMPLIED
1758 * source CDATA #REQUIRED
1759 * target CDATA #REQUIRED
1760 * isDirected (true|false) "true"
1763 /* rule 38 can match eol */
1765 #line 377 "xbt/graphxml.l"
1767 A_graphxml_edge_label = NULL;
1768 A_graphxml_edge_name = NULL;
1769 A_graphxml_edge_source = NULL;
1770 A_graphxml_edge_target = NULL;
1771 A_graphxml_edge_isDirected = A_graphxml_edge_isDirected_true;
1772 ENTER(AL_graphxml_edge);
1777 /* rule 39 can match eol */
1779 #line 387 "xbt/graphxml.l"
1780 ENTER(VALUE1); BUFFERSET(A_graphxml_edge_label);
1783 /* rule 40 can match eol */
1785 #line 388 "xbt/graphxml.l"
1786 ENTER(VALUE2); BUFFERSET(A_graphxml_edge_label);
1789 /* rule 41 can match eol */
1791 #line 390 "xbt/graphxml.l"
1792 ENTER(VALUE1); BUFFERSET(A_graphxml_edge_name);
1795 /* rule 42 can match eol */
1797 #line 391 "xbt/graphxml.l"
1798 ENTER(VALUE2); BUFFERSET(A_graphxml_edge_name);
1801 /* rule 43 can match eol */
1803 #line 393 "xbt/graphxml.l"
1804 ENTER(VALUE1); BUFFERSET(A_graphxml_edge_source);
1807 /* rule 44 can match eol */
1809 #line 394 "xbt/graphxml.l"
1810 ENTER(VALUE2); BUFFERSET(A_graphxml_edge_source);
1813 /* rule 45 can match eol */
1815 #line 396 "xbt/graphxml.l"
1816 ENTER(VALUE1); BUFFERSET(A_graphxml_edge_target);
1819 /* rule 46 can match eol */
1821 #line 397 "xbt/graphxml.l"
1822 ENTER(VALUE2); BUFFERSET(A_graphxml_edge_target);
1825 /* rule 47 can match eol */
1826 #line 400 "xbt/graphxml.l"
1828 /* rule 48 can match eol */
1830 #line 400 "xbt/graphxml.l"
1831 A_graphxml_edge_isDirected = A_graphxml_edge_isDirected_true;
1834 /* rule 49 can match eol */
1835 #line 402 "xbt/graphxml.l"
1837 /* rule 50 can match eol */
1839 #line 402 "xbt/graphxml.l"
1840 A_graphxml_edge_isDirected = A_graphxml_edge_isDirected_false;
1844 #line 404 "xbt/graphxml.l"
1846 if (!A_graphxml_edge_source) FAIL("Required attribute `source' not set for `edge' element.");
1847 if (!A_graphxml_edge_target) FAIL("Required attribute `target' not set for `edge' element.");
1848 LEAVE; STag_graphxml_edge();pcdata = NULL; ENTER(E_graphxml_edge);
1853 #line 409 "xbt/graphxml.l"
1855 if (!A_graphxml_edge_source) FAIL("Required attribute `source' not set for `edge' element.");
1856 if (!A_graphxml_edge_target) FAIL("Required attribute `target' not set for `edge' element.");
1857 LEAVE; STag_graphxml_edge(); pcdata = NULL; ETag_graphxml_edge();
1859 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;
1860 case ROOT_graphxml_edge: SET(EPILOG); break;
1866 #line 418 "xbt/graphxml.l"
1867 FAIL("Unexpected character `%c' in attribute list of edge element.", xbt_graph_parse_text[0]);
1871 #line 419 "xbt/graphxml.l"
1872 FAIL("Bad attribute `%s' in `edge' element start tag.",xbt_graph_parse_text);
1874 case YY_STATE_EOF(AL_graphxml_edge):
1875 #line 420 "xbt/graphxml.l"
1876 FAIL("EOF in attribute list of `edge' element.");
1881 /* rule 55 can match eol */
1883 #line 424 "xbt/graphxml.l"
1886 ETag_graphxml_edge();
1888 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;
1889 case ROOT_graphxml_edge: SET(EPILOG); break;
1894 /* rule 56 can match eol */
1896 #line 432 "xbt/graphxml.l"
1897 FAIL("Unexpected end-tag `%s': `</edge>' expected.",xbt_graph_parse_text);
1901 #line 433 "xbt/graphxml.l"
1902 FAIL("Unexpected character `%c': `</edge>' expected.",xbt_graph_parse_text[0]);
1904 case YY_STATE_EOF(E_graphxml_edge):
1905 #line 434 "xbt/graphxml.l"
1906 FAIL("Premature EOF: `</edge>' expected.");
1909 /* EPILOG: after the root element. */
1913 #line 440 "xbt/graphxml.l"
1914 {SET(PROLOG); yyless(0); CLEANUP; return -1;}
1916 case YY_STATE_EOF(EPILOG):
1917 #line 441 "xbt/graphxml.l"
1921 /* CHARACTER DATA. */
1923 /* Non-defined standard entities... */
1926 #line 448 "xbt/graphxml.l"
1931 #line 449 "xbt/graphxml.l"
1936 #line 450 "xbt/graphxml.l"
1941 #line 451 "xbt/graphxml.l"
1946 #line 452 "xbt/graphxml.l"
1949 /* Character entities. */
1952 #line 455 "xbt/graphxml.l"
1953 BUFFERPUTC((unsigned char)atoi(xbt_graph_parse_text+2));
1957 #line 456 "xbt/graphxml.l"
1958 BUFFERPUTC((unsigned char)strtol(xbt_graph_parse_text+3,NULL,16));
1963 /* rule 66 can match eol */
1964 #line 461 "xbt/graphxml.l"
1966 /* rule 67 can match eol */
1967 #line 462 "xbt/graphxml.l"
1969 /* rule 68 can match eol */
1970 #line 463 "xbt/graphxml.l"
1972 /* rule 69 can match eol */
1974 #line 463 "xbt/graphxml.l"
1981 #line 467 "xbt/graphxml.l"
1986 #line 468 "xbt/graphxml.l"
1987 FAIL("Unexpected `]""]>' in character data.");
1993 #line 472 "xbt/graphxml.l"
1996 case YY_STATE_EOF(VALUE1):
1997 #line 473 "xbt/graphxml.l"
1998 FAIL("EOF in literal (\"'\" expected).");
2004 #line 477 "xbt/graphxml.l"
2007 case YY_STATE_EOF(VALUE2):
2008 #line 478 "xbt/graphxml.l"
2009 FAIL("EOF in literal (`\"' expected).");
2014 /* rule 74 can match eol */
2016 #line 482 "xbt/graphxml.l"
2017 BUFFERPUTC(xbt_graph_parse_text[0]);
2021 #line 483 "xbt/graphxml.l"
2022 FAIL("Spurious `%c' in character data.",xbt_graph_parse_text[0]);
2028 #line 487 "xbt/graphxml.l"
2031 /* "]""]" BUFFERPUTC(xbt_graph_parse_text[0]); BUFFERPUTC(xbt_graph_parse_text[1]); */
2034 #line 489 "xbt/graphxml.l"
2035 BUFFERPUTC(xbt_graph_parse_text[0]);
2037 case YY_STATE_EOF(CDATA):
2038 #line 490 "xbt/graphxml.l"
2039 FAIL("EOF in CDATA section.");
2042 /* Impossible rules to avoid warnings from flex(1). */
2043 /* Ideally, this should be replaced by code in flexml.pl that
2044 generates just the states not covered by other rules. */
2047 /* rule 78 can match eol */
2049 #line 497 "xbt/graphxml.l"
2050 FAIL("Syntax error on character `%c'.", xbt_graph_parse_text[0]);
2055 #line 500 "xbt/graphxml.l"
2058 #line 2059 "xbt/graphxml.c"
2059 case YY_STATE_EOF(INITIAL):
2060 case YY_STATE_EOF(ROOT_graphxml_graph):
2061 case YY_STATE_EOF(S_graphxml_graph_2):
2062 case YY_STATE_EOF(S_graphxml_graph_4):
2063 case YY_STATE_EOF(ROOT_graphxml_node):
2064 case YY_STATE_EOF(ROOT_graphxml_edge):
2065 case YY_STATE_EOF(IMPOSSIBLE):
2068 case YY_END_OF_BUFFER:
2070 /* Amount of text matched not including the EOB char. */
2071 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2073 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2074 *yy_cp = (yy_hold_char);
2075 YY_RESTORE_YY_MORE_OFFSET
2077 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2079 /* We're scanning a new file or input source. It's
2080 * possible that this happened because the user
2081 * just pointed xbt_graph_parse_in at a new source and called
2082 * xbt_graph_parse_lex(). If so, then we have to assure
2083 * consistency between YY_CURRENT_BUFFER and our
2084 * globals. Here is the right place to do so, because
2085 * this is the first action (other than possibly a
2086 * back-up) that will match for the new input source.
2088 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2089 YY_CURRENT_BUFFER_LVALUE->yy_input_file = xbt_graph_parse_in;
2090 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2093 /* Note that here we test for yy_c_buf_p "<=" to the position
2094 * of the first EOB in the buffer, since yy_c_buf_p will
2095 * already have been incremented past the NUL character
2096 * (since all states make transitions on EOB to the
2097 * end-of-buffer state). Contrast this with the test
2100 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2101 { /* This was really a NUL. */
2102 yy_state_type yy_next_state;
2104 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2106 yy_current_state = yy_get_previous_state( );
2108 /* Okay, we're now positioned to make the NUL
2109 * transition. We couldn't have
2110 * yy_get_previous_state() go ahead and do it
2111 * for us because it doesn't know how to deal
2112 * with the possibility of jamming (and we don't
2113 * want to build jamming into it because then it
2114 * will run more slowly).
2117 yy_next_state = yy_try_NUL_trans( yy_current_state );
2119 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2121 if ( yy_next_state )
2123 /* Consume the NUL. */
2124 yy_cp = ++(yy_c_buf_p);
2125 yy_current_state = yy_next_state;
2131 yy_cp = (yy_c_buf_p);
2132 goto yy_find_action;
2136 else switch ( yy_get_next_buffer( ) )
2138 case EOB_ACT_END_OF_FILE:
2140 (yy_did_buffer_switch_on_eof) = 0;
2142 if ( xbt_graph_parse_wrap( ) )
2144 /* Note: because we've taken care in
2145 * yy_get_next_buffer() to have set up
2146 * xbt_graph_parse_text, we can now set up
2147 * yy_c_buf_p so that if some total
2148 * hoser (like flex itself) wants to
2149 * call the scanner after we return the
2150 * YY_NULL, it'll still work - another
2151 * YY_NULL will get returned.
2153 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2155 yy_act = YY_STATE_EOF(YY_START);
2161 if ( ! (yy_did_buffer_switch_on_eof) )
2167 case EOB_ACT_CONTINUE_SCAN:
2169 (yytext_ptr) + yy_amount_of_matched_text;
2171 yy_current_state = yy_get_previous_state( );
2173 yy_cp = (yy_c_buf_p);
2174 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2177 case EOB_ACT_LAST_MATCH:
2179 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2181 yy_current_state = yy_get_previous_state( );
2183 yy_cp = (yy_c_buf_p);
2184 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2185 goto yy_find_action;
2192 "fatal flex scanner internal error--no action found" );
2193 } /* end of action switch */
2194 } /* end of scanning one token */
2195 } /* end of xbt_graph_parse_lex */
2197 /* yy_get_next_buffer - try to read in a new buffer
2199 * Returns a code representing an action:
2200 * EOB_ACT_LAST_MATCH -
2201 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2202 * EOB_ACT_END_OF_FILE - end of file
2204 static int yy_get_next_buffer (void)
2206 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2207 register char *source = (yytext_ptr);
2208 register int number_to_move, i;
2211 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2213 "fatal flex scanner internal error--end of buffer missed" );
2215 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2216 { /* Don't try to fill the buffer, so this is an EOF. */
2217 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2219 /* We matched a single character, the EOB, so
2220 * treat this as a final EOF.
2222 return EOB_ACT_END_OF_FILE;
2227 /* We matched some text prior to the EOB, first
2230 return EOB_ACT_LAST_MATCH;
2234 /* Try to read more data. */
2236 /* First move last chars to start of buffer. */
2237 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
2239 for ( i = 0; i < number_to_move; ++i )
2240 *(dest++) = *(source++);
2242 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2243 /* don't do the read, it's not guaranteed to return an EOF,
2246 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2251 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2253 while ( num_to_read <= 0 )
2254 { /* Not enough room in the buffer - grow it. */
2256 /* just a shorter name for the current buffer */
2257 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
2259 int yy_c_buf_p_offset =
2260 (int) ((yy_c_buf_p) - b->yy_ch_buf);
2262 if ( b->yy_is_our_buffer )
2264 int new_size = b->yy_buf_size * 2;
2266 if ( new_size <= 0 )
2267 b->yy_buf_size += b->yy_buf_size / 8;
2269 b->yy_buf_size *= 2;
2271 b->yy_ch_buf = (char *)
2272 /* Include room in for 2 EOB chars. */
2273 xbt_graph_parse_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
2276 /* Can't grow it, we don't own it. */
2279 if ( ! b->yy_ch_buf )
2281 "fatal error - scanner input buffer overflow" );
2283 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2285 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2290 if ( num_to_read > YY_READ_BUF_SIZE )
2291 num_to_read = YY_READ_BUF_SIZE;
2293 /* Read in more data. */
2294 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2295 (yy_n_chars), num_to_read );
2297 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2300 if ( (yy_n_chars) == 0 )
2302 if ( number_to_move == YY_MORE_ADJ )
2304 ret_val = EOB_ACT_END_OF_FILE;
2305 xbt_graph_parse_restart(xbt_graph_parse_in );
2310 ret_val = EOB_ACT_LAST_MATCH;
2311 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2312 YY_BUFFER_EOF_PENDING;
2317 ret_val = EOB_ACT_CONTINUE_SCAN;
2319 (yy_n_chars) += number_to_move;
2320 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2321 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2323 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2328 /* yy_get_previous_state - get the state just before the EOB char was reached */
2330 static yy_state_type yy_get_previous_state (void)
2332 register yy_state_type yy_current_state;
2333 register char *yy_cp;
2335 yy_current_state = (yy_start);
2337 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2339 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2340 if ( yy_accept[yy_current_state] )
2342 (yy_last_accepting_state) = yy_current_state;
2343 (yy_last_accepting_cpos) = yy_cp;
2345 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2347 yy_current_state = (int) yy_def[yy_current_state];
2348 if ( yy_current_state >= 497 )
2349 yy_c = yy_meta[(unsigned int) yy_c];
2351 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2354 return yy_current_state;
2357 /* yy_try_NUL_trans - try to make a transition on the NUL character
2360 * next_state = yy_try_NUL_trans( current_state );
2362 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2364 register int yy_is_jam;
2365 register char *yy_cp = (yy_c_buf_p);
2367 register YY_CHAR yy_c = 1;
2368 if ( yy_accept[yy_current_state] )
2370 (yy_last_accepting_state) = yy_current_state;
2371 (yy_last_accepting_cpos) = yy_cp;
2373 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2375 yy_current_state = (int) yy_def[yy_current_state];
2376 if ( yy_current_state >= 497 )
2377 yy_c = yy_meta[(unsigned int) yy_c];
2379 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2380 yy_is_jam = (yy_current_state == 496);
2382 return yy_is_jam ? 0 : yy_current_state;
2387 static int yyinput (void)
2389 static int input (void)
2395 *(yy_c_buf_p) = (yy_hold_char);
2397 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2399 /* yy_c_buf_p now points to the character we want to return.
2400 * If this occurs *before* the EOB characters, then it's a
2401 * valid NUL; if not, then we've hit the end of the buffer.
2403 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2404 /* This was really a NUL. */
2405 *(yy_c_buf_p) = '\0';
2408 { /* need more input */
2409 int offset = (yy_c_buf_p) - (yytext_ptr);
2412 switch ( yy_get_next_buffer( ) )
2414 case EOB_ACT_LAST_MATCH:
2415 /* This happens because yy_g_n_b()
2416 * sees that we've accumulated a
2417 * token and flags that we need to
2418 * try matching the token before
2419 * proceeding. But for input(),
2420 * there's no matching to consider.
2421 * So convert the EOB_ACT_LAST_MATCH
2422 * to EOB_ACT_END_OF_FILE.
2425 /* Reset buffer status. */
2426 xbt_graph_parse_restart(xbt_graph_parse_in );
2430 case EOB_ACT_END_OF_FILE:
2432 if ( xbt_graph_parse_wrap( ) )
2435 if ( ! (yy_did_buffer_switch_on_eof) )
2444 case EOB_ACT_CONTINUE_SCAN:
2445 (yy_c_buf_p) = (yytext_ptr) + offset;
2451 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2452 *(yy_c_buf_p) = '\0'; /* preserve xbt_graph_parse_text */
2453 (yy_hold_char) = *++(yy_c_buf_p);
2457 xbt_graph_parse_lineno++;
2462 #endif /* ifndef YY_NO_INPUT */
2464 /** Immediately switch to a different input stream.
2465 * @param input_file A readable stream.
2467 * @note This function does not reset the start condition to @c INITIAL .
2469 void xbt_graph_parse_restart (FILE * input_file )
2472 if ( ! YY_CURRENT_BUFFER ){
2473 xbt_graph_parse_ensure_buffer_stack ();
2474 YY_CURRENT_BUFFER_LVALUE =
2475 xbt_graph_parse__create_buffer(xbt_graph_parse_in,YY_BUF_SIZE );
2478 xbt_graph_parse__init_buffer(YY_CURRENT_BUFFER,input_file );
2479 xbt_graph_parse__load_buffer_state( );
2482 /** Switch to a different input buffer.
2483 * @param new_buffer The new input buffer.
2486 void xbt_graph_parse__switch_to_buffer (YY_BUFFER_STATE new_buffer )
2489 /* TODO. We should be able to replace this entire function body
2491 * xbt_graph_parse_pop_buffer_state();
2492 * xbt_graph_parse_push_buffer_state(new_buffer);
2494 xbt_graph_parse_ensure_buffer_stack ();
2495 if ( YY_CURRENT_BUFFER == new_buffer )
2498 if ( YY_CURRENT_BUFFER )
2500 /* Flush out information for old buffer. */
2501 *(yy_c_buf_p) = (yy_hold_char);
2502 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2503 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2506 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2507 xbt_graph_parse__load_buffer_state( );
2509 /* We don't actually know whether we did this switch during
2510 * EOF (xbt_graph_parse_wrap()) processing, but the only time this flag
2511 * is looked at is after xbt_graph_parse_wrap() is called, so it's safe
2512 * to go ahead and always set it.
2514 (yy_did_buffer_switch_on_eof) = 1;
2517 static void xbt_graph_parse__load_buffer_state (void)
2519 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2520 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2521 xbt_graph_parse_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2522 (yy_hold_char) = *(yy_c_buf_p);
2525 /** Allocate and initialize an input buffer state.
2526 * @param file A readable stream.
2527 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2529 * @return the allocated buffer state.
2531 YY_BUFFER_STATE xbt_graph_parse__create_buffer (FILE * file, int size )
2535 b = (YY_BUFFER_STATE) xbt_graph_parse_alloc(sizeof( struct yy_buffer_state ) );
2537 YY_FATAL_ERROR( "out of dynamic memory in xbt_graph_parse__create_buffer()" );
2539 b->yy_buf_size = size;
2541 /* yy_ch_buf has to be 2 characters longer than the size given because
2542 * we need to put in 2 end-of-buffer characters.
2544 b->yy_ch_buf = (char *) xbt_graph_parse_alloc(b->yy_buf_size + 2 );
2545 if ( ! b->yy_ch_buf )
2546 YY_FATAL_ERROR( "out of dynamic memory in xbt_graph_parse__create_buffer()" );
2548 b->yy_is_our_buffer = 1;
2550 xbt_graph_parse__init_buffer(b,file );
2555 /** Destroy the buffer.
2556 * @param b a buffer created with xbt_graph_parse__create_buffer()
2559 void xbt_graph_parse__delete_buffer (YY_BUFFER_STATE b )
2565 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2566 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2568 if ( b->yy_is_our_buffer )
2569 xbt_graph_parse_free((void *) b->yy_ch_buf );
2571 xbt_graph_parse_free((void *) b );
2575 extern int isatty (int );
2576 #endif /* __cplusplus */
2578 /* Initializes or reinitializes a buffer.
2579 * This function is sometimes called more than once on the same buffer,
2580 * such as during a xbt_graph_parse_restart() or at EOF.
2582 static void xbt_graph_parse__init_buffer (YY_BUFFER_STATE b, FILE * file )
2587 xbt_graph_parse__flush_buffer(b );
2589 b->yy_input_file = file;
2590 b->yy_fill_buffer = 1;
2592 /* If b is the current buffer, then xbt_graph_parse__init_buffer was _probably_
2593 * called from xbt_graph_parse_restart() or through yy_get_next_buffer.
2594 * In that case, we don't want to reset the lineno or column.
2596 if (b != YY_CURRENT_BUFFER){
2597 b->yy_bs_lineno = 1;
2598 b->yy_bs_column = 0;
2601 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2606 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2607 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2610 void xbt_graph_parse__flush_buffer (YY_BUFFER_STATE b )
2617 /* We always need two end-of-buffer characters. The first causes
2618 * a transition to the end-of-buffer state. The second causes
2619 * a jam in that state.
2621 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2622 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2624 b->yy_buf_pos = &b->yy_ch_buf[0];
2627 b->yy_buffer_status = YY_BUFFER_NEW;
2629 if ( b == YY_CURRENT_BUFFER )
2630 xbt_graph_parse__load_buffer_state( );
2633 /** Pushes the new state onto the stack. The new state becomes
2634 * the current state. This function will allocate the stack
2636 * @param new_buffer The new state.
2639 void xbt_graph_parse_push_buffer_state (YY_BUFFER_STATE new_buffer )
2641 if (new_buffer == NULL)
2644 xbt_graph_parse_ensure_buffer_stack();
2646 /* This block is copied from xbt_graph_parse__switch_to_buffer. */
2647 if ( YY_CURRENT_BUFFER )
2649 /* Flush out information for old buffer. */
2650 *(yy_c_buf_p) = (yy_hold_char);
2651 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2652 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2655 /* Only push if top exists. Otherwise, replace top. */
2656 if (YY_CURRENT_BUFFER)
2657 (yy_buffer_stack_top)++;
2658 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2660 /* copied from xbt_graph_parse__switch_to_buffer. */
2661 xbt_graph_parse__load_buffer_state( );
2662 (yy_did_buffer_switch_on_eof) = 1;
2665 /** Removes and deletes the top of the stack, if present.
2666 * The next element becomes the new top.
2669 void xbt_graph_parse_pop_buffer_state (void)
2671 if (!YY_CURRENT_BUFFER)
2674 xbt_graph_parse__delete_buffer(YY_CURRENT_BUFFER );
2675 YY_CURRENT_BUFFER_LVALUE = NULL;
2676 if ((yy_buffer_stack_top) > 0)
2677 --(yy_buffer_stack_top);
2679 if (YY_CURRENT_BUFFER) {
2680 xbt_graph_parse__load_buffer_state( );
2681 (yy_did_buffer_switch_on_eof) = 1;
2685 /* Allocates the stack if it does not exist.
2686 * Guarantees space for at least one push.
2688 static void xbt_graph_parse_ensure_buffer_stack (void)
2692 if (!(yy_buffer_stack)) {
2694 /* First allocation is just for 2 elements, since we don't know if this
2695 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2696 * immediate realloc on the next call.
2699 (yy_buffer_stack) = (struct yy_buffer_state**)xbt_graph_parse_alloc
2700 (num_to_alloc * sizeof(struct yy_buffer_state*)
2703 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2705 (yy_buffer_stack_max) = num_to_alloc;
2706 (yy_buffer_stack_top) = 0;
2710 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2712 /* Increase the buffer to prepare for a possible push. */
2713 int grow_size = 8 /* arbitrary grow size */;
2715 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2716 (yy_buffer_stack) = (struct yy_buffer_state**)xbt_graph_parse_realloc
2718 num_to_alloc * sizeof(struct yy_buffer_state*)
2721 /* zero only the new slots.*/
2722 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2723 (yy_buffer_stack_max) = num_to_alloc;
2727 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2728 * @param base the character buffer
2729 * @param size the size in bytes of the character buffer
2731 * @return the newly allocated buffer state object.
2733 YY_BUFFER_STATE xbt_graph_parse__scan_buffer (char * base, yy_size_t size )
2738 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2739 base[size-1] != YY_END_OF_BUFFER_CHAR )
2740 /* They forgot to leave room for the EOB's. */
2743 b = (YY_BUFFER_STATE) xbt_graph_parse_alloc(sizeof( struct yy_buffer_state ) );
2745 YY_FATAL_ERROR( "out of dynamic memory in xbt_graph_parse__scan_buffer()" );
2747 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2748 b->yy_buf_pos = b->yy_ch_buf = base;
2749 b->yy_is_our_buffer = 0;
2750 b->yy_input_file = 0;
2751 b->yy_n_chars = b->yy_buf_size;
2752 b->yy_is_interactive = 0;
2754 b->yy_fill_buffer = 0;
2755 b->yy_buffer_status = YY_BUFFER_NEW;
2757 xbt_graph_parse__switch_to_buffer(b );
2762 /** Setup the input buffer state to scan a string. The next call to xbt_graph_parse_lex() will
2763 * scan from a @e copy of @a str.
2764 * @param yystr a NUL-terminated string to scan
2766 * @return the newly allocated buffer state object.
2767 * @note If you want to scan bytes that may contain NUL values, then use
2768 * xbt_graph_parse__scan_bytes() instead.
2770 YY_BUFFER_STATE xbt_graph_parse__scan_string (yyconst char * yystr )
2773 return xbt_graph_parse__scan_bytes(yystr,strlen(yystr) );
2776 /** Setup the input buffer state to scan the given bytes. The next call to xbt_graph_parse_lex() will
2777 * scan from a @e copy of @a bytes.
2778 * @param bytes the byte buffer to scan
2779 * @param len the number of bytes in the buffer pointed to by @a bytes.
2781 * @return the newly allocated buffer state object.
2783 YY_BUFFER_STATE xbt_graph_parse__scan_bytes (yyconst char * yybytes, int _yybytes_len )
2790 /* Get memory for full buffer, including space for trailing EOB's. */
2791 n = _yybytes_len + 2;
2792 buf = (char *) xbt_graph_parse_alloc(n );
2794 YY_FATAL_ERROR( "out of dynamic memory in xbt_graph_parse__scan_bytes()" );
2796 for ( i = 0; i < _yybytes_len; ++i )
2797 buf[i] = yybytes[i];
2799 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2801 b = xbt_graph_parse__scan_buffer(buf,n );
2803 YY_FATAL_ERROR( "bad buffer in xbt_graph_parse__scan_bytes()" );
2805 /* It's okay to grow etc. this buffer, and we should throw it
2806 * away when we're done.
2808 b->yy_is_our_buffer = 1;
2813 static void yy_push_state (int new_state )
2815 if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
2819 (yy_start_stack_depth) += YY_START_STACK_INCR;
2820 new_size = (yy_start_stack_depth) * sizeof( int );
2822 if ( ! (yy_start_stack) )
2823 (yy_start_stack) = (int *) xbt_graph_parse_alloc(new_size );
2826 (yy_start_stack) = (int *) xbt_graph_parse_realloc((void *) (yy_start_stack),new_size );
2828 if ( ! (yy_start_stack) )
2830 "out of memory expanding start-condition stack" );
2833 (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
2838 static void yy_pop_state (void)
2840 if ( --(yy_start_stack_ptr) < 0 )
2841 YY_FATAL_ERROR( "start-condition stack underflow" );
2843 BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
2846 #ifndef YY_EXIT_FAILURE
2847 #define YY_EXIT_FAILURE 2
2850 static void yy_fatal_error (yyconst char* msg )
2852 (void) fprintf( stderr, "%s\n", msg );
2853 exit( YY_EXIT_FAILURE );
2856 /* Redefine yyless() so it works in section 3 code. */
2862 /* Undo effects of setting up xbt_graph_parse_text. */ \
2863 int yyless_macro_arg = (n); \
2864 YY_LESS_LINENO(yyless_macro_arg);\
2865 xbt_graph_parse_text[xbt_graph_parse_leng] = (yy_hold_char); \
2866 (yy_c_buf_p) = xbt_graph_parse_text + yyless_macro_arg; \
2867 (yy_hold_char) = *(yy_c_buf_p); \
2868 *(yy_c_buf_p) = '\0'; \
2869 xbt_graph_parse_leng = yyless_macro_arg; \
2873 /* Accessor methods (get/set functions) to struct members. */
2875 /** Get the current line number.
2878 int xbt_graph_parse_get_lineno (void)
2881 return xbt_graph_parse_lineno;
2884 /** Get the input stream.
2887 FILE *xbt_graph_parse_get_in (void)
2889 return xbt_graph_parse_in;
2892 /** Get the output stream.
2895 FILE *xbt_graph_parse_get_out (void)
2897 return xbt_graph_parse_out;
2900 /** Get the length of the current token.
2903 int xbt_graph_parse_get_leng (void)
2905 return xbt_graph_parse_leng;
2908 /** Get the current token.
2912 char *xbt_graph_parse_get_text (void)
2914 return xbt_graph_parse_text;
2917 /** Set the current line number.
2918 * @param line_number
2921 void xbt_graph_parse_set_lineno (int line_number )
2924 xbt_graph_parse_lineno = line_number;
2927 /** Set the input stream. This does not discard the current
2929 * @param in_str A readable stream.
2931 * @see xbt_graph_parse__switch_to_buffer
2933 void xbt_graph_parse_set_in (FILE * in_str )
2935 xbt_graph_parse_in = in_str ;
2938 void xbt_graph_parse_set_out (FILE * out_str )
2940 xbt_graph_parse_out = out_str ;
2943 int xbt_graph_parse_get_debug (void)
2945 return xbt_graph_parse__flex_debug;
2948 void xbt_graph_parse_set_debug (int bdebug )
2950 xbt_graph_parse__flex_debug = bdebug ;
2953 static int yy_init_globals (void)
2955 /* Initialization is the same as for the non-reentrant scanner.
2956 * This function is called from xbt_graph_parse_lex_destroy(), so don't allocate here.
2959 /* We do not touch xbt_graph_parse_lineno unless the option is enabled. */
2960 xbt_graph_parse_lineno = 1;
2962 (yy_buffer_stack) = 0;
2963 (yy_buffer_stack_top) = 0;
2964 (yy_buffer_stack_max) = 0;
2965 (yy_c_buf_p) = (char *) 0;
2969 (yy_start_stack_ptr) = 0;
2970 (yy_start_stack_depth) = 0;
2971 (yy_start_stack) = NULL;
2973 /* Defined in main.c */
2975 xbt_graph_parse_in = stdin;
2976 xbt_graph_parse_out = stdout;
2978 xbt_graph_parse_in = (FILE *) 0;
2979 xbt_graph_parse_out = (FILE *) 0;
2982 /* For future reference: Set errno on error, since we are called by
2983 * xbt_graph_parse_lex_init()
2988 /* xbt_graph_parse_lex_destroy is for both reentrant and non-reentrant scanners. */
2989 int xbt_graph_parse_lex_destroy (void)
2992 /* Pop the buffer stack, destroying each element. */
2993 while(YY_CURRENT_BUFFER){
2994 xbt_graph_parse__delete_buffer(YY_CURRENT_BUFFER );
2995 YY_CURRENT_BUFFER_LVALUE = NULL;
2996 xbt_graph_parse_pop_buffer_state();
2999 /* Destroy the stack itself. */
3000 xbt_graph_parse_free((yy_buffer_stack) );
3001 (yy_buffer_stack) = NULL;
3003 /* Destroy the start condition stack. */
3004 xbt_graph_parse_free((yy_start_stack) );
3005 (yy_start_stack) = NULL;
3007 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3008 * xbt_graph_parse_lex() is called, initialization will occur. */
3015 * Internal utility routines.
3019 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
3022 for ( i = 0; i < n; ++i )
3027 #ifdef YY_NEED_STRLEN
3028 static int yy_flex_strlen (yyconst char * s )
3031 for ( n = 0; s[n]; ++n )
3038 void *xbt_graph_parse_alloc (yy_size_t size )
3040 return (void *) malloc( size );
3043 void *xbt_graph_parse_realloc (void * ptr, yy_size_t size )
3045 /* The cast to (char *) in the following accommodates both
3046 * implementations that use char* generic pointers, and those
3047 * that use void* generic pointers. It works with the latter
3048 * because both ANSI C and C++ allow castless assignment from
3049 * any pointer type to void*, and deal with argument conversions
3050 * as though doing an assignment.
3052 return (void *) realloc( (char *) ptr, size );
3055 void xbt_graph_parse_free (void * ptr )
3057 free( (char *) ptr ); /* see xbt_graph_parse_realloc() for (char *) cast */
3060 #define YYTABLES_NAME "yytables"
3062 #line 500 "xbt/graphxml.l"
3066 /* Element context stack lookup. */
3067 int graphxml_element_context(int i)
3069 return (0<i && i<yy_start_stack_depth
3070 ? yy_start_stack[yy_start_stack_ptr - i]
3075 void print_yy_stack(char* fmt, ...)
3077 int i = 0; va_list ap; va_start(ap, fmt);
3078 vfprintf(stderr, fmt, ap);
3079 for (i=1; i<yy_start_stack_ptr; i++)
3080 fprintf(stderr, "%s/", graphxml_statenames[yy_start_stack[i] ]);
3081 fprintf(stderr,"%s\n", graphxml_statenames[YY_START]);
3085 static void debug_enter(int state, const char* statename) {
3086 yy_push_state(state);
3087 if (xbt_graph_parse__flex_debug) print_yy_stack("--ENTER(%s) : ",statename);
3090 static void debug_leave(void) {
3091 if (xbt_graph_parse__flex_debug) print_yy_stack("--LEAVE : ");
3095 static void debug_set(int state, const char* statename) {
3097 if (xbt_graph_parse__flex_debug) print_yy_stack("--SET(%s) : ",statename);
3101 enum {flexml_max_err_msg_size = 512};
3103 static char flexml_err_msg[flexml_max_err_msg_size];
3104 const char * graphxml_parse_err_msg()
3106 return flexml_err_msg;
3109 static void reset_graphxml_parse_err_msg()
3111 flexml_err_msg[0] = '\0';
3115 static void cleanup(void)
3117 if (graphxml_statenames) {
3118 free(graphxml_statenames);
3119 graphxml_statenames = NULL;
3124 static int fail(const char* fmt, ...)
3126 int chars_left, used;
3127 va_list ap; va_start(ap, fmt);
3128 #ifdef FLEXML_yylineno
3129 used = sprintf(flexml_err_msg,
3130 "Invalid XML (XML input line %d, state %d): ",
3131 xbt_graph_parse_lineno, YY_START);
3133 used = sprintf(flexml_err_msg,
3134 "Invalid XML (state %d): ",
3137 chars_left = flexml_max_err_msg_size - used - 1;
3138 vsnprintf(flexml_err_msg + used, chars_left, fmt, ap);
3141 #ifndef FLEXML_quiet_parser
3142 /* print directly to sdterr */
3143 fprintf(stderr, "%s\n", flexml_err_msg);
3144 flexml_err_msg[0] = '\0';