diff options
author | pacien | 2018-04-29 20:24:38 +0200 |
---|---|---|
committer | pacien | 2018-04-29 20:24:38 +0200 |
commit | 0647f37eebbefb8446fc8abfc533a23952fbb8be (patch) | |
tree | fc9d69f32bd6c04de27c3795f6d54ed150bd4958 /src/instptr.mli | |
parent | 80d7f0f204aacefa768d34f6db30108cb430cede (diff) | |
download | urm-0647f37eebbefb8446fc8abfc533a23952fbb8be.tar.gz |
Move sources to dedicated directory
Diffstat (limited to 'src/instptr.mli')
-rw-r--r-- | src/instptr.mli | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/instptr.mli b/src/instptr.mli new file mode 100644 index 0000000..f1252b5 --- /dev/null +++ b/src/instptr.mli | |||
@@ -0,0 +1,29 @@ | |||
1 | (* | ||
2 | * UPEM / L3 / Functional programming / Project: URM | ||
3 | * Pacien TRAN-GIRARD, Adam NAILI | ||
4 | *) | ||
5 | |||
6 | open Common | ||
7 | |||
8 | (* Create an instruction pointer for an URM program. *) | ||
9 | val instptr_mk : urmcmd list -> instptr | ||
10 | |||
11 | (* Move the instruction pointer up. Do nothing if this is not possible. *) | ||
12 | val instptr_move_up : instptr -> instptr | ||
13 | |||
14 | (* Move the instruction pointer down. Do nothing if this is not possible. *) | ||
15 | val instptr_move_down : instptr -> instptr | ||
16 | |||
17 | (* Get the current command from the instruction pointer. | ||
18 | * Fail if the command pointer is not set on a valid command. *) | ||
19 | val instptr_get : instptr -> line * urmcmd | ||
20 | |||
21 | (* Get the current instruction as a string. | ||
22 | * Returns "null" is the instruction pointer is not valid. *) | ||
23 | val instptr_string : instptr -> string | ||
24 | |||
25 | (* Returns the pointer of instruction after a jump decided by the given offse t *) | ||
26 | val instptr_jump : instptr -> int -> instptr | ||
27 | |||
28 | (* Returns true if the instruction pointer is not pointing on any instruction (end of the instruction list) *) | ||
29 | val instptr_end : instptr -> bool | ||