Attention une mise à jour du service Gitlab va être effectuée le mardi 30 novembre entre 17h30 et 18h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes. Cette mise à jour intermédiaire en version 14.0.12 nous permettra de rapidement pouvoir mettre à votre disposition une version plus récente.

Commit 4cd3366a authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Merge branch 'master' of gitlab.inria.fr:fpottier/menhir

parents 7da74189 9d1daf04
# Changes
## 2017/06/07
* Removed an undeclared dependency of MenhirSdk on Unix. (Reported and fixed
by Frédéric Bour.)
## 2017/05/09
* Menhir now always places OCaml line number directives in the generated `.ml`
......
......@@ -123,6 +123,7 @@ package: clean
@ mkdir -p $(PACKAGE)/src
@ cp -fr $(DISTRIBUTED_FILES) $(PACKAGE)
@ cp -fr src/*.ml{,i,y,l,pack} src/*.messages src/Makefile src/*.META $(PACKAGE)/src
@ rm -f $(PACKAGE)/src/installation.ml
@ grep -v my_warnings src/_tags > $(PACKAGE)/src/_tags
@ $(MAKE) -C $(PACKAGE)/demos clean
# Set the version number into the files that mention it. These
......@@ -158,14 +159,16 @@ check:
# so that is what we do. For this reason, we must check first that
# ocamlfind does not already have some version of menhirLib.
@ if ocamlfind query menhirLib >/dev/null 2>/dev/null ; then \
echo "Error: menhirLib is already installed." ; \
echo "Please remove it first by running this command:" ; \
if opam list -i menhir >/dev/null ; then \
echo " opam remove menhir" ; \
echo "Warning: menhir is already installed." ; \
read -p "Can I remove it [Enter/^C]?" -n 1 -r ; \
opam remove menhir ; \
else \
echo " ocamlfind remove menhirLib" ; \
echo "Warning: menhirLib is already installed." ; \
read -p "Can I remove it [Enter/^C]?" -n 1 -r ; \
ocamlfind remove menhirLib ; \
ocamlfind remove menhirSdk || true ; \
fi ; \
exit 1 ; \
fi
@ TEMPDIR=`mktemp -d /tmp/menhir-test.XXXXXX` && { \
echo " * Extracting. " && \
......
......@@ -3,6 +3,8 @@
# This script rebuilds Menhir and MenhirLib from scratch, so as to make sure
# that we are testing the current development version.
# Maybe we should just remove this script and use "opam pin" instead.
. ./config.sh
# Removing $BUILD ensures that Menhir is rebuilt from scratch, but this is
......@@ -11,15 +13,16 @@
# Recompile.
rm -f $SRC/installation.ml
echo "Building Menhir and MenhirLib..."
if ! make -C $SRC >/dev/null ; then
echo "Building Menhir, MenhirLib, MenhirSdk..."
if ! make -C $SRC stage1 sdk >/dev/null ; then
echo "Could not build Menhir. Stop."
exit 1
fi
# Re-install MenhirLib.
echo "Removing old MenhirLib..."
ocamlfind remove menhirLib
# Re-install MenhirLib and MenhirSdk.
echo "Removing old MenhirLib and MenhirSdk..."
ocamlfind remove menhirLib || true
ocamlfind remove menhirSdk || true
echo "Installing new MenhirLib..."
cp -f $SRC/menhirLib.META $SRC/META
trap "{ rm -f $SRC/META ; }" EXIT
......@@ -29,3 +32,11 @@ if ! ocamlfind install menhirLib \
echo "Could not install MenhirLib. Stop."
exit 1
fi
echo "Installing new MenhirSdk..."
cp -f $SRC/menhirSdk.META $SRC/META
if ! ocamlfind install menhirSdk \
$SRC/META $SDKDIR/menhirSdk.cmi $SDKDIR/menhirSdk.cmo \
$SDKDIR/menhirSdk.cmx $SDKDIR/menhirSdk.o; then
echo "Could not install MenhirSdk. Stop."
exit 1
fi
......@@ -8,6 +8,7 @@ else
fi
BUILD=$SRC/_stage1
SDKDIR=$SRC/_sdk
MENHIR=$BUILD/menhir.native
......
(******************************************************************************)
(* *)
(* Menhir *)
(* *)
(* François Pottier, Inria Paris *)
(* Yann Régis-Gianas, PPS, Université Paris Diderot *)
(* *)
(* Copyright Inria. All rights reserved. This file is distributed under the *)
(* terms of the GNU General Public License version 2, as described in the *)
(* file LICENSE. *)
(* *)
(******************************************************************************)
(* tableBackend.ml *)
(* Encodings of entries in the enabled reductions bitmap. *)
......
......@@ -37,9 +37,13 @@ let read (ic : in_channel) : grammar =
let read (filename : string) : grammar =
let ic = open_in_bin filename in
IO.try_finally
(fun () -> read ic)
(fun () -> close_in_noerr ic)
match read ic with
| x ->
close_in_noerr ic;
x
| exception exn ->
close_in_noerr ic;
raise exn
(* ------------------------------------------------------------------------ *)
......
(******************************************************************************)
(* *)
(* Menhir *)
(* *)
(* François Pottier, Inria Paris *)
(* Yann Régis-Gianas, PPS, Université Paris Diderot *)
(* *)
(* Copyright Inria. All rights reserved. This file is distributed under the *)
(* terms of the GNU General Public License version 2, as described in the *)
(* file LICENSE. *)
(* *)
(******************************************************************************)
open Grammar
module C = Conflict (* artificial dependency; ensures that [Conflict] runs first *)
......
(******************************************************************************)
(* *)
(* Menhir *)
(* *)
(* François Pottier, Inria Paris *)
(* Yann Régis-Gianas, PPS, Université Paris Diderot *)
(* *)
(* Copyright Inria. All rights reserved. This file is distributed under the *)
(* terms of the GNU General Public License version 2, as described in the *)
(* file LICENSE. *)
(* *)
(******************************************************************************)
open Grammar
(* [has_default_reduction s] tells whether state [s] has a default reduction,
......
# This is the list of modules that must go into MenhirSdk.
Keyword
IO
Version
Cmly_format
Cmly_api
......
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