Logo AND Algorithmique Numérique Distribuée

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