summaryrefslogtreecommitdiff
path: root/camlp4/ocaml_src/lib/gramext.mli
blob: bd275ae8ee449edd8911ffc86b02c5f493f3e719 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
(* camlp4r *)
(***********************************************************************)
(*                                                                     *)
(*                             Camlp4                                  *)
(*                                                                     *)
(*        Daniel de Rauglaudre, projet Cristal, INRIA Rocquencourt     *)
(*                                                                     *)
(*  Copyright 2002 Institut National de Recherche en Informatique et   *)
(*  Automatique.  Distributed only by permission.                      *)
(*                                                                     *)
(***********************************************************************)

(* This file has been generated by program: do not edit! *)

type 'te grammar =
  { gtokens : (Token.pattern, int ref) Hashtbl.t;
    mutable glexer : 'te Token.glexer }
;;

type 'te g_entry =
  { egram : 'te grammar;
    ename : string;
    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 =
  { assoc : g_assoc;
    lname : string option;
    lsuffix : 'te g_tree;
    lprefix : 'te g_tree }
and g_assoc =
    NonA
  | RightA
  | LeftA
and 'te g_symbol =
    Smeta of string * 'te g_symbol list * Obj.t
  | 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
  | Sself
  | Snext
  | Stoken of Token.pattern
  | Stree of 'te g_tree
and g_action = Obj.t
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 }
;;

type position =
    First
  | Last
  | Before of string
  | After of string
  | Level of string
;;

val levels_of_rules :
  '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;;
external action : 'a -> g_action = "%identity";;

val delete_rule_in_level_list :
  'te g_entry -> 'te g_symbol list -> 'te g_level list -> 'te g_level list;;

val warning_verbose : bool ref;;