File: m_sl.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 (82 lines) | stat: -rw-r--r-- 2,589 bytes parent folder | download | duplicates (12)
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
# SLang mode

colorize sl {
    SyntaxParser = 'SIMPLE';

    color {
        { 'Normal',        'Editor_Default' },
        { 'Number',        'Lang_DecimalNumber' },
        { 'HexNumber',     'Lang_HexNumber' },
        { 'Punctuation',   'Lang_Punctuation' },
        { 'String',        'Lang_String' },
        { 'Comment',       'Lang_Comment' },
        { 'Function',      'Lang_Function' },
    };

    h_state 0 { 'Normal' }
    h_trans { 1, '', '%' , 'Comment' }
    h_trans { 2, '-s', 'a-zA-Z_', 'Normal' }
    h_trans { 3, '<', '"', 'String' }
    h_trans { 4, '<', '\'', 'String' }
    h_trans { 5, '<', '0x', 'HexNumber' }
    h_trans { 6, '<s', '0-9', 'Number' }
    h_trans { 0, 'S', '_a-zA-Z0-9', 'Punctuation' }

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

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

    h_state 3 { 'String' }
    h_trans { 0, '>', '"', 'String' }
    h_trans { 0, '$', '', 'String' }

    h_state 4 { 'String' }
    h_trans { 0, '>', '\'', 'String' }
    h_trans { 0, '$', '', 'String' }

    h_state 5 { 'HexNumber' }
    h_trans { 0, '-S', '0-9A-Fa-f', 'Normal' }
    h_trans { 0, '$', '', 'Normal' }

    h_state 6 { 'Number' }
    h_trans { 0, '-S', '0-9', 'Normal' }
    h_trans { 0, '$', '', 'Normal' }

    keyword 'Editor_Keywords' { # any missing ?
        'and', 'or', 'not', 'xor', 'shl', 'shr',
        'andelse', 'orelse',
        'variable',
        'if', 'else', '!if', 'switch', 'case',
        'while', 'do', 'for', 'loop', 'forever', 'break', 'return', 'continue',
        'define', 'return', 'EXIT_BLOCK',
        'struct', 'typedef',
        'ERROR_BLOCK'
    };
}

mode sl: PLAIN {      # SLang Mode
    FileNameRx          = /\.\cSL$/;
    HilitOn             = 1;
    Colorizer           = 'sl';
    AutoIndent          = 1;
    IndentMode          = 'sl';
    TabSize             = 3; # think twice before changing this, historically
                             # it's been known to cause a mess in sources ;-)
    MatchCase           = 1;
    Trim                = 1;
    MultiLineHilit      = 1;
    AutoHilitParen      = 1;

    RoutineRegexp       = '^define';
#    RoutineRegexp       = /^\w[\w_:*&~]+[\w\\s_:*&~]@\(.*\){\s*\{}?\s*$/;
#    RoutineRegexp       = /^define \w[\w_:*&~]+[\w\s_:*&~]@\([^;]*$/;
#        RoutineRx      ^\w[\w_:*&]+[\w\s_:*&]@\(
#        RoutineRx      ^{[a-zA-Z0-9_:*&]#\s*}+\(

    SaveFolds           = 2;      # save fold info at end of line
    CommentStart        = ' %';
    CommentEnd          = '';
}