[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

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

   1  <?php
   2  /*************************************************************************************
   3   * newlisp.php
   4   * ----------
   5   * Author: cormullion (cormullion@mac.com) Sept 2009
   6   * Copyright: (c) 2009 Cormullion (http://unbalanced-parentheses.nfshost.com/)
   7   * Release Version: 1.0.9.1
   8   * Date Started: 2009/09/30
   9   *
  10   * newLISP language file for GeSHi.
  11   *
  12   * based on work by Lutz Mueller and Jeff Ober
  13   *
  14   * CHANGES
  15   * -------
  16   * 2009/09/30 (1.0.8.6)
  17   *  -  First Release
  18   *
  19   * TODO (updated 2009/09/30)
  20   * -------------------------
  21   *
  22   *************************************************************************************
  23   *
  24   *     This file is part of GeSHi.
  25   *
  26   *   GeSHi is free software; you can redistribute it and/or modify
  27   *   it under the terms of the GNU General Public License as published by
  28   *   the Free Software Foundation; either version 2 of the License, or
  29   *   (at your option) any later version.
  30   *
  31   *   GeSHi is distributed in the hope that it will be useful,
  32   *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  33   *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  34   *   GNU General Public License for more details.
  35   *
  36   *   You should have received a copy of the GNU General Public License
  37   *   along with GeSHi; if not, write to the Free Software
  38   *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  39   *
  40   ************************************************************************************/
  41  
  42  $language_data = array (
  43      'LANG_NAME' => 'newlisp',
  44      'COMMENT_SINGLE' => array(1 => ';', 2 => '#'),
  45      'COMMENT_MULTI' => array('[text]' => '[/text]', '{' => '}'), // also used for strings
  46      'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  47      'QUOTEMARKS' => array('"'),
  48      'ESCAPE_CHAR' => '\\',
  49      'NUMBERS' => GESHI_NUMBER_INT_BASIC |  GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_SCI_ZERO,
  50      'TAB_WIDTH' => 2,
  51      'KEYWORDS' => array(
  52          1 => array(
  53              'NaN?','abort','abs','acos','acosh','add','address','amb','and',
  54              'append','append-file','apply','args','array','array-list','array?',
  55              'asin','asinh','assoc','atan','atan2','atanh','atom?','base64-dec',
  56              'base64-enc','bayes-query','bayes-train','begin','beta','betai',
  57              'bind','binomial','bits','callback','case','catch','ceil',
  58              'change-dir','char','chop','clean','close','command-event','cond',
  59              'cons','constant','context','context?','copy','copy-file','cos',
  60              'cosh','count','cpymem','crc32','crit-chi2','crit-z','current-line',
  61              'curry','date','date-value','debug','dec','def-new','default',
  62              'define','define-macro','delete','delete-file','delete-url',
  63              'destroy','det','device','difference','directory','directory?',
  64              'div','do-until','do-while','doargs','dolist','dostring','dotimes',
  65              'dotree','dump','dup','empty?','encrypt','ends-with','env','erf',
  66              'error-event','estack','eval','eval-string','exec','exists','exit',
  67              'exp','expand','explode','factor','fft','file-info','file?',
  68              'filter','find','find-all','first','flat','float','float?','floor',
  69              'flt','for','for-all','fork','format','fv','gammai','gammaln','gcd',
  70              'get-char','get-float','get-int','get-long','get-string','get-url',
  71              'global','global?','if','if-not','ifft','import','inc','index',
  72              'inf?','int','integer','integer?','intersect','invert','irr','join',
  73              'lambda','lambda?','last','last-error','legal?','length','let',
  74              'letex','letn','list','list?','load','local','log','lookup',
  75              'lower-case','macro?','main-args','make-dir','map','mat','match',
  76              'max','member','min','mod','mul','multiply','name','net-accept',
  77              'net-close','net-connect','net-error','net-eval','net-interface',
  78              'net-listen','net-local','net-lookup','net-peek','net-peer',
  79              'net-ping','net-receive','net-receive-from','net-receive-udp',
  80              'net-select','net-send','net-send-to','net-send-udp','net-service',
  81              'net-sessions','new','nil','nil?','normal','not','now','nper','npv',
  82              'nth','null?','number?','open','or','pack','parse','parse-date',
  83              'peek','pipe','pmt','pop','pop-assoc','post-url','pow',
  84              'pretty-print','primitive?','print','println','prob-chi2','prob-z',
  85              'process','prompt-event','protected?','push','put-url','pv','quote',
  86              'quote?','rand','random','randomize','read-buffer','read-char',
  87              'read-expr','read-file','read-key','read-line','read-utf8',
  88              'real-path','receive','ref','ref-all','regex','regex-comp',
  89              'remove-dir','rename-file','replace','reset','rest','reverse',
  90              'rotate','round','save','search','seed','seek','select','semaphore',
  91              'send','sequence','series','set','set-locale','set-ref',
  92              'set-ref-all','setf','setq','sgn','share','signal','silent','sin',
  93              'sinh','sleep','slice','sort','source','spawn','sqrt','starts-with',
  94              'string','string?','sub','swap','sym','symbol?','symbols','sync',
  95              'sys-error','sys-info','tan','tanh','throw','throw-error','time',
  96              'time-of-day','timer','title-case','trace','trace-highlight',
  97              'transpose','trim','true','true?','unicode','unify','unique',
  98              'unless','unpack','until','upper-case','utf8','utf8len','uuid',
  99              'wait-pid','when','while','write-buffer','write-char','write-file',
 100              'write-line','xfer-event','xml-error','xml-parse','xml-type-tags',
 101              'zero?'
 102              )
 103          ),
 104      'SYMBOLS' => array(
 105          0 => array(
 106              '(', ')','\''
 107              ),
 108          1 => array(
 109              '!','!=','$','%','&','*','+','-','/',':',
 110              '<','<<','<=','=','>','>=','>>','^','|'
 111              )
 112          ),
 113      'CASE_SENSITIVE' => array(
 114          GESHI_COMMENTS => false,
 115          1 => false
 116          ),
 117      'STYLES' => array(
 118          'KEYWORDS' => array(
 119              1 => 'color: #0000AA;'
 120              ),
 121          'COMMENTS' => array(
 122              1 => 'color: #808080; font-style: italic;',
 123              2 => 'color: #808080; font-style: italic;',
 124              'MULTI' => 'color: #00aa00; font-style: italic;'
 125              ),
 126          'ESCAPE_CHAR' => array(
 127              0 => 'color: #009900;'
 128              ),
 129          'BRACKETS' => array(
 130              0 => 'color: #66cc66;'
 131              ),
 132          'STRINGS' => array(
 133              0 => 'color: #009900;'
 134              ),
 135          'NUMBERS' => array(
 136              0 => 'color: #777700;'
 137              ),
 138          'METHODS' => array(
 139              0 => 'color: #000099;'
 140              ),
 141          'SYMBOLS' => array(
 142              0 => 'color: #AA0000;',
 143              1 => 'color: #0000AA;'
 144              ),
 145          'REGEXPS' => array(
 146              0 => 'color: #00aa00;',
 147              1 => 'color: #00aa00;',
 148              2 => 'color: #00aa00;',
 149              3 => 'color: #00aa00;',
 150              4 => 'color: #00aa00;',
 151              5 => 'color: #AA0000;'
 152              ),
 153          'SCRIPT' => array(
 154              )
 155          ),
 156      'URLS' => array(
 157          1 => 'http://www.newlisp.org/downloads/newlisp_manual.html#{FNAME}'
 158          ),
 159      'OOLANG' => true,
 160      'OBJECT_SPLITTERS' => array(':'),
 161      'REGEXPS' => array(
 162          // tags in newlispdoc
 163          0 => "\s+@\S*?\s+",
 164          // dollar sign symbols
 165          1 => "[\\$]\w*",
 166          // curly-braced string literals
 167          2 => "{[^{}]*?}",
 168          // [text] multi-line strings
 169          3 => "(?s)\[text\].*\[\/text\](?-s)",
 170          // [code] multi-line blocks
 171          4 => "(?s)\[code\].*\[\/code\](?-s)",
 172          // variable references
 173          5 => "'[\w\-]+"
 174          ),
 175      'STRICT_MODE_APPLIES' => GESHI_NEVER,
 176      'SCRIPT_DELIMITERS' => array(
 177          ),
 178      'HIGHLIGHT_STRICT_BLOCK' => array(
 179          ),
 180      'PARSER_CONTROL' => array(
 181          'OOLANG' => array(
 182              'MATCH_AFTER' => '[a-zA-Z][a-zA-Z0-9_\-]*'
 183              ),
 184          'KEYWORDS' => array(
 185              'DISALLOWED_BEFORE' => '(?<=[^\w\-])',
 186              )
 187          ),
 188  
 189  );