Maj terminée. Pour consulter la release notes associée voici le lien :
https://about.gitlab.com/releases/2021/07/07/critical-security-release-gitlab-14-0-4-released/

Commit 1fdf7526 authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Moved obsolete Makefiles to demos/obsolete/.

Documentation update.
parent 9427a73d
2015/02/09:
Moved all of the demos to ocamlbuild (instead of make).
2015/01/18: 2015/01/18:
Incompatible change of the incremental API. Incompatible change of the incremental API.
The incremental API now exposes shift events too. The incremental API now exposes shift events too.
......
...@@ -35,10 +35,6 @@ ...@@ -35,10 +35,6 @@
between 4.01.0 and 4.02.1. Use the tag last309 for this purpose, between 4.01.0 and 4.02.1. Use the tag last309 for this purpose,
or the master branch. or the master branch.
* Is it possible to update calc-two and calc-param to use ocamlbuild?
(they need --external-tokens and --only-tokens)
Then, one could remove Makefile.shared and ocamldep.wrapper.
* Suite des patchs de Frédéric Bour. * Suite des patchs de Frédéric Bour.
API d'inspection complète. API d'inspection complète.
Exposer le nombre d'états (pour la mémoisation) et une conversion état -> entier. Exposer le nombre d'états (pour la mémoisation) et une conversion état -> entier.
...@@ -195,7 +191,7 @@ ...@@ -195,7 +191,7 @@
* expliquer aussi les conflits end-of-stream * expliquer aussi les conflits end-of-stream
* Documenter l'emploi d'ocamlbuild et décourager make/omake. * Documenter l'emploi d'ocamlbuild.
* Lorsqu'on crée un pseudo-lexème pour utiliser dans les * Lorsqu'on crée un pseudo-lexème pour utiliser dans les
directives %prec, la question de savoir s'il est associatif directives %prec, la question de savoir s'il est associatif
......
# This is the old Makefile, based on Makefile.shared. # This is the old version of calc-two/Makefile, based on Makefile.shared.
# Superseded by the new Makefile, based on ocamlbuild. # It has been superseded by the calc-two/Makefile, based on ocamlbuild.
# Find Menhir. # Find Menhir.
ifndef MENHIR ifndef MENHIR
......
...@@ -122,8 +122,9 @@ to be textually included within a \Makefile. It is important to note that ...@@ -122,8 +122,9 @@ to be textually included within a \Makefile. It is important to note that
\texttt{.cm[iox]} prerequisites. This is because, when the \oinfer switch \texttt{.cm[iox]} prerequisites. This is because, when the \oinfer switch
is used, \menhir infers types by invoking \ocamlc, and \ocamlc itself requires is used, \menhir infers types by invoking \ocamlc, and \ocamlc itself requires
the \ocaml modules that the grammar specification depends upon to have been the \ocaml modules that the grammar specification depends upon to have been
compiled first. The file \distrib{demos/Makefile.shared} helps exploit the compiled first.
\odepend switch. % The file \distrib{demos/obsolete/Makefile.shared} exploits the \odepend switch.
An end user who uses \ocamlbuild does not need this switch.
When in \odepend mode, \menhir computes dependencies by invoking \ocamldep. When in \odepend mode, \menhir computes dependencies by invoking \ocamldep.
The command that is used to run \ocamldep is controlled by the \oocamldep The command that is used to run \ocamldep is controlled by the \oocamldep
...@@ -163,10 +164,10 @@ especially when advanced features such as \menhir's standard library or ...@@ -163,10 +164,10 @@ especially when advanced features such as \menhir's standard library or
\dinline keyword are exploited. One downside of \oinfer is that the \ocaml \dinline keyword are exploited. One downside of \oinfer is that the \ocaml
compiler usually needs to consult a few \texttt{.cm[iox]} files. This means compiler usually needs to consult a few \texttt{.cm[iox]} files. This means
that these files must have been created first, requiring \Makefile changes and that these files must have been created first, requiring \Makefile changes and
use of the \odepend switch. The file \distrib{demos/Makefile.shared} suggests use of the \odepend switch. The file \distrib{demos/obsolete/Makefile.shared} suggests
how to deal with this difficulty. A better option is to avoid \make altogether how to deal with this difficulty. A better option is to avoid \make altogether
and use \ocamlbuild, which has built-in knowledge of \menhir. Using and use \ocamlbuild, which has built-in knowledge of \menhir. Using
\ocamlbuild is also \textbf{strongly recommended}! \ocamlbuild is \textbf{strongly recommended}!
% There is a slight catch with \oinfer. The types inferred by \ocamlc are valid % There is a slight catch with \oinfer. The types inferred by \ocamlc are valid
% in the toplevel context, but can change meaning when inserted into a local % in the toplevel context, but can change meaning when inserted into a local
...@@ -228,8 +229,11 @@ a single set of tokens is to be shared between several parsers. The directory ...@@ -228,8 +229,11 @@ a single set of tokens is to be shared between several parsers. The directory
\docswitch{\orawdepend} This switch is analogous to \odepend, except that \docswitch{\orawdepend} This switch is analogous to \odepend, except that
\ocamldep's output is not postprocessed by \menhir; it is echoed without \ocamldep's output is not postprocessed by \menhir; it is echoed without
change. This switch is \emph{not} suitable for direct use with \make; it is change. This switch is not suitable for direct use with \make; it is
intended for use with \omake, which performs its own postprocessing. intended for use with \omake or \ocamlbuild, which perform their own
postprocessing.
An end user who uses \ocamlbuild does not need to mention this switch:
\ocamlbuild uses it automatically.
\docswitch{\ostrict} This switch causes several warnings about the grammar \docswitch{\ostrict} This switch causes several warnings about the grammar
and about the automaton to be considered errors. This includes warnings about and about the automaton to be considered errors. This includes warnings about
...@@ -245,9 +249,9 @@ parser generated by \menhir. What are these flags? In the absence of the ...@@ -245,9 +249,9 @@ parser generated by \menhir. What are these flags? In the absence of the
\otable switch, they are empty. When \otable is set, these flags ensure that \otable switch, they are empty. When \otable is set, these flags ensure that
\menhirlib is visible to the \ocaml compiler. If the support library \menhirlib is visible to the \ocaml compiler. If the support library
\menhirlib was installed via \ocamlfind, a \texttt{-package} directive is \menhirlib was installed via \ocamlfind, a \texttt{-package} directive is
issued; otherwise, a \texttt{-I} directive is used. The file issued; otherwise, a \texttt{-I} directive is used.
\distrib{demos/Makefile.shared} shows how to exploit the \texttt{--suggest-*} % The file \distrib{demos/obsolete/Makefile.shared} shows how to exploit
switches. % the \texttt{--suggest-*} switches.
\docswitch{\osuggestlinkb} This switch causes \menhir to print a set of \docswitch{\osuggestlinkb} This switch causes \menhir to print a set of
suggested link flags, and exit. These flags are intended to be passed to suggested link flags, and exit. These flags are intended to be passed to
...@@ -255,9 +259,9 @@ suggested link flags, and exit. These flags are intended to be passed to ...@@ -255,9 +259,9 @@ suggested link flags, and exit. These flags are intended to be passed to
the absence of the \otable switch, they are empty. When \otable is set, these the absence of the \otable switch, they are empty. When \otable is set, these
flags ensure that \menhirlib is linked in. If the support library \menhirlib flags ensure that \menhirlib is linked in. If the support library \menhirlib
was installed via \ocamlfind, a \texttt{-linkpkg} directive is issued; was installed via \ocamlfind, a \texttt{-linkpkg} directive is issued;
otherwise, the object file \texttt{menhirLib.cmo} is named. The file otherwise, the object file \texttt{menhirLib.cmo} is named.
\distrib{demos/Makefile.shared} shows how to exploit the \texttt{--suggest-*} % The file \distrib{demos/obsolete/Makefile.shared} shows how to exploit
switches. % the \texttt{--suggest-*} switches.
\docswitch{\osuggestlinko} This switch causes \menhir to print a set of \docswitch{\osuggestlinko} This switch causes \menhir to print a set of
suggested link flags, and exit. These flags are intended to be passed to suggested link flags, and exit. These flags are intended to be passed to
...@@ -265,9 +269,9 @@ suggested link flags, and exit. These flags are intended to be passed to ...@@ -265,9 +269,9 @@ suggested link flags, and exit. These flags are intended to be passed to
flags? In the absence of the \otable switch, they are empty. When \otable is flags? In the absence of the \otable switch, they are empty. When \otable is
set, these flags ensure that \menhirlib is linked in. If the support library set, these flags ensure that \menhirlib is linked in. If the support library
\menhirlib was installed via \ocamlfind, a \texttt{-linkpkg} directive is \menhirlib was installed via \ocamlfind, a \texttt{-linkpkg} directive is
issued; otherwise, the object file \texttt{menhirLib.cmx} is named. The file issued; otherwise, the object file \texttt{menhirLib.cmx} is named.
\distrib{demos/Makefile.shared} shows how to exploit the \texttt{--suggest-*} % The file \distrib{demos/obsolete/Makefile.shared} shows how to exploit
switches. % the \texttt{--suggest-*} switches.
\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
...@@ -2243,14 +2247,16 @@ scientific) benchmark suggests that the parsers produced by \ocamlyacc and ...@@ -2243,14 +2247,16 @@ scientific) benchmark suggests that the parsers produced by \ocamlyacc and
\texttt{menhir} are between 2 and 5 times faster. This benchmark excludes the \texttt{menhir} are between 2 and 5 times faster. This benchmark excludes the
time spent in the lexer and in the semantic actions. time spent in the lexer and in the semantic actions.
\question{Turning on \oinfer broke my \Makefile! What should I do?} \question{How do I write \Makefile rules for Menhir?}
Look at \distrib{demos/Makefile.shared}. It is meant to be re-used This can be quite difficult, especially when \oinfer is used.
without change. If it does not suit your needs, you can copy parts Look at \distrib{demos/obsolete/Makefile.shared} or (better) use \ocamlbuild,
of it into your own \Makefile, or submit suggestions for improvement. which has built-in compilation rules for \ocaml and \menhir.
% TEMPORARY document the use of \ocamlbuild (and point to the demos)
\question{I am unable to write a correct \Makefile for \menhir, and so are % basic scenario: ocamlbuild -use-menhir
you.} True enough. Have a look at \ocamlbuild. It has built-in compilation % what to add for the table back-end? (--table and -package menhirLib)
rules for \ocaml and \menhir. That should help. % or use the --suggest options?
% advanced scenario: multi-module, use .mlypack
% advanced scenario: --only-tokens and -external-tokens, use .mlypack + _tags + myocamlbuild.ml
\question{\menhir reports \emph{more} shift/reduce conflicts than \question{\menhir reports \emph{more} shift/reduce conflicts than
\ocamlyacc! How come?} \ocamlyacc sometimes merges two states \ocamlyacc! How come?} \ocamlyacc sometimes merges two states
......
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