Module Gramlib.Grammar

Extensible grammars.

This module implements the Camlp5 extensible grammars system. Grammars entries can be extended using the EXTEND statement, added by loading the Camlp5 pa_extend.cmo file.

Functorial interface

Alternative for grammars use. Grammars are no more Ocaml values: there is no type for them. Modules generated preserve the rule "an entry cannot call an entry of another grammar" by normal OCaml typing.

The input signature for the functor Grammar.GMake: te is the type of the tokens.

type norec
type mayrec
module type S = sig ... end
module type ExtS = sig ... end

Signature type of the functor Grammar.GMake. The types and functions are almost the same than in generic interface, but:

module GMake (L : Plexing.S) : ExtS with type te = L.te and type 'c pattern = 'c L.pattern