[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Daniel de Rauglaudre <daniel.de_rauglaudre@i...> |
| Subject: | Re: [Caml-list] ocaml magic file ... |
Hi,
On Wed, Jan 09, 2002 at 05:20:37PM +0100, Sven wrote:
> I have this small magic file (to put in /etc/magic) for file to
> recognize the various .cm* file types.
Under my Linux, it is /usr/share/magic. It works.
> I don't really know what the ast_impl, the ast_intf and the exec
> file type are all about, so these may not be the best strings around.
They are files holding syntax trees generated by camlp4. E.g.:
camlp4o myfile.ml -o foobar.ml
The file "foobar.ml" is an ast_impl file. It is binary but compilable:
ocamlc -c foobar.ml
The compiler loads the binary tree, the syntactic analysis is skipped
and the possible error messages show the initial file (myfile.ml).
With your magic file:
file foobar.ml
foobar.ml: Objective Caml 'ast_impl' file (Version 008).
--
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr