Skip to content

Commit 35da7fb

Browse files
committed
Parser debugging and restructure
1 parent ae50e46 commit 35da7fb

17 files changed

Lines changed: 591 additions & 414 deletions

.github/workflows/c-cpp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
run: |
2828
autoconf
2929
./configure
30-
make
30+
make MODE=Release
3131
3232
- name: Tests
3333
working-directory: ./

Makefile.in

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Target variables
32
MODE ?= Debug
43

@@ -11,7 +10,7 @@ OBJ_DIR := $(ROOT)/obj
1110
BUILD_DIR := $(OBJ_DIR)/release
1211
AST_DIR := $(ROOT)/ast
1312
BIN_DIR := $(ROOT)/bin
14-
ifeq ($(MODE),Debug)
13+
ifeq ($(MODE), Debug)
1514
BUILD_DIR := $(OBJ_DIR)/debug
1615
endif
1716
prefix ?= /usr/local
@@ -24,16 +23,16 @@ boost_libdir ?= $(prefix)
2423
INCLUDES := -I. -I$(boost_libdir)/include
2524
CXXFLAGS := -std=c++17 -Wall -Werror -Wno-reorder -O3 -D BOOST_PHOENIX_STL_TUPLE_H_ -D BOOST_MPL_LIMIT_LIST_SIZE=30 -D BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
2625
ifeq ($(MODE),Debug)
27-
CXXFLAGS += -ggdb
26+
CXXFLAGS += -ggdb
2827
endif
2928
LIB_SBGRAPH = lib/libsbgraph.a
3029

3130
all: $(LIB_SBGRAPH)
3231

3332
include sbg/Makefile.include
3433
include parser/Makefile.include
35-
include eval/Makefile.include
36-
include test/Makefile.include
34+
#include eval/Makefile.include
35+
#include test/Makefile.include
3736

3837
$(BUILD_DIR)/%.o : %.cpp
3938
$(CC) $(INCLUDES) $(CXXFLAGS) -MM -MT $@ -MF $(patsubst %.o,%.d,$@) $<
@@ -91,7 +90,7 @@ doc:
9190

9291
test: lib-gtest $(SBG_TEST)
9392

94-
TEST_DIRS := test/parser test/performance test/performance/boost test/eval
93+
TEST_DIRS := test/parser test/performance test/performance/boost test/eval
9594

9695
clean:
9796
$(RM) -rf $(BIN_DIR) $(OBJ_DIR) $(LIB_SBGRAPH) $(ROOT)/lib $(ROOT)/include $(3RD_PARTY_DIR)/gtest/usr

ast/expr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ std::ostream &operator<<(std::ostream &out, const DSBG &g)
304304
std::ostream &operator<<(std::ostream &out, const UnOp &op)
305305
{
306306
switch (op) {
307-
case UnOp::neg:
307+
case UnOp::oppo:
308308
out << "-";
309309
break;
310310

ast/expr.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ std::ostream &operator<<(std::ostream &out, const DSBG &g);
218218
// Composite expressions -------------------------------------------------------
219219
////////////////////////////////////////////////////////////////////////////////
220220

221-
enum class UnOp { neg, card, comp };
221+
enum class UnOp { oppo, card, comp };
222222
std::ostream &operator<<(std::ostream &out, const UnOp &op);
223223

224224
struct UnaryOp {

parser/Makefile.include

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ all: $(PARSER)
88

99
PARSER_SRC := \
1010
$(PARSER_DIR)/main.cpp \
11+
$(PARSER_DIR)/parser.cpp \
1112
$(AST_DIR)/expr.cpp \
1213
$(PARSER_DIR)/expr.cpp \
1314
$(AST_DIR)/statement.cpp \

parser/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
# Set-Based Graph Parser
22

3-
This module was intended to provide the user with a tool that would allow for easy testing of the library. Currently, when compiled, the executable /parser/sbg-parser is created that allows files as input. Many test cases are presented in the /test folder.
3+
The SBG library started with only the /sbg directory. Then the project was
4+
extended with a parser and evaluator to test algorithms independently of any
5+
client application. As such, to make use of the SBG algorithms this module is
6+
not necessary, but a developing tool used for debugging.

0 commit comments

Comments
 (0)