Triangle tools from the text book Programming Processors in Java.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
Triangle-Tools/tam

25 lines
675 B

#!/bin/bash
RED='\033[0;31m' # Red
GRN='\033[0;32m' # Green
NC='\033[0m' # No Color
file=""
if [ -z "$1" ]
then
printf "${RED}Usage: $0 file${NC}"
exit 1 # Exit with code 1, failure
else
file=$1
fi
printf "${GRN}Compiling file: $1.tri to $1.tam ...${NC}\n"
# Compile to tam
2 years ago
#java -cp build/libs/Triangle-Tools.jar triangle.Compiler programs/$1.tri -o=$1.tam &> /dev/null #Quiet output, not handy!
java -cp build/libs/Triangle-Tools.jar triangle.Compiler programs/$1.tri -o=$1.tam
printf "${GRN}Running file: $1.tam ...${NC}\n"
# Run the Program
java -cp build/libs/Triangle-Tools.jar triangle.abstractMachine.Interpreter $1.tam