char *surf_parse_text;
#line 1 "surf/surfxml.l"
/* Validating XML processor for surfxml.dtd.
- * Generated 2005/04/15 16:26:24.
+ * Generated 2005/04/06 12:46:16.
*
- * This program was generated with the FleXML XML processor generator,
- * (Id: flexml.pl,v 1.39 2005/02/13 18:12:19 legranda Exp).
- * Copyright © 1999 Kristoffer Rose. All rights reserved.
+ * This program was generated with the FleXML XML processor generator.
+ * FleXML is Copyright © 1999-2005 Kristoffer Rose. All rights reserved.
+ * (Id: flexml.pl,v 1.44 2005/02/23 23:08:16 mquinson Exp).
+ *
+ * There are two, intertwined parts to this program, part A and part B.
+ *
+ * Part A
+ * ------
+ *
+ * Some parts, here collectively called "Part A", are found in the
+ * FleXML package. They are Copyright © 1999-2005 Kristoffer Rose.
+ * All rights reserved.
*
- * You can redistribute and/or modify this program provided the following
- * two conditions hold:
+ * You can redistribute, use, perform, display and/or modify "Part A"
+ * provided the following two conditions hold:
*
* 1. The program is distributed WITHOUT ANY WARRANTY from the author of
* FleXML; without even the implied warranty of MERCHANTABILITY or
* Notice that these are explicit rights granted to you for files
* generated by the FleXML system. For your rights in connection with
* the FleXML system itself please consult the GNU General Public License.
+ *
+ * Part B
+ * ------
+ *
+ * The other parts, here collectively called "Part B", and which came
+ * from the DTD used by FleXML to generate this program, can be
+ * distributed (or not, as the case may be) under the terms of whoever
+ * wrote them, provided these terms respect and obey the two conditions
+ * above under the heading "Part A".
+ *
+ * The author of and contributors to FleXML specifically disclaim
+ * any copyright interest in "Part B", unless "Part B" was written
+ * by the author of or contributors to FleXML.
+ *
*/
-#line 25 "surf/surfxml.l"
+#line 48 "surf/surfxml.l"
/* Version strings. */
const char rcs_flexml_skeleton[] =
- "$" "Id: skel,v 1.24 2005/02/10 11:42:39 mquinson Exp $";
+ "$" "Id: skel,v 1.26 2005/02/23 22:22:20 wdowling Exp $";
const char rcs_flexml[] =
- "$" "Id: flexml.pl,v 1.39 2005/02/13 18:12:19 legranda Exp $";
+ "$" "Id: flexml.pl,v 1.44 2005/02/23 23:08:16 mquinson Exp $";
/* ANSI headers. */
#include <unistd.h>
/* Generic actions. */
#define SKIP /*skip*/
-#define SUCCEED return 0
+#define SUCCEED CLEANUP; return 0
#define FAIL return fail
static int fail(const char*, ...);
const char * parse_err_msg(void);
+/* Cleanup */
+static void cleanup(void);
+#define CLEANUP cleanup()
+
/* Text buffer stack handling. */
char bufferstack[FLEXML_BUFFERSTACKSIZE];
char* limit = bufferstack + FLEXML_BUFFERSTACKSIZE;
-#line 207 "surf/surfxml.l"
+#line 234 "surf/surfxml.l"
/* State names. */
const char* *statenames=NULL;
-#line 1870 "surf/surfxml.c"
+#line 1897 "surf/surfxml.c"
#define INITIAL 0
#define PROLOG 1
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 211 "surf/surfxml.l"
+#line 238 "surf/surfxml.l"
/* Bypass Flex's default INITIAL state and begin by parsing the XML prolog. */
SET(PROLOG);
/* FleXML_init */
- if(!statenames) statenames= (const char **)calloc(IMPOSSIBLE,sizeof(char*));
+ next = bufferstack;
+ if(!statenames) {statenames= (const char **)calloc(IMPOSSIBLE,sizeof(char*));
statenames[PROLOG] = NULL;
statenames[DOCTYPE] = NULL;
statenames[EPILOG] = NULL;
statenames[ROOT_argument] = NULL;
statenames[AL_argument] = NULL;
statenames[E_argument] = "argument";
+ }
/* COMMENTS and PIs: handled uniformly for efficiency. */
-#line 2126 "surf/surfxml.c"
+#line 2155 "surf/surfxml.c"
if ( (yy_init) )
{
case 1:
YY_RULE_SETUP
-#line 265 "surf/surfxml.l"
+#line 294 "surf/surfxml.l"
ENTER(INCOMMENT);
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 266 "surf/surfxml.l"
+#line 295 "surf/surfxml.l"
ENTER(INPI);
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 269 "surf/surfxml.l"
+#line 298 "surf/surfxml.l"
LEAVE;
YY_BREAK
case 4:
-#line 271 "surf/surfxml.l"
+#line 300 "surf/surfxml.l"
case 5:
-#line 272 "surf/surfxml.l"
+#line 301 "surf/surfxml.l"
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
-#line 272 "surf/surfxml.l"
+#line 301 "surf/surfxml.l"
SKIP;
YY_BREAK
case YY_STATE_EOF(INCOMMENT):
-#line 273 "surf/surfxml.l"
+#line 302 "surf/surfxml.l"
FAIL("EOF in comment.");
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 276 "surf/surfxml.l"
+#line 305 "surf/surfxml.l"
LEAVE;
YY_BREAK
case 8:
-#line 278 "surf/surfxml.l"
+#line 307 "surf/surfxml.l"
case 9:
/* rule 9 can match eol */
YY_RULE_SETUP
-#line 278 "surf/surfxml.l"
+#line 307 "surf/surfxml.l"
SKIP;
YY_BREAK
case YY_STATE_EOF(INPI):
-#line 279 "surf/surfxml.l"
+#line 308 "surf/surfxml.l"
FAIL("EOF in PI (processing instruction).");
YY_BREAK
case 10:
/* rule 10 can match eol */
YY_RULE_SETUP
-#line 284 "surf/surfxml.l"
+#line 313 "surf/surfxml.l"
SKIP;
YY_BREAK
/* PROLOG: determine root element and process it. */
case 11:
/* rule 11 can match eol */
YY_RULE_SETUP
-#line 289 "surf/surfxml.l"
+#line 318 "surf/surfxml.l"
SET(DOCTYPE);
YY_BREAK
case 12:
/* rule 12 can match eol */
YY_RULE_SETUP
-#line 290 "surf/surfxml.l"
+#line 319 "surf/surfxml.l"
FAIL("Bad declaration %s.",surf_parse_text);
YY_BREAK
case 13:
/* rule 13 can match eol */
YY_RULE_SETUP
-#line 294 "surf/surfxml.l"
+#line 323 "surf/surfxml.l"
SET(ROOT_argument);
YY_BREAK
case 14:
/* rule 14 can match eol */
YY_RULE_SETUP
-#line 295 "surf/surfxml.l"
+#line 324 "surf/surfxml.l"
SET(ROOT_route_element);
YY_BREAK
case 15:
/* rule 15 can match eol */
YY_RULE_SETUP
-#line 296 "surf/surfxml.l"
+#line 325 "surf/surfxml.l"
SET(ROOT_cpu);
YY_BREAK
case 16:
/* rule 16 can match eol */
YY_RULE_SETUP
-#line 297 "surf/surfxml.l"
+#line 326 "surf/surfxml.l"
SET(ROOT_include);
YY_BREAK
case 17:
/* rule 17 can match eol */
YY_RULE_SETUP
-#line 298 "surf/surfxml.l"
+#line 327 "surf/surfxml.l"
SET(ROOT_route);
YY_BREAK
case 18:
/* rule 18 can match eol */
YY_RULE_SETUP
-#line 299 "surf/surfxml.l"
+#line 328 "surf/surfxml.l"
SET(ROOT_platform_description);
YY_BREAK
case 19:
/* rule 19 can match eol */
YY_RULE_SETUP
-#line 300 "surf/surfxml.l"
+#line 329 "surf/surfxml.l"
SET(ROOT_network_link);
YY_BREAK
case 20:
/* rule 20 can match eol */
YY_RULE_SETUP
-#line 301 "surf/surfxml.l"
+#line 330 "surf/surfxml.l"
SET(ROOT_process);
YY_BREAK
case 21:
/* rule 21 can match eol */
YY_RULE_SETUP
-#line 302 "surf/surfxml.l"
+#line 331 "surf/surfxml.l"
FAIL("Bad declaration %s.",surf_parse_text);
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 303 "surf/surfxml.l"
+#line 332 "surf/surfxml.l"
FAIL("Unexpected character `%c' in prolog.", surf_parse_text[0]);
YY_BREAK
case YY_STATE_EOF(PROLOG):
case YY_STATE_EOF(DOCTYPE):
-#line 304 "surf/surfxml.l"
+#line 333 "surf/surfxml.l"
FAIL("EOF in prolog.");
YY_BREAK
case 23:
/* rule 23 can match eol */
YY_RULE_SETUP
-#line 311 "surf/surfxml.l"
+#line 340 "surf/surfxml.l"
{
ENTER(AL_platform_description);
}
case 24:
YY_RULE_SETUP
-#line 316 "surf/surfxml.l"
+#line 345 "surf/surfxml.l"
{
LEAVE; STag_platform_description();pcdata = NULL; ENTER(S_platform_description);
}
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 319 "surf/surfxml.l"
+#line 348 "surf/surfxml.l"
{
LEAVE; STag_platform_description(); pcdata = NULL; ETag_platform_description();
switch (YY_START) {
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 325 "surf/surfxml.l"
+#line 354 "surf/surfxml.l"
FAIL("Unexpected character `%c' in attribute list of platform_description element.", surf_parse_text[0]);
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 326 "surf/surfxml.l"
+#line 355 "surf/surfxml.l"
FAIL("Bad attribute `%s' in `platform_description' element start tag.",surf_parse_text);
YY_BREAK
case YY_STATE_EOF(AL_platform_description):
-#line 327 "surf/surfxml.l"
+#line 356 "surf/surfxml.l"
FAIL("EOF in attribute list of `platform_description' element.");
YY_BREAK
case 28:
/* rule 28 can match eol */
YY_RULE_SETUP
-#line 331 "surf/surfxml.l"
+#line 360 "surf/surfxml.l"
{
LEAVE;
ETag_platform_description();
case 29:
/* rule 29 can match eol */
YY_RULE_SETUP
-#line 338 "surf/surfxml.l"
+#line 367 "surf/surfxml.l"
FAIL("Unexpected end-tag `%s': `</platform_description>' expected.",surf_parse_text);
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 339 "surf/surfxml.l"
+#line 368 "surf/surfxml.l"
FAIL("Unexpected character `%c': `</platform_description>' expected.",surf_parse_text[0]);
YY_BREAK
case YY_STATE_EOF(E_platform_description):
case YY_STATE_EOF(S_platform_description_2):
case YY_STATE_EOF(S_platform_description):
-#line 340 "surf/surfxml.l"
+#line 369 "surf/surfxml.l"
FAIL("Premature EOF: `</platform_description>' expected.");
YY_BREAK
case 31:
/* rule 31 can match eol */
YY_RULE_SETUP
-#line 343 "surf/surfxml.l"
+#line 372 "surf/surfxml.l"
{
A_include_file = NULL;
ENTER(AL_include);
case 32:
/* rule 32 can match eol */
YY_RULE_SETUP
-#line 349 "surf/surfxml.l"
+#line 378 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_include_file);
YY_BREAK
case 33:
/* rule 33 can match eol */
YY_RULE_SETUP
-#line 350 "surf/surfxml.l"
+#line 379 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_include_file);
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 352 "surf/surfxml.l"
+#line 381 "surf/surfxml.l"
{
if (!A_include_file) FAIL("Required attribute `file' not set for `include' element.");
LEAVE; STag_include();pcdata = NULL; ENTER(S_include);
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 356 "surf/surfxml.l"
+#line 385 "surf/surfxml.l"
{
if (!A_include_file) FAIL("Required attribute `file' not set for `include' element.");
LEAVE; STag_include(); pcdata = NULL; ETag_include();
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 365 "surf/surfxml.l"
+#line 394 "surf/surfxml.l"
FAIL("Unexpected character `%c' in attribute list of include element.", surf_parse_text[0]);
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 366 "surf/surfxml.l"
+#line 395 "surf/surfxml.l"
FAIL("Bad attribute `%s' in `include' element start tag.",surf_parse_text);
YY_BREAK
case YY_STATE_EOF(AL_include):
-#line 367 "surf/surfxml.l"
+#line 396 "surf/surfxml.l"
FAIL("EOF in attribute list of `include' element.");
YY_BREAK
case 38:
/* rule 38 can match eol */
YY_RULE_SETUP
-#line 371 "surf/surfxml.l"
+#line 400 "surf/surfxml.l"
{
LEAVE;
ETag_include();
case 39:
/* rule 39 can match eol */
YY_RULE_SETUP
-#line 380 "surf/surfxml.l"
+#line 409 "surf/surfxml.l"
FAIL("Unexpected end-tag `%s': `</include>' expected.",surf_parse_text);
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 381 "surf/surfxml.l"
+#line 410 "surf/surfxml.l"
FAIL("Unexpected character `%c': `</include>' expected.",surf_parse_text[0]);
YY_BREAK
case YY_STATE_EOF(E_include):
case YY_STATE_EOF(S_include):
case YY_STATE_EOF(S_include_2):
-#line 382 "surf/surfxml.l"
+#line 411 "surf/surfxml.l"
FAIL("Premature EOF: `</include>' expected.");
YY_BREAK
case 41:
/* rule 41 can match eol */
YY_RULE_SETUP
-#line 385 "surf/surfxml.l"
+#line 414 "surf/surfxml.l"
{
A_cpu_name = NULL;
A_cpu_power = NULL;
case 42:
/* rule 42 can match eol */
YY_RULE_SETUP
-#line 400 "surf/surfxml.l"
+#line 429 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_cpu_name);
YY_BREAK
case 43:
/* rule 43 can match eol */
YY_RULE_SETUP
-#line 401 "surf/surfxml.l"
+#line 430 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_cpu_name);
YY_BREAK
case 44:
/* rule 44 can match eol */
YY_RULE_SETUP
-#line 403 "surf/surfxml.l"
+#line 432 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_cpu_power);
YY_BREAK
case 45:
/* rule 45 can match eol */
YY_RULE_SETUP
-#line 404 "surf/surfxml.l"
+#line 433 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_cpu_power);
YY_BREAK
case 46:
/* rule 46 can match eol */
YY_RULE_SETUP
-#line 406 "surf/surfxml.l"
+#line 435 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_cpu_availability);
YY_BREAK
case 47:
/* rule 47 can match eol */
YY_RULE_SETUP
-#line 407 "surf/surfxml.l"
+#line 436 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_cpu_availability);
YY_BREAK
case 48:
/* rule 48 can match eol */
YY_RULE_SETUP
-#line 409 "surf/surfxml.l"
+#line 438 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_cpu_availability_file);
YY_BREAK
case 49:
/* rule 49 can match eol */
YY_RULE_SETUP
-#line 410 "surf/surfxml.l"
+#line 439 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_cpu_availability_file);
YY_BREAK
case 50:
/* rule 50 can match eol */
-#line 413 "surf/surfxml.l"
+#line 442 "surf/surfxml.l"
case 51:
/* rule 51 can match eol */
YY_RULE_SETUP
-#line 413 "surf/surfxml.l"
+#line 442 "surf/surfxml.l"
A_cpu_state = A_cpu_state_ON;
YY_BREAK
case 52:
/* rule 52 can match eol */
-#line 415 "surf/surfxml.l"
+#line 444 "surf/surfxml.l"
case 53:
/* rule 53 can match eol */
YY_RULE_SETUP
-#line 415 "surf/surfxml.l"
+#line 444 "surf/surfxml.l"
A_cpu_state = A_cpu_state_OFF;
YY_BREAK
case 54:
/* rule 54 can match eol */
YY_RULE_SETUP
-#line 417 "surf/surfxml.l"
+#line 446 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_cpu_state_file);
YY_BREAK
case 55:
/* rule 55 can match eol */
YY_RULE_SETUP
-#line 418 "surf/surfxml.l"
+#line 447 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_cpu_state_file);
YY_BREAK
case 56:
/* rule 56 can match eol */
YY_RULE_SETUP
-#line 420 "surf/surfxml.l"
+#line 449 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_cpu_interference_send);
YY_BREAK
case 57:
/* rule 57 can match eol */
YY_RULE_SETUP
-#line 421 "surf/surfxml.l"
+#line 450 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_cpu_interference_send);
YY_BREAK
case 58:
/* rule 58 can match eol */
YY_RULE_SETUP
-#line 423 "surf/surfxml.l"
+#line 452 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_cpu_interference_recv);
YY_BREAK
case 59:
/* rule 59 can match eol */
YY_RULE_SETUP
-#line 424 "surf/surfxml.l"
+#line 453 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_cpu_interference_recv);
YY_BREAK
case 60:
/* rule 60 can match eol */
YY_RULE_SETUP
-#line 426 "surf/surfxml.l"
+#line 455 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_cpu_interference_send_recv);
YY_BREAK
case 61:
/* rule 61 can match eol */
YY_RULE_SETUP
-#line 427 "surf/surfxml.l"
+#line 456 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_cpu_interference_send_recv);
YY_BREAK
case 62:
/* rule 62 can match eol */
YY_RULE_SETUP
-#line 429 "surf/surfxml.l"
+#line 458 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_cpu_max_outgoing_rate);
YY_BREAK
case 63:
/* rule 63 can match eol */
YY_RULE_SETUP
-#line 430 "surf/surfxml.l"
+#line 459 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_cpu_max_outgoing_rate);
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 432 "surf/surfxml.l"
+#line 461 "surf/surfxml.l"
{
if (!A_cpu_name) FAIL("Required attribute `name' not set for `cpu' element.");
if (!A_cpu_power) FAIL("Required attribute `power' not set for `cpu' element.");
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 437 "surf/surfxml.l"
+#line 466 "surf/surfxml.l"
{
if (!A_cpu_name) FAIL("Required attribute `name' not set for `cpu' element.");
if (!A_cpu_power) FAIL("Required attribute `power' not set for `cpu' element.");
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 447 "surf/surfxml.l"
+#line 476 "surf/surfxml.l"
FAIL("Unexpected character `%c' in attribute list of cpu element.", surf_parse_text[0]);
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 448 "surf/surfxml.l"
+#line 477 "surf/surfxml.l"
FAIL("Bad attribute `%s' in `cpu' element start tag.",surf_parse_text);
YY_BREAK
case YY_STATE_EOF(AL_cpu):
-#line 449 "surf/surfxml.l"
+#line 478 "surf/surfxml.l"
FAIL("EOF in attribute list of `cpu' element.");
YY_BREAK
case 68:
/* rule 68 can match eol */
YY_RULE_SETUP
-#line 453 "surf/surfxml.l"
+#line 482 "surf/surfxml.l"
{
LEAVE;
ETag_cpu();
case 69:
/* rule 69 can match eol */
YY_RULE_SETUP
-#line 462 "surf/surfxml.l"
+#line 491 "surf/surfxml.l"
FAIL("Unexpected end-tag `%s': `</cpu>' expected.",surf_parse_text);
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 463 "surf/surfxml.l"
+#line 492 "surf/surfxml.l"
FAIL("Unexpected character `%c': `</cpu>' expected.",surf_parse_text[0]);
YY_BREAK
case YY_STATE_EOF(E_cpu):
-#line 464 "surf/surfxml.l"
+#line 493 "surf/surfxml.l"
FAIL("Premature EOF: `</cpu>' expected.");
YY_BREAK
case 71:
/* rule 71 can match eol */
YY_RULE_SETUP
-#line 467 "surf/surfxml.l"
+#line 496 "surf/surfxml.l"
{
A_network_link_name = NULL;
A_network_link_bandwidth = NULL;
case 72:
/* rule 72 can match eol */
YY_RULE_SETUP
-#line 479 "surf/surfxml.l"
+#line 508 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_network_link_name);
YY_BREAK
case 73:
/* rule 73 can match eol */
YY_RULE_SETUP
-#line 480 "surf/surfxml.l"
+#line 509 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_network_link_name);
YY_BREAK
case 74:
/* rule 74 can match eol */
YY_RULE_SETUP
-#line 482 "surf/surfxml.l"
+#line 511 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_network_link_bandwidth);
YY_BREAK
case 75:
/* rule 75 can match eol */
YY_RULE_SETUP
-#line 483 "surf/surfxml.l"
+#line 512 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_network_link_bandwidth);
YY_BREAK
case 76:
/* rule 76 can match eol */
YY_RULE_SETUP
-#line 485 "surf/surfxml.l"
+#line 514 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_network_link_bandwidth_file);
YY_BREAK
case 77:
/* rule 77 can match eol */
YY_RULE_SETUP
-#line 486 "surf/surfxml.l"
+#line 515 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_network_link_bandwidth_file);
YY_BREAK
case 78:
/* rule 78 can match eol */
YY_RULE_SETUP
-#line 488 "surf/surfxml.l"
+#line 517 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_network_link_latency);
YY_BREAK
case 79:
/* rule 79 can match eol */
YY_RULE_SETUP
-#line 489 "surf/surfxml.l"
+#line 518 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_network_link_latency);
YY_BREAK
case 80:
/* rule 80 can match eol */
YY_RULE_SETUP
-#line 491 "surf/surfxml.l"
+#line 520 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_network_link_latency_file);
YY_BREAK
case 81:
/* rule 81 can match eol */
YY_RULE_SETUP
-#line 492 "surf/surfxml.l"
+#line 521 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_network_link_latency_file);
YY_BREAK
case 82:
/* rule 82 can match eol */
-#line 495 "surf/surfxml.l"
+#line 524 "surf/surfxml.l"
case 83:
/* rule 83 can match eol */
YY_RULE_SETUP
-#line 495 "surf/surfxml.l"
+#line 524 "surf/surfxml.l"
A_network_link_state = A_network_link_state_ON;
YY_BREAK
case 84:
/* rule 84 can match eol */
-#line 497 "surf/surfxml.l"
+#line 526 "surf/surfxml.l"
case 85:
/* rule 85 can match eol */
YY_RULE_SETUP
-#line 497 "surf/surfxml.l"
+#line 526 "surf/surfxml.l"
A_network_link_state = A_network_link_state_OFF;
YY_BREAK
case 86:
/* rule 86 can match eol */
YY_RULE_SETUP
-#line 499 "surf/surfxml.l"
+#line 528 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_network_link_state_file);
YY_BREAK
case 87:
/* rule 87 can match eol */
YY_RULE_SETUP
-#line 500 "surf/surfxml.l"
+#line 529 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_network_link_state_file);
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 502 "surf/surfxml.l"
+#line 531 "surf/surfxml.l"
{
if (!A_network_link_name) FAIL("Required attribute `name' not set for `network_link' element.");
if (!A_network_link_bandwidth) FAIL("Required attribute `bandwidth' not set for `network_link' element.");
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 507 "surf/surfxml.l"
+#line 536 "surf/surfxml.l"
{
if (!A_network_link_name) FAIL("Required attribute `name' not set for `network_link' element.");
if (!A_network_link_bandwidth) FAIL("Required attribute `bandwidth' not set for `network_link' element.");
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 517 "surf/surfxml.l"
+#line 546 "surf/surfxml.l"
FAIL("Unexpected character `%c' in attribute list of network_link element.", surf_parse_text[0]);
YY_BREAK
case 91:
YY_RULE_SETUP
-#line 518 "surf/surfxml.l"
+#line 547 "surf/surfxml.l"
FAIL("Bad attribute `%s' in `network_link' element start tag.",surf_parse_text);
YY_BREAK
case YY_STATE_EOF(AL_network_link):
-#line 519 "surf/surfxml.l"
+#line 548 "surf/surfxml.l"
FAIL("EOF in attribute list of `network_link' element.");
YY_BREAK
case 92:
/* rule 92 can match eol */
YY_RULE_SETUP
-#line 523 "surf/surfxml.l"
+#line 552 "surf/surfxml.l"
{
LEAVE;
ETag_network_link();
case 93:
/* rule 93 can match eol */
YY_RULE_SETUP
-#line 532 "surf/surfxml.l"
+#line 561 "surf/surfxml.l"
FAIL("Unexpected end-tag `%s': `</network_link>' expected.",surf_parse_text);
YY_BREAK
case 94:
YY_RULE_SETUP
-#line 533 "surf/surfxml.l"
+#line 562 "surf/surfxml.l"
FAIL("Unexpected character `%c': `</network_link>' expected.",surf_parse_text[0]);
YY_BREAK
case YY_STATE_EOF(E_network_link):
-#line 534 "surf/surfxml.l"
+#line 563 "surf/surfxml.l"
FAIL("Premature EOF: `</network_link>' expected.");
YY_BREAK
case 95:
/* rule 95 can match eol */
YY_RULE_SETUP
-#line 537 "surf/surfxml.l"
+#line 566 "surf/surfxml.l"
{
A_route_src = NULL;
A_route_dst = NULL;
case 96:
/* rule 96 can match eol */
YY_RULE_SETUP
-#line 548 "surf/surfxml.l"
+#line 577 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_route_src);
YY_BREAK
case 97:
/* rule 97 can match eol */
YY_RULE_SETUP
-#line 549 "surf/surfxml.l"
+#line 578 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_route_src);
YY_BREAK
case 98:
/* rule 98 can match eol */
YY_RULE_SETUP
-#line 551 "surf/surfxml.l"
+#line 580 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_route_dst);
YY_BREAK
case 99:
/* rule 99 can match eol */
YY_RULE_SETUP
-#line 552 "surf/surfxml.l"
+#line 581 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_route_dst);
YY_BREAK
case 100:
/* rule 100 can match eol */
YY_RULE_SETUP
-#line 554 "surf/surfxml.l"
+#line 583 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_route_impact_on_src);
YY_BREAK
case 101:
/* rule 101 can match eol */
YY_RULE_SETUP
-#line 555 "surf/surfxml.l"
+#line 584 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_route_impact_on_src);
YY_BREAK
case 102:
/* rule 102 can match eol */
YY_RULE_SETUP
-#line 557 "surf/surfxml.l"
+#line 586 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_route_impact_on_dst);
YY_BREAK
case 103:
/* rule 103 can match eol */
YY_RULE_SETUP
-#line 558 "surf/surfxml.l"
+#line 587 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_route_impact_on_dst);
YY_BREAK
case 104:
/* rule 104 can match eol */
YY_RULE_SETUP
-#line 560 "surf/surfxml.l"
+#line 589 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_route_impact_on_src_with_other_recv);
YY_BREAK
case 105:
/* rule 105 can match eol */
YY_RULE_SETUP
-#line 561 "surf/surfxml.l"
+#line 590 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_route_impact_on_src_with_other_recv);
YY_BREAK
case 106:
/* rule 106 can match eol */
YY_RULE_SETUP
-#line 563 "surf/surfxml.l"
+#line 592 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_route_impact_on_dst_with_other_send);
YY_BREAK
case 107:
/* rule 107 can match eol */
YY_RULE_SETUP
-#line 564 "surf/surfxml.l"
+#line 593 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_route_impact_on_dst_with_other_send);
YY_BREAK
case 108:
YY_RULE_SETUP
-#line 566 "surf/surfxml.l"
+#line 595 "surf/surfxml.l"
{
if (!A_route_src) FAIL("Required attribute `src' not set for `route' element.");
if (!A_route_dst) FAIL("Required attribute `dst' not set for `route' element.");
YY_BREAK
case 109:
YY_RULE_SETUP
-#line 571 "surf/surfxml.l"
+#line 600 "surf/surfxml.l"
{
if (!A_route_src) FAIL("Required attribute `src' not set for `route' element.");
if (!A_route_dst) FAIL("Required attribute `dst' not set for `route' element.");
YY_BREAK
case 110:
YY_RULE_SETUP
-#line 581 "surf/surfxml.l"
+#line 610 "surf/surfxml.l"
FAIL("Unexpected character `%c' in attribute list of route element.", surf_parse_text[0]);
YY_BREAK
case 111:
YY_RULE_SETUP
-#line 582 "surf/surfxml.l"
+#line 611 "surf/surfxml.l"
FAIL("Bad attribute `%s' in `route' element start tag.",surf_parse_text);
YY_BREAK
case YY_STATE_EOF(AL_route):
-#line 583 "surf/surfxml.l"
+#line 612 "surf/surfxml.l"
FAIL("EOF in attribute list of `route' element.");
YY_BREAK
case 112:
/* rule 112 can match eol */
YY_RULE_SETUP
-#line 587 "surf/surfxml.l"
+#line 616 "surf/surfxml.l"
{
LEAVE;
ETag_route();
case 113:
/* rule 113 can match eol */
YY_RULE_SETUP
-#line 596 "surf/surfxml.l"
+#line 625 "surf/surfxml.l"
FAIL("Unexpected end-tag `%s': `</route>' expected.",surf_parse_text);
YY_BREAK
case 114:
YY_RULE_SETUP
-#line 597 "surf/surfxml.l"
+#line 626 "surf/surfxml.l"
FAIL("Unexpected character `%c': `</route>' expected.",surf_parse_text[0]);
YY_BREAK
case YY_STATE_EOF(S_route):
case YY_STATE_EOF(S_route_2):
case YY_STATE_EOF(E_route):
-#line 598 "surf/surfxml.l"
+#line 627 "surf/surfxml.l"
FAIL("Premature EOF: `</route>' expected.");
YY_BREAK
case 115:
/* rule 115 can match eol */
YY_RULE_SETUP
-#line 601 "surf/surfxml.l"
+#line 630 "surf/surfxml.l"
{
A_route_element_name = NULL;
ENTER(AL_route_element);
case 116:
/* rule 116 can match eol */
YY_RULE_SETUP
-#line 607 "surf/surfxml.l"
+#line 636 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_route_element_name);
YY_BREAK
case 117:
/* rule 117 can match eol */
YY_RULE_SETUP
-#line 608 "surf/surfxml.l"
+#line 637 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_route_element_name);
YY_BREAK
case 118:
YY_RULE_SETUP
-#line 610 "surf/surfxml.l"
+#line 639 "surf/surfxml.l"
{
if (!A_route_element_name) FAIL("Required attribute `name' not set for `route_element' element.");
LEAVE; STag_route_element();pcdata = NULL; ENTER(E_route_element);
YY_BREAK
case 119:
YY_RULE_SETUP
-#line 614 "surf/surfxml.l"
+#line 643 "surf/surfxml.l"
{
if (!A_route_element_name) FAIL("Required attribute `name' not set for `route_element' element.");
LEAVE; STag_route_element(); pcdata = NULL; ETag_route_element();
YY_BREAK
case 120:
YY_RULE_SETUP
-#line 622 "surf/surfxml.l"
+#line 651 "surf/surfxml.l"
FAIL("Unexpected character `%c' in attribute list of route_element element.", surf_parse_text[0]);
YY_BREAK
case 121:
YY_RULE_SETUP
-#line 623 "surf/surfxml.l"
+#line 652 "surf/surfxml.l"
FAIL("Bad attribute `%s' in `route_element' element start tag.",surf_parse_text);
YY_BREAK
case YY_STATE_EOF(AL_route_element):
-#line 624 "surf/surfxml.l"
+#line 653 "surf/surfxml.l"
FAIL("EOF in attribute list of `route_element' element.");
YY_BREAK
case 122:
/* rule 122 can match eol */
YY_RULE_SETUP
-#line 628 "surf/surfxml.l"
+#line 657 "surf/surfxml.l"
{
LEAVE;
ETag_route_element();
case 123:
/* rule 123 can match eol */
YY_RULE_SETUP
-#line 636 "surf/surfxml.l"
+#line 665 "surf/surfxml.l"
FAIL("Unexpected end-tag `%s': `</route_element>' expected.",surf_parse_text);
YY_BREAK
case 124:
YY_RULE_SETUP
-#line 637 "surf/surfxml.l"
+#line 666 "surf/surfxml.l"
FAIL("Unexpected character `%c': `</route_element>' expected.",surf_parse_text[0]);
YY_BREAK
case YY_STATE_EOF(E_route_element):
-#line 638 "surf/surfxml.l"
+#line 667 "surf/surfxml.l"
FAIL("Premature EOF: `</route_element>' expected.");
YY_BREAK
case 125:
/* rule 125 can match eol */
YY_RULE_SETUP
-#line 641 "surf/surfxml.l"
+#line 670 "surf/surfxml.l"
{
A_process_host = NULL;
A_process_function = NULL;
case 126:
/* rule 126 can match eol */
YY_RULE_SETUP
-#line 648 "surf/surfxml.l"
+#line 677 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_process_host);
YY_BREAK
case 127:
/* rule 127 can match eol */
YY_RULE_SETUP
-#line 649 "surf/surfxml.l"
+#line 678 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_process_host);
YY_BREAK
case 128:
/* rule 128 can match eol */
YY_RULE_SETUP
-#line 651 "surf/surfxml.l"
+#line 680 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_process_function);
YY_BREAK
case 129:
/* rule 129 can match eol */
YY_RULE_SETUP
-#line 652 "surf/surfxml.l"
+#line 681 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_process_function);
YY_BREAK
case 130:
YY_RULE_SETUP
-#line 654 "surf/surfxml.l"
+#line 683 "surf/surfxml.l"
{
if (!A_process_host) FAIL("Required attribute `host' not set for `process' element.");
if (!A_process_function) FAIL("Required attribute `function' not set for `process' element.");
YY_BREAK
case 131:
YY_RULE_SETUP
-#line 659 "surf/surfxml.l"
+#line 688 "surf/surfxml.l"
{
if (!A_process_host) FAIL("Required attribute `host' not set for `process' element.");
if (!A_process_function) FAIL("Required attribute `function' not set for `process' element.");
YY_BREAK
case 132:
YY_RULE_SETUP
-#line 669 "surf/surfxml.l"
+#line 698 "surf/surfxml.l"
FAIL("Unexpected character `%c' in attribute list of process element.", surf_parse_text[0]);
YY_BREAK
case 133:
YY_RULE_SETUP
-#line 670 "surf/surfxml.l"
+#line 699 "surf/surfxml.l"
FAIL("Bad attribute `%s' in `process' element start tag.",surf_parse_text);
YY_BREAK
case YY_STATE_EOF(AL_process):
-#line 671 "surf/surfxml.l"
+#line 700 "surf/surfxml.l"
FAIL("EOF in attribute list of `process' element.");
YY_BREAK
case 134:
/* rule 134 can match eol */
YY_RULE_SETUP
-#line 675 "surf/surfxml.l"
+#line 704 "surf/surfxml.l"
{
LEAVE;
ETag_process();
case 135:
/* rule 135 can match eol */
YY_RULE_SETUP
-#line 684 "surf/surfxml.l"
+#line 713 "surf/surfxml.l"
FAIL("Unexpected end-tag `%s': `</process>' expected.",surf_parse_text);
YY_BREAK
case 136:
YY_RULE_SETUP
-#line 685 "surf/surfxml.l"
+#line 714 "surf/surfxml.l"
FAIL("Unexpected character `%c': `</process>' expected.",surf_parse_text[0]);
YY_BREAK
case YY_STATE_EOF(S_process):
case YY_STATE_EOF(E_process):
case YY_STATE_EOF(S_process_2):
-#line 686 "surf/surfxml.l"
+#line 715 "surf/surfxml.l"
FAIL("Premature EOF: `</process>' expected.");
YY_BREAK
case 137:
/* rule 137 can match eol */
YY_RULE_SETUP
-#line 689 "surf/surfxml.l"
+#line 718 "surf/surfxml.l"
{
A_argument_value = NULL;
ENTER(AL_argument);
case 138:
/* rule 138 can match eol */
YY_RULE_SETUP
-#line 695 "surf/surfxml.l"
+#line 724 "surf/surfxml.l"
ENTER(VALUE1); BUFFERSET(A_argument_value);
YY_BREAK
case 139:
/* rule 139 can match eol */
YY_RULE_SETUP
-#line 696 "surf/surfxml.l"
+#line 725 "surf/surfxml.l"
ENTER(VALUE2); BUFFERSET(A_argument_value);
YY_BREAK
case 140:
YY_RULE_SETUP
-#line 698 "surf/surfxml.l"
+#line 727 "surf/surfxml.l"
{
if (!A_argument_value) FAIL("Required attribute `value' not set for `argument' element.");
LEAVE; STag_argument();pcdata = NULL; ENTER(E_argument);
YY_BREAK
case 141:
YY_RULE_SETUP
-#line 702 "surf/surfxml.l"
+#line 731 "surf/surfxml.l"
{
if (!A_argument_value) FAIL("Required attribute `value' not set for `argument' element.");
LEAVE; STag_argument(); pcdata = NULL; ETag_argument();
YY_BREAK
case 142:
YY_RULE_SETUP
-#line 710 "surf/surfxml.l"
+#line 739 "surf/surfxml.l"
FAIL("Unexpected character `%c' in attribute list of argument element.", surf_parse_text[0]);
YY_BREAK
case 143:
YY_RULE_SETUP
-#line 711 "surf/surfxml.l"
+#line 740 "surf/surfxml.l"
FAIL("Bad attribute `%s' in `argument' element start tag.",surf_parse_text);
YY_BREAK
case YY_STATE_EOF(AL_argument):
-#line 712 "surf/surfxml.l"
+#line 741 "surf/surfxml.l"
FAIL("EOF in attribute list of `argument' element.");
YY_BREAK
case 144:
/* rule 144 can match eol */
YY_RULE_SETUP
-#line 716 "surf/surfxml.l"
+#line 745 "surf/surfxml.l"
{
LEAVE;
ETag_argument();
case 145:
/* rule 145 can match eol */
YY_RULE_SETUP
-#line 724 "surf/surfxml.l"
+#line 753 "surf/surfxml.l"
FAIL("Unexpected end-tag `%s': `</argument>' expected.",surf_parse_text);
YY_BREAK
case 146:
YY_RULE_SETUP
-#line 725 "surf/surfxml.l"
+#line 754 "surf/surfxml.l"
FAIL("Unexpected character `%c': `</argument>' expected.",surf_parse_text[0]);
YY_BREAK
case YY_STATE_EOF(E_argument):
-#line 726 "surf/surfxml.l"
+#line 755 "surf/surfxml.l"
FAIL("Premature EOF: `</argument>' expected.");
YY_BREAK
case 147:
YY_RULE_SETUP
-#line 732 "surf/surfxml.l"
-{SET(PROLOG); yyless(0); return -1;}
+#line 761 "surf/surfxml.l"
+{SET(PROLOG); yyless(0); CLEANUP; return -1;}
YY_BREAK
case YY_STATE_EOF(EPILOG):
-#line 733 "surf/surfxml.l"
+#line 762 "surf/surfxml.l"
SUCCEED;
YY_BREAK
/* Non-defined standard entities... */
case 148:
YY_RULE_SETUP
-#line 740 "surf/surfxml.l"
+#line 769 "surf/surfxml.l"
BUFFERPUTC('&');
YY_BREAK
case 149:
YY_RULE_SETUP
-#line 741 "surf/surfxml.l"
+#line 770 "surf/surfxml.l"
BUFFERPUTC('<');
YY_BREAK
case 150:
YY_RULE_SETUP
-#line 742 "surf/surfxml.l"
+#line 771 "surf/surfxml.l"
BUFFERPUTC('>');
YY_BREAK
case 151:
YY_RULE_SETUP
-#line 743 "surf/surfxml.l"
+#line 772 "surf/surfxml.l"
BUFFERPUTC('\'');
YY_BREAK
case 152:
YY_RULE_SETUP
-#line 744 "surf/surfxml.l"
+#line 773 "surf/surfxml.l"
BUFFERPUTC('"');
YY_BREAK
/* Character entities. */
case 153:
YY_RULE_SETUP
-#line 747 "surf/surfxml.l"
+#line 776 "surf/surfxml.l"
BUFFERPUTC((unsigned char)atoi(surf_parse_text+2));
YY_BREAK
case 154:
YY_RULE_SETUP
-#line 748 "surf/surfxml.l"
+#line 777 "surf/surfxml.l"
BUFFERPUTC((unsigned char)strtol(surf_parse_text+3,NULL,16));
YY_BREAK
case 155:
/* rule 155 can match eol */
-#line 753 "surf/surfxml.l"
+#line 782 "surf/surfxml.l"
case 156:
/* rule 156 can match eol */
-#line 754 "surf/surfxml.l"
+#line 783 "surf/surfxml.l"
case 157:
/* rule 157 can match eol */
-#line 755 "surf/surfxml.l"
+#line 784 "surf/surfxml.l"
case 158:
/* rule 158 can match eol */
YY_RULE_SETUP
-#line 755 "surf/surfxml.l"
+#line 784 "surf/surfxml.l"
BUFFERPUTC('\n');
YY_BREAK
case 159:
YY_RULE_SETUP
-#line 759 "surf/surfxml.l"
+#line 788 "surf/surfxml.l"
ENTER(CDATA);
YY_BREAK
case 160:
YY_RULE_SETUP
-#line 760 "surf/surfxml.l"
+#line 789 "surf/surfxml.l"
FAIL("Unexpected `]""]>' in character data.");
YY_BREAK
case 161:
YY_RULE_SETUP
-#line 764 "surf/surfxml.l"
+#line 793 "surf/surfxml.l"
BUFFERDONE; LEAVE;
YY_BREAK
case YY_STATE_EOF(VALUE1):
-#line 765 "surf/surfxml.l"
+#line 794 "surf/surfxml.l"
FAIL("EOF in literal (\"'\" expected).");
YY_BREAK
case 162:
YY_RULE_SETUP
-#line 769 "surf/surfxml.l"
+#line 798 "surf/surfxml.l"
BUFFERDONE; LEAVE;
YY_BREAK
case YY_STATE_EOF(VALUE2):
-#line 770 "surf/surfxml.l"
+#line 799 "surf/surfxml.l"
FAIL("EOF in literal (`\"' expected).");
YY_BREAK
case 163:
/* rule 163 can match eol */
YY_RULE_SETUP
-#line 774 "surf/surfxml.l"
+#line 803 "surf/surfxml.l"
BUFFERPUTC(surf_parse_text[0]);
YY_BREAK
case 164:
YY_RULE_SETUP
-#line 775 "surf/surfxml.l"
+#line 804 "surf/surfxml.l"
FAIL("Spurious `%c' in character data.",surf_parse_text[0]);
YY_BREAK
case 165:
YY_RULE_SETUP
-#line 779 "surf/surfxml.l"
+#line 808 "surf/surfxml.l"
LEAVE;
YY_BREAK
/* "]""]" BUFFERPUTC(surf_parse_text[0]); BUFFERPUTC(surf_parse_text[1]); */
case 166:
YY_RULE_SETUP
-#line 781 "surf/surfxml.l"
+#line 810 "surf/surfxml.l"
BUFFERPUTC(surf_parse_text[0]);
YY_BREAK
case YY_STATE_EOF(CDATA):
-#line 782 "surf/surfxml.l"
+#line 811 "surf/surfxml.l"
FAIL("EOF in CDATA section.");
YY_BREAK
case 167:
/* rule 167 can match eol */
YY_RULE_SETUP
-#line 789 "surf/surfxml.l"
+#line 818 "surf/surfxml.l"
FAIL("Syntax error on character `%c'.", surf_parse_text[0]);
YY_BREAK
case 168:
YY_RULE_SETUP
-#line 792 "surf/surfxml.l"
+#line 821 "surf/surfxml.l"
ECHO;
YY_BREAK
-#line 3499 "surf/surfxml.c"
+#line 3528 "surf/surfxml.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(ROOT_platform_description):
case YY_STATE_EOF(S_platform_description_1):
#undef YY_DECL_IS_OURS
#undef YY_DECL
#endif
-#line 792 "surf/surfxml.l"
+#line 821 "surf/surfxml.l"
}
+static void cleanup(void)
+{
+ if (statenames) {
+ free(statenames);
+ statenames = NULL;
+ }
+}
+
+
static int fail(const char* fmt, ...)
{
int chars_left, used;
fprintf(stderr, "%s\n", flexml_err_msg);
flexml_err_msg[0] = '\0';
#endif
-
+
+ cleanup();
+
return 1;
}