Add compile.sh

Co-authored-by: Ezequiel Bellver <ebellver@itba.edu.ar>
Co-authored-by: Juan Barmasch <jbarmasch@itba.edu.ar>
This commit is contained in:
Santiago Lo Coco 2022-04-14 15:19:43 -03:00
parent ead30415e4
commit c7dfde8011
1 changed files with 11 additions and 0 deletions

11
compile.sh Executable file
View File

@ -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