Preprocessing Prebop style
Prebop is not your father's preprocessor. In fact, you may not even think it's a preprocessor! Call it a "version configurer".
Instead of running every time you compile a file, like the C/C++ preprocessor, Prebop runs only when you tell it to.
Instead of creating an invisible intermediate file, Prebop writes a real file to the file system.
What's it for?
The primary use of Prebop is to maintain multiple versions of software from one source code base.
You can use a source code control system like CVS and accomplish the same objective with branch and merge, but what a collosal PITA! When your versions are multi-dimensional, e.g., your application runs on different versions of a framework and, in addition, has multiple versions (a trial version, a "pro" version, an "enterprise" version, etc.), plus for each of these there are released versions and beta versions, most source control systems are way cumbersome.
On the other hand, many Java programmers are only too happy to be free of the C/C++ preprocessor, with its cryptic syntax and hard to understand conditional expansion. If you've ever wasted time trying to figure out the effect of a half-dozen levels of nested #IFDEFs, you know what I mean.
A better idea
Instantiations had a better idea! Using their CodePro preprocessor as a design point, we rewrote it from scratch as an open source project. Here's the idea:
Here's an example to give the flavor:
/* $if version < 1.0.0$ */ foo(); /* $endif$ */
This is how the source looks before Prebop is run on it, or if
the value of the
/* $if version < 1.0.0$ foo(); $endif$ */
The second example is how the source looks after Prebop is run
on it, if the value of the
That's all there is to it!
Note that your programming editor makes it easy to see what the effect of the preprocessor is, because only included lines are colored as source code, while all preprocessor statements and excluded lines are colored as comments.
You can install Prebop in the usual way to use it from standalone
But Eclipse users have it easier. All you need to do is install
the plug-in in the usual way and the
Where to go
The project page lets you download a zip
containing the Eclipse plug-in, including the
The documentation tells you how to use the