1 /* Validating XML processor for src/surf/simgrid.dtd.
2 * Generated 2010/10/11 11:35:07.
4 * This program was generated with the FleXML XML processor generator.
5 * FleXML is Copyright (C) 1999-2005 Kristoffer Rose. All rights reserved.
6 * FleXML is Copyright (C) 2003-2006 Martin Quinson. All rights reserved.
7 * (Id: flexml.pl,v 1.62 2007/10/11 10:00:14 mquinson Exp).
9 * There are two, intertwined parts to this program, part A and part B.
14 * Some parts, here collectively called "Part A", are found in the
15 * FleXML package. They are Copyright (C) 1999-2005 Kristoffer Rose
16 * and Copyright (C) 2003-2006 Martin Quinson. All rights reserved.
18 * You can redistribute, use, perform, display and/or modify "Part A"
19 * provided the following two conditions hold:
21 * 1. The program is distributed WITHOUT ANY WARRANTY from the author of
22 * FleXML; without even the implied warranty of MERCHANTABILITY or
23 * FITNESS FOR A PARTICULAR PURPOSE.
25 * 2. The program distribution conditions do not in any way affect the
26 * distribution conditions of the FleXML system used to generate this
27 * file or any version of FleXML derived from that system.
29 * Notice that these are explicit rights granted to you for files
30 * generated by the FleXML system. For your rights in connection with
31 * the FleXML system itself please consult the GNU General Public License.
36 * The other parts, here collectively called "Part B", and which came
37 * from the DTD used by FleXML to generate this program, can be
38 * distributed (or not, as the case may be) under the terms of whoever
39 * wrote them, provided these terms respect and obey the two conditions
40 * above under the heading "Part A".
42 * The author of and contributors to FleXML specifically disclaim
43 * any copyright interest in "Part B", unless "Part B" was written
44 * by the author of or contributors to FleXML.
50 /* Version strings. */
51 const char rcs_surfxml_flexml_skeleton[] =
52 "$" "Id: skel,v 1.40 2007/10/11 09:57:24 mquinson Exp $";
53 const char rcs_surfxml_flexml[] =
54 "$" "Id: flexml.pl,v 1.62 2007/10/11 10:00:14 mquinson Exp $";
57 #include <stdlib.h> /* for realloc() -- needed here when using flex 2.5.4 */
64 #if defined(_XBT_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__TOS_WIN__)
65 # ifndef __STRICT_ANSI__
73 #ifndef FLEXML_INDEXSTACKSIZE
74 #define FLEXML_INDEXSTACKSIZE 1000
77 /* Generated definitions. */
78 #define FLEXML_yylineno
79 #ifndef FLEXML_BUFFERSTACKSIZE
80 #define FLEXML_BUFFERSTACKSIZE 1000000
82 #define FLEXML_NEED_BUFFERLIT
84 /* XML processor api. */
85 /* FleXML-provided data. */
86 int surfxml_pcdata_ix;
87 extern char *surfxml_bufferstack;
88 #define surfxml_pcdata (surfxml_bufferstack + surfxml_pcdata_ix)
89 AT_surfxml_random_generator AX_surfxml_random_generator;
90 #define A_surfxml_random_generator AX_surfxml_random_generator
91 AT_surfxml_ASroute_gw_dst AX_surfxml_ASroute_gw_dst;
92 #define A_surfxml_ASroute_gw_dst (surfxml_bufferstack + AX_surfxml_ASroute_gw_dst)
93 AT_surfxml_link_id AX_surfxml_link_id;
94 #define A_surfxml_link_id (surfxml_bufferstack + AX_surfxml_link_id)
95 AT_surfxml_trace_connect_element AX_surfxml_trace_connect_element;
96 #define A_surfxml_trace_connect_element (surfxml_bufferstack + AX_surfxml_trace_connect_element)
97 AT_surfxml_prop_id AX_surfxml_prop_id;
98 #define A_surfxml_prop_id (surfxml_bufferstack + AX_surfxml_prop_id)
99 AT_surfxml_host_id AX_surfxml_host_id;
100 #define A_surfxml_host_id (surfxml_bufferstack + AX_surfxml_host_id)
101 AT_surfxml_link_latency_file AX_surfxml_link_latency_file;
102 #define A_surfxml_link_latency_file (surfxml_bufferstack + AX_surfxml_link_latency_file)
103 AT_surfxml_process_host AX_surfxml_process_host;
104 #define A_surfxml_process_host (surfxml_bufferstack + AX_surfxml_process_host)
105 AT_surfxml_cluster_lat AX_surfxml_cluster_lat;
106 #define A_surfxml_cluster_lat (surfxml_bufferstack + AX_surfxml_cluster_lat)
107 AT_surfxml_host_state AX_surfxml_host_state;
108 #define A_surfxml_host_state AX_surfxml_host_state
109 AT_surfxml_host_availability_file AX_surfxml_host_availability_file;
110 #define A_surfxml_host_availability_file (surfxml_bufferstack + AX_surfxml_host_availability_file)
111 AT_surfxml_trace_periodicity AX_surfxml_trace_periodicity;
112 #define A_surfxml_trace_periodicity (surfxml_bufferstack + AX_surfxml_trace_periodicity)
113 AT_surfxml_prop_value AX_surfxml_prop_value;
114 #define A_surfxml_prop_value (surfxml_bufferstack + AX_surfxml_prop_value)
115 AT_surfxml_AS_id AX_surfxml_AS_id;
116 #define A_surfxml_AS_id (surfxml_bufferstack + AX_surfxml_AS_id)
117 AT_surfxml_ASroute_dst AX_surfxml_ASroute_dst;
118 #define A_surfxml_ASroute_dst (surfxml_bufferstack + AX_surfxml_ASroute_dst)
119 AT_surfxml_host_power AX_surfxml_host_power;
120 #define A_surfxml_host_power (surfxml_bufferstack + AX_surfxml_host_power)
121 AT_surfxml_link_state_file AX_surfxml_link_state_file;
122 #define A_surfxml_link_state_file (surfxml_bufferstack + AX_surfxml_link_state_file)
123 AT_surfxml_router_id AX_surfxml_router_id;
124 #define A_surfxml_router_id (surfxml_bufferstack + AX_surfxml_router_id)
125 AT_surfxml_trace_connect_trace AX_surfxml_trace_connect_trace;
126 #define A_surfxml_trace_connect_trace (surfxml_bufferstack + AX_surfxml_trace_connect_trace)
127 AT_surfxml_process_start_time AX_surfxml_process_start_time;
128 #define A_surfxml_process_start_time (surfxml_bufferstack + AX_surfxml_process_start_time)
129 AT_surfxml_cluster_suffix AX_surfxml_cluster_suffix;
130 #define A_surfxml_cluster_suffix (surfxml_bufferstack + AX_surfxml_cluster_suffix)
131 AT_surfxml_cluster_power AX_surfxml_cluster_power;
132 #define A_surfxml_cluster_power (surfxml_bufferstack + AX_surfxml_cluster_power)
133 AT_surfxml_process_function AX_surfxml_process_function;
134 #define A_surfxml_process_function (surfxml_bufferstack + AX_surfxml_process_function)
135 AT_surfxml_ASroute_src AX_surfxml_ASroute_src;
136 #define A_surfxml_ASroute_src (surfxml_bufferstack + AX_surfxml_ASroute_src)
137 AT_surfxml_cluster_prefix AX_surfxml_cluster_prefix;
138 #define A_surfxml_cluster_prefix (surfxml_bufferstack + AX_surfxml_cluster_prefix)
139 AT_surfxml_trace_file AX_surfxml_trace_file;
140 #define A_surfxml_trace_file (surfxml_bufferstack + AX_surfxml_trace_file)
141 AT_surfxml_link_sharing_policy AX_surfxml_link_sharing_policy;
142 #define A_surfxml_link_sharing_policy AX_surfxml_link_sharing_policy
143 AT_surfxml_random_min AX_surfxml_random_min;
144 #define A_surfxml_random_min (surfxml_bufferstack + AX_surfxml_random_min)
145 AT_surfxml_bypassRoute_dst AX_surfxml_bypassRoute_dst;
146 #define A_surfxml_bypassRoute_dst (surfxml_bufferstack + AX_surfxml_bypassRoute_dst)
147 AT_surfxml_link_ctn_id AX_surfxml_link_ctn_id;
148 #define A_surfxml_link_ctn_id (surfxml_bufferstack + AX_surfxml_link_ctn_id)
149 AT_surfxml_process_kill_time AX_surfxml_process_kill_time;
150 #define A_surfxml_process_kill_time (surfxml_bufferstack + AX_surfxml_process_kill_time)
151 AT_surfxml_host_availability AX_surfxml_host_availability;
152 #define A_surfxml_host_availability (surfxml_bufferstack + AX_surfxml_host_availability)
153 AT_surfxml_cluster_bb_bw AX_surfxml_cluster_bb_bw;
154 #define A_surfxml_cluster_bb_bw (surfxml_bufferstack + AX_surfxml_cluster_bb_bw)
155 AT_surfxml_argument_value AX_surfxml_argument_value;
156 #define A_surfxml_argument_value (surfxml_bufferstack + AX_surfxml_argument_value)
157 AT_surfxml_bypassRoute_src AX_surfxml_bypassRoute_src;
158 #define A_surfxml_bypassRoute_src (surfxml_bufferstack + AX_surfxml_bypassRoute_src)
159 AT_surfxml_link_state AX_surfxml_link_state;
160 #define A_surfxml_link_state AX_surfxml_link_state
161 AT_surfxml_ASroute_gw_src AX_surfxml_ASroute_gw_src;
162 #define A_surfxml_ASroute_gw_src (surfxml_bufferstack + AX_surfxml_ASroute_gw_src)
163 AT_surfxml_route_src AX_surfxml_route_src;
164 #define A_surfxml_route_src (surfxml_bufferstack + AX_surfxml_route_src)
165 AT_surfxml_AS_routing AX_surfxml_AS_routing;
166 #define A_surfxml_AS_routing (surfxml_bufferstack + AX_surfxml_AS_routing)
167 AT_surfxml_link_bandwidth AX_surfxml_link_bandwidth;
168 #define A_surfxml_link_bandwidth (surfxml_bufferstack + AX_surfxml_link_bandwidth)
169 AT_surfxml_bypassRoute_gw_dst AX_surfxml_bypassRoute_gw_dst;
170 #define A_surfxml_bypassRoute_gw_dst (surfxml_bufferstack + AX_surfxml_bypassRoute_gw_dst)
171 AT_surfxml_cluster_id AX_surfxml_cluster_id;
172 #define A_surfxml_cluster_id (surfxml_bufferstack + AX_surfxml_cluster_id)
173 AT_surfxml_random_mean AX_surfxml_random_mean;
174 #define A_surfxml_random_mean (surfxml_bufferstack + AX_surfxml_random_mean)
175 AT_surfxml_trace_id AX_surfxml_trace_id;
176 #define A_surfxml_trace_id (surfxml_bufferstack + AX_surfxml_trace_id)
177 AT_surfxml_cluster_bb_lat AX_surfxml_cluster_bb_lat;
178 #define A_surfxml_cluster_bb_lat (surfxml_bufferstack + AX_surfxml_cluster_bb_lat)
179 AT_surfxml_link_latency AX_surfxml_link_latency;
180 #define A_surfxml_link_latency (surfxml_bufferstack + AX_surfxml_link_latency)
181 AT_surfxml_cluster_radical AX_surfxml_cluster_radical;
182 #define A_surfxml_cluster_radical (surfxml_bufferstack + AX_surfxml_cluster_radical)
183 AT_surfxml_config_id AX_surfxml_config_id;
184 #define A_surfxml_config_id (surfxml_bufferstack + AX_surfxml_config_id)
185 AT_surfxml_trace_connect_kind AX_surfxml_trace_connect_kind;
186 #define A_surfxml_trace_connect_kind AX_surfxml_trace_connect_kind
187 AT_surfxml_bypassRoute_gw_src AX_surfxml_bypassRoute_gw_src;
188 #define A_surfxml_bypassRoute_gw_src (surfxml_bufferstack + AX_surfxml_bypassRoute_gw_src)
189 AT_surfxml_random_std_deviation AX_surfxml_random_std_deviation;
190 #define A_surfxml_random_std_deviation (surfxml_bufferstack + AX_surfxml_random_std_deviation)
191 AT_surfxml_link_bandwidth_file AX_surfxml_link_bandwidth_file;
192 #define A_surfxml_link_bandwidth_file (surfxml_bufferstack + AX_surfxml_link_bandwidth_file)
193 AT_surfxml_host_vivaldi AX_surfxml_host_vivaldi;
194 #define A_surfxml_host_vivaldi (surfxml_bufferstack + AX_surfxml_host_vivaldi)
195 AT_surfxml_host_state_file AX_surfxml_host_state_file;
196 #define A_surfxml_host_state_file (surfxml_bufferstack + AX_surfxml_host_state_file)
197 AT_surfxml_random_id AX_surfxml_random_id;
198 #define A_surfxml_random_id (surfxml_bufferstack + AX_surfxml_random_id)
199 AT_surfxml_route_dst AX_surfxml_route_dst;
200 #define A_surfxml_route_dst (surfxml_bufferstack + AX_surfxml_route_dst)
201 AT_surfxml_cluster_bw AX_surfxml_cluster_bw;
202 #define A_surfxml_cluster_bw (surfxml_bufferstack + AX_surfxml_cluster_bw)
203 AT_surfxml_random_max AX_surfxml_random_max;
204 #define A_surfxml_random_max (surfxml_bufferstack + AX_surfxml_random_max)
205 AT_surfxml_platform_version AX_surfxml_platform_version;
206 #define A_surfxml_platform_version (surfxml_bufferstack + AX_surfxml_platform_version)
210 # define ENTER(state) debug_enter(state,#state)
211 # define LEAVE debug_leave()
212 # define SET(state) debug_set(state,#state)
213 static void debug_enter(int, const char*);
214 static void debug_leave(void);
215 static void debug_set(int, const char*);
217 # define ENTER(state) (yy_push_state(state))
218 # define LEAVE (yy_pop_state())
219 # define SET(state) BEGIN(state)
222 /* Generic actions. */
223 #define SKIP /*skip*/
224 #define SUCCEED CLEANUP; return 0
226 #define FAIL return fail
227 static int fail(const char*, ...);
229 enum {flexml_max_err_msg_size = 512};
230 static char flexml_err_msg[flexml_max_err_msg_size];
231 const char * surfxml_parse_err_msg()
233 return flexml_err_msg;
235 static void reset_surfxml_parse_err_msg()
237 flexml_err_msg[0] = '\0';
241 static void cleanup(void);
242 #define CLEANUP cleanup()
244 /* Text buffer stack handling. */
245 char *surfxml_bufferstack = NULL;
246 static int blimit = FLEXML_BUFFERSTACKSIZE;
247 static int bnext = 1;
249 static int *indexstack = NULL;
250 static int ilimit = FLEXML_INDEXSTACKSIZE;
251 static int inext = 1;
253 #define BUFFERSET(P) (P = bnext)
254 #define BUFFERPUTC(C) (ck_blimit(), surfxml_bufferstack[bnext++] = (C))
255 #define BUFFERDONE (BUFFERPUTC('\0'))
257 #define BUFFERLITERAL(C, P) surfxml_bufferliteral(C, &(P), yytext)
259 /* after this is called, there are at least 2 slots left in the stack */
260 static int ck_blimit()
262 if (bnext >= blimit) {
263 blimit += FLEXML_BUFFERSTACKSIZE + 2;
265 char *temp = (char *) realloc(surfxml_bufferstack, blimit);
267 surfxml_bufferstack = temp;
273 /* after this is called, there are at least 2 slots left in the stack */
274 static int ck_ilimit()
276 if (inext >= ilimit) {
277 ilimit += FLEXML_INDEXSTACKSIZE + 2;
279 int *temp = (int *) realloc(indexstack, ilimit);
287 #ifdef FLEXML_NEED_BUFFERLIT
288 static void surfxml_bufferliteral(char c, int* pp, const char* text)
290 const char *s = (c ? strchr(text,c) : text-1), *e = strrchr(text,c);
291 assert(s <= e); BUFFERSET(*pp);
293 if (isspace(*s) && c) { BUFFERPUTC(' '); while (isspace(*s)) ++s; }
300 static void pushbuffer(int p)
303 indexstack[inext++] = p;
304 indexstack[inext++] = bnext;
307 static int popbuffer(void)
310 bnext = indexstack[--inext];
311 return indexstack[--inext];
314 /* General internal entities are `unput' back onto the input stream... */
315 #define ENTITYTEXT(T) \
316 { char *s = (T), *e = s+strlen(s);\
317 while (--e >= s) { unput(*e); }}
322 /* Flex standard options. */
324 %option noyy_top_state
330 /* Flex user-requested options. */
334 /* XML character classes (currently restricted to ASCII). */
336 /* "Common syntactic structures." */
340 /* "Names and Tokens." */
341 NameChar [A-Za-z0-9.:_-]
342 Name [A-Za-z_:]{NameChar}*
343 Names {Name}({S}{Name})*
344 Nmtoken ({NameChar})+
345 Nmtokens {Nmtoken}({S}{Nmtoken})*
348 VersionNum [a-zA-Z0-9_.:-]+
350 Literal \'[^'']*\'|\"[^""]*\"
352 /* Parser states (flex `exclusive start conditions'):
354 * PROLOG the XML prolog of the document before <?xml...>
355 * DOCTYPE the XML prolog of the document after <?xml...>
356 * EPILOG after the root element
357 * INCOMMENT inside an XML comment <!--....-->
358 * INPI inside an XML PI <?...?>
359 * VALUE1 inside a '...'-delimited literal
360 * VALUE2 inside a "..."-delimited literal
361 * CDATA inside a <![CDATA[...] ]> section.
362 * ROOT_<tag> expect root element <tag>
363 * AL_<tag> inside the attribute list for <tag>
364 * IN_<tag> inside a <tag> with element contents (ready for end tag)
365 * IMPOSSIBLE dummy to permit disabling rules; must be last
367 %x PROLOG DOCTYPE EPILOG INCOMMENT INPI VALUE1 VALUE2 CDATA
368 %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 E_surfxml_platform
369 %x AL_surfxml_trace IN_trace
370 %x AL_surfxml_random S_surfxml_random S_surfxml_random_1 S_surfxml_random_2 E_surfxml_random
371 %x AL_surfxml_trace_connect E_surfxml_trace_connect
372 %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
373 %x AL_surfxml_host S_surfxml_host S_surfxml_host_1 S_surfxml_host_2 E_surfxml_host
374 %x AL_surfxml_cluster E_surfxml_cluster
375 %x AL_surfxml_router E_surfxml_router
376 %x AL_surfxml_link S_surfxml_link S_surfxml_link_1 S_surfxml_link_2 E_surfxml_link
377 %x AL_surfxml_route S_surfxml_route S_surfxml_route_1 S_surfxml_route_2 E_surfxml_route
378 %x AL_surfxml_ASroute S_surfxml_ASroute S_surfxml_ASroute_1 S_surfxml_ASroute_2 E_surfxml_ASroute
379 %x AL_surfxml_link_ctn E_surfxml_link_ctn
380 %x AL_surfxml_bypassRoute S_surfxml_bypassRoute S_surfxml_bypassRoute_1 S_surfxml_bypassRoute_2 E_surfxml_bypassRoute
381 %x AL_surfxml_process S_surfxml_process S_surfxml_process_1 S_surfxml_process_2 E_surfxml_process
382 %x AL_surfxml_argument E_surfxml_argument
383 %x AL_surfxml_config S_surfxml_config S_surfxml_config_1 S_surfxml_config_2 E_surfxml_config
384 %x AL_surfxml_prop E_surfxml_prop
389 const char* *surfxml_statenames=NULL;
394 /* Bypass Flex's default INITIAL state and begin by parsing the XML prolog. */
396 reset_surfxml_parse_err_msg();
397 surfxml_bufferstack = (char *) malloc(FLEXML_BUFFERSTACKSIZE);
398 assert(surfxml_bufferstack);
402 for (i = 0; i < blimit; i++) {
403 surfxml_bufferstack[i] = '\377';
407 surfxml_bufferstack[0] = '\0';
408 indexstack = (int *) malloc(FLEXML_INDEXSTACKSIZE * sizeof(int));
414 surfxml_bufferliteral('\0', &bnext, "0.0");
415 surfxml_bufferliteral('\0', &bnext, "1.0");
416 surfxml_bufferliteral('\0', &bnext, "0 0 0");
417 surfxml_bufferliteral('\0', &bnext, "0.0");
418 surfxml_bufferliteral('\0', &bnext, "-1.0");
419 surfxml_bufferliteral('\0', &bnext, "-1.0");
420 if(!surfxml_statenames) {surfxml_statenames= (const char **)calloc(IMPOSSIBLE,sizeof(char*));
421 surfxml_statenames[PROLOG] = NULL;
422 surfxml_statenames[DOCTYPE] = NULL;
423 surfxml_statenames[EPILOG] = NULL;
424 surfxml_statenames[INCOMMENT] = NULL;
425 surfxml_statenames[INPI] = NULL;
426 surfxml_statenames[VALUE1] = NULL;
427 surfxml_statenames[VALUE2] = NULL;
428 surfxml_statenames[CDATA] = NULL;
429 surfxml_statenames[ROOT_surfxml_platform] = NULL;
430 surfxml_statenames[AL_surfxml_platform] = NULL;
431 surfxml_statenames[S_surfxml_platform] = "platform";
432 surfxml_statenames[S_surfxml_platform_1] = "platform";
433 surfxml_statenames[S_surfxml_platform_2] = "platform";
434 surfxml_statenames[S_surfxml_platform_3] = "platform";
435 surfxml_statenames[S_surfxml_platform_4] = "platform";
436 surfxml_statenames[S_surfxml_platform_5] = "platform";
437 surfxml_statenames[S_surfxml_platform_6] = "platform";
438 surfxml_statenames[E_surfxml_platform] = "platform";
439 surfxml_statenames[AL_surfxml_trace] = NULL;
440 surfxml_statenames[IN_trace] = "trace";
441 surfxml_statenames[AL_surfxml_random] = NULL;
442 surfxml_statenames[S_surfxml_random] = "random";
443 surfxml_statenames[S_surfxml_random_1] = "random";
444 surfxml_statenames[S_surfxml_random_2] = "random";
445 surfxml_statenames[E_surfxml_random] = "random";
446 surfxml_statenames[AL_surfxml_trace_connect] = NULL;
447 surfxml_statenames[E_surfxml_trace_connect] = "trace_connect";
448 surfxml_statenames[AL_surfxml_AS] = NULL;
449 surfxml_statenames[S_surfxml_AS] = "AS";
450 surfxml_statenames[S_surfxml_AS_1] = "AS";
451 surfxml_statenames[S_surfxml_AS_2] = "AS";
452 surfxml_statenames[S_surfxml_AS_3] = "AS";
453 surfxml_statenames[S_surfxml_AS_4] = "AS";
454 surfxml_statenames[S_surfxml_AS_5] = "AS";
455 surfxml_statenames[S_surfxml_AS_6] = "AS";
456 surfxml_statenames[S_surfxml_AS_7] = "AS";
457 surfxml_statenames[S_surfxml_AS_8] = "AS";
458 surfxml_statenames[S_surfxml_AS_9] = "AS";
459 surfxml_statenames[S_surfxml_AS_10] = "AS";
460 surfxml_statenames[S_surfxml_AS_11] = "AS";
461 surfxml_statenames[S_surfxml_AS_12] = "AS";
462 surfxml_statenames[S_surfxml_AS_13] = "AS";
463 surfxml_statenames[E_surfxml_AS] = "AS";
464 surfxml_statenames[AL_surfxml_host] = NULL;
465 surfxml_statenames[S_surfxml_host] = "host";
466 surfxml_statenames[S_surfxml_host_1] = "host";
467 surfxml_statenames[S_surfxml_host_2] = "host";
468 surfxml_statenames[E_surfxml_host] = "host";
469 surfxml_statenames[AL_surfxml_cluster] = NULL;
470 surfxml_statenames[E_surfxml_cluster] = "cluster";
471 surfxml_statenames[AL_surfxml_router] = NULL;
472 surfxml_statenames[E_surfxml_router] = "router";
473 surfxml_statenames[AL_surfxml_link] = NULL;
474 surfxml_statenames[S_surfxml_link] = "link";
475 surfxml_statenames[S_surfxml_link_1] = "link";
476 surfxml_statenames[S_surfxml_link_2] = "link";
477 surfxml_statenames[E_surfxml_link] = "link";
478 surfxml_statenames[AL_surfxml_route] = NULL;
479 surfxml_statenames[S_surfxml_route] = "route";
480 surfxml_statenames[S_surfxml_route_1] = "route";
481 surfxml_statenames[S_surfxml_route_2] = "route";
482 surfxml_statenames[E_surfxml_route] = "route";
483 surfxml_statenames[AL_surfxml_ASroute] = NULL;
484 surfxml_statenames[S_surfxml_ASroute] = "ASroute";
485 surfxml_statenames[S_surfxml_ASroute_1] = "ASroute";
486 surfxml_statenames[S_surfxml_ASroute_2] = "ASroute";
487 surfxml_statenames[E_surfxml_ASroute] = "ASroute";
488 surfxml_statenames[AL_surfxml_link_ctn] = NULL;
489 surfxml_statenames[E_surfxml_link_ctn] = "link_ctn";
490 surfxml_statenames[AL_surfxml_bypassRoute] = NULL;
491 surfxml_statenames[S_surfxml_bypassRoute] = "bypassRoute";
492 surfxml_statenames[S_surfxml_bypassRoute_1] = "bypassRoute";
493 surfxml_statenames[S_surfxml_bypassRoute_2] = "bypassRoute";
494 surfxml_statenames[E_surfxml_bypassRoute] = "bypassRoute";
495 surfxml_statenames[AL_surfxml_process] = NULL;
496 surfxml_statenames[S_surfxml_process] = "process";
497 surfxml_statenames[S_surfxml_process_1] = "process";
498 surfxml_statenames[S_surfxml_process_2] = "process";
499 surfxml_statenames[E_surfxml_process] = "process";
500 surfxml_statenames[AL_surfxml_argument] = NULL;
501 surfxml_statenames[E_surfxml_argument] = "argument";
502 surfxml_statenames[AL_surfxml_config] = NULL;
503 surfxml_statenames[S_surfxml_config] = "config";
504 surfxml_statenames[S_surfxml_config_1] = "config";
505 surfxml_statenames[S_surfxml_config_2] = "config";
506 surfxml_statenames[E_surfxml_config] = "config";
507 surfxml_statenames[AL_surfxml_prop] = NULL;
508 surfxml_statenames[E_surfxml_prop] = "prop";
511 /* COMMENTS and PIs: handled uniformly for efficiency. */
513 <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,E_surfxml_platform,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_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>{
514 "<!--" ENTER(INCOMMENT);
522 <<EOF>> FAIL("EOF in comment.");
528 <<EOF>> FAIL("EOF in PI (processing instruction).");
531 /* SPACES: skipped uniformly */
533 <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,E_surfxml_platform,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_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;
535 /* PROLOG: determine root element and process it. */
538 "<?xml"({S}version{Eq}(\'{VersionNum}\'|\"{VersionNum}\"))?({S}encoding{Eq}(\'[^']*\'|\"[^"]*\"))?"?>" SET(DOCTYPE);
539 "<?xml"[^>]*">" FAIL("Bad declaration %s.",yytext);
543 "<!DOCTYPE"{S}"platform"{S}SYSTEM{S}("'simgrid.dtd'"|"\"simgrid.dtd\""){s}">" SET(ROOT_surfxml_platform);
544 "<!"[^>-][^>]*">" FAIL("Bad declaration %s.",yytext);
545 . FAIL("Unexpected character `%c' in prolog.", yytext[0]);
546 <<EOF>> FAIL("EOF in prolog.");
549 /* RULES DERIVED FROM DTD. */
551 /* <!-- Small DTD for SURF based tools. --> */
553 <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_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,E_surfxml_bypassRoute>"<platform"{s} FAIL("Starting tag <platform> is not allowed here.");
555 <ROOT_surfxml_platform>"<platform"{s} {
556 AX_surfxml_platform_version = 1;
557 ENTER(AL_surfxml_platform); pushbuffer(0);
560 <AL_surfxml_platform>{
561 "version"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_platform_version);
562 "version"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_platform_version);
565 LEAVE; STag_surfxml_platform();surfxml_pcdata_ix = 0; ENTER(S_surfxml_platform);
568 LEAVE; STag_surfxml_platform(); surfxml_pcdata_ix = 0; ETag_surfxml_platform(); popbuffer(); /* attribute */
570 case ROOT_surfxml_platform: SET(EPILOG); break;
573 . FAIL("Unexpected character `%c' in attribute list of platform element.", yytext[0]);
574 {Name} FAIL("Bad attribute `%s' in `platform' element start tag.",yytext);
575 <<EOF>> FAIL("EOF in attribute list of `platform' element.");
578 <S_surfxml_platform_2,S_surfxml_platform_1,S_surfxml_platform,S_surfxml_platform_4,S_surfxml_platform_6,E_surfxml_platform>{
581 ETag_surfxml_platform();
582 popbuffer(); /* attribute */
584 case ROOT_surfxml_platform: SET(EPILOG); break;
587 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</platform>' expected.",yytext);
588 . FAIL("Unexpected character `%c': `</platform>' expected.",yytext[0]);
589 <<EOF>> FAIL("Premature EOF: `</platform>' expected.");
592 <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_platform_6,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_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_config_1,S_surfxml_route,E_surfxml_bypassRoute>"<trace"{s} FAIL("Starting tag <trace> is not allowed here.");
594 <S_surfxml_AS_12,S_surfxml_AS_1,S_surfxml_AS_9,S_surfxml_AS_11,S_surfxml_AS_2,S_surfxml_AS_5,S_surfxml_AS_10,S_surfxml_AS_13,S_surfxml_AS,S_surfxml_AS_8,S_surfxml_platform_4,S_surfxml_AS_4,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} {
595 AX_surfxml_trace_id = 0;
596 AX_surfxml_trace_file = 0;
597 AX_surfxml_trace_periodicity = 0;
598 ENTER(AL_surfxml_trace); pushbuffer(0);
602 "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_id);
603 "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_id);
605 "file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_file);
606 "file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_file);
608 "periodicity"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_periodicity);
609 "periodicity"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_periodicity);
612 if (!AX_surfxml_trace_id) FAIL("Required attribute `id' not set for `trace' element.");
613 if (!AX_surfxml_trace_periodicity) FAIL("Required attribute `periodicity' not set for `trace' element.");
614 LEAVE; STag_surfxml_trace();pushbuffer(surfxml_pcdata_ix); BUFFERSET(surfxml_pcdata_ix);; ENTER(IN_trace);
617 if (!AX_surfxml_trace_id) FAIL("Required attribute `id' not set for `trace' element.");
618 if (!AX_surfxml_trace_periodicity) FAIL("Required attribute `periodicity' not set for `trace' element.");
619 LEAVE; STag_surfxml_trace(); surfxml_pcdata_ix = 0; ETag_surfxml_trace(); popbuffer(); /* attribute */
621 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;
622 case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
623 case S_surfxml_AS_2: SET(S_surfxml_AS_3); break;
624 case S_surfxml_AS_1: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
625 case S_surfxml_platform_4: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_4); break;
626 case S_surfxml_AS_12: case S_surfxml_AS_9: case S_surfxml_AS_13: SET(S_surfxml_AS_13); break;
629 . FAIL("Unexpected character `%c' in attribute list of trace element.", yytext[0]);
630 {Name} FAIL("Bad attribute `%s' in `trace' element start tag.",yytext);
631 <<EOF>> FAIL("EOF in attribute list of `trace' element.");
638 ETag_surfxml_trace();
639 surfxml_pcdata_ix = popbuffer();
640 popbuffer(); /* attribute */
642 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;
643 case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
644 case S_surfxml_AS_2: SET(S_surfxml_AS_3); break;
645 case S_surfxml_AS_1: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
646 case S_surfxml_platform_4: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_4); break;
647 case S_surfxml_AS_12: case S_surfxml_AS_9: case S_surfxml_AS_13: SET(S_surfxml_AS_13); break;
650 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</trace>' expected.",yytext);
651 <<EOF>> FAIL("Premature EOF: `</trace>' expected.");
654 <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_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_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_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,E_surfxml_bypassRoute>"<random"{s} FAIL("Starting tag <random> is not allowed here.");
656 <S_surfxml_config>"<random"{s} {
657 AX_surfxml_random_id = 0;
658 AX_surfxml_random_min = 0;
659 AX_surfxml_random_max = 0;
660 AX_surfxml_random_mean = 0;
661 AX_surfxml_random_std_deviation = 0;
662 AX_surfxml_random_generator = A_surfxml_random_generator_DRAND48;
663 ENTER(AL_surfxml_random); pushbuffer(0);
667 "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_id);
668 "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_id);
670 "min"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_min);
671 "min"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_min);
673 "max"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_max);
674 "max"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_max);
676 "mean"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_mean);
677 "mean"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_mean);
679 "std_deviation"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_std_deviation);
680 "std_deviation"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_std_deviation);
682 "generator"{Eq}"'DRAND48'" |
683 "generator"{Eq}"\"DRAND48\"" A_surfxml_random_generator = A_surfxml_random_generator_DRAND48;
684 "generator"{Eq}"'RAND'" |
685 "generator"{Eq}"\"RAND\"" A_surfxml_random_generator = A_surfxml_random_generator_RAND;
688 if (!AX_surfxml_random_id) FAIL("Required attribute `id' not set for `random' element.");
689 if (!AX_surfxml_random_min) FAIL("Required attribute `min' not set for `random' element.");
690 if (!AX_surfxml_random_max) FAIL("Required attribute `max' not set for `random' element.");
691 if (!AX_surfxml_random_mean) FAIL("Required attribute `mean' not set for `random' element.");
692 if (!AX_surfxml_random_std_deviation) FAIL("Required attribute `std_deviation' not set for `random' element.");
693 LEAVE; STag_surfxml_random();surfxml_pcdata_ix = 0; ENTER(S_surfxml_random);
696 if (!AX_surfxml_random_id) FAIL("Required attribute `id' not set for `random' element.");
697 if (!AX_surfxml_random_min) FAIL("Required attribute `min' not set for `random' element.");
698 if (!AX_surfxml_random_max) FAIL("Required attribute `max' not set for `random' element.");
699 if (!AX_surfxml_random_mean) FAIL("Required attribute `mean' not set for `random' element.");
700 if (!AX_surfxml_random_std_deviation) FAIL("Required attribute `std_deviation' not set for `random' element.");
701 LEAVE; STag_surfxml_random(); surfxml_pcdata_ix = 0; ETag_surfxml_random(); popbuffer(); /* attribute */
703 case S_surfxml_config: SET(E_surfxml_config); break;
706 . FAIL("Unexpected character `%c' in attribute list of random element.", yytext[0]);
707 {Name} FAIL("Bad attribute `%s' in `random' element start tag.",yytext);
708 <<EOF>> FAIL("EOF in attribute list of `random' element.");
711 <S_surfxml_random_2,S_surfxml_random,E_surfxml_random>{
714 ETag_surfxml_random();
715 popbuffer(); /* attribute */
717 case S_surfxml_config: SET(E_surfxml_config); break;
720 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</random>' expected.",yytext);
721 . FAIL("Unexpected character `%c': `</random>' expected.",yytext[0]);
722 <<EOF>> FAIL("Premature EOF: `</random>' expected.");
725 <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_platform_6,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_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_config_1,S_surfxml_route,E_surfxml_bypassRoute>"<trace_connect"{s} FAIL("Starting tag <trace_connect> is not allowed here.");
727 <S_surfxml_AS_12,S_surfxml_AS_1,S_surfxml_AS_9,S_surfxml_AS_11,S_surfxml_AS_2,S_surfxml_AS_5,S_surfxml_AS_10,S_surfxml_AS_13,S_surfxml_AS,S_surfxml_AS_8,S_surfxml_platform_4,S_surfxml_AS_4,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} {
728 AX_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_HOST_AVAIL;
729 AX_surfxml_trace_connect_trace = 0;
730 AX_surfxml_trace_connect_element = 0;
731 ENTER(AL_surfxml_trace_connect); pushbuffer(0);
734 <AL_surfxml_trace_connect>{
735 "kind"{Eq}"'HOST_AVAIL'" |
736 "kind"{Eq}"\"HOST_AVAIL\"" A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_HOST_AVAIL;
737 "kind"{Eq}"'POWER'" |
738 "kind"{Eq}"\"POWER\"" A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_POWER;
739 "kind"{Eq}"'LINK_AVAIL'" |
740 "kind"{Eq}"\"LINK_AVAIL\"" A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_LINK_AVAIL;
741 "kind"{Eq}"'BANDWIDTH'" |
742 "kind"{Eq}"\"BANDWIDTH\"" A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_BANDWIDTH;
743 "kind"{Eq}"'LATENCY'" |
744 "kind"{Eq}"\"LATENCY\"" A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_LATENCY;
746 "trace"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_connect_trace);
747 "trace"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_connect_trace);
749 "element"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_connect_element);
750 "element"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_connect_element);
753 if (!AX_surfxml_trace_connect_trace) FAIL("Required attribute `trace' not set for `trace_connect' element.");
754 if (!AX_surfxml_trace_connect_element) FAIL("Required attribute `element' not set for `trace_connect' element.");
755 LEAVE; STag_surfxml_trace_connect();surfxml_pcdata_ix = 0; ENTER(E_surfxml_trace_connect);
758 if (!AX_surfxml_trace_connect_trace) FAIL("Required attribute `trace' not set for `trace_connect' element.");
759 if (!AX_surfxml_trace_connect_element) FAIL("Required attribute `element' not set for `trace_connect' element.");
760 LEAVE; STag_surfxml_trace_connect(); surfxml_pcdata_ix = 0; ETag_surfxml_trace_connect(); popbuffer(); /* attribute */
762 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;
763 case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
764 case S_surfxml_AS_2: SET(S_surfxml_AS_3); break;
765 case S_surfxml_AS_1: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
766 case S_surfxml_platform_4: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_4); break;
767 case S_surfxml_AS_12: case S_surfxml_AS_9: case S_surfxml_AS_13: SET(S_surfxml_AS_13); break;
770 . FAIL("Unexpected character `%c' in attribute list of trace_connect element.", yytext[0]);
771 {Name} FAIL("Bad attribute `%s' in `trace_connect' element start tag.",yytext);
772 <<EOF>> FAIL("EOF in attribute list of `trace_connect' element.");
775 <E_surfxml_trace_connect>{
776 "</trace_connect"{s}">" {
778 ETag_surfxml_trace_connect();
779 popbuffer(); /* attribute */
781 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;
782 case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
783 case S_surfxml_AS_2: SET(S_surfxml_AS_3); break;
784 case S_surfxml_AS_1: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
785 case S_surfxml_platform_4: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_4); break;
786 case S_surfxml_AS_12: case S_surfxml_AS_9: case S_surfxml_AS_13: SET(S_surfxml_AS_13); break;
789 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</trace_connect>' expected.",yytext);
790 . FAIL("Unexpected character `%c': `</trace_connect>' expected.",yytext[0]);
791 <<EOF>> FAIL("Premature EOF: `</trace_connect>' expected.");
794 <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_platform_6,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_platform_5,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,E_surfxml_bypassRoute>"<AS"{s} FAIL("Starting tag <AS> is not allowed here.");
796 <S_surfxml_AS_2,S_surfxml_AS,S_surfxml_platform_4,S_surfxml_platform_1,S_surfxml_platform,S_surfxml_AS_3,S_surfxml_platform_3>"<AS"{s} {
797 AX_surfxml_AS_id = 0;
798 AX_surfxml_AS_routing = 0;
799 ENTER(AL_surfxml_AS); pushbuffer(0);
803 "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_AS_id);
804 "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_AS_id);
806 "routing"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_AS_routing);
807 "routing"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_AS_routing);
810 if (!AX_surfxml_AS_id) FAIL("Required attribute `id' not set for `AS' element.");
811 if (!AX_surfxml_AS_routing) FAIL("Required attribute `routing' not set for `AS' element.");
812 LEAVE; STag_surfxml_AS();surfxml_pcdata_ix = 0; ENTER(S_surfxml_AS);
815 if (!AX_surfxml_AS_id) FAIL("Required attribute `id' not set for `AS' element.");
816 if (!AX_surfxml_AS_routing) FAIL("Required attribute `routing' not set for `AS' element.");
817 LEAVE; STag_surfxml_AS(); surfxml_pcdata_ix = 0; ETag_surfxml_AS(); popbuffer(); /* attribute */
819 case S_surfxml_AS_2: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
820 case S_surfxml_platform_4: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_4); break;
823 . FAIL("Unexpected character `%c' in attribute list of AS element.", yytext[0]);
824 {Name} FAIL("Bad attribute `%s' in `AS' element start tag.",yytext);
825 <<EOF>> FAIL("EOF in attribute list of `AS' element.");
828 <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>{
832 popbuffer(); /* attribute */
834 case S_surfxml_AS_2: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
835 case S_surfxml_platform_4: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_4); break;
838 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</AS>' expected.",yytext);
839 . FAIL("Unexpected character `%c': `</AS>' expected.",yytext[0]);
840 <<EOF>> FAIL("Premature EOF: `</AS>' expected.");
843 <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_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,E_surfxml_bypassRoute>"<host"{s} FAIL("Starting tag <host> is not allowed here.");
845 <S_surfxml_AS_11,S_surfxml_AS_10,S_surfxml_AS>"<host"{s} {
846 AX_surfxml_host_id = 0;
847 AX_surfxml_host_power = 0;
848 AX_surfxml_host_availability = 5;
849 AX_surfxml_host_availability_file = 0;
850 AX_surfxml_host_state = A_surfxml_host_state_ON;
851 AX_surfxml_host_state_file = 0;
852 AX_surfxml_host_vivaldi = 9;
853 ENTER(AL_surfxml_host); pushbuffer(0);
857 "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_id);
858 "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_id);
860 "power"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_power);
861 "power"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_power);
863 "availability"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_availability);
864 "availability"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_availability);
866 "availability_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_availability_file);
867 "availability_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_availability_file);
870 "state"{Eq}"\"ON\"" A_surfxml_host_state = A_surfxml_host_state_ON;
872 "state"{Eq}"\"OFF\"" A_surfxml_host_state = A_surfxml_host_state_OFF;
874 "state_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_state_file);
875 "state_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_state_file);
877 "vivaldi"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_vivaldi);
878 "vivaldi"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_vivaldi);
881 if (!AX_surfxml_host_id) FAIL("Required attribute `id' not set for `host' element.");
882 if (!AX_surfxml_host_power) FAIL("Required attribute `power' not set for `host' element.");
883 LEAVE; STag_surfxml_host();surfxml_pcdata_ix = 0; ENTER(S_surfxml_host);
886 if (!AX_surfxml_host_id) FAIL("Required attribute `id' not set for `host' element.");
887 if (!AX_surfxml_host_power) FAIL("Required attribute `power' not set for `host' element.");
888 LEAVE; STag_surfxml_host(); surfxml_pcdata_ix = 0; ETag_surfxml_host(); popbuffer(); /* attribute */
890 case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
893 . FAIL("Unexpected character `%c' in attribute list of host element.", yytext[0]);
894 {Name} FAIL("Bad attribute `%s' in `host' element start tag.",yytext);
895 <<EOF>> FAIL("EOF in attribute list of `host' element.");
898 <S_surfxml_host,E_surfxml_host,S_surfxml_host_2>{
902 popbuffer(); /* attribute */
904 case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
907 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</host>' expected.",yytext);
908 . FAIL("Unexpected character `%c': `</host>' expected.",yytext[0]);
909 <<EOF>> FAIL("Premature EOF: `</host>' expected.");
912 <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_platform_6,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_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>"<cluster"{s} FAIL("Starting tag <cluster> is not allowed here.");
914 <S_surfxml_AS_2,S_surfxml_AS,S_surfxml_platform_4,S_surfxml_platform_1,S_surfxml_platform,S_surfxml_AS_3,S_surfxml_platform_3>"<cluster"{s} {
915 AX_surfxml_cluster_id = 0;
916 AX_surfxml_cluster_prefix = 0;
917 AX_surfxml_cluster_suffix = 0;
918 AX_surfxml_cluster_radical = 0;
919 AX_surfxml_cluster_power = 0;
920 AX_surfxml_cluster_bw = 0;
921 AX_surfxml_cluster_lat = 0;
922 AX_surfxml_cluster_bb_bw = 0;
923 AX_surfxml_cluster_bb_lat = 0;
924 ENTER(AL_surfxml_cluster); pushbuffer(0);
927 <AL_surfxml_cluster>{
928 "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_id);
929 "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_id);
931 "prefix"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_prefix);
932 "prefix"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_prefix);
934 "suffix"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_suffix);
935 "suffix"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_suffix);
937 "radical"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_radical);
938 "radical"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_radical);
940 "power"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_power);
941 "power"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_power);
943 "bw"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_bw);
944 "bw"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_bw);
946 "lat"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_lat);
947 "lat"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_lat);
949 "bb_bw"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_bb_bw);
950 "bb_bw"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_bb_bw);
952 "bb_lat"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_bb_lat);
953 "bb_lat"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_bb_lat);
956 if (!AX_surfxml_cluster_id) FAIL("Required attribute `id' not set for `cluster' element.");
957 if (!AX_surfxml_cluster_prefix) FAIL("Required attribute `prefix' not set for `cluster' element.");
958 if (!AX_surfxml_cluster_suffix) FAIL("Required attribute `suffix' not set for `cluster' element.");
959 if (!AX_surfxml_cluster_radical) FAIL("Required attribute `radical' not set for `cluster' element.");
960 if (!AX_surfxml_cluster_power) FAIL("Required attribute `power' not set for `cluster' element.");
961 if (!AX_surfxml_cluster_bw) FAIL("Required attribute `bw' not set for `cluster' element.");
962 if (!AX_surfxml_cluster_lat) FAIL("Required attribute `lat' not set for `cluster' element.");
963 if (!AX_surfxml_cluster_bb_bw) FAIL("Required attribute `bb_bw' not set for `cluster' element.");
964 if (!AX_surfxml_cluster_bb_lat) FAIL("Required attribute `bb_lat' not set for `cluster' element.");
965 LEAVE; STag_surfxml_cluster();surfxml_pcdata_ix = 0; ENTER(E_surfxml_cluster);
968 if (!AX_surfxml_cluster_id) FAIL("Required attribute `id' not set for `cluster' element.");
969 if (!AX_surfxml_cluster_prefix) FAIL("Required attribute `prefix' not set for `cluster' element.");
970 if (!AX_surfxml_cluster_suffix) FAIL("Required attribute `suffix' not set for `cluster' element.");
971 if (!AX_surfxml_cluster_radical) FAIL("Required attribute `radical' not set for `cluster' element.");
972 if (!AX_surfxml_cluster_power) FAIL("Required attribute `power' not set for `cluster' element.");
973 if (!AX_surfxml_cluster_bw) FAIL("Required attribute `bw' not set for `cluster' element.");
974 if (!AX_surfxml_cluster_lat) FAIL("Required attribute `lat' not set for `cluster' element.");
975 if (!AX_surfxml_cluster_bb_bw) FAIL("Required attribute `bb_bw' not set for `cluster' element.");
976 if (!AX_surfxml_cluster_bb_lat) FAIL("Required attribute `bb_lat' not set for `cluster' element.");
977 LEAVE; STag_surfxml_cluster(); surfxml_pcdata_ix = 0; ETag_surfxml_cluster(); popbuffer(); /* attribute */
979 case S_surfxml_AS_2: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
980 case S_surfxml_platform_4: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_4); break;
983 . FAIL("Unexpected character `%c' in attribute list of cluster element.", yytext[0]);
984 {Name} FAIL("Bad attribute `%s' in `cluster' element start tag.",yytext);
985 <<EOF>> FAIL("EOF in attribute list of `cluster' element.");
991 ETag_surfxml_cluster();
992 popbuffer(); /* attribute */
994 case S_surfxml_AS_2: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
995 case S_surfxml_platform_4: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_4); break;
998 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</cluster>' expected.",yytext);
999 . FAIL("Unexpected character `%c': `</cluster>' expected.",yytext[0]);
1000 <<EOF>> FAIL("Premature EOF: `</cluster>' expected.");
1003 <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_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,E_surfxml_bypassRoute>"<router"{s} FAIL("Starting tag <router> is not allowed here.");
1005 <S_surfxml_AS_11,S_surfxml_AS_10,S_surfxml_AS>"<router"{s} {
1006 AX_surfxml_router_id = 0;
1007 ENTER(AL_surfxml_router); pushbuffer(0);
1010 <AL_surfxml_router>{
1011 "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_router_id);
1012 "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_router_id);
1015 if (!AX_surfxml_router_id) FAIL("Required attribute `id' not set for `router' element.");
1016 LEAVE; STag_surfxml_router();surfxml_pcdata_ix = 0; ENTER(E_surfxml_router);
1019 if (!AX_surfxml_router_id) FAIL("Required attribute `id' not set for `router' element.");
1020 LEAVE; STag_surfxml_router(); surfxml_pcdata_ix = 0; ETag_surfxml_router(); popbuffer(); /* attribute */
1022 case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
1025 . FAIL("Unexpected character `%c' in attribute list of router element.", yytext[0]);
1026 {Name} FAIL("Bad attribute `%s' in `router' element start tag.",yytext);
1027 <<EOF>> FAIL("EOF in attribute list of `router' element.");
1033 ETag_surfxml_router();
1034 popbuffer(); /* attribute */
1036 case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
1039 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</router>' expected.",yytext);
1040 . FAIL("Unexpected character `%c': `</router>' expected.",yytext[0]);
1041 <<EOF>> FAIL("Premature EOF: `</router>' expected.");
1044 <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_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,E_surfxml_bypassRoute>"<link"{s} FAIL("Starting tag <link> is not allowed here.");
1046 <S_surfxml_AS_11,S_surfxml_AS_2,S_surfxml_AS_10,S_surfxml_AS,S_surfxml_AS_3>"<link"{s} {
1047 AX_surfxml_link_id = 0;
1048 AX_surfxml_link_bandwidth = 0;
1049 AX_surfxml_link_bandwidth_file = 0;
1050 AX_surfxml_link_latency = 15;
1051 AX_surfxml_link_latency_file = 0;
1052 AX_surfxml_link_state = A_surfxml_link_state_ON;
1053 AX_surfxml_link_state_file = 0;
1054 AX_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
1055 ENTER(AL_surfxml_link); pushbuffer(0);
1059 "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_id);
1060 "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_id);
1062 "bandwidth"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_bandwidth);
1063 "bandwidth"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_bandwidth);
1065 "bandwidth_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_bandwidth_file);
1066 "bandwidth_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_bandwidth_file);
1068 "latency"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_latency);
1069 "latency"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_latency);
1071 "latency_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_latency_file);
1072 "latency_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_latency_file);
1075 "state"{Eq}"\"ON\"" A_surfxml_link_state = A_surfxml_link_state_ON;
1076 "state"{Eq}"'OFF'" |
1077 "state"{Eq}"\"OFF\"" A_surfxml_link_state = A_surfxml_link_state_OFF;
1079 "state_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_state_file);
1080 "state_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_state_file);
1082 "sharing_policy"{Eq}"'SHARED'" |
1083 "sharing_policy"{Eq}"\"SHARED\"" A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
1084 "sharing_policy"{Eq}"'FATPIPE'" |
1085 "sharing_policy"{Eq}"\"FATPIPE\"" A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_FATPIPE;
1088 if (!AX_surfxml_link_id) FAIL("Required attribute `id' not set for `link' element.");
1089 if (!AX_surfxml_link_bandwidth) FAIL("Required attribute `bandwidth' not set for `link' element.");
1090 LEAVE; STag_surfxml_link();surfxml_pcdata_ix = 0; ENTER(S_surfxml_link);
1093 if (!AX_surfxml_link_id) FAIL("Required attribute `id' not set for `link' element.");
1094 if (!AX_surfxml_link_bandwidth) FAIL("Required attribute `bandwidth' not set for `link' element.");
1095 LEAVE; STag_surfxml_link(); surfxml_pcdata_ix = 0; ETag_surfxml_link(); popbuffer(); /* attribute */
1097 case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
1098 case S_surfxml_AS_2: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
1101 . FAIL("Unexpected character `%c' in attribute list of link element.", yytext[0]);
1102 {Name} FAIL("Bad attribute `%s' in `link' element start tag.",yytext);
1103 <<EOF>> FAIL("EOF in attribute list of `link' element.");
1106 <E_surfxml_link,S_surfxml_link_2,S_surfxml_link>{
1109 ETag_surfxml_link();
1110 popbuffer(); /* attribute */
1112 case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
1113 case S_surfxml_AS_2: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
1116 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</link>' expected.",yytext);
1117 . FAIL("Unexpected character `%c': `</link>' expected.",yytext[0]);
1118 <<EOF>> FAIL("Premature EOF: `</link>' expected.");
1121 <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_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,E_surfxml_bypassRoute>"<route"{s} FAIL("Starting tag <route> is not allowed here.");
1123 <S_surfxml_AS_12,S_surfxml_AS_9,S_surfxml_AS_11,S_surfxml_AS_13,S_surfxml_AS>"<route"{s} {
1124 AX_surfxml_route_src = 0;
1125 AX_surfxml_route_dst = 0;
1126 ENTER(AL_surfxml_route); pushbuffer(0);
1130 "src"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_route_src);
1131 "src"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_route_src);
1133 "dst"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_route_dst);
1134 "dst"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_route_dst);
1137 if (!AX_surfxml_route_src) FAIL("Required attribute `src' not set for `route' element.");
1138 if (!AX_surfxml_route_dst) FAIL("Required attribute `dst' not set for `route' element.");
1139 LEAVE; STag_surfxml_route();surfxml_pcdata_ix = 0; ENTER(S_surfxml_route);
1142 if (!AX_surfxml_route_src) FAIL("Required attribute `src' not set for `route' element.");
1143 if (!AX_surfxml_route_dst) FAIL("Required attribute `dst' not set for `route' element.");
1144 LEAVE; STag_surfxml_route(); surfxml_pcdata_ix = 0; ETag_surfxml_route(); popbuffer(); /* attribute */
1146 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;
1149 . FAIL("Unexpected character `%c' in attribute list of route element.", yytext[0]);
1150 {Name} FAIL("Bad attribute `%s' in `route' element start tag.",yytext);
1151 <<EOF>> FAIL("EOF in attribute list of `route' element.");
1154 <S_surfxml_route,S_surfxml_route_2,E_surfxml_route>{
1157 ETag_surfxml_route();
1158 popbuffer(); /* attribute */
1160 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;
1163 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</route>' expected.",yytext);
1164 . FAIL("Unexpected character `%c': `</route>' expected.",yytext[0]);
1165 <<EOF>> FAIL("Premature EOF: `</route>' expected.");
1168 <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_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,E_surfxml_bypassRoute>"<ASroute"{s} FAIL("Starting tag <ASroute> is not allowed here.");
1170 <S_surfxml_AS_1,S_surfxml_AS_5,S_surfxml_AS,S_surfxml_AS_6,S_surfxml_AS_3>"<ASroute"{s} {
1171 AX_surfxml_ASroute_src = 0;
1172 AX_surfxml_ASroute_dst = 0;
1173 AX_surfxml_ASroute_gw_src = 0;
1174 AX_surfxml_ASroute_gw_dst = 0;
1175 ENTER(AL_surfxml_ASroute); pushbuffer(0);
1178 <AL_surfxml_ASroute>{
1179 "src"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_src);
1180 "src"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_src);
1182 "dst"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_dst);
1183 "dst"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_dst);
1185 "gw_src"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_gw_src);
1186 "gw_src"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_gw_src);
1188 "gw_dst"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_gw_dst);
1189 "gw_dst"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_gw_dst);
1192 if (!AX_surfxml_ASroute_src) FAIL("Required attribute `src' not set for `ASroute' element.");
1193 if (!AX_surfxml_ASroute_dst) FAIL("Required attribute `dst' not set for `ASroute' element.");
1194 if (!AX_surfxml_ASroute_gw_src) FAIL("Required attribute `gw_src' not set for `ASroute' element.");
1195 if (!AX_surfxml_ASroute_gw_dst) FAIL("Required attribute `gw_dst' not set for `ASroute' element.");
1196 LEAVE; STag_surfxml_ASroute();surfxml_pcdata_ix = 0; ENTER(S_surfxml_ASroute);
1199 if (!AX_surfxml_ASroute_src) FAIL("Required attribute `src' not set for `ASroute' element.");
1200 if (!AX_surfxml_ASroute_dst) FAIL("Required attribute `dst' not set for `ASroute' element.");
1201 if (!AX_surfxml_ASroute_gw_src) FAIL("Required attribute `gw_src' not set for `ASroute' element.");
1202 if (!AX_surfxml_ASroute_gw_dst) FAIL("Required attribute `gw_dst' not set for `ASroute' element.");
1203 LEAVE; STag_surfxml_ASroute(); surfxml_pcdata_ix = 0; ETag_surfxml_ASroute(); popbuffer(); /* attribute */
1205 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;
1208 . FAIL("Unexpected character `%c' in attribute list of ASroute element.", yytext[0]);
1209 {Name} FAIL("Bad attribute `%s' in `ASroute' element start tag.",yytext);
1210 <<EOF>> FAIL("EOF in attribute list of `ASroute' element.");
1213 <E_surfxml_ASroute,S_surfxml_ASroute,S_surfxml_ASroute_2>{
1216 ETag_surfxml_ASroute();
1217 popbuffer(); /* attribute */
1219 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;
1222 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</ASroute>' expected.",yytext);
1223 . FAIL("Unexpected character `%c': `</ASroute>' expected.",yytext[0]);
1224 <<EOF>> FAIL("Premature EOF: `</ASroute>' expected.");
1227 <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_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,E_surfxml_bypassRoute>"<link_ctn"{s} FAIL("Starting tag <link_ctn> is not allowed here.");
1229 <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} {
1230 AX_surfxml_link_ctn_id = 0;
1231 ENTER(AL_surfxml_link_ctn); pushbuffer(0);
1234 <AL_surfxml_link_ctn>{
1235 "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_ctn_id);
1236 "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_ctn_id);
1239 if (!AX_surfxml_link_ctn_id) FAIL("Required attribute `id' not set for `link_ctn' element.");
1240 LEAVE; STag_surfxml_link_ctn();surfxml_pcdata_ix = 0; ENTER(E_surfxml_link_ctn);
1243 if (!AX_surfxml_link_ctn_id) FAIL("Required attribute `id' not set for `link_ctn' element.");
1244 LEAVE; STag_surfxml_link_ctn(); surfxml_pcdata_ix = 0; ETag_surfxml_link_ctn(); popbuffer(); /* attribute */
1246 case S_surfxml_bypassRoute: case S_surfxml_bypassRoute_2: case S_surfxml_bypassRoute_1: SET(S_surfxml_bypassRoute_2); break;
1247 case S_surfxml_route_1: case S_surfxml_route: case S_surfxml_route_2: SET(S_surfxml_route_2); break;
1248 case S_surfxml_ASroute: case S_surfxml_ASroute_1: case S_surfxml_ASroute_2: SET(S_surfxml_ASroute_2); break;
1251 . FAIL("Unexpected character `%c' in attribute list of link_ctn element.", yytext[0]);
1252 {Name} FAIL("Bad attribute `%s' in `link_ctn' element start tag.",yytext);
1253 <<EOF>> FAIL("EOF in attribute list of `link_ctn' element.");
1256 <E_surfxml_link_ctn>{
1257 "</link_ctn"{s}">" {
1259 ETag_surfxml_link_ctn();
1260 popbuffer(); /* attribute */
1262 case S_surfxml_bypassRoute: case S_surfxml_bypassRoute_2: case S_surfxml_bypassRoute_1: SET(S_surfxml_bypassRoute_2); break;
1263 case S_surfxml_route_1: case S_surfxml_route: case S_surfxml_route_2: SET(S_surfxml_route_2); break;
1264 case S_surfxml_ASroute: case S_surfxml_ASroute_1: case S_surfxml_ASroute_2: SET(S_surfxml_ASroute_2); break;
1267 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</link_ctn>' expected.",yytext);
1268 . FAIL("Unexpected character `%c': `</link_ctn>' expected.",yytext[0]);
1269 <<EOF>> FAIL("Premature EOF: `</link_ctn>' expected.");
1272 <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_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,E_surfxml_bypassRoute>"<bypassRoute"{s} FAIL("Starting tag <bypassRoute> is not allowed here.");
1274 <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} {
1275 AX_surfxml_bypassRoute_src = 0;
1276 AX_surfxml_bypassRoute_dst = 0;
1277 AX_surfxml_bypassRoute_gw_src = 0;
1278 AX_surfxml_bypassRoute_gw_dst = 0;
1279 ENTER(AL_surfxml_bypassRoute); pushbuffer(0);
1282 <AL_surfxml_bypassRoute>{
1283 "src"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_src);
1284 "src"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_src);
1286 "dst"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_dst);
1287 "dst"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_dst);
1289 "gw_src"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_gw_src);
1290 "gw_src"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_gw_src);
1292 "gw_dst"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_gw_dst);
1293 "gw_dst"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_gw_dst);
1296 if (!AX_surfxml_bypassRoute_src) FAIL("Required attribute `src' not set for `bypassRoute' element.");
1297 if (!AX_surfxml_bypassRoute_dst) FAIL("Required attribute `dst' not set for `bypassRoute' element.");
1298 if (!AX_surfxml_bypassRoute_gw_src) FAIL("Required attribute `gw_src' not set for `bypassRoute' element.");
1299 if (!AX_surfxml_bypassRoute_gw_dst) FAIL("Required attribute `gw_dst' not set for `bypassRoute' element.");
1300 LEAVE; STag_surfxml_bypassRoute();surfxml_pcdata_ix = 0; ENTER(S_surfxml_bypassRoute);
1303 if (!AX_surfxml_bypassRoute_src) FAIL("Required attribute `src' not set for `bypassRoute' element.");
1304 if (!AX_surfxml_bypassRoute_dst) FAIL("Required attribute `dst' not set for `bypassRoute' element.");
1305 if (!AX_surfxml_bypassRoute_gw_src) FAIL("Required attribute `gw_src' not set for `bypassRoute' element.");
1306 if (!AX_surfxml_bypassRoute_gw_dst) FAIL("Required attribute `gw_dst' not set for `bypassRoute' element.");
1307 LEAVE; STag_surfxml_bypassRoute(); surfxml_pcdata_ix = 0; ETag_surfxml_bypassRoute(); popbuffer(); /* attribute */
1309 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;
1312 . FAIL("Unexpected character `%c' in attribute list of bypassRoute element.", yytext[0]);
1313 {Name} FAIL("Bad attribute `%s' in `bypassRoute' element start tag.",yytext);
1314 <<EOF>> FAIL("EOF in attribute list of `bypassRoute' element.");
1317 <S_surfxml_bypassRoute,S_surfxml_bypassRoute_2,E_surfxml_bypassRoute>{
1318 "</bypassRoute"{s}">" {
1320 ETag_surfxml_bypassRoute();
1321 popbuffer(); /* attribute */
1323 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;
1326 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</bypassRoute>' expected.",yytext);
1327 . FAIL("Unexpected character `%c': `</bypassRoute>' expected.",yytext[0]);
1328 <<EOF>> FAIL("Premature EOF: `</bypassRoute>' expected.");
1331 <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_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_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>"<process"{s} FAIL("Starting tag <process> is not allowed here.");
1333 <S_surfxml_platform_6,S_surfxml_platform_4,S_surfxml_platform_5,S_surfxml_platform_2,S_surfxml_platform_1,S_surfxml_platform>"<process"{s} {
1334 AX_surfxml_process_host = 0;
1335 AX_surfxml_process_function = 0;
1336 AX_surfxml_process_start_time = 19;
1337 AX_surfxml_process_kill_time = 24;
1338 ENTER(AL_surfxml_process); pushbuffer(0);
1341 <AL_surfxml_process>{
1342 "host"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_process_host);
1343 "host"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_process_host);
1345 "function"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_process_function);
1346 "function"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_process_function);
1348 "start_time"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_process_start_time);
1349 "start_time"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_process_start_time);
1351 "kill_time"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_process_kill_time);
1352 "kill_time"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_process_kill_time);
1355 if (!AX_surfxml_process_host) FAIL("Required attribute `host' not set for `process' element.");
1356 if (!AX_surfxml_process_function) FAIL("Required attribute `function' not set for `process' element.");
1357 LEAVE; STag_surfxml_process();surfxml_pcdata_ix = 0; ENTER(S_surfxml_process);
1360 if (!AX_surfxml_process_host) FAIL("Required attribute `host' not set for `process' element.");
1361 if (!AX_surfxml_process_function) FAIL("Required attribute `function' not set for `process' element.");
1362 LEAVE; STag_surfxml_process(); surfxml_pcdata_ix = 0; ETag_surfxml_process(); popbuffer(); /* attribute */
1364 case S_surfxml_platform_6: case S_surfxml_platform_4: case S_surfxml_platform_5: case S_surfxml_platform_2: case S_surfxml_platform_1: case S_surfxml_platform: SET(S_surfxml_platform_6); break;
1367 . FAIL("Unexpected character `%c' in attribute list of process element.", yytext[0]);
1368 {Name} FAIL("Bad attribute `%s' in `process' element start tag.",yytext);
1369 <<EOF>> FAIL("EOF in attribute list of `process' element.");
1372 <E_surfxml_process,S_surfxml_process,S_surfxml_process_2>{
1375 ETag_surfxml_process();
1376 popbuffer(); /* attribute */
1378 case S_surfxml_platform_6: case S_surfxml_platform_4: case S_surfxml_platform_5: case S_surfxml_platform_2: case S_surfxml_platform_1: case S_surfxml_platform: SET(S_surfxml_platform_6); break;
1381 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</process>' expected.",yytext);
1382 . FAIL("Unexpected character `%c': `</process>' expected.",yytext[0]);
1383 <<EOF>> FAIL("Premature EOF: `</process>' expected.");
1386 <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_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,E_surfxml_bypassRoute>"<argument"{s} FAIL("Starting tag <argument> is not allowed here.");
1388 <S_surfxml_process_1,S_surfxml_process,S_surfxml_process_2>"<argument"{s} {
1389 AX_surfxml_argument_value = 0;
1390 ENTER(AL_surfxml_argument); pushbuffer(0);
1393 <AL_surfxml_argument>{
1394 "value"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_argument_value);
1395 "value"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_argument_value);
1398 if (!AX_surfxml_argument_value) FAIL("Required attribute `value' not set for `argument' element.");
1399 LEAVE; STag_surfxml_argument();surfxml_pcdata_ix = 0; ENTER(E_surfxml_argument);
1402 if (!AX_surfxml_argument_value) FAIL("Required attribute `value' not set for `argument' element.");
1403 LEAVE; STag_surfxml_argument(); surfxml_pcdata_ix = 0; ETag_surfxml_argument(); popbuffer(); /* attribute */
1405 case S_surfxml_process_1: case S_surfxml_process: case S_surfxml_process_2: SET(S_surfxml_process_2); break;
1408 . FAIL("Unexpected character `%c' in attribute list of argument element.", yytext[0]);
1409 {Name} FAIL("Bad attribute `%s' in `argument' element start tag.",yytext);
1410 <<EOF>> FAIL("EOF in attribute list of `argument' element.");
1413 <E_surfxml_argument>{
1414 "</argument"{s}">" {
1416 ETag_surfxml_argument();
1417 popbuffer(); /* attribute */
1419 case S_surfxml_process_1: case S_surfxml_process: case S_surfxml_process_2: SET(S_surfxml_process_2); break;
1422 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</argument>' expected.",yytext);
1423 . FAIL("Unexpected character `%c': `</argument>' expected.",yytext[0]);
1424 <<EOF>> FAIL("Premature EOF: `</argument>' expected.");
1427 <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,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_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,E_surfxml_bypassRoute>"<config"{s} FAIL("Starting tag <config> is not allowed here.");
1429 <S_surfxml_platform>"<config"{s} {
1430 AX_surfxml_config_id = 0;
1431 ENTER(AL_surfxml_config); pushbuffer(0);
1434 <AL_surfxml_config>{
1435 "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_config_id);
1436 "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_config_id);
1439 LEAVE; STag_surfxml_config();surfxml_pcdata_ix = 0; ENTER(S_surfxml_config);
1442 LEAVE; STag_surfxml_config(); surfxml_pcdata_ix = 0; ETag_surfxml_config(); popbuffer(); /* attribute */
1444 case S_surfxml_platform: SET(S_surfxml_platform_1); break;
1447 . FAIL("Unexpected character `%c' in attribute list of config element.", yytext[0]);
1448 {Name} FAIL("Bad attribute `%s' in `config' element start tag.",yytext);
1449 <<EOF>> FAIL("EOF in attribute list of `config' element.");
1452 <S_surfxml_config,S_surfxml_config_2,E_surfxml_config>{
1455 ETag_surfxml_config();
1456 popbuffer(); /* attribute */
1458 case S_surfxml_platform: SET(S_surfxml_platform_1); break;
1461 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</config>' expected.",yytext);
1462 . FAIL("Unexpected character `%c': `</config>' expected.",yytext[0]);
1463 <<EOF>> FAIL("Premature EOF: `</config>' expected.");
1466 /* <!-- <!ATTLIST prop key CDATA #REQUIRED> -->
1467 * <!-- <!ATTLIST prop key CDATA #REQUIRED> --> */
1469 <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_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,E_surfxml_bypassRoute>"<prop"{s} FAIL("Starting tag <prop> is not allowed here.");
1471 <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} {
1472 AX_surfxml_prop_id = 0;
1473 AX_surfxml_prop_value = 0;
1474 ENTER(AL_surfxml_prop); pushbuffer(0);
1478 "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_prop_id);
1479 "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_prop_id);
1481 "value"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_prop_value);
1482 "value"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_prop_value);
1485 if (!AX_surfxml_prop_id) FAIL("Required attribute `id' not set for `prop' element.");
1486 if (!AX_surfxml_prop_value) FAIL("Required attribute `value' not set for `prop' element.");
1487 LEAVE; STag_surfxml_prop();surfxml_pcdata_ix = 0; ENTER(E_surfxml_prop);
1490 if (!AX_surfxml_prop_id) FAIL("Required attribute `id' not set for `prop' element.");
1491 if (!AX_surfxml_prop_value) FAIL("Required attribute `value' not set for `prop' element.");
1492 LEAVE; STag_surfxml_prop(); surfxml_pcdata_ix = 0; ETag_surfxml_prop(); popbuffer(); /* attribute */
1494 case S_surfxml_random: case S_surfxml_random_2: case S_surfxml_random_1: SET(S_surfxml_random_2); break;
1495 case S_surfxml_config_1: case S_surfxml_config: case S_surfxml_config_2: SET(S_surfxml_config_2); break;
1496 case S_surfxml_process_1: case S_surfxml_process: case S_surfxml_process_2: SET(S_surfxml_process_2); break;
1497 case S_surfxml_host_1: case S_surfxml_host_2: case S_surfxml_host: SET(S_surfxml_host_2); break;
1498 case S_surfxml_link_1: case S_surfxml_link_2: case S_surfxml_link: SET(S_surfxml_link_2); break;
1501 . FAIL("Unexpected character `%c' in attribute list of prop element.", yytext[0]);
1502 {Name} FAIL("Bad attribute `%s' in `prop' element start tag.",yytext);
1503 <<EOF>> FAIL("EOF in attribute list of `prop' element.");
1509 ETag_surfxml_prop();
1510 popbuffer(); /* attribute */
1512 case S_surfxml_random: case S_surfxml_random_2: case S_surfxml_random_1: SET(S_surfxml_random_2); break;
1513 case S_surfxml_config_1: case S_surfxml_config: case S_surfxml_config_2: SET(S_surfxml_config_2); break;
1514 case S_surfxml_process_1: case S_surfxml_process: case S_surfxml_process_2: SET(S_surfxml_process_2); break;
1515 case S_surfxml_host_1: case S_surfxml_host_2: case S_surfxml_host: SET(S_surfxml_host_2); break;
1516 case S_surfxml_link_1: case S_surfxml_link_2: case S_surfxml_link: SET(S_surfxml_link_2); break;
1519 "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</prop>' expected.",yytext);
1520 . FAIL("Unexpected character `%c': `</prop>' expected.",yytext[0]);
1521 <<EOF>> FAIL("Premature EOF: `</prop>' expected.");
1524 /* EPILOG: after the root element. */
1527 . {SET(PROLOG); yyless(0); CLEANUP; return -1;}
1531 /* CHARACTER DATA. */
1533 <IN_trace,VALUE1,VALUE2>{
1534 /* Non-defined standard entities... */
1535 "&" BUFFERPUTC('&');
1536 "<" BUFFERPUTC('<');
1537 ">" BUFFERPUTC('>');
1538 "'" BUFFERPUTC('\'');
1539 """ BUFFERPUTC('"');
1541 /* Character entities. */
1542 "&#"[[:digit:]]+";" BUFFERPUTC((unsigned char)atoi(yytext+2));
1543 "&#x"[[:xdigit:]]+";" BUFFERPUTC((unsigned char)strtol(yytext+3,NULL,16));
1546 <IN_trace,VALUE1,VALUE2,CDATA>{
1550 "\n\r" BUFFERPUTC('\n');
1554 "<![CDATA[" ENTER(CDATA);
1555 "]""]>" FAIL("Unexpected `]""]>' in character data.");
1559 \' BUFFERDONE; LEAVE;
1560 <<EOF>> FAIL("EOF in literal (\"'\" expected).");
1564 \" BUFFERDONE; LEAVE;
1565 <<EOF>> FAIL("EOF in literal (`\"' expected).");
1568 <IN_trace,VALUE1,VALUE2>{
1569 [^<&] BUFFERPUTC(yytext[0]);
1570 [<&] FAIL("Spurious `%c' in character data.",yytext[0]);
1575 /* "]""]" BUFFERPUTC(yytext[0]); BUFFERPUTC(yytext[1]); */
1576 . BUFFERPUTC(yytext[0]);
1577 <<EOF>> FAIL("EOF in CDATA section.");
1580 /* Impossible rules to avoid warnings from flex(1). */
1581 /* Ideally, this should be replaced by code in flexml.pl that
1582 generates just the states not covered by other rules. */
1584 .|[\n] FAIL("Syntax error on character `%c'.", yytext[0]);
1589 /* Element context stack lookup. */
1590 int surfxml_element_context(int i)
1592 return (0<i && i<yy_start_stack_depth
1593 ? yy_start_stack[yy_start_stack_ptr - i]
1598 void print_yy_stack(char* fmt, ...)
1600 int i = 0; va_list ap; va_start(ap, fmt);
1601 vfprintf(stderr, fmt, ap);
1602 if (surfxml_statenames) {
1603 for (i=1; i<yy_start_stack_ptr; i++) {
1604 fprintf(stderr, "%s/", surfxml_statenames[yy_start_stack[i] ]);
1606 fprintf(stderr,"%s\n", surfxml_statenames[YY_START]);
1611 void print_surfxml_bufferstack()
1614 fputs("Buffer: ", stderr);
1615 for (i = 0; i < blimit; i++) {
1616 if ( surfxml_bufferstack[i] == '\377' ) break;
1617 putc(surfxml_bufferstack[i], stderr);
1622 static void debug_enter(int state, const char* statename) {
1623 yy_push_state(state);
1624 if (yy_flex_debug) {
1625 print_yy_stack("--ENTER(%s) : ",statename);
1626 print_surfxml_bufferstack();
1630 static void debug_leave(void) {
1631 if (yy_flex_debug) {
1632 print_yy_stack("--LEAVE : ");
1633 print_surfxml_bufferstack();
1638 static void debug_set(int state, const char* statename) {
1640 if (yy_flex_debug) print_yy_stack("--SET(%s) : ",statename);
1645 static void cleanup(void)
1647 if (surfxml_statenames) {
1648 free(surfxml_statenames);
1649 surfxml_statenames = NULL;
1651 free(surfxml_bufferstack);
1652 surfxml_bufferstack = NULL;
1659 static int fail(const char* fmt, ...)
1661 int chars_left, used;
1662 va_list ap; va_start(ap, fmt);
1663 #ifdef FLEXML_yylineno
1664 used = sprintf(flexml_err_msg,
1665 "Invalid XML (XML input line %d, state %d): ",
1666 yylineno, YY_START);
1668 used = sprintf(flexml_err_msg,
1669 "Invalid XML (state %d): ",
1672 chars_left = flexml_max_err_msg_size - used - 1;
1673 vsnprintf(flexml_err_msg + used, chars_left, fmt, ap);
1676 #ifndef FLEXML_quiet_parser
1677 /* print directly to sdterr */
1678 fprintf(stderr, "%s\n", flexml_err_msg);
1679 flexml_err_msg[0] = '\0';