/* Validating XML processor for surfxml.dtd.
- * Generated 2005/01/04 14:37:23.
+ * Generated 2005/01/27 07:41:02.
*
* This program was generated with the FleXML XML processor generator,
- * (Id: flexml.pl,v 1.29 2005/01/04 09:30:15 alegrand Exp).
+ * (Id: flexml.pl,v 1.35 2005/01/05 06:29:58 legranda Exp).
* Copyright © 1999 Kristoffer Rose. All rights reserved.
*
* You can redistribute and/or modify this program provided the following
/* Version strings. */
const char rcs_flexml_skeleton[] =
- "$" "Id: skel,v 1.16 1999/12/09 04:01:51 krisrose Exp $";
+ "$" "Id: skel,v 1.19 2005/01/05 18:49:27 legranda Exp $";
const char rcs_flexml[] =
- "$" "Id: flexml.pl,v 1.29 2005/01/04 09:30:15 alegrand Exp $";
+ "$" "Id: flexml.pl,v 1.35 2005/01/05 06:29:58 legranda Exp $";
/* ANSI headers. */
#include <unistd.h>
#include <ctype.h>
/* Generated definitions. */
+#define FLEXML_yylineno
#define FLEXML_BUFFERSTACKSIZE 10000000
/* XML processor api. */
AT_argument_value A_argument_value;
AT_cpu_availability_file A_cpu_availability_file;
AT_process_host A_process_host;
+AT_route_impact_on_src A_route_impact_on_src;
AT_route_src A_route_src;
AT_network_link_latency_file A_network_link_latency_file;
+AT_cpu_max_outgoing_rate A_cpu_max_outgoing_rate;
+AT_route_impact_on_dst_with_other_send A_route_impact_on_dst_with_other_send;
+AT_cpu_interference_send_recv A_cpu_interference_send_recv;
AT_cpu_availability A_cpu_availability;
+AT_route_impact_on_dst A_route_impact_on_dst;
+AT_cpu_interference_recv A_cpu_interference_recv;
+AT_route_impact_on_src_with_other_recv A_route_impact_on_src_with_other_recv;
AT_network_link_name A_network_link_name;
AT_route_element_name A_route_element_name;
AT_cpu_power A_cpu_power;
+AT_include_file A_include_file;
AT_process_function A_process_function;
-AT_cpu_state A_cpu_state;
AT_route_dst A_route_dst;
+AT_cpu_state A_cpu_state;
AT_network_link_latency A_network_link_latency;
-AT_cpu_state_file A_cpu_state_file;
AT_network_link_state_file A_network_link_state_file;
+AT_cpu_interference_send A_cpu_interference_send;
+AT_cpu_state_file A_cpu_state_file;
AT_network_link_bandwidth_file A_network_link_bandwidth_file;
/* XML state. */
#define BUFFERDONE (BUFFERPUTC('\0'))
#define BUFFERLITERAL(C,P) bufferliteral(C,&(P),yytext)
-static void bufferliteral(char c, char** pp, char* text)
+static void bufferliteral(char c, const char** pp, char* text)
{
char *s = strchr(text,c), *e = strrchr(text,c);
assert(s <= e); BUFFERSET(*pp);
%option noyywrap
/* Flex user-requested options. */
+%option yylineno
%option nounput
/* XML character classes (currently restricted to ASCII). */
*/
%x PROLOG DOCTYPE EPILOG INCOMMENT INPI VALUE1 VALUE2 CDATA
%x ROOT_platform_description AL_platform_description S_platform_description S_platform_description_1 S_platform_description_2 E_platform_description
+%x ROOT_include AL_include S_include S_include_1 S_include_2 E_include
%x ROOT_cpu AL_cpu E_cpu
%x ROOT_network_link AL_network_link E_network_link
%x ROOT_route AL_route S_route S_route_1 S_route_2 E_route
%%
/* Bypass Flex's default INITIAL state and begin by parsing the XML prolog. */
- SET(PROLOG);
+ SET(PROLOG);
/* FleXML_init */
if(!statenames) statenames=calloc(IMPOSSIBLE,sizeof(char*));
statenames[PROLOG] = NULL;
statenames[S_platform_description_1] = "platform_description";
statenames[S_platform_description_2] = "platform_description";
statenames[E_platform_description] = "platform_description";
+ statenames[ROOT_include] = NULL;
+ statenames[AL_include] = NULL;
+ statenames[S_include] = "include";
+ statenames[S_include_1] = "include";
+ statenames[S_include_2] = "include";
+ statenames[E_include] = "include";
statenames[ROOT_cpu] = NULL;
statenames[AL_cpu] = NULL;
statenames[E_cpu] = "cpu";
/* COMMENTS and PIs: handled uniformly for efficiency. */
-<ROOT_platform_description,AL_platform_description,S_platform_description,S_platform_description_1,S_platform_description_2,E_platform_description,ROOT_cpu,AL_cpu,E_cpu,ROOT_network_link,AL_network_link,E_network_link,ROOT_route,AL_route,S_route,S_route_1,S_route_2,E_route,ROOT_route_element,AL_route_element,E_route_element,ROOT_process,AL_process,S_process,S_process_1,S_process_2,E_process,ROOT_argument,AL_argument,E_argument,PROLOG,DOCTYPE,EPILOG>{
+<ROOT_platform_description,AL_platform_description,S_platform_description,S_platform_description_1,S_platform_description_2,E_platform_description,ROOT_include,AL_include,S_include,S_include_1,S_include_2,E_include,ROOT_cpu,AL_cpu,E_cpu,ROOT_network_link,AL_network_link,E_network_link,ROOT_route,AL_route,S_route,S_route_1,S_route_2,E_route,ROOT_route_element,AL_route_element,E_route_element,ROOT_process,AL_process,S_process,S_process_1,S_process_2,E_process,ROOT_argument,AL_argument,E_argument,PROLOG,DOCTYPE,EPILOG>{
"<!--" ENTER(INCOMMENT);
"<?" ENTER(INPI);
}
"--" |
. |
\n SKIP;
- <<EOF>> fail("EOF in comment.");
+ <<EOF>> FAIL("EOF in comment.");
}
<INPI>{
"?>" LEAVE;
. |
\n SKIP;
- <<EOF>> fail("EOF in PI (processing instruction).");
+ <<EOF>> FAIL("EOF in PI (processing instruction).");
}
/* SPACES: skipped uniformly */
-<ROOT_platform_description,AL_platform_description,S_platform_description,S_platform_description_1,S_platform_description_2,E_platform_description,ROOT_cpu,AL_cpu,E_cpu,ROOT_network_link,AL_network_link,E_network_link,ROOT_route,AL_route,S_route,S_route_1,S_route_2,E_route,ROOT_route_element,AL_route_element,E_route_element,ROOT_process,AL_process,S_process,S_process_1,S_process_2,E_process,ROOT_argument,AL_argument,E_argument,PROLOG,DOCTYPE,EPILOG>{S} SKIP;
+<ROOT_platform_description,AL_platform_description,S_platform_description,S_platform_description_1,S_platform_description_2,E_platform_description,ROOT_include,AL_include,S_include,S_include_1,S_include_2,E_include,ROOT_cpu,AL_cpu,E_cpu,ROOT_network_link,AL_network_link,E_network_link,ROOT_route,AL_route,S_route,S_route_1,S_route_2,E_route,ROOT_route_element,AL_route_element,E_route_element,ROOT_process,AL_process,S_process,S_process_1,S_process_2,E_process,ROOT_argument,AL_argument,E_argument,PROLOG,DOCTYPE,EPILOG>{S} SKIP;
/* PROLOG: determine root element and process it. */
<PROLOG>{
"<?xml"({S}version{Eq}(\'{VersionNum}\'|\"{VersionNum}\"))?"?>" SET(DOCTYPE);
- "<?xml"[^>]*">" fail("Bad declaration %s.",yytext);
+ "<?xml"[^>]*">" FAIL("Bad declaration %s.",yytext);
}
<PROLOG,DOCTYPE>{
"<!DOCTYPE"{S}"argument"{S}SYSTEM{S}("'surfxml.dtd'"|"\"surfxml.dtd\""){s}">" SET(ROOT_argument);
"<!DOCTYPE"{S}"route_element"{S}SYSTEM{S}("'surfxml.dtd'"|"\"surfxml.dtd\""){s}">" SET(ROOT_route_element);
"<!DOCTYPE"{S}"cpu"{S}SYSTEM{S}("'surfxml.dtd'"|"\"surfxml.dtd\""){s}">" SET(ROOT_cpu);
+ "<!DOCTYPE"{S}"include"{S}SYSTEM{S}("'surfxml.dtd'"|"\"surfxml.dtd\""){s}">" SET(ROOT_include);
"<!DOCTYPE"{S}"route"{S}SYSTEM{S}("'surfxml.dtd'"|"\"surfxml.dtd\""){s}">" SET(ROOT_route);
"<!DOCTYPE"{S}"platform_description"{S}SYSTEM{S}("'surfxml.dtd'"|"\"surfxml.dtd\""){s}">" SET(ROOT_platform_description);
"<!DOCTYPE"{S}"network_link"{S}SYSTEM{S}("'surfxml.dtd'"|"\"surfxml.dtd\""){s}">" SET(ROOT_network_link);
"<!DOCTYPE"{S}"process"{S}SYSTEM{S}("'surfxml.dtd'"|"\"surfxml.dtd\""){s}">" SET(ROOT_process);
- "<!"[^>-][^>]*">" fail("Bad declaration %s.",yytext);
- . fail("Unexpected character `%c' in prolog.", yytext[0]);
- <<EOF>> fail("EOF in prolog.");
+ "<!"[^>-][^>]*">" FAIL("Bad declaration %s.",yytext);
+ . FAIL("Unexpected character `%c' in prolog.", yytext[0]);
+ <<EOF>> FAIL("EOF in prolog.");
}
/* RULES DERIVED FROM DTD. */
case ROOT_platform_description: SET(EPILOG); break;
}
}
- . fail("Unexpected character `%c' in attribute list of platform_description element.", yytext[0]);
- {Name} fail("Bad attribute `%s' in `platform_description' element start tag.",yytext);
- <<EOF>> fail("EOF in attribute list of `platform_description' element.");
+ . FAIL("Unexpected character `%c' in attribute list of platform_description element.", yytext[0]);
+ {Name} FAIL("Bad attribute `%s' in `platform_description' element start tag.",yytext);
+ <<EOF>> FAIL("EOF in attribute list of `platform_description' element.");
}
<E_platform_description,S_platform_description_2,S_platform_description>{
case ROOT_platform_description: SET(EPILOG); break;
}
}
- "</"{Name}{s}">" fail("Unexpected end-tag `%s': `</platform_description>' expected.",yytext);
- . fail("Unexpected character `%c': `</platform_description>' expected.",yytext[0]);
- <<EOF>> fail("Premature EOF: `</platform_description>' expected.");
+ "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</platform_description>' expected.",yytext);
+ . FAIL("Unexpected character `%c': `</platform_description>' expected.",yytext[0]);
+ <<EOF>> FAIL("Premature EOF: `</platform_description>' expected.");
+}
+
+<ROOT_include,S_platform_description_2,S_include,S_include_2,S_platform_description_1,S_include_1,S_platform_description>"<include"{s} {
+ A_include_file = NULL;
+ ENTER(AL_include);
+ }
+
+<AL_include>{
+ "file"{Eq}\' ENTER(VALUE1); BUFFERSET(A_include_file);
+ "file"{Eq}\" ENTER(VALUE2); BUFFERSET(A_include_file);
+
+ ">" {
+ if (!A_include_file) FAIL("Required attribute `file' not set for `include' element.");
+ LEAVE; STag_include();pcdata = NULL; ENTER(S_include);
+ }
+ "/>" {
+ if (!A_include_file) FAIL("Required attribute `file' not set for `include' element.");
+ LEAVE; STag_include(); pcdata = NULL; ETag_include();
+ switch (YY_START) {
+ case S_platform_description_2: case S_platform_description_1: case S_platform_description: SET(S_platform_description_2); break;
+ case S_include: case S_include_2: case S_include_1: SET(S_include_2); break;
+ case ROOT_include: SET(EPILOG); break;
+ }
+ }
+ . FAIL("Unexpected character `%c' in attribute list of include element.", yytext[0]);
+ {Name} FAIL("Bad attribute `%s' in `include' element start tag.",yytext);
+ <<EOF>> FAIL("EOF in attribute list of `include' element.");
}
-<ROOT_cpu,S_platform_description_2,S_platform_description_1,S_platform_description>"<cpu"{s} {
+<E_include,S_include,S_include_2>{
+ "</include"{s}">" {
+ LEAVE;
+ ETag_include();
+ switch (YY_START) {
+ case S_platform_description_2: case S_platform_description_1: case S_platform_description: SET(S_platform_description_2); break;
+ case S_include: case S_include_2: case S_include_1: SET(S_include_2); break;
+ case ROOT_include: SET(EPILOG); break;
+ }
+ }
+ "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</include>' expected.",yytext);
+ . FAIL("Unexpected character `%c': `</include>' expected.",yytext[0]);
+ <<EOF>> FAIL("Premature EOF: `</include>' expected.");
+}
+
+<ROOT_cpu,S_platform_description_2,S_include,S_include_2,S_platform_description_1,S_include_1,S_platform_description>"<cpu"{s} {
A_cpu_name = NULL;
A_cpu_power = NULL;
A_cpu_availability = "1.0";
A_cpu_availability_file = NULL;
A_cpu_state = A_cpu_state_ON;
A_cpu_state_file = NULL;
+ A_cpu_interference_send = "1.0";
+ A_cpu_interference_recv = "1.0";
+ A_cpu_interference_send_recv = "1.0";
+ A_cpu_max_outgoing_rate = "-1.0";
ENTER(AL_cpu);
}
"state_file"{Eq}\' ENTER(VALUE1); BUFFERSET(A_cpu_state_file);
"state_file"{Eq}\" ENTER(VALUE2); BUFFERSET(A_cpu_state_file);
+ "interference_send"{Eq}\' ENTER(VALUE1); BUFFERSET(A_cpu_interference_send);
+ "interference_send"{Eq}\" ENTER(VALUE2); BUFFERSET(A_cpu_interference_send);
+
+ "interference_recv"{Eq}\' ENTER(VALUE1); BUFFERSET(A_cpu_interference_recv);
+ "interference_recv"{Eq}\" ENTER(VALUE2); BUFFERSET(A_cpu_interference_recv);
+
+ "interference_send_recv"{Eq}\' ENTER(VALUE1); BUFFERSET(A_cpu_interference_send_recv);
+ "interference_send_recv"{Eq}\" ENTER(VALUE2); BUFFERSET(A_cpu_interference_send_recv);
+
+ "max_outgoing_rate"{Eq}\' ENTER(VALUE1); BUFFERSET(A_cpu_max_outgoing_rate);
+ "max_outgoing_rate"{Eq}\" ENTER(VALUE2); BUFFERSET(A_cpu_max_outgoing_rate);
+
">" {
- if (!A_cpu_name) fail("Required attribute `name' not set for `cpu' element.");
- if (!A_cpu_power) fail("Required attribute `power' not set for `cpu' element.");
+ if (!A_cpu_name) FAIL("Required attribute `name' not set for `cpu' element.");
+ if (!A_cpu_power) FAIL("Required attribute `power' not set for `cpu' element.");
LEAVE; STag_cpu();pcdata = NULL; ENTER(E_cpu);
}
"/>" {
- if (!A_cpu_name) fail("Required attribute `name' not set for `cpu' element.");
- if (!A_cpu_power) fail("Required attribute `power' not set for `cpu' element.");
+ if (!A_cpu_name) FAIL("Required attribute `name' not set for `cpu' element.");
+ if (!A_cpu_power) FAIL("Required attribute `power' not set for `cpu' element.");
LEAVE; STag_cpu(); pcdata = NULL; ETag_cpu();
switch (YY_START) {
case S_platform_description_2: case S_platform_description_1: case S_platform_description: SET(S_platform_description_2); break;
+ case S_include: case S_include_2: case S_include_1: SET(S_include_2); break;
case ROOT_cpu: SET(EPILOG); break;
}
}
- . fail("Unexpected character `%c' in attribute list of cpu element.", yytext[0]);
- {Name} fail("Bad attribute `%s' in `cpu' element start tag.",yytext);
- <<EOF>> fail("EOF in attribute list of `cpu' element.");
+ . FAIL("Unexpected character `%c' in attribute list of cpu element.", yytext[0]);
+ {Name} FAIL("Bad attribute `%s' in `cpu' element start tag.",yytext);
+ <<EOF>> FAIL("EOF in attribute list of `cpu' element.");
}
<E_cpu>{
ETag_cpu();
switch (YY_START) {
case S_platform_description_2: case S_platform_description_1: case S_platform_description: SET(S_platform_description_2); break;
+ case S_include: case S_include_2: case S_include_1: SET(S_include_2); break;
case ROOT_cpu: SET(EPILOG); break;
}
}
- "</"{Name}{s}">" fail("Unexpected end-tag `%s': `</cpu>' expected.",yytext);
- . fail("Unexpected character `%c': `</cpu>' expected.",yytext[0]);
- <<EOF>> fail("Premature EOF: `</cpu>' expected.");
+ "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</cpu>' expected.",yytext);
+ . FAIL("Unexpected character `%c': `</cpu>' expected.",yytext[0]);
+ <<EOF>> FAIL("Premature EOF: `</cpu>' expected.");
}
-<ROOT_network_link,S_platform_description_2,S_platform_description_1,S_platform_description>"<network_link"{s} {
+<ROOT_network_link,S_platform_description_2,S_include,S_include_2,S_platform_description_1,S_include_1,S_platform_description>"<network_link"{s} {
A_network_link_name = NULL;
A_network_link_bandwidth = NULL;
A_network_link_bandwidth_file = NULL;
- A_network_link_latency = "0.001";
+ A_network_link_latency = "0.0";
A_network_link_latency_file = NULL;
A_network_link_state = A_network_link_state_ON;
A_network_link_state_file = NULL;
"state_file"{Eq}\" ENTER(VALUE2); BUFFERSET(A_network_link_state_file);
">" {
- if (!A_network_link_name) fail("Required attribute `name' not set for `network_link' element.");
- if (!A_network_link_bandwidth) fail("Required attribute `bandwidth' not set for `network_link' element.");
+ if (!A_network_link_name) FAIL("Required attribute `name' not set for `network_link' element.");
+ if (!A_network_link_bandwidth) FAIL("Required attribute `bandwidth' not set for `network_link' element.");
LEAVE; STag_network_link();pcdata = NULL; ENTER(E_network_link);
}
"/>" {
- if (!A_network_link_name) fail("Required attribute `name' not set for `network_link' element.");
- if (!A_network_link_bandwidth) fail("Required attribute `bandwidth' not set for `network_link' element.");
+ if (!A_network_link_name) FAIL("Required attribute `name' not set for `network_link' element.");
+ if (!A_network_link_bandwidth) FAIL("Required attribute `bandwidth' not set for `network_link' element.");
LEAVE; STag_network_link(); pcdata = NULL; ETag_network_link();
switch (YY_START) {
case S_platform_description_2: case S_platform_description_1: case S_platform_description: SET(S_platform_description_2); break;
+ case S_include: case S_include_2: case S_include_1: SET(S_include_2); break;
case ROOT_network_link: SET(EPILOG); break;
}
}
- . fail("Unexpected character `%c' in attribute list of network_link element.", yytext[0]);
- {Name} fail("Bad attribute `%s' in `network_link' element start tag.",yytext);
- <<EOF>> fail("EOF in attribute list of `network_link' element.");
+ . FAIL("Unexpected character `%c' in attribute list of network_link element.", yytext[0]);
+ {Name} FAIL("Bad attribute `%s' in `network_link' element start tag.",yytext);
+ <<EOF>> FAIL("EOF in attribute list of `network_link' element.");
}
<E_network_link>{
ETag_network_link();
switch (YY_START) {
case S_platform_description_2: case S_platform_description_1: case S_platform_description: SET(S_platform_description_2); break;
+ case S_include: case S_include_2: case S_include_1: SET(S_include_2); break;
case ROOT_network_link: SET(EPILOG); break;
}
}
- "</"{Name}{s}">" fail("Unexpected end-tag `%s': `</network_link>' expected.",yytext);
- . fail("Unexpected character `%c': `</network_link>' expected.",yytext[0]);
- <<EOF>> fail("Premature EOF: `</network_link>' expected.");
+ "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</network_link>' expected.",yytext);
+ . FAIL("Unexpected character `%c': `</network_link>' expected.",yytext[0]);
+ <<EOF>> FAIL("Premature EOF: `</network_link>' expected.");
}
-<ROOT_route,S_platform_description_2,S_platform_description_1,S_platform_description>"<route"{s} {
+<ROOT_route,S_platform_description_2,S_include,S_include_2,S_platform_description_1,S_include_1,S_platform_description>"<route"{s} {
A_route_src = NULL;
A_route_dst = NULL;
+ A_route_impact_on_src = "0.0";
+ A_route_impact_on_dst = "0.0";
+ A_route_impact_on_src_with_other_recv = "0.0";
+ A_route_impact_on_dst_with_other_send = "0.0";
ENTER(AL_route);
}
"dst"{Eq}\' ENTER(VALUE1); BUFFERSET(A_route_dst);
"dst"{Eq}\" ENTER(VALUE2); BUFFERSET(A_route_dst);
+ "impact_on_src"{Eq}\' ENTER(VALUE1); BUFFERSET(A_route_impact_on_src);
+ "impact_on_src"{Eq}\" ENTER(VALUE2); BUFFERSET(A_route_impact_on_src);
+
+ "impact_on_dst"{Eq}\' ENTER(VALUE1); BUFFERSET(A_route_impact_on_dst);
+ "impact_on_dst"{Eq}\" ENTER(VALUE2); BUFFERSET(A_route_impact_on_dst);
+
+ "impact_on_src_with_other_recv"{Eq}\' ENTER(VALUE1); BUFFERSET(A_route_impact_on_src_with_other_recv);
+ "impact_on_src_with_other_recv"{Eq}\" ENTER(VALUE2); BUFFERSET(A_route_impact_on_src_with_other_recv);
+
+ "impact_on_dst_with_other_send"{Eq}\' ENTER(VALUE1); BUFFERSET(A_route_impact_on_dst_with_other_send);
+ "impact_on_dst_with_other_send"{Eq}\" ENTER(VALUE2); BUFFERSET(A_route_impact_on_dst_with_other_send);
+
">" {
- if (!A_route_src) fail("Required attribute `src' not set for `route' element.");
- if (!A_route_dst) fail("Required attribute `dst' not set for `route' element.");
+ if (!A_route_src) FAIL("Required attribute `src' not set for `route' element.");
+ if (!A_route_dst) FAIL("Required attribute `dst' not set for `route' element.");
LEAVE; STag_route();pcdata = NULL; ENTER(S_route);
}
"/>" {
- if (!A_route_src) fail("Required attribute `src' not set for `route' element.");
- if (!A_route_dst) fail("Required attribute `dst' not set for `route' element.");
+ if (!A_route_src) FAIL("Required attribute `src' not set for `route' element.");
+ if (!A_route_dst) FAIL("Required attribute `dst' not set for `route' element.");
LEAVE; STag_route(); pcdata = NULL; ETag_route();
switch (YY_START) {
case S_platform_description_2: case S_platform_description_1: case S_platform_description: SET(S_platform_description_2); break;
+ case S_include: case S_include_2: case S_include_1: SET(S_include_2); break;
case ROOT_route: SET(EPILOG); break;
}
}
- . fail("Unexpected character `%c' in attribute list of route element.", yytext[0]);
- {Name} fail("Bad attribute `%s' in `route' element start tag.",yytext);
- <<EOF>> fail("EOF in attribute list of `route' element.");
+ . FAIL("Unexpected character `%c' in attribute list of route element.", yytext[0]);
+ {Name} FAIL("Bad attribute `%s' in `route' element start tag.",yytext);
+ <<EOF>> FAIL("EOF in attribute list of `route' element.");
}
<S_route,S_route_2,E_route>{
ETag_route();
switch (YY_START) {
case S_platform_description_2: case S_platform_description_1: case S_platform_description: SET(S_platform_description_2); break;
+ case S_include: case S_include_2: case S_include_1: SET(S_include_2); break;
case ROOT_route: SET(EPILOG); break;
}
}
- "</"{Name}{s}">" fail("Unexpected end-tag `%s': `</route>' expected.",yytext);
- . fail("Unexpected character `%c': `</route>' expected.",yytext[0]);
- <<EOF>> fail("Premature EOF: `</route>' expected.");
+ "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</route>' expected.",yytext);
+ . FAIL("Unexpected character `%c': `</route>' expected.",yytext[0]);
+ <<EOF>> FAIL("Premature EOF: `</route>' expected.");
}
<ROOT_route_element,S_route_1,S_route,S_route_2>"<route_element"{s} {
"name"{Eq}\" ENTER(VALUE2); BUFFERSET(A_route_element_name);
">" {
- if (!A_route_element_name) fail("Required attribute `name' not set for `route_element' element.");
+ if (!A_route_element_name) FAIL("Required attribute `name' not set for `route_element' element.");
LEAVE; STag_route_element();pcdata = NULL; ENTER(E_route_element);
}
"/>" {
- if (!A_route_element_name) fail("Required attribute `name' not set for `route_element' element.");
+ if (!A_route_element_name) FAIL("Required attribute `name' not set for `route_element' element.");
LEAVE; STag_route_element(); pcdata = NULL; ETag_route_element();
switch (YY_START) {
case S_route_1: case S_route: case S_route_2: SET(S_route_2); break;
case ROOT_route_element: SET(EPILOG); break;
}
}
- . fail("Unexpected character `%c' in attribute list of route_element element.", yytext[0]);
- {Name} fail("Bad attribute `%s' in `route_element' element start tag.",yytext);
- <<EOF>> fail("EOF in attribute list of `route_element' element.");
+ . FAIL("Unexpected character `%c' in attribute list of route_element element.", yytext[0]);
+ {Name} FAIL("Bad attribute `%s' in `route_element' element start tag.",yytext);
+ <<EOF>> FAIL("EOF in attribute list of `route_element' element.");
}
<E_route_element>{
case ROOT_route_element: SET(EPILOG); break;
}
}
- "</"{Name}{s}">" fail("Unexpected end-tag `%s': `</route_element>' expected.",yytext);
- . fail("Unexpected character `%c': `</route_element>' expected.",yytext[0]);
- <<EOF>> fail("Premature EOF: `</route_element>' expected.");
+ "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</route_element>' expected.",yytext);
+ . FAIL("Unexpected character `%c': `</route_element>' expected.",yytext[0]);
+ <<EOF>> FAIL("Premature EOF: `</route_element>' expected.");
}
-<ROOT_process,S_platform_description_2,S_platform_description_1,S_platform_description>"<process"{s} {
+<ROOT_process,S_platform_description_2,S_include,S_include_2,S_platform_description_1,S_include_1,S_platform_description>"<process"{s} {
A_process_host = NULL;
A_process_function = NULL;
ENTER(AL_process);
"function"{Eq}\" ENTER(VALUE2); BUFFERSET(A_process_function);
">" {
- if (!A_process_host) fail("Required attribute `host' not set for `process' element.");
- if (!A_process_function) fail("Required attribute `function' not set for `process' element.");
+ if (!A_process_host) FAIL("Required attribute `host' not set for `process' element.");
+ if (!A_process_function) FAIL("Required attribute `function' not set for `process' element.");
LEAVE; STag_process();pcdata = NULL; ENTER(S_process);
}
"/>" {
- if (!A_process_host) fail("Required attribute `host' not set for `process' element.");
- if (!A_process_function) fail("Required attribute `function' not set for `process' element.");
+ if (!A_process_host) FAIL("Required attribute `host' not set for `process' element.");
+ if (!A_process_function) FAIL("Required attribute `function' not set for `process' element.");
LEAVE; STag_process(); pcdata = NULL; ETag_process();
switch (YY_START) {
case S_platform_description_2: case S_platform_description_1: case S_platform_description: SET(S_platform_description_2); break;
+ case S_include: case S_include_2: case S_include_1: SET(S_include_2); break;
case ROOT_process: SET(EPILOG); break;
}
}
- . fail("Unexpected character `%c' in attribute list of process element.", yytext[0]);
- {Name} fail("Bad attribute `%s' in `process' element start tag.",yytext);
- <<EOF>> fail("EOF in attribute list of `process' element.");
+ . FAIL("Unexpected character `%c' in attribute list of process element.", yytext[0]);
+ {Name} FAIL("Bad attribute `%s' in `process' element start tag.",yytext);
+ <<EOF>> FAIL("EOF in attribute list of `process' element.");
}
<S_process,E_process,S_process_2>{
ETag_process();
switch (YY_START) {
case S_platform_description_2: case S_platform_description_1: case S_platform_description: SET(S_platform_description_2); break;
+ case S_include: case S_include_2: case S_include_1: SET(S_include_2); break;
case ROOT_process: SET(EPILOG); break;
}
}
- "</"{Name}{s}">" fail("Unexpected end-tag `%s': `</process>' expected.",yytext);
- . fail("Unexpected character `%c': `</process>' expected.",yytext[0]);
- <<EOF>> fail("Premature EOF: `</process>' expected.");
+ "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</process>' expected.",yytext);
+ . FAIL("Unexpected character `%c': `</process>' expected.",yytext[0]);
+ <<EOF>> FAIL("Premature EOF: `</process>' expected.");
}
<ROOT_argument,S_process_1,S_process,S_process_2>"<argument"{s} {
"value"{Eq}\" ENTER(VALUE2); BUFFERSET(A_argument_value);
">" {
- if (!A_argument_value) fail("Required attribute `value' not set for `argument' element.");
+ if (!A_argument_value) FAIL("Required attribute `value' not set for `argument' element.");
LEAVE; STag_argument();pcdata = NULL; ENTER(E_argument);
}
"/>" {
- if (!A_argument_value) fail("Required attribute `value' not set for `argument' element.");
+ if (!A_argument_value) FAIL("Required attribute `value' not set for `argument' element.");
LEAVE; STag_argument(); pcdata = NULL; ETag_argument();
switch (YY_START) {
case ROOT_argument: SET(EPILOG); break;
case S_process_1: case S_process: case S_process_2: SET(S_process_2); break;
}
}
- . fail("Unexpected character `%c' in attribute list of argument element.", yytext[0]);
- {Name} fail("Bad attribute `%s' in `argument' element start tag.",yytext);
- <<EOF>> fail("EOF in attribute list of `argument' element.");
+ . FAIL("Unexpected character `%c' in attribute list of argument element.", yytext[0]);
+ {Name} FAIL("Bad attribute `%s' in `argument' element start tag.",yytext);
+ <<EOF>> FAIL("EOF in attribute list of `argument' element.");
}
<E_argument>{
case S_process_1: case S_process: case S_process_2: SET(S_process_2); break;
}
}
- "</"{Name}{s}">" fail("Unexpected end-tag `%s': `</argument>' expected.",yytext);
- . fail("Unexpected character `%c': `</argument>' expected.",yytext[0]);
- <<EOF>> fail("Premature EOF: `</argument>' expected.");
+ "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</argument>' expected.",yytext);
+ . FAIL("Unexpected character `%c': `</argument>' expected.",yytext[0]);
+ <<EOF>> FAIL("Premature EOF: `</argument>' expected.");
}
/* EPILOG: after the root element. */
<EPILOG>{
- . fail("Unexpected character `%c' after document.", yytext[0]);
+ . FAIL("Unexpected character `%c' after document.", yytext[0]);
<<EOF>> SUCCEED;
}
<IMPOSSIBLE>{
"<![CDATA[" ENTER(CDATA);
- "]""]>" fail("Unexpected `]""]>' in character data.");
+ "]""]>" FAIL("Unexpected `]""]>' in character data.");
}
<VALUE1>{
\' BUFFERDONE; LEAVE;
- <<EOF>> fail("EOF in literal (\"'\" expected).");
+ <<EOF>> FAIL("EOF in literal (\"'\" expected).");
}
<VALUE2>{
\" BUFFERDONE; LEAVE;
- <<EOF>> fail("EOF in literal (`\"' expected).");
+ <<EOF>> FAIL("EOF in literal (`\"' expected).");
}
<IMPOSSIBLE,VALUE1,VALUE2>{
[^<&] BUFFERPUTC(yytext[0]);
- [<&] fail("Spurious `%c' in character data.",yytext[0]);
+ [<&] FAIL("Spurious `%c' in character data.",yytext[0]);
}
<CDATA>{
"]""]>" LEAVE;
"]""]" BUFFERPUTC(yytext[0]); BUFFERPUTC(yytext[1]);
. BUFFERPUTC(yytext[0]);
- <<EOF>> fail("EOF in CDATA section.");
+ <<EOF>> FAIL("EOF in CDATA section.");
}
/* Impossible rules to avoid warnings from flex(1). */
<INITIAL,IMPOSSIBLE>{
- .|[\n] fail("The Impossible Happened: INITIAL or IMPOSSIBLE state entered?");
+ .|[\n] FAIL("The Impossible Happened: INITIAL or IMPOSSIBLE state entered?");
}
%%