chpp
is a preprocessor. Therefore, its main purpose is to modify
input text by including other input files and by macro expansion.
Programs performing these tasks already exist, among them the popular C
Preprocessor (cpp
) and m4
, which have proven to be
convenient and valuable tools suitable for a variety of tasks. The
motivation for chpp
is thus questionable.
What distinguishes chpp
from at least the two programs mentioned
above are mainly two features:
chpp
is non-intrusive. This means that you can take your
favourite text and it is very unlikely that it will be changed when
piped through chpp
. Due to this feature it is pretty easy to
start using chpp
since you can just start writing your text and
need not concern yourself with chpp
sitting in the background
changing it for no obvious reason.
chpp
is not just a package for performing simple macro expansion,
but can indeed be considered a full-fledged programming language. Most
importantly, it provides support for complex data structures, namely
lists and hashes (associative arrays), which can be nested arbitrarily.
chpp
consists of two parts which could, in some sense, be
regarded as two separate passes over the input file. This is not
entirely true, though, since the two parts are intertwined and cannot be
separated. The first part, which performs command processing, is similar
to what cpp
does. It allows the inclusion of other files, simple
macro definitions and conditional inclusion and exclusion of parts of
the input. The second part does macro processing and is the actual
workhorse and core of chpp
.
Although macro processing on its own could do anything that can be accomplished with commands, the latter are not only easier to use but also easier to read and therefore improve clarity.
chpp
stands for
chpp
does not stand for Chakotay Preprocessor.
chpp
chpp
can be used very well as
chpp
(see section The History of chpp
).
chpp
will become even more attractive
for this kind of application when the planned database interface
(see section Planned but not yet Implemented Features) is available.
chpp
should not be used for
chpp
should, due to its nature, not be used for
chpp
is not a
fast program. However, this may change in the future
(see section Planned but not yet Implemented Features).
We will, in some of the next releases, improve the performance of
chpp
by yet another factor of two for typical applications.
It will be possible to write new built-in macros in C, which chpp
will load dynamically at run-time (see section Extending chpp
).
We would also like to add a few extension packages to chpp
, which
will make it more suitable for and easier to apply to various
applications, most notably CGI scripting, HTML generation and database
interfacing.
chpp
chpp
is available for free download on the world-wide-web. Point
your web-browser at @url{http://chakotay.ml.org/} (or
@url{http://chakotay.ml.org/chpp/} if you are using an ancient
browser). From there you can download the latest version of chpp
.
chpp
Not much here, yet.
chpp
is far from error-free in its current version. It works
quite reliably now when not stressed too far, though. The biggest
problem is currently that chpp
's error handling is
insufficient. chpp
does not report some errors, while others
cause it to crash or to hang up in an endless loop. We do, of course,
plan to change this in the future.
Before you tell us about a bug, please check that you are using the
latest version of chpp
(see section Obtaining chpp
). If this is not
the case, please upgrade and try again.
Please do not report bugs that concern chpp
's error handling. We
know that it is unreliable and buggy and we will change that. You
should, however, report any incident where chpp
does anything
wrong with a script which you believe is correct. In such a case, please
write us an email containing the script that causes chpp
to fail
and any additional files that your script needs. Better yet, try to
narrow the bug down to the smallest script possible. Do also include
information on the configuration you ran chpp
on, especially if
the bug only happens to show up with this configuration. The email
address you should send your bug-report to is
@email{chpp@unix.cslab.tuwien.ac.at}.
chpp
is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
chpp
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with chpp
; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
chpp
was designed and implemented by Heinz Deinhart
(@email{heinz@unix.cslab.tuwien.ac.at}) and Mark Probst
(@email{schani@unix.cslab.tuwien.ac.at}). Check out the chpp
homepage (see section Obtaining chpp
) for more information.
Our thanks go to Tatjana Svizensky for proofreading this manual and to Herbert P@"otzl for donating the hash-table functions, which we were too lazy, erm, too busy to implement, and for not reading the examples chapter of this document.
Go to the first, previous, next, last section, table of contents.