Commit c1c4849e authored by POTTIER Francois's avatar POTTIER Francois

Documented --suggest-menhirLib.

parent 0f8c62f1
2015/10/29:
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).
2015/10/27: 2015/10/27:
Fix the Makefile in an attempt to allow installation under opam/Windows. Fix the Makefile in an attempt to allow installation under opam/Windows.
Thanks to Daniel Weil for his patient explanations. 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? * Develop an alternate src/Makefile that does not require ocamlbuild?
Could use OCamlMakefile instead, for instance. Could use OCamlMakefile instead, for instance.
......
...@@ -131,6 +131,7 @@ ...@@ -131,6 +131,7 @@
\newcommand{\osuggestcomp}{\texttt{-{}-suggest-comp-flags}\xspace} \newcommand{\osuggestcomp}{\texttt{-{}-suggest-comp-flags}\xspace}
\newcommand{\osuggestlinkb}{\texttt{-{}-suggest-link-flags-byte}\xspace} \newcommand{\osuggestlinkb}{\texttt{-{}-suggest-link-flags-byte}\xspace}
\newcommand{\osuggestlinko}{\texttt{-{}-suggest-link-flags-opt}\xspace} \newcommand{\osuggestlinko}{\texttt{-{}-suggest-link-flags-opt}\xspace}
\newcommand{\osuggestmenhirlib}{\texttt{-{}-suggest-menhirLib}\xspace}
\newcommand{\otable}{\texttt{-{}-table}\xspace} \newcommand{\otable}{\texttt{-{}-table}\xspace}
\newcommand{\otimings}{\texttt{-{}-timings}\xspace} \newcommand{\otimings}{\texttt{-{}-timings}\xspace}
\newcommand{\otrace}{\texttt{-{}-trace}\xspace} \newcommand{\otrace}{\texttt{-{}-trace}\xspace}
......
...@@ -313,6 +313,11 @@ issued; otherwise, the object file \texttt{menhirLib.cmx} is named. ...@@ -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 file \distrib{demos/obsolete/Makefile.shared} shows how to exploit
% the \texttt{--suggest-*} switches. % 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 \docswitch{\ostdlib \nt{directory}} This switch controls the directory
where the standard library is found. It allows overriding the default where the standard library is found. It allows overriding the default
directory that is set at installation time. The trailing \texttt{/} character directory that is set at installation time. The trailing \texttt{/} character
...@@ -3350,6 +3355,14 @@ deep. ...@@ -3350,6 +3355,14 @@ deep.
% Intentionally do not call this "list", because people may copy-paste this % Intentionally do not call this "list", because people may copy-paste this
% definition, and will end up unintentionally redefining the meaning of *. % 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} \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