package bnfgen

  1. Overview
  2. Docs

Module Bnfgen.GrammarSource

Sourceexception Grammar_error of string
Sourcetype symbol_flags = {
  1. sticky : bool;
  2. sticky_parent : bool;
}
Sourcetype symbol =
  1. | Terminal of string * symbol_flags
  2. | Nonterminal of string * symbol_flags
  3. | Repeat of symbol * int * int
Sourcetype rule_alternative = {
  1. weight : int;
  2. symbols : symbol list;
}
Sourcetype rule = string * rule_alternative list
Sourcetype grammar = rule list
Sourceval reduce_symbol : ?debug:bool -> ?debug_fun:(string -> unit) -> ?separator:string -> symbol list -> grammar -> string option * symbol list