From 0220f51aca25f4ca5953c73581381fc8161b0719 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Thu, 4 Feb 2016 15:34:50 +0000 Subject: [PATCH] Add Oberon --- gruntmaster-compile | 5 +++++ lib/Gruntmaster/Daemon.pm | 1 + t/01-jobs.t | 1 + t/problems/hello/tests/oberon/meta.yml | 7 +++++++ t/problems/hello/tests/oberon/prog.m | 8 ++++++++ 5 files changed, 22 insertions(+) create mode 100644 t/problems/hello/tests/oberon/meta.yml create mode 100644 t/problems/hello/tests/oberon/prog.m diff --git a/gruntmaster-compile b/gruntmaster-compile index be5dab5..adf2149 100755 --- a/gruntmaster-compile +++ b/gruntmaster-compile @@ -30,6 +30,7 @@ given ($format){ exec 'go', qw/build -compiler gccgo/, $name, when 'GCCGO'; exec 'ghc', qw/-DONLINE_JUDGE -Wall -O2 -o/, $basename, $name when 'HASKELL'; exec 'rustc', qw/-O -o/, $basename, $name when 'RUST'; + exec 'obc', qw/-x -o/, $basename, $name when 'OBERON'; exec 'ocamlc', qw/-o/, $basename, $name when 'OCAML'; exec 'dmd', qw/-version=ONLINE_JUDGE -O -release -inline -noboundscheck/, $name when 'D'; @@ -124,6 +125,10 @@ Compile commands for each format: ocamlc -o $output $input +=item OBERON + + obc -x -o $output $input + =item RUST rustc -O -o $output $input diff --git a/lib/Gruntmaster/Daemon.pm b/lib/Gruntmaster/Daemon.pm index 7189c84..8e6cbf3 100644 --- a/lib/Gruntmaster/Daemon.pm +++ b/lib/Gruntmaster/Daemon.pm @@ -29,6 +29,7 @@ use constant FORMAT_EXTENSION => { JAVA => 'java', JULIA => 'jl', MONO => 'cs', + OBERON => 'm', OCAML => 'ml', PASCAL => 'pas', PERL => 'pl', diff --git a/t/01-jobs.t b/t/01-jobs.t index 2cb1eb1..3f00b3d 100644 --- a/t/01-jobs.t +++ b/t/01-jobs.t @@ -36,6 +36,7 @@ use constant COMPILER => { PYTHON python2.7 RUBY ruby RUST rustc + OBERON obc OCAML ocaml SBCL sbcl/}; diff --git a/t/problems/hello/tests/oberon/meta.yml b/t/problems/hello/tests/oberon/meta.yml new file mode 100644 index 0000000..1c95834 --- /dev/null +++ b/t/problems/hello/tests/oberon/meta.yml @@ -0,0 +1,7 @@ +test_name: Oberon +test_description: Hello world in Oberon +problem: hello +files: + prog: + format: OBERON + name: prog.m diff --git a/t/problems/hello/tests/oberon/prog.m b/t/problems/hello/tests/oberon/prog.m new file mode 100644 index 0000000..e67028f --- /dev/null +++ b/t/problems/hello/tests/oberon/prog.m @@ -0,0 +1,8 @@ +MODULE prog; + +IMPORT Out; + +BEGIN + Out.String("Hello World!"); + Out.Ln +END prog. -- 2.39.2