[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/vendor/geshi/geshi/src/geshi/ -> pascal.php (source)

   1  <?php
   2  /*************************************************************************************
   3   * pascal.php
   4   * ----------
   5   * Author: Tux (tux@inamil.cz)
   6   * Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter)
   7   * Release Version: 1.0.9.1
   8   * Date Started: 2004/07/26
   9   *
  10   * Pascal language file for GeSHi.
  11   *
  12   * CHANGES
  13   * -------
  14   * 2008/05/23 (1.0.7.22)
  15   *   -  Added description of extra language features (SF#1970248)
  16   * 2004/11/27 (1.0.2)
  17   *  -  Added support for multiple object splitters
  18   * 2004/10/27 (1.0.1)
  19   *   -  Added support for URLs
  20   * 2004/08/05 (1.0.0)
  21   *   -  Added support for symbols
  22   * 2004/07/27 (0.9.1)
  23   *   -  Pascal is OO language. Some new words.
  24   * 2004/07/26 (0.9.0)
  25   *   -  First Release
  26   *
  27   * TODO (updated 2004/11/27)
  28   * -------------------------
  29   *
  30   *************************************************************************************
  31   *
  32   *     This file is part of GeSHi.
  33   *
  34   *   GeSHi is free software; you can redistribute it and/or modify
  35   *   it under the terms of the GNU General Public License as published by
  36   *   the Free Software Foundation; either version 2 of the License, or
  37   *   (at your option) any later version.
  38   *
  39   *   GeSHi is distributed in the hope that it will be useful,
  40   *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  41   *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  42   *   GNU General Public License for more details.
  43   *
  44   *   You should have received a copy of the GNU General Public License
  45   *   along with GeSHi; if not, write to the Free Software
  46   *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  47   *
  48   ************************************************************************************/
  49  
  50  $language_data = array (
  51      'LANG_NAME' => 'Pascal',
  52      'COMMENT_SINGLE' => array(1 => '//'),
  53      'COMMENT_MULTI' => array('(*' => '*)', '{' => '}'),
  54      //Compiler directives
  55      'COMMENT_REGEXP' => array(2 => '/\\{\\$.*?}|\\(\\*\\$.*?\\*\\)/U'),
  56      'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  57      'QUOTEMARKS' => array("'"),
  58      'ESCAPE_CHAR' => '',
  59  
  60      'KEYWORDS' => array(
  61          1 => array(
  62              'absolute','asm','assembler','begin','break','case','catch','cdecl',
  63              'const','constructor','default','destructor','div','do','downto',
  64              'else','end','except','export','exports','external','far',
  65              'finalization','finally','for','forward','function','goto','if',
  66              'implementation','in','index','inherited','initialization','inline',
  67              'interface','interrupt','label','library','mod','name','not','of',
  68              'or','overload','override','private','procedure','program',
  69              'property','protected','public','published','raise','repeat',
  70              'resourcestring','shl','shr','stdcall','stored','switch','then',
  71              'to','try','type','unit','until','uses','var','while','with','xor'
  72              ),
  73          2 => array(
  74              'nil', 'false', 'true',
  75              ),
  76          3 => array(
  77              'abs','and','arc','arctan','blockread','blockwrite','chr','dispose',
  78              'cos','eof','eoln','exp','get','ln','new','odd','ord','ordinal',
  79              'pred','read','readln','sin','sqrt','succ','write','writeln'
  80              ),
  81          4 => array(
  82              'ansistring','array','boolean','byte','bytebool','char','file',
  83              'integer','longbool','longint','object','packed','pointer','real',
  84              'record','set','shortint','smallint','string','union','word'
  85              ),
  86          ),
  87      'CASE_SENSITIVE' => array(
  88          GESHI_COMMENTS => false,
  89          1 => false,
  90          2 => false,
  91          3 => false,
  92          4 => false,
  93          ),
  94      'SYMBOLS' => array(
  95          0 => array('(', ')', '[', ']'),
  96          1 => array('.', ',', ':', ';'),
  97          2 => array('@', '^'),
  98          3 => array('=', '+', '-', '*', '/')
  99          ),
 100      'STYLES' => array(
 101          'KEYWORDS' => array(
 102              1 => 'color: #000000; font-weight: bold;',
 103              2 => 'color: #000000; font-weight: bold;',
 104              3 => 'color: #000066;',
 105              4 => 'color: #000066; font-weight: bold;'
 106              ),
 107          'COMMENTS' => array(
 108              1 => 'color: #808080; font-style: italic;',
 109              2 => 'color: #008000; font-style: italic;',
 110              'MULTI' => 'color: #808080; font-style: italic;'
 111              ),
 112          'ESCAPE_CHAR' => array(
 113              0 => 'color: #ff0000; font-weight: bold;'
 114              ),
 115          'BRACKETS' => array(
 116              0 => 'color: #009900;'
 117              ),
 118          'STRINGS' => array(
 119              0 => 'color: #ff0000;',
 120              //'HARD' => 'color: #ff0000;'
 121              ),
 122          'NUMBERS' => array(
 123              0 => 'color: #cc66cc;'
 124              ),
 125          'METHODS' => array(
 126              1 => 'color: #006600;'
 127              ),
 128          'REGEXPS' => array(
 129              0 => 'color: #0000cc;',
 130              1 => 'color: #ff0000;'
 131              ),
 132          'SYMBOLS' => array(
 133              0 => 'color: #000066;',
 134              1 => 'color: #000066;',
 135              2 => 'color: #000066;',
 136              3 => 'color: #000066;'
 137              ),
 138          'SCRIPT' => array(
 139              )
 140          ),
 141      'URLS' => array(
 142          1 => '',
 143          2 => '',
 144          3 => '',
 145          4 => ''
 146          ),
 147      'OOLANG' => true,
 148      'OBJECT_SPLITTERS' => array(
 149          1 => '.'
 150          ),
 151      'REGEXPS' => array(
 152          //Hex numbers
 153          0 => '\$[0-9a-fA-F]+',
 154          //Characters
 155          1 => '\#(?:\$[0-9a-fA-F]{1,2}|\d{1,3})'
 156          ),
 157      'STRICT_MODE_APPLIES' => GESHI_NEVER,
 158      'SCRIPT_DELIMITERS' => array(
 159          ),
 160      'HIGHLIGHT_STRICT_BLOCK' => array(
 161          ),
 162      'TAB_WIDTH' => 4
 163  );