AptEdit supports powerful and customizable syntax highlighting for text, C/C++, Java, Scala, C#, FORTRAN, Perl, Python, Ruby, Visual Basic, Pascal, Html, CSS, PHP, JSP, JavaScript, XML, MS-SQL, Windows INI and Microsoft Assembly by default. Also, you can create your own syntax file to support other programming languages.
If you want to add your own syntax type, you must create a syntax file and add it to the File Syntax page of the Options dialog box.
Syntax File
Syntax file is a plain text file which has ".aes" extension and should be written in predefined format. You can also insert comment line in syntax file. Comment line must begin with "##".
DELIMITER
Specifies delimiters for parsing keywords. You don't need to specify the space character and the tab character here, since those are treated as delimiter by default.
[DELIMITER]
,(){}[]-+*/=~!@#$%^&|\<>?:;."'`
CASE
Specifies case sensitivity. 'y' for yes and 'n' for no. Default value is 'n'.
[CASE]
y
LINE_COMMENT
Specifies a string which turns on line comment. In this case a new line is required for each string.
[LINE_COMMENT]
//
...
LINE_COMMENT_CONTINUE
Specifies a string which continues the line comment. In this case a new line is required for each string.
[LINE_COMMENT_CONTINUE]
\
...
BLOCK_COMMENT
Specifies the strings which turns on and turns off block comment. If you only defined the "Block Comment On" or "Block Comment Off", AptEdit will ignore it.
[BLOCK_COMMENT]
ON=/* OFF=*/
...
QUOTATION
Specifies quotation mark.
[QUOTATION]
ON=" OFF="
...
QUOTATION_CONTINUE
Allows un-terminated quotation to be continued to next line.
[QUOTATION_CONTINUE]
\
...
QUOTATION2
Specifies alternate quotation mark.
[QUOTATION2]
ON=' OFF='
...
ESCAPE
Specifies escape character. Enter only one character here.
[ESCAPE]
\
...
INDENT
Specifies the strings which need indentation.
[INDENT]
{
case
...
UNINDENT
Specifies the strings which don't need indentation.
[UNINDENT]
}
...
COLLAPSE_EXPAND
Specifies a string which turns on or turns off collapsing/expanding block.
[COLLAPSE_EXPAND]
ON={ OFF=}
...
MATCH_BRACE
Specifies a string which turns on or turns off matching brace.
[MATCH_BRACE]
ON={ OFF=}
...
NUMBER_PATTERN
'cpp' for C/C++ number syntax highlighting.
[NUMBER_PATTERN]
CPP
PREFIX
Specifies keyword prefix character. Any word that follows the prefix will be treated as a keyword.
[PREFIX]
$
...
KEYWORD Groups
Each keyword group begins with [KEYWORD] statement with optional description of the group. The string after "=" is the name of the keyword groups. If you don't define the name of the keyword group, it will be named as Keyword1, Keyword2, etc. Keyword list follows from the next line.
[KEYWORD=Reserved Word]
auto
bool break
...
[KEYWORD=Compiler Directive]
#define
#elif #else #endif #error
...
Syntax File Sample
Syntax File for C/C++.
## C/C++ Syntax File
[DELIMITER]
,(){}[]-+*/=~!@#$%^&|\<>?:;."'`
[CASE]
y
[LINE_COMMENT]
//
[LINE_COMMENT_CONTINUE]
\
[BLOCK_COMMENT]
ON=/* OFF=*/
[QUOTATION]
ON=" OFF="
[QUOTATION_CONTINUE]
\
[QUOTATION2]
ON=' OFF='
[ESCAPE]
\
[INDENT]
{
case
default
do
else
for
if
switch
while
[UNINDENT]
}
[COLLAPSE_EXPAND]
ON={ OFF=}
ON=BEGIN_MESSAGE_MAP OFF=END_MESSAGE_MAP
[MATCH_BRACE]
ON={ OFF=}
ON=( OFF=)
ON=[ OFF=]
[NUMBER_PATTERN]
CPP
[KEYWORD=Reserved Word]
auto
bool break
case catch char cerr cin class const continue cout
default delete do double
else enum explicit extern
float for friend
goto
if inline int
long
namespace new
operator
private protected public
register return
short signed sizeof static struct switch
template this throw try typedef
union unsigned
virtual void volatile
while
__asm __fastcall __based __cdecl __pascal __inline __multiple_inheritance __single_inheritance __virtual_inheritance
[Keyword=Compiler Directive]
#define
#elif #else #endif #error
#include #if #ifdef #ifndef
#line
#pragma
#undef
#using