1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859(* This file is free software, part of Dolmen. See file "LICENSE" for more details. *)moduletypeS=sigtypestate(** The type of state for a whole pipeline *)type'akey(** Keys into the state. *)valsyntax_error_ref:boolkey(** A key to determine whether to print a syntax error identifier/reference
in Syntax error messages. Mainly useful when debugging syntax error messages. *)valinteractive_prompt:(state->stringoption)key(** The interactive prompt key. This is used to determine whether we are parsing
in interactive mode, and if so, what prelude to print before parsing each
toplevel phrase. *)valinteractive_prompt_lang:state->stringoption(** A standard implementation for the interactive prompt key/function. When the
logic input is set to `Stdin, it will return a prompt string prelude that
contains the currently set input language. *)valinit:?syntax_error_ref:bool->?interactive_prompt:(state->stringoption)->state->state(** Init a state with all the relevant keys for this pipeline.
@param syntax_error_ref : false by default.
@param interactive_prompt : does nothing by default.
*)valparse_logic:Dolmen.Std.Statement.tlist->state->Logic.languageState.file->state*(state->state*Dolmen.Std.Statement.toption)(** Parsing function. Reads a list of prelude statements, and the state and
returns a tuple of the new state (including the detected input language),
together with a statement generator. *)valparse_response:Dolmen.Std.Answer.tlist->state->Response.languageState.file->state*(state->state*Dolmen.Std.Answer.toption)(** Parsing function. Reads a list of prelude statements, and the state and
returns a tuple of the new state (including the detected input language),
together with a statement generator. *)valexpand:state->Dolmen.Std.Statement.t->state*[`Ok|`Genof(state->state->state)*(state->state*Dolmen.Std.Statement.toption)](** Expand statements (such as includes). Returns the new state, and either:
- [ `Ok ], which means the statement can be propagated as is
- [ `Gen (flat, g) ], if the statement expands into a generator [g]. The bool [flat]
indicates wether the statements in [g] should be treated as a single group of
statements (with regards to timeouts, etc...), or as a list of independant statements
(each with its own timeout...). *)end