From 7c5f098511b8f612a17f4ccdd8a4924c325d37e1 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 18 Oct 2024 22:35:27 +0300 Subject: initial parser+lexer + AST might still change, also not a *huge* fan of having to reverse all arrays but I guess it's unlikely to be a significant bottleneck --- gen/source.mk | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 gen/source.mk (limited to 'gen') diff --git a/gen/source.mk b/gen/source.mk new file mode 100644 index 0000000..9138011 --- /dev/null +++ b/gen/source.mk @@ -0,0 +1,9 @@ +gen/gen_parser.c: src/parser.y gen/gen_lexer.inc + bison -Wcounterexamples -o gen/gen_parser.c src/parser.y + +gen/gen_lexer.inc: src/lexer.l + flex -o gen/gen_lexer.inc src/lexer.l + +build/gen/parser.o: gen/gen_parser.c + mkdir -p build/gen + $(COMPILE_LYN) $(SKIP_ANALYZER) -c gen/gen_parser.c -o build/gen/parser.o -- cgit v1.2.3