diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | README.md | 14 |
3 files changed, 19 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c795b05 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build
\ No newline at end of file @@ -18,7 +18,7 @@ OBJS := $(BUILD_DIR)/parser.tab.o $(BUILD_DIR)/lex.yy.o $(BUILD_DIR)/driver TARGET := $(BUILD_DIR)/imp -.PHONY: all clean +.PHONY: all clean run all: $(TARGET) @@ -46,6 +46,9 @@ $(BUILD_DIR)/driver.o: $(DRIVER_C) $(PARSER_H) $(AST_H) | $(BUILD_DIR) $(BUILD_DIR)/ast.o: $(AST_C) $(AST_H) | $(BUILD_DIR) $(CC) $(CFLAGS) -c $(AST_C) -o $@ +run: $(TARGET) + ./$(TARGET) example.imp + clean: rm -rf $(BUILD_DIR) diff --git a/README.md b/README.md new file mode 100644 index 0000000..b05b025 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# IMP Interpreter + +A small interpreter of the IMP programming language. + +# Build + +- `make all` to build interpreter. +- `make run` to interpret "example.imp". +- `make clean` to remove build folder. + +## Dependencies + +- [flex](https://github.com/westes/flex) +- [bison](https://www.gnu.org/software/bison)
\ No newline at end of file |