Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/pygments/lexers/_cl_builtins.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.2.7, created at 2023-07-01 06:54 +0000

1""" 

2 pygments.lexers._cl_builtins 

3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

4 

5 ANSI Common Lisp builtins. 

6 

7 :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. 

8 :license: BSD, see LICENSE for details. 

9""" 

10 

11BUILTIN_FUNCTIONS = { # 638 functions 

12 '<', '<=', '=', '>', '>=', '-', '/', '/=', '*', '+', '1-', '1+', 

13 'abort', 'abs', 'acons', 'acos', 'acosh', 'add-method', 'adjoin', 

14 'adjustable-array-p', 'adjust-array', 'allocate-instance', 

15 'alpha-char-p', 'alphanumericp', 'append', 'apply', 'apropos', 

16 'apropos-list', 'aref', 'arithmetic-error-operands', 

17 'arithmetic-error-operation', 'array-dimension', 'array-dimensions', 

18 'array-displacement', 'array-element-type', 'array-has-fill-pointer-p', 

19 'array-in-bounds-p', 'arrayp', 'array-rank', 'array-row-major-index', 

20 'array-total-size', 'ash', 'asin', 'asinh', 'assoc', 'assoc-if', 

21 'assoc-if-not', 'atan', 'atanh', 'atom', 'bit', 'bit-and', 'bit-andc1', 

22 'bit-andc2', 'bit-eqv', 'bit-ior', 'bit-nand', 'bit-nor', 'bit-not', 

23 'bit-orc1', 'bit-orc2', 'bit-vector-p', 'bit-xor', 'boole', 

24 'both-case-p', 'boundp', 'break', 'broadcast-stream-streams', 

25 'butlast', 'byte', 'byte-position', 'byte-size', 'caaaar', 'caaadr', 

26 'caaar', 'caadar', 'caaddr', 'caadr', 'caar', 'cadaar', 'cadadr', 

27 'cadar', 'caddar', 'cadddr', 'caddr', 'cadr', 'call-next-method', 'car', 

28 'cdaaar', 'cdaadr', 'cdaar', 'cdadar', 'cdaddr', 'cdadr', 'cdar', 

29 'cddaar', 'cddadr', 'cddar', 'cdddar', 'cddddr', 'cdddr', 'cddr', 'cdr', 

30 'ceiling', 'cell-error-name', 'cerror', 'change-class', 'char', 'char<', 

31 'char<=', 'char=', 'char>', 'char>=', 'char/=', 'character', 

32 'characterp', 'char-code', 'char-downcase', 'char-equal', 

33 'char-greaterp', 'char-int', 'char-lessp', 'char-name', 

34 'char-not-equal', 'char-not-greaterp', 'char-not-lessp', 'char-upcase', 

35 'cis', 'class-name', 'class-of', 'clear-input', 'clear-output', 

36 'close', 'clrhash', 'code-char', 'coerce', 'compile', 

37 'compiled-function-p', 'compile-file', 'compile-file-pathname', 

38 'compiler-macro-function', 'complement', 'complex', 'complexp', 

39 'compute-applicable-methods', 'compute-restarts', 'concatenate', 

40 'concatenated-stream-streams', 'conjugate', 'cons', 'consp', 

41 'constantly', 'constantp', 'continue', 'copy-alist', 'copy-list', 

42 'copy-pprint-dispatch', 'copy-readtable', 'copy-seq', 'copy-structure', 

43 'copy-symbol', 'copy-tree', 'cos', 'cosh', 'count', 'count-if', 

44 'count-if-not', 'decode-float', 'decode-universal-time', 'delete', 

45 'delete-duplicates', 'delete-file', 'delete-if', 'delete-if-not', 

46 'delete-package', 'denominator', 'deposit-field', 'describe', 

47 'describe-object', 'digit-char', 'digit-char-p', 'directory', 

48 'directory-namestring', 'disassemble', 'documentation', 'dpb', 

49 'dribble', 'echo-stream-input-stream', 'echo-stream-output-stream', 

50 'ed', 'eighth', 'elt', 'encode-universal-time', 'endp', 

51 'enough-namestring', 'ensure-directories-exist', 

52 'ensure-generic-function', 'eq', 'eql', 'equal', 'equalp', 'error', 

53 'eval', 'evenp', 'every', 'exp', 'export', 'expt', 'fboundp', 

54 'fceiling', 'fdefinition', 'ffloor', 'fifth', 'file-author', 

55 'file-error-pathname', 'file-length', 'file-namestring', 

56 'file-position', 'file-string-length', 'file-write-date', 

57 'fill', 'fill-pointer', 'find', 'find-all-symbols', 'find-class', 

58 'find-if', 'find-if-not', 'find-method', 'find-package', 'find-restart', 

59 'find-symbol', 'finish-output', 'first', 'float', 'float-digits', 

60 'floatp', 'float-precision', 'float-radix', 'float-sign', 'floor', 

61 'fmakunbound', 'force-output', 'format', 'fourth', 'fresh-line', 

62 'fround', 'ftruncate', 'funcall', 'function-keywords', 

63 'function-lambda-expression', 'functionp', 'gcd', 'gensym', 'gentemp', 

64 'get', 'get-decoded-time', 'get-dispatch-macro-character', 'getf', 

65 'gethash', 'get-internal-real-time', 'get-internal-run-time', 

66 'get-macro-character', 'get-output-stream-string', 'get-properties', 

67 'get-setf-expansion', 'get-universal-time', 'graphic-char-p', 

68 'hash-table-count', 'hash-table-p', 'hash-table-rehash-size', 

69 'hash-table-rehash-threshold', 'hash-table-size', 'hash-table-test', 

70 'host-namestring', 'identity', 'imagpart', 'import', 

71 'initialize-instance', 'input-stream-p', 'inspect', 

72 'integer-decode-float', 'integer-length', 'integerp', 

73 'interactive-stream-p', 'intern', 'intersection', 

74 'invalid-method-error', 'invoke-debugger', 'invoke-restart', 

75 'invoke-restart-interactively', 'isqrt', 'keywordp', 'last', 'lcm', 

76 'ldb', 'ldb-test', 'ldiff', 'length', 'lisp-implementation-type', 

77 'lisp-implementation-version', 'list', 'list*', 'list-all-packages', 

78 'listen', 'list-length', 'listp', 'load', 

79 'load-logical-pathname-translations', 'log', 'logand', 'logandc1', 

80 'logandc2', 'logbitp', 'logcount', 'logeqv', 'logical-pathname', 

81 'logical-pathname-translations', 'logior', 'lognand', 'lognor', 

82 'lognot', 'logorc1', 'logorc2', 'logtest', 'logxor', 'long-site-name', 

83 'lower-case-p', 'machine-instance', 'machine-type', 'machine-version', 

84 'macroexpand', 'macroexpand-1', 'macro-function', 'make-array', 

85 'make-broadcast-stream', 'make-concatenated-stream', 'make-condition', 

86 'make-dispatch-macro-character', 'make-echo-stream', 'make-hash-table', 

87 'make-instance', 'make-instances-obsolete', 'make-list', 

88 'make-load-form', 'make-load-form-saving-slots', 'make-package', 

89 'make-pathname', 'make-random-state', 'make-sequence', 'make-string', 

90 'make-string-input-stream', 'make-string-output-stream', 'make-symbol', 

91 'make-synonym-stream', 'make-two-way-stream', 'makunbound', 'map', 

92 'mapc', 'mapcan', 'mapcar', 'mapcon', 'maphash', 'map-into', 'mapl', 

93 'maplist', 'mask-field', 'max', 'member', 'member-if', 'member-if-not', 

94 'merge', 'merge-pathnames', 'method-combination-error', 

95 'method-qualifiers', 'min', 'minusp', 'mismatch', 'mod', 

96 'muffle-warning', 'name-char', 'namestring', 'nbutlast', 'nconc', 

97 'next-method-p', 'nintersection', 'ninth', 'no-applicable-method', 

98 'no-next-method', 'not', 'notany', 'notevery', 'nreconc', 'nreverse', 

99 'nset-difference', 'nset-exclusive-or', 'nstring-capitalize', 

100 'nstring-downcase', 'nstring-upcase', 'nsublis', 'nsubst', 'nsubst-if', 

101 'nsubst-if-not', 'nsubstitute', 'nsubstitute-if', 'nsubstitute-if-not', 

102 'nth', 'nthcdr', 'null', 'numberp', 'numerator', 'nunion', 'oddp', 

103 'open', 'open-stream-p', 'output-stream-p', 'package-error-package', 

104 'package-name', 'package-nicknames', 'packagep', 

105 'package-shadowing-symbols', 'package-used-by-list', 'package-use-list', 

106 'pairlis', 'parse-integer', 'parse-namestring', 'pathname', 

107 'pathname-device', 'pathname-directory', 'pathname-host', 

108 'pathname-match-p', 'pathname-name', 'pathnamep', 'pathname-type', 

109 'pathname-version', 'peek-char', 'phase', 'plusp', 'position', 

110 'position-if', 'position-if-not', 'pprint', 'pprint-dispatch', 

111 'pprint-fill', 'pprint-indent', 'pprint-linear', 'pprint-newline', 

112 'pprint-tab', 'pprint-tabular', 'prin1', 'prin1-to-string', 'princ', 

113 'princ-to-string', 'print', 'print-object', 'probe-file', 'proclaim', 

114 'provide', 'random', 'random-state-p', 'rassoc', 'rassoc-if', 

115 'rassoc-if-not', 'rational', 'rationalize', 'rationalp', 'read', 

116 'read-byte', 'read-char', 'read-char-no-hang', 'read-delimited-list', 

117 'read-from-string', 'read-line', 'read-preserving-whitespace', 

118 'read-sequence', 'readtable-case', 'readtablep', 'realp', 'realpart', 

119 'reduce', 'reinitialize-instance', 'rem', 'remhash', 'remove', 

120 'remove-duplicates', 'remove-if', 'remove-if-not', 'remove-method', 

121 'remprop', 'rename-file', 'rename-package', 'replace', 'require', 

122 'rest', 'restart-name', 'revappend', 'reverse', 'room', 'round', 

123 'row-major-aref', 'rplaca', 'rplacd', 'sbit', 'scale-float', 'schar', 

124 'search', 'second', 'set', 'set-difference', 

125 'set-dispatch-macro-character', 'set-exclusive-or', 

126 'set-macro-character', 'set-pprint-dispatch', 'set-syntax-from-char', 

127 'seventh', 'shadow', 'shadowing-import', 'shared-initialize', 

128 'short-site-name', 'signal', 'signum', 'simple-bit-vector-p', 

129 'simple-condition-format-arguments', 'simple-condition-format-control', 

130 'simple-string-p', 'simple-vector-p', 'sin', 'sinh', 'sixth', 'sleep', 

131 'slot-boundp', 'slot-exists-p', 'slot-makunbound', 'slot-missing', 

132 'slot-unbound', 'slot-value', 'software-type', 'software-version', 

133 'some', 'sort', 'special-operator-p', 'sqrt', 'stable-sort', 

134 'standard-char-p', 'store-value', 'stream-element-type', 

135 'stream-error-stream', 'stream-external-format', 'streamp', 'string', 

136 'string<', 'string<=', 'string=', 'string>', 'string>=', 'string/=', 

137 'string-capitalize', 'string-downcase', 'string-equal', 

138 'string-greaterp', 'string-left-trim', 'string-lessp', 

139 'string-not-equal', 'string-not-greaterp', 'string-not-lessp', 

140 'stringp', 'string-right-trim', 'string-trim', 'string-upcase', 

141 'sublis', 'subseq', 'subsetp', 'subst', 'subst-if', 'subst-if-not', 

142 'substitute', 'substitute-if', 'substitute-if-not', 'subtypep','svref', 

143 'sxhash', 'symbol-function', 'symbol-name', 'symbolp', 'symbol-package', 

144 'symbol-plist', 'symbol-value', 'synonym-stream-symbol', 'syntax:', 

145 'tailp', 'tan', 'tanh', 'tenth', 'terpri', 'third', 

146 'translate-logical-pathname', 'translate-pathname', 'tree-equal', 

147 'truename', 'truncate', 'two-way-stream-input-stream', 

148 'two-way-stream-output-stream', 'type-error-datum', 

149 'type-error-expected-type', 'type-of', 'typep', 'unbound-slot-instance', 

150 'unexport', 'unintern', 'union', 'unread-char', 'unuse-package', 

151 'update-instance-for-different-class', 

152 'update-instance-for-redefined-class', 'upgraded-array-element-type', 

153 'upgraded-complex-part-type', 'upper-case-p', 'use-package', 

154 'user-homedir-pathname', 'use-value', 'values', 'values-list', 'vector', 

155 'vectorp', 'vector-pop', 'vector-push', 'vector-push-extend', 'warn', 

156 'wild-pathname-p', 'write', 'write-byte', 'write-char', 'write-line', 

157 'write-sequence', 'write-string', 'write-to-string', 'yes-or-no-p', 

158 'y-or-n-p', 'zerop', 

159} 

