diff options
author | Stephane Glondu <steph@glondu.net> | 2010-11-17 10:54:45 +0100 |
---|---|---|
committer | Stephane Glondu <steph@glondu.net> | 2010-11-17 10:55:49 +0100 |
commit | 961fa299d857edd3f85403931ee6d7199efda989 (patch) | |
tree | a78ba94c78b0d7fd14f348c4ae9ba72e1e421d06 | |
parent | a361346aaab3805ecbed297b005ef31fd6dbfe34 (diff) |
Add 0003-Support-for-camlp5-6.02.0.patch
-rw-r--r-- | debian/patches/0003-Support-for-camlp5-6.02.0.patch | 78 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 79 insertions, 0 deletions
diff --git a/debian/patches/0003-Support-for-camlp5-6.02.0.patch b/debian/patches/0003-Support-for-camlp5-6.02.0.patch new file mode 100644 index 00000000..5ed3f543 --- /dev/null +++ b/debian/patches/0003-Support-for-camlp5-6.02.0.patch @@ -0,0 +1,78 @@ +From: glondu <glondu@85f007b7-540e-0410-9357-904b9bb8a0f7> +Date: Tue, 16 Nov 2010 20:25:56 +0000 +Subject: [PATCH] Support for camlp5 6.02.0 + +Signed-off-by: Stephane Glondu <steph@glondu.net> +--- + lib/compat.ml4 | 12 ++++++++++++ + parsing/pcoq.ml4 | 18 +++++++++--------- + 2 files changed, 21 insertions(+), 9 deletions(-) + +diff --git a/lib/compat.ml4 b/lib/compat.ml4 +index 9b6bb19..a77c2bc 100644 +--- a/lib/compat.ml4 ++++ b/lib/compat.ml4 +@@ -65,3 +65,15 @@ let unloc = M.unloc + let join_loc = M.join_loc + type token = M.token + type lexer = M.lexer ++ ++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 90a9220..9a1630f 100644 +--- a/parsing/pcoq.ml4 ++++ b/parsing/pcoq.ml4 +@@ -631,16 +631,16 @@ let rec symbol_of_constr_prod_entry_key assoc from forpat typ = + | ETConstrList (typ',[]) -> + Gramext.Slist1 (symbol_of_constr_prod_entry_key assoc from forpat (ETConstr typ')) + | ETConstrList (typ',tkl) -> +- Gramext.Slist1sep +- (symbol_of_constr_prod_entry_key assoc from forpat (ETConstr typ'), +- make_sep_rules tkl) ++ Compat.slist1sep ++ (symbol_of_constr_prod_entry_key assoc from forpat (ETConstr typ')) ++ (make_sep_rules tkl) + | ETBinderList (false,[]) -> + Gramext.Slist1 + (symbol_of_constr_prod_entry_key assoc from forpat (ETBinder false)) + | ETBinderList (false,tkl) -> +- Gramext.Slist1sep +- (symbol_of_constr_prod_entry_key assoc from forpat (ETBinder false), +- make_sep_rules tkl) ++ Compat.slist1sep ++ (symbol_of_constr_prod_entry_key assoc from forpat (ETBinder false)) ++ (make_sep_rules tkl) + | _ -> + match interp_constr_prod_entry_key assoc from forpat typ with + | (eobj,None,_) -> Gramext.Snterm (Gram.Entry.obj eobj) +@@ -654,16 +654,16 @@ let rec symbol_of_constr_prod_entry_key assoc from forpat typ = + let rec symbol_of_prod_entry_key = function + | Alist1 s -> Gramext.Slist1 (symbol_of_prod_entry_key s) + | Alist1sep (s,sep) -> +- Gramext.Slist1sep (symbol_of_prod_entry_key s, Gramext.Stoken ("",sep)) ++ Compat.slist1sep (symbol_of_prod_entry_key s) (Gramext.Stoken ("", sep)) + | Alist0 s -> Gramext.Slist0 (symbol_of_prod_entry_key s) + | Alist0sep (s,sep) -> +- Gramext.Slist0sep (symbol_of_prod_entry_key s, Gramext.Stoken ("",sep)) ++ Compat.slist0sep (symbol_of_prod_entry_key s) (Gramext.Stoken ("", sep)) + | Aopt s -> Gramext.Sopt (symbol_of_prod_entry_key s) + | Amodifiers s -> + Gramext.srules + [([], Gramext.action(fun _loc -> [])); + ([Gramext.Stoken ("", "("); +- Gramext.Slist1sep ((symbol_of_prod_entry_key s), Gramext.Stoken ("", ",")); ++ Compat.slist1sep (symbol_of_prod_entry_key s) (Gramext.Stoken ("", ",")); + Gramext.Stoken ("", ")")], + Gramext.action (fun _ l _ _loc -> l))] + | Aself -> Gramext.Sself +-- diff --git a/debian/patches/series b/debian/patches/series index d2880009..d2da26e2 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ 0001-Fix-missing-coqlib-argument-to-coqdep-in-test-suite.patch 0002-Fix-mixed-implicit-and-normal-rules.patch +0003-Support-for-camlp5-6.02.0.patch |