[Omake] Re: [Caml-list] Scripting in ocaml
Aleksey Nogin
nogin at metaprl.org
Wed Dec 27 11:20:27 PST 2006
On 27.12.2006 10:39, Richard Jones wrote:
> This is the syntax, right?
>
> http://omake.metaprl.org/omake-shell.html#chapter:shell
>
> It looks remarkably shell-like.
The above link only covers the "proper shell" parts of the OMake/osh
language (i.e. parts related to calling external commands).
Some features of the general language are outlined in
http://omake.metaprl.org/omake-language.html#chapter:language
> For those (like me) too lazy to
> download the source, can you give us an idea of how this is
> implemented? Is it an alternate syntax for OCaml or an interpreter
> written using ocamllex, etc.?
>
The OMake/osh language is fairly different from OCaml. The language was
designed specifically to work nicely in build specifications and shell
scriplets, which is a quite different set of constraints than the ones
OCaml is designed for. The result is a functional language with dynamic
typing and dynamic scoping.
OMake is implemented in OCaml (with a bit of C -
fam/gamin/kqueue/inotify bindings, Windows-specific code, etc). It can
be characterized as an interpreter (although before a file is executed,
there is a small compilation-like translation step) implemented using
ocamllex, ocamlyacc, etc. The parsed+translated version of each file is
cached to avoid the penalty of having to do it on every run.
Aleksey
More information about the Omake
mailing list