Commit 8878c4dd authored by POTTIER Francois's avatar POTTIER Francois
Browse files
parents 83a57666 7485c9f3
2015/11/02:
2015/11/03:
Fix-fix-and-re-fix the Makefile in an attempt to allow installation under
opam/Windows. Thanks to Daniel Weil for his patient explanations.
opam/Windows. Thanks to Daniel Weil for patient explanations and testing.
2015/10/29:
MenhirLib is now installed in both binary and source forms.
......
......@@ -192,7 +192,7 @@ export: api
cd $(PAGE) && \
$(SED) --in-place=.bak "s/menhir-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/$(PACKAGE)/" menhir.xml && \
cvs commit -m "Updated Menhir's version number." && \
if hash cduce ; then $(MAKE) export ; fi
if [ -x /opt/godi/bin/cduce ] ; then $(MAKE) export ; fi
# -------------------------------------------------------------------------
......
......@@ -51,7 +51,7 @@ MLYLIB := src/standard.mly
# If the compiler is MSVC, then the name of the executable file ends in .exe,
# and object file names end in .obj instead of .o.
ifeq "$(shell ocamlc -config | grep ccomp_type)" "ccomp_type: msvc"
ifneq (,$(shell ocamlc -config | grep -E "ccomp_type: msvc"))
MENHIREXE := menhir.exe
OBJ := obj
# LIBSUFFIX := lib
......@@ -76,7 +76,7 @@ endif
# performed if "os_type" is "Win32" or "Win64", and must not be performed if
# "os_type" is "Cygwin" or "Unix".
ifneq (,$(findstring "os_type: Win", "$(shell ocamlc -config | grep os_type)"))
ifneq (,$(shell ocamlc -config | grep -E "os_type: (Win32|Win64)"))
installation_libdir := $(shell cygpath -m $(libdir))
else
installation_libdir := $(libdir)
......
......@@ -52,6 +52,13 @@
à savoir éliminer toutes les autres actions. Que fait
ocamlyacc?
* Améliorer la compatibilité avec ocamlyacc sur les positions.
Deux aspects indépendants:
- le calcul de $endpos pour une production epsilon doit se
faire en consultant la pile, et non pas le prochain token;
- on peut offrir un $symbolstartpos(i) qui calcule de la même
manière que Parsing.symbol_start_pos.
* autoriser %token FOO "foo"
pour pouvoir afficher les tokens sous forme plus lisible
et auto-générer une fonction (ou une table) print_terminal
......
......@@ -12,7 +12,7 @@
# Build the parser with the code back-end and run it.
echo "Building and running (code)..."
make -C $CALC MENHIR="$MENHIR --trace" clean >/dev/null
make -C $CALC MENHIR="$MENHIR --trace" >/dev/null
make -C $CALC MENHIR="$MENHIR --trace" >/dev/null || exit 1
for f in $DATA/*.real.in ; do
b=${f%.in}
$CALC/calc < $f > $b.code.out 2> $b.code.err
......@@ -21,7 +21,7 @@ done
# Build the parser with the table back-end and run it.
echo "Building and running (table)..."
make -C $CALC MENHIR="$MENHIR --trace --table" clean >/dev/null
make -C $CALC MENHIR="$MENHIR --trace --table" >/dev/null
make -C $CALC MENHIR="$MENHIR --trace --table" >/dev/null || exit 1
for f in $DATA/*.real.in ; do
b=${f%.in}
$CALC/calc < $f > $b.table.out 2> $b.table.err
......@@ -30,7 +30,7 @@ done
# Build the parser with the table back-end (with --inspection) and run it.
echo "Building and running (inspection)..."
make -C $CALC MENHIR="$MENHIR --trace --table --inspection" clean >/dev/null
make -C $CALC MENHIR="$MENHIR --trace --table --inspection" >/dev/null
make -C $CALC MENHIR="$MENHIR --trace --table --inspection" >/dev/null || exit 1
for f in $DATA/*.real.in ; do
b=${f%.in}
$CALC/calc < $f > $b.inspection.out 2> $b.inspection.err
......
......@@ -209,9 +209,7 @@ module type TABLE = sig
4. pushing a new stack cell, which contains the three values
computed in step 3;
5. returning the new stack computed in steps 2 and 4. The environment
is not affected: the caller of the semantic action is responsible
for writing the new stack into [env.stack].
5. returning the new stack computed in steps 2 and 4.
Point 1 is essentially forced upon us: if semantic values were fetched
off the stack by this interpreter, then the calling convention for
......
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