last modified: October 6 2000

The IDL preprocessor

Introduction

JPP is a preprocessor integrated with the idl2java compiler. JPP is heavily inspired by the Jonas jpp preprocessor : it globally provides the same set of facilities, contains the same classes, though most methods have been rewritten (for some stupid reason).

JPP thus implements a subset of the ansi C preprocessor facilities. In its present version jpp is not available as a standalone tool.

Preprocessor utilization

The syntax of the jpp command is : jpp (option_list | idl_File_List)*. The command jpp stands here for java org.omg.objectweb.jonathan.tools.pp.JPP. It could be implemented through a simple shell script (unix, Linux) or .bat file (dos, windows).

Options and file names can appear several times and be intertwinned in the command line. Option values are then used from their declaration point until they are redefined. Following options are available in the present version :

An example is : jpp -D NIRVANA -D BODDHISATVA -I ../BouddhaDir mediation.java

JPP grammar

The directives which can be included in the files should obey to the following simple syntactic rules.

An example is :

#ifndef GAUTAMA_JAVA
#define GAUTAMA_JAVA
#ifdef NIRVANA
#pragma BODDHINUMBERS 1 2 3 \
                      4 5 6 7
#include "../BoddhiDir/BoddhiParameters.hh"
.........
.........
#undef NIRVANA
#else
........
........
#endif
#endif

Several simple controls are performed :

Present limitations are :

Known bugs