ThirdParty/Pygments/pygments/lexers/lisp.py

changeset 4172
4f20dba37ab6
child 4697
c2e9bf425554
equal deleted inserted replaced
4170:8bc578136279 4172:4f20dba37ab6
1 # -*- coding: utf-8 -*-
2 """
3 pygments.lexers.lisp
4 ~~~~~~~~~~~~~~~~~~~~
5
6 Lexers for Lispy languages.
7
8 :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
9 :license: BSD, see LICENSE for details.
10 """
11
12 import re
13
14 from pygments.lexer import RegexLexer, include, bygroups, words, default
15 from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
16 Number, Punctuation, Literal, Error
17
18 from pygments.lexers.python import PythonLexer
19
20 __all__ = ['SchemeLexer', 'CommonLispLexer', 'HyLexer', 'RacketLexer',
21 'NewLispLexer']
22
23
24 class SchemeLexer(RegexLexer):
25 """
26 A Scheme lexer, parsing a stream and outputting the tokens
27 needed to highlight scheme code.
28 This lexer could be most probably easily subclassed to parse
29 other LISP-Dialects like Common Lisp, Emacs Lisp or AutoLisp.
30
31 This parser is checked with pastes from the LISP pastebin
32 at http://paste.lisp.org/ to cover as much syntax as possible.
33
34 It supports the full Scheme syntax as defined in R5RS.
35
36 .. versionadded:: 0.6
37 """
38 name = 'Scheme'
39 aliases = ['scheme', 'scm']
40 filenames = ['*.scm', '*.ss']
41 mimetypes = ['text/x-scheme', 'application/x-scheme']
42
43 # list of known keywords and builtins taken form vim 6.4 scheme.vim
44 # syntax file.
45 keywords = (
46 'lambda', 'define', 'if', 'else', 'cond', 'and', 'or', 'case', 'let',
47 'let*', 'letrec', 'begin', 'do', 'delay', 'set!', '=>', 'quote',
48 'quasiquote', 'unquote', 'unquote-splicing', 'define-syntax',
49 'let-syntax', 'letrec-syntax', 'syntax-rules'
50 )
51 builtins = (
52 '*', '+', '-', '/', '<', '<=', '=', '>', '>=', 'abs', 'acos', 'angle',
53 'append', 'apply', 'asin', 'assoc', 'assq', 'assv', 'atan',
54 'boolean?', 'caaaar', 'caaadr', 'caaar', 'caadar', 'caaddr', 'caadr',
55 'caar', 'cadaar', 'cadadr', 'cadar', 'caddar', 'cadddr', 'caddr',
56 'cadr', 'call-with-current-continuation', 'call-with-input-file',
57 'call-with-output-file', 'call-with-values', 'call/cc', 'car',
58 'cdaaar', 'cdaadr', 'cdaar', 'cdadar', 'cdaddr', 'cdadr', 'cdar',
59 'cddaar', 'cddadr', 'cddar', 'cdddar', 'cddddr', 'cdddr', 'cddr',
60 'cdr', 'ceiling', 'char->integer', 'char-alphabetic?', 'char-ci<=?',
61 'char-ci<?', 'char-ci=?', 'char-ci>=?', 'char-ci>?', 'char-downcase',
62 'char-lower-case?', 'char-numeric?', 'char-ready?', 'char-upcase',
63 'char-upper-case?', 'char-whitespace?', 'char<=?', 'char<?', 'char=?',
64 'char>=?', 'char>?', 'char?', 'close-input-port', 'close-output-port',
65 'complex?', 'cons', 'cos', 'current-input-port', 'current-output-port',
66 'denominator', 'display', 'dynamic-wind', 'eof-object?', 'eq?',
67 'equal?', 'eqv?', 'eval', 'even?', 'exact->inexact', 'exact?', 'exp',
68 'expt', 'floor', 'for-each', 'force', 'gcd', 'imag-part',
69 'inexact->exact', 'inexact?', 'input-port?', 'integer->char',
70 'integer?', 'interaction-environment', 'lcm', 'length', 'list',
71 'list->string', 'list->vector', 'list-ref', 'list-tail', 'list?',
72 'load', 'log', 'magnitude', 'make-polar', 'make-rectangular',
73 'make-string', 'make-vector', 'map', 'max', 'member', 'memq', 'memv',
74 'min', 'modulo', 'negative?', 'newline', 'not', 'null-environment',
75 'null?', 'number->string', 'number?', 'numerator', 'odd?',
76 'open-input-file', 'open-output-file', 'output-port?', 'pair?',
77 'peek-char', 'port?', 'positive?', 'procedure?', 'quotient',
78 'rational?', 'rationalize', 'read', 'read-char', 'real-part', 'real?',
79 'remainder', 'reverse', 'round', 'scheme-report-environment',
80 'set-car!', 'set-cdr!', 'sin', 'sqrt', 'string', 'string->list',
81 'string->number', 'string->symbol', 'string-append', 'string-ci<=?',
82 'string-ci<?', 'string-ci=?', 'string-ci>=?', 'string-ci>?',
83 'string-copy', 'string-fill!', 'string-length', 'string-ref',
84 'string-set!', 'string<=?', 'string<?', 'string=?', 'string>=?',
85 'string>?', 'string?', 'substring', 'symbol->string', 'symbol?',
86 'tan', 'transcript-off', 'transcript-on', 'truncate', 'values',
87 'vector', 'vector->list', 'vector-fill!', 'vector-length',
88 'vector-ref', 'vector-set!', 'vector?', 'with-input-from-file',
89 'with-output-to-file', 'write', 'write-char', 'zero?'
90 )
91
92 # valid names for identifiers
93 # well, names can only not consist fully of numbers
94 # but this should be good enough for now
95 valid_name = r'[\w!$%&*+,/:<=>?@^~|-]+'
96
97 tokens = {
98 'root': [
99 # the comments
100 # and going to the end of the line
101 (r';.*$', Comment.Single),
102 # multi-line comment
103 (r'#\|', Comment.Multiline, 'multiline-comment'),
104 # commented form (entire sexpr folliwng)
105 (r'#;\s*\(', Comment, 'commented-form'),
106 # signifies that the program text that follows is written with the
107 # lexical and datum syntax described in r6rs
108 (r'#!r6rs', Comment),
109
110 # whitespaces - usually not relevant
111 (r'\s+', Text),
112
113 # numbers
114 (r'-?\d+\.\d+', Number.Float),
115 (r'-?\d+', Number.Integer),
116 # support for uncommon kinds of numbers -
117 # have to figure out what the characters mean
118 # (r'(#e|#i|#b|#o|#d|#x)[\d.]+', Number),
119
120 # strings, symbols and characters
121 (r'"(\\\\|\\"|[^"])*"', String),
122 (r"'" + valid_name, String.Symbol),
123 (r"#\\([()/'\"._!ยง$%& ?=+-]|[a-zA-Z0-9]+)", String.Char),
124
125 # constants
126 (r'(#t|#f)', Name.Constant),
127
128 # special operators
129 (r"('|#|`|,@|,|\.)", Operator),
130
131 # highlight the keywords
132 ('(%s)' % '|'.join(re.escape(entry) + ' ' for entry in keywords),
133 Keyword),
134
135 # first variable in a quoted string like
136 # '(this is syntactic sugar)
137 (r"(?<='\()" + valid_name, Name.Variable),
138 (r"(?<=#\()" + valid_name, Name.Variable),
139
140 # highlight the builtins
141 ("(?<=\()(%s)" % '|'.join(re.escape(entry) + ' ' for entry in builtins),
142 Name.Builtin),
143
144 # the remaining functions
145 (r'(?<=\()' + valid_name, Name.Function),
146 # find the remaining variables
147 (valid_name, Name.Variable),
148
149 # the famous parentheses!
150 (r'(\(|\))', Punctuation),
151 (r'(\[|\])', Punctuation),
152 ],
153 'multiline-comment': [
154 (r'#\|', Comment.Multiline, '#push'),
155 (r'\|#', Comment.Multiline, '#pop'),
156 (r'[^|#]+', Comment.Multiline),
157 (r'[|#]', Comment.Multiline),
158 ],
159 'commented-form': [
160 (r'\(', Comment, '#push'),
161 (r'\)', Comment, '#pop'),
162 (r'[^()]+', Comment),
163 ],
164 }
165
166
167 class CommonLispLexer(RegexLexer):
168 """
169 A Common Lisp lexer.
170
171 .. versionadded:: 0.9
172 """
173 name = 'Common Lisp'
174 aliases = ['common-lisp', 'cl', 'lisp', 'elisp', 'emacs', 'emacs-lisp']
175 filenames = ['*.cl', '*.lisp', '*.el'] # use for Elisp too
176 mimetypes = ['text/x-common-lisp']
177
178 flags = re.IGNORECASE | re.MULTILINE
179
180 # couple of useful regexes
181
182 # characters that are not macro-characters and can be used to begin a symbol
183 nonmacro = r'\\.|[\w!$%&*+-/<=>?@\[\]^{}~]'
184 constituent = nonmacro + '|[#.:]'
185 terminated = r'(?=[ "()\'\n,;`])' # whitespace or terminating macro characters
186
187 # symbol token, reverse-engineered from hyperspec
188 # Take a deep breath...
189 symbol = r'(\|[^|]+\||(?:%s)(?:%s)*)' % (nonmacro, constituent)
190
191 def __init__(self, **options):
192 from pygments.lexers._cl_builtins import BUILTIN_FUNCTIONS, \
193 SPECIAL_FORMS, MACROS, LAMBDA_LIST_KEYWORDS, DECLARATIONS, \
194 BUILTIN_TYPES, BUILTIN_CLASSES
195 self.builtin_function = BUILTIN_FUNCTIONS
196 self.special_forms = SPECIAL_FORMS
197 self.macros = MACROS
198 self.lambda_list_keywords = LAMBDA_LIST_KEYWORDS
199 self.declarations = DECLARATIONS
200 self.builtin_types = BUILTIN_TYPES
201 self.builtin_classes = BUILTIN_CLASSES
202 RegexLexer.__init__(self, **options)
203
204 def get_tokens_unprocessed(self, text):
205 stack = ['root']
206 for index, token, value in RegexLexer.get_tokens_unprocessed(self, text, stack):
207 if token is Name.Variable:
208 if value in self.builtin_function:
209 yield index, Name.Builtin, value
210 continue
211 if value in self.special_forms:
212 yield index, Keyword, value
213 continue
214 if value in self.macros:
215 yield index, Name.Builtin, value
216 continue
217 if value in self.lambda_list_keywords:
218 yield index, Keyword, value
219 continue
220 if value in self.declarations:
221 yield index, Keyword, value
222 continue
223 if value in self.builtin_types:
224 yield index, Keyword.Type, value
225 continue
226 if value in self.builtin_classes:
227 yield index, Name.Class, value
228 continue
229 yield index, token, value
230
231 tokens = {
232 'root': [
233 default('body'),
234 ],
235 'multiline-comment': [
236 (r'#\|', Comment.Multiline, '#push'), # (cf. Hyperspec 2.4.8.19)
237 (r'\|#', Comment.Multiline, '#pop'),
238 (r'[^|#]+', Comment.Multiline),
239 (r'[|#]', Comment.Multiline),
240 ],
241 'commented-form': [
242 (r'\(', Comment.Preproc, '#push'),
243 (r'\)', Comment.Preproc, '#pop'),
244 (r'[^()]+', Comment.Preproc),
245 ],
246 'body': [
247 # whitespace
248 (r'\s+', Text),
249
250 # single-line comment
251 (r';.*$', Comment.Single),
252
253 # multi-line comment
254 (r'#\|', Comment.Multiline, 'multiline-comment'),
255
256 # encoding comment (?)
257 (r'#\d*Y.*$', Comment.Special),
258
259 # strings and characters
260 (r'"(\\.|\\\n|[^"\\])*"', String),
261 # quoting
262 (r":" + symbol, String.Symbol),
263 (r"::" + symbol, String.Symbol),
264 (r":#" + symbol, String.Symbol),
265 (r"'" + symbol, String.Symbol),
266 (r"'", Operator),
267 (r"`", Operator),
268
269 # decimal numbers
270 (r'[-+]?\d+\.?' + terminated, Number.Integer),
271 (r'[-+]?\d+/\d+' + terminated, Number),
272 (r'[-+]?(\d*\.\d+([defls][-+]?\d+)?|\d+(\.\d*)?[defls][-+]?\d+)'
273 + terminated, Number.Float),
274
275 # sharpsign strings and characters
276 (r"#\\." + terminated, String.Char),
277 (r"#\\" + symbol, String.Char),
278
279 # vector
280 (r'#\(', Operator, 'body'),
281
282 # bitstring
283 (r'#\d*\*[01]*', Literal.Other),
284
285 # uninterned symbol
286 (r'#:' + symbol, String.Symbol),
287
288 # read-time and load-time evaluation
289 (r'#[.,]', Operator),
290
291 # function shorthand
292 (r'#\'', Name.Function),
293
294 # binary rational
295 (r'#b[+-]?[01]+(/[01]+)?', Number.Bin),
296
297 # octal rational
298 (r'#o[+-]?[0-7]+(/[0-7]+)?', Number.Oct),
299
300 # hex rational
301 (r'#x[+-]?[0-9a-f]+(/[0-9a-f]+)?', Number.Hex),
302
303 # radix rational
304 (r'#\d+r[+-]?[0-9a-z]+(/[0-9a-z]+)?', Number),
305
306 # complex
307 (r'(#c)(\()', bygroups(Number, Punctuation), 'body'),
308
309 # array
310 (r'(#\d+a)(\()', bygroups(Literal.Other, Punctuation), 'body'),
311
312 # structure
313 (r'(#s)(\()', bygroups(Literal.Other, Punctuation), 'body'),
314
315 # path
316 (r'#p?"(\\.|[^"])*"', Literal.Other),
317
318 # reference
319 (r'#\d+=', Operator),
320 (r'#\d+#', Operator),
321
322 # read-time comment
323 (r'#+nil' + terminated + '\s*\(', Comment.Preproc, 'commented-form'),
324
325 # read-time conditional
326 (r'#[+-]', Operator),
327
328 # special operators that should have been parsed already
329 (r'(,@|,|\.)', Operator),
330
331 # special constants
332 (r'(t|nil)' + terminated, Name.Constant),
333
334 # functions and variables
335 (r'\*' + symbol + '\*', Name.Variable.Global),
336 (symbol, Name.Variable),
337
338 # parentheses
339 (r'\(', Punctuation, 'body'),
340 (r'\)', Punctuation, '#pop'),
341 ],
342 }
343
344
345 class HyLexer(RegexLexer):
346 """
347 Lexer for `Hy <http://hylang.org/>`_ source code.
348
349 .. versionadded:: 2.0
350 """
351 name = 'Hy'
352 aliases = ['hylang']
353 filenames = ['*.hy']
354 mimetypes = ['text/x-hy', 'application/x-hy']
355
356 special_forms = (
357 'cond', 'for', '->', '->>', 'car',
358 'cdr', 'first', 'rest', 'let', 'when', 'unless',
359 'import', 'do', 'progn', 'get', 'slice', 'assoc', 'with-decorator',
360 ',', 'list_comp', 'kwapply', '~', 'is', 'in', 'is-not', 'not-in',
361 'quasiquote', 'unquote', 'unquote-splice', 'quote', '|', '<<=', '>>=',
362 'foreach', 'while',
363 'eval-and-compile', 'eval-when-compile'
364 )
365
366 declarations = (
367 'def', 'defn', 'defun', 'defmacro', 'defclass', 'lambda', 'fn', 'setv'
368 )
369
370 hy_builtins = ()
371
372 hy_core = (
373 'cycle', 'dec', 'distinct', 'drop', 'even?', 'filter', 'inc',
374 'instance?', 'iterable?', 'iterate', 'iterator?', 'neg?',
375 'none?', 'nth', 'numeric?', 'odd?', 'pos?', 'remove', 'repeat',
376 'repeatedly', 'take', 'take_nth', 'take_while', 'zero?'
377 )
378
379 builtins = hy_builtins + hy_core
380
381 # valid names for identifiers
382 # well, names can only not consist fully of numbers
383 # but this should be good enough for now
384 valid_name = r'(?!#)[\w!$%*+<=>?/.#-]+'
385
386 def _multi_escape(entries):
387 return words(entries, suffix=' ')
388
389 tokens = {
390 'root': [
391 # the comments - always starting with semicolon
392 # and going to the end of the line
393 (r';.*$', Comment.Single),
394
395 # whitespaces - usually not relevant
396 (r'[,\s]+', Text),
397
398 # numbers
399 (r'-?\d+\.\d+', Number.Float),
400 (r'-?\d+', Number.Integer),
401 (r'0[0-7]+j?', Number.Oct),
402 (r'0[xX][a-fA-F0-9]+', Number.Hex),
403
404 # strings, symbols and characters
405 (r'"(\\\\|\\"|[^"])*"', String),
406 (r"'" + valid_name, String.Symbol),
407 (r"\\(.|[a-z]+)", String.Char),
408 (r'^(\s*)([rRuU]{,2}"""(?:.|\n)*?""")', bygroups(Text, String.Doc)),
409 (r"^(\s*)([rRuU]{,2}'''(?:.|\n)*?''')", bygroups(Text, String.Doc)),
410
411 # keywords
412 (r'::?' + valid_name, String.Symbol),
413
414 # special operators
415 (r'~@|[`\'#^~&@]', Operator),
416
417 include('py-keywords'),
418 include('py-builtins'),
419
420 # highlight the special forms
421 (_multi_escape(special_forms), Keyword),
422
423 # Technically, only the special forms are 'keywords'. The problem
424 # is that only treating them as keywords means that things like
425 # 'defn' and 'ns' need to be highlighted as builtins. This is ugly
426 # and weird for most styles. So, as a compromise we're going to
427 # highlight them as Keyword.Declarations.
428 (_multi_escape(declarations), Keyword.Declaration),
429
430 # highlight the builtins
431 (_multi_escape(builtins), Name.Builtin),
432
433 # the remaining functions
434 (r'(?<=\()' + valid_name, Name.Function),
435
436 # find the remaining variables
437 (valid_name, Name.Variable),
438
439 # Hy accepts vector notation
440 (r'(\[|\])', Punctuation),
441
442 # Hy accepts map notation
443 (r'(\{|\})', Punctuation),
444
445 # the famous parentheses!
446 (r'(\(|\))', Punctuation),
447
448 ],
449 'py-keywords': PythonLexer.tokens['keywords'],
450 'py-builtins': PythonLexer.tokens['builtins'],
451 }
452
453 def analyse_text(text):
454 if '(import ' in text or '(defn ' in text:
455 return 0.9
456
457
458 class RacketLexer(RegexLexer):
459 """
460 Lexer for `Racket <http://racket-lang.org/>`_ source code (formerly
461 known as PLT Scheme).
462
463 .. versionadded:: 1.6
464 """
465
466 name = 'Racket'
467 aliases = ['racket', 'rkt']
468 filenames = ['*.rkt', '*.rktd', '*.rktl']
469 mimetypes = ['text/x-racket', 'application/x-racket']
470
471 # Generated by example.rkt
472 _keywords = (
473 '#%app', '#%datum', '#%declare', '#%expression', '#%module-begin',
474 '#%plain-app', '#%plain-lambda', '#%plain-module-begin',
475 '#%printing-module-begin', '#%provide', '#%require',
476 '#%stratified-body', '#%top', '#%top-interaction',
477 '#%variable-reference', '->', '->*', '->*m', '->d', '->dm', '->i',
478 '->m', '...', ':do-in', '==', '=>', '_', 'absent', 'abstract',
479 'all-defined-out', 'all-from-out', 'and', 'any', 'augment', 'augment*',
480 'augment-final', 'augment-final*', 'augride', 'augride*', 'begin',
481 'begin-for-syntax', 'begin0', 'case', 'case->', 'case->m',
482 'case-lambda', 'class', 'class*', 'class-field-accessor',
483 'class-field-mutator', 'class/c', 'class/derived', 'combine-in',
484 'combine-out', 'command-line', 'compound-unit', 'compound-unit/infer',
485 'cond', 'contract', 'contract-out', 'contract-struct', 'contracted',
486 'define', 'define-compound-unit', 'define-compound-unit/infer',
487 'define-contract-struct', 'define-custom-hash-types',
488 'define-custom-set-types', 'define-for-syntax',
489 'define-local-member-name', 'define-logger', 'define-match-expander',
490 'define-member-name', 'define-module-boundary-contract',
491 'define-namespace-anchor', 'define-opt/c', 'define-sequence-syntax',
492 'define-serializable-class', 'define-serializable-class*',
493 'define-signature', 'define-signature-form', 'define-struct',
494 'define-struct/contract', 'define-struct/derived', 'define-syntax',
495 'define-syntax-rule', 'define-syntaxes', 'define-unit',
496 'define-unit-binding', 'define-unit-from-context',
497 'define-unit/contract', 'define-unit/new-import-export',
498 'define-unit/s', 'define-values', 'define-values-for-export',
499 'define-values-for-syntax', 'define-values/invoke-unit',
500 'define-values/invoke-unit/infer', 'define/augment',
501 'define/augment-final', 'define/augride', 'define/contract',
502 'define/final-prop', 'define/match', 'define/overment',
503 'define/override', 'define/override-final', 'define/private',
504 'define/public', 'define/public-final', 'define/pubment',
505 'define/subexpression-pos-prop', 'delay', 'delay/idle', 'delay/name',
506 'delay/strict', 'delay/sync', 'delay/thread', 'do', 'else', 'except',
507 'except-in', 'except-out', 'export', 'extends', 'failure-cont',
508 'false', 'false/c', 'field', 'field-bound?', 'file',
509 'flat-murec-contract', 'flat-rec-contract', 'for', 'for*', 'for*/and',
510 'for*/first', 'for*/fold', 'for*/fold/derived', 'for*/hash',
511 'for*/hasheq', 'for*/hasheqv', 'for*/last', 'for*/list', 'for*/lists',
512 'for*/mutable-set', 'for*/mutable-seteq', 'for*/mutable-seteqv',
513 'for*/or', 'for*/product', 'for*/set', 'for*/seteq', 'for*/seteqv',
514 'for*/sum', 'for*/vector', 'for*/weak-set', 'for*/weak-seteq',
515 'for*/weak-seteqv', 'for-label', 'for-meta', 'for-syntax',
516 'for-template', 'for/and', 'for/first', 'for/fold', 'for/fold/derived',
517 'for/hash', 'for/hasheq', 'for/hasheqv', 'for/last', 'for/list',
518 'for/lists', 'for/mutable-set', 'for/mutable-seteq',
519 'for/mutable-seteqv', 'for/or', 'for/product', 'for/set', 'for/seteq',
520 'for/seteqv', 'for/sum', 'for/vector', 'for/weak-set',
521 'for/weak-seteq', 'for/weak-seteqv', 'gen:custom-write', 'gen:dict',
522 'gen:equal+hash', 'gen:set', 'gen:stream', 'generic', 'get-field',
523 'if', 'implies', 'import', 'include', 'include-at/relative-to',
524 'include-at/relative-to/reader', 'include/reader', 'inherit',
525 'inherit-field', 'inherit/inner', 'inherit/super', 'init',
526 'init-depend', 'init-field', 'init-rest', 'inner', 'inspect',
527 'instantiate', 'interface', 'interface*', 'invoke-unit',
528 'invoke-unit/infer', 'lambda', 'lazy', 'let', 'let*', 'let*-values',
529 'let-syntax', 'let-syntaxes', 'let-values', 'let/cc', 'let/ec',
530 'letrec', 'letrec-syntax', 'letrec-syntaxes', 'letrec-syntaxes+values',
531 'letrec-values', 'lib', 'link', 'local', 'local-require', 'log-debug',
532 'log-error', 'log-fatal', 'log-info', 'log-warning', 'match', 'match*',
533 'match*/derived', 'match-define', 'match-define-values',
534 'match-lambda', 'match-lambda*', 'match-lambda**', 'match-let',
535 'match-let*', 'match-let*-values', 'match-let-values', 'match-letrec',
536 'match/derived', 'match/values', 'member-name-key', 'method-contract?',
537 'mixin', 'module', 'module*', 'module+', 'nand', 'new', 'nor',
538 'object-contract', 'object/c', 'only', 'only-in', 'only-meta-in',
539 'open', 'opt/c', 'or', 'overment', 'overment*', 'override',
540 'override*', 'override-final', 'override-final*', 'parameterize',
541 'parameterize*', 'parameterize-break', 'parametric->/c', 'place',
542 'place*', 'planet', 'prefix', 'prefix-in', 'prefix-out', 'private',
543 'private*', 'prompt-tag/c', 'protect-out', 'provide',
544 'provide-signature-elements', 'provide/contract', 'public', 'public*',
545 'public-final', 'public-final*', 'pubment', 'pubment*', 'quasiquote',
546 'quasisyntax', 'quasisyntax/loc', 'quote', 'quote-syntax',
547 'quote-syntax/prune', 'recontract-out', 'recursive-contract',
548 'relative-in', 'rename', 'rename-in', 'rename-inner', 'rename-out',
549 'rename-super', 'require', 'send', 'send*', 'send+', 'send-generic',
550 'send/apply', 'send/keyword-apply', 'set!', 'set!-values',
551 'set-field!', 'shared', 'stream', 'stream-cons', 'struct', 'struct*',
552 'struct-copy', 'struct-field-index', 'struct-out', 'struct/c',
553 'struct/ctc', 'struct/dc', 'submod', 'super', 'super-instantiate',
554 'super-make-object', 'super-new', 'syntax', 'syntax-case',
555 'syntax-case*', 'syntax-id-rules', 'syntax-rules', 'syntax/loc', 'tag',
556 'this', 'this%', 'thunk', 'thunk*', 'time', 'unconstrained-domain->',
557 'unit', 'unit-from-context', 'unit/c', 'unit/new-import-export',
558 'unit/s', 'unless', 'unquote', 'unquote-splicing', 'unsyntax',
559 'unsyntax-splicing', 'values/drop', 'when', 'with-continuation-mark',
560 'with-contract', 'with-handlers', 'with-handlers*', 'with-method',
561 'with-syntax', u'ฮป'
562 )
563
564 # Generated by example.rkt
565 _builtins = (
566 '*', '+', '-', '/', '<', '</c', '<=', '<=/c', '=', '=/c', '>', '>/c',
567 '>=', '>=/c', 'abort-current-continuation', 'abs', 'absolute-path?',
568 'acos', 'add-between', 'add1', 'alarm-evt', 'always-evt', 'and/c',
569 'andmap', 'angle', 'any/c', 'append', 'append*', 'append-map', 'apply',
570 'argmax', 'argmin', 'arithmetic-shift', 'arity-at-least',
571 'arity-at-least-value', 'arity-at-least?', 'arity-checking-wrapper',
572 'arity-includes?', 'arity=?', 'asin', 'assf', 'assoc', 'assq', 'assv',
573 'atan', 'bad-number-of-results', 'banner', 'base->-doms/c',
574 'base->-rngs/c', 'base->?', 'between/c', 'bitwise-and',
575 'bitwise-bit-field', 'bitwise-bit-set?', 'bitwise-ior', 'bitwise-not',
576 'bitwise-xor', 'blame-add-car-context', 'blame-add-cdr-context',
577 'blame-add-context', 'blame-add-missing-party',
578 'blame-add-nth-arg-context', 'blame-add-or-context',
579 'blame-add-range-context', 'blame-add-unknown-context',
580 'blame-context', 'blame-contract', 'blame-fmt->-string',
581 'blame-negative', 'blame-original?', 'blame-positive',
582 'blame-replace-negative', 'blame-source', 'blame-swap',
583 'blame-swapped?', 'blame-update', 'blame-value', 'blame?', 'boolean=?',
584 'boolean?', 'bound-identifier=?', 'box', 'box-cas!', 'box-immutable',
585 'box-immutable/c', 'box/c', 'box?', 'break-enabled', 'break-thread',
586 'build-chaperone-contract-property', 'build-compound-type-name',
587 'build-contract-property', 'build-flat-contract-property',
588 'build-list', 'build-path', 'build-path/convention-type',
589 'build-string', 'build-vector', 'byte-pregexp', 'byte-pregexp?',
590 'byte-ready?', 'byte-regexp', 'byte-regexp?', 'byte?', 'bytes',
591 'bytes->immutable-bytes', 'bytes->list', 'bytes->path',
592 'bytes->path-element', 'bytes->string/latin-1', 'bytes->string/locale',
593 'bytes->string/utf-8', 'bytes-append', 'bytes-append*',
594 'bytes-close-converter', 'bytes-convert', 'bytes-convert-end',
595 'bytes-converter?', 'bytes-copy', 'bytes-copy!',
596 'bytes-environment-variable-name?', 'bytes-fill!', 'bytes-join',
597 'bytes-length', 'bytes-no-nuls?', 'bytes-open-converter', 'bytes-ref',
598 'bytes-set!', 'bytes-utf-8-index', 'bytes-utf-8-length',
599 'bytes-utf-8-ref', 'bytes<?', 'bytes=?', 'bytes>?', 'bytes?', 'caaaar',
600 'caaadr', 'caaar', 'caadar', 'caaddr', 'caadr', 'caar', 'cadaar',
601 'cadadr', 'cadar', 'caddar', 'cadddr', 'caddr', 'cadr',
602 'call-in-nested-thread', 'call-with-atomic-output-file',
603 'call-with-break-parameterization',
604 'call-with-composable-continuation', 'call-with-continuation-barrier',
605 'call-with-continuation-prompt', 'call-with-current-continuation',
606 'call-with-default-reading-parameterization',
607 'call-with-escape-continuation', 'call-with-exception-handler',
608 'call-with-file-lock/timeout', 'call-with-immediate-continuation-mark',
609 'call-with-input-bytes', 'call-with-input-file',
610 'call-with-input-file*', 'call-with-input-string',
611 'call-with-output-bytes', 'call-with-output-file',
612 'call-with-output-file*', 'call-with-output-string',
613 'call-with-parameterization', 'call-with-semaphore',
614 'call-with-semaphore/enable-break', 'call-with-values', 'call/cc',
615 'call/ec', 'car', 'cdaaar', 'cdaadr', 'cdaar', 'cdadar', 'cdaddr',
616 'cdadr', 'cdar', 'cddaar', 'cddadr', 'cddar', 'cdddar', 'cddddr',
617 'cdddr', 'cddr', 'cdr', 'ceiling', 'channel-get', 'channel-put',
618 'channel-put-evt', 'channel-put-evt?', 'channel-try-get', 'channel/c',
619 'channel?', 'chaperone-box', 'chaperone-channel',
620 'chaperone-continuation-mark-key', 'chaperone-contract-property?',
621 'chaperone-contract?', 'chaperone-evt', 'chaperone-hash',
622 'chaperone-of?', 'chaperone-procedure', 'chaperone-prompt-tag',
623 'chaperone-struct', 'chaperone-struct-type', 'chaperone-vector',
624 'chaperone?', 'char->integer', 'char-alphabetic?', 'char-blank?',
625 'char-ci<=?', 'char-ci<?', 'char-ci=?', 'char-ci>=?', 'char-ci>?',
626 'char-downcase', 'char-foldcase', 'char-general-category',
627 'char-graphic?', 'char-iso-control?', 'char-lower-case?',
628 'char-numeric?', 'char-punctuation?', 'char-ready?', 'char-symbolic?',
629 'char-title-case?', 'char-titlecase', 'char-upcase',
630 'char-upper-case?', 'char-utf-8-length', 'char-whitespace?', 'char<=?',
631 'char<?', 'char=?', 'char>=?', 'char>?', 'char?',
632 'check-duplicate-identifier', 'checked-procedure-check-and-extract',
633 'choice-evt', 'class->interface', 'class-info', 'class?',
634 'cleanse-path', 'close-input-port', 'close-output-port',
635 'coerce-chaperone-contract', 'coerce-chaperone-contracts',
636 'coerce-contract', 'coerce-contract/f', 'coerce-contracts',
637 'coerce-flat-contract', 'coerce-flat-contracts', 'collect-garbage',
638 'collection-file-path', 'collection-path', 'compile',
639 'compile-allow-set!-undefined', 'compile-context-preservation-enabled',
640 'compile-enforce-module-constants', 'compile-syntax',
641 'compiled-expression?', 'compiled-module-expression?',
642 'complete-path?', 'complex?', 'compose', 'compose1', 'conjugate',
643 'cons', 'cons/c', 'cons?', 'const', 'continuation-mark-key/c',
644 'continuation-mark-key?', 'continuation-mark-set->context',
645 'continuation-mark-set->list', 'continuation-mark-set->list*',
646 'continuation-mark-set-first', 'continuation-mark-set?',
647 'continuation-marks', 'continuation-prompt-available?',
648 'continuation-prompt-tag?', 'continuation?',
649 'contract-continuation-mark-key', 'contract-first-order',
650 'contract-first-order-passes?', 'contract-name', 'contract-proc',
651 'contract-projection', 'contract-property?',
652 'contract-random-generate', 'contract-stronger?',
653 'contract-struct-exercise', 'contract-struct-generate',
654 'contract-val-first-projection', 'contract?', 'convert-stream',
655 'copy-directory/files', 'copy-file', 'copy-port', 'cos', 'cosh',
656 'count', 'current-blame-format', 'current-break-parameterization',
657 'current-code-inspector', 'current-command-line-arguments',
658 'current-compile', 'current-compiled-file-roots',
659 'current-continuation-marks', 'current-contract-region',
660 'current-custodian', 'current-directory', 'current-directory-for-user',
661 'current-drive', 'current-environment-variables', 'current-error-port',
662 'current-eval', 'current-evt-pseudo-random-generator',
663 'current-future', 'current-gc-milliseconds',
664 'current-get-interaction-input-port', 'current-inexact-milliseconds',
665 'current-input-port', 'current-inspector',
666 'current-library-collection-links', 'current-library-collection-paths',
667 'current-load', 'current-load-extension',
668 'current-load-relative-directory', 'current-load/use-compiled',
669 'current-locale', 'current-logger', 'current-memory-use',
670 'current-milliseconds', 'current-module-declare-name',
671 'current-module-declare-source', 'current-module-name-resolver',
672 'current-module-path-for-load', 'current-namespace',
673 'current-output-port', 'current-parameterization',
674 'current-preserved-thread-cell-values', 'current-print',
675 'current-process-milliseconds', 'current-prompt-read',
676 'current-pseudo-random-generator', 'current-read-interaction',
677 'current-reader-guard', 'current-readtable', 'current-seconds',
678 'current-security-guard', 'current-subprocess-custodian-mode',
679 'current-thread', 'current-thread-group',
680 'current-thread-initial-stack-size',
681 'current-write-relative-directory', 'curry', 'curryr',
682 'custodian-box-value', 'custodian-box?', 'custodian-limit-memory',
683 'custodian-managed-list', 'custodian-memory-accounting-available?',
684 'custodian-require-memory', 'custodian-shutdown-all', 'custodian?',
685 'custom-print-quotable-accessor', 'custom-print-quotable?',
686 'custom-write-accessor', 'custom-write-property-proc', 'custom-write?',
687 'date', 'date*', 'date*-nanosecond', 'date*-time-zone-name', 'date*?',
688 'date-day', 'date-dst?', 'date-hour', 'date-minute', 'date-month',
689 'date-second', 'date-time-zone-offset', 'date-week-day', 'date-year',
690 'date-year-day', 'date?', 'datum->syntax', 'datum-intern-literal',
691 'default-continuation-prompt-tag', 'degrees->radians',
692 'delete-directory', 'delete-directory/files', 'delete-file',
693 'denominator', 'dict->list', 'dict-can-functional-set?',
694 'dict-can-remove-keys?', 'dict-clear', 'dict-clear!', 'dict-copy',
695 'dict-count', 'dict-empty?', 'dict-for-each', 'dict-has-key?',
696 'dict-implements/c', 'dict-implements?', 'dict-iter-contract',
697 'dict-iterate-first', 'dict-iterate-key', 'dict-iterate-next',
698 'dict-iterate-value', 'dict-key-contract', 'dict-keys', 'dict-map',
699 'dict-mutable?', 'dict-ref', 'dict-ref!', 'dict-remove',
700 'dict-remove!', 'dict-set', 'dict-set!', 'dict-set*', 'dict-set*!',
701 'dict-update', 'dict-update!', 'dict-value-contract', 'dict-values',
702 'dict?', 'directory-exists?', 'directory-list', 'display',
703 'display-lines', 'display-lines-to-file', 'display-to-file',
704 'displayln', 'double-flonum?', 'drop', 'drop-right', 'dropf',
705 'dropf-right', 'dump-memory-stats', 'dup-input-port',
706 'dup-output-port', 'dynamic-get-field', 'dynamic-place',
707 'dynamic-place*', 'dynamic-require', 'dynamic-require-for-syntax',
708 'dynamic-send', 'dynamic-set-field!', 'dynamic-wind', 'eighth',
709 'empty', 'empty-sequence', 'empty-stream', 'empty?',
710 'environment-variables-copy', 'environment-variables-names',
711 'environment-variables-ref', 'environment-variables-set!',
712 'environment-variables?', 'eof', 'eof-evt', 'eof-object?',
713 'ephemeron-value', 'ephemeron?', 'eprintf', 'eq-contract-val',
714 'eq-contract?', 'eq-hash-code', 'eq?', 'equal-contract-val',
715 'equal-contract?', 'equal-hash-code', 'equal-secondary-hash-code',
716 'equal<%>', 'equal?', 'equal?/recur', 'eqv-hash-code', 'eqv?', 'error',
717 'error-display-handler', 'error-escape-handler',
718 'error-print-context-length', 'error-print-source-location',
719 'error-print-width', 'error-value->string-handler', 'eval',
720 'eval-jit-enabled', 'eval-syntax', 'even?', 'evt/c', 'evt?',
721 'exact->inexact', 'exact-ceiling', 'exact-floor', 'exact-integer?',
722 'exact-nonnegative-integer?', 'exact-positive-integer?', 'exact-round',
723 'exact-truncate', 'exact?', 'executable-yield-handler', 'exit',
724 'exit-handler', 'exn', 'exn-continuation-marks', 'exn-message',
725 'exn:break', 'exn:break-continuation', 'exn:break:hang-up',
726 'exn:break:hang-up?', 'exn:break:terminate', 'exn:break:terminate?',
727 'exn:break?', 'exn:fail', 'exn:fail:contract',
728 'exn:fail:contract:arity', 'exn:fail:contract:arity?',
729 'exn:fail:contract:blame', 'exn:fail:contract:blame-object',
730 'exn:fail:contract:blame?', 'exn:fail:contract:continuation',
731 'exn:fail:contract:continuation?', 'exn:fail:contract:divide-by-zero',
732 'exn:fail:contract:divide-by-zero?',
733 'exn:fail:contract:non-fixnum-result',
734 'exn:fail:contract:non-fixnum-result?', 'exn:fail:contract:variable',
735 'exn:fail:contract:variable-id', 'exn:fail:contract:variable?',
736 'exn:fail:contract?', 'exn:fail:filesystem',
737 'exn:fail:filesystem:errno', 'exn:fail:filesystem:errno-errno',
738 'exn:fail:filesystem:errno?', 'exn:fail:filesystem:exists',
739 'exn:fail:filesystem:exists?', 'exn:fail:filesystem:missing-module',
740 'exn:fail:filesystem:missing-module-path',
741 'exn:fail:filesystem:missing-module?', 'exn:fail:filesystem:version',
742 'exn:fail:filesystem:version?', 'exn:fail:filesystem?',
743 'exn:fail:network', 'exn:fail:network:errno',
744 'exn:fail:network:errno-errno', 'exn:fail:network:errno?',
745 'exn:fail:network?', 'exn:fail:object', 'exn:fail:object?',
746 'exn:fail:out-of-memory', 'exn:fail:out-of-memory?', 'exn:fail:read',
747 'exn:fail:read-srclocs', 'exn:fail:read:eof', 'exn:fail:read:eof?',
748 'exn:fail:read:non-char', 'exn:fail:read:non-char?', 'exn:fail:read?',
749 'exn:fail:syntax', 'exn:fail:syntax-exprs',
750 'exn:fail:syntax:missing-module',
751 'exn:fail:syntax:missing-module-path',
752 'exn:fail:syntax:missing-module?', 'exn:fail:syntax:unbound',
753 'exn:fail:syntax:unbound?', 'exn:fail:syntax?', 'exn:fail:unsupported',
754 'exn:fail:unsupported?', 'exn:fail:user', 'exn:fail:user?',
755 'exn:fail?', 'exn:misc:match?', 'exn:missing-module-accessor',
756 'exn:missing-module?', 'exn:srclocs-accessor', 'exn:srclocs?', 'exn?',
757 'exp', 'expand', 'expand-once', 'expand-syntax', 'expand-syntax-once',
758 'expand-syntax-to-top-form', 'expand-to-top-form', 'expand-user-path',
759 'explode-path', 'expt', 'externalizable<%>', 'false?', 'field-names',
760 'fifth', 'file->bytes', 'file->bytes-lines', 'file->lines',
761 'file->list', 'file->string', 'file->value', 'file-exists?',
762 'file-name-from-path', 'file-or-directory-identity',
763 'file-or-directory-modify-seconds', 'file-or-directory-permissions',
764 'file-position', 'file-position*', 'file-size',
765 'file-stream-buffer-mode', 'file-stream-port?', 'file-truncate',
766 'filename-extension', 'filesystem-change-evt',
767 'filesystem-change-evt-cancel', 'filesystem-change-evt?',
768 'filesystem-root-list', 'filter', 'filter-map', 'filter-not',
769 'filter-read-input-port', 'find-executable-path', 'find-files',
770 'find-library-collection-links', 'find-library-collection-paths',
771 'find-relative-path', 'find-system-path', 'findf', 'first', 'fixnum?',
772 'flat-contract', 'flat-contract-predicate', 'flat-contract-property?',
773 'flat-contract?', 'flat-named-contract', 'flatten',
774 'floating-point-bytes->real', 'flonum?', 'floor', 'flush-output',
775 'fold-files', 'foldl', 'foldr', 'for-each', 'force', 'format',
776 'fourth', 'fprintf', 'free-identifier=?', 'free-label-identifier=?',
777 'free-template-identifier=?', 'free-transformer-identifier=?',
778 'fsemaphore-count', 'fsemaphore-post', 'fsemaphore-try-wait?',
779 'fsemaphore-wait', 'fsemaphore?', 'future', 'future?',
780 'futures-enabled?', 'gcd', 'generate-member-key',
781 'generate-temporaries', 'generic-set?', 'generic?', 'gensym',
782 'get-output-bytes', 'get-output-string', 'get-preference',
783 'get/build-val-first-projection', 'getenv',
784 'global-port-print-handler', 'group-execute-bit', 'group-read-bit',
785 'group-write-bit', 'guard-evt', 'handle-evt', 'handle-evt?',
786 'has-contract?', 'hash', 'hash->list', 'hash-clear', 'hash-clear!',
787 'hash-copy', 'hash-copy-clear', 'hash-count', 'hash-empty?',
788 'hash-eq?', 'hash-equal?', 'hash-eqv?', 'hash-for-each',
789 'hash-has-key?', 'hash-iterate-first', 'hash-iterate-key',
790 'hash-iterate-next', 'hash-iterate-value', 'hash-keys', 'hash-map',
791 'hash-placeholder?', 'hash-ref', 'hash-ref!', 'hash-remove',
792 'hash-remove!', 'hash-set', 'hash-set!', 'hash-set*', 'hash-set*!',
793 'hash-update', 'hash-update!', 'hash-values', 'hash-weak?', 'hash/c',
794 'hash?', 'hasheq', 'hasheqv', 'identifier-binding',
795 'identifier-binding-symbol', 'identifier-label-binding',
796 'identifier-prune-lexical-context',
797 'identifier-prune-to-source-module',
798 'identifier-remove-from-definition-context',
799 'identifier-template-binding', 'identifier-transformer-binding',
800 'identifier?', 'identity', 'imag-part', 'immutable?',
801 'impersonate-box', 'impersonate-channel',
802 'impersonate-continuation-mark-key', 'impersonate-hash',
803 'impersonate-procedure', 'impersonate-prompt-tag',
804 'impersonate-struct', 'impersonate-vector', 'impersonator-contract?',
805 'impersonator-ephemeron', 'impersonator-of?',
806 'impersonator-prop:application-mark', 'impersonator-prop:contracted',
807 'impersonator-property-accessor-procedure?', 'impersonator-property?',
808 'impersonator?', 'implementation?', 'implementation?/c', 'in-bytes',
809 'in-bytes-lines', 'in-cycle', 'in-dict', 'in-dict-keys',
810 'in-dict-pairs', 'in-dict-values', 'in-directory', 'in-hash',
811 'in-hash-keys', 'in-hash-pairs', 'in-hash-values', 'in-indexed',
812 'in-input-port-bytes', 'in-input-port-chars', 'in-lines', 'in-list',
813 'in-mlist', 'in-naturals', 'in-parallel', 'in-permutations', 'in-port',
814 'in-producer', 'in-range', 'in-sequences', 'in-set', 'in-stream',
815 'in-string', 'in-value', 'in-values*-sequence', 'in-values-sequence',
816 'in-vector', 'inexact->exact', 'inexact-real?', 'inexact?',
817 'infinite?', 'input-port-append', 'input-port?', 'inspector?',
818 'instanceof/c', 'integer->char', 'integer->integer-bytes',
819 'integer-bytes->integer', 'integer-in', 'integer-length',
820 'integer-sqrt', 'integer-sqrt/remainder', 'integer?',
821 'interface->method-names', 'interface-extension?', 'interface?',
822 'internal-definition-context-seal', 'internal-definition-context?',
823 'is-a?', 'is-a?/c', 'keyword->string', 'keyword-apply', 'keyword<?',
824 'keyword?', 'keywords-match', 'kill-thread', 'last', 'last-pair',
825 'lcm', 'length', 'liberal-define-context?', 'link-exists?', 'list',
826 'list*', 'list->bytes', 'list->mutable-set', 'list->mutable-seteq',
827 'list->mutable-seteqv', 'list->set', 'list->seteq', 'list->seteqv',
828 'list->string', 'list->vector', 'list->weak-set', 'list->weak-seteq',
829 'list->weak-seteqv', 'list-ref', 'list-tail', 'list/c', 'list?',
830 'listof', 'load', 'load-extension', 'load-on-demand-enabled',
831 'load-relative', 'load-relative-extension', 'load/cd',
832 'load/use-compiled', 'local-expand', 'local-expand/capture-lifts',
833 'local-transformer-expand', 'local-transformer-expand/capture-lifts',
834 'locale-string-encoding', 'log', 'log-level?', 'log-max-level',
835 'log-message', 'log-receiver?', 'logger-name', 'logger?', 'magnitude',
836 'make-arity-at-least', 'make-base-empty-namespace',
837 'make-base-namespace', 'make-bytes', 'make-channel',
838 'make-chaperone-contract', 'make-continuation-mark-key',
839 'make-continuation-prompt-tag', 'make-contract', 'make-custodian',
840 'make-custodian-box', 'make-custom-hash', 'make-custom-hash-types',
841 'make-custom-set', 'make-custom-set-types', 'make-date', 'make-date*',
842 'make-derived-parameter', 'make-directory', 'make-directory*',
843 'make-do-sequence', 'make-empty-namespace',
844 'make-environment-variables', 'make-ephemeron', 'make-exn',
845 'make-exn:break', 'make-exn:break:hang-up', 'make-exn:break:terminate',
846 'make-exn:fail', 'make-exn:fail:contract',
847 'make-exn:fail:contract:arity', 'make-exn:fail:contract:blame',
848 'make-exn:fail:contract:continuation',
849 'make-exn:fail:contract:divide-by-zero',
850 'make-exn:fail:contract:non-fixnum-result',
851 'make-exn:fail:contract:variable', 'make-exn:fail:filesystem',
852 'make-exn:fail:filesystem:errno', 'make-exn:fail:filesystem:exists',
853 'make-exn:fail:filesystem:missing-module',
854 'make-exn:fail:filesystem:version', 'make-exn:fail:network',
855 'make-exn:fail:network:errno', 'make-exn:fail:object',
856 'make-exn:fail:out-of-memory', 'make-exn:fail:read',
857 'make-exn:fail:read:eof', 'make-exn:fail:read:non-char',
858 'make-exn:fail:syntax', 'make-exn:fail:syntax:missing-module',
859 'make-exn:fail:syntax:unbound', 'make-exn:fail:unsupported',
860 'make-exn:fail:user', 'make-file-or-directory-link',
861 'make-flat-contract', 'make-fsemaphore', 'make-generic',
862 'make-handle-get-preference-locked', 'make-hash',
863 'make-hash-placeholder', 'make-hasheq', 'make-hasheq-placeholder',
864 'make-hasheqv', 'make-hasheqv-placeholder',
865 'make-immutable-custom-hash', 'make-immutable-hash',
866 'make-immutable-hasheq', 'make-immutable-hasheqv',
867 'make-impersonator-property', 'make-input-port',
868 'make-input-port/read-to-peek', 'make-inspector',
869 'make-keyword-procedure', 'make-known-char-range-list',
870 'make-limited-input-port', 'make-list', 'make-lock-file-name',
871 'make-log-receiver', 'make-logger', 'make-mixin-contract',
872 'make-mutable-custom-set', 'make-none/c', 'make-object',
873 'make-output-port', 'make-parameter', 'make-phantom-bytes',
874 'make-pipe', 'make-pipe-with-specials', 'make-placeholder',
875 'make-polar', 'make-prefab-struct', 'make-primitive-class',
876 'make-proj-contract', 'make-pseudo-random-generator',
877 'make-reader-graph', 'make-readtable', 'make-rectangular',
878 'make-rename-transformer', 'make-resolved-module-path',
879 'make-security-guard', 'make-semaphore', 'make-set!-transformer',
880 'make-shared-bytes', 'make-sibling-inspector', 'make-special-comment',
881 'make-srcloc', 'make-string', 'make-struct-field-accessor',
882 'make-struct-field-mutator', 'make-struct-type',
883 'make-struct-type-property', 'make-syntax-delta-introducer',
884 'make-syntax-introducer', 'make-temporary-file',
885 'make-tentative-pretty-print-output-port', 'make-thread-cell',
886 'make-thread-group', 'make-vector', 'make-weak-box',
887 'make-weak-custom-hash', 'make-weak-custom-set', 'make-weak-hash',
888 'make-weak-hasheq', 'make-weak-hasheqv', 'make-will-executor', 'map',
889 'match-equality-test', 'matches-arity-exactly?', 'max', 'mcar', 'mcdr',
890 'mcons', 'member', 'member-name-key-hash-code', 'member-name-key=?',
891 'member-name-key?', 'memf', 'memq', 'memv', 'merge-input',
892 'method-in-interface?', 'min', 'mixin-contract', 'module->exports',
893 'module->imports', 'module->language-info', 'module->namespace',
894 'module-compiled-cross-phase-persistent?', 'module-compiled-exports',
895 'module-compiled-imports', 'module-compiled-language-info',
896 'module-compiled-name', 'module-compiled-submodules',
897 'module-declared?', 'module-path-index-join',
898 'module-path-index-resolve', 'module-path-index-split',
899 'module-path-index-submodule', 'module-path-index?', 'module-path?',
900 'module-predefined?', 'module-provide-protected?', 'modulo', 'mpair?',
901 'mutable-set', 'mutable-seteq', 'mutable-seteqv', 'n->th',
902 'nack-guard-evt', 'namespace-anchor->empty-namespace',
903 'namespace-anchor->namespace', 'namespace-anchor?',
904 'namespace-attach-module', 'namespace-attach-module-declaration',
905 'namespace-base-phase', 'namespace-mapped-symbols',
906 'namespace-module-identifier', 'namespace-module-registry',
907 'namespace-require', 'namespace-require/constant',
908 'namespace-require/copy', 'namespace-require/expansion-time',
909 'namespace-set-variable-value!', 'namespace-symbol->identifier',
910 'namespace-syntax-introduce', 'namespace-undefine-variable!',
911 'namespace-unprotect-module', 'namespace-variable-value', 'namespace?',
912 'nan?', 'natural-number/c', 'negate', 'negative?', 'never-evt',
913 u'new-โˆ€/c', u'new-โˆƒ/c', 'newline', 'ninth', 'non-empty-listof',
914 'none/c', 'normal-case-path', 'normalize-arity', 'normalize-path',
915 'normalized-arity?', 'not', 'not/c', 'null', 'null?', 'number->string',
916 'number?', 'numerator', 'object%', 'object->vector', 'object-info',
917 'object-interface', 'object-method-arity-includes?', 'object-name',
918 'object=?', 'object?', 'odd?', 'one-of/c', 'open-input-bytes',
919 'open-input-file', 'open-input-output-file', 'open-input-string',
920 'open-output-bytes', 'open-output-file', 'open-output-nowhere',
921 'open-output-string', 'or/c', 'order-of-magnitude', 'ormap',
922 'other-execute-bit', 'other-read-bit', 'other-write-bit',
923 'output-port?', 'pair?', 'parameter-procedure=?', 'parameter/c',
924 'parameter?', 'parameterization?', 'parse-command-line', 'partition',
925 'path->bytes', 'path->complete-path', 'path->directory-path',
926 'path->string', 'path-add-suffix', 'path-convention-type',
927 'path-element->bytes', 'path-element->string', 'path-element?',
928 'path-for-some-system?', 'path-list-string->path-list', 'path-only',
929 'path-replace-suffix', 'path-string?', 'path<?', 'path?',
930 'pathlist-closure', 'peek-byte', 'peek-byte-or-special', 'peek-bytes',
931 'peek-bytes!', 'peek-bytes!-evt', 'peek-bytes-avail!',
932 'peek-bytes-avail!*', 'peek-bytes-avail!-evt',
933 'peek-bytes-avail!/enable-break', 'peek-bytes-evt', 'peek-char',
934 'peek-char-or-special', 'peek-string', 'peek-string!',
935 'peek-string!-evt', 'peek-string-evt', 'peeking-input-port',
936 'permutations', 'phantom-bytes?', 'pi', 'pi.f', 'pipe-content-length',
937 'place-break', 'place-channel', 'place-channel-get',
938 'place-channel-put', 'place-channel-put/get', 'place-channel?',
939 'place-dead-evt', 'place-enabled?', 'place-kill', 'place-location?',
940 'place-message-allowed?', 'place-sleep', 'place-wait', 'place?',
941 'placeholder-get', 'placeholder-set!', 'placeholder?',
942 'poll-guard-evt', 'port->bytes', 'port->bytes-lines', 'port->lines',
943 'port->list', 'port->string', 'port-closed-evt', 'port-closed?',
944 'port-commit-peeked', 'port-count-lines!', 'port-count-lines-enabled',
945 'port-counts-lines?', 'port-display-handler', 'port-file-identity',
946 'port-file-unlock', 'port-next-location', 'port-print-handler',
947 'port-progress-evt', 'port-provides-progress-evts?',
948 'port-read-handler', 'port-try-file-lock?', 'port-write-handler',
949 'port-writes-atomic?', 'port-writes-special?', 'port?', 'positive?',
950 'predicate/c', 'prefab-key->struct-type', 'prefab-key?',
951 'prefab-struct-key', 'preferences-lock-file-mode', 'pregexp',
952 'pregexp?', 'pretty-display', 'pretty-format', 'pretty-print',
953 'pretty-print-.-symbol-without-bars',
954 'pretty-print-abbreviate-read-macros', 'pretty-print-columns',
955 'pretty-print-current-style-table', 'pretty-print-depth',
956 'pretty-print-exact-as-decimal', 'pretty-print-extend-style-table',
957 'pretty-print-handler', 'pretty-print-newline',
958 'pretty-print-post-print-hook', 'pretty-print-pre-print-hook',
959 'pretty-print-print-hook', 'pretty-print-print-line',
960 'pretty-print-remap-stylable', 'pretty-print-show-inexactness',
961 'pretty-print-size-hook', 'pretty-print-style-table?',
962 'pretty-printing', 'pretty-write', 'primitive-closure?',
963 'primitive-result-arity', 'primitive?', 'print', 'print-as-expression',
964 'print-boolean-long-form', 'print-box', 'print-graph',
965 'print-hash-table', 'print-mpair-curly-braces',
966 'print-pair-curly-braces', 'print-reader-abbreviations',
967 'print-struct', 'print-syntax-width', 'print-unreadable',
968 'print-vector-length', 'printable/c', 'printable<%>', 'printf',
969 'procedure->method', 'procedure-arity', 'procedure-arity-includes/c',
970 'procedure-arity-includes?', 'procedure-arity?',
971 'procedure-closure-contents-eq?', 'procedure-extract-target',
972 'procedure-keywords', 'procedure-reduce-arity',
973 'procedure-reduce-keyword-arity', 'procedure-rename',
974 'procedure-struct-type?', 'procedure?', 'process', 'process*',
975 'process*/ports', 'process/ports', 'processor-count', 'progress-evt?',
976 'promise-forced?', 'promise-running?', 'promise/c', 'promise?',
977 'prop:arity-string', 'prop:chaperone-contract',
978 'prop:checked-procedure', 'prop:contract', 'prop:contracted',
979 'prop:custom-print-quotable', 'prop:custom-write', 'prop:dict',
980 'prop:dict/contract', 'prop:equal+hash', 'prop:evt',
981 'prop:exn:missing-module', 'prop:exn:srclocs', 'prop:flat-contract',
982 'prop:impersonator-of', 'prop:input-port',
983 'prop:liberal-define-context', 'prop:opt-chaperone-contract',
984 'prop:opt-chaperone-contract-get-test', 'prop:opt-chaperone-contract?',
985 'prop:output-port', 'prop:place-location', 'prop:procedure',
986 'prop:rename-transformer', 'prop:sequence', 'prop:set!-transformer',
987 'prop:stream', 'proper-subset?', 'pseudo-random-generator->vector',
988 'pseudo-random-generator-vector?', 'pseudo-random-generator?',
989 'put-preferences', 'putenv', 'quotient', 'quotient/remainder',
990 'radians->degrees', 'raise', 'raise-argument-error',
991 'raise-arguments-error', 'raise-arity-error', 'raise-blame-error',
992 'raise-contract-error', 'raise-mismatch-error',
993 'raise-not-cons-blame-error', 'raise-range-error',
994 'raise-result-error', 'raise-syntax-error', 'raise-type-error',
995 'raise-user-error', 'random', 'random-seed', 'range', 'rational?',
996 'rationalize', 'read', 'read-accept-bar-quote', 'read-accept-box',
997 'read-accept-compiled', 'read-accept-dot', 'read-accept-graph',
998 'read-accept-infix-dot', 'read-accept-lang', 'read-accept-quasiquote',
999 'read-accept-reader', 'read-byte', 'read-byte-or-special',
1000 'read-bytes', 'read-bytes!', 'read-bytes!-evt', 'read-bytes-avail!',
1001 'read-bytes-avail!*', 'read-bytes-avail!-evt',
1002 'read-bytes-avail!/enable-break', 'read-bytes-evt', 'read-bytes-line',
1003 'read-bytes-line-evt', 'read-case-sensitive', 'read-char',
1004 'read-char-or-special', 'read-curly-brace-as-paren',
1005 'read-decimal-as-inexact', 'read-eval-print-loop', 'read-language',
1006 'read-line', 'read-line-evt', 'read-on-demand-source',
1007 'read-square-bracket-as-paren', 'read-string', 'read-string!',
1008 'read-string!-evt', 'read-string-evt', 'read-syntax',
1009 'read-syntax/recursive', 'read/recursive', 'readtable-mapping',
1010 'readtable?', 'real->decimal-string', 'real->double-flonum',
1011 'real->floating-point-bytes', 'real->single-flonum', 'real-in',
1012 'real-part', 'real?', 'reencode-input-port', 'reencode-output-port',
1013 'regexp', 'regexp-match', 'regexp-match*', 'regexp-match-evt',
1014 'regexp-match-exact?', 'regexp-match-peek',
1015 'regexp-match-peek-immediate', 'regexp-match-peek-positions',
1016 'regexp-match-peek-positions*',
1017 'regexp-match-peek-positions-immediate',
1018 'regexp-match-peek-positions-immediate/end',
1019 'regexp-match-peek-positions/end', 'regexp-match-positions',
1020 'regexp-match-positions*', 'regexp-match-positions/end',
1021 'regexp-match/end', 'regexp-match?', 'regexp-max-lookbehind',
1022 'regexp-quote', 'regexp-replace', 'regexp-replace*',
1023 'regexp-replace-quote', 'regexp-replaces', 'regexp-split',
1024 'regexp-try-match', 'regexp?', 'relative-path?', 'relocate-input-port',
1025 'relocate-output-port', 'remainder', 'remove', 'remove*',
1026 'remove-duplicates', 'remq', 'remq*', 'remv', 'remv*',
1027 'rename-file-or-directory', 'rename-transformer-target',
1028 'rename-transformer?', 'reroot-path', 'resolve-path',
1029 'resolved-module-path-name', 'resolved-module-path?', 'rest',
1030 'reverse', 'round', 'second', 'seconds->date', 'security-guard?',
1031 'semaphore-peek-evt', 'semaphore-peek-evt?', 'semaphore-post',
1032 'semaphore-try-wait?', 'semaphore-wait', 'semaphore-wait/enable-break',
1033 'semaphore?', 'sequence->list', 'sequence->stream',
1034 'sequence-add-between', 'sequence-andmap', 'sequence-append',
1035 'sequence-count', 'sequence-filter', 'sequence-fold',
1036 'sequence-for-each', 'sequence-generate', 'sequence-generate*',
1037 'sequence-length', 'sequence-map', 'sequence-ormap', 'sequence-ref',
1038 'sequence-tail', 'sequence?', 'set', 'set!-transformer-procedure',
1039 'set!-transformer?', 'set->list', 'set->stream', 'set-add', 'set-add!',
1040 'set-box!', 'set-clear', 'set-clear!', 'set-copy', 'set-copy-clear',
1041 'set-count', 'set-empty?', 'set-eq?', 'set-equal?', 'set-eqv?',
1042 'set-first', 'set-for-each', 'set-implements/c', 'set-implements?',
1043 'set-intersect', 'set-intersect!', 'set-map', 'set-mcar!', 'set-mcdr!',
1044 'set-member?', 'set-mutable?', 'set-phantom-bytes!',
1045 'set-port-next-location!', 'set-remove', 'set-remove!', 'set-rest',
1046 'set-subtract', 'set-subtract!', 'set-symmetric-difference',
1047 'set-symmetric-difference!', 'set-union', 'set-union!', 'set-weak?',
1048 'set/c', 'set=?', 'set?', 'seteq', 'seteqv', 'seventh', 'sgn',
1049 'shared-bytes', 'shell-execute', 'shrink-path-wrt', 'shuffle',
1050 'simple-form-path', 'simplify-path', 'sin', 'single-flonum?', 'sinh',
1051 'sixth', 'skip-projection-wrapper?', 'sleep',
1052 'some-system-path->string', 'sort', 'special-comment-value',
1053 'special-comment?', 'special-filter-input-port', 'split-at',
1054 'split-at-right', 'split-path', 'splitf-at', 'splitf-at-right', 'sqr',
1055 'sqrt', 'srcloc', 'srcloc->string', 'srcloc-column', 'srcloc-line',
1056 'srcloc-position', 'srcloc-source', 'srcloc-span', 'srcloc?',
1057 'stop-after', 'stop-before', 'stream->list', 'stream-add-between',
1058 'stream-andmap', 'stream-append', 'stream-count', 'stream-empty?',
1059 'stream-filter', 'stream-first', 'stream-fold', 'stream-for-each',
1060 'stream-length', 'stream-map', 'stream-ormap', 'stream-ref',
1061 'stream-rest', 'stream-tail', 'stream?', 'string',
1062 'string->bytes/latin-1', 'string->bytes/locale', 'string->bytes/utf-8',
1063 'string->immutable-string', 'string->keyword', 'string->list',
1064 'string->number', 'string->path', 'string->path-element',
1065 'string->some-system-path', 'string->symbol',
1066 'string->uninterned-symbol', 'string->unreadable-symbol',
1067 'string-append', 'string-append*', 'string-ci<=?', 'string-ci<?',
1068 'string-ci=?', 'string-ci>=?', 'string-ci>?', 'string-copy',
1069 'string-copy!', 'string-downcase', 'string-environment-variable-name?',
1070 'string-fill!', 'string-foldcase', 'string-join', 'string-len/c',
1071 'string-length', 'string-locale-ci<?', 'string-locale-ci=?',
1072 'string-locale-ci>?', 'string-locale-downcase', 'string-locale-upcase',
1073 'string-locale<?', 'string-locale=?', 'string-locale>?',
1074 'string-no-nuls?', 'string-normalize-nfc', 'string-normalize-nfd',
1075 'string-normalize-nfkc', 'string-normalize-nfkd',
1076 'string-normalize-spaces', 'string-ref', 'string-replace',
1077 'string-set!', 'string-split', 'string-titlecase', 'string-trim',
1078 'string-upcase', 'string-utf-8-length', 'string<=?', 'string<?',
1079 'string=?', 'string>=?', 'string>?', 'string?', 'struct->vector',
1080 'struct-accessor-procedure?', 'struct-constructor-procedure?',
1081 'struct-info', 'struct-mutator-procedure?',
1082 'struct-predicate-procedure?', 'struct-type-info',
1083 'struct-type-make-constructor', 'struct-type-make-predicate',
1084 'struct-type-property-accessor-procedure?', 'struct-type-property/c',
1085 'struct-type-property?', 'struct-type?', 'struct:arity-at-least',
1086 'struct:date', 'struct:date*', 'struct:exn', 'struct:exn:break',
1087 'struct:exn:break:hang-up', 'struct:exn:break:terminate',
1088 'struct:exn:fail', 'struct:exn:fail:contract',
1089 'struct:exn:fail:contract:arity', 'struct:exn:fail:contract:blame',
1090 'struct:exn:fail:contract:continuation',
1091 'struct:exn:fail:contract:divide-by-zero',
1092 'struct:exn:fail:contract:non-fixnum-result',
1093 'struct:exn:fail:contract:variable', 'struct:exn:fail:filesystem',
1094 'struct:exn:fail:filesystem:errno',
1095 'struct:exn:fail:filesystem:exists',
1096 'struct:exn:fail:filesystem:missing-module',
1097 'struct:exn:fail:filesystem:version', 'struct:exn:fail:network',
1098 'struct:exn:fail:network:errno', 'struct:exn:fail:object',
1099 'struct:exn:fail:out-of-memory', 'struct:exn:fail:read',
1100 'struct:exn:fail:read:eof', 'struct:exn:fail:read:non-char',
1101 'struct:exn:fail:syntax', 'struct:exn:fail:syntax:missing-module',
1102 'struct:exn:fail:syntax:unbound', 'struct:exn:fail:unsupported',
1103 'struct:exn:fail:user', 'struct:srcloc',
1104 'struct:wrapped-extra-arg-arrow', 'struct?', 'sub1', 'subbytes',
1105 'subclass?', 'subclass?/c', 'subprocess', 'subprocess-group-enabled',
1106 'subprocess-kill', 'subprocess-pid', 'subprocess-status',
1107 'subprocess-wait', 'subprocess?', 'subset?', 'substring',
1108 'symbol->string', 'symbol-interned?', 'symbol-unreadable?', 'symbol<?',
1109 'symbol=?', 'symbol?', 'symbols', 'sync', 'sync/enable-break',
1110 'sync/timeout', 'sync/timeout/enable-break', 'syntax->datum',
1111 'syntax->list', 'syntax-arm', 'syntax-column', 'syntax-disarm',
1112 'syntax-e', 'syntax-line', 'syntax-local-bind-syntaxes',
1113 'syntax-local-certifier', 'syntax-local-context',
1114 'syntax-local-expand-expression', 'syntax-local-get-shadower',
1115 'syntax-local-introduce', 'syntax-local-lift-context',
1116 'syntax-local-lift-expression',
1117 'syntax-local-lift-module-end-declaration',
1118 'syntax-local-lift-provide', 'syntax-local-lift-require',
1119 'syntax-local-lift-values-expression',
1120 'syntax-local-make-definition-context',
1121 'syntax-local-make-delta-introducer',
1122 'syntax-local-module-defined-identifiers',
1123 'syntax-local-module-exports',
1124 'syntax-local-module-required-identifiers', 'syntax-local-name',
1125 'syntax-local-phase-level', 'syntax-local-submodules',
1126 'syntax-local-transforming-module-provides?', 'syntax-local-value',
1127 'syntax-local-value/immediate', 'syntax-original?', 'syntax-position',
1128 'syntax-property', 'syntax-property-symbol-keys', 'syntax-protect',
1129 'syntax-rearm', 'syntax-recertify', 'syntax-shift-phase-level',
1130 'syntax-source', 'syntax-source-module', 'syntax-span', 'syntax-taint',
1131 'syntax-tainted?', 'syntax-track-origin',
1132 'syntax-transforming-module-expression?', 'syntax-transforming?',
1133 'syntax/c', 'syntax?', 'system', 'system*', 'system*/exit-code',
1134 'system-big-endian?', 'system-idle-evt', 'system-language+country',
1135 'system-library-subpath', 'system-path-convention-type', 'system-type',
1136 'system/exit-code', 'tail-marks-match?', 'take', 'take-right', 'takef',
1137 'takef-right', 'tan', 'tanh', 'tcp-abandon-port', 'tcp-accept',
1138 'tcp-accept-evt', 'tcp-accept-ready?', 'tcp-accept/enable-break',
1139 'tcp-addresses', 'tcp-close', 'tcp-connect',
1140 'tcp-connect/enable-break', 'tcp-listen', 'tcp-listener?', 'tcp-port?',
1141 'tentative-pretty-print-port-cancel',
1142 'tentative-pretty-print-port-transfer', 'tenth', 'terminal-port?',
1143 'the-unsupplied-arg', 'third', 'thread', 'thread-cell-ref',
1144 'thread-cell-set!', 'thread-cell-values?', 'thread-cell?',
1145 'thread-dead-evt', 'thread-dead?', 'thread-group?', 'thread-receive',
1146 'thread-receive-evt', 'thread-resume', 'thread-resume-evt',
1147 'thread-rewind-receive', 'thread-running?', 'thread-send',
1148 'thread-suspend', 'thread-suspend-evt', 'thread-try-receive',
1149 'thread-wait', 'thread/suspend-to-kill', 'thread?', 'time-apply',
1150 'touch', 'transplant-input-port', 'transplant-output-port', 'true',
1151 'truncate', 'udp-addresses', 'udp-bind!', 'udp-bound?', 'udp-close',
1152 'udp-connect!', 'udp-connected?', 'udp-multicast-interface',
1153 'udp-multicast-join-group!', 'udp-multicast-leave-group!',
1154 'udp-multicast-loopback?', 'udp-multicast-set-interface!',
1155 'udp-multicast-set-loopback!', 'udp-multicast-set-ttl!',
1156 'udp-multicast-ttl', 'udp-open-socket', 'udp-receive!',
1157 'udp-receive!*', 'udp-receive!-evt', 'udp-receive!/enable-break',
1158 'udp-receive-ready-evt', 'udp-send', 'udp-send*', 'udp-send-evt',
1159 'udp-send-ready-evt', 'udp-send-to', 'udp-send-to*', 'udp-send-to-evt',
1160 'udp-send-to/enable-break', 'udp-send/enable-break', 'udp?', 'unbox',
1161 'uncaught-exception-handler', 'unit?', 'unspecified-dom',
1162 'unsupplied-arg?', 'use-collection-link-paths',
1163 'use-compiled-file-paths', 'use-user-specific-search-paths',
1164 'user-execute-bit', 'user-read-bit', 'user-write-bit',
1165 'value-contract', 'values', 'variable-reference->empty-namespace',
1166 'variable-reference->module-base-phase',
1167 'variable-reference->module-declaration-inspector',
1168 'variable-reference->module-path-index',
1169 'variable-reference->module-source', 'variable-reference->namespace',
1170 'variable-reference->phase',
1171 'variable-reference->resolved-module-path',
1172 'variable-reference-constant?', 'variable-reference?', 'vector',
1173 'vector->immutable-vector', 'vector->list',
1174 'vector->pseudo-random-generator', 'vector->pseudo-random-generator!',
1175 'vector->values', 'vector-append', 'vector-argmax', 'vector-argmin',
1176 'vector-copy', 'vector-copy!', 'vector-count', 'vector-drop',
1177 'vector-drop-right', 'vector-fill!', 'vector-filter',
1178 'vector-filter-not', 'vector-immutable', 'vector-immutable/c',
1179 'vector-immutableof', 'vector-length', 'vector-map', 'vector-map!',
1180 'vector-member', 'vector-memq', 'vector-memv', 'vector-ref',
1181 'vector-set!', 'vector-set*!', 'vector-set-performance-stats!',
1182 'vector-split-at', 'vector-split-at-right', 'vector-take',
1183 'vector-take-right', 'vector/c', 'vector?', 'vectorof', 'version',
1184 'void', 'void?', 'weak-box-value', 'weak-box?', 'weak-set',
1185 'weak-seteq', 'weak-seteqv', 'will-execute', 'will-executor?',
1186 'will-register', 'will-try-execute', 'with-input-from-bytes',
1187 'with-input-from-file', 'with-input-from-string',
1188 'with-output-to-bytes', 'with-output-to-file', 'with-output-to-string',
1189 'would-be-future', 'wrap-evt', 'wrapped-extra-arg-arrow',
1190 'wrapped-extra-arg-arrow-extra-neg-party-argument',
1191 'wrapped-extra-arg-arrow-real-func', 'wrapped-extra-arg-arrow?',
1192 'writable<%>', 'write', 'write-byte', 'write-bytes',
1193 'write-bytes-avail', 'write-bytes-avail*', 'write-bytes-avail-evt',
1194 'write-bytes-avail/enable-break', 'write-char', 'write-special',
1195 'write-special-avail*', 'write-special-evt', 'write-string',
1196 'write-to-file', 'xor', 'zero?', '~.a', '~.s', '~.v', '~a', '~e', '~r',
1197 '~s', '~v'
1198 )
1199
1200 _opening_parenthesis = r'[([{]'
1201 _closing_parenthesis = r'[)\]}]'
1202 _delimiters = r'()[\]{}",\'`;\s'
1203 _symbol = r'(?u)(?:\|[^|]*\||\\[\w\W]|[^|\\%s]+)+' % _delimiters
1204 _exact_decimal_prefix = r'(?:#e)?(?:#d)?(?:#e)?'
1205 _exponent = r'(?:[defls][-+]?\d+)'
1206 _inexact_simple_no_hashes = r'(?:\d+(?:/\d+|\.\d*)?|\.\d+)'
1207 _inexact_simple = (r'(?:%s|(?:\d+#+(?:\.#*|/\d+#*)?|\.\d+#+|'
1208 r'\d+(?:\.\d*#+|/\d+#+)))' % _inexact_simple_no_hashes)
1209 _inexact_normal_no_hashes = r'(?:%s%s?)' % (_inexact_simple_no_hashes,
1210 _exponent)
1211 _inexact_normal = r'(?:%s%s?)' % (_inexact_simple, _exponent)
1212 _inexact_special = r'(?:(?:inf|nan)\.[0f])'
1213 _inexact_real = r'(?:[-+]?%s|[-+]%s)' % (_inexact_normal,
1214 _inexact_special)
1215 _inexact_unsigned = r'(?:%s|%s)' % (_inexact_normal, _inexact_special)
1216
1217 tokens = {
1218 'root': [
1219 (_closing_parenthesis, Error),
1220 (r'(?!\Z)', Text, 'unquoted-datum')
1221 ],
1222 'datum': [
1223 (r'(?s)#;|#![ /]([^\\\n]|\\.)*', Comment),
1224 (u';[^\\n\\r\x85\u2028\u2029]*', Comment.Single),
1225 (r'#\|', Comment.Multiline, 'block-comment'),
1226
1227 # Whitespaces
1228 (r'(?u)\s+', Text),
1229
1230 # Numbers: Keep in mind Racket reader hash prefixes, which
1231 # can denote the base or the type. These don't map neatly
1232 # onto Pygments token types; some judgment calls here.
1233
1234 # #d or no prefix
1235 (r'(?i)%s[-+]?\d+(?=[%s])' % (_exact_decimal_prefix, _delimiters),
1236 Number.Integer, '#pop'),
1237 (r'(?i)%s[-+]?(\d+(\.\d*)?|\.\d+)([deflst][-+]?\d+)?(?=[%s])' %
1238 (_exact_decimal_prefix, _delimiters), Number.Float, '#pop'),
1239 (r'(?i)%s[-+]?(%s([-+]%s?i)?|[-+]%s?i)(?=[%s])' %
1240 (_exact_decimal_prefix, _inexact_normal_no_hashes,
1241 _inexact_normal_no_hashes, _inexact_normal_no_hashes,
1242 _delimiters), Number, '#pop'),
1243
1244 # Inexact without explicit #i
1245 (r'(?i)(#d)?(%s([-+]%s?i)?|[-+]%s?i|%s@%s)(?=[%s])' %
1246 (_inexact_real, _inexact_unsigned, _inexact_unsigned,
1247 _inexact_real, _inexact_real, _delimiters), Number.Float,
1248 '#pop'),
1249
1250 # The remaining extflonums
1251 (r'(?i)(([-+]?%st[-+]?\d+)|[-+](inf|nan)\.t)(?=[%s])' %
1252 (_inexact_simple, _delimiters), Number.Float, '#pop'),
1253
1254 # #b
1255 (r'(?i)(#[ei])?#b%s' % _symbol, Number.Bin, '#pop'),
1256
1257 # #o
1258 (r'(?i)(#[ei])?#o%s' % _symbol, Number.Oct, '#pop'),
1259
1260 # #x
1261 (r'(?i)(#[ei])?#x%s' % _symbol, Number.Hex, '#pop'),
1262
1263 # #i is always inexact, i.e. float
1264 (r'(?i)(#d)?#i%s' % _symbol, Number.Float, '#pop'),
1265
1266 # Strings and characters
1267 (r'#?"', String.Double, ('#pop', 'string')),
1268 (r'#<<(.+)\n(^(?!\1$).*$\n)*^\1$', String.Heredoc, '#pop'),
1269 (r'#\\(u[\da-fA-F]{1,4}|U[\da-fA-F]{1,8})', String.Char, '#pop'),
1270 (r'(?is)#\\([0-7]{3}|[a-z]+|.)', String.Char, '#pop'),
1271 (r'(?s)#[pr]x#?"(\\?.)*?"', String.Regex, '#pop'),
1272
1273 # Constants
1274 (r'#(true|false|[tTfF])', Name.Constant, '#pop'),
1275
1276 # Keyword argument names (e.g. #:keyword)
1277 (r'#:%s' % _symbol, Keyword.Declaration, '#pop'),
1278
1279 # Reader extensions
1280 (r'(#lang |#!)(\S+)',
1281 bygroups(Keyword.Namespace, Name.Namespace)),
1282 (r'#reader', Keyword.Namespace, 'quoted-datum'),
1283
1284 # Other syntax
1285 (r"(?i)\.(?=[%s])|#c[is]|#['`]|#,@?" % _delimiters, Operator),
1286 (r"'|#[s&]|#hash(eqv?)?|#\d*(?=%s)" % _opening_parenthesis,
1287 Operator, ('#pop', 'quoted-datum'))
1288 ],
1289 'datum*': [
1290 (r'`|,@?', Operator),
1291 (_symbol, String.Symbol, '#pop'),
1292 (r'[|\\]', Error),
1293 default('#pop')
1294 ],
1295 'list': [
1296 (_closing_parenthesis, Punctuation, '#pop')
1297 ],
1298 'unquoted-datum': [
1299 include('datum'),
1300 (r'quote(?=[%s])' % _delimiters, Keyword,
1301 ('#pop', 'quoted-datum')),
1302 (r'`', Operator, ('#pop', 'quasiquoted-datum')),
1303 (r'quasiquote(?=[%s])' % _delimiters, Keyword,
1304 ('#pop', 'quasiquoted-datum')),
1305 (_opening_parenthesis, Punctuation, ('#pop', 'unquoted-list')),
1306 (words(_keywords, prefix='(?u)', suffix='(?=[%s])' % _delimiters),
1307 Keyword, '#pop'),
1308 (words(_builtins, prefix='(?u)', suffix='(?=[%s])' % _delimiters),
1309 Name.Builtin, '#pop'),
1310 (_symbol, Name, '#pop'),
1311 include('datum*')
1312 ],
1313 'unquoted-list': [
1314 include('list'),
1315 (r'(?!\Z)', Text, 'unquoted-datum')
1316 ],
1317 'quasiquoted-datum': [
1318 include('datum'),
1319 (r',@?', Operator, ('#pop', 'unquoted-datum')),
1320 (r'unquote(-splicing)?(?=[%s])' % _delimiters, Keyword,
1321 ('#pop', 'unquoted-datum')),
1322 (_opening_parenthesis, Punctuation, ('#pop', 'quasiquoted-list')),
1323 include('datum*')
1324 ],
1325 'quasiquoted-list': [
1326 include('list'),
1327 (r'(?!\Z)', Text, 'quasiquoted-datum')
1328 ],
1329 'quoted-datum': [
1330 include('datum'),
1331 (_opening_parenthesis, Punctuation, ('#pop', 'quoted-list')),
1332 include('datum*')
1333 ],
1334 'quoted-list': [
1335 include('list'),
1336 (r'(?!\Z)', Text, 'quoted-datum')
1337 ],
1338 'block-comment': [
1339 (r'#\|', Comment.Multiline, '#push'),
1340 (r'\|#', Comment.Multiline, '#pop'),
1341 (r'[^#|]+|.', Comment.Multiline)
1342 ],
1343 'string': [
1344 (r'"', String.Double, '#pop'),
1345 (r'(?s)\\([0-7]{1,3}|x[\da-fA-F]{1,2}|u[\da-fA-F]{1,4}|'
1346 r'U[\da-fA-F]{1,8}|.)', String.Escape),
1347 (r'[^\\"]+', String.Double)
1348 ]
1349 }
1350
1351
1352 class NewLispLexer(RegexLexer):
1353 """
1354 For `newLISP. <www.newlisp.org>`_ source code (version 10.3.0).
1355
1356 .. versionadded:: 1.5
1357 """
1358
1359 name = 'NewLisp'
1360 aliases = ['newlisp']
1361 filenames = ['*.lsp', '*.nl']
1362 mimetypes = ['text/x-newlisp', 'application/x-newlisp']
1363
1364 flags = re.IGNORECASE | re.MULTILINE | re.UNICODE
1365
1366 # list of built-in functions for newLISP version 10.3
1367 builtins = (
1368 '^', '--', '-', ':', '!', '!=', '?', '@', '*', '/', '&', '%', '+', '++',
1369 '<', '<<', '<=', '=', '>', '>=', '>>', '|', '~', '$', '$0', '$1', '$10',
1370 '$11', '$12', '$13', '$14', '$15', '$2', '$3', '$4', '$5', '$6', '$7',
1371 '$8', '$9', '$args', '$idx', '$it', '$main-args', 'abort', 'abs',
1372 'acos', 'acosh', 'add', 'address', 'amb', 'and', 'append-file',
1373 'append', 'apply', 'args', 'array-list', 'array?', 'array', 'asin',
1374 'asinh', 'assoc', 'atan', 'atan2', 'atanh', 'atom?', 'base64-dec',
1375 'base64-enc', 'bayes-query', 'bayes-train', 'begin',
1376 'beta', 'betai', 'bind', 'binomial', 'bits', 'callback',
1377 'case', 'catch', 'ceil', 'change-dir', 'char', 'chop', 'Class', 'clean',
1378 'close', 'command-event', 'cond', 'cons', 'constant',
1379 'context?', 'context', 'copy-file', 'copy', 'cos', 'cosh', 'count',
1380 'cpymem', 'crc32', 'crit-chi2', 'crit-z', 'current-line', 'curry',
1381 'date-list', 'date-parse', 'date-value', 'date', 'debug', 'dec',
1382 'def-new', 'default', 'define-macro', 'define',
1383 'delete-file', 'delete-url', 'delete', 'destroy', 'det', 'device',
1384 'difference', 'directory?', 'directory', 'div', 'do-until', 'do-while',
1385 'doargs', 'dolist', 'dostring', 'dotimes', 'dotree', 'dump', 'dup',
1386 'empty?', 'encrypt', 'ends-with', 'env', 'erf', 'error-event',
1387 'eval-string', 'eval', 'exec', 'exists', 'exit', 'exp', 'expand',
1388 'explode', 'extend', 'factor', 'fft', 'file-info', 'file?', 'filter',
1389 'find-all', 'find', 'first', 'flat', 'float?', 'float', 'floor', 'flt',
1390 'fn', 'for-all', 'for', 'fork', 'format', 'fv', 'gammai', 'gammaln',
1391 'gcd', 'get-char', 'get-float', 'get-int', 'get-long', 'get-string',
1392 'get-url', 'global?', 'global', 'if-not', 'if', 'ifft', 'import', 'inc',
1393 'index', 'inf?', 'int', 'integer?', 'integer', 'intersect', 'invert',
1394 'irr', 'join', 'lambda-macro', 'lambda?', 'lambda', 'last-error',
1395 'last', 'legal?', 'length', 'let', 'letex', 'letn',
1396 'list?', 'list', 'load', 'local', 'log', 'lookup',
1397 'lower-case', 'macro?', 'main-args', 'MAIN', 'make-dir', 'map', 'mat',
1398 'match', 'max', 'member', 'min', 'mod', 'module', 'mul', 'multiply',
1399 'NaN?', 'net-accept', 'net-close', 'net-connect', 'net-error',
1400 'net-eval', 'net-interface', 'net-ipv', 'net-listen', 'net-local',
1401 'net-lookup', 'net-packet', 'net-peek', 'net-peer', 'net-ping',
1402 'net-receive-from', 'net-receive-udp', 'net-receive', 'net-select',
1403 'net-send-to', 'net-send-udp', 'net-send', 'net-service',
1404 'net-sessions', 'new', 'nil?', 'nil', 'normal', 'not', 'now', 'nper',
1405 'npv', 'nth', 'null?', 'number?', 'open', 'or', 'ostype', 'pack',
1406 'parse-date', 'parse', 'peek', 'pipe', 'pmt', 'pop-assoc', 'pop',
1407 'post-url', 'pow', 'prefix', 'pretty-print', 'primitive?', 'print',
1408 'println', 'prob-chi2', 'prob-z', 'process', 'prompt-event',
1409 'protected?', 'push', 'put-url', 'pv', 'quote?', 'quote', 'rand',
1410 'random', 'randomize', 'read', 'read-char', 'read-expr', 'read-file',
1411 'read-key', 'read-line', 'read-utf8', 'reader-event',
1412 'real-path', 'receive', 'ref-all', 'ref', 'regex-comp', 'regex',
1413 'remove-dir', 'rename-file', 'replace', 'reset', 'rest', 'reverse',
1414 'rotate', 'round', 'save', 'search', 'seed', 'seek', 'select', 'self',
1415 'semaphore', 'send', 'sequence', 'series', 'set-locale', 'set-ref-all',
1416 'set-ref', 'set', 'setf', 'setq', 'sgn', 'share', 'signal', 'silent',
1417 'sin', 'sinh', 'sleep', 'slice', 'sort', 'source', 'spawn', 'sqrt',
1418 'starts-with', 'string?', 'string', 'sub', 'swap', 'sym', 'symbol?',
1419 'symbols', 'sync', 'sys-error', 'sys-info', 'tan', 'tanh', 'term',
1420 'throw-error', 'throw', 'time-of-day', 'time', 'timer', 'title-case',
1421 'trace-highlight', 'trace', 'transpose', 'Tree', 'trim', 'true?',
1422 'true', 'unicode', 'unify', 'unique', 'unless', 'unpack', 'until',
1423 'upper-case', 'utf8', 'utf8len', 'uuid', 'wait-pid', 'when', 'while',
1424 'write', 'write-char', 'write-file', 'write-line',
1425 'xfer-event', 'xml-error', 'xml-parse', 'xml-type-tags', 'zero?',
1426 )
1427
1428 # valid names
1429 valid_name = r'([\w!$%&*+.,/<=>?@^~|-])+|(\[.*?\])+'
1430
1431 tokens = {
1432 'root': [
1433 # shebang
1434 (r'#!(.*?)$', Comment.Preproc),
1435 # comments starting with semicolon
1436 (r';.*$', Comment.Single),
1437 # comments starting with #
1438 (r'#.*$', Comment.Single),
1439
1440 # whitespace
1441 (r'\s+', Text),
1442
1443 # strings, symbols and characters
1444 (r'"(\\\\|\\"|[^"])*"', String),
1445
1446 # braces
1447 (r'\{', String, "bracestring"),
1448
1449 # [text] ... [/text] delimited strings
1450 (r'\[text\]*', String, "tagstring"),
1451
1452 # 'special' operators...
1453 (r"('|:)", Operator),
1454
1455 # highlight the builtins
1456 (words(builtins, suffix=r'\b'),
1457 Keyword),
1458
1459 # the remaining functions
1460 (r'(?<=\()' + valid_name, Name.Variable),
1461
1462 # the remaining variables
1463 (valid_name, String.Symbol),
1464
1465 # parentheses
1466 (r'(\(|\))', Punctuation),
1467 ],
1468
1469 # braced strings...
1470 'bracestring': [
1471 (r'\{', String, "#push"),
1472 (r'\}', String, "#pop"),
1473 ('[^{}]+', String),
1474 ],
1475
1476 # tagged [text]...[/text] delimited strings...
1477 'tagstring': [
1478 (r'(?s)(.*?)(\[/text\])', String, '#pop'),
1479 ],
1480 }

eric ide

mercurial