package menhirSdk

  1. Overview
  2. Docs
type terminal = int
type nonterminal = int
type production = int
type lr0 = int
type lr1 = int
type ocamltype = string
type ocamlexpr = string
type range = {
  1. r_start : Lexing.position;
  2. r_end : Lexing.position;
}
type attribute = {
  1. a_label : string;
  2. a_payload : string;
  3. a_position : range;
}
type attributes = attribute list
type terminal_def = {
  1. t_name : string;
  2. t_kind : [ `REGULAR | `ERROR | `EOF | `PSEUDO ];
  3. t_type : ocamltype option;
  4. t_attributes : attributes;
}
type nonterminal_def = {
  1. n_name : string;
  2. n_kind : [ `REGULAR | `START ];
  3. n_mangled_name : string;
  4. n_type : ocamltype option;
  5. n_positions : range list;
  6. n_nullable : bool;
  7. n_first : terminal list;
  8. n_attributes : attributes;
}
type symbol =
  1. | T of terminal
  2. | N of nonterminal
type identifier = string
type action = {
  1. a_expr : ocamlexpr;
  2. a_keywords : Keyword.keyword list;
}
type producer_def = symbol * identifier * attributes
type production_def = {
  1. p_kind : [ `REGULAR | `START ];
  2. p_lhs : nonterminal;
  3. p_rhs : producer_def array;
  4. p_positions : range list;
  5. p_action : action option;
  6. p_attributes : attributes;
}
type lr0_state_def = {
  1. lr0_incoming : symbol option;
  2. lr0_items : (production * int) list;
}
type lr1_state_def = {
  1. lr1_lr0 : lr0;
  2. lr1_transitions : (symbol * lr1) list;
  3. lr1_reductions : (terminal * production) list;
  4. lr1_default_reduction : production option;
}
type grammar = {
  1. g_basename : string;
  2. g_preludes : string list;
  3. g_postludes : string list;
  4. g_terminals : terminal_def array;
  5. g_nonterminals : nonterminal_def array;
  6. g_productions : production_def array;
  7. g_lr0_states : lr0_state_def array;
  8. g_lr1_states : lr1_state_def array;
  9. g_entry_points : (nonterminal * production * lr1) list;
  10. g_attributes : attributes;
  11. g_parameters : string list;
}
OCaml

Innovation. Community. Security.