summaryrefslogtreecommitdiff
path: root/run
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-04-19 01:05:46 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2020-04-19 01:05:46 -0400
commit30caeaab671f7fe7d7582ce7e645302a139c15a0 (patch)
treec0895a996b2ce52656b02d55fa4faeab779fc71d /run
parent89ae387576966f9faa89efa6f859dc8b25e3ba76 (diff)
new for loop system: cgen
Diffstat (limited to 'run')
-rw-r--r--run18
1 files changed, 18 insertions, 0 deletions
diff --git a/run b/run
new file mode 100644
index 0000000..2237ab5
--- /dev/null
+++ b/run
@@ -0,0 +1,18 @@
+#!/bin/sh
+if [ "$2" = "" ]; then
+ tocf=test.toc
+else
+ tocf="$2"
+fi
+if [ "$1" = "noq" ]; then
+ FLAGS=
+else
+ FLAGS="-q"
+fi
+
+./toc $tocf || exit 1
+if [ "$1" = "c" ]; then
+ gcc out.c -g -Wno-builtin-declaration-mismatch && ./a.out
+elif [ "$1" = "pc" ]; then
+ cat out.c
+fi