Browse thread
Re: question on integrating the toplevel in an O'Caml app
- Ruchira Datta
[
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: | 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 datta@math.berkeley.edu