module API:sig..end
This interface defines the API of Morbig
val parse_file : string -> CST.programparse_file filename performs the syntactic analysis of
filename and returns a concrete syntax tree if filename content
is syntactically correct.
Raises exceptions from Errors.
val parse_string : string -> string -> CST.programparse_string filename content is similar to parse_file except
the script source code is provided as a string.
val load_binary_cst : Stdlib.in_channel -> CST.programload_binary_cst cin retrieves a serialized CST from
input_channel cin.
val save_binary_cst : Stdlib.out_channel -> CST.program -> unitsave_binary_cst cout cst stores a serialized cst in cout.
val load_json_cst : Stdlib.in_channel -> CST.programload_json_cst cin retrieves a CST in JSON format from
input_channel cin.
val save_json_cst : Stdlib.out_channel -> CST.program -> unitsave_json_cst cout cst stores a cst using JSON format in
cout.
val save_dot_cst : Stdlib.out_channel -> CST.program -> unitsave_dot_cst cout cst stores a cst using DOT format in
cout.
val on_located : ('a -> 'b) -> 'a CST.located -> 'bon_located f applies f on a located value, preserving its
location.
val start_of_position : CST.position -> Stdlib.Lexing.positionstart_of_position p returns the beginning of a position p.
val end_of_position : CST.position -> Stdlib.Lexing.positionend_of_position p returns the end of a position p.
val filename_of_position : CST.position -> stringfilename_of_position p returns the filename of a position
p.
val string_of_lexing_position : Stdlib.Lexing.position -> stringstring_of_lexing_position p returns a human-readable
representation of the lexing position p, using a format
recognized by Emacs, and other decent editors.
val remove_quotes : string -> stringremove_quotes s yields a copy of string s, with all quotes
removed as described in the POSIX specification.