160 

161SPECIAL_FORMS = { 

162 'block', 'catch', 'declare', 'eval-when', 'flet', 'function', 'go', 'if', 

163 'labels', 'lambda', 'let', 'let*', 'load-time-value', 'locally', 'macrolet', 

164 'multiple-value-call', 'multiple-value-prog1', 'progn', 'progv', 'quote', 

165 'return-from', 'setq', 'symbol-macrolet', 'tagbody', 'the', 'throw', 

166 'unwind-protect', 

167} 

168 

169MACROS = { 

170 'and', 'assert', 'call-method', 'case', 'ccase', 'check-type', 'cond', 

171 'ctypecase', 'decf', 'declaim', 'defclass', 'defconstant', 'defgeneric', 

172 'define-compiler-macro', 'define-condition', 'define-method-combination', 

173 'define-modify-macro', 'define-setf-expander', 'define-symbol-macro', 

174 'defmacro', 'defmethod', 'defpackage', 'defparameter', 'defsetf', 

175 'defstruct', 'deftype', 'defun', 'defvar', 'destructuring-bind', 'do', 

176 'do*', 'do-all-symbols', 'do-external-symbols', 'dolist', 'do-symbols', 

177 'dotimes', 'ecase', 'etypecase', 'formatter', 'handler-bind', 

178 'handler-case', 'ignore-errors', 'incf', 'in-package', 'lambda', 'loop', 

179 'loop-finish', 'make-method', 'multiple-value-bind', 'multiple-value-list', 

180 'multiple-value-setq', 'nth-value', 'or', 'pop', 

181 'pprint-exit-if-list-exhausted', 'pprint-logical-block', 'pprint-pop', 

182 'print-unreadable-object', 'prog', 'prog*', 'prog1', 'prog2', 'psetf', 

183 'psetq', 'push', 'pushnew', 'remf', 'restart-bind', 'restart-case', 

184 'return', 'rotatef', 'setf', 'shiftf', 'step', 'time', 'trace', 'typecase', 

185 'unless', 'untrace', 'when', 'with-accessors', 'with-compilation-unit', 

186 'with-condition-restarts', 'with-hash-table-iterator', 

187 'with-input-from-string', 'with-open-file', 'with-open-stream', 

188 'with-output-to-string', 'with-package-iterator', 'with-simple-restart', 

189 'with-slots', 'with-standard-io-syntax', 

190} 

