diff options
author | David Corbett <corbett.dav@husky.neu.edu> | 2014-05-16 18:52:38 -0400 |
---|---|---|
committer | David Corbett <corbett.dav@husky.neu.edu> | 2014-05-16 18:52:38 -0400 |
commit | 929db39874cb52d14eb14ad41485782d759e60d1 (patch) | |
tree | 0d417abc4c2c0b1b62f7277d9d115eb88e20a6d0 | |
parent | 58f9a753475b0b4771f14d1edb73e3a1c451ef3c (diff) | |
download | pygments-929db39874cb52d14eb14ad41485782d759e60d1.tar.gz |
Improve RacketLexer
-rw-r--r-- | pygments/lexers/_mapping.py | 8 | ||||
-rw-r--r-- | pygments/lexers/functional.py | 1193 | ||||
-rw-r--r-- | tests/examplefiles/example.rkt | 706 |
3 files changed, 1443 insertions, 464 deletions
diff --git a/pygments/lexers/_mapping.py b/pygments/lexers/_mapping.py index fd170cfe..462c6501 100644 --- a/pygments/lexers/_mapping.py +++ b/pygments/lexers/_mapping.py @@ -81,6 +81,7 @@ LEXERS = { 'CppLexer': ('pygments.lexers.compiled', 'C++', ('cpp', 'c++'), ('*.cpp', '*.hpp', '*.c++', '*.h++', '*.cc', '*.hh', '*.cxx', '*.hxx', '*.C', '*.H', '*.cp', '*.CPP'), ('text/x-c++hdr', 'text/x-c++src')), 'CppObjdumpLexer': ('pygments.lexers.asm', 'cpp-objdump', ('cpp-objdump', 'c++-objdumb', 'cxx-objdump'), ('*.cpp-objdump', '*.c++-objdump', '*.cxx-objdump'), ('text/x-cpp-objdump',)), 'CrocLexer': ('pygments.lexers.agile', 'Croc', ('croc',), ('*.croc',), ('text/x-crocsrc',)), + 'CryptolLexer': ('pygments.lexers.functional', 'Cryptol', ('cryptol', 'cry'), ('*.cry',), ('text/x-cryptol',)), 'CssDjangoLexer': ('pygments.lexers.templates', 'CSS+Django/Jinja', ('css+django', 'css+jinja'), (), ('text/css+django', 'text/css+jinja')), 'CssErbLexer': ('pygments.lexers.templates', 'CSS+Ruby', ('css+erb', 'css+ruby'), (), ('text/css+ruby',)), 'CssGenshiLexer': ('pygments.lexers.templates', 'CSS+Genshi Text', ('css+genshitext', 'css+genshi'), (), ('text/css+genshi',)), @@ -90,7 +91,6 @@ LEXERS = { 'CudaLexer': ('pygments.lexers.compiled', 'CUDA', ('cuda', 'cu'), ('*.cu', '*.cuh'), ('text/x-cuda',)), 'CypherLexer': ('pygments.lexers.graph', 'Cypher', ('cypher',), ('*.cyp', '*.cypher'), ()), 'CythonLexer': ('pygments.lexers.compiled', 'Cython', ('cython', 'pyx', 'pyrex'), ('*.pyx', '*.pxd', '*.pxi'), ('text/x-cython', 'application/x-cython')), - 'CryptolLexer': ('pygments.lexers.functional', 'Cryptol', ('cryptol', 'cry'), ('*.cry',), ('text/x-cryptol',)), 'DLexer': ('pygments.lexers.compiled', 'D', ('d',), ('*.d', '*.di'), ('text/x-dsrc',)), 'DObjdumpLexer': ('pygments.lexers.asm', 'd-objdump', ('d-objdump',), ('*.d-objdump',), ('text/x-d-objdump',)), 'DarcsPatchLexer': ('pygments.lexers.text', 'Darcs Patch', ('dpatch',), ('*.dpatch', '*.darcspatch'), ()), @@ -191,7 +191,7 @@ LEXERS = { 'LighttpdConfLexer': ('pygments.lexers.text', 'Lighttpd configuration file', ('lighty', 'lighttpd'), (), ('text/x-lighttpd-conf',)), 'LimboLexer': ('pygments.lexers.inferno', 'Limbo', ('limbo',), ('*.b',), ('text/limbo',)), 'LiterateAgdaLexer': ('pygments.lexers.functional', 'Literate Agda', ('lagda', 'literate-agda'), ('*.lagda',), ('text/x-literate-agda',)), - 'LiterateCryptolLexer': ('pygments.lexers.functional', 'Literate Cryptol', ('lcry', 'literate-cryptol', 'lcrytol'), ('*.lcry',), ('text/x-literate-cryptol',)), + 'LiterateCryptolLexer': ('pygments.lexers.functional', 'Literate Cryptol', ('lcry', 'literate-cryptol', 'lcryptol'), ('*.lcry',), ('text/x-literate-cryptol',)), 'LiterateHaskellLexer': ('pygments.lexers.functional', 'Literate Haskell', ('lhs', 'literate-haskell', 'lhaskell'), ('*.lhs',), ('text/x-literate-haskell',)), 'LiterateIdrisLexer': ('pygments.lexers.functional', 'Literate Idris', ('lidr', 'literate-idris', 'lidris'), ('*.lidr',), ('text/x-literate-idris',)), 'LiveScriptLexer': ('pygments.lexers.web', 'LiveScript', ('live-script', 'livescript'), ('*.ls',), ('text/livescript',)), @@ -275,7 +275,7 @@ LEXERS = { 'QmlLexer': ('pygments.lexers.web', 'QML', ('qml',), ('*.qml',), ('application/x-qml',)), 'RConsoleLexer': ('pygments.lexers.math', 'RConsole', ('rconsole', 'rout'), ('*.Rout',), ()), 'RPMSpecLexer': ('pygments.lexers.other', 'RPMSpec', ('spec',), ('*.spec',), ('text/x-rpm-spec',)), - 'RacketLexer': ('pygments.lexers.functional', 'Racket', ('racket', 'rkt'), ('*.rkt', '*.rktl'), ('text/x-racket', 'application/x-racket')), + 'RacketLexer': ('pygments.lexers.functional', 'Racket', ('racket', 'rkt'), ('*.rkt', '*.rktd', '*.rktl'), ('text/x-racket', 'application/x-racket')), 'RagelCLexer': ('pygments.lexers.parsers', 'Ragel in C Host', ('ragel-c',), ('*.rl',), ()), 'RagelCppLexer': ('pygments.lexers.parsers', 'Ragel in CPP Host', ('ragel-cpp',), ('*.rl',), ()), 'RagelDLexer': ('pygments.lexers.parsers', 'Ragel in D Host', ('ragel-d',), ('*.rl',), ()), @@ -286,7 +286,7 @@ LEXERS = { 'RagelRubyLexer': ('pygments.lexers.parsers', 'Ragel in Ruby Host', ('ragel-ruby', 'ragel-rb'), ('*.rl',), ()), 'RawTokenLexer': ('pygments.lexers.special', 'Raw token data', ('raw',), (), ('application/x-pygments-tokens',)), 'RdLexer': ('pygments.lexers.math', 'Rd', ('rd',), ('*.Rd',), ('text/x-r-doc',)), - 'RebolLexer': ('pygments.lexers.other', 'REBOL', ('rebol',), ('*.r', '*.r3'), ('text/x-rebol',)), + 'RebolLexer': ('pygments.lexers.other', 'REBOL', ('rebol',), ('*.r', '*.r3', '*.reb'), ('text/x-rebol',)), 'RedLexer': ('pygments.lexers.other', 'Red', ('red', 'red/system'), ('*.red', '*.reds'), ('text/x-red', 'text/x-red-system')), 'RedcodeLexer': ('pygments.lexers.other', 'Redcode', ('redcode',), ('*.cw',), ()), 'RegeditLexer': ('pygments.lexers.text', 'reg', ('registry',), ('*.reg',), ('text/x-windows-registry',)), diff --git a/pygments/lexers/functional.py b/pygments/lexers/functional.py index 2a840694..0c978254 100644 --- a/pygments/lexers/functional.py +++ b/pygments/lexers/functional.py @@ -30,126 +30,219 @@ line_re = re.compile('.*?\n') class RacketLexer(RegexLexer): """ - Lexer for `Racket <http://racket-lang.org/>`_ source code (formerly known as - PLT Scheme). + Lexer for `Racket <http://racket-lang.org/>`_ source code (formerly + known as PLT Scheme). .. versionadded:: 1.6 """ name = 'Racket' aliases = ['racket', 'rkt'] - filenames = ['*.rkt', '*.rktl'] + filenames = ['*.rkt', '*.rktd', '*.rktl'] mimetypes = ['text/x-racket', 'application/x-racket'] - # From namespace-mapped-symbols - keywords = [ - '#%app', '#%datum', '#%expression', '#%module-begin', + # Generated by example.rkt + _keywords = [ + '#%app', '#%datum', '#%declare', '#%expression', '#%module-begin', '#%plain-app', '#%plain-lambda', '#%plain-module-begin', - '#%provide', '#%require', '#%stratified-body', '#%top', - '#%top-interaction', '#%variable-reference', '...', 'and', 'begin', - 'begin-for-syntax', 'begin0', 'case', 'case-lambda', 'cond', - 'datum->syntax-object', 'define', 'define-for-syntax', - 'define-struct', 'define-syntax', 'define-syntax-rule', - 'define-syntaxes', 'define-values', 'define-values-for-syntax', - 'delay', 'do', 'expand-path', 'fluid-let', 'hash-table-copy', - 'hash-table-count', 'hash-table-for-each', 'hash-table-get', - 'hash-table-iterate-first', 'hash-table-iterate-key', - 'hash-table-iterate-next', 'hash-table-iterate-value', - 'hash-table-map', 'hash-table-put!', 'hash-table-remove!', - 'hash-table?', 'if', 'lambda', 'let', 'let*', 'let*-values', - 'let-struct', 'let-syntax', 'let-syntaxes', 'let-values', 'let/cc', - 'let/ec', 'letrec', 'letrec-syntax', 'letrec-syntaxes', - 'letrec-syntaxes+values', 'letrec-values', 'list-immutable', - 'make-hash-table', 'make-immutable-hash-table', 'make-namespace', - 'module', 'module-identifier=?', 'module-label-identifier=?', - 'module-template-identifier=?', 'module-transformer-identifier=?', - 'namespace-transformer-require', 'or', 'parameterize', - 'parameterize*', 'parameterize-break', 'provide', - 'provide-for-label', 'provide-for-syntax', 'quasiquote', + '#%printing-module-begin', '#%provide', '#%require', + '#%stratified-body', '#%top', '#%top-interaction', + '#%variable-reference', '->', '->*', '->*m', '->d', '->dm', '->i', + '->m', '...', ':do-in', '==', '=>', '_', 'absent', 'abstract', + 'all-defined-out', 'all-from-out', 'and', 'any', 'augment', 'augment*', + 'augment-final', 'augment-final*', 'augride', 'augride*', 'begin', + 'begin-for-syntax', 'begin0', 'case', 'case->', 'case->m', + 'case-lambda', 'class', 'class*', 'class-field-accessor', + 'class-field-mutator', 'class/c', 'class/derived', 'combine-in', + 'combine-out', 'command-line', 'compound-unit', 'compound-unit/infer', + 'cond', 'contract', 'contract-out', 'contract-struct', 'contracted', + 'define', 'define-compound-unit', 'define-compound-unit/infer', + 'define-contract-struct', 'define-custom-hash-types', + 'define-custom-set-types', 'define-for-syntax', + 'define-local-member-name', 'define-logger', 'define-match-expander', + 'define-member-name', 'define-module-boundary-contract', + 'define-namespace-anchor', 'define-opt/c', 'define-sequence-syntax', + 'define-serializable-class', 'define-serializable-class*', + 'define-signature', 'define-signature-form', 'define-struct', + 'define-struct/contract', 'define-struct/derived', 'define-syntax', + 'define-syntax-rule', 'define-syntaxes', 'define-unit', + 'define-unit-binding', 'define-unit-from-context', + 'define-unit/contract', 'define-unit/new-import-export', + 'define-unit/s', 'define-values', 'define-values-for-export', + 'define-values-for-syntax', 'define-values/invoke-unit', + 'define-values/invoke-unit/infer', 'define/augment', + 'define/augment-final', 'define/augride', 'define/contract', + 'define/final-prop', 'define/match', 'define/overment', + 'define/override', 'define/override-final', 'define/private', + 'define/public', 'define/public-final', 'define/pubment', + 'define/subexpression-pos-prop', 'delay', 'delay/idle', 'delay/name', + 'delay/strict', 'delay/sync', 'delay/thread', 'do', 'else', 'except', + 'except-in', 'except-out', 'export', 'extends', 'failure-cont', + 'false', 'false/c', 'field', 'field-bound?', 'file', + 'flat-murec-contract', 'flat-rec-contract', 'for', 'for*', 'for*/and', + 'for*/first', 'for*/fold', 'for*/fold/derived', 'for*/hash', + 'for*/hasheq', 'for*/hasheqv', 'for*/last', 'for*/list', 'for*/lists', + 'for*/mutable-set', 'for*/mutable-seteq', 'for*/mutable-seteqv', + 'for*/or', 'for*/product', 'for*/set', 'for*/seteq', 'for*/seteqv', + 'for*/sum', 'for*/vector', 'for*/weak-set', 'for*/weak-seteq', + 'for*/weak-seteqv', 'for-label', 'for-meta', 'for-syntax', + 'for-template', 'for/and', 'for/first', 'for/fold', 'for/fold/derived', + 'for/hash', 'for/hasheq', 'for/hasheqv', 'for/last', 'for/list', + 'for/lists', 'for/mutable-set', 'for/mutable-seteq', + 'for/mutable-seteqv', 'for/or', 'for/product', 'for/set', 'for/seteq', + 'for/seteqv', 'for/sum', 'for/vector', 'for/weak-set', + 'for/weak-seteq', 'for/weak-seteqv', 'gen:custom-write', 'gen:dict', + 'gen:equal+hash', 'gen:set', 'gen:stream', 'generic', 'get-field', + 'if', 'implies', 'import', 'include', 'include-at/relative-to', + 'include-at/relative-to/reader', 'include/reader', 'inherit', + 'inherit-field', 'inherit/inner', 'inherit/super', 'init', + 'init-depend', 'init-field', 'init-rest', 'inner', 'inspect', + 'instantiate', 'interface', 'interface*', 'invoke-unit', + 'invoke-unit/infer', 'lambda', 'lazy', 'let', 'let*', 'let*-values', + 'let-syntax', 'let-syntaxes', 'let-values', 'let/cc', 'let/ec', + 'letrec', 'letrec-syntax', 'letrec-syntaxes', 'letrec-syntaxes+values', + 'letrec-values', 'lib', 'link', 'local', 'local-require', 'log-debug', + 'log-error', 'log-fatal', 'log-info', 'log-warning', 'match', 'match*', + 'match*/derived', 'match-define', 'match-define-values', + 'match-lambda', 'match-lambda*', 'match-lambda**', 'match-let', + 'match-let*', 'match-let*-values', 'match-let-values', 'match-letrec', + 'match/derived', 'match/values', 'member-name-key', 'method-contract?', + 'mixin', 'module', 'module*', 'module+', 'nand', 'new', 'nor', + 'object-contract', 'object/c', 'only', 'only-in', 'only-meta-in', + 'open', 'opt/c', 'or', 'overment', 'overment*', 'override', + 'override*', 'override-final', 'override-final*', 'parameterize', + 'parameterize*', 'parameterize-break', 'parametric->/c', 'place', + 'place*', 'planet', 'prefix', 'prefix-in', 'prefix-out', 'private', + 'private*', 'prompt-tag/c', 'protect-out', 'provide', + 'provide-signature-elements', 'provide/contract', 'public', 'public*', + 'public-final', 'public-final*', 'pubment', 'pubment*', 'quasiquote', 'quasisyntax', 'quasisyntax/loc', 'quote', 'quote-syntax', - 'quote-syntax/prune', 'require', 'require-for-label', - 'require-for-syntax', 'require-for-template', 'set!', - 'set!-values', 'syntax', 'syntax-case', 'syntax-case*', - 'syntax-id-rules', 'syntax-object->datum', 'syntax-rules', - 'syntax/loc', 'time', 'transcript-off', 'transcript-on', 'unless', - 'unquote', 'unquote-splicing', 'unsyntax', 'unsyntax-splicing', - 'when', 'with-continuation-mark', 'with-handlers', - 'with-handlers*', 'with-syntax', u'λ' + 'quote-syntax/prune', 'recontract-out', 'recursive-contract', + 'relative-in', 'rename', 'rename-in', 'rename-inner', 'rename-out', + 'rename-super', 'require', 'send', 'send*', 'send+', 'send-generic', + 'send/apply', 'send/keyword-apply', 'set!', 'set!-values', + 'set-field!', 'shared', 'stream', 'stream-cons', 'struct', 'struct*', + 'struct-copy', 'struct-field-index', 'struct-out', 'struct/c', + 'struct/ctc', 'struct/dc', 'submod', 'super', 'super-instantiate', + 'super-make-object', 'super-new', 'syntax', 'syntax-case', + 'syntax-case*', 'syntax-id-rules', 'syntax-rules', 'syntax/loc', 'tag', + 'this', 'this%', 'thunk', 'thunk*', 'time', 'unconstrained-domain->', + 'unit', 'unit-from-context', 'unit/c', 'unit/new-import-export', + 'unit/s', 'unless', 'unquote', 'unquote-splicing', 'unsyntax', + 'unsyntax-splicing', 'values/drop', 'when', 'with-continuation-mark', + 'with-contract', 'with-handlers', 'with-handlers*', 'with-method', + 'with-syntax', u'λ' ] - # From namespace-mapped-symbols - builtins = [ - '*', '+', '-', '/', '<', '<=', '=', '>', '>=', - 'abort-current-continuation', 'abs', 'absolute-path?', 'acos', - 'add1', 'alarm-evt', 'always-evt', 'andmap', 'angle', 'append', - 'apply', 'arithmetic-shift', 'arity-at-least', - 'arity-at-least-value', 'arity-at-least?', 'asin', 'assoc', 'assq', - 'assv', 'atan', 'banner', 'bitwise-and', 'bitwise-bit-field', - 'bitwise-bit-set?', 'bitwise-ior', 'bitwise-not', 'bitwise-xor', - 'boolean?', 'bound-identifier=?', 'box', 'box-immutable', 'box?', - 'break-enabled', 'break-thread', 'build-path', - 'build-path/convention-type', 'byte-pregexp', 'byte-pregexp?', + # Generated by example.rkt + _builtins = [ + '*', '+', '-', '/', '<', '</c', '<=', '<=/c', '=', '=/c', '>', '>/c', + '>=', '>=/c', 'abort-current-continuation', 'abs', 'absolute-path?', + 'acos', 'add-between', 'add1', 'alarm-evt', 'always-evt', 'and/c', + 'andmap', 'angle', 'any/c', 'append', 'append*', 'append-map', 'apply', + 'argmax', 'argmin', 'arithmetic-shift', 'arity-at-least', + 'arity-at-least-value', 'arity-at-least?', 'arity-checking-wrapper', + 'arity-includes?', 'arity=?', 'asin', 'assf', 'assoc', 'assq', 'assv', + 'atan', 'bad-number-of-results', 'banner', 'base->-doms/c', + 'base->-rngs/c', 'base->?', 'between/c', 'bitwise-and', + 'bitwise-bit-field', 'bitwise-bit-set?', 'bitwise-ior', 'bitwise-not', + 'bitwise-xor', 'blame-add-car-context', 'blame-add-cdr-context', + 'blame-add-context', 'blame-add-missing-party', + 'blame-add-nth-arg-context', 'blame-add-or-context', + 'blame-add-range-context', 'blame-add-unknown-context', + 'blame-context', 'blame-contract', 'blame-fmt->-string', + 'blame-negative', 'blame-original?', 'blame-positive', + 'blame-replace-negative', 'blame-source', 'blame-swap', + 'blame-swapped?', 'blame-update', 'blame-value', 'blame?', 'boolean=?', + 'boolean?', 'bound-identifier=?', 'box', 'box-cas!', 'box-immutable', + 'box-immutable/c', 'box/c', 'box?', 'break-enabled', 'break-thread', + 'build-chaperone-contract-property', 'build-compound-type-name', + 'build-contract-property', 'build-flat-contract-property', + 'build-list', 'build-path', 'build-path/convention-type', + 'build-string', 'build-vector', 'byte-pregexp', 'byte-pregexp?', 'byte-ready?', 'byte-regexp', 'byte-regexp?', 'byte?', 'bytes', 'bytes->immutable-bytes', 'bytes->list', 'bytes->path', - 'bytes->path-element', 'bytes->string/latin-1', - 'bytes->string/locale', 'bytes->string/utf-8', 'bytes-append', + 'bytes->path-element', 'bytes->string/latin-1', 'bytes->string/locale', + 'bytes->string/utf-8', 'bytes-append', 'bytes-append*', 'bytes-close-converter', 'bytes-convert', 'bytes-convert-end', - 'bytes-converter?', 'bytes-copy', 'bytes-copy!', 'bytes-fill!', - 'bytes-length', 'bytes-open-converter', 'bytes-ref', 'bytes-set!', - 'bytes-utf-8-index', 'bytes-utf-8-length', 'bytes-utf-8-ref', - 'bytes<?', 'bytes=?', 'bytes>?', 'bytes?', 'caaaar', 'caaadr', - 'caaar', 'caadar', 'caaddr', 'caadr', 'caar', 'cadaar', 'cadadr', - 'cadar', 'caddar', 'cadddr', 'caddr', 'cadr', - 'call-in-nested-thread', 'call-with-break-parameterization', - 'call-with-composable-continuation', - 'call-with-continuation-barrier', 'call-with-continuation-prompt', - 'call-with-current-continuation', 'call-with-escape-continuation', - 'call-with-exception-handler', - 'call-with-immediate-continuation-mark', 'call-with-input-file', - 'call-with-output-file', 'call-with-parameterization', - 'call-with-semaphore', 'call-with-semaphore/enable-break', - 'call-with-values', 'call/cc', 'call/ec', 'car', 'cdaaar', - 'cdaadr', 'cdaar', 'cdadar', 'cdaddr', 'cdadr', 'cdar', 'cddaar', - 'cddadr', 'cddar', 'cdddar', 'cddddr', 'cdddr', 'cddr', 'cdr', - 'ceiling', 'channel-get', 'channel-put', 'channel-put-evt', - 'channel-try-get', 'channel?', 'chaperone-box', 'chaperone-evt', - 'chaperone-hash', 'chaperone-of?', 'chaperone-procedure', + 'bytes-converter?', 'bytes-copy', 'bytes-copy!', + 'bytes-environment-variable-name?', 'bytes-fill!', 'bytes-join', + 'bytes-length', 'bytes-no-nuls?', 'bytes-open-converter', 'bytes-ref', + 'bytes-set!', 'bytes-utf-8-index', 'bytes-utf-8-length', + 'bytes-utf-8-ref', 'bytes<?', 'bytes=?', 'bytes>?', 'bytes?', 'caaaar', + 'caaadr', 'caaar', 'caadar', 'caaddr', 'caadr', 'caar', 'cadaar', + 'cadadr', 'cadar', 'caddar', 'cadddr', 'caddr', 'cadr', + 'call-in-nested-thread', 'call-with-atomic-output-file', + 'call-with-break-parameterization', + 'call-with-composable-continuation', 'call-with-continuation-barrier', + 'call-with-continuation-prompt', 'call-with-current-continuation', + 'call-with-default-reading-parameterization', + 'call-with-escape-continuation', 'call-with-exception-handler', + 'call-with-file-lock/timeout', 'call-with-immediate-continuation-mark', + 'call-with-input-bytes', 'call-with-input-file', + 'call-with-input-file*', 'call-with-input-string', + 'call-with-output-bytes', 'call-with-output-file', + 'call-with-output-file*', 'call-with-output-string', + 'call-with-parameterization', 'call-with-semaphore', + 'call-with-semaphore/enable-break', 'call-with-values', 'call/cc', + 'call/ec', 'car', 'cdaaar', 'cdaadr', 'cdaar', 'cdadar', 'cdaddr', + 'cdadr', 'cdar', 'cddaar', 'cddadr', 'cddar', 'cdddar', 'cddddr', + 'cdddr', 'cddr', 'cdr', 'ceiling', 'channel-get', 'channel-put', + 'channel-put-evt', 'channel-put-evt?', 'channel-try-get', 'channel/c', + 'channel?', 'chaperone-box', 'chaperone-channel', + 'chaperone-continuation-mark-key', 'chaperone-contract-property?', + 'chaperone-contract?', 'chaperone-evt', 'chaperone-hash', + 'chaperone-of?', 'chaperone-procedure', 'chaperone-prompt-tag', 'chaperone-struct', 'chaperone-struct-type', 'chaperone-vector', 'chaperone?', 'char->integer', 'char-alphabetic?', 'char-blank?', 'char-ci<=?', 'char-ci<?', 'char-ci=?', 'char-ci>=?', 'char-ci>?', 'char-downcase', 'char-foldcase', 'char-general-category', 'char-graphic?', 'char-iso-control?', 'char-lower-case?', - 'char-numeric?', 'char-punctuation?', 'char-ready?', - 'char-symbolic?', 'char-title-case?', 'char-titlecase', - 'char-upcase', 'char-upper-case?', 'char-utf-8-length', - 'char-whitespace?', 'char<=?', 'char<?', 'char=?', 'char>=?', - 'char>?', 'char?', 'check-duplicate-identifier', - 'checked-procedure-check-and-extract', 'choice-evt', + 'char-numeric?', 'char-punctuation?', 'char-ready?', 'char-symbolic?', + 'char-title-case?', 'char-titlecase', 'char-upcase', + 'char-upper-case?', 'char-utf-8-length', 'char-whitespace?', 'char<=?', + 'char<?', 'char=?', 'char>=?', 'char>?', 'char?', + 'check-duplicate-identifier', 'checked-procedure-check-and-extract', + 'choice-evt', 'class->interface', 'class-info', 'class?', 'cleanse-path', 'close-input-port', 'close-output-port', - 'collect-garbage', 'collection-file-path', 'collection-path', - 'compile', 'compile-allow-set!-undefined', - 'compile-context-preservation-enabled', + 'coerce-chaperone-contract', 'coerce-chaperone-contracts', + 'coerce-contract', 'coerce-contract/f', 'coerce-contracts', + 'coerce-flat-contract', 'coerce-flat-contracts', 'collect-garbage', + 'collection-file-path', 'collection-path', 'compile', + 'compile-allow-set!-undefined', 'compile-context-preservation-enabled', 'compile-enforce-module-constants', 'compile-syntax', 'compiled-expression?', 'compiled-module-expression?', - 'complete-path?', 'complex?', 'cons', - 'continuation-mark-set->context', 'continuation-mark-set->list', - 'continuation-mark-set->list*', 'continuation-mark-set-first', - 'continuation-mark-set?', 'continuation-marks', - 'continuation-prompt-available?', 'continuation-prompt-tag?', - 'continuation?', 'copy-file', 'cos', - 'current-break-parameterization', 'current-code-inspector', - 'current-command-line-arguments', 'current-compile', - 'current-continuation-marks', 'current-custodian', - 'current-directory', 'current-drive', 'current-error-port', + 'complete-path?', 'complex?', 'compose', 'compose1', 'conjugate', + 'cons', 'cons/c', 'cons?', 'const', 'continuation-mark-key/c', + 'continuation-mark-key?', 'continuation-mark-set->context', + 'continuation-mark-set->list', 'continuation-mark-set->list*', + 'continuation-mark-set-first', 'continuation-mark-set?', + 'continuation-marks', 'continuation-prompt-available?', + 'continuation-prompt-tag?', 'continuation?', + 'contract-continuation-mark-key', 'contract-first-order', + 'contract-first-order-passes?', 'contract-name', 'contract-proc', + 'contract-projection', 'contract-property?', + 'contract-random-generate', 'contract-stronger?', + 'contract-struct-exercise', 'contract-struct-generate', + 'contract-val-first-projection', 'contract?', 'convert-stream', + 'copy-directory/files', 'copy-file', 'copy-port', 'cos', 'cosh', + 'count', 'current-blame-format', 'current-break-parameterization', + 'current-code-inspector', 'current-command-line-arguments', + 'current-compile', 'current-compiled-file-roots', + 'current-continuation-marks', 'current-contract-region', + 'current-custodian', 'current-directory', 'current-directory-for-user', + 'current-drive', 'current-environment-variables', 'current-error-port', 'current-eval', 'current-evt-pseudo-random-generator', - 'current-gc-milliseconds', 'current-get-interaction-input-port', - 'current-inexact-milliseconds', 'current-input-port', - 'current-inspector', 'current-library-collection-paths', + 'current-future', 'current-gc-milliseconds', + 'current-get-interaction-input-port', 'current-inexact-milliseconds', + 'current-input-port', 'current-inspector', + 'current-library-collection-links', 'current-library-collection-paths', 'current-load', 'current-load-extension', 'current-load-relative-directory', 'current-load/use-compiled', - 'current-locale', 'current-memory-use', 'current-milliseconds', - 'current-module-declare-name', 'current-module-declare-source', - 'current-module-name-resolver', 'current-namespace', + 'current-locale', 'current-logger', 'current-memory-use', + 'current-milliseconds', 'current-module-declare-name', + 'current-module-declare-source', 'current-module-name-resolver', + 'current-module-path-for-load', 'current-namespace', 'current-output-port', 'current-parameterization', 'current-preserved-thread-cell-values', 'current-print', 'current-process-milliseconds', 'current-prompt-read', @@ -158,133 +251,229 @@ class RacketLexer(RegexLexer): 'current-security-guard', 'current-subprocess-custodian-mode', 'current-thread', 'current-thread-group', 'current-thread-initial-stack-size', - 'current-write-relative-directory', 'custodian-box-value', - 'custodian-box?', 'custodian-limit-memory', + 'current-write-relative-directory', 'curry', 'curryr', + 'custodian-box-value', 'custodian-box?', 'custodian-limit-memory', 'custodian-managed-list', 'custodian-memory-accounting-available?', 'custodian-require-memory', 'custodian-shutdown-all', 'custodian?', 'custom-print-quotable-accessor', 'custom-print-quotable?', - 'custom-write-accessor', 'custom-write?', 'date', 'date*', - 'date*-nanosecond', 'date*-time-zone-name', 'date*?', 'date-day', - 'date-dst?', 'date-hour', 'date-minute', 'date-month', - 'date-second', 'date-time-zone-offset', 'date-week-day', - 'date-year', 'date-year-day', 'date?', 'datum-intern-literal', - 'default-continuation-prompt-tag', 'delete-directory', - 'delete-file', 'denominator', 'directory-exists?', - 'directory-list', 'display', 'displayln', 'dump-memory-stats', - 'dynamic-require', 'dynamic-require-for-syntax', 'dynamic-wind', - 'eof', 'eof-object?', 'ephemeron-value', 'ephemeron?', 'eprintf', - 'eq-hash-code', 'eq?', 'equal-hash-code', - 'equal-secondary-hash-code', 'equal?', 'equal?/recur', - 'eqv-hash-code', 'eqv?', 'error', 'error-display-handler', - 'error-escape-handler', 'error-print-context-length', - 'error-print-source-location', 'error-print-width', - 'error-value->string-handler', 'eval', 'eval-jit-enabled', - 'eval-syntax', 'even?', 'evt?', 'exact->inexact', 'exact-integer?', - 'exact-nonnegative-integer?', 'exact-positive-integer?', 'exact?', - 'executable-yield-handler', 'exit', 'exit-handler', 'exn', - 'exn-continuation-marks', 'exn-message', 'exn:break', - 'exn:break-continuation', 'exn:break?', 'exn:fail', - 'exn:fail:contract', 'exn:fail:contract:arity', - 'exn:fail:contract:arity?', 'exn:fail:contract:continuation', - 'exn:fail:contract:continuation?', - 'exn:fail:contract:divide-by-zero', + 'custom-write-accessor', 'custom-write-property-proc', 'custom-write?', + 'date', 'date*', 'date*-nanosecond', 'date*-time-zone-name', 'date*?', + 'date-day', 'date-dst?', 'date-hour', 'date-minute', 'date-month', + 'date-second', 'date-time-zone-offset', 'date-week-day', 'date-year', + 'date-year-day', 'date?', 'datum->syntax', 'datum-intern-literal', + 'default-continuation-prompt-tag', 'degrees->radians', + 'delete-directory', 'delete-directory/files', 'delete-file', + 'denominator', 'dict->list', 'dict-can-functional-set?', + 'dict-can-remove-keys?', 'dict-clear', 'dict-clear!', 'dict-copy', + 'dict-count', 'dict-empty?', 'dict-for-each', 'dict-has-key?', + 'dict-implements/c', 'dict-implements?', 'dict-iter-contract', + 'dict-iterate-first', 'dict-iterate-key', 'dict-iterate-next', + 'dict-iterate-value', 'dict-key-contract', 'dict-keys', 'dict-map', + 'dict-mutable?', 'dict-ref', 'dict-ref!', 'dict-remove', + 'dict-remove!', 'dict-set', 'dict-set!', 'dict-set*', 'dict-set*!', + 'dict-update', 'dict-update!', 'dict-value-contract', 'dict-values', + 'dict?', 'directory-exists?', 'directory-list', 'display', + 'display-lines', 'display-lines-to-file', 'display-to-file', + 'displayln', 'double-flonum?', 'drop', 'drop-right', 'dropf', + 'dropf-right', 'dump-memory-stats', 'dup-input-port', + 'dup-output-port', 'dynamic-get-field', 'dynamic-place', + 'dynamic-place*', 'dynamic-require', 'dynamic-require-for-syntax', + 'dynamic-send', 'dynamic-set-field!', 'dynamic-wind', 'eighth', + 'empty', 'empty-sequence', 'empty-stream', 'empty?', + 'environment-variables-copy', 'environment-variables-names', + 'environment-variables-ref', 'environment-variables-set!', + 'environment-variables?', 'eof', 'eof-evt', 'eof-object?', + 'ephemeron-value', 'ephemeron?', 'eprintf', 'eq-contract-val', + 'eq-contract?', 'eq-hash-code', 'eq?', 'equal-contract-val', + 'equal-contract?', 'equal-hash-code', 'equal-secondary-hash-code', + 'equal<%>', 'equal?', 'equal?/recur', 'eqv-hash-code', 'eqv?', 'error', + 'error-display-handler', 'error-escape-handler', + 'error-print-context-length', 'error-print-source-location', + 'error-print-width', 'error-value->string-handler', 'eval', + 'eval-jit-enabled', 'eval-syntax', 'even?', 'evt/c', 'evt?', + 'exact->inexact', 'exact-ceiling', 'exact-floor', 'exact-integer?', + 'exact-nonnegative-integer?', 'exact-positive-integer?', 'exact-round', + 'exact-truncate', 'exact?', 'executable-yield-handler', 'exit', + 'exit-handler', 'exn', 'exn-continuation-marks', 'exn-message', + 'exn:break', 'exn:break-continuation', 'exn:break:hang-up', + 'exn:break:hang-up?', 'exn:break:terminate', 'exn:break:terminate?', + 'exn:break?', 'exn:fail', 'exn:fail:contract', + 'exn:fail:contract:arity', 'exn:fail:contract:arity?', + 'exn:fail:contract:blame', 'exn:fail:contract:blame-object', + 'exn:fail:contract:blame?', 'exn:fail:contract:continuation', + 'exn:fail:contract:continuation?', 'exn:fail:contract:divide-by-zero', 'exn:fail:contract:divide-by-zero?', 'exn:fail:contract:non-fixnum-result', - 'exn:fail:contract:non-fixnum-result?', - 'exn:fail:contract:variable', 'exn:fail:contract:variable-id', - 'exn:fail:contract:variable?', 'exn:fail:contract?', - 'exn:fail:filesystem', 'exn:fail:filesystem:exists', - 'exn:fail:filesystem:exists?', 'exn:fail:filesystem:version', + 'exn:fail:contract:non-fixnum-result?', 'exn:fail:contract:variable', + 'exn:fail:contract:variable-id', 'exn:fail:contract:variable?', + 'exn:fail:contract?', 'exn:fail:filesystem', + 'exn:fail:filesystem:errno', 'exn:fail:filesystem:errno-errno', + 'exn:fail:filesystem:errno?', 'exn:fail:filesystem:exists', + 'exn:fail:filesystem:exists?', 'exn:fail:filesystem:missing-module', + 'exn:fail:filesystem:missing-module-path', + 'exn:fail:filesystem:missing-module?', 'exn:fail:filesystem:version', 'exn:fail:filesystem:version?', 'exn:fail:filesystem?', - 'exn:fail:network', 'exn:fail:network?', 'exn:fail:out-of-memory', - 'exn:fail:out-of-memory?', 'exn:fail:read', + 'exn:fail:network', 'exn:fail:network:errno', + 'exn:fail:network:errno-errno', 'exn:fail:network:errno?', + 'exn:fail:network?', 'exn:fail:object', 'exn:fail:object?', + 'exn:fail:out-of-memory', 'exn:fail:out-of-memory?', 'exn:fail:read', 'exn:fail:read-srclocs', 'exn:fail:read:eof', 'exn:fail:read:eof?', - 'exn:fail:read:non-char', 'exn:fail:read:non-char?', - 'exn:fail:read?', 'exn:fail:syntax', 'exn:fail:syntax-exprs', - 'exn:fail:syntax:unbound', 'exn:fail:syntax:unbound?', - 'exn:fail:syntax?', 'exn:fail:unsupported', + 'exn:fail:read:non-char', 'exn:fail:read:non-char?', 'exn:fail:read?', + 'exn:fail:syntax', 'exn:fail:syntax-exprs', + 'exn:fail:syntax:missing-module', + 'exn:fail:syntax:missing-module-path', + 'exn:fail:syntax:missing-module?', 'exn:fail:syntax:unbound', + 'exn:fail:syntax:unbound?', 'exn:fail:syntax?', 'exn:fail:unsupported', 'exn:fail:unsupported?', 'exn:fail:user', 'exn:fail:user?', - 'exn:fail?', 'exn:srclocs-accessor', 'exn:srclocs?', 'exn?', 'exp', - 'expand', 'expand-once', 'expand-syntax', 'expand-syntax-once', - 'expand-syntax-to-top-form', 'expand-to-top-form', - 'expand-user-path', 'expt', 'file-exists?', - 'file-or-directory-identity', 'file-or-directory-modify-seconds', - 'file-or-directory-permissions', 'file-position', 'file-size', - 'file-stream-buffer-mode', 'file-stream-port?', - 'filesystem-root-list', 'find-executable-path', - 'find-library-collection-paths', 'find-system-path', 'fixnum?', + 'exn:fail?', 'exn:misc:match?', 'exn:missing-module-accessor', + 'exn:missing-module?', 'exn:srclocs-accessor', 'exn:srclocs?', 'exn?', + 'exp', 'expand', 'expand-once', 'expand-syntax', 'expand-syntax-once', + 'expand-syntax-to-top-form', 'expand-to-top-form', 'expand-user-path', + 'explode-path', 'expt', 'externalizable<%>', 'false?', 'field-names', + 'fifth', 'file->bytes', 'file->bytes-lines', 'file->lines', + 'file->list', 'file->string', 'file->value', 'file-exists?', + 'file-name-from-path', 'file-or-directory-identity', + 'file-or-directory-modify-seconds', 'file-or-directory-permissions', + 'file-position', 'file-position*', 'file-size', + 'file-stream-buffer-mode', 'file-stream-port?', 'file-truncate', + 'filename-extension', 'filesystem-change-evt', + 'filesystem-change-evt-cancel', 'filesystem-change-evt?', + 'filesystem-root-list', 'filter', 'filter-map', 'filter-not', + 'filter-read-input-port', 'find-executable-path', 'find-files', + 'find-library-collection-links', 'find-library-collection-paths', + 'find-relative-path', 'find-system-path', 'findf', 'first', 'fixnum?', + 'flat-contract', 'flat-contract-predicate', 'flat-contract-property?', + 'flat-contract?', 'flat-named-contract', 'flatten', 'floating-point-bytes->real', 'flonum?', 'floor', 'flush-output', - 'for-each', 'force', 'format', 'fprintf', 'free-identifier=?', - 'gcd', 'generate-temporaries', 'gensym', 'get-output-bytes', - 'get-output-string', 'getenv', 'global-port-print-handler', - 'guard-evt', 'handle-evt', 'handle-evt?', 'hash', 'hash-equal?', - 'hash-eqv?', 'hash-has-key?', 'hash-placeholder?', 'hash-ref!', - 'hasheq', 'hasheqv', 'identifier-binding', - 'identifier-label-binding', 'identifier-prune-lexical-context', + 'fold-files', 'foldl', 'foldr', 'for-each', 'force', 'format', + 'fourth', 'fprintf', 'free-identifier=?', 'free-label-identifier=?', + 'free-template-identifier=?', 'free-transformer-identifier=?', + 'fsemaphore-count', 'fsemaphore-post', 'fsemaphore-try-wait?', + 'fsemaphore-wait', 'fsemaphore?', 'future', 'future?', + 'futures-enabled?', 'gcd', 'generate-member-key', + 'generate-temporaries', 'generic-set?', 'generic?', 'gensym', + 'get-output-bytes', 'get-output-string', 'get-preference', + 'get/build-val-first-projection', 'getenv', + 'global-port-print-handler', 'group-execute-bit', 'group-read-bit', + 'group-write-bit', 'guard-evt', 'handle-evt', 'handle-evt?', + 'has-contract?', 'hash', 'hash->list', 'hash-clear', 'hash-clear!', + 'hash-copy', 'hash-copy-clear', 'hash-count', 'hash-empty?', + 'hash-eq?', 'hash-equal?', 'hash-eqv?', 'hash-for-each', + 'hash-has-key?', 'hash-iterate-first', 'hash-iterate-key', + 'hash-iterate-next', 'hash-iterate-value', 'hash-keys', 'hash-map', + 'hash-placeholder?', 'hash-ref', 'hash-ref!', 'hash-remove', + 'hash-remove!', 'hash-set', 'hash-set!', 'hash-set*', 'hash-set*!', + 'hash-update', 'hash-update!', 'hash-values', 'hash-weak?', 'hash/c', + 'hash?', 'hasheq', 'hasheqv', 'identifier-binding', + 'identifier-binding-symbol', 'identifier-label-binding', + 'identifier-prune-lexical-context', 'identifier-prune-to-source-module', 'identifier-remove-from-definition-context', 'identifier-template-binding', 'identifier-transformer-binding', - 'identifier?', 'imag-part', 'immutable?', 'impersonate-box', - 'impersonate-hash', 'impersonate-procedure', 'impersonate-struct', - 'impersonate-vector', 'impersonator-of?', - 'impersonator-prop:application-mark', - 'impersonator-property-accessor-procedure?', - 'impersonator-property?', 'impersonator?', 'inexact->exact', - 'inexact-real?', 'inexact?', 'input-port?', 'inspector?', - 'integer->char', 'integer->integer-bytes', - 'integer-bytes->integer', 'integer-length', 'integer-sqrt', - 'integer-sqrt/remainder', 'integer?', + 'identifier?', 'identity', 'imag-part', 'immutable?', + 'impersonate-box', 'impersonate-channel', + 'impersonate-continuation-mark-key', 'impersonate-hash', + 'impersonate-procedure', 'impersonate-prompt-tag', + 'impersonate-struct', 'impersonate-vector', 'impersonator-contract?', + 'impersonator-ephemeron', 'impersonator-of?', + 'impersonator-prop:application-mark', 'impersonator-prop:contracted', + 'impersonator-property-accessor-procedure?', 'impersonator-property?', + 'impersonator?', 'implementation?', 'implementation?/c', 'in-bytes', + 'in-bytes-lines', 'in-cycle', 'in-dict', 'in-dict-keys', + 'in-dict-pairs', 'in-dict-values', 'in-directory', 'in-hash', + 'in-hash-keys', 'in-hash-pairs', 'in-hash-values', 'in-indexed', + 'in-input-port-bytes', 'in-input-port-chars', 'in-lines', 'in-list', + 'in-mlist', 'in-naturals', 'in-parallel', 'in-permutations', 'in-port', + 'in-producer', 'in-range', 'in-sequences', 'in-set', 'in-stream', + 'in-string', 'in-value', 'in-values*-sequence', 'in-values-sequence', + 'in-vector', 'inexact->exact', 'inexact-real?', 'inexact?', + 'infinite?', 'input-port-append', 'input-port?', 'inspector?', + 'instanceof/c', 'integer->char', 'integer->integer-bytes', + 'integer-bytes->integer', 'integer-in', 'integer-length', + 'integer-sqrt', 'integer-sqrt/remainder', 'integer?', + 'interface->method-names', 'interface-extension?', 'interface?', 'internal-definition-context-seal', 'internal-definition-context?', - 'keyword->string', 'keyword<?', 'keyword?', 'kill-thread', 'lcm', - 'length', 'liberal-define-context?', 'link-exists?', 'list', - 'list*', 'list->bytes', 'list->string', 'list->vector', 'list-ref', - 'list-tail', 'list?', 'load', 'load-extension', - 'load-on-demand-enabled', 'load-relative', - 'load-relative-extension', 'load/cd', 'load/use-compiled', - 'local-expand', 'local-expand/capture-lifts', - 'local-transformer-expand', - 'local-transformer-expand/capture-lifts', 'locale-string-encoding', - 'log', 'magnitude', 'make-arity-at-least', 'make-bytes', - 'make-channel', 'make-continuation-prompt-tag', 'make-custodian', - 'make-custodian-box', 'make-date', 'make-date*', - 'make-derived-parameter', 'make-directory', 'make-ephemeron', - 'make-exn', 'make-exn:break', 'make-exn:fail', - 'make-exn:fail:contract', 'make-exn:fail:contract:arity', + 'is-a?', 'is-a?/c', 'keyword->string', 'keyword-apply', 'keyword<?', + 'keyword?', 'keywords-match', 'kill-thread', 'last', 'last-pair', + 'lcm', 'length', 'liberal-define-context?', 'link-exists?', 'list', + 'list*', 'list->bytes', 'list->mutable-set', 'list->mutable-seteq', + 'list->mutable-seteqv', 'list->set', 'list->seteq', 'list->seteqv', + 'list->string', 'list->vector', 'list->weak-set', 'list->weak-seteq', + 'list->weak-seteqv', 'list-ref', 'list-tail', 'list/c', 'list?', + 'listof', 'load', 'load-extension', 'load-on-demand-enabled', + 'load-relative', 'load-relative-extension', 'load/cd', + 'load/use-compiled', 'local-expand', 'local-expand/capture-lifts', + 'local-transformer-expand', 'local-transformer-expand/capture-lifts', + 'locale-string-encoding', 'log', 'log-level?', 'log-max-level', + 'log-message', 'log-receiver?', 'logger-name', 'logger?', 'magnitude', + 'make-arity-at-least', 'make-base-empty-namespace', + 'make-base-namespace', 'make-bytes', 'make-channel', + 'make-chaperone-contract', 'make-continuation-mark-key', + 'make-continuation-prompt-tag', 'make-contract', 'make-custodian', + 'make-custodian-box', 'make-custom-hash', 'make-custom-hash-types', + 'make-custom-set', 'make-custom-set-types', 'make-date', 'make-date*', + 'make-derived-parameter', 'make-directory', 'make-directory*', + 'make-do-sequence', 'make-empty-namespace', + 'make-environment-variables', 'make-ephemeron', 'make-exn', + 'make-exn:break', 'make-exn:break:hang-up', 'make-exn:break:terminate', + 'make-exn:fail', 'make-exn:fail:contract', + 'make-exn:fail:contract:arity', 'make-exn:fail:contract:blame', 'make-exn:fail:contract:continuation', 'make-exn:fail:contract:divide-by-zero', 'make-exn:fail:contract:non-fixnum-result', 'make-exn:fail:contract:variable', 'make-exn:fail:filesystem', - 'make-exn:fail:filesystem:exists', + 'make-exn:fail:filesystem:errno', 'make-exn:fail:filesystem:exists', + 'make-exn:fail:filesystem:missing-module', 'make-exn:fail:filesystem:version', 'make-exn:fail:network', + 'make-exn:fail:network:errno', 'make-exn:fail:object', 'make-exn:fail:out-of-memory', 'make-exn:fail:read', 'make-exn:fail:read:eof', 'make-exn:fail:read:non-char', - 'make-exn:fail:syntax', 'make-exn:fail:syntax:unbound', - 'make-exn:fail:unsupported', 'make-exn:fail:user', - 'make-file-or-directory-link', 'make-hash-placeholder', - 'make-hasheq-placeholder', 'make-hasheqv', - 'make-hasheqv-placeholder', 'make-immutable-hasheqv', - 'make-impersonator-property', 'make-input-port', 'make-inspector', - 'make-known-char-range-list', 'make-output-port', 'make-parameter', - 'make-pipe', 'make-placeholder', 'make-polar', - 'make-prefab-struct', 'make-pseudo-random-generator', + 'make-exn:fail:syntax', 'make-exn:fail:syntax:missing-module', + 'make-exn:fail:syntax:unbound', 'make-exn:fail:unsupported', + 'make-exn:fail:user', 'make-file-or-directory-link', + 'make-flat-contract', 'make-fsemaphore', 'make-generic', + 'make-handle-get-preference-locked', 'make-hash', + 'make-hash-placeholder', 'make-hasheq', 'make-hasheq-placeholder', + 'make-hasheqv', 'make-hasheqv-placeholder', + 'make-immutable-custom-hash', 'make-immutable-hash', + 'make-immutable-hasheq', 'make-immutable-hasheqv', + 'make-impersonator-property', 'make-input-port', + 'make-input-port/read-to-peek', 'make-inspector', + 'make-keyword-procedure', 'make-known-char-range-list', + 'make-limited-input-port', 'make-list', 'make-lock-file-name', + 'make-log-receiver', 'make-logger', 'make-mixin-contract', + 'make-mutable-custom-set', 'make-none/c', 'make-object', + 'make-output-port', 'make-parameter', 'make-phantom-bytes', + 'make-pipe', 'make-pipe-with-specials', 'make-placeholder', + 'make-polar', 'make-prefab-struct', 'make-primitive-class', + 'make-proj-contract', 'make-pseudo-random-generator', 'make-reader-graph', 'make-readtable', 'make-rectangular', 'make-rename-transformer', 'make-resolved-module-path', 'make-security-guard', 'make-semaphore', 'make-set!-transformer', - 'make-shared-bytes', 'make-sibling-inspector', - 'make-special-comment', 'make-srcloc', 'make-string', - 'make-struct-field-accessor', 'make-struct-field-mutator', - 'make-struct-type', 'make-struct-type-property', - 'make-syntax-delta-introducer', 'make-syntax-introducer', - 'make-thread-cell', 'make-thread-group', 'make-vector', - 'make-weak-box', 'make-weak-hasheqv', 'make-will-executor', 'map', - 'max', 'mcar', 'mcdr', 'mcons', 'member', 'memq', 'memv', 'min', - 'module->exports', 'module->imports', 'module->language-info', - 'module->namespace', 'module-compiled-exports', + 'make-shared-bytes', 'make-sibling-inspector', 'make-special-comment', + 'make-srcloc', 'make-string', 'make-struct-field-accessor', + 'make-struct-field-mutator', 'make-struct-type', + 'make-struct-type-property', 'make-syntax-delta-introducer', + 'make-syntax-introducer', 'make-temporary-file', + 'make-tentative-pretty-print-output-port', 'make-thread-cell', + 'make-thread-group', 'make-vector', 'make-weak-box', + 'make-weak-custom-hash', 'make-weak-custom-set', 'make-weak-hash', + 'make-weak-hasheq', 'make-weak-hasheqv', 'make-will-executor', 'map', + 'match-equality-test', 'matches-arity-exactly?', 'max', 'mcar', 'mcdr', + 'mcons', 'member', 'member-name-key-hash-code', 'member-name-key=?', + 'member-name-key?', 'memf', 'memq', 'memv', 'merge-input', + 'method-in-interface?', 'min', 'mixin-contract', 'module->exports', + 'module->imports', 'module->language-info', 'module->namespace', + 'module-compiled-cross-phase-persistent?', 'module-compiled-exports', 'module-compiled-imports', 'module-compiled-language-info', - 'module-compiled-name', 'module-path-index-join', + 'module-compiled-name', 'module-compiled-submodules', + 'module-declared?', 'module-path-index-join', 'module-path-index-resolve', 'module-path-index-split', - 'module-path-index?', 'module-path?', 'module-predefined?', - 'module-provide-protected?', 'modulo', 'mpair?', 'nack-guard-evt', + 'module-path-index-submodule', 'module-path-index?', 'module-path?', + 'module-predefined?', 'module-provide-protected?', 'modulo', 'mpair?', + 'mutable-set', 'mutable-seteq', 'mutable-seteqv', 'n->th', + 'nack-guard-evt', 'namespace-anchor->empty-namespace', + 'namespace-anchor->namespace', 'namespace-anchor?', 'namespace-attach-module', 'namespace-attach-module-declaration', 'namespace-base-phase', 'namespace-mapped-symbols', 'namespace-module-identifier', 'namespace-module-registry', @@ -292,136 +481,212 @@ class RacketLexer(RegexLexer): 'namespace-require/copy', 'namespace-require/expansion-time', 'namespace-set-variable-value!', 'namespace-symbol->identifier', 'namespace-syntax-introduce', 'namespace-undefine-variable!', - 'namespace-unprotect-module', 'namespace-variable-value', - 'namespace?', 'negative?', 'never-evt', 'newline', - 'normal-case-path', 'not', 'null', 'null?', 'number->string', - 'number?', 'numerator', 'object-name', 'odd?', 'open-input-bytes', + 'namespace-unprotect-module', 'namespace-variable-value', 'namespace?', + 'nan?', 'natural-number/c', 'negate', 'negative?', 'never-evt', + u'new-∀/c', u'new-∃/c', 'newline', 'ninth', 'non-empty-listof', + 'none/c', 'normal-case-path', 'normalize-arity', 'normalize-path', + 'normalized-arity?', 'not', 'not/c', 'null', 'null?', 'number->string', + 'number?', 'numerator', 'object%', 'object->vector', 'object-info', + 'object-interface', 'object-method-arity-includes?', 'object-name', + 'object=?', 'object?', 'odd?', 'one-of/c', 'open-input-bytes', 'open-input-file', 'open-input-output-file', 'open-input-string', - 'open-output-bytes', 'open-output-file', 'open-output-string', - 'ormap', 'output-port?', 'pair?', 'parameter-procedure=?', - 'parameter?', 'parameterization?', 'path->bytes', - 'path->complete-path', 'path->directory-path', 'path->string', - 'path-add-suffix', 'path-convention-type', 'path-element->bytes', - 'path-element->string', 'path-for-some-system?', - 'path-list-string->path-list', 'path-replace-suffix', - 'path-string?', 'path?', 'peek-byte', 'peek-byte-or-special', - 'peek-bytes', 'peek-bytes!', 'peek-bytes-avail!', - 'peek-bytes-avail!*', 'peek-bytes-avail!/enable-break', - 'peek-char', 'peek-char-or-special', 'peek-string', 'peek-string!', - 'pipe-content-length', 'placeholder-get', 'placeholder-set!', - 'placeholder?', 'poll-guard-evt', 'port-closed-evt', - 'port-closed?', 'port-commit-peeked', 'port-count-lines!', - 'port-count-lines-enabled', 'port-display-handler', - 'port-file-identity', 'port-file-unlock', 'port-next-location', - 'port-print-handler', 'port-progress-evt', - 'port-provides-progress-evts?', 'port-read-handler', - 'port-try-file-lock?', 'port-write-handler', 'port-writes-atomic?', - 'port-writes-special?', 'port?', 'positive?', - 'prefab-key->struct-type', 'prefab-struct-key', 'pregexp', - 'pregexp?', 'primitive-closure?', 'primitive-result-arity', - 'primitive?', 'print', 'print-as-expression', + 'open-output-bytes', 'open-output-file', 'open-output-nowhere', + 'open-output-string', 'or/c', 'order-of-magnitude', 'ormap', + 'other-execute-bit', 'other-read-bit', 'other-write-bit', + 'output-port?', 'pair?', 'parameter-procedure=?', 'parameter/c', + 'parameter?', 'parameterization?', 'parse-command-line', 'partition', + 'path->bytes', 'path->complete-path', 'path->directory-path', + 'path->string', 'path-add-suffix', 'path-convention-type', + 'path-element->bytes', 'path-element->string', 'path-element?', + 'path-for-some-system?', 'path-list-string->path-list', 'path-only', + 'path-replace-suffix', 'path-string?', 'path<?', 'path?', + 'pathlist-closure', 'peek-byte', 'peek-byte-or-special', 'peek-bytes', + 'peek-bytes!', 'peek-bytes!-evt', 'peek-bytes-avail!', + 'peek-bytes-avail!*', 'peek-bytes-avail!-evt', + 'peek-bytes-avail!/enable-break', 'peek-bytes-evt', 'peek-char', + 'peek-char-or-special', 'peek-string', 'peek-string!', + 'peek-string!-evt', 'peek-string-evt', 'peeking-input-port', + 'permutations', 'phantom-bytes?', 'pi', 'pi.f', 'pipe-content-length', + 'place-break', 'place-channel', 'place-channel-get', + 'place-channel-put', 'place-channel-put/get', 'place-channel?', + 'place-dead-evt', 'place-enabled?', 'place-kill', 'place-location?', + 'place-message-allowed?', 'place-sleep', 'place-wait', 'place?', + 'placeholder-get', 'placeholder-set!', 'placeholder?', + 'poll-guard-evt', 'port->bytes', 'port->bytes-lines', 'port->lines', + 'port->list', 'port->string', 'port-closed-evt', 'port-closed?', + 'port-commit-peeked', 'port-count-lines!', 'port-count-lines-enabled', + 'port-counts-lines?', 'port-display-handler', 'port-file-identity', + 'port-file-unlock', 'port-next-location', 'port-print-handler', + 'port-progress-evt', 'port-provides-progress-evts?', + 'port-read-handler', 'port-try-file-lock?', 'port-write-handler', + 'port-writes-atomic?', 'port-writes-special?', 'port?', 'positive?', + 'predicate/c', 'prefab-key->struct-type', 'prefab-key?', + 'prefab-struct-key', 'preferences-lock-file-mode', 'pregexp', + 'pregexp?', 'pretty-display', 'pretty-format', 'pretty-print', + 'pretty-print-.-symbol-without-bars', + 'pretty-print-abbreviate-read-macros', 'pretty-print-columns', + 'pretty-print-current-style-table', 'pretty-print-depth', + 'pretty-print-exact-as-decimal', 'pretty-print-extend-style-table', + 'pretty-print-handler', 'pretty-print-newline', + 'pretty-print-post-print-hook', 'pretty-print-pre-print-hook', + 'pretty-print-print-hook', 'pretty-print-print-line', + 'pretty-print-remap-stylable', 'pretty-print-show-inexactness', + 'pretty-print-size-hook', 'pretty-print-style-table?', + 'pretty-printing', 'pretty-write', 'primitive-closure?', + 'primitive-result-arity', 'primitive?', 'print', 'print-as-expression', 'print-boolean-long-form', 'print-box', 'print-graph', 'print-hash-table', 'print-mpair-curly-braces', 'print-pair-curly-braces', 'print-reader-abbreviations', 'print-struct', 'print-syntax-width', 'print-unreadable', - 'print-vector-length', 'printf', 'procedure->method', - 'procedure-arity', 'procedure-arity-includes?', 'procedure-arity?', + 'print-vector-length', 'printable/c', 'printable<%>', 'printf', + 'procedure->method', 'procedure-arity', 'procedure-arity-includes/c', + 'procedure-arity-includes?', 'procedure-arity?', 'procedure-closure-contents-eq?', 'procedure-extract-target', - 'procedure-reduce-arity', 'procedure-rename', - 'procedure-struct-type?', 'procedure?', 'promise?', - 'prop:arity-string', 'prop:checked-procedure', - 'prop:custom-print-quotable', 'prop:custom-write', - 'prop:equal+hash', 'prop:evt', 'prop:exn:srclocs', + 'procedure-keywords', 'procedure-reduce-arity', + 'procedure-reduce-keyword-arity', 'procedure-rename', + 'procedure-struct-type?', 'procedure?', 'process', 'process*', + 'process*/ports', 'process/ports', 'processor-count', 'progress-evt?', + 'promise-forced?', 'promise-running?', 'promise/c', 'promise?', + 'prop:arity-string', 'prop:chaperone-contract', + 'prop:checked-procedure', 'prop:contract', 'prop:contracted', + 'prop:custom-print-quotable', 'prop:custom-write', 'prop:dict', + 'prop:dict/contract', 'prop:equal+hash', 'prop:evt', + 'prop:exn:missing-module', 'prop:exn:srclocs', 'prop:flat-contract', 'prop:impersonator-of', 'prop:input-port', - 'prop:liberal-define-context', 'prop:output-port', - 'prop:procedure', 'prop:rename-transformer', - 'prop:set!-transformer', 'pseudo-random-generator->vector', + 'prop:liberal-define-context', 'prop:opt-chaperone-contract', + 'prop:opt-chaperone-contract-get-test', 'prop:opt-chaperone-contract?', + 'prop:output-port', 'prop:place-location', 'prop:procedure', + 'prop:rename-transformer', 'prop:sequence', 'prop:set!-transformer', + 'prop:stream', 'proper-subset?', 'pseudo-random-generator->vector', 'pseudo-random-generator-vector?', 'pseudo-random-generator?', - 'putenv', 'quotient', 'quotient/remainder', 'raise', - 'raise-arity-error', 'raise-mismatch-error', 'raise-syntax-error', - 'raise-type-error', 'raise-user-error', 'random', 'random-seed', - 'rational?', 'rationalize', 'read', 'read-accept-bar-quote', - 'read-accept-box', 'read-accept-compiled', 'read-accept-dot', - 'read-accept-graph', 'read-accept-infix-dot', 'read-accept-lang', - 'read-accept-quasiquote', 'read-accept-reader', 'read-byte', - 'read-byte-or-special', 'read-bytes', 'read-bytes!', - 'read-bytes-avail!', 'read-bytes-avail!*', - 'read-bytes-avail!/enable-break', 'read-bytes-line', - 'read-case-sensitive', 'read-char', 'read-char-or-special', - 'read-curly-brace-as-paren', 'read-decimal-as-inexact', - 'read-eval-print-loop', 'read-language', 'read-line', - 'read-on-demand-source', 'read-square-bracket-as-paren', - 'read-string', 'read-string!', 'read-syntax', + 'put-preferences', 'putenv', 'quotient', 'quotient/remainder', + 'radians->degrees', 'raise', 'raise-argument-error', + 'raise-arguments-error', 'raise-arity-error', 'raise-blame-error', + 'raise-contract-error', 'raise-mismatch-error', + 'raise-not-cons-blame-error', 'raise-range-error', + 'raise-result-error', 'raise-syntax-error', 'raise-type-error', + 'raise-user-error', 'random', 'random-seed', 'range', 'rational?', + 'rationalize', 'read', 'read-accept-bar-quote', 'read-accept-box', + 'read-accept-compiled', 'read-accept-dot', 'read-accept-graph', + 'read-accept-infix-dot', 'read-accept-lang', 'read-accept-quasiquote', + 'read-accept-reader', 'read-byte', 'read-byte-or-special', + 'read-bytes', 'read-bytes!', 'read-bytes!-evt', 'read-bytes-avail!', + 'read-bytes-avail!*', 'read-bytes-avail!-evt', + 'read-bytes-avail!/enable-break', 'read-bytes-evt', 'read-bytes-line', + 'read-bytes-line-evt', 'read-case-sensitive', 'read-char', + 'read-char-or-special', 'read-curly-brace-as-paren', + 'read-decimal-as-inexact', 'read-eval-print-loop', 'read-language', + 'read-line', 'read-line-evt', 'read-on-demand-source', + 'read-square-bracket-as-paren', 'read-string', 'read-string!', + 'read-string!-evt', 'read-string-evt', 'read-syntax', 'read-syntax/recursive', 'read/recursive', 'readtable-mapping', - 'readtable?', 'real->double-flonum', 'real->floating-point-bytes', - 'real->single-flonum', 'real-part', 'real?', 'regexp', - 'regexp-match', 'regexp-match-peek', 'regexp-match-peek-immediate', - 'regexp-match-peek-positions', + 'readtable?', 'real->decimal-string', 'real->double-flonum', + 'real->floating-point-bytes', 'real->single-flonum', 'real-in', + 'real-part', 'real?', 'reencode-input-port', 'reencode-output-port', + 'regexp', 'regexp-match', 'regexp-match*', 'regexp-match-evt', + 'regexp-match-exact?', 'regexp-match-peek', + 'regexp-match-peek-immediate', 'regexp-match-peek-positions', + 'regexp-match-peek-positions*', 'regexp-match-peek-positions-immediate', 'regexp-match-peek-positions-immediate/end', 'regexp-match-peek-positions/end', 'regexp-match-positions', - 'regexp-match-positions/end', 'regexp-match/end', 'regexp-match?', - 'regexp-max-lookbehind', 'regexp-replace', 'regexp-replace*', - 'regexp?', 'relative-path?', 'remainder', + 'regexp-match-positions*', 'regexp-match-positions/end', + 'regexp-match/end', 'regexp-match?', 'regexp-max-lookbehind', + 'regexp-quote', 'regexp-replace', 'regexp-replace*', + 'regexp-replace-quote', 'regexp-replaces', 'regexp-split', + 'regexp-try-match', 'regexp?', 'relative-path?', 'relocate-input-port', + 'relocate-output-port', 'remainder', 'remove', 'remove*', + 'remove-duplicates', 'remq', 'remq*', 'remv', 'remv*', 'rename-file-or-directory', 'rename-transformer-target', - 'rename-transformer?', 'resolve-path', 'resolved-module-path-name', - 'resolved-module-path?', 'reverse', 'round', 'seconds->date', - 'security-guard?', 'semaphore-peek-evt', 'semaphore-post', - 'semaphore-try-wait?', 'semaphore-wait', - 'semaphore-wait/enable-break', 'semaphore?', - 'set!-transformer-procedure', 'set!-transformer?', 'set-box!', - 'set-mcar!', 'set-mcdr!', 'set-port-next-location!', - 'shared-bytes', 'shell-execute', 'simplify-path', 'sin', - 'single-flonum?', 'sleep', 'special-comment-value', - 'special-comment?', 'split-path', 'sqrt', 'srcloc', - 'srcloc-column', 'srcloc-line', 'srcloc-position', 'srcloc-source', - 'srcloc-span', 'srcloc?', 'string', 'string->bytes/latin-1', - 'string->bytes/locale', 'string->bytes/utf-8', + 'rename-transformer?', 'reroot-path', 'resolve-path', + 'resolved-module-path-name', 'resolved-module-path?', 'rest', + 'reverse', 'round', 'second', 'seconds->date', 'security-guard?', + 'semaphore-peek-evt', 'semaphore-peek-evt?', 'semaphore-post', + 'semaphore-try-wait?', 'semaphore-wait', 'semaphore-wait/enable-break', + 'semaphore?', 'sequence->list', 'sequence->stream', + 'sequence-add-between', 'sequence-andmap', 'sequence-append', + 'sequence-count', 'sequence-filter', 'sequence-fold', + 'sequence-for-each', 'sequence-generate', 'sequence-generate*', + 'sequence-length', 'sequence-map', 'sequence-ormap', 'sequence-ref', + 'sequence-tail', 'sequence?', 'set', 'set!-transformer-procedure', + 'set!-transformer?', 'set->list', 'set->stream', 'set-add', 'set-add!', + 'set-box!', 'set-clear', 'set-clear!', 'set-copy', 'set-copy-clear', + 'set-count', 'set-empty?', 'set-eq?', 'set-equal?', 'set-eqv?', + 'set-first', 'set-for-each', 'set-implements/c', 'set-implements?', + 'set-intersect', 'set-intersect!', 'set-map', 'set-mcar!', 'set-mcdr!', + 'set-member?', 'set-mutable?', 'set-phantom-bytes!', + 'set-port-next-location!', 'set-remove', 'set-remove!', 'set-rest', + 'set-subtract', 'set-subtract!', 'set-symmetric-difference', + 'set-symmetric-difference!', 'set-union', 'set-union!', 'set-weak?', + 'set/c', 'set=?', 'set?', 'seteq', 'seteqv', 'seventh', 'sgn', + 'shared-bytes', 'shell-execute', 'shrink-path-wrt', 'shuffle', + 'simple-form-path', 'simplify-path', 'sin', 'single-flonum?', 'sinh', + 'sixth', 'skip-projection-wrapper?', 'sleep', + 'some-system-path->string', 'sort', 'special-comment-value', + 'special-comment?', 'special-filter-input-port', 'split-at', + 'split-at-right', 'split-path', 'splitf-at', 'splitf-at-right', 'sqr', + 'sqrt', 'srcloc', 'srcloc->string', 'srcloc-column', 'srcloc-line', + 'srcloc-position', 'srcloc-source', 'srcloc-span', 'srcloc?', + 'stop-after', 'stop-before', 'stream->list', 'stream-add-between', + 'stream-andmap', 'stream-append', 'stream-count', 'stream-empty?', + 'stream-filter', 'stream-first', 'stream-fold', 'stream-for-each', + 'stream-length', 'stream-map', 'stream-ormap', 'stream-ref', + 'stream-rest', 'stream-tail', 'stream?', 'string', + 'string->bytes/latin-1', 'string->bytes/locale', 'string->bytes/utf-8', 'string->immutable-string', 'string->keyword', 'string->list', 'string->number', 'string->path', 'string->path-element', - 'string->symbol', 'string->uninterned-symbol', - 'string->unreadable-symbol', 'string-append', 'string-ci<=?', - 'string-ci<?', 'string-ci=?', 'string-ci>=?', 'string-ci>?', - 'string-copy', 'string-copy!', 'string-downcase', 'string-fill!', - 'string-foldcase', 'string-length', 'string-locale-ci<?', - 'string-locale-ci=?', 'string-locale-ci>?', - 'string-locale-downcase', 'string-locale-upcase', + 'string->some-system-path', 'string->symbol', + 'string->uninterned-symbol', 'string->unreadable-symbol', + 'string-append', 'string-append*', 'string-ci<=?', 'string-ci<?', + 'string-ci=?', 'string-ci>=?', 'string-ci>?', 'string-copy', + 'string-copy!', 'string-downcase', 'string-environment-variable-name?', + 'string-fill!', 'string-foldcase', 'string-join', 'string-len/c', + 'string-length', 'string-locale-ci<?', 'string-locale-ci=?', + 'string-locale-ci>?', 'string-locale-downcase', 'string-locale-upcase', 'string-locale<?', 'string-locale=?', 'string-locale>?', - 'string-normalize-nfc', 'string-normalize-nfd', - 'string-normalize-nfkc', 'string-normalize-nfkd', 'string-ref', - 'string-set!', 'string-titlecase', 'string-upcase', - 'string-utf-8-length', 'string<=?', 'string<?', 'string=?', - 'string>=?', 'string>?', 'string?', 'struct->vector', + 'string-no-nuls?', 'string-normalize-nfc', 'string-normalize-nfd', + 'string-normalize-nfkc', 'string-normalize-nfkd', + 'string-normalize-spaces', 'string-ref', 'string-replace', + 'string-set!', 'string-split', 'string-titlecase', 'string-trim', + 'string-upcase', 'string-utf-8-length', 'string<=?', 'string<?', + 'string=?', 'string>=?', 'string>?', 'string?', 'struct->vector', 'struct-accessor-procedure?', 'struct-constructor-procedure?', 'struct-info', 'struct-mutator-procedure?', 'struct-predicate-procedure?', 'struct-type-info', 'struct-type-make-constructor', 'struct-type-make-predicate', - 'struct-type-property-accessor-procedure?', + 'struct-type-property-accessor-procedure?', 'struct-type-property/c', 'struct-type-property?', 'struct-type?', 'struct:arity-at-least', 'struct:date', 'struct:date*', 'struct:exn', 'struct:exn:break', + 'struct:exn:break:hang-up', 'struct:exn:break:terminate', 'struct:exn:fail', 'struct:exn:fail:contract', - 'struct:exn:fail:contract:arity', + 'struct:exn:fail:contract:arity', 'struct:exn:fail:contract:blame', 'struct:exn:fail:contract:continuation', 'struct:exn:fail:contract:divide-by-zero', 'struct:exn:fail:contract:non-fixnum-result', 'struct:exn:fail:contract:variable', 'struct:exn:fail:filesystem', + 'struct:exn:fail:filesystem:errno', 'struct:exn:fail:filesystem:exists', + 'struct:exn:fail:filesystem:missing-module', 'struct:exn:fail:filesystem:version', 'struct:exn:fail:network', + 'struct:exn:fail:network:errno', 'struct:exn:fail:object', 'struct:exn:fail:out-of-memory', 'struct:exn:fail:read', 'struct:exn:fail:read:eof', 'struct:exn:fail:read:non-char', - 'struct:exn:fail:syntax', 'struct:exn:fail:syntax:unbound', - 'struct:exn:fail:unsupported', 'struct:exn:fail:user', - 'struct:srcloc', 'struct?', 'sub1', 'subbytes', 'subprocess', - 'subprocess-group-enabled', 'subprocess-kill', 'subprocess-pid', - 'subprocess-status', 'subprocess-wait', 'subprocess?', 'substring', - 'symbol->string', 'symbol-interned?', 'symbol-unreadable?', - 'symbol?', 'sync', 'sync/enable-break', 'sync/timeout', - 'sync/timeout/enable-break', 'syntax->list', 'syntax-arm', - 'syntax-column', 'syntax-disarm', 'syntax-e', 'syntax-line', - 'syntax-local-bind-syntaxes', 'syntax-local-certifier', - 'syntax-local-context', 'syntax-local-expand-expression', - 'syntax-local-get-shadower', 'syntax-local-introduce', - 'syntax-local-lift-context', 'syntax-local-lift-expression', + 'struct:exn:fail:syntax', 'struct:exn:fail:syntax:missing-module', + 'struct:exn:fail:syntax:unbound', 'struct:exn:fail:unsupported', + 'struct:exn:fail:user', 'struct:srcloc', + 'struct:wrapped-extra-arg-arrow', 'struct?', 'sub1', 'subbytes', + 'subclass?', 'subclass?/c', 'subprocess', 'subprocess-group-enabled', + 'subprocess-kill', 'subprocess-pid', 'subprocess-status', + 'subprocess-wait', 'subprocess?', 'subset?', 'substring', + 'symbol->string', 'symbol-interned?', 'symbol-unreadable?', 'symbol<?', + 'symbol=?', 'symbol?', 'symbols', 'sync', 'sync/enable-break', + 'sync/timeout', 'sync/timeout/enable-break', 'syntax->datum', + 'syntax->list', 'syntax-arm', 'syntax-column', 'syntax-disarm', + 'syntax-e', 'syntax-line', 'syntax-local-bind-syntaxes', + 'syntax-local-certifier', 'syntax-local-context', + 'syntax-local-expand-expression', 'syntax-local-get-shadower', + 'syntax-local-introduce', 'syntax-local-lift-context', + 'syntax-local-lift-expression', 'syntax-local-lift-module-end-declaration', 'syntax-local-lift-provide', 'syntax-local-lift-require', 'syntax-local-lift-values-expression', @@ -430,163 +695,229 @@ class RacketLexer(RegexLexer): 'syntax-local-module-defined-identifiers', 'syntax-local-module-exports', 'syntax-local-module-required-identifiers', 'syntax-local-name', - 'syntax-local-phase-level', + 'syntax-local-phase-level', 'syntax-local-submodules', 'syntax-local-transforming-module-provides?', 'syntax-local-value', - 'syntax-local-value/immediate', 'syntax-original?', - 'syntax-position', 'syntax-property', - 'syntax-property-symbol-keys', 'syntax-protect', 'syntax-rearm', - 'syntax-recertify', 'syntax-shift-phase-level', 'syntax-source', - 'syntax-source-module', 'syntax-span', 'syntax-taint', + 'syntax-local-value/immediate', 'syntax-original?', 'syntax-position', + 'syntax-property', 'syntax-property-symbol-keys', 'syntax-protect', + 'syntax-rearm', 'syntax-recertify', 'syntax-shift-phase-level', + 'syntax-source', 'syntax-source-module', 'syntax-span', 'syntax-taint', 'syntax-tainted?', 'syntax-track-origin', 'syntax-transforming-module-expression?', 'syntax-transforming?', - 'syntax?', 'system-big-endian?', 'system-idle-evt', - 'system-language+country', 'system-library-subpath', - 'system-path-convention-type', 'system-type', 'tan', - 'tcp-abandon-port', 'tcp-accept', 'tcp-accept-evt', - 'tcp-accept-ready?', 'tcp-accept/enable-break', 'tcp-addresses', - 'tcp-close', 'tcp-connect', 'tcp-connect/enable-break', - 'tcp-listen', 'tcp-listener?', 'tcp-port?', 'terminal-port?', - 'thread', 'thread-cell-ref', 'thread-cell-set!', 'thread-cell?', - 'thread-dead-evt', 'thread-dead?', 'thread-group?', - 'thread-resume', 'thread-resume-evt', 'thread-rewind-receive', - 'thread-running?', 'thread-suspend', 'thread-suspend-evt', + 'syntax/c', 'syntax?', 'system', 'system*', 'system*/exit-code', + 'system-big-endian?', 'system-idle-evt', 'system-language+country', + 'system-library-subpath', 'system-path-convention-type', 'system-type', + 'system/exit-code', 'tail-marks-match?', 'take', 'take-right', 'takef', + 'takef-right', 'tan', 'tanh', 'tcp-abandon-port', 'tcp-accept', + 'tcp-accept-evt', 'tcp-accept-ready?', 'tcp-accept/enable-break', + 'tcp-addresses', 'tcp-close', 'tcp-connect', + 'tcp-connect/enable-break', 'tcp-listen', 'tcp-listener?', 'tcp-port?', + 'tentative-pretty-print-port-cancel', + 'tentative-pretty-print-port-transfer', 'tenth', 'terminal-port?', + 'the-unsupplied-arg', 'third', 'thread', 'thread-cell-ref', + 'thread-cell-set!', 'thread-cell-values?', 'thread-cell?', + 'thread-dead-evt', 'thread-dead?', 'thread-group?', 'thread-receive', + 'thread-receive-evt', 'thread-resume', 'thread-resume-evt', + 'thread-rewind-receive', 'thread-running?', 'thread-send', + 'thread-suspend', 'thread-suspend-evt', 'thread-try-receive', 'thread-wait', 'thread/suspend-to-kill', 'thread?', 'time-apply', - 'truncate', 'udp-addresses', 'udp-bind!', 'udp-bound?', - 'udp-close', 'udp-connect!', 'udp-connected?', 'udp-open-socket', - 'udp-receive!', 'udp-receive!*', 'udp-receive!-evt', - 'udp-receive!/enable-break', 'udp-receive-ready-evt', 'udp-send', - 'udp-send*', 'udp-send-evt', 'udp-send-ready-evt', 'udp-send-to', - 'udp-send-to*', 'udp-send-to-evt', 'udp-send-to/enable-break', - 'udp-send/enable-break', 'udp?', 'unbox', - 'uncaught-exception-handler', 'use-collection-link-paths', + 'touch', 'transplant-input-port', 'transplant-output-port', 'true', + 'truncate', 'udp-addresses', 'udp-bind!', 'udp-bound?', 'udp-close', + 'udp-connect!', 'udp-connected?', 'udp-multicast-interface', + 'udp-multicast-join-group!', 'udp-multicast-leave-group!', + 'udp-multicast-loopback?', 'udp-multicast-set-interface!', + 'udp-multicast-set-loopback!', 'udp-multicast-set-ttl!', + 'udp-multicast-ttl', 'udp-open-socket', 'udp-receive!', + 'udp-receive!*', 'udp-receive!-evt', 'udp-receive!/enable-break', + 'udp-receive-ready-evt', 'udp-send', 'udp-send*', 'udp-send-evt', + 'udp-send-ready-evt', 'udp-send-to', 'udp-send-to*', 'udp-send-to-evt', + 'udp-send-to/enable-break', 'udp-send/enable-break', 'udp?', 'unbox', + 'uncaught-exception-handler', 'unit?', 'unspecified-dom', + 'unsupplied-arg?', 'use-collection-link-paths', 'use-compiled-file-paths', 'use-user-specific-search-paths', - 'values', 'variable-reference->empty-namespace', + 'user-execute-bit', 'user-read-bit', 'user-write-bit', + 'value-contract', 'values', 'variable-reference->empty-namespace', 'variable-reference->module-base-phase', 'variable-reference->module-declaration-inspector', - 'variable-reference->module-source', - 'variable-reference->namespace', 'variable-reference->phase', + 'variable-reference->module-path-index', + 'variable-reference->module-source', 'variable-reference->namespace', + 'variable-reference->phase', 'variable-reference->resolved-module-path', 'variable-reference-constant?', 'variable-reference?', 'vector', 'vector->immutable-vector', 'vector->list', - 'vector->pseudo-random-generator', - 'vector->pseudo-random-generator!', 'vector->values', - 'vector-fill!', 'vector-immutable', 'vector-length', 'vector-ref', - 'vector-set!', 'vector-set-performance-stats!', 'vector?', - 'version', 'void', 'void?', 'weak-box-value', 'weak-box?', - 'will-execute', 'will-executor?', 'will-register', - 'will-try-execute', 'with-input-from-file', 'with-output-to-file', - 'wrap-evt', 'write', 'write-byte', 'write-bytes', + 'vector->pseudo-random-generator', 'vector->pseudo-random-generator!', + 'vector->values', 'vector-append', 'vector-argmax', 'vector-argmin', + 'vector-copy', 'vector-copy!', 'vector-count', 'vector-drop', + 'vector-drop-right', 'vector-fill!', 'vector-filter', + 'vector-filter-not', 'vector-immutable', 'vector-immutable/c', + 'vector-immutableof', 'vector-length', 'vector-map', 'vector-map!', + 'vector-member', 'vector-memq', 'vector-memv', 'vector-ref', + 'vector-set!', 'vector-set*!', 'vector-set-performance-stats!', + 'vector-split-at', 'vector-split-at-right', 'vector-take', + 'vector-take-right', 'vector/c', 'vector?', 'vectorof', 'version', + 'void', 'void?', 'weak-box-value', 'weak-box?', 'weak-set', + 'weak-seteq', 'weak-seteqv', 'will-execute', 'will-executor?', + 'will-register', 'will-try-execute', 'with-input-from-bytes', + 'with-input-from-file', 'with-input-from-string', + 'with-output-to-bytes', 'with-output-to-file', 'with-output-to-string', + 'would-be-future', 'wrap-evt', 'wrapped-extra-arg-arrow', + 'wrapped-extra-arg-arrow-extra-neg-party-argument', + 'wrapped-extra-arg-arrow-real-func', 'wrapped-extra-arg-arrow?', + 'writable<%>', 'write', 'write-byte', 'write-bytes', 'write-bytes-avail', 'write-bytes-avail*', 'write-bytes-avail-evt', 'write-bytes-avail/enable-break', 'write-char', 'write-special', - 'write-special-avail*', 'write-special-evt', 'write-string', 'zero?' + 'write-special-avail*', 'write-special-evt', 'write-string', + 'write-to-file', 'xor', 'zero?', '~.a', '~.s', '~.v', '~a', '~e', '~r', + '~s', '~v' ] - # From SchemeLexer - valid_name = r'[a-zA-Z0-9!$%&*+,/:<=>?@^_~|-]+' + _opening_parenthesis = r'[([{]' + _closing_parenthesis = r'[)\]}]' + _delimiters = r'()[\]{}",\'`;\s' + _symbol = r'(?u)(?:\|[^|]*\||\\[\w\W]|[^|\\%s]+)+' % _delimiters + _number_prefix = r'(?:#e)?(?:#b|(?:#d)?)(?:#e)?' + _exponent = r'(?:[defls][-+]?\d+)' + _inexact_simple_no_hashes = r'(?:\d+(?:/\d+|\.\d*)?|\.\d+)' + _inexact_simple = (r'(?:%s|(?:\d+#+(?:\.#*|/\d+#*)?|\.\d+#+|' + r'\d+(?:\.\d*#+|/\d+#+)))' % _inexact_simple_no_hashes) + _inexact_normal_no_hashes = r'(?:%s%s?)' % (_inexact_simple_no_hashes, + _exponent) + _inexact_normal = r'(?:%s%s?)' % (_inexact_simple, _exponent) + _inexact_special = r'(?:(?:inf|nan)\.[0f])' + _inexact_real = r'(?:[-+]?%s|[-+]%s)' % (_inexact_normal, + _inexact_special) + _inexact_unsigned = r'(?:%s|%s)' % (_inexact_normal, _inexact_special) tokens = { - 'root' : [ - (r';.*$', Comment.Single), - (r'#\|[^|]+\|#', Comment.Multiline), - - # whitespaces - usually not relevant - (r'\s+', Text), - - ## numbers: Keep in mind Racket reader hash prefixes, - ## which can denote the base or the type. These don't map - ## neatly onto pygments token types; some judgment calls - ## here. Note that none of these regexps attempt to - ## exclude identifiers that start with a number, such as a - ## variable named "100-Continue". - - # #b - (r'#b[-+]?[01]+\.[01]+', Number.Float), - (r'#b[01]+e[-+]?[01]+', Number.Float), - (r'#b[-+]?[01]/[01]+', Number), - (r'#b[-+]?[01]+', Number.Integer), - (r'#b\S*', Error), - - # #d OR no hash prefix - (r'(#d)?[-+]?\d+\.\d+', Number.Float), - (r'(#d)?\d+e[-+]?\d+', Number.Float), - (r'(#d)?[-+]?\d+/\d+', Number), - (r'(#d)?[-+]?\d+', Number.Integer), - (r'#d\S*', Error), - - # #e - (r'#e[-+]?\d+\.\d+', Number.Float), - (r'#e\d+e[-+]?\d+', Number.Float), - (r'#e[-+]?\d+/\d+', Number), - (r'#e[-+]?\d+', Number), - (r'#e\S*', Error), - - # #i is always inexact-real, i.e. float - (r'#i[-+]?\d+\.\d+', Number.Float), - (r'#i\d+e[-+]?\d+', Number.Float), - (r'#i[-+]?\d+/\d+', Number.Float), - (r'#i[-+]?\d+', Number.Float), - (r'#i\S*', Error), + 'root': [ + (_closing_parenthesis, Error), + (r'(?!\Z)', Text, 'unquoted-datum') + ], + 'datum': [ + (r'(?s)#;|#![ /]([^\\\n]|\\.)*', Comment), + (u';[^\\n\\r\x85\u2028\u2029]*', Comment.Single), + (r'#\|', Comment.Multiline, 'block-comment'), + + # Whitespaces + (r'(?u)\s+', Text), + + # Numbers: Keep in mind Racket reader hash prefixes, which + # can denote the base or the type. These don't map neatly + # onto Pygments token types; some judgment calls here. + + # #b or #d or no prefix + (r'(?i)%s[-+]?\d+(?=[%s])' % (_number_prefix, _delimiters), + Number.Integer, '#pop'), + (r'(?i)%s[-+]?(\d+(\.\d*)?|\.\d+)([deflst][-+]?\d+)?(?=[%s])' % + (_number_prefix, _delimiters), Number.Float, '#pop'), + (r'(?i)%s[-+]?(%s([-+]%s?i)?|[-+]%s?i)(?=[%s])' % + (_number_prefix, _inexact_normal_no_hashes, + _inexact_normal_no_hashes, _inexact_normal_no_hashes, + _delimiters), Number, '#pop'), + + # Inexact without explicit #i + (r'(?i)(#[bd])?(%s([-+]%s?i)?|[-+]%s?i|%s@%s)(?=[%s])' % + (_inexact_real, _inexact_unsigned, _inexact_unsigned, + _inexact_real, _inexact_real, _delimiters), Number.Float, + '#pop'), + + # The remaining extflonums + (r'(?i)(([-+]?%st[-+]?\d+)|[-+](inf|nan)\.t)(?=[%s])' % + (_inexact_simple, _delimiters), Number.Float, '#pop'), # #o - (r'#o[-+]?[0-7]+\.[0-7]+', Number.Oct), - (r'#o[0-7]+e[-+]?[0-7]+', Number.Oct), - (r'#o[-+]?[0-7]+/[0-7]+', Number.Oct), - (r'#o[-+]?[0-7]+', Number.Oct), - (r'#o\S*', Error), + (r'(?i)(#[ei])?#o%s' % _symbol, Number.Oct, '#pop'), # #x - (r'#x[-+]?[0-9a-fA-F]+\.[0-9a-fA-F]+', Number.Hex), - # the exponent variation (e.g. #x1e1) is N/A - (r'#x[-+]?[0-9a-fA-F]+/[0-9a-fA-F]+', Number.Hex), - (r'#x[-+]?[0-9a-fA-F]+', Number.Hex), - (r'#x\S*', Error), - - - # strings, symbols and characters - (r'"(\\\\|\\"|[^"])*"', String), - (r"'" + valid_name, String.Symbol), - (r"#\\([()/'\"._!§$%& ?=+-]{1}|[a-zA-Z0-9]+)", String.Char), - (r'#rx".+"', String.Regex), - (r'#px".+"', String.Regex), - - # constants - (r'(#t|#f)', Name.Constant), - - # keyword argument names (e.g. #:keyword) - (r'#:\S+', Keyword.Declaration), - - # #lang - (r'#lang \S+', Keyword.Namespace), - - # special operators - (r"('|#|`|,@|,|\.)", Operator), - - # highlight the keywords - ('(%s)' % '|'.join([ - re.escape(entry) + ' ' for entry in keywords]), - Keyword - ), - - # first variable in a quoted string like - # '(this is syntactic sugar) - (r"(?<='\()" + valid_name, Name.Variable), - (r"(?<=#\()" + valid_name, Name.Variable), - - # highlight the builtins - ("(?<=\()(%s)" % '|'.join([ - re.escape(entry) + ' ' for entry in builtins]), - Name.Builtin - ), - - # the remaining functions; handle both ( and [ - (r'(?<=(\(|\[|\{))' + valid_name, Name.Function), - - # find the remaining variables - (valid_name, Name.Variable), - - # the famous parentheses! - (r'(\(|\)|\[|\]|\{|\})', Punctuation), + (r'(?i)(#[ei])?#x%s' % _symbol, Number.Hex, '#pop'), + + # #i is always inexact, i.e. float + (r'(?i)(#[bd])?#i%s' % _symbol, Number.Float, '#pop'), + + # Strings and characters + (r'#?"', String.Double, ('#pop', 'string')), + (r'#<<(.+)\n(^(?!\1$).*$\n)*^\1$', String.Heredoc, '#pop'), + (r'#\\(u[\da-fA-F]{1,4}|U[\da-fA-F]{1,8})', String.Char, '#pop'), + (r'(?is)#\\([0-7]{3}|[a-z]+|.)', String.Char, '#pop'), + (r'(?s)#[pr]x#?"(\\?.)*?"', String.Regex, '#pop'), + + # Constants + (r'#(true|false|[tTfF])', Name.Constant, '#pop'), + + # Keyword argument names (e.g. #:keyword) + (r'#:%s' % _symbol, Keyword.Declaration, '#pop'), + + # Reader extensions + (r'(#lang |#!)(\S+)', + bygroups(Keyword.Namespace, Name.Namespace)), + (r'#reader', Keyword.Namespace, 'quoted-datum'), + + # Other syntax + (r"(?i)\.(?=[%s])|#c[is]|#['`]|#,@?" % _delimiters, Operator), + (r"'|#[s&]|#hash(eqv?)?|#\d*(?=%s)" % _opening_parenthesis, + Operator, ('#pop', 'quoted-datum')) + ], + 'datum*': [ + (r'`|,@?', Operator), + (_symbol, String.Symbol, '#pop'), + (r'[|\\]', Error), + (r'', Text, '#pop') + ], + 'list': [ + (_closing_parenthesis, Punctuation, '#pop') + ], + 'unquoted-datum': [ + include('datum'), + (r'quote(?=[%s])' % _delimiters, Keyword, + ('#pop', 'quoted-datum')), + (r'`', Operator, ('#pop', 'quasiquoted-datum')), + (r'quasiquote(?=[%s])' % _delimiters, Keyword, + ('#pop', 'quasiquoted-datum')), + (_opening_parenthesis, Punctuation, ('#pop', 'unquoted-list')), + (r'(?u)(%s)(?=[%s])' % ('|'.join( + [re.escape(entry) for entry in _keywords]), _delimiters), + Keyword, '#pop'), + (r'(?u)(%s)(?=[%s])' % ('|'.join( + [re.escape(entry) for entry in _builtins]), _delimiters), + Name.Builtin, '#pop'), + (_symbol, Name, '#pop'), + include('datum*') + ], + 'unquoted-list': [ + include('list'), + (r'(?!\Z)', Text, 'unquoted-datum') + ], + 'quasiquoted-datum': [ + include('datum'), + (r',@?', Operator, ('#pop', 'unquoted-datum')), + (r'unquote(-splicing)?(?=[%s])' % _delimiters, Keyword, + ('#pop', 'unquoted-datum')), + (_opening_parenthesis, Punctuation, ('#pop', 'quasiquoted-list')), + include('datum*') + ], + 'quasiquoted-list': [ + include('list'), + (r'(?!\Z)', Text, 'quasiquoted-datum') + ], + 'quoted-datum': [ + include('datum'), + (_opening_parenthesis, Punctuation, ('#pop', 'quoted-list')), + include('datum*') + ], + 'quoted-list': [ + include('list'), + (r'(?!\Z)', Text, 'quoted-datum') + ], + 'block-comment': [ + (r'#\|', Comment.Multiline, '#push'), + (r'\|#', Comment.Multiline, '#pop'), + (r'[^#|]+|.', Comment.Multiline) ], + 'string': [ + (r'"', String.Double, '#pop'), + (r'(?s)\\([0-7]{1,3}|x[\da-fA-F]{1,2}|u[\da-fA-F]{1,4}|' + r'U[\da-fA-F]{1,8}|.)', String.Escape), + (r'[^\\"]+', String.Double) + ] } diff --git a/tests/examplefiles/example.rkt b/tests/examplefiles/example.rkt index a3e4a29e..acc0328e 100644 --- a/tests/examplefiles/example.rkt +++ b/tests/examplefiles/example.rkt @@ -1,5 +1,7 @@ #lang racket +(require (only-in srfi/13 string-contains)) + ; Single-line comment style. ;; Single-line comment style. @@ -8,45 +10,259 @@ #| Multi-line comment style ... +#|### #| nested |#||| |# ... on multiple lines |# -(define (a-function x #:keyword [y 0]) +#;(s-expression comment (one line)) + +#; +(s-expression comment + (multiple lines)) + +#! shebang comment + +#!/shebang comment + +#! shebang \ +comment + +#!/shebang \ +comment + +;; Uncommented numbers after single-line comments +;; NEL
133 +;; LS
8232 +;; PS
8233 + +#reader racket +(define(a-function x #:keyword [y 0]) (define foo0 'symbol) ; () [define foo1 'symbol] ; [] {define foo2 'symbol} ; {} - (and (append (car '(1 2 3)))) + (define 100-Continue 'symbol) + (and (append (car'(1 2 3)))) (regexp-match? #rx"foobar" "foobar") - (regexp-match? #px"foobar" "foobar") - (define a 1)) - (let ([b "foo"]) - (displayln b)) + (regexp-match? #px"\"foo\\(bar\\)?\"" "foobar") + (regexp-match? #rx#"foobar" "foobar") + (regexp-match? #px#"foobar" "foobar") + (define #csa 1) + #Ci (let ([#%A|||b #true C +\|d "foo"]) + (displayln #cS #%\ab\ #true\ C\ +\\d||)) (for/list ([x (in-list (list 1 2 (list 3 4)))]) - (cond - [(pair? x) (car x)] - [else x]))) + (cond + [(pair? x) (car x)] + [else x]))) -;; Literal number examples +;; Literals (values ;; #b - #b1.1 - #b-1.1 - #b1e1 - #b0/1 - #b1/1 - #b1e-1 - #b101 - + #b1 + #b+1 + #b-1 + #b.1 + #b1. + #b0.1 + #b+0.1 + #b-0.1 + #b1/10 + #b+1/10 + #b-1/10 + #b1e11 + #b+1e11 + #b-1e11 + #b.1e11 + #b1.e11 + #b0.1e11 + #b+0.1e11 + #b-0.1e11 + #b1/10e11 + #b+1/10e11 + #b-1/10e11 + #b+i + #b1+i + #b+1+i + #b-1+i + #b.1+i + #b1.+i + #b0.1+i + #b+0.1+i + #b-0.1+i + #b1/10+i + #b+1/10+i + #b-1/10+i + #b1e11+i + #b+1e11+i + #b-1e11+i + #b1.e11+i + #b.1e11+i + #b0.1e11+i + #b+0.1e11+i + #b-0.1e11+i + #b1/10e11+i + #b+1/10e11+i + #b-1/10e11+i + #b+1i + #b1+1i + #b+1+1i + #b-1+1i + #b1.+1i + #b.1+1i + #b0.1+1i + #b+0.1+1i + #b-0.1+1i + #b1/10+1i + #b+1/10+1i + #b-1/10+1i + #b1e11+1i + #b+1e11+1i + #b-1e11+1i + #b.1e11+1i + #b0.1e11+1i + #b+0.1e11+1i + #b-0.1e11+1i + #b1/10e11+1i + #b+1/10e11+1i + #b-1/10e11+1i + #b+1/10e11i + #b1+1/10e11i + #b+1+1/10e11i + #b-1+1/10e11i + #b.1+1/10e11i + #b0.1+1/10e11i + #b+0.1+1/10e11i + #b-0.1+1/10e11i + #b1/10+1/10e11i + #b+1/10+1/10e11i + #b-1/10+1/10e11i + #b1e11+1/10e11i + #b+1e11+1/10e11i + #b-1e11+1/10e11i + #b.1e11+1/10e11i + #b0.1e11+1/10e11i + #b+0.1e11+1/10e11i + #b-0.1e11+1/10e11i + #b1/10e11+1/10e11i + #b+1/10e11+1/10e11i + #b-1/10e11+1/10e11i ;; #d - #d-1.23 - #d1.123 - #d1e3 - #d1e-22 - #d1/2 - #d-1/2 #d1 + #d+1 #d-1 - + #d.1 + #d1. + #d1.2 + #d+1.2 + #d-1.2 + #d1/2 + #d+1/2 + #d-1/2 + #d1e3 + #d+1e3 + #d-1e3 + #d.1e3 + #d1.e3 + #d1.2e3 + #d+1.2e3 + #d-1.2e3 + #d1/2e3 + #d+1/2e3 + #d-1/2e3 + #d+i + #d1+i + #d+1+i + #d-1+i + #d.1+i + #d1.+i + #d1.2+i + #d+1.2+i + #d-1.2+i + #d1/2+i + #d+1/2+i + #d-1/2+i + #d1e3+i + #d+1e3+i + #d-1e3+i + #d1.e3+i + #d.1e3+i + #d1.2e3+i + #d+1.2e3+i + #d-1.2e3+i + #d1/2e3+i + #d+1/2e3+i + #d-1/2e3+i + #d+1i + #d1+1i + #d+1+1i + #d-1+1i + #d1.+1i + #d.1+1i + #d1.2+1i + #d+1.2+1i + #d-1.2+1i + #d1/2+1i + #d+1/2+1i + #d-1/2+1i + #d1e3+1i + #d+1e3+1i + #d-1e3+1i + #d.1e3+1i + #d1.2e3+1i + #d+1.2e3+1i + #d-1.2e3+1i + #d1/2e3+1i + #d+1/2e3+1i + #d-1/2e3+1i + #d+1/2e3i + #d1+1/2e3i + #d+1+1/2e3i + #d-1+1/2e3i + #d.1+1/2e3i + #d1.2+1/2e3i + #d+1.2+1/2e3i + #d-1.2+1/2e3i + #d1/2+1/2e3i + #d+1/2+1/2e3i + #d-1/2+1/2e3i + #d1e3+1/2e3i + #d+1e3+1/2e3i + #d-1e3+1/2e3i + #d.1e3+1/2e3i + #d1.2e3+1/2e3i + #d+1.2e3+1/2e3i + #d-1.2e3+1/2e3i + #d1/2e3+1/2e3i + #d+1/2e3+1/2e3i + #d-1/2e3+1/2e3i + ;; Extflonums + +nan.t + 1t3 + +1t3 + -1t3 + .1t3 + 1.t3 + 1.2t3 + +1.2t3 + -1.2t3 + 1/2t3 + +1/2t3 + -1/2t3 + 1#t0 + 1.#t0 + .2#t0 + 1.2#t0 + 1#/2t0 + 1/2#t0 + 1#/2#t0 + 1#t3 + 1.#t3 + .2#t3 + 1.2#t3 + 1#/2t3 + 1/2#t3 + 1#/2#t3 ;; No # reader prefix -- same as #d -1.23 1.123 @@ -56,7 +272,6 @@ Multi-line comment style ... -1/2 1 -1 - ;; #e #e-1.23 #e1.123 @@ -66,7 +281,24 @@ Multi-line comment style ... #e-1 #e1/2 #e-1/2 - + ;; #d#e + #d#e-1.23 + #d#e1.123 + #d#e1e3 + #d#e1e-22 + #d#e1 + #d#e-1 + #d#e1/2 + #d#e-1/2 + ;; #e#d + #e#d-1.23 + #e#d1.123 + #e#d1e3 + #e#d1e-22 + #e#d1 + #e#d-1 + #e#d1/2 + #e#d-1/2 ;; #i always float #i-1.23 #i1.123 @@ -76,7 +308,126 @@ Multi-line comment style ... #i-1/2 #i1 #i-1 - + ;; Implicitly inexact numbers + +nan.0 + 1# + 1.# + .2# + 1.2# + 1#/2 + 1/2# + 1#/2# + 1#e3 + 1.#e3 + .2#e3 + 1.2#e3 + 1#/2e3 + 1/2#e3 + 1#/2#e3 + +nan.0+i + 1#+i + 1.#+i + .2#+i + 1.2#+i + 1#/2+i + 1/2#+i + 1#/2#+i + 1#e3+i + 1.#e3+i + .2#e3+i + 1.2#e3+i + 1#/2e3+i + 1/2#e3+i + 1#/2#e3+i + +nan.0i + +1#i + +1.#i + +.2#i + +1.2#i + +1#/2i + +1/2#i + +1#/2#i + +1#e3i + +1.#e3i + +.2#e3i + +1.2#e3i + +1#/2e3i + +1/2#e3i + +1#/2#e3i + 0+nan.0i + 0+1#i + 0+1.#i + 0+.2#i + 0+1.2#i + 0+1#/2i + 0+1/2#i + 0+1#/2#i + 0+1#e3i + 0+1.#e3i + 0+.2#e3i + 0+1.2#e3i + 0+1#/2e3i + 0+1/2#e3i + 0+1#/2#e3i + 1#/2#e3+nan.0i + 1#/2#e3+1#i + 1#/2#e3+1.#i + 1#/2#e3+.2#i + 1#/2#e3+1.2#i + 1#/2#e3+1#/2i + 1#/2#e3+1/2#i + 1#/2#e3+1#/2#i + 1#/2#e3+1#e3i + 1#/2#e3+1.#e3i + 1#/2#e3+.2#e3i + 1#/2#e3+1.2#e3i + 1#/2#e3+1#/2e3i + 1#/2#e3+1/2#e3i + 1#/2#e3+1#/2#e3i + +nan.0@1 + 1#@1 + 1.#@1 + .2#@1 + 1.2#@1 + 1#/2@1 + 1/2#@1 + 1#/2#@1 + 1#e3@1 + 1.#e3@1 + .2#e3@1 + 1.2#e3@1 + 1#/2e3@1 + 1/2#e3@1 + 1#/2#e3@1 + 1@+nan.0 + 1@1# + 1@1.# + 1@.2# + 1@1.2# + 1@1#/2 + 1@1/2# + 1@1#/2# + 1@1#e3 + 1@1.#e3 + 1@.2#e3 + 1@1.2#e3 + 1@1#/2e3 + 1@1/2#e3 + 1@1#/2#e3 + 1#/2#e3@1# + 1#/2#e3@1.# + 1#/2#e3@.2# + 1#/2#e3@1.2# + 1#/2#e3@1#/2 + 1#/2#e3@1/2# + 1#/2#e3@1#/2# + 1#/2#e3@1#e3 + 1#/2#e3@1.#e3 + 1#/2#e3@.2#e3 + 1#/2#e3@1.2#e3 + 1#/2#e3@1#/2e3 + 1#/2#e3@1/2#e3 + 1#/2#e3@1#/2#e3 ;; #o #o777.777 #o-777.777 @@ -86,10 +437,307 @@ Multi-line comment style ... #o-3/7 #o777 #o-777 - + #e#o777.777 + #e#o-777.777 + #e#o777e777 + #e#o777e-777 + #e#o3/7 + #e#o-3/7 + #e#o777 + #e#o-777 + #i#o777.777 + #i#o-777.777 + #i#o777e777 + #i#o777e-777 + #i#o3/7 + #i#o-3/7 + #i#o777 + #i#o-777 ;; #x #x-f.f #xf.f + #xfsf + #xfs-f + #x7/f + #x-7/f #x-f #xf + #e#x-f.f + #e#xf.f + #e#xfsf + #e#xfs-f + #e#x7/f + #e#x-7/f + #e#x-f + #e#xf + #i#x-f.f + #i#xf.f + #i#xfsf + #i#xfs-f + #i#x7/f + #i#x-7/f + #i#x-f + #i#xf + ;; Not numbers + '-1.23x + '1.123x + '1e3x + '1e-22x + '1/2x + '-1/2x + '1x + '-1x + '/ + '1/ + '/2 + '1//2 + '1e3. + '1e + 'e3 + '.i + '1.2.3 + '1..2 + '.1. + '@ + '1@ + '@2 + '1@@2 + '1@2@3 + '1@2i + '1+-2i + '1i+2 + '1i+2i + '1+2i+3i + '- + '--1 + '+ + '++1 + '1/2.3 + '1#2 + '1#.2 + '1.#2 + '.#2 + '+nan.t+nan.ti + '+nan.t@nan.t + ;; Booleans + #t + #T + #true + #f + #F + #false + ;; Characters, strings, and byte strings + #\ + #\Null9 + #\n9 + #\99 + #\0009 + #\u3BB + #\u03BB9 + #\U3BB + #\U000003BB9 + #\λ9 + "string\ + \a.\b.\t.\n.\v.\f.\r.\e.\".\'.\\.\1.\123.\1234.\x9.\x30.\x303" + "\u9.\u1234.\u12345.\U9.\U00100000.\U001000000" + #"byte-string\7\xff\t" + #<<HERE STRING +lorem ipsum +dolor sit amet +consectetur HERE STRING +HERE STRING adipisicing elit +HERE STRING + #| +HERE STRING +|# + ;; Other literals + #(vector) + #20() + #s[prefab-structure 1 2 3] + #&{box} + #hash(("a" . 5)) + #hasheq((a . 5) (b . 7)) + #hasheqv((a . 5) (b . 7)) + #'(define x 1) + #`(define x #,pi) + ;; quote, quasiquote, and unquote + 'pi + ' pi + ''pi + '`pi + '`,pi + ',pi + `pi + ` pi + `'pi + ``pi + `,pi + ` , pi + `,'pi + `,`pi + `,`,pi + '(+) + ' (+) + ''(+) + '`(+) + ',(+) + `(+) + ` (+) + `'(+) + ``(+) + `,(+) + ` , (+) + `,'(+) + `,`(+) + `,`,(+) + #readerracket/base'pi.f + '#readerracket/base pi.f + #readerracket/base`pi.f + `#readerracket/base pi.f + #readerracket/base`,pi.f + `#readerracket/base,pi.f + `,#readerracket/base pi.f + #readerracket/base'`,pi.f + '#readerracket/base`,pi.f + '`#readerracket/base,pi.f + '`,#readerracket/base pi.f + #readerracket/base'(*) + '#readerracket/base(*) + #readerracket/base`(*) + `#readerracket/base(*) + #readerracket/base`,(*) + `#readerracket/base,(*) + `,#readerracket/base(*) + #readerracket/base'`,(*) + '#readerracket/base`,(*) + '`#readerracket/base,(*) + '`,#readerracket/base(*) + (quote pi) + (quote (quote pi)) + (quote (quasiquote pi)) + (quote (quasiquote (unquote pi))) + (quote (unquote pi)) + (quasiquote pi) + (quasiquote (quote pi)) + (quasiquote (quasiquote pi)) + (quasiquote (unquote pi)) + (quasiquote (unquote (quote pi))) + (quasiquote (unquote (quasiquote pi))) + (quasiquote (unquote (quasiquote (unquote pi)))) + (quote (+)) + (quote (quote (+))) + (quote (quasiquote (+))) + (quote (unquote (+))) + (quasiquote (+)) + (quasiquote (quote (+))) + (quasiquote (quasiquote (+))) + (quasiquote (unquote (+))) + (quasiquote (unquote (quote (+)))) + (quasiquote (unquote (quasiquote (+)))) + (quasiquote (unquote (quasiquote (unquote (+))))) + #reader racket/base (quote pi.f) + (quote #reader racket/base pi.f) + #reader racket/base (quasiquote pi.f) + (quasiquote #reader racket/base pi.f) + #reader racket/base (quasiquote (unquote pi.f)) + (quasiquote #reader racket/base (unquote pi.f)) + (quasiquote (unquote #reader racket/base pi.f)) + #reader racket/base (quote (quasiquote (unquote pi.f))) + (quote #reader racket/base (quasiquote (unquote pi.f))) + (quote (quasiquote #reader racket/base (unquote pi.f))) + (quote (quasiquote (unquote #reader racket/base pi.f))) + #reader racket/base (quote (*)) + (quote #reader racket/base (*)) + #reader racket/base (quasiquote (*)) + (quasiquote #reader racket/base (*)) + #reader racket/base (quasiquote (unquote (*))) + (quasiquote #reader racket/base (unquote (*))) + (quasiquote (unquote #reader racket/base (*))) + #reader racket/base (quote (quasiquote (unquote (*)))) + (quote #reader racket/base (quasiquote (unquote (*)))) + (quote (quasiquote #reader racket/base (unquote (*)))) + (quote (quasiquote (unquote #reader racket/base (*)))) + ;; Make sure non-identifiers work with quotes + ' "" pi + ' #t pi + ' #() pi + ' #s(s) pi + ' #\u3BB pi + ' #\U000003BB pi + ' #\space pi + ' #\. pi + ' #"" pi + ' #:kw pi + ' #&b pi + ' #'(define x 1) pi + ' #`(define x #,pi) pi + ' #I0 pi + ' #E0 pi + ' #X0 pi + ' #O0 pi + ' #D0 pi + ' #B0 pi + ' #<<EOF +EOF + pi + ' #rx"" pi + ' #rx#"" pi + ' #px"" pi + ' #px#"" pi + ' #hash() pi + ' #hasheq[] pi + ' #hasheqv{} pi + ' #1(v) pi ) + +;; Use the following to generate lists of built-ins and keywords. +;; Run +;; (displayln (wrap-lines KEYWORDS)) +;; (displayln (wrap-lines BUILTINS)) +;; and copy the results into RacketLexer._keywords and RacketLexer._builtins. + +;; (-> (listof string?) string?) +;; Appends all the strings together, quoting them as appropriate for Python, +;; with commas and spaces between them, wrapping at 80 characters, with an +;; indentation of 8 spaces. +(define (wrap-lines lst) + (define INDENTATION '" ") + (define WIDTH '80) + (define (wrap-lines* lst done-lines current-line) + (if (null? lst) + (string-append (foldr string-append "" done-lines) current-line) + (let* ([str (first lst)] + [wrapped-str (if (regexp-match-exact? '#px"[[:ascii:]]+" str) + (string-append "'" str "',") + (string-append "u'" str "',"))] + [new-line (string-append current-line " " wrapped-str)]) + (if ((string-length new-line) . >= . WIDTH) + (wrap-lines* (rest lst) + (append done-lines + `(,(string-append current-line "\n"))) + (string-append INDENTATION wrapped-str)) + (wrap-lines* (rest lst) + done-lines + new-line))))) + (wrap-lines* lst '() INDENTATION)) + +;; (-> string? boolean?) +;; Returns #t if str represents a syntax identifier in the current namespace, +;; otherwise #f. +(define (syntax-identifier? str) + (with-handlers ([exn? exn?]) + (not (eval (call-with-input-string str read))))) + +(define RACKET-NAMESPACE + (parameterize ([current-namespace (make-base-namespace)]) + (namespace-require 'racket) + (current-namespace))) + +(define BOUND-IDENTIFIERS + (parameterize ([current-namespace RACKET-NAMESPACE]) + (sort (map symbol->string (namespace-mapped-symbols)) + string<=?))) + +(define-values (KEYWORDS BUILTINS) + (parameterize ([current-namespace RACKET-NAMESPACE]) + (partition syntax-identifier? BOUND-IDENTIFIERS))) |