X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/bf16ac57d609fe787f319d0b98710bc5f4696a18..addf942a7913b477a273e7a372967b200d95d12c:/src/surf/surfxml.l diff --git a/src/surf/surfxml.l b/src/surf/surfxml.l index 30b56c5879..0f737f7cfa 100644 --- a/src/surf/surfxml.l +++ b/src/surf/surfxml.l @@ -1,9 +1,10 @@ -/* Validating XML processor for surfxml.dtd. - * Generated 2006/03/21 11:12:31. +/* Validating XML processor for surf/surfxml.dtd. + * Generated 2006/07/18 21:02:15. * * This program was generated with the FleXML XML processor generator. - * FleXML is Copyright © 1999-2005 Kristoffer Rose. All rights reserved. - * (Id: flexml.pl,v 1.46 2006/03/21 08:24:12 legranda Exp). + * FleXML is Copyright (C) 1999-2005 Kristoffer Rose. All rights reserved. + * FleXML is Copyright (C) 2003-2006 Martin Quinson. All rights reserved. + * (Id: flexml.pl,v 1.53 2006/07/18 12:12:06 mquinson Exp). * * There are two, intertwined parts to this program, part A and part B. * @@ -11,8 +12,8 @@ * ------ * * Some parts, here collectively called "Part A", are found in the - * FleXML package. They are Copyright © 1999-2005 Kristoffer Rose. - * All rights reserved. + * FleXML package. They are Copyright (C) 1999-2005 Kristoffer Rose + * and Copyright (C) 2003-2006 Martin Quinson. All rights reserved. * * You can redistribute, use, perform, display and/or modify "Part A" * provided the following two conditions hold: @@ -48,9 +49,9 @@ /* Version strings. */ const char rcs_surfxml_flexml_skeleton[] = - "$" "Id: skel,v 1.27 2006/03/21 08:24:12 legranda Exp $"; + "$" "Id: skel,v 1.31 2006/07/18 18:21:13 mquinson Exp $"; const char rcs_surfxml_flexml[] = - "$" "Id: flexml.pl,v 1.46 2006/03/21 08:24:12 legranda Exp $"; + "$" "Id: flexml.pl,v 1.53 2006/07/18 12:12:06 mquinson Exp $"; /* ANSI headers. */ #include @@ -66,38 +67,39 @@ const char rcs_surfxml_flexml[] = /* XML processor api. */ /* FleXML-provided data. */ -const char* pcdata; +const char* surfxml_pcdata; AT_surfxml_network_link_bandwidth A_surfxml_network_link_bandwidth; +AT_surfxml_process_host A_surfxml_process_host; +AT_surfxml_network_link_latency_file A_surfxml_network_link_latency_file; +AT_surfxml_route_impact_on_dst_with_other_send A_surfxml_route_impact_on_dst_with_other_send; +AT_surfxml_cpu_interference_send_recv A_surfxml_cpu_interference_send_recv; +AT_surfxml_route_impact_on_dst A_surfxml_route_impact_on_dst; +AT_surfxml_platform_description_version A_surfxml_platform_description_version; +AT_surfxml_route_impact_on_src_with_other_recv A_surfxml_route_impact_on_src_with_other_recv; +AT_surfxml_route_element_name A_surfxml_route_element_name; +AT_surfxml_process_start_time A_surfxml_process_start_time; +AT_surfxml_process_function A_surfxml_process_function; +AT_surfxml_cpu_state A_surfxml_cpu_state; +AT_surfxml_cpu_interference_send A_surfxml_cpu_interference_send; +AT_surfxml_network_link_bandwidth_file A_surfxml_network_link_bandwidth_file; AT_surfxml_cpu_name A_surfxml_cpu_name; AT_surfxml_process_kill_time A_surfxml_process_kill_time; AT_surfxml_network_link_state A_surfxml_network_link_state; -AT_surfxml_argument_value A_surfxml_argument_value; AT_surfxml_cpu_availability_file A_surfxml_cpu_availability_file; -AT_surfxml_process_host A_surfxml_process_host; -AT_surfxml_route_impact_on_src A_surfxml_route_impact_on_src; +AT_surfxml_argument_value A_surfxml_argument_value; AT_surfxml_route_src A_surfxml_route_src; -AT_surfxml_network_link_latency_file A_surfxml_network_link_latency_file; +AT_surfxml_route_impact_on_src A_surfxml_route_impact_on_src; AT_surfxml_cpu_max_outgoing_rate A_surfxml_cpu_max_outgoing_rate; -AT_surfxml_route_impact_on_dst_with_other_send A_surfxml_route_impact_on_dst_with_other_send; -AT_surfxml_cpu_interference_send_recv A_surfxml_cpu_interference_send_recv; AT_surfxml_cpu_availability A_surfxml_cpu_availability; -AT_surfxml_route_impact_on_dst A_surfxml_route_impact_on_dst; AT_surfxml_cpu_interference_recv A_surfxml_cpu_interference_recv; -AT_surfxml_route_impact_on_src_with_other_recv A_surfxml_route_impact_on_src_with_other_recv; AT_surfxml_network_link_name A_surfxml_network_link_name; -AT_surfxml_route_element_name A_surfxml_route_element_name; AT_surfxml_cpu_power A_surfxml_cpu_power; -AT_surfxml_process_start_time A_surfxml_process_start_time; AT_surfxml_include_file A_surfxml_include_file; -AT_surfxml_process_function A_surfxml_process_function; AT_surfxml_network_link_sharing_policy A_surfxml_network_link_sharing_policy; AT_surfxml_route_dst A_surfxml_route_dst; -AT_surfxml_cpu_state A_surfxml_cpu_state; AT_surfxml_network_link_latency A_surfxml_network_link_latency; -AT_surfxml_network_link_state_file A_surfxml_network_link_state_file; -AT_surfxml_cpu_interference_send A_surfxml_cpu_interference_send; AT_surfxml_cpu_state_file A_surfxml_cpu_state_file; -AT_surfxml_network_link_bandwidth_file A_surfxml_network_link_bandwidth_file; +AT_surfxml_network_link_state_file A_surfxml_network_link_state_file; /* XML state. */ #ifdef FLEX_DEBUG @@ -126,10 +128,10 @@ static void cleanup(void); #define CLEANUP cleanup() /* Text buffer stack handling. */ -char bufferstack[FLEXML_BUFFERSTACKSIZE]; +static char bufferstack[FLEXML_BUFFERSTACKSIZE]; static char* limit = bufferstack + FLEXML_BUFFERSTACKSIZE; typedef struct BufferLast_s { - struct BufferLast_s *old; char* saved; char new1[1]; + struct BufferLast_s *old; const char* saved; char new1[1]; } BufferLast; #ifdef FLEXML_HasMixed static BufferLast* last = (BufferLast*)0; @@ -153,7 +155,7 @@ static void bufferliteral(char c, const char** pp, char* text) } #ifdef FLEXML_HasMixed -static void pushbuffer(char* p) +static void pushbuffer(const char* p) { BufferLast* l = (BufferLast*)next; assert(next < limit); @@ -163,7 +165,7 @@ static void pushbuffer(char* p) last = l; } -static char* popbuffer(void) +static const char* popbuffer(void) { BufferLast* l = last; assert(last != (BufferLast*)0); @@ -218,7 +220,7 @@ Literal \'[^'']*\'|\"[^""]*\" * INPI inside an XML PI * VALUE1 inside a '...'-delimited literal * VALUE2 inside a "..."-delimited literal - * CDATA inside a section. + * CDATA inside a section. * ROOT_ expect root element * AL_ inside the attribute list for * IN_ inside a with element contents (ready for end tag) @@ -343,15 +345,19 @@ const char* *surfxml_statenames=NULL; /* */ "{ + "version"{Eq}\' ENTER(VALUE1); BUFFERSET(A_surfxml_platform_description_version); + "version"{Eq}\" ENTER(VALUE2); BUFFERSET(A_surfxml_platform_description_version); + ">" { - LEAVE; STag_surfxml_platform_description();pcdata = NULL; ENTER(S_surfxml_platform_description); + LEAVE; STag_surfxml_platform_description();surfxml_pcdata = NULL; ENTER(S_surfxml_platform_description); } "/>" { - LEAVE; STag_surfxml_platform_description(); pcdata = NULL; ETag_surfxml_platform_description(); + LEAVE; STag_surfxml_platform_description(); surfxml_pcdata = NULL; ETag_surfxml_platform_description(); switch (YY_START) { case ROOT_surfxml_platform_description: SET(EPILOG); break; } @@ -385,11 +391,11 @@ const char* *surfxml_statenames=NULL; ">" { if (!A_surfxml_include_file) FAIL("Required attribute `file' not set for `include' element."); - LEAVE; STag_surfxml_include();pcdata = NULL; ENTER(S_surfxml_include); + LEAVE; STag_surfxml_include();surfxml_pcdata = NULL; ENTER(S_surfxml_include); } "/>" { if (!A_surfxml_include_file) FAIL("Required attribute `file' not set for `include' element."); - LEAVE; STag_surfxml_include(); pcdata = NULL; ETag_surfxml_include(); + LEAVE; STag_surfxml_include(); surfxml_pcdata = NULL; ETag_surfxml_include(); switch (YY_START) { case S_surfxml_platform_description_2: case S_surfxml_platform_description_1: case S_surfxml_platform_description: SET(S_surfxml_platform_description_2); break; case ROOT_surfxml_include: SET(EPILOG); break; @@ -466,12 +472,12 @@ const char* *surfxml_statenames=NULL; ">" { if (!A_surfxml_cpu_name) FAIL("Required attribute `name' not set for `cpu' element."); if (!A_surfxml_cpu_power) FAIL("Required attribute `power' not set for `cpu' element."); - LEAVE; STag_surfxml_cpu();pcdata = NULL; ENTER(E_surfxml_cpu); + LEAVE; STag_surfxml_cpu();surfxml_pcdata = NULL; ENTER(E_surfxml_cpu); } "/>" { if (!A_surfxml_cpu_name) FAIL("Required attribute `name' not set for `cpu' element."); if (!A_surfxml_cpu_power) FAIL("Required attribute `power' not set for `cpu' element."); - LEAVE; STag_surfxml_cpu(); pcdata = NULL; ETag_surfxml_cpu(); + LEAVE; STag_surfxml_cpu(); surfxml_pcdata = NULL; ETag_surfxml_cpu(); switch (YY_START) { case S_surfxml_platform_description_2: case S_surfxml_platform_description_1: case S_surfxml_platform_description: SET(S_surfxml_platform_description_2); break; case ROOT_surfxml_cpu: SET(EPILOG); break; @@ -542,12 +548,12 @@ const char* *surfxml_statenames=NULL; ">" { if (!A_surfxml_network_link_name) FAIL("Required attribute `name' not set for `network_link' element."); if (!A_surfxml_network_link_bandwidth) FAIL("Required attribute `bandwidth' not set for `network_link' element."); - LEAVE; STag_surfxml_network_link();pcdata = NULL; ENTER(E_surfxml_network_link); + LEAVE; STag_surfxml_network_link();surfxml_pcdata = NULL; ENTER(E_surfxml_network_link); } "/>" { if (!A_surfxml_network_link_name) FAIL("Required attribute `name' not set for `network_link' element."); if (!A_surfxml_network_link_bandwidth) FAIL("Required attribute `bandwidth' not set for `network_link' element."); - LEAVE; STag_surfxml_network_link(); pcdata = NULL; ETag_surfxml_network_link(); + LEAVE; STag_surfxml_network_link(); surfxml_pcdata = NULL; ETag_surfxml_network_link(); switch (YY_START) { case S_surfxml_platform_description_2: case S_surfxml_platform_description_1: case S_surfxml_platform_description: SET(S_surfxml_platform_description_2); break; case ROOT_surfxml_network_link: SET(EPILOG); break; @@ -606,12 +612,12 @@ const char* *surfxml_statenames=NULL; ">" { if (!A_surfxml_route_src) FAIL("Required attribute `src' not set for `route' element."); if (!A_surfxml_route_dst) FAIL("Required attribute `dst' not set for `route' element."); - LEAVE; STag_surfxml_route();pcdata = NULL; ENTER(S_surfxml_route); + LEAVE; STag_surfxml_route();surfxml_pcdata = NULL; ENTER(S_surfxml_route); } "/>" { if (!A_surfxml_route_src) FAIL("Required attribute `src' not set for `route' element."); if (!A_surfxml_route_dst) FAIL("Required attribute `dst' not set for `route' element."); - LEAVE; STag_surfxml_route(); pcdata = NULL; ETag_surfxml_route(); + LEAVE; STag_surfxml_route(); surfxml_pcdata = NULL; ETag_surfxml_route(); switch (YY_START) { case S_surfxml_platform_description_2: case S_surfxml_platform_description_1: case S_surfxml_platform_description: SET(S_surfxml_platform_description_2); break; case ROOT_surfxml_route: SET(EPILOG); break; @@ -649,11 +655,11 @@ const char* *surfxml_statenames=NULL; ">" { if (!A_surfxml_route_element_name) FAIL("Required attribute `name' not set for `route_element' element."); - LEAVE; STag_surfxml_route_element();pcdata = NULL; ENTER(E_surfxml_route_element); + LEAVE; STag_surfxml_route_element();surfxml_pcdata = NULL; ENTER(E_surfxml_route_element); } "/>" { if (!A_surfxml_route_element_name) FAIL("Required attribute `name' not set for `route_element' element."); - LEAVE; STag_surfxml_route_element(); pcdata = NULL; ETag_surfxml_route_element(); + LEAVE; STag_surfxml_route_element(); surfxml_pcdata = NULL; ETag_surfxml_route_element(); switch (YY_START) { case S_surfxml_route_1: case S_surfxml_route: case S_surfxml_route_2: SET(S_surfxml_route_2); break; case ROOT_surfxml_route_element: SET(EPILOG); break; @@ -702,12 +708,12 @@ const char* *surfxml_statenames=NULL; ">" { if (!A_surfxml_process_host) FAIL("Required attribute `host' not set for `process' element."); if (!A_surfxml_process_function) FAIL("Required attribute `function' not set for `process' element."); - LEAVE; STag_surfxml_process();pcdata = NULL; ENTER(S_surfxml_process); + LEAVE; STag_surfxml_process();surfxml_pcdata = NULL; ENTER(S_surfxml_process); } "/>" { if (!A_surfxml_process_host) FAIL("Required attribute `host' not set for `process' element."); if (!A_surfxml_process_function) FAIL("Required attribute `function' not set for `process' element."); - LEAVE; STag_surfxml_process(); pcdata = NULL; ETag_surfxml_process(); + LEAVE; STag_surfxml_process(); surfxml_pcdata = NULL; ETag_surfxml_process(); switch (YY_START) { case S_surfxml_platform_description_2: case S_surfxml_platform_description_1: case S_surfxml_platform_description: SET(S_surfxml_platform_description_2); break; case ROOT_surfxml_process: SET(EPILOG); break; @@ -745,11 +751,11 @@ const char* *surfxml_statenames=NULL; ">" { if (!A_surfxml_argument_value) FAIL("Required attribute `value' not set for `argument' element."); - LEAVE; STag_surfxml_argument();pcdata = NULL; ENTER(E_surfxml_argument); + LEAVE; STag_surfxml_argument();surfxml_pcdata = NULL; ENTER(E_surfxml_argument); } "/>" { if (!A_surfxml_argument_value) FAIL("Required attribute `value' not set for `argument' element."); - LEAVE; STag_surfxml_argument(); pcdata = NULL; ETag_surfxml_argument(); + LEAVE; STag_surfxml_argument(); surfxml_pcdata = NULL; ETag_surfxml_argument(); switch (YY_START) { case S_surfxml_process_1: case S_surfxml_process: case S_surfxml_process_2: SET(S_surfxml_process_2); break; case ROOT_surfxml_argument: SET(EPILOG); break;