KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

newlisp.php 8.0KB

11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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.8.11
  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. $language_data = array (
  42. 'LANG_NAME' => 'newlisp',
  43. 'COMMENT_SINGLE' => array(1 => ';', 2 => '#'),
  44. 'COMMENT_MULTI' => array('[text]' => '[/text]', '{' => '}'), // also used for strings
  45. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  46. 'QUOTEMARKS' => array('"'),
  47. 'ESCAPE_CHAR' => '\\',
  48. 'NUMBERS' => GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_SCI_ZERO,
  49. 'TAB_WIDTH' => 2,
  50. 'KEYWORDS' => array(
  51. 1 => array(
  52. 'NaN?','abort','abs','acos','acosh','add','address','amb','and',
  53. 'append','append-file','apply','args','array','array-list','array?',
  54. 'asin','asinh','assoc','atan','atan2','atanh','atom?','base64-dec',
  55. 'base64-enc','bayes-query','bayes-train','begin','beta','betai',
  56. 'bind','binomial','bits','callback','case','catch','ceil',
  57. 'change-dir','char','chop','clean','close','command-event','cond',
  58. 'cons','constant','context','context?','copy','copy-file','cos',
  59. 'cosh','count','cpymem','crc32','crit-chi2','crit-z','current-line',
  60. 'curry','date','date-value','debug','dec','def-new','default',
  61. 'define','define-macro','delete','delete-file','delete-url',
  62. 'destroy','det','device','difference','directory','directory?',
  63. 'div','do-until','do-while','doargs','dolist','dostring','dotimes',
  64. 'dotree','dump','dup','empty?','encrypt','ends-with','env','erf',
  65. 'error-event','estack','eval','eval-string','exec','exists','exit',
  66. 'exp','expand','explode','factor','fft','file-info','file?',
  67. 'filter','find','find-all','first','flat','float','float?','floor',
  68. 'flt','for','for-all','fork','format','fv','gammai','gammaln','gcd',
  69. 'get-char','get-float','get-int','get-long','get-string','get-url',
  70. 'global','global?','if','if-not','ifft','import','inc','index',
  71. 'inf?','int','integer','integer?','intersect','invert','irr','join',
  72. 'lambda','lambda?','last','last-error','legal?','length','let',
  73. 'letex','letn','list','list?','load','local','log','lookup',
  74. 'lower-case','macro?','main-args','make-dir','map','mat','match',
  75. 'max','member','min','mod','mul','multiply','name','net-accept',
  76. 'net-close','net-connect','net-error','net-eval','net-interface',
  77. 'net-listen','net-local','net-lookup','net-peek','net-peer',
  78. 'net-ping','net-receive','net-receive-from','net-receive-udp',
  79. 'net-select','net-send','net-send-to','net-send-udp','net-service',
  80. 'net-sessions','new','nil','nil?','normal','not','now','nper','npv',
  81. 'nth','null?','number?','open','or','pack','parse','parse-date',
  82. 'peek','pipe','pmt','pop','pop-assoc','post-url','pow',
  83. 'pretty-print','primitive?','print','println','prob-chi2','prob-z',
  84. 'process','prompt-event','protected?','push','put-url','pv','quote',
  85. 'quote?','rand','random','randomize','read-buffer','read-char',
  86. 'read-expr','read-file','read-key','read-line','read-utf8',
  87. 'real-path','receive','ref','ref-all','regex','regex-comp',
  88. 'remove-dir','rename-file','replace','reset','rest','reverse',
  89. 'rotate','round','save','search','seed','seek','select','semaphore',
  90. 'send','sequence','series','set','set-locale','set-ref',
  91. 'set-ref-all','setf','setq','sgn','share','signal','silent','sin',
  92. 'sinh','sleep','slice','sort','source','spawn','sqrt','starts-with',
  93. 'string','string?','sub','swap','sym','symbol?','symbols','sync',
  94. 'sys-error','sys-info','tan','tanh','throw','throw-error','time',
  95. 'time-of-day','timer','title-case','trace','trace-highlight',
  96. 'transpose','trim','true','true?','unicode','unify','unique',
  97. 'unless','unpack','until','upper-case','utf8','utf8len','uuid',
  98. 'wait-pid','when','while','write-buffer','write-char','write-file',
  99. 'write-line','xfer-event','xml-error','xml-parse','xml-type-tags',
  100. 'zero?'
  101. )
  102. ),
  103. 'SYMBOLS' => array(
  104. 0 => array(
  105. '(', ')','\''
  106. ),
  107. 1 => array(
  108. '!','!=','$','%','&','*','+','-','/',':',
  109. '<','<<','<=','=','>','>=','>>','^','|'
  110. )
  111. ),
  112. 'CASE_SENSITIVE' => array(
  113. GESHI_COMMENTS => false,
  114. 1 => false
  115. ),
  116. 'STYLES' => array(
  117. 'KEYWORDS' => array(
  118. 1 => 'color: #0000AA;'
  119. ),
  120. 'COMMENTS' => array(
  121. 1 => 'color: #808080; font-style: italic;',
  122. 2 => 'color: #808080; font-style: italic;',
  123. 'MULTI' => 'color: #00aa00; font-style: italic;'
  124. ),
  125. 'ESCAPE_CHAR' => array(
  126. 0 => 'color: #009900;'
  127. ),
  128. 'BRACKETS' => array(
  129. 0 => 'color: #66cc66;'
  130. ),
  131. 'STRINGS' => array(
  132. 0 => 'color: #009900;'
  133. ),
  134. 'NUMBERS' => array(
  135. 0 => 'color: #777700;'
  136. ),
  137. 'METHODS' => array(
  138. 0 => 'color: #000099;'
  139. ),
  140. 'SYMBOLS' => array(
  141. 0 => 'color: #AA0000;',
  142. 1 => 'color: #0000AA;'
  143. ),
  144. 'REGEXPS' => array(
  145. 0 => 'color: #00aa00;',
  146. 1 => 'color: #00aa00;',
  147. 2 => 'color: #00aa00;',
  148. 3 => 'color: #00aa00;',
  149. 4 => 'color: #00aa00;',
  150. 5 => 'color: #AA0000;'
  151. ),
  152. 'SCRIPT' => array(
  153. )
  154. ),
  155. 'URLS' => array(
  156. 1 => 'http://www.newlisp.org/downloads/newlisp_manual.html#{FNAME}'
  157. ),
  158. 'OOLANG' => true,
  159. 'OBJECT_SPLITTERS' => array(':'),
  160. 'REGEXPS' => array(
  161. // tags in newlispdoc
  162. 0 => "\s+@\S*?\s+",
  163. // dollar sign symbols
  164. 1 => "[\\$]\w*",
  165. // curly-braced string literals
  166. 2 => "{[^{}]*?}",
  167. // [text] multi-line strings
  168. 3 => "(?s)\[text\].*\[\/text\](?-s)",
  169. // [code] multi-line blocks
  170. 4 => "(?s)\[code\].*\[\/code\](?-s)",
  171. // variable references
  172. 5 => "'[\w\-]+"
  173. ),
  174. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  175. 'SCRIPT_DELIMITERS' => array(
  176. ),
  177. 'HIGHLIGHT_STRICT_BLOCK' => array(
  178. ),
  179. 'PARSER_CONTROL' => array(
  180. 'OOLANG' => array(
  181. 'MATCH_AFTER' => '[a-zA-Z][a-zA-Z0-9_\-]*'
  182. ),
  183. 'KEYWORDS' => array(
  184. 'DISALLOWED_BEFORE' => '(?<=[^\w\-])',
  185. )
  186. ),
  187. );
  188. ?>