feat: add modular Forth interpreter implementation

Co-authored-by: aider (openrouter/tencent/hy3-preview:free) <aider@aider.chat>
This commit is contained in:
2026-05-03 16:50:43 +03:00
parent c9584ccb26
commit 0d9b7e3424
5 changed files with 619 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
CC = gcc
CFLAGS = -Wall -Wextra -g
LDFLAGS =
SRCS = forth_core.c forth_dict.c forth_words.c forth_interp.c main.c
OBJS = $(SRCS:.c=.o)
TARGET = forth
all: $(TARGET)
$(TARGET): $(OBJS)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
%.o: %.c forth.h
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f $(OBJS) $(TARGET)
.PHONY: all clean