2020-03-23 22:43:06 +04:00
|
|
|
(* Parsing the command-line options of the LIGO preprocessor *)
|
|
|
|
|
|
|
|
(* The type [options] gathers the command-line options. *)
|
|
|
|
|
2020-04-24 22:54:13 +04:00
|
|
|
module SSet : Set.S with type elt = string and type t = Set.Make(String).t
|
2020-04-03 21:06:35 +04:00
|
|
|
|
2020-04-24 22:54:13 +04:00
|
|
|
type line_comment = string (* Opening of a line comment *)
|
|
|
|
type block_comment = <opening : string; closing : string>
|
2020-03-23 22:43:06 +04:00
|
|
|
|
2020-04-24 22:54:13 +04:00
|
|
|
val mk_block : opening:string -> closing:string -> block_comment
|
2020-03-26 19:51:08 +04:00
|
|
|
|
2020-03-23 22:43:06 +04:00
|
|
|
type options = <
|
2020-03-31 21:44:10 +04:00
|
|
|
input : string option;
|
2020-03-23 22:43:06 +04:00
|
|
|
libs : string list;
|
2020-03-31 21:44:10 +04:00
|
|
|
verbose : SSet.t;
|
2020-03-26 19:51:08 +04:00
|
|
|
offsets : bool;
|
2020-04-24 22:54:13 +04:00
|
|
|
block : block_comment option;
|
|
|
|
line : line_comment option;
|
|
|
|
ext : string
|
2020-03-23 22:43:06 +04:00
|
|
|
>
|
|
|
|
|
|
|
|
val make :
|
2020-03-31 21:44:10 +04:00
|
|
|
input:string option ->
|
2020-03-23 22:43:06 +04:00
|
|
|
libs:string list ->
|
2020-04-24 22:54:13 +04:00
|
|
|
?block:block_comment ->
|
|
|
|
?line:line_comment ->
|
2020-03-23 22:43:06 +04:00
|
|
|
offsets:bool ->
|
2020-03-26 19:51:08 +04:00
|
|
|
verbose:SSet.t ->
|
2020-03-31 21:44:10 +04:00
|
|
|
ext:string ->
|
2020-03-23 22:43:06 +04:00
|
|
|
options
|
|
|
|
|
|
|
|
(* Parsing the command-line options on stdin. The first parameter is
|
|
|
|
the name of the concrete syntax. This is needed to correctly handle
|
|
|
|
comments. *)
|
|
|
|
|
2020-04-24 22:54:13 +04:00
|
|
|
type extension = string
|
|
|
|
|
|
|
|
val read :
|
|
|
|
?block:block_comment -> ?line:line_comment -> extension -> options
|