From: Martin Quinson Date: Tue, 15 Mar 2016 21:13:32 +0000 (+0100) Subject: be more explicit when we see a platform v3 file X-Git-Tag: v3_13~413 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/2e11a7ad5b33b2c9258e74378916b8f8f1f2e0cd be more explicit when we see a platform v3 file --- diff --git a/src/surf/xml/simgrid_dtd.c b/src/surf/xml/simgrid_dtd.c index 4b3808dc63..77f50faca6 100644 --- a/src/surf/xml/simgrid_dtd.c +++ b/src/surf/xml/simgrid_dtd.c @@ -5644,7 +5644,7 @@ SET(DOCTYPE); case 12: /* rule 12 can match eol */ YY_RULE_SETUP -FAIL("Bad declaration %s.",surf_parse_text); +FAIL("Bad declaration %s.\nIf your are using a XML v3 file (check the version attribute in ), please update it with tools/simgrid_update_xml.pl",surf_parse_text); YY_BREAK case 13: @@ -5655,7 +5655,7 @@ SET(ROOT_surfxml_platform); case 14: /* rule 14 can match eol */ YY_RULE_SETUP -FAIL("Bad declaration %s.",surf_parse_text); +FAIL("Bad declaration %s.\nIf your are using a XML v3 file (check the version attribute in ), please update it with tools/simgrid_update_xml.pl",surf_parse_text); YY_BREAK case 15: YY_RULE_SETUP @@ -5919,8 +5919,8 @@ YY_RULE_SETUP if (!AX_surfxml_ASroute_src) FAIL("Required attribute `src' not set for `ASroute' element."); LEAVE; STag_surfxml_ASroute(); surfxml_pcdata_ix = 0; ETag_surfxml_ASroute(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS_5: SET(S_surfxml_AS_6); break; - case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_4: case S_surfxml_AS_6: case S_surfxml_AS_7: case S_surfxml_AS_8: SET(S_surfxml_AS_8); break; + case S_surfxml_AS_3: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break; + case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_4: case S_surfxml_AS_6: case S_surfxml_AS_7: case S_surfxml_AS_8: SET(S_surfxml_AS_8); break; } } YY_BREAK @@ -5944,8 +5944,8 @@ YY_RULE_SETUP ETag_surfxml_ASroute(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS_5: SET(S_surfxml_AS_6); break; - case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_4: case S_surfxml_AS_6: case S_surfxml_AS_7: case S_surfxml_AS_8: SET(S_surfxml_AS_8); break; + case S_surfxml_AS_3: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break; + case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_4: case S_surfxml_AS_6: case S_surfxml_AS_7: case S_surfxml_AS_8: SET(S_surfxml_AS_8); break; } } YY_BREAK diff --git a/tools/cmake/MaintainerMode.cmake b/tools/cmake/MaintainerMode.cmake index c2dae37804..d7ce7eb303 100644 --- a/tools/cmake/MaintainerMode.cmake +++ b/tools/cmake/MaintainerMode.cmake @@ -155,6 +155,7 @@ if(enable_maintainer_mode AND NOT WIN32) COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/src/surf/xml COMMAND ${FLEXML_EXE} --root-tags platform -b 1000000 -P surfxml --sysid=http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd -S src/surf/xml/simgrid_dtd.l -L src/surf/xml/simgrid.dtd COMMAND ${SED_EXE} -i ${string14} src/surf/xml/simgrid_dtd.l + COMMAND ${SED_EXE} -i "'s/FAIL(\"Bad declaration %s.\",yytext)/FAIL(\"Bad declaration %s.\\\\nIf your are using a XML v3 file (check the version attribute in ), please update it with tools\\/simgrid_update_xml.pl\",yytext)/'" src/surf/xml/simgrid_dtd.l COMMAND ${CMAKE_COMMAND} -E echo " Generated src/surf/xml/simgrid_dtd.l" #${CMAKE_HOME_DIRECTORY}/src/simdag/dax_dtd.l: ${CMAKE_HOME_DIRECTORY}/src/simdag/dax.dtd