From 41d4500ce6c7f983b01d1ceddfd9d7f8fd9feff7 Mon Sep 17 00:00:00 2001 From: 1computer1 Date: Fri, 15 Mar 2019 20:44:37 -0400 Subject: [PATCH] Add Prolog --- README.md | 1 + docker/prolog/Dockerfile | 4 ++++ docker/prolog/run.sh | 2 ++ src/languages/prolog.js | 11 +++++++++++ 4 files changed, 18 insertions(+) create mode 100644 docker/prolog/Dockerfile create mode 100644 docker/prolog/run.sh create mode 100644 src/languages/prolog.js diff --git a/README.md b/README.md index ec3d1db..829202d 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,7 @@ Options are optionally set in `options`, which is a semicolon-delimited list of - `pas` Pascal (FPC 3.0.4) - `php` PHP (PHP 7.3.3) - `pl` Perl (Perl 5.28.1) +- `prolog` Prolog (SWI-Prolog 8.1.2) - `py` Python (CPython 3.7.2, CPython 2.7.16) - `2` runs Python 2 instead of Python 3 - `rb` Ruby (Ruby 2.6.2) diff --git a/docker/prolog/Dockerfile b/docker/prolog/Dockerfile new file mode 100644 index 0000000..1d0f232 --- /dev/null +++ b/docker/prolog/Dockerfile @@ -0,0 +1,4 @@ +FROM swipl +LABEL author="1Computer1" + +COPY run.sh /var/run/ diff --git a/docker/prolog/run.sh b/docker/prolog/run.sh new file mode 100644 index 0000000..6217036 --- /dev/null +++ b/docker/prolog/run.sh @@ -0,0 +1,2 @@ +echo "$1" > program.pl +swipl --quiet program.pl diff --git a/src/languages/prolog.js b/src/languages/prolog.js new file mode 100644 index 0000000..b5b97d4 --- /dev/null +++ b/src/languages/prolog.js @@ -0,0 +1,11 @@ +const Language = require('../struct/Language'); + +class Prolog extends Language { + constructor() { + super('prolog', { + aliases: ['prolog'] + }); + } +} + +module.exports = Prolog;