evalexpr: initial recursive descent parser
This commit is contained in:
commit
a92e39dbec
8 changed files with 536 additions and 0 deletions
23
Makefile
Normal file
23
Makefile
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
CC = gcc
|
||||
CPPFLAGS = -Isrc/ -D_POSIX_C_SOURCE=200809L
|
||||
CFLAGS = -Wall -Wextra -pedantic -Werror -std=c99
|
||||
VPATH = src/
|
||||
|
||||
SRC = \
|
||||
src/ast/ast.c \
|
||||
src/eval/eval.c \
|
||||
src/parse/parse.c \
|
||||
|
||||
BIN = evalexpr
|
||||
OBJ = $(SRC:.c=.o)
|
||||
|
||||
.PHONY: all
|
||||
all: $(BIN)
|
||||
|
||||
# Write this one rule instead of using the implicit rules to buid at the root
|
||||
$(BIN): $(OBJ) src/evalexpr.o
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
$(RM) $(OBJ) # remove object files
|
||||
$(RM) $(BIN) # remove main program
|
||||
Loading…
Add table
Add a link
Reference in a new issue