all: parser
	echo All up to date

parser: parser.c c-gram.c
	grep ^//\\\\ c-gram.c > parser.g
	ecce parser.g -command "(v.//\\\\ .s..m,m)0;%c"
	cc -o takeon takeon.c
	./takeon parser.g > parser.h
	cc -o update_astcode -Wno-format-extra-args update_astcode.c
	./update_astcode > c-gram-new.c
	mv c-gram-new.c c-gram.c
	cc -g -Wno-div-by-zero -o parser parser.c

clean:
	rm -f *~ parser takeon
