package acgtk

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type sig_ref =
  1. | Real_sig of AcgSig.t
  2. | Arg_sig of int
type completion_info =
  1. | Ci_Path
  2. | Ci_Fun
  3. | Ci_List of string list
  4. | Ci_None
type var_type =
  1. | T_Bool
  2. | T_Int
  3. | T_Sig
  4. | T_Lex
  5. | T_Entry
  6. | T_LexList
  7. | T_String of completion_info
  8. | T_Type of sig_ref
type var_arg =
  1. | Bool_a of bool * UtilsLib.Error.pos
  2. | Int_a of int * UtilsLib.Error.pos
  3. | Sig_a of AcgSig.t * UtilsLib.Error.pos
  4. | Lex_a of AcgLex.t * UtilsLib.Error.pos
  5. | Entry_a of AcgEnv.entry * UtilsLib.Error.pos
  6. | LexList_a of AcgLex.t list * UtilsLib.Error.pos
  7. | String_a of string * UtilsLib.Error.pos
  8. | Type_a of Logic.Lambda.Lambda.stype * UtilsLib.Error.pos
  9. | Argument_a of int * var_type * UtilsLib.Error.pos
type var_temp =
  1. | Bool_t of bool * UtilsLib.Error.pos
  2. | Int_t of int * UtilsLib.Error.pos
  3. | Sig_t of AcgSig.t * UtilsLib.Error.pos
  4. | Lex_t of AcgLex.t * UtilsLib.Error.pos
  5. | Entry_t of AcgEnv.entry * UtilsLib.Error.pos
  6. | LexList_t of AcgLex.t list * UtilsLib.Error.pos
  7. | String_t of string * UtilsLib.Error.pos
  8. | Type_t_s of sig_ref * string * UtilsLib.Error.pos
  9. | Type_t_r of Logic.Lambda.Lambda.stype * UtilsLib.Error.pos
  10. | Argument_t of int * var_type * UtilsLib.Error.pos
type var_spec =
  1. | Bool_s of bool option
  2. | Int_s of int option
  3. | Sig_s of AcgSig.t option
  4. | Lex_s of AcgLex.t option
  5. | Entry_s of AcgEnv.entry option
  6. | LexList_s of AcgLex.t list option
  7. | String_s of string option * completion_info
  8. | Type_s of sig_ref * Logic.Lambda.Lambda.stype option
type lex_list_e =
  1. | Lex_id of string * UtilsLib.Error.pos
  2. | Completion_lex
type arg_parse =
  1. | Int_p of int * UtilsLib.Error.pos
  2. | Id_p of string * UtilsLib.Error.pos
  3. | Data_p of string * UtilsLib.Error.pos
  4. | Bool_p of bool * UtilsLib.Error.pos
  5. | LexList_p of lex_list_e list * UtilsLib.Error.pos
  6. | Completion_val
type var_type_parse =
  1. | T_Bool_p of UtilsLib.Error.pos
  2. | T_Int_p of UtilsLib.Error.pos
  3. | T_Sig_p of UtilsLib.Error.pos
  4. | T_Lex_p of UtilsLib.Error.pos
  5. | T_Entry_p of UtilsLib.Error.pos
  6. | T_LexList_p of UtilsLib.Error.pos
  7. | T_LexListF_p of UtilsLib.Error.pos
  8. | T_String_p of UtilsLib.Error.pos * completion_info
  9. | T_Type_p of sig_ref option * UtilsLib.Error.pos
  10. | T_Id_p of UtilsLib.Error.pos
  11. | T_Data_p of UtilsLib.Error.pos
type arg_full =
  1. | Arg of (string * UtilsLib.Error.pos) option * arg_parse
  2. | Completion_name of var_type option * string * char
type binding_list = ((string * UtilsLib.Error.pos) * var_type_parse option * bool) list
type param = (string * UtilsLib.Error.pos) * arg_parse option
type param_list = param list
type func_type =
  1. | All
  2. | AtStart
  3. | Generation
  4. | Computation
  5. | Consumption
  6. | Special
  7. | End
type func =
  1. | Generation_f of var list -> env -> Value.value
  2. | Computation_f of var list -> env -> Value.value -> Value.value
  3. | Consumption_f of var list -> env -> Value.value -> unit
  4. | Special_f of var list -> env -> env
and func_spec = {
  1. name : string;
  2. help_text : string;
  3. args : (string * var_spec) list;
  4. f : func;
}
and env = {
  1. config : Config.config;
  2. acg_env : AcgEnv.t;
  3. functions : func_spec list;
  4. last_value : Value.value option;
}
type completion =
  1. | Compl_Fun_name of func_type
  2. | Compl_Arg_name of string * string * char * var_type option * string list
  3. | Compl_Arg_val of var_spec * string list
  4. | Compl_None
  5. | Compl_Custom of string list
exception Completion of completion
val add_fun : env -> string -> param_list -> UtilsLib.Error.pos -> UtilsLib.Error.pos -> (func_type -> binding_list -> env -> func_type * binding_list * (var list -> env -> Value.value option -> Value.value option * env)) -> env
val call_fun : string -> arg_full list -> UtilsLib.Error.pos -> UtilsLib.Error.pos -> func_type -> binding_list -> env -> func_type * binding_list * (var list -> env -> Value.value option -> Value.value option * env)
val doc_pp : Stdlib.Format.formatter -> func_spec list -> unit

This function is used to generate the documentation in odoc format. It uses the function specifications and the help texts defined in the module Functions.

val print_help : env -> string -> unit
val short_print : env -> unit
type completion_element =
  1. | Ce_String of string * string * char
  2. | Ce_Path
val gen_completions : completion -> string -> env -> completion_element list
OCaml

Innovation. Community. Security.