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 p7CMGbPS018752 for ; Sat, 13 Aug 2011 00:16:42 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AloCAEqlRU7RVaE2kGdsb2JhbABBmDuPNggUAQEBAQkJDQcUBCGBQAEBAQEDEgIsARsSCwEDDAYFCw0NISIBEQEFAQoSBhMICggIh1GdQQqMNoJVhHs7iG0CAwaGQQSHX4sxiXaCYTyDfg X-IronPort-AV: E=Sophos;i="4.67,365,1309730400"; d="scan'208";a="115728025" Received: from mail-fx0-f54.google.com ([209.85.161.54]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 13 Aug 2011 00:16:42 +0200 Received: by fxe4 with SMTP id 4so4928540fxe.27 for ; Fri, 12 Aug 2011 15:16:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=82Zgz0+wV77mUSJ+QV4cbRgR4u24G7kY8uuBdfi8lVU=; b=xWgWI2Iu+db0TpYIGOtzEugjoUb4yKCiFzJdSHfcCjrdDCRYfwLnNjG6BruX9cmIJK /chPM/2hNNqjYQ5puKcpsO2PgVTF+luFq0k1g7Q58ZU2KYhR78cCpQ0+LZpw0WYuiKeI QBabpInEUbvTJVdlv8y997aq34EaznR9p2RsU= MIME-Version: 1.0 Received: by 10.223.8.197 with SMTP id i5mr1901197fai.67.1313187401832; Fri, 12 Aug 2011 15:16:41 -0700 (PDT) Received: by 10.223.103.5 with HTTP; Fri, 12 Aug 2011 15:16:41 -0700 (PDT) In-Reply-To: <4E44F5E5.6080102@ens-lyon.org> References: <4E44F5E5.6080102@ens-lyon.org> Date: Fri, 12 Aug 2011 15:16:41 -0700 Message-ID: From: Alexy Khrabrov To: Martin Jambon Cc: OCaml Mailing List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p7CMGbPS018752 Subject: Re: [Caml-list] [ANN] cppo 0.9.2 - cpp for OCaml Perhaps it should be called opp? Or does c stand for "compatible preprocessor for ocaml"? :) 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 > >