aboutsummaryrefslogtreecommitdiffhomepage
path: root/interp
diff options
context:
space:
mode:
Diffstat (limited to 'interp')
-rw-r--r--interp/notation.mli8
-rw-r--r--interp/notation_ops.ml1
2 files changed, 5 insertions, 4 deletions
diff --git a/interp/notation.mli b/interp/notation.mli
index 7d055571c..d10012212 100644
--- a/interp/notation.mli
+++ b/interp/notation.mli
@@ -176,10 +176,10 @@ val scope_class_of_class : Classops.cl_typ -> scope_class
(** Building notation key *)
type symbol =
- | Terminal of string
- | NonTerminal of Id.t
- | SProdList of Id.t * symbol list
- | Break of int
+ | Terminal of string (* an expression including symbols or a simply-quoted ident, e.g. "'U'" or "!" *)
+ | NonTerminal of Id.t (* an identifier "x" *)
+ | SProdList of Id.t * symbol list (* an expression "x sep .. sep y", remembering x (or y) and sep *)
+ | Break of int (* a sequence of blanks > 1, e.g. " " *)
val symbol_eq : symbol -> symbol -> bool
diff --git a/interp/notation_ops.ml b/interp/notation_ops.ml
index 301ec6984..c414ba67a 100644
--- a/interp/notation_ops.ml
+++ b/interp/notation_ops.ml
@@ -338,6 +338,7 @@ let compare_recursive_parts found f f' (iterator,subc) =
let notation_constr_and_vars_of_glob_constr a =
let found = ref { vars = []; recursive_term_vars = []; recursive_binders_vars = [] } in
let has_ltac = ref false in
+ (* Turn a glob_constr into a notation_constr by first trying to find a recursive pattern *)
let rec aux c =
let keepfound = !found in
(* n^2 complexity but small and done only once per notation *)