merge changes from branching of 3.12 to release/3.12.0

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10643 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Damien Doligez 2010-08-02 14:37:22 +00:00
parent 7c11c2acf9
commit 575555eecd
92 changed files with 10402 additions and 8408 deletions

18
.depend
View File

@ -216,17 +216,19 @@ typing/typeclass.cmx: utils/warnings.cmx typing/typetexp.cmx typing/types.cmx \
typing/typecore.cmo: utils/warnings.cmi typing/typetexp.cmi typing/types.cmi \
typing/typedtree.cmi typing/subst.cmi typing/stypes.cmi \
typing/printtyp.cmi typing/primitive.cmi typing/predef.cmi \
typing/path.cmi parsing/parsetree.cmi typing/parmatch.cmi utils/misc.cmi \
parsing/longident.cmi parsing/location.cmi typing/ident.cmi \
typing/env.cmi typing/ctype.cmi utils/clflags.cmi typing/btype.cmi \
parsing/asttypes.cmi typing/annot.cmi typing/typecore.cmi
typing/path.cmi parsing/parsetree.cmi typing/parmatch.cmi \
typing/oprint.cmi utils/misc.cmi parsing/longident.cmi \
parsing/location.cmi typing/ident.cmi typing/env.cmi typing/ctype.cmi \
utils/clflags.cmi typing/btype.cmi parsing/asttypes.cmi typing/annot.cmi \
typing/typecore.cmi
typing/typecore.cmx: utils/warnings.cmx typing/typetexp.cmx typing/types.cmx \
typing/typedtree.cmx typing/subst.cmx typing/stypes.cmx \
typing/printtyp.cmx typing/primitive.cmx typing/predef.cmx \
typing/path.cmx parsing/parsetree.cmi typing/parmatch.cmx utils/misc.cmx \
parsing/longident.cmx parsing/location.cmx typing/ident.cmx \
typing/env.cmx typing/ctype.cmx utils/clflags.cmx typing/btype.cmx \
parsing/asttypes.cmi typing/annot.cmi typing/typecore.cmi
typing/path.cmx parsing/parsetree.cmi typing/parmatch.cmx \
typing/oprint.cmx utils/misc.cmx parsing/longident.cmx \
parsing/location.cmx typing/ident.cmx typing/env.cmx typing/ctype.cmx \
utils/clflags.cmx typing/btype.cmx parsing/asttypes.cmi typing/annot.cmi \
typing/typecore.cmi
typing/typedecl.cmo: utils/warnings.cmi typing/typetexp.cmi typing/types.cmi \
typing/typedtree.cmi typing/subst.cmi typing/printtyp.cmi \
typing/primitive.cmi typing/predef.cmi typing/path.cmi \

11
Changes
View File

@ -44,6 +44,12 @@ Language features:
inside the signature, removing their respective fields. Among other
uses, this allows to merge two signatures containing identically
named fields.
* While fixing PR#4824, also corrected a gaping hole in the type checker,
which allowed instantiating separately object parameters and instance
variables in an interface. This hole was here since the beginning of
ocaml, and as a result many programs using object inheritance in a non
trivial way will need to be corrected. You can look at lablgtk2 for an
example.
Compilers and toplevel:
- Warnings are now numbered and can be switched on and off individually.
@ -105,8 +111,12 @@ All tools:
Bug Fixes:
- PR#4012: Map.map and Map.mapi do not conform to specification
- PR#4478: better error messages for type definition mismatches
- PR#4683: labltk script uses fixed path on windows
- PR#4742: finalisation function raising an exception blocks other finalisations
- PR#4775: compiler crash on crazy types (temporary fix)
- PR#4824: narrowing the type of class parameters with a module specification
- PR#4862: relaxed value restriction and records
- PR#4884: optional arguments do not work when Some is redefined
- PR#4964: parenthesized names for infix functions in annot files
- PR#4970: better error message for instance variables
- PR#4975: spelling mistakes
@ -117,6 +127,7 @@ Bug Fixes:
- PR#5057: fatal typing error with local module + functor + polymorphic variant
- Wrong type for Obj.add_offset.
- Small problem with the representation of Int32, Int64, and Nativeint constants.
- Use RTLD_LOCAL for native dynlink in private mode.
Objective Caml 3.11.2:
----------------------

View File

@ -222,11 +222,6 @@ An alternative, and faster approach to steps 2 to 5 is
The result is equivalent to "make world opt opt.opt", but this may
fail if anything goes wrong in native-code generation.
Another alternative, is to use the experimental build system that use
ocamlbuild instead of make (it replaces steps 2 to 5):
./build/fastworld.sh
6- You can now install the Objective Caml system. This will create the
following commands (in the binary directory selected during
autoconfiguration):

View File

@ -267,6 +267,10 @@ opt.opt: checkstack runtime core ocaml opt-core ocamlc.opt otherlibraries \
otherlibrariesopt \
ocamllex.opt ocamltoolsopt.opt ocamlbuild.native camlp4opt ocamldoc.opt
base.opt: checkstack runtime core ocaml opt-core ocamlc.opt otherlibraries \
ocamlbuild.byte camlp4out $(DEBUGGER) ocamldoc ocamlopt.opt \
otherlibrariesopt
# Installation
install:
if test -d $(BINDIR); then : ; else $(MKDIR) $(BINDIR); fi

View File

@ -606,23 +606,23 @@ alldepend::
# Camlp4
camlp4out: ocamlc otherlibraries ocamlbuild-mixed-boot ocamlbuild.byte
OCAMLBUILD_FIND=/usr/bin/find ./build/camlp4-byte-only.sh
./build/camlp4-byte-only.sh
camlp4opt: ocamlopt otherlibrariesopt ocamlbuild-mixed-boot ocamlbuild.native
OCAMLBUILD_FIND=/usr/bin/find ./build/camlp4-native-only.sh
./build/camlp4-native-only.sh
# Ocamlbuild
ocamlbuild.byte: ocamlc otherlibraries ocamlbuild-mixed-boot
OCAMLBUILD_FIND=/usr/bin/find ./build/ocamlbuild-byte-only.sh
./build/ocamlbuild-byte-only.sh
ocamlbuild.native: ocamlopt otherlibrariesopt ocamlbuild-mixed-boot
OCAMLBUILD_FIND=/usr/bin/find ./build/ocamlbuild-native-only.sh
./build/ocamlbuild-native-only.sh
ocamlbuildlib.native: ocamlopt otherlibrariesopt ocamlbuild-mixed-boot
OCAMLBUILD_FIND=/usr/bin/find ./build/ocamlbuildlib-native-only.sh
./build/ocamlbuildlib-native-only.sh
.PHONY: ocamlbuild-mixed-boot
ocamlbuild-mixed-boot:
OCAMLBUILD_FIND=/usr/bin/find ./build/mixed-boot.sh
./build/mixed-boot.sh
partialclean::
rm -rf _build

View File

@ -44,27 +44,23 @@ The remainder of this document gives more information on each port.
------------------------------------------------------------------------------
The native Win32 port built with Microsoft Visual C
---------------------------------------------------
The native Win32 port built with Microsoft Windows SDK
------------------------------------------------------
REQUIREMENTS:
This port runs under MS Windows Vista, XP, and 2000.
This port runs under MS Windows 7 (32 and 64 bits), Vista, XP, and 2000.
The base bytecode system (ocamlc, ocaml, ocamllex, ocamlyacc, ...)
runs without any additional tools.
Statically linking Caml bytecode with C code (ocamlc -custom) requires the
Microsoft Visual C++ compiler (items [1] and [2] in the section
"third-party software" below) and the flexdll tool (item [5]).
The native-code compiler (ocamlopt) requires the Microsoft Windows SDK
(item [1]) and the flexdll tool (item [2]).
The native-code compiler (ocamlopt) requires Visual C++ (items [1], [2]),
the Microsoft assembler MASM (item [3]) and the flexdll tool (item [5]).
Statically linking Caml bytecode with C code (ocamlc -custom) also requires
items [1] and [2].
Instead of items [1], [2] and [3], it is possible to use item [6] which contains
everything needed.
The LablTk GUI requires Tcl/Tk 8.5 (item [4]).
The LablTk GUI requires Tcl/Tk 8.5 (item [3]).
INSTALLATION:
@ -79,53 +75,69 @@ installer) must be added to the PATH environment variable.
To compile programs that use the LablTK GUI, the directory where the
libraries tk85.lib and tcl85.lib were installed (by the Tcl/Tk
installer) must be added to the library search path in the LIB
environment variable. E.g. if Tcl/Tk was installed in C:\tcl, add
"C:\tcl\lib" to the LIB environment variable.
environment variable. E.g. if Tcl/Tk was installed in C:\Tcl, add
"C:\Tcl\lib" to the LIB environment variable.
THIRD-PARTY SOFTWARE:
[1] Visual C++ version 2008, 2005, 2003, or 6.
We use Visual C++ 2008 Express Edition, which can be downloaded for free
from http://www.microsoft.com.
[1] Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 Service Pack 1.
Can be downloaded for free from
http://www.microsoft.com/downloads/en/default.aspx
under the name "Microsoft Windows 7 SDK".
[2] Windows header files and development libraries. They are included
in the Visual C++ 2008 Express Edition distribution.
Otherwise, you can find them in the Windows Platform SDK,
which can be downloaded for free from http://www.microsoft.com/.
[3] MASM version 6.11 or later. The full distribution of Visual C++ 2005
or 2008 contains MASM version 8. Users of the Express Edition of Visual C++
2005 can download MASM version 8 from
http://www.microsoft.com/downloads/details.aspx?FamilyID=7A1C9DA0-0510-44A2-B042-7EF370530C64&displaylang=en
To obtain MASM version 6.11, see
http://users.easystreet.com/jkirwan/new/pctools.html.
[4] TCL/TK version 8.5. Windows binaries are available as part of the
ActiveTCL distribution at http://www.activestate.com/products/ActiveTcl/
[5] flexdll.
[2] flexdll version 0.23 or later.
Can be downloaded from http://alain.frisch.fr/flexdll.html
[6] Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 Service Pack 1
[3] TCL/TK version 8.5. Windows binaries are available as part of the
ActiveTCL distribution at http://www.activestate.com/products/ActiveTcl/
RECOMPILATION FROM THE SOURCES:
The command-line tools can be recompiled from the Unix source
distribution (ocaml-X.YZ.tar.gz), which also contains the files modified
distribution (ocaml-X.YY.Z.tar.gz), which also contains the files modified
for Windows.
You will need the following software components to perform the recompilation:
- Windows NT, 2000, XP, or Vista.
- Items [1], [2], [3], [4] and [5] from the list of recommended software above.
- Windows NT, 2000, XP, Vista, or 7 (32 or 64 bits).
- Items [1], [2] and [3] from the list of recommended software above.
Make sure to install the 32-bit version of TCL/TK, even if you are
compiling on a 64-bit Windows.
- The Cygwin port of GNU tools, available from http://www.cygwin.com/
Install at least the following packages: diffutils, make, ncurses.
Remember to add the directory where the libraries tk84.lib and
tcl84.lib were installed (by the Tcl/Tk installer) to the LIB variable
(library search path).
First, you need to set up your cygwin environment for using the MS
tools. The following assumes that you have installed [1], [2], and [3]
in their default directories. If this is not the case, you will need
to adjust the paths accordingly.
To recompile, start a Cygwin shell and change to the top-level
Open a Windows Command Prompt and enter the following command:
set PFPATH=C:\Program Files
If you are compiling on the 64-bit version of Windows 7, enter the
following instead:
set PFPATH=C:\Program Files (x86)
Then enter the following commands:
cd "%PFPATH%\Microsoft Visual Studio 9.0\VC\bin"
vcvars32
echo VCPATH="`cygpath -p '%Path%'`" >C:\cygwin\tmp\msenv
echo LIB="%LIB%;C:\Tcl\lib" >>C:\cygwin\tmp\msenv
echo LIBPATH="%LIBPATH%" >>C:\cygwin\tmp\msenv
echo INCLUDE="%INCLUDE%;C:\Tcl\include" >>C:\cygwin\tmp\msenv
echo FLPATH="`cygpath '%PFPATH%\flexdll'`" >>C:\cygwin\tmp\msenv
echo PATH="${VCPATH}:$PATH:${FLPATH}" >>C:\cygwin\tmp\msenv
echo export PATH LIB LIBPATH INCLUDE >>C:\cygwin\tmp\msenv
echo export OCAMLBUILD_FIND=/usr/bin/find >>C:\cygwin\tmp\msenv
Open a Cygwin shell and enter the following commands:
tr -d '\r' </tmp/msenv >.msenv32
echo '. $HOME/.msenv32' >>.bashrc
Now, close the Command Prompt and the shell and you're set up for
using the MS tools under Cygwin.
To recompile OCaml, start a new Cygwin shell and change to the top-level
directory of the OCaml distribution. Then, do
cp config/m-nt.h config/m.h
@ -145,11 +157,6 @@ Finally, use "make -f Makefile.nt" to build the system, e.g.
make -f Makefile.nt opt.opt
make -f Makefile.nt install
Alternatively you can use the experimental build procedure using ocamlbuild:
./build/fastworld.sh
./build/install.sh
NOTES:
* The VC++ compiler does not implement "computed gotos", and therefore
@ -191,7 +198,7 @@ and the flexdll tool, available at
http://alain.frisch.fr/flexdll.html
You will need to install at least the following Cygwin packages (use
the Setup tool from Cygwin):
binutils, gcc-core, gcc-mingw-core, mingw-runtime, w32-api.
binutils, gcc-core, gcc-mingw-core, mingw-runtime, w32api.
Do *not* install the Mingw/MSYS development tools from www.mingw.org:
these are not compatible with this Caml port (@responsefile not
@ -200,6 +207,8 @@ recognized on the command line).
The LablTk GUI requires Tcl/Tk 8.5. Windows binaries are available
as part of the ActiveTCL distribution at
http://www.activestate.com/products/ActiveTcl/
Note that you will need to install the 32-bit version of ActiveTCL,
even if you are on a 64-bit version of Windows.
INSTALLATION:
@ -232,7 +241,7 @@ companion MSYS tools: these have problems with long command lines.
Instead, use the version of MinGW provided by Cygwin.
Start a Cygwin shell and unpack the source distribution
(ocaml-X.YZ.tar.gz) with "tar xzf". Change to the top-level
(ocaml-X.YY.Z.tar.gz) with "tar xzf". Change to the top-level
directory of the OCaml distribution. Then, do
cp config/m-nt.h config/m.h
@ -297,12 +306,13 @@ The replay debugger is supported.
------------------------------------------------------------------------------
The native Win64 port built with the Microsoft Platform SDK compilers
---------------------------------------------------------------------
The native Win64 port built with Microsoft Windows SDK
------------------------------------------------------
REQUIREMENTS:
This port runs under MS Windows XP 64 and Server 64 on Intel64/AMD64 machines.
This port runs under MS Windows XP 64, Windows Server 64, and
Windows 7 64 on Intel64/AMD64 machines.
The base bytecode system (ocamlc, ocaml, ocamllex, ocamlyacc, ...)
runs without any additional tools.
@ -314,6 +324,7 @@ Microsoft Platform SDK compiler (item [1] in the section
The native-code compiler (ocamlopt) requires the Microsoft compiler
and the Microsoft assembler MASM64 (item [1]) and the flexdll tool (item [2]).
The LablTk GUI is not available in this version.
INSTALLATION:
@ -323,20 +334,15 @@ described below.
THIRD-PARTY SOFTWARE:
[1] Microsoft Windows Server 2003 R2 Platform SDK for AMD64 (PSDK-amd64.exe).
Can be downloaded for free from http://www.microsoft.com/.
Includes all we need, namely a C compiler, the masm64 assembler,
Windows libraries and include files.
[1] Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 Service Pack 1.
Can be downloaded for free from
http://www.microsoft.com/downloads/en/default.aspx
under the name "Microsoft Windows 7 SDK".
Alternatively, the more recent SDK:
Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 Service Pack 1
can be used.
[2] flexdll.
[2] flexdll version 0.23 or later.
Can be downloaded from http://alain.frisch.fr/flexdll.html
RECOMPILATION FROM THE SOURCES:
The command-line tools can be recompiled from the Unix source
@ -344,13 +350,38 @@ distribution (ocaml-X.YZ.tar.gz), which also contains the files modified
for Windows.
You will need the following software components to perform the recompilation:
- Windows XP 64 or Server 64.
- The Platform SDK (item [1] from the list of recommended software above).
- Windows XP 64, Windows Server 64, or Windows 7 64.
- Items [1] and [2] from the list of recommended software above.
- The Cygwin port of GNU tools, available from http://www.cygwin.com/
Install at least the following packages: diffutils, make, ncurses.
- The flexdll tool (see above).
To recompile, start a Cygwin shell and change to the top-level
First, you need to set up your cygwin environment for using the MS
tools. The following assumes that you have installed [1] and [2]
in their default directories. If this is not the case, you will need
to adjust the paths accordingly.
Open a Windows Command Prompt and enter the following commands:
set PFPATH=C:\Program Files (x86)
cd "%PFPATH%\Microsoft Visual Studio 9.0\VC\bin"
vcvars64
echo VCPATH="`cygpath -p '%Path%'`" >C:\cygwin\tmp\msenv
echo LIB="%LIB%;C:\Tcl\lib" >>C:\cygwin\tmp\msenv
echo LIBPATH="%LIBPATH%" >>C:\cygwin\tmp\msenv
echo INCLUDE="%INCLUDE%;C:\Tcl\include" >>C:\cygwin\tmp\msenv
echo FLPATH="`cygpath '%PFPATH%\flexdll'`" >>C:\cygwin\tmp\msenv
echo PATH="${VCPATH}:$PATH:${FLPATH}" >>C:\cygwin\tmp\msenv
echo export PATH LIB LIBPATH INCLUDE >>C:\cygwin\tmp\msenv
echo export OCAMLBUILD_FIND=/usr/bin/find >>C:\cygwin\tmp\msenv
Open a Cygwin shell and enter the following commands:
tr -d '\r' </tmp/msenv >.msenv64
echo '. $HOME/.msenv64' >>.bashrc
Now, close the Command Prompt and the shell and you're set up for
using the MS tools under Cygwin.
To recompile OCaml, start a new Cygwin shell and change to the top-level
directory of the OCaml distribution. Then, do
cp config/m-nt.h config/m.h
@ -361,12 +392,6 @@ Then, edit config/Makefile as needed, following the comments in this file.
Normally, the only variable that need to be changed is
PREFIX where to install everything
If, for whatever reason, you want to use the Microsoft Visual C++ 2005
compiler for AMD64 instead of the Platform SDK compiler, replace the line
EXTRALIBS=bufferoverflowu.lib
by
EXTRALIBS=
Finally, use "make -f Makefile.nt" to build the system, e.g.
make -f Makefile.nt world

View File

@ -1,4 +1,4 @@
3.13.0+dev0 (2010-06-07)
3.13.0+dev1 (2010-08-02)
# The version string is the first line of this file.
# It must be in the format described in stdlib/sys.mli

1
_tags
View File

@ -35,7 +35,6 @@ true: use_stdlib
"camlp4/Camlp4_import.ml": -warn_Z
<camlp4/build/*> or <camlp4/boot/*> or "camlp4/Camlp4/Struct/Lexer.ml": -camlp4boot, -warn_Z, warn_a
<camlp4/Camlp4Bin.{byte,native}> or <camlp4/{mkcamlp4,boot/camlp4boot}.byte>: use_dynlink
"camlp4/Camlp4/Printers/OCaml.ml" or "camlp4/Camlp4/Printers/OCamlr.ml": -warn_Z, warn_v
<camlp4/Camlp4Printers/**.ml>: include_unix
"camlp4/Camlp4/Struct/DynLoader.ml" or "camlp4/boot/Camlp4.ml": include_dynlink
<camlp4/Camlp4Top/**>: include_toplevel

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -2,16 +2,11 @@
make clean
./build/distclean.sh
./configure -prefix `pwd`/_install
./build/world.sh byte
./build/fastworld.sh
# Go to "Bootstrap camlp4"
=== Install the bootstrapping camlp4 processor ===
./build/install.sh
# Either extend your PATH with _install
export PATH=`pwd`/_install:$PATH
# Or copy just the needed files (for better understanding)
cp _build/camlp4/camlp4boot.byte <somewhereinPATH>/bin/camlp4boot
cp _build/camlp4/camlp4o.byte <somewhereinPATH>/bin/camlp4o
=== Build camlp4 ===
# This step is not needed right after a "./build/world.sh byte"
@ -20,6 +15,8 @@
=== Bootstrap camlp4 ===
# First "Build camlp4"
# Then "Install the bootstrapping camlp4 processor"
# Indeed the following bootstrapping script
# does use the installed version!
./build/camlp4-bootstrap.sh
# If the fixpoint not is reached yet
# Go to "Bootstrap camlp4"
@ -27,6 +24,12 @@
# Have a look at the changes in
# camlp4/boot it may be a good idea to commit them
=== Generate Camlp4Ast.ml ===
# First "Install the bootstrapping camlp4 processor"
# Indeed the following bootstrapping script
# does use the installed version!
./build/camlp4-mkCamlp4Ast.sh
=== Case study "let open M in e" ===
Open the revised parser
@ -89,7 +92,7 @@
(* let open i in e *)
| ExOpI of loc and ident and expr
Then build. Bootstrap once and build again.
Then "Generate Camlp4Ast.ml" and build.
We get a single warning in Camlp4/Struct/Camlp4Ast2OCamlAst.ml but
don't fix it now.
@ -135,7 +138,7 @@ Add new parsing rules for := but keep the old actions for now.
(* module i := i *)
| WcMoS of loc and ident and ident
3/ Build and bootstrap once.
3/ "Generate Camlp4Ast.ml" and build.
4/ Change the generated camlp4/boot/camlp4boot.ml:
Look for ":=" and change occurences of

View File

@ -5,6 +5,9 @@
set -e
cd `dirname $0`/..
. config/config.sh
export PATH=$BINDIR:$PATH
TMPTARGETS="\
camlp4/boot/Lexer.ml"

24
build/camlp4-mkCamlp4Ast.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/sh
# $Id$
set -e
cd `dirname $0`/..
. config/config.sh
export PATH=$BINDIR:$PATH
CAMLP4AST=camlp4/Camlp4/Struct/Camlp4Ast.ml
BOOTP4AST=camlp4/boot/Camlp4Ast.ml
[ -f "$BOOTP4AST" ] && mv "$BOOTP4AST" "$BOOTP4AST.old"
rm -f "_build/$BOOTP4AST"
rm -f "_build/$CAMLP4AST"
if [ -x ./boot/myocamlbuild.native ]; then
OCAMLBUILD=./boot/myocamlbuild.native
else
OCAMLBUILD="./boot/ocamlrun boot/myocamlbuild"
fi
$OCAMLBUILD $CAMLP4AST
echo promote $CAMLP4AST
cp _build/$CAMLP4AST camlp4/boot/`basename $CAMLP4AST`

View File

@ -1,407 +1,410 @@
alloc.o: alloc.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h custom.h major_gc.h freelist.h memory.h gc.h \
minor_gc.h stacks.h
../config/s.h mlvalues.h custom.h major_gc.h freelist.h memory.h gc.h \
minor_gc.h stacks.h
array.o: array.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h
../config/s.h mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h
backtrace.o: backtrace.c config.h ../config/m.h ../config/s.h \
compatibility.h mlvalues.h misc.h alloc.h io.h instruct.h intext.h \
fix_code.h exec.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
startup.h stacks.h sys.h backtrace.h
compatibility.h mlvalues.h misc.h alloc.h io.h instruct.h intext.h \
fix_code.h exec.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
startup.h stacks.h sys.h backtrace.h
callback.o: callback.c callback.h compatibility.h mlvalues.h config.h \
../config/m.h ../config/s.h misc.h fail.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h interp.h instruct.h fix_code.h stacks.h
../config/m.h ../config/s.h misc.h fail.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h interp.h instruct.h fix_code.h stacks.h
compact.o: compact.c config.h ../config/m.h ../config/s.h compatibility.h \
finalise.h roots.h misc.h memory.h gc.h mlvalues.h major_gc.h freelist.h \
minor_gc.h gc_ctrl.h weak.h
finalise.h roots.h misc.h memory.h gc.h mlvalues.h major_gc.h \
freelist.h minor_gc.h gc_ctrl.h weak.h
compare.o: compare.c custom.h compatibility.h mlvalues.h config.h \
../config/m.h ../config/s.h misc.h fail.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h
../config/m.h ../config/s.h misc.h fail.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h
custom.o: custom.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h custom.h fail.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h
../config/s.h mlvalues.h custom.h fail.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h
debugger.o: debugger.c config.h ../config/m.h ../config/s.h \
compatibility.h debugger.h misc.h mlvalues.h fail.h fix_code.h \
instruct.h intext.h io.h stacks.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h sys.h
compatibility.h debugger.h misc.h mlvalues.h fail.h fix_code.h \
instruct.h intext.h io.h stacks.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h sys.h
dynlink.o: dynlink.c config.h ../config/m.h ../config/s.h compatibility.h \
alloc.h misc.h mlvalues.h dynlink.h fail.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h osdeps.h prims.h
alloc.h misc.h mlvalues.h dynlink.h fail.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h osdeps.h prims.h
extern.o: extern.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h \
memory.h major_gc.h freelist.h minor_gc.h reverse.h
../config/s.h mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h \
memory.h major_gc.h freelist.h minor_gc.h reverse.h
fail.o: fail.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h fail.h io.h gc.h memory.h major_gc.h freelist.h \
minor_gc.h printexc.h signals.h stacks.h
../config/s.h mlvalues.h fail.h io.h gc.h memory.h major_gc.h \
freelist.h minor_gc.h printexc.h signals.h stacks.h
finalise.o: finalise.c callback.h compatibility.h mlvalues.h config.h \
../config/m.h ../config/s.h misc.h fail.h roots.h memory.h gc.h \
major_gc.h freelist.h minor_gc.h signals.h
../config/m.h ../config/s.h misc.h fail.h roots.h memory.h gc.h \
major_gc.h freelist.h minor_gc.h signals.h
fix_code.o: fix_code.c config.h ../config/m.h ../config/s.h \
compatibility.h debugger.h misc.h mlvalues.h fix_code.h instruct.h md5.h \
io.h memory.h gc.h major_gc.h freelist.h minor_gc.h reverse.h
compatibility.h debugger.h misc.h mlvalues.h fix_code.h instruct.h \
md5.h io.h memory.h gc.h major_gc.h freelist.h minor_gc.h reverse.h
floats.o: floats.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h reverse.h stacks.h
../config/s.h mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h reverse.h stacks.h
freelist.o: freelist.c config.h ../config/m.h ../config/s.h \
compatibility.h freelist.h misc.h mlvalues.h gc.h gc_ctrl.h memory.h \
major_gc.h minor_gc.h
compatibility.h freelist.h misc.h mlvalues.h gc.h gc_ctrl.h memory.h \
major_gc.h minor_gc.h
gc_ctrl.o: gc_ctrl.c alloc.h compatibility.h misc.h config.h \
../config/m.h ../config/s.h mlvalues.h compact.h custom.h finalise.h \
roots.h memory.h gc.h major_gc.h freelist.h minor_gc.h gc_ctrl.h \
stacks.h
../config/m.h ../config/s.h mlvalues.h compact.h custom.h finalise.h \
roots.h memory.h gc.h major_gc.h freelist.h minor_gc.h gc_ctrl.h \
stacks.h
globroots.o: globroots.c memory.h compatibility.h config.h ../config/m.h \
../config/s.h gc.h mlvalues.h misc.h major_gc.h freelist.h minor_gc.h \
roots.h globroots.h
../config/s.h gc.h mlvalues.h misc.h major_gc.h freelist.h minor_gc.h \
roots.h globroots.h
hash.o: hash.c mlvalues.h compatibility.h config.h ../config/m.h \
../config/s.h misc.h custom.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h
../config/s.h misc.h custom.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h
instrtrace.o: instrtrace.c
intern.o: intern.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h \
memory.h major_gc.h freelist.h minor_gc.h reverse.h
../config/s.h mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h \
memory.h major_gc.h freelist.h minor_gc.h reverse.h
interp.o: interp.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h backtrace.h callback.h debugger.h fail.h \
fix_code.h instrtrace.h instruct.h interp.h major_gc.h freelist.h \
memory.h gc.h minor_gc.h prims.h signals.h stacks.h jumptbl.h
../config/s.h mlvalues.h backtrace.h callback.h debugger.h fail.h \
fix_code.h instrtrace.h instruct.h interp.h major_gc.h freelist.h \
memory.h gc.h minor_gc.h prims.h signals.h stacks.h jumptbl.h
ints.o: ints.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h custom.h fail.h intext.h io.h fix_code.h \
memory.h gc.h major_gc.h freelist.h minor_gc.h int64_native.h
../config/s.h mlvalues.h custom.h fail.h intext.h io.h fix_code.h \
memory.h gc.h major_gc.h freelist.h minor_gc.h int64_native.h
io.o: io.c config.h ../config/m.h ../config/s.h compatibility.h alloc.h \
misc.h mlvalues.h custom.h fail.h io.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h signals.h sys.h
misc.h mlvalues.h custom.h fail.h io.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h signals.h sys.h
lexing.o: lexing.c fail.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h stacks.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h
../config/s.h mlvalues.h stacks.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h
main.o: main.c misc.h compatibility.h config.h ../config/m.h \
../config/s.h mlvalues.h sys.h
../config/s.h mlvalues.h sys.h
major_gc.o: major_gc.c compact.h config.h ../config/m.h ../config/s.h \
compatibility.h misc.h custom.h mlvalues.h fail.h finalise.h roots.h \
memory.h gc.h major_gc.h freelist.h minor_gc.h gc_ctrl.h weak.h
compatibility.h misc.h custom.h mlvalues.h fail.h finalise.h roots.h \
memory.h gc.h major_gc.h freelist.h minor_gc.h gc_ctrl.h weak.h
md5.o: md5.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h fail.h md5.h io.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h reverse.h
../config/s.h mlvalues.h fail.h md5.h io.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h reverse.h
memory.o: memory.c fail.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h freelist.h gc.h gc_ctrl.h major_gc.h memory.h \
minor_gc.h signals.h
../config/s.h mlvalues.h freelist.h gc.h gc_ctrl.h major_gc.h memory.h \
minor_gc.h signals.h
meta.o: meta.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h fail.h fix_code.h interp.h intext.h io.h \
major_gc.h freelist.h memory.h gc.h minor_gc.h prims.h stacks.h
../config/s.h mlvalues.h fail.h fix_code.h interp.h intext.h io.h \
major_gc.h freelist.h memory.h gc.h minor_gc.h prims.h stacks.h
minor_gc.o: minor_gc.c config.h ../config/m.h ../config/s.h \
compatibility.h fail.h misc.h mlvalues.h finalise.h roots.h memory.h \
gc.h major_gc.h freelist.h minor_gc.h gc_ctrl.h signals.h weak.h
compatibility.h fail.h misc.h mlvalues.h finalise.h roots.h memory.h \
gc.h major_gc.h freelist.h minor_gc.h gc_ctrl.h signals.h weak.h
misc.o: misc.c config.h ../config/m.h ../config/s.h compatibility.h \
misc.h memory.h gc.h mlvalues.h major_gc.h freelist.h minor_gc.h
misc.h memory.h gc.h mlvalues.h major_gc.h freelist.h minor_gc.h
obj.o: obj.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h fail.h gc.h interp.h major_gc.h freelist.h \
memory.h minor_gc.h prims.h
../config/s.h mlvalues.h fail.h gc.h interp.h major_gc.h freelist.h \
memory.h minor_gc.h prims.h
parsing.o: parsing.c config.h ../config/m.h ../config/s.h compatibility.h \
mlvalues.h misc.h memory.h gc.h major_gc.h freelist.h minor_gc.h alloc.h
mlvalues.h misc.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
alloc.h
prims.o: prims.c mlvalues.h compatibility.h config.h ../config/m.h \
../config/s.h misc.h prims.h
../config/s.h misc.h prims.h
printexc.o: printexc.c backtrace.h mlvalues.h compatibility.h config.h \
../config/m.h ../config/s.h misc.h callback.h debugger.h fail.h \
printexc.h
../config/m.h ../config/s.h misc.h callback.h debugger.h fail.h \
printexc.h
roots.o: roots.c finalise.h roots.h misc.h compatibility.h config.h \
../config/m.h ../config/s.h memory.h gc.h mlvalues.h major_gc.h \
freelist.h minor_gc.h globroots.h stacks.h
../config/m.h ../config/s.h memory.h gc.h mlvalues.h major_gc.h \
freelist.h minor_gc.h globroots.h stacks.h
signals.o: signals.c alloc.h compatibility.h misc.h config.h \
../config/m.h ../config/s.h mlvalues.h callback.h fail.h memory.h gc.h \
major_gc.h freelist.h minor_gc.h roots.h signals.h signals_machdep.h \
sys.h
../config/m.h ../config/s.h mlvalues.h callback.h fail.h memory.h gc.h \
major_gc.h freelist.h minor_gc.h roots.h signals.h signals_machdep.h \
sys.h
signals_byt.o: signals_byt.c config.h ../config/m.h ../config/s.h \
compatibility.h memory.h gc.h mlvalues.h misc.h major_gc.h freelist.h \
minor_gc.h osdeps.h signals.h signals_machdep.h
compatibility.h memory.h gc.h mlvalues.h misc.h major_gc.h freelist.h \
minor_gc.h osdeps.h signals.h signals_machdep.h
stacks.o: stacks.c config.h ../config/m.h ../config/s.h compatibility.h \
fail.h misc.h mlvalues.h stacks.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h
fail.h misc.h mlvalues.h stacks.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h
startup.o: startup.c config.h ../config/m.h ../config/s.h compatibility.h \
alloc.h misc.h mlvalues.h backtrace.h callback.h custom.h debugger.h \
dynlink.h exec.h fail.h fix_code.h freelist.h gc_ctrl.h instrtrace.h \
interp.h intext.h io.h memory.h gc.h major_gc.h minor_gc.h osdeps.h \
prims.h printexc.h reverse.h signals.h stacks.h sys.h startup.h \
version.h
alloc.h misc.h mlvalues.h backtrace.h callback.h custom.h debugger.h \
dynlink.h exec.h fail.h fix_code.h freelist.h gc_ctrl.h instrtrace.h \
interp.h intext.h io.h memory.h gc.h major_gc.h minor_gc.h osdeps.h \
prims.h printexc.h reverse.h signals.h stacks.h sys.h startup.h \
version.h
str.o: str.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h fail.h
../config/s.h mlvalues.h fail.h
sys.o: sys.c config.h ../config/m.h ../config/s.h compatibility.h alloc.h \
misc.h mlvalues.h debugger.h fail.h instruct.h osdeps.h signals.h \
stacks.h memory.h gc.h major_gc.h freelist.h minor_gc.h sys.h
misc.h mlvalues.h debugger.h fail.h instruct.h osdeps.h signals.h \
stacks.h memory.h gc.h major_gc.h freelist.h minor_gc.h sys.h
terminfo.o: terminfo.c config.h ../config/m.h ../config/s.h \
compatibility.h alloc.h misc.h mlvalues.h fail.h io.h
compatibility.h alloc.h misc.h mlvalues.h fail.h io.h
unix.o: unix.c config.h ../config/m.h ../config/s.h compatibility.h \
memory.h gc.h mlvalues.h misc.h major_gc.h freelist.h minor_gc.h \
osdeps.h
memory.h gc.h mlvalues.h misc.h major_gc.h freelist.h minor_gc.h \
osdeps.h
weak.o: weak.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h fail.h major_gc.h freelist.h memory.h gc.h \
minor_gc.h
../config/s.h mlvalues.h fail.h major_gc.h freelist.h memory.h gc.h \
minor_gc.h
alloc.d.o: alloc.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h custom.h major_gc.h freelist.h memory.h gc.h \
minor_gc.h stacks.h
../config/s.h mlvalues.h custom.h major_gc.h freelist.h memory.h gc.h \
minor_gc.h stacks.h
array.d.o: array.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h
../config/s.h mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h
backtrace.d.o: backtrace.c config.h ../config/m.h ../config/s.h \
compatibility.h mlvalues.h misc.h alloc.h io.h instruct.h intext.h \
fix_code.h exec.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
startup.h stacks.h sys.h backtrace.h
compatibility.h mlvalues.h misc.h alloc.h io.h instruct.h intext.h \
fix_code.h exec.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
startup.h stacks.h sys.h backtrace.h
callback.d.o: callback.c callback.h compatibility.h mlvalues.h config.h \
../config/m.h ../config/s.h misc.h fail.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h interp.h instruct.h fix_code.h stacks.h
../config/m.h ../config/s.h misc.h fail.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h interp.h instruct.h fix_code.h stacks.h
compact.d.o: compact.c config.h ../config/m.h ../config/s.h compatibility.h \
finalise.h roots.h misc.h memory.h gc.h mlvalues.h major_gc.h freelist.h \
minor_gc.h gc_ctrl.h weak.h
finalise.h roots.h misc.h memory.h gc.h mlvalues.h major_gc.h \
freelist.h minor_gc.h gc_ctrl.h weak.h
compare.d.o: compare.c custom.h compatibility.h mlvalues.h config.h \
../config/m.h ../config/s.h misc.h fail.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h
../config/m.h ../config/s.h misc.h fail.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h
custom.d.o: custom.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h custom.h fail.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h
../config/s.h mlvalues.h custom.h fail.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h
debugger.d.o: debugger.c config.h ../config/m.h ../config/s.h \
compatibility.h debugger.h misc.h mlvalues.h fail.h fix_code.h \
instruct.h intext.h io.h stacks.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h sys.h
compatibility.h debugger.h misc.h mlvalues.h fail.h fix_code.h \
instruct.h intext.h io.h stacks.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h sys.h
dynlink.d.o: dynlink.c config.h ../config/m.h ../config/s.h compatibility.h \
alloc.h misc.h mlvalues.h dynlink.h fail.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h osdeps.h prims.h
alloc.h misc.h mlvalues.h dynlink.h fail.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h osdeps.h prims.h
extern.d.o: extern.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h \
memory.h major_gc.h freelist.h minor_gc.h reverse.h
../config/s.h mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h \
memory.h major_gc.h freelist.h minor_gc.h reverse.h
fail.d.o: fail.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h fail.h io.h gc.h memory.h major_gc.h freelist.h \
minor_gc.h printexc.h signals.h stacks.h
../config/s.h mlvalues.h fail.h io.h gc.h memory.h major_gc.h \
freelist.h minor_gc.h printexc.h signals.h stacks.h
finalise.d.o: finalise.c callback.h compatibility.h mlvalues.h config.h \
../config/m.h ../config/s.h misc.h fail.h roots.h memory.h gc.h \
major_gc.h freelist.h minor_gc.h signals.h
../config/m.h ../config/s.h misc.h fail.h roots.h memory.h gc.h \
major_gc.h freelist.h minor_gc.h signals.h
fix_code.d.o: fix_code.c config.h ../config/m.h ../config/s.h \
compatibility.h debugger.h misc.h mlvalues.h fix_code.h instruct.h md5.h \
io.h memory.h gc.h major_gc.h freelist.h minor_gc.h reverse.h
compatibility.h debugger.h misc.h mlvalues.h fix_code.h instruct.h \
md5.h io.h memory.h gc.h major_gc.h freelist.h minor_gc.h reverse.h
floats.d.o: floats.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h reverse.h stacks.h
../config/s.h mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h reverse.h stacks.h
freelist.d.o: freelist.c config.h ../config/m.h ../config/s.h \
compatibility.h freelist.h misc.h mlvalues.h gc.h gc_ctrl.h memory.h \
major_gc.h minor_gc.h
compatibility.h freelist.h misc.h mlvalues.h gc.h gc_ctrl.h memory.h \
major_gc.h minor_gc.h
gc_ctrl.d.o: gc_ctrl.c alloc.h compatibility.h misc.h config.h \
../config/m.h ../config/s.h mlvalues.h compact.h custom.h finalise.h \
roots.h memory.h gc.h major_gc.h freelist.h minor_gc.h gc_ctrl.h \
stacks.h
../config/m.h ../config/s.h mlvalues.h compact.h custom.h finalise.h \
roots.h memory.h gc.h major_gc.h freelist.h minor_gc.h gc_ctrl.h \
stacks.h
globroots.d.o: globroots.c memory.h compatibility.h config.h ../config/m.h \
../config/s.h gc.h mlvalues.h misc.h major_gc.h freelist.h minor_gc.h \
roots.h globroots.h
../config/s.h gc.h mlvalues.h misc.h major_gc.h freelist.h minor_gc.h \
roots.h globroots.h
hash.d.o: hash.c mlvalues.h compatibility.h config.h ../config/m.h \
../config/s.h misc.h custom.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h
../config/s.h misc.h custom.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h
instrtrace.d.o: instrtrace.c instruct.h misc.h compatibility.h config.h \
../config/m.h ../config/s.h mlvalues.h opnames.h prims.h stacks.h \
memory.h gc.h major_gc.h freelist.h minor_gc.h
../config/m.h ../config/s.h mlvalues.h opnames.h prims.h stacks.h \
memory.h gc.h major_gc.h freelist.h minor_gc.h
intern.d.o: intern.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h \
memory.h major_gc.h freelist.h minor_gc.h reverse.h
../config/s.h mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h \
memory.h major_gc.h freelist.h minor_gc.h reverse.h
interp.d.o: interp.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h backtrace.h callback.h debugger.h fail.h \
fix_code.h instrtrace.h instruct.h interp.h major_gc.h freelist.h \
memory.h gc.h minor_gc.h prims.h signals.h stacks.h
../config/s.h mlvalues.h backtrace.h callback.h debugger.h fail.h \
fix_code.h instrtrace.h instruct.h interp.h major_gc.h freelist.h \
memory.h gc.h minor_gc.h prims.h signals.h stacks.h
ints.d.o: ints.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h custom.h fail.h intext.h io.h fix_code.h \
memory.h gc.h major_gc.h freelist.h minor_gc.h int64_native.h
../config/s.h mlvalues.h custom.h fail.h intext.h io.h fix_code.h \
memory.h gc.h major_gc.h freelist.h minor_gc.h int64_native.h
io.d.o: io.c config.h ../config/m.h ../config/s.h compatibility.h alloc.h \
misc.h mlvalues.h custom.h fail.h io.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h signals.h sys.h
misc.h mlvalues.h custom.h fail.h io.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h signals.h sys.h
lexing.d.o: lexing.c fail.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h stacks.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h
../config/s.h mlvalues.h stacks.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h
main.d.o: main.c misc.h compatibility.h config.h ../config/m.h \
../config/s.h mlvalues.h sys.h
../config/s.h mlvalues.h sys.h
major_gc.d.o: major_gc.c compact.h config.h ../config/m.h ../config/s.h \
compatibility.h misc.h custom.h mlvalues.h fail.h finalise.h roots.h \
memory.h gc.h major_gc.h freelist.h minor_gc.h gc_ctrl.h weak.h
compatibility.h misc.h custom.h mlvalues.h fail.h finalise.h roots.h \
memory.h gc.h major_gc.h freelist.h minor_gc.h gc_ctrl.h weak.h
md5.d.o: md5.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h fail.h md5.h io.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h reverse.h
../config/s.h mlvalues.h fail.h md5.h io.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h reverse.h
memory.d.o: memory.c fail.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h freelist.h gc.h gc_ctrl.h major_gc.h memory.h \
minor_gc.h signals.h
../config/s.h mlvalues.h freelist.h gc.h gc_ctrl.h major_gc.h memory.h \
minor_gc.h signals.h
meta.d.o: meta.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h fail.h fix_code.h interp.h intext.h io.h \
major_gc.h freelist.h memory.h gc.h minor_gc.h prims.h stacks.h
../config/s.h mlvalues.h fail.h fix_code.h interp.h intext.h io.h \
major_gc.h freelist.h memory.h gc.h minor_gc.h prims.h stacks.h
minor_gc.d.o: minor_gc.c config.h ../config/m.h ../config/s.h \
compatibility.h fail.h misc.h mlvalues.h finalise.h roots.h memory.h \
gc.h major_gc.h freelist.h minor_gc.h gc_ctrl.h signals.h weak.h
compatibility.h fail.h misc.h mlvalues.h finalise.h roots.h memory.h \
gc.h major_gc.h freelist.h minor_gc.h gc_ctrl.h signals.h weak.h
misc.d.o: misc.c config.h ../config/m.h ../config/s.h compatibility.h \
misc.h memory.h gc.h mlvalues.h major_gc.h freelist.h minor_gc.h
misc.h memory.h gc.h mlvalues.h major_gc.h freelist.h minor_gc.h
obj.d.o: obj.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h fail.h gc.h interp.h major_gc.h freelist.h \
memory.h minor_gc.h prims.h
../config/s.h mlvalues.h fail.h gc.h interp.h major_gc.h freelist.h \
memory.h minor_gc.h prims.h
parsing.d.o: parsing.c config.h ../config/m.h ../config/s.h compatibility.h \
mlvalues.h misc.h memory.h gc.h major_gc.h freelist.h minor_gc.h alloc.h
mlvalues.h misc.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
alloc.h
prims.d.o: prims.c mlvalues.h compatibility.h config.h ../config/m.h \
../config/s.h misc.h prims.h
../config/s.h misc.h prims.h
printexc.d.o: printexc.c backtrace.h mlvalues.h compatibility.h config.h \
../config/m.h ../config/s.h misc.h callback.h debugger.h fail.h \
printexc.h
../config/m.h ../config/s.h misc.h callback.h debugger.h fail.h \
printexc.h
roots.d.o: roots.c finalise.h roots.h misc.h compatibility.h config.h \
../config/m.h ../config/s.h memory.h gc.h mlvalues.h major_gc.h \
freelist.h minor_gc.h globroots.h stacks.h
../config/m.h ../config/s.h memory.h gc.h mlvalues.h major_gc.h \
freelist.h minor_gc.h globroots.h stacks.h
signals.d.o: signals.c alloc.h compatibility.h misc.h config.h \
../config/m.h ../config/s.h mlvalues.h callback.h fail.h memory.h gc.h \
major_gc.h freelist.h minor_gc.h roots.h signals.h signals_machdep.h \
sys.h
../config/m.h ../config/s.h mlvalues.h callback.h fail.h memory.h gc.h \
major_gc.h freelist.h minor_gc.h roots.h signals.h signals_machdep.h \
sys.h
signals_byt.d.o: signals_byt.c config.h ../config/m.h ../config/s.h \
compatibility.h memory.h gc.h mlvalues.h misc.h major_gc.h freelist.h \
minor_gc.h osdeps.h signals.h signals_machdep.h
compatibility.h memory.h gc.h mlvalues.h misc.h major_gc.h freelist.h \
minor_gc.h osdeps.h signals.h signals_machdep.h
stacks.d.o: stacks.c config.h ../config/m.h ../config/s.h compatibility.h \
fail.h misc.h mlvalues.h stacks.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h
fail.h misc.h mlvalues.h stacks.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h
startup.d.o: startup.c config.h ../config/m.h ../config/s.h compatibility.h \
alloc.h misc.h mlvalues.h backtrace.h callback.h custom.h debugger.h \
dynlink.h exec.h fail.h fix_code.h freelist.h gc_ctrl.h instrtrace.h \
interp.h intext.h io.h memory.h gc.h major_gc.h minor_gc.h osdeps.h \
prims.h printexc.h reverse.h signals.h stacks.h sys.h startup.h \
version.h
alloc.h misc.h mlvalues.h backtrace.h callback.h custom.h debugger.h \
dynlink.h exec.h fail.h fix_code.h freelist.h gc_ctrl.h instrtrace.h \
interp.h intext.h io.h memory.h gc.h major_gc.h minor_gc.h osdeps.h \
prims.h printexc.h reverse.h signals.h stacks.h sys.h startup.h \
version.h
str.d.o: str.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h fail.h
../config/s.h mlvalues.h fail.h
sys.d.o: sys.c config.h ../config/m.h ../config/s.h compatibility.h alloc.h \
misc.h mlvalues.h debugger.h fail.h instruct.h osdeps.h signals.h \
stacks.h memory.h gc.h major_gc.h freelist.h minor_gc.h sys.h
misc.h mlvalues.h debugger.h fail.h instruct.h osdeps.h signals.h \
stacks.h memory.h gc.h major_gc.h freelist.h minor_gc.h sys.h
terminfo.d.o: terminfo.c config.h ../config/m.h ../config/s.h \
compatibility.h alloc.h misc.h mlvalues.h fail.h io.h
compatibility.h alloc.h misc.h mlvalues.h fail.h io.h
unix.d.o: unix.c config.h ../config/m.h ../config/s.h compatibility.h \
memory.h gc.h mlvalues.h misc.h major_gc.h freelist.h minor_gc.h \
osdeps.h
memory.h gc.h mlvalues.h misc.h major_gc.h freelist.h minor_gc.h \
osdeps.h
weak.d.o: weak.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h fail.h major_gc.h freelist.h memory.h gc.h \
minor_gc.h
../config/s.h mlvalues.h fail.h major_gc.h freelist.h memory.h gc.h \
minor_gc.h
alloc.pic.o: alloc.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h custom.h major_gc.h freelist.h memory.h gc.h \
minor_gc.h stacks.h
../config/s.h mlvalues.h custom.h major_gc.h freelist.h memory.h gc.h \
minor_gc.h stacks.h
array.pic.o: array.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h
../config/s.h mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h
backtrace.pic.o: backtrace.c config.h ../config/m.h ../config/s.h \
compatibility.h mlvalues.h misc.h alloc.h io.h instruct.h intext.h \
fix_code.h exec.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
startup.h stacks.h sys.h backtrace.h
compatibility.h mlvalues.h misc.h alloc.h io.h instruct.h intext.h \
fix_code.h exec.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
startup.h stacks.h sys.h backtrace.h
callback.pic.o: callback.c callback.h compatibility.h mlvalues.h config.h \
../config/m.h ../config/s.h misc.h fail.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h interp.h instruct.h fix_code.h stacks.h
../config/m.h ../config/s.h misc.h fail.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h interp.h instruct.h fix_code.h stacks.h
compact.pic.o: compact.c config.h ../config/m.h ../config/s.h compatibility.h \
finalise.h roots.h misc.h memory.h gc.h mlvalues.h major_gc.h freelist.h \
minor_gc.h gc_ctrl.h weak.h
finalise.h roots.h misc.h memory.h gc.h mlvalues.h major_gc.h \
freelist.h minor_gc.h gc_ctrl.h weak.h
compare.pic.o: compare.c custom.h compatibility.h mlvalues.h config.h \
../config/m.h ../config/s.h misc.h fail.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h
../config/m.h ../config/s.h misc.h fail.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h
custom.pic.o: custom.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h custom.h fail.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h
../config/s.h mlvalues.h custom.h fail.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h
debugger.pic.o: debugger.c config.h ../config/m.h ../config/s.h \
compatibility.h debugger.h misc.h mlvalues.h fail.h fix_code.h \
instruct.h intext.h io.h stacks.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h sys.h
compatibility.h debugger.h misc.h mlvalues.h fail.h fix_code.h \
instruct.h intext.h io.h stacks.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h sys.h
dynlink.pic.o: dynlink.c config.h ../config/m.h ../config/s.h compatibility.h \
alloc.h misc.h mlvalues.h dynlink.h fail.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h osdeps.h prims.h
alloc.h misc.h mlvalues.h dynlink.h fail.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h osdeps.h prims.h
extern.pic.o: extern.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h \
memory.h major_gc.h freelist.h minor_gc.h reverse.h
../config/s.h mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h \
memory.h major_gc.h freelist.h minor_gc.h reverse.h
fail.pic.o: fail.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h fail.h io.h gc.h memory.h major_gc.h freelist.h \
minor_gc.h printexc.h signals.h stacks.h
../config/s.h mlvalues.h fail.h io.h gc.h memory.h major_gc.h \
freelist.h minor_gc.h printexc.h signals.h stacks.h
finalise.pic.o: finalise.c callback.h compatibility.h mlvalues.h config.h \
../config/m.h ../config/s.h misc.h fail.h roots.h memory.h gc.h \
major_gc.h freelist.h minor_gc.h signals.h
../config/m.h ../config/s.h misc.h fail.h roots.h memory.h gc.h \
major_gc.h freelist.h minor_gc.h signals.h
fix_code.pic.o: fix_code.c config.h ../config/m.h ../config/s.h \
compatibility.h debugger.h misc.h mlvalues.h fix_code.h instruct.h md5.h \
io.h memory.h gc.h major_gc.h freelist.h minor_gc.h reverse.h
compatibility.h debugger.h misc.h mlvalues.h fix_code.h instruct.h \
md5.h io.h memory.h gc.h major_gc.h freelist.h minor_gc.h reverse.h
floats.pic.o: floats.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h reverse.h stacks.h
../config/s.h mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h reverse.h stacks.h
freelist.pic.o: freelist.c config.h ../config/m.h ../config/s.h \
compatibility.h freelist.h misc.h mlvalues.h gc.h gc_ctrl.h memory.h \
major_gc.h minor_gc.h
compatibility.h freelist.h misc.h mlvalues.h gc.h gc_ctrl.h memory.h \
major_gc.h minor_gc.h
gc_ctrl.pic.o: gc_ctrl.c alloc.h compatibility.h misc.h config.h \
../config/m.h ../config/s.h mlvalues.h compact.h custom.h finalise.h \
roots.h memory.h gc.h major_gc.h freelist.h minor_gc.h gc_ctrl.h \
stacks.h
../config/m.h ../config/s.h mlvalues.h compact.h custom.h finalise.h \
roots.h memory.h gc.h major_gc.h freelist.h minor_gc.h gc_ctrl.h \
stacks.h
globroots.pic.o: globroots.c memory.h compatibility.h config.h ../config/m.h \
../config/s.h gc.h mlvalues.h misc.h major_gc.h freelist.h minor_gc.h \
roots.h globroots.h
../config/s.h gc.h mlvalues.h misc.h major_gc.h freelist.h minor_gc.h \
roots.h globroots.h
hash.pic.o: hash.c mlvalues.h compatibility.h config.h ../config/m.h \
../config/s.h misc.h custom.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h
../config/s.h misc.h custom.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h
instrtrace.pic.o: instrtrace.c
intern.pic.o: intern.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h \
memory.h major_gc.h freelist.h minor_gc.h reverse.h
../config/s.h mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h \
memory.h major_gc.h freelist.h minor_gc.h reverse.h
interp.pic.o: interp.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h backtrace.h callback.h debugger.h fail.h \
fix_code.h instrtrace.h instruct.h interp.h major_gc.h freelist.h \
memory.h gc.h minor_gc.h prims.h signals.h stacks.h jumptbl.h
../config/s.h mlvalues.h backtrace.h callback.h debugger.h fail.h \
fix_code.h instrtrace.h instruct.h interp.h major_gc.h freelist.h \
memory.h gc.h minor_gc.h prims.h signals.h stacks.h jumptbl.h
ints.pic.o: ints.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h custom.h fail.h intext.h io.h fix_code.h \
memory.h gc.h major_gc.h freelist.h minor_gc.h int64_native.h
../config/s.h mlvalues.h custom.h fail.h intext.h io.h fix_code.h \
memory.h gc.h major_gc.h freelist.h minor_gc.h int64_native.h
io.pic.o: io.c config.h ../config/m.h ../config/s.h compatibility.h alloc.h \
misc.h mlvalues.h custom.h fail.h io.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h signals.h sys.h
misc.h mlvalues.h custom.h fail.h io.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h signals.h sys.h
lexing.pic.o: lexing.c fail.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h stacks.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h
../config/s.h mlvalues.h stacks.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h
main.pic.o: main.c misc.h compatibility.h config.h ../config/m.h \
../config/s.h mlvalues.h sys.h
../config/s.h mlvalues.h sys.h
major_gc.pic.o: major_gc.c compact.h config.h ../config/m.h ../config/s.h \
compatibility.h misc.h custom.h mlvalues.h fail.h finalise.h roots.h \
memory.h gc.h major_gc.h freelist.h minor_gc.h gc_ctrl.h weak.h
compatibility.h misc.h custom.h mlvalues.h fail.h finalise.h roots.h \
memory.h gc.h major_gc.h freelist.h minor_gc.h gc_ctrl.h weak.h
md5.pic.o: md5.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h fail.h md5.h io.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h reverse.h
../config/s.h mlvalues.h fail.h md5.h io.h memory.h gc.h major_gc.h \
freelist.h minor_gc.h reverse.h
memory.pic.o: memory.c fail.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h freelist.h gc.h gc_ctrl.h major_gc.h memory.h \
minor_gc.h signals.h
../config/s.h mlvalues.h freelist.h gc.h gc_ctrl.h major_gc.h memory.h \
minor_gc.h signals.h
meta.pic.o: meta.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h fail.h fix_code.h interp.h intext.h io.h \
major_gc.h freelist.h memory.h gc.h minor_gc.h prims.h stacks.h
../config/s.h mlvalues.h fail.h fix_code.h interp.h intext.h io.h \
major_gc.h freelist.h memory.h gc.h minor_gc.h prims.h stacks.h
minor_gc.pic.o: minor_gc.c config.h ../config/m.h ../config/s.h \
compatibility.h fail.h misc.h mlvalues.h finalise.h roots.h memory.h \
gc.h major_gc.h freelist.h minor_gc.h gc_ctrl.h signals.h weak.h
compatibility.h fail.h misc.h mlvalues.h finalise.h roots.h memory.h \
gc.h major_gc.h freelist.h minor_gc.h gc_ctrl.h signals.h weak.h
misc.pic.o: misc.c config.h ../config/m.h ../config/s.h compatibility.h \
misc.h memory.h gc.h mlvalues.h major_gc.h freelist.h minor_gc.h
misc.h memory.h gc.h mlvalues.h major_gc.h freelist.h minor_gc.h
obj.pic.o: obj.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h fail.h gc.h interp.h major_gc.h freelist.h \
memory.h minor_gc.h prims.h
../config/s.h mlvalues.h fail.h gc.h interp.h major_gc.h freelist.h \
memory.h minor_gc.h prims.h
parsing.pic.o: parsing.c config.h ../config/m.h ../config/s.h compatibility.h \
mlvalues.h misc.h memory.h gc.h major_gc.h freelist.h minor_gc.h alloc.h
mlvalues.h misc.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
alloc.h
prims.pic.o: prims.c mlvalues.h compatibility.h config.h ../config/m.h \
../config/s.h misc.h prims.h
../config/s.h misc.h prims.h
printexc.pic.o: printexc.c backtrace.h mlvalues.h compatibility.h config.h \
../config/m.h ../config/s.h misc.h callback.h debugger.h fail.h \
printexc.h
../config/m.h ../config/s.h misc.h callback.h debugger.h fail.h \
printexc.h
roots.pic.o: roots.c finalise.h roots.h misc.h compatibility.h config.h \
../config/m.h ../config/s.h memory.h gc.h mlvalues.h major_gc.h \
freelist.h minor_gc.h globroots.h stacks.h
../config/m.h ../config/s.h memory.h gc.h mlvalues.h major_gc.h \
freelist.h minor_gc.h globroots.h stacks.h
signals.pic.o: signals.c alloc.h compatibility.h misc.h config.h \
../config/m.h ../config/s.h mlvalues.h callback.h fail.h memory.h gc.h \
major_gc.h freelist.h minor_gc.h roots.h signals.h signals_machdep.h \
sys.h
../config/m.h ../config/s.h mlvalues.h callback.h fail.h memory.h gc.h \
major_gc.h freelist.h minor_gc.h roots.h signals.h signals_machdep.h \
sys.h
signals_byt.pic.o: signals_byt.c config.h ../config/m.h ../config/s.h \
compatibility.h memory.h gc.h mlvalues.h misc.h major_gc.h freelist.h \
minor_gc.h osdeps.h signals.h signals_machdep.h
compatibility.h memory.h gc.h mlvalues.h misc.h major_gc.h freelist.h \
minor_gc.h osdeps.h signals.h signals_machdep.h
stacks.pic.o: stacks.c config.h ../config/m.h ../config/s.h compatibility.h \
fail.h misc.h mlvalues.h stacks.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h
fail.h misc.h mlvalues.h stacks.h memory.h gc.h major_gc.h freelist.h \
minor_gc.h
startup.pic.o: startup.c config.h ../config/m.h ../config/s.h compatibility.h \
alloc.h misc.h mlvalues.h backtrace.h callback.h custom.h debugger.h \
dynlink.h exec.h fail.h fix_code.h freelist.h gc_ctrl.h instrtrace.h \
interp.h intext.h io.h memory.h gc.h major_gc.h minor_gc.h osdeps.h \
prims.h printexc.h reverse.h signals.h stacks.h sys.h startup.h \
version.h
alloc.h misc.h mlvalues.h backtrace.h callback.h custom.h debugger.h \
dynlink.h exec.h fail.h fix_code.h freelist.h gc_ctrl.h instrtrace.h \
interp.h intext.h io.h memory.h gc.h major_gc.h minor_gc.h osdeps.h \
prims.h printexc.h reverse.h signals.h stacks.h sys.h startup.h \
version.h
str.pic.o: str.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h fail.h
../config/s.h mlvalues.h fail.h
sys.pic.o: sys.c config.h ../config/m.h ../config/s.h compatibility.h alloc.h \
misc.h mlvalues.h debugger.h fail.h instruct.h osdeps.h signals.h \
stacks.h memory.h gc.h major_gc.h freelist.h minor_gc.h sys.h
misc.h mlvalues.h debugger.h fail.h instruct.h osdeps.h signals.h \
stacks.h memory.h gc.h major_gc.h freelist.h minor_gc.h sys.h
terminfo.pic.o: terminfo.c config.h ../config/m.h ../config/s.h \
compatibility.h alloc.h misc.h mlvalues.h fail.h io.h
compatibility.h alloc.h misc.h mlvalues.h fail.h io.h
unix.pic.o: unix.c config.h ../config/m.h ../config/s.h compatibility.h \
memory.h gc.h mlvalues.h misc.h major_gc.h freelist.h minor_gc.h \
osdeps.h
memory.h gc.h mlvalues.h misc.h major_gc.h freelist.h minor_gc.h \
osdeps.h
weak.pic.o: weak.c alloc.h compatibility.h misc.h config.h ../config/m.h \
../config/s.h mlvalues.h fail.h major_gc.h freelist.h memory.h gc.h \
minor_gc.h
../config/s.h mlvalues.h fail.h major_gc.h freelist.h memory.h gc.h \
minor_gc.h

View File

@ -16,7 +16,7 @@
include Makefile.common
CFLAGS=-DCAML_NAME_SPACE -O $(BYTECCCOMPOPTS) $(IFLEXDIR)
DFLAGS=-DCAML_NAME_SPACE -g -DDEBUG $(BYTECCCOMPOPTS)
DFLAGS=-DCAML_NAME_SPACE -g -DDEBUG $(BYTECCCOMPOPTS) $(IFLEXDIR)
OBJS=$(COMMONOBJS) unix.o main.o
DOBJS=$(OBJS:.o=.d.o) instrtrace.d.o

View File

@ -204,13 +204,16 @@ char * caml_dlerror(void)
#ifndef RTLD_GLOBAL
#define RTLD_GLOBAL 0
#endif
#ifndef RTLD_LOCAL
#define RTLD_LOCAL 0
#endif
#ifndef RTLD_NODELETE
#define RTLD_NODELETE 0
#endif
void * caml_dlopen(char * libname, int for_execution, int global)
{
return dlopen(libname, RTLD_NOW | (global ? RTLD_GLOBAL : 0) | RTLD_NODELETE);
return dlopen(libname, RTLD_NOW | (global ? RTLD_GLOBAL : RTLD_LOCAL) | RTLD_NODELETE);
/* Could use RTLD_LAZY if for_execution == 0, but needs testing */
}

