The Curry Preprocessor

This repository contains the implementation of the Curry preprocessor currypp which supports some extensions for Curry programs, like

Details about the usage can be found in the manual. Here is a short summary of the usage of integrated code.

General usage of the code integrator:

If the pre-processor is installed as the binary currypp, Curry source files containing integrated code can be translated by running currypp as follows:

currypp <org-filename> <input-file> <output-file> foreigncode [-o]

The parameters are:

Writing files with integrated code:

The basic syntax of integrated code in Curry program looks like

``langtag expression''

Here, langtag is a tag indicating the kind of integrated language, and expression is an expression of this language.

If `` or '' are used in the expression itself, the enclosing accents need to be of higher number than the inner graves, i.e., the following integrated code expression is also allowed:

````langtag expression''''

The number of opening and closing accents must always be identical.

Currently, the following langtag values are supported:

format - printf Syntax printf - same as above (but with an implicit putStr call) regex - Polymorphic regex expressions html - Standard HTML xml - Standard XML sql - SQL syntax

See the examples and source file comments for further details.