From c198a4818eb00bbfa038b4029569fcff84096588 Mon Sep 17 00:00:00 2001 From: pacien Date: Sat, 21 Apr 2018 15:38:26 +0200 Subject: Impl urm_from_eurm --- eurm.ml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 eurm.ml diff --git a/eurm.ml b/eurm.ml new file mode 100644 index 0000000..c571384 --- /dev/null +++ b/eurm.ml @@ -0,0 +1,22 @@ +(* + * UPEM / L3 / Functional programming / Project: URM + * Pacien TRAN-GIRARD, Adam NAILI + *) + +open Common + +let compile_preprocess eurmcmds = eurmcmds +let compile_stage1 eurmcmds state = eurmcmds, state +let compile_stage2 eurmcmds state = eurmcmds, state +let compile_stage3 eurmcmds state = eurmcmds, state +let compile_stage4 eurmcmds state = [URMZero(0)], state + +let urm_from_eurm = + let chain transform (eurmcmds, compile_state) = transform eurmcmds compile_state + and initial_state = 0 + in (compile_preprocess, initial_state) + |> chain compile_stage1 + |> chain compile_stage2 + |> chain compile_stage3 + |> chain compile_stage4 + -- cgit v1.2.3