'// vim:ft=pascal' Comment.Single '\n\n' Text 'unit' Keyword ' ' Text 'YTools' Name ';' Operator '\n\n' Text '{===============================================================================\n\n cYcnus.YTools 1.0.3 Beta for Delphi 4+\n by licenser and Murphy\n\n ©2000-2003 by cYcnus\n visit www.cYcnus.de\n\n licenser@cYcnus.de (Heinz N. Gies)\n murphy@cYcnus.de (Kornelius Kalnbach)\n \n this unit is published under the terms of the GPL\n\n===============================================================================}' Comment.Multiline '\n\n' Text 'interface' Keyword '\n\n' Text 'uses' Keyword '\n ' Text 'Windows' Name ',' Operator ' ' Text 'SysUtils' Name ',' Operator ' ' Text 'Classes' Name ',' Operator ' ' Text 'YTypes' Name ';' Operator '\n\n' Text 'const' Keyword '\n ' Text 'BackSpace' Name ' ' Text '=' Operator ' ' Text '#8' Literal.String.Char ';' Operator '\n ' Text 'Tab' Name ' ' Text '=' Operator ' ' Text '#9' Literal.String.Char ';' Operator '\n ' Text 'LF' Name ' ' Text '=' Operator ' ' Text '#10' Literal.String.Char ';' Operator ' ' Text '//Line Feed' Comment.Single '\n ' Text 'CR' Name ' ' Text '=' Operator ' ' Text '#13' Literal.String.Char ';' Operator ' ' Text '//Carriage Return' Comment.Single '\n ' Text 'Space' Name ' ' Text '=' Operator ' ' Text '#32' Literal.String.Char ';' Operator '\n ' Text 'EOLChars' Name ' ' Text '=' Operator ' ' Text '[' Punctuation 'CR' Name ',' Operator ' ' Text 'LF' Name ']' Punctuation ';' Operator '\n' Text '{$IFNDEF VER140}' Comment.Multiline '\n ' Text 'sLineBreak' Name ' ' Text '=' Operator ' ' Text '#13' Literal.String.Char '#10' Literal.String.Char ';' Operator '\n ' Text 'SwitchChars' Name ' ' Text '=' Operator ' ' Text '[' Punctuation "'" Literal.String '/' Literal.String "'" Literal.String ',' Operator ' ' Text "'" Literal.String '-' Literal.String "'" Literal.String ']' Punctuation ';' Operator '\n' Text '{$ENDIF}' Comment.Multiline '\n ' Text 'EOL' Name ' ' Text '=' Operator ' ' Text 'sLineBreak' Name ';' Operator '\n ' Text 'MaxCard' Name ' ' Text '=' Operator ' ' Text 'High' Name.Builtin '(' Punctuation 'Cardinal' Keyword.Type ')' Punctuation ';' Operator '\n ' Text 'AllChars' Name ' ' Text '=' Operator ' ' Text '[' Punctuation '#0' Literal.String.Char '.' Operator '.' Operator '#255' Literal.String.Char ']' Punctuation ';' Operator '\n ' Text 'Alphabetical' Name ' ' Text '=' Operator ' ' Text '[' Punctuation "'" Literal.String 'A' Literal.String "'" Literal.String '.' Operator '.' Operator "'" Literal.String 'Z' Literal.String "'" Literal.String ',' Operator ' ' Text "'" Literal.String 'a' Literal.String "'" Literal.String '.' Operator '.' Operator "'" Literal.String 'z' Literal.String "'" Literal.String ']' Punctuation ';' Operator '\n ' Text 'DecimalChars' Name ' ' Text '=' Operator ' ' Text '[' Punctuation "'" Literal.String '0' Literal.String "'" Literal.String '.' Operator '.' Operator "'" Literal.String '9' Literal.String "'" Literal.String ']' Punctuation ';' Operator '\n ' Text 'AlphaNumerical' Name ' ' Text '=' Operator ' ' Text 'Alphabetical' Name ' ' Text '+' Operator ' ' Text 'DecimalChars' Name ';' Operator '\n ' Text 'StrangeChars' Name ' ' Text '=' Operator ' ' Text '[' Punctuation '#0' Literal.String.Char '.' Operator '.' Operator '#31' Literal.String.Char ',' Operator ' ' Text '#127' Literal.String.Char ',' Operator ' ' Text '#129' Literal.String.Char ',' Operator ' ' Text '#141' Literal.String.Char '.' Operator '.' Operator '#144' Literal.String.Char ',' Operator ' ' Text '#157' Literal.String.Char ',' Operator ' ' Text '#158' Literal.String.Char ']' Punctuation ';' Operator '\n\n ' Text 'HexadecimalChars' Name ' ' Text '=' Operator ' ' Text 'DecimalChars' Name ' ' Text '+' Operator ' ' Text '[' Punctuation "'" Literal.String 'A' Literal.String "'" Literal.String '.' Operator '.' Operator "'" Literal.String 'F' Literal.String "'" Literal.String ',' Operator ' ' Text "'" Literal.String 'a' Literal.String "'" Literal.String '.' Operator '.' Operator "'" Literal.String 'f' Literal.String "'" Literal.String ']' Punctuation ';' Operator '\n ' Text 'OctalChars' Name ' ' Text '=' Operator ' ' Text '[' Punctuation "'" Literal.String '0' Literal.String "'" Literal.String '.' Operator '.' Operator "'" Literal.String '7' Literal.String "'" Literal.String ']' Punctuation ';' Operator '\n ' Text 'BinaryChars' Name ' ' Text '=' Operator ' ' Text '[' Punctuation "'" Literal.String '0' Literal.String "'" Literal.String ',' Operator ' ' Text "'" Literal.String '1' Literal.String "'" Literal.String ']' Punctuation ';' Operator '\n\n ' Text 'QuoteChars' Name ' ' Text '=' Operator ' ' Text '[' Punctuation "'" Literal.String "''" Literal.String.Escape "'" Literal.String ',' Operator ' ' Text "'" Literal.String '"' Literal.String "'" Literal.String ']' Punctuation ';' Operator '\n ' Text 'WildCards' Name ' ' Text '=' Operator ' ' Text '[' Punctuation "'" Literal.String '*' Literal.String "'" Literal.String ',' Operator ' ' Text "'" Literal.String '?' Literal.String "'" Literal.String ']' Punctuation ';' Operator '\n ' Text 'FileNameEnemies' Name ' ' Text '=' Operator ' ' Text 'WildCards' Name ' ' Text '+' Operator ' ' Text '[' Punctuation "'" Literal.String '\\' Literal.String "'" Literal.String ',' Operator ' ' Text "'" Literal.String '/' Literal.String "'" Literal.String ',' Operator ' ' Text "'" Literal.String ':' Literal.String "'" Literal.String ',' Operator ' ' Text "'" Literal.String '<' Literal.String "'" Literal.String ',' Operator ' ' Text "'" Literal.String '>' Literal.String "'" Literal.String ',' Operator ' ' Text "'" Literal.String '|' Literal.String "'" Literal.String ']' Punctuation ';' Operator '\n\n ' Text 'HexChar' Name ':' Operator ' ' Text 'array' Keyword '[' Punctuation 'THex' Name ']' Punctuation ' ' Text 'of' Keyword ' ' Text 'Char' Keyword.Type ' ' Text '=' Operator ' ' Text '(' Punctuation '\n ' Text "'" Literal.String '0' Literal.String "'" Literal.String ',' Operator "'" Literal.String '1' Literal.String "'" Literal.String ',' Operator "'" Literal.String '2' Literal.String "'" Literal.String ',' Operator "'" Literal.String '3' Literal.String "'" Literal.String ',' Operator "'" Literal.String '4' Literal.String "'" Literal.String ',' Operator "'" Literal.String '5' Literal.String "'" Literal.String ',' Operator "'" Literal.String '6' Literal.String "'" Literal.String ',' Operator "'" Literal.String '7' Literal.String "'" Literal.String ',' Operator "'" Literal.String '8' Literal.String "'" Literal.String ',' Operator "'" Literal.String '9' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'A' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'B' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'C' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'D' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'E' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'F' Literal.String "'" Literal.String ')' Punctuation ';' Operator '\n ' Text 'LowerHexChar' Name ':' Operator ' ' Text 'array' Keyword '[' Punctuation 'THex' Name ']' Punctuation ' ' Text 'of' Keyword ' ' Text 'Char' Keyword.Type ' ' Text '=' Operator ' ' Text '(' Punctuation '\n ' Text "'" Literal.String '0' Literal.String "'" Literal.String ',' Operator "'" Literal.String '1' Literal.String "'" Literal.String ',' Operator "'" Literal.String '2' Literal.String "'" Literal.String ',' Operator "'" Literal.String '3' Literal.String "'" Literal.String ',' Operator "'" Literal.String '4' Literal.String "'" Literal.String ',' Operator "'" Literal.String '5' Literal.String "'" Literal.String ',' Operator "'" Literal.String '6' Literal.String "'" Literal.String ',' Operator "'" Literal.String '7' Literal.String "'" Literal.String ',' Operator "'" Literal.String '8' Literal.String "'" Literal.String ',' Operator "'" Literal.String '9' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'a' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'b' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'c' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'd' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'e' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'f' Literal.String "'" Literal.String ')' Punctuation ';' Operator '\n ' Text 'BaseNChar' Name ':' Operator ' ' Text 'array' Keyword '[' Punctuation 'TBaseN' Name ']' Punctuation ' ' Text 'of' Keyword ' ' Text 'Char' Keyword.Type ' ' Text '=' Operator ' ' Text '(' Punctuation '\n ' Text "'" Literal.String '0' Literal.String "'" Literal.String ',' Operator "'" Literal.String '1' Literal.String "'" Literal.String ',' Operator "'" Literal.String '2' Literal.String "'" Literal.String ',' Operator "'" Literal.String '3' Literal.String "'" Literal.String ',' Operator "'" Literal.String '4' Literal.String "'" Literal.String ',' Operator "'" Literal.String '5' Literal.String "'" Literal.String ',' Operator "'" Literal.String '6' Literal.String "'" Literal.String ',' Operator "'" Literal.String '7' Literal.String "'" Literal.String ',' Operator "'" Literal.String '8' Literal.String "'" Literal.String ',' Operator "'" Literal.String '9' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'A' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'B' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'C' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'D' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'E' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'F' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'G' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'H' Literal.String "'" Literal.String ',' Operator '\n ' Text "'" Literal.String 'I' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'J' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'K' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'L' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'M' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'N' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'O' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'P' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'Q' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'R' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'S' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'T' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'U' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'V' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'W' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'X' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'Y' Literal.String "'" Literal.String ',' Operator "'" Literal.String 'Z' Literal.String "'" Literal.String ')' Punctuation ';' Operator '\n\n ' Text 'cYcnusOverlayColor' Name ' ' Text '=' Operator ' ' Text '$050001' Literal.Number.Hex ';' Operator '\n\n ' Text 'faFindEveryFile' Name ' ' Text '=' Operator ' ' Text 'faReadOnly' Name ' ' Text '+' Operator ' ' Text 'faHidden' Name ' ' Text '+' Operator ' ' Text 'faSysFile' Name ' ' Text '+' Operator ' ' Text 'faArchive' Name ';' Operator '\n\n ' Text 'platWin9x' Name ' ' Text '=' Operator ' ' Text '[' Punctuation 'VER_PLATFORM_WIN32s' Name ',' Operator ' ' Text 'VER_PLATFORM_WIN32_WINDOWS' Name ']' Punctuation ';' Operator '\n\n\n' Text '{ Debugging }' Comment.Multiline '\n' Text 'procedure' Keyword ' ' Text 'ClearReport' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'ReportName' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ';' Operator '\n' Text 'procedure' Keyword ' ' Text 'Report' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'ReportName' Name ',' Operator ' ' Text 'Text' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ';' Operator '\n' Text 'procedure' Keyword ' ' Text 'ReportFmt' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'ReportName' Name ',' Operator ' ' Text 'Fmt' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'const' Keyword ' ' Text 'Args' Name ':' Operator ' ' Text 'array' Keyword ' ' Text 'of' Keyword ' ' Text 'const' Keyword ')' Punctuation ';' Operator '\n\n' Text '{ Params }' Comment.Multiline '\n' Text 'procedure' Keyword ' ' Text 'GetParams' Name.Function '(' Punctuation 'Strings' Name ':' Operator ' ' Text 'TStrings' Name ')' Punctuation ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'GetParams' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Separator' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String ' ' Literal.String "'" Literal.String ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'overload' Name ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'ParamNum' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'ParamPrefixNum' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Prefix' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'Param' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'ParamPrefix' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Prefix' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Switch' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Switch' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'const' Keyword ' ' Text 'PrefixChars' Name ':' Operator ' ' Text 'TCharSet' Name ' ' Text '=' Operator ' ' Text 'SwitchChars' Name ';' Operator '\n ' Text 'IgnoreCase' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'True' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'GetParam' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Prefix' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator ' ' Text 'const' Keyword ' ' Text 'Default' Keyword.Pseudo ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n' Text '{ Dirs & UserName}' Comment.Multiline '\n' Text 'function' Keyword ' ' Text 'GetMyDir' Name.Function '(' Punctuation 'FullPath' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'False' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'function' Keyword ' ' Text 'WinDir' Name.Function ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'function' Keyword ' ' Text 'SysDir' Name.Function ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'function' Keyword ' ' Text 'UserName' Name.Function ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n' Text '{ Strings & Chars}' Comment.Multiline '\n' Text 'function' Keyword ' ' Text 'FirstChar' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Char' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'LastChar' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Char' Keyword.Type ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'CharPos' Name.Function '(' Punctuation 'C' Name ':' Operator ' ' Text 'Char' Keyword.Type ';' Operator ' ' Text 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Offset' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'CharPos' Name.Function '(' Punctuation 'C' Name ':' Operator ' ' Text 'TCharSet' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Offset' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'CharPosR' Name.Function '(' Punctuation 'C' Name ':' Operator ' ' Text 'Char' Keyword.Type ';' Operator ' ' Text 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Offset' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text '-' Operator '1' Literal.Number.Integer ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'PosEx' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'SubStr' Name ',' Operator ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Offset' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'PosExText' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'SubStr' Name ',' Operator ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Offset' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'PosExAnsiText' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'SubStr' Name ',' Operator ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Offset' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'UntilChar' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Brake' Name ':' Operator ' ' Text 'Char' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'UntilChar' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Brake' Name ':' Operator ' ' Text 'TCharSet' Name ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'UntilLastChar' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Brake' Name ':' Operator ' ' Text 'Char' Keyword.Type ';' Operator '\n ' Text 'IgnoreNoBrake' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'True' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'FromChar' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Brake' Name ':' Operator ' ' Text 'Char' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'FromChar' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Brake' Name ':' Operator ' ' Text 'TCharSet' Name ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'FromLastChar' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Brake' Name ':' Operator ' ' Text 'Char' Keyword.Type ';' Operator '\n ' Text 'IgnoreNoBrake' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'False' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'BetweenChars' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Start' Name ',' Operator ' ' Text 'Finish' Name ':' Operator ' ' Text 'Char' Keyword.Type ';' Operator '\n ' Text 'Inclusive' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'False' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'UntilStr' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Brake' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'function' Keyword ' ' Text 'FromStr' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Brake' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'StringWrap' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Width' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'const' Keyword ' ' Text 'LineEnd' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text 'EOL' Name ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n' Text '{ Splitting & Combining }' Comment.Multiline '\n' Text 'function' Keyword ' ' Text 'Split' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ',' Operator ' ' Text 'Separator' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'IgnoreMultiSep' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'True' Keyword ';' Operator '\n ' Text 'MinCount' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ')' Punctuation ':' Operator ' ' Text 'TStrA' Name ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'procedure' Keyword ' ' Text 'Split' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ',' Operator ' ' Text 'Separator' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Strings' Name ':' Operator ' ' Text 'TStrings' Name ';' Operator '\n ' Text 'IgnoreMultiSep' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'True' Keyword ')' Punctuation ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'Split' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Separators' Name ':' Operator ' ' Text 'TCharSet' Name ';' Operator '\n ' Text 'IgnoreMultiSep' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'True' Keyword ';' Operator ' ' Text 'MinCount' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ')' Punctuation ':' Operator ' ' Text 'TStrA' Name ';' Operator ' ' Text 'overload' Name ';' Operator '\n\n' Text 'procedure' Keyword ' ' Text 'TileStr' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'BrakeStart' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'BrakeEnd' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n ' Text 'out' Name ' ' Text 'Left' Name ',' Operator ' ' Text 'Right' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Join' Name.Function '(' Punctuation 'Strings' Name ':' Operator ' ' Text 'TStrings' Name ';' Operator ' ' Text 'Separator' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String ' ' Literal.String "'" Literal.String ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'Join' Name.Function '(' Punctuation 'StrA' Name ':' Operator ' ' Text 'TStrA' Name ';' Operator ' ' Text 'Separator' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String ' ' Literal.String "'" Literal.String ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'overload' Name ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'MulStr' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Count' Name ':' Operator ' ' Text 'Integer' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n' Text '{ Strings ausrichten }' Comment.Multiline '\n' Text 'function' Keyword ' ' Text 'AlignR' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Width' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'Filler' Name ':' Operator ' ' Text 'Char' Keyword.Type ' ' Text '=' Operator ' ' Text "'" Literal.String ' ' Literal.String "'" Literal.String ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'function' Keyword ' ' Text 'MaxStr' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'MaxLen' Name ':' Operator ' ' Text 'Integer' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n' Text '{ Stringing }' Comment.Multiline '\n' Text 'function' Keyword ' ' Text 'TrimAll' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'ControlChar' Name.Function '(' Punctuation 'C' Name ':' Operator ' ' Text 'Char' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'FriendlyChar' Name.Function '(' Punctuation 'C' Name ':' Operator ' ' Text 'Char' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Char' Keyword.Type ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'FriendlyStr' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'FriendlyStr' Name.Function '(' Punctuation 'a' Name ':' Operator ' ' Text 'TByteA' Name ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'overload' Name ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Quote' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Quoter' Name ':' Operator ' ' Text 'Char' Keyword.Type ' ' Text '=' Operator ' ' Text "'" Literal.String '"' Literal.String "'" Literal.String ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'function' Keyword ' ' Text 'UnQuote' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'function' Keyword ' ' Text 'DeQuote' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'StrNumerus' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Value' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'const' Keyword ' ' Text 'Singular' Name ',' Operator ' ' Text 'Plural' Name ':' Operator ' ' Text 'string' Keyword ';' Operator '\n ' Text 'const' Keyword ' ' Text 'Zero' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String '0' Literal.String "'" Literal.String ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'MakeStr' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Items' Name ':' Operator ' ' Text 'array' Keyword ' ' Text 'of' Keyword ' ' Text 'const' Keyword ';' Operator ' ' Text 'Separator' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'procedure' Keyword ' ' Text 'ShowText' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Items' Name ':' Operator ' ' Text 'array' Keyword ' ' Text 'of' Keyword ' ' Text 'const' Keyword ';' Operator ' ' Text 'Separator' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ')' Punctuation ';' Operator '\n\n' Text '{ Delete }' Comment.Multiline '\n' Text 'function' Keyword ' ' Text 'DeleteChars' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'C' Name ':' Operator ' ' Text 'Char' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'DeleteChars' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'C' Name ':' Operator ' ' Text 'TCharSet' Name ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'ExtractChars' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'C' Name ':' Operator ' ' Text 'TCharSet' Name ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n' Text '{ Find }' Comment.Multiline '\n' Text 'function' Keyword ' ' Text 'CharCount' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'C' Name ':' Operator ' ' Text 'Char' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'CharIn' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'C' Name ':' Operator ' ' Text 'Char' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'CharIn' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'C' Name ':' Operator ' ' Text 'TCharSet' Name ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator ' ' Text 'overload' Name ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'StrAtPos' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Pos' Name.Builtin ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'const' Keyword ' ' Text 'Str' Name.Builtin ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'StrAtBegin' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ',' Operator ' ' Text 'Str' Name.Builtin ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'StrIn' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ',' Operator ' ' Text 'SubStr' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'StrIn' Name.Function '(' Punctuation 'A' Name ':' Operator ' ' Text 'TStrA' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'StrIn' Name.Function '(' Punctuation 'SL' Name ':' Operator ' ' Text 'TStrings' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'StrIndex' Name.Function '(' Punctuation 'A' Name ':' Operator ' ' Text 'TStrA' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'StrIndex' Name.Function '(' Punctuation 'SL' Name ':' Operator ' ' Text 'TStrings' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'overload' Name ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'TextAtPos' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Pos' Name.Builtin ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'const' Keyword ' ' Text 'Text' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'TextAtBegin' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ',' Operator ' ' Text 'Text' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'TextIn' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ',' Operator ' ' Text 'Text' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'TextIn' Name.Function '(' Punctuation 'A' Name ':' Operator ' ' Text 'TStrA' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'Text' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'TextIn' Name.Function '(' Punctuation 'SL' Name ':' Operator ' ' Text 'TStrings' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'Text' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'TextIndex' Name.Function '(' Punctuation 'A' Name ':' Operator ' ' Text 'TStrA' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'Text' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'TextIndex' Name.Function '(' Punctuation 'SL' Name ':' Operator ' ' Text 'TStrings' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'Text' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'overload' Name ';' Operator '\n\n' Text '{ Replace }' Comment.Multiline '\n' Text 'function' Keyword ' ' Text 'ReplaceChars' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Old' Name ',' Operator ' ' Text 'New' Keyword ':' Operator ' ' Text 'Char' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'ReplaceChars' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Old' Name ':' Operator ' ' Text 'TCharSet' Name ';' Operator ' ' Text 'New' Keyword ':' Operator ' ' Text 'Char' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'overload' Name ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Replace' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ',' Operator ' ' Text 'Old' Name ',' Operator ' ' Text 'New' Keyword ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n' Text '{ TStrings }' Comment.Multiline '\n' Text 'function' Keyword ' ' Text 'SLOfFile' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'TStringList' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'ContainsEmptyLines' Name.Function '(' Punctuation 'SL' Name ':' Operator ' ' Text 'TStrings' Name ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'procedure' Keyword ' ' Text 'DeleteEmptyLines' Name.Function '(' Punctuation 'SL' Name ':' Operator ' ' Text 'TStrings' Name ')' Punctuation ';' Operator '\n' Text 'procedure' Keyword ' ' Text 'DeleteCommentLines' Name.Function '(' Punctuation 'SL' Name ':' Operator ' ' Text 'TStrings' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'CommentSign' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String '//' Literal.String "'" Literal.String ')' Punctuation ';' Operator '\n' Text 'procedure' Keyword ' ' Text 'WriteSL' Name.Function '(' Punctuation 'Strings' Name ':' Operator ' ' Text 'TStrings' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'Prefix' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'const' Keyword ' ' Text 'Suffix' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ')' Punctuation ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'FindLine' Name.Function '(' Punctuation 'SL' Name ':' Operator ' ' Text 'TStrings' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n\n' Text 'procedure' Keyword ' ' Text 'QuickSortSL' Name.Function '(' Punctuation 'SL' Name ':' Operator ' ' Text 'TStringList' Name ')' Punctuation ';' Operator '\n\n' Text '{ TStrA }' Comment.Multiline '\n' Text 'function' Keyword ' ' Text 'IncStrA' Name.Function '(' Punctuation 'StrA' Name ':' Operator ' ' Text 'TStrA' Name ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n\n' Text '{ TByteA }' Comment.Multiline '\n' Text 'function' Keyword ' ' Text 'StrOfByteA' Name.Function '(' Punctuation 'a' Name ':' Operator ' ' Text 'TByteA' Name ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'function' Keyword ' ' Text 'ByteAOfStr' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'TByteA' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'ByteAOfInt' Name.Function '(' Punctuation 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'TByteA' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'IntOfByteA' Name.Function '(' Punctuation 'A' Name ':' Operator ' ' Text 'TByteA' Name ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'ByteAOfHex' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Hex' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'TByteA' Name ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'SameByteA' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'A' Name ',' Operator ' ' Text 'B' Name ':' Operator ' ' Text 'TByteA' Name ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'Reverse' Name.Function '(' Punctuation 'a' Name ':' Operator ' ' Text 'TByteA' Name ')' Punctuation ':' Operator ' ' Text 'TByteA' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'SaveByteA' Name.Function '(' Punctuation 'Data' Name ':' Operator ' ' Text 'TByteA' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Overwrite' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'True' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'LoadByteA' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'TByteA' Name ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Endian' Name.Function '(' Punctuation 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n\n' Text '{ Files }' Comment.Multiline '\n' Text 'function' Keyword ' ' Text 'SizeOfFile' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'FileEx' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'AllowFolders' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'False' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'LWPSolve' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Dir' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'function' Keyword ' ' Text 'LWPSlash' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Dir' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'ExtractDrive' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'function' Keyword ' ' Text 'ExtractPath' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'function' Keyword ' ' Text 'ExtractPrefix' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'function' Keyword ' ' Text 'ExtractSuffix' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'IsValidFileName' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'MakeValidFileName' Name.Function '(' Punctuation 'FileName' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'const' Keyword ' ' Text 'Default' Keyword.Pseudo ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String 'File' Literal.String "'" Literal.String ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n' Text '{ Converting }' Comment.Multiline '\n' Text 'function' Keyword ' ' Text 'IsValidInteger' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'IsValidCardinal' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'StrOfBool' Name.Function '(' Punctuation 'flag' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator ' ' Text 'const' Keyword ' ' Text 'TrueStr' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String 'True' Literal.String "'" Literal.String ';' Operator '\n ' Text 'const' Keyword ' ' Text 'FalseStr' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String 'False' Literal.String "'" Literal.String ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'function' Keyword ' ' Text 'StrOfInt' Name.Function '(' Punctuation 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'function' Keyword ' ' Text 'CardOfStr' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Cardinal' Keyword.Type ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'HexOrd' Name.Function '(' Punctuation 'Hex' Name ':' Operator ' ' Text 'Char' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'THex' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'ByteOfHex' Name.Function '(' Punctuation 'Hex' Name ':' Operator ' ' Text 'THexByteStr' Name ')' Punctuation ':' Operator ' ' Text 'Byte' Keyword.Type ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'DecOfHex' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Hex' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'function' Keyword ' ' Text 'HexOfByte' Name.Function '(' Punctuation 'b' Name ':' Operator ' ' Text 'Byte' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'THexByteStr' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'HexOfCard' Name.Function '(' Punctuation 'i' Name ':' Operator ' ' Text 'Cardinal' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'HexOfCard' Name.Function '(' Punctuation 'i' Name ':' Operator ' ' Text 'Cardinal' Keyword.Type ';' Operator ' ' Text 'Digits' Name ':' Operator ' ' Text 'Integer' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'overload' Name ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'PascalHexArray' Name.Function '(' Punctuation 'a' Name ':' Operator ' ' Text 'TByteA' Name ';' Operator ' ' Text 'Name' Keyword.Pseudo ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'HexOfByteA' Name.Function '(' Punctuation 'a' Name ':' Operator ' ' Text 'TByteA' Name ';' Operator ' ' Text 'Blocks' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text '1' Literal.Number.Integer ';' Operator '\n ' Text 'const' Keyword ' ' Text 'Splitter' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String ' ' Literal.String "'" Literal.String ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'function' Keyword ' ' Text 'BinOfByteA' Name.Function '(' Punctuation 'a' Name ':' Operator ' ' Text 'TByteA' Name ';' Operator ' ' Text 'Blocks' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text '4' Literal.Number.Integer ';' Operator '\n ' Text 'const' Keyword ' ' Text 'Splitter' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String ' ' Literal.String "'" Literal.String ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'CardOfHex' Name.Function '(' Punctuation 'Hex' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Cardinal' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'IntOfBin' Name.Function '(' Punctuation 'Bin' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Cardinal' Keyword.Type ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'BinOfIntFill' Name.Function '(' Punctuation 'n' Name ':' Operator ' ' Text 'cardinal' Keyword.Type ';' Operator ' ' Text 'MinCount' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text '8' Literal.Number.Integer ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'function' Keyword ' ' Text 'BinOfInt' Name.Function '(' Punctuation 'n' Name ':' Operator ' ' Text 'cardinal' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'BaseNOfInt' Name.Function '(' Punctuation 'I' Name ':' Operator ' ' Text 'Cardinal' Keyword.Type ';' Operator ' ' Text 'B' Name ':' Operator ' ' Text 'TBaseN' Name ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'function' Keyword ' ' Text 'IntOfBaseN' Name.Function '(' Punctuation 'V' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'B' Name ':' Operator ' ' Text 'TBaseN' Name ')' Punctuation ':' Operator ' ' Text 'Cardinal' Keyword.Type ';' Operator '\n\n' Text '{ Ranges }' Comment.Multiline '\n' Text 'function' Keyword ' ' Text 'KeepIn' Name.Function '(' Punctuation 'i' Name ',' Operator ' ' Text 'Bottom' Name ',' Operator ' ' Text 'Top' Name ':' Operator ' ' Text 'Variant' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Variant' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'InRange' Name.Function '(' Punctuation 'Value' Name ',' Operator ' ' Text 'Bottom' Name ',' Operator ' ' Text 'Top' Name ':' Operator ' ' Text 'Variant' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'InStrictRange' Name.Function '(' Punctuation 'Value' Name ',' Operator ' ' Text 'Bottom' Name ',' Operator ' ' Text 'Top' Name ':' Operator ' ' Text 'Variant' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'Min' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'A' Name ',' Operator ' ' Text 'B' Name ':' Operator ' ' Text 'Integer' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'Min' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'A' Name ':' Operator ' ' Text 'TIntA' Name ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'Max' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'A' Name ',' Operator ' ' Text 'B' Name ':' Operator ' ' Text 'Integer' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'Max' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'A' Name ':' Operator ' ' Text 'TIntA' Name ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'overload' Name ';' Operator '\n\n' Text 'const' Keyword '\n ' Text 'RangesSeparator' Name ' ' Text '=' Operator ' ' Text "'" Literal.String ',' Literal.String "'" Literal.String ';' Operator '\n ' Text 'RangeInnerSeparator' Name ' ' Text '=' Operator ' ' Text "'" Literal.String '-' Literal.String "'" Literal.String ';' Operator '\n ' Text 'RangeInfinite' Name ' ' Text '=' Operator ' ' Text "'" Literal.String '*' Literal.String "'" Literal.String ';' Operator '\n ' Text 'RangeSpecialChars' Name ' ' Text '=' Operator ' ' Text '[' Punctuation 'RangesSeparator' Name ',' Operator ' ' Text 'RangeInnerSeparator' Name ',' Operator ' ' Text 'RangeInfinite' Name ']' Punctuation ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'RangesOfStr' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'TRanges' Name ';' Operator '\n' Text 'function' Keyword ' ' Text 'InRanges' Name.Function '(' Punctuation 'Ranges' Name ':' Operator ' ' Text 'TRanges' Name ';' Operator ' ' Text 'TestValue' Name ':' Operator ' ' Text 'Cardinal' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Success' Name.Function '(' Punctuation 'Res' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'ResultOnSuccess' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text 'ERROR_SUCCESS' Name ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'Failure' Name.Function '(' Punctuation 'Res' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'ResultOnSuccess' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text 'ERROR_SUCCESS' Name ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'ExpandString' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n' Text '{ Files }' Comment.Multiline '\n' Text 'procedure' Keyword ' ' Text 'DeleteFiles' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Mask' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'ScanSubDirs' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'True' Keyword ';' Operator '\n ' Text 'Attributes' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text 'faFindEveryFile' Name ')' Punctuation ';' Operator '\n' Text 'procedure' Keyword ' ' Text 'FileNew' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ';' Operator '\n' Text 'function' Keyword ' ' Text 'DateTimeOfFileTime' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'FileTime' Name ':' Operator ' ' Text 'TFileTime' Name ')' Punctuation ':' Operator ' ' Text 'TDateTime' Keyword.Type ';' Operator '\n\n' Text '{ FileNames }' Comment.Multiline '\n' Text 'function' Keyword ' ' Text 'GetFileNew' Name.Function '(' Punctuation 'FileName' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'NoFloppyDrives' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'True' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n' Text '{ Finding Files }' Comment.Multiline '\n' Text 'function' Keyword ' ' Text 'FindAll' Name.Function '(' Punctuation 'Strings' Name ':' Operator ' ' Text 'TStrings' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'Mask' Name ':' Operator ' ' Text 'string' Keyword ';' Operator '\n ' Text 'ScanSubDirs' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'True' Keyword ';' Operator ' ' Text 'Attributes' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text 'faFindEveryFile' Name ';' Operator '\n ' Text 'FileReturn' Name ':' Operator ' ' Text 'TFileNameFunc' Name ' ' Text '=' Operator ' ' Text 'nil' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'FindAllFirst' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Mask' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'ScanSubDirs' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'True' Keyword ';' Operator '\n ' Text 'Attributes' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text 'faFindEveryFile' Name ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'FullOSInfo' Name.Function ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'function' Keyword ' ' Text 'Win32PlatformStr' Name.Function ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'function' Keyword ' ' Text 'Win9x' Name.Function ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'WinNT' Name.Function ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'Win2000' Name.Function ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'function' Keyword ' ' Text 'WinXP' Name.Function ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n\n' Text 'var' Keyword '\n ' Text 'MyDir' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'LastSuccessRes' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n \n' Text '{ Backward compatibility }' Comment.Multiline '\n' Text '{$IFNDEF VER130}' Comment.Multiline '\n' Text 'function' Keyword ' ' Text 'SameText' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S1' Name ',' Operator ' ' Text 'S2' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text '{$ENDIF}' Comment.Multiline '\n\n' Text 'implementation' Keyword '\n' Text '{$IFNDEF VER140}' Comment.Multiline '\n' Text 'uses' Keyword ' ' Text 'FileCtrl' Name ';' Operator '\n' Text '{$ENDIF}' Comment.Multiline '\n\n' Text '{$IFNDEF VER130}' Comment.Multiline '\n' Text 'function' Keyword ' ' Text 'SameText' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S1' Name ',' Operator ' ' Text 'S2' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'CompareText' Name.Builtin '(' Punctuation 'S1' Name ',' Operator ' ' Text 'S2' Name ')' Punctuation ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n' Text 'end' Keyword ';' Operator '\n' Text '{$ENDIF}' Comment.Multiline '\n\n' Text 'procedure' Keyword ' ' Text 'Report' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'ReportName' Name ',' Operator ' ' Text 'Text' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ';' Operator '\n' Text 'var' Keyword '\n ' Text 'F' Name ':' Operator ' ' Text 'TextFile' Keyword.Type ';' Operator '\n ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'FileName' Name ' ' Text ':' Operator '=' Operator ' ' Text 'MyDir' Name ' ' Text '+' Operator ' ' Text 'ReportName' Name ' ' Text '+' Operator ' ' Text "'" Literal.String '.rep' Literal.String "'" Literal.String ';' Operator '\n ' Text 'Assign' Name '(' Punctuation 'F' Name ',' Operator ' ' Text 'FileName' Name ')' Punctuation ';' Operator '\n ' Text 'try' Keyword '\n ' Text 'if' Keyword ' ' Text 'not' Keyword ' ' Text 'FileExists' Name.Builtin '(' Punctuation 'FileName' Name ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Rewrite' Name.Builtin '(' Punctuation 'F' Name ')' Punctuation '\n ' Text 'else' Keyword '\n ' Text 'Append' Name.Builtin '(' Punctuation 'F' Name ')' Punctuation ';' Operator '\n ' Text 'WriteLn' Name.Builtin '(' Punctuation 'F' Name ',' Operator ' ' Text 'Text' Name ')' Punctuation ';' Operator '\n ' Text 'finally' Keyword '\n ' Text 'Close' Name.Builtin '(' Punctuation 'F' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'procedure' Keyword ' ' Text 'ClearReport' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'ReportName' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ';' Operator '\n' Text 'var' Keyword '\n ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'FileName' Name ' ' Text ':' Operator '=' Operator ' ' Text 'MyDir' Name ' ' Text '+' Operator ' ' Text 'ReportName' Name ' ' Text '+' Operator ' ' Text "'" Literal.String '.rep' Literal.String "'" Literal.String ';' Operator '\n ' Text 'DeleteFile' Name.Builtin '(' Punctuation 'FileName' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'procedure' Keyword ' ' Text 'ReportFmt' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'ReportName' Name ',' Operator ' ' Text 'Fmt' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'const' Keyword ' ' Text 'Args' Name ':' Operator ' ' Text 'array' Keyword ' ' Text 'of' Keyword ' ' Text 'const' Keyword ')' Punctuation ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Report' Name '(' Punctuation 'ReportName' Name ',' Operator ' ' Text 'Format' Name.Builtin '(' Punctuation 'Fmt' Name ',' Operator ' ' Text 'Args' Name '))' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'procedure' Keyword ' ' Text 'GetParams' Name.Function '(' Punctuation 'Strings' Name ':' Operator ' ' Text 'TStrings' Name ')' Punctuation ';' Operator '\n' Text 'var' Keyword '\n ' Text 'P' Name ':' Operator ' ' Text 'PChar' Keyword.Type ';' Operator '\n ' Text 'Param' Name ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n ' Text 'function' Keyword ' ' Text 'GetParamStr' Name.Function '(' Punctuation 'var' Keyword ' ' Text 'P' Name ':' Operator ' ' Text 'PChar' Keyword.Type ';' Operator ' ' Text 'var' Keyword ' ' Text 'Param' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n ' Text 'var' Keyword '\n ' Text 'Quoted' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n ' Text 'begin' Keyword '\n ' Text 'Param' Name ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n\n ' Text 'repeat' Keyword '\n ' Text 'while' Keyword ' ' Text '(' Punctuation 'P' Name '[' Punctuation '0' Literal.Number.Integer ']' Punctuation ' ' Text '<' Operator '>' Operator ' ' Text '#0' Literal.String.Char ')' Punctuation ' ' Text 'and' Keyword ' ' Text '(' Punctuation 'P' Name '[' Punctuation '0' Literal.Number.Integer ']' Punctuation ' ' Text '<' Operator '=' Operator ' ' Text "'" Literal.String ' ' Literal.String "'" Literal.String ')' Punctuation ' ' Text 'do' Keyword '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'P' Name ')' Punctuation ';' Operator '\n\n ' Text 'Quoted' Name ' ' Text ':' Operator '=' Operator ' ' Text 'False' Keyword ';' Operator '\n ' Text 'while' Keyword ' ' Text 'P' Name '[' Punctuation '0' Literal.Number.Integer ']' Punctuation ' ' Text '<' Operator '>' Operator ' ' Text '#0' Literal.String.Char ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'P' Name '[' Punctuation '0' Literal.Number.Integer ']' Punctuation ' ' Text '=' Operator ' ' Text "'" Literal.String '"' Literal.String "'" Literal.String ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Quoted' Name ' ' Text ':' Operator '=' Operator ' ' Text 'not' Keyword ' ' Text 'Quoted' Name ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'P' Name ')' Punctuation ';' Operator '\n ' Text 'Continue' Keyword ';' Operator ' ' Text 'end' Keyword ';' Operator '\n ' Text 'if' Keyword ' ' Text '(' Punctuation 'P' Name '[' Punctuation '0' Literal.Number.Integer ']' Punctuation ' ' Text '<' Operator '=' Operator ' ' Text "'" Literal.String ' ' Literal.String "'" Literal.String ')' Punctuation ' ' Text 'and' Keyword ' ' Text 'not' Keyword ' ' Text 'Quoted' Name ' ' Text 'then' Keyword '\n ' Text 'Break' Keyword ';' Operator '\n ' Text 'Param' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Param' Name ' ' Text '+' Operator ' ' Text 'P' Name '[' Punctuation '0' Literal.Number.Integer ']' Punctuation ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'P' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'until' Keyword ' ' Text '(' Punctuation 'Param' Name ' ' Text '<' Operator '>' Operator ' ' Text "'" Literal.String "'" Literal.String ')' Punctuation ' ' Text 'or' Keyword ' ' Text '(' Punctuation 'P' Name '[' Punctuation '0' Literal.Number.Integer ']' Punctuation ' ' Text '=' Operator ' ' Text '#0' Literal.String.Char ')' Punctuation ';' Operator '\n\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Param' Name ' ' Text '<' Operator '>' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n' Text 'begin' Keyword '\n ' Text 'Strings' Name '.' Operator 'Clear' Name ';' Operator '\n ' Text 'P' Name ' ' Text ':' Operator '=' Operator ' ' Text 'GetCommandLine' Name ';' Operator '\n ' Text 'GetParamStr' Name '(' Punctuation 'P' Name ',' Operator ' ' Text 'Param' Name ')' Punctuation ';' Operator '\n ' Text 'while' Keyword ' ' Text 'GetParamStr' Name '(' Punctuation 'P' Name ',' Operator ' ' Text 'Param' Name ')' Punctuation ' ' Text 'do' Keyword '\n ' Text 'Strings' Name '.' Operator 'Add' Name '(' Punctuation 'Param' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'GetParams' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Separator' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String ' ' Literal.String "'" Literal.String ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'SL' Name ':' Operator ' ' Text 'TStringList' Name ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'SL' Name ' ' Text ':' Operator '=' Operator ' ' Text 'TStringList' Name '.' Operator 'Create' Name ';' Operator '\n ' Text 'GetParams' Name '(' Punctuation 'SL' Name ')' Punctuation ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Join' Name '(' Punctuation 'SL' Name ',' Operator ' ' Text 'Separator' Name ')' Punctuation ';' Operator '\n ' Text 'SL' Name '.' Operator 'Free' Name ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Switch' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Switch' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'const' Keyword ' ' Text 'PrefixChars' Name ':' Operator ' ' Text 'TCharSet' Name ' ' Text '=' Operator ' ' Text 'SwitchChars' Name ';' Operator '\n ' Text 'IgnoreCase' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'True' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text '//= SysUtils.FindCmdLineSwitch' Comment.Single '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n ' Text 's' Name ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'True' Keyword ';' Operator '\n\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'ParamCount' Name.Builtin ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 's' Name ' ' Text ':' Operator '=' Operator ' ' Text 'ParamStr' Name.Builtin '(' Punctuation 'i' Name ')' Punctuation ';' Operator '\n\n ' Text 'if' Keyword ' ' Text '(' Punctuation 's' Name ' ' Text '<' Operator '>' Operator ' ' Text "'" Literal.String "'" Literal.String ')' Punctuation ' ' Text 'and' Keyword ' ' Text '(' Punctuation 's' Name '[' Punctuation '1' Literal.Number.Integer ']' Punctuation ' ' Text 'in' Keyword ' ' Text 'PrefixChars' Name ')' Punctuation ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text "//i know that always s <> '', but this is saver" Comment.Single '\n ' Text 's' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 's' Name ',' Operator ' ' Text '2' Literal.Number.Integer ',' Operator ' ' Text 'MaxInt' Name ')' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text '(' Punctuation 's' Name ' ' Text '=' Operator ' ' Text 'Switch' Name ')' Punctuation ' ' Text 'or' Keyword ' ' Text '(' Punctuation 'IgnoreCase' Name ' ' Text 'and' Keyword ' ' Text '(' Punctuation '0' Literal.Number.Integer '=' Operator 'AnsiCompareText' Name.Builtin '(' Punctuation 's' Name ',' Operator ' ' Text 'Switch' Name ')))' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'False' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'ParamNum' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'for' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'ParamCount' Name.Builtin ' ' Text 'do' Keyword '\n ' Text 'if' Keyword ' ' Text '0' Literal.Number.Integer '=' Operator 'AnsiCompareText' Name.Builtin '(' Punctuation 'ParamStr' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation ',' Operator ' ' Text 'S' Name ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'ParamPrefixNum' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Prefix' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'Len' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Len' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'Prefix' Name ')' Punctuation ';' Operator '\n ' Text 'for' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'ParamCount' Name.Builtin ' ' Text 'do' Keyword '\n ' Text 'if' Keyword ' ' Text '0' Literal.Number.Integer '=' Operator 'AnsiCompareText' Name.Builtin '(' Punctuation 'Copy' Name.Builtin '(' Punctuation 'ParamStr' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation ',' Operator ' ' Text '1' Literal.Number.Integer ',' Operator ' ' Text 'Len' Name ')' Punctuation ',' Operator ' ' Text 'Prefix' Name ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Param' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'ParamNum' Name '(' Punctuation 'S' Name ')' Punctuation ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'ParamPrefix' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Prefix' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'ParamPrefixNum' Name '(' Punctuation 'Prefix' Name ')' Punctuation ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'GetParam' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Prefix' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator ' ' Text 'const' Keyword ' ' Text 'Default' Keyword.Pseudo ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Default' Keyword.Pseudo ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'Prefix' Name ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'ParamStr' Name.Builtin '(' Punctuation '1' Literal.Number.Integer ')' Punctuation ';' Operator '\n ' Text 'Exit' Keyword ';' Operator ' ' Text 'end' Keyword ';' Operator '\n\n ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text 'ParamPrefixNum' Name '(' Punctuation 'Prefix' Name ')' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'i' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'ParamStr' Name.Builtin '(' Punctuation 'i' Name ')' Punctuation ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'Prefix' Name ')' Punctuation ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer ',' Operator ' ' Text 'MaxInt' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'GetMyDir' Name.Function '(' Punctuation 'FullPath' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'False' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'Buffer' Name ':' Operator ' ' Text 'array' Keyword '[' Punctuation '0' Literal.Number.Integer '.' Operator '.' Operator '260' Literal.Number.Integer ']' Punctuation ' ' Text 'of' Keyword ' ' Text 'Char' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'SetString' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ',' Operator ' ' Text 'Buffer' Name ',' Operator ' ' Text 'GetModuleFileName' Name.Builtin '(' Punctuation '0' Literal.Number.Integer ',' Operator ' ' Text 'Buffer' Name ',' Operator ' ' Text 'SizeOf' Name.Builtin '(' Punctuation 'Buffer' Name ')))' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'FullPath' Name ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'GetFileNew' Name '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'ExtractPath' Name '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'WinDir' Name.Function ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'Res' Name ':' Operator ' ' Text 'PChar' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String '\\' Literal.String "'" Literal.String ';' Operator '\n ' Text 'GetMem' Name.Builtin '(' Punctuation 'Res' Name ',' Operator ' ' Text 'MAX_PATH' Name ')' Punctuation ';' Operator '\n ' Text 'GetWindowsDirectory' Name '(' Punctuation 'Res' Name ',' Operator ' ' Text 'MAX_PATH' Name ')' Punctuation ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Res' Name ' ' Text '+' Operator ' ' Text "'" Literal.String '\\' Literal.String "'" Literal.String ';' Operator '\n ' Text 'FreeMem' Name.Builtin '(' Punctuation 'Res' Name ',' Operator ' ' Text 'MAX_PATH' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'SysDir' Name.Function ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'Res' Name ':' Operator ' ' Text 'PChar' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String '\\' Literal.String "'" Literal.String ';' Operator '\n ' Text 'GetMem' Name.Builtin '(' Punctuation 'Res' Name ',' Operator ' ' Text 'MAX_PATH' Name ')' Punctuation ';' Operator '\n ' Text 'GetSystemDirectory' Name '(' Punctuation 'Res' Name ',' Operator ' ' Text 'MAX_PATH' Name ')' Punctuation ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Res' Name ' ' Text '+' Operator ' ' Text "'" Literal.String '\\' Literal.String "'" Literal.String ';' Operator '\n ' Text 'FreeMem' Name.Builtin '(' Punctuation 'Res' Name ',' Operator ' ' Text 'MAX_PATH' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'UserName' Name.Function ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'Len' Name ':' Operator ' ' Text 'Cardinal' Keyword.Type ';' Operator '\n ' Text 'Res' Name ':' Operator ' ' Text 'PChar' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'GetMem' Name.Builtin '(' Punctuation 'Res' Name ',' Operator ' ' Text 'MAX_PATH' Name ')' Punctuation ';' Operator '\n ' Text 'Len' Name ' ' Text ':' Operator '=' Operator ' ' Text 'MAX_PATH' Name ';' Operator '\n ' Text 'GetUserName' Name '(' Punctuation 'Res' Name ',' Operator ' ' Text 'Len' Name ')' Punctuation ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Res' Name ';' Operator '\n ' Text 'FreeMem' Name.Builtin '(' Punctuation 'Res' Name ',' Operator ' ' Text 'MAX_PATH' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'FirstChar' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Char' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 's' Name ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '#0' Literal.String.Char '\n ' Text 'else' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 's' Name '[' Punctuation '1' Literal.Number.Integer ']' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'LastChar' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Char' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 's' Name ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '#0' Literal.String.Char '\n ' Text 'else' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 's' Name '[' Punctuation 'Length' Name.Builtin '(' Punctuation 's' Name ')]' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'CharPos' Name.Function '(' Punctuation 'C' Name ':' Operator ' ' Text 'Char' Keyword.Type ';' Operator ' ' Text 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Offset' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'MaxPosToSearch' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Offset' Name ';' Operator '\n ' Text 'MaxPosToSearch' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ';' Operator '\n\n ' Text 'while' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '<' Operator '=' Operator ' ' Text 'MaxPosToSearch' Name ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'S' Name '[' Punctuation 'Result' Name.Builtin.Pseudo ']' Punctuation ' ' Text '=' Operator ' ' Text 'C' Name ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'CharPos' Name.Function '(' Punctuation 'C' Name ':' Operator ' ' Text 'TCharSet' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Offset' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'MaxPosToSearch' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Offset' Name ';' Operator '\n ' Text 'MaxPosToSearch' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ';' Operator '\n\n ' Text 'while' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '<' Operator '=' Operator ' ' Text 'MaxPosToSearch' Name ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'S' Name '[' Punctuation 'Result' Name.Builtin.Pseudo ']' Punctuation ' ' Text 'in' Keyword ' ' Text 'C' Name ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'CharPosR' Name.Function '(' Punctuation 'C' Name ':' Operator ' ' Text 'Char' Keyword.Type ';' Operator ' ' Text 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Offset' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text '-' Operator '1' Literal.Number.Integer ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'Offset' Name ' ' Text '<' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer ' ' Text '-' Operator ' ' Text 'Offset' Name '\n ' Text 'else' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Offset' Name ';' Operator '\n ' Text 'if' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '>' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ';' Operator '\n\n ' Text 'while' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'S' Name '[' Punctuation 'Result' Name.Builtin.Pseudo ']' Punctuation ' ' Text '=' Operator ' ' Text 'C' Name ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'Dec' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'PosEx' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'SubStr' Name ',' Operator ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Offset' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'MaxPosToSearch' Name ',' Operator ' ' Text 'LenSubStr' Name ',' Operator ' ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'SubStr' Name ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n ' Text 'Exit' Keyword ';' Operator ' ' Text 'end' Keyword ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'Offset' Name ' ' Text '<' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer '\n ' Text 'else' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Offset' Name ';' Operator '\n\n ' Text 'LenSubStr' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'SubStr' Name ')' Punctuation ';' Operator '\n ' Text 'MaxPosToSearch' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ' ' Text '-' Operator ' ' Text 'LenSubStr' Name ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer ';' Operator '\n\n ' Text 'while' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '<' Operator '=' Operator ' ' Text 'MaxPosToSearch' Name ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'S' Name '[' Punctuation 'Result' Name.Builtin.Pseudo ']' Punctuation ' ' Text '=' Operator ' ' Text 'SubStr' Name '[' Punctuation '1' Literal.Number.Integer ']' Punctuation ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ';' Operator '\n\n ' Text 'while' Keyword ' ' Text '(' Punctuation 'i' Name ' ' Text '<' Operator ' ' Text 'LenSubStr' Name ')' Punctuation '\n ' Text 'and' Keyword ' ' Text '(' Punctuation 'S' Name '[' Punctuation 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'i' Name ']' Punctuation ' ' Text '=' Operator ' ' Text 'SubStr' Name '[' Punctuation 'i' Name ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer '])' Punctuation ' ' Text 'do' Keyword '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'i' Name ')' Punctuation ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'i' Name ' ' Text '=' Operator ' ' Text 'LenSubStr' Name ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'PosExText' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'SubStr' Name ',' Operator ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Offset' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'MaxPosToSearch' Name ',' Operator ' ' Text 'LenSubStr' Name ',' Operator ' ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n\n ' Text 'function' Keyword ' ' Text 'SameChar' Name.Function '(' Punctuation 'a' Name ',' Operator ' ' Text 'b' Name ':' Operator ' ' Text 'Char' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'UpCase' Name.Builtin '(' Punctuation 'a' Name ')' Punctuation ' ' Text '=' Operator ' ' Text 'UpCase' Name.Builtin '(' Punctuation 'b' Name ')' Punctuation '\n ' Text 'end' Keyword ';' Operator '\n\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'SubStr' Name ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n ' Text 'Exit' Keyword ';' Operator ' ' Text 'end' Keyword ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'Offset' Name ' ' Text '<' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer '\n ' Text 'else' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Offset' Name ';' Operator '\n\n ' Text 'LenSubStr' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'SubStr' Name ')' Punctuation ';' Operator '\n ' Text 'MaxPosToSearch' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ' ' Text '-' Operator ' ' Text 'LenSubStr' Name ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer ';' Operator '\n\n ' Text 'while' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '<' Operator '=' Operator ' ' Text 'MaxPosToSearch' Name ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'SameChar' Name '(' Punctuation 'S' Name '[' Punctuation 'Result' Name.Builtin.Pseudo ']' Punctuation ',' Operator ' ' Text 'SubStr' Name '[' Punctuation '1' Literal.Number.Integer '])' Punctuation ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ';' Operator '\n\n ' Text 'while' Keyword ' ' Text '(' Punctuation 'i' Name ' ' Text '<' Operator ' ' Text 'LenSubStr' Name ')' Punctuation '\n ' Text 'and' Keyword ' ' Text '(' Punctuation 'SameChar' Name '(' Punctuation 'S' Name '[' Punctuation 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'i' Name ']' Punctuation ',' Operator ' ' Text 'SubStr' Name '[' Punctuation 'i' Name ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer ']))' Punctuation ' ' Text 'do' Keyword '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'i' Name ')' Punctuation ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'i' Name ' ' Text '=' Operator ' ' Text 'LenSubStr' Name ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'PosExAnsiText' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'SubStr' Name ',' Operator ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Offset' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'MaxPosToSearch' Name ',' Operator ' ' Text 'LenSubStr' Name ',' Operator ' ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n\n ' Text 'function' Keyword ' ' Text 'SameChar' Name.Function '(' Punctuation 'a' Name ',' Operator ' ' Text 'b' Name ':' Operator ' ' Text 'Char' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'CharLower' Name '(' Punctuation 'PChar' Keyword.Type '(' Punctuation 'a' Name '))' Punctuation ' ' Text '=' Operator ' ' Text 'CharLower' Name '(' Punctuation 'PChar' Keyword.Type '(' Punctuation 'b' Name '))' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'SubStr' Name ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n ' Text 'Exit' Keyword ';' Operator ' ' Text 'end' Keyword ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'Offset' Name ' ' Text '<' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer '\n ' Text 'else' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Offset' Name ';' Operator '\n\n ' Text 'LenSubStr' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'SubStr' Name ')' Punctuation ';' Operator '\n ' Text 'MaxPosToSearch' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ' ' Text '-' Operator ' ' Text 'LenSubStr' Name ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer ';' Operator '\n\n ' Text 'while' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '<' Operator '=' Operator ' ' Text 'MaxPosToSearch' Name ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'SameChar' Name '(' Punctuation 'S' Name '[' Punctuation 'Result' Name.Builtin.Pseudo ']' Punctuation ',' Operator ' ' Text 'SubStr' Name '[' Punctuation '1' Literal.Number.Integer '])' Punctuation ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ';' Operator '\n\n ' Text 'while' Keyword ' ' Text '(' Punctuation 'i' Name ' ' Text '<' Operator ' ' Text 'LenSubStr' Name ')' Punctuation '\n ' Text 'and' Keyword ' ' Text '(' Punctuation 'SameChar' Name '(' Punctuation 'S' Name '[' Punctuation 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'i' Name ']' Punctuation ',' Operator ' ' Text 'SubStr' Name '[' Punctuation 'i' Name ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer ']))' Punctuation ' ' Text 'do' Keyword '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'i' Name ')' Punctuation ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'i' Name ' ' Text '=' Operator ' ' Text 'LenSubStr' Name ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'UntilChar' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Brake' Name ':' Operator ' ' Text 'Char' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'p' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'p' Name ' ' Text ':' Operator '=' Operator ' ' Text 'CharPos' Name '(' Punctuation 'Brake' Name ',' Operator ' ' Text 'S' Name ')' Punctuation ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'p' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text '1' Literal.Number.Integer ',' Operator ' ' Text 'p' Name ' ' Text '-' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation '\n ' Text 'else' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'S' Name ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'UntilChar' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Brake' Name ':' Operator ' ' Text 'TCharSet' Name ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'p' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'p' Name ' ' Text ':' Operator '=' Operator ' ' Text 'CharPos' Name '(' Punctuation 'Brake' Name ',' Operator ' ' Text 'S' Name ')' Punctuation ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'p' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text '1' Literal.Number.Integer ',' Operator ' ' Text 'p' Name ' ' Text '-' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation '\n ' Text 'else' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'S' Name ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'UntilLastChar' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Brake' Name ':' Operator ' ' Text 'Char' Keyword.Type ';' Operator '\n ' Text 'IgnoreNoBrake' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'True' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'p' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'p' Name ' ' Text ':' Operator '=' Operator ' ' Text 'CharPosR' Name '(' Punctuation 'Brake' Name ',' Operator ' ' Text 'S' Name ')' Punctuation ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'p' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text '1' Literal.Number.Integer ',' Operator ' ' Text 'p' Name ' ' Text '-' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation '\n ' Text 'else' Keyword ' ' Text 'if' Keyword ' ' Text 'IgnoreNoBrake' Name ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'S' Name ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'FromChar' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Brake' Name ':' Operator ' ' Text 'Char' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'p' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'p' Name ' ' Text ':' Operator '=' Operator ' ' Text 'CharPos' Name '(' Punctuation 'Brake' Name ',' Operator ' ' Text 'S' Name ')' Punctuation ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'p' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text 'p' Name ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ' ' Text '-' Operator ' ' Text 'p' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'FromChar' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Brake' Name ':' Operator ' ' Text 'TCharSet' Name ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'p' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'p' Name ' ' Text ':' Operator '=' Operator ' ' Text 'CharPos' Name '(' Punctuation 'Brake' Name ',' Operator ' ' Text 'S' Name ')' Punctuation ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'p' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text 'p' Name ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ' ' Text '-' Operator ' ' Text 'p' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'FromLastChar' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Brake' Name ':' Operator ' ' Text 'Char' Keyword.Type ';' Operator '\n ' Text 'IgnoreNoBrake' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'False' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'p' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'p' Name ' ' Text ':' Operator '=' Operator ' ' Text 'CharPosR' Name '(' Punctuation 'Brake' Name ',' Operator ' ' Text 'S' Name ')' Punctuation ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'p' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text 'p' Name ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ' ' Text '-' Operator ' ' Text 'p' Name ')' Punctuation '\n ' Text 'else' Keyword ' ' Text 'if' Keyword ' ' Text 'IgnoreNoBrake' Name ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'S' Name ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'BetweenChars' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Start' Name ',' Operator ' ' Text 'Finish' Name ':' Operator ' ' Text 'Char' Keyword.Type ';' Operator '\n ' Text 'Inclusive' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'False' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'p' Name ',' Operator ' ' Text 'fin' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n\n ' Text 'p' Name ' ' Text ':' Operator '=' Operator ' ' Text 'CharPos' Name '(' Punctuation 'Start' Name ',' Operator ' ' Text 'S' Name ')' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'p' Name ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n\n ' Text 'fin' Name ' ' Text ':' Operator '=' Operator ' ' Text 'CharPos' Name '(' Punctuation 'Finish' Name ',' Operator ' ' Text 'S' Name ',' Operator ' ' Text 'p' Name ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'fin' Name ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'not' Keyword ' ' Text 'Inclusive' Name ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'p' Name ')' Punctuation ';' Operator '\n ' Text 'Dec' Name.Builtin '(' Punctuation 'fin' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text 'p' Name ',' Operator ' ' Text 'fin' Name ' ' Text '-' Operator ' ' Text 'p' Name ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'UntilStr' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Brake' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'p' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'Length' Name.Builtin '(' Punctuation 'Brake' Name ')' Punctuation ' ' Text '=' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'UntilChar' Name '(' Punctuation 'S' Name ',' Operator ' ' Text 'Brake' Name '[' Punctuation '1' Literal.Number.Integer '])' Punctuation ';' Operator '\n ' Text 'Exit' Keyword ';' Operator ' ' Text 'end' Keyword ';' Operator '\n\n ' Text 'p' Name ' ' Text ':' Operator '=' Operator ' ' Text 'PosEx' Name '(' Punctuation 'Brake' Name ',' Operator ' ' Text 'S' Name ')' Punctuation ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'p' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text '1' Literal.Number.Integer ',' Operator ' ' Text 'p' Name ' ' Text '-' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation '\n ' Text 'else' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'S' Name ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'FromStr' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Brake' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'p' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'Length' Name.Builtin '(' Punctuation 'Brake' Name ')' Punctuation ' ' Text '=' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'FromChar' Name '(' Punctuation 'S' Name ',' Operator ' ' Text 'Brake' Name '[' Punctuation '1' Literal.Number.Integer '])' Punctuation ';' Operator '\n ' Text 'Exit' Keyword ';' Operator ' ' Text 'end' Keyword ';' Operator '\n\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'p' Name ' ' Text ':' Operator '=' Operator ' ' Text 'PosEx' Name '(' Punctuation 'Brake' Name ',' Operator ' ' Text 's' Name ')' Punctuation ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'p' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'p' Name ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'Brake' Name '))' Punctuation ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text 'p' Name ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ' ' Text '-' Operator ' ' Text 'p' Name ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'StringWrap' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Width' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'const' Keyword ' ' Text 'LineEnd' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text 'EOL' Name ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'if' Keyword ' ' Text '(' Punctuation 'S' Name ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ')' Punctuation ' ' Text 'or' Keyword ' ' Text '(' Punctuation 'Width' Name ' ' Text '<' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n\n ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ';' Operator '\n ' Text 'while' Keyword ' ' Text 'True' Keyword ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text 'i' Name ',' Operator ' ' Text 'Width' Name ')' Punctuation ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'i' Name ',' Operator ' ' Text 'Width' Name ')' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'i' Name ' ' Text '<' Operator '=' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'LineEnd' Name '\n ' Text 'else' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Split' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ',' Operator ' ' Text 'Separator' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'IgnoreMultiSep' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'True' Keyword ';' Operator '\n ' Text 'MinCount' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ')' Punctuation ':' Operator ' ' Text 'TStrA' Name ';' Operator '\n' Text 'var' Keyword '\n ' Text 'p' Name ',' Operator ' ' Text 'fin' Name ',' Operator ' ' Text 'SepLen' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n\n ' Text 'procedure' Keyword ' ' Text 'Add' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ';' Operator '\n ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'IgnoreMultiSep' Name ' ' Text 'and' Keyword ' ' Text '(' Punctuation 'S' Name ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'SetLength' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo '[' Punctuation 'High' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ')]' Punctuation ' ' Text ':' Operator '=' Operator ' ' Text 'S' Name ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'S' Name ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'Length' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation ' ' Text '<' Operator ' ' Text 'MinCount' Name ' ' Text 'then' Keyword '\n ' Text 'SetLength' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ',' Operator ' ' Text 'MinCount' Name ')' Punctuation ';' Operator '\n ' Text 'Exit' Keyword ';' Operator ' ' Text 'end' Keyword ';' Operator '\n\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'nil' Keyword ';' Operator '\n ' Text 'SepLen' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'Separator' Name ')' Punctuation ';' Operator '\n\n ' Text 'p' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ';' Operator '\n ' Text 'fin' Name ' ' Text ':' Operator '=' Operator ' ' Text 'PosEx' Name '(' Punctuation 'Separator' Name ',' Operator ' ' Text 'S' Name ')' Punctuation ';' Operator '\n ' Text 'while' Keyword ' ' Text 'fin' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Add' Name '(' Punctuation 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text 'p' Name ',' Operator ' ' Text 'fin' Name ' ' Text '-' Operator ' ' Text 'p' Name '))' Punctuation ';' Operator '\n ' Text 'p' Name ' ' Text ':' Operator '=' Operator ' ' Text 'fin' Name ' ' Text '+' Operator ' ' Text 'SepLen' Name ';' Operator '\n ' Text 'fin' Name ' ' Text ':' Operator '=' Operator ' ' Text 'PosEx' Name '(' Punctuation 'Separator' Name ',' Operator ' ' Text 'S' Name ',' Operator ' ' Text 'p' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'Add' Name '(' Punctuation 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text 'p' Name ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ' ' Text '-' Operator ' ' Text 'p' Name ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer '))' Punctuation ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'Length' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation ' ' Text '<' Operator ' ' Text 'MinCount' Name ' ' Text 'then' Keyword '\n ' Text 'SetLength' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ',' Operator ' ' Text 'MinCount' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'procedure' Keyword ' ' Text 'Split' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ',' Operator ' ' Text 'Separator' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Strings' Name ':' Operator ' ' Text 'TStrings' Name ';' Operator '\n ' Text 'IgnoreMultiSep' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'True' Keyword ')' Punctuation ';' Operator ' \n' Text 'var' Keyword '\n ' Text 'p' Name ',' Operator ' ' Text 'fin' Name ',' Operator ' ' Text 'SepLen' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n\n ' Text 'procedure' Keyword ' ' Text 'Add' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ';' Operator '\n ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'IgnoreMultiSep' Name ' ' Text 'and' Keyword ' ' Text '(' Punctuation 'S' Name ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'Strings' Name '.' Operator 'Add' Name '(' Punctuation 'S' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'S' Name ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n\n ' Text 'Strings' Name '.' Operator 'BeginUpdate' Name ';' Operator '\n ' Text 'SepLen' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'Separator' Name ')' Punctuation ';' Operator '\n ' Text 'p' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ';' Operator '\n ' Text 'fin' Name ' ' Text ':' Operator '=' Operator ' ' Text 'PosEx' Name '(' Punctuation 'Separator' Name ',' Operator ' ' Text 'S' Name ')' Punctuation ';' Operator '\n ' Text 'while' Keyword ' ' Text 'fin' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Add' Name '(' Punctuation 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text 'p' Name ',' Operator ' ' Text 'fin' Name ' ' Text '-' Operator ' ' Text 'p' Name '))' Punctuation ';' Operator '\n ' Text 'p' Name ' ' Text ':' Operator '=' Operator ' ' Text 'fin' Name ' ' Text '+' Operator ' ' Text 'SepLen' Name ';' Operator '\n ' Text 'fin' Name ' ' Text ':' Operator '=' Operator ' ' Text 'PosEx' Name '(' Punctuation 'Separator' Name ',' Operator ' ' Text 'S' Name ',' Operator ' ' Text 'p' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'Add' Name '(' Punctuation 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text 'p' Name ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ' ' Text '-' Operator ' ' Text 'p' Name ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer '))' Punctuation ';' Operator '\n ' Text 'Strings' Name '.' Operator 'EndUpdate' Name ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Split' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Separators' Name ':' Operator ' ' Text 'TCharSet' Name ';' Operator '\n ' Text 'IgnoreMultiSep' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'True' Keyword ';' Operator ' ' Text 'MinCount' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ')' Punctuation ':' Operator ' ' Text 'TStrA' Name ';' Operator '\n' Text 'var' Keyword '\n ' Text 'p' Name ',' Operator ' ' Text 'fin' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n\n ' Text 'procedure' Keyword ' ' Text 'Add' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ';' Operator '\n ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'IgnoreMultiSep' Name ' ' Text 'and' Keyword ' ' Text '(' Punctuation 'S' Name ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'SetLength' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo '[' Punctuation 'High' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ')]' Punctuation ' ' Text ':' Operator '=' Operator ' ' Text 'S' Name ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'S' Name ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'Length' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation ' ' Text '<' Operator ' ' Text 'MinCount' Name ' ' Text 'then' Keyword '\n ' Text 'SetLength' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ',' Operator ' ' Text 'MinCount' Name ')' Punctuation ';' Operator '\n ' Text 'Exit' Keyword ';' Operator ' ' Text 'end' Keyword ';' Operator '\n\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'nil' Keyword ';' Operator '\n\n ' Text 'p' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ';' Operator '\n ' Text 'fin' Name ' ' Text ':' Operator '=' Operator ' ' Text 'CharPos' Name '(' Punctuation 'Separators' Name ',' Operator ' ' Text 'S' Name ')' Punctuation ';' Operator '\n ' Text 'while' Keyword ' ' Text 'fin' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Add' Name '(' Punctuation 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text 'p' Name ',' Operator ' ' Text 'fin' Name ' ' Text '-' Operator ' ' Text 'p' Name '))' Punctuation ';' Operator '\n ' Text 'p' Name ' ' Text ':' Operator '=' Operator ' ' Text 'fin' Name ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer ';' Operator '\n ' Text 'fin' Name ' ' Text ':' Operator '=' Operator ' ' Text 'CharPos' Name '(' Punctuation 'Separators' Name ',' Operator ' ' Text 'S' Name ',' Operator ' ' Text 'p' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'Add' Name '(' Punctuation 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text 'p' Name ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ' ' Text '-' Operator ' ' Text 'p' Name ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer '))' Punctuation ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'Length' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation ' ' Text '<' Operator ' ' Text 'MinCount' Name ' ' Text 'then' Keyword '\n ' Text 'SetLength' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ',' Operator ' ' Text 'MinCount' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'procedure' Keyword ' ' Text 'TileStr' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'BrakeStart' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'BrakeEnd' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n ' Text 'out' Name ' ' Text 'Left' Name ',' Operator ' ' Text 'Right' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Left' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text '1' Literal.Number.Integer ',' Operator ' ' Text 'BrakeStart' Name '-' Operator '1' Literal.Number.Integer ')' Punctuation ';' Operator '\n ' Text 'Right' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text 'BrakeEnd' Name ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer ',' Operator ' ' Text 'MaxInt' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Join' Name.Function '(' Punctuation 'Strings' Name ':' Operator ' ' Text 'TStrings' Name ';' Operator ' ' Text 'Separator' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String ' ' Literal.String "'" Literal.String ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ',' Operator ' ' Text 'imax' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'imax' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Strings' Name '.' Operator 'Count' Name '-' Operator '1' Literal.Number.Integer ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'imax' Name ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'Strings' Name '[' Punctuation 'i' Name ']' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'i' Name ' ' Text '<' Operator ' ' Text 'imax' Name ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'Separator' Name ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Join' Name.Function '(' Punctuation 'StrA' Name ':' Operator ' ' Text 'TStrA' Name ';' Operator ' ' Text 'Separator' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String ' ' Literal.String "'" Literal.String ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'overload' Name ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'High' Name.Builtin '(' Punctuation 'StrA' Name ')' Punctuation ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'StrA' Name '[' Punctuation 'i' Name ']' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'i' Name ' ' Text '<' Operator ' ' Text 'High' Name.Builtin '(' Punctuation 'StrA' Name ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'Separator' Name ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'MulStr' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Count' Name ':' Operator ' ' Text 'Integer' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'P' Name ':' Operator ' ' Text 'PChar' Keyword.Type ';' Operator '\n ' Text 'Len' Name ',' Operator ' ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'if' Keyword ' ' Text 'Count' Name ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n\n ' Text 'Len' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ';' Operator '\n ' Text 'SetLength' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ',' Operator ' ' Text 'Len' Name ' ' Text '*' Operator ' ' Text 'Count' Name ')' Punctuation ';' Operator '\n\n ' Text 'P' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Pointer' Keyword.Type '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'Count' Name ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Move' Name.Builtin '(' Punctuation 'Pointer' Keyword.Type '(' Punctuation 'S' Name ')' Punctuation '^' Operator ',' Operator ' ' Text 'P' Name '^' Operator ',' Operator ' ' Text 'Len' Name ')' Punctuation ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'P' Name ',' Operator ' ' Text 'Len' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'AlignR' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Width' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'Filler' Name ':' Operator ' ' Text 'Char' Keyword.Type ' ' Text '=' Operator ' ' Text "'" Literal.String ' ' Literal.String "'" Literal.String ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'MulStr' Name '(' Punctuation 'Filler' Name ',' Operator ' ' Text 'Width' Name ' ' Text '-' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name '))' Punctuation ' ' Text '+' Operator ' ' Text 'S' Name ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'MaxStr' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'MaxLen' Name ':' Operator ' ' Text 'Integer' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'Len' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Len' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'Len' Name ' ' Text '<' Operator '=' Operator ' ' Text 'MaxLen' Name ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'S' Name ';' Operator '\n ' Text 'Exit' Keyword ' ' Text 'end' Keyword ';' Operator '\n\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text '1' Literal.Number.Integer ',' Operator ' ' Text 'MaxLen' Name ' ' Text '-' Operator ' ' Text '3' Literal.Number.Integer ')' Punctuation ' ' Text '+' Operator ' ' Text "'" Literal.String '...' Literal.String "'" Literal.String ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'TrimAll' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ' ' Text 'do' Keyword '\n ' Text 'if' Keyword ' ' Text 'S' Name '[' Punctuation 'i' Name ']' Punctuation ' ' Text '>' Operator ' ' Text '#32' Literal.String.Char ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'S' Name '[' Punctuation 'i' Name ']' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'ControlChar' Name.Function '(' Punctuation 'C' Name ':' Operator ' ' Text 'Char' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'C' Name ' ' Text 'in' Keyword ' ' Text 'StrangeChars' Name ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'FriendlyChar' Name.Function '(' Punctuation 'C' Name ':' Operator ' ' Text 'Char' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Char' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'case' Keyword ' ' Text 'C' Name ' ' Text 'of' Keyword '\n ' Text '#0' Literal.String.Char ':' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String '.' Literal.String "'" Literal.String ';' Operator '\n ' Text '#1' Literal.String.Char '.' Operator '.' Operator '#31' Literal.String.Char ':' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String '?' Literal.String "'" Literal.String ';' Operator '\n ' Text '#255' Literal.String.Char ':' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String '#' Literal.String "'" Literal.String ';' Operator '\n ' Text 'else' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'C' Name ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'FriendlyStr' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'SetLength' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name '))' Punctuation ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ' ' Text 'do' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo '[' Punctuation 'i' Name ']' Punctuation ' ' Text ':' Operator '=' Operator ' ' Text 'FriendlyChar' Name '(' Punctuation 'S' Name '[' Punctuation 'i' Name '])' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'FriendlyStr' Name.Function '(' Punctuation 'a' Name ':' Operator ' ' Text 'TByteA' Name ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'SetLength' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'a' Name '))' Punctuation ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'High' Name.Builtin '(' Punctuation 'a' Name ')' Punctuation ' ' Text 'do' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo '[' Punctuation 'i' Name ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer ']' Punctuation ' ' Text ':' Operator '=' Operator ' ' Text 'FriendlyChar' Name '(' Punctuation 'Char' Keyword.Type '(' Punctuation 'a' Name '[' Punctuation 'i' Name ']))' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Quote' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Quoter' Name ':' Operator ' ' Text 'Char' Keyword.Type ' ' Text '=' Operator ' ' Text "'" Literal.String '"' Literal.String "'" Literal.String ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'S' Name ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'FirstChar' Name '(' Punctuation 'S' Name ')' Punctuation ' ' Text '<' Operator '>' Operator ' ' Text 'Quoter' Name ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Quoter' Name ' ' Text '+' Operator ' ' Text 'Result' Name.Builtin.Pseudo ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'LastChar' Name '(' Punctuation 'S' Name ')' Punctuation ' ' Text '<' Operator '>' Operator ' ' Text 'Quoter' Name ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'Quoter' Name ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'DeQuote' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'if' Keyword ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ' ' Text '>' Operator ' ' Text '2' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text '2' Literal.Number.Integer ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ' ' Text '-' Operator ' ' Text '2' Literal.Number.Integer ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'UnQuote' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'Start' Name ',' Operator ' ' Text 'Len' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Start' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ';' Operator '\n ' Text 'Len' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ';' Operator '\n\n ' Text 'if' Keyword ' ' Text '(' Punctuation 'S' Name ' ' Text '<' Operator '>' Operator ' ' Text "'" Literal.String "'" Literal.String ')' Punctuation ' ' Text 'and' Keyword ' ' Text '(' Punctuation 'S' Name '[' Punctuation '1' Literal.Number.Integer ']' Punctuation ' ' Text 'in' Keyword ' ' Text '([' Punctuation '#0' Literal.String.Char '.' Operator '.' Operator '#32' Literal.String.Char ']' Punctuation ' ' Text '+' Operator ' ' Text 'QuoteChars' Name '))' Punctuation ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text '(' Punctuation 'LastChar' Name '(' Punctuation 'S' Name ')' Punctuation ' ' Text '=' Operator ' ' Text 'S' Name '[' Punctuation '1' Literal.Number.Integer '])' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Dec' Name.Builtin '(' Punctuation 'Len' Name ')' Punctuation ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'Start' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text 'Start' Name ',' Operator ' ' Text 'Len' Name ' ' Text '-' Operator ' ' Text 'Start' Name ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'StrNumerus' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Value' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'const' Keyword ' ' Text 'Singular' Name ',' Operator ' ' Text 'Plural' Name ':' Operator ' ' Text 'string' Keyword ';' Operator '\n ' Text 'const' Keyword ' ' Text 'Zero' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String '0' Literal.String "'" Literal.String ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'Abs' Name.Builtin '(' Punctuation 'Value' Name ')' Punctuation ' ' Text '=' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'IntToStr' Name.Builtin '(' Punctuation 'Value' Name ')' Punctuation ' ' Text '+' Operator ' ' Text "'" Literal.String ' ' Literal.String "'" Literal.String ' ' Text '+' Operator ' ' Text 'Singular' Name '\n ' Text 'else' Keyword ' ' Text 'if' Keyword ' ' Text 'Value' Name ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Zero' Name ' ' Text '+' Operator ' ' Text "'" Literal.String ' ' Literal.String "'" Literal.String ' ' Text '+' Operator ' ' Text 'Plural' Name '\n ' Text 'else' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'IntToStr' Name.Builtin '(' Punctuation 'Value' Name ')' Punctuation ' ' Text '+' Operator ' ' Text "'" Literal.String ' ' Literal.String "'" Literal.String ' ' Text '+' Operator ' ' Text 'Plural' Name ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'MakeStr' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Items' Name ':' Operator ' ' Text 'array' Keyword ' ' Text 'of' Keyword ' ' Text 'const' Keyword ';' Operator ' ' Text 'Separator' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'const' Keyword '\n ' Text 'BoolStrings' Name ':' Operator ' ' Text 'array' Keyword '[' Punctuation 'Boolean' Keyword.Type ']' Punctuation ' ' Text 'of' Keyword ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text '(' Punctuation "'" Literal.String 'False' Literal.String "'" Literal.String ',' Operator ' ' Text "'" Literal.String 'True' Literal.String "'" Literal.String ')' Punctuation ';' Operator '\n\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n\n ' Text 'function' Keyword ' ' Text 'StrOfP' Name.Function '(' Punctuation 'P' Name ':' Operator ' ' Text 'Pointer' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'P' Name ' ' Text '=' Operator ' ' Text 'nil' Keyword ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String '[nil]' Literal.String "'" Literal.String '\n ' Text 'else' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String '[' Literal.String "'" Literal.String ' ' Text '+' Operator ' ' Text 'IntToStr' Name.Builtin '(' Punctuation 'Cardinal' Keyword.Type '(' Punctuation 'P' Name '))' Punctuation ' ' Text '+' Operator ' ' Text "'" Literal.String ']' Literal.String "'" Literal.String ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n ' Text 'procedure' Keyword ' ' Text 'Add' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ';' Operator '\n ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 's' Name ' ' Text '+' Operator ' ' Text 'Separator' Name ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'High' Name.Builtin '(' Punctuation 'Items' Name ')' Punctuation ' ' Text 'do' Keyword '\n ' Text 'with' Keyword ' ' Text 'Items' Name '[' Punctuation 'i' Name ']' Punctuation ' ' Text 'do' Keyword '\n ' Text 'case' Keyword ' ' Text 'VType' Name ' ' Text 'of' Keyword '\n ' Text 'vtString' Name ':' Operator ' ' Text 'Add' Name '(' Punctuation 'VString' Name '^' Operator ')' Punctuation ';' Operator '\n ' Text 'vtInteger' Name ':' Operator ' ' Text 'Add' Name '(' Punctuation 'IntToStr' Name.Builtin '(' Punctuation 'VInteger' Name '))' Punctuation ';' Operator '\n ' Text 'vtBoolean' Name ':' Operator ' ' Text 'Add' Name '(' Punctuation 'BoolStrings' Name '[' Punctuation 'VBoolean' Name '])' Punctuation ';' Operator '\n ' Text 'vtChar' Name ':' Operator ' ' Text 'Add' Name '(' Punctuation 'VChar' Name ')' Punctuation ';' Operator '\n ' Text 'vtPChar' Name ':' Operator ' ' Text 'Add' Name '(' Punctuation 'VPChar' Name ')' Punctuation ';' Operator '\n ' Text 'vtExtended' Name ':' Operator ' ' Text 'Add' Name '(' Punctuation 'FloatToStr' Name.Builtin '(' Punctuation 'VExtended' Name '^' Operator '))' Punctuation ';' Operator '\n ' Text 'vtObject' Name ':' Operator ' ' Text 'if' Keyword ' ' Text 'VObject' Name ' ' Text 'is' Keyword ' ' Text 'TComponent' Name ' ' Text 'then' Keyword '\n ' Text 'Add' Name '(' Punctuation 'TComponent' Name '(' Punctuation 'VObject' Name ')' Punctuation '.' Operator 'Name' Name ')' Punctuation '\n ' Text 'else' Keyword '\n ' Text 'Add' Name '(' Punctuation 'VObject' Name '.' Operator 'ClassName' Name ')' Punctuation ';' Operator '\n ' Text 'vtClass' Name ':' Operator ' ' Text 'Add' Name '(' Punctuation 'VClass' Name '.' Operator 'ClassName' Name ')' Punctuation ';' Operator '\n ' Text 'vtAnsiString' Name ':' Operator ' ' Text 'Add' Name '(' Punctuation 'string' Keyword '(' Punctuation 'VAnsiString' Name '))' Punctuation ';' Operator '\n ' Text 'vtCurrency' Name ':' Operator ' ' Text 'Add' Name '(' Punctuation 'CurrToStr' Name.Builtin '(' Punctuation 'VCurrency' Name '^' Operator '))' Punctuation ';' Operator '\n ' Text 'vtInt64' Name ':' Operator ' ' Text 'Add' Name '(' Punctuation 'IntToStr' Name.Builtin '(' Punctuation 'VInt64' Name '^' Operator '))' Punctuation ';' Operator '\n ' Text 'vtVariant' Name ':' Operator ' ' Text 'Add' Name '(' Punctuation 'string' Keyword '(' Punctuation 'VVariant' Name '^' Operator '))' Punctuation ';' Operator '\n\n ' Text 'vtWideChar' Name ':' Operator ' ' Text 'Add' Name '(' Punctuation 'VWideChar' Name ')' Punctuation ';' Operator '\n ' Text 'vtPWideChar' Name ':' Operator ' ' Text 'Add' Name '(' Punctuation 'VPWideChar' Name ')' Punctuation ';' Operator '\n ' Text 'vtInterface' Name ':' Operator ' ' Text 'Add' Name '(' Punctuation 'StrOfP' Name '(' Punctuation 'VInterface' Name '))' Punctuation ';' Operator '\n ' Text 'vtPointer' Name ':' Operator ' ' Text 'Add' Name '(' Punctuation 'StrOfP' Name '(' Punctuation 'VPointer' Name '))' Punctuation ';' Operator '\n ' Text 'vtWideString' Name ':' Operator ' ' Text 'Add' Name '(' Punctuation 'WideString' Keyword.Type '(' Punctuation 'VWideString' Name '))' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'if' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '<' Operator '>' Operator ' ' Text "'" Literal.String "'" Literal.String ' ' Text 'then' Keyword '\n ' Text 'SetLength' Name.Builtin '(' Punctuation 'result' Name.Builtin.Pseudo ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation ' ' Text '-' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'Separator' Name '))' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'procedure' Keyword ' ' Text 'ShowText' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Items' Name ':' Operator ' ' Text 'array' Keyword ' ' Text 'of' Keyword ' ' Text 'const' Keyword ';' Operator ' ' Text 'Separator' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ')' Punctuation ';' Operator '\n' Text 'var' Keyword '\n ' Text 'Text' Name ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Text' Name ' ' Text ':' Operator '=' Operator ' ' Text 'MakeStr' Name '(' Punctuation 'Items' Name ',' Operator ' ' Text 'Separator' Name ')' Punctuation ';' Operator '\n\n ' Text 'MessageBox' Name '(' Punctuation '0' Literal.Number.Integer ',' Operator ' ' Text 'PChar' Keyword.Type '(' Punctuation 'Text' Name ')' Punctuation ',' Operator ' ' Text "'" Literal.String 'Info' Literal.String "'" Literal.String ',' Operator ' ' Text 'MB_OK' Name ' ' Text 'and' Keyword ' ' Text 'MB_APPLMODAL' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'DeleteChars' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'C' Name ':' Operator ' ' Text 'Char' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ' ' Text 'do' Keyword '\n ' Text 'if' Keyword ' ' Text 'S' Name '[' Punctuation 'i' Name ']' Punctuation ' ' Text '<' Operator '>' Operator ' ' Text 'C' Name ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'S' Name '[' Punctuation 'i' Name ']' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'DeleteChars' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'C' Name ':' Operator ' ' Text 'TCharSet' Name ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ' ' Text 'do' Keyword '\n ' Text 'if' Keyword ' ' Text 'not' Keyword ' ' Text '(' Punctuation 'S' Name '[' Punctuation 'i' Name ']' Punctuation ' ' Text 'in' Keyword ' ' Text 'C' Name ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'S' Name '[' Punctuation 'i' Name ']' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'ExtractChars' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'C' Name ':' Operator ' ' Text 'TCharSet' Name ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ' ' Text 'do' Keyword '\n ' Text 'if' Keyword ' ' Text 'S' Name '[' Punctuation 'i' Name ']' Punctuation ' ' Text 'in' Keyword ' ' Text 'C' Name ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'S' Name '[' Punctuation 'i' Name ']' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'CharCount' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'C' Name ':' Operator ' ' Text 'Char' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ' ' Text 'do' Keyword '\n ' Text 'if' Keyword ' ' Text 'S' Name '[' Punctuation 'i' Name ']' Punctuation ' ' Text '=' Operator ' ' Text 'C' Name ' ' Text 'then' Keyword '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'StrAtPos' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Pos' Name.Builtin ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'const' Keyword ' ' Text 'Str' Name.Builtin ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '(' Punctuation 'Str' Name.Builtin ' ' Text '<' Operator '>' Operator ' ' Text "'" Literal.String "'" Literal.String ')' Punctuation ' ' Text 'and' Keyword ' ' Text '(' Punctuation 'Str' Name.Builtin ' ' Text '=' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text 'Pos' Name.Builtin ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'Str' Name.Builtin ')))' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'TextAtPos' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Pos' Name.Builtin ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'const' Keyword ' ' Text 'Text' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '(' Punctuation 'Text' Name ' ' Text '<' Operator '>' Operator ' ' Text "'" Literal.String "'" Literal.String ')' Punctuation ' ' Text 'and' Keyword ' ' Text 'SameText' Name.Builtin '(' Punctuation 'Text' Name ',' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text 'Pos' Name.Builtin ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'Text' Name ')))' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'StrAtBegin' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ',' Operator ' ' Text 'Str' Name.Builtin ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'StrAtPos' Name '(' Punctuation 'S' Name ',' Operator ' ' Text '1' Literal.Number.Integer ',' Operator ' ' Text 'Str' Name.Builtin ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'TextAtBegin' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ',' Operator ' ' Text 'Text' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'TextAtPos' Name '(' Punctuation 'S' Name ',' Operator ' ' Text '1' Literal.Number.Integer ',' Operator ' ' Text 'Text' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'CharIn' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'C' Name ':' Operator ' ' Text 'Char' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'True' Keyword ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ' ' Text 'do' Keyword '\n ' Text 'if' Keyword ' ' Text 'S' Name '[' Punctuation 'i' Name ']' Punctuation ' ' Text '=' Operator ' ' Text 'C' Name ' ' Text 'then' Keyword ' ' Text 'Exit' Keyword ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'False' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'CharIn' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'C' Name ':' Operator ' ' Text 'TCharSet' Name ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'False' Keyword ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'S' Name '[' Punctuation 'i' Name ']' Punctuation ' ' Text 'in' Keyword ' ' Text 'C' Name ';' Operator '\n ' Text 'if' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'StrIn' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ',' Operator ' ' Text 'SubStr' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'PosEx' Name '(' Punctuation 'SubStr' Name ',' Operator ' ' Text 'S' Name ')' Punctuation ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'StrIn' Name.Function '(' Punctuation 'SL' Name ':' Operator ' ' Text 'TStrings' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'False' Keyword ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'SL' Name '.' Operator 'Count' Name '-' Operator '1' Literal.Number.Integer ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '(' Punctuation 'S' Name ' ' Text '=' Operator ' ' Text 'SL' Name '[' Punctuation 'i' Name '])' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'StrIn' Name.Function '(' Punctuation 'A' Name ':' Operator ' ' Text 'TStrA' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'False' Keyword ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Low' Name.Builtin '(' Punctuation 'A' Name ')' Punctuation ' ' Text 'to' Keyword ' ' Text 'High' Name.Builtin '(' Punctuation 'A' Name ')' Punctuation ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '(' Punctuation 'S' Name ' ' Text '=' Operator ' ' Text 'A' Name '[' Punctuation 'i' Name '])' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'TextIn' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ',' Operator ' ' Text 'Text' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'PosExText' Name '(' Punctuation 'Text' Name ',' Operator ' ' Text 'S' Name ')' Punctuation ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'TextIn' Name.Function '(' Punctuation 'SL' Name ':' Operator ' ' Text 'TStrings' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'Text' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'False' Keyword ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'SL' Name '.' Operator 'Count' Name '-' Operator '1' Literal.Number.Integer ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'SameText' Name.Builtin '(' Punctuation 'Text' Name ',' Operator ' ' Text 'SL' Name '[' Punctuation 'i' Name '])' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'TextIn' Name.Function '(' Punctuation 'A' Name ':' Operator ' ' Text 'TStrA' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'Text' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'False' Keyword ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Low' Name.Builtin '(' Punctuation 'A' Name ')' Punctuation ' ' Text 'to' Keyword ' ' Text 'High' Name.Builtin '(' Punctuation 'A' Name ')' Punctuation ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'SameText' Name.Builtin '(' Punctuation 'Text' Name ',' Operator ' ' Text 'A' Name '[' Punctuation 'i' Name '])' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'StrIndex' Name.Function '(' Punctuation 'SL' Name ':' Operator ' ' Text 'TStrings' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'for' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'SL' Name '.' Operator 'Count' Name '-' Operator '1' Literal.Number.Integer ' ' Text 'do' Keyword '\n ' Text 'if' Keyword ' ' Text 'S' Name ' ' Text '=' Operator ' ' Text 'SL' Name '[' Punctuation 'Result' Name.Builtin.Pseudo ']' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '-' Operator '1' Literal.Number.Integer ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'StrIndex' Name.Function '(' Punctuation 'A' Name ':' Operator ' ' Text 'TStrA' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'for' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Low' Name.Builtin '(' Punctuation 'A' Name ')' Punctuation ' ' Text 'to' Keyword ' ' Text 'High' Name.Builtin '(' Punctuation 'A' Name ')' Punctuation ' ' Text 'do' Keyword '\n ' Text 'if' Keyword ' ' Text 'S' Name ' ' Text '=' Operator ' ' Text 'A' Name '[' Punctuation 'Result' Name.Builtin.Pseudo ']' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '-' Operator '1' Literal.Number.Integer ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'TextIndex' Name.Function '(' Punctuation 'SL' Name ':' Operator ' ' Text 'TStrings' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'Text' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'for' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'SL' Name '.' Operator 'Count' Name '-' Operator '1' Literal.Number.Integer ' ' Text 'do' Keyword '\n ' Text 'if' Keyword ' ' Text 'SameText' Name.Builtin '(' Punctuation 'Text' Name ',' Operator ' ' Text 'SL' Name '[' Punctuation 'Result' Name.Builtin.Pseudo '])' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '-' Operator '1' Literal.Number.Integer ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'TextIndex' Name.Function '(' Punctuation 'A' Name ':' Operator ' ' Text 'TStrA' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'Text' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'for' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Low' Name.Builtin '(' Punctuation 'A' Name ')' Punctuation ' ' Text 'to' Keyword ' ' Text 'High' Name.Builtin '(' Punctuation 'A' Name ')' Punctuation ' ' Text 'do' Keyword '\n ' Text 'if' Keyword ' ' Text 'SameText' Name.Builtin '(' Punctuation 'Text' Name ',' Operator ' ' Text 'A' Name '[' Punctuation 'Result' Name.Builtin.Pseudo '])' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '-' Operator '1' Literal.Number.Integer ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'ReplaceChars' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Old' Name ',' Operator ' ' Text 'New' Keyword ':' Operator ' ' Text 'Char' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'S' Name ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'Length' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation ' ' Text 'do' Keyword '\n ' Text 'if' Keyword ' ' Text 'Result' Name.Builtin.Pseudo '[' Punctuation 'i' Name ']' Punctuation ' ' Text '=' Operator ' ' Text 'Old' Name ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo '[' Punctuation 'i' Name ']' Punctuation ' ' Text ':' Operator '=' Operator ' ' Text 'New' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'ReplaceChars' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'Old' Name ':' Operator ' ' Text 'TCharSet' Name ';' Operator ' ' Text 'New' Keyword ':' Operator ' ' Text 'Char' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'S' Name ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'Length' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation ' ' Text 'do' Keyword '\n ' Text 'if' Keyword ' ' Text 'Result' Name.Builtin.Pseudo '[' Punctuation 'i' Name ']' Punctuation ' ' Text 'in' Keyword ' ' Text 'Old' Name ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo '[' Punctuation 'i' Name ']' Punctuation ' ' Text ':' Operator '=' Operator ' ' Text 'New' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Replace' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ',' Operator ' ' Text 'Old' Name ',' Operator ' ' Text 'New' Keyword ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'oldp' Name ',' Operator ' ' Text 'ps' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'ps' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'while' Keyword ' ' Text 'True' Keyword ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'oldp' Name ' ' Text ':' Operator '=' Operator ' ' Text 'ps' Name ';' Operator '\n ' Text 'ps' Name ' ' Text ':' Operator '=' Operator ' ' Text 'PosEx' Name '(' Punctuation 'Old' Name ',' Operator ' ' Text 'S' Name ',' Operator ' ' Text 'oldp' Name ')' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'ps' Name ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text 'oldp' Name ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'S' Name ')' Punctuation ' ' Text '-' Operator ' ' Text 'oldp' Name ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation ';' Operator '\n ' Text 'Exit' Keyword ';' Operator ' ' Text 'end' Keyword ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text 'oldp' Name ',' Operator ' ' Text 'ps' Name ' ' Text '-' Operator ' ' Text 'oldp' Name ')' Punctuation ' ' Text '+' Operator ' ' Text 'New' Keyword ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'ps' Name ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'Old' Name '))' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'SLOfFile' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'TStringList' Name ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'TStringList' Name '.' Operator 'Create' Name ';' Operator '\n ' Text 'if' Keyword ' ' Text 'FileExists' Name.Builtin '(' Punctuation 'FileName' Name ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo '.' Operator 'LoadFromFile' Name '(' Punctuation 'FileName' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'ContainsEmptyLines' Name.Function '(' Punctuation 'SL' Name ':' Operator ' ' Text 'TStrings' Name ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'StrIn' Name '(' Punctuation 'SL' Name ',' Operator ' ' Text "'" Literal.String "'" Literal.String ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'procedure' Keyword ' ' Text 'DeleteEmptyLines' Name.Function '(' Punctuation 'SL' Name ':' Operator ' ' Text 'TStrings' Name ')' Punctuation ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n ' Text 'while' Keyword ' ' Text 'i' Name ' ' Text '<' Operator ' ' Text 'SL' Name '.' Operator 'Count' Name ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'SL' Name '[' Punctuation 'i' Name ']' Punctuation ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ' ' Text 'then' Keyword '\n ' Text 'SL' Name '.' Operator 'Delete' Name '(' Punctuation 'i' Name ')' Punctuation '\n ' Text 'else' Keyword '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'i' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'procedure' Keyword ' ' Text 'DeleteCommentLines' Name.Function '(' Punctuation 'SL' Name ':' Operator ' ' Text 'TStrings' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'CommentSign' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String '//' Literal.String "'" Literal.String ')' Punctuation ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n ' Text 'while' Keyword ' ' Text 'i' Name ' ' Text '<' Operator ' ' Text 'SL' Name '.' Operator 'Count' Name ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text '(' Punctuation 'SL' Name '[' Punctuation 'i' Name ']' Punctuation ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ')' Punctuation ' ' Text 'or' Keyword ' ' Text '(' Punctuation 'StrAtBegin' Name '(' Punctuation 'TrimLeft' Name.Builtin '(' Punctuation 'SL' Name '[' Punctuation 'i' Name '])' Punctuation ',' Operator ' ' Text 'CommentSign' Name '))' Punctuation ' ' Text 'then' Keyword '\n ' Text 'SL' Name '.' Operator 'Delete' Name '(' Punctuation 'i' Name ')' Punctuation '\n ' Text 'else' Keyword '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'i' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'FindLine' Name.Function '(' Punctuation 'SL' Name ':' Operator ' ' Text 'TStrings' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'for' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'SL' Name '.' Operator 'Count' Name '-' Operator '1' Literal.Number.Integer ' ' Text 'do' Keyword '\n ' Text 'if' Keyword ' ' Text 'TextAtBegin' Name '(' Punctuation 'SL' Name '[' Punctuation 'Result' Name.Builtin.Pseudo ']' Punctuation ',' Operator ' ' Text 'S' Name ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '-' Operator '1' Literal.Number.Integer ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'procedure' Keyword ' ' Text 'QuickSortSL' Name.Function '(' Punctuation 'SL' Name ':' Operator ' ' Text 'TStringList' Name ')' Punctuation ';' Operator '\n\n ' Text 'procedure' Keyword ' ' Text 'Sort' Name.Function '(' Punctuation 'l' Name ',' Operator ' ' Text 'r' Name ':' Operator ' ' Text 'Integer' Keyword.Type ')' Punctuation ';' Operator '\n ' Text 'var' Keyword '\n ' Text 'i' Name ',' Operator 'j' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n ' Text 'z' Name ',' Operator 'x' Name ':' Operator ' ' Text 'string' Keyword ';' Operator '\n ' Text 'begin' Keyword '\n ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text 'l' Name ';' Operator '\n ' Text 'j' Name ' ' Text ':' Operator '=' Operator ' ' Text 'r' Name ';' Operator '\n ' Text 'x' Name ' ' Text ':' Operator '=' Operator ' ' Text 'SL' Name '[(' Punctuation 'j' Name ' ' Text '+' Operator ' ' Text 'i' Name ')' Punctuation ' ' Text 'div' Keyword ' ' Text '2' Literal.Number.Integer ']' Punctuation ';' Operator '\n ' Text 'repeat' Keyword '\n ' Text 'while' Keyword ' ' Text 'SL' Name '[' Punctuation 'i' Name ']' Punctuation ' ' Text '<' Operator ' ' Text 'x' Name ' ' Text 'do' Keyword ' ' Text 'Inc' Name.Builtin '(' Punctuation 'i' Name ')' Punctuation ';' Operator '\n ' Text 'while' Keyword ' ' Text 'SL' Name '[' Punctuation 'j' Name ']' Punctuation ' ' Text '>' Operator ' ' Text 'x' Name ' ' Text 'do' Keyword ' ' Text 'Dec' Name.Builtin '(' Punctuation 'j' Name ')' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'i' Name ' ' Text '<' Operator '=' Operator ' ' Text 'j' Name ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'z' Name ' ' Text ':' Operator '=' Operator ' ' Text 'SL' Name '[' Punctuation 'i' Name ']' Punctuation ';' Operator '\n ' Text 'SL' Name '[' Punctuation 'i' Name ']' Punctuation ' ' Text ':' Operator '=' Operator ' ' Text 'SL' Name '[' Punctuation 'j' Name ']' Punctuation ';' Operator '\n ' Text 'SL' Name '[' Punctuation 'j' Name ']' Punctuation ' ' Text ':' Operator '=' Operator ' ' Text 'z' Name ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'i' Name ')' Punctuation ';' Operator ' ' Text 'Dec' Name.Builtin '(' Punctuation 'j' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'until' Keyword ' ' Text 'i' Name ' ' Text '>' Operator ' ' Text 'j' Name ';' Operator '\n ' Text 'if' Keyword ' ' Text 'j' Name ' ' Text '>' Operator ' ' Text 'l' Name ' ' Text 'then' Keyword ' ' Text 'Sort' Name '(' Punctuation 'l' Name ',' Operator ' ' Text 'j' Name ')' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'i' Name ' ' Text '<' Operator ' ' Text 'r' Name ' ' Text 'then' Keyword ' ' Text 'Sort' Name '(' Punctuation 'i' Name ',' Operator ' ' Text 'r' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'SL' Name '.' Operator 'Count' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Sort' Name '(' Punctuation '0' Literal.Number.Integer ',' Operator ' ' Text 'SL' Name '.' Operator 'Count' Name '-' Operator '1' Literal.Number.Integer ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'IncStrA' Name.Function '(' Punctuation 'StrA' Name ':' Operator ' ' Text 'TStrA' Name ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'SetLength' Name.Builtin '(' Punctuation 'StrA' Name ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'StrA' Name ')' Punctuation ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'High' Name.Builtin '(' Punctuation 'StrA' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'StrOfByteA' Name.Function '(' Punctuation 'a' Name ':' Operator ' ' Text 'TByteA' Name ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'string' Keyword '(' Punctuation 'Copy' Name.Builtin '(' Punctuation 'a' Name ',' Operator ' ' Text '0' Literal.Number.Integer ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'a' Name ')))' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'ByteAOfStr' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'TByteA' Name ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'TByteA' Name '(' Punctuation 'Copy' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text '1' Literal.Number.Integer ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 's' Name ')))' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'ByteAOfInt' Name.Function '(' Punctuation 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'TByteA' Name ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'SetLength' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ',' Operator ' ' Text 'SizeOf' Name.Builtin '(' Punctuation 'Integer' Keyword.Type '))' Punctuation ';' Operator '\n ' Text 'Move' Name.Builtin '(' Punctuation 'i' Name ',' Operator ' ' Text 'Pointer' Keyword.Type '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation '^' Operator ',' Operator ' ' Text 'SizeOf' Name.Builtin '(' Punctuation 'Integer' Keyword.Type '))' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'IntOfByteA' Name.Function '(' Punctuation 'A' Name ':' Operator ' ' Text 'TByteA' Name ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n ' Text 'Move' Name.Builtin '(' Punctuation 'Pointer' Keyword.Type '(' Punctuation 'A' Name ')' Punctuation '^' Operator ',' Operator ' ' Text 'Result' Name.Builtin.Pseudo ',' Operator ' ' Text 'Min' Name.Builtin '(' Punctuation 'Length' Name.Builtin '(' Punctuation 'A' Name ')' Punctuation ',' Operator ' ' Text 'SizeOf' Name.Builtin '(' Punctuation 'Integer' Keyword.Type ')))' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'ByteAOfHex' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Hex' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'TByteA' Name ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n ' Text 'h' Name ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'h' Name ' ' Text ':' Operator '=' Operator ' ' Text 'ExtractChars' Name '(' Punctuation 'Hex' Name ',' Operator ' ' Text 'HexadecimalChars' Name ')' Punctuation ';' Operator '\n ' Text 'SetLength' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'h' Name ')' Punctuation ' ' Text 'div' Keyword ' ' Text '2' Literal.Number.Integer ')' Punctuation ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'High' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation ' ' Text 'do' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo '[' Punctuation 'i' Name ']' Punctuation ' ' Text ':' Operator '=' Operator ' ' Text 'ByteOfHex' Name '(' Punctuation 'Copy' Name.Builtin '(' Punctuation 'h' Name ',' Operator ' ' Text '(' Punctuation 'i' Name ' ' Text 'shl' Keyword ' ' Text '1' Literal.Number.Integer ')' Punctuation ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer ',' Operator ' ' Text '2' Literal.Number.Integer '))' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'SizeOfFile' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'F' Name ':' Operator ' ' Text 'file' Keyword ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'AssignFile' Name.Builtin '(' Punctuation 'F' Name ',' Operator ' ' Text 'FileName' Name ')' Punctuation ';' Operator '\n ' Text '{$I-}' Comment.Multiline 'Reset' Name.Builtin '(' Punctuation 'F' Name ',' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation ';' Operator '{$I+}' Comment.Multiline '\n ' Text 'if' Keyword ' ' Text 'IOResult' Name.Builtin ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'FileSize' Name.Builtin '(' Punctuation 'F' Name ')' Punctuation ';' Operator '\n ' Text 'CloseFile' Name.Builtin '(' Punctuation 'F' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ' ' Text 'else' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'FileEx' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'AllowFolders' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'False' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'FindData' Name ':' Operator ' ' Text 'TWin32FindData' Name ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'FileName' Name ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'False' Keyword ';' Operator '\n ' Text 'Exit' Keyword ';' Operator ' ' Text 'end' Keyword ';' Operator '\n\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '(' Punctuation 'AllowFolders' Name ' ' Text 'and' Keyword ' ' Text 'DirectoryExists' Name.Builtin '(' Punctuation 'FileName' Name '))' Punctuation ' ' Text 'or' Keyword '\n ' Text '(' Punctuation 'FindFirstFile' Name '(' Punctuation 'PChar' Keyword.Type '(' Punctuation 'FileName' Name ')' Punctuation ',' Operator ' ' Text 'FindData' Name ')' Punctuation ' ' Text '<' Operator '>' Operator ' ' Text 'INVALID_HANDLE_VALUE' Name ')' Punctuation ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text 'and' Keyword ' ' Text 'not' Keyword ' ' Text 'CharIn' Name '(' Punctuation 'FileName' Name ',' Operator ' ' Text 'WildCards' Name ')' Punctuation ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text 'and' Keyword ' ' Text '(' Punctuation 'AllowFolders' Name '\n ' Text 'or' Keyword ' ' Text '((' Punctuation 'FindData' Name '.' Operator 'dwFileAttributes' Name ' ' Text 'and' Keyword ' ' Text 'FILE_ATTRIBUTE_DIRECTORY' Name ')' Punctuation ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer '))' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'LWPSolve' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Dir' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text '(' Punctuation 'Dir' Name ' ' Text '<' Operator '>' Operator ' ' Text "'" Literal.String "'" Literal.String ')' Punctuation ' ' Text 'and' Keyword ' ' Text '(' Punctuation 'Dir' Name '[' Punctuation 'Length' Name.Builtin '(' Punctuation 'Dir' Name ')]' Punctuation ' ' Text '=' Operator ' ' Text "'" Literal.String '\\' Literal.String "'" Literal.String ')' Punctuation ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'Dir' Name ',' Operator ' ' Text '1' Literal.Number.Integer ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'Dir' Name ')' Punctuation ' ' Text '-' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ' ' Text 'else' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Dir' Name ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'LWPSlash' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Dir' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text '(' Punctuation 'Dir' Name ' ' Text '<' Operator '>' Operator ' ' Text "'" Literal.String "'" Literal.String ')' Punctuation ' ' Text 'and' Keyword ' ' Text '(' Punctuation 'Dir' Name '[' Punctuation 'Length' Name.Builtin '(' Punctuation 'Dir' Name ')]' Punctuation ' ' Text '=' Operator ' ' Text "'" Literal.String '\\' Literal.String "'" Literal.String ')' Punctuation ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'Dir' Name ',' Operator ' ' Text '1' Literal.Number.Integer ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'Dir' Name '))' Punctuation ';' Operator '\n ' Text 'end' Keyword ' ' Text 'else' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Dir' Name ' ' Text '+' Operator ' ' Text "'" Literal.String '\\' Literal.String "'" Literal.String ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'ExtractDrive' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'if' Keyword ' ' Text '(' Punctuation 'Length' Name.Builtin '(' Punctuation 'FileName' Name ')' Punctuation ' ' Text '>' Operator '=' Operator ' ' Text '2' Literal.Number.Integer ')' Punctuation ' ' Text 'and' Keyword ' ' Text '(' Punctuation 'FileName' Name '[' Punctuation '2' Literal.Number.Integer ']' Punctuation ' ' Text '=' Operator ' ' Text "'" Literal.String ':' Literal.String "'" Literal.String ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'UpperCase' Name.Builtin '(' Punctuation 'FileName' Name '[' Punctuation '1' Literal.Number.Integer ']' Punctuation ' ' Text '+' Operator ' ' Text "'" Literal.String ':\\' Literal.String "'" Literal.String ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'ExtractPath' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'p' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'p' Name ' ' Text ':' Operator '=' Operator ' ' Text 'CharPosR' Name '(' Punctuation "'" Literal.String '\\' Literal.String "'" Literal.String ',' Operator ' ' Text 'FileName' Name ')' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'P' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'FileName' Name ',' Operator ' ' Text '1' Literal.Number.Integer ',' Operator ' ' Text 'p' Name ')' Punctuation '\n ' Text 'else' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'FileName' Name ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'ExtractPrefix' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'UntilLastChar' Name '(' Punctuation 'ExtractFileName' Name.Builtin '(' Punctuation 'FileName' Name ')' Punctuation ',' Operator ' ' Text "'" Literal.String '.' Literal.String "'" Literal.String ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'ExtractSuffix' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'FromLastChar' Name '(' Punctuation 'ExtractFileName' Name.Builtin '(' Punctuation 'FileName' Name ')' Punctuation ',' Operator ' ' Text "'" Literal.String '.' Literal.String "'" Literal.String ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'SameByteA' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'A' Name ',' Operator ' ' Text 'B' Name ':' Operator ' ' Text 'TByteA' Name ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '(' Punctuation 'A' Name ' ' Text '=' Operator ' ' Text 'B' Name ')' Punctuation ' ' Text 'or' Keyword ' ' Text '((' Punctuation 'Length' Name.Builtin '(' Punctuation 'A' Name ')' Punctuation ' ' Text '=' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'B' Name '))' Punctuation ' ' Text 'and' Keyword ' ' Text 'CompareMem' Name.Builtin '(' Punctuation 'A' Name ',' Operator ' ' Text 'B' Name ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'A' Name ')))' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Reverse' Name.Function '(' Punctuation 'A' Name ':' Operator ' ' Text 'TByteA' Name ')' Punctuation ':' Operator ' ' Text 'TByteA' Name ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'SetLength' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'A' Name '))' Punctuation ';' Operator '\n\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'High' Name.Builtin '(' Punctuation 'A' Name ')' Punctuation ' ' Text 'do' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo '[' Punctuation 'High' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation ' ' Text '-' Operator ' ' Text 'i' Name ']' Punctuation ' ' Text ':' Operator '=' Operator ' ' Text 'A' Name '[' Punctuation 'i' Name ']' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Endian' Name.Function '(' Punctuation 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'type' Keyword '\n ' Text 'EndianArray' Name ' ' Text '=' Operator ' ' Text 'packed' Keyword ' ' Text 'array' Keyword '[' Punctuation '0' Literal.Number.Integer '.' Operator '.' Operator '3' Literal.Number.Integer ']' Punctuation ' ' Text 'of' Keyword ' ' Text 'Byte' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'a' Name ',' Operator ' ' Text 'b' Name ':' Operator ' ' Text 'EndianArray' Name ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'a' Name ' ' Text ':' Operator '=' Operator ' ' Text 'EndianArray' Name '(' Punctuation 'i' Name ')' Punctuation ';' Operator '\n ' Text 'b' Name '[' Punctuation '0' Literal.Number.Integer ']' Punctuation ' ' Text ':' Operator '=' Operator ' ' Text 'a' Name '[' Punctuation '3' Literal.Number.Integer ']' Punctuation ';' Operator '\n ' Text 'b' Name '[' Punctuation '1' Literal.Number.Integer ']' Punctuation ' ' Text ':' Operator '=' Operator ' ' Text 'a' Name '[' Punctuation '2' Literal.Number.Integer ']' Punctuation ';' Operator '\n ' Text 'b' Name '[' Punctuation '2' Literal.Number.Integer ']' Punctuation ' ' Text ':' Operator '=' Operator ' ' Text 'a' Name '[' Punctuation '1' Literal.Number.Integer ']' Punctuation ';' Operator '\n ' Text 'b' Name '[' Punctuation '3' Literal.Number.Integer ']' Punctuation ' ' Text ':' Operator '=' Operator ' ' Text 'a' Name '[' Punctuation '0' Literal.Number.Integer ']' Punctuation ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Integer' Keyword.Type '(' Punctuation 'b' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'SaveByteA' Name.Function '(' Punctuation 'Data' Name ':' Operator ' ' Text 'TByteA' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ';' Operator '\n ' Text 'Overwrite' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'True' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'F' Name ':' Operator ' ' Text 'file' Keyword ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'FileExists' Name.Builtin '(' Punctuation 'FileName' Name ')' Punctuation ' ' Text 'and' Keyword ' ' Text 'not' Keyword ' ' Text 'Overwrite' Name ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'False' Keyword ';' Operator '\n ' Text 'Exit' Keyword ' ' Text 'end' Keyword ';' Operator '\n\n ' Text 'AssignFile' Name.Builtin '(' Punctuation 'F' Name ',' Operator ' ' Text 'FileName' Name ')' Punctuation ';' Operator '\n ' Text '{$I-}' Comment.Multiline 'Rewrite' Name.Builtin '(' Punctuation 'F' Name ',' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation ';' Operator '{$I+}' Comment.Multiline '\n ' Text 'if' Keyword ' ' Text 'IOResult' Name.Builtin ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'Length' Name.Builtin '(' Punctuation 'Data' Name ')' Punctuation ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'BlockWrite' Name.Builtin '(' Punctuation 'F' Name ',' Operator ' ' Text 'Data' Name '[' Punctuation '0' Literal.Number.Integer ']' Punctuation ',' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'Data' Name '))' Punctuation ';' Operator '\n ' Text 'CloseFile' Name.Builtin '(' Punctuation 'F' Name ')' Punctuation ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'True' Keyword ';' Operator '\n ' Text 'end' Keyword ' ' Text 'else' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'False' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'LoadByteA' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'TByteA' Name ';' Operator '\n' Text 'var' Keyword '\n ' Text 'F' Name ':' Operator ' ' Text 'file' Keyword ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'AssignFile' Name.Builtin '(' Punctuation 'F' Name ',' Operator ' ' Text 'FileName' Name ')' Punctuation ';' Operator '\n ' Text '{$I-}' Comment.Multiline 'Reset' Name.Builtin '(' Punctuation 'F' Name ',' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation ';' Operator '{$I+}' Comment.Multiline '\n ' Text 'if' Keyword ' ' Text 'IOResult' Name.Builtin ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'SetLength' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ',' Operator ' ' Text 'FileSize' Name.Builtin '(' Punctuation 'F' Name '))' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'Length' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ')' Punctuation ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'BlockRead' Name.Builtin '(' Punctuation 'F' Name ',' Operator ' ' Text 'Result' Name.Builtin.Pseudo '[' Punctuation '0' Literal.Number.Integer ']' Punctuation ',' Operator ' ' Text 'FileSize' Name.Builtin '(' Punctuation 'F' Name '))' Punctuation ';' Operator '\n ' Text 'CloseFile' Name.Builtin '(' Punctuation 'F' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ' ' Text 'else' Keyword '\n ' Text 'SetLength' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ',' Operator ' ' Text '0' Literal.Number.Integer ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'IsValidFileName' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '(' Punctuation 'FileName' Name ' ' Text '<' Operator '>' Operator ' ' Text "'" Literal.String "'" Literal.String ')' Punctuation ' ' Text 'and' Keyword ' ' Text 'not' Keyword ' ' Text 'CharIn' Name '(' Punctuation 'FileName' Name ',' Operator ' ' Text 'FileNameEnemies' Name ')' Punctuation '\n ' Text 'and' Keyword ' ' Text 'CharIn' Name '(' Punctuation 'Trim' Name.Builtin '(' Punctuation 'FileName' Name ')' Punctuation ',' Operator ' ' Text 'AllChars' Name ' ' Text '-' Operator ' ' Text '[' Punctuation "'" Literal.String '.' Literal.String "'" Literal.String '])' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'MakeValidFileName' Name.Function '(' Punctuation 'FileName' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'const' Keyword ' ' Text 'Default' Keyword.Pseudo ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String 'File' Literal.String "'" Literal.String ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'FileName' Name ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ' ' Text 'then' Keyword '\n ' Text 'FileName' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Default' Keyword.Pseudo ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'CharIn' Name '(' Punctuation 'FileName' Name ',' Operator ' ' Text 'FileNameEnemies' Name ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'ReplaceChars' Name '(' Punctuation 'FileName' Name ',' Operator ' ' Text 'FileNameEnemies' Name ',' Operator ' ' Text "'" Literal.String '_' Literal.String "'" Literal.String ')' Punctuation '\n ' Text 'else' Keyword ' ' Text 'if' Keyword ' ' Text 'not' Keyword ' ' Text 'CharIn' Name '(' Punctuation 'Trim' Name.Builtin '(' Punctuation 'FileName' Name ')' Punctuation ',' Operator ' ' Text 'AllChars' Name ' ' Text '-' Operator ' ' Text '[' Punctuation "'" Literal.String '.' Literal.String "'" Literal.String '])' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Default' Keyword.Pseudo '\n ' Text 'else' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'FileName' Name ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'IsValidInteger' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text "{const\n LowInt = '2147483648';\n HighInt = '2147483647';\nvar\n len, RealLen, i, o: Integer;\n c: Char;\nbegin\n Result := False;\n if S = '' then\n Exit;\n\n len := Length(S);\n o := 1;\n \n if S[1] = '-' then begin\n if len = 1 then\n Exit;\n Inc(o);\n while (o <= len) and (S[o] = '0') do\n Inc(o);\n if o > len then\n Exit;\n if o < len then begin\n RealLen := len - o + 1;\n if RealLen > Length(LowInt) then\n Exit\n else if RealLen = Length(LowInt) then begin\n for i := 1 to Length(LowInt) do begin\n c := S[i + o - 1];\n if (c < '0') or (c > LowInt[i]) then\n Exit;\n if c in ['0'..Char((Byte(LowInt[i])-1))] then\n Break;\n end;\n Inc(o, i);\n end;\n end;\n end else begin\n while (o <= len) and (S[o] = '0') do\n Inc(o);\n if o <= len then begin\n RealLen := len - o + 1;\n if RealLen > Length(HighInt) then\n Exit\n else if RealLen = Length(HighInt) then begin\n for i := 1 to Length(HighInt) do begin\n c := S[i + o - 1];\n if (c < '0') or (c > HighInt[i]) then\n Exit;\n if c in ['0'..Char((Byte(HighInt[i])-1))] then\n Break;\n end;\n Inc(o, i);\n end;\n end;\n end;\n\n for i := o to len do\n if not (S[i] in ['0'..'9']) then\n Exit;\n\n Result := True; }" Comment.Multiline '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Int64' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text 'StrToInt64Def' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text 'High' Name.Builtin '(' Punctuation 'Int64' Keyword.Type '))' Punctuation ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '(' Punctuation 'i' Name ' ' Text '>' Operator '=' Operator ' ' Text 'Low' Name.Builtin '(' Punctuation 'Integer' Keyword.Type '))' Punctuation ' ' Text 'and' Keyword ' ' Text '(' Punctuation 'i' Name ' ' Text '<' Operator '=' Operator ' ' Text 'High' Name.Builtin '(' Punctuation 'Integer' Keyword.Type '))' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'IsValidCardinal' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text "{const\n HighCard = '4294967295';\nvar\n len, RealLen, i, o: Integer;\nbegin\n Result := False;\n if S = '' then\n Exit;\n\n len := Length(S);\n o := 1;\n \n while (o <= len) and (S[o] = '0') do\n Inc(o);\n if o <= len then begin\n RealLen := len - o + 1;\n if RealLen > Length(HighCard) then\n Exit\n else if RealLen = Length(HighCard) then begin\n for i := 1 to Length(HighCard) do begin\n if S[i + o - 1] > HighCard[i] then\n Exit;\n if S[i + o - 1] in ['0'..Char((Byte(HighCard[i])-1))] then\n Break;\n end;\n Inc(o, i);\n end;\n end;\n\n for i := o to len do\n if not (S[i] in ['0'..'9']) then\n Exit;\n\n Result := True; }" Comment.Multiline '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Int64' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text 'StrToInt64Def' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text '-' Operator '1' Literal.Number.Integer ')' Punctuation ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '(' Punctuation 'i' Name ' ' Text '>' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ')' Punctuation ' ' Text 'and' Keyword ' ' Text '(' Punctuation 'i' Name ' ' Text '<' Operator '=' Operator ' ' Text 'High' Name.Builtin '(' Punctuation 'Cardinal' Keyword.Type '))' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'StrOfBool' Name.Function '(' Punctuation 'flag' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator ' ' Text 'const' Keyword ' ' Text 'TrueStr' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String 'True' Literal.String "'" Literal.String ';' Operator '\n ' Text 'const' Keyword ' ' Text 'FalseStr' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String 'False' Literal.String "'" Literal.String ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'Flag' Name ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'TrueStr' Name '\n ' Text 'else' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'FalseStr' Name ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'StrOfInt' Name.Function '(' Punctuation 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'begin' Keyword '\n' Text "{ if i = 0 then begin\n Result := '0';\n Exit end;\n\n while i > 0 do begin\n Result := Char(Byte('0') + (i mod 10)) + Result;\n i := i div 10;\n end;}" Comment.Multiline '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'IntToStr' Name.Builtin '(' Punctuation 'i' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'CardOfStr' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Cardinal' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'Res' Name ':' Operator ' ' Text 'Int64' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Res' Name ' ' Text ':' Operator '=' Operator ' ' Text 'StrToInt64Def' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text '-' Operator '1' Literal.Number.Integer ')' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'Res' Name ' ' Text '>' Operator ' ' Text 'High' Name.Builtin '(' Punctuation 'Cardinal' Keyword.Type ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Res' Name ' ' Text ':' Operator '=' Operator ' ' Text 'High' Name.Builtin '(' Punctuation 'Cardinal' Keyword.Type ')' Punctuation '\n ' Text 'else' Keyword ' ' Text 'if' Keyword ' ' Text 'Res' Name ' ' Text '<' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Res' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Cardinal' Keyword.Type '(' Punctuation 'Res' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'HexOrd' Name.Function '(' Punctuation 'Hex' Name ':' Operator ' ' Text 'Char' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'THex' Name ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'case' Keyword ' ' Text 'Hex' Name ' ' Text 'of' Keyword '\n ' Text "'" Literal.String '0' Literal.String "'" Literal.String '.' Operator '.' Operator "'" Literal.String '9' Literal.String "'" Literal.String ':' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Byte' Keyword.Type '(' Punctuation 'Hex' Name ')' Punctuation ' ' Text '-' Operator ' ' Text '48' Literal.Number.Integer ';' Operator '\n ' Text "'" Literal.String 'A' Literal.String "'" Literal.String '.' Operator '.' Operator "'" Literal.String 'F' Literal.String "'" Literal.String ':' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Byte' Keyword.Type '(' Punctuation 'Hex' Name ')' Punctuation ' ' Text '-' Operator ' ' Text '55' Literal.Number.Integer ';' Operator '\n ' Text "'" Literal.String 'a' Literal.String "'" Literal.String '.' Operator '.' Operator "'" Literal.String 'f' Literal.String "'" Literal.String ':' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Byte' Keyword.Type '(' Punctuation 'Hex' Name ')' Punctuation ' ' Text '-' Operator ' ' Text '87' Literal.Number.Integer ';' Operator '\n ' Text 'else' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'ByteOfHex' Name.Function '(' Punctuation 'Hex' Name ':' Operator ' ' Text 'THexByteStr' Name ')' Punctuation ':' Operator ' ' Text 'Byte' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '(' Punctuation 'HexOrd' Name '(' Punctuation 'Hex' Name '[' Punctuation '1' Literal.Number.Integer '])' Punctuation ' ' Text 'shl' Keyword ' ' Text '4' Literal.Number.Integer ')' Punctuation ' ' Text '+' Operator ' ' Text 'HexOrd' Name '(' Punctuation 'Hex' Name '[' Punctuation '2' Literal.Number.Integer '])' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'DecOfHex' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Hex' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'IntToStr' Name.Builtin '(' Punctuation 'CardOfHex' Name '(' Punctuation 'Hex' Name '))' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'HexOfByte' Name.Function '(' Punctuation 'b' Name ':' Operator ' ' Text 'Byte' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'THexByteStr' Name ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'HexChar' Name '[(' Punctuation 'b' Name ' ' Text 'and' Keyword ' ' Text '$F0' Literal.Number.Hex ')' Punctuation ' ' Text 'shr' Keyword ' ' Text '4' Literal.Number.Integer ']' Punctuation '\n ' Text '+' Operator ' ' Text 'HexChar' Name '[' Punctuation ' ' Text 'b' Name ' ' Text 'and' Keyword ' ' Text '$0F' Literal.Number.Hex ' ' Text ']' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text "{function HexOfCard2(c: Cardinal): string;\nvar\n Data: array[0..(1 shl 4) - 1] of Char;\n i: Integer;\nbegin\n for i := 0 to (1 shl 4) - 1 do\n if i < 10 then\n Data[i] := Char(Ord('0') + i)\n else\n Data[i] := Char(Ord('A') + i - 10);\n\n Result := Data[(c and (((1 shl (1 shl 2)) - 1) shl (7 shl 2))) shr (7 shl 2)]\n + Data[(c and (((1 shl (1 shl 2)) - 1) shl (6 shl 2))) shr (6 shl 2)]\n + Data[(c and (((1 shl (1 shl 2)) - 1) shl (5 shl 2))) shr (5 shl 2)]\n + Data[(c and (((1 shl (1 shl 2)) - 1) shl (4 shl 2))) shr (4 shl 2)]\n + Data[(c and (((1 shl (1 shl 2)) - 1) shl (3 shl 2))) shr (3 shl 2)]\n + Data[(c and (((1 shl (1 shl 2)) - 1) shl (2 shl 2))) shr (2 shl 2)]\n + Data[(c and (((1 shl (1 shl 2)) - 1) shl (1 shl 2))) shr (1 shl 2)]\n + Data[(c and (((1 shl (1 shl 2)) - 1) shl (0 shl 2))) shr (0 shl 2)];\nend; }" Comment.Multiline '\n\n' Text 'function' Keyword ' ' Text 'HexOfCard' Name.Function '(' Punctuation 'i' Name ':' Operator ' ' Text 'Cardinal' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'a' Name ':' Operator ' ' Text 'Cardinal' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'while' Keyword ' ' Text 'i' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'a' Name ' ' Text ':' Operator '=' Operator ' ' Text 'i' Name ' ' Text 'and' Keyword ' ' Text '$F' Literal.Number.Hex ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'HexChar' Name '[' Punctuation 'a' Name ']' Punctuation ' ' Text '+' Operator ' ' Text 'Result' Name.Builtin.Pseudo ';' Operator '\n ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text 'i' Name ' ' Text 'shr' Keyword ' ' Text '4' Literal.Number.Integer ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'HexOfCard' Name.Function '(' Punctuation 'i' Name ':' Operator ' ' Text 'Cardinal' Keyword.Type ';' Operator ' ' Text 'Digits' Name ':' Operator ' ' Text 'Integer' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'a' Name ':' Operator ' ' Text 'Cardinal' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'while' Keyword ' ' Text 'i' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'a' Name ' ' Text ':' Operator '=' Operator ' ' Text 'i' Name ' ' Text 'and' Keyword ' ' Text '$F' Literal.Number.Hex ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'HexChar' Name '[' Punctuation 'a' Name ']' Punctuation ' ' Text '+' Operator ' ' Text 'Result' Name.Builtin.Pseudo ';' Operator '\n ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text 'i' Name ' ' Text 'shr' Keyword ' ' Text '4' Literal.Number.Integer ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'MulStr' Name '(' Punctuation "'" Literal.String '0' Literal.String "'" Literal.String ',' Operator ' ' Text 'Digits' Name ' ' Text '-' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo '))' Punctuation ' ' Text '+' Operator ' ' Text 'Result' Name.Builtin.Pseudo ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'PascalHexArray' Name.Function '(' Punctuation 'a' Name ':' Operator ' ' Text 'TByteA' Name ';' Operator ' ' Text 'Name' Keyword.Pseudo ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ',' Operator ' ' Text 'len' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String 'const' Literal.String "'" Literal.String ' ' Text '+' Operator ' ' Text 'EOL' Name ' ' Text '+' Operator '\n ' Text "'" Literal.String ' ' Literal.String "'" Literal.String ' ' Text '+' Operator ' ' Text 'Name' Name ' ' Text '+' Operator ' ' Text "'" Literal.String ': array[0..' Literal.String "'" Literal.String ' ' Text '+' Operator ' ' Text 'IntToStr' Name.Builtin '(' Punctuation 'High' Name.Builtin '(' Punctuation 'a' Name '))' Punctuation ' ' Text '+' Operator ' ' Text "'" Literal.String '] of Byte = (' Literal.String "'" Literal.String ';' Operator '\n\n ' Text 'len' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'a' Name ')' Punctuation ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'len' Name '-' Operator '1' Literal.Number.Integer ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text '(' Punctuation 'i' Name ' ' Text 'mod' Keyword ' ' Text '19' Literal.Number.Integer ')' Punctuation ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'EOL' Name ' ' Text '+' Operator ' ' Text "'" Literal.String ' ' Literal.String "'" Literal.String ' ' Text '+' Operator ' ' Text "'" Literal.String ' ' Literal.String "'" Literal.String ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text "'" Literal.String '$' Literal.String "'" Literal.String ' ' Text '+' Operator ' ' Text 'HexOfByte' Name '(' Punctuation 'a' Name '[' Punctuation 'i' Name '])' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'i' Name ' ' Text '<' Operator ' ' Text 'len' Name '-' Operator '1' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text "'" Literal.String ',' Literal.String "'" Literal.String ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'EOL' Name ' ' Text '+' Operator ' ' Text "'" Literal.String ' );' Literal.String "'" Literal.String ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'HexOfByteA' Name.Function '(' Punctuation 'a' Name ':' Operator ' ' Text 'TByteA' Name ';' Operator ' ' Text 'Blocks' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text '1' Literal.Number.Integer ';' Operator '\n ' Text 'const' Keyword ' ' Text 'Splitter' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String ' ' Literal.String "'" Literal.String ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'Blocks' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'High' Name.Builtin '(' Punctuation 'a' Name ')' Punctuation ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'HexOfByte' Name '(' Punctuation 'a' Name '[' Punctuation 'i' Name '])' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'i' Name ' ' Text '<' Operator ' ' Text 'High' Name.Builtin '(' Punctuation 'a' Name ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'if' Keyword ' ' Text '((' Punctuation 'i' Name '+' Operator '1' Literal.Number.Integer ')' Punctuation ' ' Text 'mod' Keyword ' ' Text 'Blocks' Name ')' Punctuation ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'Splitter' Name ';' Operator '\n ' Text 'end' Keyword '\n ' Text 'else' Keyword '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'High' Name.Builtin '(' Punctuation 'a' Name ')' Punctuation ' ' Text 'do' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'HexOfByte' Name '(' Punctuation 'a' Name '[' Punctuation 'i' Name '])' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'BinOfByteA' Name.Function '(' Punctuation 'a' Name ':' Operator ' ' Text 'TByteA' Name ';' Operator ' ' Text 'Blocks' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text '4' Literal.Number.Integer ';' Operator '\n ' Text 'const' Keyword ' ' Text 'Splitter' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String ' ' Literal.String "'" Literal.String ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ',' Operator ' ' Text 'max' Name.Builtin ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n ' Text 'Bit' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'Blocks' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'max' Name.Builtin ' ' Text ':' Operator '=' Operator ' ' Text '8' Literal.Number.Integer ' ' Text '*' Operator ' ' Text '(' Punctuation 'High' Name.Builtin '(' Punctuation 'a' Name '))' Punctuation ' ' Text '+' Operator ' ' Text '7' Literal.Number.Integer ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'max' Name.Builtin ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Bit' Name ' ' Text ':' Operator '=' Operator ' ' Text '7' Literal.Number.Integer '-' Operator '(' Punctuation 'i' Name ' ' Text 'mod' Keyword ' ' Text '8' Literal.Number.Integer ')' Punctuation ' ' Text 'in' Keyword ' ' Text 'TBitSet' Name '(' Punctuation 'a' Name '[' Punctuation 'i' Name ' ' Text 'div' Keyword ' ' Text '8' Literal.Number.Integer '])' Punctuation ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'Char' Keyword.Type '(' Punctuation 'Byte' Keyword.Type '(' Punctuation "'" Literal.String '0' Literal.String "'" Literal.String ')' Punctuation ' ' Text '+' Operator ' ' Text 'Byte' Keyword.Type '(' Punctuation 'Bit' Name '))' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'i' Name ' ' Text '<' Operator ' ' Text 'max' Name.Builtin ' ' Text 'then' Keyword '\n ' Text 'if' Keyword ' ' Text '((' Punctuation 'i' Name '+' Operator '1' Literal.Number.Integer ')' Punctuation ' ' Text 'mod' Keyword ' ' Text 'Blocks' Name ')' Punctuation ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'Splitter' Name ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'end' Keyword ' ' Text 'else' Keyword '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'High' Name.Builtin '(' Punctuation 'a' Name ')' Punctuation ' ' Text 'do' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'Char' Keyword.Type '(' Punctuation 'Byte' Keyword.Type '(' Punctuation "'" Literal.String '0' Literal.String "'" Literal.String ')' Punctuation ' ' Text '+' Operator ' ' Text 'a' Name '[' Punctuation 'i' Name ']' Punctuation ' ' Text 'shr' Keyword ' ' Text '(' Punctuation 'i' Name ' ' Text 'and' Keyword ' ' Text '8' Literal.Number.Integer '))' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'CardOfHex' Name.Function '(' Punctuation 'Hex' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Cardinal' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n ' Text 'Hex' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'ExtractChars' Name '(' Punctuation 'Hex' Name ',' Operator ' ' Text 'HexadecimalChars' Name ')' Punctuation ',' Operator ' ' Text '1' Literal.Number.Integer ',' Operator ' ' Text '8' Literal.Number.Integer ')' Punctuation ';' Operator '\n\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'Length' Name.Builtin '(' Punctuation 'Hex' Name ')' Punctuation ' ' Text 'do' Keyword '\n ' Text 'if' Keyword ' ' Text 'Hex' Name '[' Punctuation 'i' Name ']' Punctuation ' ' Text '<' Operator '>' Operator ' ' Text "'" Literal.String '0' Literal.String "'" Literal.String ' ' Text 'then' Keyword '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ',' Operator ' ' Text 'HexOrd' Name '(' Punctuation 'Hex' Name '[' Punctuation 'i' Name '])' Punctuation ' ' Text 'shl' Keyword ' ' Text '((' Punctuation 'Length' Name.Builtin '(' Punctuation 'Hex' Name ')' Punctuation ' ' Text '-' Operator ' ' Text 'i' Name ')' Punctuation ' ' Text 'shl' Keyword ' ' Text '2' Literal.Number.Integer '))' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'IntOfBin' Name.Function '(' Punctuation 'Bin' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Cardinal' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n ' Text 'Bin' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'ExtractChars' Name '(' Punctuation 'Bin' Name ',' Operator ' ' Text 'BinaryChars' Name ')' Punctuation ',' Operator ' ' Text '1' Literal.Number.Integer ',' Operator ' ' Text '32' Literal.Number.Integer ')' Punctuation ';' Operator '\n\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'Bin' Name ')' Punctuation ' ' Text 'downto' Keyword ' ' Text '1' Literal.Number.Integer ' ' Text 'do' Keyword '\n ' Text 'if' Keyword ' ' Text 'Bin' Name '[' Punctuation 'i' Name ']' Punctuation ' ' Text '=' Operator ' ' Text "'" Literal.String '1' Literal.String "'" Literal.String ' ' Text 'then' Keyword '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ',' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'shl' Keyword ' ' Text '(' Punctuation 'Length' Name.Builtin '(' Punctuation 'Bin' Name ')' Punctuation ' ' Text '-' Operator ' ' Text 'i' Name '))' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'BinOfInt' Name.Function '(' Punctuation 'n' Name ':' Operator ' ' Text 'Cardinal' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'a' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'n' Name ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String '0' Literal.String "'" Literal.String ';' Operator '\n ' Text 'exit' Keyword ';' Operator ' ' Text 'end' Keyword ';' Operator '\n\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'while' Keyword ' ' Text 'n' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'a' Name ' ' Text ':' Operator '=' Operator ' ' Text 'n' Name ' ' Text 'and' Keyword ' ' Text '1' Literal.Number.Integer ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Char' Keyword.Type '(' Punctuation 'a' Name ' ' Text '+' Operator ' ' Text 'Byte' Keyword.Type '(' Punctuation "'" Literal.String '0' Literal.String "'" Literal.String '))' Punctuation ' ' Text '+' Operator ' ' Text 'Result' Name.Builtin.Pseudo ';' Operator '\n ' Text 'n' Name ' ' Text ':' Operator '=' Operator ' ' Text 'n' Name ' ' Text 'shr' Keyword ' ' Text '1' Literal.Number.Integer ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'BinOfIntFill' Name.Function '(' Punctuation 'n' Name ':' Operator ' ' Text 'Cardinal' Keyword.Type ';' Operator ' ' Text 'MinCount' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text '8' Literal.Number.Integer ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'a' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'n' Name ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'MulStr' Name '(' Punctuation "'" Literal.String '0' Literal.String "'" Literal.String ',' Operator ' ' Text 'MinCount' Name ')' Punctuation ';' Operator '\n ' Text 'Exit' Keyword ';' Operator ' ' Text 'end' Keyword ';' Operator '\n\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'while' Keyword ' ' Text 'n' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'a' Name ' ' Text ':' Operator '=' Operator ' ' Text 'n' Name ' ' Text 'and' Keyword ' ' Text '1' Literal.Number.Integer ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Char' Keyword.Type '(' Punctuation 'a' Name ' ' Text '+' Operator ' ' Text 'Byte' Keyword.Type '(' Punctuation "'" Literal.String '0' Literal.String "'" Literal.String '))' Punctuation ' ' Text '+' Operator ' ' Text 'Result' Name.Builtin.Pseudo ';' Operator '\n ' Text 'n' Name ' ' Text ':' Operator '=' Operator ' ' Text 'n' Name ' ' Text 'shr' Keyword ' ' Text '1' Literal.Number.Integer ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'MulStr' Name '(' Punctuation "'" Literal.String '0' Literal.String "'" Literal.String ',' Operator ' ' Text 'MinCount' Name ' ' Text '-' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo '))' Punctuation ' ' Text '+' Operator ' ' Text 'Result' Name.Builtin.Pseudo ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'BaseNOfInt' Name.Function '(' Punctuation 'I' Name ':' Operator ' ' Text 'Cardinal' Keyword.Type ';' Operator ' ' Text 'B' Name ':' Operator ' ' Text 'TBaseN' Name ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'a' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text '(' Punctuation 'B' Name ' ' Text '<' Operator ' ' Text '2' Literal.Number.Integer ')' Punctuation ' ' Text 'or' Keyword ' ' Text '(' Punctuation 'i' Name ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ')' Punctuation ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String '0' Literal.String "'" Literal.String ';' Operator '\n ' Text 'Exit' Keyword ';' Operator ' ' Text 'end' Keyword ';' Operator '\n\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'while' Keyword ' ' Text 'i' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'a' Name ' ' Text ':' Operator '=' Operator ' ' Text 'i' Name ' ' Text 'mod' Keyword ' ' Text 'B' Name ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'BaseNChar' Name '[' Punctuation 'a' Name ']' Punctuation ' ' Text '+' Operator ' ' Text 'Result' Name.Builtin.Pseudo ';' Operator '\n ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text 'i' Name ' ' Text 'div' Keyword ' ' Text 'B' Name ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'IntOfBaseN' Name.Function '(' Punctuation 'V' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'B' Name ':' Operator ' ' Text 'TBaseN' Name ')' Punctuation ':' Operator ' ' Text 'Cardinal' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n ' Text 'F' Name ':' Operator ' ' Text 'Cardinal' Keyword.Type ';' Operator '\n ' Text 'c' Name ':' Operator ' ' Text 'Byte' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n ' Text 'V' Name ' ' Text ':' Operator '=' Operator ' ' Text 'TrimAll' Name '(' Punctuation 'V' Name ')' Punctuation ';' Operator '\n ' Text 'F' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'V' Name ')' Punctuation ' ' Text 'downto' Keyword ' ' Text '1' Literal.Number.Integer ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'c' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Byte' Keyword.Type '(' Punctuation 'UpCase' Name.Builtin '(' Punctuation 'V' Name '[' Punctuation 'i' Name ']))' Punctuation ';' Operator '\n ' Text 'case' Keyword ' ' Text 'Char' Keyword.Type '(' Punctuation 'c' Name ')' Punctuation ' ' Text 'of' Keyword '\n ' Text "'" Literal.String '0' Literal.String "'" Literal.String '.' Operator '.' Operator "'" Literal.String '9' Literal.String "'" Literal.String ':' Operator ' ' Text 'c' Name ' ' Text ':' Operator '=' Operator ' ' Text 'c' Name ' ' Text '-' Operator ' ' Text '48' Literal.Number.Integer ';' Operator '\n ' Text "'" Literal.String 'A' Literal.String "'" Literal.String '.' Operator '.' Operator "'" Literal.String 'Z' Literal.String "'" Literal.String ':' Operator ' ' Text 'c' Name ' ' Text ':' Operator '=' Operator ' ' Text 'c' Name ' ' Text '-' Operator ' ' Text '55' Literal.Number.Integer ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'if' Keyword ' ' Text 'c' Name ' ' Text '<' Operator ' ' Text 'B' Name ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'Byte' Keyword.Type '(' Punctuation 'c' Name ')' Punctuation ' ' Text '*' Operator ' ' Text 'F' Name ';' Operator '\n ' Text 'F' Name ' ' Text ':' Operator '=' Operator ' ' Text 'F' Name ' ' Text '*' Operator ' ' Text 'B' Name ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'KeepIn' Name.Function '(' Punctuation 'i' Name ',' Operator ' ' Text 'Bottom' Name ',' Operator ' ' Text 'Top' Name ':' Operator ' ' Text 'Variant' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Variant' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'i' Name ';' Operator '\n ' Text 'if' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '>' Operator ' ' Text 'Top' Name ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Top' Name '\n ' Text 'else' Keyword ' ' Text 'if' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '<' Operator ' ' Text 'Bottom' Name ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Bottom' Name ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'InRange' Name.Function '(' Punctuation 'Value' Name ',' Operator ' ' Text 'Bottom' Name ',' Operator ' ' Text 'Top' Name ':' Operator ' ' Text 'Variant' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '(' Punctuation 'Value' Name ' ' Text '>' Operator '=' Operator ' ' Text 'Bottom' Name ')' Punctuation ' ' Text 'and' Keyword ' ' Text '(' Punctuation 'Value' Name ' ' Text '<' Operator '=' Operator ' ' Text 'Top' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'InStrictRange' Name.Function '(' Punctuation 'Value' Name ',' Operator ' ' Text 'Bottom' Name ',' Operator ' ' Text 'Top' Name ':' Operator ' ' Text 'Variant' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '(' Punctuation 'Value' Name ' ' Text '>' Operator ' ' Text 'Bottom' Name ')' Punctuation ' ' Text 'and' Keyword ' ' Text '(' Punctuation 'Value' Name ' ' Text '<' Operator ' ' Text 'Top' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Min' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'A' Name ',' Operator ' ' Text 'B' Name ':' Operator ' ' Text 'Integer' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'A' Name ' ' Text '<' Operator ' ' Text 'B' Name ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'A' Name '\n ' Text 'else' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'B' Name ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Min' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'A' Name ':' Operator ' ' Text 'TIntA' Name ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n ' Text 'if' Keyword ' ' Text 'Length' Name.Builtin '(' Punctuation 'A' Name ')' Punctuation ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'A' Name '[' Punctuation '0' Literal.Number.Integer ']' Punctuation ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'High' Name.Builtin '(' Punctuation 'A' Name ')' Punctuation ' ' Text 'do' Keyword '\n ' Text 'if' Keyword ' ' Text 'A' Name '[' Punctuation 'i' Name ']' Punctuation ' ' Text '<' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'A' Name '[' Punctuation 'i' Name ']' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Max' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'A' Name ',' Operator ' ' Text 'B' Name ':' Operator ' ' Text 'Integer' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'A' Name ' ' Text '>' Operator ' ' Text 'B' Name ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'A' Name '\n ' Text 'else' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'B' Name ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Max' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'A' Name ':' Operator ' ' Text 'TIntA' Name ')' Punctuation ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n ' Text 'if' Keyword ' ' Text 'Length' Name.Builtin '(' Punctuation 'A' Name ')' Punctuation ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'A' Name '[' Punctuation '0' Literal.Number.Integer ']' Punctuation ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'High' Name.Builtin '(' Punctuation 'A' Name ')' Punctuation ' ' Text 'do' Keyword '\n ' Text 'if' Keyword ' ' Text 'A' Name '[' Punctuation 'i' Name ']' Punctuation ' ' Text '>' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'A' Name '[' Punctuation 'i' Name ']' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'RangesOfStr' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'TRanges' Name ';' Operator '\n' Text 'var' Keyword '\n ' Text 'SL' Name ':' Operator ' ' Text 'TStringList' Name ';' Operator '\n ' Text 'r' Name ',' Operator ' ' Text 'b' Name ',' Operator ' ' Text 't' Name ':' Operator ' ' Text 'string' Keyword ';' Operator '\n ' Text 'i' Name ',' Operator ' ' Text 'p' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n\n ' Text 'function' Keyword ' ' Text 'TryStrToCard' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'out' Name ' ' Text 'Value' Name ':' Operator ' ' Text 'Cardinal' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n ' Text 'var' Keyword '\n ' Text 'E' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n ' Text 'begin' Keyword '\n ' Text 'Val' Name.Builtin '(' Punctuation 'S' Name ',' Operator ' ' Text 'Value' Name ',' Operator ' ' Text 'E' Name ')' Punctuation ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'E' Name ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'nil' Keyword ';' Operator '\n ' Text 'SL' Name ' ' Text ':' Operator '=' Operator ' ' Text 'TStringList' Name '.' Operator 'Create' Name ';' Operator '\n ' Text 'try' Keyword '\n ' Text 'Split' Name '(' Punctuation 'S' Name ',' Operator ' ' Text 'RangesSeparator' Name ',' Operator ' ' Text 'SL' Name ')' Punctuation ';' Operator '\n ' Text 'SetLength' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ',' Operator ' ' Text 'SL' Name '.' Operator 'Count' Name ')' Punctuation ';' Operator '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'SL' Name '.' Operator 'Count' Name '-' Operator '1' Literal.Number.Integer ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'r' Name ' ' Text ':' Operator '=' Operator ' ' Text 'SL' Name '[' Punctuation 'i' Name ']' Punctuation ';' Operator '\n ' Text 'with' Keyword ' ' Text 'Result' Name.Builtin.Pseudo '[' Punctuation 'i' Name ']' Punctuation ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'p' Name ' ' Text ':' Operator '=' Operator ' ' Text 'CharPos' Name '(' Punctuation 'RangeInnerSeparator' Name ',' Operator ' ' Text 'r' Name ')' Punctuation ';' Operator '\n ' Text 'Simple' Name ' ' Text ':' Operator '=' Operator ' ' Text 'p' Name ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator ' ' Text "// no '-' found" Comment.Single '\n ' Text 'if' Keyword ' ' Text 'Simple' Name ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'r' Name ' ' Text '=' Operator ' ' Text 'RangeInfinite' Name ' ' Text 'then' Keyword ' ' Text 'begin' Keyword ' ' Text '// * --> *-*' Comment.Single '\n ' Text 'Simple' Name ' ' Text ':' Operator '=' Operator ' ' Text 'False' Keyword ';' Operator '\n ' Text 'Bottom' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Low' Name.Builtin '(' Punctuation 'Bottom' Name ')' Punctuation ';' Operator '\n ' Text 'Top' Name ' ' Text ':' Operator '=' Operator ' ' Text 'High' Name.Builtin '(' Punctuation 'Top' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ' ' Text 'else' Keyword ' ' Text 'if' Keyword ' ' Text 'not' Keyword ' ' Text 'TryStrToCard' Name '(' Punctuation 'r' Name ',' Operator ' ' Text 'Value' Name ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Break' Keyword ';' Operator '\n\n ' Text 'end' Keyword ' ' Text 'else' Keyword ' ' Text 'begin' Keyword '\n ' Text 'TileStr' Name '(' Punctuation 'r' Name ',' Operator ' ' Text 'p' Name ',' Operator ' ' Text 'p' Name ',' Operator ' ' Text 'b' Name ',' Operator ' ' Text 't' Name ')' Punctuation ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'b' Name ' ' Text '=' Operator ' ' Text 'RangeInfinite' Name ' ' Text 'then' Keyword '\n ' Text 'Bottom' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Low' Name.Builtin '(' Punctuation 'Bottom' Name ')' Punctuation '\n ' Text 'else' Keyword ' ' Text 'if' Keyword ' ' Text 'not' Keyword ' ' Text 'TryStrToCard' Name '(' Punctuation 'b' Name ',' Operator ' ' Text 'Bottom' Name ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Break' Keyword ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 't' Name ' ' Text '=' Operator ' ' Text 'RangeInfinite' Name ' ' Text 'then' Keyword '\n ' Text 'Top' Name ' ' Text ':' Operator '=' Operator ' ' Text 'High' Name.Builtin '(' Punctuation 'Top' Name ')' Punctuation '\n ' Text 'else' Keyword ' ' Text 'if' Keyword ' ' Text 'not' Keyword ' ' Text 'TryStrToCard' Name '(' Punctuation 't' Name ',' Operator ' ' Text 'Top' Name ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Break' Keyword ';' Operator '\n ' Text 'if' Keyword ' ' Text 'Bottom' Name ' ' Text '>' Operator ' ' Text 'Top' Name ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'p' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Bottom' Name ';' Operator ' ' Text 'Bottom' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Top' Name ';' Operator ' ' Text 'Top' Name ' ' Text ':' Operator '=' Operator ' ' Text 'p' Name ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'i' Name ' ' Text '<' Operator '>' Operator ' ' Text 'SL' Name '.' Operator 'Count' Name ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'nil' Keyword ';' Operator '\n\n ' Text 'finally' Keyword '\n ' Text 'SL' Name '.' Operator 'Free' Name ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'InRanges' Name.Function '(' Punctuation 'Ranges' Name ':' Operator ' ' Text 'TRanges' Name ';' Operator ' ' Text 'TestValue' Name ':' Operator ' ' Text 'Cardinal' Keyword.Type ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'True' Keyword ';' Operator '\n\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'High' Name.Builtin '(' Punctuation 'Ranges' Name ')' Punctuation ' ' Text 'do' Keyword '\n ' Text 'with' Keyword ' ' Text 'Ranges' Name '[' Punctuation 'i' Name ']' Punctuation ' ' Text 'do' Keyword '\n ' Text 'if' Keyword ' ' Text 'Simple' Name ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'TestValue' Name ' ' Text '=' Operator ' ' Text 'Value' Name ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'end' Keyword ' ' Text 'else' Keyword ' ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'InRange' Name.Builtin '(' Punctuation 'TestValue' Name ',' Operator ' ' Text 'Bottom' Name ',' Operator ' ' Text 'Top' Name ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'False' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'procedure' Keyword ' ' Text 'WriteSL' Name.Function '(' Punctuation 'Strings' Name ':' Operator ' ' Text 'TStrings' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'Prefix' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'const' Keyword ' ' Text 'Suffix' Name ':' Operator ' ' Text 'string' Keyword ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ')' Punctuation ';' Operator '\n' Text 'var' Keyword '\n ' Text 'i' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'for' Keyword ' ' Text 'i' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'Strings' Name '.' Operator 'Count' Name '-' Operator '1' Literal.Number.Integer ' ' Text 'do' Keyword '\n ' Text 'WriteLn' Name.Builtin '(' Punctuation 'Prefix' Name ' ' Text '+' Operator ' ' Text 'Strings' Name '[' Punctuation 'i' Name ']' Punctuation ' ' Text '+' Operator ' ' Text 'Suffix' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Success' Name.Function '(' Punctuation 'Res' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'ResultOnSuccess' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text 'ERROR_SUCCESS' Name ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '(' Punctuation 'Res' Name ' ' Text '=' Operator ' ' Text 'ResultOnSuccess' Name ')' Punctuation ';' Operator '\n ' Text 'LastSuccessRes' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Res' Name ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Failure' Name.Function '(' Punctuation 'Res' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator ' ' Text 'ResultOnSuccess' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text 'ERROR_SUCCESS' Name ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'not' Keyword ' ' Text 'Success' Name '(' Punctuation 'Res' Name ',' Operator ' ' Text 'ResultOnSuccess' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'ExpandString' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'Len' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n ' Text 'P' Name ',' Operator ' ' Text 'Res' Name ':' Operator ' ' Text 'PChar' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'P' Name ' ' Text ':' Operator '=' Operator ' ' Text 'PChar' Keyword.Type '(' Punctuation 'S' Name ')' Punctuation ';' Operator '\n ' Text 'Len' Name ' ' Text ':' Operator '=' Operator ' ' Text 'ExpandEnvironmentStrings' Name '(' Punctuation 'P' Name ',' Operator ' ' Text 'nil' Keyword ',' Operator ' ' Text '0' Literal.Number.Integer ')' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'Len' Name ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n\n ' Text 'GetMem' Name.Builtin '(' Punctuation 'Res' Name ',' Operator ' ' Text 'Len' Name ')' Punctuation ';' Operator '\n ' Text 'ExpandEnvironmentStrings' Name '(' Punctuation 'P' Name ',' Operator ' ' Text 'Res' Name ',' Operator ' ' Text 'Len' Name ')' Punctuation ';' Operator '\n\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Res' Name ';' Operator '\n ' Text 'FreeMem' Name.Builtin '(' Punctuation 'Res' Name ',' Operator ' ' Text 'Len' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'FindAll' Name.Function '(' Punctuation 'Strings' Name ':' Operator ' ' Text 'TStrings' Name ';' Operator ' ' Text 'const' Keyword ' ' Text 'Mask' Name ':' Operator ' ' Text 'string' Keyword ';' Operator '\n ' Text 'ScanSubDirs' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'True' Keyword ';' Operator ' ' Text 'Attributes' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text 'faFindEveryFile' Name ';' Operator '\n ' Text 'FileReturn' Name ':' Operator ' ' Text 'TFileNameFunc' Name ' ' Text '=' Operator ' ' Text 'nil' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'Path' Name ',' Operator ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n ' Text 'procedure' Keyword ' ' Text 'ScanDir' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Path' Name ',' Operator ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ';' Operator '\n ' Text 'var' Keyword '\n ' Text 'PSR' Name ':' Operator ' ' Text 'TSearchRec' Name ';' Operator '\n ' Text 'Res' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n\n ' Text 'procedure' Keyword ' ' Text 'Add' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'S' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ';' Operator '\n ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'S' Name ' ' Text '<' Operator '>' Operator ' ' Text "'" Literal.String "'" Literal.String ' ' Text 'then' Keyword '\n ' Text 'Strings' Name '.' Operator 'Add' Name '(' Punctuation 'S' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n ' Text 'begin' Keyword '\n ' Text 'Res' Name ' ' Text ':' Operator '=' Operator ' ' Text 'FindFirst' Name.Builtin '(' Punctuation 'Path' Name ' ' Text '+' Operator ' ' Text 'FileName' Name ',' Operator ' ' Text 'Attributes' Name ',' Operator ' ' Text 'PSR' Name ')' Punctuation ';' Operator '\n ' Text 'while' Keyword ' ' Text 'Success' Name '(' Punctuation 'Res' Name ',' Operator ' ' Text '0' Literal.Number.Integer ')' Punctuation ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'Assigned' Name.Builtin '(' Punctuation 'FileReturn' Name ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Add' Name '(' Punctuation 'FileReturn' Name '(' Punctuation 'Path' Name ' ' Text '+' Operator ' ' Text 'PSR' Name '.' Operator 'Name' Name '))' Punctuation '\n ' Text 'else' Keyword '\n ' Text 'Add' Name '(' Punctuation 'Path' Name ' ' Text '+' Operator ' ' Text 'PSR' Name '.' Operator 'Name' Name ')' Punctuation ';' Operator '\n ' Text 'Res' Name ' ' Text ':' Operator '=' Operator ' ' Text 'FindNext' Name.Builtin '(' Punctuation 'PSR' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'FindClose' Name.Builtin '(' Punctuation 'PSR' Name ')' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'not' Keyword ' ' Text 'ScanSubDirs' Name ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n\n ' Text 'Res' Name ' ' Text ':' Operator '=' Operator ' ' Text 'FindFirst' Name.Builtin '(' Punctuation 'Path' Name ' ' Text '+' Operator ' ' Text "'" Literal.String '*' Literal.String "'" Literal.String ',' Operator ' ' Text 'faDirectory' Name ',' Operator ' ' Text 'PSR' Name ')' Punctuation ';' Operator '\n ' Text 'while' Keyword ' ' Text 'Success' Name '(' Punctuation 'Res' Name ',' Operator ' ' Text '0' Literal.Number.Integer ')' Punctuation ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text '(' Punctuation 'PSR' Name '.' Operator 'Attr' Name ' ' Text 'and' Keyword ' ' Text 'faDirectory' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ')' Punctuation '\n ' Text 'and' Keyword ' ' Text '(' Punctuation 'PSR' Name '.' Operator 'Name' Name ' ' Text '<' Operator '>' Operator ' ' Text "'" Literal.String '.' Literal.String "'" Literal.String ')' Punctuation ' ' Text 'and' Keyword ' ' Text '(' Punctuation 'PSR' Name '.' Operator 'Name' Name ' ' Text '<' Operator '>' Operator ' ' Text "'" Literal.String '..' Literal.String "'" Literal.String ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'ScanDir' Name '(' Punctuation 'Path' Name ' ' Text '+' Operator ' ' Text 'PSR' Name '.' Operator 'Name' Name ' ' Text '+' Operator ' ' Text "'" Literal.String '\\' Literal.String "'" Literal.String ',' Operator ' ' Text 'FileName' Name ')' Punctuation ';' Operator '\n ' Text 'Res' Name ' ' Text ':' Operator '=' Operator ' ' Text 'FindNext' Name.Builtin '(' Punctuation 'PSR' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'FindClose' Name.Builtin '(' Punctuation 'PSR' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n' Text 'begin' Keyword '\n ' Text 'Strings' Name '.' Operator 'Clear' Name ';' Operator '\n ' Text 'Path' Name ' ' Text ':' Operator '=' Operator ' ' Text 'ExtractPath' Name '(' Punctuation 'Mask' Name ')' Punctuation ';' Operator '\n ' Text 'FileName' Name ' ' Text ':' Operator '=' Operator ' ' Text 'ExtractFileName' Name.Builtin '(' Punctuation 'Mask' Name ')' Punctuation ';' Operator '\n ' Text 'ScanDir' Name '(' Punctuation 'Path' Name ',' Operator ' ' Text 'FileName' Name ')' Punctuation ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Strings' Name '.' Operator 'Count' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'FindAllFirst' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Mask' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'ScanSubDirs' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'True' Keyword ';' Operator '\n ' Text 'Attributes' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text 'faFindEveryFile' Name ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'Path' Name ',' Operator ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n ' Text 'function' Keyword ' ' Text 'ScanDir' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Path' Name ',' Operator ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n ' Text 'var' Keyword '\n ' Text 'PSR' Name ':' Operator ' ' Text 'TSearchRec' Name ';' Operator '\n ' Text 'Res' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'False' Keyword ';' Operator '\n ' Text 'if' Keyword ' ' Text 'Success' Name '(' Punctuation 'FindFirst' Name.Builtin '(' Punctuation 'Path' Name ' ' Text '+' Operator ' ' Text 'FileName' Name ',' Operator ' ' Text 'Attributes' Name ',' Operator ' ' Text 'PSR' Name ')' Punctuation ',' Operator ' ' Text '0' Literal.Number.Integer ')' Punctuation ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'FindAllFirst' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Path' Name ' ' Text '+' Operator ' ' Text 'PSR' Name '.' Operator 'Name' Name ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'True' Keyword ';' Operator '\n ' Text 'FindClose' Name.Builtin '(' Punctuation 'PSR' Name ')' Punctuation ';' Operator '\n ' Text 'Exit' Keyword ';' Operator ' ' Text 'end' Keyword ';' Operator '\n ' Text 'if' Keyword ' ' Text 'not' Keyword ' ' Text 'ScanSubDirs' Name ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n\n ' Text 'Res' Name ' ' Text ':' Operator '=' Operator ' ' Text 'FindFirst' Name.Builtin '(' Punctuation 'Path' Name ' ' Text '+' Operator ' ' Text "'" Literal.String '*' Literal.String "'" Literal.String ',' Operator ' ' Text 'faDirectory' Name ',' Operator ' ' Text 'PSR' Name ')' Punctuation ';' Operator '\n ' Text 'while' Keyword ' ' Text 'not' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text 'and' Keyword ' ' Text 'Success' Name '(' Punctuation 'Res' Name ',' Operator ' ' Text '0' Literal.Number.Integer ')' Punctuation ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text '(' Punctuation 'PSR' Name '.' Operator 'Attr' Name ' ' Text 'and' Keyword ' ' Text 'faDirectory' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ')' Punctuation '\n ' Text 'and' Keyword ' ' Text '(' Punctuation 'PSR' Name '.' Operator 'Name' Name ' ' Text '<' Operator '>' Operator ' ' Text "'" Literal.String '.' Literal.String "'" Literal.String ')' Punctuation ' ' Text 'and' Keyword ' ' Text '(' Punctuation 'PSR' Name '.' Operator 'Name' Name ' ' Text '<' Operator '>' Operator ' ' Text "'" Literal.String '..' Literal.String "'" Literal.String ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'ScanDir' Name '(' Punctuation 'Path' Name ' ' Text '+' Operator ' ' Text 'PSR' Name '.' Operator 'Name' Name ' ' Text '+' Operator ' ' Text "'" Literal.String '\\' Literal.String "'" Literal.String ',' Operator ' ' Text 'FileName' Name ')' Punctuation ';' Operator '\n ' Text 'Res' Name ' ' Text ':' Operator '=' Operator ' ' Text 'FindNext' Name.Builtin '(' Punctuation 'PSR' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'FindClose' Name.Builtin '(' Punctuation 'PSR' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'Path' Name ' ' Text ':' Operator '=' Operator ' ' Text 'ExtractPath' Name '(' Punctuation 'Mask' Name ')' Punctuation ';' Operator '\n ' Text 'FileName' Name ' ' Text ':' Operator '=' Operator ' ' Text 'ExtractFileName' Name.Builtin '(' Punctuation 'Mask' Name ')' Punctuation ';' Operator '\n ' Text 'ScanDir' Name '(' Punctuation 'Path' Name ',' Operator ' ' Text 'FileName' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'procedure' Keyword ' ' Text 'DeleteFiles' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Mask' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'ScanSubDirs' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'True' Keyword ';' Operator '\n ' Text 'Attributes' Name ':' Operator ' ' Text 'Integer' Keyword.Type ' ' Text '=' Operator ' ' Text 'faFindEveryFile' Name ')' Punctuation ';' Operator '\n' Text 'var' Keyword '\n ' Text 'Path' Name ',' Operator ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ';' Operator '\n\n ' Text 'procedure' Keyword ' ' Text 'ScanDir' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'Path' Name ',' Operator ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ';' Operator '\n ' Text 'var' Keyword '\n ' Text 'PSR' Name ':' Operator ' ' Text 'TSearchRec' Name ';' Operator '\n ' Text 'Res' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n\n ' Text 'procedure' Keyword ' ' Text 'TryDeleteFile' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ';' Operator '\n ' Text 'begin' Keyword '\n ' Text 'try' Keyword '\n ' Text 'DeleteFile' Name.Builtin '(' Punctuation 'Path' Name ' ' Text '+' Operator ' ' Text 'PSR' Name '.' Operator 'Name' Name ')' Punctuation ';' Operator '\n ' Text 'except' Keyword '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n ' Text 'begin' Keyword '\n ' Text 'Res' Name ' ' Text ':' Operator '=' Operator ' ' Text 'FindFirst' Name.Builtin '(' Punctuation 'Path' Name ' ' Text '+' Operator ' ' Text 'FileName' Name ',' Operator ' ' Text 'Attributes' Name ',' Operator ' ' Text 'PSR' Name ')' Punctuation ';' Operator '\n ' Text 'while' Keyword ' ' Text 'Success' Name '(' Punctuation 'Res' Name ',' Operator ' ' Text '0' Literal.Number.Integer ')' Punctuation ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'TryDeleteFile' Name '(' Punctuation 'Path' Name ' ' Text '+' Operator ' ' Text 'PSR' Name '.' Operator 'Name' Name ')' Punctuation ';' Operator '\n ' Text 'Res' Name ' ' Text ':' Operator '=' Operator ' ' Text 'FindNext' Name.Builtin '(' Punctuation 'PSR' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'FindClose' Name.Builtin '(' Punctuation 'PSR' Name ')' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'not' Keyword ' ' Text 'ScanSubDirs' Name ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n\n ' Text 'Res' Name ' ' Text ':' Operator '=' Operator ' ' Text 'FindFirst' Name.Builtin '(' Punctuation 'Path' Name ' ' Text '+' Operator ' ' Text "'" Literal.String '*' Literal.String "'" Literal.String ',' Operator ' ' Text 'faDirectory' Name ',' Operator ' ' Text 'PSR' Name ')' Punctuation ';' Operator '\n ' Text 'while' Keyword ' ' Text 'Success' Name '(' Punctuation 'Res' Name ',' Operator ' ' Text '0' Literal.Number.Integer ')' Punctuation ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text '(' Punctuation 'PSR' Name '.' Operator 'Attr' Name ' ' Text 'and' Keyword ' ' Text 'faDirectory' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ')' Punctuation '\n ' Text 'and' Keyword ' ' Text '(' Punctuation 'PSR' Name '.' Operator 'Name' Name ' ' Text '<' Operator '>' Operator ' ' Text "'" Literal.String '.' Literal.String "'" Literal.String ')' Punctuation ' ' Text 'and' Keyword ' ' Text '(' Punctuation 'PSR' Name '.' Operator 'Name' Name ' ' Text '<' Operator '>' Operator ' ' Text "'" Literal.String '..' Literal.String "'" Literal.String ')' Punctuation ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'ScanDir' Name '(' Punctuation 'Path' Name ' ' Text '+' Operator ' ' Text 'PSR' Name '.' Operator 'Name' Name ' ' Text '+' Operator ' ' Text "'" Literal.String '\\' Literal.String "'" Literal.String ',' Operator ' ' Text 'FileName' Name ')' Punctuation ';' Operator '\n ' Text 'TryDeleteFile' Name '(' Punctuation 'Path' Name ' ' Text '+' Operator ' ' Text 'PSR' Name '.' Operator 'Name' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'Res' Name ' ' Text ':' Operator '=' Operator ' ' Text 'FindNext' Name.Builtin '(' Punctuation 'PSR' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'FindClose' Name.Builtin '(' Punctuation 'PSR' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Path' Name ' ' Text ':' Operator '=' Operator ' ' Text 'ExtractPath' Name '(' Punctuation 'Mask' Name ')' Punctuation ';' Operator '\n ' Text 'FileName' Name ' ' Text ':' Operator '=' Operator ' ' Text 'ExtractFileName' Name.Builtin '(' Punctuation 'Mask' Name ')' Punctuation ';' Operator '\n ' Text 'ScanDir' Name '(' Punctuation 'Path' Name ',' Operator ' ' Text 'FileName' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'GetFileNew' Name.Function '(' Punctuation 'FileName' Name ':' Operator ' ' Text 'string' Keyword ';' Operator ' ' Text 'NoFloppyDrives' Name ':' Operator ' ' Text 'Boolean' Keyword.Type ' ' Text '=' Operator ' ' Text 'True' Keyword ')' Punctuation ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'var' Keyword '\n ' Text 'Drive' Name ':' Operator ' ' Text 'string' Keyword ';' Operator '\n ' Text 'pf' Name ',' Operator ' ' Text 'pd' Name ',' Operator ' ' Text 'Len' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n ' Text 'PSR' Name ':' Operator ' ' Text 'TSearchRec' Name ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'FileName' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Trim' Name.Builtin '(' Punctuation 'FileName' Name ')' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'Length' Name.Builtin '(' Punctuation 'FileName' Name ')' Punctuation ' ' Text '<' Operator ' ' Text '2' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n\n ' Text 'Drive' Name ' ' Text ':' Operator '=' Operator ' ' Text 'ExtractDrive' Name '(' Punctuation 'FileName' Name ')' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'not' Keyword ' ' Text 'DirectoryExists' Name.Builtin '(' Punctuation 'Drive' Name ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n\n ' Text 'if' Keyword ' ' Text 'NoFloppyDrives' Name ' ' Text 'and' Keyword ' ' Text '(' Punctuation 'Drive' Name '[' Punctuation '1' Literal.Number.Integer ']' Punctuation ' ' Text 'in' Keyword ' ' Text '[' Punctuation "'" Literal.String 'A' Literal.String "'" Literal.String ',' Operator ' ' Text "'" Literal.String 'B' Literal.String "'" Literal.String '])' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n\n ' Text 'Len' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'FileName' Name ')' Punctuation ';' Operator '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Drive' Name ';' Operator '\n ' Text 'pf' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Length' Name.Builtin '(' Punctuation 'Drive' Name ')' Punctuation ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer ';' Operator '\n ' Text 'while' Keyword ' ' Text 'pf' Name ' ' Text '<' Operator '=' Operator ' ' Text 'Len' Name ' ' Text 'do' Keyword ' ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'FileName' Name '[' Punctuation 'pf' Name ']' Punctuation ' ' Text '=' Operator ' ' Text "'" Literal.String '\\' Literal.String "'" Literal.String ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text "'" Literal.String '\\' Literal.String "'" Literal.String ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'pf' Name ')' Punctuation ';' Operator '\n ' Text 'Continue' Keyword ';' Operator ' ' Text 'end' Keyword ';' Operator '\n\n ' Text 'pd' Name ' ' Text ':' Operator '=' Operator ' ' Text 'CharPos' Name '(' Punctuation "'" Literal.String '\\' Literal.String "'" Literal.String ',' Operator ' ' Text 'FileName' Name ',' Operator ' ' Text 'pf' Name ')' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'pd' Name ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text '0' Literal.Number.Integer '=' Operator 'FindFirst' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'FileName' Name ',' Operator ' ' Text 'pf' Name ',' Operator ' ' Text 'MaxInt' Name ')' Punctuation ',' Operator ' ' Text 'faFindEveryFile' Name ',' Operator ' ' Text 'PSR' Name ')' Punctuation ' ' Text 'then' Keyword ' ' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'PSR' Name '.' Operator 'Name' Name ';' Operator '\n ' Text 'Break' Keyword ';' Operator ' ' Text 'end' Keyword ' ' Text 'else' Keyword ' ' Text 'begin' Keyword '\n ' Text 'FindClose' Name.Builtin '(' Punctuation 'PSR' Name ')' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text '0' Literal.Number.Integer '=' Operator 'FindFirst' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'FileName' Name ',' Operator ' ' Text 'pf' Name ',' Operator ' ' Text 'MaxInt' Name ')' Punctuation ',' Operator ' ' Text 'faDirectory' Name ',' Operator ' ' Text 'PSR' Name ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'PSR' Name '.' Operator 'Name' Name ' ' Text '+' Operator ' ' Text "'" Literal.String '\\' Literal.String "'" Literal.String '\n ' Text 'else' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'FindClose' Name.Builtin '(' Punctuation 'PSR' Name ')' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ' ' Text 'then' Keyword '\n ' Text 'Break' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n ' Text 'if' Keyword ' ' Text '0' Literal.Number.Integer '=' Operator 'FindFirst' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'Copy' Name.Builtin '(' Punctuation 'FileName' Name ',' Operator ' ' Text 'pf' Name ',' Operator ' ' Text 'pd' Name ' ' Text '-' Operator ' ' Text 'pf' Name ')' Punctuation ',' Operator ' ' Text 'faDirectory' Name ',' Operator ' ' Text 'PSR' Name ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '+' Operator ' ' Text 'PSR' Name '.' Operator 'Name' Name ' ' Text '+' Operator ' ' Text "'" Literal.String '\\' Literal.String "'" Literal.String '\n ' Text 'else' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n ' Text 'FindClose' Name.Builtin '(' Punctuation 'PSR' Name ')' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'Result' Name.Builtin.Pseudo ' ' Text '=' Operator ' ' Text "'" Literal.String "'" Literal.String ' ' Text 'then' Keyword '\n ' Text 'Break' Keyword ';' Operator '\n\n ' Text 'pf' Name ' ' Text ':' Operator '=' Operator ' ' Text 'pd' Name ' ' Text '+' Operator ' ' Text '1' Literal.Number.Integer ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n ' Text 'if' Keyword ' ' Text '(' Punctuation 'Result' Name.Builtin.Pseudo ' ' Text '<' Operator '>' Operator ' ' Text "'" Literal.String "'" Literal.String ')' Punctuation ' ' Text 'and' Keyword ' ' Text 'not' Keyword ' ' Text 'FileEx' Name '(' Punctuation 'Result' Name.Builtin.Pseudo ',' Operator ' ' Text 'True' Keyword ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text "'" Literal.String "'" Literal.String ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'DateTimeOfFileTime' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'FileTime' Name ':' Operator ' ' Text 'TFileTime' Name ')' Punctuation ':' Operator ' ' Text 'TDateTime' Keyword.Type ';' Operator '\n' Text 'var' Keyword '\n ' Text 'LocalFileTime' Name ':' Operator ' ' Text 'TFileTime' Name ';' Operator '\n ' Text 'Res' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n\n ' Text 'FileTimeToLocalFileTime' Name '(' Punctuation 'FileTime' Name ',' Operator ' ' Text 'LocalFileTime' Name ')' Punctuation ';' Operator '\n ' Text 'if' Keyword ' ' Text 'not' Keyword ' ' Text 'FileTimeToDosDateTime' Name '(' Punctuation 'LocalFileTime' Name ',' Operator ' ' Text 'LongRec' Name '(' Punctuation 'Res' Name ')' Punctuation '.' Operator 'Hi' Name ',' Operator '\n ' Text 'LongRec' Name '(' Punctuation 'Res' Name ')' Punctuation '.' Operator 'Lo' Name ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Res' Name ' ' Text ':' Operator '=' Operator ' ' Text '-' Operator '1' Literal.Number.Integer ';' Operator '\n\n ' Text 'if' Keyword ' ' Text '(' Punctuation 'Res' Name ' ' Text '=' Operator ' ' Text '-' Operator '1' Literal.Number.Integer ')' Punctuation ' ' Text 'or' Keyword ' ' Text '(' Punctuation 'Res' Name ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ')' Punctuation ' ' Text 'then' Keyword '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'try' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'FileDateToDateTime' Name.Builtin '(' Punctuation 'Res' Name ')' Punctuation ';' Operator '\n ' Text 'except' Keyword '\n ' Text 'end' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'procedure' Keyword ' ' Text 'FileNew' Name.Function '(' Punctuation 'const' Keyword ' ' Text 'FileName' Name ':' Operator ' ' Text 'string' Keyword ')' Punctuation ';' Operator '\n' Text 'var' Keyword '\n ' Text 'Handle' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Handle' Name ' ' Text ':' Operator '=' Operator ' ' Text 'FileCreate' Name.Builtin '(' Punctuation 'FileName' Name ')' Punctuation ';' Operator '\n ' Text 'FileClose' Name.Builtin '(' Punctuation 'Handle' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Win32PlatformStr' Name.Function ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'const' Keyword '\n ' Text 'PlatformStrings' Name ':' Operator ' ' Text 'array' Keyword '[' Punctuation 'VER_PLATFORM_WIN32s' Name '.' Operator '.' Operator 'VER_PLATFORM_WIN32_NT' Name ']' Punctuation ' ' Text 'of' Keyword ' ' Text 'string' Keyword ' ' Text '=' Operator '\n ' Text '(' Punctuation "'" Literal.String 'VER_PLATFORM_WIN32s' Literal.String "'" Literal.String ',' Operator ' ' Text "'" Literal.String 'VER_PLATFORM_WIN32_WINDOWS' Literal.String "'" Literal.String ',' Operator ' ' Text "'" Literal.String 'VER_PLATFORM_WIN32_NT' Literal.String "'" Literal.String ')' Punctuation ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'PlatformStrings' Name '[' Punctuation 'Win32Platform' Name ']' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'FullOSInfo' Name.Function ':' Operator ' ' Text 'string' Keyword ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Format' Name.Builtin '(' Punctuation '\n ' Text "'" Literal.String 'Platform: %s' Literal.String "'" Literal.String ' ' Text '+' Operator ' ' Text 'EOL' Name ' ' Text '+' Operator '\n ' Text "'" Literal.String 'Version: %d.%d Build %d' Literal.String "'" Literal.String ' ' Text '+' Operator ' ' Text 'EOL' Name ' ' Text '+' Operator '\n ' Text "'" Literal.String 'CSD: %s' Literal.String "'" Literal.String ',' Operator '\n ' Text '[' Punctuation '\n ' Text 'Win32PlatformStr' Name ',' Operator '\n ' Text 'Win32MajorVersion' Name ',' Operator ' ' Text 'Win32MinorVersion' Name ',' Operator ' ' Text 'Win32BuildNumber' Name ',' Operator '\n ' Text 'Win32CSDVersion' Name '\n ' Text ']' Punctuation '\n ' Text ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Win9x' Name.Function ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Win32Platform' Name ' ' Text '=' Operator ' ' Text 'VER_PLATFORM_WIN32_WINDOWS' Name ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'WinNT' Name.Function ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Win32Platform' Name ' ' Text '=' Operator ' ' Text 'VER_PLATFORM_WIN32_NT' Name ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'Win2000' Name.Function ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '(' Punctuation 'Win32Platform' Name ' ' Text '=' Operator ' ' Text 'VER_PLATFORM_WIN32_NT' Name ')' Punctuation '\n ' Text 'and' Keyword ' ' Text '(' Punctuation 'Win32MajorVersion' Name ' ' Text '=' Operator ' ' Text '4' Literal.Number.Integer ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'WinXP' Name.Function ':' Operator ' ' Text 'Boolean' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text 'Win32MajorVersion' Name ' ' Text '>' Operator '=' Operator ' ' Text '5' Literal.Number.Integer ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'initialization' Keyword '\n ' Text 'MyDir' Name ' ' Text ':' Operator '=' Operator ' ' Text 'GetMyDir' Name ';' Operator '\n\n' Text 'end' Keyword '.' Operator '\n\n' Text 'unit' Keyword ' ' Text 'FifoStream' Name ';' Operator '\n\n' Text 'interface' Keyword '\n\n' Text 'uses' Keyword ' ' Text 'Classes' Name ',' Operator ' ' Text 'windows' Name ',' Operator ' ' Text 'Dialogs' Name ';' Operator '\n\n' Text 'const' Keyword '\n ' Text 'DefaultChunksize' Name ' ' Text '=' Operator ' ' Text '32768' Literal.Number.Integer ';' Operator ' ' Text '// 32kb per chunk as default.' Comment.Single '\n\n' Text 'type' Keyword '\n ' Text 'PMemChunk' Name ' ' Text '=' Operator ' ' Text '^' Operator 'TMemChunk' Name ';' Operator '\n ' Text 'TMemChunk' Name ' ' Text '=' Operator ' ' Text 'record' Keyword '\n ' Text 'Filled' Name ':' Operator ' ' Text 'Longword' Keyword.Type ';' Operator '\n ' Text 'Read' Name.Builtin ':' Operator ' ' Text 'Longword' Keyword.Type ';' Operator '\n ' Text 'Data' Name ':' Operator ' ' Text 'pointer' Keyword.Type ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n ' Text 'TFifo' Name ' ' Text '=' Operator ' ' Text 'class' Keyword '\n ' Text 'private' Keyword.Pseudo '\n ' Text 'FBuffers' Name ':' Operator ' ' Text 'TList' Name ';' Operator '\n ' Text 'FChunksize' Name ':' Operator ' ' Text 'Longword' Keyword.Type ';' Operator '\n ' Text 'FCritSect' Name ':' Operator ' ' Text 'TRTLCriticalSection' Name ';' Operator '\n ' Text 'FIsWinNT' Name ':' Operator ' ' Text 'boolean' Keyword.Type ';' Operator '\n ' Text 'FBytesInFifo' Name ':' Operator ' ' Text 'LongWord' Keyword.Type ';' Operator '\n ' Text 'protected' Keyword.Pseudo '\n ' Text 'function' Keyword ' ' Text 'GetBytesInFifo' Name.Function ':' Operator ' ' Text 'LongWord' Keyword.Type ';' Operator '\n ' Text 'public' Keyword.Pseudo '\n ' Text 'constructor' Keyword ' ' Text 'Create' Name.Function ';' Operator '\n ' Text 'destructor' Keyword ' ' Text 'Destroy' Name.Function ';' Operator ' ' Text 'override' Keyword.Pseudo ';' Operator '\n ' Text 'procedure' Keyword ' ' Text 'Write' Name.Function '(' Punctuation 'Data' Name ':' Operator ' ' Text 'pointer' Keyword.Type ';' Operator ' ' Text 'Size' Name ':' Operator ' ' Text 'LongWord' Keyword.Type ')' Punctuation ';' Operator '\n ' Text 'procedure' Keyword ' ' Text 'Read' Name.Function '(' Punctuation 'Buff' Name ':' Operator ' ' Text 'pointer' Keyword.Type ';' Operator ' ' Text 'var' Keyword ' ' Text 'ReqSize' Name ':' Operator ' ' Text 'LongWord' Keyword.Type ')' Punctuation ';' Operator '\n ' Text 'procedure' Keyword ' ' Text 'PeekData' Name.Function '(' Punctuation 'Buff' Name ':' Operator ' ' Text 'pointer' Keyword.Type ';' Operator ' ' Text 'var' Keyword ' ' Text 'ReqSize' Name ':' Operator ' ' Text 'LongWord' Keyword.Type ')' Punctuation ';' Operator '\n ' Text 'published' Keyword.Pseudo '\n ' Text 'property' Keyword ' ' Text 'BytesInFifo' Name.Property ':' Operator ' ' Text 'LongWord' Keyword.Type ' ' Text 'read' Keyword.Pseudo ' ' Text 'FBytesInFifo' Name.Function ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n\n' Text 'implementation' Keyword '\n\n' Text 'constructor' Keyword ' ' Text 'TFifo' Name.Class '.' Operator 'Create' Name.Function ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'inherited' Keyword ';' Operator '\n ' Text 'FBuffers' Name ' ' Text ':' Operator '=' Operator ' ' Text 'TList' Name '.' Operator 'Create' Name ';' Operator '\n ' Text '// set default chunksize...' Comment.Single '\n ' Text 'FChunksize' Name ' ' Text ':' Operator '=' Operator ' ' Text 'DefaultChunksize' Name ';' Operator '\n ' Text 'InitializeCriticalSection' Name '(' Punctuation 'FCritSect' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'destructor' Keyword ' ' Text 'TFifo' Name.Class '.' Operator 'Destroy' Name.Function ';' Operator '\n' Text 'var' Keyword '\n ' Text 'I' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'EnterCriticalSection' Name '(' Punctuation 'FCritSect' Name ')' Punctuation ';' Operator '\n ' Text 'for' Keyword ' ' Text 'I' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'to' Keyword ' ' Text 'FBuffers' Name '.' Operator 'count' Name ' ' Text '-' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'do' Keyword '\n ' Text 'begin' Keyword '\n ' Text 'FreeMem' Name.Builtin '(' Punctuation 'PMemChunk' Name '(' Punctuation 'Fbuffers' Name '[' Punctuation 'I' Name '])' Punctuation '.' Operator 'Data' Name ')' Punctuation ';' Operator '\n ' Text 'Dispose' Keyword '(' Punctuation 'PMemChunk' Name '(' Punctuation 'Fbuffers' Name '[' Punctuation 'I' Name ']))' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'FBuffers' Name '.' Operator 'Clear' Name ';' Operator '\n ' Text 'FBuffers' Name '.' Operator 'Free' Name ';' Operator '\n ' Text 'LeaveCriticalSection' Name '(' Punctuation 'FCritSect' Name ')' Punctuation ';' Operator '\n\n ' Text 'DeleteCriticalSection' Name '(' Punctuation 'FCritSect' Name ')' Punctuation ';' Operator '\n ' Text 'inherited' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'function' Keyword ' ' Text 'TFifo' Name.Class '.' Operator 'GetBytesInFifo' Name.Function ':' Operator ' ' Text 'LongWord' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'Result' Name.Builtin.Pseudo ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n ' Text 'if' Keyword ' ' Text 'FBuffers' Name '.' Operator 'Count' Name ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'begin' Keyword '\n ' Text 'exit' Keyword ';' Operator '\n ' Text 'end' Keyword '\n ' Text 'else' Keyword '\n ' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'FBuffers' Name '.' Operator 'Count' Name ' ' Text '>' Operator ' ' Text '1' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ',' Operator ' ' Text '(' Punctuation 'FBuffers' Name '.' Operator 'Count' Name ' ' Text '-' Operator ' ' Text '1' Literal.Number.Integer ')' Punctuation ' ' Text '*' Operator ' ' Text 'FChunkSize' Name ')' Punctuation ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ',' Operator ' ' Text 'PMemChunk' Name '(' Punctuation 'FBuffers' Name '[' Punctuation 'Fbuffers' Name '.' Operator 'Count' Name ' ' Text '-' Operator ' ' Text '1' Literal.Number.Integer '])' Punctuation '.' Operator 'Filled' Name ')' Punctuation ';' Operator '\n ' Text 'Dec' Name.Builtin '(' Punctuation 'Result' Name.Builtin.Pseudo ',' Operator ' ' Text 'PMemChunk' Name '(' Punctuation 'FBuffers' Name '[' Punctuation '0' Literal.Number.Integer '])' Punctuation '.' Operator 'Read' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'procedure' Keyword ' ' Text 'TFifo' Name.Class '.' Operator 'Write' Name.Function '(' Punctuation 'Data' Name ':' Operator ' ' Text 'pointer' Keyword.Type ';' Operator ' ' Text 'Size' Name ':' Operator ' ' Text 'LongWord' Keyword.Type ')' Punctuation ';' Operator '\n' Text 'var' Keyword '\n ' Text 'Privpointer' Name ':' Operator ' ' Text 'pointer' Keyword.Type ';' Operator '\n ' Text 'PrivSize' Name ':' Operator ' ' Text 'LongWord' Keyword.Type ';' Operator '\n ' Text 'Chunk' Name ':' Operator ' ' Text 'PMemChunk' Name ';' Operator '\n ' Text 'PosInChunk' Name ':' Operator ' ' Text 'pointer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'LongWord' Keyword.Type '(' Punctuation 'Data' Name ')' Punctuation ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'begin' Keyword '\n ' Text '// null pointer? somebody is trying to fool us, get out...' Comment.Single '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'EnterCriticalSection' Name '(' Punctuation 'FCritSect' Name ')' Punctuation ';' Operator '\n ' Text 'PrivPointer' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Data' Name ';' Operator '\n ' Text 'PrivSize' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n ' Text '// are already buffers there?' Comment.Single '\n ' Text 'if' Keyword ' ' Text 'FBuffers' Name '.' Operator 'count' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'begin' Keyword '\n ' Text '// is the last one of them not completely filled?' Comment.Single '\n ' Text 'if' Keyword ' ' Text 'PMemChunk' Name '(' Punctuation 'FBuffers' Name '[' Punctuation 'FBuffers' Name '.' Operator 'count' Name ' ' Text '-' Operator ' ' Text '1' Literal.Number.Integer '])' Punctuation '.' Operator 'filled' Name ' ' Text '<' Operator ' ' Text 'FChunksize' Name ' ' Text 'then' Keyword '\n ' Text '// not completely filled, so fill up the buffer.' Comment.Single '\n ' Text 'begin' Keyword '\n ' Text 'Chunk' Name ' ' Text ':' Operator '=' Operator ' ' Text 'PMemChunk' Name '(' Punctuation 'FBuffers' Name '[' Punctuation 'FBuffers' Name '.' Operator 'count' Name ' ' Text '-' Operator ' ' Text '1' Literal.Number.Integer '])' Punctuation ';' Operator '\n ' Text '// fetch chunkdata.' Comment.Single '\n ' Text 'PosInChunk' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Chunk' Name '.' Operator 'Data' Name ';' Operator '\n ' Text '// move to current fill pos...' Comment.Single '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'LongWord' Keyword.Type '(' Punctuation 'PosInChunk' Name ')' Punctuation ',' Operator ' ' Text 'Chunk' Name '.' Operator 'Filled' Name ')' Punctuation ';' Operator '\n ' Text '// can we fill the chunk completely?' Comment.Single '\n ' Text 'if' Keyword ' ' Text 'Size' Name ' ' Text '>' Operator ' ' Text 'FChunksize' Name ' ' Text '-' Operator ' ' Text 'Chunk' Name '.' Operator 'Filled' Name ' ' Text 'then' Keyword '\n ' Text 'begin' Keyword '\n ' Text '// yes we can.' Comment.Single '\n ' Text 'Move' Name.Builtin '(' Punctuation 'PrivPointer' Name '^' Operator ',' Operator ' ' Text 'PosInChunk' Name '^' Operator ',' Operator ' ' Text 'FChunksize' Name ' ' Text '-' Operator ' ' Text 'Chunk' Name '.' Operator 'Filled' Name ')' Punctuation ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'PrivSize' Name ',' Operator ' ' Text 'FChunksize' Name ' ' Text '-' Operator ' ' Text 'Chunk' Name '.' Operator 'Filled' Name ')' Punctuation ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'LongWord' Keyword.Type '(' Punctuation 'PrivPointer' Name ')' Punctuation ',' Operator ' ' Text 'FChunksize' Name ' ' Text '-' Operator ' ' Text 'Chunk' Name '.' Operator 'Filled' Name ')' Punctuation ';' Operator '\n ' Text 'Chunk' Name '.' Operator 'Filled' Name ' ' Text ':' Operator '=' Operator ' ' Text 'FChunkSize' Name ';' Operator '\n ' Text 'end' Keyword '\n ' Text 'else' Keyword '\n ' Text '// we have to less data for filling the chunk completely,' Comment.Single '\n ' Text '// just put everything in.' Comment.Single '\n ' Text 'begin' Keyword '\n ' Text 'Move' Name.Builtin '(' Punctuation 'PrivPointer' Name '^' Operator ',' Operator ' ' Text 'PosInChunk' Name '^' Operator ',' Operator ' ' Text 'Size' Name ')' Punctuation ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'PrivSize' Name ',' Operator ' ' Text 'Size' Name ')' Punctuation ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'Chunk' Name '.' Operator 'Filled' Name ',' Operator ' ' Text 'Size' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text '// as long as we have remaining stuff put it into new chunks.' Comment.Single '\n ' Text 'while' Keyword ' ' Text '(' Punctuation 'PrivSize' Name ' ' Text '<' Operator ' ' Text 'Size' Name ')' Punctuation ' ' Text 'do' Keyword '\n ' Text 'begin' Keyword '\n ' Text 'new' Keyword '(' Punctuation 'Chunk' Name ')' Punctuation ';' Operator '\n ' Text 'GetMem' Name.Builtin '(' Punctuation 'Chunk' Name '.' Operator 'Data' Name ',' Operator ' ' Text 'FChunksize' Name ')' Punctuation ';' Operator '\n ' Text 'Chunk' Name '.' Operator 'Read' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n ' Text '// can we fill an entire chunk with the remaining data?' Comment.Single '\n ' Text 'if' Keyword ' ' Text 'Privsize' Name ' ' Text '+' Operator ' ' Text 'FChunksize' Name ' ' Text '<' Operator ' ' Text 'Size' Name ' ' Text 'then' Keyword '\n ' Text 'begin' Keyword '\n ' Text '// yes we can, so put the stuff in.' Comment.Single '\n ' Text 'Move' Name.Builtin '(' Punctuation 'Privpointer' Name '^' Operator ',' Operator ' ' Text 'Chunk' Name '.' Operator 'Data' Name '^' Operator ',' Operator ' ' Text 'FChunksize' Name ')' Punctuation ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'LongWord' Keyword.Type '(' Punctuation 'PrivPointer' Name ')' Punctuation ',' Operator ' ' Text 'FChunksize' Name ')' Punctuation ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'PrivSize' Name ',' Operator ' ' Text 'FChunksize' Name ')' Punctuation ';' Operator '\n ' Text 'Chunk' Name '.' Operator 'Filled' Name ' ' Text ':' Operator '=' Operator ' ' Text 'FChunksize' Name ';' Operator '\n ' Text 'end' Keyword '\n ' Text 'else' Keyword ' ' Text '// we have to less data to fill the entire chunk, just put the remaining stuff in.' Comment.Single '\n ' Text 'begin' Keyword '\n ' Text 'Move' Name.Builtin '(' Punctuation 'Privpointer' Name '^' Operator ',' Operator ' ' Text 'Chunk' Name '.' Operator 'Data' Name '^' Operator ',' Operator ' ' Text 'Size' Name ' ' Text '-' Operator ' ' Text 'Privsize' Name ')' Punctuation ';' Operator '\n ' Text 'Chunk' Name '.' Operator 'Filled' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Size' Name ' ' Text '-' Operator ' ' Text 'Privsize' Name ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'PrivSize' Name ',' Operator ' ' Text 'Size' Name ' ' Text '-' Operator ' ' Text 'Privsize' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'Fbuffers' Name '.' Operator 'Add' Name '(' Punctuation 'Chunk' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'if' Keyword ' ' Text 'Size' Name ' ' Text '<' Operator '>' Operator ' ' Text 'Privsize' Name ' ' Text 'then' Keyword '\n ' Text 'Showmessage' Name '(' Punctuation "'" Literal.String 'miscalculation in TFifo.write' Literal.String "'" Literal.String ')' Punctuation ';' Operator '\n ' Text 'FBytesInFifo' Name ' ' Text ':' Operator '=' Operator ' ' Text 'GetBytesInFifo' Name ';' Operator '\n ' Text 'LeaveCriticalSection' Name '(' Punctuation 'FCritSect' Name ')' Punctuation ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'procedure' Keyword ' ' Text 'TFifo' Name.Class '.' Operator 'Read' Name.Function '(' Punctuation 'Buff' Name ':' Operator ' ' Text 'pointer' Keyword.Type ';' Operator ' ' Text 'var' Keyword ' ' Text 'ReqSize' Name ':' Operator ' ' Text 'LongWord' Keyword.Type ')' Punctuation ';' Operator '\n' Text 'var' Keyword '\n ' Text 'PrivSize' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n ' Text 'Privpos' Name ':' Operator ' ' Text 'pointer' Keyword.Type ';' Operator '\n ' Text 'Chunk' Name ':' Operator ' ' Text 'PMemChunk' Name ';' Operator '\n ' Text 'ChunkPos' Name ':' Operator ' ' Text 'pointer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'LongWord' Keyword.Type '(' Punctuation 'Buff' Name ')' Punctuation ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'begin' Keyword '\n ' Text '// null pointer? somebody is trying to fool us, get out...' Comment.Single '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'EnterCriticalSection' Name '(' Punctuation 'FCritSect' Name ')' Punctuation ';' Operator '\n ' Text 'PrivSize' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n ' Text 'Privpos' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Buff' Name ';' Operator '\n ' Text 'while' Keyword ' ' Text 'FBuffers' Name '.' Operator 'Count' Name ' ' Text '>' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'do' Keyword '\n ' Text 'begin' Keyword '\n ' Text 'Chunk' Name ' ' Text ':' Operator '=' Operator ' ' Text 'PMemChunk' Name '(' Punctuation 'FBuffers' Name '[' Punctuation '0' Literal.Number.Integer '])' Punctuation ';' Operator '\n ' Text 'ChunkPos' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Chunk' Name '.' Operator 'data' Name ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'LongWord' Keyword.Type '(' Punctuation 'ChunkPos' Name ')' Punctuation ',' Operator ' ' Text 'Chunk' Name '.' Operator 'Read' Name ')' Punctuation ';' Operator '\n ' Text '// does the remaining part of the chunk fit into the buffer?' Comment.Single '\n ' Text 'if' Keyword ' ' Text 'PrivSize' Name ' ' Text '+' Operator ' ' Text '(' Punctuation 'Chunk' Name '.' Operator 'Filled' Name ' ' Text '-' Operator ' ' Text 'Chunk' Name '.' Operator 'read' Name ')' Punctuation ' ' Text '<' Operator ' ' Text 'ReqSize' Name ' ' Text 'then' Keyword '\n ' Text 'begin' Keyword ' ' Text '// yep, it fits' Comment.Single '\n ' Text 'Move' Name.Builtin '(' Punctuation 'ChunkPos' Name '^' Operator ',' Operator ' ' Text 'Privpos' Name '^' Operator ',' Operator ' ' Text 'Chunk' Name '.' Operator 'Filled' Name ' ' Text '-' Operator ' ' Text 'Chunk' Name '.' Operator 'read' Name ')' Punctuation ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'PrivSize' Name ',' Operator ' ' Text 'Chunk' Name '.' Operator 'Filled' Name ' ' Text '-' Operator ' ' Text 'Chunk' Name '.' Operator 'read' Name ')' Punctuation ';' Operator '\n ' Text 'FreeMem' Name.Builtin '(' Punctuation 'Chunk' Name '.' Operator 'Data' Name ')' Punctuation ';' Operator '\n ' Text 'Dispose' Keyword '(' Punctuation 'Chunk' Name ')' Punctuation ';' Operator '\n ' Text 'FBuffers' Name '.' Operator 'Delete' Name '(' Punctuation '0' Literal.Number.Integer ')' Punctuation ';' Operator '\n ' Text 'end' Keyword '\n ' Text 'else' Keyword ' ' Text "// remaining part didn't fit, get as much as we can and increment the" Comment.Single '\n ' Text '// read attribute.' Comment.Single '\n ' Text 'begin' Keyword '\n ' Text 'Move' Name.Builtin '(' Punctuation 'ChunkPos' Name '^' Operator ',' Operator ' ' Text 'Privpos' Name '^' Operator ',' Operator ' ' Text 'ReqSize' Name ' ' Text '-' Operator ' ' Text 'PrivSize' Name ')' Punctuation ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'Chunk' Name '.' Operator 'read' Name ',' Operator ' ' Text 'ReqSize' Name ' ' Text '-' Operator ' ' Text 'PrivSize' Name ')' Punctuation ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'PrivSize' Name ',' Operator ' ' Text 'ReqSize' Name ' ' Text '-' Operator ' ' Text 'PrivSize' Name ')' Punctuation ';' Operator '\n ' Text "// as we filled the buffer, we'll have to break here." Comment.Single '\n ' Text 'break' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'FBytesInFifo' Name ' ' Text ':' Operator '=' Operator ' ' Text 'GetBytesInFifo' Name ';' Operator '\n ' Text 'LeaveCriticalSection' Name '(' Punctuation 'FCritSect' Name ')' Punctuation ';' Operator '\n ' Text 'ReqSize' Name ' ' Text ':' Operator '=' Operator ' ' Text 'PrivSize' Name ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text '// read Data from Stream without removing it from the Stream...' Comment.Single '\n\n' Text 'procedure' Keyword ' ' Text 'TFifo' Name.Class '.' Operator 'PeekData' Name.Function '(' Punctuation 'Buff' Name ':' Operator ' ' Text 'pointer' Keyword.Type ';' Operator ' ' Text 'var' Keyword ' ' Text 'ReqSize' Name ':' Operator ' ' Text 'LongWord' Keyword.Type ')' Punctuation ';' Operator '\n' Text 'var' Keyword '\n ' Text 'PrivSize' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n ' Text 'Privpos' Name ':' Operator ' ' Text 'pointer' Keyword.Type ';' Operator '\n ' Text 'Chunk' Name ':' Operator ' ' Text 'PMemChunk' Name ';' Operator '\n ' Text 'ChunkPos' Name ':' Operator ' ' Text 'pointer' Keyword.Type ';' Operator '\n ' Text 'ChunkNr' Name ':' Operator ' ' Text 'Integer' Keyword.Type ';' Operator '\n' Text 'begin' Keyword '\n ' Text 'if' Keyword ' ' Text 'LongWord' Keyword.Type '(' Punctuation 'Buff' Name ')' Punctuation ' ' Text '=' Operator ' ' Text '0' Literal.Number.Integer ' ' Text 'then' Keyword '\n ' Text 'begin' Keyword '\n ' Text '// null pointer? somebody is trying to fool us, get out...' Comment.Single '\n ' Text 'Exit' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'EnterCriticalSection' Name '(' Punctuation 'FCritSect' Name ')' Punctuation ';' Operator '\n ' Text 'PrivSize' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n ' Text 'Privpos' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Buff' Name ';' Operator '\n ' Text 'ChunkNr' Name ' ' Text ':' Operator '=' Operator ' ' Text '0' Literal.Number.Integer ';' Operator '\n ' Text 'while' Keyword ' ' Text 'FBuffers' Name '.' Operator 'Count' Name ' ' Text '>' Operator ' ' Text 'ChunkNr' Name ' ' Text 'do' Keyword '\n ' Text 'begin' Keyword '\n ' Text 'Chunk' Name ' ' Text ':' Operator '=' Operator ' ' Text 'PMemChunk' Name '(' Punctuation 'FBuffers' Name '[' Punctuation 'ChunkNr' Name '])' Punctuation ';' Operator '\n ' Text 'ChunkPos' Name ' ' Text ':' Operator '=' Operator ' ' Text 'Chunk' Name '.' Operator 'data' Name ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'LongWord' Keyword.Type '(' Punctuation 'ChunkPos' Name ')' Punctuation ',' Operator ' ' Text 'Chunk' Name '.' Operator 'Read' Name ')' Punctuation ';' Operator '\n ' Text '// does the remaining part of the chunk fit into the buffer?' Comment.Single '\n ' Text 'if' Keyword ' ' Text 'PrivSize' Name ' ' Text '+' Operator ' ' Text '(' Punctuation 'Chunk' Name '.' Operator 'Filled' Name ' ' Text '-' Operator ' ' Text 'Chunk' Name '.' Operator 'read' Name ')' Punctuation ' ' Text '<' Operator ' ' Text 'ReqSize' Name ' ' Text 'then' Keyword '\n ' Text 'begin' Keyword ' ' Text '// yep, it fits' Comment.Single '\n ' Text 'Move' Name.Builtin '(' Punctuation 'ChunkPos' Name '^' Operator ',' Operator ' ' Text 'Privpos' Name '^' Operator ',' Operator ' ' Text 'Chunk' Name '.' Operator 'Filled' Name ' ' Text '-' Operator ' ' Text 'Chunk' Name '.' Operator 'read' Name ')' Punctuation ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'PrivSize' Name ',' Operator ' ' Text 'Chunk' Name '.' Operator 'Filled' Name ' ' Text '-' Operator ' ' Text 'Chunk' Name '.' Operator 'read' Name ')' Punctuation ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'ChunkNr' Name ')' Punctuation ';' Operator '\n ' Text 'end' Keyword '\n ' Text 'else' Keyword ' ' Text "// remaining part didn't fit, get as much as we can and increment the" Comment.Single '\n ' Text '// read attribute.' Comment.Single '\n ' Text 'begin' Keyword '\n ' Text 'Move' Name.Builtin '(' Punctuation 'ChunkPos' Name '^' Operator ',' Operator ' ' Text 'Privpos' Name '^' Operator ',' Operator ' ' Text 'ReqSize' Name ' ' Text '-' Operator ' ' Text 'PrivSize' Name ')' Punctuation ';' Operator '\n ' Text 'Inc' Name.Builtin '(' Punctuation 'PrivSize' Name ',' Operator ' ' Text 'ReqSize' Name ' ' Text '-' Operator ' ' Text 'PrivSize' Name ')' Punctuation ';' Operator '\n ' Text "// as we filled the buffer, we'll have to break here." Comment.Single '\n ' Text 'break' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'end' Keyword ';' Operator '\n ' Text 'LeaveCriticalSection' Name '(' Punctuation 'FCritSect' Name ')' Punctuation ';' Operator '\n ' Text 'ReqSize' Name ' ' Text ':' Operator '=' Operator ' ' Text 'PrivSize' Name ';' Operator '\n' Text 'end' Keyword ';' Operator '\n\n' Text 'end' Keyword '.' Operator '\n' Text