about summary refs log tree commit diff stats
path: root/tools/test_treeshake_translate
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-12-07 15:20:44 -0800
committerKartik Agaram <vc@akkartik.com>2019-12-07 18:05:06 -0800
commitc1d596f56a6f2198ea8ea1b0a90c613e919d891b (patch)
tree6e44703f23864ad78dd68e7b0a9229f54a46b281 /tools/test_treeshake_translate
parente9aee071f44876bcce4d741eea52198249e5b339 (diff)
downloadmu-c1d596f56a6f2198ea8ea1b0a90c613e919d891b.tar.gz
5796 - move treeshake to a new tools/ directory
Diffstat (limited to 'tools/test_treeshake_translate')
-rwxr-xr-xtools/test_treeshake_translate29
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/test_treeshake_translate b/tools/test_treeshake_translate
new file mode 100755
index 00000000..1aa6f068
--- /dev/null
+++ b/tools/test_treeshake_translate
@@ -0,0 +1,29 @@
+#!/bin/sh
+# Translate SubX programs using a minified translator.
+# Based on ntranslate.
+
+set -e
+
+./build
+
+cat $*          |apps/braces.treeshake.bin   > a.braces
+
+cat a.braces    |apps/calls.treeshake.bin    > a.calls
+
+cat a.calls     |apps/sigils.treeshake.bin   > a.sigils
+
+cat a.sigils    |apps/tests.treeshake.bin    > a.tests
+
+cat a.tests     |apps/assort.treeshake.bin   > a.assort
+
+cat a.assort    |apps/dquotes.treeshake.bin  > a.dquotes
+
+cat a.dquotes   |apps/assort.treeshake.bin   > a.assort2
+
+cat a.assort2   |apps/pack.treeshake.bin     > a.pack
+
+cat a.pack      |apps/survey.treeshake.bin   > a.survey
+
+cat a.survey    |apps/hex.treeshake.bin      > a.elf
+
+chmod +x a.elf