about summary refs log tree commit diff stats
path: root/translate
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-07-27 16:01:55 -0700
committerKartik Agaram <vc@akkartik.com>2019-07-27 17:47:59 -0700
commit6e1eeeebfb453fa7c871869c19375ce60fbd7413 (patch)
tree539c4a3fdf1756ae79770d5c4aaf6366f1d1525e /translate
parent8846a7f85cc04b77b2fe8a67b6d317723437b00c (diff)
downloadmu-6e1eeeebfb453fa7c871869c19375ce60fbd7413.tar.gz
5485 - promote SubX to top-level
Diffstat (limited to 'translate')
-rwxr-xr-xtranslate33
1 files changed, 33 insertions, 0 deletions
diff --git a/translate b/translate
new file mode 100755
index 00000000..7acf92c4
--- /dev/null
+++ b/translate
@@ -0,0 +1,33 @@
+#!/bin/sh
+# Translate SubX using the self-hosted translator.
+#
+# Possible knobs:
+#   Whether to run a phase directly or emulated.
+#     Just always emulate for now since we debug on non-Linux.
+#   Whether to stop after a phase.
+#     Just always run all phases, but print out phases so it's clear where an error happens.
+#   Whether to trace a phase. Whether to always trace or rerun with tracing enabled after an error.
+#     Leave tracing to other scripts. We save intermediate files so it's easy to rerun a single phase afterwards.
+#   Whether to run a phase with debug information. (Need to juggle multiple sets of debug files.)
+#     Again, that's for subsequent scripts.
+
+set -e
+set -v
+
+./build
+
+echo `cat $* |grep -v '^\s*#\|^\s*$' |wc -l` lines
+
+cat $*          |./subx_bin run apps/tests    > a.tests
+
+cat a.tests     |./subx_bin run apps/dquotes  > a.dquotes
+
+cat a.dquotes   |./subx_bin run apps/assort   > a.assort
+
+cat a.assort    |./subx_bin run apps/pack     > a.pack
+
+cat a.pack      |./subx_bin run apps/survey   > a.survey
+
+cat a.survey    |./subx_bin run apps/hex      > a.elf
+
+xxd a.elf                                     > a.xxd