A tumblelog CMS built on AJAX, PHP and MySQL.

delphi.php 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. <?php
  2. /*************************************************************************************
  3. * delphi.php
  4. * ----------
  5. * Author: Járja Norbert (jnorbi@vipmail.hu), Benny Baumann (BenBE@omorphia.de)
  6. * Copyright: (c) 2004 Járja Norbert, Benny Baumann (BenBE@omorphia.de), Nigel McNie (http://qbnz.com/highlighter)
  7. * Release Version: 1.0.7.21
  8. * Date Started: 2004/07/26
  9. *
  10. * Delphi (Object Pascal) language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. * 2005/11/19 (1.0.3)
  15. * - Updated the very incomplete keyword and type lists
  16. * 2005/09/03 (1.0.2)
  17. * - Added support for hex numbers and string entities
  18. * 2004/11/27 (1.0.1)
  19. * - Added support for multiple object splitters
  20. * 2004/10/27 (1.0.0)
  21. * - First Release
  22. *
  23. * TODO (updated 2004/11/27)
  24. * -------------------------
  25. *
  26. *************************************************************************************
  27. *
  28. * This file is part of GeSHi.
  29. *
  30. * GeSHi is free software; you can redistribute it and/or modify
  31. * it under the terms of the GNU General Public License as published by
  32. * the Free Software Foundation; either version 2 of the License, or
  33. * (at your option) any later version.
  34. *
  35. * GeSHi is distributed in the hope that it will be useful,
  36. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  37. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  38. * GNU General Public License for more details.
  39. *
  40. * You should have received a copy of the GNU General Public License
  41. * along with GeSHi; if not, write to the Free Software
  42. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  43. *
  44. ************************************************************************************/
  45. $language_data = array (
  46. 'LANG_NAME' => 'Delphi',
  47. 'COMMENT_SINGLE' => array(1 => '//'),
  48. 'COMMENT_MULTI' => array('(*' => '*)', '{' => '}'),
  49. 'CASE_KEYWORDS' => 0,
  50. 'QUOTEMARKS' => array("'", '"'),
  51. 'ESCAPE_CHAR' => '',
  52. 'KEYWORDS' => array(
  53. 1 => array(
  54. 'Abstract', 'And', 'Array', 'As', 'Asm', 'At', 'Begin', 'Case', 'Class',
  55. 'Const', 'Constructor', 'Contains', 'Destructor', 'DispInterface', 'Div',
  56. 'Do', 'DownTo', 'Else', 'End', 'Except', 'File', 'Finalization',
  57. 'Finally', 'For', 'Function', 'Goto', 'If', 'Implementation', 'In',
  58. 'Inherited', 'Initialization', 'Inline', 'Interface', 'Is', 'Label',
  59. 'Mod', 'Not', 'Object', 'Of', 'On', 'Or', 'Overload', 'Override',
  60. 'Package', 'Packed', 'Private', 'Procedure', 'Program', 'Property',
  61. 'Protected', 'Public', 'Published', 'Raise', 'Record', 'Repeat',
  62. 'Requires', 'Resourcestring', 'Set', 'Shl', 'Shr', 'Then', 'ThreadVar',
  63. 'To', 'Try', 'Type', 'Unit', 'Until', 'Uses', 'Var', 'Virtual', 'While',
  64. 'With', 'Xor', 'assembler', 'cdecl', 'far', 'near', 'pascal', 'register',
  65. 'safecall', 'stdcall', 'varargs'
  66. ),
  67. 2 => array(
  68. 'nil', 'false', 'self', 'true', 'var', 'type', 'const'
  69. ),
  70. 3 => array(
  71. 'Abs', 'AcquireExceptionObject', 'Addr', 'AnsiToUtf8', 'Append', 'ArcTan',
  72. 'Assert', 'AssignFile', 'Assigned', 'BeginThread', 'BlockRead',
  73. 'BlockWrite', 'Break', 'ChDir', 'Chr', 'Close', 'CloseFile',
  74. 'CompToCurrency', 'CompToDouble', 'Concat', 'Continue', 'Copy', 'Cos',
  75. 'Dec', 'Delete', 'Dispose', 'DoubleToComp', 'EndThread', 'EnumModules',
  76. 'EnumResourceModules', 'Eof', 'Eoln', 'Erase', 'ExceptAddr',
  77. 'ExceptObject', 'Exclude', 'Exit', 'Exp', 'FilePos', 'FileSize',
  78. 'FillChar', 'Finalize', 'FindClassHInstance', 'FindHInstance',
  79. 'FindResourceHInstance', 'Flush', 'Frac', 'FreeMem', 'Get8087CW',
  80. 'GetDir', 'GetLastError', 'GetMem', 'GetMemoryManager',
  81. 'GetModuleFileName', 'GetVariantManager', 'Halt', 'Hi', 'High',
  82. 'IOResult', 'Inc', 'Include', 'Initialize', 'Insert', 'Int',
  83. 'IsMemoryManagerSet', 'IsVariantManagerSet', 'Length', 'Ln', 'Lo', 'Low',
  84. 'MkDir', 'Move', 'New', 'Odd', 'OleStrToStrVar', 'OleStrToString', 'Ord',
  85. 'PUCS4Chars', 'ParamCount', 'ParamStr', 'Pi', 'Pos', 'Pred', 'Ptr',
  86. 'Random', 'Randomize', 'Read', 'ReadLn', 'ReallocMem',
  87. 'ReleaseExceptionObject', 'Rename', 'Reset', 'Rewrite', 'RmDir', 'Round',
  88. 'RunError', 'Seek', 'SeekEof', 'SeekEoln', 'Set8087CW', 'SetLength',
  89. 'SetLineBreakStyle', 'SetMemoryManager', 'SetString', 'SetTextBuf',
  90. 'SetVariantManager', 'Sin', 'SizeOf', 'Slice', 'Sqr', 'Sqrt', 'Str',
  91. 'StringOfChar', 'StringToOleStr', 'StringToWideChar', 'Succ', 'Swap',
  92. 'Trunc', 'Truncate', 'TypeInfo', 'UCS4StringToWideString', 'UTF8Decode',
  93. 'UTF8Encode', 'UnicodeToUtf8', 'UniqueString', 'UpCase', 'Utf8ToAnsi',
  94. 'Utf8ToUnicode', 'Val', 'VarArrayRedim', 'VarClear',
  95. 'WideCharLenToStrVar', 'WideCharLenToString', 'WideCharToStrVar',
  96. 'WideCharToString', 'WideStringToUCS4String', 'Write', 'WriteLn',
  97. 'Abort', 'AddExitProc', 'AddTerminateProc', 'AdjustLineBreaks', 'AllocMem',
  98. 'AnsiCompareFileName', 'AnsiCompareStr', 'AnsiCompareText',
  99. 'AnsiDequotedStr', 'AnsiExtractQuotedStr', 'AnsiLastChar',
  100. 'AnsiLowerCase', 'AnsiLowerCaseFileName', 'AnsiPos', 'AnsiQuotedStr',
  101. 'AnsiSameStr', 'AnsiSameText', 'AnsiStrComp', 'AnsiStrIComp',
  102. 'AnsiStrLComp', 'AnsiStrLIComp', 'AnsiStrLastChar', 'AnsiStrLower',
  103. 'AnsiStrPos', 'AnsiStrRScan', 'AnsiStrScan', 'AnsiStrUpper',
  104. 'AnsiUpperCase', 'AnsiUpperCaseFileName', 'AppendStr', 'AssignStr',
  105. 'Beep', 'BoolToStr', 'ByteToCharIndex', 'ByteToCharLen', 'ByteType',
  106. 'CallTerminateProcs', 'ChangeFileExt', 'CharLength', 'CharToByteIndex',
  107. 'CharToByteLen', 'CompareMem', 'CompareStr', 'CompareText', 'CreateDir',
  108. 'CreateGUID', 'CurrToStr', 'CurrToStrF', 'CurrentYear', 'Date',
  109. 'DateTimeToFileDate', 'DateTimeToStr', 'DateTimeToString',
  110. 'DateTimeToSystemTime', 'DateTimeToTimeStamp', 'DateToStr', 'DayOfWeek',
  111. 'DecodeDate', 'DecodeDateFully', 'DecodeTime', 'DeleteFile',
  112. 'DirectoryExists', 'DiskFree', 'DiskSize', 'DisposeStr', 'EncodeDate',
  113. 'EncodeTime', 'ExceptionErrorMessage', 'ExcludeTrailingBackslash',
  114. 'ExcludeTrailingPathDelimiter', 'ExpandFileName', 'ExpandFileNameCase',
  115. 'ExpandUNCFileName', 'ExtractFileDir', 'ExtractFileDrive',
  116. 'ExtractFileExt', 'ExtractFileName', 'ExtractFilePath',
  117. 'ExtractRelativePath', 'ExtractShortPathName', 'FileAge', 'FileClose',
  118. 'FileCreate', 'FileDateToDateTime', 'FileExists', 'FileGetAttr',
  119. 'FileGetDate', 'FileIsReadOnly', 'FileOpen', 'FileRead', 'FileSearch',
  120. 'FileSeek', 'FileSetAttr', 'FileSetDate', 'FileSetReadOnly', 'FileWrite',
  121. 'FinalizePackage', 'FindClose', 'FindCmdLineSwitch', 'FindFirst',
  122. 'FindNext', 'FloatToCurr', 'FloatToDateTime', 'FloatToDecimal',
  123. 'FloatToStr', 'FloatToStrF', 'FloatToText', 'FloatToTextFmt',
  124. 'FmtLoadStr', 'FmtStr', 'ForceDirectories', 'Format', 'FormatBuf',
  125. 'FormatCurr', 'FormatDateTime', 'FormatFloat', 'FreeAndNil',
  126. 'GUIDToString', 'GetCurrentDir', 'GetEnvironmentVariable',
  127. 'GetFileVersion', 'GetFormatSettings', 'GetLocaleFormatSettings',
  128. 'GetModuleName', 'GetPackageDescription', 'GetPackageInfo', 'GetTime',
  129. 'IncAMonth', 'IncMonth', 'IncludeTrailingBackslash',
  130. 'IncludeTrailingPathDelimiter', 'InitializePackage', 'IntToHex',
  131. 'IntToStr', 'InterlockedDecrement', 'InterlockedExchange',
  132. 'InterlockedExchangeAdd', 'InterlockedIncrement', 'IsDelimiter',
  133. 'IsEqualGUID', 'IsLeapYear', 'IsPathDelimiter', 'IsValidIdent',
  134. 'Languages', 'LastDelimiter', 'LoadPackage', 'LoadStr', 'LowerCase',
  135. 'MSecsToTimeStamp', 'NewStr', 'NextCharIndex', 'Now', 'OutOfMemoryError',
  136. 'QuotedStr', 'RaiseLastOSError', 'RaiseLastWin32Error', 'RemoveDir',
  137. 'RenameFile', 'ReplaceDate', 'ReplaceTime', 'SafeLoadLibrary',
  138. 'SameFileName', 'SameText', 'SetCurrentDir', 'ShowException', 'Sleep',
  139. 'StrAlloc', 'StrBufSize', 'StrByteType', 'StrCat', 'StrCharLength',
  140. 'StrComp', 'StrCopy', 'StrDispose', 'StrECopy', 'StrEnd', 'StrFmt',
  141. 'StrIComp', 'StrLCat', 'StrLComp', 'StrLCopy', 'StrLFmt', 'StrLIComp',
  142. 'StrLen', 'StrLower', 'StrMove', 'StrNew', 'StrNextChar', 'StrPCopy',
  143. 'StrPLCopy', 'StrPas', 'StrPos', 'StrRScan', 'StrScan', 'StrToBool',
  144. 'StrToBoolDef', 'StrToCurr', 'StrToCurrDef', 'StrToDate', 'StrToDateDef',
  145. 'StrToDateTime', 'StrToDateTimeDef', 'StrToFloat', 'StrToFloatDef',
  146. 'StrToInt', 'StrToInt64', 'StrToInt64Def', 'StrToIntDef', 'StrToTime',
  147. 'StrToTimeDef', 'StrUpper', 'StringReplace', 'StringToGUID', 'Supports',
  148. 'SysErrorMessage', 'SystemTimeToDateTime', 'TextToFloat', 'Time',
  149. 'TimeStampToDateTime', 'TimeStampToMSecs', 'TimeToStr', 'Trim',
  150. 'TrimLeft', 'TrimRight', 'TryEncodeDate', 'TryEncodeTime',
  151. 'TryFloatToCurr', 'TryFloatToDateTime', 'TryStrToBool', 'TryStrToCurr',
  152. 'TryStrToDate', 'TryStrToDateTime', 'TryStrToFloat', 'TryStrToInt',
  153. 'TryStrToInt64', 'TryStrToTime', 'UnloadPackage', 'UpperCase',
  154. 'WideCompareStr', 'WideCompareText', 'WideFmtStr', 'WideFormat',
  155. 'WideFormatBuf', 'WideLowerCase', 'WideSameStr', 'WideSameText',
  156. 'WideUpperCase', 'Win32Check', 'WrapText',
  157. 'ActivateClassGroup', 'AllocateHwnd', 'BinToHex', 'CheckSynchronize',
  158. 'CollectionsEqual', 'CountGenerations', 'DeallocateHwnd', 'EqualRect',
  159. 'ExtractStrings', 'FindClass', 'FindGlobalComponent', 'GetClass',
  160. 'GroupDescendantsWith', 'HexToBin', 'IdentToInt',
  161. 'InitInheritedComponent', 'IntToIdent', 'InvalidPoint',
  162. 'IsUniqueGlobalComponentName', 'LineStart', 'ObjectBinaryToText',
  163. 'ObjectResourceToText', 'ObjectTextToBinary', 'ObjectTextToResource',
  164. 'PointsEqual', 'ReadComponentRes', 'ReadComponentResEx',
  165. 'ReadComponentResFile', 'Rect', 'RegisterClass', 'RegisterClassAlias',
  166. 'RegisterClasses', 'RegisterComponents', 'RegisterIntegerConsts',
  167. 'RegisterNoIcon', 'RegisterNonActiveX', 'SmallPoint', 'StartClassGroup',
  168. 'TestStreamFormat', 'UnregisterClass', 'UnregisterClasses',
  169. 'UnregisterIntegerConsts', 'UnregisterModuleClasses',
  170. 'WriteComponentResFile',
  171. 'ArcCos', 'ArcCosh', 'ArcCot', 'ArcCotH', 'ArcCsc', 'ArcCscH', 'ArcSec',
  172. 'ArcSecH', 'ArcSin', 'ArcSinh', 'ArcTan2', 'ArcTanh', 'Ceil',
  173. 'CompareValue', 'Cosecant', 'Cosh', 'Cot', 'CotH', 'Cotan', 'Csc', 'CscH',
  174. 'CycleToDeg', 'CycleToGrad', 'CycleToRad', 'DegToCycle', 'DegToGrad',
  175. 'DegToRad', 'DivMod', 'DoubleDecliningBalance', 'EnsureRange', 'Floor',
  176. 'Frexp', 'FutureValue', 'GetExceptionMask', 'GetPrecisionMode',
  177. 'GetRoundMode', 'GradToCycle', 'GradToDeg', 'GradToRad', 'Hypot',
  178. 'InRange', 'IntPower', 'InterestPayment', 'InterestRate',
  179. 'InternalRateOfReturn', 'IsInfinite', 'IsNan', 'IsZero', 'Ldexp', 'LnXP1',
  180. 'Log10', 'Log2', 'LogN', 'Max', 'MaxIntValue', 'MaxValue', 'Mean',
  181. 'MeanAndStdDev', 'Min', 'MinIntValue', 'MinValue', 'MomentSkewKurtosis',
  182. 'NetPresentValue', 'Norm', 'NumberOfPeriods', 'Payment', 'PeriodPayment',
  183. 'Poly', 'PopnStdDev', 'PopnVariance', 'Power', 'PresentValue',
  184. 'RadToCycle', 'RadToDeg', 'RadToGrad', 'RandG', 'RandomRange', 'RoundTo',
  185. 'SLNDepreciation', 'SYDDepreciation', 'SameValue', 'Sec', 'SecH',
  186. 'Secant', 'SetExceptionMask', 'SetPrecisionMode', 'SetRoundMode', 'Sign',
  187. 'SimpleRoundTo', 'SinCos', 'Sinh', 'StdDev', 'Sum', 'SumInt',
  188. 'SumOfSquares', 'SumsAndSquares', 'Tan', 'Tanh', 'TotalVariance',
  189. 'Variance'
  190. ),
  191. 4 => array(
  192. 'AnsiChar', 'AnsiString', 'Bool', 'Boolean', 'Byte', 'ByteBool', 'Cardinal', 'Char',
  193. 'Comp', 'Currency', 'DWORD', 'Double', 'Extended', 'Int64', 'Integer', 'IUnknown',
  194. 'LongBool', 'LongInt', 'LongWord', 'PAnsiChar', 'PAnsiString', 'PBool', 'PBoolean', 'PByte',
  195. 'PByteArray', 'PCardinal', 'PChar', 'PComp', 'PCurrency', 'PDWORD', 'PDate', 'PDateTime',
  196. 'PDouble', 'PExtended', 'PInt64', 'PInteger', 'PLongInt', 'PLongWord', 'Pointer', 'PPointer',
  197. 'PShortInt', 'PShortString', 'PSingle', 'PSmallInt', 'PString', 'PHandle', 'PVariant', 'PWord',
  198. 'PWordArray', 'PWordBool', 'PWideChar', 'PWideString', 'Real', 'Real48', 'ShortInt', 'ShortString',
  199. 'Single', 'SmallInt', 'String', 'TClass', 'TDate', 'TDateTime', 'TextFile', 'THandle',
  200. 'TObject', 'TTime', 'Variant', 'WideChar', 'WideString', 'Word', 'WordBool'
  201. ),
  202. ),
  203. 'CASE_SENSITIVE' => array(
  204. GESHI_COMMENTS => true,
  205. 1 => false,
  206. 2 => false,
  207. 3 => false,
  208. 4 => false,
  209. ),
  210. 'SYMBOLS' => array(
  211. 0 => array('(', ')', '[', ']'),
  212. 1 => array('.', ',', ':', ';'),
  213. 2 => array('@', '^'),
  214. 3 => array('=', '+', '-', '*', '/')
  215. ),
  216. 'STYLES' => array(
  217. 'KEYWORDS' => array(
  218. 1 => 'color: #000000; font-weight: bold;',
  219. 2 => 'color: #000000; font-weight: bold;',
  220. 3 => 'color: #000066;',
  221. 4 => 'color: #993333;'
  222. ),
  223. 'COMMENTS' => array(
  224. 1 => 'color: #808080; font-style: italic;',
  225. 'MULTI' => 'color: #808080; font-style: italic;'
  226. ),
  227. 'ESCAPE_CHAR' => array(
  228. ),
  229. 'BRACKETS' => array(
  230. 0 => 'color: #66cc66;'
  231. ),
  232. 'STRINGS' => array(
  233. 0 => 'color: #ff0000;'
  234. ),
  235. 'NUMBERS' => array(
  236. 0 => 'color: #cc66cc;'
  237. ),
  238. 'METHODS' => array(
  239. 1 => 'color: #006600;'
  240. ),
  241. 'REGEXPS' => array(
  242. 0 => 'color: #9ac;',
  243. 1 => 'color: #ff0000;'
  244. ),
  245. 'SYMBOLS' => array(
  246. 0 => 'color: #66cc66;',
  247. 1 => 'color: #66cc66;',
  248. 2 => 'color: #66cc66;',
  249. 3 => 'color: #66cc66;'
  250. ),
  251. 'SCRIPT' => array(
  252. )
  253. ),
  254. 'URLS' => array(
  255. 1 => '',
  256. 2 => '',
  257. 3 => '',
  258. 4 => ''
  259. ),
  260. 'OOLANG' => true,
  261. 'OBJECT_SPLITTERS' => array(
  262. 1 => '.'
  263. ),
  264. 'REGEXPS' => array(
  265. 0 => '\$[0-9a-fA-F]+',
  266. 1 => '\#\$?[0-9]{1,3}'
  267. ),
  268. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  269. 'SCRIPT_DELIMITERS' => array(
  270. ),
  271. 'HIGHLIGHT_STRICT_BLOCK' => array(
  272. ),
  273. 'TAB_WIDTH' => 2
  274. );
  275. ?>