diff options
author | pacien | 2018-04-21 15:38:26 +0200 |
---|---|---|
committer | pacien | 2018-04-21 15:38:26 +0200 |
commit | c198a4818eb00bbfa038b4029569fcff84096588 (patch) | |
tree | 9b1aa61ebf5d505301d3d35cdcc3b6b8bfe9b1de | |
parent | 659e5fd404f454def89aacaf02b2d067e640a85f (diff) | |
download | urm-c198a4818eb00bbfa038b4029569fcff84096588.tar.gz |
Impl urm_from_eurm
-rw-r--r-- | eurm.ml | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -0,0 +1,22 @@ | |||
1 | (* | ||
2 | * UPEM / L3 / Functional programming / Project: URM | ||
3 | * Pacien TRAN-GIRARD, Adam NAILI | ||
4 | *) | ||
5 | |||
6 | open Common | ||
7 | |||
8 | let compile_preprocess eurmcmds = eurmcmds | ||
9 | let compile_stage1 eurmcmds state = eurmcmds, state | ||
10 | let compile_stage2 eurmcmds state = eurmcmds, state | ||
11 | let compile_stage3 eurmcmds state = eurmcmds, state | ||
12 | let compile_stage4 eurmcmds state = [URMZero(0)], state | ||
13 | |||
14 | let 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 | |||