English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Re: question on integrating the toplevel in an O'Caml app
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2000-11-03 (09:22)
From: Ruchira Datta <datta@m...>
Subject: Re: question on integrating the toplevel in an O'Caml app
Stephan Houben wrote:
>These all seem things the interpreter does now. In the crudest set-up,
>I would simply send string to the interpreter. However, a better
>approach might be to actually send the AST to the interpreter.

>I also need to get the type information. A crude approach would be again
>to ask the interpreter to evaluate something like module M = Blah, 
>and look at the result. again, I suppose a better approach would be
>to get the data structure inside the compiler back.

Have you looked at Camlp4?  It allows users to extend/redefine the
concrete syntax, and IIRC it has some code like what you are looking
for above to facilitate this.

Ruchira Datta