package menhirSdk

  1. Overview
  2. Docs
Compile-time library for auxiliary tools related to Menhir

Install

Dune Dependency

Authors

Maintainers

Sources

archive.tar.gz
md5=437b8a568c9bb0df35b4482439c2520b
sha512=6a3cb084d1b2868022b4cb94484801aa7eaea13cfe2788b0da4407693229a6ce699cb282d9fd972476cf29551c259daa40f355dcdc1e545e47573a458a84c9dd

doc/menhirSdk/MenhirSdk/Cmly_format/index.html

Module MenhirSdk.Cmly_formatSource

Sourcetype terminal = int
Sourcetype nonterminal = int
Sourcetype production = int
Sourcetype lr0 = int
Sourcetype lr1 = int
Sourcetype ocamltype = string
Sourcetype ocamlexpr = string
Sourcetype range = {
  1. r_start : Lexing.position;
  2. r_end : Lexing.position;
}
Sourcetype attribute = {
  1. a_label : string;
  2. a_payload : string;
  3. a_position : range;
}
Sourcetype attributes = attribute list
Sourcetype terminal_def = {
  1. t_name : string;
  2. t_kind : [ `REGULAR | `ERROR | `EOF | `PSEUDO ];
  3. t_type : ocamltype option;
  4. t_attributes : attributes;
}
Sourcetype 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;
}
Sourcetype symbol =
  1. | T of terminal
  2. | N of nonterminal
Sourcetype identifier = string
Sourcetype action = {
  1. a_expr : ocamlexpr;
  2. a_keywords : Keyword.keyword list;
}
Sourcetype producer_def = symbol * identifier * attributes
Sourcetype 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;
}
Sourcetype lr0_state_def = {
  1. lr0_incoming : symbol option;
  2. lr0_items : (production * int) list;
}
Sourcetype lr1_state_def = {
  1. lr1_lr0 : lr0;
  2. lr1_transitions : (symbol * lr1) list;
  3. lr1_reductions : (terminal * production list) list;
}
Sourcetype 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.