Commit 7ea0b7db authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Manual: improved explanations regarding the use of dune.

parent a72952fe
......@@ -4493,26 +4493,43 @@ simplest scenario, where the parser resides in a single source
file \texttt{parser.mly}, the \texttt{dune-project} file should contain a
``stanza'' along the following lines:
\begin{verbatim}
(menhir (
(modules (parser))
(flags ("--explain" "--dump"))
(menhir
(modules parser)
(flags --explain --dump)
(infer true)
))
)
\end{verbatim}
%
Ordinary command line switches, like \oexplain and \odump, are passed as part
of the \texttt{flags} line, as done above.
%
The \oinfer switch has special status and should not be used directly;
instead, write \texttt{(infer true)} or \texttt{(infer false)}, as done above.
(The default is \texttt{true}.) Ordinary command line switches, like \oexplain
and \odump, are passed as part of the \texttt{flags} line, as done above.
(The default is \texttt{true}.)
%
The \otable switch can also be listed as part of the \texttt{flags} line; if
you do so, then you must add \texttt{menhirLib} to the list of libraries that
your code requires, as in the following example:
%
\begin{verbatim}
(executable
(name myexecutable)
(libraries menhirLib)
)
\end{verbatim}
%
The directory \distrib{demos/calc}
The directory \distrib{demos}
% (and others like it)
offers an example.
offers several examples.
%
For more details, see
\href{https://jbuilder.readthedocs.io/en/latest/menhir.html}{\dune's documentation}.
\href
% {https://dune.readthedocs.io/en/stable/}
{https://dune.readthedocs.io/en/stable/dune-files.html#menhir}
{\dune's documentation}.
%
To deal with \messages files (\sref{sec:errors:new}),
use and adapt the rules found in the file \distrib{src/stage2/dune}.
please use and adapt the rules found in the file \distrib{src/stage2/dune}.
% It may be necessary to specify which version of the Menhir build rules
% one wishes to use. This is done by writing, e.g.
......
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