diff options
| author | Emilio Jesus Gallego Arias | 2019-08-19 04:02:09 +0200 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2020-03-25 23:45:00 -0400 |
| commit | d5dcb490f4f08dc1f5ae4158a26d264e03f808cc (patch) | |
| tree | dc250ea98cc0983c858e9d76b49c5167400bfad9 /gramlib/grammar.mli | |
| parent | 767ecfec49543b70a605d20b1dae8252e1faabfe (diff) | |
[parsing] Remove extend AST in favor of gramlib constructors
We remove Coq's wrapper over gramlib's grammar constructors.
Diffstat (limited to 'gramlib/grammar.mli')
| -rw-r--r-- | gramlib/grammar.mli | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/gramlib/grammar.mli b/gramlib/grammar.mli index 4ac85bd358..4280181109 100644 --- a/gramlib/grammar.mli +++ b/gramlib/grammar.mli @@ -90,16 +90,23 @@ module type S = sig val clear_entry : 'a Entry.t -> unit end - val safe_extend : warning:(string -> unit) option -> - 'a Entry.t -> Gramext.position option -> - (string option * Gramext.g_assoc option * 'a Production.t list) - list -> - unit - val safe_delete_rule : 'a Entry.t -> ('a, _, 'f, 'r) Rule.t -> unit + type 'a single_extend_statement = + string option * Gramext.g_assoc option * 'a Production.t list + + type 'a extend_statement = + { pos : Gramext.position option + ; data : 'a single_extend_statement list + } + + val safe_extend : warning:(string -> unit) option -> 'a Entry.t -> 'a extend_statement -> unit + val safe_delete_rule : 'a Entry.t -> 'a Production.t -> unit + + val generalize_symbol : ('a, 'tr, 'c) Symbol.t -> ('a, norec, 'c) Symbol.t option + + val mk_rule : 'a pattern list -> string Rules.t (* Used in custom entries, should tweak? *) val level_of_nonterm : ('a, norec, 'c) Symbol.t -> string option - end (** Signature type of the functor [Grammar.GMake]. The types and functions are almost the same than in generic interface, but: |
