Subsections


8. Configuration


8.1 General Configuration

The general configuration is placed in config/general.cfg. You can set a Command Prefix and Postfix for the Parser. The defaults are and . The next options are Template and Cache Directories you can set them to whatever you want, but do not use trailing slashes! The ReplacePattern can be any string to replace highlighted strings. \2 is replaced with the string. If CompleteWords is True the complete word is highlighted when a part of the word shall be highlighted.


8.2 Template Functions

All functions which you can use with the template engine have to be placed into config/functions.cfg. Each entry has to have this form:

[template_function_name]
0 = "code for 0 parameter"
1 = "code for 1 parameter"

Inside the code there are several place holders.

%S
The object this function was a method of in the template or the first parameter if it was not called as a method.
%P0
The first parameter
%Px
The (x-1)th parameter

An example to illustrate the usage of this:

[find]
1 = "%S.find(%P0)"
2 = "%S.find(%P0, %P1)"
3 = "%S.find(%P0, %P1, %P2)"


8.3 Template Operators

You can as well change the available operators. Operators are stored in config/operators.cfg. An operator my not contain a space but the code it is replace with may contain an unlimited number of spaces but both may not contain any newlines.

Default Operators.cfg

greaterOrEqual >=
geq >=
>= >=
lessOrEqual <=
leq <=
<= <=
notEqual !=
neq !=
<> !=
!= !=
equal ==
eq ==
== ==
= ==
greaterThan >
gt >
> >
lessThan <
lt <
< <
isEven  % 2 == 0
ev  % 2 == 0
isOdd  % 2 == 1
odd  % 2 == 1
isSet != ""
isset != ""
not not
! not
( (
) )
   
* *
/ /
+ +
- -
& &
| |
% %
&&  and 
and  and 
And  and 
AND  and 
||  or 
or  or 
Or  or 
OR  or

See About this document... for information on suggesting changes.