sig
type g
val gcreate : Token.t Token.glexer -> Grammar.g
val tokens : Grammar.g -> string -> (string * int) list
val glexer : Grammar.g -> Token.t Token.glexer
module Entry :
sig
type 'a e
val create : Grammar.g -> string -> 'a Grammar.Entry.e
val parse : 'a Grammar.Entry.e -> char Stream.t -> 'a
val parse_token : 'a Grammar.Entry.e -> Token.t Stream.t -> 'a
val name : 'a Grammar.Entry.e -> string
val of_parser :
Grammar.g -> string -> (Token.t Stream.t -> 'a) -> 'a Grammar.Entry.e
val print : 'a Grammar.Entry.e -> unit
val find : 'a Grammar.Entry.e -> string -> Obj.t Grammar.Entry.e
external obj : 'a Grammar.Entry.e -> Token.t Gramext.g_entry
= "%identity"
end
val of_entry : 'a Grammar.Entry.e -> Grammar.g
module Unsafe :
sig
val gram_reinit : Grammar.g -> Token.t Token.glexer -> unit
val clear_entry : 'a Grammar.Entry.e -> unit
end
module type GLexerType =
sig type te val lexer : Grammar.GLexerType.te Token.glexer end
module type S =
sig
type te
and parsable
val parsable : char Stream.t -> Grammar.S.parsable
val tokens : string -> (string * int) list
val glexer : Grammar.S.te Token.glexer
module Entry :
sig
type 'a e
val create : string -> 'a Grammar.S.Entry.e
val parse : 'a Grammar.S.Entry.e -> Grammar.S.parsable -> 'a
val parse_token :
'a Grammar.S.Entry.e -> Grammar.S.te Stream.t -> 'a
val name : 'a Grammar.S.Entry.e -> string
val of_parser :
string -> (Grammar.S.te Stream.t -> 'a) -> 'a Grammar.S.Entry.e
val print : 'a Grammar.S.Entry.e -> unit
external obj : 'a Grammar.S.Entry.e -> Grammar.S.te Gramext.g_entry
= "%identity"
end
module Unsafe :
sig
val gram_reinit : Grammar.S.te Token.glexer -> unit
val clear_entry : 'a Grammar.S.Entry.e -> unit
end
val extend :
'a Grammar.S.Entry.e ->
Gramext.position option ->
(string option * Gramext.g_assoc option *
(Grammar.S.te Gramext.g_symbol list * Gramext.g_action) list)
list -> unit
val delete_rule :
'a Grammar.S.Entry.e -> Grammar.S.te Gramext.g_symbol list -> unit
end
module GMake :
functor (L : GLexerType) ->
sig
type te = L.te
and parsable
val parsable : char Stream.t -> Grammar.S.parsable
val tokens : string -> (string * int) list
val glexer : Grammar.S.te Token.glexer
module Entry :
sig
type 'a e
val create : string -> 'a Grammar.S.Entry.e
val parse : 'a Grammar.S.Entry.e -> Grammar.S.parsable -> 'a
val parse_token :
'a Grammar.S.Entry.e -> Grammar.S.te Stream.t -> 'a
val name : 'a Grammar.S.Entry.e -> string
val of_parser :
string -> (Grammar.S.te Stream.t -> 'a) -> 'a Grammar.S.Entry.e
val print : 'a Grammar.S.Entry.e -> unit
external obj :
'a Grammar.S.Entry.e -> Grammar.S.te Gramext.g_entry
= "%identity"
end
module Unsafe :
sig
val gram_reinit : Grammar.S.te Token.glexer -> unit
val clear_entry : 'a Grammar.S.Entry.e -> unit
end
val extend :
'a Grammar.S.Entry.e ->
Gramext.position option ->
(string option * Gramext.g_assoc option *
(Grammar.S.te Gramext.g_symbol list * Gramext.g_action) list)
list -> unit
val delete_rule :
'a Grammar.S.Entry.e -> Grammar.S.te Gramext.g_symbol list -> unit
end
val error_verbose : bool Pervasives.ref
val warning_verbose : bool Pervasives.ref
val strict_parsing : bool Pervasives.ref
val print_entry : Format.formatter -> 'a Gramext.g_entry -> unit
val iter_entry : ('a Gramext.g_entry -> unit) -> 'a Gramext.g_entry -> unit
val fold_entry :
('a Gramext.g_entry -> 'b -> 'b) -> 'a Gramext.g_entry -> 'b -> 'b
end