object SyntAnal5: 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 = '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 type'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clPurple
      Font.Height = -13
      Font.Name = 'Courier New'
      Font.Style = []
    end
    item
      DisplayName = 'Id special'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clOlive
      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 = '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 = clWindowText
      Font.Height = -13
      Font.Name = 'Courier New'
      Font.Style = []
      BgColor = 14938312
      FormatType = ftBackGround
    end>
  TokenRules = <
    item
      DisplayName = 'String'
      StyleName = 'String'
      TokenType = 4
      Expression = 'L?"(\\"|\\\\|.)*?("|$)'
      ColumnFrom = 0
      ColumnTo = 0
    end
    item
      DisplayName = 'String raw'
      StyleName = 'String'
      TokenType = 4
      Expression = 'R"\( .+? \)" |'#13#10'R"(.+?)\( .+? \)\1"'
      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 = 'Hex Float'
      StyleName = 'Number'
      TokenType = 5
      Expression = 
        '0x([\da-f][\da-f'#39']* \.)? [\da-f][\da-f'#39']* p [\+\-]? [\da-f][\da-' +
        'f'#39']* |'#13#10'0x[\da-f][\da-f'#39']* \. [\da-f][\da-f'#39']*'
      ColumnFrom = 0
      ColumnTo = 0
    end
    item
      DisplayName = 'Hex'
      StyleName = 'Number'
      TokenType = 5
      Expression = '0x[0-9a-f'#39']+ [ul]* | 0b[01'#39']+ [ul]*'
      ColumnFrom = 0
      ColumnTo = 0
    end
    item
      DisplayName = 'Float'
      StyleName = 'Number'
      TokenType = 5
      Expression = 
        '\d[\d'#39']* (\. [\d'#39']+)? e[\+\-]? \d+ f? |'#13#10'\. [\d'#39']+ e[\+\-]? \d+ ' +
        'f? |'#13#10'\d[\d'#39']* \. (\d[\d'#39']*)? f? |'#13#10'\. \d[\d'#39']* f?'
      ColumnFrom = 0
      ColumnTo = 0
    end
    item
      DisplayName = 'Integer'
      StyleName = 'Number'
      TokenType = 5
      Expression = '\d[\d'#39']* [ul]*'
      ColumnFrom = 0
      ColumnTo = 0
    end
    item
      DisplayName = 'Preprocessor'
      StyleName = 'Preprocessor'
      TokenType = 6
      Expression = '\#[\x20\x09]*\w+'
      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 = 13
      Expression = ';'
      ColumnFrom = 0
      ColumnTo = 0
    end
    item
      DisplayName = 'Symbol ->'
      StyleName = 'Symbol'
      TokenType = 12
      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 = 10
      Expression = '[\(\)]'
      ColumnFrom = 0
      ColumnTo = 0
    end
    item
      DisplayName = 'Symbol single'
      StyleName = 'Symbol'
      TokenType = 3
      Expression = '[\[\],\*/]'
      ColumnFrom = 0
      ColumnTo = 0
    end
    item
      DisplayName = 'Symbol'
      StyleName = 'Symbol'
      TokenType = 3
      Expression = '[\+\-=<>&\|\^\.!\?%\\:]+'
      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 = (
            '_Pragma'
            'and'
            'and_eq'
            'bitand'
            'bitor'
            'break'
            'case'
            'catch'
            'class'
            'compl'
            'continue'
            'default'
            'delete'
            'do'
            'else'
            'enum'
            'for'
            'goto'
            'if'
            'new'
            'not'
            'not_eq'
            'operator'
            'or'
            'or_eq'
            'return'
            'struct'
            'switch'
            'throw'
            'try'
            'union'
            'while'
            'xor'
            'xor_eq')
          TokenTypes = 4
        end>
      HighlightPos = cpBound
      IgnoreAsParent = False
    end
    item
      DisplayName = 'id keywords2'
      StyleName = 'Id special'
      BlockType = btTagDetect
      ConditionList = <
        item
          TagList.Strings = (
            '__attribute'
            '__attribute__'
            '__cdecl'
            '__clrcall'
            '__declspec'
            '__fastcall'
            '__regcall'
            '__restrict'
            '__restrict__'
            '__stdcall'
            '__thiscall'
            'alignas'
            'alignof'
            'const'
            'const_cast'
            'constexpr'
            'decltype'
            'dynamic_cast'
            'explicit'
            'export'
            'extern'
            'final'
            'friend'
            'inline'
            'mutable'
            'namespace'
            'noexcept'
            'nullptr'
            'override'
            'private'
            'protected'
            'public'
            'register'
            'reinterpret_cast'
            'restrict'
            'sizeof'
            'static'
            'static_assert'
            'static_cast'
            'template'
            'this'
            'thread_local'
            'typedef'
            'typeid'
            'typename'
            'using'
            'virtual'
            'volatile')
          TokenTypes = 4
        end>
      HighlightPos = cpAny
      IgnoreAsParent = False
    end
    item
      DisplayName = 'id types'
      StyleName = 'Id type'
      BlockType = btTagDetect
      ConditionList = <
        item
          TagList.Strings = (
            '__asm__'
            '_Bool'
            '_Complex'
            '_Imaginary'
            'asm'
            'auto'
            'bool'
            'char'
            'char16_t'
            'char32_t'
            'cin'
            'cout'
            'double'
            'false'
            'FALSE'
            'float'
            'int'
            'long'
            'NULL'
            'nullptr_t'
            'short'
            'signed'
            'string'
            'stringstream'
            'true'
            'TRUE'
            'uint16_t'
            'uint32_t'
            'unsigned'
            'vector'
            'void'
            'wchar_t')
          TokenTypes = 4
        end>
      HighlightPos = cpAny
      IgnoreAsParent = False
    end
    item
      DisplayName = 'class'
      ConditionList = <
        item
          TagList.Strings = (
            '{')
          TokenTypes = 256
        end
        item
          CondType = tcSkip
          TokenTypes = 2110
        end
        item
          TagList.Strings = (
            'class')
          TokenTypes = 4
        end>
      BlockEnd = '}'
      NameFmt = 'class %s-1~[{]1'
      RefToCondEnd = True
      HighlightPos = cpAny
      CancelNextRules = True
      TreeItemImage = 1
      IgnoreAsParent = False
    end
    item
      DisplayName = 'func :: ::'
      ConditionList = <
        item
          TagList.Strings = (
            ':'
            '{')
          TokenTypes = 264
        end
        item
          CondType = tcSkip
          TokenTypes = 70
        end
        item
          TagList.Strings = (
            ')')
          TokenTypes = 1024
        end
        item
          CondType = tcSkip
          TokenTypes = 574
        end
        item
          TagList.Strings = (
            '(')
          TokenTypes = 1024
        end
        item
          TokenTypes = 4
        end
        item
          TokenTypes = 512
        end
        item
          TokenTypes = 4
        end
        item
          TokenTypes = 512
        end
        item
          TokenTypes = 4
        end>
      BlockEnd = '}'
      NameFmt = '%s-4'
      GroupFmt = '%s0\%s-2'
      RefToCondEnd = True
      HighlightPos = cpAny
      CancelNextRules = True
      CollapseFmt = '%sz0...'
      TreeItemImage = 5
      TreeGroupImage = 1
      IgnoreAsParent = False
    end
    item
      DisplayName = 'func ::'
      ConditionList = <
        item
          TagList.Strings = (
            ':'
            '{')
          TokenTypes = 264
        end
        item
          CondType = tcSkip
          TokenTypes = 70
        end
        item
          TagList.Strings = (
            ')')
          TokenTypes = 1024
        end
        item
          CondType = tcSkip
          TokenTypes = 574
        end
        item
          TagList.Strings = (
            '(')
          TokenTypes = 1024
        end
        item
          TokenTypes = 4
        end
        item
          TokenTypes = 512
        end
        item
          TokenTypes = 4
        end>
      BlockEnd = '}'
      NameFmt = '%s-2'
      GroupFmt = '%s0'
      RefToCondEnd = True
      HighlightPos = cpBound
      CancelNextRules = True
      CollapseFmt = '%sz0...'
      TreeItemImage = 5
      TreeGroupImage = 1
      IgnoreAsParent = False
    end
    item
      DisplayName = 'func'
      ConditionList = <
        item
          TagList.Strings = (
            '{')
          TokenTypes = 256
        end
        item
          CondType = tcSkip
          TokenTypes = 70
        end
        item
          TagList.Strings = (
            ')')
          TokenTypes = 1024
        end
        item
          CondType = tcSkip
          TokenTypes = 574
        end
        item
          TagList.Strings = (
            '(')
          TokenTypes = 1024
        end
        item
          CondType = tcSkip
          TokenTypes = 2
        end
        item
          TokenTypes = 4
        end
        item
          TagList.Strings = (
            ';'
            ':'
            '}')
          CondType = tcNotEqual
          TokenTypes = 8456
        end>
      BlockOffset = -1
      BlockEnd = '}'
      NameFmt = '%s-1~[{]1'
      RefToCondEnd = True
      HighlightPos = cpBound
      CancelNextRules = True
      CollapseFmt = '%s-1~[{]1 ...'
      TreeItemImage = 5
      IgnoreAsParent = False
    end
    item
      DisplayName = 'typedef struct'
      ConditionList = <
        item
          TokenTypes = 4
        end
        item
          TagList.Strings = (
            '}')
          TokenTypes = 256
        end
        item
          CondType = tcSkip
          TokenTypes = 9790
        end
        item
          TagList.Strings = (
            '{')
          TokenTypes = 256
        end
        item
          CondType = tcSkip
          TokenTypes = 6
        end
        item
          TagList.Strings = (
            'struct')
          TokenTypes = 4
        end
        item
          TagList.Strings = (
            'typedef')
          TokenTypes = 4
        end>
      NameFmt = '%sz-1'
      RefToCondEnd = True
      HighlightPos = cpAny
      NoEndRule = True
      TreeItemImage = 3
      IgnoreAsParent = False
    end
    item
      DisplayName = '{'
      ConditionList = <
        item
          TagList.Strings = (
            '{')
          TokenTypes = 256
        end>
      BlockEnd = '}'
      DisplayInTree = False
      HighlightPos = cpAny
      DynSelectMin = True
      DrawStaple = True
      CollapseFmt = '{ ... %ez0'
      IgnoreAsParent = False
      AutoCloseText = '}'
    end
    item
      DisplayName = '}'
      BlockType = btRangeEnd
      ConditionList = <
        item
          TagList.Strings = (
            '}')
          TokenTypes = 256
        end>
      HighlightPos = cpBound
      IgnoreAsParent = False
    end
    item
      DisplayName = 'Block comment'
      Enabled = False
      BlockName = 'Block comment'
      NotParent = True
      AlwaysEnabled = True
      ConditionList = <
        item
          TokenTypes = 2
        end>
      BlockEnd = 'Block comment end'
      DisplayInTree = False
      HighlightPos = cpBound
      CollapseFmt = '/* ... */'
      IgnoreAsParent = False
    end
    item
      DisplayName = 'Block comment end'
      Enabled = False
      BlockName = 'Block comment'
      StrictParent = True
      AlwaysEnabled = True
      BlockType = btRangeEnd
      ConditionList = <
        item
          CondType = tcNotEqual
          TokenTypes = 2
        end>
      BlockOffset = 1
      HighlightPos = cpBound
      IgnoreAsParent = False
    end>
  CodeTemplates = <>
  SubAnalyzers = <
    item
      DisplayName = 'asm_string'
      Enabled = False
      StyleName = 'Asm BG'
      StartExpression = '\#\x20*asm\x20*\(\x20*"'
      EndExpression = '"\)'
      SyntAnalyzer = SyntAnal1
      IncludeBounds = True
    end>
  SampleText.Strings = (
    '/* Test */'
    '#define max(a, b) ((a > b) ? a : b)'
    '#  asm(" pop ax ");'
    's = "text\"text" + L"test" + name<CName>;'
    
      'n = 1e2 + 0.12e+2 + 0xA'#39'B + 0b11'#39'00 + 1'#39'12'#39'23 + 0.1'#39'2f + 0xF.Ap3' +
      ';  '
    ''
    'Id Template::getTemplate(const string &id) const { '
    '  return id;'
    '}'
    ''
    'double CNested1::CMonitor(MonitorIT* part) {'
    '}'
    ''
    'void CNested2::CMonitor::connectMonitorIT(MonitorIT* part) {'
    '  return this;'
    '}'
    ''
    
      'floatFlowInterface* CNested2::CMonitor::getItsFloatFlowInterface' +
      '() {'
    '  return this;'
    '}'
    ''
    'class CName1 {'
    '}'
    ' '
    'class CName2 : public NameB {'
    '    const int tot;'
    '    unsigned long fib(unsigned long n) {'
    '        return n < 2 ? n : fib(n - 1) + fib(n - 2);'
    '    }'
    '}'
    '      '
    'void __fastcall CForm->Button1Click(Sender: TObject) {'
    '}'
    ''
    'void main(int argc; char* argv) {'
    '}'
    ''
    'struct Books {'
    '   int   book_id;'
    '};'
    ''
    'typedef struct Name1'
    '{'
    #9'int flags;'
    '} Struct1;'
    ''
    'template <name T>'
    'struct somedata<IReader>{'
    '  IReader* val;'
    '  int val2;'
    '};')
  TokenTypeNames.Strings = (
    'Unknown'
    'Comment'
    'Id'
    'Symbol'
    'String'
    'Number'
    'Preprocessor'
    'Id keyword'
    'Symbol {}'
    'Symbol ::'
    'Symbol ()'
    'Generic param'
    'Symbol ->'
    'Symbol ;')
  Extentions = 'cpp cxx h hh hpp hxx inl cc cp c++ h++ inl ipp'
  LexerName = 'C++'
  Notes.Strings = (
    'Reworked C++ lexer by Alexey (CudaText)'
    'Notes:'
    
      '- rules "block comments" disabled, they missed up func rules a l' +
      'ittle'
    
      '- many token types "symbol ..." is for rules: so rules can skip ' +
      'most symbols but not all (; -> {} etc)')
  LineComment = '//'
  Charset = DEFAULT_CHARSET
end
