Module Type_parser

A parser for Codex annotations. For documentation of the concrete syntax, see Type_parse_tree.

The grammar may be ambiguous; rather than arbitrarily choose a parse tree, we prefer to detect ambiguities and to ask the user to specify its intention.

type 'a grammar

A grammmar returning a 'a.

val annotations : Type_parse_tree.definition list grammar
val parse_file : string -> 'a grammar -> 'a

Parse a file whose path is string with a given grammar.

val parse_string : string -> 'a grammar -> 'a

Parse a string with a given grammar.