-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathparse.mli
More file actions
34 lines (25 loc) · 1.11 KB
/
parse.mli
File metadata and controls
34 lines (25 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
(* elpi: embedded lambda prolog interpreter *)
(* license: GNU Lesser General Public License Version 2.1 or later *)
(* ------------------------------------------------------------------------- *)
open Elpi_util
open Elpi_lexer_config
exception ParseError of Util.Loc.t * string
module type Parser = sig
val program : file:string -> Ast.Program.decl list
val goal : loc:Util.Loc.t -> text:string -> Ast.Goal.t
val goal_from : loc:Util.Loc.t -> Lexing.lexbuf -> Ast.Goal.t
val program_from : loc:Util.Loc.t -> Lexing.lexbuf -> Ast.Program.t
end
module type Parser_w_Internals = sig
include Parser
module Internal : sig
val infix_SYMB : (Lexing.lexbuf -> Tokens.token) -> Lexing.lexbuf -> Ast.Func.t
val prefix_SYMB : (Lexing.lexbuf -> Tokens.token) -> Lexing.lexbuf -> Ast.Func.t
val postfix_SYMB : (Lexing.lexbuf -> Tokens.token) -> Lexing.lexbuf -> Ast.Func.t
end
end
module type Config = sig
val versions : (int * int * int) Util.StrMap.t
val resolver : ?cwd:string -> unit:string -> unit -> string
end
module Make(C : Config) : Parser_w_Internals