Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Parsing functions for Lambdapi.
This module includes two parsers: a parser for the Lambdapi syntax whose functions are available either through the submodule Parser.Lp
, or directly in Parser
; and another parser for the Dedukti 2.7 syntax, available through Parser.Dk
.
val parser_fatal : Common.Pos.pos -> ('a, 'b) Lplib.Base.koutfmt -> 'a
parser_fatal pos fmt
is a wrapper for Error.fatal
that enforces that the error has an attached source code position.
module type PARSER = sig ... end
Module type of a parser.
include module type of struct include Lp end
val parse : Stdlib.in_channel -> Syntax.ast
parse inchan
returns a stream of commands parsed from channel inchan
. Commands are parsed lazily and the channel is closed once all entries are parsed.
val parse_file : string -> Syntax.ast
parse_file fname
returns a stream of parsed commands of file fname
. Commands are parsed lazily.
val parse_string : string -> string -> Syntax.ast
parse_string f s
returns a stream of parsed commands from string s
which comes from file f
(f
can be anything).
val path_of_string : string -> Common.Path.t
path_of_string s
converts the string s
into a path.
val qident_of_string : string -> Core.Term.qident
qident_of_string s
converts the string s
into a qident.