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