Advertisement
Guest User

Untitled

a guest
Feb 3rd, 2012
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.12 KB | None | 0 0
  1. SyntaxHighlighter.brushes.CommonLisp = function()
  2. {
  3. var funcs = '\\* \\*\\* \\*\\*\\* \\+ \\+\\+ \\+\\+\\+ - / / // /// 1\\+ 1- \\< \\<= = \\> \\>= abort abs ' +
  4. 'acons acos acosh add-method adjoin adjust-array adjustable-array-p ' +
  5. 'alpha-char-p alphanumericp alter always and append append appending ' +
  6. 'apply applyhook \\*applyhook\\* apropos apropos-list aref arithmetic-error ' +
  7. 'arithmetic-error-operands arithmetic-error-operation array-dimension ' +
  8. 'array-dimension-limit array-dimensions array-element-type ' +
  9. 'array-has-fill-pointer-p array-in-bounds-p array-rank array-rank-limit ' +
  10. 'array-row-major-index array-total-size array-total-size-limit arrayp ' +
  11. 'as ash asin asinh assert assert assoc assoc-if assoc-if-not atan ' +
  12. 'atanh atom augment-environment bit bit-and bit-andc1 bit-andc2 ' +
  13. 'bit-eqv bit-ior bit-nand bit-nor bit-not bit-orc1 bit-orc2 bit-vector-p ' +
  14. 'bit-xor block boole both-case-p boundp break break \\*break-on-signals\\* ' +
  15. '\\*break-on-warnings\\* broadcast-stream-streams butlast byte byte-position ' +
  16. 'byte-size caaaar caaadr caaar caadar caaddr caadr caar cadaar cadadr ' +
  17. 'cadar caddar cadddr caddr cadr call-arguments-limit call-method ' +
  18. 'call-next-method car case catch catenate ccase ccase cdaaar cdaadr ' +
  19. 'cdaar cdadar cdaddr cdadr cdar cddaar cddadr cddar cdddar cddddr ' +
  20. 'cdddr cddr cdr ceiling cell-error cell-error-name cerror cerror ' +
  21. 'change-class char char-bit char-bits char-bits-limit char-code ' +
  22. 'char-code-limit char-control-bit char-downcase char-equal char-font ' +
  23. 'char-font-limit char-greaterp char-hyper-bit char-int char-lessp ' +
  24. 'char-meta-bit char-name char-not-equal char-not-greaterp char-not-lessp ' +
  25. 'char-super-bit char-upcase char/= char\\< char\\<= char= char\\> char\\>= ' +
  26. 'character characterp check-type check-type choose choose-if chunk ' +
  27. 'cis class-name class-of clear-input close clrhash code-char coerce ' +
  28. 'collect collect collect-alist collect-and collect-append collect-file ' +
  29. 'collect-first collect-fn collect-hash collect-last collect-length ' +
  30. 'collect-max collect-min collect-nconc collect-nth collect-or ' +
  31. 'collect-plist collect-sum collecting collecting-fn commonp compile ' +
  32. 'compile-file compile-file-pathname \\*compile-file-pathname\\* ' +
  33. '\\*compile-file-truename\\* \\*compile-print\\* \\*compile-verbose\\* ' +
  34. 'compiled-function-p compiler-let compiler-let compiler-macro-function ' +
  35. 'compiler-macroexpand compiler-macroexpand-1 complement complex ' +
  36. 'complexp compute-applicable-methods compute-restarts concatenate ' +
  37. 'concatenated-stream-streams cond condition conjugate cons consp ' +
  38. 'constantp continue control-error copy-alist copy-list copy-pprint-dispatch ' +
  39. 'copy-readtable copy-seq copy-symbol copy-tree cos cosh cotruncate ' +
  40. 'count count count-if count-if-not counting ctypecase ctypecase ' +
  41. '\\*debug-io\\* \\*debugger-hook\\* decf declaim declaration-information ' +
  42. 'declare decode-float decode-universal-time \\*default-pathname-defaults\\* ' +
  43. 'defclass defgeneric define-compiler-macro define-condition ' +
  44. 'define-declaration define-method-combination define-modify-macro ' +
  45. 'define-setf-method defmacro defmethod defpackage defstruct deftype ' +
  46. 'defun defvar delete delete-duplicates delete-file delete-if ' +
  47. 'delete-if-not delete-package denominator deposit-field describe ' +
  48. 'describe-object destructuring-bind digit-char digit-char-p directory ' +
  49. 'directory-namestring disassemble division-by-zero do do do\\* ' +
  50. 'do-all-symbols do-external-symbols do-symbols documentation ' +
  51. 'documentation doing dolist dotimes double-float-epsilon ' +
  52. 'double-float-negative-epsilon dpb dribble ecase echo-stream-input-stream ' +
  53. 'echo-stream-output-stream ed eighth elt encapsulated enclose ' +
  54. 'encode-universal-time end-of-file endp enough-namestring ' +
  55. 'ensure-generic-function eq eql equal equalp error error error ' +
  56. '\\*error-output\\* etypecase etypecase eval eval-when evalhook \\*evalhook\\* ' +
  57. 'evenp every exp expand export expt fboundp fdefinition \\*features\\* ' +
  58. 'ffloor fifth file-author file-error file-error-pathname file-length ' +
  59. 'file-namestring file-position file-string-length file-write-date ' +
  60. 'fill fill-pointer finally find find-all-symbols find-class find-if ' +
  61. 'find-if-not find-method find-package find-restart find-symbol ' +
  62. 'finish-output first flet float float-digits float-precision float-radix ' +
  63. 'float-sign floating-point-overflow floating-point-underflow floatp ' +
  64. 'floor for format formatter fourth funcall function function-information ' +
  65. 'function-keywords function-lambda-expression functionp gatherer ' +
  66. 'gathering gcd generator generic-flet generic-function generic-labels ' +
  67. 'gensym \\*gensym-counter\\* gentemp get get-decoded-time get-internal-real-time ' +
  68. 'get-internal-run-time get-output-stream-string get-properties ' +
  69. 'get-setf-method get-setf-method-multiple-value get-universal-time ' +
  70. 'getf gethash go graphic-char-p handler-bind handler-case hash-table-count ' +
  71. 'hash-table-p hash-table-rehash-size hash-table-rehash-threshold ' +
  72. 'hash-table-size hash-table-test host-namestring identity if if ' +
  73. 'ignore-errors imagpart import in-package in-package incf ' +
  74. 'initialize-instance initially input-stream-p inspect int-char ' +
  75. 'integer-decode-float integer-length integerp interactive-stream-p ' +
  76. 'intern internal-time-unchar-bit ' +
  77. 'set-difference set-dispatch-macro-character set-exclusive-or ' +
  78. 'set-macro-character set-pprint-dispatch set-syntax-from-char setf ' +
  79. 'setq seventh shadow shadowing-import shared-initialize shiftf ' +
  80. 'short-float-epsilon short-float-negative-epsilon short-site-name ' +
  81. 'signal signum simple-bit-vector-p simple-condition ' +
  82. 'simple-condition-format-arguments simple-condition-format-string ' +
  83. 'sitrim string-lessp ' +
  84. 'string-not-equal string-not-greaterp string-not-lessp string-right-trim ' +
  85. 'string-trim string-upcase string/= string\\< string\\<= string= string\\> ' +
  86. 'string\\>= stringp sublis subseq subseries subsetp subst subst-if ' +
  87. 'subst-if-not substitute substitute-if substitute-if-not subtypep ' +
  88. 'sum summing \\*suppress-series-warnings\\* svref sxhash symbol-function ' +
  89. 'symbol-macrolet symbol-name symbol-package symbol-plist symbol-value ' +
  90. 'symbolp synonym-stream-symbol t tagbody tailp tan tanh tenth ' +
  91. '\\*terminal-io\\* terminate-producing terpri the thereis third throw ' +
  92. 'time to-alter trace \\*trace-output\\* translate-logical-pathname ' +
  93. 'translate-pathname tree-equal truename truncate two-way-stream-input-stream ' +
  94. 'two-way-stream-output-stream type-error type-error-datum ' +
  95. 'type-error-expected-type type-of typecase typep unbound-variable ' +
  96. 'undefined-function unexport unintern union unless unless unread-char ' +
  97. 'until until-if untrace unuse-package unwind-protect ' +
  98. 'update-instance-for-different-class update-instance-for-redefined-class ' +
  99. 'upgraded-array-element-type upgraded-complex-part-type upper-case-p ' +
  100. 'use-package use-value user-homedir-pathname values values-list ' +
  101. 'variable-information vector vector-pop vector-push vector-push-extend ' +
  102. 'warn warning when when while wild-pathname-p with with-accessors ' +
  103. 'with-added-methods with-compilation-unit with-condition-restarts ' +
  104. 'with-hash-table-iterator with-input-from-string with-open-file ' +
  105. 'with-open-stream with-output-to-string with-package-iterator ' +
  106. 'with-simple-restart with-slots with-standard-io-syntax write ' +
  107. 'write-byte write-char write-string write-to-string y-or-n-p yes-or-no-p ' +
  108. 'zerop unprofile reset report profile stream-read-char-no-hang ' +
  109. 'stream-fresh-line stream-peek-char stream-write-char stream-write-byte ' +
  110. 'stream-write-string stream-line-column stream-write-sequence ' +
  111. 'stream-read-byte stream-read-line stream-line-length stream-read-sequence ' +
  112. 'stream-read-char stream-clear-output stream-unread-char stream-clear-input ' +
  113. 'stream-finish-output stream-start-line-p stream-force-output ' +
  114. 'stream-terpri stream-advance-to-column stream-file-position ' +
  115. 'stream-listen weak-pointer-p package-locked-p step-condition-result ' +
  116. 'native-pathname defconstant-uneql-new-value defconstant-uneql-name ' +
  117. 'cancel-finalization purify process-status-hook process-output ' +
  118. 'timer-scheduled-p package-lock-violation process-plist interactive-eval ' +
  119. 'list-all-timers process-p process-status get-bytes-consed process-error ' +
  120. 'defconstant-uneql-old-value hash-table-weakness step-next ' +
  121. 'package-implements-list float-nan-p octets-to-string with-unlocked-packages ' +
  122. 'enable-debugger float-denormalized-p with-timeout ' +
  123. 'package-locked-error-symbol process-pid package-implemented-by-list ' +
  124. 'process-pty posix-getenv step-condition-args gc-off finalize ' +
  125. 'without-package-locks unschedule-timer schedule-timer make-timer ' +
  126. 'native-namestring parse-native-namestring float-infinity-p lock-package ' +
  127. 'process-kill process-exit-code step-continue string-to-octets ' +
  128. 'unlock-package quit process-alive-p remove-implementation-package ' +
  129. 'find-executable-in-search-path weak-pointer-value process-wait ' +
  130. 'disable-debugger process-core-dumped define-source-context ' +
  131. 'add-implementation-package run-program process-close step-condition-form ' +
  132. 'posix-environ timer-name process-input bytes-consed-between-gcs ' +
  133. 'gc-on make-weak-pointer save-lisp-and-die describe-compiler-policy ' +
  134. 'step-into gc float-trapping-nan-p truly-the internal-debug ' +
  135. 'frame-has-debug-tag-p backtrace-as-list arg var backtrace ' +
  136. 'unwind-to-frame-and-call slot alien-funcall def-alien-variable deref ' +
  137. 'addr with-alien load-shared-object define-alien-routine def-alien-routine ' +
  138. 'make-alien free-alien alien-sap cast get-errno load-foreign sap-alien ' +
  139. 'def-alien-type null-alien define-alien-type define-alien-variable ' +
  140. 'extern-alien load-1-foreign alien-size clear-output print princ-to-string ' +
  141. 'defsetf remove-if-not vectorp print-not-readable-object copy-structure ' +
  142. 'read-sequence get-dispatch-macro-character define-setf-expander ' +
  143. 'fmakunbound write-sequence constantly labels prin1-to-string ' +
  144. 'get-setf-expansion defconstant simple-condition-format-control ' +
  145. 'ensure-directories-exist unbound-slot-instance /= get-macro-character ' +
  146. 'allocate-instance remove-if array-displacement fceiling special-operator-p ' +
  147. 'force-output princ lambda invoke-restart-interactively ftruncate ' +
  148. 'fround write-line macrolet define-symbol-macro pprint fresh-line';
  149.  
  150. this.regexList = [
  151. { regex: new RegExp(';.*$', 'gm'), css: 'comments' },
  152. { regex: SyntaxHighlighter.regexLib.multiLineDoubleQuotedString, css: 'string' },
  153. { regex: /\[|\]/g, css: 'keyword' },
  154. { regex: /'[a-z][A-Za-z0-9_]*/g, css: 'color1' }, // symbols
  155. { regex: /:[a-z][A-Za-z0-9_]*/g, css: 'color2' }, // keywords
  156. { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }
  157. ];
  158.  
  159. this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
  160. }
  161.  
  162. SyntaxHighlighter.brushes.CommonLisp.prototype = new SyntaxHighlighter.Highlighter();
  163. SyntaxHighlighter.brushes.CommonLisp.aliases = ['lisp'];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement