aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--Makefile2
-rw-r--r--Makefile.build18
-rw-r--r--Makefile.dev4
-rw-r--r--Makefile.ide6
-rw-r--r--checker/include1
-rw-r--r--config/coq_config.mli9
-rw-r--r--configure.ml59
-rw-r--r--dev/base_include1
-rw-r--r--dev/build/windows/makecoq_mingw.sh4
-rw-r--r--dev/core.dbg2
-rw-r--r--dev/doc/build-system.dev.txt2
-rw-r--r--dev/doc/build-system.txt4
-rw-r--r--dev/doc/coq-src-description.txt2
-rw-r--r--dev/ocamldebug-coq.run6
-rw-r--r--dev/top_printers.ml2
-rw-r--r--ide/minilib.ml2
-rw-r--r--ide/minilib.mli2
-rw-r--r--lib/envars.ml29
-rw-r--r--lib/envars.mli11
-rw-r--r--parsing/egramcoq.ml14
-rw-r--r--parsing/egramcoq.mli2
-rw-r--r--parsing/egramml.mli2
-rw-r--r--parsing/g_vernac.ml44
-rw-r--r--parsing/pcoq.ml42
-rw-r--r--parsing/pcoq.mli6
-rw-r--r--parsing/tok.ml2
-rw-r--r--parsing/tok.mli2
-rw-r--r--plugins/btauto/g_btauto.ml42
-rw-r--r--plugins/cc/g_congruence.ml42
-rw-r--r--plugins/derive/g_derive.ml42
-rw-r--r--plugins/extraction/g_extraction.ml42
-rw-r--r--plugins/firstorder/g_ground.ml41
-rw-r--r--plugins/fourier/g_fourier.ml42
-rw-r--r--plugins/funind/g_indfun.ml41
-rw-r--r--plugins/ltac/coretactics.ml42
-rw-r--r--plugins/ltac/extraargs.ml42
-rw-r--r--plugins/ltac/extratactics.ml42
-rw-r--r--plugins/ltac/g_auto.ml42
-rw-r--r--plugins/ltac/g_class.ml42
-rw-r--r--plugins/ltac/g_eqdecide.ml42
-rw-r--r--plugins/ltac/g_ltac.ml44
-rw-r--r--plugins/ltac/g_obligations.ml44
-rw-r--r--plugins/ltac/g_rewrite.ml42
-rw-r--r--plugins/ltac/profile_ltac_tactics.ml42
-rw-r--r--plugins/micromega/g_micromega.ml42
-rw-r--r--plugins/nsatz/g_nsatz.ml42
-rw-r--r--plugins/omega/g_omega.ml42
-rw-r--r--plugins/quote/g_quote.ml42
-rw-r--r--plugins/romega/g_romega.ml42
-rw-r--r--plugins/rtauto/g_rtauto.ml42
-rw-r--r--plugins/setoid_ring/g_newring.ml42
-rw-r--r--plugins/ssrmatching/ssrmatching.ml43
-rw-r--r--tools/CoqMakefile.in28
-rw-r--r--vernac/metasyntax.ml4
-rw-r--r--vernac/metasyntax.mli2
56 files changed, 131 insertions, 198 deletions
diff --git a/.gitignore b/.gitignore
index 1e7f982a5..b857b754a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -55,7 +55,7 @@ config/Makefile
config/coq_config.ml
config/Info-*.plist
dev/ocamldebug-coq
-dev/camlp4.dbg
+dev/camlp5.dbg
plugins/micromega/csdpcert
plugins/micromega/.micromega.ml.generated
kernel/byterun/dllcoqrun.so
diff --git a/Makefile b/Makefile
index 3e8e49c31..0c9bccc83 100644
--- a/Makefile
+++ b/Makefile
@@ -266,7 +266,7 @@ cacheclean:
find theories plugins test-suite -name '.*.aux' -delete
cleanconfig:
- rm -f config/Makefile config/coq_config.ml myocamlbuild_config.ml dev/ocamldebug-coq dev/camlp4.dbg config/Info-*.plist
+ rm -f config/Makefile config/coq_config.ml myocamlbuild_config.ml dev/ocamldebug-coq dev/camlp5.dbg config/Info-*.plist
distclean: clean cleanconfig cacheclean timingclean
diff --git a/Makefile.build b/Makefile.build
index f0dd46b0f..83e3c7ca9 100644
--- a/Makefile.build
+++ b/Makefile.build
@@ -196,7 +196,7 @@ COQOPTS=$(NATIVECOMPUTE)
BOOTCOQC=$(TIMER) $(COQTOPBEST) -boot $(COQOPTS) -compile
LOCALINCLUDES=$(addprefix -I ,$(SRCDIRS))
-MLINCLUDES=$(LOCALINCLUDES) -I $(MYCAMLP4LIB)
+MLINCLUDES=$(LOCALINCLUDES) -I $(MYCAMLP5LIB)
OCAMLC := $(OCAMLFIND) ocamlc $(CAMLFLAGS)
OCAMLOPT := $(OCAMLFIND) opt $(CAMLFLAGS)
@@ -240,8 +240,8 @@ endef
# Camlp5 settings
-CAMLP4DEPS:=grammar/grammar.cma
-CAMLP4USE=pa_extend.cmo q_MLast.cmo pa_macro.cmo -D$(CAMLVERSION)
+CAMLP5DEPS:=grammar/grammar.cma
+CAMLP5USE=pa_extend.cmo q_MLast.cmo pa_macro.cmo -D$(CAMLVERSION)
PR_O := $(if $(READABLE_ML4),pr_o.cmo,pr_dump.cmo)
@@ -345,14 +345,14 @@ grammar/vernacextend.cmo : $(GRAMBASEDEPS) grammar/tacextend.cmo \
## Ocaml compiler with the right options and -I for grammar
GRAMC := $(OCAMLFIND) ocamlc $(CAMLFLAGS) $(CAMLDEBUG) $(USERFLAGS) \
- -I $(MYCAMLP4LIB) -I grammar
+ -I $(MYCAMLP5LIB) -I grammar
## Specific rules for grammar.cma
grammar/grammar.cma : $(GRAMCMO)
$(SHOW)'Testing $@'
@touch grammar/test.mlp
- $(HIDE)$(GRAMC) -pp '$(CAMLP4O) -I $(MYCAMLP4LIB) $^ -impl' -impl grammar/test.mlp -o grammar/test
+ $(HIDE)$(GRAMC) -pp '$(CAMLP5O) -I $(MYCAMLP5LIB) $^ -impl' -impl grammar/test.mlp -o grammar/test
@rm -f grammar/test.* grammar/test
$(SHOW)'OCAMLC -a $@'
$(HIDE)$(GRAMC) $^ -linkall -a -o $@
@@ -361,7 +361,7 @@ grammar/grammar.cma : $(GRAMCMO)
COMPATCMO:=
GRAMP4USE:=$(COMPATCMO) pa_extend.cmo q_MLast.cmo pa_macro.cmo -D$(CAMLVERSION)
-GRAMPP:=$(CAMLP4O) -I $(MYCAMLP4LIB) $(GRAMP4USE) $(CAMLP4COMPAT) -impl
+GRAMPP:=$(CAMLP5O) -I $(MYCAMLP5LIB) $(GRAMP4USE) $(CAMLP5COMPAT) -impl
## Rules for standard .mlp and .mli files in grammar/
@@ -684,10 +684,10 @@ plugins/%.cmx: plugins/%.ml
$(SHOW)'OCAMLLEX $<'
$(HIDE)$(OCAMLLEX) -o $@ "$*.mll"
-%.ml: %.ml4 $(CAMLP4DEPS)
+%.ml: %.ml4 $(CAMLP5DEPS)
$(SHOW)'CAMLP5O $<'
- $(HIDE)$(CAMLP4O) -I $(MYCAMLP4LIB) $(PR_O) \
- $(CAMLP4DEPS) $(CAMLP4USE) $(CAMLP4COMPAT) -impl $< -o $@
+ $(HIDE)$(CAMLP5O) -I $(MYCAMLP5LIB) $(PR_O) \
+ $(CAMLP5DEPS) $(CAMLP5USE) $(CAMLP5COMPAT) -impl $< -o $@
###########################################################################
diff --git a/Makefile.dev b/Makefile.dev
index db83be369..d35ad7501 100644
--- a/Makefile.dev
+++ b/Makefile.dev
@@ -18,9 +18,9 @@
DEBUGPRINTERS:=dev/top_printers.cmo dev/vm_printers.cmo
devel: printers
-printers: $(CORECMA) $(DEBUGPRINTERS) dev/camlp4.dbg
+printers: $(CORECMA) $(DEBUGPRINTERS) dev/camlp5.dbg
-dev/camlp4.dbg:
+dev/camlp5.dbg:
echo "load_printer gramlib.cma" > $@
############
diff --git a/Makefile.ide b/Makefile.ide
index 09eef1f6b..4846f5e60 100644
--- a/Makefile.ide
+++ b/Makefile.ide
@@ -106,9 +106,9 @@ $(COQIDEBYTE): $(LINKIDE)
$(HIDE)$(OCAMLC) $(COQIDEFLAGS) $(BYTEFLAGS) -o $@ unix.cma threads.cma lablgtk.cma \
lablgtksourceview2.cma str.cma $(IDEFLAGS) $(IDECDEPSFLAGS) $^
-ide/coqide_main.ml: ide/coqide_main.ml4 config/Makefile # no camlp4deps here
- $(SHOW)'CAMLP4O $<'
- $(HIDE)$(CAMLP4O) -I $(MYCAMLP4LIB) $(PR_O) $(CAMLP4USE) -D$(IDEINT) -impl $< -o $@
+ide/coqide_main.ml: ide/coqide_main.ml4 config/Makefile # no camlp5deps here
+ $(SHOW)'CAMLP5O $<'
+ $(HIDE)$(CAMLP5O) -I $(MYCAMLP5LIB) $(PR_O) $(CAMLP5USE) -D$(IDEINT) -impl $< -o $@
ide/%.cmi: ide/%.mli
diff --git a/checker/include b/checker/include
index 09bf2826c..da0346359 100644
--- a/checker/include
+++ b/checker/include
@@ -13,7 +13,6 @@
#directory "kernel";;
#directory "checker";;
#directory "+threads";;
-#directory "+camlp4";;
#directory "+camlp5";;
#load "unix.cma";;
diff --git a/config/coq_config.mli b/config/coq_config.mli
index e2d9d0d01..5f9ebdc1a 100644
--- a/config/coq_config.mli
+++ b/config/coq_config.mli
@@ -28,11 +28,10 @@ val ocamllex : string
val camlbin : string (* base directory of OCaml binaries *)
val camllib : string (* for Dynlink *)
-val camlp4 : string (* exact name of camlp4: either "camlp4" ou "camlp5" *)
-val camlp4o : string (* name of the camlp4o/camlp5o executable *)
-val camlp4bin : string (* base directory for Camlp4/5 binaries *)
-val camlp4lib : string (* where is the library of Camlp4 *)
-val camlp4compat : string (* compatibility argument to camlp4/5 *)
+val camlp5o : string (* name of the camlp5o executable *)
+val camlp5bin : string (* base directory for camlp5 binaries *)
+val camlp5lib : string (* where is the library of camlp5 *)
+val camlp5compat : string (* compatibility argument to camlp5 *)
val coqideincl : string (* arguments for building coqide (e.g. lablgtk) *)
val cflags : string (* arguments passed to gcc *)
diff --git a/configure.ml b/configure.ml
index 06a7dd822..9992e03b8 100644
--- a/configure.ml
+++ b/configure.ml
@@ -193,7 +193,7 @@ let select_command msg candidates =
in search candidates
(** As per bug #4828, ocamlfind on Windows/Cygwin barfs if you pass it
- a quoted path to camlpXo via -pp. So we only quote camlpXo on not
+ a quoted path to camlp5o via -pp. So we only quote camlp5o on not
Windows, and warn on Windows if the path contains spaces *)
let contains_suspicious_characters str =
List.fold_left (fun b ch -> String.contains str ch || b) false [' '; '\t']
@@ -487,7 +487,7 @@ let camlbin, caml_version, camllib, findlib_version =
then reset_caml_top camlexec (camlbin / "ocaml") in
camlbin, caml_version, camllib, findlib_version
-let camlp4compat = "-loc loc"
+let camlp5compat = "-loc loc"
(** Caml version as a list of string, e.g. ["4";"00";"1"] *)
@@ -570,9 +570,9 @@ let caml_flags =
let coq_caml_flags =
coq_warn_error
-(** * CamlpX configuration *)
+(** * Camlp5 configuration *)
-(* Convention: we use camldir as a prioritary location for camlpX, if given *)
+(* Convention: we use camldir as a prioritary location for camlp5, if given *)
(* i.e., in the case of camlp5, we search for a copy of camlp5o which *)
(* answers the right camlp5 lib dir *)
@@ -588,7 +588,7 @@ let which_camlp5o_for camlp5lib =
if fst (tryrun camlp5o ["-where"]) = camlp5lib then camlp5o else
die ("Error: cannot find Camlp5 binaries corresponding to Camlp5 library " ^ camlp5lib)
-let which_camlpX base =
+let which_camlp5 base =
let file = Filename.concat camlbin base in
if is_executable file then file else which base
@@ -609,7 +609,7 @@ let check_camlp5 testcma = match !Prefs.camlp5dir with
in die msg
| None ->
try
- let camlp5o = which_camlpX "camlp5o" in
+ let camlp5o = which_camlp5 "camlp5o" in
let dir,_ = tryrun camlp5o ["-where"] in
dir, camlp5o
with Not_found ->
@@ -623,15 +623,14 @@ let check_camlp5_version camlp5o =
printf "You have Camlp5 %s. Good!\n" version; version
| _ -> die "Error: unsupported Camlp5 (version < 6.06 or unrecognized).\n"
-let config_camlpX () =
+let config_camlp5 () =
let camlp5mod = "gramlib" in
let camlp5libdir, camlp5o = check_camlp5 (camlp5mod^".cma") in
let camlp5_version = check_camlp5_version camlp5o in
- "camlp5", "Camlp5", camlp5o, Filename.dirname camlp5o, camlp5libdir, camlp5mod, camlp5_version
+ camlp5o, Filename.dirname camlp5o, camlp5libdir, camlp5mod, camlp5_version
-let camlpX, capitalized_camlpX, camlpXo,
- camlpXbindir, fullcamlpXlibdir,
- camlpXmod, camlpX_version = config_camlpX ()
+let camlp5o, camlp5bindir, fullcamlp5libdir,
+ camlp5mod, camlp5_version = config_camlp5 ()
let shorten_camllib s =
if starts_with s (camllib^"/") then
@@ -639,7 +638,7 @@ let shorten_camllib s =
"+" ^ String.sub s l (String.length s - l)
else s
-let camlpXlibdir = shorten_camllib fullcamlpXlibdir
+let camlp5libdir = shorten_camllib fullcamlp5libdir
(** * Native compiler *)
@@ -649,8 +648,8 @@ let msg_byteonly () =
let msg_no_ocamlopt () =
printf "Cannot find the OCaml native-code compiler.\n"; msg_byteonly ()
-let msg_no_camlpX_cmxa () =
- printf "Cannot find the native-code library of %s.\n" camlpX; msg_byteonly ()
+let msg_no_camlp5_cmxa () =
+ printf "Cannot find the native-code library of camlp5.\n"; msg_byteonly ()
let msg_no_dynlink_cmxa () =
printf "Cannot find native-code dynlink library.\n"; msg_byteonly ();
@@ -662,8 +661,8 @@ let check_native () =
let () = if !Prefs.byteonly then raise Not_found in
let version, _ = tryrun camlexec.find ["opt";"-version"] in
if version = "" then let () = msg_no_ocamlopt () in raise Not_found
- else if not (Sys.file_exists (fullcamlpXlibdir/camlpXmod^".cmxa"))
- then let () = msg_no_camlpX_cmxa () in raise Not_found
+ else if not (Sys.file_exists (fullcamlp5libdir/camlp5mod^".cmxa"))
+ then let () = msg_no_camlp5_cmxa () in raise Not_found
else if fst (tryrun camlexec.find ["query";"dynlink"]) = ""
then let () = msg_no_dynlink_cmxa () in raise Not_found
else
@@ -1015,9 +1014,9 @@ let print_summary () =
pr " OCaml binaries in : %s\n" (esc camlbin);
pr " OCaml library in : %s\n" (esc camllib);
pr " OCaml flambda flags : %s\n" (String.concat " " !Prefs.flambda_flags);
- pr " %s version : %s\n" capitalized_camlpX camlpX_version;
- pr " %s binaries in : %s\n" capitalized_camlpX (esc camlpXbindir);
- pr " %s library in : %s\n" capitalized_camlpX (esc camlpXlibdir);
+ pr " Camlp5 version : %s\n" camlp5_version;
+ pr " Camlp5 binaries in : %s\n" (esc camlp5bindir);
+ pr " Camlp5 library in : %s\n" (esc camlp5libdir);
if best_compiler = "opt" then
pr " Native dynamic link support : %B\n" hasnatdynlink;
if coqide <> "no" then
@@ -1057,7 +1056,7 @@ let write_dbg_wrapper f =
pr "# DO NOT EDIT THIS FILE: automatically generated by ../configure #\n\n";
pr "export COQTOP=%S\n" coqtop;
pr "OCAMLDEBUG=%S\n" (camlbin^"/ocamldebug");
- pr "CAMLP4LIB=%S\n\n" camlpXlibdir;
+ pr "CAMLP5LIB=%S\n\n" camlp5libdir;
pr ". $COQTOP/dev/ocamldebug-coq.run\n";
close_out o;
Unix.chmod f 0o555
@@ -1095,11 +1094,10 @@ let write_configml f =
pr_s "ocamllex" camlexec.lex;
pr_s "camlbin" camlbin;
pr_s "camllib" camllib;
- pr_s "camlp4" camlpX;
- pr_s "camlp4o" camlpXo;
- pr_s "camlp4bin" camlpXbindir;
- pr_s "camlp4lib" camlpXlibdir;
- pr_s "camlp4compat" camlp4compat;
+ pr_s "camlp5o" camlp5o;
+ pr_s "camlp5bin" camlp5bindir;
+ pr_s "camlp5lib" camlp5libdir;
+ pr_s "camlp5compat" camlp5compat;
pr_s "cflags" cflags;
pr_s "caml_flags" caml_flags;
pr_s "best" best_compiler;
@@ -1220,12 +1218,11 @@ let write_makefile f =
pr "CAMLDEBUGOPT=%s\n\n" coq_debug_flag;
pr "# Compilation profile flag\n";
pr "CAMLTIMEPROF=%s\n\n" coq_profile_flag;
- pr "# Camlp4 : flavor, binaries, libraries ...\n";
- pr "# NB : avoid using CAMLP4LIB (conflict under Windows)\n";
- pr "CAMLP4=%s\n" camlpX;
- pr "CAMLP4O=%s\n" (win_aware_quote_executable camlpXo);
- pr "CAMLP4COMPAT=%s\n" camlp4compat;
- pr "MYCAMLP4LIB=%S\n\n" camlpXlibdir;
+ pr "# Camlp5 : flavor, binaries, libraries ...\n";
+ pr "# NB : avoid using CAMLP5LIB (conflict under Windows)\n";
+ pr "CAMLP5O=%s\n" (win_aware_quote_executable camlp5o);
+ pr "CAMLP5COMPAT=%s\n" camlp5compat;
+ pr "MYCAMLP5LIB=%S\n\n" camlp5libdir;
pr "# Your architecture\n";
pr "# Can be obtain by UNIX command arch\n";
pr "ARCH=%s\n" arch;
diff --git a/dev/base_include b/dev/base_include
index 472c0c605..320d366aa 100644
--- a/dev/base_include
+++ b/dev/base_include
@@ -19,7 +19,6 @@
#directory "stm";;
#directory "vernac";;
-#directory "+camlp4";; (* lazy solution: add both of camlp4/5 so that *)
#directory "+camlp5";; (* Gramext is found in top_printers.ml *)
#use "top_printers.ml";;
diff --git a/dev/build/windows/makecoq_mingw.sh b/dev/build/windows/makecoq_mingw.sh
index c46767821..d8cde39f8 100644
--- a/dev/build/windows/makecoq_mingw.sh
+++ b/dev/build/windows/makecoq_mingw.sh
@@ -794,8 +794,8 @@ function make_ocaml {
# TODO: this might not work if PREFIX contains spaces
sed -i "s|^PREFIX=.*|PREFIX=$PREFIXOCAML|" config/Makefile
- # We don't want to mess up Coq's dirctory structure so put the OCaml library in a separate folder
- # If we refer to the make variable ${PREFIX} below, camlp4 ends up having a wrong path:
+ # We don't want to mess up Coq's directory structure so put the OCaml library in a separate folder
+ # If we refer to the make variable ${PREFIX} below, camlp5 ends up having the wrong path:
# D:\bin\coq64_buildtest_abs_ocaml4\bin>ocamlc -where => D:/bin/coq64_buildtest_abs_ocaml4/libocaml
# D:\bin\coq64_buildtest_abs_ocaml4\bin>camlp4 -where => ${PREFIX}/libocaml\camlp4
# So we put an explicit path in there
diff --git a/dev/core.dbg b/dev/core.dbg
index 00a4355a4..57c136900 100644
--- a/dev/core.dbg
+++ b/dev/core.dbg
@@ -1,4 +1,4 @@
-source camlp4.dbg
+source camlp5.dbg
load_printer threads.cma
load_printer str.cma
load_printer clib.cma
diff --git a/dev/doc/build-system.dev.txt b/dev/doc/build-system.dev.txt
index f3fc13e96..abba13428 100644
--- a/dev/doc/build-system.dev.txt
+++ b/dev/doc/build-system.dev.txt
@@ -46,7 +46,7 @@ see build-system.txt .
.ml4 files
----------
-.ml4 are converted to .ml by camlp4. By default, they are produced
+.ml4 are converted to .ml by camlp5. By default, they are produced
in the binary ast format understood by ocamlc/ocamlopt/ocamldep.
Pros:
- faster than parsing clear-text source file.
diff --git a/dev/doc/build-system.txt b/dev/doc/build-system.txt
index 873adc1b2..1c4fd2eba 100644
--- a/dev/doc/build-system.txt
+++ b/dev/doc/build-system.txt
@@ -88,7 +88,7 @@ bootstrapped. The dependencies of a file FOO are in FOO.d . This
enables partial recalculation of dependencies (only the dependencies
of changed files are recomputed).
-If you add a dependency to a Coq camlp4 extension (grammar.cma or
+If you add a dependency to a Coq camlp5 extension (grammar.cma or
q_constr.cmo), then see sections ".ml4 files" and "new files".
Cleaning Targets
@@ -127,7 +127,7 @@ of a grammar extension via a line of the form:
The use of (*i camlp4use: ... i*) to mention uses of standard
extension such as IFDEF has also been discontinued, the Makefile now
-always calls camlp4 with pa_macros.cmo and a few others by default.
+always calls camlp5 with pa_macros.cmo and a few others by default.
For debugging a Coq grammar extension, it could be interesting
to use the READABLE_ML4=1 option, otherwise the generated .ml are
diff --git a/dev/doc/coq-src-description.txt b/dev/doc/coq-src-description.txt
index 2dbd132da..b3d49b7e5 100644
--- a/dev/doc/coq-src-description.txt
+++ b/dev/doc/coq-src-description.txt
@@ -25,7 +25,7 @@ intf :
grammar :
- Camlp4 syntax extensions. The file grammar/grammar.cma is used
+ Camlp5 syntax extensions. The file grammar/grammar.cma is used
to pre-process .ml4 files containing EXTEND constructions,
either TACTIC EXTEND, ARGUMENTS EXTEND or VERNAC ... EXTEND.
This grammar.cma incorporates many files from other directories
diff --git a/dev/ocamldebug-coq.run b/dev/ocamldebug-coq.run
index 3cbccab44..f3e60edea 100644
--- a/dev/ocamldebug-coq.run
+++ b/dev/ocamldebug-coq.run
@@ -3,19 +3,19 @@
# Wrapper around ocamldebug for Coq
# This file is to be launched via the generated script ocamldebug-coq,
-# which will set the env variables $OCAMLDEBUG, $CAMLP4LIB, $COQTOP
+# which will set the env variables $OCAMLDEBUG, $CAMLP5LIB, $COQTOP
# Anyway, just in case someone tries to use this script directly,
# here are some reasonable default values
[ -z "$OCAMLDEBUG" ] && OCAMLDEBUG=ocamldebug
-[ -z "$CAMLP4LIB" ] && CAMLP4LIB=+camlp5
+[ -z "$CAMLP5LIB" ] && CAMLP5LIB=+camlp5
[ -z "$COQTOP" -a -d "$PWD/kernel" ] && COQTOP=$PWD
[ -z "$COQTOP" -a -d "$PWD/../kernel" ] && COQTOP=`dirname $PWD`
export CAML_LD_LIBRARY_PATH=$COQTOP/kernel/byterun:$CAML_LD_LIBRARY_PATH
exec $OCAMLDEBUG \
- -I $CAMLP4LIB -I +threads \
+ -I $CAMLP5LIB -I +threads \
-I $COQTOP \
-I $COQTOP/config -I $COQTOP/printing -I $COQTOP/grammar -I $COQTOP/clib \
-I $COQTOP/lib -I $COQTOP/intf -I $COQTOP/kernel -I $COQTOP/kernel/byterun \
diff --git a/dev/top_printers.ml b/dev/top_printers.ml
index af38ce4b8..f99e2593d 100644
--- a/dev/top_printers.ml
+++ b/dev/top_printers.ml
@@ -485,7 +485,7 @@ let in_current_context f c =
let (evmap,sign) = Pfedit.get_current_context () in
f (fst (Constrintern.interp_constr sign evmap c))(*FIXME*)
-(* We expand the result of preprocessing to be independent of camlp4
+(* We expand the result of preprocessing to be independent of camlp5
VERNAC COMMAND EXTEND PrintPureConstr
| [ "PrintPureConstr" constr(c) ] -> [ in_current_context print_pure_constr c ]
diff --git a/ide/minilib.ml b/ide/minilib.ml
index 2b278fac6..572222c06 100644
--- a/ide/minilib.ml
+++ b/ide/minilib.ml
@@ -20,7 +20,7 @@ type level = [
| `FATAL ]
(** Some excerpt of Util and similar files to avoid loading the whole
- module and its dependencies (and hence Compat and Camlp4) *)
+ module and its dependencies (and hence Compat and Camlp5) *)
let debug = ref false
diff --git a/ide/minilib.mli b/ide/minilib.mli
index c96e59b22..4f5fbe7db 100644
--- a/ide/minilib.mli
+++ b/ide/minilib.mli
@@ -7,7 +7,7 @@
(***********************************************************************)
(** Some excerpts of Util and similar files to avoid depending on them
- and hence on Compat and Camlp4 *)
+ and hence on Compat and Camlp5 *)
val print_list : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a list -> unit
diff --git a/lib/envars.ml b/lib/envars.ml
index 8ebf84057..9b66c1f71 100644
--- a/lib/envars.ml
+++ b/lib/envars.ml
@@ -155,23 +155,21 @@ let exe s = s ^ Coq_config.exec_extension
let ocamlfind () = Coq_config.ocamlfind
-(** {2 Camlp4 paths} *)
+(** {2 Camlp5 paths} *)
-let guess_camlp4bin () = which (user_path ()) (exe Coq_config.camlp4)
+let guess_camlp5bin () = which (user_path ()) (exe "camlp5")
-let camlp4bin () =
- if !Flags.boot then Coq_config.camlp4bin else
- try guess_camlp4bin ()
+let camlp5bin () =
+ if !Flags.boot then Coq_config.camlp5bin else
+ try guess_camlp5bin ()
with Not_found ->
- Coq_config.camlp4bin
+ Coq_config.camlp5bin
-let camlp4 () = camlp4bin () / exe Coq_config.camlp4
-
-let camlp4lib () =
+let camlp5lib () =
if !Flags.boot then
- Coq_config.camlp4lib
+ Coq_config.camlp5lib
else
- let ex, res = CUnix.run_command (ocamlfind () ^ " query " ^ Coq_config.camlp4) in
+ let ex, res = CUnix.run_command (ocamlfind () ^ " query camlp5") in
match ex with
| Unix.WEXITED 0 -> String.strip res
| _ -> "/dev/null"
@@ -206,11 +204,10 @@ let print_config ?(prefix_var_name="") f coq_src_subdirs =
fprintf f "%sCOQLIB=%s/\n" prefix_var_name (coqlib ());
fprintf f "%sDOCDIR=%s/\n" prefix_var_name (docdir ());
fprintf f "%sOCAMLFIND=%s\n" prefix_var_name (ocamlfind ());
- fprintf f "%sCAMLP4=%s\n" prefix_var_name Coq_config.camlp4;
- fprintf f "%sCAMLP4O=%s\n" prefix_var_name Coq_config.camlp4o;
- fprintf f "%sCAMLP4BIN=%s/\n" prefix_var_name (camlp4bin ());
- fprintf f "%sCAMLP4LIB=%s\n" prefix_var_name (camlp4lib ());
- fprintf f "%sCAMLP4OPTIONS=%s\n" prefix_var_name Coq_config.camlp4compat;
+ fprintf f "%sCAMLP5O=%s\n" prefix_var_name Coq_config.camlp5o;
+ fprintf f "%sCAMLP5BIN=%s/\n" prefix_var_name (camlp5bin ());
+ fprintf f "%sCAMLP5LIB=%s\n" prefix_var_name (camlp5lib ());
+ fprintf f "%sCAMLP5OPTIONS=%s\n" prefix_var_name Coq_config.camlp5compat;
fprintf f "%sCAMLFLAGS=%s\n" prefix_var_name Coq_config.caml_flags;
fprintf f "%sHASNATDYNLINK=%s\n" prefix_var_name
(if Coq_config.has_natdynlink then "true" else "false");
diff --git a/lib/envars.mli b/lib/envars.mli
index 09f2b4ca1..1ccd1feff 100644
--- a/lib/envars.mli
+++ b/lib/envars.mli
@@ -56,14 +56,11 @@ val coqpath : string list
(** [camlfind ()] is the path to the ocamlfind binary. *)
val ocamlfind : unit -> string
-(** [camlp4bin ()] is the path to the camlp4 binary. *)
-val camlp4bin : unit -> string
+(** [camlp5bin ()] is the path to the camlp5 binary. *)
+val camlp5bin : unit -> string
-(** [camlp4lib ()] is the path to the camlp4 library. *)
-val camlp4lib : unit -> string
-
-(** [camlp4 ()] is the camlp4 utility. *)
-val camlp4 : unit -> string
+(** [camlp5lib ()] is the path to the camlp5 library. *)
+val camlp5lib : unit -> string
(** Coq tries to honor the XDG Base Directory Specification to access
the user's configuration files.
diff --git a/parsing/egramcoq.ml b/parsing/egramcoq.ml
index 9c2766187..ea6266dd4 100644
--- a/parsing/egramcoq.ml
+++ b/parsing/egramcoq.ml
@@ -21,11 +21,11 @@ open Names
a reference to the current level (to be translated into "SELF" on the
left border and into "constr LEVEL n" elsewhere), to the level below
(to be translated into "NEXT") or to an below wrt associativity (to be
- translated in camlp4 into "constr" without level) or to another level
+ translated in camlp5 into "constr" without level) or to another level
(to be translated into "constr LEVEL n")
The boolean is true if the entry was existing _and_ empty; this to
- circumvent a weakness of camlp4/camlp5 whose undo mechanism is not the
+ circumvent a weakness of camlp5 whose undo mechanism is not the
converse of the extension mechanism *)
let constr_level = string_of_int
@@ -144,11 +144,11 @@ let find_position accu forpat assoc level =
(**************************************************************************)
(*
- * --- Note on the mapping of grammar productions to camlp4 actions ---
+ * --- Note on the mapping of grammar productions to camlp5 actions ---
*
* Translation of environments: a production
* [ nt1(x1) ... nti(xi) ] -> act(x1..xi)
- * is written (with camlp4 conventions):
+ * is written (with camlp5 conventions):
* (fun vi -> .... (fun v1 -> act(v1 .. vi) )..)
* where v1..vi are the values generated by non-terminals nt1..nti.
* Since the actions are executed by substituting an environment,
@@ -172,8 +172,8 @@ let find_position accu forpat assoc level =
(**********************************************************************)
(* Binding constr entry keys to entries *)
-(* Camlp4 levels do not treat NonA: use RightA with a NEXT on the left *)
-let camlp4_assoc = function
+(* Camlp5 levels do not treat NonA: use RightA with a NEXT on the left *)
+let camlp5_assoc = function
| Some NonA | Some RightA -> RightA
| None | Some LeftA -> LeftA
@@ -205,7 +205,7 @@ let adjust_level assoc from = function
(* If NonA on the left-hand side, adopt the current assoc ?? *)
| (NumLevel n,BorderProd (Left,Some NonA)) -> None
(* If the expected assoc is the current one, set to SELF *)
- | (NumLevel n,BorderProd (Left,Some a)) when assoc_eq a (camlp4_assoc assoc) ->
+ | (NumLevel n,BorderProd (Left,Some a)) when assoc_eq a (camlp5_assoc assoc) ->
None
(* Otherwise, force the level, n or n-1, according to expected assoc *)
| (NumLevel n,BorderProd (Left,Some a)) ->
diff --git a/parsing/egramcoq.mli b/parsing/egramcoq.mli
index 8e0469275..1e3869818 100644
--- a/parsing/egramcoq.mli
+++ b/parsing/egramcoq.mli
@@ -6,7 +6,7 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(** Mapping of grammar productions to camlp4 actions *)
+(** Mapping of grammar productions to camlp5 actions *)
(** This is the part specific to Coq-level Notation and Tactic Notation.
For the ML-level tactic and vernac extensions, see Egramml. *)
diff --git a/parsing/egramml.mli b/parsing/egramml.mli
index 7414773d3..74dd95a20 100644
--- a/parsing/egramml.mli
+++ b/parsing/egramml.mli
@@ -8,7 +8,7 @@
open Vernacexpr
-(** Mapping of grammar productions to camlp4 actions. *)
+(** Mapping of grammar productions to camlp5 actions. *)
(** This is the part specific to vernac extensions.
For the Coq-level Notation and Tactic Notation, see Egramcoq. *)
diff --git a/parsing/g_vernac.ml4 b/parsing/g_vernac.ml4
index 3244b0ff2..d42b5f622 100644
--- a/parsing/g_vernac.ml4
+++ b/parsing/g_vernac.ml4
@@ -17,7 +17,7 @@ open Vernacexpr
open Decl_kinds
open Declarations
open Misctypes
-open Tok (* necessary for camlp4 *)
+open Tok (* necessary for camlp5 *)
open Pcoq
open Pcoq.Prim
@@ -827,7 +827,7 @@ GEXTEND Gram
command:
[ [ IDENT "Comments"; l = LIST0 comment -> VernacComments l
- (* Hack! Should be in grammar_ext, but camlp4 factorize badly *)
+ (* Hack! Should be in grammar_ext, but camlp5 factorizes badly *)
| IDENT "Declare"; IDENT "Instance"; namesup = instance_name; ":";
expl = [ "!" -> Decl_kinds.Implicit | -> Decl_kinds.Explicit ] ; t = operconstr LEVEL "200";
info = hint_info ->
diff --git a/parsing/pcoq.ml b/parsing/pcoq.ml
index c934d38a2..54e7949ae 100644
--- a/parsing/pcoq.ml
+++ b/parsing/pcoq.ml
@@ -202,7 +202,7 @@ end = struct
end
-let camlp4_verbosity silent f x =
+let camlp5_verbosity silent f x =
let a = !warning_verbose in
warning_verbose := silent;
f x;
@@ -274,7 +274,7 @@ type ext_kind =
(** The list of extensions *)
-let camlp4_state = ref []
+let camlp5_state = ref []
(** Deletion *)
@@ -299,13 +299,13 @@ let grammar_delete e reinit (pos,rls) =
let grammar_extend e reinit ext =
let ext = of_coq_extend_statement ext in
let undo () = grammar_delete e reinit ext in
- let redo () = camlp4_verbosity false (uncurry (G.extend e)) ext in
- camlp4_state := ByEXTEND (undo, redo) :: !camlp4_state;
+ let redo () = camlp5_verbosity false (uncurry (G.extend e)) ext in
+ camlp5_state := ByEXTEND (undo, redo) :: !camlp5_state;
redo ()
let grammar_extend_sync e reinit ext =
- camlp4_state := ByGrammar (ExtendRule (e, reinit, ext)) :: !camlp4_state;
- camlp4_verbosity false (uncurry (G.extend e)) (of_coq_extend_statement ext)
+ camlp5_state := ByGrammar (ExtendRule (e, reinit, ext)) :: !camlp5_state;
+ camlp5_verbosity false (uncurry (G.extend e)) (of_coq_extend_statement ext)
(** The apparent parser of Coq; encapsulate G to keep track
of the extensions. *)
@@ -315,20 +315,20 @@ module Gram =
include G
let extend e =
curry
- (fun ext ->
- camlp4_state :=
- (ByEXTEND ((fun () -> grammar_delete e None ext),
- (fun () -> uncurry (G.extend e) ext)))
- :: !camlp4_state;
- uncurry (G.extend e) ext)
+ (fun ext ->
+ camlp5_state :=
+ (ByEXTEND ((fun () -> grammar_delete e None ext),
+ (fun () -> uncurry (G.extend e) ext)))
+ :: !camlp5_state;
+ uncurry (G.extend e) ext)
let delete_rule e pil =
(* spiwack: if you use load an ML module which contains GDELETE_RULE
- in a section, God kills a kitty. As it would corrupt remove_grammars.
+ in a section, God kills a kitty. As it would corrupt remove_grammars.
There does not seem to be a good way to undo a delete rule. As deleting
- takes fewer arguments than extending. The production rule isn't returned
- by delete_rule. If we could retrieve the necessary information, then
- ByEXTEND provides just the framework we need to allow this in section.
- I'm not entirely sure it makes sense, but at least it would be more correct.
+ takes fewer arguments than extending. The production rule isn't returned
+ by delete_rule. If we could retrieve the necessary information, then
+ ByEXTEND provides just the framework we need to allow this in section.
+ I'm not entirely sure it makes sense, but at least it would be more correct.
*)
G.delete_rule e pil
end
@@ -340,18 +340,18 @@ module Gram =
let rec remove_grammars n =
if n>0 then
- (match !camlp4_state with
+ (match !camlp5_state with
| [] -> anomaly ~label:"Pcoq.remove_grammars" (Pp.str "too many rules to remove.")
| ByGrammar (ExtendRule (g, reinit, ext)) :: t ->
grammar_delete g reinit (of_coq_extend_statement ext);
- camlp4_state := t;
+ camlp5_state := t;
remove_grammars (n-1)
| ByEXTEND (undo,redo)::t ->
undo();
- camlp4_state := t;
+ camlp5_state := t;
remove_grammars n;
redo();
- camlp4_state := ByEXTEND (undo,redo) :: !camlp4_state)
+ camlp5_state := ByEXTEND (undo,redo) :: !camlp5_state)
let make_rule r = [None, None, r]
diff --git a/parsing/pcoq.mli b/parsing/pcoq.mli
index 756d9487d..75378d2c6 100644
--- a/parsing/pcoq.mli
+++ b/parsing/pcoq.mli
@@ -124,7 +124,7 @@ end with type 'a Entry.e = 'a Grammar.GMake(CLexer).Entry.e
|
| Egrammar.make_constr_prod_item
V
- Gramext.g_symbol list which is sent to camlp4
+ Gramext.g_symbol list which is sent to camlp5
For user level tactic notations, dynamic addition of new rules is
also done in several steps:
@@ -161,9 +161,9 @@ end with type 'a Entry.e = 'a Grammar.GMake(CLexer).Entry.e
*)
-(** Temporarily activate camlp4 verbosity *)
+(** Temporarily activate camlp5 verbosity *)
-val camlp4_verbosity : bool -> ('a -> unit) -> 'a -> unit
+val camlp5_verbosity : bool -> ('a -> unit) -> 'a -> unit
(** Parse a string *)
diff --git a/parsing/tok.ml b/parsing/tok.ml
index 0917e8d6d..fafad2779 100644
--- a/parsing/tok.ml
+++ b/parsing/tok.ml
@@ -60,7 +60,7 @@ let match_keyword kwd = function
| KEYWORD kwd' when kwd = kwd' -> true
| _ -> false
-(* Needed to fix Camlp4 signature.
+(* Needed to fix Camlp5 signature.
Cannot use Pp because of silly Tox -> Compat -> Pp dependency *)
let print ppf tok = Format.pp_print_string ppf (to_string tok)
diff --git a/parsing/tok.mli b/parsing/tok.mli
index 59a79dcd2..162310e2a 100644
--- a/parsing/tok.mli
+++ b/parsing/tok.mli
@@ -22,7 +22,7 @@ type t =
val equal : t -> t -> bool
val extract_string : t -> string
val to_string : t -> string
-(* Needed to fit Camlp4 signature *)
+(* Needed to fit Camlp5 signature *)
val print : Format.formatter -> t -> unit
val match_keyword : string -> t -> bool
(** for camlp5 *)
diff --git a/plugins/btauto/g_btauto.ml4 b/plugins/btauto/g_btauto.ml4
index 23b91507c..896bb91f1 100644
--- a/plugins/btauto/g_btauto.ml4
+++ b/plugins/btauto/g_btauto.ml4
@@ -6,8 +6,6 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(*i camlp4deps: "grammar/grammar.cma" i*)
-
open Ltac_plugin
DECLARE PLUGIN "btauto_plugin"
diff --git a/plugins/cc/g_congruence.ml4 b/plugins/cc/g_congruence.ml4
index 6ed4672ce..0d677ac7a 100644
--- a/plugins/cc/g_congruence.ml4
+++ b/plugins/cc/g_congruence.ml4
@@ -6,8 +6,6 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(*i camlp4deps: "grammar/grammar.cma" i*)
-
open Ltac_plugin
open Cctac
open Stdarg
diff --git a/plugins/derive/g_derive.ml4 b/plugins/derive/g_derive.ml4
index df701ed80..72057cd9b 100644
--- a/plugins/derive/g_derive.ml4
+++ b/plugins/derive/g_derive.ml4
@@ -8,8 +8,6 @@
open Stdarg
-(*i camlp4deps: "grammar/grammar.cma" i*)
-
DECLARE PLUGIN "derive_plugin"
let classify_derive_command _ = Vernacexpr.(VtStartProof ("Classic",Doesn'tGuaranteeOpacity,[]),VtLater)
diff --git a/plugins/extraction/g_extraction.ml4 b/plugins/extraction/g_extraction.ml4
index 24c70bccf..4b6de58bd 100644
--- a/plugins/extraction/g_extraction.ml4
+++ b/plugins/extraction/g_extraction.ml4
@@ -6,8 +6,6 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(*i camlp4deps: "grammar/grammar.cma" i*)
-
open Pcoq.Prim
DECLARE PLUGIN "extraction_plugin"
diff --git a/plugins/firstorder/g_ground.ml4 b/plugins/firstorder/g_ground.ml4
index b81010c7b..3c6ab47e9 100644
--- a/plugins/firstorder/g_ground.ml4
+++ b/plugins/firstorder/g_ground.ml4
@@ -6,7 +6,6 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(*i camlp4deps: "grammar/grammar.cma" i*)
open Ltac_plugin
open Formula
diff --git a/plugins/fourier/g_fourier.ml4 b/plugins/fourier/g_fourier.ml4
index 682673e8d..16dd4c886 100644
--- a/plugins/fourier/g_fourier.ml4
+++ b/plugins/fourier/g_fourier.ml4
@@ -6,8 +6,6 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(*i camlp4deps: "grammar/grammar.cma" i*)
-
open Ltac_plugin
open FourierR
diff --git a/plugins/funind/g_indfun.ml4 b/plugins/funind/g_indfun.ml4
index 4b828a702..ac7a2f284 100644
--- a/plugins/funind/g_indfun.ml4
+++ b/plugins/funind/g_indfun.ml4
@@ -5,7 +5,6 @@
(* // * This file is distributed under the terms of the *)
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(*i camlp4deps: "grammar/grammar.cma" i*)
open Ltac_plugin
open Util
open Pp
diff --git a/plugins/ltac/coretactics.ml4 b/plugins/ltac/coretactics.ml4
index 2769802cf..7d2c4d082 100644
--- a/plugins/ltac/coretactics.ml4
+++ b/plugins/ltac/coretactics.ml4
@@ -6,8 +6,6 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(*i camlp4deps: "grammar/grammar.cma" i*)
-
open Util
open Locus
open Misctypes
diff --git a/plugins/ltac/extraargs.ml4 b/plugins/ltac/extraargs.ml4
index bb01aca55..4c6d3c2d3 100644
--- a/plugins/ltac/extraargs.ml4
+++ b/plugins/ltac/extraargs.ml4
@@ -6,8 +6,6 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(*i camlp4deps: "grammar/grammar.cma" i*)
-
open Pp
open Genarg
open Stdarg
diff --git a/plugins/ltac/extratactics.ml4 b/plugins/ltac/extratactics.ml4
index 3e3965b94..286f9d95d 100644
--- a/plugins/ltac/extratactics.ml4
+++ b/plugins/ltac/extratactics.ml4
@@ -6,8 +6,6 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(*i camlp4deps: "grammar/grammar.cma" i*)
-
open Pp
open Genarg
open Stdarg
diff --git a/plugins/ltac/g_auto.ml4 b/plugins/ltac/g_auto.ml4
index 90a44708f..f74d24db0 100644
--- a/plugins/ltac/g_auto.ml4
+++ b/plugins/ltac/g_auto.ml4
@@ -6,8 +6,6 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(*i camlp4deps: "grammar/grammar.cma" i*)
-
open Pp
open Genarg
open Stdarg
diff --git a/plugins/ltac/g_class.ml4 b/plugins/ltac/g_class.ml4
index ed2d9da63..014433ac4 100644
--- a/plugins/ltac/g_class.ml4
+++ b/plugins/ltac/g_class.ml4
@@ -6,8 +6,6 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(*i camlp4deps: "grammar/grammar.cma" i*)
-
open Class_tactics
open Stdarg
open Tacarg
diff --git a/plugins/ltac/g_eqdecide.ml4 b/plugins/ltac/g_eqdecide.ml4
index 549436902..f705778fc 100644
--- a/plugins/ltac/g_eqdecide.ml4
+++ b/plugins/ltac/g_eqdecide.ml4
@@ -12,8 +12,6 @@
(* by Eduardo Gimenez *)
(************************************************************************)
-(*i camlp4deps: "grammar/grammar.cma" i*)
-
open Eqdecide
DECLARE PLUGIN "ltac_plugin"
diff --git a/plugins/ltac/g_ltac.ml4 b/plugins/ltac/g_ltac.ml4
index cc7ce339b..9ef819569 100644
--- a/plugins/ltac/g_ltac.ml4
+++ b/plugins/ltac/g_ltac.ml4
@@ -6,8 +6,6 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(*i camlp4deps: "grammar/grammar.cma" i*)
-
DECLARE PLUGIN "ltac_plugin"
open Util
@@ -17,7 +15,7 @@ open Tacexpr
open Misctypes
open Genarg
open Genredexpr
-open Tok (* necessary for camlp4 *)
+open Tok (* necessary for camlp5 *)
open Names
open Pcoq
diff --git a/plugins/ltac/g_obligations.ml4 b/plugins/ltac/g_obligations.ml4
index f6cc3833a..e251b1049 100644
--- a/plugins/ltac/g_obligations.ml4
+++ b/plugins/ltac/g_obligations.ml4
@@ -6,11 +6,9 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(*i camlp4deps: "grammar/grammar.cma" i*)
-
(*
Syntax for the subtac terms and types.
- Elaborated from correctness/psyntax.ml4 by Jean-Christophe Filliâtre *)
+ Elaborated from correctness/psyntax.ml4 by Jean-Christophe Filliâtre *)
open Libnames
open Constrexpr
diff --git a/plugins/ltac/g_rewrite.ml4 b/plugins/ltac/g_rewrite.ml4
index ea1808a25..2459a09bc 100644
--- a/plugins/ltac/g_rewrite.ml4
+++ b/plugins/ltac/g_rewrite.ml4
@@ -6,8 +6,6 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(*i camlp4deps: "grammar/grammar.cma" i*)
-
(* Syntax for rewriting with strategies *)
open Names
diff --git a/plugins/ltac/profile_ltac_tactics.ml4 b/plugins/ltac/profile_ltac_tactics.ml4
index 9864ffeb6..7a75662be 100644
--- a/plugins/ltac/profile_ltac_tactics.ml4
+++ b/plugins/ltac/profile_ltac_tactics.ml4
@@ -6,8 +6,6 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(*i camlp4deps: "grammar/grammar.cma" i*)
-
(** Ltac profiling entrypoints *)
open Profile_ltac
diff --git a/plugins/micromega/g_micromega.ml4 b/plugins/micromega/g_micromega.ml4
index b15dd7ae6..9f1d83f96 100644
--- a/plugins/micromega/g_micromega.ml4
+++ b/plugins/micromega/g_micromega.ml4
@@ -14,8 +14,6 @@
(* *)
(************************************************************************)
-(*i camlp4deps: "grammar/grammar.cma" i*)
-
open Ltac_plugin
open Stdarg
open Tacarg
diff --git a/plugins/nsatz/g_nsatz.ml4 b/plugins/nsatz/g_nsatz.ml4
index 01c3d7940..272d4a20f 100644
--- a/plugins/nsatz/g_nsatz.ml4
+++ b/plugins/nsatz/g_nsatz.ml4
@@ -6,8 +6,6 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(*i camlp4deps: "grammar/grammar.cma" i*)
-
open Ltac_plugin
DECLARE PLUGIN "nsatz_plugin"
diff --git a/plugins/omega/g_omega.ml4 b/plugins/omega/g_omega.ml4
index 735af6bab..f7b153a13 100644
--- a/plugins/omega/g_omega.ml4
+++ b/plugins/omega/g_omega.ml4
@@ -13,8 +13,6 @@
(* *)
(**************************************************************************)
-(*i camlp4deps: "grammar/grammar.cma" i*)
-
DECLARE PLUGIN "omega_plugin"
diff --git a/plugins/quote/g_quote.ml4 b/plugins/quote/g_quote.ml4
index f7ebd3204..40897d62f 100644
--- a/plugins/quote/g_quote.ml4
+++ b/plugins/quote/g_quote.ml4
@@ -6,8 +6,6 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(*i camlp4deps: "grammar/grammar.cma" i*)
-
open Ltac_plugin
open Names
open Misctypes
diff --git a/plugins/romega/g_romega.ml4 b/plugins/romega/g_romega.ml4
index 5fd9c9419..5b77d08de 100644
--- a/plugins/romega/g_romega.ml4
+++ b/plugins/romega/g_romega.ml4
@@ -6,8 +6,6 @@
*************************************************************************)
-(*i camlp4deps: "grammar/grammar.cma" i*)
-
DECLARE PLUGIN "romega_plugin"
diff --git a/plugins/rtauto/g_rtauto.ml4 b/plugins/rtauto/g_rtauto.ml4
index bfa1e5f39..1bfcdc2fb 100644
--- a/plugins/rtauto/g_rtauto.ml4
+++ b/plugins/rtauto/g_rtauto.ml4
@@ -7,8 +7,6 @@
(************************************************************************)
-(*i camlp4deps: "grammar/grammar.cma" i*)
-
open Ltac_plugin
DECLARE PLUGIN "rtauto_plugin"
diff --git a/plugins/setoid_ring/g_newring.ml4 b/plugins/setoid_ring/g_newring.ml4
index a7d6d5bb2..b34d12952 100644
--- a/plugins/setoid_ring/g_newring.ml4
+++ b/plugins/setoid_ring/g_newring.ml4
@@ -6,8 +6,6 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(*i camlp4deps: "grammar/grammar.cma" i*)
-
open Ltac_plugin
open Pp
open Util
diff --git a/plugins/ssrmatching/ssrmatching.ml4 b/plugins/ssrmatching/ssrmatching.ml4
index d6dbad7a9..7d0584a00 100644
--- a/plugins/ssrmatching/ssrmatching.ml4
+++ b/plugins/ssrmatching/ssrmatching.ml4
@@ -12,9 +12,6 @@
* we thus save the lexer to restore it at the end of the file *)
let frozen_lexer = CLexer.get_keyword_state () ;;
-(*i camlp4use: "pa_extend.cmo" i*)
-(*i camlp4deps: "grammar/grammar.cma" i*)
-
open Ltac_plugin
open Names
open Pp
diff --git a/tools/CoqMakefile.in b/tools/CoqMakefile.in
index ca02c983d..88596eb3f 100644
--- a/tools/CoqMakefile.in
+++ b/tools/CoqMakefile.in
@@ -34,11 +34,10 @@ LOCAL := $(COQMF_LOCAL)
COQLIB := $(COQMF_COQLIB)
DOCDIR := $(COQMF_DOCDIR)
OCAMLFIND := $(COQMF_OCAMLFIND)
-CAMLP4 := $(COQMF_CAMLP4)
-CAMLP4O := $(COQMF_CAMLP4O)
-CAMLP4BIN := $(COQMF_CAMLP4BIN)
-CAMLP4LIB := $(COQMF_CAMLP4LIB)
-CAMLP4OPTIONS := $(COQMF_CAMLP4OPTIONS)
+CAMLP5O := $(COQMF_CAMLP5O)
+CAMLP5BIN := $(COQMF_CAMLP5BIN)
+CAMLP5LIB := $(COQMF_CAMLP5LIB)
+CAMLP5OPTIONS := $(COQMF_CAMLP5OPTIONS)
CAMLFLAGS := $(COQMF_CAMLFLAGS)
HASNATDYNLINK := $(COQMF_HASNATDYNLINK)
@@ -178,24 +177,20 @@ COQMAKEFILE_VERSION:=@COQ_VERSION@
COQSRCLIBS?= $(foreach d,$(COQ_SRC_SUBDIRS), -I "$(COQLIB)$(d)")
-CAMLFLAGS+=$(OCAMLLIBS) $(COQSRCLIBS) -I $(CAMLP4LIB)
+CAMLFLAGS+=$(OCAMLLIBS) $(COQSRCLIBS) -I $(CAMLP5LIB)
# ocamldoc fails with unknown argument otherwise
CAMLDOCFLAGS=$(filter-out -annot, $(filter-out -bin-annot, $(CAMLFLAGS)))
# FIXME This should be generated by Coq
GRAMMARS:=grammar.cma
-ifeq ($(CAMLP4),camlp5)
-CAMLP4EXTEND=pa_extend.cmo q_MLast.cmo pa_macro.cmo
-else
-CAMLP4EXTEND=
-endif
+CAMLP5EXTEND=pa_extend.cmo q_MLast.cmo pa_macro.cmo
CAMLLIB:=$(shell "$(OCAMLFIND)" printconf stdlib 2> /dev/null)
ifeq (,$(CAMLLIB))
PP=$(error "Cannot find the 'ocamlfind' binary used to build Coq ($(OCAMLFIND)). Pre-compiled binary packages of Coq do not support compiling plugins this way. Please download the sources of Coq and run the Windows build script.")
else
-PP:=-pp '$(CAMLP4O) -I $(CAMLLIB) -I "$(COQLIB)/grammar" $(CAMLP4EXTEND) $(GRAMMARS) $(CAMLP4OPTIONS) -impl'
+PP:=-pp '$(CAMLP5O) -I $(CAMLLIB) -I "$(COQLIB)/grammar" $(CAMLP5EXTEND) $(GRAMMARS) $(CAMLP5OPTIONS) -impl'
endif
ifneq (,$(TIMING))
@@ -739,11 +734,10 @@ printenv::
@echo 'COQLIB = $(COQLIB)'
@echo 'DOCDIR = $(DOCDIR)'
@echo 'OCAMLFIND = $(OCAMLFIND)'
- @echo 'CAMLP4 = $(CAMLP4)'
- @echo 'CAMLP4O = $(CAMLP4O)'
- @echo 'CAMLP4BIN = $(CAMLP4BIN)'
- @echo 'CAMLP4LIB = $(CAMLP4LIB)'
- @echo 'CAMLP4OPTIONS = $(CAMLP4OPTIONS)'
+ @echo 'CAMLP5O = $(CAMLP5O)'
+ @echo 'CAMLP5BIN = $(CAMLP5BIN)'
+ @echo 'CAMLP5LIB = $(CAMLP5LIB)'
+ @echo 'CAMLP5OPTIONS = $(CAMLP5OPTIONS)'
@echo 'HASNATDYNLINK = $(HASNATDYNLINK)'
@echo 'SRC_SUBDIRS = $(SRC_SUBDIRS)'
@echo 'COQ_SRC_SUBDIRS = $(COQ_SRC_SUBDIRS)'
diff --git a/vernac/metasyntax.ml b/vernac/metasyntax.ml
index 1bb9e0da1..3be357598 100644
--- a/vernac/metasyntax.ml
+++ b/vernac/metasyntax.ml
@@ -606,8 +606,8 @@ let distribute a ll = List.map (fun l -> a @ l) ll
t;sep;t;...;t;sep;t;...;t;sep;t;LIST1(t,sep) *)
let expand_list_rule typ tkl x n p ll =
- let camlp4_message_name = Some (add_suffix x ("_"^string_of_int n)) in
- let main = GramConstrNonTerminal (ETConstr typ, camlp4_message_name) in
+ let camlp5_message_name = Some (add_suffix x ("_"^string_of_int n)) in
+ let main = GramConstrNonTerminal (ETConstr typ, camlp5_message_name) in
let tks = List.map (fun x -> GramConstrTerminal x) tkl in
let rec aux i hds ll =
if i < p then aux (i+1) (main :: tks @ hds) ll
diff --git a/vernac/metasyntax.mli b/vernac/metasyntax.mli
index b3049f1b7..e064b570e 100644
--- a/vernac/metasyntax.mli
+++ b/vernac/metasyntax.mli
@@ -51,7 +51,7 @@ val add_syntax_extension :
val add_syntactic_definition : env -> Id.t -> Id.t list * constr_expr ->
bool -> Flags.compat_version option -> unit
-(** Print the Camlp4 state of a grammar *)
+(** Print the Camlp5 state of a grammar *)
val pr_grammar : string -> Pp.t