summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2017-02-08 23:16:53 (EST)
committer P. J. McDermott <pj@pehjota.net>2017-02-08 23:16:53 (EST)
commit9006ed42ac11f2fca59c5dfa699f9c2273f0e05e (patch)
tree7169b19cedd096efa54154f0a021c9b8d018fc5e
parentbc9920000d09225536556a0ea4fc705101ceac67 (diff)
downloadeggshell-9006ed42ac11f2fca59c5dfa699f9c2273f0e05e.zip
eggshell-9006ed42ac11f2fca59c5dfa699f9c2273f0e05e.tar.gz
eggshell-9006ed42ac11f2fca59c5dfa699f9c2273f0e05e.tar.bz2
eshtrans/join.sh: Remove
-rw-r--r--eshtrans/join.sh83
1 files changed, 0 insertions, 83 deletions
diff --git a/eshtrans/join.sh b/eshtrans/join.sh
deleted file mode 100644
index e40bf45..0000000
--- a/eshtrans/join.sh
+++ /dev/null
@@ -1,83 +0,0 @@
-#buf="$(cat "${0}")"
-buf="$(cat 'backend/codegen.esh')"
-#buf="$(cat 'frontend/lexer.esh')"
-
-eval "$(printf '%s' "${buf}" | awk -v FS='' -v j=0 \
- -v squote="'" -v esc_squote="'\\\\''" '
- {
- for (i = 1; i <= NF; ++i) {
- sub(squote, esc_squote, $i);
- printf("lbufv_%d=" squote "%s" squote "\n",
- j++, $i);
- };
- printf("lbufv_%d=" squote "\n" squote "\n", j++);
- }
- ')"
-
-test_printf()
-{
- foo()
- {
- i=0
- while [ ${i} -le ${#buf} ]; do
- c=$(eval "printf '%sx' \"\${lbufv_${i}}\"")
- printf '%s' "${c%x}"
- i=$((${i} + 1))
- done
- }
- out="$(foo)"
-}
-
-test_concat()
-{
- foo()
- {
- i=0
- s=''
- while [ ${i} -le ${#buf} ]; do
- c=$(eval "printf '%sx' \"\${lbufv_${i}}\"")
- s="${s}${c%x}"
- i=$((${i} + 1))
- done
- printf '%s' "${s}"
- }
- out="$(foo)"
-}
-
-test_bc()
-{
- foo()
- {
- eval "printf '%s' \"$(printf '${lbufv_%d}' $(printf \
- 'for (i = 0; i <= %d; ++i) i\n' ${#buf} | bc))\""
- }
- out="$(foo)"
-}
-
-test_awk()
-{
- foo()
- {
- eval "printf '%s' \"$(printf '${lbufv_%d}' $(awk \
- -v end=${#buf} \
- 'BEGIN { for (i = 0; i <= end; ++i) print(i); }'))\""
- }
- out="$(foo)"
-}
-
-if [ ${#} -eq 1 ]; then
- test_${1}
- if ! [ "x${buf}" = "x${out}" ]; then
- printf 'Error: bad output:\n'
- printf '%s' "${out}" | sed 's/^/\t/'
- fi
-else
- i=0
- while [ ${i} -lt 3 ]; do
- for f in printf concat bc awk; do
- printf '%s:\n' "${f}"
- time -p sh "${0}" "${f}" 2>&1 | sed 's/^/\t/'
- done
- i=$((${i} + 1))
- done
-fi