From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id FAA14234; Thu, 29 Apr 2004 05:49:24 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id FAA14276 for ; Thu, 29 Apr 2004 05:49:23 +0200 (MET DST) Received: from smtp3.adl2.internode.on.net (smtp3.adl2.internode.on.net [203.16.214.203]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i3T3nKYM017512 for ; Thu, 29 Apr 2004 05:49:22 +0200 Received: from [192.168.1.200] (ppp114-169.lns1.syd3.internode.on.net [150.101.114.169]) by smtp3.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id i3T3n7k2025544; Thu, 29 Apr 2004 13:19:08 +0930 (CST) Subject: Re: [Caml-list] Calling Ocaml from Python From: skaller Reply-To: skaller@users.sourceforge.net To: Max Powers Cc: caml-list In-Reply-To: References: Content-Type: text/plain Message-Id: <1083210545.9537.1276.camel@pelican.wigram> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 29 Apr 2004 13:49:06 +1000 Content-Transfer-Encoding: 7bit X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 python:01 sourceforge:01 2004:99 blind:99 swig:01 python:01 9660:01 glebe:01 ocaml:01 ocaml:01 nsw:01 trivial:01 snail:02 parser:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, 2004-04-29 at 13:09, Max Powers wrote: > What I'm hoping is that someone on the list has tried this sort of thing > before and can give a little advice on the best way forwards (and hopefully > reduce the number of blind alleys I explore!). There is an Ocaml module in SWIG which may be useful to you. It sounds like you basically only need to call a single Ocaml parser function from Python to do the parsing which should be trivial. More difficult will be interpreting the parser output: that will be some Ocaml data structure like a parse tree you'll need to walk somehow from Python. On way to do that might be to get the Ocaml parse to build a parse tree made out of PyObjects. -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net ------------------- 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