package lambdapi

  1. Overview
  2. Docs

Module Parser.LpSource

Parsing lp syntax.

include PARSER with type lexbuf := Sedlexing.lexbuf

parse_lexbuf lb is the same as parse_string but with an already created lexbuf.

Sourceval parse_in_channel : string -> in_channel -> Syntax.p_commands

parse f ic returns a stream of commands parsed from channel ic created from file f. Commands are parsed lazily and the channel is closed once all entries are parsed.

Sourceval parse_file : string -> Syntax.p_commands

parse_file f returns a stream of parsed commands of file f. Commands are parsed lazily.

Sourceval parse_string : string -> string -> Syntax.p_commands

parse_string f s returns a stream of parsed commands from string s which comes from file f (f can be anything).

Sourceval parse_term_string : Lexing.position -> string -> Syntax.p_term

parse_rwpatt_string p s parses a term from string s assuming that s starts at position p.

Sourceval parse_rwpatt_string : Lexing.position -> string -> Syntax.p_rwpatt

parse_rwpatt_string f s parses a rewrite pattern specification from string s assuming that s starts at position p.

Sourceval parse_search_string : allow_rocq_syntax:bool -> alone:bool -> Lexing.position -> string -> Syntax.search

parse_search_string ~allow_rocq_syntax ~alone p s parses a query from string s assuming that s starts at position p. ~allow_rocq_syntax to allow a subset of Rocq syntax (fun/forall/exists) ~alone to parse the query only if followed by EOF.