blob: f4c9829189bfc548716810564fd54eb6e9bf76c3 (
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
|
(************************************************************************)
(* v * The Coq Proof Assistant / The Coq Development Team *)
(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
(* \VV/ **************************************************************)
(* // * This file is distributed under the terms of the *)
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
(*i $Id: extend.ml 7761 2005-12-30 10:52:19Z herbelin $ i*)
open Util
open Pp
open Gramext
open Names
open Ppextend
open Topconstr
open Genarg
(**********************************************************************)
(* constr entry keys *)
type side = Left | Right
type production_position =
| BorderProd of side * Gramext.g_assoc option (* true=left; false=right *)
| InternalProd
type production_level =
| NextLevel
| NumLevel of int
type ('lev,'pos) constr_entry_key =
| ETIdent | ETReference | ETBigint
| ETConstr of ('lev * 'pos)
| ETPattern
| ETOther of string * string
| ETConstrList of ('lev * 'pos) * Token.pattern list
type constr_production_entry =
(production_level,production_position) constr_entry_key
type constr_entry =
(int,unit) constr_entry_key
type simple_constr_production_entry =
(production_level,unit) constr_entry_key
(**********************************************************************)
(* syntax modifiers *)
type syntax_modifier =
| SetItemLevel of string list * production_level
| SetLevel of int
| SetAssoc of Gramext.g_assoc
| SetEntryType of string * simple_constr_production_entry
| SetOnlyParsing
| SetFormat of string located
|