caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: clement <clement.capel@free.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Embedding OCaml
Date: Sun, 22 Feb 2004 13:09:19 +0100	[thread overview]
Message-ID: <200402221309.19228.clement.capel@free.fr> (raw)
In-Reply-To: <40363E5A.6030707@crystalballinc.com>



Hello,

I have got another solution to possibly resolve this
problem: 
I've developed an embedded O'Caml toplevel
which integrates the runtime and the compiler of O'Caml.
Actually, it's a dynamic linked library (in C) builds using 
the "ouput-obj" option; i have solved the problem of 
the symbole table thanks to a modification of the 
compiler and the runtime.

you can download the patch at this url: 
http://www.pps.jussieu.fr/~capel/eng/toplevel/toplevel.html

you will find also an O'Caml plugin for Excel and Netscape in this page.


Just an example to show you how it works (in C):
(you can also use the directives #use and #load)

  toplevel_init(argv);

  toplevel_exec("let rec ack m n = 
                 match m,n with 0,n -> n+1            
               | m,0 -> ack (m-1) 1                   
               | m,n -> (ack (m-1) ack m (n-1))");
    
  val = toplevel_exec("ack 3 2;;");
  res = 1+Long_val(val);

  printf ("1+ack(3,2)=%dn", res);


I hope it will help you.


              Clément Capel

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


      parent reply	other threads:[~2004-02-22 12:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-20 17:05 Vlad Seryakov
2004-02-20 17:25 ` Richard Jones
2004-02-20 17:34   ` Vlad Seryakov
2004-02-20 17:35     ` Ranjan Bagchi
2004-02-20 17:43     ` Richard Jones
2004-02-20 17:54       ` Vlad Seryakov
2004-02-20 18:06         ` Richard Jones
2004-02-21  2:17           ` ChoJin
2004-02-22 12:09 ` clement [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200402221309.19228.clement.capel@free.fr \
    --to=clement.capel@free.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).