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 81
384 #define YY_END_OF_BUFFER 82
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[507] =
394 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
395 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
396 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
397 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
398 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
399 82, 80, 17, 10, 10, 17, 17, 60, 10, 60,
400 5, 6, 5, 8, 9, 8, 76, 68, 69, 77,
401 74, 77, 75, 79, 68, 69, 79, 80, 21, 10,
402 21, 21, 21, 19, 25, 10, 25, 25, 80, 80,
403 25, 33, 10, 33, 33, 33, 31, 33, 33, 37,
405 10, 37, 55, 10, 55, 55, 55, 53, 55, 55,
406 55, 55, 55, 59, 10, 59, 77, 76, 10, 0,
407 2, 2, 0, 4, 7, 71, 70, 0, 0, 0,
408 0, 0, 0, 0, 20, 22, 0, 0, 0, 32,
409 34, 34, 34, 0, 54, 56, 56, 56, 56, 56,
410 56, 56, 0, 0, 0, 0, 0, 0, 0, 3,
411 0, 0, 0, 0, 0, 0, 0, 78, 0, 0,
412 0, 0, 0, 34, 34, 0, 0, 56, 56, 56,
413 56, 56, 56, 0, 0, 0, 73, 0, 16, 1,
414 0, 0, 66, 0, 0, 0, 63, 62, 0, 0,
416 0, 0, 24, 0, 0, 0, 34, 34, 0, 0,
417 36, 0, 56, 56, 56, 56, 56, 56, 0, 0,
418 58, 0, 0, 0, 0, 67, 61, 0, 0, 0,
419 0, 38, 26, 34, 0, 0, 0, 56, 56, 56,
420 0, 0, 56, 56, 0, 0, 0, 0, 0, 12,
421 0, 64, 65, 18, 0, 38, 26, 0, 0, 0,
422 30, 29, 0, 56, 0, 0, 56, 0, 42, 41,
423 56, 56, 0, 0, 0, 0, 0, 11, 18, 0,
424 0, 28, 27, 0, 35, 56, 0, 40, 39, 0,
425 0, 0, 0, 0, 0, 0, 57, 0, 0, 0,
427 0, 0, 23, 56, 0, 48, 47, 0, 44, 43,
428 0, 46, 45, 0, 0, 0, 0, 56, 72, 0,
429 0, 0, 56, 0, 0, 0, 0, 0, 0, 0,
430 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
431 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
432 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
433 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
434 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
435 0, 0, 0, 0, 0, 0, 12, 0, 12, 0,
436 0, 50, 0, 49, 0, 0, 0, 0, 0, 0,
438 0, 52, 51, 0, 0, 0, 0, 0, 0, 0,
439 11, 0, 0, 0, 0, 0, 0, 0, 0, 0,
440 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
441 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
442 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
443 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
444 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
445 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
446 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
447 0, 0, 0, 0, 0, 0, 0, 0, 0, 13,
452 static yyconst flex_int32_t yy_ec[256] =
454 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
455 1, 2, 4, 1, 1, 1, 1, 1, 1, 1,
456 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
457 1, 2, 5, 6, 7, 1, 1, 8, 9, 1,
458 1, 1, 1, 1, 10, 11, 12, 13, 13, 13,
459 13, 13, 13, 13, 13, 13, 13, 14, 15, 16,
460 17, 18, 19, 1, 20, 21, 22, 23, 24, 21,
461 14, 14, 14, 14, 14, 14, 25, 14, 26, 27,
462 14, 14, 28, 29, 14, 14, 14, 14, 30, 14,
463 31, 1, 32, 1, 14, 1, 33, 34, 35, 36,
465 37, 38, 39, 40, 41, 14, 14, 42, 43, 44,
466 45, 46, 47, 48, 49, 50, 51, 52, 14, 53,
467 14, 14, 1, 1, 1, 1, 1, 1, 1, 1,
468 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
469 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
470 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
471 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
472 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
473 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
474 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
476 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
477 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
478 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
479 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
480 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
484 static yyconst flex_int32_t yy_meta[54] =
486 1, 2, 2, 2, 1, 1, 1, 1, 1, 3,
487 3, 1, 4, 5, 1, 1, 1, 6, 1, 7,
488 7, 7, 7, 7, 5, 5, 5, 5, 5, 5,
489 1, 1, 7, 7, 7, 7, 7, 7, 5, 5,
490 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
494 static yyconst flex_int16_t yy_base[537] =
496 0, 0, 0, 3, 6, 9, 24, 27, 11, 14,
497 15, 17, 29, 38, 45, 52, 59, 61, 67, 70,
498 93, 125, 73, 76, 143, 146, 149, 164, 167, 170,
499 173, 188, 191, 194, 197, 212, 215, 218, 234, 0,
500 286, 289, 292, 295, 311, 0, 363, 366, 368, 370,
501 1447, 1448, 1448, 111, 114, 47, 62, 1448, 117, 159,
502 1448, 1448, 1436, 1448, 1448, 1427, 1448, 1440, 1440, 368,
503 1448, 1448, 1448, 1448, 1438, 1438, 1408, 372, 1448, 221,
504 1421, 0, 183, 1448, 1448, 385, 380, 385, 375, 376,
505 393, 1448, 423, 1420, 0, 207, 1448, 1404, 1403, 1448,
507 426, 404, 1448, 429, 1417, 0, 401, 1448, 1385, 2,
508 1400, 1387, 1398, 1448, 432, 432, 1425, 1397, 436, 34,
509 1375, 1448, 1417, 1408, 1448, 1448, 1448, 37, 39, 1375,
510 1374, 1372, 1404, 1373, 1448, 0, 1381, 1383, 1373, 1448,
511 0, 1383, 1373, 1371, 1448, 0, 1391, 1379, 1368, 1368,
512 1359, 1361, 1371, 1376, 1388, 1387, 1394, 137, 1360, 1448,
513 145, 0, 1356, 1356, 1385, 1384, 1353, 1448, 1364, 439,
514 443, 1357, 1359, 1357, 1356, 446, 450, 1283, 1286, 1274,
515 1273, 1259, 1265, 456, 463, 1275, 1448, 1274, 1448, 1448,
516 66, 1245, 1448, 1190, 1189, 1154, 1448, 1448, 1152, 1155,
518 467, 474, 1448, 480, 1163, 1162, 1156, 484, 500, 503,
519 1448, 506, 1149, 1154, 1145, 512, 1159, 1156, 523, 528,
520 1448, 531, 1165, 385, 534, 1448, 1448, 1172, 1170, 1144,
521 541, 552, 558, 561, 564, 570, 580, 1145, 586, 1141,
522 589, 593, 1142, 1128, 605, 1156, 378, 1139, 608, 1448,
523 1137, 1448, 1448, 611, 616, 625, 628, 633, 637, 645,
524 1448, 1448, 655, 1117, 659, 662, 675, 678, 1448, 1448,
525 686, 691, 694, 1110, 282, 143, 166, 1448, 697, 702,
526 707, 1448, 1448, 715, 1448, 1085, 719, 1448, 1448, 727,
527 732, 743, 746, 754, 759, 770, 1448, 1114, 161, 104,
529 163, 773, 1448, 1024, 776, 1448, 1448, 790, 1448, 1448,
530 798, 1448, 1448, 997, 806, 164, 105, 930, 1448, 809,
531 437, 188, 812, 444, 445, 187, 438, 472, 815, 819,
532 457, 479, 504, 476, 533, 831, 473, 519, 190, 41,
533 482, 532, 839, 928, 867, 872, 854, 847, 540, 856,
534 859, 864, 869, 822, 803, 802, 738, 881, 886, 889,
535 893, 910, 918, 936, 968, 658, 632, 551, 549, 586,
536 928, 603, 986, 649, 292, 1004, 1036, 510, 522, 452,
537 463, 365, 656, 557, 696, 285, 415, 530, 409, 931,
538 301, 1448, 297, 1448, 576, 657, 654, 227, 211, 98,
540 960, 1448, 1448, 620, 697, 719, 5, 714, 735, 765,
541 1448, 999, 780, 1028, 1054, 1062, 1067, 583, 652, 1075,
542 748, 808, 706, 722, 813, 861, 733, 749, 709, 751,
543 788, 821, 812, 837, 606, 607, 868, 885, 862, 880,
544 746, 907, 911, 947, 941, 942, 785, 905, 978, 1007,
545 961, 973, 777, 1006, 976, 980, 1016, 1032, 1044, 1056,
546 1064, 1065, 1069, 1070, 1078, 1079, 1073, 1074, 1083, 1084,
547 1081, 1082, 1092, 1095, 1086, 1087, 1091, 1096, 1101, 1102,
548 1103, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 888, 1122,
549 1114, 1115, 1009, 1127, 1159, 1136, 1140, 1162, 1165, 1448,
551 1168, 1171, 1448, 1188, 1448, 1448, 1206, 1213, 1220, 1227,
552 1234, 1241, 1248, 1255, 1262, 1269, 1276, 1281, 1286, 1291,
553 1298, 1301, 1304, 1307, 1314, 1318, 1324, 1330, 1336, 1343,
554 1350, 1357, 1364, 1371, 1378, 1385
557 static yyconst flex_int16_t yy_def[537] =
559 507, 507, 508, 508, 508, 508, 509, 509, 510, 510,
560 511, 511, 512, 512, 512, 512, 513, 513, 507, 507,
561 514, 514, 515, 515, 515, 515, 507, 507, 515, 515,
562 507, 507, 515, 515, 515, 515, 507, 507, 506, 39,
563 516, 516, 507, 507, 506, 45, 517, 517, 512, 512,
564 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
565 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
566 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
567 506, 518, 506, 506, 506, 506, 506, 506, 506, 506,
568 506, 506, 506, 506, 519, 506, 506, 519, 519, 506,
570 506, 506, 506, 506, 506, 520, 506, 506, 520, 520,
571 520, 520, 520, 506, 506, 506, 506, 506, 506, 521,
572 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
573 506, 506, 506, 506, 506, 518, 522, 506, 506, 506,
574 519, 519, 519, 523, 506, 520, 520, 520, 520, 520,
575 520, 520, 524, 506, 506, 525, 506, 525, 506, 506,
576 506, 526, 506, 506, 506, 506, 506, 506, 506, 527,
577 527, 506, 506, 519, 519, 528, 528, 520, 520, 520,
578 520, 520, 520, 529, 529, 506, 506, 525, 506, 506,
579 525, 506, 506, 526, 506, 506, 506, 506, 506, 506,
581 506, 527, 506, 527, 506, 506, 519, 519, 506, 528,
582 506, 528, 520, 520, 520, 520, 520, 520, 506, 529,
583 506, 529, 506, 525, 530, 506, 506, 506, 506, 506,
584 527, 506, 506, 519, 506, 506, 528, 520, 520, 520,
585 506, 506, 520, 520, 529, 506, 525, 530, 530, 506,
586 530, 506, 506, 506, 527, 506, 506, 506, 506, 506,
587 506, 506, 528, 520, 506, 506, 520, 506, 506, 506,
588 520, 520, 529, 506, 525, 530, 530, 506, 506, 527,
589 506, 506, 506, 506, 506, 520, 506, 506, 506, 506,
590 506, 506, 506, 506, 506, 506, 506, 506, 525, 530,
592 530, 506, 506, 520, 506, 506, 506, 506, 506, 506,
593 506, 506, 506, 506, 525, 530, 530, 520, 506, 525,
594 530, 530, 520, 525, 525, 525, 530, 530, 506, 506,
595 525, 525, 525, 530, 530, 506, 506, 506, 525, 525,
596 525, 530, 530, 506, 506, 506, 506, 525, 525, 525,
597 530, 530, 530, 506, 506, 506, 506, 525, 525, 525,
598 530, 530, 530, 531, 532, 506, 506, 506, 506, 525,
599 525, 525, 530, 533, 534, 531, 532, 506, 506, 506,
600 506, 525, 525, 525, 533, 530, 535, 534, 536, 530,
601 506, 506, 506, 506, 525, 525, 525, 535, 506, 536,
603 530, 506, 506, 525, 525, 525, 506, 525, 525, 525,
604 506, 525, 525, 525, 525, 525, 525, 525, 525, 525,
605 525, 525, 525, 525, 525, 525, 525, 525, 525, 525,
606 525, 525, 525, 525, 525, 525, 525, 525, 525, 525,
607 525, 525, 525, 525, 525, 525, 525, 525, 525, 525,
608 525, 525, 525, 525, 525, 525, 525, 525, 525, 525,
609 525, 525, 525, 525, 525, 525, 525, 525, 525, 525,
610 525, 525, 525, 525, 525, 525, 525, 525, 525, 525,
611 525, 525, 525, 525, 525, 525, 525, 525, 525, 525,
612 525, 525, 525, 525, 525, 525, 525, 525, 525, 506,
614 525, 525, 506, 525, 506, 0, 506, 506, 506, 506,
615 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
616 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
617 506, 506, 506, 506, 506, 506
620 static yyconst flex_int16_t yy_nxt[1502] =
622 506, 54, 55, 54, 54, 55, 54, 54, 55, 54,
623 54, 55, 54, 62, 506, 56, 62, 65, 56, 65,
624 63, 57, 411, 63, 57, 59, 55, 59, 59, 55,
625 59, 68, 69, 66, 148, 66, 70, 71, 149, 60,
626 68, 69, 60, 157, 72, 70, 71, 68, 69, 161,
627 73, 120, 70, 72, 68, 69, 158, 73, 189, 70,
628 72, 75, 76, 75, 76, 121, 120, 72, 55, 55,
629 55, 55, 55, 55, 86, 55, 86, 86, 55, 86,
630 122, 163, 78, 189, 164, 78, 349, 224, 87, 162,
631 77, 87, 77, 79, 80, 55, 80, 79, 79, 79,
633 79, 79, 79, 79, 81, 79, 399, 79, 83, 79,
634 84, 79, 119, 119, 119, 119, 119, 119, 119, 119,
635 119, 250, 250, 79, 79, 79, 80, 55, 80, 79,
636 79, 79, 79, 79, 79, 79, 81, 79, 316, 79,
637 83, 79, 84, 79, 86, 55, 86, 86, 55, 86,
638 55, 55, 55, 322, 189, 79, 79, 161, 88, 193,
639 250, 88, 191, 123, 89, 55, 55, 55, 86, 55,
640 86, 86, 55, 86, 55, 55, 55, 122, 189, 89,
641 250, 250, 87, 250, 315, 87, 300, 123, 90, 55,
642 55, 55, 86, 55, 86, 86, 55, 86, 86, 55,
644 86, 122, 301, 90, 189, 250, 88, 189, 321, 88,
645 317, 123, 91, 86, 55, 86, 55, 55, 55, 55,
646 55, 55, 119, 119, 119, 122, 348, 91, 328, 407,
647 89, 333, 399, 89, 92, 93, 55, 93, 92, 92,
648 92, 92, 92, 92, 92, 94, 92, 95, 92, 96,
649 92, 97, 92, 95, 95, 95, 95, 95, 95, 95,
650 95, 95, 95, 95, 92, 92, 95, 95, 95, 95,
651 95, 95, 95, 95, 95, 98, 95, 99, 95, 95,
652 95, 95, 95, 95, 95, 95, 95, 101, 55, 101,
653 101, 55, 101, 55, 55, 55, 55, 55, 55, 189,
655 386, 102, 250, 251, 102, 403, 402, 90, 299, 389,
656 90, 103, 104, 55, 104, 103, 103, 103, 103, 103,
657 103, 103, 105, 103, 106, 103, 107, 103, 108, 103,
658 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
659 106, 103, 103, 106, 106, 106, 106, 106, 106, 106,
660 106, 109, 110, 106, 111, 106, 106, 106, 106, 112,
661 113, 106, 106, 106, 115, 55, 115, 115, 55, 115,
662 68, 69, 68, 69, 128, 70, 123, 70, 116, 123,
663 123, 116, 189, 117, 123, 117, 119, 119, 119, 123,
664 122, 137, 395, 122, 122, 189, 137, 123, 122, 118,
666 129, 118, 189, 122, 137, 123, 130, 275, 123, 131,
667 134, 122, 138, 247, 132, 144, 138, 399, 139, 122,
668 399, 138, 122, 139, 119, 119, 119, 119, 119, 119,
669 119, 119, 119, 119, 119, 119, 123, 119, 119, 119,
670 201, 201, 201, 153, 201, 201, 201, 209, 209, 209,
671 122, 209, 209, 209, 250, 250, 203, 219, 219, 219,
672 203, 189, 189, 211, 219, 219, 219, 211, 201, 201,
673 201, 394, 327, 221, 189, 201, 201, 201, 334, 331,
674 221, 201, 201, 201, 203, 235, 235, 235, 393, 250,
675 204, 203, 332, 250, 212, 339, 189, 203, 222, 189,
677 236, 209, 209, 209, 209, 209, 209, 209, 209, 209,
678 344, 340, 231, 241, 241, 241, 335, 211, 350, 342,
679 211, 189, 345, 211, 219, 219, 219, 392, 242, 219,
680 219, 219, 219, 219, 219, 249, 249, 249, 386, 341,
681 221, 237, 201, 201, 201, 221, 391, 389, 221, 250,
682 250, 250, 251, 256, 256, 256, 346, 189, 203, 257,
683 257, 257, 258, 258, 258, 235, 235, 235, 347, 245,
684 351, 260, 260, 260, 189, 261, 343, 259, 262, 359,
685 236, 209, 209, 209, 397, 381, 255, 265, 265, 265,
686 241, 241, 241, 189, 268, 268, 268, 211, 269, 380,
688 189, 270, 266, 189, 404, 242, 219, 219, 219, 249,
689 249, 249, 279, 279, 279, 382, 263, 201, 201, 201,
690 189, 423, 221, 189, 189, 250, 256, 256, 256, 257,
691 257, 257, 384, 203, 258, 258, 258, 189, 281, 281,
692 281, 273, 282, 408, 276, 283, 260, 260, 260, 259,
693 261, 441, 442, 262, 386, 280, 284, 284, 284, 277,
694 265, 265, 265, 287, 287, 287, 387, 288, 379, 189,
695 289, 189, 285, 189, 189, 266, 290, 290, 290, 268,
696 268, 268, 406, 269, 405, 396, 270, 292, 292, 292,
697 424, 291, 294, 294, 294, 296, 296, 296, 279, 279,
699 279, 386, 293, 302, 302, 302, 378, 295, 281, 281,
700 281, 297, 282, 387, 189, 283, 284, 284, 284, 303,
701 287, 287, 287, 189, 288, 409, 189, 289, 290, 290,
702 290, 189, 285, 305, 305, 305, 189, 306, 412, 189,
703 307, 435, 410, 291, 292, 292, 292, 308, 308, 308,
704 189, 309, 189, 429, 310, 294, 294, 294, 413, 293,
705 311, 311, 311, 189, 312, 189, 189, 313, 189, 430,
706 295, 296, 296, 296, 302, 302, 302, 305, 305, 305,
707 433, 306, 189, 436, 307, 447, 427, 297, 369, 414,
708 303, 308, 308, 308, 189, 309, 434, 189, 310, 311,
710 311, 311, 189, 312, 416, 189, 313, 320, 320, 320,
711 320, 320, 320, 329, 329, 329, 329, 329, 329, 459,
712 336, 336, 336, 189, 337, 189, 189, 338, 330, 189,
713 189, 330, 336, 336, 336, 437, 337, 453, 189, 338,
714 352, 352, 352, 368, 439, 324, 428, 325, 358, 358,
715 358, 431, 326, 367, 189, 353, 250, 360, 360, 360,
716 361, 361, 361, 366, 189, 352, 352, 352, 438, 440,
717 363, 363, 363, 189, 364, 362, 250, 365, 189, 189,
718 353, 250, 358, 358, 358, 189, 250, 371, 371, 371,
719 360, 360, 360, 495, 361, 361, 361, 189, 189, 432,
721 443, 357, 189, 189, 356, 189, 189, 445, 370, 362,
722 250, 373, 373, 373, 355, 374, 372, 444, 375, 363,
723 363, 363, 189, 364, 189, 446, 365, 250, 189, 371,
724 371, 371, 401, 401, 401, 250, 248, 248, 248, 248,
725 248, 248, 248, 248, 248, 189, 448, 248, 250, 251,
726 248, 248, 248, 250, 248, 383, 449, 454, 189, 189,
727 354, 401, 401, 401, 189, 323, 248, 248, 248, 248,
728 248, 248, 248, 248, 248, 248, 248, 250, 189, 248,
729 451, 452, 248, 248, 248, 250, 248, 373, 373, 373,
730 189, 374, 450, 189, 375, 189, 276, 189, 248, 248,
732 415, 415, 415, 250, 248, 248, 248, 248, 248, 390,
733 248, 248, 248, 457, 498, 248, 189, 455, 248, 248,
734 248, 250, 248, 189, 189, 458, 189, 319, 461, 417,
735 417, 417, 462, 189, 248, 248, 248, 248, 248, 248,
736 248, 248, 248, 248, 390, 189, 456, 248, 460, 189,
737 248, 248, 248, 250, 248, 415, 415, 415, 463, 418,
738 318, 189, 419, 420, 420, 420, 248, 248, 417, 417,
739 417, 189, 421, 189, 464, 422, 420, 420, 420, 189,
740 425, 189, 189, 426, 189, 465, 189, 189, 471, 472,
741 189, 189, 189, 475, 476, 189, 189, 466, 189, 189,
743 189, 189, 479, 189, 189, 480, 467, 468, 189, 189,
744 469, 470, 189, 189, 473, 474, 477, 478, 189, 189,
745 189, 481, 482, 189, 189, 189, 189, 189, 189, 189,
746 495, 189, 189, 314, 304, 498, 485, 486, 298, 189,
747 483, 501, 489, 490, 189, 484, 493, 494, 501, 496,
748 497, 286, 487, 189, 278, 488, 250, 189, 491, 492,
749 499, 499, 499, 502, 502, 502, 499, 499, 499, 504,
750 504, 504, 502, 502, 502, 274, 500, 272, 271, 503,
751 267, 264, 500, 254, 253, 505, 252, 246, 503, 504,
752 504, 504, 244, 243, 240, 239, 238, 234, 233, 232,
754 230, 229, 228, 227, 226, 505, 52, 52, 52, 52,
755 52, 52, 52, 53, 53, 53, 53, 53, 53, 53,
756 58, 58, 58, 58, 58, 58, 58, 61, 61, 61,
757 61, 61, 61, 61, 64, 64, 64, 64, 64, 64,
758 64, 67, 67, 67, 67, 67, 67, 67, 74, 74,
759 74, 74, 74, 74, 74, 82, 82, 82, 82, 82,
760 82, 82, 85, 85, 85, 85, 85, 85, 85, 100,
761 100, 100, 100, 100, 100, 100, 114, 114, 114, 114,
762 114, 114, 114, 136, 136, 136, 225, 136, 141, 141,
763 141, 189, 141, 146, 146, 146, 223, 146, 156, 156,
765 156, 156, 156, 218, 156, 170, 217, 170, 176, 216,
766 176, 184, 215, 184, 188, 188, 188, 188, 188, 188,
767 188, 194, 214, 213, 194, 202, 202, 202, 202, 202,
768 202, 210, 210, 210, 210, 210, 210, 220, 220, 220,
769 220, 220, 220, 248, 248, 248, 248, 248, 248, 248,
770 376, 376, 376, 376, 376, 376, 376, 377, 377, 377,
771 377, 377, 377, 377, 385, 385, 385, 385, 385, 385,
772 385, 388, 388, 388, 388, 388, 388, 388, 398, 398,
773 398, 398, 398, 398, 398, 400, 400, 400, 400, 400,
774 400, 400, 208, 207, 206, 205, 200, 199, 198, 197,
776 196, 195, 192, 190, 189, 187, 186, 185, 183, 182,
777 181, 180, 179, 178, 177, 175, 174, 173, 172, 171,
778 169, 168, 167, 166, 165, 160, 157, 159, 155, 154,
779 152, 151, 150, 147, 145, 143, 142, 140, 135, 133,
780 127, 126, 127, 126, 125, 124, 506, 51, 506, 506,
781 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
782 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
783 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
784 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
785 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
790 static yyconst flex_int16_t yy_chk[1502] =
792 0, 3, 3, 3, 4, 4, 4, 5, 5, 5,
793 6, 6, 6, 9, 0, 3, 10, 11, 4, 12,
794 9, 5, 407, 10, 6, 7, 7, 7, 8, 8,
795 8, 13, 13, 11, 110, 12, 13, 13, 110, 7,
796 14, 14, 8, 120, 13, 14, 14, 15, 15, 128,
797 15, 56, 15, 14, 16, 16, 120, 16, 340, 16,
798 15, 17, 17, 18, 18, 56, 57, 16, 19, 19,
799 19, 20, 20, 20, 23, 23, 23, 24, 24, 24,
800 57, 129, 19, 191, 129, 20, 340, 191, 23, 128,
801 17, 24, 18, 21, 21, 21, 21, 21, 21, 21,
803 21, 21, 21, 21, 21, 21, 400, 21, 21, 21,
804 21, 21, 54, 54, 54, 55, 55, 55, 59, 59,
805 59, 300, 317, 21, 21, 22, 22, 22, 22, 22,
806 22, 22, 22, 22, 22, 22, 22, 22, 300, 22,
807 22, 22, 22, 22, 25, 25, 25, 26, 26, 26,
808 27, 27, 27, 317, 158, 22, 22, 161, 25, 161,
809 276, 26, 158, 60, 27, 28, 28, 28, 29, 29,
810 29, 30, 30, 30, 31, 31, 31, 60, 299, 28,
811 301, 316, 29, 277, 299, 30, 276, 83, 31, 32,
812 32, 32, 33, 33, 33, 34, 34, 34, 35, 35,
814 35, 83, 277, 32, 326, 322, 33, 339, 316, 34,
815 301, 96, 35, 36, 36, 36, 37, 37, 37, 38,
816 38, 38, 80, 80, 80, 96, 339, 36, 322, 399,
817 37, 326, 398, 38, 39, 39, 39, 39, 39, 39,
818 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
819 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
820 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
821 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
822 39, 39, 39, 39, 39, 39, 39, 41, 41, 41,
823 42, 42, 42, 43, 43, 43, 44, 44, 44, 275,
825 375, 41, 386, 386, 42, 393, 391, 43, 275, 375,
826 44, 45, 45, 45, 45, 45, 45, 45, 45, 45,
827 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
828 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
829 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
830 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
831 45, 45, 45, 45, 47, 47, 47, 48, 48, 48,
832 49, 49, 50, 50, 70, 49, 78, 50, 47, 89,
833 90, 48, 382, 49, 87, 50, 86, 86, 86, 88,
834 78, 87, 382, 89, 90, 247, 88, 91, 87, 49,
836 70, 50, 224, 88, 91, 107, 70, 247, 102, 70,
837 78, 91, 90, 224, 70, 102, 87, 389, 89, 107,
838 387, 88, 102, 87, 93, 93, 93, 101, 101, 101,
839 104, 104, 104, 115, 115, 115, 116, 119, 119, 119,
840 170, 170, 170, 116, 171, 171, 171, 176, 176, 176,
841 116, 177, 177, 177, 321, 327, 170, 184, 184, 184,
842 171, 324, 325, 176, 185, 185, 185, 177, 201, 201,
843 201, 381, 321, 184, 331, 202, 202, 202, 327, 324,
844 185, 204, 204, 204, 201, 208, 208, 208, 380, 328,
845 171, 202, 325, 334, 177, 331, 332, 204, 185, 341,
847 208, 209, 209, 209, 210, 210, 210, 212, 212, 212,
848 337, 332, 204, 216, 216, 216, 328, 209, 341, 334,
849 210, 333, 337, 212, 219, 219, 219, 379, 216, 220,
850 220, 220, 222, 222, 222, 225, 225, 225, 388, 333,
851 219, 212, 231, 231, 231, 220, 378, 388, 222, 342,
852 335, 225, 225, 232, 232, 232, 338, 349, 231, 233,
853 233, 233, 234, 234, 234, 235, 235, 235, 338, 222,
854 342, 236, 236, 236, 384, 236, 335, 234, 236, 349,
855 235, 237, 237, 237, 384, 369, 231, 239, 239, 239,
856 241, 241, 241, 395, 242, 242, 242, 237, 242, 368,
858 418, 242, 239, 370, 395, 241, 245, 245, 245, 249,
859 249, 249, 254, 254, 254, 370, 237, 255, 255, 255,
860 372, 418, 245, 435, 436, 249, 256, 256, 256, 257,
861 257, 257, 372, 255, 258, 258, 258, 404, 259, 259,
862 259, 245, 259, 404, 249, 259, 260, 260, 260, 258,
863 260, 435, 436, 260, 374, 255, 263, 263, 263, 249,
864 265, 265, 265, 266, 266, 266, 374, 266, 367, 419,
865 266, 397, 263, 383, 396, 265, 267, 267, 267, 268,
866 268, 268, 397, 268, 396, 383, 268, 271, 271, 271,
867 419, 267, 272, 272, 272, 273, 273, 273, 279, 279,
869 279, 385, 271, 280, 280, 280, 366, 272, 281, 281,
870 281, 273, 281, 385, 405, 281, 284, 284, 284, 280,
871 287, 287, 287, 423, 287, 405, 429, 287, 290, 290,
872 290, 408, 284, 291, 291, 291, 406, 291, 408, 424,
873 291, 429, 406, 290, 292, 292, 292, 293, 293, 293,
874 427, 293, 409, 423, 293, 294, 294, 294, 409, 292,
875 295, 295, 295, 441, 295, 421, 428, 295, 430, 424,
876 294, 296, 296, 296, 302, 302, 302, 305, 305, 305,
877 427, 305, 410, 430, 305, 441, 421, 296, 357, 410,
878 302, 308, 308, 308, 453, 308, 428, 413, 308, 311,
880 311, 311, 447, 311, 413, 431, 311, 315, 315, 315,
881 320, 320, 320, 323, 323, 323, 329, 329, 329, 453,
882 330, 330, 330, 315, 330, 422, 320, 330, 323, 433,
883 425, 329, 336, 336, 336, 431, 336, 447, 432, 336,
884 343, 343, 343, 356, 433, 320, 422, 320, 348, 348,
885 348, 425, 320, 355, 434, 343, 343, 350, 350, 350,
886 351, 351, 351, 354, 348, 352, 352, 352, 432, 434,
887 353, 353, 353, 350, 353, 351, 351, 353, 426, 439,
888 352, 352, 358, 358, 358, 437, 353, 359, 359, 359,
889 360, 360, 360, 489, 361, 361, 361, 440, 358, 426,
891 437, 347, 438, 359, 346, 489, 360, 439, 358, 361,
892 361, 362, 362, 362, 345, 362, 360, 438, 362, 363,
893 363, 363, 448, 363, 442, 440, 363, 362, 443, 371,
894 371, 371, 390, 390, 390, 363, 364, 364, 364, 364,
895 364, 364, 364, 364, 364, 371, 442, 364, 390, 390,
896 364, 364, 364, 364, 364, 371, 443, 448, 445, 446,
897 344, 401, 401, 401, 444, 318, 364, 364, 365, 365,
898 365, 365, 365, 365, 365, 365, 365, 401, 451, 365,
899 445, 446, 365, 365, 365, 365, 365, 373, 373, 373,
900 452, 373, 444, 455, 373, 449, 401, 456, 365, 365,
902 412, 412, 412, 373, 376, 376, 376, 376, 376, 376,
903 376, 376, 376, 451, 493, 376, 412, 449, 376, 376,
904 376, 376, 376, 454, 450, 452, 493, 314, 455, 414,
905 414, 414, 456, 457, 376, 376, 377, 377, 377, 377,
906 377, 377, 377, 377, 377, 414, 450, 377, 454, 458,
907 377, 377, 377, 377, 377, 415, 415, 415, 457, 415,
908 304, 459, 415, 416, 416, 416, 377, 377, 417, 417,
909 417, 415, 417, 460, 458, 417, 420, 420, 420, 416,
910 420, 461, 462, 420, 417, 459, 463, 464, 465, 466,
911 467, 468, 420, 469, 470, 465, 466, 460, 471, 472,
913 469, 470, 473, 475, 476, 474, 461, 462, 477, 473,
914 463, 464, 474, 478, 467, 468, 471, 472, 479, 480,
915 481, 475, 476, 482, 483, 484, 485, 486, 487, 488,
916 490, 491, 492, 298, 286, 494, 479, 480, 274, 490,
917 477, 496, 483, 484, 494, 478, 487, 488, 497, 491,
918 492, 264, 481, 496, 251, 482, 248, 497, 485, 486,
919 495, 495, 495, 498, 498, 498, 499, 499, 499, 501,
920 501, 501, 502, 502, 502, 246, 495, 244, 243, 498,
921 240, 238, 499, 230, 229, 501, 228, 223, 502, 504,
922 504, 504, 218, 217, 215, 214, 213, 207, 206, 205,
924 200, 199, 196, 195, 194, 504, 507, 507, 507, 507,
925 507, 507, 507, 508, 508, 508, 508, 508, 508, 508,
926 509, 509, 509, 509, 509, 509, 509, 510, 510, 510,
927 510, 510, 510, 510, 511, 511, 511, 511, 511, 511,
928 511, 512, 512, 512, 512, 512, 512, 512, 513, 513,
929 513, 513, 513, 513, 513, 514, 514, 514, 514, 514,
930 514, 514, 515, 515, 515, 515, 515, 515, 515, 516,
931 516, 516, 516, 516, 516, 516, 517, 517, 517, 517,
932 517, 517, 517, 518, 518, 518, 192, 518, 519, 519,
933 519, 188, 519, 520, 520, 520, 186, 520, 521, 521,
935 521, 521, 521, 183, 521, 522, 182, 522, 523, 181,
936 523, 524, 180, 524, 525, 525, 525, 525, 525, 525,
937 525, 526, 179, 178, 526, 527, 527, 527, 527, 527,
938 527, 528, 528, 528, 528, 528, 528, 529, 529, 529,
939 529, 529, 529, 530, 530, 530, 530, 530, 530, 530,
940 531, 531, 531, 531, 531, 531, 531, 532, 532, 532,
941 532, 532, 532, 532, 533, 533, 533, 533, 533, 533,
942 533, 534, 534, 534, 534, 534, 534, 534, 535, 535,
943 535, 535, 535, 535, 535, 536, 536, 536, 536, 536,
944 536, 536, 175, 174, 173, 172, 169, 167, 166, 165,
946 164, 163, 159, 157, 156, 155, 154, 153, 152, 151,
947 150, 149, 148, 147, 144, 143, 142, 139, 138, 137,
948 134, 133, 132, 131, 130, 124, 123, 121, 118, 117,
949 113, 112, 111, 109, 105, 99, 98, 94, 81, 77,
950 76, 75, 69, 68, 66, 63, 51, 506, 506, 506,
951 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
952 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
953 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
954 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
955 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
960 /* Table of booleans, true if rule could match eol. */
961 static yyconst flex_int32_t yy_rule_can_match_eol[82] =
963 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0,
964 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1,
965 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0,
966 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0,
969 static yy_state_type yy_last_accepting_state;
970 static char *yy_last_accepting_cpos;
972 extern int xbt_graph_parse__flex_debug;
973 int xbt_graph_parse__flex_debug = 0;
975 /* The intent behind this definition is that it'll catch
976 * any uses of REJECT which flex missed.
978 #define REJECT reject_used_but_not_detected
979 #define yymore() yymore_used_but_not_detected
980 #define YY_MORE_ADJ 0
981 #define YY_RESTORE_YY_MORE_OFFSET
982 char *xbt_graph_parse_text;
983 #line 1 "xbt/graphxml.l"
984 /* Validating XML processor for graphxml.dtd.
985 * Generated 2006/03/21 13:43:39.
987 * This program was generated with the FleXML XML processor generator.
988 * FleXML is Copyright © 1999-2005 Kristoffer Rose. All rights reserved.
989 * (Id: flexml.pl,v 1.47 2006/03/21 11:12:57 legranda Exp).
991 * There are two, intertwined parts to this program, part A and part B.
996 * Some parts, here collectively called "Part A", are found in the
997 * FleXML package. They are Copyright © 1999-2005 Kristoffer Rose.
998 * All rights reserved.
1000 * You can redistribute, use, perform, display and/or modify "Part A"
1001 * provided the following two conditions hold:
1003 * 1. The program is distributed WITHOUT ANY WARRANTY from the author of
1004 * FleXML; without even the implied warranty of MERCHANTABILITY or
1005 * FITNESS FOR A PARTICULAR PURPOSE.
1007 * 2. The program distribution conditions do not in any way affect the
1008 * distribution conditions of the FleXML system used to generate this
1009 * file or any version of FleXML derived from that system.
1011 * Notice that these are explicit rights granted to you for files
1012 * generated by the FleXML system. For your rights in connection with
1013 * the FleXML system itself please consult the GNU General Public License.
1018 * The other parts, here collectively called "Part B", and which came
1019 * from the DTD used by FleXML to generate this program, can be
1020 * distributed (or not, as the case may be) under the terms of whoever
1021 * wrote them, provided these terms respect and obey the two conditions
1022 * above under the heading "Part A".
1024 * The author of and contributors to FleXML specifically disclaim
1025 * any copyright interest in "Part B", unless "Part B" was written
1026 * by the author of or contributors to FleXML.
1029 #line 48 "xbt/graphxml.l"
1031 /* Version strings. */
1032 const char rcs_graphxml_flexml_skeleton[] =
1033 "$" "Id: skel,v 1.28 2006/03/21 12:04:13 legranda Exp $";
1034 const char rcs_graphxml_flexml[] =
1035 "$" "Id: flexml.pl,v 1.47 2006/03/21 11:12:57 legranda Exp $";
1045 /* Generated definitions. */
1046 #define FLEXML_yylineno
1047 #define FLEXML_BUFFERSTACKSIZE 1000000
1049 /* XML processor api. */
1050 /* FleXML-provided data. */
1052 AT_graphxml_node_name A_graphxml_node_name;
1053 AT_graphxml_edge_source A_graphxml_edge_source;
1054 AT_graphxml_edge_isDirected A_graphxml_edge_isDirected;
1055 AT_graphxml_edge_target A_graphxml_edge_target;
1056 AT_graphxml_node_label A_graphxml_node_label;
1057 AT_graphxml_edge_label A_graphxml_edge_label;
1058 AT_graphxml_edge_name A_graphxml_edge_name;
1059 AT_graphxml_edge_length A_graphxml_edge_length;
1063 # define ENTER(state) debug_enter(state,#state)
1064 # define LEAVE debug_leave()
1065 # define SET(state) debug_set(state,#state)
1066 static void debug_enter(int, const char*);
1067 static void debug_leave(void);
1068 static void debug_set(int, const char*);
1070 # define ENTER(state) (yy_push_state(state))
1071 # define LEAVE (yy_pop_state())
1072 # define SET(state) BEGIN(state)
1075 /* Generic actions. */
1076 #define SKIP /*skip*/
1077 #define SUCCEED CLEANUP; return 0
1079 #define FAIL return fail
1080 static int fail(const char*, ...);
1081 const char * graphxml_parse_err_msg(void);
1084 static void cleanup(void);
1085 #define CLEANUP cleanup()
1087 /* Text buffer stack handling. */
1088 char bufferstack[FLEXML_BUFFERSTACKSIZE];
1089 static char* limit = bufferstack + FLEXML_BUFFERSTACKSIZE;
1090 typedef struct BufferLast_s {
1091 struct BufferLast_s *old; char* saved; char new1[1];
1093 #ifdef FLEXML_HasMixed
1094 static BufferLast* last = (BufferLast*)0;
1096 static char* next = bufferstack;
1098 #define BUFFERSET(P) (P = next)
1099 #define BUFFERPUTC(C) (assert(next<limit), *(next++) = (C))
1100 #define BUFFERDONE (BUFFERPUTC('\0'))
1102 #define BUFFERLITERAL(C,P) bufferliteral(C,&(P),xbt_graph_parse_text)
1103 static void bufferliteral(char c, const char** pp, char* text)
1105 char *s = strchr(text,c), *e = strrchr(text,c);
1106 assert(s <= e); BUFFERSET(*pp);
1108 if (isspace(*s)) { BUFFERPUTC(' '); while (isspace(*s)) ++s; }
1109 else BUFFERPUTC(*s);
1114 #ifdef FLEXML_HasMixed
1115 static void pushbuffer(char* p)
1117 BufferLast* l = (BufferLast*)next;
1118 assert(next < limit);
1125 static char* popbuffer(void)
1127 BufferLast* l = last;
1128 assert(last != (BufferLast*)0);
1135 /* General internal entities are `unput' back onto the input stream... */
1136 #define ENTITYTEXT(T) \
1137 { char *s = (T), *e = s+strlen(s);\
1138 while (--e >= s) { unput(*e); }}
1139 /* Flex standard options. */
1140 #define YY_NO_INPUT 1
1141 /* Flex user-requested options. */
1142 /* XML character classes (currently restricted to ASCII). */
1143 /* "Common syntactic structures." */
1144 /* "Names and Tokens." */
1145 /* Miscellaneous. */
1146 /* Parser states (flex `exclusive start conditions'):
1148 * PROLOG the XML prolog of the document before <?xml...>
1149 * DOCTYPE the XML prolog of the document after <?xml...>
1150 * EPILOG after the root element
1151 * INCOMMENT inside an XML comment <!--....-->
1152 * INPI inside an XML PI <?...?>
1153 * VALUE1 inside a '...'-delimited literal
1154 * VALUE2 inside a "..."-delimited literal
1155 * CDATA inside a <![CDATA[...] ]> section.
1156 * ROOT_<tag> expect root element <tag>
1157 * AL_<tag> inside the attribute list for <tag>
1158 * IN_<tag> inside a <tag> with element contents (ready for end tag)
1159 * IMPOSSIBLE dummy to permit disabling rules; must be last
1166 #line 211 "xbt/graphxml.l"
1168 const char* *graphxml_statenames=NULL;
1169 #line 1170 "xbt/graphxml.c"
1180 #define ROOT_graphxml_graph 9
1181 #define AL_graphxml_graph 10
1182 #define S_graphxml_graph 11
1183 #define S_graphxml_graph_1 12
1184 #define S_graphxml_graph_2 13
1185 #define S_graphxml_graph_3 14
1186 #define S_graphxml_graph_4 15
1187 #define S_graphxml_graph_5 16
1188 #define E_graphxml_graph 17
1189 #define ROOT_graphxml_node 18
1190 #define AL_graphxml_node 19
1191 #define E_graphxml_node 20
1192 #define ROOT_graphxml_edge 21
1193 #define AL_graphxml_edge 22
1194 #define E_graphxml_edge 23
1195 #define IMPOSSIBLE 24
1197 #ifndef YY_NO_UNISTD_H
1198 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1199 * down here because we want the user's section 1 to have been scanned first.
1200 * The user has a chance to override it with an option.
1205 #ifndef YY_EXTRA_TYPE
1206 #define YY_EXTRA_TYPE void *
1209 static int yy_init_globals (void );
1211 /* Macros after this point can all be overridden by user definitions in
1215 #ifndef YY_SKIP_YYWRAP
1217 extern "C" int xbt_graph_parse_wrap (void );
1219 extern int xbt_graph_parse_wrap (void );
1224 static void yy_flex_strncpy (char *,yyconst char *,int );
1227 #ifdef YY_NEED_STRLEN
1228 static int yy_flex_strlen (yyconst char * );
1234 static int yyinput (void );
1236 static int input (void );
1241 static int yy_start_stack_ptr = 0;
1242 static int yy_start_stack_depth = 0;
1243 static int *yy_start_stack = NULL;
1245 static void yy_push_state (int new_state );
1247 static void yy_pop_state (void );
1249 /* Amount of stuff to slurp up with each read. */
1250 #ifndef YY_READ_BUF_SIZE
1251 #define YY_READ_BUF_SIZE 8192
1254 /* Copy whatever the last rule matched to the standard output. */
1256 /* This used to be an fputs(), but since the string might contain NUL's,
1257 * we now use fwrite().
1259 #define ECHO (void) fwrite( xbt_graph_parse_text, xbt_graph_parse_leng, 1, xbt_graph_parse_out )
1262 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1263 * is returned in "result".
1266 #define YY_INPUT(buf,result,max_size) \
1267 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1271 for ( n = 0; n < max_size && \
1272 (c = getc( xbt_graph_parse_in )) != EOF && c != '\n'; ++n ) \
1273 buf[n] = (char) c; \
1275 buf[n++] = (char) c; \
1276 if ( c == EOF && ferror( xbt_graph_parse_in ) ) \
1277 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1283 while ( (result = fread(buf, 1, max_size, xbt_graph_parse_in))==0 && ferror(xbt_graph_parse_in)) \
1285 if( errno != EINTR) \
1287 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1291 clearerr(xbt_graph_parse_in); \
1298 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1299 * we don't want an extra ';' after the "return" because that will cause
1300 * some compilers to complain about unreachable statements.
1303 #define yyterminate() return YY_NULL
1306 /* Number of entries by which start-condition stack grows. */
1307 #ifndef YY_START_STACK_INCR
1308 #define YY_START_STACK_INCR 25
1311 /* Report a fatal error. */
1312 #ifndef YY_FATAL_ERROR
1313 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1316 /* end tables serialization structures and prototypes */
1318 /* Default declaration of generated scanner - a define so the user can
1319 * easily add parameters.
1322 #define YY_DECL_IS_OURS 1
1324 extern int xbt_graph_parse_lex (void);
1326 #define YY_DECL int xbt_graph_parse_lex (void)
1327 #endif /* !YY_DECL */
1329 /* Code executed at the beginning of each rule, after xbt_graph_parse_text and xbt_graph_parse_leng
1332 #ifndef YY_USER_ACTION
1333 #define YY_USER_ACTION
1336 /* Code executed at the end of each rule. */
1338 #define YY_BREAK break;
1341 #define YY_RULE_SETUP \
1344 /** The main scanner function which does all the work.
1348 register yy_state_type yy_current_state;
1349 register char *yy_cp, *yy_bp;
1350 register int yy_act;
1352 #line 215 "xbt/graphxml.l"
1355 /* Bypass Flex's default INITIAL state and begin by parsing the XML prolog. */
1359 if(!graphxml_statenames) {graphxml_statenames= (const char **)calloc(IMPOSSIBLE,sizeof(char*));
1360 graphxml_statenames[PROLOG] = NULL;
1361 graphxml_statenames[DOCTYPE] = NULL;
1362 graphxml_statenames[EPILOG] = NULL;
1363 graphxml_statenames[INCOMMENT] = NULL;
1364 graphxml_statenames[INPI] = NULL;
1365 graphxml_statenames[VALUE1] = NULL;
1366 graphxml_statenames[VALUE2] = NULL;
1367 graphxml_statenames[CDATA] = NULL;
1368 graphxml_statenames[ROOT_graphxml_graph] = NULL;
1369 graphxml_statenames[AL_graphxml_graph] = NULL;
1370 graphxml_statenames[S_graphxml_graph] = "graph";
1371 graphxml_statenames[S_graphxml_graph_1] = "graph";
1372 graphxml_statenames[S_graphxml_graph_2] = "graph";
1373 graphxml_statenames[S_graphxml_graph_3] = "graph";
1374 graphxml_statenames[S_graphxml_graph_4] = "graph";
1375 graphxml_statenames[S_graphxml_graph_5] = "graph";
1376 graphxml_statenames[E_graphxml_graph] = "graph";
1377 graphxml_statenames[ROOT_graphxml_node] = NULL;
1378 graphxml_statenames[AL_graphxml_node] = NULL;
1379 graphxml_statenames[E_graphxml_node] = "node";
1380 graphxml_statenames[ROOT_graphxml_edge] = NULL;
1381 graphxml_statenames[AL_graphxml_edge] = NULL;
1382 graphxml_statenames[E_graphxml_edge] = "edge";
1385 /* COMMENTS and PIs: handled uniformly for efficiency. */
1387 #line 1388 "xbt/graphxml.c"
1398 (yy_start) = 1; /* first start state */
1400 if ( ! xbt_graph_parse_in )
1401 xbt_graph_parse_in = stdin;
1403 if ( ! xbt_graph_parse_out )
1404 xbt_graph_parse_out = stdout;
1406 if ( ! YY_CURRENT_BUFFER ) {
1407 xbt_graph_parse_ensure_buffer_stack ();
1408 YY_CURRENT_BUFFER_LVALUE =
1409 xbt_graph_parse__create_buffer(xbt_graph_parse_in,YY_BUF_SIZE );
1412 xbt_graph_parse__load_buffer_state( );
1415 while ( 1 ) /* loops until end-of-file is reached */
1417 yy_cp = (yy_c_buf_p);
1419 /* Support of xbt_graph_parse_text. */
1420 *yy_cp = (yy_hold_char);
1422 /* yy_bp points to the position in yy_ch_buf of the start of
1427 yy_current_state = (yy_start);
1431 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1432 if ( yy_accept[yy_current_state] )
1434 (yy_last_accepting_state) = yy_current_state;
1435 (yy_last_accepting_cpos) = yy_cp;
1437 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1439 yy_current_state = (int) yy_def[yy_current_state];
1440 if ( yy_current_state >= 507 )
1441 yy_c = yy_meta[(unsigned int) yy_c];
1443 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1446 while ( yy_base[yy_current_state] != 1448 );
1449 yy_act = yy_accept[yy_current_state];
1451 { /* have to back up */
1452 yy_cp = (yy_last_accepting_cpos);
1453 yy_current_state = (yy_last_accepting_state);
1454 yy_act = yy_accept[yy_current_state];
1457 YY_DO_BEFORE_ACTION;
1459 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
1462 for ( yyl = 0; yyl < xbt_graph_parse_leng; ++yyl )
1463 if ( xbt_graph_parse_text[yyl] == '\n' )
1465 xbt_graph_parse_lineno++;
1469 do_action: /* This label is used only to access EOF actions. */
1472 { /* beginning of action switch */
1473 case 0: /* must back up */
1474 /* undo the effects of YY_DO_BEFORE_ACTION */
1475 *yy_cp = (yy_hold_char);
1476 yy_cp = (yy_last_accepting_cpos);
1477 yy_current_state = (yy_last_accepting_state);
1478 goto yy_find_action;
1482 #line 250 "xbt/graphxml.l"
1487 #line 251 "xbt/graphxml.l"
1494 #line 254 "xbt/graphxml.l"
1498 #line 256 "xbt/graphxml.l"
1500 #line 257 "xbt/graphxml.l"
1502 /* rule 6 can match eol */
1504 #line 257 "xbt/graphxml.l"
1507 case YY_STATE_EOF(INCOMMENT):
1508 #line 258 "xbt/graphxml.l"
1509 FAIL("EOF in comment.");
1515 #line 261 "xbt/graphxml.l"
1519 #line 263 "xbt/graphxml.l"
1521 /* rule 9 can match eol */
1523 #line 263 "xbt/graphxml.l"
1526 case YY_STATE_EOF(INPI):
1527 #line 264 "xbt/graphxml.l"
1528 FAIL("EOF in PI (processing instruction).");
1531 /* SPACES: skipped uniformly */
1533 /* rule 10 can match eol */
1535 #line 269 "xbt/graphxml.l"
1538 /* PROLOG: determine root element and process it. */
1541 /* rule 11 can match eol */
1543 #line 274 "xbt/graphxml.l"
1547 /* rule 12 can match eol */
1549 #line 275 "xbt/graphxml.l"
1550 FAIL("Bad declaration %s.",xbt_graph_parse_text);
1555 /* rule 13 can match eol */
1557 #line 279 "xbt/graphxml.l"
1558 SET(ROOT_graphxml_edge);
1561 /* rule 14 can match eol */
1563 #line 280 "xbt/graphxml.l"
1564 SET(ROOT_graphxml_node);
1567 /* rule 15 can match eol */
1569 #line 281 "xbt/graphxml.l"
1570 SET(ROOT_graphxml_graph);
1573 /* rule 16 can match eol */
1575 #line 282 "xbt/graphxml.l"
1576 FAIL("Bad declaration %s.",xbt_graph_parse_text);
1580 #line 283 "xbt/graphxml.l"
1581 FAIL("Unexpected character `%c' in prolog.", xbt_graph_parse_text[0]);
1583 case YY_STATE_EOF(PROLOG):
1584 case YY_STATE_EOF(DOCTYPE):
1585 #line 284 "xbt/graphxml.l"
1586 FAIL("EOF in prolog.");
1589 /* RULES DERIVED FROM DTD. */
1590 /* <!-- Small DTD for xbt graphs. --> */
1592 /* rule 18 can match eol */
1594 #line 291 "xbt/graphxml.l"
1596 ENTER(AL_graphxml_graph);
1602 #line 296 "xbt/graphxml.l"
1604 LEAVE; STag_graphxml_graph();pcdata = NULL; ENTER(S_graphxml_graph);
1609 #line 299 "xbt/graphxml.l"
1611 LEAVE; STag_graphxml_graph(); pcdata = NULL; ETag_graphxml_graph();
1613 case ROOT_graphxml_graph: SET(EPILOG); break;
1619 #line 305 "xbt/graphxml.l"
1620 FAIL("Unexpected character `%c' in attribute list of graph element.", xbt_graph_parse_text[0]);
1624 #line 306 "xbt/graphxml.l"
1625 FAIL("Bad attribute `%s' in `graph' element start tag.",xbt_graph_parse_text);
1627 case YY_STATE_EOF(AL_graphxml_graph):
1628 #line 307 "xbt/graphxml.l"
1629 FAIL("EOF in attribute list of `graph' element.");
1634 /* rule 23 can match eol */
1636 #line 311 "xbt/graphxml.l"
1639 ETag_graphxml_graph();
1641 case ROOT_graphxml_graph: SET(EPILOG); break;
1646 /* rule 24 can match eol */
1648 #line 318 "xbt/graphxml.l"
1649 FAIL("Unexpected end-tag `%s': `</graph>' expected.",xbt_graph_parse_text);
1653 #line 319 "xbt/graphxml.l"
1654 FAIL("Unexpected character `%c': `</graph>' expected.",xbt_graph_parse_text[0]);
1656 case YY_STATE_EOF(S_graphxml_graph_1):
1657 case YY_STATE_EOF(E_graphxml_graph):
1658 case YY_STATE_EOF(S_graphxml_graph_3):
1659 case YY_STATE_EOF(S_graphxml_graph_5):
1660 case YY_STATE_EOF(S_graphxml_graph):
1661 #line 320 "xbt/graphxml.l"
1662 FAIL("Premature EOF: `</graph>' expected.");
1666 * name CDATA #REQUIRED
1669 /* rule 26 can match eol */
1671 #line 327 "xbt/graphxml.l"
1673 A_graphxml_node_label = NULL;
1674 A_graphxml_node_name = NULL;
1675 ENTER(AL_graphxml_node);
1680 /* rule 27 can match eol */
1682 #line 334 "xbt/graphxml.l"
1683 ENTER(VALUE1); BUFFERSET(A_graphxml_node_label);
1686 /* rule 28 can match eol */
1688 #line 335 "xbt/graphxml.l"
1689 ENTER(VALUE2); BUFFERSET(A_graphxml_node_label);
1692 /* rule 29 can match eol */
1694 #line 337 "xbt/graphxml.l"
1695 ENTER(VALUE1); BUFFERSET(A_graphxml_node_name);
1698 /* rule 30 can match eol */
1700 #line 338 "xbt/graphxml.l"
1701 ENTER(VALUE2); BUFFERSET(A_graphxml_node_name);
1705 #line 340 "xbt/graphxml.l"
1707 if (!A_graphxml_node_name) FAIL("Required attribute `name' not set for `node' element.");
1708 LEAVE; STag_graphxml_node();pcdata = NULL; ENTER(E_graphxml_node);
1713 #line 344 "xbt/graphxml.l"
1715 if (!A_graphxml_node_name) FAIL("Required attribute `name' not set for `node' element.");
1716 LEAVE; STag_graphxml_node(); pcdata = NULL; ETag_graphxml_node();
1718 case S_graphxml_graph_2: case S_graphxml_graph_3: case S_graphxml_graph: SET(S_graphxml_graph_3); break;
1719 case ROOT_graphxml_node: SET(EPILOG); break;
1725 #line 352 "xbt/graphxml.l"
1726 FAIL("Unexpected character `%c' in attribute list of node element.", xbt_graph_parse_text[0]);
1730 #line 353 "xbt/graphxml.l"
1731 FAIL("Bad attribute `%s' in `node' element start tag.",xbt_graph_parse_text);
1733 case YY_STATE_EOF(AL_graphxml_node):
1734 #line 354 "xbt/graphxml.l"
1735 FAIL("EOF in attribute list of `node' element.");
1740 /* rule 35 can match eol */
1742 #line 358 "xbt/graphxml.l"
1745 ETag_graphxml_node();
1747 case S_graphxml_graph_2: case S_graphxml_graph_3: case S_graphxml_graph: SET(S_graphxml_graph_3); break;
1748 case ROOT_graphxml_node: SET(EPILOG); break;
1753 /* rule 36 can match eol */
1755 #line 366 "xbt/graphxml.l"
1756 FAIL("Unexpected end-tag `%s': `</node>' expected.",xbt_graph_parse_text);
1760 #line 367 "xbt/graphxml.l"
1761 FAIL("Unexpected character `%c': `</node>' expected.",xbt_graph_parse_text[0]);
1763 case YY_STATE_EOF(E_graphxml_node):
1764 #line 368 "xbt/graphxml.l"
1765 FAIL("Premature EOF: `</node>' expected.");
1769 * name CDATA #IMPLIED
1770 * source CDATA #REQUIRED
1771 * target CDATA #REQUIRED
1772 * length CDATA "0.0"
1773 * isDirected (true|false) "true"
1776 /* rule 38 can match eol */
1778 #line 379 "xbt/graphxml.l"
1780 A_graphxml_edge_label = NULL;
1781 A_graphxml_edge_name = NULL;
1782 A_graphxml_edge_source = NULL;
1783 A_graphxml_edge_target = NULL;
1784 A_graphxml_edge_length = "0.0";
1785 A_graphxml_edge_isDirected = A_graphxml_edge_isDirected_true;
1786 ENTER(AL_graphxml_edge);
1791 /* rule 39 can match eol */
1793 #line 390 "xbt/graphxml.l"
1794 ENTER(VALUE1); BUFFERSET(A_graphxml_edge_label);
1797 /* rule 40 can match eol */
1799 #line 391 "xbt/graphxml.l"
1800 ENTER(VALUE2); BUFFERSET(A_graphxml_edge_label);
1803 /* rule 41 can match eol */
1805 #line 393 "xbt/graphxml.l"
1806 ENTER(VALUE1); BUFFERSET(A_graphxml_edge_name);
1809 /* rule 42 can match eol */
1811 #line 394 "xbt/graphxml.l"
1812 ENTER(VALUE2); BUFFERSET(A_graphxml_edge_name);
1815 /* rule 43 can match eol */
1817 #line 396 "xbt/graphxml.l"
1818 ENTER(VALUE1); BUFFERSET(A_graphxml_edge_source);
1821 /* rule 44 can match eol */
1823 #line 397 "xbt/graphxml.l"
1824 ENTER(VALUE2); BUFFERSET(A_graphxml_edge_source);
1827 /* rule 45 can match eol */
1829 #line 399 "xbt/graphxml.l"
1830 ENTER(VALUE1); BUFFERSET(A_graphxml_edge_target);
1833 /* rule 46 can match eol */
1835 #line 400 "xbt/graphxml.l"
1836 ENTER(VALUE2); BUFFERSET(A_graphxml_edge_target);
1839 /* rule 47 can match eol */
1841 #line 402 "xbt/graphxml.l"
1842 ENTER(VALUE1); BUFFERSET(A_graphxml_edge_length);
1845 /* rule 48 can match eol */
1847 #line 403 "xbt/graphxml.l"
1848 ENTER(VALUE2); BUFFERSET(A_graphxml_edge_length);
1851 /* rule 49 can match eol */
1852 #line 406 "xbt/graphxml.l"
1854 /* rule 50 can match eol */
1856 #line 406 "xbt/graphxml.l"
1857 A_graphxml_edge_isDirected = A_graphxml_edge_isDirected_true;
1860 /* rule 51 can match eol */
1861 #line 408 "xbt/graphxml.l"
1863 /* rule 52 can match eol */
1865 #line 408 "xbt/graphxml.l"
1866 A_graphxml_edge_isDirected = A_graphxml_edge_isDirected_false;
1870 #line 410 "xbt/graphxml.l"
1872 if (!A_graphxml_edge_source) FAIL("Required attribute `source' not set for `edge' element.");
1873 if (!A_graphxml_edge_target) FAIL("Required attribute `target' not set for `edge' element.");
1874 LEAVE; STag_graphxml_edge();pcdata = NULL; ENTER(E_graphxml_edge);
1879 #line 415 "xbt/graphxml.l"
1881 if (!A_graphxml_edge_source) FAIL("Required attribute `source' not set for `edge' element.");
1882 if (!A_graphxml_edge_target) FAIL("Required attribute `target' not set for `edge' element.");
1883 LEAVE; STag_graphxml_edge(); pcdata = NULL; ETag_graphxml_edge();
1885 case S_graphxml_graph_1: case S_graphxml_graph_3: case S_graphxml_graph_5: case S_graphxml_graph_4: case S_graphxml_graph: SET(S_graphxml_graph_5); break;
1886 case ROOT_graphxml_edge: SET(EPILOG); break;
1892 #line 424 "xbt/graphxml.l"
1893 FAIL("Unexpected character `%c' in attribute list of edge element.", xbt_graph_parse_text[0]);
1897 #line 425 "xbt/graphxml.l"
1898 FAIL("Bad attribute `%s' in `edge' element start tag.",xbt_graph_parse_text);
1900 case YY_STATE_EOF(AL_graphxml_edge):
1901 #line 426 "xbt/graphxml.l"
1902 FAIL("EOF in attribute list of `edge' element.");
1907 /* rule 57 can match eol */
1909 #line 430 "xbt/graphxml.l"
1912 ETag_graphxml_edge();
1914 case S_graphxml_graph_1: case S_graphxml_graph_3: case S_graphxml_graph_5: case S_graphxml_graph_4: case S_graphxml_graph: SET(S_graphxml_graph_5); break;
1915 case ROOT_graphxml_edge: SET(EPILOG); break;
1920 /* rule 58 can match eol */
1922 #line 438 "xbt/graphxml.l"
1923 FAIL("Unexpected end-tag `%s': `</edge>' expected.",xbt_graph_parse_text);
1927 #line 439 "xbt/graphxml.l"
1928 FAIL("Unexpected character `%c': `</edge>' expected.",xbt_graph_parse_text[0]);
1930 case YY_STATE_EOF(E_graphxml_edge):
1931 #line 440 "xbt/graphxml.l"
1932 FAIL("Premature EOF: `</edge>' expected.");
1935 /* EPILOG: after the root element. */
1939 #line 446 "xbt/graphxml.l"
1940 {SET(PROLOG); yyless(0); CLEANUP; return -1;}
1942 case YY_STATE_EOF(EPILOG):
1943 #line 447 "xbt/graphxml.l"
1947 /* CHARACTER DATA. */
1949 /* Non-defined standard entities... */
1952 #line 454 "xbt/graphxml.l"
1957 #line 455 "xbt/graphxml.l"
1962 #line 456 "xbt/graphxml.l"
1967 #line 457 "xbt/graphxml.l"
1972 #line 458 "xbt/graphxml.l"
1975 /* Character entities. */
1978 #line 461 "xbt/graphxml.l"
1979 BUFFERPUTC((unsigned char)atoi(xbt_graph_parse_text+2));
1983 #line 462 "xbt/graphxml.l"
1984 BUFFERPUTC((unsigned char)strtol(xbt_graph_parse_text+3,NULL,16));
1989 /* rule 68 can match eol */
1990 #line 467 "xbt/graphxml.l"
1992 /* rule 69 can match eol */
1993 #line 468 "xbt/graphxml.l"
1995 /* rule 70 can match eol */
1996 #line 469 "xbt/graphxml.l"
1998 /* rule 71 can match eol */
2000 #line 469 "xbt/graphxml.l"
2007 #line 473 "xbt/graphxml.l"
2012 #line 474 "xbt/graphxml.l"
2013 FAIL("Unexpected `]""]>' in character data.");
2019 #line 478 "xbt/graphxml.l"
2022 case YY_STATE_EOF(VALUE1):
2023 #line 479 "xbt/graphxml.l"
2024 FAIL("EOF in literal (\"'\" expected).");
2030 #line 483 "xbt/graphxml.l"
2033 case YY_STATE_EOF(VALUE2):
2034 #line 484 "xbt/graphxml.l"
2035 FAIL("EOF in literal (`\"' expected).");
2040 /* rule 76 can match eol */
2042 #line 488 "xbt/graphxml.l"
2043 BUFFERPUTC(xbt_graph_parse_text[0]);
2047 #line 489 "xbt/graphxml.l"
2048 FAIL("Spurious `%c' in character data.",xbt_graph_parse_text[0]);
2054 #line 493 "xbt/graphxml.l"
2057 /* "]""]" BUFFERPUTC(xbt_graph_parse_text[0]); BUFFERPUTC(xbt_graph_parse_text[1]); */
2060 #line 495 "xbt/graphxml.l"
2061 BUFFERPUTC(xbt_graph_parse_text[0]);
2063 case YY_STATE_EOF(CDATA):
2064 #line 496 "xbt/graphxml.l"
2065 FAIL("EOF in CDATA section.");
2068 /* Impossible rules to avoid warnings from flex(1). */
2069 /* Ideally, this should be replaced by code in flexml.pl that
2070 generates just the states not covered by other rules. */
2073 /* rule 80 can match eol */
2075 #line 503 "xbt/graphxml.l"
2076 FAIL("Syntax error on character `%c'.", xbt_graph_parse_text[0]);
2081 #line 506 "xbt/graphxml.l"
2084 #line 2085 "xbt/graphxml.c"
2085 case YY_STATE_EOF(INITIAL):
2086 case YY_STATE_EOF(ROOT_graphxml_graph):
2087 case YY_STATE_EOF(S_graphxml_graph_2):
2088 case YY_STATE_EOF(S_graphxml_graph_4):
2089 case YY_STATE_EOF(ROOT_graphxml_node):
2090 case YY_STATE_EOF(ROOT_graphxml_edge):
2091 case YY_STATE_EOF(IMPOSSIBLE):
2094 case YY_END_OF_BUFFER:
2096 /* Amount of text matched not including the EOB char. */
2097 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2099 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2100 *yy_cp = (yy_hold_char);
2101 YY_RESTORE_YY_MORE_OFFSET
2103 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2105 /* We're scanning a new file or input source. It's
2106 * possible that this happened because the user
2107 * just pointed xbt_graph_parse_in at a new source and called
2108 * xbt_graph_parse_lex(). If so, then we have to assure
2109 * consistency between YY_CURRENT_BUFFER and our
2110 * globals. Here is the right place to do so, because
2111 * this is the first action (other than possibly a
2112 * back-up) that will match for the new input source.
2114 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2115 YY_CURRENT_BUFFER_LVALUE->yy_input_file = xbt_graph_parse_in;
2116 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2119 /* Note that here we test for yy_c_buf_p "<=" to the position
2120 * of the first EOB in the buffer, since yy_c_buf_p will
2121 * already have been incremented past the NUL character
2122 * (since all states make transitions on EOB to the
2123 * end-of-buffer state). Contrast this with the test
2126 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2127 { /* This was really a NUL. */
2128 yy_state_type yy_next_state;
2130 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2132 yy_current_state = yy_get_previous_state( );
2134 /* Okay, we're now positioned to make the NUL
2135 * transition. We couldn't have
2136 * yy_get_previous_state() go ahead and do it
2137 * for us because it doesn't know how to deal
2138 * with the possibility of jamming (and we don't
2139 * want to build jamming into it because then it
2140 * will run more slowly).
2143 yy_next_state = yy_try_NUL_trans( yy_current_state );
2145 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2147 if ( yy_next_state )
2149 /* Consume the NUL. */
2150 yy_cp = ++(yy_c_buf_p);
2151 yy_current_state = yy_next_state;
2157 yy_cp = (yy_c_buf_p);
2158 goto yy_find_action;
2162 else switch ( yy_get_next_buffer( ) )
2164 case EOB_ACT_END_OF_FILE:
2166 (yy_did_buffer_switch_on_eof) = 0;
2168 if ( xbt_graph_parse_wrap( ) )
2170 /* Note: because we've taken care in
2171 * yy_get_next_buffer() to have set up
2172 * xbt_graph_parse_text, we can now set up
2173 * yy_c_buf_p so that if some total
2174 * hoser (like flex itself) wants to
2175 * call the scanner after we return the
2176 * YY_NULL, it'll still work - another
2177 * YY_NULL will get returned.
2179 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2181 yy_act = YY_STATE_EOF(YY_START);
2187 if ( ! (yy_did_buffer_switch_on_eof) )
2193 case EOB_ACT_CONTINUE_SCAN:
2195 (yytext_ptr) + yy_amount_of_matched_text;
2197 yy_current_state = yy_get_previous_state( );
2199 yy_cp = (yy_c_buf_p);
2200 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2203 case EOB_ACT_LAST_MATCH:
2205 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2207 yy_current_state = yy_get_previous_state( );
2209 yy_cp = (yy_c_buf_p);
2210 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2211 goto yy_find_action;
2218 "fatal flex scanner internal error--no action found" );
2219 } /* end of action switch */
2220 } /* end of scanning one token */
2221 } /* end of xbt_graph_parse_lex */
2223 /* yy_get_next_buffer - try to read in a new buffer
2225 * Returns a code representing an action:
2226 * EOB_ACT_LAST_MATCH -
2227 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2228 * EOB_ACT_END_OF_FILE - end of file
2230 static int yy_get_next_buffer (void)
2232 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2233 register char *source = (yytext_ptr);
2234 register int number_to_move, i;
2237 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2239 "fatal flex scanner internal error--end of buffer missed" );
2241 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2242 { /* Don't try to fill the buffer, so this is an EOF. */
2243 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2245 /* We matched a single character, the EOB, so
2246 * treat this as a final EOF.
2248 return EOB_ACT_END_OF_FILE;
2253 /* We matched some text prior to the EOB, first
2256 return EOB_ACT_LAST_MATCH;
2260 /* Try to read more data. */
2262 /* First move last chars to start of buffer. */
2263 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
2265 for ( i = 0; i < number_to_move; ++i )
2266 *(dest++) = *(source++);
2268 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2269 /* don't do the read, it's not guaranteed to return an EOF,
2272 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2277 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2279 while ( num_to_read <= 0 )
2280 { /* Not enough room in the buffer - grow it. */
2282 /* just a shorter name for the current buffer */
2283 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
2285 int yy_c_buf_p_offset =
2286 (int) ((yy_c_buf_p) - b->yy_ch_buf);
2288 if ( b->yy_is_our_buffer )
2290 int new_size = b->yy_buf_size * 2;
2292 if ( new_size <= 0 )
2293 b->yy_buf_size += b->yy_buf_size / 8;
2295 b->yy_buf_size *= 2;
2297 b->yy_ch_buf = (char *)
2298 /* Include room in for 2 EOB chars. */
2299 xbt_graph_parse_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
2302 /* Can't grow it, we don't own it. */
2305 if ( ! b->yy_ch_buf )
2307 "fatal error - scanner input buffer overflow" );
2309 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2311 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2316 if ( num_to_read > YY_READ_BUF_SIZE )
2317 num_to_read = YY_READ_BUF_SIZE;
2319 /* Read in more data. */
2320 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2321 (yy_n_chars), num_to_read );
2323 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2326 if ( (yy_n_chars) == 0 )
2328 if ( number_to_move == YY_MORE_ADJ )
2330 ret_val = EOB_ACT_END_OF_FILE;
2331 xbt_graph_parse_restart(xbt_graph_parse_in );
2336 ret_val = EOB_ACT_LAST_MATCH;
2337 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2338 YY_BUFFER_EOF_PENDING;
2343 ret_val = EOB_ACT_CONTINUE_SCAN;
2345 (yy_n_chars) += number_to_move;
2346 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2347 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2349 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2354 /* yy_get_previous_state - get the state just before the EOB char was reached */
2356 static yy_state_type yy_get_previous_state (void)
2358 register yy_state_type yy_current_state;
2359 register char *yy_cp;
2361 yy_current_state = (yy_start);
2363 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2365 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2366 if ( yy_accept[yy_current_state] )
2368 (yy_last_accepting_state) = yy_current_state;
2369 (yy_last_accepting_cpos) = yy_cp;
2371 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2373 yy_current_state = (int) yy_def[yy_current_state];
2374 if ( yy_current_state >= 507 )
2375 yy_c = yy_meta[(unsigned int) yy_c];
2377 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2380 return yy_current_state;
2383 /* yy_try_NUL_trans - try to make a transition on the NUL character
2386 * next_state = yy_try_NUL_trans( current_state );
2388 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2390 register int yy_is_jam;
2391 register char *yy_cp = (yy_c_buf_p);
2393 register YY_CHAR yy_c = 1;
2394 if ( yy_accept[yy_current_state] )
2396 (yy_last_accepting_state) = yy_current_state;
2397 (yy_last_accepting_cpos) = yy_cp;
2399 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2401 yy_current_state = (int) yy_def[yy_current_state];
2402 if ( yy_current_state >= 507 )
2403 yy_c = yy_meta[(unsigned int) yy_c];
2405 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2406 yy_is_jam = (yy_current_state == 506);
2408 return yy_is_jam ? 0 : yy_current_state;
2413 static int yyinput (void)
2415 static int input (void)
2421 *(yy_c_buf_p) = (yy_hold_char);
2423 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2425 /* yy_c_buf_p now points to the character we want to return.
2426 * If this occurs *before* the EOB characters, then it's a
2427 * valid NUL; if not, then we've hit the end of the buffer.
2429 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2430 /* This was really a NUL. */
2431 *(yy_c_buf_p) = '\0';
2434 { /* need more input */
2435 int offset = (yy_c_buf_p) - (yytext_ptr);
2438 switch ( yy_get_next_buffer( ) )
2440 case EOB_ACT_LAST_MATCH:
2441 /* This happens because yy_g_n_b()
2442 * sees that we've accumulated a
2443 * token and flags that we need to
2444 * try matching the token before
2445 * proceeding. But for input(),
2446 * there's no matching to consider.
2447 * So convert the EOB_ACT_LAST_MATCH
2448 * to EOB_ACT_END_OF_FILE.
2451 /* Reset buffer status. */
2452 xbt_graph_parse_restart(xbt_graph_parse_in );
2456 case EOB_ACT_END_OF_FILE:
2458 if ( xbt_graph_parse_wrap( ) )
2461 if ( ! (yy_did_buffer_switch_on_eof) )
2470 case EOB_ACT_CONTINUE_SCAN:
2471 (yy_c_buf_p) = (yytext_ptr) + offset;
2477 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2478 *(yy_c_buf_p) = '\0'; /* preserve xbt_graph_parse_text */
2479 (yy_hold_char) = *++(yy_c_buf_p);
2483 xbt_graph_parse_lineno++;
2488 #endif /* ifndef YY_NO_INPUT */
2490 /** Immediately switch to a different input stream.
2491 * @param input_file A readable stream.
2493 * @note This function does not reset the start condition to @c INITIAL .
2495 void xbt_graph_parse_restart (FILE * input_file )
2498 if ( ! YY_CURRENT_BUFFER ){
2499 xbt_graph_parse_ensure_buffer_stack ();
2500 YY_CURRENT_BUFFER_LVALUE =
2501 xbt_graph_parse__create_buffer(xbt_graph_parse_in,YY_BUF_SIZE );
2504 xbt_graph_parse__init_buffer(YY_CURRENT_BUFFER,input_file );
2505 xbt_graph_parse__load_buffer_state( );
2508 /** Switch to a different input buffer.
2509 * @param new_buffer The new input buffer.
2512 void xbt_graph_parse__switch_to_buffer (YY_BUFFER_STATE new_buffer )
2515 /* TODO. We should be able to replace this entire function body
2517 * xbt_graph_parse_pop_buffer_state();
2518 * xbt_graph_parse_push_buffer_state(new_buffer);
2520 xbt_graph_parse_ensure_buffer_stack ();
2521 if ( YY_CURRENT_BUFFER == new_buffer )
2524 if ( YY_CURRENT_BUFFER )
2526 /* Flush out information for old buffer. */
2527 *(yy_c_buf_p) = (yy_hold_char);
2528 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2529 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2532 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2533 xbt_graph_parse__load_buffer_state( );
2535 /* We don't actually know whether we did this switch during
2536 * EOF (xbt_graph_parse_wrap()) processing, but the only time this flag
2537 * is looked at is after xbt_graph_parse_wrap() is called, so it's safe
2538 * to go ahead and always set it.
2540 (yy_did_buffer_switch_on_eof) = 1;
2543 static void xbt_graph_parse__load_buffer_state (void)
2545 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2546 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2547 xbt_graph_parse_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2548 (yy_hold_char) = *(yy_c_buf_p);
2551 /** Allocate and initialize an input buffer state.
2552 * @param file A readable stream.
2553 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2555 * @return the allocated buffer state.
2557 YY_BUFFER_STATE xbt_graph_parse__create_buffer (FILE * file, int size )
2561 b = (YY_BUFFER_STATE) xbt_graph_parse_alloc(sizeof( struct yy_buffer_state ) );
2563 YY_FATAL_ERROR( "out of dynamic memory in xbt_graph_parse__create_buffer()" );
2565 b->yy_buf_size = size;
2567 /* yy_ch_buf has to be 2 characters longer than the size given because
2568 * we need to put in 2 end-of-buffer characters.
2570 b->yy_ch_buf = (char *) xbt_graph_parse_alloc(b->yy_buf_size + 2 );
2571 if ( ! b->yy_ch_buf )
2572 YY_FATAL_ERROR( "out of dynamic memory in xbt_graph_parse__create_buffer()" );
2574 b->yy_is_our_buffer = 1;
2576 xbt_graph_parse__init_buffer(b,file );
2581 /** Destroy the buffer.
2582 * @param b a buffer created with xbt_graph_parse__create_buffer()
2585 void xbt_graph_parse__delete_buffer (YY_BUFFER_STATE b )
2591 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2592 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2594 if ( b->yy_is_our_buffer )
2595 xbt_graph_parse_free((void *) b->yy_ch_buf );
2597 xbt_graph_parse_free((void *) b );
2601 extern int isatty (int );
2602 #endif /* __cplusplus */
2604 /* Initializes or reinitializes a buffer.
2605 * This function is sometimes called more than once on the same buffer,
2606 * such as during a xbt_graph_parse_restart() or at EOF.
2608 static void xbt_graph_parse__init_buffer (YY_BUFFER_STATE b, FILE * file )
2613 xbt_graph_parse__flush_buffer(b );
2615 b->yy_input_file = file;
2616 b->yy_fill_buffer = 1;
2618 /* If b is the current buffer, then xbt_graph_parse__init_buffer was _probably_
2619 * called from xbt_graph_parse_restart() or through yy_get_next_buffer.
2620 * In that case, we don't want to reset the lineno or column.
2622 if (b != YY_CURRENT_BUFFER){
2623 b->yy_bs_lineno = 1;
2624 b->yy_bs_column = 0;
2627 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2632 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2633 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2636 void xbt_graph_parse__flush_buffer (YY_BUFFER_STATE b )
2643 /* We always need two end-of-buffer characters. The first causes
2644 * a transition to the end-of-buffer state. The second causes
2645 * a jam in that state.
2647 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2648 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2650 b->yy_buf_pos = &b->yy_ch_buf[0];
2653 b->yy_buffer_status = YY_BUFFER_NEW;
2655 if ( b == YY_CURRENT_BUFFER )
2656 xbt_graph_parse__load_buffer_state( );
2659 /** Pushes the new state onto the stack. The new state becomes
2660 * the current state. This function will allocate the stack
2662 * @param new_buffer The new state.
2665 void xbt_graph_parse_push_buffer_state (YY_BUFFER_STATE new_buffer )
2667 if (new_buffer == NULL)
2670 xbt_graph_parse_ensure_buffer_stack();
2672 /* This block is copied from xbt_graph_parse__switch_to_buffer. */
2673 if ( YY_CURRENT_BUFFER )
2675 /* Flush out information for old buffer. */
2676 *(yy_c_buf_p) = (yy_hold_char);
2677 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2678 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2681 /* Only push if top exists. Otherwise, replace top. */
2682 if (YY_CURRENT_BUFFER)
2683 (yy_buffer_stack_top)++;
2684 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2686 /* copied from xbt_graph_parse__switch_to_buffer. */
2687 xbt_graph_parse__load_buffer_state( );
2688 (yy_did_buffer_switch_on_eof) = 1;
2691 /** Removes and deletes the top of the stack, if present.
2692 * The next element becomes the new top.
2695 void xbt_graph_parse_pop_buffer_state (void)
2697 if (!YY_CURRENT_BUFFER)
2700 xbt_graph_parse__delete_buffer(YY_CURRENT_BUFFER );
2701 YY_CURRENT_BUFFER_LVALUE = NULL;
2702 if ((yy_buffer_stack_top) > 0)
2703 --(yy_buffer_stack_top);
2705 if (YY_CURRENT_BUFFER) {
2706 xbt_graph_parse__load_buffer_state( );
2707 (yy_did_buffer_switch_on_eof) = 1;
2711 /* Allocates the stack if it does not exist.
2712 * Guarantees space for at least one push.
2714 static void xbt_graph_parse_ensure_buffer_stack (void)
2718 if (!(yy_buffer_stack)) {
2720 /* First allocation is just for 2 elements, since we don't know if this
2721 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2722 * immediate realloc on the next call.
2725 (yy_buffer_stack) = (struct yy_buffer_state**)xbt_graph_parse_alloc
2726 (num_to_alloc * sizeof(struct yy_buffer_state*)
2729 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2731 (yy_buffer_stack_max) = num_to_alloc;
2732 (yy_buffer_stack_top) = 0;
2736 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2738 /* Increase the buffer to prepare for a possible push. */
2739 int grow_size = 8 /* arbitrary grow size */;
2741 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2742 (yy_buffer_stack) = (struct yy_buffer_state**)xbt_graph_parse_realloc
2744 num_to_alloc * sizeof(struct yy_buffer_state*)
2747 /* zero only the new slots.*/
2748 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2749 (yy_buffer_stack_max) = num_to_alloc;
2753 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2754 * @param base the character buffer
2755 * @param size the size in bytes of the character buffer
2757 * @return the newly allocated buffer state object.
2759 YY_BUFFER_STATE xbt_graph_parse__scan_buffer (char * base, yy_size_t size )
2764 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2765 base[size-1] != YY_END_OF_BUFFER_CHAR )
2766 /* They forgot to leave room for the EOB's. */
2769 b = (YY_BUFFER_STATE) xbt_graph_parse_alloc(sizeof( struct yy_buffer_state ) );
2771 YY_FATAL_ERROR( "out of dynamic memory in xbt_graph_parse__scan_buffer()" );
2773 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2774 b->yy_buf_pos = b->yy_ch_buf = base;
2775 b->yy_is_our_buffer = 0;
2776 b->yy_input_file = 0;
2777 b->yy_n_chars = b->yy_buf_size;
2778 b->yy_is_interactive = 0;
2780 b->yy_fill_buffer = 0;
2781 b->yy_buffer_status = YY_BUFFER_NEW;
2783 xbt_graph_parse__switch_to_buffer(b );
2788 /** Setup the input buffer state to scan a string. The next call to xbt_graph_parse_lex() will
2789 * scan from a @e copy of @a str.
2790 * @param yystr a NUL-terminated string to scan
2792 * @return the newly allocated buffer state object.
2793 * @note If you want to scan bytes that may contain NUL values, then use
2794 * xbt_graph_parse__scan_bytes() instead.
2796 YY_BUFFER_STATE xbt_graph_parse__scan_string (yyconst char * yystr )
2799 return xbt_graph_parse__scan_bytes(yystr,strlen(yystr) );
2802 /** Setup the input buffer state to scan the given bytes. The next call to xbt_graph_parse_lex() will
2803 * scan from a @e copy of @a bytes.
2804 * @param bytes the byte buffer to scan
2805 * @param len the number of bytes in the buffer pointed to by @a bytes.
2807 * @return the newly allocated buffer state object.
2809 YY_BUFFER_STATE xbt_graph_parse__scan_bytes (yyconst char * yybytes, int _yybytes_len )
2816 /* Get memory for full buffer, including space for trailing EOB's. */
2817 n = _yybytes_len + 2;
2818 buf = (char *) xbt_graph_parse_alloc(n );
2820 YY_FATAL_ERROR( "out of dynamic memory in xbt_graph_parse__scan_bytes()" );
2822 for ( i = 0; i < _yybytes_len; ++i )
2823 buf[i] = yybytes[i];
2825 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2827 b = xbt_graph_parse__scan_buffer(buf,n );
2829 YY_FATAL_ERROR( "bad buffer in xbt_graph_parse__scan_bytes()" );
2831 /* It's okay to grow etc. this buffer, and we should throw it
2832 * away when we're done.
2834 b->yy_is_our_buffer = 1;
2839 static void yy_push_state (int new_state )
2841 if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
2845 (yy_start_stack_depth) += YY_START_STACK_INCR;
2846 new_size = (yy_start_stack_depth) * sizeof( int );
2848 if ( ! (yy_start_stack) )
2849 (yy_start_stack) = (int *) xbt_graph_parse_alloc(new_size );
2852 (yy_start_stack) = (int *) xbt_graph_parse_realloc((void *) (yy_start_stack),new_size );
2854 if ( ! (yy_start_stack) )
2856 "out of memory expanding start-condition stack" );
2859 (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
2864 static void yy_pop_state (void)
2866 if ( --(yy_start_stack_ptr) < 0 )
2867 YY_FATAL_ERROR( "start-condition stack underflow" );
2869 BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
2872 #ifndef YY_EXIT_FAILURE
2873 #define YY_EXIT_FAILURE 2
2876 static void yy_fatal_error (yyconst char* msg )
2878 (void) fprintf( stderr, "%s\n", msg );
2879 exit( YY_EXIT_FAILURE );
2882 /* Redefine yyless() so it works in section 3 code. */
2888 /* Undo effects of setting up xbt_graph_parse_text. */ \
2889 int yyless_macro_arg = (n); \
2890 YY_LESS_LINENO(yyless_macro_arg);\
2891 xbt_graph_parse_text[xbt_graph_parse_leng] = (yy_hold_char); \
2892 (yy_c_buf_p) = xbt_graph_parse_text + yyless_macro_arg; \
2893 (yy_hold_char) = *(yy_c_buf_p); \
2894 *(yy_c_buf_p) = '\0'; \
2895 xbt_graph_parse_leng = yyless_macro_arg; \
2899 /* Accessor methods (get/set functions) to struct members. */
2901 /** Get the current line number.
2904 int xbt_graph_parse_get_lineno (void)
2907 return xbt_graph_parse_lineno;
2910 /** Get the input stream.
2913 FILE *xbt_graph_parse_get_in (void)
2915 return xbt_graph_parse_in;
2918 /** Get the output stream.
2921 FILE *xbt_graph_parse_get_out (void)
2923 return xbt_graph_parse_out;
2926 /** Get the length of the current token.
2929 int xbt_graph_parse_get_leng (void)
2931 return xbt_graph_parse_leng;
2934 /** Get the current token.
2938 char *xbt_graph_parse_get_text (void)
2940 return xbt_graph_parse_text;
2943 /** Set the current line number.
2944 * @param line_number
2947 void xbt_graph_parse_set_lineno (int line_number )
2950 xbt_graph_parse_lineno = line_number;
2953 /** Set the input stream. This does not discard the current
2955 * @param in_str A readable stream.
2957 * @see xbt_graph_parse__switch_to_buffer
2959 void xbt_graph_parse_set_in (FILE * in_str )
2961 xbt_graph_parse_in = in_str ;
2964 void xbt_graph_parse_set_out (FILE * out_str )
2966 xbt_graph_parse_out = out_str ;
2969 int xbt_graph_parse_get_debug (void)
2971 return xbt_graph_parse__flex_debug;
2974 void xbt_graph_parse_set_debug (int bdebug )
2976 xbt_graph_parse__flex_debug = bdebug ;
2979 static int yy_init_globals (void)
2981 /* Initialization is the same as for the non-reentrant scanner.
2982 * This function is called from xbt_graph_parse_lex_destroy(), so don't allocate here.
2985 /* We do not touch xbt_graph_parse_lineno unless the option is enabled. */
2986 xbt_graph_parse_lineno = 1;
2988 (yy_buffer_stack) = 0;
2989 (yy_buffer_stack_top) = 0;
2990 (yy_buffer_stack_max) = 0;
2991 (yy_c_buf_p) = (char *) 0;
2995 (yy_start_stack_ptr) = 0;
2996 (yy_start_stack_depth) = 0;
2997 (yy_start_stack) = NULL;
2999 /* Defined in main.c */
3001 xbt_graph_parse_in = stdin;
3002 xbt_graph_parse_out = stdout;
3004 xbt_graph_parse_in = (FILE *) 0;
3005 xbt_graph_parse_out = (FILE *) 0;
3008 /* For future reference: Set errno on error, since we are called by
3009 * xbt_graph_parse_lex_init()
3014 /* xbt_graph_parse_lex_destroy is for both reentrant and non-reentrant scanners. */
3015 int xbt_graph_parse_lex_destroy (void)
3018 /* Pop the buffer stack, destroying each element. */
3019 while(YY_CURRENT_BUFFER){
3020 xbt_graph_parse__delete_buffer(YY_CURRENT_BUFFER );
3021 YY_CURRENT_BUFFER_LVALUE = NULL;
3022 xbt_graph_parse_pop_buffer_state();
3025 /* Destroy the stack itself. */
3026 xbt_graph_parse_free((yy_buffer_stack) );
3027 (yy_buffer_stack) = NULL;
3029 /* Destroy the start condition stack. */
3030 xbt_graph_parse_free((yy_start_stack) );
3031 (yy_start_stack) = NULL;
3033 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3034 * xbt_graph_parse_lex() is called, initialization will occur. */
3041 * Internal utility routines.
3045 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
3048 for ( i = 0; i < n; ++i )
3053 #ifdef YY_NEED_STRLEN
3054 static int yy_flex_strlen (yyconst char * s )
3057 for ( n = 0; s[n]; ++n )
3064 void *xbt_graph_parse_alloc (yy_size_t size )
3066 return (void *) malloc( size );
3069 void *xbt_graph_parse_realloc (void * ptr, yy_size_t size )
3071 /* The cast to (char *) in the following accommodates both
3072 * implementations that use char* generic pointers, and those
3073 * that use void* generic pointers. It works with the latter
3074 * because both ANSI C and C++ allow castless assignment from
3075 * any pointer type to void*, and deal with argument conversions
3076 * as though doing an assignment.
3078 return (void *) realloc( (char *) ptr, size );
3081 void xbt_graph_parse_free (void * ptr )
3083 free( (char *) ptr ); /* see xbt_graph_parse_realloc() for (char *) cast */
3086 #define YYTABLES_NAME "yytables"
3088 #line 506 "xbt/graphxml.l"
3092 /* Element context stack lookup. */
3093 int graphxml_element_context(int i)
3095 return (0<i && i<yy_start_stack_depth
3096 ? yy_start_stack[yy_start_stack_ptr - i]
3101 void print_yy_stack(char* fmt, ...)
3103 int i = 0; va_list ap; va_start(ap, fmt);
3104 vfprintf(stderr, fmt, ap);
3105 for (i=1; i<yy_start_stack_ptr; i++)
3106 fprintf(stderr, "%s/", graphxml_statenames[yy_start_stack[i] ]);
3107 fprintf(stderr,"%s\n", graphxml_statenames[YY_START]);
3111 static void debug_enter(int state, const char* statename) {
3112 yy_push_state(state);
3113 if (xbt_graph_parse__flex_debug) print_yy_stack("--ENTER(%s) : ",statename);
3116 static void debug_leave(void) {
3117 if (xbt_graph_parse__flex_debug) print_yy_stack("--LEAVE : ");
3121 static void debug_set(int state, const char* statename) {
3123 if (xbt_graph_parse__flex_debug) print_yy_stack("--SET(%s) : ",statename);
3127 enum {flexml_max_err_msg_size = 512};
3129 static char flexml_err_msg[flexml_max_err_msg_size];
3130 const char * graphxml_parse_err_msg()
3132 return flexml_err_msg;
3135 static void reset_graphxml_parse_err_msg()
3137 flexml_err_msg[0] = '\0';
3141 static void cleanup(void)
3143 if (graphxml_statenames) {
3144 free(graphxml_statenames);
3145 graphxml_statenames = NULL;
3150 static int fail(const char* fmt, ...)
3152 int chars_left, used;
3153 va_list ap; va_start(ap, fmt);
3154 #ifdef FLEXML_yylineno
3155 used = sprintf(flexml_err_msg,
3156 "Invalid XML (XML input line %d, state %d): ",
3157 xbt_graph_parse_lineno, YY_START);
3159 used = sprintf(flexml_err_msg,
3160 "Invalid XML (state %d): ",
3163 chars_left = flexml_max_err_msg_size - used - 1;
3164 vsnprintf(flexml_err_msg + used, chars_left, fmt, ap);
3167 #ifndef FLEXML_quiet_parser
3168 /* print directly to sdterr */
3169 fprintf(stderr, "%s\n", flexml_err_msg);
3170 flexml_err_msg[0] = '\0';