Skip to content

Commit

Permalink
I think merge conflicts are gone
Browse files Browse the repository at this point in the history
  • Loading branch information
eunicekokor committed Dec 16, 2016
2 parents d3612c3 + 56a7d39 commit 9ea91ff
Show file tree
Hide file tree
Showing 58 changed files with 1,226 additions and 1,223 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
src/beathoven
src/_build
src/stdlib.ll
test/scanner/tokenize
test/compiler/logs/*
*.log
Expand Down
9 changes: 3 additions & 6 deletions beathoven.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@ if [ ! -f $BEAT_FILE ]; then
exit 1
fi

# beathoven.sh (-c | -r) <BEAT_FILE> <output_file>
# beathoven.sh (-c ) <BEAT_FILE> <output_file>
if [ "$#" -eq 3 ]; then
if [ "$1" == "-c" ]; then
cat $LIST_LIB $DIST_LIB $2 | $BEAT_FILE $1 > $3
exit 0
elif [ "$1" == "-r" ]; then
$BEAT_FILE $1 $3 < $2
exit 0
else
printf "ERROR: invalid arguments supplied for command $0 $1\n" 1>&2
exit 1
Expand All @@ -32,9 +29,9 @@ fi
# beathoven.sh -h
if [ "$#" -eq 1 ] && [ "$1" == "-h" ]; then
printf """Beathoven Usage: beathoven.sh <flag> [input_file] [output_file]\n"
printf " -c\tCompile beathoven input_file to c code in output_file with stdlib\n"
printf " -c\tCompile beathoven input_file to llvm code in output_file with stdlib\n"
printf " -h\tDisplay this list of options\n"
printf " -r\tCompile beathoven input_file into raw c output_file \n"
printf " -s\tPrint a json tree of our semantically checked abstract syntax tree\n"
exit 1
fi

Expand Down
34 changes: 34 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

# This Runs all the things necessary to make it work
BREW="ruby -e '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)' "
OPAM="brew install opam"
OPAMINIT="opam init"
LLVM="brew install homebrew/versions/llvm38"
CONFIG_ENV="opam config env"
CORE="opam install core"
LLVM38="opam install llvm.3.8"
YOJSON="opam install yojson"
SYMLINK="sudo ln -s /usr/local/opt/llvm38/bin/lli-3.8 /usr/bin/lli"

Install(){
echo "Running... $*"
eval $*
}

Install $BREW
Install $OPAM
Install $OPAMINIT
Install $LLVM
Install $CONFIG_ENV
Install $CORE
Install $LLVM38
Install $YOJSON
Install $SYMLINK

# declare -a toInstall=($BREW $OPAM)

# for thing in $toInstall
# do
# echo $thing
# done
Loading

0 comments on commit 9ea91ff

Please sign in to comment.