Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Caml-list] New: cppo, C preprocessor for OCaml

14 views
Skip to first unread message

Martin Jambon

unread,
Nov 17, 2009, 7:55:05 PM11/17/09
to OCaml Mailing List
Dear list,

It is my pleasure to announce the first release of cppo, an OCaml-friendly
equivalent of the C preprocessor (cpp).

Cppo provides the classic #include, #define and conditionals (#ifdef, ...)
which are occasionally useful. Cppo can be used on OCaml files and variants
of OCaml that use the same lexer, such as ocamllex.

The implementation of cppo was tested with ocaml 3.09 to 3.11 and is based on
ocamllex/ocamlyacc (works also with menhir which I used during the development).


The documentation and the source tarballs are at:

http://martin.jambon.free.fr/cppo.html

The package is also available from GODI (apps-cppo).


Enjoy.


Martin

--
http://mjambon.com/

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Goswin von Brederlow

unread,
Nov 17, 2009, 8:41:59 PM11/17/09
to Martin Jambon, OCaml Mailing List
Martin Jambon <martin...@ens-lyon.org> writes:

> Dear list,
>
> It is my pleasure to announce the first release of cppo, an OCaml-friendly
> equivalent of the C preprocessor (cpp).
>
> Cppo provides the classic #include, #define and conditionals (#ifdef, ...)
> which are occasionally useful. Cppo can be used on OCaml files and variants
> of OCaml that use the same lexer, such as ocamllex.
>
> The implementation of cppo was tested with ocaml 3.09 to 3.11 and is based on
> ocamllex/ocamlyacc (works also with menhir which I used during the development).
>
>
> The documentation and the source tarballs are at:
>
> http://martin.jambon.free.fr/cppo.html
>
> The package is also available from GODI (apps-cppo).
>
>
> Enjoy.
>
>
> Martin

Without looking at it, is is camlp4 based and can I combine that with
other camlp4 modules or do I need to seperately preprocess the
source?

MfG
Goswin

Martin Jambon

unread,
Nov 18, 2009, 6:34:03 AM11/18/09
to Goswin von Brederlow, OCaml Mailing List
Goswin von Brederlow wrote:
> Martin Jambon <martin...@ens-lyon.org> writes:
>
>> Dear list,
>>
>> It is my pleasure to announce the first release of cppo, an OCaml-friendly
>> equivalent of the C preprocessor (cpp).
>>
>> Cppo provides the classic #include, #define and conditionals (#ifdef, ...)
>> which are occasionally useful. Cppo can be used on OCaml files and variants
>> of OCaml that use the same lexer, such as ocamllex.
>>
>> The implementation of cppo was tested with ocaml 3.09 to 3.11 and is based on
>> ocamllex/ocamlyacc (works also with menhir which I used during the development).
>>
>>
>> The documentation and the source tarballs are at:
>>
>> http://martin.jambon.free.fr/cppo.html
>>
>> The package is also available from GODI (apps-cppo).
>>
>>
>> Enjoy.
>>
>>
>> Martin
>
> Without looking at it, is is camlp4 based and can I combine that with
> other camlp4 modules or do I need to seperately preprocess the
> source?

No, cppo is a standalone executable and is independent from camlp4 or camlp5.

Note that the camlp4 world has optcomp:

http://forge.ocamlcore.org/projects/optcomp/

Martin

--
http://mjambon.com/

Richard Jones

unread,
Nov 18, 2009, 8:38:25 AM11/18/09
to Martin Jambon, OCaml Mailing List
On Wed, Nov 18, 2009 at 01:54:18AM +0100, Martin Jambon wrote:
> It is my pleasure to announce the first release of cppo, an OCaml-friendly
> equivalent of the C preprocessor (cpp).

All I need now is a camlp4-powerful macro preprocessor for my C code ...

Rich.

--
Richard Jones
Red Hat

Yoann Padioleau

unread,
Nov 25, 2009, 6:54:46 PM11/25/09
to Richard Jones, OCaml Mailing List

On Nov 18, 2009, at 5:38 AM, Richard Jones wrote:

>
> On Wed, Nov 18, 2009 at 01:54:18AM +0100, Martin Jambon wrote:
>> It is my pleasure to announce the first release of cppo, an OCaml-
>> friendly
>> equivalent of the C preprocessor (cpp).
>
> All I need now is a camlp4-powerful macro preprocessor for my C
> code ...

Try coccinelle:
http://coccinelle.lip6.fr/

0 new messages