Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
be more explicit when we see a platform v3 file
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 15 Mar 2016 21:13:32 +0000 (22:13 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 15 Mar 2016 21:13:32 +0000 (22:13 +0100)
src/surf/xml/simgrid_dtd.c
tools/cmake/MaintainerMode.cmake

index 4b3808d..77f50fa 100644 (file)
@@ -5644,7 +5644,7 @@ SET(DOCTYPE);
 case 12:
 /* rule 12 can match eol */
 YY_RULE_SETUP
 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 <platform>), please update it with tools/simgrid_update_xml.pl",surf_parse_text);
        YY_BREAK
 
 case 13:
        YY_BREAK
 
 case 13:
@@ -5655,7 +5655,7 @@ SET(ROOT_surfxml_platform);
 case 14:
 /* rule 14 can match eol */
 YY_RULE_SETUP
 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 <platform>), please update it with tools/simgrid_update_xml.pl",surf_parse_text);
        YY_BREAK
 case 15:
 YY_RULE_SETUP
        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) {
   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
   }
  }
        YY_BREAK
@@ -5944,8 +5944,8 @@ YY_RULE_SETUP
   ETag_surfxml_ASroute();
   popbuffer(); /* attribute */
   switch (YY_START) {
   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
   }
  }
        YY_BREAK
index c2dae37..d7ce7eb 100644 (file)
@@ -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 ${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 <platform>), 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
       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