From a7cfd8a9cc4148241e80b8b598f7878b308b8647 Mon Sep 17 00:00:00 2001 From: letouzey Date: Thu, 18 Nov 2010 18:34:58 +0000 Subject: adapt slighlty r13642 to support both camlp4 and camlp5-5 and camlp5-6 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13652 85f007b7-540e-0410-9357-904b9bb8a0f7 --- lib/compat.ml4 | 10 ---------- parsing/pcoq.ml4 | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/compat.ml4 b/lib/compat.ml4 index 67d2820a72..f2994edc67 100644 --- a/lib/compat.ml4 +++ b/lib/compat.ml4 @@ -227,13 +227,3 @@ let expl_anti loc e = <:expr< $anti:e$ >> ELSE let expl_anti _loc e = e (* FIXME: understand someday if we can do better *) END - -(** Compatibility with Camlp5 6.x *) - -IFDEF CAMLP5_6_00 THEN -let slist0sep x y = Gramext.Slist0sep (x, y, false) -let slist1sep x y = Gramext.Slist1sep (x, y, false) -ELSE -let slist0sep x y = Gramext.Slist0sep (x, y) -let slist1sep x y = Gramext.Slist1sep (x, y) -END diff --git a/parsing/pcoq.ml4 b/parsing/pcoq.ml4 index a77fb7cd71..50cbd3145a 100644 --- a/parsing/pcoq.ml4 +++ b/parsing/pcoq.ml4 @@ -35,6 +35,16 @@ ELSE open G END +(** Compatibility with Camlp5 6.x *) + +IFDEF CAMLP5_6_00 THEN +let slist0sep x y = Slist0sep (x, y, false) +let slist1sep x y = Slist1sep (x, y, false) +ELSE +let slist0sep x y = Slist0sep (x, y) +let slist1sep x y = Slist1sep (x, y) +END + let gram_token_of_token tok = IFDEF CAMLP5 THEN Stoken (Tok.to_pattern tok) -- cgit v1.2.3