caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alexy Khrabrov <deliverable@gmail.com>
To: Martin Jambon <martin.jambon@ens-lyon.org>
Cc: OCaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] [ANN] cppo 0.9.2 - cpp for OCaml
Date: Fri, 12 Aug 2011 15:16:41 -0700	[thread overview]
Message-ID: <CADSi6a3-U21BC=h+Eo3OXpbpNYscBYCpTToKrr7_7VCKXRTKNw@mail.gmail.com> (raw)
In-Reply-To: <4E44F5E5.6080102@ens-lyon.org>

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
<martin.jambon@ens-lyon.org> 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
>
>


  reply	other threads:[~2011-08-12 22:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-12  9:44 Martin Jambon
2011-08-12 22:16 ` Alexy Khrabrov [this message]
2011-08-13  6:30   ` Raphael Proust
2011-08-13  7:26   ` Martin Jambon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADSi6a3-U21BC=h+Eo3OXpbpNYscBYCpTToKrr7_7VCKXRTKNw@mail.gmail.com' \
    --to=deliverable@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=martin.jambon@ens-lyon.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).