1object SyntAnal4: TLibSyntAnalyzer 2 Formats = < 3 item 4 DisplayName = 'Symbol' 5 Font.Charset = DEFAULT_CHARSET 6 Font.Color = clMaroon 7 Font.Height = -13 8 Font.Name = 'Courier New' 9 Font.Style = [fsBold] 10 end 11 item 12 DisplayName = 'Number' 13 Font.Charset = DEFAULT_CHARSET 14 Font.Color = clNavy 15 Font.Height = -13 16 Font.Name = 'Courier New' 17 Font.Style = [fsBold] 18 end 19 item 20 DisplayName = 'String' 21 Font.Charset = DEFAULT_CHARSET 22 Font.Color = clTeal 23 Font.Height = -13 24 Font.Name = 'Courier New' 25 Font.Style = [] 26 end 27 item 28 DisplayName = 'Comment' 29 Font.Charset = DEFAULT_CHARSET 30 Font.Color = clGray 31 Font.Height = -13 32 Font.Name = 'Courier New' 33 Font.Style = [fsItalic] 34 end 35 item 36 DisplayName = 'Id' 37 Font.Charset = DEFAULT_CHARSET 38 Font.Color = clBlack 39 Font.Height = -13 40 Font.Name = 'Courier New' 41 Font.Style = [] 42 end 43 item 44 DisplayName = 'Id keyword' 45 Font.Charset = DEFAULT_CHARSET 46 Font.Color = clBlack 47 Font.Height = -13 48 Font.Name = 'Courier New' 49 Font.Style = [fsBold] 50 end 51 item 52 DisplayName = 'Id special' 53 Font.Charset = DEFAULT_CHARSET 54 Font.Color = clOlive 55 Font.Height = -13 56 Font.Name = 'Courier New' 57 Font.Style = [] 58 end 59 item 60 DisplayName = 'Id types' 61 Font.Charset = DEFAULT_CHARSET 62 Font.Color = clPurple 63 Font.Height = -13 64 Font.Name = 'Courier New' 65 Font.Style = [] 66 end 67 item 68 DisplayName = 'Preprocessor' 69 Font.Charset = DEFAULT_CHARSET 70 Font.Color = clGreen 71 Font.Height = -13 72 Font.Name = 'Courier New' 73 Font.Style = [] 74 end 75 item 76 DisplayName = 'Asm BG' 77 Font.Charset = DEFAULT_CHARSET 78 Font.Color = clBlack 79 Font.Height = -13 80 Font.Name = 'Courier New' 81 Font.Style = [] 82 BgColor = clMoneyGreen 83 FormatType = ftBackGround 84 end> 85 TokenRules = < 86 item 87 DisplayName = 'String' 88 StyleName = 'String' 89 TokenType = 4 90 Expression = '"(\\"|\\\\|\\\n|.)*?("|$)' 91 ColumnFrom = 0 92 ColumnTo = 0 93 end 94 item 95 DisplayName = 'String in define' 96 StyleName = 'String' 97 TokenType = 4 98 Expression = '(?<=\#include\x20*)<.+?>' 99 ColumnFrom = 0 100 ColumnTo = 0 101 end 102 item 103 DisplayName = 'Id keyword' 104 StyleName = 'Id keyword' 105 TokenType = 7 106 Expression = '\b(catch|else|for|if|switch|while)\b' 107 ColumnFrom = 0 108 ColumnTo = 0 109 end 110 item 111 DisplayName = 'Id' 112 StyleName = 'Id' 113 TokenType = 2 114 Expression = '[a-z_]\w*' 115 ColumnFrom = 0 116 ColumnTo = 0 117 end 118 item 119 DisplayName = 'Hex Float' 120 StyleName = 'Number' 121 TokenType = 5 122 Expression = 123 '0x([\da-f][\da-f'#39']* \.)? [\da-f][\da-f'#39']* p [\+\-]? [\da-f][\da-' + 124 'f'#39']* |'#13#10'0x[\da-f][\da-f'#39']* \. [\da-f][\da-f'#39']*' 125 ColumnFrom = 0 126 ColumnTo = 0 127 end 128 item 129 DisplayName = 'Hex' 130 StyleName = 'Number' 131 TokenType = 5 132 Expression = '0x[0-9a-f'#39']+ [ul]* | 0b[01'#39']+ [ul]*' 133 ColumnFrom = 0 134 ColumnTo = 0 135 end 136 item 137 DisplayName = 'Float' 138 StyleName = 'Number' 139 TokenType = 5 140 Expression = 141 '\d[\d'#39']* \.? [\d'#39']* e[\+\-]? \d+ [Lf]? |'#13#10'\. [\d'#39']+ e[\+\-]? \d+' + 142 ' [Lf]? |'#13#10'\d[\d'#39']* \. (\d[\d'#39']*)? [Lf]? |'#13#10'\. \d[\d'#39']* [Lf]?' 143 ColumnFrom = 0 144 ColumnTo = 0 145 end 146 item 147 DisplayName = 'Integer' 148 StyleName = 'Number' 149 TokenType = 5 150 Expression = '\d[\d'#39']* [ulf]*' 151 ColumnFrom = 0 152 ColumnTo = 0 153 end 154 item 155 DisplayName = 'Directive' 156 StyleName = 'Preprocessor' 157 TokenType = 6 158 Expression = 159 '\#\x20*(define|undef|include|if|ifdef|ifndef|else|elif|endif|lin' + 160 'e|error|pragma)\b' 161 ColumnFrom = 0 162 ColumnTo = 0 163 end 164 item 165 DisplayName = 'Comment 1' 166 StyleName = 'Comment' 167 TokenType = 1 168 Expression = '(?s)/\*.*?(\*/|\Z)' 169 ColumnFrom = 0 170 ColumnTo = 0 171 end 172 item 173 DisplayName = 'Comment 2' 174 StyleName = 'Comment' 175 TokenType = 1 176 Expression = '//.*' 177 ColumnFrom = 0 178 ColumnTo = 0 179 end 180 item 181 DisplayName = 'Symbol ;' 182 StyleName = 'Symbol' 183 TokenType = 10 184 Expression = ';' 185 ColumnFrom = 0 186 ColumnTo = 0 187 end 188 item 189 DisplayName = 'Symbol {}' 190 StyleName = 'Symbol' 191 TokenType = 8 192 Expression = '[\{\}]' 193 ColumnFrom = 0 194 ColumnTo = 0 195 end 196 item 197 DisplayName = 'Symbol ()' 198 StyleName = 'Symbol' 199 TokenType = 9 200 Expression = '[\(\)]' 201 ColumnFrom = 0 202 ColumnTo = 0 203 end 204 item 205 DisplayName = 'Symbol' 206 StyleName = 'Symbol' 207 TokenType = 3 208 Expression = 209 '\[\[| \]\]| \.\.\.| ::{1,2} | [\[\],~\.\\\?]|'#13#10'[\-\+<>\|\&\^]{2}' + 210 '=? | \#{1,2}| <=>|'#13#10'[\+\-\*/&\|\^!<>=~%]=?' 211 ColumnFrom = 0 212 ColumnTo = 0 213 end 214 item 215 DisplayName = 'Char' 216 StyleName = 'String' 217 TokenType = 4 218 Expression = #39'.*?('#39'|$)' 219 ColumnFrom = 0 220 ColumnTo = 0 221 end> 222 BlockRules = < 223 item 224 DisplayName = 'keywords' 225 StyleName = 'Id keyword' 226 BlockType = btTagDetect 227 ConditionList = < 228 item 229 TagList.Strings = ( 230 'asm' 231 'break' 232 'case' 233 'catch' 234 'class' 235 'continue' 236 'default' 237 'delete' 238 'do' 239 'else' 240 'enum' 241 'for' 242 'goto' 243 'if' 244 'new' 245 'operator' 246 'return' 247 'sizeof' 248 'struct' 249 'switch' 250 'throw' 251 'try' 252 'union' 253 'uuid' 254 'while') 255 TokenTypes = 4 256 end> 257 HighlightPos = cpBound 258 IgnoreAsParent = False 259 end 260 item 261 DisplayName = 'keywords2' 262 StyleName = 'Id special' 263 BlockType = btTagDetect 264 ConditionList = < 265 item 266 TagList.Strings = ( 267 '__asm' 268 '__attribute' 269 '__attribute__' 270 '__automated' 271 '__cdecl' 272 '__classid' 273 '__closure' 274 '__clrcall' 275 '__declspec' 276 '__dispid' 277 '__except' 278 '__export' 279 '__fastcall' 280 '__finally' 281 '__import' 282 '__inline' 283 '__int64' 284 '__msfastcall' 285 '__msreturn' 286 '__pascal' 287 '__property' 288 '__published' 289 '__regcall' 290 '__stdcall' 291 '__thiscall' 292 '__try' 293 '__uuidof' 294 '_asm' 295 '_Atomic' 296 '_cdecl' 297 '_export' 298 '_fastcall' 299 '_import' 300 '_pascal' 301 '_stdcall' 302 'auto' 303 'cdecl' 304 'const' 305 'explicit' 306 'export' 307 'extern' 308 'friend' 309 'inline' 310 'mutable' 311 'pascal' 312 'private' 313 'protected' 314 'public' 315 'register' 316 'restrict' 317 'static' 318 'this' 319 'typedef' 320 'typeid' 321 'typename' 322 'virtual' 323 'volatile') 324 TokenTypes = 4 325 end> 326 HighlightPos = cpAny 327 IgnoreAsParent = False 328 end 329 item 330 DisplayName = 'types' 331 StyleName = 'Id types' 332 BlockType = btTagDetect 333 ConditionList = < 334 item 335 TagList.Strings = ( 336 'bool' 337 'char' 338 'double' 339 'false' 340 'float' 341 'int' 342 'long' 343 'null' 344 'NULL' 345 'short' 346 'signed' 347 'true' 348 'unsigned' 349 'void' 350 'wchar_t') 351 TokenTypes = 4 352 end> 353 HighlightPos = cpAny 354 IgnoreAsParent = False 355 end 356 item 357 DisplayName = 'func' 358 ConditionList = < 359 item 360 TagList.Strings = ( 361 '{') 362 TokenTypes = 256 363 end 364 item 365 CondType = tcSkip 366 TokenTypes = 2 367 end 368 item 369 TagList.Strings = ( 370 ')') 371 TokenTypes = 512 372 end 373 item 374 CondType = tcSkip 375 TokenTypes = 62 376 end 377 item 378 TagList.Strings = ( 379 '(') 380 TokenTypes = 512 381 end 382 item 383 CondType = tcSkip 384 TokenTypes = 2 385 end 386 item 387 TokenTypes = 4 388 end 389 item 390 CondType = tcSkip 391 TokenTypes = 10 392 end 393 item 394 TokenTypes = 4 395 end> 396 BlockEnd = '}' 397 NotCollapsed = True 398 NameFmt = '%sz-1' 399 RefToCondEnd = True 400 HighlightPos = cpBound 401 NoEndRule = True 402 TreeItemImage = 5 403 IgnoreAsParent = False 404 AutoCloseText = '}'#13#10 405 end 406 item 407 DisplayName = '{' 408 ConditionList = < 409 item 410 TagList.Strings = ( 411 '{') 412 TokenTypes = 256 413 end> 414 BlockEnd = '}' 415 DisplayInTree = False 416 HighlightPos = cpAny 417 DrawStaple = True 418 CollapseFmt = '{ ... }' 419 IgnoreAsParent = False 420 AutoCloseMode = acmCloseNearest 421 AutoCloseText = '}' 422 end 423 item 424 DisplayName = '}' 425 BlockType = btRangeEnd 426 ConditionList = < 427 item 428 TagList.Strings = ( 429 '}') 430 TokenTypes = 256 431 end> 432 HighlightPos = cpBound 433 IgnoreAsParent = False 434 end 435 item 436 DisplayName = 'struct' 437 ConditionList = < 438 item 439 TagList.Strings = ( 440 '{') 441 TokenTypes = 256 442 end 443 item 444 CondType = tcSkip 445 TokenTypes = 2 446 end 447 item 448 TokenTypes = 4 449 end 450 item 451 TagList.Strings = ( 452 'struct') 453 TokenTypes = 4 454 end> 455 NameFmt = '%s-1' 456 RefToCondEnd = True 457 HighlightPos = cpAny 458 NoEndRule = True 459 TreeItemImage = 3 460 IgnoreAsParent = False 461 end> 462 CodeTemplates = <> 463 SubAnalyzers = < 464 item 465 DisplayName = 'asm-string' 466 StyleName = 'Asm BG' 467 StartExpression = '\#asm\s*\(\s*"' 468 EndExpression = '"\)' 469 SyntAnalyzer = SyntAnal1 470 end 471 item 472 DisplayName = 'asm-endasm' 473 Enabled = False 474 StyleName = 'Preprocessor' 475 StartExpression = '\#asm' 476 EndExpression = '\#endasm' 477 SyntAnalyzer = SyntAnal1 478 end> 479 SampleText.Strings = ( 480 '/* Test */' 481 '#define sum(a, b) a+b' 482 '#include <some/path.h> ' 483 '#asm (" mov ax, F0h ")' 484 '' 485 'double a = {' 486 ' 20LU, ' 487 ' 0xF'#39'FF'#39'FFu' 488 ' 0xAC00,' 489 ' 0.123,' 490 ' 0b1010001,' 491 ' 0xabc00ull,' 492 ' -0.1f,' 493 ' 1'#39'000'#39'000.000'#39'001,' 494 ' 24e-5,' 495 ' 0.1E,' 496 ' 58.,' 497 ' 4e2,' 498 ' 123.456e-67,' 499 ' .1E4f,' 500 ' 0x10.1p0,' 501 '}; ' 502 '' 503 'static char* stdcall Init(void) {' 504 ' TestModDeinit(B64UTIL);' 505 ' return 0;' 506 '}' 507 '' 508 'void Test(char *Sender)' 509 '{' 510 ' int Number = 10 + '#39'D'#39' + "String\nEnd";' 511 ' for (i=0; i<5; i++) { ' 512 ' } ' 513 '}' 514 '' 515 'typedef struct HashTab {' 516 ' int Name;' 517 '}') 518 TokenTypeNames.Strings = ( 519 'Unknown' 520 'Comment' 521 'Id' 522 'Symbol' 523 'String' 524 'Number' 525 'Preprocessor' 526 'Id keyword' 527 'Symbol {}' 528 'Symbol ()' 529 'Symbol ;') 530 Extentions = 'c ch' 531 LexerName = 'C' 532 Notes.Strings = ( 533 'Based on original C lexer from EControl' 534 'Heavily reworked by Alexey (CudaText)') 535 LineComment = '//' 536 Charset = DEFAULT_CHARSET 537end 538