191 

192LAMBDA_LIST_KEYWORDS = { 

193 '&allow-other-keys', '&aux', '&body', '&environment', '&key', '&optional', 

194 '&rest', '&whole', 

195} 

196 

197DECLARATIONS = { 

198 'dynamic-extent', 'ignore', 'optimize', 'ftype', 'inline', 'special', 

199 'ignorable', 'notinline', 'type', 

200} 

201 

202BUILTIN_TYPES = { 

203 'atom', 'boolean', 'base-char', 'base-string', 'bignum', 'bit', 

204 'compiled-function', 'extended-char', 'fixnum', 'keyword', 'nil', 

205 'signed-byte', 'short-float', 'single-float', 'double-float', 'long-float', 

206 'simple-array', 'simple-base-string', 'simple-bit-vector', 'simple-string', 

207 'simple-vector', 'standard-char', 'unsigned-byte', 

208 

209 # Condition Types 

210 'arithmetic-error', 'cell-error', 'condition', 'control-error', 

211 'division-by-zero', 'end-of-file', 'error', 'file-error', 

212 'floating-point-inexact', 'floating-point-overflow', 

213 'floating-point-underflow', 'floating-point-invalid-operation', 

214 'parse-error', 'package-error', 'print-not-readable', 'program-error', 

215 'reader-error', 'serious-condition', 'simple-condition', 'simple-error', 

216 'simple-type-error', 'simple-warning', 'stream-error', 'storage-condition', 

217 'style-warning', 'type-error', 'unbound-variable', 'unbound-slot', 

218 'undefined-function', 'warning', 

219} 

220 

221BUILTIN_CLASSES = { 

222 'array', 'broadcast-stream', 'bit-vector', 'built-in-class', 'character', 

223 'class', 'complex', 'concatenated-stream', 'cons', 'echo-stream', 

224 'file-stream', 'float', 'function', 'generic-function', 'hash-table', 

225 'integer', 'list', 'logical-pathname', 'method-combination', 'method', 

226 'null', 'number', 'package', 'pathname', 'ratio', 'rational', 'readtable', 

227 'real', 'random-state', 'restart', 'sequence', 'standard-class', 

228 'standard-generic-function', 'standard-method', 'standard-object', 

229 'string-stream', 'stream', 'string', 'structure-class', 'structure-object', 

230 'symbol', 'synonym-stream', 't', 'two-way-stream', 'vector', 

231}