filepp 1.8.0

filepp is a generic file preprocessor.
filepp is a generic file preprocessor. It is designed to allow the functionality provided by the C preprocessor to be used with any file type. This project supports the following keywords, all of which have their usual C preprocessor meanings and usage:

· #include
· #define
· #if
· #elif
· #ifdef
· #ifndef
· #else
· #endif
· #undef
· #error
· #warning

However, filepp is much more than a rewrite of the C preprocessor, it features the following enhancements:

· An extended #if keyword which includes string and regular expression parsing.
· It works with all character sets including international characters, not just ASCII characters.
· The prefix to the keyword (normally #) and the line continuation character (normally ) can be set to any character, string or regular expression.
· Keywords can be added, removed or modified.
· Macro expansion can work on whole or part words (the C preprocessor's macro expansion only works on whole words).
· Macros can have multiple arguments.
· Filepp has a debugging mode to help when things go wrong.
· Environment variables can be automatically defined as macros.
· Blank lines originating from include files can be suppressed.
· Filepp can be customised on the fly using the #pragma keyword which allows any of filepp's internal functions to be called.
· Modules can be written (in Perl) to modify or extend the behaviour of filepp.

These are just some of the enhancements filepp has over the normal C preprocessor. Its main advantage is the ability to write modules to extend and modify its behaviour. Filepp is written in Perl and allows anyone who knows how to program in Perl to easily write modules. Filepp comes with a set of modules which do the following:

· for module: Implements the #for keyword. The allows loops to be generated, the behaviour is similar to Perl and C loops.
· foreach module: Implements the #foreach keyword. The allows loops to be generated for a list of strings, the behaviour is similar to Perl and csh foreach loops.
· c-comment module: Removes C and C++ style comments from a file.
· hash-comment module: Remove # style comments (as used in Perl and shell scripts) from a file.
· function module: Allows macros to be written which directly call Perl functions. This allows macros to give dynamic output.
· maths module: Implements basic maths functions including add, subtract, multiply, divide, sine, cosine, exponential, random etc.
· format module: Provides a list of functions for formatting text including a C/Perl style printf function and the Perl substr function.
· literal module: This module prevents macros appearing in strings being replaced.
· toupper module: Converts all lowercase letters in a file to uppercase.
· tolower module: Converts all uppercase letters in a file to lowercase.
· bigdef module: Enables multi-line macros to be defined without needing to put a line continuation character at the end of each line - makes large macros much more readable.
· bigfunc module: Same as bigdef, only difference is any keywords embedded in the macro are evaluated when the macro is replaced rather than when the macro is defined.
· defplus module: Enables existing macros to be appened to.
· blc module: Enables automatic line continuation if a closing bracket is on a line below the opening bracket.
· cmacro module: Makes certain macros more "C" like by putting quotes around their values.
· cpp module: Makes filepp behave as a basic C preprocessor.
· regexp module: Implements Perl style regular expression search and replacement, which allows regular expressions to be searched for and replaced with other strings.
· grab module: Used to grab input before any processing is done on it.

What's New in This Release:

· This release includes a rewrite of the processing chain so macros within macros behave correctly.
· Several other bugfixes and minor enhancements were made.

last updated on:
March 15th, 2007, 16:29 GMT
price:
FREE!
developed by:
Darren Miller
license type:
GPL (GNU General Public License) 
category:
ROOT \ Text Editing&Processing \ Markup

FREE!

In a hurry? Add it to your Download Basket!

user rating 13

UNRATED
3.2/5
 

0/5

Add your review!

SUBMIT