]> granicus.if.org Git - graphviz/commitdiff
remove now-unnecessary ad hoc replacement of HTML parser prefix
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 9 Sep 2020 03:21:26 +0000 (20:21 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 15 Sep 2020 04:25:14 +0000 (21:25 -0700)
Related to #1806.

lib/common/CMakeLists.txt
lib/common/Makefile.am
lib/common/htmlparse.y
lib/gvc.vcxproj

index 7e04133e69cf3dea9922bcf7a93f6f3b7bef61d0..b96b3e99df3e5e70bc0046e364031d50e9ec7455 100644 (file)
@@ -1,18 +1,5 @@
 BISON_TARGET(HTMLparse htmlparse.y ${CMAKE_CURRENT_BINARY_DIR}/htmlparse.c)
 
-# Modify files generated by Bison, to match the Autotools build.
-# - Replace "yy" with "aag"
-configure_file(
-    "${TOP_SOURCE_DIR}/cmake/modify_common_htmlparse.cmake.in"
-    "${CMAKE_CURRENT_BINARY_DIR}/modify_common_htmlparse.cmake"
-    @ONLY
-)
-add_custom_command(
-    OUTPUT ${BISON_HTMLparse_OUTPUTS}
-    COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/modify_common_htmlparse.cmake
-    APPEND
-)
-
 add_definitions(-DGVC_EXPORTS -D_BLD_gvc=1)
 
 # Generate colortbl.h from sources
index 217b340238e46c1879dc8f6500947ef542e6c09d..7b0cf6f21bc0c86e34b772b8a23377303430059f 100644 (file)
@@ -60,10 +60,10 @@ htmllex.o htmllex.lo: htmllex.c htmllex.h htmlparse.h
 htmlparse.o htmlparse.lo: htmlparse.c htmlparse.h
                                                                                 
 htmlparse.c: y.tab.c
-       @SED@ "s/yy/html/g" < y.tab.c > htmlparse.c
+       cp -f y.tab.c htmlparse.c
 
 htmlparse.h: y.tab.h
-       @SED@ "s/yy/html/g" < y.tab.h > htmlparse.h
+       cp -f y.tab.h htmlparse.h
 
 y.tab.c y.tab.h: y.output
 
index 715aa91f66971814ef1332b44056b1d581a01261..e8b3fee492fad6a130ccab67ca2957cff68dc6a2 100644 (file)
@@ -25,7 +25,7 @@
 #include <common/htmltable.h>
 #include <common/htmllex.h>
 
-extern int yyparse(void);
+extern int htmlparse(void);
 
 typedef struct sfont_t {
     textfont_t *cfont; 
@@ -534,7 +534,7 @@ string : T_string
 
 table : opt_space T_table { 
           if (nonSpace(agxbuse(HTMLstate.str))) {
-            yyerror ("Syntax error: non-space string used before <TABLE>");
+            htmlerror ("Syntax error: non-space string used before <TABLE>");
             cleanup(); YYABORT;
           }
           $2->u.p.prev = HTMLstate.tblstack;
@@ -545,7 +545,7 @@ table : opt_space T_table {
         }
         rows T_end_table opt_space {
           if (nonSpace(agxbuse(HTMLstate.str))) {
-            yyerror ("Syntax error: non-space string used after </TABLE>");
+            htmlerror ("Syntax error: non-space string used after </TABLE>");
             cleanup(); YYABORT;
           }
           $$ = HTMLstate.tblstack;
@@ -628,7 +628,7 @@ parseHTML (char* txt, int* warn, htmlenv_t *env)
     l = NULL;
   }
   else {
-    yyparse();
+    htmlparse();
     *warn = clearHTMLlexer ();
     l = HTMLstate.lbl;
   }
index d604f4a79f7568021bf5705a52cc67dda1c6b2ef..ce99c8f073326606b0dfd5e32a6f8c5f62129775 100644 (file)
@@ -73,8 +73,8 @@
     </Link>
     <PreBuildEvent>
       <Command>win_bison -dy -Wno-yacc common\htmlparse.y -o common\htmlparse-intermediate.c
-sed "s/yy/html/g" &lt; common\htmlparse-intermediate.c &gt; common\htmlparse.c
-sed "s/yy/html/g" &lt; common\htmlparse-intermediate.h &gt; common\htmlparse.h
+copy common\htmlparse-intermediate.c common\htmlparse.c
+copy common\htmlparse-intermediate.h common\htmlparse.h
 del common\htmlparse-intermediate.c
 del common\htmlparse-intermediate.h
 awk -f $(SolutionDir)awk\svgcolor.awk common\svgcolor_names &gt; common\svgcolor_lib
@@ -108,8 +108,8 @@ awk -f $(SolutionDir)awk\colortbl.awk color_lib &gt; common\colortbl.h</Command>
     </Link>
     <PreBuildEvent>
       <Command>win_bison -dy -Wno-yacc common\htmlparse.y -o common\htmlparse-intermediate.c
-sed "s/yy/html/g" &lt; common\htmlparse-intermediate.c &gt; common\htmlparse.c
-sed "s/yy/html/g" &lt; common\htmlparse-intermediate.h &gt; common\htmlparse.h
+copy common\htmlparse-intermediate.c common\htmlparse.c
+copy common\htmlparse-intermediate.h common\htmlparse.h
 del common\htmlparse-intermediate.c
 del common\htmlparse-intermediate.h
 awk -f $(SolutionDir)awk\svgcolor.awk common\svgcolor_names &gt; common\svgcolor_lib