Logo AND Algorithmique Numérique Distribuée

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