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 VAA32296; Mon, 27 May 2002 21:33:32 +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 VAA32448 for ; Mon, 27 May 2002 21:33:31 +0200 (MET DST) Received: from verdot.inria.fr (verdot.inria.fr [128.93.11.7]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g4RJXVD09355 for ; Mon, 27 May 2002 21:33:31 +0200 (MET DST) Received: (from ddr@localhost) by verdot.inria.fr (8.9.3/8.9.3) id VAA10137 for caml-list@inria.fr; Mon, 27 May 2002 21:33:26 +0200 Date: Mon, 27 May 2002 21:33:26 +0200 From: Daniel de Rauglaudre To: Ocaml Subject: Re: [Caml-list] Possible use for camlp4 Message-ID: <20020527213326.F9870@verdot.inria.fr> References: <3CEF08ED.80407@baretta.com> <20020525125530P.garrigue@kurims.kyoto-u.ac.jp> <3CF28495.20102@baretta.com> <3CF27A8F.2000306@ozemail.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3CF27A8F.2000306@ozemail.com.au>; from skaller@ozemail.com.au on Tue, May 28, 2002 at 04:27:27AM +1000 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, On Tue, May 28, 2002 at 04:27:27AM +1000, John Max Skaller wrote: > Hmm.. can camlp4 generate C? Any program can generate C. For example, this one in OCaml: print_string "main () { printf(\"hello, world\\n\"); }\n"; flush stdout;; What do you mean by "generate C"? Can you specify, give examples? Or perhaps you mean "parse C" to include it in an OCaml program? In this case, no: I did not write any parser with C syntax, because C is a language of statements and OCaml a language of expressions. The C syntax is not a good one for the semantics of Camlp4. Or do you mean if there exist a parser for C program, generating a syntax tree? I just know that there is a definition of a C syntax tree somewhere and even somebody having programmed Camlp4 quotations for this syntax tree (allowing to use the concrete syntax to represent abstract syntax): I am sorry, I don't remember who, but he recognizes himself if he reads this mailing list... -- Daniel de RAUGLAUDRE daniel.de_rauglaudre@inria.fr http://cristal.inria.fr/~ddr/ ------------------- 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