A trustworthy parser for POSIX shell
Module Morbig . ExtMenhirLib
type 'a status =
| AcceptedNow of 'a
| Fine
| Wrong
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 =
| 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 = {
perform : 'a. ('a Parser.MenhirInterpreter.symbol * 'a) -> 'b;
val on_top_symbol : 'a Parser.MenhirInterpreter.env -> 'b top_symbol_processor -> 'c