-/* Validating XML processor for surfxml.dtd.
- * Generated 2006/03/21 11:12:31.
+/* Validating XML processor for surf/surfxml.dtd.
+ * Generated 2007/11/29 14:32:38.
*
* 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.46 2006/03/21 08:24:12 legranda Exp).
+ * FleXML is Copyright (C) 1999-2005 Kristoffer Rose. All rights reserved.
+ * FleXML is Copyright (C) 2003-2006 Martin Quinson. All rights reserved.
+ * (Id: flexml.pl,v 1.61 2006/09/13 16:34:33 wdowling Exp).
*
* There are two, intertwined parts to this program, part A and part B.
*
* ------
*
* Some parts, here collectively called "Part A", are found in the
- * FleXML package. They are Copyright © 1999-2005 Kristoffer Rose.
- * All rights reserved.
+ * FleXML package. They are Copyright (C) 1999-2005 Kristoffer Rose
+ * and Copyright (C) 2003-2006 Martin Quinson. All rights reserved.
*
* You can redistribute, use, perform, display and/or modify "Part A"
* provided the following two conditions hold:
/* Version strings. */
const char rcs_surfxml_flexml_skeleton[] =
- "$" "Id: skel,v 1.27 2006/03/21 08:24:12 legranda Exp $";
+ "$" "Id: skel,v 1.38 2006/09/12 18:05:45 wdowling Exp $";
const char rcs_surfxml_flexml[] =
- "$" "Id: flexml.pl,v 1.46 2006/03/21 08:24:12 legranda Exp $";
+ "$" "Id: flexml.pl,v 1.61 2006/09/13 16:34:33 wdowling Exp $";
/* ANSI headers. */
#include <unistd.h>
#include <stdarg.h>
#include <ctype.h>
+#ifndef FLEXML_INDEXSTACKSIZE
+#define FLEXML_INDEXSTACKSIZE 1000
+#endif
+
/* Generated definitions. */
#define FLEXML_yylineno
+#ifndef FLEXML_BUFFERSTACKSIZE
#define FLEXML_BUFFERSTACKSIZE 1000000
+#endif
+#define FLEXML_NEED_BUFFERLIT
/* XML processor api. */
/* FleXML-provided data. */
-const char* pcdata;
-AT_surfxml_network_link_bandwidth A_surfxml_network_link_bandwidth;
-AT_surfxml_cpu_name A_surfxml_cpu_name;
-AT_surfxml_process_kill_time A_surfxml_process_kill_time;
-AT_surfxml_network_link_state A_surfxml_network_link_state;
-AT_surfxml_argument_value A_surfxml_argument_value;
-AT_surfxml_cpu_availability_file A_surfxml_cpu_availability_file;
-AT_surfxml_process_host A_surfxml_process_host;
-AT_surfxml_route_impact_on_src A_surfxml_route_impact_on_src;
-AT_surfxml_route_src A_surfxml_route_src;
-AT_surfxml_network_link_latency_file A_surfxml_network_link_latency_file;
-AT_surfxml_cpu_max_outgoing_rate A_surfxml_cpu_max_outgoing_rate;
-AT_surfxml_route_impact_on_dst_with_other_send A_surfxml_route_impact_on_dst_with_other_send;
-AT_surfxml_cpu_interference_send_recv A_surfxml_cpu_interference_send_recv;
-AT_surfxml_cpu_availability A_surfxml_cpu_availability;
-AT_surfxml_route_impact_on_dst A_surfxml_route_impact_on_dst;
-AT_surfxml_cpu_interference_recv A_surfxml_cpu_interference_recv;
-AT_surfxml_route_impact_on_src_with_other_recv A_surfxml_route_impact_on_src_with_other_recv;
-AT_surfxml_network_link_name A_surfxml_network_link_name;
-AT_surfxml_route_element_name A_surfxml_route_element_name;
-AT_surfxml_cpu_power A_surfxml_cpu_power;
-AT_surfxml_process_start_time A_surfxml_process_start_time;
-AT_surfxml_include_file A_surfxml_include_file;
-AT_surfxml_process_function A_surfxml_process_function;
-AT_surfxml_network_link_sharing_policy A_surfxml_network_link_sharing_policy;
-AT_surfxml_route_dst A_surfxml_route_dst;
-AT_surfxml_cpu_state A_surfxml_cpu_state;
-AT_surfxml_network_link_latency A_surfxml_network_link_latency;
-AT_surfxml_network_link_state_file A_surfxml_network_link_state_file;
-AT_surfxml_cpu_interference_send A_surfxml_cpu_interference_send;
-AT_surfxml_cpu_state_file A_surfxml_cpu_state_file;
-AT_surfxml_network_link_bandwidth_file A_surfxml_network_link_bandwidth_file;
+int surfxml_pcdata_ix;
+extern char *surfxml_bufferstack;
+#define surfxml_pcdata (surfxml_bufferstack + surfxml_pcdata_ix)
+AT_surfxml_random_generator AX_surfxml_random_generator;
+#define A_surfxml_random_generator AX_surfxml_random_generator
+AT_surfxml_prop_id AX_surfxml_prop_id;
+#define A_surfxml_prop_id (surfxml_bufferstack + AX_surfxml_prop_id)
+AT_surfxml_host_interference_recv AX_surfxml_host_interference_recv;
+#define A_surfxml_host_interference_recv (surfxml_bufferstack + AX_surfxml_host_interference_recv)
+AT_surfxml_host_id AX_surfxml_host_id;
+#define A_surfxml_host_id (surfxml_bufferstack + AX_surfxml_host_id)
+AT_surfxml_set_id AX_surfxml_set_id;
+#define A_surfxml_set_id (surfxml_bufferstack + AX_surfxml_set_id)
+AT_surfxml_link_latency_file AX_surfxml_link_latency_file;
+#define A_surfxml_link_latency_file (surfxml_bufferstack + AX_surfxml_link_latency_file)
+AT_surfxml_host_state AX_surfxml_host_state;
+#define A_surfxml_host_state AX_surfxml_host_state
+AT_surfxml_host_interference_send_recv AX_surfxml_host_interference_send_recv;
+#define A_surfxml_host_interference_send_recv (surfxml_bufferstack + AX_surfxml_host_interference_send_recv)
+AT_surfxml_host_interference_send AX_surfxml_host_interference_send;
+#define A_surfxml_host_interference_send (surfxml_bufferstack + AX_surfxml_host_interference_send)
+AT_surfxml_set_suffix AX_surfxml_set_suffix;
+#define A_surfxml_set_suffix (surfxml_bufferstack + AX_surfxml_set_suffix)
+AT_surfxml_route_impact_on_dst AX_surfxml_route_impact_on_dst;
+#define A_surfxml_route_impact_on_dst (surfxml_bufferstack + AX_surfxml_route_impact_on_dst)
+AT_surfxml_host_power AX_surfxml_host_power;
+#define A_surfxml_host_power (surfxml_bufferstack + AX_surfxml_host_power)
+AT_surfxml_router_id AX_surfxml_router_id;
+#define A_surfxml_router_id (surfxml_bufferstack + AX_surfxml_router_id)
+AT_surfxml_process_start_time AX_surfxml_process_start_time;
+#define A_surfxml_process_start_time (surfxml_bufferstack + AX_surfxml_process_start_time)
+AT_surfxml_cluster_suffix AX_surfxml_cluster_suffix;
+#define A_surfxml_cluster_suffix (surfxml_bufferstack + AX_surfxml_cluster_suffix)
+AT_surfxml_platform_xmlns_c_route AX_surfxml_platform_xmlns_c_route;
+#define A_surfxml_platform_xmlns_c_route (surfxml_bufferstack + AX_surfxml_platform_xmlns_c_route)
+AT_surfxml_cluster_prefix AX_surfxml_cluster_prefix;
+#define A_surfxml_cluster_prefix (surfxml_bufferstack + AX_surfxml_cluster_prefix)
+AT_surfxml_trace_file AX_surfxml_trace_file;
+#define A_surfxml_trace_file (surfxml_bufferstack + AX_surfxml_trace_file)
+AT_surfxml_route_action AX_surfxml_route_action;
+#define A_surfxml_route_action AX_surfxml_route_action
+AT_surfxml_link_sharing_policy AX_surfxml_link_sharing_policy;
+#define A_surfxml_link_sharing_policy AX_surfxml_link_sharing_policy
+AT_surfxml_random_min AX_surfxml_random_min;
+#define A_surfxml_random_min (surfxml_bufferstack + AX_surfxml_random_min)
+AT_surfxml_process_kill_time AX_surfxml_process_kill_time;
+#define A_surfxml_process_kill_time (surfxml_bufferstack + AX_surfxml_process_kill_time)
+AT_surfxml_cluster_bb_bw AX_surfxml_cluster_bb_bw;
+#define A_surfxml_cluster_bb_bw (surfxml_bufferstack + AX_surfxml_cluster_bb_bw)
+AT_surfxml_trace_c_connect_element AX_surfxml_trace_c_connect_element;
+#define A_surfxml_trace_c_connect_element AX_surfxml_trace_c_connect_element
+AT_surfxml_argument_value AX_surfxml_argument_value;
+#define A_surfxml_argument_value (surfxml_bufferstack + AX_surfxml_argument_value)
+AT_surfxml_link_state AX_surfxml_link_state;
+#define A_surfxml_link_state AX_surfxml_link_state
+AT_surfxml_route_impact_on_src AX_surfxml_route_impact_on_src;
+#define A_surfxml_route_impact_on_src (surfxml_bufferstack + AX_surfxml_route_impact_on_src)
+AT_surfxml_link_bandwidth AX_surfxml_link_bandwidth;
+#define A_surfxml_link_bandwidth (surfxml_bufferstack + AX_surfxml_link_bandwidth)
+AT_surfxml_cluster_id AX_surfxml_cluster_id;
+#define A_surfxml_cluster_id (surfxml_bufferstack + AX_surfxml_cluster_id)
+AT_surfxml_random_mean AX_surfxml_random_mean;
+#define A_surfxml_random_mean (surfxml_bufferstack + AX_surfxml_random_mean)
+AT_surfxml_cluster_bb_lat AX_surfxml_cluster_bb_lat;
+#define A_surfxml_cluster_bb_lat (surfxml_bufferstack + AX_surfxml_cluster_bb_lat)
+AT_surfxml_link_latency AX_surfxml_link_latency;
+#define A_surfxml_link_latency (surfxml_bufferstack + AX_surfxml_link_latency)
+AT_surfxml_trace_c_connect_trace_id AX_surfxml_trace_c_connect_trace_id;
+#define A_surfxml_trace_c_connect_trace_id (surfxml_bufferstack + AX_surfxml_trace_c_connect_trace_id)
+AT_surfxml_platform_xmlns_c_link AX_surfxml_platform_xmlns_c_link;
+#define A_surfxml_platform_xmlns_c_link (surfxml_bufferstack + AX_surfxml_platform_xmlns_c_link)
+AT_surfxml_link_bandwidth_file AX_surfxml_link_bandwidth_file;
+#define A_surfxml_link_bandwidth_file (surfxml_bufferstack + AX_surfxml_link_bandwidth_file)
+AT_surfxml_random_id AX_surfxml_random_id;
+#define A_surfxml_random_id (surfxml_bufferstack + AX_surfxml_random_id)
+AT_surfxml_set_radical AX_surfxml_set_radical;
+#define A_surfxml_set_radical (surfxml_bufferstack + AX_surfxml_set_radical)
+AT_surfxml_random_max AX_surfxml_random_max;
+#define A_surfxml_random_max (surfxml_bufferstack + AX_surfxml_random_max)
+AT_surfxml_link_id AX_surfxml_link_id;
+#define A_surfxml_link_id (surfxml_bufferstack + AX_surfxml_link_id)
+AT_surfxml_process_host AX_surfxml_process_host;
+#define A_surfxml_process_host (surfxml_bufferstack + AX_surfxml_process_host)
+AT_surfxml_host_availability_file AX_surfxml_host_availability_file;
+#define A_surfxml_host_availability_file (surfxml_bufferstack + AX_surfxml_host_availability_file)
+AT_surfxml_cluster_lat AX_surfxml_cluster_lat;
+#define A_surfxml_cluster_lat (surfxml_bufferstack + AX_surfxml_cluster_lat)
+AT_surfxml_trace_periodicity AX_surfxml_trace_periodicity;
+#define A_surfxml_trace_periodicity (surfxml_bufferstack + AX_surfxml_trace_periodicity)
+AT_surfxml_foreach_set_id AX_surfxml_foreach_set_id;
+#define A_surfxml_foreach_set_id (surfxml_bufferstack + AX_surfxml_foreach_set_id)
+AT_surfxml_route_impact_on_dst_with_other_send AX_surfxml_route_impact_on_dst_with_other_send;
+#define A_surfxml_route_impact_on_dst_with_other_send (surfxml_bufferstack + AX_surfxml_route_impact_on_dst_with_other_send)
+AT_surfxml_prop_value AX_surfxml_prop_value;
+#define A_surfxml_prop_value (surfxml_bufferstack + AX_surfxml_prop_value)
+AT_surfxml_route_impact_on_src_with_other_recv AX_surfxml_route_impact_on_src_with_other_recv;
+#define A_surfxml_route_impact_on_src_with_other_recv (surfxml_bufferstack + AX_surfxml_route_impact_on_src_with_other_recv)
+AT_surfxml_link_state_file AX_surfxml_link_state_file;
+#define A_surfxml_link_state_file (surfxml_bufferstack + AX_surfxml_link_state_file)
+AT_surfxml_set_prefix AX_surfxml_set_prefix;
+#define A_surfxml_set_prefix (surfxml_bufferstack + AX_surfxml_set_prefix)
+AT_surfxml_cluster_power AX_surfxml_cluster_power;
+#define A_surfxml_cluster_power (surfxml_bufferstack + AX_surfxml_cluster_power)
+AT_surfxml_process_function AX_surfxml_process_function;
+#define A_surfxml_process_function (surfxml_bufferstack + AX_surfxml_process_function)
+AT_surfxml_host_max_outgoing_rate AX_surfxml_host_max_outgoing_rate;
+#define A_surfxml_host_max_outgoing_rate (surfxml_bufferstack + AX_surfxml_host_max_outgoing_rate)
+AT_surfxml_link_c_ctn_id AX_surfxml_link_c_ctn_id;
+#define A_surfxml_link_c_ctn_id (surfxml_bufferstack + AX_surfxml_link_c_ctn_id)
+AT_surfxml_host_availability AX_surfxml_host_availability;
+#define A_surfxml_host_availability (surfxml_bufferstack + AX_surfxml_host_availability)
+AT_surfxml_route_src AX_surfxml_route_src;
+#define A_surfxml_route_src (surfxml_bufferstack + AX_surfxml_route_src)
+AT_surfxml_route_c_multi_src AX_surfxml_route_c_multi_src;
+#define A_surfxml_route_c_multi_src (surfxml_bufferstack + AX_surfxml_route_c_multi_src)
+AT_surfxml_route_c_multi_action AX_surfxml_route_c_multi_action;
+#define A_surfxml_route_c_multi_action AX_surfxml_route_c_multi_action
+AT_surfxml_trace_id AX_surfxml_trace_id;
+#define A_surfxml_trace_id (surfxml_bufferstack + AX_surfxml_trace_id)
+AT_surfxml_cluster_radical AX_surfxml_cluster_radical;
+#define A_surfxml_cluster_radical (surfxml_bufferstack + AX_surfxml_cluster_radical)
+AT_surfxml_include_file AX_surfxml_include_file;
+#define A_surfxml_include_file (surfxml_bufferstack + AX_surfxml_include_file)
+AT_surfxml_random_std_deviation AX_surfxml_random_std_deviation;
+#define A_surfxml_random_std_deviation (surfxml_bufferstack + AX_surfxml_random_std_deviation)
+AT_surfxml_trace_c_connect_kind AX_surfxml_trace_c_connect_kind;
+#define A_surfxml_trace_c_connect_kind AX_surfxml_trace_c_connect_kind
+AT_surfxml_trace_c_connect_connector_id AX_surfxml_trace_c_connect_connector_id;
+#define A_surfxml_trace_c_connect_connector_id (surfxml_bufferstack + AX_surfxml_trace_c_connect_connector_id)
+AT_surfxml_route_c_multi_dst AX_surfxml_route_c_multi_dst;
+#define A_surfxml_route_c_multi_dst (surfxml_bufferstack + AX_surfxml_route_c_multi_dst)
+AT_surfxml_host_state_file AX_surfxml_host_state_file;
+#define A_surfxml_host_state_file (surfxml_bufferstack + AX_surfxml_host_state_file)
+AT_surfxml_route_c_multi_symmetric AX_surfxml_route_c_multi_symmetric;
+#define A_surfxml_route_c_multi_symmetric AX_surfxml_route_c_multi_symmetric
+AT_surfxml_route_dst AX_surfxml_route_dst;
+#define A_surfxml_route_dst (surfxml_bufferstack + AX_surfxml_route_dst)
+AT_surfxml_cluster_bw AX_surfxml_cluster_bw;
+#define A_surfxml_cluster_bw (surfxml_bufferstack + AX_surfxml_cluster_bw)
+AT_surfxml_platform_version AX_surfxml_platform_version;
+#define A_surfxml_platform_version (surfxml_bufferstack + AX_surfxml_platform_version)
/* XML state. */
#ifdef FLEX_DEBUG
#define FAIL return fail
static int fail(const char*, ...);
-const char * surfxml_parse_err_msg(void);
+
+enum {flexml_max_err_msg_size = 512};
+static char flexml_err_msg[flexml_max_err_msg_size];
+const char * surfxml_parse_err_msg()
+{
+ return flexml_err_msg;
+}
+static void reset_surfxml_parse_err_msg()
+{
+ flexml_err_msg[0] = '\0';
+}
/* Cleanup */
static void cleanup(void);
#define CLEANUP cleanup()
/* Text buffer stack handling. */
-char bufferstack[FLEXML_BUFFERSTACKSIZE];
-static char* limit = bufferstack + FLEXML_BUFFERSTACKSIZE;
-typedef struct BufferLast_s {
- struct BufferLast_s *old; char* saved; char new1[1];
-} BufferLast;
-#ifdef FLEXML_HasMixed
-static BufferLast* last = (BufferLast*)0;
-#endif
-static char* next = bufferstack;
+char *surfxml_bufferstack = NULL;
+static int blimit = FLEXML_BUFFERSTACKSIZE;
+static int bnext = 1;
-#define BUFFERSET(P) (P = next)
-#define BUFFERPUTC(C) (assert(next<limit), *(next++) = (C))
+static int *indexstack = NULL;
+static int ilimit = FLEXML_INDEXSTACKSIZE;
+static int inext = 1;
+
+#define BUFFERSET(P) (P = bnext)
+#define BUFFERPUTC(C) (ck_blimit(), surfxml_bufferstack[bnext++] = (C))
#define BUFFERDONE (BUFFERPUTC('\0'))
-#define BUFFERLITERAL(C,P) bufferliteral(C,&(P),yytext)
-static void bufferliteral(char c, const char** pp, char* text)
+#define BUFFERLITERAL(C, P) surfxml_bufferliteral(C, &(P), yytext)
+
+/* after this is called, there are at least 2 slots left in the stack */
+static int ck_blimit()
+{
+ if (bnext >= blimit) {
+ blimit += FLEXML_BUFFERSTACKSIZE + 2;
+ {
+ char *temp = (char *) realloc(surfxml_bufferstack, blimit);
+ assert(temp);
+ surfxml_bufferstack = temp;
+ }
+ }
+ return 0;
+}
+
+/* after this is called, there are at least 2 slots left in the stack */
+static int ck_ilimit()
+{
+ if (inext >= ilimit) {
+ ilimit += FLEXML_INDEXSTACKSIZE + 2;
+ {
+ int *temp = (int *) realloc(indexstack, ilimit);
+ assert(temp);
+ indexstack = temp;
+ }
+ }
+ return 0;
+}
+
+#ifdef FLEXML_NEED_BUFFERLIT
+static void surfxml_bufferliteral(char c, int* pp, const char* text)
{
- char *s = strchr(text,c), *e = strrchr(text,c);
+ const char *s = (c ? strchr(text,c) : text-1), *e = strrchr(text,c);
assert(s <= e); BUFFERSET(*pp);
while (++s<e) {
- if (isspace(*s)) { BUFFERPUTC(' '); while (isspace(*s)) ++s; }
+ if (isspace(*s) && c) { BUFFERPUTC(' '); while (isspace(*s)) ++s; }
else BUFFERPUTC(*s);
}
BUFFERDONE;
}
+#endif
-#ifdef FLEXML_HasMixed
-static void pushbuffer(char* p)
+static void pushbuffer(int p)
{
- BufferLast* l = (BufferLast*)next;
- assert(next < limit);
- l->old = last;
- l->saved = p;
- next = l->new1;
- last = l;
+ ck_ilimit();
+ indexstack[inext++] = p;
+ indexstack[inext++] = bnext;
}
-static char* popbuffer(void)
+static int popbuffer(void)
{
- BufferLast* l = last;
- assert(last != (BufferLast*)0);
- last = l->old;
- next = (char*)l;
- return l->saved;
+ assert(inext >= 2);
+ bnext = indexstack[--inext];
+ return indexstack[--inext];
}
-#endif
/* General internal entities are `unput' back onto the input stream... */
#define ENTITYTEXT(T) \
{ char *s = (T), *e = s+strlen(s);\
while (--e >= s) { unput(*e); }}
+
+
%}
/* Flex standard options. */
* INPI inside an XML PI <?...?>
* VALUE1 inside a '...'-delimited literal
* VALUE2 inside a "..."-delimited literal
- * CDATA inside a <![CDATA[...]]> section.
+ * CDATA inside a <![CDATA[...] ]> section.
* ROOT_<tag> expect root element <tag>
* AL_<tag> inside the attribute list for <tag>
* IN_<tag> inside a <tag> with element contents (ready for end tag)
* IMPOSSIBLE dummy to permit disabling rules; must be last
*/
%x PROLOG DOCTYPE EPILOG INCOMMENT INPI VALUE1 VALUE2 CDATA
-%x ROOT_surfxml_platform_description AL_surfxml_platform_description S_surfxml_platform_description S_surfxml_platform_description_1 S_surfxml_platform_description_2 E_surfxml_platform_description
-%x ROOT_surfxml_include AL_surfxml_include S_surfxml_include S_surfxml_include_1 S_surfxml_include_2 E_surfxml_include
-%x ROOT_surfxml_cpu AL_surfxml_cpu E_surfxml_cpu
-%x ROOT_surfxml_network_link AL_surfxml_network_link E_surfxml_network_link
-%x ROOT_surfxml_route AL_surfxml_route S_surfxml_route S_surfxml_route_1 S_surfxml_route_2 E_surfxml_route
-%x ROOT_surfxml_route_element AL_surfxml_route_element E_surfxml_route_element
-%x ROOT_surfxml_process AL_surfxml_process S_surfxml_process S_surfxml_process_1 S_surfxml_process_2 E_surfxml_process
-%x ROOT_surfxml_argument AL_surfxml_argument E_surfxml_argument
+%x ROOT_surfxml_platform AL_surfxml_platform S_surfxml_platform S_surfxml_platform_1 S_surfxml_platform_2 S_surfxml_platform_3 S_surfxml_platform_4 S_surfxml_platform_5 E_surfxml_platform
+%x AL_surfxml_include E_surfxml_include
+%x AL_surfxml_trace IN_trace
+%x AL_surfxml_random S_surfxml_random S_surfxml_random_1 S_surfxml_random_2 E_surfxml_random
+%x AL_surfxml_trace_c_connect E_surfxml_trace_c_connect
+%x AL_surfxml_set E_surfxml_set
+%x AL_surfxml_foreach S_surfxml_foreach S_surfxml_foreach_1 E_surfxml_foreach
+%x AL_surfxml_host S_surfxml_host S_surfxml_host_1 S_surfxml_host_2 E_surfxml_host
+%x AL_surfxml_prop E_surfxml_prop
+%x AL_surfxml_cluster E_surfxml_cluster
+%x AL_surfxml_router E_surfxml_router
+%x AL_surfxml_link S_surfxml_link S_surfxml_link_1 S_surfxml_link_2 E_surfxml_link
+%x AL_surfxml_route_c_multi S_surfxml_route_c_multi S_surfxml_route_c_multi_1 S_surfxml_route_c_multi_2 E_surfxml_route_c_multi
+%x AL_surfxml_route S_surfxml_route S_surfxml_route_1 S_surfxml_route_2 E_surfxml_route
+%x AL_surfxml_link_c_ctn E_surfxml_link_c_ctn
+%x AL_surfxml_process S_surfxml_process S_surfxml_process_1 S_surfxml_process_2 E_surfxml_process
+%x AL_surfxml_argument E_surfxml_argument
%x IMPOSSIBLE
%{
/* Bypass Flex's default INITIAL state and begin by parsing the XML prolog. */
SET(PROLOG);
+ reset_surfxml_parse_err_msg();
+ surfxml_bufferstack = (char *) malloc(FLEXML_BUFFERSTACKSIZE);
+ assert(surfxml_bufferstack);
+ #ifdef FLEX_DEBUG
+ {
+ int i;
+ for (i = 0; i < blimit; i++) {
+ surfxml_bufferstack[i] = '\377';
+ }
+ }
+ #endif
+ surfxml_bufferstack[0] = '\0';
+ indexstack = (int *) malloc(FLEXML_INDEXSTACKSIZE * sizeof(int));
+ assert(indexstack);
+ indexstack[0] = 0;
+
/* FleXML_init */
- next = bufferstack;
+ bnext = inext = 1;
+ surfxml_bufferliteral('\0', &bnext, "0.0");
+ surfxml_bufferliteral('\0', &bnext, "http://simgrid.gforge.inria.fr/");
+ surfxml_bufferliteral('\0', &bnext, "http://simgrid.gforge.inria.fr/");
+ surfxml_bufferliteral('\0', &bnext, "1.0");
+ surfxml_bufferliteral('\0', &bnext, "1.0");
+ surfxml_bufferliteral('\0', &bnext, "1.0");
+ surfxml_bufferliteral('\0', &bnext, "1.0");
+ surfxml_bufferliteral('\0', &bnext, "-1.0");
+ surfxml_bufferliteral('\0', &bnext, "0.0");
+ surfxml_bufferliteral('\0', &bnext, "0.0");
+ surfxml_bufferliteral('\0', &bnext, "0.0");
+ surfxml_bufferliteral('\0', &bnext, "0.0");
+ surfxml_bufferliteral('\0', &bnext, "0.0");
+ surfxml_bufferliteral('\0', &bnext, "-1.0");
+ surfxml_bufferliteral('\0', &bnext, "-1.0");
if(!surfxml_statenames) {surfxml_statenames= (const char **)calloc(IMPOSSIBLE,sizeof(char*));
surfxml_statenames[PROLOG] = NULL;
surfxml_statenames[DOCTYPE] = NULL;
surfxml_statenames[VALUE1] = NULL;
surfxml_statenames[VALUE2] = NULL;
surfxml_statenames[CDATA] = NULL;
- surfxml_statenames[ROOT_surfxml_platform_description] = NULL;
- surfxml_statenames[AL_surfxml_platform_description] = NULL;
- surfxml_statenames[S_surfxml_platform_description] = "platform_description";
- surfxml_statenames[S_surfxml_platform_description_1] = "platform_description";
- surfxml_statenames[S_surfxml_platform_description_2] = "platform_description";
- surfxml_statenames[E_surfxml_platform_description] = "platform_description";
- surfxml_statenames[ROOT_surfxml_include] = NULL;
+ surfxml_statenames[ROOT_surfxml_platform] = NULL;
+ surfxml_statenames[AL_surfxml_platform] = NULL;
+ surfxml_statenames[S_surfxml_platform] = "platform";
+ surfxml_statenames[S_surfxml_platform_1] = "platform";
+ surfxml_statenames[S_surfxml_platform_2] = "platform";
+ surfxml_statenames[S_surfxml_platform_3] = "platform";
+ surfxml_statenames[S_surfxml_platform_4] = "platform";
+ surfxml_statenames[S_surfxml_platform_5] = "platform";
+ surfxml_statenames[E_surfxml_platform] = "platform";
surfxml_statenames[AL_surfxml_include] = NULL;
- surfxml_statenames[S_surfxml_include] = "include";
- surfxml_statenames[S_surfxml_include_1] = "include";
- surfxml_statenames[S_surfxml_include_2] = "include";
surfxml_statenames[E_surfxml_include] = "include";
- surfxml_statenames[ROOT_surfxml_cpu] = NULL;
- surfxml_statenames[AL_surfxml_cpu] = NULL;
- surfxml_statenames[E_surfxml_cpu] = "cpu";
- surfxml_statenames[ROOT_surfxml_network_link] = NULL;
- surfxml_statenames[AL_surfxml_network_link] = NULL;
- surfxml_statenames[E_surfxml_network_link] = "network_link";
- surfxml_statenames[ROOT_surfxml_route] = NULL;
+ surfxml_statenames[AL_surfxml_trace] = NULL;
+ surfxml_statenames[IN_trace] = "trace";
+ surfxml_statenames[AL_surfxml_random] = NULL;
+ surfxml_statenames[S_surfxml_random] = "random";
+ surfxml_statenames[S_surfxml_random_1] = "random";
+ surfxml_statenames[S_surfxml_random_2] = "random";
+ surfxml_statenames[E_surfxml_random] = "random";
+ surfxml_statenames[AL_surfxml_trace_c_connect] = NULL;
+ surfxml_statenames[E_surfxml_trace_c_connect] = "trace:connect";
+ surfxml_statenames[AL_surfxml_set] = NULL;
+ surfxml_statenames[E_surfxml_set] = "set";
+ surfxml_statenames[AL_surfxml_foreach] = NULL;
+ surfxml_statenames[S_surfxml_foreach] = "foreach";
+ surfxml_statenames[S_surfxml_foreach_1] = "foreach";
+ surfxml_statenames[E_surfxml_foreach] = "foreach";
+ surfxml_statenames[AL_surfxml_host] = NULL;
+ surfxml_statenames[S_surfxml_host] = "host";
+ surfxml_statenames[S_surfxml_host_1] = "host";
+ surfxml_statenames[S_surfxml_host_2] = "host";
+ surfxml_statenames[E_surfxml_host] = "host";
+ surfxml_statenames[AL_surfxml_prop] = NULL;
+ surfxml_statenames[E_surfxml_prop] = "prop";
+ surfxml_statenames[AL_surfxml_cluster] = NULL;
+ surfxml_statenames[E_surfxml_cluster] = "cluster";
+ surfxml_statenames[AL_surfxml_router] = NULL;
+ surfxml_statenames[E_surfxml_router] = "router";
+ surfxml_statenames[AL_surfxml_link] = NULL;
+ surfxml_statenames[S_surfxml_link] = "link";
+ surfxml_statenames[S_surfxml_link_1] = "link";
+ surfxml_statenames[S_surfxml_link_2] = "link";
+ surfxml_statenames[E_surfxml_link] = "link";
+ surfxml_statenames[AL_surfxml_route_c_multi] = NULL;
+ surfxml_statenames[S_surfxml_route_c_multi] = "route:multi";
+ surfxml_statenames[S_surfxml_route_c_multi_1] = "route:multi";
+ surfxml_statenames[S_surfxml_route_c_multi_2] = "route:multi";
+ surfxml_statenames[E_surfxml_route_c_multi] = "route:multi";
surfxml_statenames[AL_surfxml_route] = NULL;
surfxml_statenames[S_surfxml_route] = "route";
surfxml_statenames[S_surfxml_route_1] = "route";
surfxml_statenames[S_surfxml_route_2] = "route";
surfxml_statenames[E_surfxml_route] = "route";
- surfxml_statenames[ROOT_surfxml_route_element] = NULL;
- surfxml_statenames[AL_surfxml_route_element] = NULL;
- surfxml_statenames[E_surfxml_route_element] = "route_element";
- surfxml_statenames[ROOT_surfxml_process] = NULL;
+ surfxml_statenames[AL_surfxml_link_c_ctn] = NULL;
+ surfxml_statenames[E_surfxml_link_c_ctn] = "link:ctn";
surfxml_statenames[AL_surfxml_process] = NULL;
surfxml_statenames[S_surfxml_process] = "process";
surfxml_statenames[S_surfxml_process_1] = "process";
surfxml_statenames[S_surfxml_process_2] = "process";
surfxml_statenames[E_surfxml_process] = "process";
- surfxml_statenames[ROOT_surfxml_argument] = NULL;
surfxml_statenames[AL_surfxml_argument] = NULL;
surfxml_statenames[E_surfxml_argument] = "argument";
}
/* COMMENTS and PIs: handled uniformly for efficiency. */
-<ROOT_surfxml_platform_description,AL_surfxml_platform_description,S_surfxml_platform_description,S_surfxml_platform_description_1,S_surfxml_platform_description_2,E_surfxml_platform_description,ROOT_surfxml_include,AL_surfxml_include,S_surfxml_include,S_surfxml_include_1,S_surfxml_include_2,E_surfxml_include,ROOT_surfxml_cpu,AL_surfxml_cpu,E_surfxml_cpu,ROOT_surfxml_network_link,AL_surfxml_network_link,E_surfxml_network_link,ROOT_surfxml_route,AL_surfxml_route,S_surfxml_route,S_surfxml_route_1,S_surfxml_route_2,E_surfxml_route,ROOT_surfxml_route_element,AL_surfxml_route_element,E_surfxml_route_element,ROOT_surfxml_process,AL_surfxml_process,S_surfxml_process,S_surfxml_process_1,S_surfxml_process_2,E_surfxml_process,ROOT_surfxml_argument,AL_surfxml_argument,E_surfxml_argument,PROLOG,DOCTYPE,EPILOG>{
+<ROOT_surfxml_platform,AL_surfxml_platform,S_surfxml_platform,S_surfxml_platform_1,S_surfxml_platform_2,S_surfxml_platform_3,S_surfxml_platform_4,S_surfxml_platform_5,E_surfxml_platform,AL_surfxml_include,E_surfxml_include,AL_surfxml_trace,IN_trace,AL_surfxml_random,S_surfxml_random,S_surfxml_random_1,S_surfxml_random_2,E_surfxml_random,AL_surfxml_trace_c_connect,E_surfxml_trace_c_connect,AL_surfxml_set,E_surfxml_set,AL_surfxml_foreach,S_surfxml_foreach,S_surfxml_foreach_1,E_surfxml_foreach,AL_surfxml_host,S_surfxml_host,S_surfxml_host_1,S_surfxml_host_2,E_surfxml_host,AL_surfxml_prop,E_surfxml_prop,AL_surfxml_cluster,E_surfxml_cluster,AL_surfxml_router,E_surfxml_router,AL_surfxml_link,S_surfxml_link,S_surfxml_link_1,S_surfxml_link_2,E_surfxml_link,AL_surfxml_route_c_multi,S_surfxml_route_c_multi,S_surfxml_route_c_multi_1,S_surfxml_route_c_multi_2,E_surfxml_route_c_multi,AL_surfxml_route,S_surfxml_route,S_surfxml_route_1,S_surfxml_route_2,E_surfxml_route,AL_surfxml_link_c_ctn,E_surfxml_link_c_ctn,AL_surfxml_process,S_surfxml_process,S_surfxml_process_1,S_surfxml_process_2,E_surfxml_process,AL_surfxml_argument,E_surfxml_argument,PROLOG,DOCTYPE,EPILOG>{
"<!--" ENTER(INCOMMENT);
"<?" ENTER(INPI);
}
/* SPACES: skipped uniformly */
-<ROOT_surfxml_platform_description,AL_surfxml_platform_description,S_surfxml_platform_description,S_surfxml_platform_description_1,S_surfxml_platform_description_2,E_surfxml_platform_description,ROOT_surfxml_include,AL_surfxml_include,S_surfxml_include,S_surfxml_include_1,S_surfxml_include_2,E_surfxml_include,ROOT_surfxml_cpu,AL_surfxml_cpu,E_surfxml_cpu,ROOT_surfxml_network_link,AL_surfxml_network_link,E_surfxml_network_link,ROOT_surfxml_route,AL_surfxml_route,S_surfxml_route,S_surfxml_route_1,S_surfxml_route_2,E_surfxml_route,ROOT_surfxml_route_element,AL_surfxml_route_element,E_surfxml_route_element,ROOT_surfxml_process,AL_surfxml_process,S_surfxml_process,S_surfxml_process_1,S_surfxml_process_2,E_surfxml_process,ROOT_surfxml_argument,AL_surfxml_argument,E_surfxml_argument,PROLOG,DOCTYPE,EPILOG>{S} SKIP;
+<ROOT_surfxml_platform,AL_surfxml_platform,S_surfxml_platform,S_surfxml_platform_1,S_surfxml_platform_2,S_surfxml_platform_3,S_surfxml_platform_4,S_surfxml_platform_5,E_surfxml_platform,AL_surfxml_include,E_surfxml_include,AL_surfxml_trace,AL_surfxml_random,S_surfxml_random,S_surfxml_random_1,S_surfxml_random_2,E_surfxml_random,AL_surfxml_trace_c_connect,E_surfxml_trace_c_connect,AL_surfxml_set,E_surfxml_set,AL_surfxml_foreach,S_surfxml_foreach,S_surfxml_foreach_1,E_surfxml_foreach,AL_surfxml_host,S_surfxml_host,S_surfxml_host_1,S_surfxml_host_2,E_surfxml_host,AL_surfxml_prop,E_surfxml_prop,AL_surfxml_cluster,E_surfxml_cluster,AL_surfxml_router,E_surfxml_router,AL_surfxml_link,S_surfxml_link,S_surfxml_link_1,S_surfxml_link_2,E_surfxml_link,AL_surfxml_route_c_multi,S_surfxml_route_c_multi,S_surfxml_route_c_multi_1,S_surfxml_route_c_multi_2,E_surfxml_route_c_multi,AL_surfxml_route,S_surfxml_route,S_surfxml_route_1,S_surfxml_route_2,E_surfxml_route,AL_surfxml_link_c_ctn,E_surfxml_link_c_ctn,AL_surfxml_process,S_surfxml_process,S_surfxml_process_1,S_surfxml_process_2,E_surfxml_process,AL_surfxml_argument,E_surfxml_argument,PROLOG,DOCTYPE,EPILOG>{S} SKIP;
/* PROLOG: determine root element and process it. */
}
<PROLOG,DOCTYPE>{
- "<!DOCTYPE"{S}"argument"{S}SYSTEM{S}("'surfxml.dtd'"|"\"surfxml.dtd\""){s}">" SET(ROOT_surfxml_argument);
- "<!DOCTYPE"{S}"route_element"{S}SYSTEM{S}("'surfxml.dtd'"|"\"surfxml.dtd\""){s}">" SET(ROOT_surfxml_route_element);
- "<!DOCTYPE"{S}"cpu"{S}SYSTEM{S}("'surfxml.dtd'"|"\"surfxml.dtd\""){s}">" SET(ROOT_surfxml_cpu);
- "<!DOCTYPE"{S}"include"{S}SYSTEM{S}("'surfxml.dtd'"|"\"surfxml.dtd\""){s}">" SET(ROOT_surfxml_include);
- "<!DOCTYPE"{S}"route"{S}SYSTEM{S}("'surfxml.dtd'"|"\"surfxml.dtd\""){s}">" SET(ROOT_surfxml_route);
- "<!DOCTYPE"{S}"platform_description"{S}SYSTEM{S}("'surfxml.dtd'"|"\"surfxml.dtd\""){s}">" SET(ROOT_surfxml_platform_description);
- "<!DOCTYPE"{S}"network_link"{S}SYSTEM{S}("'surfxml.dtd'"|"\"surfxml.dtd\""){s}">" SET(ROOT_surfxml_network_link);
- "<!DOCTYPE"{S}"process"{S}SYSTEM{S}("'surfxml.dtd'"|"\"surfxml.dtd\""){s}">" SET(ROOT_surfxml_process);
+ "<!DOCTYPE"{S}"platform"{S}SYSTEM{S}("'surfxml.dtd'"|"\"surfxml.dtd\""){s}">" SET(ROOT_surfxml_platform);
"<!"[^>-][^>]*">" FAIL("Bad declaration %s.",yytext);
. FAIL("Unexpected character `%c' in prolog.", yytext[0]);
<<EOF>> FAIL("EOF in prolog.");
/* <!-- Small DTD for SURF based tools. --> */
-<ROOT_surfxml_platform_description>"<platform_description"{s} {
- ENTER(AL_surfxml_platform_description);
+<ROOT_surfxml_platform>"<platform"{s} {
+ AX_surfxml_platform_version = 1;
+ AX_surfxml_platform_xmlns_c_link = 5;
+ AX_surfxml_platform_xmlns_c_route = 37;
+ ENTER(AL_surfxml_platform); pushbuffer(0);
}
-<AL_surfxml_platform_description>{
+<AL_surfxml_platform>{
+ "version"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_platform_version);
+ "version"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_platform_version);
+
+ "xmlns:link"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_platform_xmlns_c_link);
+ "xmlns:link"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_platform_xmlns_c_link);
+
+ "xmlns:route"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_platform_xmlns_c_route);
+ "xmlns:route"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_platform_xmlns_c_route);
+
">" {
- LEAVE; STag_surfxml_platform_description();pcdata = NULL; ENTER(S_surfxml_platform_description);
+ LEAVE; STag_surfxml_platform();surfxml_pcdata_ix = 0; ENTER(S_surfxml_platform);
}
"/>" {
- LEAVE; STag_surfxml_platform_description(); pcdata = NULL; ETag_surfxml_platform_description();
+ LEAVE; STag_surfxml_platform(); surfxml_pcdata_ix = 0; ETag_surfxml_platform(); popbuffer(); /* attribute */
switch (YY_START) {
- case ROOT_surfxml_platform_description: SET(EPILOG); break;
+ case ROOT_surfxml_platform: SET(EPILOG); break;
}
}
- . FAIL("Unexpected character `%c' in attribute list of platform_description element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `platform_description' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `platform_description' element.");
+ . FAIL("Unexpected character `%c' in attribute list of platform element.", yytext[0]);
+ {Name} FAIL("Bad attribute `%s' in `platform' element start tag.",yytext);
+ <<EOF>> FAIL("EOF in attribute list of `platform' element.");
}
-<E_surfxml_platform_description,S_surfxml_platform_description_2,S_surfxml_platform_description>{
- "</platform_description"{s}">" {
+<S_surfxml_platform_5,S_surfxml_platform_1,S_surfxml_platform_3,S_surfxml_platform,E_surfxml_platform>{
+ "</platform"{s}">" {
LEAVE;
- ETag_surfxml_platform_description();
+ ETag_surfxml_platform();
+ popbuffer(); /* attribute */
switch (YY_START) {
- case ROOT_surfxml_platform_description: SET(EPILOG); break;
+ case ROOT_surfxml_platform: SET(EPILOG); break;
}
}
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</platform_description>' expected.",yytext);
- . FAIL("Unexpected character `%c': `</platform_description>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</platform_description>' expected.");
+ "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</platform>' expected.",yytext);
+ . FAIL("Unexpected character `%c': `</platform>' expected.",yytext[0]);
+ <<EOF>> FAIL("Premature EOF: `</platform>' expected.");
}
-<ROOT_surfxml_include,S_surfxml_platform_description_2,S_surfxml_include,S_surfxml_include_2,S_surfxml_platform_description_1,S_surfxml_include_1,S_surfxml_platform_description>"<include"{s} {
- A_surfxml_include_file = NULL;
- ENTER(AL_surfxml_include);
+<S_surfxml_platform_5,S_surfxml_platform_2,S_surfxml_platform_1,S_surfxml_platform_3,S_surfxml_platform,S_surfxml_platform_4>"<include"{s} {
+ AX_surfxml_include_file = 0;
+ ENTER(AL_surfxml_include); pushbuffer(0);
}
<AL_surfxml_include>{
- "file"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_include_file);
- "file"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_include_file);
+ "file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_include_file);
+ "file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_include_file);
">" {
- if (!A_surfxml_include_file) FAIL("Required attribute `file' not set for `include' element.");
- LEAVE; STag_surfxml_include();pcdata = NULL; ENTER(S_surfxml_include);
+ if (!AX_surfxml_include_file) FAIL("Required attribute `file' not set for `include' element.");
+ LEAVE; STag_surfxml_include();surfxml_pcdata_ix = 0; ENTER(E_surfxml_include);
}
"/>" {
- if (!A_surfxml_include_file) FAIL("Required attribute `file' not set for `include' element.");
- LEAVE; STag_surfxml_include(); pcdata = NULL; ETag_surfxml_include();
+ if (!AX_surfxml_include_file) FAIL("Required attribute `file' not set for `include' element.");
+ LEAVE; STag_surfxml_include(); surfxml_pcdata_ix = 0; ETag_surfxml_include(); popbuffer(); /* attribute */
switch (YY_START) {
- case S_surfxml_platform_description_2: case S_surfxml_platform_description_1: case S_surfxml_platform_description: SET(S_surfxml_platform_description_2); break;
- case ROOT_surfxml_include: SET(EPILOG); break;
- case S_surfxml_include: case S_surfxml_include_2: case S_surfxml_include_1: SET(S_surfxml_include_2); break;
+ case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform: case S_surfxml_platform_4: SET(S_surfxml_platform_5); break;
+ case S_surfxml_platform_2: SET(S_surfxml_platform_3); break;
}
}
. FAIL("Unexpected character `%c' in attribute list of include element.", yytext[0]);
<<EOF>> FAIL("EOF in attribute list of `include' element.");
}
-<E_surfxml_include,S_surfxml_include,S_surfxml_include_2>{
+<E_surfxml_include>{
"</include"{s}">" {
LEAVE;
ETag_surfxml_include();
+ popbuffer(); /* attribute */
switch (YY_START) {
- case S_surfxml_platform_description_2: case S_surfxml_platform_description_1: case S_surfxml_platform_description: SET(S_surfxml_platform_description_2); break;
- case ROOT_surfxml_include: SET(EPILOG); break;
- case S_surfxml_include: case S_surfxml_include_2: case S_surfxml_include_1: SET(S_surfxml_include_2); break;
+ case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform: case S_surfxml_platform_4: SET(S_surfxml_platform_5); break;
+ case S_surfxml_platform_2: SET(S_surfxml_platform_3); break;
}
}
"</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</include>' expected.",yytext);
<<EOF>> FAIL("Premature EOF: `</include>' expected.");
}
-<ROOT_surfxml_cpu,S_surfxml_platform_description_2,S_surfxml_include,S_surfxml_include_2,S_surfxml_platform_description_1,S_surfxml_include_1,S_surfxml_platform_description>"<cpu"{s} {
- A_surfxml_cpu_name = NULL;
- A_surfxml_cpu_power = NULL;
- A_surfxml_cpu_availability = "1.0";
- A_surfxml_cpu_availability_file = NULL;
- A_surfxml_cpu_state = A_surfxml_cpu_state_ON;
- A_surfxml_cpu_state_file = NULL;
- A_surfxml_cpu_interference_send = "1.0";
- A_surfxml_cpu_interference_recv = "1.0";
- A_surfxml_cpu_interference_send_recv = "1.0";
- A_surfxml_cpu_max_outgoing_rate = "-1.0";
- ENTER(AL_surfxml_cpu);
+<S_surfxml_platform_2,S_surfxml_platform_3,S_surfxml_platform>"<trace"{s} {
+ AX_surfxml_trace_id = 0;
+ AX_surfxml_trace_file = 0;
+ AX_surfxml_trace_periodicity = 0;
+ ENTER(AL_surfxml_trace); pushbuffer(0);
+ }
+
+<AL_surfxml_trace>{
+ "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_id);
+ "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_id);
+
+ "file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_file);
+ "file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_file);
+
+ "periodicity"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_periodicity);
+ "periodicity"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_periodicity);
+
+ ">" {
+ if (!AX_surfxml_trace_id) FAIL("Required attribute `id' not set for `trace' element.");
+ if (!AX_surfxml_trace_periodicity) FAIL("Required attribute `periodicity' not set for `trace' element.");
+ LEAVE; STag_surfxml_trace();pushbuffer(surfxml_pcdata_ix); BUFFERSET(surfxml_pcdata_ix);; ENTER(IN_trace);
+ }
+ "/>" {
+ if (!AX_surfxml_trace_id) FAIL("Required attribute `id' not set for `trace' element.");
+ if (!AX_surfxml_trace_periodicity) FAIL("Required attribute `periodicity' not set for `trace' element.");
+ LEAVE; STag_surfxml_trace(); surfxml_pcdata_ix = 0; ETag_surfxml_trace(); popbuffer(); /* attribute */
+ switch (YY_START) {
+ case S_surfxml_platform_2: case S_surfxml_platform_3: case S_surfxml_platform: SET(S_surfxml_platform_3); break;
+ }
+ }
+ . FAIL("Unexpected character `%c' in attribute list of trace element.", yytext[0]);
+ {Name} FAIL("Bad attribute `%s' in `trace' element start tag.",yytext);
+ <<EOF>> FAIL("EOF in attribute list of `trace' element.");
+}
+
+<IN_trace>{
+ "</trace"{s}">" {
+ LEAVE;
+ BUFFERDONE;
+ ETag_surfxml_trace();
+ surfxml_pcdata_ix = popbuffer();
+ popbuffer(); /* attribute */
+ switch (YY_START) {
+ case S_surfxml_platform_2: case S_surfxml_platform_3: case S_surfxml_platform: SET(S_surfxml_platform_3); break;
+ }
+ }
+ "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</trace>' expected.",yytext);
+ <<EOF>> FAIL("Premature EOF: `</trace>' expected.");
+}
+
+<S_surfxml_platform_2,S_surfxml_platform_3,S_surfxml_platform>"<random"{s} {
+ AX_surfxml_random_id = 0;
+ AX_surfxml_random_min = 0;
+ AX_surfxml_random_max = 0;
+ AX_surfxml_random_mean = 0;
+ AX_surfxml_random_std_deviation = 0;
+ AX_surfxml_random_generator = A_surfxml_random_generator_DRAND48;
+ ENTER(AL_surfxml_random); pushbuffer(0);
+ }
+
+<AL_surfxml_random>{
+ "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_id);
+ "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_id);
+
+ "min"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_min);
+ "min"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_min);
+
+ "max"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_max);
+ "max"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_max);
+
+ "mean"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_mean);
+ "mean"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_mean);
+
+ "std_deviation"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_std_deviation);
+ "std_deviation"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_std_deviation);
+
+ "generator"{Eq}"'DRAND48'" |
+ "generator"{Eq}"\"DRAND48\"" A_surfxml_random_generator = A_surfxml_random_generator_DRAND48;
+ "generator"{Eq}"'RAND'" |
+ "generator"{Eq}"\"RAND\"" A_surfxml_random_generator = A_surfxml_random_generator_RAND;
+
+ ">" {
+ if (!AX_surfxml_random_id) FAIL("Required attribute `id' not set for `random' element.");
+ if (!AX_surfxml_random_min) FAIL("Required attribute `min' not set for `random' element.");
+ if (!AX_surfxml_random_max) FAIL("Required attribute `max' not set for `random' element.");
+ if (!AX_surfxml_random_mean) FAIL("Required attribute `mean' not set for `random' element.");
+ if (!AX_surfxml_random_std_deviation) FAIL("Required attribute `std_deviation' not set for `random' element.");
+ LEAVE; STag_surfxml_random();surfxml_pcdata_ix = 0; ENTER(S_surfxml_random);
+ }
+ "/>" {
+ if (!AX_surfxml_random_id) FAIL("Required attribute `id' not set for `random' element.");
+ if (!AX_surfxml_random_min) FAIL("Required attribute `min' not set for `random' element.");
+ if (!AX_surfxml_random_max) FAIL("Required attribute `max' not set for `random' element.");
+ if (!AX_surfxml_random_mean) FAIL("Required attribute `mean' not set for `random' element.");
+ if (!AX_surfxml_random_std_deviation) FAIL("Required attribute `std_deviation' not set for `random' element.");
+ LEAVE; STag_surfxml_random(); surfxml_pcdata_ix = 0; ETag_surfxml_random(); popbuffer(); /* attribute */
+ switch (YY_START) {
+ case S_surfxml_platform_2: case S_surfxml_platform_3: case S_surfxml_platform: SET(S_surfxml_platform_3); break;
+ }
+ }
+ . FAIL("Unexpected character `%c' in attribute list of random element.", yytext[0]);
+ {Name} FAIL("Bad attribute `%s' in `random' element start tag.",yytext);
+ <<EOF>> FAIL("EOF in attribute list of `random' element.");
+}
+
+<S_surfxml_random_2,S_surfxml_random,E_surfxml_random>{
+ "</random"{s}">" {
+ LEAVE;
+ ETag_surfxml_random();
+ popbuffer(); /* attribute */
+ switch (YY_START) {
+ case S_surfxml_platform_2: case S_surfxml_platform_3: case S_surfxml_platform: SET(S_surfxml_platform_3); break;
}
+ }
+ "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</random>' expected.",yytext);
+ . FAIL("Unexpected character `%c': `</random>' expected.",yytext[0]);
+ <<EOF>> FAIL("Premature EOF: `</random>' expected.");
+}
-<AL_surfxml_cpu>{
- "name"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_cpu_name);
- "name"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_cpu_name);
+<S_surfxml_platform_5,S_surfxml_platform_2,S_surfxml_platform_1,S_surfxml_platform_3,S_surfxml_platform,S_surfxml_platform_4>"<trace:connect"{s} {
+ AX_surfxml_trace_c_connect_kind = A_surfxml_trace_c_connect_kind_AVAILABILITY;
+ AX_surfxml_trace_c_connect_trace_id = 0;
+ AX_surfxml_trace_c_connect_element = A_surfxml_trace_c_connect_element_HOST;
+ AX_surfxml_trace_c_connect_connector_id = 0;
+ ENTER(AL_surfxml_trace_c_connect); pushbuffer(0);
+ }
+
+<AL_surfxml_trace_c_connect>{
+ "kind"{Eq}"'AVAILABILITY'" |
+ "kind"{Eq}"\"AVAILABILITY\"" A_surfxml_trace_c_connect_kind = A_surfxml_trace_c_connect_kind_AVAILABILITY;
+ "kind"{Eq}"'BANDWIDTH'" |
+ "kind"{Eq}"\"BANDWIDTH\"" A_surfxml_trace_c_connect_kind = A_surfxml_trace_c_connect_kind_BANDWIDTH;
+ "kind"{Eq}"'LATENCY'" |
+ "kind"{Eq}"\"LATENCY\"" A_surfxml_trace_c_connect_kind = A_surfxml_trace_c_connect_kind_LATENCY;
+ "kind"{Eq}"'POWER'" |
+ "kind"{Eq}"\"POWER\"" A_surfxml_trace_c_connect_kind = A_surfxml_trace_c_connect_kind_POWER;
- "power"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_cpu_power);
- "power"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_cpu_power);
+ "trace_id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_c_connect_trace_id);
+ "trace_id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_c_connect_trace_id);
- "availability"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_cpu_availability);
- "availability"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_cpu_availability);
+ "element"{Eq}"'HOST'" |
+ "element"{Eq}"\"HOST\"" A_surfxml_trace_c_connect_element = A_surfxml_trace_c_connect_element_HOST;
+ "element"{Eq}"'LINK'" |
+ "element"{Eq}"\"LINK\"" A_surfxml_trace_c_connect_element = A_surfxml_trace_c_connect_element_LINK;
- "availability_file"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_cpu_availability_file);
- "availability_file"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_cpu_availability_file);
+ "connector_id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_c_connect_connector_id);
+ "connector_id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_c_connect_connector_id);
+
+ ">" {
+ if (!AX_surfxml_trace_c_connect_trace_id) FAIL("Required attribute `trace_id' not set for `trace:connect' element.");
+ if (!AX_surfxml_trace_c_connect_connector_id) FAIL("Required attribute `connector_id' not set for `trace:connect' element.");
+ LEAVE; STag_surfxml_trace_c_connect();surfxml_pcdata_ix = 0; ENTER(E_surfxml_trace_c_connect);
+ }
+ "/>" {
+ if (!AX_surfxml_trace_c_connect_trace_id) FAIL("Required attribute `trace_id' not set for `trace:connect' element.");
+ if (!AX_surfxml_trace_c_connect_connector_id) FAIL("Required attribute `connector_id' not set for `trace:connect' element.");
+ LEAVE; STag_surfxml_trace_c_connect(); surfxml_pcdata_ix = 0; ETag_surfxml_trace_c_connect(); popbuffer(); /* attribute */
+ switch (YY_START) {
+ case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform: case S_surfxml_platform_4: SET(S_surfxml_platform_5); break;
+ case S_surfxml_platform_2: SET(S_surfxml_platform_3); break;
+ }
+ }
+ . FAIL("Unexpected character `%c' in attribute list of trace:connect element.", yytext[0]);
+ {Name} FAIL("Bad attribute `%s' in `trace:connect' element start tag.",yytext);
+ <<EOF>> FAIL("EOF in attribute list of `trace:connect' element.");
+}
+
+<E_surfxml_trace_c_connect>{
+ "</trace:connect"{s}">" {
+ LEAVE;
+ ETag_surfxml_trace_c_connect();
+ popbuffer(); /* attribute */
+ switch (YY_START) {
+ case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform: case S_surfxml_platform_4: SET(S_surfxml_platform_5); break;
+ case S_surfxml_platform_2: SET(S_surfxml_platform_3); break;
+ }
+ }
+ "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</trace:connect>' expected.",yytext);
+ . FAIL("Unexpected character `%c': `</trace:connect>' expected.",yytext[0]);
+ <<EOF>> FAIL("Premature EOF: `</trace:connect>' expected.");
+}
+
+<S_surfxml_platform_2,S_surfxml_platform_3,S_surfxml_platform>"<set"{s} {
+ AX_surfxml_set_id = 0;
+ AX_surfxml_set_prefix = 0;
+ AX_surfxml_set_suffix = 0;
+ AX_surfxml_set_radical = 0;
+ ENTER(AL_surfxml_set); pushbuffer(0);
+ }
+
+<AL_surfxml_set>{
+ "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_set_id);
+ "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_set_id);
+
+ "prefix"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_set_prefix);
+ "prefix"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_set_prefix);
+
+ "suffix"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_set_suffix);
+ "suffix"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_set_suffix);
+
+ "radical"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_set_radical);
+ "radical"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_set_radical);
+
+ ">" {
+ if (!AX_surfxml_set_id) FAIL("Required attribute `id' not set for `set' element.");
+ if (!AX_surfxml_set_prefix) FAIL("Required attribute `prefix' not set for `set' element.");
+ if (!AX_surfxml_set_suffix) FAIL("Required attribute `suffix' not set for `set' element.");
+ if (!AX_surfxml_set_radical) FAIL("Required attribute `radical' not set for `set' element.");
+ LEAVE; STag_surfxml_set();surfxml_pcdata_ix = 0; ENTER(E_surfxml_set);
+ }
+ "/>" {
+ if (!AX_surfxml_set_id) FAIL("Required attribute `id' not set for `set' element.");
+ if (!AX_surfxml_set_prefix) FAIL("Required attribute `prefix' not set for `set' element.");
+ if (!AX_surfxml_set_suffix) FAIL("Required attribute `suffix' not set for `set' element.");
+ if (!AX_surfxml_set_radical) FAIL("Required attribute `radical' not set for `set' element.");
+ LEAVE; STag_surfxml_set(); surfxml_pcdata_ix = 0; ETag_surfxml_set(); popbuffer(); /* attribute */
+ switch (YY_START) {
+ case S_surfxml_platform_2: case S_surfxml_platform_3: case S_surfxml_platform: SET(S_surfxml_platform_3); break;
+ }
+ }
+ . FAIL("Unexpected character `%c' in attribute list of set element.", yytext[0]);
+ {Name} FAIL("Bad attribute `%s' in `set' element start tag.",yytext);
+ <<EOF>> FAIL("EOF in attribute list of `set' element.");
+}
+
+<E_surfxml_set>{
+ "</set"{s}">" {
+ LEAVE;
+ ETag_surfxml_set();
+ popbuffer(); /* attribute */
+ switch (YY_START) {
+ case S_surfxml_platform_2: case S_surfxml_platform_3: case S_surfxml_platform: SET(S_surfxml_platform_3); break;
+ }
+ }
+ "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</set>' expected.",yytext);
+ . FAIL("Unexpected character `%c': `</set>' expected.",yytext[0]);
+ <<EOF>> FAIL("Premature EOF: `</set>' expected.");
+}
+
+<S_surfxml_platform_2,S_surfxml_platform_3,S_surfxml_platform>"<foreach"{s} {
+ AX_surfxml_foreach_set_id = 0;
+ ENTER(AL_surfxml_foreach); pushbuffer(0);
+ }
+
+<AL_surfxml_foreach>{
+ "set_id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_foreach_set_id);
+ "set_id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_foreach_set_id);
+
+ ">" {
+ if (!AX_surfxml_foreach_set_id) FAIL("Required attribute `set_id' not set for `foreach' element.");
+ LEAVE; STag_surfxml_foreach();surfxml_pcdata_ix = 0; ENTER(S_surfxml_foreach);
+ }
+ "/>" FAIL("`foreach' element cannot be empty.");
+ . FAIL("Unexpected character `%c' in attribute list of foreach element.", yytext[0]);
+ {Name} FAIL("Bad attribute `%s' in `foreach' element start tag.",yytext);
+ <<EOF>> FAIL("EOF in attribute list of `foreach' element.");
+}
+
+<E_surfxml_foreach>{
+ "</foreach"{s}">" {
+ LEAVE;
+ ETag_surfxml_foreach();
+ popbuffer(); /* attribute */
+ switch (YY_START) {
+ case S_surfxml_platform_2: case S_surfxml_platform_3: case S_surfxml_platform: SET(S_surfxml_platform_3); break;
+ }
+ }
+ "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</foreach>' expected.",yytext);
+ . FAIL("Unexpected character `%c': `</foreach>' expected.",yytext[0]);
+ <<EOF>> FAIL("Premature EOF: `</foreach>' expected.");
+}
+
+<S_surfxml_foreach,S_surfxml_platform_2,S_surfxml_platform_3,S_surfxml_platform>"<host"{s} {
+ AX_surfxml_host_id = 0;
+ AX_surfxml_host_power = 0;
+ AX_surfxml_host_availability = 69;
+ AX_surfxml_host_availability_file = 0;
+ AX_surfxml_host_state = A_surfxml_host_state_ON;
+ AX_surfxml_host_state_file = 0;
+ AX_surfxml_host_interference_send = 73;
+ AX_surfxml_host_interference_recv = 77;
+ AX_surfxml_host_interference_send_recv = 81;
+ AX_surfxml_host_max_outgoing_rate = 85;
+ ENTER(AL_surfxml_host); pushbuffer(0);
+ }
+
+<AL_surfxml_host>{
+ "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_id);
+ "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_id);
+
+ "power"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_power);
+ "power"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_power);
+
+ "availability"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_availability);
+ "availability"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_availability);
+
+ "availability_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_availability_file);
+ "availability_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_availability_file);
"state"{Eq}"'ON'" |
- "state"{Eq}"\"ON\"" A_surfxml_cpu_state = A_surfxml_cpu_state_ON;
+ "state"{Eq}"\"ON\"" A_surfxml_host_state = A_surfxml_host_state_ON;
"state"{Eq}"'OFF'" |
- "state"{Eq}"\"OFF\"" A_surfxml_cpu_state = A_surfxml_cpu_state_OFF;
+ "state"{Eq}"\"OFF\"" A_surfxml_host_state = A_surfxml_host_state_OFF;
- "state_file"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_cpu_state_file);
- "state_file"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_cpu_state_file);
+ "state_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_state_file);
+ "state_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_state_file);
- "interference_send"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_cpu_interference_send);
- "interference_send"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_cpu_interference_send);
+ "interference_send"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_interference_send);
+ "interference_send"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_interference_send);
- "interference_recv"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_cpu_interference_recv);
- "interference_recv"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_cpu_interference_recv);
+ "interference_recv"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_interference_recv);
+ "interference_recv"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_interference_recv);
- "interference_send_recv"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_cpu_interference_send_recv);
- "interference_send_recv"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_cpu_interference_send_recv);
+ "interference_send_recv"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_interference_send_recv);
+ "interference_send_recv"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_interference_send_recv);
- "max_outgoing_rate"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_cpu_max_outgoing_rate);
- "max_outgoing_rate"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_cpu_max_outgoing_rate);
+ "max_outgoing_rate"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_max_outgoing_rate);
+ "max_outgoing_rate"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_max_outgoing_rate);
">" {
- if (!A_surfxml_cpu_name) FAIL("Required attribute `name' not set for `cpu' element.");
- if (!A_surfxml_cpu_power) FAIL("Required attribute `power' not set for `cpu' element.");
- LEAVE; STag_surfxml_cpu();pcdata = NULL; ENTER(E_surfxml_cpu);
+ if (!AX_surfxml_host_id) FAIL("Required attribute `id' not set for `host' element.");
+ if (!AX_surfxml_host_power) FAIL("Required attribute `power' not set for `host' element.");
+ LEAVE; STag_surfxml_host();surfxml_pcdata_ix = 0; ENTER(S_surfxml_host);
}
"/>" {
- if (!A_surfxml_cpu_name) FAIL("Required attribute `name' not set for `cpu' element.");
- if (!A_surfxml_cpu_power) FAIL("Required attribute `power' not set for `cpu' element.");
- LEAVE; STag_surfxml_cpu(); pcdata = NULL; ETag_surfxml_cpu();
+ if (!AX_surfxml_host_id) FAIL("Required attribute `id' not set for `host' element.");
+ if (!AX_surfxml_host_power) FAIL("Required attribute `power' not set for `host' element.");
+ LEAVE; STag_surfxml_host(); surfxml_pcdata_ix = 0; ETag_surfxml_host(); popbuffer(); /* attribute */
switch (YY_START) {
- case S_surfxml_platform_description_2: case S_surfxml_platform_description_1: case S_surfxml_platform_description: SET(S_surfxml_platform_description_2); break;
- case ROOT_surfxml_cpu: SET(EPILOG); break;
- case S_surfxml_include: case S_surfxml_include_2: case S_surfxml_include_1: SET(S_surfxml_include_2); break;
+ case S_surfxml_platform_2: case S_surfxml_platform_3: case S_surfxml_platform: SET(S_surfxml_platform_3); break;
+ case S_surfxml_foreach: SET(S_surfxml_foreach_1); break;
}
}
- . FAIL("Unexpected character `%c' in attribute list of cpu element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `cpu' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `cpu' element.");
+ . FAIL("Unexpected character `%c' in attribute list of host element.", yytext[0]);
+ {Name} FAIL("Bad attribute `%s' in `host' element start tag.",yytext);
+ <<EOF>> FAIL("EOF in attribute list of `host' element.");
}
-<E_surfxml_cpu>{
- "</cpu"{s}">" {
+<S_surfxml_host,E_surfxml_host,S_surfxml_host_2>{
+ "</host"{s}">" {
LEAVE;
- ETag_surfxml_cpu();
+ ETag_surfxml_host();
+ popbuffer(); /* attribute */
switch (YY_START) {
- case S_surfxml_platform_description_2: case S_surfxml_platform_description_1: case S_surfxml_platform_description: SET(S_surfxml_platform_description_2); break;
- case ROOT_surfxml_cpu: SET(EPILOG); break;
- case S_surfxml_include: case S_surfxml_include_2: case S_surfxml_include_1: SET(S_surfxml_include_2); break;
+ case S_surfxml_platform_2: case S_surfxml_platform_3: case S_surfxml_platform: SET(S_surfxml_platform_3); break;
+ case S_surfxml_foreach: SET(S_surfxml_foreach_1); break;
}
}
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</cpu>' expected.",yytext);
- . FAIL("Unexpected character `%c': `</cpu>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</cpu>' expected.");
+ "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</host>' expected.",yytext);
+ . FAIL("Unexpected character `%c': `</host>' expected.",yytext[0]);
+ <<EOF>> FAIL("Premature EOF: `</host>' expected.");
}
-<ROOT_surfxml_network_link,S_surfxml_platform_description_2,S_surfxml_include,S_surfxml_include_2,S_surfxml_platform_description_1,S_surfxml_include_1,S_surfxml_platform_description>"<network_link"{s} {
- A_surfxml_network_link_name = NULL;
- A_surfxml_network_link_bandwidth = NULL;
- A_surfxml_network_link_bandwidth_file = NULL;
- A_surfxml_network_link_latency = "0.0";
- A_surfxml_network_link_latency_file = NULL;
- A_surfxml_network_link_state = A_surfxml_network_link_state_ON;
- A_surfxml_network_link_state_file = NULL;
- A_surfxml_network_link_sharing_policy = A_surfxml_network_link_sharing_policy_SHARED;
- ENTER(AL_surfxml_network_link);
+<S_surfxml_host,S_surfxml_link_1,S_surfxml_link_2,S_surfxml_random,S_surfxml_random_2,S_surfxml_link,S_surfxml_host_1,S_surfxml_random_1,S_surfxml_process_1,S_surfxml_process,S_surfxml_process_2,S_surfxml_host_2>"<prop"{s} {
+ AX_surfxml_prop_id = 0;
+ AX_surfxml_prop_value = 0;
+ ENTER(AL_surfxml_prop); pushbuffer(0);
}
-<AL_surfxml_network_link>{
- "name"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_network_link_name);
- "name"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_network_link_name);
+<AL_surfxml_prop>{
+ "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_prop_id);
+ "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_prop_id);
- "bandwidth"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_network_link_bandwidth);
- "bandwidth"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_network_link_bandwidth);
+ "value"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_prop_value);
+ "value"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_prop_value);
- "bandwidth_file"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_network_link_bandwidth_file);
- "bandwidth_file"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_network_link_bandwidth_file);
+ ">" {
+ if (!AX_surfxml_prop_id) FAIL("Required attribute `id' not set for `prop' element.");
+ if (!AX_surfxml_prop_value) FAIL("Required attribute `value' not set for `prop' element.");
+ LEAVE; STag_surfxml_prop();surfxml_pcdata_ix = 0; ENTER(E_surfxml_prop);
+ }
+ "/>" {
+ if (!AX_surfxml_prop_id) FAIL("Required attribute `id' not set for `prop' element.");
+ if (!AX_surfxml_prop_value) FAIL("Required attribute `value' not set for `prop' element.");
+ LEAVE; STag_surfxml_prop(); surfxml_pcdata_ix = 0; ETag_surfxml_prop(); popbuffer(); /* attribute */
+ switch (YY_START) {
+ case S_surfxml_random: case S_surfxml_random_2: case S_surfxml_random_1: SET(S_surfxml_random_2); break;
+ case S_surfxml_process_1: case S_surfxml_process: case S_surfxml_process_2: SET(S_surfxml_process_2); break;
+ case S_surfxml_host: case S_surfxml_host_1: case S_surfxml_host_2: SET(S_surfxml_host_2); break;
+ case S_surfxml_link_1: case S_surfxml_link_2: case S_surfxml_link: SET(S_surfxml_link_2); break;
+ }
+ }
+ . FAIL("Unexpected character `%c' in attribute list of prop element.", yytext[0]);
+ {Name} FAIL("Bad attribute `%s' in `prop' element start tag.",yytext);
+ <<EOF>> FAIL("EOF in attribute list of `prop' element.");
+}
+
+<E_surfxml_prop>{
+ "</prop"{s}">" {
+ LEAVE;
+ ETag_surfxml_prop();
+ popbuffer(); /* attribute */
+ switch (YY_START) {
+ case S_surfxml_random: case S_surfxml_random_2: case S_surfxml_random_1: SET(S_surfxml_random_2); break;
+ case S_surfxml_process_1: case S_surfxml_process: case S_surfxml_process_2: SET(S_surfxml_process_2); break;
+ case S_surfxml_host: case S_surfxml_host_1: case S_surfxml_host_2: SET(S_surfxml_host_2); break;
+ case S_surfxml_link_1: case S_surfxml_link_2: case S_surfxml_link: SET(S_surfxml_link_2); break;
+ }
+ }
+ "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</prop>' expected.",yytext);
+ . FAIL("Unexpected character `%c': `</prop>' expected.",yytext[0]);
+ <<EOF>> FAIL("Premature EOF: `</prop>' expected.");
+}
- "latency"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_network_link_latency);
- "latency"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_network_link_latency);
+<S_surfxml_platform_2,S_surfxml_platform,S_surfxml_platform_3>"<cluster"{s} {
+ AX_surfxml_cluster_id = 0;
+ AX_surfxml_cluster_prefix = 0;
+ AX_surfxml_cluster_suffix = 0;
+ AX_surfxml_cluster_radical = 0;
+ AX_surfxml_cluster_power = 0;
+ AX_surfxml_cluster_bw = 0;
+ AX_surfxml_cluster_lat = 0;
+ AX_surfxml_cluster_bb_bw = 0;
+ AX_surfxml_cluster_bb_lat = 0;
+ ENTER(AL_surfxml_cluster); pushbuffer(0);
+ }
- "latency_file"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_network_link_latency_file);
- "latency_file"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_network_link_latency_file);
+<AL_surfxml_cluster>{
+ "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_id);
+ "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_id);
+
+ "prefix"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_prefix);
+ "prefix"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_prefix);
+
+ "suffix"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_suffix);
+ "suffix"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_suffix);
+
+ "radical"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_radical);
+ "radical"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_radical);
+
+ "power"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_power);
+ "power"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_power);
+
+ "bw"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_bw);
+ "bw"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_bw);
+
+ "lat"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_lat);
+ "lat"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_lat);
+
+ "bb_bw"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_bb_bw);
+ "bb_bw"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_bb_bw);
+
+ "bb_lat"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_bb_lat);
+ "bb_lat"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_bb_lat);
+
+ ">" {
+ if (!AX_surfxml_cluster_id) FAIL("Required attribute `id' not set for `cluster' element.");
+ if (!AX_surfxml_cluster_prefix) FAIL("Required attribute `prefix' not set for `cluster' element.");
+ if (!AX_surfxml_cluster_suffix) FAIL("Required attribute `suffix' not set for `cluster' element.");
+ if (!AX_surfxml_cluster_radical) FAIL("Required attribute `radical' not set for `cluster' element.");
+ if (!AX_surfxml_cluster_power) FAIL("Required attribute `power' not set for `cluster' element.");
+ if (!AX_surfxml_cluster_bw) FAIL("Required attribute `bw' not set for `cluster' element.");
+ if (!AX_surfxml_cluster_lat) FAIL("Required attribute `lat' not set for `cluster' element.");
+ if (!AX_surfxml_cluster_bb_bw) FAIL("Required attribute `bb_bw' not set for `cluster' element.");
+ if (!AX_surfxml_cluster_bb_lat) FAIL("Required attribute `bb_lat' not set for `cluster' element.");
+ LEAVE; STag_surfxml_cluster();surfxml_pcdata_ix = 0; ENTER(E_surfxml_cluster);
+ }
+ "/>" {
+ if (!AX_surfxml_cluster_id) FAIL("Required attribute `id' not set for `cluster' element.");
+ if (!AX_surfxml_cluster_prefix) FAIL("Required attribute `prefix' not set for `cluster' element.");
+ if (!AX_surfxml_cluster_suffix) FAIL("Required attribute `suffix' not set for `cluster' element.");
+ if (!AX_surfxml_cluster_radical) FAIL("Required attribute `radical' not set for `cluster' element.");
+ if (!AX_surfxml_cluster_power) FAIL("Required attribute `power' not set for `cluster' element.");
+ if (!AX_surfxml_cluster_bw) FAIL("Required attribute `bw' not set for `cluster' element.");
+ if (!AX_surfxml_cluster_lat) FAIL("Required attribute `lat' not set for `cluster' element.");
+ if (!AX_surfxml_cluster_bb_bw) FAIL("Required attribute `bb_bw' not set for `cluster' element.");
+ if (!AX_surfxml_cluster_bb_lat) FAIL("Required attribute `bb_lat' not set for `cluster' element.");
+ LEAVE; STag_surfxml_cluster(); surfxml_pcdata_ix = 0; ETag_surfxml_cluster(); popbuffer(); /* attribute */
+ switch (YY_START) {
+ case S_surfxml_platform_2: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_3); break;
+ }
+ }
+ . FAIL("Unexpected character `%c' in attribute list of cluster element.", yytext[0]);
+ {Name} FAIL("Bad attribute `%s' in `cluster' element start tag.",yytext);
+ <<EOF>> FAIL("EOF in attribute list of `cluster' element.");
+}
+
+<E_surfxml_cluster>{
+ "</cluster"{s}">" {
+ LEAVE;
+ ETag_surfxml_cluster();
+ popbuffer(); /* attribute */
+ switch (YY_START) {
+ case S_surfxml_platform_2: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_3); break;
+ }
+ }
+ "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</cluster>' expected.",yytext);
+ . FAIL("Unexpected character `%c': `</cluster>' expected.",yytext[0]);
+ <<EOF>> FAIL("Premature EOF: `</cluster>' expected.");
+}
+
+<S_surfxml_platform_2,S_surfxml_platform,S_surfxml_platform_3>"<router"{s} {
+ AX_surfxml_router_id = 0;
+ ENTER(AL_surfxml_router); pushbuffer(0);
+ }
+
+<AL_surfxml_router>{
+ "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_router_id);
+ "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_router_id);
+
+ ">" {
+ if (!AX_surfxml_router_id) FAIL("Required attribute `id' not set for `router' element.");
+ LEAVE; STag_surfxml_router();surfxml_pcdata_ix = 0; ENTER(E_surfxml_router);
+ }
+ "/>" {
+ if (!AX_surfxml_router_id) FAIL("Required attribute `id' not set for `router' element.");
+ LEAVE; STag_surfxml_router(); surfxml_pcdata_ix = 0; ETag_surfxml_router(); popbuffer(); /* attribute */
+ switch (YY_START) {
+ case S_surfxml_platform_2: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_3); break;
+ }
+ }
+ . FAIL("Unexpected character `%c' in attribute list of router element.", yytext[0]);
+ {Name} FAIL("Bad attribute `%s' in `router' element start tag.",yytext);
+ <<EOF>> FAIL("EOF in attribute list of `router' element.");
+}
+
+<E_surfxml_router>{
+ "</router"{s}">" {
+ LEAVE;
+ ETag_surfxml_router();
+ popbuffer(); /* attribute */
+ switch (YY_START) {
+ case S_surfxml_platform_2: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_3); break;
+ }
+ }
+ "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</router>' expected.",yytext);
+ . FAIL("Unexpected character `%c': `</router>' expected.",yytext[0]);
+ <<EOF>> FAIL("Premature EOF: `</router>' expected.");
+}
+
+<S_surfxml_foreach,S_surfxml_platform_2,S_surfxml_platform,S_surfxml_foreach_1,S_surfxml_platform_3>"<link"{s} {
+ AX_surfxml_link_id = 0;
+ AX_surfxml_link_bandwidth = 0;
+ AX_surfxml_link_bandwidth_file = 0;
+ AX_surfxml_link_latency = 90;
+ AX_surfxml_link_latency_file = 0;
+ AX_surfxml_link_state = A_surfxml_link_state_ON;
+ AX_surfxml_link_state_file = 0;
+ AX_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
+ ENTER(AL_surfxml_link); pushbuffer(0);
+ }
+
+<AL_surfxml_link>{
+ "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_id);
+ "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_id);
+
+ "bandwidth"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_bandwidth);
+ "bandwidth"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_bandwidth);
+
+ "bandwidth_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_bandwidth_file);
+ "bandwidth_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_bandwidth_file);
+
+ "latency"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_latency);
+ "latency"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_latency);
+
+ "latency_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_latency_file);
+ "latency_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_latency_file);
"state"{Eq}"'ON'" |
- "state"{Eq}"\"ON\"" A_surfxml_network_link_state = A_surfxml_network_link_state_ON;
+ "state"{Eq}"\"ON\"" A_surfxml_link_state = A_surfxml_link_state_ON;
"state"{Eq}"'OFF'" |
- "state"{Eq}"\"OFF\"" A_surfxml_network_link_state = A_surfxml_network_link_state_OFF;
+ "state"{Eq}"\"OFF\"" A_surfxml_link_state = A_surfxml_link_state_OFF;
- "state_file"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_network_link_state_file);
- "state_file"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_network_link_state_file);
+ "state_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_state_file);
+ "state_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_state_file);
"sharing_policy"{Eq}"'SHARED'" |
- "sharing_policy"{Eq}"\"SHARED\"" A_surfxml_network_link_sharing_policy = A_surfxml_network_link_sharing_policy_SHARED;
+ "sharing_policy"{Eq}"\"SHARED\"" A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
"sharing_policy"{Eq}"'FATPIPE'" |
- "sharing_policy"{Eq}"\"FATPIPE\"" A_surfxml_network_link_sharing_policy = A_surfxml_network_link_sharing_policy_FATPIPE;
+ "sharing_policy"{Eq}"\"FATPIPE\"" A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_FATPIPE;
">" {
- if (!A_surfxml_network_link_name) FAIL("Required attribute `name' not set for `network_link' element.");
- if (!A_surfxml_network_link_bandwidth) FAIL("Required attribute `bandwidth' not set for `network_link' element.");
- LEAVE; STag_surfxml_network_link();pcdata = NULL; ENTER(E_surfxml_network_link);
+ if (!AX_surfxml_link_id) FAIL("Required attribute `id' not set for `link' element.");
+ if (!AX_surfxml_link_bandwidth) FAIL("Required attribute `bandwidth' not set for `link' element.");
+ LEAVE; STag_surfxml_link();surfxml_pcdata_ix = 0; ENTER(S_surfxml_link);
}
"/>" {
- if (!A_surfxml_network_link_name) FAIL("Required attribute `name' not set for `network_link' element.");
- if (!A_surfxml_network_link_bandwidth) FAIL("Required attribute `bandwidth' not set for `network_link' element.");
- LEAVE; STag_surfxml_network_link(); pcdata = NULL; ETag_surfxml_network_link();
+ if (!AX_surfxml_link_id) FAIL("Required attribute `id' not set for `link' element.");
+ if (!AX_surfxml_link_bandwidth) FAIL("Required attribute `bandwidth' not set for `link' element.");
+ LEAVE; STag_surfxml_link(); surfxml_pcdata_ix = 0; ETag_surfxml_link(); popbuffer(); /* attribute */
+ switch (YY_START) {
+ case S_surfxml_foreach: case S_surfxml_foreach_1: SET(E_surfxml_foreach); break;
+ case S_surfxml_platform_2: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_3); break;
+ }
+ }
+ . FAIL("Unexpected character `%c' in attribute list of link element.", yytext[0]);
+ {Name} FAIL("Bad attribute `%s' in `link' element start tag.",yytext);
+ <<EOF>> FAIL("EOF in attribute list of `link' element.");
+}
+
+<S_surfxml_link_2,E_surfxml_link,S_surfxml_link>{
+ "</link"{s}">" {
+ LEAVE;
+ ETag_surfxml_link();
+ popbuffer(); /* attribute */
switch (YY_START) {
- case S_surfxml_platform_description_2: case S_surfxml_platform_description_1: case S_surfxml_platform_description: SET(S_surfxml_platform_description_2); break;
- case ROOT_surfxml_network_link: SET(EPILOG); break;
- case S_surfxml_include: case S_surfxml_include_2: case S_surfxml_include_1: SET(S_surfxml_include_2); break;
+ case S_surfxml_foreach: case S_surfxml_foreach_1: SET(E_surfxml_foreach); break;
+ case S_surfxml_platform_2: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_3); break;
+ }
+ }
+ "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</link>' expected.",yytext);
+ . FAIL("Unexpected character `%c': `</link>' expected.",yytext[0]);
+ <<EOF>> FAIL("Premature EOF: `</link>' expected.");
+}
+
+<S_surfxml_platform_5,S_surfxml_platform_1,S_surfxml_platform,S_surfxml_platform_3,S_surfxml_platform_4>"<route:multi"{s} {
+ AX_surfxml_route_c_multi_src = 0;
+ AX_surfxml_route_c_multi_dst = 0;
+ AX_surfxml_route_c_multi_action = A_surfxml_route_c_multi_action_POSTPEND;
+ AX_surfxml_route_c_multi_symmetric = A_surfxml_route_c_multi_symmetric_YES;
+ ENTER(AL_surfxml_route_c_multi); pushbuffer(0);
}
+
+<AL_surfxml_route_c_multi>{
+ "src"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_route_c_multi_src);
+ "src"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_route_c_multi_src);
+
+ "dst"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_route_c_multi_dst);
+ "dst"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_route_c_multi_dst);
+
+ "action"{Eq}"'POSTPEND'" |
+ "action"{Eq}"\"POSTPEND\"" A_surfxml_route_c_multi_action = A_surfxml_route_c_multi_action_POSTPEND;
+ "action"{Eq}"'PREPEND'" |
+ "action"{Eq}"\"PREPEND\"" A_surfxml_route_c_multi_action = A_surfxml_route_c_multi_action_PREPEND;
+ "action"{Eq}"'OVERRIDE'" |
+ "action"{Eq}"\"OVERRIDE\"" A_surfxml_route_c_multi_action = A_surfxml_route_c_multi_action_OVERRIDE;
+
+ "symmetric"{Eq}"'YES'" |
+ "symmetric"{Eq}"\"YES\"" A_surfxml_route_c_multi_symmetric = A_surfxml_route_c_multi_symmetric_YES;
+ "symmetric"{Eq}"'NO'" |
+ "symmetric"{Eq}"\"NO\"" A_surfxml_route_c_multi_symmetric = A_surfxml_route_c_multi_symmetric_NO;
+
+ ">" {
+ if (!AX_surfxml_route_c_multi_src) FAIL("Required attribute `src' not set for `route:multi' element.");
+ if (!AX_surfxml_route_c_multi_dst) FAIL("Required attribute `dst' not set for `route:multi' element.");
+ LEAVE; STag_surfxml_route_c_multi();surfxml_pcdata_ix = 0; ENTER(S_surfxml_route_c_multi);
}
- . FAIL("Unexpected character `%c' in attribute list of network_link element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `network_link' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `network_link' element.");
+ "/>" FAIL("`route:multi' element cannot be empty.");
+ . FAIL("Unexpected character `%c' in attribute list of route:multi element.", yytext[0]);
+ {Name} FAIL("Bad attribute `%s' in `route:multi' element start tag.",yytext);
+ <<EOF>> FAIL("EOF in attribute list of `route:multi' element.");
}
-<E_surfxml_network_link>{
- "</network_link"{s}">" {
+<S_surfxml_route_c_multi_2,E_surfxml_route_c_multi>{
+ "</route:multi"{s}">" {
LEAVE;
- ETag_surfxml_network_link();
+ ETag_surfxml_route_c_multi();
+ popbuffer(); /* attribute */
switch (YY_START) {
- case S_surfxml_platform_description_2: case S_surfxml_platform_description_1: case S_surfxml_platform_description: SET(S_surfxml_platform_description_2); break;
- case ROOT_surfxml_network_link: SET(EPILOG); break;
- case S_surfxml_include: case S_surfxml_include_2: case S_surfxml_include_1: SET(S_surfxml_include_2); break;
+ case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: case S_surfxml_platform_4: SET(S_surfxml_platform_5); break;
}
}
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</network_link>' expected.",yytext);
- . FAIL("Unexpected character `%c': `</network_link>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</network_link>' expected.");
+ "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</route:multi>' expected.",yytext);
+ . FAIL("Unexpected character `%c': `</route:multi>' expected.",yytext[0]);
+ <<EOF>> FAIL("Premature EOF: `</route:multi>' expected.");
}
-<ROOT_surfxml_route,S_surfxml_platform_description_2,S_surfxml_include,S_surfxml_include_2,S_surfxml_platform_description_1,S_surfxml_include_1,S_surfxml_platform_description>"<route"{s} {
- A_surfxml_route_src = NULL;
- A_surfxml_route_dst = NULL;
- A_surfxml_route_impact_on_src = "0.0";
- A_surfxml_route_impact_on_dst = "0.0";
- A_surfxml_route_impact_on_src_with_other_recv = "0.0";
- A_surfxml_route_impact_on_dst_with_other_send = "0.0";
- ENTER(AL_surfxml_route);
+<S_surfxml_platform_5,S_surfxml_platform_1,S_surfxml_platform,S_surfxml_platform_3,S_surfxml_platform_4>"<route"{s} {
+ AX_surfxml_route_src = 0;
+ AX_surfxml_route_dst = 0;
+ AX_surfxml_route_impact_on_src = 94;
+ AX_surfxml_route_impact_on_dst = 98;
+ AX_surfxml_route_impact_on_src_with_other_recv = 102;
+ AX_surfxml_route_impact_on_dst_with_other_send = 106;
+ AX_surfxml_route_action = A_surfxml_route_action_POSTPEND;
+ ENTER(AL_surfxml_route); pushbuffer(0);
}
<AL_surfxml_route>{
- "src"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_route_src);
- "src"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_route_src);
+ "src"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_route_src);
+ "src"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_route_src);
+
+ "dst"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_route_dst);
+ "dst"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_route_dst);
- "dst"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_route_dst);
- "dst"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_route_dst);
+ "impact_on_src"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_route_impact_on_src);
+ "impact_on_src"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_route_impact_on_src);
- "impact_on_src"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_route_impact_on_src);
- "impact_on_src"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_route_impact_on_src);
+ "impact_on_dst"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_route_impact_on_dst);
+ "impact_on_dst"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_route_impact_on_dst);
- "impact_on_dst"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_route_impact_on_dst);
- "impact_on_dst"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_route_impact_on_dst);
+ "impact_on_src_with_other_recv"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_route_impact_on_src_with_other_recv);
+ "impact_on_src_with_other_recv"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_route_impact_on_src_with_other_recv);
- "impact_on_src_with_other_recv"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_route_impact_on_src_with_other_recv);
- "impact_on_src_with_other_recv"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_route_impact_on_src_with_other_recv);
+ "impact_on_dst_with_other_send"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_route_impact_on_dst_with_other_send);
+ "impact_on_dst_with_other_send"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_route_impact_on_dst_with_other_send);
- "impact_on_dst_with_other_send"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_route_impact_on_dst_with_other_send);
- "impact_on_dst_with_other_send"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_route_impact_on_dst_with_other_send);
+ "action"{Eq}"'POSTPEND'" |
+ "action"{Eq}"\"POSTPEND\"" A_surfxml_route_action = A_surfxml_route_action_POSTPEND;
+ "action"{Eq}"'PREPEND'" |
+ "action"{Eq}"\"PREPEND\"" A_surfxml_route_action = A_surfxml_route_action_PREPEND;
+ "action"{Eq}"'OVERRIDE'" |
+ "action"{Eq}"\"OVERRIDE\"" A_surfxml_route_action = A_surfxml_route_action_OVERRIDE;
">" {
- if (!A_surfxml_route_src) FAIL("Required attribute `src' not set for `route' element.");
- if (!A_surfxml_route_dst) FAIL("Required attribute `dst' not set for `route' element.");
- LEAVE; STag_surfxml_route();pcdata = NULL; ENTER(S_surfxml_route);
+ if (!AX_surfxml_route_src) FAIL("Required attribute `src' not set for `route' element.");
+ if (!AX_surfxml_route_dst) FAIL("Required attribute `dst' not set for `route' element.");
+ LEAVE; STag_surfxml_route();surfxml_pcdata_ix = 0; ENTER(S_surfxml_route);
}
"/>" {
- if (!A_surfxml_route_src) FAIL("Required attribute `src' not set for `route' element.");
- if (!A_surfxml_route_dst) FAIL("Required attribute `dst' not set for `route' element.");
- LEAVE; STag_surfxml_route(); pcdata = NULL; ETag_surfxml_route();
+ if (!AX_surfxml_route_src) FAIL("Required attribute `src' not set for `route' element.");
+ if (!AX_surfxml_route_dst) FAIL("Required attribute `dst' not set for `route' element.");
+ LEAVE; STag_surfxml_route(); surfxml_pcdata_ix = 0; ETag_surfxml_route(); popbuffer(); /* attribute */
switch (YY_START) {
- case S_surfxml_platform_description_2: case S_surfxml_platform_description_1: case S_surfxml_platform_description: SET(S_surfxml_platform_description_2); break;
- case ROOT_surfxml_route: SET(EPILOG); break;
- case S_surfxml_include: case S_surfxml_include_2: case S_surfxml_include_1: SET(S_surfxml_include_2); break;
+ case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: case S_surfxml_platform_4: SET(S_surfxml_platform_5); break;
}
}
. FAIL("Unexpected character `%c' in attribute list of route element.", yytext[0]);
"</route"{s}">" {
LEAVE;
ETag_surfxml_route();
+ popbuffer(); /* attribute */
switch (YY_START) {
- case S_surfxml_platform_description_2: case S_surfxml_platform_description_1: case S_surfxml_platform_description: SET(S_surfxml_platform_description_2); break;
- case ROOT_surfxml_route: SET(EPILOG); break;
- case S_surfxml_include: case S_surfxml_include_2: case S_surfxml_include_1: SET(S_surfxml_include_2); break;
+ case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: case S_surfxml_platform_4: SET(S_surfxml_platform_5); break;
}
}
"</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</route>' expected.",yytext);
<<EOF>> FAIL("Premature EOF: `</route>' expected.");
}
-<ROOT_surfxml_route_element,S_surfxml_route_1,S_surfxml_route,S_surfxml_route_2>"<route_element"{s} {
- A_surfxml_route_element_name = NULL;
- ENTER(AL_surfxml_route_element);
+<S_surfxml_route_1,S_surfxml_route,S_surfxml_route_2,S_surfxml_route_c_multi_2,S_surfxml_route_c_multi_1,S_surfxml_route_c_multi>"<link:ctn"{s} {
+ AX_surfxml_link_c_ctn_id = 0;
+ ENTER(AL_surfxml_link_c_ctn); pushbuffer(0);
}
-<AL_surfxml_route_element>{
- "name"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_route_element_name);
- "name"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_route_element_name);
+<AL_surfxml_link_c_ctn>{
+ "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_c_ctn_id);
+ "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_c_ctn_id);
">" {
- if (!A_surfxml_route_element_name) FAIL("Required attribute `name' not set for `route_element' element.");
- LEAVE; STag_surfxml_route_element();pcdata = NULL; ENTER(E_surfxml_route_element);
+ if (!AX_surfxml_link_c_ctn_id) FAIL("Required attribute `id' not set for `link:ctn' element.");
+ LEAVE; STag_surfxml_link_c_ctn();surfxml_pcdata_ix = 0; ENTER(E_surfxml_link_c_ctn);
}
"/>" {
- if (!A_surfxml_route_element_name) FAIL("Required attribute `name' not set for `route_element' element.");
- LEAVE; STag_surfxml_route_element(); pcdata = NULL; ETag_surfxml_route_element();
+ if (!AX_surfxml_link_c_ctn_id) FAIL("Required attribute `id' not set for `link:ctn' element.");
+ LEAVE; STag_surfxml_link_c_ctn(); surfxml_pcdata_ix = 0; ETag_surfxml_link_c_ctn(); popbuffer(); /* attribute */
switch (YY_START) {
case S_surfxml_route_1: case S_surfxml_route: case S_surfxml_route_2: SET(S_surfxml_route_2); break;
- case ROOT_surfxml_route_element: SET(EPILOG); break;
+ case S_surfxml_route_c_multi_2: case S_surfxml_route_c_multi_1: case S_surfxml_route_c_multi: SET(S_surfxml_route_c_multi_2); break;
}
}
- . FAIL("Unexpected character `%c' in attribute list of route_element element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `route_element' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `route_element' element.");
+ . FAIL("Unexpected character `%c' in attribute list of link:ctn element.", yytext[0]);
+ {Name} FAIL("Bad attribute `%s' in `link:ctn' element start tag.",yytext);
+ <<EOF>> FAIL("EOF in attribute list of `link:ctn' element.");
}
-<E_surfxml_route_element>{
- "</route_element"{s}">" {
+<E_surfxml_link_c_ctn>{
+ "</link:ctn"{s}">" {
LEAVE;
- ETag_surfxml_route_element();
+ ETag_surfxml_link_c_ctn();
+ popbuffer(); /* attribute */
switch (YY_START) {
case S_surfxml_route_1: case S_surfxml_route: case S_surfxml_route_2: SET(S_surfxml_route_2); break;
- case ROOT_surfxml_route_element: SET(EPILOG); break;
+ case S_surfxml_route_c_multi_2: case S_surfxml_route_c_multi_1: case S_surfxml_route_c_multi: SET(S_surfxml_route_c_multi_2); break;
}
}
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</route_element>' expected.",yytext);
- . FAIL("Unexpected character `%c': `</route_element>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</route_element>' expected.");
+ "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</link:ctn>' expected.",yytext);
+ . FAIL("Unexpected character `%c': `</link:ctn>' expected.",yytext[0]);
+ <<EOF>> FAIL("Premature EOF: `</link:ctn>' expected.");
}
-<ROOT_surfxml_process,S_surfxml_platform_description_2,S_surfxml_include,S_surfxml_include_2,S_surfxml_platform_description_1,S_surfxml_include_1,S_surfxml_platform_description>"<process"{s} {
- A_surfxml_process_host = NULL;
- A_surfxml_process_function = NULL;
- A_surfxml_process_start_time = "-1.0";
- A_surfxml_process_kill_time = "-1.0";
- ENTER(AL_surfxml_process);
+<S_surfxml_platform_5,S_surfxml_platform_1,S_surfxml_platform,S_surfxml_platform_3,S_surfxml_platform_4>"<process"{s} {
+ AX_surfxml_process_host = 0;
+ AX_surfxml_process_function = 0;
+ AX_surfxml_process_start_time = 110;
+ AX_surfxml_process_kill_time = 115;
+ ENTER(AL_surfxml_process); pushbuffer(0);
}
<AL_surfxml_process>{
- "host"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_process_host);
- "host"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_process_host);
+ "host"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_process_host);
+ "host"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_process_host);
- "function"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_process_function);
- "function"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_process_function);
+ "function"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_process_function);
+ "function"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_process_function);
- "start_time"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_process_start_time);
- "start_time"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_process_start_time);
+ "start_time"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_process_start_time);
+ "start_time"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_process_start_time);
- "kill_time"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_process_kill_time);
- "kill_time"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_process_kill_time);
+ "kill_time"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_process_kill_time);
+ "kill_time"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_process_kill_time);
">" {
- if (!A_surfxml_process_host) FAIL("Required attribute `host' not set for `process' element.");
- if (!A_surfxml_process_function) FAIL("Required attribute `function' not set for `process' element.");
- LEAVE; STag_surfxml_process();pcdata = NULL; ENTER(S_surfxml_process);
+ if (!AX_surfxml_process_host) FAIL("Required attribute `host' not set for `process' element.");
+ if (!AX_surfxml_process_function) FAIL("Required attribute `function' not set for `process' element.");
+ LEAVE; STag_surfxml_process();surfxml_pcdata_ix = 0; ENTER(S_surfxml_process);
}
"/>" {
- if (!A_surfxml_process_host) FAIL("Required attribute `host' not set for `process' element.");
- if (!A_surfxml_process_function) FAIL("Required attribute `function' not set for `process' element.");
- LEAVE; STag_surfxml_process(); pcdata = NULL; ETag_surfxml_process();
+ if (!AX_surfxml_process_host) FAIL("Required attribute `host' not set for `process' element.");
+ if (!AX_surfxml_process_function) FAIL("Required attribute `function' not set for `process' element.");
+ LEAVE; STag_surfxml_process(); surfxml_pcdata_ix = 0; ETag_surfxml_process(); popbuffer(); /* attribute */
switch (YY_START) {
- case S_surfxml_platform_description_2: case S_surfxml_platform_description_1: case S_surfxml_platform_description: SET(S_surfxml_platform_description_2); break;
- case ROOT_surfxml_process: SET(EPILOG); break;
- case S_surfxml_include: case S_surfxml_include_2: case S_surfxml_include_1: SET(S_surfxml_include_2); break;
+ case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: case S_surfxml_platform_4: SET(S_surfxml_platform_5); break;
}
}
. FAIL("Unexpected character `%c' in attribute list of process element.", yytext[0]);
"</process"{s}">" {
LEAVE;
ETag_surfxml_process();
+ popbuffer(); /* attribute */
switch (YY_START) {
- case S_surfxml_platform_description_2: case S_surfxml_platform_description_1: case S_surfxml_platform_description: SET(S_surfxml_platform_description_2); break;
- case ROOT_surfxml_process: SET(EPILOG); break;
- case S_surfxml_include: case S_surfxml_include_2: case S_surfxml_include_1: SET(S_surfxml_include_2); break;
+ case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: case S_surfxml_platform_4: SET(S_surfxml_platform_5); break;
}
}
"</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</process>' expected.",yytext);
<<EOF>> FAIL("Premature EOF: `</process>' expected.");
}
-<ROOT_surfxml_argument,S_surfxml_process_1,S_surfxml_process,S_surfxml_process_2>"<argument"{s} {
- A_surfxml_argument_value = NULL;
- ENTER(AL_surfxml_argument);
+<S_surfxml_process_1,S_surfxml_process,S_surfxml_process_2>"<argument"{s} {
+ AX_surfxml_argument_value = 0;
+ ENTER(AL_surfxml_argument); pushbuffer(0);
}
<AL_surfxml_argument>{
- "value"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_argument_value);
- "value"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_argument_value);
+ "value"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_argument_value);
+ "value"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_argument_value);
">" {
- if (!A_surfxml_argument_value) FAIL("Required attribute `value' not set for `argument' element.");
- LEAVE; STag_surfxml_argument();pcdata = NULL; ENTER(E_surfxml_argument);
+ if (!AX_surfxml_argument_value) FAIL("Required attribute `value' not set for `argument' element.");
+ LEAVE; STag_surfxml_argument();surfxml_pcdata_ix = 0; ENTER(E_surfxml_argument);
}
"/>" {
- if (!A_surfxml_argument_value) FAIL("Required attribute `value' not set for `argument' element.");
- LEAVE; STag_surfxml_argument(); pcdata = NULL; ETag_surfxml_argument();
+ if (!AX_surfxml_argument_value) FAIL("Required attribute `value' not set for `argument' element.");
+ LEAVE; STag_surfxml_argument(); surfxml_pcdata_ix = 0; ETag_surfxml_argument(); popbuffer(); /* attribute */
switch (YY_START) {
case S_surfxml_process_1: case S_surfxml_process: case S_surfxml_process_2: SET(S_surfxml_process_2); break;
- case ROOT_surfxml_argument: SET(EPILOG); break;
}
}
. FAIL("Unexpected character `%c' in attribute list of argument element.", yytext[0]);
"</argument"{s}">" {
LEAVE;
ETag_surfxml_argument();
+ popbuffer(); /* attribute */
switch (YY_START) {
case S_surfxml_process_1: case S_surfxml_process: case S_surfxml_process_2: SET(S_surfxml_process_2); break;
- case ROOT_surfxml_argument: SET(EPILOG); break;
}
}
"</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</argument>' expected.",yytext);
/* CHARACTER DATA. */
-<IMPOSSIBLE,VALUE1,VALUE2>{
+<IN_trace,VALUE1,VALUE2>{
/* Non-defined standard entities... */
"&" BUFFERPUTC('&');
"<" BUFFERPUTC('<');
"&#x"[[:xdigit:]]+";" BUFFERPUTC((unsigned char)strtol(yytext+3,NULL,16));
}
-<IMPOSSIBLE,VALUE1,VALUE2,CDATA>{
+<IN_trace,VALUE1,VALUE2,CDATA>{
"\n" |
"\r" |
"\r\n" |
"\n\r" BUFFERPUTC('\n');
}
-<IMPOSSIBLE>{
+<IN_trace>{
"<![CDATA[" ENTER(CDATA);
"]""]>" FAIL("Unexpected `]""]>' in character data.");
}
<<EOF>> FAIL("EOF in literal (`\"' expected).");
}
-<IMPOSSIBLE,VALUE1,VALUE2>{
+<IN_trace,VALUE1,VALUE2>{
[^<&] BUFFERPUTC(yytext[0]);
[<&] FAIL("Spurious `%c' in character data.",yytext[0]);
}
{
int i = 0; va_list ap; va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
- for (i=1; i<yy_start_stack_ptr; i++)
- fprintf(stderr, "%s/", surfxml_statenames[yy_start_stack[i] ]);
- fprintf(stderr,"%s\n", surfxml_statenames[YY_START]);
+ if (surfxml_statenames) {
+ for (i=1; i<yy_start_stack_ptr; i++) {
+ fprintf(stderr, "%s/", surfxml_statenames[yy_start_stack[i] ]);
+ }
+ fprintf(stderr,"%s\n", surfxml_statenames[YY_START]);
+ }
va_end(ap);
}
+void print_surfxml_bufferstack()
+{
+ int i;
+ fputs("Buffer: ", stderr);
+ for (i = 0; i < blimit; i++) {
+ if ( surfxml_bufferstack[i] == '\377' ) break;
+ putc(surfxml_bufferstack[i], stderr);
+ }
+ putc('\n', stderr);
+}
+
static void debug_enter(int state, const char* statename) {
yy_push_state(state);
- if (yy_flex_debug) print_yy_stack("--ENTER(%s) : ",statename);
+ if (yy_flex_debug) {
+ print_yy_stack("--ENTER(%s) : ",statename);
+ print_surfxml_bufferstack();
+ }
}
static void debug_leave(void) {
- if (yy_flex_debug) print_yy_stack("--LEAVE : ");
+ if (yy_flex_debug) {
+ print_yy_stack("--LEAVE : ");
+ print_surfxml_bufferstack();
+ }
yy_pop_state();
}
}
#endif
-enum {flexml_max_err_msg_size = 512};
-
-static char flexml_err_msg[flexml_max_err_msg_size];
-const char * surfxml_parse_err_msg()
-{
- return flexml_err_msg;
-}
-
-static void reset_surfxml_parse_err_msg()
-{
- flexml_err_msg[0] = '\0';
-}
-
static void cleanup(void)
{
free(surfxml_statenames);
surfxml_statenames = NULL;
}
+ free(surfxml_bufferstack);
+ surfxml_bufferstack = NULL;
+
+ free(indexstack);
+ indexstack = NULL;
}