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 PAA20964; Fri, 24 Jan 2003 15:16:44 +0100 (MET) 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 PAA20798 for ; Fri, 24 Jan 2003 15:16:43 +0100 (MET) Received: from yellow.csi.cam.ac.uk (yellow.csi.cam.ac.uk [131.111.8.67]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h0OEGhr14761 for ; Fri, 24 Jan 2003 15:16:43 +0100 (MET) Received: from tcmpnb3.phy.private.cam.ac.uk ([172.24.25.7]) by yellow.csi.cam.ac.uk with esmtp (Exim 4.10) id 18c4dP-0003hv-00 for caml-list@inria.fr; Fri, 24 Jan 2003 14:16:43 +0000 From: Daniel Andor Reply-To: Daniel.Andor@physics.org To: caml-list@inria.fr Subject: [Caml-list] camlp4 vs. ocamllex/yacc? Date: Fri, 24 Jan 2003 14:15:42 +0000 User-Agent: KMail/1.5 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200301241415.44042.da209@cam.ac.uk> Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, I want to write a smallish translator that would read mathematical formulae in an easy to read (for humans, that is) format and translate them to a computer language (ocaml, fortran, c, latex, etc) for output. In the process it could do simple consistency checks (like making sure the dimensionality of physical equations are correct, for example) on the parse tree. What are the advantages/disadvantages of using camlp4 vs. a combination of ocamllex and ocamlyacc? Is there already a translator like this out there (to save me the effort)? Any tips on how consistency checks on the equations could be made harnessing the power of the type system? Thanks, Daniel. ------------------- 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