plugins/geshi/geshi/delphi.php
changeset 2 9e3258dfae15
parent 0 441963e5b07a
child 3 f3e2bbbd2155
equal deleted inserted replaced
1:c715631f809a 2:9e3258dfae15
     1 <?php
     1 <?php
     2 /*************************************************************************************
     2 /*************************************************************************************
     3  * delphi.php
     3  * delphi.php
     4  * ----------
     4  * ----------
     5  * Author: Járja Norbert (jnorbi@vipmail.hu)
     5  * Author: J�rja Norbert (jnorbi@vipmail.hu), Benny Baumann (BenBE@omorphia.de)
     6  * Copyright: (c) 2004 Járja Norbert, Nigel McNie (http://qbnz.com/highlighter)
     6  * Copyright: (c) 2004 J�rja Norbert, Benny Baumann (BenBE@omorphia.de), Nigel McNie (http://qbnz.com/highlighter)
     7  * Release Version: 1.0.7.20
     7  * Release Version: 1.0.8.2
     8  * Date Started: 2004/07/26
     8  * Date Started: 2004/07/26
     9  *
     9  *
    10  * Delphi (Object Pascal) language file for GeSHi.
    10  * Delphi (Object Pascal) language file for GeSHi.
    11  *
    11  *
    12  * CHANGES
    12  * CHANGES
    13  * -------
    13  * -------
       
    14  * 2008/05/23 (1.0.7.22)
       
    15  *   -  Added description of extra language features (SF#1970248)
    14  * 2005/11/19 (1.0.3)
    16  * 2005/11/19 (1.0.3)
    15  *   -  Updated the very incomplete keyword and type lists
    17  *   -  Updated the very incomplete keyword and type lists
    16  * 2005/09/03 (1.0.2)
    18  * 2005/09/03 (1.0.2)
    17  *   -  Added support for hex numbers and string entities
    19  *   -  Added support for hex numbers and string entities
    18  * 2004/11/27 (1.0.1)
    20  * 2004/11/27 (1.0.1)
    45 
    47 
    46 $language_data = array (
    48 $language_data = array (
    47     'LANG_NAME' => 'Delphi',
    49     'LANG_NAME' => 'Delphi',
    48     'COMMENT_SINGLE' => array(1 => '//'),
    50     'COMMENT_SINGLE' => array(1 => '//'),
    49     'COMMENT_MULTI' => array('(*' => '*)', '{' => '}'),
    51     'COMMENT_MULTI' => array('(*' => '*)', '{' => '}'),
       
    52     //Compiler directives
       
    53     'COMMENT_REGEXP' => array(2 => '/{\\$.*?}|\\(\\*\\$.*?\\*\\)/U'),
    50     'CASE_KEYWORDS' => 0,
    54     'CASE_KEYWORDS' => 0,
    51     'QUOTEMARKS' => array("'", '"'),
    55     'QUOTEMARKS' => array("'"),
    52     'ESCAPE_CHAR' => '',
    56     'ESCAPE_CHAR' => '',
    53     'KEYWORDS' => array(
    57     'KEYWORDS' => array(
    54         1 => array(
    58         1 => array(
    55             'Abstract', 'And', 'Array', 'As', 'Asm', 'At', 'Begin', 'Case', 'Class',
    59             'Abstract', 'And', 'Array', 'As', 'Asm', 'At', 'Begin', 'Case',
    56             'Const', 'Constructor', 'Contains', 'Destructor', 'DispInterface', 'Div',
    60             'Class', 'Const', 'Constructor', 'Contains', 'Destructor',
    57             'Do', 'DownTo', 'Else', 'End', 'Except', 'File', 'Finalization',
    61             'DispInterface', 'Div', 'Do', 'DownTo', 'Else', 'End', 'Except',
    58             'Finally', 'For', 'Function', 'Goto', 'If', 'Implementation', 'In',
    62             'Export', 'Exports', 'External', 'File', 'Finalization', 'Finally',
    59             'Inherited', 'Initialization', 'Inline', 'Interface', 'Is', 'Label',
    63             'For', 'Function', 'Goto', 'If', 'Implementation', 'In', 'Inherited',
       
    64             'Initialization', 'Inline', 'Interface', 'Is', 'Label', 'Library',
    60             'Mod', 'Not', 'Object', 'Of', 'On', 'Or', 'Overload', 'Override',
    65             'Mod', 'Not', 'Object', 'Of', 'On', 'Or', 'Overload', 'Override',
    61             'Package', 'Packed', 'Private', 'Procedure', 'Program', 'Property',
    66             'Package', 'Packed', 'Private', 'Procedure', 'Program', 'Property',
    62             'Protected', 'Public', 'Published', 'Raise', 'Record', 'Repeat',
    67             'Protected', 'Public', 'Published', 'Raise', 'Record', 'Register',
    63             'Requires', 'Resourcestring', 'Set', 'Shl', 'Shr', 'Then', 'ThreadVar',
    68             'Repeat', 'Requires', 'Resourcestring', 'Set', 'Shl', 'Shr', 'Then',
    64             'To', 'Try', 'Type', 'Unit', 'Until', 'Uses', 'Var', 'Virtual', 'While',
    69             'ThreadVar', 'To', 'Try', 'Type', 'Unit', 'Until', 'Uses', 'Var',
    65             'With', 'Xor', 'assembler', 'cdecl', 'far', 'near', 'pascal', 'register',
    70             'Virtual', 'While', 'With', 'Xor', 'assembler', 'far',
    66             'safecall', 'stdcall', 'varargs'
    71             'near', 'pascal', 'register', 'cdecl', 'safecall', 'stdcall', 'varargs'
    67             ),
    72             ),
    68         2 => array(
    73         2 => array(
    69             'nil', 'false', 'self', 'true', 'var', 'type', 'const'
    74             'nil', 'false', 'self', 'true', 'var', 'type', 'const'
    70             ),
    75             ),
    71         3 => array(
    76         3 => array(
   203             'Single', 'SmallInt', 'String', 'TClass', 'TDate', 'TDateTime', 'TextFile', 'THandle',
   208             'Single', 'SmallInt', 'String', 'TClass', 'TDate', 'TDateTime', 'TextFile', 'THandle',
   204             'TObject', 'TTime', 'Variant', 'WideChar', 'WideString', 'Word', 'WordBool'
   209             'TObject', 'TTime', 'Variant', 'WideChar', 'WideString', 'Word', 'WordBool'
   205             ),
   210             ),
   206         ),
   211         ),
   207     'CASE_SENSITIVE' => array(
   212     'CASE_SENSITIVE' => array(
   208         GESHI_COMMENTS => true,
   213         GESHI_COMMENTS => false,
   209         1 => false,
   214         1 => false,
   210         2 => false,
   215         2 => false,
   211         3 => false,
   216         3 => false,
   212         4 => false,
   217         4 => false,
       
   218         ),
       
   219     'SYMBOLS' => array(
       
   220         0 => array('(', ')', '[', ']'),
       
   221         1 => array('.', ',', ':', ';'),
       
   222         2 => array('@', '^'),
       
   223         3 => array('=', '+', '-', '*', '/')
   213         ),
   224         ),
   214     'STYLES' => array(
   225     'STYLES' => array(
   215         'KEYWORDS' => array(
   226         'KEYWORDS' => array(
   216             1 => 'color: #000000; font-weight: bold;',
   227             1 => 'color: #000000; font-weight: bold;',
   217             2 => 'color: #000000; font-weight: bold;',
   228             2 => 'color: #000000; font-weight: bold;',
   218             3 => 'color: #000066;',
   229             3 => 'color: #000066;',
   219             4 => 'color: #993333;'
   230             4 => 'color: #000066; font-weight: bold;'
   220             ),
   231             ),
   221         'COMMENTS' => array(
   232         'COMMENTS' => array(
   222             1 => 'color: #808080; font-style: italic;',
   233             1 => 'color: #808080; font-style: italic;',
       
   234             2 => 'color: #008000; font-style: italic;',
   223             'MULTI' => 'color: #808080; font-style: italic;'
   235             'MULTI' => 'color: #808080; font-style: italic;'
   224             ),
   236             ),
   225         'ESCAPE_CHAR' => array(
   237         'ESCAPE_CHAR' => array(
       
   238             0 => 'color: #ff0000; font-weight: bold;'
   226             ),
   239             ),
   227         'BRACKETS' => array(
   240         'BRACKETS' => array(
   228             0 => 'color: #66cc66;'
   241             0 => 'color: #000066;'
   229             ),
   242             ),
   230         'STRINGS' => array(
   243         'STRINGS' => array(
   231             0 => 'color: #ff0000;'
   244             0 => 'color: #ff0000;'
   232             ),
   245             ),
   233         'NUMBERS' => array(
   246         'NUMBERS' => array(
   234             0 => 'color: #cc66cc;'
   247             0 => 'color: #0000ff;'
   235             ),
   248             ),
   236         'METHODS' => array(
   249         'METHODS' => array(
   237             1 => 'color: #006600;'
   250             1 => 'color: #006600;'
   238             ),
   251             ),
   239         'REGEXPS' => array(
   252         'REGEXPS' => array(
   240             0 => 'color: #9ac;',
   253             0 => 'color: #9ac;',
   241             1 => 'color: #ff0000;'
   254             1 => 'color: #ff0000;'
   242             ),
   255             ),
   243         'SYMBOLS' => array(
   256         'SYMBOLS' => array(
   244             0 => 'color: #66cc66;'
   257             0 => 'color: #000066;',
       
   258             1 => 'color: #000066;',
       
   259             2 => 'color: #000066;',
       
   260             3 => 'color: #000066;'
   245             ),
   261             ),
   246         'SCRIPT' => array(
   262         'SCRIPT' => array(
   247             )
   263             )
   248         ),
   264         ),
   249     'URLS' => array(
   265     'URLS' => array(
   255     'OOLANG' => true,
   271     'OOLANG' => true,
   256     'OBJECT_SPLITTERS' => array(
   272     'OBJECT_SPLITTERS' => array(
   257         1 => '.'
   273         1 => '.'
   258         ),
   274         ),
   259     'REGEXPS' => array(
   275     'REGEXPS' => array(
       
   276         //Hex numbers
   260         0 => '\$[0-9a-fA-F]+',
   277         0 => '\$[0-9a-fA-F]+',
       
   278         //Characters
   261         1 => '\#\$?[0-9]{1,3}'
   279         1 => '\#\$?[0-9]{1,3}'
   262         ),
   280         ),
   263     'STRICT_MODE_APPLIES' => GESHI_NEVER,
   281     'STRICT_MODE_APPLIES' => GESHI_NEVER,
   264     'SCRIPT_DELIMITERS' => array(
   282     'SCRIPT_DELIMITERS' => array(
   265         ),
   283         ),