package dolmen

  1. Overview
  2. Docs
A parser library for automated deduction

Install

Dune Dependency

Authors

Maintainers

Sources

dolmen-0.8.tbz
sha256=3ee4b4b028b18ab0066cb4648fa14cd4d628a3afd79455f85fb796a9969ac80c
sha512=06d455f0221814dae44d9d8614cab7c1d4fb43a383e603a92ffc9cf4a753d42c5f2a0f3c5ae64aa6cf02da769c4666b130443ae2cf8fa0918c906d46e0caec9a

doc/dolmen.dimacs/Dolmen_dimacs/Make/index.html

Module Dolmen_dimacs.MakeSource

Functor to generate a parser for the dimacs format.

Parameters

module T : Term with type location := L.t
module S : Statement with type location := L.t and type term := T.t

Signature

Sourcetype token

The type of tokens produced by the language lexer.

Sourcetype statement = S.t

The type of top-level directives recognised by the parser.

The Lexer module for the language.

The Parser module for the language.

Sourceval find : ?dir:string -> string -> string option

Helper function to find a file using a language specification. Separates directory and file because most include directives in languages are relative to the directory of the original file being processed.

Sourceval parse_file : string -> L.file * statement list

Parse the whole given file into a list.

Sourceval parse_file_lazy : string -> L.file * statement list Lazy.t

Parse the whole given file into a list.

Sourceval parse_input : [ `Stdin | `File of string | `Contents of string * string ] -> L.file * (unit -> statement option) * (unit -> unit)

Incremental parsing. Given an input to read (either a file, stdin, or some contents of the form (filename, s) where s is the contents to parse), returns a generator that will incrementally parse the statements, together with a cleanup function to close file descriptors. In case of a syntax error, the current line will be completely consumed and parsing will restart at the beginning of the next line. Useful to process input from stdin, or even large files where it would be impractical to parse the entire file before processing it.

OCaml

Innovation. Community. Security.