summaryrefslogtreecommitdiffstats
path: root/paste/include/geshi/contexts/delphi
diff options
context:
space:
mode:
Diffstat (limited to 'paste/include/geshi/contexts/delphi')
-rw-r--r--paste/include/geshi/contexts/delphi/asm.php271
-rw-r--r--paste/include/geshi/contexts/delphi/delphi.php382
-rw-r--r--paste/include/geshi/contexts/delphi/exports_brackets.php178
-rw-r--r--paste/include/geshi/contexts/delphi/extern.php131
-rw-r--r--paste/include/geshi/contexts/delphi/multi_comment.php51
-rw-r--r--paste/include/geshi/contexts/delphi/preprocessor.php51
-rw-r--r--paste/include/geshi/contexts/delphi/property.php157
-rw-r--r--paste/include/geshi/contexts/delphi/property_index.php143
8 files changed, 1364 insertions, 0 deletions
diff --git a/paste/include/geshi/contexts/delphi/asm.php b/paste/include/geshi/contexts/delphi/asm.php
new file mode 100644
index 0000000..dd63b4f
--- /dev/null
+++ b/paste/include/geshi/contexts/delphi/asm.php
@@ -0,0 +1,271 @@
+<?php
+/**
+ * GeSHi - Generic Syntax Highlighter
+ *
+ * For information on how to use GeSHi, please consult the documentation
+ * found in the docs/ directory, or online at http://geshi.org/docs/
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * You can view a copy of the GNU GPL in the COPYING file that comes
+ * with GeSHi, in the docs/ directory.
+ *
+ * @package lang
+ * @author Benny Baumann <BenBE@benbe.omorphia.de>, Nigel McNie <nigel@geshi.org>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL
+ * @copyright (C) 2005 Nigel McNie
+ * @version 1.1.0
+ *
+ */
+
+$this->_contextDelimiters = array(
+ 0 => array(
+ 0 => array('asm'),
+ 1 => array('end'),
+ 2 => false
+ )
+);
+
+$this->_childContexts = array(
+ new GeSHiContext('delphi', $DIALECT, 'preprocessor'),
+ new GeSHiContext('delphi', $DIALECT, 'common/single_comment')
+);
+
+$this->_styler->setStyle($CONTEXT, 'color:#00f;');
+$this->_styler->setStyle($CONTEXT_START, 'color:#f00;font-weight:bold;');
+$this->_styler->setStyle($CONTEXT_END, 'color:#f00;font-weight:bold;');
+
+$this->_contextKeywords = array(
+ //Assembler Directives
+ 0 => array(
+ 0 => array(
+ 'db','dd','dw'
+ ),
+ 1 => $CONTEXT . '/keywords',
+ 2 => 'color:#00f; font-weight:bold;',
+ 3 => false,
+ 4 => ''
+ ),
+
+ 1 => array(
+ 0 => array(
+ 'large', 'small',
+ 'offset','vmtoffset','dmtindex',
+ 'byte', 'word', 'dword', 'qword', 'tbyte', 'ptr'
+ ),
+ 1 => $CONTEXT . '/control',
+ 2 => 'color:#00f; font-weight: bold;',
+ 3 => false,
+ 4 => ''
+ ),
+
+ //CPU i386 instructions
+ 2 => array(
+ 0 => array(
+/*
+ // @todo order the i386 instruction set
+
+ 'aaa','aad','aam','aas','adc','add','and','call','cbw','clc','cld','cli','cmc','cmp',
+ 'cmps','cmpsb','cmpsw','cwd','daa','das','dec','div','esc','hlt','idiv','imul','in','inc',
+ 'int','into','iret','ja','jae','jb','jbe','jc','jcxz','je','jg','jge','jl','jle','jmp',
+ 'jna','jnae','jnb','jnbe','jnc','jne','jng','jnge','jnl','jnle','jno','jnp','jns','jnz',
+ 'jo','jp','jpe','jpo','js','jz','lahf','lds','lea','les','lods','lodsb','lodsw','loop',
+ 'loope','loopew','loopne','loopnew','loopnz','loopnzw','loopw','loopz','loopzw','mov',
+ 'movs','movsb','movsw','mul','neg','nop','not','or','out','pop','popf','push','pushf',
+ 'rcl','rcr','ret','retf','retn','rol','ror','sahf','sal','sar','sbb','scas','scasb','scasw',
+ 'shl','shr','stc','std','sti','stos','stosb','stosw','sub','test','wait','xchg','xlat',
+ 'xlatb','xor','bound','enter','ins','insb','insw','leave','outs','outsb','outsw','popa','pusha','pushw',
+ 'arpl','lar','lsl','sgdt','sidt','sldt','smsw','str','verr','verw','clts','lgdt','lidt','lldt','lmsw','ltr',
+ 'bsf','bsr','bt','btc','btr','bts','cdq','cmpsd','cwde','insd','iretd','iretdf','iretf',
+ 'jecxz','lfs','lgs','lodsd','loopd','looped','loopned','loopnzd','loopzd','lss','movsd',
+ 'movsx','movzx','outsd','popad','popfd','pushad','pushd','pushfd','scasd','seta','setae',
+ 'setb','setbe','setc','sete','setg','setge','setl','setle','setna','setnae','setnb','setnbe',
+ 'setnc','setne','setng','setnge','setnl','setnle','setno','setnp','setns','setnz','seto','setp',
+ 'setpe','setpo','sets','setz','shld','shrd','stosd','bswap','cmpxchg','invd','invlpg',
+ 'wbinvd','xadd','lock','rep','repe','repne','repnz','repz'
+*/
+ 'AAA','AAD','AAM','AAS','ADC','ADD','AND','ARPL','BOUND','BSF','BSR','BSWAP','BT','BTC','BTR',
+ 'BTS','CALL','CBW','CDQ','CLC','CLD','CLI','CLTS','CMC','CMP','CMPSB','CMPSD','CMPSW',
+ 'CMPXCHG','CMPXCHG486','CMPXCHG8B','CPUID','CWD','CWDE',
+ 'cmova','cmovae','cmovb','cmovbe','cmovc','cmovcxz','cmove','cmovg','cmovge','cmovl','cmovle',
+ 'cmovna','cmovnae','cmovnb','cmovnbe','cmovnc','cmovne','cmovng','cmovnge','cmovnl','cmovnle',
+ 'cmovno','cmovnp','cmovns','cmovnz','cmovo','cmovp','cmovpe','cmovpo','cmovs','cmovz',
+ 'DAA','DAS','DEC','DIV','EMMS','ENTER','HLT','IBTS','ICEBP','IDIV','IMUL','IN','INC','INSB',
+ 'INSD','INSW','INT','INT01','INT1','INT03','INT3','INTO','INVD','INVLPG','IRET','IRETD','IRETW',
+ 'JCXZ','JECXZ','JMP','ja','jae','jb','jbe','jc','jcxz','je','jg','jge','jl','jle','jna','jnae',
+ 'jnb','jnbe','jnc','jne','jng','jnge','jnl','jnle','jno','jnp','jns','jnz','jo','jp','jpe',
+ 'jpo','js','jz','LAHF','LAR','LCALL','LDS','LEA','LEAVE','LES','LFS','LGDT','LGS','LIDT',
+ 'LJMP','LLDT','LMSW','LOADALL','LOADALL286','LOCK','LODSB','LODSD','LODSW','LOOP','LOOPE',
+ 'LOOPNE','LOOPNZ','LOOPZ','LSL','LSS','LTR','MOV','MOVD','MOVQ','MOVSB','MOVSD','MOVSW','MOVSX',
+ 'MOVZX','MUL','NEG','NOP','NOT','OR','OUT','OUTSB','OUTSD','OUTSW','POP','POPA','POPAD','POPAW',
+ 'POPF','POPFD','POPFW','PUSH','PUSHA','PUSHAD','PUSHAW','PUSHF','PUSHFD','PUSHFW','RCL','RCR',
+ 'RDSHR','RDMSR','RDPMC','RDTSC','REP','REPE','REPNE','REPNZ','REPZ','RET','RETF','RETN','ROL',
+ 'ROR','RSDC','RSLDT','RSM','SAHF','SAL','SALC','SAR','SBB','SCASB','SCASD','SCASW','SGDT',
+ 'seta','setae','setb','setbe','setc','setcxz','sete','setg','setge','setl','setle','setna',
+ 'setnae','setnb','setnbe','setnc','setne','setng','setnge','setnl','setnle','setno','setnp',
+ 'setns','setnz','seto','setp','setpe','setpo','sets','setz',
+ 'SHL','SHLD','SHR','SHRD','SIDT','SLDT','SMI','SMINT','SMINTOLD','SMSW','STC','STD','STI','STOSB',
+ 'STOSD','STOSW','STR','SUB','SVDC','SVLDT','SVTS','SYSCALL','SYSENTER','SYSEXIT','SYSRET','TEST',
+ 'UD1','UD2','UMOV','VERR','VERW','WAIT','WBINVD','WRSHR','WRMSR','XADD','XBTS','XCHG','XLAT',
+ 'XLATB','XOR'
+ ),
+ 1 => $CONTEXT . '/instr_i386',
+ 2 => 'color:#00f; font-weight:bold;',
+ 3 => false,
+ 4 => ''
+ ),
+
+ //FPU i387 instructions
+ 3 => array(
+ 0 => array(
+ /*
+ // @todo order the i387 instruction set
+ 'f2xm1','fabs','fadd','faddp','fbld','fbstp','fchs','fclex','fcom','fcomp','fcompp','fdecstp',
+ 'fdisi','fdiv','fdivp','fdivr','fdivrp','feni','ffree','fiadd','ficom','ficomp','fidiv',
+ 'fidivr','fild','fimul','fincstp','finit','fist','fistp','fisub','fisubr','fld','fld1',
+ 'fldcw','fldenv','fldenvw','fldl2e','fldl2t','fldlg2','fldln2','fldpi','fldz','fmul',
+ 'fmulp','fnclex','fndisi','fneni','fninit','fnop','fnsave','fnsavew','fnstcw','fnstenv',
+ 'fnstenvw','fnstsw','fpatan','fprem','fptan','frndint','frstor','frstorw','fsave',
+ 'fsavew','fscale','fsqrt','fst','fstcw','fstenv','fstenvw','fstp','fstsw','fsub','fsubp',
+ 'fsubr','fsubrp','ftst','fwait','fxam','fxch','fxtract','fyl2x','fyl2xp1',
+ 'fsetpm','fcos','fldenvd','fnsaved','fnstenvd','fprem1','frstord','fsaved','fsin','fsincos',
+ 'fstenvd','fucom','fucomp','fucompp'
+ */
+ 'F2XM1','FABS','FADD','FADDP','FBLD','FBSTP','FCHS','FCLEX','FCMOVB','FCMOVBE','FCMOVE','FCMOVNB',
+ 'FCMOVNBE','FCMOVNE','FCMOVNU','FCMOVU','FCOM','FCOMI','FCOMIP','FCOMP','FCOMPP','FCOS','FDECSTP',
+ 'FDISI','FDIV','FDIVP','FDIVR','FDIVRP','FEMMS','FENI','FFREE','FIADD','FICOM','FICOMP','FIDIV',
+ 'FIDIVR','FILD','FIMUL','FINCSTP','FINIT','FIST','FISTP','FISUB','FISUBR','FLD','FLD1','FLDCW',
+ 'FLDENV','FLDL2E','FLDL2T','FLDLG2','FLDLN2','FLDPI','FLDZ','FMUL','FMULP','FNCLEX','FNDISI',
+ 'FNENI','FNINIT','FNOP','FNSAVE','FNSTCW','FNSTENV','FNSTSW','FPATAN','FPREM','FPREM1','FPTAN',
+ 'FRNDINT','FRSTOR','FSAVE','FSCALE','FSETPM','FSIN','FSINCOS','FSQRT','FST','FSTCW','FSTENV',
+ 'FSTP','FSTSW','FSUB','FSUBP','FSUBR','FSUBRP','FTST','FUCOM','FUCOMI','FUCOMIP','FUCOMP',
+ 'FUCOMPP','FWAIT','FXAM','FXCH','FXTRACT','FYL2X','FYL2XP1'
+ ),
+ 1 => $CONTEXT . '/instr_i387',
+ 2 => 'color:#00f; font-weight:bold;',
+ 3 => false,
+ 4 => ''
+ ),
+
+ //MMX instruction set
+ 4 => array(
+ 0 => array(
+ // @todo order the mmx instruction set
+
+ 'FFREEP','FXRSTOR','FXSAVE','PREFETCHNTA','PREFETCHT0','PREFETCHT1','PREFETCHT2','SFENCE',
+ 'MASKMOVQ','MOVNTQ','PAVGB','PAVGW','PEXTRW','PINSRW','PMAXSW','PMAXUB','PMINSW','PMINUB',
+ 'PMOVMSKB','PMULHUW','PSADBW','PSHUFW',
+
+ 'PACKSSDW','PACKSSWB','PACKUSWB','PADDB','PADDD','PADDSB','PADDSIW','PADDSW','PADDUSB','PADDUSW',
+ 'PADDW','PAND','PANDN','PAVEB','PCMPEQB','PCMPEQD','PCMPEQW','PCMPGTB','PCMPGTD',
+ 'PCMPGTW','PDISTIB','PFCMPEQ','PFCMPGE','PFCMPGT','PMACHRIW','PMADDWD',
+ 'PMAGW','PMVGEZB','PMVLZB','PMVNZB','PMVZB',
+ 'POR','PSLLD','PSLLQ','PSLLW','PSRAD','PSRAW','PSRLD','PSRLQ','PSRLW',
+ 'PSUBB','PSUBD','PSUBSB','PSUBSIW','PSUBSW','PSUBUSB','PSUBUSW','PSUBW','PUNPCKHBW','PUNPCKHDQ',
+ 'PUNPCKHWD','PUNPCKLBW','PUNPCKLDQ','PUNPCKLWD','PXOR'
+ ),
+ 1 => $CONTEXT . '/instr/mmx',
+ 2 => 'color:#00f; font-weight:bold;',
+ 3 => false,
+ 4 => ''
+ ),
+
+ //SSE instruction set
+ 5 => array(
+ 0 => array(
+ // @todo order the SSE instruction set
+ 'ADDPS','ADDSS','ANDNPS','ANDPS','CMPEQPS','CMPEQSS','CMPLEPS','CMPLESS','CMPLTPS','CMPLTSS',
+ 'CMPNEQPS','CMPNEQSS','CMPNLEPS','CMPNLESS','CMPNLTPS','CMPNLTSS','CMPORDPS','CMPORDSS',
+ 'CMPUNORDPS','CMPUNORDSS','CMPPS','CMPSS','COMISS','CVTPI2PS','CVTPS2PI','CVTSI2SS','CVTSS2SI',
+ 'CVTTPS2PI','CVTTSS2SI','DIVPS','DIVSS','LDMXCSR','MAXPS','MAXSS','MINPS','MINSS','MOVAPS',
+ 'MOVHPS','MOVLHPS','MOVLPS','MOVHLPS','MOVMSKPS','MOVNTPS','MOVSS','MOVUPS','MULPS','MULSS',
+ 'ORPS','RCPPS','RCPSS','RSQRTPS','RSQRTSS','SHUFPS','SQRTPS','SQRTSS','STMXCSR','SUBPS',
+ 'SUBSS','UCOMISS','UNPCKHPS','UNPCKLPS','XORPS'
+ ),
+ 1 => $CONTEXT . '/instr/sse',
+ 2 => 'color:#00f; font-weight:bold;',
+ 3 => false,
+ 4 => ''
+ ),
+
+ //3DNow instruction set
+ 6 => array(
+ 0 => array(
+ // @todo order the 3Dnow! instruction set
+ 'PAVGUSB','PF2ID','PFACC','PFADD','PFMUL','PFRCP','PFRCPIT1','PFRCPIT2','PFRSQIT1','PFRSQRT',
+ 'PFSUB','PFSUBR','PFMAX','PFMIN','PI2FD','PMULHRIW','PMULHRWA','PMULHRWC','PMULHW','PMULLW',
+ 'PREFETCH','PREFETCHW'
+ ),
+ 1 => $CONTEXT . '/instr/3Dnow',
+ 2 => 'color:#00f; font-weight:bold;',
+ 3 => false,
+ 4 => ''
+ ),
+
+ //3DNowExt instruction set
+ 7 => array(
+ 0 => array(
+ // @todo order the 3Dnow! Ext instruction set
+ 'PFNACC','PFPNACC','PI2FW','PF2IW','PSWAPD'
+ ),
+ 1 => $CONTEXT . '/instr/3Dnow2',
+ 2 => 'color:#00f; font-weight:bold;',
+ 3 => false,
+ 4 => ''
+ )
+);
+
+$this->_contextSymbols = array(
+ 0 => array(
+ 0 => array(
+ ',', ';', '[', ']', '.'
+ ),
+ 1 => $CONTEXT . '/sym',
+ 2 => 'color:#008000;'
+ )
+);
+
+$this->_contextRegexps = array(
+ 0 => array(
+ 0 => array('#([a-zA-Z]+:)#'),
+ 1 => ':',
+ 2 => array(
+ 1 => array($CONTEXT . '/label', 'color:#933;', false)
+ )
+ ),
+ 1 => array(
+ 0 => array(
+ '/(\$[0-9a-fA-F_]+)/'
+ ),
+ 1 => '$',
+ 2 => array(
+ 1 => array($CONTEXT . '/hex', 'color: #2bf;', false)
+ )
+ ),
+ 2 => geshi_use_integers($CONTEXT)
+);
+
+$this->_objectSplitters = array(
+ 0 => array(
+ 0 => array('.'),
+ 1 => $CONTEXT . '/oodynamic',
+ 2 => 'color:#559;',
+ 3 => false // If true, check that matched method isn't a keyword first
+ )
+);
+
+?>
diff --git a/paste/include/geshi/contexts/delphi/delphi.php b/paste/include/geshi/contexts/delphi/delphi.php
new file mode 100644
index 0000000..56f763c
--- /dev/null
+++ b/paste/include/geshi/contexts/delphi/delphi.php
@@ -0,0 +1,382 @@
+<?php
+/**
+ * GeSHi - Generic Syntax Highlighter
+ *
+ * For information on how to use GeSHi, please consult the documentation
+ * found in the docs/ directory, or online at http://geshi.org/docs/
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * You can view a copy of the GNU GPL in the COPYING file that comes
+ * with GeSHi, in the docs/ directory.
+ *
+ * @package lang
+ * @author Benny Baumann <BenBE@benbe.omorphia.de>, Nigel McNie <nigel@geshi.org>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL
+ * @copyright (C) 2005 Nigel McNie
+ * @version 1.1.0
+ *
+ */
+
+// @todo [blocking 1.1.1] Rename OCCs with parent's name in front for theming
+// BenBE: What do you mean?
+// My todo for theming support, not relevant to delphi
+// @todo [blocking 1.1.1] make keywords not keywords if they don't have a ( after
+// them (e.g. a variable named "sum" will be highlighted as a keyword even if it isn't)
+$this->_childContexts = array(
+ new GeSHiContext('delphi', $DIALECT, 'multi_comment'),
+ new GeSHiContext('delphi', $DIALECT, 'common/single_comment'),
+ new GeSHiContext('delphi', $DIALECT, 'common/single_string_eol'),
+ new GeSHiContext('delphi', $DIALECT, 'preprocessor'),
+ new GeSHiCodeContext('delphi', $DIALECT, 'asm'),
+ new GeSHiCodeContext('delphi', $DIALECT, 'extern', 'delphi/' . $DIALECT),
+ new GeSHiCodeContext('delphi', $DIALECT, 'property', 'delphi/' . $DIALECT)
+);
+
+//$this->_styler->setStyle($CONTEXT, 'color:#000;');
+
+$this->_contextKeywords = array(
+ 0 => array(
+ 0 => array(
+ //@todo [blocking 1.1.1] get keywords normal way
+ 'And',
+ 'Array',
+ 'As',
+ 'Asm',
+ 'At',
+ 'Begin',
+ 'Case',
+ 'Class',
+ 'Const',
+ 'Constructor',
+ 'Contains',
+ 'Destructor',
+ 'DispInterface',
+ 'Div',
+ 'Do',
+ 'DownTo',
+ 'Else',
+ 'End',
+ 'Except',
+ 'File',
+ 'Finalization',
+ 'Finally',
+ 'For',
+ 'Function',
+ 'Goto',
+ 'If',
+ 'Implementation',
+ 'In',
+ 'Inherited',
+ 'Initialization',
+ 'Inline',
+ 'Interface',
+ 'Is',
+ 'Label',
+ 'Mod',
+ 'Not',
+ 'Object',
+ 'Of',
+ 'On',
+ 'Or',
+ 'Packed',
+ 'Package',
+ 'Procedure',
+ 'Program',
+ 'Property',
+ 'Raise',
+ 'Record',
+ 'Requires',
+ 'Repeat',
+ 'Resourcestring',
+ 'Set',
+ 'Shl',
+ 'Shr',
+ 'Then',
+ 'ThreadVar',
+ 'To',
+ 'Try',
+ 'Type',
+ 'Unit',
+ 'Until',
+ 'Uses',
+ 'Var',
+ 'While',
+ 'With',
+ 'Xor',
+
+ 'Private', 'Protected', 'Public', 'Published',
+
+ 'Virtual', 'Abstract', 'Override', 'Overload',
+
+ 'cdecl', 'stdcall', 'register', 'pascal', 'safecall', 'near', 'far', 'varargs',
+
+ 'assembler'
+ ),
+ 1 => $CONTEXT . '/keywords',
+ 2 => 'color:#f00; font-weight:bold;',
+ 3 => false,
+ 4 => ''
+ ),
+ 1 => array(
+ 0 => array(
+ 'Boolean', 'ByteBool', 'LongBool', 'WordBool', 'Bool',
+
+ 'Byte', 'SmallInt',
+ 'ShortInt', 'Word',
+ 'Integer', 'Cardinal',
+ 'LongInt', 'DWORD',
+ 'Int64',
+
+ 'Single', 'Double', 'Extended',
+ 'Real48', 'Real', 'Comp', 'Currency',
+
+ 'Pointer',
+
+ 'Char', 'AnsiChar', 'WideChar',
+ 'PChar', 'PAnsiChar', 'PWideChar',
+ 'String', 'AnsiString', 'WideString',
+
+ 'THandle'
+ ),
+ 1 => $CONTEXT . '/keytypes',
+ 2 => 'color:#000; font-weight:bold;',
+ 3 => false,
+ 4 => ''
+ ),
+
+ 2 => array(
+ 0 => array(
+ 'nil',
+ 'false', 'true'
+ ),
+ 1 => $CONTEXT . '/keyidents',
+ 2 => 'color:#000; font-weight:bold;',
+ 3 => false,
+ 4 => ''
+ ),
+
+ //Standard functions of Unit System
+ 3 => array(
+ 0 => array(
+ 'Abs','AcquireExceptionObject','Addr','AnsiToUtf8','Append','ArcTan','Assert','Assigned','AssignFile',
+ 'BeginThread','BlockRead','BlockWrite','Break','ChDir','Chr','Close','CloseFile','CompToCurrency',
+ 'CompToDouble','Concat','Continue','Copy','Cos','Dec','Delete','Dispose','DoubleToComp','EndThread',
+ 'EnumModules','EnumResourceModules','Eof','Eoln','Erase','ExceptAddr','ExceptObject','Exclude','Exit',
+ 'Exp','FilePos','FileSize','FillChar','Finalize','FindClassHInstance','FindHInstance','FindResourceHInstance',
+ 'Flush','Frac','FreeMem','Get8087CW','GetDir','GetLastError','GetMem','GetMemoryManager',
+ 'GetModuleFileName','GetVariantManager','Halt','Hi','High','Inc','Include','Initialize','Insert',
+ 'Int','IOResult','IsMemoryManagerSet','IsVariantManagerSet','Length','Ln','Lo','Low','MkDir','Move',
+ 'New','Odd','OleStrToString','OleStrToStrVar','Ord','ParamCount','ParamStr','Pi','Pos','Pred','Ptr',
+ 'PUCS4Chars','Random','Randomize','Read','ReadLn','ReallocMem','ReleaseExceptionObject','Rename',
+ 'Reset','Rewrite','RmDir','Round','RunError','Seek','SeekEof','SeekEoln','Set8087CW','SetLength',
+ 'SetLineBreakStyle','SetMemoryManager','SetString','SetTextBuf','SetVariantManager','Sin','SizeOf',
+ 'Slice','Sqr','Sqrt','Str','StringOfChar','StringToOleStr','StringToWideChar','Succ','Swap','Trunc',
+ 'Truncate','TypeInfo','UCS4StringToWideString','UnicodeToUtf8','UniqueString','UpCase','UTF8Decode',
+ 'UTF8Encode','Utf8ToAnsi','Utf8ToUnicode','Val','VarArrayRedim','VarClear','WideCharLenToString',
+ 'WideCharLenToStrVar','WideCharToString','WideCharToStrVar','WideStringToUCS4String','Write','WriteLn'
+ ),
+ 1 => $CONTEXT . '/stdprocs/system',
+ 2 => 'color:#444;',
+ 3 => false,
+ 4 => ''
+ ),
+
+ //Standard functions of Unit SysUtils
+ 4 => array(
+ 0 => array(
+ 'Abort','AddExitProc','AddTerminateProc','AdjustLineBreaks','AllocMem','AnsiCompareFileName',
+ 'AnsiCompareStr','AnsiCompareText','AnsiDequotedStr','AnsiExtractQuotedStr','AnsiLastChar',
+ 'AnsiLowerCase','AnsiLowerCaseFileName','AnsiPos','AnsiQuotedStr','AnsiSameStr','AnsiSameText',
+ 'AnsiStrComp','AnsiStrIComp','AnsiStrLastChar','AnsiStrLComp','AnsiStrLIComp','AnsiStrLower',
+ 'AnsiStrPos','AnsiStrRScan','AnsiStrScan','AnsiStrUpper','AnsiUpperCase','AnsiUpperCaseFileName',
+ 'AppendStr','AssignStr','Beep','BoolToStr','ByteToCharIndex','ByteToCharLen','ByteType',
+ 'CallTerminateProcs','ChangeFileExt','CharLength','CharToByteIndex','CharToByteLen','CompareMem',
+ 'CompareStr','CompareText','CreateDir','CreateGUID','CurrentYear','CurrToStr','CurrToStrF','Date',
+ 'DateTimeToFileDate','DateTimeToStr','DateTimeToString','DateTimeToSystemTime','DateTimeToTimeStamp',
+ 'DateToStr','DayOfWeek','DecodeDate','DecodeDateFully','DecodeTime','DeleteFile','DirectoryExists',
+ 'DiskFree','DiskSize','DisposeStr','EncodeDate','EncodeTime','ExceptionErrorMessage',
+ 'ExcludeTrailingBackslash','ExcludeTrailingPathDelimiter','ExpandFileName','ExpandFileNameCase',
+ 'ExpandUNCFileName','ExtractFileDir','ExtractFileDrive','ExtractFileExt','ExtractFileName',
+ 'ExtractFilePath','ExtractRelativePath','ExtractShortPathName','FileAge','FileClose','FileCreate',
+ 'FileDateToDateTime','FileExists','FileGetAttr','FileGetDate','FileIsReadOnly','FileOpen','FileRead',
+ 'FileSearch','FileSeek','FileSetAttr','FileSetDate','FileSetReadOnly','FileWrite','FinalizePackage',
+ 'FindClose','FindCmdLineSwitch','FindFirst','FindNext','FloatToCurr','FloatToDateTime',
+ 'FloatToDecimal','FloatToStr','FloatToStrF','FloatToText','FloatToTextFmt','FmtLoadStr','FmtStr',
+ 'ForceDirectories','Format','FormatBuf','FormatCurr','FormatDateTime','FormatFloat','FreeAndNil',
+ 'GetCurrentDir','GetEnvironmentVariable','GetFileVersion','GetFormatSettings',
+ 'GetLocaleFormatSettings','GetModuleName','GetPackageDescription','GetPackageInfo','GUIDToString',
+ 'IncAMonth','IncludeTrailingBackslash','IncludeTrailingPathDelimiter','IncMonth','InitializePackage',
+ 'InterlockedDecrement','InterlockedExchange','InterlockedExchangeAdd','InterlockedIncrement',
+ 'IntToHex','IntToStr','IsDelimiter','IsEqualGUID','IsLeapYear','IsPathDelimiter','IsValidIdent',
+ 'Languages','LastDelimiter','LoadPackage','LoadStr','LowerCase','MSecsToTimeStamp','NewStr',
+ 'NextCharIndex','Now','OutOfMemoryError','QuotedStr','RaiseLastOSError','RaiseLastWin32Error',
+ 'RemoveDir','RenameFile','ReplaceDate','ReplaceTime','SafeLoadLibrary','SameFileName','SameText',
+ 'SetCurrentDir','ShowException','Sleep','StrAlloc','StrBufSize','StrByteType','StrCat',
+ 'StrCharLength','StrComp','StrCopy','StrDispose','StrECopy','StrEnd','StrFmt','StrIComp',
+ 'StringReplace','StringToGUID','StrLCat','StrLComp','StrLCopy','StrLen','StrLFmt','StrLIComp',
+ 'StrLower','StrMove','StrNew','StrNextChar','StrPas','StrPCopy','StrPLCopy','StrPos','StrRScan',
+ 'StrScan','StrToBool','StrToBoolDef','StrToCurr','StrToCurrDef','StrToDate','StrToDateDef',
+ 'StrToDateTime','StrToDateTimeDef','StrToFloat','StrToFloatDef','StrToInt','StrToInt64',
+ 'StrToInt64Def','StrToIntDef','StrToTime','StrToTimeDef','StrUpper','Supports','SysErrorMessage',
+ 'SystemTimeToDateTime','TextToFloat','Time','GetTime','TimeStampToDateTime','TimeStampToMSecs',
+ 'TimeToStr','Trim','TrimLeft','TrimRight','TryEncodeDate','TryEncodeTime','TryFloatToCurr',
+ 'TryFloatToDateTime','TryStrToBool','TryStrToCurr','TryStrToDate','TryStrToDateTime','TryStrToFloat',
+ 'TryStrToInt','TryStrToInt64','TryStrToTime','UnloadPackage','UpperCase','WideCompareStr',
+ 'WideCompareText','WideFmtStr','WideFormat','WideFormatBuf','WideLowerCase','WideSameStr',
+ 'WideSameText','WideUpperCase','Win32Check','WrapText'
+ ),
+ 1 => $CONTEXT . '/stdprocs/sysutils',
+ 2 => 'color:#444;',
+ 3 => false,
+ 4 => ''
+ ),
+
+ //Standard functions of Unit Classes
+ 5 => array(
+ 0 => array(
+ 'ActivateClassGroup','AllocateHwnd','BinToHex','CheckSynchronize','CollectionsEqual','CountGenerations',
+ 'DeallocateHwnd','EqualRect','ExtractStrings','FindClass','FindGlobalComponent','GetClass',
+ 'GroupDescendantsWith','HexToBin','IdentToInt','InitInheritedComponent','IntToIdent','InvalidPoint',
+ 'IsUniqueGlobalComponentName','LineStart','ObjectBinaryToText','ObjectResourceToText',
+ 'ObjectTextToBinary','ObjectTextToResource','PointsEqual','ReadComponentRes','ReadComponentResEx',
+ 'ReadComponentResFile','Rect','RegisterClass','RegisterClassAlias','RegisterClasses',
+ 'RegisterComponents','RegisterIntegerConsts','RegisterNoIcon','RegisterNonActiveX','SmallPoint',
+ 'StartClassGroup','TestStreamFormat','UnregisterClass','UnregisterClasses','UnregisterIntegerConsts',
+ 'UnregisterModuleClasses','WriteComponentResFile'
+ ),
+ 1 => $CONTEXT . '/stdprocs/classes',
+ 2 => 'color:#444;',
+ 3 => false,
+ 4 => ''
+ ),
+
+ //Standard functions of Unit Math
+ 6 => array(
+ 0 => array(
+ 'ArcCos', 'ArcCosh', 'ArcCot', 'ArcCotH', 'ArcCsc', 'ArcCscH', 'ArcSec', 'ArcSecH', 'ArcSin',
+ 'ArcSinh', 'ArcTan2', 'ArcTanh', 'Ceil', 'CompareValue', 'Cosecant', 'Cosh', 'Cot', 'Cotan',
+ 'CotH', 'Csc', 'CscH', 'CycleToDeg', 'CycleToGrad', 'CycleToRad', 'DegToCycle', 'DegToGrad',
+ 'DegToRad', 'DivMod', 'DoubleDecliningBalance', 'EnsureRange', 'Floor', 'Frexp', 'FutureValue',
+ 'GetExceptionMask', 'GetPrecisionMode', 'GetRoundMode', 'GradToCycle', 'GradToDeg', 'GradToRad',
+ 'Hypot', 'InRange', 'InterestPayment', 'InterestRate', 'InternalRateOfReturn', 'IntPower',
+ 'IsInfinite', 'IsNan', 'IsZero', 'Ldexp', 'LnXP1', 'Log10', 'Log2', 'LogN', 'Max', 'MaxIntValue',
+ 'MaxValue', 'Mean', 'MeanAndStdDev', 'Min', 'MinIntValue', 'MinValue', 'MomentSkewKurtosis',
+ 'NetPresentValue', 'Norm', 'NumberOfPeriods', 'Payment', 'PeriodPayment', 'Poly', 'PopnStdDev',
+ 'PopnVariance', 'Power', 'PresentValue', 'RadToCycle', 'RadToDeg', 'RadToGrad', 'RandG', 'RandomRange',
+ 'RoundTo', 'SameValue', 'Sec', 'Secant', 'SecH', 'SetExceptionMask', 'SetPrecisionMode', 'SetRoundMode',
+ 'Sign', 'SimpleRoundTo', 'SinCos', 'Sinh', 'SLNDepreciation', 'StdDev', 'Sum', 'SumInt', 'SumOfSquares',
+ 'SumsAndSquares', 'SYDDepreciation', 'Tan', 'Tanh', 'TotalVariance', 'Variance'
+ ),
+ 1 => $CONTEXT . '/stdprocs/math',
+ 2 => 'color:#444;',
+ 3 => false,
+ 4 => ''
+ ),
+);
+
+$this->_contextSymbols = array(
+ 0 => array(
+ 0 => array(
+ '+', '-', '*', '/'
+ ),
+ 1 => $CONTEXT . '/mathsym',
+ 2 => 'color:#008000;'
+ ),
+ 1 => array(
+ 0 => array(
+ ':', ';', ','
+ ),
+ 1 => $CONTEXT . '/ctrlsym',
+ 2 => 'color:#008000;'
+ ),
+ 2 => array(
+ 0 => array(
+ '<', '=', '>'
+ ),
+ 1 => $CONTEXT . '/cmpsym',
+ 2 => 'color:#008000;'
+ ),
+ 3 => array(
+ 0 => array(
+ '(', ')', '[', ']'
+ ),
+ 1 => $CONTEXT . '/brksym',
+ 2 => 'color:#008000;'
+ ),
+ 4 => array(
+ 0 => array(
+ '.', '@', '^'
+ ),
+ 1 => $CONTEXT . '/oopsym',
+ 2 => 'color:#008000;'
+ )
+// '|', '=', '!', ':', '(', ')', ',', '<', '>', '&', '$', '+', '-', '*', '/',
+// '{', '}', ';', '[', ']', '~', '?'
+);
+
+$this->_contextRegexps = array(
+ 0 => array(
+ 0 => array(
+ '/(#[0-9]+)/'
+ ),
+ 1 => '#',
+ 2 => array(
+ 1 => array($CONTEXT . '/char', 'color:#db9;', false)
+ )
+ ),
+ 1 => array(
+ 0 => array(
+ '/(#\$[0-9a-fA-F]+)/'
+ ),
+ 1 => '#',
+ 2 => array(
+ 1 => array($CONTEXT . '/charhex', 'color:#db9;', false)
+ )
+ ),
+ 2 => array(
+ 0 => array(
+ '/(\$[0-9a-fA-F]+)/'
+ ),
+ 1 => '$',
+ 2 => array(
+ 1 => array($CONTEXT . '/hex', 'color: #2bf;', false)
+ )
+ ),
+ 3 => array(
+ 0 => array(
+ '/(\.\.)/'
+ ),
+ 1 => '.',
+ 2 => array(
+ 1 => array($CONTEXT . '/ctrlsym', 'color: #008000;', false)
+ )
+ ),
+ 4 => geshi_use_doubles($CONTEXT, true), // second parameter says leading zero is required.
+ 5 => geshi_use_integers($CONTEXT)
+);
+
+$this->_objectSplitters = array(
+ 0 => array(
+ 0 => array('.'),
+ 1 => $CONTEXT . '/oodynamic',
+ 2 => 'color:#559;',
+ 3 => false // If true, check that matched method isn't a keyword first
+ )
+);
+
+?>
diff --git a/paste/include/geshi/contexts/delphi/exports_brackets.php b/paste/include/geshi/contexts/delphi/exports_brackets.php
new file mode 100644
index 0000000..7621366
--- /dev/null
+++ b/paste/include/geshi/contexts/delphi/exports_brackets.php
@@ -0,0 +1,178 @@
+<?php
+/**
+ * GeSHi - Generic Syntax Highlighter
+ *
+ * For information on how to use GeSHi, please consult the documentation
+ * found in the docs/ directory, or online at http://geshi.org/docs/
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * You can view a copy of the GNU GPL in the COPYING file that comes
+ * with GeSHi, in the docs/ directory.
+ *
+ * @package lang
+ * @author Benny Baumann <BenBE@benbe.omorphia.de>, Nigel McNie <nigel@geshi.org>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL
+ * @copyright (C) 2005 Nigel McNie
+ * @version 1.1.0
+ *
+ */
+
+$this->_contextDelimiters = array(
+ 0 => array(
+ 0 => array('('),
+ 1 => array(')'),
+ 2 => false
+ )
+);
+
+
+$this->_childContexts = array(
+ new GeSHiContext('delphi', $DIALECT, 'preprocessor'),
+ new GeSHiContext('delphi', $DIALECT, 'common/single_comment'),
+ new GeSHiContext('delphi', $DIALECT, 'multi_comment')
+);
+
+
+//$this->_styler->setStyle($CONTEXT, 'color:#000;');
+//$this->_styler->setStartStyle($CONTEXT, 'color:#f00;font-weight:bold;');
+//$this->_styler->setEndStyle($CONTEXT, 'color:#00f;');
+$this->_startName = 'brksym'; // highlight starter as if it was a keyword
+$this->_endName = 'brksym'; // highlight ender as if it was a ctrlsym
+
+$this->_contextKeywords = array(
+ 0 => array(
+ 0 => array(
+ //@todo get keywords normal way
+ 'var', 'out', 'const', 'array'
+ ),
+ 1 => $CONTEXT . '/keywords',
+ 2 => 'color:#f00; font-weight:bold;',
+ 3 => false,
+ 4 => ''
+ ),
+ 1 => array(
+ 0 => array(
+ 'Boolean', 'ByteBool', 'LongBool', 'WordBool', 'Bool',
+
+ 'Byte', 'SmallInt',
+ 'ShortInt', 'Word',
+ 'Integer', 'Cardinal',
+ 'LongInt', 'DWORD',
+ 'Int64',
+
+ 'Single', 'Double', 'Extended',
+ 'Real48', 'Real', 'Comp', 'Currency',
+
+ 'Pointer',
+
+ 'Char', 'AnsiChar', 'WideChar',
+ 'PChar', 'PAnsiChar', 'PWideChar',
+ 'String', 'AnsiString', 'WideString',
+
+ 'THandle'
+ ),
+ 1 => $CONTEXT . '/keytypes',
+ 2 => 'color:#000; font-weight:bold;',
+ 3 => false,
+ 4 => ''
+ ),
+ 2 => array(
+ 0 => array(
+ //@todo get keywords normal way
+ 'nil',
+ 'false', 'true'
+ ),
+ 1 => $CONTEXT . '/keyidents',
+ 2 => 'color:#000; font-weight:bold;',
+ 3 => false,
+ 4 => ''
+ )
+);
+
+$this->_contextSymbols = array(
+/* 0 => array(
+ 0 => array(
+ // @todo [blocking 1.1.1] are the [ and ] needed? They're handled by starter and ender, do they ever actually
+ // occur *inside* this context? (deferred to 1.1.1)
+
+ // BenBE: [] might just well occure as part of a function declaration. But it's thus unlikly that there's no
+ // absolut requirement to handle them. I actually would have to check if the Delphi compiler actually compiles
+ // such source (I doubt it will compile).
+ // @todo Test if exports ABC(A: Array[13..37] of Integer) name 'ABC'; actually compiles.
+ '(', ']'
+ ),
+ 1 => $CONTEXT . '/brksym',
+ 2 => 'color:#008000;'
+ ),*/
+ 1 => array(
+ 0 => array(
+ ':', ';', ',', '='
+ ),
+ 1 => $CONTEXT . '/ctrlsym',
+ 2 => 'color:#008000;'
+ ),
+ 2 => array(
+ 0 => array(
+ '.'
+ ),
+ 1 => $CONTEXT . '/oopsym',
+ 2 => 'color:#008000;'
+ )
+);
+
+$this->_contextRegexps = array(
+ 0 => array(
+ 0 => array(
+ '/(#[0-9]+)/'
+ ),
+ 1 => '#',
+ 2 => array(
+ 1 => array($CONTEXT . '/char', 'color:#db9;', false)
+ )
+ ),
+ 1 => array(
+ 0 => array(
+ '/(#\$[0-9a-fA-F]+)/'
+ ),
+ 1 => '#',
+ 2 => array(
+ 1 => array($CONTEXT . '/charhex', 'color:#db9;', false)
+ )
+ ),
+ 2 => array(
+ 0 => array(
+ '/(\$[0-9a-fA-F]+)/'
+ ),
+ 1 => '$',
+ 2 => array(
+ 1 => array($CONTEXT . '/hex', 'color: #2bf;', false)
+ )
+ ),
+ 3 => geshi_use_integers($CONTEXT)
+);
+
+$this->_objectSplitters = array(
+ 0 => array(
+ 0 => array('.'),
+ 1 => $CONTEXT . '/oodynamic',
+ 2 => 'color:#559;',
+ 3 => false // If true, check that matched method isn't a keyword first
+ )
+);
+
+?>
diff --git a/paste/include/geshi/contexts/delphi/extern.php b/paste/include/geshi/contexts/delphi/extern.php
new file mode 100644
index 0000000..a96516f
--- /dev/null
+++ b/paste/include/geshi/contexts/delphi/extern.php
@@ -0,0 +1,131 @@
+<?php
+/**
+ * GeSHi - Generic Syntax Highlighter
+ *
+ * For information on how to use GeSHi, please consult the documentation
+ * found in the docs/ directory, or online at http://geshi.org/docs/
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * You can view a copy of the GNU GPL in the COPYING file that comes
+ * with GeSHi, in the docs/ directory.
+ *
+ * @package lang
+ * @author Benny Baumann <BenBE@benbe.omorphia.de>, Nigel McNie <nigel@geshi.org>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL
+ * @copyright (C) 2005 Nigel McNie
+ * @version 1.1.0
+ *
+ */
+
+$this->_contextDelimiters = array(
+ 0 => array(
+ 0 => array('exports'),
+ 1 => array(';'),
+ 2 => false
+ ),
+ 1 => array(
+ 0 => array('external'),
+ 1 => array(';'),
+ 2 => false
+ )
+);
+
+$this->_childContexts = array(
+ new GeSHiContext('delphi', $DIALECT, 'preprocessor'),
+ new GeSHiContext('delphi', $DIALECT, 'multi_comment'),
+ new GeSHiContext('delphi', $DIALECT, 'common/single_comment'),
+ new GeSHiContext('delphi', $DIALECT, 'common/single_string_eol'),
+ new GeSHiCodeContext('delphi', $DIALECT, 'exports_brackets', 'delphi/' . $DIALECT)
+);
+
+//$this->_styler->setStyle($CONTEXT, 'color:#000;');
+//$this->_styler->setStyle($CONTEXT_START, 'color:#f00;font-weight:bold;');
+//$this->_styler->setStyle($CONTEXT_END, 'color:#00f;');
+$this->_startName = 'keywords';
+$this->_endName = 'ctrlsym';
+
+$this->_contextKeywords = array(
+ 0 => array(
+ 0 => array(
+ 'name','index','resident'
+ ),
+ 1 => $CONTEXT . '/keywords',
+ 2 => 'color:#f00; font-weight:bold;',
+ 3 => false,
+ 4 => ''
+ ),
+);
+
+$this->_contextSymbols = array(
+ 0 => array(
+ 0 => array(
+ ',', '[', ']', '.'
+ ),
+ 1 => $CONTEXT . '/sym',
+ 2 => 'color:#008000;'
+ ),
+ 1 => array(
+ 0 => array(
+ '(', ')', '[', ']'
+ ),
+ 1 => $CONTEXT . '/brksym',
+ 2 => 'color:#008000;'
+ )
+);
+
+$this->_contextRegexps = array(
+ 0 => array(
+ 0 => array(
+ '/(#[0-9]+)/'
+ ),
+ 1 => '#',
+ 2 => array(
+ 1 => array($CONTEXT . '/char', 'color:#db9;', false)
+ )
+ ),
+ 1 => array(
+ 0 => array(
+ '/(#\$[0-9a-fA-F]+)/'
+ ),
+ 1 => '#',
+ 2 => array(
+ 1 => array($CONTEXT . '/charhex', 'color:#db9;', false)
+ )
+ ),
+ 2 => array(
+ 0 => array(
+ '/(\$[0-9a-fA-F]+)/'
+ ),
+ 1 => '$',
+ 2 => array(
+ 1 => array($CONTEXT . '/hex', 'color: #2bf;', false)
+ )
+ ),
+ 3 => geshi_use_integers($CONTEXT)
+);
+
+$this->_objectSplitters = array(
+ 0 => array(
+ 0 => array('.'),
+ 1 => $CONTEXT . '/oodynamic',
+ 2 => 'color:#559;',
+ 3 => false // If true, check that matched method isn't a keyword first
+ )
+);
+
+?>
diff --git a/paste/include/geshi/contexts/delphi/multi_comment.php b/paste/include/geshi/contexts/delphi/multi_comment.php
new file mode 100644
index 0000000..76e3284
--- /dev/null
+++ b/paste/include/geshi/contexts/delphi/multi_comment.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ * GeSHi - Generic Syntax Highlighter
+ *
+ * For information on how to use GeSHi, please consult the documentation
+ * found in the docs/ directory, or online at http://geshi.org/docs/
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * You can view a copy of the GNU GPL in the COPYING file that comes
+ * with GeSHi, in the docs/ directory.
+ *
+ * @package lang
+ * @author Benny Baumann <BenBE@benbe.omorphia.de>, Nigel McNie <nigel@geshi.org>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL
+ * @copyright (C) 2005 Nigel McNie
+ * @version 1.1.0
+ *
+ */
+
+$this->_contextDelimiters = array(
+ 0 => array(
+ 0 => array('{'),
+ 1 => array('}'),
+ 2 => false
+ ),
+ 1 => array(
+ 0 => array('(*'),
+ 1 => array('*)'),
+ 2 => false
+ )
+);
+
+$this->_styler->setStyle($CONTEXT, 'color:#888;font-style:italic;');
+$this->_contextStyleType = GESHI_STYLE_COMMENTS;
+
+?>
diff --git a/paste/include/geshi/contexts/delphi/preprocessor.php b/paste/include/geshi/contexts/delphi/preprocessor.php
new file mode 100644
index 0000000..da66662
--- /dev/null
+++ b/paste/include/geshi/contexts/delphi/preprocessor.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ * GeSHi - Generic Syntax Highlighter
+ *
+ * For information on how to use GeSHi, please consult the documentation
+ * found in the docs/ directory, or online at http://geshi.org/docs/
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * You can view a copy of the GNU GPL in the COPYING file that comes
+ * with GeSHi, in the docs/ directory.
+ *
+ * @package lang
+ * @author Benny Baumann <BenBE@benbe.omorphia.de>, Nigel McNie <nigel@geshi.org>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL
+ * @copyright (C) 2005 Nigel McNie
+ * @version 1.1.0
+ *
+ */
+
+$this->_contextDelimiters = array(
+ 0 => array(
+ 0 => array('{$'),
+ 1 => array('}'),
+ 2 => false
+ ),
+ 1 => array(
+ 0 => array('(*$'),
+ 1 => array('*)'),
+ 2 => false
+ )
+);
+
+$this->_styler->setStyle($CONTEXT, 'color:#080;font-style:italic;');
+$this->_contextStyleType = GESHI_STYLE_COMMENTS;
+
+?>
diff --git a/paste/include/geshi/contexts/delphi/property.php b/paste/include/geshi/contexts/delphi/property.php
new file mode 100644
index 0000000..db87a1a
--- /dev/null
+++ b/paste/include/geshi/contexts/delphi/property.php
@@ -0,0 +1,157 @@
+<?php
+/**
+ * GeSHi - Generic Syntax Highlighter
+ *
+ * For information on how to use GeSHi, please consult the documentation
+ * found in the docs/ directory, or online at http://geshi.org/docs/
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * You can view a copy of the GNU GPL in the COPYING file that comes
+ * with GeSHi, in the docs/ directory.
+ *
+ * @package lang
+ * @author Benny Baumann <BenBE@benbe.omorphia.de>, Nigel McNie <nigel@geshi.org>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL
+ * @copyright (C) 2005 Nigel McNie
+ * @version 1.1.0
+ *
+ */
+
+$this->_contextDelimiters = array(
+ 0 => array(
+ 0 => array('property'),
+ 1 => array(';'),
+ 2 => false
+ )
+);
+
+
+$this->_childContexts = array(
+ new GeSHiContext('delphi', $DIALECT, 'preprocessor'),
+ new GeSHiContext('delphi', $DIALECT, 'common/single_comment'),
+ new GeSHiContext('delphi', $DIALECT, 'multi_comment'),
+ new GeSHiCodeContext('delphi', $DIALECT, 'property_index', 'delphi/' . $DIALECT)
+);
+
+//$this->_styler->setStyle($CONTEXT, 'color:#000;');
+//$this->_styler->setStartStyle($CONTEXT, 'color:#f00;font-weight:bold;');
+//$this->_styler->setEndStyle($CONTEXT, 'color:#00f;');
+$this->_startName = 'keywords'; // highlight starter as if it was a keyword
+$this->_endName = 'ctrlsym'; // highlight ender as if it was a ctrlsym
+
+$this->_contextKeywords = array(
+ 0 => array(
+ 0 => array(
+ 'read','write','index','stored','default','nodefault','implements',
+ 'dispid','readonly','writeonly'
+ ),
+ 1 => $CONTEXT . '/keywords',
+ 2 => 'color:#f00; font-weight:bold;',
+ 3 => false,
+ 4 => ''
+ ),
+ 1 => array(
+ 0 => array(
+ 'Boolean', 'ByteBool', 'LongBool', 'WordBool', 'Bool',
+
+ 'Byte', 'SmallInt',
+ 'ShortInt', 'Word',
+ 'Integer', 'Cardinal',
+ 'LongInt', 'DWORD',
+ 'Int64',
+
+ 'Single', 'Double', 'Extended',
+ 'Real48', 'Real', 'Comp', 'Currency',
+
+ 'Pointer',
+
+ 'Char', 'AnsiChar', 'WideChar',
+ 'PChar', 'PAnsiChar', 'PWideChar',
+ 'String', 'AnsiString', 'WideString',
+
+ 'THandle'
+ ),
+ 1 => $CONTEXT . '/keytypes',
+ 2 => 'color:#000; font-weight:bold;',
+ 3 => false,
+ 4 => ''
+ ),
+ 2 => array(
+ 0 => array(
+ //@todo get keywords normal way
+ 'nil',
+ 'false', 'true'
+ ),
+ 1 => $CONTEXT . '/keyidents',
+ 2 => 'color:#000; font-weight:bold;',
+ 3 => false,
+ 4 => ''
+ )
+);
+
+$this->_contextSymbols = array(
+ 0 => array(
+ 0 => array(
+ ':'
+ ),
+ 1 => $CONTEXT . '/ctrlsym',
+ 2 => 'color:#008000;'
+ )
+);
+
+$this->_contextRegexps = array(
+ 0 => array(
+ 0 => array(
+ '/(#[0-9]+)/'
+ ),
+ 1 => '#',
+ 2 => array(
+ 1 => array($CONTEXT . '/char', 'color:#db9;', false)
+ )
+ ),
+ 1 => array(
+ 0 => array(
+ '/(#\$[0-9a-fA-F]+)/'
+ ),
+ 1 => '#',
+ 2 => array(
+ 1 => array($CONTEXT . '/charhex', 'color:#db9;', false)
+ )
+ ),
+ 2 => array(
+ 0 => array(
+ '/(\$[0-9a-fA-F]+)/'
+ ),
+ 1 => '$',
+ 2 => array(
+ 1 => array($CONTEXT . '/hex', 'color: #2bf;', false)
+ )
+ ),
+ 3 => geshi_use_integers($CONTEXT)
+);
+
+$this->_objectSplitters = array(
+ 0 => array(
+ 0 => array('.'),
+ 1 => $CONTEXT . '/oodynamic',
+ 2 => 'color:#559;',
+ 3 => false // If true, check that matched method isn't a keyword first
+ )
+);
+
+?>
diff --git a/paste/include/geshi/contexts/delphi/property_index.php b/paste/include/geshi/contexts/delphi/property_index.php
new file mode 100644
index 0000000..c9bf62b
--- /dev/null
+++ b/paste/include/geshi/contexts/delphi/property_index.php
@@ -0,0 +1,143 @@
+<?php
+/**
+ * GeSHi - Generic Syntax Highlighter
+ *
+ * For information on how to use GeSHi, please consult the documentation
+ * found in the docs/ directory, or online at http://geshi.org/docs/
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * You can view a copy of the GNU GPL in the COPYING file that comes
+ * with GeSHi, in the docs/ directory.
+ *
+ * @package lang
+ * @author Benny Baumann <BenBE@benbe.omorphia.de>, Nigel McNie <nigel@geshi.org>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL
+ * @copyright (C) 2005 Nigel McNie
+ * @version 1.1.0
+ *
+ */
+
+$this->_contextDelimiters = array(
+ 0 => array(
+ 0 => array('['),
+ 1 => array(']'),
+ 2 => false
+ )
+);
+
+
+$this->_childContexts = array(
+ new GeSHiContext('delphi', $DIALECT, 'preprocessor'),
+ new GeSHiContext('delphi', $DIALECT, 'common/single_comment'),
+ new GeSHiContext('delphi', $DIALECT, 'multi_comment')
+);
+
+
+//$this->_styler->setStyle($CONTEXT, 'color:#000;');
+//$this->_styler->setStartStyle($CONTEXT, 'color:#f00;font-weight:bold;');
+//$this->_styler->setEndStyle($CONTEXT, 'color:#00f;');
+$this->_startName = 'brksym'; // highlight starter as if it was a keyword
+$this->_endName = 'brksym'; // highlight ender as if it was a ctrlsym
+
+$this->_contextKeywords = array(
+ 0 => array(
+ 0 => array(
+ 'Boolean', 'ByteBool', 'LongBool', 'WordBool', 'Bool',
+
+ 'Byte', 'SmallInt',
+ 'ShortInt', 'Word',
+ 'Integer', 'Cardinal',
+ 'LongInt', 'DWORD',
+ 'Int64',
+
+ 'Single', 'Double', 'Extended',
+ 'Real48', 'Real', 'Comp', 'Currency',
+
+ 'Pointer',
+
+ 'Char', 'AnsiChar', 'WideChar',
+ 'PChar', 'PAnsiChar', 'PWideChar',
+ 'String', 'AnsiString', 'WideString',
+
+ 'THandle'
+ ),
+ 1 => $CONTEXT . '/keytypes',
+ 2 => 'color:#000; font-weight:bold;',
+ 3 => false,
+ 4 => ''
+ )
+);
+
+$this->_contextSymbols = array(
+ 0 => array(
+ 0 => array(
+ ':', ';', ','
+ ),
+ 1 => $CONTEXT . '/ctrlsym',
+ 2 => 'color:#008000;'
+ ),
+ 1 => array(
+ 0 => array(
+ '.'
+ ),
+ 1 => $CONTEXT . '/oopsym',
+ 2 => 'color:#008000;'
+ )
+);
+
+$this->_contextRegexps = array(
+ 0 => array(
+ 0 => array(
+ '/(#[0-9]+)/'
+ ),
+ 1 => '#',
+ 2 => array(
+ 1 => array($CONTEXT . '/char', 'color:#db9;', false)
+ )
+ ),
+ 1 => array(
+ 0 => array(
+ '/(#\$[0-9a-fA-F]+)/'
+ ),
+ 1 => '#',
+ 2 => array(
+ 1 => array($CONTEXT . '/charhex', 'color:#db9;', false)
+ )
+ ),
+ 2 => array(
+ 0 => array(
+ '/(\$[0-9a-fA-F]+)/'
+ ),
+ 1 => '$',
+ 2 => array(
+ 1 => array($CONTEXT . '/hex', 'color: #2bf;', false)
+ )
+ ),
+ 3 => geshi_use_integers($CONTEXT)
+);
+
+$this->_objectSplitters = array(
+ 0 => array(
+ 0 => array('.'),
+ 1 => $CONTEXT . '/oodynamic',
+ 2 => 'color:#559;',
+ 3 => false // If true, check that matched method isn't a keyword first
+ )
+);
+
+?> \ No newline at end of file