package morbig

  1. Overview
  2. Docs
type 'a status =
  1. | AcceptedNow of 'a
  2. | Fine
  3. | Wrong
val accepted_token : 'a Parser.MenhirInterpreter.checkpoint -> (Parser.MenhirInterpreter.token * MenhirLib.IncrementalEngine.position * MenhirLib.IncrementalEngine.position) -> 'a status
val is_accepted_token : 'a Parser.MenhirInterpreter.checkpoint -> (Parser.MenhirInterpreter.token * MenhirLib.IncrementalEngine.position * MenhirLib.IncrementalEngine.position) -> bool
val finished : 'a Parser.MenhirInterpreter.checkpoint -> bool

finished checkpoint is true if the current checkpoint can move the LR(1) automaton to an accepting state with no extra input.

type nonterminal =
  1. | AnyN : 'a Parser.MenhirInterpreter.nonterminal -> nonterminal

nonterminal_production p returns the non terminal of p. The nonterminals of Menhir API are a too precisely typed for our needs. Hence, we introduce an extential type for weaken this precision.

val nonterminal_of_production : Parser.MenhirInterpreter.production -> nonterminal
exception EmptyStack
type 'b top_symbol_processor = {
  1. perform : 'a. ('a Parser.MenhirInterpreter.symbol * 'a) -> 'b;
}
val on_top_symbol : 'a Parser.MenhirInterpreter.env -> 'b top_symbol_processor -> 'b
OCaml

Innovation. Community. Security.