Related to #1806.
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
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
#include <common/htmltable.h>
#include <common/htmllex.h>
-extern int yyparse(void);
+extern int htmlparse(void);
typedef struct sfont_t {
textfont_t *cfont;
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;
}
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;
l = NULL;
}
else {
- yyparse();
+ htmlparse();
*warn = clearHTMLlexer ();
l = HTMLstate.lbl;
}
</Link>
<PreBuildEvent>
<Command>win_bison -dy -Wno-yacc common\htmlparse.y -o common\htmlparse-intermediate.c
-sed "s/yy/html/g" < common\htmlparse-intermediate.c > common\htmlparse.c
-sed "s/yy/html/g" < common\htmlparse-intermediate.h > 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 > common\svgcolor_lib
</Link>
<PreBuildEvent>
<Command>win_bison -dy -Wno-yacc common\htmlparse.y -o common\htmlparse-intermediate.c
-sed "s/yy/html/g" < common\htmlparse-intermediate.c > common\htmlparse.c
-sed "s/yy/html/g" < common\htmlparse-intermediate.h > 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 > common\svgcolor_lib