Commit af031eb9 authored by POTTIER Francois's avatar POTTIER Francois

Remove find-menhir.sh. The demos now assume that Menhir is installed,

and use the installed version of Menhir.
parent d9513ff7
......@@ -12,8 +12,6 @@
the interaction with parameterized symbols and with %inline.)
See also de Souza Amorim, Steindorfer & Visser.
* Update the dune demos to work with a recent dune.
* Work of Frédéric on concrete syntax trees.
- Produce a definition of the specific type of CSTs for this grammar.
(Before expansion.)
......@@ -149,10 +147,6 @@
* Add demos/calc-coq to show how the Coq back-end is used.
* Simplify the demos by assuming that Menhir is already installed.
Remove find-menhir.sh.
Update [make check].
* allow the user to choose the type of "source code intervals" that are stored
in the stack (instead of imposing a pair of locations, $startpos and $endpos)
and to choose how intervals are combined. See Frédéric's branch:
......
# These demos assume that Menhir has been installed and is available
# under the name "menhir". This can be overridden by setting MENHIR.
# The following demos require menhirLib:
# calc-incremental
# calc-inspection
# The following demos require menhirSdk:
# The following demos require menhirSdk and OCaml >= 4.03:
# generate-printers
# The demos whose name ends in -dune require dune 1.4.
......
.PHONY: all clean test
# Find Menhir.
ifndef MENHIR
MENHIR := $(shell ../find-menhir.sh)
endif
MENHIR := menhir
MENHIRFLAGS := --infer
......@@ -21,4 +18,3 @@ clean:
test: all
@echo "The following command should print 42:"
echo "(1 + 2 * 10) * 2" | ./$(MAIN).native
.PHONY: all clean test
# Find Menhir.
ifndef MENHIR
MENHIR := $(shell ../find-menhir.sh)
endif
MENHIR := menhir
# We use the table back-end, and link against menhirLib.
# We assume that menhirLib has been installed in such a
......@@ -26,4 +23,3 @@ clean:
test: all
@echo "The following command should print 42:"
echo "(1 + 2 * 10) * 2" | ./$(MAIN).native
.PHONY: all clean test
# Find Menhir.
ifndef MENHIR
MENHIR := $(shell ../find-menhir.sh)
endif
MENHIR := menhir
# We use the table back-end, and link against menhirLib.
# We assume that menhirLib has been installed in such a
......
.PHONY: all clean test
# Find Menhir.
ifndef MENHIR
MENHIR := $(shell ../find-menhir.sh)
endif
MENHIR := menhir
MENHIRFLAGS := --infer
......@@ -21,4 +18,3 @@ clean:
test: all
@echo "The following command should print 42.0:"
echo "(1 + 2 * 10) * 2" | ./$(MAIN).native
.PHONY: all clean test
# Find Menhir.
ifndef MENHIR
MENHIR := $(shell ../find-menhir.sh)
endif
MENHIR := menhir
MENHIRFLAGS := --infer
......
.PHONY: all clean test
# Find Menhir.
ifndef MENHIR
MENHIR := $(shell ../find-menhir.sh)
endif
MENHIR := menhir
MENHIRFLAGS := --infer
......@@ -21,4 +18,3 @@ clean:
test: all
@echo "The following command should print 42:"
echo "(1 + 2 * 10) * 2" | ./$(MAIN).native
#!/bin/bash
# This script tries to find the Menhir executable.
# This is useful because we would like the demos
# to work regardless of whether Menhir has been
# installed already.
# A normal user does not need this script. One can
# assume that Menhir has been installed.
# First attempt: find Menhir in the src directory
# of the Menhir distribution.
# This loop assumes that we are somewhere within
# the Menhir distribution, so by going up, we will
# end up at the root of the distribution.
attempts=2
while [ $attempts -gt 0 ] && ! [ -d src ] ; do
let attempts=attempts-1
cd ..
done
LOCAL=src/_stage1/menhir.native
if ls $LOCAL >/dev/null 2>/dev/null ; then
echo `pwd`/$LOCAL
exit 0
fi
# Second attempt: find Menhir in the PATH.
if which menhir >/dev/null ; then
echo menhir
exit 0
fi
echo Error: could not find Menhir.
exit 1
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