aboutsummaryrefslogtreecommitdiffhomepage
path: root/parsing
diff options
context:
space:
mode:
authorGravatar Maxime Dénès <mail@maximedenes.fr>2017-11-23 18:09:31 +0100
committerGravatar Maxime Dénès <mail@maximedenes.fr>2017-11-23 18:09:31 +0100
commit92c15a9b660b874ce3fa125b1f9bdf2e85c40f47 (patch)
treeaf03fc4e1f9b3e7f38854d9dd9fa83d0d4aa6b66 /parsing
parent167c52c6a15db5e094835244aff3ba76c78b391e (diff)
parentab7fd497575b161eeb9bfe89da743b3fbc93aaf3 (diff)
Merge PR #6167: Fixing factorization of recursive notations with an atomic separator
Diffstat (limited to 'parsing')
-rw-r--r--parsing/egramcoq.ml8
1 files changed, 5 insertions, 3 deletions
diff --git a/parsing/egramcoq.ml b/parsing/egramcoq.ml
index 7f50fd22a..2cb7da569 100644
--- a/parsing/egramcoq.ml
+++ b/parsing/egramcoq.ml
@@ -259,9 +259,11 @@ let is_binder_level from e = match e with
| (NumLevel 200, (BorderProd (Right, _) | InternalProd)) -> from = 200
| _ -> false
-let make_sep_rules tkl =
- let rec mkrule : Tok.t list -> unit rules = function
- | [] -> Rules ({ norec_rule = Stop }, ignore)
+let make_sep_rules = function
+ | [tk] -> Atoken tk
+ | tkl ->
+ let rec mkrule : Tok.t list -> string rules = function
+ | [] -> Rules ({ norec_rule = Stop }, fun _ -> (* dropped anyway: *) "")
| tkn :: rem ->
let Rules ({ norec_rule = r }, f) = mkrule rem in
let r = { norec_rule = Next (r, Atoken tkn) } in