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 31
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 defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
36 typedef int8_t flex_int8_t;
37 typedef uint8_t flex_uint8_t;
38 typedef int16_t flex_int16_t;
39 typedef uint16_t flex_uint16_t;
40 typedef int32_t flex_int32_t;
41 typedef uint32_t flex_uint32_t;
43 typedef signed char flex_int8_t;
44 typedef short int flex_int16_t;
45 typedef int flex_int32_t;
46 typedef unsigned char flex_uint8_t;
47 typedef unsigned short int flex_uint16_t;
48 typedef unsigned int flex_uint32_t;
51 /* Limits of integral types. */
53 #define INT8_MIN (-128)
56 #define INT16_MIN (-32767-1)
59 #define INT32_MIN (-2147483647-1)
62 #define INT8_MAX (127)
65 #define INT16_MAX (32767)
68 #define INT32_MAX (2147483647)
71 #define UINT8_MAX (255U)
74 #define UINT16_MAX (65535U)
77 #define UINT32_MAX (4294967295U)
80 #endif /* ! FLEXINT_H */
84 /* The "const" storage-class-modifier is valid. */
87 #else /* ! __cplusplus */
94 #endif /* ! __cplusplus */
102 /* Returned upon end-of-file. */
105 /* Promotes a possibly negative, possibly signed char to an unsigned
106 * integer for use as an array index. If the signed char is negative,
107 * we want to instead treat it as an 8-bit unsigned char, hence the
110 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
112 /* Enter a start condition. This macro really ought to take a parameter,
113 * but we do it the disgusting crufty way forced on us by the ()-less
114 * definition of BEGIN.
116 #define BEGIN (yy_start) = 1 + 2 *
118 /* Translate the current start state into a value that can be later handed
119 * to BEGIN to return to the state. The YYSTATE alias is for lex
122 #define YY_START (((yy_start) - 1) / 2)
123 #define YYSTATE YY_START
125 /* Action number for EOF rule of a given start state. */
126 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
128 /* Special action meaning "start processing a new file". */
129 #define YY_NEW_FILE xbt_graph_parse_restart(xbt_graph_parse_in )
131 #define YY_END_OF_BUFFER_CHAR 0
133 /* Size of default input buffer. */
135 #define YY_BUF_SIZE 16384
138 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
139 #define YY_TYPEDEF_YY_BUFFER_STATE
140 typedef struct yy_buffer_state *YY_BUFFER_STATE;
143 extern int xbt_graph_parse_leng;
145 extern FILE *xbt_graph_parse_in, *xbt_graph_parse_out;
147 #define EOB_ACT_CONTINUE_SCAN 0
148 #define EOB_ACT_END_OF_FILE 1
149 #define EOB_ACT_LAST_MATCH 2
151 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
152 * access to the local variable yy_act. Since yyless() is a macro, it would break
153 * existing scanners that call yyless() from OUTSIDE xbt_graph_parse_lex.
154 * One obvious solution it to make yy_act a global. I tried that, and saw
155 * a 5% performance hit in a non-xbt_graph_parse_lineno scanner, because yy_act is
156 * normally declared as a register variable-- so it is not worth it.
158 #define YY_LESS_LINENO(n) \
161 for ( yyl = n; yyl < xbt_graph_parse_leng; ++yyl )\
162 if ( xbt_graph_parse_text[yyl] == '\n' )\
163 --xbt_graph_parse_lineno;\
166 /* Return all but the first "n" matched characters back to the input stream. */
170 /* Undo effects of setting up xbt_graph_parse_text. */ \
171 int yyless_macro_arg = (n); \
172 YY_LESS_LINENO(yyless_macro_arg);\
173 *yy_cp = (yy_hold_char); \
174 YY_RESTORE_YY_MORE_OFFSET \
175 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
176 YY_DO_BEFORE_ACTION; /* set up xbt_graph_parse_text again */ \
180 #define unput(c) yyunput( c, (yytext_ptr) )
182 /* The following is because we cannot portably get our hands on size_t
183 * (without autoconf's help, which isn't available because we want
184 * flex-generated scanners to compile on their own).
187 #ifndef YY_TYPEDEF_YY_SIZE_T
188 #define YY_TYPEDEF_YY_SIZE_T
189 typedef unsigned int yy_size_t;
192 #ifndef YY_STRUCT_YY_BUFFER_STATE
193 #define YY_STRUCT_YY_BUFFER_STATE
194 struct yy_buffer_state
198 char *yy_ch_buf; /* input buffer */
199 char *yy_buf_pos; /* current position in input buffer */
201 /* Size of input buffer in bytes, not including room for EOB
204 yy_size_t yy_buf_size;
206 /* Number of characters read into yy_ch_buf, not including EOB
211 /* Whether we "own" the buffer - i.e., we know we created it,
212 * and can realloc() it to grow it, and should free() it to
215 int yy_is_our_buffer;
217 /* Whether this is an "interactive" input source; if so, and
218 * if we're using stdio for input, then we want to use getc()
219 * instead of fread(), to make sure we stop fetching input after
222 int yy_is_interactive;
224 /* Whether we're considered to be at the beginning of a line.
225 * If so, '^' rules will be active on the next match, otherwise
230 int yy_bs_lineno; /**< The line count. */
231 int yy_bs_column; /**< The column count. */
233 /* Whether to try to fill the input buffer when we reach the
238 int yy_buffer_status;
240 #define YY_BUFFER_NEW 0
241 #define YY_BUFFER_NORMAL 1
242 /* When an EOF's been seen but there's still some text to process
243 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
244 * shouldn't try reading from the input source any more. We might
245 * still have a bunch of tokens to match, though, because of
246 * possible backing-up.
248 * When we actually see the EOF, we change the status to "new"
249 * (via xbt_graph_parse_restart()), so that the user can continue scanning by
250 * just pointing xbt_graph_parse_in at a new input file.
252 #define YY_BUFFER_EOF_PENDING 2
255 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
257 /* Stack of input buffers. */
258 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
259 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
260 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
262 /* We provide macros for accessing buffer states in case in the
263 * future we want to put the buffer states in a more general
266 * Returns the top of the stack, or NULL.
268 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
269 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
272 /* Same as previous macro, but useful when we know that the buffer stack is not
273 * NULL or when we need an lvalue. For internal use only.
275 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
277 /* yy_hold_char holds the character lost when xbt_graph_parse_text is formed. */
278 static char yy_hold_char;
279 static int yy_n_chars; /* number of characters read into yy_ch_buf */
280 int xbt_graph_parse_leng;
282 /* Points to current character in buffer. */
283 static char *yy_c_buf_p = (char *) 0;
284 static int yy_init = 1; /* whether we need to initialize */
285 static int yy_start = 0; /* start state number */
287 /* Flag which is used to allow xbt_graph_parse_wrap()'s to do buffer switches
288 * instead of setting up a fresh xbt_graph_parse_in. A bit of a hack ...
290 static int yy_did_buffer_switch_on_eof;
292 void xbt_graph_parse_restart (FILE *input_file );
293 void xbt_graph_parse__switch_to_buffer (YY_BUFFER_STATE new_buffer );
294 YY_BUFFER_STATE xbt_graph_parse__create_buffer (FILE *file,int size );
295 void xbt_graph_parse__delete_buffer (YY_BUFFER_STATE b );
296 void xbt_graph_parse__flush_buffer (YY_BUFFER_STATE b );
297 void xbt_graph_parse_push_buffer_state (YY_BUFFER_STATE new_buffer );
298 void xbt_graph_parse_pop_buffer_state (void );
300 static void xbt_graph_parse_ensure_buffer_stack (void );
301 static void xbt_graph_parse__load_buffer_state (void );
302 static void xbt_graph_parse__init_buffer (YY_BUFFER_STATE b,FILE *file );
304 #define YY_FLUSH_BUFFER xbt_graph_parse__flush_buffer(YY_CURRENT_BUFFER )
306 YY_BUFFER_STATE xbt_graph_parse__scan_buffer (char *base,yy_size_t size );
307 YY_BUFFER_STATE xbt_graph_parse__scan_string (yyconst char *yy_str );
308 YY_BUFFER_STATE xbt_graph_parse__scan_bytes (yyconst char *bytes,int len );
310 void *xbt_graph_parse_alloc (yy_size_t );
311 void *xbt_graph_parse_realloc (void *,yy_size_t );
312 void xbt_graph_parse_free (void * );
314 #define yy_new_buffer xbt_graph_parse__create_buffer
316 #define yy_set_interactive(is_interactive) \
318 if ( ! YY_CURRENT_BUFFER ){ \
319 xbt_graph_parse_ensure_buffer_stack (); \
320 YY_CURRENT_BUFFER_LVALUE = \
321 xbt_graph_parse__create_buffer(xbt_graph_parse_in,YY_BUF_SIZE ); \
323 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
326 #define yy_set_bol(at_bol) \
328 if ( ! YY_CURRENT_BUFFER ){\
329 xbt_graph_parse_ensure_buffer_stack (); \
330 YY_CURRENT_BUFFER_LVALUE = \
331 xbt_graph_parse__create_buffer(xbt_graph_parse_in,YY_BUF_SIZE ); \
333 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
336 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
338 /* Begin user sect3 */
340 #define xbt_graph_parse_wrap(n) 1
341 #define YY_SKIP_YYWRAP
343 typedef unsigned char YY_CHAR;
345 FILE *xbt_graph_parse_in = (FILE *) 0, *xbt_graph_parse_out = (FILE *) 0;
347 typedef int yy_state_type;
349 extern int xbt_graph_parse_lineno;
351 int xbt_graph_parse_lineno = 1;
353 extern char *xbt_graph_parse_text;
354 #define yytext_ptr xbt_graph_parse_text
356 static yy_state_type yy_get_previous_state (void );
357 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
358 static int yy_get_next_buffer (void );
359 static void yy_fatal_error (yyconst char msg[] );
361 /* Done after the current pattern has been matched and before the
362 * corresponding action - sets up xbt_graph_parse_text.
364 #define YY_DO_BEFORE_ACTION \
365 (yytext_ptr) = yy_bp; \
366 xbt_graph_parse_leng = (size_t) (yy_cp - yy_bp); \
367 (yy_hold_char) = *yy_cp; \
369 (yy_c_buf_p) = yy_cp;
371 #define YY_NUM_RULES 79
372 #define YY_END_OF_BUFFER 80
373 /* This struct is not used in this scanner,
374 but its presence is necessary. */
377 flex_int32_t yy_verify;
380 static yyconst flex_int16_t yy_accept[497] =
382 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
383 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
384 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
385 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
386 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
387 80, 78, 17, 10, 10, 17, 17, 58, 10, 58,
388 5, 6, 5, 8, 9, 8, 74, 66, 67, 75,
389 72, 75, 73, 77, 66, 67, 77, 78, 21, 10,
390 21, 21, 21, 19, 25, 10, 25, 25, 78, 78,
391 25, 33, 10, 33, 33, 33, 31, 33, 33, 37,
393 10, 37, 53, 10, 53, 53, 53, 51, 53, 53,
394 53, 53, 53, 57, 10, 57, 75, 74, 10, 0,
395 2, 2, 0, 4, 7, 69, 68, 0, 0, 0,
396 0, 0, 0, 0, 20, 22, 0, 0, 0, 32,
397 34, 34, 34, 0, 52, 54, 54, 54, 54, 54,
398 54, 0, 0, 0, 0, 0, 0, 0, 3, 0,
399 0, 0, 0, 0, 0, 0, 76, 0, 0, 0,
400 0, 0, 34, 34, 0, 0, 54, 54, 54, 54,
401 54, 0, 0, 0, 71, 0, 16, 1, 0, 0,
402 64, 0, 0, 0, 61, 60, 0, 0, 0, 0,
404 24, 0, 0, 0, 34, 34, 0, 0, 36, 0,
405 54, 54, 54, 54, 54, 0, 0, 56, 0, 0,
406 0, 0, 65, 59, 0, 0, 0, 0, 38, 26,
407 34, 0, 0, 0, 54, 54, 0, 0, 54, 54,
408 0, 0, 0, 0, 0, 12, 0, 62, 63, 18,
409 0, 38, 26, 0, 0, 0, 30, 29, 0, 54,
410 0, 0, 0, 42, 41, 54, 54, 0, 0, 0,
411 0, 0, 11, 18, 0, 0, 28, 27, 0, 35,
412 54, 0, 40, 39, 0, 0, 0, 0, 0, 55,
413 0, 0, 0, 0, 0, 23, 54, 0, 44, 43,
415 0, 46, 45, 0, 0, 0, 0, 54, 70, 0,
416 0, 0, 54, 0, 0, 0, 0, 0, 0, 0,
417 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
418 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
419 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
420 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
421 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
422 0, 0, 0, 0, 0, 0, 12, 0, 12, 0,
423 0, 48, 0, 47, 0, 0, 0, 0, 0, 0,
424 0, 50, 49, 0, 0, 0, 0, 0, 0, 0,
426 11, 0, 0, 0, 0, 0, 0, 0, 0, 0,
427 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
428 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
429 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
430 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
431 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
432 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
433 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
434 0, 0, 0, 0, 0, 0, 0, 0, 0, 13,
439 static yyconst flex_int32_t yy_ec[256] =
441 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
442 1, 2, 4, 1, 1, 1, 1, 1, 1, 1,
443 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
444 1, 2, 5, 6, 7, 1, 1, 8, 9, 1,
445 1, 1, 1, 1, 10, 11, 12, 13, 13, 13,
446 13, 13, 13, 13, 13, 13, 13, 14, 15, 16,
447 17, 18, 19, 1, 20, 21, 22, 23, 24, 21,
448 14, 14, 14, 14, 14, 14, 25, 14, 26, 27,
449 14, 14, 28, 29, 14, 14, 14, 14, 30, 14,
450 31, 1, 32, 1, 14, 1, 33, 34, 35, 36,
452 37, 38, 39, 40, 41, 14, 14, 42, 43, 44,
453 45, 46, 47, 48, 49, 50, 51, 52, 14, 53,
454 14, 14, 1, 1, 1, 1, 1, 1, 1, 1,
455 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
456 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
457 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
458 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
459 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
460 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
461 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
463 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
464 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
465 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
466 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
467 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
471 static yyconst flex_int32_t yy_meta[54] =
473 1, 2, 2, 2, 1, 1, 1, 1, 1, 3,
474 3, 1, 4, 5, 1, 1, 1, 6, 1, 7,
475 7, 7, 7, 7, 5, 5, 5, 5, 5, 5,
476 1, 1, 7, 7, 7, 7, 7, 7, 5, 5,
477 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
481 static yyconst flex_int16_t yy_base[527] =
483 0, 0, 0, 3, 6, 9, 24, 27, 11, 14,
484 15, 17, 29, 38, 45, 52, 59, 61, 67, 70,
485 93, 125, 73, 76, 143, 146, 149, 164, 167, 170,
486 173, 188, 191, 194, 197, 212, 215, 218, 234, 0,
487 286, 289, 292, 295, 311, 0, 363, 366, 368, 370,
488 1424, 1425, 1425, 111, 114, 47, 62, 1425, 117, 159,
489 1425, 1425, 1413, 1425, 1425, 1404, 1425, 1417, 1417, 368,
490 1425, 1425, 1425, 1425, 1415, 1415, 1385, 372, 1425, 221,
491 1398, 0, 183, 1425, 1425, 385, 380, 385, 375, 376,
492 393, 1425, 423, 1397, 0, 207, 1425, 1381, 1380, 1425,
494 426, 404, 1425, 429, 1394, 0, 401, 1425, 1362, 1377,
495 1376, 1363, 1374, 1425, 432, 432, 1401, 1373, 436, 34,
496 1351, 1425, 1393, 1384, 1425, 1425, 1425, 37, 39, 1351,
497 1350, 1348, 1380, 1349, 1425, 0, 1357, 1359, 1349, 1425,
498 0, 1359, 1349, 1347, 1425, 0, 1367, 1355, 1345, 1336,
499 1338, 1348, 1353, 1365, 1364, 1371, 137, 1337, 1425, 145,
500 0, 1333, 1333, 1362, 1361, 1330, 1425, 1341, 439, 443,
501 1266, 1268, 1257, 1254, 446, 450, 1247, 1248, 1241, 1225,
502 1229, 456, 463, 1164, 1425, 1167, 1425, 1425, 17, 1142,
503 1425, 1168, 1167, 1132, 1425, 1425, 1130, 1133, 467, 474,
505 1425, 480, 1141, 1140, 1134, 484, 500, 503, 1425, 506,
506 1126, 1127, 512, 1133, 1129, 523, 528, 1425, 531, 1142,
507 385, 534, 1425, 1425, 1148, 1147, 1117, 541, 552, 558,
508 561, 564, 570, 580, 1109, 586, 589, 593, 1108, 1090,
509 605, 1112, 378, 1108, 608, 1425, 1106, 1425, 1425, 611,
510 616, 625, 628, 633, 637, 645, 1425, 1425, 655, 1084,
511 659, 662, 675, 1425, 1425, 683, 686, 689, 1033, 282,
512 143, 70, 1425, 692, 695, 702, 1425, 1425, 712, 1425,
513 954, 715, 1425, 1425, 723, 729, 739, 742, 750, 1425,
514 978, 161, 104, 136, 755, 1425, 951, 758, 1425, 1425,
516 768, 1425, 1425, 953, 776, 163, 444, 892, 1425, 779,
517 191, 164, 782, 193, 185, 445, 438, 455, 785, 789,
518 457, 479, 504, 188, 476, 801, 473, 501, 510, 41,
519 532, 562, 809, 843, 827, 839, 808, 817, 576, 826,
520 829, 834, 839, 780, 763, 724, 712, 851, 856, 859,
521 863, 880, 888, 906, 938, 626, 587, 556, 520, 603,
522 898, 637, 956, 664, 292, 974, 1006, 482, 511, 435,
523 446, 365, 692, 530, 731, 285, 415, 471, 409, 901,
524 301, 1425, 297, 1425, 557, 684, 651, 224, 104, 75,
525 930, 1425, 1425, 553, 654, 620, 5, 711, 710, 751,
527 1425, 969, 783, 998, 1024, 1032, 1037, 586, 635, 1045,
528 757, 831, 604, 691, 832, 846, 702, 791, 567, 782,
529 881, 913, 807, 855, 788, 850, 860, 918, 917, 948,
530 683, 877, 950, 985, 909, 912, 737, 946, 977, 979,
531 967, 1011, 1014, 1026, 1027, 1034, 1035, 1038, 1040, 1041,
532 1042, 1043, 1047, 1048, 806, 1056, 1050, 1052, 1061, 1066,
533 729, 1055, 1077, 1082, 1078, 1079, 1053, 1057, 1080, 1081,
534 1058, 1083, 1084, 1086, 1087, 1088, 1091, 1092, 1105, 1103,
535 1095, 1100, 1123, 1116, 1140, 1129, 1121, 1146, 1149, 1425,
536 1152, 1157, 1425, 1169, 1425, 1425, 1187, 1194, 1201, 1208,
538 1215, 1222, 1229, 1236, 1243, 1250, 1257, 1262, 1267, 1272,
539 1279, 1282, 1285, 1288, 1295, 1299, 1305, 1311, 1317, 1324,
540 1331, 1338, 1345, 1352, 1359, 1366
543 static yyconst flex_int16_t yy_def[527] =
545 497, 497, 498, 498, 498, 498, 499, 499, 500, 500,
546 501, 501, 502, 502, 502, 502, 503, 503, 497, 497,
547 504, 504, 505, 505, 505, 505, 497, 497, 505, 505,
548 497, 497, 505, 505, 505, 505, 497, 497, 496, 39,
549 506, 506, 497, 497, 496, 45, 507, 507, 502, 502,
550 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
551 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
552 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
553 496, 508, 496, 496, 496, 496, 496, 496, 496, 496,
554 496, 496, 496, 496, 509, 496, 496, 509, 509, 496,
556 496, 496, 496, 496, 496, 510, 496, 496, 510, 510,
557 510, 510, 510, 496, 496, 496, 496, 496, 496, 511,
558 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
559 496, 496, 496, 496, 496, 508, 512, 496, 496, 496,
560 509, 509, 509, 513, 496, 510, 510, 510, 510, 510,
561 510, 514, 496, 496, 515, 496, 515, 496, 496, 496,
562 516, 496, 496, 496, 496, 496, 496, 496, 517, 517,
563 496, 496, 509, 509, 518, 518, 510, 510, 510, 510,
564 510, 519, 519, 496, 496, 515, 496, 496, 515, 496,
565 496, 516, 496, 496, 496, 496, 496, 496, 496, 517,
567 496, 517, 496, 496, 509, 509, 496, 518, 496, 518,
568 510, 510, 510, 510, 510, 496, 519, 496, 519, 496,
569 515, 520, 496, 496, 496, 496, 496, 517, 496, 496,
570 509, 496, 496, 518, 510, 510, 496, 496, 510, 510,
571 519, 496, 515, 520, 520, 496, 520, 496, 496, 496,
572 517, 496, 496, 496, 496, 496, 496, 496, 518, 510,
573 496, 496, 496, 496, 496, 510, 510, 519, 496, 515,
574 520, 520, 496, 496, 517, 496, 496, 496, 496, 496,
575 510, 496, 496, 496, 496, 496, 496, 496, 496, 496,
576 496, 515, 520, 520, 496, 496, 510, 496, 496, 496,
578 496, 496, 496, 496, 515, 520, 520, 510, 496, 515,
579 520, 520, 510, 515, 515, 515, 520, 520, 496, 496,
580 515, 515, 515, 520, 520, 496, 496, 496, 515, 515,
581 515, 520, 520, 496, 496, 496, 496, 515, 515, 515,
582 520, 520, 520, 496, 496, 496, 496, 515, 515, 515,
583 520, 520, 520, 521, 522, 496, 496, 496, 496, 515,
584 515, 515, 520, 523, 524, 521, 522, 496, 496, 496,
585 496, 515, 515, 515, 523, 520, 525, 524, 526, 520,
586 496, 496, 496, 496, 515, 515, 515, 525, 496, 526,
587 520, 496, 496, 515, 515, 515, 496, 515, 515, 515,
589 496, 515, 515, 515, 515, 515, 515, 515, 515, 515,
590 515, 515, 515, 515, 515, 515, 515, 515, 515, 515,
591 515, 515, 515, 515, 515, 515, 515, 515, 515, 515,
592 515, 515, 515, 515, 515, 515, 515, 515, 515, 515,
593 515, 515, 515, 515, 515, 515, 515, 515, 515, 515,
594 515, 515, 515, 515, 515, 515, 515, 515, 515, 515,
595 515, 515, 515, 515, 515, 515, 515, 515, 515, 515,
596 515, 515, 515, 515, 515, 515, 515, 515, 515, 515,
597 515, 515, 515, 515, 515, 515, 515, 515, 515, 496,
598 515, 515, 496, 515, 496, 0, 496, 496, 496, 496,
600 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
601 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
602 496, 496, 496, 496, 496, 496
605 static yyconst flex_int16_t yy_nxt[1479] =
607 496, 54, 55, 54, 54, 55, 54, 54, 55, 54,
608 54, 55, 54, 62, 496, 56, 62, 65, 56, 65,
609 63, 57, 401, 63, 57, 59, 55, 59, 59, 55,
610 59, 68, 69, 66, 187, 66, 70, 71, 221, 60,
611 68, 69, 60, 156, 72, 70, 71, 68, 69, 160,
612 73, 120, 70, 72, 68, 69, 157, 73, 187, 70,
613 72, 75, 76, 75, 76, 121, 120, 72, 55, 55,
614 55, 55, 55, 55, 86, 55, 86, 86, 55, 86,
615 122, 162, 78, 389, 163, 78, 339, 246, 87, 161,
616 77, 87, 77, 79, 80, 55, 80, 79, 79, 79,
618 79, 79, 79, 79, 81, 79, 294, 79, 83, 79,
619 84, 79, 119, 119, 119, 119, 119, 119, 119, 119,
620 119, 246, 397, 79, 79, 79, 80, 55, 80, 79,
621 79, 79, 79, 79, 79, 79, 81, 79, 306, 79,
622 83, 79, 84, 79, 86, 55, 86, 86, 55, 86,
623 55, 55, 55, 246, 187, 79, 79, 160, 88, 191,
624 246, 88, 189, 123, 89, 55, 55, 55, 86, 55,
625 86, 86, 55, 86, 55, 55, 55, 122, 187, 89,
626 246, 246, 87, 307, 305, 87, 293, 123, 90, 55,
627 55, 55, 86, 55, 86, 86, 55, 86, 86, 55,
629 86, 122, 187, 90, 318, 246, 88, 311, 246, 88,
630 187, 123, 91, 86, 55, 86, 55, 55, 55, 55,
631 55, 55, 119, 119, 119, 122, 317, 91, 321, 389,
632 89, 332, 322, 89, 92, 93, 55, 93, 92, 92,
633 92, 92, 92, 92, 92, 94, 92, 95, 92, 96,
634 92, 97, 92, 95, 95, 95, 95, 95, 95, 95,
635 95, 95, 95, 95, 92, 92, 95, 95, 95, 95,
636 95, 95, 95, 95, 95, 98, 95, 99, 95, 95,
637 95, 95, 95, 95, 95, 95, 95, 101, 55, 101,
638 101, 55, 101, 55, 55, 55, 55, 55, 55, 187,
640 376, 102, 246, 247, 102, 393, 392, 90, 292, 379,
641 90, 103, 104, 55, 104, 103, 103, 103, 103, 103,
642 103, 103, 105, 103, 106, 103, 107, 103, 108, 103,
643 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
644 106, 103, 103, 106, 106, 106, 106, 106, 106, 106,
645 106, 109, 110, 106, 111, 106, 106, 106, 106, 112,
646 113, 106, 106, 106, 115, 55, 115, 115, 55, 115,
647 68, 69, 68, 69, 128, 70, 123, 70, 116, 123,
648 123, 116, 187, 117, 123, 117, 119, 119, 119, 123,
649 122, 137, 385, 122, 122, 187, 137, 123, 122, 118,
651 129, 118, 187, 122, 137, 123, 130, 270, 123, 131,
652 134, 122, 138, 243, 132, 144, 138, 389, 139, 122,
653 389, 138, 122, 139, 119, 119, 119, 119, 119, 119,
654 119, 119, 119, 119, 119, 119, 123, 119, 119, 119,
655 199, 199, 199, 152, 199, 199, 199, 207, 207, 207,
656 122, 207, 207, 207, 384, 246, 201, 216, 216, 216,
657 201, 246, 187, 209, 216, 216, 216, 209, 199, 199,
658 199, 383, 246, 218, 187, 199, 199, 199, 324, 376,
659 218, 199, 199, 199, 201, 232, 232, 232, 379, 323,
660 202, 201, 312, 246, 210, 329, 187, 201, 219, 325,
662 233, 207, 207, 207, 207, 207, 207, 207, 207, 207,
663 334, 330, 228, 237, 237, 237, 382, 209, 381, 333,
664 209, 187, 335, 209, 216, 216, 216, 187, 238, 216,
665 216, 216, 216, 216, 216, 245, 245, 245, 336, 331,
666 218, 234, 199, 199, 199, 218, 338, 187, 218, 187,
667 337, 246, 247, 252, 252, 252, 371, 387, 201, 253,
668 253, 253, 254, 254, 254, 232, 232, 232, 340, 241,
669 187, 256, 256, 256, 187, 257, 398, 255, 258, 246,
670 233, 207, 207, 207, 187, 394, 251, 261, 261, 261,
671 237, 237, 237, 187, 263, 263, 263, 209, 264, 425,
673 341, 265, 262, 187, 370, 238, 216, 216, 216, 245,
674 245, 245, 274, 274, 274, 349, 259, 199, 199, 199,
675 187, 187, 218, 369, 413, 246, 252, 252, 252, 253,
676 253, 253, 372, 201, 254, 254, 254, 187, 276, 276,
677 276, 268, 277, 400, 271, 278, 256, 256, 256, 255,
678 257, 419, 187, 258, 187, 275, 279, 279, 279, 272,
679 261, 261, 261, 282, 282, 282, 374, 283, 187, 376,
680 284, 187, 280, 414, 368, 262, 263, 263, 263, 396,
681 264, 377, 399, 265, 285, 285, 285, 287, 287, 287,
682 289, 289, 289, 274, 274, 274, 295, 295, 295, 286,
684 187, 187, 288, 276, 276, 276, 290, 277, 187, 187,
685 278, 395, 296, 279, 279, 279, 282, 282, 282, 187,
686 283, 386, 437, 284, 285, 285, 285, 187, 187, 280,
687 298, 298, 298, 403, 299, 402, 376, 300, 420, 286,
688 287, 287, 287, 301, 301, 301, 187, 302, 377, 423,
689 303, 289, 289, 289, 187, 288, 295, 295, 295, 298,
690 298, 298, 359, 299, 467, 358, 300, 290, 187, 301,
691 301, 301, 296, 302, 187, 404, 303, 310, 310, 310,
692 310, 310, 310, 319, 319, 319, 319, 319, 319, 443,
693 326, 326, 326, 187, 327, 417, 187, 328, 320, 187,
695 187, 320, 326, 326, 326, 187, 327, 406, 187, 328,
696 342, 342, 342, 357, 426, 314, 461, 315, 348, 348,
697 348, 356, 316, 187, 187, 343, 246, 350, 350, 350,
698 351, 351, 351, 431, 187, 342, 342, 342, 424, 429,
699 353, 353, 353, 187, 354, 352, 246, 355, 187, 187,
700 343, 246, 348, 348, 348, 347, 246, 361, 361, 361,
701 350, 350, 350, 187, 351, 351, 351, 187, 187, 418,
702 421, 346, 187, 187, 345, 344, 187, 187, 360, 352,
703 246, 363, 363, 363, 422, 364, 362, 430, 365, 353,
704 353, 353, 433, 354, 187, 432, 355, 246, 187, 361,
706 361, 361, 391, 391, 391, 246, 244, 244, 244, 244,
707 244, 244, 244, 244, 244, 187, 438, 244, 246, 247,
708 244, 244, 244, 246, 244, 373, 187, 313, 427, 187,
709 187, 391, 391, 391, 187, 187, 244, 244, 244, 244,
710 244, 244, 244, 244, 244, 244, 244, 246, 441, 244,
711 434, 442, 244, 244, 244, 246, 244, 363, 363, 363,
712 428, 364, 435, 187, 365, 187, 271, 187, 244, 244,
713 405, 405, 405, 246, 244, 244, 244, 244, 244, 380,
714 244, 244, 244, 309, 187, 244, 187, 308, 244, 244,
715 244, 246, 244, 436, 187, 439, 187, 304, 444, 407,
717 407, 407, 187, 297, 244, 244, 244, 244, 244, 244,
718 244, 244, 244, 244, 380, 187, 445, 244, 446, 447,
719 244, 244, 244, 246, 244, 405, 405, 405, 187, 408,
720 440, 187, 409, 410, 410, 410, 244, 244, 407, 407,
721 407, 187, 411, 187, 187, 412, 410, 410, 410, 187,
722 415, 187, 187, 416, 187, 187, 449, 187, 187, 187,
723 187, 291, 187, 448, 187, 187, 462, 187, 450, 187,
724 187, 465, 187, 187, 187, 187, 466, 453, 187, 451,
725 454, 455, 456, 187, 457, 458, 452, 469, 459, 460,
726 468, 463, 470, 464, 187, 187, 187, 187, 187, 187,
728 187, 187, 473, 187, 187, 187, 474, 477, 187, 187,
729 485, 485, 187, 471, 472, 475, 476, 187, 281, 479,
730 187, 480, 187, 273, 488, 246, 483, 484, 488, 491,
731 486, 269, 478, 187, 491, 487, 481, 482, 187, 267,
732 187, 489, 489, 489, 266, 260, 187, 492, 492, 492,
733 489, 489, 489, 494, 494, 494, 250, 490, 492, 492,
734 492, 249, 248, 493, 242, 240, 490, 239, 236, 495,
735 494, 494, 494, 235, 493, 231, 230, 229, 227, 226,
736 225, 224, 223, 222, 187, 220, 495, 52, 52, 52,
737 52, 52, 52, 52, 53, 53, 53, 53, 53, 53,
739 53, 58, 58, 58, 58, 58, 58, 58, 61, 61,
740 61, 61, 61, 61, 61, 64, 64, 64, 64, 64,
741 64, 64, 67, 67, 67, 67, 67, 67, 67, 74,
742 74, 74, 74, 74, 74, 74, 82, 82, 82, 82,
743 82, 82, 82, 85, 85, 85, 85, 85, 85, 85,
744 100, 100, 100, 100, 100, 100, 100, 114, 114, 114,
745 114, 114, 114, 114, 136, 136, 136, 215, 136, 141,
746 141, 141, 214, 141, 146, 146, 146, 213, 146, 155,
747 155, 155, 155, 155, 212, 155, 169, 211, 169, 175,
748 206, 175, 182, 205, 182, 186, 186, 186, 186, 186,
750 186, 186, 192, 204, 203, 192, 200, 200, 200, 200,
751 200, 200, 208, 208, 208, 208, 208, 208, 217, 217,
752 217, 217, 217, 217, 244, 244, 244, 244, 244, 244,
753 244, 366, 366, 366, 366, 366, 366, 366, 367, 367,
754 367, 367, 367, 367, 367, 375, 375, 375, 375, 375,
755 375, 375, 378, 378, 378, 378, 378, 378, 378, 388,
756 388, 388, 388, 388, 388, 388, 390, 390, 390, 390,
757 390, 390, 390, 198, 197, 196, 195, 194, 193, 190,
758 188, 187, 185, 184, 183, 181, 180, 179, 178, 177,
759 176, 174, 173, 172, 171, 170, 168, 167, 166, 165,
761 164, 159, 156, 158, 154, 153, 151, 150, 149, 148,
762 147, 145, 143, 142, 140, 135, 133, 127, 126, 127,
763 126, 125, 124, 496, 51, 496, 496, 496, 496, 496,
764 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
765 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
766 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
767 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
768 496, 496, 496, 496, 496, 496, 496, 496
771 static yyconst flex_int16_t yy_chk[1479] =
773 0, 3, 3, 3, 4, 4, 4, 5, 5, 5,
774 6, 6, 6, 9, 0, 3, 10, 11, 4, 12,
775 9, 5, 397, 10, 6, 7, 7, 7, 8, 8,
776 8, 13, 13, 11, 189, 12, 13, 13, 189, 7,
777 14, 14, 8, 120, 13, 14, 14, 15, 15, 128,
778 15, 56, 15, 14, 16, 16, 120, 16, 330, 16,
779 15, 17, 17, 18, 18, 56, 57, 16, 19, 19,
780 19, 20, 20, 20, 23, 23, 23, 24, 24, 24,
781 57, 129, 19, 390, 129, 20, 330, 272, 23, 128,
782 17, 24, 18, 21, 21, 21, 21, 21, 21, 21,
784 21, 21, 21, 21, 21, 21, 272, 21, 21, 21,
785 21, 21, 54, 54, 54, 55, 55, 55, 59, 59,
786 59, 293, 389, 21, 21, 22, 22, 22, 22, 22,
787 22, 22, 22, 22, 22, 22, 22, 22, 293, 22,
788 22, 22, 22, 22, 25, 25, 25, 26, 26, 26,
789 27, 27, 27, 294, 157, 22, 22, 160, 25, 160,
790 271, 26, 157, 60, 27, 28, 28, 28, 29, 29,
791 29, 30, 30, 30, 31, 31, 31, 60, 292, 28,
792 306, 312, 29, 294, 292, 30, 271, 83, 31, 32,
793 32, 32, 33, 33, 33, 34, 34, 34, 35, 35,
795 35, 83, 315, 32, 312, 324, 33, 306, 311, 34,
796 314, 96, 35, 36, 36, 36, 37, 37, 37, 38,
797 38, 38, 80, 80, 80, 96, 311, 36, 314, 388,
798 37, 324, 315, 38, 39, 39, 39, 39, 39, 39,
799 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
800 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
801 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
802 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
803 39, 39, 39, 39, 39, 39, 39, 41, 41, 41,
804 42, 42, 42, 43, 43, 43, 44, 44, 44, 270,
806 365, 41, 376, 376, 42, 383, 381, 43, 270, 365,
807 44, 45, 45, 45, 45, 45, 45, 45, 45, 45,
808 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
809 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
810 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
811 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
812 45, 45, 45, 45, 47, 47, 47, 48, 48, 48,
813 49, 49, 50, 50, 70, 49, 78, 50, 47, 89,
814 90, 48, 372, 49, 87, 50, 86, 86, 86, 88,
815 78, 87, 372, 89, 90, 243, 88, 91, 87, 49,
817 70, 50, 221, 88, 91, 107, 70, 243, 102, 70,
818 78, 91, 90, 221, 70, 102, 87, 379, 89, 107,
819 377, 88, 102, 87, 93, 93, 93, 101, 101, 101,
820 104, 104, 104, 115, 115, 115, 116, 119, 119, 119,
821 169, 169, 169, 116, 170, 170, 170, 175, 175, 175,
822 116, 176, 176, 176, 371, 317, 169, 182, 182, 182,
823 170, 307, 316, 175, 183, 183, 183, 176, 199, 199,
824 199, 370, 318, 182, 321, 200, 200, 200, 317, 378,
825 183, 202, 202, 202, 199, 206, 206, 206, 378, 316,
826 170, 200, 307, 325, 176, 321, 322, 202, 183, 318,
828 206, 207, 207, 207, 208, 208, 208, 210, 210, 210,
829 327, 322, 202, 213, 213, 213, 369, 207, 368, 325,
830 208, 323, 327, 210, 216, 216, 216, 329, 213, 217,
831 217, 217, 219, 219, 219, 222, 222, 222, 328, 323,
832 216, 210, 228, 228, 228, 217, 329, 374, 219, 331,
833 328, 222, 222, 229, 229, 229, 359, 374, 228, 230,
834 230, 230, 231, 231, 231, 232, 232, 232, 331, 219,
835 394, 233, 233, 233, 385, 233, 394, 231, 233, 332,
836 232, 234, 234, 234, 419, 385, 228, 236, 236, 236,
837 237, 237, 237, 339, 238, 238, 238, 234, 238, 419,
839 332, 238, 236, 408, 358, 237, 241, 241, 241, 245,
840 245, 245, 250, 250, 250, 339, 234, 251, 251, 251,
841 360, 413, 241, 357, 408, 245, 252, 252, 252, 253,
842 253, 253, 360, 251, 254, 254, 254, 396, 255, 255,
843 255, 241, 255, 396, 245, 255, 256, 256, 256, 254,
844 256, 413, 409, 256, 362, 251, 259, 259, 259, 245,
845 261, 261, 261, 262, 262, 262, 362, 262, 387, 364,
846 262, 395, 259, 409, 356, 261, 263, 263, 263, 387,
847 263, 364, 395, 263, 266, 266, 266, 267, 267, 267,
848 268, 268, 268, 274, 274, 274, 275, 275, 275, 266,
850 431, 386, 267, 276, 276, 276, 268, 276, 414, 373,
851 276, 386, 275, 279, 279, 279, 282, 282, 282, 417,
852 282, 373, 431, 282, 285, 285, 285, 399, 398, 279,
853 286, 286, 286, 399, 286, 398, 375, 286, 414, 285,
854 287, 287, 287, 288, 288, 288, 461, 288, 375, 417,
855 288, 289, 289, 289, 437, 287, 295, 295, 295, 298,
856 298, 298, 347, 298, 461, 346, 298, 289, 400, 301,
857 301, 301, 295, 301, 411, 400, 301, 305, 305, 305,
858 310, 310, 310, 313, 313, 313, 319, 319, 319, 437,
859 320, 320, 320, 305, 320, 411, 310, 320, 313, 420,
861 403, 319, 326, 326, 326, 425, 326, 403, 418, 326,
862 333, 333, 333, 345, 420, 310, 455, 310, 338, 338,
863 338, 344, 310, 455, 423, 333, 333, 340, 340, 340,
864 341, 341, 341, 425, 338, 342, 342, 342, 418, 423,
865 343, 343, 343, 340, 343, 341, 341, 343, 412, 415,
866 342, 342, 348, 348, 348, 337, 343, 349, 349, 349,
867 350, 350, 350, 416, 351, 351, 351, 426, 348, 412,
868 415, 336, 424, 349, 335, 334, 350, 427, 348, 351,
869 351, 352, 352, 352, 416, 352, 350, 424, 352, 353,
870 353, 353, 427, 353, 432, 426, 353, 352, 421, 361,
872 361, 361, 380, 380, 380, 353, 354, 354, 354, 354,
873 354, 354, 354, 354, 354, 361, 432, 354, 380, 380,
874 354, 354, 354, 354, 354, 361, 435, 308, 421, 436,
875 422, 391, 391, 391, 429, 428, 354, 354, 355, 355,
876 355, 355, 355, 355, 355, 355, 355, 391, 435, 355,
877 428, 436, 355, 355, 355, 355, 355, 363, 363, 363,
878 422, 363, 429, 438, 363, 430, 391, 433, 355, 355,
879 402, 402, 402, 363, 366, 366, 366, 366, 366, 366,
880 366, 366, 366, 304, 441, 366, 402, 297, 366, 366,
881 366, 366, 366, 430, 439, 433, 440, 291, 438, 404,
883 404, 404, 434, 281, 366, 366, 367, 367, 367, 367,
884 367, 367, 367, 367, 367, 404, 439, 367, 440, 441,
885 367, 367, 367, 367, 367, 405, 405, 405, 442, 405,
886 434, 443, 405, 406, 406, 406, 367, 367, 407, 407,
887 407, 405, 407, 444, 445, 407, 410, 410, 410, 406,
888 410, 446, 447, 410, 407, 448, 443, 449, 450, 451,
889 452, 269, 410, 442, 453, 454, 456, 457, 444, 458,
890 467, 459, 462, 456, 468, 471, 460, 447, 459, 445,
891 448, 449, 450, 460, 451, 452, 446, 463, 453, 454,
892 462, 457, 464, 458, 463, 465, 466, 469, 470, 464,
894 472, 473, 467, 474, 475, 476, 468, 471, 477, 478,
895 479, 480, 481, 465, 466, 469, 470, 482, 260, 473,
896 480, 474, 479, 247, 484, 244, 477, 478, 483, 487,
897 481, 242, 472, 484, 486, 482, 475, 476, 487, 240,
898 483, 485, 485, 485, 239, 235, 486, 488, 488, 488,
899 489, 489, 489, 491, 491, 491, 227, 485, 492, 492,
900 492, 226, 225, 488, 220, 215, 489, 214, 212, 491,
901 494, 494, 494, 211, 492, 205, 204, 203, 198, 197,
902 194, 193, 192, 190, 186, 184, 494, 497, 497, 497,
903 497, 497, 497, 497, 498, 498, 498, 498, 498, 498,
905 498, 499, 499, 499, 499, 499, 499, 499, 500, 500,
906 500, 500, 500, 500, 500, 501, 501, 501, 501, 501,
907 501, 501, 502, 502, 502, 502, 502, 502, 502, 503,
908 503, 503, 503, 503, 503, 503, 504, 504, 504, 504,
909 504, 504, 504, 505, 505, 505, 505, 505, 505, 505,
910 506, 506, 506, 506, 506, 506, 506, 507, 507, 507,
911 507, 507, 507, 507, 508, 508, 508, 181, 508, 509,
912 509, 509, 180, 509, 510, 510, 510, 179, 510, 511,
913 511, 511, 511, 511, 178, 511, 512, 177, 512, 513,
914 174, 513, 514, 173, 514, 515, 515, 515, 515, 515,
916 515, 515, 516, 172, 171, 516, 517, 517, 517, 517,
917 517, 517, 518, 518, 518, 518, 518, 518, 519, 519,
918 519, 519, 519, 519, 520, 520, 520, 520, 520, 520,
919 520, 521, 521, 521, 521, 521, 521, 521, 522, 522,
920 522, 522, 522, 522, 522, 523, 523, 523, 523, 523,
921 523, 523, 524, 524, 524, 524, 524, 524, 524, 525,
922 525, 525, 525, 525, 525, 525, 526, 526, 526, 526,
923 526, 526, 526, 168, 166, 165, 164, 163, 162, 158,
924 156, 155, 154, 153, 152, 151, 150, 149, 148, 147,
925 144, 143, 142, 139, 138, 137, 134, 133, 132, 131,
927 130, 124, 123, 121, 118, 117, 113, 112, 111, 110,
928 109, 105, 99, 98, 94, 81, 77, 76, 75, 69,
929 68, 66, 63, 51, 496, 496, 496, 496, 496, 496,
930 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
931 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
932 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
933 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
934 496, 496, 496, 496, 496, 496, 496, 496
937 /* Table of booleans, true if rule could match eol. */
938 static yyconst flex_int32_t yy_rule_can_match_eol[80] =
940 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0,
941 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1,
942 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0,
943 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0,
946 static yy_state_type yy_last_accepting_state;
947 static char *yy_last_accepting_cpos;
949 extern int xbt_graph_parse__flex_debug;
950 int xbt_graph_parse__flex_debug = 0;
952 /* The intent behind this definition is that it'll catch
953 * any uses of REJECT which flex missed.
955 #define REJECT reject_used_but_not_detected
956 #define yymore() yymore_used_but_not_detected
957 #define YY_MORE_ADJ 0
958 #define YY_RESTORE_YY_MORE_OFFSET
959 char *xbt_graph_parse_text;
960 #line 1 "xbt/graphxml.l"
961 /* Validating XML processor for graphxml.dtd.
962 * Generated 2006/03/20 16:15:21.
964 * This program was generated with the FleXML XML processor generator.
965 * FleXML is Copyright © 1999-2005 Kristoffer Rose. All rights reserved.
966 * (Id: flexml.pl,v 1.45 2006/03/03 19:25:46 wdowling Exp).
968 * There are two, intertwined parts to this program, part A and part B.
973 * Some parts, here collectively called "Part A", are found in the
974 * FleXML package. They are Copyright © 1999-2005 Kristoffer Rose.
975 * All rights reserved.
977 * You can redistribute, use, perform, display and/or modify "Part A"
978 * provided the following two conditions hold:
980 * 1. The program is distributed WITHOUT ANY WARRANTY from the author of
981 * FleXML; without even the implied warranty of MERCHANTABILITY or
982 * FITNESS FOR A PARTICULAR PURPOSE.
984 * 2. The program distribution conditions do not in any way affect the
985 * distribution conditions of the FleXML system used to generate this
986 * file or any version of FleXML derived from that system.
988 * Notice that these are explicit rights granted to you for files
989 * generated by the FleXML system. For your rights in connection with
990 * the FleXML system itself please consult the GNU General Public License.
995 * The other parts, here collectively called "Part B", and which came
996 * from the DTD used by FleXML to generate this program, can be
997 * distributed (or not, as the case may be) under the terms of whoever
998 * wrote them, provided these terms respect and obey the two conditions
999 * above under the heading "Part A".
1001 * The author of and contributors to FleXML specifically disclaim
1002 * any copyright interest in "Part B", unless "Part B" was written
1003 * by the author of or contributors to FleXML.
1006 #line 48 "xbt/graphxml.l"
1008 /* Version strings. */
1009 const char rcs_grahxml_flexml_skeleton[] =
1010 "$" "Id: skel,v 1.26 2005/02/23 22:22:20 wdowling Exp $";
1011 const char rcs_grahxml_flexml[] =
1012 "$" "Id: flexml.pl,v 1.45 2006/03/03 19:25:46 wdowling Exp $";
1022 /* Generated definitions. */
1023 #define FLEXML_yylineno
1024 #define FLEXML_BUFFERSTACKSIZE 1000000
1026 /* XML processor api. */
1027 /* FleXML-provided data. */
1029 AT_edge_target A_edge_target;
1030 AT_node_name A_node_name;
1031 AT_node_label A_node_label;
1032 AT_edge_label A_edge_label;
1033 AT_edge_source A_edge_source;
1034 AT_edge_isDirected A_edge_isDirected;
1035 AT_edge_name A_edge_name;
1039 # define ENTER(state) debug_enter(state,#state)
1040 # define LEAVE debug_leave()
1041 # define SET(state) debug_set(state,#state)
1042 static void debug_enter(int, const char*);
1043 static void debug_leave(void);
1044 static void debug_set(int, const char*);
1046 # define ENTER(state) (yy_push_state(state))
1047 # define LEAVE (yy_pop_state())
1048 # define SET(state) BEGIN(state)
1051 /* Generic actions. */
1052 #define SKIP /*skip*/
1053 #define SUCCEED CLEANUP; return 0
1055 #define FAIL return fail
1056 static int fail(const char*, ...);
1057 const char * grahxml_parse_err_msg(void);
1060 static void cleanup(void);
1061 #define CLEANUP cleanup()
1063 /* Text buffer stack handling. */
1064 char bufferstack[FLEXML_BUFFERSTACKSIZE];
1065 static char* limit = bufferstack + FLEXML_BUFFERSTACKSIZE;
1066 typedef struct BufferLast_s {
1067 struct BufferLast_s *old; char* saved; char new1[1];
1069 #ifdef FLEXML_HasMixed
1070 static BufferLast* last = (BufferLast*)0;
1072 static char* next = bufferstack;
1074 #define BUFFERSET(P) (P = next)
1075 #define BUFFERPUTC(C) (assert(next<limit), *(next++) = (C))
1076 #define BUFFERDONE (BUFFERPUTC('\0'))
1078 #define BUFFERLITERAL(C,P) bufferliteral(C,&(P),xbt_graph_parse_text)
1079 static void bufferliteral(char c, const char** pp, char* text)
1081 char *s = strchr(text,c), *e = strrchr(text,c);
1082 assert(s <= e); BUFFERSET(*pp);
1084 if (isspace(*s)) { BUFFERPUTC(' '); while (isspace(*s)) ++s; }
1085 else BUFFERPUTC(*s);
1090 #ifdef FLEXML_HasMixed
1091 static void pushbuffer(char* p)
1093 BufferLast* l = (BufferLast*)next;
1094 assert(next < limit);
1101 static char* popbuffer(void)
1103 BufferLast* l = last;
1104 assert(last != (BufferLast*)0);
1111 /* General internal entities are `unput' back onto the input stream... */
1112 #define ENTITYTEXT(T) \
1113 { char *s = (T), *e = s+strlen(s);\
1114 while (--e >= s) { unput(*e); }}
1115 /* Flex standard options. */
1116 #define YY_NO_INPUT 1
1117 /* Flex user-requested options. */
1118 /* XML character classes (currently restricted to ASCII). */
1119 /* "Common syntactic structures." */
1120 /* "Names and Tokens." */
1121 /* Miscellaneous. */
1122 /* Parser states (flex `exclusive start conditions'):
1124 * PROLOG the XML prolog of the document before <?xml...>
1125 * DOCTYPE the XML prolog of the document after <?xml...>
1126 * EPILOG after the root element
1127 * INCOMMENT inside an XML comment <!--....-->
1128 * INPI inside an XML PI <?...?>
1129 * VALUE1 inside a '...'-delimited literal
1130 * VALUE2 inside a "..."-delimited literal
1131 * CDATA inside a <![CDATA[...m4_userquote_end()> section.
1132 * ROOT_<tag> expect root element <tag>
1133 * AL_<tag> inside the attribute list for <tag>
1134 * IN_<tag> inside a <tag> with element contents (ready for end tag)
1135 * IMPOSSIBLE dummy to permit disabling rules; must be last
1142 #line 210 "xbt/graphxml.l"
1144 const char* *grahxml_statenames=NULL;
1145 #line 1146 "xbt/graphxml.c"
1156 #define ROOT_graph 9
1159 #define S_graph_1 12
1160 #define S_graph_2 13
1161 #define S_graph_3 14
1162 #define S_graph_4 15
1163 #define S_graph_5 16
1165 #define ROOT_node 18
1168 #define ROOT_edge 21
1171 #define IMPOSSIBLE 24
1173 #ifndef YY_NO_UNISTD_H
1174 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1175 * down here because we want the user's section 1 to have been scanned first.
1176 * The user has a chance to override it with an option.
1181 #ifndef YY_EXTRA_TYPE
1182 #define YY_EXTRA_TYPE void *
1185 /* Macros after this point can all be overridden by user definitions in
1189 #ifndef YY_SKIP_YYWRAP
1191 extern "C" int xbt_graph_parse_wrap (void );
1193 extern int xbt_graph_parse_wrap (void );
1198 static void yy_flex_strncpy (char *,yyconst char *,int );
1201 #ifdef YY_NEED_STRLEN
1202 static int yy_flex_strlen (yyconst char * );
1208 static int yyinput (void );
1210 static int input (void );
1215 static int yy_start_stack_ptr = 0;
1216 static int yy_start_stack_depth = 0;
1217 static int *yy_start_stack = 0;
1219 static void yy_push_state (int new_state );
1221 static void yy_pop_state (void );
1223 /* Amount of stuff to slurp up with each read. */
1224 #ifndef YY_READ_BUF_SIZE
1225 #define YY_READ_BUF_SIZE 8192
1228 /* Copy whatever the last rule matched to the standard output. */
1230 /* This used to be an fputs(), but since the string might contain NUL's,
1231 * we now use fwrite().
1233 #define ECHO (void) fwrite( xbt_graph_parse_text, xbt_graph_parse_leng, 1, xbt_graph_parse_out )
1236 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1237 * is returned in "result".
1240 #define YY_INPUT(buf,result,max_size) \
1241 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1245 for ( n = 0; n < max_size && \
1246 (c = getc( xbt_graph_parse_in )) != EOF && c != '\n'; ++n ) \
1247 buf[n] = (char) c; \
1249 buf[n++] = (char) c; \
1250 if ( c == EOF && ferror( xbt_graph_parse_in ) ) \
1251 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1257 while ( (result = fread(buf, 1, max_size, xbt_graph_parse_in))==0 && ferror(xbt_graph_parse_in)) \
1259 if( errno != EINTR) \
1261 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1265 clearerr(xbt_graph_parse_in); \
1272 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1273 * we don't want an extra ';' after the "return" because that will cause
1274 * some compilers to complain about unreachable statements.
1277 #define yyterminate() return YY_NULL
1280 /* Number of entries by which start-condition stack grows. */
1281 #ifndef YY_START_STACK_INCR
1282 #define YY_START_STACK_INCR 25
1285 /* Report a fatal error. */
1286 #ifndef YY_FATAL_ERROR
1287 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1290 /* end tables serialization structures and prototypes */
1292 /* Default declaration of generated scanner - a define so the user can
1293 * easily add parameters.
1296 #define YY_DECL_IS_OURS 1
1298 extern int xbt_graph_parse_lex (void);
1300 #define YY_DECL int xbt_graph_parse_lex (void)
1301 #endif /* !YY_DECL */
1303 /* Code executed at the beginning of each rule, after xbt_graph_parse_text and xbt_graph_parse_leng
1306 #ifndef YY_USER_ACTION
1307 #define YY_USER_ACTION
1310 /* Code executed at the end of each rule. */
1312 #define YY_BREAK break;
1315 #define YY_RULE_SETUP \
1318 /** The main scanner function which does all the work.
1322 register yy_state_type yy_current_state;
1323 register char *yy_cp, *yy_bp;
1324 register int yy_act;
1326 #line 214 "xbt/graphxml.l"
1329 /* Bypass Flex's default INITIAL state and begin by parsing the XML prolog. */
1333 if(!grahxml_statenames) {grahxml_statenames= (const char **)calloc(IMPOSSIBLE,sizeof(char*));
1334 grahxml_statenames[PROLOG] = NULL;
1335 grahxml_statenames[DOCTYPE] = NULL;
1336 grahxml_statenames[EPILOG] = NULL;
1337 grahxml_statenames[INCOMMENT] = NULL;
1338 grahxml_statenames[INPI] = NULL;
1339 grahxml_statenames[VALUE1] = NULL;
1340 grahxml_statenames[VALUE2] = NULL;
1341 grahxml_statenames[CDATA] = NULL;
1342 grahxml_statenames[ROOT_graph] = NULL;
1343 grahxml_statenames[AL_graph] = NULL;
1344 grahxml_statenames[S_graph] = "graph";
1345 grahxml_statenames[S_graph_1] = "graph";
1346 grahxml_statenames[S_graph_2] = "graph";
1347 grahxml_statenames[S_graph_3] = "graph";
1348 grahxml_statenames[S_graph_4] = "graph";
1349 grahxml_statenames[S_graph_5] = "graph";
1350 grahxml_statenames[E_graph] = "graph";
1351 grahxml_statenames[ROOT_node] = NULL;
1352 grahxml_statenames[AL_node] = NULL;
1353 grahxml_statenames[E_node] = "node";
1354 grahxml_statenames[ROOT_edge] = NULL;
1355 grahxml_statenames[AL_edge] = NULL;
1356 grahxml_statenames[E_edge] = "edge";
1359 /* COMMENTS and PIs: handled uniformly for efficiency. */
1361 #line 1362 "xbt/graphxml.c"
1372 (yy_start) = 1; /* first start state */
1374 if ( ! xbt_graph_parse_in )
1375 xbt_graph_parse_in = stdin;
1377 if ( ! xbt_graph_parse_out )
1378 xbt_graph_parse_out = stdout;
1380 if ( ! YY_CURRENT_BUFFER ) {
1381 xbt_graph_parse_ensure_buffer_stack ();
1382 YY_CURRENT_BUFFER_LVALUE =
1383 xbt_graph_parse__create_buffer(xbt_graph_parse_in,YY_BUF_SIZE );
1386 xbt_graph_parse__load_buffer_state( );
1389 while ( 1 ) /* loops until end-of-file is reached */
1391 yy_cp = (yy_c_buf_p);
1393 /* Support of xbt_graph_parse_text. */
1394 *yy_cp = (yy_hold_char);
1396 /* yy_bp points to the position in yy_ch_buf of the start of
1401 yy_current_state = (yy_start);
1405 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1406 if ( yy_accept[yy_current_state] )
1408 (yy_last_accepting_state) = yy_current_state;
1409 (yy_last_accepting_cpos) = yy_cp;
1411 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1413 yy_current_state = (int) yy_def[yy_current_state];
1414 if ( yy_current_state >= 497 )
1415 yy_c = yy_meta[(unsigned int) yy_c];
1417 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1420 while ( yy_base[yy_current_state] != 1425 );
1423 yy_act = yy_accept[yy_current_state];
1425 { /* have to back up */
1426 yy_cp = (yy_last_accepting_cpos);
1427 yy_current_state = (yy_last_accepting_state);
1428 yy_act = yy_accept[yy_current_state];
1431 YY_DO_BEFORE_ACTION;
1433 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
1436 for ( yyl = 0; yyl < xbt_graph_parse_leng; ++yyl )
1437 if ( xbt_graph_parse_text[yyl] == '\n' )
1439 xbt_graph_parse_lineno++;
1443 do_action: /* This label is used only to access EOF actions. */
1446 { /* beginning of action switch */
1447 case 0: /* must back up */
1448 /* undo the effects of YY_DO_BEFORE_ACTION */
1449 *yy_cp = (yy_hold_char);
1450 yy_cp = (yy_last_accepting_cpos);
1451 yy_current_state = (yy_last_accepting_state);
1452 goto yy_find_action;
1456 #line 249 "xbt/graphxml.l"
1461 #line 250 "xbt/graphxml.l"
1468 #line 253 "xbt/graphxml.l"
1472 #line 255 "xbt/graphxml.l"
1474 #line 256 "xbt/graphxml.l"
1476 /* rule 6 can match eol */
1478 #line 256 "xbt/graphxml.l"
1481 case YY_STATE_EOF(INCOMMENT):
1482 #line 257 "xbt/graphxml.l"
1483 FAIL("EOF in comment.");
1489 #line 260 "xbt/graphxml.l"
1493 #line 262 "xbt/graphxml.l"
1495 /* rule 9 can match eol */
1497 #line 262 "xbt/graphxml.l"
1500 case YY_STATE_EOF(INPI):
1501 #line 263 "xbt/graphxml.l"
1502 FAIL("EOF in PI (processing instruction).");
1505 /* SPACES: skipped uniformly */
1507 /* rule 10 can match eol */
1509 #line 268 "xbt/graphxml.l"
1512 /* PROLOG: determine root element and process it. */
1515 /* rule 11 can match eol */
1517 #line 273 "xbt/graphxml.l"
1521 /* rule 12 can match eol */
1523 #line 274 "xbt/graphxml.l"
1524 FAIL("Bad declaration %s.",xbt_graph_parse_text);
1529 /* rule 13 can match eol */
1531 #line 278 "xbt/graphxml.l"
1535 /* rule 14 can match eol */
1537 #line 279 "xbt/graphxml.l"
1541 /* rule 15 can match eol */
1543 #line 280 "xbt/graphxml.l"
1547 /* rule 16 can match eol */
1549 #line 281 "xbt/graphxml.l"
1550 FAIL("Bad declaration %s.",xbt_graph_parse_text);
1554 #line 282 "xbt/graphxml.l"
1555 FAIL("Unexpected character `%c' in prolog.", xbt_graph_parse_text[0]);
1557 case YY_STATE_EOF(PROLOG):
1558 case YY_STATE_EOF(DOCTYPE):
1559 #line 283 "xbt/graphxml.l"
1560 FAIL("EOF in prolog.");
1563 /* RULES DERIVED FROM DTD. */
1564 /* <!-- Small DTD for xbt graphs. --> */
1566 /* rule 18 can match eol */
1568 #line 290 "xbt/graphxml.l"
1576 #line 295 "xbt/graphxml.l"
1578 LEAVE; STag_graph();pcdata = NULL; ENTER(S_graph);
1583 #line 298 "xbt/graphxml.l"
1585 LEAVE; STag_graph(); pcdata = NULL; ETag_graph();
1587 case ROOT_graph: SET(EPILOG); break;
1593 #line 304 "xbt/graphxml.l"
1594 FAIL("Unexpected character `%c' in attribute list of graph element.", xbt_graph_parse_text[0]);
1598 #line 305 "xbt/graphxml.l"
1599 FAIL("Bad attribute `%s' in `graph' element start tag.",xbt_graph_parse_text);
1601 case YY_STATE_EOF(AL_graph):
1602 #line 306 "xbt/graphxml.l"
1603 FAIL("EOF in attribute list of `graph' element.");
1608 /* rule 23 can match eol */
1610 #line 310 "xbt/graphxml.l"
1615 case ROOT_graph: SET(EPILOG); break;
1620 /* rule 24 can match eol */
1622 #line 317 "xbt/graphxml.l"
1623 FAIL("Unexpected end-tag `%s': `</graph>' expected.",xbt_graph_parse_text);
1627 #line 318 "xbt/graphxml.l"
1628 FAIL("Unexpected character `%c': `</graph>' expected.",xbt_graph_parse_text[0]);
1630 case YY_STATE_EOF(S_graph_1):
1631 case YY_STATE_EOF(E_graph):
1632 case YY_STATE_EOF(S_graph_3):
1633 case YY_STATE_EOF(S_graph_5):
1634 case YY_STATE_EOF(S_graph):
1635 #line 319 "xbt/graphxml.l"
1636 FAIL("Premature EOF: `</graph>' expected.");
1640 * name CDATA #REQUIRED
1643 /* rule 26 can match eol */
1645 #line 326 "xbt/graphxml.l"
1647 A_node_label = NULL;
1654 /* rule 27 can match eol */
1656 #line 333 "xbt/graphxml.l"
1657 ENTER(VALUE1); BUFFERSET(A_node_label);
1660 /* rule 28 can match eol */
1662 #line 334 "xbt/graphxml.l"
1663 ENTER(VALUE2); BUFFERSET(A_node_label);
1666 /* rule 29 can match eol */
1668 #line 336 "xbt/graphxml.l"
1669 ENTER(VALUE1); BUFFERSET(A_node_name);
1672 /* rule 30 can match eol */
1674 #line 337 "xbt/graphxml.l"
1675 ENTER(VALUE2); BUFFERSET(A_node_name);
1679 #line 339 "xbt/graphxml.l"
1681 if (!A_node_name) FAIL("Required attribute `name' not set for `node' element.");
1682 LEAVE; STag_node();pcdata = NULL; ENTER(E_node);
1687 #line 343 "xbt/graphxml.l"
1689 if (!A_node_name) FAIL("Required attribute `name' not set for `node' element.");
1690 LEAVE; STag_node(); pcdata = NULL; ETag_node();
1692 case S_graph_2: case S_graph_3: case S_graph: SET(S_graph_3); break;
1693 case ROOT_node: SET(EPILOG); break;
1699 #line 351 "xbt/graphxml.l"
1700 FAIL("Unexpected character `%c' in attribute list of node element.", xbt_graph_parse_text[0]);
1704 #line 352 "xbt/graphxml.l"
1705 FAIL("Bad attribute `%s' in `node' element start tag.",xbt_graph_parse_text);
1707 case YY_STATE_EOF(AL_node):
1708 #line 353 "xbt/graphxml.l"
1709 FAIL("EOF in attribute list of `node' element.");
1714 /* rule 35 can match eol */
1716 #line 357 "xbt/graphxml.l"
1721 case S_graph_2: case S_graph_3: case S_graph: SET(S_graph_3); break;
1722 case ROOT_node: SET(EPILOG); break;
1727 /* rule 36 can match eol */
1729 #line 365 "xbt/graphxml.l"
1730 FAIL("Unexpected end-tag `%s': `</node>' expected.",xbt_graph_parse_text);
1734 #line 366 "xbt/graphxml.l"
1735 FAIL("Unexpected character `%c': `</node>' expected.",xbt_graph_parse_text[0]);
1737 case YY_STATE_EOF(E_node):
1738 #line 367 "xbt/graphxml.l"
1739 FAIL("Premature EOF: `</node>' expected.");
1743 * name CDATA #IMPLIED
1744 * source CDATA #REQUIRED
1745 * target CDATA #REQUIRED
1746 * isDirected (true|false) "true"
1749 /* rule 38 can match eol */
1751 #line 377 "xbt/graphxml.l"
1753 A_edge_label = NULL;
1755 A_edge_source = NULL;
1756 A_edge_target = NULL;
1757 A_edge_isDirected = A_edge_isDirected_true;
1763 /* rule 39 can match eol */
1765 #line 387 "xbt/graphxml.l"
1766 ENTER(VALUE1); BUFFERSET(A_edge_label);
1769 /* rule 40 can match eol */
1771 #line 388 "xbt/graphxml.l"
1772 ENTER(VALUE2); BUFFERSET(A_edge_label);
1775 /* rule 41 can match eol */
1777 #line 390 "xbt/graphxml.l"
1778 ENTER(VALUE1); BUFFERSET(A_edge_name);
1781 /* rule 42 can match eol */
1783 #line 391 "xbt/graphxml.l"
1784 ENTER(VALUE2); BUFFERSET(A_edge_name);
1787 /* rule 43 can match eol */
1789 #line 393 "xbt/graphxml.l"
1790 ENTER(VALUE1); BUFFERSET(A_edge_source);
1793 /* rule 44 can match eol */
1795 #line 394 "xbt/graphxml.l"
1796 ENTER(VALUE2); BUFFERSET(A_edge_source);
1799 /* rule 45 can match eol */
1801 #line 396 "xbt/graphxml.l"
1802 ENTER(VALUE1); BUFFERSET(A_edge_target);
1805 /* rule 46 can match eol */
1807 #line 397 "xbt/graphxml.l"
1808 ENTER(VALUE2); BUFFERSET(A_edge_target);
1811 /* rule 47 can match eol */
1812 #line 400 "xbt/graphxml.l"
1814 /* rule 48 can match eol */
1816 #line 400 "xbt/graphxml.l"
1817 A_edge_isDirected = A_edge_isDirected_true;
1820 /* rule 49 can match eol */
1821 #line 402 "xbt/graphxml.l"
1823 /* rule 50 can match eol */
1825 #line 402 "xbt/graphxml.l"
1826 A_edge_isDirected = A_edge_isDirected_false;
1830 #line 404 "xbt/graphxml.l"
1832 if (!A_edge_source) FAIL("Required attribute `source' not set for `edge' element.");
1833 if (!A_edge_target) FAIL("Required attribute `target' not set for `edge' element.");
1834 LEAVE; STag_edge();pcdata = NULL; ENTER(E_edge);
1839 #line 409 "xbt/graphxml.l"
1841 if (!A_edge_source) FAIL("Required attribute `source' not set for `edge' element.");
1842 if (!A_edge_target) FAIL("Required attribute `target' not set for `edge' element.");
1843 LEAVE; STag_edge(); pcdata = NULL; ETag_edge();
1845 case S_graph_1: case S_graph_3: case S_graph_5: case S_graph_4: case S_graph: SET(S_graph_5); break;
1846 case ROOT_edge: SET(EPILOG); break;
1852 #line 418 "xbt/graphxml.l"
1853 FAIL("Unexpected character `%c' in attribute list of edge element.", xbt_graph_parse_text[0]);
1857 #line 419 "xbt/graphxml.l"
1858 FAIL("Bad attribute `%s' in `edge' element start tag.",xbt_graph_parse_text);
1860 case YY_STATE_EOF(AL_edge):
1861 #line 420 "xbt/graphxml.l"
1862 FAIL("EOF in attribute list of `edge' element.");
1867 /* rule 55 can match eol */
1869 #line 424 "xbt/graphxml.l"
1874 case S_graph_1: case S_graph_3: case S_graph_5: case S_graph_4: case S_graph: SET(S_graph_5); break;
1875 case ROOT_edge: SET(EPILOG); break;
1880 /* rule 56 can match eol */
1882 #line 432 "xbt/graphxml.l"
1883 FAIL("Unexpected end-tag `%s': `</edge>' expected.",xbt_graph_parse_text);
1887 #line 433 "xbt/graphxml.l"
1888 FAIL("Unexpected character `%c': `</edge>' expected.",xbt_graph_parse_text[0]);
1890 case YY_STATE_EOF(E_edge):
1891 #line 434 "xbt/graphxml.l"
1892 FAIL("Premature EOF: `</edge>' expected.");
1895 /* EPILOG: after the root element. */
1899 #line 440 "xbt/graphxml.l"
1900 {SET(PROLOG); yyless(0); CLEANUP; return -1;}
1902 case YY_STATE_EOF(EPILOG):
1903 #line 441 "xbt/graphxml.l"
1907 /* CHARACTER DATA. */
1909 /* Non-defined standard entities... */
1912 #line 448 "xbt/graphxml.l"
1917 #line 449 "xbt/graphxml.l"
1922 #line 450 "xbt/graphxml.l"
1927 #line 451 "xbt/graphxml.l"
1932 #line 452 "xbt/graphxml.l"
1935 /* Character entities. */
1938 #line 455 "xbt/graphxml.l"
1939 BUFFERPUTC((unsigned char)atoi(xbt_graph_parse_text+2));
1943 #line 456 "xbt/graphxml.l"
1944 BUFFERPUTC((unsigned char)strtol(xbt_graph_parse_text+3,NULL,16));
1949 /* rule 66 can match eol */
1950 #line 461 "xbt/graphxml.l"
1952 /* rule 67 can match eol */
1953 #line 462 "xbt/graphxml.l"
1955 /* rule 68 can match eol */
1956 #line 463 "xbt/graphxml.l"
1958 /* rule 69 can match eol */
1960 #line 463 "xbt/graphxml.l"
1967 #line 467 "xbt/graphxml.l"
1972 #line 468 "xbt/graphxml.l"
1973 FAIL("Unexpected `]""]>' in character data.");
1979 #line 472 "xbt/graphxml.l"
1982 case YY_STATE_EOF(VALUE1):
1983 #line 473 "xbt/graphxml.l"
1984 FAIL("EOF in literal (\"'\" expected).");
1990 #line 477 "xbt/graphxml.l"
1993 case YY_STATE_EOF(VALUE2):
1994 #line 478 "xbt/graphxml.l"
1995 FAIL("EOF in literal (`\"' expected).");
2000 /* rule 74 can match eol */
2002 #line 482 "xbt/graphxml.l"
2003 BUFFERPUTC(xbt_graph_parse_text[0]);
2007 #line 483 "xbt/graphxml.l"
2008 FAIL("Spurious `%c' in character data.",xbt_graph_parse_text[0]);
2014 #line 487 "xbt/graphxml.l"
2017 /* "]""]" BUFFERPUTC(xbt_graph_parse_text[0]); BUFFERPUTC(xbt_graph_parse_text[1]); */
2020 #line 489 "xbt/graphxml.l"
2021 BUFFERPUTC(xbt_graph_parse_text[0]);
2023 case YY_STATE_EOF(CDATA):
2024 #line 490 "xbt/graphxml.l"
2025 FAIL("EOF in CDATA section.");
2028 /* Impossible rules to avoid warnings from flex(1). */
2029 /* Ideally, this should be replaced by code in flexml.pl that
2030 generates just the states not covered by other rules. */
2033 /* rule 78 can match eol */
2035 #line 497 "xbt/graphxml.l"
2036 FAIL("Syntax error on character `%c'.", xbt_graph_parse_text[0]);
2041 #line 500 "xbt/graphxml.l"
2044 #line 2045 "xbt/graphxml.c"
2045 case YY_STATE_EOF(INITIAL):
2046 case YY_STATE_EOF(ROOT_graph):
2047 case YY_STATE_EOF(S_graph_2):
2048 case YY_STATE_EOF(S_graph_4):
2049 case YY_STATE_EOF(ROOT_node):
2050 case YY_STATE_EOF(ROOT_edge):
2051 case YY_STATE_EOF(IMPOSSIBLE):
2054 case YY_END_OF_BUFFER:
2056 /* Amount of text matched not including the EOB char. */
2057 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2059 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2060 *yy_cp = (yy_hold_char);
2061 YY_RESTORE_YY_MORE_OFFSET
2063 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2065 /* We're scanning a new file or input source. It's
2066 * possible that this happened because the user
2067 * just pointed xbt_graph_parse_in at a new source and called
2068 * xbt_graph_parse_lex(). If so, then we have to assure
2069 * consistency between YY_CURRENT_BUFFER and our
2070 * globals. Here is the right place to do so, because
2071 * this is the first action (other than possibly a
2072 * back-up) that will match for the new input source.
2074 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2075 YY_CURRENT_BUFFER_LVALUE->yy_input_file = xbt_graph_parse_in;
2076 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2079 /* Note that here we test for yy_c_buf_p "<=" to the position
2080 * of the first EOB in the buffer, since yy_c_buf_p will
2081 * already have been incremented past the NUL character
2082 * (since all states make transitions on EOB to the
2083 * end-of-buffer state). Contrast this with the test
2086 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2087 { /* This was really a NUL. */
2088 yy_state_type yy_next_state;
2090 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2092 yy_current_state = yy_get_previous_state( );
2094 /* Okay, we're now positioned to make the NUL
2095 * transition. We couldn't have
2096 * yy_get_previous_state() go ahead and do it
2097 * for us because it doesn't know how to deal
2098 * with the possibility of jamming (and we don't
2099 * want to build jamming into it because then it
2100 * will run more slowly).
2103 yy_next_state = yy_try_NUL_trans( yy_current_state );
2105 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2107 if ( yy_next_state )
2109 /* Consume the NUL. */
2110 yy_cp = ++(yy_c_buf_p);
2111 yy_current_state = yy_next_state;
2117 yy_cp = (yy_c_buf_p);
2118 goto yy_find_action;
2122 else switch ( yy_get_next_buffer( ) )
2124 case EOB_ACT_END_OF_FILE:
2126 (yy_did_buffer_switch_on_eof) = 0;
2128 if ( xbt_graph_parse_wrap( ) )
2130 /* Note: because we've taken care in
2131 * yy_get_next_buffer() to have set up
2132 * xbt_graph_parse_text, we can now set up
2133 * yy_c_buf_p so that if some total
2134 * hoser (like flex itself) wants to
2135 * call the scanner after we return the
2136 * YY_NULL, it'll still work - another
2137 * YY_NULL will get returned.
2139 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2141 yy_act = YY_STATE_EOF(YY_START);
2147 if ( ! (yy_did_buffer_switch_on_eof) )
2153 case EOB_ACT_CONTINUE_SCAN:
2155 (yytext_ptr) + yy_amount_of_matched_text;
2157 yy_current_state = yy_get_previous_state( );
2159 yy_cp = (yy_c_buf_p);
2160 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2163 case EOB_ACT_LAST_MATCH:
2165 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2167 yy_current_state = yy_get_previous_state( );
2169 yy_cp = (yy_c_buf_p);
2170 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2171 goto yy_find_action;
2178 "fatal flex scanner internal error--no action found" );
2179 } /* end of action switch */
2180 } /* end of scanning one token */
2181 } /* end of xbt_graph_parse_lex */
2183 /* yy_get_next_buffer - try to read in a new buffer
2185 * Returns a code representing an action:
2186 * EOB_ACT_LAST_MATCH -
2187 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2188 * EOB_ACT_END_OF_FILE - end of file
2190 static int yy_get_next_buffer (void)
2192 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2193 register char *source = (yytext_ptr);
2194 register int number_to_move, i;
2197 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2199 "fatal flex scanner internal error--end of buffer missed" );
2201 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2202 { /* Don't try to fill the buffer, so this is an EOF. */
2203 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2205 /* We matched a single character, the EOB, so
2206 * treat this as a final EOF.
2208 return EOB_ACT_END_OF_FILE;
2213 /* We matched some text prior to the EOB, first
2216 return EOB_ACT_LAST_MATCH;
2220 /* Try to read more data. */
2222 /* First move last chars to start of buffer. */
2223 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
2225 for ( i = 0; i < number_to_move; ++i )
2226 *(dest++) = *(source++);
2228 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2229 /* don't do the read, it's not guaranteed to return an EOF,
2232 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2236 size_t num_to_read =
2237 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2239 while ( num_to_read <= 0 )
2240 { /* Not enough room in the buffer - grow it. */
2242 /* just a shorter name for the current buffer */
2243 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
2245 int yy_c_buf_p_offset =
2246 (int) ((yy_c_buf_p) - b->yy_ch_buf);
2248 if ( b->yy_is_our_buffer )
2250 int new_size = b->yy_buf_size * 2;
2252 if ( new_size <= 0 )
2253 b->yy_buf_size += b->yy_buf_size / 8;
2255 b->yy_buf_size *= 2;
2257 b->yy_ch_buf = (char *)
2258 /* Include room in for 2 EOB chars. */
2259 xbt_graph_parse_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
2262 /* Can't grow it, we don't own it. */
2265 if ( ! b->yy_ch_buf )
2267 "fatal error - scanner input buffer overflow" );
2269 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2271 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2276 if ( num_to_read > YY_READ_BUF_SIZE )
2277 num_to_read = YY_READ_BUF_SIZE;
2279 /* Read in more data. */
2280 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2281 (yy_n_chars), num_to_read );
2283 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2286 if ( (yy_n_chars) == 0 )
2288 if ( number_to_move == YY_MORE_ADJ )
2290 ret_val = EOB_ACT_END_OF_FILE;
2291 xbt_graph_parse_restart(xbt_graph_parse_in );
2296 ret_val = EOB_ACT_LAST_MATCH;
2297 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2298 YY_BUFFER_EOF_PENDING;
2303 ret_val = EOB_ACT_CONTINUE_SCAN;
2305 (yy_n_chars) += number_to_move;
2306 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2307 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2309 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2314 /* yy_get_previous_state - get the state just before the EOB char was reached */
2316 static yy_state_type yy_get_previous_state (void)
2318 register yy_state_type yy_current_state;
2319 register char *yy_cp;
2321 yy_current_state = (yy_start);
2323 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2325 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2326 if ( yy_accept[yy_current_state] )
2328 (yy_last_accepting_state) = yy_current_state;
2329 (yy_last_accepting_cpos) = yy_cp;
2331 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2333 yy_current_state = (int) yy_def[yy_current_state];
2334 if ( yy_current_state >= 497 )
2335 yy_c = yy_meta[(unsigned int) yy_c];
2337 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2340 return yy_current_state;
2343 /* yy_try_NUL_trans - try to make a transition on the NUL character
2346 * next_state = yy_try_NUL_trans( current_state );
2348 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2350 register int yy_is_jam;
2351 register char *yy_cp = (yy_c_buf_p);
2353 register YY_CHAR yy_c = 1;
2354 if ( yy_accept[yy_current_state] )
2356 (yy_last_accepting_state) = yy_current_state;
2357 (yy_last_accepting_cpos) = yy_cp;
2359 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2361 yy_current_state = (int) yy_def[yy_current_state];
2362 if ( yy_current_state >= 497 )
2363 yy_c = yy_meta[(unsigned int) yy_c];
2365 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2366 yy_is_jam = (yy_current_state == 496);
2368 return yy_is_jam ? 0 : yy_current_state;
2373 static int yyinput (void)
2375 static int input (void)
2381 *(yy_c_buf_p) = (yy_hold_char);
2383 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2385 /* yy_c_buf_p now points to the character we want to return.
2386 * If this occurs *before* the EOB characters, then it's a
2387 * valid NUL; if not, then we've hit the end of the buffer.
2389 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2390 /* This was really a NUL. */
2391 *(yy_c_buf_p) = '\0';
2394 { /* need more input */
2395 int offset = (yy_c_buf_p) - (yytext_ptr);
2398 switch ( yy_get_next_buffer( ) )
2400 case EOB_ACT_LAST_MATCH:
2401 /* This happens because yy_g_n_b()
2402 * sees that we've accumulated a
2403 * token and flags that we need to
2404 * try matching the token before
2405 * proceeding. But for input(),
2406 * there's no matching to consider.
2407 * So convert the EOB_ACT_LAST_MATCH
2408 * to EOB_ACT_END_OF_FILE.
2411 /* Reset buffer status. */
2412 xbt_graph_parse_restart(xbt_graph_parse_in );
2416 case EOB_ACT_END_OF_FILE:
2418 if ( xbt_graph_parse_wrap( ) )
2421 if ( ! (yy_did_buffer_switch_on_eof) )
2430 case EOB_ACT_CONTINUE_SCAN:
2431 (yy_c_buf_p) = (yytext_ptr) + offset;
2437 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2438 *(yy_c_buf_p) = '\0'; /* preserve xbt_graph_parse_text */
2439 (yy_hold_char) = *++(yy_c_buf_p);
2443 xbt_graph_parse_lineno++;
2448 #endif /* ifndef YY_NO_INPUT */
2450 /** Immediately switch to a different input stream.
2451 * @param input_file A readable stream.
2453 * @note This function does not reset the start condition to @c INITIAL .
2455 void xbt_graph_parse_restart (FILE * input_file )
2458 if ( ! YY_CURRENT_BUFFER ){
2459 xbt_graph_parse_ensure_buffer_stack ();
2460 YY_CURRENT_BUFFER_LVALUE =
2461 xbt_graph_parse__create_buffer(xbt_graph_parse_in,YY_BUF_SIZE );
2464 xbt_graph_parse__init_buffer(YY_CURRENT_BUFFER,input_file );
2465 xbt_graph_parse__load_buffer_state( );
2468 /** Switch to a different input buffer.
2469 * @param new_buffer The new input buffer.
2472 void xbt_graph_parse__switch_to_buffer (YY_BUFFER_STATE new_buffer )
2475 /* TODO. We should be able to replace this entire function body
2477 * xbt_graph_parse_pop_buffer_state();
2478 * xbt_graph_parse_push_buffer_state(new_buffer);
2480 xbt_graph_parse_ensure_buffer_stack ();
2481 if ( YY_CURRENT_BUFFER == new_buffer )
2484 if ( YY_CURRENT_BUFFER )
2486 /* Flush out information for old buffer. */
2487 *(yy_c_buf_p) = (yy_hold_char);
2488 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2489 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2492 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2493 xbt_graph_parse__load_buffer_state( );
2495 /* We don't actually know whether we did this switch during
2496 * EOF (xbt_graph_parse_wrap()) processing, but the only time this flag
2497 * is looked at is after xbt_graph_parse_wrap() is called, so it's safe
2498 * to go ahead and always set it.
2500 (yy_did_buffer_switch_on_eof) = 1;
2503 static void xbt_graph_parse__load_buffer_state (void)
2505 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2506 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2507 xbt_graph_parse_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2508 (yy_hold_char) = *(yy_c_buf_p);
2511 /** Allocate and initialize an input buffer state.
2512 * @param file A readable stream.
2513 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2515 * @return the allocated buffer state.
2517 YY_BUFFER_STATE xbt_graph_parse__create_buffer (FILE * file, int size )
2521 b = (YY_BUFFER_STATE) xbt_graph_parse_alloc(sizeof( struct yy_buffer_state ) );
2523 YY_FATAL_ERROR( "out of dynamic memory in xbt_graph_parse__create_buffer()" );
2525 b->yy_buf_size = size;
2527 /* yy_ch_buf has to be 2 characters longer than the size given because
2528 * we need to put in 2 end-of-buffer characters.
2530 b->yy_ch_buf = (char *) xbt_graph_parse_alloc(b->yy_buf_size + 2 );
2531 if ( ! b->yy_ch_buf )
2532 YY_FATAL_ERROR( "out of dynamic memory in xbt_graph_parse__create_buffer()" );
2534 b->yy_is_our_buffer = 1;
2536 xbt_graph_parse__init_buffer(b,file );
2541 /** Destroy the buffer.
2542 * @param b a buffer created with xbt_graph_parse__create_buffer()
2545 void xbt_graph_parse__delete_buffer (YY_BUFFER_STATE b )
2551 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2552 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2554 if ( b->yy_is_our_buffer )
2555 xbt_graph_parse_free((void *) b->yy_ch_buf );
2557 xbt_graph_parse_free((void *) b );
2561 extern int isatty (int );
2562 #endif /* __cplusplus */
2564 /* Initializes or reinitializes a buffer.
2565 * This function is sometimes called more than once on the same buffer,
2566 * such as during a xbt_graph_parse_restart() or at EOF.
2568 static void xbt_graph_parse__init_buffer (YY_BUFFER_STATE b, FILE * file )
2573 xbt_graph_parse__flush_buffer(b );
2575 b->yy_input_file = file;
2576 b->yy_fill_buffer = 1;
2578 /* If b is the current buffer, then xbt_graph_parse__init_buffer was _probably_
2579 * called from xbt_graph_parse_restart() or through yy_get_next_buffer.
2580 * In that case, we don't want to reset the lineno or column.
2582 if (b != YY_CURRENT_BUFFER){
2583 b->yy_bs_lineno = 1;
2584 b->yy_bs_column = 0;
2587 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2592 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2593 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2596 void xbt_graph_parse__flush_buffer (YY_BUFFER_STATE b )
2603 /* We always need two end-of-buffer characters. The first causes
2604 * a transition to the end-of-buffer state. The second causes
2605 * a jam in that state.
2607 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2608 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2610 b->yy_buf_pos = &b->yy_ch_buf[0];
2613 b->yy_buffer_status = YY_BUFFER_NEW;
2615 if ( b == YY_CURRENT_BUFFER )
2616 xbt_graph_parse__load_buffer_state( );
2619 /** Pushes the new state onto the stack. The new state becomes
2620 * the current state. This function will allocate the stack
2622 * @param new_buffer The new state.
2625 void xbt_graph_parse_push_buffer_state (YY_BUFFER_STATE new_buffer )
2627 if (new_buffer == NULL)
2630 xbt_graph_parse_ensure_buffer_stack();
2632 /* This block is copied from xbt_graph_parse__switch_to_buffer. */
2633 if ( YY_CURRENT_BUFFER )
2635 /* Flush out information for old buffer. */
2636 *(yy_c_buf_p) = (yy_hold_char);
2637 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2638 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2641 /* Only push if top exists. Otherwise, replace top. */
2642 if (YY_CURRENT_BUFFER)
2643 (yy_buffer_stack_top)++;
2644 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2646 /* copied from xbt_graph_parse__switch_to_buffer. */
2647 xbt_graph_parse__load_buffer_state( );
2648 (yy_did_buffer_switch_on_eof) = 1;
2651 /** Removes and deletes the top of the stack, if present.
2652 * The next element becomes the new top.
2655 void xbt_graph_parse_pop_buffer_state (void)
2657 if (!YY_CURRENT_BUFFER)
2660 xbt_graph_parse__delete_buffer(YY_CURRENT_BUFFER );
2661 YY_CURRENT_BUFFER_LVALUE = NULL;
2662 if ((yy_buffer_stack_top) > 0)
2663 --(yy_buffer_stack_top);
2665 if (YY_CURRENT_BUFFER) {
2666 xbt_graph_parse__load_buffer_state( );
2667 (yy_did_buffer_switch_on_eof) = 1;
2671 /* Allocates the stack if it does not exist.
2672 * Guarantees space for at least one push.
2674 static void xbt_graph_parse_ensure_buffer_stack (void)
2678 if (!(yy_buffer_stack)) {
2680 /* First allocation is just for 2 elements, since we don't know if this
2681 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2682 * immediate realloc on the next call.
2685 (yy_buffer_stack) = (struct yy_buffer_state**)xbt_graph_parse_alloc
2686 (num_to_alloc * sizeof(struct yy_buffer_state*)
2689 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2691 (yy_buffer_stack_max) = num_to_alloc;
2692 (yy_buffer_stack_top) = 0;
2696 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2698 /* Increase the buffer to prepare for a possible push. */
2699 int grow_size = 8 /* arbitrary grow size */;
2701 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2702 (yy_buffer_stack) = (struct yy_buffer_state**)xbt_graph_parse_realloc
2704 num_to_alloc * sizeof(struct yy_buffer_state*)
2707 /* zero only the new slots.*/
2708 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2709 (yy_buffer_stack_max) = num_to_alloc;
2713 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2714 * @param base the character buffer
2715 * @param size the size in bytes of the character buffer
2717 * @return the newly allocated buffer state object.
2719 YY_BUFFER_STATE xbt_graph_parse__scan_buffer (char * base, yy_size_t size )
2724 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2725 base[size-1] != YY_END_OF_BUFFER_CHAR )
2726 /* They forgot to leave room for the EOB's. */
2729 b = (YY_BUFFER_STATE) xbt_graph_parse_alloc(sizeof( struct yy_buffer_state ) );
2731 YY_FATAL_ERROR( "out of dynamic memory in xbt_graph_parse__scan_buffer()" );
2733 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2734 b->yy_buf_pos = b->yy_ch_buf = base;
2735 b->yy_is_our_buffer = 0;
2736 b->yy_input_file = 0;
2737 b->yy_n_chars = b->yy_buf_size;
2738 b->yy_is_interactive = 0;
2740 b->yy_fill_buffer = 0;
2741 b->yy_buffer_status = YY_BUFFER_NEW;
2743 xbt_graph_parse__switch_to_buffer(b );
2748 /** Setup the input buffer state to scan a string. The next call to xbt_graph_parse_lex() will
2749 * scan from a @e copy of @a str.
2750 * @param str a NUL-terminated string to scan
2752 * @return the newly allocated buffer state object.
2753 * @note If you want to scan bytes that may contain NUL values, then use
2754 * xbt_graph_parse__scan_bytes() instead.
2756 YY_BUFFER_STATE xbt_graph_parse__scan_string (yyconst char * yy_str )
2759 return xbt_graph_parse__scan_bytes(yy_str,strlen(yy_str) );
2762 /** Setup the input buffer state to scan the given bytes. The next call to xbt_graph_parse_lex() will
2763 * scan from a @e copy of @a bytes.
2764 * @param bytes the byte buffer to scan
2765 * @param len the number of bytes in the buffer pointed to by @a bytes.
2767 * @return the newly allocated buffer state object.
2769 YY_BUFFER_STATE xbt_graph_parse__scan_bytes (yyconst char * bytes, int len )
2776 /* Get memory for full buffer, including space for trailing EOB's. */
2778 buf = (char *) xbt_graph_parse_alloc(n );
2780 YY_FATAL_ERROR( "out of dynamic memory in xbt_graph_parse__scan_bytes()" );
2782 for ( i = 0; i < len; ++i )
2785 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2787 b = xbt_graph_parse__scan_buffer(buf,n );
2789 YY_FATAL_ERROR( "bad buffer in xbt_graph_parse__scan_bytes()" );
2791 /* It's okay to grow etc. this buffer, and we should throw it
2792 * away when we're done.
2794 b->yy_is_our_buffer = 1;
2799 static void yy_push_state (int new_state )
2801 if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
2805 (yy_start_stack_depth) += YY_START_STACK_INCR;
2806 new_size = (yy_start_stack_depth) * sizeof( int );
2808 if ( ! (yy_start_stack) )
2809 (yy_start_stack) = (int *) xbt_graph_parse_alloc(new_size );
2812 (yy_start_stack) = (int *) xbt_graph_parse_realloc((void *) (yy_start_stack),new_size );
2814 if ( ! (yy_start_stack) )
2816 "out of memory expanding start-condition stack" );
2819 (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
2824 static void yy_pop_state (void)
2826 if ( --(yy_start_stack_ptr) < 0 )
2827 YY_FATAL_ERROR( "start-condition stack underflow" );
2829 BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
2832 #ifndef YY_EXIT_FAILURE
2833 #define YY_EXIT_FAILURE 2
2836 static void yy_fatal_error (yyconst char* msg )
2838 (void) fprintf( stderr, "%s\n", msg );
2839 exit( YY_EXIT_FAILURE );
2842 /* Redefine yyless() so it works in section 3 code. */
2848 /* Undo effects of setting up xbt_graph_parse_text. */ \
2849 int yyless_macro_arg = (n); \
2850 YY_LESS_LINENO(yyless_macro_arg);\
2851 xbt_graph_parse_text[xbt_graph_parse_leng] = (yy_hold_char); \
2852 (yy_c_buf_p) = xbt_graph_parse_text + yyless_macro_arg; \
2853 (yy_hold_char) = *(yy_c_buf_p); \
2854 *(yy_c_buf_p) = '\0'; \
2855 xbt_graph_parse_leng = yyless_macro_arg; \
2859 /* Accessor methods (get/set functions) to struct members. */
2861 /** Get the current line number.
2864 int xbt_graph_parse_get_lineno (void)
2867 return xbt_graph_parse_lineno;
2870 /** Get the input stream.
2873 FILE *xbt_graph_parse_get_in (void)
2875 return xbt_graph_parse_in;
2878 /** Get the output stream.
2881 FILE *xbt_graph_parse_get_out (void)
2883 return xbt_graph_parse_out;
2886 /** Get the length of the current token.
2889 int xbt_graph_parse_get_leng (void)
2891 return xbt_graph_parse_leng;
2894 /** Get the current token.
2898 char *xbt_graph_parse_get_text (void)
2900 return xbt_graph_parse_text;
2903 /** Set the current line number.
2904 * @param line_number
2907 void xbt_graph_parse_set_lineno (int line_number )
2910 xbt_graph_parse_lineno = line_number;
2913 /** Set the input stream. This does not discard the current
2915 * @param in_str A readable stream.
2917 * @see xbt_graph_parse__switch_to_buffer
2919 void xbt_graph_parse_set_in (FILE * in_str )
2921 xbt_graph_parse_in = in_str ;
2924 void xbt_graph_parse_set_out (FILE * out_str )
2926 xbt_graph_parse_out = out_str ;
2929 int xbt_graph_parse_get_debug (void)
2931 return xbt_graph_parse__flex_debug;
2934 void xbt_graph_parse_set_debug (int bdebug )
2936 xbt_graph_parse__flex_debug = bdebug ;
2939 /* xbt_graph_parse_lex_destroy is for both reentrant and non-reentrant scanners. */
2940 int xbt_graph_parse_lex_destroy (void)
2943 /* Pop the buffer stack, destroying each element. */
2944 while(YY_CURRENT_BUFFER){
2945 xbt_graph_parse__delete_buffer(YY_CURRENT_BUFFER );
2946 YY_CURRENT_BUFFER_LVALUE = NULL;
2947 xbt_graph_parse_pop_buffer_state();
2950 /* Destroy the stack itself. */
2951 xbt_graph_parse_free((yy_buffer_stack) );
2952 (yy_buffer_stack) = NULL;
2954 /* Destroy the start condition stack. */
2955 xbt_graph_parse_free((yy_start_stack) );
2956 (yy_start_stack) = NULL;
2962 * Internal utility routines.
2966 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2969 for ( i = 0; i < n; ++i )
2974 #ifdef YY_NEED_STRLEN
2975 static int yy_flex_strlen (yyconst char * s )
2978 for ( n = 0; s[n]; ++n )
2985 void *xbt_graph_parse_alloc (yy_size_t size )
2987 return (void *) malloc( size );
2990 void *xbt_graph_parse_realloc (void * ptr, yy_size_t size )
2992 /* The cast to (char *) in the following accommodates both
2993 * implementations that use char* generic pointers, and those
2994 * that use void* generic pointers. It works with the latter
2995 * because both ANSI C and C++ allow castless assignment from
2996 * any pointer type to void*, and deal with argument conversions
2997 * as though doing an assignment.
2999 return (void *) realloc( (char *) ptr, size );
3002 void xbt_graph_parse_free (void * ptr )
3004 free( (char *) ptr ); /* see xbt_graph_parse_realloc() for (char *) cast */
3007 #define YYTABLES_NAME "yytables"
3010 #undef YY_FLUSH_BUFFER
3012 #undef yy_new_buffer
3013 #undef yy_set_interactive
3015 #undef YY_DO_BEFORE_ACTION
3017 #ifdef YY_DECL_IS_OURS
3018 #undef YY_DECL_IS_OURS
3021 #line 500 "xbt/graphxml.l"
3025 /* Element context stack lookup. */
3026 int grahxml_element_context(int i)
3028 return (0<i && i<yy_start_stack_depth
3029 ? yy_start_stack[yy_start_stack_ptr - i]
3034 void print_yy_stack(char* fmt, ...)
3036 int i = 0; va_list ap; va_start(ap, fmt);
3037 vfprintf(stderr, fmt, ap);
3038 for (i=1; i<yy_start_stack_ptr; i++)
3039 fprintf(stderr, "%s/", grahxml_statenames[yy_start_stack[i] ]);
3040 fprintf(stderr,"%s\n", grahxml_statenames[YY_START]);
3044 static void debug_enter(int state, const char* statename) {
3045 yy_push_state(state);
3046 if (xbt_graph_parse__flex_debug) print_yy_stack("--ENTER(%s) : ",statename);
3049 static void debug_leave(void) {
3050 if (xbt_graph_parse__flex_debug) print_yy_stack("--LEAVE : ");
3054 static void debug_set(int state, const char* statename) {
3056 if (xbt_graph_parse__flex_debug) print_yy_stack("--SET(%s) : ",statename);
3060 enum {flexml_max_err_msg_size = 512};
3062 static char flexml_err_msg[flexml_max_err_msg_size];
3063 const char * grahxml_parse_err_msg()
3065 return flexml_err_msg;
3068 static void reset_grahxml_parse_err_msg()
3070 flexml_err_msg[0] = '\0';
3074 static void cleanup(void)
3076 if (grahxml_statenames) {
3077 free(grahxml_statenames);
3078 grahxml_statenames = NULL;
3083 static int fail(const char* fmt, ...)
3085 int chars_left, used;
3086 va_list ap; va_start(ap, fmt);
3087 #ifdef FLEXML_yylineno
3088 used = sprintf(flexml_err_msg,
3089 "Invalid XML (XML input line %d, state %d): ",
3090 xbt_graph_parse_lineno, YY_START);
3092 used = sprintf(flexml_err_msg,
3093 "Invalid XML (state %d): ",
3096 chars_left = flexml_max_err_msg_size - used - 1;
3097 vsnprintf(flexml_err_msg + used, chars_left, fmt, ap);
3100 #ifndef FLEXML_quiet_parser
3101 /* print directly to sdterr */
3102 fprintf(stderr, "%s\n", flexml_err_msg);
3103 flexml_err_msg[0] = '\0';