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
|
colorize MVSASM {
SyntaxParser = 'SIMPLE';
color {
{ 'Normal', 'Editor_Default' },
{ 'Number', 'Lang_DecimalNumber' },
{ 'HexNumber', 'Lang_HexNumber' },
{ 'Punctuation', 'Lang_Punctuation' },
{ 'String', 'Lang_String' },
{ 'Comment', 'Lang_Comment' },
{ 'CPreprocessor', 'Lang_Preprocessor' },
{ 'Function', 'Lang_Function' },
{ 'Label', 'Lang_Label' },
};
keyword 'Editor_Keywords' {
'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 = '';
}
|