From c7dfde801154378ff18aedb247f729b4e6bf8687 Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Thu, 14 Apr 2022 15:19:43 -0300 Subject: [PATCH] Add compile.sh Co-authored-by: Ezequiel Bellver Co-authored-by: Juan Barmasch --- compile.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 compile.sh diff --git a/compile.sh b/compile.sh new file mode 100755 index 0000000..0284530 --- /dev/null +++ b/compile.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +rm src/frontend/lexical-analysis/flex-scanner.c src/frontend/syntactic-analysis/bison-parser.c src/frontend/syntactic-analysis/bison-parser.h +cmake -S . -B bin +cd bin +make +if [ -f "../$1" ]; then + cat "../$1" | ./Compiler +else + echo "$1" | ./Compiler +fi