View File

@ -3,6 +3,34 @@
[ BTrue
| BFalse
| BAnt of string ]
and rec_flag =
[ ReRecursive
| ReNil
| ReAnt of string ]
and direction_flag =
[ DiTo
| DiDownto
| DiAnt of string ]
and mutable_flag =
[ MuMutable
| MuNil
| MuAnt of string ]
and private_flag =
[ PrPrivate
| PrNil
| PrAnt of string ]
and virtual_flag =
[ ViVirtual
| ViNil
| ViAnt of string ]
and override_flag =
[ OvOverride
| OvNil
| OvAnt of string ]
and row_var_flag =
[ RvRowVar
| RvNil
| RvAnt of string ]
and meta_option 'a =
[ ONone
| OSome of 'a
@ -30,7 +58,7 @@
(* type t 'a 'b 'c = t constraint t = t constraint t = t *)
| TyDcl of loc and string and list ctyp and ctyp and list (ctyp * ctyp)
(* < (t)? (..)? > *) (* < move : int -> 'a .. > as 'a *)
| TyObj of loc and ctyp and meta_bool
| TyObj of loc and ctyp and row_var_flag
| TyOlb of loc and string and ctyp (* ?s:t *)
| TyPol of loc and ctyp and ctyp (* ! t . t *) (* ! 'a . list 'a -> 'a *)
| TyQuo of loc and string (* 's *)
@ -105,7 +133,7 @@
| ExCoe of loc and expr and ctyp and ctyp (* (e : t) or (e : t :> t) *)
| ExFlo of loc and string (* 3.14 *)
(* for s = e to/downto e do { e } *)
| ExFor of loc and string and expr and expr and meta_bool and expr
| ExFor of loc and string and expr and expr and direction_flag and expr
| ExFun of loc and match_case (* fun [ mc ] *)
| ExIfe of loc and expr and expr and expr (* if e then e else e *)
| ExInt of loc and string (* 42 *)
@ -115,7 +143,7 @@
| ExLab of loc and string and expr (* ~s or ~s:e *)
| ExLaz of loc and expr (* lazy e *)
(* let b in e or let rec b in e *)
| ExLet of loc and meta_bool and binding and expr
| ExLet of loc and rec_flag and binding and expr
(* let module s = me in e *)
| ExLmd of loc and string and module_expr and expr
(* match e with [ mc ] *)
@ -287,12 +315,12 @@
(* type t *)
| StTyp of loc and ctyp
(* value (rec)? bi *)
| StVal of loc and meta_bool and binding
| StVal of loc and rec_flag and binding
| StAnt of loc and string (* $s$ *) ]
and class_type =
[ CtNil of loc
(* (virtual)? i ([ t ])? *)
| CtCon of loc and meta_bool and ident and ctyp
| CtCon of loc and virtual_flag and ident and ctyp
(* [t] -> ct *)
| CtFun of loc and ctyp and class_type
(* object ((t))? (csg)? end *)
@ -314,22 +342,22 @@
(* inherit ct *)
| CgInh of loc and class_type
(* method s : t or method private s : t *)
| CgMth of loc and string and meta_bool and ctyp
| CgMth of loc and string and private_flag and ctyp
(* value (virtual)? (mutable)? s : t *)
| CgVal of loc and string and meta_bool and meta_bool and ctyp
(* method virtual (mutable)? s : t *)
| CgVir of loc and string and meta_bool and ctyp
| CgVal of loc and string and mutable_flag and virtual_flag and ctyp
(* method virtual (private)? s : t *)
| CgVir of loc and string and private_flag and ctyp
| CgAnt of loc and string (* $s$ *) ]
and class_expr =
[ CeNil of loc
(* ce e *)
| CeApp of loc and class_expr and expr
(* (virtual)? i ([ t ])? *)
| CeCon of loc and meta_bool and ident and ctyp
| CeCon of loc and virtual_flag and ident and ctyp
(* fun p -> ce *)
| CeFun of loc and patt and class_expr
(* let (rec)? bi in ce *)
| CeLet of loc and meta_bool and binding and class_expr
| CeLet of loc and rec_flag and binding and class_expr
(* object ((p))? (cst)? end *)
| CeStr of loc and patt and class_str_item
(* ce : ct *)
@ -346,16 +374,16 @@
| CrSem of loc and class_str_item and class_str_item
(* type t = t *)
| CrCtr of loc and ctyp and ctyp
(* inherit ce or inherit ce as s *)
| CrInh of loc and class_expr and string
(* inherit(!)? ce (as s)? *)
| CrInh of loc and override_flag and class_expr and string
(* initializer e *)
| CrIni of loc and expr
(* method (private)? s : t = e or method (private)? s = e *)
| CrMth of loc and string and meta_bool and expr and ctyp
(* value (mutable)? s = e *)
| CrVal of loc and string and meta_bool and expr
(* method(!)? (private)? s : t = e or method(!)? (private)? s = e *)
| CrMth of loc and string and override_flag and private_flag and expr and ctyp
(* value(!)? (mutable)? s = e *)
| CrVal of loc and string and override_flag and mutable_flag and expr
(* method virtual (private)? s : t *)
| CrVir of loc and string and meta_bool and ctyp
(* value virtual (private)? s : t *)
| CrVvr of loc and string and meta_bool and ctyp
| CrVir of loc and string and private_flag and ctyp
(* value virtual (mutable)? s : t *)
| CrVvr of loc and string and mutable_flag and ctyp
| CrAnt of loc and string (* $s$ *) ];

View File

@ -87,6 +87,7 @@ module Make (Ast : Sig.Camlp4Ast)
value ctyp = Gram.Entry.mk "ctyp";
value cvalue_binding = Gram.Entry.mk "cvalue_binding";
value direction_flag = Gram.Entry.mk "direction_flag";
value direction_flag_quot = Gram.Entry.mk "direction_flag_quot";
value dummy = Gram.Entry.mk "dummy";
value entry_eoi = Gram.Entry.mk "entry_eoi";
value eq_expr = Gram.Entry.mk "eq_expr";
@ -133,16 +134,23 @@ module Make (Ast : Sig.Camlp4Ast)
value opt_class_structure = Gram.Entry.mk "opt_class_structure";
value opt_comma_ctyp = Gram.Entry.mk "opt_comma_ctyp";
value opt_dot_dot = Gram.Entry.mk "opt_dot_dot";
value row_var_flag_quot = Gram.Entry.mk "row_var_flag_quot";
value opt_eq_ctyp = Gram.Entry.mk "opt_eq_ctyp";
value opt_expr = Gram.Entry.mk "opt_expr";
value opt_meth_list = Gram.Entry.mk "opt_meth_list";
value opt_mutable = Gram.Entry.mk "opt_mutable";
value mutable_flag_quot = Gram.Entry.mk "mutable_flag_quot";
value opt_polyt = Gram.Entry.mk "opt_polyt";
value opt_private = Gram.Entry.mk "opt_private";
value private_flag_quot = Gram.Entry.mk "private_flag_quot";
value opt_rec = Gram.Entry.mk "opt_rec";
value rec_flag_quot = Gram.Entry.mk "rec_flag_quot";
value opt_sig_items = Gram.Entry.mk "opt_sig_items";
value opt_str_items = Gram.Entry.mk "opt_str_items";
value opt_virtual = Gram.Entry.mk "opt_virtual";
value virtual_flag_quot = Gram.Entry.mk "virtual_flag_quot";
value opt_override = Gram.Entry.mk "opt_override";
value override_flag_quot = Gram.Entry.mk "override_flag_quot";
value opt_when_expr = Gram.Entry.mk "opt_when_expr";
value patt = Gram.Entry.mk "patt";
value patt_as_patt_opt = Gram.Entry.mk "patt_as_patt_opt";

View File

@ -56,7 +56,7 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
fun
[ Ast.LNil -> []
| Ast.LCons x xs -> [x :: list_of_meta_list xs]
| Ast.LAnt x -> assert False ];
| Ast.LAnt _ -> assert False ];
value meta_list elt sep f mxs =
let xs = list_of_meta_list mxs in
@ -135,7 +135,7 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
let (pl, e) = expr_fun_args e in
([`patt p :: pl], e)
else ([], ge)
| Ast.ExFUN _ i e ->
| <:expr< fun (type $i$) -> $e$ >> ->
let (pl, e) = expr_fun_args e in
([`newtype i :: pl], e)
| ge -> ([], ge) ];
@ -169,13 +169,14 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
method reset = {< pipe = False; semi = False >};
value semisep : sep = ";;";
value andsep : sep = "@]@ @[<2>and@ ";
value value_val = "val";
value value_let = "let";
value mode = if comments then `comments else `no_comments;
value curry_constr = init_curry_constr;
value var_conversion = False;
method andsep : sep = "@]@ @[<2>and@ ";
method value_val = "val";
method value_let = "let";
method semisep = semisep;
method set_semisep s = {< semisep = s >};
method set_comments b = {< mode = if b then `comments else `no_comments >};
@ -232,15 +233,31 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
pp f "@[<1>%a,@ %a@]" o#class_params t1 o#class_params t2
| x -> o#ctyp f x ];
method mutable_flag f b = o#flag f b "mutable";
method rec_flag f b = o#flag f b "rec";
method virtual_flag f b = o#flag f b "virtual";
method private_flag f b = o#flag f b "private";
method flag f b n =
match b with
[ Ast.BTrue -> do { pp_print_string f n; pp f "@ " }
| Ast.BFalse -> ()
| Ast.BAnt s -> o#anti f s ];
method override_flag f =
fun
[ Ast.OvOverride -> pp f "!"
| Ast.OvNil -> ()
| Ast.OvAnt s -> o#anti f s ];
method mutable_flag f = fun
[ Ast.MuMutable -> pp f "mutable@ "
| Ast.MuNil -> ()
| Ast.MuAnt s -> o#anti f s ];
method rec_flag f = fun
[ Ast.ReRecursive -> pp f "rec@ "
| Ast.ReNil -> ()
| Ast.ReAnt s -> o#anti f s ];
method virtual_flag f = fun
[ Ast.ViVirtual -> pp f "virtual@ "
| Ast.ViNil -> ()
| Ast.ViAnt s -> o#anti f s ];
method private_flag f = fun
[ Ast.PrPrivate -> pp f "private@ "
| Ast.PrNil -> ()
| Ast.PrAnt s -> o#anti f s ];
method anti f s = pp f "$%s$" s;
@ -283,7 +300,7 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
match bi with
[ <:binding<>> -> ()
| <:binding< $b1$ and $b2$ >> ->
do { o#binding f b1; pp f andsep; o#binding f b2 }
do { o#binding f b1; pp f o#andsep; o#binding f b2 }
| <:binding< $p$ = $e$ >> ->
let (pl, e) =
match p with
@ -383,7 +400,7 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
pp f "@[<2>%a :@ %a@]" o#var s o#module_type mt
| <:module_binding< $mb1$ and $mb2$ >> ->
do { o#module_rec_binding f mb1;
pp f andsep;
pp f o#andsep;
o#module_rec_binding f mb2 }
| <:module_binding< $anti:s$ >> -> o#anti f s ];
@ -441,7 +458,9 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
| [_] -> pp f "@[<2>%a@ %a@]" o#apply_expr x o#apply_expr y
| al ->
pp f "@[<2>%a@ (%a)@]" o#apply_expr a
(list o#under_pipe#expr ",@ ") al ]
(* The #apply_expr below may put too much parens.
However using #expr would be wrong: PR#5056. *)
(list o#under_pipe#apply_expr ",@ ") al ]
else pp f "@[<2>%a@]" (list o#apply_expr "@ ") [a::al]
| <:expr< $e1$.val := $e2$ >> ->
pp f "@[<2>%a :=@ %a@]" o#dot_expr e1 o#expr e2
@ -451,7 +470,7 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
pp f "@[<2>fun@ _@ ->@ %a@]" o#raise_match_failure loc
| <:expr< fun $p$ -> $e$ >> when is_irrefut_patt p ->
pp f "@[<2>fun@ %a@]" o#patt_expr_fun_args (`patt p, e)
| Ast.ExFUN _ i e ->
| <:expr< fun (type $i$) -> $e$ >> ->
pp f "@[<2>fun@ %a@]" o#patt_expr_fun_args (`newtype i, e)
| <:expr< fun [ $a$ ] >> ->
pp f "@[<hv0>function%a@]" o#match_case a
@ -563,7 +582,7 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
| <:expr< $_$ $_$ >> | <:expr< $_$ . $_$ >> | <:expr< $_$ . ( $_$ ) >> |
<:expr< $_$ . [ $_$ ] >> | <:expr< $_$ := $_$ >> |
<:expr< $_$ # $_$ >> |
<:expr< fun [ $_$ ] >> | Ast.ExFUN _ _ _ | <:expr< match $_$ with [ $_$ ] >> |
<:expr< fun [ $_$ ] >> | <:expr< fun (type $_$) -> $_$ >> | <:expr< match $_$ with [ $_$ ] >> |
<:expr< try $_$ with [ $_$ ] >> |
<:expr< if $_$ then $_$ else $_$ >> |
<:expr< let $rec:_$ $_$ in $_$ >> |
@ -576,9 +595,9 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
method direction_flag f b =
match b with
[ Ast.BTrue -> pp_print_string f "to"
| Ast.BFalse -> pp_print_string f "downto"
| Ast.BAnt s -> o#anti f s ];
[ Ast.DiTo -> pp_print_string f "to"
| Ast.DiDownto -> pp_print_string f "downto"
| Ast.DiAnt s -> o#anti f s ];
method patt f p =
let () = o#node f p Ast.loc_of_patt in match p with
@ -694,8 +713,6 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
(list o#simple_ctyp "@ ") [a::al]
| <:ctyp< [ > $t$ ] >> -> pp f "@[<2>[>@ %a@]@,]" o#sum_type t
| <:ctyp< # $i$ >> -> pp f "@[<2>#%a@]" o#ident i
| <:ctyp< $t1$ == $t2$ >> ->
pp f "@[<2>%a =@ %a@]" o#simple_ctyp t1 o#simple_ctyp t2
| <:ctyp< `$s$ >> -> pp f "`%a" o#var s
| <:ctyp< $t1$ * $t2$ >> -> pp f "%a *@ %a" o#simple_ctyp t1 o#simple_ctyp t2
| <:ctyp<>> -> assert False
@ -721,6 +738,8 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
| <:ctyp< $t1$ and $t2$ >> -> pp f "%a@ and %a" o#ctyp t1 o#ctyp t2
| <:ctyp< mutable $t$ >> -> pp f "@[<2>mutable@ %a@]" o#ctyp t
| <:ctyp< $t1$ & $t2$ >> -> pp f "%a@ &@ %a" o#ctyp t1 o#ctyp t2
| <:ctyp< $t1$ == $t2$ >> ->
pp f "@[<2>%a =@ %a@]" o#simple_ctyp t1 o#ctyp t2
| Ast.TyDcl _ tn tp te cl -> do {
pp f "@[<2>%a%a@]" o#type_params tp o#var tn;
match te with
@ -787,7 +806,7 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
pp f "@[<hv0>@[<hv2>type %a@]%(%)@]" o#ctyp t semisep
| <:sig_item< value $s$ : $t$ >> ->
pp f "@[<2>%s %a :@ %a%(%)@]"
value_val o#var s o#ctyp t semisep
o#value_val o#var s o#ctyp t semisep
| <:sig_item< include $mt$ >> ->
pp f "@[<2>include@ %a%(%)@]" o#module_type mt semisep
| <:sig_item< class type $ct$ >> ->
@ -839,7 +858,7 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
| <:str_item< type $t$ >> ->
pp f "@[<hv0>@[<hv2>type %a@]%(%)@]" o#ctyp t semisep
| <:str_item< value $rec:r$ $bi$ >> ->
pp f "@[<2>%s %a%a%(%)@]" value_let o#rec_flag r o#binding bi semisep
pp f "@[<2>%s %a%a%(%)@]" o#value_let o#rec_flag r o#binding bi semisep
| <:str_item< $exp:e$ >> ->
pp f "@[<2>let _ =@ %a%(%)@]" o#expr e semisep
| <:str_item< include $me$ >> ->
@ -882,7 +901,7 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
| <:with_constr< module $i1$ := $i2$ >> ->
pp f "@[<2>module@ %a :=@ %a@]" o#ident i1 o#ident i2
| <:with_constr< $wc1$ and $wc2$ >> ->
do { o#with_constraint f wc1; pp f andsep; o#with_constraint f wc2 }
do { o#with_constraint f wc1; pp f o#andsep; o#with_constraint f wc2 }
| <:with_constr< $anti:s$ >> -> o#anti f s ];
method module_expr f me =
@ -909,9 +928,9 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
| <:module_expr< ( $me$ : $mt$ ) >> ->
pp f "@[<1>(%a :@ %a)@]" o#module_expr me o#module_type mt
| <:module_expr< (value $e$ : $mt$ ) >> ->
pp f "@[<1>(%s %a :@ %a)@]" value_val o#expr e o#module_type mt
pp f "@[<1>(%s %a :@ %a)@]" o#value_val o#expr e o#module_type mt
| <:module_expr< (value $e$ ) >> ->
pp f "@[<1>(%s %a)@]" value_val o#expr e
pp f "@[<1>(%s %a)@]" o#value_val o#expr e
];
method class_expr f ce =
@ -941,7 +960,7 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
pp f "@[<1>(%a :@ %a)@]" o#class_expr ce o#class_type ct
| <:class_expr< $anti:s$ >> -> o#anti f s
| <:class_expr< $ce1$ and $ce2$ >> ->
do { o#class_expr f ce1; pp f andsep; o#class_expr f ce2 }
do { o#class_expr f ce1; pp f o#andsep; o#class_expr f ce2 }
| <:class_expr< $ce1$ = fun $p$ -> $ce2$ >> when is_irrefut_patt p ->
pp f "@[<2>%a@ %a" o#class_expr ce1
o#patt_class_expr_fun_args (p, ce2)
@ -969,7 +988,7 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
o#ctyp t o#class_sig_item csg
| <:class_type< $anti:s$ >> -> o#anti f s
| <:class_type< $ct1$ and $ct2$ >> ->
do { o#class_type f ct1; pp f andsep; o#class_type f ct2 }
do { o#class_type f ct1; pp f o#andsep; o#class_type f ct2 }
| <:class_type< $ct1$ : $ct2$ >> ->
pp f "%a :@ %a" o#class_type ct1 o#class_type ct2
| <:class_type< $ct1$ = $ct2$ >> ->
@ -997,7 +1016,7 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
o#private_flag pr o#var s o#ctyp t semisep
| <:class_sig_item< value $mutable:mu$ $virtual:vi$ $s$ : $t$ >> ->
pp f "@[<2>%s %a%a%a :@ %a%(%)@]"
value_val o#mutable_flag mu o#virtual_flag vi o#var s o#ctyp t
o#value_val o#mutable_flag mu o#virtual_flag vi o#var s o#ctyp t
semisep
| <:class_sig_item< $anti:s$ >> ->
pp f "%a%(%)" o#anti s semisep ];
@ -1013,27 +1032,27 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
do { o#class_str_item f cst1; cut f; o#class_str_item f cst2 }
| <:class_str_item< constraint $t1$ = $t2$ >> ->
pp f "@[<2>constraint %a =@ %a%(%)@]" o#ctyp t1 o#ctyp t2 semisep
| <:class_str_item< inherit $ce$ >> ->
pp f "@[<2>inherit@ %a%(%)@]" o#class_expr ce semisep
| <:class_str_item< inherit $ce$ as $lid:s$ >> ->
pp f "@[<2>inherit@ %a as@ %a%(%)@]" o#class_expr ce o#var s semisep
| <:class_str_item< inherit $override:ov$ $ce$ >> ->
pp f "@[<2>inherit%a@ %a%(%)@]" o#override_flag ov o#class_expr ce semisep
| <:class_str_item< inherit $override:ov$ $ce$ as $lid:s$ >> ->
pp f "@[<2>inherit%a@ %a as@ %a%(%)@]" o#override_flag ov o#class_expr ce o#var s semisep
| <:class_str_item< initializer $e$ >> ->
pp f "@[<2>initializer@ %a%(%)@]" o#expr e semisep
| <:class_str_item< method $private:pr$ $s$ = $e$ >> ->
pp f "@[<2>method %a%a =@ %a%(%)@]"
o#private_flag pr o#var s o#expr e semisep
| <:class_str_item< method $private:pr$ $s$ : $t$ = $e$ >> ->
pp f "@[<2>method %a%a :@ %a =@ %a%(%)@]"
o#private_flag pr o#var s o#ctyp t o#expr e semisep
| <:class_str_item< method $override:ov$ $private:pr$ $s$ = $e$ >> ->
pp f "@[<2>method%a %a%a =@ %a%(%)@]"
o#override_flag ov o#private_flag pr o#var s o#expr e semisep
| <:class_str_item< method $override:ov$ $private:pr$ $s$ : $t$ = $e$ >> ->
pp f "@[<2>method%a %a%a :@ %a =@ %a%(%)@]"
o#override_flag ov o#private_flag pr o#var s o#ctyp t o#expr e semisep
| <:class_str_item< method virtual $private:pr$ $s$ : $t$ >> ->
pp f "@[<2>method virtual@ %a%a :@ %a%(%)@]"
o#private_flag pr o#var s o#ctyp t semisep
| <:class_str_item< value virtual $mutable:mu$ $s$ : $t$ >> ->
pp f "@[<2>%s virtual %a%a :@ %a%(%)@]"
value_val o#mutable_flag mu o#var s o#ctyp t semisep
| <:class_str_item< value $mutable:mu$ $s$ = $e$ >> ->
pp f "@[<2>%s %a%a =@ %a%(%)@]"
value_val o#mutable_flag mu o#var s o#expr e semisep
o#value_val o#mutable_flag mu o#var s o#ctyp t semisep
| <:class_str_item< value $override:ov$ $mutable:mu$ $s$ = $e$ >> ->
pp f "@[<2>%s%a %a%a =@ %a%(%)@]"
o#value_val o#override_flag ov o#mutable_flag mu o#var s o#expr e semisep
| <:class_str_item< $anti:s$ >> ->
pp f "%a%(%)" o#anti s semisep ];

View File

@ -68,8 +68,9 @@ module Make (Syntax : Sig.Camlp4Syntax) : sig
value pipe : bool;
value semi : bool;
value semisep : sep;
value value_val : string;
value value_let : string;
method value_val : string;
method value_let : string;
method andsep : sep;
method anti : formatter -> string -> unit;
method class_declaration :
formatter -> Ast.class_expr -> unit;
@ -113,10 +114,10 @@ module Make (Syntax : Sig.Camlp4Syntax) : sig
option Ast.module_type);
method module_rec_binding : formatter -> Ast.module_binding -> unit;
method module_type : formatter -> Ast.module_type -> unit;
method mutable_flag : formatter -> Ast.meta_bool -> unit;
method direction_flag : formatter -> Ast.meta_bool -> unit;
method rec_flag : formatter -> Ast.meta_bool -> unit;
method flag : formatter -> Ast.meta_bool -> string -> unit;
method override_flag : formatter -> Ast.override_flag -> unit;
method mutable_flag : formatter -> Ast.mutable_flag -> unit;
method direction_flag : formatter -> Ast.direction_flag -> unit;
method rec_flag : formatter -> Ast.rec_flag -> unit;
method node : formatter -> 'b -> ('b -> Loc.t) -> unit;
method patt : formatter -> Ast.patt -> unit;
method patt1 : formatter -> Ast.patt -> unit;
@ -130,8 +131,8 @@ module Make (Syntax : Sig.Camlp4Syntax) : sig
method patt_class_expr_fun_args :
formatter -> (Ast.patt * Ast.class_expr) -> unit;
method print_comments_before : Loc.t -> formatter -> unit;
method private_flag : formatter -> Ast.meta_bool -> unit;
method virtual_flag : formatter -> Ast.meta_bool -> unit;
method private_flag : formatter -> Ast.private_flag -> unit;
method virtual_flag : formatter -> Ast.virtual_flag -> unit;
method quoted_string : formatter -> string -> unit;
method raise_match_failure : formatter -> Loc.t -> unit;
method reset : 'a;

View File

@ -43,14 +43,14 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
object (o)
inherit PP_o.printer ~curry_constr:init_curry_constr ~comments () as super;
value semisep : sep = ";";
value andsep : sep = "@]@ @[<2>and@ ";
value value_val = "value";
value value_let = "value";
value! semisep : sep = ";";
value mode = if comments then `comments else `no_comments;
value curry_constr = init_curry_constr;
value first_match_case = True;
method andsep : sep = "@]@ @[<2>and@ ";
method value_val = "value";
method value_let = "value";
method under_pipe = o;
method under_semi = o;
method reset_semi = o;
@ -164,7 +164,7 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
pp f "@[<2>%a@ :=@ %a@]" o#dot_expr e1 o#expr e2
| <:expr< fun $p$ -> $e$ >> when Ast.is_irrefut_patt p ->
pp f "@[<2>fun@ %a@]" o#patt_expr_fun_args (`patt p, e)
| Ast.ExFUN _ i e ->
| <:expr< fun (type $i$) -> $e$ >> ->
pp f "@[<2>fun@ %a@]" o#patt_expr_fun_args (`newtype i, e)
| <:expr< fun [ $a$ ] >> ->
pp f "@[<hv0>fun%a@]" o#match_case a
@ -272,9 +272,16 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
end;
value with_outfile = with_outfile;
value print = print;
value print_interf = print_interf;
value print_implem = print_implem;
value print output_file fct =
let o = new printer () in
with_outfile output_file (fct o);
value print_interf ?input_file:(_) ?output_file sg =
print output_file (fun o -> o#interf) sg;
value print_implem ?input_file:(_) ?output_file st =
print output_file (fun o -> o#implem) st;
end;

View File

@ -222,6 +222,13 @@ module type Ast = sig
type binding;
type rec_binding;
type module_binding;
type rec_flag;
type direction_flag;
type mutable_flag;
type private_flag;
type virtual_flag;
type row_var_flag;
type override_flag;
(** {6 Location accessors} *)
@ -286,6 +293,13 @@ module type Ast = sig
method module_binding : module_binding -> module_binding;
method match_case : match_case -> match_case;
method ident : ident -> ident;
method override_flag : override_flag -> override_flag;
method mutable_flag : mutable_flag -> mutable_flag;
method private_flag : private_flag -> private_flag;
method virtual_flag : virtual_flag -> virtual_flag;
method direction_flag : direction_flag -> direction_flag;
method rec_flag : rec_flag -> rec_flag;
method row_var_flag : row_var_flag -> row_var_flag;
method unknown : ! 'a. 'a -> 'a;
end;
@ -315,6 +329,13 @@ module type Ast = sig
method module_binding : module_binding -> 'self_type;
method match_case : match_case -> 'self_type;
method ident : ident -> 'self_type;
method rec_flag : rec_flag -> 'self_type;
method direction_flag : direction_flag -> 'self_type;
method mutable_flag : mutable_flag -> 'self_type;
method private_flag : private_flag -> 'self_type;
method virtual_flag : virtual_flag -> 'self_type;
method row_var_flag : row_var_flag -> 'self_type;
method override_flag : override_flag -> 'self_type;
method unknown : ! 'a. 'a -> 'self_type;
end;
@ -425,6 +446,13 @@ module type Camlp4Ast = sig
value meta_sig_item : loc -> sig_item -> expr;
value meta_str_item : loc -> str_item -> expr;
value meta_with_constr : loc -> with_constr -> expr;
value meta_rec_flag : loc -> rec_flag -> expr;
value meta_mutable_flag : loc -> mutable_flag -> expr;
value meta_virtual_flag : loc -> virtual_flag -> expr;
value meta_private_flag : loc -> private_flag -> expr;
value meta_row_var_flag : loc -> row_var_flag -> expr;
value meta_override_flag : loc -> override_flag -> expr;
value meta_direction_flag : loc -> direction_flag -> expr;
end;
module Patt : sig
value meta_string : loc -> string -> patt;
@ -450,6 +478,13 @@ module type Camlp4Ast = sig
value meta_sig_item : loc -> sig_item -> patt;
value meta_str_item : loc -> str_item -> patt;
value meta_with_constr : loc -> with_constr -> patt;
value meta_rec_flag : loc -> rec_flag -> patt;
value meta_mutable_flag : loc -> mutable_flag -> patt;
value meta_virtual_flag : loc -> virtual_flag -> patt;
value meta_private_flag : loc -> private_flag -> patt;
value meta_row_var_flag : loc -> row_var_flag -> patt;
value meta_override_flag : loc -> override_flag -> patt;
value meta_direction_flag : loc -> direction_flag -> patt;
end;
end;
end;
@ -480,6 +515,13 @@ module type Camlp4Ast = sig
method module_binding : module_binding -> module_binding;
method match_case : match_case -> match_case;
method ident : ident -> ident;
method mutable_flag : mutable_flag -> mutable_flag;
method private_flag : private_flag -> private_flag;
method virtual_flag : virtual_flag -> virtual_flag;
method direction_flag : direction_flag -> direction_flag;
method rec_flag : rec_flag -> rec_flag;
method row_var_flag : row_var_flag -> row_var_flag;
method override_flag : override_flag -> override_flag;
method unknown : ! 'a. 'a -> 'a;
end;
@ -509,6 +551,13 @@ module type Camlp4Ast = sig
method module_binding : module_binding -> 'self_type;
method match_case : match_case -> 'self_type;
method ident : ident -> 'self_type;
method rec_flag : rec_flag -> 'self_type;
method direction_flag : direction_flag -> 'self_type;
method mutable_flag : mutable_flag -> 'self_type;
method private_flag : private_flag -> 'self_type;
method virtual_flag : virtual_flag -> 'self_type;
method row_var_flag : row_var_flag -> 'self_type;
method override_flag : override_flag -> 'self_type;
method unknown : ! 'a. 'a -> 'self_type;
end;
@ -612,6 +661,13 @@ module Camlp4AstToAst (M : Camlp4Ast) : Ast
and type module_binding = M.module_binding
and type match_case = M.match_case
and type ident = M.ident
and type rec_flag = M.rec_flag
and type direction_flag = M.direction_flag
and type mutable_flag = M.mutable_flag
and type private_flag = M.private_flag
and type virtual_flag = M.virtual_flag
and type row_var_flag = M.row_var_flag
and type override_flag = M.override_flag
= M;
(** Concrete definition of Camlp4 ASTs abstracted from locations.
@ -909,6 +965,10 @@ module Grammar = struct
type tree;
type token_pattern = ((Token.t -> bool) * string);
type token_info;
type token_stream = Stream.t (Token.t * token_info);
value token_location : token_info -> Loc.t;
type symbol =
[ Smeta of string and list symbol and Action.t
@ -919,6 +979,7 @@ module Grammar = struct
| Slist1 of symbol
| Slist1sep of symbol and symbol
| Sopt of symbol
| Stry of symbol
| Sself
| Snext
| Stoken of token_pattern
@ -961,11 +1022,11 @@ module Grammar = struct
(** Make a new entry from a name and an hand made token parser. *)
value of_parser :
gram -> string -> (Stream.t (Token.t * Loc.t) -> 'a) -> t 'a;
gram -> string -> (token_stream -> 'a) -> t 'a;
(** Clear the entry and setup this parser instead. *)
value setup_parser :
t 'a -> (Stream.t (Token.t * Loc.t) -> 'a) -> unit;
t 'a -> (token_stream -> 'a) -> unit;
(** Get the entry name. *)
value name : t 'a -> string;
@ -1000,16 +1061,13 @@ module Grammar = struct
(* value sfold1sep : ('a -> 'b -> 'b) -> 'b -> foldsep _ 'a 'b; *)
(** Use the lexer to produce a non filtered token stream from a char stream. *)
value lex : gram -> Loc.t -> Stream.t char
-> not_filtered (Stream.t (Token.t * Loc.t));
value lex : gram -> Loc.t -> Stream.t char -> not_filtered (Stream.t (Token.t * Loc.t));
(** Token stream from string. *)
value lex_string : gram -> Loc.t -> string
-> not_filtered (Stream.t (Token.t * Loc.t));
value lex_string : gram -> Loc.t -> string -> not_filtered (Stream.t (Token.t * Loc.t));
(** Filter a token stream using the {!Token.Filter} module *)
value filter : gram -> not_filtered (Stream.t (Token.t * Loc.t))
-> Stream.t (Token.t * Loc.t);
value filter : gram -> not_filtered (Stream.t (Token.t * Loc.t)) -> token_stream;
(** Lex, filter and parse a stream of character. *)
value parse : Entry.t 'a -> Loc.t -> Stream.t char -> 'a;
@ -1023,7 +1081,7 @@ module Grammar = struct
(** Parse a token stream that is already filtered. *)
value parse_tokens_after_filter :
Entry.t 'a -> Stream.t (Token.t * Loc.t) -> 'a;
Entry.t 'a -> token_stream -> 'a;
end;
@ -1043,11 +1101,11 @@ module Grammar = struct
(** Make a new entry from a name and an hand made token parser. *)
value of_parser :
string -> (Stream.t (Token.t * Loc.t) -> 'a) -> t 'a;
string -> (token_stream -> 'a) -> t 'a;
(** Clear the entry and setup this parser instead. *)
value setup_parser :
t 'a -> (Stream.t (Token.t * Loc.t) -> 'a) -> unit;
t 'a -> (token_stream -> 'a) -> unit;
(** Get the entry name. *)
value name : t 'a -> string;
@ -1081,15 +1139,13 @@ module Grammar = struct
(* value sfold1sep : ('a -> 'b -> 'b) -> 'b -> foldsep _ 'a 'b; *)
(** Use the lexer to produce a non filtered token stream from a char stream. *)
value lex : Loc.t -> Stream.t char
-> not_filtered (Stream.t (Token.t * Loc.t));
value lex : Loc.t -> Stream.t char -> not_filtered (Stream.t (Token.t * Loc.t));
(** Token stream from string. *)
value lex_string : Loc.t -> string
-> not_filtered (Stream.t (Token.t * Loc.t));
value lex_string : Loc.t -> string -> not_filtered (Stream.t (Token.t * Loc.t));
(** Filter a token stream using the {!Token.Filter} module *)
value filter : not_filtered (Stream.t (Token.t * Loc.t))
-> Stream.t (Token.t * Loc.t);
value filter : not_filtered (Stream.t (Token.t * Loc.t)) -> token_stream;
(** Lex, filter and parse a stream of character. *)
value parse : Entry.t 'a -> Loc.t -> Stream.t char -> 'a;
@ -1103,7 +1159,7 @@ module Grammar = struct
(** Parse a token stream that is already filtered. *)
value parse_tokens_after_filter :
Entry.t 'a -> Stream.t (Token.t * Loc.t) -> 'a;
Entry.t 'a -> token_stream -> 'a;
end;
@ -1261,7 +1317,8 @@ module type Camlp4Syntax = sig
value ctyp : Gram.Entry.t Ast.ctyp;
value ctyp_quot : Gram.Entry.t Ast.ctyp;
value cvalue_binding : Gram.Entry.t Ast.expr;
value direction_flag : Gram.Entry.t Ast.meta_bool;
value direction_flag : Gram.Entry.t Ast.direction_flag;
value direction_flag_quot : Gram.Entry.t Ast.direction_flag;
value dummy : Gram.Entry.t unit;
value eq_expr : Gram.Entry.t (string -> Ast.patt -> Ast.patt);
value expr : Gram.Entry.t Ast.expr;
@ -1287,7 +1344,7 @@ module type Camlp4Syntax = sig
value label_patt_list : Gram.Entry.t Ast.patt;
value labeled_ipatt : Gram.Entry.t Ast.patt;
value let_binding : Gram.Entry.t Ast.binding;
value meth_list : Gram.Entry.t (Ast.ctyp * Ast.meta_bool);
value meth_list : Gram.Entry.t (Ast.ctyp * Ast.row_var_flag);
value meth_decl : Gram.Entry.t Ast.ctyp;
value module_binding : Gram.Entry.t Ast.module_binding;
value module_binding0 : Gram.Entry.t Ast.module_expr;
@ -1307,15 +1364,22 @@ module type Camlp4Syntax = sig
value opt_class_self_patt : Gram.Entry.t Ast.patt;
value opt_class_self_type : Gram.Entry.t Ast.ctyp;
value opt_comma_ctyp : Gram.Entry.t Ast.ctyp;
value opt_dot_dot : Gram.Entry.t Ast.meta_bool;
value opt_dot_dot : Gram.Entry.t Ast.row_var_flag;
value row_var_flag_quot : Gram.Entry.t Ast.row_var_flag;
value opt_eq_ctyp : Gram.Entry.t Ast.ctyp;
value opt_expr : Gram.Entry.t Ast.expr;
value opt_meth_list : Gram.Entry.t Ast.ctyp;
value opt_mutable : Gram.Entry.t Ast.meta_bool;
value opt_mutable : Gram.Entry.t Ast.mutable_flag;
value mutable_flag_quot : Gram.Entry.t Ast.mutable_flag;
value opt_override : Gram.Entry.t Ast.override_flag;
value override_flag_quot : Gram.Entry.t Ast.override_flag;
value opt_polyt : Gram.Entry.t Ast.ctyp;
value opt_private : Gram.Entry.t Ast.meta_bool;
value opt_rec : Gram.Entry.t Ast.meta_bool;
value opt_virtual : Gram.Entry.t Ast.meta_bool;
value opt_private : Gram.Entry.t Ast.private_flag;
value private_flag_quot : Gram.Entry.t Ast.private_flag;
value opt_rec : Gram.Entry.t Ast.rec_flag;
value rec_flag_quot : Gram.Entry.t Ast.rec_flag;
value opt_virtual : Gram.Entry.t Ast.virtual_flag;
value virtual_flag_quot : Gram.Entry.t Ast.virtual_flag;
value opt_when_expr : Gram.Entry.t Ast.expr;
value patt : Gram.Entry.t Ast.patt;
value patt_as_patt_opt : Gram.Entry.t Ast.patt;

View File

@ -74,13 +74,15 @@ module Make (Ast : Sig.Camlp4Ast) = struct
| _ -> { (t) with ptyp_desc = Ptyp_poly [] t } ]
;
value mb2b =
fun
[ Ast.BTrue -> True
| Ast.BFalse -> False
| Ast.BAnt _ -> assert False ];
value mkvirtual = fun
[ <:virtual_flag< virtual >> -> Virtual
| <:virtual_flag<>> -> Concrete
| _ -> assert False ];
value mkvirtual m = if mb2b m then Virtual else Concrete;
value mkdirection = fun
[ <:direction_flag< to >> -> Upto
| <:direction_flag< downto >> -> Downto
| _ -> assert False ];
value lident s = Lident s;
value ldot l s = Ldot l s;
@ -110,9 +112,9 @@ module Make (Ast : Sig.Camlp4Ast) = struct
value mkrf =
fun
[ Ast.BTrue -> Recursive
| Ast.BFalse -> Nonrecursive
| Ast.BAnt _ -> assert False ];
[ <:rec_flag< rec >> -> Recursive
| <:rec_flag<>> -> Nonrecursive
| _ -> assert False ];
value mkli s = loop lident
where rec loop f =
@ -259,7 +261,7 @@ module Make (Ast : Sig.Camlp4Ast) = struct
| TyAnt loc _ -> error loc "antiquotation not allowed here"
| TyOfAmp _ _ _ |TyAmp _ _ _ |TySta _ _ _ |
TyCom _ _ _ |TyVrn _ _ |TyQuM _ _ |TyQuP _ _ |TyDcl _ _ _ _ _ |
TyObj _ _ (BAnt _) | TyNil _ | TyTup _ _ ->
TyObj _ _ (RvAnt _) | TyNil _ | TyTup _ _ ->
assert False ]
and row_field = fun
[ <:ctyp<>> -> []
@ -304,7 +306,10 @@ module Make (Ast : Sig.Camlp4Ast) = struct
ptype_variance = variance}
;
value mkprivate' m = if m then Private else Public;
value mkprivate m = mkprivate' (mb2b m);
value mkprivate = fun
[ <:private_flag< private >> -> Private
| <:private_flag<>> -> Public
| _ -> assert False ];
value mktrecord =
fun
[ <:ctyp@loc< $lid:s$ : mutable $t$ >> ->
@ -351,7 +356,10 @@ module Make (Ast : Sig.Camlp4Ast) = struct
| Ast.LCons x xs -> [x :: list_of_meta_list xs]
| Ast.LAnt _ -> assert False ];
value mkmutable m = if mb2b m then Mutable else Immutable;
value mkmutable = fun
[ <:mutable_flag< mutable >> -> Mutable
| <:mutable_flag<>> -> Immutable
| _ -> assert False ];
value paolab lab p =
match (lab, p) with
@ -570,6 +578,12 @@ module Make (Ast : Sig.Camlp4Ast) = struct
| e -> [(loc_of_expr e, [], e) :: l] ]
;
value override_flag loc =
fun [ <:override_flag< ! >> -> Override
| <:override_flag<>> -> Fresh
| _ -> error loc "antiquotation not allowed here"
];
value list_of_opt_ctyp ot acc =
match ot with
[ <:ctyp<>> -> acc
@ -668,8 +682,7 @@ module Make (Ast : Sig.Camlp4Ast) = struct
| ExFlo loc s -> mkexp loc (Pexp_constant (Const_float (remove_underscores s)))
| ExFor loc i e1 e2 df el ->
let e3 = ExSeq loc el in
let df = if mb2b df then Upto else Downto in
mkexp loc (Pexp_for i (expr e1) (expr e2) df (expr e3))
mkexp loc (Pexp_for i (expr e1) (expr e2) (mkdirection df) (expr e3))
| <:expr@loc< fun [ $PaLab _ lab po$ when $w$ -> $e$ ] >> ->
mkexp loc
(Pexp_function lab None
@ -943,7 +956,7 @@ module Make (Ast : Sig.Camlp4Ast) = struct
| <:str_item@loc< $anti:_$ >> -> error loc "antiquotation in str_item" ]
and class_type =
fun
[ CtCon loc Ast.BFalse id tl ->
[ CtCon loc ViNil id tl ->
mkcty loc
(Pcty_constr (long_class_ident id) (List.map ctyp (list_of_opt_ctyp tl [])))
| CtFun loc (TyLab _ lab t) ct ->
@ -973,7 +986,7 @@ module Make (Ast : Sig.Camlp4Ast) = struct
[ <:ctyp<>> -> (loc, ([], []))
| t -> (loc_of_ctyp t, List.split (class_parameters t [])) ]
in
{pci_virt = if mb2b vir then Virtual else Concrete;
{pci_virt = mkvirtual vir;
pci_params = (params, mkloc loc_params);
pci_name = name;
pci_expr = class_expr ce;
@ -989,7 +1002,7 @@ module Make (Ast : Sig.Camlp4Ast) = struct
[ <:ctyp<>> -> (loc, ([], []))
| t -> (loc_of_ctyp t, List.split (class_parameters t [])) ]
in
{pci_virt = if mb2b vir then Virtual else Concrete;
{pci_virt = mkvirtual vir;
pci_params = (params, mkloc loc_params);
pci_name = name;
pci_expr = class_type ct;
@ -1017,7 +1030,7 @@ module Make (Ast : Sig.Camlp4Ast) = struct
let (ce, el) = class_expr_fa [] c in
let el = List.map label_expr el in
mkpcl loc (Pcl_apply (class_expr ce) el)
| CeCon loc Ast.BFalse id tl ->
| CeCon loc ViNil id tl ->
mkpcl loc
(Pcl_constr (long_class_ident id) (List.map ctyp (list_of_opt_ctyp tl [])))
| CeFun loc (PaLab _ lab po) ce ->
@ -1052,22 +1065,23 @@ module Make (Ast : Sig.Camlp4Ast) = struct
| CrCtr loc t1 t2 -> [Pcf_cstr (ctyp t1, ctyp t2, mkloc loc) :: l]
| <:class_str_item< $cst1$; $cst2$ >> ->
class_str_item cst1 (class_str_item cst2 l)
| CrInh _ ce "" -> [Pcf_inher Fresh (class_expr ce) None :: l]
| CrInh _ ce pb -> [Pcf_inher Fresh (class_expr ce) (Some pb) :: l]
| CrInh loc ov ce pb ->
let opb = if pb = "" then None else Some pb in
[Pcf_inher (override_flag loc ov) (class_expr ce) opb :: l]
| CrIni _ e -> [Pcf_init (expr e) :: l]
| CrMth loc s b e t ->
| CrMth loc s ov pf e t ->
let t =
match t with
[ <:ctyp<>> -> None
| t -> Some (mkpolytype (ctyp t)) ] in
let e = mkexp loc (Pexp_poly (expr e) t) in
[Pcf_meth (s, mkprivate b, Fresh, e, mkloc loc) :: l]
| CrVal loc s b e ->
[Pcf_val (s, mkmutable b, Fresh, expr e, mkloc loc) :: l]
| CrVir loc s b t ->
[Pcf_virt (s, mkprivate b, mkpolytype (ctyp t), mkloc loc) :: l]
| CrVvr loc s b t ->
[Pcf_valvirt (s, mkmutable b, ctyp t, mkloc loc) :: l]
[Pcf_meth (s, mkprivate pf, override_flag loc ov, e, mkloc loc) :: l]
| CrVal loc s ov mf e ->
[Pcf_val (s, mkmutable mf, override_flag loc ov, expr e, mkloc loc) :: l]
| CrVir loc s pf t ->
[Pcf_virt (s, mkprivate pf, mkpolytype (ctyp t), mkloc loc) :: l]
| CrVvr loc s mf t ->
[Pcf_valvirt (s, mkmutable mf, ctyp t, mkloc loc) :: l]
| CrAnt _ _ -> assert False ];
value sig_item ast = sig_item ast [];

View File

@ -106,10 +106,10 @@ module Make (Ast : Sig.Camlp4Ast) = struct
method class_str_item =
fun
[ <:class_str_item< inherit $_$ >> as cst -> super#class_str_item cst
| <:class_str_item< inherit $ce$ as $s$ >> ->
[ <:class_str_item< inherit $override:_$ $_$ >> as cst -> super#class_str_item cst
| <:class_str_item< inherit $override:_$ $ce$ as $s$ >> ->
(o#class_expr ce)#add_atom s
| <:class_str_item< value $mutable:_$ $s$ = $e$ >> ->
| <:class_str_item< value $override:_$ $mutable:_$ $s$ = $e$ >> ->
(o#expr e)#add_atom s
| <:class_str_item< value virtual $mutable:_$ $s$ : $t$ >> ->
(o#ctyp t)#add_atom s

View File

@ -1,4 +1,3 @@
Context
Delete
Dynamic
Entry

View File

@ -1,90 +0,0 @@
(****************************************************************************)
(* *)
(* Objective Caml *)
(* *)
(* INRIA Rocquencourt *)
(* *)
(* Copyright 2006 Institut National de Recherche en Informatique et *)
(* en Automatique. All rights reserved. This file is distributed under *)
(* the terms of the GNU Library General Public License, with the special *)
(* exception on linking described in LICENSE at the top of the Objective *)
(* Caml source tree. *)
(* *)
(****************************************************************************)
(* Authors:
* - Daniel de Rauglaudre: initial version
* - Nicolas Pouillard: refactoring
*)
module type S = sig
module Token : Sig.Token;
open Token;
type t;
value call_with_ctx : Stream.t (Token.t * Loc.t) -> (t -> 'a) -> 'a;
value loc_bp : t -> Loc.t;
value loc_ep : t -> Loc.t;
value stream : t -> Stream.t (Token.t * Loc.t);
value peek_nth : t -> int -> option (Token.t * Loc.t);
value njunk : t -> int -> unit;
value junk : Stream.t (Token.t * Loc.t) -> unit;
value bp : Stream.t (Token.t * Loc.t) -> Loc.t;
end;
module Make (Token : Sig.Token) : S with module Token = Token = struct
module Token = Token;
open Token;
type t = { strm : mutable Stream.t (Token.t * Loc.t);
loc : mutable Loc.t };
value loc_bp c =
match Stream.peek c.strm with
[ None -> Loc.ghost
| Some (_, loc) -> loc ];
value loc_ep c = c.loc;
value set_loc c =
match Stream.peek c.strm with
[ Some (_, loc) -> c.loc := loc
| None -> () ];
value mk strm =
match Stream.peek strm with
[ Some (_, loc) -> { strm = strm; loc = loc }
| None -> { strm = strm ; loc = Loc.ghost } ];
value stream c = c.strm;
value peek_nth c n =
let list = Stream.npeek n c.strm in
let rec loop list n =
match (list, n) with
[ ([((_, loc) as x) :: _], 1) -> do { c.loc := loc; Some x }
| ([_ :: l], n) -> loop l (n - 1)
| ([], _) -> None ]
in
loop list n;
value njunk c n =
(for i = 1 to n do Stream.junk c.strm done;
set_loc c);
value streams = ref [];
value mk strm =
let c = mk strm in
let () = streams.val := [(strm, c) :: streams.val] in c;
value junk strm =
do { set_loc (List.assq strm streams.val); Stream.junk strm };
value bp strm = loc_bp (List.assq strm streams.val);
value call_with_ctx strm f =
let streams_v = streams.val in
let r =
try f (mk strm) with exc -> do { streams.val := streams_v; raise exc }
in
do { streams.val := streams_v; r }
;
end;

View File

@ -68,11 +68,9 @@ value rec decr_keyw_use gram =
fun
[ Skeyword kwd -> removing gram kwd
| Smeta _ sl _ -> List.iter (decr_keyw_use gram) sl
| Slist0 s -> decr_keyw_use gram s
| Slist1 s -> decr_keyw_use gram s
| Slist0 s | Slist1 s | Sopt s | Stry s -> decr_keyw_use gram s
| Slist0sep s1 s2 -> do { decr_keyw_use gram s1; decr_keyw_use gram s2 }
| Slist1sep s1 s2 -> do { decr_keyw_use gram s1; decr_keyw_use gram s2 }
| Sopt s -> decr_keyw_use gram s
| Stree t -> decr_keyw_use_in_tree gram t
| Sself | Snext | Snterm _ | Snterml _ _ | Stoken _ -> () ]
and decr_keyw_use_in_tree gram =
@ -149,13 +147,13 @@ value delete_rule entry sl =
do {
entry.edesc := Dlevels levs;
entry.estart :=
fun lev c strm ->
fun lev strm ->
let f = Parser.start_parser_of_entry entry in
do { entry.estart := f; f lev c strm };
do { entry.estart := f; f lev strm };
entry.econtinue :=
fun lev bp a c strm ->
fun lev bp a strm ->
let f = Parser.continue_parser_of_entry entry in
do { entry.econtinue := f; f lev bp a c strm }
do { entry.econtinue := f; f lev bp a strm }
}
| Dparser _ -> () ]
;

View File

@ -24,7 +24,8 @@ module Make (Lexer : Sig.Lexer)
module Delete = Delete.Make Structure;
module Insert = Insert.Make Structure;
module Entry = Entry.Make Structure;
module Fold = Fold.Make Structure;
module Fold = Fold.Make Structure;
module Tools = Tools.Make Structure;
include Structure;
value mk () =
@ -43,7 +44,7 @@ module Make (Lexer : Sig.Lexer)
value lex_string g loc str = lex g loc (Stream.of_string str);
value filter g ts = Token.Filter.filter g.gfilter ts;
value filter g ts = Tools.keep_prev_loc (Token.Filter.filter g.gfilter ts);
value parse_tokens_after_filter entry ts = Entry.parse_tokens_after_filter entry ts;

View File

@ -23,6 +23,7 @@ module Make (Structure : Structure.S) = struct
module Tools = Tools.Make Structure;
open Format;
open Structure;
open Tools;
type t 'a = internal_entry;
@ -36,25 +37,24 @@ module Make (Structure : Structure.S) = struct
value mk g n =
{ egram = g;
ename = n;
estart = Tools.empty_entry n;
econtinue _ _ _ _ = parser [];
estart = empty_entry n;
econtinue _ _ _ = parser [];
edesc = Dlevels [] };
value action_parse entry ts : Action.t =
Context.call_with_ctx ts
(fun c ->
try entry.estart 0 c (Context.stream c) with
[ Stream.Failure ->
Loc.raise (Context.loc_ep c)
(Stream.Error ("illegal begin of " ^ entry.ename))
| Loc.Exc_located _ _ as exc -> raise exc
| exc -> Loc.raise (Context.loc_ep c) exc ]);
try entry.estart 0 ts with
[ Stream.Failure ->
Loc.raise (get_prev_loc ts)
(Stream.Error ("illegal begin of " ^ entry.ename))
| Loc.Exc_located _ _ as exc -> raise exc
| exc -> Loc.raise (get_prev_loc ts) exc ];
value lex entry loc cs = entry.egram.glexer loc cs;
value lex_string entry loc str = lex entry loc (Stream.of_string str);
value filter entry ts = Token.Filter.filter (get_filter entry.egram) ts;
value filter entry ts =
keep_prev_loc (Token.Filter.filter (get_filter entry.egram) ts);
value parse_tokens_after_filter entry ts = Action.get (action_parse entry ts);
@ -65,24 +65,25 @@ module Make (Structure : Structure.S) = struct
value parse_string entry loc str =
parse_tokens_before_filter entry (lex_string entry loc str);
value of_parser g n (p : Stream.t (Token.t * Loc.t) -> 'a) : t 'a =
value of_parser g n (p : Stream.t (Token.t * token_info) -> 'a) : t 'a =
let f ts = Action.mk (p ts) in
{ egram = g;
ename = n;
estart _ _ ts = Action.mk (p ts);
econtinue _ _ _ _ = parser [];
edesc = Dparser (fun ts -> Action.mk (p ts)) };
estart _ = f;
econtinue _ _ _ = parser [];
edesc = Dparser f };
value setup_parser e (p : Stream.t (Token.t * Loc.t) -> 'a) =
value setup_parser e (p : Stream.t (Token.t * token_info) -> 'a) =
let f ts = Action.mk (p ts) in do {
e.estart := fun _ _ -> f;
e.econtinue := fun _ _ _ _ -> parser [];
e.estart := fun _ -> f;
e.econtinue := fun _ _ _ -> parser [];
e.edesc := Dparser f
};
value clear e =
do {
e.estart := fun _ _ -> parser [];
e.econtinue := fun _ _ _ _ -> parser [];
e.estart := fun _ -> parser [];
e.econtinue := fun _ _ _ -> parser [];
e.edesc := Dlevels []
};

View File

@ -37,11 +37,9 @@ value rec name_of_symbol entry =
value rec name_of_symbol_failed entry =
fun
[ Slist0 s -> name_of_symbol_failed entry s
| Slist0sep s _ -> name_of_symbol_failed entry s
| Slist1 s -> name_of_symbol_failed entry s
| Slist1sep s _ -> name_of_symbol_failed entry s
| Sopt s -> name_of_symbol_failed entry s
[ Slist0 s | Slist0sep s _ |
Slist1 s | Slist1sep s _ |
Sopt s | Stry s -> name_of_symbol_failed entry s
| Stree t -> name_of_tree_failed entry t
| s -> name_of_symbol entry s ]
and name_of_tree_failed entry =
@ -104,7 +102,7 @@ value tree_failed entry prev_symb_result prev_symb tree =
| _ ->
let txt1 = name_of_symbol_failed entry sep in
txt1 ^ " or " ^ txt ^ " expected" ]
| Sopt _ | Stree _ -> txt ^ " expected"
| Stry _(*NP: not sure about this*) | Sopt _ | Stree _ -> txt ^ " expected"
| _ -> txt ^ " expected after " ^ name_of_symbol entry prev_symb ]
in
do {

View File

@ -26,10 +26,11 @@ module Make (Structure : Structure.S) = struct
module Fail = Failed.Make Structure;
open Sig.Grammar;
(* Prevent from implict usage. *)
module Stream = struct
include Stream;
value junk strm = Context.junk strm;
value count strm = Context.bp strm;
type t 'a = Stream.t 'a;
exception Failure = Stream.Failure;
exception Error = Stream.Error;
end;
value sfold0 f e _entry _symbl psymb =

View File

@ -33,12 +33,15 @@ module Make (Structure : Structure.S) = struct
;
value rec derive_eps =
fun
[ Slist0 _ -> True
| Slist0sep _ _ -> True
| Sopt _ -> True
[ Slist0 _ | Slist0sep _ _ | Sopt _ -> True
| Stry s -> derive_eps s
| Stree t -> tree_derive_eps t
| Smeta _ _ _ | Slist1 _ | Slist1sep _ _ | Snterm _ | Snterml _ _ | Snext |
Sself | Stoken _ | Skeyword _ -> False ]
| Slist1 _ | Slist1sep _ _ | Stoken _ | Skeyword _ ->
(* For sure we cannot derive epsilon from these *)
False
| Smeta _ _ _ | Snterm _ | Snterml _ _ | Snext | Sself ->
(* Approximation *)
False ]
and tree_derive_eps =
fun
[ LocAct _ _ -> True
@ -172,9 +175,7 @@ module Make (Structure : Structure.S) = struct
| Smeta _ sl _ -> List.iter (check_gram entry) sl
| Slist0sep s t -> do { check_gram entry t; check_gram entry s }
| Slist1sep s t -> do { check_gram entry t; check_gram entry s }
| Slist0 s -> check_gram entry s
| Slist1 s -> check_gram entry s
| Sopt s -> check_gram entry s
| Slist0 s | Slist1 s | Sopt s | Stry s -> check_gram entry s
| Stree t -> tree_check_gram entry t
| Snext | Sself | Stoken _ | Skeyword _ -> () ]
and tree_check_gram entry =
@ -198,11 +199,9 @@ module Make (Structure : Structure.S) = struct
let rec insert =
fun
[ Smeta _ sl _ -> List.iter insert sl
| Slist0 s -> insert s
| Slist1 s -> insert s
| Slist0 s | Slist1 s | Sopt s | Stry s -> insert s
| Slist0sep s t -> do { insert s; insert t }
| Slist1sep s t -> do { insert s; insert t }
| Sopt s -> insert s
| Stree t -> tinsert t
| Skeyword kwd -> using gram kwd
| Snterm _ | Snterml _ _ | Snext | Sself | Stoken _ -> () ]
@ -316,13 +315,13 @@ module Make (Structure : Structure.S) = struct
do {
entry.edesc := Dlevels elev;
entry.estart :=
fun lev c strm ->
fun lev strm ->
let f = Parser.start_parser_of_entry entry in
do { entry.estart := f; f lev c strm };
do { entry.estart := f; f lev strm };
entry.econtinue :=
fun lev bp a c strm ->
fun lev bp a strm ->
let f = Parser.continue_parser_of_entry entry in
do { entry.econtinue := f; f lev bp a c strm }
do { entry.econtinue := f; f lev bp a strm }
};
end;

View File

@ -24,18 +24,61 @@ module Make (Structure : Structure.S) = struct
open Structure;
open Sig.Grammar;
module Stream = struct
include Stream;
value junk strm = Context.junk strm;
value count strm = Context.bp strm;
end;
module StreamOrig = Stream;
value add_loc c bp parse_fun strm =
let x = parse_fun c strm in
let ep = Context.loc_ep c in
value njunk strm n =
for i = 1 to n do Stream.junk strm done;
value loc_bp = Tools.get_cur_loc;
value loc_ep = Tools.get_prev_loc;
value drop_prev_loc = Tools.drop_prev_loc;
value add_loc bp parse_fun strm =
let x = parse_fun strm in
let ep = loc_ep strm in
let loc = Loc.merge bp ep in
(x, loc);
value stream_peek_nth strm n =
let rec loop i = fun
[ [x :: xs] -> if i = 1 then Some x else loop (i - 1) xs
| [] -> None ]
in
loop n (Stream.npeek n strm);
(* We don't want Stream's functions to be used implictly. *)
module Stream = struct
type t 'a = StreamOrig.t 'a;
exception Failure = StreamOrig.Failure;
exception Error = StreamOrig.Error;
value peek = StreamOrig.peek;
value junk = StreamOrig.junk;
value dup strm =
(* This version of peek_nth is off-by-one from Stream.peek_nth *)
let peek_nth n =
loop n (Stream.npeek (n + 1) strm) where rec loop n =
fun
[ [] -> None
| [x] -> if n = 0 then Some x else None
| [_ :: l] -> loop (n - 1) l ]
in
Stream.from peek_nth;
end;
value try_parser ps strm =
let strm' = Stream.dup strm in
let r =
try ps strm'
with
[ Stream.Error _ | Loc.Exc_located _ (Stream.Error _) ->
raise Stream.Failure
| exc -> raise exc ]
in do {
njunk strm (StreamOrig.count strm');
r;
};
value level_number entry lab =
let rec lookup levn =
fun
@ -73,60 +116,57 @@ module Make (Structure : Structure.S) = struct
| _ -> raise Stream.Failure ]
;
value continue entry loc a s c son p1 =
value continue entry loc a s son p1 =
parser
[: a = (entry_of_symb entry s).econtinue 0 loc a c;
[: a = (entry_of_symb entry s).econtinue 0 loc a;
act = p1 ?? Failed.tree_failed entry a s son :] ->
Action.mk (fun _ -> Action.getf act a)
;
(* PR#4603, PR#4330, PR#4551:
Here Context.loc_bp replaced Context.loc_ep to fix all these bugs.
Here loc_bp replaced get_loc_ep to fix all these bugs.
If you do change it again look at these bugs. *)
value skip_if_empty c bp _ =
if Context.loc_bp c = bp then Action.mk (fun _ -> raise Stream.Failure)
value skip_if_empty bp strm =
if loc_bp strm = bp then Action.mk (fun _ -> raise Stream.Failure)
else
raise Stream.Failure
;
value do_recover parser_of_tree entry nlevn alevn loc a s c son =
value do_recover parser_of_tree entry nlevn alevn loc a s son =
parser
[ [: a = parser_of_tree entry nlevn alevn (top_tree entry son) c :] -> a
| [: a = skip_if_empty c loc :] -> a
[ [: a = parser_of_tree entry nlevn alevn (top_tree entry son) :] -> a
| [: a = skip_if_empty loc :] -> a
| [: a =
continue entry loc a s c son
(parser_of_tree entry nlevn alevn son c) :] ->
continue entry loc a s son
(parser_of_tree entry nlevn alevn son) :] ->
a ]
;
value recover parser_of_tree entry nlevn alevn loc a s c son strm =
value recover parser_of_tree entry nlevn alevn loc a s son strm =
if strict_parsing.val then raise (Stream.Error (Failed.tree_failed entry a s son))
else
let _ =
if strict_parsing_warning.val then
do {
if strict_parsing_warning.val then begin
let msg = Failed.tree_failed entry a s son;
Format.eprintf "Warning: trying to recover from syntax error";
if entry.ename <> "" then Format.eprintf " in [%s]" entry.ename else ();
Format.eprintf "\n%s%a@." msg Loc.print loc;
} else () in
do_recover parser_of_tree entry nlevn alevn loc a s c son strm
end else () in
do_recover parser_of_tree entry nlevn alevn loc a s son strm
;
value rec parser_of_tree entry nlevn alevn =
fun
[ DeadEnd -> fun _ -> parser []
| LocAct act _ -> fun _ -> parser [: :] -> act
[ DeadEnd -> parser []
| LocAct act _ -> parser [: :] -> act
| Node {node = Sself; son = LocAct act _; brother = DeadEnd} ->
fun c ->
parser [: a = entry.estart alevn c :] -> Action.getf act a
parser [: a = entry.estart alevn :] -> Action.getf act a
| Node {node = Sself; son = LocAct act _; brother = bro} ->
let p2 = parser_of_tree entry nlevn alevn bro in
fun c ->
parser
[ [: a = entry.estart alevn c :] -> Action.getf act a
| [: a = p2 c :] -> a ]
parser
[ [: a = entry.estart alevn :] -> Action.getf act a
| [: a = p2 :] -> a ]
| Node {node = s; son = son; brother = DeadEnd} ->
let tokl =
match s with
@ -138,8 +178,10 @@ module Make (Structure : Structure.S) = struct
let ps = parser_of_symbol entry nlevn s in
let p1 = parser_of_tree entry nlevn alevn son in
let p1 = parser_cont p1 entry nlevn alevn s son in
fun c ->
parser bp [: a = ps c; act = p1 c bp a :] -> Action.getf act a
fun strm ->
let bp = loc_bp strm in
match strm with parser
[: a = ps; act = p1 bp a :] -> Action.getf act a
| Some (tokl, last_tok, son) ->
let p1 = parser_of_tree entry nlevn alevn son in
let p1 = parser_cont p1 entry nlevn alevn last_tok son in
@ -156,23 +198,23 @@ module Make (Structure : Structure.S) = struct
let p1 = parser_of_tree entry nlevn alevn son in
let p1 = parser_cont p1 entry nlevn alevn s son in
let p2 = parser_of_tree entry nlevn alevn bro in
fun c ->
parser bp
[ [: a = ps c; act = p1 c bp a :] -> Action.getf act a
| [: a = p2 c :] -> a ]
fun strm ->
let bp = loc_bp strm in
match strm with parser
[ [: a = ps; act = p1 bp a :] -> Action.getf act a
| [: a = p2 :] -> a ]
| Some (tokl, last_tok, son) ->
let p1 = parser_of_tree entry nlevn alevn son in
let p1 = parser_cont p1 entry nlevn alevn last_tok son in
let p1 = parser_of_token_list p1 tokl in
let p2 = parser_of_tree entry nlevn alevn bro in
fun c ->
parser
[ [: a = p1 c :] -> a
| [: a = p2 c :] -> a ] ] ]
and parser_cont p1 entry nlevn alevn s son c loc a =
parser
[ [: a = p1 :] -> a
| [: a = p2 :] -> a ] ] ]
and parser_cont p1 entry nlevn alevn s son loc a =
parser
[ [: a = p1 c :] -> a
| [: a = recover parser_of_tree entry nlevn alevn loc a s c son :] -> a
[ [: a = p1 :] -> a
| [: a = recover parser_of_tree entry nlevn alevn loc a s son :] -> a
| [: :] -> raise (Stream.Error (Failed.tree_failed entry a s son)) ]
and parser_of_token_list p1 tokl =
loop 1 tokl where rec loop n =
@ -180,133 +222,132 @@ module Make (Structure : Structure.S) = struct
[ [Stoken (tematch, _) :: tokl] ->
match tokl with
[ [] ->
let ps c _ =
match Context.peek_nth c n with
[ Some (tok, _) when tematch tok -> do { Context.njunk c n; Action.mk tok }
let ps strm =
match stream_peek_nth strm n with
[ Some (tok, _) when tematch tok -> (njunk strm n; Action.mk tok)
| _ -> raise Stream.Failure ]
in
fun c ->
parser bp [: a = ps c; act = p1 c bp a :] -> Action.getf act a
fun strm ->
let bp = loc_bp strm in
match strm with parser
[: a = ps; act = p1 bp a :] -> Action.getf act a
| _ ->
let ps c _ =
match Context.peek_nth c n with
let ps strm =
match stream_peek_nth strm n with
[ Some (tok, _) when tematch tok -> tok
| _ -> raise Stream.Failure ]
in
let p1 = loop (n + 1) tokl in
fun c ->
parser [: tok = ps c; s :] ->
let act = p1 c s in Action.getf act tok ]
parser [: tok = ps; s :] ->
let act = p1 s in Action.getf act tok ]
| [Skeyword kwd :: tokl] ->
match tokl with
[ [] ->
let ps c _ =
match Context.peek_nth c n with
let ps strm =
match stream_peek_nth strm n with
[ Some (tok, _) when Token.match_keyword kwd tok ->
do { Context.njunk c n; Action.mk tok }
(njunk strm n; Action.mk tok)
| _ -> raise Stream.Failure ]
in
fun c ->
parser bp [: a = ps c; act = p1 c bp a :] -> Action.getf act a
fun strm ->
let bp = loc_bp strm in
match strm with parser
[: a = ps; act = p1 bp a :] -> Action.getf act a
| _ ->
let ps c _ =
match Context.peek_nth c n with
let ps strm =
match stream_peek_nth strm n with
[ Some (tok, _) when Token.match_keyword kwd tok -> tok
| _ -> raise Stream.Failure ]
in
let p1 = loop (n + 1) tokl in
fun c ->
parser [: tok = ps c; s :] ->
let act = p1 c s in Action.getf act tok ]
parser [: tok = ps; s :] ->
let act = p1 s in Action.getf act tok ]
| _ -> invalid_arg "parser_of_token_list" ]
and parser_of_symbol entry nlevn =
fun
[ Smeta _ symbl act ->
let act = Obj.magic act entry symbl in
let pl = List.map (parser_of_symbol entry nlevn) symbl in
fun c ->
Obj.magic (List.fold_left (fun act p -> Obj.magic act (p c)) act pl)
Obj.magic (List.fold_left (fun act p -> Obj.magic act p) act pl)
| Slist0 s ->
let ps = parser_of_symbol entry nlevn s in
let rec loop c al =
let rec loop al =
parser
[ [: a = ps c; s :] -> loop c [a :: al] s
[ [: a = ps; s :] -> loop [a :: al] s
| [: :] -> al ]
in
fun c -> parser [: a = loop c [] :] -> Action.mk (List.rev a)
parser [: a = loop [] :] -> Action.mk (List.rev a)
| Slist0sep symb sep ->
let ps = parser_of_symbol entry nlevn symb in
let pt = parser_of_symbol entry nlevn sep in
let rec kont c al =
let rec kont al =
parser
[ [: v = pt c; a = ps c ?? Failed.symb_failed entry v sep symb;
[ [: v = pt; a = ps ?? Failed.symb_failed entry v sep symb;
s :] ->
kont c [a :: al] s
kont [a :: al] s
| [: :] -> al ]
in
fun c ->
parser
[ [: a = ps c; s :] -> Action.mk (List.rev (kont c [a] s))
| [: :] -> Action.mk [] ]
parser
[ [: a = ps; s :] -> Action.mk (List.rev (kont [a] s))
| [: :] -> Action.mk [] ]
| Slist1 s ->
let ps = parser_of_symbol entry nlevn s in
let rec loop c al =
let rec loop al =
parser
[ [: a = ps c; s :] -> loop c [a :: al] s
[ [: a = ps; s :] -> loop [a :: al] s
| [: :] -> al ]
in
fun c ->
parser [: a = ps c; s :] -> Action.mk (List.rev (loop c [a] s))
parser [: a = ps; s :] -> Action.mk (List.rev (loop [a] s))
| Slist1sep symb sep ->
let ps = parser_of_symbol entry nlevn symb in
let pt = parser_of_symbol entry nlevn sep in
let rec kont c al =
let rec kont al =
parser
[ [: v = pt c;
[ [: v = pt;
a =
parser
[ [: a = ps c :] -> a
| [: a = parse_top_symb' entry symb c :] -> a
[ [: a = ps :] -> a
| [: a = parse_top_symb entry symb :] -> a
| [: :] ->
raise (Stream.Error (Failed.symb_failed entry v sep symb)) ];
s :] ->
kont c [a :: al] s
kont [a :: al] s
| [: :] -> al ]
in
fun c ->
parser [: a = ps c; s :] -> Action.mk (List.rev (kont c [a] s))
parser [: a = ps; s :] -> Action.mk (List.rev (kont [a] s))
| Sopt s ->
let ps = parser_of_symbol entry nlevn s in
fun c ->
parser
[ [: a = ps c :] -> Action.mk (Some a)
| [: :] -> Action.mk None ]
parser
[ [: a = ps :] -> Action.mk (Some a)
| [: :] -> Action.mk None ]
| Stry s ->
let ps = parser_of_symbol entry nlevn s in
try_parser ps
| Stree t ->
let pt = parser_of_tree entry 1 0 t in
fun c ->
parser bp [: (act, loc) = add_loc c bp pt :] ->
fun strm ->
let bp = loc_bp strm in
match strm with parser
[: (act, loc) = add_loc bp pt :] ->
Action.getf act loc
| Snterm e -> fun c -> parser [: a = e.estart 0 c :] -> a
| Snterm e -> parser [: a = e.estart 0 :] -> a
| Snterml e l ->
fun c -> parser [: a = e.estart (level_number e l) c :] -> a
| Sself -> fun c -> parser [: a = entry.estart 0 c :] -> a
| Snext -> fun c -> parser [: a = entry.estart nlevn c :] -> a
parser [: a = e.estart (level_number e l) :] -> a
| Sself -> parser [: a = entry.estart 0 :] -> a
| Snext -> parser [: a = entry.estart nlevn :] -> a
| Skeyword kwd ->
fun _ ->
parser
[: `(tok, _) when Token.match_keyword kwd tok :] -> Action.mk tok
parser
[: `(tok, _) when Token.match_keyword kwd tok :] ->
Action.mk tok
| Stoken (f, _) ->
fun _ -> parser [: `(tok, _) when f tok :] -> Action.mk tok ]
and parse_top_symb' entry symb c =
parser_of_symbol entry 0 (top_symb entry symb) c
and parse_top_symb entry symb =
fun strm ->
Context.call_with_ctx strm
(fun c -> parse_top_symb' entry symb c (Context.stream c));
parser
[: `(tok,_) when f tok :] -> Action.mk tok ]
and parse_top_symb entry symb strm =
parser_of_symbol entry 0 (top_symb entry symb) strm;
value rec start_parser_of_levels entry clevn =
fun
[ [] -> fun _ _ -> parser []
[ [] -> fun _ -> parser []
| [lev :: levs] ->
let p1 = start_parser_of_levels entry (succ clevn) levs in
match lev.lprefix with
@ -320,20 +361,22 @@ module Make (Structure : Structure.S) = struct
let p2 = parser_of_tree entry (succ clevn) alevn tree in
match levs with
[ [] ->
fun levn c ->
parser bp
[: (act, loc) = add_loc c bp p2; strm :] ->
fun levn strm ->
let bp = loc_bp strm in
match strm with parser
[: (act, loc) = add_loc bp p2; strm :] ->
let a = Action.getf act loc in
entry.econtinue levn loc a c strm
entry.econtinue levn loc a strm
| _ ->
fun levn c strm ->
if levn > clevn then p1 levn c strm
fun levn strm ->
if levn > clevn then p1 levn strm
else
match strm with parser bp
[ [: (act, loc) = add_loc c bp p2 :] ->
let bp = loc_bp strm in
match strm with parser
[ [: (act, loc) = add_loc bp p2 :] ->
let a = Action.getf act loc in
entry.econtinue levn loc a c strm
| [: act = p1 levn c :] -> act ] ] ] ]
entry.econtinue levn loc a strm
| [: act = p1 levn :] -> act ] ] ] ]
;
value start_parser_of_entry entry =
@ -341,11 +384,11 @@ module Make (Structure : Structure.S) = struct
match entry.edesc with
[ Dlevels [] -> Tools.empty_entry entry.ename
| Dlevels elev -> start_parser_of_levels entry 0 elev
| Dparser p -> fun _ _ strm -> p strm ]
| Dparser p -> fun _ -> p ]
;
value rec continue_parser_of_levels entry clevn =
fun
[ [] -> fun _ _ _ _ -> parser []
[ [] -> fun _ _ _ -> parser []
| [lev :: levs] ->
let p1 = continue_parser_of_levels entry (succ clevn) levs in
match lev.lsuffix with
@ -357,14 +400,14 @@ module Make (Structure : Structure.S) = struct
| RightA -> clevn ]
in
let p2 = parser_of_tree entry (succ clevn) alevn tree in
fun c levn bp a strm ->
if levn > clevn then p1 c levn bp a strm
fun levn bp a strm ->
if levn > clevn then p1 levn bp a strm
else
match strm with parser
[ [: act = p1 c levn bp a :] -> act
| [: (act, loc) = add_loc c bp p2 :] ->
[ [: act = p1 levn bp a :] -> act
| [: (act, loc) = add_loc bp p2 :] ->
let a = Action.getf2 act a loc in
entry.econtinue levn loc a c strm ] ] ]
entry.econtinue levn loc a strm ] ] ]
;
value continue_parser_of_entry entry =
@ -372,11 +415,11 @@ module Make (Structure : Structure.S) = struct
match entry.edesc with
[ Dlevels elev ->
let p = continue_parser_of_levels entry 0 elev in
fun levn bp a c ->
fun levn bp a ->
parser
[ [: a = p c levn bp a :] -> a
[ [: a = p levn bp a :] -> a
| [: :] -> a ]
| Dparser _ -> fun _ _ _ _ -> parser [] ]
| Dparser _ -> fun _ _ _ -> parser [] ]
;
end;

View File

@ -22,9 +22,8 @@
module Make (Structure : Structure.S) : sig
open Structure;
open Context;
value add_loc :
Context.t -> Loc.t -> (Context.t -> 'a -> 'b) -> 'a -> ('b * Loc.t);
Loc.t -> (token_stream -> 'b) -> token_stream -> ('b * Loc.t);
value level_number : internal_entry -> string -> int;
value strict_parsing : ref bool;
value strict_parsing_warning : ref bool;
@ -35,33 +34,29 @@ module Make (Structure : Structure.S) : sig
value entry_of_symb :
internal_entry -> symbol -> internal_entry;
value continue :
internal_entry -> Loc.t -> Action.t -> symbol -> Context.t -> tree ->
(Stream.t (Token.t * Loc.t) -> Action.t) -> Stream.t (Token.t * Loc.t) -> Action.t;
internal_entry -> Loc.t -> Action.t -> symbol -> tree -> efun -> efun;
value do_recover :
(internal_entry -> 'a -> 'b -> tree -> Context.t -> Stream.t (Token.t * Loc.t) -> Action.t) -> internal_entry ->
'a -> 'b -> Loc.t -> Action.t -> symbol -> Context.t -> tree -> Stream.t (Token.t * Loc.t) -> Action.t;
(internal_entry -> 'a -> 'b -> tree -> efun) -> internal_entry ->
'a -> 'b -> Loc.t -> Action.t -> symbol -> tree -> efun;
value recover :
(internal_entry -> 'a -> 'b -> tree -> Context.t -> Stream.t (Token.t * Loc.t) -> Action.t) -> internal_entry ->
'a -> 'b -> Loc.t -> Action.t -> symbol -> Context.t -> tree -> Stream.t (Token.t * Loc.t) -> Action.t;
(internal_entry -> 'a -> 'b -> tree -> efun) -> internal_entry ->
'a -> 'b -> Loc.t -> Action.t -> symbol -> tree -> efun;
value parser_of_tree :
internal_entry -> int -> int -> tree -> Context.t -> Stream.t (Token.t * Loc.t) -> Action.t;
internal_entry -> int -> int -> tree -> efun;
value parser_cont :
(Context.t -> Stream.t (Token.t * Loc.t) -> Action.t) -> internal_entry -> int -> int -> symbol -> tree ->
Context.t -> Loc.t -> Action.t -> Stream.t (Token.t * Loc.t) -> Action.t;
efun -> internal_entry -> int -> int -> symbol -> tree -> Loc.t -> Action.t -> efun;
value parser_of_token_list :
(Context.t -> Loc.t -> Action.t -> Stream.t (Token.t * Loc.t) -> Action.t) -> list symbol -> Context.t -> Stream.t (Token.t * Loc.t) -> Action.t;
(Loc.t -> Action.t -> efun) -> list symbol -> efun;
value parser_of_symbol :
internal_entry -> int -> symbol -> Context.t -> Stream.t (Token.t * Loc.t) -> Action.t;
value parse_top_symb' :
internal_entry -> symbol -> Context.t -> Stream.t (Token.t * Loc.t) -> Action.t;
internal_entry -> int -> symbol -> efun;
value parse_top_symb :
internal_entry -> symbol -> Stream.t (Token.t * Loc.t) -> Action.t;
internal_entry -> symbol -> efun;
value start_parser_of_levels :
internal_entry -> int -> list level -> int -> Context.t -> Stream.t (Token.t * Loc.t) -> Action.t;
internal_entry -> int -> list level -> int -> efun;
value start_parser_of_entry :
internal_entry -> int -> Context.t -> Stream.t (Token.t * Loc.t) -> Action.t;
internal_entry -> int -> efun;
value continue_parser_of_levels :
internal_entry -> int -> list level -> Context.t -> int -> Loc.t -> 'a -> Stream.t (Token.t * Loc.t) -> Action.t;
internal_entry -> int -> list level -> int -> Loc.t -> 'a -> efun;
value continue_parser_of_entry :
internal_entry -> int -> Loc.t -> Action.t -> Context.t -> Stream.t (Token.t * Loc.t) -> Action.t;
internal_entry -> int -> Loc.t -> Action.t -> efun;
end;

View File

@ -39,6 +39,7 @@ module Make (Structure : Structure.S) = struct
| Slist1sep s t ->
fprintf ppf "LIST1 %a SEP %a" print_symbol1 s print_symbol1 t
| Sopt s -> fprintf ppf "OPT %a" print_symbol1 s
| Stry s -> fprintf ppf "TRY %a" print_symbol1 s
| Snterml e l -> fprintf ppf "%s@ LEVEL@ %S" e.ename l
| Snterm _ | Snext | Sself | Stree _ | Stoken _ | Skeyword _ as s ->
print_symbol1 ppf s ]
@ -64,7 +65,7 @@ module Make (Structure : Structure.S) = struct
| Skeyword s -> fprintf ppf "%S" s
| Stree t -> print_level ppf pp_print_space (flatten_tree t)
| Smeta _ _ _ | Snterml _ _ | Slist0 _ | Slist0sep _ _ | Slist1 _ |
Slist1sep _ _ | Sopt _ as s ->
Slist1sep _ _ | Sopt _ | Stry _ as s ->
fprintf ppf "(%a)" print_symbol s ]
and print_rule ppf symbols =
do {
@ -174,6 +175,7 @@ module MakeDump (Structure : Structure.S) = struct
| Slist1sep s t ->
fprintf ppf "LIST1 %a SEP %a" print_symbol1 s print_symbol1 t
| Sopt s -> fprintf ppf "OPT %a" print_symbol1 s
| Stry s -> fprintf ppf "TRY %a" print_symbol1 s
| Snterml e l -> fprintf ppf "%s@ LEVEL@ %S" e.ename l
| Snterm _ | Snext | Sself | Stree _ | Stoken _ | Skeyword _ as s ->
print_symbol1 ppf s ]
@ -199,7 +201,7 @@ module MakeDump (Structure : Structure.S) = struct
| Skeyword s -> fprintf ppf "%S" s
| Stree t -> print_tree ppf t
| Smeta _ _ _ | Snterml _ _ | Slist0 _ | Slist0sep _ _ | Slist1 _ |
Slist1sep _ _ | Sopt _ as s ->
Slist1sep _ _ | Sopt _ | Stry _ as s ->
fprintf ppf "(%a)" print_symbol s ]
and print_rule ppf symbols =
do {

View File

@ -49,7 +49,7 @@ value tree_in_entry prev_symb tree =
and search_symbol symb =
match symb with
[ Snterm _ | Snterml _ _ | Slist0 _ | Slist0sep _ _ | Slist1 _ |
Slist1sep _ _ | Sopt _ | Stoken _ | Stree _ | Skeyword _
Slist1sep _ _ | Sopt _ | Stry _ | Stoken _ | Stree _ | Skeyword _
when symb == prev_symb ->
Some symb
| Slist0 symb ->
@ -78,6 +78,10 @@ value tree_in_entry prev_symb tree =
match search_symbol symb with
[ Some symb -> Some (Sopt symb)
| None -> None ]
| Stry symb ->
match search_symbol symb with
[ Some symb -> Some (Stry symb)
| None -> None ]
| Stree t ->
match search_tree t with
[ Some t -> Some (Stree t)

View File

@ -28,6 +28,7 @@ module Make (Lexer : Sig.Lexer)
module Delete = Delete.Make Structure;
module Insert = Insert.Make Structure;
module Fold = Fold.Make Structure;
module Tools = Tools.Make Structure;
include Structure;
value gram =
@ -59,7 +60,7 @@ module Make (Lexer : Sig.Lexer)
value lex_string loc str = lex loc (Stream.of_string str);
value filter ts = Token.Filter.filter gram.gfilter ts;
value filter ts = Tools.keep_prev_loc (Token.Filter.filter gram.gfilter ts);
value parse_tokens_after_filter entry ts = Entry.E.parse_tokens_after_filter entry ts;

View File

@ -25,7 +25,6 @@ module type S = sig
module Lexer : Sig.Lexer
with module Loc = Loc
and module Token = Token;
module Context : Context.S with module Token = Token;
module Action : Sig.Grammar.Action;
type gram =
@ -35,7 +34,13 @@ module type S = sig
warning_verbose : ref bool;
error_verbose : ref bool };
type efun = Context.t -> Stream.t (Token.t * Loc.t) -> Action.t;
type token_info = { prev_loc : Loc.t
; cur_loc : Loc.t
};
type token_stream = Stream.t (Token.t * token_info);
type efun = token_stream -> Action.t;
type token_pattern = ((Token.t -> bool) * string);
@ -47,7 +52,7 @@ module type S = sig
edesc : mutable desc }
and desc =
[ Dlevels of list level
| Dparser of Stream.t (Token.t * Loc.t) -> Action.t ]
| Dparser of token_stream -> Action.t ]
and level =
{ assoc : assoc ;
lname : option string ;
@ -62,6 +67,7 @@ module type S = sig
| Slist1 of symbol
| Slist1sep of symbol and symbol
| Sopt of symbol
| Stry of symbol
| Sself
| Snext
| Stoken of token_pattern
@ -118,9 +124,13 @@ module Make (Lexer : Sig.Lexer) = struct
warning_verbose : ref bool;
error_verbose : ref bool };
module Context = Context.Make Token;
type token_info = { prev_loc : Loc.t
; cur_loc : Loc.t
};
type efun = Context.t -> Stream.t (Token.t * Loc.t) -> Action.t;
type token_stream = Stream.t (Token.t * token_info);
type efun = token_stream -> Action.t;
type token_pattern = ((Token.t -> bool) * string);
@ -132,7 +142,7 @@ module Make (Lexer : Sig.Lexer) = struct
edesc : mutable desc }
and desc =
[ Dlevels of list level
| Dparser of Stream.t (Token.t * Loc.t) -> Action.t ]
| Dparser of token_stream -> Action.t ]
and level =
{ assoc : assoc ;
lname : option string ;
@ -147,6 +157,7 @@ module Make (Lexer : Sig.Lexer) = struct
| Slist1 of symbol
| Slist1sep of symbol and symbol
| Sopt of symbol
| Stry of symbol
| Sself
| Snext
| Stoken of token_pattern
@ -177,6 +188,7 @@ module Make (Lexer : Sig.Lexer) = struct
(Stream.t 'a -> 'b) -> (Stream.t 'a -> unit) -> Stream.t 'a -> 'c;
value get_filter g = g.gfilter;
value token_location r = r.cur_loc;
type not_filtered 'a = 'a;
value using { gkeywords = table; gfilter = filter } kwd =
@ -217,7 +229,7 @@ value iter_entry f e =
fun
[ Smeta _ sl _ -> List.iter do_symbol sl
| Snterm e | Snterml e _ -> do_entry e
| Slist0 s | Slist1 s | Sopt s -> do_symbol s
| Slist0 s | Slist1 s | Sopt s | Stry s -> do_symbol s
| Slist0sep s1 s2 | Slist1sep s1 s2 -> do { do_symbol s1; do_symbol s2 }
| Stree t -> do_tree t
| Sself | Snext | Stoken _ | Stoken_fun _ -> () ]
@ -251,7 +263,7 @@ value fold_entry f e init =
fun
[ Smeta _ sl _ -> List.fold_left do_symbol accu sl
| Snterm e | Snterml e _ -> do_entry accu e
| Slist0 s | Slist1 s | Sopt s -> do_symbol accu s
| Slist0 s | Slist1 s | Sopt s | Stry s -> do_symbol accu s
| Slist0sep s1 s2 | Slist1sep s1 s2 ->
let accu = do_symbol accu s1 in
do_symbol accu s2

View File

@ -16,12 +16,109 @@
* - Daniel de Rauglaudre: initial version
* - Nicolas Pouillard: refactoring
*)
(* BEGIN ugly hack. See 15 lines down. FIXME *)
type prev_locs = {
pl_strm : mutable Obj.t;
pl_locs : mutable list (int * Obj.t)
};
value prev_locs = ref ([] : list prev_locs);
(* END ugly hack FIXME *)
module Make (Structure : Structure.S) = struct
open Structure;
value empty_entry ename _ _ _ =
value empty_entry ename _ =
raise (Stream.Error ("entry [" ^ ename ^ "] is empty"));
value rec stream_map f = parser
[ [: ` x; strm :] -> [: ` (f x); stream_map f strm :]
| [: :] -> [: :] ];
(* ******************************************************************* *)
(* Ugly hack to prevent PR#5090. See how to do this properly after
the 3.12.0 release. FIXME.
*)
value keep_prev_loc strm =
match Stream.peek strm with
[ None -> [: :]
| Some (_, init_loc) ->
let myrecord = { pl_strm = Obj.repr [: :];
pl_locs = [(0, Obj.repr init_loc)] }
in
let rec go prev_loc = parser
[ [: `(tok, cur_loc); strm :] -> do {
myrecord.pl_locs := myrecord.pl_locs
@ [ (Stream.count strm, Obj.repr cur_loc) ];
[: `(tok, {prev_loc; cur_loc}); go cur_loc strm :] }
| [: :] -> do {
prev_locs.val := List.filter ((!=) myrecord) prev_locs.val;
[: :] } ]
in
let result = go init_loc strm in
do {
prev_locs.val := [myrecord :: prev_locs.val];
myrecord.pl_strm := Obj.repr result;
result } ];
value drop_prev_loc strm = stream_map (fun (tok,r) -> (tok,r)) strm;
value get_cur_loc strm =
match Stream.peek strm with
[ Some (_,r) -> r.cur_loc
| None -> Loc.ghost ];
value get_prev_loc strm =
let c = Stream.count strm in
let rec drop l =
match l with
[ [] -> []
| [(i, _) :: ll] -> if i < c then drop ll else l ]
in
let rec find l =
match l with
[ [] -> None
| [h::t] -> if h.pl_strm == Obj.repr strm then Some h else find t ]
in
match find prev_locs.val with
[ None -> Loc.ghost
| Some r -> do {
r.pl_locs := drop r.pl_locs;
match r.pl_locs with
[ [] -> Loc.ghost
| [(i, loc) :: _] ->
if i = c then (Obj.obj loc : Loc.t) else Loc.ghost ] } ];
(* ******************************************************************* *)
(* END of ugly hack. This is the previous code.
value keep_prev_loc strm =
match Stream.peek strm with
[ None -> [: :]
| Some (_,init_loc) ->
let rec go prev_loc = parser
[ [: `(tok,cur_loc); strm :] -> [: `(tok,{prev_loc;cur_loc}); go cur_loc strm :]
| [: :] -> [: :] ]
in go init_loc strm ];
value drop_prev_loc strm = stream_map (fun (tok,r) -> (tok,r.cur_loc)) strm;
value get_cur_loc strm =
match Stream.peek strm with
[ Some (_,r) -> r.cur_loc
| None -> Loc.ghost ];
value get_prev_loc strm =
match Stream.peek strm with
[ Some (_,r) -> r.prev_loc
| None -> Loc.ghost ];
*)
value is_level_labelled n lev =
match lev.lname with
[ Some n1 -> n = n1
@ -51,13 +148,13 @@ module Make (Structure : Structure.S) = struct
| (Snterm e1, Sself) -> e1.ename = entry.ename
| (Sself, Snterm e2) -> entry.ename = e2.ename
| (Snterml e1 l1, Snterml e2 l2) -> e1.ename = e2.ename && l1 = l2
| (Slist0 s1, Slist0 s2) -> eq_symbols s1 s2
| (Slist0sep s1 sep1, Slist0sep s2 sep2) ->
| (Slist0 s1, Slist0 s2) |
(Slist1 s1, Slist1 s2) |
(Sopt s1, Sopt s2) |
(Stry s1, Stry s2) -> eq_symbols s1 s2
| (Slist0sep s1 sep1, Slist0sep s2 sep2) |
(Slist1sep s1 sep1, Slist1sep s2 sep2) ->
eq_symbols s1 s2 && eq_symbols sep1 sep2
| (Slist1 s1, Slist1 s2) -> eq_symbols s1 s2
| (Slist1sep s1 sep1, Slist1sep s2 sep2) ->
eq_symbols s1 s2 && eq_symbols sep1 sep2
| (Sopt s1, Sopt s2) -> eq_symbols s1 s2
| (Stree t1, Stree t2) -> eq_trees t1 t2
| (Stoken (_, s1), Stoken (_, s2)) -> eq_Stoken_ids s1 s2
| _ -> s1 = s2 ]
@ -75,13 +172,13 @@ module Make (Structure : Structure.S) = struct
match (s1, s2) with
[ (Snterm e1, Snterm e2) -> e1 == e2
| (Snterml e1 l1, Snterml e2 l2) -> e1 == e2 && l1 = l2
| (Slist0 s1, Slist0 s2) -> eq_symbol s1 s2
| (Slist0sep s1 sep1, Slist0sep s2 sep2) ->
| (Slist0 s1, Slist0 s2) |
(Slist1 s1, Slist1 s2) |
(Sopt s1, Sopt s2) |
(Stry s1, Stry s2) -> eq_symbol s1 s2
| (Slist0sep s1 sep1, Slist0sep s2 sep2) |
(Slist1sep s1 sep1, Slist1sep s2 sep2) ->
eq_symbol s1 s2 && eq_symbol sep1 sep2
| (Slist1 s1, Slist1 s2) -> eq_symbol s1 s2
| (Slist1sep s1 sep1, Slist1sep s2 sep2) ->
eq_symbol s1 s2 && eq_symbol sep1 sep2
| (Sopt s1, Sopt s2) -> eq_symbol s1 s2
| (Stree _, Stree _) -> False
| (Stoken (_, s1), Stoken (_, s2)) -> eq_Stoken_ids s1 s2
| _ -> s1 = s2 ]

View File

@ -420,7 +420,7 @@ module Make (Token : Sig.Camlp4Token)
and dollar c = parse
| '$' { set_start_p c; ANTIQUOT("", "") }
| ('`'? (identchar*|'.'+) as name) ':'
| ('`'? (identchar*|['.' '!']+) as name) ':'
{ with_curr_loc (antiquot name) (shift (1 + String.length name) c) }
| _ { store_parse (antiquot "") c }

View File

@ -427,7 +427,7 @@ module Make (AstFilters : Camlp4.Sig.AstFilters) = struct
let params' = List.map string_of_type_param params in
let funs = lambda (fun_of_ctyp id1 ctyp) params' in
let ty = method_type_of_type_decl type_decl in
let priv = if priv then Ast.BTrue else Ast.BFalse in
let priv = if priv then <:private_flag< private >> else <:private_flag<>> in
<:class_str_item< method $private:priv$ $lid:id1$ : $ty$ = $funs$; $acc$ >>
and ctyp_name_of_name_params name params =

View File

@ -91,7 +91,8 @@ value mk_meta m =
let init = m_id m (meta_ident m m_name_cons) in
let p = patt_of_data_ctor_decl m_name_cons tyargs in
let e =
if cons = "BAnt" || cons = "OAnt" || cons = "LAnt" then
if List.mem cons ["BAnt"; "OAnt"; "LAnt"; "ReAnt"; "DiAnt";
"MuAnt"; "PrAnt"; "ViAnt"; "OvAnt"; "RvAnt"] then
<:expr< $id:m.ant$ _loc x0 >>
else if is_antiquot_data_ctor cons then
expr_of_data_ctor_decl m.ant tyargs

View File

@ -61,6 +61,7 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
| TXnext of loc
| TXnterm of loc and name 'e and option string
| TXopt of loc and text 'e 'p
| TXtry of loc and text 'e 'p
| TXrules of loc and list (list (text 'e 'p) * 'e)
| TXself of loc
| TXkwd of loc and string
@ -349,6 +350,7 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
$uid:gm$.Snterm
($uid:gm$.Entry.obj ($n.expr$ : $uid:gm$.Entry.t '$n.tvar$)) >> ]
| TXopt _loc t -> <:expr< $uid:gm$.Sopt $make_expr entry "" t$ >>
| TXtry _loc t -> <:expr< $uid:gm$.Stry $make_expr entry "" t$ >>
| TXrules _loc rl ->
<:expr< $uid:gm$.srules $entry.expr$ $make_expr_rules _loc entry rl ""$ >>
| TXself _loc -> <:expr< $uid:gm$.Sself >>
@ -769,7 +771,10 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
let () = check_not_tok s in
let styp = STapp _loc (STlid _loc "option") s.styp in
let text = TXopt _loc s.text in
{used = s.used; text = text; styp = styp; pattern = None} ]
{used = s.used; text = text; styp = styp; pattern = None}
| UIDENT "TRY"; s = SELF ->
let text = TXtry _loc s.text in
{used = s.used; text = text; styp = s.styp; pattern = None} ]
| [ UIDENT "SELF" ->
{used = []; text = TXself _loc; styp = STself _loc "SELF"; pattern = None}
| UIDENT "NEXT" ->

View File

@ -123,8 +123,9 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
;
item:
[ [ test_patt_lessminus;
p = patt; "<-" ; e = expr LEVEL "top" -> `gen (p, e)
(* NP: These rules rely on being on this particular order. Which should
be improved. *)
[ [ p = TRY [p = patt; "<-" -> p] ; e = expr LEVEL "top" -> `gen (p, e)
| e = expr LEVEL "top" -> `cond e ] ]
;

View File

@ -59,20 +59,6 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
(Ast.loc_of_expr e2) in
<:expr< do { $e1$; $e2$ } >> ];
value test_constr_decl =
Gram.Entry.of_parser "test_constr_decl"
(fun strm ->
match Stream.npeek 1 strm with
[ [(UIDENT _, _)] ->
match Stream.npeek 2 strm with
[ [_; (KEYWORD ".", _)] -> raise Stream.Failure
| [_; (KEYWORD "(", _)] -> raise Stream.Failure
| [_ :: _] -> ()
| _ -> raise Stream.Failure ]
| [(KEYWORD "|", _)] -> ()
| _ -> raise Stream.Failure ])
;
value stream_peek_nth n strm =
loop n (Stream.npeek n strm) where rec loop n =
fun
@ -81,75 +67,11 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
| [_ :: l] -> loop (n - 1) l ]
;
(* horrible hacks to be able to parse class_types *)
value test_ctyp_minusgreater =
Gram.Entry.of_parser "test_ctyp_minusgreater"
(fun strm ->
let rec skip_simple_ctyp n =
match stream_peek_nth n strm with
[ Some (KEYWORD "->") -> n
| Some (KEYWORD ("[" | "[<")) ->
skip_simple_ctyp (ignore_upto "]" (n + 1) + 1)
| Some (KEYWORD "(") -> skip_simple_ctyp (ignore_upto ")" (n + 1) + 1)
| Some
(KEYWORD
("as" | "'" | ":" | "*" | "." | "#" | "<" | ">" | ".." | ";" |
"_" | "?")) ->
skip_simple_ctyp (n + 1)
| Some (LIDENT _ | UIDENT _) ->
skip_simple_ctyp (n + 1)
| Some _ | None -> raise Stream.Failure ]
and ignore_upto end_kwd n =
match stream_peek_nth n strm with
[ Some (KEYWORD prm) when prm = end_kwd -> n
| Some (KEYWORD ("[" | "[<")) ->
ignore_upto end_kwd (ignore_upto "]" (n + 1) + 1)
| Some (KEYWORD "(") -> ignore_upto end_kwd (ignore_upto ")" (n + 1) + 1)
| Some _ -> ignore_upto end_kwd (n + 1)
| None -> raise Stream.Failure ]
in
match Stream.peek strm with
[ Some ((KEYWORD "[" | LIDENT _ | UIDENT _), _) -> skip_simple_ctyp 1
| Some (KEYWORD "object", _) -> raise Stream.Failure
| _ -> 1 ])
;
value test_label_expr_list =
Gram.Entry.of_parser "test_label_expr_list"
(test 1 where rec test lev strm =
match stream_peek_nth lev strm with
[ Some (UIDENT _ | LIDENT _ | KEYWORD ".") ->
test (lev + 1) strm
| Some (KEYWORD ("="|";"|"}")) ->
(* ";" and "}" occur due to record punning *)
()
| _ -> raise Stream.Failure ])
;
value test_typevar_list_dot =
Gram.Entry.of_parser "test_typevar_list_dot"
(let rec test lev strm =
match stream_peek_nth lev strm with
[ Some (KEYWORD "'") -> test2 (lev + 1) strm
| Some (KEYWORD ".") -> ()
| _ -> raise Stream.Failure ]
and test2 lev strm =
match stream_peek_nth lev strm with
[ Some (UIDENT _ | LIDENT _) -> test (lev + 1) strm
| _ -> raise Stream.Failure ]
in
test 1)
;
value lident_colon =
Gram.Entry.of_parser "lident_colon"
(fun strm ->
match Stream.npeek 2 strm with
[ [(LIDENT i, _); (KEYWORD ":", _)] ->
do { Stream.junk strm; Stream.junk strm; i }
| _ -> raise Stream.Failure ])
;
value test_not_dot_nor_lparen =
Gram.Entry.of_parser "test_not_dot_nor_lparen" (fun strm ->
match Stream.peek strm with
[ Some (KEYWORD ("."|"("),_) -> raise Stream.Failure
| _ -> () ]);
value rec is_ident_constr_call =
fun
@ -343,9 +265,9 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
expr: LEVEL "simple" (* LEFTA *)
[ [ "false" -> <:expr< False >>
| "true" -> <:expr< True >>
| "{"; test_label_expr_list; lel = label_expr_list; "}" ->
| "{"; lel = TRY [lel = label_expr_list; "}" -> lel] ->
<:expr< { $lel$ } >>
| "{"; e = expr LEVEL "."; "with"; lel = label_expr_list; "}" ->
| "{"; e = TRY [e = expr LEVEL "."; "with" -> e]; lel = label_expr_list; "}" ->
<:expr< { ($e$) with $lel$ } >>
| "new"; i = class_longident -> <:expr< new $i$ >>
] ]
@ -477,15 +399,15 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
| t = ctyp -> t ] ]
;
class_type_plus:
[ [ i = lident_colon; t = ctyp LEVEL "star"; "->"; ct = SELF ->
[ [ i = TRY [i = a_LIDENT; ":" -> i]; t = ctyp LEVEL "star"; "->"; ct = SELF ->
<:class_type< [ ~ $i$ : $t$ ] -> $ct$ >>
| "?"; i = a_LIDENT; ":"; t = ctyp LEVEL "star"; "->"; ct = SELF ->
<:class_type< [ ? $i$ : $t$ ] -> $ct$ >>
| i = OPTLABEL (* FIXME inline a_OPTLABEL *); t = ctyp LEVEL "star"; "->"; ct = SELF ->
<:class_type< [ ? $i$ : $t$ ] -> $ct$ >>
| test_ctyp_minusgreater; t = ctyp LEVEL "star"; "->"; ct = SELF ->
| t = TRY [t = ctyp LEVEL "star"; "->" -> t]; ct = SELF ->
<:class_type< [ $t$ ] -> $ct$ >>
| ct = class_type -> ct ] ]
| ct = TRY class_type -> ct ] ]
;
class_type_longident_and_param:
[ [ "["; t = comma_ctyp; "]"; i = class_type_longident ->
@ -507,7 +429,7 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
[ [ t1 = SELF; "as"; "'"; i = a_ident -> <:ctyp< $t1$ as '$i$ >> ]
| "arrow" RIGHTA
[ t1 = SELF; "->"; t2 = SELF -> <:ctyp< $t1$ -> $t2$ >>
| i = lident_colon; t1 = ctyp LEVEL "star"; "->"; t2 = SELF ->
| i = TRY [i = a_LIDENT; ":" -> i]; t1 = ctyp LEVEL "star"; "->"; t2 = SELF ->
<:ctyp< ( ~ $i$ : $t1$ ) -> $t2$ >>
| i = a_OPTLABEL; t1 = ctyp LEVEL "star"; "->"; t2 = SELF ->
<:ctyp< ( ? $i$ : $t1$ ) -> $t2$ >>
@ -557,7 +479,7 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
] ]
;
meth_list:
[ [ m = meth_decl -> (m, Ast.BFalse) ] ];
[ [ m = meth_decl -> (m, <:row_var_flag<>>) ] ];
comma_ctyp_app:
[ [ t1 = ctyp; ","; t2 = SELF -> fun acc -> t2 <:ctyp< $acc$ $t1$ >>
| t = ctyp -> fun acc -> <:ctyp< $acc$ $t$ >>
@ -602,14 +524,15 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
;
type_kind:
[ [ "private"; tk = type_kind -> <:ctyp< private $tk$ >>
| test_constr_decl; OPT "|";
t = constructor_declarations -> <:ctyp< [ $t$ ] >>
| t = ctyp -> <:ctyp< $t$ >>
| t = ctyp; "="; "private"; tk = type_kind ->
| t = TRY [OPT "|"; t = constructor_declarations;
test_not_dot_nor_lparen -> t] ->
<:ctyp< [ $t$ ] >>
| t = TRY ctyp -> <:ctyp< $t$ >>
| t = TRY ctyp; "="; "private"; tk = type_kind ->
<:ctyp< $t$ == private $tk$ >>
| t1 = ctyp; "="; "{"; t2 = label_declaration_list; "}" ->
| t1 = TRY ctyp; "="; "{"; t2 = label_declaration_list; "}" ->
<:ctyp< $t1$ == { $t2$ } >>
| t1 = ctyp; "="; OPT "|"; t2 = constructor_declarations ->
| t1 = TRY ctyp; "="; OPT "|"; t2 = constructor_declarations ->
<:ctyp< $t1$ == [ $t2$ ] >>
| "{"; t = label_declaration_list; "}" ->
<:ctyp< { $t$ } >> ] ]
@ -647,9 +570,9 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
] ]
;
poly_type:
[ [ test_typevar_list_dot; t1 = typevars; "."; t2 = ctyp ->
[ [ t1 = TRY [t = typevars; "." -> t]; t2 = ctyp ->
<:ctyp< ! $t1$ . $t2$ >>
| t = ctyp -> t ] ]
| t = TRY ctyp -> t ] ]
;
labeled_ipatt:
[ [ i = a_LABEL; p = patt LEVEL "simple" ->

View File

@ -300,20 +300,6 @@ Very old (no more supported) syntax:\n\
Some <:expr< Bigarray.Genarray.set $arr$ [| $coords$ |] $newval$ >>
| _ -> None ];
value test_not_left_brace_nor_do =
Gram.Entry.of_parser "test_not_left_brace_nor_do"
(fun strm ->
match Stream.peek strm with
[ Some(KEYWORD "{" | KEYWORD "do", _) -> raise Stream.Failure
| _ -> () ]);
value test_lparen_type =
Gram.Entry.of_parser "test_lparen_type"
(fun strm ->
match Stream.npeek 2 strm with
[ [(KEYWORD "(", _); (KEYWORD "type", _)] -> ()
| _ -> raise Stream.Failure ]);
value stopped_at _loc =
Some (Loc.move_line 1 _loc) (* FIXME be more precise *);
@ -330,69 +316,46 @@ Very old (no more supported) syntax:\n\
loop
;
value setup_op_parser entry p =
Gram.Entry.setup_parser entry
(parser
[: `(KEYWORD x | SYMBOL x, ti) when p x :] ->
let _loc = Gram.token_location ti in
<:expr< $lid:x$ >>);
let list = ['!'; '?'; '~'] in
let excl = ["!="; "??"] in
Gram.Entry.setup_parser prefixop
(parser
[: `(KEYWORD x | SYMBOL x, _loc)
when
not (List.mem x excl) && String.length x >= 2 &&
List.mem x.[0] list && symbolchar x 1 :] ->
<:expr< $lid:x$ >>)
;
setup_op_parser prefixop
(fun x -> not (List.mem x excl) && String.length x >= 2 &&
List.mem x.[0] list && symbolchar x 1);
let list_ok = ["<"; ">"; "<="; ">="; "="; "<>"; "=="; "!="; "$"] in
let list_first_char_ok = ['='; '<'; '>'; '|'; '&'; '$'; '!'] in
let excl = ["<-"; "||"; "&&"] in
Gram.Entry.setup_parser infixop0
(parser
[: `(KEYWORD x | SYMBOL x, _loc)
when
(List.mem x list_ok) ||
(not (List.mem x excl) && String.length x >= 2 &&
List.mem x.[0] list_first_char_ok && symbolchar x 1) :] ->
<:expr< $lid:x$ >>)
;
setup_op_parser infixop0
(fun x -> (List.mem x list_ok) ||
(not (List.mem x excl) && String.length x >= 2 &&
List.mem x.[0] list_first_char_ok && symbolchar x 1));
let list = ['@'; '^'] in
Gram.Entry.setup_parser infixop1
(parser
[: `(KEYWORD x | SYMBOL x, _loc)
when
String.length x >= 1 && List.mem x.[0] list &&
symbolchar x 1 :] ->
<:expr< $lid:x$ >>)
;
setup_op_parser infixop1
(fun x -> String.length x >= 1 && List.mem x.[0] list &&
symbolchar x 1);
let list = ['+'; '-'] in
Gram.Entry.setup_parser infixop2
(parser
[: `(KEYWORD x | SYMBOL x, _loc)
when
x <> "->" && String.length x >= 1 && List.mem x.[0] list &&
symbolchar x 1 :] ->
<:expr< $lid:x$ >>)
;
setup_op_parser infixop2
(fun x -> x <> "->" && String.length x >= 1 && List.mem x.[0] list &&
symbolchar x 1);
let list = ['*'; '/'; '%'; '\\'] in
Gram.Entry.setup_parser infixop3
(parser
[: `(KEYWORD x | SYMBOL x, _loc)
when
String.length x >= 1 && List.mem x.[0] list &&
(x.[0] <> '*' || String.length x < 2 || x.[1] <> '*') &&
symbolchar x 1 :] ->
<:expr< $lid:x$ >>)
;
setup_op_parser infixop3
(fun x -> String.length x >= 1 && List.mem x.[0] list &&
(x.[0] <> '*' || String.length x < 2 || x.[1] <> '*') &&
symbolchar x 1);
Gram.Entry.setup_parser infixop4
(parser
[: `(KEYWORD x | SYMBOL x, _loc)
when
String.length x >= 2 && x.[0] == '*' && x.[1] == '*' &&
symbolchar x 2 :] ->
<:expr< $lid:x$ >>)
;
setup_op_parser infixop4
(fun x -> String.length x >= 2 && x.[0] == '*' && x.[1] == '*' &&
symbolchar x 2);
value rec infix_kwds_filter =
parser
@ -408,17 +371,21 @@ Very old (no more supported) syntax:\n\
Token.Filter.define_filter (Gram.get_filter ())
(fun f strm -> infix_kwds_filter (f strm));
(* transmit the context *)
Gram.Entry.setup_parser sem_expr begin
let symb1 = Gram.parse_tokens_after_filter expr in
let symb =
parser
[ [: `(ANTIQUOT ("list" as n) s, _loc) :] -> <:expr< $anti:mk_anti ~c:"expr;" n s$ >>
[ [: `(ANTIQUOT ("list" as n) s, ti) :] ->
let _loc = Gram.token_location ti in
<:expr< $anti:mk_anti ~c:"expr;" n s$ >>
| [: a = symb1 :] -> a ]
in
let rec kont al =
parser
[ [: `(KEYWORD ";", _loc); a = symb; s :] -> kont <:expr< $al$; $a$ >> s
[ [: `(KEYWORD ";", _); a = symb; s :] ->
let _loc = Loc.merge (Ast.loc_of_expr al)
(Ast.loc_of_expr a) in
kont <:expr< $al$; $a$ >> s
| [: :] -> al ]
in
parser [: a = symb; s :] -> kont a s
@ -457,7 +424,9 @@ Very old (no more supported) syntax:\n\
type_ident_and_parameters type_kind type_longident
type_longident_and_parameters type_parameter type_parameters typevars
use_file val_longident value_let value_val with_constr with_constr_quot
infixop0 infixop1 infixop2 infixop3 infixop4 do_sequence package_type;
infixop0 infixop1 infixop2 infixop3 infixop4 do_sequence package_type
rec_flag_quot direction_flag_quot mutable_flag_quot private_flag_quot
virtual_flag_quot row_var_flag_quot override_flag_quot;
module_expr:
[ "top"
[ "functor"; "("; i = a_UIDENT; ":"; t = module_type; ")"; "->";
@ -715,7 +684,9 @@ Very old (no more supported) syntax:\n\
| s = a_FLOAT -> <:expr< $flo:s$ >>
| s = a_STRING -> <:expr< $str:s$ >>
| s = a_CHAR -> <:expr< $chr:s$ >>
| i = val_longident -> <:expr< $id:i$ >>
| i = TRY module_longident_dot_lparen; e = sequence; ")" ->
<:expr< let open $i$ in $e$ >>
| i = TRY val_longident -> <:expr< $id:i$ >>
| "`"; s = a_ident -> <:expr< ` $s$ >>
| "["; "]" -> <:expr< [] >>
| "["; mk_list = sem_expr_for_list; "::"; last = expr; "]" ->
@ -747,8 +718,10 @@ Very old (no more supported) syntax:\n\
] ]
;
do_sequence:
[ [ "{"; seq = sequence; "}" -> seq
| test_not_left_brace_nor_do; seq = sequence; "done" -> seq
[ [ seq = TRY ["{"; seq = sequence; "}" -> seq] -> seq
| TRY ["{"; "}"] -> <:expr< () >>
| seq = TRY [seq = sequence; "done" -> seq] -> seq
| "done" -> <:expr< () >>
] ]
;
infixop5:
@ -759,6 +732,7 @@ Very old (no more supported) syntax:\n\
;
sem_expr_for_list:
[ [ e = expr; ";"; el = SELF -> fun acc -> <:expr< [ $e$ :: $el acc$ ] >>
| e = expr; ";" -> fun acc -> <:expr< [ $e$ :: $acc$ ] >>
| e = expr -> fun acc -> <:expr< [ $e$ :: $acc$ ] >>
] ]
;
@ -805,9 +779,9 @@ Very old (no more supported) syntax:\n\
;
fun_binding:
[ RIGHTA
[ test_lparen_type; "("; "type"; i = a_LIDENT; ")"; e = SELF ->
Ast.ExFUN _loc i e
| p = labeled_ipatt; e = SELF ->
[ TRY ["("; "type"]; i = a_LIDENT; ")"; e = SELF ->
<:expr< fun (type $i$) -> $e$ >>
| p = TRY labeled_ipatt; e = SELF ->
<:expr< fun $p$ -> $e$ >>
| bi = cvalue_binding -> bi
] ]
@ -857,27 +831,27 @@ Very old (no more supported) syntax:\n\
<:rec_binding< $i$ = $lid:lid_of_ident i$ >> ] ]
;
fun_def:
[ [ test_lparen_type; "("; "type"; i = a_LIDENT; ")";
[ [ TRY ["("; "type"]; i = a_LIDENT; ")";
e = fun_def_cont_no_when ->
Ast.ExFUN _loc i e
| p = labeled_ipatt; (w, e) = fun_def_cont ->
<:expr< fun (type $i$) -> $e$ >>
| p = TRY labeled_ipatt; (w, e) = fun_def_cont ->
<:expr< fun [ $p$ when $w$ -> $e$ ] >> ] ]
;
fun_def_cont:
[ RIGHTA
[ test_lparen_type; "("; "type"; i = a_LIDENT; ")";
[ TRY ["("; "type"]; i = a_LIDENT; ")";
e = fun_def_cont_no_when ->
(<:expr<>>, Ast.ExFUN _loc i e)
| p = labeled_ipatt; (w,e) = SELF ->
(<:expr<>>, <:expr< fun (type $i$) -> $e$ >>)
| p = TRY labeled_ipatt; (w,e) = SELF ->
(<:expr<>>, <:expr< fun [ $p$ when $w$ -> $e$ ] >>)
| "when"; w = expr; "->"; e = expr -> (w, e)
| "->"; e = expr -> (<:expr<>>, e) ] ]
;
fun_def_cont_no_when:
[ RIGHTA
[ test_lparen_type; "("; "type"; i = a_LIDENT; ")";
e = fun_def_cont_no_when -> Ast.ExFUN _loc i e
| p = labeled_ipatt; (w,e) = fun_def_cont ->
[ TRY ["("; "type"]; i = a_LIDENT; ")";
e = fun_def_cont_no_when -> <:expr< fun (type $i$) -> $e$ >>
| p = TRY labeled_ipatt; (w,e) = fun_def_cont ->
<:expr< fun [ $p$ when $w$ -> $e$ ] >>
| "->"; e = expr -> e ] ]
;
@ -948,12 +922,14 @@ Very old (no more supported) syntax:\n\
;
sem_patt:
[ LEFTA
[ p1 = SELF; ";"; p2 = SELF -> <:patt< $p1$; $p2$ >>
[ p1 = patt; ";"; p2 = SELF -> <:patt< $p1$; $p2$ >>
| `ANTIQUOT ("list" as n) s -> <:patt< $anti:mk_anti ~c:"patt;" n s$ >>
| p = patt; ";" -> p
| p = patt -> p ] ]
;
sem_patt_for_list:
[ [ p = patt; ";"; pl = SELF -> fun acc -> <:patt< [ $p$ :: $pl acc$ ] >>
| p = patt; ";" -> fun acc -> <:patt< [ $p$ :: $acc$ ] >>
| p = patt -> fun acc -> <:patt< [ $p$ :: $acc$ ] >>
] ]
;
@ -1202,6 +1178,12 @@ Very old (no more supported) syntax:\n\
| i = a_UIDENT -> <:ident< $uid:i$ >>
| "("; i = SELF; ")" -> i ] ]
;
module_longident_dot_lparen:
[ [ `ANTIQUOT (""|"id"|"anti"|"list" as n) s; "."; "(" ->
<:ident< $anti:mk_anti ~c:"ident" n s$ >>
| m = a_UIDENT; "."; l = SELF -> <:ident< $uid:m$.$l$ >>
| i = a_UIDENT; "."; "(" -> <:ident< $uid:i$ >> ] ]
;
type_longident:
[ "apply"
[ i = SELF; j = SELF -> <:ident< $i$ $j$ >> ]
@ -1328,25 +1310,48 @@ Very old (no more supported) syntax:\n\
[ `ANTIQUOT (""|"cst"|"anti"|"list" as n) s ->
<:class_str_item< $anti:mk_anti ~c:"class_str_item" n s$ >>
| `QUOTATION x -> Quotation.expand _loc x Quotation.DynAst.class_str_item_tag
| "inherit"; ce = class_expr; pb = opt_as_lident ->
<:class_str_item< inherit $ce$ as $pb$ >>
| value_val; mf = opt_mutable; lab = label; e = cvalue_binding ->
<:class_str_item< value $mutable:mf$ $lab$ = $e$ >>
| value_val; mf = opt_mutable; "virtual"; l = label; ":"; t = poly_type ->
<:class_str_item< value virtual $mutable:mf$ $l$ : $t$ >>
| value_val; "virtual"; mf = opt_mutable; l = label; ":"; t = poly_type ->
<:class_str_item< value virtual $mutable:mf$ $l$ : $t$ >>
| "method"; "virtual"; pf = opt_private; l = label; ":"; t = poly_type ->
<:class_str_item< method virtual $private:pf$ $l$ : $t$ >>
| "method"; pf = opt_private; "virtual"; l = label; ":"; t = poly_type ->
<:class_str_item< method virtual $private:pf$ $l$ : $t$ >>
| "method"; pf = opt_private; l = label; topt = opt_polyt;
e = fun_binding ->
<:class_str_item< method $private:pf$ $l$ : $topt$ = $e$ >>
| "inherit"; o = opt_override; ce = class_expr; pb = opt_as_lident ->
<:class_str_item< inherit $override:o$ $ce$ as $pb$ >>
| o = value_val_opt_override; mf = opt_mutable; lab = label; e = cvalue_binding ->
<:class_str_item< value $override:o$ $mutable:mf$ $lab$ = $e$ >>
| o = value_val_opt_override; mf = opt_mutable; "virtual"; l = label; ":"; t = poly_type ->
if o <> <:override_flag<>> then
raise (Stream.Error "override (!) is incompatible with virtual")
else
<:class_str_item< value virtual $mutable:mf$ $l$ : $t$ >>
| o = value_val_opt_override; "virtual"; mf = opt_mutable; l = label; ":"; t = poly_type ->
if o <> <:override_flag<>> then
raise (Stream.Error "override (!) is incompatible with virtual")
else
<:class_str_item< value virtual $mutable:mf$ $l$ : $t$ >>
| o = method_opt_override; "virtual"; pf = opt_private; l = label; ":"; t = poly_type ->
if o <> <:override_flag<>> then
raise (Stream.Error "override (!) is incompatible with virtual")
else
<:class_str_item< method virtual $private:pf$ $l$ : $t$ >>
| o = method_opt_override; pf = opt_private; l = label; topt = opt_polyt; e = fun_binding ->
<:class_str_item< method $override:o$ $private:pf$ $l$ : $topt$ = $e$ >>
| o = method_opt_override; pf = opt_private; "virtual"; l = label; ":"; t = poly_type ->
if o <> <:override_flag<>> then
raise (Stream.Error "override (!) is incompatible with virtual")
else
<:class_str_item< method virtual $private:pf$ $l$ : $t$ >>
| type_constraint; t1 = ctyp; "="; t2 = ctyp ->
<:class_str_item< type $t1$ = $t2$ >>
| "initializer"; se = expr -> <:class_str_item< initializer $se$ >> ] ]
;
method_opt_override:
[ [ "method"; "!" -> <:override_flag< ! >>
| "method"; `ANTIQUOT (("!"|"override"|"anti") as n) s -> Ast.OvAnt (mk_anti n s)
| "method" -> <:override_flag<>>
] ]
;
value_val_opt_override:
[ [ value_val; "!" -> <:override_flag< ! >>
| value_val; `ANTIQUOT (("!"|"override"|"anti") as n) s -> Ast.OvAnt (mk_anti n s)
| value_val -> <:override_flag<>>
] ]
;
opt_as_lident:
[ [ "as"; i = a_LIDENT -> i
| -> ""
@ -1535,38 +1540,44 @@ Very old (no more supported) syntax:\n\
| p = ipatt -> p ] ]
;
direction_flag:
[ [ "to" -> Ast.BTrue
| "downto" -> Ast.BFalse
| `ANTIQUOT ("to" as n) s -> Ast.BAnt (mk_anti n s) ] ]
[ [ "to" -> <:direction_flag< to >>
| "downto" -> <:direction_flag< downto >>
| `ANTIQUOT ("to"|"anti" as n) s -> Ast.DiAnt (mk_anti n s) ] ]
;
opt_private:
[ [ "private" -> Ast.BTrue
| `ANTIQUOT ("private" as n) s -> Ast.BAnt (mk_anti n s)
| -> Ast.BFalse
[ [ "private" -> <:private_flag< private >>
| `ANTIQUOT ("private"|"anti" as n) s -> Ast.PrAnt (mk_anti n s)
| -> <:private_flag<>>
] ]
;
opt_mutable:
[ [ "mutable" -> Ast.BTrue
| `ANTIQUOT ("mutable" as n) s -> Ast.BAnt (mk_anti n s)
| -> Ast.BFalse
[ [ "mutable" -> <:mutable_flag< mutable >>
| `ANTIQUOT ("mutable"|"anti" as n) s -> Ast.MuAnt (mk_anti n s)
| -> <:mutable_flag<>>
] ]
;
opt_virtual:
[ [ "virtual" -> Ast.BTrue
| `ANTIQUOT ("virtual" as n) s -> Ast.BAnt (mk_anti n s)
| -> Ast.BFalse
[ [ "virtual" -> <:virtual_flag< virtual >>
| `ANTIQUOT ("virtual"|"anti" as n) s -> Ast.ViAnt (mk_anti n s)
| -> <:virtual_flag<>>
] ]
;
opt_dot_dot:
[ [ ".." -> Ast.BTrue
| `ANTIQUOT (".." as n) s -> Ast.BAnt (mk_anti n s)
| -> Ast.BFalse
[ [ ".." -> <:row_var_flag< .. >>
| `ANTIQUOT (".."|"anti" as n) s -> Ast.RvAnt (mk_anti n s)
| -> <:row_var_flag<>>
] ]
;
opt_rec:
[ [ "rec" -> Ast.BTrue
| `ANTIQUOT ("rec" as n) s -> Ast.BAnt (mk_anti n s)
| -> Ast.BFalse
[ [ "rec" -> <:rec_flag< rec >>
| `ANTIQUOT ("rec"|"anti" as n) s -> Ast.ReAnt (mk_anti n s)
| -> <:rec_flag<>>
] ]
;
opt_override:
[ [ "!" -> <:override_flag< ! >>
| `ANTIQUOT (("!"|"override"|"anti") as n) s -> Ast.OvAnt (mk_anti n s)
| -> <:override_flag<>>
] ]
;
opt_expr:
@ -1799,7 +1810,7 @@ Very old (no more supported) syntax:\n\
| "virtual"; (i, ot) = class_name_and_param ->
<:class_expr< virtual $lid:i$ [ $ot$ ] >>
| `ANTIQUOT ("virtual" as n) s; i = ident; ot = opt_comma_ctyp ->
let anti = Ast.BAnt (mk_anti ~c:"class_expr" n s) in
let anti = Ast.ViAnt (mk_anti ~c:"class_expr" n s) in
<:class_expr< $virtual:anti$ $id:i$ [ $ot$ ] >>
| x = class_expr -> x
| -> <:class_expr<>>
@ -1812,7 +1823,7 @@ Very old (no more supported) syntax:\n\
| "virtual"; (i, ot) = class_name_and_param ->
<:class_type< virtual $lid:i$ [ $ot$ ] >>
| `ANTIQUOT ("virtual" as n) s; i = ident; ot = opt_comma_ctyp ->
let anti = Ast.BAnt (mk_anti ~c:"class_type" n s) in
let anti = Ast.ViAnt (mk_anti ~c:"class_type" n s) in
<:class_type< $virtual:anti$ $id:i$ [ $ot$ ] >>
| x = class_type_plus -> x
| -> <:class_type<>>
@ -1833,6 +1844,13 @@ Very old (no more supported) syntax:\n\
[ [ x = with_constr -> x
| -> <:with_constr<>> ] ]
;
rec_flag_quot: [ [ x = opt_rec -> x ] ];
direction_flag_quot: [ [ x = direction_flag -> x ] ];
mutable_flag_quot: [ [ x = opt_mutable -> x ] ];
private_flag_quot: [ [ x = opt_private -> x ] ];
virtual_flag_quot: [ [ x = opt_virtual -> x ] ];
row_var_flag_quot: [ [ x = opt_dot_dot -> x ] ];
override_flag_quot: [ [ x = opt_override -> x ] ];
patt_eoi:
[ [ x = patt; `EOI -> x ] ]
;

View File

@ -320,10 +320,10 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
parser_case parser_case_list;
expr: LEVEL "top"
[ [ "parser"; po = OPT parser_ipatt; pcl = parser_case_list ->
<:expr< $cparser _loc po pcl$ >>
cparser _loc po pcl
| "match"; e = sequence; "with"; "parser"; po = OPT parser_ipatt;
pcl = parser_case_list ->
<:expr< $cparser_match _loc e po pcl$ >>
cparser_match _loc e po pcl
] ]
;
parser_case_list:

View File

@ -201,5 +201,12 @@ module Make (Syntax : Sig.Camlp4Syntax)
add_quotation "module_binding"
module_binding_quot ME.meta_module_binding MP.meta_module_binding;
add_quotation "ident" ident_quot ME.meta_ident MP.meta_ident;
add_quotation "rec_flag" rec_flag_quot ME.meta_rec_flag MP.meta_rec_flag;
add_quotation "private_flag" private_flag_quot ME.meta_private_flag MP.meta_private_flag;
add_quotation "row_var_flag" row_var_flag_quot ME.meta_row_var_flag MP.meta_row_var_flag;
add_quotation "mutable_flag" mutable_flag_quot ME.meta_mutable_flag MP.meta_mutable_flag;
add_quotation "virtual_flag" virtual_flag_quot ME.meta_virtual_flag MP.meta_virtual_flag;
add_quotation "override_flag" override_flag_quot ME.meta_override_flag MP.meta_override_flag;
add_quotation "direction_flag" direction_flag_quot ME.meta_direction_flag MP.meta_direction_flag;
end;

File diff suppressed because it is too large Load Diff

View File

@ -35,7 +35,6 @@ module Struct = struct
sig INCLUDE "camlp4/Camlp4/Struct/FreeVars.mli"; end =
struct INCLUDE "camlp4/Camlp4/Struct/FreeVars.ml"; end;
module Grammar = struct
module Context = struct INCLUDE "camlp4/Camlp4/Struct/Grammar/Context.ml"; end;
module Structure = struct INCLUDE "camlp4/Camlp4/Struct/Grammar/Structure.ml"; end;
module Search = struct INCLUDE "camlp4/Camlp4/Struct/Grammar/Search.ml"; end;
(* module Find = struct INCLUDE "camlp4/Camlp4/Struct/Grammar/Find.ml"; end; *)

View File

@ -568,7 +568,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "CeLet")))
(meta_loc _loc x0))
(meta_meta_bool _loc x1))
(meta_rec_flag _loc x1))
(meta_binding _loc x2))
(meta_class_expr _loc x3)
| Ast.CeFun x0 x1 x2 ->
@ -590,7 +590,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "CeCon")))
(meta_loc _loc x0))
(meta_meta_bool _loc x1))
(meta_virtual_flag _loc x1))
(meta_ident _loc x2))
(meta_ctyp _loc x3)
| Ast.CeApp x0 x1 x2 ->
@ -622,7 +622,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdUid _loc "CgVir")))
(meta_loc _loc x0))
(meta_string _loc x1))
(meta_meta_bool _loc x2))
(meta_private_flag _loc x2))
(meta_ctyp _loc x3)
| Ast.CgVal x0 x1 x2 x3 x4 ->
Ast.ExApp _loc
@ -635,8 +635,8 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdUid _loc "CgVal")))
(meta_loc _loc x0))
(meta_string _loc x1))
(meta_meta_bool _loc x2))
(meta_meta_bool _loc x3))
(meta_mutable_flag _loc x2))
(meta_virtual_flag _loc x3))
(meta_ctyp _loc x4)
| Ast.CgMth x0 x1 x2 x3 ->
Ast.ExApp _loc
@ -648,7 +648,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdUid _loc "CgMth")))
(meta_loc _loc x0))
(meta_string _loc x1))
(meta_meta_bool _loc x2))
(meta_private_flag _loc x2))
(meta_ctyp _loc x3)
| Ast.CgInh x0 x1 ->
Ast.ExApp _loc
@ -697,7 +697,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdUid _loc "CrVvr")))
(meta_loc _loc x0))
(meta_string _loc x1))
(meta_meta_bool _loc x2))
(meta_mutable_flag _loc x2))
(meta_ctyp _loc x3)
| Ast.CrVir x0 x1 x2 x3 ->
Ast.ExApp _loc
@ -709,21 +709,9 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdUid _loc "CrVir")))
(meta_loc _loc x0))
(meta_string _loc x1))
(meta_meta_bool _loc x2))
(meta_private_flag _loc x2))
(meta_ctyp _loc x3)
| Ast.CrVal x0 x1 x2 x3 ->
Ast.ExApp _loc
(Ast.ExApp _loc
(Ast.ExApp _loc
(Ast.ExApp _loc
(Ast.ExId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "CrVal")))
(meta_loc _loc x0))
(meta_string _loc x1))
(meta_meta_bool _loc x2))
(meta_expr _loc x3)
| Ast.CrMth x0 x1 x2 x3 x4 ->
| Ast.CrVal x0 x1 x2 x3 x4 ->
Ast.ExApp _loc
(Ast.ExApp _loc
(Ast.ExApp _loc
@ -731,12 +719,29 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.ExApp _loc
(Ast.ExId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "CrMth")))
(Ast.IdUid _loc "CrVal")))
(meta_loc _loc x0))
(meta_string _loc x1))
(meta_meta_bool _loc x2))
(meta_expr _loc x3))
(meta_ctyp _loc x4)
(meta_override_flag _loc x2))
(meta_mutable_flag _loc x3))
(meta_expr _loc x4)
| Ast.CrMth x0 x1 x2 x3 x4 x5 ->
Ast.ExApp _loc
(Ast.ExApp _loc
(Ast.ExApp _loc
(Ast.ExApp _loc
(Ast.ExApp _loc
(Ast.ExApp _loc
(Ast.ExId _loc
(Ast.IdAcc _loc
(Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "CrMth")))
(meta_loc _loc x0))
(meta_string _loc x1))
(meta_override_flag _loc x2))
(meta_private_flag _loc x3))
(meta_expr _loc x4))
(meta_ctyp _loc x5)
| Ast.CrIni x0 x1 ->
Ast.ExApp _loc
(Ast.ExApp _loc
@ -745,16 +750,18 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdUid _loc "CrIni")))
(meta_loc _loc x0))
(meta_expr _loc x1)
| Ast.CrInh x0 x1 x2 ->
| Ast.CrInh x0 x1 x2 x3 ->
Ast.ExApp _loc
(Ast.ExApp _loc
(Ast.ExApp _loc
(Ast.ExId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "CrInh")))
(meta_loc _loc x0))
(meta_class_expr _loc x1))
(meta_string _loc x2)
(Ast.ExApp _loc
(Ast.ExId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "CrInh")))
(meta_loc _loc x0))
(meta_override_flag _loc x1))
(meta_class_expr _loc x2))
(meta_string _loc x3)
| Ast.CrCtr x0 x1 x2 ->
Ast.ExApp _loc
(Ast.ExApp _loc
@ -843,7 +850,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "CtCon")))
(meta_loc _loc x0))
(meta_meta_bool _loc x1))
(meta_virtual_flag _loc x1))
(meta_ident _loc x2))
(meta_ctyp _loc x3)
| Ast.CtNil x0 ->
@ -1088,7 +1095,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdUid _loc "TyObj")))
(meta_loc _loc x0))
(meta_ctyp _loc x1))
(meta_meta_bool _loc x2)
(meta_row_var_flag _loc x2)
| Ast.TyDcl x0 x1 x2 x3 x4 ->
Ast.ExApp _loc
(Ast.ExApp _loc
@ -1186,6 +1193,17 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "TyNil")))
(meta_loc _loc x0) ]
and meta_direction_flag _loc =
fun
[ Ast.DiAnt x0 -> Ast.ExAnt _loc x0
| Ast.DiDownto ->
Ast.ExId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "DiDownto"))
| Ast.DiTo ->
Ast.ExId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "DiTo")) ]
and meta_expr _loc =
fun
[ Ast.ExPkg x0 x1 ->
@ -1385,7 +1403,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "ExLet")))
(meta_loc _loc x0))
(meta_meta_bool _loc x1))
(meta_rec_flag _loc x1))
(meta_binding _loc x2))
(meta_expr _loc x3)
| Ast.ExLaz x0 x1 ->
@ -1473,7 +1491,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(meta_string _loc x1))
(meta_expr _loc x2))
(meta_expr _loc x3))
(meta_meta_bool _loc x4))
(meta_direction_flag _loc x4))
(meta_expr _loc x5)
| Ast.ExFlo x0 x1 ->
Ast.ExApp _loc
@ -1860,6 +1878,28 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "MtNil")))
(meta_loc _loc x0) ]
and meta_mutable_flag _loc =
fun
[ Ast.MuAnt x0 -> Ast.ExAnt _loc x0
| Ast.MuNil ->
Ast.ExId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "MuNil"))
| Ast.MuMutable ->
Ast.ExId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "MuMutable")) ]
and meta_override_flag _loc =
fun
[ Ast.OvAnt x0 -> Ast.ExAnt _loc x0
| Ast.OvNil ->
Ast.ExId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "OvNil"))
| Ast.OvOverride ->
Ast.ExId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "OvOverride")) ]
and meta_patt _loc =
fun
[ Ast.PaLaz x0 x1 ->
@ -2099,6 +2139,17 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "PaNil")))
(meta_loc _loc x0) ]
and meta_private_flag _loc =
fun
[ Ast.PrAnt x0 -> Ast.ExAnt _loc x0
| Ast.PrNil ->
Ast.ExId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "PrNil"))
| Ast.PrPrivate ->
Ast.ExId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "PrPrivate")) ]
and meta_rec_binding _loc =
fun
[ Ast.RbAnt x0 x1 -> Ast.ExAnt x0 x1
@ -2128,6 +2179,28 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "RbNil")))
(meta_loc _loc x0) ]
and meta_rec_flag _loc =
fun
[ Ast.ReAnt x0 -> Ast.ExAnt _loc x0
| Ast.ReNil ->
Ast.ExId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "ReNil"))
| Ast.ReRecursive ->
Ast.ExId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "ReRecursive")) ]
and meta_row_var_flag _loc =
fun
[ Ast.RvAnt x0 -> Ast.ExAnt _loc x0
| Ast.RvNil ->
Ast.ExId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "RvNil"))
| Ast.RvRowVar ->
Ast.ExId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "RvRowVar")) ]
and meta_sig_item _loc =
fun
[ Ast.SgAnt x0 x1 -> Ast.ExAnt x0 x1
@ -2266,7 +2339,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "StVal")))
(meta_loc _loc x0))
(meta_meta_bool _loc x1))
(meta_rec_flag _loc x1))
(meta_binding _loc x2)
| Ast.StTyp x0 x1 ->
Ast.ExApp _loc
@ -2392,6 +2465,17 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "StNil")))
(meta_loc _loc x0) ]
and meta_virtual_flag _loc =
fun
[ Ast.ViAnt x0 -> Ast.ExAnt _loc x0
| Ast.ViNil ->
Ast.ExId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "ViNil"))
| Ast.ViVirtual ->
Ast.ExId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "ViVirtual")) ]
and meta_with_constr _loc =
fun
[ Ast.WcAnt x0 x1 -> Ast.ExAnt x0 x1
@ -2552,7 +2636,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "CeLet")))
(meta_loc _loc x0))
(meta_meta_bool _loc x1))
(meta_rec_flag _loc x1))
(meta_binding _loc x2))
(meta_class_expr _loc x3)
| Ast.CeFun x0 x1 x2 ->
@ -2574,7 +2658,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "CeCon")))
(meta_loc _loc x0))
(meta_meta_bool _loc x1))
(meta_virtual_flag _loc x1))
(meta_ident _loc x2))
(meta_ctyp _loc x3)
| Ast.CeApp x0 x1 x2 ->
@ -2606,7 +2690,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdUid _loc "CgVir")))
(meta_loc _loc x0))
(meta_string _loc x1))
(meta_meta_bool _loc x2))
(meta_private_flag _loc x2))
(meta_ctyp _loc x3)
| Ast.CgVal x0 x1 x2 x3 x4 ->
Ast.PaApp _loc
@ -2619,8 +2703,8 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdUid _loc "CgVal")))
(meta_loc _loc x0))
(meta_string _loc x1))
(meta_meta_bool _loc x2))
(meta_meta_bool _loc x3))
(meta_mutable_flag _loc x2))
(meta_virtual_flag _loc x3))
(meta_ctyp _loc x4)
| Ast.CgMth x0 x1 x2 x3 ->
Ast.PaApp _loc
@ -2632,7 +2716,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdUid _loc "CgMth")))
(meta_loc _loc x0))
(meta_string _loc x1))
(meta_meta_bool _loc x2))
(meta_private_flag _loc x2))
(meta_ctyp _loc x3)
| Ast.CgInh x0 x1 ->
Ast.PaApp _loc
@ -2681,7 +2765,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdUid _loc "CrVvr")))
(meta_loc _loc x0))
(meta_string _loc x1))
(meta_meta_bool _loc x2))
(meta_mutable_flag _loc x2))
(meta_ctyp _loc x3)
| Ast.CrVir x0 x1 x2 x3 ->
Ast.PaApp _loc
@ -2693,21 +2777,9 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdUid _loc "CrVir")))
(meta_loc _loc x0))
(meta_string _loc x1))
(meta_meta_bool _loc x2))
(meta_private_flag _loc x2))
(meta_ctyp _loc x3)
| Ast.CrVal x0 x1 x2 x3 ->
Ast.PaApp _loc
(Ast.PaApp _loc
(Ast.PaApp _loc
(Ast.PaApp _loc
(Ast.PaId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "CrVal")))
(meta_loc _loc x0))
(meta_string _loc x1))
(meta_meta_bool _loc x2))
(meta_expr _loc x3)
| Ast.CrMth x0 x1 x2 x3 x4 ->
| Ast.CrVal x0 x1 x2 x3 x4 ->
Ast.PaApp _loc
(Ast.PaApp _loc
(Ast.PaApp _loc
@ -2715,12 +2787,29 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.PaApp _loc
(Ast.PaId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "CrMth")))
(Ast.IdUid _loc "CrVal")))
(meta_loc _loc x0))
(meta_string _loc x1))
(meta_meta_bool _loc x2))
(meta_expr _loc x3))
(meta_ctyp _loc x4)
(meta_override_flag _loc x2))
(meta_mutable_flag _loc x3))
(meta_expr _loc x4)
| Ast.CrMth x0 x1 x2 x3 x4 x5 ->
Ast.PaApp _loc
(Ast.PaApp _loc
(Ast.PaApp _loc
(Ast.PaApp _loc
(Ast.PaApp _loc
(Ast.PaApp _loc
(Ast.PaId _loc
(Ast.IdAcc _loc
(Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "CrMth")))
(meta_loc _loc x0))
(meta_string _loc x1))
(meta_override_flag _loc x2))
(meta_private_flag _loc x3))
(meta_expr _loc x4))
(meta_ctyp _loc x5)
| Ast.CrIni x0 x1 ->
Ast.PaApp _loc
(Ast.PaApp _loc
@ -2729,16 +2818,18 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdUid _loc "CrIni")))
(meta_loc _loc x0))
(meta_expr _loc x1)
| Ast.CrInh x0 x1 x2 ->
| Ast.CrInh x0 x1 x2 x3 ->
Ast.PaApp _loc
(Ast.PaApp _loc
(Ast.PaApp _loc
(Ast.PaId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "CrInh")))
(meta_loc _loc x0))
(meta_class_expr _loc x1))
(meta_string _loc x2)
(Ast.PaApp _loc
(Ast.PaId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "CrInh")))
(meta_loc _loc x0))
(meta_override_flag _loc x1))
(meta_class_expr _loc x2))
(meta_string _loc x3)
| Ast.CrCtr x0 x1 x2 ->
Ast.PaApp _loc
(Ast.PaApp _loc
@ -2827,7 +2918,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "CtCon")))
(meta_loc _loc x0))
(meta_meta_bool _loc x1))
(meta_virtual_flag _loc x1))
(meta_ident _loc x2))
(meta_ctyp _loc x3)
| Ast.CtNil x0 ->
@ -3072,7 +3163,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdUid _loc "TyObj")))
(meta_loc _loc x0))
(meta_ctyp _loc x1))
(meta_meta_bool _loc x2)
(meta_row_var_flag _loc x2)
| Ast.TyDcl x0 x1 x2 x3 x4 ->
Ast.PaApp _loc
(Ast.PaApp _loc
@ -3170,6 +3261,17 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "TyNil")))
(meta_loc _loc x0) ]
and meta_direction_flag _loc =
fun
[ Ast.DiAnt x0 -> Ast.PaAnt _loc x0
| Ast.DiDownto ->
Ast.PaId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "DiDownto"))
| Ast.DiTo ->
Ast.PaId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "DiTo")) ]
and meta_expr _loc =
fun
[ Ast.ExPkg x0 x1 ->
@ -3369,7 +3471,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "ExLet")))
(meta_loc _loc x0))
(meta_meta_bool _loc x1))
(meta_rec_flag _loc x1))
(meta_binding _loc x2))
(meta_expr _loc x3)
| Ast.ExLaz x0 x1 ->
@ -3457,7 +3559,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(meta_string _loc x1))
(meta_expr _loc x2))
(meta_expr _loc x3))
(meta_meta_bool _loc x4))
(meta_direction_flag _loc x4))
(meta_expr _loc x5)
| Ast.ExFlo x0 x1 ->
Ast.PaApp _loc
@ -3844,6 +3946,28 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "MtNil")))
(meta_loc _loc x0) ]
and meta_mutable_flag _loc =
fun
[ Ast.MuAnt x0 -> Ast.PaAnt _loc x0
| Ast.MuNil ->
Ast.PaId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "MuNil"))
| Ast.MuMutable ->
Ast.PaId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "MuMutable")) ]
and meta_override_flag _loc =
fun
[ Ast.OvAnt x0 -> Ast.PaAnt _loc x0
| Ast.OvNil ->
Ast.PaId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "OvNil"))
| Ast.OvOverride ->
Ast.PaId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "OvOverride")) ]
and meta_patt _loc =
fun
[ Ast.PaLaz x0 x1 ->
@ -4083,6 +4207,17 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "PaNil")))
(meta_loc _loc x0) ]
and meta_private_flag _loc =
fun
[ Ast.PrAnt x0 -> Ast.PaAnt _loc x0
| Ast.PrNil ->
Ast.PaId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "PrNil"))
| Ast.PrPrivate ->
Ast.PaId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "PrPrivate")) ]
and meta_rec_binding _loc =
fun
[ Ast.RbAnt x0 x1 -> Ast.PaAnt x0 x1
@ -4112,6 +4247,28 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "RbNil")))
(meta_loc _loc x0) ]
and meta_rec_flag _loc =
fun
[ Ast.ReAnt x0 -> Ast.PaAnt _loc x0
| Ast.ReNil ->
Ast.PaId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "ReNil"))
| Ast.ReRecursive ->
Ast.PaId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "ReRecursive")) ]
and meta_row_var_flag _loc =
fun
[ Ast.RvAnt x0 -> Ast.PaAnt _loc x0
| Ast.RvNil ->
Ast.PaId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "RvNil"))
| Ast.RvRowVar ->
Ast.PaId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "RvRowVar")) ]
and meta_sig_item _loc =
fun
[ Ast.SgAnt x0 x1 -> Ast.PaAnt x0 x1
@ -4250,7 +4407,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "StVal")))
(meta_loc _loc x0))
(meta_meta_bool _loc x1))
(meta_rec_flag _loc x1))
(meta_binding _loc x2)
| Ast.StTyp x0 x1 ->
Ast.PaApp _loc
@ -4376,6 +4533,17 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "StNil")))
(meta_loc _loc x0) ]
and meta_virtual_flag _loc =
fun
[ Ast.ViAnt x0 -> Ast.PaAnt _loc x0
| Ast.ViNil ->
Ast.PaId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "ViNil"))
| Ast.ViVirtual ->
Ast.PaId _loc
(Ast.IdAcc _loc (Ast.IdUid _loc "Ast")
(Ast.IdUid _loc "ViVirtual")) ]
and meta_with_constr _loc =
fun
[ Ast.WcAnt x0 x1 -> Ast.PaAnt x0 x1
@ -4475,6 +4643,11 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
| WcAnt _x _x_i1 ->
let _x = o#loc _x in
let _x_i1 = o#string _x_i1 in WcAnt _x _x_i1 ];
method virtual_flag : virtual_flag -> virtual_flag =
fun
[ ViVirtual -> ViVirtual
| ViNil -> ViNil
| ViAnt _x -> let _x = o#string _x in ViAnt _x ];
method str_item : str_item -> str_item =
fun
[ StNil _x -> let _x = o#loc _x in StNil _x
@ -4526,7 +4699,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
let _x = o#loc _x in let _x_i1 = o#ctyp _x_i1 in StTyp _x _x_i1
| StVal _x _x_i1 _x_i2 ->
let _x = o#loc _x in
let _x_i1 = o#meta_bool _x_i1 in
let _x_i1 = o#rec_flag _x_i1 in
let _x_i2 = o#binding _x_i2 in StVal _x _x_i1 _x_i2
| StAnt _x _x_i1 ->
let _x = o#loc _x in
@ -4582,6 +4755,16 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
| SgAnt _x _x_i1 ->
let _x = o#loc _x in
let _x_i1 = o#string _x_i1 in SgAnt _x _x_i1 ];
method row_var_flag : row_var_flag -> row_var_flag =
fun
[ RvRowVar -> RvRowVar
| RvNil -> RvNil
| RvAnt _x -> let _x = o#string _x in RvAnt _x ];
method rec_flag : rec_flag -> rec_flag =
fun
[ ReRecursive -> ReRecursive
| ReNil -> ReNil
| ReAnt _x -> let _x = o#string _x in ReAnt _x ];
method rec_binding : rec_binding -> rec_binding =
fun
[ RbNil _x -> let _x = o#loc _x in RbNil _x
@ -4596,6 +4779,11 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
| RbAnt _x _x_i1 ->
let _x = o#loc _x in
let _x_i1 = o#string _x_i1 in RbAnt _x _x_i1 ];
method private_flag : private_flag -> private_flag =
fun
[ PrPrivate -> PrPrivate
| PrNil -> PrNil
| PrAnt _x -> let _x = o#string _x in PrAnt _x ];
method patt : patt -> patt =
fun
[ PaNil _x -> let _x = o#loc _x in PaNil _x
@ -4685,6 +4873,16 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
let _x_i1 = o#string _x_i1 in PaVrn _x _x_i1
| PaLaz _x _x_i1 ->
let _x = o#loc _x in let _x_i1 = o#patt _x_i1 in PaLaz _x _x_i1 ];
method override_flag : override_flag -> override_flag =
fun
[ OvOverride -> OvOverride
| OvNil -> OvNil
| OvAnt _x -> let _x = o#string _x in OvAnt _x ];
method mutable_flag : mutable_flag -> mutable_flag =
fun
[ MuMutable -> MuMutable
| MuNil -> MuNil
| MuAnt _x -> let _x = o#string _x in MuAnt _x ];
method module_type : module_type -> module_type =
fun
[ MtNil _x -> let _x = o#loc _x in MtNil _x
@ -4861,7 +5059,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
let _x_i1 = o#string _x_i1 in
let _x_i2 = o#expr _x_i2 in
let _x_i3 = o#expr _x_i3 in
let _x_i4 = o#meta_bool _x_i4 in
let _x_i4 = o#direction_flag _x_i4 in
let _x_i5 = o#expr _x_i5
in ExFor _x _x_i1 _x_i2 _x_i3 _x_i4 _x_i5
| ExFun _x _x_i1 ->
@ -4892,7 +5090,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
let _x = o#loc _x in let _x_i1 = o#expr _x_i1 in ExLaz _x _x_i1
| ExLet _x _x_i1 _x_i2 _x_i3 ->
let _x = o#loc _x in
let _x_i1 = o#meta_bool _x_i1 in
let _x_i1 = o#rec_flag _x_i1 in
let _x_i2 = o#binding _x_i2 in
let _x_i3 = o#expr _x_i3 in ExLet _x _x_i1 _x_i2 _x_i3
| ExLmd _x _x_i1 _x_i2 _x_i3 ->
@ -4967,6 +5165,11 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
| ExPkg _x _x_i1 ->
let _x = o#loc _x in
let _x_i1 = o#module_expr _x_i1 in ExPkg _x _x_i1 ];
method direction_flag : direction_flag -> direction_flag =
fun
[ DiTo -> DiTo
| DiDownto -> DiDownto
| DiAnt _x -> let _x = o#string _x in DiAnt _x ];
method ctyp : ctyp -> ctyp =
fun
[ TyNil _x -> let _x = o#loc _x in TyNil _x
@ -5011,7 +5214,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
| TyObj _x _x_i1 _x_i2 ->
let _x = o#loc _x in
let _x_i1 = o#ctyp _x_i1 in
let _x_i2 = o#meta_bool _x_i2 in TyObj _x _x_i1 _x_i2
let _x_i2 = o#row_var_flag _x_i2 in TyObj _x _x_i1 _x_i2
| TyOlb _x _x_i1 _x_i2 ->
let _x = o#loc _x in
let _x_i1 = o#string _x_i1 in
@ -5102,7 +5305,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
[ CtNil _x -> let _x = o#loc _x in CtNil _x
| CtCon _x _x_i1 _x_i2 _x_i3 ->
let _x = o#loc _x in
let _x_i1 = o#meta_bool _x_i1 in
let _x_i1 = o#virtual_flag _x_i1 in
let _x_i2 = o#ident _x_i2 in
let _x_i3 = o#ctyp _x_i3 in CtCon _x _x_i1 _x_i2 _x_i3
| CtFun _x _x_i1 _x_i2 ->
@ -5139,32 +5342,36 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
let _x = o#loc _x in
let _x_i1 = o#ctyp _x_i1 in
let _x_i2 = o#ctyp _x_i2 in CrCtr _x _x_i1 _x_i2
| CrInh _x _x_i1 _x_i2 ->
| CrInh _x _x_i1 _x_i2 _x_i3 ->
let _x = o#loc _x in
let _x_i1 = o#class_expr _x_i1 in
let _x_i2 = o#string _x_i2 in CrInh _x _x_i1 _x_i2
let _x_i1 = o#override_flag _x_i1 in
let _x_i2 = o#class_expr _x_i2 in
let _x_i3 = o#string _x_i3 in CrInh _x _x_i1 _x_i2 _x_i3
| CrIni _x _x_i1 ->
let _x = o#loc _x in let _x_i1 = o#expr _x_i1 in CrIni _x _x_i1
| CrMth _x _x_i1 _x_i2 _x_i3 _x_i4 ->
| CrMth _x _x_i1 _x_i2 _x_i3 _x_i4 _x_i5 ->
let _x = o#loc _x in
let _x_i1 = o#string _x_i1 in
let _x_i2 = o#meta_bool _x_i2 in
let _x_i3 = o#expr _x_i3 in
let _x_i4 = o#ctyp _x_i4 in CrMth _x _x_i1 _x_i2 _x_i3 _x_i4
| CrVal _x _x_i1 _x_i2 _x_i3 ->
let _x_i2 = o#override_flag _x_i2 in
let _x_i3 = o#private_flag _x_i3 in
let _x_i4 = o#expr _x_i4 in
let _x_i5 = o#ctyp _x_i5
in CrMth _x _x_i1 _x_i2 _x_i3 _x_i4 _x_i5
| CrVal _x _x_i1 _x_i2 _x_i3 _x_i4 ->
let _x = o#loc _x in
let _x_i1 = o#string _x_i1 in
let _x_i2 = o#meta_bool _x_i2 in
let _x_i3 = o#expr _x_i3 in CrVal _x _x_i1 _x_i2 _x_i3
let _x_i2 = o#override_flag _x_i2 in
let _x_i3 = o#mutable_flag _x_i3 in
let _x_i4 = o#expr _x_i4 in CrVal _x _x_i1 _x_i2 _x_i3 _x_i4
| CrVir _x _x_i1 _x_i2 _x_i3 ->
let _x = o#loc _x in
let _x_i1 = o#string _x_i1 in
let _x_i2 = o#meta_bool _x_i2 in
let _x_i2 = o#private_flag _x_i2 in
let _x_i3 = o#ctyp _x_i3 in CrVir _x _x_i1 _x_i2 _x_i3
| CrVvr _x _x_i1 _x_i2 _x_i3 ->
let _x = o#loc _x in
let _x_i1 = o#string _x_i1 in
let _x_i2 = o#meta_bool _x_i2 in
let _x_i2 = o#mutable_flag _x_i2 in
let _x_i3 = o#ctyp _x_i3 in CrVvr _x _x_i1 _x_i2 _x_i3
| CrAnt _x _x_i1 ->
let _x = o#loc _x in
@ -5186,18 +5393,18 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
| CgMth _x _x_i1 _x_i2 _x_i3 ->
let _x = o#loc _x in
let _x_i1 = o#string _x_i1 in
let _x_i2 = o#meta_bool _x_i2 in
let _x_i2 = o#private_flag _x_i2 in
let _x_i3 = o#ctyp _x_i3 in CgMth _x _x_i1 _x_i2 _x_i3
| CgVal _x _x_i1 _x_i2 _x_i3 _x_i4 ->
let _x = o#loc _x in
let _x_i1 = o#string _x_i1 in
let _x_i2 = o#meta_bool _x_i2 in
let _x_i3 = o#meta_bool _x_i3 in
let _x_i2 = o#mutable_flag _x_i2 in
let _x_i3 = o#virtual_flag _x_i3 in
let _x_i4 = o#ctyp _x_i4 in CgVal _x _x_i1 _x_i2 _x_i3 _x_i4
| CgVir _x _x_i1 _x_i2 _x_i3 ->
let _x = o#loc _x in
let _x_i1 = o#string _x_i1 in
let _x_i2 = o#meta_bool _x_i2 in
let _x_i2 = o#private_flag _x_i2 in
let _x_i3 = o#ctyp _x_i3 in CgVir _x _x_i1 _x_i2 _x_i3
| CgAnt _x _x_i1 ->
let _x = o#loc _x in
@ -5211,7 +5418,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
let _x_i2 = o#expr _x_i2 in CeApp _x _x_i1 _x_i2
| CeCon _x _x_i1 _x_i2 _x_i3 ->
let _x = o#loc _x in
let _x_i1 = o#meta_bool _x_i1 in
let _x_i1 = o#virtual_flag _x_i1 in
let _x_i2 = o#ident _x_i2 in
let _x_i3 = o#ctyp _x_i3 in CeCon _x _x_i1 _x_i2 _x_i3
| CeFun _x _x_i1 _x_i2 ->
@ -5220,7 +5427,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
let _x_i2 = o#class_expr _x_i2 in CeFun _x _x_i1 _x_i2
| CeLet _x _x_i1 _x_i2 _x_i3 ->
let _x = o#loc _x in
let _x_i1 = o#meta_bool _x_i1 in
let _x_i1 = o#rec_flag _x_i1 in
let _x_i2 = o#binding _x_i2 in
let _x_i3 = o#class_expr _x_i3 in CeLet _x _x_i1 _x_i2 _x_i3
| CeStr _x _x_i1 _x_i2 ->
@ -5287,6 +5494,11 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
let o = o#loc _x in
let o = o#with_constr _x_i1 in let o = o#with_constr _x_i2 in o
| WcAnt _x _x_i1 -> let o = o#loc _x in let o = o#string _x_i1 in o ];
method virtual_flag : virtual_flag -> 'self_type =
fun
[ ViVirtual -> o
| ViNil -> o
| ViAnt _x -> let o = o#string _x in o ];
method str_item : str_item -> 'self_type =
fun
[ StNil _x -> let o = o#loc _x in o
@ -5324,7 +5536,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
| StTyp _x _x_i1 -> let o = o#loc _x in let o = o#ctyp _x_i1 in o
| StVal _x _x_i1 _x_i2 ->
let o = o#loc _x in
let o = o#meta_bool _x_i1 in let o = o#binding _x_i2 in o
let o = o#rec_flag _x_i1 in let o = o#binding _x_i2 in o
| StAnt _x _x_i1 -> let o = o#loc _x in let o = o#string _x_i1 in o ];
method sig_item : sig_item -> 'self_type =
fun
@ -5361,6 +5573,16 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
let o = o#loc _x in
let o = o#string _x_i1 in let o = o#ctyp _x_i2 in o
| SgAnt _x _x_i1 -> let o = o#loc _x in let o = o#string _x_i1 in o ];
method row_var_flag : row_var_flag -> 'self_type =
fun
[ RvRowVar -> o
| RvNil -> o
| RvAnt _x -> let o = o#string _x in o ];
method rec_flag : rec_flag -> 'self_type =
fun
[ ReRecursive -> o
| ReNil -> o
| ReAnt _x -> let o = o#string _x in o ];
method rec_binding : rec_binding -> 'self_type =
fun
[ RbNil _x -> let o = o#loc _x in o
@ -5371,6 +5593,11 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
let o = o#loc _x in
let o = o#ident _x_i1 in let o = o#expr _x_i2 in o
| RbAnt _x _x_i1 -> let o = o#loc _x in let o = o#string _x_i1 in o ];
method private_flag : private_flag -> 'self_type =
fun
[ PrPrivate -> o
| PrNil -> o
| PrAnt _x -> let o = o#string _x in o ];
method patt : patt -> 'self_type =
fun
[ PaNil _x -> let o = o#loc _x in o
@ -5427,6 +5654,16 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
| PaTyp _x _x_i1 -> let o = o#loc _x in let o = o#ident _x_i1 in o
| PaVrn _x _x_i1 -> let o = o#loc _x in let o = o#string _x_i1 in o
| PaLaz _x _x_i1 -> let o = o#loc _x in let o = o#patt _x_i1 in o ];
method override_flag : override_flag -> 'self_type =
fun
[ OvOverride -> o
| OvNil -> o
| OvAnt _x -> let o = o#string _x in o ];
method mutable_flag : mutable_flag -> 'self_type =
fun
[ MuMutable -> o
| MuNil -> o
| MuAnt _x -> let o = o#string _x in o ];
method module_type : module_type -> 'self_type =
fun
[ MtNil _x -> let o = o#loc _x in o
@ -5554,7 +5791,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
let o = o#string _x_i1 in
let o = o#expr _x_i2 in
let o = o#expr _x_i3 in
let o = o#meta_bool _x_i4 in let o = o#expr _x_i5 in o
let o = o#direction_flag _x_i4 in let o = o#expr _x_i5 in o
| ExFun _x _x_i1 ->
let o = o#loc _x in let o = o#match_case _x_i1 in o
| ExIfe _x _x_i1 _x_i2 _x_i3 ->
@ -5574,7 +5811,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
| ExLaz _x _x_i1 -> let o = o#loc _x in let o = o#expr _x_i1 in o
| ExLet _x _x_i1 _x_i2 _x_i3 ->
let o = o#loc _x in
let o = o#meta_bool _x_i1 in
let o = o#rec_flag _x_i1 in
let o = o#binding _x_i2 in let o = o#expr _x_i3 in o
| ExLmd _x _x_i1 _x_i2 _x_i3 ->
let o = o#loc _x in
@ -5625,6 +5862,11 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
let o = o#string _x_i1 in let o = o#expr _x_i2 in o
| ExPkg _x _x_i1 ->
let o = o#loc _x in let o = o#module_expr _x_i1 in o ];
method direction_flag : direction_flag -> 'self_type =
fun
[ DiTo -> o
| DiDownto -> o
| DiAnt _x -> let o = o#string _x in o ];
method ctyp : ctyp -> 'self_type =
fun
[ TyNil _x -> let o = o#loc _x in o
@ -5659,7 +5901,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
in o
| TyObj _x _x_i1 _x_i2 ->
let o = o#loc _x in
let o = o#ctyp _x_i1 in let o = o#meta_bool _x_i2 in o
let o = o#ctyp _x_i1 in let o = o#row_var_flag _x_i2 in o
| TyOlb _x _x_i1 _x_i2 ->
let o = o#loc _x in
let o = o#string _x_i1 in let o = o#ctyp _x_i2 in o
@ -5718,7 +5960,7 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
[ CtNil _x -> let o = o#loc _x in o
| CtCon _x _x_i1 _x_i2 _x_i3 ->
let o = o#loc _x in
let o = o#meta_bool _x_i1 in
let o = o#virtual_flag _x_i1 in
let o = o#ident _x_i2 in let o = o#ctyp _x_i3 in o
| CtFun _x _x_i1 _x_i2 ->
let o = o#loc _x in
@ -5746,27 +5988,30 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
| CrCtr _x _x_i1 _x_i2 ->
let o = o#loc _x in
let o = o#ctyp _x_i1 in let o = o#ctyp _x_i2 in o
| CrInh _x _x_i1 _x_i2 ->
| CrInh _x _x_i1 _x_i2 _x_i3 ->
let o = o#loc _x in
let o = o#class_expr _x_i1 in let o = o#string _x_i2 in o
let o = o#override_flag _x_i1 in
let o = o#class_expr _x_i2 in let o = o#string _x_i3 in o
| CrIni _x _x_i1 -> let o = o#loc _x in let o = o#expr _x_i1 in o
| CrMth _x _x_i1 _x_i2 _x_i3 _x_i4 ->
| CrMth _x _x_i1 _x_i2 _x_i3 _x_i4 _x_i5 ->
let o = o#loc _x in
let o = o#string _x_i1 in
let o = o#meta_bool _x_i2 in
let o = o#expr _x_i3 in let o = o#ctyp _x_i4 in o
| CrVal _x _x_i1 _x_i2 _x_i3 ->
let o = o#override_flag _x_i2 in
let o = o#private_flag _x_i3 in
let o = o#expr _x_i4 in let o = o#ctyp _x_i5 in o
| CrVal _x _x_i1 _x_i2 _x_i3 _x_i4 ->
let o = o#loc _x in
let o = o#string _x_i1 in
let o = o#meta_bool _x_i2 in let o = o#expr _x_i3 in o
let o = o#override_flag _x_i2 in
let o = o#mutable_flag _x_i3 in let o = o#expr _x_i4 in o
| CrVir _x _x_i1 _x_i2 _x_i3 ->
let o = o#loc _x in
let o = o#string _x_i1 in
let o = o#meta_bool _x_i2 in let o = o#ctyp _x_i3 in o
let o = o#private_flag _x_i2 in let o = o#ctyp _x_i3 in o
| CrVvr _x _x_i1 _x_i2 _x_i3 ->
let o = o#loc _x in
let o = o#string _x_i1 in
let o = o#meta_bool _x_i2 in let o = o#ctyp _x_i3 in o
let o = o#mutable_flag _x_i2 in let o = o#ctyp _x_i3 in o
| CrAnt _x _x_i1 -> let o = o#loc _x in let o = o#string _x_i1 in o ];
method class_sig_item : class_sig_item -> 'self_type =
fun
@ -5783,16 +6028,16 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
| CgMth _x _x_i1 _x_i2 _x_i3 ->
let o = o#loc _x in
let o = o#string _x_i1 in
let o = o#meta_bool _x_i2 in let o = o#ctyp _x_i3 in o
let o = o#private_flag _x_i2 in let o = o#ctyp _x_i3 in o
| CgVal _x _x_i1 _x_i2 _x_i3 _x_i4 ->
let o = o#loc _x in
let o = o#string _x_i1 in
let o = o#meta_bool _x_i2 in
let o = o#meta_bool _x_i3 in let o = o#ctyp _x_i4 in o
let o = o#mutable_flag _x_i2 in
let o = o#virtual_flag _x_i3 in let o = o#ctyp _x_i4 in o
| CgVir _x _x_i1 _x_i2 _x_i3 ->
let o = o#loc _x in
let o = o#string _x_i1 in
let o = o#meta_bool _x_i2 in let o = o#ctyp _x_i3 in o
let o = o#private_flag _x_i2 in let o = o#ctyp _x_i3 in o
| CgAnt _x _x_i1 -> let o = o#loc _x in let o = o#string _x_i1 in o ];
method class_expr : class_expr -> 'self_type =
fun
@ -5802,14 +6047,14 @@ module Make (Loc : Sig.Loc) : Sig.Camlp4Ast with module Loc = Loc =
let o = o#class_expr _x_i1 in let o = o#expr _x_i2 in o
| CeCon _x _x_i1 _x_i2 _x_i3 ->
let o = o#loc _x in
let o = o#meta_bool _x_i1 in
let o = o#virtual_flag _x_i1 in
let o = o#ident _x_i2 in let o = o#ctyp _x_i3 in o
| CeFun _x _x_i1 _x_i2 ->
let o = o#loc _x in
let o = o#patt _x_i1 in let o = o#class_expr _x_i2 in o
| CeLet _x _x_i1 _x_i2 _x_i3 ->
let o = o#loc _x in
let o = o#meta_bool _x_i1 in
let o = o#rec_flag _x_i1 in
let o = o#binding _x_i2 in let o = o#class_expr _x_i3 in o
| CeStr _x _x_i1 _x_i2 ->
let o = o#loc _x in

File diff suppressed because it is too large Load Diff

View File

@ -98,7 +98,7 @@ FLEXLINK=flexlink -merge-manifest
FLEXDIR=$(shell $(FLEXLINK) -where)
IFLEXDIR=-I"$(FLEXDIR)"
MKDLL=$(FLEXLINK)
MKEXE=$(FLEXLINK) -exe
MKEXE=$(FLEXLINK) -exe -link /STACK:16777216
MKMAINDLL=$(FLEXLINK) -maindll
### How to build a static library

View File

@ -103,7 +103,7 @@ FLEXLINK=flexlink -x64 -merge-manifest
FLEXDIR=$(shell $(FLEXLINK) -where)
IFLEXDIR=-I"$(FLEXDIR)"
MKDLL=$(FLEXLINK)
MKEXE=$(FLEXLINK) -exe
MKEXE=$(FLEXLINK) -exe -link /STACK:33554432
MKMAINDLL=$(FLEXLINK) -maindll
### How to build a static library

24
configure vendored
View File

@ -433,10 +433,11 @@ esac
# Determine alignment constraints
case "$host" in
sparc*-*-*|hppa*-*-*)
sparc*-*-*|hppa*-*-*|arm*-*-*)
# On Sparc V9 with certain versions of gcc, determination of double
# alignment is not reliable (PR#1521), hence force it.
# Same goes for hppa.
# PR#5088 suggests same problem on ARM.
# But there's a knack (PR#2572):
# if we're in 64-bit mode (sizeof(long) == 8),
# we must not doubleword-align floats...
@ -464,7 +465,8 @@ esac
if $int64_native; then
case "$host" in
sparc*-*-*|hppa*-*-*)
# PR#5088: autodetection is unreliable on ARM
sparc*-*-*|hppa*-*-*|arm*-*-*)
if test $2 = 8; then
echo "64-bit integers can be word-aligned."
echo "#undef ARCH_ALIGN_INT64" >> m.h
@ -574,14 +576,11 @@ if test $withsharedlibs = "yes"; then
mksharedlibrpath="-rpath "
shared_libraries_supported=true;;
i[3456]86-*-darwin10.*)
if test $arch64 == true; then
mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress"
bytecccompopts="$dl_defs $bytecccompopts"
dl_needs_underscore=false
shared_libraries_supported=true
else
shared_libraries_supported=false
fi;;
mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress"
bytecccompopts="$dl_defs $bytecccompopts"
dl_needs_underscore=false
shared_libraries_supported=true
;;
i[3456]86-*-darwin*)
mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress -read_only_relocs suppress"
bytecccompopts="$dl_defs $bytecccompopts"
@ -1571,10 +1570,11 @@ fi
# Look for BFD library
if ./hasgot -i bfd.h -lbfd -ldl; then
if ./hasgot -i bfd.h && \
./hasgot -lbfd -ldl -liberty -lz bfd_openr; then
echo "BFD library found."
echo "#define HAS_LIBBFD" >> s.h
echo "LIBBFD_LINK=-lbfd -ldl -liberty" >> Makefile
echo "LIBBFD_LINK=-lbfd -ldl -liberty -lz" >> Makefile
else
echo "BFD library not found, 'objinfo' will be unable to display info on .cmxs files"
echo "LIBBFD_LINK=" >> Makefile

View File

@ -712,6 +712,7 @@ struct
mk_nopervasives F._nopervasives;
mk_dparsetree F._dparsetree;
mk_drawlambda F._drawlambda;
mk_dlambda F._dlambda;
mk_dcmm F._dcmm;
mk_dsel F._dsel;
mk_dcombine F._dcombine;

View File

@ -283,7 +283,7 @@ Pathname.define_context "toplevel" ["toplevel"; "parsing"; "typing"; "bytecomp";
Pathname.define_context "driver" ["driver"; "asmcomp"; "bytecomp"; "typing"; "utils"; "parsing"; "stdlib"];;
Pathname.define_context "debugger" ["bytecomp"; "utils"; "typing"; "parsing"; "toplevel"; "stdlib"];;
Pathname.define_context "otherlibs/dynlink" ["otherlibs/dynlink"; "bytecomp"; "utils"; "typing"; "parsing"; "stdlib"];;
Pathname.define_context "otherlibs/dynlink/nat" ["otherlibs/dynlink/nat"; "stdlib"];;
Pathname.define_context "otherlibs/dynlink/nat" ["otherlibs/dynlink/nat"; "asmcomp"; "stdlib"];;
Pathname.define_context "asmcomp" ["asmcomp"; "bytecomp"; "parsing"; "typing"; "utils"; "stdlib"];;
Pathname.define_context "ocamlbuild" ["ocamlbuild"; "stdlib"; "."];;
Pathname.define_context "lex" ["lex"; "stdlib"];;

View File

@ -11,6 +11,5 @@
(* Original author: Nicolas Pouillard *)
let rec greedy _ = greedy
let discard_printf _fmt = Obj.magic greedy
let discard_printf fmt = Format.ifprintf Format.std_formatter fmt;;

View File

@ -82,4 +82,4 @@ let setup () =
implem.at_exit_once <- at_exit_once;
implem.is_link <- is_link;
implem.stat <- mkstat Unix.stat;
implem.lstat <- mkstat Unix.lstat;
implem.lstat <- mkstat Unix.lstat;;

View File

@ -214,8 +214,6 @@ odoc_value.cmo: ../typing/types.cmi ../typing/printtyp.cmi odoc_types.cmi \
odoc_parameter.cmo odoc_name.cmi
odoc_value.cmx: ../typing/types.cmx ../typing/printtyp.cmx odoc_types.cmx \
odoc_parameter.cmx odoc_name.cmx
t.cmo:
t.cmx:
odoc_analyse.cmi: odoc_module.cmo odoc_args.cmi
odoc_args.cmi: odoc_types.cmi odoc_module.cmo
odoc_ast.cmi: ../typing/types.cmi ../typing/typedtree.cmi ../typing/path.cmi \

View File

@ -282,7 +282,7 @@ installopt_really:
###########
test: dummy
$(MKDIR) $@
$(OCAMLDOC_RUN) -html -colorize-code -sort -d $@ $(INCLUDES) -dump $@/ocamldoc.odoc test.txt test2.txt odoc*.ml odoc*.mli -v
$(OCAMLDOC_RUN) -html -colorize-code -sort -d $@ $(INCLUDES) -dump $@/ocamldoc.odoc odoc*.ml odoc*.mli -v
test_stdlib: dummy
$(MKDIR) $@

View File

@ -646,6 +646,7 @@ let rec assoc_comments_text_elements parent_name module_list t_ele =
| Ref (initial_name, None, text_option) ->
(
let rec iter_parent ?parent_name name =
let name = Odoc_name.normalize_name name in
let res =
match get_known_elements name with
[] ->

View File

@ -33,14 +33,39 @@ let infix_chars = [ '|' ;
type t = string
let strip_string s =
let len = String.length s in
let rec iter_first n =
if n >= len then
None
else
match s.[n] with
' ' | '\t' | '\n' | '\r' -> iter_first (n+1)
| _ -> Some n
in
match iter_first 0 with
None -> ""
| Some first ->
let rec iter_last n =
if n <= first then
None
else
match s.[n] with
' ' | '\t' | '\n' | '\r' -> iter_last (n-1)
| _ -> Some n
in
match iter_last (len-1) with
None -> String.sub s first 1
| Some last -> String.sub s first ((last-first)+1)
let parens_if_infix name =
match name with
match strip_string name with
| "" -> ""
| s when s.[0] = '*' || s.[String.length s - 1] = '*' -> "( " ^ s ^ " )"
| s when List.mem s.[0] infix_chars -> "(" ^ s ^ ")"
| "or" | "mod" | "land" | "lor" | "lxor" | "lsl" | "lsr" | "asr" ->
"(" ^ name ^ ")"
| _ -> name
| name -> name
;;
let cut name =
@ -80,6 +105,22 @@ let father name = fst (cut name)
let concat n1 n2 = n1^"."^n2
let normalize_name name =
let (p,s) = cut name in
let len = String.length s in
let s =
if len >= 2 &&
s.[0] = '(' && s.[len - 1] = ')'
then
parens_if_infix (strip_string (String.sub s 1 (len - 2)))
else
s
in
match p with
"" -> s
| p -> concat p s
;;
let head_and_tail n =
try
let pos = String.index n '.' in

View File

@ -27,6 +27,10 @@ val father : t -> t
(** Concatenates two names. *)
val concat : t -> t -> t
(** Normalize the given name by removing the beginning and ending spaces
of the simple name and adding parenthesis if needed. *)
val normalize_name : t -> t
(** Returns the head of a name. *)
val head : t -> t

View File

@ -777,7 +777,9 @@ rule main = parse
Char (Lexing.lexeme lexbuf)
else
let s = Lexing.lexeme lexbuf in
let tag = Odoc_misc.no_blanks s in
let len = String.length s in
(* remove this starting '{' *)
let tag = Odoc_misc.no_blanks (String.sub s 1 (len - 1)) in
CUSTOM tag
}

View File

@ -1,21 +1,21 @@
bigarray_stubs.o: bigarray_stubs.c ../../byterun/alloc.h \
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h bigarray.h \
../../byterun/config.h ../../byterun/mlvalues.h ../../byterun/custom.h \
../../byterun/fail.h ../../byterun/intext.h ../../byterun/io.h \
../../byterun/fix_code.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h bigarray.h \
../../byterun/config.h ../../byterun/mlvalues.h ../../byterun/custom.h \
../../byterun/fail.h ../../byterun/intext.h ../../byterun/io.h \
../../byterun/fix_code.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h
mmap_unix.o: mmap_unix.c bigarray.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/mlvalues.h ../../byterun/config.h ../../byterun/misc.h \
../../byterun/custom.h ../../byterun/mlvalues.h ../../byterun/fail.h \
../../byterun/io.h ../../byterun/sys.h
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/mlvalues.h ../../byterun/config.h ../../byterun/misc.h \
../../byterun/custom.h ../../byterun/mlvalues.h ../../byterun/fail.h \
../../byterun/io.h ../../byterun/sys.h
mmap_win32.o: mmap_win32.c bigarray.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/mlvalues.h ../../byterun/config.h ../../byterun/misc.h \
../../byterun/alloc.h ../../byterun/mlvalues.h ../../byterun/custom.h \
../../byterun/fail.h ../../byterun/sys.h ../unix/unixsupport.h
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/mlvalues.h ../../byterun/config.h ../../byterun/misc.h \
../../byterun/alloc.h ../../byterun/mlvalues.h ../../byterun/custom.h \
../../byterun/fail.h ../../byterun/sys.h ../unix/unixsupport.h
bigarray.cmi:
bigarray.cmo: bigarray.cmi
bigarray.cmx: bigarray.cmi

View File

@ -1,63 +1,103 @@
color.o: color.c libgraph.h ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h
draw.o: draw.c libgraph.h ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h
dump_img.o: dump_img.c libgraph.h ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h image.h ../../byterun/alloc.h \
../../byterun/mlvalues.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h
events.o: events.c libgraph.h ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/signals.h
fill.o: fill.c libgraph.h ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/mlvalues.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h
image.o: image.c libgraph.h ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h image.h ../../byterun/alloc.h \
../../byterun/mlvalues.h ../../byterun/custom.h
make_img.o: make_img.c libgraph.h ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h image.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/mlvalues.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h
open.o: open.c libgraph.h ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/callback.h ../../byterun/fail.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h
point_col.o: point_col.c libgraph.h ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h
sound.o: sound.c libgraph.h ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h
subwindow.o: subwindow.c libgraph.h ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h
text.o: text.c libgraph.h ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h
color.o: color.c libgraph.h \
\
\
\
../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h \
draw.o: draw.c libgraph.h \
\
\
\
../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h
dump_img.o: dump_img.c libgraph.h \
\
\
\
../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h image.h \
../../byterun/alloc.h ../../byterun/mlvalues.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h
events.o: events.c libgraph.h \
\
\
\
../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h ../../byterun/signals.h
fill.o: fill.c libgraph.h \
\
\
\
../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h
image.o: image.c libgraph.h \
\
\
\
../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h image.h \
../../byterun/alloc.h ../../byterun/mlvalues.h ../../byterun/custom.h
make_img.o: make_img.c libgraph.h \
\
\
\
../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h image.h \
../../byterun/memory.h ../../byterun/gc.h ../../byterun/mlvalues.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h
open.o: open.c libgraph.h \
\
\
\
../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h ../../byterun/callback.h ../../byterun/fail.h \
../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h
point_col.o: point_col.c libgraph.h \
\
\
\
../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h
sound.o: sound.c libgraph.h \
\
\
\
../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h
subwindow.o: subwindow.c libgraph.h \
\
\
\
../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h
text.o: text.c libgraph.h \
\
\
\
../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h
graphics.cmi:
graphicsX11.cmi:
graphics.cmo: graphics.cmi

View File

@ -57,14 +57,23 @@ $(LIBNAME): Makefile $(TOPDIR)/config/Makefile
@echo "#!/bin/sh" > $@
@echo 'exec $(INSTALLDIR)/$(LIBNAME)top$(EXE) -I $(INSTALLDIR) $$*' >> $@
install-script: $(LIBNAME)
cp $(LIBNAME) $(BINDIR)
chmod 755 $(BINDIR)/$(LIBNAME)
install-batch:
cp labltk.bat $(BINDIR)
install:
if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
cp $(LIBNAME).cma $(LIBNAME)top$(EXE) $(INSTALLDIR)
chmod 644 $(INSTALLDIR)/$(LIBNAME).cma
chmod 755 $(INSTALLDIR)/$(LIBNAME)top$(EXE)
@if test -d $(BINDIR); then : ; else mkdir $(BINDIR); fi
cp $(LIBNAME) $(BINDIR)
chmod 755 $(BINDIR)/$(LIBNAME)
@case x$(TOOLCHAIN) in \
xmingw|xmsvc) $(MAKE) install-batch ;; \
*) $(MAKE) install-script ;; \
esac
installopt:
@if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi

View File

@ -0,0 +1 @@
@ocaml -I +labltk labltk.cma %1 %2 %3 %4 %5 %6 %7 %8 %9

View File

@ -1,6 +1,6 @@
bng.o: bng.c bng.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/compatibility.h bng_amd64.c \
bng_digit.c
../../byterun/../config/s.h ../../byterun/compatibility.h bng_amd64.c \
bng_digit.c
bng_alpha.o: bng_alpha.c
bng_amd64.o: bng_amd64.c
bng_digit.o: bng_digit.c
@ -9,14 +9,14 @@ bng_mips.o: bng_mips.c
bng_ppc.o: bng_ppc.c
bng_sparc.o: bng_sparc.c
nat_stubs.o: nat_stubs.c ../../byterun/alloc.h \
../../byterun/compatibility.h ../../byterun/misc.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/config.h ../../byterun/custom.h ../../byterun/intext.h \
../../byterun/io.h ../../byterun/fix_code.h ../../byterun/fail.h \
../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h \
../../byterun/mlvalues.h bng.h nat.h
../../byterun/compatibility.h ../../byterun/misc.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/config.h ../../byterun/custom.h ../../byterun/intext.h \
../../byterun/io.h ../../byterun/fix_code.h ../../byterun/fail.h \
../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h \
../../byterun/mlvalues.h bng.h nat.h
arith_flags.cmi:
arith_status.cmi:
big_int.cmi: nat.cmi

View File

@ -1,9 +1,9 @@
strstubs.o: strstubs.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/fail.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/fail.h
str.cmi:
str.cmo: str.cmi
str.cmx: str.cmi

View File

@ -1,14 +1,14 @@
st_stubs.o: st_stubs.c ../../byterun/alloc.h \
../../byterun/compatibility.h ../../byterun/misc.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/backtrace.h ../../byterun/callback.h \
../../byterun/custom.h ../../byterun/fail.h ../../byterun/io.h \
../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/misc.h \
../../byterun/mlvalues.h ../../byterun/printexc.h ../../byterun/roots.h \
../../byterun/memory.h ../../byterun/signals.h ../../byterun/stacks.h \
../../byterun/sys.h threads.h st_posix.h
../../byterun/compatibility.h ../../byterun/misc.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/backtrace.h ../../byterun/callback.h \
../../byterun/custom.h ../../byterun/fail.h ../../byterun/io.h \
../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/misc.h \
../../byterun/mlvalues.h ../../byterun/printexc.h ../../byterun/roots.h \
../../byterun/memory.h ../../byterun/signals.h ../../byterun/stacks.h \
../../byterun/sys.h threads.h st_posix.h
condition.cmi: mutex.cmi
event.cmi:
mutex.cmi:

View File

@ -1,35 +1,32 @@
scheduler.o: scheduler.c ../../byterun/alloc.h \
../../byterun/compatibility.h ../../byterun/misc.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/backtrace.h ../../byterun/callback.h \
../../byterun/config.h ../../byterun/fail.h ../../byterun/io.h \
../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/misc.h \
../../byterun/mlvalues.h ../../byterun/printexc.h ../../byterun/roots.h \
../../byterun/memory.h ../../byterun/signals.h ../../byterun/stacks.h \
../../byterun/sys.h
../../byterun/compatibility.h ../../byterun/misc.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/backtrace.h ../../byterun/callback.h \
../../byterun/config.h ../../byterun/fail.h ../../byterun/io.h \
../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/misc.h \
../../byterun/mlvalues.h ../../byterun/printexc.h ../../byterun/roots.h \
../../byterun/memory.h ../../byterun/signals.h ../../byterun/stacks.h \
../../byterun/sys.h
condition.cmi: mutex.cmi
event.cmi:
marshal.cmi:
mutex.cmi:
pervasives.cmi:
thread.cmi: unix.cmi
threadUnix.cmi: unix.cmi
unix.cmi:
thread.cmi: unix.cmo
threadUnix.cmi: unix.cmo
condition.cmo: thread.cmi mutex.cmi condition.cmi
condition.cmx: thread.cmx mutex.cmx condition.cmi
event.cmo: mutex.cmi condition.cmi event.cmi
event.cmx: mutex.cmx condition.cmx event.cmi
marshal.cmo: pervasives.cmi marshal.cmi
marshal.cmx: pervasives.cmx marshal.cmi
marshal.cmo: pervasives.cmo
marshal.cmx: pervasives.cmx
mutex.cmo: thread.cmi mutex.cmi
mutex.cmx: thread.cmx mutex.cmi
pervasives.cmo: unix.cmi pervasives.cmi
pervasives.cmx: unix.cmx pervasives.cmi
thread.cmo: unix.cmi thread.cmi
pervasives.cmo: unix.cmo
pervasives.cmx: unix.cmx
thread.cmo: unix.cmo thread.cmi
thread.cmx: unix.cmx thread.cmi
threadUnix.cmo: unix.cmi thread.cmi threadUnix.cmi
threadUnix.cmo: unix.cmo thread.cmi threadUnix.cmi
threadUnix.cmx: unix.cmx thread.cmx threadUnix.cmi
unix.cmo: unix.cmi
unix.cmx: unix.cmi
unix.cmo:
unix.cmx:

View File

@ -1,449 +1,453 @@
accept.o: accept.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h ../../byterun/fail.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h \
socketaddr.h ../../byterun/misc.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h ../../byterun/fail.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h \
socketaddr.h ../../byterun/misc.h
access.o: access.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h unixsupport.h
addrofstr.o: addrofstr.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/fail.h ../../byterun/mlvalues.h \
unixsupport.h socketaddr.h ../../byterun/misc.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/fail.h ../../byterun/mlvalues.h \
unixsupport.h socketaddr.h ../../byterun/misc.h
alarm.o: alarm.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
bind.o: bind.c ../../byterun/fail.h ../../byterun/compatibility.h \
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h socketaddr.h ../../byterun/misc.h
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h socketaddr.h \
../../byterun/misc.h
chdir.o: chdir.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
chmod.o: chmod.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
chown.o: chown.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
chroot.o: chroot.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
close.o: close.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
closedir.o: closedir.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h unixsupport.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h unixsupport.h
connect.o: connect.c ../../byterun/fail.h ../../byterun/compatibility.h \
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h ../../byterun/signals.h unixsupport.h \
socketaddr.h ../../byterun/misc.h
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h ../../byterun/signals.h unixsupport.h \
socketaddr.h ../../byterun/misc.h
cst2constr.o: cst2constr.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/fail.h ../../byterun/mlvalues.h \
cst2constr.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/fail.h ../../byterun/mlvalues.h \
cst2constr.h
cstringv.o: cstringv.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/mlvalues.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h unixsupport.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/mlvalues.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h unixsupport.h
dup.o: dup.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
dup2.o: dup2.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
envir.o: envir.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h
errmsg.o: errmsg.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h
execv.o: execv.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h unixsupport.h
execve.o: execve.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h unixsupport.h
execvp.o: execvp.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h unixsupport.h
exit.o: exit.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
fchmod.o: fchmod.c ../../byterun/fail.h ../../byterun/compatibility.h \
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h
fchown.o: fchown.c ../../byterun/fail.h ../../byterun/compatibility.h \
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h
fcntl.o: fcntl.c ../../byterun/fail.h ../../byterun/compatibility.h \
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h
fork.o: fork.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h \
../../byterun/debugger.h ../../byterun/mlvalues.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h \
../../byterun/debugger.h ../../byterun/mlvalues.h unixsupport.h
ftruncate.o: ftruncate.c ../../byterun/fail.h \
../../byterun/compatibility.h ../../byterun/misc.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h ../../byterun/io.h unixsupport.h
../../byterun/compatibility.h ../../byterun/misc.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h ../../byterun/io.h unixsupport.h
getaddrinfo.o: getaddrinfo.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h \
cst2constr.h socketaddr.h ../../byterun/misc.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h \
cst2constr.h socketaddr.h ../../byterun/misc.h
getcwd.o: getcwd.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h ../../byterun/fail.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h ../../byterun/fail.h unixsupport.h
getegid.o: getegid.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h unixsupport.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h unixsupport.h
geteuid.o: geteuid.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h unixsupport.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h unixsupport.h
getgid.o: getgid.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
getgr.o: getgr.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/fail.h \
../../byterun/mlvalues.h ../../byterun/alloc.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/fail.h \
../../byterun/mlvalues.h ../../byterun/alloc.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h unixsupport.h
getgroups.o: getgroups.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h unixsupport.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h unixsupport.h
gethost.o: gethost.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h \
socketaddr.h ../../byterun/misc.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h \
socketaddr.h ../../byterun/misc.h
gethostname.o: gethostname.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h unixsupport.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h unixsupport.h
getlogin.o: getlogin.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
unixsupport.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
unixsupport.h
getnameinfo.o: getnameinfo.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h \
socketaddr.h ../../byterun/misc.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h \
socketaddr.h ../../byterun/misc.h
getpeername.o: getpeername.c ../../byterun/fail.h \
../../byterun/compatibility.h ../../byterun/misc.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h socketaddr.h ../../byterun/misc.h
../../byterun/compatibility.h ../../byterun/misc.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h socketaddr.h \
../../byterun/misc.h
getpid.o: getpid.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
getppid.o: getppid.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h unixsupport.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h unixsupport.h
getproto.o: getproto.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h unixsupport.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h unixsupport.h
getpw.o: getpw.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h ../../byterun/fail.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h ../../byterun/fail.h unixsupport.h
getserv.o: getserv.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h unixsupport.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h unixsupport.h
getsockname.o: getsockname.c ../../byterun/fail.h \
../../byterun/compatibility.h ../../byterun/misc.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h socketaddr.h ../../byterun/misc.h
../../byterun/compatibility.h ../../byterun/misc.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h socketaddr.h \
../../byterun/misc.h
gettimeofday.o: gettimeofday.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h unixsupport.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h unixsupport.h
getuid.o: getuid.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
gmtime.o: gmtime.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h ../../byterun/fail.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h ../../byterun/fail.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h unixsupport.h
initgroups.o: initgroups.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h unixsupport.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h unixsupport.h
isatty.o: isatty.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
itimer.o: itimer.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h ../../byterun/fail.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h ../../byterun/fail.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h unixsupport.h
kill.o: kill.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/fail.h \
../../byterun/mlvalues.h unixsupport.h ../../byterun/signals.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/fail.h \
../../byterun/mlvalues.h unixsupport.h ../../byterun/signals.h
link.o: link.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
listen.o: listen.c ../../byterun/fail.h ../../byterun/compatibility.h \
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h
lockf.o: lockf.c ../../byterun/fail.h ../../byterun/compatibility.h \
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h ../../byterun/signals.h unixsupport.h
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h ../../byterun/signals.h unixsupport.h
lseek.o: lseek.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h ../../byterun/io.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h ../../byterun/io.h unixsupport.h
mkdir.o: mkdir.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
mkfifo.o: mkfifo.c ../../byterun/fail.h ../../byterun/compatibility.h \
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h
nice.o: nice.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
open.o: open.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h
opendir.o: opendir.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
unixsupport.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
unixsupport.h
pipe.o: pipe.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h unixsupport.h
putenv.o: putenv.c ../../byterun/fail.h ../../byterun/compatibility.h \
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h \
../../byterun/mlvalues.h unixsupport.h
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h \
../../byterun/mlvalues.h unixsupport.h
read.o: read.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h \
../../byterun/signals.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h \
../../byterun/signals.h unixsupport.h
readdir.o: readdir.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/fail.h ../../byterun/mlvalues.h \
../../byterun/alloc.h unixsupport.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/fail.h ../../byterun/mlvalues.h \
../../byterun/alloc.h unixsupport.h
readlink.o: readlink.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h unixsupport.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h unixsupport.h
rename.o: rename.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
rewinddir.o: rewinddir.c ../../byterun/fail.h \
../../byterun/compatibility.h ../../byterun/misc.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h
../../byterun/compatibility.h ../../byterun/misc.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h
rmdir.o: rmdir.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
select.o: select.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h ../../byterun/fail.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h ../../byterun/fail.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h
sendrecv.o: sendrecv.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h \
socketaddr.h ../../byterun/misc.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h \
socketaddr.h ../../byterun/misc.h
setgid.o: setgid.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
setgroups.o: setgroups.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h unixsupport.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h unixsupport.h
setsid.o: setsid.c ../../byterun/fail.h ../../byterun/compatibility.h \
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h
setuid.o: setuid.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
shutdown.o: shutdown.c ../../byterun/fail.h ../../byterun/compatibility.h \
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h
signals.o: signals.c ../../byterun/alloc.h ../../byterun/compatibility.h \
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h ../../byterun/mlvalues.h \
../../byterun/signals.h unixsupport.h
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h ../../byterun/mlvalues.h \
../../byterun/signals.h unixsupport.h
sleep.o: sleep.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/signals.h \
../../byterun/mlvalues.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h \
../../byterun/signals.h ../../byterun/mlvalues.h unixsupport.h
socket.o: socket.c ../../byterun/fail.h ../../byterun/compatibility.h \
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h
socketaddr.o: socketaddr.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h unixsupport.h \
socketaddr.h ../../byterun/misc.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h unixsupport.h \
socketaddr.h ../../byterun/misc.h
socketpair.o: socketpair.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h unixsupport.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h unixsupport.h
sockopt.o: sockopt.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/mlvalues.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/alloc.h \
../../byterun/fail.h unixsupport.h socketaddr.h ../../byterun/misc.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/mlvalues.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/alloc.h \
../../byterun/fail.h unixsupport.h socketaddr.h ../../byterun/misc.h
stat.o: stat.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/alloc.h \
unixsupport.h cst2constr.h ../../byterun/io.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/alloc.h \
unixsupport.h cst2constr.h ../../byterun/io.h
strofaddr.o: strofaddr.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h unixsupport.h socketaddr.h ../../byterun/misc.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h unixsupport.h socketaddr.h ../../byterun/misc.h
symlink.o: symlink.c ../../byterun/fail.h ../../byterun/compatibility.h \
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h
termios.o: termios.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h unixsupport.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/fail.h unixsupport.h
time.o: time.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h unixsupport.h
times.o: times.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h unixsupport.h
truncate.o: truncate.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/fail.h ../../byterun/mlvalues.h \
../../byterun/io.h unixsupport.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/fail.h ../../byterun/mlvalues.h \
../../byterun/io.h unixsupport.h
umask.o: umask.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
unixsupport.o: unixsupport.c ../../byterun/mlvalues.h \
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/callback.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h ../../byterun/fail.h unixsupport.h cst2constr.h
../../byterun/compatibility.h ../../byterun/config.h \
../../byterun/../config/m.h ../../byterun/../config/s.h \
../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
../../byterun/callback.h ../../byterun/memory.h ../../byterun/gc.h \
../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h ../../byterun/fail.h unixsupport.h \
cst2constr.h
unlink.o: unlink.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
utimes.o: utimes.c ../../byterun/fail.h ../../byterun/compatibility.h \
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h
../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/mlvalues.h \
../../byterun/mlvalues.h unixsupport.h
wait.o: wait.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h ../../byterun/fail.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
../../byterun/mlvalues.h ../../byterun/fail.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h
write.o: write.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h \
../../byterun/signals.h unixsupport.h
../../byterun/config.h ../../byterun/../config/m.h \
../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
../../byterun/freelist.h ../../byterun/minor_gc.h \
../../byterun/signals.h unixsupport.h
unix.cmi:
unixLabels.cmi: unix.cmi
unix.cmo: unix.cmi

View File

@ -147,7 +147,7 @@ module type S =
*)
val max_binding: 'a t -> (key * 'a)
(** Same as {!Map.S.max_binding}, but returns the largest binding
(** Same as {!Map.S.min_binding}, but returns the largest binding
of the given map.
@since 3.12.0
*)

View File

@ -52,6 +52,7 @@ external ( || ) : bool -> bool -> bool = "%sequor"
external ( ~- ) : int -> int = "%negint"
external ( ~+ ) : int -> int = "%identity"
external (~+) : int -> int = "%identity"
external succ : int -> int = "%succint"
external pred : int -> int = "%predint"
external ( + ) : int -> int -> int = "%addint"

View File

@ -0,0 +1,10 @@
module M :
sig
class x : int -> object method m : int end
end
=
struct
class x _ = object
method m = 42
end
end;;

View File

@ -0,0 +1,6 @@
module M : sig class c : 'a -> object val x : 'b end end =
struct class c x = object val x = x end end
class c (x : int) = object inherit M.c x method x : bool = x end
let r = (new c 2)#x;;

View File

@ -612,3 +612,13 @@ and transf_alist : 'a. _ -> ('a*t) list -> ('a*t) list = fun f -> function
| [] -> []
| (k,v)::tl -> (k, transf f v) :: transf_alist f tl
;;
(* PR#4862 *)
type t = {f: 'a. ('a list -> int) Lazy.t}
let l : t = { f = lazy (raise Not_found)};;
(* variant *)
type t = {f: 'a. 'a -> unit};;
{f=fun ?x y -> ()};;
{f=fun ?x y -> y};; (* fail *)

View File

@ -587,4 +587,13 @@ val neg : int -> bool -> int * bool = <fun>
# type t = A of int | B of (int * t) list | C of (string * t) list
val transf : (int -> t) -> t -> t = <fun>
val transf_alist : (int -> t) -> ('a * t) list -> ('a * t) list = <fun>
# type t = { f : 'a. ('a list -> int) Lazy.t; }
val l : t = {f = <lazy>}
# type t = { f : 'a. 'a -> unit; }
# - : t = {f = <fun>}
# Characters 3-16:
{f=fun ?x y -> y};; (* fail *)
^^^^^^^^^^^^^
Error: This field value has type unit -> unit which is less general than
'a. 'a -> unit
#

View File

@ -570,4 +570,13 @@ val neg : int -> bool -> int * bool = <fun>
# type t = A of int | B of (int * t) list | C of (string * t) list
val transf : (int -> t) -> t -> t = <fun>
val transf_alist : (int -> t) -> ('a * t) list -> ('a * t) list = <fun>
# type t = { f : 'a. ('a list -> int) Lazy.t; }
val l : t = {f = <lazy>}
# type t = { f : 'a. 'a -> unit; }
# - : t = {f = <fun>}
# Characters 3-16:
{f=fun ?x y -> y};; (* fail *)
^^^^^^^^^^^^^
Error: This field value has type unit -> unit which is less general than
'a. 'a -> unit
#

View File

@ -1,5 +1,6 @@
ocamldep
ocamldep.opt
ocamldep.bak
ocamlprof
opnames.ml
dumpobj

View File

@ -10,10 +10,6 @@ depend.cmo: ../parsing/parsetree.cmi ../parsing/longident.cmi \
../parsing/location.cmi depend.cmi
depend.cmx: ../parsing/parsetree.cmi ../parsing/longident.cmx \
../parsing/location.cmx depend.cmi
dumpapprox.cmo: ../utils/config.cmi ../asmcomp/compilenv.cmi \
../asmcomp/clambda.cmi
dumpapprox.cmx: ../utils/config.cmx ../asmcomp/compilenv.cmx \
../asmcomp/clambda.cmx
dumpobj.cmo: ../utils/tbl.cmi opnames.cmo ../bytecomp/opcodes.cmo \
../parsing/location.cmi ../bytecomp/lambda.cmi ../bytecomp/instruct.cmi \
../typing/ident.cmi ../bytecomp/emitcode.cmi ../utils/config.cmi \
@ -24,12 +20,14 @@ dumpobj.cmx: ../utils/tbl.cmx opnames.cmx ../bytecomp/opcodes.cmx \
../typing/ident.cmx ../bytecomp/emitcode.cmx ../utils/config.cmx \
../bytecomp/cmo_format.cmi ../bytecomp/bytesections.cmx \
../parsing/asttypes.cmi
lexer301.cmo: ../utils/warnings.cmi ../utils/misc.cmi ../parsing/location.cmi
lexer301.cmx: ../utils/warnings.cmx ../utils/misc.cmx ../parsing/location.cmx
myocamlbuild_config.cmo:
myocamlbuild_config.cmx:
objinfo.cmo: ../utils/config.cmi ../bytecomp/cmo_format.cmi
objinfo.cmx: ../utils/config.cmx ../bytecomp/cmo_format.cmi
objinfo.cmo: ../utils/misc.cmi ../utils/config.cmi ../asmcomp/cmx_format.cmi \
../bytecomp/cmo_format.cmi ../asmcomp/clambda.cmi \
../bytecomp/bytesections.cmi
objinfo.cmx: ../utils/misc.cmx ../utils/config.cmx ../asmcomp/cmx_format.cmi \
../bytecomp/cmo_format.cmi ../asmcomp/clambda.cmx \
../bytecomp/bytesections.cmx
ocaml299to3.cmo:
ocaml299to3.cmx:
ocamlcp.cmo: ../driver/main_args.cmi
@ -60,5 +58,5 @@ primreq.cmo: ../utils/config.cmi ../bytecomp/cmo_format.cmi
primreq.cmx: ../utils/config.cmx ../bytecomp/cmo_format.cmi
profiling.cmo: profiling.cmi
profiling.cmx: profiling.cmi
scrapelabels.cmo: lexer301.cmo
scrapelabels.cmx: lexer301.cmx
scrapelabels.cmo:
scrapelabels.cmx:

View File

@ -270,7 +270,7 @@ clean::
$(CAMLOPT) $(COMPFLAGS) -c $<
clean::
rm -f *.cmo *.cmi *.cma
rm -f *.cmo *.cmi *.cma *.dll *.so *.lib *.a
depend: beforedepend
$(CAMLRUN) ./ocamldep $(INCLUDES) *.mli *.ml > .depend

View File

@ -126,15 +126,20 @@ let increase_global_level () =
let restore_global_level gl =
global_level := gl
(* Abbreviations without parameters *)
(**** Whether a path points to an object type (with hidden row variable) ****)
let is_object_type path =
let name =
match path with Path.Pident id -> Ident.name id
| Path.Pdot(_, s,_) -> s
| Path.Papply _ -> assert false
in name.[0] = '#'
(**** Abbreviations without parameters ****)
(* Shall reset after generalizing *)
let simple_abbrevs = ref Mnil
let proper_abbrevs path tl abbrev =
if !Clflags.principal || tl <> [] then abbrev else
let name = match path with Path.Pident id -> Ident.name id
| Path.Pdot(_, s,_) -> s
| Path.Papply _ -> assert false in
if name.[0] <> '#' then simple_abbrevs else abbrev
if !Clflags.principal || tl <> [] || is_object_type path then abbrev
else simple_abbrevs
(**** Some type creators ****)
@ -2291,6 +2296,7 @@ let rec eqtype rename type_pairs subst env t1 t2 =
normalize_subst subst;
if List.assq t1 !subst != t2 then raise (Unify [])
with Not_found ->
if List.exists (fun (_, t) -> t == t2) !subst then raise (Unify []);
subst := (t1, t2) :: !subst
end
| (Tconstr (p1, [], _), Tconstr (p2, [], _)) when Path.same p1 p2 ->
@ -2311,6 +2317,7 @@ let rec eqtype rename type_pairs subst env t1 t2 =
normalize_subst subst;
if List.assq t1' !subst != t2' then raise (Unify [])
with Not_found ->
if List.exists (fun (_, t) -> t == t2') !subst then raise (Unify []);
subst := (t1', t2') :: !subst
end
| (Tarrow (l1, t1, u1, _), Tarrow (l2, t2, u2, _)) when l1 = l2
@ -2485,10 +2492,10 @@ let rec moregen_clty trace type_pairs env cty1 cty2 =
| _ ->
raise (Failure [])
with
Failure error when trace ->
Failure error when trace || error = [] ->
raise (Failure (CM_Class_type_mismatch (cty1, cty2)::error))
let match_class_types env pat_sch subj_sch =
let match_class_types ?(trace=true) env pat_sch subj_sch =
let type_pairs = TypePairs.create 53 in
let old_level = !current_level in
current_level := generic_level - 1;
@ -2572,7 +2579,7 @@ let match_class_types env pat_sch subj_sch =
match error with
[] ->
begin try
moregen_clty true type_pairs env patt subj;
moregen_clty trace type_pairs env patt subj;
[]
with
Failure r -> r
@ -2614,7 +2621,7 @@ let rec equal_clty trace type_pairs subst env cty1 cty2 =
Vars.iter
(fun lab (_, _, ty) ->
let (_, _, ty') = Vars.find lab sign1.cty_vars in
try eqtype true type_pairs subst env ty ty' with Unify trace ->
try eqtype true type_pairs subst env ty' ty with Unify trace ->
raise (Failure [CM_Val_type_mismatch
(lab, expand_trace env trace)]))
sign2.cty_vars
@ -2626,8 +2633,6 @@ let rec equal_clty trace type_pairs subst env cty1 cty2 =
Failure error when trace ->
raise (Failure (CM_Class_type_mismatch (cty1, cty2)::error))
(* XXX On pourrait autoriser l'instantiation du type des parametres... *)
(* XXX Correct ? (variables de type dans parametres et corps de classe *)
let match_class_declarations env patt_params patt_type subj_params subj_type =
let type_pairs = TypePairs.create 53 in
let subst = ref [] in
@ -2714,8 +2719,14 @@ let match_class_declarations env patt_params patt_type subj_params subj_type =
raise (Failure [CM_Type_parameter_mismatch
(expand_trace env trace)]))
patt_params subj_params;
equal_clty false type_pairs subst env patt_type subj_type;
[]
(* old code: equal_clty false type_pairs subst env patt_type subj_type; *)
equal_clty false type_pairs subst env
(Tcty_signature sign1) (Tcty_signature sign2);
(* Use moregeneral for class parameters, need to recheck everything to
keeps relationships (PR#4824) *)
let clty_params = List.fold_right (fun ty cty -> Tcty_fun ("*",ty,cty)) in
match_class_types ~trace:false env
(clty_params patt_params patt_type) (clty_params subj_params subj_type)
with
Failure r -> r
end
@ -3162,15 +3173,6 @@ let unalias ty =
| _ ->
newty2 ty.level ty.desc
let unroll_abbrev id tl ty =
let ty = repr ty in
if (ty.desc = Tvar) || (List.exists (deep_occur ty) tl) then
ty
else
let ty' = newty2 ty.level ty.desc in
link_type ty (newty2 ty.level (Tconstr (Path.Pident id, tl, ref Mnil)));
ty'
(* Return the arity (as for curried functions) of the given type. *)
let rec arity ty =
match (repr ty).desc with
@ -3343,6 +3345,16 @@ let nondep_type env id ty =
clear_hash ();
raise Not_found
let unroll_abbrev id tl ty =
let ty = repr ty and path = Path.Pident id in
if (ty.desc = Tvar) || (List.exists (deep_occur ty) tl)
|| is_object_type path then
ty
else
let ty' = newty2 ty.level ty.desc in
link_type ty (newty2 ty.level (Tconstr (path, tl, ref Mnil)));
ty'
(* Preserve sharing inside type declarations. *)
let nondep_type_decl env mid id is_covariant decl =
try

View File

@ -183,7 +183,7 @@ type class_match_failure =
| CM_Private_method of string
| CM_Virtual_method of string
val match_class_types:
Env.t -> class_type -> class_type -> class_match_failure list
?trace:bool -> Env.t -> class_type -> class_type -> class_match_failure list
(* Check if the first class type is more general than the second. *)
val equal: Env.t -> bool -> type_expr list -> type_expr list -> bool
(* [equal env [x1...xn] tau [y1...yn] sigma]

View File

@ -36,6 +36,12 @@ let class_declarations env cty1 cty2 =
open Format
open Ctype
(*
let rec hide_params = function
Tcty_fun ("*", _, cty) -> hide_params cty
| cty -> cty
*)
let include_err ppf =
function
| CM_Virtual_class ->

View File

@ -690,8 +690,32 @@ let rec is_nonexpansive exp =
Vars.fold (fun _ (mut,_,_) b -> decr count; b && mut = Immutable)
vars true &&
!count = 0
| Texp_pack mexp ->
is_nonexpansive_mod mexp
| _ -> false
and is_nonexpansive_mod mexp =
match mexp.mod_desc with
| Tmod_ident _ -> true
| Tmod_functor _ -> true
| Tmod_unpack (e, _) -> is_nonexpansive e
| Tmod_constraint (m, _, _) -> is_nonexpansive_mod m
| Tmod_structure items ->
List.for_all
(function
| Tstr_eval _ | Tstr_primitive _ | Tstr_type _ | Tstr_modtype _
| Tstr_open _ | Tstr_cltype _ | Tstr_exn_rebind _ -> true
| Tstr_value (_, pat_exp_list) ->
List.for_all (fun (_, exp) -> is_nonexpansive exp) pat_exp_list
| Tstr_module (_, m) | Tstr_include (m, _) -> is_nonexpansive_mod m
| Tstr_recmodule id_mod_list ->
List.for_all (fun (_, m) -> is_nonexpansive_mod m) id_mod_list
| Tstr_exception _ -> false (* true would be unsound *)
| Tstr_class _ -> false (* could be more precise *)
)
items
| Tmod_apply _ -> false
and is_nonexpansive_opt = function
None -> true
| Some e -> is_nonexpansive e
@ -1135,31 +1159,9 @@ let rec type_exp env sexp =
row_name = None});
exp_env = env }
| Pexp_record(lid_sexp_list, opt_sexp) ->
let ty = newvar() in
let num_fields = ref 0 in
let type_label_exp (lid, sarg) =
let label = Typetexp.find_label env loc lid in
begin_def ();
if !Clflags.principal then begin_def ();
let (vars, ty_arg, ty_res) = instance_label true label in
if !Clflags.principal then begin
end_def ();
generalize_structure ty_arg;
generalize_structure ty_res
end;
begin try
unify env (instance ty_res) ty
with Unify trace ->
raise(Error(loc, Label_mismatch(lid, trace)))
end;
let arg = type_argument env sarg ty_arg in
end_def ();
check_univars env (vars <> []) "field value" arg label.lbl_arg vars;
num_fields := Array.length label.lbl_all;
if label.lbl_private = Private then
raise(Error(loc, Private_type ty));
(label, {arg with exp_type = instance arg.exp_type}) in
let lbl_exp_list = type_label_a_list type_label_exp lid_sexp_list in
let ty = newvar () in
let lbl_exp_list =
type_label_a_list (type_label_exp true env loc ty) lid_sexp_list in
let rec check_duplicates seen_pos lid_sexp lbl_exp =
match (lid_sexp, lbl_exp) with
((lid, _) :: rem1, (lbl, _) :: rem2) ->
@ -1187,7 +1189,10 @@ let rec type_exp env sexp =
Some(type_expect env sexp ty_exp)
| _ -> assert false
in
if opt_sexp = None && List.length lid_sexp_list <> !num_fields then begin
let num_fields =
match lbl_exp_list with [] -> assert false
| (lbl,_)::_ -> Array.length lbl.lbl_all in
if opt_sexp = None && List.length lid_sexp_list <> num_fields then begin
let present_indices =
List.map (fun (lbl, _) -> lbl.lbl_pos) lbl_exp_list in
let label_names = extract_label_names sexp env ty in
@ -1200,7 +1205,7 @@ let rec type_exp env sexp =
let missing = missing_labels 0 label_names in
raise(Error(loc, Label_missing missing))
end
else if opt_sexp <> None && List.length lid_sexp_list = !num_fields then
else if opt_sexp <> None && List.length lid_sexp_list = num_fields then
Location.prerr_warning loc Warnings.Useless_record_with;
re {
exp_desc = Texp_record(lbl_exp_list, opt_exp);
@ -1219,17 +1224,10 @@ let rec type_exp env sexp =
exp_env = env }
| Pexp_setfield(srecord, lid, snewval) ->
let record = type_exp env srecord in
let label = Typetexp.find_label env loc lid in
let (label, newval) =
type_label_exp false env loc record.exp_type (lid, snewval) in
if label.lbl_mut = Immutable then
raise(Error(loc, Label_not_mutable lid));
begin_def ();
let (vars, ty_arg, ty_res) = instance_label true label in
unify_exp env record ty_res;
let newval = type_expect env snewval ty_arg in
end_def ();
check_univars env (vars <> []) "field value" newval label.lbl_arg vars;
if label.lbl_private = Private then
raise(Error(loc, Private_label(lid, ty_res)));
re {
exp_desc = Texp_setfield(record, label, newval);
exp_loc = loc;
@ -1643,6 +1641,45 @@ let rec type_exp env sexp =
| Pexp_open (lid, e) ->
type_exp (!type_open env sexp.pexp_loc lid) e
and type_label_exp create env loc ty (lid, sarg) =
let label = Typetexp.find_label env sarg.pexp_loc lid in
begin_def ();
if !Clflags.principal then begin_def ();
let (vars, ty_arg, ty_res) = instance_label true label in
if !Clflags.principal then begin
end_def ();
generalize_structure ty_arg;
generalize_structure ty_res
end;
begin try
unify env (instance ty_res) ty
with Unify trace ->
raise(Error(loc , Label_mismatch(lid, trace)))
end;
if label.lbl_private = Private then
raise(Error(loc, if create then Private_type ty else Private_label (lid, ty)));
let arg =
let snap = if vars = [] then None else Some (Btype.snapshot ()) in
let arg = type_argument env sarg ty_arg in
end_def ();
try
check_univars env (vars <> []) "field value" arg label.lbl_arg vars;
arg
with exn when not (is_nonexpansive arg) -> try
(* Try to retype without propagating ty_arg, cf PR#4862 *)
may Btype.backtrack snap;
begin_def ();
let arg = type_exp env sarg in
end_def ();
generalize_expansive env arg.exp_type;
unify_exp env arg ty_arg;
check_univars env false "field value" arg label.lbl_arg vars;
arg
with Error (_, Less_general _) as e -> raise e
| _ -> raise exn (* In case of failure return the first error *)
in
(label, {arg with exp_type = instance arg.exp_type})
and type_argument env sarg ty_expected' =
(* ty_expected' may be generic *)
let no_labels ty =

View File

@ -633,16 +633,17 @@ let check_recmodule_inclusion env bindings =
(* Type a module value expression *)
let rec type_module funct_body anchor env smod =
let rec type_module sttn funct_body anchor env smod =
match smod.pmod_desc with
Pmod_ident lid ->
let (path, mty) = Typetexp.find_module env smod.pmod_loc lid in
rm { mod_desc = Tmod_ident path;
mod_type = Mtype.strengthen env mty path;
mod_type = if sttn then Mtype.strengthen env mty path else mty;
mod_env = env;
mod_loc = smod.pmod_loc }
| Pmod_structure sstr ->
let (str, sg, finalenv) = type_structure funct_body anchor env sstr smod.pmod_loc in
let (str, sg, finalenv) =
type_structure funct_body anchor env sstr smod.pmod_loc in
rm { mod_desc = Tmod_structure str;
mod_type = Tmty_signature sg;
mod_env = env;
@ -650,14 +651,16 @@ let rec type_module funct_body anchor env smod =
| Pmod_functor(name, smty, sbody) ->
let mty = transl_modtype env smty in
let (id, newenv) = Env.enter_module name mty env in
let body = type_module true None newenv sbody in
let body = type_module sttn true None newenv sbody in
rm { mod_desc = Tmod_functor(id, mty, body);
mod_type = Tmty_functor(id, mty, body.mod_type);
mod_env = env;
mod_loc = smod.pmod_loc }
| Pmod_apply(sfunct, sarg) ->
let funct = type_module funct_body None env sfunct in
let arg = type_module funct_body None env sarg in
let arg = type_module true funct_body None env sarg in
let path = try Some (path_of_module arg) with Not_a_path -> None in
let funct =
type_module (sttn && path <> None) funct_body None env sfunct in
begin match Mtype.scrape env funct.mod_type with
Tmty_functor(param, mty_param, mty_res) as mty_functor ->
let coercion =
@ -666,17 +669,18 @@ let rec type_module funct_body anchor env smod =
with Includemod.Error msg ->
raise(Error(sarg.pmod_loc, Not_included msg)) in
let mty_appl =
try
let path = path_of_module arg in
Subst.modtype (Subst.add_module param path Subst.identity)
mty_res
with Not_a_path ->
try
Mtype.nondep_supertype
(Env.add_module param arg.mod_type env) param mty_res
with Not_found ->
raise(Error(smod.pmod_loc,
Cannot_eliminate_dependency mty_functor)) in
match path with
Some path ->
Subst.modtype (Subst.add_module param path Subst.identity)
mty_res
| None ->
try
Mtype.nondep_supertype
(Env.add_module param arg.mod_type env) param mty_res
with Not_found ->
raise(Error(smod.pmod_loc,
Cannot_eliminate_dependency mty_functor))
in
rm { mod_desc = Tmod_apply(funct, arg, coercion);
mod_type = mty_appl;
mod_env = env;
@ -685,7 +689,7 @@ let rec type_module funct_body anchor env smod =
raise(Error(sfunct.pmod_loc, Cannot_apply funct.mod_type))
end
| Pmod_constraint(sarg, smty) ->
let arg = type_module funct_body anchor env sarg in
let arg = type_module true funct_body anchor env sarg in
let mty = transl_modtype env smty in
let coercion =
try
@ -698,10 +702,12 @@ let rec type_module funct_body anchor env smod =
mod_loc = smod.pmod_loc }
| Pmod_unpack (sexp, (p, l)) ->
if funct_body then raise (Error (smod.pmod_loc, Not_allowed_in_functor_body));
if funct_body then
raise (Error (smod.pmod_loc, Not_allowed_in_functor_body));
let l, mty = Typetexp.create_package_mty smod.pmod_loc env (p, l) in
let mty = transl_modtype env mty in
let exp = Typecore.type_expect env sexp (Typecore.create_package_type smod.pmod_loc env (p, l)) in
let exp = Typecore.type_expect env sexp
(Typecore.create_package_type smod.pmod_loc env (p, l)) in
rm { mod_desc = Tmod_unpack(exp, mty);
mod_type = mty;
mod_env = env;
@ -775,7 +781,9 @@ and type_structure funct_body anchor env sstr scope =
final_env)
| {pstr_desc = Pstr_module(name, smodl); pstr_loc = loc} :: srem ->
check "module" loc module_names name;
let modl = type_module funct_body (anchor_submodule name anchor) env smodl in
let modl =
type_module true funct_body (anchor_submodule name anchor) env
smodl in
let mty = enrich_module_type anchor name modl.mod_type env in
let (id, newenv) = Env.enter_module name mty env in
let (str_rem, sig_rem, final_env) = type_struct newenv srem in
@ -793,9 +801,11 @@ and type_structure funct_body anchor env sstr scope =
List.map2
(fun (id, mty) (name, smty, smodl) ->
let modl =
type_module funct_body (anchor_recmodule id anchor) newenv smodl in
type_module true funct_body (anchor_recmodule id anchor) newenv
smodl in
let mty' =
enrich_module_type anchor (Ident.name id) modl.mod_type newenv in
enrich_module_type anchor (Ident.name id) modl.mod_type newenv
in
(id, mty, modl, mty'))
decls sbind in
let bindings2 =
@ -863,7 +873,7 @@ and type_structure funct_body anchor env sstr scope =
classes [sig_rem]),
final_env)
| {pstr_desc = Pstr_include smodl; pstr_loc = loc} :: srem ->
let modl = type_module funct_body None env smodl in
let modl = type_module true funct_body None env smodl in
(* Rename all identifiers bound by this signature to avoid clashes *)
let sg = Subst.signature Subst.identity
(extract_sig_open env smodl.pmod_loc modl.mod_type) in
@ -879,7 +889,7 @@ and type_structure funct_body anchor env sstr scope =
then List.iter (function {pstr_loc = l} -> Stypes.record_phrase l) sstr;
type_struct env sstr
let type_module = type_module false None
let type_module = type_module true false None
let type_structure = type_structure false None
(* Normalize types in a signature *)

View File

@ -76,7 +76,8 @@ let find_component lookup make_error env loc lid =
| Longident.Ldot (Longident.Lident "*predef*", s) -> lookup (Longident.Lident s) Env.initial
| _ -> lookup lid env
with Not_found ->
narrow_unbound_lid_error env loc lid make_error;
(narrow_unbound_lid_error env loc lid make_error
: unit (* to avoid a warning *));
assert false
let find_type = find_component Env.lookup_type (fun lid -> Unbound_type_constructor lid)