From 2fa58a9683e9b38fb2f30f3832f955cc6b99ca28 Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Sat, 3 Oct 2020 19:56:29 -0700 Subject: [PATCH] [#24] New language: ABC --- backend/src/langs.ts | 13 +++++++++++++ scripts/docker-install-phase3a.bash | 3 +++ scripts/docker-install-phase4.bash | 13 +++++++++++++ 3 files changed, 29 insertions(+) diff --git a/backend/src/langs.ts b/backend/src/langs.ts index bce8e50..27ff866 100644 --- a/backend/src/langs.ts +++ b/backend/src/langs.ts @@ -74,6 +74,19 @@ export const langs: { [key: string]: LangConfig } = { `, skip: ["scope"], }, + abc: { + name: "ABC", + repl: "abc", + input: `WRITE 123 * 234`, + main: "main.abc", + run: `abc "$PWD/main.abc" -`, + scope: { + code: `PUT 123 * 234 IN x`, + input: `WRITE x`, + }, + template: `WRITE "Hello, world!" / +`, + }, ada: { aliases: ["adb"], name: "Ada", diff --git a/scripts/docker-install-phase3a.bash b/scripts/docker-install-phase3a.bash index a1734e2..c2ba6e9 100755 --- a/scripts/docker-install-phase3a.bash +++ b/scripts/docker-install-phase3a.bash @@ -16,6 +16,9 @@ aplus-fsf aplus-fsf-doc rlwrap +# ABC +libtinfo5:i386 + # Ada gnat diff --git a/scripts/docker-install-phase4.bash b/scripts/docker-install-phase4.bash index dfbd79a..6bfda4d 100755 --- a/scripts/docker-install-phase4.bash +++ b/scripts/docker-install-phase4.bash @@ -26,6 +26,19 @@ wget -nv https://gist.githubusercontent.com/anonymous/6392418/raw/fish.py -O /us sed -i 's:^#!.*:#!/usr/bin/env python3:' /usr/local/bin/fish-lang chmod +x /usr/local/bin/fish-lang +# ABC +wget -nv https://homepages.cwi.nl/~steven/abc/implementations/abc.tar.gz +mkdir /opt/abc +tar -xf abc.tar.gz -C /opt/abc --strip-components=1 +chmod +x /opt/abc/abc /opt/abc/abckeys +tee /usr/local/bin/abc >/dev/null <<"EOF" +#!/usr/bin/env bash +cd /opt/abc +exec ./abc "$@" +EOF +chmod +x /usr/local/bin/abc +rm abc.tar.gz + # Ada wget -nv https://dl.bintray.com/reznikmm/ada-language-server/linux-latest.tar.gz tar -xf linux-latest.tar.gz