aboutsummaryrefslogtreecommitdiff
path: root/src/parser.mli
blob: 2cad38361990ca497aabe6b1e816f77e0738cc43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
(*
 * UPEM / L3 / Functional programming / Project: URM
 * Pacien TRAN-GIRARD, Adam NAILI
 *)

open Common

(* Reads a file into a string. *)
val string_of_file : in_channel -> string

(* Converts lexemes into URM instructions. *)
val urm_program_of_lex : string list -> urmcmd list

(* Converts lexemes into EURM instructions. *)
val eurm_program_of_lex : string list -> eurmcmd list

(* Converts lexemes into registers. *)
val regs_of_lex : string list -> reg list

(* Parses the string representation of a program. *)
val program_of_string : (string list -> 'a list) -> string -> 'a list

(* Parses the string representation of serialized registers. *)
val regs_of_string : string -> reg list