File: m_mvsasm.fte

package info (click to toggle)
fte 0.46b5-4.2
  • links: PTS
  • area: main
  • in suites: slink
  • size: 2,844 kB
  • ctags: 5,183
  • sloc: cpp: 39,445; ansic: 2,415; perl: 567; makefile: 71; sh: 30
file content (60 lines) | stat: -rw-r--r-- 1,835 bytes parent folder | download | duplicates (4)
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
# need to add all assembler commands
colorize MVSASM {
    SyntaxParser = 'SIMPLE';
    
    color {
        { 'Normal',        '-7' },
        { 'Keyword',       '-F' },
        { 'Number',        '-D' },
        { 'HexNumber',     '-D' },
        { 'Punctuation',   '-3' },
        { 'String',        '-E' },
        { 'Comment',       '-6' },
        { 'CPreprocessor', '-A' },
        { 'Function',      '-B' },
        { 'Label',         '-C' },
    };

    keyword '-F' {
        'mov', 'push', 'pop', 'movzx', 'movsx',
        'shl', 'shr', 'and', 'or', 'xor', 'not',
        'add', 'sub', 'neg', 'mul', 'div', 'idiv', 'imul',
        'test', 'cmp',
        'inc', 'dec',
        'enter', 'leave',
    };

    h_state 0 { 'Normal' }
    h_trans { 1, '^', '*', 'Comment' }        # '*' at bol is COMMENT
    h_trans { 2, '^-S', ' ', 'Label' }        # word at bol is LABEL
    h_trans { 3, '-S', ' ', 'Normal' }        # word at non-bol is INSTRUCTION

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

    h_state 2 { 'Label' }          # first column is LABEL
    h_trans { 0, '$', '', 'Normal' }
    h_trans { 0, '-s', ' ', 'Label' }

    h_state 3 { 'Normal' }         # keywords in second column
    h_trans { 0, '$', '', 'Normal' }
    h_trans { 1, '-s', ' ', 'Comment' }
    h_wtype { 1, 1, 1, '', 'a-zA-Z_' }

    # keywords here or global

    h_state 4 { 'Normal' }         # eat non-keywords in second col
    h_trans { 0, '$', '', 'Normal' }          
    h_trans { 1, '-s', ' ', 'Comment' }
}

mode MVSASM: PLAIN {
    FileNameRx          = /\.\cMVSA$/;
    HilitOn             = 1;
    Colorizer           = 'MVSASM';
    AutoHilitParen      = 1;
    
    SaveFolds           = 2;      # save fold info at end of line
    CommentStart        = ' ;';
    CommentEnd          = '';
}