From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p7D7Pa4E029904 for ; Sat, 13 Aug 2011 09:25:36 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhIDAKMmRk5CbwQakWdsb2JhbABBmDuPPRQBAQEBCQsLBxQEIYFAAQEEAUAuCgEBBAsLDgoJBBIPCQMCAQIBMxIGDQEFAgEBDgiHVgS5RgWGR4djkD+Ea4ce X-IronPort-AV: E=Sophos;i="4.67,366,1309730400"; d="scan'208";a="105381409" Received: from out2.smtp.messagingengine.com ([66.111.4.26]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 13 Aug 2011 09:25:17 +0200 Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.messagingengine.com (Postfix) with ESMTP id 3FEE6218D1; Sat, 13 Aug 2011 03:25:16 -0400 (EDT) Received: from frontend1.messagingengine.com ([10.202.2.160]) by compute4.internal (MEProxy); Sat, 13 Aug 2011 03:25:16 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=vQDaEEZ7kR9EVzXwLz5S9i Vgr7M=; b=UcJF057jVoqt/1gPZgQDq42ZWQcmX0VWoIYIURGRXvhU3Th5f0XUvx 6ohArqTa8htZyfEhsRtQ+A8wQ+hfwE/N7iWQM0MX7fRGEopU/zyQpUUo7YKnk17a YSWrs8W9FkegxkVV7RaplZ3BsdUCT9+f5uzDQxpThdzR7usTfTZHg= X-Sasl-enc: 2+i7AYM2TYe7tnGLsC/DD+zo4qCp3BzAun9NeH4uBIo5 1313220316 Received: from [192.168.2.2] (c-98-248-39-171.hsd1.ca.comcast.net [98.248.39.171]) by mail.messagingengine.com (Postfix) with ESMTPSA id C93C941CD15; Sat, 13 Aug 2011 03:25:15 -0400 (EDT) Message-ID: <4E46270C.7040009@ens-lyon.org> Date: Sat, 13 Aug 2011 00:26:04 -0700 From: Martin Jambon User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20101023 Lightning/1.0b3pre Thunderbird/3.1.3 MIME-Version: 1.0 To: Alexy Khrabrov CC: OCaml Mailing List References: <4E44F5E5.6080102@ens-lyon.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] [ANN] cppo 0.9.2 - cpp for OCaml On 08/12/11 15:16, Alexy Khrabrov wrote: > Perhaps it should be called opp? Or does c stand for "compatible > preprocessor for ocaml"? :) ocpp was already taken by a camlp4 tool. I don't remember exactly why I didn't like opp. Maybe because O.P.P. sounds bad. I remember feeling good about cppo because it starts with cpp and because the pronunciation is unambiguous. Martin > A+ > > On Fri, Aug 12, 2011 at 2:44 AM, Martin Jambon > wrote: >> Dear list, >> >> I would like to announce the release of cppo 0.9.2 which contains a few >> additional features since the last announcement in 2009. >> >> http://martin.jambon.free.fr/cppo.html >> >> cppo is a lightweight preprocessor analogous to cpp and compatible with >> the OCaml syntax. It provides the classic directives #define, #include, >> #ifdef, etc. >> >> Documentation: http://martin.jambon.free.fr/cppo-manual-0.9.2.txt >> >> >> New features: >> >> 1. #ext directive: calling external preprocessors >> 2. STRINGIFY and CONCAT >> >> >> 1. #ext directive: calling external preprocessors >> ================================================= >> >> The new #ext directive allows to call an external command to process a >> lines of input until #endext. >> >> $ cat example1.ml >> let msg = >> #ext rot13 >> "BPnzy ehyrf!" >> #endext >> >> let () = print_endline msg >> >> $ ocamlopt -o example1 \ >> -pp "cppo -x rot13:\"tr '[a-zA-Z]' '[n-za-mN-ZA-M]'\"" example1.ml >> >> $ ./example1 >> OCaml rules! >> >> >> 2. STRINGIFY and CONCAT >> ======================= >> >> STRINGIFY allows to build string literals from unquoted text. This is >> useful for including source code in error messages. STRINGIFY(foo) is >> the equivalent of #foo in cpp syntax. >> >> CONCAT concatenates its two arguments into a single identifier. >> CONCAT(a, b) is the equivalent of a ## b in cpp syntax. >> >> >> >> Enjoy. >> >> >> Martin >> >> -- >> >> P.S.: follow my tech-focused channel on Twitter for more organic news: >> >> http://twitter.com/mjambontech >> >> -- >> 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 >> >> >