some fixes
This commit is contained in:
parent
080d115e17
commit
8752f4e153
2 changed files with 17 additions and 6 deletions
21
makefile
21
makefile
|
|
@ -8,17 +8,28 @@ TARGET = build/py2rb
|
||||||
$(TARGET): build/lexer.o build/parser.o build/ParserCtx.o
|
$(TARGET): build/lexer.o build/parser.o build/ParserCtx.o
|
||||||
$(CXX) $^ -o $@
|
$(CXX) $^ -o $@
|
||||||
|
|
||||||
build/lexer.hpp build/lexer.cpp: src/lexer.l build/parser.hpp
|
build/lexer.hpp build/lexer.cpp: src/lexer.l build/parser.hpp build
|
||||||
$(FLEX) --header-file=build/lexer.hpp -o build/lexer.cpp src/lexer.l
|
$(FLEX) --header-file=build/lexer.hpp -o build/lexer.cpp src/lexer.l
|
||||||
|
|
||||||
build/parser.hpp build/parser.cpp: src/parser.y
|
build/parser.hpp build/parser.cpp: src/parser.y build
|
||||||
$(BISON) -d -v -o build/parser.cpp src/parser.y
|
$(BISON) -d -v -o build/parser.cpp src/parser.y
|
||||||
|
|
||||||
build/lexer.o: build/lexer.cpp
|
build/lexer.o: build/lexer.cpp build
|
||||||
$(CXX) -c $(ARGS) $< -o $@
|
$(CXX) -c $(ARGS) $< -o $@
|
||||||
|
|
||||||
build/parser.o: build/parser.cpp
|
build/parser.o: build/parser.cpp build
|
||||||
$(CXX) -c $(ARGS) $< -o $@
|
$(CXX) -c $(ARGS) $< -o $@
|
||||||
|
|
||||||
build/ParserCtx.o: src/ParserCtx.cpp
|
build/ParserCtx.o: src/ParserCtx.cpp build
|
||||||
$(CXX) -c $(ARGS) $< -o $@
|
$(CXX) -c $(ARGS) $< -o $@
|
||||||
|
|
||||||
|
build:
|
||||||
|
mkdir -p build
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf build
|
||||||
|
|
||||||
|
run: $(TARGET)
|
||||||
|
$(TARGET)
|
||||||
|
|
||||||
|
.PHONY: clean run
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
%defines
|
%defines
|
||||||
|
|
||||||
/* namespace to enclose parser in */
|
/* namespace to enclose parser in */
|
||||||
%name-prefix="yy"
|
%define api.prefix {yy}
|
||||||
|
|
||||||
/* set the parser's class identifier */
|
/* set the parser's class identifier */
|
||||||
%define api.parser.class {Parser}
|
%define api.parser.class {Parser}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue