view compile @ 225:262f5ae1bb1b

Added a new binaryOps:withHigherPrec macro to simplify specification of binary operator precedence level rules in the grammar
author Michael Pavone <pavone@retrodev.com>
date Sun, 29 Dec 2013 14:39:54 -0800
parents 5071d601fe70
children cba0cb39517a
line wrap: on
line source

#!/bin/sh

cname=`basename $1`.c

if test -f "$cname"; then
	rm "$cname"
fi

./tpc $1 -o $cname

if test ! -s "$cname"; then
	echo "Compilation to C failed"
	exit 1
fi

bin=`echo $1 | sed 's/\.tp//'`
shift
echo gcc $@ -o $bin $cname runtime/object.c -lgc
gcc $@ -o $bin $cname runtime/object.c -lgc