1 /* Validating XML processor for src/surf/simgrid.dtd.
3 * This program was generated with the FleXML XML processor generator.
4 * FleXML is Copyright (C) 1999-2005 Kristoffer Rose. All rights reserved.
5 * FleXML is Copyright (C) 2003-2006 Martin Quinson. All rights reserved.
6 * (Id: flexml.pl,v 1.62 2007/10/11 10:00:14 mquinson Exp).
8 * There are two, intertwined parts to this program, part A and part B.
13 * Some parts, here collectively called "Part A", are found in the
14 * FleXML package. They are Copyright (C) 1999-2005 Kristoffer Rose
15 * and Copyright (C) 2003-2006 Martin Quinson. All rights reserved.
17 * You can redistribute, use, perform, display and/or modify "Part A"
18 * provided the following two conditions hold:
20 * 1. The program is distributed WITHOUT ANY WARRANTY from the author of
21 * FleXML; without even the implied warranty of MERCHANTABILITY or
22 * FITNESS FOR A PARTICULAR PURPOSE.
24 * 2. The program distribution conditions do not in any way affect the
25 * distribution conditions of the FleXML system used to generate this
26 * file or any version of FleXML derived from that system.
28 * Notice that these are explicit rights granted to you for files
29 * generated by the FleXML system. For your rights in connection with
30 * the FleXML system itself please consult the GNU General Public License.
35 * The other parts, here collectively called "Part B", and which came
36 * from the DTD used by FleXML to generate this program, can be
37 * distributed (or not, as the case may be) under the terms of whoever
38 * wrote them, provided these terms respect and obey the two conditions
39 * above under the heading "Part A".
41 * The author of and contributors to FleXML specifically disclaim
42 * any copyright interest in "Part B", unless "Part B" was written
43 * by the author of or contributors to FleXML.
49 /* Version strings. */
50 const char rcs_surfxml_flexml_skeleton[] =
51 "$" "Id: skel,v 1.40 2007/10/11 09:57:24 mquinson Exp $";
52 const char rcs_surfxml_flexml[] =
53 "$" "Id: flexml.pl,v 1.62 2007/10/11 10:00:14 mquinson Exp $";
56 #include <stdlib.h> /* for realloc() -- needed here when using flex 2.5.4 */
63 #if defined(_XBT_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__TOS_WIN__)
64 # ifndef __STRICT_ANSI__
72 #ifndef FLEXML_INDEXSTACKSIZE
73 #define FLEXML_INDEXSTACKSIZE 1000
76 /* Generated definitions. */
77 #define FLEXML_yylineno
78 #ifndef FLEXML_BUFFERSTACKSIZE
79 #define FLEXML_BUFFERSTACKSIZE 1000000
81 #define FLEXML_NEED_BUFFERLIT
83 /* XML processor api. */
84 /* FleXML-provided data. */
85 int surfxml_pcdata_ix;
86 extern char *surfxml_bufferstack;
87 #define surfxml_pcdata (surfxml_bufferstack + surfxml_pcdata_ix)
88 AT_surfxml_random_generator AX_surfxml_random_generator;
89 #define A_surfxml_random_generator AX_surfxml_random_generator
90 AT_surfxml_ASroute_gw_dst AX_surfxml_ASroute_gw_dst;
91 #define A_surfxml_ASroute_gw_dst (surfxml_bufferstack + AX_surfxml_ASroute_gw_dst)
92 AT_surfxml_trace_connect_element AX_surfxml_trace_connect_element;
93 #define A_surfxml_trace_connect_element (surfxml_bufferstack + AX_surfxml_trace_connect_element)
94 AT_surfxml_prop_id AX_surfxml_prop_id;
95 #define A_surfxml_prop_id (surfxml_bufferstack + AX_surfxml_prop_id)
96 AT_surfxml_host_id AX_surfxml_host_id;
97 #define A_surfxml_host_id (surfxml_bufferstack + AX_surfxml_host_id)
98 AT_surfxml_ASroute_symmetrical AX_surfxml_ASroute_symmetrical;
99 #define A_surfxml_ASroute_symmetrical AX_surfxml_ASroute_symmetrical
100 AT_surfxml_peer_lat AX_surfxml_peer_lat;
101 #define A_surfxml_peer_lat (surfxml_bufferstack + AX_surfxml_peer_lat)
102 AT_surfxml_link_latency_file AX_surfxml_link_latency_file;
103 #define A_surfxml_link_latency_file (surfxml_bufferstack + AX_surfxml_link_latency_file)
104 AT_surfxml_peer_availability_file AX_surfxml_peer_availability_file;
105 #define A_surfxml_peer_availability_file (surfxml_bufferstack + AX_surfxml_peer_availability_file)
106 AT_surfxml_link_ctn_direction AX_surfxml_link_ctn_direction;
107 #define A_surfxml_link_ctn_direction AX_surfxml_link_ctn_direction
108 AT_surfxml_host_state AX_surfxml_host_state;
109 #define A_surfxml_host_state AX_surfxml_host_state
110 AT_surfxml_AS_id AX_surfxml_AS_id;
111 #define A_surfxml_AS_id (surfxml_bufferstack + AX_surfxml_AS_id)
112 AT_surfxml_host_power AX_surfxml_host_power;
113 #define A_surfxml_host_power (surfxml_bufferstack + AX_surfxml_host_power)
114 AT_surfxml_router_id AX_surfxml_router_id;
115 #define A_surfxml_router_id (surfxml_bufferstack + AX_surfxml_router_id)
116 AT_surfxml_process_start_time AX_surfxml_process_start_time;
117 #define A_surfxml_process_start_time (surfxml_bufferstack + AX_surfxml_process_start_time)
118 AT_surfxml_cluster_suffix AX_surfxml_cluster_suffix;
119 #define A_surfxml_cluster_suffix (surfxml_bufferstack + AX_surfxml_cluster_suffix)
120 AT_surfxml_ASroute_src AX_surfxml_ASroute_src;
121 #define A_surfxml_ASroute_src (surfxml_bufferstack + AX_surfxml_ASroute_src)
122 AT_surfxml_cluster_prefix AX_surfxml_cluster_prefix;
123 #define A_surfxml_cluster_prefix (surfxml_bufferstack + AX_surfxml_cluster_prefix)
124 AT_surfxml_trace_file AX_surfxml_trace_file;
125 #define A_surfxml_trace_file (surfxml_bufferstack + AX_surfxml_trace_file)
126 AT_surfxml_link_sharing_policy AX_surfxml_link_sharing_policy;
127 #define A_surfxml_link_sharing_policy AX_surfxml_link_sharing_policy
128 AT_surfxml_random_min AX_surfxml_random_min;
129 #define A_surfxml_random_min (surfxml_bufferstack + AX_surfxml_random_min)
130 AT_surfxml_link_ctn_id AX_surfxml_link_ctn_id;
131 #define A_surfxml_link_ctn_id (surfxml_bufferstack + AX_surfxml_link_ctn_id)
132 AT_surfxml_peer_bw_out AX_surfxml_peer_bw_out;
133 #define A_surfxml_peer_bw_out (surfxml_bufferstack + AX_surfxml_peer_bw_out)
134 AT_surfxml_cluster_availability_file AX_surfxml_cluster_availability_file;
135 #define A_surfxml_cluster_availability_file (surfxml_bufferstack + AX_surfxml_cluster_availability_file)
136 AT_surfxml_process_kill_time AX_surfxml_process_kill_time;
137 #define A_surfxml_process_kill_time (surfxml_bufferstack + AX_surfxml_process_kill_time)
138 AT_surfxml_cluster_bb_bw AX_surfxml_cluster_bb_bw;
139 #define A_surfxml_cluster_bb_bw (surfxml_bufferstack + AX_surfxml_cluster_bb_bw)
140 AT_surfxml_argument_value AX_surfxml_argument_value;
141 #define A_surfxml_argument_value (surfxml_bufferstack + AX_surfxml_argument_value)
142 AT_surfxml_link_state AX_surfxml_link_state;
143 #define A_surfxml_link_state AX_surfxml_link_state
144 AT_surfxml_ASroute_gw_src AX_surfxml_ASroute_gw_src;
145 #define A_surfxml_ASroute_gw_src (surfxml_bufferstack + AX_surfxml_ASroute_gw_src)
146 AT_surfxml_AS_routing AX_surfxml_AS_routing;
147 #define A_surfxml_AS_routing (surfxml_bufferstack + AX_surfxml_AS_routing)
148 AT_surfxml_link_bandwidth AX_surfxml_link_bandwidth;
149 #define A_surfxml_link_bandwidth (surfxml_bufferstack + AX_surfxml_link_bandwidth)
150 AT_surfxml_cluster_id AX_surfxml_cluster_id;
151 #define A_surfxml_cluster_id (surfxml_bufferstack + AX_surfxml_cluster_id)
152 AT_surfxml_peer_bw_in AX_surfxml_peer_bw_in;
153 #define A_surfxml_peer_bw_in (surfxml_bufferstack + AX_surfxml_peer_bw_in)
154 AT_surfxml_random_mean AX_surfxml_random_mean;
155 #define A_surfxml_random_mean (surfxml_bufferstack + AX_surfxml_random_mean)
156 AT_surfxml_cluster_bb_lat AX_surfxml_cluster_bb_lat;
157 #define A_surfxml_cluster_bb_lat (surfxml_bufferstack + AX_surfxml_cluster_bb_lat)
158 AT_surfxml_link_latency AX_surfxml_link_latency;
159 #define A_surfxml_link_latency (surfxml_bufferstack + AX_surfxml_link_latency)
160 AT_surfxml_trace_connect_kind AX_surfxml_trace_connect_kind;
161 #define A_surfxml_trace_connect_kind AX_surfxml_trace_connect_kind
162 AT_surfxml_random_seed AX_surfxml_random_seed;
163 #define A_surfxml_random_seed (surfxml_bufferstack + AX_surfxml_random_seed)
164 AT_surfxml_cluster_state_file AX_surfxml_cluster_state_file;
165 #define A_surfxml_cluster_state_file (surfxml_bufferstack + AX_surfxml_cluster_state_file)
166 AT_surfxml_link_bandwidth_file AX_surfxml_link_bandwidth_file;
167 #define A_surfxml_link_bandwidth_file (surfxml_bufferstack + AX_surfxml_link_bandwidth_file)
168 AT_surfxml_route_symmetrical AX_surfxml_route_symmetrical;
169 #define A_surfxml_route_symmetrical AX_surfxml_route_symmetrical
170 AT_surfxml_random_id AX_surfxml_random_id;
171 #define A_surfxml_random_id (surfxml_bufferstack + AX_surfxml_random_id)
172 AT_surfxml_random_max AX_surfxml_random_max;
173 #define A_surfxml_random_max (surfxml_bufferstack + AX_surfxml_random_max)
174 AT_surfxml_link_id AX_surfxml_link_id;
175 #define A_surfxml_link_id (surfxml_bufferstack + AX_surfxml_link_id)
176 AT_surfxml_process_host AX_surfxml_process_host;
177 #define A_surfxml_process_host (surfxml_bufferstack + AX_surfxml_process_host)
178 AT_surfxml_host_availability_file AX_surfxml_host_availability_file;
179 #define A_surfxml_host_availability_file (surfxml_bufferstack + AX_surfxml_host_availability_file)
180 AT_surfxml_cluster_lat AX_surfxml_cluster_lat;
181 #define A_surfxml_cluster_lat (surfxml_bufferstack + AX_surfxml_cluster_lat)
182 AT_surfxml_trace_periodicity AX_surfxml_trace_periodicity;
183 #define A_surfxml_trace_periodicity (surfxml_bufferstack + AX_surfxml_trace_periodicity)
184 AT_surfxml_cluster_bb_sharing_policy AX_surfxml_cluster_bb_sharing_policy;
185 #define A_surfxml_cluster_bb_sharing_policy AX_surfxml_cluster_bb_sharing_policy
186 AT_surfxml_router_coordinates AX_surfxml_router_coordinates;
187 #define A_surfxml_router_coordinates (surfxml_bufferstack + AX_surfxml_router_coordinates)
188 AT_surfxml_peer_coordinates AX_surfxml_peer_coordinates;
189 #define A_surfxml_peer_coordinates (surfxml_bufferstack + AX_surfxml_peer_coordinates)
190 AT_surfxml_peer_state_file AX_surfxml_peer_state_file;
191 #define A_surfxml_peer_state_file (surfxml_bufferstack + AX_surfxml_peer_state_file)
192 AT_surfxml_prop_value AX_surfxml_prop_value;
193 #define A_surfxml_prop_value (surfxml_bufferstack + AX_surfxml_prop_value)
194 AT_surfxml_ASroute_dst AX_surfxml_ASroute_dst;
195 #define A_surfxml_ASroute_dst (surfxml_bufferstack + AX_surfxml_ASroute_dst)
196 AT_surfxml_random_radical AX_surfxml_random_radical;
197 #define A_surfxml_random_radical (surfxml_bufferstack + AX_surfxml_random_radical)
198 AT_surfxml_link_state_file AX_surfxml_link_state_file;
199 #define A_surfxml_link_state_file (surfxml_bufferstack + AX_surfxml_link_state_file)
200 AT_surfxml_trace_connect_trace AX_surfxml_trace_connect_trace;
201 #define A_surfxml_trace_connect_trace (surfxml_bufferstack + AX_surfxml_trace_connect_trace)
202 AT_surfxml_cluster_power AX_surfxml_cluster_power;
203 #define A_surfxml_cluster_power (surfxml_bufferstack + AX_surfxml_cluster_power)
204 AT_surfxml_process_function AX_surfxml_process_function;
205 #define A_surfxml_process_function (surfxml_bufferstack + AX_surfxml_process_function)
206 AT_surfxml_peer_id AX_surfxml_peer_id;
207 #define A_surfxml_peer_id (surfxml_bufferstack + AX_surfxml_peer_id)
208 AT_surfxml_cluster_sharing_policy AX_surfxml_cluster_sharing_policy;
209 #define A_surfxml_cluster_sharing_policy AX_surfxml_cluster_sharing_policy
210 AT_surfxml_bypassRoute_dst AX_surfxml_bypassRoute_dst;
211 #define A_surfxml_bypassRoute_dst (surfxml_bufferstack + AX_surfxml_bypassRoute_dst)
212 AT_surfxml_host_core AX_surfxml_host_core;
213 #define A_surfxml_host_core (surfxml_bufferstack + AX_surfxml_host_core)
214 AT_surfxml_host_availability AX_surfxml_host_availability;
215 #define A_surfxml_host_availability (surfxml_bufferstack + AX_surfxml_host_availability)
216 AT_surfxml_bypassRoute_src AX_surfxml_bypassRoute_src;
217 #define A_surfxml_bypassRoute_src (surfxml_bufferstack + AX_surfxml_bypassRoute_src)
218 AT_surfxml_route_src AX_surfxml_route_src;
219 #define A_surfxml_route_src (surfxml_bufferstack + AX_surfxml_route_src)
220 AT_surfxml_bypassRoute_gw_dst AX_surfxml_bypassRoute_gw_dst;
221 #define A_surfxml_bypassRoute_gw_dst (surfxml_bufferstack + AX_surfxml_bypassRoute_gw_dst)
222 AT_surfxml_host_coordinates AX_surfxml_host_coordinates;
223 #define A_surfxml_host_coordinates (surfxml_bufferstack + AX_surfxml_host_coordinates)
224 AT_surfxml_trace_id AX_surfxml_trace_id;
225 #define A_surfxml_trace_id (surfxml_bufferstack + AX_surfxml_trace_id)
226 AT_surfxml_peer_power AX_surfxml_peer_power;
227 #define A_surfxml_peer_power (surfxml_bufferstack + AX_surfxml_peer_power)
228 AT_surfxml_cluster_radical AX_surfxml_cluster_radical;
229 #define A_surfxml_cluster_radical (surfxml_bufferstack + AX_surfxml_cluster_radical)
230 AT_surfxml_config_id AX_surfxml_config_id;
231 #define A_surfxml_config_id (surfxml_bufferstack + AX_surfxml_config_id)
232 AT_surfxml_bypassRoute_gw_src AX_surfxml_bypassRoute_gw_src;
233 #define A_surfxml_bypassRoute_gw_src (surfxml_bufferstack + AX_surfxml_bypassRoute_gw_src)
234 AT_surfxml_cluster_core AX_surfxml_cluster_core;
235 #define A_surfxml_cluster_core (surfxml_bufferstack + AX_surfxml_cluster_core)
236 AT_surfxml_include_file AX_surfxml_include_file;
237 #define A_surfxml_include_file (surfxml_bufferstack + AX_surfxml_include_file)
238 AT_surfxml_random_std_deviation AX_surfxml_random_std_deviation;
239 #define A_surfxml_random_std_deviation (surfxml_bufferstack + AX_surfxml_random_std_deviation)
240 AT_surfxml_host_state_file AX_surfxml_host_state_file;
241 #define A_surfxml_host_state_file (surfxml_bufferstack + AX_surfxml_host_state_file)
242 AT_surfxml_route_dst AX_surfxml_route_dst;
243 #define A_surfxml_route_dst (surfxml_bufferstack + AX_surfxml_route_dst)
244 AT_surfxml_cluster_bw AX_surfxml_cluster_bw;
245 #define A_surfxml_cluster_bw (surfxml_bufferstack + AX_surfxml_cluster_bw)
246 AT_surfxml_platform_version AX_surfxml_platform_version;
247 #define A_surfxml_platform_version (surfxml_bufferstack + AX_surfxml_platform_version)
251 # define ENTER(state) debug_enter(state,#state)
252 # define LEAVE debug_leave()
253 # define SET(state) debug_set(state,#state)
254 static void debug_enter(int, const char*);
255 static void debug_leave(void);
256 static void debug_set(int, const char*);
258 # define ENTER(state) (yy_push_state(state))
259 # define LEAVE (yy_pop_state())
260 # define SET(state) BEGIN(state)
263 /* Generic actions. */
264 #define SKIP /*skip*/
265 #define SUCCEED CLEANUP; return 0
267 #define FAIL return fail
268 static int fail(const char*, ...);
270 enum {flexml_max_err_msg_size = 512};
271 static char flexml_err_msg[flexml_max_err_msg_size];
272 const char * surfxml_parse_err_msg()
274 return flexml_err_msg;
276 static void reset_surfxml_parse_err_msg()
278 flexml_err_msg[0] = '\0';
282 static void cleanup(void);
283 #define CLEANUP cleanup()
285 /* Text buffer stack handling. */
286 char *surfxml_bufferstack = NULL;
287 static int blimit = FLEXML_BUFFERSTACKSIZE;
288 static int bnext = 1;
290 static int *indexstack = NULL;
291 static int ilimit = FLEXML_INDEXSTACKSIZE;
292 static int inext = 1;
294 #define BUFFERSET(P) (P = bnext)
295 #define BUFFERPUTC(C) (ck_blimit(), surfxml_bufferstack[bnext++] = (C))
296 #define BUFFERDONE (BUFFERPUTC('\0'))
298 #define BUFFERLITERAL(C, P) surfxml_bufferliteral(C, &(P), yytext)
300 /* after this is called, there are at least 2 slots left in the stack */
301 static int ck_blimit()
303 if (bnext >= blimit) {
304 blimit += FLEXML_BUFFERSTACKSIZE + 2;
306 char *temp = (char *) realloc(surfxml_bufferstack, blimit);
308 surfxml_bufferstack = temp;
314 /* after this is called, there are at least 2 slots left in the stack */
315 static int ck_ilimit()
317 if (inext >= ilimit) {
318 ilimit += FLEXML_INDEXSTACKSIZE + 2;
320 int *temp = (int *) realloc(indexstack, ilimit);
328 #ifdef FLEXML_NEED_BUFFERLIT
329 static void surfxml_bufferliteral(char c, int* pp, const char* text)
331 const char *s = (c ? strchr(text,c) : text-1), *e = strrchr(text,c);
332 assert(s <= e); BUFFERSET(*pp);
334 if (isspace(*s) && c) { BUFFERPUTC(' '); while (isspace(*s)) ++s; }
341 static void pushbuffer(int p)
344 indexstack[inext++] = p;
345 indexstack[inext++] = bnext;
348 static int popbuffer(void)
351 bnext = indexstack[--inext];
352 return indexstack[--inext];
355 /* General internal entities are `unput' back onto the input stream... */
356 #define ENTITYTEXT(T) \
357 { char *s = (T), *e = s+strlen(s);\
358 while (--e >= s) { unput(*e); }}
363 /* Flex standard options. */
365 %option noyy_top_state
371 /* Flex user-requested options. */
375 /* XML character classes (currently restricted to ASCII). */
377 /* "Common syntactic structures." */
381 /* "Names and Tokens." */
382 NameChar [A-Za-z0-9.:_-]
383 Name [A-Za-z_:]{NameChar}*
384 Names {Name}({S}{Name})*
385 Nmtoken ({NameChar})+
386 Nmtokens {Nmtoken}({S}{Nmtoken})*
389 VersionNum [a-zA-Z0-9_.:-]+
391 Literal \'[^'']*\'|\"[^""]*\"
393 /* Parser states (flex `exclusive start conditions'):
395 * PROLOG the XML prolog of the document before <?xml...>
396 * DOCTYPE the XML prolog of the document after <?xml...>
397 * EPILOG after the root element
398 * INCOMMENT inside an XML comment <!--....-->
399 * INPI inside an XML PI <?...?>
400 * VALUE1 inside a '...'-delimited literal
401 * VALUE2 inside a "..."-delimited literal
402 * CDATA inside a <![CDATA[...] ]> section.
403 * ROOT_<tag> expect root element <tag>
404 * AL_<tag> inside the attribute list for <tag>
405 * IN_<tag> inside a <tag> with element contents (ready for end tag)
406 * IMPOSSIBLE dummy to permit disabling rules; must be last
408 %x PROLOG DOCTYPE EPILOG INCOMMENT INPI VALUE1 VALUE2 CDATA
409 %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 S_surfxml_platform_6 S_surfxml_platform_7 S_surfxml_platform_8 E_surfxml_platform
410 %x AL_surfxml_include E_surfxml_include
411 %x AL_surfxml_trace IN_trace
412 %x AL_surfxml_random S_surfxml_random S_surfxml_random_1 S_surfxml_random_2 E_surfxml_random
413 %x AL_surfxml_trace_connect E_surfxml_trace_connect
414 %x AL_surfxml_AS S_surfxml_AS S_surfxml_AS_1 S_surfxml_AS_2 S_surfxml_AS_3 S_surfxml_AS_4 S_surfxml_AS_5 S_surfxml_AS_6 S_surfxml_AS_7 S_surfxml_AS_8 S_surfxml_AS_9 S_surfxml_AS_10 S_surfxml_AS_11 S_surfxml_AS_12 S_surfxml_AS_13 E_surfxml_AS
415 %x AL_surfxml_host S_surfxml_host S_surfxml_host_1 S_surfxml_host_2 E_surfxml_host
416 %x AL_surfxml_cluster E_surfxml_cluster
417 %x AL_surfxml_peer E_surfxml_peer
418 %x AL_surfxml_router E_surfxml_router
419 %x AL_surfxml_link S_surfxml_link S_surfxml_link_1 S_surfxml_link_2 E_surfxml_link
420 %x AL_surfxml_route S_surfxml_route S_surfxml_route_1 S_surfxml_route_2 E_surfxml_route
421 %x AL_surfxml_ASroute S_surfxml_ASroute S_surfxml_ASroute_1 S_surfxml_ASroute_2 E_surfxml_ASroute
422 %x AL_surfxml_link_ctn E_surfxml_link_ctn
423 %x AL_surfxml_bypassRoute S_surfxml_bypassRoute S_surfxml_bypassRoute_1 S_surfxml_bypassRoute_2 E_surfxml_bypassRoute
424 %x AL_surfxml_process S_surfxml_process S_surfxml_process_1 S_surfxml_process_2 E_surfxml_process
425 %x AL_surfxml_argument E_surfxml_argument
426 %x AL_surfxml_config S_surfxml_config S_surfxml_config_1 S_surfxml_config_2 E_surfxml_config
427 %x AL_surfxml_prop E_surfxml_prop
432 const char* *surfxml_statenames=NULL;
437 /* Bypass Flex's default INITIAL state and begin by parsing the XML prolog. */
439 reset_surfxml_parse_err_msg();
440 surfxml_bufferstack = (char *) malloc(FLEXML_BUFFERSTACKSIZE);
441 assert(surfxml_bufferstack);
445 for (i = 0; i < blimit; i++) {
446 surfxml_bufferstack[i] = '\377';
450 surfxml_bufferstack[0] = '\0';
451 indexstack = (int *) malloc(FLEXML_INDEXSTACKSIZE * sizeof(int));
457 surfxml_bufferliteral('\0', &bnext, "0.0");
458 surfxml_bufferliteral('\0', &bnext, "2147483647");
459 surfxml_bufferliteral('\0', &bnext, "1");
460 surfxml_bufferliteral('\0', &bnext, "1.0");
461 surfxml_bufferliteral('\0', &bnext, "1");
462 surfxml_bufferliteral('\0', &bnext, "0.0");
463 surfxml_bufferliteral('\0', &bnext, "-1.0");
464 surfxml_bufferliteral('\0', &bnext, "-1.0");
465 if(!surfxml_statenames) {surfxml_statenames= (const char **)calloc(IMPOSSIBLE,sizeof(char*));
466 surfxml_statenames[PROLOG] = NULL;
467 surfxml_statenames[DOCTYPE] = NULL;
468 surfxml_statenames[EPILOG] = NULL;
469 surfxml_statenames[INCOMMENT] = NULL;
470 surfxml_statenames[INPI] = NULL;
471 surfxml_statenames[VALUE1] = NULL;
472 surfxml_statenames[VALUE2] = NULL;
473 surfxml_statenames[CDATA] = NULL;
474 surfxml_statenames[ROOT_surfxml_platform] = NULL;
475 surfxml_statenames[AL_surfxml_platform] = NULL;
476 surfxml_statenames[S_surfxml_platform] = "platform";
477 surfxml_statenames[S_surfxml_platform_1] = "platform";
478 surfxml_statenames[S_surfxml_platform_2] = "platform";
479 surfxml_statenames[S_surfxml_platform_3] = "platform";
480 surfxml_statenames[S_surfxml_platform_4] = "platform";
481 surfxml_statenames[S_surfxml_platform_5] = "platform";
482 surfxml_statenames[S_surfxml_platform_6] = "platform";
483 surfxml_statenames[S_surfxml_platform_7] = "platform";
484 surfxml_statenames[S_surfxml_platform_8] = "platform";
485 surfxml_statenames[E_surfxml_platform] = "platform";
486 surfxml_statenames[AL_surfxml_include] = NULL;
487 surfxml_statenames[E_surfxml_include] = "include";
488 surfxml_statenames[AL_surfxml_trace] = NULL;
489 surfxml_statenames[IN_trace] = "trace";
490 surfxml_statenames[AL_surfxml_random] = NULL;
491 surfxml_statenames[S_surfxml_random] = "random";
492 surfxml_statenames[S_surfxml_random_1] = "random";
493 surfxml_statenames[S_surfxml_random_2] = "random";
494 surfxml_statenames[E_surfxml_random] = "random";
495 surfxml_statenames[AL_surfxml_trace_connect] = NULL;
496 surfxml_statenames[E_surfxml_trace_connect] = "trace_connect";
497 surfxml_statenames[AL_surfxml_AS] = NULL;
498 surfxml_statenames[S_surfxml_AS] = "AS";
499 surfxml_statenames[S_surfxml_AS_1] = "AS";
500 surfxml_statenames[S_surfxml_AS_2] = "AS";
501 surfxml_statenames[S_surfxml_AS_3] = "AS";
502 surfxml_statenames[S_surfxml_AS_4] = "AS";
503 surfxml_statenames[S_surfxml_AS_5] = "AS";
504 surfxml_statenames[S_surfxml_AS_6] = "AS";
505 surfxml_statenames[S_surfxml_AS_7] = "AS";
506 surfxml_statenames[S_surfxml_AS_8] = "AS";
507 surfxml_statenames[S_surfxml_AS_9] = "AS";
508 surfxml_statenames[S_surfxml_AS_10] = "AS";
509 surfxml_statenames[S_surfxml_AS_11] = "AS";
510 surfxml_statenames[S_surfxml_AS_12] = "AS";
511 surfxml_statenames[S_surfxml_AS_13] = "AS";
512 surfxml_statenames[E_surfxml_AS] = "AS";
513 surfxml_statenames[AL_surfxml_host] = NULL;
514 surfxml_statenames[S_surfxml_host] = "host";
515 surfxml_statenames[S_surfxml_host_1] = "host";
516 surfxml_statenames[S_surfxml_host_2] = "host";
517 surfxml_statenames[E_surfxml_host] = "host";
518 surfxml_statenames[AL_surfxml_cluster] = NULL;
519 surfxml_statenames[E_surfxml_cluster] = "cluster";
520 surfxml_statenames[AL_surfxml_peer] = NULL;
521 surfxml_statenames[E_surfxml_peer] = "peer";
522 surfxml_statenames[AL_surfxml_router] = NULL;
523 surfxml_statenames[E_surfxml_router] = "router";
524 surfxml_statenames[AL_surfxml_link] = NULL;
525 surfxml_statenames[S_surfxml_link] = "link";
526 surfxml_statenames[S_surfxml_link_1] = "link";
527 surfxml_statenames[S_surfxml_link_2] = "link";
528 surfxml_statenames[E_surfxml_link] = "link";
529 surfxml_statenames[AL_surfxml_route] = NULL;
530 surfxml_statenames[S_surfxml_route] = "route";
531 surfxml_statenames[S_surfxml_route_1] = "route";
532 surfxml_statenames[S_surfxml_route_2] = "route";
533 surfxml_statenames[E_surfxml_route] = "route";
534 surfxml_statenames[AL_surfxml_ASroute] = NULL;
535 surfxml_statenames[S_surfxml_ASroute] = "ASroute";
536 surfxml_statenames[S_surfxml_ASroute_1] = "ASroute";
537 surfxml_statenames[S_surfxml_ASroute_2] = "ASroute";
538 surfxml_statenames[E_surfxml_ASroute] = "ASroute";
539 surfxml_statenames[AL_surfxml_link_ctn] = NULL;
540 surfxml_statenames[E_surfxml_link_ctn] = "link_ctn";
541 surfxml_statenames[AL_surfxml_bypassRoute] = NULL;
542 surfxml_statenames[S_surfxml_bypassRoute] = "bypassRoute";
543 surfxml_statenames[S_surfxml_bypassRoute_1] = "bypassRoute";
544 surfxml_statenames[S_surfxml_bypassRoute_2] = "bypassRoute";
545 surfxml_statenames[E_surfxml_bypassRoute] = "bypassRoute";
546 surfxml_statenames[AL_surfxml_process] = NULL;
547 surfxml_statenames[S_surfxml_process] = "process";
548 surfxml_statenames[S_surfxml_process_1] = "process";
549 surfxml_statenames[S_surfxml_process_2] = "process";
550 surfxml_statenames[E_surfxml_process] = "process";
551 surfxml_statenames[AL_surfxml_argument] = NULL;
552 surfxml_statenames[E_surfxml_argument] = "argument";
553 surfxml_statenames[AL_surfxml_config] = NULL;
554 surfxml_statenames[S_surfxml_config] = "config";
555 surfxml_statenames[S_surfxml_config_1] = "config";
556 surfxml_statenames[S_surfxml_config_2] = "config";
557 surfxml_statenames[E_surfxml_config] = "config";
558 surfxml_statenames[AL_surfxml_prop] = NULL;
559 surfxml_statenames[E_surfxml_prop] = "prop";
562 /* COMMENTS and PIs: handled uniformly for efficiency. */
564 <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,S_surfxml_platform_6,S_surfxml_platform_7,S_surfxml_platform_8,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_connect,E_surfxml_trace_connect,AL_surfxml_AS,S_surfxml_AS,S_surfxml_AS_1,S_surfxml_AS_2,S_surfxml_AS_3,S_surfxml_AS_4,S_surfxml_AS_5,S_surfxml_AS_6,S_surfxml_AS_7,S_surfxml_AS_8,S_surfxml_AS_9,S_surfxml_AS_10,S_surfxml_AS_11,S_surfxml_AS_12,S_surfxml_AS_13,E_surfxml_AS,AL_surfxml_host,S_surfxml_host,S_surfxml_host_1,S_surfxml_host_2,E_surfxml_host,AL_surfxml_cluster,E_surfxml_cluster,AL_surfxml_peer,E_surfxml_peer,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,S_surfxml_route,S_surfxml_route_1,S_surfxml_route_2,E_surfxml_route,AL_surfxml_ASroute,S_surfxml_ASroute,S_surfxml_ASroute_1,S_surfxml_ASroute_2,E_surfxml_ASroute,AL_surfxml_link_ctn,E_surfxml_link_ctn,AL_surfxml_bypassRoute,S_surfxml_bypassRoute,S_surfxml_bypassRoute_1,S_surfxml_bypassRoute_2,E_surfxml_bypassRoute,AL_surfxml_process,S_surfxml_process,S_surfxml_process_1,S_surfxml_process_2,E_surfxml_process,AL_surfxml_argument,E_surfxml_argument,AL_surfxml_config,S_surfxml_config,S_surfxml_config_1,S_surfxml_config_2,E_surfxml_config,AL_surfxml_prop,E_surfxml_prop,PROLOG,DOCTYPE,EPILOG>{
565 "<!--" ENTER(INCOMMENT);
573 <<EOF>> FAIL("EOF in comment.");
579 <<EOF>> FAIL("EOF in PI (processing instruction).");
582 /* SPACES: skipped uniformly */
584 <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,S_surfxml_platform_6,S_surfxml_platform_7,S_surfxml_platform_8,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_connect,E_surfxml_trace_connect,AL_surfxml_AS,S_surfxml_AS,S_surfxml_AS_1,S_surfxml_AS_2,S_surfxml_AS_3,S_surfxml_AS_4,S_surfxml_AS_5,S_surfxml_AS_6,S_surfxml_AS_7,S_surfxml_AS_8,S_surfxml_AS_9,S_surfxml_AS_10,S_surfxml_AS_11,S_surfxml_AS_12,S_surfxml_AS_13,E_surfxml_AS,AL_surfxml_host,S_surfxml_host,S_surfxml_host_1,S_surfxml_host_2,E_surfxml_host,AL_surfxml_cluster,E_surfxml_cluster,AL_surfxml_peer,E_surfxml_peer,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,S_surfxml_route,S_surfxml_route_1,S_surfxml_route_2,E_surfxml_route,AL_surfxml_ASroute,S_surfxml_ASroute,S_surfxml_ASroute_1,S_surfxml_ASroute_2,E_surfxml_ASroute,AL_surfxml_link_ctn,E_surfxml_link_ctn,AL_surfxml_bypassRoute,S_surfxml_bypassRoute,S_surfxml_bypassRoute_1,S_surfxml_bypassRoute_2,E_surfxml_bypassRoute,AL_surfxml_process,S_surfxml_process,S_surfxml_process_1,S_surfxml_process_2,E_surfxml_process,AL_surfxml_argument,E_surfxml_argument,AL_surfxml_config,S_surfxml_config,S_surfxml_config_1,S_surfxml_config_2,E_surfxml_config,AL_surfxml_prop,E_surfxml_prop,PROLOG,DOCTYPE,EPILOG>{S} SKIP;
586 /* PROLOG: determine root element and process it. */
589 "<?xml"({S}version{Eq}(\'{VersionNum}\'|\"{VersionNum}\"))?({S}encoding{Eq}(\'[^']*\'|\"[^"]*\"))?"?>" SET(DOCTYPE);
590 "<?xml"[^>]*">" FAIL("Bad declaration %s.",yytext);
594 "<!DOCTYPE"{S}"platform"{S}SYSTEM{S}("'http://simgrid.gforge.inria.fr/simgrid.dtd'"|"\"http://simgrid.gforge.inria.fr/simgrid.dtd\""){s}">" SET(ROOT_surfxml_platform);
595 "<!"[^>-][^>]*">" FAIL("Bad declaration %s.",yytext);
596 . FAIL("Unexpected character `%c' in prolog.", yytext[0]);
597 <<EOF>> FAIL("EOF in prolog.");
600 /* RULES DERIVED FROM DTD. */
602 /* <!-- Small DTD for SURF based tools. --> */
604 <S_surfxml_AS_10,S_surfxml_AS_3,S_surfxml_random,S_surfxml_ASroute_1,S_surfxml_AS_2,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,S_surfxml_platform_3,S_surfxml_route_1,S_surfxml_AS_11,S_surfxml_link_1,S_surfxml_AS,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_platform_6,S_surfxml_process_2,E_surfxml_ASroute,E_surfxml_link,S_surfxml_AS_6,S_surfxml_platform,S_surfxml_platform_1,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<platform"{s} FAIL("Starting tag <platform> is not allowed here.");
606 <ROOT_surfxml_platform>"<platform"{s} {
607 AX_surfxml_platform_version = 1;
608 ENTER(AL_surfxml_platform); pushbuffer(0);
611 <AL_surfxml_platform>{
612 "version"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_platform_version);
613 "version"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_platform_version);
616 LEAVE; STag_surfxml_platform();surfxml_pcdata_ix = 0; ENTER(S_surfxml_platform);
619 LEAVE; STag_surfxml_platform(); surfxml_pcdata_ix = 0; ETag_surfxml_platform(); popbuffer(); /* attribute */
621 case ROOT_surfxml_platform: SET(EPILOG); break;
624 . FAIL("Unexpected character `%c' in attribute list of platform element.", yytext[0]);
625 {Name} FAIL("Bad attribute `%s' in `platform' element start tag.",yytext);
626 <<EOF>> FAIL("EOF in attribute list of `platform' element.");
629 <S_surfxml_platform_8,S_surfxml_platform_1,S_surfxml_platform_3,S_surfxml_platform,S_surfxml_platform_4,S_surfxml_platform_6,E_surfxml_platform>{
632 ETag_surfxml_platform();
633 popbuffer(); /* attribute */
635 case ROOT_surfxml_platform: SET(EPILOG); break;
638 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</platform>' expected.",yytext);
639 . FAIL("Unexpected character `%c': `</platform>' expected.",yytext[0]);
640 <<EOF>> FAIL("Premature EOF: `</platform>' expected.");
643 <S_surfxml_AS_10,S_surfxml_random,S_surfxml_ASroute_1,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,S_surfxml_route_1,S_surfxml_AS_11,S_surfxml_link_1,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,ROOT_surfxml_include,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_process_2,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_AS_1,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,E_surfxml_bypassRoute>"<include"{s} FAIL("Starting tag <include> is not allowed here.");
645 <S_surfxml_platform_5,S_surfxml_AS_2,S_surfxml_platform_1,S_surfxml_platform,S_surfxml_platform_6,S_surfxml_platform_8,S_surfxml_AS_3,S_surfxml_platform_7,S_surfxml_AS,S_surfxml_platform_3,S_surfxml_platform_4>"<include"{s} {
646 AX_surfxml_include_file = 0;
647 ENTER(AL_surfxml_include); pushbuffer(0);
650 <AL_surfxml_include>{
651 "file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_include_file);
652 "file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_include_file);
655 if (!AX_surfxml_include_file) FAIL("Required attribute `file' not set for `include' element.");
656 LEAVE; STag_surfxml_include();surfxml_pcdata_ix = 0; ENTER(E_surfxml_include);
659 if (!AX_surfxml_include_file) FAIL("Required attribute `file' not set for `include' element.");
660 LEAVE; STag_surfxml_include(); surfxml_pcdata_ix = 0; ETag_surfxml_include(); popbuffer(); /* attribute */
662 case S_surfxml_AS_2: case S_surfxml_AS_3: case S_surfxml_AS: SET(S_surfxml_AS_3); break;
663 case S_surfxml_platform_5: SET(S_surfxml_platform_6); break;
664 case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_6: case S_surfxml_platform_8: case S_surfxml_platform_7: case S_surfxml_platform_3: case S_surfxml_platform_4: SET(S_surfxml_platform_8); break;
667 . FAIL("Unexpected character `%c' in attribute list of include element.", yytext[0]);
668 {Name} FAIL("Bad attribute `%s' in `include' element start tag.",yytext);
669 <<EOF>> FAIL("EOF in attribute list of `include' element.");
675 ETag_surfxml_include();
676 popbuffer(); /* attribute */
678 case S_surfxml_AS_2: case S_surfxml_AS_3: case S_surfxml_AS: SET(S_surfxml_AS_3); break;
679 case S_surfxml_platform_5: SET(S_surfxml_platform_6); break;
680 case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_6: case S_surfxml_platform_8: case S_surfxml_platform_7: case S_surfxml_platform_3: case S_surfxml_platform_4: SET(S_surfxml_platform_8); break;
683 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</include>' expected.",yytext);
684 . FAIL("Unexpected character `%c': `</include>' expected.",yytext[0]);
685 <<EOF>> FAIL("Premature EOF: `</include>' expected.");
688 <ROOT_surfxml_trace,S_surfxml_random,S_surfxml_ASroute_1,E_surfxml_AS,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_route_1,S_surfxml_link_1,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_process_2,E_surfxml_ASroute,E_surfxml_link,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_ASroute,S_surfxml_config_1,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<trace"{s} FAIL("Starting tag <trace> is not allowed here.");
690 <S_surfxml_AS_12,S_surfxml_AS_1,S_surfxml_AS_9,S_surfxml_AS_11,S_surfxml_AS_2,S_surfxml_platform_6,S_surfxml_AS_5,S_surfxml_AS_10,S_surfxml_AS_13,S_surfxml_AS,S_surfxml_AS_8,S_surfxml_AS_4,S_surfxml_platform_5,S_surfxml_AS_7,S_surfxml_platform_1,S_surfxml_platform,S_surfxml_AS_6,S_surfxml_AS_3,S_surfxml_platform_3>"<trace"{s} {
691 AX_surfxml_trace_id = 0;
692 AX_surfxml_trace_file = 0;
693 AX_surfxml_trace_periodicity = 0;
694 ENTER(AL_surfxml_trace); pushbuffer(0);
698 "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_id);
699 "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_id);
701 "file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_file);
702 "file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_file);
704 "periodicity"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_periodicity);
705 "periodicity"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_periodicity);
708 if (!AX_surfxml_trace_id) FAIL("Required attribute `id' not set for `trace' element.");
709 if (!AX_surfxml_trace_periodicity) FAIL("Required attribute `periodicity' not set for `trace' element.");
710 LEAVE; STag_surfxml_trace();pushbuffer(surfxml_pcdata_ix); BUFFERSET(surfxml_pcdata_ix);; ENTER(IN_trace);
713 if (!AX_surfxml_trace_id) FAIL("Required attribute `id' not set for `trace' element.");
714 if (!AX_surfxml_trace_periodicity) FAIL("Required attribute `periodicity' not set for `trace' element.");
715 LEAVE; STag_surfxml_trace(); surfxml_pcdata_ix = 0; ETag_surfxml_trace(); popbuffer(); /* attribute */
717 case S_surfxml_AS_8: case S_surfxml_AS_4: case S_surfxml_AS_7: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_8); break;
718 case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
719 case S_surfxml_AS_2: SET(S_surfxml_AS_3); break;
720 case S_surfxml_AS_1: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
721 case S_surfxml_platform_6: case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_6); break;
722 case S_surfxml_AS_12: case S_surfxml_AS_9: case S_surfxml_AS_13: SET(S_surfxml_AS_13); break;
725 . FAIL("Unexpected character `%c' in attribute list of trace element.", yytext[0]);
726 {Name} FAIL("Bad attribute `%s' in `trace' element start tag.",yytext);
727 <<EOF>> FAIL("EOF in attribute list of `trace' element.");
734 ETag_surfxml_trace();
735 surfxml_pcdata_ix = popbuffer();
736 popbuffer(); /* attribute */
738 case S_surfxml_AS_8: case S_surfxml_AS_4: case S_surfxml_AS_7: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_8); break;
739 case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
740 case S_surfxml_AS_2: SET(S_surfxml_AS_3); break;
741 case S_surfxml_AS_1: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
742 case S_surfxml_platform_6: case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_6); break;
743 case S_surfxml_AS_12: case S_surfxml_AS_9: case S_surfxml_AS_13: SET(S_surfxml_AS_13); break;
746 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</trace>' expected.",yytext);
747 <<EOF>> FAIL("Premature EOF: `</trace>' expected.");
750 <S_surfxml_AS_10,S_surfxml_AS_3,S_surfxml_random,S_surfxml_ASroute_1,S_surfxml_AS_2,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,ROOT_surfxml_random,E_surfxml_route,S_surfxml_AS_9,S_surfxml_route_1,S_surfxml_AS_11,S_surfxml_link_1,S_surfxml_AS,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_platform_6,S_surfxml_process_2,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_platform_1,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_host,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<random"{s} FAIL("Starting tag <random> is not allowed here.");
752 <S_surfxml_platform_2,S_surfxml_platform,S_surfxml_platform_3>"<random"{s} {
753 AX_surfxml_random_id = 0;
754 AX_surfxml_random_min = 0;
755 AX_surfxml_random_max = 0;
756 AX_surfxml_random_mean = 0;
757 AX_surfxml_random_std_deviation = 0;
758 AX_surfxml_random_seed = 5;
759 AX_surfxml_random_radical = 0;
760 AX_surfxml_random_generator = A_surfxml_random_generator_DRAND48;
761 ENTER(AL_surfxml_random); pushbuffer(0);
765 "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_id);
766 "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_id);
768 "min"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_min);
769 "min"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_min);
771 "max"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_max);
772 "max"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_max);
774 "mean"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_mean);
775 "mean"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_mean);
777 "std_deviation"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_std_deviation);
778 "std_deviation"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_std_deviation);
780 "seed"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_seed);
781 "seed"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_seed);
783 "radical"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_radical);
784 "radical"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_radical);
786 "generator"{Eq}"'DRAND48'" |
787 "generator"{Eq}"\"DRAND48\"" A_surfxml_random_generator = A_surfxml_random_generator_DRAND48;
788 "generator"{Eq}"'RAND'" |
789 "generator"{Eq}"\"RAND\"" A_surfxml_random_generator = A_surfxml_random_generator_RAND;
790 "generator"{Eq}"'RNGSTREAM'" |
791 "generator"{Eq}"\"RNGSTREAM\"" A_surfxml_random_generator = A_surfxml_random_generator_RNGSTREAM;
792 "generator"{Eq}"'NONE'" |
793 "generator"{Eq}"\"NONE\"" A_surfxml_random_generator = A_surfxml_random_generator_NONE;
796 if (!AX_surfxml_random_id) FAIL("Required attribute `id' not set for `random' element.");
797 if (!AX_surfxml_random_min) FAIL("Required attribute `min' not set for `random' element.");
798 if (!AX_surfxml_random_max) FAIL("Required attribute `max' not set for `random' element.");
799 if (!AX_surfxml_random_mean) FAIL("Required attribute `mean' not set for `random' element.");
800 if (!AX_surfxml_random_std_deviation) FAIL("Required attribute `std_deviation' not set for `random' element.");
801 LEAVE; STag_surfxml_random();surfxml_pcdata_ix = 0; ENTER(S_surfxml_random);
804 if (!AX_surfxml_random_id) FAIL("Required attribute `id' not set for `random' element.");
805 if (!AX_surfxml_random_min) FAIL("Required attribute `min' not set for `random' element.");
806 if (!AX_surfxml_random_max) FAIL("Required attribute `max' not set for `random' element.");
807 if (!AX_surfxml_random_mean) FAIL("Required attribute `mean' not set for `random' element.");
808 if (!AX_surfxml_random_std_deviation) FAIL("Required attribute `std_deviation' not set for `random' element.");
809 LEAVE; STag_surfxml_random(); surfxml_pcdata_ix = 0; ETag_surfxml_random(); popbuffer(); /* attribute */
811 case S_surfxml_platform_2: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_3); break;
814 . FAIL("Unexpected character `%c' in attribute list of random element.", yytext[0]);
815 {Name} FAIL("Bad attribute `%s' in `random' element start tag.",yytext);
816 <<EOF>> FAIL("EOF in attribute list of `random' element.");
819 <S_surfxml_random_2,S_surfxml_random,E_surfxml_random>{
822 ETag_surfxml_random();
823 popbuffer(); /* attribute */
825 case S_surfxml_platform_2: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_3); break;
828 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</random>' expected.",yytext);
829 . FAIL("Unexpected character `%c': `</random>' expected.",yytext[0]);
830 <<EOF>> FAIL("Premature EOF: `</random>' expected.");
833 <S_surfxml_random,S_surfxml_ASroute_1,E_surfxml_AS,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_route_1,S_surfxml_link_1,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_process_2,E_surfxml_ASroute,E_surfxml_link,S_surfxml_bypassRoute_1,E_surfxml_config,ROOT_surfxml_trace_connect,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_ASroute,S_surfxml_config_1,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<trace_connect"{s} FAIL("Starting tag <trace_connect> is not allowed here.");
835 <S_surfxml_AS_12,S_surfxml_AS_1,S_surfxml_AS_9,S_surfxml_AS_11,S_surfxml_AS_2,S_surfxml_platform_6,S_surfxml_AS_5,S_surfxml_AS_10,S_surfxml_AS_13,S_surfxml_AS,S_surfxml_AS_8,S_surfxml_AS_4,S_surfxml_platform_5,S_surfxml_AS_7,S_surfxml_platform_1,S_surfxml_AS_6,S_surfxml_platform,S_surfxml_AS_3,S_surfxml_platform_3>"<trace_connect"{s} {
836 AX_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_HOST_AVAIL;
837 AX_surfxml_trace_connect_trace = 0;
838 AX_surfxml_trace_connect_element = 0;
839 ENTER(AL_surfxml_trace_connect); pushbuffer(0);
842 <AL_surfxml_trace_connect>{
843 "kind"{Eq}"'HOST_AVAIL'" |
844 "kind"{Eq}"\"HOST_AVAIL\"" A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_HOST_AVAIL;
845 "kind"{Eq}"'POWER'" |
846 "kind"{Eq}"\"POWER\"" A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_POWER;
847 "kind"{Eq}"'LINK_AVAIL'" |
848 "kind"{Eq}"\"LINK_AVAIL\"" A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_LINK_AVAIL;
849 "kind"{Eq}"'BANDWIDTH'" |
850 "kind"{Eq}"\"BANDWIDTH\"" A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_BANDWIDTH;
851 "kind"{Eq}"'LATENCY'" |
852 "kind"{Eq}"\"LATENCY\"" A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_LATENCY;
854 "trace"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_connect_trace);
855 "trace"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_connect_trace);
857 "element"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_connect_element);
858 "element"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_connect_element);
861 if (!AX_surfxml_trace_connect_trace) FAIL("Required attribute `trace' not set for `trace_connect' element.");
862 if (!AX_surfxml_trace_connect_element) FAIL("Required attribute `element' not set for `trace_connect' element.");
863 LEAVE; STag_surfxml_trace_connect();surfxml_pcdata_ix = 0; ENTER(E_surfxml_trace_connect);
866 if (!AX_surfxml_trace_connect_trace) FAIL("Required attribute `trace' not set for `trace_connect' element.");
867 if (!AX_surfxml_trace_connect_element) FAIL("Required attribute `element' not set for `trace_connect' element.");
868 LEAVE; STag_surfxml_trace_connect(); surfxml_pcdata_ix = 0; ETag_surfxml_trace_connect(); popbuffer(); /* attribute */
870 case S_surfxml_AS_8: case S_surfxml_AS_4: case S_surfxml_AS_7: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_8); break;
871 case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
872 case S_surfxml_AS_2: SET(S_surfxml_AS_3); break;
873 case S_surfxml_AS_1: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
874 case S_surfxml_platform_6: case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_6); break;
875 case S_surfxml_AS_12: case S_surfxml_AS_9: case S_surfxml_AS_13: SET(S_surfxml_AS_13); break;
878 . FAIL("Unexpected character `%c' in attribute list of trace_connect element.", yytext[0]);
879 {Name} FAIL("Bad attribute `%s' in `trace_connect' element start tag.",yytext);
880 <<EOF>> FAIL("EOF in attribute list of `trace_connect' element.");
883 <E_surfxml_trace_connect>{
884 "</trace_connect"{s}">" {
886 ETag_surfxml_trace_connect();
887 popbuffer(); /* attribute */
889 case S_surfxml_AS_8: case S_surfxml_AS_4: case S_surfxml_AS_7: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_8); break;
890 case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
891 case S_surfxml_AS_2: SET(S_surfxml_AS_3); break;
892 case S_surfxml_AS_1: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
893 case S_surfxml_platform_6: case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_6); break;
894 case S_surfxml_AS_12: case S_surfxml_AS_9: case S_surfxml_AS_13: SET(S_surfxml_AS_13); break;
897 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</trace_connect>' expected.",yytext);
898 . FAIL("Unexpected character `%c': `</trace_connect>' expected.",yytext[0]);
899 <<EOF>> FAIL("Premature EOF: `</trace_connect>' expected.");
902 <S_surfxml_AS_10,S_surfxml_random,S_surfxml_ASroute_1,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,ROOT_surfxml_AS,S_surfxml_route_1,S_surfxml_AS_11,S_surfxml_link_1,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_process_2,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<AS"{s} FAIL("Starting tag <AS> is not allowed here.");
904 <S_surfxml_AS_2,S_surfxml_platform_6,S_surfxml_AS,S_surfxml_platform_5,S_surfxml_platform_1,S_surfxml_platform,S_surfxml_AS_3,S_surfxml_platform_3>"<AS"{s} {
905 AX_surfxml_AS_id = 0;
906 AX_surfxml_AS_routing = 0;
907 ENTER(AL_surfxml_AS); pushbuffer(0);
911 "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_AS_id);
912 "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_AS_id);
914 "routing"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_AS_routing);
915 "routing"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_AS_routing);
918 if (!AX_surfxml_AS_id) FAIL("Required attribute `id' not set for `AS' element.");
919 if (!AX_surfxml_AS_routing) FAIL("Required attribute `routing' not set for `AS' element.");
920 LEAVE; STag_surfxml_AS();surfxml_pcdata_ix = 0; ENTER(S_surfxml_AS);
923 if (!AX_surfxml_AS_id) FAIL("Required attribute `id' not set for `AS' element.");
924 if (!AX_surfxml_AS_routing) FAIL("Required attribute `routing' not set for `AS' element.");
925 LEAVE; STag_surfxml_AS(); surfxml_pcdata_ix = 0; ETag_surfxml_AS(); popbuffer(); /* attribute */
927 case S_surfxml_AS_2: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
928 case S_surfxml_platform_6: case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_6); break;
931 . FAIL("Unexpected character `%c' in attribute list of AS element.", yytext[0]);
932 {Name} FAIL("Bad attribute `%s' in `AS' element start tag.",yytext);
933 <<EOF>> FAIL("EOF in attribute list of `AS' element.");
936 <S_surfxml_AS_1,S_surfxml_AS_9,S_surfxml_AS_11,S_surfxml_AS_6,E_surfxml_AS,S_surfxml_AS_3,S_surfxml_AS_13,S_surfxml_AS_8,S_surfxml_AS,S_surfxml_AS_4>{
940 popbuffer(); /* attribute */
942 case S_surfxml_AS_2: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
943 case S_surfxml_platform_6: case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_6); break;
946 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</AS>' expected.",yytext);
947 . FAIL("Unexpected character `%c': `</AS>' expected.",yytext[0]);
948 <<EOF>> FAIL("Premature EOF: `</AS>' expected.");
951 <S_surfxml_AS_3,S_surfxml_random,S_surfxml_ASroute_1,S_surfxml_AS_2,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,S_surfxml_platform_3,S_surfxml_route_1,S_surfxml_link_1,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_platform_6,S_surfxml_process_2,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_platform,S_surfxml_platform_1,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,ROOT_surfxml_host,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<host"{s} FAIL("Starting tag <host> is not allowed here.");
953 <S_surfxml_AS_11,S_surfxml_AS_10,S_surfxml_AS>"<host"{s} {
954 AX_surfxml_host_id = 0;
955 AX_surfxml_host_power = 0;
956 AX_surfxml_host_core = 16;
957 AX_surfxml_host_availability = 18;
958 AX_surfxml_host_availability_file = 0;
959 AX_surfxml_host_state = A_surfxml_host_state_ON;
960 AX_surfxml_host_state_file = 0;
961 AX_surfxml_host_coordinates = 0;
962 ENTER(AL_surfxml_host); pushbuffer(0);
966 "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_id);
967 "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_id);
969 "power"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_power);
970 "power"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_power);
972 "core"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_core);
973 "core"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_core);
975 "availability"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_availability);
976 "availability"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_availability);
978 "availability_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_availability_file);
979 "availability_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_availability_file);
982 "state"{Eq}"\"ON\"" A_surfxml_host_state = A_surfxml_host_state_ON;
984 "state"{Eq}"\"OFF\"" A_surfxml_host_state = A_surfxml_host_state_OFF;
986 "state_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_state_file);
987 "state_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_state_file);
989 "coordinates"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_coordinates);
990 "coordinates"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_coordinates);
993 if (!AX_surfxml_host_id) FAIL("Required attribute `id' not set for `host' element.");
994 if (!AX_surfxml_host_power) FAIL("Required attribute `power' not set for `host' element.");
995 LEAVE; STag_surfxml_host();surfxml_pcdata_ix = 0; ENTER(S_surfxml_host);
998 if (!AX_surfxml_host_id) FAIL("Required attribute `id' not set for `host' element.");
999 if (!AX_surfxml_host_power) FAIL("Required attribute `power' not set for `host' element.");
1000 LEAVE; STag_surfxml_host(); surfxml_pcdata_ix = 0; ETag_surfxml_host(); popbuffer(); /* attribute */
1002 case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
1005 . FAIL("Unexpected character `%c' in attribute list of host element.", yytext[0]);
1006 {Name} FAIL("Bad attribute `%s' in `host' element start tag.",yytext);
1007 <<EOF>> FAIL("EOF in attribute list of `host' element.");
1010 <S_surfxml_host,E_surfxml_host,S_surfxml_host_2>{
1013 ETag_surfxml_host();
1014 popbuffer(); /* attribute */
1016 case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
1019 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</host>' expected.",yytext);
1020 . FAIL("Unexpected character `%c': `</host>' expected.",yytext[0]);
1021 <<EOF>> FAIL("Premature EOF: `</host>' expected.");
1024 <S_surfxml_AS_10,S_surfxml_random,S_surfxml_ASroute_1,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,S_surfxml_route_1,S_surfxml_AS_11,S_surfxml_link_1,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_process_2,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,ROOT_surfxml_cluster,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<cluster"{s} FAIL("Starting tag <cluster> is not allowed here.");
1026 <S_surfxml_AS_2,S_surfxml_platform_6,S_surfxml_AS,S_surfxml_platform_5,S_surfxml_platform_1,S_surfxml_platform,S_surfxml_AS_3,S_surfxml_platform_3>"<cluster"{s} {
1027 AX_surfxml_cluster_id = 0;
1028 AX_surfxml_cluster_prefix = 0;
1029 AX_surfxml_cluster_suffix = 0;
1030 AX_surfxml_cluster_radical = 0;
1031 AX_surfxml_cluster_power = 0;
1032 AX_surfxml_cluster_core = 22;
1033 AX_surfxml_cluster_bw = 0;
1034 AX_surfxml_cluster_lat = 0;
1035 AX_surfxml_cluster_sharing_policy = A_surfxml_cluster_sharing_policy_SHARED;
1036 AX_surfxml_cluster_bb_bw = 0;
1037 AX_surfxml_cluster_bb_lat = 0;
1038 AX_surfxml_cluster_bb_sharing_policy = A_surfxml_cluster_bb_sharing_policy_SHARED;
1039 AX_surfxml_cluster_availability_file = 0;
1040 AX_surfxml_cluster_state_file = 0;
1041 ENTER(AL_surfxml_cluster); pushbuffer(0);
1044 <AL_surfxml_cluster>{
1045 "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_id);
1046 "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_id);
1048 "prefix"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_prefix);
1049 "prefix"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_prefix);
1051 "suffix"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_suffix);
1052 "suffix"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_suffix);
1054 "radical"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_radical);
1055 "radical"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_radical);
1057 "power"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_power);
1058 "power"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_power);
1060 "core"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_core);
1061 "core"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_core);
1063 "bw"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_bw);
1064 "bw"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_bw);
1066 "lat"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_lat);
1067 "lat"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_lat);
1069 "sharing_policy"{Eq}"'SHARED'" |
1070 "sharing_policy"{Eq}"\"SHARED\"" A_surfxml_cluster_sharing_policy = A_surfxml_cluster_sharing_policy_SHARED;
1071 "sharing_policy"{Eq}"'FULLDUPLEX'" |
1072 "sharing_policy"{Eq}"\"FULLDUPLEX\"" A_surfxml_cluster_sharing_policy = A_surfxml_cluster_sharing_policy_FULLDUPLEX;
1073 "sharing_policy"{Eq}"'FATPIPE'" |
1074 "sharing_policy"{Eq}"\"FATPIPE\"" A_surfxml_cluster_sharing_policy = A_surfxml_cluster_sharing_policy_FATPIPE;
1076 "bb_bw"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_bb_bw);
1077 "bb_bw"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_bb_bw);
1079 "bb_lat"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_bb_lat);
1080 "bb_lat"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_bb_lat);
1082 "bb_sharing_policy"{Eq}"'SHARED'" |
1083 "bb_sharing_policy"{Eq}"\"SHARED\"" A_surfxml_cluster_bb_sharing_policy = A_surfxml_cluster_bb_sharing_policy_SHARED;
1084 "bb_sharing_policy"{Eq}"'FATPIPE'" |
1085 "bb_sharing_policy"{Eq}"\"FATPIPE\"" A_surfxml_cluster_bb_sharing_policy = A_surfxml_cluster_bb_sharing_policy_FATPIPE;
1087 "availability_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_availability_file);
1088 "availability_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_availability_file);
1090 "state_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_state_file);
1091 "state_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_state_file);
1094 if (!AX_surfxml_cluster_id) FAIL("Required attribute `id' not set for `cluster' element.");
1095 if (!AX_surfxml_cluster_prefix) FAIL("Required attribute `prefix' not set for `cluster' element.");
1096 if (!AX_surfxml_cluster_suffix) FAIL("Required attribute `suffix' not set for `cluster' element.");
1097 if (!AX_surfxml_cluster_radical) FAIL("Required attribute `radical' not set for `cluster' element.");
1098 if (!AX_surfxml_cluster_power) FAIL("Required attribute `power' not set for `cluster' element.");
1099 if (!AX_surfxml_cluster_bw) FAIL("Required attribute `bw' not set for `cluster' element.");
1100 if (!AX_surfxml_cluster_lat) FAIL("Required attribute `lat' not set for `cluster' element.");
1101 LEAVE; STag_surfxml_cluster();surfxml_pcdata_ix = 0; ENTER(E_surfxml_cluster);
1104 if (!AX_surfxml_cluster_id) FAIL("Required attribute `id' not set for `cluster' element.");
1105 if (!AX_surfxml_cluster_prefix) FAIL("Required attribute `prefix' not set for `cluster' element.");
1106 if (!AX_surfxml_cluster_suffix) FAIL("Required attribute `suffix' not set for `cluster' element.");
1107 if (!AX_surfxml_cluster_radical) FAIL("Required attribute `radical' not set for `cluster' element.");
1108 if (!AX_surfxml_cluster_power) FAIL("Required attribute `power' not set for `cluster' element.");
1109 if (!AX_surfxml_cluster_bw) FAIL("Required attribute `bw' not set for `cluster' element.");
1110 if (!AX_surfxml_cluster_lat) FAIL("Required attribute `lat' not set for `cluster' element.");
1111 LEAVE; STag_surfxml_cluster(); surfxml_pcdata_ix = 0; ETag_surfxml_cluster(); popbuffer(); /* attribute */
1113 case S_surfxml_AS_2: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
1114 case S_surfxml_platform_6: case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_6); break;
1117 . FAIL("Unexpected character `%c' in attribute list of cluster element.", yytext[0]);
1118 {Name} FAIL("Bad attribute `%s' in `cluster' element start tag.",yytext);
1119 <<EOF>> FAIL("EOF in attribute list of `cluster' element.");
1122 <E_surfxml_cluster>{
1125 ETag_surfxml_cluster();
1126 popbuffer(); /* attribute */
1128 case S_surfxml_AS_2: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
1129 case S_surfxml_platform_6: case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_6); break;
1132 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</cluster>' expected.",yytext);
1133 . FAIL("Unexpected character `%c': `</cluster>' expected.",yytext[0]);
1134 <<EOF>> FAIL("Premature EOF: `</cluster>' expected.");
1137 <S_surfxml_AS_10,S_surfxml_random,S_surfxml_ASroute_1,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,S_surfxml_route_1,S_surfxml_AS_11,S_surfxml_link_1,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_process_2,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_AS_5,ROOT_surfxml_peer,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<peer"{s} FAIL("Starting tag <peer> is not allowed here.");
1139 <S_surfxml_AS_2,S_surfxml_platform_6,S_surfxml_AS,S_surfxml_platform_5,S_surfxml_platform_1,S_surfxml_platform,S_surfxml_AS_3,S_surfxml_platform_3>"<peer"{s} {
1140 AX_surfxml_peer_id = 0;
1141 AX_surfxml_peer_power = 0;
1142 AX_surfxml_peer_bw_in = 0;
1143 AX_surfxml_peer_bw_out = 0;
1144 AX_surfxml_peer_lat = 0;
1145 AX_surfxml_peer_coordinates = 0;
1146 AX_surfxml_peer_availability_file = 0;
1147 AX_surfxml_peer_state_file = 0;
1148 ENTER(AL_surfxml_peer); pushbuffer(0);
1152 "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_id);
1153 "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_id);
1155 "power"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_power);
1156 "power"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_power);
1158 "bw_in"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_bw_in);
1159 "bw_in"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_bw_in);
1161 "bw_out"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_bw_out);
1162 "bw_out"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_bw_out);
1164 "lat"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_lat);
1165 "lat"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_lat);
1167 "coordinates"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_coordinates);
1168 "coordinates"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_coordinates);
1170 "availability_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_availability_file);
1171 "availability_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_availability_file);
1173 "state_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_state_file);
1174 "state_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_state_file);
1177 if (!AX_surfxml_peer_id) FAIL("Required attribute `id' not set for `peer' element.");
1178 if (!AX_surfxml_peer_power) FAIL("Required attribute `power' not set for `peer' element.");
1179 if (!AX_surfxml_peer_bw_in) FAIL("Required attribute `bw_in' not set for `peer' element.");
1180 if (!AX_surfxml_peer_bw_out) FAIL("Required attribute `bw_out' not set for `peer' element.");
1181 if (!AX_surfxml_peer_lat) FAIL("Required attribute `lat' not set for `peer' element.");
1182 LEAVE; STag_surfxml_peer();surfxml_pcdata_ix = 0; ENTER(E_surfxml_peer);
1185 if (!AX_surfxml_peer_id) FAIL("Required attribute `id' not set for `peer' element.");
1186 if (!AX_surfxml_peer_power) FAIL("Required attribute `power' not set for `peer' element.");
1187 if (!AX_surfxml_peer_bw_in) FAIL("Required attribute `bw_in' not set for `peer' element.");
1188 if (!AX_surfxml_peer_bw_out) FAIL("Required attribute `bw_out' not set for `peer' element.");
1189 if (!AX_surfxml_peer_lat) FAIL("Required attribute `lat' not set for `peer' element.");
1190 LEAVE; STag_surfxml_peer(); surfxml_pcdata_ix = 0; ETag_surfxml_peer(); popbuffer(); /* attribute */
1192 case S_surfxml_AS_2: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
1193 case S_surfxml_platform_6: case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_6); break;
1196 . FAIL("Unexpected character `%c' in attribute list of peer element.", yytext[0]);
1197 {Name} FAIL("Bad attribute `%s' in `peer' element start tag.",yytext);
1198 <<EOF>> FAIL("EOF in attribute list of `peer' element.");
1204 ETag_surfxml_peer();
1205 popbuffer(); /* attribute */
1207 case S_surfxml_AS_2: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
1208 case S_surfxml_platform_6: case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_6); break;
1211 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</peer>' expected.",yytext);
1212 . FAIL("Unexpected character `%c': `</peer>' expected.",yytext[0]);
1213 <<EOF>> FAIL("Premature EOF: `</peer>' expected.");
1216 <S_surfxml_AS_3,S_surfxml_random,S_surfxml_ASroute_1,S_surfxml_AS_2,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,S_surfxml_platform_3,S_surfxml_route_1,S_surfxml_link_1,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_platform_6,S_surfxml_process_2,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_platform,S_surfxml_platform_1,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,ROOT_surfxml_router,S_surfxml_platform_7,E_surfxml_bypassRoute>"<router"{s} FAIL("Starting tag <router> is not allowed here.");
1218 <S_surfxml_AS_11,S_surfxml_AS_10,S_surfxml_AS>"<router"{s} {
1219 AX_surfxml_router_id = 0;
1220 AX_surfxml_router_coordinates = 0;
1221 ENTER(AL_surfxml_router); pushbuffer(0);
1224 <AL_surfxml_router>{
1225 "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_router_id);
1226 "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_router_id);
1228 "coordinates"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_router_coordinates);
1229 "coordinates"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_router_coordinates);
1232 if (!AX_surfxml_router_id) FAIL("Required attribute `id' not set for `router' element.");
1233 LEAVE; STag_surfxml_router();surfxml_pcdata_ix = 0; ENTER(E_surfxml_router);
1236 if (!AX_surfxml_router_id) FAIL("Required attribute `id' not set for `router' element.");
1237 LEAVE; STag_surfxml_router(); surfxml_pcdata_ix = 0; ETag_surfxml_router(); popbuffer(); /* attribute */
1239 case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
1242 . FAIL("Unexpected character `%c' in attribute list of router element.", yytext[0]);
1243 {Name} FAIL("Bad attribute `%s' in `router' element start tag.",yytext);
1244 <<EOF>> FAIL("EOF in attribute list of `router' element.");
1250 ETag_surfxml_router();
1251 popbuffer(); /* attribute */
1253 case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
1256 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</router>' expected.",yytext);
1257 . FAIL("Unexpected character `%c': `</router>' expected.",yytext[0]);
1258 <<EOF>> FAIL("Premature EOF: `</router>' expected.");
1261 <S_surfxml_random,S_surfxml_ASroute_1,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,S_surfxml_platform_3,S_surfxml_route_1,S_surfxml_link_1,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_platform_6,S_surfxml_process_2,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_platform,S_surfxml_platform_1,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_host,S_surfxml_platform_2,ROOT_surfxml_link,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<link"{s} FAIL("Starting tag <link> is not allowed here.");
1263 <S_surfxml_AS_11,S_surfxml_AS_2,S_surfxml_AS_10,S_surfxml_AS,S_surfxml_AS_3>"<link"{s} {
1264 AX_surfxml_link_id = 0;
1265 AX_surfxml_link_bandwidth = 0;
1266 AX_surfxml_link_bandwidth_file = 0;
1267 AX_surfxml_link_latency = 24;
1268 AX_surfxml_link_latency_file = 0;
1269 AX_surfxml_link_state = A_surfxml_link_state_ON;
1270 AX_surfxml_link_state_file = 0;
1271 AX_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
1272 ENTER(AL_surfxml_link); pushbuffer(0);
1276 "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_id);
1277 "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_id);
1279 "bandwidth"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_bandwidth);
1280 "bandwidth"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_bandwidth);
1282 "bandwidth_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_bandwidth_file);
1283 "bandwidth_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_bandwidth_file);
1285 "latency"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_latency);
1286 "latency"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_latency);
1288 "latency_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_latency_file);
1289 "latency_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_latency_file);
1292 "state"{Eq}"\"ON\"" A_surfxml_link_state = A_surfxml_link_state_ON;
1293 "state"{Eq}"'OFF'" |
1294 "state"{Eq}"\"OFF\"" A_surfxml_link_state = A_surfxml_link_state_OFF;
1296 "state_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_state_file);
1297 "state_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_state_file);
1299 "sharing_policy"{Eq}"'SHARED'" |
1300 "sharing_policy"{Eq}"\"SHARED\"" A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
1301 "sharing_policy"{Eq}"'FATPIPE'" |
1302 "sharing_policy"{Eq}"\"FATPIPE\"" A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_FATPIPE;
1303 "sharing_policy"{Eq}"'FULLDUPLEX'" |
1304 "sharing_policy"{Eq}"\"FULLDUPLEX\"" A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_FULLDUPLEX;
1307 if (!AX_surfxml_link_id) FAIL("Required attribute `id' not set for `link' element.");
1308 if (!AX_surfxml_link_bandwidth) FAIL("Required attribute `bandwidth' not set for `link' element.");
1309 LEAVE; STag_surfxml_link();surfxml_pcdata_ix = 0; ENTER(S_surfxml_link);
1312 if (!AX_surfxml_link_id) FAIL("Required attribute `id' not set for `link' element.");
1313 if (!AX_surfxml_link_bandwidth) FAIL("Required attribute `bandwidth' not set for `link' element.");
1314 LEAVE; STag_surfxml_link(); surfxml_pcdata_ix = 0; ETag_surfxml_link(); popbuffer(); /* attribute */
1316 case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
1317 case S_surfxml_AS_2: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
1320 . FAIL("Unexpected character `%c' in attribute list of link element.", yytext[0]);
1321 {Name} FAIL("Bad attribute `%s' in `link' element start tag.",yytext);
1322 <<EOF>> FAIL("EOF in attribute list of `link' element.");
1325 <E_surfxml_link,S_surfxml_link_2,S_surfxml_link>{
1328 ETag_surfxml_link();
1329 popbuffer(); /* attribute */
1331 case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
1332 case S_surfxml_AS_2: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
1335 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</link>' expected.",yytext);
1336 . FAIL("Unexpected character `%c': `</link>' expected.",yytext[0]);
1337 <<EOF>> FAIL("Premature EOF: `</link>' expected.");
1340 <S_surfxml_AS_10,S_surfxml_AS_3,S_surfxml_random,S_surfxml_ASroute_1,S_surfxml_AS_2,E_surfxml_AS,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_platform_3,S_surfxml_route_1,S_surfxml_link_1,ROOT_surfxml_route,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_platform_6,S_surfxml_process_2,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_platform,S_surfxml_platform_1,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<route"{s} FAIL("Starting tag <route> is not allowed here.");
1342 <S_surfxml_AS_12,S_surfxml_AS_9,S_surfxml_AS_11,S_surfxml_AS_13,S_surfxml_AS>"<route"{s} {
1343 AX_surfxml_route_src = 0;
1344 AX_surfxml_route_dst = 0;
1345 AX_surfxml_route_symmetrical = A_surfxml_route_symmetrical_YES;
1346 ENTER(AL_surfxml_route); pushbuffer(0);
1350 "src"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_route_src);
1351 "src"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_route_src);
1353 "dst"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_route_dst);
1354 "dst"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_route_dst);
1356 "symmetrical"{Eq}"'YES'" |
1357 "symmetrical"{Eq}"\"YES\"" A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_YES;
1358 "symmetrical"{Eq}"'NO'" |
1359 "symmetrical"{Eq}"\"NO\"" A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_NO;
1362 if (!AX_surfxml_route_src) FAIL("Required attribute `src' not set for `route' element.");
1363 if (!AX_surfxml_route_dst) FAIL("Required attribute `dst' not set for `route' element.");
1364 LEAVE; STag_surfxml_route();surfxml_pcdata_ix = 0; ENTER(S_surfxml_route);
1367 if (!AX_surfxml_route_src) FAIL("Required attribute `src' not set for `route' element.");
1368 if (!AX_surfxml_route_dst) FAIL("Required attribute `dst' not set for `route' element.");
1369 LEAVE; STag_surfxml_route(); surfxml_pcdata_ix = 0; ETag_surfxml_route(); popbuffer(); /* attribute */
1371 case S_surfxml_AS_12: case S_surfxml_AS_9: case S_surfxml_AS_11: case S_surfxml_AS_13: case S_surfxml_AS: SET(S_surfxml_AS_13); break;
1374 . FAIL("Unexpected character `%c' in attribute list of route element.", yytext[0]);
1375 {Name} FAIL("Bad attribute `%s' in `route' element start tag.",yytext);
1376 <<EOF>> FAIL("EOF in attribute list of `route' element.");
1379 <S_surfxml_route,S_surfxml_route_2,E_surfxml_route>{
1382 ETag_surfxml_route();
1383 popbuffer(); /* attribute */
1385 case S_surfxml_AS_12: case S_surfxml_AS_9: case S_surfxml_AS_11: case S_surfxml_AS_13: case S_surfxml_AS: SET(S_surfxml_AS_13); break;
1388 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</route>' expected.",yytext);
1389 . FAIL("Unexpected character `%c': `</route>' expected.",yytext[0]);
1390 <<EOF>> FAIL("Premature EOF: `</route>' expected.");
1393 <S_surfxml_AS_10,ROOT_surfxml_ASroute,S_surfxml_random,S_surfxml_ASroute_1,S_surfxml_AS_2,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,S_surfxml_platform_3,S_surfxml_route_1,S_surfxml_AS_11,S_surfxml_link_1,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_platform_6,S_surfxml_process_2,E_surfxml_ASroute,E_surfxml_link,S_surfxml_platform,S_surfxml_platform_1,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<ASroute"{s} FAIL("Starting tag <ASroute> is not allowed here.");
1395 <S_surfxml_AS_1,S_surfxml_AS_5,S_surfxml_AS,S_surfxml_AS_6,S_surfxml_AS_3>"<ASroute"{s} {
1396 AX_surfxml_ASroute_src = 0;
1397 AX_surfxml_ASroute_dst = 0;
1398 AX_surfxml_ASroute_gw_src = 0;
1399 AX_surfxml_ASroute_gw_dst = 0;
1400 AX_surfxml_ASroute_symmetrical = A_surfxml_ASroute_symmetrical_YES;
1401 ENTER(AL_surfxml_ASroute); pushbuffer(0);
1404 <AL_surfxml_ASroute>{
1405 "src"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_src);
1406 "src"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_src);
1408 "dst"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_dst);
1409 "dst"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_dst);
1411 "gw_src"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_gw_src);
1412 "gw_src"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_gw_src);
1414 "gw_dst"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_gw_dst);
1415 "gw_dst"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_gw_dst);
1417 "symmetrical"{Eq}"'YES'" |
1418 "symmetrical"{Eq}"\"YES\"" A_surfxml_ASroute_symmetrical = A_surfxml_ASroute_symmetrical_YES;
1419 "symmetrical"{Eq}"'NO'" |
1420 "symmetrical"{Eq}"\"NO\"" A_surfxml_ASroute_symmetrical = A_surfxml_ASroute_symmetrical_NO;
1423 if (!AX_surfxml_ASroute_src) FAIL("Required attribute `src' not set for `ASroute' element.");
1424 if (!AX_surfxml_ASroute_dst) FAIL("Required attribute `dst' not set for `ASroute' element.");
1425 if (!AX_surfxml_ASroute_gw_src) FAIL("Required attribute `gw_src' not set for `ASroute' element.");
1426 if (!AX_surfxml_ASroute_gw_dst) FAIL("Required attribute `gw_dst' not set for `ASroute' element.");
1427 LEAVE; STag_surfxml_ASroute();surfxml_pcdata_ix = 0; ENTER(S_surfxml_ASroute);
1430 if (!AX_surfxml_ASroute_src) FAIL("Required attribute `src' not set for `ASroute' element.");
1431 if (!AX_surfxml_ASroute_dst) FAIL("Required attribute `dst' not set for `ASroute' element.");
1432 if (!AX_surfxml_ASroute_gw_src) FAIL("Required attribute `gw_src' not set for `ASroute' element.");
1433 if (!AX_surfxml_ASroute_gw_dst) FAIL("Required attribute `gw_dst' not set for `ASroute' element.");
1434 LEAVE; STag_surfxml_ASroute(); surfxml_pcdata_ix = 0; ETag_surfxml_ASroute(); popbuffer(); /* attribute */
1436 case S_surfxml_AS_1: case S_surfxml_AS_5: case S_surfxml_AS: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_6); break;
1439 . FAIL("Unexpected character `%c' in attribute list of ASroute element.", yytext[0]);
1440 {Name} FAIL("Bad attribute `%s' in `ASroute' element start tag.",yytext);
1441 <<EOF>> FAIL("EOF in attribute list of `ASroute' element.");
1444 <E_surfxml_ASroute,S_surfxml_ASroute,S_surfxml_ASroute_2>{
1447 ETag_surfxml_ASroute();
1448 popbuffer(); /* attribute */
1450 case S_surfxml_AS_1: case S_surfxml_AS_5: case S_surfxml_AS: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_6); break;
1453 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</ASroute>' expected.",yytext);
1454 . FAIL("Unexpected character `%c': `</ASroute>' expected.",yytext[0]);
1455 <<EOF>> FAIL("Premature EOF: `</ASroute>' expected.");
1458 <S_surfxml_AS_10,S_surfxml_AS_3,S_surfxml_random,S_surfxml_AS_2,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,E_surfxml_route,S_surfxml_AS_9,S_surfxml_platform_3,S_surfxml_AS_11,S_surfxml_link_1,S_surfxml_AS,S_surfxml_link,E_surfxml_host,S_surfxml_config,ROOT_surfxml_link_ctn,S_surfxml_random_2,S_surfxml_platform_6,S_surfxml_process_2,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_platform,S_surfxml_platform_1,E_surfxml_config,S_surfxml_host_1,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_platform_5,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_platform_7,E_surfxml_bypassRoute>"<link_ctn"{s} FAIL("Starting tag <link_ctn> is not allowed here.");
1460 <S_surfxml_route_1,S_surfxml_bypassRoute,S_surfxml_route,S_surfxml_bypassRoute_2,S_surfxml_bypassRoute_1,S_surfxml_route_2,S_surfxml_ASroute,S_surfxml_ASroute_1,S_surfxml_ASroute_2>"<link_ctn"{s} {
1461 AX_surfxml_link_ctn_id = 0;
1462 AX_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
1463 ENTER(AL_surfxml_link_ctn); pushbuffer(0);
1466 <AL_surfxml_link_ctn>{
1467 "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_ctn_id);
1468 "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_ctn_id);
1470 "direction"{Eq}"'UP'" |
1471 "direction"{Eq}"\"UP\"" A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_UP;
1472 "direction"{Eq}"'DOWN'" |
1473 "direction"{Eq}"\"DOWN\"" A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_DOWN;
1474 "direction"{Eq}"'NONE'" |
1475 "direction"{Eq}"\"NONE\"" A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
1478 if (!AX_surfxml_link_ctn_id) FAIL("Required attribute `id' not set for `link_ctn' element.");
1479 LEAVE; STag_surfxml_link_ctn();surfxml_pcdata_ix = 0; ENTER(E_surfxml_link_ctn);
1482 if (!AX_surfxml_link_ctn_id) FAIL("Required attribute `id' not set for `link_ctn' element.");
1483 LEAVE; STag_surfxml_link_ctn(); surfxml_pcdata_ix = 0; ETag_surfxml_link_ctn(); popbuffer(); /* attribute */
1485 case S_surfxml_bypassRoute: case S_surfxml_bypassRoute_2: case S_surfxml_bypassRoute_1: SET(S_surfxml_bypassRoute_2); break;
1486 case S_surfxml_route_1: case S_surfxml_route: case S_surfxml_route_2: SET(S_surfxml_route_2); break;
1487 case S_surfxml_ASroute: case S_surfxml_ASroute_1: case S_surfxml_ASroute_2: SET(S_surfxml_ASroute_2); break;
1490 . FAIL("Unexpected character `%c' in attribute list of link_ctn element.", yytext[0]);
1491 {Name} FAIL("Bad attribute `%s' in `link_ctn' element start tag.",yytext);
1492 <<EOF>> FAIL("EOF in attribute list of `link_ctn' element.");
1495 <E_surfxml_link_ctn>{
1496 "</link_ctn"{s}">" {
1498 ETag_surfxml_link_ctn();
1499 popbuffer(); /* attribute */
1501 case S_surfxml_bypassRoute: case S_surfxml_bypassRoute_2: case S_surfxml_bypassRoute_1: SET(S_surfxml_bypassRoute_2); break;
1502 case S_surfxml_route_1: case S_surfxml_route: case S_surfxml_route_2: SET(S_surfxml_route_2); break;
1503 case S_surfxml_ASroute: case S_surfxml_ASroute_1: case S_surfxml_ASroute_2: SET(S_surfxml_ASroute_2); break;
1506 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</link_ctn>' expected.",yytext);
1507 . FAIL("Unexpected character `%c': `</link_ctn>' expected.",yytext[0]);
1508 <<EOF>> FAIL("Premature EOF: `</link_ctn>' expected.");
1511 <S_surfxml_AS_10,S_surfxml_random,S_surfxml_ASroute_1,S_surfxml_AS_2,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,S_surfxml_platform_3,S_surfxml_route_1,S_surfxml_AS_11,S_surfxml_link_1,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,ROOT_surfxml_bypassRoute,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_platform_6,S_surfxml_process_2,E_surfxml_ASroute,E_surfxml_link,S_surfxml_platform,S_surfxml_platform_1,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<bypassRoute"{s} FAIL("Starting tag <bypassRoute> is not allowed here.");
1513 <S_surfxml_AS_1,S_surfxml_AS,S_surfxml_AS_8,S_surfxml_AS_4,S_surfxml_AS_7,S_surfxml_AS_6,S_surfxml_AS_3>"<bypassRoute"{s} {
1514 AX_surfxml_bypassRoute_src = 0;
1515 AX_surfxml_bypassRoute_dst = 0;
1516 AX_surfxml_bypassRoute_gw_src = 0;
1517 AX_surfxml_bypassRoute_gw_dst = 0;
1518 ENTER(AL_surfxml_bypassRoute); pushbuffer(0);
1521 <AL_surfxml_bypassRoute>{
1522 "src"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_src);
1523 "src"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_src);
1525 "dst"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_dst);
1526 "dst"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_dst);
1528 "gw_src"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_gw_src);
1529 "gw_src"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_gw_src);
1531 "gw_dst"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_gw_dst);
1532 "gw_dst"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_gw_dst);
1535 if (!AX_surfxml_bypassRoute_src) FAIL("Required attribute `src' not set for `bypassRoute' element.");
1536 if (!AX_surfxml_bypassRoute_dst) FAIL("Required attribute `dst' not set for `bypassRoute' element.");
1537 if (!AX_surfxml_bypassRoute_gw_src) FAIL("Required attribute `gw_src' not set for `bypassRoute' element.");
1538 if (!AX_surfxml_bypassRoute_gw_dst) FAIL("Required attribute `gw_dst' not set for `bypassRoute' element.");
1539 LEAVE; STag_surfxml_bypassRoute();surfxml_pcdata_ix = 0; ENTER(S_surfxml_bypassRoute);
1542 if (!AX_surfxml_bypassRoute_src) FAIL("Required attribute `src' not set for `bypassRoute' element.");
1543 if (!AX_surfxml_bypassRoute_dst) FAIL("Required attribute `dst' not set for `bypassRoute' element.");
1544 if (!AX_surfxml_bypassRoute_gw_src) FAIL("Required attribute `gw_src' not set for `bypassRoute' element.");
1545 if (!AX_surfxml_bypassRoute_gw_dst) FAIL("Required attribute `gw_dst' not set for `bypassRoute' element.");
1546 LEAVE; STag_surfxml_bypassRoute(); surfxml_pcdata_ix = 0; ETag_surfxml_bypassRoute(); popbuffer(); /* attribute */
1548 case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_8: case S_surfxml_AS_4: case S_surfxml_AS_7: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_8); break;
1551 . FAIL("Unexpected character `%c' in attribute list of bypassRoute element.", yytext[0]);
1552 {Name} FAIL("Bad attribute `%s' in `bypassRoute' element start tag.",yytext);
1553 <<EOF>> FAIL("EOF in attribute list of `bypassRoute' element.");
1556 <S_surfxml_bypassRoute,S_surfxml_bypassRoute_2,E_surfxml_bypassRoute>{
1557 "</bypassRoute"{s}">" {
1559 ETag_surfxml_bypassRoute();
1560 popbuffer(); /* attribute */
1562 case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_8: case S_surfxml_AS_4: case S_surfxml_AS_7: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_8); break;
1565 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</bypassRoute>' expected.",yytext);
1566 . FAIL("Unexpected character `%c': `</bypassRoute>' expected.",yytext[0]);
1567 <<EOF>> FAIL("Premature EOF: `</bypassRoute>' expected.");
1570 <S_surfxml_AS_10,S_surfxml_AS_3,S_surfxml_random,S_surfxml_ASroute_1,S_surfxml_AS_2,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,S_surfxml_route_1,S_surfxml_AS_11,S_surfxml_link_1,S_surfxml_AS,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_process_2,E_surfxml_ASroute,ROOT_surfxml_process,S_surfxml_AS_6,E_surfxml_link,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_AS_1,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,E_surfxml_bypassRoute>"<process"{s} FAIL("Starting tag <process> is not allowed here.");
1572 <S_surfxml_platform_6,S_surfxml_platform_4,S_surfxml_platform_1,S_surfxml_platform,S_surfxml_platform_8,S_surfxml_platform_7,S_surfxml_platform_3>"<process"{s} {
1573 AX_surfxml_process_host = 0;
1574 AX_surfxml_process_function = 0;
1575 AX_surfxml_process_start_time = 28;
1576 AX_surfxml_process_kill_time = 33;
1577 ENTER(AL_surfxml_process); pushbuffer(0);
1580 <AL_surfxml_process>{
1581 "host"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_process_host);
1582 "host"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_process_host);
1584 "function"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_process_function);
1585 "function"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_process_function);
1587 "start_time"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_process_start_time);
1588 "start_time"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_process_start_time);
1590 "kill_time"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_process_kill_time);
1591 "kill_time"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_process_kill_time);
1594 if (!AX_surfxml_process_host) FAIL("Required attribute `host' not set for `process' element.");
1595 if (!AX_surfxml_process_function) FAIL("Required attribute `function' not set for `process' element.");
1596 LEAVE; STag_surfxml_process();surfxml_pcdata_ix = 0; ENTER(S_surfxml_process);
1599 if (!AX_surfxml_process_host) FAIL("Required attribute `host' not set for `process' element.");
1600 if (!AX_surfxml_process_function) FAIL("Required attribute `function' not set for `process' element.");
1601 LEAVE; STag_surfxml_process(); surfxml_pcdata_ix = 0; ETag_surfxml_process(); popbuffer(); /* attribute */
1603 case S_surfxml_platform_6: case S_surfxml_platform_4: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_8: case S_surfxml_platform_7: case S_surfxml_platform_3: SET(S_surfxml_platform_8); break;
1606 . FAIL("Unexpected character `%c' in attribute list of process element.", yytext[0]);
1607 {Name} FAIL("Bad attribute `%s' in `process' element start tag.",yytext);
1608 <<EOF>> FAIL("EOF in attribute list of `process' element.");
1611 <E_surfxml_process,S_surfxml_process,S_surfxml_process_2>{
1614 ETag_surfxml_process();
1615 popbuffer(); /* attribute */
1617 case S_surfxml_platform_6: case S_surfxml_platform_4: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_8: case S_surfxml_platform_7: case S_surfxml_platform_3: SET(S_surfxml_platform_8); break;
1620 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</process>' expected.",yytext);
1621 . FAIL("Unexpected character `%c': `</process>' expected.",yytext[0]);
1622 <<EOF>> FAIL("Premature EOF: `</process>' expected.");
1625 <S_surfxml_AS_10,S_surfxml_AS_3,S_surfxml_random,S_surfxml_ASroute_1,S_surfxml_AS_2,E_surfxml_AS,S_surfxml_AS_12,ROOT_surfxml_argument,E_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,S_surfxml_platform_3,S_surfxml_route_1,S_surfxml_AS_11,S_surfxml_link_1,S_surfxml_AS,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_platform_6,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_platform,S_surfxml_platform_1,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_host,S_surfxml_platform_2,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<argument"{s} FAIL("Starting tag <argument> is not allowed here.");
1627 <S_surfxml_process_1,S_surfxml_process,S_surfxml_process_2>"<argument"{s} {
1628 AX_surfxml_argument_value = 0;
1629 ENTER(AL_surfxml_argument); pushbuffer(0);
1632 <AL_surfxml_argument>{
1633 "value"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_argument_value);
1634 "value"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_argument_value);
1637 if (!AX_surfxml_argument_value) FAIL("Required attribute `value' not set for `argument' element.");
1638 LEAVE; STag_surfxml_argument();surfxml_pcdata_ix = 0; ENTER(E_surfxml_argument);
1641 if (!AX_surfxml_argument_value) FAIL("Required attribute `value' not set for `argument' element.");
1642 LEAVE; STag_surfxml_argument(); surfxml_pcdata_ix = 0; ETag_surfxml_argument(); popbuffer(); /* attribute */
1644 case S_surfxml_process_1: case S_surfxml_process: case S_surfxml_process_2: SET(S_surfxml_process_2); break;
1647 . FAIL("Unexpected character `%c' in attribute list of argument element.", yytext[0]);
1648 {Name} FAIL("Bad attribute `%s' in `argument' element start tag.",yytext);
1649 <<EOF>> FAIL("EOF in attribute list of `argument' element.");
1652 <E_surfxml_argument>{
1653 "</argument"{s}">" {
1655 ETag_surfxml_argument();
1656 popbuffer(); /* attribute */
1658 case S_surfxml_process_1: case S_surfxml_process: case S_surfxml_process_2: SET(S_surfxml_process_2); break;
1661 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</argument>' expected.",yytext);
1662 . FAIL("Unexpected character `%c': `</argument>' expected.",yytext[0]);
1663 <<EOF>> FAIL("Premature EOF: `</argument>' expected.");
1666 <S_surfxml_AS_10,S_surfxml_AS_3,S_surfxml_random,S_surfxml_ASroute_1,S_surfxml_AS_2,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,S_surfxml_route_1,S_surfxml_AS_11,S_surfxml_link_1,S_surfxml_AS,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_platform_6,S_surfxml_process_2,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_platform_1,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,ROOT_surfxml_config,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_host,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<config"{s} FAIL("Starting tag <config> is not allowed here.");
1668 <S_surfxml_platform_2,S_surfxml_platform,S_surfxml_platform_3>"<config"{s} {
1669 AX_surfxml_config_id = 0;
1670 ENTER(AL_surfxml_config); pushbuffer(0);
1673 <AL_surfxml_config>{
1674 "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_config_id);
1675 "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_config_id);
1678 LEAVE; STag_surfxml_config();surfxml_pcdata_ix = 0; ENTER(S_surfxml_config);
1681 LEAVE; STag_surfxml_config(); surfxml_pcdata_ix = 0; ETag_surfxml_config(); popbuffer(); /* attribute */
1683 case S_surfxml_platform_2: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_3); break;
1686 . FAIL("Unexpected character `%c' in attribute list of config element.", yytext[0]);
1687 {Name} FAIL("Bad attribute `%s' in `config' element start tag.",yytext);
1688 <<EOF>> FAIL("EOF in attribute list of `config' element.");
1691 <S_surfxml_config,S_surfxml_config_2,E_surfxml_config>{
1694 ETag_surfxml_config();
1695 popbuffer(); /* attribute */
1697 case S_surfxml_platform_2: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_3); break;
1700 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</config>' expected.",yytext);
1701 . FAIL("Unexpected character `%c': `</config>' expected.",yytext[0]);
1702 <<EOF>> FAIL("Premature EOF: `</config>' expected.");
1705 /* <!-- <!ATTLIST prop key CDATA #REQUIRED> -->
1706 * <!-- <!ATTLIST prop key CDATA #REQUIRED> --> */
1708 <S_surfxml_AS_10,S_surfxml_AS_3,S_surfxml_ASroute_1,S_surfxml_AS_2,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,ROOT_surfxml_prop,S_surfxml_AS_9,S_surfxml_platform_3,S_surfxml_route_1,S_surfxml_AS_11,S_surfxml_AS,S_surfxml_bypassRoute,E_surfxml_host,S_surfxml_ASroute_2,S_surfxml_platform_6,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_platform,S_surfxml_platform_1,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_route_2,E_surfxml_platform,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_platform_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_AS_5,S_surfxml_AS_4,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<prop"{s} FAIL("Starting tag <prop> is not allowed here.");
1710 <S_surfxml_config_1,S_surfxml_config,S_surfxml_random,S_surfxml_host_1,S_surfxml_host_2,S_surfxml_host,S_surfxml_link_1,S_surfxml_link_2,S_surfxml_config_2,S_surfxml_random_2,S_surfxml_link,S_surfxml_random_1,S_surfxml_process_1,S_surfxml_process,S_surfxml_process_2>"<prop"{s} {
1711 AX_surfxml_prop_id = 0;
1712 AX_surfxml_prop_value = 0;
1713 ENTER(AL_surfxml_prop); pushbuffer(0);
1717 "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_prop_id);
1718 "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_prop_id);
1720 "value"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_prop_value);
1721 "value"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_prop_value);
1724 if (!AX_surfxml_prop_id) FAIL("Required attribute `id' not set for `prop' element.");
1725 if (!AX_surfxml_prop_value) FAIL("Required attribute `value' not set for `prop' element.");
1726 LEAVE; STag_surfxml_prop();surfxml_pcdata_ix = 0; ENTER(E_surfxml_prop);
1729 if (!AX_surfxml_prop_id) FAIL("Required attribute `id' not set for `prop' element.");
1730 if (!AX_surfxml_prop_value) FAIL("Required attribute `value' not set for `prop' element.");
1731 LEAVE; STag_surfxml_prop(); surfxml_pcdata_ix = 0; ETag_surfxml_prop(); popbuffer(); /* attribute */
1733 case S_surfxml_random: case S_surfxml_random_2: case S_surfxml_random_1: SET(S_surfxml_random_2); break;
1734 case S_surfxml_config_1: case S_surfxml_config: case S_surfxml_config_2: SET(S_surfxml_config_2); break;
1735 case S_surfxml_process_1: case S_surfxml_process: case S_surfxml_process_2: SET(S_surfxml_process_2); break;
1736 case S_surfxml_host_1: case S_surfxml_host_2: case S_surfxml_host: SET(S_surfxml_host_2); break;
1737 case S_surfxml_link_1: case S_surfxml_link_2: case S_surfxml_link: SET(S_surfxml_link_2); break;
1740 . FAIL("Unexpected character `%c' in attribute list of prop element.", yytext[0]);
1741 {Name} FAIL("Bad attribute `%s' in `prop' element start tag.",yytext);
1742 <<EOF>> FAIL("EOF in attribute list of `prop' element.");
1748 ETag_surfxml_prop();
1749 popbuffer(); /* attribute */
1751 case S_surfxml_random: case S_surfxml_random_2: case S_surfxml_random_1: SET(S_surfxml_random_2); break;
1752 case S_surfxml_config_1: case S_surfxml_config: case S_surfxml_config_2: SET(S_surfxml_config_2); break;
1753 case S_surfxml_process_1: case S_surfxml_process: case S_surfxml_process_2: SET(S_surfxml_process_2); break;
1754 case S_surfxml_host_1: case S_surfxml_host_2: case S_surfxml_host: SET(S_surfxml_host_2); break;
1755 case S_surfxml_link_1: case S_surfxml_link_2: case S_surfxml_link: SET(S_surfxml_link_2); break;
1758 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</prop>' expected.",yytext);
1759 . FAIL("Unexpected character `%c': `</prop>' expected.",yytext[0]);
1760 <<EOF>> FAIL("Premature EOF: `</prop>' expected.");
1763 /* EPILOG: after the root element. */
1766 . {SET(PROLOG); yyless(0); CLEANUP; return -1;}
1770 /* CHARACTER DATA. */
1772 <IN_trace,VALUE1,VALUE2>{
1773 /* Non-defined standard entities... */
1774 "&" BUFFERPUTC('&');
1775 "<" BUFFERPUTC('<');
1776 ">" BUFFERPUTC('>');
1777 "'" BUFFERPUTC('\'');
1778 """ BUFFERPUTC('"');
1780 /* Character entities. */
1781 "&#"[[:digit:]]+";" BUFFERPUTC((unsigned char)atoi(yytext+2));
1782 "&#x"[[:xdigit:]]+";" BUFFERPUTC((unsigned char)strtol(yytext+3,NULL,16));
1785 <IN_trace,VALUE1,VALUE2,CDATA>{
1789 "\n\r" BUFFERPUTC('\n');
1793 "<![CDATA[" ENTER(CDATA);
1794 "]""]>" FAIL("Unexpected `]""]>' in character data.");
1798 \' BUFFERDONE; LEAVE;
1799 <<EOF>> FAIL("EOF in literal (\"'\" expected).");
1803 \" BUFFERDONE; LEAVE;
1804 <<EOF>> FAIL("EOF in literal (`\"' expected).");
1807 <IN_trace,VALUE1,VALUE2>{
1808 [^<&] BUFFERPUTC(yytext[0]);
1809 [<&] FAIL("Spurious `%c' in character data.",yytext[0]);
1814 /* "]""]" BUFFERPUTC(yytext[0]); BUFFERPUTC(yytext[1]); */
1815 . BUFFERPUTC(yytext[0]);
1816 <<EOF>> FAIL("EOF in CDATA section.");
1819 /* Impossible rules to avoid warnings from flex(1). */
1820 /* Ideally, this should be replaced by code in flexml.pl that
1821 generates just the states not covered by other rules. */
1823 .|[\n] FAIL("Syntax error on character `%c'.", yytext[0]);
1828 /* Element context stack lookup. */
1829 int surfxml_element_context(int i)
1831 return (0<i && i<yy_start_stack_depth
1832 ? yy_start_stack[yy_start_stack_ptr - i]
1837 void print_yy_stack(char* fmt, ...)
1839 int i = 0; va_list ap; va_start(ap, fmt);
1840 vfprintf(stderr, fmt, ap);
1841 if (surfxml_statenames) {
1842 for (i=1; i<yy_start_stack_ptr; i++) {
1843 fprintf(stderr, "%s/", surfxml_statenames[yy_start_stack[i] ]);
1845 fprintf(stderr,"%s\n", surfxml_statenames[YY_START]);
1850 void print_surfxml_bufferstack()
1853 fputs("Buffer: ", stderr);
1854 for (i = 0; i < blimit; i++) {
1855 if ( surfxml_bufferstack[i] == '\377' ) break;
1856 putc(surfxml_bufferstack[i], stderr);
1861 static void debug_enter(int state, const char* statename) {
1862 yy_push_state(state);
1863 if (yy_flex_debug) {
1864 print_yy_stack("--ENTER(%s) : ",statename);
1865 print_surfxml_bufferstack();
1869 static void debug_leave(void) {
1870 if (yy_flex_debug) {
1871 print_yy_stack("--LEAVE : ");
1872 print_surfxml_bufferstack();
1877 static void debug_set(int state, const char* statename) {
1879 if (yy_flex_debug) print_yy_stack("--SET(%s) : ",statename);
1884 static void cleanup(void)
1886 if (surfxml_statenames) {
1887 free(surfxml_statenames);
1888 surfxml_statenames = NULL;
1890 free(surfxml_bufferstack);
1891 surfxml_bufferstack = NULL;
1898 static int fail(const char* fmt, ...)
1900 int chars_left, used;
1901 va_list ap; va_start(ap, fmt);
1902 #ifdef FLEXML_yylineno
1903 used = sprintf(flexml_err_msg,
1904 "Invalid XML (XML input line %d, state %d): ",
1905 yylineno, YY_START);
1907 used = sprintf(flexml_err_msg,
1908 "Invalid XML (state %d): ",
1911 chars_left = flexml_max_err_msg_size - used - 1;
1912 vsnprintf(flexml_err_msg + used, chars_left, fmt, ap);
1915 #ifndef FLEXML_quiet_parser
1916 /* print directly to sdterr */
1917 fprintf(stderr, "%s\n", flexml_err_msg);
1918 flexml_err_msg[0] = '\0';