Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Java and Ruby were killed away
[simgrid.git] / src / surf / simgrid_dtd.l
1 /* Validating XML processor for src/surf/simgrid.dtd.
2  * Generated 2010/12/03 11:37:14.
3  *
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).
8  * 
9  * There are two, intertwined parts to this program, part A and part B.
10  *
11  * Part A
12  * ------
13  * 
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.
17  *
18  * You can redistribute, use, perform, display and/or modify "Part A"
19  * provided the following two conditions hold:
20  *
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.
24  *
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.
28  *
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.
32  * 
33  * Part B
34  * ------
35  * 
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".
41  *
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.
45  * 
46  */
47
48 %{
49
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 $";
55
56 /* ANSI headers. */
57 #include <stdlib.h> /* for realloc() -- needed here when using flex 2.5.4 */
58 #include <stdio.h>
59 #include <string.h>
60 #include <assert.h>
61 #include <stdarg.h>
62 #include <ctype.h>
63      
64 #if defined(_XBT_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__TOS_WIN__)
65 # ifndef __STRICT_ANSI__
66 #  include <io.h>
67 #  include <process.h>
68 # endif
69 #else
70 # include <unistd.h>
71 #endif
72      
73 #ifndef FLEXML_INDEXSTACKSIZE
74 #define FLEXML_INDEXSTACKSIZE 1000
75 #endif
76
77 /* Generated definitions. */
78 #define FLEXML_yylineno
79 #ifndef FLEXML_BUFFERSTACKSIZE
80 #define FLEXML_BUFFERSTACKSIZE 1000000
81 #endif
82 #define FLEXML_NEED_BUFFERLIT
83
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_trace_connect_element AX_surfxml_trace_connect_element;
94 #define A_surfxml_trace_connect_element (surfxml_bufferstack + AX_surfxml_trace_connect_element)
95 AT_surfxml_prop_id AX_surfxml_prop_id;
96 #define A_surfxml_prop_id (surfxml_bufferstack + AX_surfxml_prop_id)
97 AT_surfxml_host_id AX_surfxml_host_id;
98 #define A_surfxml_host_id (surfxml_bufferstack + AX_surfxml_host_id)
99 AT_surfxml_ASroute_symmetrical AX_surfxml_ASroute_symmetrical;
100 #define A_surfxml_ASroute_symmetrical AX_surfxml_ASroute_symmetrical
101 AT_surfxml_peer_lat AX_surfxml_peer_lat;
102 #define A_surfxml_peer_lat (surfxml_bufferstack + AX_surfxml_peer_lat)
103 AT_surfxml_link_latency_file AX_surfxml_link_latency_file;
104 #define A_surfxml_link_latency_file (surfxml_bufferstack + AX_surfxml_link_latency_file)
105 AT_surfxml_link_ctn_direction AX_surfxml_link_ctn_direction;
106 #define A_surfxml_link_ctn_direction AX_surfxml_link_ctn_direction
107 AT_surfxml_host_state AX_surfxml_host_state;
108 #define A_surfxml_host_state AX_surfxml_host_state
109 AT_surfxml_AS_id AX_surfxml_AS_id;
110 #define A_surfxml_AS_id (surfxml_bufferstack + AX_surfxml_AS_id)
111 AT_surfxml_host_power AX_surfxml_host_power;
112 #define A_surfxml_host_power (surfxml_bufferstack + AX_surfxml_host_power)
113 AT_surfxml_router_id AX_surfxml_router_id;
114 #define A_surfxml_router_id (surfxml_bufferstack + AX_surfxml_router_id)
115 AT_surfxml_process_start_time AX_surfxml_process_start_time;
116 #define A_surfxml_process_start_time (surfxml_bufferstack + AX_surfxml_process_start_time)
117 AT_surfxml_cluster_suffix AX_surfxml_cluster_suffix;
118 #define A_surfxml_cluster_suffix (surfxml_bufferstack + AX_surfxml_cluster_suffix)
119 AT_surfxml_ASroute_src AX_surfxml_ASroute_src;
120 #define A_surfxml_ASroute_src (surfxml_bufferstack + AX_surfxml_ASroute_src)
121 AT_surfxml_cluster_prefix AX_surfxml_cluster_prefix;
122 #define A_surfxml_cluster_prefix (surfxml_bufferstack + AX_surfxml_cluster_prefix)
123 AT_surfxml_trace_file AX_surfxml_trace_file;
124 #define A_surfxml_trace_file (surfxml_bufferstack + AX_surfxml_trace_file)
125 AT_surfxml_link_sharing_policy AX_surfxml_link_sharing_policy;
126 #define A_surfxml_link_sharing_policy AX_surfxml_link_sharing_policy
127 AT_surfxml_random_min AX_surfxml_random_min;
128 #define A_surfxml_random_min (surfxml_bufferstack + AX_surfxml_random_min)
129 AT_surfxml_link_ctn_id AX_surfxml_link_ctn_id;
130 #define A_surfxml_link_ctn_id (surfxml_bufferstack + AX_surfxml_link_ctn_id)
131 AT_surfxml_peer_bw_out AX_surfxml_peer_bw_out;
132 #define A_surfxml_peer_bw_out (surfxml_bufferstack + AX_surfxml_peer_bw_out)
133 AT_surfxml_process_kill_time AX_surfxml_process_kill_time;
134 #define A_surfxml_process_kill_time (surfxml_bufferstack + AX_surfxml_process_kill_time)
135 AT_surfxml_cluster_bb_bw AX_surfxml_cluster_bb_bw;
136 #define A_surfxml_cluster_bb_bw (surfxml_bufferstack + AX_surfxml_cluster_bb_bw)
137 AT_surfxml_argument_value AX_surfxml_argument_value;
138 #define A_surfxml_argument_value (surfxml_bufferstack + AX_surfxml_argument_value)
139 AT_surfxml_link_state AX_surfxml_link_state;
140 #define A_surfxml_link_state AX_surfxml_link_state
141 AT_surfxml_ASroute_gw_src AX_surfxml_ASroute_gw_src;
142 #define A_surfxml_ASroute_gw_src (surfxml_bufferstack + AX_surfxml_ASroute_gw_src)
143 AT_surfxml_AS_routing AX_surfxml_AS_routing;
144 #define A_surfxml_AS_routing (surfxml_bufferstack + AX_surfxml_AS_routing)
145 AT_surfxml_link_bandwidth AX_surfxml_link_bandwidth;
146 #define A_surfxml_link_bandwidth (surfxml_bufferstack + AX_surfxml_link_bandwidth)
147 AT_surfxml_cluster_id AX_surfxml_cluster_id;
148 #define A_surfxml_cluster_id (surfxml_bufferstack + AX_surfxml_cluster_id)
149 AT_surfxml_peer_bw_in AX_surfxml_peer_bw_in;
150 #define A_surfxml_peer_bw_in (surfxml_bufferstack + AX_surfxml_peer_bw_in)
151 AT_surfxml_random_mean AX_surfxml_random_mean;
152 #define A_surfxml_random_mean (surfxml_bufferstack + AX_surfxml_random_mean)
153 AT_surfxml_cluster_bb_lat AX_surfxml_cluster_bb_lat;
154 #define A_surfxml_cluster_bb_lat (surfxml_bufferstack + AX_surfxml_cluster_bb_lat)
155 AT_surfxml_link_latency AX_surfxml_link_latency;
156 #define A_surfxml_link_latency (surfxml_bufferstack + AX_surfxml_link_latency)
157 AT_surfxml_trace_connect_kind AX_surfxml_trace_connect_kind;
158 #define A_surfxml_trace_connect_kind AX_surfxml_trace_connect_kind
159 AT_surfxml_link_bandwidth_file AX_surfxml_link_bandwidth_file;
160 #define A_surfxml_link_bandwidth_file (surfxml_bufferstack + AX_surfxml_link_bandwidth_file)
161 AT_surfxml_route_symmetrical AX_surfxml_route_symmetrical;
162 #define A_surfxml_route_symmetrical AX_surfxml_route_symmetrical
163 AT_surfxml_random_id AX_surfxml_random_id;
164 #define A_surfxml_random_id (surfxml_bufferstack + AX_surfxml_random_id)
165 AT_surfxml_random_max AX_surfxml_random_max;
166 #define A_surfxml_random_max (surfxml_bufferstack + AX_surfxml_random_max)
167 AT_surfxml_link_id AX_surfxml_link_id;
168 #define A_surfxml_link_id (surfxml_bufferstack + AX_surfxml_link_id)
169 AT_surfxml_process_host AX_surfxml_process_host;
170 #define A_surfxml_process_host (surfxml_bufferstack + AX_surfxml_process_host)
171 AT_surfxml_host_availability_file AX_surfxml_host_availability_file;
172 #define A_surfxml_host_availability_file (surfxml_bufferstack + AX_surfxml_host_availability_file)
173 AT_surfxml_cluster_lat AX_surfxml_cluster_lat;
174 #define A_surfxml_cluster_lat (surfxml_bufferstack + AX_surfxml_cluster_lat)
175 AT_surfxml_trace_periodicity AX_surfxml_trace_periodicity;
176 #define A_surfxml_trace_periodicity (surfxml_bufferstack + AX_surfxml_trace_periodicity)
177 AT_surfxml_cluster_bb_sharing_policy AX_surfxml_cluster_bb_sharing_policy;
178 #define A_surfxml_cluster_bb_sharing_policy AX_surfxml_cluster_bb_sharing_policy
179 AT_surfxml_router_coordinates AX_surfxml_router_coordinates;
180 #define A_surfxml_router_coordinates (surfxml_bufferstack + AX_surfxml_router_coordinates)
181 AT_surfxml_peer_coordinates AX_surfxml_peer_coordinates;
182 #define A_surfxml_peer_coordinates (surfxml_bufferstack + AX_surfxml_peer_coordinates)
183 AT_surfxml_prop_value AX_surfxml_prop_value;
184 #define A_surfxml_prop_value (surfxml_bufferstack + AX_surfxml_prop_value)
185 AT_surfxml_ASroute_dst AX_surfxml_ASroute_dst;
186 #define A_surfxml_ASroute_dst (surfxml_bufferstack + AX_surfxml_ASroute_dst)
187 AT_surfxml_link_state_file AX_surfxml_link_state_file;
188 #define A_surfxml_link_state_file (surfxml_bufferstack + AX_surfxml_link_state_file)
189 AT_surfxml_trace_connect_trace AX_surfxml_trace_connect_trace;
190 #define A_surfxml_trace_connect_trace (surfxml_bufferstack + AX_surfxml_trace_connect_trace)
191 AT_surfxml_cluster_power AX_surfxml_cluster_power;
192 #define A_surfxml_cluster_power (surfxml_bufferstack + AX_surfxml_cluster_power)
193 AT_surfxml_process_function AX_surfxml_process_function;
194 #define A_surfxml_process_function (surfxml_bufferstack + AX_surfxml_process_function)
195 AT_surfxml_peer_id AX_surfxml_peer_id;
196 #define A_surfxml_peer_id (surfxml_bufferstack + AX_surfxml_peer_id)
197 AT_surfxml_cluster_sharing_policy AX_surfxml_cluster_sharing_policy;
198 #define A_surfxml_cluster_sharing_policy AX_surfxml_cluster_sharing_policy
199 AT_surfxml_bypassRoute_dst AX_surfxml_bypassRoute_dst;
200 #define A_surfxml_bypassRoute_dst (surfxml_bufferstack + AX_surfxml_bypassRoute_dst)
201 AT_surfxml_host_core AX_surfxml_host_core;
202 #define A_surfxml_host_core (surfxml_bufferstack + AX_surfxml_host_core)
203 AT_surfxml_host_availability AX_surfxml_host_availability;
204 #define A_surfxml_host_availability (surfxml_bufferstack + AX_surfxml_host_availability)
205 AT_surfxml_bypassRoute_src AX_surfxml_bypassRoute_src;
206 #define A_surfxml_bypassRoute_src (surfxml_bufferstack + AX_surfxml_bypassRoute_src)
207 AT_surfxml_route_src AX_surfxml_route_src;
208 #define A_surfxml_route_src (surfxml_bufferstack + AX_surfxml_route_src)
209 AT_surfxml_bypassRoute_gw_dst AX_surfxml_bypassRoute_gw_dst;
210 #define A_surfxml_bypassRoute_gw_dst (surfxml_bufferstack + AX_surfxml_bypassRoute_gw_dst)
211 AT_surfxml_host_coordinates AX_surfxml_host_coordinates;
212 #define A_surfxml_host_coordinates (surfxml_bufferstack + AX_surfxml_host_coordinates)
213 AT_surfxml_trace_id AX_surfxml_trace_id;
214 #define A_surfxml_trace_id (surfxml_bufferstack + AX_surfxml_trace_id)
215 AT_surfxml_peer_sharing_policy AX_surfxml_peer_sharing_policy;
216 #define A_surfxml_peer_sharing_policy AX_surfxml_peer_sharing_policy
217 AT_surfxml_peer_power AX_surfxml_peer_power;
218 #define A_surfxml_peer_power (surfxml_bufferstack + AX_surfxml_peer_power)
219 AT_surfxml_cluster_radical AX_surfxml_cluster_radical;
220 #define A_surfxml_cluster_radical (surfxml_bufferstack + AX_surfxml_cluster_radical)
221 AT_surfxml_config_id AX_surfxml_config_id;
222 #define A_surfxml_config_id (surfxml_bufferstack + AX_surfxml_config_id)
223 AT_surfxml_bypassRoute_gw_src AX_surfxml_bypassRoute_gw_src;
224 #define A_surfxml_bypassRoute_gw_src (surfxml_bufferstack + AX_surfxml_bypassRoute_gw_src)
225 AT_surfxml_cluster_core AX_surfxml_cluster_core;
226 #define A_surfxml_cluster_core (surfxml_bufferstack + AX_surfxml_cluster_core)
227 AT_surfxml_random_std_deviation AX_surfxml_random_std_deviation;
228 #define A_surfxml_random_std_deviation (surfxml_bufferstack + AX_surfxml_random_std_deviation)
229 AT_surfxml_host_state_file AX_surfxml_host_state_file;
230 #define A_surfxml_host_state_file (surfxml_bufferstack + AX_surfxml_host_state_file)
231 AT_surfxml_route_dst AX_surfxml_route_dst;
232 #define A_surfxml_route_dst (surfxml_bufferstack + AX_surfxml_route_dst)
233 AT_surfxml_cluster_bw AX_surfxml_cluster_bw;
234 #define A_surfxml_cluster_bw (surfxml_bufferstack + AX_surfxml_cluster_bw)
235 AT_surfxml_platform_version AX_surfxml_platform_version;
236 #define A_surfxml_platform_version (surfxml_bufferstack + AX_surfxml_platform_version)
237
238 /* XML state. */
239 #ifdef FLEX_DEBUG
240 # define ENTER(state)   debug_enter(state,#state)
241 # define LEAVE          debug_leave()
242 # define SET(state)     debug_set(state,#state)
243   static void debug_enter(int, const char*);
244   static void debug_leave(void);
245   static void debug_set(int, const char*);
246 #else
247 # define ENTER(state)   (yy_push_state(state))
248 # define LEAVE          (yy_pop_state())
249 # define SET(state)     BEGIN(state)
250 #endif
251
252 /* Generic actions. */
253 #define SKIP    /*skip*/
254 #define SUCCEED        CLEANUP; return 0
255
256 #define FAIL    return fail
257 static int fail(const char*, ...);
258
259 enum {flexml_max_err_msg_size = 512};
260 static char flexml_err_msg[flexml_max_err_msg_size];
261 const char * surfxml_parse_err_msg()
262 {
263     return flexml_err_msg;
264 }
265 static void reset_surfxml_parse_err_msg()
266 {
267     flexml_err_msg[0] = '\0';
268 }
269
270 /* Cleanup */
271 static void cleanup(void);
272 #define CLEANUP  cleanup()
273
274 /* Text buffer stack handling. */
275 char *surfxml_bufferstack = NULL;
276 static int blimit = FLEXML_BUFFERSTACKSIZE;
277 static int bnext = 1;
278
279 static int *indexstack = NULL;
280 static int ilimit = FLEXML_INDEXSTACKSIZE;
281 static int inext = 1;
282
283 #define BUFFERSET(P)  (P = bnext)
284 #define BUFFERPUTC(C) (ck_blimit(), surfxml_bufferstack[bnext++] = (C))
285 #define BUFFERDONE    (BUFFERPUTC('\0'))
286
287 #define BUFFERLITERAL(C, P) surfxml_bufferliteral(C, &(P), yytext)
288
289 /* after this is called, there are at least 2 slots left in the stack */
290 static int ck_blimit()
291 {
292      if (bnext >= blimit) {
293          blimit += FLEXML_BUFFERSTACKSIZE + 2;
294          {
295              char *temp = (char *) realloc(surfxml_bufferstack, blimit);
296              assert(temp);
297              surfxml_bufferstack = temp;
298          }
299      }
300      return 0;
301 }
302
303 /* after this is called, there are at least 2 slots left in the stack */
304 static int ck_ilimit()
305 {
306      if (inext >= ilimit) {
307          ilimit += FLEXML_INDEXSTACKSIZE + 2;
308          {
309              int *temp = (int *) realloc(indexstack, ilimit);
310              assert(temp);
311              indexstack = temp;
312          }
313      }
314      return 0;
315 }
316
317 #ifdef FLEXML_NEED_BUFFERLIT
318 static void surfxml_bufferliteral(char c, int* pp, const char* text)
319 {
320   const char *s = (c ? strchr(text,c) : text-1), *e = strrchr(text,c);
321   assert(s <= e); BUFFERSET(*pp);
322   while (++s<e) {
323     if (isspace(*s) && c) { BUFFERPUTC(' '); while (isspace(*s)) ++s; }
324     else BUFFERPUTC(*s);
325   }
326   BUFFERDONE;
327 }
328 #endif
329
330 static void pushbuffer(int p)
331 {
332     ck_ilimit();
333     indexstack[inext++] = p;
334     indexstack[inext++] = bnext;    
335 }
336
337 static int popbuffer(void)
338 {
339     assert(inext >= 2);
340     bnext = indexstack[--inext];
341     return indexstack[--inext];
342 }
343
344 /* General internal entities are `unput' back onto the input stream... */
345 #define ENTITYTEXT(T) \
346   { char *s = (T), *e = s+strlen(s);\
347     while (--e >= s) { unput(*e); }}
348
349
350 %}
351
352 /* Flex standard options. */
353 %option stack
354 %option noyy_top_state
355 %option noinput
356 %option noreject
357 %option noyymore
358 %option noyywrap
359
360 /* Flex user-requested options. */
361 %option yylineno
362 %option nounput
363
364 /* XML character classes (currently restricted to ASCII). */
365
366 /* "Common syntactic structures." */
367 S               [ \t\n\r\f]+
368 s               [ \t\n\r\f]*
369
370 /* "Names and Tokens." */
371 NameChar        [A-Za-z0-9.:_-]
372 Name            [A-Za-z_:]{NameChar}*
373 Names           {Name}({S}{Name})*
374 Nmtoken         ({NameChar})+
375 Nmtokens        {Nmtoken}({S}{Nmtoken})*
376
377 /* Miscellaneous. */
378 VersionNum      [a-zA-Z0-9_.:-]+
379 Eq              {s}"="{s}
380 Literal         \'[^'']*\'|\"[^""]*\"
381
382 /* Parser states (flex `exclusive start conditions'):
383  *
384  * PROLOG       the XML prolog of the document before <?xml...>
385  * DOCTYPE      the XML prolog of the document after <?xml...>
386  * EPILOG       after the root element
387  * INCOMMENT    inside an XML comment <!--....-->
388  * INPI         inside an XML PI <?...?>
389  * VALUE1       inside a '...'-delimited literal
390  * VALUE2       inside a "..."-delimited literal
391  * CDATA        inside a <![CDATA[...] ]> section.
392  * ROOT_<tag>   expect root element <tag>
393  * AL_<tag>     inside the attribute list for <tag>
394  * IN_<tag>     inside a <tag> with element contents (ready for end tag)
395  * IMPOSSIBLE   dummy to permit disabling rules; must be last
396  */
397 %x PROLOG DOCTYPE EPILOG INCOMMENT INPI VALUE1 VALUE2 CDATA
398 %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
399 %x AL_surfxml_trace IN_trace
400 %x AL_surfxml_random S_surfxml_random S_surfxml_random_1 S_surfxml_random_2 E_surfxml_random
401 %x AL_surfxml_trace_connect E_surfxml_trace_connect
402 %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
403 %x AL_surfxml_host S_surfxml_host S_surfxml_host_1 S_surfxml_host_2 E_surfxml_host
404 %x AL_surfxml_cluster E_surfxml_cluster
405 %x AL_surfxml_peer E_surfxml_peer
406 %x AL_surfxml_router E_surfxml_router
407 %x AL_surfxml_link S_surfxml_link S_surfxml_link_1 S_surfxml_link_2 E_surfxml_link
408 %x AL_surfxml_route S_surfxml_route S_surfxml_route_1 S_surfxml_route_2 E_surfxml_route
409 %x AL_surfxml_ASroute S_surfxml_ASroute S_surfxml_ASroute_1 S_surfxml_ASroute_2 E_surfxml_ASroute
410 %x AL_surfxml_link_ctn E_surfxml_link_ctn
411 %x AL_surfxml_bypassRoute S_surfxml_bypassRoute S_surfxml_bypassRoute_1 S_surfxml_bypassRoute_2 E_surfxml_bypassRoute
412 %x AL_surfxml_process S_surfxml_process S_surfxml_process_1 S_surfxml_process_2 E_surfxml_process
413 %x AL_surfxml_argument E_surfxml_argument
414 %x AL_surfxml_config S_surfxml_config S_surfxml_config_1 S_surfxml_config_2 E_surfxml_config
415 %x AL_surfxml_prop E_surfxml_prop
416 %x IMPOSSIBLE
417
418 %{
419 /* State names. */
420 const char* *surfxml_statenames=NULL;
421 %}
422
423 %%
424
425  /* Bypass Flex's default INITIAL state and begin by parsing the XML prolog. */
426  SET(PROLOG);
427  reset_surfxml_parse_err_msg();
428  surfxml_bufferstack = (char *) malloc(FLEXML_BUFFERSTACKSIZE);
429  assert(surfxml_bufferstack);
430  #ifdef FLEX_DEBUG
431  {
432      int i;
433      for (i = 0; i < blimit; i++) {
434          surfxml_bufferstack[i] = '\377';
435      }
436  }
437  #endif
438  surfxml_bufferstack[0] = '\0';
439  indexstack = (int *) malloc(FLEXML_INDEXSTACKSIZE * sizeof(int));
440  assert(indexstack);
441  indexstack[0] = 0;
442
443   /* FleXML_init */
444   bnext = inext = 1;
445   surfxml_bufferliteral('\0', &bnext, "0.0");
446   surfxml_bufferliteral('\0', &bnext, "1");
447   surfxml_bufferliteral('\0', &bnext, "1.0");
448   surfxml_bufferliteral('\0', &bnext, "1");
449   surfxml_bufferliteral('\0', &bnext, "0.0");
450   surfxml_bufferliteral('\0', &bnext, "-1.0");
451   surfxml_bufferliteral('\0', &bnext, "-1.0");
452   if(!surfxml_statenames) {surfxml_statenames= (const char **)calloc(IMPOSSIBLE,sizeof(char*));
453   surfxml_statenames[PROLOG] = NULL;
454   surfxml_statenames[DOCTYPE] = NULL;
455   surfxml_statenames[EPILOG] = NULL;
456   surfxml_statenames[INCOMMENT] = NULL;
457   surfxml_statenames[INPI] = NULL;
458   surfxml_statenames[VALUE1] = NULL;
459   surfxml_statenames[VALUE2] = NULL;
460   surfxml_statenames[CDATA] = NULL;
461   surfxml_statenames[ROOT_surfxml_platform] = NULL;
462   surfxml_statenames[AL_surfxml_platform] = NULL;
463   surfxml_statenames[S_surfxml_platform] = "platform";
464   surfxml_statenames[S_surfxml_platform_1] = "platform";
465   surfxml_statenames[S_surfxml_platform_2] = "platform";
466   surfxml_statenames[S_surfxml_platform_3] = "platform";
467   surfxml_statenames[S_surfxml_platform_4] = "platform";
468   surfxml_statenames[S_surfxml_platform_5] = "platform";
469   surfxml_statenames[S_surfxml_platform_6] = "platform";
470   surfxml_statenames[E_surfxml_platform] = "platform";
471   surfxml_statenames[AL_surfxml_trace] = NULL;
472   surfxml_statenames[IN_trace] = "trace";
473   surfxml_statenames[AL_surfxml_random] = NULL;
474   surfxml_statenames[S_surfxml_random] = "random";
475   surfxml_statenames[S_surfxml_random_1] = "random";
476   surfxml_statenames[S_surfxml_random_2] = "random";
477   surfxml_statenames[E_surfxml_random] = "random";
478   surfxml_statenames[AL_surfxml_trace_connect] = NULL;
479   surfxml_statenames[E_surfxml_trace_connect] = "trace_connect";
480   surfxml_statenames[AL_surfxml_AS] = NULL;
481   surfxml_statenames[S_surfxml_AS] = "AS";
482   surfxml_statenames[S_surfxml_AS_1] = "AS";
483   surfxml_statenames[S_surfxml_AS_2] = "AS";
484   surfxml_statenames[S_surfxml_AS_3] = "AS";
485   surfxml_statenames[S_surfxml_AS_4] = "AS";
486   surfxml_statenames[S_surfxml_AS_5] = "AS";
487   surfxml_statenames[S_surfxml_AS_6] = "AS";
488   surfxml_statenames[S_surfxml_AS_7] = "AS";
489   surfxml_statenames[S_surfxml_AS_8] = "AS";
490   surfxml_statenames[S_surfxml_AS_9] = "AS";
491   surfxml_statenames[S_surfxml_AS_10] = "AS";
492   surfxml_statenames[S_surfxml_AS_11] = "AS";
493   surfxml_statenames[S_surfxml_AS_12] = "AS";
494   surfxml_statenames[S_surfxml_AS_13] = "AS";
495   surfxml_statenames[E_surfxml_AS] = "AS";
496   surfxml_statenames[AL_surfxml_host] = NULL;
497   surfxml_statenames[S_surfxml_host] = "host";
498   surfxml_statenames[S_surfxml_host_1] = "host";
499   surfxml_statenames[S_surfxml_host_2] = "host";
500   surfxml_statenames[E_surfxml_host] = "host";
501   surfxml_statenames[AL_surfxml_cluster] = NULL;
502   surfxml_statenames[E_surfxml_cluster] = "cluster";
503   surfxml_statenames[AL_surfxml_peer] = NULL;
504   surfxml_statenames[E_surfxml_peer] = "peer";
505   surfxml_statenames[AL_surfxml_router] = NULL;
506   surfxml_statenames[E_surfxml_router] = "router";
507   surfxml_statenames[AL_surfxml_link] = NULL;
508   surfxml_statenames[S_surfxml_link] = "link";
509   surfxml_statenames[S_surfxml_link_1] = "link";
510   surfxml_statenames[S_surfxml_link_2] = "link";
511   surfxml_statenames[E_surfxml_link] = "link";
512   surfxml_statenames[AL_surfxml_route] = NULL;
513   surfxml_statenames[S_surfxml_route] = "route";
514   surfxml_statenames[S_surfxml_route_1] = "route";
515   surfxml_statenames[S_surfxml_route_2] = "route";
516   surfxml_statenames[E_surfxml_route] = "route";
517   surfxml_statenames[AL_surfxml_ASroute] = NULL;
518   surfxml_statenames[S_surfxml_ASroute] = "ASroute";
519   surfxml_statenames[S_surfxml_ASroute_1] = "ASroute";
520   surfxml_statenames[S_surfxml_ASroute_2] = "ASroute";
521   surfxml_statenames[E_surfxml_ASroute] = "ASroute";
522   surfxml_statenames[AL_surfxml_link_ctn] = NULL;
523   surfxml_statenames[E_surfxml_link_ctn] = "link_ctn";
524   surfxml_statenames[AL_surfxml_bypassRoute] = NULL;
525   surfxml_statenames[S_surfxml_bypassRoute] = "bypassRoute";
526   surfxml_statenames[S_surfxml_bypassRoute_1] = "bypassRoute";
527   surfxml_statenames[S_surfxml_bypassRoute_2] = "bypassRoute";
528   surfxml_statenames[E_surfxml_bypassRoute] = "bypassRoute";
529   surfxml_statenames[AL_surfxml_process] = NULL;
530   surfxml_statenames[S_surfxml_process] = "process";
531   surfxml_statenames[S_surfxml_process_1] = "process";
532   surfxml_statenames[S_surfxml_process_2] = "process";
533   surfxml_statenames[E_surfxml_process] = "process";
534   surfxml_statenames[AL_surfxml_argument] = NULL;
535   surfxml_statenames[E_surfxml_argument] = "argument";
536   surfxml_statenames[AL_surfxml_config] = NULL;
537   surfxml_statenames[S_surfxml_config] = "config";
538   surfxml_statenames[S_surfxml_config_1] = "config";
539   surfxml_statenames[S_surfxml_config_2] = "config";
540   surfxml_statenames[E_surfxml_config] = "config";
541   surfxml_statenames[AL_surfxml_prop] = NULL;
542   surfxml_statenames[E_surfxml_prop] = "prop";
543   }
544
545  /* COMMENTS and PIs: handled uniformly for efficiency. */
546
547 <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_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>{
548  "<!--" ENTER(INCOMMENT);
549  "<?" ENTER(INPI);
550 }
551 <INCOMMENT>{
552  "-->"          LEAVE;
553  "--"           |
554  .              |
555  \n             SKIP;
556  <<EOF>>        FAIL("EOF in comment.");
557 }
558 <INPI>{
559  "?>"           LEAVE;
560  .              |
561  \n             SKIP;
562  <<EOF>>        FAIL("EOF in PI (processing instruction).");
563 }
564
565  /* SPACES: skipped uniformly */
566
567 <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_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;
568
569  /* PROLOG: determine root element and process it. */
570
571 <PROLOG>{
572  "<?xml"({S}version{Eq}(\'{VersionNum}\'|\"{VersionNum}\"))?({S}encoding{Eq}(\'[^']*\'|\"[^"]*\"))?"?>" SET(DOCTYPE); 
573  "<?xml"[^>]*">" FAIL("Bad declaration %s.",yytext);
574 }
575
576 <PROLOG,DOCTYPE>{
577  "<!DOCTYPE"{S}"platform"{S}SYSTEM{S}("'simgrid.dtd'"|"\"simgrid.dtd\""){s}">" SET(ROOT_surfxml_platform);
578  "<!"[^>-][^>]*">" FAIL("Bad declaration %s.",yytext);
579  .              FAIL("Unexpected character `%c' in prolog.", yytext[0]);
580  <<EOF>>        FAIL("EOF in prolog.");
581 }
582
583  /* RULES DERIVED FROM DTD. */
584
585  /* <!-- Small DTD for SURF based tools. -->  */
586
587 <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.");
588
589 <ROOT_surfxml_platform>"<platform"{s} {
590   AX_surfxml_platform_version = 1;
591   ENTER(AL_surfxml_platform); pushbuffer(0);
592   }
593
594 <AL_surfxml_platform>{
595  "version"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_platform_version);
596  "version"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_platform_version);
597
598  ">" {
599   LEAVE; STag_surfxml_platform();surfxml_pcdata_ix = 0; ENTER(S_surfxml_platform);
600  }
601  "/>" {
602   LEAVE; STag_surfxml_platform(); surfxml_pcdata_ix = 0; ETag_surfxml_platform(); popbuffer(); /* attribute */
603   switch (YY_START) {
604    case ROOT_surfxml_platform: SET(EPILOG); break;
605   }
606  }
607  .       FAIL("Unexpected character `%c' in attribute list of platform element.", yytext[0]);
608  {Name} FAIL("Bad attribute `%s' in `platform' element start tag.",yytext);
609  <<EOF>> FAIL("EOF in attribute list of `platform' element.");
610 }
611
612 <S_surfxml_platform_2,S_surfxml_platform_1,S_surfxml_platform,S_surfxml_platform_4,S_surfxml_platform_6,E_surfxml_platform>{
613  "</platform"{s}">" {
614   LEAVE;
615   ETag_surfxml_platform();
616   popbuffer(); /* attribute */
617   switch (YY_START) {
618    case ROOT_surfxml_platform: SET(EPILOG); break;
619   }
620  }
621  "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</platform>' expected.",yytext);
622  .       FAIL("Unexpected character `%c': `</platform>' expected.",yytext[0]);
623  <<EOF>> FAIL("Premature EOF: `</platform>' expected.");
624 }
625
626 <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.");
627
628 <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} {
629   AX_surfxml_trace_id = 0;
630   AX_surfxml_trace_file = 0;
631   AX_surfxml_trace_periodicity = 0;
632   ENTER(AL_surfxml_trace); pushbuffer(0);
633   }
634
635 <AL_surfxml_trace>{
636  "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_id);
637  "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_id);
638
639  "file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_file);
640  "file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_file);
641
642  "periodicity"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_periodicity);
643  "periodicity"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_periodicity);
644
645  ">" {
646   if (!AX_surfxml_trace_id) FAIL("Required attribute `id' not set for `trace' element.");
647   if (!AX_surfxml_trace_periodicity) FAIL("Required attribute `periodicity' not set for `trace' element.");
648   LEAVE; STag_surfxml_trace();pushbuffer(surfxml_pcdata_ix); BUFFERSET(surfxml_pcdata_ix);; ENTER(IN_trace);
649  }
650  "/>" {
651   if (!AX_surfxml_trace_id) FAIL("Required attribute `id' not set for `trace' element.");
652   if (!AX_surfxml_trace_periodicity) FAIL("Required attribute `periodicity' not set for `trace' element.");
653   LEAVE; STag_surfxml_trace(); surfxml_pcdata_ix = 0; ETag_surfxml_trace(); popbuffer(); /* attribute */
654   switch (YY_START) {
655    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;
656    case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
657    case S_surfxml_AS_2: SET(S_surfxml_AS_3); break;
658    case S_surfxml_AS_1: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
659    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;
660    case S_surfxml_AS_12: case S_surfxml_AS_9: case S_surfxml_AS_13: SET(S_surfxml_AS_13); break;
661   }
662  }
663  .       FAIL("Unexpected character `%c' in attribute list of trace element.", yytext[0]);
664  {Name} FAIL("Bad attribute `%s' in `trace' element start tag.",yytext);
665  <<EOF>> FAIL("EOF in attribute list of `trace' element.");
666 }
667
668 <IN_trace>{
669  "</trace"{s}">" {
670   LEAVE;
671   BUFFERDONE;
672   ETag_surfxml_trace();
673   surfxml_pcdata_ix = popbuffer();
674   popbuffer(); /* attribute */
675   switch (YY_START) {
676    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;
677    case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
678    case S_surfxml_AS_2: SET(S_surfxml_AS_3); break;
679    case S_surfxml_AS_1: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
680    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;
681    case S_surfxml_AS_12: case S_surfxml_AS_9: case S_surfxml_AS_13: SET(S_surfxml_AS_13); break;
682   }
683  }
684  "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</trace>' expected.",yytext);
685  <<EOF>> FAIL("Premature EOF: `</trace>' expected.");
686 }
687
688 <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.");
689
690 <S_surfxml_config>"<random"{s} {
691   AX_surfxml_random_id = 0;
692   AX_surfxml_random_min = 0;
693   AX_surfxml_random_max = 0;
694   AX_surfxml_random_mean = 0;
695   AX_surfxml_random_std_deviation = 0;
696   AX_surfxml_random_generator = A_surfxml_random_generator_DRAND48;
697   ENTER(AL_surfxml_random); pushbuffer(0);
698   }
699
700 <AL_surfxml_random>{
701  "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_id);
702  "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_id);
703
704  "min"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_min);
705  "min"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_min);
706
707  "max"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_max);
708  "max"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_max);
709
710  "mean"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_mean);
711  "mean"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_mean);
712
713  "std_deviation"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_std_deviation);
714  "std_deviation"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_std_deviation);
715
716  "generator"{Eq}"'DRAND48'" |
717  "generator"{Eq}"\"DRAND48\"" A_surfxml_random_generator = A_surfxml_random_generator_DRAND48;
718  "generator"{Eq}"'RAND'" |
719  "generator"{Eq}"\"RAND\"" A_surfxml_random_generator = A_surfxml_random_generator_RAND;
720
721  ">" {
722   if (!AX_surfxml_random_id) FAIL("Required attribute `id' not set for `random' element.");
723   if (!AX_surfxml_random_min) FAIL("Required attribute `min' not set for `random' element.");
724   if (!AX_surfxml_random_max) FAIL("Required attribute `max' not set for `random' element.");
725   if (!AX_surfxml_random_mean) FAIL("Required attribute `mean' not set for `random' element.");
726   if (!AX_surfxml_random_std_deviation) FAIL("Required attribute `std_deviation' not set for `random' element.");
727   LEAVE; STag_surfxml_random();surfxml_pcdata_ix = 0; ENTER(S_surfxml_random);
728  }
729  "/>" {
730   if (!AX_surfxml_random_id) FAIL("Required attribute `id' not set for `random' element.");
731   if (!AX_surfxml_random_min) FAIL("Required attribute `min' not set for `random' element.");
732   if (!AX_surfxml_random_max) FAIL("Required attribute `max' not set for `random' element.");
733   if (!AX_surfxml_random_mean) FAIL("Required attribute `mean' not set for `random' element.");
734   if (!AX_surfxml_random_std_deviation) FAIL("Required attribute `std_deviation' not set for `random' element.");
735   LEAVE; STag_surfxml_random(); surfxml_pcdata_ix = 0; ETag_surfxml_random(); popbuffer(); /* attribute */
736   switch (YY_START) {
737    case S_surfxml_config: SET(E_surfxml_config); break;
738   }
739  }
740  .       FAIL("Unexpected character `%c' in attribute list of random element.", yytext[0]);
741  {Name} FAIL("Bad attribute `%s' in `random' element start tag.",yytext);
742  <<EOF>> FAIL("EOF in attribute list of `random' element.");
743 }
744
745 <S_surfxml_random_2,S_surfxml_random,E_surfxml_random>{
746  "</random"{s}">" {
747   LEAVE;
748   ETag_surfxml_random();
749   popbuffer(); /* attribute */
750   switch (YY_START) {
751    case S_surfxml_config: SET(E_surfxml_config); break;
752   }
753  }
754  "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</random>' expected.",yytext);
755  .       FAIL("Unexpected character `%c': `</random>' expected.",yytext[0]);
756  <<EOF>> FAIL("Premature EOF: `</random>' expected.");
757 }
758
759 <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.");
760
761 <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} {
762   AX_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_HOST_AVAIL;
763   AX_surfxml_trace_connect_trace = 0;
764   AX_surfxml_trace_connect_element = 0;
765   ENTER(AL_surfxml_trace_connect); pushbuffer(0);
766   }
767
768 <AL_surfxml_trace_connect>{
769  "kind"{Eq}"'HOST_AVAIL'" |
770  "kind"{Eq}"\"HOST_AVAIL\"" A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_HOST_AVAIL;
771  "kind"{Eq}"'POWER'" |
772  "kind"{Eq}"\"POWER\"" A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_POWER;
773  "kind"{Eq}"'LINK_AVAIL'" |
774  "kind"{Eq}"\"LINK_AVAIL\"" A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_LINK_AVAIL;
775  "kind"{Eq}"'BANDWIDTH'" |
776  "kind"{Eq}"\"BANDWIDTH\"" A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_BANDWIDTH;
777  "kind"{Eq}"'LATENCY'" |
778  "kind"{Eq}"\"LATENCY\"" A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_LATENCY;
779
780  "trace"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_connect_trace);
781  "trace"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_connect_trace);
782
783  "element"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_connect_element);
784  "element"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_connect_element);
785
786  ">" {
787   if (!AX_surfxml_trace_connect_trace) FAIL("Required attribute `trace' not set for `trace_connect' element.");
788   if (!AX_surfxml_trace_connect_element) FAIL("Required attribute `element' not set for `trace_connect' element.");
789   LEAVE; STag_surfxml_trace_connect();surfxml_pcdata_ix = 0; ENTER(E_surfxml_trace_connect);
790  }
791  "/>" {
792   if (!AX_surfxml_trace_connect_trace) FAIL("Required attribute `trace' not set for `trace_connect' element.");
793   if (!AX_surfxml_trace_connect_element) FAIL("Required attribute `element' not set for `trace_connect' element.");
794   LEAVE; STag_surfxml_trace_connect(); surfxml_pcdata_ix = 0; ETag_surfxml_trace_connect(); popbuffer(); /* attribute */
795   switch (YY_START) {
796    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;
797    case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
798    case S_surfxml_AS_2: SET(S_surfxml_AS_3); break;
799    case S_surfxml_AS_1: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
800    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;
801    case S_surfxml_AS_12: case S_surfxml_AS_9: case S_surfxml_AS_13: SET(S_surfxml_AS_13); break;
802   }
803  }
804  .       FAIL("Unexpected character `%c' in attribute list of trace_connect element.", yytext[0]);
805  {Name} FAIL("Bad attribute `%s' in `trace_connect' element start tag.",yytext);
806  <<EOF>> FAIL("EOF in attribute list of `trace_connect' element.");
807 }
808
809 <E_surfxml_trace_connect>{
810  "</trace_connect"{s}">" {
811   LEAVE;
812   ETag_surfxml_trace_connect();
813   popbuffer(); /* attribute */
814   switch (YY_START) {
815    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;
816    case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
817    case S_surfxml_AS_2: SET(S_surfxml_AS_3); break;
818    case S_surfxml_AS_1: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
819    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;
820    case S_surfxml_AS_12: case S_surfxml_AS_9: case S_surfxml_AS_13: SET(S_surfxml_AS_13); break;
821   }
822  }
823  "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</trace_connect>' expected.",yytext);
824  .       FAIL("Unexpected character `%c': `</trace_connect>' expected.",yytext[0]);
825  <<EOF>> FAIL("Premature EOF: `</trace_connect>' expected.");
826 }
827
828 <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.");
829
830 <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} {
831   AX_surfxml_AS_id = 0;
832   AX_surfxml_AS_routing = 0;
833   ENTER(AL_surfxml_AS); pushbuffer(0);
834   }
835
836 <AL_surfxml_AS>{
837  "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_AS_id);
838  "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_AS_id);
839
840  "routing"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_AS_routing);
841  "routing"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_AS_routing);
842
843  ">" {
844   if (!AX_surfxml_AS_id) FAIL("Required attribute `id' not set for `AS' element.");
845   if (!AX_surfxml_AS_routing) FAIL("Required attribute `routing' not set for `AS' element.");
846   LEAVE; STag_surfxml_AS();surfxml_pcdata_ix = 0; ENTER(S_surfxml_AS);
847  }
848  "/>" {
849   if (!AX_surfxml_AS_id) FAIL("Required attribute `id' not set for `AS' element.");
850   if (!AX_surfxml_AS_routing) FAIL("Required attribute `routing' not set for `AS' element.");
851   LEAVE; STag_surfxml_AS(); surfxml_pcdata_ix = 0; ETag_surfxml_AS(); popbuffer(); /* attribute */
852   switch (YY_START) {
853    case S_surfxml_AS_2: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
854    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;
855   }
856  }
857  .       FAIL("Unexpected character `%c' in attribute list of AS element.", yytext[0]);
858  {Name} FAIL("Bad attribute `%s' in `AS' element start tag.",yytext);
859  <<EOF>> FAIL("EOF in attribute list of `AS' element.");
860 }
861
862 <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>{
863  "</AS"{s}">" {
864   LEAVE;
865   ETag_surfxml_AS();
866   popbuffer(); /* attribute */
867   switch (YY_START) {
868    case S_surfxml_AS_2: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
869    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;
870   }
871  }
872  "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</AS>' expected.",yytext);
873  .       FAIL("Unexpected character `%c': `</AS>' expected.",yytext[0]);
874  <<EOF>> FAIL("Premature EOF: `</AS>' expected.");
875 }
876
877 <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.");
878
879 <S_surfxml_AS_11,S_surfxml_AS_10,S_surfxml_AS>"<host"{s} {
880   AX_surfxml_host_id = 0;
881   AX_surfxml_host_power = 0;
882   AX_surfxml_host_core = 5;
883   AX_surfxml_host_availability = 7;
884   AX_surfxml_host_availability_file = 0;
885   AX_surfxml_host_state = A_surfxml_host_state_ON;
886   AX_surfxml_host_state_file = 0;
887   AX_surfxml_host_coordinates = 0;
888   ENTER(AL_surfxml_host); pushbuffer(0);
889   }
890
891 <AL_surfxml_host>{
892  "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_id);
893  "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_id);
894
895  "power"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_power);
896  "power"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_power);
897
898  "core"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_core);
899  "core"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_core);
900
901  "availability"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_availability);
902  "availability"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_availability);
903
904  "availability_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_availability_file);
905  "availability_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_availability_file);
906
907  "state"{Eq}"'ON'" |
908  "state"{Eq}"\"ON\"" A_surfxml_host_state = A_surfxml_host_state_ON;
909  "state"{Eq}"'OFF'" |
910  "state"{Eq}"\"OFF\"" A_surfxml_host_state = A_surfxml_host_state_OFF;
911
912  "state_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_state_file);
913  "state_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_state_file);
914
915  "coordinates"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_coordinates);
916  "coordinates"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_coordinates);
917
918  ">" {
919   if (!AX_surfxml_host_id) FAIL("Required attribute `id' not set for `host' element.");
920   if (!AX_surfxml_host_power) FAIL("Required attribute `power' not set for `host' element.");
921   LEAVE; STag_surfxml_host();surfxml_pcdata_ix = 0; ENTER(S_surfxml_host);
922  }
923  "/>" {
924   if (!AX_surfxml_host_id) FAIL("Required attribute `id' not set for `host' element.");
925   if (!AX_surfxml_host_power) FAIL("Required attribute `power' not set for `host' element.");
926   LEAVE; STag_surfxml_host(); surfxml_pcdata_ix = 0; ETag_surfxml_host(); popbuffer(); /* attribute */
927   switch (YY_START) {
928    case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
929   }
930  }
931  .       FAIL("Unexpected character `%c' in attribute list of host element.", yytext[0]);
932  {Name} FAIL("Bad attribute `%s' in `host' element start tag.",yytext);
933  <<EOF>> FAIL("EOF in attribute list of `host' element.");
934 }
935
936 <S_surfxml_host,E_surfxml_host,S_surfxml_host_2>{
937  "</host"{s}">" {
938   LEAVE;
939   ETag_surfxml_host();
940   popbuffer(); /* attribute */
941   switch (YY_START) {
942    case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
943   }
944  }
945  "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</host>' expected.",yytext);
946  .       FAIL("Unexpected character `%c': `</host>' expected.",yytext[0]);
947  <<EOF>> FAIL("Premature EOF: `</host>' expected.");
948 }
949
950 <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.");
951
952 <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} {
953   AX_surfxml_cluster_id = 0;
954   AX_surfxml_cluster_prefix = 0;
955   AX_surfxml_cluster_suffix = 0;
956   AX_surfxml_cluster_radical = 0;
957   AX_surfxml_cluster_power = 0;
958   AX_surfxml_cluster_core = 11;
959   AX_surfxml_cluster_bw = 0;
960   AX_surfxml_cluster_lat = 0;
961   AX_surfxml_cluster_sharing_policy = A_surfxml_cluster_sharing_policy_SHARED;
962   AX_surfxml_cluster_bb_bw = 0;
963   AX_surfxml_cluster_bb_lat = 0;
964   AX_surfxml_cluster_bb_sharing_policy = A_surfxml_cluster_bb_sharing_policy_SHARED;
965   ENTER(AL_surfxml_cluster); pushbuffer(0);
966   }
967
968 <AL_surfxml_cluster>{
969  "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_id);
970  "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_id);
971
972  "prefix"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_prefix);
973  "prefix"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_prefix);
974
975  "suffix"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_suffix);
976  "suffix"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_suffix);
977
978  "radical"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_radical);
979  "radical"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_radical);
980
981  "power"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_power);
982  "power"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_power);
983
984  "core"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_core);
985  "core"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_core);
986
987  "bw"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_bw);
988  "bw"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_bw);
989
990  "lat"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_lat);
991  "lat"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_lat);
992
993  "sharing_policy"{Eq}"'SHARED'" |
994  "sharing_policy"{Eq}"\"SHARED\"" A_surfxml_cluster_sharing_policy = A_surfxml_cluster_sharing_policy_SHARED;
995  "sharing_policy"{Eq}"'FULLDUPLEX'" |
996  "sharing_policy"{Eq}"\"FULLDUPLEX\"" A_surfxml_cluster_sharing_policy = A_surfxml_cluster_sharing_policy_FULLDUPLEX;
997  "sharing_policy"{Eq}"'FATPIPE'" |
998  "sharing_policy"{Eq}"\"FATPIPE\"" A_surfxml_cluster_sharing_policy = A_surfxml_cluster_sharing_policy_FATPIPE;
999
1000  "bb_bw"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_bb_bw);
1001  "bb_bw"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_bb_bw);
1002
1003  "bb_lat"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_bb_lat);
1004  "bb_lat"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_bb_lat);
1005
1006  "bb_sharing_policy"{Eq}"'SHARED'" |
1007  "bb_sharing_policy"{Eq}"\"SHARED\"" A_surfxml_cluster_bb_sharing_policy = A_surfxml_cluster_bb_sharing_policy_SHARED;
1008  "bb_sharing_policy"{Eq}"'FATPIPE'" |
1009  "bb_sharing_policy"{Eq}"\"FATPIPE\"" A_surfxml_cluster_bb_sharing_policy = A_surfxml_cluster_bb_sharing_policy_FATPIPE;
1010
1011  ">" {
1012   if (!AX_surfxml_cluster_id) FAIL("Required attribute `id' not set for `cluster' element.");
1013   if (!AX_surfxml_cluster_prefix) FAIL("Required attribute `prefix' not set for `cluster' element.");
1014   if (!AX_surfxml_cluster_suffix) FAIL("Required attribute `suffix' not set for `cluster' element.");
1015   if (!AX_surfxml_cluster_radical) FAIL("Required attribute `radical' not set for `cluster' element.");
1016   if (!AX_surfxml_cluster_power) FAIL("Required attribute `power' not set for `cluster' element.");
1017   if (!AX_surfxml_cluster_bw) FAIL("Required attribute `bw' not set for `cluster' element.");
1018   if (!AX_surfxml_cluster_lat) FAIL("Required attribute `lat' not set for `cluster' element.");
1019   if (!AX_surfxml_cluster_bb_bw) FAIL("Required attribute `bb_bw' not set for `cluster' element.");
1020   if (!AX_surfxml_cluster_bb_lat) FAIL("Required attribute `bb_lat' not set for `cluster' element.");
1021   LEAVE; STag_surfxml_cluster();surfxml_pcdata_ix = 0; ENTER(E_surfxml_cluster);
1022  }
1023  "/>" {
1024   if (!AX_surfxml_cluster_id) FAIL("Required attribute `id' not set for `cluster' element.");
1025   if (!AX_surfxml_cluster_prefix) FAIL("Required attribute `prefix' not set for `cluster' element.");
1026   if (!AX_surfxml_cluster_suffix) FAIL("Required attribute `suffix' not set for `cluster' element.");
1027   if (!AX_surfxml_cluster_radical) FAIL("Required attribute `radical' not set for `cluster' element.");
1028   if (!AX_surfxml_cluster_power) FAIL("Required attribute `power' not set for `cluster' element.");
1029   if (!AX_surfxml_cluster_bw) FAIL("Required attribute `bw' not set for `cluster' element.");
1030   if (!AX_surfxml_cluster_lat) FAIL("Required attribute `lat' not set for `cluster' element.");
1031   if (!AX_surfxml_cluster_bb_bw) FAIL("Required attribute `bb_bw' not set for `cluster' element.");
1032   if (!AX_surfxml_cluster_bb_lat) FAIL("Required attribute `bb_lat' not set for `cluster' element.");
1033   LEAVE; STag_surfxml_cluster(); surfxml_pcdata_ix = 0; ETag_surfxml_cluster(); popbuffer(); /* attribute */
1034   switch (YY_START) {
1035    case S_surfxml_AS_2: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
1036    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;
1037   }
1038  }
1039  .       FAIL("Unexpected character `%c' in attribute list of cluster element.", yytext[0]);
1040  {Name} FAIL("Bad attribute `%s' in `cluster' element start tag.",yytext);
1041  <<EOF>> FAIL("EOF in attribute list of `cluster' element.");
1042 }
1043
1044 <E_surfxml_cluster>{
1045  "</cluster"{s}">" {
1046   LEAVE;
1047   ETag_surfxml_cluster();
1048   popbuffer(); /* attribute */
1049   switch (YY_START) {
1050    case S_surfxml_AS_2: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
1051    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;
1052   }
1053  }
1054  "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</cluster>' expected.",yytext);
1055  .       FAIL("Unexpected character `%c': `</cluster>' expected.",yytext[0]);
1056  <<EOF>> FAIL("Premature EOF: `</cluster>' expected.");
1057 }
1058
1059 <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,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,ROOT_surfxml_peer,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,E_surfxml_bypassRoute>"<peer"{s} FAIL("Starting tag <peer> is not allowed here.");
1060
1061 <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>"<peer"{s} {
1062   AX_surfxml_peer_id = 0;
1063   AX_surfxml_peer_power = 0;
1064   AX_surfxml_peer_bw_in = 0;
1065   AX_surfxml_peer_bw_out = 0;
1066   AX_surfxml_peer_lat = 0;
1067   AX_surfxml_peer_coordinates = 0;
1068   AX_surfxml_peer_sharing_policy = A_surfxml_peer_sharing_policy_FULLDUPLEX;
1069   ENTER(AL_surfxml_peer); pushbuffer(0);
1070   }
1071
1072 <AL_surfxml_peer>{
1073  "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_id);
1074  "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_id);
1075
1076  "power"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_power);
1077  "power"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_power);
1078
1079  "bw_in"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_bw_in);
1080  "bw_in"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_bw_in);
1081
1082  "bw_out"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_bw_out);
1083  "bw_out"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_bw_out);
1084
1085  "lat"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_lat);
1086  "lat"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_lat);
1087
1088  "coordinates"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_coordinates);
1089  "coordinates"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_coordinates);
1090
1091  "sharing_policy"{Eq}"'SHARED'" |
1092  "sharing_policy"{Eq}"\"SHARED\"" A_surfxml_peer_sharing_policy = A_surfxml_peer_sharing_policy_SHARED;
1093  "sharing_policy"{Eq}"'FULLDUPLEX'" |
1094  "sharing_policy"{Eq}"\"FULLDUPLEX\"" A_surfxml_peer_sharing_policy = A_surfxml_peer_sharing_policy_FULLDUPLEX;
1095
1096  ">" {
1097   if (!AX_surfxml_peer_id) FAIL("Required attribute `id' not set for `peer' element.");
1098   if (!AX_surfxml_peer_power) FAIL("Required attribute `power' not set for `peer' element.");
1099   if (!AX_surfxml_peer_bw_in) FAIL("Required attribute `bw_in' not set for `peer' element.");
1100   if (!AX_surfxml_peer_bw_out) FAIL("Required attribute `bw_out' not set for `peer' element.");
1101   if (!AX_surfxml_peer_lat) FAIL("Required attribute `lat' not set for `peer' element.");
1102   LEAVE; STag_surfxml_peer();surfxml_pcdata_ix = 0; ENTER(E_surfxml_peer);
1103  }
1104  "/>" {
1105   if (!AX_surfxml_peer_id) FAIL("Required attribute `id' not set for `peer' element.");
1106   if (!AX_surfxml_peer_power) FAIL("Required attribute `power' not set for `peer' element.");
1107   if (!AX_surfxml_peer_bw_in) FAIL("Required attribute `bw_in' not set for `peer' element.");
1108   if (!AX_surfxml_peer_bw_out) FAIL("Required attribute `bw_out' not set for `peer' element.");
1109   if (!AX_surfxml_peer_lat) FAIL("Required attribute `lat' not set for `peer' element.");
1110   LEAVE; STag_surfxml_peer(); surfxml_pcdata_ix = 0; ETag_surfxml_peer(); popbuffer(); /* attribute */
1111   switch (YY_START) {
1112    case S_surfxml_AS_2: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
1113    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;
1114   }
1115  }
1116  .       FAIL("Unexpected character `%c' in attribute list of peer element.", yytext[0]);
1117  {Name} FAIL("Bad attribute `%s' in `peer' element start tag.",yytext);
1118  <<EOF>> FAIL("EOF in attribute list of `peer' element.");
1119 }
1120
1121 <E_surfxml_peer>{
1122  "</peer"{s}">" {
1123   LEAVE;
1124   ETag_surfxml_peer();
1125   popbuffer(); /* attribute */
1126   switch (YY_START) {
1127    case S_surfxml_AS_2: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
1128    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;
1129   }
1130  }
1131  "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</peer>' expected.",yytext);
1132  .       FAIL("Unexpected character `%c': `</peer>' expected.",yytext[0]);
1133  <<EOF>> FAIL("Premature EOF: `</peer>' expected.");
1134 }
1135
1136 <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.");
1137
1138 <S_surfxml_AS_11,S_surfxml_AS_10,S_surfxml_AS>"<router"{s} {
1139   AX_surfxml_router_id = 0;
1140   AX_surfxml_router_coordinates = 0;
1141   ENTER(AL_surfxml_router); pushbuffer(0);
1142   }
1143
1144 <AL_surfxml_router>{
1145  "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_router_id);
1146  "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_router_id);
1147
1148  "coordinates"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_router_coordinates);
1149  "coordinates"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_router_coordinates);
1150
1151  ">" {
1152   if (!AX_surfxml_router_id) FAIL("Required attribute `id' not set for `router' element.");
1153   LEAVE; STag_surfxml_router();surfxml_pcdata_ix = 0; ENTER(E_surfxml_router);
1154  }
1155  "/>" {
1156   if (!AX_surfxml_router_id) FAIL("Required attribute `id' not set for `router' element.");
1157   LEAVE; STag_surfxml_router(); surfxml_pcdata_ix = 0; ETag_surfxml_router(); popbuffer(); /* attribute */
1158   switch (YY_START) {
1159    case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
1160   }
1161  }
1162  .       FAIL("Unexpected character `%c' in attribute list of router element.", yytext[0]);
1163  {Name} FAIL("Bad attribute `%s' in `router' element start tag.",yytext);
1164  <<EOF>> FAIL("EOF in attribute list of `router' element.");
1165 }
1166
1167 <E_surfxml_router>{
1168  "</router"{s}">" {
1169   LEAVE;
1170   ETag_surfxml_router();
1171   popbuffer(); /* attribute */
1172   switch (YY_START) {
1173    case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
1174   }
1175  }
1176  "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</router>' expected.",yytext);
1177  .       FAIL("Unexpected character `%c': `</router>' expected.",yytext[0]);
1178  <<EOF>> FAIL("Premature EOF: `</router>' expected.");
1179 }
1180
1181 <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.");
1182
1183 <S_surfxml_AS_11,S_surfxml_AS_2,S_surfxml_AS_10,S_surfxml_AS,S_surfxml_AS_3>"<link"{s} {
1184   AX_surfxml_link_id = 0;
1185   AX_surfxml_link_bandwidth = 0;
1186   AX_surfxml_link_bandwidth_file = 0;
1187   AX_surfxml_link_latency = 13;
1188   AX_surfxml_link_latency_file = 0;
1189   AX_surfxml_link_state = A_surfxml_link_state_ON;
1190   AX_surfxml_link_state_file = 0;
1191   AX_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
1192   ENTER(AL_surfxml_link); pushbuffer(0);
1193   }
1194
1195 <AL_surfxml_link>{
1196  "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_id);
1197  "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_id);
1198
1199  "bandwidth"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_bandwidth);
1200  "bandwidth"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_bandwidth);
1201
1202  "bandwidth_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_bandwidth_file);
1203  "bandwidth_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_bandwidth_file);
1204
1205  "latency"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_latency);
1206  "latency"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_latency);
1207
1208  "latency_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_latency_file);
1209  "latency_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_latency_file);
1210
1211  "state"{Eq}"'ON'" |
1212  "state"{Eq}"\"ON\"" A_surfxml_link_state = A_surfxml_link_state_ON;
1213  "state"{Eq}"'OFF'" |
1214  "state"{Eq}"\"OFF\"" A_surfxml_link_state = A_surfxml_link_state_OFF;
1215
1216  "state_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_state_file);
1217  "state_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_state_file);
1218
1219  "sharing_policy"{Eq}"'SHARED'" |
1220  "sharing_policy"{Eq}"\"SHARED\"" A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
1221  "sharing_policy"{Eq}"'FATPIPE'" |
1222  "sharing_policy"{Eq}"\"FATPIPE\"" A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_FATPIPE;
1223  "sharing_policy"{Eq}"'FULLDUPLEX'" |
1224  "sharing_policy"{Eq}"\"FULLDUPLEX\"" A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_FULLDUPLEX;
1225
1226  ">" {
1227   if (!AX_surfxml_link_id) FAIL("Required attribute `id' not set for `link' element.");
1228   if (!AX_surfxml_link_bandwidth) FAIL("Required attribute `bandwidth' not set for `link' element.");
1229   LEAVE; STag_surfxml_link();surfxml_pcdata_ix = 0; ENTER(S_surfxml_link);
1230  }
1231  "/>" {
1232   if (!AX_surfxml_link_id) FAIL("Required attribute `id' not set for `link' element.");
1233   if (!AX_surfxml_link_bandwidth) FAIL("Required attribute `bandwidth' not set for `link' element.");
1234   LEAVE; STag_surfxml_link(); surfxml_pcdata_ix = 0; ETag_surfxml_link(); popbuffer(); /* attribute */
1235   switch (YY_START) {
1236    case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
1237    case S_surfxml_AS_2: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
1238   }
1239  }
1240  .       FAIL("Unexpected character `%c' in attribute list of link element.", yytext[0]);
1241  {Name} FAIL("Bad attribute `%s' in `link' element start tag.",yytext);
1242  <<EOF>> FAIL("EOF in attribute list of `link' element.");
1243 }
1244
1245 <E_surfxml_link,S_surfxml_link_2,S_surfxml_link>{
1246  "</link"{s}">" {
1247   LEAVE;
1248   ETag_surfxml_link();
1249   popbuffer(); /* attribute */
1250   switch (YY_START) {
1251    case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
1252    case S_surfxml_AS_2: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
1253   }
1254  }
1255  "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</link>' expected.",yytext);
1256  .       FAIL("Unexpected character `%c': `</link>' expected.",yytext[0]);
1257  <<EOF>> FAIL("Premature EOF: `</link>' expected.");
1258 }
1259
1260 <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.");
1261
1262 <S_surfxml_AS_12,S_surfxml_AS_9,S_surfxml_AS_11,S_surfxml_AS_13,S_surfxml_AS>"<route"{s} {
1263   AX_surfxml_route_src = 0;
1264   AX_surfxml_route_dst = 0;
1265   AX_surfxml_route_symmetrical = A_surfxml_route_symmetrical_YES;
1266   ENTER(AL_surfxml_route); pushbuffer(0);
1267   }
1268
1269 <AL_surfxml_route>{
1270  "src"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_route_src);
1271  "src"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_route_src);
1272
1273  "dst"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_route_dst);
1274  "dst"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_route_dst);
1275
1276  "symmetrical"{Eq}"'YES'" |
1277  "symmetrical"{Eq}"\"YES\"" A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_YES;
1278  "symmetrical"{Eq}"'NO'" |
1279  "symmetrical"{Eq}"\"NO\"" A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_NO;
1280
1281  ">" {
1282   if (!AX_surfxml_route_src) FAIL("Required attribute `src' not set for `route' element.");
1283   if (!AX_surfxml_route_dst) FAIL("Required attribute `dst' not set for `route' element.");
1284   LEAVE; STag_surfxml_route();surfxml_pcdata_ix = 0; ENTER(S_surfxml_route);
1285  }
1286  "/>" {
1287   if (!AX_surfxml_route_src) FAIL("Required attribute `src' not set for `route' element.");
1288   if (!AX_surfxml_route_dst) FAIL("Required attribute `dst' not set for `route' element.");
1289   LEAVE; STag_surfxml_route(); surfxml_pcdata_ix = 0; ETag_surfxml_route(); popbuffer(); /* attribute */
1290   switch (YY_START) {
1291    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;
1292   }
1293  }
1294  .       FAIL("Unexpected character `%c' in attribute list of route element.", yytext[0]);
1295  {Name} FAIL("Bad attribute `%s' in `route' element start tag.",yytext);
1296  <<EOF>> FAIL("EOF in attribute list of `route' element.");
1297 }
1298
1299 <S_surfxml_route,S_surfxml_route_2,E_surfxml_route>{
1300  "</route"{s}">" {
1301   LEAVE;
1302   ETag_surfxml_route();
1303   popbuffer(); /* attribute */
1304   switch (YY_START) {
1305    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;
1306   }
1307  }
1308  "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</route>' expected.",yytext);
1309  .       FAIL("Unexpected character `%c': `</route>' expected.",yytext[0]);
1310  <<EOF>> FAIL("Premature EOF: `</route>' expected.");
1311 }
1312
1313 <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.");
1314
1315 <S_surfxml_AS_1,S_surfxml_AS_5,S_surfxml_AS,S_surfxml_AS_6,S_surfxml_AS_3>"<ASroute"{s} {
1316   AX_surfxml_ASroute_src = 0;
1317   AX_surfxml_ASroute_dst = 0;
1318   AX_surfxml_ASroute_gw_src = 0;
1319   AX_surfxml_ASroute_gw_dst = 0;
1320   AX_surfxml_ASroute_symmetrical = A_surfxml_ASroute_symmetrical_YES;
1321   ENTER(AL_surfxml_ASroute); pushbuffer(0);
1322   }
1323
1324 <AL_surfxml_ASroute>{
1325  "src"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_src);
1326  "src"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_src);
1327
1328  "dst"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_dst);
1329  "dst"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_dst);
1330
1331  "gw_src"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_gw_src);
1332  "gw_src"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_gw_src);
1333
1334  "gw_dst"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_gw_dst);
1335  "gw_dst"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_gw_dst);
1336
1337  "symmetrical"{Eq}"'YES'" |
1338  "symmetrical"{Eq}"\"YES\"" A_surfxml_ASroute_symmetrical = A_surfxml_ASroute_symmetrical_YES;
1339  "symmetrical"{Eq}"'NO'" |
1340  "symmetrical"{Eq}"\"NO\"" A_surfxml_ASroute_symmetrical = A_surfxml_ASroute_symmetrical_NO;
1341
1342  ">" {
1343   if (!AX_surfxml_ASroute_src) FAIL("Required attribute `src' not set for `ASroute' element.");
1344   if (!AX_surfxml_ASroute_dst) FAIL("Required attribute `dst' not set for `ASroute' element.");
1345   if (!AX_surfxml_ASroute_gw_src) FAIL("Required attribute `gw_src' not set for `ASroute' element.");
1346   if (!AX_surfxml_ASroute_gw_dst) FAIL("Required attribute `gw_dst' not set for `ASroute' element.");
1347   LEAVE; STag_surfxml_ASroute();surfxml_pcdata_ix = 0; ENTER(S_surfxml_ASroute);
1348  }
1349  "/>" {
1350   if (!AX_surfxml_ASroute_src) FAIL("Required attribute `src' not set for `ASroute' element.");
1351   if (!AX_surfxml_ASroute_dst) FAIL("Required attribute `dst' not set for `ASroute' element.");
1352   if (!AX_surfxml_ASroute_gw_src) FAIL("Required attribute `gw_src' not set for `ASroute' element.");
1353   if (!AX_surfxml_ASroute_gw_dst) FAIL("Required attribute `gw_dst' not set for `ASroute' element.");
1354   LEAVE; STag_surfxml_ASroute(); surfxml_pcdata_ix = 0; ETag_surfxml_ASroute(); popbuffer(); /* attribute */
1355   switch (YY_START) {
1356    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;
1357   }
1358  }
1359  .       FAIL("Unexpected character `%c' in attribute list of ASroute element.", yytext[0]);
1360  {Name} FAIL("Bad attribute `%s' in `ASroute' element start tag.",yytext);
1361  <<EOF>> FAIL("EOF in attribute list of `ASroute' element.");
1362 }
1363
1364 <E_surfxml_ASroute,S_surfxml_ASroute,S_surfxml_ASroute_2>{
1365  "</ASroute"{s}">" {
1366   LEAVE;
1367   ETag_surfxml_ASroute();
1368   popbuffer(); /* attribute */
1369   switch (YY_START) {
1370    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;
1371   }
1372  }
1373  "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</ASroute>' expected.",yytext);
1374  .       FAIL("Unexpected character `%c': `</ASroute>' expected.",yytext[0]);
1375  <<EOF>> FAIL("Premature EOF: `</ASroute>' expected.");
1376 }
1377
1378 <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.");
1379
1380 <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} {
1381   AX_surfxml_link_ctn_id = 0;
1382   AX_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
1383   ENTER(AL_surfxml_link_ctn); pushbuffer(0);
1384   }
1385
1386 <AL_surfxml_link_ctn>{
1387  "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_ctn_id);
1388  "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_ctn_id);
1389
1390  "direction"{Eq}"'UP'" |
1391  "direction"{Eq}"\"UP\"" A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_UP;
1392  "direction"{Eq}"'DOWN'" |
1393  "direction"{Eq}"\"DOWN\"" A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_DOWN;
1394  "direction"{Eq}"'NONE'" |
1395  "direction"{Eq}"\"NONE\"" A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
1396
1397  ">" {
1398   if (!AX_surfxml_link_ctn_id) FAIL("Required attribute `id' not set for `link_ctn' element.");
1399   LEAVE; STag_surfxml_link_ctn();surfxml_pcdata_ix = 0; ENTER(E_surfxml_link_ctn);
1400  }
1401  "/>" {
1402   if (!AX_surfxml_link_ctn_id) FAIL("Required attribute `id' not set for `link_ctn' element.");
1403   LEAVE; STag_surfxml_link_ctn(); surfxml_pcdata_ix = 0; ETag_surfxml_link_ctn(); popbuffer(); /* attribute */
1404   switch (YY_START) {
1405    case S_surfxml_bypassRoute: case S_surfxml_bypassRoute_2: case S_surfxml_bypassRoute_1: SET(S_surfxml_bypassRoute_2); break;
1406    case S_surfxml_route_1: case S_surfxml_route: case S_surfxml_route_2: SET(S_surfxml_route_2); break;
1407    case S_surfxml_ASroute: case S_surfxml_ASroute_1: case S_surfxml_ASroute_2: SET(S_surfxml_ASroute_2); break;
1408   }
1409  }
1410  .       FAIL("Unexpected character `%c' in attribute list of link_ctn element.", yytext[0]);
1411  {Name} FAIL("Bad attribute `%s' in `link_ctn' element start tag.",yytext);
1412  <<EOF>> FAIL("EOF in attribute list of `link_ctn' element.");
1413 }
1414
1415 <E_surfxml_link_ctn>{
1416  "</link_ctn"{s}">" {
1417   LEAVE;
1418   ETag_surfxml_link_ctn();
1419   popbuffer(); /* attribute */
1420   switch (YY_START) {
1421    case S_surfxml_bypassRoute: case S_surfxml_bypassRoute_2: case S_surfxml_bypassRoute_1: SET(S_surfxml_bypassRoute_2); break;
1422    case S_surfxml_route_1: case S_surfxml_route: case S_surfxml_route_2: SET(S_surfxml_route_2); break;
1423    case S_surfxml_ASroute: case S_surfxml_ASroute_1: case S_surfxml_ASroute_2: SET(S_surfxml_ASroute_2); break;
1424   }
1425  }
1426  "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</link_ctn>' expected.",yytext);
1427  .       FAIL("Unexpected character `%c': `</link_ctn>' expected.",yytext[0]);
1428  <<EOF>> FAIL("Premature EOF: `</link_ctn>' expected.");
1429 }
1430
1431 <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.");
1432
1433 <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} {
1434   AX_surfxml_bypassRoute_src = 0;
1435   AX_surfxml_bypassRoute_dst = 0;
1436   AX_surfxml_bypassRoute_gw_src = 0;
1437   AX_surfxml_bypassRoute_gw_dst = 0;
1438   ENTER(AL_surfxml_bypassRoute); pushbuffer(0);
1439   }
1440
1441 <AL_surfxml_bypassRoute>{
1442  "src"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_src);
1443  "src"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_src);
1444
1445  "dst"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_dst);
1446  "dst"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_dst);
1447
1448  "gw_src"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_gw_src);
1449  "gw_src"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_gw_src);
1450
1451  "gw_dst"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_gw_dst);
1452  "gw_dst"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_gw_dst);
1453
1454  ">" {
1455   if (!AX_surfxml_bypassRoute_src) FAIL("Required attribute `src' not set for `bypassRoute' element.");
1456   if (!AX_surfxml_bypassRoute_dst) FAIL("Required attribute `dst' not set for `bypassRoute' element.");
1457   if (!AX_surfxml_bypassRoute_gw_src) FAIL("Required attribute `gw_src' not set for `bypassRoute' element.");
1458   if (!AX_surfxml_bypassRoute_gw_dst) FAIL("Required attribute `gw_dst' not set for `bypassRoute' element.");
1459   LEAVE; STag_surfxml_bypassRoute();surfxml_pcdata_ix = 0; ENTER(S_surfxml_bypassRoute);
1460  }
1461  "/>" {
1462   if (!AX_surfxml_bypassRoute_src) FAIL("Required attribute `src' not set for `bypassRoute' element.");
1463   if (!AX_surfxml_bypassRoute_dst) FAIL("Required attribute `dst' not set for `bypassRoute' element.");
1464   if (!AX_surfxml_bypassRoute_gw_src) FAIL("Required attribute `gw_src' not set for `bypassRoute' element.");
1465   if (!AX_surfxml_bypassRoute_gw_dst) FAIL("Required attribute `gw_dst' not set for `bypassRoute' element.");
1466   LEAVE; STag_surfxml_bypassRoute(); surfxml_pcdata_ix = 0; ETag_surfxml_bypassRoute(); popbuffer(); /* attribute */
1467   switch (YY_START) {
1468    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;
1469   }
1470  }
1471  .       FAIL("Unexpected character `%c' in attribute list of bypassRoute element.", yytext[0]);
1472  {Name} FAIL("Bad attribute `%s' in `bypassRoute' element start tag.",yytext);
1473  <<EOF>> FAIL("EOF in attribute list of `bypassRoute' element.");
1474 }
1475
1476 <S_surfxml_bypassRoute,S_surfxml_bypassRoute_2,E_surfxml_bypassRoute>{
1477  "</bypassRoute"{s}">" {
1478   LEAVE;
1479   ETag_surfxml_bypassRoute();
1480   popbuffer(); /* attribute */
1481   switch (YY_START) {
1482    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;
1483   }
1484  }
1485  "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</bypassRoute>' expected.",yytext);
1486  .       FAIL("Unexpected character `%c': `</bypassRoute>' expected.",yytext[0]);
1487  <<EOF>> FAIL("Premature EOF: `</bypassRoute>' expected.");
1488 }
1489
1490 <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.");
1491
1492 <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} {
1493   AX_surfxml_process_host = 0;
1494   AX_surfxml_process_function = 0;
1495   AX_surfxml_process_start_time = 17;
1496   AX_surfxml_process_kill_time = 22;
1497   ENTER(AL_surfxml_process); pushbuffer(0);
1498   }
1499
1500 <AL_surfxml_process>{
1501  "host"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_process_host);
1502  "host"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_process_host);
1503
1504  "function"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_process_function);
1505  "function"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_process_function);
1506
1507  "start_time"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_process_start_time);
1508  "start_time"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_process_start_time);
1509
1510  "kill_time"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_process_kill_time);
1511  "kill_time"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_process_kill_time);
1512
1513  ">" {
1514   if (!AX_surfxml_process_host) FAIL("Required attribute `host' not set for `process' element.");
1515   if (!AX_surfxml_process_function) FAIL("Required attribute `function' not set for `process' element.");
1516   LEAVE; STag_surfxml_process();surfxml_pcdata_ix = 0; ENTER(S_surfxml_process);
1517  }
1518  "/>" {
1519   if (!AX_surfxml_process_host) FAIL("Required attribute `host' not set for `process' element.");
1520   if (!AX_surfxml_process_function) FAIL("Required attribute `function' not set for `process' element.");
1521   LEAVE; STag_surfxml_process(); surfxml_pcdata_ix = 0; ETag_surfxml_process(); popbuffer(); /* attribute */
1522   switch (YY_START) {
1523    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;
1524   }
1525  }
1526  .       FAIL("Unexpected character `%c' in attribute list of process element.", yytext[0]);
1527  {Name} FAIL("Bad attribute `%s' in `process' element start tag.",yytext);
1528  <<EOF>> FAIL("EOF in attribute list of `process' element.");
1529 }
1530
1531 <E_surfxml_process,S_surfxml_process,S_surfxml_process_2>{
1532  "</process"{s}">" {
1533   LEAVE;
1534   ETag_surfxml_process();
1535   popbuffer(); /* attribute */
1536   switch (YY_START) {
1537    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;
1538   }
1539  }
1540  "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</process>' expected.",yytext);
1541  .       FAIL("Unexpected character `%c': `</process>' expected.",yytext[0]);
1542  <<EOF>> FAIL("Premature EOF: `</process>' expected.");
1543 }
1544
1545 <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.");
1546
1547 <S_surfxml_process_1,S_surfxml_process,S_surfxml_process_2>"<argument"{s} {
1548   AX_surfxml_argument_value = 0;
1549   ENTER(AL_surfxml_argument); pushbuffer(0);
1550   }
1551
1552 <AL_surfxml_argument>{
1553  "value"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_argument_value);
1554  "value"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_argument_value);
1555
1556  ">" {
1557   if (!AX_surfxml_argument_value) FAIL("Required attribute `value' not set for `argument' element.");
1558   LEAVE; STag_surfxml_argument();surfxml_pcdata_ix = 0; ENTER(E_surfxml_argument);
1559  }
1560  "/>" {
1561   if (!AX_surfxml_argument_value) FAIL("Required attribute `value' not set for `argument' element.");
1562   LEAVE; STag_surfxml_argument(); surfxml_pcdata_ix = 0; ETag_surfxml_argument(); popbuffer(); /* attribute */
1563   switch (YY_START) {
1564    case S_surfxml_process_1: case S_surfxml_process: case S_surfxml_process_2: SET(S_surfxml_process_2); break;
1565   }
1566  }
1567  .       FAIL("Unexpected character `%c' in attribute list of argument element.", yytext[0]);
1568  {Name} FAIL("Bad attribute `%s' in `argument' element start tag.",yytext);
1569  <<EOF>> FAIL("EOF in attribute list of `argument' element.");
1570 }
1571
1572 <E_surfxml_argument>{
1573  "</argument"{s}">" {
1574   LEAVE;
1575   ETag_surfxml_argument();
1576   popbuffer(); /* attribute */
1577   switch (YY_START) {
1578    case S_surfxml_process_1: case S_surfxml_process: case S_surfxml_process_2: SET(S_surfxml_process_2); break;
1579   }
1580  }
1581  "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</argument>' expected.",yytext);
1582  .       FAIL("Unexpected character `%c': `</argument>' expected.",yytext[0]);
1583  <<EOF>> FAIL("Premature EOF: `</argument>' expected.");
1584 }
1585
1586 <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.");
1587
1588 <S_surfxml_platform>"<config"{s} {
1589   AX_surfxml_config_id = 0;
1590   ENTER(AL_surfxml_config); pushbuffer(0);
1591   }
1592
1593 <AL_surfxml_config>{
1594  "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_config_id);
1595  "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_config_id);
1596
1597  ">" {
1598   LEAVE; STag_surfxml_config();surfxml_pcdata_ix = 0; ENTER(S_surfxml_config);
1599  }
1600  "/>" {
1601   LEAVE; STag_surfxml_config(); surfxml_pcdata_ix = 0; ETag_surfxml_config(); popbuffer(); /* attribute */
1602   switch (YY_START) {
1603    case S_surfxml_platform: SET(S_surfxml_platform_1); break;
1604   }
1605  }
1606  .       FAIL("Unexpected character `%c' in attribute list of config element.", yytext[0]);
1607  {Name} FAIL("Bad attribute `%s' in `config' element start tag.",yytext);
1608  <<EOF>> FAIL("EOF in attribute list of `config' element.");
1609 }
1610
1611 <S_surfxml_config,S_surfxml_config_2,E_surfxml_config>{
1612  "</config"{s}">" {
1613   LEAVE;
1614   ETag_surfxml_config();
1615   popbuffer(); /* attribute */
1616   switch (YY_START) {
1617    case S_surfxml_platform: SET(S_surfxml_platform_1); break;
1618   }
1619  }
1620  "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</config>' expected.",yytext);
1621  .       FAIL("Unexpected character `%c': `</config>' expected.",yytext[0]);
1622  <<EOF>> FAIL("Premature EOF: `</config>' expected.");
1623 }
1624
1625  /* <!-- <!ATTLIST prop key CDATA #REQUIRED> -->
1626   * <!-- <!ATTLIST prop key CDATA #REQUIRED> -->  */
1627
1628 <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.");
1629
1630 <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} {
1631   AX_surfxml_prop_id = 0;
1632   AX_surfxml_prop_value = 0;
1633   ENTER(AL_surfxml_prop); pushbuffer(0);
1634   }
1635
1636 <AL_surfxml_prop>{
1637  "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_prop_id);
1638  "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_prop_id);
1639
1640  "value"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_prop_value);
1641  "value"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_prop_value);
1642
1643  ">" {
1644   if (!AX_surfxml_prop_id) FAIL("Required attribute `id' not set for `prop' element.");
1645   if (!AX_surfxml_prop_value) FAIL("Required attribute `value' not set for `prop' element.");
1646   LEAVE; STag_surfxml_prop();surfxml_pcdata_ix = 0; ENTER(E_surfxml_prop);
1647  }
1648  "/>" {
1649   if (!AX_surfxml_prop_id) FAIL("Required attribute `id' not set for `prop' element.");
1650   if (!AX_surfxml_prop_value) FAIL("Required attribute `value' not set for `prop' element.");
1651   LEAVE; STag_surfxml_prop(); surfxml_pcdata_ix = 0; ETag_surfxml_prop(); popbuffer(); /* attribute */
1652   switch (YY_START) {
1653    case S_surfxml_random: case S_surfxml_random_2: case S_surfxml_random_1: SET(S_surfxml_random_2); break;
1654    case S_surfxml_config_1: case S_surfxml_config: case S_surfxml_config_2: SET(S_surfxml_config_2); break;
1655    case S_surfxml_process_1: case S_surfxml_process: case S_surfxml_process_2: SET(S_surfxml_process_2); break;
1656    case S_surfxml_host_1: case S_surfxml_host_2: case S_surfxml_host: SET(S_surfxml_host_2); break;
1657    case S_surfxml_link_1: case S_surfxml_link_2: case S_surfxml_link: SET(S_surfxml_link_2); break;
1658   }
1659  }
1660  .       FAIL("Unexpected character `%c' in attribute list of prop element.", yytext[0]);
1661  {Name} FAIL("Bad attribute `%s' in `prop' element start tag.",yytext);
1662  <<EOF>> FAIL("EOF in attribute list of `prop' element.");
1663 }
1664
1665 <E_surfxml_prop>{
1666  "</prop"{s}">" {
1667   LEAVE;
1668   ETag_surfxml_prop();
1669   popbuffer(); /* attribute */
1670   switch (YY_START) {
1671    case S_surfxml_random: case S_surfxml_random_2: case S_surfxml_random_1: SET(S_surfxml_random_2); break;
1672    case S_surfxml_config_1: case S_surfxml_config: case S_surfxml_config_2: SET(S_surfxml_config_2); break;
1673    case S_surfxml_process_1: case S_surfxml_process: case S_surfxml_process_2: SET(S_surfxml_process_2); break;
1674    case S_surfxml_host_1: case S_surfxml_host_2: case S_surfxml_host: SET(S_surfxml_host_2); break;
1675    case S_surfxml_link_1: case S_surfxml_link_2: case S_surfxml_link: SET(S_surfxml_link_2); break;
1676   }
1677  }
1678  "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</prop>' expected.",yytext);
1679  .       FAIL("Unexpected character `%c': `</prop>' expected.",yytext[0]);
1680  <<EOF>> FAIL("Premature EOF: `</prop>' expected.");
1681 }
1682
1683  /* EPILOG: after the root element. */
1684
1685 <EPILOG>{
1686  . {SET(PROLOG); yyless(0); CLEANUP; return -1;}
1687  <<EOF>>        SUCCEED;
1688 }
1689
1690  /* CHARACTER DATA. */
1691
1692 <IN_trace,VALUE1,VALUE2>{
1693  /* Non-defined standard entities... */
1694 "&amp;"  BUFFERPUTC('&');
1695 "&lt;"   BUFFERPUTC('<');
1696 "&gt;"   BUFFERPUTC('>');
1697 "&apos;" BUFFERPUTC('\'');
1698 "&quot;" BUFFERPUTC('"');
1699
1700  /* Character entities. */
1701  "&#"[[:digit:]]+";"    BUFFERPUTC((unsigned char)atoi(yytext+2));
1702  "&#x"[[:xdigit:]]+";"  BUFFERPUTC((unsigned char)strtol(yytext+3,NULL,16));
1703 }
1704
1705 <IN_trace,VALUE1,VALUE2,CDATA>{
1706  "\n"           |
1707  "\r"           |
1708  "\r\n"         |
1709  "\n\r"         BUFFERPUTC('\n');
1710 }
1711
1712 <IN_trace>{
1713  "<![CDATA["    ENTER(CDATA);
1714  "]""]>"                FAIL("Unexpected `]""]>' in character data.");
1715 }
1716
1717 <VALUE1>{
1718  \'             BUFFERDONE; LEAVE;
1719  <<EOF>>        FAIL("EOF in literal (\"'\" expected).");
1720 }
1721
1722 <VALUE2>{
1723  \"             BUFFERDONE; LEAVE;
1724  <<EOF>>        FAIL("EOF in literal (`\"' expected).");
1725 }
1726
1727 <IN_trace,VALUE1,VALUE2>{
1728  [^<&]          BUFFERPUTC(yytext[0]);
1729  [<&]           FAIL("Spurious `%c' in character data.",yytext[0]);
1730 }
1731
1732 <CDATA>{
1733  "]""]>"                LEAVE;
1734  /* "]""]"              BUFFERPUTC(yytext[0]); BUFFERPUTC(yytext[1]); */
1735  .              BUFFERPUTC(yytext[0]);
1736  <<EOF>>        FAIL("EOF in CDATA section.");
1737 }
1738
1739  /* Impossible rules to avoid warnings from flex(1). */
1740  /* Ideally, this should be replaced by code in flexml.pl that
1741     generates just the states not covered by other rules. */
1742 <*>{
1743  .|[\n] FAIL("Syntax error on character `%c'.", yytext[0]);
1744 }
1745
1746 %%
1747
1748 /* Element context stack lookup. */
1749 int surfxml_element_context(int i)
1750 {
1751   return (0<i && i<yy_start_stack_depth
1752           ? yy_start_stack[yy_start_stack_ptr - i]
1753           : 0);
1754 }
1755
1756 #ifdef FLEX_DEBUG
1757 void print_yy_stack(char* fmt, ...)
1758 {
1759   int i = 0; va_list ap; va_start(ap, fmt);
1760   vfprintf(stderr, fmt, ap);
1761   if (surfxml_statenames) {
1762       for (i=1; i<yy_start_stack_ptr; i++) {
1763           fprintf(stderr, "%s/", surfxml_statenames[yy_start_stack[i] ]);
1764       }
1765       fprintf(stderr,"%s\n", surfxml_statenames[YY_START]);
1766   }
1767   va_end(ap);
1768 }
1769
1770 void print_surfxml_bufferstack()
1771 {
1772     int i;
1773     fputs("Buffer: ", stderr);
1774     for (i = 0; i < blimit; i++) {
1775        if ( surfxml_bufferstack[i] == '\377' ) break;
1776          putc(surfxml_bufferstack[i], stderr);
1777     }
1778     putc('\n', stderr);
1779 }
1780
1781 static void debug_enter(int state, const char* statename) {
1782   yy_push_state(state);
1783   if (yy_flex_debug) {
1784        print_yy_stack("--ENTER(%s) : ",statename);
1785        print_surfxml_bufferstack();
1786   }
1787 }
1788
1789 static void debug_leave(void) {
1790     if (yy_flex_debug) {
1791         print_yy_stack("--LEAVE : ");
1792         print_surfxml_bufferstack();
1793     }
1794   yy_pop_state();
1795 }
1796
1797 static void debug_set(int state, const char* statename) {
1798   BEGIN(state);
1799   if (yy_flex_debug) print_yy_stack("--SET(%s) : ",statename);
1800 }
1801 #endif
1802
1803
1804 static void cleanup(void)
1805 {
1806     if (surfxml_statenames) {
1807         free(surfxml_statenames);
1808         surfxml_statenames = NULL;
1809     }
1810     free(surfxml_bufferstack);
1811     surfxml_bufferstack = NULL;
1812
1813     free(indexstack);
1814     indexstack = NULL;
1815 }
1816
1817
1818 static int fail(const char* fmt, ...)
1819 {
1820     int chars_left, used;
1821     va_list ap; va_start(ap, fmt);
1822 #ifdef FLEXML_yylineno
1823     used = sprintf(flexml_err_msg,
1824                    "Invalid XML (XML input line %d, state %d): ",
1825                    yylineno, YY_START);
1826 #else
1827     used = sprintf(flexml_err_msg,
1828                    "Invalid XML (state %d): ",
1829                    YY_START);
1830 #endif
1831     chars_left = flexml_max_err_msg_size - used - 1;
1832     vsnprintf(flexml_err_msg + used, chars_left, fmt, ap);
1833     va_end(ap);
1834
1835 #ifndef FLEXML_quiet_parser
1836     /* print directly to sdterr */
1837     fprintf(stderr, "%s\n", flexml_err_msg);
1838     flexml_err_msg[0] = '\0';
1839 #endif
1840
1841     cleanup();
1842
1843     return 1;
1844 }