1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
|
# From: Keith Humphreys <keith@ViaThe.Net>
#
# FTE is wonderful.
# Several months ago I was looking at SIOD, and I hacked a "fte config" file
# which is 98% accurate. :-)
#
# Anyway, as it might be of use, here it is:
# ! colors probably need fixing --Mark
colorize SIOD {
SyntaxParser = 'SIMPLE';
# 0, 8 - black
# 1, 9 - blue
# 2, A - green
# 3, B - cyan
# 4, C - red
# 5, D - magenta
# 6, E - orange
# 7, F - white
color {
{ 'Normal', 'Editor_Default' },
{ 'Keyword', 'Editor_Keywords' },
{ 'Number', 'Lang_DecimalNumber' },
{ 'HexNumber', 'Lang_HexNumber' },
{ 'Punctuation', 'Lang_Punctuation' },
{ 'String', 'Lang_String' },
{ 'Symbol', 'Lang_Command' },
{ 'Comment', 'Lang_Comment' },
{ 'Special', 'Lang_Control' },
};
# Hmmm, it appears that exit and quit aren't even recommended!
keyword 'Editor_Keywords4' { #Scheme's essential procedures:.
'abs', 'alarm', 'and', 'append', 'apply',
'ass', 'assoc', 'assq', 'assv',
'base64decode', 'base64encode', 'begin',
'caaar', 'caadr', 'caar', 'cadar', 'caddr', 'cadr', 'car',
'cdaar', 'cdadr', 'cdar', 'cddar', 'cdddr', 'cddr', 'cdr',
'cond', 'cons-array', 'define',
'eq?', 'equal?', 'eqv?', 'eval', 'exec', 'exit',
'fclose', 'fopen',
'if',
'lambda', 'length', 'let', 'let*', 'letrec', 'list', 'load',
'max', 'min',
'member', 'memq', 'memv',
'nil', 'not', 'null?', 'number?', 'number->string',
'or',
'pair?',
'quit', 'quote',
'set!', 'set-car!', 'set-cdr!',
'string->number', 'string-length', 'string?', 'string-append',
'substring',
'symbol?',
'read', 'reverse',
};
keyword 'Lang_Function' { #These are recommended by the standard.
'acos', 'asin', 'atan', 'cos', 'exp', 'log', 'sin', 'tan',
'sqrt',
};
#note: varables t, nil have been removed from the standard,
# but are here.
keyword 'Editor_Keywords' { #These are siod extras.
'%%%memref', '%%closure', '%%closure-code', '%%closure-env', '%%stack-limit',
'*after-gc*', '*args*', '*catch', '*env*', '*eval-history-ptr*', '*pi*',
'*plists*', '*throw', '*traced*',
'F_GETLK', 'F_SETLK', 'F_SETLKW',
'access-problem?', 'allocate-heap', 'apropos',
'aref', 'array->hexstr', 'aset', 'ash', 'atan2',
'benchmark-eval', 'benchmark-funcall1', 'benchmark-funcall2',
'bit-and', 'bit-not', 'bit-or', 'bit-xor', 'butlast', 'bytes-append',
'chdir', 'chmod', 'chown', 'closedir', 'copy-list',
'cpu-usage-limits', 'crypt', 'current-resource-usage',
'datlength', 'datref', 'decode-file-mode', 'delete-file', 'delq',
'encode-file-mode', 'encode-open-flags', 'endpwent', 'env-lookup', 'eof-val',
'errobj', 'error',
'fast-load', 'fast-print', 'fast-read', 'fast-save', 'fchmod',
'fflush', 'file-times', 'first', 'fmod', 'fnmatch', 'fork',
'fread', 'fseek', 'fstat', 'ftell', 'fwrite',
'gc', 'gc-info', 'gc-status', 'get', 'getc', 'getcwd', 'getenv', 'getgid',
'getgrgid', 'getpass', 'getpgrp', 'getpid', 'getppid', 'getpwent',
'getpwnam', 'getpwuid', 'gets', 'getuid', 'gmtime', 'hexstr->bytes',
'href', 'hset', 'html-encode',
'intern',
'kill',
'larg-default', 'last', 'last-c-error', 'lchown',
'link', 'lkey-default', 'load-so',
'localtime', 'lref-default', 'lstat',
'make-list', 'mapcar', 'md5-final', 'md5-init', 'md5-update',
'mkdatref', 'mkdir', 'mktime',
'nconc', 'nice', 'nreverse', 'nth',
'opendir', 'os-classification',
'parse-number', 'pclose', 'popen', 'pow',
'prin1', 'print', 'print-to-string', 'prog1',
'putc', 'putenv', 'putprop', 'puts',
'qsort',
'rand', 'random',
'read-from-string', 'readdir', 'readline', 'readlink',
'realtime', 'rename', 'require', 'require-so', 'rest',
'rld-pathnames', 'rmdir', 'runtime',
'save-forms', 'sdatref', 'set-eval-history',
'set-symbol-value!', 'setprop', 'setpwent', 'setuid',
'siod-lib', 'sleep', 'so-ext', 'srand', 'srandom', 'stat',
'strbreakup', 'strcat', 'strcmp', 'strcpy', 'strcspn', 'strftime',
'string-dimension', 'string-downcase',
'string-lessp', 'string-search', 'string-trim',
'string-trim-left', 'string-trim-right', 'string-upcase',
'strptime', 'strspn', 'subset', 'substring-equal?',
'swrite', 'sxhash', 'symbol-bound?', 'symbol-value',
'symbolconc', 'symlink', 'system',
't', 'the-environment', 'trace', 'trunc', 'typeof',
'unbreakupstr', 'ungetc', 'unix-ctime', 'unix-time', 'unix-time->strtime',
'unlink', 'untrace', 'url-decode', 'url-encode', 'utime',
'verbose',
'wait', 'while', 'writes',
};
h_state 0 { 'Normal' }
h_trans { 1, '-s', 'A-Za-z_%*', 'Normal' } #Keyword starters.
h_trans { 2, '<', ';', 'Comment' }
h_trans { 3, '>', '\'', 'Symbol' }
h_trans { 4, '>', '0x', 'HexNumber' }
h_trans { 5, '>s', '0-9', 'Number' }
h_trans { 6, '>', '"', 'String' }
h_trans { 0, 's', '()', 'Special' }
# h_trans { 0, '', ',', 'Punctuation' }
h_state 1 { 'Normal' }
h_trans { 0, '$', '', 'Normal' }
h_trans { 2, '<', ';', 'Comment'}
h_wtype { 0, 0, 0, '', '-a-zA-Z0-9_*%:?!>' } #Keyword internals
h_state 2 { 'Comment' }
h_trans { 0, '$', '', 'Comment' }
h_state 3 { 'Symbol' }
h_trans { 2, '<', ';', 'Comment'}
h_trans { 0, '>', ' ', 'Normal' }
h_trans { 0, '$', '', 'Normal' }
h_trans { 0, '>s', '()', 'Special' }
h_state 4 { 'HexNumber' }
h_trans { 0, '-S', '0-9A-Fa-f', 'Normal' }
h_trans { 0, '$', '', 'Normal' }
h_state 5 { 'Number' }
h_trans { 0, '-S', '0-9', 'Normal' }
h_trans { 0, '$', '', 'Normal' }
h_state 6 { 'String' }
h_trans { 0, '<', '"', 'String' }
h_trans { 6, 'q', '\\', 'String' } # 'q' "igores" next char.
}
mode SIOD: PLAIN { # siod Mode
FileNameRx = /\.\cscm$/;
HilitOn = 1;
Colorizer = 'SIOD';
AutoIndent = 1;
IndentMode = 'PLAIN';
MatchCase = 0; #scheme is case insensitive.
Trim = 1;
MultiLineHilit = 1;
AutoHilitParen = 1;
SaveFolds = 2; # save fold info at end of line
CommentStart = ' ;';
CommentEnd = '';
WordChars = '-A-Za-z0-9*%:?!>'; #first noticed in m_plain.fte
# RoutineRegexp = '(';
}
|