From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q4BKqsrx022089 for ; Fri, 11 May 2012 22:52:54 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AroDAJV7rU/RVdQ2kGdsb2JhbABEoUwziCoBiTMIIgEBAQEJCQ0HFAQjghUBAQEDARICLAEbEgsBAwELBgUEBxohIQEBEQEFAQoSBhMSEIddAQMGBQucUgkDjCSCc4RxChknAwpXiHYBBQuKHocLBJV9gRGKLAKDIT2EDg X-IronPort-AV: E=Sophos;i="4.75,572,1330902000"; d="scan'208";a="158061289" Received: from mail-vb0-f54.google.com ([209.85.212.54]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 11 May 2012 22:52:48 +0200 Received: by vbmv11 with SMTP id v11so5847246vbm.27 for ; Fri, 11 May 2012 13:52:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=lo5+PwUHkiPDqolhUgYh3IJteKPzPLcxIALXK7KXvFo=; b=CeBCMHOQsui5mcBLHB9JiXdoxlDAs7I2/RguiGa3jTDuX7V5tiVZGaOj1Grm3XU58i RGJCBekDHgd9n9Xb8Zx7VDXTXbzNjC08I3SxgAx6cGRfkA1d1oQ6fM/8WTkqLyth+mWA eGaAfKfxRjiFpN2y2unnvxULQqNjkPSA6oJlrIUQ6UV4MapYzCLD1GKAisVZkWArSO/y DAyXFILgpLN53WLT8/CdcbOc3NlaBINXCJpJKQZ+KQIeWXSi3bmQcPiMfcdxSL2w6SSm fVFSClpTeMdW75X/20QjKaiO8B+0Yy8ZQU7KId261zFdIOjppf9YDx68CR/Q6ShdJblD r4/w== Received: by 10.220.224.68 with SMTP id in4mr5951548vcb.24.1336769567029; Fri, 11 May 2012 13:52:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.188.1 with HTTP; Fri, 11 May 2012 13:52:26 -0700 (PDT) In-Reply-To: References: From: Philippe Veber Date: Fri, 11 May 2012 22:52:26 +0200 Message-ID: To: Joel Reymont Cc: caml-list@inria.fr Content-Type: multipart/alternative; boundary=14dae9ccde2630796a04bfc8eb40 X-Validation-by: philippe.veber@gmail.com Subject: Re: [Caml-list] camlp4 and generating class definitions --14dae9ccde2630796a04bfc8eb40 Content-Type: text/plain; charset=ISO-8859-1 Hi Joel, You can have a look at Martin Jambon's col syntax extension : https://github.com/pveber/col Have a look at pa_col.ml, starting line 400. Cheers, Philippe. 2012/5/11 Joel Reymont > I would like to auto-generate an object with a couple of mutable > fields and some methods. > > I would then like to pretty-print the code into a file. > > Are there any examples showing how to do this with camlp4? > > Thanks in advace, Joel > > -------------------------------------------------------------------------- > AlgoKit: EasyLanguage trading strategies, on the server, w/ Rithmic R|API > ---------------------+------------+--------------------------------------- > http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont > ---------------------+------------+--------------------------------------- > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa-roc.inria.fr/wws/info/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > > --14dae9ccde2630796a04bfc8eb40 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Joel,

You can have a look at Martin Jambon's col syntax exten= sion :

https://github.com/= pveber/col

Have a look at pa_col.ml= , starting line 400.

Cheers,
=A0 Philippe.


2012/5/1= 1 Joel Reymont <joelr1@gmail.com>
I would like to auto-generate an object with a couple of mutable
fields and some methods.

I would then like to pretty-print the code into a file.

Are there any examples showing how to do this with camlp4?

=A0 =A0Thanks in advace, Joel

--------------------------------------------------------------------------<= br> AlgoKit: EasyLanguage trading strategies, on the server, w/ Rithmic R|API ---------------------+------------+---------------------------------------<= br> http://wagerlabs.com= | @wagerlabs | http://www.linkedin.com/in/joelreymont
---------------------+------------+---------------------------------------<= br>
--
Caml-list mailing list. =A0Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


--14dae9ccde2630796a04bfc8eb40--