Logo AND Algorithmique Numérique Distribuée

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