PageRenderTime 38ms CodeModel.GetById 18ms app.highlight 17ms RepoModel.GetById 0ms app.codeStats 1ms

/syntaxhighlight/pygments/lexers/_clbuiltins.py

http://github.com/plushcms/PlushCMS
Python | 232 lines | 213 code | 8 blank | 11 comment | 0 complexity | acd6bd293c10459234e17171b9b55c5c MD5 | raw file
  1# -*- coding: utf-8 -*-
  2"""
  3    plushcms.syntaxhighlight.pygments.lexers._clbuiltins
  4    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  5
  6    ANSI Common Lisp builtins.
  7
  8    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
  9    :license: BSD, see LICENSE for details.
 10"""
 11
 12BUILTIN_FUNCTIONS = [ # 638 functions
 13    '<', '<=', '=', '>', '>=', '-', '/', '/=', '*', '+', '1-', '1+',
 14    'abort', 'abs', 'acons', 'acos', 'acosh', 'add-method', 'adjoin',
 15    'adjustable-array-p', 'adjust-array', 'allocate-instance',
 16    'alpha-char-p', 'alphanumericp', 'append', 'apply', 'apropos',
 17    'apropos-list', 'aref', 'arithmetic-error-operands',
 18    'arithmetic-error-operation', 'array-dimension', 'array-dimensions',
 19    'array-displacement', 'array-element-type', 'array-has-fill-pointer-p',
 20    'array-in-bounds-p', 'arrayp', 'array-rank', 'array-row-major-index',
 21    'array-total-size', 'ash', 'asin', 'asinh', 'assoc', 'assoc-if',
 22    'assoc-if-not', 'atan', 'atanh', 'atom', 'bit', 'bit-and', 'bit-andc1',
 23    'bit-andc2', 'bit-eqv', 'bit-ior', 'bit-nand', 'bit-nor', 'bit-not',
 24    'bit-orc1', 'bit-orc2', 'bit-vector-p', 'bit-xor', 'boole',
 25    'both-case-p', 'boundp', 'break', 'broadcast-stream-streams',
 26    'butlast', 'byte', 'byte-position', 'byte-size', 'caaaar', 'caaadr',
 27    'caaar', 'caadar', 'caaddr', 'caadr', 'caar', 'cadaar', 'cadadr',
 28    'cadar', 'caddar', 'cadddr', 'caddr', 'cadr', 'call-next-method', 'car',
 29    'cdaaar', 'cdaadr', 'cdaar', 'cdadar', 'cdaddr', 'cdadr', 'cdar',
 30    'cddaar', 'cddadr', 'cddar', 'cdddar', 'cddddr', 'cdddr', 'cddr', 'cdr',
 31    'ceiling', 'cell-error-name', 'cerror', 'change-class', 'char', 'char<',
 32    'char<=', 'char=', 'char>', 'char>=', 'char/=', 'character',
 33    'characterp', 'char-code', 'char-downcase', 'char-equal',
 34    'char-greaterp', 'char-int', 'char-lessp', 'char-name',
 35    'char-not-equal', 'char-not-greaterp', 'char-not-lessp', 'char-upcase',
 36    'cis', 'class-name', 'class-of', 'clear-input', 'clear-output',
 37    'close', 'clrhash', 'code-char', 'coerce', 'compile',
 38    'compiled-function-p', 'compile-file', 'compile-file-pathname',
 39    'compiler-macro-function', 'complement', 'complex', 'complexp',
 40    'compute-applicable-methods', 'compute-restarts', 'concatenate',
 41    'concatenated-stream-streams', 'conjugate', 'cons', 'consp',
 42    'constantly', 'constantp', 'continue', 'copy-alist', 'copy-list',
 43    'copy-pprint-dispatch', 'copy-readtable', 'copy-seq', 'copy-structure',
 44    'copy-symbol', 'copy-tree', 'cos', 'cosh', 'count', 'count-if',
 45    'count-if-not', 'decode-float', 'decode-universal-time', 'delete',
 46    'delete-duplicates', 'delete-file', 'delete-if', 'delete-if-not',
 47    'delete-package', 'denominator', 'deposit-field', 'describe',
 48    'describe-object', 'digit-char', 'digit-char-p', 'directory',
 49    'directory-namestring', 'disassemble', 'documentation', 'dpb',
 50    'dribble', 'echo-stream-input-stream', 'echo-stream-output-stream',
 51    'ed', 'eighth', 'elt', 'encode-universal-time', 'endp',
 52    'enough-namestring', 'ensure-directories-exist',
 53    'ensure-generic-function', 'eq', 'eql', 'equal', 'equalp', 'error',
 54    'eval', 'evenp', 'every', 'exp', 'export', 'expt', 'fboundp',
 55    'fceiling', 'fdefinition', 'ffloor', 'fifth', 'file-author',
 56    'file-error-pathname', 'file-length', 'file-namestring',
 57    'file-position', 'file-string-length', 'file-write-date',
 58    'fill', 'fill-pointer', 'find', 'find-all-symbols', 'find-class',
 59    'find-if', 'find-if-not', 'find-method', 'find-package', 'find-restart',
 60    'find-symbol', 'finish-output', 'first', 'float', 'float-digits',
 61    'floatp', 'float-precision', 'float-radix', 'float-sign', 'floor',
 62    'fmakunbound', 'force-output', 'format', 'fourth', 'fresh-line',
 63    'fround', 'ftruncate', 'funcall', 'function-keywords',
 64    'function-lambda-expression', 'functionp', 'gcd', 'gensym', 'gentemp',
 65    'get', 'get-decoded-time', 'get-dispatch-macro-character', 'getf',
 66    'gethash', 'get-internal-real-time', 'get-internal-run-time',
 67    'get-macro-character', 'get-output-stream-string', 'get-properties',
 68    'get-setf-expansion', 'get-universal-time', 'graphic-char-p',
 69    'hash-table-count', 'hash-table-p', 'hash-table-rehash-size',
 70    'hash-table-rehash-threshold', 'hash-table-size', 'hash-table-test',
 71    'host-namestring', 'identity', 'imagpart', 'import',
 72    'initialize-instance', 'input-stream-p', 'inspect',
 73    'integer-decode-float', 'integer-length', 'integerp',
 74    'interactive-stream-p', 'intern', 'intersection',
 75    'invalid-method-error', 'invoke-debugger', 'invoke-restart',
 76    'invoke-restart-interactively', 'isqrt', 'keywordp', 'last', 'lcm',
 77    'ldb', 'ldb-test', 'ldiff', 'length', 'lisp-implementation-type',
 78    'lisp-implementation-version', 'list', 'list*', 'list-all-packages',
 79    'listen', 'list-length', 'listp', 'load',
 80    'load-logical-pathname-translations', 'log', 'logand', 'logandc1',
 81    'logandc2', 'logbitp', 'logcount', 'logeqv', 'logical-pathname',
 82    'logical-pathname-translations', 'logior', 'lognand', 'lognor',
 83    'lognot', 'logorc1', 'logorc2', 'logtest', 'logxor', 'long-site-name',
 84    'lower-case-p', 'machine-instance', 'machine-type', 'machine-version',
 85    'macroexpand', 'macroexpand-1', 'macro-function', 'make-array',
 86    'make-broadcast-stream', 'make-concatenated-stream', 'make-condition',
 87    'make-dispatch-macro-character', 'make-echo-stream', 'make-hash-table',
 88    'make-instance', 'make-instances-obsolete', 'make-list',
 89    'make-load-form', 'make-load-form-saving-slots', 'make-package',
 90    'make-pathname', 'make-random-state', 'make-sequence', 'make-string',
 91    'make-string-input-stream', 'make-string-output-stream', 'make-symbol',
 92    'make-synonym-stream', 'make-two-way-stream', 'makunbound', 'map',
 93    'mapc', 'mapcan', 'mapcar', 'mapcon', 'maphash', 'map-into', 'mapl',
 94    'maplist', 'mask-field', 'max', 'member', 'member-if', 'member-if-not',
 95    'merge', 'merge-pathnames', 'method-combination-error',
 96    'method-qualifiers', 'min', 'minusp', 'mismatch', 'mod',
 97    'muffle-warning', 'name-char', 'namestring', 'nbutlast', 'nconc',
 98    'next-method-p', 'nintersection', 'ninth', 'no-applicable-method',
 99    'no-next-method', 'not', 'notany', 'notevery', 'nreconc', 'nreverse',
100    'nset-difference', 'nset-exclusive-or', 'nstring-capitalize',
101    'nstring-downcase', 'nstring-upcase', 'nsublis', 'nsubst', 'nsubst-if',
102    'nsubst-if-not', 'nsubstitute', 'nsubstitute-if', 'nsubstitute-if-not',
103    'nth', 'nthcdr', 'null', 'numberp', 'numerator', 'nunion', 'oddp',
104    'open', 'open-stream-p', 'output-stream-p', 'package-error-package',
105    'package-name', 'package-nicknames', 'packagep',
106    'package-shadowing-symbols', 'package-used-by-list', 'package-use-list',
107    'pairlis', 'parse-integer', 'parse-namestring', 'pathname',
108    'pathname-device', 'pathname-directory', 'pathname-host',
109    'pathname-match-p', 'pathname-name', 'pathnamep', 'pathname-type',
110    'pathname-version', 'peek-char', 'phase', 'plusp', 'position',
111    'position-if', 'position-if-not', 'pprint', 'pprint-dispatch',
112    'pprint-fill', 'pprint-indent', 'pprint-linear', 'pprint-newline',
113    'pprint-tab', 'pprint-tabular', 'prin1', 'prin1-to-string', 'princ',
114    'princ-to-string', 'print', 'print-object', 'probe-file', 'proclaim',
115    'provide', 'random', 'random-state-p', 'rassoc', 'rassoc-if',
116    'rassoc-if-not', 'rational', 'rationalize', 'rationalp', 'read',
117    'read-byte', 'read-char', 'read-char-no-hang', 'read-delimited-list',
118    'read-from-string', 'read-line', 'read-preserving-whitespace',
119    'read-sequence', 'readtable-case', 'readtablep', 'realp', 'realpart',
120    'reduce', 'reinitialize-instance', 'rem', 'remhash', 'remove',
121    'remove-duplicates', 'remove-if', 'remove-if-not', 'remove-method',
122    'remprop', 'rename-file', 'rename-package', 'replace', 'require',
123    'rest', 'restart-name', 'revappend', 'reverse', 'room', 'round',
124    'row-major-aref', 'rplaca', 'rplacd', 'sbit', 'scale-float', 'schar',
125    'search', 'second', 'set', 'set-difference',
126    'set-dispatch-macro-character', 'set-exclusive-or',
127    'set-macro-character', 'set-pprint-dispatch', 'set-syntax-from-char',
128    'seventh', 'shadow', 'shadowing-import', 'shared-initialize',
129    'short-site-name', 'signal', 'signum', 'simple-bit-vector-p',
130    'simple-condition-format-arguments', 'simple-condition-format-control',
131    'simple-string-p', 'simple-vector-p', 'sin', 'sinh', 'sixth', 'sleep',
132    'slot-boundp', 'slot-exists-p', 'slot-makunbound', 'slot-missing',
133    'slot-unbound', 'slot-value', 'software-type', 'software-version',
134    'some', 'sort', 'special-operator-p', 'sqrt', 'stable-sort',
135    'standard-char-p', 'store-value', 'stream-element-type',
136    'stream-error-stream', 'stream-external-format', 'streamp', 'string',
137    'string<', 'string<=', 'string=', 'string>', 'string>=', 'string/=',
138    'string-capitalize', 'string-downcase', 'string-equal',
139    'string-greaterp', 'string-left-trim', 'string-lessp',
140    'string-not-equal', 'string-not-greaterp', 'string-not-lessp',
141    'stringp', 'string-right-trim', 'string-trim', 'string-upcase',
142    'sublis', 'subseq', 'subsetp', 'subst', 'subst-if', 'subst-if-not',
143    'substitute', 'substitute-if', 'substitute-if-not', 'subtypep','svref',
144    'sxhash', 'symbol-function', 'symbol-name', 'symbolp', 'symbol-package',
145    'symbol-plist', 'symbol-value', 'synonym-stream-symbol', 'syntax:',
146    'tailp', 'tan', 'tanh', 'tenth', 'terpri', 'third',
147    'translate-logical-pathname', 'translate-pathname', 'tree-equal',
148    'truename', 'truncate', 'two-way-stream-input-stream',
149    'two-way-stream-output-stream', 'type-error-datum',
150    'type-error-expected-type', 'type-of', 'typep', 'unbound-slot-instance',
151    'unexport', 'unintern', 'union', 'unread-char', 'unuse-package',
152    'update-instance-for-different-class',
153    'update-instance-for-redefined-class', 'upgraded-array-element-type',
154    'upgraded-complex-part-type', 'upper-case-p', 'use-package',
155    'user-homedir-pathname', 'use-value', 'values', 'values-list', 'vector',
156    'vectorp', 'vector-pop', 'vector-push', 'vector-push-extend', 'warn',
157    'wild-pathname-p', 'write', 'write-byte', 'write-char', 'write-line',
158    'write-sequence', 'write-string', 'write-to-string', 'yes-or-no-p',
159    'y-or-n-p', 'zerop',
160]
161
162SPECIAL_FORMS = [
163    'block', 'catch', 'declare', 'eval-when', 'flet', 'function', 'go', 'if',
164    'labels', 'lambda', 'let', 'let*', 'load-time-value', 'locally', 'macrolet',
165    'multiple-value-call', 'multiple-value-prog1', 'progn', 'progv', 'quote',
166    'return-from', 'setq', 'symbol-macrolet', 'tagbody', 'the', 'throw',
167    'unwind-protect',
168]
169
170MACROS = [
171    'and', 'assert', 'call-method', 'case', 'ccase', 'check-type', 'cond',
172    'ctypecase', 'decf', 'declaim', 'defclass', 'defconstant', 'defgeneric',
173    'define-compiler-macro', 'define-condition', 'define-method-combination',
174    'define-modify-macro', 'define-setf-expander', 'define-symbol-macro',
175    'defmacro', 'defmethod', 'defpackage', 'defparameter', 'defsetf',
176    'defstruct', 'deftype', 'defun', 'defvar', 'destructuring-bind', 'do',
177    'do*', 'do-all-symbols', 'do-external-symbols', 'dolist', 'do-symbols',
178    'dotimes', 'ecase', 'etypecase', 'formatter', 'handler-bind',
179    'handler-case', 'ignore-errors', 'incf', 'in-package', 'lambda', 'loop',
180    'loop-finish', 'make-method', 'multiple-value-bind', 'multiple-value-list',
181    'multiple-value-setq', 'nth-value', 'or', 'pop',
182    'pprint-exit-if-list-exhausted', 'pprint-logical-block', 'pprint-pop',
183    'print-unreadable-object', 'prog', 'prog*', 'prog1', 'prog2', 'psetf',
184    'psetq', 'push', 'pushnew', 'remf', 'restart-bind', 'restart-case',
185    'return', 'rotatef', 'setf', 'shiftf', 'step', 'time', 'trace', 'typecase',
186    'unless', 'untrace', 'when', 'with-accessors', 'with-compilation-unit',
187    'with-condition-restarts', 'with-hash-table-iterator',
188    'with-input-from-string', 'with-open-file', 'with-open-stream',
189    'with-output-to-string', 'with-package-iterator', 'with-simple-restart',
190    'with-slots', 'with-standard-io-syntax',
191]
192
193LAMBDA_LIST_KEYWORDS = [
194    '&allow-other-keys', '&aux', '&body', '&environment', '&key', '&optional',
195    '&rest', '&whole',
196]
197
198DECLARATIONS = [
199    'dynamic-extent', 'ignore', 'optimize', 'ftype', 'inline', 'special',
200    'ignorable', 'notinline', 'type',
201]
202
203BUILTIN_TYPES = [
204    'atom', 'boolean', 'base-char', 'base-string', 'bignum', 'bit',
205    'compiled-function', 'extended-char', 'fixnum', 'keyword', 'nil',
206    'signed-byte', 'short-float', 'single-float', 'double-float', 'long-float',
207    'simple-array', 'simple-base-string', 'simple-bit-vector', 'simple-string',
208    'simple-vector', 'standard-char', 'unsigned-byte',
209
210    # Condition Types
211    'arithmetic-error', 'cell-error', 'condition', 'control-error',
212    'division-by-zero', 'end-of-file', 'error', 'file-error',
213    'floating-point-inexact', 'floating-point-overflow',
214    'floating-point-underflow', 'floating-point-invalid-operation',
215    'parse-error', 'package-error', 'print-not-readable', 'program-error',
216    'reader-error', 'serious-condition', 'simple-condition', 'simple-error',
217    'simple-type-error', 'simple-warning', 'stream-error', 'storage-condition',
218    'style-warning', 'type-error', 'unbound-variable', 'unbound-slot',
219    'undefined-function', 'warning',
220]
221
222BUILTIN_CLASSES = [
223    'array', 'broadcast-stream', 'bit-vector', 'built-in-class', 'character',
224    'class', 'complex', 'concatenated-stream', 'cons', 'echo-stream',
225    'file-stream', 'float', 'function', 'generic-function', 'hash-table',
226    'integer', 'list', 'logical-pathname', 'method-combination', 'method',
227    'null', 'number', 'package', 'pathname', 'ratio', 'rational', 'readtable',
228    'real', 'random-state', 'restart', 'sequence', 'standard-class',
229    'standard-generic-function', 'standard-method', 'standard-object',
230    'string-stream', 'stream', 'string', 'structure-class', 'structure-object',
231    'symbol', 'synonym-stream', 't', 'two-way-stream', 'vector',
232]