logo

libbulletml

Library of Bullet Markup Language (forked from https://shinh.skr.jp/libbulletml/index_en.html )git clone https://hacktivis.me/git/libbulletml.git
commit: 944326c0dc568a8997a5cb86bdb6cd69e4e15227
parent 447434ccc17805f57a2387e747bf7f0d7a181cde
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri, 22 Mar 2024 20:08:21 +0100

src/calc.yy: Fix yyerror return type

Diffstat:

Msrc/Makefile3++-
Msrc/calc.yy7+++----
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/Makefile b/src/Makefile @@ -1,6 +1,7 @@ INCLUDES = -I. LIBS = tinyxml/tinyxml.o tinyxml/tinyxmlparser.o tinyxml/tinyxmlerror.o OBJS = bulletmlparser-tinyxml.o bulletmlparser.o bulletmltree.o calc.o formula-variables.o bulletmlrunner.o bulletmlrunnerimpl.o +YY_OUT = calc.cpp all: libbulletml.a @@ -9,7 +10,7 @@ libbulletml.a: $(OBJS) $(AR) -r libbulletml.a *.o tinyxml/tiny*.o clean: - rm -f *.o *.a + rm -f *.a $(OBJS) $(YY_OUT) $(MAKE) -C tinyxml clean calc.cpp: calc.yy diff --git a/src/calc.yy b/src/calc.yy @@ -19,8 +19,8 @@ typedef double NumType; #include "formula.h" #include "formula-variables.h" -int yyerror(const char* s); -int yylex(); +extern void yyerror(const char* s); +extern int yylex(); const char* yyinStr; @@ -151,9 +151,8 @@ int yylex () return c; } -int yyerror(const char* s) { +void yyerror(const char* s) { printf("yyerror: %s\n", s); - return 0; } std::auto_ptr<CalcFormula> calc(const std::string& str) {