2001-09-07 00:32:09 -07:00
|
|
|
(* camlp4r *)
|
|
|
|
(***********************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* Camlp4 *)
|
|
|
|
(* *)
|
|
|
|
(* Daniel de Rauglaudre, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
2002-02-16 10:44:22 -08:00
|
|
|
(* Copyright 2002 Institut National de Recherche en Informatique et *)
|
2001-09-07 00:32:09 -07:00
|
|
|
(* Automatique. Distributed only by permission. *)
|
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
2001-12-14 11:39:34 -08:00
|
|
|
(* This file has been generated by program: do not edit! *)
|
2001-09-07 00:32:09 -07:00
|
|
|
|
2002-02-16 10:44:22 -08:00
|
|
|
type 'te grammar =
|
2001-09-07 00:32:09 -07:00
|
|
|
{ gtokens : (Token.pattern, int ref) Hashtbl.t;
|
2002-02-16 10:44:22 -08:00
|
|
|
mutable glexer : 'te Token.glexer }
|
2001-09-07 00:32:09 -07:00
|
|
|
;;
|
|
|
|
|
2002-02-16 10:44:22 -08:00
|
|
|
type 'te g_entry =
|
|
|
|
{ egram : 'te grammar;
|
2001-09-07 00:32:09 -07:00
|
|
|
ename : string;
|
2002-02-16 10:44:22 -08:00
|
|
|
mutable estart : int -> 'te Stream.t -> Obj.t;
|
|
|
|
mutable econtinue : int -> int -> Obj.t -> 'te Stream.t -> Obj.t;
|
|
|
|
mutable edesc : 'te g_desc }
|
|
|
|
and 'te g_desc =
|
|
|
|
Dlevels of 'te g_level list | Dparser of ('te Stream.t -> Obj.t)
|
|
|
|
and 'te g_level =
|
2001-09-07 00:32:09 -07:00
|
|
|
{ assoc : g_assoc;
|
|
|
|
lname : string option;
|
2002-02-16 10:44:22 -08:00
|
|
|
lsuffix : 'te g_tree;
|
|
|
|
lprefix : 'te g_tree }
|
2001-09-07 00:32:09 -07:00
|
|
|
and g_assoc = NonA | RightA | LeftA
|
2002-02-16 10:44:22 -08:00
|
|
|
and 'te g_symbol =
|
|
|
|
Snterm of 'te g_entry
|
|
|
|
| Snterml of 'te g_entry * string
|
|
|
|
| Slist0 of 'te g_symbol
|
|
|
|
| Slist0sep of 'te g_symbol * 'te g_symbol
|
|
|
|
| Slist1 of 'te g_symbol
|
|
|
|
| Slist1sep of 'te g_symbol * 'te g_symbol
|
|
|
|
| Sopt of 'te g_symbol
|
2001-09-07 00:32:09 -07:00
|
|
|
| Sself
|
|
|
|
| Snext
|
|
|
|
| Stoken of Token.pattern
|
2002-02-16 10:44:22 -08:00
|
|
|
| Stree of 'te g_tree
|
2001-09-07 00:32:09 -07:00
|
|
|
and g_action = Obj.t
|
2002-02-16 10:44:22 -08:00
|
|
|
and 'te g_tree =
|
|
|
|
Node of 'te g_node | LocAct of g_action * g_action list | DeadEnd
|
|
|
|
and 'te g_node =
|
|
|
|
{ node : 'te g_symbol; son : 'te g_tree; brother : 'te g_tree }
|
2001-09-07 00:32:09 -07:00
|
|
|
;;
|
|
|
|
|
|
|
|
type position =
|
|
|
|
First | Last | Before of string | After of string | Level of string
|
|
|
|
;;
|
|
|
|
|
|
|
|
val levels_of_rules :
|
2002-02-16 10:44:22 -08:00
|
|
|
'te g_entry -> position option ->
|
|
|
|
(string option * g_assoc option * ('te g_symbol list * g_action) list)
|
|
|
|
list ->
|
|
|
|
'te g_level list;;
|
|
|
|
val srules : ('te g_symbol list * g_action) list -> 'te g_symbol;;
|
2001-09-07 00:32:09 -07:00
|
|
|
external action : 'a -> g_action = "%identity";;
|
|
|
|
|
|
|
|
val delete_rule_in_level_list :
|
2002-02-16 10:44:22 -08:00
|
|
|
'te g_entry -> 'te g_symbol list -> 'te g_level list -> 'te g_level list;;
|
2001-09-07 00:32:09 -07:00
|
|
|
|
|
|
|
val warning_verbose : bool ref;;
|