package dolmen
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=c5c85f77e3924f378e8d82f166eefe4131b4e041bf9cdeca467410f33c71fa61
sha512=42feb39d13cfdc8a2054abe85ccc47755f45059cda7d95e9261b5a9fd5c730f420732547b3fa19c4af059474f887ef78c119ab5933375a5ea2dbe888f65a3e4f
doc/dolmen.class/Dolmen_class/Logic/Make/index.html
Module Logic.Make
Source
Parameters
module L : Dolmen_intf.Location.S
module I : Dolmen_intf.Id.Logic
Signature
Raised when trying to find a language given a file extension.
Supported languages
type language =
| Alt_ergo
(*Alt-ergo's native language
*)| Dimacs
(*Dimacs CNF format
*)| ICNF
(*iCNF format
*)| Smtlib2 of Dolmen_smtlib2.Script.version
(*Smtlib v2 latest version
*)| Tptp of Dolmen_tptp.version
(*TPTP format (including THF), latest version
*)| Zf
(*Zipperposition format
*)
The languages supported by the Logic class.
Enumeration of languages together with an appropriate name. Can be used for command-line arguments (for instance, with cmdliner).
High-level parsing
Tries and find the given file, using the language specification.
val parse_all :
?language:language ->
[< `File of string
| `Stdin of language
| `Raw of string * language * string ] ->
language * L.file * S.t list Lazy.t
Full (but lazy) parsing of either a file (see parse_file
), stdin (with given language), or some arbitrary contents, of the form `Raw (filename, language, contents)
. Returns a triplet (lan, file, stmts)
, containing:
- the language
lan
detected - a
file
value that stores the metadata about file locations - a lazy list of statements
stmts
; forcing this list will run the actual parsing of the whole input given as argument, and may raise errors, if any arises during the parsing (such as lexical errors, etc..)
val parse_input :
?language:language ->
[< `File of string
| `Stdin of language
| `Raw of string * language * string ] ->
language * L.file * (unit -> S.t option) * (unit -> unit)
Incremental parsing of either a file, stdin (with given language), or some arbitrary contents, of the form `Raw (filename, language, contents)
. Returns a quadruplet (lan, file, gen, cl)
, containing:
- the language
lan
detected - a
file
value that stores the metadata about file locations - a genrator function
gen
for parsing the input, - a cleanup function
cl
to call in order to cleanup the file descriptors
Mid-level parsing
The type of language modules.
These function take as argument either a language, a filename, or an extension, and return a triple:
- language
- language file extension (starting with a dot)
- appropriate parsing module
Extensions should start with a dot (for instance : ".smt2"
)