Commit c1c4849e by POTTIER Francois

Documented --suggest-menhirLib.

parent 0f8c62f1
MenhirLib is now installed in both binary and source forms.
"menhir --suggest-menhirLib" reports where MenhirLib is installed.
This can be used to retrieve a snapshot of MenhirLib in source form
and include it in your project (if you wish to use --table mode, yet
do not wish to have a dependency on MenhirLib).
Fix the Makefile in an attempt to allow installation under opam/Windows.
Thanks to Daniel Weil for his patient explanations.
* Gabriel veut pouvoir inclure MenhirLib dans le parser engendré
* Develop an alternate src/Makefile that does not require ocamlbuild?
Could use OCamlMakefile instead, for instance.
......@@ -131,6 +131,7 @@
......@@ -313,6 +313,11 @@ issued; otherwise, the object file \texttt{menhirLib.cmx} is named.
% The file \distrib{demos/obsolete/Makefile.shared} shows how to exploit
% the \texttt{--suggest-*} switches.
\docswitch{\osuggestmenhirlib} This switch causes \menhir to print (the
absolute path of) the directory where \menhirlib was installed. If \menhirlib
was installed via \ocamlfind, this is equivalent to calling \texttt{ocamlfind
query menhirLib}.
\docswitch{\ostdlib \nt{directory}} This switch controls the directory
where the standard library is found. It allows overriding the default
directory that is set at installation time. The trailing \texttt{/} character
......@@ -3350,6 +3355,14 @@ deep.
% Intentionally do not call this "list", because people may copy-paste this
% definition, and will end up unintentionally redefining the meaning of *.
\question{Can I ship a generated parser while avoiding a dependency on \menhirlib?}
Yes. One option is to use the code-based back-end (that is, to not
use \otable). In this case, the generated parser is self-contained. Another
option is to use the table-based back-end (that is, use \otable) and include a
copy of the files \verb+menhirLib.{ml,mli}+ together with the generated
parser. The command \texttt{menhir \osuggestmenhirlib} will tell you where to
find these source files.
% ---------------------------------------------------------------------------------------------------------------------
\section{Technical background}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment