34 lines
2.0 KiB
C
34 lines
2.0 KiB
C
|
static void highlight_ada (void) {
|
||
|
char * separators = ".,:;<=>+-*/&|()\" \t\r\n";
|
||
|
|
||
|
char * keywords [] = {
|
||
|
"abort", "else", "new", "return", "abs", "elsif", "not", "reverse",
|
||
|
"abstract", "end", "null", "accept", "entry", "select", "access", "of",
|
||
|
"separate", "aliased", "exit", "or", "some", "all", "others", "subtype",
|
||
|
"and", "for", "out", "array", "function", "at", "tagged", "generic",
|
||
|
"package", "task", "begin", "goto", "pragma", "body", "private", "then",
|
||
|
"type", "case", "in", "constant", "until", "is", "raise", "use",
|
||
|
"if", "declare", "range", "delay", "limited", "record", "when", "delta",
|
||
|
"loop", "rem", "while", "digits", "renames", "with", "do", "mod",
|
||
|
"requeue", "xor", "procedure", "protected", "interface", "synchronized", "exception", "overriding",
|
||
|
"terminate"
|
||
|
};
|
||
|
|
||
|
int word;
|
||
|
|
||
|
syntax_define (false, false, "--", "\n", '\0', (int) 0xff777777, 0);
|
||
|
syntax_define (false, false, "'", "'", '\\', (int) 0xff7733cc, 0);
|
||
|
syntax_define (false, false, "\"", "\"", '\\', (int) 0xffcc3377, 0);
|
||
|
|
||
|
for (word = 0; word != (int) (sizeof (keywords) / sizeof (keywords [0])); ++word) {
|
||
|
syntax_define (false, true, keywords [word], separators, '\0', (int) 0xff33ccee, 0);
|
||
|
}
|
||
|
|
||
|
syntax_define (true, false, "()", "", '\0', (int) 0xffee5533, 0);
|
||
|
syntax_define (true, false, ".,:;<=>+-*/&|'", "", '\0', (int) 0xffeeaa33, 0);
|
||
|
|
||
|
syntax_define (true, true, "0123456789", separators, '\0', (int) 0xffee33aa, 0);
|
||
|
syntax_define (true, true, "abcdefghijklmnopqrstuvwxyz", separators, '\0', (int) 0xffcccccc, 0);
|
||
|
syntax_define (true, true, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", separators, '\0', (int) 0xffeeeeee, 0);
|
||
|
}
|