object SyntAnal4: TLibSyntAnalyzer
  Formats = <
    item
      DisplayName = 'Symbol'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clMaroon
      Font.Height = -13
      Font.Name = 'Courier New'
      Font.Style = [fsBold]
    end
    item
      DisplayName = 'Number'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clNavy
      Font.Height = -13
      Font.Name = 'Courier New'
      Font.Style = [fsBold]
    end
    item
      DisplayName = 'String'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clTeal
      Font.Height = -13
      Font.Name = 'Courier New'
      Font.Style = []
    end
    item
      DisplayName = 'Comment'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -13
      Font.Name = 'Courier New'
      Font.Style = [fsItalic]
    end
    item
      DisplayName = 'Id'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Courier New'
      Font.Style = []
    end
    item
      DisplayName = 'Id keyword'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Courier New'
      Font.Style = [fsBold]
    end
    item
      DisplayName = 'Id special'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clOlive
      Font.Height = -13
      Font.Name = 'Courier New'
      Font.Style = []
    end
    item
      DisplayName = 'Id types'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clPurple
      Font.Height = -13
      Font.Name = 'Courier New'
      Font.Style = []
    end
    item
      DisplayName = 'Preprocessor'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGreen
      Font.Height = -13
      Font.Name = 'Courier New'
      Font.Style = []
    end
    item
      DisplayName = 'Asm BG'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Courier New'
      Font.Style = []
      BgColor = clMoneyGreen
      FormatType = ftBackGround
    end
    item
      DisplayName = 'Incorrect'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Courier New'
      Font.Style = []
      BorderTypeBottom = blSolid
      BorderColorBottom = clRed
    end>
  TokenRules = <
    item
      DisplayName = 'String'
      StyleName = 'String'
      TokenType = 4
      Expression = '"(\\.|.)*?("|$)'
      ColumnFrom = 0
      ColumnTo = 0
    end
    item
      DisplayName = 'String in define'
      StyleName = 'String'
      TokenType = 4
      Expression = '(?<=\#include\x20*)<.+?>'
      ColumnFrom = 0
      ColumnTo = 0
    end
    item
      DisplayName = 'Bad number suffix'
      StyleName = 'Incorrect'
      Expression = '(?<=[\d'#39'])[a-z_]\w*'
      ColumnFrom = 0
      ColumnTo = 0
    end
    item
      DisplayName = 'Id keyword'
      StyleName = 'Id keyword'
      TokenType = 7
      Expression = '\b(catch|else|for|if|switch|while)\b'
      ColumnFrom = 0
      ColumnTo = 0
    end
    item
      DisplayName = 'Id'
      StyleName = 'Id'
      TokenType = 2
      Expression = '[a-z_][\w\$]*'
      ColumnFrom = 0
      ColumnTo = 0
    end
    item
      DisplayName = 'Num hex float'
      StyleName = 'Number'
      TokenType = 5
      Expression = 
        '0x[\h'#39']* (\.[\h'#39']*)? p[\+\-]? \h[\h'#39']* |'#13#10'0x\h[\h'#39']* \. \h[' +
        '\h'#39']*'
      ColumnFrom = 0
      ColumnTo = 0
    end
    item
      DisplayName = 'Num hex'
      StyleName = 'Number'
      TokenType = 5
      Expression = '0x[\h'#39']+ [ul]* |'#13#10'0b[01'#39']+ [ul]*'
      ColumnFrom = 0
      ColumnTo = 0
    end
    item
      DisplayName = 'Num float'
      StyleName = 'Number'
      TokenType = 5
      Expression = 
        '\d[\d'#39']* (\.[\d'#39']*)? e[\+\-]? \d+ [Lf]? |'#13#10'\. [\d'#39']+ e[\+\-]? \d' +
        '+ [Lf]? |'#13#10'\d[\d'#39']* \. (\d[\d'#39']*)? [Lf]? |'#13#10'\. \d[\d'#39']* [Lf]?'
      ColumnFrom = 0
      ColumnTo = 0
    end
    item
      DisplayName = 'Num decimal'
      StyleName = 'Number'
      TokenType = 5
      Expression = '\d[\d'#39']* [ulf]*'
      ColumnFrom = 0
      ColumnTo = 0
    end
    item
      DisplayName = 'Directive'
      StyleName = 'Preprocessor'
      TokenType = 6
      Expression = 
        '\#\x20*(define|undef|include|if|ifdef|ifndef|else|elif|endif|lin' +
        'e|error|pragma)\b'
      ColumnFrom = 0
      ColumnTo = 0
    end
    item
      DisplayName = 'Comment 1'
      StyleName = 'Comment'
      TokenType = 1
      Expression = '(?s)/\*.*?(\*/|\Z)'
      ColumnFrom = 0
      ColumnTo = 0
    end
    item
      DisplayName = 'Comment 2'
      StyleName = 'Comment'
      TokenType = 1
      Expression = '//.*'
      ColumnFrom = 0
      ColumnTo = 0
    end
    item
      DisplayName = 'Symbol ;'
      StyleName = 'Symbol'
      TokenType = 10
      Expression = ';'
      ColumnFrom = 0
      ColumnTo = 0
    end
    item
      DisplayName = 'Symbol {}'
      StyleName = 'Symbol'
      TokenType = 8
      Expression = '[\{\}]'
      ColumnFrom = 0
      ColumnTo = 0
    end
    item
      DisplayName = 'Symbol ()'
      StyleName = 'Symbol'
      TokenType = 9
      Expression = '[\(\)]'
      ColumnFrom = 0
      ColumnTo = 0
    end
    item
      DisplayName = 'Symbol'
      StyleName = 'Symbol'
      TokenType = 3
      Expression = 
        '\[\[| \]\]| \.\.\.| ::{1,2} | [\[\],~\.\\\?]|'#13#10'[\-\+<>\|\&\^]{2}' +
        '=? | \#{1,2}| <=>|'#13#10'[\+\-\*/&\|\^!<>=~%]=?'
      ColumnFrom = 0
      ColumnTo = 0
    end
    item
      DisplayName = 'Char'
      StyleName = 'String'
      TokenType = 4
      Expression = #39'.*?('#39'|$)'
      ColumnFrom = 0
      ColumnTo = 0
    end>
  BlockRules = <
    item
      DisplayName = 'id keywords'
      StyleName = 'Id keyword'
      BlockType = btTagDetect
      ConditionList = <
        item
          TagList.Strings = (
            '__attribute'
            '__attribute__'
            '__declspec'
            '_Static_assert'
            '_Alignas'
            '_Alignof'
            'alignas'
            'alignof'
            'asm'
            'break'
            'case'
            'catch'
            'class'
            'continue'
            'default'
            'delete'
            'do'
            'else'
            'enum'
            'for'
            'goto'
            'if'
            'new'
            'operator'
            'return'
            'sizeof'
            'static_assert'
            'struct'
            'switch'
            'throw'
            'try'
            'typedef'
            'typeof'
            'typeof_unqual'
            'union'
            'uuid'
            'while')
          TokenTypes = 4
        end>
      HighlightPos = cpBound
      IgnoreAsParent = False
    end
    item
      DisplayName = 'id modifiers'
      StyleName = 'Id special'
      BlockType = btTagDetect
      ConditionList = <
        item
          TagList.Strings = (
            '__asm'
            '__automated'
            '__cdecl'
            '__classid'
            '__closure'
            '__clrcall'
            '__dispid'
            '__except'
            '__export'
            '__fastcall'
            '__finally'
            '__import'
            '__inline'
            '__int64'
            '__msfastcall'
            '__msreturn'
            '__pascal'
            '__property'
            '__published'
            '__regcall'
            '__restrict'
            '__restrict__'
            '__stdcall'
            '__thiscall'
            '__try'
            '__uuidof'
            '_asm'
            '_Atomic'
            '_cdecl'
            '_export'
            '_fastcall'
            '_import'
            '_Noreturn'
            '_pascal'
            '_stdcall'
            '_Thread_local'
            'cdecl'
            'const'
            'constexpr'
            'explicit'
            'export'
            'extern'
            'friend'
            'inline'
            'mutable'
            'noreturn'
            'pascal'
            'private'
            'protected'
            'public'
            'register'
            'restrict'
            'static'
            'this'
            'thread_local'
            'typeid'
            'typename'
            'virtual'
            'volatile')
          TokenTypes = 4
        end>
      HighlightPos = cpAny
      IgnoreAsParent = False
    end
    item
      DisplayName = 'id types'
      StyleName = 'Id types'
      BlockType = btTagDetect
      ConditionList = <
        item
          TagList.Strings = (
            '_BitInt'
            '_Bool'
            '_Complex'
            '_Decimal128'
            '_Decimal32'
            '_Decimal64'
            '_Generic'
            '_Imaginary'
            'auto'
            'bool'
            'char'
            'double'
            'false'
            'float'
            'int'
            'long'
            'null'
            'NULL'
            'nullptr'
            'short'
            'signed'
            'true'
            'unsigned'
            'void'
            'wchar_t')
          TokenTypes = 4
        end>
      HighlightPos = cpAny
      IgnoreAsParent = False
    end
    item
      DisplayName = 'func'
      ConditionList = <
        item
          TagList.Strings = (
            '{')
          TokenTypes = 256
        end
        item
          CondType = tcSkip
          TokenTypes = 2
        end
        item
          TagList.Strings = (
            ')')
          TokenTypes = 512
        end
        item
          CondType = tcSkip
          TokenTypes = 62
        end
        item
          TagList.Strings = (
            '(')
          TokenTypes = 512
        end
        item
          CondType = tcSkip
          TokenTypes = 2
        end
        item
          TokenTypes = 4
        end>
      BlockEnd = '}'
      NameFmt = '%s0~[)]'
      RefToCondEnd = True
      HighlightPos = cpBound
      CancelNextRules = True
      TreeItemImage = 5
      IgnoreAsParent = False
    end
    item
      DisplayName = 'struct'
      ConditionList = <
        item
          TagList.Strings = (
            '{')
          TokenTypes = 256
        end
        item
          CondType = tcSkip
          TokenTypes = 2
        end
        item
          TokenTypes = 4
        end
        item
          TagList.Strings = (
            'struct')
          TokenTypes = 4
        end>
      BlockEnd = '}'
      NameFmt = '%s-1'
      RefToCondEnd = True
      HighlightPos = cpAny
      CancelNextRules = True
      DrawStaple = True
      TreeItemImage = 4
      IgnoreAsParent = False
    end
    item
      DisplayName = '{'
      ConditionList = <
        item
          TagList.Strings = (
            '{')
          TokenTypes = 256
        end>
      BlockEnd = '}'
      DisplayInTree = False
      HighlightPos = cpAny
      DrawStaple = True
      CollapseFmt = '{ ... }'
      IgnoreAsParent = False
      AutoCloseMode = acmCloseNearest
      AutoCloseText = '}'
    end
    item
      DisplayName = '}'
      BlockType = btRangeEnd
      ConditionList = <
        item
          TagList.Strings = (
            '}')
          TokenTypes = 256
        end>
      HighlightPos = cpBound
      IgnoreAsParent = False
    end>
  CodeTemplates = <>
  SubAnalyzers = <
    item
      DisplayName = 'asm-string'
      StyleName = 'Asm BG'
      StartExpression = '\#asm\s*\(\s*"'
      EndExpression = '"\)'
      SyntAnalyzer = SyntAnal1
    end
    item
      DisplayName = 'asm-endasm'
      Enabled = False
      StyleName = 'Preprocessor'
      StartExpression = '\#asm'
      EndExpression = '\#endasm'
      SyntAnalyzer = SyntAnal1
    end>
  SampleText.Strings = (
    '/* Test */'
    '#define sum(a, b) a+b'
    '#include <some/path.h> '
    '#asm (" mov ax, F0h ")'
    ''
    'double a = {'
    '  20LU,              '
    '  0xF'#39'FF'#39'FFu'
    '  0xAC00,'
    '  0.123,'
    '  0b1010001,'
    '  0xabc00ull,'
    '  -0.1f,'
    '  1'#39'000'#39'000.000'#39'001,'
    '  24e-5,'
    '  0.1E,'
    '  58.,'
    '  4e2,'
    '  123.456e-67,'
    '  .1E4f,'
    '  0x10.1p0,'
    '};                   '
    ''
    'static char* stdcall Init(void) {'
    '  TestModDeinit(B64UTIL);'
    '  return 0;'
    '}'
    ''
    'void Test(char *Sender)'
    '{'
    '  int Number = 10 + '#39'D'#39' + "String\nEnd";'
    '  for (i=0; i<5; i++) { '
    '  } '
    '}'
    ''
    'typedef struct HashTab {'
    '   int Name;'
    '}')
  TokenTypeNames.Strings = (
    'Unknown'
    'Comment'
    'Id'
    'Symbol'
    'String'
    'Number'
    'Preprocessor'
    'Id keyword'
    'Symbol {}'
    'Symbol ()'
    'Symbol ;')
  Extentions = 'c ch'
  LexerName = 'C'
  Notes.Strings = (
    'Based on original C lexer from EControl'
    'Heavily reworked by Alexey Torgashin (CudaText)')
  RestartFromLineStart = True
  LineComment = '//'
  Charset = DEFAULT_CHARSET
end
