aboutsummaryrefslogtreecommitdiff
path: root/eurm.ml
diff options
context:
space:
mode:
authorpacien2018-04-29 20:19:28 +0200
committerpacien2018-04-29 20:19:28 +0200
commit55f5d164762fc37fc53e6e94da2aa92d84e8c145 (patch)
treea4ffc86a7d22f893f4b0bf50fdc1677d816c017a /eurm.ml
parent7d05d97c8e51e77f117fc14f060bb0c54b86a135 (diff)
parente828fbc45672ed2b6d9e78e6b667905d3c68267c (diff)
downloadurm-55f5d164762fc37fc53e6e94da2aa92d84e8c145.tar.gz
Merge branch 'eurm'
Diffstat (limited to 'eurm.ml')
-rw-r--r--eurm.ml22
1 files changed, 22 insertions, 0 deletions
diff --git a/eurm.ml b/eurm.ml
new file mode 100644
index 0000000..c571384
--- /dev/null
+++ b/eurm.ml
@@ -0,0 +1,22 @@
1(*
2 * UPEM / L3 / Functional programming / Project: URM
3 * Pacien TRAN-GIRARD, Adam NAILI
4 *)
5
6open Common
7
8let compile_preprocess eurmcmds = eurmcmds
9let compile_stage1 eurmcmds state = eurmcmds, state
10let compile_stage2 eurmcmds state = eurmcmds, state
11let compile_stage3 eurmcmds state = eurmcmds, state
12let compile_stage4 eurmcmds state = [URMZero(0)], state
13
14let urm_from_eurm =
15 let chain transform (eurmcmds, compile_state) = transform eurmcmds compile_state
16 and initial_state = 0
17 in (compile_preprocess, initial_state)
18 |> chain compile_stage1
19 |> chain compile_stage2
20 |> chain compile_stage3
21 |> chain compile_stage4
22