Home Prog People

Cppo: the C preprocessor for OCaml [difficulty = 1 camel]

Introduction

Cppo is an equivalent of the C preprocessor targeted at the OCaml language and its variants.

The main purpose of cppo is to provide a lightweight tool for simple macro substitution (#define) and file inclusion (#include) for the occasional case when this is useful in OCaml. Processing specific sections of files by calling external programs is also possible via #ext directives.

The implementation of cppo relies on the standard library of OCaml and on the standard parsing tools Ocamllex and Ocamlyacc, which contribute to the robustness of cppo across OCaml versions.

Download

This software was written by Martin Jambon. It is distributed under a BSD license. The current version is 0.9.2; see Changes.

You can install this program from GODI or manually:

Latest version: cppo.tar.gz cppo.tar.bz2 cppo-0.9.2.tar.gz cppo-0.9.2.tar.bz2
cppo-0.9.1.tar.gz cppo-0.9.1.tar.bz2
cppo-0.9.0.tar.gz cppo-0.9.0.tar.bz2

The development version of Cppo is now hosted on GitHub.

Documentation

Cppo manual (text).