File: m_tcl.fte

package info (click to toggle)
fte 0.50.2-1.2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 3,696 kB
  • ctags: 6,486
  • sloc: cpp: 48,178; ansic: 2,795; perl: 808; sh: 112; makefile: 106
file content (112 lines) | stat: -rw-r--r-- 3,723 bytes parent folder | download | duplicates (8)
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
#
# TCL keyword highlighting (initial version)
#
# Contributor: Wirawan Purwanto <wirawan0@softhome.net> [2003-01-22]
# Submitted to FTE community: 2003-05-20
#
# NOTE:
# All the keywords originally listed in this file were deleted: they
# were 100% WRONG! They were SH keywords!
#

colorize TCL {
    SyntaxParser = 'SIMPLE';
    
    color {
        { 'Normal',      'Editor_Default' },
        { 'Comment',     'Lang_Comment' },
        { 'String',      'Lang_String' },
        { 'Punctuation', 'Lang_Punctuation' },
        { 'Variable',    'Lang_Variable' },
        { 'Directive',   'Lang_Preprocessor' },
        { 'Special',     'Lang_Control' },
    };

    keyword 'Editor_Keywords' {
        # These keywords were taken from Tcl/Tk 8.03 electronic reference
        # (as compiled by Charles Todd, October 1998): only TCL keywords
        # are included here

        'after', 'append', 'array', 'binary', 'break', 'catch', 'cd',
        'clock', 'close', 'concat', 'continue', 'eof', 'error', 'eval',
        'exec', 'exit', 'expr', 'fblocked', 'fconfigure', 'fcopy', 'file',
        'fileevent', 'filename', 'flush', 'for', 'foreach', 'format',
        'gets', 'glob', 'global', 'history', 'if', 'incr', 'info',
        'interp', 'join', 'lappend', 'lindex', 'linsert', 'list',
        'llength', 'load', 'lrange', 'lreplace', 'lsearch', 'lsort',
        'namespace', 'open', 'package', 'pid', 'pkg_mkIndex', 'proc',
        'puts', 'pwd', 'read', 'regexp', 'regsub', 'rename', 'resource',
        'return', 'scan', 'seek', 'set', 'socket', 'source', 'split',
        'string', 'subst', 'switch', 'tell', 'time', 'trace', 'unset',
        'update', 'uplevel', 'upvar', 'variable', 'vwait', 'while',

#       Built-ins that require package:
	#'registry',  # on Windows only

#       Special commands that must be provided (or can be overridden) by
#       the user:
	'bgerror', 'unknown',

#       Obsoleted commands
        'case',

#       Not a command: don't highlight them!
	#'Http', 'Safe Base', 'Tcl', 'library',
    };

    h_state 0 { 'Normal' }
    h_trans { 1, '-s', 'a-zA-Z0-9_', 'Normal' }
    h_trans { 5, '<', '$', 'Variable' }
    h_trans { 6, '<', '-', 'Directive' }
    h_trans { 7, '<', '.', 'Special' }
    h_trans { 2, '<', '#', 'Comment' }
    h_trans { 0, '<', '\\\#', 'Normal' }
    h_trans { 0, '<', '\\\"', 'String' }
    h_trans { 3, '<', '"', 'String' }
    h_trans { 4, '<', '`', 'String' }
    h_trans { 0, 'S', 'a-zA-Z0-9_', 'Punctuation' }

    h_state 1 { 'Normal' }
    h_trans { 0, '$', '', 'Normal' }
    h_wtype { 0, 0, 0, '', 'a-zA-Z0-9_' }

    h_state 2 { 'Comment' }
    h_trans { 0, '$', '', 'Normal' }

    h_state 3 { 'String' }
    h_trans { 0, '>', '"', 'String' }
    h_trans { 3, 'qQ', '\\', 'String' }

    h_state 4 { 'String' }
    h_trans { 0, '>', '`', 'String' }
    h_trans { 4, 'qQ', '\\', 'String' }

    h_state 5 { 'Variable' }
    h_trans { 0, '$', '', 'Normal' }
    h_trans { 0, '-S',  'a-zA-Z0-9_', 'Normal' }

    h_state 6 { 'Directive' }
    h_trans { 0, '$', '', 'Normal' }
    h_trans { 0, '-S',  'a-zA-Z0-9_', 'Normal' }

    h_state 7 { 'Special' }
    h_trans { 0, '$', '', 'Normal' }
    h_trans { 0, '-S',  'a-zA-Z0-9_', 'Normal' }
}

mode TCL: PLAIN { # *sh
    FileNameRx          = /\.\ctcl$/;
    FirstLineRx         = /^\#\![^ ]*{{wish>}|{tclsh>}}/;
    HilitOn             = 1;
    Colorizer           = 'TCL';
    MultiLineHilit      = 1;
    AutoHilitParen      = 1;
    AutoIndent          = 1;
    Trim                = 1;
    IndentMode          = 'C';
    
    SaveFolds           = 2;      # save fold info at end of line
    CommentStart        = '#';
    CommentEnd          = '';
    RoutineRegexp       = /^proc +\w/;
}