sig
  type 'a parser_t = 'Stream.t -> Obj.t
  type 'a bparser_t = ('a, Obj.t) Fstream.bp
  type parse_algorithm = Predictive | Backtracking | DefaultAlgorithm
  type 'a grammar = {
    gtokens : (Plexing.pattern, int Pervasives.ref) Hashtbl.t;
    mutable glexer : 'Plexing.lexer;
    mutable galgo : Gramext.parse_algorithm;
  }
  type 'a g_entry = {
    egram : 'Gramext.grammar;
    ename : string;
    elocal : bool;
    mutable estart : int -> 'Gramext.parser_t;
    mutable econtinue : int -> int -> Obj.t -> 'Gramext.parser_t;
    mutable bstart : int -> 'Gramext.bparser_t;
    mutable bcontinue : int -> int -> Obj.t -> 'Gramext.bparser_t;
    mutable edesc : 'Gramext.g_desc;
  }
  and 'a g_desc =
      Dlevels of 'Gramext.g_level list
    | Dparser of 'Gramext.parser_t
  and 'a g_level = {
    assoc : Gramext.g_assoc;
    lname : string option;
    lsuffix : 'Gramext.g_tree;
    lprefix : 'Gramext.g_tree;
  }
  and g_assoc = NonA | RightA | LeftA
  and 'a g_symbol =
      Sfacto of 'Gramext.g_symbol
    | Smeta of string * 'Gramext.g_symbol list * Obj.t
    | Snterm of 'Gramext.g_entry
    | Snterml of 'Gramext.g_entry * string
    | Slist0 of 'Gramext.g_symbol
    | Slist0sep of 'Gramext.g_symbol * 'Gramext.g_symbol
    | Slist1 of 'Gramext.g_symbol
    | Slist1sep of 'Gramext.g_symbol * 'Gramext.g_symbol
    | Sopt of 'Gramext.g_symbol
    | Sflag of 'Gramext.g_symbol
    | Sself
    | Snext
    | Stoken of Plexing.pattern
    | Stree of 'Gramext.g_tree
    | Svala of string list * 'Gramext.g_symbol
  and g_action = Obj.t
  and 'a g_tree =
      Node of 'Gramext.g_node
    | LocAct of Gramext.g_action * Gramext.g_action list
    | DeadEnd
  and 'a g_node = {
    node : 'Gramext.g_symbol;
    son : 'Gramext.g_tree;
    brother : 'Gramext.g_tree;
  }
  type position =
      First
    | Last
    | Before of string
    | After of string
    | Like of string
    | Level of string
  val levels_of_rules :
    'Gramext.g_entry ->
    Gramext.position option ->
    (string option * Gramext.g_assoc option *
     ('Gramext.g_symbol list * Gramext.g_action) list)
    list -> 'Gramext.g_level list
  val srules :
    ('Gramext.g_symbol list * Gramext.g_action) list -> 'Gramext.g_symbol
  external action : '-> Gramext.g_action = "%identity"
  val eq_symbol : 'Gramext.g_symbol -> 'Gramext.g_symbol -> bool
  val delete_rule_in_level_list :
    'Gramext.g_entry ->
    'Gramext.g_symbol list ->
    'Gramext.g_level list -> 'Gramext.g_level list
  val warning_verbose : bool Pervasives.ref
end