Compare commits

...

2 Commits

Author SHA1 Message Date
dtb 721b556647 now works 2022-12-08 23:51:40 -05:00
dtb 505fb17779 now compiles with GNU 2022-12-08 23:51:28 -05:00
2 changed files with 18 additions and 2 deletions

16
Makefile Normal file
View File

@ -0,0 +1,16 @@
CC = cc
RM = rm -f
TARGETS = bin/blang
all: $(TARGETS)
clean:
$(RM) $(TARGETS)
bin:
mkdir -p bin
bin/blang: bin src/*.c
$(CC) $(CFLAGS) -o $@ src/*.c
.PHONY: all clean

View File

@ -27,8 +27,8 @@ int main(){
case '$': stack = state; state = (char *)*_stack; break;
case '%': *stack = (char)state; break;
case '^': state = (char *)0; break;
case '+': ++(char)state; break;
case '-': --(char)state; break;
case '+': ++state; break;
case '-': --state; break;
case '>': putchar((char)state); break;
case '<': get = 1; break;
case ':':