<commit_before>CC     = g++
CFLAGS = -Wall
BIN    = krystal

$(BIN) : parser.o scanner.o Main.cpp Krystal.h
	$(CC) $(CFLAGS) Main.cpp scanner.o parser.o -o $(BIN)

parser.o : parser.y
	bison parser.y
	$(CC) $(CFLAGS) -c -o parser.o parser.tab.c 

scanner.o : parser.y scanner.l Scanner.h
	flex scanner.l
	$(CC) $(CFLAGS) -c -o scanner.o lex.yy.cc

.PHONY : clean
clean :
# remove bison generated files
	rm -rf parser.tab.c parser.tab.h location.hh position.hh stack.hh
# remove flex generated files
	rm -rf lex.yy.cc
# remove compiled files
	rm -rf $(BIN) *.o
<commit_msg>add test command to Makefile<commit_after>CC     = g++
CFLAGS = -Wall
BIN    = krystal

$(BIN) : parser.o scanner.o Main.cpp Krystal.h
	$(CC) $(CFLAGS) Main.cpp scanner.o parser.o -o $(BIN)

parser.o : parser.y
	bison parser.y
	$(CC) $(CFLAGS) -c -o parser.o parser.tab.c 

scanner.o : parser.y scanner.l Scanner.h
	flex scanner.l
	$(CC) $(CFLAGS) -c -o scanner.o lex.yy.cc


.PHONY : all clean test

clean :
# remove bison generated files
	rm -rf parser.tab.c parser.tab.h location.hh position.hh stack.hh
# remove flex generated files
	rm -rf lex.yy.cc
# remove compiled files
	rm -rf $(BIN) *.o

test : $(BIN) test.kst
	./$(BIN) test.kst

{'fraction_non_alphanumeric': 0.14921681780708987, 'fraction_numerical': 0.0, 'mean_word_length': 3.0332225913621262, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '268981', 'n_tokens_mistral': 497, 'n_tokens_neox': 473, 'n_words': 147}