home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / fte0827.zip / config / m_sl.fte < prev    next >
Text File  |  1999-05-16  |  3KB  |  84 lines

  1. # SLang mode
  2.  
  3. colorize sl {
  4.     SyntaxParser = 'SIMPLE';
  5.  
  6.     color {
  7.         { 'Normal',        'Editor_Default' },
  8.         { 'Number',        'Lang_DecimalNumber' },
  9.         { 'HexNumber',     'Lang_HexNumber' },
  10.         { 'Punctuation',   'Lang_Punctuation' },
  11.         { 'String',        'Lang_String' },
  12.         { 'Comment',       'Lang_Comment' },
  13.         { 'Function',      'Lang_Function' },
  14.     };
  15.  
  16.     h_state 0 { 'Normal' }
  17.     h_trans { 1, '', '%' , 'Comment' }
  18.     h_trans { 2, '-s', 'a-zA-Z_', 'Normal' }
  19.     h_trans { 3, '<', '"', 'String' }
  20.     h_trans { 4, '<', '\'', 'String' }
  21.     h_trans { 5, '<', '0x', 'HexNumber' }
  22.     h_trans { 6, '<s', '0-9', 'Number' }
  23.     h_trans { 0, 'S', '_a-zA-Z0-9', 'Punctuation' }
  24.  
  25.     h_state 1 { 'Comment' }
  26.     h_trans { 0, '$', '', 'Normal' }
  27.  
  28.     h_state 2 { 'Normal' }
  29.     h_trans { 0, '$', '', 'Normal' }
  30.     h_wtype { 0, 0, 0, '', 'a-zA-Z0-9_' }
  31.  
  32.     h_state 3 { 'String' }
  33.     h_trans { 0, '>', '"', 'String' }
  34.     h_trans { 0, '$', '', 'String' }
  35.  
  36.     h_state 4 { 'String' }
  37.     h_trans { 0, '>', '\'', 'String' }
  38.     h_trans { 0, '$', '', 'String' }
  39.  
  40.     h_state 5 { 'HexNumber' }
  41.     h_trans { 0, '-S', '0-9A-Fa-f', 'Normal' }
  42.     h_trans { 0, '$', '', 'Normal' }
  43.  
  44.     h_state 6 { 'Number' }
  45.     h_trans { 0, '-S', '0-9', 'Normal' }
  46.     h_trans { 0, '$', '', 'Normal' }
  47.  
  48.     keyword 'Editor_Keywords' { # any missing ?
  49.         'and', 'or', 'not', 'xor', 'shl', 'shr',
  50.         'andelse', 'orelse',
  51.         'variable',
  52.         'if', 'else', '!if', 'switch', 'case',
  53.         'while', 'do', 'for', 'loop', 'forever', 'break', 'return', 'continue',
  54.         'define', 'return', 'EXIT_BLOCK',
  55.         'struct', 'typedef',
  56.         'ERROR_BLOCK'
  57.     };
  58. }
  59.  
  60. mode sl: PLAIN {      # SLang Mode
  61.     FileNameRx          = /\.\cSL$/;
  62.     HilitOn             = 1;
  63.     Colorizer           = 'sl';
  64.     AutoIndent          = 1;
  65.     IndentMode          = 'sl';
  66.     TabSize             = 3; # think twice before changing this, historically
  67.                              # it's been known to cause a mess in sources ;-)
  68.     SpaceTabs           = 1;
  69.     MatchCase           = 1;
  70.     Trim                = 1;
  71.     MultiLineHilit      = 1;
  72.     AutoHilitParen      = 1;
  73.  
  74.     RoutineRegexp       = '^define';
  75. #    RoutineRegexp       = /^\w[\w_:*&~]+[\w\\s_:*&~]@\(.*\){\s*\{}?\s*$/;
  76. #    RoutineRegexp       = /^define \w[\w_:*&~]+[\w\s_:*&~]@\([^;]*$/;
  77. #        RoutineRx      ^\w[\w_:*&]+[\w\s_:*&]@\(
  78. #        RoutineRx      ^{[a-zA-Z0-9_:*&]#\s*}+\(
  79.  
  80.     SaveFolds           = 2;      # save fold info at end of line
  81.     CommentStart        = ' %';
  82.     CommentEnd          = '';
  83. }
  84.