Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +2 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/__init__.py +329 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/_cl_builtins.py +232 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/_cocoa_builtins.py +72 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/_openedge_builtins.py +2547 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/_sourcemod_builtins.py +1163 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/_stan_builtins.py +532 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/_tsql_builtins.py +1004 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/_vim_builtins.py +1939 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/algebra.py +221 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/ambient.py +76 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/ampl.py +87 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/apl.py +101 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/bibtex.py +160 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/c_like.py +541 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/capnproto.py +78 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/chapel.py +102 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/clean.py +288 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/configs.py +833 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/crystal.py +393 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/csound.py +366 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/css.py +689 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/data.py +555 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/dotnet.py +691 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/dsls.py +878 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/dylan.py +289 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/ezhil.py +69 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/fortran.py +205 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/foxpro.py +428 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/functional.py +21 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/grammar_notation.py +213 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/graph.py +80 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/graphics.py +553 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/haskell.py +843 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/igor.py +288 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/inferno.py +96 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/int_fiction.py +1343 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/jvm.py +1573 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/lisp.py +0 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/markup.py +595 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/math.py +21 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/matlab.py +663 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/ml.py +769 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/monte.py +204 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/ncl.py +894 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/nit.py +64 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/nix.py +136 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/oberon.py +105 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/other.py +41 -0
- evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/parasail.py +79 -0
.gitattributes
CHANGED
|
@@ -857,3 +857,5 @@ evalkit_eagle/lib/python3.10/site-packages/scipy/special/tests/__pycache__/test_
|
|
| 857 |
evalkit_eagle/lib/python3.10/site-packages/scipy/sparse/csgraph/_tools.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
|
| 858 |
evalkit_eagle/lib/python3.10/site-packages/scipy/sparse/tests/__pycache__/test_base.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
| 859 |
infer_4_47_1/bin/unxz filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 857 |
evalkit_eagle/lib/python3.10/site-packages/scipy/sparse/csgraph/_tools.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
|
| 858 |
evalkit_eagle/lib/python3.10/site-packages/scipy/sparse/tests/__pycache__/test_base.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
| 859 |
infer_4_47_1/bin/unxz filter=lfs diff=lfs merge=lfs -text
|
| 860 |
+
janus/lib/python3.10/site-packages/nvidia/nccl/lib/libnccl.so.2 filter=lfs diff=lfs merge=lfs -text
|
| 861 |
+
infer_4_33_0/lib/python3.10/site-packages/nvidia/nccl/lib/libnccl.so.2 filter=lfs diff=lfs merge=lfs -text
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/__init__.py
ADDED
|
@@ -0,0 +1,329 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers
|
| 4 |
+
~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Pygments lexers.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
import re
|
| 13 |
+
import sys
|
| 14 |
+
import types
|
| 15 |
+
import fnmatch
|
| 16 |
+
from os.path import basename
|
| 17 |
+
|
| 18 |
+
from pygments.lexers._mapping import LEXERS
|
| 19 |
+
from pygments.modeline import get_filetype_from_buffer
|
| 20 |
+
from pygments.plugin import find_plugin_lexers
|
| 21 |
+
from pygments.util import ClassNotFound, itervalues, guess_decode
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
__all__ = ['get_lexer_by_name', 'get_lexer_for_filename', 'find_lexer_class',
|
| 25 |
+
'guess_lexer', 'load_lexer_from_file'] + list(LEXERS)
|
| 26 |
+
|
| 27 |
+
_lexer_cache = {}
|
| 28 |
+
_pattern_cache = {}
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
def _fn_matches(fn, glob):
|
| 32 |
+
"""Return whether the supplied file name fn matches pattern filename."""
|
| 33 |
+
if glob not in _pattern_cache:
|
| 34 |
+
pattern = _pattern_cache[glob] = re.compile(fnmatch.translate(glob))
|
| 35 |
+
return pattern.match(fn)
|
| 36 |
+
return _pattern_cache[glob].match(fn)
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
def _load_lexers(module_name):
|
| 40 |
+
"""Load a lexer (and all others in the module too)."""
|
| 41 |
+
mod = __import__(module_name, None, None, ['__all__'])
|
| 42 |
+
for lexer_name in mod.__all__:
|
| 43 |
+
cls = getattr(mod, lexer_name)
|
| 44 |
+
_lexer_cache[cls.name] = cls
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
def get_all_lexers():
|
| 48 |
+
"""Return a generator of tuples in the form ``(name, aliases,
|
| 49 |
+
filenames, mimetypes)`` of all know lexers.
|
| 50 |
+
"""
|
| 51 |
+
for item in itervalues(LEXERS):
|
| 52 |
+
yield item[1:]
|
| 53 |
+
for lexer in find_plugin_lexers():
|
| 54 |
+
yield lexer.name, lexer.aliases, lexer.filenames, lexer.mimetypes
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
def find_lexer_class(name):
|
| 58 |
+
"""Lookup a lexer class by name.
|
| 59 |
+
|
| 60 |
+
Return None if not found.
|
| 61 |
+
"""
|
| 62 |
+
if name in _lexer_cache:
|
| 63 |
+
return _lexer_cache[name]
|
| 64 |
+
# lookup builtin lexers
|
| 65 |
+
for module_name, lname, aliases, _, _ in itervalues(LEXERS):
|
| 66 |
+
if name == lname:
|
| 67 |
+
_load_lexers(module_name)
|
| 68 |
+
return _lexer_cache[name]
|
| 69 |
+
# continue with lexers from setuptools entrypoints
|
| 70 |
+
for cls in find_plugin_lexers():
|
| 71 |
+
if cls.name == name:
|
| 72 |
+
return cls
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
def find_lexer_class_by_name(_alias):
|
| 76 |
+
"""Lookup a lexer class by alias.
|
| 77 |
+
|
| 78 |
+
Like `get_lexer_by_name`, but does not instantiate the class.
|
| 79 |
+
|
| 80 |
+
.. versionadded:: 2.2
|
| 81 |
+
"""
|
| 82 |
+
if not _alias:
|
| 83 |
+
raise ClassNotFound('no lexer for alias %r found' % _alias)
|
| 84 |
+
# lookup builtin lexers
|
| 85 |
+
for module_name, name, aliases, _, _ in itervalues(LEXERS):
|
| 86 |
+
if _alias.lower() in aliases:
|
| 87 |
+
if name not in _lexer_cache:
|
| 88 |
+
_load_lexers(module_name)
|
| 89 |
+
return _lexer_cache[name]
|
| 90 |
+
# continue with lexers from setuptools entrypoints
|
| 91 |
+
for cls in find_plugin_lexers():
|
| 92 |
+
if _alias.lower() in cls.aliases:
|
| 93 |
+
return cls
|
| 94 |
+
raise ClassNotFound('no lexer for alias %r found' % _alias)
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
def get_lexer_by_name(_alias, **options):
|
| 98 |
+
"""Get a lexer by an alias.
|
| 99 |
+
|
| 100 |
+
Raises ClassNotFound if not found.
|
| 101 |
+
"""
|
| 102 |
+
if not _alias:
|
| 103 |
+
raise ClassNotFound('no lexer for alias %r found' % _alias)
|
| 104 |
+
|
| 105 |
+
# lookup builtin lexers
|
| 106 |
+
for module_name, name, aliases, _, _ in itervalues(LEXERS):
|
| 107 |
+
if _alias.lower() in aliases:
|
| 108 |
+
if name not in _lexer_cache:
|
| 109 |
+
_load_lexers(module_name)
|
| 110 |
+
return _lexer_cache[name](**options)
|
| 111 |
+
# continue with lexers from setuptools entrypoints
|
| 112 |
+
for cls in find_plugin_lexers():
|
| 113 |
+
if _alias.lower() in cls.aliases:
|
| 114 |
+
return cls(**options)
|
| 115 |
+
raise ClassNotFound('no lexer for alias %r found' % _alias)
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
def load_lexer_from_file(filename, lexername="CustomLexer", **options):
|
| 119 |
+
"""Load a lexer from a file.
|
| 120 |
+
|
| 121 |
+
This method expects a file located relative to the current working
|
| 122 |
+
directory, which contains a Lexer class. By default, it expects the
|
| 123 |
+
Lexer to be name CustomLexer; you can specify your own class name
|
| 124 |
+
as the second argument to this function.
|
| 125 |
+
|
| 126 |
+
Users should be very careful with the input, because this method
|
| 127 |
+
is equivalent to running eval on the input file.
|
| 128 |
+
|
| 129 |
+
Raises ClassNotFound if there are any problems importing the Lexer.
|
| 130 |
+
|
| 131 |
+
.. versionadded:: 2.2
|
| 132 |
+
"""
|
| 133 |
+
try:
|
| 134 |
+
# This empty dict will contain the namespace for the exec'd file
|
| 135 |
+
custom_namespace = {}
|
| 136 |
+
exec(open(filename, 'rb').read(), custom_namespace)
|
| 137 |
+
# Retrieve the class `lexername` from that namespace
|
| 138 |
+
if lexername not in custom_namespace:
|
| 139 |
+
raise ClassNotFound('no valid %s class found in %s' %
|
| 140 |
+
(lexername, filename))
|
| 141 |
+
lexer_class = custom_namespace[lexername]
|
| 142 |
+
# And finally instantiate it with the options
|
| 143 |
+
return lexer_class(**options)
|
| 144 |
+
except IOError as err:
|
| 145 |
+
raise ClassNotFound('cannot read %s' % filename)
|
| 146 |
+
except ClassNotFound as err:
|
| 147 |
+
raise
|
| 148 |
+
except Exception as err:
|
| 149 |
+
raise ClassNotFound('error when loading custom lexer: %s' % err)
|
| 150 |
+
|
| 151 |
+
|
| 152 |
+
def find_lexer_class_for_filename(_fn, code=None):
|
| 153 |
+
"""Get a lexer for a filename.
|
| 154 |
+
|
| 155 |
+
If multiple lexers match the filename pattern, use ``analyse_text()`` to
|
| 156 |
+
figure out which one is more appropriate.
|
| 157 |
+
|
| 158 |
+
Returns None if not found.
|
| 159 |
+
"""
|
| 160 |
+
matches = []
|
| 161 |
+
fn = basename(_fn)
|
| 162 |
+
for modname, name, _, filenames, _ in itervalues(LEXERS):
|
| 163 |
+
for filename in filenames:
|
| 164 |
+
if _fn_matches(fn, filename):
|
| 165 |
+
if name not in _lexer_cache:
|
| 166 |
+
_load_lexers(modname)
|
| 167 |
+
matches.append((_lexer_cache[name], filename))
|
| 168 |
+
for cls in find_plugin_lexers():
|
| 169 |
+
for filename in cls.filenames:
|
| 170 |
+
if _fn_matches(fn, filename):
|
| 171 |
+
matches.append((cls, filename))
|
| 172 |
+
|
| 173 |
+
if sys.version_info > (3,) and isinstance(code, bytes):
|
| 174 |
+
# decode it, since all analyse_text functions expect unicode
|
| 175 |
+
code = guess_decode(code)
|
| 176 |
+
|
| 177 |
+
def get_rating(info):
|
| 178 |
+
cls, filename = info
|
| 179 |
+
# explicit patterns get a bonus
|
| 180 |
+
bonus = '*' not in filename and 0.5 or 0
|
| 181 |
+
# The class _always_ defines analyse_text because it's included in
|
| 182 |
+
# the Lexer class. The default implementation returns None which
|
| 183 |
+
# gets turned into 0.0. Run scripts/detect_missing_analyse_text.py
|
| 184 |
+
# to find lexers which need it overridden.
|
| 185 |
+
if code:
|
| 186 |
+
return cls.analyse_text(code) + bonus, cls.__name__
|
| 187 |
+
return cls.priority + bonus, cls.__name__
|
| 188 |
+
|
| 189 |
+
if matches:
|
| 190 |
+
matches.sort(key=get_rating)
|
| 191 |
+
# print "Possible lexers, after sort:", matches
|
| 192 |
+
return matches[-1][0]
|
| 193 |
+
|
| 194 |
+
|
| 195 |
+
def get_lexer_for_filename(_fn, code=None, **options):
|
| 196 |
+
"""Get a lexer for a filename.
|
| 197 |
+
|
| 198 |
+
If multiple lexers match the filename pattern, use ``analyse_text()`` to
|
| 199 |
+
figure out which one is more appropriate.
|
| 200 |
+
|
| 201 |
+
Raises ClassNotFound if not found.
|
| 202 |
+
"""
|
| 203 |
+
res = find_lexer_class_for_filename(_fn, code)
|
| 204 |
+
if not res:
|
| 205 |
+
raise ClassNotFound('no lexer for filename %r found' % _fn)
|
| 206 |
+
return res(**options)
|
| 207 |
+
|
| 208 |
+
|
| 209 |
+
def get_lexer_for_mimetype(_mime, **options):
|
| 210 |
+
"""Get a lexer for a mimetype.
|
| 211 |
+
|
| 212 |
+
Raises ClassNotFound if not found.
|
| 213 |
+
"""
|
| 214 |
+
for modname, name, _, _, mimetypes in itervalues(LEXERS):
|
| 215 |
+
if _mime in mimetypes:
|
| 216 |
+
if name not in _lexer_cache:
|
| 217 |
+
_load_lexers(modname)
|
| 218 |
+
return _lexer_cache[name](**options)
|
| 219 |
+
for cls in find_plugin_lexers():
|
| 220 |
+
if _mime in cls.mimetypes:
|
| 221 |
+
return cls(**options)
|
| 222 |
+
raise ClassNotFound('no lexer for mimetype %r found' % _mime)
|
| 223 |
+
|
| 224 |
+
|
| 225 |
+
def _iter_lexerclasses(plugins=True):
|
| 226 |
+
"""Return an iterator over all lexer classes."""
|
| 227 |
+
for key in sorted(LEXERS):
|
| 228 |
+
module_name, name = LEXERS[key][:2]
|
| 229 |
+
if name not in _lexer_cache:
|
| 230 |
+
_load_lexers(module_name)
|
| 231 |
+
yield _lexer_cache[name]
|
| 232 |
+
if plugins:
|
| 233 |
+
for lexer in find_plugin_lexers():
|
| 234 |
+
yield lexer
|
| 235 |
+
|
| 236 |
+
|
| 237 |
+
def guess_lexer_for_filename(_fn, _text, **options):
|
| 238 |
+
"""
|
| 239 |
+
Lookup all lexers that handle those filenames primary (``filenames``)
|
| 240 |
+
or secondary (``alias_filenames``). Then run a text analysis for those
|
| 241 |
+
lexers and choose the best result.
|
| 242 |
+
|
| 243 |
+
usage::
|
| 244 |
+
|
| 245 |
+
>>> from pygments.lexers import guess_lexer_for_filename
|
| 246 |
+
>>> guess_lexer_for_filename('hello.html', '<%= @foo %>')
|
| 247 |
+
<pygments.lexers.templates.RhtmlLexer object at 0xb7d2f32c>
|
| 248 |
+
>>> guess_lexer_for_filename('hello.html', '<h1>{{ title|e }}</h1>')
|
| 249 |
+
<pygments.lexers.templates.HtmlDjangoLexer object at 0xb7d2f2ac>
|
| 250 |
+
>>> guess_lexer_for_filename('style.css', 'a { color: <?= $link ?> }')
|
| 251 |
+
<pygments.lexers.templates.CssPhpLexer object at 0xb7ba518c>
|
| 252 |
+
"""
|
| 253 |
+
fn = basename(_fn)
|
| 254 |
+
primary = {}
|
| 255 |
+
matching_lexers = set()
|
| 256 |
+
for lexer in _iter_lexerclasses():
|
| 257 |
+
for filename in lexer.filenames:
|
| 258 |
+
if _fn_matches(fn, filename):
|
| 259 |
+
matching_lexers.add(lexer)
|
| 260 |
+
primary[lexer] = True
|
| 261 |
+
for filename in lexer.alias_filenames:
|
| 262 |
+
if _fn_matches(fn, filename):
|
| 263 |
+
matching_lexers.add(lexer)
|
| 264 |
+
primary[lexer] = False
|
| 265 |
+
if not matching_lexers:
|
| 266 |
+
raise ClassNotFound('no lexer for filename %r found' % fn)
|
| 267 |
+
if len(matching_lexers) == 1:
|
| 268 |
+
return matching_lexers.pop()(**options)
|
| 269 |
+
result = []
|
| 270 |
+
for lexer in matching_lexers:
|
| 271 |
+
rv = lexer.analyse_text(_text)
|
| 272 |
+
if rv == 1.0:
|
| 273 |
+
return lexer(**options)
|
| 274 |
+
result.append((rv, lexer))
|
| 275 |
+
|
| 276 |
+
def type_sort(t):
|
| 277 |
+
# sort by:
|
| 278 |
+
# - analyse score
|
| 279 |
+
# - is primary filename pattern?
|
| 280 |
+
# - priority
|
| 281 |
+
# - last resort: class name
|
| 282 |
+
return (t[0], primary[t[1]], t[1].priority, t[1].__name__)
|
| 283 |
+
result.sort(key=type_sort)
|
| 284 |
+
|
| 285 |
+
return result[-1][1](**options)
|
| 286 |
+
|
| 287 |
+
|
| 288 |
+
def guess_lexer(_text, **options):
|
| 289 |
+
"""Guess a lexer by strong distinctions in the text (eg, shebang)."""
|
| 290 |
+
|
| 291 |
+
# try to get a vim modeline first
|
| 292 |
+
ft = get_filetype_from_buffer(_text)
|
| 293 |
+
|
| 294 |
+
if ft is not None:
|
| 295 |
+
try:
|
| 296 |
+
return get_lexer_by_name(ft, **options)
|
| 297 |
+
except ClassNotFound:
|
| 298 |
+
pass
|
| 299 |
+
|
| 300 |
+
best_lexer = [0.0, None]
|
| 301 |
+
for lexer in _iter_lexerclasses():
|
| 302 |
+
rv = lexer.analyse_text(_text)
|
| 303 |
+
if rv == 1.0:
|
| 304 |
+
return lexer(**options)
|
| 305 |
+
if rv > best_lexer[0]:
|
| 306 |
+
best_lexer[:] = (rv, lexer)
|
| 307 |
+
if not best_lexer[0] or best_lexer[1] is None:
|
| 308 |
+
raise ClassNotFound('no lexer matching the text found')
|
| 309 |
+
return best_lexer[1](**options)
|
| 310 |
+
|
| 311 |
+
|
| 312 |
+
class _automodule(types.ModuleType):
|
| 313 |
+
"""Automatically import lexers."""
|
| 314 |
+
|
| 315 |
+
def __getattr__(self, name):
|
| 316 |
+
info = LEXERS.get(name)
|
| 317 |
+
if info:
|
| 318 |
+
_load_lexers(info[0])
|
| 319 |
+
cls = _lexer_cache[info[1]]
|
| 320 |
+
setattr(self, name, cls)
|
| 321 |
+
return cls
|
| 322 |
+
raise AttributeError(name)
|
| 323 |
+
|
| 324 |
+
|
| 325 |
+
oldmod = sys.modules[__name__]
|
| 326 |
+
newmod = _automodule(__name__)
|
| 327 |
+
newmod.__dict__.update(oldmod.__dict__)
|
| 328 |
+
sys.modules[__name__] = newmod
|
| 329 |
+
del newmod.newmod, newmod.oldmod, newmod.sys, newmod.types
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/_cl_builtins.py
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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+
|
| 12 |
+
BUILTIN_FUNCTIONS = set(( # 638 functions
|
| 13 |
+
'<', '<=', '=', '>', '>=', '-', '/', '/=', '*', '+', '1-', '1+',
|
| 14 |
+
'abort', 'abs', 'acons', 'acos', 'acosh', 'add-method', 'adjoin',
|
| 15 |
+
'adjustable-array-p', 'adjust-array', 'allocate-instance',
|
| 16 |
+
'alpha-char-p', 'alphanumericp', 'append', 'apply', 'apropos',
|
| 17 |
+
'apropos-list', 'aref', 'arithmetic-error-operands',
|
| 18 |
+
'arithmetic-error-operation', 'array-dimension', 'array-dimensions',
|
| 19 |
+
'array-displacement', 'array-element-type', 'array-has-fill-pointer-p',
|
| 20 |
+
'array-in-bounds-p', 'arrayp', 'array-rank', 'array-row-major-index',
|
| 21 |
+
'array-total-size', 'ash', 'asin', 'asinh', 'assoc', 'assoc-if',
|
| 22 |
+
'assoc-if-not', 'atan', 'atanh', 'atom', 'bit', 'bit-and', 'bit-andc1',
|
| 23 |
+
'bit-andc2', 'bit-eqv', 'bit-ior', 'bit-nand', 'bit-nor', 'bit-not',
|
| 24 |
+
'bit-orc1', 'bit-orc2', 'bit-vector-p', 'bit-xor', 'boole',
|
| 25 |
+
'both-case-p', 'boundp', 'break', 'broadcast-stream-streams',
|
| 26 |
+
'butlast', 'byte', 'byte-position', 'byte-size', 'caaaar', 'caaadr',
|
| 27 |
+
'caaar', 'caadar', 'caaddr', 'caadr', 'caar', 'cadaar', 'cadadr',
|
| 28 |
+
'cadar', 'caddar', 'cadddr', 'caddr', 'cadr', 'call-next-method', 'car',
|
| 29 |
+
'cdaaar', 'cdaadr', 'cdaar', 'cdadar', 'cdaddr', 'cdadr', 'cdar',
|
| 30 |
+
'cddaar', 'cddadr', 'cddar', 'cdddar', 'cddddr', 'cdddr', 'cddr', 'cdr',
|
| 31 |
+
'ceiling', 'cell-error-name', 'cerror', 'change-class', 'char', 'char<',
|
| 32 |
+
'char<=', 'char=', 'char>', 'char>=', 'char/=', 'character',
|
| 33 |
+
'characterp', 'char-code', 'char-downcase', 'char-equal',
|
| 34 |
+
'char-greaterp', 'char-int', 'char-lessp', 'char-name',
|
| 35 |
+
'char-not-equal', 'char-not-greaterp', 'char-not-lessp', 'char-upcase',
|
| 36 |
+
'cis', 'class-name', 'class-of', 'clear-input', 'clear-output',
|
| 37 |
+
'close', 'clrhash', 'code-char', 'coerce', 'compile',
|
| 38 |
+
'compiled-function-p', 'compile-file', 'compile-file-pathname',
|
| 39 |
+
'compiler-macro-function', 'complement', 'complex', 'complexp',
|
| 40 |
+
'compute-applicable-methods', 'compute-restarts', 'concatenate',
|
| 41 |
+
'concatenated-stream-streams', 'conjugate', 'cons', 'consp',
|
| 42 |
+
'constantly', 'constantp', 'continue', 'copy-alist', 'copy-list',
|
| 43 |
+
'copy-pprint-dispatch', 'copy-readtable', 'copy-seq', 'copy-structure',
|
| 44 |
+
'copy-symbol', 'copy-tree', 'cos', 'cosh', 'count', 'count-if',
|
| 45 |
+
'count-if-not', 'decode-float', 'decode-universal-time', 'delete',
|
| 46 |
+
'delete-duplicates', 'delete-file', 'delete-if', 'delete-if-not',
|
| 47 |
+
'delete-package', 'denominator', 'deposit-field', 'describe',
|
| 48 |
+
'describe-object', 'digit-char', 'digit-char-p', 'directory',
|
| 49 |
+
'directory-namestring', 'disassemble', 'documentation', 'dpb',
|
| 50 |
+
'dribble', 'echo-stream-input-stream', 'echo-stream-output-stream',
|
| 51 |
+
'ed', 'eighth', 'elt', 'encode-universal-time', 'endp',
|
| 52 |
+
'enough-namestring', 'ensure-directories-exist',
|
| 53 |
+
'ensure-generic-function', 'eq', 'eql', 'equal', 'equalp', 'error',
|
| 54 |
+
'eval', 'evenp', 'every', 'exp', 'export', 'expt', 'fboundp',
|
| 55 |
+
'fceiling', 'fdefinition', 'ffloor', 'fifth', 'file-author',
|
| 56 |
+
'file-error-pathname', 'file-length', 'file-namestring',
|
| 57 |
+
'file-position', 'file-string-length', 'file-write-date',
|
| 58 |
+
'fill', 'fill-pointer', 'find', 'find-all-symbols', 'find-class',
|
| 59 |
+
'find-if', 'find-if-not', 'find-method', 'find-package', 'find-restart',
|
| 60 |
+
'find-symbol', 'finish-output', 'first', 'float', 'float-digits',
|
| 61 |
+
'floatp', 'float-precision', 'float-radix', 'float-sign', 'floor',
|
| 62 |
+
'fmakunbound', 'force-output', 'format', 'fourth', 'fresh-line',
|
| 63 |
+
'fround', 'ftruncate', 'funcall', 'function-keywords',
|
| 64 |
+
'function-lambda-expression', 'functionp', 'gcd', 'gensym', 'gentemp',
|
| 65 |
+
'get', 'get-decoded-time', 'get-dispatch-macro-character', 'getf',
|
| 66 |
+
'gethash', 'get-internal-real-time', 'get-internal-run-time',
|
| 67 |
+
'get-macro-character', 'get-output-stream-string', 'get-properties',
|
| 68 |
+
'get-setf-expansion', 'get-universal-time', 'graphic-char-p',
|
| 69 |
+
'hash-table-count', 'hash-table-p', 'hash-table-rehash-size',
|
| 70 |
+
'hash-table-rehash-threshold', 'hash-table-size', 'hash-table-test',
|
| 71 |
+
'host-namestring', 'identity', 'imagpart', 'import',
|
| 72 |
+
'initialize-instance', 'input-stream-p', 'inspect',
|
| 73 |
+
'integer-decode-float', 'integer-length', 'integerp',
|
| 74 |
+
'interactive-stream-p', 'intern', 'intersection',
|
| 75 |
+
'invalid-method-error', 'invoke-debugger', 'invoke-restart',
|
| 76 |
+
'invoke-restart-interactively', 'isqrt', 'keywordp', 'last', 'lcm',
|
| 77 |
+
'ldb', 'ldb-test', 'ldiff', 'length', 'lisp-implementation-type',
|
| 78 |
+
'lisp-implementation-version', 'list', 'list*', 'list-all-packages',
|
| 79 |
+
'listen', 'list-length', 'listp', 'load',
|
| 80 |
+
'load-logical-pathname-translations', 'log', 'logand', 'logandc1',
|
| 81 |
+
'logandc2', 'logbitp', 'logcount', 'logeqv', 'logical-pathname',
|
| 82 |
+
'logical-pathname-translations', 'logior', 'lognand', 'lognor',
|
| 83 |
+
'lognot', 'logorc1', 'logorc2', 'logtest', 'logxor', 'long-site-name',
|
| 84 |
+
'lower-case-p', 'machine-instance', 'machine-type', 'machine-version',
|
| 85 |
+
'macroexpand', 'macroexpand-1', 'macro-function', 'make-array',
|
| 86 |
+
'make-broadcast-stream', 'make-concatenated-stream', 'make-condition',
|
| 87 |
+
'make-dispatch-macro-character', 'make-echo-stream', 'make-hash-table',
|
| 88 |
+
'make-instance', 'make-instances-obsolete', 'make-list',
|
| 89 |
+
'make-load-form', 'make-load-form-saving-slots', 'make-package',
|
| 90 |
+
'make-pathname', 'make-random-state', 'make-sequence', 'make-string',
|
| 91 |
+
'make-string-input-stream', 'make-string-output-stream', 'make-symbol',
|
| 92 |
+
'make-synonym-stream', 'make-two-way-stream', 'makunbound', 'map',
|
| 93 |
+
'mapc', 'mapcan', 'mapcar', 'mapcon', 'maphash', 'map-into', 'mapl',
|
| 94 |
+
'maplist', 'mask-field', 'max', 'member', 'member-if', 'member-if-not',
|
| 95 |
+
'merge', 'merge-pathnames', 'method-combination-error',
|
| 96 |
+
'method-qualifiers', 'min', 'minusp', 'mismatch', 'mod',
|
| 97 |
+
'muffle-warning', 'name-char', 'namestring', 'nbutlast', 'nconc',
|
| 98 |
+
'next-method-p', 'nintersection', 'ninth', 'no-applicable-method',
|
| 99 |
+
'no-next-method', 'not', 'notany', 'notevery', 'nreconc', 'nreverse',
|
| 100 |
+
'nset-difference', 'nset-exclusive-or', 'nstring-capitalize',
|
| 101 |
+
'nstring-downcase', 'nstring-upcase', 'nsublis', 'nsubst', 'nsubst-if',
|
| 102 |
+
'nsubst-if-not', 'nsubstitute', 'nsubstitute-if', 'nsubstitute-if-not',
|
| 103 |
+
'nth', 'nthcdr', 'null', 'numberp', 'numerator', 'nunion', 'oddp',
|
| 104 |
+
'open', 'open-stream-p', 'output-stream-p', 'package-error-package',
|
| 105 |
+
'package-name', 'package-nicknames', 'packagep',
|
| 106 |
+
'package-shadowing-symbols', 'package-used-by-list', 'package-use-list',
|
| 107 |
+
'pairlis', 'parse-integer', 'parse-namestring', 'pathname',
|
| 108 |
+
'pathname-device', 'pathname-directory', 'pathname-host',
|
| 109 |
+
'pathname-match-p', 'pathname-name', 'pathnamep', 'pathname-type',
|
| 110 |
+
'pathname-version', 'peek-char', 'phase', 'plusp', 'position',
|
| 111 |
+
'position-if', 'position-if-not', 'pprint', 'pprint-dispatch',
|
| 112 |
+
'pprint-fill', 'pprint-indent', 'pprint-linear', 'pprint-newline',
|
| 113 |
+
'pprint-tab', 'pprint-tabular', 'prin1', 'prin1-to-string', 'princ',
|
| 114 |
+
'princ-to-string', 'print', 'print-object', 'probe-file', 'proclaim',
|
| 115 |
+
'provide', 'random', 'random-state-p', 'rassoc', 'rassoc-if',
|
| 116 |
+
'rassoc-if-not', 'rational', 'rationalize', 'rationalp', 'read',
|
| 117 |
+
'read-byte', 'read-char', 'read-char-no-hang', 'read-delimited-list',
|
| 118 |
+
'read-from-string', 'read-line', 'read-preserving-whitespace',
|
| 119 |
+
'read-sequence', 'readtable-case', 'readtablep', 'realp', 'realpart',
|
| 120 |
+
'reduce', 'reinitialize-instance', 'rem', 'remhash', 'remove',
|
| 121 |
+
'remove-duplicates', 'remove-if', 'remove-if-not', 'remove-method',
|
| 122 |
+
'remprop', 'rename-file', 'rename-package', 'replace', 'require',
|
| 123 |
+
'rest', 'restart-name', 'revappend', 'reverse', 'room', 'round',
|
| 124 |
+
'row-major-aref', 'rplaca', 'rplacd', 'sbit', 'scale-float', 'schar',
|
| 125 |
+
'search', 'second', 'set', 'set-difference',
|
| 126 |
+
'set-dispatch-macro-character', 'set-exclusive-or',
|
| 127 |
+
'set-macro-character', 'set-pprint-dispatch', 'set-syntax-from-char',
|
| 128 |
+
'seventh', 'shadow', 'shadowing-import', 'shared-initialize',
|
| 129 |
+
'short-site-name', 'signal', 'signum', 'simple-bit-vector-p',
|
| 130 |
+
'simple-condition-format-arguments', 'simple-condition-format-control',
|
| 131 |
+
'simple-string-p', 'simple-vector-p', 'sin', 'sinh', 'sixth', 'sleep',
|
| 132 |
+
'slot-boundp', 'slot-exists-p', 'slot-makunbound', 'slot-missing',
|
| 133 |
+
'slot-unbound', 'slot-value', 'software-type', 'software-version',
|
| 134 |
+
'some', 'sort', 'special-operator-p', 'sqrt', 'stable-sort',
|
| 135 |
+
'standard-char-p', 'store-value', 'stream-element-type',
|
| 136 |
+
'stream-error-stream', 'stream-external-format', 'streamp', 'string',
|
| 137 |
+
'string<', 'string<=', 'string=', 'string>', 'string>=', 'string/=',
|
| 138 |
+
'string-capitalize', 'string-downcase', 'string-equal',
|
| 139 |
+
'string-greaterp', 'string-left-trim', 'string-lessp',
|
| 140 |
+
'string-not-equal', 'string-not-greaterp', 'string-not-lessp',
|
| 141 |
+
'stringp', 'string-right-trim', 'string-trim', 'string-upcase',
|
| 142 |
+
'sublis', 'subseq', 'subsetp', 'subst', 'subst-if', 'subst-if-not',
|
| 143 |
+
'substitute', 'substitute-if', 'substitute-if-not', 'subtypep','svref',
|
| 144 |
+
'sxhash', 'symbol-function', 'symbol-name', 'symbolp', 'symbol-package',
|
| 145 |
+
'symbol-plist', 'symbol-value', 'synonym-stream-symbol', 'syntax:',
|
| 146 |
+
'tailp', 'tan', 'tanh', 'tenth', 'terpri', 'third',
|
| 147 |
+
'translate-logical-pathname', 'translate-pathname', 'tree-equal',
|
| 148 |
+
'truename', 'truncate', 'two-way-stream-input-stream',
|
| 149 |
+
'two-way-stream-output-stream', 'type-error-datum',
|
| 150 |
+
'type-error-expected-type', 'type-of', 'typep', 'unbound-slot-instance',
|
| 151 |
+
'unexport', 'unintern', 'union', 'unread-char', 'unuse-package',
|
| 152 |
+
'update-instance-for-different-class',
|
| 153 |
+
'update-instance-for-redefined-class', 'upgraded-array-element-type',
|
| 154 |
+
'upgraded-complex-part-type', 'upper-case-p', 'use-package',
|
| 155 |
+
'user-homedir-pathname', 'use-value', 'values', 'values-list', 'vector',
|
| 156 |
+
'vectorp', 'vector-pop', 'vector-push', 'vector-push-extend', 'warn',
|
| 157 |
+
'wild-pathname-p', 'write', 'write-byte', 'write-char', 'write-line',
|
| 158 |
+
'write-sequence', 'write-string', 'write-to-string', 'yes-or-no-p',
|
| 159 |
+
'y-or-n-p', 'zerop',
|
| 160 |
+
))
|
| 161 |
+
|
| 162 |
+
SPECIAL_FORMS = set((
|
| 163 |
+
'block', 'catch', 'declare', 'eval-when', 'flet', 'function', 'go', 'if',
|
| 164 |
+
'labels', 'lambda', 'let', 'let*', 'load-time-value', 'locally', 'macrolet',
|
| 165 |
+
'multiple-value-call', 'multiple-value-prog1', 'progn', 'progv', 'quote',
|
| 166 |
+
'return-from', 'setq', 'symbol-macrolet', 'tagbody', 'the', 'throw',
|
| 167 |
+
'unwind-protect',
|
| 168 |
+
))
|
| 169 |
+
|
| 170 |
+
MACROS = set((
|
| 171 |
+
'and', 'assert', 'call-method', 'case', 'ccase', 'check-type', 'cond',
|
| 172 |
+
'ctypecase', 'decf', 'declaim', 'defclass', 'defconstant', 'defgeneric',
|
| 173 |
+
'define-compiler-macro', 'define-condition', 'define-method-combination',
|
| 174 |
+
'define-modify-macro', 'define-setf-expander', 'define-symbol-macro',
|
| 175 |
+
'defmacro', 'defmethod', 'defpackage', 'defparameter', 'defsetf',
|
| 176 |
+
'defstruct', 'deftype', 'defun', 'defvar', 'destructuring-bind', 'do',
|
| 177 |
+
'do*', 'do-all-symbols', 'do-external-symbols', 'dolist', 'do-symbols',
|
| 178 |
+
'dotimes', 'ecase', 'etypecase', 'formatter', 'handler-bind',
|
| 179 |
+
'handler-case', 'ignore-errors', 'incf', 'in-package', 'lambda', 'loop',
|
| 180 |
+
'loop-finish', 'make-method', 'multiple-value-bind', 'multiple-value-list',
|
| 181 |
+
'multiple-value-setq', 'nth-value', 'or', 'pop',
|
| 182 |
+
'pprint-exit-if-list-exhausted', 'pprint-logical-block', 'pprint-pop',
|
| 183 |
+
'print-unreadable-object', 'prog', 'prog*', 'prog1', 'prog2', 'psetf',
|
| 184 |
+
'psetq', 'push', 'pushnew', 'remf', 'restart-bind', 'restart-case',
|
| 185 |
+
'return', 'rotatef', 'setf', 'shiftf', 'step', 'time', 'trace', 'typecase',
|
| 186 |
+
'unless', 'untrace', 'when', 'with-accessors', 'with-compilation-unit',
|
| 187 |
+
'with-condition-restarts', 'with-hash-table-iterator',
|
| 188 |
+
'with-input-from-string', 'with-open-file', 'with-open-stream',
|
| 189 |
+
'with-output-to-string', 'with-package-iterator', 'with-simple-restart',
|
| 190 |
+
'with-slots', 'with-standard-io-syntax',
|
| 191 |
+
))
|
| 192 |
+
|
| 193 |
+
LAMBDA_LIST_KEYWORDS = set((
|
| 194 |
+
'&allow-other-keys', '&aux', '&body', '&environment', '&key', '&optional',
|
| 195 |
+
'&rest', '&whole',
|
| 196 |
+
))
|
| 197 |
+
|
| 198 |
+
DECLARATIONS = set((
|
| 199 |
+
'dynamic-extent', 'ignore', 'optimize', 'ftype', 'inline', 'special',
|
| 200 |
+
'ignorable', 'notinline', 'type',
|
| 201 |
+
))
|
| 202 |
+
|
| 203 |
+
BUILTIN_TYPES = set((
|
| 204 |
+
'atom', 'boolean', 'base-char', 'base-string', 'bignum', 'bit',
|
| 205 |
+
'compiled-function', 'extended-char', 'fixnum', 'keyword', 'nil',
|
| 206 |
+
'signed-byte', 'short-float', 'single-float', 'double-float', 'long-float',
|
| 207 |
+
'simple-array', 'simple-base-string', 'simple-bit-vector', 'simple-string',
|
| 208 |
+
'simple-vector', 'standard-char', 'unsigned-byte',
|
| 209 |
+
|
| 210 |
+
# Condition Types
|
| 211 |
+
'arithmetic-error', 'cell-error', 'condition', 'control-error',
|
| 212 |
+
'division-by-zero', 'end-of-file', 'error', 'file-error',
|
| 213 |
+
'floating-point-inexact', 'floating-point-overflow',
|
| 214 |
+
'floating-point-underflow', 'floating-point-invalid-operation',
|
| 215 |
+
'parse-error', 'package-error', 'print-not-readable', 'program-error',
|
| 216 |
+
'reader-error', 'serious-condition', 'simple-condition', 'simple-error',
|
| 217 |
+
'simple-type-error', 'simple-warning', 'stream-error', 'storage-condition',
|
| 218 |
+
'style-warning', 'type-error', 'unbound-variable', 'unbound-slot',
|
| 219 |
+
'undefined-function', 'warning',
|
| 220 |
+
))
|
| 221 |
+
|
| 222 |
+
BUILTIN_CLASSES = set((
|
| 223 |
+
'array', 'broadcast-stream', 'bit-vector', 'built-in-class', 'character',
|
| 224 |
+
'class', 'complex', 'concatenated-stream', 'cons', 'echo-stream',
|
| 225 |
+
'file-stream', 'float', 'function', 'generic-function', 'hash-table',
|
| 226 |
+
'integer', 'list', 'logical-pathname', 'method-combination', 'method',
|
| 227 |
+
'null', 'number', 'package', 'pathname', 'ratio', 'rational', 'readtable',
|
| 228 |
+
'real', 'random-state', 'restart', 'sequence', 'standard-class',
|
| 229 |
+
'standard-generic-function', 'standard-method', 'standard-object',
|
| 230 |
+
'string-stream', 'stream', 'string', 'structure-class', 'structure-object',
|
| 231 |
+
'symbol', 'synonym-stream', 't', 'two-way-stream', 'vector',
|
| 232 |
+
))
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/_cocoa_builtins.py
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers._cocoa_builtins
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
This file defines a set of types used across Cocoa frameworks from Apple.
|
| 7 |
+
There is a list of @interfaces, @protocols and some other (structs, unions)
|
| 8 |
+
|
| 9 |
+
File may be also used as standalone generator for aboves.
|
| 10 |
+
|
| 11 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 12 |
+
:license: BSD, see LICENSE for details.
|
| 13 |
+
"""
|
| 14 |
+
|
| 15 |
+
from __future__ import print_function
|
| 16 |
+
|
| 17 |
+
COCOA_INTERFACES = set(['UITableViewCell', 'HKCorrelationQuery', 'NSURLSessionDataTask', 'PHFetchOptions', 'NSLinguisticTagger', 'NSStream', 'AVAudioUnitDelay', 'GCMotion', 'SKPhysicsWorld', 'NSString', 'CMAttitude', 'AVAudioEnvironmentDistanceAttenuationParameters', 'HKStatisticsCollection', 'SCNPlane', 'CBPeer', 'JSContext', 'SCNTransaction', 'SCNTorus', 'AVAudioUnitEffect', 'UICollectionReusableView', 'MTLSamplerDescriptor', 'AVAssetReaderSampleReferenceOutput', 'AVMutableCompositionTrack', 'GKLeaderboard', 'NSFetchedResultsController', 'SKRange', 'MKTileOverlayRenderer', 'MIDINetworkSession', 'UIVisualEffectView', 'CIWarpKernel', 'PKObject', 'MKRoute', 'MPVolumeView', 'UIPrintInfo', 'SCNText', 'ADClient', 'PKPayment', 'AVMutableAudioMix', 'GLKEffectPropertyLight', 'WKScriptMessage', 'AVMIDIPlayer', 'PHCollectionListChangeRequest', 'UICollectionViewLayout', 'NSMutableCharacterSet', 'SKPaymentTransaction', 'NEOnDemandRuleConnect', 'NSShadow', 'SCNView', 'NSURLSessionConfiguration', 'MTLVertexAttributeDescriptor', 'CBCharacteristic', 'HKQuantityType', 'CKLocationSortDescriptor', 'NEVPNIKEv2SecurityAssociationParameters', 'CMStepCounter', 'NSNetService', 'AVAssetWriterInputMetadataAdaptor', 'UICollectionView', 'UIViewPrintFormatter', 'SCNLevelOfDetail', 'CAShapeLayer', 'MCPeerID', 'MPRatingCommand', 'WKNavigation', 'NSDictionary', 'NSFileVersion', 'CMGyroData', 'AVAudioUnitDistortion', 'CKFetchRecordsOperation', 'SKPhysicsJointSpring', 'SCNHitTestResult', 'AVAudioTime', 'CIFilter', 'UIView', 'SCNConstraint', 'CAPropertyAnimation', 'MKMapItem', 'MPRemoteCommandCenter', 'PKPaymentSummaryItem', 'UICollectionViewFlowLayoutInvalidationContext', 'UIInputViewController', 'PKPass', 'SCNPhysicsBehavior', 'MTLRenderPassColorAttachmentDescriptor', 'MKPolygonRenderer', 'CKNotification', 'JSValue', 'PHCollectionList', 'CLGeocoder', 'NSByteCountFormatter', 'AVCaptureScreenInput', 'MPFeedbackCommand', 'CAAnimation', 'MKOverlayPathView', 'UIActionSheet', 'UIMotionEffectGroup', 'NSLengthFormatter', 'UIBarItem', 'SKProduct', 'AVAssetExportSession', 'NSKeyedUnarchiver', 'NSMutableSet', 'SCNPyramid', 'PHAssetCollection', 'MKMapView', 'HMHomeManager', 'CATransition', 'MTLCompileOptions', 'UIVibrancyEffect', 'CLCircularRegion', 'MKTileOverlay', 'SCNShape', 'ACAccountCredential', 'SKPhysicsJointLimit', 'MKMapSnapshotter', 'AVMediaSelectionGroup', 'NSIndexSet', 'CBPeripheralManager', 'CKRecordZone', 'AVAudioRecorder', 'NSURL', 'CBCentral', 'NSNumber', 'AVAudioOutputNode', 'MTLVertexAttributeDescriptorArray', 'MKETAResponse', 'SKTransition', 'SSReadingList', 'HKSourceQuery', 'UITableViewRowAction', 'UITableView', 'SCNParticlePropertyController', 'AVCaptureStillImageOutput', 'GCController', 'AVAudioPlayerNode', 'AVAudioSessionPortDescription', 'NSHTTPURLResponse', 'NEOnDemandRuleEvaluateConnection', 'SKEffectNode', 'HKQuantity', 'GCControllerElement', 'AVPlayerItemAccessLogEvent', 'SCNBox', 'NSExtensionContext', 'MKOverlayRenderer', 'SCNPhysicsVehicle', 'NSDecimalNumber', 'EKReminder', 'MKPolylineView', 'CKQuery', 'AVAudioMixerNode', 'GKAchievementDescription', 'EKParticipant', 'NSBlockOperation', 'UIActivityItemProvider', 'CLLocation', 'NSBatchUpdateRequest', 'PHContentEditingOutput', 'PHObjectChangeDetails', 'HKWorkoutType', 'MPMoviePlayerController', 'AVAudioFormat', 'HMTrigger', 'MTLRenderPassDepthAttachmentDescriptor', 'SCNRenderer', 'GKScore', 'UISplitViewController', 'HKSource', 'NSURLConnection', 'ABUnknownPersonViewController', 'SCNTechnique', 'UIMenuController', 'NSEvent', 'SKTextureAtlas', 'NSKeyedArchiver', 'GKLeaderboardSet', 'NSSimpleCString', 'AVAudioPCMBuffer', 'CBATTRequest', 'GKMatchRequest', 'AVMetadataObject', 'SKProductsRequest', 'UIAlertView', 'NSIncrementalStore', 'MFMailComposeViewController', 'SCNFloor', 'NSSortDescriptor', 'CKFetchNotificationChangesOperation', 'MPMovieAccessLog', 'NSManagedObjectContext', 'AVAudioUnitGenerator', 'WKBackForwardList', 'SKMutableTexture', 'AVCaptureAudioDataOutput', 'ACAccount', 'AVMetadataItem', 'MPRatingCommandEvent', 'AVCaptureDeviceInputSource', 'CLLocationManager', 'MPRemoteCommand', 'AVCaptureSession', 'UIStepper', 'UIRefreshControl', 'NEEvaluateConnectionRule', 'CKModifyRecordsOperation', 'UICollectionViewTransitionLayout', 'CBCentralManager', 'NSPurgeableData', 'PKShippingMethod', 'SLComposeViewController', 'NSHashTable', 'MKUserTrackingBarButtonItem', 'UILexiconEntry', 'CMMotionActivity', 'SKAction', 'SKShader', 'AVPlayerItemOutput', 'MTLRenderPassAttachmentDescriptor', 'UIDocumentInteractionController', 'UIDynamicItemBehavior', 'NSMutableDictionary', 'UILabel', 'AVCaptureInputPort', 'NSExpression', 'CAInterAppAudioTransportView', 'SKMutablePayment', 'UIImage', 'PHCachingImageManager', 'SCNTransformConstraint', 'HKCorrelationType', 'UIColor', 'SCNGeometrySource', 'AVCaptureAutoExposureBracketedStillImageSettings', 'UIPopoverBackgroundView', 'UIToolbar', 'NSNotificationCenter', 'UICollectionViewLayoutAttributes', 'AVAssetReaderOutputMetadataAdaptor', 'NSEntityMigrationPolicy', 'HMUser', 'NSLocale', 'NSURLSession', 'SCNCamera', 'NSTimeZone', 'UIManagedDocument', 'AVMutableVideoCompositionLayerInstruction', 'AVAssetTrackGroup', 'NSInvocationOperation', 'ALAssetRepresentation', 'AVQueuePlayer', 'HMServiceGroup', 'UIPasteboard', 'PHContentEditingInput', 'NSLayoutManager', 'EKCalendarChooser', 'EKObject', 'CATiledLayer', 'GLKReflectionMapEffect', 'NSManagedObjectID', 'NSEnergyFormatter', 'SLRequest', 'HMCharacteristic', 'AVPlayerLayer', 'MTLRenderPassDescriptor', 'SKPayment', 'NSPointerArray', 'AVAudioMix', 'SCNLight', 'MCAdvertiserAssistant', 'MKMapSnapshotOptions', 'HKCategorySample', 'AVAudioEnvironmentReverbParameters', 'SCNMorpher', 'AVTimedMetadataGroup', 'CBMutableCharacteristic', 'NSFetchRequest', 'UIDevice', 'NSManagedObject', 'NKAssetDownload', 'AVOutputSettingsAssistant', 'SKPhysicsJointPin', 'UITabBar', 'UITextInputMode', 'NSFetchRequestExpression', 'HMActionSet', 'CTSubscriber', 'PHAssetChangeRequest', 'NSPersistentStoreRequest', 'UITabBarController', 'HKQuantitySample', 'AVPlayerItem', 'AVSynchronizedLayer', 'MKDirectionsRequest', 'NSMetadataItem', 'UIPresentationController', 'UINavigationItem', 'PHFetchResultChangeDetails', 'PHImageManager', 'AVCaptureManualExposureBracketedStillImageSettings', 'UIStoryboardPopoverSegue', 'SCNLookAtConstraint', 'UIGravityBehavior', 'UIWindow', 'CBMutableDescriptor', 'NEOnDemandRuleDisconnect', 'UIBezierPath', 'UINavigationController', 'ABPeoplePickerNavigationController', 'EKSource', 'AVAssetWriterInput', 'AVPlayerItemTrack', 'GLKEffectPropertyTexture', 'NSHTTPCookie', 'NSURLResponse', 'SKPaymentQueue', 'NSAssertionHandler', 'MKReverseGeocoder', 'GCControllerAxisInput', 'NSArray', 'NSOrthography', 'NSURLSessionUploadTask', 'NSCharacterSet', 'AVMutableVideoCompositionInstruction', 'AVAssetReaderOutput', 'EAGLContext', 'WKFrameInfo', 'CMPedometer', 'MyClass', 'CKModifyBadgeOperation', 'AVCaptureAudioFileOutput', 'SKEmitterNode', 'NSMachPort', 'AVVideoCompositionCoreAnimationTool', 'PHCollection', 'SCNPhysicsWorld', 'NSURLRequest', 'CMAccelerometerData', 'NSNetServiceBrowser', 'CLFloor', 'AVAsynchronousVideoCompositionRequest', 'SCNGeometry', 'SCNIKConstraint', 'CIKernel', 'CAGradientLayer', 'HKCharacteristicType', 'NSFormatter', 'SCNAction', 'CATransaction', 'CBUUID', 'UIStoryboard', 'MPMediaLibrary', 'UITapGestureRecognizer', 'MPMediaItemArtwork', 'NSURLSessionTask', 'AVAudioUnit', 'MCBrowserViewController', 'UIFontDescriptor', 'NSRelationshipDescription', 'HKSample', 'WKWebView', 'NSMutableAttributedString', 'NSPersistentStoreAsynchronousResult', 'MPNowPlayingInfoCenter', 'MKLocalSearch', 'EAAccessory', 'HKCorrelation', 'CATextLayer', 'NSNotificationQueue', 'UINib', 'GLKTextureLoader', 'HKObjectType', 'NSValue', 'NSMutableIndexSet', 'SKPhysicsContact', 'NSProgress', 'AVPlayerViewController', 'CAScrollLayer', 'GKSavedGame', 'NSTextCheckingResult', 'PHObjectPlaceholder', 'SKConstraint', 'EKEventEditViewController', 'NSEntityDescription', 'NSURLCredentialStorage', 'UIApplication', 'SKDownload', 'SCNNode', 'MKLocalSearchRequest', 'SKScene', 'UISearchDisplayController', 'NEOnDemandRule', 'MTLRenderPassStencilAttachmentDescriptor', 'CAReplicatorLayer', 'UIPrintPageRenderer', 'EKCalendarItem', 'NSUUID', 'EAAccessoryManager', 'NEOnDemandRuleIgnore', 'SKRegion', 'AVAssetResourceLoader', 'EAWiFiUnconfiguredAccessoryBrowser', 'NSUserActivity', 'CTCall', 'UIPrinterPickerController', 'CIVector', 'UINavigationBar', 'UIPanGestureRecognizer', 'MPMediaQuery', 'ABNewPersonViewController', 'CKRecordZoneID', 'HKAnchoredObjectQuery', 'CKFetchRecordZonesOperation', 'UIStoryboardSegue', 'ACAccountType', 'GKSession', 'SKVideoNode', 'PHChange', 'SKReceiptRefreshRequest', 'GCExtendedGamepadSnapshot', 'MPSeekCommandEvent', 'GCExtendedGamepad', 'CAValueFunction', 'SCNCylinder', 'NSNotification', 'NSBatchUpdateResult', 'PKPushCredentials', 'SCNPhysicsSliderJoint', 'AVCaptureDeviceFormat', 'AVPlayerItemErrorLog', 'NSMapTable', 'NSSet', 'CMMotionManager', 'GKVoiceChatService', 'UIPageControl', 'UILexicon', 'MTLArrayType', 'AVAudioUnitReverb', 'MKGeodesicPolyline', 'AVMutableComposition', 'NSLayoutConstraint', 'UIPrinter', 'NSOrderedSet', 'CBAttribute', 'PKPushPayload', 'NSIncrementalStoreNode', 'EKEventStore', 'MPRemoteCommandEvent', 'UISlider', 'UIBlurEffect', 'CKAsset', 'AVCaptureInput', 'AVAudioEngine', 'MTLVertexDescriptor', 'SKPhysicsBody', 'NSOperation', 'PKPaymentPass', 'UIImageAsset', 'MKMapCamera', 'SKProductsResponse', 'GLKEffectPropertyMaterial', 'AVCaptureDevice', 'CTCallCenter', 'CABTMIDILocalPeripheralViewController', 'NEVPNManager', 'HKQuery', 'SCNPhysicsContact', 'CBMutableService', 'AVSampleBufferDisplayLayer', 'SCNSceneSource', 'SKLightNode', 'CKDiscoveredUserInfo', 'NSMutableArray', 'MTLDepthStencilDescriptor', 'MTLArgument', 'NSMassFormatter', 'CIRectangleFeature', 'PKPushRegistry', 'NEVPNConnection', 'MCNearbyServiceBrowser', 'NSOperationQueue', 'MKPolylineRenderer', 'HKWorkout', 'NSValueTransformer', 'UICollectionViewFlowLayout', 'MPChangePlaybackRateCommandEvent', 'NSEntityMapping', 'SKTexture', 'NSMergePolicy', 'UITextInputStringTokenizer', 'NSRecursiveLock', 'AVAsset', 'NSUndoManager', 'AVAudioUnitSampler', 'NSItemProvider', 'SKUniform', 'MPMediaPickerController', 'CKOperation', 'MTLRenderPipelineDescriptor', 'EAWiFiUnconfiguredAccessory', 'NSFileCoordinator', 'SKRequest', 'NSFileHandle', 'NSConditionLock', 'UISegmentedControl', 'NSManagedObjectModel', 'UITabBarItem', 'SCNCone', 'MPMediaItem', 'SCNMaterial', 'EKRecurrenceRule', 'UIEvent', 'UITouch', 'UIPrintInteractionController', 'CMDeviceMotion', 'NEVPNProtocol', 'NSCompoundPredicate', 'HKHealthStore', 'MKMultiPoint', 'HKSampleType', 'UIPrintFormatter', 'AVAudioUnitEQFilterParameters', 'SKView', 'NSConstantString', 'UIPopoverController', 'CKDatabase', 'AVMetadataFaceObject', 'UIAccelerometer', 'EKEventViewController', 'CMAltitudeData', 'MTLStencilDescriptor', 'UISwipeGestureRecognizer', 'NSPort', 'MKCircleRenderer', 'AVCompositionTrack', 'NSAsynchronousFetchRequest', 'NSUbiquitousKeyValueStore', 'NSMetadataQueryResultGroup', 'AVAssetResourceLoadingDataRequest', 'UITableViewHeaderFooterView', 'CKNotificationID', 'AVAudioSession', 'HKUnit', 'NSNull', 'NSPersistentStoreResult', 'MKCircleView', 'AVAudioChannelLayout', 'NEVPNProtocolIKEv2', 'WKProcessPool', 'UIAttachmentBehavior', 'CLBeacon', 'NSInputStream', 'NSURLCache', 'GKPlayer', 'NSMappingModel', 'CIQRCodeFeature', 'AVMutableVideoComposition', 'PHFetchResult', 'NSAttributeDescription', 'AVPlayer', 'MKAnnotationView', 'PKPaymentRequest', 'NSTimer', 'CBDescriptor', 'MKOverlayView', 'AVAudioUnitTimePitch', 'NSSaveChangesRequest', 'UIReferenceLibraryViewController', 'SKPhysicsJointFixed', 'UILocalizedIndexedCollation', 'UIInterpolatingMotionEffect', 'UIDocumentPickerViewController', 'AVAssetWriter', 'NSBundle', 'SKStoreProductViewController', 'GLKViewController', 'NSMetadataQueryAttributeValueTuple', 'GKTurnBasedMatch', 'AVAudioFile', 'UIActivity', 'NSPipe', 'MKShape', 'NSMergeConflict', 'CIImage', 'HKObject', 'UIRotationGestureRecognizer', 'AVPlayerItemLegibleOutput', 'AVAssetImageGenerator', 'GCControllerButtonInput', 'CKMarkNotificationsReadOperation', 'CKSubscription', 'MPTimedMetadata', 'NKIssue', 'UIScreenMode', 'HMAccessoryBrowser', 'GKTurnBasedEventHandler', 'UIWebView', 'MKPolyline', 'JSVirtualMachine', 'AVAssetReader', 'NSAttributedString', 'GKMatchmakerViewController', 'NSCountedSet', 'UIButton', 'WKNavigationResponse', 'GKLocalPlayer', 'MPMovieErrorLog', 'AVSpeechUtterance', 'HKStatistics', 'UILocalNotification', 'HKBiologicalSexObject', 'AVURLAsset', 'CBPeripheral', 'NSDateComponentsFormatter', 'SKSpriteNode', 'UIAccessibilityElement', 'AVAssetWriterInputGroup', 'HMZone', 'AVAssetReaderAudioMixOutput', 'NSEnumerator', 'UIDocument', 'MKLocalSearchResponse', 'UISimpleTextPrintFormatter', 'PHPhotoLibrary', 'CBService', 'UIDocumentMenuViewController', 'MCSession', 'QLPreviewController', 'CAMediaTimingFunction', 'UITextPosition', 'ASIdentifierManager', 'AVAssetResourceLoadingRequest', 'SLComposeServiceViewController', 'UIPinchGestureRecognizer', 'PHObject', 'NSExtensionItem', 'HKSampleQuery', 'MTLRenderPipelineColorAttachmentDescriptorArray', 'MKRouteStep', 'SCNCapsule', 'NSMetadataQuery', 'AVAssetResourceLoadingContentInformationRequest', 'UITraitCollection', 'CTCarrier', 'NSFileSecurity', 'UIAcceleration', 'UIMotionEffect', 'MTLRenderPipelineReflection', 'CLHeading', 'CLVisit', 'MKDirectionsResponse', 'HMAccessory', 'MTLStructType', 'UITextView', 'CMMagnetometerData', 'UICollisionBehavior', 'UIProgressView', 'CKServerChangeToken', 'UISearchBar', 'MKPlacemark', 'AVCaptureConnection', 'NSPropertyMapping', 'ALAssetsFilter', 'SK3DNode', 'AVPlayerItemErrorLogEvent', 'NSJSONSerialization', 'AVAssetReaderVideoCompositionOutput', 'ABPersonViewController', 'CIDetector', 'GKTurnBasedMatchmakerViewController', 'MPMediaItemCollection', 'SCNSphere', 'NSCondition', 'NSURLCredential', 'MIDINetworkConnection', 'NSFileProviderExtension', 'NSDecimalNumberHandler', 'NSAtomicStoreCacheNode', 'NSAtomicStore', 'EKAlarm', 'CKNotificationInfo', 'AVAudioUnitEQ', 'UIPercentDrivenInteractiveTransition', 'MKPolygon', 'AVAssetTrackSegment', 'MTLVertexAttribute', 'NSExpressionDescription', 'HKStatisticsCollectionQuery', 'NSURLAuthenticationChallenge', 'NSDirectoryEnumerator', 'MKDistanceFormatter', 'UIAlertAction', 'NSPropertyListSerialization', 'GKPeerPickerController', 'UIUserNotificationSettings', 'UITableViewController', 'GKNotificationBanner', 'MKPointAnnotation', 'MTLRenderPassColorAttachmentDescriptorArray', 'NSCache', 'SKPhysicsJoint', 'NSXMLParser', 'UIViewController', 'PKPaymentToken', 'MFMessageComposeViewController', 'AVAudioInputNode', 'NSDataDetector', 'CABTMIDICentralViewController', 'AVAudioUnitMIDIInstrument', 'AVCaptureVideoPreviewLayer', 'AVAssetWriterInputPassDescription', 'MPChangePlaybackRateCommand', 'NSURLComponents', 'CAMetalLayer', 'UISnapBehavior', 'AVMetadataMachineReadableCodeObject', 'CKDiscoverUserInfosOperation', 'NSTextAttachment', 'NSException', 'UIMenuItem', 'CMMotionActivityManager', 'SCNGeometryElement', 'NCWidgetController', 'CAEmitterLayer', 'MKUserLocation', 'UIImagePickerController', 'CIFeature', 'AVCaptureDeviceInput', 'ALAsset', 'NSURLSessionDownloadTask', 'SCNPhysicsHingeJoint', 'MPMoviePlayerViewController', 'NSMutableOrderedSet', 'SCNMaterialProperty', 'UIFont', 'AVCaptureVideoDataOutput', 'NSCachedURLResponse', 'ALAssetsLibrary', 'NSInvocation', 'UILongPressGestureRecognizer', 'NSTextStorage', 'WKWebViewConfiguration', 'CIFaceFeature', 'MKMapSnapshot', 'GLKEffectPropertyFog', 'AVComposition', 'CKDiscoverAllContactsOperation', 'AVAudioMixInputParameters', 'CAEmitterBehavior', 'PKPassLibrary', 'UIMutableUserNotificationCategory', 'NSLock', 'NEVPNProtocolIPSec', 'ADBannerView', 'UIDocumentPickerExtensionViewController', 'UIActivityIndicatorView', 'AVPlayerMediaSelectionCriteria', 'CALayer', 'UIAccessibilityCustomAction', 'UIBarButtonItem', 'AVAudioSessionRouteDescription', 'CLBeaconRegion', 'HKBloodTypeObject', 'MTLVertexBufferLayoutDescriptorArray', 'CABasicAnimation', 'AVVideoCompositionInstruction', 'AVMutableTimedMetadataGroup', 'EKRecurrenceEnd', 'NSTextContainer', 'TWTweetComposeViewController', 'PKPaymentAuthorizationViewController', 'UIScrollView', 'WKNavigationAction', 'AVPlayerItemMetadataOutput', 'EKRecurrenceDayOfWeek', 'NSNumberFormatter', 'MTLComputePipelineReflection', 'UIScreen', 'CLRegion', 'NSProcessInfo', 'GLKTextureInfo', 'SCNSkinner', 'AVCaptureMetadataOutput', 'SCNAnimationEvent', 'NSTextTab', 'JSManagedValue', 'NSDate', 'UITextChecker', 'WKBackForwardListItem', 'NSData', 'NSParagraphStyle', 'AVMutableMetadataItem', 'EKCalendar', 'HKWorkoutEvent', 'NSMutableURLRequest', 'UIVideoEditorController', 'HMTimerTrigger', 'AVAudioUnitVarispeed', 'UIDynamicAnimator', 'AVCompositionTrackSegment', 'GCGamepadSnapshot', 'MPMediaEntity', 'GLKSkyboxEffect', 'UISwitch', 'EKStructuredLocation', 'UIGestureRecognizer', 'NSProxy', 'GLKBaseEffect', 'UIPushBehavior', 'GKScoreChallenge', 'NSCoder', 'MPMediaPlaylist', 'NSDateComponents', 'WKUserScript', 'EKEvent', 'NSDateFormatter', 'NSAsynchronousFetchResult', 'AVAssetWriterInputPixelBufferAdaptor', 'UIVisualEffect', 'UICollectionViewCell', 'UITextField', 'CLPlacemark', 'MPPlayableContentManager', 'AVCaptureOutput', 'HMCharacteristicWriteAction', 'CKModifySubscriptionsOperation', 'NSPropertyDescription', 'GCGamepad', 'UIMarkupTextPrintFormatter', 'SCNTube', 'NSPersistentStoreCoordinator', 'AVAudioEnvironmentNode', 'GKMatchmaker', 'CIContext', 'NSThread', 'SLComposeSheetConfigurationItem', 'SKPhysicsJointSliding', 'NSPredicate', 'GKVoiceChat', 'SKCropNode', 'AVCaptureAudioPreviewOutput', 'NSStringDrawingContext', 'GKGameCenterViewController', 'UIPrintPaper', 'SCNPhysicsBallSocketJoint', 'UICollectionViewLayoutInvalidationContext', 'GLKEffectPropertyTransform', 'AVAudioIONode', 'UIDatePicker', 'MKDirections', 'ALAssetsGroup', 'CKRecordZoneNotification', 'SCNScene', 'MPMovieAccessLogEvent', 'CKFetchSubscriptionsOperation', 'CAEmitterCell', 'AVAudioUnitTimeEffect', 'HMCharacteristicMetadata', 'MKPinAnnotationView', 'UIPickerView', 'UIImageView', 'UIUserNotificationCategory', 'SCNPhysicsVehicleWheel', 'HKCategoryType', 'MPMediaQuerySection', 'GKFriendRequestComposeViewController', 'NSError', 'MTLRenderPipelineColorAttachmentDescriptor', 'SCNPhysicsShape', 'UISearchController', 'SCNPhysicsBody', 'CTSubscriberInfo', 'AVPlayerItemAccessLog', 'MPMediaPropertyPredicate', 'CMLogItem', 'NSAutoreleasePool', 'NSSocketPort', 'AVAssetReaderTrackOutput', 'SKNode', 'UIMutableUserNotificationAction', 'SCNProgram', 'AVSpeechSynthesisVoice', 'CMAltimeter', 'AVCaptureAudioChannel', 'GKTurnBasedExchangeReply', 'AVVideoCompositionLayerInstruction', 'AVSpeechSynthesizer', 'GKChallengeEventHandler', 'AVCaptureFileOutput', 'UIControl', 'SCNPhysicsField', 'CKReference', 'LAContext', 'CKRecordID', 'ADInterstitialAd', 'AVAudioSessionDataSourceDescription', 'AVAudioBuffer', 'CIColorKernel', 'GCControllerDirectionPad', 'NSFileManager', 'AVMutableAudioMixInputParameters', 'UIScreenEdgePanGestureRecognizer', 'CAKeyframeAnimation', 'CKQueryNotification', 'PHAdjustmentData', 'EASession', 'AVAssetResourceRenewalRequest', 'UIInputView', 'NSFileWrapper', 'UIResponder', 'NSPointerFunctions', 'UIKeyCommand', 'NSHTTPCookieStorage', 'AVMediaSelectionOption', 'NSRunLoop', 'NSFileAccessIntent', 'CAAnimationGroup', 'MKCircle', 'UIAlertController', 'NSMigrationManager', 'NSDateIntervalFormatter', 'UICollectionViewUpdateItem', 'CKDatabaseOperation', 'PHImageRequestOptions', 'SKReachConstraints', 'CKRecord', 'CAInterAppAudioSwitcherView', 'WKWindowFeatures', 'GKInvite', 'NSMutableData', 'PHAssetCollectionChangeRequest', 'NSMutableParagraphStyle', 'UIDynamicBehavior', 'GLKEffectProperty', 'CKFetchRecordChangesOperation', 'SKShapeNode', 'MPMovieErrorLogEvent', 'MKPolygonView', 'MPContentItem', 'HMAction', 'NSScanner', 'GKAchievementChallenge', 'AVAudioPlayer', 'CKContainer', 'AVVideoComposition', 'NKLibrary', 'NSPersistentStore', 'AVCaptureMovieFileOutput', 'HMRoom', 'GKChallenge', 'UITextRange', 'NSURLProtectionSpace', 'ACAccountStore', 'MPSkipIntervalCommand', 'NSComparisonPredicate', 'HMHome', 'PHVideoRequestOptions', 'NSOutputStream', 'MPSkipIntervalCommandEvent', 'PKAddPassesViewController', 'UITextSelectionRect', 'CTTelephonyNetworkInfo', 'AVTextStyleRule', 'NSFetchedPropertyDescription', 'UIPageViewController', 'CATransformLayer', 'UICollectionViewController', 'AVAudioNode', 'MCNearbyServiceAdvertiser', 'NSObject', 'PHAsset', 'GKLeaderboardViewController', 'CKQueryCursor', 'MPMusicPlayerController', 'MKOverlayPathRenderer', 'CMPedometerData', 'HMService', 'SKFieldNode', 'GKAchievement', 'WKUserContentController', 'AVAssetTrack', 'TWRequest', 'SKLabelNode', 'AVCaptureBracketedStillImageSettings', 'MIDINetworkHost', 'MPMediaPredicate', 'AVFrameRateRange', 'MTLTextureDescriptor', 'MTLVertexBufferLayoutDescriptor', 'MPFeedbackCommandEvent', 'UIUserNotificationAction', 'HKStatisticsQuery', 'SCNParticleSystem', 'NSIndexPath', 'AVVideoCompositionRenderContext', 'CADisplayLink', 'HKObserverQuery', 'UIPopoverPresentationController', 'CKQueryOperation', 'CAEAGLLayer', 'NSMutableString', 'NSMessagePort', 'NSURLQueryItem', 'MTLStructMember', 'AVAudioSessionChannelDescription', 'GLKView', 'UIActivityViewController', 'GKAchievementViewController', 'GKTurnBasedParticipant', 'NSURLProtocol', 'NSUserDefaults', 'NSCalendar', 'SKKeyframeSequence', 'AVMetadataItemFilter', 'CKModifyRecordZonesOperation', 'WKPreferences', 'NSMethodSignature', 'NSRegularExpression', 'EAGLSharegroup', 'AVPlayerItemVideoOutput', 'PHContentEditingInputRequestOptions', 'GKMatch', 'CIColor', 'UIDictationPhrase'])
|
| 18 |
+
COCOA_PROTOCOLS = set(['SKStoreProductViewControllerDelegate', 'AVVideoCompositionInstruction', 'AVAudioSessionDelegate', 'GKMatchDelegate', 'NSFileManagerDelegate', 'UILayoutSupport', 'NSCopying', 'UIPrintInteractionControllerDelegate', 'QLPreviewControllerDataSource', 'SKProductsRequestDelegate', 'NSTextStorageDelegate', 'MCBrowserViewControllerDelegate', 'MTLComputeCommandEncoder', 'SCNSceneExportDelegate', 'UISearchResultsUpdating', 'MFMailComposeViewControllerDelegate', 'MTLBlitCommandEncoder', 'NSDecimalNumberBehaviors', 'PHContentEditingController', 'NSMutableCopying', 'UIActionSheetDelegate', 'UIViewControllerTransitioningDelegate', 'UIAlertViewDelegate', 'AVAudioPlayerDelegate', 'MKReverseGeocoderDelegate', 'NSCoding', 'UITextInputTokenizer', 'GKFriendRequestComposeViewControllerDelegate', 'UIActivityItemSource', 'NSCacheDelegate', 'UIAdaptivePresentationControllerDelegate', 'GKAchievementViewControllerDelegate', 'UIViewControllerTransitionCoordinator', 'EKEventEditViewDelegate', 'NSURLConnectionDelegate', 'UITableViewDelegate', 'GKPeerPickerControllerDelegate', 'UIGuidedAccessRestrictionDelegate', 'AVSpeechSynthesizerDelegate', 'AVAudio3DMixing', 'AVPlayerItemLegibleOutputPushDelegate', 'ADInterstitialAdDelegate', 'HMAccessoryBrowserDelegate', 'AVAssetResourceLoaderDelegate', 'UITabBarControllerDelegate', 'CKRecordValue', 'SKPaymentTransactionObserver', 'AVCaptureAudioDataOutputSampleBufferDelegate', 'UIInputViewAudioFeedback', 'GKChallengeListener', 'SKSceneDelegate', 'UIPickerViewDelegate', 'UIWebViewDelegate', 'UIApplicationDelegate', 'GKInviteEventListener', 'MPMediaPlayback', 'MyClassJavaScriptMethods', 'AVAsynchronousKeyValueLoading', 'QLPreviewItem', 'SCNBoundingVolume', 'NSPortDelegate', 'UIContentContainer', 'SCNNodeRendererDelegate', 'SKRequestDelegate', 'SKPhysicsContactDelegate', 'HMAccessoryDelegate', 'UIPageViewControllerDataSource', 'SCNSceneRendererDelegate', 'SCNPhysicsContactDelegate', 'MKMapViewDelegate', 'AVPlayerItemOutputPushDelegate', 'UICollectionViewDelegate', 'UIImagePickerControllerDelegate', 'MTLRenderCommandEncoder', 'PKPaymentAuthorizationViewControllerDelegate', 'UIToolbarDelegate', 'WKUIDelegate', 'SCNActionable', 'NSURLConnectionDataDelegate', 'MKOverlay', 'CBCentralManagerDelegate', 'JSExport', 'NSTextLayoutOrientationProvider', 'UIPickerViewDataSource', 'PKPushRegistryDelegate', 'UIViewControllerTransitionCoordinatorContext', 'NSLayoutManagerDelegate', 'MTLLibrary', 'NSFetchedResultsControllerDelegate', 'ABPeoplePickerNavigationControllerDelegate', 'MTLResource', 'NSDiscardableContent', 'UITextFieldDelegate', 'MTLBuffer', 'MTLSamplerState', 'GKGameCenterControllerDelegate', 'MPMediaPickerControllerDelegate', 'UISplitViewControllerDelegate', 'UIAppearance', 'UIPickerViewAccessibilityDelegate', 'UITraitEnvironment', 'UIScrollViewAccessibilityDelegate', 'ADBannerViewDelegate', 'MPPlayableContentDataSource', 'MTLComputePipelineState', 'NSURLSessionDelegate', 'MTLCommandBuffer', 'NSXMLParserDelegate', 'UIViewControllerRestoration', 'UISearchBarDelegate', 'UIBarPositioning', 'CBPeripheralDelegate', 'UISearchDisplayDelegate', 'CAAction', 'PKAddPassesViewControllerDelegate', 'MCNearbyServiceAdvertiserDelegate', 'MTLDepthStencilState', 'GKTurnBasedMatchmakerViewControllerDelegate', 'MPPlayableContentDelegate', 'AVCaptureVideoDataOutputSampleBufferDelegate', 'UIAppearanceContainer', 'UIStateRestoring', 'UITextDocumentProxy', 'MTLDrawable', 'NSURLSessionTaskDelegate', 'NSFilePresenter', 'AVAudioStereoMixing', 'UIViewControllerContextTransitioning', 'UITextInput', 'CBPeripheralManagerDelegate', 'UITextInputDelegate', 'NSFastEnumeration', 'NSURLAuthenticationChallengeSender', 'SCNProgramDelegate', 'AVVideoCompositing', 'SCNAnimatable', 'NSSecureCoding', 'MCAdvertiserAssistantDelegate', 'GKLocalPlayerListener', 'GLKNamedEffect', 'UIPopoverControllerDelegate', 'AVCaptureMetadataOutputObjectsDelegate', 'NSExtensionRequestHandling', 'UITextSelecting', 'UIPrinterPickerControllerDelegate', 'NCWidgetProviding', 'MTLCommandEncoder', 'NSURLProtocolClient', 'MFMessageComposeViewControllerDelegate', 'UIVideoEditorControllerDelegate', 'WKNavigationDelegate', 'GKSavedGameListener', 'UITableViewDataSource', 'MTLFunction', 'EKCalendarChooserDelegate', 'NSUserActivityDelegate', 'UICollisionBehaviorDelegate', 'NSStreamDelegate', 'MCNearbyServiceBrowserDelegate', 'HMHomeDelegate', 'UINavigationControllerDelegate', 'MCSessionDelegate', 'UIDocumentPickerDelegate', 'UIViewControllerInteractiveTransitioning', 'GKTurnBasedEventListener', 'SCNSceneRenderer', 'MTLTexture', 'GLKViewDelegate', 'EAAccessoryDelegate', 'WKScriptMessageHandler', 'PHPhotoLibraryChangeObserver', 'NSKeyedUnarchiverDelegate', 'AVPlayerItemMetadataOutputPushDelegate', 'NSMachPortDelegate', 'SCNShadable', 'UIPopoverBackgroundViewMethods', 'UIDocumentMenuDelegate', 'UIBarPositioningDelegate', 'ABPersonViewControllerDelegate', 'NSNetServiceBrowserDelegate', 'EKEventViewDelegate', 'UIScrollViewDelegate', 'NSURLConnectionDownloadDelegate', 'UIGestureRecognizerDelegate', 'UINavigationBarDelegate', 'AVAudioMixing', 'NSFetchedResultsSectionInfo', 'UIDocumentInteractionControllerDelegate', 'MTLParallelRenderCommandEncoder', 'QLPreviewControllerDelegate', 'UIAccessibilityReadingContent', 'ABUnknownPersonViewControllerDelegate', 'GLKViewControllerDelegate', 'UICollectionViewDelegateFlowLayout', 'UIPopoverPresentationControllerDelegate', 'UIDynamicAnimatorDelegate', 'NSTextAttachmentContainer', 'MKAnnotation', 'UIAccessibilityIdentification', 'UICoordinateSpace', 'ABNewPersonViewControllerDelegate', 'MTLDevice', 'CAMediaTiming', 'AVCaptureFileOutputRecordingDelegate', 'HMHomeManagerDelegate', 'UITextViewDelegate', 'UITabBarDelegate', 'GKLeaderboardViewControllerDelegate', 'UISearchControllerDelegate', 'EAWiFiUnconfiguredAccessoryBrowserDelegate', 'UITextInputTraits', 'MTLRenderPipelineState', 'GKVoiceChatClient', 'UIKeyInput', 'UICollectionViewDataSource', 'SCNTechniqueSupport', 'NSLocking', 'AVCaptureFileOutputDelegate', 'GKChallengeEventHandlerDelegate', 'UIObjectRestoration', 'CIFilterConstructor', 'AVPlayerItemOutputPullDelegate', 'EAGLDrawable', 'AVVideoCompositionValidationHandling', 'UIViewControllerAnimatedTransitioning', 'NSURLSessionDownloadDelegate', 'UIAccelerometerDelegate', 'UIPageViewControllerDelegate', 'MTLCommandQueue', 'UIDataSourceModelAssociation', 'AVAudioRecorderDelegate', 'GKSessionDelegate', 'NSKeyedArchiverDelegate', 'CAMetalDrawable', 'UIDynamicItem', 'CLLocationManagerDelegate', 'NSMetadataQueryDelegate', 'NSNetServiceDelegate', 'GKMatchmakerViewControllerDelegate', 'NSURLSessionDataDelegate'])
|
| 19 |
+
COCOA_PRIMITIVES = set(['ROTAHeader', '__CFBundle', 'MortSubtable', 'AudioFilePacketTableInfo', 'CGPDFOperatorTable', 'KerxStateEntry', 'ExtendedTempoEvent', 'CTParagraphStyleSetting', 'OpaqueMIDIPort', '_GLKMatrix3', '_GLKMatrix2', '_GLKMatrix4', 'ExtendedControlEvent', 'CAFAudioDescription', 'OpaqueCMBlockBuffer', 'CGTextDrawingMode', 'EKErrorCode', 'gss_buffer_desc_struct', 'AudioUnitParameterInfo', '__SCPreferences', '__CTFrame', '__CTLine', 'AudioFile_SMPTE_Time', 'gss_krb5_lucid_context_v1', 'OpaqueJSValue', 'TrakTableEntry', 'AudioFramePacketTranslation', 'CGImageSource', 'OpaqueJSPropertyNameAccumulator', 'JustPCGlyphRepeatAddAction', '__CFBinaryHeap', 'OpaqueMIDIThruConnection', 'opaqueCMBufferQueue', 'OpaqueMusicSequence', 'MortRearrangementSubtable', 'MixerDistanceParams', 'MorxSubtable', 'MIDIObjectPropertyChangeNotification', 'SFNTLookupSegment', 'CGImageMetadataErrors', 'CGPath', 'OpaqueMIDIEndpoint', 'AudioComponentPlugInInterface', 'gss_ctx_id_t_desc_struct', 'sfntFontFeatureSetting', 'OpaqueJSContextGroup', '__SCNetworkConnection', 'AudioUnitParameterValueTranslation', 'CGImageMetadataType', 'CGPattern', 'AudioFileTypeAndFormatID', 'CGContext', 'AUNodeInteraction', 'SFNTLookupTable', 'JustPCDecompositionAction', 'KerxControlPointHeader', 'AudioStreamPacketDescription', 'KernSubtableHeader', '__SecCertificate', 'AUMIDIOutputCallbackStruct', 'MIDIMetaEvent', 'AudioQueueChannelAssignment', 'AnchorPoint', 'JustTable', '__CFNetService', 'CF_BRIDGED_TYPE', 'gss_krb5_lucid_key', 'CGPDFDictionary', 'KerxSubtableHeader', 'CAF_UUID_ChunkHeader', 'gss_krb5_cfx_keydata', 'OpaqueJSClass', 'CGGradient', 'OpaqueMIDISetup', 'JustPostcompTable', '__CTParagraphStyle', 'AudioUnitParameterHistoryInfo', 'OpaqueJSContext', 'CGShading', 'MIDIThruConnectionParams', 'BslnFormat0Part', 'SFNTLookupSingle', '__CFHost', '__SecRandom', '__CTFontDescriptor', '_NSRange', 'sfntDirectory', 'AudioQueueLevelMeterState', 'CAFPositionPeak', 'PropLookupSegment', '__CVOpenGLESTextureCache', 'sfntInstance', '_GLKQuaternion', 'AnkrTable', '__SCNetworkProtocol', 'CAFFileHeader', 'KerxOrderedListHeader', 'CGBlendMode', 'STXEntryOne', 'CAFRegion', 'SFNTLookupTrimmedArrayHeader', 'SCNMatrix4', 'KerxControlPointEntry', 'OpaqueMusicTrack', '_GLKVector4', 'gss_OID_set_desc_struct', 'OpaqueMusicPlayer', '_CFHTTPAuthentication', 'CGAffineTransform', 'CAFMarkerChunk', 'AUHostIdentifier', 'ROTAGlyphEntry', 'BslnTable', 'gss_krb5_lucid_context_version', '_GLKMatrixStack', 'CGImage', 'KernStateEntry', 'SFNTLookupSingleHeader', 'MortLigatureSubtable', 'CAFUMIDChunk', 'SMPTETime', 'CAFDataChunk', 'CGPDFStream', 'AudioFileRegionList', 'STEntryTwo', 'SFNTLookupBinarySearchHeader', 'OpbdTable', '__CTGlyphInfo', 'BslnFormat2Part', 'KerxIndexArrayHeader', 'TrakTable', 'KerxKerningPair', '__CFBitVector', 'KernVersion0SubtableHeader', 'OpaqueAudioComponentInstance', 'AudioChannelLayout', '__CFUUID', 'MIDISysexSendRequest', '__CFNumberFormatter', 'CGImageSourceStatus', 'AudioFileMarkerList', 'AUSamplerBankPresetData', 'CGDataProvider', 'AudioFormatInfo', '__SecIdentity', 'sfntCMapExtendedSubHeader', 'MIDIChannelMessage', 'KernOffsetTable', 'CGColorSpaceModel', 'MFMailComposeErrorCode', 'CGFunction', '__SecTrust', 'AVAudio3DAngularOrientation', 'CGFontPostScriptFormat', 'KernStateHeader', 'AudioUnitCocoaViewInfo', 'CGDataConsumer', 'OpaqueMIDIDevice', 'KernVersion0Header', 'AnchorPointTable', 'CGImageDestination', 'CAFInstrumentChunk', 'AudioUnitMeterClipping', 'MorxChain', '__CTFontCollection', 'STEntryOne', 'STXEntryTwo', 'ExtendedNoteOnEvent', 'CGColorRenderingIntent', 'KerxSimpleArrayHeader', 'MorxTable', '_GLKVector3', '_GLKVector2', 'MortTable', 'CGPDFBox', 'AudioUnitParameterValueFromString', '__CFSocket', 'ALCdevice_struct', 'MIDINoteMessage', 'sfntFeatureHeader', 'CGRect', '__SCNetworkInterface', '__CFTree', 'MusicEventUserData', 'TrakTableData', 'GCQuaternion', 'MortContextualSubtable', '__CTRun', 'AudioUnitFrequencyResponseBin', 'MortChain', 'MorxInsertionSubtable', 'CGImageMetadata', 'gss_auth_identity', 'AudioUnitMIDIControlMapping', 'CAFChunkHeader', 'CGImagePropertyOrientation', 'CGPDFScanner', 'OpaqueMusicEventIterator', 'sfntDescriptorHeader', 'AudioUnitNodeConnection', 'OpaqueMIDIDeviceList', 'ExtendedAudioFormatInfo', 'BslnFormat1Part', 'sfntFontDescriptor', 'KernSimpleArrayHeader', '__CFRunLoopObserver', 'CGPatternTiling', 'MIDINotification', 'MorxLigatureSubtable', 'MessageComposeResult', 'MIDIThruConnectionEndpoint', 'MusicDeviceStdNoteParams', 'opaqueCMSimpleQueue', 'ALCcontext_struct', 'OpaqueAudioQueue', 'PropLookupSingle', 'CGInterpolationQuality', 'CGColor', 'AudioOutputUnitStartAtTimeParams', 'gss_name_t_desc_struct', 'CGFunctionCallbacks', 'CAFPacketTableHeader', 'AudioChannelDescription', 'sfntFeatureName', 'MorxContextualSubtable', 'CVSMPTETime', 'AudioValueRange', 'CGTextEncoding', 'AudioStreamBasicDescription', 'AUNodeRenderCallback', 'AudioPanningInfo', 'KerxOrderedListEntry', '__CFAllocator', 'OpaqueJSPropertyNameArray', '__SCDynamicStore', 'OpaqueMIDIEntity', '__CTRubyAnnotation', 'SCNVector4', 'CFHostClientContext', 'CFNetServiceClientContext', 'AudioUnitPresetMAS_SettingData', 'opaqueCMBufferQueueTriggerToken', 'AudioUnitProperty', 'CAFRegionChunk', 'CGPDFString', '__GLsync', '__CFStringTokenizer', 'JustWidthDeltaEntry', 'sfntVariationAxis', '__CFNetDiagnostic', 'CAFOverviewSample', 'sfntCMapEncoding', 'CGVector', '__SCNetworkService', 'opaqueCMSampleBuffer', 'AUHostVersionIdentifier', 'AudioBalanceFade', 'sfntFontRunFeature', 'KerxCoordinateAction', 'sfntCMapSubHeader', 'CVPlanarPixelBufferInfo', 'AUNumVersion', 'AUSamplerInstrumentData', 'AUPreset', '__CTRunDelegate', 'OpaqueAudioQueueProcessingTap', 'KerxTableHeader', '_NSZone', 'OpaqueExtAudioFile', '__CFRunLoopSource', '__CVMetalTextureCache', 'KerxAnchorPointAction', 'OpaqueJSString', 'AudioQueueParameterEvent', '__CFHTTPMessage', 'OpaqueCMClock', 'ScheduledAudioFileRegion', 'STEntryZero', 'AVAudio3DPoint', 'gss_channel_bindings_struct', 'sfntVariationHeader', 'AUChannelInfo', 'UIOffset', 'GLKEffectPropertyPrv', 'KerxStateHeader', 'CGLineJoin', 'CGPDFDocument', '__CFBag', 'KernOrderedListHeader', '__SCNetworkSet', '__SecKey', 'MIDIObjectAddRemoveNotification', 'AudioUnitParameter', 'JustPCActionSubrecord', 'AudioComponentDescription', 'AudioUnitParameterValueName', 'AudioUnitParameterEvent', 'KerxControlPointAction', 'AudioTimeStamp', 'KernKerningPair', 'gss_buffer_set_desc_struct', 'MortFeatureEntry', 'FontVariation', 'CAFStringID', 'LcarCaretClassEntry', 'AudioUnitParameterStringFromValue', 'ACErrorCode', 'ALMXGlyphEntry', 'LtagTable', '__CTTypesetter', 'AuthorizationOpaqueRef', 'UIEdgeInsets', 'CGPathElement', 'CAFMarker', 'KernTableHeader', 'NoteParamsControlValue', 'SSLContext', 'gss_cred_id_t_desc_struct', 'AudioUnitParameterNameInfo', 'CGDataConsumerCallbacks', 'ALMXHeader', 'CGLineCap', 'MIDIControlTransform', 'CGPDFArray', '__SecPolicy', 'AudioConverterPrimeInfo', '__CTTextTab', '__CFNetServiceMonitor', 'AUInputSamplesInOutputCallbackStruct', '__CTFramesetter', 'CGPDFDataFormat', 'STHeader', 'CVPlanarPixelBufferInfo_YCbCrPlanar', 'MIDIValueMap', 'JustDirectionTable', '__SCBondStatus', 'SFNTLookupSegmentHeader', 'OpaqueCMMemoryPool', 'CGPathDrawingMode', 'CGFont', '__SCNetworkReachability', 'AudioClassDescription', 'CGPoint', 'AVAudio3DVectorOrientation', 'CAFStrings', '__CFNetServiceBrowser', 'opaqueMTAudioProcessingTap', 'sfntNameRecord', 'CGPDFPage', 'CGLayer', 'ComponentInstanceRecord', 'CAFInfoStrings', 'HostCallbackInfo', 'MusicDeviceNoteParams', 'OpaqueVTCompressionSession', 'KernIndexArrayHeader', 'CVPlanarPixelBufferInfo_YCbCrBiPlanar', 'MusicTrackLoopInfo', 'opaqueCMFormatDescription', 'STClassTable', 'sfntDirectoryEntry', 'OpaqueCMTimebase', 'CGDataProviderDirectCallbacks', 'MIDIPacketList', 'CAFOverviewChunk', 'MIDIPacket', 'ScheduledAudioSlice', 'CGDataProviderSequentialCallbacks', 'AudioBuffer', 'MorxRearrangementSubtable', 'CGPatternCallbacks', 'AUDistanceAttenuationData', 'MIDIIOErrorNotification', 'CGPDFContentStream', 'IUnknownVTbl', 'MIDITransform', 'MortInsertionSubtable', 'CABarBeatTime', 'AudioBufferList', '__CVBuffer', 'AURenderCallbackStruct', 'STXEntryZero', 'JustPCDuctilityAction', 'OpaqueAudioQueueTimeline', 'VTDecompressionOutputCallbackRecord', 'OpaqueMIDIClient', '__CFPlugInInstance', 'AudioQueueBuffer', '__CFFileDescriptor', 'AudioUnitConnection', '_GKTurnBasedExchangeStatus', 'LcarCaretTable', 'CVPlanarComponentInfo', 'JustWidthDeltaGroup', 'OpaqueAudioComponent', 'ParameterEvent', '__CVPixelBufferPool', '__CTFont', 'CGColorSpace', 'CGSize', 'AUDependentParameter', 'MIDIDriverInterface', 'gss_krb5_rfc1964_keydata', '__CFDateFormatter', 'LtagStringRange', 'OpaqueVTDecompressionSession', 'gss_iov_buffer_desc_struct', 'AUPresetEvent', 'PropTable', 'KernOrderedListEntry', 'CF_BRIDGED_MUTABLE_TYPE', 'gss_OID_desc_struct', 'AudioUnitPresetMAS_Settings', 'AudioFileMarker', 'JustPCConditionalAddAction', 'BslnFormat3Part', '__CFNotificationCenter', 'MortSwashSubtable', 'AUParameterMIDIMapping', 'SCNVector3', 'OpaqueAudioConverter', 'MIDIRawData', 'sfntNameHeader', '__CFRunLoop', 'MFMailComposeResult', 'CATransform3D', 'OpbdSideValues', 'CAF_SMPTE_Time', '__SecAccessControl', 'JustPCAction', 'OpaqueVTFrameSilo', 'OpaqueVTMultiPassStorage', 'CGPathElementType', 'AudioFormatListItem', 'AudioUnitExternalBuffer', 'AudioFileRegion', 'AudioValueTranslation', 'CGImageMetadataTag', 'CAFPeakChunk', 'AudioBytePacketTranslation', 'sfntCMapHeader', '__CFURLEnumerator', 'STXHeader', 'CGPDFObjectType', 'SFNTLookupArrayHeader'])
|
| 20 |
+
|
| 21 |
+
if __name__ == '__main__': # pragma: no cover
|
| 22 |
+
import os
|
| 23 |
+
import re
|
| 24 |
+
|
| 25 |
+
FRAMEWORKS_PATH = '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/'
|
| 26 |
+
frameworks = os.listdir(FRAMEWORKS_PATH)
|
| 27 |
+
|
| 28 |
+
all_interfaces = set()
|
| 29 |
+
all_protocols = set()
|
| 30 |
+
all_primitives = set()
|
| 31 |
+
for framework in frameworks:
|
| 32 |
+
frameworkHeadersDir = FRAMEWORKS_PATH + framework + '/Headers/'
|
| 33 |
+
if not os.path.exists(frameworkHeadersDir):
|
| 34 |
+
continue
|
| 35 |
+
|
| 36 |
+
headerFilenames = os.listdir(frameworkHeadersDir)
|
| 37 |
+
|
| 38 |
+
for f in headerFilenames:
|
| 39 |
+
if not f.endswith('.h'):
|
| 40 |
+
continue
|
| 41 |
+
|
| 42 |
+
headerFilePath = frameworkHeadersDir + f
|
| 43 |
+
content = open(headerFilePath).read()
|
| 44 |
+
res = re.findall('(?<=@interface )\w+', content)
|
| 45 |
+
for r in res:
|
| 46 |
+
all_interfaces.add(r)
|
| 47 |
+
|
| 48 |
+
res = re.findall('(?<=@protocol )\w+', content)
|
| 49 |
+
for r in res:
|
| 50 |
+
all_protocols.add(r)
|
| 51 |
+
|
| 52 |
+
res = re.findall('(?<=typedef enum )\w+', content)
|
| 53 |
+
for r in res:
|
| 54 |
+
all_primitives.add(r)
|
| 55 |
+
|
| 56 |
+
res = re.findall('(?<=typedef struct )\w+', content)
|
| 57 |
+
for r in res:
|
| 58 |
+
all_primitives.add(r)
|
| 59 |
+
|
| 60 |
+
res = re.findall('(?<=typedef const struct )\w+', content)
|
| 61 |
+
for r in res:
|
| 62 |
+
all_primitives.add(r)
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
print("ALL interfaces: \n")
|
| 66 |
+
print(all_interfaces)
|
| 67 |
+
|
| 68 |
+
print("\nALL protocols: \n")
|
| 69 |
+
print(all_protocols)
|
| 70 |
+
|
| 71 |
+
print("\nALL primitives: \n")
|
| 72 |
+
print(all_primitives)
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/_openedge_builtins.py
ADDED
|
@@ -0,0 +1,2547 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers._openedge_builtins
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Builtin list for the OpenEdgeLexer.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
OPENEDGEKEYWORDS = (
|
| 13 |
+
'ABSOLUTE',
|
| 14 |
+
'ABS',
|
| 15 |
+
'ABSO',
|
| 16 |
+
'ABSOL',
|
| 17 |
+
'ABSOLU',
|
| 18 |
+
'ABSOLUT',
|
| 19 |
+
'ACCELERATOR',
|
| 20 |
+
'ACCUMULATE',
|
| 21 |
+
'ACCUM',
|
| 22 |
+
'ACCUMU',
|
| 23 |
+
'ACCUMUL',
|
| 24 |
+
'ACCUMULA',
|
| 25 |
+
'ACCUMULAT',
|
| 26 |
+
'ACTIVE-FORM',
|
| 27 |
+
'ACTIVE-WINDOW',
|
| 28 |
+
'ADD',
|
| 29 |
+
'ADD-BUFFER',
|
| 30 |
+
'ADD-CALC-COLUMN',
|
| 31 |
+
'ADD-COLUMNS-FROM',
|
| 32 |
+
'ADD-EVENTS-PROCEDURE',
|
| 33 |
+
'ADD-FIELDS-FROM',
|
| 34 |
+
'ADD-FIRST',
|
| 35 |
+
'ADD-INDEX-FIELD',
|
| 36 |
+
'ADD-LAST',
|
| 37 |
+
'ADD-LIKE-COLUMN',
|
| 38 |
+
'ADD-LIKE-FIELD',
|
| 39 |
+
'ADD-LIKE-INDEX',
|
| 40 |
+
'ADD-NEW-FIELD',
|
| 41 |
+
'ADD-NEW-INDEX',
|
| 42 |
+
'ADD-SCHEMA-LOCATION',
|
| 43 |
+
'ADD-SUPER-PROCEDURE',
|
| 44 |
+
'ADM-DATA',
|
| 45 |
+
'ADVISE',
|
| 46 |
+
'ALERT-BOX',
|
| 47 |
+
'ALIAS',
|
| 48 |
+
'ALL',
|
| 49 |
+
'ALLOW-COLUMN-SEARCHING',
|
| 50 |
+
'ALLOW-REPLICATION',
|
| 51 |
+
'ALTER',
|
| 52 |
+
'ALWAYS-ON-TOP',
|
| 53 |
+
'AMBIGUOUS',
|
| 54 |
+
'AMBIG',
|
| 55 |
+
'AMBIGU',
|
| 56 |
+
'AMBIGUO',
|
| 57 |
+
'AMBIGUOU',
|
| 58 |
+
'ANALYZE',
|
| 59 |
+
'ANALYZ',
|
| 60 |
+
'AND',
|
| 61 |
+
'ANSI-ONLY',
|
| 62 |
+
'ANY',
|
| 63 |
+
'ANYWHERE',
|
| 64 |
+
'APPEND',
|
| 65 |
+
'APPL-ALERT-BOXES',
|
| 66 |
+
'APPL-ALERT',
|
| 67 |
+
'APPL-ALERT-',
|
| 68 |
+
'APPL-ALERT-B',
|
| 69 |
+
'APPL-ALERT-BO',
|
| 70 |
+
'APPL-ALERT-BOX',
|
| 71 |
+
'APPL-ALERT-BOXE',
|
| 72 |
+
'APPL-CONTEXT-ID',
|
| 73 |
+
'APPLICATION',
|
| 74 |
+
'APPLY',
|
| 75 |
+
'APPSERVER-INFO',
|
| 76 |
+
'APPSERVER-PASSWORD',
|
| 77 |
+
'APPSERVER-USERID',
|
| 78 |
+
'ARRAY-MESSAGE',
|
| 79 |
+
'AS',
|
| 80 |
+
'ASC',
|
| 81 |
+
'ASCENDING',
|
| 82 |
+
'ASCE',
|
| 83 |
+
'ASCEN',
|
| 84 |
+
'ASCEND',
|
| 85 |
+
'ASCENDI',
|
| 86 |
+
'ASCENDIN',
|
| 87 |
+
'ASK-OVERWRITE',
|
| 88 |
+
'ASSEMBLY',
|
| 89 |
+
'ASSIGN',
|
| 90 |
+
'ASYNCHRONOUS',
|
| 91 |
+
'ASYNC-REQUEST-COUNT',
|
| 92 |
+
'ASYNC-REQUEST-HANDLE',
|
| 93 |
+
'AT',
|
| 94 |
+
'ATTACHED-PAIRLIST',
|
| 95 |
+
'ATTR-SPACE',
|
| 96 |
+
'ATTR',
|
| 97 |
+
'ATTRI',
|
| 98 |
+
'ATTRIB',
|
| 99 |
+
'ATTRIBU',
|
| 100 |
+
'ATTRIBUT',
|
| 101 |
+
'AUDIT-CONTROL',
|
| 102 |
+
'AUDIT-ENABLED',
|
| 103 |
+
'AUDIT-EVENT-CONTEXT',
|
| 104 |
+
'AUDIT-POLICY',
|
| 105 |
+
'AUTHENTICATION-FAILED',
|
| 106 |
+
'AUTHORIZATION',
|
| 107 |
+
'AUTO-COMPLETION',
|
| 108 |
+
'AUTO-COMP',
|
| 109 |
+
'AUTO-COMPL',
|
| 110 |
+
'AUTO-COMPLE',
|
| 111 |
+
'AUTO-COMPLET',
|
| 112 |
+
'AUTO-COMPLETI',
|
| 113 |
+
'AUTO-COMPLETIO',
|
| 114 |
+
'AUTO-ENDKEY',
|
| 115 |
+
'AUTO-END-KEY',
|
| 116 |
+
'AUTO-GO',
|
| 117 |
+
'AUTO-INDENT',
|
| 118 |
+
'AUTO-IND',
|
| 119 |
+
'AUTO-INDE',
|
| 120 |
+
'AUTO-INDEN',
|
| 121 |
+
'AUTOMATIC',
|
| 122 |
+
'AUTO-RESIZE',
|
| 123 |
+
'AUTO-RETURN',
|
| 124 |
+
'AUTO-RET',
|
| 125 |
+
'AUTO-RETU',
|
| 126 |
+
'AUTO-RETUR',
|
| 127 |
+
'AUTO-SYNCHRONIZE',
|
| 128 |
+
'AUTO-ZAP',
|
| 129 |
+
'AUTO-Z',
|
| 130 |
+
'AUTO-ZA',
|
| 131 |
+
'AVAILABLE',
|
| 132 |
+
'AVAIL',
|
| 133 |
+
'AVAILA',
|
| 134 |
+
'AVAILAB',
|
| 135 |
+
'AVAILABL',
|
| 136 |
+
'AVAILABLE-FORMATS',
|
| 137 |
+
'AVERAGE',
|
| 138 |
+
'AVE',
|
| 139 |
+
'AVER',
|
| 140 |
+
'AVERA',
|
| 141 |
+
'AVERAG',
|
| 142 |
+
'AVG',
|
| 143 |
+
'BACKGROUND',
|
| 144 |
+
'BACK',
|
| 145 |
+
'BACKG',
|
| 146 |
+
'BACKGR',
|
| 147 |
+
'BACKGRO',
|
| 148 |
+
'BACKGROU',
|
| 149 |
+
'BACKGROUN',
|
| 150 |
+
'BACKWARDS',
|
| 151 |
+
'BACKWARD',
|
| 152 |
+
'BASE64-DECODE',
|
| 153 |
+
'BASE64-ENCODE',
|
| 154 |
+
'BASE-ADE',
|
| 155 |
+
'BASE-KEY',
|
| 156 |
+
'BATCH-MODE',
|
| 157 |
+
'BATCH',
|
| 158 |
+
'BATCH-',
|
| 159 |
+
'BATCH-M',
|
| 160 |
+
'BATCH-MO',
|
| 161 |
+
'BATCH-MOD',
|
| 162 |
+
'BATCH-SIZE',
|
| 163 |
+
'BEFORE-HIDE',
|
| 164 |
+
'BEFORE-H',
|
| 165 |
+
'BEFORE-HI',
|
| 166 |
+
'BEFORE-HID',
|
| 167 |
+
'BEGIN-EVENT-GROUP',
|
| 168 |
+
'BEGINS',
|
| 169 |
+
'BELL',
|
| 170 |
+
'BETWEEN',
|
| 171 |
+
'BGCOLOR',
|
| 172 |
+
'BGC',
|
| 173 |
+
'BGCO',
|
| 174 |
+
'BGCOL',
|
| 175 |
+
'BGCOLO',
|
| 176 |
+
'BIG-ENDIAN',
|
| 177 |
+
'BINARY',
|
| 178 |
+
'BIND',
|
| 179 |
+
'BIND-WHERE',
|
| 180 |
+
'BLANK',
|
| 181 |
+
'BLOCK-ITERATION-DISPLAY',
|
| 182 |
+
'BORDER-BOTTOM-CHARS',
|
| 183 |
+
'BORDER-B',
|
| 184 |
+
'BORDER-BO',
|
| 185 |
+
'BORDER-BOT',
|
| 186 |
+
'BORDER-BOTT',
|
| 187 |
+
'BORDER-BOTTO',
|
| 188 |
+
'BORDER-BOTTOM-PIXELS',
|
| 189 |
+
'BORDER-BOTTOM-P',
|
| 190 |
+
'BORDER-BOTTOM-PI',
|
| 191 |
+
'BORDER-BOTTOM-PIX',
|
| 192 |
+
'BORDER-BOTTOM-PIXE',
|
| 193 |
+
'BORDER-BOTTOM-PIXEL',
|
| 194 |
+
'BORDER-LEFT-CHARS',
|
| 195 |
+
'BORDER-L',
|
| 196 |
+
'BORDER-LE',
|
| 197 |
+
'BORDER-LEF',
|
| 198 |
+
'BORDER-LEFT',
|
| 199 |
+
'BORDER-LEFT-',
|
| 200 |
+
'BORDER-LEFT-C',
|
| 201 |
+
'BORDER-LEFT-CH',
|
| 202 |
+
'BORDER-LEFT-CHA',
|
| 203 |
+
'BORDER-LEFT-CHAR',
|
| 204 |
+
'BORDER-LEFT-PIXELS',
|
| 205 |
+
'BORDER-LEFT-P',
|
| 206 |
+
'BORDER-LEFT-PI',
|
| 207 |
+
'BORDER-LEFT-PIX',
|
| 208 |
+
'BORDER-LEFT-PIXE',
|
| 209 |
+
'BORDER-LEFT-PIXEL',
|
| 210 |
+
'BORDER-RIGHT-CHARS',
|
| 211 |
+
'BORDER-R',
|
| 212 |
+
'BORDER-RI',
|
| 213 |
+
'BORDER-RIG',
|
| 214 |
+
'BORDER-RIGH',
|
| 215 |
+
'BORDER-RIGHT',
|
| 216 |
+
'BORDER-RIGHT-',
|
| 217 |
+
'BORDER-RIGHT-C',
|
| 218 |
+
'BORDER-RIGHT-CH',
|
| 219 |
+
'BORDER-RIGHT-CHA',
|
| 220 |
+
'BORDER-RIGHT-CHAR',
|
| 221 |
+
'BORDER-RIGHT-PIXELS',
|
| 222 |
+
'BORDER-RIGHT-P',
|
| 223 |
+
'BORDER-RIGHT-PI',
|
| 224 |
+
'BORDER-RIGHT-PIX',
|
| 225 |
+
'BORDER-RIGHT-PIXE',
|
| 226 |
+
'BORDER-RIGHT-PIXEL',
|
| 227 |
+
'BORDER-TOP-CHARS',
|
| 228 |
+
'BORDER-T',
|
| 229 |
+
'BORDER-TO',
|
| 230 |
+
'BORDER-TOP',
|
| 231 |
+
'BORDER-TOP-',
|
| 232 |
+
'BORDER-TOP-C',
|
| 233 |
+
'BORDER-TOP-CH',
|
| 234 |
+
'BORDER-TOP-CHA',
|
| 235 |
+
'BORDER-TOP-CHAR',
|
| 236 |
+
'BORDER-TOP-PIXELS',
|
| 237 |
+
'BORDER-TOP-P',
|
| 238 |
+
'BORDER-TOP-PI',
|
| 239 |
+
'BORDER-TOP-PIX',
|
| 240 |
+
'BORDER-TOP-PIXE',
|
| 241 |
+
'BORDER-TOP-PIXEL',
|
| 242 |
+
'BOX',
|
| 243 |
+
'BOX-SELECTABLE',
|
| 244 |
+
'BOX-SELECT',
|
| 245 |
+
'BOX-SELECTA',
|
| 246 |
+
'BOX-SELECTAB',
|
| 247 |
+
'BOX-SELECTABL',
|
| 248 |
+
'BREAK',
|
| 249 |
+
'BROWSE',
|
| 250 |
+
'BUFFER',
|
| 251 |
+
'BUFFER-CHARS',
|
| 252 |
+
'BUFFER-COMPARE',
|
| 253 |
+
'BUFFER-COPY',
|
| 254 |
+
'BUFFER-CREATE',
|
| 255 |
+
'BUFFER-DELETE',
|
| 256 |
+
'BUFFER-FIELD',
|
| 257 |
+
'BUFFER-HANDLE',
|
| 258 |
+
'BUFFER-LINES',
|
| 259 |
+
'BUFFER-NAME',
|
| 260 |
+
'BUFFER-RELEASE',
|
| 261 |
+
'BUFFER-VALUE',
|
| 262 |
+
'BUTTON',
|
| 263 |
+
'BUTTONS',
|
| 264 |
+
'BY',
|
| 265 |
+
'BY-POINTER',
|
| 266 |
+
'BY-VARIANT-POINTER',
|
| 267 |
+
'CACHE',
|
| 268 |
+
'CACHE-SIZE',
|
| 269 |
+
'CALL',
|
| 270 |
+
'CALL-NAME',
|
| 271 |
+
'CALL-TYPE',
|
| 272 |
+
'CANCEL-BREAK',
|
| 273 |
+
'CANCEL-BUTTON',
|
| 274 |
+
'CAN-CREATE',
|
| 275 |
+
'CAN-DELETE',
|
| 276 |
+
'CAN-DO',
|
| 277 |
+
'CAN-FIND',
|
| 278 |
+
'CAN-QUERY',
|
| 279 |
+
'CAN-READ',
|
| 280 |
+
'CAN-SET',
|
| 281 |
+
'CAN-WRITE',
|
| 282 |
+
'CAPS',
|
| 283 |
+
'CAREFUL-PAINT',
|
| 284 |
+
'CASE',
|
| 285 |
+
'CASE-SENSITIVE',
|
| 286 |
+
'CASE-SEN',
|
| 287 |
+
'CASE-SENS',
|
| 288 |
+
'CASE-SENSI',
|
| 289 |
+
'CASE-SENSIT',
|
| 290 |
+
'CASE-SENSITI',
|
| 291 |
+
'CASE-SENSITIV',
|
| 292 |
+
'CAST',
|
| 293 |
+
'CATCH',
|
| 294 |
+
'CDECL',
|
| 295 |
+
'CENTERED',
|
| 296 |
+
'CENTER',
|
| 297 |
+
'CENTERE',
|
| 298 |
+
'CHAINED',
|
| 299 |
+
'CHARACTER_LENGTH',
|
| 300 |
+
'CHARSET',
|
| 301 |
+
'CHECK',
|
| 302 |
+
'CHECKED',
|
| 303 |
+
'CHOOSE',
|
| 304 |
+
'CHR',
|
| 305 |
+
'CLASS',
|
| 306 |
+
'CLASS-TYPE',
|
| 307 |
+
'CLEAR',
|
| 308 |
+
'CLEAR-APPL-CONTEXT',
|
| 309 |
+
'CLEAR-LOG',
|
| 310 |
+
'CLEAR-SELECTION',
|
| 311 |
+
'CLEAR-SELECT',
|
| 312 |
+
'CLEAR-SELECTI',
|
| 313 |
+
'CLEAR-SELECTIO',
|
| 314 |
+
'CLEAR-SORT-ARROWS',
|
| 315 |
+
'CLEAR-SORT-ARROW',
|
| 316 |
+
'CLIENT-CONNECTION-ID',
|
| 317 |
+
'CLIENT-PRINCIPAL',
|
| 318 |
+
'CLIENT-TTY',
|
| 319 |
+
'CLIENT-TYPE',
|
| 320 |
+
'CLIENT-WORKSTATION',
|
| 321 |
+
'CLIPBOARD',
|
| 322 |
+
'CLOSE',
|
| 323 |
+
'CLOSE-LOG',
|
| 324 |
+
'CODE',
|
| 325 |
+
'CODEBASE-LOCATOR',
|
| 326 |
+
'CODEPAGE',
|
| 327 |
+
'CODEPAGE-CONVERT',
|
| 328 |
+
'COLLATE',
|
| 329 |
+
'COL-OF',
|
| 330 |
+
'COLON',
|
| 331 |
+
'COLON-ALIGNED',
|
| 332 |
+
'COLON-ALIGN',
|
| 333 |
+
'COLON-ALIGNE',
|
| 334 |
+
'COLOR',
|
| 335 |
+
'COLOR-TABLE',
|
| 336 |
+
'COLUMN',
|
| 337 |
+
'COL',
|
| 338 |
+
'COLU',
|
| 339 |
+
'COLUM',
|
| 340 |
+
'COLUMN-BGCOLOR',
|
| 341 |
+
'COLUMN-DCOLOR',
|
| 342 |
+
'COLUMN-FGCOLOR',
|
| 343 |
+
'COLUMN-FONT',
|
| 344 |
+
'COLUMN-LABEL',
|
| 345 |
+
'COLUMN-LAB',
|
| 346 |
+
'COLUMN-LABE',
|
| 347 |
+
'COLUMN-MOVABLE',
|
| 348 |
+
'COLUMN-OF',
|
| 349 |
+
'COLUMN-PFCOLOR',
|
| 350 |
+
'COLUMN-READ-ONLY',
|
| 351 |
+
'COLUMN-RESIZABLE',
|
| 352 |
+
'COLUMNS',
|
| 353 |
+
'COLUMN-SCROLLING',
|
| 354 |
+
'COMBO-BOX',
|
| 355 |
+
'COMMAND',
|
| 356 |
+
'COMPARES',
|
| 357 |
+
'COMPILE',
|
| 358 |
+
'COMPILER',
|
| 359 |
+
'COMPLETE',
|
| 360 |
+
'COM-SELF',
|
| 361 |
+
'CONFIG-NAME',
|
| 362 |
+
'CONNECT',
|
| 363 |
+
'CONNECTED',
|
| 364 |
+
'CONSTRUCTOR',
|
| 365 |
+
'CONTAINS',
|
| 366 |
+
'CONTENTS',
|
| 367 |
+
'CONTEXT',
|
| 368 |
+
'CONTEXT-HELP',
|
| 369 |
+
'CONTEXT-HELP-FILE',
|
| 370 |
+
'CONTEXT-HELP-ID',
|
| 371 |
+
'CONTEXT-POPUP',
|
| 372 |
+
'CONTROL',
|
| 373 |
+
'CONTROL-BOX',
|
| 374 |
+
'CONTROL-FRAME',
|
| 375 |
+
'CONVERT',
|
| 376 |
+
'CONVERT-3D-COLORS',
|
| 377 |
+
'CONVERT-TO-OFFSET',
|
| 378 |
+
'CONVERT-TO-OFFS',
|
| 379 |
+
'CONVERT-TO-OFFSE',
|
| 380 |
+
'COPY-DATASET',
|
| 381 |
+
'COPY-LOB',
|
| 382 |
+
'COPY-SAX-ATTRIBUTES',
|
| 383 |
+
'COPY-TEMP-TABLE',
|
| 384 |
+
'COUNT',
|
| 385 |
+
'COUNT-OF',
|
| 386 |
+
'CPCASE',
|
| 387 |
+
'CPCOLL',
|
| 388 |
+
'CPINTERNAL',
|
| 389 |
+
'CPLOG',
|
| 390 |
+
'CPPRINT',
|
| 391 |
+
'CPRCODEIN',
|
| 392 |
+
'CPRCODEOUT',
|
| 393 |
+
'CPSTREAM',
|
| 394 |
+
'CPTERM',
|
| 395 |
+
'CRC-VALUE',
|
| 396 |
+
'CREATE',
|
| 397 |
+
'CREATE-LIKE',
|
| 398 |
+
'CREATE-LIKE-SEQUENTIAL',
|
| 399 |
+
'CREATE-NODE-NAMESPACE',
|
| 400 |
+
'CREATE-RESULT-LIST-ENTRY',
|
| 401 |
+
'CREATE-TEST-FILE',
|
| 402 |
+
'CURRENT',
|
| 403 |
+
'CURRENT_DATE',
|
| 404 |
+
'CURRENT-CHANGED',
|
| 405 |
+
'CURRENT-COLUMN',
|
| 406 |
+
'CURRENT-ENVIRONMENT',
|
| 407 |
+
'CURRENT-ENV',
|
| 408 |
+
'CURRENT-ENVI',
|
| 409 |
+
'CURRENT-ENVIR',
|
| 410 |
+
'CURRENT-ENVIRO',
|
| 411 |
+
'CURRENT-ENVIRON',
|
| 412 |
+
'CURRENT-ENVIRONM',
|
| 413 |
+
'CURRENT-ENVIRONME',
|
| 414 |
+
'CURRENT-ENVIRONMEN',
|
| 415 |
+
'CURRENT-ITERATION',
|
| 416 |
+
'CURRENT-LANGUAGE',
|
| 417 |
+
'CURRENT-LANG',
|
| 418 |
+
'CURRENT-LANGU',
|
| 419 |
+
'CURRENT-LANGUA',
|
| 420 |
+
'CURRENT-LANGUAG',
|
| 421 |
+
'CURRENT-QUERY',
|
| 422 |
+
'CURRENT-RESULT-ROW',
|
| 423 |
+
'CURRENT-ROW-MODIFIED',
|
| 424 |
+
'CURRENT-VALUE',
|
| 425 |
+
'CURRENT-WINDOW',
|
| 426 |
+
'CURSOR',
|
| 427 |
+
'CURS',
|
| 428 |
+
'CURSO',
|
| 429 |
+
'CURSOR-CHAR',
|
| 430 |
+
'CURSOR-LINE',
|
| 431 |
+
'CURSOR-OFFSET',
|
| 432 |
+
'DATABASE',
|
| 433 |
+
'DATA-BIND',
|
| 434 |
+
'DATA-ENTRY-RETURN',
|
| 435 |
+
'DATA-ENTRY-RET',
|
| 436 |
+
'DATA-ENTRY-RETU',
|
| 437 |
+
'DATA-ENTRY-RETUR',
|
| 438 |
+
'DATA-RELATION',
|
| 439 |
+
'DATA-REL',
|
| 440 |
+
'DATA-RELA',
|
| 441 |
+
'DATA-RELAT',
|
| 442 |
+
'DATA-RELATI',
|
| 443 |
+
'DATA-RELATIO',
|
| 444 |
+
'DATASERVERS',
|
| 445 |
+
'DATASET',
|
| 446 |
+
'DATASET-HANDLE',
|
| 447 |
+
'DATA-SOURCE',
|
| 448 |
+
'DATA-SOURCE-COMPLETE-MAP',
|
| 449 |
+
'DATA-SOURCE-MODIFIED',
|
| 450 |
+
'DATA-SOURCE-ROWID',
|
| 451 |
+
'DATA-TYPE',
|
| 452 |
+
'DATA-T',
|
| 453 |
+
'DATA-TY',
|
| 454 |
+
'DATA-TYP',
|
| 455 |
+
'DATE-FORMAT',
|
| 456 |
+
'DATE-F',
|
| 457 |
+
'DATE-FO',
|
| 458 |
+
'DATE-FOR',
|
| 459 |
+
'DATE-FORM',
|
| 460 |
+
'DATE-FORMA',
|
| 461 |
+
'DAY',
|
| 462 |
+
'DBCODEPAGE',
|
| 463 |
+
'DBCOLLATION',
|
| 464 |
+
'DBNAME',
|
| 465 |
+
'DBPARAM',
|
| 466 |
+
'DB-REFERENCES',
|
| 467 |
+
'DBRESTRICTIONS',
|
| 468 |
+
'DBREST',
|
| 469 |
+
'DBRESTR',
|
| 470 |
+
'DBRESTRI',
|
| 471 |
+
'DBRESTRIC',
|
| 472 |
+
'DBRESTRICT',
|
| 473 |
+
'DBRESTRICTI',
|
| 474 |
+
'DBRESTRICTIO',
|
| 475 |
+
'DBRESTRICTION',
|
| 476 |
+
'DBTASKID',
|
| 477 |
+
'DBTYPE',
|
| 478 |
+
'DBVERSION',
|
| 479 |
+
'DBVERS',
|
| 480 |
+
'DBVERSI',
|
| 481 |
+
'DBVERSIO',
|
| 482 |
+
'DCOLOR',
|
| 483 |
+
'DDE',
|
| 484 |
+
'DDE-ERROR',
|
| 485 |
+
'DDE-ID',
|
| 486 |
+
'DDE-I',
|
| 487 |
+
'DDE-ITEM',
|
| 488 |
+
'DDE-NAME',
|
| 489 |
+
'DDE-TOPIC',
|
| 490 |
+
'DEBLANK',
|
| 491 |
+
'DEBUG',
|
| 492 |
+
'DEBU',
|
| 493 |
+
'DEBUG-ALERT',
|
| 494 |
+
'DEBUGGER',
|
| 495 |
+
'DEBUG-LIST',
|
| 496 |
+
'DECIMALS',
|
| 497 |
+
'DECLARE',
|
| 498 |
+
'DECLARE-NAMESPACE',
|
| 499 |
+
'DECRYPT',
|
| 500 |
+
'DEFAULT',
|
| 501 |
+
'DEFAULT-BUFFER-HANDLE',
|
| 502 |
+
'DEFAULT-BUTTON',
|
| 503 |
+
'DEFAUT-B',
|
| 504 |
+
'DEFAUT-BU',
|
| 505 |
+
'DEFAUT-BUT',
|
| 506 |
+
'DEFAUT-BUTT',
|
| 507 |
+
'DEFAUT-BUTTO',
|
| 508 |
+
'DEFAULT-COMMIT',
|
| 509 |
+
'DEFAULT-EXTENSION',
|
| 510 |
+
'DEFAULT-EX',
|
| 511 |
+
'DEFAULT-EXT',
|
| 512 |
+
'DEFAULT-EXTE',
|
| 513 |
+
'DEFAULT-EXTEN',
|
| 514 |
+
'DEFAULT-EXTENS',
|
| 515 |
+
'DEFAULT-EXTENSI',
|
| 516 |
+
'DEFAULT-EXTENSIO',
|
| 517 |
+
'DEFAULT-NOXLATE',
|
| 518 |
+
'DEFAULT-NOXL',
|
| 519 |
+
'DEFAULT-NOXLA',
|
| 520 |
+
'DEFAULT-NOXLAT',
|
| 521 |
+
'DEFAULT-VALUE',
|
| 522 |
+
'DEFAULT-WINDOW',
|
| 523 |
+
'DEFINED',
|
| 524 |
+
'DEFINE-USER-EVENT-MANAGER',
|
| 525 |
+
'DELETE',
|
| 526 |
+
'DEL',
|
| 527 |
+
'DELE',
|
| 528 |
+
'DELET',
|
| 529 |
+
'DELETE-CHARACTER',
|
| 530 |
+
'DELETE-CHAR',
|
| 531 |
+
'DELETE-CHARA',
|
| 532 |
+
'DELETE-CHARAC',
|
| 533 |
+
'DELETE-CHARACT',
|
| 534 |
+
'DELETE-CHARACTE',
|
| 535 |
+
'DELETE-CURRENT-ROW',
|
| 536 |
+
'DELETE-LINE',
|
| 537 |
+
'DELETE-RESULT-LIST-ENTRY',
|
| 538 |
+
'DELETE-SELECTED-ROW',
|
| 539 |
+
'DELETE-SELECTED-ROWS',
|
| 540 |
+
'DELIMITER',
|
| 541 |
+
'DESC',
|
| 542 |
+
'DESCENDING',
|
| 543 |
+
'DESCE',
|
| 544 |
+
'DESCEN',
|
| 545 |
+
'DESCEND',
|
| 546 |
+
'DESCENDI',
|
| 547 |
+
'DESCENDIN',
|
| 548 |
+
'DESELECT-FOCUSED-ROW',
|
| 549 |
+
'DESELECTION',
|
| 550 |
+
'DESELECT-ROWS',
|
| 551 |
+
'DESELECT-SELECTED-ROW',
|
| 552 |
+
'DESTRUCTOR',
|
| 553 |
+
'DIALOG-BOX',
|
| 554 |
+
'DICTIONARY',
|
| 555 |
+
'DICT',
|
| 556 |
+
'DICTI',
|
| 557 |
+
'DICTIO',
|
| 558 |
+
'DICTION',
|
| 559 |
+
'DICTIONA',
|
| 560 |
+
'DICTIONAR',
|
| 561 |
+
'DIR',
|
| 562 |
+
'DISABLE',
|
| 563 |
+
'DISABLE-AUTO-ZAP',
|
| 564 |
+
'DISABLED',
|
| 565 |
+
'DISABLE-DUMP-TRIGGERS',
|
| 566 |
+
'DISABLE-LOAD-TRIGGERS',
|
| 567 |
+
'DISCONNECT',
|
| 568 |
+
'DISCON',
|
| 569 |
+
'DISCONN',
|
| 570 |
+
'DISCONNE',
|
| 571 |
+
'DISCONNEC',
|
| 572 |
+
'DISP',
|
| 573 |
+
'DISPLAY',
|
| 574 |
+
'DISPL',
|
| 575 |
+
'DISPLA',
|
| 576 |
+
'DISPLAY-MESSAGE',
|
| 577 |
+
'DISPLAY-TYPE',
|
| 578 |
+
'DISPLAY-T',
|
| 579 |
+
'DISPLAY-TY',
|
| 580 |
+
'DISPLAY-TYP',
|
| 581 |
+
'DISTINCT',
|
| 582 |
+
'DO',
|
| 583 |
+
'DOMAIN-DESCRIPTION',
|
| 584 |
+
'DOMAIN-NAME',
|
| 585 |
+
'DOMAIN-TYPE',
|
| 586 |
+
'DOS',
|
| 587 |
+
'DOUBLE',
|
| 588 |
+
'DOWN',
|
| 589 |
+
'DRAG-ENABLED',
|
| 590 |
+
'DROP',
|
| 591 |
+
'DROP-DOWN',
|
| 592 |
+
'DROP-DOWN-LIST',
|
| 593 |
+
'DROP-FILE-NOTIFY',
|
| 594 |
+
'DROP-TARGET',
|
| 595 |
+
'DUMP',
|
| 596 |
+
'DYNAMIC',
|
| 597 |
+
'DYNAMIC-FUNCTION',
|
| 598 |
+
'EACH',
|
| 599 |
+
'ECHO',
|
| 600 |
+
'EDGE-CHARS',
|
| 601 |
+
'EDGE',
|
| 602 |
+
'EDGE-',
|
| 603 |
+
'EDGE-C',
|
| 604 |
+
'EDGE-CH',
|
| 605 |
+
'EDGE-CHA',
|
| 606 |
+
'EDGE-CHAR',
|
| 607 |
+
'EDGE-PIXELS',
|
| 608 |
+
'EDGE-P',
|
| 609 |
+
'EDGE-PI',
|
| 610 |
+
'EDGE-PIX',
|
| 611 |
+
'EDGE-PIXE',
|
| 612 |
+
'EDGE-PIXEL',
|
| 613 |
+
'EDIT-CAN-PASTE',
|
| 614 |
+
'EDIT-CAN-UNDO',
|
| 615 |
+
'EDIT-CLEAR',
|
| 616 |
+
'EDIT-COPY',
|
| 617 |
+
'EDIT-CUT',
|
| 618 |
+
'EDITING',
|
| 619 |
+
'EDITOR',
|
| 620 |
+
'EDIT-PASTE',
|
| 621 |
+
'EDIT-UNDO',
|
| 622 |
+
'ELSE',
|
| 623 |
+
'EMPTY',
|
| 624 |
+
'EMPTY-TEMP-TABLE',
|
| 625 |
+
'ENABLE',
|
| 626 |
+
'ENABLED-FIELDS',
|
| 627 |
+
'ENCODE',
|
| 628 |
+
'ENCRYPT',
|
| 629 |
+
'ENCRYPT-AUDIT-MAC-KEY',
|
| 630 |
+
'ENCRYPTION-SALT',
|
| 631 |
+
'END',
|
| 632 |
+
'END-DOCUMENT',
|
| 633 |
+
'END-ELEMENT',
|
| 634 |
+
'END-EVENT-GROUP',
|
| 635 |
+
'END-FILE-DROP',
|
| 636 |
+
'ENDKEY',
|
| 637 |
+
'END-KEY',
|
| 638 |
+
'END-MOVE',
|
| 639 |
+
'END-RESIZE',
|
| 640 |
+
'END-ROW-RESIZE',
|
| 641 |
+
'END-USER-PROMPT',
|
| 642 |
+
'ENTERED',
|
| 643 |
+
'ENTRY',
|
| 644 |
+
'EQ',
|
| 645 |
+
'ERROR',
|
| 646 |
+
'ERROR-COLUMN',
|
| 647 |
+
'ERROR-COL',
|
| 648 |
+
'ERROR-COLU',
|
| 649 |
+
'ERROR-COLUM',
|
| 650 |
+
'ERROR-ROW',
|
| 651 |
+
'ERROR-STACK-TRACE',
|
| 652 |
+
'ERROR-STATUS',
|
| 653 |
+
'ERROR-STAT',
|
| 654 |
+
'ERROR-STATU',
|
| 655 |
+
'ESCAPE',
|
| 656 |
+
'ETIME',
|
| 657 |
+
'EVENT-GROUP-ID',
|
| 658 |
+
'EVENT-PROCEDURE',
|
| 659 |
+
'EVENT-PROCEDURE-CONTEXT',
|
| 660 |
+
'EVENTS',
|
| 661 |
+
'EVENT',
|
| 662 |
+
'EVENT-TYPE',
|
| 663 |
+
'EVENT-T',
|
| 664 |
+
'EVENT-TY',
|
| 665 |
+
'EVENT-TYP',
|
| 666 |
+
'EXCEPT',
|
| 667 |
+
'EXCLUSIVE-ID',
|
| 668 |
+
'EXCLUSIVE-LOCK',
|
| 669 |
+
'EXCLUSIVE',
|
| 670 |
+
'EXCLUSIVE-',
|
| 671 |
+
'EXCLUSIVE-L',
|
| 672 |
+
'EXCLUSIVE-LO',
|
| 673 |
+
'EXCLUSIVE-LOC',
|
| 674 |
+
'EXCLUSIVE-WEB-USER',
|
| 675 |
+
'EXECUTE',
|
| 676 |
+
'EXISTS',
|
| 677 |
+
'EXP',
|
| 678 |
+
'EXPAND',
|
| 679 |
+
'EXPANDABLE',
|
| 680 |
+
'EXPLICIT',
|
| 681 |
+
'EXPORT',
|
| 682 |
+
'EXPORT-PRINCIPAL',
|
| 683 |
+
'EXTENDED',
|
| 684 |
+
'EXTENT',
|
| 685 |
+
'EXTERNAL',
|
| 686 |
+
'FALSE',
|
| 687 |
+
'FETCH',
|
| 688 |
+
'FETCH-SELECTED-ROW',
|
| 689 |
+
'FGCOLOR',
|
| 690 |
+
'FGC',
|
| 691 |
+
'FGCO',
|
| 692 |
+
'FGCOL',
|
| 693 |
+
'FGCOLO',
|
| 694 |
+
'FIELD',
|
| 695 |
+
'FIELDS',
|
| 696 |
+
'FILE',
|
| 697 |
+
'FILE-CREATE-DATE',
|
| 698 |
+
'FILE-CREATE-TIME',
|
| 699 |
+
'FILE-INFORMATION',
|
| 700 |
+
'FILE-INFO',
|
| 701 |
+
'FILE-INFOR',
|
| 702 |
+
'FILE-INFORM',
|
| 703 |
+
'FILE-INFORMA',
|
| 704 |
+
'FILE-INFORMAT',
|
| 705 |
+
'FILE-INFORMATI',
|
| 706 |
+
'FILE-INFORMATIO',
|
| 707 |
+
'FILE-MOD-DATE',
|
| 708 |
+
'FILE-MOD-TIME',
|
| 709 |
+
'FILENAME',
|
| 710 |
+
'FILE-NAME',
|
| 711 |
+
'FILE-OFFSET',
|
| 712 |
+
'FILE-OFF',
|
| 713 |
+
'FILE-OFFS',
|
| 714 |
+
'FILE-OFFSE',
|
| 715 |
+
'FILE-SIZE',
|
| 716 |
+
'FILE-TYPE',
|
| 717 |
+
'FILL',
|
| 718 |
+
'FILLED',
|
| 719 |
+
'FILL-IN',
|
| 720 |
+
'FILTERS',
|
| 721 |
+
'FINAL',
|
| 722 |
+
'FINALLY',
|
| 723 |
+
'FIND',
|
| 724 |
+
'FIND-BY-ROWID',
|
| 725 |
+
'FIND-CASE-SENSITIVE',
|
| 726 |
+
'FIND-CURRENT',
|
| 727 |
+
'FINDER',
|
| 728 |
+
'FIND-FIRST',
|
| 729 |
+
'FIND-GLOBAL',
|
| 730 |
+
'FIND-LAST',
|
| 731 |
+
'FIND-NEXT-OCCURRENCE',
|
| 732 |
+
'FIND-PREV-OCCURRENCE',
|
| 733 |
+
'FIND-SELECT',
|
| 734 |
+
'FIND-UNIQUE',
|
| 735 |
+
'FIND-WRAP-AROUND',
|
| 736 |
+
'FIRST',
|
| 737 |
+
'FIRST-ASYNCH-REQUEST',
|
| 738 |
+
'FIRST-CHILD',
|
| 739 |
+
'FIRST-COLUMN',
|
| 740 |
+
'FIRST-FORM',
|
| 741 |
+
'FIRST-OBJECT',
|
| 742 |
+
'FIRST-OF',
|
| 743 |
+
'FIRST-PROCEDURE',
|
| 744 |
+
'FIRST-PROC',
|
| 745 |
+
'FIRST-PROCE',
|
| 746 |
+
'FIRST-PROCED',
|
| 747 |
+
'FIRST-PROCEDU',
|
| 748 |
+
'FIRST-PROCEDUR',
|
| 749 |
+
'FIRST-SERVER',
|
| 750 |
+
'FIRST-TAB-ITEM',
|
| 751 |
+
'FIRST-TAB-I',
|
| 752 |
+
'FIRST-TAB-IT',
|
| 753 |
+
'FIRST-TAB-ITE',
|
| 754 |
+
'FIT-LAST-COLUMN',
|
| 755 |
+
'FIXED-ONLY',
|
| 756 |
+
'FLAT-BUTTON',
|
| 757 |
+
'FLOAT',
|
| 758 |
+
'FOCUS',
|
| 759 |
+
'FOCUSED-ROW',
|
| 760 |
+
'FOCUSED-ROW-SELECTED',
|
| 761 |
+
'FONT',
|
| 762 |
+
'FONT-TABLE',
|
| 763 |
+
'FOR',
|
| 764 |
+
'FORCE-FILE',
|
| 765 |
+
'FOREGROUND',
|
| 766 |
+
'FORE',
|
| 767 |
+
'FOREG',
|
| 768 |
+
'FOREGR',
|
| 769 |
+
'FOREGRO',
|
| 770 |
+
'FOREGROU',
|
| 771 |
+
'FOREGROUN',
|
| 772 |
+
'FORM',
|
| 773 |
+
'FORMAT',
|
| 774 |
+
'FORMA',
|
| 775 |
+
'FORMATTED',
|
| 776 |
+
'FORMATTE',
|
| 777 |
+
'FORM-LONG-INPUT',
|
| 778 |
+
'FORWARD',
|
| 779 |
+
'FORWARDS',
|
| 780 |
+
'FRAGMENT',
|
| 781 |
+
'FRAGMEN',
|
| 782 |
+
'FRAME',
|
| 783 |
+
'FRAM',
|
| 784 |
+
'FRAME-COL',
|
| 785 |
+
'FRAME-DB',
|
| 786 |
+
'FRAME-DOWN',
|
| 787 |
+
'FRAME-FIELD',
|
| 788 |
+
'FRAME-FILE',
|
| 789 |
+
'FRAME-INDEX',
|
| 790 |
+
'FRAME-INDE',
|
| 791 |
+
'FRAME-LINE',
|
| 792 |
+
'FRAME-NAME',
|
| 793 |
+
'FRAME-ROW',
|
| 794 |
+
'FRAME-SPACING',
|
| 795 |
+
'FRAME-SPA',
|
| 796 |
+
'FRAME-SPAC',
|
| 797 |
+
'FRAME-SPACI',
|
| 798 |
+
'FRAME-SPACIN',
|
| 799 |
+
'FRAME-VALUE',
|
| 800 |
+
'FRAME-VAL',
|
| 801 |
+
'FRAME-VALU',
|
| 802 |
+
'FRAME-X',
|
| 803 |
+
'FRAME-Y',
|
| 804 |
+
'FREQUENCY',
|
| 805 |
+
'FROM',
|
| 806 |
+
'FROM-CHARS',
|
| 807 |
+
'FROM-C',
|
| 808 |
+
'FROM-CH',
|
| 809 |
+
'FROM-CHA',
|
| 810 |
+
'FROM-CHAR',
|
| 811 |
+
'FROM-CURRENT',
|
| 812 |
+
'FROM-CUR',
|
| 813 |
+
'FROM-CURR',
|
| 814 |
+
'FROM-CURRE',
|
| 815 |
+
'FROM-CURREN',
|
| 816 |
+
'FROM-PIXELS',
|
| 817 |
+
'FROM-P',
|
| 818 |
+
'FROM-PI',
|
| 819 |
+
'FROM-PIX',
|
| 820 |
+
'FROM-PIXE',
|
| 821 |
+
'FROM-PIXEL',
|
| 822 |
+
'FULL-HEIGHT-CHARS',
|
| 823 |
+
'FULL-HEIGHT',
|
| 824 |
+
'FULL-HEIGHT-',
|
| 825 |
+
'FULL-HEIGHT-C',
|
| 826 |
+
'FULL-HEIGHT-CH',
|
| 827 |
+
'FULL-HEIGHT-CHA',
|
| 828 |
+
'FULL-HEIGHT-CHAR',
|
| 829 |
+
'FULL-HEIGHT-PIXELS',
|
| 830 |
+
'FULL-HEIGHT-P',
|
| 831 |
+
'FULL-HEIGHT-PI',
|
| 832 |
+
'FULL-HEIGHT-PIX',
|
| 833 |
+
'FULL-HEIGHT-PIXE',
|
| 834 |
+
'FULL-HEIGHT-PIXEL',
|
| 835 |
+
'FULL-PATHNAME',
|
| 836 |
+
'FULL-PATHN',
|
| 837 |
+
'FULL-PATHNA',
|
| 838 |
+
'FULL-PATHNAM',
|
| 839 |
+
'FULL-WIDTH-CHARS',
|
| 840 |
+
'FULL-WIDTH',
|
| 841 |
+
'FULL-WIDTH-',
|
| 842 |
+
'FULL-WIDTH-C',
|
| 843 |
+
'FULL-WIDTH-CH',
|
| 844 |
+
'FULL-WIDTH-CHA',
|
| 845 |
+
'FULL-WIDTH-CHAR',
|
| 846 |
+
'FULL-WIDTH-PIXELS',
|
| 847 |
+
'FULL-WIDTH-P',
|
| 848 |
+
'FULL-WIDTH-PI',
|
| 849 |
+
'FULL-WIDTH-PIX',
|
| 850 |
+
'FULL-WIDTH-PIXE',
|
| 851 |
+
'FULL-WIDTH-PIXEL',
|
| 852 |
+
'FUNCTION',
|
| 853 |
+
'FUNCTION-CALL-TYPE',
|
| 854 |
+
'GATEWAYS',
|
| 855 |
+
'GATEWAY',
|
| 856 |
+
'GE',
|
| 857 |
+
'GENERATE-MD5',
|
| 858 |
+
'GENERATE-PBE-KEY',
|
| 859 |
+
'GENERATE-PBE-SALT',
|
| 860 |
+
'GENERATE-RANDOM-KEY',
|
| 861 |
+
'GENERATE-UUID',
|
| 862 |
+
'GET',
|
| 863 |
+
'GET-ATTR-CALL-TYPE',
|
| 864 |
+
'GET-ATTRIBUTE-NODE',
|
| 865 |
+
'GET-BINARY-DATA',
|
| 866 |
+
'GET-BLUE-VALUE',
|
| 867 |
+
'GET-BLUE',
|
| 868 |
+
'GET-BLUE-',
|
| 869 |
+
'GET-BLUE-V',
|
| 870 |
+
'GET-BLUE-VA',
|
| 871 |
+
'GET-BLUE-VAL',
|
| 872 |
+
'GET-BLUE-VALU',
|
| 873 |
+
'GET-BROWSE-COLUMN',
|
| 874 |
+
'GET-BUFFER-HANDLEGETBYTE',
|
| 875 |
+
'GET-BYTE',
|
| 876 |
+
'GET-CALLBACK-PROC-CONTEXT',
|
| 877 |
+
'GET-CALLBACK-PROC-NAME',
|
| 878 |
+
'GET-CGI-LIST',
|
| 879 |
+
'GET-CGI-LONG-VALUE',
|
| 880 |
+
'GET-CGI-VALUE',
|
| 881 |
+
'GET-CODEPAGES',
|
| 882 |
+
'GET-COLLATIONS',
|
| 883 |
+
'GET-CONFIG-VALUE',
|
| 884 |
+
'GET-CURRENT',
|
| 885 |
+
'GET-DOUBLE',
|
| 886 |
+
'GET-DROPPED-FILE',
|
| 887 |
+
'GET-DYNAMIC',
|
| 888 |
+
'GET-ERROR-COLUMN',
|
| 889 |
+
'GET-ERROR-ROW',
|
| 890 |
+
'GET-FILE',
|
| 891 |
+
'GET-FILE-NAME',
|
| 892 |
+
'GET-FILE-OFFSET',
|
| 893 |
+
'GET-FILE-OFFSE',
|
| 894 |
+
'GET-FIRST',
|
| 895 |
+
'GET-FLOAT',
|
| 896 |
+
'GET-GREEN-VALUE',
|
| 897 |
+
'GET-GREEN',
|
| 898 |
+
'GET-GREEN-',
|
| 899 |
+
'GET-GREEN-V',
|
| 900 |
+
'GET-GREEN-VA',
|
| 901 |
+
'GET-GREEN-VAL',
|
| 902 |
+
'GET-GREEN-VALU',
|
| 903 |
+
'GET-INDEX-BY-NAMESPACE-NAME',
|
| 904 |
+
'GET-INDEX-BY-QNAME',
|
| 905 |
+
'GET-INT64',
|
| 906 |
+
'GET-ITERATION',
|
| 907 |
+
'GET-KEY-VALUE',
|
| 908 |
+
'GET-KEY-VAL',
|
| 909 |
+
'GET-KEY-VALU',
|
| 910 |
+
'GET-LAST',
|
| 911 |
+
'GET-LOCALNAME-BY-INDEX',
|
| 912 |
+
'GET-LONG',
|
| 913 |
+
'GET-MESSAGE',
|
| 914 |
+
'GET-NEXT',
|
| 915 |
+
'GET-NUMBER',
|
| 916 |
+
'GET-POINTER-VALUE',
|
| 917 |
+
'GET-PREV',
|
| 918 |
+
'GET-PRINTERS',
|
| 919 |
+
'GET-PROPERTY',
|
| 920 |
+
'GET-QNAME-BY-INDEX',
|
| 921 |
+
'GET-RED-VALUE',
|
| 922 |
+
'GET-RED',
|
| 923 |
+
'GET-RED-',
|
| 924 |
+
'GET-RED-V',
|
| 925 |
+
'GET-RED-VA',
|
| 926 |
+
'GET-RED-VAL',
|
| 927 |
+
'GET-RED-VALU',
|
| 928 |
+
'GET-REPOSITIONED-ROW',
|
| 929 |
+
'GET-RGB-VALUE',
|
| 930 |
+
'GET-SELECTED-WIDGET',
|
| 931 |
+
'GET-SELECTED',
|
| 932 |
+
'GET-SELECTED-',
|
| 933 |
+
'GET-SELECTED-W',
|
| 934 |
+
'GET-SELECTED-WI',
|
| 935 |
+
'GET-SELECTED-WID',
|
| 936 |
+
'GET-SELECTED-WIDG',
|
| 937 |
+
'GET-SELECTED-WIDGE',
|
| 938 |
+
'GET-SHORT',
|
| 939 |
+
'GET-SIGNATURE',
|
| 940 |
+
'GET-SIZE',
|
| 941 |
+
'GET-STRING',
|
| 942 |
+
'GET-TAB-ITEM',
|
| 943 |
+
'GET-TEXT-HEIGHT-CHARS',
|
| 944 |
+
'GET-TEXT-HEIGHT',
|
| 945 |
+
'GET-TEXT-HEIGHT-',
|
| 946 |
+
'GET-TEXT-HEIGHT-C',
|
| 947 |
+
'GET-TEXT-HEIGHT-CH',
|
| 948 |
+
'GET-TEXT-HEIGHT-CHA',
|
| 949 |
+
'GET-TEXT-HEIGHT-CHAR',
|
| 950 |
+
'GET-TEXT-HEIGHT-PIXELS',
|
| 951 |
+
'GET-TEXT-HEIGHT-P',
|
| 952 |
+
'GET-TEXT-HEIGHT-PI',
|
| 953 |
+
'GET-TEXT-HEIGHT-PIX',
|
| 954 |
+
'GET-TEXT-HEIGHT-PIXE',
|
| 955 |
+
'GET-TEXT-HEIGHT-PIXEL',
|
| 956 |
+
'GET-TEXT-WIDTH-CHARS',
|
| 957 |
+
'GET-TEXT-WIDTH',
|
| 958 |
+
'GET-TEXT-WIDTH-',
|
| 959 |
+
'GET-TEXT-WIDTH-C',
|
| 960 |
+
'GET-TEXT-WIDTH-CH',
|
| 961 |
+
'GET-TEXT-WIDTH-CHA',
|
| 962 |
+
'GET-TEXT-WIDTH-CHAR',
|
| 963 |
+
'GET-TEXT-WIDTH-PIXELS',
|
| 964 |
+
'GET-TEXT-WIDTH-P',
|
| 965 |
+
'GET-TEXT-WIDTH-PI',
|
| 966 |
+
'GET-TEXT-WIDTH-PIX',
|
| 967 |
+
'GET-TEXT-WIDTH-PIXE',
|
| 968 |
+
'GET-TEXT-WIDTH-PIXEL',
|
| 969 |
+
'GET-TYPE-BY-INDEX',
|
| 970 |
+
'GET-TYPE-BY-NAMESPACE-NAME',
|
| 971 |
+
'GET-TYPE-BY-QNAME',
|
| 972 |
+
'GET-UNSIGNED-LONG',
|
| 973 |
+
'GET-UNSIGNED-SHORT',
|
| 974 |
+
'GET-URI-BY-INDEX',
|
| 975 |
+
'GET-VALUE-BY-INDEX',
|
| 976 |
+
'GET-VALUE-BY-NAMESPACE-NAME',
|
| 977 |
+
'GET-VALUE-BY-QNAME',
|
| 978 |
+
'GET-WAIT-STATE',
|
| 979 |
+
'GLOBAL',
|
| 980 |
+
'GO-ON',
|
| 981 |
+
'GO-PENDING',
|
| 982 |
+
'GO-PEND',
|
| 983 |
+
'GO-PENDI',
|
| 984 |
+
'GO-PENDIN',
|
| 985 |
+
'GRANT',
|
| 986 |
+
'GRAPHIC-EDGE',
|
| 987 |
+
'GRAPHIC-E',
|
| 988 |
+
'GRAPHIC-ED',
|
| 989 |
+
'GRAPHIC-EDG',
|
| 990 |
+
'GRID-FACTOR-HORIZONTAL',
|
| 991 |
+
'GRID-FACTOR-H',
|
| 992 |
+
'GRID-FACTOR-HO',
|
| 993 |
+
'GRID-FACTOR-HOR',
|
| 994 |
+
'GRID-FACTOR-HORI',
|
| 995 |
+
'GRID-FACTOR-HORIZ',
|
| 996 |
+
'GRID-FACTOR-HORIZO',
|
| 997 |
+
'GRID-FACTOR-HORIZON',
|
| 998 |
+
'GRID-FACTOR-HORIZONT',
|
| 999 |
+
'GRID-FACTOR-HORIZONTA',
|
| 1000 |
+
'GRID-FACTOR-VERTICAL',
|
| 1001 |
+
'GRID-FACTOR-V',
|
| 1002 |
+
'GRID-FACTOR-VE',
|
| 1003 |
+
'GRID-FACTOR-VER',
|
| 1004 |
+
'GRID-FACTOR-VERT',
|
| 1005 |
+
'GRID-FACTOR-VERTI',
|
| 1006 |
+
'GRID-FACTOR-VERTIC',
|
| 1007 |
+
'GRID-FACTOR-VERTICA',
|
| 1008 |
+
'GRID-SNAP',
|
| 1009 |
+
'GRID-UNIT-HEIGHT-CHARS',
|
| 1010 |
+
'GRID-UNIT-HEIGHT',
|
| 1011 |
+
'GRID-UNIT-HEIGHT-',
|
| 1012 |
+
'GRID-UNIT-HEIGHT-C',
|
| 1013 |
+
'GRID-UNIT-HEIGHT-CH',
|
| 1014 |
+
'GRID-UNIT-HEIGHT-CHA',
|
| 1015 |
+
'GRID-UNIT-HEIGHT-PIXELS',
|
| 1016 |
+
'GRID-UNIT-HEIGHT-P',
|
| 1017 |
+
'GRID-UNIT-HEIGHT-PI',
|
| 1018 |
+
'GRID-UNIT-HEIGHT-PIX',
|
| 1019 |
+
'GRID-UNIT-HEIGHT-PIXE',
|
| 1020 |
+
'GRID-UNIT-HEIGHT-PIXEL',
|
| 1021 |
+
'GRID-UNIT-WIDTH-CHARS',
|
| 1022 |
+
'GRID-UNIT-WIDTH',
|
| 1023 |
+
'GRID-UNIT-WIDTH-',
|
| 1024 |
+
'GRID-UNIT-WIDTH-C',
|
| 1025 |
+
'GRID-UNIT-WIDTH-CH',
|
| 1026 |
+
'GRID-UNIT-WIDTH-CHA',
|
| 1027 |
+
'GRID-UNIT-WIDTH-CHAR',
|
| 1028 |
+
'GRID-UNIT-WIDTH-PIXELS',
|
| 1029 |
+
'GRID-UNIT-WIDTH-P',
|
| 1030 |
+
'GRID-UNIT-WIDTH-PI',
|
| 1031 |
+
'GRID-UNIT-WIDTH-PIX',
|
| 1032 |
+
'GRID-UNIT-WIDTH-PIXE',
|
| 1033 |
+
'GRID-UNIT-WIDTH-PIXEL',
|
| 1034 |
+
'GRID-VISIBLE',
|
| 1035 |
+
'GROUP',
|
| 1036 |
+
'GT',
|
| 1037 |
+
'GUID',
|
| 1038 |
+
'HANDLER',
|
| 1039 |
+
'HAS-RECORDS',
|
| 1040 |
+
'HAVING',
|
| 1041 |
+
'HEADER',
|
| 1042 |
+
'HEIGHT-CHARS',
|
| 1043 |
+
'HEIGHT',
|
| 1044 |
+
'HEIGHT-',
|
| 1045 |
+
'HEIGHT-C',
|
| 1046 |
+
'HEIGHT-CH',
|
| 1047 |
+
'HEIGHT-CHA',
|
| 1048 |
+
'HEIGHT-CHAR',
|
| 1049 |
+
'HEIGHT-PIXELS',
|
| 1050 |
+
'HEIGHT-P',
|
| 1051 |
+
'HEIGHT-PI',
|
| 1052 |
+
'HEIGHT-PIX',
|
| 1053 |
+
'HEIGHT-PIXE',
|
| 1054 |
+
'HEIGHT-PIXEL',
|
| 1055 |
+
'HELP',
|
| 1056 |
+
'HEX-DECODE',
|
| 1057 |
+
'HEX-ENCODE',
|
| 1058 |
+
'HIDDEN',
|
| 1059 |
+
'HIDE',
|
| 1060 |
+
'HORIZONTAL',
|
| 1061 |
+
'HORI',
|
| 1062 |
+
'HORIZ',
|
| 1063 |
+
'HORIZO',
|
| 1064 |
+
'HORIZON',
|
| 1065 |
+
'HORIZONT',
|
| 1066 |
+
'HORIZONTA',
|
| 1067 |
+
'HOST-BYTE-ORDER',
|
| 1068 |
+
'HTML-CHARSET',
|
| 1069 |
+
'HTML-END-OF-LINE',
|
| 1070 |
+
'HTML-END-OF-PAGE',
|
| 1071 |
+
'HTML-FRAME-BEGIN',
|
| 1072 |
+
'HTML-FRAME-END',
|
| 1073 |
+
'HTML-HEADER-BEGIN',
|
| 1074 |
+
'HTML-HEADER-END',
|
| 1075 |
+
'HTML-TITLE-BEGIN',
|
| 1076 |
+
'HTML-TITLE-END',
|
| 1077 |
+
'HWND',
|
| 1078 |
+
'ICON',
|
| 1079 |
+
'IF',
|
| 1080 |
+
'IMAGE',
|
| 1081 |
+
'IMAGE-DOWN',
|
| 1082 |
+
'IMAGE-INSENSITIVE',
|
| 1083 |
+
'IMAGE-SIZE',
|
| 1084 |
+
'IMAGE-SIZE-CHARS',
|
| 1085 |
+
'IMAGE-SIZE-C',
|
| 1086 |
+
'IMAGE-SIZE-CH',
|
| 1087 |
+
'IMAGE-SIZE-CHA',
|
| 1088 |
+
'IMAGE-SIZE-CHAR',
|
| 1089 |
+
'IMAGE-SIZE-PIXELS',
|
| 1090 |
+
'IMAGE-SIZE-P',
|
| 1091 |
+
'IMAGE-SIZE-PI',
|
| 1092 |
+
'IMAGE-SIZE-PIX',
|
| 1093 |
+
'IMAGE-SIZE-PIXE',
|
| 1094 |
+
'IMAGE-SIZE-PIXEL',
|
| 1095 |
+
'IMAGE-UP',
|
| 1096 |
+
'IMMEDIATE-DISPLAY',
|
| 1097 |
+
'IMPLEMENTS',
|
| 1098 |
+
'IMPORT',
|
| 1099 |
+
'IMPORT-PRINCIPAL',
|
| 1100 |
+
'IN',
|
| 1101 |
+
'INCREMENT-EXCLUSIVE-ID',
|
| 1102 |
+
'INDEX',
|
| 1103 |
+
'INDEXED-REPOSITION',
|
| 1104 |
+
'INDEX-HINT',
|
| 1105 |
+
'INDEX-INFORMATION',
|
| 1106 |
+
'INDICATOR',
|
| 1107 |
+
'INFORMATION',
|
| 1108 |
+
'INFO',
|
| 1109 |
+
'INFOR',
|
| 1110 |
+
'INFORM',
|
| 1111 |
+
'INFORMA',
|
| 1112 |
+
'INFORMAT',
|
| 1113 |
+
'INFORMATI',
|
| 1114 |
+
'INFORMATIO',
|
| 1115 |
+
'IN-HANDLE',
|
| 1116 |
+
'INHERIT-BGCOLOR',
|
| 1117 |
+
'INHERIT-BGC',
|
| 1118 |
+
'INHERIT-BGCO',
|
| 1119 |
+
'INHERIT-BGCOL',
|
| 1120 |
+
'INHERIT-BGCOLO',
|
| 1121 |
+
'INHERIT-FGCOLOR',
|
| 1122 |
+
'INHERIT-FGC',
|
| 1123 |
+
'INHERIT-FGCO',
|
| 1124 |
+
'INHERIT-FGCOL',
|
| 1125 |
+
'INHERIT-FGCOLO',
|
| 1126 |
+
'INHERITS',
|
| 1127 |
+
'INITIAL',
|
| 1128 |
+
'INIT',
|
| 1129 |
+
'INITI',
|
| 1130 |
+
'INITIA',
|
| 1131 |
+
'INITIAL-DIR',
|
| 1132 |
+
'INITIAL-FILTER',
|
| 1133 |
+
'INITIALIZE-DOCUMENT-TYPE',
|
| 1134 |
+
'INITIATE',
|
| 1135 |
+
'INNER-CHARS',
|
| 1136 |
+
'INNER-LINES',
|
| 1137 |
+
'INPUT',
|
| 1138 |
+
'INPUT-OUTPUT',
|
| 1139 |
+
'INPUT-O',
|
| 1140 |
+
'INPUT-OU',
|
| 1141 |
+
'INPUT-OUT',
|
| 1142 |
+
'INPUT-OUTP',
|
| 1143 |
+
'INPUT-OUTPU',
|
| 1144 |
+
'INPUT-VALUE',
|
| 1145 |
+
'INSERT',
|
| 1146 |
+
'INSERT-ATTRIBUTE',
|
| 1147 |
+
'INSERT-BACKTAB',
|
| 1148 |
+
'INSERT-B',
|
| 1149 |
+
'INSERT-BA',
|
| 1150 |
+
'INSERT-BAC',
|
| 1151 |
+
'INSERT-BACK',
|
| 1152 |
+
'INSERT-BACKT',
|
| 1153 |
+
'INSERT-BACKTA',
|
| 1154 |
+
'INSERT-FILE',
|
| 1155 |
+
'INSERT-ROW',
|
| 1156 |
+
'INSERT-STRING',
|
| 1157 |
+
'INSERT-TAB',
|
| 1158 |
+
'INSERT-T',
|
| 1159 |
+
'INSERT-TA',
|
| 1160 |
+
'INTERFACE',
|
| 1161 |
+
'INTERNAL-ENTRIES',
|
| 1162 |
+
'INTO',
|
| 1163 |
+
'INVOKE',
|
| 1164 |
+
'IS',
|
| 1165 |
+
'IS-ATTR-SPACE',
|
| 1166 |
+
'IS-ATTR',
|
| 1167 |
+
'IS-ATTR-',
|
| 1168 |
+
'IS-ATTR-S',
|
| 1169 |
+
'IS-ATTR-SP',
|
| 1170 |
+
'IS-ATTR-SPA',
|
| 1171 |
+
'IS-ATTR-SPAC',
|
| 1172 |
+
'IS-CLASS',
|
| 1173 |
+
'IS-CLAS',
|
| 1174 |
+
'IS-LEAD-BYTE',
|
| 1175 |
+
'IS-OPEN',
|
| 1176 |
+
'IS-PARAMETER-SET',
|
| 1177 |
+
'IS-ROW-SELECTED',
|
| 1178 |
+
'IS-SELECTED',
|
| 1179 |
+
'ITEM',
|
| 1180 |
+
'ITEMS-PER-ROW',
|
| 1181 |
+
'JOIN',
|
| 1182 |
+
'JOIN-BY-SQLDB',
|
| 1183 |
+
'KBLABEL',
|
| 1184 |
+
'KEEP-CONNECTION-OPEN',
|
| 1185 |
+
'KEEP-FRAME-Z-ORDER',
|
| 1186 |
+
'KEEP-FRAME-Z',
|
| 1187 |
+
'KEEP-FRAME-Z-',
|
| 1188 |
+
'KEEP-FRAME-Z-O',
|
| 1189 |
+
'KEEP-FRAME-Z-OR',
|
| 1190 |
+
'KEEP-FRAME-Z-ORD',
|
| 1191 |
+
'KEEP-FRAME-Z-ORDE',
|
| 1192 |
+
'KEEP-MESSAGES',
|
| 1193 |
+
'KEEP-SECURITY-CACHE',
|
| 1194 |
+
'KEEP-TAB-ORDER',
|
| 1195 |
+
'KEY',
|
| 1196 |
+
'KEYCODE',
|
| 1197 |
+
'KEY-CODE',
|
| 1198 |
+
'KEYFUNCTION',
|
| 1199 |
+
'KEYFUNC',
|
| 1200 |
+
'KEYFUNCT',
|
| 1201 |
+
'KEYFUNCTI',
|
| 1202 |
+
'KEYFUNCTIO',
|
| 1203 |
+
'KEY-FUNCTION',
|
| 1204 |
+
'KEY-FUNC',
|
| 1205 |
+
'KEY-FUNCT',
|
| 1206 |
+
'KEY-FUNCTI',
|
| 1207 |
+
'KEY-FUNCTIO',
|
| 1208 |
+
'KEYLABEL',
|
| 1209 |
+
'KEY-LABEL',
|
| 1210 |
+
'KEYS',
|
| 1211 |
+
'KEYWORD',
|
| 1212 |
+
'KEYWORD-ALL',
|
| 1213 |
+
'LABEL',
|
| 1214 |
+
'LABEL-BGCOLOR',
|
| 1215 |
+
'LABEL-BGC',
|
| 1216 |
+
'LABEL-BGCO',
|
| 1217 |
+
'LABEL-BGCOL',
|
| 1218 |
+
'LABEL-BGCOLO',
|
| 1219 |
+
'LABEL-DCOLOR',
|
| 1220 |
+
'LABEL-DC',
|
| 1221 |
+
'LABEL-DCO',
|
| 1222 |
+
'LABEL-DCOL',
|
| 1223 |
+
'LABEL-DCOLO',
|
| 1224 |
+
'LABEL-FGCOLOR',
|
| 1225 |
+
'LABEL-FGC',
|
| 1226 |
+
'LABEL-FGCO',
|
| 1227 |
+
'LABEL-FGCOL',
|
| 1228 |
+
'LABEL-FGCOLO',
|
| 1229 |
+
'LABEL-FONT',
|
| 1230 |
+
'LABEL-PFCOLOR',
|
| 1231 |
+
'LABEL-PFC',
|
| 1232 |
+
'LABEL-PFCO',
|
| 1233 |
+
'LABEL-PFCOL',
|
| 1234 |
+
'LABEL-PFCOLO',
|
| 1235 |
+
'LABELS',
|
| 1236 |
+
'LANDSCAPE',
|
| 1237 |
+
'LANGUAGES',
|
| 1238 |
+
'LANGUAGE',
|
| 1239 |
+
'LARGE',
|
| 1240 |
+
'LARGE-TO-SMALL',
|
| 1241 |
+
'LAST',
|
| 1242 |
+
'LAST-ASYNCH-REQUEST',
|
| 1243 |
+
'LAST-BATCH',
|
| 1244 |
+
'LAST-CHILD',
|
| 1245 |
+
'LAST-EVENT',
|
| 1246 |
+
'LAST-EVEN',
|
| 1247 |
+
'LAST-FORM',
|
| 1248 |
+
'LASTKEY',
|
| 1249 |
+
'LAST-KEY',
|
| 1250 |
+
'LAST-OBJECT',
|
| 1251 |
+
'LAST-OF',
|
| 1252 |
+
'LAST-PROCEDURE',
|
| 1253 |
+
'LAST-PROCE',
|
| 1254 |
+
'LAST-PROCED',
|
| 1255 |
+
'LAST-PROCEDU',
|
| 1256 |
+
'LAST-PROCEDUR',
|
| 1257 |
+
'LAST-SERVER',
|
| 1258 |
+
'LAST-TAB-ITEM',
|
| 1259 |
+
'LAST-TAB-I',
|
| 1260 |
+
'LAST-TAB-IT',
|
| 1261 |
+
'LAST-TAB-ITE',
|
| 1262 |
+
'LC',
|
| 1263 |
+
'LDBNAME',
|
| 1264 |
+
'LE',
|
| 1265 |
+
'LEAVE',
|
| 1266 |
+
'LEFT-ALIGNED',
|
| 1267 |
+
'LEFT-ALIGN',
|
| 1268 |
+
'LEFT-ALIGNE',
|
| 1269 |
+
'LEFT-TRIM',
|
| 1270 |
+
'LENGTH',
|
| 1271 |
+
'LIBRARY',
|
| 1272 |
+
'LIKE',
|
| 1273 |
+
'LIKE-SEQUENTIAL',
|
| 1274 |
+
'LINE',
|
| 1275 |
+
'LINE-COUNTER',
|
| 1276 |
+
'LINE-COUNT',
|
| 1277 |
+
'LINE-COUNTE',
|
| 1278 |
+
'LIST-EVENTS',
|
| 1279 |
+
'LISTING',
|
| 1280 |
+
'LISTI',
|
| 1281 |
+
'LISTIN',
|
| 1282 |
+
'LIST-ITEM-PAIRS',
|
| 1283 |
+
'LIST-ITEMS',
|
| 1284 |
+
'LIST-PROPERTY-NAMES',
|
| 1285 |
+
'LIST-QUERY-ATTRS',
|
| 1286 |
+
'LIST-SET-ATTRS',
|
| 1287 |
+
'LIST-WIDGETS',
|
| 1288 |
+
'LITERAL-QUESTION',
|
| 1289 |
+
'LITTLE-ENDIAN',
|
| 1290 |
+
'LOAD',
|
| 1291 |
+
'LOAD-DOMAINS',
|
| 1292 |
+
'LOAD-ICON',
|
| 1293 |
+
'LOAD-IMAGE',
|
| 1294 |
+
'LOAD-IMAGE-DOWN',
|
| 1295 |
+
'LOAD-IMAGE-INSENSITIVE',
|
| 1296 |
+
'LOAD-IMAGE-UP',
|
| 1297 |
+
'LOAD-MOUSE-POINTER',
|
| 1298 |
+
'LOAD-MOUSE-P',
|
| 1299 |
+
'LOAD-MOUSE-PO',
|
| 1300 |
+
'LOAD-MOUSE-POI',
|
| 1301 |
+
'LOAD-MOUSE-POIN',
|
| 1302 |
+
'LOAD-MOUSE-POINT',
|
| 1303 |
+
'LOAD-MOUSE-POINTE',
|
| 1304 |
+
'LOAD-PICTURE',
|
| 1305 |
+
'LOAD-SMALL-ICON',
|
| 1306 |
+
'LOCAL-NAME',
|
| 1307 |
+
'LOCATOR-COLUMN-NUMBER',
|
| 1308 |
+
'LOCATOR-LINE-NUMBER',
|
| 1309 |
+
'LOCATOR-PUBLIC-ID',
|
| 1310 |
+
'LOCATOR-SYSTEM-ID',
|
| 1311 |
+
'LOCATOR-TYPE',
|
| 1312 |
+
'LOCKED',
|
| 1313 |
+
'LOCK-REGISTRATION',
|
| 1314 |
+
'LOG',
|
| 1315 |
+
'LOG-AUDIT-EVENT',
|
| 1316 |
+
'LOGIN-EXPIRATION-TIMESTAMP',
|
| 1317 |
+
'LOGIN-HOST',
|
| 1318 |
+
'LOGIN-STATE',
|
| 1319 |
+
'LOG-MANAGER',
|
| 1320 |
+
'LOGOUT',
|
| 1321 |
+
'LOOKAHEAD',
|
| 1322 |
+
'LOOKUP',
|
| 1323 |
+
'LT',
|
| 1324 |
+
'MACHINE-CLASS',
|
| 1325 |
+
'MANDATORY',
|
| 1326 |
+
'MANUAL-HIGHLIGHT',
|
| 1327 |
+
'MAP',
|
| 1328 |
+
'MARGIN-EXTRA',
|
| 1329 |
+
'MARGIN-HEIGHT-CHARS',
|
| 1330 |
+
'MARGIN-HEIGHT',
|
| 1331 |
+
'MARGIN-HEIGHT-',
|
| 1332 |
+
'MARGIN-HEIGHT-C',
|
| 1333 |
+
'MARGIN-HEIGHT-CH',
|
| 1334 |
+
'MARGIN-HEIGHT-CHA',
|
| 1335 |
+
'MARGIN-HEIGHT-CHAR',
|
| 1336 |
+
'MARGIN-HEIGHT-PIXELS',
|
| 1337 |
+
'MARGIN-HEIGHT-P',
|
| 1338 |
+
'MARGIN-HEIGHT-PI',
|
| 1339 |
+
'MARGIN-HEIGHT-PIX',
|
| 1340 |
+
'MARGIN-HEIGHT-PIXE',
|
| 1341 |
+
'MARGIN-HEIGHT-PIXEL',
|
| 1342 |
+
'MARGIN-WIDTH-CHARS',
|
| 1343 |
+
'MARGIN-WIDTH',
|
| 1344 |
+
'MARGIN-WIDTH-',
|
| 1345 |
+
'MARGIN-WIDTH-C',
|
| 1346 |
+
'MARGIN-WIDTH-CH',
|
| 1347 |
+
'MARGIN-WIDTH-CHA',
|
| 1348 |
+
'MARGIN-WIDTH-CHAR',
|
| 1349 |
+
'MARGIN-WIDTH-PIXELS',
|
| 1350 |
+
'MARGIN-WIDTH-P',
|
| 1351 |
+
'MARGIN-WIDTH-PI',
|
| 1352 |
+
'MARGIN-WIDTH-PIX',
|
| 1353 |
+
'MARGIN-WIDTH-PIXE',
|
| 1354 |
+
'MARGIN-WIDTH-PIXEL',
|
| 1355 |
+
'MARK-NEW',
|
| 1356 |
+
'MARK-ROW-STATE',
|
| 1357 |
+
'MATCHES',
|
| 1358 |
+
'MAX-BUTTON',
|
| 1359 |
+
'MAX-CHARS',
|
| 1360 |
+
'MAX-DATA-GUESS',
|
| 1361 |
+
'MAX-HEIGHT',
|
| 1362 |
+
'MAX-HEIGHT-CHARS',
|
| 1363 |
+
'MAX-HEIGHT-C',
|
| 1364 |
+
'MAX-HEIGHT-CH',
|
| 1365 |
+
'MAX-HEIGHT-CHA',
|
| 1366 |
+
'MAX-HEIGHT-CHAR',
|
| 1367 |
+
'MAX-HEIGHT-PIXELS',
|
| 1368 |
+
'MAX-HEIGHT-P',
|
| 1369 |
+
'MAX-HEIGHT-PI',
|
| 1370 |
+
'MAX-HEIGHT-PIX',
|
| 1371 |
+
'MAX-HEIGHT-PIXE',
|
| 1372 |
+
'MAX-HEIGHT-PIXEL',
|
| 1373 |
+
'MAXIMIZE',
|
| 1374 |
+
'MAXIMUM',
|
| 1375 |
+
'MAX',
|
| 1376 |
+
'MAXI',
|
| 1377 |
+
'MAXIM',
|
| 1378 |
+
'MAXIMU',
|
| 1379 |
+
'MAXIMUM-LEVEL',
|
| 1380 |
+
'MAX-ROWS',
|
| 1381 |
+
'MAX-SIZE',
|
| 1382 |
+
'MAX-VALUE',
|
| 1383 |
+
'MAX-VAL',
|
| 1384 |
+
'MAX-VALU',
|
| 1385 |
+
'MAX-WIDTH-CHARS',
|
| 1386 |
+
'MAX-WIDTH',
|
| 1387 |
+
'MAX-WIDTH-',
|
| 1388 |
+
'MAX-WIDTH-C',
|
| 1389 |
+
'MAX-WIDTH-CH',
|
| 1390 |
+
'MAX-WIDTH-CHA',
|
| 1391 |
+
'MAX-WIDTH-CHAR',
|
| 1392 |
+
'MAX-WIDTH-PIXELS',
|
| 1393 |
+
'MAX-WIDTH-P',
|
| 1394 |
+
'MAX-WIDTH-PI',
|
| 1395 |
+
'MAX-WIDTH-PIX',
|
| 1396 |
+
'MAX-WIDTH-PIXE',
|
| 1397 |
+
'MAX-WIDTH-PIXEL',
|
| 1398 |
+
'MD5-DIGEST',
|
| 1399 |
+
'MEMBER',
|
| 1400 |
+
'MEMPTR-TO-NODE-VALUE',
|
| 1401 |
+
'MENU',
|
| 1402 |
+
'MENUBAR',
|
| 1403 |
+
'MENU-BAR',
|
| 1404 |
+
'MENU-ITEM',
|
| 1405 |
+
'MENU-KEY',
|
| 1406 |
+
'MENU-K',
|
| 1407 |
+
'MENU-KE',
|
| 1408 |
+
'MENU-MOUSE',
|
| 1409 |
+
'MENU-M',
|
| 1410 |
+
'MENU-MO',
|
| 1411 |
+
'MENU-MOU',
|
| 1412 |
+
'MENU-MOUS',
|
| 1413 |
+
'MERGE-BY-FIELD',
|
| 1414 |
+
'MESSAGE',
|
| 1415 |
+
'MESSAGE-AREA',
|
| 1416 |
+
'MESSAGE-AREA-FONT',
|
| 1417 |
+
'MESSAGE-LINES',
|
| 1418 |
+
'METHOD',
|
| 1419 |
+
'MIN-BUTTON',
|
| 1420 |
+
'MIN-COLUMN-WIDTH-CHARS',
|
| 1421 |
+
'MIN-COLUMN-WIDTH-C',
|
| 1422 |
+
'MIN-COLUMN-WIDTH-CH',
|
| 1423 |
+
'MIN-COLUMN-WIDTH-CHA',
|
| 1424 |
+
'MIN-COLUMN-WIDTH-CHAR',
|
| 1425 |
+
'MIN-COLUMN-WIDTH-PIXELS',
|
| 1426 |
+
'MIN-COLUMN-WIDTH-P',
|
| 1427 |
+
'MIN-COLUMN-WIDTH-PI',
|
| 1428 |
+
'MIN-COLUMN-WIDTH-PIX',
|
| 1429 |
+
'MIN-COLUMN-WIDTH-PIXE',
|
| 1430 |
+
'MIN-COLUMN-WIDTH-PIXEL',
|
| 1431 |
+
'MIN-HEIGHT-CHARS',
|
| 1432 |
+
'MIN-HEIGHT',
|
| 1433 |
+
'MIN-HEIGHT-',
|
| 1434 |
+
'MIN-HEIGHT-C',
|
| 1435 |
+
'MIN-HEIGHT-CH',
|
| 1436 |
+
'MIN-HEIGHT-CHA',
|
| 1437 |
+
'MIN-HEIGHT-CHAR',
|
| 1438 |
+
'MIN-HEIGHT-PIXELS',
|
| 1439 |
+
'MIN-HEIGHT-P',
|
| 1440 |
+
'MIN-HEIGHT-PI',
|
| 1441 |
+
'MIN-HEIGHT-PIX',
|
| 1442 |
+
'MIN-HEIGHT-PIXE',
|
| 1443 |
+
'MIN-HEIGHT-PIXEL',
|
| 1444 |
+
'MINIMUM',
|
| 1445 |
+
'MIN',
|
| 1446 |
+
'MINI',
|
| 1447 |
+
'MINIM',
|
| 1448 |
+
'MINIMU',
|
| 1449 |
+
'MIN-SIZE',
|
| 1450 |
+
'MIN-VALUE',
|
| 1451 |
+
'MIN-VAL',
|
| 1452 |
+
'MIN-VALU',
|
| 1453 |
+
'MIN-WIDTH-CHARS',
|
| 1454 |
+
'MIN-WIDTH',
|
| 1455 |
+
'MIN-WIDTH-',
|
| 1456 |
+
'MIN-WIDTH-C',
|
| 1457 |
+
'MIN-WIDTH-CH',
|
| 1458 |
+
'MIN-WIDTH-CHA',
|
| 1459 |
+
'MIN-WIDTH-CHAR',
|
| 1460 |
+
'MIN-WIDTH-PIXELS',
|
| 1461 |
+
'MIN-WIDTH-P',
|
| 1462 |
+
'MIN-WIDTH-PI',
|
| 1463 |
+
'MIN-WIDTH-PIX',
|
| 1464 |
+
'MIN-WIDTH-PIXE',
|
| 1465 |
+
'MIN-WIDTH-PIXEL',
|
| 1466 |
+
'MODIFIED',
|
| 1467 |
+
'MODULO',
|
| 1468 |
+
'MOD',
|
| 1469 |
+
'MODU',
|
| 1470 |
+
'MODUL',
|
| 1471 |
+
'MONTH',
|
| 1472 |
+
'MOUSE',
|
| 1473 |
+
'MOUSE-POINTER',
|
| 1474 |
+
'MOUSE-P',
|
| 1475 |
+
'MOUSE-PO',
|
| 1476 |
+
'MOUSE-POI',
|
| 1477 |
+
'MOUSE-POIN',
|
| 1478 |
+
'MOUSE-POINT',
|
| 1479 |
+
'MOUSE-POINTE',
|
| 1480 |
+
'MOVABLE',
|
| 1481 |
+
'MOVE-AFTER-TAB-ITEM',
|
| 1482 |
+
'MOVE-AFTER',
|
| 1483 |
+
'MOVE-AFTER-',
|
| 1484 |
+
'MOVE-AFTER-T',
|
| 1485 |
+
'MOVE-AFTER-TA',
|
| 1486 |
+
'MOVE-AFTER-TAB',
|
| 1487 |
+
'MOVE-AFTER-TAB-',
|
| 1488 |
+
'MOVE-AFTER-TAB-I',
|
| 1489 |
+
'MOVE-AFTER-TAB-IT',
|
| 1490 |
+
'MOVE-AFTER-TAB-ITE',
|
| 1491 |
+
'MOVE-BEFORE-TAB-ITEM',
|
| 1492 |
+
'MOVE-BEFOR',
|
| 1493 |
+
'MOVE-BEFORE',
|
| 1494 |
+
'MOVE-BEFORE-',
|
| 1495 |
+
'MOVE-BEFORE-T',
|
| 1496 |
+
'MOVE-BEFORE-TA',
|
| 1497 |
+
'MOVE-BEFORE-TAB',
|
| 1498 |
+
'MOVE-BEFORE-TAB-',
|
| 1499 |
+
'MOVE-BEFORE-TAB-I',
|
| 1500 |
+
'MOVE-BEFORE-TAB-IT',
|
| 1501 |
+
'MOVE-BEFORE-TAB-ITE',
|
| 1502 |
+
'MOVE-COLUMN',
|
| 1503 |
+
'MOVE-COL',
|
| 1504 |
+
'MOVE-COLU',
|
| 1505 |
+
'MOVE-COLUM',
|
| 1506 |
+
'MOVE-TO-BOTTOM',
|
| 1507 |
+
'MOVE-TO-B',
|
| 1508 |
+
'MOVE-TO-BO',
|
| 1509 |
+
'MOVE-TO-BOT',
|
| 1510 |
+
'MOVE-TO-BOTT',
|
| 1511 |
+
'MOVE-TO-BOTTO',
|
| 1512 |
+
'MOVE-TO-EOF',
|
| 1513 |
+
'MOVE-TO-TOP',
|
| 1514 |
+
'MOVE-TO-T',
|
| 1515 |
+
'MOVE-TO-TO',
|
| 1516 |
+
'MPE',
|
| 1517 |
+
'MULTI-COMPILE',
|
| 1518 |
+
'MULTIPLE',
|
| 1519 |
+
'MULTIPLE-KEY',
|
| 1520 |
+
'MULTITASKING-INTERVAL',
|
| 1521 |
+
'MUST-EXIST',
|
| 1522 |
+
'NAME',
|
| 1523 |
+
'NAMESPACE-PREFIX',
|
| 1524 |
+
'NAMESPACE-URI',
|
| 1525 |
+
'NATIVE',
|
| 1526 |
+
'NE',
|
| 1527 |
+
'NEEDS-APPSERVER-PROMPT',
|
| 1528 |
+
'NEEDS-PROMPT',
|
| 1529 |
+
'NEW',
|
| 1530 |
+
'NEW-INSTANCE',
|
| 1531 |
+
'NEW-ROW',
|
| 1532 |
+
'NEXT',
|
| 1533 |
+
'NEXT-COLUMN',
|
| 1534 |
+
'NEXT-PROMPT',
|
| 1535 |
+
'NEXT-ROWID',
|
| 1536 |
+
'NEXT-SIBLING',
|
| 1537 |
+
'NEXT-TAB-ITEM',
|
| 1538 |
+
'NEXT-TAB-I',
|
| 1539 |
+
'NEXT-TAB-IT',
|
| 1540 |
+
'NEXT-TAB-ITE',
|
| 1541 |
+
'NEXT-VALUE',
|
| 1542 |
+
'NO',
|
| 1543 |
+
'NO-APPLY',
|
| 1544 |
+
'NO-ARRAY-MESSAGE',
|
| 1545 |
+
'NO-ASSIGN',
|
| 1546 |
+
'NO-ATTR-LIST',
|
| 1547 |
+
'NO-ATTR',
|
| 1548 |
+
'NO-ATTR-',
|
| 1549 |
+
'NO-ATTR-L',
|
| 1550 |
+
'NO-ATTR-LI',
|
| 1551 |
+
'NO-ATTR-LIS',
|
| 1552 |
+
'NO-ATTR-SPACE',
|
| 1553 |
+
'NO-ATTR-S',
|
| 1554 |
+
'NO-ATTR-SP',
|
| 1555 |
+
'NO-ATTR-SPA',
|
| 1556 |
+
'NO-ATTR-SPAC',
|
| 1557 |
+
'NO-AUTO-VALIDATE',
|
| 1558 |
+
'NO-BIND-WHERE',
|
| 1559 |
+
'NO-BOX',
|
| 1560 |
+
'NO-CONSOLE',
|
| 1561 |
+
'NO-CONVERT',
|
| 1562 |
+
'NO-CONVERT-3D-COLORS',
|
| 1563 |
+
'NO-CURRENT-VALUE',
|
| 1564 |
+
'NO-DEBUG',
|
| 1565 |
+
'NODE-VALUE-TO-MEMPTR',
|
| 1566 |
+
'NO-DRAG',
|
| 1567 |
+
'NO-ECHO',
|
| 1568 |
+
'NO-EMPTY-SPACE',
|
| 1569 |
+
'NO-ERROR',
|
| 1570 |
+
'NO-FILL',
|
| 1571 |
+
'NO-F',
|
| 1572 |
+
'NO-FI',
|
| 1573 |
+
'NO-FIL',
|
| 1574 |
+
'NO-FOCUS',
|
| 1575 |
+
'NO-HELP',
|
| 1576 |
+
'NO-HIDE',
|
| 1577 |
+
'NO-INDEX-HINT',
|
| 1578 |
+
'NO-INHERIT-BGCOLOR',
|
| 1579 |
+
'NO-INHERIT-BGC',
|
| 1580 |
+
'NO-INHERIT-BGCO',
|
| 1581 |
+
'NO-INHERIT-FGCOLOR',
|
| 1582 |
+
'NO-INHERIT-FGC',
|
| 1583 |
+
'NO-INHERIT-FGCO',
|
| 1584 |
+
'NO-INHERIT-FGCOL',
|
| 1585 |
+
'NO-INHERIT-FGCOLO',
|
| 1586 |
+
'NO-JOIN-BY-SQLDB',
|
| 1587 |
+
'NO-LABELS',
|
| 1588 |
+
'NO-LABE',
|
| 1589 |
+
'NO-LOBS',
|
| 1590 |
+
'NO-LOCK',
|
| 1591 |
+
'NO-LOOKAHEAD',
|
| 1592 |
+
'NO-MAP',
|
| 1593 |
+
'NO-MESSAGE',
|
| 1594 |
+
'NO-MES',
|
| 1595 |
+
'NO-MESS',
|
| 1596 |
+
'NO-MESSA',
|
| 1597 |
+
'NO-MESSAG',
|
| 1598 |
+
'NONAMESPACE-SCHEMA-LOCATION',
|
| 1599 |
+
'NONE',
|
| 1600 |
+
'NO-PAUSE',
|
| 1601 |
+
'NO-PREFETCH',
|
| 1602 |
+
'NO-PREFE',
|
| 1603 |
+
'NO-PREFET',
|
| 1604 |
+
'NO-PREFETC',
|
| 1605 |
+
'NORMALIZE',
|
| 1606 |
+
'NO-ROW-MARKERS',
|
| 1607 |
+
'NO-SCROLLBAR-VERTICAL',
|
| 1608 |
+
'NO-SEPARATE-CONNECTION',
|
| 1609 |
+
'NO-SEPARATORS',
|
| 1610 |
+
'NOT',
|
| 1611 |
+
'NO-TAB-STOP',
|
| 1612 |
+
'NOT-ACTIVE',
|
| 1613 |
+
'NO-UNDERLINE',
|
| 1614 |
+
'NO-UND',
|
| 1615 |
+
'NO-UNDE',
|
| 1616 |
+
'NO-UNDER',
|
| 1617 |
+
'NO-UNDERL',
|
| 1618 |
+
'NO-UNDERLI',
|
| 1619 |
+
'NO-UNDERLIN',
|
| 1620 |
+
'NO-UNDO',
|
| 1621 |
+
'NO-VALIDATE',
|
| 1622 |
+
'NO-VAL',
|
| 1623 |
+
'NO-VALI',
|
| 1624 |
+
'NO-VALID',
|
| 1625 |
+
'NO-VALIDA',
|
| 1626 |
+
'NO-VALIDAT',
|
| 1627 |
+
'NOW',
|
| 1628 |
+
'NO-WAIT',
|
| 1629 |
+
'NO-WORD-WRAP',
|
| 1630 |
+
'NULL',
|
| 1631 |
+
'NUM-ALIASES',
|
| 1632 |
+
'NUM-ALI',
|
| 1633 |
+
'NUM-ALIA',
|
| 1634 |
+
'NUM-ALIAS',
|
| 1635 |
+
'NUM-ALIASE',
|
| 1636 |
+
'NUM-BUFFERS',
|
| 1637 |
+
'NUM-BUTTONS',
|
| 1638 |
+
'NUM-BUT',
|
| 1639 |
+
'NUM-BUTT',
|
| 1640 |
+
'NUM-BUTTO',
|
| 1641 |
+
'NUM-BUTTON',
|
| 1642 |
+
'NUM-COLUMNS',
|
| 1643 |
+
'NUM-COL',
|
| 1644 |
+
'NUM-COLU',
|
| 1645 |
+
'NUM-COLUM',
|
| 1646 |
+
'NUM-COLUMN',
|
| 1647 |
+
'NUM-COPIES',
|
| 1648 |
+
'NUM-DBS',
|
| 1649 |
+
'NUM-DROPPED-FILES',
|
| 1650 |
+
'NUM-ENTRIES',
|
| 1651 |
+
'NUMERIC',
|
| 1652 |
+
'NUMERIC-FORMAT',
|
| 1653 |
+
'NUMERIC-F',
|
| 1654 |
+
'NUMERIC-FO',
|
| 1655 |
+
'NUMERIC-FOR',
|
| 1656 |
+
'NUMERIC-FORM',
|
| 1657 |
+
'NUMERIC-FORMA',
|
| 1658 |
+
'NUM-FIELDS',
|
| 1659 |
+
'NUM-FORMATS',
|
| 1660 |
+
'NUM-ITEMS',
|
| 1661 |
+
'NUM-ITERATIONS',
|
| 1662 |
+
'NUM-LINES',
|
| 1663 |
+
'NUM-LOCKED-COLUMNS',
|
| 1664 |
+
'NUM-LOCKED-COL',
|
| 1665 |
+
'NUM-LOCKED-COLU',
|
| 1666 |
+
'NUM-LOCKED-COLUM',
|
| 1667 |
+
'NUM-LOCKED-COLUMN',
|
| 1668 |
+
'NUM-MESSAGES',
|
| 1669 |
+
'NUM-PARAMETERS',
|
| 1670 |
+
'NUM-REFERENCES',
|
| 1671 |
+
'NUM-REPLACED',
|
| 1672 |
+
'NUM-RESULTS',
|
| 1673 |
+
'NUM-SELECTED-ROWS',
|
| 1674 |
+
'NUM-SELECTED-WIDGETS',
|
| 1675 |
+
'NUM-SELECTED',
|
| 1676 |
+
'NUM-SELECTED-',
|
| 1677 |
+
'NUM-SELECTED-W',
|
| 1678 |
+
'NUM-SELECTED-WI',
|
| 1679 |
+
'NUM-SELECTED-WID',
|
| 1680 |
+
'NUM-SELECTED-WIDG',
|
| 1681 |
+
'NUM-SELECTED-WIDGE',
|
| 1682 |
+
'NUM-SELECTED-WIDGET',
|
| 1683 |
+
'NUM-TABS',
|
| 1684 |
+
'NUM-TO-RETAIN',
|
| 1685 |
+
'NUM-VISIBLE-COLUMNS',
|
| 1686 |
+
'OCTET-LENGTH',
|
| 1687 |
+
'OF',
|
| 1688 |
+
'OFF',
|
| 1689 |
+
'OK',
|
| 1690 |
+
'OK-CANCEL',
|
| 1691 |
+
'OLD',
|
| 1692 |
+
'ON',
|
| 1693 |
+
'ON-FRAME-BORDER',
|
| 1694 |
+
'ON-FRAME',
|
| 1695 |
+
'ON-FRAME-',
|
| 1696 |
+
'ON-FRAME-B',
|
| 1697 |
+
'ON-FRAME-BO',
|
| 1698 |
+
'ON-FRAME-BOR',
|
| 1699 |
+
'ON-FRAME-BORD',
|
| 1700 |
+
'ON-FRAME-BORDE',
|
| 1701 |
+
'OPEN',
|
| 1702 |
+
'OPSYS',
|
| 1703 |
+
'OPTION',
|
| 1704 |
+
'OR',
|
| 1705 |
+
'ORDERED-JOIN',
|
| 1706 |
+
'ORDINAL',
|
| 1707 |
+
'OS-APPEND',
|
| 1708 |
+
'OS-COMMAND',
|
| 1709 |
+
'OS-COPY',
|
| 1710 |
+
'OS-CREATE-DIR',
|
| 1711 |
+
'OS-DELETE',
|
| 1712 |
+
'OS-DIR',
|
| 1713 |
+
'OS-DRIVES',
|
| 1714 |
+
'OS-DRIVE',
|
| 1715 |
+
'OS-ERROR',
|
| 1716 |
+
'OS-GETENV',
|
| 1717 |
+
'OS-RENAME',
|
| 1718 |
+
'OTHERWISE',
|
| 1719 |
+
'OUTPUT',
|
| 1720 |
+
'OVERLAY',
|
| 1721 |
+
'OVERRIDE',
|
| 1722 |
+
'OWNER',
|
| 1723 |
+
'PAGE',
|
| 1724 |
+
'PAGE-BOTTOM',
|
| 1725 |
+
'PAGE-BOT',
|
| 1726 |
+
'PAGE-BOTT',
|
| 1727 |
+
'PAGE-BOTTO',
|
| 1728 |
+
'PAGED',
|
| 1729 |
+
'PAGE-NUMBER',
|
| 1730 |
+
'PAGE-NUM',
|
| 1731 |
+
'PAGE-NUMB',
|
| 1732 |
+
'PAGE-NUMBE',
|
| 1733 |
+
'PAGE-SIZE',
|
| 1734 |
+
'PAGE-TOP',
|
| 1735 |
+
'PAGE-WIDTH',
|
| 1736 |
+
'PAGE-WID',
|
| 1737 |
+
'PAGE-WIDT',
|
| 1738 |
+
'PARAMETER',
|
| 1739 |
+
'PARAM',
|
| 1740 |
+
'PARAME',
|
| 1741 |
+
'PARAMET',
|
| 1742 |
+
'PARAMETE',
|
| 1743 |
+
'PARENT',
|
| 1744 |
+
'PARSE-STATUS',
|
| 1745 |
+
'PARTIAL-KEY',
|
| 1746 |
+
'PASCAL',
|
| 1747 |
+
'PASSWORD-FIELD',
|
| 1748 |
+
'PATHNAME',
|
| 1749 |
+
'PAUSE',
|
| 1750 |
+
'PBE-HASH-ALGORITHM',
|
| 1751 |
+
'PBE-HASH-ALG',
|
| 1752 |
+
'PBE-HASH-ALGO',
|
| 1753 |
+
'PBE-HASH-ALGOR',
|
| 1754 |
+
'PBE-HASH-ALGORI',
|
| 1755 |
+
'PBE-HASH-ALGORIT',
|
| 1756 |
+
'PBE-HASH-ALGORITH',
|
| 1757 |
+
'PBE-KEY-ROUNDS',
|
| 1758 |
+
'PDBNAME',
|
| 1759 |
+
'PERSISTENT',
|
| 1760 |
+
'PERSIST',
|
| 1761 |
+
'PERSISTE',
|
| 1762 |
+
'PERSISTEN',
|
| 1763 |
+
'PERSISTENT-CACHE-DISABLED',
|
| 1764 |
+
'PFCOLOR',
|
| 1765 |
+
'PFC',
|
| 1766 |
+
'PFCO',
|
| 1767 |
+
'PFCOL',
|
| 1768 |
+
'PFCOLO',
|
| 1769 |
+
'PIXELS',
|
| 1770 |
+
'PIXELS-PER-COLUMN',
|
| 1771 |
+
'PIXELS-PER-COL',
|
| 1772 |
+
'PIXELS-PER-COLU',
|
| 1773 |
+
'PIXELS-PER-COLUM',
|
| 1774 |
+
'PIXELS-PER-ROW',
|
| 1775 |
+
'POPUP-MENU',
|
| 1776 |
+
'POPUP-M',
|
| 1777 |
+
'POPUP-ME',
|
| 1778 |
+
'POPUP-MEN',
|
| 1779 |
+
'POPUP-ONLY',
|
| 1780 |
+
'POPUP-O',
|
| 1781 |
+
'POPUP-ON',
|
| 1782 |
+
'POPUP-ONL',
|
| 1783 |
+
'PORTRAIT',
|
| 1784 |
+
'POSITION',
|
| 1785 |
+
'PRECISION',
|
| 1786 |
+
'PREFER-DATASET',
|
| 1787 |
+
'PREPARED',
|
| 1788 |
+
'PREPARE-STRING',
|
| 1789 |
+
'PREPROCESS',
|
| 1790 |
+
'PREPROC',
|
| 1791 |
+
'PREPROCE',
|
| 1792 |
+
'PREPROCES',
|
| 1793 |
+
'PRESELECT',
|
| 1794 |
+
'PRESEL',
|
| 1795 |
+
'PRESELE',
|
| 1796 |
+
'PRESELEC',
|
| 1797 |
+
'PREV',
|
| 1798 |
+
'PREV-COLUMN',
|
| 1799 |
+
'PREV-SIBLING',
|
| 1800 |
+
'PREV-TAB-ITEM',
|
| 1801 |
+
'PREV-TAB-I',
|
| 1802 |
+
'PREV-TAB-IT',
|
| 1803 |
+
'PREV-TAB-ITE',
|
| 1804 |
+
'PRIMARY',
|
| 1805 |
+
'PRINTER',
|
| 1806 |
+
'PRINTER-CONTROL-HANDLE',
|
| 1807 |
+
'PRINTER-HDC',
|
| 1808 |
+
'PRINTER-NAME',
|
| 1809 |
+
'PRINTER-PORT',
|
| 1810 |
+
'PRINTER-SETUP',
|
| 1811 |
+
'PRIVATE',
|
| 1812 |
+
'PRIVATE-DATA',
|
| 1813 |
+
'PRIVATE-D',
|
| 1814 |
+
'PRIVATE-DA',
|
| 1815 |
+
'PRIVATE-DAT',
|
| 1816 |
+
'PRIVILEGES',
|
| 1817 |
+
'PROCEDURE',
|
| 1818 |
+
'PROCE',
|
| 1819 |
+
'PROCED',
|
| 1820 |
+
'PROCEDU',
|
| 1821 |
+
'PROCEDUR',
|
| 1822 |
+
'PROCEDURE-CALL-TYPE',
|
| 1823 |
+
'PROCESS',
|
| 1824 |
+
'PROC-HANDLE',
|
| 1825 |
+
'PROC-HA',
|
| 1826 |
+
'PROC-HAN',
|
| 1827 |
+
'PROC-HAND',
|
| 1828 |
+
'PROC-HANDL',
|
| 1829 |
+
'PROC-STATUS',
|
| 1830 |
+
'PROC-ST',
|
| 1831 |
+
'PROC-STA',
|
| 1832 |
+
'PROC-STAT',
|
| 1833 |
+
'PROC-STATU',
|
| 1834 |
+
'proc-text',
|
| 1835 |
+
'proc-text-buffe',
|
| 1836 |
+
'PROFILER',
|
| 1837 |
+
'PROGRAM-NAME',
|
| 1838 |
+
'PROGRESS',
|
| 1839 |
+
'PROGRESS-SOURCE',
|
| 1840 |
+
'PROGRESS-S',
|
| 1841 |
+
'PROGRESS-SO',
|
| 1842 |
+
'PROGRESS-SOU',
|
| 1843 |
+
'PROGRESS-SOUR',
|
| 1844 |
+
'PROGRESS-SOURC',
|
| 1845 |
+
'PROMPT',
|
| 1846 |
+
'PROMPT-FOR',
|
| 1847 |
+
'PROMPT-F',
|
| 1848 |
+
'PROMPT-FO',
|
| 1849 |
+
'PROMSGS',
|
| 1850 |
+
'PROPATH',
|
| 1851 |
+
'PROPERTY',
|
| 1852 |
+
'PROTECTED',
|
| 1853 |
+
'PROVERSION',
|
| 1854 |
+
'PROVERS',
|
| 1855 |
+
'PROVERSI',
|
| 1856 |
+
'PROVERSIO',
|
| 1857 |
+
'PROXY',
|
| 1858 |
+
'PROXY-PASSWORD',
|
| 1859 |
+
'PROXY-USERID',
|
| 1860 |
+
'PUBLIC',
|
| 1861 |
+
'PUBLIC-ID',
|
| 1862 |
+
'PUBLISH',
|
| 1863 |
+
'PUBLISHED-EVENTS',
|
| 1864 |
+
'PUT',
|
| 1865 |
+
'PUTBYTE',
|
| 1866 |
+
'PUT-BYTE',
|
| 1867 |
+
'PUT-DOUBLE',
|
| 1868 |
+
'PUT-FLOAT',
|
| 1869 |
+
'PUT-INT64',
|
| 1870 |
+
'PUT-KEY-VALUE',
|
| 1871 |
+
'PUT-KEY-VAL',
|
| 1872 |
+
'PUT-KEY-VALU',
|
| 1873 |
+
'PUT-LONG',
|
| 1874 |
+
'PUT-SHORT',
|
| 1875 |
+
'PUT-STRING',
|
| 1876 |
+
'PUT-UNSIGNED-LONG',
|
| 1877 |
+
'QUERY',
|
| 1878 |
+
'QUERY-CLOSE',
|
| 1879 |
+
'QUERY-OFF-END',
|
| 1880 |
+
'QUERY-OPEN',
|
| 1881 |
+
'QUERY-PREPARE',
|
| 1882 |
+
'QUERY-TUNING',
|
| 1883 |
+
'QUESTION',
|
| 1884 |
+
'QUIT',
|
| 1885 |
+
'QUOTER',
|
| 1886 |
+
'RADIO-BUTTONS',
|
| 1887 |
+
'RADIO-SET',
|
| 1888 |
+
'RANDOM',
|
| 1889 |
+
'RAW-TRANSFER',
|
| 1890 |
+
'RCODE-INFORMATION',
|
| 1891 |
+
'RCODE-INFO',
|
| 1892 |
+
'RCODE-INFOR',
|
| 1893 |
+
'RCODE-INFORM',
|
| 1894 |
+
'RCODE-INFORMA',
|
| 1895 |
+
'RCODE-INFORMAT',
|
| 1896 |
+
'RCODE-INFORMATI',
|
| 1897 |
+
'RCODE-INFORMATIO',
|
| 1898 |
+
'READ-AVAILABLE',
|
| 1899 |
+
'READ-EXACT-NUM',
|
| 1900 |
+
'READ-FILE',
|
| 1901 |
+
'READKEY',
|
| 1902 |
+
'READ-ONLY',
|
| 1903 |
+
'READ-XML',
|
| 1904 |
+
'READ-XMLSCHEMA',
|
| 1905 |
+
'REAL',
|
| 1906 |
+
'RECORD-LENGTH',
|
| 1907 |
+
'RECTANGLE',
|
| 1908 |
+
'RECT',
|
| 1909 |
+
'RECTA',
|
| 1910 |
+
'RECTAN',
|
| 1911 |
+
'RECTANG',
|
| 1912 |
+
'RECTANGL',
|
| 1913 |
+
'RECURSIVE',
|
| 1914 |
+
'REFERENCE-ONLY',
|
| 1915 |
+
'REFRESH',
|
| 1916 |
+
'REFRESHABLE',
|
| 1917 |
+
'REFRESH-AUDIT-POLICY',
|
| 1918 |
+
'REGISTER-DOMAIN',
|
| 1919 |
+
'RELEASE',
|
| 1920 |
+
'REMOTE',
|
| 1921 |
+
'REMOVE-EVENTS-PROCEDURE',
|
| 1922 |
+
'REMOVE-SUPER-PROCEDURE',
|
| 1923 |
+
'REPEAT',
|
| 1924 |
+
'REPLACE',
|
| 1925 |
+
'REPLACE-SELECTION-TEXT',
|
| 1926 |
+
'REPOSITION',
|
| 1927 |
+
'REPOSITION-BACKWARD',
|
| 1928 |
+
'REPOSITION-FORWARD',
|
| 1929 |
+
'REPOSITION-MODE',
|
| 1930 |
+
'REPOSITION-TO-ROW',
|
| 1931 |
+
'REPOSITION-TO-ROWID',
|
| 1932 |
+
'REQUEST',
|
| 1933 |
+
'RESET',
|
| 1934 |
+
'RESIZABLE',
|
| 1935 |
+
'RESIZA',
|
| 1936 |
+
'RESIZAB',
|
| 1937 |
+
'RESIZABL',
|
| 1938 |
+
'RESIZE',
|
| 1939 |
+
'RESTART-ROW',
|
| 1940 |
+
'RESTART-ROWID',
|
| 1941 |
+
'RETAIN',
|
| 1942 |
+
'RETAIN-SHAPE',
|
| 1943 |
+
'RETRY',
|
| 1944 |
+
'RETRY-CANCEL',
|
| 1945 |
+
'RETURN',
|
| 1946 |
+
'RETURN-INSERTED',
|
| 1947 |
+
'RETURN-INS',
|
| 1948 |
+
'RETURN-INSE',
|
| 1949 |
+
'RETURN-INSER',
|
| 1950 |
+
'RETURN-INSERT',
|
| 1951 |
+
'RETURN-INSERTE',
|
| 1952 |
+
'RETURNS',
|
| 1953 |
+
'RETURN-TO-START-DIR',
|
| 1954 |
+
'RETURN-TO-START-DI',
|
| 1955 |
+
'RETURN-VALUE',
|
| 1956 |
+
'RETURN-VAL',
|
| 1957 |
+
'RETURN-VALU',
|
| 1958 |
+
'RETURN-VALUE-DATA-TYPE',
|
| 1959 |
+
'REVERSE-FROM',
|
| 1960 |
+
'REVERT',
|
| 1961 |
+
'REVOKE',
|
| 1962 |
+
'RGB-VALUE',
|
| 1963 |
+
'RIGHT-ALIGNED',
|
| 1964 |
+
'RETURN-ALIGN',
|
| 1965 |
+
'RETURN-ALIGNE',
|
| 1966 |
+
'RIGHT-TRIM',
|
| 1967 |
+
'R-INDEX',
|
| 1968 |
+
'ROLES',
|
| 1969 |
+
'ROUND',
|
| 1970 |
+
'ROUTINE-LEVEL',
|
| 1971 |
+
'ROW',
|
| 1972 |
+
'ROW-HEIGHT-CHARS',
|
| 1973 |
+
'ROW-HEIGHT-PIXELS',
|
| 1974 |
+
'ROW-MARKERS',
|
| 1975 |
+
'ROW-OF',
|
| 1976 |
+
'ROW-RESIZABLE',
|
| 1977 |
+
'RULE',
|
| 1978 |
+
'RUN',
|
| 1979 |
+
'RUN-PROCEDURE',
|
| 1980 |
+
'SAVE',
|
| 1981 |
+
'SAVE-AS',
|
| 1982 |
+
'SAVE-FILE',
|
| 1983 |
+
'SAX-COMPLETE',
|
| 1984 |
+
'SAX-COMPLE',
|
| 1985 |
+
'SAX-COMPLET',
|
| 1986 |
+
'SAX-PARSE',
|
| 1987 |
+
'SAX-PARSE-FIRST',
|
| 1988 |
+
'SAX-PARSE-NEXT',
|
| 1989 |
+
'SAX-PARSER-ERROR',
|
| 1990 |
+
'SAX-RUNNING',
|
| 1991 |
+
'SAX-UNINITIALIZED',
|
| 1992 |
+
'SAX-WRITE-BEGIN',
|
| 1993 |
+
'SAX-WRITE-COMPLETE',
|
| 1994 |
+
'SAX-WRITE-CONTENT',
|
| 1995 |
+
'SAX-WRITE-ELEMENT',
|
| 1996 |
+
'SAX-WRITE-ERROR',
|
| 1997 |
+
'SAX-WRITE-IDLE',
|
| 1998 |
+
'SAX-WRITER',
|
| 1999 |
+
'SAX-WRITE-TAG',
|
| 2000 |
+
'SCHEMA',
|
| 2001 |
+
'SCHEMA-LOCATION',
|
| 2002 |
+
'SCHEMA-MARSHAL',
|
| 2003 |
+
'SCHEMA-PATH',
|
| 2004 |
+
'SCREEN',
|
| 2005 |
+
'SCREEN-IO',
|
| 2006 |
+
'SCREEN-LINES',
|
| 2007 |
+
'SCREEN-VALUE',
|
| 2008 |
+
'SCREEN-VAL',
|
| 2009 |
+
'SCREEN-VALU',
|
| 2010 |
+
'SCROLL',
|
| 2011 |
+
'SCROLLABLE',
|
| 2012 |
+
'SCROLLBAR-HORIZONTAL',
|
| 2013 |
+
'SCROLLBAR-H',
|
| 2014 |
+
'SCROLLBAR-HO',
|
| 2015 |
+
'SCROLLBAR-HOR',
|
| 2016 |
+
'SCROLLBAR-HORI',
|
| 2017 |
+
'SCROLLBAR-HORIZ',
|
| 2018 |
+
'SCROLLBAR-HORIZO',
|
| 2019 |
+
'SCROLLBAR-HORIZON',
|
| 2020 |
+
'SCROLLBAR-HORIZONT',
|
| 2021 |
+
'SCROLLBAR-HORIZONTA',
|
| 2022 |
+
'SCROLL-BARS',
|
| 2023 |
+
'SCROLLBAR-VERTICAL',
|
| 2024 |
+
'SCROLLBAR-V',
|
| 2025 |
+
'SCROLLBAR-VE',
|
| 2026 |
+
'SCROLLBAR-VER',
|
| 2027 |
+
'SCROLLBAR-VERT',
|
| 2028 |
+
'SCROLLBAR-VERTI',
|
| 2029 |
+
'SCROLLBAR-VERTIC',
|
| 2030 |
+
'SCROLLBAR-VERTICA',
|
| 2031 |
+
'SCROLL-DELTA',
|
| 2032 |
+
'SCROLLED-ROW-POSITION',
|
| 2033 |
+
'SCROLLED-ROW-POS',
|
| 2034 |
+
'SCROLLED-ROW-POSI',
|
| 2035 |
+
'SCROLLED-ROW-POSIT',
|
| 2036 |
+
'SCROLLED-ROW-POSITI',
|
| 2037 |
+
'SCROLLED-ROW-POSITIO',
|
| 2038 |
+
'SCROLLING',
|
| 2039 |
+
'SCROLL-OFFSET',
|
| 2040 |
+
'SCROLL-TO-CURRENT-ROW',
|
| 2041 |
+
'SCROLL-TO-ITEM',
|
| 2042 |
+
'SCROLL-TO-I',
|
| 2043 |
+
'SCROLL-TO-IT',
|
| 2044 |
+
'SCROLL-TO-ITE',
|
| 2045 |
+
'SCROLL-TO-SELECTED-ROW',
|
| 2046 |
+
'SDBNAME',
|
| 2047 |
+
'SEAL',
|
| 2048 |
+
'SEAL-TIMESTAMP',
|
| 2049 |
+
'SEARCH',
|
| 2050 |
+
'SEARCH-SELF',
|
| 2051 |
+
'SEARCH-TARGET',
|
| 2052 |
+
'SECTION',
|
| 2053 |
+
'SECURITY-POLICY',
|
| 2054 |
+
'SEEK',
|
| 2055 |
+
'SELECT',
|
| 2056 |
+
'SELECTABLE',
|
| 2057 |
+
'SELECT-ALL',
|
| 2058 |
+
'SELECTED',
|
| 2059 |
+
'SELECT-FOCUSED-ROW',
|
| 2060 |
+
'SELECTION',
|
| 2061 |
+
'SELECTION-END',
|
| 2062 |
+
'SELECTION-LIST',
|
| 2063 |
+
'SELECTION-START',
|
| 2064 |
+
'SELECTION-TEXT',
|
| 2065 |
+
'SELECT-NEXT-ROW',
|
| 2066 |
+
'SELECT-PREV-ROW',
|
| 2067 |
+
'SELECT-ROW',
|
| 2068 |
+
'SELF',
|
| 2069 |
+
'SEND',
|
| 2070 |
+
'send-sql-statement',
|
| 2071 |
+
'send-sql',
|
| 2072 |
+
'SENSITIVE',
|
| 2073 |
+
'SEPARATE-CONNECTION',
|
| 2074 |
+
'SEPARATOR-FGCOLOR',
|
| 2075 |
+
'SEPARATORS',
|
| 2076 |
+
'SERVER',
|
| 2077 |
+
'SERVER-CONNECTION-BOUND',
|
| 2078 |
+
'SERVER-CONNECTION-BOUND-REQUEST',
|
| 2079 |
+
'SERVER-CONNECTION-CONTEXT',
|
| 2080 |
+
'SERVER-CONNECTION-ID',
|
| 2081 |
+
'SERVER-OPERATING-MODE',
|
| 2082 |
+
'SESSION',
|
| 2083 |
+
'SESSION-ID',
|
| 2084 |
+
'SET',
|
| 2085 |
+
'SET-APPL-CONTEXT',
|
| 2086 |
+
'SET-ATTR-CALL-TYPE',
|
| 2087 |
+
'SET-ATTRIBUTE-NODE',
|
| 2088 |
+
'SET-BLUE-VALUE',
|
| 2089 |
+
'SET-BLUE',
|
| 2090 |
+
'SET-BLUE-',
|
| 2091 |
+
'SET-BLUE-V',
|
| 2092 |
+
'SET-BLUE-VA',
|
| 2093 |
+
'SET-BLUE-VAL',
|
| 2094 |
+
'SET-BLUE-VALU',
|
| 2095 |
+
'SET-BREAK',
|
| 2096 |
+
'SET-BUFFERS',
|
| 2097 |
+
'SET-CALLBACK',
|
| 2098 |
+
'SET-CLIENT',
|
| 2099 |
+
'SET-COMMIT',
|
| 2100 |
+
'SET-CONTENTS',
|
| 2101 |
+
'SET-CURRENT-VALUE',
|
| 2102 |
+
'SET-DB-CLIENT',
|
| 2103 |
+
'SET-DYNAMIC',
|
| 2104 |
+
'SET-EVENT-MANAGER-OPTION',
|
| 2105 |
+
'SET-GREEN-VALUE',
|
| 2106 |
+
'SET-GREEN',
|
| 2107 |
+
'SET-GREEN-',
|
| 2108 |
+
'SET-GREEN-V',
|
| 2109 |
+
'SET-GREEN-VA',
|
| 2110 |
+
'SET-GREEN-VAL',
|
| 2111 |
+
'SET-GREEN-VALU',
|
| 2112 |
+
'SET-INPUT-SOURCE',
|
| 2113 |
+
'SET-OPTION',
|
| 2114 |
+
'SET-OUTPUT-DESTINATION',
|
| 2115 |
+
'SET-PARAMETER',
|
| 2116 |
+
'SET-POINTER-VALUE',
|
| 2117 |
+
'SET-PROPERTY',
|
| 2118 |
+
'SET-RED-VALUE',
|
| 2119 |
+
'SET-RED',
|
| 2120 |
+
'SET-RED-',
|
| 2121 |
+
'SET-RED-V',
|
| 2122 |
+
'SET-RED-VA',
|
| 2123 |
+
'SET-RED-VAL',
|
| 2124 |
+
'SET-RED-VALU',
|
| 2125 |
+
'SET-REPOSITIONED-ROW',
|
| 2126 |
+
'SET-RGB-VALUE',
|
| 2127 |
+
'SET-ROLLBACK',
|
| 2128 |
+
'SET-SELECTION',
|
| 2129 |
+
'SET-SIZE',
|
| 2130 |
+
'SET-SORT-ARROW',
|
| 2131 |
+
'SETUSERID',
|
| 2132 |
+
'SETUSER',
|
| 2133 |
+
'SETUSERI',
|
| 2134 |
+
'SET-WAIT-STATE',
|
| 2135 |
+
'SHA1-DIGEST',
|
| 2136 |
+
'SHARED',
|
| 2137 |
+
'SHARE-LOCK',
|
| 2138 |
+
'SHARE',
|
| 2139 |
+
'SHARE-',
|
| 2140 |
+
'SHARE-L',
|
| 2141 |
+
'SHARE-LO',
|
| 2142 |
+
'SHARE-LOC',
|
| 2143 |
+
'SHOW-IN-TASKBAR',
|
| 2144 |
+
'SHOW-STATS',
|
| 2145 |
+
'SHOW-STAT',
|
| 2146 |
+
'SIDE-LABEL-HANDLE',
|
| 2147 |
+
'SIDE-LABEL-H',
|
| 2148 |
+
'SIDE-LABEL-HA',
|
| 2149 |
+
'SIDE-LABEL-HAN',
|
| 2150 |
+
'SIDE-LABEL-HAND',
|
| 2151 |
+
'SIDE-LABEL-HANDL',
|
| 2152 |
+
'SIDE-LABELS',
|
| 2153 |
+
'SIDE-LAB',
|
| 2154 |
+
'SIDE-LABE',
|
| 2155 |
+
'SIDE-LABEL',
|
| 2156 |
+
'SILENT',
|
| 2157 |
+
'SIMPLE',
|
| 2158 |
+
'SINGLE',
|
| 2159 |
+
'SIZE',
|
| 2160 |
+
'SIZE-CHARS',
|
| 2161 |
+
'SIZE-C',
|
| 2162 |
+
'SIZE-CH',
|
| 2163 |
+
'SIZE-CHA',
|
| 2164 |
+
'SIZE-CHAR',
|
| 2165 |
+
'SIZE-PIXELS',
|
| 2166 |
+
'SIZE-P',
|
| 2167 |
+
'SIZE-PI',
|
| 2168 |
+
'SIZE-PIX',
|
| 2169 |
+
'SIZE-PIXE',
|
| 2170 |
+
'SIZE-PIXEL',
|
| 2171 |
+
'SKIP',
|
| 2172 |
+
'SKIP-DELETED-RECORD',
|
| 2173 |
+
'SLIDER',
|
| 2174 |
+
'SMALL-ICON',
|
| 2175 |
+
'SMALLINT',
|
| 2176 |
+
'SMALL-TITLE',
|
| 2177 |
+
'SOME',
|
| 2178 |
+
'SORT',
|
| 2179 |
+
'SORT-ASCENDING',
|
| 2180 |
+
'SORT-NUMBER',
|
| 2181 |
+
'SOURCE',
|
| 2182 |
+
'SOURCE-PROCEDURE',
|
| 2183 |
+
'SPACE',
|
| 2184 |
+
'SQL',
|
| 2185 |
+
'SQRT',
|
| 2186 |
+
'SSL-SERVER-NAME',
|
| 2187 |
+
'STANDALONE',
|
| 2188 |
+
'START',
|
| 2189 |
+
'START-DOCUMENT',
|
| 2190 |
+
'START-ELEMENT',
|
| 2191 |
+
'START-MOVE',
|
| 2192 |
+
'START-RESIZE',
|
| 2193 |
+
'START-ROW-RESIZE',
|
| 2194 |
+
'STATE-DETAIL',
|
| 2195 |
+
'STATIC',
|
| 2196 |
+
'STATUS',
|
| 2197 |
+
'STATUS-AREA',
|
| 2198 |
+
'STATUS-AREA-FONT',
|
| 2199 |
+
'STDCALL',
|
| 2200 |
+
'STOP',
|
| 2201 |
+
'STOP-PARSING',
|
| 2202 |
+
'STOPPED',
|
| 2203 |
+
'STOPPE',
|
| 2204 |
+
'STORED-PROCEDURE',
|
| 2205 |
+
'STORED-PROC',
|
| 2206 |
+
'STORED-PROCE',
|
| 2207 |
+
'STORED-PROCED',
|
| 2208 |
+
'STORED-PROCEDU',
|
| 2209 |
+
'STORED-PROCEDUR',
|
| 2210 |
+
'STREAM',
|
| 2211 |
+
'STREAM-HANDLE',
|
| 2212 |
+
'STREAM-IO',
|
| 2213 |
+
'STRETCH-TO-FIT',
|
| 2214 |
+
'STRICT',
|
| 2215 |
+
'STRING',
|
| 2216 |
+
'STRING-VALUE',
|
| 2217 |
+
'STRING-XREF',
|
| 2218 |
+
'SUB-AVERAGE',
|
| 2219 |
+
'SUB-AVE',
|
| 2220 |
+
'SUB-AVER',
|
| 2221 |
+
'SUB-AVERA',
|
| 2222 |
+
'SUB-AVERAG',
|
| 2223 |
+
'SUB-COUNT',
|
| 2224 |
+
'SUB-MAXIMUM',
|
| 2225 |
+
'SUM-MAX',
|
| 2226 |
+
'SUM-MAXI',
|
| 2227 |
+
'SUM-MAXIM',
|
| 2228 |
+
'SUM-MAXIMU',
|
| 2229 |
+
'SUB-MENU',
|
| 2230 |
+
'SUBSUB-',
|
| 2231 |
+
'SUB-MIN',
|
| 2232 |
+
'SUBSCRIBE',
|
| 2233 |
+
'SUBSTITUTE',
|
| 2234 |
+
'SUBST',
|
| 2235 |
+
'SUBSTI',
|
| 2236 |
+
'SUBSTIT',
|
| 2237 |
+
'SUBSTITU',
|
| 2238 |
+
'SUBSTITUT',
|
| 2239 |
+
'SUBSTRING',
|
| 2240 |
+
'SUBSTR',
|
| 2241 |
+
'SUBSTRI',
|
| 2242 |
+
'SUBSTRIN',
|
| 2243 |
+
'SUB-TOTAL',
|
| 2244 |
+
'SUBTYPE',
|
| 2245 |
+
'SUM',
|
| 2246 |
+
'SUPER',
|
| 2247 |
+
'SUPER-PROCEDURES',
|
| 2248 |
+
'SUPPRESS-NAMESPACE-PROCESSING',
|
| 2249 |
+
'SUPPRESS-WARNINGS',
|
| 2250 |
+
'SUPPRESS-W',
|
| 2251 |
+
'SUPPRESS-WA',
|
| 2252 |
+
'SUPPRESS-WAR',
|
| 2253 |
+
'SUPPRESS-WARN',
|
| 2254 |
+
'SUPPRESS-WARNI',
|
| 2255 |
+
'SUPPRESS-WARNIN',
|
| 2256 |
+
'SUPPRESS-WARNING',
|
| 2257 |
+
'SYMMETRIC-ENCRYPTION-ALGORITHM',
|
| 2258 |
+
'SYMMETRIC-ENCRYPTION-IV',
|
| 2259 |
+
'SYMMETRIC-ENCRYPTION-KEY',
|
| 2260 |
+
'SYMMETRIC-SUPPORT',
|
| 2261 |
+
'SYSTEM-ALERT-BOXES',
|
| 2262 |
+
'SYSTEM-ALERT',
|
| 2263 |
+
'SYSTEM-ALERT-',
|
| 2264 |
+
'SYSTEM-ALERT-B',
|
| 2265 |
+
'SYSTEM-ALERT-BO',
|
| 2266 |
+
'SYSTEM-ALERT-BOX',
|
| 2267 |
+
'SYSTEM-ALERT-BOXE',
|
| 2268 |
+
'SYSTEM-DIALOG',
|
| 2269 |
+
'SYSTEM-HELP',
|
| 2270 |
+
'SYSTEM-ID',
|
| 2271 |
+
'TABLE',
|
| 2272 |
+
'TABLE-HANDLE',
|
| 2273 |
+
'TABLE-NUMBER',
|
| 2274 |
+
'TAB-POSITION',
|
| 2275 |
+
'TAB-STOP',
|
| 2276 |
+
'TARGET',
|
| 2277 |
+
'TARGET-PROCEDURE',
|
| 2278 |
+
'TEMP-DIRECTORY',
|
| 2279 |
+
'TEMP-DIR',
|
| 2280 |
+
'TEMP-DIRE',
|
| 2281 |
+
'TEMP-DIREC',
|
| 2282 |
+
'TEMP-DIRECT',
|
| 2283 |
+
'TEMP-DIRECTO',
|
| 2284 |
+
'TEMP-DIRECTOR',
|
| 2285 |
+
'TEMP-TABLE',
|
| 2286 |
+
'TEMP-TABLE-PREPARE',
|
| 2287 |
+
'TERM',
|
| 2288 |
+
'TERMINAL',
|
| 2289 |
+
'TERMI',
|
| 2290 |
+
'TERMIN',
|
| 2291 |
+
'TERMINA',
|
| 2292 |
+
'TERMINATE',
|
| 2293 |
+
'TEXT',
|
| 2294 |
+
'TEXT-CURSOR',
|
| 2295 |
+
'TEXT-SEG-GROW',
|
| 2296 |
+
'TEXT-SELECTED',
|
| 2297 |
+
'THEN',
|
| 2298 |
+
'THIS-OBJECT',
|
| 2299 |
+
'THIS-PROCEDURE',
|
| 2300 |
+
'THREE-D',
|
| 2301 |
+
'THROW',
|
| 2302 |
+
'THROUGH',
|
| 2303 |
+
'THRU',
|
| 2304 |
+
'TIC-MARKS',
|
| 2305 |
+
'TIME',
|
| 2306 |
+
'TIME-SOURCE',
|
| 2307 |
+
'TITLE',
|
| 2308 |
+
'TITLE-BGCOLOR',
|
| 2309 |
+
'TITLE-BGC',
|
| 2310 |
+
'TITLE-BGCO',
|
| 2311 |
+
'TITLE-BGCOL',
|
| 2312 |
+
'TITLE-BGCOLO',
|
| 2313 |
+
'TITLE-DCOLOR',
|
| 2314 |
+
'TITLE-DC',
|
| 2315 |
+
'TITLE-DCO',
|
| 2316 |
+
'TITLE-DCOL',
|
| 2317 |
+
'TITLE-DCOLO',
|
| 2318 |
+
'TITLE-FGCOLOR',
|
| 2319 |
+
'TITLE-FGC',
|
| 2320 |
+
'TITLE-FGCO',
|
| 2321 |
+
'TITLE-FGCOL',
|
| 2322 |
+
'TITLE-FGCOLO',
|
| 2323 |
+
'TITLE-FONT',
|
| 2324 |
+
'TITLE-FO',
|
| 2325 |
+
'TITLE-FON',
|
| 2326 |
+
'TO',
|
| 2327 |
+
'TODAY',
|
| 2328 |
+
'TOGGLE-BOX',
|
| 2329 |
+
'TOOLTIP',
|
| 2330 |
+
'TOOLTIPS',
|
| 2331 |
+
'TOPIC',
|
| 2332 |
+
'TOP-NAV-QUERY',
|
| 2333 |
+
'TOP-ONLY',
|
| 2334 |
+
'TO-ROWID',
|
| 2335 |
+
'TOTAL',
|
| 2336 |
+
'TRAILING',
|
| 2337 |
+
'TRANS',
|
| 2338 |
+
'TRANSACTION',
|
| 2339 |
+
'TRANSACTION-MODE',
|
| 2340 |
+
'TRANS-INIT-PROCEDURE',
|
| 2341 |
+
'TRANSPARENT',
|
| 2342 |
+
'TRIGGER',
|
| 2343 |
+
'TRIGGERS',
|
| 2344 |
+
'TRIM',
|
| 2345 |
+
'TRUE',
|
| 2346 |
+
'TRUNCATE',
|
| 2347 |
+
'TRUNC',
|
| 2348 |
+
'TRUNCA',
|
| 2349 |
+
'TRUNCAT',
|
| 2350 |
+
'TYPE',
|
| 2351 |
+
'TYPE-OF',
|
| 2352 |
+
'UNBOX',
|
| 2353 |
+
'UNBUFFERED',
|
| 2354 |
+
'UNBUFF',
|
| 2355 |
+
'UNBUFFE',
|
| 2356 |
+
'UNBUFFER',
|
| 2357 |
+
'UNBUFFERE',
|
| 2358 |
+
'UNDERLINE',
|
| 2359 |
+
'UNDERL',
|
| 2360 |
+
'UNDERLI',
|
| 2361 |
+
'UNDERLIN',
|
| 2362 |
+
'UNDO',
|
| 2363 |
+
'UNFORMATTED',
|
| 2364 |
+
'UNFORM',
|
| 2365 |
+
'UNFORMA',
|
| 2366 |
+
'UNFORMAT',
|
| 2367 |
+
'UNFORMATT',
|
| 2368 |
+
'UNFORMATTE',
|
| 2369 |
+
'UNION',
|
| 2370 |
+
'UNIQUE',
|
| 2371 |
+
'UNIQUE-ID',
|
| 2372 |
+
'UNIQUE-MATCH',
|
| 2373 |
+
'UNIX',
|
| 2374 |
+
'UNLESS-HIDDEN',
|
| 2375 |
+
'UNLOAD',
|
| 2376 |
+
'UNSIGNED-LONG',
|
| 2377 |
+
'UNSUBSCRIBE',
|
| 2378 |
+
'UP',
|
| 2379 |
+
'UPDATE',
|
| 2380 |
+
'UPDATE-ATTRIBUTE',
|
| 2381 |
+
'URL',
|
| 2382 |
+
'URL-DECODE',
|
| 2383 |
+
'URL-ENCODE',
|
| 2384 |
+
'URL-PASSWORD',
|
| 2385 |
+
'URL-USERID',
|
| 2386 |
+
'USE',
|
| 2387 |
+
'USE-DICT-EXPS',
|
| 2388 |
+
'USE-FILENAME',
|
| 2389 |
+
'USE-INDEX',
|
| 2390 |
+
'USER',
|
| 2391 |
+
'USE-REVVIDEO',
|
| 2392 |
+
'USERID',
|
| 2393 |
+
'USER-ID',
|
| 2394 |
+
'USE-TEXT',
|
| 2395 |
+
'USE-UNDERLINE',
|
| 2396 |
+
'USE-WIDGET-POOL',
|
| 2397 |
+
'USING',
|
| 2398 |
+
'V6DISPLAY',
|
| 2399 |
+
'V6FRAME',
|
| 2400 |
+
'VALIDATE',
|
| 2401 |
+
'VALIDATE-EXPRESSION',
|
| 2402 |
+
'VALIDATE-MESSAGE',
|
| 2403 |
+
'VALIDATE-SEAL',
|
| 2404 |
+
'VALIDATION-ENABLED',
|
| 2405 |
+
'VALID-EVENT',
|
| 2406 |
+
'VALID-HANDLE',
|
| 2407 |
+
'VALID-OBJECT',
|
| 2408 |
+
'VALUE',
|
| 2409 |
+
'VALUE-CHANGED',
|
| 2410 |
+
'VALUES',
|
| 2411 |
+
'VARIABLE',
|
| 2412 |
+
'VAR',
|
| 2413 |
+
'VARI',
|
| 2414 |
+
'VARIA',
|
| 2415 |
+
'VARIAB',
|
| 2416 |
+
'VARIABL',
|
| 2417 |
+
'VERBOSE',
|
| 2418 |
+
'VERSION',
|
| 2419 |
+
'VERTICAL',
|
| 2420 |
+
'VERT',
|
| 2421 |
+
'VERTI',
|
| 2422 |
+
'VERTIC',
|
| 2423 |
+
'VERTICA',
|
| 2424 |
+
'VIEW',
|
| 2425 |
+
'VIEW-AS',
|
| 2426 |
+
'VIEW-FIRST-COLUMN-ON-REOPEN',
|
| 2427 |
+
'VIRTUAL-HEIGHT-CHARS',
|
| 2428 |
+
'VIRTUAL-HEIGHT',
|
| 2429 |
+
'VIRTUAL-HEIGHT-',
|
| 2430 |
+
'VIRTUAL-HEIGHT-C',
|
| 2431 |
+
'VIRTUAL-HEIGHT-CH',
|
| 2432 |
+
'VIRTUAL-HEIGHT-CHA',
|
| 2433 |
+
'VIRTUAL-HEIGHT-CHAR',
|
| 2434 |
+
'VIRTUAL-HEIGHT-PIXELS',
|
| 2435 |
+
'VIRTUAL-HEIGHT-P',
|
| 2436 |
+
'VIRTUAL-HEIGHT-PI',
|
| 2437 |
+
'VIRTUAL-HEIGHT-PIX',
|
| 2438 |
+
'VIRTUAL-HEIGHT-PIXE',
|
| 2439 |
+
'VIRTUAL-HEIGHT-PIXEL',
|
| 2440 |
+
'VIRTUAL-WIDTH-CHARS',
|
| 2441 |
+
'VIRTUAL-WIDTH',
|
| 2442 |
+
'VIRTUAL-WIDTH-',
|
| 2443 |
+
'VIRTUAL-WIDTH-C',
|
| 2444 |
+
'VIRTUAL-WIDTH-CH',
|
| 2445 |
+
'VIRTUAL-WIDTH-CHA',
|
| 2446 |
+
'VIRTUAL-WIDTH-CHAR',
|
| 2447 |
+
'VIRTUAL-WIDTH-PIXELS',
|
| 2448 |
+
'VIRTUAL-WIDTH-P',
|
| 2449 |
+
'VIRTUAL-WIDTH-PI',
|
| 2450 |
+
'VIRTUAL-WIDTH-PIX',
|
| 2451 |
+
'VIRTUAL-WIDTH-PIXE',
|
| 2452 |
+
'VIRTUAL-WIDTH-PIXEL',
|
| 2453 |
+
'VISIBLE',
|
| 2454 |
+
'VOID',
|
| 2455 |
+
'WAIT',
|
| 2456 |
+
'WAIT-FOR',
|
| 2457 |
+
'WARNING',
|
| 2458 |
+
'WEB-CONTEXT',
|
| 2459 |
+
'WEEKDAY',
|
| 2460 |
+
'WHEN',
|
| 2461 |
+
'WHERE',
|
| 2462 |
+
'WHILE',
|
| 2463 |
+
'WIDGET',
|
| 2464 |
+
'WIDGET-ENTER',
|
| 2465 |
+
'WIDGET-E',
|
| 2466 |
+
'WIDGET-EN',
|
| 2467 |
+
'WIDGET-ENT',
|
| 2468 |
+
'WIDGET-ENTE',
|
| 2469 |
+
'WIDGET-ID',
|
| 2470 |
+
'WIDGET-LEAVE',
|
| 2471 |
+
'WIDGET-L',
|
| 2472 |
+
'WIDGET-LE',
|
| 2473 |
+
'WIDGET-LEA',
|
| 2474 |
+
'WIDGET-LEAV',
|
| 2475 |
+
'WIDGET-POOL',
|
| 2476 |
+
'WIDTH-CHARS',
|
| 2477 |
+
'WIDTH',
|
| 2478 |
+
'WIDTH-',
|
| 2479 |
+
'WIDTH-C',
|
| 2480 |
+
'WIDTH-CH',
|
| 2481 |
+
'WIDTH-CHA',
|
| 2482 |
+
'WIDTH-CHAR',
|
| 2483 |
+
'WIDTH-PIXELS',
|
| 2484 |
+
'WIDTH-P',
|
| 2485 |
+
'WIDTH-PI',
|
| 2486 |
+
'WIDTH-PIX',
|
| 2487 |
+
'WIDTH-PIXE',
|
| 2488 |
+
'WIDTH-PIXEL',
|
| 2489 |
+
'WINDOW',
|
| 2490 |
+
'WINDOW-MAXIMIZED',
|
| 2491 |
+
'WINDOW-MAXIM',
|
| 2492 |
+
'WINDOW-MAXIMI',
|
| 2493 |
+
'WINDOW-MAXIMIZ',
|
| 2494 |
+
'WINDOW-MAXIMIZE',
|
| 2495 |
+
'WINDOW-MINIMIZED',
|
| 2496 |
+
'WINDOW-MINIM',
|
| 2497 |
+
'WINDOW-MINIMI',
|
| 2498 |
+
'WINDOW-MINIMIZ',
|
| 2499 |
+
'WINDOW-MINIMIZE',
|
| 2500 |
+
'WINDOW-NAME',
|
| 2501 |
+
'WINDOW-NORMAL',
|
| 2502 |
+
'WINDOW-STATE',
|
| 2503 |
+
'WINDOW-STA',
|
| 2504 |
+
'WINDOW-STAT',
|
| 2505 |
+
'WINDOW-SYSTEM',
|
| 2506 |
+
'WITH',
|
| 2507 |
+
'WORD-INDEX',
|
| 2508 |
+
'WORD-WRAP',
|
| 2509 |
+
'WORK-AREA-HEIGHT-PIXELS',
|
| 2510 |
+
'WORK-AREA-WIDTH-PIXELS',
|
| 2511 |
+
'WORK-AREA-X',
|
| 2512 |
+
'WORK-AREA-Y',
|
| 2513 |
+
'WORKFILE',
|
| 2514 |
+
'WORK-TABLE',
|
| 2515 |
+
'WORK-TAB',
|
| 2516 |
+
'WORK-TABL',
|
| 2517 |
+
'WRITE',
|
| 2518 |
+
'WRITE-CDATA',
|
| 2519 |
+
'WRITE-CHARACTERS',
|
| 2520 |
+
'WRITE-COMMENT',
|
| 2521 |
+
'WRITE-DATA-ELEMENT',
|
| 2522 |
+
'WRITE-EMPTY-ELEMENT',
|
| 2523 |
+
'WRITE-ENTITY-REF',
|
| 2524 |
+
'WRITE-EXTERNAL-DTD',
|
| 2525 |
+
'WRITE-FRAGMENT',
|
| 2526 |
+
'WRITE-MESSAGE',
|
| 2527 |
+
'WRITE-PROCESSING-INSTRUCTION',
|
| 2528 |
+
'WRITE-STATUS',
|
| 2529 |
+
'WRITE-XML',
|
| 2530 |
+
'WRITE-XMLSCHEMA',
|
| 2531 |
+
'X',
|
| 2532 |
+
'XCODE',
|
| 2533 |
+
'XML-DATA-TYPE',
|
| 2534 |
+
'XML-NODE-TYPE',
|
| 2535 |
+
'XML-SCHEMA-PATH',
|
| 2536 |
+
'XML-SUPPRESS-NAMESPACE-PROCESSING',
|
| 2537 |
+
'X-OF',
|
| 2538 |
+
'XREF',
|
| 2539 |
+
'XREF-XML',
|
| 2540 |
+
'Y',
|
| 2541 |
+
'YEAR',
|
| 2542 |
+
'YEAR-OFFSET',
|
| 2543 |
+
'YES',
|
| 2544 |
+
'YES-NO',
|
| 2545 |
+
'YES-NO-CANCEL',
|
| 2546 |
+
'Y-OF'
|
| 2547 |
+
)
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/_sourcemod_builtins.py
ADDED
|
@@ -0,0 +1,1163 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers._sourcemod_builtins
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
This file contains the names of SourceMod functions.
|
| 7 |
+
It is able to re-generate itself.
|
| 8 |
+
|
| 9 |
+
Do not edit the FUNCTIONS list by hand.
|
| 10 |
+
|
| 11 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 12 |
+
:license: BSD, see LICENSE for details.
|
| 13 |
+
"""
|
| 14 |
+
|
| 15 |
+
from __future__ import print_function
|
| 16 |
+
|
| 17 |
+
FUNCTIONS = (
|
| 18 |
+
'OnEntityCreated',
|
| 19 |
+
'OnEntityDestroyed',
|
| 20 |
+
'OnGetGameDescription',
|
| 21 |
+
'OnLevelInit',
|
| 22 |
+
'SDKHook',
|
| 23 |
+
'SDKHookEx',
|
| 24 |
+
'SDKUnhook',
|
| 25 |
+
'SDKHooks_TakeDamage',
|
| 26 |
+
'SDKHooks_DropWeapon',
|
| 27 |
+
'TopMenuHandler',
|
| 28 |
+
'CreateTopMenu',
|
| 29 |
+
'LoadTopMenuConfig',
|
| 30 |
+
'AddToTopMenu',
|
| 31 |
+
'GetTopMenuInfoString',
|
| 32 |
+
'GetTopMenuObjName',
|
| 33 |
+
'RemoveFromTopMenu',
|
| 34 |
+
'DisplayTopMenu',
|
| 35 |
+
'DisplayTopMenuCategory',
|
| 36 |
+
'FindTopMenuCategory',
|
| 37 |
+
'SetTopMenuTitleCaching',
|
| 38 |
+
'OnAdminMenuCreated',
|
| 39 |
+
'OnAdminMenuReady',
|
| 40 |
+
'GetAdminTopMenu',
|
| 41 |
+
'AddTargetsToMenu',
|
| 42 |
+
'AddTargetsToMenu2',
|
| 43 |
+
'RedisplayAdminMenu',
|
| 44 |
+
'TEHook',
|
| 45 |
+
'AddTempEntHook',
|
| 46 |
+
'RemoveTempEntHook',
|
| 47 |
+
'TE_Start',
|
| 48 |
+
'TE_IsValidProp',
|
| 49 |
+
'TE_WriteNum',
|
| 50 |
+
'TE_ReadNum',
|
| 51 |
+
'TE_WriteFloat',
|
| 52 |
+
'TE_ReadFloat',
|
| 53 |
+
'TE_WriteVector',
|
| 54 |
+
'TE_ReadVector',
|
| 55 |
+
'TE_WriteAngles',
|
| 56 |
+
'TE_WriteFloatArray',
|
| 57 |
+
'TE_Send',
|
| 58 |
+
'TE_WriteEncodedEnt',
|
| 59 |
+
'TE_SendToAll',
|
| 60 |
+
'TE_SendToClient',
|
| 61 |
+
'CreateKeyValues',
|
| 62 |
+
'KvSetString',
|
| 63 |
+
'KvSetNum',
|
| 64 |
+
'KvSetUInt64',
|
| 65 |
+
'KvSetFloat',
|
| 66 |
+
'KvSetColor',
|
| 67 |
+
'KvSetVector',
|
| 68 |
+
'KvGetString',
|
| 69 |
+
'KvGetNum',
|
| 70 |
+
'KvGetFloat',
|
| 71 |
+
'KvGetColor',
|
| 72 |
+
'KvGetUInt64',
|
| 73 |
+
'KvGetVector',
|
| 74 |
+
'KvJumpToKey',
|
| 75 |
+
'KvJumpToKeySymbol',
|
| 76 |
+
'KvGotoFirstSubKey',
|
| 77 |
+
'KvGotoNextKey',
|
| 78 |
+
'KvSavePosition',
|
| 79 |
+
'KvDeleteKey',
|
| 80 |
+
'KvDeleteThis',
|
| 81 |
+
'KvGoBack',
|
| 82 |
+
'KvRewind',
|
| 83 |
+
'KvGetSectionName',
|
| 84 |
+
'KvSetSectionName',
|
| 85 |
+
'KvGetDataType',
|
| 86 |
+
'KeyValuesToFile',
|
| 87 |
+
'FileToKeyValues',
|
| 88 |
+
'StringToKeyValues',
|
| 89 |
+
'KvSetEscapeSequences',
|
| 90 |
+
'KvNodesInStack',
|
| 91 |
+
'KvCopySubkeys',
|
| 92 |
+
'KvFindKeyById',
|
| 93 |
+
'KvGetNameSymbol',
|
| 94 |
+
'KvGetSectionSymbol',
|
| 95 |
+
'TE_SetupSparks',
|
| 96 |
+
'TE_SetupSmoke',
|
| 97 |
+
'TE_SetupDust',
|
| 98 |
+
'TE_SetupMuzzleFlash',
|
| 99 |
+
'TE_SetupMetalSparks',
|
| 100 |
+
'TE_SetupEnergySplash',
|
| 101 |
+
'TE_SetupArmorRicochet',
|
| 102 |
+
'TE_SetupGlowSprite',
|
| 103 |
+
'TE_SetupExplosion',
|
| 104 |
+
'TE_SetupBloodSprite',
|
| 105 |
+
'TE_SetupBeamRingPoint',
|
| 106 |
+
'TE_SetupBeamPoints',
|
| 107 |
+
'TE_SetupBeamLaser',
|
| 108 |
+
'TE_SetupBeamRing',
|
| 109 |
+
'TE_SetupBeamFollow',
|
| 110 |
+
'HookEvent',
|
| 111 |
+
'HookEventEx',
|
| 112 |
+
'UnhookEvent',
|
| 113 |
+
'CreateEvent',
|
| 114 |
+
'FireEvent',
|
| 115 |
+
'CancelCreatedEvent',
|
| 116 |
+
'GetEventBool',
|
| 117 |
+
'SetEventBool',
|
| 118 |
+
'GetEventInt',
|
| 119 |
+
'SetEventInt',
|
| 120 |
+
'GetEventFloat',
|
| 121 |
+
'SetEventFloat',
|
| 122 |
+
'GetEventString',
|
| 123 |
+
'SetEventString',
|
| 124 |
+
'GetEventName',
|
| 125 |
+
'SetEventBroadcast',
|
| 126 |
+
'GetUserMessageType',
|
| 127 |
+
'GetUserMessageId',
|
| 128 |
+
'GetUserMessageName',
|
| 129 |
+
'StartMessage',
|
| 130 |
+
'StartMessageEx',
|
| 131 |
+
'EndMessage',
|
| 132 |
+
'MsgHook',
|
| 133 |
+
'MsgPostHook',
|
| 134 |
+
'HookUserMessage',
|
| 135 |
+
'UnhookUserMessage',
|
| 136 |
+
'StartMessageAll',
|
| 137 |
+
'StartMessageOne',
|
| 138 |
+
'InactivateClient',
|
| 139 |
+
'ReconnectClient',
|
| 140 |
+
'GetMaxEntities',
|
| 141 |
+
'GetEntityCount',
|
| 142 |
+
'IsValidEntity',
|
| 143 |
+
'IsValidEdict',
|
| 144 |
+
'IsEntNetworkable',
|
| 145 |
+
'CreateEdict',
|
| 146 |
+
'RemoveEdict',
|
| 147 |
+
'GetEdictFlags',
|
| 148 |
+
'SetEdictFlags',
|
| 149 |
+
'GetEdictClassname',
|
| 150 |
+
'GetEntityNetClass',
|
| 151 |
+
'ChangeEdictState',
|
| 152 |
+
'GetEntData',
|
| 153 |
+
'SetEntData',
|
| 154 |
+
'GetEntDataFloat',
|
| 155 |
+
'SetEntDataFloat',
|
| 156 |
+
'GetEntDataEnt2',
|
| 157 |
+
'SetEntDataEnt2',
|
| 158 |
+
'GetEntDataVector',
|
| 159 |
+
'SetEntDataVector',
|
| 160 |
+
'GetEntDataString',
|
| 161 |
+
'SetEntDataString',
|
| 162 |
+
'FindSendPropOffs',
|
| 163 |
+
'FindSendPropInfo',
|
| 164 |
+
'FindDataMapOffs',
|
| 165 |
+
'FindDataMapInfo',
|
| 166 |
+
'GetEntSendPropOffs',
|
| 167 |
+
'GetEntProp',
|
| 168 |
+
'SetEntProp',
|
| 169 |
+
'GetEntPropFloat',
|
| 170 |
+
'SetEntPropFloat',
|
| 171 |
+
'GetEntPropEnt',
|
| 172 |
+
'SetEntPropEnt',
|
| 173 |
+
'GetEntPropVector',
|
| 174 |
+
'SetEntPropVector',
|
| 175 |
+
'GetEntPropString',
|
| 176 |
+
'SetEntPropString',
|
| 177 |
+
'GetEntPropArraySize',
|
| 178 |
+
'GetEntDataArray',
|
| 179 |
+
'SetEntDataArray',
|
| 180 |
+
'GetEntityAddress',
|
| 181 |
+
'GetEntityClassname',
|
| 182 |
+
'float',
|
| 183 |
+
'FloatMul',
|
| 184 |
+
'FloatDiv',
|
| 185 |
+
'FloatAdd',
|
| 186 |
+
'FloatSub',
|
| 187 |
+
'FloatFraction',
|
| 188 |
+
'RoundToZero',
|
| 189 |
+
'RoundToCeil',
|
| 190 |
+
'RoundToFloor',
|
| 191 |
+
'RoundToNearest',
|
| 192 |
+
'FloatCompare',
|
| 193 |
+
'SquareRoot',
|
| 194 |
+
'Pow',
|
| 195 |
+
'Exponential',
|
| 196 |
+
'Logarithm',
|
| 197 |
+
'Sine',
|
| 198 |
+
'Cosine',
|
| 199 |
+
'Tangent',
|
| 200 |
+
'FloatAbs',
|
| 201 |
+
'ArcTangent',
|
| 202 |
+
'ArcCosine',
|
| 203 |
+
'ArcSine',
|
| 204 |
+
'ArcTangent2',
|
| 205 |
+
'RoundFloat',
|
| 206 |
+
'operator%',
|
| 207 |
+
'DegToRad',
|
| 208 |
+
'RadToDeg',
|
| 209 |
+
'GetURandomInt',
|
| 210 |
+
'GetURandomFloat',
|
| 211 |
+
'SetURandomSeed',
|
| 212 |
+
'SetURandomSeedSimple',
|
| 213 |
+
'RemovePlayerItem',
|
| 214 |
+
'GivePlayerItem',
|
| 215 |
+
'GetPlayerWeaponSlot',
|
| 216 |
+
'IgniteEntity',
|
| 217 |
+
'ExtinguishEntity',
|
| 218 |
+
'TeleportEntity',
|
| 219 |
+
'ForcePlayerSuicide',
|
| 220 |
+
'SlapPlayer',
|
| 221 |
+
'FindEntityByClassname',
|
| 222 |
+
'GetClientEyeAngles',
|
| 223 |
+
'CreateEntityByName',
|
| 224 |
+
'DispatchSpawn',
|
| 225 |
+
'DispatchKeyValue',
|
| 226 |
+
'DispatchKeyValueFloat',
|
| 227 |
+
'DispatchKeyValueVector',
|
| 228 |
+
'GetClientAimTarget',
|
| 229 |
+
'GetTeamCount',
|
| 230 |
+
'GetTeamName',
|
| 231 |
+
'GetTeamScore',
|
| 232 |
+
'SetTeamScore',
|
| 233 |
+
'GetTeamClientCount',
|
| 234 |
+
'SetEntityModel',
|
| 235 |
+
'GetPlayerDecalFile',
|
| 236 |
+
'GetPlayerJingleFile',
|
| 237 |
+
'GetServerNetStats',
|
| 238 |
+
'EquipPlayerWeapon',
|
| 239 |
+
'ActivateEntity',
|
| 240 |
+
'SetClientInfo',
|
| 241 |
+
'GivePlayerAmmo',
|
| 242 |
+
'SetClientListeningFlags',
|
| 243 |
+
'GetClientListeningFlags',
|
| 244 |
+
'SetListenOverride',
|
| 245 |
+
'GetListenOverride',
|
| 246 |
+
'IsClientMuted',
|
| 247 |
+
'TR_GetPointContents',
|
| 248 |
+
'TR_GetPointContentsEnt',
|
| 249 |
+
'TR_TraceRay',
|
| 250 |
+
'TR_TraceHull',
|
| 251 |
+
'TR_TraceRayFilter',
|
| 252 |
+
'TR_TraceHullFilter',
|
| 253 |
+
'TR_TraceRayEx',
|
| 254 |
+
'TR_TraceHullEx',
|
| 255 |
+
'TR_TraceRayFilterEx',
|
| 256 |
+
'TR_TraceHullFilterEx',
|
| 257 |
+
'TR_GetFraction',
|
| 258 |
+
'TR_GetEndPosition',
|
| 259 |
+
'TR_GetEntityIndex',
|
| 260 |
+
'TR_DidHit',
|
| 261 |
+
'TR_GetHitGroup',
|
| 262 |
+
'TR_GetPlaneNormal',
|
| 263 |
+
'TR_PointOutsideWorld',
|
| 264 |
+
'SortIntegers',
|
| 265 |
+
'SortFloats',
|
| 266 |
+
'SortStrings',
|
| 267 |
+
'SortFunc1D',
|
| 268 |
+
'SortCustom1D',
|
| 269 |
+
'SortCustom2D',
|
| 270 |
+
'SortADTArray',
|
| 271 |
+
'SortFuncADTArray',
|
| 272 |
+
'SortADTArrayCustom',
|
| 273 |
+
'CompileRegex',
|
| 274 |
+
'MatchRegex',
|
| 275 |
+
'GetRegexSubString',
|
| 276 |
+
'SimpleRegexMatch',
|
| 277 |
+
'TF2_GetPlayerClass',
|
| 278 |
+
'TF2_SetPlayerClass',
|
| 279 |
+
'TF2_RemoveWeaponSlot',
|
| 280 |
+
'TF2_RemoveAllWeapons',
|
| 281 |
+
'TF2_IsPlayerInCondition',
|
| 282 |
+
'TF2_GetObjectType',
|
| 283 |
+
'TF2_GetObjectMode',
|
| 284 |
+
'NominateMap',
|
| 285 |
+
'RemoveNominationByMap',
|
| 286 |
+
'RemoveNominationByOwner',
|
| 287 |
+
'GetExcludeMapList',
|
| 288 |
+
'GetNominatedMapList',
|
| 289 |
+
'CanMapChooserStartVote',
|
| 290 |
+
'InitiateMapChooserVote',
|
| 291 |
+
'HasEndOfMapVoteFinished',
|
| 292 |
+
'EndOfMapVoteEnabled',
|
| 293 |
+
'OnNominationRemoved',
|
| 294 |
+
'OnMapVoteStarted',
|
| 295 |
+
'CreateTimer',
|
| 296 |
+
'KillTimer',
|
| 297 |
+
'TriggerTimer',
|
| 298 |
+
'GetTickedTime',
|
| 299 |
+
'GetMapTimeLeft',
|
| 300 |
+
'GetMapTimeLimit',
|
| 301 |
+
'ExtendMapTimeLimit',
|
| 302 |
+
'GetTickInterval',
|
| 303 |
+
'OnMapTimeLeftChanged',
|
| 304 |
+
'IsServerProcessing',
|
| 305 |
+
'CreateDataTimer',
|
| 306 |
+
'ByteCountToCells',
|
| 307 |
+
'CreateArray',
|
| 308 |
+
'ClearArray',
|
| 309 |
+
'CloneArray',
|
| 310 |
+
'ResizeArray',
|
| 311 |
+
'GetArraySize',
|
| 312 |
+
'PushArrayCell',
|
| 313 |
+
'PushArrayString',
|
| 314 |
+
'PushArrayArray',
|
| 315 |
+
'GetArrayCell',
|
| 316 |
+
'GetArrayString',
|
| 317 |
+
'GetArrayArray',
|
| 318 |
+
'SetArrayCell',
|
| 319 |
+
'SetArrayString',
|
| 320 |
+
'SetArrayArray',
|
| 321 |
+
'ShiftArrayUp',
|
| 322 |
+
'RemoveFromArray',
|
| 323 |
+
'SwapArrayItems',
|
| 324 |
+
'FindStringInArray',
|
| 325 |
+
'FindValueInArray',
|
| 326 |
+
'ProcessTargetString',
|
| 327 |
+
'ReplyToTargetError',
|
| 328 |
+
'MultiTargetFilter',
|
| 329 |
+
'AddMultiTargetFilter',
|
| 330 |
+
'RemoveMultiTargetFilter',
|
| 331 |
+
'OnBanClient',
|
| 332 |
+
'OnBanIdentity',
|
| 333 |
+
'OnRemoveBan',
|
| 334 |
+
'BanClient',
|
| 335 |
+
'BanIdentity',
|
| 336 |
+
'RemoveBan',
|
| 337 |
+
'CreateTrie',
|
| 338 |
+
'SetTrieValue',
|
| 339 |
+
'SetTrieArray',
|
| 340 |
+
'SetTrieString',
|
| 341 |
+
'GetTrieValue',
|
| 342 |
+
'GetTrieArray',
|
| 343 |
+
'GetTrieString',
|
| 344 |
+
'RemoveFromTrie',
|
| 345 |
+
'ClearTrie',
|
| 346 |
+
'GetTrieSize',
|
| 347 |
+
'GetFunctionByName',
|
| 348 |
+
'CreateGlobalForward',
|
| 349 |
+
'CreateForward',
|
| 350 |
+
'GetForwardFunctionCount',
|
| 351 |
+
'AddToForward',
|
| 352 |
+
'RemoveFromForward',
|
| 353 |
+
'RemoveAllFromForward',
|
| 354 |
+
'Call_StartForward',
|
| 355 |
+
'Call_StartFunction',
|
| 356 |
+
'Call_PushCell',
|
| 357 |
+
'Call_PushCellRef',
|
| 358 |
+
'Call_PushFloat',
|
| 359 |
+
'Call_PushFloatRef',
|
| 360 |
+
'Call_PushArray',
|
| 361 |
+
'Call_PushArrayEx',
|
| 362 |
+
'Call_PushString',
|
| 363 |
+
'Call_PushStringEx',
|
| 364 |
+
'Call_Finish',
|
| 365 |
+
'Call_Cancel',
|
| 366 |
+
'NativeCall',
|
| 367 |
+
'CreateNative',
|
| 368 |
+
'ThrowNativeError',
|
| 369 |
+
'GetNativeStringLength',
|
| 370 |
+
'GetNativeString',
|
| 371 |
+
'SetNativeString',
|
| 372 |
+
'GetNativeCell',
|
| 373 |
+
'GetNativeCellRef',
|
| 374 |
+
'SetNativeCellRef',
|
| 375 |
+
'GetNativeArray',
|
| 376 |
+
'SetNativeArray',
|
| 377 |
+
'FormatNativeString',
|
| 378 |
+
'RequestFrameCallback',
|
| 379 |
+
'RequestFrame',
|
| 380 |
+
'OnRebuildAdminCache',
|
| 381 |
+
'DumpAdminCache',
|
| 382 |
+
'AddCommandOverride',
|
| 383 |
+
'GetCommandOverride',
|
| 384 |
+
'UnsetCommandOverride',
|
| 385 |
+
'CreateAdmGroup',
|
| 386 |
+
'FindAdmGroup',
|
| 387 |
+
'SetAdmGroupAddFlag',
|
| 388 |
+
'GetAdmGroupAddFlag',
|
| 389 |
+
'GetAdmGroupAddFlags',
|
| 390 |
+
'SetAdmGroupImmuneFrom',
|
| 391 |
+
'GetAdmGroupImmuneCount',
|
| 392 |
+
'GetAdmGroupImmuneFrom',
|
| 393 |
+
'AddAdmGroupCmdOverride',
|
| 394 |
+
'GetAdmGroupCmdOverride',
|
| 395 |
+
'RegisterAuthIdentType',
|
| 396 |
+
'CreateAdmin',
|
| 397 |
+
'GetAdminUsername',
|
| 398 |
+
'BindAdminIdentity',
|
| 399 |
+
'SetAdminFlag',
|
| 400 |
+
'GetAdminFlag',
|
| 401 |
+
'GetAdminFlags',
|
| 402 |
+
'AdminInheritGroup',
|
| 403 |
+
'GetAdminGroupCount',
|
| 404 |
+
'GetAdminGroup',
|
| 405 |
+
'SetAdminPassword',
|
| 406 |
+
'GetAdminPassword',
|
| 407 |
+
'FindAdminByIdentity',
|
| 408 |
+
'RemoveAdmin',
|
| 409 |
+
'FlagBitsToBitArray',
|
| 410 |
+
'FlagBitArrayToBits',
|
| 411 |
+
'FlagArrayToBits',
|
| 412 |
+
'FlagBitsToArray',
|
| 413 |
+
'FindFlagByName',
|
| 414 |
+
'FindFlagByChar',
|
| 415 |
+
'FindFlagChar',
|
| 416 |
+
'ReadFlagString',
|
| 417 |
+
'CanAdminTarget',
|
| 418 |
+
'CreateAuthMethod',
|
| 419 |
+
'SetAdmGroupImmunityLevel',
|
| 420 |
+
'GetAdmGroupImmunityLevel',
|
| 421 |
+
'SetAdminImmunityLevel',
|
| 422 |
+
'GetAdminImmunityLevel',
|
| 423 |
+
'FlagToBit',
|
| 424 |
+
'BitToFlag',
|
| 425 |
+
'ServerCommand',
|
| 426 |
+
'ServerCommandEx',
|
| 427 |
+
'InsertServerCommand',
|
| 428 |
+
'ServerExecute',
|
| 429 |
+
'ClientCommand',
|
| 430 |
+
'FakeClientCommand',
|
| 431 |
+
'FakeClientCommandEx',
|
| 432 |
+
'PrintToServer',
|
| 433 |
+
'PrintToConsole',
|
| 434 |
+
'ReplyToCommand',
|
| 435 |
+
'GetCmdReplySource',
|
| 436 |
+
'SetCmdReplySource',
|
| 437 |
+
'IsChatTrigger',
|
| 438 |
+
'ShowActivity2',
|
| 439 |
+
'ShowActivity',
|
| 440 |
+
'ShowActivityEx',
|
| 441 |
+
'FormatActivitySource',
|
| 442 |
+
'SrvCmd',
|
| 443 |
+
'RegServerCmd',
|
| 444 |
+
'ConCmd',
|
| 445 |
+
'RegConsoleCmd',
|
| 446 |
+
'RegAdminCmd',
|
| 447 |
+
'GetCmdArgs',
|
| 448 |
+
'GetCmdArg',
|
| 449 |
+
'GetCmdArgString',
|
| 450 |
+
'CreateConVar',
|
| 451 |
+
'FindConVar',
|
| 452 |
+
'ConVarChanged',
|
| 453 |
+
'HookConVarChange',
|
| 454 |
+
'UnhookConVarChange',
|
| 455 |
+
'GetConVarBool',
|
| 456 |
+
'SetConVarBool',
|
| 457 |
+
'GetConVarInt',
|
| 458 |
+
'SetConVarInt',
|
| 459 |
+
'GetConVarFloat',
|
| 460 |
+
'SetConVarFloat',
|
| 461 |
+
'GetConVarString',
|
| 462 |
+
'SetConVarString',
|
| 463 |
+
'ResetConVar',
|
| 464 |
+
'GetConVarDefault',
|
| 465 |
+
'GetConVarFlags',
|
| 466 |
+
'SetConVarFlags',
|
| 467 |
+
'GetConVarBounds',
|
| 468 |
+
'SetConVarBounds',
|
| 469 |
+
'GetConVarName',
|
| 470 |
+
'QueryClientConVar',
|
| 471 |
+
'GetCommandIterator',
|
| 472 |
+
'ReadCommandIterator',
|
| 473 |
+
'CheckCommandAccess',
|
| 474 |
+
'CheckAccess',
|
| 475 |
+
'IsValidConVarChar',
|
| 476 |
+
'GetCommandFlags',
|
| 477 |
+
'SetCommandFlags',
|
| 478 |
+
'FindFirstConCommand',
|
| 479 |
+
'FindNextConCommand',
|
| 480 |
+
'SendConVarValue',
|
| 481 |
+
'AddServerTag',
|
| 482 |
+
'RemoveServerTag',
|
| 483 |
+
'CommandListener',
|
| 484 |
+
'AddCommandListener',
|
| 485 |
+
'RemoveCommandListener',
|
| 486 |
+
'CommandExists',
|
| 487 |
+
'OnClientSayCommand',
|
| 488 |
+
'OnClientSayCommand_Post',
|
| 489 |
+
'TF2_IgnitePlayer',
|
| 490 |
+
'TF2_RespawnPlayer',
|
| 491 |
+
'TF2_RegeneratePlayer',
|
| 492 |
+
'TF2_AddCondition',
|
| 493 |
+
'TF2_RemoveCondition',
|
| 494 |
+
'TF2_SetPlayerPowerPlay',
|
| 495 |
+
'TF2_DisguisePlayer',
|
| 496 |
+
'TF2_RemovePlayerDisguise',
|
| 497 |
+
'TF2_StunPlayer',
|
| 498 |
+
'TF2_MakeBleed',
|
| 499 |
+
'TF2_GetClass',
|
| 500 |
+
'TF2_CalcIsAttackCritical',
|
| 501 |
+
'TF2_OnIsHolidayActive',
|
| 502 |
+
'TF2_IsHolidayActive',
|
| 503 |
+
'TF2_IsPlayerInDuel',
|
| 504 |
+
'TF2_RemoveWearable',
|
| 505 |
+
'TF2_OnConditionAdded',
|
| 506 |
+
'TF2_OnConditionRemoved',
|
| 507 |
+
'TF2_OnWaitingForPlayersStart',
|
| 508 |
+
'TF2_OnWaitingForPlayersEnd',
|
| 509 |
+
'TF2_OnPlayerTeleport',
|
| 510 |
+
'SQL_Connect',
|
| 511 |
+
'SQL_DefConnect',
|
| 512 |
+
'SQL_ConnectCustom',
|
| 513 |
+
'SQLite_UseDatabase',
|
| 514 |
+
'SQL_CheckConfig',
|
| 515 |
+
'SQL_GetDriver',
|
| 516 |
+
'SQL_ReadDriver',
|
| 517 |
+
'SQL_GetDriverIdent',
|
| 518 |
+
'SQL_GetDriverProduct',
|
| 519 |
+
'SQL_SetCharset',
|
| 520 |
+
'SQL_GetAffectedRows',
|
| 521 |
+
'SQL_GetInsertId',
|
| 522 |
+
'SQL_GetError',
|
| 523 |
+
'SQL_EscapeString',
|
| 524 |
+
'SQL_QuoteString',
|
| 525 |
+
'SQL_FastQuery',
|
| 526 |
+
'SQL_Query',
|
| 527 |
+
'SQL_PrepareQuery',
|
| 528 |
+
'SQL_FetchMoreResults',
|
| 529 |
+
'SQL_HasResultSet',
|
| 530 |
+
'SQL_GetRowCount',
|
| 531 |
+
'SQL_GetFieldCount',
|
| 532 |
+
'SQL_FieldNumToName',
|
| 533 |
+
'SQL_FieldNameToNum',
|
| 534 |
+
'SQL_FetchRow',
|
| 535 |
+
'SQL_MoreRows',
|
| 536 |
+
'SQL_Rewind',
|
| 537 |
+
'SQL_FetchString',
|
| 538 |
+
'SQL_FetchFloat',
|
| 539 |
+
'SQL_FetchInt',
|
| 540 |
+
'SQL_IsFieldNull',
|
| 541 |
+
'SQL_FetchSize',
|
| 542 |
+
'SQL_BindParamInt',
|
| 543 |
+
'SQL_BindParamFloat',
|
| 544 |
+
'SQL_BindParamString',
|
| 545 |
+
'SQL_Execute',
|
| 546 |
+
'SQL_LockDatabase',
|
| 547 |
+
'SQL_UnlockDatabase',
|
| 548 |
+
'SQLTCallback',
|
| 549 |
+
'SQL_IsSameConnection',
|
| 550 |
+
'SQL_TConnect',
|
| 551 |
+
'SQL_TQuery',
|
| 552 |
+
'SQL_CreateTransaction',
|
| 553 |
+
'SQL_AddQuery',
|
| 554 |
+
'SQLTxnSuccess',
|
| 555 |
+
'SQLTxnFailure',
|
| 556 |
+
'SQL_ExecuteTransaction',
|
| 557 |
+
'CloseHandle',
|
| 558 |
+
'CloneHandle',
|
| 559 |
+
'MenuHandler',
|
| 560 |
+
'CreateMenu',
|
| 561 |
+
'DisplayMenu',
|
| 562 |
+
'DisplayMenuAtItem',
|
| 563 |
+
'AddMenuItem',
|
| 564 |
+
'InsertMenuItem',
|
| 565 |
+
'RemoveMenuItem',
|
| 566 |
+
'RemoveAllMenuItems',
|
| 567 |
+
'GetMenuItem',
|
| 568 |
+
'GetMenuSelectionPosition',
|
| 569 |
+
'GetMenuItemCount',
|
| 570 |
+
'SetMenuPagination',
|
| 571 |
+
'GetMenuPagination',
|
| 572 |
+
'GetMenuStyle',
|
| 573 |
+
'SetMenuTitle',
|
| 574 |
+
'GetMenuTitle',
|
| 575 |
+
'CreatePanelFromMenu',
|
| 576 |
+
'GetMenuExitButton',
|
| 577 |
+
'SetMenuExitButton',
|
| 578 |
+
'GetMenuExitBackButton',
|
| 579 |
+
'SetMenuExitBackButton',
|
| 580 |
+
'SetMenuNoVoteButton',
|
| 581 |
+
'CancelMenu',
|
| 582 |
+
'GetMenuOptionFlags',
|
| 583 |
+
'SetMenuOptionFlags',
|
| 584 |
+
'IsVoteInProgress',
|
| 585 |
+
'CancelVote',
|
| 586 |
+
'VoteMenu',
|
| 587 |
+
'VoteMenuToAll',
|
| 588 |
+
'VoteHandler',
|
| 589 |
+
'SetVoteResultCallback',
|
| 590 |
+
'CheckVoteDelay',
|
| 591 |
+
'IsClientInVotePool',
|
| 592 |
+
'RedrawClientVoteMenu',
|
| 593 |
+
'GetMenuStyleHandle',
|
| 594 |
+
'CreatePanel',
|
| 595 |
+
'CreateMenuEx',
|
| 596 |
+
'GetClientMenu',
|
| 597 |
+
'CancelClientMenu',
|
| 598 |
+
'GetMaxPageItems',
|
| 599 |
+
'GetPanelStyle',
|
| 600 |
+
'SetPanelTitle',
|
| 601 |
+
'DrawPanelItem',
|
| 602 |
+
'DrawPanelText',
|
| 603 |
+
'CanPanelDrawFlags',
|
| 604 |
+
'SetPanelKeys',
|
| 605 |
+
'SendPanelToClient',
|
| 606 |
+
'GetPanelTextRemaining',
|
| 607 |
+
'GetPanelCurrentKey',
|
| 608 |
+
'SetPanelCurrentKey',
|
| 609 |
+
'RedrawMenuItem',
|
| 610 |
+
'InternalShowMenu',
|
| 611 |
+
'GetMenuVoteInfo',
|
| 612 |
+
'IsNewVoteAllowed',
|
| 613 |
+
'PrefetchSound',
|
| 614 |
+
'EmitAmbientSound',
|
| 615 |
+
'FadeClientVolume',
|
| 616 |
+
'StopSound',
|
| 617 |
+
'EmitSound',
|
| 618 |
+
'EmitSentence',
|
| 619 |
+
'GetDistGainFromSoundLevel',
|
| 620 |
+
'AmbientSHook',
|
| 621 |
+
'NormalSHook',
|
| 622 |
+
'AddAmbientSoundHook',
|
| 623 |
+
'AddNormalSoundHook',
|
| 624 |
+
'RemoveAmbientSoundHook',
|
| 625 |
+
'RemoveNormalSoundHook',
|
| 626 |
+
'EmitSoundToClient',
|
| 627 |
+
'EmitSoundToAll',
|
| 628 |
+
'ATTN_TO_SNDLEVEL',
|
| 629 |
+
'GetGameSoundParams',
|
| 630 |
+
'EmitGameSound',
|
| 631 |
+
'EmitAmbientGameSound',
|
| 632 |
+
'EmitGameSoundToClient',
|
| 633 |
+
'EmitGameSoundToAll',
|
| 634 |
+
'PrecacheScriptSound',
|
| 635 |
+
'strlen',
|
| 636 |
+
'StrContains',
|
| 637 |
+
'strcmp',
|
| 638 |
+
'strncmp',
|
| 639 |
+
'StrEqual',
|
| 640 |
+
'strcopy',
|
| 641 |
+
'Format',
|
| 642 |
+
'FormatEx',
|
| 643 |
+
'VFormat',
|
| 644 |
+
'StringToInt',
|
| 645 |
+
'StringToIntEx',
|
| 646 |
+
'IntToString',
|
| 647 |
+
'StringToFloat',
|
| 648 |
+
'StringToFloatEx',
|
| 649 |
+
'FloatToString',
|
| 650 |
+
'BreakString',
|
| 651 |
+
'TrimString',
|
| 652 |
+
'SplitString',
|
| 653 |
+
'ReplaceString',
|
| 654 |
+
'ReplaceStringEx',
|
| 655 |
+
'GetCharBytes',
|
| 656 |
+
'IsCharAlpha',
|
| 657 |
+
'IsCharNumeric',
|
| 658 |
+
'IsCharSpace',
|
| 659 |
+
'IsCharMB',
|
| 660 |
+
'IsCharUpper',
|
| 661 |
+
'IsCharLower',
|
| 662 |
+
'StripQuotes',
|
| 663 |
+
'CharToUpper',
|
| 664 |
+
'CharToLower',
|
| 665 |
+
'FindCharInString',
|
| 666 |
+
'StrCat',
|
| 667 |
+
'ExplodeString',
|
| 668 |
+
'ImplodeStrings',
|
| 669 |
+
'GetVectorLength',
|
| 670 |
+
'GetVectorDistance',
|
| 671 |
+
'GetVectorDotProduct',
|
| 672 |
+
'GetVectorCrossProduct',
|
| 673 |
+
'NormalizeVector',
|
| 674 |
+
'GetAngleVectors',
|
| 675 |
+
'GetVectorAngles',
|
| 676 |
+
'GetVectorVectors',
|
| 677 |
+
'AddVectors',
|
| 678 |
+
'SubtractVectors',
|
| 679 |
+
'ScaleVector',
|
| 680 |
+
'NegateVector',
|
| 681 |
+
'MakeVectorFromPoints',
|
| 682 |
+
'BaseComm_IsClientGagged',
|
| 683 |
+
'BaseComm_IsClientMuted',
|
| 684 |
+
'BaseComm_SetClientGag',
|
| 685 |
+
'BaseComm_SetClientMute',
|
| 686 |
+
'FormatUserLogText',
|
| 687 |
+
'FindPluginByFile',
|
| 688 |
+
'FindTarget',
|
| 689 |
+
'AcceptEntityInput',
|
| 690 |
+
'SetVariantBool',
|
| 691 |
+
'SetVariantString',
|
| 692 |
+
'SetVariantInt',
|
| 693 |
+
'SetVariantFloat',
|
| 694 |
+
'SetVariantVector3D',
|
| 695 |
+
'SetVariantPosVector3D',
|
| 696 |
+
'SetVariantColor',
|
| 697 |
+
'SetVariantEntity',
|
| 698 |
+
'GameRules_GetProp',
|
| 699 |
+
'GameRules_SetProp',
|
| 700 |
+
'GameRules_GetPropFloat',
|
| 701 |
+
'GameRules_SetPropFloat',
|
| 702 |
+
'GameRules_GetPropEnt',
|
| 703 |
+
'GameRules_SetPropEnt',
|
| 704 |
+
'GameRules_GetPropVector',
|
| 705 |
+
'GameRules_SetPropVector',
|
| 706 |
+
'GameRules_GetPropString',
|
| 707 |
+
'GameRules_SetPropString',
|
| 708 |
+
'GameRules_GetRoundState',
|
| 709 |
+
'OnClientConnect',
|
| 710 |
+
'OnClientConnected',
|
| 711 |
+
'OnClientPutInServer',
|
| 712 |
+
'OnClientDisconnect',
|
| 713 |
+
'OnClientDisconnect_Post',
|
| 714 |
+
'OnClientCommand',
|
| 715 |
+
'OnClientSettingsChanged',
|
| 716 |
+
'OnClientAuthorized',
|
| 717 |
+
'OnClientPreAdminCheck',
|
| 718 |
+
'OnClientPostAdminFilter',
|
| 719 |
+
'OnClientPostAdminCheck',
|
| 720 |
+
'GetMaxClients',
|
| 721 |
+
'GetMaxHumanPlayers',
|
| 722 |
+
'GetClientCount',
|
| 723 |
+
'GetClientName',
|
| 724 |
+
'GetClientIP',
|
| 725 |
+
'GetClientAuthString',
|
| 726 |
+
'GetClientAuthId',
|
| 727 |
+
'GetSteamAccountID',
|
| 728 |
+
'GetClientUserId',
|
| 729 |
+
'IsClientConnected',
|
| 730 |
+
'IsClientInGame',
|
| 731 |
+
'IsClientInKickQueue',
|
| 732 |
+
'IsClientAuthorized',
|
| 733 |
+
'IsFakeClient',
|
| 734 |
+
'IsClientSourceTV',
|
| 735 |
+
'IsClientReplay',
|
| 736 |
+
'IsClientObserver',
|
| 737 |
+
'IsPlayerAlive',
|
| 738 |
+
'GetClientInfo',
|
| 739 |
+
'GetClientTeam',
|
| 740 |
+
'SetUserAdmin',
|
| 741 |
+
'GetUserAdmin',
|
| 742 |
+
'AddUserFlags',
|
| 743 |
+
'RemoveUserFlags',
|
| 744 |
+
'SetUserFlagBits',
|
| 745 |
+
'GetUserFlagBits',
|
| 746 |
+
'CanUserTarget',
|
| 747 |
+
'RunAdminCacheChecks',
|
| 748 |
+
'NotifyPostAdminCheck',
|
| 749 |
+
'CreateFakeClient',
|
| 750 |
+
'SetFakeClientConVar',
|
| 751 |
+
'GetClientHealth',
|
| 752 |
+
'GetClientModel',
|
| 753 |
+
'GetClientWeapon',
|
| 754 |
+
'GetClientMaxs',
|
| 755 |
+
'GetClientMins',
|
| 756 |
+
'GetClientAbsAngles',
|
| 757 |
+
'GetClientAbsOrigin',
|
| 758 |
+
'GetClientArmor',
|
| 759 |
+
'GetClientDeaths',
|
| 760 |
+
'GetClientFrags',
|
| 761 |
+
'GetClientDataRate',
|
| 762 |
+
'IsClientTimingOut',
|
| 763 |
+
'GetClientTime',
|
| 764 |
+
'GetClientLatency',
|
| 765 |
+
'GetClientAvgLatency',
|
| 766 |
+
'GetClientAvgLoss',
|
| 767 |
+
'GetClientAvgChoke',
|
| 768 |
+
'GetClientAvgData',
|
| 769 |
+
'GetClientAvgPackets',
|
| 770 |
+
'GetClientOfUserId',
|
| 771 |
+
'KickClient',
|
| 772 |
+
'KickClientEx',
|
| 773 |
+
'ChangeClientTeam',
|
| 774 |
+
'GetClientSerial',
|
| 775 |
+
'GetClientFromSerial',
|
| 776 |
+
'FindStringTable',
|
| 777 |
+
'GetNumStringTables',
|
| 778 |
+
'GetStringTableNumStrings',
|
| 779 |
+
'GetStringTableMaxStrings',
|
| 780 |
+
'GetStringTableName',
|
| 781 |
+
'FindStringIndex',
|
| 782 |
+
'ReadStringTable',
|
| 783 |
+
'GetStringTableDataLength',
|
| 784 |
+
'GetStringTableData',
|
| 785 |
+
'SetStringTableData',
|
| 786 |
+
'AddToStringTable',
|
| 787 |
+
'LockStringTables',
|
| 788 |
+
'AddFileToDownloadsTable',
|
| 789 |
+
'GetEntityFlags',
|
| 790 |
+
'SetEntityFlags',
|
| 791 |
+
'GetEntityMoveType',
|
| 792 |
+
'SetEntityMoveType',
|
| 793 |
+
'GetEntityRenderMode',
|
| 794 |
+
'SetEntityRenderMode',
|
| 795 |
+
'GetEntityRenderFx',
|
| 796 |
+
'SetEntityRenderFx',
|
| 797 |
+
'SetEntityRenderColor',
|
| 798 |
+
'GetEntityGravity',
|
| 799 |
+
'SetEntityGravity',
|
| 800 |
+
'SetEntityHealth',
|
| 801 |
+
'GetClientButtons',
|
| 802 |
+
'EntityOutput',
|
| 803 |
+
'HookEntityOutput',
|
| 804 |
+
'UnhookEntityOutput',
|
| 805 |
+
'HookSingleEntityOutput',
|
| 806 |
+
'UnhookSingleEntityOutput',
|
| 807 |
+
'SMC_CreateParser',
|
| 808 |
+
'SMC_ParseFile',
|
| 809 |
+
'SMC_GetErrorString',
|
| 810 |
+
'SMC_ParseStart',
|
| 811 |
+
'SMC_SetParseStart',
|
| 812 |
+
'SMC_ParseEnd',
|
| 813 |
+
'SMC_SetParseEnd',
|
| 814 |
+
'SMC_NewSection',
|
| 815 |
+
'SMC_KeyValue',
|
| 816 |
+
'SMC_EndSection',
|
| 817 |
+
'SMC_SetReaders',
|
| 818 |
+
'SMC_RawLine',
|
| 819 |
+
'SMC_SetRawLine',
|
| 820 |
+
'BfWriteBool',
|
| 821 |
+
'BfWriteByte',
|
| 822 |
+
'BfWriteChar',
|
| 823 |
+
'BfWriteShort',
|
| 824 |
+
'BfWriteWord',
|
| 825 |
+
'BfWriteNum',
|
| 826 |
+
'BfWriteFloat',
|
| 827 |
+
'BfWriteString',
|
| 828 |
+
'BfWriteEntity',
|
| 829 |
+
'BfWriteAngle',
|
| 830 |
+
'BfWriteCoord',
|
| 831 |
+
'BfWriteVecCoord',
|
| 832 |
+
'BfWriteVecNormal',
|
| 833 |
+
'BfWriteAngles',
|
| 834 |
+
'BfReadBool',
|
| 835 |
+
'BfReadByte',
|
| 836 |
+
'BfReadChar',
|
| 837 |
+
'BfReadShort',
|
| 838 |
+
'BfReadWord',
|
| 839 |
+
'BfReadNum',
|
| 840 |
+
'BfReadFloat',
|
| 841 |
+
'BfReadString',
|
| 842 |
+
'BfReadEntity',
|
| 843 |
+
'BfReadAngle',
|
| 844 |
+
'BfReadCoord',
|
| 845 |
+
'BfReadVecCoord',
|
| 846 |
+
'BfReadVecNormal',
|
| 847 |
+
'BfReadAngles',
|
| 848 |
+
'BfGetNumBytesLeft',
|
| 849 |
+
'CreateProfiler',
|
| 850 |
+
'StartProfiling',
|
| 851 |
+
'StopProfiling',
|
| 852 |
+
'GetProfilerTime',
|
| 853 |
+
'OnPluginStart',
|
| 854 |
+
'AskPluginLoad2',
|
| 855 |
+
'OnPluginEnd',
|
| 856 |
+
'OnPluginPauseChange',
|
| 857 |
+
'OnGameFrame',
|
| 858 |
+
'OnMapStart',
|
| 859 |
+
'OnMapEnd',
|
| 860 |
+
'OnConfigsExecuted',
|
| 861 |
+
'OnAutoConfigsBuffered',
|
| 862 |
+
'OnAllPluginsLoaded',
|
| 863 |
+
'GetMyHandle',
|
| 864 |
+
'GetPluginIterator',
|
| 865 |
+
'MorePlugins',
|
| 866 |
+
'ReadPlugin',
|
| 867 |
+
'GetPluginStatus',
|
| 868 |
+
'GetPluginFilename',
|
| 869 |
+
'IsPluginDebugging',
|
| 870 |
+
'GetPluginInfo',
|
| 871 |
+
'FindPluginByNumber',
|
| 872 |
+
'SetFailState',
|
| 873 |
+
'ThrowError',
|
| 874 |
+
'GetTime',
|
| 875 |
+
'FormatTime',
|
| 876 |
+
'LoadGameConfigFile',
|
| 877 |
+
'GameConfGetOffset',
|
| 878 |
+
'GameConfGetKeyValue',
|
| 879 |
+
'GameConfGetAddress',
|
| 880 |
+
'GetSysTickCount',
|
| 881 |
+
'AutoExecConfig',
|
| 882 |
+
'RegPluginLibrary',
|
| 883 |
+
'LibraryExists',
|
| 884 |
+
'GetExtensionFileStatus',
|
| 885 |
+
'OnLibraryAdded',
|
| 886 |
+
'OnLibraryRemoved',
|
| 887 |
+
'ReadMapList',
|
| 888 |
+
'SetMapListCompatBind',
|
| 889 |
+
'OnClientFloodCheck',
|
| 890 |
+
'OnClientFloodResult',
|
| 891 |
+
'CanTestFeatures',
|
| 892 |
+
'GetFeatureStatus',
|
| 893 |
+
'RequireFeature',
|
| 894 |
+
'LoadFromAddress',
|
| 895 |
+
'StoreToAddress',
|
| 896 |
+
'CreateStack',
|
| 897 |
+
'PushStackCell',
|
| 898 |
+
'PushStackString',
|
| 899 |
+
'PushStackArray',
|
| 900 |
+
'PopStackCell',
|
| 901 |
+
'PopStackString',
|
| 902 |
+
'PopStackArray',
|
| 903 |
+
'IsStackEmpty',
|
| 904 |
+
'PopStack',
|
| 905 |
+
'OnPlayerRunCmd',
|
| 906 |
+
'BuildPath',
|
| 907 |
+
'OpenDirectory',
|
| 908 |
+
'ReadDirEntry',
|
| 909 |
+
'OpenFile',
|
| 910 |
+
'DeleteFile',
|
| 911 |
+
'ReadFileLine',
|
| 912 |
+
'ReadFile',
|
| 913 |
+
'ReadFileString',
|
| 914 |
+
'WriteFile',
|
| 915 |
+
'WriteFileString',
|
| 916 |
+
'WriteFileLine',
|
| 917 |
+
'ReadFileCell',
|
| 918 |
+
'WriteFileCell',
|
| 919 |
+
'IsEndOfFile',
|
| 920 |
+
'FileSeek',
|
| 921 |
+
'FilePosition',
|
| 922 |
+
'FileExists',
|
| 923 |
+
'RenameFile',
|
| 924 |
+
'DirExists',
|
| 925 |
+
'FileSize',
|
| 926 |
+
'FlushFile',
|
| 927 |
+
'RemoveDir',
|
| 928 |
+
'CreateDirectory',
|
| 929 |
+
'GetFileTime',
|
| 930 |
+
'LogToOpenFile',
|
| 931 |
+
'LogToOpenFileEx',
|
| 932 |
+
'PbReadInt',
|
| 933 |
+
'PbReadFloat',
|
| 934 |
+
'PbReadBool',
|
| 935 |
+
'PbReadString',
|
| 936 |
+
'PbReadColor',
|
| 937 |
+
'PbReadAngle',
|
| 938 |
+
'PbReadVector',
|
| 939 |
+
'PbReadVector2D',
|
| 940 |
+
'PbGetRepeatedFieldCount',
|
| 941 |
+
'PbSetInt',
|
| 942 |
+
'PbSetFloat',
|
| 943 |
+
'PbSetBool',
|
| 944 |
+
'PbSetString',
|
| 945 |
+
'PbSetColor',
|
| 946 |
+
'PbSetAngle',
|
| 947 |
+
'PbSetVector',
|
| 948 |
+
'PbSetVector2D',
|
| 949 |
+
'PbAddInt',
|
| 950 |
+
'PbAddFloat',
|
| 951 |
+
'PbAddBool',
|
| 952 |
+
'PbAddString',
|
| 953 |
+
'PbAddColor',
|
| 954 |
+
'PbAddAngle',
|
| 955 |
+
'PbAddVector',
|
| 956 |
+
'PbAddVector2D',
|
| 957 |
+
'PbRemoveRepeatedFieldValue',
|
| 958 |
+
'PbReadMessage',
|
| 959 |
+
'PbReadRepeatedMessage',
|
| 960 |
+
'PbAddMessage',
|
| 961 |
+
'SetNextMap',
|
| 962 |
+
'GetNextMap',
|
| 963 |
+
'ForceChangeLevel',
|
| 964 |
+
'GetMapHistorySize',
|
| 965 |
+
'GetMapHistory',
|
| 966 |
+
'GeoipCode2',
|
| 967 |
+
'GeoipCode3',
|
| 968 |
+
'GeoipCountry',
|
| 969 |
+
'MarkNativeAsOptional',
|
| 970 |
+
'RegClientCookie',
|
| 971 |
+
'FindClientCookie',
|
| 972 |
+
'SetClientCookie',
|
| 973 |
+
'GetClientCookie',
|
| 974 |
+
'SetAuthIdCookie',
|
| 975 |
+
'AreClientCookiesCached',
|
| 976 |
+
'OnClientCookiesCached',
|
| 977 |
+
'CookieMenuHandler',
|
| 978 |
+
'SetCookiePrefabMenu',
|
| 979 |
+
'SetCookieMenuItem',
|
| 980 |
+
'ShowCookieMenu',
|
| 981 |
+
'GetCookieIterator',
|
| 982 |
+
'ReadCookieIterator',
|
| 983 |
+
'GetCookieAccess',
|
| 984 |
+
'GetClientCookieTime',
|
| 985 |
+
'LoadTranslations',
|
| 986 |
+
'SetGlobalTransTarget',
|
| 987 |
+
'GetClientLanguage',
|
| 988 |
+
'GetServerLanguage',
|
| 989 |
+
'GetLanguageCount',
|
| 990 |
+
'GetLanguageInfo',
|
| 991 |
+
'SetClientLanguage',
|
| 992 |
+
'GetLanguageByCode',
|
| 993 |
+
'GetLanguageByName',
|
| 994 |
+
'CS_OnBuyCommand',
|
| 995 |
+
'CS_OnCSWeaponDrop',
|
| 996 |
+
'CS_OnGetWeaponPrice',
|
| 997 |
+
'CS_OnTerminateRound',
|
| 998 |
+
'CS_RespawnPlayer',
|
| 999 |
+
'CS_SwitchTeam',
|
| 1000 |
+
'CS_DropWeapon',
|
| 1001 |
+
'CS_TerminateRound',
|
| 1002 |
+
'CS_GetTranslatedWeaponAlias',
|
| 1003 |
+
'CS_GetWeaponPrice',
|
| 1004 |
+
'CS_GetClientClanTag',
|
| 1005 |
+
'CS_SetClientClanTag',
|
| 1006 |
+
'CS_GetTeamScore',
|
| 1007 |
+
'CS_SetTeamScore',
|
| 1008 |
+
'CS_GetMVPCount',
|
| 1009 |
+
'CS_SetMVPCount',
|
| 1010 |
+
'CS_GetClientContributionScore',
|
| 1011 |
+
'CS_SetClientContributionScore',
|
| 1012 |
+
'CS_GetClientAssists',
|
| 1013 |
+
'CS_SetClientAssists',
|
| 1014 |
+
'CS_AliasToWeaponID',
|
| 1015 |
+
'CS_WeaponIDToAlias',
|
| 1016 |
+
'CS_IsValidWeaponID',
|
| 1017 |
+
'CS_UpdateClientModel',
|
| 1018 |
+
'LogToGame',
|
| 1019 |
+
'SetRandomSeed',
|
| 1020 |
+
'GetRandomFloat',
|
| 1021 |
+
'GetRandomInt',
|
| 1022 |
+
'IsMapValid',
|
| 1023 |
+
'IsDedicatedServer',
|
| 1024 |
+
'GetEngineTime',
|
| 1025 |
+
'GetGameTime',
|
| 1026 |
+
'GetGameTickCount',
|
| 1027 |
+
'GetGameDescription',
|
| 1028 |
+
'GetGameFolderName',
|
| 1029 |
+
'GetCurrentMap',
|
| 1030 |
+
'PrecacheModel',
|
| 1031 |
+
'PrecacheSentenceFile',
|
| 1032 |
+
'PrecacheDecal',
|
| 1033 |
+
'PrecacheGeneric',
|
| 1034 |
+
'IsModelPrecached',
|
| 1035 |
+
'IsDecalPrecached',
|
| 1036 |
+
'IsGenericPrecached',
|
| 1037 |
+
'PrecacheSound',
|
| 1038 |
+
'IsSoundPrecached',
|
| 1039 |
+
'CreateDialog',
|
| 1040 |
+
'GetEngineVersion',
|
| 1041 |
+
'PrintToChat',
|
| 1042 |
+
'PrintToChatAll',
|
| 1043 |
+
'PrintCenterText',
|
| 1044 |
+
'PrintCenterTextAll',
|
| 1045 |
+
'PrintHintText',
|
| 1046 |
+
'PrintHintTextToAll',
|
| 1047 |
+
'ShowVGUIPanel',
|
| 1048 |
+
'CreateHudSynchronizer',
|
| 1049 |
+
'SetHudTextParams',
|
| 1050 |
+
'SetHudTextParamsEx',
|
| 1051 |
+
'ShowSyncHudText',
|
| 1052 |
+
'ClearSyncHud',
|
| 1053 |
+
'ShowHudText',
|
| 1054 |
+
'ShowMOTDPanel',
|
| 1055 |
+
'DisplayAskConnectBox',
|
| 1056 |
+
'EntIndexToEntRef',
|
| 1057 |
+
'EntRefToEntIndex',
|
| 1058 |
+
'MakeCompatEntRef',
|
| 1059 |
+
'SetClientViewEntity',
|
| 1060 |
+
'SetLightStyle',
|
| 1061 |
+
'GetClientEyePosition',
|
| 1062 |
+
'CreateDataPack',
|
| 1063 |
+
'WritePackCell',
|
| 1064 |
+
'WritePackFloat',
|
| 1065 |
+
'WritePackString',
|
| 1066 |
+
'ReadPackCell',
|
| 1067 |
+
'ReadPackFloat',
|
| 1068 |
+
'ReadPackString',
|
| 1069 |
+
'ResetPack',
|
| 1070 |
+
'GetPackPosition',
|
| 1071 |
+
'SetPackPosition',
|
| 1072 |
+
'IsPackReadable',
|
| 1073 |
+
'LogMessage',
|
| 1074 |
+
'LogToFile',
|
| 1075 |
+
'LogToFileEx',
|
| 1076 |
+
'LogAction',
|
| 1077 |
+
'LogError',
|
| 1078 |
+
'OnLogAction',
|
| 1079 |
+
'GameLogHook',
|
| 1080 |
+
'AddGameLogHook',
|
| 1081 |
+
'RemoveGameLogHook',
|
| 1082 |
+
'FindTeamByName',
|
| 1083 |
+
'StartPrepSDKCall',
|
| 1084 |
+
'PrepSDKCall_SetVirtual',
|
| 1085 |
+
'PrepSDKCall_SetSignature',
|
| 1086 |
+
'PrepSDKCall_SetAddress',
|
| 1087 |
+
'PrepSDKCall_SetFromConf',
|
| 1088 |
+
'PrepSDKCall_SetReturnInfo',
|
| 1089 |
+
'PrepSDKCall_AddParameter',
|
| 1090 |
+
'EndPrepSDKCall',
|
| 1091 |
+
'SDKCall',
|
| 1092 |
+
'GetPlayerResourceEntity',
|
| 1093 |
+
)
|
| 1094 |
+
|
| 1095 |
+
|
| 1096 |
+
if __name__ == '__main__': # pragma: no cover
|
| 1097 |
+
import re
|
| 1098 |
+
import sys
|
| 1099 |
+
try:
|
| 1100 |
+
from urllib import FancyURLopener
|
| 1101 |
+
except ImportError:
|
| 1102 |
+
from urllib.request import FancyURLopener
|
| 1103 |
+
|
| 1104 |
+
from pygments.util import format_lines
|
| 1105 |
+
|
| 1106 |
+
# urllib ends up wanting to import a module called 'math' -- if
|
| 1107 |
+
# pygments/lexers is in the path, this ends badly.
|
| 1108 |
+
for i in range(len(sys.path)-1, -1, -1):
|
| 1109 |
+
if sys.path[i].endswith('/lexers'):
|
| 1110 |
+
del sys.path[i]
|
| 1111 |
+
|
| 1112 |
+
class Opener(FancyURLopener):
|
| 1113 |
+
version = 'Mozilla/5.0 (Pygments Sourcemod Builtins Update)'
|
| 1114 |
+
|
| 1115 |
+
opener = Opener()
|
| 1116 |
+
|
| 1117 |
+
def get_version():
|
| 1118 |
+
f = opener.open('http://docs.sourcemod.net/api/index.php')
|
| 1119 |
+
r = re.compile(r'SourceMod v\.<b>([\d\.]+(?:-\w+)?)</td>')
|
| 1120 |
+
for line in f:
|
| 1121 |
+
m = r.search(line)
|
| 1122 |
+
if m is not None:
|
| 1123 |
+
return m.groups()[0]
|
| 1124 |
+
raise ValueError('No version in api docs')
|
| 1125 |
+
|
| 1126 |
+
def get_sm_functions():
|
| 1127 |
+
f = opener.open('http://docs.sourcemod.net/api/SMfuncs.js')
|
| 1128 |
+
r = re.compile(r'SMfunctions\[\d+\] = Array \("(?:public )?([^,]+)",".+"\);')
|
| 1129 |
+
functions = []
|
| 1130 |
+
for line in f:
|
| 1131 |
+
m = r.match(line)
|
| 1132 |
+
if m is not None:
|
| 1133 |
+
functions.append(m.groups()[0])
|
| 1134 |
+
return functions
|
| 1135 |
+
|
| 1136 |
+
def regenerate(filename, natives):
|
| 1137 |
+
with open(filename) as fp:
|
| 1138 |
+
content = fp.read()
|
| 1139 |
+
|
| 1140 |
+
header = content[:content.find('FUNCTIONS = (')]
|
| 1141 |
+
footer = content[content.find("if __name__ == '__main__':")-1:]
|
| 1142 |
+
|
| 1143 |
+
|
| 1144 |
+
with open(filename, 'w') as fp:
|
| 1145 |
+
fp.write(header)
|
| 1146 |
+
fp.write(format_lines('FUNCTIONS', natives))
|
| 1147 |
+
fp.write(footer)
|
| 1148 |
+
|
| 1149 |
+
def run():
|
| 1150 |
+
version = get_version()
|
| 1151 |
+
print('> Downloading function index for SourceMod %s' % version)
|
| 1152 |
+
functions = get_sm_functions()
|
| 1153 |
+
print('> %d functions found:' % len(functions))
|
| 1154 |
+
|
| 1155 |
+
functionlist = []
|
| 1156 |
+
for full_function_name in functions:
|
| 1157 |
+
print('>> %s' % full_function_name)
|
| 1158 |
+
functionlist.append(full_function_name)
|
| 1159 |
+
|
| 1160 |
+
regenerate(__file__, functionlist)
|
| 1161 |
+
|
| 1162 |
+
|
| 1163 |
+
run()
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/_stan_builtins.py
ADDED
|
@@ -0,0 +1,532 @@
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers._stan_builtins
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
This file contains the names of functions for Stan used by
|
| 7 |
+
``pygments.lexers.math.StanLexer. This is for Stan language version 2.8.0.
|
| 8 |
+
|
| 9 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 10 |
+
:license: BSD, see LICENSE for details.
|
| 11 |
+
"""
|
| 12 |
+
|
| 13 |
+
KEYWORDS = (
|
| 14 |
+
'else',
|
| 15 |
+
'for',
|
| 16 |
+
'if',
|
| 17 |
+
'in',
|
| 18 |
+
'increment_log_prob',
|
| 19 |
+
'integrate_ode',
|
| 20 |
+
'lp__',
|
| 21 |
+
'print',
|
| 22 |
+
'reject',
|
| 23 |
+
'return',
|
| 24 |
+
'while'
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
TYPES = (
|
| 28 |
+
'cholesky_factor_corr',
|
| 29 |
+
'cholesky_factor_cov',
|
| 30 |
+
'corr_matrix',
|
| 31 |
+
'cov_matrix',
|
| 32 |
+
'int',
|
| 33 |
+
'matrix',
|
| 34 |
+
'ordered',
|
| 35 |
+
'positive_ordered',
|
| 36 |
+
'real',
|
| 37 |
+
'row_vector',
|
| 38 |
+
'row_vectormatrix',
|
| 39 |
+
'simplex',
|
| 40 |
+
'unit_vector',
|
| 41 |
+
'vector',
|
| 42 |
+
'void')
|
| 43 |
+
|
| 44 |
+
FUNCTIONS = (
|
| 45 |
+
'Phi',
|
| 46 |
+
'Phi_approx',
|
| 47 |
+
'abs',
|
| 48 |
+
'acos',
|
| 49 |
+
'acosh',
|
| 50 |
+
'append_col',
|
| 51 |
+
'append_row',
|
| 52 |
+
'asin',
|
| 53 |
+
'asinh',
|
| 54 |
+
'atan',
|
| 55 |
+
'atan2',
|
| 56 |
+
'atanh',
|
| 57 |
+
'bernoulli_ccdf_log',
|
| 58 |
+
'bernoulli_cdf',
|
| 59 |
+
'bernoulli_cdf_log',
|
| 60 |
+
'bernoulli_log',
|
| 61 |
+
'bernoulli_logit_log',
|
| 62 |
+
'bernoulli_rng',
|
| 63 |
+
'bessel_first_kind',
|
| 64 |
+
'bessel_second_kind',
|
| 65 |
+
'beta_binomial_ccdf_log',
|
| 66 |
+
'beta_binomial_cdf',
|
| 67 |
+
'beta_binomial_cdf_log',
|
| 68 |
+
'beta_binomial_log',
|
| 69 |
+
'beta_binomial_rng',
|
| 70 |
+
'beta_ccdf_log',
|
| 71 |
+
'beta_cdf',
|
| 72 |
+
'beta_cdf_log',
|
| 73 |
+
'beta_log',
|
| 74 |
+
'beta_rng',
|
| 75 |
+
'binary_log_loss',
|
| 76 |
+
'binomial_ccdf_log',
|
| 77 |
+
'binomial_cdf',
|
| 78 |
+
'binomial_cdf_log',
|
| 79 |
+
'binomial_coefficient_log',
|
| 80 |
+
'binomial_log',
|
| 81 |
+
'binomial_logit_log',
|
| 82 |
+
'binomial_rng',
|
| 83 |
+
'block',
|
| 84 |
+
'categorical_log',
|
| 85 |
+
'categorical_logit_log',
|
| 86 |
+
'categorical_rng',
|
| 87 |
+
'cauchy_ccdf_log',
|
| 88 |
+
'cauchy_cdf',
|
| 89 |
+
'cauchy_cdf_log',
|
| 90 |
+
'cauchy_log',
|
| 91 |
+
'cauchy_rng',
|
| 92 |
+
'cbrt',
|
| 93 |
+
'ceil',
|
| 94 |
+
'chi_square_ccdf_log',
|
| 95 |
+
'chi_square_cdf',
|
| 96 |
+
'chi_square_cdf_log',
|
| 97 |
+
'chi_square_log',
|
| 98 |
+
'chi_square_rng',
|
| 99 |
+
'cholesky_decompose',
|
| 100 |
+
'col',
|
| 101 |
+
'cols',
|
| 102 |
+
'columns_dot_product',
|
| 103 |
+
'columns_dot_self',
|
| 104 |
+
'cos',
|
| 105 |
+
'cosh',
|
| 106 |
+
'crossprod',
|
| 107 |
+
'csr_extract_u',
|
| 108 |
+
'csr_extract_v',
|
| 109 |
+
'csr_extract_w',
|
| 110 |
+
'csr_matrix_times_vector',
|
| 111 |
+
'csr_to_dense_matrix',
|
| 112 |
+
'cumulative_sum',
|
| 113 |
+
'determinant',
|
| 114 |
+
'diag_matrix',
|
| 115 |
+
'diag_post_multiply',
|
| 116 |
+
'diag_pre_multiply',
|
| 117 |
+
'diagonal',
|
| 118 |
+
'digamma',
|
| 119 |
+
'dims',
|
| 120 |
+
'dirichlet_log',
|
| 121 |
+
'dirichlet_rng',
|
| 122 |
+
'distance',
|
| 123 |
+
'dot_product',
|
| 124 |
+
'dot_self',
|
| 125 |
+
'double_exponential_ccdf_log',
|
| 126 |
+
'double_exponential_cdf',
|
| 127 |
+
'double_exponential_cdf_log',
|
| 128 |
+
'double_exponential_log',
|
| 129 |
+
'double_exponential_rng',
|
| 130 |
+
'e',
|
| 131 |
+
'eigenvalues_sym',
|
| 132 |
+
'eigenvectors_sym',
|
| 133 |
+
'erf',
|
| 134 |
+
'erfc',
|
| 135 |
+
'exp',
|
| 136 |
+
'exp2',
|
| 137 |
+
'exp_mod_normal_ccdf_log',
|
| 138 |
+
'exp_mod_normal_cdf',
|
| 139 |
+
'exp_mod_normal_cdf_log',
|
| 140 |
+
'exp_mod_normal_log',
|
| 141 |
+
'exp_mod_normal_rng',
|
| 142 |
+
'expm1',
|
| 143 |
+
'exponential_ccdf_log',
|
| 144 |
+
'exponential_cdf',
|
| 145 |
+
'exponential_cdf_log',
|
| 146 |
+
'exponential_log',
|
| 147 |
+
'exponential_rng',
|
| 148 |
+
'fabs',
|
| 149 |
+
'falling_factorial',
|
| 150 |
+
'fdim',
|
| 151 |
+
'floor',
|
| 152 |
+
'fma',
|
| 153 |
+
'fmax',
|
| 154 |
+
'fmin',
|
| 155 |
+
'fmod',
|
| 156 |
+
'frechet_ccdf_log',
|
| 157 |
+
'frechet_cdf',
|
| 158 |
+
'frechet_cdf_log',
|
| 159 |
+
'frechet_log',
|
| 160 |
+
'frechet_rng',
|
| 161 |
+
'gamma_ccdf_log',
|
| 162 |
+
'gamma_cdf',
|
| 163 |
+
'gamma_cdf_log',
|
| 164 |
+
'gamma_log',
|
| 165 |
+
'gamma_p',
|
| 166 |
+
'gamma_q',
|
| 167 |
+
'gamma_rng',
|
| 168 |
+
'gaussian_dlm_obs_log',
|
| 169 |
+
'get_lp',
|
| 170 |
+
'gumbel_ccdf_log',
|
| 171 |
+
'gumbel_cdf',
|
| 172 |
+
'gumbel_cdf_log',
|
| 173 |
+
'gumbel_log',
|
| 174 |
+
'gumbel_rng',
|
| 175 |
+
'head',
|
| 176 |
+
'hypergeometric_log',
|
| 177 |
+
'hypergeometric_rng',
|
| 178 |
+
'hypot',
|
| 179 |
+
'if_else',
|
| 180 |
+
'int_step',
|
| 181 |
+
'inv',
|
| 182 |
+
'inv_chi_square_ccdf_log',
|
| 183 |
+
'inv_chi_square_cdf',
|
| 184 |
+
'inv_chi_square_cdf_log',
|
| 185 |
+
'inv_chi_square_log',
|
| 186 |
+
'inv_chi_square_rng',
|
| 187 |
+
'inv_cloglog',
|
| 188 |
+
'inv_gamma_ccdf_log',
|
| 189 |
+
'inv_gamma_cdf',
|
| 190 |
+
'inv_gamma_cdf_log',
|
| 191 |
+
'inv_gamma_log',
|
| 192 |
+
'inv_gamma_rng',
|
| 193 |
+
'inv_logit',
|
| 194 |
+
'inv_phi',
|
| 195 |
+
'inv_sqrt',
|
| 196 |
+
'inv_square',
|
| 197 |
+
'inv_wishart_log',
|
| 198 |
+
'inv_wishart_rng',
|
| 199 |
+
'inverse',
|
| 200 |
+
'inverse_spd',
|
| 201 |
+
'is_inf',
|
| 202 |
+
'is_nan',
|
| 203 |
+
'lbeta',
|
| 204 |
+
'lgamma',
|
| 205 |
+
'lkj_corr_cholesky_log',
|
| 206 |
+
'lkj_corr_cholesky_rng',
|
| 207 |
+
'lkj_corr_log',
|
| 208 |
+
'lkj_corr_rng',
|
| 209 |
+
'lmgamma',
|
| 210 |
+
'log',
|
| 211 |
+
'log10',
|
| 212 |
+
'log1m',
|
| 213 |
+
'log1m_exp',
|
| 214 |
+
'log1m_inv_logit',
|
| 215 |
+
'log1p',
|
| 216 |
+
'log1p_exp',
|
| 217 |
+
'log2',
|
| 218 |
+
'log_determinant',
|
| 219 |
+
'log_diff_exp',
|
| 220 |
+
'log_falling_factorial',
|
| 221 |
+
'log_inv_logit',
|
| 222 |
+
'log_mix',
|
| 223 |
+
'log_rising_factorial',
|
| 224 |
+
'log_softmax',
|
| 225 |
+
'log_sum_exp',
|
| 226 |
+
'logistic_ccdf_log',
|
| 227 |
+
'logistic_cdf',
|
| 228 |
+
'logistic_cdf_log',
|
| 229 |
+
'logistic_log',
|
| 230 |
+
'logistic_rng',
|
| 231 |
+
'logit',
|
| 232 |
+
'lognormal_ccdf_log',
|
| 233 |
+
'lognormal_cdf',
|
| 234 |
+
'lognormal_cdf_log',
|
| 235 |
+
'lognormal_log',
|
| 236 |
+
'lognormal_rng',
|
| 237 |
+
'machine_precision',
|
| 238 |
+
'max',
|
| 239 |
+
'mdivide_left_tri_low',
|
| 240 |
+
'mdivide_right_tri_low',
|
| 241 |
+
'mean',
|
| 242 |
+
'min',
|
| 243 |
+
'modified_bessel_first_kind',
|
| 244 |
+
'modified_bessel_second_kind',
|
| 245 |
+
'multi_gp_cholesky_log',
|
| 246 |
+
'multi_gp_log',
|
| 247 |
+
'multi_normal_cholesky_log',
|
| 248 |
+
'multi_normal_cholesky_rng',
|
| 249 |
+
'multi_normal_log',
|
| 250 |
+
'multi_normal_prec_log',
|
| 251 |
+
'multi_normal_rng',
|
| 252 |
+
'multi_student_t_log',
|
| 253 |
+
'multi_student_t_rng',
|
| 254 |
+
'multinomial_log',
|
| 255 |
+
'multinomial_rng',
|
| 256 |
+
'multiply_log',
|
| 257 |
+
'multiply_lower_tri_self_transpose',
|
| 258 |
+
'neg_binomial_2_ccdf_log',
|
| 259 |
+
'neg_binomial_2_cdf',
|
| 260 |
+
'neg_binomial_2_cdf_log',
|
| 261 |
+
'neg_binomial_2_log',
|
| 262 |
+
'neg_binomial_2_log_log',
|
| 263 |
+
'neg_binomial_2_log_rng',
|
| 264 |
+
'neg_binomial_2_rng',
|
| 265 |
+
'neg_binomial_ccdf_log',
|
| 266 |
+
'neg_binomial_cdf',
|
| 267 |
+
'neg_binomial_cdf_log',
|
| 268 |
+
'neg_binomial_log',
|
| 269 |
+
'neg_binomial_rng',
|
| 270 |
+
'negative_infinity',
|
| 271 |
+
'normal_ccdf_log',
|
| 272 |
+
'normal_cdf',
|
| 273 |
+
'normal_cdf_log',
|
| 274 |
+
'normal_log',
|
| 275 |
+
'normal_rng',
|
| 276 |
+
'not_a_number',
|
| 277 |
+
'num_elements',
|
| 278 |
+
'ordered_logistic_log',
|
| 279 |
+
'ordered_logistic_rng',
|
| 280 |
+
'owens_t',
|
| 281 |
+
'pareto_ccdf_log',
|
| 282 |
+
'pareto_cdf',
|
| 283 |
+
'pareto_cdf_log',
|
| 284 |
+
'pareto_log',
|
| 285 |
+
'pareto_rng',
|
| 286 |
+
'pareto_type_2_ccdf_log',
|
| 287 |
+
'pareto_type_2_cdf',
|
| 288 |
+
'pareto_type_2_cdf_log',
|
| 289 |
+
'pareto_type_2_log',
|
| 290 |
+
'pareto_type_2_rng',
|
| 291 |
+
'pi',
|
| 292 |
+
'poisson_ccdf_log',
|
| 293 |
+
'poisson_cdf',
|
| 294 |
+
'poisson_cdf_log',
|
| 295 |
+
'poisson_log',
|
| 296 |
+
'poisson_log_log',
|
| 297 |
+
'poisson_log_rng',
|
| 298 |
+
'poisson_rng',
|
| 299 |
+
'positive_infinity',
|
| 300 |
+
'pow',
|
| 301 |
+
'prod',
|
| 302 |
+
'qr_Q',
|
| 303 |
+
'qr_R',
|
| 304 |
+
'quad_form',
|
| 305 |
+
'quad_form_diag',
|
| 306 |
+
'quad_form_sym',
|
| 307 |
+
'rank',
|
| 308 |
+
'rayleigh_ccdf_log',
|
| 309 |
+
'rayleigh_cdf',
|
| 310 |
+
'rayleigh_cdf_log',
|
| 311 |
+
'rayleigh_log',
|
| 312 |
+
'rayleigh_rng',
|
| 313 |
+
'rep_array',
|
| 314 |
+
'rep_matrix',
|
| 315 |
+
'rep_row_vector',
|
| 316 |
+
'rep_vector',
|
| 317 |
+
'rising_factorial',
|
| 318 |
+
'round',
|
| 319 |
+
'row',
|
| 320 |
+
'rows',
|
| 321 |
+
'rows_dot_product',
|
| 322 |
+
'rows_dot_self',
|
| 323 |
+
'scaled_inv_chi_square_ccdf_log',
|
| 324 |
+
'scaled_inv_chi_square_cdf',
|
| 325 |
+
'scaled_inv_chi_square_cdf_log',
|
| 326 |
+
'scaled_inv_chi_square_log',
|
| 327 |
+
'scaled_inv_chi_square_rng',
|
| 328 |
+
'sd',
|
| 329 |
+
'segment',
|
| 330 |
+
'sin',
|
| 331 |
+
'singular_values',
|
| 332 |
+
'sinh',
|
| 333 |
+
'size',
|
| 334 |
+
'skew_normal_ccdf_log',
|
| 335 |
+
'skew_normal_cdf',
|
| 336 |
+
'skew_normal_cdf_log',
|
| 337 |
+
'skew_normal_log',
|
| 338 |
+
'skew_normal_rng',
|
| 339 |
+
'softmax',
|
| 340 |
+
'sort_asc',
|
| 341 |
+
'sort_desc',
|
| 342 |
+
'sort_indices_asc',
|
| 343 |
+
'sort_indices_desc',
|
| 344 |
+
'sqrt',
|
| 345 |
+
'sqrt2',
|
| 346 |
+
'square',
|
| 347 |
+
'squared_distance',
|
| 348 |
+
'step',
|
| 349 |
+
'student_t_ccdf_log',
|
| 350 |
+
'student_t_cdf',
|
| 351 |
+
'student_t_cdf_log',
|
| 352 |
+
'student_t_log',
|
| 353 |
+
'student_t_rng',
|
| 354 |
+
'sub_col',
|
| 355 |
+
'sub_row',
|
| 356 |
+
'sum',
|
| 357 |
+
'tail',
|
| 358 |
+
'tan',
|
| 359 |
+
'tanh',
|
| 360 |
+
'tcrossprod',
|
| 361 |
+
'tgamma',
|
| 362 |
+
'to_array_1d',
|
| 363 |
+
'to_array_2d',
|
| 364 |
+
'to_matrix',
|
| 365 |
+
'to_row_vector',
|
| 366 |
+
'to_vector',
|
| 367 |
+
'trace',
|
| 368 |
+
'trace_gen_quad_form',
|
| 369 |
+
'trace_quad_form',
|
| 370 |
+
'trigamma',
|
| 371 |
+
'trunc',
|
| 372 |
+
'uniform_ccdf_log',
|
| 373 |
+
'uniform_cdf',
|
| 374 |
+
'uniform_cdf_log',
|
| 375 |
+
'uniform_log',
|
| 376 |
+
'uniform_rng',
|
| 377 |
+
'variance',
|
| 378 |
+
'von_mises_log',
|
| 379 |
+
'von_mises_rng',
|
| 380 |
+
'weibull_ccdf_log',
|
| 381 |
+
'weibull_cdf',
|
| 382 |
+
'weibull_cdf_log',
|
| 383 |
+
'weibull_log',
|
| 384 |
+
'weibull_rng',
|
| 385 |
+
'wiener_log',
|
| 386 |
+
'wishart_log',
|
| 387 |
+
'wishart_rng'
|
| 388 |
+
)
|
| 389 |
+
|
| 390 |
+
DISTRIBUTIONS = (
|
| 391 |
+
'bernoulli',
|
| 392 |
+
'bernoulli_logit',
|
| 393 |
+
'beta',
|
| 394 |
+
'beta_binomial',
|
| 395 |
+
'binomial',
|
| 396 |
+
'binomial_logit',
|
| 397 |
+
'categorical',
|
| 398 |
+
'categorical_logit',
|
| 399 |
+
'cauchy',
|
| 400 |
+
'chi_square',
|
| 401 |
+
'dirichlet',
|
| 402 |
+
'double_exponential',
|
| 403 |
+
'exp_mod_normal',
|
| 404 |
+
'exponential',
|
| 405 |
+
'frechet',
|
| 406 |
+
'gamma',
|
| 407 |
+
'gaussian_dlm_obs',
|
| 408 |
+
'gumbel',
|
| 409 |
+
'hypergeometric',
|
| 410 |
+
'inv_chi_square',
|
| 411 |
+
'inv_gamma',
|
| 412 |
+
'inv_wishart',
|
| 413 |
+
'lkj_corr',
|
| 414 |
+
'lkj_corr_cholesky',
|
| 415 |
+
'logistic',
|
| 416 |
+
'lognormal',
|
| 417 |
+
'multi_gp',
|
| 418 |
+
'multi_gp_cholesky',
|
| 419 |
+
'multi_normal',
|
| 420 |
+
'multi_normal_cholesky',
|
| 421 |
+
'multi_normal_prec',
|
| 422 |
+
'multi_student_t',
|
| 423 |
+
'multinomial',
|
| 424 |
+
'neg_binomial',
|
| 425 |
+
'neg_binomial_2',
|
| 426 |
+
'neg_binomial_2_log',
|
| 427 |
+
'normal',
|
| 428 |
+
'ordered_logistic',
|
| 429 |
+
'pareto',
|
| 430 |
+
'pareto_type_2',
|
| 431 |
+
'poisson',
|
| 432 |
+
'poisson_log',
|
| 433 |
+
'rayleigh',
|
| 434 |
+
'scaled_inv_chi_square',
|
| 435 |
+
'skew_normal',
|
| 436 |
+
'student_t',
|
| 437 |
+
'uniform',
|
| 438 |
+
'von_mises',
|
| 439 |
+
'weibull',
|
| 440 |
+
'wiener',
|
| 441 |
+
'wishart'
|
| 442 |
+
)
|
| 443 |
+
|
| 444 |
+
RESERVED = (
|
| 445 |
+
'alignas',
|
| 446 |
+
'alignof',
|
| 447 |
+
'and',
|
| 448 |
+
'and_eq',
|
| 449 |
+
'asm',
|
| 450 |
+
'auto',
|
| 451 |
+
'bitand',
|
| 452 |
+
'bitor',
|
| 453 |
+
'bool',
|
| 454 |
+
'break',
|
| 455 |
+
'case',
|
| 456 |
+
'catch',
|
| 457 |
+
'char',
|
| 458 |
+
'char16_t',
|
| 459 |
+
'char32_t',
|
| 460 |
+
'class',
|
| 461 |
+
'compl',
|
| 462 |
+
'const',
|
| 463 |
+
'const_cast',
|
| 464 |
+
'constexpr',
|
| 465 |
+
'continue',
|
| 466 |
+
'decltype',
|
| 467 |
+
'default',
|
| 468 |
+
'delete',
|
| 469 |
+
'do',
|
| 470 |
+
'double',
|
| 471 |
+
'dynamic_cast',
|
| 472 |
+
'enum',
|
| 473 |
+
'explicit',
|
| 474 |
+
'export',
|
| 475 |
+
'extern',
|
| 476 |
+
'false',
|
| 477 |
+
'false',
|
| 478 |
+
'float',
|
| 479 |
+
'friend',
|
| 480 |
+
'fvar',
|
| 481 |
+
'goto',
|
| 482 |
+
'inline',
|
| 483 |
+
'int',
|
| 484 |
+
'long',
|
| 485 |
+
'mutable',
|
| 486 |
+
'namespace',
|
| 487 |
+
'new',
|
| 488 |
+
'noexcept',
|
| 489 |
+
'not',
|
| 490 |
+
'not_eq',
|
| 491 |
+
'nullptr',
|
| 492 |
+
'operator',
|
| 493 |
+
'or',
|
| 494 |
+
'or_eq',
|
| 495 |
+
'private',
|
| 496 |
+
'protected',
|
| 497 |
+
'public',
|
| 498 |
+
'register',
|
| 499 |
+
'reinterpret_cast',
|
| 500 |
+
'repeat',
|
| 501 |
+
'short',
|
| 502 |
+
'signed',
|
| 503 |
+
'sizeof',
|
| 504 |
+
'static',
|
| 505 |
+
'static_assert',
|
| 506 |
+
'static_cast',
|
| 507 |
+
'struct',
|
| 508 |
+
'switch',
|
| 509 |
+
'template',
|
| 510 |
+
'then',
|
| 511 |
+
'this',
|
| 512 |
+
'thread_local',
|
| 513 |
+
'throw',
|
| 514 |
+
'true',
|
| 515 |
+
'true',
|
| 516 |
+
'try',
|
| 517 |
+
'typedef',
|
| 518 |
+
'typeid',
|
| 519 |
+
'typename',
|
| 520 |
+
'union',
|
| 521 |
+
'unsigned',
|
| 522 |
+
'until',
|
| 523 |
+
'using',
|
| 524 |
+
'var',
|
| 525 |
+
'virtual',
|
| 526 |
+
'void',
|
| 527 |
+
'volatile',
|
| 528 |
+
'wchar_t',
|
| 529 |
+
'xor',
|
| 530 |
+
'xor_eq'
|
| 531 |
+
)
|
| 532 |
+
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/_tsql_builtins.py
ADDED
|
@@ -0,0 +1,1004 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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, see AUTHORS.
|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
# See https://msdn.microsoft.com/en-us/library/ms174986.aspx.
|
| 13 |
+
OPERATORS = (
|
| 14 |
+
'!<',
|
| 15 |
+
'!=',
|
| 16 |
+
'!>',
|
| 17 |
+
'<',
|
| 18 |
+
'<=',
|
| 19 |
+
'<>',
|
| 20 |
+
'=',
|
| 21 |
+
'>',
|
| 22 |
+
'>=',
|
| 23 |
+
'+',
|
| 24 |
+
'+=',
|
| 25 |
+
'-',
|
| 26 |
+
'-=',
|
| 27 |
+
'*',
|
| 28 |
+
'*=',
|
| 29 |
+
'/',
|
| 30 |
+
'/=',
|
| 31 |
+
'%',
|
| 32 |
+
'%=',
|
| 33 |
+
'&',
|
| 34 |
+
'&=',
|
| 35 |
+
'|',
|
| 36 |
+
'|=',
|
| 37 |
+
'^',
|
| 38 |
+
'^=',
|
| 39 |
+
'~',
|
| 40 |
+
'::',
|
| 41 |
+
)
|
| 42 |
+
|
| 43 |
+
OPERATOR_WORDS = (
|
| 44 |
+
'all',
|
| 45 |
+
'and',
|
| 46 |
+
'any',
|
| 47 |
+
'between',
|
| 48 |
+
'except',
|
| 49 |
+
'exists',
|
| 50 |
+
'in',
|
| 51 |
+
'intersect',
|
| 52 |
+
'like',
|
| 53 |
+
'not',
|
| 54 |
+
'or',
|
| 55 |
+
'some',
|
| 56 |
+
'union',
|
| 57 |
+
)
|
| 58 |
+
|
| 59 |
+
_KEYWORDS_SERVER = (
|
| 60 |
+
'add',
|
| 61 |
+
'all',
|
| 62 |
+
'alter',
|
| 63 |
+
'and',
|
| 64 |
+
'any',
|
| 65 |
+
'as',
|
| 66 |
+
'asc',
|
| 67 |
+
'authorization',
|
| 68 |
+
'backup',
|
| 69 |
+
'begin',
|
| 70 |
+
'between',
|
| 71 |
+
'break',
|
| 72 |
+
'browse',
|
| 73 |
+
'bulk',
|
| 74 |
+
'by',
|
| 75 |
+
'cascade',
|
| 76 |
+
'case',
|
| 77 |
+
'catch',
|
| 78 |
+
'check',
|
| 79 |
+
'checkpoint',
|
| 80 |
+
'close',
|
| 81 |
+
'clustered',
|
| 82 |
+
'coalesce',
|
| 83 |
+
'collate',
|
| 84 |
+
'column',
|
| 85 |
+
'commit',
|
| 86 |
+
'compute',
|
| 87 |
+
'constraint',
|
| 88 |
+
'contains',
|
| 89 |
+
'containstable',
|
| 90 |
+
'continue',
|
| 91 |
+
'convert',
|
| 92 |
+
'create',
|
| 93 |
+
'cross',
|
| 94 |
+
'current',
|
| 95 |
+
'current_date',
|
| 96 |
+
'current_time',
|
| 97 |
+
'current_timestamp',
|
| 98 |
+
'current_user',
|
| 99 |
+
'cursor',
|
| 100 |
+
'database',
|
| 101 |
+
'dbcc',
|
| 102 |
+
'deallocate',
|
| 103 |
+
'declare',
|
| 104 |
+
'default',
|
| 105 |
+
'delete',
|
| 106 |
+
'deny',
|
| 107 |
+
'desc',
|
| 108 |
+
'disk',
|
| 109 |
+
'distinct',
|
| 110 |
+
'distributed',
|
| 111 |
+
'double',
|
| 112 |
+
'drop',
|
| 113 |
+
'dump',
|
| 114 |
+
'else',
|
| 115 |
+
'end',
|
| 116 |
+
'errlvl',
|
| 117 |
+
'escape',
|
| 118 |
+
'except',
|
| 119 |
+
'exec',
|
| 120 |
+
'execute',
|
| 121 |
+
'exists',
|
| 122 |
+
'exit',
|
| 123 |
+
'external',
|
| 124 |
+
'fetch',
|
| 125 |
+
'file',
|
| 126 |
+
'fillfactor',
|
| 127 |
+
'for',
|
| 128 |
+
'foreign',
|
| 129 |
+
'freetext',
|
| 130 |
+
'freetexttable',
|
| 131 |
+
'from',
|
| 132 |
+
'full',
|
| 133 |
+
'function',
|
| 134 |
+
'goto',
|
| 135 |
+
'grant',
|
| 136 |
+
'group',
|
| 137 |
+
'having',
|
| 138 |
+
'holdlock',
|
| 139 |
+
'identity',
|
| 140 |
+
'identity_insert',
|
| 141 |
+
'identitycol',
|
| 142 |
+
'if',
|
| 143 |
+
'in',
|
| 144 |
+
'index',
|
| 145 |
+
'inner',
|
| 146 |
+
'insert',
|
| 147 |
+
'intersect',
|
| 148 |
+
'into',
|
| 149 |
+
'is',
|
| 150 |
+
'join',
|
| 151 |
+
'key',
|
| 152 |
+
'kill',
|
| 153 |
+
'left',
|
| 154 |
+
'like',
|
| 155 |
+
'lineno',
|
| 156 |
+
'load',
|
| 157 |
+
'merge',
|
| 158 |
+
'national',
|
| 159 |
+
'nocheck',
|
| 160 |
+
'nonclustered',
|
| 161 |
+
'not',
|
| 162 |
+
'null',
|
| 163 |
+
'nullif',
|
| 164 |
+
'of',
|
| 165 |
+
'off',
|
| 166 |
+
'offsets',
|
| 167 |
+
'on',
|
| 168 |
+
'open',
|
| 169 |
+
'opendatasource',
|
| 170 |
+
'openquery',
|
| 171 |
+
'openrowset',
|
| 172 |
+
'openxml',
|
| 173 |
+
'option',
|
| 174 |
+
'or',
|
| 175 |
+
'order',
|
| 176 |
+
'outer',
|
| 177 |
+
'over',
|
| 178 |
+
'percent',
|
| 179 |
+
'pivot',
|
| 180 |
+
'plan',
|
| 181 |
+
'precision',
|
| 182 |
+
'primary',
|
| 183 |
+
'print',
|
| 184 |
+
'proc',
|
| 185 |
+
'procedure',
|
| 186 |
+
'public',
|
| 187 |
+
'raiserror',
|
| 188 |
+
'read',
|
| 189 |
+
'readtext',
|
| 190 |
+
'reconfigure',
|
| 191 |
+
'references',
|
| 192 |
+
'replication',
|
| 193 |
+
'restore',
|
| 194 |
+
'restrict',
|
| 195 |
+
'return',
|
| 196 |
+
'revert',
|
| 197 |
+
'revoke',
|
| 198 |
+
'right',
|
| 199 |
+
'rollback',
|
| 200 |
+
'rowcount',
|
| 201 |
+
'rowguidcol',
|
| 202 |
+
'rule',
|
| 203 |
+
'save',
|
| 204 |
+
'schema',
|
| 205 |
+
'securityaudit',
|
| 206 |
+
'select',
|
| 207 |
+
'semantickeyphrasetable',
|
| 208 |
+
'semanticsimilaritydetailstable',
|
| 209 |
+
'semanticsimilaritytable',
|
| 210 |
+
'session_user',
|
| 211 |
+
'set',
|
| 212 |
+
'setuser',
|
| 213 |
+
'shutdown',
|
| 214 |
+
'some',
|
| 215 |
+
'statistics',
|
| 216 |
+
'system_user',
|
| 217 |
+
'table',
|
| 218 |
+
'tablesample',
|
| 219 |
+
'textsize',
|
| 220 |
+
'then',
|
| 221 |
+
'throw',
|
| 222 |
+
'to',
|
| 223 |
+
'top',
|
| 224 |
+
'tran',
|
| 225 |
+
'transaction',
|
| 226 |
+
'trigger',
|
| 227 |
+
'truncate',
|
| 228 |
+
'try',
|
| 229 |
+
'try_convert',
|
| 230 |
+
'tsequal',
|
| 231 |
+
'union',
|
| 232 |
+
'unique',
|
| 233 |
+
'unpivot',
|
| 234 |
+
'update',
|
| 235 |
+
'updatetext',
|
| 236 |
+
'use',
|
| 237 |
+
'user',
|
| 238 |
+
'values',
|
| 239 |
+
'varying',
|
| 240 |
+
'view',
|
| 241 |
+
'waitfor',
|
| 242 |
+
'when',
|
| 243 |
+
'where',
|
| 244 |
+
'while',
|
| 245 |
+
'with',
|
| 246 |
+
'within',
|
| 247 |
+
'writetext',
|
| 248 |
+
)
|
| 249 |
+
|
| 250 |
+
_KEYWORDS_FUTURE = (
|
| 251 |
+
'absolute',
|
| 252 |
+
'action',
|
| 253 |
+
'admin',
|
| 254 |
+
'after',
|
| 255 |
+
'aggregate',
|
| 256 |
+
'alias',
|
| 257 |
+
'allocate',
|
| 258 |
+
'are',
|
| 259 |
+
'array',
|
| 260 |
+
'asensitive',
|
| 261 |
+
'assertion',
|
| 262 |
+
'asymmetric',
|
| 263 |
+
'at',
|
| 264 |
+
'atomic',
|
| 265 |
+
'before',
|
| 266 |
+
'binary',
|
| 267 |
+
'bit',
|
| 268 |
+
'blob',
|
| 269 |
+
'boolean',
|
| 270 |
+
'both',
|
| 271 |
+
'breadth',
|
| 272 |
+
'call',
|
| 273 |
+
'called',
|
| 274 |
+
'cardinality',
|
| 275 |
+
'cascaded',
|
| 276 |
+
'cast',
|
| 277 |
+
'catalog',
|
| 278 |
+
'char',
|
| 279 |
+
'character',
|
| 280 |
+
'class',
|
| 281 |
+
'clob',
|
| 282 |
+
'collation',
|
| 283 |
+
'collect',
|
| 284 |
+
'completion',
|
| 285 |
+
'condition',
|
| 286 |
+
'connect',
|
| 287 |
+
'connection',
|
| 288 |
+
'constraints',
|
| 289 |
+
'constructor',
|
| 290 |
+
'corr',
|
| 291 |
+
'corresponding',
|
| 292 |
+
'covar_pop',
|
| 293 |
+
'covar_samp',
|
| 294 |
+
'cube',
|
| 295 |
+
'cume_dist',
|
| 296 |
+
'current_catalog',
|
| 297 |
+
'current_default_transform_group',
|
| 298 |
+
'current_path',
|
| 299 |
+
'current_role',
|
| 300 |
+
'current_schema',
|
| 301 |
+
'current_transform_group_for_type',
|
| 302 |
+
'cycle',
|
| 303 |
+
'data',
|
| 304 |
+
'date',
|
| 305 |
+
'day',
|
| 306 |
+
'dec',
|
| 307 |
+
'decimal',
|
| 308 |
+
'deferrable',
|
| 309 |
+
'deferred',
|
| 310 |
+
'depth',
|
| 311 |
+
'deref',
|
| 312 |
+
'describe',
|
| 313 |
+
'descriptor',
|
| 314 |
+
'destroy',
|
| 315 |
+
'destructor',
|
| 316 |
+
'deterministic',
|
| 317 |
+
'diagnostics',
|
| 318 |
+
'dictionary',
|
| 319 |
+
'disconnect',
|
| 320 |
+
'domain',
|
| 321 |
+
'dynamic',
|
| 322 |
+
'each',
|
| 323 |
+
'element',
|
| 324 |
+
'end-exec',
|
| 325 |
+
'equals',
|
| 326 |
+
'every',
|
| 327 |
+
'exception',
|
| 328 |
+
'false',
|
| 329 |
+
'filter',
|
| 330 |
+
'first',
|
| 331 |
+
'float',
|
| 332 |
+
'found',
|
| 333 |
+
'free',
|
| 334 |
+
'fulltexttable',
|
| 335 |
+
'fusion',
|
| 336 |
+
'general',
|
| 337 |
+
'get',
|
| 338 |
+
'global',
|
| 339 |
+
'go',
|
| 340 |
+
'grouping',
|
| 341 |
+
'hold',
|
| 342 |
+
'host',
|
| 343 |
+
'hour',
|
| 344 |
+
'ignore',
|
| 345 |
+
'immediate',
|
| 346 |
+
'indicator',
|
| 347 |
+
'initialize',
|
| 348 |
+
'initially',
|
| 349 |
+
'inout',
|
| 350 |
+
'input',
|
| 351 |
+
'int',
|
| 352 |
+
'integer',
|
| 353 |
+
'intersection',
|
| 354 |
+
'interval',
|
| 355 |
+
'isolation',
|
| 356 |
+
'iterate',
|
| 357 |
+
'language',
|
| 358 |
+
'large',
|
| 359 |
+
'last',
|
| 360 |
+
'lateral',
|
| 361 |
+
'leading',
|
| 362 |
+
'less',
|
| 363 |
+
'level',
|
| 364 |
+
'like_regex',
|
| 365 |
+
'limit',
|
| 366 |
+
'ln',
|
| 367 |
+
'local',
|
| 368 |
+
'localtime',
|
| 369 |
+
'localtimestamp',
|
| 370 |
+
'locator',
|
| 371 |
+
'map',
|
| 372 |
+
'match',
|
| 373 |
+
'member',
|
| 374 |
+
'method',
|
| 375 |
+
'minute',
|
| 376 |
+
'mod',
|
| 377 |
+
'modifies',
|
| 378 |
+
'modify',
|
| 379 |
+
'module',
|
| 380 |
+
'month',
|
| 381 |
+
'multiset',
|
| 382 |
+
'names',
|
| 383 |
+
'natural',
|
| 384 |
+
'nchar',
|
| 385 |
+
'nclob',
|
| 386 |
+
'new',
|
| 387 |
+
'next',
|
| 388 |
+
'no',
|
| 389 |
+
'none',
|
| 390 |
+
'normalize',
|
| 391 |
+
'numeric',
|
| 392 |
+
'object',
|
| 393 |
+
'occurrences_regex',
|
| 394 |
+
'old',
|
| 395 |
+
'only',
|
| 396 |
+
'operation',
|
| 397 |
+
'ordinality',
|
| 398 |
+
'out',
|
| 399 |
+
'output',
|
| 400 |
+
'overlay',
|
| 401 |
+
'pad',
|
| 402 |
+
'parameter',
|
| 403 |
+
'parameters',
|
| 404 |
+
'partial',
|
| 405 |
+
'partition',
|
| 406 |
+
'path',
|
| 407 |
+
'percent_rank',
|
| 408 |
+
'percentile_cont',
|
| 409 |
+
'percentile_disc',
|
| 410 |
+
'position_regex',
|
| 411 |
+
'postfix',
|
| 412 |
+
'prefix',
|
| 413 |
+
'preorder',
|
| 414 |
+
'prepare',
|
| 415 |
+
'preserve',
|
| 416 |
+
'prior',
|
| 417 |
+
'privileges',
|
| 418 |
+
'range',
|
| 419 |
+
'reads',
|
| 420 |
+
'real',
|
| 421 |
+
'recursive',
|
| 422 |
+
'ref',
|
| 423 |
+
'referencing',
|
| 424 |
+
'regr_avgx',
|
| 425 |
+
'regr_avgy',
|
| 426 |
+
'regr_count',
|
| 427 |
+
'regr_intercept',
|
| 428 |
+
'regr_r2',
|
| 429 |
+
'regr_slope',
|
| 430 |
+
'regr_sxx',
|
| 431 |
+
'regr_sxy',
|
| 432 |
+
'regr_syy',
|
| 433 |
+
'relative',
|
| 434 |
+
'release',
|
| 435 |
+
'result',
|
| 436 |
+
'returns',
|
| 437 |
+
'role',
|
| 438 |
+
'rollup',
|
| 439 |
+
'routine',
|
| 440 |
+
'row',
|
| 441 |
+
'rows',
|
| 442 |
+
'savepoint',
|
| 443 |
+
'scope',
|
| 444 |
+
'scroll',
|
| 445 |
+
'search',
|
| 446 |
+
'second',
|
| 447 |
+
'section',
|
| 448 |
+
'sensitive',
|
| 449 |
+
'sequence',
|
| 450 |
+
'session',
|
| 451 |
+
'sets',
|
| 452 |
+
'similar',
|
| 453 |
+
'size',
|
| 454 |
+
'smallint',
|
| 455 |
+
'space',
|
| 456 |
+
'specific',
|
| 457 |
+
'specifictype',
|
| 458 |
+
'sql',
|
| 459 |
+
'sqlexception',
|
| 460 |
+
'sqlstate',
|
| 461 |
+
'sqlwarning',
|
| 462 |
+
'start',
|
| 463 |
+
'state',
|
| 464 |
+
'statement',
|
| 465 |
+
'static',
|
| 466 |
+
'stddev_pop',
|
| 467 |
+
'stddev_samp',
|
| 468 |
+
'structure',
|
| 469 |
+
'submultiset',
|
| 470 |
+
'substring_regex',
|
| 471 |
+
'symmetric',
|
| 472 |
+
'system',
|
| 473 |
+
'temporary',
|
| 474 |
+
'terminate',
|
| 475 |
+
'than',
|
| 476 |
+
'time',
|
| 477 |
+
'timestamp',
|
| 478 |
+
'timezone_hour',
|
| 479 |
+
'timezone_minute',
|
| 480 |
+
'trailing',
|
| 481 |
+
'translate_regex',
|
| 482 |
+
'translation',
|
| 483 |
+
'treat',
|
| 484 |
+
'true',
|
| 485 |
+
'uescape',
|
| 486 |
+
'under',
|
| 487 |
+
'unknown',
|
| 488 |
+
'unnest',
|
| 489 |
+
'usage',
|
| 490 |
+
'using',
|
| 491 |
+
'value',
|
| 492 |
+
'var_pop',
|
| 493 |
+
'var_samp',
|
| 494 |
+
'varchar',
|
| 495 |
+
'variable',
|
| 496 |
+
'whenever',
|
| 497 |
+
'width_bucket',
|
| 498 |
+
'window',
|
| 499 |
+
'within',
|
| 500 |
+
'without',
|
| 501 |
+
'work',
|
| 502 |
+
'write',
|
| 503 |
+
'xmlagg',
|
| 504 |
+
'xmlattributes',
|
| 505 |
+
'xmlbinary',
|
| 506 |
+
'xmlcast',
|
| 507 |
+
'xmlcomment',
|
| 508 |
+
'xmlconcat',
|
| 509 |
+
'xmldocument',
|
| 510 |
+
'xmlelement',
|
| 511 |
+
'xmlexists',
|
| 512 |
+
'xmlforest',
|
| 513 |
+
'xmliterate',
|
| 514 |
+
'xmlnamespaces',
|
| 515 |
+
'xmlparse',
|
| 516 |
+
'xmlpi',
|
| 517 |
+
'xmlquery',
|
| 518 |
+
'xmlserialize',
|
| 519 |
+
'xmltable',
|
| 520 |
+
'xmltext',
|
| 521 |
+
'xmlvalidate',
|
| 522 |
+
'year',
|
| 523 |
+
'zone',
|
| 524 |
+
)
|
| 525 |
+
|
| 526 |
+
_KEYWORDS_ODBC = (
|
| 527 |
+
'absolute',
|
| 528 |
+
'action',
|
| 529 |
+
'ada',
|
| 530 |
+
'add',
|
| 531 |
+
'all',
|
| 532 |
+
'allocate',
|
| 533 |
+
'alter',
|
| 534 |
+
'and',
|
| 535 |
+
'any',
|
| 536 |
+
'are',
|
| 537 |
+
'as',
|
| 538 |
+
'asc',
|
| 539 |
+
'assertion',
|
| 540 |
+
'at',
|
| 541 |
+
'authorization',
|
| 542 |
+
'avg',
|
| 543 |
+
'begin',
|
| 544 |
+
'between',
|
| 545 |
+
'bit',
|
| 546 |
+
'bit_length',
|
| 547 |
+
'both',
|
| 548 |
+
'by',
|
| 549 |
+
'cascade',
|
| 550 |
+
'cascaded',
|
| 551 |
+
'case',
|
| 552 |
+
'cast',
|
| 553 |
+
'catalog',
|
| 554 |
+
'char',
|
| 555 |
+
'char_length',
|
| 556 |
+
'character',
|
| 557 |
+
'character_length',
|
| 558 |
+
'check',
|
| 559 |
+
'close',
|
| 560 |
+
'coalesce',
|
| 561 |
+
'collate',
|
| 562 |
+
'collation',
|
| 563 |
+
'column',
|
| 564 |
+
'commit',
|
| 565 |
+
'connect',
|
| 566 |
+
'connection',
|
| 567 |
+
'constraint',
|
| 568 |
+
'constraints',
|
| 569 |
+
'continue',
|
| 570 |
+
'convert',
|
| 571 |
+
'corresponding',
|
| 572 |
+
'count',
|
| 573 |
+
'create',
|
| 574 |
+
'cross',
|
| 575 |
+
'current',
|
| 576 |
+
'current_date',
|
| 577 |
+
'current_time',
|
| 578 |
+
'current_timestamp',
|
| 579 |
+
'current_user',
|
| 580 |
+
'cursor',
|
| 581 |
+
'date',
|
| 582 |
+
'day',
|
| 583 |
+
'deallocate',
|
| 584 |
+
'dec',
|
| 585 |
+
'decimal',
|
| 586 |
+
'declare',
|
| 587 |
+
'default',
|
| 588 |
+
'deferrable',
|
| 589 |
+
'deferred',
|
| 590 |
+
'delete',
|
| 591 |
+
'desc',
|
| 592 |
+
'describe',
|
| 593 |
+
'descriptor',
|
| 594 |
+
'diagnostics',
|
| 595 |
+
'disconnect',
|
| 596 |
+
'distinct',
|
| 597 |
+
'domain',
|
| 598 |
+
'double',
|
| 599 |
+
'drop',
|
| 600 |
+
'else',
|
| 601 |
+
'end',
|
| 602 |
+
'end-exec',
|
| 603 |
+
'escape',
|
| 604 |
+
'except',
|
| 605 |
+
'exception',
|
| 606 |
+
'exec',
|
| 607 |
+
'execute',
|
| 608 |
+
'exists',
|
| 609 |
+
'external',
|
| 610 |
+
'extract',
|
| 611 |
+
'false',
|
| 612 |
+
'fetch',
|
| 613 |
+
'first',
|
| 614 |
+
'float',
|
| 615 |
+
'for',
|
| 616 |
+
'foreign',
|
| 617 |
+
'fortran',
|
| 618 |
+
'found',
|
| 619 |
+
'from',
|
| 620 |
+
'full',
|
| 621 |
+
'get',
|
| 622 |
+
'global',
|
| 623 |
+
'go',
|
| 624 |
+
'goto',
|
| 625 |
+
'grant',
|
| 626 |
+
'group',
|
| 627 |
+
'having',
|
| 628 |
+
'hour',
|
| 629 |
+
'identity',
|
| 630 |
+
'immediate',
|
| 631 |
+
'in',
|
| 632 |
+
'include',
|
| 633 |
+
'index',
|
| 634 |
+
'indicator',
|
| 635 |
+
'initially',
|
| 636 |
+
'inner',
|
| 637 |
+
'input',
|
| 638 |
+
'insensitive',
|
| 639 |
+
'insert',
|
| 640 |
+
'int',
|
| 641 |
+
'integer',
|
| 642 |
+
'intersect',
|
| 643 |
+
'interval',
|
| 644 |
+
'into',
|
| 645 |
+
'is',
|
| 646 |
+
'isolation',
|
| 647 |
+
'join',
|
| 648 |
+
'key',
|
| 649 |
+
'language',
|
| 650 |
+
'last',
|
| 651 |
+
'leading',
|
| 652 |
+
'left',
|
| 653 |
+
'level',
|
| 654 |
+
'like',
|
| 655 |
+
'local',
|
| 656 |
+
'lower',
|
| 657 |
+
'match',
|
| 658 |
+
'max',
|
| 659 |
+
'min',
|
| 660 |
+
'minute',
|
| 661 |
+
'module',
|
| 662 |
+
'month',
|
| 663 |
+
'names',
|
| 664 |
+
'national',
|
| 665 |
+
'natural',
|
| 666 |
+
'nchar',
|
| 667 |
+
'next',
|
| 668 |
+
'no',
|
| 669 |
+
'none',
|
| 670 |
+
'not',
|
| 671 |
+
'null',
|
| 672 |
+
'nullif',
|
| 673 |
+
'numeric',
|
| 674 |
+
'octet_length',
|
| 675 |
+
'of',
|
| 676 |
+
'on',
|
| 677 |
+
'only',
|
| 678 |
+
'open',
|
| 679 |
+
'option',
|
| 680 |
+
'or',
|
| 681 |
+
'order',
|
| 682 |
+
'outer',
|
| 683 |
+
'output',
|
| 684 |
+
'overlaps',
|
| 685 |
+
'pad',
|
| 686 |
+
'partial',
|
| 687 |
+
'pascal',
|
| 688 |
+
'position',
|
| 689 |
+
'precision',
|
| 690 |
+
'prepare',
|
| 691 |
+
'preserve',
|
| 692 |
+
'primary',
|
| 693 |
+
'prior',
|
| 694 |
+
'privileges',
|
| 695 |
+
'procedure',
|
| 696 |
+
'public',
|
| 697 |
+
'read',
|
| 698 |
+
'real',
|
| 699 |
+
'references',
|
| 700 |
+
'relative',
|
| 701 |
+
'restrict',
|
| 702 |
+
'revoke',
|
| 703 |
+
'right',
|
| 704 |
+
'rollback',
|
| 705 |
+
'rows',
|
| 706 |
+
'schema',
|
| 707 |
+
'scroll',
|
| 708 |
+
'second',
|
| 709 |
+
'section',
|
| 710 |
+
'select',
|
| 711 |
+
'session',
|
| 712 |
+
'session_user',
|
| 713 |
+
'set',
|
| 714 |
+
'size',
|
| 715 |
+
'smallint',
|
| 716 |
+
'some',
|
| 717 |
+
'space',
|
| 718 |
+
'sql',
|
| 719 |
+
'sqlca',
|
| 720 |
+
'sqlcode',
|
| 721 |
+
'sqlerror',
|
| 722 |
+
'sqlstate',
|
| 723 |
+
'sqlwarning',
|
| 724 |
+
'substring',
|
| 725 |
+
'sum',
|
| 726 |
+
'system_user',
|
| 727 |
+
'table',
|
| 728 |
+
'temporary',
|
| 729 |
+
'then',
|
| 730 |
+
'time',
|
| 731 |
+
'timestamp',
|
| 732 |
+
'timezone_hour',
|
| 733 |
+
'timezone_minute',
|
| 734 |
+
'to',
|
| 735 |
+
'trailing',
|
| 736 |
+
'transaction',
|
| 737 |
+
'translate',
|
| 738 |
+
'translation',
|
| 739 |
+
'trim',
|
| 740 |
+
'true',
|
| 741 |
+
'union',
|
| 742 |
+
'unique',
|
| 743 |
+
'unknown',
|
| 744 |
+
'update',
|
| 745 |
+
'upper',
|
| 746 |
+
'usage',
|
| 747 |
+
'user',
|
| 748 |
+
'using',
|
| 749 |
+
'value',
|
| 750 |
+
'values',
|
| 751 |
+
'varchar',
|
| 752 |
+
'varying',
|
| 753 |
+
'view',
|
| 754 |
+
'when',
|
| 755 |
+
'whenever',
|
| 756 |
+
'where',
|
| 757 |
+
'with',
|
| 758 |
+
'work',
|
| 759 |
+
'write',
|
| 760 |
+
'year',
|
| 761 |
+
'zone',
|
| 762 |
+
)
|
| 763 |
+
|
| 764 |
+
# See https://msdn.microsoft.com/en-us/library/ms189822.aspx.
|
| 765 |
+
KEYWORDS = sorted(set(_KEYWORDS_FUTURE + _KEYWORDS_ODBC + _KEYWORDS_SERVER))
|
| 766 |
+
|
| 767 |
+
# See https://msdn.microsoft.com/en-us/library/ms187752.aspx.
|
| 768 |
+
TYPES = (
|
| 769 |
+
'bigint',
|
| 770 |
+
'binary',
|
| 771 |
+
'bit',
|
| 772 |
+
'char',
|
| 773 |
+
'cursor',
|
| 774 |
+
'date',
|
| 775 |
+
'datetime',
|
| 776 |
+
'datetime2',
|
| 777 |
+
'datetimeoffset',
|
| 778 |
+
'decimal',
|
| 779 |
+
'float',
|
| 780 |
+
'hierarchyid',
|
| 781 |
+
'image',
|
| 782 |
+
'int',
|
| 783 |
+
'money',
|
| 784 |
+
'nchar',
|
| 785 |
+
'ntext',
|
| 786 |
+
'numeric',
|
| 787 |
+
'nvarchar',
|
| 788 |
+
'real',
|
| 789 |
+
'smalldatetime',
|
| 790 |
+
'smallint',
|
| 791 |
+
'smallmoney',
|
| 792 |
+
'sql_variant',
|
| 793 |
+
'table',
|
| 794 |
+
'text',
|
| 795 |
+
'time',
|
| 796 |
+
'timestamp',
|
| 797 |
+
'tinyint',
|
| 798 |
+
'uniqueidentifier',
|
| 799 |
+
'varbinary',
|
| 800 |
+
'varchar',
|
| 801 |
+
'xml',
|
| 802 |
+
)
|
| 803 |
+
|
| 804 |
+
# See https://msdn.microsoft.com/en-us/library/ms174318.aspx.
|
| 805 |
+
FUNCTIONS = (
|
| 806 |
+
'$partition',
|
| 807 |
+
'abs',
|
| 808 |
+
'acos',
|
| 809 |
+
'app_name',
|
| 810 |
+
'applock_mode',
|
| 811 |
+
'applock_test',
|
| 812 |
+
'ascii',
|
| 813 |
+
'asin',
|
| 814 |
+
'assemblyproperty',
|
| 815 |
+
'atan',
|
| 816 |
+
'atn2',
|
| 817 |
+
'avg',
|
| 818 |
+
'binary_checksum',
|
| 819 |
+
'cast',
|
| 820 |
+
'ceiling',
|
| 821 |
+
'certencoded',
|
| 822 |
+
'certprivatekey',
|
| 823 |
+
'char',
|
| 824 |
+
'charindex',
|
| 825 |
+
'checksum',
|
| 826 |
+
'checksum_agg',
|
| 827 |
+
'choose',
|
| 828 |
+
'col_length',
|
| 829 |
+
'col_name',
|
| 830 |
+
'columnproperty',
|
| 831 |
+
'compress',
|
| 832 |
+
'concat',
|
| 833 |
+
'connectionproperty',
|
| 834 |
+
'context_info',
|
| 835 |
+
'convert',
|
| 836 |
+
'cos',
|
| 837 |
+
'cot',
|
| 838 |
+
'count',
|
| 839 |
+
'count_big',
|
| 840 |
+
'current_request_id',
|
| 841 |
+
'current_timestamp',
|
| 842 |
+
'current_transaction_id',
|
| 843 |
+
'current_user',
|
| 844 |
+
'cursor_status',
|
| 845 |
+
'database_principal_id',
|
| 846 |
+
'databasepropertyex',
|
| 847 |
+
'dateadd',
|
| 848 |
+
'datediff',
|
| 849 |
+
'datediff_big',
|
| 850 |
+
'datefromparts',
|
| 851 |
+
'datename',
|
| 852 |
+
'datepart',
|
| 853 |
+
'datetime2fromparts',
|
| 854 |
+
'datetimefromparts',
|
| 855 |
+
'datetimeoffsetfromparts',
|
| 856 |
+
'day',
|
| 857 |
+
'db_id',
|
| 858 |
+
'db_name',
|
| 859 |
+
'decompress',
|
| 860 |
+
'degrees',
|
| 861 |
+
'dense_rank',
|
| 862 |
+
'difference',
|
| 863 |
+
'eomonth',
|
| 864 |
+
'error_line',
|
| 865 |
+
'error_message',
|
| 866 |
+
'error_number',
|
| 867 |
+
'error_procedure',
|
| 868 |
+
'error_severity',
|
| 869 |
+
'error_state',
|
| 870 |
+
'exp',
|
| 871 |
+
'file_id',
|
| 872 |
+
'file_idex',
|
| 873 |
+
'file_name',
|
| 874 |
+
'filegroup_id',
|
| 875 |
+
'filegroup_name',
|
| 876 |
+
'filegroupproperty',
|
| 877 |
+
'fileproperty',
|
| 878 |
+
'floor',
|
| 879 |
+
'format',
|
| 880 |
+
'formatmessage',
|
| 881 |
+
'fulltextcatalogproperty',
|
| 882 |
+
'fulltextserviceproperty',
|
| 883 |
+
'get_filestream_transaction_context',
|
| 884 |
+
'getansinull',
|
| 885 |
+
'getdate',
|
| 886 |
+
'getutcdate',
|
| 887 |
+
'grouping',
|
| 888 |
+
'grouping_id',
|
| 889 |
+
'has_perms_by_name',
|
| 890 |
+
'host_id',
|
| 891 |
+
'host_name',
|
| 892 |
+
'iif',
|
| 893 |
+
'index_col',
|
| 894 |
+
'indexkey_property',
|
| 895 |
+
'indexproperty',
|
| 896 |
+
'is_member',
|
| 897 |
+
'is_rolemember',
|
| 898 |
+
'is_srvrolemember',
|
| 899 |
+
'isdate',
|
| 900 |
+
'isjson',
|
| 901 |
+
'isnull',
|
| 902 |
+
'isnumeric',
|
| 903 |
+
'json_modify',
|
| 904 |
+
'json_query',
|
| 905 |
+
'json_value',
|
| 906 |
+
'left',
|
| 907 |
+
'len',
|
| 908 |
+
'log',
|
| 909 |
+
'log10',
|
| 910 |
+
'lower',
|
| 911 |
+
'ltrim',
|
| 912 |
+
'max',
|
| 913 |
+
'min',
|
| 914 |
+
'min_active_rowversion',
|
| 915 |
+
'month',
|
| 916 |
+
'nchar',
|
| 917 |
+
'newid',
|
| 918 |
+
'newsequentialid',
|
| 919 |
+
'ntile',
|
| 920 |
+
'object_definition',
|
| 921 |
+
'object_id',
|
| 922 |
+
'object_name',
|
| 923 |
+
'object_schema_name',
|
| 924 |
+
'objectproperty',
|
| 925 |
+
'objectpropertyex',
|
| 926 |
+
'opendatasource',
|
| 927 |
+
'openjson',
|
| 928 |
+
'openquery',
|
| 929 |
+
'openrowset',
|
| 930 |
+
'openxml',
|
| 931 |
+
'original_db_name',
|
| 932 |
+
'original_login',
|
| 933 |
+
'parse',
|
| 934 |
+
'parsename',
|
| 935 |
+
'patindex',
|
| 936 |
+
'permissions',
|
| 937 |
+
'pi',
|
| 938 |
+
'power',
|
| 939 |
+
'pwdcompare',
|
| 940 |
+
'pwdencrypt',
|
| 941 |
+
'quotename',
|
| 942 |
+
'radians',
|
| 943 |
+
'rand',
|
| 944 |
+
'rank',
|
| 945 |
+
'replace',
|
| 946 |
+
'replicate',
|
| 947 |
+
'reverse',
|
| 948 |
+
'right',
|
| 949 |
+
'round',
|
| 950 |
+
'row_number',
|
| 951 |
+
'rowcount_big',
|
| 952 |
+
'rtrim',
|
| 953 |
+
'schema_id',
|
| 954 |
+
'schema_name',
|
| 955 |
+
'scope_identity',
|
| 956 |
+
'serverproperty',
|
| 957 |
+
'session_context',
|
| 958 |
+
'session_user',
|
| 959 |
+
'sign',
|
| 960 |
+
'sin',
|
| 961 |
+
'smalldatetimefromparts',
|
| 962 |
+
'soundex',
|
| 963 |
+
'sp_helplanguage',
|
| 964 |
+
'space',
|
| 965 |
+
'sqrt',
|
| 966 |
+
'square',
|
| 967 |
+
'stats_date',
|
| 968 |
+
'stdev',
|
| 969 |
+
'stdevp',
|
| 970 |
+
'str',
|
| 971 |
+
'string_escape',
|
| 972 |
+
'string_split',
|
| 973 |
+
'stuff',
|
| 974 |
+
'substring',
|
| 975 |
+
'sum',
|
| 976 |
+
'suser_id',
|
| 977 |
+
'suser_name',
|
| 978 |
+
'suser_sid',
|
| 979 |
+
'suser_sname',
|
| 980 |
+
'switchoffset',
|
| 981 |
+
'sysdatetime',
|
| 982 |
+
'sysdatetimeoffset',
|
| 983 |
+
'system_user',
|
| 984 |
+
'sysutcdatetime',
|
| 985 |
+
'tan',
|
| 986 |
+
'textptr',
|
| 987 |
+
'textvalid',
|
| 988 |
+
'timefromparts',
|
| 989 |
+
'todatetimeoffset',
|
| 990 |
+
'try_cast',
|
| 991 |
+
'try_convert',
|
| 992 |
+
'try_parse',
|
| 993 |
+
'type_id',
|
| 994 |
+
'type_name',
|
| 995 |
+
'typeproperty',
|
| 996 |
+
'unicode',
|
| 997 |
+
'upper',
|
| 998 |
+
'user_id',
|
| 999 |
+
'user_name',
|
| 1000 |
+
'var',
|
| 1001 |
+
'varp',
|
| 1002 |
+
'xact_state',
|
| 1003 |
+
'year',
|
| 1004 |
+
)
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/_vim_builtins.py
ADDED
|
@@ -0,0 +1,1939 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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see AUTHORS.
|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
# Split up in multiple functions so it's importable by jython, which has a
|
| 13 |
+
# per-method size limit.
|
| 14 |
+
|
| 15 |
+
def _getauto():
|
| 16 |
+
var = (
|
| 17 |
+
('BufAdd','BufAdd'),
|
| 18 |
+
('BufCreate','BufCreate'),
|
| 19 |
+
('BufDelete','BufDelete'),
|
| 20 |
+
('BufEnter','BufEnter'),
|
| 21 |
+
('BufFilePost','BufFilePost'),
|
| 22 |
+
('BufFilePre','BufFilePre'),
|
| 23 |
+
('BufHidden','BufHidden'),
|
| 24 |
+
('BufLeave','BufLeave'),
|
| 25 |
+
('BufNew','BufNew'),
|
| 26 |
+
('BufNewFile','BufNewFile'),
|
| 27 |
+
('BufRead','BufRead'),
|
| 28 |
+
('BufReadCmd','BufReadCmd'),
|
| 29 |
+
('BufReadPost','BufReadPost'),
|
| 30 |
+
('BufReadPre','BufReadPre'),
|
| 31 |
+
('BufUnload','BufUnload'),
|
| 32 |
+
('BufWinEnter','BufWinEnter'),
|
| 33 |
+
('BufWinLeave','BufWinLeave'),
|
| 34 |
+
('BufWipeout','BufWipeout'),
|
| 35 |
+
('BufWrite','BufWrite'),
|
| 36 |
+
('BufWriteCmd','BufWriteCmd'),
|
| 37 |
+
('BufWritePost','BufWritePost'),
|
| 38 |
+
('BufWritePre','BufWritePre'),
|
| 39 |
+
('Cmd','Cmd'),
|
| 40 |
+
('CmdwinEnter','CmdwinEnter'),
|
| 41 |
+
('CmdwinLeave','CmdwinLeave'),
|
| 42 |
+
('ColorScheme','ColorScheme'),
|
| 43 |
+
('CompleteDone','CompleteDone'),
|
| 44 |
+
('CursorHold','CursorHold'),
|
| 45 |
+
('CursorHoldI','CursorHoldI'),
|
| 46 |
+
('CursorMoved','CursorMoved'),
|
| 47 |
+
('CursorMovedI','CursorMovedI'),
|
| 48 |
+
('EncodingChanged','EncodingChanged'),
|
| 49 |
+
('FileAppendCmd','FileAppendCmd'),
|
| 50 |
+
('FileAppendPost','FileAppendPost'),
|
| 51 |
+
('FileAppendPre','FileAppendPre'),
|
| 52 |
+
('FileChangedRO','FileChangedRO'),
|
| 53 |
+
('FileChangedShell','FileChangedShell'),
|
| 54 |
+
('FileChangedShellPost','FileChangedShellPost'),
|
| 55 |
+
('FileEncoding','FileEncoding'),
|
| 56 |
+
('FileReadCmd','FileReadCmd'),
|
| 57 |
+
('FileReadPost','FileReadPost'),
|
| 58 |
+
('FileReadPre','FileReadPre'),
|
| 59 |
+
('FileType','FileType'),
|
| 60 |
+
('FileWriteCmd','FileWriteCmd'),
|
| 61 |
+
('FileWritePost','FileWritePost'),
|
| 62 |
+
('FileWritePre','FileWritePre'),
|
| 63 |
+
('FilterReadPost','FilterReadPost'),
|
| 64 |
+
('FilterReadPre','FilterReadPre'),
|
| 65 |
+
('FilterWritePost','FilterWritePost'),
|
| 66 |
+
('FilterWritePre','FilterWritePre'),
|
| 67 |
+
('FocusGained','FocusGained'),
|
| 68 |
+
('FocusLost','FocusLost'),
|
| 69 |
+
('FuncUndefined','FuncUndefined'),
|
| 70 |
+
('GUIEnter','GUIEnter'),
|
| 71 |
+
('GUIFailed','GUIFailed'),
|
| 72 |
+
('InsertChange','InsertChange'),
|
| 73 |
+
('InsertCharPre','InsertCharPre'),
|
| 74 |
+
('InsertEnter','InsertEnter'),
|
| 75 |
+
('InsertLeave','InsertLeave'),
|
| 76 |
+
('MenuPopup','MenuPopup'),
|
| 77 |
+
('QuickFixCmdPost','QuickFixCmdPost'),
|
| 78 |
+
('QuickFixCmdPre','QuickFixCmdPre'),
|
| 79 |
+
('QuitPre','QuitPre'),
|
| 80 |
+
('RemoteReply','RemoteReply'),
|
| 81 |
+
('SessionLoadPost','SessionLoadPost'),
|
| 82 |
+
('ShellCmdPost','ShellCmdPost'),
|
| 83 |
+
('ShellFilterPost','ShellFilterPost'),
|
| 84 |
+
('SourceCmd','SourceCmd'),
|
| 85 |
+
('SourcePre','SourcePre'),
|
| 86 |
+
('SpellFileMissing','SpellFileMissing'),
|
| 87 |
+
('StdinReadPost','StdinReadPost'),
|
| 88 |
+
('StdinReadPre','StdinReadPre'),
|
| 89 |
+
('SwapExists','SwapExists'),
|
| 90 |
+
('Syntax','Syntax'),
|
| 91 |
+
('TabEnter','TabEnter'),
|
| 92 |
+
('TabLeave','TabLeave'),
|
| 93 |
+
('TermChanged','TermChanged'),
|
| 94 |
+
('TermResponse','TermResponse'),
|
| 95 |
+
('TextChanged','TextChanged'),
|
| 96 |
+
('TextChangedI','TextChangedI'),
|
| 97 |
+
('User','User'),
|
| 98 |
+
('UserGettingBored','UserGettingBored'),
|
| 99 |
+
('VimEnter','VimEnter'),
|
| 100 |
+
('VimLeave','VimLeave'),
|
| 101 |
+
('VimLeavePre','VimLeavePre'),
|
| 102 |
+
('VimResized','VimResized'),
|
| 103 |
+
('WinEnter','WinEnter'),
|
| 104 |
+
('WinLeave','WinLeave'),
|
| 105 |
+
('event','event'),
|
| 106 |
+
)
|
| 107 |
+
return var
|
| 108 |
+
auto = _getauto()
|
| 109 |
+
|
| 110 |
+
def _getcommand():
|
| 111 |
+
var = (
|
| 112 |
+
('a','a'),
|
| 113 |
+
('ab','ab'),
|
| 114 |
+
('abc','abclear'),
|
| 115 |
+
('abo','aboveleft'),
|
| 116 |
+
('al','all'),
|
| 117 |
+
('ar','ar'),
|
| 118 |
+
('ar','args'),
|
| 119 |
+
('arga','argadd'),
|
| 120 |
+
('argd','argdelete'),
|
| 121 |
+
('argdo','argdo'),
|
| 122 |
+
('arge','argedit'),
|
| 123 |
+
('argg','argglobal'),
|
| 124 |
+
('argl','arglocal'),
|
| 125 |
+
('argu','argument'),
|
| 126 |
+
('as','ascii'),
|
| 127 |
+
('au','au'),
|
| 128 |
+
('b','buffer'),
|
| 129 |
+
('bN','bNext'),
|
| 130 |
+
('ba','ball'),
|
| 131 |
+
('bad','badd'),
|
| 132 |
+
('bd','bdelete'),
|
| 133 |
+
('bel','belowright'),
|
| 134 |
+
('bf','bfirst'),
|
| 135 |
+
('bl','blast'),
|
| 136 |
+
('bm','bmodified'),
|
| 137 |
+
('bn','bnext'),
|
| 138 |
+
('bo','botright'),
|
| 139 |
+
('bp','bprevious'),
|
| 140 |
+
('br','br'),
|
| 141 |
+
('br','brewind'),
|
| 142 |
+
('brea','break'),
|
| 143 |
+
('breaka','breakadd'),
|
| 144 |
+
('breakd','breakdel'),
|
| 145 |
+
('breakl','breaklist'),
|
| 146 |
+
('bro','browse'),
|
| 147 |
+
('bu','bu'),
|
| 148 |
+
('buf','buf'),
|
| 149 |
+
('bufdo','bufdo'),
|
| 150 |
+
('buffers','buffers'),
|
| 151 |
+
('bun','bunload'),
|
| 152 |
+
('bw','bwipeout'),
|
| 153 |
+
('c','c'),
|
| 154 |
+
('c','change'),
|
| 155 |
+
('cN','cN'),
|
| 156 |
+
('cN','cNext'),
|
| 157 |
+
('cNf','cNf'),
|
| 158 |
+
('cNf','cNfile'),
|
| 159 |
+
('cabc','cabclear'),
|
| 160 |
+
('cad','cad'),
|
| 161 |
+
('cad','caddexpr'),
|
| 162 |
+
('caddb','caddbuffer'),
|
| 163 |
+
('caddf','caddfile'),
|
| 164 |
+
('cal','call'),
|
| 165 |
+
('cat','catch'),
|
| 166 |
+
('cb','cbuffer'),
|
| 167 |
+
('cc','cc'),
|
| 168 |
+
('ccl','cclose'),
|
| 169 |
+
('cd','cd'),
|
| 170 |
+
('ce','center'),
|
| 171 |
+
('cex','cexpr'),
|
| 172 |
+
('cf','cfile'),
|
| 173 |
+
('cfir','cfirst'),
|
| 174 |
+
('cg','cgetfile'),
|
| 175 |
+
('cgetb','cgetbuffer'),
|
| 176 |
+
('cgete','cgetexpr'),
|
| 177 |
+
('changes','changes'),
|
| 178 |
+
('chd','chdir'),
|
| 179 |
+
('che','checkpath'),
|
| 180 |
+
('checkt','checktime'),
|
| 181 |
+
('cl','cl'),
|
| 182 |
+
('cl','clist'),
|
| 183 |
+
('cla','clast'),
|
| 184 |
+
('clo','close'),
|
| 185 |
+
('cmapc','cmapclear'),
|
| 186 |
+
('cn','cn'),
|
| 187 |
+
('cn','cnext'),
|
| 188 |
+
('cnew','cnewer'),
|
| 189 |
+
('cnf','cnf'),
|
| 190 |
+
('cnf','cnfile'),
|
| 191 |
+
('co','copy'),
|
| 192 |
+
('col','colder'),
|
| 193 |
+
('colo','colorscheme'),
|
| 194 |
+
('com','com'),
|
| 195 |
+
('comc','comclear'),
|
| 196 |
+
('comp','compiler'),
|
| 197 |
+
('con','con'),
|
| 198 |
+
('con','continue'),
|
| 199 |
+
('conf','confirm'),
|
| 200 |
+
('cope','copen'),
|
| 201 |
+
('cp','cprevious'),
|
| 202 |
+
('cpf','cpfile'),
|
| 203 |
+
('cq','cquit'),
|
| 204 |
+
('cr','crewind'),
|
| 205 |
+
('cs','cs'),
|
| 206 |
+
('cscope','cscope'),
|
| 207 |
+
('cstag','cstag'),
|
| 208 |
+
('cuna','cunabbrev'),
|
| 209 |
+
('cw','cwindow'),
|
| 210 |
+
('d','d'),
|
| 211 |
+
('d','delete'),
|
| 212 |
+
('de','de'),
|
| 213 |
+
('debug','debug'),
|
| 214 |
+
('debugg','debuggreedy'),
|
| 215 |
+
('del','del'),
|
| 216 |
+
('delc','delcommand'),
|
| 217 |
+
('delel','delel'),
|
| 218 |
+
('delep','delep'),
|
| 219 |
+
('deletel','deletel'),
|
| 220 |
+
('deletep','deletep'),
|
| 221 |
+
('deletl','deletl'),
|
| 222 |
+
('deletp','deletp'),
|
| 223 |
+
('delf','delf'),
|
| 224 |
+
('delf','delfunction'),
|
| 225 |
+
('dell','dell'),
|
| 226 |
+
('delm','delmarks'),
|
| 227 |
+
('delp','delp'),
|
| 228 |
+
('dep','dep'),
|
| 229 |
+
('di','di'),
|
| 230 |
+
('di','display'),
|
| 231 |
+
('diffg','diffget'),
|
| 232 |
+
('diffo','diffoff'),
|
| 233 |
+
('diffp','diffpatch'),
|
| 234 |
+
('diffpu','diffput'),
|
| 235 |
+
('diffs','diffsplit'),
|
| 236 |
+
('difft','diffthis'),
|
| 237 |
+
('diffu','diffupdate'),
|
| 238 |
+
('dig','dig'),
|
| 239 |
+
('dig','digraphs'),
|
| 240 |
+
('dir','dir'),
|
| 241 |
+
('dj','djump'),
|
| 242 |
+
('dl','dl'),
|
| 243 |
+
('dli','dlist'),
|
| 244 |
+
('do','do'),
|
| 245 |
+
('doau','doau'),
|
| 246 |
+
('dp','dp'),
|
| 247 |
+
('dr','drop'),
|
| 248 |
+
('ds','dsearch'),
|
| 249 |
+
('dsp','dsplit'),
|
| 250 |
+
('e','e'),
|
| 251 |
+
('e','edit'),
|
| 252 |
+
('ea','ea'),
|
| 253 |
+
('earlier','earlier'),
|
| 254 |
+
('ec','ec'),
|
| 255 |
+
('echoe','echoerr'),
|
| 256 |
+
('echom','echomsg'),
|
| 257 |
+
('echon','echon'),
|
| 258 |
+
('el','else'),
|
| 259 |
+
('elsei','elseif'),
|
| 260 |
+
('em','emenu'),
|
| 261 |
+
('en','en'),
|
| 262 |
+
('en','endif'),
|
| 263 |
+
('endf','endf'),
|
| 264 |
+
('endf','endfunction'),
|
| 265 |
+
('endfo','endfor'),
|
| 266 |
+
('endfun','endfun'),
|
| 267 |
+
('endt','endtry'),
|
| 268 |
+
('endw','endwhile'),
|
| 269 |
+
('ene','enew'),
|
| 270 |
+
('ex','ex'),
|
| 271 |
+
('exi','exit'),
|
| 272 |
+
('exu','exusage'),
|
| 273 |
+
('f','f'),
|
| 274 |
+
('f','file'),
|
| 275 |
+
('files','files'),
|
| 276 |
+
('filet','filet'),
|
| 277 |
+
('filetype','filetype'),
|
| 278 |
+
('fin','fin'),
|
| 279 |
+
('fin','find'),
|
| 280 |
+
('fina','finally'),
|
| 281 |
+
('fini','finish'),
|
| 282 |
+
('fir','first'),
|
| 283 |
+
('fix','fixdel'),
|
| 284 |
+
('fo','fold'),
|
| 285 |
+
('foldc','foldclose'),
|
| 286 |
+
('foldd','folddoopen'),
|
| 287 |
+
('folddoc','folddoclosed'),
|
| 288 |
+
('foldo','foldopen'),
|
| 289 |
+
('for','for'),
|
| 290 |
+
('fu','fu'),
|
| 291 |
+
('fu','function'),
|
| 292 |
+
('fun','fun'),
|
| 293 |
+
('g','g'),
|
| 294 |
+
('go','goto'),
|
| 295 |
+
('gr','grep'),
|
| 296 |
+
('grepa','grepadd'),
|
| 297 |
+
('gui','gui'),
|
| 298 |
+
('gvim','gvim'),
|
| 299 |
+
('h','h'),
|
| 300 |
+
('h','help'),
|
| 301 |
+
('ha','hardcopy'),
|
| 302 |
+
('helpf','helpfind'),
|
| 303 |
+
('helpg','helpgrep'),
|
| 304 |
+
('helpt','helptags'),
|
| 305 |
+
('hi','hi'),
|
| 306 |
+
('hid','hide'),
|
| 307 |
+
('his','history'),
|
| 308 |
+
('i','i'),
|
| 309 |
+
('ia','ia'),
|
| 310 |
+
('iabc','iabclear'),
|
| 311 |
+
('if','if'),
|
| 312 |
+
('ij','ijump'),
|
| 313 |
+
('il','ilist'),
|
| 314 |
+
('imapc','imapclear'),
|
| 315 |
+
('in','in'),
|
| 316 |
+
('intro','intro'),
|
| 317 |
+
('is','isearch'),
|
| 318 |
+
('isp','isplit'),
|
| 319 |
+
('iuna','iunabbrev'),
|
| 320 |
+
('j','join'),
|
| 321 |
+
('ju','jumps'),
|
| 322 |
+
('k','k'),
|
| 323 |
+
('kee','keepmarks'),
|
| 324 |
+
('keepa','keepa'),
|
| 325 |
+
('keepalt','keepalt'),
|
| 326 |
+
('keepj','keepjumps'),
|
| 327 |
+
('keepp','keeppatterns'),
|
| 328 |
+
('l','l'),
|
| 329 |
+
('l','list'),
|
| 330 |
+
('lN','lN'),
|
| 331 |
+
('lN','lNext'),
|
| 332 |
+
('lNf','lNf'),
|
| 333 |
+
('lNf','lNfile'),
|
| 334 |
+
('la','la'),
|
| 335 |
+
('la','last'),
|
| 336 |
+
('lad','lad'),
|
| 337 |
+
('lad','laddexpr'),
|
| 338 |
+
('laddb','laddbuffer'),
|
| 339 |
+
('laddf','laddfile'),
|
| 340 |
+
('lan','lan'),
|
| 341 |
+
('lan','language'),
|
| 342 |
+
('lat','lat'),
|
| 343 |
+
('later','later'),
|
| 344 |
+
('lb','lbuffer'),
|
| 345 |
+
('lc','lcd'),
|
| 346 |
+
('lch','lchdir'),
|
| 347 |
+
('lcl','lclose'),
|
| 348 |
+
('lcs','lcs'),
|
| 349 |
+
('lcscope','lcscope'),
|
| 350 |
+
('le','left'),
|
| 351 |
+
('lefta','leftabove'),
|
| 352 |
+
('lex','lexpr'),
|
| 353 |
+
('lf','lfile'),
|
| 354 |
+
('lfir','lfirst'),
|
| 355 |
+
('lg','lgetfile'),
|
| 356 |
+
('lgetb','lgetbuffer'),
|
| 357 |
+
('lgete','lgetexpr'),
|
| 358 |
+
('lgr','lgrep'),
|
| 359 |
+
('lgrepa','lgrepadd'),
|
| 360 |
+
('lh','lhelpgrep'),
|
| 361 |
+
('ll','ll'),
|
| 362 |
+
('lla','llast'),
|
| 363 |
+
('lli','llist'),
|
| 364 |
+
('lmak','lmake'),
|
| 365 |
+
('lmapc','lmapclear'),
|
| 366 |
+
('lne','lne'),
|
| 367 |
+
('lne','lnext'),
|
| 368 |
+
('lnew','lnewer'),
|
| 369 |
+
('lnf','lnf'),
|
| 370 |
+
('lnf','lnfile'),
|
| 371 |
+
('lo','lo'),
|
| 372 |
+
('lo','loadview'),
|
| 373 |
+
('loadk','loadk'),
|
| 374 |
+
('loadkeymap','loadkeymap'),
|
| 375 |
+
('loc','lockmarks'),
|
| 376 |
+
('lockv','lockvar'),
|
| 377 |
+
('lol','lolder'),
|
| 378 |
+
('lop','lopen'),
|
| 379 |
+
('lp','lprevious'),
|
| 380 |
+
('lpf','lpfile'),
|
| 381 |
+
('lr','lrewind'),
|
| 382 |
+
('ls','ls'),
|
| 383 |
+
('lt','ltag'),
|
| 384 |
+
('lua','lua'),
|
| 385 |
+
('luado','luado'),
|
| 386 |
+
('luafile','luafile'),
|
| 387 |
+
('lv','lvimgrep'),
|
| 388 |
+
('lvimgrepa','lvimgrepadd'),
|
| 389 |
+
('lw','lwindow'),
|
| 390 |
+
('m','move'),
|
| 391 |
+
('ma','ma'),
|
| 392 |
+
('ma','mark'),
|
| 393 |
+
('mak','make'),
|
| 394 |
+
('marks','marks'),
|
| 395 |
+
('mat','match'),
|
| 396 |
+
('menut','menut'),
|
| 397 |
+
('menut','menutranslate'),
|
| 398 |
+
('mes','mes'),
|
| 399 |
+
('messages','messages'),
|
| 400 |
+
('mk','mk'),
|
| 401 |
+
('mk','mkexrc'),
|
| 402 |
+
('mks','mksession'),
|
| 403 |
+
('mksp','mkspell'),
|
| 404 |
+
('mkv','mkv'),
|
| 405 |
+
('mkv','mkvimrc'),
|
| 406 |
+
('mkvie','mkview'),
|
| 407 |
+
('mo','mo'),
|
| 408 |
+
('mod','mode'),
|
| 409 |
+
('mz','mz'),
|
| 410 |
+
('mz','mzscheme'),
|
| 411 |
+
('mzf','mzfile'),
|
| 412 |
+
('n','n'),
|
| 413 |
+
('n','next'),
|
| 414 |
+
('nb','nbkey'),
|
| 415 |
+
('nbc','nbclose'),
|
| 416 |
+
('nbs','nbstart'),
|
| 417 |
+
('ne','ne'),
|
| 418 |
+
('new','new'),
|
| 419 |
+
('nmapc','nmapclear'),
|
| 420 |
+
('noa','noa'),
|
| 421 |
+
('noautocmd','noautocmd'),
|
| 422 |
+
('noh','nohlsearch'),
|
| 423 |
+
('nu','number'),
|
| 424 |
+
('o','o'),
|
| 425 |
+
('o','open'),
|
| 426 |
+
('ol','oldfiles'),
|
| 427 |
+
('omapc','omapclear'),
|
| 428 |
+
('on','only'),
|
| 429 |
+
('opt','options'),
|
| 430 |
+
('ownsyntax','ownsyntax'),
|
| 431 |
+
('p','p'),
|
| 432 |
+
('p','print'),
|
| 433 |
+
('pc','pclose'),
|
| 434 |
+
('pe','pe'),
|
| 435 |
+
('pe','perl'),
|
| 436 |
+
('ped','pedit'),
|
| 437 |
+
('perld','perldo'),
|
| 438 |
+
('po','pop'),
|
| 439 |
+
('popu','popu'),
|
| 440 |
+
('popu','popup'),
|
| 441 |
+
('pp','ppop'),
|
| 442 |
+
('pr','pr'),
|
| 443 |
+
('pre','preserve'),
|
| 444 |
+
('prev','previous'),
|
| 445 |
+
('pro','pro'),
|
| 446 |
+
('prof','profile'),
|
| 447 |
+
('profd','profdel'),
|
| 448 |
+
('promptf','promptfind'),
|
| 449 |
+
('promptr','promptrepl'),
|
| 450 |
+
('ps','psearch'),
|
| 451 |
+
('ptN','ptN'),
|
| 452 |
+
('ptN','ptNext'),
|
| 453 |
+
('pta','ptag'),
|
| 454 |
+
('ptf','ptfirst'),
|
| 455 |
+
('ptj','ptjump'),
|
| 456 |
+
('ptl','ptlast'),
|
| 457 |
+
('ptn','ptn'),
|
| 458 |
+
('ptn','ptnext'),
|
| 459 |
+
('ptp','ptprevious'),
|
| 460 |
+
('ptr','ptrewind'),
|
| 461 |
+
('pts','ptselect'),
|
| 462 |
+
('pu','put'),
|
| 463 |
+
('pw','pwd'),
|
| 464 |
+
('py','py'),
|
| 465 |
+
('py','python'),
|
| 466 |
+
('py3','py3'),
|
| 467 |
+
('py3','py3'),
|
| 468 |
+
('py3do','py3do'),
|
| 469 |
+
('pydo','pydo'),
|
| 470 |
+
('pyf','pyfile'),
|
| 471 |
+
('python3','python3'),
|
| 472 |
+
('q','q'),
|
| 473 |
+
('q','quit'),
|
| 474 |
+
('qa','qall'),
|
| 475 |
+
('quita','quitall'),
|
| 476 |
+
('r','r'),
|
| 477 |
+
('r','read'),
|
| 478 |
+
('re','re'),
|
| 479 |
+
('rec','recover'),
|
| 480 |
+
('red','red'),
|
| 481 |
+
('red','redo'),
|
| 482 |
+
('redi','redir'),
|
| 483 |
+
('redr','redraw'),
|
| 484 |
+
('redraws','redrawstatus'),
|
| 485 |
+
('reg','registers'),
|
| 486 |
+
('res','resize'),
|
| 487 |
+
('ret','retab'),
|
| 488 |
+
('retu','return'),
|
| 489 |
+
('rew','rewind'),
|
| 490 |
+
('ri','right'),
|
| 491 |
+
('rightb','rightbelow'),
|
| 492 |
+
('ru','ru'),
|
| 493 |
+
('ru','runtime'),
|
| 494 |
+
('rub','ruby'),
|
| 495 |
+
('rubyd','rubydo'),
|
| 496 |
+
('rubyf','rubyfile'),
|
| 497 |
+
('rundo','rundo'),
|
| 498 |
+
('rv','rviminfo'),
|
| 499 |
+
('sN','sNext'),
|
| 500 |
+
('sa','sargument'),
|
| 501 |
+
('sal','sall'),
|
| 502 |
+
('san','sandbox'),
|
| 503 |
+
('sav','saveas'),
|
| 504 |
+
('sb','sbuffer'),
|
| 505 |
+
('sbN','sbNext'),
|
| 506 |
+
('sba','sball'),
|
| 507 |
+
('sbf','sbfirst'),
|
| 508 |
+
('sbl','sblast'),
|
| 509 |
+
('sbm','sbmodified'),
|
| 510 |
+
('sbn','sbnext'),
|
| 511 |
+
('sbp','sbprevious'),
|
| 512 |
+
('sbr','sbrewind'),
|
| 513 |
+
('scrip','scrip'),
|
| 514 |
+
('scrip','scriptnames'),
|
| 515 |
+
('scripte','scriptencoding'),
|
| 516 |
+
('scs','scs'),
|
| 517 |
+
('scscope','scscope'),
|
| 518 |
+
('se','set'),
|
| 519 |
+
('setf','setfiletype'),
|
| 520 |
+
('setg','setglobal'),
|
| 521 |
+
('setl','setlocal'),
|
| 522 |
+
('sf','sfind'),
|
| 523 |
+
('sfir','sfirst'),
|
| 524 |
+
('sh','shell'),
|
| 525 |
+
('si','si'),
|
| 526 |
+
('sig','sig'),
|
| 527 |
+
('sign','sign'),
|
| 528 |
+
('sil','silent'),
|
| 529 |
+
('sim','simalt'),
|
| 530 |
+
('sl','sl'),
|
| 531 |
+
('sl','sleep'),
|
| 532 |
+
('sla','slast'),
|
| 533 |
+
('sm','smagic'),
|
| 534 |
+
('sm','smap'),
|
| 535 |
+
('sme','sme'),
|
| 536 |
+
('smenu','smenu'),
|
| 537 |
+
('sn','snext'),
|
| 538 |
+
('sni','sniff'),
|
| 539 |
+
('sno','snomagic'),
|
| 540 |
+
('snoreme','snoreme'),
|
| 541 |
+
('snoremenu','snoremenu'),
|
| 542 |
+
('so','so'),
|
| 543 |
+
('so','source'),
|
| 544 |
+
('sor','sort'),
|
| 545 |
+
('sp','split'),
|
| 546 |
+
('spe','spe'),
|
| 547 |
+
('spe','spellgood'),
|
| 548 |
+
('spelld','spelldump'),
|
| 549 |
+
('spelli','spellinfo'),
|
| 550 |
+
('spellr','spellrepall'),
|
| 551 |
+
('spellu','spellundo'),
|
| 552 |
+
('spellw','spellwrong'),
|
| 553 |
+
('spr','sprevious'),
|
| 554 |
+
('sre','srewind'),
|
| 555 |
+
('st','st'),
|
| 556 |
+
('st','stop'),
|
| 557 |
+
('sta','stag'),
|
| 558 |
+
('star','star'),
|
| 559 |
+
('star','startinsert'),
|
| 560 |
+
('start','start'),
|
| 561 |
+
('startg','startgreplace'),
|
| 562 |
+
('startr','startreplace'),
|
| 563 |
+
('stj','stjump'),
|
| 564 |
+
('stopi','stopinsert'),
|
| 565 |
+
('sts','stselect'),
|
| 566 |
+
('sun','sunhide'),
|
| 567 |
+
('sunme','sunme'),
|
| 568 |
+
('sunmenu','sunmenu'),
|
| 569 |
+
('sus','suspend'),
|
| 570 |
+
('sv','sview'),
|
| 571 |
+
('sw','swapname'),
|
| 572 |
+
('sy','sy'),
|
| 573 |
+
('syn','syn'),
|
| 574 |
+
('sync','sync'),
|
| 575 |
+
('syncbind','syncbind'),
|
| 576 |
+
('syntime','syntime'),
|
| 577 |
+
('t','t'),
|
| 578 |
+
('tN','tN'),
|
| 579 |
+
('tN','tNext'),
|
| 580 |
+
('ta','ta'),
|
| 581 |
+
('ta','tag'),
|
| 582 |
+
('tab','tab'),
|
| 583 |
+
('tabN','tabN'),
|
| 584 |
+
('tabN','tabNext'),
|
| 585 |
+
('tabc','tabclose'),
|
| 586 |
+
('tabd','tabdo'),
|
| 587 |
+
('tabe','tabedit'),
|
| 588 |
+
('tabf','tabfind'),
|
| 589 |
+
('tabfir','tabfirst'),
|
| 590 |
+
('tabl','tablast'),
|
| 591 |
+
('tabm','tabmove'),
|
| 592 |
+
('tabn','tabnext'),
|
| 593 |
+
('tabnew','tabnew'),
|
| 594 |
+
('tabo','tabonly'),
|
| 595 |
+
('tabp','tabprevious'),
|
| 596 |
+
('tabr','tabrewind'),
|
| 597 |
+
('tabs','tabs'),
|
| 598 |
+
('tags','tags'),
|
| 599 |
+
('tc','tcl'),
|
| 600 |
+
('tcld','tcldo'),
|
| 601 |
+
('tclf','tclfile'),
|
| 602 |
+
('te','tearoff'),
|
| 603 |
+
('tf','tfirst'),
|
| 604 |
+
('th','throw'),
|
| 605 |
+
('tj','tjump'),
|
| 606 |
+
('tl','tlast'),
|
| 607 |
+
('tm','tm'),
|
| 608 |
+
('tm','tmenu'),
|
| 609 |
+
('tn','tn'),
|
| 610 |
+
('tn','tnext'),
|
| 611 |
+
('to','topleft'),
|
| 612 |
+
('tp','tprevious'),
|
| 613 |
+
('tr','tr'),
|
| 614 |
+
('tr','trewind'),
|
| 615 |
+
('try','try'),
|
| 616 |
+
('ts','tselect'),
|
| 617 |
+
('tu','tu'),
|
| 618 |
+
('tu','tunmenu'),
|
| 619 |
+
('u','u'),
|
| 620 |
+
('u','undo'),
|
| 621 |
+
('un','un'),
|
| 622 |
+
('una','unabbreviate'),
|
| 623 |
+
('undoj','undojoin'),
|
| 624 |
+
('undol','undolist'),
|
| 625 |
+
('unh','unhide'),
|
| 626 |
+
('unl','unl'),
|
| 627 |
+
('unlo','unlockvar'),
|
| 628 |
+
('uns','unsilent'),
|
| 629 |
+
('up','update'),
|
| 630 |
+
('v','v'),
|
| 631 |
+
('ve','ve'),
|
| 632 |
+
('ve','version'),
|
| 633 |
+
('verb','verbose'),
|
| 634 |
+
('vert','vertical'),
|
| 635 |
+
('vi','vi'),
|
| 636 |
+
('vi','visual'),
|
| 637 |
+
('vie','view'),
|
| 638 |
+
('vim','vimgrep'),
|
| 639 |
+
('vimgrepa','vimgrepadd'),
|
| 640 |
+
('viu','viusage'),
|
| 641 |
+
('vmapc','vmapclear'),
|
| 642 |
+
('vne','vnew'),
|
| 643 |
+
('vs','vsplit'),
|
| 644 |
+
('w','w'),
|
| 645 |
+
('w','write'),
|
| 646 |
+
('wN','wNext'),
|
| 647 |
+
('wa','wall'),
|
| 648 |
+
('wh','while'),
|
| 649 |
+
('win','win'),
|
| 650 |
+
('win','winsize'),
|
| 651 |
+
('winc','wincmd'),
|
| 652 |
+
('windo','windo'),
|
| 653 |
+
('winp','winpos'),
|
| 654 |
+
('wn','wnext'),
|
| 655 |
+
('wp','wprevious'),
|
| 656 |
+
('wq','wq'),
|
| 657 |
+
('wqa','wqall'),
|
| 658 |
+
('ws','wsverb'),
|
| 659 |
+
('wundo','wundo'),
|
| 660 |
+
('wv','wviminfo'),
|
| 661 |
+
('x','x'),
|
| 662 |
+
('x','xit'),
|
| 663 |
+
('xa','xall'),
|
| 664 |
+
('xmapc','xmapclear'),
|
| 665 |
+
('xme','xme'),
|
| 666 |
+
('xmenu','xmenu'),
|
| 667 |
+
('xnoreme','xnoreme'),
|
| 668 |
+
('xnoremenu','xnoremenu'),
|
| 669 |
+
('xunme','xunme'),
|
| 670 |
+
('xunmenu','xunmenu'),
|
| 671 |
+
('xwininfo','xwininfo'),
|
| 672 |
+
('y','yank'),
|
| 673 |
+
)
|
| 674 |
+
return var
|
| 675 |
+
command = _getcommand()
|
| 676 |
+
|
| 677 |
+
def _getoption():
|
| 678 |
+
var = (
|
| 679 |
+
('acd','acd'),
|
| 680 |
+
('ai','ai'),
|
| 681 |
+
('akm','akm'),
|
| 682 |
+
('al','al'),
|
| 683 |
+
('aleph','aleph'),
|
| 684 |
+
('allowrevins','allowrevins'),
|
| 685 |
+
('altkeymap','altkeymap'),
|
| 686 |
+
('ambiwidth','ambiwidth'),
|
| 687 |
+
('ambw','ambw'),
|
| 688 |
+
('anti','anti'),
|
| 689 |
+
('antialias','antialias'),
|
| 690 |
+
('ar','ar'),
|
| 691 |
+
('arab','arab'),
|
| 692 |
+
('arabic','arabic'),
|
| 693 |
+
('arabicshape','arabicshape'),
|
| 694 |
+
('ari','ari'),
|
| 695 |
+
('arshape','arshape'),
|
| 696 |
+
('autochdir','autochdir'),
|
| 697 |
+
('autoindent','autoindent'),
|
| 698 |
+
('autoread','autoread'),
|
| 699 |
+
('autowrite','autowrite'),
|
| 700 |
+
('autowriteall','autowriteall'),
|
| 701 |
+
('aw','aw'),
|
| 702 |
+
('awa','awa'),
|
| 703 |
+
('background','background'),
|
| 704 |
+
('backspace','backspace'),
|
| 705 |
+
('backup','backup'),
|
| 706 |
+
('backupcopy','backupcopy'),
|
| 707 |
+
('backupdir','backupdir'),
|
| 708 |
+
('backupext','backupext'),
|
| 709 |
+
('backupskip','backupskip'),
|
| 710 |
+
('balloondelay','balloondelay'),
|
| 711 |
+
('ballooneval','ballooneval'),
|
| 712 |
+
('balloonexpr','balloonexpr'),
|
| 713 |
+
('bdir','bdir'),
|
| 714 |
+
('bdlay','bdlay'),
|
| 715 |
+
('beval','beval'),
|
| 716 |
+
('bex','bex'),
|
| 717 |
+
('bexpr','bexpr'),
|
| 718 |
+
('bg','bg'),
|
| 719 |
+
('bh','bh'),
|
| 720 |
+
('bin','bin'),
|
| 721 |
+
('binary','binary'),
|
| 722 |
+
('biosk','biosk'),
|
| 723 |
+
('bioskey','bioskey'),
|
| 724 |
+
('bk','bk'),
|
| 725 |
+
('bkc','bkc'),
|
| 726 |
+
('bl','bl'),
|
| 727 |
+
('bomb','bomb'),
|
| 728 |
+
('breakat','breakat'),
|
| 729 |
+
('brk','brk'),
|
| 730 |
+
('browsedir','browsedir'),
|
| 731 |
+
('bs','bs'),
|
| 732 |
+
('bsdir','bsdir'),
|
| 733 |
+
('bsk','bsk'),
|
| 734 |
+
('bt','bt'),
|
| 735 |
+
('bufhidden','bufhidden'),
|
| 736 |
+
('buflisted','buflisted'),
|
| 737 |
+
('buftype','buftype'),
|
| 738 |
+
('casemap','casemap'),
|
| 739 |
+
('cb','cb'),
|
| 740 |
+
('cc','cc'),
|
| 741 |
+
('ccv','ccv'),
|
| 742 |
+
('cd','cd'),
|
| 743 |
+
('cdpath','cdpath'),
|
| 744 |
+
('cedit','cedit'),
|
| 745 |
+
('cf','cf'),
|
| 746 |
+
('cfu','cfu'),
|
| 747 |
+
('ch','ch'),
|
| 748 |
+
('charconvert','charconvert'),
|
| 749 |
+
('ci','ci'),
|
| 750 |
+
('cin','cin'),
|
| 751 |
+
('cindent','cindent'),
|
| 752 |
+
('cink','cink'),
|
| 753 |
+
('cinkeys','cinkeys'),
|
| 754 |
+
('cino','cino'),
|
| 755 |
+
('cinoptions','cinoptions'),
|
| 756 |
+
('cinw','cinw'),
|
| 757 |
+
('cinwords','cinwords'),
|
| 758 |
+
('clipboard','clipboard'),
|
| 759 |
+
('cmdheight','cmdheight'),
|
| 760 |
+
('cmdwinheight','cmdwinheight'),
|
| 761 |
+
('cmp','cmp'),
|
| 762 |
+
('cms','cms'),
|
| 763 |
+
('co','co'),
|
| 764 |
+
('cocu','cocu'),
|
| 765 |
+
('cole','cole'),
|
| 766 |
+
('colorcolumn','colorcolumn'),
|
| 767 |
+
('columns','columns'),
|
| 768 |
+
('com','com'),
|
| 769 |
+
('comments','comments'),
|
| 770 |
+
('commentstring','commentstring'),
|
| 771 |
+
('compatible','compatible'),
|
| 772 |
+
('complete','complete'),
|
| 773 |
+
('completefunc','completefunc'),
|
| 774 |
+
('completeopt','completeopt'),
|
| 775 |
+
('concealcursor','concealcursor'),
|
| 776 |
+
('conceallevel','conceallevel'),
|
| 777 |
+
('confirm','confirm'),
|
| 778 |
+
('consk','consk'),
|
| 779 |
+
('conskey','conskey'),
|
| 780 |
+
('copyindent','copyindent'),
|
| 781 |
+
('cot','cot'),
|
| 782 |
+
('cp','cp'),
|
| 783 |
+
('cpo','cpo'),
|
| 784 |
+
('cpoptions','cpoptions'),
|
| 785 |
+
('cpt','cpt'),
|
| 786 |
+
('crb','crb'),
|
| 787 |
+
('cryptmethod','cryptmethod'),
|
| 788 |
+
('cscopepathcomp','cscopepathcomp'),
|
| 789 |
+
('cscopeprg','cscopeprg'),
|
| 790 |
+
('cscopequickfix','cscopequickfix'),
|
| 791 |
+
('cscoperelative','cscoperelative'),
|
| 792 |
+
('cscopetag','cscopetag'),
|
| 793 |
+
('cscopetagorder','cscopetagorder'),
|
| 794 |
+
('cscopeverbose','cscopeverbose'),
|
| 795 |
+
('cspc','cspc'),
|
| 796 |
+
('csprg','csprg'),
|
| 797 |
+
('csqf','csqf'),
|
| 798 |
+
('csre','csre'),
|
| 799 |
+
('cst','cst'),
|
| 800 |
+
('csto','csto'),
|
| 801 |
+
('csverb','csverb'),
|
| 802 |
+
('cuc','cuc'),
|
| 803 |
+
('cul','cul'),
|
| 804 |
+
('cursorbind','cursorbind'),
|
| 805 |
+
('cursorcolumn','cursorcolumn'),
|
| 806 |
+
('cursorline','cursorline'),
|
| 807 |
+
('cwh','cwh'),
|
| 808 |
+
('debug','debug'),
|
| 809 |
+
('deco','deco'),
|
| 810 |
+
('def','def'),
|
| 811 |
+
('define','define'),
|
| 812 |
+
('delcombine','delcombine'),
|
| 813 |
+
('dex','dex'),
|
| 814 |
+
('dg','dg'),
|
| 815 |
+
('dict','dict'),
|
| 816 |
+
('dictionary','dictionary'),
|
| 817 |
+
('diff','diff'),
|
| 818 |
+
('diffexpr','diffexpr'),
|
| 819 |
+
('diffopt','diffopt'),
|
| 820 |
+
('digraph','digraph'),
|
| 821 |
+
('dip','dip'),
|
| 822 |
+
('dir','dir'),
|
| 823 |
+
('directory','directory'),
|
| 824 |
+
('display','display'),
|
| 825 |
+
('dy','dy'),
|
| 826 |
+
('ea','ea'),
|
| 827 |
+
('ead','ead'),
|
| 828 |
+
('eadirection','eadirection'),
|
| 829 |
+
('eb','eb'),
|
| 830 |
+
('ed','ed'),
|
| 831 |
+
('edcompatible','edcompatible'),
|
| 832 |
+
('ef','ef'),
|
| 833 |
+
('efm','efm'),
|
| 834 |
+
('ei','ei'),
|
| 835 |
+
('ek','ek'),
|
| 836 |
+
('enc','enc'),
|
| 837 |
+
('encoding','encoding'),
|
| 838 |
+
('endofline','endofline'),
|
| 839 |
+
('eol','eol'),
|
| 840 |
+
('ep','ep'),
|
| 841 |
+
('equalalways','equalalways'),
|
| 842 |
+
('equalprg','equalprg'),
|
| 843 |
+
('errorbells','errorbells'),
|
| 844 |
+
('errorfile','errorfile'),
|
| 845 |
+
('errorformat','errorformat'),
|
| 846 |
+
('esckeys','esckeys'),
|
| 847 |
+
('et','et'),
|
| 848 |
+
('eventignore','eventignore'),
|
| 849 |
+
('ex','ex'),
|
| 850 |
+
('expandtab','expandtab'),
|
| 851 |
+
('exrc','exrc'),
|
| 852 |
+
('fcl','fcl'),
|
| 853 |
+
('fcs','fcs'),
|
| 854 |
+
('fdc','fdc'),
|
| 855 |
+
('fde','fde'),
|
| 856 |
+
('fdi','fdi'),
|
| 857 |
+
('fdl','fdl'),
|
| 858 |
+
('fdls','fdls'),
|
| 859 |
+
('fdm','fdm'),
|
| 860 |
+
('fdn','fdn'),
|
| 861 |
+
('fdo','fdo'),
|
| 862 |
+
('fdt','fdt'),
|
| 863 |
+
('fen','fen'),
|
| 864 |
+
('fenc','fenc'),
|
| 865 |
+
('fencs','fencs'),
|
| 866 |
+
('fex','fex'),
|
| 867 |
+
('ff','ff'),
|
| 868 |
+
('ffs','ffs'),
|
| 869 |
+
('fic','fic'),
|
| 870 |
+
('fileencoding','fileencoding'),
|
| 871 |
+
('fileencodings','fileencodings'),
|
| 872 |
+
('fileformat','fileformat'),
|
| 873 |
+
('fileformats','fileformats'),
|
| 874 |
+
('fileignorecase','fileignorecase'),
|
| 875 |
+
('filetype','filetype'),
|
| 876 |
+
('fillchars','fillchars'),
|
| 877 |
+
('fk','fk'),
|
| 878 |
+
('fkmap','fkmap'),
|
| 879 |
+
('flp','flp'),
|
| 880 |
+
('fml','fml'),
|
| 881 |
+
('fmr','fmr'),
|
| 882 |
+
('fo','fo'),
|
| 883 |
+
('foldclose','foldclose'),
|
| 884 |
+
('foldcolumn','foldcolumn'),
|
| 885 |
+
('foldenable','foldenable'),
|
| 886 |
+
('foldexpr','foldexpr'),
|
| 887 |
+
('foldignore','foldignore'),
|
| 888 |
+
('foldlevel','foldlevel'),
|
| 889 |
+
('foldlevelstart','foldlevelstart'),
|
| 890 |
+
('foldmarker','foldmarker'),
|
| 891 |
+
('foldmethod','foldmethod'),
|
| 892 |
+
('foldminlines','foldminlines'),
|
| 893 |
+
('foldnestmax','foldnestmax'),
|
| 894 |
+
('foldopen','foldopen'),
|
| 895 |
+
('foldtext','foldtext'),
|
| 896 |
+
('formatexpr','formatexpr'),
|
| 897 |
+
('formatlistpat','formatlistpat'),
|
| 898 |
+
('formatoptions','formatoptions'),
|
| 899 |
+
('formatprg','formatprg'),
|
| 900 |
+
('fp','fp'),
|
| 901 |
+
('fs','fs'),
|
| 902 |
+
('fsync','fsync'),
|
| 903 |
+
('ft','ft'),
|
| 904 |
+
('gcr','gcr'),
|
| 905 |
+
('gd','gd'),
|
| 906 |
+
('gdefault','gdefault'),
|
| 907 |
+
('gfm','gfm'),
|
| 908 |
+
('gfn','gfn'),
|
| 909 |
+
('gfs','gfs'),
|
| 910 |
+
('gfw','gfw'),
|
| 911 |
+
('ghr','ghr'),
|
| 912 |
+
('go','go'),
|
| 913 |
+
('gp','gp'),
|
| 914 |
+
('grepformat','grepformat'),
|
| 915 |
+
('grepprg','grepprg'),
|
| 916 |
+
('gtl','gtl'),
|
| 917 |
+
('gtt','gtt'),
|
| 918 |
+
('guicursor','guicursor'),
|
| 919 |
+
('guifont','guifont'),
|
| 920 |
+
('guifontset','guifontset'),
|
| 921 |
+
('guifontwide','guifontwide'),
|
| 922 |
+
('guiheadroom','guiheadroom'),
|
| 923 |
+
('guioptions','guioptions'),
|
| 924 |
+
('guipty','guipty'),
|
| 925 |
+
('guitablabel','guitablabel'),
|
| 926 |
+
('guitabtooltip','guitabtooltip'),
|
| 927 |
+
('helpfile','helpfile'),
|
| 928 |
+
('helpheight','helpheight'),
|
| 929 |
+
('helplang','helplang'),
|
| 930 |
+
('hf','hf'),
|
| 931 |
+
('hh','hh'),
|
| 932 |
+
('hi','hi'),
|
| 933 |
+
('hid','hid'),
|
| 934 |
+
('hidden','hidden'),
|
| 935 |
+
('highlight','highlight'),
|
| 936 |
+
('history','history'),
|
| 937 |
+
('hk','hk'),
|
| 938 |
+
('hkmap','hkmap'),
|
| 939 |
+
('hkmapp','hkmapp'),
|
| 940 |
+
('hkp','hkp'),
|
| 941 |
+
('hl','hl'),
|
| 942 |
+
('hlg','hlg'),
|
| 943 |
+
('hls','hls'),
|
| 944 |
+
('hlsearch','hlsearch'),
|
| 945 |
+
('ic','ic'),
|
| 946 |
+
('icon','icon'),
|
| 947 |
+
('iconstring','iconstring'),
|
| 948 |
+
('ignorecase','ignorecase'),
|
| 949 |
+
('im','im'),
|
| 950 |
+
('imactivatefunc','imactivatefunc'),
|
| 951 |
+
('imactivatekey','imactivatekey'),
|
| 952 |
+
('imaf','imaf'),
|
| 953 |
+
('imak','imak'),
|
| 954 |
+
('imc','imc'),
|
| 955 |
+
('imcmdline','imcmdline'),
|
| 956 |
+
('imd','imd'),
|
| 957 |
+
('imdisable','imdisable'),
|
| 958 |
+
('imi','imi'),
|
| 959 |
+
('iminsert','iminsert'),
|
| 960 |
+
('ims','ims'),
|
| 961 |
+
('imsearch','imsearch'),
|
| 962 |
+
('imsf','imsf'),
|
| 963 |
+
('imstatusfunc','imstatusfunc'),
|
| 964 |
+
('inc','inc'),
|
| 965 |
+
('include','include'),
|
| 966 |
+
('includeexpr','includeexpr'),
|
| 967 |
+
('incsearch','incsearch'),
|
| 968 |
+
('inde','inde'),
|
| 969 |
+
('indentexpr','indentexpr'),
|
| 970 |
+
('indentkeys','indentkeys'),
|
| 971 |
+
('indk','indk'),
|
| 972 |
+
('inex','inex'),
|
| 973 |
+
('inf','inf'),
|
| 974 |
+
('infercase','infercase'),
|
| 975 |
+
('inoremap','inoremap'),
|
| 976 |
+
('insertmode','insertmode'),
|
| 977 |
+
('invacd','invacd'),
|
| 978 |
+
('invai','invai'),
|
| 979 |
+
('invakm','invakm'),
|
| 980 |
+
('invallowrevins','invallowrevins'),
|
| 981 |
+
('invaltkeymap','invaltkeymap'),
|
| 982 |
+
('invanti','invanti'),
|
| 983 |
+
('invantialias','invantialias'),
|
| 984 |
+
('invar','invar'),
|
| 985 |
+
('invarab','invarab'),
|
| 986 |
+
('invarabic','invarabic'),
|
| 987 |
+
('invarabicshape','invarabicshape'),
|
| 988 |
+
('invari','invari'),
|
| 989 |
+
('invarshape','invarshape'),
|
| 990 |
+
('invautochdir','invautochdir'),
|
| 991 |
+
('invautoindent','invautoindent'),
|
| 992 |
+
('invautoread','invautoread'),
|
| 993 |
+
('invautowrite','invautowrite'),
|
| 994 |
+
('invautowriteall','invautowriteall'),
|
| 995 |
+
('invaw','invaw'),
|
| 996 |
+
('invawa','invawa'),
|
| 997 |
+
('invbackup','invbackup'),
|
| 998 |
+
('invballooneval','invballooneval'),
|
| 999 |
+
('invbeval','invbeval'),
|
| 1000 |
+
('invbin','invbin'),
|
| 1001 |
+
('invbinary','invbinary'),
|
| 1002 |
+
('invbiosk','invbiosk'),
|
| 1003 |
+
('invbioskey','invbioskey'),
|
| 1004 |
+
('invbk','invbk'),
|
| 1005 |
+
('invbl','invbl'),
|
| 1006 |
+
('invbomb','invbomb'),
|
| 1007 |
+
('invbuflisted','invbuflisted'),
|
| 1008 |
+
('invcf','invcf'),
|
| 1009 |
+
('invci','invci'),
|
| 1010 |
+
('invcin','invcin'),
|
| 1011 |
+
('invcindent','invcindent'),
|
| 1012 |
+
('invcompatible','invcompatible'),
|
| 1013 |
+
('invconfirm','invconfirm'),
|
| 1014 |
+
('invconsk','invconsk'),
|
| 1015 |
+
('invconskey','invconskey'),
|
| 1016 |
+
('invcopyindent','invcopyindent'),
|
| 1017 |
+
('invcp','invcp'),
|
| 1018 |
+
('invcrb','invcrb'),
|
| 1019 |
+
('invcscoperelative','invcscoperelative'),
|
| 1020 |
+
('invcscopetag','invcscopetag'),
|
| 1021 |
+
('invcscopeverbose','invcscopeverbose'),
|
| 1022 |
+
('invcsre','invcsre'),
|
| 1023 |
+
('invcst','invcst'),
|
| 1024 |
+
('invcsverb','invcsverb'),
|
| 1025 |
+
('invcuc','invcuc'),
|
| 1026 |
+
('invcul','invcul'),
|
| 1027 |
+
('invcursorbind','invcursorbind'),
|
| 1028 |
+
('invcursorcolumn','invcursorcolumn'),
|
| 1029 |
+
('invcursorline','invcursorline'),
|
| 1030 |
+
('invdeco','invdeco'),
|
| 1031 |
+
('invdelcombine','invdelcombine'),
|
| 1032 |
+
('invdg','invdg'),
|
| 1033 |
+
('invdiff','invdiff'),
|
| 1034 |
+
('invdigraph','invdigraph'),
|
| 1035 |
+
('invea','invea'),
|
| 1036 |
+
('inveb','inveb'),
|
| 1037 |
+
('inved','inved'),
|
| 1038 |
+
('invedcompatible','invedcompatible'),
|
| 1039 |
+
('invek','invek'),
|
| 1040 |
+
('invendofline','invendofline'),
|
| 1041 |
+
('inveol','inveol'),
|
| 1042 |
+
('invequalalways','invequalalways'),
|
| 1043 |
+
('inverrorbells','inverrorbells'),
|
| 1044 |
+
('invesckeys','invesckeys'),
|
| 1045 |
+
('invet','invet'),
|
| 1046 |
+
('invex','invex'),
|
| 1047 |
+
('invexpandtab','invexpandtab'),
|
| 1048 |
+
('invexrc','invexrc'),
|
| 1049 |
+
('invfen','invfen'),
|
| 1050 |
+
('invfic','invfic'),
|
| 1051 |
+
('invfileignorecase','invfileignorecase'),
|
| 1052 |
+
('invfk','invfk'),
|
| 1053 |
+
('invfkmap','invfkmap'),
|
| 1054 |
+
('invfoldenable','invfoldenable'),
|
| 1055 |
+
('invgd','invgd'),
|
| 1056 |
+
('invgdefault','invgdefault'),
|
| 1057 |
+
('invguipty','invguipty'),
|
| 1058 |
+
('invhid','invhid'),
|
| 1059 |
+
('invhidden','invhidden'),
|
| 1060 |
+
('invhk','invhk'),
|
| 1061 |
+
('invhkmap','invhkmap'),
|
| 1062 |
+
('invhkmapp','invhkmapp'),
|
| 1063 |
+
('invhkp','invhkp'),
|
| 1064 |
+
('invhls','invhls'),
|
| 1065 |
+
('invhlsearch','invhlsearch'),
|
| 1066 |
+
('invic','invic'),
|
| 1067 |
+
('invicon','invicon'),
|
| 1068 |
+
('invignorecase','invignorecase'),
|
| 1069 |
+
('invim','invim'),
|
| 1070 |
+
('invimc','invimc'),
|
| 1071 |
+
('invimcmdline','invimcmdline'),
|
| 1072 |
+
('invimd','invimd'),
|
| 1073 |
+
('invimdisable','invimdisable'),
|
| 1074 |
+
('invincsearch','invincsearch'),
|
| 1075 |
+
('invinf','invinf'),
|
| 1076 |
+
('invinfercase','invinfercase'),
|
| 1077 |
+
('invinsertmode','invinsertmode'),
|
| 1078 |
+
('invis','invis'),
|
| 1079 |
+
('invjoinspaces','invjoinspaces'),
|
| 1080 |
+
('invjs','invjs'),
|
| 1081 |
+
('invlazyredraw','invlazyredraw'),
|
| 1082 |
+
('invlbr','invlbr'),
|
| 1083 |
+
('invlinebreak','invlinebreak'),
|
| 1084 |
+
('invlisp','invlisp'),
|
| 1085 |
+
('invlist','invlist'),
|
| 1086 |
+
('invloadplugins','invloadplugins'),
|
| 1087 |
+
('invlpl','invlpl'),
|
| 1088 |
+
('invlz','invlz'),
|
| 1089 |
+
('invma','invma'),
|
| 1090 |
+
('invmacatsui','invmacatsui'),
|
| 1091 |
+
('invmagic','invmagic'),
|
| 1092 |
+
('invmh','invmh'),
|
| 1093 |
+
('invml','invml'),
|
| 1094 |
+
('invmod','invmod'),
|
| 1095 |
+
('invmodeline','invmodeline'),
|
| 1096 |
+
('invmodifiable','invmodifiable'),
|
| 1097 |
+
('invmodified','invmodified'),
|
| 1098 |
+
('invmore','invmore'),
|
| 1099 |
+
('invmousef','invmousef'),
|
| 1100 |
+
('invmousefocus','invmousefocus'),
|
| 1101 |
+
('invmousehide','invmousehide'),
|
| 1102 |
+
('invnu','invnu'),
|
| 1103 |
+
('invnumber','invnumber'),
|
| 1104 |
+
('invodev','invodev'),
|
| 1105 |
+
('invopendevice','invopendevice'),
|
| 1106 |
+
('invpaste','invpaste'),
|
| 1107 |
+
('invpi','invpi'),
|
| 1108 |
+
('invpreserveindent','invpreserveindent'),
|
| 1109 |
+
('invpreviewwindow','invpreviewwindow'),
|
| 1110 |
+
('invprompt','invprompt'),
|
| 1111 |
+
('invpvw','invpvw'),
|
| 1112 |
+
('invreadonly','invreadonly'),
|
| 1113 |
+
('invrelativenumber','invrelativenumber'),
|
| 1114 |
+
('invremap','invremap'),
|
| 1115 |
+
('invrestorescreen','invrestorescreen'),
|
| 1116 |
+
('invrevins','invrevins'),
|
| 1117 |
+
('invri','invri'),
|
| 1118 |
+
('invrightleft','invrightleft'),
|
| 1119 |
+
('invrl','invrl'),
|
| 1120 |
+
('invrnu','invrnu'),
|
| 1121 |
+
('invro','invro'),
|
| 1122 |
+
('invrs','invrs'),
|
| 1123 |
+
('invru','invru'),
|
| 1124 |
+
('invruler','invruler'),
|
| 1125 |
+
('invsb','invsb'),
|
| 1126 |
+
('invsc','invsc'),
|
| 1127 |
+
('invscb','invscb'),
|
| 1128 |
+
('invscrollbind','invscrollbind'),
|
| 1129 |
+
('invscs','invscs'),
|
| 1130 |
+
('invsecure','invsecure'),
|
| 1131 |
+
('invsft','invsft'),
|
| 1132 |
+
('invshellslash','invshellslash'),
|
| 1133 |
+
('invshelltemp','invshelltemp'),
|
| 1134 |
+
('invshiftround','invshiftround'),
|
| 1135 |
+
('invshortname','invshortname'),
|
| 1136 |
+
('invshowcmd','invshowcmd'),
|
| 1137 |
+
('invshowfulltag','invshowfulltag'),
|
| 1138 |
+
('invshowmatch','invshowmatch'),
|
| 1139 |
+
('invshowmode','invshowmode'),
|
| 1140 |
+
('invsi','invsi'),
|
| 1141 |
+
('invsm','invsm'),
|
| 1142 |
+
('invsmartcase','invsmartcase'),
|
| 1143 |
+
('invsmartindent','invsmartindent'),
|
| 1144 |
+
('invsmarttab','invsmarttab'),
|
| 1145 |
+
('invsmd','invsmd'),
|
| 1146 |
+
('invsn','invsn'),
|
| 1147 |
+
('invsol','invsol'),
|
| 1148 |
+
('invspell','invspell'),
|
| 1149 |
+
('invsplitbelow','invsplitbelow'),
|
| 1150 |
+
('invsplitright','invsplitright'),
|
| 1151 |
+
('invspr','invspr'),
|
| 1152 |
+
('invsr','invsr'),
|
| 1153 |
+
('invssl','invssl'),
|
| 1154 |
+
('invsta','invsta'),
|
| 1155 |
+
('invstartofline','invstartofline'),
|
| 1156 |
+
('invstmp','invstmp'),
|
| 1157 |
+
('invswapfile','invswapfile'),
|
| 1158 |
+
('invswf','invswf'),
|
| 1159 |
+
('invta','invta'),
|
| 1160 |
+
('invtagbsearch','invtagbsearch'),
|
| 1161 |
+
('invtagrelative','invtagrelative'),
|
| 1162 |
+
('invtagstack','invtagstack'),
|
| 1163 |
+
('invtbi','invtbi'),
|
| 1164 |
+
('invtbidi','invtbidi'),
|
| 1165 |
+
('invtbs','invtbs'),
|
| 1166 |
+
('invtermbidi','invtermbidi'),
|
| 1167 |
+
('invterse','invterse'),
|
| 1168 |
+
('invtextauto','invtextauto'),
|
| 1169 |
+
('invtextmode','invtextmode'),
|
| 1170 |
+
('invtf','invtf'),
|
| 1171 |
+
('invtgst','invtgst'),
|
| 1172 |
+
('invtildeop','invtildeop'),
|
| 1173 |
+
('invtimeout','invtimeout'),
|
| 1174 |
+
('invtitle','invtitle'),
|
| 1175 |
+
('invto','invto'),
|
| 1176 |
+
('invtop','invtop'),
|
| 1177 |
+
('invtr','invtr'),
|
| 1178 |
+
('invttimeout','invttimeout'),
|
| 1179 |
+
('invttybuiltin','invttybuiltin'),
|
| 1180 |
+
('invttyfast','invttyfast'),
|
| 1181 |
+
('invtx','invtx'),
|
| 1182 |
+
('invudf','invudf'),
|
| 1183 |
+
('invundofile','invundofile'),
|
| 1184 |
+
('invvb','invvb'),
|
| 1185 |
+
('invvisualbell','invvisualbell'),
|
| 1186 |
+
('invwa','invwa'),
|
| 1187 |
+
('invwarn','invwarn'),
|
| 1188 |
+
('invwb','invwb'),
|
| 1189 |
+
('invweirdinvert','invweirdinvert'),
|
| 1190 |
+
('invwfh','invwfh'),
|
| 1191 |
+
('invwfw','invwfw'),
|
| 1192 |
+
('invwic','invwic'),
|
| 1193 |
+
('invwildignorecase','invwildignorecase'),
|
| 1194 |
+
('invwildmenu','invwildmenu'),
|
| 1195 |
+
('invwinfixheight','invwinfixheight'),
|
| 1196 |
+
('invwinfixwidth','invwinfixwidth'),
|
| 1197 |
+
('invwiv','invwiv'),
|
| 1198 |
+
('invwmnu','invwmnu'),
|
| 1199 |
+
('invwrap','invwrap'),
|
| 1200 |
+
('invwrapscan','invwrapscan'),
|
| 1201 |
+
('invwrite','invwrite'),
|
| 1202 |
+
('invwriteany','invwriteany'),
|
| 1203 |
+
('invwritebackup','invwritebackup'),
|
| 1204 |
+
('invws','invws'),
|
| 1205 |
+
('is','is'),
|
| 1206 |
+
('isf','isf'),
|
| 1207 |
+
('isfname','isfname'),
|
| 1208 |
+
('isi','isi'),
|
| 1209 |
+
('isident','isident'),
|
| 1210 |
+
('isk','isk'),
|
| 1211 |
+
('iskeyword','iskeyword'),
|
| 1212 |
+
('isp','isp'),
|
| 1213 |
+
('isprint','isprint'),
|
| 1214 |
+
('joinspaces','joinspaces'),
|
| 1215 |
+
('js','js'),
|
| 1216 |
+
('key','key'),
|
| 1217 |
+
('keymap','keymap'),
|
| 1218 |
+
('keymodel','keymodel'),
|
| 1219 |
+
('keywordprg','keywordprg'),
|
| 1220 |
+
('km','km'),
|
| 1221 |
+
('kmp','kmp'),
|
| 1222 |
+
('kp','kp'),
|
| 1223 |
+
('langmap','langmap'),
|
| 1224 |
+
('langmenu','langmenu'),
|
| 1225 |
+
('laststatus','laststatus'),
|
| 1226 |
+
('lazyredraw','lazyredraw'),
|
| 1227 |
+
('lbr','lbr'),
|
| 1228 |
+
('lcs','lcs'),
|
| 1229 |
+
('linebreak','linebreak'),
|
| 1230 |
+
('lines','lines'),
|
| 1231 |
+
('linespace','linespace'),
|
| 1232 |
+
('lisp','lisp'),
|
| 1233 |
+
('lispwords','lispwords'),
|
| 1234 |
+
('list','list'),
|
| 1235 |
+
('listchars','listchars'),
|
| 1236 |
+
('lm','lm'),
|
| 1237 |
+
('lmap','lmap'),
|
| 1238 |
+
('loadplugins','loadplugins'),
|
| 1239 |
+
('lpl','lpl'),
|
| 1240 |
+
('ls','ls'),
|
| 1241 |
+
('lsp','lsp'),
|
| 1242 |
+
('lw','lw'),
|
| 1243 |
+
('lz','lz'),
|
| 1244 |
+
('ma','ma'),
|
| 1245 |
+
('macatsui','macatsui'),
|
| 1246 |
+
('magic','magic'),
|
| 1247 |
+
('makeef','makeef'),
|
| 1248 |
+
('makeprg','makeprg'),
|
| 1249 |
+
('mat','mat'),
|
| 1250 |
+
('matchpairs','matchpairs'),
|
| 1251 |
+
('matchtime','matchtime'),
|
| 1252 |
+
('maxcombine','maxcombine'),
|
| 1253 |
+
('maxfuncdepth','maxfuncdepth'),
|
| 1254 |
+
('maxmapdepth','maxmapdepth'),
|
| 1255 |
+
('maxmem','maxmem'),
|
| 1256 |
+
('maxmempattern','maxmempattern'),
|
| 1257 |
+
('maxmemtot','maxmemtot'),
|
| 1258 |
+
('mco','mco'),
|
| 1259 |
+
('mef','mef'),
|
| 1260 |
+
('menuitems','menuitems'),
|
| 1261 |
+
('mfd','mfd'),
|
| 1262 |
+
('mh','mh'),
|
| 1263 |
+
('mis','mis'),
|
| 1264 |
+
('mkspellmem','mkspellmem'),
|
| 1265 |
+
('ml','ml'),
|
| 1266 |
+
('mls','mls'),
|
| 1267 |
+
('mm','mm'),
|
| 1268 |
+
('mmd','mmd'),
|
| 1269 |
+
('mmp','mmp'),
|
| 1270 |
+
('mmt','mmt'),
|
| 1271 |
+
('mod','mod'),
|
| 1272 |
+
('modeline','modeline'),
|
| 1273 |
+
('modelines','modelines'),
|
| 1274 |
+
('modifiable','modifiable'),
|
| 1275 |
+
('modified','modified'),
|
| 1276 |
+
('more','more'),
|
| 1277 |
+
('mouse','mouse'),
|
| 1278 |
+
('mousef','mousef'),
|
| 1279 |
+
('mousefocus','mousefocus'),
|
| 1280 |
+
('mousehide','mousehide'),
|
| 1281 |
+
('mousem','mousem'),
|
| 1282 |
+
('mousemodel','mousemodel'),
|
| 1283 |
+
('mouses','mouses'),
|
| 1284 |
+
('mouseshape','mouseshape'),
|
| 1285 |
+
('mouset','mouset'),
|
| 1286 |
+
('mousetime','mousetime'),
|
| 1287 |
+
('mp','mp'),
|
| 1288 |
+
('mps','mps'),
|
| 1289 |
+
('msm','msm'),
|
| 1290 |
+
('mzq','mzq'),
|
| 1291 |
+
('mzquantum','mzquantum'),
|
| 1292 |
+
('nf','nf'),
|
| 1293 |
+
('nnoremap','nnoremap'),
|
| 1294 |
+
('noacd','noacd'),
|
| 1295 |
+
('noai','noai'),
|
| 1296 |
+
('noakm','noakm'),
|
| 1297 |
+
('noallowrevins','noallowrevins'),
|
| 1298 |
+
('noaltkeymap','noaltkeymap'),
|
| 1299 |
+
('noanti','noanti'),
|
| 1300 |
+
('noantialias','noantialias'),
|
| 1301 |
+
('noar','noar'),
|
| 1302 |
+
('noarab','noarab'),
|
| 1303 |
+
('noarabic','noarabic'),
|
| 1304 |
+
('noarabicshape','noarabicshape'),
|
| 1305 |
+
('noari','noari'),
|
| 1306 |
+
('noarshape','noarshape'),
|
| 1307 |
+
('noautochdir','noautochdir'),
|
| 1308 |
+
('noautoindent','noautoindent'),
|
| 1309 |
+
('noautoread','noautoread'),
|
| 1310 |
+
('noautowrite','noautowrite'),
|
| 1311 |
+
('noautowriteall','noautowriteall'),
|
| 1312 |
+
('noaw','noaw'),
|
| 1313 |
+
('noawa','noawa'),
|
| 1314 |
+
('nobackup','nobackup'),
|
| 1315 |
+
('noballooneval','noballooneval'),
|
| 1316 |
+
('nobeval','nobeval'),
|
| 1317 |
+
('nobin','nobin'),
|
| 1318 |
+
('nobinary','nobinary'),
|
| 1319 |
+
('nobiosk','nobiosk'),
|
| 1320 |
+
('nobioskey','nobioskey'),
|
| 1321 |
+
('nobk','nobk'),
|
| 1322 |
+
('nobl','nobl'),
|
| 1323 |
+
('nobomb','nobomb'),
|
| 1324 |
+
('nobuflisted','nobuflisted'),
|
| 1325 |
+
('nocf','nocf'),
|
| 1326 |
+
('noci','noci'),
|
| 1327 |
+
('nocin','nocin'),
|
| 1328 |
+
('nocindent','nocindent'),
|
| 1329 |
+
('nocompatible','nocompatible'),
|
| 1330 |
+
('noconfirm','noconfirm'),
|
| 1331 |
+
('noconsk','noconsk'),
|
| 1332 |
+
('noconskey','noconskey'),
|
| 1333 |
+
('nocopyindent','nocopyindent'),
|
| 1334 |
+
('nocp','nocp'),
|
| 1335 |
+
('nocrb','nocrb'),
|
| 1336 |
+
('nocscoperelative','nocscoperelative'),
|
| 1337 |
+
('nocscopetag','nocscopetag'),
|
| 1338 |
+
('nocscopeverbose','nocscopeverbose'),
|
| 1339 |
+
('nocsre','nocsre'),
|
| 1340 |
+
('nocst','nocst'),
|
| 1341 |
+
('nocsverb','nocsverb'),
|
| 1342 |
+
('nocuc','nocuc'),
|
| 1343 |
+
('nocul','nocul'),
|
| 1344 |
+
('nocursorbind','nocursorbind'),
|
| 1345 |
+
('nocursorcolumn','nocursorcolumn'),
|
| 1346 |
+
('nocursorline','nocursorline'),
|
| 1347 |
+
('nodeco','nodeco'),
|
| 1348 |
+
('nodelcombine','nodelcombine'),
|
| 1349 |
+
('nodg','nodg'),
|
| 1350 |
+
('nodiff','nodiff'),
|
| 1351 |
+
('nodigraph','nodigraph'),
|
| 1352 |
+
('noea','noea'),
|
| 1353 |
+
('noeb','noeb'),
|
| 1354 |
+
('noed','noed'),
|
| 1355 |
+
('noedcompatible','noedcompatible'),
|
| 1356 |
+
('noek','noek'),
|
| 1357 |
+
('noendofline','noendofline'),
|
| 1358 |
+
('noeol','noeol'),
|
| 1359 |
+
('noequalalways','noequalalways'),
|
| 1360 |
+
('noerrorbells','noerrorbells'),
|
| 1361 |
+
('noesckeys','noesckeys'),
|
| 1362 |
+
('noet','noet'),
|
| 1363 |
+
('noex','noex'),
|
| 1364 |
+
('noexpandtab','noexpandtab'),
|
| 1365 |
+
('noexrc','noexrc'),
|
| 1366 |
+
('nofen','nofen'),
|
| 1367 |
+
('nofic','nofic'),
|
| 1368 |
+
('nofileignorecase','nofileignorecase'),
|
| 1369 |
+
('nofk','nofk'),
|
| 1370 |
+
('nofkmap','nofkmap'),
|
| 1371 |
+
('nofoldenable','nofoldenable'),
|
| 1372 |
+
('nogd','nogd'),
|
| 1373 |
+
('nogdefault','nogdefault'),
|
| 1374 |
+
('noguipty','noguipty'),
|
| 1375 |
+
('nohid','nohid'),
|
| 1376 |
+
('nohidden','nohidden'),
|
| 1377 |
+
('nohk','nohk'),
|
| 1378 |
+
('nohkmap','nohkmap'),
|
| 1379 |
+
('nohkmapp','nohkmapp'),
|
| 1380 |
+
('nohkp','nohkp'),
|
| 1381 |
+
('nohls','nohls'),
|
| 1382 |
+
('nohlsearch','nohlsearch'),
|
| 1383 |
+
('noic','noic'),
|
| 1384 |
+
('noicon','noicon'),
|
| 1385 |
+
('noignorecase','noignorecase'),
|
| 1386 |
+
('noim','noim'),
|
| 1387 |
+
('noimc','noimc'),
|
| 1388 |
+
('noimcmdline','noimcmdline'),
|
| 1389 |
+
('noimd','noimd'),
|
| 1390 |
+
('noimdisable','noimdisable'),
|
| 1391 |
+
('noincsearch','noincsearch'),
|
| 1392 |
+
('noinf','noinf'),
|
| 1393 |
+
('noinfercase','noinfercase'),
|
| 1394 |
+
('noinsertmode','noinsertmode'),
|
| 1395 |
+
('nois','nois'),
|
| 1396 |
+
('nojoinspaces','nojoinspaces'),
|
| 1397 |
+
('nojs','nojs'),
|
| 1398 |
+
('nolazyredraw','nolazyredraw'),
|
| 1399 |
+
('nolbr','nolbr'),
|
| 1400 |
+
('nolinebreak','nolinebreak'),
|
| 1401 |
+
('nolisp','nolisp'),
|
| 1402 |
+
('nolist','nolist'),
|
| 1403 |
+
('noloadplugins','noloadplugins'),
|
| 1404 |
+
('nolpl','nolpl'),
|
| 1405 |
+
('nolz','nolz'),
|
| 1406 |
+
('noma','noma'),
|
| 1407 |
+
('nomacatsui','nomacatsui'),
|
| 1408 |
+
('nomagic','nomagic'),
|
| 1409 |
+
('nomh','nomh'),
|
| 1410 |
+
('noml','noml'),
|
| 1411 |
+
('nomod','nomod'),
|
| 1412 |
+
('nomodeline','nomodeline'),
|
| 1413 |
+
('nomodifiable','nomodifiable'),
|
| 1414 |
+
('nomodified','nomodified'),
|
| 1415 |
+
('nomore','nomore'),
|
| 1416 |
+
('nomousef','nomousef'),
|
| 1417 |
+
('nomousefocus','nomousefocus'),
|
| 1418 |
+
('nomousehide','nomousehide'),
|
| 1419 |
+
('nonu','nonu'),
|
| 1420 |
+
('nonumber','nonumber'),
|
| 1421 |
+
('noodev','noodev'),
|
| 1422 |
+
('noopendevice','noopendevice'),
|
| 1423 |
+
('nopaste','nopaste'),
|
| 1424 |
+
('nopi','nopi'),
|
| 1425 |
+
('nopreserveindent','nopreserveindent'),
|
| 1426 |
+
('nopreviewwindow','nopreviewwindow'),
|
| 1427 |
+
('noprompt','noprompt'),
|
| 1428 |
+
('nopvw','nopvw'),
|
| 1429 |
+
('noreadonly','noreadonly'),
|
| 1430 |
+
('norelativenumber','norelativenumber'),
|
| 1431 |
+
('noremap','noremap'),
|
| 1432 |
+
('norestorescreen','norestorescreen'),
|
| 1433 |
+
('norevins','norevins'),
|
| 1434 |
+
('nori','nori'),
|
| 1435 |
+
('norightleft','norightleft'),
|
| 1436 |
+
('norl','norl'),
|
| 1437 |
+
('nornu','nornu'),
|
| 1438 |
+
('noro','noro'),
|
| 1439 |
+
('nors','nors'),
|
| 1440 |
+
('noru','noru'),
|
| 1441 |
+
('noruler','noruler'),
|
| 1442 |
+
('nosb','nosb'),
|
| 1443 |
+
('nosc','nosc'),
|
| 1444 |
+
('noscb','noscb'),
|
| 1445 |
+
('noscrollbind','noscrollbind'),
|
| 1446 |
+
('noscs','noscs'),
|
| 1447 |
+
('nosecure','nosecure'),
|
| 1448 |
+
('nosft','nosft'),
|
| 1449 |
+
('noshellslash','noshellslash'),
|
| 1450 |
+
('noshelltemp','noshelltemp'),
|
| 1451 |
+
('noshiftround','noshiftround'),
|
| 1452 |
+
('noshortname','noshortname'),
|
| 1453 |
+
('noshowcmd','noshowcmd'),
|
| 1454 |
+
('noshowfulltag','noshowfulltag'),
|
| 1455 |
+
('noshowmatch','noshowmatch'),
|
| 1456 |
+
('noshowmode','noshowmode'),
|
| 1457 |
+
('nosi','nosi'),
|
| 1458 |
+
('nosm','nosm'),
|
| 1459 |
+
('nosmartcase','nosmartcase'),
|
| 1460 |
+
('nosmartindent','nosmartindent'),
|
| 1461 |
+
('nosmarttab','nosmarttab'),
|
| 1462 |
+
('nosmd','nosmd'),
|
| 1463 |
+
('nosn','nosn'),
|
| 1464 |
+
('nosol','nosol'),
|
| 1465 |
+
('nospell','nospell'),
|
| 1466 |
+
('nosplitbelow','nosplitbelow'),
|
| 1467 |
+
('nosplitright','nosplitright'),
|
| 1468 |
+
('nospr','nospr'),
|
| 1469 |
+
('nosr','nosr'),
|
| 1470 |
+
('nossl','nossl'),
|
| 1471 |
+
('nosta','nosta'),
|
| 1472 |
+
('nostartofline','nostartofline'),
|
| 1473 |
+
('nostmp','nostmp'),
|
| 1474 |
+
('noswapfile','noswapfile'),
|
| 1475 |
+
('noswf','noswf'),
|
| 1476 |
+
('nota','nota'),
|
| 1477 |
+
('notagbsearch','notagbsearch'),
|
| 1478 |
+
('notagrelative','notagrelative'),
|
| 1479 |
+
('notagstack','notagstack'),
|
| 1480 |
+
('notbi','notbi'),
|
| 1481 |
+
('notbidi','notbidi'),
|
| 1482 |
+
('notbs','notbs'),
|
| 1483 |
+
('notermbidi','notermbidi'),
|
| 1484 |
+
('noterse','noterse'),
|
| 1485 |
+
('notextauto','notextauto'),
|
| 1486 |
+
('notextmode','notextmode'),
|
| 1487 |
+
('notf','notf'),
|
| 1488 |
+
('notgst','notgst'),
|
| 1489 |
+
('notildeop','notildeop'),
|
| 1490 |
+
('notimeout','notimeout'),
|
| 1491 |
+
('notitle','notitle'),
|
| 1492 |
+
('noto','noto'),
|
| 1493 |
+
('notop','notop'),
|
| 1494 |
+
('notr','notr'),
|
| 1495 |
+
('nottimeout','nottimeout'),
|
| 1496 |
+
('nottybuiltin','nottybuiltin'),
|
| 1497 |
+
('nottyfast','nottyfast'),
|
| 1498 |
+
('notx','notx'),
|
| 1499 |
+
('noudf','noudf'),
|
| 1500 |
+
('noundofile','noundofile'),
|
| 1501 |
+
('novb','novb'),
|
| 1502 |
+
('novisualbell','novisualbell'),
|
| 1503 |
+
('nowa','nowa'),
|
| 1504 |
+
('nowarn','nowarn'),
|
| 1505 |
+
('nowb','nowb'),
|
| 1506 |
+
('noweirdinvert','noweirdinvert'),
|
| 1507 |
+
('nowfh','nowfh'),
|
| 1508 |
+
('nowfw','nowfw'),
|
| 1509 |
+
('nowic','nowic'),
|
| 1510 |
+
('nowildignorecase','nowildignorecase'),
|
| 1511 |
+
('nowildmenu','nowildmenu'),
|
| 1512 |
+
('nowinfixheight','nowinfixheight'),
|
| 1513 |
+
('nowinfixwidth','nowinfixwidth'),
|
| 1514 |
+
('nowiv','nowiv'),
|
| 1515 |
+
('nowmnu','nowmnu'),
|
| 1516 |
+
('nowrap','nowrap'),
|
| 1517 |
+
('nowrapscan','nowrapscan'),
|
| 1518 |
+
('nowrite','nowrite'),
|
| 1519 |
+
('nowriteany','nowriteany'),
|
| 1520 |
+
('nowritebackup','nowritebackup'),
|
| 1521 |
+
('nows','nows'),
|
| 1522 |
+
('nrformats','nrformats'),
|
| 1523 |
+
('nu','nu'),
|
| 1524 |
+
('number','number'),
|
| 1525 |
+
('numberwidth','numberwidth'),
|
| 1526 |
+
('nuw','nuw'),
|
| 1527 |
+
('odev','odev'),
|
| 1528 |
+
('oft','oft'),
|
| 1529 |
+
('ofu','ofu'),
|
| 1530 |
+
('omnifunc','omnifunc'),
|
| 1531 |
+
('opendevice','opendevice'),
|
| 1532 |
+
('operatorfunc','operatorfunc'),
|
| 1533 |
+
('opfunc','opfunc'),
|
| 1534 |
+
('osfiletype','osfiletype'),
|
| 1535 |
+
('pa','pa'),
|
| 1536 |
+
('para','para'),
|
| 1537 |
+
('paragraphs','paragraphs'),
|
| 1538 |
+
('paste','paste'),
|
| 1539 |
+
('pastetoggle','pastetoggle'),
|
| 1540 |
+
('patchexpr','patchexpr'),
|
| 1541 |
+
('patchmode','patchmode'),
|
| 1542 |
+
('path','path'),
|
| 1543 |
+
('pdev','pdev'),
|
| 1544 |
+
('penc','penc'),
|
| 1545 |
+
('pex','pex'),
|
| 1546 |
+
('pexpr','pexpr'),
|
| 1547 |
+
('pfn','pfn'),
|
| 1548 |
+
('ph','ph'),
|
| 1549 |
+
('pheader','pheader'),
|
| 1550 |
+
('pi','pi'),
|
| 1551 |
+
('pm','pm'),
|
| 1552 |
+
('pmbcs','pmbcs'),
|
| 1553 |
+
('pmbfn','pmbfn'),
|
| 1554 |
+
('popt','popt'),
|
| 1555 |
+
('preserveindent','preserveindent'),
|
| 1556 |
+
('previewheight','previewheight'),
|
| 1557 |
+
('previewwindow','previewwindow'),
|
| 1558 |
+
('printdevice','printdevice'),
|
| 1559 |
+
('printencoding','printencoding'),
|
| 1560 |
+
('printexpr','printexpr'),
|
| 1561 |
+
('printfont','printfont'),
|
| 1562 |
+
('printheader','printheader'),
|
| 1563 |
+
('printmbcharset','printmbcharset'),
|
| 1564 |
+
('printmbfont','printmbfont'),
|
| 1565 |
+
('printoptions','printoptions'),
|
| 1566 |
+
('prompt','prompt'),
|
| 1567 |
+
('pt','pt'),
|
| 1568 |
+
('pumheight','pumheight'),
|
| 1569 |
+
('pvh','pvh'),
|
| 1570 |
+
('pvw','pvw'),
|
| 1571 |
+
('qe','qe'),
|
| 1572 |
+
('quoteescape','quoteescape'),
|
| 1573 |
+
('rdt','rdt'),
|
| 1574 |
+
('re','re'),
|
| 1575 |
+
('readonly','readonly'),
|
| 1576 |
+
('redrawtime','redrawtime'),
|
| 1577 |
+
('regexpengine','regexpengine'),
|
| 1578 |
+
('relativenumber','relativenumber'),
|
| 1579 |
+
('remap','remap'),
|
| 1580 |
+
('report','report'),
|
| 1581 |
+
('restorescreen','restorescreen'),
|
| 1582 |
+
('revins','revins'),
|
| 1583 |
+
('ri','ri'),
|
| 1584 |
+
('rightleft','rightleft'),
|
| 1585 |
+
('rightleftcmd','rightleftcmd'),
|
| 1586 |
+
('rl','rl'),
|
| 1587 |
+
('rlc','rlc'),
|
| 1588 |
+
('rnu','rnu'),
|
| 1589 |
+
('ro','ro'),
|
| 1590 |
+
('rs','rs'),
|
| 1591 |
+
('rtp','rtp'),
|
| 1592 |
+
('ru','ru'),
|
| 1593 |
+
('ruf','ruf'),
|
| 1594 |
+
('ruler','ruler'),
|
| 1595 |
+
('rulerformat','rulerformat'),
|
| 1596 |
+
('runtimepath','runtimepath'),
|
| 1597 |
+
('sb','sb'),
|
| 1598 |
+
('sbo','sbo'),
|
| 1599 |
+
('sbr','sbr'),
|
| 1600 |
+
('sc','sc'),
|
| 1601 |
+
('scb','scb'),
|
| 1602 |
+
('scr','scr'),
|
| 1603 |
+
('scroll','scroll'),
|
| 1604 |
+
('scrollbind','scrollbind'),
|
| 1605 |
+
('scrolljump','scrolljump'),
|
| 1606 |
+
('scrolloff','scrolloff'),
|
| 1607 |
+
('scrollopt','scrollopt'),
|
| 1608 |
+
('scs','scs'),
|
| 1609 |
+
('sect','sect'),
|
| 1610 |
+
('sections','sections'),
|
| 1611 |
+
('secure','secure'),
|
| 1612 |
+
('sel','sel'),
|
| 1613 |
+
('selection','selection'),
|
| 1614 |
+
('selectmode','selectmode'),
|
| 1615 |
+
('sessionoptions','sessionoptions'),
|
| 1616 |
+
('sft','sft'),
|
| 1617 |
+
('sh','sh'),
|
| 1618 |
+
('shcf','shcf'),
|
| 1619 |
+
('shell','shell'),
|
| 1620 |
+
('shellcmdflag','shellcmdflag'),
|
| 1621 |
+
('shellpipe','shellpipe'),
|
| 1622 |
+
('shellquote','shellquote'),
|
| 1623 |
+
('shellredir','shellredir'),
|
| 1624 |
+
('shellslash','shellslash'),
|
| 1625 |
+
('shelltemp','shelltemp'),
|
| 1626 |
+
('shelltype','shelltype'),
|
| 1627 |
+
('shellxescape','shellxescape'),
|
| 1628 |
+
('shellxquote','shellxquote'),
|
| 1629 |
+
('shiftround','shiftround'),
|
| 1630 |
+
('shiftwidth','shiftwidth'),
|
| 1631 |
+
('shm','shm'),
|
| 1632 |
+
('shortmess','shortmess'),
|
| 1633 |
+
('shortname','shortname'),
|
| 1634 |
+
('showbreak','showbreak'),
|
| 1635 |
+
('showcmd','showcmd'),
|
| 1636 |
+
('showfulltag','showfulltag'),
|
| 1637 |
+
('showmatch','showmatch'),
|
| 1638 |
+
('showmode','showmode'),
|
| 1639 |
+
('showtabline','showtabline'),
|
| 1640 |
+
('shq','shq'),
|
| 1641 |
+
('si','si'),
|
| 1642 |
+
('sidescroll','sidescroll'),
|
| 1643 |
+
('sidescrolloff','sidescrolloff'),
|
| 1644 |
+
('siso','siso'),
|
| 1645 |
+
('sj','sj'),
|
| 1646 |
+
('slm','slm'),
|
| 1647 |
+
('sm','sm'),
|
| 1648 |
+
('smartcase','smartcase'),
|
| 1649 |
+
('smartindent','smartindent'),
|
| 1650 |
+
('smarttab','smarttab'),
|
| 1651 |
+
('smc','smc'),
|
| 1652 |
+
('smd','smd'),
|
| 1653 |
+
('sn','sn'),
|
| 1654 |
+
('so','so'),
|
| 1655 |
+
('softtabstop','softtabstop'),
|
| 1656 |
+
('sol','sol'),
|
| 1657 |
+
('sp','sp'),
|
| 1658 |
+
('spc','spc'),
|
| 1659 |
+
('spell','spell'),
|
| 1660 |
+
('spellcapcheck','spellcapcheck'),
|
| 1661 |
+
('spellfile','spellfile'),
|
| 1662 |
+
('spelllang','spelllang'),
|
| 1663 |
+
('spellsuggest','spellsuggest'),
|
| 1664 |
+
('spf','spf'),
|
| 1665 |
+
('spl','spl'),
|
| 1666 |
+
('splitbelow','splitbelow'),
|
| 1667 |
+
('splitright','splitright'),
|
| 1668 |
+
('spr','spr'),
|
| 1669 |
+
('sps','sps'),
|
| 1670 |
+
('sr','sr'),
|
| 1671 |
+
('srr','srr'),
|
| 1672 |
+
('ss','ss'),
|
| 1673 |
+
('ssl','ssl'),
|
| 1674 |
+
('ssop','ssop'),
|
| 1675 |
+
('st','st'),
|
| 1676 |
+
('sta','sta'),
|
| 1677 |
+
('stal','stal'),
|
| 1678 |
+
('startofline','startofline'),
|
| 1679 |
+
('statusline','statusline'),
|
| 1680 |
+
('stl','stl'),
|
| 1681 |
+
('stmp','stmp'),
|
| 1682 |
+
('sts','sts'),
|
| 1683 |
+
('su','su'),
|
| 1684 |
+
('sua','sua'),
|
| 1685 |
+
('suffixes','suffixes'),
|
| 1686 |
+
('suffixesadd','suffixesadd'),
|
| 1687 |
+
('sw','sw'),
|
| 1688 |
+
('swapfile','swapfile'),
|
| 1689 |
+
('swapsync','swapsync'),
|
| 1690 |
+
('swb','swb'),
|
| 1691 |
+
('swf','swf'),
|
| 1692 |
+
('switchbuf','switchbuf'),
|
| 1693 |
+
('sws','sws'),
|
| 1694 |
+
('sxe','sxe'),
|
| 1695 |
+
('sxq','sxq'),
|
| 1696 |
+
('syn','syn'),
|
| 1697 |
+
('synmaxcol','synmaxcol'),
|
| 1698 |
+
('syntax','syntax'),
|
| 1699 |
+
('t_AB','t_AB'),
|
| 1700 |
+
('t_AF','t_AF'),
|
| 1701 |
+
('t_AL','t_AL'),
|
| 1702 |
+
('t_CS','t_CS'),
|
| 1703 |
+
('t_CV','t_CV'),
|
| 1704 |
+
('t_Ce','t_Ce'),
|
| 1705 |
+
('t_Co','t_Co'),
|
| 1706 |
+
('t_Cs','t_Cs'),
|
| 1707 |
+
('t_DL','t_DL'),
|
| 1708 |
+
('t_EI','t_EI'),
|
| 1709 |
+
('t_F1','t_F1'),
|
| 1710 |
+
('t_F2','t_F2'),
|
| 1711 |
+
('t_F3','t_F3'),
|
| 1712 |
+
('t_F4','t_F4'),
|
| 1713 |
+
('t_F5','t_F5'),
|
| 1714 |
+
('t_F6','t_F6'),
|
| 1715 |
+
('t_F7','t_F7'),
|
| 1716 |
+
('t_F8','t_F8'),
|
| 1717 |
+
('t_F9','t_F9'),
|
| 1718 |
+
('t_IE','t_IE'),
|
| 1719 |
+
('t_IS','t_IS'),
|
| 1720 |
+
('t_K1','t_K1'),
|
| 1721 |
+
('t_K3','t_K3'),
|
| 1722 |
+
('t_K4','t_K4'),
|
| 1723 |
+
('t_K5','t_K5'),
|
| 1724 |
+
('t_K6','t_K6'),
|
| 1725 |
+
('t_K7','t_K7'),
|
| 1726 |
+
('t_K8','t_K8'),
|
| 1727 |
+
('t_K9','t_K9'),
|
| 1728 |
+
('t_KA','t_KA'),
|
| 1729 |
+
('t_KB','t_KB'),
|
| 1730 |
+
('t_KC','t_KC'),
|
| 1731 |
+
('t_KD','t_KD'),
|
| 1732 |
+
('t_KE','t_KE'),
|
| 1733 |
+
('t_KF','t_KF'),
|
| 1734 |
+
('t_KG','t_KG'),
|
| 1735 |
+
('t_KH','t_KH'),
|
| 1736 |
+
('t_KI','t_KI'),
|
| 1737 |
+
('t_KJ','t_KJ'),
|
| 1738 |
+
('t_KK','t_KK'),
|
| 1739 |
+
('t_KL','t_KL'),
|
| 1740 |
+
('t_RI','t_RI'),
|
| 1741 |
+
('t_RV','t_RV'),
|
| 1742 |
+
('t_SI','t_SI'),
|
| 1743 |
+
('t_Sb','t_Sb'),
|
| 1744 |
+
('t_Sf','t_Sf'),
|
| 1745 |
+
('t_WP','t_WP'),
|
| 1746 |
+
('t_WS','t_WS'),
|
| 1747 |
+
('t_ZH','t_ZH'),
|
| 1748 |
+
('t_ZR','t_ZR'),
|
| 1749 |
+
('t_al','t_al'),
|
| 1750 |
+
('t_bc','t_bc'),
|
| 1751 |
+
('t_cd','t_cd'),
|
| 1752 |
+
('t_ce','t_ce'),
|
| 1753 |
+
('t_cl','t_cl'),
|
| 1754 |
+
('t_cm','t_cm'),
|
| 1755 |
+
('t_cs','t_cs'),
|
| 1756 |
+
('t_da','t_da'),
|
| 1757 |
+
('t_db','t_db'),
|
| 1758 |
+
('t_dl','t_dl'),
|
| 1759 |
+
('t_fs','t_fs'),
|
| 1760 |
+
('t_k1','t_k1'),
|
| 1761 |
+
('t_k2','t_k2'),
|
| 1762 |
+
('t_k3','t_k3'),
|
| 1763 |
+
('t_k4','t_k4'),
|
| 1764 |
+
('t_k5','t_k5'),
|
| 1765 |
+
('t_k6','t_k6'),
|
| 1766 |
+
('t_k7','t_k7'),
|
| 1767 |
+
('t_k8','t_k8'),
|
| 1768 |
+
('t_k9','t_k9'),
|
| 1769 |
+
('t_kB','t_kB'),
|
| 1770 |
+
('t_kD','t_kD'),
|
| 1771 |
+
('t_kI','t_kI'),
|
| 1772 |
+
('t_kN','t_kN'),
|
| 1773 |
+
('t_kP','t_kP'),
|
| 1774 |
+
('t_kb','t_kb'),
|
| 1775 |
+
('t_kd','t_kd'),
|
| 1776 |
+
('t_ke','t_ke'),
|
| 1777 |
+
('t_kh','t_kh'),
|
| 1778 |
+
('t_kl','t_kl'),
|
| 1779 |
+
('t_kr','t_kr'),
|
| 1780 |
+
('t_ks','t_ks'),
|
| 1781 |
+
('t_ku','t_ku'),
|
| 1782 |
+
('t_le','t_le'),
|
| 1783 |
+
('t_mb','t_mb'),
|
| 1784 |
+
('t_md','t_md'),
|
| 1785 |
+
('t_me','t_me'),
|
| 1786 |
+
('t_mr','t_mr'),
|
| 1787 |
+
('t_ms','t_ms'),
|
| 1788 |
+
('t_nd','t_nd'),
|
| 1789 |
+
('t_op','t_op'),
|
| 1790 |
+
('t_se','t_se'),
|
| 1791 |
+
('t_so','t_so'),
|
| 1792 |
+
('t_sr','t_sr'),
|
| 1793 |
+
('t_te','t_te'),
|
| 1794 |
+
('t_ti','t_ti'),
|
| 1795 |
+
('t_ts','t_ts'),
|
| 1796 |
+
('t_u7','t_u7'),
|
| 1797 |
+
('t_ue','t_ue'),
|
| 1798 |
+
('t_us','t_us'),
|
| 1799 |
+
('t_ut','t_ut'),
|
| 1800 |
+
('t_vb','t_vb'),
|
| 1801 |
+
('t_ve','t_ve'),
|
| 1802 |
+
('t_vi','t_vi'),
|
| 1803 |
+
('t_vs','t_vs'),
|
| 1804 |
+
('t_xs','t_xs'),
|
| 1805 |
+
('ta','ta'),
|
| 1806 |
+
('tabline','tabline'),
|
| 1807 |
+
('tabpagemax','tabpagemax'),
|
| 1808 |
+
('tabstop','tabstop'),
|
| 1809 |
+
('tag','tag'),
|
| 1810 |
+
('tagbsearch','tagbsearch'),
|
| 1811 |
+
('taglength','taglength'),
|
| 1812 |
+
('tagrelative','tagrelative'),
|
| 1813 |
+
('tags','tags'),
|
| 1814 |
+
('tagstack','tagstack'),
|
| 1815 |
+
('tal','tal'),
|
| 1816 |
+
('tb','tb'),
|
| 1817 |
+
('tbi','tbi'),
|
| 1818 |
+
('tbidi','tbidi'),
|
| 1819 |
+
('tbis','tbis'),
|
| 1820 |
+
('tbs','tbs'),
|
| 1821 |
+
('tenc','tenc'),
|
| 1822 |
+
('term','term'),
|
| 1823 |
+
('termbidi','termbidi'),
|
| 1824 |
+
('termencoding','termencoding'),
|
| 1825 |
+
('terse','terse'),
|
| 1826 |
+
('textauto','textauto'),
|
| 1827 |
+
('textmode','textmode'),
|
| 1828 |
+
('textwidth','textwidth'),
|
| 1829 |
+
('tf','tf'),
|
| 1830 |
+
('tgst','tgst'),
|
| 1831 |
+
('thesaurus','thesaurus'),
|
| 1832 |
+
('tildeop','tildeop'),
|
| 1833 |
+
('timeout','timeout'),
|
| 1834 |
+
('timeoutlen','timeoutlen'),
|
| 1835 |
+
('title','title'),
|
| 1836 |
+
('titlelen','titlelen'),
|
| 1837 |
+
('titleold','titleold'),
|
| 1838 |
+
('titlestring','titlestring'),
|
| 1839 |
+
('tl','tl'),
|
| 1840 |
+
('tm','tm'),
|
| 1841 |
+
('to','to'),
|
| 1842 |
+
('toolbar','toolbar'),
|
| 1843 |
+
('toolbariconsize','toolbariconsize'),
|
| 1844 |
+
('top','top'),
|
| 1845 |
+
('tpm','tpm'),
|
| 1846 |
+
('tr','tr'),
|
| 1847 |
+
('ts','ts'),
|
| 1848 |
+
('tsl','tsl'),
|
| 1849 |
+
('tsr','tsr'),
|
| 1850 |
+
('ttimeout','ttimeout'),
|
| 1851 |
+
('ttimeoutlen','ttimeoutlen'),
|
| 1852 |
+
('ttm','ttm'),
|
| 1853 |
+
('tty','tty'),
|
| 1854 |
+
('ttybuiltin','ttybuiltin'),
|
| 1855 |
+
('ttyfast','ttyfast'),
|
| 1856 |
+
('ttym','ttym'),
|
| 1857 |
+
('ttymouse','ttymouse'),
|
| 1858 |
+
('ttyscroll','ttyscroll'),
|
| 1859 |
+
('ttytype','ttytype'),
|
| 1860 |
+
('tw','tw'),
|
| 1861 |
+
('tx','tx'),
|
| 1862 |
+
('uc','uc'),
|
| 1863 |
+
('udf','udf'),
|
| 1864 |
+
('udir','udir'),
|
| 1865 |
+
('ul','ul'),
|
| 1866 |
+
('undodir','undodir'),
|
| 1867 |
+
('undofile','undofile'),
|
| 1868 |
+
('undolevels','undolevels'),
|
| 1869 |
+
('undoreload','undoreload'),
|
| 1870 |
+
('updatecount','updatecount'),
|
| 1871 |
+
('updatetime','updatetime'),
|
| 1872 |
+
('ur','ur'),
|
| 1873 |
+
('ut','ut'),
|
| 1874 |
+
('vb','vb'),
|
| 1875 |
+
('vbs','vbs'),
|
| 1876 |
+
('vdir','vdir'),
|
| 1877 |
+
('ve','ve'),
|
| 1878 |
+
('verbose','verbose'),
|
| 1879 |
+
('verbosefile','verbosefile'),
|
| 1880 |
+
('vfile','vfile'),
|
| 1881 |
+
('vi','vi'),
|
| 1882 |
+
('viewdir','viewdir'),
|
| 1883 |
+
('viewoptions','viewoptions'),
|
| 1884 |
+
('viminfo','viminfo'),
|
| 1885 |
+
('virtualedit','virtualedit'),
|
| 1886 |
+
('visualbell','visualbell'),
|
| 1887 |
+
('vnoremap','vnoremap'),
|
| 1888 |
+
('vop','vop'),
|
| 1889 |
+
('wa','wa'),
|
| 1890 |
+
('wak','wak'),
|
| 1891 |
+
('warn','warn'),
|
| 1892 |
+
('wb','wb'),
|
| 1893 |
+
('wc','wc'),
|
| 1894 |
+
('wcm','wcm'),
|
| 1895 |
+
('wd','wd'),
|
| 1896 |
+
('weirdinvert','weirdinvert'),
|
| 1897 |
+
('wfh','wfh'),
|
| 1898 |
+
('wfw','wfw'),
|
| 1899 |
+
('wh','wh'),
|
| 1900 |
+
('whichwrap','whichwrap'),
|
| 1901 |
+
('wi','wi'),
|
| 1902 |
+
('wic','wic'),
|
| 1903 |
+
('wig','wig'),
|
| 1904 |
+
('wildchar','wildchar'),
|
| 1905 |
+
('wildcharm','wildcharm'),
|
| 1906 |
+
('wildignore','wildignore'),
|
| 1907 |
+
('wildignorecase','wildignorecase'),
|
| 1908 |
+
('wildmenu','wildmenu'),
|
| 1909 |
+
('wildmode','wildmode'),
|
| 1910 |
+
('wildoptions','wildoptions'),
|
| 1911 |
+
('wim','wim'),
|
| 1912 |
+
('winaltkeys','winaltkeys'),
|
| 1913 |
+
('window','window'),
|
| 1914 |
+
('winfixheight','winfixheight'),
|
| 1915 |
+
('winfixwidth','winfixwidth'),
|
| 1916 |
+
('winheight','winheight'),
|
| 1917 |
+
('winminheight','winminheight'),
|
| 1918 |
+
('winminwidth','winminwidth'),
|
| 1919 |
+
('winwidth','winwidth'),
|
| 1920 |
+
('wiv','wiv'),
|
| 1921 |
+
('wiw','wiw'),
|
| 1922 |
+
('wm','wm'),
|
| 1923 |
+
('wmh','wmh'),
|
| 1924 |
+
('wmnu','wmnu'),
|
| 1925 |
+
('wmw','wmw'),
|
| 1926 |
+
('wop','wop'),
|
| 1927 |
+
('wrap','wrap'),
|
| 1928 |
+
('wrapmargin','wrapmargin'),
|
| 1929 |
+
('wrapscan','wrapscan'),
|
| 1930 |
+
('write','write'),
|
| 1931 |
+
('writeany','writeany'),
|
| 1932 |
+
('writebackup','writebackup'),
|
| 1933 |
+
('writedelay','writedelay'),
|
| 1934 |
+
('ws','ws'),
|
| 1935 |
+
('ww','ww'),
|
| 1936 |
+
)
|
| 1937 |
+
return var
|
| 1938 |
+
option = _getoption()
|
| 1939 |
+
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/algebra.py
ADDED
|
@@ -0,0 +1,221 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.algebra
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexers for computer algebra systems.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 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, bygroups, words
|
| 15 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 16 |
+
Number, Punctuation
|
| 17 |
+
|
| 18 |
+
__all__ = ['GAPLexer', 'MathematicaLexer', 'MuPADLexer', 'BCLexer']
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
class GAPLexer(RegexLexer):
|
| 22 |
+
"""
|
| 23 |
+
For `GAP <http://www.gap-system.org>`_ source code.
|
| 24 |
+
|
| 25 |
+
.. versionadded:: 2.0
|
| 26 |
+
"""
|
| 27 |
+
name = 'GAP'
|
| 28 |
+
aliases = ['gap']
|
| 29 |
+
filenames = ['*.g', '*.gd', '*.gi', '*.gap']
|
| 30 |
+
|
| 31 |
+
tokens = {
|
| 32 |
+
'root': [
|
| 33 |
+
(r'#.*$', Comment.Single),
|
| 34 |
+
(r'"(?:[^"\\]|\\.)*"', String),
|
| 35 |
+
(r'\(|\)|\[|\]|\{|\}', Punctuation),
|
| 36 |
+
(r'''(?x)\b(?:
|
| 37 |
+
if|then|elif|else|fi|
|
| 38 |
+
for|while|do|od|
|
| 39 |
+
repeat|until|
|
| 40 |
+
break|continue|
|
| 41 |
+
function|local|return|end|
|
| 42 |
+
rec|
|
| 43 |
+
quit|QUIT|
|
| 44 |
+
IsBound|Unbind|
|
| 45 |
+
TryNextMethod|
|
| 46 |
+
Info|Assert
|
| 47 |
+
)\b''', Keyword),
|
| 48 |
+
(r'''(?x)\b(?:
|
| 49 |
+
true|false|fail|infinity
|
| 50 |
+
)\b''',
|
| 51 |
+
Name.Constant),
|
| 52 |
+
(r'''(?x)\b(?:
|
| 53 |
+
(Declare|Install)([A-Z][A-Za-z]+)|
|
| 54 |
+
BindGlobal|BIND_GLOBAL
|
| 55 |
+
)\b''',
|
| 56 |
+
Name.Builtin),
|
| 57 |
+
(r'\.|,|:=|;|=|\+|-|\*|/|\^|>|<', Operator),
|
| 58 |
+
(r'''(?x)\b(?:
|
| 59 |
+
and|or|not|mod|in
|
| 60 |
+
)\b''',
|
| 61 |
+
Operator.Word),
|
| 62 |
+
(r'''(?x)
|
| 63 |
+
(?:\w+|`[^`]*`)
|
| 64 |
+
(?:::\w+|`[^`]*`)*''', Name.Variable),
|
| 65 |
+
(r'[0-9]+(?:\.[0-9]*)?(?:e[0-9]+)?', Number),
|
| 66 |
+
(r'\.[0-9]+(?:e[0-9]+)?', Number),
|
| 67 |
+
(r'.', Text)
|
| 68 |
+
],
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
class MathematicaLexer(RegexLexer):
|
| 73 |
+
"""
|
| 74 |
+
Lexer for `Mathematica <http://www.wolfram.com/mathematica/>`_ source code.
|
| 75 |
+
|
| 76 |
+
.. versionadded:: 2.0
|
| 77 |
+
"""
|
| 78 |
+
name = 'Mathematica'
|
| 79 |
+
aliases = ['mathematica', 'mma', 'nb']
|
| 80 |
+
filenames = ['*.nb', '*.cdf', '*.nbp', '*.ma']
|
| 81 |
+
mimetypes = ['application/mathematica',
|
| 82 |
+
'application/vnd.wolfram.mathematica',
|
| 83 |
+
'application/vnd.wolfram.mathematica.package',
|
| 84 |
+
'application/vnd.wolfram.cdf']
|
| 85 |
+
|
| 86 |
+
# http://reference.wolfram.com/mathematica/guide/Syntax.html
|
| 87 |
+
operators = (
|
| 88 |
+
";;", "=", "=.", "!=" "==", ":=", "->", ":>", "/.", "+", "-", "*", "/",
|
| 89 |
+
"^", "&&", "||", "!", "<>", "|", "/;", "?", "@", "//", "/@", "@@",
|
| 90 |
+
"@@@", "~~", "===", "&", "<", ">", "<=", ">=",
|
| 91 |
+
)
|
| 92 |
+
|
| 93 |
+
punctuation = (",", ";", "(", ")", "[", "]", "{", "}")
|
| 94 |
+
|
| 95 |
+
def _multi_escape(entries):
|
| 96 |
+
return '(%s)' % ('|'.join(re.escape(entry) for entry in entries))
|
| 97 |
+
|
| 98 |
+
tokens = {
|
| 99 |
+
'root': [
|
| 100 |
+
(r'(?s)\(\*.*?\*\)', Comment),
|
| 101 |
+
|
| 102 |
+
(r'([a-zA-Z]+[A-Za-z0-9]*`)', Name.Namespace),
|
| 103 |
+
(r'([A-Za-z0-9]*_+[A-Za-z0-9]*)', Name.Variable),
|
| 104 |
+
(r'#\d*', Name.Variable),
|
| 105 |
+
(r'([a-zA-Z]+[a-zA-Z0-9]*)', Name),
|
| 106 |
+
|
| 107 |
+
(r'-?\d+\.\d*', Number.Float),
|
| 108 |
+
(r'-?\d*\.\d+', Number.Float),
|
| 109 |
+
(r'-?\d+', Number.Integer),
|
| 110 |
+
|
| 111 |
+
(words(operators), Operator),
|
| 112 |
+
(words(punctuation), Punctuation),
|
| 113 |
+
(r'".*?"', String),
|
| 114 |
+
(r'\s+', Text.Whitespace),
|
| 115 |
+
],
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
|
| 119 |
+
class MuPADLexer(RegexLexer):
|
| 120 |
+
"""
|
| 121 |
+
A `MuPAD <http://www.mupad.com>`_ lexer.
|
| 122 |
+
Contributed by Christopher Creutzig <christopher@creutzig.de>.
|
| 123 |
+
|
| 124 |
+
.. versionadded:: 0.8
|
| 125 |
+
"""
|
| 126 |
+
name = 'MuPAD'
|
| 127 |
+
aliases = ['mupad']
|
| 128 |
+
filenames = ['*.mu']
|
| 129 |
+
|
| 130 |
+
tokens = {
|
| 131 |
+
'root': [
|
| 132 |
+
(r'//.*?$', Comment.Single),
|
| 133 |
+
(r'/\*', Comment.Multiline, 'comment'),
|
| 134 |
+
(r'"(?:[^"\\]|\\.)*"', String),
|
| 135 |
+
(r'\(|\)|\[|\]|\{|\}', Punctuation),
|
| 136 |
+
(r'''(?x)\b(?:
|
| 137 |
+
next|break|end|
|
| 138 |
+
axiom|end_axiom|category|end_category|domain|end_domain|inherits|
|
| 139 |
+
if|%if|then|elif|else|end_if|
|
| 140 |
+
case|of|do|otherwise|end_case|
|
| 141 |
+
while|end_while|
|
| 142 |
+
repeat|until|end_repeat|
|
| 143 |
+
for|from|to|downto|step|end_for|
|
| 144 |
+
proc|local|option|save|begin|end_proc|
|
| 145 |
+
delete|frame
|
| 146 |
+
)\b''', Keyword),
|
| 147 |
+
(r'''(?x)\b(?:
|
| 148 |
+
DOM_ARRAY|DOM_BOOL|DOM_COMPLEX|DOM_DOMAIN|DOM_EXEC|DOM_EXPR|
|
| 149 |
+
DOM_FAIL|DOM_FLOAT|DOM_FRAME|DOM_FUNC_ENV|DOM_HFARRAY|DOM_IDENT|
|
| 150 |
+
DOM_INT|DOM_INTERVAL|DOM_LIST|DOM_NIL|DOM_NULL|DOM_POLY|DOM_PROC|
|
| 151 |
+
DOM_PROC_ENV|DOM_RAT|DOM_SET|DOM_STRING|DOM_TABLE|DOM_VAR
|
| 152 |
+
)\b''', Name.Class),
|
| 153 |
+
(r'''(?x)\b(?:
|
| 154 |
+
PI|EULER|E|CATALAN|
|
| 155 |
+
NIL|FAIL|undefined|infinity|
|
| 156 |
+
TRUE|FALSE|UNKNOWN
|
| 157 |
+
)\b''',
|
| 158 |
+
Name.Constant),
|
| 159 |
+
(r'\b(?:dom|procname)\b', Name.Builtin.Pseudo),
|
| 160 |
+
(r'\.|,|:|;|=|\+|-|\*|/|\^|@|>|<|\$|\||!|\'|%|~=', Operator),
|
| 161 |
+
(r'''(?x)\b(?:
|
| 162 |
+
and|or|not|xor|
|
| 163 |
+
assuming|
|
| 164 |
+
div|mod|
|
| 165 |
+
union|minus|intersect|in|subset
|
| 166 |
+
)\b''',
|
| 167 |
+
Operator.Word),
|
| 168 |
+
(r'\b(?:I|RDN_INF|RD_NINF|RD_NAN)\b', Number),
|
| 169 |
+
# (r'\b(?:adt|linalg|newDomain|hold)\b', Name.Builtin),
|
| 170 |
+
(r'''(?x)
|
| 171 |
+
((?:[a-zA-Z_#][\w#]*|`[^`]*`)
|
| 172 |
+
(?:::[a-zA-Z_#][\w#]*|`[^`]*`)*)(\s*)([(])''',
|
| 173 |
+
bygroups(Name.Function, Text, Punctuation)),
|
| 174 |
+
(r'''(?x)
|
| 175 |
+
(?:[a-zA-Z_#][\w#]*|`[^`]*`)
|
| 176 |
+
(?:::[a-zA-Z_#][\w#]*|`[^`]*`)*''', Name.Variable),
|
| 177 |
+
(r'[0-9]+(?:\.[0-9]*)?(?:e[0-9]+)?', Number),
|
| 178 |
+
(r'\.[0-9]+(?:e[0-9]+)?', Number),
|
| 179 |
+
(r'.', Text)
|
| 180 |
+
],
|
| 181 |
+
'comment': [
|
| 182 |
+
(r'[^*/]', Comment.Multiline),
|
| 183 |
+
(r'/\*', Comment.Multiline, '#push'),
|
| 184 |
+
(r'\*/', Comment.Multiline, '#pop'),
|
| 185 |
+
(r'[*/]', Comment.Multiline)
|
| 186 |
+
],
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
|
| 190 |
+
class BCLexer(RegexLexer):
|
| 191 |
+
"""
|
| 192 |
+
A `BC <https://www.gnu.org/software/bc/>`_ lexer.
|
| 193 |
+
|
| 194 |
+
.. versionadded:: 2.1
|
| 195 |
+
"""
|
| 196 |
+
name = 'BC'
|
| 197 |
+
aliases = ['bc']
|
| 198 |
+
filenames = ['*.bc']
|
| 199 |
+
|
| 200 |
+
tokens = {
|
| 201 |
+
'root': [
|
| 202 |
+
(r'/\*', Comment.Multiline, 'comment'),
|
| 203 |
+
(r'"(?:[^"\\]|\\.)*"', String),
|
| 204 |
+
(r'[{}();,]', Punctuation),
|
| 205 |
+
(words(('if', 'else', 'while', 'for', 'break', 'continue',
|
| 206 |
+
'halt', 'return', 'define', 'auto', 'print', 'read',
|
| 207 |
+
'length', 'scale', 'sqrt', 'limits', 'quit',
|
| 208 |
+
'warranty'), suffix=r'\b'), Keyword),
|
| 209 |
+
(r'\+\+|--|\|\||&&|'
|
| 210 |
+
r'([-<>+*%\^/!=])=?', Operator),
|
| 211 |
+
# bc doesn't support exponential
|
| 212 |
+
(r'[0-9]+(\.[0-9]*)?', Number),
|
| 213 |
+
(r'\.[0-9]+', Number),
|
| 214 |
+
(r'.', Text)
|
| 215 |
+
],
|
| 216 |
+
'comment': [
|
| 217 |
+
(r'[^*/]+', Comment.Multiline),
|
| 218 |
+
(r'\*/', Comment.Multiline, '#pop'),
|
| 219 |
+
(r'[*/]', Comment.Multiline)
|
| 220 |
+
],
|
| 221 |
+
}
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/ambient.py
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.ambient
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexers for AmbientTalk language.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 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, words
|
| 15 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 16 |
+
Number, Punctuation
|
| 17 |
+
|
| 18 |
+
__all__ = ['AmbientTalkLexer']
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
class AmbientTalkLexer(RegexLexer):
|
| 22 |
+
"""
|
| 23 |
+
Lexer for `AmbientTalk <https://code.google.com/p/ambienttalk>`_ source code.
|
| 24 |
+
|
| 25 |
+
.. versionadded:: 2.0
|
| 26 |
+
"""
|
| 27 |
+
name = 'AmbientTalk'
|
| 28 |
+
filenames = ['*.at']
|
| 29 |
+
aliases = ['at', 'ambienttalk', 'ambienttalk/2']
|
| 30 |
+
mimetypes = ['text/x-ambienttalk']
|
| 31 |
+
|
| 32 |
+
flags = re.MULTILINE | re.DOTALL
|
| 33 |
+
|
| 34 |
+
builtin = words(('if:', 'then:', 'else:', 'when:', 'whenever:', 'discovered:',
|
| 35 |
+
'disconnected:', 'reconnected:', 'takenOffline:', 'becomes:',
|
| 36 |
+
'export:', 'as:', 'object:', 'actor:', 'mirror:', 'taggedAs:',
|
| 37 |
+
'mirroredBy:', 'is:'))
|
| 38 |
+
tokens = {
|
| 39 |
+
'root': [
|
| 40 |
+
(r'\s+', Text),
|
| 41 |
+
(r'//.*?\n', Comment.Single),
|
| 42 |
+
(r'/\*.*?\*/', Comment.Multiline),
|
| 43 |
+
(r'(def|deftype|import|alias|exclude)\b', Keyword),
|
| 44 |
+
(builtin, Name.Builtin),
|
| 45 |
+
(r'(true|false|nil)\b', Keyword.Constant),
|
| 46 |
+
(r'(~|lobby|jlobby|/)\.', Keyword.Constant, 'namespace'),
|
| 47 |
+
(r'"(\\\\|\\"|[^"])*"', String),
|
| 48 |
+
(r'\|', Punctuation, 'arglist'),
|
| 49 |
+
(r'<:|[*^!%&<>+=,./?-]|:=', Operator),
|
| 50 |
+
(r"`[a-zA-Z_]\w*", String.Symbol),
|
| 51 |
+
(r"[a-zA-Z_]\w*:", Name.Function),
|
| 52 |
+
(r"[{}()\[\];`]", Punctuation),
|
| 53 |
+
(r'(self|super)\b', Name.Variable.Instance),
|
| 54 |
+
(r"[a-zA-Z_]\w*", Name.Variable),
|
| 55 |
+
(r"@[a-zA-Z_]\w*", Name.Class),
|
| 56 |
+
(r"@\[", Name.Class, 'annotations'),
|
| 57 |
+
include('numbers'),
|
| 58 |
+
],
|
| 59 |
+
'numbers': [
|
| 60 |
+
(r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float),
|
| 61 |
+
(r'\d+', Number.Integer)
|
| 62 |
+
],
|
| 63 |
+
'namespace': [
|
| 64 |
+
(r'[a-zA-Z_]\w*\.', Name.Namespace),
|
| 65 |
+
(r'[a-zA-Z_]\w*:', Name.Function, '#pop'),
|
| 66 |
+
(r'[a-zA-Z_]\w*(?!\.)', Name.Function, '#pop')
|
| 67 |
+
],
|
| 68 |
+
'annotations': [
|
| 69 |
+
(r"(.*?)\]", Name.Class, '#pop')
|
| 70 |
+
],
|
| 71 |
+
'arglist': [
|
| 72 |
+
(r'\|', Punctuation, '#pop'),
|
| 73 |
+
(r'\s*(,)\s*', Punctuation),
|
| 74 |
+
(r'[a-zA-Z_]\w*', Name.Variable),
|
| 75 |
+
],
|
| 76 |
+
}
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/ampl.py
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.ampl
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexers for the ampl language. <http://ampl.com/>
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
from pygments.lexer import RegexLexer, bygroups, using, this, words
|
| 13 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 14 |
+
Number, Punctuation
|
| 15 |
+
|
| 16 |
+
__all__ = ['AmplLexer']
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
class AmplLexer(RegexLexer):
|
| 20 |
+
"""
|
| 21 |
+
For AMPL source code.
|
| 22 |
+
|
| 23 |
+
.. versionadded:: 2.2
|
| 24 |
+
"""
|
| 25 |
+
name = 'Ampl'
|
| 26 |
+
aliases = ['ampl']
|
| 27 |
+
filenames = ['*.run']
|
| 28 |
+
|
| 29 |
+
tokens = {
|
| 30 |
+
'root': [
|
| 31 |
+
(r'\n', Text),
|
| 32 |
+
(r'\s+', Text.Whitespace),
|
| 33 |
+
(r'#.*?\n', Comment.Single),
|
| 34 |
+
(r'/[*](.|\n)*?[*]/', Comment.Multiline),
|
| 35 |
+
(words((
|
| 36 |
+
'call', 'cd', 'close', 'commands', 'data', 'delete', 'display',
|
| 37 |
+
'drop', 'end', 'environ', 'exit', 'expand', 'include', 'load',
|
| 38 |
+
'model', 'objective', 'option', 'problem', 'purge', 'quit',
|
| 39 |
+
'redeclare', 'reload', 'remove', 'reset', 'restore', 'shell',
|
| 40 |
+
'show', 'solexpand', 'solution', 'solve', 'update', 'unload',
|
| 41 |
+
'xref', 'coeff', 'coef', 'cover', 'obj', 'interval', 'default',
|
| 42 |
+
'from', 'to', 'to_come', 'net_in', 'net_out', 'dimen',
|
| 43 |
+
'dimension', 'check', 'complements', 'write', 'function',
|
| 44 |
+
'pipe', 'format', 'if', 'then', 'else', 'in', 'while', 'repeat',
|
| 45 |
+
'for'), suffix=r'\b'), Keyword.Reserved),
|
| 46 |
+
(r'(integer|binary|symbolic|ordered|circular|reversed|INOUT|IN|OUT|LOCAL)',
|
| 47 |
+
Keyword.Type),
|
| 48 |
+
(r'\".*?\"', String.Double),
|
| 49 |
+
(r'\'.*?\'', String.Single),
|
| 50 |
+
(r'[()\[\]{},;:]+', Punctuation),
|
| 51 |
+
(r'\b(\w+)(\.)(astatus|init0|init|lb0|lb1|lb2|lb|lrc|'
|
| 52 |
+
r'lslack|rc|relax|slack|sstatus|status|ub0|ub1|ub2|'
|
| 53 |
+
r'ub|urc|uslack|val)',
|
| 54 |
+
bygroups(Name.Variable, Punctuation, Keyword.Reserved)),
|
| 55 |
+
(r'(set|param|var|arc|minimize|maximize|subject to|s\.t\.|subj to|'
|
| 56 |
+
r'node|table|suffix|read table|write table)(\s+)(\w+)',
|
| 57 |
+
bygroups(Keyword.Declaration, Text, Name.Variable)),
|
| 58 |
+
(r'(param)(\s*)(:)(\s*)(\w+)(\s*)(:)(\s*)((\w|\s)+)',
|
| 59 |
+
bygroups(Keyword.Declaration, Text, Punctuation, Text,
|
| 60 |
+
Name.Variable, Text, Punctuation, Text, Name.Variable)),
|
| 61 |
+
(r'(let|fix|unfix)(\s*)((?:\{.*\})?)(\s*)(\w+)',
|
| 62 |
+
bygroups(Keyword.Declaration, Text, using(this), Text, Name.Variable)),
|
| 63 |
+
(words((
|
| 64 |
+
'abs', 'acos', 'acosh', 'alias', 'asin', 'asinh', 'atan', 'atan2',
|
| 65 |
+
'atanh', 'ceil', 'ctime', 'cos', 'exp', 'floor', 'log', 'log10',
|
| 66 |
+
'max', 'min', 'precision', 'round', 'sin', 'sinh', 'sqrt', 'tan',
|
| 67 |
+
'tanh', 'time', 'trunc', 'Beta', 'Cauchy', 'Exponential', 'Gamma',
|
| 68 |
+
'Irand224', 'Normal', 'Normal01', 'Poisson', 'Uniform', 'Uniform01',
|
| 69 |
+
'num', 'num0', 'ichar', 'char', 'length', 'substr', 'sprintf',
|
| 70 |
+
'match', 'sub', 'gsub', 'print', 'printf', 'next', 'nextw', 'prev',
|
| 71 |
+
'prevw', 'first', 'last', 'ord', 'ord0', 'card', 'arity',
|
| 72 |
+
'indexarity'), prefix=r'\b', suffix=r'\b'), Name.Builtin),
|
| 73 |
+
(r'(\+|\-|\*|/|\*\*|=|<=|>=|==|\||\^|<|>|\!|\.\.|:=|\&|\!=|<<|>>)',
|
| 74 |
+
Operator),
|
| 75 |
+
(words((
|
| 76 |
+
'or', 'exists', 'forall', 'and', 'in', 'not', 'within', 'union',
|
| 77 |
+
'diff', 'difference', 'symdiff', 'inter', 'intersect',
|
| 78 |
+
'intersection', 'cross', 'setof', 'by', 'less', 'sum', 'prod',
|
| 79 |
+
'product', 'div', 'mod'), suffix=r'\b'),
|
| 80 |
+
Keyword.Reserved), # Operator.Name but not enough emphasized with that
|
| 81 |
+
(r'(\d+\.(?!\.)\d*|\.(?!.)\d+)([eE][+-]?\d+)?', Number.Float),
|
| 82 |
+
(r'\d+([eE][+-]?\d+)?', Number.Integer),
|
| 83 |
+
(r'[+-]?Infinity', Number.Integer),
|
| 84 |
+
(r'(\w+|(\.(?!\.)))', Text)
|
| 85 |
+
]
|
| 86 |
+
|
| 87 |
+
}
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/apl.py
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.apl
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexers for APL.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
from pygments.lexer import RegexLexer
|
| 13 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 14 |
+
Number, Punctuation
|
| 15 |
+
|
| 16 |
+
__all__ = ['APLLexer']
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
class APLLexer(RegexLexer):
|
| 20 |
+
"""
|
| 21 |
+
A simple APL lexer.
|
| 22 |
+
|
| 23 |
+
.. versionadded:: 2.0
|
| 24 |
+
"""
|
| 25 |
+
name = 'APL'
|
| 26 |
+
aliases = ['apl']
|
| 27 |
+
filenames = ['*.apl']
|
| 28 |
+
|
| 29 |
+
tokens = {
|
| 30 |
+
'root': [
|
| 31 |
+
# Whitespace
|
| 32 |
+
# ==========
|
| 33 |
+
(r'\s+', Text),
|
| 34 |
+
#
|
| 35 |
+
# Comment
|
| 36 |
+
# =======
|
| 37 |
+
# '⍝' is traditional; '#' is supported by GNU APL and NGN (but not Dyalog)
|
| 38 |
+
(u'[⍝#].*$', Comment.Single),
|
| 39 |
+
#
|
| 40 |
+
# Strings
|
| 41 |
+
# =======
|
| 42 |
+
(r'\'((\'\')|[^\'])*\'', String.Single),
|
| 43 |
+
(r'"(("")|[^"])*"', String.Double), # supported by NGN APL
|
| 44 |
+
#
|
| 45 |
+
# Punctuation
|
| 46 |
+
# ===========
|
| 47 |
+
# This token type is used for diamond and parenthesis
|
| 48 |
+
# but not for bracket and ; (see below)
|
| 49 |
+
(u'[⋄◇()]', Punctuation),
|
| 50 |
+
#
|
| 51 |
+
# Array indexing
|
| 52 |
+
# ==============
|
| 53 |
+
# Since this token type is very important in APL, it is not included in
|
| 54 |
+
# the punctuation token type but rather in the following one
|
| 55 |
+
(r'[\[\];]', String.Regex),
|
| 56 |
+
#
|
| 57 |
+
# Distinguished names
|
| 58 |
+
# ===================
|
| 59 |
+
# following IBM APL2 standard
|
| 60 |
+
(u'⎕[A-Za-zΔ∆⍙][A-Za-zΔ∆⍙_¯0-9]*', Name.Function),
|
| 61 |
+
#
|
| 62 |
+
# Labels
|
| 63 |
+
# ======
|
| 64 |
+
# following IBM APL2 standard
|
| 65 |
+
# (u'[A-Za-zΔ∆⍙][A-Za-zΔ∆⍙_¯0-9]*:', Name.Label),
|
| 66 |
+
#
|
| 67 |
+
# Variables
|
| 68 |
+
# =========
|
| 69 |
+
# following IBM APL2 standard
|
| 70 |
+
(u'[A-Za-zΔ∆⍙][A-Za-zΔ∆⍙_¯0-9]*', Name.Variable),
|
| 71 |
+
#
|
| 72 |
+
# Numbers
|
| 73 |
+
# =======
|
| 74 |
+
(u'¯?(0[Xx][0-9A-Fa-f]+|[0-9]*\.?[0-9]+([Ee][+¯]?[0-9]+)?|¯|∞)'
|
| 75 |
+
u'([Jj]¯?(0[Xx][0-9A-Fa-f]+|[0-9]*\.?[0-9]+([Ee][+¯]?[0-9]+)?|¯|∞))?',
|
| 76 |
+
Number),
|
| 77 |
+
#
|
| 78 |
+
# Operators
|
| 79 |
+
# ==========
|
| 80 |
+
(u'[\.\\\/⌿⍀¨⍣⍨⍠⍤∘]', Name.Attribute), # closest token type
|
| 81 |
+
(u'[+\-×÷⌈⌊∣|⍳?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⌸⍯↗]',
|
| 82 |
+
Operator),
|
| 83 |
+
#
|
| 84 |
+
# Constant
|
| 85 |
+
# ========
|
| 86 |
+
(u'⍬', Name.Constant),
|
| 87 |
+
#
|
| 88 |
+
# Quad symbol
|
| 89 |
+
# ===========
|
| 90 |
+
(u'[⎕⍞]', Name.Variable.Global),
|
| 91 |
+
#
|
| 92 |
+
# Arrows left/right
|
| 93 |
+
# =================
|
| 94 |
+
(u'[←→]', Keyword.Declaration),
|
| 95 |
+
#
|
| 96 |
+
# D-Fn
|
| 97 |
+
# ====
|
| 98 |
+
(u'[⍺⍵⍶⍹∇:]', Name.Builtin.Pseudo),
|
| 99 |
+
(r'[{}]', Keyword.Type),
|
| 100 |
+
],
|
| 101 |
+
}
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/bibtex.py
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.bibtex
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexers for BibTeX bibliography data and styles
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 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, ExtendedRegexLexer, include, default, \
|
| 15 |
+
words
|
| 16 |
+
from pygments.token import Name, Comment, String, Error, Number, Text, \
|
| 17 |
+
Keyword, Punctuation
|
| 18 |
+
|
| 19 |
+
__all__ = ['BibTeXLexer', 'BSTLexer']
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
class BibTeXLexer(ExtendedRegexLexer):
|
| 23 |
+
"""
|
| 24 |
+
A lexer for BibTeX bibliography data format.
|
| 25 |
+
|
| 26 |
+
.. versionadded:: 2.2
|
| 27 |
+
"""
|
| 28 |
+
|
| 29 |
+
name = 'BibTeX'
|
| 30 |
+
aliases = ['bib', 'bibtex']
|
| 31 |
+
filenames = ['*.bib']
|
| 32 |
+
mimetypes = ["text/x-bibtex"]
|
| 33 |
+
flags = re.IGNORECASE
|
| 34 |
+
|
| 35 |
+
ALLOWED_CHARS = r'@!$&*+\-./:;<>?\[\\\]^`|~'
|
| 36 |
+
IDENTIFIER = '[{0}][{1}]*'.format('a-z_' + ALLOWED_CHARS, r'\w' + ALLOWED_CHARS)
|
| 37 |
+
|
| 38 |
+
def open_brace_callback(self, match, ctx):
|
| 39 |
+
opening_brace = match.group()
|
| 40 |
+
ctx.opening_brace = opening_brace
|
| 41 |
+
yield match.start(), Punctuation, opening_brace
|
| 42 |
+
ctx.pos = match.end()
|
| 43 |
+
|
| 44 |
+
def close_brace_callback(self, match, ctx):
|
| 45 |
+
closing_brace = match.group()
|
| 46 |
+
if (
|
| 47 |
+
ctx.opening_brace == '{' and closing_brace != '}' or
|
| 48 |
+
ctx.opening_brace == '(' and closing_brace != ')'
|
| 49 |
+
):
|
| 50 |
+
yield match.start(), Error, closing_brace
|
| 51 |
+
else:
|
| 52 |
+
yield match.start(), Punctuation, closing_brace
|
| 53 |
+
del ctx.opening_brace
|
| 54 |
+
ctx.pos = match.end()
|
| 55 |
+
|
| 56 |
+
tokens = {
|
| 57 |
+
'root': [
|
| 58 |
+
include('whitespace'),
|
| 59 |
+
('@comment', Comment),
|
| 60 |
+
('@preamble', Name.Class, ('closing-brace', 'value', 'opening-brace')),
|
| 61 |
+
('@string', Name.Class, ('closing-brace', 'field', 'opening-brace')),
|
| 62 |
+
('@' + IDENTIFIER, Name.Class,
|
| 63 |
+
('closing-brace', 'command-body', 'opening-brace')),
|
| 64 |
+
('.+', Comment),
|
| 65 |
+
],
|
| 66 |
+
'opening-brace': [
|
| 67 |
+
include('whitespace'),
|
| 68 |
+
(r'[{(]', open_brace_callback, '#pop'),
|
| 69 |
+
],
|
| 70 |
+
'closing-brace': [
|
| 71 |
+
include('whitespace'),
|
| 72 |
+
(r'[})]', close_brace_callback, '#pop'),
|
| 73 |
+
],
|
| 74 |
+
'command-body': [
|
| 75 |
+
include('whitespace'),
|
| 76 |
+
(r'[^\s\,\}]+', Name.Label, ('#pop', 'fields')),
|
| 77 |
+
],
|
| 78 |
+
'fields': [
|
| 79 |
+
include('whitespace'),
|
| 80 |
+
(',', Punctuation, 'field'),
|
| 81 |
+
default('#pop'),
|
| 82 |
+
],
|
| 83 |
+
'field': [
|
| 84 |
+
include('whitespace'),
|
| 85 |
+
(IDENTIFIER, Name.Attribute, ('value', '=')),
|
| 86 |
+
default('#pop'),
|
| 87 |
+
],
|
| 88 |
+
'=': [
|
| 89 |
+
include('whitespace'),
|
| 90 |
+
('=', Punctuation, '#pop'),
|
| 91 |
+
],
|
| 92 |
+
'value': [
|
| 93 |
+
include('whitespace'),
|
| 94 |
+
(IDENTIFIER, Name.Variable),
|
| 95 |
+
('"', String, 'quoted-string'),
|
| 96 |
+
(r'\{', String, 'braced-string'),
|
| 97 |
+
(r'[\d]+', Number),
|
| 98 |
+
('#', Punctuation),
|
| 99 |
+
default('#pop'),
|
| 100 |
+
],
|
| 101 |
+
'quoted-string': [
|
| 102 |
+
(r'\{', String, 'braced-string'),
|
| 103 |
+
('"', String, '#pop'),
|
| 104 |
+
('[^\{\"]+', String),
|
| 105 |
+
],
|
| 106 |
+
'braced-string': [
|
| 107 |
+
(r'\{', String, '#push'),
|
| 108 |
+
(r'\}', String, '#pop'),
|
| 109 |
+
('[^\{\}]+', String),
|
| 110 |
+
],
|
| 111 |
+
'whitespace': [
|
| 112 |
+
(r'\s+', Text),
|
| 113 |
+
],
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
|
| 117 |
+
class BSTLexer(RegexLexer):
|
| 118 |
+
"""
|
| 119 |
+
A lexer for BibTeX bibliography styles.
|
| 120 |
+
|
| 121 |
+
.. versionadded:: 2.2
|
| 122 |
+
"""
|
| 123 |
+
|
| 124 |
+
name = 'BST'
|
| 125 |
+
aliases = ['bst', 'bst-pybtex']
|
| 126 |
+
filenames = ['*.bst']
|
| 127 |
+
flags = re.IGNORECASE | re.MULTILINE
|
| 128 |
+
|
| 129 |
+
tokens = {
|
| 130 |
+
'root': [
|
| 131 |
+
include('whitespace'),
|
| 132 |
+
(words(['read', 'sort']), Keyword),
|
| 133 |
+
(words(['execute', 'integers', 'iterate', 'reverse', 'strings']),
|
| 134 |
+
Keyword, ('group')),
|
| 135 |
+
(words(['function', 'macro']), Keyword, ('group', 'group')),
|
| 136 |
+
(words(['entry']), Keyword, ('group', 'group', 'group')),
|
| 137 |
+
],
|
| 138 |
+
'group': [
|
| 139 |
+
include('whitespace'),
|
| 140 |
+
(r'\{', Punctuation, ('#pop', 'group-end', 'body')),
|
| 141 |
+
],
|
| 142 |
+
'group-end': [
|
| 143 |
+
include('whitespace'),
|
| 144 |
+
(r'\}', Punctuation, '#pop'),
|
| 145 |
+
],
|
| 146 |
+
'body': [
|
| 147 |
+
include('whitespace'),
|
| 148 |
+
(r"\'[^#\"\{\}\s]+", Name.Function),
|
| 149 |
+
(r'[^#\"\{\}\s]+\$', Name.Builtin),
|
| 150 |
+
(r'[^#\"\{\}\s]+', Name.Variable),
|
| 151 |
+
(r'"[^\"]*"', String),
|
| 152 |
+
(r'#-?\d+', Number),
|
| 153 |
+
(r'\{', Punctuation, ('group-end', 'body')),
|
| 154 |
+
default('#pop'),
|
| 155 |
+
],
|
| 156 |
+
'whitespace': [
|
| 157 |
+
('\s+', Text),
|
| 158 |
+
('%.*?$', Comment.SingleLine),
|
| 159 |
+
],
|
| 160 |
+
}
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/c_like.py
ADDED
|
@@ -0,0 +1,541 @@
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.c_like
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexers for other C-like languages.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 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, inherit, words, \
|
| 15 |
+
default
|
| 16 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 17 |
+
Number, Punctuation
|
| 18 |
+
|
| 19 |
+
from pygments.lexers.c_cpp import CLexer, CppLexer
|
| 20 |
+
from pygments.lexers import _mql_builtins
|
| 21 |
+
|
| 22 |
+
__all__ = ['PikeLexer', 'NesCLexer', 'ClayLexer', 'ECLexer', 'ValaLexer',
|
| 23 |
+
'CudaLexer', 'SwigLexer', 'MqlLexer', 'ArduinoLexer']
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
class PikeLexer(CppLexer):
|
| 27 |
+
"""
|
| 28 |
+
For `Pike <http://pike.lysator.liu.se/>`_ source code.
|
| 29 |
+
|
| 30 |
+
.. versionadded:: 2.0
|
| 31 |
+
"""
|
| 32 |
+
name = 'Pike'
|
| 33 |
+
aliases = ['pike']
|
| 34 |
+
filenames = ['*.pike', '*.pmod']
|
| 35 |
+
mimetypes = ['text/x-pike']
|
| 36 |
+
|
| 37 |
+
tokens = {
|
| 38 |
+
'statements': [
|
| 39 |
+
(words((
|
| 40 |
+
'catch', 'new', 'private', 'protected', 'public', 'gauge',
|
| 41 |
+
'throw', 'throws', 'class', 'interface', 'implement', 'abstract', 'extends', 'from',
|
| 42 |
+
'this', 'super', 'constant', 'final', 'static', 'import', 'use', 'extern',
|
| 43 |
+
'inline', 'proto', 'break', 'continue', 'if', 'else', 'for',
|
| 44 |
+
'while', 'do', 'switch', 'case', 'as', 'in', 'version', 'return', 'true', 'false', 'null',
|
| 45 |
+
'__VERSION__', '__MAJOR__', '__MINOR__', '__BUILD__', '__REAL_VERSION__',
|
| 46 |
+
'__REAL_MAJOR__', '__REAL_MINOR__', '__REAL_BUILD__', '__DATE__', '__TIME__',
|
| 47 |
+
'__FILE__', '__DIR__', '__LINE__', '__AUTO_BIGNUM__', '__NT__', '__PIKE__',
|
| 48 |
+
'__amigaos__', '_Pragma', 'static_assert', 'defined', 'sscanf'), suffix=r'\b'),
|
| 49 |
+
Keyword),
|
| 50 |
+
(r'(bool|int|long|float|short|double|char|string|object|void|mapping|'
|
| 51 |
+
r'array|multiset|program|function|lambda|mixed|'
|
| 52 |
+
r'[a-z_][a-z0-9_]*_t)\b',
|
| 53 |
+
Keyword.Type),
|
| 54 |
+
(r'(class)(\s+)', bygroups(Keyword, Text), 'classname'),
|
| 55 |
+
(r'[~!%^&*+=|?:<>/@-]', Operator),
|
| 56 |
+
inherit,
|
| 57 |
+
],
|
| 58 |
+
'classname': [
|
| 59 |
+
(r'[a-zA-Z_]\w*', Name.Class, '#pop'),
|
| 60 |
+
# template specification
|
| 61 |
+
(r'\s*(?=>)', Text, '#pop'),
|
| 62 |
+
],
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
class NesCLexer(CLexer):
|
| 67 |
+
"""
|
| 68 |
+
For `nesC <https://github.com/tinyos/nesc>`_ source code with preprocessor
|
| 69 |
+
directives.
|
| 70 |
+
|
| 71 |
+
.. versionadded:: 2.0
|
| 72 |
+
"""
|
| 73 |
+
name = 'nesC'
|
| 74 |
+
aliases = ['nesc']
|
| 75 |
+
filenames = ['*.nc']
|
| 76 |
+
mimetypes = ['text/x-nescsrc']
|
| 77 |
+
|
| 78 |
+
tokens = {
|
| 79 |
+
'statements': [
|
| 80 |
+
(words((
|
| 81 |
+
'abstract', 'as', 'async', 'atomic', 'call', 'command', 'component',
|
| 82 |
+
'components', 'configuration', 'event', 'extends', 'generic',
|
| 83 |
+
'implementation', 'includes', 'interface', 'module', 'new', 'norace',
|
| 84 |
+
'post', 'provides', 'signal', 'task', 'uses'), suffix=r'\b'),
|
| 85 |
+
Keyword),
|
| 86 |
+
(words(('nx_struct', 'nx_union', 'nx_int8_t', 'nx_int16_t', 'nx_int32_t',
|
| 87 |
+
'nx_int64_t', 'nx_uint8_t', 'nx_uint16_t', 'nx_uint32_t',
|
| 88 |
+
'nx_uint64_t'), suffix=r'\b'),
|
| 89 |
+
Keyword.Type),
|
| 90 |
+
inherit,
|
| 91 |
+
],
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
class ClayLexer(RegexLexer):
|
| 96 |
+
"""
|
| 97 |
+
For `Clay <http://claylabs.com/clay/>`_ source.
|
| 98 |
+
|
| 99 |
+
.. versionadded:: 2.0
|
| 100 |
+
"""
|
| 101 |
+
name = 'Clay'
|
| 102 |
+
filenames = ['*.clay']
|
| 103 |
+
aliases = ['clay']
|
| 104 |
+
mimetypes = ['text/x-clay']
|
| 105 |
+
tokens = {
|
| 106 |
+
'root': [
|
| 107 |
+
(r'\s', Text),
|
| 108 |
+
(r'//.*?$', Comment.Singleline),
|
| 109 |
+
(r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline),
|
| 110 |
+
(r'\b(public|private|import|as|record|variant|instance'
|
| 111 |
+
r'|define|overload|default|external|alias'
|
| 112 |
+
r'|rvalue|ref|forward|inline|noinline|forceinline'
|
| 113 |
+
r'|enum|var|and|or|not|if|else|goto|return|while'
|
| 114 |
+
r'|switch|case|break|continue|for|in|true|false|try|catch|throw'
|
| 115 |
+
r'|finally|onerror|staticassert|eval|when|newtype'
|
| 116 |
+
r'|__FILE__|__LINE__|__COLUMN__|__ARG__'
|
| 117 |
+
r')\b', Keyword),
|
| 118 |
+
(r'[~!%^&*+=|:<>/-]', Operator),
|
| 119 |
+
(r'[#(){}\[\],;.]', Punctuation),
|
| 120 |
+
(r'0x[0-9a-fA-F]+[LlUu]*', Number.Hex),
|
| 121 |
+
(r'\d+[LlUu]*', Number.Integer),
|
| 122 |
+
(r'\b(true|false)\b', Name.Builtin),
|
| 123 |
+
(r'(?i)[a-z_?][\w?]*', Name),
|
| 124 |
+
(r'"""', String, 'tdqs'),
|
| 125 |
+
(r'"', String, 'dqs'),
|
| 126 |
+
],
|
| 127 |
+
'strings': [
|
| 128 |
+
(r'(?i)\\(x[0-9a-f]{2}|.)', String.Escape),
|
| 129 |
+
(r'.', String),
|
| 130 |
+
],
|
| 131 |
+
'nl': [
|
| 132 |
+
(r'\n', String),
|
| 133 |
+
],
|
| 134 |
+
'dqs': [
|
| 135 |
+
(r'"', String, '#pop'),
|
| 136 |
+
include('strings'),
|
| 137 |
+
],
|
| 138 |
+
'tdqs': [
|
| 139 |
+
(r'"""', String, '#pop'),
|
| 140 |
+
include('strings'),
|
| 141 |
+
include('nl'),
|
| 142 |
+
],
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
|
| 146 |
+
class ECLexer(CLexer):
|
| 147 |
+
"""
|
| 148 |
+
For eC source code with preprocessor directives.
|
| 149 |
+
|
| 150 |
+
.. versionadded:: 1.5
|
| 151 |
+
"""
|
| 152 |
+
name = 'eC'
|
| 153 |
+
aliases = ['ec']
|
| 154 |
+
filenames = ['*.ec', '*.eh']
|
| 155 |
+
mimetypes = ['text/x-echdr', 'text/x-ecsrc']
|
| 156 |
+
|
| 157 |
+
tokens = {
|
| 158 |
+
'statements': [
|
| 159 |
+
(words((
|
| 160 |
+
'virtual', 'class', 'private', 'public', 'property', 'import',
|
| 161 |
+
'delete', 'new', 'new0', 'renew', 'renew0', 'define', 'get',
|
| 162 |
+
'set', 'remote', 'dllexport', 'dllimport', 'stdcall', 'subclass',
|
| 163 |
+
'__on_register_module', 'namespace', 'using', 'typed_object',
|
| 164 |
+
'any_object', 'incref', 'register', 'watch', 'stopwatching', 'firewatchers',
|
| 165 |
+
'watchable', 'class_designer', 'class_fixed', 'class_no_expansion', 'isset',
|
| 166 |
+
'class_default_property', 'property_category', 'class_data',
|
| 167 |
+
'class_property', 'thisclass', 'dbtable', 'dbindex',
|
| 168 |
+
'database_open', 'dbfield'), suffix=r'\b'), Keyword),
|
| 169 |
+
(words(('uint', 'uint16', 'uint32', 'uint64', 'bool', 'byte',
|
| 170 |
+
'unichar', 'int64'), suffix=r'\b'),
|
| 171 |
+
Keyword.Type),
|
| 172 |
+
(r'(class)(\s+)', bygroups(Keyword, Text), 'classname'),
|
| 173 |
+
(r'(null|value|this)\b', Name.Builtin),
|
| 174 |
+
inherit,
|
| 175 |
+
],
|
| 176 |
+
'classname': [
|
| 177 |
+
(r'[a-zA-Z_]\w*', Name.Class, '#pop'),
|
| 178 |
+
# template specification
|
| 179 |
+
(r'\s*(?=>)', Text, '#pop'),
|
| 180 |
+
],
|
| 181 |
+
}
|
| 182 |
+
|
| 183 |
+
|
| 184 |
+
class ValaLexer(RegexLexer):
|
| 185 |
+
"""
|
| 186 |
+
For Vala source code with preprocessor directives.
|
| 187 |
+
|
| 188 |
+
.. versionadded:: 1.1
|
| 189 |
+
"""
|
| 190 |
+
name = 'Vala'
|
| 191 |
+
aliases = ['vala', 'vapi']
|
| 192 |
+
filenames = ['*.vala', '*.vapi']
|
| 193 |
+
mimetypes = ['text/x-vala']
|
| 194 |
+
|
| 195 |
+
tokens = {
|
| 196 |
+
'whitespace': [
|
| 197 |
+
(r'^\s*#if\s+0', Comment.Preproc, 'if0'),
|
| 198 |
+
(r'\n', Text),
|
| 199 |
+
(r'\s+', Text),
|
| 200 |
+
(r'\\\n', Text), # line continuation
|
| 201 |
+
(r'//(\n|(.|\n)*?[^\\]\n)', Comment.Single),
|
| 202 |
+
(r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline),
|
| 203 |
+
],
|
| 204 |
+
'statements': [
|
| 205 |
+
(r'[L@]?"', String, 'string'),
|
| 206 |
+
(r"L?'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'",
|
| 207 |
+
String.Char),
|
| 208 |
+
(r'(?s)""".*?"""', String), # verbatim strings
|
| 209 |
+
(r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[lL]?', Number.Float),
|
| 210 |
+
(r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float),
|
| 211 |
+
(r'0x[0-9a-fA-F]+[Ll]?', Number.Hex),
|
| 212 |
+
(r'0[0-7]+[Ll]?', Number.Oct),
|
| 213 |
+
(r'\d+[Ll]?', Number.Integer),
|
| 214 |
+
(r'[~!%^&*+=|?:<>/-]', Operator),
|
| 215 |
+
(r'(\[)(Compact|Immutable|(?:Boolean|Simple)Type)(\])',
|
| 216 |
+
bygroups(Punctuation, Name.Decorator, Punctuation)),
|
| 217 |
+
# TODO: "correctly" parse complex code attributes
|
| 218 |
+
(r'(\[)(CCode|(?:Integer|Floating)Type)',
|
| 219 |
+
bygroups(Punctuation, Name.Decorator)),
|
| 220 |
+
(r'[()\[\],.]', Punctuation),
|
| 221 |
+
(words((
|
| 222 |
+
'as', 'base', 'break', 'case', 'catch', 'construct', 'continue',
|
| 223 |
+
'default', 'delete', 'do', 'else', 'enum', 'finally', 'for',
|
| 224 |
+
'foreach', 'get', 'if', 'in', 'is', 'lock', 'new', 'out', 'params',
|
| 225 |
+
'return', 'set', 'sizeof', 'switch', 'this', 'throw', 'try',
|
| 226 |
+
'typeof', 'while', 'yield'), suffix=r'\b'),
|
| 227 |
+
Keyword),
|
| 228 |
+
(words((
|
| 229 |
+
'abstract', 'const', 'delegate', 'dynamic', 'ensures', 'extern',
|
| 230 |
+
'inline', 'internal', 'override', 'owned', 'private', 'protected',
|
| 231 |
+
'public', 'ref', 'requires', 'signal', 'static', 'throws', 'unowned',
|
| 232 |
+
'var', 'virtual', 'volatile', 'weak', 'yields'), suffix=r'\b'),
|
| 233 |
+
Keyword.Declaration),
|
| 234 |
+
(r'(namespace|using)(\s+)', bygroups(Keyword.Namespace, Text),
|
| 235 |
+
'namespace'),
|
| 236 |
+
(r'(class|errordomain|interface|struct)(\s+)',
|
| 237 |
+
bygroups(Keyword.Declaration, Text), 'class'),
|
| 238 |
+
(r'(\.)([a-zA-Z_]\w*)',
|
| 239 |
+
bygroups(Operator, Name.Attribute)),
|
| 240 |
+
# void is an actual keyword, others are in glib-2.0.vapi
|
| 241 |
+
(words((
|
| 242 |
+
'void', 'bool', 'char', 'double', 'float', 'int', 'int8', 'int16',
|
| 243 |
+
'int32', 'int64', 'long', 'short', 'size_t', 'ssize_t', 'string',
|
| 244 |
+
'time_t', 'uchar', 'uint', 'uint8', 'uint16', 'uint32', 'uint64',
|
| 245 |
+
'ulong', 'unichar', 'ushort'), suffix=r'\b'),
|
| 246 |
+
Keyword.Type),
|
| 247 |
+
(r'(true|false|null)\b', Name.Builtin),
|
| 248 |
+
('[a-zA-Z_]\w*', Name),
|
| 249 |
+
],
|
| 250 |
+
'root': [
|
| 251 |
+
include('whitespace'),
|
| 252 |
+
default('statement'),
|
| 253 |
+
],
|
| 254 |
+
'statement': [
|
| 255 |
+
include('whitespace'),
|
| 256 |
+
include('statements'),
|
| 257 |
+
('[{}]', Punctuation),
|
| 258 |
+
(';', Punctuation, '#pop'),
|
| 259 |
+
],
|
| 260 |
+
'string': [
|
| 261 |
+
(r'"', String, '#pop'),
|
| 262 |
+
(r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape),
|
| 263 |
+
(r'[^\\"\n]+', String), # all other characters
|
| 264 |
+
(r'\\\n', String), # line continuation
|
| 265 |
+
(r'\\', String), # stray backslash
|
| 266 |
+
],
|
| 267 |
+
'if0': [
|
| 268 |
+
(r'^\s*#if.*?(?<!\\)\n', Comment.Preproc, '#push'),
|
| 269 |
+
(r'^\s*#el(?:se|if).*\n', Comment.Preproc, '#pop'),
|
| 270 |
+
(r'^\s*#endif.*?(?<!\\)\n', Comment.Preproc, '#pop'),
|
| 271 |
+
(r'.*?\n', Comment),
|
| 272 |
+
],
|
| 273 |
+
'class': [
|
| 274 |
+
(r'[a-zA-Z_]\w*', Name.Class, '#pop')
|
| 275 |
+
],
|
| 276 |
+
'namespace': [
|
| 277 |
+
(r'[a-zA-Z_][\w.]*', Name.Namespace, '#pop')
|
| 278 |
+
],
|
| 279 |
+
}
|
| 280 |
+
|
| 281 |
+
|
| 282 |
+
class CudaLexer(CLexer):
|
| 283 |
+
"""
|
| 284 |
+
For NVIDIA `CUDA™ <http://developer.nvidia.com/category/zone/cuda-zone>`_
|
| 285 |
+
source.
|
| 286 |
+
|
| 287 |
+
.. versionadded:: 1.6
|
| 288 |
+
"""
|
| 289 |
+
name = 'CUDA'
|
| 290 |
+
filenames = ['*.cu', '*.cuh']
|
| 291 |
+
aliases = ['cuda', 'cu']
|
| 292 |
+
mimetypes = ['text/x-cuda']
|
| 293 |
+
|
| 294 |
+
function_qualifiers = set(('__device__', '__global__', '__host__',
|
| 295 |
+
'__noinline__', '__forceinline__'))
|
| 296 |
+
variable_qualifiers = set(('__device__', '__constant__', '__shared__',
|
| 297 |
+
'__restrict__'))
|
| 298 |
+
vector_types = set(('char1', 'uchar1', 'char2', 'uchar2', 'char3', 'uchar3',
|
| 299 |
+
'char4', 'uchar4', 'short1', 'ushort1', 'short2', 'ushort2',
|
| 300 |
+
'short3', 'ushort3', 'short4', 'ushort4', 'int1', 'uint1',
|
| 301 |
+
'int2', 'uint2', 'int3', 'uint3', 'int4', 'uint4', 'long1',
|
| 302 |
+
'ulong1', 'long2', 'ulong2', 'long3', 'ulong3', 'long4',
|
| 303 |
+
'ulong4', 'longlong1', 'ulonglong1', 'longlong2',
|
| 304 |
+
'ulonglong2', 'float1', 'float2', 'float3', 'float4',
|
| 305 |
+
'double1', 'double2', 'dim3'))
|
| 306 |
+
variables = set(('gridDim', 'blockIdx', 'blockDim', 'threadIdx', 'warpSize'))
|
| 307 |
+
functions = set(('__threadfence_block', '__threadfence', '__threadfence_system',
|
| 308 |
+
'__syncthreads', '__syncthreads_count', '__syncthreads_and',
|
| 309 |
+
'__syncthreads_or'))
|
| 310 |
+
execution_confs = set(('<<<', '>>>'))
|
| 311 |
+
|
| 312 |
+
def get_tokens_unprocessed(self, text):
|
| 313 |
+
for index, token, value in CLexer.get_tokens_unprocessed(self, text):
|
| 314 |
+
if token is Name:
|
| 315 |
+
if value in self.variable_qualifiers:
|
| 316 |
+
token = Keyword.Type
|
| 317 |
+
elif value in self.vector_types:
|
| 318 |
+
token = Keyword.Type
|
| 319 |
+
elif value in self.variables:
|
| 320 |
+
token = Name.Builtin
|
| 321 |
+
elif value in self.execution_confs:
|
| 322 |
+
token = Keyword.Pseudo
|
| 323 |
+
elif value in self.function_qualifiers:
|
| 324 |
+
token = Keyword.Reserved
|
| 325 |
+
elif value in self.functions:
|
| 326 |
+
token = Name.Function
|
| 327 |
+
yield index, token, value
|
| 328 |
+
|
| 329 |
+
|
| 330 |
+
class SwigLexer(CppLexer):
|
| 331 |
+
"""
|
| 332 |
+
For `SWIG <http://www.swig.org/>`_ source code.
|
| 333 |
+
|
| 334 |
+
.. versionadded:: 2.0
|
| 335 |
+
"""
|
| 336 |
+
name = 'SWIG'
|
| 337 |
+
aliases = ['swig']
|
| 338 |
+
filenames = ['*.swg', '*.i']
|
| 339 |
+
mimetypes = ['text/swig']
|
| 340 |
+
priority = 0.04 # Lower than C/C++ and Objective C/C++
|
| 341 |
+
|
| 342 |
+
tokens = {
|
| 343 |
+
'statements': [
|
| 344 |
+
# SWIG directives
|
| 345 |
+
(r'(%[a-z_][a-z0-9_]*)', Name.Function),
|
| 346 |
+
# Special variables
|
| 347 |
+
('\$\**\&?\w+', Name),
|
| 348 |
+
# Stringification / additional preprocessor directives
|
| 349 |
+
(r'##*[a-zA-Z_]\w*', Comment.Preproc),
|
| 350 |
+
inherit,
|
| 351 |
+
],
|
| 352 |
+
}
|
| 353 |
+
|
| 354 |
+
# This is a far from complete set of SWIG directives
|
| 355 |
+
swig_directives = set((
|
| 356 |
+
# Most common directives
|
| 357 |
+
'%apply', '%define', '%director', '%enddef', '%exception', '%extend',
|
| 358 |
+
'%feature', '%fragment', '%ignore', '%immutable', '%import', '%include',
|
| 359 |
+
'%inline', '%insert', '%module', '%newobject', '%nspace', '%pragma',
|
| 360 |
+
'%rename', '%shared_ptr', '%template', '%typecheck', '%typemap',
|
| 361 |
+
# Less common directives
|
| 362 |
+
'%arg', '%attribute', '%bang', '%begin', '%callback', '%catches', '%clear',
|
| 363 |
+
'%constant', '%copyctor', '%csconst', '%csconstvalue', '%csenum',
|
| 364 |
+
'%csmethodmodifiers', '%csnothrowexception', '%default', '%defaultctor',
|
| 365 |
+
'%defaultdtor', '%defined', '%delete', '%delobject', '%descriptor',
|
| 366 |
+
'%exceptionclass', '%exceptionvar', '%extend_smart_pointer', '%fragments',
|
| 367 |
+
'%header', '%ifcplusplus', '%ignorewarn', '%implicit', '%implicitconv',
|
| 368 |
+
'%init', '%javaconst', '%javaconstvalue', '%javaenum', '%javaexception',
|
| 369 |
+
'%javamethodmodifiers', '%kwargs', '%luacode', '%mutable', '%naturalvar',
|
| 370 |
+
'%nestedworkaround', '%perlcode', '%pythonabc', '%pythonappend',
|
| 371 |
+
'%pythoncallback', '%pythoncode', '%pythondynamic', '%pythonmaybecall',
|
| 372 |
+
'%pythonnondynamic', '%pythonprepend', '%refobject', '%shadow', '%sizeof',
|
| 373 |
+
'%trackobjects', '%types', '%unrefobject', '%varargs', '%warn',
|
| 374 |
+
'%warnfilter'))
|
| 375 |
+
|
| 376 |
+
def analyse_text(text):
|
| 377 |
+
rv = 0
|
| 378 |
+
# Search for SWIG directives, which are conventionally at the beginning of
|
| 379 |
+
# a line. The probability of them being within a line is low, so let another
|
| 380 |
+
# lexer win in this case.
|
| 381 |
+
matches = re.findall(r'^\s*(%[a-z_][a-z0-9_]*)', text, re.M)
|
| 382 |
+
for m in matches:
|
| 383 |
+
if m in SwigLexer.swig_directives:
|
| 384 |
+
rv = 0.98
|
| 385 |
+
break
|
| 386 |
+
else:
|
| 387 |
+
rv = 0.91 # Fraction higher than MatlabLexer
|
| 388 |
+
return rv
|
| 389 |
+
|
| 390 |
+
|
| 391 |
+
class MqlLexer(CppLexer):
|
| 392 |
+
"""
|
| 393 |
+
For `MQL4 <http://docs.mql4.com/>`_ and
|
| 394 |
+
`MQL5 <http://www.mql5.com/en/docs>`_ source code.
|
| 395 |
+
|
| 396 |
+
.. versionadded:: 2.0
|
| 397 |
+
"""
|
| 398 |
+
name = 'MQL'
|
| 399 |
+
aliases = ['mql', 'mq4', 'mq5', 'mql4', 'mql5']
|
| 400 |
+
filenames = ['*.mq4', '*.mq5', '*.mqh']
|
| 401 |
+
mimetypes = ['text/x-mql']
|
| 402 |
+
|
| 403 |
+
tokens = {
|
| 404 |
+
'statements': [
|
| 405 |
+
(words(_mql_builtins.keywords, suffix=r'\b'), Keyword),
|
| 406 |
+
(words(_mql_builtins.c_types, suffix=r'\b'), Keyword.Type),
|
| 407 |
+
(words(_mql_builtins.types, suffix=r'\b'), Name.Function),
|
| 408 |
+
(words(_mql_builtins.constants, suffix=r'\b'), Name.Constant),
|
| 409 |
+
(words(_mql_builtins.colors, prefix='(clr)?', suffix=r'\b'),
|
| 410 |
+
Name.Constant),
|
| 411 |
+
inherit,
|
| 412 |
+
],
|
| 413 |
+
}
|
| 414 |
+
|
| 415 |
+
class ArduinoLexer(CppLexer):
|
| 416 |
+
"""
|
| 417 |
+
For `Arduino(tm) <https://arduino.cc/>`_ source.
|
| 418 |
+
|
| 419 |
+
This is an extension of the CppLexer, as the Arduino® Language is a superset
|
| 420 |
+
of C++
|
| 421 |
+
|
| 422 |
+
.. versionadded:: 2.1
|
| 423 |
+
"""
|
| 424 |
+
|
| 425 |
+
name = 'Arduino'
|
| 426 |
+
aliases = ['arduino']
|
| 427 |
+
filenames = ['*.ino']
|
| 428 |
+
mimetypes = ['text/x-arduino']
|
| 429 |
+
|
| 430 |
+
# Language sketch main structure functions
|
| 431 |
+
structure = set(('setup', 'loop'))
|
| 432 |
+
|
| 433 |
+
# Language operators
|
| 434 |
+
operators = set(('not', 'or', 'and', 'xor'))
|
| 435 |
+
|
| 436 |
+
# Language 'variables'
|
| 437 |
+
variables = set((
|
| 438 |
+
'DIGITAL_MESSAGE', 'FIRMATA_STRING', 'ANALOG_MESSAGE', 'REPORT_DIGITAL',
|
| 439 |
+
'REPORT_ANALOG', 'INPUT_PULLUP', 'SET_PIN_MODE', 'INTERNAL2V56', 'SYSTEM_RESET',
|
| 440 |
+
'LED_BUILTIN', 'INTERNAL1V1', 'SYSEX_START', 'INTERNAL', 'EXTERNAL', 'HIGH',
|
| 441 |
+
'LOW', 'INPUT', 'OUTPUT', 'INPUT_PULLUP', 'LED_BUILTIN', 'true', 'false',
|
| 442 |
+
'void', 'boolean', 'char', 'unsigned char', 'byte', 'int', 'unsigned int',
|
| 443 |
+
'word', 'long', 'unsigned long', 'short', 'float', 'double', 'string', 'String',
|
| 444 |
+
'array', 'static', 'volatile', 'const', 'boolean', 'byte', 'word', 'string',
|
| 445 |
+
'String', 'array', 'int', 'float', 'private', 'char', 'virtual', 'operator',
|
| 446 |
+
'sizeof', 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', 'int8_t', 'int16_t',
|
| 447 |
+
'int32_t', 'int64_t', 'dynamic_cast', 'typedef', 'const_cast', 'const',
|
| 448 |
+
'struct', 'static_cast', 'union', 'unsigned', 'long', 'volatile', 'static',
|
| 449 |
+
'protected', 'bool', 'public', 'friend', 'auto', 'void', 'enum', 'extern',
|
| 450 |
+
'class', 'short', 'reinterpret_cast', 'double', 'register', 'explicit',
|
| 451 |
+
'signed', 'inline', 'delete', '_Bool', 'complex', '_Complex', '_Imaginary',
|
| 452 |
+
'atomic_bool', 'atomic_char', 'atomic_schar', 'atomic_uchar', 'atomic_short',
|
| 453 |
+
'atomic_ushort', 'atomic_int', 'atomic_uint', 'atomic_long', 'atomic_ulong',
|
| 454 |
+
'atomic_llong', 'atomic_ullong', 'PROGMEM'))
|
| 455 |
+
|
| 456 |
+
# Language shipped functions and class ( )
|
| 457 |
+
functions = set((
|
| 458 |
+
'KeyboardController', 'MouseController', 'SoftwareSerial', 'EthernetServer',
|
| 459 |
+
'EthernetClient', 'LiquidCrystal', 'RobotControl', 'GSMVoiceCall',
|
| 460 |
+
'EthernetUDP', 'EsploraTFT', 'HttpClient', 'RobotMotor', 'WiFiClient',
|
| 461 |
+
'GSMScanner', 'FileSystem', 'Scheduler', 'GSMServer', 'YunClient', 'YunServer',
|
| 462 |
+
'IPAddress', 'GSMClient', 'GSMModem', 'Keyboard', 'Ethernet', 'Console',
|
| 463 |
+
'GSMBand', 'Esplora', 'Stepper', 'Process', 'WiFiUDP', 'GSM_SMS', 'Mailbox',
|
| 464 |
+
'USBHost', 'Firmata', 'PImage', 'Client', 'Server', 'GSMPIN', 'FileIO',
|
| 465 |
+
'Bridge', 'Serial', 'EEPROM', 'Stream', 'Mouse', 'Audio', 'Servo', 'File',
|
| 466 |
+
'Task', 'GPRS', 'WiFi', 'Wire', 'TFT', 'GSM', 'SPI', 'SD',
|
| 467 |
+
'runShellCommandAsynchronously', 'analogWriteResolution',
|
| 468 |
+
'retrieveCallingNumber', 'printFirmwareVersion', 'analogReadResolution',
|
| 469 |
+
'sendDigitalPortPair', 'noListenOnLocalhost', 'readJoystickButton',
|
| 470 |
+
'setFirmwareVersion', 'readJoystickSwitch', 'scrollDisplayRight',
|
| 471 |
+
'getVoiceCallStatus', 'scrollDisplayLeft', 'writeMicroseconds',
|
| 472 |
+
'delayMicroseconds', 'beginTransmission', 'getSignalStrength',
|
| 473 |
+
'runAsynchronously', 'getAsynchronously', 'listenOnLocalhost',
|
| 474 |
+
'getCurrentCarrier', 'readAccelerometer', 'messageAvailable',
|
| 475 |
+
'sendDigitalPorts', 'lineFollowConfig', 'countryNameWrite', 'runShellCommand',
|
| 476 |
+
'readStringUntil', 'rewindDirectory', 'readTemperature', 'setClockDivider',
|
| 477 |
+
'readLightSensor', 'endTransmission', 'analogReference', 'detachInterrupt',
|
| 478 |
+
'countryNameRead', 'attachInterrupt', 'encryptionType', 'readBytesUntil',
|
| 479 |
+
'robotNameWrite', 'readMicrophone', 'robotNameRead', 'cityNameWrite',
|
| 480 |
+
'userNameWrite', 'readJoystickY', 'readJoystickX', 'mouseReleased',
|
| 481 |
+
'openNextFile', 'scanNetworks', 'noInterrupts', 'digitalWrite', 'beginSpeaker',
|
| 482 |
+
'mousePressed', 'isActionDone', 'mouseDragged', 'displayLogos', 'noAutoscroll',
|
| 483 |
+
'addParameter', 'remoteNumber', 'getModifiers', 'keyboardRead', 'userNameRead',
|
| 484 |
+
'waitContinue', 'processInput', 'parseCommand', 'printVersion', 'readNetworks',
|
| 485 |
+
'writeMessage', 'blinkVersion', 'cityNameRead', 'readMessage', 'setDataMode',
|
| 486 |
+
'parsePacket', 'isListening', 'setBitOrder', 'beginPacket', 'isDirectory',
|
| 487 |
+
'motorsWrite', 'drawCompass', 'digitalRead', 'clearScreen', 'serialEvent',
|
| 488 |
+
'rightToLeft', 'setTextSize', 'leftToRight', 'requestFrom', 'keyReleased',
|
| 489 |
+
'compassRead', 'analogWrite', 'interrupts', 'WiFiServer', 'disconnect',
|
| 490 |
+
'playMelody', 'parseFloat', 'autoscroll', 'getPINUsed', 'setPINUsed',
|
| 491 |
+
'setTimeout', 'sendAnalog', 'readSlider', 'analogRead', 'beginWrite',
|
| 492 |
+
'createChar', 'motorsStop', 'keyPressed', 'tempoWrite', 'readButton',
|
| 493 |
+
'subnetMask', 'debugPrint', 'macAddress', 'writeGreen', 'randomSeed',
|
| 494 |
+
'attachGPRS', 'readString', 'sendString', 'remotePort', 'releaseAll',
|
| 495 |
+
'mouseMoved', 'background', 'getXChange', 'getYChange', 'answerCall',
|
| 496 |
+
'getResult', 'voiceCall', 'endPacket', 'constrain', 'getSocket', 'writeJSON',
|
| 497 |
+
'getButton', 'available', 'connected', 'findUntil', 'readBytes', 'exitValue',
|
| 498 |
+
'readGreen', 'writeBlue', 'startLoop', 'IPAddress', 'isPressed', 'sendSysex',
|
| 499 |
+
'pauseMode', 'gatewayIP', 'setCursor', 'getOemKey', 'tuneWrite', 'noDisplay',
|
| 500 |
+
'loadImage', 'switchPIN', 'onRequest', 'onReceive', 'changePIN', 'playFile',
|
| 501 |
+
'noBuffer', 'parseInt', 'overflow', 'checkPIN', 'knobRead', 'beginTFT',
|
| 502 |
+
'bitClear', 'updateIR', 'bitWrite', 'position', 'writeRGB', 'highByte',
|
| 503 |
+
'writeRed', 'setSpeed', 'readBlue', 'noStroke', 'remoteIP', 'transfer',
|
| 504 |
+
'shutdown', 'hangCall', 'beginSMS', 'endWrite', 'attached', 'maintain',
|
| 505 |
+
'noCursor', 'checkReg', 'checkPUK', 'shiftOut', 'isValid', 'shiftIn', 'pulseIn',
|
| 506 |
+
'connect', 'println', 'localIP', 'pinMode', 'getIMEI', 'display', 'noBlink',
|
| 507 |
+
'process', 'getBand', 'running', 'beginSD', 'drawBMP', 'lowByte', 'setBand',
|
| 508 |
+
'release', 'bitRead', 'prepare', 'pointTo', 'readRed', 'setMode', 'noFill',
|
| 509 |
+
'remove', 'listen', 'stroke', 'detach', 'attach', 'noTone', 'exists', 'buffer',
|
| 510 |
+
'height', 'bitSet', 'circle', 'config', 'cursor', 'random', 'IRread', 'setDNS',
|
| 511 |
+
'endSMS', 'getKey', 'micros', 'millis', 'begin', 'print', 'write', 'ready',
|
| 512 |
+
'flush', 'width', 'isPIN', 'blink', 'clear', 'press', 'mkdir', 'rmdir', 'close',
|
| 513 |
+
'point', 'yield', 'image', 'BSSID', 'click', 'delay', 'read', 'text', 'move',
|
| 514 |
+
'peek', 'beep', 'rect', 'line', 'open', 'seek', 'fill', 'size', 'turn', 'stop',
|
| 515 |
+
'home', 'find', 'step', 'tone', 'sqrt', 'RSSI', 'SSID', 'end', 'bit', 'tan',
|
| 516 |
+
'cos', 'sin', 'pow', 'map', 'abs', 'max', 'min', 'get', 'run', 'put',
|
| 517 |
+
'isAlphaNumeric', 'isAlpha', 'isAscii', 'isWhitespace', 'isControl', 'isDigit',
|
| 518 |
+
'isGraph', 'isLowerCase', 'isPrintable', 'isPunct', 'isSpace', 'isUpperCase',
|
| 519 |
+
'isHexadecimalDigit'))
|
| 520 |
+
|
| 521 |
+
# do not highlight
|
| 522 |
+
suppress_highlight = set((
|
| 523 |
+
'namespace', 'template', 'mutable', 'using', 'asm', 'typeid',
|
| 524 |
+
'typename', 'this', 'alignof', 'constexpr', 'decltype', 'noexcept',
|
| 525 |
+
'static_assert', 'thread_local', 'restrict'))
|
| 526 |
+
|
| 527 |
+
|
| 528 |
+
def get_tokens_unprocessed(self, text):
|
| 529 |
+
for index, token, value in CppLexer.get_tokens_unprocessed(self, text):
|
| 530 |
+
if value in self.structure:
|
| 531 |
+
yield index, Name.Builtin, value
|
| 532 |
+
elif value in self.operators:
|
| 533 |
+
yield index, Operator, value
|
| 534 |
+
elif value in self.variables:
|
| 535 |
+
yield index, Keyword.Reserved, value
|
| 536 |
+
elif value in self.suppress_highlight:
|
| 537 |
+
yield index, Name, value
|
| 538 |
+
elif value in self.functions:
|
| 539 |
+
yield index, Name.Function, value
|
| 540 |
+
else:
|
| 541 |
+
yield index, token, value
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/capnproto.py
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.capnproto
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexers for the Cap'n Proto schema language.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 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, default
|
| 15 |
+
from pygments.token import Text, Comment, Keyword, Name, Literal
|
| 16 |
+
|
| 17 |
+
__all__ = ['CapnProtoLexer']
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
class CapnProtoLexer(RegexLexer):
|
| 21 |
+
"""
|
| 22 |
+
For `Cap'n Proto <https://capnproto.org>`_ source.
|
| 23 |
+
|
| 24 |
+
.. versionadded:: 2.2
|
| 25 |
+
"""
|
| 26 |
+
name = 'Cap\'n Proto'
|
| 27 |
+
filenames = ['*.capnp']
|
| 28 |
+
aliases = ['capnp']
|
| 29 |
+
|
| 30 |
+
flags = re.MULTILINE | re.UNICODE
|
| 31 |
+
|
| 32 |
+
tokens = {
|
| 33 |
+
'root': [
|
| 34 |
+
(r'#.*?$', Comment.Single),
|
| 35 |
+
(r'@[0-9a-zA-Z]*', Name.Decorator),
|
| 36 |
+
(r'=', Literal, 'expression'),
|
| 37 |
+
(r':', Name.Class, 'type'),
|
| 38 |
+
(r'\$', Name.Attribute, 'annotation'),
|
| 39 |
+
(r'(struct|enum|interface|union|import|using|const|annotation|'
|
| 40 |
+
r'extends|in|of|on|as|with|from|fixed)\b',
|
| 41 |
+
Keyword),
|
| 42 |
+
(r'[\w.]+', Name),
|
| 43 |
+
(r'[^#@=:$\w]+', Text),
|
| 44 |
+
],
|
| 45 |
+
'type': [
|
| 46 |
+
(r'[^][=;,(){}$]+', Name.Class),
|
| 47 |
+
(r'[[(]', Name.Class, 'parentype'),
|
| 48 |
+
default('#pop'),
|
| 49 |
+
],
|
| 50 |
+
'parentype': [
|
| 51 |
+
(r'[^][;()]+', Name.Class),
|
| 52 |
+
(r'[[(]', Name.Class, '#push'),
|
| 53 |
+
(r'[])]', Name.Class, '#pop'),
|
| 54 |
+
default('#pop'),
|
| 55 |
+
],
|
| 56 |
+
'expression': [
|
| 57 |
+
(r'[^][;,(){}$]+', Literal),
|
| 58 |
+
(r'[[(]', Literal, 'parenexp'),
|
| 59 |
+
default('#pop'),
|
| 60 |
+
],
|
| 61 |
+
'parenexp': [
|
| 62 |
+
(r'[^][;()]+', Literal),
|
| 63 |
+
(r'[[(]', Literal, '#push'),
|
| 64 |
+
(r'[])]', Literal, '#pop'),
|
| 65 |
+
default('#pop'),
|
| 66 |
+
],
|
| 67 |
+
'annotation': [
|
| 68 |
+
(r'[^][;,(){}=:]+', Name.Attribute),
|
| 69 |
+
(r'[[(]', Name.Attribute, 'annexp'),
|
| 70 |
+
default('#pop'),
|
| 71 |
+
],
|
| 72 |
+
'annexp': [
|
| 73 |
+
(r'[^][;()]+', Name.Attribute),
|
| 74 |
+
(r'[[(]', Name.Attribute, '#push'),
|
| 75 |
+
(r'[])]', Name.Attribute, '#pop'),
|
| 76 |
+
default('#pop'),
|
| 77 |
+
],
|
| 78 |
+
}
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/chapel.py
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.chapel
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexer for the Chapel language.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
from pygments.lexer import RegexLexer, bygroups, words
|
| 13 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 14 |
+
Number, Punctuation
|
| 15 |
+
|
| 16 |
+
__all__ = ['ChapelLexer']
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
class ChapelLexer(RegexLexer):
|
| 20 |
+
"""
|
| 21 |
+
For `Chapel <http://chapel.cray.com/>`_ source.
|
| 22 |
+
|
| 23 |
+
.. versionadded:: 2.0
|
| 24 |
+
"""
|
| 25 |
+
name = 'Chapel'
|
| 26 |
+
filenames = ['*.chpl']
|
| 27 |
+
aliases = ['chapel', 'chpl']
|
| 28 |
+
# mimetypes = ['text/x-chapel']
|
| 29 |
+
|
| 30 |
+
tokens = {
|
| 31 |
+
'root': [
|
| 32 |
+
(r'\n', Text),
|
| 33 |
+
(r'\s+', Text),
|
| 34 |
+
(r'\\\n', Text),
|
| 35 |
+
|
| 36 |
+
(r'//(.*?)\n', Comment.Single),
|
| 37 |
+
(r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline),
|
| 38 |
+
|
| 39 |
+
(r'(config|const|in|inout|out|param|ref|type|var)\b',
|
| 40 |
+
Keyword.Declaration),
|
| 41 |
+
(r'(false|nil|true)\b', Keyword.Constant),
|
| 42 |
+
(r'(bool|complex|imag|int|opaque|range|real|string|uint)\b',
|
| 43 |
+
Keyword.Type),
|
| 44 |
+
(words((
|
| 45 |
+
'align', 'as', 'atomic', 'begin', 'break', 'by', 'cobegin',
|
| 46 |
+
'coforall', 'continue', 'delete', 'dmapped', 'do', 'domain',
|
| 47 |
+
'else', 'enum', 'except', 'export', 'extern', 'for', 'forall',
|
| 48 |
+
'if', 'index', 'inline', 'iter', 'label', 'lambda', 'let',
|
| 49 |
+
'local', 'new', 'noinit', 'on', 'only', 'otherwise', 'pragma',
|
| 50 |
+
'private', 'public', 'reduce', 'require', 'return', 'scan',
|
| 51 |
+
'select', 'serial', 'single', 'sparse', 'subdomain', 'sync',
|
| 52 |
+
'then', 'use', 'when', 'where', 'while', 'with', 'yield',
|
| 53 |
+
'zip'), suffix=r'\b'),
|
| 54 |
+
Keyword),
|
| 55 |
+
(r'(proc)((?:\s)+)', bygroups(Keyword, Text), 'procname'),
|
| 56 |
+
(r'(class|module|record|union)(\s+)', bygroups(Keyword, Text),
|
| 57 |
+
'classname'),
|
| 58 |
+
|
| 59 |
+
# imaginary integers
|
| 60 |
+
(r'\d+i', Number),
|
| 61 |
+
(r'\d+\.\d*([Ee][-+]\d+)?i', Number),
|
| 62 |
+
(r'\.\d+([Ee][-+]\d+)?i', Number),
|
| 63 |
+
(r'\d+[Ee][-+]\d+i', Number),
|
| 64 |
+
|
| 65 |
+
# reals cannot end with a period due to lexical ambiguity with
|
| 66 |
+
# .. operator. See reference for rationale.
|
| 67 |
+
(r'(\d*\.\d+)([eE][+-]?[0-9]+)?i?', Number.Float),
|
| 68 |
+
(r'\d+[eE][+-]?[0-9]+i?', Number.Float),
|
| 69 |
+
|
| 70 |
+
# integer literals
|
| 71 |
+
# -- binary
|
| 72 |
+
(r'0[bB][01]+', Number.Bin),
|
| 73 |
+
# -- hex
|
| 74 |
+
(r'0[xX][0-9a-fA-F]+', Number.Hex),
|
| 75 |
+
# -- octal
|
| 76 |
+
(r'0[oO][0-7]+', Number.Oct),
|
| 77 |
+
# -- decimal
|
| 78 |
+
(r'[0-9]+', Number.Integer),
|
| 79 |
+
|
| 80 |
+
# strings
|
| 81 |
+
(r'"(\\\\|\\"|[^"])*"', String),
|
| 82 |
+
(r"'(\\\\|\\'|[^'])*'", String),
|
| 83 |
+
|
| 84 |
+
# tokens
|
| 85 |
+
(r'(=|\+=|-=|\*=|/=|\*\*=|%=|&=|\|=|\^=|&&=|\|\|=|<<=|>>=|'
|
| 86 |
+
r'<=>|<~>|\.\.|by|#|\.\.\.|'
|
| 87 |
+
r'&&|\|\||!|&|\||\^|~|<<|>>|'
|
| 88 |
+
r'==|!=|<=|>=|<|>|'
|
| 89 |
+
r'[+\-*/%]|\*\*)', Operator),
|
| 90 |
+
(r'[:;,.?()\[\]{}]', Punctuation),
|
| 91 |
+
|
| 92 |
+
# identifiers
|
| 93 |
+
(r'[a-zA-Z_][\w$]*', Name.Other),
|
| 94 |
+
],
|
| 95 |
+
'classname': [
|
| 96 |
+
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+
~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexer for the Clean language.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
from pygments.lexer import ExtendedRegexLexer, LexerContext, \
|
| 13 |
+
bygroups, words, include, default
|
| 14 |
+
from pygments.token import Comment, Keyword, Literal, Name, Number, Operator, \
|
| 15 |
+
Punctuation, String, Text, Whitespace
|
| 16 |
+
|
| 17 |
+
__all__ = ['CleanLexer']
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
class CleanLexer(ExtendedRegexLexer):
|
| 21 |
+
"""
|
| 22 |
+
Lexer for the general purpose, state-of-the-art, pure and lazy functional
|
| 23 |
+
programming language Clean (http://clean.cs.ru.nl/Clean).
|
| 24 |
+
|
| 25 |
+
.. versionadded: 2.2
|
| 26 |
+
"""
|
| 27 |
+
name = 'Clean'
|
| 28 |
+
aliases = ['clean']
|
| 29 |
+
filenames = ['*.icl', '*.dcl']
|
| 30 |
+
|
| 31 |
+
def get_tokens_unprocessed(self, text=None, context=None):
|
| 32 |
+
ctx = LexerContext(text, 0)
|
| 33 |
+
ctx.indent = 0
|
| 34 |
+
return ExtendedRegexLexer.get_tokens_unprocessed(self, text, context=ctx)
|
| 35 |
+
|
| 36 |
+
def check_class_not_import(lexer, match, ctx):
|
| 37 |
+
if match.group(0) == 'import':
|
| 38 |
+
yield match.start(), Keyword.Namespace, match.group(0)
|
| 39 |
+
ctx.stack = ctx.stack[:-1] + ['fromimportfunc']
|
| 40 |
+
else:
|
| 41 |
+
yield match.start(), Name.Class, match.group(0)
|
| 42 |
+
ctx.pos = match.end()
|
| 43 |
+
|
| 44 |
+
def check_instance_class(lexer, match, ctx):
|
| 45 |
+
if match.group(0) == 'instance' or match.group(0) == 'class':
|
| 46 |
+
yield match.start(), Keyword, match.group(0)
|
| 47 |
+
else:
|
| 48 |
+
yield match.start(), Name.Function, match.group(0)
|
| 49 |
+
ctx.stack = ctx.stack + ['fromimportfunctype']
|
| 50 |
+
ctx.pos = match.end()
|
| 51 |
+
|
| 52 |
+
@staticmethod
|
| 53 |
+
def indent_len(text):
|
| 54 |
+
# Tabs are four spaces:
|
| 55 |
+
# https://svn.cs.ru.nl/repos/clean-platform/trunk/doc/STANDARDS.txt
|
| 56 |
+
text = text.replace('\n', '')
|
| 57 |
+
return len(text.replace('\t', ' ')), len(text)
|
| 58 |
+
|
| 59 |
+
def store_indent(lexer, match, ctx):
|
| 60 |
+
ctx.indent, _ = CleanLexer.indent_len(match.group(0))
|
| 61 |
+
ctx.pos = match.end()
|
| 62 |
+
yield match.start(), Text, match.group(0)
|
| 63 |
+
|
| 64 |
+
def check_indent1(lexer, match, ctx):
|
| 65 |
+
indent, reallen = CleanLexer.indent_len(match.group(0))
|
| 66 |
+
if indent > ctx.indent:
|
| 67 |
+
yield match.start(), Whitespace, match.group(0)
|
| 68 |
+
ctx.pos = match.start() + reallen + 1
|
| 69 |
+
else:
|
| 70 |
+
ctx.indent = 0
|
| 71 |
+
ctx.pos = match.start()
|
| 72 |
+
ctx.stack = ctx.stack[:-1]
|
| 73 |
+
yield match.start(), Whitespace, match.group(0)[1:]
|
| 74 |
+
|
| 75 |
+
def check_indent2(lexer, match, ctx):
|
| 76 |
+
indent, reallen = CleanLexer.indent_len(match.group(0))
|
| 77 |
+
if indent > ctx.indent:
|
| 78 |
+
yield match.start(), Whitespace, match.group(0)
|
| 79 |
+
ctx.pos = match.start() + reallen + 1
|
| 80 |
+
else:
|
| 81 |
+
ctx.indent = 0
|
| 82 |
+
ctx.pos = match.start()
|
| 83 |
+
ctx.stack = ctx.stack[:-2]
|
| 84 |
+
|
| 85 |
+
def check_indent3(lexer, match, ctx):
|
| 86 |
+
indent, reallen = CleanLexer.indent_len(match.group(0))
|
| 87 |
+
if indent > ctx.indent:
|
| 88 |
+
yield match.start(), Whitespace, match.group(0)
|
| 89 |
+
ctx.pos = match.start() + reallen + 1
|
| 90 |
+
else:
|
| 91 |
+
ctx.indent = 0
|
| 92 |
+
ctx.pos = match.start()
|
| 93 |
+
ctx.stack = ctx.stack[:-3]
|
| 94 |
+
yield match.start(), Whitespace, match.group(0)[1:]
|
| 95 |
+
if match.group(0) == '\n\n':
|
| 96 |
+
ctx.pos = ctx.pos + 1
|
| 97 |
+
|
| 98 |
+
def skip(lexer, match, ctx):
|
| 99 |
+
ctx.stack = ctx.stack[:-1]
|
| 100 |
+
ctx.pos = match.end()
|
| 101 |
+
yield match.start(), Comment, match.group(0)
|
| 102 |
+
|
| 103 |
+
keywords = ('class', 'instance', 'where', 'with', 'let', 'let!',
|
| 104 |
+
'in', 'case', 'of', 'infix', 'infixr', 'infixl', 'generic',
|
| 105 |
+
'derive', 'otherwise', 'code', 'inline')
|
| 106 |
+
|
| 107 |
+
tokens = {
|
| 108 |
+
'common': [
|
| 109 |
+
(r';', Punctuation, '#pop'),
|
| 110 |
+
(r'//', Comment, 'singlecomment'),
|
| 111 |
+
],
|
| 112 |
+
'root': [
|
| 113 |
+
# Comments
|
| 114 |
+
(r'//.*\n', Comment.Single),
|
| 115 |
+
(r'(?s)/\*\*.*?\*/', Comment.Special),
|
| 116 |
+
(r'(?s)/\*.*?\*/', Comment.Multi),
|
| 117 |
+
|
| 118 |
+
# Modules, imports, etc.
|
| 119 |
+
(r'\b((?:implementation|definition|system)\s+)?(module)(\s+)([\w`.]+)',
|
| 120 |
+
bygroups(Keyword.Namespace, Keyword.Namespace, Text, Name.Class)),
|
| 121 |
+
(r'(?<=\n)import(?=\s)', Keyword.Namespace, 'import'),
|
| 122 |
+
(r'(?<=\n)from(?=\s)', Keyword.Namespace, 'fromimport'),
|
| 123 |
+
|
| 124 |
+
# Keywords
|
| 125 |
+
# We cannot use (?s)^|(?<=\s) as prefix, so need to repeat this
|
| 126 |
+
(words(keywords, prefix=r'(?<=\s)', suffix=r'(?=\s)'), Keyword),
|
| 127 |
+
(words(keywords, prefix=r'^', suffix=r'(?=\s)'), Keyword),
|
| 128 |
+
|
| 129 |
+
# Function definitions
|
| 130 |
+
(r'(?=\{\|)', Whitespace, 'genericfunction'),
|
| 131 |
+
(r'(?<=\n)([ \t]*)([\w`$()=\-<>~*\^|+&%]+)((?:\s+\w)*)(\s*)(::)',
|
| 132 |
+
bygroups(store_indent, Name.Function, Keyword.Type, Whitespace,
|
| 133 |
+
Punctuation),
|
| 134 |
+
'functiondefargs'),
|
| 135 |
+
|
| 136 |
+
# Type definitions
|
| 137 |
+
(r'(?<=\n)([ \t]*)(::)', bygroups(store_indent, Punctuation), 'typedef'),
|
| 138 |
+
(r'^([ \t]*)(::)', bygroups(store_indent, Punctuation), 'typedef'),
|
| 139 |
+
|
| 140 |
+
# Literals
|
| 141 |
+
(r'\'\\?.(?<!\\)\'', String.Char),
|
| 142 |
+
(r'\'\\\d+\'', String.Char),
|
| 143 |
+
(r'\'\\\\\'', String.Char), # (special case for '\\')
|
| 144 |
+
(r'[+\-~]?\s*\d+\.\d+(E[+\-~]?\d+)?\b', Number.Float),
|
| 145 |
+
(r'[+\-~]?\s*0[0-7]\b', Number.Oct),
|
| 146 |
+
(r'[+\-~]?\s*0x[0-9a-fA-F]\b', Number.Hex),
|
| 147 |
+
(r'[+\-~]?\s*\d+\b', Number.Integer),
|
| 148 |
+
(r'"', String.Double, 'doubleqstring'),
|
| 149 |
+
(words(('True', 'False'), prefix=r'(?<=\s)', suffix=r'(?=\s)'),
|
| 150 |
+
Literal),
|
| 151 |
+
|
| 152 |
+
# Qualified names
|
| 153 |
+
(r'(\')([\w.]+)(\'\.)',
|
| 154 |
+
bygroups(Punctuation, Name.Namespace, Punctuation)),
|
| 155 |
+
|
| 156 |
+
# Everything else is some name
|
| 157 |
+
(r'([\w`$%/?@]+\.?)*[\w`$%/?@]+', Name),
|
| 158 |
+
|
| 159 |
+
# Punctuation
|
| 160 |
+
(r'[{}()\[\],:;.#]', Punctuation),
|
| 161 |
+
(r'[+\-=!<>|&~*\^/]', Operator),
|
| 162 |
+
(r'\\\\', Operator),
|
| 163 |
+
|
| 164 |
+
# Lambda expressions
|
| 165 |
+
(r'\\.*?(->|\.|=)', Name.Function),
|
| 166 |
+
|
| 167 |
+
# Whitespace
|
| 168 |
+
(r'\s', Whitespace),
|
| 169 |
+
|
| 170 |
+
include('common'),
|
| 171 |
+
],
|
| 172 |
+
'fromimport': [
|
| 173 |
+
include('common'),
|
| 174 |
+
(r'([\w`.]+)', check_class_not_import),
|
| 175 |
+
(r'\n', Whitespace, '#pop'),
|
| 176 |
+
(r'\s', Whitespace),
|
| 177 |
+
],
|
| 178 |
+
'fromimportfunc': [
|
| 179 |
+
include('common'),
|
| 180 |
+
(r'(::)(\s+)([^,\s]+)', bygroups(Punctuation, Text, Keyword.Type)),
|
| 181 |
+
(r'([\w`$()=\-<>~*\^|+&%/]+)', check_instance_class),
|
| 182 |
+
(r',', Punctuation),
|
| 183 |
+
(r'\n', Whitespace, '#pop'),
|
| 184 |
+
(r'\s', Whitespace),
|
| 185 |
+
],
|
| 186 |
+
'fromimportfunctype': [
|
| 187 |
+
include('common'),
|
| 188 |
+
(r'[{(\[]', Punctuation, 'combtype'),
|
| 189 |
+
(r',', Punctuation, '#pop'),
|
| 190 |
+
(r'[:;.#]', Punctuation),
|
| 191 |
+
(r'\n', Whitespace, '#pop:2'),
|
| 192 |
+
(r'[^\S\n]+', Whitespace),
|
| 193 |
+
(r'\S+', Keyword.Type),
|
| 194 |
+
],
|
| 195 |
+
'combtype': [
|
| 196 |
+
include('common'),
|
| 197 |
+
(r'[})\]]', Punctuation, '#pop'),
|
| 198 |
+
(r'[{(\[]', Punctuation, '#pop'),
|
| 199 |
+
(r'[,:;.#]', Punctuation),
|
| 200 |
+
(r'\s+', Whitespace),
|
| 201 |
+
(r'\S+', Keyword.Type),
|
| 202 |
+
],
|
| 203 |
+
'import': [
|
| 204 |
+
include('common'),
|
| 205 |
+
(words(('from', 'import', 'as', 'qualified'),
|
| 206 |
+
prefix='(?<=\s)', suffix='(?=\s)'), Keyword.Namespace),
|
| 207 |
+
(r'[\w`.]+', Name.Class),
|
| 208 |
+
(r'\n', Whitespace, '#pop'),
|
| 209 |
+
(r',', Punctuation),
|
| 210 |
+
(r'[^\S\n]+', Whitespace),
|
| 211 |
+
],
|
| 212 |
+
'singlecomment': [
|
| 213 |
+
(r'(.)(?=\n)', skip),
|
| 214 |
+
(r'.+(?!\n)', Comment),
|
| 215 |
+
],
|
| 216 |
+
'doubleqstring': [
|
| 217 |
+
(r'[^\\"]+', String.Double),
|
| 218 |
+
(r'"', String.Double, '#pop'),
|
| 219 |
+
(r'\\.', String.Double),
|
| 220 |
+
],
|
| 221 |
+
'typedef': [
|
| 222 |
+
include('common'),
|
| 223 |
+
(r'[\w`]+', Keyword.Type),
|
| 224 |
+
(r'[:=|(),\[\]{}!*]', Punctuation),
|
| 225 |
+
(r'->', Punctuation),
|
| 226 |
+
(r'\n(?=[^\s|])', Whitespace, '#pop'),
|
| 227 |
+
(r'\s', Whitespace),
|
| 228 |
+
(r'.', Keyword.Type),
|
| 229 |
+
],
|
| 230 |
+
'genericfunction': [
|
| 231 |
+
include('common'),
|
| 232 |
+
(r'\{\|', Punctuation),
|
| 233 |
+
(r'\|\}', Punctuation, '#pop'),
|
| 234 |
+
(r',', Punctuation),
|
| 235 |
+
(r'->', Punctuation),
|
| 236 |
+
(r'(\s+of\s+)(\{)', bygroups(Keyword, Punctuation), 'genericftypes'),
|
| 237 |
+
(r'\s', Whitespace),
|
| 238 |
+
(r'[\w`\[\]{}!]+', Keyword.Type),
|
| 239 |
+
(r'[*()]', Punctuation),
|
| 240 |
+
],
|
| 241 |
+
'genericftypes': [
|
| 242 |
+
include('common'),
|
| 243 |
+
(r'[\w`]+', Keyword.Type),
|
| 244 |
+
(r',', Punctuation),
|
| 245 |
+
(r'\s', Whitespace),
|
| 246 |
+
(r'\}', Punctuation, '#pop'),
|
| 247 |
+
],
|
| 248 |
+
'functiondefargs': [
|
| 249 |
+
include('common'),
|
| 250 |
+
(r'\n(\s*)', check_indent1),
|
| 251 |
+
(r'[!{}()\[\],:;.#]', Punctuation),
|
| 252 |
+
(r'->', Punctuation, 'functiondefres'),
|
| 253 |
+
(r'^(?=\S)', Whitespace, '#pop'),
|
| 254 |
+
(r'\S', Keyword.Type),
|
| 255 |
+
(r'\s', Whitespace),
|
| 256 |
+
],
|
| 257 |
+
'functiondefres': [
|
| 258 |
+
include('common'),
|
| 259 |
+
(r'\n(\s*)', check_indent2),
|
| 260 |
+
(r'^(?=\S)', Whitespace, '#pop:2'),
|
| 261 |
+
(r'[!{}()\[\],:;.#]', Punctuation),
|
| 262 |
+
(r'\|', Punctuation, 'functiondefclasses'),
|
| 263 |
+
(r'\S', Keyword.Type),
|
| 264 |
+
(r'\s', Whitespace),
|
| 265 |
+
],
|
| 266 |
+
'functiondefclasses': [
|
| 267 |
+
include('common'),
|
| 268 |
+
(r'\n(\s*)', check_indent3),
|
| 269 |
+
(r'^(?=\S)', Whitespace, '#pop:3'),
|
| 270 |
+
(r'[,&]', Punctuation),
|
| 271 |
+
(r'\[', Punctuation, 'functiondefuniquneq'),
|
| 272 |
+
(r'[\w`$()=\-<>~*\^|+&%/{}\[\]@]', Name.Function, 'functionname'),
|
| 273 |
+
(r'\s+', Whitespace),
|
| 274 |
+
],
|
| 275 |
+
'functiondefuniquneq': [
|
| 276 |
+
include('common'),
|
| 277 |
+
(r'[a-z]+', Keyword.Type),
|
| 278 |
+
(r'\s+', Whitespace),
|
| 279 |
+
(r'<=|,', Punctuation),
|
| 280 |
+
(r'\]', Punctuation, '#pop')
|
| 281 |
+
],
|
| 282 |
+
'functionname': [
|
| 283 |
+
include('common'),
|
| 284 |
+
(r'[\w`$()=\-<>~*\^|+&%/]+', Name.Function),
|
| 285 |
+
(r'(?=\{\|)', Punctuation, 'genericfunction'),
|
| 286 |
+
default('#pop'),
|
| 287 |
+
]
|
| 288 |
+
}
|
evalkit_cambrian/lib/python3.10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|
+
~~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexers for configuration file formats.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 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, default, words, bygroups, include, using
|
| 15 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 16 |
+
Number, Punctuation, Whitespace, Literal
|
| 17 |
+
from pygments.lexers.shell import BashLexer
|
| 18 |
+
|
| 19 |
+
__all__ = ['IniLexer', 'RegeditLexer', 'PropertiesLexer', 'KconfigLexer',
|
| 20 |
+
'Cfengine3Lexer', 'ApacheConfLexer', 'SquidConfLexer',
|
| 21 |
+
'NginxConfLexer', 'LighttpdConfLexer', 'DockerLexer',
|
| 22 |
+
'TerraformLexer', 'TermcapLexer', 'TerminfoLexer',
|
| 23 |
+
'PkgConfigLexer', 'PacmanConfLexer']
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
class IniLexer(RegexLexer):
|
| 27 |
+
"""
|
| 28 |
+
Lexer for configuration files in INI style.
|
| 29 |
+
"""
|
| 30 |
+
|
| 31 |
+
name = 'INI'
|
| 32 |
+
aliases = ['ini', 'cfg', 'dosini']
|
| 33 |
+
filenames = ['*.ini', '*.cfg', '*.inf']
|
| 34 |
+
mimetypes = ['text/x-ini', 'text/inf']
|
| 35 |
+
|
| 36 |
+
tokens = {
|
| 37 |
+
'root': [
|
| 38 |
+
(r'\s+', Text),
|
| 39 |
+
(r'[;#].*', Comment.Single),
|
| 40 |
+
(r'\[.*?\]$', Keyword),
|
| 41 |
+
(r'(.*?)([ \t]*)(=)([ \t]*)(.*(?:\n[ \t].+)*)',
|
| 42 |
+
bygroups(Name.Attribute, Text, Operator, Text, String)),
|
| 43 |
+
# standalone option, supported by some INI parsers
|
| 44 |
+
(r'(.+?)$', Name.Attribute),
|
| 45 |
+
],
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
def analyse_text(text):
|
| 49 |
+
npos = text.find('\n')
|
| 50 |
+
if npos < 3:
|
| 51 |
+
return False
|
| 52 |
+
return text[0] == '[' and text[npos-1] == ']'
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
class RegeditLexer(RegexLexer):
|
| 56 |
+
"""
|
| 57 |
+
Lexer for `Windows Registry
|
| 58 |
+
<http://en.wikipedia.org/wiki/Windows_Registry#.REG_files>`_ files produced
|
| 59 |
+
by regedit.
|
| 60 |
+
|
| 61 |
+
.. versionadded:: 1.6
|
| 62 |
+
"""
|
| 63 |
+
|
| 64 |
+
name = 'reg'
|
| 65 |
+
aliases = ['registry']
|
| 66 |
+
filenames = ['*.reg']
|
| 67 |
+
mimetypes = ['text/x-windows-registry']
|
| 68 |
+
|
| 69 |
+
tokens = {
|
| 70 |
+
'root': [
|
| 71 |
+
(r'Windows Registry Editor.*', Text),
|
| 72 |
+
(r'\s+', Text),
|
| 73 |
+
(r'[;#].*', Comment.Single),
|
| 74 |
+
(r'(\[)(-?)(HKEY_[A-Z_]+)(.*?\])$',
|
| 75 |
+
bygroups(Keyword, Operator, Name.Builtin, Keyword)),
|
| 76 |
+
# String keys, which obey somewhat normal escaping
|
| 77 |
+
(r'("(?:\\"|\\\\|[^"])+")([ \t]*)(=)([ \t]*)',
|
| 78 |
+
bygroups(Name.Attribute, Text, Operator, Text),
|
| 79 |
+
'value'),
|
| 80 |
+
# Bare keys (includes @)
|
| 81 |
+
(r'(.*?)([ \t]*)(=)([ \t]*)',
|
| 82 |
+
bygroups(Name.Attribute, Text, Operator, Text),
|
| 83 |
+
'value'),
|
| 84 |
+
],
|
| 85 |
+
'value': [
|
| 86 |
+
(r'-', Operator, '#pop'), # delete value
|
| 87 |
+
(r'(dword|hex(?:\([0-9a-fA-F]\))?)(:)([0-9a-fA-F,]+)',
|
| 88 |
+
bygroups(Name.Variable, Punctuation, Number), '#pop'),
|
| 89 |
+
# As far as I know, .reg files do not support line continuation.
|
| 90 |
+
(r'.+', String, '#pop'),
|
| 91 |
+
default('#pop'),
|
| 92 |
+
]
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
def analyse_text(text):
|
| 96 |
+
return text.startswith('Windows Registry Editor')
|
| 97 |
+
|
| 98 |
+
|
| 99 |
+
class PropertiesLexer(RegexLexer):
|
| 100 |
+
"""
|
| 101 |
+
Lexer for configuration files in Java's properties format.
|
| 102 |
+
|
| 103 |
+
Note: trailing whitespace counts as part of the value as per spec
|
| 104 |
+
|
| 105 |
+
.. versionadded:: 1.4
|
| 106 |
+
"""
|
| 107 |
+
|
| 108 |
+
name = 'Properties'
|
| 109 |
+
aliases = ['properties', 'jproperties']
|
| 110 |
+
filenames = ['*.properties']
|
| 111 |
+
mimetypes = ['text/x-java-properties']
|
| 112 |
+
|
| 113 |
+
tokens = {
|
| 114 |
+
'root': [
|
| 115 |
+
(r'^(\w+)([ \t])(\w+\s*)$', bygroups(Name.Attribute, Text, String)),
|
| 116 |
+
(r'^\w+(\\[ \t]\w*)*$', Name.Attribute),
|
| 117 |
+
(r'(^ *)([#!].*)', bygroups(Text, Comment)),
|
| 118 |
+
# More controversial comments
|
| 119 |
+
(r'(^ *)((?:;|//).*)', bygroups(Text, Comment)),
|
| 120 |
+
(r'(.*?)([ \t]*)([=:])([ \t]*)(.*(?:(?<=\\)\n.*)*)',
|
| 121 |
+
bygroups(Name.Attribute, Text, Operator, Text, String)),
|
| 122 |
+
(r'\s', Text),
|
| 123 |
+
],
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
|
| 127 |
+
def _rx_indent(level):
|
| 128 |
+
# Kconfig *always* interprets a tab as 8 spaces, so this is the default.
|
| 129 |
+
# Edit this if you are in an environment where KconfigLexer gets expanded
|
| 130 |
+
# input (tabs expanded to spaces) and the expansion tab width is != 8,
|
| 131 |
+
# e.g. in connection with Trac (trac.ini, [mimeviewer], tab_width).
|
| 132 |
+
# Value range here is 2 <= {tab_width} <= 8.
|
| 133 |
+
tab_width = 8
|
| 134 |
+
# Regex matching a given indentation {level}, assuming that indentation is
|
| 135 |
+
# a multiple of {tab_width}. In other cases there might be problems.
|
| 136 |
+
if tab_width == 2:
|
| 137 |
+
space_repeat = '+'
|
| 138 |
+
else:
|
| 139 |
+
space_repeat = '{1,%d}' % (tab_width - 1)
|
| 140 |
+
if level == 1:
|
| 141 |
+
level_repeat = ''
|
| 142 |
+
else:
|
| 143 |
+
level_repeat = '{%s}' % level
|
| 144 |
+
return r'(?:\t| %s\t| {%s})%s.*\n' % (space_repeat, tab_width, level_repeat)
|
| 145 |
+
|
| 146 |
+
|
| 147 |
+
class KconfigLexer(RegexLexer):
|
| 148 |
+
"""
|
| 149 |
+
For Linux-style Kconfig files.
|
| 150 |
+
|
| 151 |
+
.. versionadded:: 1.6
|
| 152 |
+
"""
|
| 153 |
+
|
| 154 |
+
name = 'Kconfig'
|
| 155 |
+
aliases = ['kconfig', 'menuconfig', 'linux-config', 'kernel-config']
|
| 156 |
+
# Adjust this if new kconfig file names appear in your environment
|
| 157 |
+
filenames = ['Kconfig', '*Config.in*', 'external.in*',
|
| 158 |
+
'standard-modules.in']
|
| 159 |
+
mimetypes = ['text/x-kconfig']
|
| 160 |
+
# No re.MULTILINE, indentation-aware help text needs line-by-line handling
|
| 161 |
+
flags = 0
|
| 162 |
+
|
| 163 |
+
def call_indent(level):
|
| 164 |
+
# If indentation >= {level} is detected, enter state 'indent{level}'
|
| 165 |
+
return (_rx_indent(level), String.Doc, 'indent%s' % level)
|
| 166 |
+
|
| 167 |
+
def do_indent(level):
|
| 168 |
+
# Print paragraphs of indentation level >= {level} as String.Doc,
|
| 169 |
+
# ignoring blank lines. Then return to 'root' state.
|
| 170 |
+
return [
|
| 171 |
+
(_rx_indent(level), String.Doc),
|
| 172 |
+
(r'\s*\n', Text),
|
| 173 |
+
default('#pop:2')
|
| 174 |
+
]
|
| 175 |
+
|
| 176 |
+
tokens = {
|
| 177 |
+
'root': [
|
| 178 |
+
(r'\s+', Text),
|
| 179 |
+
(r'#.*?\n', Comment.Single),
|
| 180 |
+
(words((
|
| 181 |
+
'mainmenu', 'config', 'menuconfig', 'choice', 'endchoice',
|
| 182 |
+
'comment', 'menu', 'endmenu', 'visible if', 'if', 'endif',
|
| 183 |
+
'source', 'prompt', 'select', 'depends on', 'default',
|
| 184 |
+
'range', 'option'), suffix=r'\b'),
|
| 185 |
+
Keyword),
|
| 186 |
+
(r'(---help---|help)[\t ]*\n', Keyword, 'help'),
|
| 187 |
+
(r'(bool|tristate|string|hex|int|defconfig_list|modules|env)\b',
|
| 188 |
+
Name.Builtin),
|
| 189 |
+
(r'[!=&|]', Operator),
|
| 190 |
+
(r'[()]', Punctuation),
|
| 191 |
+
(r'[0-9]+', Number.Integer),
|
| 192 |
+
(r"'(''|[^'])*'", String.Single),
|
| 193 |
+
(r'"(""|[^"])*"', String.Double),
|
| 194 |
+
(r'\S+', Text),
|
| 195 |
+
],
|
| 196 |
+
# Help text is indented, multi-line and ends when a lower indentation
|
| 197 |
+
# level is detected.
|
| 198 |
+
'help': [
|
| 199 |
+
# Skip blank lines after help token, if any
|
| 200 |
+
(r'\s*\n', Text),
|
| 201 |
+
# Determine the first help line's indentation level heuristically(!).
|
| 202 |
+
# Attention: this is not perfect, but works for 99% of "normal"
|
| 203 |
+
# indentation schemes up to a max. indentation level of 7.
|
| 204 |
+
call_indent(7),
|
| 205 |
+
call_indent(6),
|
| 206 |
+
call_indent(5),
|
| 207 |
+
call_indent(4),
|
| 208 |
+
call_indent(3),
|
| 209 |
+
call_indent(2),
|
| 210 |
+
call_indent(1),
|
| 211 |
+
default('#pop'), # for incomplete help sections without text
|
| 212 |
+
],
|
| 213 |
+
# Handle text for indentation levels 7 to 1
|
| 214 |
+
'indent7': do_indent(7),
|
| 215 |
+
'indent6': do_indent(6),
|
| 216 |
+
'indent5': do_indent(5),
|
| 217 |
+
'indent4': do_indent(4),
|
| 218 |
+
'indent3': do_indent(3),
|
| 219 |
+
'indent2': do_indent(2),
|
| 220 |
+
'indent1': do_indent(1),
|
| 221 |
+
}
|
| 222 |
+
|
| 223 |
+
|
| 224 |
+
class Cfengine3Lexer(RegexLexer):
|
| 225 |
+
"""
|
| 226 |
+
Lexer for `CFEngine3 <http://cfengine.org>`_ policy files.
|
| 227 |
+
|
| 228 |
+
.. versionadded:: 1.5
|
| 229 |
+
"""
|
| 230 |
+
|
| 231 |
+
name = 'CFEngine3'
|
| 232 |
+
aliases = ['cfengine3', 'cf3']
|
| 233 |
+
filenames = ['*.cf']
|
| 234 |
+
mimetypes = []
|
| 235 |
+
|
| 236 |
+
tokens = {
|
| 237 |
+
'root': [
|
| 238 |
+
(r'#.*?\n', Comment),
|
| 239 |
+
(r'(body)(\s+)(\S+)(\s+)(control)',
|
| 240 |
+
bygroups(Keyword, Text, Keyword, Text, Keyword)),
|
| 241 |
+
(r'(body|bundle)(\s+)(\S+)(\s+)(\w+)(\()',
|
| 242 |
+
bygroups(Keyword, Text, Keyword, Text, Name.Function, Punctuation),
|
| 243 |
+
'arglist'),
|
| 244 |
+
(r'(body|bundle)(\s+)(\S+)(\s+)(\w+)',
|
| 245 |
+
bygroups(Keyword, Text, Keyword, Text, Name.Function)),
|
| 246 |
+
(r'(")([^"]+)(")(\s+)(string|slist|int|real)(\s*)(=>)(\s*)',
|
| 247 |
+
bygroups(Punctuation, Name.Variable, Punctuation,
|
| 248 |
+
Text, Keyword.Type, Text, Operator, Text)),
|
| 249 |
+
(r'(\S+)(\s*)(=>)(\s*)',
|
| 250 |
+
bygroups(Keyword.Reserved, Text, Operator, Text)),
|
| 251 |
+
(r'"', String, 'string'),
|
| 252 |
+
(r'(\w+)(\()', bygroups(Name.Function, Punctuation)),
|
| 253 |
+
(r'([\w.!&|()]+)(::)', bygroups(Name.Class, Punctuation)),
|
| 254 |
+
(r'(\w+)(:)', bygroups(Keyword.Declaration, Punctuation)),
|
| 255 |
+
(r'@[{(][^)}]+[})]', Name.Variable),
|
| 256 |
+
(r'[(){},;]', Punctuation),
|
| 257 |
+
(r'=>', Operator),
|
| 258 |
+
(r'->', Operator),
|
| 259 |
+
(r'\d+\.\d+', Number.Float),
|
| 260 |
+
(r'\d+', Number.Integer),
|
| 261 |
+
(r'\w+', Name.Function),
|
| 262 |
+
(r'\s+', Text),
|
| 263 |
+
],
|
| 264 |
+
'string': [
|
| 265 |
+
(r'\$[{(]', String.Interpol, 'interpol'),
|
| 266 |
+
(r'\\.', String.Escape),
|
| 267 |
+
(r'"', String, '#pop'),
|
| 268 |
+
(r'\n', String),
|
| 269 |
+
(r'.', String),
|
| 270 |
+
],
|
| 271 |
+
'interpol': [
|
| 272 |
+
(r'\$[{(]', String.Interpol, '#push'),
|
| 273 |
+
(r'[})]', String.Interpol, '#pop'),
|
| 274 |
+
(r'[^${()}]+', String.Interpol),
|
| 275 |
+
],
|
| 276 |
+
'arglist': [
|
| 277 |
+
(r'\)', Punctuation, '#pop'),
|
| 278 |
+
(r',', Punctuation),
|
| 279 |
+
(r'\w+', Name.Variable),
|
| 280 |
+
(r'\s+', Text),
|
| 281 |
+
],
|
| 282 |
+
}
|
| 283 |
+
|
| 284 |
+
|
| 285 |
+
class ApacheConfLexer(RegexLexer):
|
| 286 |
+
"""
|
| 287 |
+
Lexer for configuration files following the Apache config file
|
| 288 |
+
format.
|
| 289 |
+
|
| 290 |
+
.. versionadded:: 0.6
|
| 291 |
+
"""
|
| 292 |
+
|
| 293 |
+
name = 'ApacheConf'
|
| 294 |
+
aliases = ['apacheconf', 'aconf', 'apache']
|
| 295 |
+
filenames = ['.htaccess', 'apache.conf', 'apache2.conf']
|
| 296 |
+
mimetypes = ['text/x-apacheconf']
|
| 297 |
+
flags = re.MULTILINE | re.IGNORECASE
|
| 298 |
+
|
| 299 |
+
tokens = {
|
| 300 |
+
'root': [
|
| 301 |
+
(r'\s+', Text),
|
| 302 |
+
(r'(#.*?)$', Comment),
|
| 303 |
+
(r'(<[^\s>]+)(?:(\s+)(.*?))?(>)',
|
| 304 |
+
bygroups(Name.Tag, Text, String, Name.Tag)),
|
| 305 |
+
(r'([a-z]\w*)(\s+)',
|
| 306 |
+
bygroups(Name.Builtin, Text), 'value'),
|
| 307 |
+
(r'\.+', Text),
|
| 308 |
+
],
|
| 309 |
+
'value': [
|
| 310 |
+
(r'\\\n', Text),
|
| 311 |
+
(r'$', Text, '#pop'),
|
| 312 |
+
(r'\\', Text),
|
| 313 |
+
(r'[^\S\n]+', Text),
|
| 314 |
+
(r'\d+\.\d+\.\d+\.\d+(?:/\d+)?', Number),
|
| 315 |
+
(r'\d+', Number),
|
| 316 |
+
(r'/([a-z0-9][\w./-]+)', String.Other),
|
| 317 |
+
(r'(on|off|none|any|all|double|email|dns|min|minimal|'
|
| 318 |
+
r'os|productonly|full|emerg|alert|crit|error|warn|'
|
| 319 |
+
r'notice|info|debug|registry|script|inetd|standalone|'
|
| 320 |
+
r'user|group)\b', Keyword),
|
| 321 |
+
(r'"([^"\\]*(?:\\.[^"\\]*)*)"', String.Double),
|
| 322 |
+
(r'[^\s"\\]+', Text)
|
| 323 |
+
],
|
| 324 |
+
}
|
| 325 |
+
|
| 326 |
+
|
| 327 |
+
class SquidConfLexer(RegexLexer):
|
| 328 |
+
"""
|
| 329 |
+
Lexer for `squid <http://www.squid-cache.org/>`_ configuration files.
|
| 330 |
+
|
| 331 |
+
.. versionadded:: 0.9
|
| 332 |
+
"""
|
| 333 |
+
|
| 334 |
+
name = 'SquidConf'
|
| 335 |
+
aliases = ['squidconf', 'squid.conf', 'squid']
|
| 336 |
+
filenames = ['squid.conf']
|
| 337 |
+
mimetypes = ['text/x-squidconf']
|
| 338 |
+
flags = re.IGNORECASE
|
| 339 |
+
|
| 340 |
+
keywords = (
|
| 341 |
+
"access_log", "acl", "always_direct", "announce_host",
|
| 342 |
+
"announce_period", "announce_port", "announce_to", "anonymize_headers",
|
| 343 |
+
"append_domain", "as_whois_server", "auth_param_basic",
|
| 344 |
+
"authenticate_children", "authenticate_program", "authenticate_ttl",
|
| 345 |
+
"broken_posts", "buffered_logs", "cache_access_log", "cache_announce",
|
| 346 |
+
"cache_dir", "cache_dns_program", "cache_effective_group",
|
| 347 |
+
"cache_effective_user", "cache_host", "cache_host_acl",
|
| 348 |
+
"cache_host_domain", "cache_log", "cache_mem", "cache_mem_high",
|
| 349 |
+
"cache_mem_low", "cache_mgr", "cachemgr_passwd", "cache_peer",
|
| 350 |
+
"cache_peer_access", "cahce_replacement_policy", "cache_stoplist",
|
| 351 |
+
"cache_stoplist_pattern", "cache_store_log", "cache_swap",
|
| 352 |
+
"cache_swap_high", "cache_swap_log", "cache_swap_low", "client_db",
|
| 353 |
+
"client_lifetime", "client_netmask", "connect_timeout", "coredump_dir",
|
| 354 |
+
"dead_peer_timeout", "debug_options", "delay_access", "delay_class",
|
| 355 |
+
"delay_initial_bucket_level", "delay_parameters", "delay_pools",
|
| 356 |
+
"deny_info", "dns_children", "dns_defnames", "dns_nameservers",
|
| 357 |
+
"dns_testnames", "emulate_httpd_log", "err_html_text",
|
| 358 |
+
"fake_user_agent", "firewall_ip", "forwarded_for", "forward_snmpd_port",
|
| 359 |
+
"fqdncache_size", "ftpget_options", "ftpget_program", "ftp_list_width",
|
| 360 |
+
"ftp_passive", "ftp_user", "half_closed_clients", "header_access",
|
| 361 |
+
"header_replace", "hierarchy_stoplist", "high_response_time_warning",
|
| 362 |
+
"high_page_fault_warning", "hosts_file", "htcp_port", "http_access",
|
| 363 |
+
"http_anonymizer", "httpd_accel", "httpd_accel_host",
|
| 364 |
+
"httpd_accel_port", "httpd_accel_uses_host_header",
|
| 365 |
+
"httpd_accel_with_proxy", "http_port", "http_reply_access",
|
| 366 |
+
"icp_access", "icp_hit_stale", "icp_port", "icp_query_timeout",
|
| 367 |
+
"ident_lookup", "ident_lookup_access", "ident_timeout",
|
| 368 |
+
"incoming_http_average", "incoming_icp_average", "inside_firewall",
|
| 369 |
+
"ipcache_high", "ipcache_low", "ipcache_size", "local_domain",
|
| 370 |
+
"local_ip", "logfile_rotate", "log_fqdn", "log_icp_queries",
|
| 371 |
+
"log_mime_hdrs", "maximum_object_size", "maximum_single_addr_tries",
|
| 372 |
+
"mcast_groups", "mcast_icp_query_timeout", "mcast_miss_addr",
|
| 373 |
+
"mcast_miss_encode_key", "mcast_miss_port", "memory_pools",
|
| 374 |
+
"memory_pools_limit", "memory_replacement_policy", "mime_table",
|
| 375 |
+
"min_http_poll_cnt", "min_icp_poll_cnt", "minimum_direct_hops",
|
| 376 |
+
"minimum_object_size", "minimum_retry_timeout", "miss_access",
|
| 377 |
+
"negative_dns_ttl", "negative_ttl", "neighbor_timeout",
|
| 378 |
+
"neighbor_type_domain", "netdb_high", "netdb_low", "netdb_ping_period",
|
| 379 |
+
"netdb_ping_rate", "never_direct", "no_cache", "passthrough_proxy",
|
| 380 |
+
"pconn_timeout", "pid_filename", "pinger_program", "positive_dns_ttl",
|
| 381 |
+
"prefer_direct", "proxy_auth", "proxy_auth_realm", "query_icmp",
|
| 382 |
+
"quick_abort", "quick_abort_max", "quick_abort_min",
|
| 383 |
+
"quick_abort_pct", "range_offset_limit", "read_timeout",
|
| 384 |
+
"redirect_children", "redirect_program",
|
| 385 |
+
"redirect_rewrites_host_header", "reference_age",
|
| 386 |
+
"refresh_pattern", "reload_into_ims", "request_body_max_size",
|
| 387 |
+
"request_size", "request_timeout", "shutdown_lifetime",
|
| 388 |
+
"single_parent_bypass", "siteselect_timeout", "snmp_access",
|
| 389 |
+
"snmp_incoming_address", "snmp_port", "source_ping", "ssl_proxy",
|
| 390 |
+
"store_avg_object_size", "store_objects_per_bucket",
|
| 391 |
+
"strip_query_terms", "swap_level1_dirs", "swap_level2_dirs",
|
| 392 |
+
"tcp_incoming_address", "tcp_outgoing_address", "tcp_recv_bufsize",
|
| 393 |
+
"test_reachability", "udp_hit_obj", "udp_hit_obj_size",
|
| 394 |
+
"udp_incoming_address", "udp_outgoing_address", "unique_hostname",
|
| 395 |
+
"unlinkd_program", "uri_whitespace", "useragent_log",
|
| 396 |
+
"visible_hostname", "wais_relay", "wais_relay_host", "wais_relay_port",
|
| 397 |
+
)
|
| 398 |
+
|
| 399 |
+
opts = (
|
| 400 |
+
"proxy-only", "weight", "ttl", "no-query", "default", "round-robin",
|
| 401 |
+
"multicast-responder", "on", "off", "all", "deny", "allow", "via",
|
| 402 |
+
"parent", "no-digest", "heap", "lru", "realm", "children", "q1", "q2",
|
| 403 |
+
"credentialsttl", "none", "disable", "offline_toggle", "diskd",
|
| 404 |
+
)
|
| 405 |
+
|
| 406 |
+
actions = (
|
| 407 |
+
"shutdown", "info", "parameter", "server_list", "client_list",
|
| 408 |
+
r'squid.conf',
|
| 409 |
+
)
|
| 410 |
+
|
| 411 |
+
actions_stats = (
|
| 412 |
+
"objects", "vm_objects", "utilization", "ipcache", "fqdncache", "dns",
|
| 413 |
+
"redirector", "io", "reply_headers", "filedescriptors", "netdb",
|
| 414 |
+
)
|
| 415 |
+
|
| 416 |
+
actions_log = ("status", "enable", "disable", "clear")
|
| 417 |
+
|
| 418 |
+
acls = (
|
| 419 |
+
"url_regex", "urlpath_regex", "referer_regex", "port", "proto",
|
| 420 |
+
"req_mime_type", "rep_mime_type", "method", "browser", "user", "src",
|
| 421 |
+
"dst", "time", "dstdomain", "ident", "snmp_community",
|
| 422 |
+
)
|
| 423 |
+
|
| 424 |
+
ip_re = (
|
| 425 |
+
r'(?:(?:(?:[3-9]\d?|2(?:5[0-5]|[0-4]?\d)?|1\d{0,2}|0x0*[0-9a-f]{1,2}|'
|
| 426 |
+
r'0+[1-3]?[0-7]{0,2})(?:\.(?:[3-9]\d?|2(?:5[0-5]|[0-4]?\d)?|1\d{0,2}|'
|
| 427 |
+
r'0x0*[0-9a-f]{1,2}|0+[1-3]?[0-7]{0,2})){3})|(?!.*::.*::)(?:(?!:)|'
|
| 428 |
+
r':(?=:))(?:[0-9a-f]{0,4}(?:(?<=::)|(?<!::):)){6}(?:[0-9a-f]{0,4}'
|
| 429 |
+
r'(?:(?<=::)|(?<!::):)[0-9a-f]{0,4}(?:(?<=::)|(?<!:)|(?<=:)(?<!::):)|'
|
| 430 |
+
r'(?:25[0-4]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-4]|2[0-4]\d|1\d\d|'
|
| 431 |
+
r'[1-9]?\d)){3}))'
|
| 432 |
+
)
|
| 433 |
+
|
| 434 |
+
tokens = {
|
| 435 |
+
'root': [
|
| 436 |
+
(r'\s+', Whitespace),
|
| 437 |
+
(r'#', Comment, 'comment'),
|
| 438 |
+
(words(keywords, prefix=r'\b', suffix=r'\b'), Keyword),
|
| 439 |
+
(words(opts, prefix=r'\b', suffix=r'\b'), Name.Constant),
|
| 440 |
+
# Actions
|
| 441 |
+
(words(actions, prefix=r'\b', suffix=r'\b'), String),
|
| 442 |
+
(words(actions_stats, prefix=r'stats/', suffix=r'\b'), String),
|
| 443 |
+
(words(actions_log, prefix=r'log/', suffix=r'='), String),
|
| 444 |
+
(words(acls, prefix=r'\b', suffix=r'\b'), Keyword),
|
| 445 |
+
(ip_re + r'(?:/(?:' + ip_re + r'|\b\d+\b))?', Number.Float),
|
| 446 |
+
(r'(?:\b\d+\b(?:-\b\d+|%)?)', Number),
|
| 447 |
+
(r'\S+', Text),
|
| 448 |
+
],
|
| 449 |
+
'comment': [
|
| 450 |
+
(r'\s*TAG:.*', String.Escape, '#pop'),
|
| 451 |
+
(r'.+', Comment, '#pop'),
|
| 452 |
+
default('#pop'),
|
| 453 |
+
],
|
| 454 |
+
}
|
| 455 |
+
|
| 456 |
+
|
| 457 |
+
class NginxConfLexer(RegexLexer):
|
| 458 |
+
"""
|
| 459 |
+
Lexer for `Nginx <http://nginx.net/>`_ configuration files.
|
| 460 |
+
|
| 461 |
+
.. versionadded:: 0.11
|
| 462 |
+
"""
|
| 463 |
+
name = 'Nginx configuration file'
|
| 464 |
+
aliases = ['nginx']
|
| 465 |
+
filenames = ['nginx.conf']
|
| 466 |
+
mimetypes = ['text/x-nginx-conf']
|
| 467 |
+
|
| 468 |
+
tokens = {
|
| 469 |
+
'root': [
|
| 470 |
+
(r'(include)(\s+)([^\s;]+)', bygroups(Keyword, Text, Name)),
|
| 471 |
+
(r'[^\s;#]+', Keyword, 'stmt'),
|
| 472 |
+
include('base'),
|
| 473 |
+
],
|
| 474 |
+
'block': [
|
| 475 |
+
(r'\}', Punctuation, '#pop:2'),
|
| 476 |
+
(r'[^\s;#]+', Keyword.Namespace, 'stmt'),
|
| 477 |
+
include('base'),
|
| 478 |
+
],
|
| 479 |
+
'stmt': [
|
| 480 |
+
(r'\{', Punctuation, 'block'),
|
| 481 |
+
(r';', Punctuation, '#pop'),
|
| 482 |
+
include('base'),
|
| 483 |
+
],
|
| 484 |
+
'base': [
|
| 485 |
+
(r'#.*\n', Comment.Single),
|
| 486 |
+
(r'on|off', Name.Constant),
|
| 487 |
+
(r'\$[^\s;#()]+', Name.Variable),
|
| 488 |
+
(r'([a-z0-9.-]+)(:)([0-9]+)',
|
| 489 |
+
bygroups(Name, Punctuation, Number.Integer)),
|
| 490 |
+
(r'[a-z-]+/[a-z-+]+', String), # mimetype
|
| 491 |
+
# (r'[a-zA-Z._-]+', Keyword),
|
| 492 |
+
(r'[0-9]+[km]?\b', Number.Integer),
|
| 493 |
+
(r'(~)(\s*)([^\s{]+)', bygroups(Punctuation, Text, String.Regex)),
|
| 494 |
+
(r'[:=~]', Punctuation),
|
| 495 |
+
(r'[^\s;#{}$]+', String), # catch all
|
| 496 |
+
(r'/[^\s;#]*', Name), # pathname
|
| 497 |
+
(r'\s+', Text),
|
| 498 |
+
(r'[$;]', Text), # leftover characters
|
| 499 |
+
],
|
| 500 |
+
}
|
| 501 |
+
|
| 502 |
+
|
| 503 |
+
class LighttpdConfLexer(RegexLexer):
|
| 504 |
+
"""
|
| 505 |
+
Lexer for `Lighttpd <http://lighttpd.net/>`_ configuration files.
|
| 506 |
+
|
| 507 |
+
.. versionadded:: 0.11
|
| 508 |
+
"""
|
| 509 |
+
name = 'Lighttpd configuration file'
|
| 510 |
+
aliases = ['lighty', 'lighttpd']
|
| 511 |
+
filenames = []
|
| 512 |
+
mimetypes = ['text/x-lighttpd-conf']
|
| 513 |
+
|
| 514 |
+
tokens = {
|
| 515 |
+
'root': [
|
| 516 |
+
(r'#.*\n', Comment.Single),
|
| 517 |
+
(r'/\S*', Name), # pathname
|
| 518 |
+
(r'[a-zA-Z._-]+', Keyword),
|
| 519 |
+
(r'\d+\.\d+\.\d+\.\d+(?:/\d+)?', Number),
|
| 520 |
+
(r'[0-9]+', Number),
|
| 521 |
+
(r'=>|=~|\+=|==|=|\+', Operator),
|
| 522 |
+
(r'\$[A-Z]+', Name.Builtin),
|
| 523 |
+
(r'[(){}\[\],]', Punctuation),
|
| 524 |
+
(r'"([^"\\]*(?:\\.[^"\\]*)*)"', String.Double),
|
| 525 |
+
(r'\s+', Text),
|
| 526 |
+
],
|
| 527 |
+
|
| 528 |
+
}
|
| 529 |
+
|
| 530 |
+
|
| 531 |
+
class DockerLexer(RegexLexer):
|
| 532 |
+
"""
|
| 533 |
+
Lexer for `Docker <http://docker.io>`_ configuration files.
|
| 534 |
+
|
| 535 |
+
.. versionadded:: 2.0
|
| 536 |
+
"""
|
| 537 |
+
name = 'Docker'
|
| 538 |
+
aliases = ['docker', 'dockerfile']
|
| 539 |
+
filenames = ['Dockerfile', '*.docker']
|
| 540 |
+
mimetypes = ['text/x-dockerfile-config']
|
| 541 |
+
|
| 542 |
+
_keywords = (r'(?:FROM|MAINTAINER|CMD|EXPOSE|ENV|ADD|ENTRYPOINT|'
|
| 543 |
+
r'VOLUME|WORKDIR)')
|
| 544 |
+
|
| 545 |
+
flags = re.IGNORECASE | re.MULTILINE
|
| 546 |
+
|
| 547 |
+
tokens = {
|
| 548 |
+
'root': [
|
| 549 |
+
(r'^(ONBUILD)(\s+)(%s)\b' % (_keywords,),
|
| 550 |
+
bygroups(Name.Keyword, Whitespace, Keyword)),
|
| 551 |
+
(r'^(%s)\b(.*)' % (_keywords,), bygroups(Keyword, String)),
|
| 552 |
+
(r'#.*', Comment),
|
| 553 |
+
(r'RUN', Keyword), # Rest of line falls through
|
| 554 |
+
(r'(.*\\\n)*.+', using(BashLexer)),
|
| 555 |
+
],
|
| 556 |
+
}
|
| 557 |
+
|
| 558 |
+
|
| 559 |
+
class TerraformLexer(RegexLexer):
|
| 560 |
+
"""
|
| 561 |
+
Lexer for `terraformi .tf files <https://www.terraform.io/>`_.
|
| 562 |
+
|
| 563 |
+
.. versionadded:: 2.1
|
| 564 |
+
"""
|
| 565 |
+
|
| 566 |
+
name = 'Terraform'
|
| 567 |
+
aliases = ['terraform', 'tf']
|
| 568 |
+
filenames = ['*.tf']
|
| 569 |
+
mimetypes = ['application/x-tf', 'application/x-terraform']
|
| 570 |
+
|
| 571 |
+
tokens = {
|
| 572 |
+
'root': [
|
| 573 |
+
include('string'),
|
| 574 |
+
include('punctuation'),
|
| 575 |
+
include('curly'),
|
| 576 |
+
include('basic'),
|
| 577 |
+
include('whitespace'),
|
| 578 |
+
(r'[0-9]+', Number),
|
| 579 |
+
],
|
| 580 |
+
'basic': [
|
| 581 |
+
(words(('true', 'false'), prefix=r'\b', suffix=r'\b'), Keyword.Type),
|
| 582 |
+
(r'\s*/\*', Comment.Multiline, 'comment'),
|
| 583 |
+
(r'\s*#.*\n', Comment.Single),
|
| 584 |
+
(r'(.*?)(\s*)(=)', bygroups(Name.Attribute, Text, Operator)),
|
| 585 |
+
(words(('variable', 'resource', 'provider', 'provisioner', 'module'),
|
| 586 |
+
prefix=r'\b', suffix=r'\b'), Keyword.Reserved, 'function'),
|
| 587 |
+
(words(('ingress', 'egress', 'listener', 'default', 'connection'),
|
| 588 |
+
prefix=r'\b', suffix=r'\b'), Keyword.Declaration),
|
| 589 |
+
('\$\{', String.Interpol, 'var_builtin'),
|
| 590 |
+
],
|
| 591 |
+
'function': [
|
| 592 |
+
(r'(\s+)(".*")(\s+)', bygroups(Text, String, Text)),
|
| 593 |
+
include('punctuation'),
|
| 594 |
+
include('curly'),
|
| 595 |
+
],
|
| 596 |
+
'var_builtin': [
|
| 597 |
+
(r'\$\{', String.Interpol, '#push'),
|
| 598 |
+
(words(('concat', 'file', 'join', 'lookup', 'element'),
|
| 599 |
+
prefix=r'\b', suffix=r'\b'), Name.Builtin),
|
| 600 |
+
include('string'),
|
| 601 |
+
include('punctuation'),
|
| 602 |
+
(r'\s+', Text),
|
| 603 |
+
(r'\}', String.Interpol, '#pop'),
|
| 604 |
+
],
|
| 605 |
+
'string': [
|
| 606 |
+
(r'(".*")', bygroups(String.Double)),
|
| 607 |
+
],
|
| 608 |
+
'punctuation': [
|
| 609 |
+
(r'[\[\](),.]', Punctuation),
|
| 610 |
+
],
|
| 611 |
+
# Keep this seperate from punctuation - we sometimes want to use different
|
| 612 |
+
# Tokens for { }
|
| 613 |
+
'curly': [
|
| 614 |
+
(r'\{', Text.Punctuation),
|
| 615 |
+
(r'\}', Text.Punctuation),
|
| 616 |
+
],
|
| 617 |
+
'comment': [
|
| 618 |
+
(r'[^*/]', Comment.Multiline),
|
| 619 |
+
(r'/\*', Comment.Multiline, '#push'),
|
| 620 |
+
(r'\*/', Comment.Multiline, '#pop'),
|
| 621 |
+
(r'[*/]', Comment.Multiline)
|
| 622 |
+
],
|
| 623 |
+
'whitespace': [
|
| 624 |
+
(r'\n', Text),
|
| 625 |
+
(r'\s+', Text),
|
| 626 |
+
(r'\\\n', Text),
|
| 627 |
+
],
|
| 628 |
+
}
|
| 629 |
+
|
| 630 |
+
|
| 631 |
+
class TermcapLexer(RegexLexer):
|
| 632 |
+
"""
|
| 633 |
+
Lexer for termcap database source.
|
| 634 |
+
|
| 635 |
+
This is very simple and minimal.
|
| 636 |
+
|
| 637 |
+
.. versionadded:: 2.1
|
| 638 |
+
"""
|
| 639 |
+
name = 'Termcap'
|
| 640 |
+
aliases = ['termcap']
|
| 641 |
+
filenames = ['termcap', 'termcap.src']
|
| 642 |
+
mimetypes = []
|
| 643 |
+
|
| 644 |
+
# NOTE:
|
| 645 |
+
# * multiline with trailing backslash
|
| 646 |
+
# * separator is ':'
|
| 647 |
+
# * to embed colon as data, we must use \072
|
| 648 |
+
# * space after separator is not allowed (mayve)
|
| 649 |
+
tokens = {
|
| 650 |
+
'root': [
|
| 651 |
+
(r'^#.*$', Comment),
|
| 652 |
+
(r'^[^\s#:|]+', Name.Tag, 'names'),
|
| 653 |
+
],
|
| 654 |
+
'names': [
|
| 655 |
+
(r'\n', Text, '#pop'),
|
| 656 |
+
(r':', Punctuation, 'defs'),
|
| 657 |
+
(r'\|', Punctuation),
|
| 658 |
+
(r'[^:|]+', Name.Attribute),
|
| 659 |
+
],
|
| 660 |
+
'defs': [
|
| 661 |
+
(r'\\\n[ \t]*', Text),
|
| 662 |
+
(r'\n[ \t]*', Text, '#pop:2'),
|
| 663 |
+
(r'(#)([0-9]+)', bygroups(Operator, Number)),
|
| 664 |
+
(r'=', Operator, 'data'),
|
| 665 |
+
(r':', Punctuation),
|
| 666 |
+
(r'[^\s:=#]+', Name.Class),
|
| 667 |
+
],
|
| 668 |
+
'data': [
|
| 669 |
+
(r'\\072', Literal),
|
| 670 |
+
(r':', Punctuation, '#pop'),
|
| 671 |
+
(r'[^:\\]+', Literal), # for performance
|
| 672 |
+
(r'.', Literal),
|
| 673 |
+
],
|
| 674 |
+
}
|
| 675 |
+
|
| 676 |
+
|
| 677 |
+
class TerminfoLexer(RegexLexer):
|
| 678 |
+
"""
|
| 679 |
+
Lexer for terminfo database source.
|
| 680 |
+
|
| 681 |
+
This is very simple and minimal.
|
| 682 |
+
|
| 683 |
+
.. versionadded:: 2.1
|
| 684 |
+
"""
|
| 685 |
+
name = 'Terminfo'
|
| 686 |
+
aliases = ['terminfo']
|
| 687 |
+
filenames = ['terminfo', 'terminfo.src']
|
| 688 |
+
mimetypes = []
|
| 689 |
+
|
| 690 |
+
# NOTE:
|
| 691 |
+
# * multiline with leading whitespace
|
| 692 |
+
# * separator is ','
|
| 693 |
+
# * to embed comma as data, we can use \,
|
| 694 |
+
# * space after separator is allowed
|
| 695 |
+
tokens = {
|
| 696 |
+
'root': [
|
| 697 |
+
(r'^#.*$', Comment),
|
| 698 |
+
(r'^[^\s#,|]+', Name.Tag, 'names'),
|
| 699 |
+
],
|
| 700 |
+
'names': [
|
| 701 |
+
(r'\n', Text, '#pop'),
|
| 702 |
+
(r'(,)([ \t]*)', bygroups(Punctuation, Text), 'defs'),
|
| 703 |
+
(r'\|', Punctuation),
|
| 704 |
+
(r'[^,|]+', Name.Attribute),
|
| 705 |
+
],
|
| 706 |
+
'defs': [
|
| 707 |
+
(r'\n[ \t]+', Text),
|
| 708 |
+
(r'\n', Text, '#pop:2'),
|
| 709 |
+
(r'(#)([0-9]+)', bygroups(Operator, Number)),
|
| 710 |
+
(r'=', Operator, 'data'),
|
| 711 |
+
(r'(,)([ \t]*)', bygroups(Punctuation, Text)),
|
| 712 |
+
(r'[^\s,=#]+', Name.Class),
|
| 713 |
+
],
|
| 714 |
+
'data': [
|
| 715 |
+
(r'\\[,\\]', Literal),
|
| 716 |
+
(r'(,)([ \t]*)', bygroups(Punctuation, Text), '#pop'),
|
| 717 |
+
(r'[^\\,]+', Literal), # for performance
|
| 718 |
+
(r'.', Literal),
|
| 719 |
+
],
|
| 720 |
+
}
|
| 721 |
+
|
| 722 |
+
|
| 723 |
+
class PkgConfigLexer(RegexLexer):
|
| 724 |
+
"""
|
| 725 |
+
Lexer for `pkg-config
|
| 726 |
+
<http://www.freedesktop.org/wiki/Software/pkg-config/>`_
|
| 727 |
+
(see also `manual page <http://linux.die.net/man/1/pkg-config>`_).
|
| 728 |
+
|
| 729 |
+
.. versionadded:: 2.1
|
| 730 |
+
"""
|
| 731 |
+
|
| 732 |
+
name = 'PkgConfig'
|
| 733 |
+
aliases = ['pkgconfig']
|
| 734 |
+
filenames = ['*.pc']
|
| 735 |
+
mimetypes = []
|
| 736 |
+
|
| 737 |
+
tokens = {
|
| 738 |
+
'root': [
|
| 739 |
+
(r'#.*$', Comment.Single),
|
| 740 |
+
|
| 741 |
+
# variable definitions
|
| 742 |
+
(r'^(\w+)(=)', bygroups(Name.Attribute, Operator)),
|
| 743 |
+
|
| 744 |
+
# keyword lines
|
| 745 |
+
(r'^([\w.]+)(:)',
|
| 746 |
+
bygroups(Name.Tag, Punctuation), 'spvalue'),
|
| 747 |
+
|
| 748 |
+
# variable references
|
| 749 |
+
include('interp'),
|
| 750 |
+
|
| 751 |
+
# fallback
|
| 752 |
+
(r'[^${}#=:\n.]+', Text),
|
| 753 |
+
(r'.', Text),
|
| 754 |
+
],
|
| 755 |
+
'interp': [
|
| 756 |
+
# you can escape literal "$" as "$$"
|
| 757 |
+
(r'\$\$', Text),
|
| 758 |
+
|
| 759 |
+
# variable references
|
| 760 |
+
(r'\$\{', String.Interpol, 'curly'),
|
| 761 |
+
],
|
| 762 |
+
'curly': [
|
| 763 |
+
(r'\}', String.Interpol, '#pop'),
|
| 764 |
+
(r'\w+', Name.Attribute),
|
| 765 |
+
],
|
| 766 |
+
'spvalue': [
|
| 767 |
+
include('interp'),
|
| 768 |
+
|
| 769 |
+
(r'#.*$', Comment.Single, '#pop'),
|
| 770 |
+
(r'\n', Text, '#pop'),
|
| 771 |
+
|
| 772 |
+
# fallback
|
| 773 |
+
(r'[^${}#\n]+', Text),
|
| 774 |
+
(r'.', Text),
|
| 775 |
+
],
|
| 776 |
+
}
|
| 777 |
+
|
| 778 |
+
|
| 779 |
+
class PacmanConfLexer(RegexLexer):
|
| 780 |
+
"""
|
| 781 |
+
Lexer for `pacman.conf
|
| 782 |
+
<https://www.archlinux.org/pacman/pacman.conf.5.html>`_.
|
| 783 |
+
|
| 784 |
+
Actually, IniLexer works almost fine for this format,
|
| 785 |
+
but it yield error token. It is because pacman.conf has
|
| 786 |
+
a form without assignment like:
|
| 787 |
+
|
| 788 |
+
UseSyslog
|
| 789 |
+
Color
|
| 790 |
+
TotalDownload
|
| 791 |
+
CheckSpace
|
| 792 |
+
VerbosePkgLists
|
| 793 |
+
|
| 794 |
+
These are flags to switch on.
|
| 795 |
+
|
| 796 |
+
.. versionadded:: 2.1
|
| 797 |
+
"""
|
| 798 |
+
|
| 799 |
+
name = 'PacmanConf'
|
| 800 |
+
aliases = ['pacmanconf']
|
| 801 |
+
filenames = ['pacman.conf']
|
| 802 |
+
mimetypes = []
|
| 803 |
+
|
| 804 |
+
tokens = {
|
| 805 |
+
'root': [
|
| 806 |
+
# comment
|
| 807 |
+
(r'#.*$', Comment.Single),
|
| 808 |
+
|
| 809 |
+
# section header
|
| 810 |
+
(r'^\s*\[.*?\]\s*$', Keyword),
|
| 811 |
+
|
| 812 |
+
# variable definitions
|
| 813 |
+
# (Leading space is allowed...)
|
| 814 |
+
(r'(\w+)(\s*)(=)',
|
| 815 |
+
bygroups(Name.Attribute, Text, Operator)),
|
| 816 |
+
|
| 817 |
+
# flags to on
|
| 818 |
+
(r'^(\s*)(\w+)(\s*)$',
|
| 819 |
+
bygroups(Text, Name.Attribute, Text)),
|
| 820 |
+
|
| 821 |
+
# built-in special values
|
| 822 |
+
(words((
|
| 823 |
+
'$repo', # repository
|
| 824 |
+
'$arch', # architecture
|
| 825 |
+
'%o', # outfile
|
| 826 |
+
'%u', # url
|
| 827 |
+
), suffix=r'\b'),
|
| 828 |
+
Name.Variable),
|
| 829 |
+
|
| 830 |
+
# fallback
|
| 831 |
+
(r'.', Text),
|
| 832 |
+
],
|
| 833 |
+
}
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/crystal.py
ADDED
|
@@ -0,0 +1,393 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.crystal
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexer for Crystal.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
import re
|
| 13 |
+
|
| 14 |
+
from pygments.lexer import ExtendedRegexLexer, include, \
|
| 15 |
+
bygroups, default, LexerContext, words
|
| 16 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 17 |
+
Number, Punctuation, Error
|
| 18 |
+
|
| 19 |
+
__all__ = ['CrystalLexer']
|
| 20 |
+
|
| 21 |
+
line_re = re.compile('.*?\n')
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
CRYSTAL_OPERATORS = [
|
| 25 |
+
'!=', '!~', '!', '%', '&&', '&', '**', '*', '+', '-', '/', '<=>', '<<', '<=', '<',
|
| 26 |
+
'===', '==', '=~', '=', '>=', '>>', '>', '[]=', '[]?', '[]', '^', '||', '|', '~'
|
| 27 |
+
]
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
class CrystalLexer(ExtendedRegexLexer):
|
| 31 |
+
"""
|
| 32 |
+
For `Crystal <http://crystal-lang.org>`_ source code.
|
| 33 |
+
|
| 34 |
+
.. versionadded:: 2.2
|
| 35 |
+
"""
|
| 36 |
+
|
| 37 |
+
name = 'Crystal'
|
| 38 |
+
aliases = ['cr', 'crystal']
|
| 39 |
+
filenames = ['*.cr']
|
| 40 |
+
mimetypes = ['text/x-crystal']
|
| 41 |
+
|
| 42 |
+
flags = re.DOTALL | re.MULTILINE
|
| 43 |
+
|
| 44 |
+
def heredoc_callback(self, match, ctx):
|
| 45 |
+
# okay, this is the hardest part of parsing Crystal...
|
| 46 |
+
# match: 1 = <<-?, 2 = quote? 3 = name 4 = quote? 5 = rest of line
|
| 47 |
+
|
| 48 |
+
start = match.start(1)
|
| 49 |
+
yield start, Operator, match.group(1) # <<-?
|
| 50 |
+
yield match.start(2), String.Heredoc, match.group(2) # quote ", ', `
|
| 51 |
+
yield match.start(3), String.Delimiter, match.group(3) # heredoc name
|
| 52 |
+
yield match.start(4), String.Heredoc, match.group(4) # quote again
|
| 53 |
+
|
| 54 |
+
heredocstack = ctx.__dict__.setdefault('heredocstack', [])
|
| 55 |
+
outermost = not bool(heredocstack)
|
| 56 |
+
heredocstack.append((match.group(1) == '<<-', match.group(3)))
|
| 57 |
+
|
| 58 |
+
ctx.pos = match.start(5)
|
| 59 |
+
ctx.end = match.end(5)
|
| 60 |
+
# this may find other heredocs
|
| 61 |
+
for i, t, v in self.get_tokens_unprocessed(context=ctx):
|
| 62 |
+
yield i, t, v
|
| 63 |
+
ctx.pos = match.end()
|
| 64 |
+
|
| 65 |
+
if outermost:
|
| 66 |
+
# this is the outer heredoc again, now we can process them all
|
| 67 |
+
for tolerant, hdname in heredocstack:
|
| 68 |
+
lines = []
|
| 69 |
+
for match in line_re.finditer(ctx.text, ctx.pos):
|
| 70 |
+
if tolerant:
|
| 71 |
+
check = match.group().strip()
|
| 72 |
+
else:
|
| 73 |
+
check = match.group().rstrip()
|
| 74 |
+
if check == hdname:
|
| 75 |
+
for amatch in lines:
|
| 76 |
+
yield amatch.start(), String.Heredoc, amatch.group()
|
| 77 |
+
yield match.start(), String.Delimiter, match.group()
|
| 78 |
+
ctx.pos = match.end()
|
| 79 |
+
break
|
| 80 |
+
else:
|
| 81 |
+
lines.append(match)
|
| 82 |
+
else:
|
| 83 |
+
# end of heredoc not found -- error!
|
| 84 |
+
for amatch in lines:
|
| 85 |
+
yield amatch.start(), Error, amatch.group()
|
| 86 |
+
ctx.end = len(ctx.text)
|
| 87 |
+
del heredocstack[:]
|
| 88 |
+
|
| 89 |
+
def gen_crystalstrings_rules():
|
| 90 |
+
def intp_regex_callback(self, match, ctx):
|
| 91 |
+
yield match.start(1), String.Regex, match.group(1) # begin
|
| 92 |
+
nctx = LexerContext(match.group(3), 0, ['interpolated-regex'])
|
| 93 |
+
for i, t, v in self.get_tokens_unprocessed(context=nctx):
|
| 94 |
+
yield match.start(3)+i, t, v
|
| 95 |
+
yield match.start(4), String.Regex, match.group(4) # end[imsx]*
|
| 96 |
+
ctx.pos = match.end()
|
| 97 |
+
|
| 98 |
+
def intp_string_callback(self, match, ctx):
|
| 99 |
+
yield match.start(1), String.Other, match.group(1)
|
| 100 |
+
nctx = LexerContext(match.group(3), 0, ['interpolated-string'])
|
| 101 |
+
for i, t, v in self.get_tokens_unprocessed(context=nctx):
|
| 102 |
+
yield match.start(3)+i, t, v
|
| 103 |
+
yield match.start(4), String.Other, match.group(4) # end
|
| 104 |
+
ctx.pos = match.end()
|
| 105 |
+
|
| 106 |
+
states = {}
|
| 107 |
+
states['strings'] = [
|
| 108 |
+
(r'\:@{0,2}[a-zA-Z_]\w*[!?]?', String.Symbol),
|
| 109 |
+
(words(CRYSTAL_OPERATORS, prefix=r'\:@{0,2}'), String.Symbol),
|
| 110 |
+
(r":'(\\\\|\\'|[^'])*'", String.Symbol),
|
| 111 |
+
# This allows arbitrary text after '\ for simplicity
|
| 112 |
+
(r"'(\\\\|\\'|[^']|\\[^'\\]+)'", String.Char),
|
| 113 |
+
(r':"', String.Symbol, 'simple-sym'),
|
| 114 |
+
# Crystal doesn't have "symbol:"s but this simplifies function args
|
| 115 |
+
(r'([a-zA-Z_]\w*)(:)(?!:)', bygroups(String.Symbol, Punctuation)),
|
| 116 |
+
(r'"', String.Double, 'simple-string'),
|
| 117 |
+
(r'(?<!\.)`', String.Backtick, 'simple-backtick'),
|
| 118 |
+
]
|
| 119 |
+
|
| 120 |
+
# double-quoted string and symbol
|
| 121 |
+
for name, ttype, end in ('string', String.Double, '"'), \
|
| 122 |
+
('sym', String.Symbol, '"'), \
|
| 123 |
+
('backtick', String.Backtick, '`'):
|
| 124 |
+
states['simple-'+name] = [
|
| 125 |
+
include('string-escaped' if name == 'sym' else 'string-intp-escaped'),
|
| 126 |
+
(r'[^\\%s#]+' % end, ttype),
|
| 127 |
+
(r'[\\#]', ttype),
|
| 128 |
+
(end, ttype, '#pop'),
|
| 129 |
+
]
|
| 130 |
+
|
| 131 |
+
# braced quoted strings
|
| 132 |
+
for lbrace, rbrace, bracecc, name in \
|
| 133 |
+
('\\{', '\\}', '{}', 'cb'), \
|
| 134 |
+
('\\[', '\\]', '\\[\\]', 'sb'), \
|
| 135 |
+
('\\(', '\\)', '()', 'pa'), \
|
| 136 |
+
('<', '>', '<>', 'ab'):
|
| 137 |
+
states[name+'-intp-string'] = [
|
| 138 |
+
(r'\\[' + lbrace + ']', String.Other),
|
| 139 |
+
(lbrace, String.Other, '#push'),
|
| 140 |
+
(rbrace, String.Other, '#pop'),
|
| 141 |
+
include('string-intp-escaped'),
|
| 142 |
+
(r'[\\#' + bracecc + ']', String.Other),
|
| 143 |
+
(r'[^\\#' + bracecc + ']+', String.Other),
|
| 144 |
+
]
|
| 145 |
+
states['strings'].append((r'%' + lbrace, String.Other,
|
| 146 |
+
name+'-intp-string'))
|
| 147 |
+
states[name+'-string'] = [
|
| 148 |
+
(r'\\[\\' + bracecc + ']', String.Other),
|
| 149 |
+
(lbrace, String.Other, '#push'),
|
| 150 |
+
(rbrace, String.Other, '#pop'),
|
| 151 |
+
(r'[\\#' + bracecc + ']', String.Other),
|
| 152 |
+
(r'[^\\#' + bracecc + ']+', String.Other),
|
| 153 |
+
]
|
| 154 |
+
# http://crystal-lang.org/docs/syntax_and_semantics/literals/array.html
|
| 155 |
+
states['strings'].append((r'%[wi]' + lbrace, String.Other,
|
| 156 |
+
name+'-string'))
|
| 157 |
+
states[name+'-regex'] = [
|
| 158 |
+
(r'\\[\\' + bracecc + ']', String.Regex),
|
| 159 |
+
(lbrace, String.Regex, '#push'),
|
| 160 |
+
(rbrace + '[imsx]*', String.Regex, '#pop'),
|
| 161 |
+
include('string-intp'),
|
| 162 |
+
(r'[\\#' + bracecc + ']', String.Regex),
|
| 163 |
+
(r'[^\\#' + bracecc + ']+', String.Regex),
|
| 164 |
+
]
|
| 165 |
+
states['strings'].append((r'%r' + lbrace, String.Regex,
|
| 166 |
+
name+'-regex'))
|
| 167 |
+
|
| 168 |
+
# these must come after %<brace>!
|
| 169 |
+
states['strings'] += [
|
| 170 |
+
# %r regex
|
| 171 |
+
(r'(%r([\W_]))((?:\\\2|(?!\2).)*)(\2[imsx]*)',
|
| 172 |
+
intp_regex_callback),
|
| 173 |
+
# regular fancy strings with qsw
|
| 174 |
+
(r'(%[wi]([\W_]))((?:\\\2|(?!\2).)*)(\2)',
|
| 175 |
+
intp_string_callback),
|
| 176 |
+
# special forms of fancy strings after operators or
|
| 177 |
+
# in method calls with braces
|
| 178 |
+
(r'(?<=[-+/*%=<>&!^|~,(])(\s*)(%([\t ])(?:(?:\\\3|(?!\3).)*)\3)',
|
| 179 |
+
bygroups(Text, String.Other, None)),
|
| 180 |
+
# and because of fixed width lookbehinds the whole thing a
|
| 181 |
+
# second time for line startings...
|
| 182 |
+
(r'^(\s*)(%([\t ])(?:(?:\\\3|(?!\3).)*)\3)',
|
| 183 |
+
bygroups(Text, String.Other, None)),
|
| 184 |
+
# all regular fancy strings without qsw
|
| 185 |
+
(r'(%([\[{(<]))((?:\\\2|(?!\2).)*)(\2)',
|
| 186 |
+
intp_string_callback),
|
| 187 |
+
]
|
| 188 |
+
|
| 189 |
+
return states
|
| 190 |
+
|
| 191 |
+
tokens = {
|
| 192 |
+
'root': [
|
| 193 |
+
(r'#.*?$', Comment.Single),
|
| 194 |
+
# keywords
|
| 195 |
+
(words('''
|
| 196 |
+
abstract asm as begin break case do else elsif end ensure extend ifdef if
|
| 197 |
+
include instance_sizeof next of pointerof private protected rescue return
|
| 198 |
+
require sizeof super then typeof unless until when while with yield
|
| 199 |
+
'''.split(), suffix=r'\b'), Keyword),
|
| 200 |
+
(words(['true', 'false', 'nil'], suffix=r'\b'), Keyword.Constant),
|
| 201 |
+
# start of function, class and module names
|
| 202 |
+
(r'(module|lib)(\s+)([a-zA-Z_]\w*(?:::[a-zA-Z_]\w*)*)',
|
| 203 |
+
bygroups(Keyword, Text, Name.Namespace)),
|
| 204 |
+
(r'(def|fun|macro)(\s+)((?:[a-zA-Z_]\w*::)*)',
|
| 205 |
+
bygroups(Keyword, Text, Name.Namespace), 'funcname'),
|
| 206 |
+
(r'def(?=[*%&^`~+-/\[<>=])', Keyword, 'funcname'),
|
| 207 |
+
(r'(class|struct|union|type|alias|enum)(\s+)((?:[a-zA-Z_]\w*::)*)',
|
| 208 |
+
bygroups(Keyword, Text, Name.Namespace), 'classname'),
|
| 209 |
+
(r'(self|out|uninitialized)\b|(is_a|responds_to)\?', Keyword.Pseudo),
|
| 210 |
+
# macros
|
| 211 |
+
(words('''
|
| 212 |
+
debugger record pp assert_responds_to spawn parallel
|
| 213 |
+
getter setter property delegate def_hash def_equals def_equals_and_hash
|
| 214 |
+
forward_missing_to
|
| 215 |
+
'''.split(), suffix=r'\b'), Name.Builtin.Pseudo),
|
| 216 |
+
(r'getter[!?]|property[!?]|__(DIR|FILE|LINE)__\b', Name.Builtin.Pseudo),
|
| 217 |
+
# builtins
|
| 218 |
+
# http://crystal-lang.org/api/toplevel.html
|
| 219 |
+
(words('''
|
| 220 |
+
Object Value Struct Reference Proc Class Nil Symbol Enum Void
|
| 221 |
+
Bool Number Int Int8 Int16 Int32 Int64 UInt8 UInt16 UInt32 UInt64
|
| 222 |
+
Float Float32 Float64 Char String
|
| 223 |
+
Pointer Slice Range Exception Regex
|
| 224 |
+
Mutex StaticArray Array Hash Set Tuple Deque Box Process File
|
| 225 |
+
Dir Time Channel Concurrent Scheduler
|
| 226 |
+
abort at_exit caller delay exit fork future get_stack_top gets
|
| 227 |
+
lazy loop main p print printf puts
|
| 228 |
+
raise rand read_line sleep sprintf system with_color
|
| 229 |
+
'''.split(), prefix=r'(?<!\.)', suffix=r'\b'), Name.Builtin),
|
| 230 |
+
# normal heredocs
|
| 231 |
+
(r'(?<!\w)(<<-?)(["`\']?)([a-zA-Z_]\w*)(\2)(.*?\n)',
|
| 232 |
+
heredoc_callback),
|
| 233 |
+
# empty string heredocs
|
| 234 |
+
(r'(<<-?)("|\')()(\2)(.*?\n)', heredoc_callback),
|
| 235 |
+
(r'__END__', Comment.Preproc, 'end-part'),
|
| 236 |
+
# multiline regex (after keywords or assignments)
|
| 237 |
+
(r'(?:^|(?<=[=<>~!:])|'
|
| 238 |
+
r'(?<=(?:\s|;)when\s)|'
|
| 239 |
+
r'(?<=(?:\s|;)or\s)|'
|
| 240 |
+
r'(?<=(?:\s|;)and\s)|'
|
| 241 |
+
r'(?<=\.index\s)|'
|
| 242 |
+
r'(?<=\.scan\s)|'
|
| 243 |
+
r'(?<=\.sub\s)|'
|
| 244 |
+
r'(?<=\.sub!\s)|'
|
| 245 |
+
r'(?<=\.gsub\s)|'
|
| 246 |
+
r'(?<=\.gsub!\s)|'
|
| 247 |
+
r'(?<=\.match\s)|'
|
| 248 |
+
r'(?<=(?:\s|;)if\s)|'
|
| 249 |
+
r'(?<=(?:\s|;)elsif\s)|'
|
| 250 |
+
r'(?<=^when\s)|'
|
| 251 |
+
r'(?<=^index\s)|'
|
| 252 |
+
r'(?<=^scan\s)|'
|
| 253 |
+
r'(?<=^sub\s)|'
|
| 254 |
+
r'(?<=^gsub\s)|'
|
| 255 |
+
r'(?<=^sub!\s)|'
|
| 256 |
+
r'(?<=^gsub!\s)|'
|
| 257 |
+
r'(?<=^match\s)|'
|
| 258 |
+
r'(?<=^if\s)|'
|
| 259 |
+
r'(?<=^elsif\s)'
|
| 260 |
+
r')(\s*)(/)', bygroups(Text, String.Regex), 'multiline-regex'),
|
| 261 |
+
# multiline regex (in method calls or subscripts)
|
| 262 |
+
(r'(?<=\(|,|\[)/', String.Regex, 'multiline-regex'),
|
| 263 |
+
# multiline regex (this time the funny no whitespace rule)
|
| 264 |
+
(r'(\s+)(/)(?![\s=])', bygroups(Text, String.Regex),
|
| 265 |
+
'multiline-regex'),
|
| 266 |
+
# lex numbers and ignore following regular expressions which
|
| 267 |
+
# are division operators in fact (grrrr. i hate that. any
|
| 268 |
+
# better ideas?)
|
| 269 |
+
# since pygments 0.7 we also eat a "?" operator after numbers
|
| 270 |
+
# so that the char operator does not work. Chars are not allowed
|
| 271 |
+
# there so that you can use the ternary operator.
|
| 272 |
+
# stupid example:
|
| 273 |
+
# x>=0?n[x]:""
|
| 274 |
+
(r'(0o[0-7]+(?:_[0-7]+)*(?:_?[iu][0-9]+)?)\b(\s*)([/?])?',
|
| 275 |
+
bygroups(Number.Oct, Text, Operator)),
|
| 276 |
+
(r'(0x[0-9A-Fa-f]+(?:_[0-9A-Fa-f]+)*(?:_?[iu][0-9]+)?)\b(\s*)([/?])?',
|
| 277 |
+
bygroups(Number.Hex, Text, Operator)),
|
| 278 |
+
(r'(0b[01]+(?:_[01]+)*(?:_?[iu][0-9]+)?)\b(\s*)([/?])?',
|
| 279 |
+
bygroups(Number.Bin, Text, Operator)),
|
| 280 |
+
# 3 separate expressions for floats because any of the 3 optional
|
| 281 |
+
# parts makes it a float
|
| 282 |
+
(r'((?:0(?![0-9])|[1-9][\d_]*)(?:\.\d[\d_]*)(?:e[+-]?[0-9]+)?'
|
| 283 |
+
r'(?:_?f[0-9]+)?)(\s*)([/?])?',
|
| 284 |
+
bygroups(Number.Float, Text, Operator)),
|
| 285 |
+
(r'((?:0(?![0-9])|[1-9][\d_]*)(?:\.\d[\d_]*)?(?:e[+-]?[0-9]+)'
|
| 286 |
+
r'(?:_?f[0-9]+)?)(\s*)([/?])?',
|
| 287 |
+
bygroups(Number.Float, Text, Operator)),
|
| 288 |
+
(r'((?:0(?![0-9])|[1-9][\d_]*)(?:\.\d[\d_]*)?(?:e[+-]?[0-9]+)?'
|
| 289 |
+
r'(?:_?f[0-9]+))(\s*)([/?])?',
|
| 290 |
+
bygroups(Number.Float, Text, Operator)),
|
| 291 |
+
(r'(0\b|[1-9][\d]*(?:_\d+)*(?:_?[iu][0-9]+)?)\b(\s*)([/?])?',
|
| 292 |
+
bygroups(Number.Integer, Text, Operator)),
|
| 293 |
+
# Names
|
| 294 |
+
(r'@@[a-zA-Z_]\w*', Name.Variable.Class),
|
| 295 |
+
(r'@[a-zA-Z_]\w*', Name.Variable.Instance),
|
| 296 |
+
(r'\$\w+', Name.Variable.Global),
|
| 297 |
+
(r'\$[!@&`\'+~=/\\,;.<>_*$?:"^-]', Name.Variable.Global),
|
| 298 |
+
(r'\$-[0adFiIlpvw]', Name.Variable.Global),
|
| 299 |
+
(r'::', Operator),
|
| 300 |
+
include('strings'),
|
| 301 |
+
# chars
|
| 302 |
+
(r'\?(\\[MC]-)*' # modifiers
|
| 303 |
+
r'(\\([\\befnrtv#"\']|x[a-fA-F0-9]{1,2}|[0-7]{1,3})|\S)'
|
| 304 |
+
r'(?!\w)',
|
| 305 |
+
String.Char),
|
| 306 |
+
(r'[A-Z][A-Z_]+\b', Name.Constant),
|
| 307 |
+
# macro expansion
|
| 308 |
+
(r'\{%', String.Interpol, 'in-macro-control'),
|
| 309 |
+
(r'\{\{', String.Interpol, 'in-macro-expr'),
|
| 310 |
+
# attributes
|
| 311 |
+
(r'(@\[)(\s*)([A-Z]\w*)',
|
| 312 |
+
bygroups(Operator, Text, Name.Decorator), 'in-attr'),
|
| 313 |
+
# this is needed because Crystal attributes can look
|
| 314 |
+
# like keywords (class) or like this: ` ?!?
|
| 315 |
+
(words(CRYSTAL_OPERATORS, prefix=r'(\.|::)'),
|
| 316 |
+
bygroups(Operator, Name.Operator)),
|
| 317 |
+
(r'(\.|::)([a-zA-Z_]\w*[!?]?|[*%&^`~+\-/\[<>=])',
|
| 318 |
+
bygroups(Operator, Name)),
|
| 319 |
+
# Names can end with [!?] unless it's "!="
|
| 320 |
+
(r'[a-zA-Z_]\w*(?:[!?](?!=))?', Name),
|
| 321 |
+
(r'(\[|\]\??|\*\*|<=>?|>=|<<?|>>?|=~|===|'
|
| 322 |
+
r'!~|&&?|\|\||\.{1,3})', Operator),
|
| 323 |
+
(r'[-+/*%=<>&!^|~]=?', Operator),
|
| 324 |
+
(r'[(){};,/?:\\]', Punctuation),
|
| 325 |
+
(r'\s+', Text)
|
| 326 |
+
],
|
| 327 |
+
'funcname': [
|
| 328 |
+
(r'(?:([a-zA-Z_]\w*)(\.))?'
|
| 329 |
+
r'([a-zA-Z_]\w*[!?]?|\*\*?|[-+]@?|'
|
| 330 |
+
r'[/%&|^`~]|\[\]=?|<<|>>|<=?>|>=?|===?)',
|
| 331 |
+
bygroups(Name.Class, Operator, Name.Function), '#pop'),
|
| 332 |
+
default('#pop')
|
| 333 |
+
],
|
| 334 |
+
'classname': [
|
| 335 |
+
(r'[A-Z_]\w*', Name.Class),
|
| 336 |
+
(r'(\()(\s*)([A-Z_]\w*)(\s*)(\))',
|
| 337 |
+
bygroups(Punctuation, Text, Name.Class, Text, Punctuation)),
|
| 338 |
+
default('#pop')
|
| 339 |
+
],
|
| 340 |
+
'in-intp': [
|
| 341 |
+
(r'\{', String.Interpol, '#push'),
|
| 342 |
+
(r'\}', String.Interpol, '#pop'),
|
| 343 |
+
include('root'),
|
| 344 |
+
],
|
| 345 |
+
'string-intp': [
|
| 346 |
+
(r'#\{', String.Interpol, 'in-intp'),
|
| 347 |
+
],
|
| 348 |
+
'string-escaped': [
|
| 349 |
+
(r'\\([\\befnstv#"\']|x[a-fA-F0-9]{1,2}|[0-7]{1,3})', String.Escape)
|
| 350 |
+
],
|
| 351 |
+
'string-intp-escaped': [
|
| 352 |
+
include('string-intp'),
|
| 353 |
+
include('string-escaped'),
|
| 354 |
+
],
|
| 355 |
+
'interpolated-regex': [
|
| 356 |
+
include('string-intp'),
|
| 357 |
+
(r'[\\#]', String.Regex),
|
| 358 |
+
(r'[^\\#]+', String.Regex),
|
| 359 |
+
],
|
| 360 |
+
'interpolated-string': [
|
| 361 |
+
include('string-intp'),
|
| 362 |
+
(r'[\\#]', String.Other),
|
| 363 |
+
(r'[^\\#]+', String.Other),
|
| 364 |
+
],
|
| 365 |
+
'multiline-regex': [
|
| 366 |
+
include('string-intp'),
|
| 367 |
+
(r'\\\\', String.Regex),
|
| 368 |
+
(r'\\/', String.Regex),
|
| 369 |
+
(r'[\\#]', String.Regex),
|
| 370 |
+
(r'[^\\/#]+', String.Regex),
|
| 371 |
+
(r'/[imsx]*', String.Regex, '#pop'),
|
| 372 |
+
],
|
| 373 |
+
'end-part': [
|
| 374 |
+
(r'.+', Comment.Preproc, '#pop')
|
| 375 |
+
],
|
| 376 |
+
'in-macro-control': [
|
| 377 |
+
(r'\{%', String.Interpol, '#push'),
|
| 378 |
+
(r'%\}', String.Interpol, '#pop'),
|
| 379 |
+
(r'for\b|in\b', Keyword),
|
| 380 |
+
include('root'),
|
| 381 |
+
],
|
| 382 |
+
'in-macro-expr': [
|
| 383 |
+
(r'\{\{', String.Interpol, '#push'),
|
| 384 |
+
(r'\}\}', String.Interpol, '#pop'),
|
| 385 |
+
include('root'),
|
| 386 |
+
],
|
| 387 |
+
'in-attr': [
|
| 388 |
+
(r'\[', Operator, '#push'),
|
| 389 |
+
(r'\]', Operator, '#pop'),
|
| 390 |
+
include('root'),
|
| 391 |
+
],
|
| 392 |
+
}
|
| 393 |
+
tokens.update(gen_crystalstrings_rules())
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/csound.py
ADDED
|
@@ -0,0 +1,366 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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+
~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexers for CSound languages.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 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, bygroups, default, include, using, words
|
| 15 |
+
from pygments.token import Comment, Keyword, Name, Number, Operator, Punctuation, \
|
| 16 |
+
String, Text
|
| 17 |
+
from pygments.lexers._csound_builtins import OPCODES
|
| 18 |
+
from pygments.lexers.html import HtmlLexer
|
| 19 |
+
from pygments.lexers.python import PythonLexer
|
| 20 |
+
from pygments.lexers.scripting import LuaLexer
|
| 21 |
+
|
| 22 |
+
__all__ = ['CsoundScoreLexer', 'CsoundOrchestraLexer', 'CsoundDocumentLexer']
|
| 23 |
+
|
| 24 |
+
newline = (r'((?:(?:;|//).*)*)(\n)', bygroups(Comment.Single, Text))
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
class CsoundLexer(RegexLexer):
|
| 28 |
+
# Subclasses must define a 'single-line string' state.
|
| 29 |
+
tokens = {
|
| 30 |
+
'whitespace': [
|
| 31 |
+
(r'[ \t]+', Text),
|
| 32 |
+
(r'\\\n', Text),
|
| 33 |
+
(r'/[*](.|\n)*?[*]/', Comment.Multiline)
|
| 34 |
+
],
|
| 35 |
+
|
| 36 |
+
'macro call': [
|
| 37 |
+
(r'(\$\w+\.?)(\()', bygroups(Comment.Preproc, Punctuation),
|
| 38 |
+
'function macro call'),
|
| 39 |
+
(r'\$\w+(\.|\b)', Comment.Preproc)
|
| 40 |
+
],
|
| 41 |
+
'function macro call': [
|
| 42 |
+
(r"((?:\\['\)]|[^'\)])+)(')", bygroups(Comment.Preproc, Punctuation)),
|
| 43 |
+
(r"([^'\)]+)(\))", bygroups(Comment.Preproc, Punctuation), '#pop')
|
| 44 |
+
],
|
| 45 |
+
|
| 46 |
+
'whitespace or macro call': [
|
| 47 |
+
include('whitespace'),
|
| 48 |
+
include('macro call')
|
| 49 |
+
],
|
| 50 |
+
|
| 51 |
+
'preprocessor directives': [
|
| 52 |
+
(r'#(e(nd(if)?|lse)|ifn?def|undef)\b|##', Comment.Preproc),
|
| 53 |
+
(r'#include\b', Comment.Preproc, 'include'),
|
| 54 |
+
(r'#[ \t]*define\b', Comment.Preproc, 'macro name'),
|
| 55 |
+
(r'@+[ \t]*\d*', Comment.Preproc)
|
| 56 |
+
],
|
| 57 |
+
|
| 58 |
+
'include': [
|
| 59 |
+
include('whitespace'),
|
| 60 |
+
(r'"', String, 'single-line string')
|
| 61 |
+
],
|
| 62 |
+
|
| 63 |
+
'macro name': [
|
| 64 |
+
include('whitespace'),
|
| 65 |
+
(r'(\w+)(\()', bygroups(Comment.Preproc, Text),
|
| 66 |
+
'function macro argument list'),
|
| 67 |
+
(r'\w+', Comment.Preproc, 'object macro definition after name')
|
| 68 |
+
],
|
| 69 |
+
'object macro definition after name': [
|
| 70 |
+
include('whitespace'),
|
| 71 |
+
(r'#', Punctuation, 'object macro replacement text')
|
| 72 |
+
],
|
| 73 |
+
'object macro replacement text': [
|
| 74 |
+
(r'(\\#|[^#])+', Comment.Preproc),
|
| 75 |
+
(r'#', Punctuation, '#pop:3')
|
| 76 |
+
],
|
| 77 |
+
'function macro argument list': [
|
| 78 |
+
(r"(\w+)(['#])", bygroups(Comment.Preproc, Punctuation)),
|
| 79 |
+
(r'(\w+)(\))', bygroups(Comment.Preproc, Punctuation),
|
| 80 |
+
'function macro definition after name')
|
| 81 |
+
],
|
| 82 |
+
'function macro definition after name': [
|
| 83 |
+
(r'[ \t]+', Text),
|
| 84 |
+
(r'#', Punctuation, 'function macro replacement text')
|
| 85 |
+
],
|
| 86 |
+
'function macro replacement text': [
|
| 87 |
+
(r'(\\#|[^#])+', Comment.Preproc),
|
| 88 |
+
(r'#', Punctuation, '#pop:4')
|
| 89 |
+
]
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
class CsoundScoreLexer(CsoundLexer):
|
| 94 |
+
"""
|
| 95 |
+
For `Csound <http://csound.github.io>`_ scores.
|
| 96 |
+
|
| 97 |
+
.. versionadded:: 2.1
|
| 98 |
+
"""
|
| 99 |
+
|
| 100 |
+
name = 'Csound Score'
|
| 101 |
+
aliases = ['csound-score', 'csound-sco']
|
| 102 |
+
filenames = ['*.sco']
|
| 103 |
+
|
| 104 |
+
tokens = {
|
| 105 |
+
'partial statement': [
|
| 106 |
+
include('preprocessor directives'),
|
| 107 |
+
(r'\d+e[+-]?\d+|(\d+\.\d*|\d*\.\d+)(e[+-]?\d+)?', Number.Float),
|
| 108 |
+
(r'0[xX][a-fA-F0-9]+', Number.Hex),
|
| 109 |
+
(r'\d+', Number.Integer),
|
| 110 |
+
(r'"', String, 'single-line string'),
|
| 111 |
+
(r'[+\-*/%^!=<>|&#~.]', Operator),
|
| 112 |
+
(r'[]()[]', Punctuation),
|
| 113 |
+
(r'\w+', Comment.Preproc)
|
| 114 |
+
],
|
| 115 |
+
|
| 116 |
+
'statement': [
|
| 117 |
+
include('whitespace or macro call'),
|
| 118 |
+
newline + ('#pop',),
|
| 119 |
+
include('partial statement')
|
| 120 |
+
],
|
| 121 |
+
|
| 122 |
+
'root': [
|
| 123 |
+
newline,
|
| 124 |
+
include('whitespace or macro call'),
|
| 125 |
+
(r'[{}]', Punctuation, 'statement'),
|
| 126 |
+
(r'[abefimq-tv-z]|[nN][pP]?', Keyword, 'statement')
|
| 127 |
+
],
|
| 128 |
+
|
| 129 |
+
'single-line string': [
|
| 130 |
+
(r'"', String, '#pop'),
|
| 131 |
+
(r'[^\\"]+', String)
|
| 132 |
+
]
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
|
| 136 |
+
class CsoundOrchestraLexer(CsoundLexer):
|
| 137 |
+
"""
|
| 138 |
+
For `Csound <http://csound.github.io>`_ orchestras.
|
| 139 |
+
|
| 140 |
+
.. versionadded:: 2.1
|
| 141 |
+
"""
|
| 142 |
+
|
| 143 |
+
name = 'Csound Orchestra'
|
| 144 |
+
aliases = ['csound', 'csound-orc']
|
| 145 |
+
filenames = ['*.orc']
|
| 146 |
+
|
| 147 |
+
user_defined_opcodes = set()
|
| 148 |
+
|
| 149 |
+
def opcode_name_callback(lexer, match):
|
| 150 |
+
opcode = match.group(0)
|
| 151 |
+
lexer.user_defined_opcodes.add(opcode)
|
| 152 |
+
yield match.start(), Name.Function, opcode
|
| 153 |
+
|
| 154 |
+
def name_callback(lexer, match):
|
| 155 |
+
name = match.group(0)
|
| 156 |
+
if re.match('p\d+$', name) or name in OPCODES:
|
| 157 |
+
yield match.start(), Name.Builtin, name
|
| 158 |
+
elif name in lexer.user_defined_opcodes:
|
| 159 |
+
yield match.start(), Name.Function, name
|
| 160 |
+
else:
|
| 161 |
+
nameMatch = re.search(r'^(g?[aikSw])(\w+)', name)
|
| 162 |
+
if nameMatch:
|
| 163 |
+
yield nameMatch.start(1), Keyword.Type, nameMatch.group(1)
|
| 164 |
+
yield nameMatch.start(2), Name, nameMatch.group(2)
|
| 165 |
+
else:
|
| 166 |
+
yield match.start(), Name, name
|
| 167 |
+
|
| 168 |
+
tokens = {
|
| 169 |
+
'label': [
|
| 170 |
+
(r'\b(\w+)(:)', bygroups(Name.Label, Punctuation))
|
| 171 |
+
],
|
| 172 |
+
|
| 173 |
+
'partial expression': [
|
| 174 |
+
include('preprocessor directives'),
|
| 175 |
+
(r'\b(0dbfs|k(r|smps)|nchnls(_i)?|sr)\b', Name.Variable.Global),
|
| 176 |
+
(r'\d+e[+-]?\d+|(\d+\.\d*|\d*\.\d+)(e[+-]?\d+)?', Number.Float),
|
| 177 |
+
(r'0[xX][a-fA-F0-9]+', Number.Hex),
|
| 178 |
+
(r'\d+', Number.Integer),
|
| 179 |
+
(r'"', String, 'single-line string'),
|
| 180 |
+
(r'\{\{', String, 'multi-line string'),
|
| 181 |
+
(r'[+\-*/%^!=&|<>#~¬]', Operator),
|
| 182 |
+
(r'[](),?:[]', Punctuation),
|
| 183 |
+
(words((
|
| 184 |
+
# Keywords
|
| 185 |
+
'do', 'else', 'elseif', 'endif', 'enduntil', 'fi', 'if', 'ithen', 'kthen',
|
| 186 |
+
'od', 'then', 'until', 'while',
|
| 187 |
+
# Opcodes that act as control structures
|
| 188 |
+
'return', 'timout'
|
| 189 |
+
), prefix=r'\b', suffix=r'\b'), Keyword),
|
| 190 |
+
(words(('goto', 'igoto', 'kgoto', 'rigoto', 'tigoto'),
|
| 191 |
+
prefix=r'\b', suffix=r'\b'), Keyword, 'goto label'),
|
| 192 |
+
(words(('cggoto', 'cigoto', 'cingoto', 'ckgoto', 'cngoto'),
|
| 193 |
+
prefix=r'\b', suffix=r'\b'), Keyword,
|
| 194 |
+
('goto label', 'goto expression')),
|
| 195 |
+
(words(('loop_ge', 'loop_gt', 'loop_le', 'loop_lt'),
|
| 196 |
+
prefix=r'\b', suffix=r'\b'), Keyword,
|
| 197 |
+
('goto label', 'goto expression', 'goto expression', 'goto expression')),
|
| 198 |
+
(r'\bscoreline(_i)?\b', Name.Builtin, 'scoreline opcode'),
|
| 199 |
+
(r'\bpyl?run[it]?\b', Name.Builtin, 'python opcode'),
|
| 200 |
+
(r'\blua_(exec|opdef)\b', Name.Builtin, 'lua opcode'),
|
| 201 |
+
(r'\b[a-zA-Z_]\w*\b', name_callback)
|
| 202 |
+
],
|
| 203 |
+
|
| 204 |
+
'expression': [
|
| 205 |
+
include('whitespace or macro call'),
|
| 206 |
+
newline + ('#pop',),
|
| 207 |
+
include('partial expression')
|
| 208 |
+
],
|
| 209 |
+
|
| 210 |
+
'root': [
|
| 211 |
+
newline,
|
| 212 |
+
include('whitespace or macro call'),
|
| 213 |
+
(r'\binstr\b', Keyword, ('instrument block', 'instrument name list')),
|
| 214 |
+
(r'\bopcode\b', Keyword, ('opcode block', 'opcode parameter list',
|
| 215 |
+
'opcode types', 'opcode types', 'opcode name')),
|
| 216 |
+
include('label'),
|
| 217 |
+
default('expression')
|
| 218 |
+
],
|
| 219 |
+
|
| 220 |
+
'instrument name list': [
|
| 221 |
+
include('whitespace or macro call'),
|
| 222 |
+
(r'\d+|\+?[a-zA-Z_]\w*', Name.Function),
|
| 223 |
+
(r',', Punctuation),
|
| 224 |
+
newline + ('#pop',)
|
| 225 |
+
],
|
| 226 |
+
'instrument block': [
|
| 227 |
+
newline,
|
| 228 |
+
include('whitespace or macro call'),
|
| 229 |
+
(r'\bendin\b', Keyword, '#pop'),
|
| 230 |
+
include('label'),
|
| 231 |
+
default('expression')
|
| 232 |
+
],
|
| 233 |
+
|
| 234 |
+
'opcode name': [
|
| 235 |
+
include('whitespace or macro call'),
|
| 236 |
+
(r'[a-zA-Z_]\w*', opcode_name_callback, '#pop')
|
| 237 |
+
],
|
| 238 |
+
'opcode types': [
|
| 239 |
+
include('whitespace or macro call'),
|
| 240 |
+
(r'0|[]afijkKoOpPStV[]+', Keyword.Type, '#pop'),
|
| 241 |
+
(r',', Punctuation)
|
| 242 |
+
],
|
| 243 |
+
'opcode parameter list': [
|
| 244 |
+
include('whitespace or macro call'),
|
| 245 |
+
newline + ('#pop',)
|
| 246 |
+
],
|
| 247 |
+
'opcode block': [
|
| 248 |
+
newline,
|
| 249 |
+
include('whitespace or macro call'),
|
| 250 |
+
(r'\bendop\b', Keyword, '#pop'),
|
| 251 |
+
include('label'),
|
| 252 |
+
default('expression')
|
| 253 |
+
],
|
| 254 |
+
|
| 255 |
+
'goto label': [
|
| 256 |
+
include('whitespace or macro call'),
|
| 257 |
+
(r'\w+', Name.Label, '#pop'),
|
| 258 |
+
default('#pop')
|
| 259 |
+
],
|
| 260 |
+
'goto expression': [
|
| 261 |
+
include('whitespace or macro call'),
|
| 262 |
+
(r',', Punctuation, '#pop'),
|
| 263 |
+
include('partial expression')
|
| 264 |
+
],
|
| 265 |
+
|
| 266 |
+
'single-line string': [
|
| 267 |
+
include('macro call'),
|
| 268 |
+
(r'"', String, '#pop'),
|
| 269 |
+
# From https://github.com/csound/csound/blob/develop/Opcodes/fout.c#L1405
|
| 270 |
+
(r'%\d*(\.\d+)?[cdhilouxX]', String.Interpol),
|
| 271 |
+
(r'%[!%nNrRtT]|[~^]|\\([\\aAbBnNrRtT"]|[0-7]{1,3})', String.Escape),
|
| 272 |
+
(r'[^\\"~$%\^\n]+', String),
|
| 273 |
+
(r'[\\"~$%\^\n]', String)
|
| 274 |
+
],
|
| 275 |
+
'multi-line string': [
|
| 276 |
+
(r'\}\}', String, '#pop'),
|
| 277 |
+
(r'[^}]+|\}(?!\})', String)
|
| 278 |
+
],
|
| 279 |
+
|
| 280 |
+
'scoreline opcode': [
|
| 281 |
+
include('whitespace or macro call'),
|
| 282 |
+
(r'\{\{', String, 'scoreline'),
|
| 283 |
+
default('#pop')
|
| 284 |
+
],
|
| 285 |
+
'scoreline': [
|
| 286 |
+
(r'\}\}', String, '#pop'),
|
| 287 |
+
(r'([^}]+)|\}(?!\})', using(CsoundScoreLexer))
|
| 288 |
+
],
|
| 289 |
+
|
| 290 |
+
'python opcode': [
|
| 291 |
+
include('whitespace or macro call'),
|
| 292 |
+
(r'\{\{', String, 'python'),
|
| 293 |
+
default('#pop')
|
| 294 |
+
],
|
| 295 |
+
'python': [
|
| 296 |
+
(r'\}\}', String, '#pop'),
|
| 297 |
+
(r'([^}]+)|\}(?!\})', using(PythonLexer))
|
| 298 |
+
],
|
| 299 |
+
|
| 300 |
+
'lua opcode': [
|
| 301 |
+
include('whitespace or macro call'),
|
| 302 |
+
(r'"', String, 'single-line string'),
|
| 303 |
+
(r'\{\{', String, 'lua'),
|
| 304 |
+
(r',', Punctuation),
|
| 305 |
+
default('#pop')
|
| 306 |
+
],
|
| 307 |
+
'lua': [
|
| 308 |
+
(r'\}\}', String, '#pop'),
|
| 309 |
+
(r'([^}]+)|\}(?!\})', using(LuaLexer))
|
| 310 |
+
]
|
| 311 |
+
}
|
| 312 |
+
|
| 313 |
+
|
| 314 |
+
class CsoundDocumentLexer(RegexLexer):
|
| 315 |
+
"""
|
| 316 |
+
For `Csound <http://csound.github.io>`_ documents.
|
| 317 |
+
|
| 318 |
+
.. versionadded:: 2.1
|
| 319 |
+
"""
|
| 320 |
+
|
| 321 |
+
name = 'Csound Document'
|
| 322 |
+
aliases = ['csound-document', 'csound-csd']
|
| 323 |
+
filenames = ['*.csd']
|
| 324 |
+
|
| 325 |
+
# These tokens are based on those in XmlLexer in pygments/lexers/html.py. Making
|
| 326 |
+
# CsoundDocumentLexer a subclass of XmlLexer rather than RegexLexer may seem like a
|
| 327 |
+
# better idea, since Csound Document files look like XML files. However, Csound
|
| 328 |
+
# Documents can contain Csound comments (preceded by //, for example) before and
|
| 329 |
+
# after the root element, unescaped bitwise AND & and less than < operators, etc. In
|
| 330 |
+
# other words, while Csound Document files look like XML files, they may not actually
|
| 331 |
+
# be XML files.
|
| 332 |
+
tokens = {
|
| 333 |
+
'root': [
|
| 334 |
+
newline,
|
| 335 |
+
(r'/[*](.|\n)*?[*]/', Comment.Multiline),
|
| 336 |
+
(r'[^<&;/]+', Text),
|
| 337 |
+
(r'<\s*CsInstruments', Name.Tag, ('orchestra', 'tag')),
|
| 338 |
+
(r'<\s*CsScore', Name.Tag, ('score', 'tag')),
|
| 339 |
+
(r'<\s*[hH][tT][mM][lL]', Name.Tag, ('HTML', 'tag')),
|
| 340 |
+
(r'<\s*[\w:.-]+', Name.Tag, 'tag'),
|
| 341 |
+
(r'<\s*/\s*[\w:.-]+\s*>', Name.Tag)
|
| 342 |
+
],
|
| 343 |
+
'orchestra': [
|
| 344 |
+
(r'<\s*/\s*CsInstruments\s*>', Name.Tag, '#pop'),
|
| 345 |
+
(r'(.|\n)+?(?=<\s*/\s*CsInstruments\s*>)', using(CsoundOrchestraLexer))
|
| 346 |
+
],
|
| 347 |
+
'score': [
|
| 348 |
+
(r'<\s*/\s*CsScore\s*>', Name.Tag, '#pop'),
|
| 349 |
+
(r'(.|\n)+?(?=<\s*/\s*CsScore\s*>)', using(CsoundScoreLexer))
|
| 350 |
+
],
|
| 351 |
+
'HTML': [
|
| 352 |
+
(r'<\s*/\s*[hH][tT][mM][lL]\s*>', Name.Tag, '#pop'),
|
| 353 |
+
(r'(.|\n)+?(?=<\s*/\s*[hH][tT][mM][lL]\s*>)', using(HtmlLexer))
|
| 354 |
+
],
|
| 355 |
+
'tag': [
|
| 356 |
+
(r'\s+', Text),
|
| 357 |
+
(r'[\w.:-]+\s*=', Name.Attribute, 'attr'),
|
| 358 |
+
(r'/?\s*>', Name.Tag, '#pop')
|
| 359 |
+
],
|
| 360 |
+
'attr': [
|
| 361 |
+
(r'\s+', Text),
|
| 362 |
+
(r'".*?"', String, '#pop'),
|
| 363 |
+
(r"'.*?'", String, '#pop'),
|
| 364 |
+
(r'[^\s>]+', String, '#pop')
|
| 365 |
+
]
|
| 366 |
+
}
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/css.py
ADDED
|
@@ -0,0 +1,689 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.css
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexers for CSS and related stylesheet formats.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
import re
|
| 13 |
+
import copy
|
| 14 |
+
|
| 15 |
+
from pygments.lexer import ExtendedRegexLexer, RegexLexer, include, bygroups, \
|
| 16 |
+
default, words, inherit
|
| 17 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 18 |
+
Number, Punctuation
|
| 19 |
+
from pygments.util import iteritems
|
| 20 |
+
|
| 21 |
+
__all__ = ['CssLexer', 'SassLexer', 'ScssLexer', 'LessCssLexer']
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
# List of vendor prefixes obtained from:
|
| 25 |
+
# https://www.w3.org/TR/CSS21/syndata.html#vendor-keyword-history
|
| 26 |
+
_vendor_prefixes = (
|
| 27 |
+
'-ms-', 'mso-', '-moz-', '-o-', '-xv-', '-atsc-', '-wap-', '-khtml-',
|
| 28 |
+
'-webkit-', 'prince-', '-ah-', '-hp-', '-ro-', '-rim-', '-tc-',
|
| 29 |
+
)
|
| 30 |
+
|
| 31 |
+
# List of CSS properties obtained from:
|
| 32 |
+
# https://www.w3.org/Style/CSS/all-properties.en.html
|
| 33 |
+
# Note: handle --* separately
|
| 34 |
+
_css_properties = (
|
| 35 |
+
'align-content', 'align-items', 'align-self', 'alignment-baseline', 'all',
|
| 36 |
+
'animation', 'animation-delay', 'animation-direction',
|
| 37 |
+
'animation-duration', 'animation-fill-mode', 'animation-iteration-count',
|
| 38 |
+
'animation-name', 'animation-play-state', 'animation-timing-function',
|
| 39 |
+
'appearance', 'azimuth', 'backface-visibility', 'background',
|
| 40 |
+
'background-attachment', 'background-blend-mode', 'background-clip',
|
| 41 |
+
'background-color', 'background-image', 'background-origin',
|
| 42 |
+
'background-position', 'background-repeat', 'background-size',
|
| 43 |
+
'baseline-shift', 'bookmark-label', 'bookmark-level', 'bookmark-state',
|
| 44 |
+
'border', 'border-bottom', 'border-bottom-color',
|
| 45 |
+
'border-bottom-left-radius', 'border-bottom-right-radius',
|
| 46 |
+
'border-bottom-style', 'border-bottom-width', 'border-boundary',
|
| 47 |
+
'border-collapse', 'border-color', 'border-image', 'border-image-outset',
|
| 48 |
+
'border-image-repeat', 'border-image-slice', 'border-image-source',
|
| 49 |
+
'border-image-width', 'border-left', 'border-left-color',
|
| 50 |
+
'border-left-style', 'border-left-width', 'border-radius', 'border-right',
|
| 51 |
+
'border-right-color', 'border-right-style', 'border-right-width',
|
| 52 |
+
'border-spacing', 'border-style', 'border-top', 'border-top-color',
|
| 53 |
+
'border-top-left-radius', 'border-top-right-radius', 'border-top-style',
|
| 54 |
+
'border-top-width', 'border-width', 'bottom', 'box-decoration-break',
|
| 55 |
+
'box-shadow', 'box-sizing', 'box-snap', 'box-suppress', 'break-after',
|
| 56 |
+
'break-before', 'break-inside', 'caption-side', 'caret', 'caret-animation',
|
| 57 |
+
'caret-color', 'caret-shape', 'chains', 'clear', 'clip', 'clip-path',
|
| 58 |
+
'clip-rule', 'color', 'color-interpolation-filters', 'column-count',
|
| 59 |
+
'column-fill', 'column-gap', 'column-rule', 'column-rule-color',
|
| 60 |
+
'column-rule-style', 'column-rule-width', 'column-span', 'column-width',
|
| 61 |
+
'columns', 'content', 'counter-increment', 'counter-reset', 'counter-set',
|
| 62 |
+
'crop', 'cue', 'cue-after', 'cue-before', 'cursor', 'direction', 'display',
|
| 63 |
+
'dominant-baseline', 'elevation', 'empty-cells', 'filter', 'flex',
|
| 64 |
+
'flex-basis', 'flex-direction', 'flex-flow', 'flex-grow', 'flex-shrink',
|
| 65 |
+
'flex-wrap', 'float', 'float-defer', 'float-offset', 'float-reference',
|
| 66 |
+
'flood-color', 'flood-opacity', 'flow', 'flow-from', 'flow-into', 'font',
|
| 67 |
+
'font-family', 'font-feature-settings', 'font-kerning',
|
| 68 |
+
'font-language-override', 'font-size', 'font-size-adjust', 'font-stretch',
|
| 69 |
+
'font-style', 'font-synthesis', 'font-variant', 'font-variant-alternates',
|
| 70 |
+
'font-variant-caps', 'font-variant-east-asian', 'font-variant-ligatures',
|
| 71 |
+
'font-variant-numeric', 'font-variant-position', 'font-weight',
|
| 72 |
+
'footnote-display', 'footnote-policy', 'glyph-orientation-vertical',
|
| 73 |
+
'grid', 'grid-area', 'grid-auto-columns', 'grid-auto-flow',
|
| 74 |
+
'grid-auto-rows', 'grid-column', 'grid-column-end', 'grid-column-gap',
|
| 75 |
+
'grid-column-start', 'grid-gap', 'grid-row', 'grid-row-end',
|
| 76 |
+
'grid-row-gap', 'grid-row-start', 'grid-template', 'grid-template-areas',
|
| 77 |
+
'grid-template-columns', 'grid-template-rows', 'hanging-punctuation',
|
| 78 |
+
'height', 'hyphenate-character', 'hyphenate-limit-chars',
|
| 79 |
+
'hyphenate-limit-last', 'hyphenate-limit-lines', 'hyphenate-limit-zone',
|
| 80 |
+
'hyphens', 'image-orientation', 'image-resolution', 'initial-letter',
|
| 81 |
+
'initial-letter-align', 'initial-letter-wrap', 'isolation',
|
| 82 |
+
'justify-content', 'justify-items', 'justify-self', 'left',
|
| 83 |
+
'letter-spacing', 'lighting-color', 'line-break', 'line-grid',
|
| 84 |
+
'line-height', 'line-snap', 'list-style', 'list-style-image',
|
| 85 |
+
'list-style-position', 'list-style-type', 'margin', 'margin-bottom',
|
| 86 |
+
'margin-left', 'margin-right', 'margin-top', 'marker-side',
|
| 87 |
+
'marquee-direction', 'marquee-loop', 'marquee-speed', 'marquee-style',
|
| 88 |
+
'mask', 'mask-border', 'mask-border-mode', 'mask-border-outset',
|
| 89 |
+
'mask-border-repeat', 'mask-border-slice', 'mask-border-source',
|
| 90 |
+
'mask-border-width', 'mask-clip', 'mask-composite', 'mask-image',
|
| 91 |
+
'mask-mode', 'mask-origin', 'mask-position', 'mask-repeat', 'mask-size',
|
| 92 |
+
'mask-type', 'max-height', 'max-lines', 'max-width', 'min-height',
|
| 93 |
+
'min-width', 'mix-blend-mode', 'motion', 'motion-offset', 'motion-path',
|
| 94 |
+
'motion-rotation', 'move-to', 'nav-down', 'nav-left', 'nav-right',
|
| 95 |
+
'nav-up', 'object-fit', 'object-position', 'offset-after', 'offset-before',
|
| 96 |
+
'offset-end', 'offset-start', 'opacity', 'order', 'orphans', 'outline',
|
| 97 |
+
'outline-color', 'outline-offset', 'outline-style', 'outline-width',
|
| 98 |
+
'overflow', 'overflow-style', 'overflow-wrap', 'overflow-x', 'overflow-y',
|
| 99 |
+
'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top',
|
| 100 |
+
'page', 'page-break-after', 'page-break-before', 'page-break-inside',
|
| 101 |
+
'page-policy', 'pause', 'pause-after', 'pause-before', 'perspective',
|
| 102 |
+
'perspective-origin', 'pitch', 'pitch-range', 'play-during', 'polar-angle',
|
| 103 |
+
'polar-distance', 'position', 'presentation-level', 'quotes',
|
| 104 |
+
'region-fragment', 'resize', 'rest', 'rest-after', 'rest-before',
|
| 105 |
+
'richness', 'right', 'rotation', 'rotation-point', 'ruby-align',
|
| 106 |
+
'ruby-merge', 'ruby-position', 'running', 'scroll-snap-coordinate',
|
| 107 |
+
'scroll-snap-destination', 'scroll-snap-points-x', 'scroll-snap-points-y',
|
| 108 |
+
'scroll-snap-type', 'shape-image-threshold', 'shape-inside', 'shape-margin',
|
| 109 |
+
'shape-outside', 'size', 'speak', 'speak-as', 'speak-header',
|
| 110 |
+
'speak-numeral', 'speak-punctuation', 'speech-rate', 'stress', 'string-set',
|
| 111 |
+
'tab-size', 'table-layout', 'text-align', 'text-align-last',
|
| 112 |
+
'text-combine-upright', 'text-decoration', 'text-decoration-color',
|
| 113 |
+
'text-decoration-line', 'text-decoration-skip', 'text-decoration-style',
|
| 114 |
+
'text-emphasis', 'text-emphasis-color', 'text-emphasis-position',
|
| 115 |
+
'text-emphasis-style', 'text-indent', 'text-justify', 'text-orientation',
|
| 116 |
+
'text-overflow', 'text-shadow', 'text-space-collapse', 'text-space-trim',
|
| 117 |
+
'text-spacing', 'text-transform', 'text-underline-position', 'text-wrap',
|
| 118 |
+
'top', 'transform', 'transform-origin', 'transform-style', 'transition',
|
| 119 |
+
'transition-delay', 'transition-duration', 'transition-property',
|
| 120 |
+
'transition-timing-function', 'unicode-bidi', 'user-select',
|
| 121 |
+
'vertical-align', 'visibility', 'voice-balance', 'voice-duration',
|
| 122 |
+
'voice-family', 'voice-pitch', 'voice-range', 'voice-rate', 'voice-stress',
|
| 123 |
+
'voice-volume', 'volume', 'white-space', 'widows', 'width', 'will-change',
|
| 124 |
+
'word-break', 'word-spacing', 'word-wrap', 'wrap-after', 'wrap-before',
|
| 125 |
+
'wrap-flow', 'wrap-inside', 'wrap-through', 'writing-mode', 'z-index',
|
| 126 |
+
)
|
| 127 |
+
|
| 128 |
+
# List of keyword values obtained from:
|
| 129 |
+
# http://cssvalues.com/
|
| 130 |
+
_keyword_values = (
|
| 131 |
+
'absolute', 'alias', 'all', 'all-petite-caps', 'all-scroll',
|
| 132 |
+
'all-small-caps', 'allow-end', 'alpha', 'alternate', 'alternate-reverse',
|
| 133 |
+
'always', 'armenian', 'auto', 'avoid', 'avoid-column', 'avoid-page',
|
| 134 |
+
'backwards', 'balance', 'baseline', 'below', 'blink', 'block', 'bold',
|
| 135 |
+
'bolder', 'border-box', 'both', 'bottom', 'box-decoration', 'break-word',
|
| 136 |
+
'capitalize', 'cell', 'center', 'circle', 'clip', 'clone', 'close-quote',
|
| 137 |
+
'col-resize', 'collapse', 'color', 'color-burn', 'color-dodge', 'column',
|
| 138 |
+
'column-reverse', 'compact', 'condensed', 'contain', 'container',
|
| 139 |
+
'content-box', 'context-menu', 'copy', 'cover', 'crisp-edges', 'crosshair',
|
| 140 |
+
'currentColor', 'cursive', 'darken', 'dashed', 'decimal',
|
| 141 |
+
'decimal-leading-zero', 'default', 'descendants', 'difference', 'digits',
|
| 142 |
+
'disc', 'distribute', 'dot', 'dotted', 'double', 'double-circle', 'e-resize',
|
| 143 |
+
'each-line', 'ease', 'ease-in', 'ease-in-out', 'ease-out', 'edges',
|
| 144 |
+
'ellipsis', 'end', 'ew-resize', 'exclusion', 'expanded', 'extra-condensed',
|
| 145 |
+
'extra-expanded', 'fantasy', 'fill', 'fill-box', 'filled', 'first', 'fixed',
|
| 146 |
+
'flat', 'flex', 'flex-end', 'flex-start', 'flip', 'force-end', 'forwards',
|
| 147 |
+
'from-image', 'full-width', 'geometricPrecision', 'georgian', 'groove',
|
| 148 |
+
'hanging', 'hard-light', 'help', 'hidden', 'hide', 'horizontal', 'hue',
|
| 149 |
+
'icon', 'infinite', 'inherit', 'initial', 'ink', 'inline', 'inline-block',
|
| 150 |
+
'inline-flex', 'inline-table', 'inset', 'inside', 'inter-word', 'invert',
|
| 151 |
+
'isolate', 'italic', 'justify', 'large', 'larger', 'last', 'left',
|
| 152 |
+
'lighten', 'lighter', 'line-through', 'linear', 'list-item', 'local',
|
| 153 |
+
'loose', 'lower-alpha', 'lower-greek', 'lower-latin', 'lower-roman',
|
| 154 |
+
'lowercase', 'ltr', 'luminance', 'luminosity', 'mandatory', 'manipulation',
|
| 155 |
+
'manual', 'margin-box', 'match-parent', 'medium', 'mixed', 'monospace',
|
| 156 |
+
'move', 'multiply', 'n-resize', 'ne-resize', 'nesw-resize',
|
| 157 |
+
'no-close-quote', 'no-drop', 'no-open-quote', 'no-repeat', 'none', 'normal',
|
| 158 |
+
'not-allowed', 'nowrap', 'ns-resize', 'nw-resize', 'nwse-resize', 'objects',
|
| 159 |
+
'oblique', 'off', 'on', 'open', 'open-quote', 'optimizeLegibility',
|
| 160 |
+
'optimizeSpeed', 'outset', 'outside', 'over', 'overlay', 'overline',
|
| 161 |
+
'padding-box', 'page', 'pan-down', 'pan-left', 'pan-right', 'pan-up',
|
| 162 |
+
'pan-x', 'pan-y', 'paused', 'petite-caps', 'pixelated', 'pointer',
|
| 163 |
+
'preserve-3d', 'progress', 'proximity', 'relative', 'repeat',
|
| 164 |
+
'repeat no-repeat', 'repeat-x', 'repeat-y', 'reverse', 'ridge', 'right',
|
| 165 |
+
'round', 'row', 'row-resize', 'row-reverse', 'rtl', 'ruby', 'ruby-base',
|
| 166 |
+
'ruby-base-container', 'ruby-text', 'ruby-text-container', 'run-in',
|
| 167 |
+
'running', 's-resize', 'sans-serif', 'saturation', 'scale-down', 'screen',
|
| 168 |
+
'scroll', 'se-resize', 'semi-condensed', 'semi-expanded', 'separate',
|
| 169 |
+
'serif', 'sesame', 'show', 'sideways', 'sideways-left', 'sideways-right',
|
| 170 |
+
'slice', 'small', 'small-caps', 'smaller', 'smooth', 'snap', 'soft-light',
|
| 171 |
+
'solid', 'space', 'space-around', 'space-between', 'spaces', 'square',
|
| 172 |
+
'start', 'static', 'step-end', 'step-start', 'sticky', 'stretch', 'strict',
|
| 173 |
+
'stroke-box', 'style', 'sw-resize', 'table', 'table-caption', 'table-cell',
|
| 174 |
+
'table-column', 'table-column-group', 'table-footer-group',
|
| 175 |
+
'table-header-group', 'table-row', 'table-row-group', 'text', 'thick',
|
| 176 |
+
'thin', 'titling-caps', 'to', 'top', 'triangle', 'ultra-condensed',
|
| 177 |
+
'ultra-expanded', 'under', 'underline', 'unicase', 'unset', 'upper-alpha',
|
| 178 |
+
'upper-latin', 'upper-roman', 'uppercase', 'upright', 'use-glyph-orientation',
|
| 179 |
+
'vertical', 'vertical-text', 'view-box', 'visible', 'w-resize', 'wait',
|
| 180 |
+
'wavy', 'weight', 'weight style', 'wrap', 'wrap-reverse', 'x-large',
|
| 181 |
+
'x-small', 'xx-large', 'xx-small', 'zoom-in', 'zoom-out',
|
| 182 |
+
)
|
| 183 |
+
|
| 184 |
+
# List of extended color keywords obtained from:
|
| 185 |
+
# https://drafts.csswg.org/css-color/#named-colors
|
| 186 |
+
_color_keywords = (
|
| 187 |
+
'aliceblue', 'antiquewhite', 'aqua', 'aquamarine', 'azure', 'beige',
|
| 188 |
+
'bisque', 'black', 'blanchedalmond', 'blue', 'blueviolet', 'brown',
|
| 189 |
+
'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral',
|
| 190 |
+
'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan',
|
| 191 |
+
'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki',
|
| 192 |
+
'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred',
|
| 193 |
+
'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray',
|
| 194 |
+
'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue',
|
| 195 |
+
'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite',
|
| 196 |
+
'forestgreen', 'fuchsia', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod',
|
| 197 |
+
'gray', 'green', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred',
|
| 198 |
+
'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen',
|
| 199 |
+
'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan',
|
| 200 |
+
'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey',
|
| 201 |
+
'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue',
|
| 202 |
+
'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow',
|
| 203 |
+
'lime', 'limegreen', 'linen', 'magenta', 'maroon', 'mediumaquamarine',
|
| 204 |
+
'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen',
|
| 205 |
+
'mediumslateblue', 'mediumspringgreen', 'mediumturquoise',
|
| 206 |
+
'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin',
|
| 207 |
+
'navajowhite', 'navy', 'oldlace', 'olive', 'olivedrab', 'orange',
|
| 208 |
+
'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise',
|
| 209 |
+
'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum',
|
| 210 |
+
'powderblue', 'purple', 'rebeccapurple', 'red', 'rosybrown', 'royalblue',
|
| 211 |
+
'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna',
|
| 212 |
+
'silver', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow',
|
| 213 |
+
'springgreen', 'steelblue', 'tan', 'teal', 'thistle', 'tomato', 'turquoise',
|
| 214 |
+
'violet', 'wheat', 'white', 'whitesmoke', 'yellow', 'yellowgreen',
|
| 215 |
+
) + ('transparent',)
|
| 216 |
+
|
| 217 |
+
# List of other keyword values from other sources:
|
| 218 |
+
_other_keyword_values = (
|
| 219 |
+
'above', 'aural', 'behind', 'bidi-override', 'center-left', 'center-right',
|
| 220 |
+
'cjk-ideographic', 'continuous', 'crop', 'cross', 'embed', 'far-left',
|
| 221 |
+
'far-right', 'fast', 'faster', 'hebrew', 'high', 'higher', 'hiragana',
|
| 222 |
+
'hiragana-iroha', 'katakana', 'katakana-iroha', 'landscape', 'left-side',
|
| 223 |
+
'leftwards', 'level', 'loud', 'low', 'lower', 'message-box', 'middle',
|
| 224 |
+
'mix', 'narrower', 'once', 'portrait', 'right-side', 'rightwards', 'silent',
|
| 225 |
+
'slow', 'slower', 'small-caption', 'soft', 'spell-out', 'status-bar',
|
| 226 |
+
'super', 'text-bottom', 'text-top', 'wider', 'x-fast', 'x-high', 'x-loud',
|
| 227 |
+
'x-low', 'x-soft', 'yes', 'pre', 'pre-wrap', 'pre-line',
|
| 228 |
+
)
|
| 229 |
+
|
| 230 |
+
# List of functional notation and function keyword values:
|
| 231 |
+
_functional_notation_keyword_values = (
|
| 232 |
+
'attr', 'blackness', 'blend', 'blenda', 'blur', 'brightness', 'calc',
|
| 233 |
+
'circle', 'color-mod', 'contrast', 'counter', 'cubic-bezier', 'device-cmyk',
|
| 234 |
+
'drop-shadow', 'ellipse', 'gray', 'grayscale', 'hsl', 'hsla', 'hue',
|
| 235 |
+
'hue-rotate', 'hwb', 'image', 'inset', 'invert', 'lightness',
|
| 236 |
+
'linear-gradient', 'matrix', 'matrix3d', 'opacity', 'perspective',
|
| 237 |
+
'polygon', 'radial-gradient', 'rect', 'repeating-linear-gradient',
|
| 238 |
+
'repeating-radial-gradient', 'rgb', 'rgba', 'rotate', 'rotate3d', 'rotateX',
|
| 239 |
+
'rotateY', 'rotateZ', 'saturate', 'saturation', 'scale', 'scale3d',
|
| 240 |
+
'scaleX', 'scaleY', 'scaleZ', 'sepia', 'shade', 'skewX', 'skewY', 'steps',
|
| 241 |
+
'tint', 'toggle', 'translate', 'translate3d', 'translateX', 'translateY',
|
| 242 |
+
'translateZ', 'whiteness',
|
| 243 |
+
)
|
| 244 |
+
# Note! Handle url(...) separately.
|
| 245 |
+
|
| 246 |
+
# List of units obtained from:
|
| 247 |
+
# https://www.w3.org/TR/css3-values/
|
| 248 |
+
_angle_units = (
|
| 249 |
+
'deg', 'grad', 'rad', 'turn',
|
| 250 |
+
)
|
| 251 |
+
_frequency_units = (
|
| 252 |
+
'Hz', 'kHz',
|
| 253 |
+
)
|
| 254 |
+
_length_units = (
|
| 255 |
+
'em', 'ex', 'ch', 'rem',
|
| 256 |
+
'vh', 'vw', 'vmin', 'vmax',
|
| 257 |
+
'px', 'mm', 'cm', 'in', 'pt', 'pc', 'q',
|
| 258 |
+
)
|
| 259 |
+
_resolution_units = (
|
| 260 |
+
'dpi', 'dpcm', 'dppx',
|
| 261 |
+
)
|
| 262 |
+
_time_units = (
|
| 263 |
+
's', 'ms',
|
| 264 |
+
)
|
| 265 |
+
_all_units = _angle_units + _frequency_units + _length_units + \
|
| 266 |
+
_resolution_units + _time_units
|
| 267 |
+
|
| 268 |
+
|
| 269 |
+
class CssLexer(RegexLexer):
|
| 270 |
+
"""
|
| 271 |
+
For CSS (Cascading Style Sheets).
|
| 272 |
+
"""
|
| 273 |
+
|
| 274 |
+
name = 'CSS'
|
| 275 |
+
aliases = ['css']
|
| 276 |
+
filenames = ['*.css']
|
| 277 |
+
mimetypes = ['text/css']
|
| 278 |
+
|
| 279 |
+
tokens = {
|
| 280 |
+
'root': [
|
| 281 |
+
include('basics'),
|
| 282 |
+
],
|
| 283 |
+
'basics': [
|
| 284 |
+
(r'\s+', Text),
|
| 285 |
+
(r'/\*(?:.|\n)*?\*/', Comment),
|
| 286 |
+
(r'\{', Punctuation, 'content'),
|
| 287 |
+
(r'(\:{1,2})([\w-]+)', bygroups(Punctuation, Name.Decorator)),
|
| 288 |
+
(r'(\.)([\w-]+)', bygroups(Punctuation, Name.Class)),
|
| 289 |
+
(r'(\#)([\w-]+)', bygroups(Punctuation, Name.Namespace)),
|
| 290 |
+
(r'(@)([\w-]+)', bygroups(Punctuation, Keyword), 'atrule'),
|
| 291 |
+
(r'[\w-]+', Name.Tag),
|
| 292 |
+
(r'[~^*!%&$\[\]()<>|+=@:;,./?-]', Operator),
|
| 293 |
+
(r'"(\\\\|\\"|[^"])*"', String.Double),
|
| 294 |
+
(r"'(\\\\|\\'|[^'])*'", String.Single)
|
| 295 |
+
],
|
| 296 |
+
'atrule': [
|
| 297 |
+
(r'\{', Punctuation, 'atcontent'),
|
| 298 |
+
(r';', Punctuation, '#pop'),
|
| 299 |
+
include('basics'),
|
| 300 |
+
],
|
| 301 |
+
'atcontent': [
|
| 302 |
+
include('basics'),
|
| 303 |
+
(r'\}', Punctuation, '#pop:2'),
|
| 304 |
+
],
|
| 305 |
+
'content': [
|
| 306 |
+
(r'\s+', Text),
|
| 307 |
+
(r'\}', Punctuation, '#pop'),
|
| 308 |
+
(r';', Punctuation),
|
| 309 |
+
(r'^@.*?$', Comment.Preproc),
|
| 310 |
+
|
| 311 |
+
(words(_vendor_prefixes,), Keyword.Pseudo),
|
| 312 |
+
(r'('+r'|'.join(_css_properties)+r')(\s*)(\:)',
|
| 313 |
+
bygroups(Keyword, Text, Punctuation), 'value-start'),
|
| 314 |
+
(r'([a-zA-Z_][\w-]*)(\s*)(\:)', bygroups(Name, Text, Punctuation),
|
| 315 |
+
'value-start'),
|
| 316 |
+
|
| 317 |
+
(r'/\*(?:.|\n)*?\*/', Comment),
|
| 318 |
+
],
|
| 319 |
+
'value-start': [
|
| 320 |
+
(r'\s+', Text),
|
| 321 |
+
(words(_vendor_prefixes,), Name.Builtin.Pseudo),
|
| 322 |
+
include('urls'),
|
| 323 |
+
(r'('+r'|'.join(_functional_notation_keyword_values)+r')(\()',
|
| 324 |
+
bygroups(Name.Builtin, Punctuation), 'function-start'),
|
| 325 |
+
(r'([a-zA-Z_][\w-]+)(\()', bygroups(Name.Function, Punctuation), 'function-start'),
|
| 326 |
+
(words(_keyword_values, suffix=r'\b'), Keyword.Constant),
|
| 327 |
+
(words(_other_keyword_values, suffix=r'\b'), Keyword.Constant),
|
| 328 |
+
(words(_color_keywords, suffix=r'\b'), Keyword.Constant),
|
| 329 |
+
(words(_css_properties, suffix=r'\b'), Keyword), # for transition-property etc.
|
| 330 |
+
(r'\!important', Comment.Preproc),
|
| 331 |
+
(r'/\*(?:.|\n)*?\*/', Comment),
|
| 332 |
+
|
| 333 |
+
include('numeric-values'),
|
| 334 |
+
|
| 335 |
+
(r'[~^*!%&<>|+=@:./?-]+', Operator),
|
| 336 |
+
(r'[\[\](),]+', Punctuation),
|
| 337 |
+
(r'"(\\\\|\\"|[^"])*"', String.Double),
|
| 338 |
+
(r"'(\\\\|\\'|[^'])*'", String.Single),
|
| 339 |
+
(r'[a-zA-Z_][\w-]*', Name),
|
| 340 |
+
(r';', Punctuation, '#pop'),
|
| 341 |
+
(r'\}', Punctuation, '#pop:2'),
|
| 342 |
+
],
|
| 343 |
+
'function-start': [
|
| 344 |
+
(r'\s+', Text),
|
| 345 |
+
include('urls'),
|
| 346 |
+
(words(_vendor_prefixes,), Keyword.Pseudo),
|
| 347 |
+
(words(_keyword_values, suffix=r'\b'), Keyword.Constant),
|
| 348 |
+
(words(_other_keyword_values, suffix=r'\b'), Keyword.Constant),
|
| 349 |
+
(words(_color_keywords, suffix=r'\b'), Keyword.Constant),
|
| 350 |
+
|
| 351 |
+
# function-start may be entered recursively
|
| 352 |
+
(r'(' + r'|'.join(_functional_notation_keyword_values) + r')(\()',
|
| 353 |
+
bygroups(Name.Builtin, Punctuation), 'function-start'),
|
| 354 |
+
(r'([a-zA-Z_][\w-]+)(\()', bygroups(Name.Function, Punctuation), 'function-start'),
|
| 355 |
+
|
| 356 |
+
(r'/\*(?:.|\n)*?\*/', Comment),
|
| 357 |
+
include('numeric-values'),
|
| 358 |
+
(r'[*+/-]', Operator),
|
| 359 |
+
(r'[,]', Punctuation),
|
| 360 |
+
(r'"(\\\\|\\"|[^"])*"', String.Double),
|
| 361 |
+
(r"'(\\\\|\\'|[^'])*'", String.Single),
|
| 362 |
+
(r'[a-zA-Z_-]\w*', Name),
|
| 363 |
+
(r'\)', Punctuation, '#pop'),
|
| 364 |
+
],
|
| 365 |
+
'urls': [
|
| 366 |
+
(r'(url)(\()(".*?")(\))', bygroups(Name.Builtin, Punctuation,
|
| 367 |
+
String.Double, Punctuation)),
|
| 368 |
+
(r"(url)(\()('.*?')(\))", bygroups(Name.Builtin, Punctuation,
|
| 369 |
+
String.Single, Punctuation)),
|
| 370 |
+
(r'(url)(\()(.*?)(\))', bygroups(Name.Builtin, Punctuation,
|
| 371 |
+
String.Other, Punctuation)),
|
| 372 |
+
],
|
| 373 |
+
'numeric-values': [
|
| 374 |
+
(r'\#[a-zA-Z0-9]{1,6}', Number.Hex),
|
| 375 |
+
(r'[+\-]?[0-9]*[.][0-9]+', Number.Float, 'numeric-end'),
|
| 376 |
+
(r'[+\-]?[0-9]+', Number.Integer, 'numeric-end'),
|
| 377 |
+
],
|
| 378 |
+
'numeric-end': [
|
| 379 |
+
(words(_all_units, suffix=r'\b'), Keyword.Type),
|
| 380 |
+
(r'%', Keyword.Type),
|
| 381 |
+
default('#pop'),
|
| 382 |
+
],
|
| 383 |
+
}
|
| 384 |
+
|
| 385 |
+
|
| 386 |
+
common_sass_tokens = {
|
| 387 |
+
'value': [
|
| 388 |
+
(r'[ \t]+', Text),
|
| 389 |
+
(r'[!$][\w-]+', Name.Variable),
|
| 390 |
+
(r'url\(', String.Other, 'string-url'),
|
| 391 |
+
(r'[a-z_-][\w-]*(?=\()', Name.Function),
|
| 392 |
+
(words(_css_properties + (
|
| 393 |
+
'above', 'absolute', 'always', 'armenian', 'aural', 'auto', 'avoid', 'baseline',
|
| 394 |
+
'behind', 'below', 'bidi-override', 'blink', 'block', 'bold', 'bolder', 'both',
|
| 395 |
+
'capitalize', 'center-left', 'center-right', 'center', 'circle',
|
| 396 |
+
'cjk-ideographic', 'close-quote', 'collapse', 'condensed', 'continuous',
|
| 397 |
+
'crop', 'crosshair', 'cross', 'cursive', 'dashed', 'decimal-leading-zero',
|
| 398 |
+
'decimal', 'default', 'digits', 'disc', 'dotted', 'double', 'e-resize', 'embed',
|
| 399 |
+
'extra-condensed', 'extra-expanded', 'expanded', 'fantasy', 'far-left',
|
| 400 |
+
'far-right', 'faster', 'fast', 'fixed', 'georgian', 'groove', 'hebrew', 'help',
|
| 401 |
+
'hidden', 'hide', 'higher', 'high', 'hiragana-iroha', 'hiragana', 'icon',
|
| 402 |
+
'inherit', 'inline-table', 'inline', 'inset', 'inside', 'invert', 'italic',
|
| 403 |
+
'justify', 'katakana-iroha', 'katakana', 'landscape', 'larger', 'large',
|
| 404 |
+
'left-side', 'leftwards', 'level', 'lighter', 'line-through', 'list-item',
|
| 405 |
+
'loud', 'lower-alpha', 'lower-greek', 'lower-roman', 'lowercase', 'ltr',
|
| 406 |
+
'lower', 'low', 'medium', 'message-box', 'middle', 'mix', 'monospace',
|
| 407 |
+
'n-resize', 'narrower', 'ne-resize', 'no-close-quote', 'no-open-quote',
|
| 408 |
+
'no-repeat', 'none', 'normal', 'nowrap', 'nw-resize', 'oblique', 'once',
|
| 409 |
+
'open-quote', 'outset', 'outside', 'overline', 'pointer', 'portrait', 'px',
|
| 410 |
+
'relative', 'repeat-x', 'repeat-y', 'repeat', 'rgb', 'ridge', 'right-side',
|
| 411 |
+
'rightwards', 's-resize', 'sans-serif', 'scroll', 'se-resize',
|
| 412 |
+
'semi-condensed', 'semi-expanded', 'separate', 'serif', 'show', 'silent',
|
| 413 |
+
'slow', 'slower', 'small-caps', 'small-caption', 'smaller', 'soft', 'solid',
|
| 414 |
+
'spell-out', 'square', 'static', 'status-bar', 'super', 'sw-resize',
|
| 415 |
+
'table-caption', 'table-cell', 'table-column', 'table-column-group',
|
| 416 |
+
'table-footer-group', 'table-header-group', 'table-row',
|
| 417 |
+
'table-row-group', 'text', 'text-bottom', 'text-top', 'thick', 'thin',
|
| 418 |
+
'transparent', 'ultra-condensed', 'ultra-expanded', 'underline',
|
| 419 |
+
'upper-alpha', 'upper-latin', 'upper-roman', 'uppercase', 'url',
|
| 420 |
+
'visible', 'w-resize', 'wait', 'wider', 'x-fast', 'x-high', 'x-large', 'x-loud',
|
| 421 |
+
'x-low', 'x-small', 'x-soft', 'xx-large', 'xx-small', 'yes'), suffix=r'\b'),
|
| 422 |
+
Name.Constant),
|
| 423 |
+
(words(_color_keywords, suffix=r'\b'), Name.Entity),
|
| 424 |
+
(words((
|
| 425 |
+
'black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green',
|
| 426 |
+
'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua'), suffix=r'\b'),
|
| 427 |
+
Name.Builtin),
|
| 428 |
+
(r'\!(important|default)', Name.Exception),
|
| 429 |
+
(r'(true|false)', Name.Pseudo),
|
| 430 |
+
(r'(and|or|not)', Operator.Word),
|
| 431 |
+
(r'/\*', Comment.Multiline, 'inline-comment'),
|
| 432 |
+
(r'//[^\n]*', Comment.Single),
|
| 433 |
+
(r'\#[a-z0-9]{1,6}', Number.Hex),
|
| 434 |
+
(r'(-?\d+)(\%|[a-z]+)?', bygroups(Number.Integer, Keyword.Type)),
|
| 435 |
+
(r'(-?\d*\.\d+)(\%|[a-z]+)?', bygroups(Number.Float, Keyword.Type)),
|
| 436 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 437 |
+
(r'[~^*!&%<>|+=@:,./?-]+', Operator),
|
| 438 |
+
(r'[\[\]()]+', Punctuation),
|
| 439 |
+
(r'"', String.Double, 'string-double'),
|
| 440 |
+
(r"'", String.Single, 'string-single'),
|
| 441 |
+
(r'[a-z_-][\w-]*', Name),
|
| 442 |
+
],
|
| 443 |
+
|
| 444 |
+
'interpolation': [
|
| 445 |
+
(r'\}', String.Interpol, '#pop'),
|
| 446 |
+
include('value'),
|
| 447 |
+
],
|
| 448 |
+
|
| 449 |
+
'selector': [
|
| 450 |
+
(r'[ \t]+', Text),
|
| 451 |
+
(r'\:', Name.Decorator, 'pseudo-class'),
|
| 452 |
+
(r'\.', Name.Class, 'class'),
|
| 453 |
+
(r'\#', Name.Namespace, 'id'),
|
| 454 |
+
(r'[\w-]+', Name.Tag),
|
| 455 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 456 |
+
(r'&', Keyword),
|
| 457 |
+
(r'[~^*!&\[\]()<>|+=@:;,./?-]', Operator),
|
| 458 |
+
(r'"', String.Double, 'string-double'),
|
| 459 |
+
(r"'", String.Single, 'string-single'),
|
| 460 |
+
],
|
| 461 |
+
|
| 462 |
+
'string-double': [
|
| 463 |
+
(r'(\\.|#(?=[^\n{])|[^\n"#])+', String.Double),
|
| 464 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 465 |
+
(r'"', String.Double, '#pop'),
|
| 466 |
+
],
|
| 467 |
+
|
| 468 |
+
'string-single': [
|
| 469 |
+
(r"(\\.|#(?=[^\n{])|[^\n'#])+", String.Double),
|
| 470 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 471 |
+
(r"'", String.Double, '#pop'),
|
| 472 |
+
],
|
| 473 |
+
|
| 474 |
+
'string-url': [
|
| 475 |
+
(r'(\\#|#(?=[^\n{])|[^\n#)])+', String.Other),
|
| 476 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 477 |
+
(r'\)', String.Other, '#pop'),
|
| 478 |
+
],
|
| 479 |
+
|
| 480 |
+
'pseudo-class': [
|
| 481 |
+
(r'[\w-]+', Name.Decorator),
|
| 482 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 483 |
+
default('#pop'),
|
| 484 |
+
],
|
| 485 |
+
|
| 486 |
+
'class': [
|
| 487 |
+
(r'[\w-]+', Name.Class),
|
| 488 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 489 |
+
default('#pop'),
|
| 490 |
+
],
|
| 491 |
+
|
| 492 |
+
'id': [
|
| 493 |
+
(r'[\w-]+', Name.Namespace),
|
| 494 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 495 |
+
default('#pop'),
|
| 496 |
+
],
|
| 497 |
+
|
| 498 |
+
'for': [
|
| 499 |
+
(r'(from|to|through)', Operator.Word),
|
| 500 |
+
include('value'),
|
| 501 |
+
],
|
| 502 |
+
}
|
| 503 |
+
|
| 504 |
+
|
| 505 |
+
def _indentation(lexer, match, ctx):
|
| 506 |
+
indentation = match.group(0)
|
| 507 |
+
yield match.start(), Text, indentation
|
| 508 |
+
ctx.last_indentation = indentation
|
| 509 |
+
ctx.pos = match.end()
|
| 510 |
+
|
| 511 |
+
if hasattr(ctx, 'block_state') and ctx.block_state and \
|
| 512 |
+
indentation.startswith(ctx.block_indentation) and \
|
| 513 |
+
indentation != ctx.block_indentation:
|
| 514 |
+
ctx.stack.append(ctx.block_state)
|
| 515 |
+
else:
|
| 516 |
+
ctx.block_state = None
|
| 517 |
+
ctx.block_indentation = None
|
| 518 |
+
ctx.stack.append('content')
|
| 519 |
+
|
| 520 |
+
|
| 521 |
+
def _starts_block(token, state):
|
| 522 |
+
def callback(lexer, match, ctx):
|
| 523 |
+
yield match.start(), token, match.group(0)
|
| 524 |
+
|
| 525 |
+
if hasattr(ctx, 'last_indentation'):
|
| 526 |
+
ctx.block_indentation = ctx.last_indentation
|
| 527 |
+
else:
|
| 528 |
+
ctx.block_indentation = ''
|
| 529 |
+
|
| 530 |
+
ctx.block_state = state
|
| 531 |
+
ctx.pos = match.end()
|
| 532 |
+
|
| 533 |
+
return callback
|
| 534 |
+
|
| 535 |
+
|
| 536 |
+
class SassLexer(ExtendedRegexLexer):
|
| 537 |
+
"""
|
| 538 |
+
For Sass stylesheets.
|
| 539 |
+
|
| 540 |
+
.. versionadded:: 1.3
|
| 541 |
+
"""
|
| 542 |
+
|
| 543 |
+
name = 'Sass'
|
| 544 |
+
aliases = ['sass']
|
| 545 |
+
filenames = ['*.sass']
|
| 546 |
+
mimetypes = ['text/x-sass']
|
| 547 |
+
|
| 548 |
+
flags = re.IGNORECASE | re.MULTILINE
|
| 549 |
+
|
| 550 |
+
tokens = {
|
| 551 |
+
'root': [
|
| 552 |
+
(r'[ \t]*\n', Text),
|
| 553 |
+
(r'[ \t]*', _indentation),
|
| 554 |
+
],
|
| 555 |
+
|
| 556 |
+
'content': [
|
| 557 |
+
(r'//[^\n]*', _starts_block(Comment.Single, 'single-comment'),
|
| 558 |
+
'root'),
|
| 559 |
+
(r'/\*[^\n]*', _starts_block(Comment.Multiline, 'multi-comment'),
|
| 560 |
+
'root'),
|
| 561 |
+
(r'@import', Keyword, 'import'),
|
| 562 |
+
(r'@for', Keyword, 'for'),
|
| 563 |
+
(r'@(debug|warn|if|while)', Keyword, 'value'),
|
| 564 |
+
(r'(@mixin)( [\w-]+)', bygroups(Keyword, Name.Function), 'value'),
|
| 565 |
+
(r'(@include)( [\w-]+)', bygroups(Keyword, Name.Decorator), 'value'),
|
| 566 |
+
(r'@extend', Keyword, 'selector'),
|
| 567 |
+
(r'@[\w-]+', Keyword, 'selector'),
|
| 568 |
+
(r'=[\w-]+', Name.Function, 'value'),
|
| 569 |
+
(r'\+[\w-]+', Name.Decorator, 'value'),
|
| 570 |
+
(r'([!$][\w-]\w*)([ \t]*(?:(?:\|\|)?=|:))',
|
| 571 |
+
bygroups(Name.Variable, Operator), 'value'),
|
| 572 |
+
(r':', Name.Attribute, 'old-style-attr'),
|
| 573 |
+
(r'(?=.+?[=:]([^a-z]|$))', Name.Attribute, 'new-style-attr'),
|
| 574 |
+
default('selector'),
|
| 575 |
+
],
|
| 576 |
+
|
| 577 |
+
'single-comment': [
|
| 578 |
+
(r'.+', Comment.Single),
|
| 579 |
+
(r'\n', Text, 'root'),
|
| 580 |
+
],
|
| 581 |
+
|
| 582 |
+
'multi-comment': [
|
| 583 |
+
(r'.+', Comment.Multiline),
|
| 584 |
+
(r'\n', Text, 'root'),
|
| 585 |
+
],
|
| 586 |
+
|
| 587 |
+
'import': [
|
| 588 |
+
(r'[ \t]+', Text),
|
| 589 |
+
(r'\S+', String),
|
| 590 |
+
(r'\n', Text, 'root'),
|
| 591 |
+
],
|
| 592 |
+
|
| 593 |
+
'old-style-attr': [
|
| 594 |
+
(r'[^\s:="\[]+', Name.Attribute),
|
| 595 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 596 |
+
(r'[ \t]*=', Operator, 'value'),
|
| 597 |
+
default('value'),
|
| 598 |
+
],
|
| 599 |
+
|
| 600 |
+
'new-style-attr': [
|
| 601 |
+
(r'[^\s:="\[]+', Name.Attribute),
|
| 602 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 603 |
+
(r'[ \t]*[=:]', Operator, 'value'),
|
| 604 |
+
],
|
| 605 |
+
|
| 606 |
+
'inline-comment': [
|
| 607 |
+
(r"(\\#|#(?=[^\n{])|\*(?=[^\n/])|[^\n#*])+", Comment.Multiline),
|
| 608 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 609 |
+
(r"\*/", Comment, '#pop'),
|
| 610 |
+
],
|
| 611 |
+
}
|
| 612 |
+
for group, common in iteritems(common_sass_tokens):
|
| 613 |
+
tokens[group] = copy.copy(common)
|
| 614 |
+
tokens['value'].append((r'\n', Text, 'root'))
|
| 615 |
+
tokens['selector'].append((r'\n', Text, 'root'))
|
| 616 |
+
|
| 617 |
+
|
| 618 |
+
class ScssLexer(RegexLexer):
|
| 619 |
+
"""
|
| 620 |
+
For SCSS stylesheets.
|
| 621 |
+
"""
|
| 622 |
+
|
| 623 |
+
name = 'SCSS'
|
| 624 |
+
aliases = ['scss']
|
| 625 |
+
filenames = ['*.scss']
|
| 626 |
+
mimetypes = ['text/x-scss']
|
| 627 |
+
|
| 628 |
+
flags = re.IGNORECASE | re.DOTALL
|
| 629 |
+
tokens = {
|
| 630 |
+
'root': [
|
| 631 |
+
(r'\s+', Text),
|
| 632 |
+
(r'//.*?\n', Comment.Single),
|
| 633 |
+
(r'/\*.*?\*/', Comment.Multiline),
|
| 634 |
+
(r'@import', Keyword, 'value'),
|
| 635 |
+
(r'@for', Keyword, 'for'),
|
| 636 |
+
(r'@(debug|warn|if|while)', Keyword, 'value'),
|
| 637 |
+
(r'(@mixin)( [\w-]+)', bygroups(Keyword, Name.Function), 'value'),
|
| 638 |
+
(r'(@include)( [\w-]+)', bygroups(Keyword, Name.Decorator), 'value'),
|
| 639 |
+
(r'@extend', Keyword, 'selector'),
|
| 640 |
+
(r'(@media)(\s+)', bygroups(Keyword, Text), 'value'),
|
| 641 |
+
(r'@[\w-]+', Keyword, 'selector'),
|
| 642 |
+
(r'(\$[\w-]*\w)([ \t]*:)', bygroups(Name.Variable, Operator), 'value'),
|
| 643 |
+
# TODO: broken, and prone to infinite loops.
|
| 644 |
+
# (r'(?=[^;{}][;}])', Name.Attribute, 'attr'),
|
| 645 |
+
# (r'(?=[^;{}:]+:[^a-z])', Name.Attribute, 'attr'),
|
| 646 |
+
default('selector'),
|
| 647 |
+
],
|
| 648 |
+
|
| 649 |
+
'attr': [
|
| 650 |
+
(r'[^\s:="\[]+', Name.Attribute),
|
| 651 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 652 |
+
(r'[ \t]*:', Operator, 'value'),
|
| 653 |
+
default('#pop'),
|
| 654 |
+
],
|
| 655 |
+
|
| 656 |
+
'inline-comment': [
|
| 657 |
+
(r"(\\#|#(?=[^{])|\*(?=[^/])|[^#*])+", Comment.Multiline),
|
| 658 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 659 |
+
(r"\*/", Comment, '#pop'),
|
| 660 |
+
],
|
| 661 |
+
}
|
| 662 |
+
for group, common in iteritems(common_sass_tokens):
|
| 663 |
+
tokens[group] = copy.copy(common)
|
| 664 |
+
tokens['value'].extend([(r'\n', Text), (r'[;{}]', Punctuation, '#pop')])
|
| 665 |
+
tokens['selector'].extend([(r'\n', Text), (r'[;{}]', Punctuation, '#pop')])
|
| 666 |
+
|
| 667 |
+
|
| 668 |
+
class LessCssLexer(CssLexer):
|
| 669 |
+
"""
|
| 670 |
+
For `LESS <http://lesscss.org/>`_ styleshets.
|
| 671 |
+
|
| 672 |
+
.. versionadded:: 2.1
|
| 673 |
+
"""
|
| 674 |
+
|
| 675 |
+
name = 'LessCss'
|
| 676 |
+
aliases = ['less']
|
| 677 |
+
filenames = ['*.less']
|
| 678 |
+
mimetypes = ['text/x-less-css']
|
| 679 |
+
|
| 680 |
+
tokens = {
|
| 681 |
+
'root': [
|
| 682 |
+
(r'@\w+', Name.Variable),
|
| 683 |
+
inherit,
|
| 684 |
+
],
|
| 685 |
+
'content': [
|
| 686 |
+
(r'\{', Punctuation, '#push'),
|
| 687 |
+
inherit,
|
| 688 |
+
],
|
| 689 |
+
}
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/data.py
ADDED
|
@@ -0,0 +1,555 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.data
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexers for data file format.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 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, ExtendedRegexLexer, LexerContext, \
|
| 15 |
+
include, bygroups, inherit
|
| 16 |
+
from pygments.token import Text, Comment, Keyword, Name, String, Number, \
|
| 17 |
+
Punctuation, Literal, Error
|
| 18 |
+
|
| 19 |
+
__all__ = ['YamlLexer', 'JsonLexer', 'JsonBareObjectLexer', 'JsonLdLexer']
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
class YamlLexerContext(LexerContext):
|
| 23 |
+
"""Indentation context for the YAML lexer."""
|
| 24 |
+
|
| 25 |
+
def __init__(self, *args, **kwds):
|
| 26 |
+
super(YamlLexerContext, self).__init__(*args, **kwds)
|
| 27 |
+
self.indent_stack = []
|
| 28 |
+
self.indent = -1
|
| 29 |
+
self.next_indent = 0
|
| 30 |
+
self.block_scalar_indent = None
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
class YamlLexer(ExtendedRegexLexer):
|
| 34 |
+
"""
|
| 35 |
+
Lexer for `YAML <http://yaml.org/>`_, a human-friendly data serialization
|
| 36 |
+
language.
|
| 37 |
+
|
| 38 |
+
.. versionadded:: 0.11
|
| 39 |
+
"""
|
| 40 |
+
|
| 41 |
+
name = 'YAML'
|
| 42 |
+
aliases = ['yaml']
|
| 43 |
+
filenames = ['*.yaml', '*.yml']
|
| 44 |
+
mimetypes = ['text/x-yaml']
|
| 45 |
+
|
| 46 |
+
def something(token_class):
|
| 47 |
+
"""Do not produce empty tokens."""
|
| 48 |
+
def callback(lexer, match, context):
|
| 49 |
+
text = match.group()
|
| 50 |
+
if not text:
|
| 51 |
+
return
|
| 52 |
+
yield match.start(), token_class, text
|
| 53 |
+
context.pos = match.end()
|
| 54 |
+
return callback
|
| 55 |
+
|
| 56 |
+
def reset_indent(token_class):
|
| 57 |
+
"""Reset the indentation levels."""
|
| 58 |
+
def callback(lexer, match, context):
|
| 59 |
+
text = match.group()
|
| 60 |
+
context.indent_stack = []
|
| 61 |
+
context.indent = -1
|
| 62 |
+
context.next_indent = 0
|
| 63 |
+
context.block_scalar_indent = None
|
| 64 |
+
yield match.start(), token_class, text
|
| 65 |
+
context.pos = match.end()
|
| 66 |
+
return callback
|
| 67 |
+
|
| 68 |
+
def save_indent(token_class, start=False):
|
| 69 |
+
"""Save a possible indentation level."""
|
| 70 |
+
def callback(lexer, match, context):
|
| 71 |
+
text = match.group()
|
| 72 |
+
extra = ''
|
| 73 |
+
if start:
|
| 74 |
+
context.next_indent = len(text)
|
| 75 |
+
if context.next_indent < context.indent:
|
| 76 |
+
while context.next_indent < context.indent:
|
| 77 |
+
context.indent = context.indent_stack.pop()
|
| 78 |
+
if context.next_indent > context.indent:
|
| 79 |
+
extra = text[context.indent:]
|
| 80 |
+
text = text[:context.indent]
|
| 81 |
+
else:
|
| 82 |
+
context.next_indent += len(text)
|
| 83 |
+
if text:
|
| 84 |
+
yield match.start(), token_class, text
|
| 85 |
+
if extra:
|
| 86 |
+
yield match.start()+len(text), token_class.Error, extra
|
| 87 |
+
context.pos = match.end()
|
| 88 |
+
return callback
|
| 89 |
+
|
| 90 |
+
def set_indent(token_class, implicit=False):
|
| 91 |
+
"""Set the previously saved indentation level."""
|
| 92 |
+
def callback(lexer, match, context):
|
| 93 |
+
text = match.group()
|
| 94 |
+
if context.indent < context.next_indent:
|
| 95 |
+
context.indent_stack.append(context.indent)
|
| 96 |
+
context.indent = context.next_indent
|
| 97 |
+
if not implicit:
|
| 98 |
+
context.next_indent += len(text)
|
| 99 |
+
yield match.start(), token_class, text
|
| 100 |
+
context.pos = match.end()
|
| 101 |
+
return callback
|
| 102 |
+
|
| 103 |
+
def set_block_scalar_indent(token_class):
|
| 104 |
+
"""Set an explicit indentation level for a block scalar."""
|
| 105 |
+
def callback(lexer, match, context):
|
| 106 |
+
text = match.group()
|
| 107 |
+
context.block_scalar_indent = None
|
| 108 |
+
if not text:
|
| 109 |
+
return
|
| 110 |
+
increment = match.group(1)
|
| 111 |
+
if increment:
|
| 112 |
+
current_indent = max(context.indent, 0)
|
| 113 |
+
increment = int(increment)
|
| 114 |
+
context.block_scalar_indent = current_indent + increment
|
| 115 |
+
if text:
|
| 116 |
+
yield match.start(), token_class, text
|
| 117 |
+
context.pos = match.end()
|
| 118 |
+
return callback
|
| 119 |
+
|
| 120 |
+
def parse_block_scalar_empty_line(indent_token_class, content_token_class):
|
| 121 |
+
"""Process an empty line in a block scalar."""
|
| 122 |
+
def callback(lexer, match, context):
|
| 123 |
+
text = match.group()
|
| 124 |
+
if (context.block_scalar_indent is None or
|
| 125 |
+
len(text) <= context.block_scalar_indent):
|
| 126 |
+
if text:
|
| 127 |
+
yield match.start(), indent_token_class, text
|
| 128 |
+
else:
|
| 129 |
+
indentation = text[:context.block_scalar_indent]
|
| 130 |
+
content = text[context.block_scalar_indent:]
|
| 131 |
+
yield match.start(), indent_token_class, indentation
|
| 132 |
+
yield (match.start()+context.block_scalar_indent,
|
| 133 |
+
content_token_class, content)
|
| 134 |
+
context.pos = match.end()
|
| 135 |
+
return callback
|
| 136 |
+
|
| 137 |
+
def parse_block_scalar_indent(token_class):
|
| 138 |
+
"""Process indentation spaces in a block scalar."""
|
| 139 |
+
def callback(lexer, match, context):
|
| 140 |
+
text = match.group()
|
| 141 |
+
if context.block_scalar_indent is None:
|
| 142 |
+
if len(text) <= max(context.indent, 0):
|
| 143 |
+
context.stack.pop()
|
| 144 |
+
context.stack.pop()
|
| 145 |
+
return
|
| 146 |
+
context.block_scalar_indent = len(text)
|
| 147 |
+
else:
|
| 148 |
+
if len(text) < context.block_scalar_indent:
|
| 149 |
+
context.stack.pop()
|
| 150 |
+
context.stack.pop()
|
| 151 |
+
return
|
| 152 |
+
if text:
|
| 153 |
+
yield match.start(), token_class, text
|
| 154 |
+
context.pos = match.end()
|
| 155 |
+
return callback
|
| 156 |
+
|
| 157 |
+
def parse_plain_scalar_indent(token_class):
|
| 158 |
+
"""Process indentation spaces in a plain scalar."""
|
| 159 |
+
def callback(lexer, match, context):
|
| 160 |
+
text = match.group()
|
| 161 |
+
if len(text) <= context.indent:
|
| 162 |
+
context.stack.pop()
|
| 163 |
+
context.stack.pop()
|
| 164 |
+
return
|
| 165 |
+
if text:
|
| 166 |
+
yield match.start(), token_class, text
|
| 167 |
+
context.pos = match.end()
|
| 168 |
+
return callback
|
| 169 |
+
|
| 170 |
+
tokens = {
|
| 171 |
+
# the root rules
|
| 172 |
+
'root': [
|
| 173 |
+
# ignored whitespaces
|
| 174 |
+
(r'[ ]+(?=#|$)', Text),
|
| 175 |
+
# line breaks
|
| 176 |
+
(r'\n+', Text),
|
| 177 |
+
# a comment
|
| 178 |
+
(r'#[^\n]*', Comment.Single),
|
| 179 |
+
# the '%YAML' directive
|
| 180 |
+
(r'^%YAML(?=[ ]|$)', reset_indent(Name.Tag), 'yaml-directive'),
|
| 181 |
+
# the %TAG directive
|
| 182 |
+
(r'^%TAG(?=[ ]|$)', reset_indent(Name.Tag), 'tag-directive'),
|
| 183 |
+
# document start and document end indicators
|
| 184 |
+
(r'^(?:---|\.\.\.)(?=[ ]|$)', reset_indent(Name.Namespace),
|
| 185 |
+
'block-line'),
|
| 186 |
+
# indentation spaces
|
| 187 |
+
(r'[ ]*(?!\s|$)', save_indent(Text, start=True),
|
| 188 |
+
('block-line', 'indentation')),
|
| 189 |
+
],
|
| 190 |
+
|
| 191 |
+
# trailing whitespaces after directives or a block scalar indicator
|
| 192 |
+
'ignored-line': [
|
| 193 |
+
# ignored whitespaces
|
| 194 |
+
(r'[ ]+(?=#|$)', Text),
|
| 195 |
+
# a comment
|
| 196 |
+
(r'#[^\n]*', Comment.Single),
|
| 197 |
+
# line break
|
| 198 |
+
(r'\n', Text, '#pop:2'),
|
| 199 |
+
],
|
| 200 |
+
|
| 201 |
+
# the %YAML directive
|
| 202 |
+
'yaml-directive': [
|
| 203 |
+
# the version number
|
| 204 |
+
(r'([ ]+)([0-9]+\.[0-9]+)',
|
| 205 |
+
bygroups(Text, Number), 'ignored-line'),
|
| 206 |
+
],
|
| 207 |
+
|
| 208 |
+
# the %YAG directive
|
| 209 |
+
'tag-directive': [
|
| 210 |
+
# a tag handle and the corresponding prefix
|
| 211 |
+
(r'([ ]+)(!|![\w-]*!)'
|
| 212 |
+
r'([ ]+)(!|!?[\w;/?:@&=+$,.!~*\'()\[\]%-]+)',
|
| 213 |
+
bygroups(Text, Keyword.Type, Text, Keyword.Type),
|
| 214 |
+
'ignored-line'),
|
| 215 |
+
],
|
| 216 |
+
|
| 217 |
+
# block scalar indicators and indentation spaces
|
| 218 |
+
'indentation': [
|
| 219 |
+
# trailing whitespaces are ignored
|
| 220 |
+
(r'[ ]*$', something(Text), '#pop:2'),
|
| 221 |
+
# whitespaces preceeding block collection indicators
|
| 222 |
+
(r'[ ]+(?=[?:-](?:[ ]|$))', save_indent(Text)),
|
| 223 |
+
# block collection indicators
|
| 224 |
+
(r'[?:-](?=[ ]|$)', set_indent(Punctuation.Indicator)),
|
| 225 |
+
# the beginning a block line
|
| 226 |
+
(r'[ ]*', save_indent(Text), '#pop'),
|
| 227 |
+
],
|
| 228 |
+
|
| 229 |
+
# an indented line in the block context
|
| 230 |
+
'block-line': [
|
| 231 |
+
# the line end
|
| 232 |
+
(r'[ ]*(?=#|$)', something(Text), '#pop'),
|
| 233 |
+
# whitespaces separating tokens
|
| 234 |
+
(r'[ ]+', Text),
|
| 235 |
+
# tags, anchors and aliases,
|
| 236 |
+
include('descriptors'),
|
| 237 |
+
# block collections and scalars
|
| 238 |
+
include('block-nodes'),
|
| 239 |
+
# flow collections and quoted scalars
|
| 240 |
+
include('flow-nodes'),
|
| 241 |
+
# a plain scalar
|
| 242 |
+
(r'(?=[^\s?:,\[\]{}#&*!|>\'"%@`-]|[?:-]\S)',
|
| 243 |
+
something(Name.Variable),
|
| 244 |
+
'plain-scalar-in-block-context'),
|
| 245 |
+
],
|
| 246 |
+
|
| 247 |
+
# tags, anchors, aliases
|
| 248 |
+
'descriptors': [
|
| 249 |
+
# a full-form tag
|
| 250 |
+
(r'!<[\w#;/?:@&=+$,.!~*\'()\[\]%-]+>', Keyword.Type),
|
| 251 |
+
# a tag in the form '!', '!suffix' or '!handle!suffix'
|
| 252 |
+
(r'!(?:[\w-]+!)?'
|
| 253 |
+
r'[\w#;/?:@&=+$,.!~*\'()\[\]%-]+', Keyword.Type),
|
| 254 |
+
# an anchor
|
| 255 |
+
(r'&[\w-]+', Name.Label),
|
| 256 |
+
# an alias
|
| 257 |
+
(r'\*[\w-]+', Name.Variable),
|
| 258 |
+
],
|
| 259 |
+
|
| 260 |
+
# block collections and scalars
|
| 261 |
+
'block-nodes': [
|
| 262 |
+
# implicit key
|
| 263 |
+
(r':(?=[ ]|$)', set_indent(Punctuation.Indicator, implicit=True)),
|
| 264 |
+
# literal and folded scalars
|
| 265 |
+
(r'[|>]', Punctuation.Indicator,
|
| 266 |
+
('block-scalar-content', 'block-scalar-header')),
|
| 267 |
+
],
|
| 268 |
+
|
| 269 |
+
# flow collections and quoted scalars
|
| 270 |
+
'flow-nodes': [
|
| 271 |
+
# a flow sequence
|
| 272 |
+
(r'\[', Punctuation.Indicator, 'flow-sequence'),
|
| 273 |
+
# a flow mapping
|
| 274 |
+
(r'\{', Punctuation.Indicator, 'flow-mapping'),
|
| 275 |
+
# a single-quoted scalar
|
| 276 |
+
(r'\'', String, 'single-quoted-scalar'),
|
| 277 |
+
# a double-quoted scalar
|
| 278 |
+
(r'\"', String, 'double-quoted-scalar'),
|
| 279 |
+
],
|
| 280 |
+
|
| 281 |
+
# the content of a flow collection
|
| 282 |
+
'flow-collection': [
|
| 283 |
+
# whitespaces
|
| 284 |
+
(r'[ ]+', Text),
|
| 285 |
+
# line breaks
|
| 286 |
+
(r'\n+', Text),
|
| 287 |
+
# a comment
|
| 288 |
+
(r'#[^\n]*', Comment.Single),
|
| 289 |
+
# simple indicators
|
| 290 |
+
(r'[?:,]', Punctuation.Indicator),
|
| 291 |
+
# tags, anchors and aliases
|
| 292 |
+
include('descriptors'),
|
| 293 |
+
# nested collections and quoted scalars
|
| 294 |
+
include('flow-nodes'),
|
| 295 |
+
# a plain scalar
|
| 296 |
+
(r'(?=[^\s?:,\[\]{}#&*!|>\'"%@`])',
|
| 297 |
+
something(Name.Variable),
|
| 298 |
+
'plain-scalar-in-flow-context'),
|
| 299 |
+
],
|
| 300 |
+
|
| 301 |
+
# a flow sequence indicated by '[' and ']'
|
| 302 |
+
'flow-sequence': [
|
| 303 |
+
# include flow collection rules
|
| 304 |
+
include('flow-collection'),
|
| 305 |
+
# the closing indicator
|
| 306 |
+
(r'\]', Punctuation.Indicator, '#pop'),
|
| 307 |
+
],
|
| 308 |
+
|
| 309 |
+
# a flow mapping indicated by '{' and '}'
|
| 310 |
+
'flow-mapping': [
|
| 311 |
+
# include flow collection rules
|
| 312 |
+
include('flow-collection'),
|
| 313 |
+
# the closing indicator
|
| 314 |
+
(r'\}', Punctuation.Indicator, '#pop'),
|
| 315 |
+
],
|
| 316 |
+
|
| 317 |
+
# block scalar lines
|
| 318 |
+
'block-scalar-content': [
|
| 319 |
+
# line break
|
| 320 |
+
(r'\n', Text),
|
| 321 |
+
# empty line
|
| 322 |
+
(r'^[ ]+$',
|
| 323 |
+
parse_block_scalar_empty_line(Text, Name.Constant)),
|
| 324 |
+
# indentation spaces (we may leave the state here)
|
| 325 |
+
(r'^[ ]*', parse_block_scalar_indent(Text)),
|
| 326 |
+
# line content
|
| 327 |
+
(r'[\S\t ]+', Name.Constant),
|
| 328 |
+
],
|
| 329 |
+
|
| 330 |
+
# the content of a literal or folded scalar
|
| 331 |
+
'block-scalar-header': [
|
| 332 |
+
# indentation indicator followed by chomping flag
|
| 333 |
+
(r'([1-9])?[+-]?(?=[ ]|$)',
|
| 334 |
+
set_block_scalar_indent(Punctuation.Indicator),
|
| 335 |
+
'ignored-line'),
|
| 336 |
+
# chomping flag followed by indentation indicator
|
| 337 |
+
(r'[+-]?([1-9])?(?=[ ]|$)',
|
| 338 |
+
set_block_scalar_indent(Punctuation.Indicator),
|
| 339 |
+
'ignored-line'),
|
| 340 |
+
],
|
| 341 |
+
|
| 342 |
+
# ignored and regular whitespaces in quoted scalars
|
| 343 |
+
'quoted-scalar-whitespaces': [
|
| 344 |
+
# leading and trailing whitespaces are ignored
|
| 345 |
+
(r'^[ ]+', Text),
|
| 346 |
+
(r'[ ]+$', Text),
|
| 347 |
+
# line breaks are ignored
|
| 348 |
+
(r'\n+', Text),
|
| 349 |
+
# other whitespaces are a part of the value
|
| 350 |
+
(r'[ ]+', Name.Variable),
|
| 351 |
+
],
|
| 352 |
+
|
| 353 |
+
# single-quoted scalars
|
| 354 |
+
'single-quoted-scalar': [
|
| 355 |
+
# include whitespace and line break rules
|
| 356 |
+
include('quoted-scalar-whitespaces'),
|
| 357 |
+
# escaping of the quote character
|
| 358 |
+
(r'\'\'', String.Escape),
|
| 359 |
+
# regular non-whitespace characters
|
| 360 |
+
(r'[^\s\']+', String),
|
| 361 |
+
# the closing quote
|
| 362 |
+
(r'\'', String, '#pop'),
|
| 363 |
+
],
|
| 364 |
+
|
| 365 |
+
# double-quoted scalars
|
| 366 |
+
'double-quoted-scalar': [
|
| 367 |
+
# include whitespace and line break rules
|
| 368 |
+
include('quoted-scalar-whitespaces'),
|
| 369 |
+
# escaping of special characters
|
| 370 |
+
(r'\\[0abt\tn\nvfre "\\N_LP]', String),
|
| 371 |
+
# escape codes
|
| 372 |
+
(r'\\(?:x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})',
|
| 373 |
+
String.Escape),
|
| 374 |
+
# regular non-whitespace characters
|
| 375 |
+
(r'[^\s"\\]+', String),
|
| 376 |
+
# the closing quote
|
| 377 |
+
(r'"', String, '#pop'),
|
| 378 |
+
],
|
| 379 |
+
|
| 380 |
+
# the beginning of a new line while scanning a plain scalar
|
| 381 |
+
'plain-scalar-in-block-context-new-line': [
|
| 382 |
+
# empty lines
|
| 383 |
+
(r'^[ ]+$', Text),
|
| 384 |
+
# line breaks
|
| 385 |
+
(r'\n+', Text),
|
| 386 |
+
# document start and document end indicators
|
| 387 |
+
(r'^(?=---|\.\.\.)', something(Name.Namespace), '#pop:3'),
|
| 388 |
+
# indentation spaces (we may leave the block line state here)
|
| 389 |
+
(r'^[ ]*', parse_plain_scalar_indent(Text), '#pop'),
|
| 390 |
+
],
|
| 391 |
+
|
| 392 |
+
# a plain scalar in the block context
|
| 393 |
+
'plain-scalar-in-block-context': [
|
| 394 |
+
# the scalar ends with the ':' indicator
|
| 395 |
+
(r'[ ]*(?=:[ ]|:$)', something(Text), '#pop'),
|
| 396 |
+
# the scalar ends with whitespaces followed by a comment
|
| 397 |
+
(r'[ ]+(?=#)', Text, '#pop'),
|
| 398 |
+
# trailing whitespaces are ignored
|
| 399 |
+
(r'[ ]+$', Text),
|
| 400 |
+
# line breaks are ignored
|
| 401 |
+
(r'\n+', Text, 'plain-scalar-in-block-context-new-line'),
|
| 402 |
+
# other whitespaces are a part of the value
|
| 403 |
+
(r'[ ]+', Literal.Scalar.Plain),
|
| 404 |
+
# regular non-whitespace characters
|
| 405 |
+
(r'(?::(?!\s)|[^\s:])+', Literal.Scalar.Plain),
|
| 406 |
+
],
|
| 407 |
+
|
| 408 |
+
# a plain scalar is the flow context
|
| 409 |
+
'plain-scalar-in-flow-context': [
|
| 410 |
+
# the scalar ends with an indicator character
|
| 411 |
+
(r'[ ]*(?=[,:?\[\]{}])', something(Text), '#pop'),
|
| 412 |
+
# the scalar ends with a comment
|
| 413 |
+
(r'[ ]+(?=#)', Text, '#pop'),
|
| 414 |
+
# leading and trailing whitespaces are ignored
|
| 415 |
+
(r'^[ ]+', Text),
|
| 416 |
+
(r'[ ]+$', Text),
|
| 417 |
+
# line breaks are ignored
|
| 418 |
+
(r'\n+', Text),
|
| 419 |
+
# other whitespaces are a part of the value
|
| 420 |
+
(r'[ ]+', Name.Variable),
|
| 421 |
+
# regular non-whitespace characters
|
| 422 |
+
(r'[^\s,:?\[\]{}]+', Name.Variable),
|
| 423 |
+
],
|
| 424 |
+
|
| 425 |
+
}
|
| 426 |
+
|
| 427 |
+
def get_tokens_unprocessed(self, text=None, context=None):
|
| 428 |
+
if context is None:
|
| 429 |
+
context = YamlLexerContext(text, 0)
|
| 430 |
+
return super(YamlLexer, self).get_tokens_unprocessed(text, context)
|
| 431 |
+
|
| 432 |
+
|
| 433 |
+
class JsonLexer(RegexLexer):
|
| 434 |
+
"""
|
| 435 |
+
For JSON data structures.
|
| 436 |
+
|
| 437 |
+
.. versionadded:: 1.5
|
| 438 |
+
"""
|
| 439 |
+
|
| 440 |
+
name = 'JSON'
|
| 441 |
+
aliases = ['json']
|
| 442 |
+
filenames = ['*.json']
|
| 443 |
+
mimetypes = ['application/json']
|
| 444 |
+
|
| 445 |
+
flags = re.DOTALL
|
| 446 |
+
|
| 447 |
+
# integer part of a number
|
| 448 |
+
int_part = r'-?(0|[1-9]\d*)'
|
| 449 |
+
|
| 450 |
+
# fractional part of a number
|
| 451 |
+
frac_part = r'\.\d+'
|
| 452 |
+
|
| 453 |
+
# exponential part of a number
|
| 454 |
+
exp_part = r'[eE](\+|-)?\d+'
|
| 455 |
+
|
| 456 |
+
tokens = {
|
| 457 |
+
'whitespace': [
|
| 458 |
+
(r'\s+', Text),
|
| 459 |
+
],
|
| 460 |
+
|
| 461 |
+
# represents a simple terminal value
|
| 462 |
+
'simplevalue': [
|
| 463 |
+
(r'(true|false|null)\b', Keyword.Constant),
|
| 464 |
+
(('%(int_part)s(%(frac_part)s%(exp_part)s|'
|
| 465 |
+
'%(exp_part)s|%(frac_part)s)') % vars(),
|
| 466 |
+
Number.Float),
|
| 467 |
+
(int_part, Number.Integer),
|
| 468 |
+
(r'"(\\\\|\\"|[^"])*"', String.Double),
|
| 469 |
+
],
|
| 470 |
+
|
| 471 |
+
|
| 472 |
+
# the right hand side of an object, after the attribute name
|
| 473 |
+
'objectattribute': [
|
| 474 |
+
include('value'),
|
| 475 |
+
(r':', Punctuation),
|
| 476 |
+
# comma terminates the attribute but expects more
|
| 477 |
+
(r',', Punctuation, '#pop'),
|
| 478 |
+
# a closing bracket terminates the entire object, so pop twice
|
| 479 |
+
(r'\}', Punctuation, '#pop:2'),
|
| 480 |
+
],
|
| 481 |
+
|
| 482 |
+
# a json object - { attr, attr, ... }
|
| 483 |
+
'objectvalue': [
|
| 484 |
+
include('whitespace'),
|
| 485 |
+
(r'"(\\\\|\\"|[^"])*"', Name.Tag, 'objectattribute'),
|
| 486 |
+
(r'\}', Punctuation, '#pop'),
|
| 487 |
+
],
|
| 488 |
+
|
| 489 |
+
# json array - [ value, value, ... }
|
| 490 |
+
'arrayvalue': [
|
| 491 |
+
include('whitespace'),
|
| 492 |
+
include('value'),
|
| 493 |
+
(r',', Punctuation),
|
| 494 |
+
(r'\]', Punctuation, '#pop'),
|
| 495 |
+
],
|
| 496 |
+
|
| 497 |
+
# a json value - either a simple value or a complex value (object or array)
|
| 498 |
+
'value': [
|
| 499 |
+
include('whitespace'),
|
| 500 |
+
include('simplevalue'),
|
| 501 |
+
(r'\{', Punctuation, 'objectvalue'),
|
| 502 |
+
(r'\[', Punctuation, 'arrayvalue'),
|
| 503 |
+
],
|
| 504 |
+
|
| 505 |
+
# the root of a json document whould be a value
|
| 506 |
+
'root': [
|
| 507 |
+
include('value'),
|
| 508 |
+
],
|
| 509 |
+
}
|
| 510 |
+
|
| 511 |
+
|
| 512 |
+
class JsonBareObjectLexer(JsonLexer):
|
| 513 |
+
"""
|
| 514 |
+
For JSON data structures (with missing object curly braces).
|
| 515 |
+
|
| 516 |
+
.. versionadded:: 2.2
|
| 517 |
+
"""
|
| 518 |
+
|
| 519 |
+
name = 'JSONBareObject'
|
| 520 |
+
aliases = ['json-object']
|
| 521 |
+
filenames = []
|
| 522 |
+
mimetypes = ['application/json-object']
|
| 523 |
+
|
| 524 |
+
tokens = {
|
| 525 |
+
'root': [
|
| 526 |
+
(r'\}', Error),
|
| 527 |
+
include('objectvalue'),
|
| 528 |
+
],
|
| 529 |
+
'objectattribute': [
|
| 530 |
+
(r'\}', Error),
|
| 531 |
+
inherit,
|
| 532 |
+
],
|
| 533 |
+
}
|
| 534 |
+
|
| 535 |
+
|
| 536 |
+
class JsonLdLexer(JsonLexer):
|
| 537 |
+
"""
|
| 538 |
+
For `JSON-LD <http://json-ld.org/>`_ linked data.
|
| 539 |
+
|
| 540 |
+
.. versionadded:: 2.0
|
| 541 |
+
"""
|
| 542 |
+
|
| 543 |
+
name = 'JSON-LD'
|
| 544 |
+
aliases = ['jsonld', 'json-ld']
|
| 545 |
+
filenames = ['*.jsonld']
|
| 546 |
+
mimetypes = ['application/ld+json']
|
| 547 |
+
|
| 548 |
+
tokens = {
|
| 549 |
+
'objectvalue': [
|
| 550 |
+
(r'"@(context|id|value|language|type|container|list|set|'
|
| 551 |
+
r'reverse|index|base|vocab|graph)"', Name.Decorator,
|
| 552 |
+
'objectattribute'),
|
| 553 |
+
inherit,
|
| 554 |
+
],
|
| 555 |
+
}
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/dotnet.py
ADDED
|
@@ -0,0 +1,691 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.dotnet
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexers for .net languages.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
import re
|
| 12 |
+
|
| 13 |
+
from pygments.lexer import RegexLexer, DelegatingLexer, bygroups, include, \
|
| 14 |
+
using, this, default, words
|
| 15 |
+
from pygments.token import Punctuation, \
|
| 16 |
+
Text, Comment, Operator, Keyword, Name, String, Number, Literal, Other
|
| 17 |
+
from pygments.util import get_choice_opt, iteritems
|
| 18 |
+
from pygments import unistring as uni
|
| 19 |
+
|
| 20 |
+
from pygments.lexers.html import XmlLexer
|
| 21 |
+
|
| 22 |
+
__all__ = ['CSharpLexer', 'NemerleLexer', 'BooLexer', 'VbNetLexer',
|
| 23 |
+
'CSharpAspxLexer', 'VbNetAspxLexer', 'FSharpLexer']
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
class CSharpLexer(RegexLexer):
|
| 27 |
+
"""
|
| 28 |
+
For `C# <http://msdn2.microsoft.com/en-us/vcsharp/default.aspx>`_
|
| 29 |
+
source code.
|
| 30 |
+
|
| 31 |
+
Additional options accepted:
|
| 32 |
+
|
| 33 |
+
`unicodelevel`
|
| 34 |
+
Determines which Unicode characters this lexer allows for identifiers.
|
| 35 |
+
The possible values are:
|
| 36 |
+
|
| 37 |
+
* ``none`` -- only the ASCII letters and numbers are allowed. This
|
| 38 |
+
is the fastest selection.
|
| 39 |
+
* ``basic`` -- all Unicode characters from the specification except
|
| 40 |
+
category ``Lo`` are allowed.
|
| 41 |
+
* ``full`` -- all Unicode characters as specified in the C# specs
|
| 42 |
+
are allowed. Note that this means a considerable slowdown since the
|
| 43 |
+
``Lo`` category has more than 40,000 characters in it!
|
| 44 |
+
|
| 45 |
+
The default value is ``basic``.
|
| 46 |
+
|
| 47 |
+
.. versionadded:: 0.8
|
| 48 |
+
"""
|
| 49 |
+
|
| 50 |
+
name = 'C#'
|
| 51 |
+
aliases = ['csharp', 'c#']
|
| 52 |
+
filenames = ['*.cs']
|
| 53 |
+
mimetypes = ['text/x-csharp'] # inferred
|
| 54 |
+
|
| 55 |
+
flags = re.MULTILINE | re.DOTALL | re.UNICODE
|
| 56 |
+
|
| 57 |
+
# for the range of allowed unicode characters in identifiers, see
|
| 58 |
+
# http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf
|
| 59 |
+
|
| 60 |
+
levels = {
|
| 61 |
+
'none': '@?[_a-zA-Z]\w*',
|
| 62 |
+
'basic': ('@?[_' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl') + ']' +
|
| 63 |
+
'[' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl', 'Nd', 'Pc',
|
| 64 |
+
'Cf', 'Mn', 'Mc') + ']*'),
|
| 65 |
+
'full': ('@?(?:_|[^' +
|
| 66 |
+
uni.allexcept('Lu', 'Ll', 'Lt', 'Lm', 'Lo', 'Nl') + '])'
|
| 67 |
+
+ '[^' + uni.allexcept('Lu', 'Ll', 'Lt', 'Lm', 'Lo', 'Nl',
|
| 68 |
+
'Nd', 'Pc', 'Cf', 'Mn', 'Mc') + ']*'),
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
tokens = {}
|
| 72 |
+
token_variants = True
|
| 73 |
+
|
| 74 |
+
for levelname, cs_ident in iteritems(levels):
|
| 75 |
+
tokens[levelname] = {
|
| 76 |
+
'root': [
|
| 77 |
+
# method names
|
| 78 |
+
(r'^([ \t]*(?:' + cs_ident + r'(?:\[\])?\s+)+?)' # return type
|
| 79 |
+
r'(' + cs_ident + ')' # method name
|
| 80 |
+
r'(\s*)(\()', # signature start
|
| 81 |
+
bygroups(using(this), Name.Function, Text, Punctuation)),
|
| 82 |
+
(r'^\s*\[.*?\]', Name.Attribute),
|
| 83 |
+
(r'[^\S\n]+', Text),
|
| 84 |
+
(r'\\\n', Text), # line continuation
|
| 85 |
+
(r'//.*?\n', Comment.Single),
|
| 86 |
+
(r'/[*].*?[*]/', Comment.Multiline),
|
| 87 |
+
(r'\n', Text),
|
| 88 |
+
(r'[~!%^&*()+=|\[\]:;,.<>/?-]', Punctuation),
|
| 89 |
+
(r'[{}]', Punctuation),
|
| 90 |
+
(r'@"(""|[^"])*"', String),
|
| 91 |
+
(r'"(\\\\|\\"|[^"\n])*["\n]', String),
|
| 92 |
+
(r"'\\.'|'[^\\]'", String.Char),
|
| 93 |
+
(r"[0-9](\.[0-9]*)?([eE][+-][0-9]+)?"
|
| 94 |
+
r"[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?", Number),
|
| 95 |
+
(r'#[ \t]*(if|endif|else|elif|define|undef|'
|
| 96 |
+
r'line|error|warning|region|endregion|pragma)\b.*?\n',
|
| 97 |
+
Comment.Preproc),
|
| 98 |
+
(r'\b(extern)(\s+)(alias)\b', bygroups(Keyword, Text,
|
| 99 |
+
Keyword)),
|
| 100 |
+
(r'(abstract|as|async|await|base|break|by|case|catch|'
|
| 101 |
+
r'checked|const|continue|default|delegate|'
|
| 102 |
+
r'do|else|enum|event|explicit|extern|false|finally|'
|
| 103 |
+
r'fixed|for|foreach|goto|if|implicit|in|interface|'
|
| 104 |
+
r'internal|is|let|lock|new|null|on|operator|'
|
| 105 |
+
r'out|override|params|private|protected|public|readonly|'
|
| 106 |
+
r'ref|return|sealed|sizeof|stackalloc|static|'
|
| 107 |
+
r'switch|this|throw|true|try|typeof|'
|
| 108 |
+
r'unchecked|unsafe|virtual|void|while|'
|
| 109 |
+
r'get|set|new|partial|yield|add|remove|value|alias|ascending|'
|
| 110 |
+
r'descending|from|group|into|orderby|select|thenby|where|'
|
| 111 |
+
r'join|equals)\b', Keyword),
|
| 112 |
+
(r'(global)(::)', bygroups(Keyword, Punctuation)),
|
| 113 |
+
(r'(bool|byte|char|decimal|double|dynamic|float|int|long|object|'
|
| 114 |
+
r'sbyte|short|string|uint|ulong|ushort|var)\b\??', Keyword.Type),
|
| 115 |
+
(r'(class|struct)(\s+)', bygroups(Keyword, Text), 'class'),
|
| 116 |
+
(r'(namespace|using)(\s+)', bygroups(Keyword, Text), 'namespace'),
|
| 117 |
+
(cs_ident, Name),
|
| 118 |
+
],
|
| 119 |
+
'class': [
|
| 120 |
+
(cs_ident, Name.Class, '#pop'),
|
| 121 |
+
default('#pop'),
|
| 122 |
+
],
|
| 123 |
+
'namespace': [
|
| 124 |
+
(r'(?=\()', Text, '#pop'), # using (resource)
|
| 125 |
+
('(' + cs_ident + r'|\.)+', Name.Namespace, '#pop'),
|
| 126 |
+
]
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
def __init__(self, **options):
|
| 130 |
+
level = get_choice_opt(options, 'unicodelevel', list(self.tokens), 'basic')
|
| 131 |
+
if level not in self._all_tokens:
|
| 132 |
+
# compile the regexes now
|
| 133 |
+
self._tokens = self.__class__.process_tokendef(level)
|
| 134 |
+
else:
|
| 135 |
+
self._tokens = self._all_tokens[level]
|
| 136 |
+
|
| 137 |
+
RegexLexer.__init__(self, **options)
|
| 138 |
+
|
| 139 |
+
|
| 140 |
+
class NemerleLexer(RegexLexer):
|
| 141 |
+
"""
|
| 142 |
+
For `Nemerle <http://nemerle.org>`_ source code.
|
| 143 |
+
|
| 144 |
+
Additional options accepted:
|
| 145 |
+
|
| 146 |
+
`unicodelevel`
|
| 147 |
+
Determines which Unicode characters this lexer allows for identifiers.
|
| 148 |
+
The possible values are:
|
| 149 |
+
|
| 150 |
+
* ``none`` -- only the ASCII letters and numbers are allowed. This
|
| 151 |
+
is the fastest selection.
|
| 152 |
+
* ``basic`` -- all Unicode characters from the specification except
|
| 153 |
+
category ``Lo`` are allowed.
|
| 154 |
+
* ``full`` -- all Unicode characters as specified in the C# specs
|
| 155 |
+
are allowed. Note that this means a considerable slowdown since the
|
| 156 |
+
``Lo`` category has more than 40,000 characters in it!
|
| 157 |
+
|
| 158 |
+
The default value is ``basic``.
|
| 159 |
+
|
| 160 |
+
.. versionadded:: 1.5
|
| 161 |
+
"""
|
| 162 |
+
|
| 163 |
+
name = 'Nemerle'
|
| 164 |
+
aliases = ['nemerle']
|
| 165 |
+
filenames = ['*.n']
|
| 166 |
+
mimetypes = ['text/x-nemerle'] # inferred
|
| 167 |
+
|
| 168 |
+
flags = re.MULTILINE | re.DOTALL | re.UNICODE
|
| 169 |
+
|
| 170 |
+
# for the range of allowed unicode characters in identifiers, see
|
| 171 |
+
# http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf
|
| 172 |
+
|
| 173 |
+
levels = {
|
| 174 |
+
'none': '@?[_a-zA-Z]\w*',
|
| 175 |
+
'basic': ('@?[_' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl') + ']' +
|
| 176 |
+
'[' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl', 'Nd', 'Pc',
|
| 177 |
+
'Cf', 'Mn', 'Mc') + ']*'),
|
| 178 |
+
'full': ('@?(?:_|[^' +
|
| 179 |
+
uni.allexcept('Lu', 'Ll', 'Lt', 'Lm', 'Lo', 'Nl') + '])'
|
| 180 |
+
+ '[^' + uni.allexcept('Lu', 'Ll', 'Lt', 'Lm', 'Lo', 'Nl',
|
| 181 |
+
'Nd', 'Pc', 'Cf', 'Mn', 'Mc') + ']*'),
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
tokens = {}
|
| 185 |
+
token_variants = True
|
| 186 |
+
|
| 187 |
+
for levelname, cs_ident in iteritems(levels):
|
| 188 |
+
tokens[levelname] = {
|
| 189 |
+
'root': [
|
| 190 |
+
# method names
|
| 191 |
+
(r'^([ \t]*(?:' + cs_ident + r'(?:\[\])?\s+)+?)' # return type
|
| 192 |
+
r'(' + cs_ident + ')' # method name
|
| 193 |
+
r'(\s*)(\()', # signature start
|
| 194 |
+
bygroups(using(this), Name.Function, Text, Punctuation)),
|
| 195 |
+
(r'^\s*\[.*?\]', Name.Attribute),
|
| 196 |
+
(r'[^\S\n]+', Text),
|
| 197 |
+
(r'\\\n', Text), # line continuation
|
| 198 |
+
(r'//.*?\n', Comment.Single),
|
| 199 |
+
(r'/[*].*?[*]/', Comment.Multiline),
|
| 200 |
+
(r'\n', Text),
|
| 201 |
+
(r'\$\s*"', String, 'splice-string'),
|
| 202 |
+
(r'\$\s*<#', String, 'splice-string2'),
|
| 203 |
+
(r'<#', String, 'recursive-string'),
|
| 204 |
+
|
| 205 |
+
(r'(<\[)\s*(' + cs_ident + ':)?', Keyword),
|
| 206 |
+
(r'\]\>', Keyword),
|
| 207 |
+
|
| 208 |
+
# quasiquotation only
|
| 209 |
+
(r'\$' + cs_ident, Name),
|
| 210 |
+
(r'(\$)(\()', bygroups(Name, Punctuation),
|
| 211 |
+
'splice-string-content'),
|
| 212 |
+
|
| 213 |
+
(r'[~!%^&*()+=|\[\]:;,.<>/?-]', Punctuation),
|
| 214 |
+
(r'[{}]', Punctuation),
|
| 215 |
+
(r'@"(""|[^"])*"', String),
|
| 216 |
+
(r'"(\\\\|\\"|[^"\n])*["\n]', String),
|
| 217 |
+
(r"'\\.'|'[^\\]'", String.Char),
|
| 218 |
+
(r"0[xX][0-9a-fA-F]+[Ll]?", Number),
|
| 219 |
+
(r"[0-9](\.[0-9]*)?([eE][+-][0-9]+)?[flFLdD]?", Number),
|
| 220 |
+
(r'#[ \t]*(if|endif|else|elif|define|undef|'
|
| 221 |
+
r'line|error|warning|region|endregion|pragma)\b.*?\n',
|
| 222 |
+
Comment.Preproc),
|
| 223 |
+
(r'\b(extern)(\s+)(alias)\b', bygroups(Keyword, Text,
|
| 224 |
+
Keyword)),
|
| 225 |
+
(r'(abstract|and|as|base|catch|def|delegate|'
|
| 226 |
+
r'enum|event|extern|false|finally|'
|
| 227 |
+
r'fun|implements|interface|internal|'
|
| 228 |
+
r'is|macro|match|matches|module|mutable|new|'
|
| 229 |
+
r'null|out|override|params|partial|private|'
|
| 230 |
+
r'protected|public|ref|sealed|static|'
|
| 231 |
+
r'syntax|this|throw|true|try|type|typeof|'
|
| 232 |
+
r'virtual|volatile|when|where|with|'
|
| 233 |
+
r'assert|assert2|async|break|checked|continue|do|else|'
|
| 234 |
+
r'ensures|for|foreach|if|late|lock|new|nolate|'
|
| 235 |
+
r'otherwise|regexp|repeat|requires|return|surroundwith|'
|
| 236 |
+
r'unchecked|unless|using|while|yield)\b', Keyword),
|
| 237 |
+
(r'(global)(::)', bygroups(Keyword, Punctuation)),
|
| 238 |
+
(r'(bool|byte|char|decimal|double|float|int|long|object|sbyte|'
|
| 239 |
+
r'short|string|uint|ulong|ushort|void|array|list)\b\??',
|
| 240 |
+
Keyword.Type),
|
| 241 |
+
(r'(:>?)\s*(' + cs_ident + r'\??)',
|
| 242 |
+
bygroups(Punctuation, Keyword.Type)),
|
| 243 |
+
(r'(class|struct|variant|module)(\s+)',
|
| 244 |
+
bygroups(Keyword, Text), 'class'),
|
| 245 |
+
(r'(namespace|using)(\s+)', bygroups(Keyword, Text),
|
| 246 |
+
'namespace'),
|
| 247 |
+
(cs_ident, Name),
|
| 248 |
+
],
|
| 249 |
+
'class': [
|
| 250 |
+
(cs_ident, Name.Class, '#pop')
|
| 251 |
+
],
|
| 252 |
+
'namespace': [
|
| 253 |
+
(r'(?=\()', Text, '#pop'), # using (resource)
|
| 254 |
+
('(' + cs_ident + r'|\.)+', Name.Namespace, '#pop')
|
| 255 |
+
],
|
| 256 |
+
'splice-string': [
|
| 257 |
+
(r'[^"$]', String),
|
| 258 |
+
(r'\$' + cs_ident, Name),
|
| 259 |
+
(r'(\$)(\()', bygroups(Name, Punctuation),
|
| 260 |
+
'splice-string-content'),
|
| 261 |
+
(r'\\"', String),
|
| 262 |
+
(r'"', String, '#pop')
|
| 263 |
+
],
|
| 264 |
+
'splice-string2': [
|
| 265 |
+
(r'[^#<>$]', String),
|
| 266 |
+
(r'\$' + cs_ident, Name),
|
| 267 |
+
(r'(\$)(\()', bygroups(Name, Punctuation),
|
| 268 |
+
'splice-string-content'),
|
| 269 |
+
(r'<#', String, '#push'),
|
| 270 |
+
(r'#>', String, '#pop')
|
| 271 |
+
],
|
| 272 |
+
'recursive-string': [
|
| 273 |
+
(r'[^#<>]', String),
|
| 274 |
+
(r'<#', String, '#push'),
|
| 275 |
+
(r'#>', String, '#pop')
|
| 276 |
+
],
|
| 277 |
+
'splice-string-content': [
|
| 278 |
+
(r'if|match', Keyword),
|
| 279 |
+
(r'[~!%^&*+=|\[\]:;,.<>/?-\\"$ ]', Punctuation),
|
| 280 |
+
(cs_ident, Name),
|
| 281 |
+
(r'\d+', Number),
|
| 282 |
+
(r'\(', Punctuation, '#push'),
|
| 283 |
+
(r'\)', Punctuation, '#pop')
|
| 284 |
+
]
|
| 285 |
+
}
|
| 286 |
+
|
| 287 |
+
def __init__(self, **options):
|
| 288 |
+
level = get_choice_opt(options, 'unicodelevel', list(self.tokens),
|
| 289 |
+
'basic')
|
| 290 |
+
if level not in self._all_tokens:
|
| 291 |
+
# compile the regexes now
|
| 292 |
+
self._tokens = self.__class__.process_tokendef(level)
|
| 293 |
+
else:
|
| 294 |
+
self._tokens = self._all_tokens[level]
|
| 295 |
+
|
| 296 |
+
RegexLexer.__init__(self, **options)
|
| 297 |
+
|
| 298 |
+
|
| 299 |
+
class BooLexer(RegexLexer):
|
| 300 |
+
"""
|
| 301 |
+
For `Boo <http://boo.codehaus.org/>`_ source code.
|
| 302 |
+
"""
|
| 303 |
+
|
| 304 |
+
name = 'Boo'
|
| 305 |
+
aliases = ['boo']
|
| 306 |
+
filenames = ['*.boo']
|
| 307 |
+
mimetypes = ['text/x-boo']
|
| 308 |
+
|
| 309 |
+
tokens = {
|
| 310 |
+
'root': [
|
| 311 |
+
(r'\s+', Text),
|
| 312 |
+
(r'(#|//).*$', Comment.Single),
|
| 313 |
+
(r'/[*]', Comment.Multiline, 'comment'),
|
| 314 |
+
(r'[]{}:(),.;[]', Punctuation),
|
| 315 |
+
(r'\\\n', Text),
|
| 316 |
+
(r'\\', Text),
|
| 317 |
+
(r'(in|is|and|or|not)\b', Operator.Word),
|
| 318 |
+
(r'/(\\\\|\\/|[^/\s])/', String.Regex),
|
| 319 |
+
(r'@/(\\\\|\\/|[^/])*/', String.Regex),
|
| 320 |
+
(r'=~|!=|==|<<|>>|[-+/*%=<>&^|]', Operator),
|
| 321 |
+
(r'(as|abstract|callable|constructor|destructor|do|import|'
|
| 322 |
+
r'enum|event|final|get|interface|internal|of|override|'
|
| 323 |
+
r'partial|private|protected|public|return|set|static|'
|
| 324 |
+
r'struct|transient|virtual|yield|super|and|break|cast|'
|
| 325 |
+
r'continue|elif|else|ensure|except|for|given|goto|if|in|'
|
| 326 |
+
r'is|isa|not|or|otherwise|pass|raise|ref|try|unless|when|'
|
| 327 |
+
r'while|from|as)\b', Keyword),
|
| 328 |
+
(r'def(?=\s+\(.*?\))', Keyword),
|
| 329 |
+
(r'(def)(\s+)', bygroups(Keyword, Text), 'funcname'),
|
| 330 |
+
(r'(class)(\s+)', bygroups(Keyword, Text), 'classname'),
|
| 331 |
+
(r'(namespace)(\s+)', bygroups(Keyword, Text), 'namespace'),
|
| 332 |
+
(r'(?<!\.)(true|false|null|self|__eval__|__switch__|array|'
|
| 333 |
+
r'assert|checked|enumerate|filter|getter|len|lock|map|'
|
| 334 |
+
r'matrix|max|min|normalArrayIndexing|print|property|range|'
|
| 335 |
+
r'rawArrayIndexing|required|typeof|unchecked|using|'
|
| 336 |
+
r'yieldAll|zip)\b', Name.Builtin),
|
| 337 |
+
(r'"""(\\\\|\\"|.*?)"""', String.Double),
|
| 338 |
+
(r'"(\\\\|\\"|[^"]*?)"', String.Double),
|
| 339 |
+
(r"'(\\\\|\\'|[^']*?)'", String.Single),
|
| 340 |
+
(r'[a-zA-Z_]\w*', Name),
|
| 341 |
+
(r'(\d+\.\d*|\d*\.\d+)([fF][+-]?[0-9]+)?', Number.Float),
|
| 342 |
+
(r'[0-9][0-9.]*(ms?|d|h|s)', Number),
|
| 343 |
+
(r'0\d+', Number.Oct),
|
| 344 |
+
(r'0x[a-fA-F0-9]+', Number.Hex),
|
| 345 |
+
(r'\d+L', Number.Integer.Long),
|
| 346 |
+
(r'\d+', Number.Integer),
|
| 347 |
+
],
|
| 348 |
+
'comment': [
|
| 349 |
+
('/[*]', Comment.Multiline, '#push'),
|
| 350 |
+
('[*]/', Comment.Multiline, '#pop'),
|
| 351 |
+
('[^/*]', Comment.Multiline),
|
| 352 |
+
('[*/]', Comment.Multiline)
|
| 353 |
+
],
|
| 354 |
+
'funcname': [
|
| 355 |
+
('[a-zA-Z_]\w*', Name.Function, '#pop')
|
| 356 |
+
],
|
| 357 |
+
'classname': [
|
| 358 |
+
('[a-zA-Z_]\w*', Name.Class, '#pop')
|
| 359 |
+
],
|
| 360 |
+
'namespace': [
|
| 361 |
+
('[a-zA-Z_][\w.]*', Name.Namespace, '#pop')
|
| 362 |
+
]
|
| 363 |
+
}
|
| 364 |
+
|
| 365 |
+
|
| 366 |
+
class VbNetLexer(RegexLexer):
|
| 367 |
+
"""
|
| 368 |
+
For
|
| 369 |
+
`Visual Basic.NET <http://msdn2.microsoft.com/en-us/vbasic/default.aspx>`_
|
| 370 |
+
source code.
|
| 371 |
+
"""
|
| 372 |
+
|
| 373 |
+
name = 'VB.net'
|
| 374 |
+
aliases = ['vb.net', 'vbnet']
|
| 375 |
+
filenames = ['*.vb', '*.bas']
|
| 376 |
+
mimetypes = ['text/x-vbnet', 'text/x-vba'] # (?)
|
| 377 |
+
|
| 378 |
+
uni_name = '[_' + uni.combine('Ll', 'Lt', 'Lm', 'Nl') + ']' + \
|
| 379 |
+
'[' + uni.combine('Ll', 'Lt', 'Lm', 'Nl', 'Nd', 'Pc',
|
| 380 |
+
'Cf', 'Mn', 'Mc') + ']*'
|
| 381 |
+
|
| 382 |
+
flags = re.MULTILINE | re.IGNORECASE
|
| 383 |
+
tokens = {
|
| 384 |
+
'root': [
|
| 385 |
+
(r'^\s*<.*?>', Name.Attribute),
|
| 386 |
+
(r'\s+', Text),
|
| 387 |
+
(r'\n', Text),
|
| 388 |
+
(r'rem\b.*?\n', Comment),
|
| 389 |
+
(r"'.*?\n", Comment),
|
| 390 |
+
(r'#If\s.*?\sThen|#ElseIf\s.*?\sThen|#Else|#End\s+If|#Const|'
|
| 391 |
+
r'#ExternalSource.*?\n|#End\s+ExternalSource|'
|
| 392 |
+
r'#Region.*?\n|#End\s+Region|#ExternalChecksum',
|
| 393 |
+
Comment.Preproc),
|
| 394 |
+
(r'[(){}!#,.:]', Punctuation),
|
| 395 |
+
(r'Option\s+(Strict|Explicit|Compare)\s+'
|
| 396 |
+
r'(On|Off|Binary|Text)', Keyword.Declaration),
|
| 397 |
+
(words((
|
| 398 |
+
'AddHandler', 'Alias', 'ByRef', 'ByVal', 'Call', 'Case',
|
| 399 |
+
'Catch', 'CBool', 'CByte', 'CChar', 'CDate', 'CDec', 'CDbl',
|
| 400 |
+
'CInt', 'CLng', 'CObj', 'Continue', 'CSByte', 'CShort', 'CSng',
|
| 401 |
+
'CStr', 'CType', 'CUInt', 'CULng', 'CUShort', 'Declare',
|
| 402 |
+
'Default', 'Delegate', 'DirectCast', 'Do', 'Each', 'Else',
|
| 403 |
+
'ElseIf', 'EndIf', 'Erase', 'Error', 'Event', 'Exit', 'False',
|
| 404 |
+
'Finally', 'For', 'Friend', 'Get', 'Global', 'GoSub', 'GoTo',
|
| 405 |
+
'Handles', 'If', 'Implements', 'Inherits', 'Interface', 'Let',
|
| 406 |
+
'Lib', 'Loop', 'Me', 'MustInherit', 'MustOverride', 'MyBase',
|
| 407 |
+
'MyClass', 'Narrowing', 'New', 'Next', 'Not', 'Nothing',
|
| 408 |
+
'NotInheritable', 'NotOverridable', 'Of', 'On', 'Operator',
|
| 409 |
+
'Option', 'Optional', 'Overloads', 'Overridable', 'Overrides',
|
| 410 |
+
'ParamArray', 'Partial', 'Private', 'Protected', 'Public',
|
| 411 |
+
'RaiseEvent', 'ReadOnly', 'ReDim', 'RemoveHandler', 'Resume',
|
| 412 |
+
'Return', 'Select', 'Set', 'Shadows', 'Shared', 'Single',
|
| 413 |
+
'Static', 'Step', 'Stop', 'SyncLock', 'Then', 'Throw', 'To',
|
| 414 |
+
'True', 'Try', 'TryCast', 'Wend', 'Using', 'When', 'While',
|
| 415 |
+
'Widening', 'With', 'WithEvents', 'WriteOnly'),
|
| 416 |
+
prefix='(?<!\.)', suffix=r'\b'), Keyword),
|
| 417 |
+
(r'(?<!\.)End\b', Keyword, 'end'),
|
| 418 |
+
(r'(?<!\.)(Dim|Const)\b', Keyword, 'dim'),
|
| 419 |
+
(r'(?<!\.)(Function|Sub|Property)(\s+)',
|
| 420 |
+
bygroups(Keyword, Text), 'funcname'),
|
| 421 |
+
(r'(?<!\.)(Class|Structure|Enum)(\s+)',
|
| 422 |
+
bygroups(Keyword, Text), 'classname'),
|
| 423 |
+
(r'(?<!\.)(Module|Namespace|Imports)(\s+)',
|
| 424 |
+
bygroups(Keyword, Text), 'namespace'),
|
| 425 |
+
(r'(?<!\.)(Boolean|Byte|Char|Date|Decimal|Double|Integer|Long|'
|
| 426 |
+
r'Object|SByte|Short|Single|String|Variant|UInteger|ULong|'
|
| 427 |
+
r'UShort)\b', Keyword.Type),
|
| 428 |
+
(r'(?<!\.)(AddressOf|And|AndAlso|As|GetType|In|Is|IsNot|Like|Mod|'
|
| 429 |
+
r'Or|OrElse|TypeOf|Xor)\b', Operator.Word),
|
| 430 |
+
(r'&=|[*]=|/=|\\=|\^=|\+=|-=|<<=|>>=|<<|>>|:=|'
|
| 431 |
+
r'<=|>=|<>|[-&*/\\^+=<>\[\]]',
|
| 432 |
+
Operator),
|
| 433 |
+
('"', String, 'string'),
|
| 434 |
+
(r'_\n', Text), # Line continuation (must be before Name)
|
| 435 |
+
(uni_name + '[%&@!#$]?', Name),
|
| 436 |
+
('#.*?#', Literal.Date),
|
| 437 |
+
(r'(\d+\.\d*|\d*\.\d+)(F[+-]?[0-9]+)?', Number.Float),
|
| 438 |
+
(r'\d+([SILDFR]|US|UI|UL)?', Number.Integer),
|
| 439 |
+
(r'&H[0-9a-f]+([SILDFR]|US|UI|UL)?', Number.Integer),
|
| 440 |
+
(r'&O[0-7]+([SILDFR]|US|UI|UL)?', Number.Integer),
|
| 441 |
+
],
|
| 442 |
+
'string': [
|
| 443 |
+
(r'""', String),
|
| 444 |
+
(r'"C?', String, '#pop'),
|
| 445 |
+
(r'[^"]+', String),
|
| 446 |
+
],
|
| 447 |
+
'dim': [
|
| 448 |
+
(uni_name, Name.Variable, '#pop'),
|
| 449 |
+
default('#pop'), # any other syntax
|
| 450 |
+
],
|
| 451 |
+
'funcname': [
|
| 452 |
+
(uni_name, Name.Function, '#pop'),
|
| 453 |
+
],
|
| 454 |
+
'classname': [
|
| 455 |
+
(uni_name, Name.Class, '#pop'),
|
| 456 |
+
],
|
| 457 |
+
'namespace': [
|
| 458 |
+
(uni_name, Name.Namespace),
|
| 459 |
+
(r'\.', Name.Namespace),
|
| 460 |
+
default('#pop'),
|
| 461 |
+
],
|
| 462 |
+
'end': [
|
| 463 |
+
(r'\s+', Text),
|
| 464 |
+
(r'(Function|Sub|Property|Class|Structure|Enum|Module|Namespace)\b',
|
| 465 |
+
Keyword, '#pop'),
|
| 466 |
+
default('#pop'),
|
| 467 |
+
]
|
| 468 |
+
}
|
| 469 |
+
|
| 470 |
+
def analyse_text(text):
|
| 471 |
+
if re.search(r'^\s*(#If|Module|Namespace)', text, re.MULTILINE):
|
| 472 |
+
return 0.5
|
| 473 |
+
|
| 474 |
+
|
| 475 |
+
class GenericAspxLexer(RegexLexer):
|
| 476 |
+
"""
|
| 477 |
+
Lexer for ASP.NET pages.
|
| 478 |
+
"""
|
| 479 |
+
|
| 480 |
+
name = 'aspx-gen'
|
| 481 |
+
filenames = []
|
| 482 |
+
mimetypes = []
|
| 483 |
+
|
| 484 |
+
flags = re.DOTALL
|
| 485 |
+
|
| 486 |
+
tokens = {
|
| 487 |
+
'root': [
|
| 488 |
+
(r'(<%[@=#]?)(.*?)(%>)', bygroups(Name.Tag, Other, Name.Tag)),
|
| 489 |
+
(r'(<script.*?>)(.*?)(</script>)', bygroups(using(XmlLexer),
|
| 490 |
+
Other,
|
| 491 |
+
using(XmlLexer))),
|
| 492 |
+
(r'(.+?)(?=<)', using(XmlLexer)),
|
| 493 |
+
(r'.+', using(XmlLexer)),
|
| 494 |
+
],
|
| 495 |
+
}
|
| 496 |
+
|
| 497 |
+
|
| 498 |
+
# TODO support multiple languages within the same source file
|
| 499 |
+
class CSharpAspxLexer(DelegatingLexer):
|
| 500 |
+
"""
|
| 501 |
+
Lexer for highlighting C# within ASP.NET pages.
|
| 502 |
+
"""
|
| 503 |
+
|
| 504 |
+
name = 'aspx-cs'
|
| 505 |
+
aliases = ['aspx-cs']
|
| 506 |
+
filenames = ['*.aspx', '*.asax', '*.ascx', '*.ashx', '*.asmx', '*.axd']
|
| 507 |
+
mimetypes = []
|
| 508 |
+
|
| 509 |
+
def __init__(self, **options):
|
| 510 |
+
super(CSharpAspxLexer, self).__init__(CSharpLexer, GenericAspxLexer,
|
| 511 |
+
**options)
|
| 512 |
+
|
| 513 |
+
def analyse_text(text):
|
| 514 |
+
if re.search(r'Page\s*Language="C#"', text, re.I) is not None:
|
| 515 |
+
return 0.2
|
| 516 |
+
elif re.search(r'script[^>]+language=["\']C#', text, re.I) is not None:
|
| 517 |
+
return 0.15
|
| 518 |
+
|
| 519 |
+
|
| 520 |
+
class VbNetAspxLexer(DelegatingLexer):
|
| 521 |
+
"""
|
| 522 |
+
Lexer for highlighting Visual Basic.net within ASP.NET pages.
|
| 523 |
+
"""
|
| 524 |
+
|
| 525 |
+
name = 'aspx-vb'
|
| 526 |
+
aliases = ['aspx-vb']
|
| 527 |
+
filenames = ['*.aspx', '*.asax', '*.ascx', '*.ashx', '*.asmx', '*.axd']
|
| 528 |
+
mimetypes = []
|
| 529 |
+
|
| 530 |
+
def __init__(self, **options):
|
| 531 |
+
super(VbNetAspxLexer, self).__init__(VbNetLexer, GenericAspxLexer,
|
| 532 |
+
**options)
|
| 533 |
+
|
| 534 |
+
def analyse_text(text):
|
| 535 |
+
if re.search(r'Page\s*Language="Vb"', text, re.I) is not None:
|
| 536 |
+
return 0.2
|
| 537 |
+
elif re.search(r'script[^>]+language=["\']vb', text, re.I) is not None:
|
| 538 |
+
return 0.15
|
| 539 |
+
|
| 540 |
+
|
| 541 |
+
# Very close to functional.OcamlLexer
|
| 542 |
+
class FSharpLexer(RegexLexer):
|
| 543 |
+
"""
|
| 544 |
+
For the F# language (version 3.0).
|
| 545 |
+
|
| 546 |
+
AAAAACK Strings
|
| 547 |
+
http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/manual/spec.html#_Toc335818775
|
| 548 |
+
|
| 549 |
+
.. versionadded:: 1.5
|
| 550 |
+
"""
|
| 551 |
+
|
| 552 |
+
name = 'FSharp'
|
| 553 |
+
aliases = ['fsharp']
|
| 554 |
+
filenames = ['*.fs', '*.fsi']
|
| 555 |
+
mimetypes = ['text/x-fsharp']
|
| 556 |
+
|
| 557 |
+
keywords = [
|
| 558 |
+
'abstract', 'as', 'assert', 'base', 'begin', 'class', 'default',
|
| 559 |
+
'delegate', 'do!', 'do', 'done', 'downcast', 'downto', 'elif', 'else',
|
| 560 |
+
'end', 'exception', 'extern', 'false', 'finally', 'for', 'function',
|
| 561 |
+
'fun', 'global', 'if', 'inherit', 'inline', 'interface', 'internal',
|
| 562 |
+
'in', 'lazy', 'let!', 'let', 'match', 'member', 'module', 'mutable',
|
| 563 |
+
'namespace', 'new', 'null', 'of', 'open', 'override', 'private', 'public',
|
| 564 |
+
'rec', 'return!', 'return', 'select', 'static', 'struct', 'then', 'to',
|
| 565 |
+
'true', 'try', 'type', 'upcast', 'use!', 'use', 'val', 'void', 'when',
|
| 566 |
+
'while', 'with', 'yield!', 'yield',
|
| 567 |
+
]
|
| 568 |
+
# Reserved words; cannot hurt to color them as keywords too.
|
| 569 |
+
keywords += [
|
| 570 |
+
'atomic', 'break', 'checked', 'component', 'const', 'constraint',
|
| 571 |
+
'constructor', 'continue', 'eager', 'event', 'external', 'fixed',
|
| 572 |
+
'functor', 'include', 'method', 'mixin', 'object', 'parallel',
|
| 573 |
+
'process', 'protected', 'pure', 'sealed', 'tailcall', 'trait',
|
| 574 |
+
'virtual', 'volatile',
|
| 575 |
+
]
|
| 576 |
+
keyopts = [
|
| 577 |
+
'!=', '#', '&&', '&', '\(', '\)', '\*', '\+', ',', '-\.',
|
| 578 |
+
'->', '-', '\.\.', '\.', '::', ':=', ':>', ':', ';;', ';', '<-',
|
| 579 |
+
'<\]', '<', '>\]', '>', '\?\?', '\?', '\[<', '\[\|', '\[', '\]',
|
| 580 |
+
'_', '`', '\{', '\|\]', '\|', '\}', '~', '<@@', '<@', '=', '@>', '@@>',
|
| 581 |
+
]
|
| 582 |
+
|
| 583 |
+
operators = r'[!$%&*+\./:<=>?@^|~-]'
|
| 584 |
+
word_operators = ['and', 'or', 'not']
|
| 585 |
+
prefix_syms = r'[!?~]'
|
| 586 |
+
infix_syms = r'[=<>@^|&+\*/$%-]'
|
| 587 |
+
primitives = [
|
| 588 |
+
'sbyte', 'byte', 'char', 'nativeint', 'unativeint', 'float32', 'single',
|
| 589 |
+
'float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32',
|
| 590 |
+
'uint32', 'int64', 'uint64', 'decimal', 'unit', 'bool', 'string',
|
| 591 |
+
'list', 'exn', 'obj', 'enum',
|
| 592 |
+
]
|
| 593 |
+
|
| 594 |
+
# See http://msdn.microsoft.com/en-us/library/dd233181.aspx and/or
|
| 595 |
+
# http://fsharp.org/about/files/spec.pdf for reference. Good luck.
|
| 596 |
+
|
| 597 |
+
tokens = {
|
| 598 |
+
'escape-sequence': [
|
| 599 |
+
(r'\\[\\"\'ntbrafv]', String.Escape),
|
| 600 |
+
(r'\\[0-9]{3}', String.Escape),
|
| 601 |
+
(r'\\u[0-9a-fA-F]{4}', String.Escape),
|
| 602 |
+
(r'\\U[0-9a-fA-F]{8}', String.Escape),
|
| 603 |
+
],
|
| 604 |
+
'root': [
|
| 605 |
+
(r'\s+', Text),
|
| 606 |
+
(r'\(\)|\[\]', Name.Builtin.Pseudo),
|
| 607 |
+
(r'\b(?<!\.)([A-Z][\w\']*)(?=\s*\.)',
|
| 608 |
+
Name.Namespace, 'dotted'),
|
| 609 |
+
(r'\b([A-Z][\w\']*)', Name),
|
| 610 |
+
(r'///.*?\n', String.Doc),
|
| 611 |
+
(r'//.*?\n', Comment.Single),
|
| 612 |
+
(r'\(\*(?!\))', Comment, 'comment'),
|
| 613 |
+
|
| 614 |
+
(r'@"', String, 'lstring'),
|
| 615 |
+
(r'"""', String, 'tqs'),
|
| 616 |
+
(r'"', String, 'string'),
|
| 617 |
+
|
| 618 |
+
(r'\b(open|module)(\s+)([\w.]+)',
|
| 619 |
+
bygroups(Keyword, Text, Name.Namespace)),
|
| 620 |
+
(r'\b(let!?)(\s+)(\w+)',
|
| 621 |
+
bygroups(Keyword, Text, Name.Variable)),
|
| 622 |
+
(r'\b(type)(\s+)(\w+)',
|
| 623 |
+
bygroups(Keyword, Text, Name.Class)),
|
| 624 |
+
(r'\b(member|override)(\s+)(\w+)(\.)(\w+)',
|
| 625 |
+
bygroups(Keyword, Text, Name, Punctuation, Name.Function)),
|
| 626 |
+
(r'\b(%s)\b' % '|'.join(keywords), Keyword),
|
| 627 |
+
(r'``([^`\n\r\t]|`[^`\n\r\t])+``', Name),
|
| 628 |
+
(r'(%s)' % '|'.join(keyopts), Operator),
|
| 629 |
+
(r'(%s|%s)?%s' % (infix_syms, prefix_syms, operators), Operator),
|
| 630 |
+
(r'\b(%s)\b' % '|'.join(word_operators), Operator.Word),
|
| 631 |
+
(r'\b(%s)\b' % '|'.join(primitives), Keyword.Type),
|
| 632 |
+
(r'#[ \t]*(if|endif|else|line|nowarn|light|\d+)\b.*?\n',
|
| 633 |
+
Comment.Preproc),
|
| 634 |
+
|
| 635 |
+
(r"[^\W\d][\w']*", Name),
|
| 636 |
+
|
| 637 |
+
(r'\d[\d_]*[uU]?[yslLnQRZINGmM]?', Number.Integer),
|
| 638 |
+
(r'0[xX][\da-fA-F][\da-fA-F_]*[uU]?[yslLn]?[fF]?', Number.Hex),
|
| 639 |
+
(r'0[oO][0-7][0-7_]*[uU]?[yslLn]?', Number.Oct),
|
| 640 |
+
(r'0[bB][01][01_]*[uU]?[yslLn]?', Number.Bin),
|
| 641 |
+
(r'-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)[fFmM]?',
|
| 642 |
+
Number.Float),
|
| 643 |
+
|
| 644 |
+
(r"'(?:(\\[\\\"'ntbr ])|(\\[0-9]{3})|(\\x[0-9a-fA-F]{2}))'B?",
|
| 645 |
+
String.Char),
|
| 646 |
+
(r"'.'", String.Char),
|
| 647 |
+
(r"'", Keyword), # a stray quote is another syntax element
|
| 648 |
+
|
| 649 |
+
(r'@?"', String.Double, 'string'),
|
| 650 |
+
|
| 651 |
+
(r'[~?][a-z][\w\']*:', Name.Variable),
|
| 652 |
+
],
|
| 653 |
+
'dotted': [
|
| 654 |
+
(r'\s+', Text),
|
| 655 |
+
(r'\.', Punctuation),
|
| 656 |
+
(r'[A-Z][\w\']*(?=\s*\.)', Name.Namespace),
|
| 657 |
+
(r'[A-Z][\w\']*', Name, '#pop'),
|
| 658 |
+
(r'[a-z_][\w\']*', Name, '#pop'),
|
| 659 |
+
# e.g. dictionary index access
|
| 660 |
+
default('#pop'),
|
| 661 |
+
],
|
| 662 |
+
'comment': [
|
| 663 |
+
(r'[^(*)@"]+', Comment),
|
| 664 |
+
(r'\(\*', Comment, '#push'),
|
| 665 |
+
(r'\*\)', Comment, '#pop'),
|
| 666 |
+
# comments cannot be closed within strings in comments
|
| 667 |
+
(r'@"', String, 'lstring'),
|
| 668 |
+
(r'"""', String, 'tqs'),
|
| 669 |
+
(r'"', String, 'string'),
|
| 670 |
+
(r'[(*)@]', Comment),
|
| 671 |
+
],
|
| 672 |
+
'string': [
|
| 673 |
+
(r'[^\\"]+', String),
|
| 674 |
+
include('escape-sequence'),
|
| 675 |
+
(r'\\\n', String),
|
| 676 |
+
(r'\n', String), # newlines are allowed in any string
|
| 677 |
+
(r'"B?', String, '#pop'),
|
| 678 |
+
],
|
| 679 |
+
'lstring': [
|
| 680 |
+
(r'[^"]+', String),
|
| 681 |
+
(r'\n', String),
|
| 682 |
+
(r'""', String),
|
| 683 |
+
(r'"B?', String, '#pop'),
|
| 684 |
+
],
|
| 685 |
+
'tqs': [
|
| 686 |
+
(r'[^"]+', String),
|
| 687 |
+
(r'\n', String),
|
| 688 |
+
(r'"""B?', String, '#pop'),
|
| 689 |
+
(r'"', String),
|
| 690 |
+
],
|
| 691 |
+
}
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/dsls.py
ADDED
|
@@ -0,0 +1,878 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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~~~
|
| 5 |
+
|
| 6 |
+
Lexers for various domain-specific languages.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
import re
|
| 13 |
+
|
| 14 |
+
from pygments.lexer import ExtendedRegexLexer, RegexLexer, bygroups, words, \
|
| 15 |
+
include, default, this, using, combined
|
| 16 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 17 |
+
Number, Punctuation, Literal, Whitespace
|
| 18 |
+
|
| 19 |
+
__all__ = ['ProtoBufLexer', 'BroLexer', 'PuppetLexer', 'RslLexer',
|
| 20 |
+
'MscgenLexer', 'VGLLexer', 'AlloyLexer', 'PanLexer',
|
| 21 |
+
'CrmshLexer', 'ThriftLexer', 'FlatlineLexer', 'SnowballLexer']
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
class ProtoBufLexer(RegexLexer):
|
| 25 |
+
"""
|
| 26 |
+
Lexer for `Protocol Buffer <http://code.google.com/p/protobuf/>`_
|
| 27 |
+
definition files.
|
| 28 |
+
|
| 29 |
+
.. versionadded:: 1.4
|
| 30 |
+
"""
|
| 31 |
+
|
| 32 |
+
name = 'Protocol Buffer'
|
| 33 |
+
aliases = ['protobuf', 'proto']
|
| 34 |
+
filenames = ['*.proto']
|
| 35 |
+
|
| 36 |
+
tokens = {
|
| 37 |
+
'root': [
|
| 38 |
+
(r'[ \t]+', Text),
|
| 39 |
+
(r'[,;{}\[\]()<>]', Punctuation),
|
| 40 |
+
(r'/(\\\n)?/(\n|(.|\n)*?[^\\]\n)', Comment.Single),
|
| 41 |
+
(r'/(\\\n)?\*(.|\n)*?\*(\\\n)?/', Comment.Multiline),
|
| 42 |
+
(words((
|
| 43 |
+
'import', 'option', 'optional', 'required', 'repeated', 'default',
|
| 44 |
+
'packed', 'ctype', 'extensions', 'to', 'max', 'rpc', 'returns',
|
| 45 |
+
'oneof'), prefix=r'\b', suffix=r'\b'),
|
| 46 |
+
Keyword),
|
| 47 |
+
(words((
|
| 48 |
+
'int32', 'int64', 'uint32', 'uint64', 'sint32', 'sint64',
|
| 49 |
+
'fixed32', 'fixed64', 'sfixed32', 'sfixed64',
|
| 50 |
+
'float', 'double', 'bool', 'string', 'bytes'), suffix=r'\b'),
|
| 51 |
+
Keyword.Type),
|
| 52 |
+
(r'(true|false)\b', Keyword.Constant),
|
| 53 |
+
(r'(package)(\s+)', bygroups(Keyword.Namespace, Text), 'package'),
|
| 54 |
+
(r'(message|extend)(\s+)',
|
| 55 |
+
bygroups(Keyword.Declaration, Text), 'message'),
|
| 56 |
+
(r'(enum|group|service)(\s+)',
|
| 57 |
+
bygroups(Keyword.Declaration, Text), 'type'),
|
| 58 |
+
(r'\".*?\"', String),
|
| 59 |
+
(r'\'.*?\'', String),
|
| 60 |
+
(r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*', Number.Float),
|
| 61 |
+
(r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float),
|
| 62 |
+
(r'(\-?(inf|nan))\b', Number.Float),
|
| 63 |
+
(r'0x[0-9a-fA-F]+[LlUu]*', Number.Hex),
|
| 64 |
+
(r'0[0-7]+[LlUu]*', Number.Oct),
|
| 65 |
+
(r'\d+[LlUu]*', Number.Integer),
|
| 66 |
+
(r'[+-=]', Operator),
|
| 67 |
+
(r'([a-zA-Z_][\w.]*)([ \t]*)(=)',
|
| 68 |
+
bygroups(Name.Attribute, Text, Operator)),
|
| 69 |
+
('[a-zA-Z_][\w.]*', Name),
|
| 70 |
+
],
|
| 71 |
+
'package': [
|
| 72 |
+
(r'[a-zA-Z_]\w*', Name.Namespace, '#pop'),
|
| 73 |
+
default('#pop'),
|
| 74 |
+
],
|
| 75 |
+
'message': [
|
| 76 |
+
(r'[a-zA-Z_]\w*', Name.Class, '#pop'),
|
| 77 |
+
default('#pop'),
|
| 78 |
+
],
|
| 79 |
+
'type': [
|
| 80 |
+
(r'[a-zA-Z_]\w*', Name, '#pop'),
|
| 81 |
+
default('#pop'),
|
| 82 |
+
],
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
class ThriftLexer(RegexLexer):
|
| 87 |
+
"""
|
| 88 |
+
For `Thrift <https://thrift.apache.org/>`__ interface definitions.
|
| 89 |
+
|
| 90 |
+
.. versionadded:: 2.1
|
| 91 |
+
"""
|
| 92 |
+
name = 'Thrift'
|
| 93 |
+
aliases = ['thrift']
|
| 94 |
+
filenames = ['*.thrift']
|
| 95 |
+
mimetypes = ['application/x-thrift']
|
| 96 |
+
|
| 97 |
+
tokens = {
|
| 98 |
+
'root': [
|
| 99 |
+
include('whitespace'),
|
| 100 |
+
include('comments'),
|
| 101 |
+
(r'"', String.Double, combined('stringescape', 'dqs')),
|
| 102 |
+
(r'\'', String.Single, combined('stringescape', 'sqs')),
|
| 103 |
+
(r'(namespace)(\s+)',
|
| 104 |
+
bygroups(Keyword.Namespace, Text.Whitespace), 'namespace'),
|
| 105 |
+
(r'(enum|union|struct|service|exception)(\s+)',
|
| 106 |
+
bygroups(Keyword.Declaration, Text.Whitespace), 'class'),
|
| 107 |
+
(r'((?:(?:[^\W\d]|\$)[\w.\[\]$<>]*\s+)+?)' # return arguments
|
| 108 |
+
r'((?:[^\W\d]|\$)[\w$]*)' # method name
|
| 109 |
+
r'(\s*)(\()', # signature start
|
| 110 |
+
bygroups(using(this), Name.Function, Text, Operator)),
|
| 111 |
+
include('keywords'),
|
| 112 |
+
include('numbers'),
|
| 113 |
+
(r'[&=]', Operator),
|
| 114 |
+
(r'[:;,{}()<>\[\]]', Punctuation),
|
| 115 |
+
(r'[a-zA-Z_](\.\w|\w)*', Name),
|
| 116 |
+
],
|
| 117 |
+
'whitespace': [
|
| 118 |
+
(r'\n', Text.Whitespace),
|
| 119 |
+
(r'\s+', Text.Whitespace),
|
| 120 |
+
],
|
| 121 |
+
'comments': [
|
| 122 |
+
(r'#.*$', Comment),
|
| 123 |
+
(r'//.*?\n', Comment),
|
| 124 |
+
(r'/\*[\w\W]*?\*/', Comment.Multiline),
|
| 125 |
+
],
|
| 126 |
+
'stringescape': [
|
| 127 |
+
(r'\\([\\nrt"\'])', String.Escape),
|
| 128 |
+
],
|
| 129 |
+
'dqs': [
|
| 130 |
+
(r'"', String.Double, '#pop'),
|
| 131 |
+
(r'[^\\"\n]+', String.Double),
|
| 132 |
+
],
|
| 133 |
+
'sqs': [
|
| 134 |
+
(r"'", String.Single, '#pop'),
|
| 135 |
+
(r'[^\\\'\n]+', String.Single),
|
| 136 |
+
],
|
| 137 |
+
'namespace': [
|
| 138 |
+
(r'[a-z*](\.\w|\w)*', Name.Namespace, '#pop'),
|
| 139 |
+
default('#pop'),
|
| 140 |
+
],
|
| 141 |
+
'class': [
|
| 142 |
+
(r'[a-zA-Z_]\w*', Name.Class, '#pop'),
|
| 143 |
+
default('#pop'),
|
| 144 |
+
],
|
| 145 |
+
'keywords': [
|
| 146 |
+
(r'(async|oneway|extends|throws|required|optional)\b', Keyword),
|
| 147 |
+
(r'(true|false)\b', Keyword.Constant),
|
| 148 |
+
(r'(const|typedef)\b', Keyword.Declaration),
|
| 149 |
+
(words((
|
| 150 |
+
'cpp_namespace', 'cpp_include', 'cpp_type', 'java_package',
|
| 151 |
+
'cocoa_prefix', 'csharp_namespace', 'delphi_namespace',
|
| 152 |
+
'php_namespace', 'py_module', 'perl_package',
|
| 153 |
+
'ruby_namespace', 'smalltalk_category', 'smalltalk_prefix',
|
| 154 |
+
'xsd_all', 'xsd_optional', 'xsd_nillable', 'xsd_namespace',
|
| 155 |
+
'xsd_attrs', 'include'), suffix=r'\b'),
|
| 156 |
+
Keyword.Namespace),
|
| 157 |
+
(words((
|
| 158 |
+
'void', 'bool', 'byte', 'i16', 'i32', 'i64', 'double',
|
| 159 |
+
'string', 'binary', 'map', 'list', 'set', 'slist',
|
| 160 |
+
'senum'), suffix=r'\b'),
|
| 161 |
+
Keyword.Type),
|
| 162 |
+
(words((
|
| 163 |
+
'BEGIN', 'END', '__CLASS__', '__DIR__', '__FILE__',
|
| 164 |
+
'__FUNCTION__', '__LINE__', '__METHOD__', '__NAMESPACE__',
|
| 165 |
+
'abstract', 'alias', 'and', 'args', 'as', 'assert', 'begin',
|
| 166 |
+
'break', 'case', 'catch', 'class', 'clone', 'continue',
|
| 167 |
+
'declare', 'def', 'default', 'del', 'delete', 'do', 'dynamic',
|
| 168 |
+
'elif', 'else', 'elseif', 'elsif', 'end', 'enddeclare',
|
| 169 |
+
'endfor', 'endforeach', 'endif', 'endswitch', 'endwhile',
|
| 170 |
+
'ensure', 'except', 'exec', 'finally', 'float', 'for',
|
| 171 |
+
'foreach', 'function', 'global', 'goto', 'if', 'implements',
|
| 172 |
+
'import', 'in', 'inline', 'instanceof', 'interface', 'is',
|
| 173 |
+
'lambda', 'module', 'native', 'new', 'next', 'nil', 'not',
|
| 174 |
+
'or', 'pass', 'public', 'print', 'private', 'protected',
|
| 175 |
+
'raise', 'redo', 'rescue', 'retry', 'register', 'return',
|
| 176 |
+
'self', 'sizeof', 'static', 'super', 'switch', 'synchronized',
|
| 177 |
+
'then', 'this', 'throw', 'transient', 'try', 'undef',
|
| 178 |
+
'unless', 'unsigned', 'until', 'use', 'var', 'virtual',
|
| 179 |
+
'volatile', 'when', 'while', 'with', 'xor', 'yield'),
|
| 180 |
+
prefix=r'\b', suffix=r'\b'),
|
| 181 |
+
Keyword.Reserved),
|
| 182 |
+
],
|
| 183 |
+
'numbers': [
|
| 184 |
+
(r'[+-]?(\d+\.\d+([eE][+-]?\d+)?|\.?\d+[eE][+-]?\d+)', Number.Float),
|
| 185 |
+
(r'[+-]?0x[0-9A-Fa-f]+', Number.Hex),
|
| 186 |
+
(r'[+-]?[0-9]+', Number.Integer),
|
| 187 |
+
],
|
| 188 |
+
}
|
| 189 |
+
|
| 190 |
+
|
| 191 |
+
class BroLexer(RegexLexer):
|
| 192 |
+
"""
|
| 193 |
+
For `Bro <http://bro-ids.org/>`_ scripts.
|
| 194 |
+
|
| 195 |
+
.. versionadded:: 1.5
|
| 196 |
+
"""
|
| 197 |
+
name = 'Bro'
|
| 198 |
+
aliases = ['bro']
|
| 199 |
+
filenames = ['*.bro']
|
| 200 |
+
|
| 201 |
+
_hex = r'[0-9a-fA-F_]'
|
| 202 |
+
_float = r'((\d*\.?\d+)|(\d+\.?\d*))([eE][-+]?\d+)?'
|
| 203 |
+
_h = r'[A-Za-z0-9][-A-Za-z0-9]*'
|
| 204 |
+
|
| 205 |
+
tokens = {
|
| 206 |
+
'root': [
|
| 207 |
+
# Whitespace
|
| 208 |
+
(r'^@.*?\n', Comment.Preproc),
|
| 209 |
+
(r'#.*?\n', Comment.Single),
|
| 210 |
+
(r'\n', Text),
|
| 211 |
+
(r'\s+', Text),
|
| 212 |
+
(r'\\\n', Text),
|
| 213 |
+
# Keywords
|
| 214 |
+
(r'(add|alarm|break|case|const|continue|delete|do|else|enum|event'
|
| 215 |
+
r'|export|for|function|if|global|hook|local|module|next'
|
| 216 |
+
r'|of|print|redef|return|schedule|switch|type|when|while)\b', Keyword),
|
| 217 |
+
(r'(addr|any|bool|count|counter|double|file|int|interval|net'
|
| 218 |
+
r'|pattern|port|record|set|string|subnet|table|time|timer'
|
| 219 |
+
r'|vector)\b', Keyword.Type),
|
| 220 |
+
(r'(T|F)\b', Keyword.Constant),
|
| 221 |
+
(r'(&)((?:add|delete|expire)_func|attr|(?:create|read|write)_expire'
|
| 222 |
+
r'|default|disable_print_hook|raw_output|encrypt|group|log'
|
| 223 |
+
r'|mergeable|optional|persistent|priority|redef'
|
| 224 |
+
r'|rotate_(?:interval|size)|synchronized)\b',
|
| 225 |
+
bygroups(Punctuation, Keyword)),
|
| 226 |
+
(r'\s+module\b', Keyword.Namespace),
|
| 227 |
+
# Addresses, ports and networks
|
| 228 |
+
(r'\d+/(tcp|udp|icmp|unknown)\b', Number),
|
| 229 |
+
(r'(\d+\.){3}\d+', Number),
|
| 230 |
+
(r'(' + _hex + r'){7}' + _hex, Number),
|
| 231 |
+
(r'0x' + _hex + r'(' + _hex + r'|:)*::(' + _hex + r'|:)*', Number),
|
| 232 |
+
(r'((\d+|:)(' + _hex + r'|:)*)?::(' + _hex + r'|:)*', Number),
|
| 233 |
+
(r'(\d+\.\d+\.|(\d+\.){2}\d+)', Number),
|
| 234 |
+
# Hostnames
|
| 235 |
+
(_h + r'(\.' + _h + r')+', String),
|
| 236 |
+
# Numeric
|
| 237 |
+
(_float + r'\s+(day|hr|min|sec|msec|usec)s?\b', Literal.Date),
|
| 238 |
+
(r'0[xX]' + _hex, Number.Hex),
|
| 239 |
+
(_float, Number.Float),
|
| 240 |
+
(r'\d+', Number.Integer),
|
| 241 |
+
(r'/', String.Regex, 'regex'),
|
| 242 |
+
(r'"', String, 'string'),
|
| 243 |
+
# Operators
|
| 244 |
+
(r'[!%*/+:<=>?~|-]', Operator),
|
| 245 |
+
(r'([-+=&|]{2}|[+=!><-]=)', Operator),
|
| 246 |
+
(r'(in|match)\b', Operator.Word),
|
| 247 |
+
(r'[{}()\[\]$.,;]', Punctuation),
|
| 248 |
+
# Identfier
|
| 249 |
+
(r'([_a-zA-Z]\w*)(::)', bygroups(Name, Name.Namespace)),
|
| 250 |
+
(r'[a-zA-Z_]\w*', Name)
|
| 251 |
+
],
|
| 252 |
+
'string': [
|
| 253 |
+
(r'"', String, '#pop'),
|
| 254 |
+
(r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape),
|
| 255 |
+
(r'[^\\"\n]+', String),
|
| 256 |
+
(r'\\\n', String),
|
| 257 |
+
(r'\\', String)
|
| 258 |
+
],
|
| 259 |
+
'regex': [
|
| 260 |
+
(r'/', String.Regex, '#pop'),
|
| 261 |
+
(r'\\[\\nt/]', String.Regex), # String.Escape is too intense here.
|
| 262 |
+
(r'[^\\/\n]+', String.Regex),
|
| 263 |
+
(r'\\\n', String.Regex),
|
| 264 |
+
(r'\\', String.Regex)
|
| 265 |
+
]
|
| 266 |
+
}
|
| 267 |
+
|
| 268 |
+
|
| 269 |
+
class PuppetLexer(RegexLexer):
|
| 270 |
+
"""
|
| 271 |
+
For `Puppet <http://puppetlabs.com/>`__ configuration DSL.
|
| 272 |
+
|
| 273 |
+
.. versionadded:: 1.6
|
| 274 |
+
"""
|
| 275 |
+
name = 'Puppet'
|
| 276 |
+
aliases = ['puppet']
|
| 277 |
+
filenames = ['*.pp']
|
| 278 |
+
|
| 279 |
+
tokens = {
|
| 280 |
+
'root': [
|
| 281 |
+
include('comments'),
|
| 282 |
+
include('keywords'),
|
| 283 |
+
include('names'),
|
| 284 |
+
include('numbers'),
|
| 285 |
+
include('operators'),
|
| 286 |
+
include('strings'),
|
| 287 |
+
|
| 288 |
+
(r'[]{}:(),;[]', Punctuation),
|
| 289 |
+
(r'[^\S\n]+', Text),
|
| 290 |
+
],
|
| 291 |
+
|
| 292 |
+
'comments': [
|
| 293 |
+
(r'\s*#.*$', Comment),
|
| 294 |
+
(r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline),
|
| 295 |
+
],
|
| 296 |
+
|
| 297 |
+
'operators': [
|
| 298 |
+
(r'(=>|\?|<|>|=|\+|-|/|\*|~|!|\|)', Operator),
|
| 299 |
+
(r'(in|and|or|not)\b', Operator.Word),
|
| 300 |
+
],
|
| 301 |
+
|
| 302 |
+
'names': [
|
| 303 |
+
('[a-zA-Z_]\w*', Name.Attribute),
|
| 304 |
+
(r'(\$\S+)(\[)(\S+)(\])', bygroups(Name.Variable, Punctuation,
|
| 305 |
+
String, Punctuation)),
|
| 306 |
+
(r'\$\S+', Name.Variable),
|
| 307 |
+
],
|
| 308 |
+
|
| 309 |
+
'numbers': [
|
| 310 |
+
# Copypasta from the Python lexer
|
| 311 |
+
(r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?j?', Number.Float),
|
| 312 |
+
(r'\d+[eE][+-]?[0-9]+j?', Number.Float),
|
| 313 |
+
(r'0[0-7]+j?', Number.Oct),
|
| 314 |
+
(r'0[xX][a-fA-F0-9]+', Number.Hex),
|
| 315 |
+
(r'\d+L', Number.Integer.Long),
|
| 316 |
+
(r'\d+j?', Number.Integer)
|
| 317 |
+
],
|
| 318 |
+
|
| 319 |
+
'keywords': [
|
| 320 |
+
# Left out 'group' and 'require'
|
| 321 |
+
# Since they're often used as attributes
|
| 322 |
+
(words((
|
| 323 |
+
'absent', 'alert', 'alias', 'audit', 'augeas', 'before', 'case',
|
| 324 |
+
'check', 'class', 'computer', 'configured', 'contained',
|
| 325 |
+
'create_resources', 'crit', 'cron', 'debug', 'default',
|
| 326 |
+
'define', 'defined', 'directory', 'else', 'elsif', 'emerg',
|
| 327 |
+
'err', 'exec', 'extlookup', 'fail', 'false', 'file',
|
| 328 |
+
'filebucket', 'fqdn_rand', 'generate', 'host', 'if', 'import',
|
| 329 |
+
'include', 'info', 'inherits', 'inline_template', 'installed',
|
| 330 |
+
'interface', 'k5login', 'latest', 'link', 'loglevel',
|
| 331 |
+
'macauthorization', 'mailalias', 'maillist', 'mcx', 'md5',
|
| 332 |
+
'mount', 'mounted', 'nagios_command', 'nagios_contact',
|
| 333 |
+
'nagios_contactgroup', 'nagios_host', 'nagios_hostdependency',
|
| 334 |
+
'nagios_hostescalation', 'nagios_hostextinfo', 'nagios_hostgroup',
|
| 335 |
+
'nagios_service', 'nagios_servicedependency', 'nagios_serviceescalation',
|
| 336 |
+
'nagios_serviceextinfo', 'nagios_servicegroup', 'nagios_timeperiod',
|
| 337 |
+
'node', 'noop', 'notice', 'notify', 'package', 'present', 'purged',
|
| 338 |
+
'realize', 'regsubst', 'resources', 'role', 'router', 'running',
|
| 339 |
+
'schedule', 'scheduled_task', 'search', 'selboolean', 'selmodule',
|
| 340 |
+
'service', 'sha1', 'shellquote', 'split', 'sprintf',
|
| 341 |
+
'ssh_authorized_key', 'sshkey', 'stage', 'stopped', 'subscribe',
|
| 342 |
+
'tag', 'tagged', 'template', 'tidy', 'true', 'undef', 'unmounted',
|
| 343 |
+
'user', 'versioncmp', 'vlan', 'warning', 'yumrepo', 'zfs', 'zone',
|
| 344 |
+
'zpool'), prefix='(?i)', suffix=r'\b'),
|
| 345 |
+
Keyword),
|
| 346 |
+
],
|
| 347 |
+
|
| 348 |
+
'strings': [
|
| 349 |
+
(r'"([^"])*"', String),
|
| 350 |
+
(r"'(\\'|[^'])*'", String),
|
| 351 |
+
],
|
| 352 |
+
|
| 353 |
+
}
|
| 354 |
+
|
| 355 |
+
|
| 356 |
+
class RslLexer(RegexLexer):
|
| 357 |
+
"""
|
| 358 |
+
`RSL <http://en.wikipedia.org/wiki/RAISE>`_ is the formal specification
|
| 359 |
+
language used in RAISE (Rigorous Approach to Industrial Software Engineering)
|
| 360 |
+
method.
|
| 361 |
+
|
| 362 |
+
.. versionadded:: 2.0
|
| 363 |
+
"""
|
| 364 |
+
name = 'RSL'
|
| 365 |
+
aliases = ['rsl']
|
| 366 |
+
filenames = ['*.rsl']
|
| 367 |
+
mimetypes = ['text/rsl']
|
| 368 |
+
|
| 369 |
+
flags = re.MULTILINE | re.DOTALL
|
| 370 |
+
|
| 371 |
+
tokens = {
|
| 372 |
+
'root': [
|
| 373 |
+
(words((
|
| 374 |
+
'Bool', 'Char', 'Int', 'Nat', 'Real', 'Text', 'Unit', 'abs',
|
| 375 |
+
'all', 'always', 'any', 'as', 'axiom', 'card', 'case', 'channel',
|
| 376 |
+
'chaos', 'class', 'devt_relation', 'dom', 'elems', 'else', 'elif',
|
| 377 |
+
'end', 'exists', 'extend', 'false', 'for', 'hd', 'hide', 'if',
|
| 378 |
+
'in', 'is', 'inds', 'initialise', 'int', 'inter', 'isin', 'len',
|
| 379 |
+
'let', 'local', 'ltl_assertion', 'object', 'of', 'out', 'post',
|
| 380 |
+
'pre', 'read', 'real', 'rng', 'scheme', 'skip', 'stop', 'swap',
|
| 381 |
+
'then', 'theory', 'test_case', 'tl', 'transition_system', 'true',
|
| 382 |
+
'type', 'union', 'until', 'use', 'value', 'variable', 'while',
|
| 383 |
+
'with', 'write', '~isin', '-inflist', '-infset', '-list',
|
| 384 |
+
'-set'), prefix=r'\b', suffix=r'\b'),
|
| 385 |
+
Keyword),
|
| 386 |
+
(r'(variable|value)\b', Keyword.Declaration),
|
| 387 |
+
(r'--.*?\n', Comment),
|
| 388 |
+
(r'<:.*?:>', Comment),
|
| 389 |
+
(r'\{!.*?!\}', Comment),
|
| 390 |
+
(r'/\*.*?\*/', Comment),
|
| 391 |
+
(r'^[ \t]*([\w]+)[ \t]*:[^:]', Name.Function),
|
| 392 |
+
(r'(^[ \t]*)([\w]+)([ \t]*\([\w\s,]*\)[ \t]*)(is|as)',
|
| 393 |
+
bygroups(Text, Name.Function, Text, Keyword)),
|
| 394 |
+
(r'\b[A-Z]\w*\b', Keyword.Type),
|
| 395 |
+
(r'(true|false)\b', Keyword.Constant),
|
| 396 |
+
(r'".*"', String),
|
| 397 |
+
(r'\'.\'', String.Char),
|
| 398 |
+
(r'(><|->|-m->|/\\|<=|<<=|<\.|\|\||\|\^\||-~->|-~m->|\\/|>=|>>|'
|
| 399 |
+
r'\.>|\+\+|-\\|<->|=>|:-|~=|\*\*|<<|>>=|\+>|!!|\|=\||#)',
|
| 400 |
+
Operator),
|
| 401 |
+
(r'[0-9]+\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
|
| 402 |
+
(r'0x[0-9a-f]+', Number.Hex),
|
| 403 |
+
(r'[0-9]+', Number.Integer),
|
| 404 |
+
(r'.', Text),
|
| 405 |
+
],
|
| 406 |
+
}
|
| 407 |
+
|
| 408 |
+
def analyse_text(text):
|
| 409 |
+
"""
|
| 410 |
+
Check for the most common text in the beginning of a RSL file.
|
| 411 |
+
"""
|
| 412 |
+
if re.search(r'scheme\s*.*?=\s*class\s*type', text, re.I) is not None:
|
| 413 |
+
return 1.0
|
| 414 |
+
|
| 415 |
+
|
| 416 |
+
class MscgenLexer(RegexLexer):
|
| 417 |
+
"""
|
| 418 |
+
For `Mscgen <http://www.mcternan.me.uk/mscgen/>`_ files.
|
| 419 |
+
|
| 420 |
+
.. versionadded:: 1.6
|
| 421 |
+
"""
|
| 422 |
+
name = 'Mscgen'
|
| 423 |
+
aliases = ['mscgen', 'msc']
|
| 424 |
+
filenames = ['*.msc']
|
| 425 |
+
|
| 426 |
+
_var = r'(\w+|"(?:\\"|[^"])*")'
|
| 427 |
+
|
| 428 |
+
tokens = {
|
| 429 |
+
'root': [
|
| 430 |
+
(r'msc\b', Keyword.Type),
|
| 431 |
+
# Options
|
| 432 |
+
(r'(hscale|HSCALE|width|WIDTH|wordwraparcs|WORDWRAPARCS'
|
| 433 |
+
r'|arcgradient|ARCGRADIENT)\b', Name.Property),
|
| 434 |
+
# Operators
|
| 435 |
+
(r'(abox|ABOX|rbox|RBOX|box|BOX|note|NOTE)\b', Operator.Word),
|
| 436 |
+
(r'(\.|-|\|){3}', Keyword),
|
| 437 |
+
(r'(?:-|=|\.|:){2}'
|
| 438 |
+
r'|<<=>>|<->|<=>|<<>>|<:>'
|
| 439 |
+
r'|->|=>>|>>|=>|:>|-x|-X'
|
| 440 |
+
r'|<-|<<=|<<|<=|<:|x-|X-|=', Operator),
|
| 441 |
+
# Names
|
| 442 |
+
(r'\*', Name.Builtin),
|
| 443 |
+
(_var, Name.Variable),
|
| 444 |
+
# Other
|
| 445 |
+
(r'\[', Punctuation, 'attrs'),
|
| 446 |
+
(r'\{|\}|,|;', Punctuation),
|
| 447 |
+
include('comments')
|
| 448 |
+
],
|
| 449 |
+
'attrs': [
|
| 450 |
+
(r'\]', Punctuation, '#pop'),
|
| 451 |
+
(_var + r'(\s*)(=)(\s*)' + _var,
|
| 452 |
+
bygroups(Name.Attribute, Text.Whitespace, Operator, Text.Whitespace,
|
| 453 |
+
String)),
|
| 454 |
+
(r',', Punctuation),
|
| 455 |
+
include('comments')
|
| 456 |
+
],
|
| 457 |
+
'comments': [
|
| 458 |
+
(r'(?://|#).*?\n', Comment.Single),
|
| 459 |
+
(r'/\*(?:.|\n)*?\*/', Comment.Multiline),
|
| 460 |
+
(r'[ \t\r\n]+', Text.Whitespace)
|
| 461 |
+
]
|
| 462 |
+
}
|
| 463 |
+
|
| 464 |
+
|
| 465 |
+
class VGLLexer(RegexLexer):
|
| 466 |
+
"""
|
| 467 |
+
For `SampleManager VGL <http://www.thermoscientific.com/samplemanager>`_
|
| 468 |
+
source code.
|
| 469 |
+
|
| 470 |
+
.. versionadded:: 1.6
|
| 471 |
+
"""
|
| 472 |
+
name = 'VGL'
|
| 473 |
+
aliases = ['vgl']
|
| 474 |
+
filenames = ['*.rpf']
|
| 475 |
+
|
| 476 |
+
flags = re.MULTILINE | re.DOTALL | re.IGNORECASE
|
| 477 |
+
|
| 478 |
+
tokens = {
|
| 479 |
+
'root': [
|
| 480 |
+
(r'\{[^}]*\}', Comment.Multiline),
|
| 481 |
+
(r'declare', Keyword.Constant),
|
| 482 |
+
(r'(if|then|else|endif|while|do|endwhile|and|or|prompt|object'
|
| 483 |
+
r'|create|on|line|with|global|routine|value|endroutine|constant'
|
| 484 |
+
r'|global|set|join|library|compile_option|file|exists|create|copy'
|
| 485 |
+
r'|delete|enable|windows|name|notprotected)(?! *[=<>.,()])',
|
| 486 |
+
Keyword),
|
| 487 |
+
(r'(true|false|null|empty|error|locked)', Keyword.Constant),
|
| 488 |
+
(r'[~^*#!%&\[\]()<>|+=:;,./?-]', Operator),
|
| 489 |
+
(r'"[^"]*"', String),
|
| 490 |
+
(r'(\.)([a-z_$][\w$]*)', bygroups(Operator, Name.Attribute)),
|
| 491 |
+
(r'[0-9][0-9]*(\.[0-9]+(e[+\-]?[0-9]+)?)?', Number),
|
| 492 |
+
(r'[a-z_$][\w$]*', Name),
|
| 493 |
+
(r'[\r\n]+', Text),
|
| 494 |
+
(r'\s+', Text)
|
| 495 |
+
]
|
| 496 |
+
}
|
| 497 |
+
|
| 498 |
+
|
| 499 |
+
class AlloyLexer(RegexLexer):
|
| 500 |
+
"""
|
| 501 |
+
For `Alloy <http://alloy.mit.edu>`_ source code.
|
| 502 |
+
|
| 503 |
+
.. versionadded:: 2.0
|
| 504 |
+
"""
|
| 505 |
+
|
| 506 |
+
name = 'Alloy'
|
| 507 |
+
aliases = ['alloy']
|
| 508 |
+
filenames = ['*.als']
|
| 509 |
+
mimetypes = ['text/x-alloy']
|
| 510 |
+
|
| 511 |
+
flags = re.MULTILINE | re.DOTALL
|
| 512 |
+
|
| 513 |
+
iden_rex = r'[a-zA-Z_][\w\']*'
|
| 514 |
+
text_tuple = (r'[^\S\n]+', Text)
|
| 515 |
+
|
| 516 |
+
tokens = {
|
| 517 |
+
'sig': [
|
| 518 |
+
(r'(extends)\b', Keyword, '#pop'),
|
| 519 |
+
(iden_rex, Name),
|
| 520 |
+
text_tuple,
|
| 521 |
+
(r',', Punctuation),
|
| 522 |
+
(r'\{', Operator, '#pop'),
|
| 523 |
+
],
|
| 524 |
+
'module': [
|
| 525 |
+
text_tuple,
|
| 526 |
+
(iden_rex, Name, '#pop'),
|
| 527 |
+
],
|
| 528 |
+
'fun': [
|
| 529 |
+
text_tuple,
|
| 530 |
+
(r'\{', Operator, '#pop'),
|
| 531 |
+
(iden_rex, Name, '#pop'),
|
| 532 |
+
],
|
| 533 |
+
'root': [
|
| 534 |
+
(r'--.*?$', Comment.Single),
|
| 535 |
+
(r'//.*?$', Comment.Single),
|
| 536 |
+
(r'/\*.*?\*/', Comment.Multiline),
|
| 537 |
+
text_tuple,
|
| 538 |
+
(r'(module|open)(\s+)', bygroups(Keyword.Namespace, Text),
|
| 539 |
+
'module'),
|
| 540 |
+
(r'(sig|enum)(\s+)', bygroups(Keyword.Declaration, Text), 'sig'),
|
| 541 |
+
(r'(iden|univ|none)\b', Keyword.Constant),
|
| 542 |
+
(r'(int|Int)\b', Keyword.Type),
|
| 543 |
+
(r'(this|abstract|extends|set|seq|one|lone|let)\b', Keyword),
|
| 544 |
+
(r'(all|some|no|sum|disj|when|else)\b', Keyword),
|
| 545 |
+
(r'(run|check|for|but|exactly|expect|as)\b', Keyword),
|
| 546 |
+
(r'(and|or|implies|iff|in)\b', Operator.Word),
|
| 547 |
+
(r'(fun|pred|fact|assert)(\s+)', bygroups(Keyword, Text), 'fun'),
|
| 548 |
+
(r'!|#|&&|\+\+|<<|>>|>=|<=>|<=|\.|->', Operator),
|
| 549 |
+
(r'[-+/*%=<>&!^|~{}\[\]().]', Operator),
|
| 550 |
+
(iden_rex, Name),
|
| 551 |
+
(r'[:,]', Punctuation),
|
| 552 |
+
(r'[0-9]+', Number.Integer),
|
| 553 |
+
(r'"(\\\\|\\"|[^"])*"', String),
|
| 554 |
+
(r'\n', Text),
|
| 555 |
+
]
|
| 556 |
+
}
|
| 557 |
+
|
| 558 |
+
|
| 559 |
+
class PanLexer(RegexLexer):
|
| 560 |
+
"""
|
| 561 |
+
Lexer for `pan <http://github.com/quattor/pan/>`_ source files.
|
| 562 |
+
|
| 563 |
+
Based on tcsh lexer.
|
| 564 |
+
|
| 565 |
+
.. versionadded:: 2.0
|
| 566 |
+
"""
|
| 567 |
+
|
| 568 |
+
name = 'Pan'
|
| 569 |
+
aliases = ['pan']
|
| 570 |
+
filenames = ['*.pan']
|
| 571 |
+
|
| 572 |
+
tokens = {
|
| 573 |
+
'root': [
|
| 574 |
+
include('basic'),
|
| 575 |
+
(r'\(', Keyword, 'paren'),
|
| 576 |
+
(r'\{', Keyword, 'curly'),
|
| 577 |
+
include('data'),
|
| 578 |
+
],
|
| 579 |
+
'basic': [
|
| 580 |
+
(words((
|
| 581 |
+
'if', 'for', 'with', 'else', 'type', 'bind', 'while', 'valid', 'final',
|
| 582 |
+
'prefix', 'unique', 'object', 'foreach', 'include', 'template',
|
| 583 |
+
'function', 'variable', 'structure', 'extensible', 'declaration'),
|
| 584 |
+
prefix=r'\b', suffix=r'\s*\b'),
|
| 585 |
+
Keyword),
|
| 586 |
+
(words((
|
| 587 |
+
'file_contents', 'format', 'index', 'length', 'match', 'matches',
|
| 588 |
+
'replace', 'splice', 'split', 'substr', 'to_lowercase', 'to_uppercase',
|
| 589 |
+
'debug', 'error', 'traceback', 'deprecated', 'base64_decode',
|
| 590 |
+
'base64_encode', 'digest', 'escape', 'unescape', 'append', 'create',
|
| 591 |
+
'first', 'nlist', 'key', 'list', 'merge', 'next', 'prepend', 'is_boolean',
|
| 592 |
+
'is_defined', 'is_double', 'is_list', 'is_long', 'is_nlist', 'is_null',
|
| 593 |
+
'is_number', 'is_property', 'is_resource', 'is_string', 'to_boolean',
|
| 594 |
+
'to_double', 'to_long', 'to_string', 'clone', 'delete', 'exists',
|
| 595 |
+
'path_exists', 'if_exists', 'return', 'value'),
|
| 596 |
+
prefix=r'\b', suffix=r'\s*\b'),
|
| 597 |
+
Name.Builtin),
|
| 598 |
+
(r'#.*', Comment),
|
| 599 |
+
(r'\\[\w\W]', String.Escape),
|
| 600 |
+
(r'(\b\w+)(\s*)(=)', bygroups(Name.Variable, Text, Operator)),
|
| 601 |
+
(r'[\[\]{}()=]+', Operator),
|
| 602 |
+
(r'<<\s*(\'?)\\?(\w+)[\w\W]+?\2', String),
|
| 603 |
+
(r';', Punctuation),
|
| 604 |
+
],
|
| 605 |
+
'data': [
|
| 606 |
+
(r'(?s)"(\\\\|\\[0-7]+|\\.|[^"\\])*"', String.Double),
|
| 607 |
+
(r"(?s)'(\\\\|\\[0-7]+|\\.|[^'\\])*'", String.Single),
|
| 608 |
+
(r'\s+', Text),
|
| 609 |
+
(r'[^=\s\[\]{}()$"\'`\\;#]+', Text),
|
| 610 |
+
(r'\d+(?= |\Z)', Number),
|
| 611 |
+
],
|
| 612 |
+
'curly': [
|
| 613 |
+
(r'\}', Keyword, '#pop'),
|
| 614 |
+
(r':-', Keyword),
|
| 615 |
+
(r'\w+', Name.Variable),
|
| 616 |
+
(r'[^}:"\'`$]+', Punctuation),
|
| 617 |
+
(r':', Punctuation),
|
| 618 |
+
include('root'),
|
| 619 |
+
],
|
| 620 |
+
'paren': [
|
| 621 |
+
(r'\)', Keyword, '#pop'),
|
| 622 |
+
include('root'),
|
| 623 |
+
],
|
| 624 |
+
}
|
| 625 |
+
|
| 626 |
+
|
| 627 |
+
class CrmshLexer(RegexLexer):
|
| 628 |
+
"""
|
| 629 |
+
Lexer for `crmsh <http://crmsh.github.io/>`_ configuration files
|
| 630 |
+
for Pacemaker clusters.
|
| 631 |
+
|
| 632 |
+
.. versionadded:: 2.1
|
| 633 |
+
"""
|
| 634 |
+
name = 'Crmsh'
|
| 635 |
+
aliases = ['crmsh', 'pcmk']
|
| 636 |
+
filenames = ['*.crmsh', '*.pcmk']
|
| 637 |
+
mimetypes = []
|
| 638 |
+
|
| 639 |
+
elem = words((
|
| 640 |
+
'node', 'primitive', 'group', 'clone', 'ms', 'location',
|
| 641 |
+
'colocation', 'order', 'fencing_topology', 'rsc_ticket',
|
| 642 |
+
'rsc_template', 'property', 'rsc_defaults',
|
| 643 |
+
'op_defaults', 'acl_target', 'acl_group', 'user', 'role',
|
| 644 |
+
'tag'), suffix=r'(?![\w#$-])')
|
| 645 |
+
sub = words((
|
| 646 |
+
'params', 'meta', 'operations', 'op', 'rule',
|
| 647 |
+
'attributes', 'utilization'), suffix=r'(?![\w#$-])')
|
| 648 |
+
acl = words(('read', 'write', 'deny'), suffix=r'(?![\w#$-])')
|
| 649 |
+
bin_rel = words(('and', 'or'), suffix=r'(?![\w#$-])')
|
| 650 |
+
un_ops = words(('defined', 'not_defined'), suffix=r'(?![\w#$-])')
|
| 651 |
+
date_exp = words(('in_range', 'date', 'spec', 'in'), suffix=r'(?![\w#$-])')
|
| 652 |
+
acl_mod = (r'(?:tag|ref|reference|attribute|type|xpath)')
|
| 653 |
+
bin_ops = (r'(?:lt|gt|lte|gte|eq|ne)')
|
| 654 |
+
val_qual = (r'(?:string|version|number)')
|
| 655 |
+
rsc_role_action = (r'(?:Master|Started|Slave|Stopped|'
|
| 656 |
+
r'start|promote|demote|stop)')
|
| 657 |
+
|
| 658 |
+
tokens = {
|
| 659 |
+
'root': [
|
| 660 |
+
(r'^#.*\n?', Comment),
|
| 661 |
+
# attr=value (nvpair)
|
| 662 |
+
(r'([\w#$-]+)(=)("(?:""|[^"])*"|\S+)',
|
| 663 |
+
bygroups(Name.Attribute, Punctuation, String)),
|
| 664 |
+
# need this construct, otherwise numeric node ids
|
| 665 |
+
# are matched as scores
|
| 666 |
+
# elem id:
|
| 667 |
+
(r'(node)(\s+)([\w#$-]+)(:)',
|
| 668 |
+
bygroups(Keyword, Whitespace, Name, Punctuation)),
|
| 669 |
+
# scores
|
| 670 |
+
(r'([+-]?([0-9]+|inf)):', Number),
|
| 671 |
+
# keywords (elements and other)
|
| 672 |
+
(elem, Keyword),
|
| 673 |
+
(sub, Keyword),
|
| 674 |
+
(acl, Keyword),
|
| 675 |
+
# binary operators
|
| 676 |
+
(r'(?:%s:)?(%s)(?![\w#$-])' % (val_qual, bin_ops), Operator.Word),
|
| 677 |
+
# other operators
|
| 678 |
+
(bin_rel, Operator.Word),
|
| 679 |
+
(un_ops, Operator.Word),
|
| 680 |
+
(date_exp, Operator.Word),
|
| 681 |
+
# builtin attributes (e.g. #uname)
|
| 682 |
+
(r'#[a-z]+(?![\w#$-])', Name.Builtin),
|
| 683 |
+
# acl_mod:blah
|
| 684 |
+
(r'(%s)(:)("(?:""|[^"])*"|\S+)' % acl_mod,
|
| 685 |
+
bygroups(Keyword, Punctuation, Name)),
|
| 686 |
+
# rsc_id[:(role|action)]
|
| 687 |
+
# NB: this matches all other identifiers
|
| 688 |
+
(r'([\w#$-]+)(?:(:)(%s))?(?![\w#$-])' % rsc_role_action,
|
| 689 |
+
bygroups(Name, Punctuation, Operator.Word)),
|
| 690 |
+
# punctuation
|
| 691 |
+
(r'(\\(?=\n)|[[\](){}/:@])', Punctuation),
|
| 692 |
+
(r'\s+|\n', Whitespace),
|
| 693 |
+
],
|
| 694 |
+
}
|
| 695 |
+
|
| 696 |
+
|
| 697 |
+
class FlatlineLexer(RegexLexer):
|
| 698 |
+
"""
|
| 699 |
+
Lexer for `Flatline <https://github.com/bigmlcom/flatline>`_ expressions.
|
| 700 |
+
|
| 701 |
+
.. versionadded:: 2.2
|
| 702 |
+
"""
|
| 703 |
+
name = 'Flatline'
|
| 704 |
+
aliases = ['flatline']
|
| 705 |
+
filenames = []
|
| 706 |
+
mimetypes = ['text/x-flatline']
|
| 707 |
+
|
| 708 |
+
special_forms = ('let',)
|
| 709 |
+
|
| 710 |
+
builtins = (
|
| 711 |
+
"!=", "*", "+", "-", "<", "<=", "=", ">", ">=", "abs", "acos", "all",
|
| 712 |
+
"all-but", "all-with-defaults", "all-with-numeric-default", "and",
|
| 713 |
+
"asin", "atan", "avg", "avg-window", "bin-center", "bin-count", "call",
|
| 714 |
+
"category-count", "ceil", "cond", "cond-window", "cons", "cos", "cosh",
|
| 715 |
+
"count", "diff-window", "div", "ensure-value", "ensure-weighted-value",
|
| 716 |
+
"epoch", "epoch-day", "epoch-fields", "epoch-hour", "epoch-millisecond",
|
| 717 |
+
"epoch-minute", "epoch-month", "epoch-second", "epoch-weekday",
|
| 718 |
+
"epoch-year", "exp", "f", "field", "field-prop", "fields", "filter",
|
| 719 |
+
"first", "floor", "head", "if", "in", "integer", "language", "length",
|
| 720 |
+
"levenshtein", "linear-regression", "list", "ln", "log", "log10", "map",
|
| 721 |
+
"matches", "matches?", "max", "maximum", "md5", "mean", "median", "min",
|
| 722 |
+
"minimum", "missing", "missing-count", "missing?", "missing_count",
|
| 723 |
+
"mod", "mode", "normalize", "not", "nth", "occurrences", "or",
|
| 724 |
+
"percentile", "percentile-label", "population", "population-fraction",
|
| 725 |
+
"pow", "preferred", "preferred?", "quantile-label", "rand", "rand-int",
|
| 726 |
+
"random-value", "re-quote", "real", "replace", "replace-first", "rest",
|
| 727 |
+
"round", "row-number", "segment-label", "sha1", "sha256", "sin", "sinh",
|
| 728 |
+
"sqrt", "square", "standard-deviation", "standard_deviation", "str",
|
| 729 |
+
"subs", "sum", "sum-squares", "sum-window", "sum_squares", "summary",
|
| 730 |
+
"summary-no", "summary-str", "tail", "tan", "tanh", "to-degrees",
|
| 731 |
+
"to-radians", "variance", "vectorize", "weighted-random-value", "window",
|
| 732 |
+
"winnow", "within-percentiles?", "z-score",
|
| 733 |
+
)
|
| 734 |
+
|
| 735 |
+
valid_name = r'(?!#)[\w!$%*+<=>?/.#-]+'
|
| 736 |
+
|
| 737 |
+
tokens = {
|
| 738 |
+
'root': [
|
| 739 |
+
# whitespaces - usually not relevant
|
| 740 |
+
(r'[,\s]+', Text),
|
| 741 |
+
|
| 742 |
+
# numbers
|
| 743 |
+
(r'-?\d+\.\d+', Number.Float),
|
| 744 |
+
(r'-?\d+', Number.Integer),
|
| 745 |
+
(r'0x-?[a-f\d]+', Number.Hex),
|
| 746 |
+
|
| 747 |
+
# strings, symbols and characters
|
| 748 |
+
(r'"(\\\\|\\"|[^"])*"', String),
|
| 749 |
+
(r"\\(.|[a-z]+)", String.Char),
|
| 750 |
+
|
| 751 |
+
# expression template placeholder
|
| 752 |
+
(r'_', String.Symbol),
|
| 753 |
+
|
| 754 |
+
# highlight the special forms
|
| 755 |
+
(words(special_forms, suffix=' '), Keyword),
|
| 756 |
+
|
| 757 |
+
# highlight the builtins
|
| 758 |
+
(words(builtins, suffix=' '), Name.Builtin),
|
| 759 |
+
|
| 760 |
+
# the remaining functions
|
| 761 |
+
(r'(?<=\()' + valid_name, Name.Function),
|
| 762 |
+
|
| 763 |
+
# find the remaining variables
|
| 764 |
+
(valid_name, Name.Variable),
|
| 765 |
+
|
| 766 |
+
# parentheses
|
| 767 |
+
(r'(\(|\))', Punctuation),
|
| 768 |
+
],
|
| 769 |
+
}
|
| 770 |
+
|
| 771 |
+
|
| 772 |
+
class SnowballLexer(ExtendedRegexLexer):
|
| 773 |
+
"""
|
| 774 |
+
Lexer for `Snowball <http://snowballstem.org/>`_ source code.
|
| 775 |
+
|
| 776 |
+
.. versionadded:: 2.2
|
| 777 |
+
"""
|
| 778 |
+
|
| 779 |
+
name = 'Snowball'
|
| 780 |
+
aliases = ['snowball']
|
| 781 |
+
filenames = ['*.sbl']
|
| 782 |
+
|
| 783 |
+
_ws = r'\n\r\t '
|
| 784 |
+
|
| 785 |
+
def __init__(self, **options):
|
| 786 |
+
self._reset_stringescapes()
|
| 787 |
+
ExtendedRegexLexer.__init__(self, **options)
|
| 788 |
+
|
| 789 |
+
def _reset_stringescapes(self):
|
| 790 |
+
self._start = "'"
|
| 791 |
+
self._end = "'"
|
| 792 |
+
|
| 793 |
+
def _string(do_string_first):
|
| 794 |
+
def callback(lexer, match, ctx):
|
| 795 |
+
s = match.start()
|
| 796 |
+
text = match.group()
|
| 797 |
+
string = re.compile(r'([^%s]*)(.)' % re.escape(lexer._start)).match
|
| 798 |
+
escape = re.compile(r'([^%s]*)(.)' % re.escape(lexer._end)).match
|
| 799 |
+
pos = 0
|
| 800 |
+
do_string = do_string_first
|
| 801 |
+
while pos < len(text):
|
| 802 |
+
if do_string:
|
| 803 |
+
match = string(text, pos)
|
| 804 |
+
yield s + match.start(1), String.Single, match.group(1)
|
| 805 |
+
if match.group(2) == "'":
|
| 806 |
+
yield s + match.start(2), String.Single, match.group(2)
|
| 807 |
+
ctx.stack.pop()
|
| 808 |
+
break
|
| 809 |
+
yield s + match.start(2), String.Escape, match.group(2)
|
| 810 |
+
pos = match.end()
|
| 811 |
+
match = escape(text, pos)
|
| 812 |
+
yield s + match.start(), String.Escape, match.group()
|
| 813 |
+
if match.group(2) != lexer._end:
|
| 814 |
+
ctx.stack[-1] = 'escape'
|
| 815 |
+
break
|
| 816 |
+
pos = match.end()
|
| 817 |
+
do_string = True
|
| 818 |
+
ctx.pos = s + match.end()
|
| 819 |
+
return callback
|
| 820 |
+
|
| 821 |
+
def _stringescapes(lexer, match, ctx):
|
| 822 |
+
lexer._start = match.group(3)
|
| 823 |
+
lexer._end = match.group(5)
|
| 824 |
+
return bygroups(Keyword.Reserved, Text, String.Escape, Text,
|
| 825 |
+
String.Escape)(lexer, match, ctx)
|
| 826 |
+
|
| 827 |
+
tokens = {
|
| 828 |
+
'root': [
|
| 829 |
+
(words(('len', 'lenof'), suffix=r'\b'), Operator.Word),
|
| 830 |
+
include('root1'),
|
| 831 |
+
],
|
| 832 |
+
'root1': [
|
| 833 |
+
(r'[%s]+' % _ws, Text),
|
| 834 |
+
(r'\d+', Number.Integer),
|
| 835 |
+
(r"'", String.Single, 'string'),
|
| 836 |
+
(r'[()]', Punctuation),
|
| 837 |
+
(r'/\*[\w\W]*?\*/', Comment.Multiline),
|
| 838 |
+
(r'//.*', Comment.Single),
|
| 839 |
+
(r'[!*+\-/<=>]=|[-=]>|<[+-]|[$*+\-/<=>?\[\]]', Operator),
|
| 840 |
+
(words(('as', 'get', 'hex', 'among', 'define', 'decimal',
|
| 841 |
+
'backwardmode'), suffix=r'\b'),
|
| 842 |
+
Keyword.Reserved),
|
| 843 |
+
(words(('strings', 'booleans', 'integers', 'routines', 'externals',
|
| 844 |
+
'groupings'), suffix=r'\b'),
|
| 845 |
+
Keyword.Reserved, 'declaration'),
|
| 846 |
+
(words(('do', 'or', 'and', 'for', 'hop', 'non', 'not', 'set', 'try',
|
| 847 |
+
'fail', 'goto', 'loop', 'next', 'test', 'true',
|
| 848 |
+
'false', 'unset', 'atmark', 'attach', 'delete', 'gopast',
|
| 849 |
+
'insert', 'repeat', 'sizeof', 'tomark', 'atleast',
|
| 850 |
+
'atlimit', 'reverse', 'setmark', 'tolimit', 'setlimit',
|
| 851 |
+
'backwards', 'substring'), suffix=r'\b'),
|
| 852 |
+
Operator.Word),
|
| 853 |
+
(words(('size', 'limit', 'cursor', 'maxint', 'minint'),
|
| 854 |
+
suffix=r'\b'),
|
| 855 |
+
Name.Builtin),
|
| 856 |
+
(r'(stringdef\b)([%s]*)([^%s]+)' % (_ws, _ws),
|
| 857 |
+
bygroups(Keyword.Reserved, Text, String.Escape)),
|
| 858 |
+
(r'(stringescapes\b)([%s]*)(.)([%s]*)(.)' % (_ws, _ws),
|
| 859 |
+
_stringescapes),
|
| 860 |
+
(r'[A-Za-z]\w*', Name),
|
| 861 |
+
],
|
| 862 |
+
'declaration': [
|
| 863 |
+
(r'\)', Punctuation, '#pop'),
|
| 864 |
+
(words(('len', 'lenof'), suffix=r'\b'), Name,
|
| 865 |
+
('root1', 'declaration')),
|
| 866 |
+
include('root1'),
|
| 867 |
+
],
|
| 868 |
+
'string': [
|
| 869 |
+
(r"[^']*'", _string(True)),
|
| 870 |
+
],
|
| 871 |
+
'escape': [
|
| 872 |
+
(r"[^']*'", _string(False)),
|
| 873 |
+
],
|
| 874 |
+
}
|
| 875 |
+
|
| 876 |
+
def get_tokens_unprocessed(self, text=None, context=None):
|
| 877 |
+
self._reset_stringescapes()
|
| 878 |
+
return ExtendedRegexLexer.get_tokens_unprocessed(self, text, context)
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/dylan.py
ADDED
|
@@ -0,0 +1,289 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.dylan
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexers for the Dylan language.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
import re
|
| 13 |
+
|
| 14 |
+
from pygments.lexer import Lexer, RegexLexer, bygroups, do_insertions, default
|
| 15 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 16 |
+
Number, Punctuation, Generic, Literal
|
| 17 |
+
|
| 18 |
+
__all__ = ['DylanLexer', 'DylanConsoleLexer', 'DylanLidLexer']
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
class DylanLexer(RegexLexer):
|
| 22 |
+
"""
|
| 23 |
+
For the `Dylan <http://www.opendylan.org/>`_ language.
|
| 24 |
+
|
| 25 |
+
.. versionadded:: 0.7
|
| 26 |
+
"""
|
| 27 |
+
|
| 28 |
+
name = 'Dylan'
|
| 29 |
+
aliases = ['dylan']
|
| 30 |
+
filenames = ['*.dylan', '*.dyl', '*.intr']
|
| 31 |
+
mimetypes = ['text/x-dylan']
|
| 32 |
+
|
| 33 |
+
flags = re.IGNORECASE
|
| 34 |
+
|
| 35 |
+
builtins = set((
|
| 36 |
+
'subclass', 'abstract', 'block', 'concrete', 'constant', 'class',
|
| 37 |
+
'compiler-open', 'compiler-sideways', 'domain', 'dynamic',
|
| 38 |
+
'each-subclass', 'exception', 'exclude', 'function', 'generic',
|
| 39 |
+
'handler', 'inherited', 'inline', 'inline-only', 'instance',
|
| 40 |
+
'interface', 'import', 'keyword', 'library', 'macro', 'method',
|
| 41 |
+
'module', 'open', 'primary', 'required', 'sealed', 'sideways',
|
| 42 |
+
'singleton', 'slot', 'thread', 'variable', 'virtual'))
|
| 43 |
+
|
| 44 |
+
keywords = set((
|
| 45 |
+
'above', 'afterwards', 'begin', 'below', 'by', 'case', 'cleanup',
|
| 46 |
+
'create', 'define', 'else', 'elseif', 'end', 'export', 'finally',
|
| 47 |
+
'for', 'from', 'if', 'in', 'let', 'local', 'otherwise', 'rename',
|
| 48 |
+
'select', 'signal', 'then', 'to', 'unless', 'until', 'use', 'when',
|
| 49 |
+
'while'))
|
| 50 |
+
|
| 51 |
+
operators = set((
|
| 52 |
+
'~', '+', '-', '*', '|', '^', '=', '==', '~=', '~==', '<', '<=',
|
| 53 |
+
'>', '>=', '&', '|'))
|
| 54 |
+
|
| 55 |
+
functions = set((
|
| 56 |
+
'abort', 'abs', 'add', 'add!', 'add-method', 'add-new', 'add-new!',
|
| 57 |
+
'all-superclasses', 'always', 'any?', 'applicable-method?', 'apply',
|
| 58 |
+
'aref', 'aref-setter', 'as', 'as-lowercase', 'as-lowercase!',
|
| 59 |
+
'as-uppercase', 'as-uppercase!', 'ash', 'backward-iteration-protocol',
|
| 60 |
+
'break', 'ceiling', 'ceiling/', 'cerror', 'check-type', 'choose',
|
| 61 |
+
'choose-by', 'complement', 'compose', 'concatenate', 'concatenate-as',
|
| 62 |
+
'condition-format-arguments', 'condition-format-string', 'conjoin',
|
| 63 |
+
'copy-sequence', 'curry', 'default-handler', 'dimension', 'dimensions',
|
| 64 |
+
'direct-subclasses', 'direct-superclasses', 'disjoin', 'do',
|
| 65 |
+
'do-handlers', 'element', 'element-setter', 'empty?', 'error', 'even?',
|
| 66 |
+
'every?', 'false-or', 'fill!', 'find-key', 'find-method', 'first',
|
| 67 |
+
'first-setter', 'floor', 'floor/', 'forward-iteration-protocol',
|
| 68 |
+
'function-arguments', 'function-return-values',
|
| 69 |
+
'function-specializers', 'gcd', 'generic-function-mandatory-keywords',
|
| 70 |
+
'generic-function-methods', 'head', 'head-setter', 'identity',
|
| 71 |
+
'initialize', 'instance?', 'integral?', 'intersection',
|
| 72 |
+
'key-sequence', 'key-test', 'last', 'last-setter', 'lcm', 'limited',
|
| 73 |
+
'list', 'logand', 'logbit?', 'logior', 'lognot', 'logxor', 'make',
|
| 74 |
+
'map', 'map-as', 'map-into', 'max', 'member?', 'merge-hash-codes',
|
| 75 |
+
'min', 'modulo', 'negative', 'negative?', 'next-method',
|
| 76 |
+
'object-class', 'object-hash', 'odd?', 'one-of', 'pair', 'pop',
|
| 77 |
+
'pop-last', 'positive?', 'push', 'push-last', 'range', 'rank',
|
| 78 |
+
'rcurry', 'reduce', 'reduce1', 'remainder', 'remove', 'remove!',
|
| 79 |
+
'remove-duplicates', 'remove-duplicates!', 'remove-key!',
|
| 80 |
+
'remove-method', 'replace-elements!', 'replace-subsequence!',
|
| 81 |
+
'restart-query', 'return-allowed?', 'return-description',
|
| 82 |
+
'return-query', 'reverse', 'reverse!', 'round', 'round/',
|
| 83 |
+
'row-major-index', 'second', 'second-setter', 'shallow-copy',
|
| 84 |
+
'signal', 'singleton', 'size', 'size-setter', 'slot-initialized?',
|
| 85 |
+
'sort', 'sort!', 'sorted-applicable-methods', 'subsequence-position',
|
| 86 |
+
'subtype?', 'table-protocol', 'tail', 'tail-setter', 'third',
|
| 87 |
+
'third-setter', 'truncate', 'truncate/', 'type-error-expected-type',
|
| 88 |
+
'type-error-value', 'type-for-copy', 'type-union', 'union', 'values',
|
| 89 |
+
'vector', 'zero?'))
|
| 90 |
+
|
| 91 |
+
valid_name = '\\\\?[\\w!&*<>|^$%@\\-+~?/=]+'
|
| 92 |
+
|
| 93 |
+
def get_tokens_unprocessed(self, text):
|
| 94 |
+
for index, token, value in RegexLexer.get_tokens_unprocessed(self, text):
|
| 95 |
+
if token is Name:
|
| 96 |
+
lowercase_value = value.lower()
|
| 97 |
+
if lowercase_value in self.builtins:
|
| 98 |
+
yield index, Name.Builtin, value
|
| 99 |
+
continue
|
| 100 |
+
if lowercase_value in self.keywords:
|
| 101 |
+
yield index, Keyword, value
|
| 102 |
+
continue
|
| 103 |
+
if lowercase_value in self.functions:
|
| 104 |
+
yield index, Name.Builtin, value
|
| 105 |
+
continue
|
| 106 |
+
if lowercase_value in self.operators:
|
| 107 |
+
yield index, Operator, value
|
| 108 |
+
continue
|
| 109 |
+
yield index, token, value
|
| 110 |
+
|
| 111 |
+
tokens = {
|
| 112 |
+
'root': [
|
| 113 |
+
# Whitespace
|
| 114 |
+
(r'\s+', Text),
|
| 115 |
+
|
| 116 |
+
# single line comment
|
| 117 |
+
(r'//.*?\n', Comment.Single),
|
| 118 |
+
|
| 119 |
+
# lid header
|
| 120 |
+
(r'([a-z0-9-]+)(:)([ \t]*)(.*(?:\n[ \t].+)*)',
|
| 121 |
+
bygroups(Name.Attribute, Operator, Text, String)),
|
| 122 |
+
|
| 123 |
+
default('code') # no header match, switch to code
|
| 124 |
+
],
|
| 125 |
+
'code': [
|
| 126 |
+
# Whitespace
|
| 127 |
+
(r'\s+', Text),
|
| 128 |
+
|
| 129 |
+
# single line comment
|
| 130 |
+
(r'//.*?\n', Comment.Single),
|
| 131 |
+
|
| 132 |
+
# multi-line comment
|
| 133 |
+
(r'/\*', Comment.Multiline, 'comment'),
|
| 134 |
+
|
| 135 |
+
# strings and characters
|
| 136 |
+
(r'"', String, 'string'),
|
| 137 |
+
(r"'(\\.|\\[0-7]{1,3}|\\x[a-f0-9]{1,2}|[^\\\'\n])'", String.Char),
|
| 138 |
+
|
| 139 |
+
# binary integer
|
| 140 |
+
(r'#b[01]+', Number.Bin),
|
| 141 |
+
|
| 142 |
+
# octal integer
|
| 143 |
+
(r'#o[0-7]+', Number.Oct),
|
| 144 |
+
|
| 145 |
+
# floating point
|
| 146 |
+
(r'[-+]?(\d*\.\d+(e[-+]?\d+)?|\d+(\.\d*)?e[-+]?\d+)', Number.Float),
|
| 147 |
+
|
| 148 |
+
# decimal integer
|
| 149 |
+
(r'[-+]?\d+', Number.Integer),
|
| 150 |
+
|
| 151 |
+
# hex integer
|
| 152 |
+
(r'#x[0-9a-f]+', Number.Hex),
|
| 153 |
+
|
| 154 |
+
# Macro parameters
|
| 155 |
+
(r'(\?' + valid_name + ')(:)'
|
| 156 |
+
r'(token|name|variable|expression|body|case-body|\*)',
|
| 157 |
+
bygroups(Name.Tag, Operator, Name.Builtin)),
|
| 158 |
+
(r'(\?)(:)(token|name|variable|expression|body|case-body|\*)',
|
| 159 |
+
bygroups(Name.Tag, Operator, Name.Builtin)),
|
| 160 |
+
(r'\?' + valid_name, Name.Tag),
|
| 161 |
+
|
| 162 |
+
# Punctuation
|
| 163 |
+
(r'(=>|::|#\(|#\[|##|\?\?|\?=|\?|[(){}\[\],.;])', Punctuation),
|
| 164 |
+
|
| 165 |
+
# Most operators are picked up as names and then re-flagged.
|
| 166 |
+
# This one isn't valid in a name though, so we pick it up now.
|
| 167 |
+
(r':=', Operator),
|
| 168 |
+
|
| 169 |
+
# Pick up #t / #f before we match other stuff with #.
|
| 170 |
+
(r'#[tf]', Literal),
|
| 171 |
+
|
| 172 |
+
# #"foo" style keywords
|
| 173 |
+
(r'#"', String.Symbol, 'keyword'),
|
| 174 |
+
|
| 175 |
+
# #rest, #key, #all-keys, etc.
|
| 176 |
+
(r'#[a-z0-9-]+', Keyword),
|
| 177 |
+
|
| 178 |
+
# required-init-keyword: style keywords.
|
| 179 |
+
(valid_name + ':', Keyword),
|
| 180 |
+
|
| 181 |
+
# class names
|
| 182 |
+
(r'<' + valid_name + '>', Name.Class),
|
| 183 |
+
|
| 184 |
+
# define variable forms.
|
| 185 |
+
(r'\*' + valid_name + '\*', Name.Variable.Global),
|
| 186 |
+
|
| 187 |
+
# define constant forms.
|
| 188 |
+
(r'\$' + valid_name, Name.Constant),
|
| 189 |
+
|
| 190 |
+
# everything else. We re-flag some of these in the method above.
|
| 191 |
+
(valid_name, Name),
|
| 192 |
+
],
|
| 193 |
+
'comment': [
|
| 194 |
+
(r'[^*/]', Comment.Multiline),
|
| 195 |
+
(r'/\*', Comment.Multiline, '#push'),
|
| 196 |
+
(r'\*/', Comment.Multiline, '#pop'),
|
| 197 |
+
(r'[*/]', Comment.Multiline)
|
| 198 |
+
],
|
| 199 |
+
'keyword': [
|
| 200 |
+
(r'"', String.Symbol, '#pop'),
|
| 201 |
+
(r'[^\\"]+', String.Symbol), # all other characters
|
| 202 |
+
],
|
| 203 |
+
'string': [
|
| 204 |
+
(r'"', String, '#pop'),
|
| 205 |
+
(r'\\([\\abfnrtv"\']|x[a-f0-9]{2,4}|[0-7]{1,3})', String.Escape),
|
| 206 |
+
(r'[^\\"\n]+', String), # all other characters
|
| 207 |
+
(r'\\\n', String), # line continuation
|
| 208 |
+
(r'\\', String), # stray backslash
|
| 209 |
+
]
|
| 210 |
+
}
|
| 211 |
+
|
| 212 |
+
|
| 213 |
+
class DylanLidLexer(RegexLexer):
|
| 214 |
+
"""
|
| 215 |
+
For Dylan LID (Library Interchange Definition) files.
|
| 216 |
+
|
| 217 |
+
.. versionadded:: 1.6
|
| 218 |
+
"""
|
| 219 |
+
|
| 220 |
+
name = 'DylanLID'
|
| 221 |
+
aliases = ['dylan-lid', 'lid']
|
| 222 |
+
filenames = ['*.lid', '*.hdp']
|
| 223 |
+
mimetypes = ['text/x-dylan-lid']
|
| 224 |
+
|
| 225 |
+
flags = re.IGNORECASE
|
| 226 |
+
|
| 227 |
+
tokens = {
|
| 228 |
+
'root': [
|
| 229 |
+
# Whitespace
|
| 230 |
+
(r'\s+', Text),
|
| 231 |
+
|
| 232 |
+
# single line comment
|
| 233 |
+
(r'//.*?\n', Comment.Single),
|
| 234 |
+
|
| 235 |
+
# lid header
|
| 236 |
+
(r'(.*?)(:)([ \t]*)(.*(?:\n[ \t].+)*)',
|
| 237 |
+
bygroups(Name.Attribute, Operator, Text, String)),
|
| 238 |
+
]
|
| 239 |
+
}
|
| 240 |
+
|
| 241 |
+
|
| 242 |
+
class DylanConsoleLexer(Lexer):
|
| 243 |
+
"""
|
| 244 |
+
For Dylan interactive console output like:
|
| 245 |
+
|
| 246 |
+
.. sourcecode:: dylan-console
|
| 247 |
+
|
| 248 |
+
? let a = 1;
|
| 249 |
+
=> 1
|
| 250 |
+
? a
|
| 251 |
+
=> 1
|
| 252 |
+
|
| 253 |
+
This is based on a copy of the RubyConsoleLexer.
|
| 254 |
+
|
| 255 |
+
.. versionadded:: 1.6
|
| 256 |
+
"""
|
| 257 |
+
name = 'Dylan session'
|
| 258 |
+
aliases = ['dylan-console', 'dylan-repl']
|
| 259 |
+
filenames = ['*.dylan-console']
|
| 260 |
+
mimetypes = ['text/x-dylan-console']
|
| 261 |
+
|
| 262 |
+
_line_re = re.compile('.*?\n')
|
| 263 |
+
_prompt_re = re.compile('\?| ')
|
| 264 |
+
|
| 265 |
+
def get_tokens_unprocessed(self, text):
|
| 266 |
+
dylexer = DylanLexer(**self.options)
|
| 267 |
+
|
| 268 |
+
curcode = ''
|
| 269 |
+
insertions = []
|
| 270 |
+
for match in self._line_re.finditer(text):
|
| 271 |
+
line = match.group()
|
| 272 |
+
m = self._prompt_re.match(line)
|
| 273 |
+
if m is not None:
|
| 274 |
+
end = m.end()
|
| 275 |
+
insertions.append((len(curcode),
|
| 276 |
+
[(0, Generic.Prompt, line[:end])]))
|
| 277 |
+
curcode += line[end:]
|
| 278 |
+
else:
|
| 279 |
+
if curcode:
|
| 280 |
+
for item in do_insertions(insertions,
|
| 281 |
+
dylexer.get_tokens_unprocessed(curcode)):
|
| 282 |
+
yield item
|
| 283 |
+
curcode = ''
|
| 284 |
+
insertions = []
|
| 285 |
+
yield match.start(), Generic.Output, line
|
| 286 |
+
if curcode:
|
| 287 |
+
for item in do_insertions(insertions,
|
| 288 |
+
dylexer.get_tokens_unprocessed(curcode)):
|
| 289 |
+
yield item
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/ezhil.py
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.ezhil
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Pygments lexers for Ezhil language.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
import re
|
| 13 |
+
from pygments.lexer import RegexLexer, include, words
|
| 14 |
+
from pygments.token import Keyword, Text, Comment, Name
|
| 15 |
+
from pygments.token import String, Number, Punctuation, Operator
|
| 16 |
+
|
| 17 |
+
__all__ = ['EzhilLexer']
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
class EzhilLexer(RegexLexer):
|
| 21 |
+
"""
|
| 22 |
+
Lexer for `Ezhil, a Tamil script-based programming language <http://ezhillang.org>`_
|
| 23 |
+
|
| 24 |
+
.. versionadded:: 2.1
|
| 25 |
+
"""
|
| 26 |
+
name = 'Ezhil'
|
| 27 |
+
aliases = ['ezhil']
|
| 28 |
+
filenames = ['*.n']
|
| 29 |
+
mimetypes = ['text/x-ezhil']
|
| 30 |
+
flags = re.MULTILINE | re.UNICODE
|
| 31 |
+
# Refer to tamil.utf8.tamil_letters from open-tamil for a stricter version of this.
|
| 32 |
+
# This much simpler version is close enough, and includes combining marks.
|
| 33 |
+
_TALETTERS = u'[a-zA-Z_]|[\u0b80-\u0bff]'
|
| 34 |
+
tokens = {
|
| 35 |
+
'root': [
|
| 36 |
+
include('keywords'),
|
| 37 |
+
(r'#.*\n', Comment.Single),
|
| 38 |
+
(r'[@+/*,^\-%]|[!<>=]=?|&&?|\|\|?', Operator),
|
| 39 |
+
(u'இல்', Operator.Word),
|
| 40 |
+
(words((u'assert', u'max', u'min',
|
| 41 |
+
u'நீளம்', u'சரம்_இடமாற்று', u'சரம்_கண்டுபிடி',
|
| 42 |
+
u'பட்டியல்', u'பின்இணை', u'வரிசைப்படுத்து',
|
| 43 |
+
u'எடு', u'தலைகீழ்', u'நீட்டிக்க', u'நுழைக்க', u'வை',
|
| 44 |
+
u'கோப்பை_திற', u'கோப்பை_எழுது', u'கோப்பை_மூடு',
|
| 45 |
+
u'pi', u'sin', u'cos', u'tan', u'sqrt', u'hypot', u'pow',
|
| 46 |
+
u'exp', u'log', u'log10', u'exit',
|
| 47 |
+
), suffix=r'\b'), Name.Builtin),
|
| 48 |
+
(r'(True|False)\b', Keyword.Constant),
|
| 49 |
+
(r'[^\S\n]+', Text),
|
| 50 |
+
include('identifier'),
|
| 51 |
+
include('literal'),
|
| 52 |
+
(r'[(){}\[\]:;.]', Punctuation),
|
| 53 |
+
],
|
| 54 |
+
'keywords': [
|
| 55 |
+
(u'பதிப்பி|தேர்ந்தெடு|தேர்வு|ஏதேனில்|ஆனால்|இல்லைஆனால்|இல்லை|ஆக|ஒவ்வொன்றாக|இல்|வரை|செய்|முடியேனில்|பின்கொடு|முடி|நிரல்பாகம்|தொடர்|நிறுத்து|நிரல்பாகம்', Keyword),
|
| 56 |
+
],
|
| 57 |
+
'identifier': [
|
| 58 |
+
(u'(?:'+_TALETTERS+u')(?:[0-9]|'+_TALETTERS+u')*', Name),
|
| 59 |
+
],
|
| 60 |
+
'literal': [
|
| 61 |
+
(r'".*?"', String),
|
| 62 |
+
(r'(?u)\d+((\.\d*)?[eE][+-]?\d+|\.\d*)', Number.Float),
|
| 63 |
+
(r'(?u)\d+', Number.Integer),
|
| 64 |
+
]
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
def __init__(self, **options):
|
| 68 |
+
super(EzhilLexer, self).__init__(**options)
|
| 69 |
+
self.encoding = options.get('encoding', 'utf-8')
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/fortran.py
ADDED
|
@@ -0,0 +1,205 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.fortran
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexers for Fortran languages.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 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, bygroups, include, words, using, default
|
| 15 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 16 |
+
Number, Punctuation, Generic
|
| 17 |
+
|
| 18 |
+
__all__ = ['FortranLexer', 'FortranFixedLexer']
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
class FortranLexer(RegexLexer):
|
| 22 |
+
"""
|
| 23 |
+
Lexer for FORTRAN 90 code.
|
| 24 |
+
|
| 25 |
+
.. versionadded:: 0.10
|
| 26 |
+
"""
|
| 27 |
+
name = 'Fortran'
|
| 28 |
+
aliases = ['fortran']
|
| 29 |
+
filenames = ['*.f03', '*.f90', '*.F03', '*.F90']
|
| 30 |
+
mimetypes = ['text/x-fortran']
|
| 31 |
+
flags = re.IGNORECASE | re.MULTILINE
|
| 32 |
+
|
| 33 |
+
# Data Types: INTEGER, REAL, COMPLEX, LOGICAL, CHARACTER and DOUBLE PRECISION
|
| 34 |
+
# Operators: **, *, +, -, /, <, >, <=, >=, ==, /=
|
| 35 |
+
# Logical (?): NOT, AND, OR, EQV, NEQV
|
| 36 |
+
|
| 37 |
+
# Builtins:
|
| 38 |
+
# http://gcc.gnu.org/onlinedocs/gcc-3.4.6/g77/Table-of-Intrinsic-Functions.html
|
| 39 |
+
|
| 40 |
+
tokens = {
|
| 41 |
+
'root': [
|
| 42 |
+
(r'^#.*\n', Comment.Preproc),
|
| 43 |
+
(r'!.*\n', Comment),
|
| 44 |
+
include('strings'),
|
| 45 |
+
include('core'),
|
| 46 |
+
(r'[a-z][\w$]*', Name),
|
| 47 |
+
include('nums'),
|
| 48 |
+
(r'[\s]+', Text),
|
| 49 |
+
],
|
| 50 |
+
'core': [
|
| 51 |
+
# Statements
|
| 52 |
+
(words((
|
| 53 |
+
'ABSTRACT', 'ACCEPT', 'ALL', 'ALLSTOP', 'ALLOCATABLE', 'ALLOCATE',
|
| 54 |
+
'ARRAY', 'ASSIGN', 'ASSOCIATE', 'ASYNCHRONOUS', 'BACKSPACE', 'BIND',
|
| 55 |
+
'BLOCK', 'BLOCKDATA', 'BYTE', 'CALL', 'CASE', 'CLASS', 'CLOSE',
|
| 56 |
+
'CODIMENSION', 'COMMON', 'CONCURRRENT', 'CONTIGUOUS', 'CONTAINS',
|
| 57 |
+
'CONTINUE', 'CRITICAL', 'CYCLE', 'DATA', 'DEALLOCATE', 'DECODE',
|
| 58 |
+
'DEFERRED', 'DIMENSION', 'DO', 'ELEMENTAL', 'ELSE', 'ENCODE', 'END',
|
| 59 |
+
'ENTRY', 'ENUM', 'ENUMERATOR', 'EQUIVALENCE', 'EXIT', 'EXTENDS',
|
| 60 |
+
'EXTERNAL', 'EXTRINSIC', 'FILE', 'FINAL', 'FORALL', 'FORMAT',
|
| 61 |
+
'FUNCTION', 'GENERIC', 'GOTO', 'IF', 'IMAGES', 'IMPLICIT',
|
| 62 |
+
'IMPORT', 'IMPURE', 'INCLUDE', 'INQUIRE', 'INTENT', 'INTERFACE',
|
| 63 |
+
'INTRINSIC', 'IS', 'LOCK', 'MEMORY', 'MODULE', 'NAMELIST', 'NULLIFY',
|
| 64 |
+
'NONE', 'NON_INTRINSIC', 'NON_OVERRIDABLE', 'NOPASS', 'OPEN', 'OPTIONAL',
|
| 65 |
+
'OPTIONS', 'PARAMETER', 'PASS', 'PAUSE', 'POINTER', 'PRINT', 'PRIVATE',
|
| 66 |
+
'PROGRAM', 'PROCEDURE', 'PROTECTED', 'PUBLIC', 'PURE', 'READ',
|
| 67 |
+
'RECURSIVE', 'RESULT', 'RETURN', 'REWIND', 'SAVE', 'SELECT', 'SEQUENCE',
|
| 68 |
+
'STOP', 'SUBMODULE', 'SUBROUTINE', 'SYNC', 'SYNCALL', 'SYNCIMAGES',
|
| 69 |
+
'SYNCMEMORY', 'TARGET', 'THEN', 'TYPE', 'UNLOCK', 'USE', 'VALUE',
|
| 70 |
+
'VOLATILE', 'WHERE', 'WRITE', 'WHILE'), prefix=r'\b', suffix=r'\s*\b'),
|
| 71 |
+
Keyword),
|
| 72 |
+
|
| 73 |
+
# Data Types
|
| 74 |
+
(words((
|
| 75 |
+
'CHARACTER', 'COMPLEX', 'DOUBLE PRECISION', 'DOUBLE COMPLEX', 'INTEGER',
|
| 76 |
+
'LOGICAL', 'REAL', 'C_INT', 'C_SHORT', 'C_LONG', 'C_LONG_LONG',
|
| 77 |
+
'C_SIGNED_CHAR', 'C_SIZE_T', 'C_INT8_T', 'C_INT16_T', 'C_INT32_T',
|
| 78 |
+
'C_INT64_T', 'C_INT_LEAST8_T', 'C_INT_LEAST16_T', 'C_INT_LEAST32_T',
|
| 79 |
+
'C_INT_LEAST64_T', 'C_INT_FAST8_T', 'C_INT_FAST16_T', 'C_INT_FAST32_T',
|
| 80 |
+
'C_INT_FAST64_T', 'C_INTMAX_T', 'C_INTPTR_T', 'C_FLOAT', 'C_DOUBLE',
|
| 81 |
+
'C_LONG_DOUBLE', 'C_FLOAT_COMPLEX', 'C_DOUBLE_COMPLEX',
|
| 82 |
+
'C_LONG_DOUBLE_COMPLEX', 'C_BOOL', 'C_CHAR', 'C_PTR', 'C_FUNPTR'),
|
| 83 |
+
prefix=r'\b', suffix=r'\s*\b'),
|
| 84 |
+
Keyword.Type),
|
| 85 |
+
|
| 86 |
+
# Operators
|
| 87 |
+
(r'(\*\*|\*|\+|-|\/|<|>|<=|>=|==|\/=|=)', Operator),
|
| 88 |
+
|
| 89 |
+
(r'(::)', Keyword.Declaration),
|
| 90 |
+
|
| 91 |
+
(r'[()\[\],:&%;.]', Punctuation),
|
| 92 |
+
# Intrinsics
|
| 93 |
+
(words((
|
| 94 |
+
'Abort', 'Abs', 'Access', 'AChar', 'ACos', 'ACosH', 'AdjustL',
|
| 95 |
+
'AdjustR', 'AImag', 'AInt', 'Alarm', 'All', 'Allocated', 'ALog',
|
| 96 |
+
'AMax', 'AMin', 'AMod', 'And', 'ANInt', 'Any', 'ASin', 'ASinH',
|
| 97 |
+
'Associated', 'ATan', 'ATanH', 'Atomic_Define', 'Atomic_Ref',
|
| 98 |
+
'BesJ', 'BesJN', 'Bessel_J0', 'Bessel_J1', 'Bessel_JN', 'Bessel_Y0',
|
| 99 |
+
'Bessel_Y1', 'Bessel_YN', 'BesY', 'BesYN', 'BGE', 'BGT', 'BLE',
|
| 100 |
+
'BLT', 'Bit_Size', 'BTest', 'CAbs', 'CCos', 'Ceiling', 'CExp',
|
| 101 |
+
'Char', 'ChDir', 'ChMod', 'CLog', 'Cmplx', 'Command_Argument_Count',
|
| 102 |
+
'Complex', 'Conjg', 'Cos', 'CosH', 'Count', 'CPU_Time', 'CShift',
|
| 103 |
+
'CSin', 'CSqRt', 'CTime', 'C_Loc', 'C_Associated',
|
| 104 |
+
'C_Null_Ptr', 'C_Null_Funptr', 'C_F_Pointer', 'C_F_ProcPointer',
|
| 105 |
+
'C_Null_Char', 'C_Alert', 'C_Backspace', 'C_Form_Feed', 'C_FunLoc',
|
| 106 |
+
'C_Sizeof', 'C_New_Line', 'C_Carriage_Return',
|
| 107 |
+
'C_Horizontal_Tab', 'C_Vertical_Tab', 'DAbs', 'DACos', 'DASin',
|
| 108 |
+
'DATan', 'Date_and_Time', 'DbesJ', 'DbesJN', 'DbesY',
|
| 109 |
+
'DbesYN', 'Dble', 'DCos', 'DCosH', 'DDiM', 'DErF',
|
| 110 |
+
'DErFC', 'DExp', 'Digits', 'DiM', 'DInt', 'DLog', 'DMax',
|
| 111 |
+
'DMin', 'DMod', 'DNInt', 'Dot_Product', 'DProd', 'DSign', 'DSinH',
|
| 112 |
+
'DShiftL', 'DShiftR', 'DSin', 'DSqRt', 'DTanH', 'DTan', 'DTime',
|
| 113 |
+
'EOShift', 'Epsilon', 'ErF', 'ErFC', 'ErFC_Scaled', 'ETime',
|
| 114 |
+
'Execute_Command_Line', 'Exit', 'Exp', 'Exponent', 'Extends_Type_Of',
|
| 115 |
+
'FDate', 'FGet', 'FGetC', 'FindLoc', 'Float', 'Floor', 'Flush',
|
| 116 |
+
'FNum', 'FPutC', 'FPut', 'Fraction', 'FSeek', 'FStat', 'FTell',
|
| 117 |
+
'Gamma', 'GError', 'GetArg', 'Get_Command', 'Get_Command_Argument',
|
| 118 |
+
'Get_Environment_Variable', 'GetCWD', 'GetEnv', 'GetGId', 'GetLog',
|
| 119 |
+
'GetPId', 'GetUId', 'GMTime', 'HostNm', 'Huge', 'Hypot', 'IAbs',
|
| 120 |
+
'IAChar', 'IAll', 'IAnd', 'IAny', 'IArgC', 'IBClr', 'IBits',
|
| 121 |
+
'IBSet', 'IChar', 'IDate', 'IDiM', 'IDInt', 'IDNInt', 'IEOr',
|
| 122 |
+
'IErrNo', 'IFix', 'Imag', 'ImagPart', 'Image_Index', 'Index',
|
| 123 |
+
'Int', 'IOr', 'IParity', 'IRand', 'IsaTty', 'IShft', 'IShftC',
|
| 124 |
+
'ISign', 'Iso_C_Binding', 'Is_Contiguous', 'Is_Iostat_End',
|
| 125 |
+
'Is_Iostat_Eor', 'ITime', 'Kill', 'Kind', 'LBound', 'LCoBound',
|
| 126 |
+
'Len', 'Len_Trim', 'LGe', 'LGt', 'Link', 'LLe', 'LLt', 'LnBlnk',
|
| 127 |
+
'Loc', 'Log', 'Log_Gamma', 'Logical', 'Long', 'LShift', 'LStat',
|
| 128 |
+
'LTime', 'MaskL', 'MaskR', 'MatMul', 'Max', 'MaxExponent',
|
| 129 |
+
'MaxLoc', 'MaxVal', 'MClock', 'Merge', 'Merge_Bits', 'Move_Alloc',
|
| 130 |
+
'Min', 'MinExponent', 'MinLoc', 'MinVal', 'Mod', 'Modulo', 'MvBits',
|
| 131 |
+
'Nearest', 'New_Line', 'NInt', 'Norm2', 'Not', 'Null', 'Num_Images',
|
| 132 |
+
'Or', 'Pack', 'Parity', 'PError', 'Precision', 'Present', 'Product',
|
| 133 |
+
'Radix', 'Rand', 'Random_Number', 'Random_Seed', 'Range', 'Real',
|
| 134 |
+
'RealPart', 'Rename', 'Repeat', 'Reshape', 'RRSpacing', 'RShift',
|
| 135 |
+
'Same_Type_As', 'Scale', 'Scan', 'Second', 'Selected_Char_Kind',
|
| 136 |
+
'Selected_Int_Kind', 'Selected_Real_Kind', 'Set_Exponent', 'Shape',
|
| 137 |
+
'ShiftA', 'ShiftL', 'ShiftR', 'Short', 'Sign', 'Signal', 'SinH',
|
| 138 |
+
'Sin', 'Sleep', 'Sngl', 'Spacing', 'Spread', 'SqRt', 'SRand',
|
| 139 |
+
'Stat', 'Storage_Size', 'Sum', 'SymLnk', 'System', 'System_Clock',
|
| 140 |
+
'Tan', 'TanH', 'Time', 'This_Image', 'Tiny', 'TrailZ', 'Transfer',
|
| 141 |
+
'Transpose', 'Trim', 'TtyNam', 'UBound', 'UCoBound', 'UMask',
|
| 142 |
+
'Unlink', 'Unpack', 'Verify', 'XOr', 'ZAbs', 'ZCos', 'ZExp',
|
| 143 |
+
'ZLog', 'ZSin', 'ZSqRt'), prefix=r'\b', suffix=r'\s*\b'),
|
| 144 |
+
Name.Builtin),
|
| 145 |
+
|
| 146 |
+
# Booleans
|
| 147 |
+
(r'\.(true|false)\.', Name.Builtin),
|
| 148 |
+
# Comparing Operators
|
| 149 |
+
(r'\.(eq|ne|lt|le|gt|ge|not|and|or|eqv|neqv)\.', Operator.Word),
|
| 150 |
+
],
|
| 151 |
+
|
| 152 |
+
'strings': [
|
| 153 |
+
(r'(?s)"(\\\\|\\[0-7]+|\\.|[^"\\])*"', String.Double),
|
| 154 |
+
(r"(?s)'(\\\\|\\[0-7]+|\\.|[^'\\])*'", String.Single),
|
| 155 |
+
],
|
| 156 |
+
|
| 157 |
+
'nums': [
|
| 158 |
+
(r'\d+(?![.e])(_[a-z]\w+)?', Number.Integer),
|
| 159 |
+
(r'[+-]?\d*\.\d+([ed][-+]?\d+)?(_[a-z]\w+)?', Number.Float),
|
| 160 |
+
(r'[+-]?\d+\.\d*([ed][-+]?\d+)?(_[a-z]\w+)?', Number.Float),
|
| 161 |
+
],
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
|
| 165 |
+
class FortranFixedLexer(RegexLexer):
|
| 166 |
+
"""
|
| 167 |
+
Lexer for fixed format Fortran.
|
| 168 |
+
|
| 169 |
+
.. versionadded:: 2.1
|
| 170 |
+
"""
|
| 171 |
+
name = 'FortranFixed'
|
| 172 |
+
aliases = ['fortranfixed']
|
| 173 |
+
filenames = ['*.f', '*.F']
|
| 174 |
+
|
| 175 |
+
flags = re.IGNORECASE
|
| 176 |
+
|
| 177 |
+
def _lex_fortran(self, match, ctx=None):
|
| 178 |
+
"""Lex a line just as free form fortran without line break."""
|
| 179 |
+
lexer = FortranLexer()
|
| 180 |
+
text = match.group(0) + "\n"
|
| 181 |
+
for index, token, value in lexer.get_tokens_unprocessed(text):
|
| 182 |
+
value = value.replace('\n', '')
|
| 183 |
+
if value != '':
|
| 184 |
+
yield index, token, value
|
| 185 |
+
|
| 186 |
+
tokens = {
|
| 187 |
+
'root': [
|
| 188 |
+
(r'[C*].*\n', Comment),
|
| 189 |
+
(r'#.*\n', Comment.Preproc),
|
| 190 |
+
(r' {0,4}!.*\n', Comment),
|
| 191 |
+
(r'(.{5})', Name.Label, 'cont-char'),
|
| 192 |
+
(r'.*\n', using(FortranLexer)),
|
| 193 |
+
],
|
| 194 |
+
'cont-char': [
|
| 195 |
+
(' ', Text, 'code'),
|
| 196 |
+
('0', Comment, 'code'),
|
| 197 |
+
('.', Generic.Strong, 'code'),
|
| 198 |
+
],
|
| 199 |
+
'code': [
|
| 200 |
+
(r'(.{66})(.*)(\n)',
|
| 201 |
+
bygroups(_lex_fortran, Comment, Text), 'root'),
|
| 202 |
+
(r'(.*)(\n)', bygroups(_lex_fortran, Text), 'root'),
|
| 203 |
+
default('root'),
|
| 204 |
+
]
|
| 205 |
+
}
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/foxpro.py
ADDED
|
@@ -0,0 +1,428 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.foxpro
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Simple lexer for Microsoft Visual FoxPro source code.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 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
|
| 15 |
+
from pygments.token import Punctuation, Text, Comment, Operator, Keyword, \
|
| 16 |
+
Name, String
|
| 17 |
+
|
| 18 |
+
__all__ = ['FoxProLexer']
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
class FoxProLexer(RegexLexer):
|
| 22 |
+
"""Lexer for Microsoft Visual FoxPro language.
|
| 23 |
+
|
| 24 |
+
FoxPro syntax allows to shorten all keywords and function names
|
| 25 |
+
to 4 characters. Shortened forms are not recognized by this lexer.
|
| 26 |
+
|
| 27 |
+
.. versionadded:: 1.6
|
| 28 |
+
"""
|
| 29 |
+
|
| 30 |
+
name = 'FoxPro'
|
| 31 |
+
aliases = ['foxpro', 'vfp', 'clipper', 'xbase']
|
| 32 |
+
filenames = ['*.PRG', '*.prg']
|
| 33 |
+
mimetype = []
|
| 34 |
+
|
| 35 |
+
flags = re.IGNORECASE | re.MULTILINE
|
| 36 |
+
|
| 37 |
+
tokens = {
|
| 38 |
+
'root': [
|
| 39 |
+
(r';\s*\n', Punctuation), # consume newline
|
| 40 |
+
(r'(^|\n)\s*', Text, 'newline'),
|
| 41 |
+
|
| 42 |
+
# Square brackets may be used for array indices
|
| 43 |
+
# and for string literal. Look for arrays
|
| 44 |
+
# before matching string literals.
|
| 45 |
+
(r'(?<=\w)\[[0-9, ]+\]', Text),
|
| 46 |
+
(r'\'[^\'\n]*\'|"[^"\n]*"|\[[^]*]\]', String),
|
| 47 |
+
(r'(^\s*\*|&&|&&).*?\n', Comment.Single),
|
| 48 |
+
|
| 49 |
+
(r'(ABS|ACLASS|ACOPY|ACOS|ADATABASES|ADBOBJECTS|ADDBS|'
|
| 50 |
+
r'ADDPROPERTY|ADEL|ADIR|ADLLS|ADOCKSTATE|AELEMENT|AERROR|'
|
| 51 |
+
r'AEVENTS|AFIELDS|AFONT|AGETCLASS|AGETFILEVERSION|AINS|'
|
| 52 |
+
r'AINSTANCE|ALANGUAGE|ALEN|ALIAS|ALINES|ALLTRIM|'
|
| 53 |
+
r'AMEMBERS|AMOUSEOBJ|ANETRESOURCES|APRINTERS|APROCINFO|'
|
| 54 |
+
r'ASC|ASCAN|ASELOBJ|ASESSIONS|ASIN|ASORT|ASQLHANDLES|'
|
| 55 |
+
r'ASTACKINFO|ASUBSCRIPT|AT|AT_C|ATAGINFO|ATAN|ATC|ATCC|'
|
| 56 |
+
r'ATCLINE|ATLINE|ATN2|AUSED|AVCXCLASSES|BAR|BARCOUNT|'
|
| 57 |
+
r'BARPROMPT|BETWEEN|BINDEVENT|BINTOC|BITAND|BITCLEAR|'
|
| 58 |
+
r'BITLSHIFT|BITNOT|BITOR|BITRSHIFT|BITSET|BITTEST|BITXOR|'
|
| 59 |
+
r'BOF|CANDIDATE|CAPSLOCK|CAST|CDOW|CDX|CEILING|CHR|CHRSAW|'
|
| 60 |
+
r'CHRTRAN|CHRTRANC|CLEARRESULTSET|CMONTH|CNTBAR|CNTPAD|COL|'
|
| 61 |
+
r'COM|Functions|COMARRAY|COMCLASSINFO|COMPOBJ|COMPROP|'
|
| 62 |
+
r'COMRETURNERROR|COS|CPCONVERT|CPCURRENT|CPDBF|CREATEBINARY|'
|
| 63 |
+
r'CREATEOBJECT|CREATEOBJECTEX|CREATEOFFLINE|CTOBIN|CTOD|'
|
| 64 |
+
r'CTOT|CURDIR|CURSORGETPROP|CURSORSETPROP|CURSORTOXML|'
|
| 65 |
+
r'CURVAL|DATE|DATETIME|DAY|DBC|DBF|DBGETPROP|DBSETPROP|'
|
| 66 |
+
r'DBUSED|DDEAbortTrans|DDEAdvise|DDEEnabled|DDEExecute|'
|
| 67 |
+
r'DDEInitiate|DDELastError|DDEPoke|DDERequest|DDESetOption|'
|
| 68 |
+
r'DDESetService|DDESetTopic|DDETerminate|DEFAULTEXT|'
|
| 69 |
+
r'DELETED|DESCENDING|DIFFERENCE|DIRECTORY|DISKSPACE|'
|
| 70 |
+
r'DisplayPath|DMY|DODEFAULT|DOW|DRIVETYPE|DROPOFFLINE|'
|
| 71 |
+
r'DTOC|DTOR|DTOS|DTOT|EDITSOURCE|EMPTY|EOF|ERROR|EVAL(UATE)?|'
|
| 72 |
+
r'EVENTHANDLER|EVL|EXECSCRIPT|EXP|FCHSIZE|FCLOSE|FCOUNT|'
|
| 73 |
+
r'FCREATE|FDATE|FEOF|FERROR|FFLUSH|FGETS|FIELD|FILE|'
|
| 74 |
+
r'FILETOSTR|FILTER|FKLABEL|FKMAX|FLDLIST|FLOCK|FLOOR|'
|
| 75 |
+
r'FONTMETRIC|FOPEN|FOR|FORCEEXT|FORCEPATH|FOUND|FPUTS|'
|
| 76 |
+
r'FREAD|FSEEK|FSIZE|FTIME|FULLPATH|FV|FWRITE|'
|
| 77 |
+
r'GETAUTOINCVALUE|GETBAR|GETCOLOR|GETCP|GETDIR|GETENV|'
|
| 78 |
+
r'GETFILE|GETFLDSTATE|GETFONT|GETINTERFACE|'
|
| 79 |
+
r'GETNEXTMODIFIED|GETOBJECT|GETPAD|GETPEM|GETPICT|'
|
| 80 |
+
r'GETPRINTER|GETRESULTSET|GETWORDCOUNT|GETWORDNUM|'
|
| 81 |
+
r'GETCURSORADAPTER|GOMONTH|HEADER|HOME|HOUR|ICASE|'
|
| 82 |
+
r'IDXCOLLATE|IIF|IMESTATUS|INDBC|INDEXSEEK|INKEY|INLIST|'
|
| 83 |
+
r'INPUTBOX|INSMODE|INT|ISALPHA|ISBLANK|ISCOLOR|ISDIGIT|'
|
| 84 |
+
r'ISEXCLUSIVE|ISFLOCKED|ISLEADBYTE|ISLOWER|ISMEMOFETCHED|'
|
| 85 |
+
r'ISMOUSE|ISNULL|ISPEN|ISREADONLY|ISRLOCKED|'
|
| 86 |
+
r'ISTRANSACTABLE|ISUPPER|JUSTDRIVE|JUSTEXT|JUSTFNAME|'
|
| 87 |
+
r'JUSTPATH|JUSTSTEM|KEY|KEYMATCH|LASTKEY|LEFT|LEFTC|LEN|'
|
| 88 |
+
r'LENC|LIKE|LIKEC|LINENO|LOADPICTURE|LOCFILE|LOCK|LOG|'
|
| 89 |
+
r'LOG10|LOOKUP|LOWER|LTRIM|LUPDATE|MAKETRANSACTABLE|MAX|'
|
| 90 |
+
r'MCOL|MDOWN|MDX|MDY|MEMLINES|MEMORY|MENU|MESSAGE|'
|
| 91 |
+
r'MESSAGEBOX|MIN|MINUTE|MLINE|MOD|MONTH|MRKBAR|MRKPAD|'
|
| 92 |
+
r'MROW|MTON|MWINDOW|NDX|NEWOBJECT|NORMALIZE|NTOM|NUMLOCK|'
|
| 93 |
+
r'NVL|OBJNUM|OBJTOCLIENT|OBJVAR|OCCURS|OEMTOANSI|OLDVAL|'
|
| 94 |
+
r'ON|ORDER|OS|PAD|PADL|PARAMETERS|PAYMENT|PCOL|PCOUNT|'
|
| 95 |
+
r'PEMSTATUS|PI|POPUP|PRIMARY|PRINTSTATUS|PRMBAR|PRMPAD|'
|
| 96 |
+
r'PROGRAM|PROMPT|PROPER|PROW|PRTINFO|PUTFILE|PV|QUARTER|'
|
| 97 |
+
r'RAISEEVENT|RAND|RAT|RATC|RATLINE|RDLEVEL|READKEY|RECCOUNT|'
|
| 98 |
+
r'RECNO|RECSIZE|REFRESH|RELATION|REPLICATE|REQUERY|RGB|'
|
| 99 |
+
r'RGBSCHEME|RIGHT|RIGHTC|RLOCK|ROUND|ROW|RTOD|RTRIM|'
|
| 100 |
+
r'SAVEPICTURE|SCHEME|SCOLS|SEC|SECONDS|SEEK|SELECT|SET|'
|
| 101 |
+
r'SETFLDSTATE|SETRESULTSET|SIGN|SIN|SKPBAR|SKPPAD|SOUNDEX|'
|
| 102 |
+
r'SPACE|SQLCANCEL|SQLCOLUMNS|SQLCOMMIT|SQLCONNECT|'
|
| 103 |
+
r'SQLDISCONNECT|SQLEXEC|SQLGETPROP|SQLIDLEDISCONNECT|'
|
| 104 |
+
r'SQLMORERESULTS|SQLPREPARE|SQLROLLBACK|SQLSETPROP|'
|
| 105 |
+
r'SQLSTRINGCONNECT|SQLTABLES|SQRT|SROWS|STR|STRCONV|'
|
| 106 |
+
r'STREXTRACT|STRTOFILE|STRTRAN|STUFF|STUFFC|SUBSTR|'
|
| 107 |
+
r'SUBSTRC|SYS|SYSMETRIC|TABLEREVERT|TABLEUPDATE|TAG|'
|
| 108 |
+
r'TAGCOUNT|TAGNO|TAN|TARGET|TEXTMERGE|TIME|TRANSFORM|'
|
| 109 |
+
r'TRIM|TTOC|TTOD|TXNLEVEL|TXTWIDTH|TYPE|UNBINDEVENTS|'
|
| 110 |
+
r'UNIQUE|UPDATED|UPPER|USED|VAL|VARREAD|VARTYPE|VERSION|'
|
| 111 |
+
r'WBORDER|WCHILD|WCOLS|WDOCKABLE|WEEK|WEXIST|WFONT|WLAST|'
|
| 112 |
+
r'WLCOL|WLROW|WMAXIMUM|WMINIMUM|WONTOP|WOUTPUT|WPARENT|'
|
| 113 |
+
r'WREAD|WROWS|WTITLE|WVISIBLE|XMLTOCURSOR|XMLUPDATEGRAM|'
|
| 114 |
+
r'YEAR)(?=\s*\()', Name.Function),
|
| 115 |
+
|
| 116 |
+
(r'_ALIGNMENT|_ASCIICOLS|_ASCIIROWS|_ASSIST|_BEAUTIFY|_BOX|'
|
| 117 |
+
r'_BROWSER|_BUILDER|_CALCMEM|_CALCVALUE|_CLIPTEXT|_CONVERTER|'
|
| 118 |
+
r'_COVERAGE|_CUROBJ|_DBLCLICK|_DIARYDATE|_DOS|_FOXDOC|_FOXREF|'
|
| 119 |
+
r'_GALLERY|_GENGRAPH|_GENHTML|_GENMENU|_GENPD|_GENSCRN|'
|
| 120 |
+
r'_GENXTAB|_GETEXPR|_INCLUDE|_INCSEEK|_INDENT|_LMARGIN|_MAC|'
|
| 121 |
+
r'_MENUDESIGNER|_MLINE|_PADVANCE|_PAGENO|_PAGETOTAL|_PBPAGE|'
|
| 122 |
+
r'_PCOLNO|_PCOPIES|_PDRIVER|_PDSETUP|_PECODE|_PEJECT|_PEPAGE|'
|
| 123 |
+
r'_PLENGTH|_PLINENO|_PLOFFSET|_PPITCH|_PQUALITY|_PRETEXT|'
|
| 124 |
+
r'_PSCODE|_PSPACING|_PWAIT|_RMARGIN|_REPORTBUILDER|'
|
| 125 |
+
r'_REPORTOUTPUT|_REPORTPREVIEW|_SAMPLES|_SCCTEXT|_SCREEN|'
|
| 126 |
+
r'_SHELL|_SPELLCHK|_STARTUP|_TABS|_TALLY|_TASKPANE|_TEXT|'
|
| 127 |
+
r'_THROTTLE|_TOOLBOX|_TOOLTIPTIMEOUT|_TRANSPORT|_TRIGGERLEVEL|'
|
| 128 |
+
r'_UNIX|_VFP|_WINDOWS|_WIZARD|_WRAP', Keyword.Pseudo),
|
| 129 |
+
|
| 130 |
+
(r'THISFORMSET|THISFORM|THIS', Name.Builtin),
|
| 131 |
+
|
| 132 |
+
(r'Application|CheckBox|Collection|Column|ComboBox|'
|
| 133 |
+
r'CommandButton|CommandGroup|Container|Control|CursorAdapter|'
|
| 134 |
+
r'Cursor|Custom|DataEnvironment|DataObject|EditBox|'
|
| 135 |
+
r'Empty|Exception|Fields|Files|File|FormSet|Form|FoxCode|'
|
| 136 |
+
r'Grid|Header|Hyperlink|Image|Label|Line|ListBox|Objects|'
|
| 137 |
+
r'OptionButton|OptionGroup|PageFrame|Page|ProjectHook|Projects|'
|
| 138 |
+
r'Project|Relation|ReportListener|Separator|Servers|Server|'
|
| 139 |
+
r'Session|Shape|Spinner|Tables|TextBox|Timer|ToolBar|'
|
| 140 |
+
r'XMLAdapter|XMLField|XMLTable', Name.Class),
|
| 141 |
+
|
| 142 |
+
(r'm\.[a-z_]\w*', Name.Variable),
|
| 143 |
+
(r'\.(F|T|AND|OR|NOT|NULL)\.|\b(AND|OR|NOT|NULL)\b', Operator.Word),
|
| 144 |
+
|
| 145 |
+
(r'\.(ActiveColumn|ActiveControl|ActiveForm|ActivePage|'
|
| 146 |
+
r'ActiveProject|ActiveRow|AddLineFeeds|ADOCodePage|Alias|'
|
| 147 |
+
r'Alignment|Align|AllowAddNew|AllowAutoColumnFit|'
|
| 148 |
+
r'AllowCellSelection|AllowDelete|AllowHeaderSizing|'
|
| 149 |
+
r'AllowInsert|AllowModalMessages|AllowOutput|AllowRowSizing|'
|
| 150 |
+
r'AllowSimultaneousFetch|AllowTabs|AllowUpdate|'
|
| 151 |
+
r'AlwaysOnBottom|AlwaysOnTop|Anchor|Application|'
|
| 152 |
+
r'AutoActivate|AutoCenter|AutoCloseTables|AutoComplete|'
|
| 153 |
+
r'AutoCompSource|AutoCompTable|AutoHideScrollBar|'
|
| 154 |
+
r'AutoIncrement|AutoOpenTables|AutoRelease|AutoSize|'
|
| 155 |
+
r'AutoVerbMenu|AutoYield|BackColor|ForeColor|BackStyle|'
|
| 156 |
+
r'BaseClass|BatchUpdateCount|BindControls|BorderColor|'
|
| 157 |
+
r'BorderStyle|BorderWidth|BoundColumn|BoundTo|Bound|'
|
| 158 |
+
r'BreakOnError|BufferModeOverride|BufferMode|'
|
| 159 |
+
r'BuildDateTime|ButtonCount|Buttons|Cancel|Caption|'
|
| 160 |
+
r'Centered|Century|ChildAlias|ChildOrder|ChildTable|'
|
| 161 |
+
r'ClassLibrary|Class|ClipControls|Closable|CLSID|CodePage|'
|
| 162 |
+
r'ColorScheme|ColorSource|ColumnCount|ColumnLines|'
|
| 163 |
+
r'ColumnOrder|Columns|ColumnWidths|CommandClauses|'
|
| 164 |
+
r'Comment|CompareMemo|ConflictCheckCmd|ConflictCheckType|'
|
| 165 |
+
r'ContinuousScroll|ControlBox|ControlCount|Controls|'
|
| 166 |
+
r'ControlSource|ConversionFunc|Count|CurrentControl|'
|
| 167 |
+
r'CurrentDataSession|CurrentPass|CurrentX|CurrentY|'
|
| 168 |
+
r'CursorSchema|CursorSource|CursorStatus|Curvature|'
|
| 169 |
+
r'Database|DataSessionID|DataSession|DataSourceType|'
|
| 170 |
+
r'DataSource|DataType|DateFormat|DateMark|Debug|'
|
| 171 |
+
r'DeclareXMLPrefix|DEClassLibrary|DEClass|DefaultFilePath|'
|
| 172 |
+
r'Default|DefOLELCID|DeleteCmdDataSourceType|DeleteCmdDataSource|'
|
| 173 |
+
r'DeleteCmd|DeleteMark|Description|Desktop|'
|
| 174 |
+
r'Details|DisabledBackColor|DisabledForeColor|'
|
| 175 |
+
r'DisabledItemBackColor|DisabledItemForeColor|'
|
| 176 |
+
r'DisabledPicture|DisableEncode|DisplayCount|'
|
| 177 |
+
r'DisplayValue|Dockable|Docked|DockPosition|'
|
| 178 |
+
r'DocumentFile|DownPicture|DragIcon|DragMode|DrawMode|'
|
| 179 |
+
r'DrawStyle|DrawWidth|DynamicAlignment|DynamicBackColor|'
|
| 180 |
+
r'DynamicForeColor|DynamicCurrentControl|DynamicFontBold|'
|
| 181 |
+
r'DynamicFontItalic|DynamicFontStrikethru|'
|
| 182 |
+
r'DynamicFontUnderline|DynamicFontName|DynamicFontOutline|'
|
| 183 |
+
r'DynamicFontShadow|DynamicFontSize|DynamicInputMask|'
|
| 184 |
+
r'DynamicLineHeight|EditorOptions|Enabled|'
|
| 185 |
+
r'EnableHyperlinks|Encrypted|ErrorNo|Exclude|Exclusive|'
|
| 186 |
+
r'FetchAsNeeded|FetchMemoCmdList|FetchMemoDataSourceType|'
|
| 187 |
+
r'FetchMemoDataSource|FetchMemo|FetchSize|'
|
| 188 |
+
r'FileClassLibrary|FileClass|FillColor|FillStyle|Filter|'
|
| 189 |
+
r'FirstElement|FirstNestedTable|Flags|FontBold|FontItalic|'
|
| 190 |
+
r'FontStrikethru|FontUnderline|FontCharSet|FontCondense|'
|
| 191 |
+
r'FontExtend|FontName|FontOutline|FontShadow|FontSize|'
|
| 192 |
+
r'ForceCloseTag|Format|FormCount|FormattedOutput|Forms|'
|
| 193 |
+
r'FractionDigits|FRXDataSession|FullName|GDIPlusGraphics|'
|
| 194 |
+
r'GridLineColor|GridLines|GridLineWidth|HalfHeightCaption|'
|
| 195 |
+
r'HeaderClassLibrary|HeaderClass|HeaderHeight|Height|'
|
| 196 |
+
r'HelpContextID|HideSelection|HighlightBackColor|'
|
| 197 |
+
r'HighlightForeColor|HighlightStyle|HighlightRowLineWidth|'
|
| 198 |
+
r'HighlightRow|Highlight|HomeDir|Hours|HostName|'
|
| 199 |
+
r'HScrollSmallChange|hWnd|Icon|IncrementalSearch|Increment|'
|
| 200 |
+
r'InitialSelectedAlias|InputMask|InsertCmdDataSourceType|'
|
| 201 |
+
r'InsertCmdDataSource|InsertCmdRefreshCmd|'
|
| 202 |
+
r'InsertCmdRefreshFieldList|InsertCmdRefreshKeyFieldList|'
|
| 203 |
+
r'InsertCmd|Instancing|IntegralHeight|'
|
| 204 |
+
r'Interval|IMEMode|IsAttribute|IsBase64|IsBinary|IsNull|'
|
| 205 |
+
r'IsDiffGram|IsLoaded|ItemBackColor,|ItemData|ItemIDData|'
|
| 206 |
+
r'ItemTips|IXMLDOMElement|KeyboardHighValue|KeyboardLowValue|'
|
| 207 |
+
r'Keyfield|KeyFieldList|KeyPreview|KeySort|LanguageOptions|'
|
| 208 |
+
r'LeftColumn|Left|LineContents|LineNo|LineSlant|LinkMaster|'
|
| 209 |
+
r'ListCount|ListenerType|ListIndex|ListItemID|ListItem|'
|
| 210 |
+
r'List|LockColumnsLeft|LockColumns|LockScreen|MacDesktop|'
|
| 211 |
+
r'MainFile|MapN19_4ToCurrency|MapBinary|MapVarchar|Margin|'
|
| 212 |
+
r'MaxButton|MaxHeight|MaxLeft|MaxLength|MaxRecords|MaxTop|'
|
| 213 |
+
r'MaxWidth|MDIForm|MemberClassLibrary|MemberClass|'
|
| 214 |
+
r'MemoWindow|Message|MinButton|MinHeight|MinWidth|'
|
| 215 |
+
r'MouseIcon|MousePointer|Movable|MoverBars|MultiSelect|'
|
| 216 |
+
r'Name|NestedInto|NewIndex|NewItemID|NextSiblingTable|'
|
| 217 |
+
r'NoCpTrans|NoDataOnLoad|NoData|NullDisplay|'
|
| 218 |
+
r'NumberOfElements|Object|OLEClass|OLEDragMode|'
|
| 219 |
+
r'OLEDragPicture|OLEDropEffects|OLEDropHasData|'
|
| 220 |
+
r'OLEDropMode|OLEDropTextInsertion|OLELCID|'
|
| 221 |
+
r'OLERequestPendingTimeout|OLEServerBusyRaiseError|'
|
| 222 |
+
r'OLEServerBusyTimeout|OLETypeAllowed|OneToMany|'
|
| 223 |
+
r'OpenViews|OpenWindow|Optimize|OrderDirection|Order|'
|
| 224 |
+
r'OutputPageCount|OutputType|PageCount|PageHeight|'
|
| 225 |
+
r'PageNo|PageOrder|Pages|PageTotal|PageWidth|'
|
| 226 |
+
r'PanelLink|Panel|ParentAlias|ParentClass|ParentTable|'
|
| 227 |
+
r'Parent|Partition|PasswordChar|PictureMargin|'
|
| 228 |
+
r'PicturePosition|PictureSpacing|PictureSelectionDisplay|'
|
| 229 |
+
r'PictureVal|Picture|Prepared|'
|
| 230 |
+
r'PolyPoints|PreserveWhiteSpace|PreviewContainer|'
|
| 231 |
+
r'PrintJobName|Procedure|PROCESSID|ProgID|ProjectHookClass|'
|
| 232 |
+
r'ProjectHookLibrary|ProjectHook|QuietMode|'
|
| 233 |
+
r'ReadCycle|ReadLock|ReadMouse|ReadObject|ReadOnly|'
|
| 234 |
+
r'ReadSave|ReadTimeout|RecordMark|RecordSourceType|'
|
| 235 |
+
r'RecordSource|RefreshAlias|'
|
| 236 |
+
r'RefreshCmdDataSourceType|RefreshCmdDataSource|RefreshCmd|'
|
| 237 |
+
r'RefreshIgnoreFieldList|RefreshTimeStamp|RelationalExpr|'
|
| 238 |
+
r'RelativeColumn|RelativeRow|ReleaseType|Resizable|'
|
| 239 |
+
r'RespectCursorCP|RespectNesting|RightToLeft|RotateFlip|'
|
| 240 |
+
r'Rotation|RowColChange|RowHeight|RowSourceType|'
|
| 241 |
+
r'RowSource|ScaleMode|SCCProvider|SCCStatus|ScrollBars|'
|
| 242 |
+
r'Seconds|SelectCmd|SelectedID|'
|
| 243 |
+
r'SelectedItemBackColor|SelectedItemForeColor|Selected|'
|
| 244 |
+
r'SelectionNamespaces|SelectOnEntry|SelLength|SelStart|'
|
| 245 |
+
r'SelText|SendGDIPlusImage|SendUpdates|ServerClassLibrary|'
|
| 246 |
+
r'ServerClass|ServerHelpFile|ServerName|'
|
| 247 |
+
r'ServerProject|ShowTips|ShowInTaskbar|ShowWindow|'
|
| 248 |
+
r'Sizable|SizeBox|SOM|Sorted|Sparse|SpecialEffect|'
|
| 249 |
+
r'SpinnerHighValue|SpinnerLowValue|SplitBar|StackLevel|'
|
| 250 |
+
r'StartMode|StatusBarText|StatusBar|Stretch|StrictDateEntry|'
|
| 251 |
+
r'Style|TabIndex|Tables|TabOrientation|Tabs|TabStop|'
|
| 252 |
+
r'TabStretch|TabStyle|Tag|TerminateRead|Text|Themes|'
|
| 253 |
+
r'ThreadID|TimestampFieldList|TitleBar|ToolTipText|'
|
| 254 |
+
r'TopIndex|TopItemID|Top|TwoPassProcess|TypeLibCLSID|'
|
| 255 |
+
r'TypeLibDesc|TypeLibName|Type|Unicode|UpdatableFieldList|'
|
| 256 |
+
r'UpdateCmdDataSourceType|UpdateCmdDataSource|'
|
| 257 |
+
r'UpdateCmdRefreshCmd|UpdateCmdRefreshFieldList|'
|
| 258 |
+
r'UpdateCmdRefreshKeyFieldList|UpdateCmd|'
|
| 259 |
+
r'UpdateGramSchemaLocation|UpdateGram|UpdateNameList|UpdateType|'
|
| 260 |
+
r'UseCodePage|UseCursorSchema|UseDeDataSource|UseMemoSize|'
|
| 261 |
+
r'UserValue|UseTransactions|UTF8Encoded|Value|VersionComments|'
|
| 262 |
+
r'VersionCompany|VersionCopyright|VersionDescription|'
|
| 263 |
+
r'VersionNumber|VersionProduct|VersionTrademarks|Version|'
|
| 264 |
+
r'VFPXMLProgID|ViewPortHeight|ViewPortLeft|'
|
| 265 |
+
r'ViewPortTop|ViewPortWidth|VScrollSmallChange|View|Visible|'
|
| 266 |
+
r'VisualEffect|WhatsThisButton|WhatsThisHelpID|WhatsThisHelp|'
|
| 267 |
+
r'WhereType|Width|WindowList|WindowState|WindowType|WordWrap|'
|
| 268 |
+
r'WrapCharInCDATA|WrapInCDATA|WrapMemoInCDATA|XMLAdapter|'
|
| 269 |
+
r'XMLConstraints|XMLNameIsXPath|XMLNamespace|XMLName|'
|
| 270 |
+
r'XMLPrefix|XMLSchemaLocation|XMLTable|XMLType|'
|
| 271 |
+
r'XSDfractionDigits|XSDmaxLength|XSDtotalDigits|'
|
| 272 |
+
r'XSDtype|ZoomBox)', Name.Attribute),
|
| 273 |
+
|
| 274 |
+
(r'\.(ActivateCell|AddColumn|AddItem|AddListItem|AddObject|'
|
| 275 |
+
r'AddProperty|AddTableSchema|AddToSCC|Add|'
|
| 276 |
+
r'ApplyDiffgram|Attach|AutoFit|AutoOpen|Box|Build|'
|
| 277 |
+
r'CancelReport|ChangesToCursor|CheckIn|CheckOut|Circle|'
|
| 278 |
+
r'CleanUp|ClearData|ClearStatus|Clear|CloneObject|CloseTables|'
|
| 279 |
+
r'Close|Cls|CursorAttach|CursorDetach|CursorFill|'
|
| 280 |
+
r'CursorRefresh|DataToClip|DelayedMemoFetch|DeleteColumn|'
|
| 281 |
+
r'Dock|DoMessage|DoScroll|DoStatus|DoVerb|Drag|Draw|Eval|'
|
| 282 |
+
r'GetData|GetDockState|GetFormat|GetKey|GetLatestVersion|'
|
| 283 |
+
r'GetPageHeight|GetPageWidth|Help|Hide|IncludePageInOutput|'
|
| 284 |
+
r'IndexToItemID|ItemIDToIndex|Item|LoadXML|Line|Modify|'
|
| 285 |
+
r'MoveItem|Move|Nest|OLEDrag|OnPreviewClose|OutputPage|'
|
| 286 |
+
r'Point|Print|PSet|Quit|ReadExpression|ReadMethod|'
|
| 287 |
+
r'RecordRefresh|Refresh|ReleaseXML|Release|RemoveFromSCC|'
|
| 288 |
+
r'RemoveItem|RemoveListItem|RemoveObject|Remove|'
|
| 289 |
+
r'Render|Requery|RequestData|ResetToDefault|Reset|Run|'
|
| 290 |
+
r'SaveAsClass|SaveAs|SetAll|SetData|SetFocus|SetFormat|'
|
| 291 |
+
r'SetMain|SetVar|SetViewPort|ShowWhatsThis|Show|'
|
| 292 |
+
r'SupportsListenerType|TextHeight|TextWidth|ToCursor|'
|
| 293 |
+
r'ToXML|UndoCheckOut|Unnest|UpdateStatus|WhatsThisMode|'
|
| 294 |
+
r'WriteExpression|WriteMethod|ZOrder)', Name.Function),
|
| 295 |
+
|
| 296 |
+
(r'\.(Activate|AdjustObjectSize|AfterBand|AfterBuild|'
|
| 297 |
+
r'AfterCloseTables|AfterCursorAttach|AfterCursorClose|'
|
| 298 |
+
r'AfterCursorDetach|AfterCursorFill|AfterCursorRefresh|'
|
| 299 |
+
r'AfterCursorUpdate|AfterDelete|AfterInsert|'
|
| 300 |
+
r'AfterRecordRefresh|AfterUpdate|AfterDock|AfterReport|'
|
| 301 |
+
r'AfterRowColChange|BeforeBand|BeforeCursorAttach|'
|
| 302 |
+
r'BeforeCursorClose|BeforeCursorDetach|BeforeCursorFill|'
|
| 303 |
+
r'BeforeCursorRefresh|BeforeCursorUpdate|BeforeDelete|'
|
| 304 |
+
r'BeforeInsert|BeforeDock|BeforeOpenTables|'
|
| 305 |
+
r'BeforeRecordRefresh|BeforeReport|BeforeRowColChange|'
|
| 306 |
+
r'BeforeUpdate|Click|dbc_Activate|dbc_AfterAddTable|'
|
| 307 |
+
r'dbc_AfterAppendProc|dbc_AfterCloseTable|dbc_AfterCopyProc|'
|
| 308 |
+
r'dbc_AfterCreateConnection|dbc_AfterCreateOffline|'
|
| 309 |
+
r'dbc_AfterCreateTable|dbc_AfterCreateView|dbc_AfterDBGetProp|'
|
| 310 |
+
r'dbc_AfterDBSetProp|dbc_AfterDeleteConnection|'
|
| 311 |
+
r'dbc_AfterDropOffline|dbc_AfterDropTable|'
|
| 312 |
+
r'dbc_AfterModifyConnection|dbc_AfterModifyProc|'
|
| 313 |
+
r'dbc_AfterModifyTable|dbc_AfterModifyView|dbc_AfterOpenTable|'
|
| 314 |
+
r'dbc_AfterRemoveTable|dbc_AfterRenameConnection|'
|
| 315 |
+
r'dbc_AfterRenameTable|dbc_AfterRenameView|'
|
| 316 |
+
r'dbc_AfterValidateData|dbc_BeforeAddTable|'
|
| 317 |
+
r'dbc_BeforeAppendProc|dbc_BeforeCloseTable|'
|
| 318 |
+
r'dbc_BeforeCopyProc|dbc_BeforeCreateConnection|'
|
| 319 |
+
r'dbc_BeforeCreateOffline|dbc_BeforeCreateTable|'
|
| 320 |
+
r'dbc_BeforeCreateView|dbc_BeforeDBGetProp|'
|
| 321 |
+
r'dbc_BeforeDBSetProp|dbc_BeforeDeleteConnection|'
|
| 322 |
+
r'dbc_BeforeDropOffline|dbc_BeforeDropTable|'
|
| 323 |
+
r'dbc_BeforeModifyConnection|dbc_BeforeModifyProc|'
|
| 324 |
+
r'dbc_BeforeModifyTable|dbc_BeforeModifyView|'
|
| 325 |
+
r'dbc_BeforeOpenTable|dbc_BeforeRemoveTable|'
|
| 326 |
+
r'dbc_BeforeRenameConnection|dbc_BeforeRenameTable|'
|
| 327 |
+
r'dbc_BeforeRenameView|dbc_BeforeValidateData|'
|
| 328 |
+
r'dbc_CloseData|dbc_Deactivate|dbc_ModifyData|dbc_OpenData|'
|
| 329 |
+
r'dbc_PackData|DblClick|Deactivate|Deleted|Destroy|DoCmd|'
|
| 330 |
+
r'DownClick|DragDrop|DragOver|DropDown|ErrorMessage|Error|'
|
| 331 |
+
r'EvaluateContents|GotFocus|Init|InteractiveChange|KeyPress|'
|
| 332 |
+
r'LoadReport|Load|LostFocus|Message|MiddleClick|MouseDown|'
|
| 333 |
+
r'MouseEnter|MouseLeave|MouseMove|MouseUp|MouseWheel|Moved|'
|
| 334 |
+
r'OLECompleteDrag|OLEDragOver|OLEGiveFeedback|OLESetData|'
|
| 335 |
+
r'OLEStartDrag|OnMoveItem|Paint|ProgrammaticChange|'
|
| 336 |
+
r'QueryAddFile|QueryModifyFile|QueryNewFile|QueryRemoveFile|'
|
| 337 |
+
r'QueryRunFile|QueryUnload|RangeHigh|RangeLow|ReadActivate|'
|
| 338 |
+
r'ReadDeactivate|ReadShow|ReadValid|ReadWhen|Resize|'
|
| 339 |
+
r'RightClick|SCCInit|SCCDestroy|Scrolled|Timer|UIEnable|'
|
| 340 |
+
r'UnDock|UnloadReport|Unload|UpClick|Valid|When)', Name.Function),
|
| 341 |
+
|
| 342 |
+
(r'\s+', Text),
|
| 343 |
+
# everything else is not colored
|
| 344 |
+
(r'.', Text),
|
| 345 |
+
],
|
| 346 |
+
'newline': [
|
| 347 |
+
(r'\*.*?$', Comment.Single, '#pop'),
|
| 348 |
+
(r'(ACCEPT|ACTIVATE\s*MENU|ACTIVATE\s*POPUP|ACTIVATE\s*SCREEN|'
|
| 349 |
+
r'ACTIVATE\s*WINDOW|APPEND|APPEND\s*FROM|APPEND\s*FROM\s*ARRAY|'
|
| 350 |
+
r'APPEND\s*GENERAL|APPEND\s*MEMO|ASSIST|AVERAGE|BLANK|BROWSE|'
|
| 351 |
+
r'BUILD\s*APP|BUILD\s*EXE|BUILD\s*PROJECT|CALCULATE|CALL|'
|
| 352 |
+
r'CANCEL|CHANGE|CLEAR|CLOSE|CLOSE\s*MEMO|COMPILE|CONTINUE|'
|
| 353 |
+
r'COPY\s*FILE|COPY\s*INDEXES|COPY\s*MEMO|COPY\s*STRUCTURE|'
|
| 354 |
+
r'COPY\s*STRUCTURE\s*EXTENDED|COPY\s*TAG|COPY\s*TO|'
|
| 355 |
+
r'COPY\s*TO\s*ARRAY|COUNT|CREATE|CREATE\s*COLOR\s*SET|'
|
| 356 |
+
r'CREATE\s*CURSOR|CREATE\s*FROM|CREATE\s*LABEL|CREATE\s*MENU|'
|
| 357 |
+
r'CREATE\s*PROJECT|CREATE\s*QUERY|CREATE\s*REPORT|'
|
| 358 |
+
r'CREATE\s*SCREEN|CREATE\s*TABLE|CREATE\s*VIEW|DDE|'
|
| 359 |
+
r'DEACTIVATE\s*MENU|DEACTIVATE\s*POPUP|DEACTIVATE\s*WINDOW|'
|
| 360 |
+
r'DECLARE|DEFINE\s*BAR|DEFINE\s*BOX|DEFINE\s*MENU|'
|
| 361 |
+
r'DEFINE\s*PAD|DEFINE\s*POPUP|DEFINE\s*WINDOW|DELETE|'
|
| 362 |
+
r'DELETE\s*FILE|DELETE\s*TAG|DIMENSION|DIRECTORY|DISPLAY|'
|
| 363 |
+
r'DISPLAY\s*FILES|DISPLAY\s*MEMORY|DISPLAY\s*STATUS|'
|
| 364 |
+
r'DISPLAY\s*STRUCTURE|DO|EDIT|EJECT|EJECT\s*PAGE|ERASE|'
|
| 365 |
+
r'EXIT|EXPORT|EXTERNAL|FILER|FIND|FLUSH|FUNCTION|GATHER|'
|
| 366 |
+
r'GETEXPR|GO|GOTO|HELP|HIDE\s*MENU|HIDE\s*POPUP|'
|
| 367 |
+
r'HIDE\s*WINDOW|IMPORT|INDEX|INPUT|INSERT|JOIN|KEYBOARD|'
|
| 368 |
+
r'LABEL|LIST|LOAD|LOCATE|LOOP|MENU|MENU\s*TO|MODIFY\s*COMMAND|'
|
| 369 |
+
r'MODIFY\s*FILE|MODIFY\s*GENERAL|MODIFY\s*LABEL|MODIFY\s*MEMO|'
|
| 370 |
+
r'MODIFY\s*MENU|MODIFY\s*PROJECT|MODIFY\s*QUERY|'
|
| 371 |
+
r'MODIFY\s*REPORT|MODIFY\s*SCREEN|MODIFY\s*STRUCTURE|'
|
| 372 |
+
r'MODIFY\s*WINDOW|MOVE\s*POPUP|MOVE\s*WINDOW|NOTE|'
|
| 373 |
+
r'ON\s*APLABOUT|ON\s*BAR|ON\s*ERROR|ON\s*ESCAPE|'
|
| 374 |
+
r'ON\s*EXIT\s*BAR|ON\s*EXIT\s*MENU|ON\s*EXIT\s*PAD|'
|
| 375 |
+
r'ON\s*EXIT\s*POPUP|ON\s*KEY|ON\s*KEY\s*=|ON\s*KEY\s*LABEL|'
|
| 376 |
+
r'ON\s*MACHELP|ON\s*PAD|ON\s*PAGE|ON\s*READERROR|'
|
| 377 |
+
r'ON\s*SELECTION\s*BAR|ON\s*SELECTION\s*MENU|'
|
| 378 |
+
r'ON\s*SELECTION\s*PAD|ON\s*SELECTION\s*POPUP|ON\s*SHUTDOWN|'
|
| 379 |
+
r'PACK|PARAMETERS|PLAY\s*MACRO|POP\s*KEY|POP\s*MENU|'
|
| 380 |
+
r'POP\s*POPUP|PRIVATE|PROCEDURE|PUBLIC|PUSH\s*KEY|'
|
| 381 |
+
r'PUSH\s*MENU|PUSH\s*POPUP|QUIT|READ|READ\s*MENU|RECALL|'
|
| 382 |
+
r'REINDEX|RELEASE|RELEASE\s*MODULE|RENAME|REPLACE|'
|
| 383 |
+
r'REPLACE\s*FROM\s*ARRAY|REPORT|RESTORE\s*FROM|'
|
| 384 |
+
r'RESTORE\s*MACROS|RESTORE\s*SCREEN|RESTORE\s*WINDOW|'
|
| 385 |
+
r'RESUME|RETRY|RETURN|RUN|RUN\s*\/N"|RUNSCRIPT|'
|
| 386 |
+
r'SAVE\s*MACROS|SAVE\s*SCREEN|SAVE\s*TO|SAVE\s*WINDOWS|'
|
| 387 |
+
r'SCATTER|SCROLL|SEEK|SELECT|SET|SET\s*ALTERNATE|'
|
| 388 |
+
r'SET\s*ANSI|SET\s*APLABOUT|SET\s*AUTOSAVE|SET\s*BELL|'
|
| 389 |
+
r'SET\s*BLINK|SET\s*BLOCKSIZE|SET\s*BORDER|SET\s*BRSTATUS|'
|
| 390 |
+
r'SET\s*CARRY|SET\s*CENTURY|SET\s*CLEAR|SET\s*CLOCK|'
|
| 391 |
+
r'SET\s*COLLATE|SET\s*COLOR\s*OF|SET\s*COLOR\s*OF\s*SCHEME|'
|
| 392 |
+
r'SET\s*COLOR\s*SET|SET\s*COLOR\s*TO|SET\s*COMPATIBLE|'
|
| 393 |
+
r'SET\s*CONFIRM|SET\s*CONSOLE|SET\s*CURRENCY|SET\s*CURSOR|'
|
| 394 |
+
r'SET\s*DATE|SET\s*DEBUG|SET\s*DECIMALS|SET\s*DEFAULT|'
|
| 395 |
+
r'SET\s*DELETED|SET\s*DELIMITERS|SET\s*DEVELOPMENT|'
|
| 396 |
+
r'SET\s*DEVICE|SET\s*DISPLAY|SET\s*DOHISTORY|SET\s*ECHO|'
|
| 397 |
+
r'SET\s*ESCAPE|SET\s*EXACT|SET\s*EXCLUSIVE|SET\s*FIELDS|'
|
| 398 |
+
r'SET\s*FILTER|SET\s*FIXED|SET\s*FORMAT|SET\s*FULLPATH|'
|
| 399 |
+
r'SET\s*FUNCTION|SET\s*HEADINGS|SET\s*HELP|SET\s*HELPFILTER|'
|
| 400 |
+
r'SET\s*HOURS|SET\s*INDEX|SET\s*INTENSITY|SET\s*KEY|'
|
| 401 |
+
r'SET\s*KEYCOMP|SET\s*LIBRARY|SET\s*LOCK|SET\s*LOGERRORS|'
|
| 402 |
+
r'SET\s*MACDESKTOP|SET\s*MACHELP|SET\s*MACKEY|SET\s*MARGIN|'
|
| 403 |
+
r'SET\s*MARK\s*OF|SET\s*MARK\s*TO|SET\s*MEMOWIDTH|'
|
| 404 |
+
r'SET\s*MESSAGE|SET\s*MOUSE|SET\s*MULTILOCKS|SET\s*NEAR|'
|
| 405 |
+
r'SET\s*NOCPTRANS|SET\s*NOTIFY|SET\s*ODOMETER|SET\s*OPTIMIZE|'
|
| 406 |
+
r'SET\s*ORDER|SET\s*PALETTE|SET\s*PATH|SET\s*PDSETUP|'
|
| 407 |
+
r'SET\s*POINT|SET\s*PRINTER|SET\s*PROCEDURE|SET\s*READBORDER|'
|
| 408 |
+
r'SET\s*REFRESH|SET\s*RELATION|SET\s*RELATION\s*OFF|'
|
| 409 |
+
r'SET\s*REPROCESS|SET\s*RESOURCE|SET\s*SAFETY|SET\s*SCOREBOARD|'
|
| 410 |
+
r'SET\s*SEPARATOR|SET\s*SHADOWS|SET\s*SKIP|SET\s*SKIP\s*OF|'
|
| 411 |
+
r'SET\s*SPACE|SET\s*STATUS|SET\s*STATUS\s*BAR|SET\s*STEP|'
|
| 412 |
+
r'SET\s*STICKY|SET\s*SYSMENU|SET\s*TALK|SET\s*TEXTMERGE|'
|
| 413 |
+
r'SET\s*TEXTMERGE\s*DELIMITERS|SET\s*TOPIC|SET\s*TRBETWEEN|'
|
| 414 |
+
r'SET\s*TYPEAHEAD|SET\s*UDFPARMS|SET\s*UNIQUE|SET\s*VIEW|'
|
| 415 |
+
r'SET\s*VOLUME|SET\s*WINDOW\s*OF\s*MEMO|SET\s*XCMDFILE|'
|
| 416 |
+
r'SHOW\s*GET|SHOW\s*GETS|SHOW\s*MENU|SHOW\s*OBJECT|'
|
| 417 |
+
r'SHOW\s*POPUP|SHOW\s*WINDOW|SIZE\s*POPUP|SKIP|SORT|'
|
| 418 |
+
r'STORE|SUM|SUSPEND|TOTAL|TYPE|UNLOCK|UPDATE|USE|WAIT|'
|
| 419 |
+
r'ZAP|ZOOM\s*WINDOW|DO\s*CASE|CASE|OTHERWISE|ENDCASE|'
|
| 420 |
+
r'DO\s*WHILE|ENDDO|FOR|ENDFOR|NEXT|IF|ELSE|ENDIF|PRINTJOB|'
|
| 421 |
+
r'ENDPRINTJOB|SCAN|ENDSCAN|TEXT|ENDTEXT|=)',
|
| 422 |
+
Keyword.Reserved, '#pop'),
|
| 423 |
+
(r'#\s*(IF|ELIF|ELSE|ENDIF|DEFINE|IFDEF|IFNDEF|INCLUDE)',
|
| 424 |
+
Comment.Preproc, '#pop'),
|
| 425 |
+
(r'(m\.)?[a-z_]\w*', Name.Variable, '#pop'),
|
| 426 |
+
(r'.', Text, '#pop'),
|
| 427 |
+
],
|
| 428 |
+
}
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/functional.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.functional
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Just export lexer classes previously contained in this module.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
from pygments.lexers.lisp import SchemeLexer, CommonLispLexer, RacketLexer, \
|
| 13 |
+
NewLispLexer, ShenLexer
|
| 14 |
+
from pygments.lexers.haskell import HaskellLexer, LiterateHaskellLexer, \
|
| 15 |
+
KokaLexer
|
| 16 |
+
from pygments.lexers.theorem import CoqLexer
|
| 17 |
+
from pygments.lexers.erlang import ErlangLexer, ErlangShellLexer, \
|
| 18 |
+
ElixirConsoleLexer, ElixirLexer
|
| 19 |
+
from pygments.lexers.ml import SMLLexer, OcamlLexer, OpaLexer
|
| 20 |
+
|
| 21 |
+
__all__ = []
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/grammar_notation.py
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.grammar_notation
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexers for grammer notations like BNF.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 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, bygroups, include, this, using, words
|
| 15 |
+
from pygments.token import Comment, Keyword, Literal, Name, Number, \
|
| 16 |
+
Operator, Punctuation, String, Text
|
| 17 |
+
|
| 18 |
+
__all__ = ['BnfLexer', 'AbnfLexer', 'JsgfLexer']
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
class BnfLexer(RegexLexer):
|
| 22 |
+
"""
|
| 23 |
+
This lexer is for grammer notations which are similar to
|
| 24 |
+
original BNF.
|
| 25 |
+
|
| 26 |
+
In order to maximize a number of targets of this lexer,
|
| 27 |
+
let's decide some designs:
|
| 28 |
+
|
| 29 |
+
* We don't distinguish `Terminal Symbol`.
|
| 30 |
+
|
| 31 |
+
* We do assume that `NonTerminal Symbol` are always enclosed
|
| 32 |
+
with arrow brackets.
|
| 33 |
+
|
| 34 |
+
* We do assume that `NonTerminal Symbol` may include
|
| 35 |
+
any printable characters except arrow brackets and ASCII 0x20.
|
| 36 |
+
This assumption is for `RBNF <http://www.rfc-base.org/txt/rfc-5511.txt>`_.
|
| 37 |
+
|
| 38 |
+
* We do assume that target notation doesn't support comment.
|
| 39 |
+
|
| 40 |
+
* We don't distinguish any operators and punctuation except
|
| 41 |
+
`::=`.
|
| 42 |
+
|
| 43 |
+
Though these desision making might cause too minimal highlighting
|
| 44 |
+
and you might be disappointed, but it is reasonable for us.
|
| 45 |
+
|
| 46 |
+
.. versionadded:: 2.1
|
| 47 |
+
"""
|
| 48 |
+
|
| 49 |
+
name = 'BNF'
|
| 50 |
+
aliases = ['bnf']
|
| 51 |
+
filenames = ['*.bnf']
|
| 52 |
+
mimetypes = ['text/x-bnf']
|
| 53 |
+
|
| 54 |
+
tokens = {
|
| 55 |
+
'root': [
|
| 56 |
+
(r'(<)([ -;=?-~]+)(>)',
|
| 57 |
+
bygroups(Punctuation, Name.Class, Punctuation)),
|
| 58 |
+
|
| 59 |
+
# an only operator
|
| 60 |
+
(r'::=', Operator),
|
| 61 |
+
|
| 62 |
+
# fallback
|
| 63 |
+
(r'[^<>:]+', Text), # for performance
|
| 64 |
+
(r'.', Text),
|
| 65 |
+
],
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
class AbnfLexer(RegexLexer):
|
| 70 |
+
"""
|
| 71 |
+
Lexer for `IETF 7405 ABNF
|
| 72 |
+
<http://www.ietf.org/rfc/rfc7405.txt>`_
|
| 73 |
+
(Updates `5234 <http://www.ietf.org/rfc/rfc5234.txt>`_)
|
| 74 |
+
grammars.
|
| 75 |
+
|
| 76 |
+
.. versionadded:: 2.1
|
| 77 |
+
"""
|
| 78 |
+
|
| 79 |
+
name = 'ABNF'
|
| 80 |
+
aliases = ['abnf']
|
| 81 |
+
filenames = ['*.abnf']
|
| 82 |
+
mimetypes = ['text/x-abnf']
|
| 83 |
+
|
| 84 |
+
_core_rules = (
|
| 85 |
+
'ALPHA', 'BIT', 'CHAR', 'CR', 'CRLF', 'CTL', 'DIGIT',
|
| 86 |
+
'DQUOTE', 'HEXDIG', 'HTAB', 'LF', 'LWSP', 'OCTET',
|
| 87 |
+
'SP', 'VCHAR', 'WSP')
|
| 88 |
+
|
| 89 |
+
tokens = {
|
| 90 |
+
'root': [
|
| 91 |
+
# comment
|
| 92 |
+
(r';.*$', Comment.Single),
|
| 93 |
+
|
| 94 |
+
# quoted
|
| 95 |
+
# double quote itself in this state, it is as '%x22'.
|
| 96 |
+
(r'(%[si])?"[^"]*"', Literal),
|
| 97 |
+
|
| 98 |
+
# binary (but i have never seen...)
|
| 99 |
+
(r'%b[01]+\-[01]+\b', Literal), # range
|
| 100 |
+
(r'%b[01]+(\.[01]+)*\b', Literal), # concat
|
| 101 |
+
|
| 102 |
+
# decimal
|
| 103 |
+
(r'%d[0-9]+\-[0-9]+\b', Literal), # range
|
| 104 |
+
(r'%d[0-9]+(\.[0-9]+)*\b', Literal), # concat
|
| 105 |
+
|
| 106 |
+
# hexadecimal
|
| 107 |
+
(r'%x[0-9a-fA-F]+\-[0-9a-fA-F]+\b', Literal), # range
|
| 108 |
+
(r'%x[0-9a-fA-F]+(\.[0-9a-fA-F]+)*\b', Literal), # concat
|
| 109 |
+
|
| 110 |
+
# repetition (<a>*<b>element) including nRule
|
| 111 |
+
(r'\b[0-9]+\*[0-9]+', Operator),
|
| 112 |
+
(r'\b[0-9]+\*', Operator),
|
| 113 |
+
(r'\b[0-9]+', Operator),
|
| 114 |
+
(r'\*', Operator),
|
| 115 |
+
|
| 116 |
+
# Strictly speaking, these are not keyword but
|
| 117 |
+
# are called `Core Rule'.
|
| 118 |
+
(words(_core_rules, suffix=r'\b'), Keyword),
|
| 119 |
+
|
| 120 |
+
# nonterminals (ALPHA *(ALPHA / DIGIT / "-"))
|
| 121 |
+
(r'[a-zA-Z][a-zA-Z0-9-]+\b', Name.Class),
|
| 122 |
+
|
| 123 |
+
# operators
|
| 124 |
+
(r'(=/|=|/)', Operator),
|
| 125 |
+
|
| 126 |
+
# punctuation
|
| 127 |
+
(r'[\[\]()]', Punctuation),
|
| 128 |
+
|
| 129 |
+
# fallback
|
| 130 |
+
(r'\s+', Text),
|
| 131 |
+
(r'.', Text),
|
| 132 |
+
],
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
|
| 136 |
+
class JsgfLexer(RegexLexer):
|
| 137 |
+
"""
|
| 138 |
+
For `JSpeech Grammar Format <https://www.w3.org/TR/jsgf/>`_
|
| 139 |
+
grammars.
|
| 140 |
+
|
| 141 |
+
.. versionadded:: 2.2
|
| 142 |
+
"""
|
| 143 |
+
name = 'JSGF'
|
| 144 |
+
aliases = ['jsgf']
|
| 145 |
+
filenames = ['*.jsgf']
|
| 146 |
+
mimetypes = ['application/jsgf', 'application/x-jsgf', 'text/jsgf']
|
| 147 |
+
|
| 148 |
+
flags = re.MULTILINE | re.UNICODE
|
| 149 |
+
|
| 150 |
+
tokens = {
|
| 151 |
+
'root': [
|
| 152 |
+
include('comments'),
|
| 153 |
+
include('non-comments'),
|
| 154 |
+
],
|
| 155 |
+
'comments': [
|
| 156 |
+
(r'/\*\*(?!/)', Comment.Multiline, 'documentation comment'),
|
| 157 |
+
(r'/\*[\w\W]*?\*/', Comment.Multiline),
|
| 158 |
+
(r'//.*', Comment.Single),
|
| 159 |
+
],
|
| 160 |
+
'non-comments': [
|
| 161 |
+
('\A#JSGF[^;]*', Comment.Preproc),
|
| 162 |
+
(r'\s+', Text),
|
| 163 |
+
(r';', Punctuation),
|
| 164 |
+
(r'[=|()\[\]*+]', Operator),
|
| 165 |
+
(r'/[^/]+/', Number.Float),
|
| 166 |
+
(r'"', String.Double, 'string'),
|
| 167 |
+
(r'\{', String.Other, 'tag'),
|
| 168 |
+
(words(('import', 'public'), suffix=r'\b'), Keyword.Reserved),
|
| 169 |
+
(r'grammar\b', Keyword.Reserved, 'grammar name'),
|
| 170 |
+
(r'(<)(NULL|VOID)(>)',
|
| 171 |
+
bygroups(Punctuation, Name.Builtin, Punctuation)),
|
| 172 |
+
(r'<', Punctuation, 'rulename'),
|
| 173 |
+
(r'\w+|[^\s;=|()\[\]*+/"{<\w]+', Text),
|
| 174 |
+
],
|
| 175 |
+
'string': [
|
| 176 |
+
(r'"', String.Double, '#pop'),
|
| 177 |
+
(r'\\.', String.Escape),
|
| 178 |
+
(r'[^\\"]+', String.Double),
|
| 179 |
+
],
|
| 180 |
+
'tag': [
|
| 181 |
+
(r'\}', String.Other, '#pop'),
|
| 182 |
+
(r'\\.', String.Escape),
|
| 183 |
+
(r'[^\\}]+', String.Other),
|
| 184 |
+
],
|
| 185 |
+
'grammar name': [
|
| 186 |
+
(r';', Punctuation, '#pop'),
|
| 187 |
+
(r'\s+', Text),
|
| 188 |
+
(r'\.', Punctuation),
|
| 189 |
+
(r'[^;\s.]+', Name.Namespace),
|
| 190 |
+
],
|
| 191 |
+
'rulename': [
|
| 192 |
+
(r'>', Punctuation, '#pop'),
|
| 193 |
+
(r'\*', Punctuation),
|
| 194 |
+
(r'\s+', Text),
|
| 195 |
+
(r'([^.>]+)(\s*)(\.)', bygroups(Name.Namespace, Text, Punctuation)),
|
| 196 |
+
(r'[^.>]+', Name.Constant),
|
| 197 |
+
],
|
| 198 |
+
'documentation comment': [
|
| 199 |
+
(r'\*/', Comment.Multiline, '#pop'),
|
| 200 |
+
(r'(^\s*\*?\s*)(@(?:example|see)\s+)'
|
| 201 |
+
r'([\w\W]*?(?=(?:^\s*\*?\s*@|\*/)))',
|
| 202 |
+
bygroups(Comment.Multiline, Comment.Special,
|
| 203 |
+
using(this, state='example'))),
|
| 204 |
+
(r'(^\s*\*?\s*)(@\S*)',
|
| 205 |
+
bygroups(Comment.Multiline, Comment.Special)),
|
| 206 |
+
(r'[^*\n@]+|\w|\W', Comment.Multiline),
|
| 207 |
+
],
|
| 208 |
+
'example': [
|
| 209 |
+
(r'\n\s*\*', Comment.Multiline),
|
| 210 |
+
include('non-comments'),
|
| 211 |
+
(r'.', Comment.Multiline),
|
| 212 |
+
],
|
| 213 |
+
}
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/graph.py
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.graph
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexers for graph query languages.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 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, using, this
|
| 15 |
+
from pygments.token import Keyword, Punctuation, Comment, Operator, Name,\
|
| 16 |
+
String, Number, Whitespace
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
__all__ = ['CypherLexer']
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
class CypherLexer(RegexLexer):
|
| 23 |
+
"""
|
| 24 |
+
For `Cypher Query Language
|
| 25 |
+
<http://docs.neo4j.org/chunked/milestone/cypher-query-lang.html>`_
|
| 26 |
+
|
| 27 |
+
For the Cypher version in Neo4J 2.0
|
| 28 |
+
|
| 29 |
+
.. versionadded:: 2.0
|
| 30 |
+
"""
|
| 31 |
+
name = 'Cypher'
|
| 32 |
+
aliases = ['cypher']
|
| 33 |
+
filenames = ['*.cyp', '*.cypher']
|
| 34 |
+
|
| 35 |
+
flags = re.MULTILINE | re.IGNORECASE
|
| 36 |
+
|
| 37 |
+
tokens = {
|
| 38 |
+
'root': [
|
| 39 |
+
include('comment'),
|
| 40 |
+
include('keywords'),
|
| 41 |
+
include('clauses'),
|
| 42 |
+
include('relations'),
|
| 43 |
+
include('strings'),
|
| 44 |
+
include('whitespace'),
|
| 45 |
+
include('barewords'),
|
| 46 |
+
],
|
| 47 |
+
'comment': [
|
| 48 |
+
(r'^.*//.*\n', Comment.Single),
|
| 49 |
+
],
|
| 50 |
+
'keywords': [
|
| 51 |
+
(r'(create|order|match|limit|set|skip|start|return|with|where|'
|
| 52 |
+
r'delete|foreach|not|by)\b', Keyword),
|
| 53 |
+
],
|
| 54 |
+
'clauses': [
|
| 55 |
+
# TODO: many missing ones, see http://docs.neo4j.org/refcard/2.0/
|
| 56 |
+
(r'(all|any|as|asc|create|create\s+unique|delete|'
|
| 57 |
+
r'desc|distinct|foreach|in|is\s+null|limit|match|none|'
|
| 58 |
+
r'order\s+by|return|set|skip|single|start|union|where|with)\b',
|
| 59 |
+
Keyword),
|
| 60 |
+
],
|
| 61 |
+
'relations': [
|
| 62 |
+
(r'(-\[)(.*?)(\]->)', bygroups(Operator, using(this), Operator)),
|
| 63 |
+
(r'(<-\[)(.*?)(\]-)', bygroups(Operator, using(this), Operator)),
|
| 64 |
+
(r'(-\[)(.*?)(\]-)', bygroups(Operator, using(this), Operator)),
|
| 65 |
+
(r'-->|<--|\[|\]', Operator),
|
| 66 |
+
(r'<|>|<>|=|<=|=>|\(|\)|\||:|,|;', Punctuation),
|
| 67 |
+
(r'[.*{}]', Punctuation),
|
| 68 |
+
],
|
| 69 |
+
'strings': [
|
| 70 |
+
(r'"(?:\\[tbnrf\'"\\]|[^\\"])*"', String),
|
| 71 |
+
(r'`(?:``|[^`])+`', Name.Variable),
|
| 72 |
+
],
|
| 73 |
+
'whitespace': [
|
| 74 |
+
(r'\s+', Whitespace),
|
| 75 |
+
],
|
| 76 |
+
'barewords': [
|
| 77 |
+
(r'[a-z]\w*', Name),
|
| 78 |
+
(r'\d+', Number),
|
| 79 |
+
],
|
| 80 |
+
}
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/graphics.py
ADDED
|
@@ -0,0 +1,553 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.graphics
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexers for computer graphics and plotting related languages.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
from pygments.lexer import RegexLexer, words, include, bygroups, using, \
|
| 13 |
+
this, default
|
| 14 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, \
|
| 15 |
+
Number, Punctuation, String
|
| 16 |
+
|
| 17 |
+
__all__ = ['GLShaderLexer', 'PostScriptLexer', 'AsymptoteLexer', 'GnuplotLexer',
|
| 18 |
+
'PovrayLexer']
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
class GLShaderLexer(RegexLexer):
|
| 22 |
+
"""
|
| 23 |
+
GLSL (OpenGL Shader) lexer.
|
| 24 |
+
|
| 25 |
+
.. versionadded:: 1.1
|
| 26 |
+
"""
|
| 27 |
+
name = 'GLSL'
|
| 28 |
+
aliases = ['glsl']
|
| 29 |
+
filenames = ['*.vert', '*.frag', '*.geo']
|
| 30 |
+
mimetypes = ['text/x-glslsrc']
|
| 31 |
+
|
| 32 |
+
tokens = {
|
| 33 |
+
'root': [
|
| 34 |
+
(r'^#.*', Comment.Preproc),
|
| 35 |
+
(r'//.*', Comment.Single),
|
| 36 |
+
(r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline),
|
| 37 |
+
(r'\+|-|~|!=?|\*|/|%|<<|>>|<=?|>=?|==?|&&?|\^|\|\|?',
|
| 38 |
+
Operator),
|
| 39 |
+
(r'[?:]', Operator), # quick hack for ternary
|
| 40 |
+
(r'\bdefined\b', Operator),
|
| 41 |
+
(r'[;{}(),\[\]]', Punctuation),
|
| 42 |
+
# FIXME when e is present, no decimal point needed
|
| 43 |
+
(r'[+-]?\d*\.\d+([eE][-+]?\d+)?', Number.Float),
|
| 44 |
+
(r'[+-]?\d+\.\d*([eE][-+]?\d+)?', Number.Float),
|
| 45 |
+
(r'0[xX][0-9a-fA-F]*', Number.Hex),
|
| 46 |
+
(r'0[0-7]*', Number.Oct),
|
| 47 |
+
(r'[1-9][0-9]*', Number.Integer),
|
| 48 |
+
(words((
|
| 49 |
+
'attribute', 'const', 'uniform', 'varying', 'centroid', 'break',
|
| 50 |
+
'continue', 'do', 'for', 'while', 'if', 'else', 'in', 'out',
|
| 51 |
+
'inout', 'float', 'int', 'void', 'bool', 'true', 'false',
|
| 52 |
+
'invariant', 'discard', 'return', 'mat2', 'mat3' 'mat4',
|
| 53 |
+
'mat2x2', 'mat3x2', 'mat4x2', 'mat2x3', 'mat3x3', 'mat4x3',
|
| 54 |
+
'mat2x4', 'mat3x4', 'mat4x4', 'vec2', 'vec3', 'vec4',
|
| 55 |
+
'ivec2', 'ivec3', 'ivec4', 'bvec2', 'bvec3', 'bvec4',
|
| 56 |
+
'sampler1D', 'sampler2D', 'sampler3D' 'samplerCube',
|
| 57 |
+
'sampler1DShadow', 'sampler2DShadow', 'struct'),
|
| 58 |
+
prefix=r'\b', suffix=r'\b'),
|
| 59 |
+
Keyword),
|
| 60 |
+
(words((
|
| 61 |
+
'asm', 'class', 'union', 'enum', 'typedef', 'template', 'this',
|
| 62 |
+
'packed', 'goto', 'switch', 'default', 'inline', 'noinline',
|
| 63 |
+
'volatile', 'public', 'static', 'extern', 'external', 'interface',
|
| 64 |
+
'long', 'short', 'double', 'half', 'fixed', 'unsigned', 'lowp',
|
| 65 |
+
'mediump', 'highp', 'precision', 'input', 'output',
|
| 66 |
+
'hvec2', 'hvec3', 'hvec4', 'dvec2', 'dvec3', 'dvec4',
|
| 67 |
+
'fvec2', 'fvec3', 'fvec4', 'sampler2DRect', 'sampler3DRect',
|
| 68 |
+
'sampler2DRectShadow', 'sizeof', 'cast', 'namespace', 'using'),
|
| 69 |
+
prefix=r'\b', suffix=r'\b'),
|
| 70 |
+
Keyword), # future use
|
| 71 |
+
(r'[a-zA-Z_]\w*', Name),
|
| 72 |
+
(r'\.', Punctuation),
|
| 73 |
+
(r'\s+', Text),
|
| 74 |
+
],
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
class PostScriptLexer(RegexLexer):
|
| 79 |
+
"""
|
| 80 |
+
Lexer for PostScript files.
|
| 81 |
+
|
| 82 |
+
The PostScript Language Reference published by Adobe at
|
| 83 |
+
<http://partners.adobe.com/public/developer/en/ps/PLRM.pdf>
|
| 84 |
+
is the authority for this.
|
| 85 |
+
|
| 86 |
+
.. versionadded:: 1.4
|
| 87 |
+
"""
|
| 88 |
+
name = 'PostScript'
|
| 89 |
+
aliases = ['postscript', 'postscr']
|
| 90 |
+
filenames = ['*.ps', '*.eps']
|
| 91 |
+
mimetypes = ['application/postscript']
|
| 92 |
+
|
| 93 |
+
delimiter = r'()<>\[\]{}/%\s'
|
| 94 |
+
delimiter_end = r'(?=[%s])' % delimiter
|
| 95 |
+
|
| 96 |
+
valid_name_chars = r'[^%s]' % delimiter
|
| 97 |
+
valid_name = r"%s+%s" % (valid_name_chars, delimiter_end)
|
| 98 |
+
|
| 99 |
+
tokens = {
|
| 100 |
+
'root': [
|
| 101 |
+
# All comment types
|
| 102 |
+
(r'^%!.+\n', Comment.Preproc),
|
| 103 |
+
(r'%%.*\n', Comment.Special),
|
| 104 |
+
(r'(^%.*\n){2,}', Comment.Multiline),
|
| 105 |
+
(r'%.*\n', Comment.Single),
|
| 106 |
+
|
| 107 |
+
# String literals are awkward; enter separate state.
|
| 108 |
+
(r'\(', String, 'stringliteral'),
|
| 109 |
+
|
| 110 |
+
(r'[{}<>\[\]]', Punctuation),
|
| 111 |
+
|
| 112 |
+
# Numbers
|
| 113 |
+
(r'<[0-9A-Fa-f]+>' + delimiter_end, Number.Hex),
|
| 114 |
+
# Slight abuse: use Oct to signify any explicit base system
|
| 115 |
+
(r'[0-9]+\#(\-|\+)?([0-9]+\.?|[0-9]*\.[0-9]+|[0-9]+\.[0-9]*)'
|
| 116 |
+
r'((e|E)[0-9]+)?' + delimiter_end, Number.Oct),
|
| 117 |
+
(r'(\-|\+)?([0-9]+\.?|[0-9]*\.[0-9]+|[0-9]+\.[0-9]*)((e|E)[0-9]+)?'
|
| 118 |
+
+ delimiter_end, Number.Float),
|
| 119 |
+
(r'(\-|\+)?[0-9]+' + delimiter_end, Number.Integer),
|
| 120 |
+
|
| 121 |
+
# References
|
| 122 |
+
(r'\/%s' % valid_name, Name.Variable),
|
| 123 |
+
|
| 124 |
+
# Names
|
| 125 |
+
(valid_name, Name.Function), # Anything else is executed
|
| 126 |
+
|
| 127 |
+
# These keywords taken from
|
| 128 |
+
# <http://www.math.ubc.ca/~cass/graphics/manual/pdf/a1.pdf>
|
| 129 |
+
# Is there an authoritative list anywhere that doesn't involve
|
| 130 |
+
# trawling documentation?
|
| 131 |
+
|
| 132 |
+
(r'(false|true)' + delimiter_end, Keyword.Constant),
|
| 133 |
+
|
| 134 |
+
# Conditionals / flow control
|
| 135 |
+
(r'(eq|ne|g[et]|l[et]|and|or|not|if(?:else)?|for(?:all)?)'
|
| 136 |
+
+ delimiter_end, Keyword.Reserved),
|
| 137 |
+
|
| 138 |
+
(words((
|
| 139 |
+
'abs', 'add', 'aload', 'arc', 'arcn', 'array', 'atan', 'begin',
|
| 140 |
+
'bind', 'ceiling', 'charpath', 'clip', 'closepath', 'concat',
|
| 141 |
+
'concatmatrix', 'copy', 'cos', 'currentlinewidth', 'currentmatrix',
|
| 142 |
+
'currentpoint', 'curveto', 'cvi', 'cvs', 'def', 'defaultmatrix',
|
| 143 |
+
'dict', 'dictstackoverflow', 'div', 'dtransform', 'dup', 'end',
|
| 144 |
+
'exch', 'exec', 'exit', 'exp', 'fill', 'findfont', 'floor', 'get',
|
| 145 |
+
'getinterval', 'grestore', 'gsave', 'gt', 'identmatrix', 'idiv',
|
| 146 |
+
'idtransform', 'index', 'invertmatrix', 'itransform', 'length',
|
| 147 |
+
'lineto', 'ln', 'load', 'log', 'loop', 'matrix', 'mod', 'moveto',
|
| 148 |
+
'mul', 'neg', 'newpath', 'pathforall', 'pathbbox', 'pop', 'print',
|
| 149 |
+
'pstack', 'put', 'quit', 'rand', 'rangecheck', 'rcurveto', 'repeat',
|
| 150 |
+
'restore', 'rlineto', 'rmoveto', 'roll', 'rotate', 'round', 'run',
|
| 151 |
+
'save', 'scale', 'scalefont', 'setdash', 'setfont', 'setgray',
|
| 152 |
+
'setlinecap', 'setlinejoin', 'setlinewidth', 'setmatrix',
|
| 153 |
+
'setrgbcolor', 'shfill', 'show', 'showpage', 'sin', 'sqrt',
|
| 154 |
+
'stack', 'stringwidth', 'stroke', 'strokepath', 'sub', 'syntaxerror',
|
| 155 |
+
'transform', 'translate', 'truncate', 'typecheck', 'undefined',
|
| 156 |
+
'undefinedfilename', 'undefinedresult'), suffix=delimiter_end),
|
| 157 |
+
Name.Builtin),
|
| 158 |
+
|
| 159 |
+
(r'\s+', Text),
|
| 160 |
+
],
|
| 161 |
+
|
| 162 |
+
'stringliteral': [
|
| 163 |
+
(r'[^()\\]+', String),
|
| 164 |
+
(r'\\', String.Escape, 'escape'),
|
| 165 |
+
(r'\(', String, '#push'),
|
| 166 |
+
(r'\)', String, '#pop'),
|
| 167 |
+
],
|
| 168 |
+
|
| 169 |
+
'escape': [
|
| 170 |
+
(r'[0-8]{3}|n|r|t|b|f|\\|\(|\)', String.Escape, '#pop'),
|
| 171 |
+
default('#pop'),
|
| 172 |
+
],
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
|
| 176 |
+
class AsymptoteLexer(RegexLexer):
|
| 177 |
+
"""
|
| 178 |
+
For `Asymptote <http://asymptote.sf.net/>`_ source code.
|
| 179 |
+
|
| 180 |
+
.. versionadded:: 1.2
|
| 181 |
+
"""
|
| 182 |
+
name = 'Asymptote'
|
| 183 |
+
aliases = ['asy', 'asymptote']
|
| 184 |
+
filenames = ['*.asy']
|
| 185 |
+
mimetypes = ['text/x-asymptote']
|
| 186 |
+
|
| 187 |
+
#: optional Comment or Whitespace
|
| 188 |
+
_ws = r'(?:\s|//.*?\n|/\*.*?\*/)+'
|
| 189 |
+
|
| 190 |
+
tokens = {
|
| 191 |
+
'whitespace': [
|
| 192 |
+
(r'\n', Text),
|
| 193 |
+
(r'\s+', Text),
|
| 194 |
+
(r'\\\n', Text), # line continuation
|
| 195 |
+
(r'//(\n|(.|\n)*?[^\\]\n)', Comment),
|
| 196 |
+
(r'/(\\\n)?\*(.|\n)*?\*(\\\n)?/', Comment),
|
| 197 |
+
],
|
| 198 |
+
'statements': [
|
| 199 |
+
# simple string (TeX friendly)
|
| 200 |
+
(r'"(\\\\|\\"|[^"])*"', String),
|
| 201 |
+
# C style string (with character escapes)
|
| 202 |
+
(r"'", String, 'string'),
|
| 203 |
+
(r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[lL]?', Number.Float),
|
| 204 |
+
(r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float),
|
| 205 |
+
(r'0x[0-9a-fA-F]+[Ll]?', Number.Hex),
|
| 206 |
+
(r'0[0-7]+[Ll]?', Number.Oct),
|
| 207 |
+
(r'\d+[Ll]?', Number.Integer),
|
| 208 |
+
(r'[~!%^&*+=|?:<>/-]', Operator),
|
| 209 |
+
(r'[()\[\],.]', Punctuation),
|
| 210 |
+
(r'\b(case)(.+?)(:)', bygroups(Keyword, using(this), Text)),
|
| 211 |
+
(r'(and|controls|tension|atleast|curl|if|else|while|for|do|'
|
| 212 |
+
r'return|break|continue|struct|typedef|new|access|import|'
|
| 213 |
+
r'unravel|from|include|quote|static|public|private|restricted|'
|
| 214 |
+
r'this|explicit|true|false|null|cycle|newframe|operator)\b', Keyword),
|
| 215 |
+
# Since an asy-type-name can be also an asy-function-name,
|
| 216 |
+
# in the following we test if the string " [a-zA-Z]" follows
|
| 217 |
+
# the Keyword.Type.
|
| 218 |
+
# Of course it is not perfect !
|
| 219 |
+
(r'(Braid|FitResult|Label|Legend|TreeNode|abscissa|arc|arrowhead|'
|
| 220 |
+
r'binarytree|binarytreeNode|block|bool|bool3|bounds|bqe|circle|'
|
| 221 |
+
r'conic|coord|coordsys|cputime|ellipse|file|filltype|frame|grid3|'
|
| 222 |
+
r'guide|horner|hsv|hyperbola|indexedTransform|int|inversion|key|'
|
| 223 |
+
r'light|line|linefit|marginT|marker|mass|object|pair|parabola|path|'
|
| 224 |
+
r'path3|pen|picture|point|position|projection|real|revolution|'
|
| 225 |
+
r'scaleT|scientific|segment|side|slice|splitface|string|surface|'
|
| 226 |
+
r'tensionSpecifier|ticklocate|ticksgridT|tickvalues|transform|'
|
| 227 |
+
r'transformation|tree|triangle|trilinear|triple|vector|'
|
| 228 |
+
r'vertex|void)(?=\s+[a-zA-Z])', Keyword.Type),
|
| 229 |
+
# Now the asy-type-name which are not asy-function-name
|
| 230 |
+
# except yours !
|
| 231 |
+
# Perhaps useless
|
| 232 |
+
(r'(Braid|FitResult|TreeNode|abscissa|arrowhead|block|bool|bool3|'
|
| 233 |
+
r'bounds|coord|frame|guide|horner|int|linefit|marginT|pair|pen|'
|
| 234 |
+
r'picture|position|real|revolution|slice|splitface|ticksgridT|'
|
| 235 |
+
r'tickvalues|tree|triple|vertex|void)\b', Keyword.Type),
|
| 236 |
+
('[a-zA-Z_]\w*:(?!:)', Name.Label),
|
| 237 |
+
('[a-zA-Z_]\w*', Name),
|
| 238 |
+
],
|
| 239 |
+
'root': [
|
| 240 |
+
include('whitespace'),
|
| 241 |
+
# functions
|
| 242 |
+
(r'((?:[\w*\s])+?(?:\s|\*))' # return arguments
|
| 243 |
+
r'([a-zA-Z_]\w*)' # method name
|
| 244 |
+
r'(\s*\([^;]*?\))' # signature
|
| 245 |
+
r'(' + _ws + r')(\{)',
|
| 246 |
+
bygroups(using(this), Name.Function, using(this), using(this),
|
| 247 |
+
Punctuation),
|
| 248 |
+
'function'),
|
| 249 |
+
# function declarations
|
| 250 |
+
(r'((?:[\w*\s])+?(?:\s|\*))' # return arguments
|
| 251 |
+
r'([a-zA-Z_]\w*)' # method name
|
| 252 |
+
r'(\s*\([^;]*?\))' # signature
|
| 253 |
+
r'(' + _ws + r')(;)',
|
| 254 |
+
bygroups(using(this), Name.Function, using(this), using(this),
|
| 255 |
+
Punctuation)),
|
| 256 |
+
default('statement'),
|
| 257 |
+
],
|
| 258 |
+
'statement': [
|
| 259 |
+
include('whitespace'),
|
| 260 |
+
include('statements'),
|
| 261 |
+
('[{}]', Punctuation),
|
| 262 |
+
(';', Punctuation, '#pop'),
|
| 263 |
+
],
|
| 264 |
+
'function': [
|
| 265 |
+
include('whitespace'),
|
| 266 |
+
include('statements'),
|
| 267 |
+
(';', Punctuation),
|
| 268 |
+
(r'\{', Punctuation, '#push'),
|
| 269 |
+
(r'\}', Punctuation, '#pop'),
|
| 270 |
+
],
|
| 271 |
+
'string': [
|
| 272 |
+
(r"'", String, '#pop'),
|
| 273 |
+
(r'\\([\\abfnrtv"\'?]|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape),
|
| 274 |
+
(r'\n', String),
|
| 275 |
+
(r"[^\\'\n]+", String), # all other characters
|
| 276 |
+
(r'\\\n', String),
|
| 277 |
+
(r'\\n', String), # line continuation
|
| 278 |
+
(r'\\', String), # stray backslash
|
| 279 |
+
],
|
| 280 |
+
}
|
| 281 |
+
|
| 282 |
+
def get_tokens_unprocessed(self, text):
|
| 283 |
+
from pygments.lexers._asy_builtins import ASYFUNCNAME, ASYVARNAME
|
| 284 |
+
for index, token, value in \
|
| 285 |
+
RegexLexer.get_tokens_unprocessed(self, text):
|
| 286 |
+
if token is Name and value in ASYFUNCNAME:
|
| 287 |
+
token = Name.Function
|
| 288 |
+
elif token is Name and value in ASYVARNAME:
|
| 289 |
+
token = Name.Variable
|
| 290 |
+
yield index, token, value
|
| 291 |
+
|
| 292 |
+
|
| 293 |
+
def _shortened(word):
|
| 294 |
+
dpos = word.find('$')
|
| 295 |
+
return '|'.join(word[:dpos] + word[dpos+1:i] + r'\b'
|
| 296 |
+
for i in range(len(word), dpos, -1))
|
| 297 |
+
|
| 298 |
+
|
| 299 |
+
def _shortened_many(*words):
|
| 300 |
+
return '|'.join(map(_shortened, words))
|
| 301 |
+
|
| 302 |
+
|
| 303 |
+
class GnuplotLexer(RegexLexer):
|
| 304 |
+
"""
|
| 305 |
+
For `Gnuplot <http://gnuplot.info/>`_ plotting scripts.
|
| 306 |
+
|
| 307 |
+
.. versionadded:: 0.11
|
| 308 |
+
"""
|
| 309 |
+
|
| 310 |
+
name = 'Gnuplot'
|
| 311 |
+
aliases = ['gnuplot']
|
| 312 |
+
filenames = ['*.plot', '*.plt']
|
| 313 |
+
mimetypes = ['text/x-gnuplot']
|
| 314 |
+
|
| 315 |
+
tokens = {
|
| 316 |
+
'root': [
|
| 317 |
+
include('whitespace'),
|
| 318 |
+
(_shortened('bi$nd'), Keyword, 'bind'),
|
| 319 |
+
(_shortened_many('ex$it', 'q$uit'), Keyword, 'quit'),
|
| 320 |
+
(_shortened('f$it'), Keyword, 'fit'),
|
| 321 |
+
(r'(if)(\s*)(\()', bygroups(Keyword, Text, Punctuation), 'if'),
|
| 322 |
+
(r'else\b', Keyword),
|
| 323 |
+
(_shortened('pa$use'), Keyword, 'pause'),
|
| 324 |
+
(_shortened_many('p$lot', 'rep$lot', 'sp$lot'), Keyword, 'plot'),
|
| 325 |
+
(_shortened('sa$ve'), Keyword, 'save'),
|
| 326 |
+
(_shortened('se$t'), Keyword, ('genericargs', 'optionarg')),
|
| 327 |
+
(_shortened_many('sh$ow', 'uns$et'),
|
| 328 |
+
Keyword, ('noargs', 'optionarg')),
|
| 329 |
+
(_shortened_many('low$er', 'ra$ise', 'ca$ll', 'cd$', 'cl$ear',
|
| 330 |
+
'h$elp', '\\?$', 'hi$story', 'l$oad', 'pr$int',
|
| 331 |
+
'pwd$', 're$read', 'res$et', 'scr$eendump',
|
| 332 |
+
'she$ll', 'sy$stem', 'up$date'),
|
| 333 |
+
Keyword, 'genericargs'),
|
| 334 |
+
(_shortened_many('pwd$', 're$read', 'res$et', 'scr$eendump',
|
| 335 |
+
'she$ll', 'test$'),
|
| 336 |
+
Keyword, 'noargs'),
|
| 337 |
+
('([a-zA-Z_]\w*)(\s*)(=)',
|
| 338 |
+
bygroups(Name.Variable, Text, Operator), 'genericargs'),
|
| 339 |
+
('([a-zA-Z_]\w*)(\s*\(.*?\)\s*)(=)',
|
| 340 |
+
bygroups(Name.Function, Text, Operator), 'genericargs'),
|
| 341 |
+
(r'@[a-zA-Z_]\w*', Name.Constant), # macros
|
| 342 |
+
(r';', Keyword),
|
| 343 |
+
],
|
| 344 |
+
'comment': [
|
| 345 |
+
(r'[^\\\n]', Comment),
|
| 346 |
+
(r'\\\n', Comment),
|
| 347 |
+
(r'\\', Comment),
|
| 348 |
+
# don't add the newline to the Comment token
|
| 349 |
+
default('#pop'),
|
| 350 |
+
],
|
| 351 |
+
'whitespace': [
|
| 352 |
+
('#', Comment, 'comment'),
|
| 353 |
+
(r'[ \t\v\f]+', Text),
|
| 354 |
+
],
|
| 355 |
+
'noargs': [
|
| 356 |
+
include('whitespace'),
|
| 357 |
+
# semicolon and newline end the argument list
|
| 358 |
+
(r';', Punctuation, '#pop'),
|
| 359 |
+
(r'\n', Text, '#pop'),
|
| 360 |
+
],
|
| 361 |
+
'dqstring': [
|
| 362 |
+
(r'"', String, '#pop'),
|
| 363 |
+
(r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape),
|
| 364 |
+
(r'[^\\"\n]+', String), # all other characters
|
| 365 |
+
(r'\\\n', String), # line continuation
|
| 366 |
+
(r'\\', String), # stray backslash
|
| 367 |
+
(r'\n', String, '#pop'), # newline ends the string too
|
| 368 |
+
],
|
| 369 |
+
'sqstring': [
|
| 370 |
+
(r"''", String), # escaped single quote
|
| 371 |
+
(r"'", String, '#pop'),
|
| 372 |
+
(r"[^\\'\n]+", String), # all other characters
|
| 373 |
+
(r'\\\n', String), # line continuation
|
| 374 |
+
(r'\\', String), # normal backslash
|
| 375 |
+
(r'\n', String, '#pop'), # newline ends the string too
|
| 376 |
+
],
|
| 377 |
+
'genericargs': [
|
| 378 |
+
include('noargs'),
|
| 379 |
+
(r'"', String, 'dqstring'),
|
| 380 |
+
(r"'", String, 'sqstring'),
|
| 381 |
+
(r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+', Number.Float),
|
| 382 |
+
(r'(\d+\.\d*|\.\d+)', Number.Float),
|
| 383 |
+
(r'-?\d+', Number.Integer),
|
| 384 |
+
('[,.~!%^&*+=|?:<>/-]', Operator),
|
| 385 |
+
('[{}()\[\]]', Punctuation),
|
| 386 |
+
(r'(eq|ne)\b', Operator.Word),
|
| 387 |
+
(r'([a-zA-Z_]\w*)(\s*)(\()',
|
| 388 |
+
bygroups(Name.Function, Text, Punctuation)),
|
| 389 |
+
(r'[a-zA-Z_]\w*', Name),
|
| 390 |
+
(r'@[a-zA-Z_]\w*', Name.Constant), # macros
|
| 391 |
+
(r'\\\n', Text),
|
| 392 |
+
],
|
| 393 |
+
'optionarg': [
|
| 394 |
+
include('whitespace'),
|
| 395 |
+
(_shortened_many(
|
| 396 |
+
"a$ll", "an$gles", "ar$row", "au$toscale", "b$ars", "bor$der",
|
| 397 |
+
"box$width", "cl$abel", "c$lip", "cn$trparam", "co$ntour", "da$ta",
|
| 398 |
+
"data$file", "dg$rid3d", "du$mmy", "enc$oding", "dec$imalsign",
|
| 399 |
+
"fit$", "font$path", "fo$rmat", "fu$nction", "fu$nctions", "g$rid",
|
| 400 |
+
"hid$den3d", "his$torysize", "is$osamples", "k$ey", "keyt$itle",
|
| 401 |
+
"la$bel", "li$nestyle", "ls$", "loa$dpath", "loc$ale", "log$scale",
|
| 402 |
+
"mac$ros", "map$ping", "map$ping3d", "mar$gin", "lmar$gin",
|
| 403 |
+
"rmar$gin", "tmar$gin", "bmar$gin", "mo$use", "multi$plot",
|
| 404 |
+
"mxt$ics", "nomxt$ics", "mx2t$ics", "nomx2t$ics", "myt$ics",
|
| 405 |
+
"nomyt$ics", "my2t$ics", "nomy2t$ics", "mzt$ics", "nomzt$ics",
|
| 406 |
+
"mcbt$ics", "nomcbt$ics", "of$fsets", "or$igin", "o$utput",
|
| 407 |
+
"pa$rametric", "pm$3d", "pal$ette", "colorb$ox", "p$lot",
|
| 408 |
+
"poi$ntsize", "pol$ar", "pr$int", "obj$ect", "sa$mples", "si$ze",
|
| 409 |
+
"st$yle", "su$rface", "table$", "t$erminal", "termo$ptions", "ti$cs",
|
| 410 |
+
"ticsc$ale", "ticsl$evel", "timef$mt", "tim$estamp", "tit$le",
|
| 411 |
+
"v$ariables", "ve$rsion", "vi$ew", "xyp$lane", "xda$ta", "x2da$ta",
|
| 412 |
+
"yda$ta", "y2da$ta", "zda$ta", "cbda$ta", "xl$abel", "x2l$abel",
|
| 413 |
+
"yl$abel", "y2l$abel", "zl$abel", "cbl$abel", "xti$cs", "noxti$cs",
|
| 414 |
+
"x2ti$cs", "nox2ti$cs", "yti$cs", "noyti$cs", "y2ti$cs", "noy2ti$cs",
|
| 415 |
+
"zti$cs", "nozti$cs", "cbti$cs", "nocbti$cs", "xdti$cs", "noxdti$cs",
|
| 416 |
+
"x2dti$cs", "nox2dti$cs", "ydti$cs", "noydti$cs", "y2dti$cs",
|
| 417 |
+
"noy2dti$cs", "zdti$cs", "nozdti$cs", "cbdti$cs", "nocbdti$cs",
|
| 418 |
+
"xmti$cs", "noxmti$cs", "x2mti$cs", "nox2mti$cs", "ymti$cs",
|
| 419 |
+
"noymti$cs", "y2mti$cs", "noy2mti$cs", "zmti$cs", "nozmti$cs",
|
| 420 |
+
"cbmti$cs", "nocbmti$cs", "xr$ange", "x2r$ange", "yr$ange",
|
| 421 |
+
"y2r$ange", "zr$ange", "cbr$ange", "rr$ange", "tr$ange", "ur$ange",
|
| 422 |
+
"vr$ange", "xzeroa$xis", "x2zeroa$xis", "yzeroa$xis", "y2zeroa$xis",
|
| 423 |
+
"zzeroa$xis", "zeroa$xis", "z$ero"), Name.Builtin, '#pop'),
|
| 424 |
+
],
|
| 425 |
+
'bind': [
|
| 426 |
+
('!', Keyword, '#pop'),
|
| 427 |
+
(_shortened('all$windows'), Name.Builtin),
|
| 428 |
+
include('genericargs'),
|
| 429 |
+
],
|
| 430 |
+
'quit': [
|
| 431 |
+
(r'gnuplot\b', Keyword),
|
| 432 |
+
include('noargs'),
|
| 433 |
+
],
|
| 434 |
+
'fit': [
|
| 435 |
+
(r'via\b', Name.Builtin),
|
| 436 |
+
include('plot'),
|
| 437 |
+
],
|
| 438 |
+
'if': [
|
| 439 |
+
(r'\)', Punctuation, '#pop'),
|
| 440 |
+
include('genericargs'),
|
| 441 |
+
],
|
| 442 |
+
'pause': [
|
| 443 |
+
(r'(mouse|any|button1|button2|button3)\b', Name.Builtin),
|
| 444 |
+
(_shortened('key$press'), Name.Builtin),
|
| 445 |
+
include('genericargs'),
|
| 446 |
+
],
|
| 447 |
+
'plot': [
|
| 448 |
+
(_shortened_many('ax$es', 'axi$s', 'bin$ary', 'ev$ery', 'i$ndex',
|
| 449 |
+
'mat$rix', 's$mooth', 'thru$', 't$itle',
|
| 450 |
+
'not$itle', 'u$sing', 'w$ith'),
|
| 451 |
+
Name.Builtin),
|
| 452 |
+
include('genericargs'),
|
| 453 |
+
],
|
| 454 |
+
'save': [
|
| 455 |
+
(_shortened_many('f$unctions', 's$et', 't$erminal', 'v$ariables'),
|
| 456 |
+
Name.Builtin),
|
| 457 |
+
include('genericargs'),
|
| 458 |
+
],
|
| 459 |
+
}
|
| 460 |
+
|
| 461 |
+
|
| 462 |
+
class PovrayLexer(RegexLexer):
|
| 463 |
+
"""
|
| 464 |
+
For `Persistence of Vision Raytracer <http://www.povray.org/>`_ files.
|
| 465 |
+
|
| 466 |
+
.. versionadded:: 0.11
|
| 467 |
+
"""
|
| 468 |
+
name = 'POVRay'
|
| 469 |
+
aliases = ['pov']
|
| 470 |
+
filenames = ['*.pov', '*.inc']
|
| 471 |
+
mimetypes = ['text/x-povray']
|
| 472 |
+
|
| 473 |
+
tokens = {
|
| 474 |
+
'root': [
|
| 475 |
+
(r'/\*[\w\W]*?\*/', Comment.Multiline),
|
| 476 |
+
(r'//.*\n', Comment.Single),
|
| 477 |
+
(r'(?s)"(?:\\.|[^"\\])+"', String.Double),
|
| 478 |
+
(words((
|
| 479 |
+
'break', 'case', 'debug', 'declare', 'default', 'define', 'else',
|
| 480 |
+
'elseif', 'end', 'error', 'fclose', 'fopen', 'for', 'if', 'ifdef',
|
| 481 |
+
'ifndef', 'include', 'local', 'macro', 'range', 'read', 'render',
|
| 482 |
+
'statistics', 'switch', 'undef', 'version', 'warning', 'while',
|
| 483 |
+
'write'), prefix=r'#', suffix=r'\b'),
|
| 484 |
+
Comment.Preproc),
|
| 485 |
+
(words((
|
| 486 |
+
'aa_level', 'aa_threshold', 'abs', 'acos', 'acosh', 'adaptive', 'adc_bailout',
|
| 487 |
+
'agate', 'agate_turb', 'all', 'alpha', 'ambient', 'ambient_light', 'angle',
|
| 488 |
+
'aperture', 'arc_angle', 'area_light', 'asc', 'asin', 'asinh', 'assumed_gamma',
|
| 489 |
+
'atan', 'atan2', 'atanh', 'atmosphere', 'atmospheric_attenuation',
|
| 490 |
+
'attenuating', 'average', 'background', 'black_hole', 'blue', 'blur_samples',
|
| 491 |
+
'bounded_by', 'box_mapping', 'bozo', 'break', 'brick', 'brick_size',
|
| 492 |
+
'brightness', 'brilliance', 'bumps', 'bumpy1', 'bumpy2', 'bumpy3', 'bump_map',
|
| 493 |
+
'bump_size', 'case', 'caustics', 'ceil', 'checker', 'chr', 'clipped_by', 'clock',
|
| 494 |
+
'color', 'color_map', 'colour', 'colour_map', 'component', 'composite', 'concat',
|
| 495 |
+
'confidence', 'conic_sweep', 'constant', 'control0', 'control1', 'cos', 'cosh',
|
| 496 |
+
'count', 'crackle', 'crand', 'cube', 'cubic_spline', 'cylindrical_mapping',
|
| 497 |
+
'debug', 'declare', 'default', 'degrees', 'dents', 'diffuse', 'direction',
|
| 498 |
+
'distance', 'distance_maximum', 'div', 'dust', 'dust_type', 'eccentricity',
|
| 499 |
+
'else', 'emitting', 'end', 'error', 'error_bound', 'exp', 'exponent',
|
| 500 |
+
'fade_distance', 'fade_power', 'falloff', 'falloff_angle', 'false',
|
| 501 |
+
'file_exists', 'filter', 'finish', 'fisheye', 'flatness', 'flip', 'floor',
|
| 502 |
+
'focal_point', 'fog', 'fog_alt', 'fog_offset', 'fog_type', 'frequency', 'gif',
|
| 503 |
+
'global_settings', 'glowing', 'gradient', 'granite', 'gray_threshold',
|
| 504 |
+
'green', 'halo', 'hexagon', 'hf_gray_16', 'hierarchy', 'hollow', 'hypercomplex',
|
| 505 |
+
'if', 'ifdef', 'iff', 'image_map', 'incidence', 'include', 'int', 'interpolate',
|
| 506 |
+
'inverse', 'ior', 'irid', 'irid_wavelength', 'jitter', 'lambda', 'leopard',
|
| 507 |
+
'linear', 'linear_spline', 'linear_sweep', 'location', 'log', 'looks_like',
|
| 508 |
+
'look_at', 'low_error_factor', 'mandel', 'map_type', 'marble', 'material_map',
|
| 509 |
+
'matrix', 'max', 'max_intersections', 'max_iteration', 'max_trace_level',
|
| 510 |
+
'max_value', 'metallic', 'min', 'minimum_reuse', 'mod', 'mortar',
|
| 511 |
+
'nearest_count', 'no', 'normal', 'normal_map', 'no_shadow', 'number_of_waves',
|
| 512 |
+
'octaves', 'off', 'offset', 'omega', 'omnimax', 'on', 'once', 'onion', 'open',
|
| 513 |
+
'orthographic', 'panoramic', 'pattern1', 'pattern2', 'pattern3',
|
| 514 |
+
'perspective', 'pgm', 'phase', 'phong', 'phong_size', 'pi', 'pigment',
|
| 515 |
+
'pigment_map', 'planar_mapping', 'png', 'point_at', 'pot', 'pow', 'ppm',
|
| 516 |
+
'precision', 'pwr', 'quadratic_spline', 'quaternion', 'quick_color',
|
| 517 |
+
'quick_colour', 'quilted', 'radial', 'radians', 'radiosity', 'radius', 'rainbow',
|
| 518 |
+
'ramp_wave', 'rand', 'range', 'reciprocal', 'recursion_limit', 'red',
|
| 519 |
+
'reflection', 'refraction', 'render', 'repeat', 'rgb', 'rgbf', 'rgbft', 'rgbt',
|
| 520 |
+
'right', 'ripples', 'rotate', 'roughness', 'samples', 'scale', 'scallop_wave',
|
| 521 |
+
'scattering', 'seed', 'shadowless', 'sin', 'sine_wave', 'sinh', 'sky', 'sky_sphere',
|
| 522 |
+
'slice', 'slope_map', 'smooth', 'specular', 'spherical_mapping', 'spiral',
|
| 523 |
+
'spiral1', 'spiral2', 'spotlight', 'spotted', 'sqr', 'sqrt', 'statistics', 'str',
|
| 524 |
+
'strcmp', 'strength', 'strlen', 'strlwr', 'strupr', 'sturm', 'substr', 'switch', 'sys',
|
| 525 |
+
't', 'tan', 'tanh', 'test_camera_1', 'test_camera_2', 'test_camera_3',
|
| 526 |
+
'test_camera_4', 'texture', 'texture_map', 'tga', 'thickness', 'threshold',
|
| 527 |
+
'tightness', 'tile2', 'tiles', 'track', 'transform', 'translate', 'transmit',
|
| 528 |
+
'triangle_wave', 'true', 'ttf', 'turbulence', 'turb_depth', 'type',
|
| 529 |
+
'ultra_wide_angle', 'up', 'use_color', 'use_colour', 'use_index', 'u_steps',
|
| 530 |
+
'val', 'variance', 'vaxis_rotate', 'vcross', 'vdot', 'version', 'vlength',
|
| 531 |
+
'vnormalize', 'volume_object', 'volume_rendered', 'vol_with_light',
|
| 532 |
+
'vrotate', 'v_steps', 'warning', 'warp', 'water_level', 'waves', 'while', 'width',
|
| 533 |
+
'wood', 'wrinkles', 'yes'), prefix=r'\b', suffix=r'\b'),
|
| 534 |
+
Keyword),
|
| 535 |
+
(words((
|
| 536 |
+
'bicubic_patch', 'blob', 'box', 'camera', 'cone', 'cubic', 'cylinder', 'difference',
|
| 537 |
+
'disc', 'height_field', 'intersection', 'julia_fractal', 'lathe',
|
| 538 |
+
'light_source', 'merge', 'mesh', 'object', 'plane', 'poly', 'polygon', 'prism',
|
| 539 |
+
'quadric', 'quartic', 'smooth_triangle', 'sor', 'sphere', 'superellipsoid',
|
| 540 |
+
'text', 'torus', 'triangle', 'union'), suffix=r'\b'),
|
| 541 |
+
Name.Builtin),
|
| 542 |
+
# TODO: <=, etc
|
| 543 |
+
(r'[\[\](){}<>;,]', Punctuation),
|
| 544 |
+
(r'[-+*/=]', Operator),
|
| 545 |
+
(r'\b(x|y|z|u|v)\b', Name.Builtin.Pseudo),
|
| 546 |
+
(r'[a-zA-Z_]\w*', Name),
|
| 547 |
+
(r'[0-9]+\.[0-9]*', Number.Float),
|
| 548 |
+
(r'\.[0-9]+', Number.Float),
|
| 549 |
+
(r'[0-9]+', Number.Integer),
|
| 550 |
+
(r'"(\\\\|\\"|[^"])*"', String),
|
| 551 |
+
(r'\s+', Text),
|
| 552 |
+
]
|
| 553 |
+
}
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/l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-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.haskell
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexers for Haskell and related languages.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
import re
|
| 13 |
+
|
| 14 |
+
from pygments.lexer import Lexer, RegexLexer, bygroups, do_insertions, \
|
| 15 |
+
default, include
|
| 16 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 17 |
+
Number, Punctuation, Generic
|
| 18 |
+
from pygments import unistring as uni
|
| 19 |
+
|
| 20 |
+
__all__ = ['HaskellLexer', 'IdrisLexer', 'AgdaLexer', 'CryptolLexer',
|
| 21 |
+
'LiterateHaskellLexer', 'LiterateIdrisLexer', 'LiterateAgdaLexer',
|
| 22 |
+
'LiterateCryptolLexer', 'KokaLexer']
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
line_re = re.compile('.*?\n')
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
class HaskellLexer(RegexLexer):
|
| 29 |
+
"""
|
| 30 |
+
A Haskell lexer based on the lexemes defined in the Haskell 98 Report.
|
| 31 |
+
|
| 32 |
+
.. versionadded:: 0.8
|
| 33 |
+
"""
|
| 34 |
+
name = 'Haskell'
|
| 35 |
+
aliases = ['haskell', 'hs']
|
| 36 |
+
filenames = ['*.hs']
|
| 37 |
+
mimetypes = ['text/x-haskell']
|
| 38 |
+
|
| 39 |
+
flags = re.MULTILINE | re.UNICODE
|
| 40 |
+
|
| 41 |
+
reserved = ('case', 'class', 'data', 'default', 'deriving', 'do', 'else',
|
| 42 |
+
'family', 'if', 'in', 'infix[lr]?', 'instance',
|
| 43 |
+
'let', 'newtype', 'of', 'then', 'type', 'where', '_')
|
| 44 |
+
ascii = ('NUL', 'SOH', '[SE]TX', 'EOT', 'ENQ', 'ACK',
|
| 45 |
+
'BEL', 'BS', 'HT', 'LF', 'VT', 'FF', 'CR', 'S[OI]', 'DLE',
|
| 46 |
+
'DC[1-4]', 'NAK', 'SYN', 'ETB', 'CAN',
|
| 47 |
+
'EM', 'SUB', 'ESC', '[FGRU]S', 'SP', 'DEL')
|
| 48 |
+
|
| 49 |
+
tokens = {
|
| 50 |
+
'root': [
|
| 51 |
+
# Whitespace:
|
| 52 |
+
(r'\s+', Text),
|
| 53 |
+
# (r'--\s*|.*$', Comment.Doc),
|
| 54 |
+
(r'--(?![!#$%&*+./<=>?@^|_~:\\]).*?$', Comment.Single),
|
| 55 |
+
(r'\{-', Comment.Multiline, 'comment'),
|
| 56 |
+
# Lexemes:
|
| 57 |
+
# Identifiers
|
| 58 |
+
(r'\bimport\b', Keyword.Reserved, 'import'),
|
| 59 |
+
(r'\bmodule\b', Keyword.Reserved, 'module'),
|
| 60 |
+
(r'\berror\b', Name.Exception),
|
| 61 |
+
(r'\b(%s)(?!\')\b' % '|'.join(reserved), Keyword.Reserved),
|
| 62 |
+
(r"'[^\\]'", String.Char), # this has to come before the TH quote
|
| 63 |
+
(r'^[_' + uni.Ll + r'][\w\']*', Name.Function),
|
| 64 |
+
(r"'?[_" + uni.Ll + r"][\w']*", Name),
|
| 65 |
+
(r"('')?[" + uni.Lu + r"][\w\']*", Keyword.Type),
|
| 66 |
+
(r"(')[" + uni.Lu + r"][\w\']*", Keyword.Type),
|
| 67 |
+
(r"(')\[[^\]]*\]", Keyword.Type), # tuples and lists get special treatment in GHC
|
| 68 |
+
(r"(')\([^)]*\)", Keyword.Type), # ..
|
| 69 |
+
# Operators
|
| 70 |
+
(r'\\(?![:!#$%&*+.\\/<=>?@^|~-]+)', Name.Function), # lambda operator
|
| 71 |
+
(r'(<-|::|->|=>|=)(?![:!#$%&*+.\\/<=>?@^|~-]+)', Operator.Word), # specials
|
| 72 |
+
(r':[:!#$%&*+.\\/<=>?@^|~-]*', Keyword.Type), # Constructor operators
|
| 73 |
+
(r'[:!#$%&*+.\\/<=>?@^|~-]+', Operator), # Other operators
|
| 74 |
+
# Numbers
|
| 75 |
+
(r'\d+[eE][+-]?\d+', Number.Float),
|
| 76 |
+
(r'\d+\.\d+([eE][+-]?\d+)?', Number.Float),
|
| 77 |
+
(r'0[oO][0-7]+', Number.Oct),
|
| 78 |
+
(r'0[xX][\da-fA-F]+', Number.Hex),
|
| 79 |
+
(r'\d+', Number.Integer),
|
| 80 |
+
# Character/String Literals
|
| 81 |
+
(r"'", String.Char, 'character'),
|
| 82 |
+
(r'"', String, 'string'),
|
| 83 |
+
# Special
|
| 84 |
+
(r'\[\]', Keyword.Type),
|
| 85 |
+
(r'\(\)', Name.Builtin),
|
| 86 |
+
(r'[][(),;`{}]', Punctuation),
|
| 87 |
+
],
|
| 88 |
+
'import': [
|
| 89 |
+
# Import statements
|
| 90 |
+
(r'\s+', Text),
|
| 91 |
+
(r'"', String, 'string'),
|
| 92 |
+
# after "funclist" state
|
| 93 |
+
(r'\)', Punctuation, '#pop'),
|
| 94 |
+
(r'qualified\b', Keyword),
|
| 95 |
+
# import X as Y
|
| 96 |
+
(r'([' + uni.Lu + r'][\w.]*)(\s+)(as)(\s+)([' + uni.Lu + r'][\w.]*)',
|
| 97 |
+
bygroups(Name.Namespace, Text, Keyword, Text, Name), '#pop'),
|
| 98 |
+
# import X hiding (functions)
|
| 99 |
+
(r'([' + uni.Lu + r'][\w.]*)(\s+)(hiding)(\s+)(\()',
|
| 100 |
+
bygroups(Name.Namespace, Text, Keyword, Text, Punctuation), 'funclist'),
|
| 101 |
+
# import X (functions)
|
| 102 |
+
(r'([' + uni.Lu + r'][\w.]*)(\s+)(\()',
|
| 103 |
+
bygroups(Name.Namespace, Text, Punctuation), 'funclist'),
|
| 104 |
+
# import X
|
| 105 |
+
(r'[\w.]+', Name.Namespace, '#pop'),
|
| 106 |
+
],
|
| 107 |
+
'module': [
|
| 108 |
+
(r'\s+', Text),
|
| 109 |
+
(r'([' + uni.Lu + r'][\w.]*)(\s+)(\()',
|
| 110 |
+
bygroups(Name.Namespace, Text, Punctuation), 'funclist'),
|
| 111 |
+
(r'[' + uni.Lu + r'][\w.]*', Name.Namespace, '#pop'),
|
| 112 |
+
],
|
| 113 |
+
'funclist': [
|
| 114 |
+
(r'\s+', Text),
|
| 115 |
+
(r'[' + uni.Lu + r']\w*', Keyword.Type),
|
| 116 |
+
(r'(_[\w\']+|[' + uni.Ll + r'][\w\']*)', Name.Function),
|
| 117 |
+
(r'--(?![!#$%&*+./<=>?@^|_~:\\]).*?$', Comment.Single),
|
| 118 |
+
(r'\{-', Comment.Multiline, 'comment'),
|
| 119 |
+
(r',', Punctuation),
|
| 120 |
+
(r'[:!#$%&*+.\\/<=>?@^|~-]+', Operator),
|
| 121 |
+
# (HACK, but it makes sense to push two instances, believe me)
|
| 122 |
+
(r'\(', Punctuation, ('funclist', 'funclist')),
|
| 123 |
+
(r'\)', Punctuation, '#pop:2'),
|
| 124 |
+
],
|
| 125 |
+
# NOTE: the next four states are shared in the AgdaLexer; make sure
|
| 126 |
+
# any change is compatible with Agda as well or copy over and change
|
| 127 |
+
'comment': [
|
| 128 |
+
# Multiline Comments
|
| 129 |
+
(r'[^-{}]+', Comment.Multiline),
|
| 130 |
+
(r'\{-', Comment.Multiline, '#push'),
|
| 131 |
+
(r'-\}', Comment.Multiline, '#pop'),
|
| 132 |
+
(r'[-{}]', Comment.Multiline),
|
| 133 |
+
],
|
| 134 |
+
'character': [
|
| 135 |
+
# Allows multi-chars, incorrectly.
|
| 136 |
+
(r"[^\\']'", String.Char, '#pop'),
|
| 137 |
+
(r"\\", String.Escape, 'escape'),
|
| 138 |
+
("'", String.Char, '#pop'),
|
| 139 |
+
],
|
| 140 |
+
'string': [
|
| 141 |
+
(r'[^\\"]+', String),
|
| 142 |
+
(r"\\", String.Escape, 'escape'),
|
| 143 |
+
('"', String, '#pop'),
|
| 144 |
+
],
|
| 145 |
+
'escape': [
|
| 146 |
+
(r'[abfnrtv"\'&\\]', String.Escape, '#pop'),
|
| 147 |
+
(r'\^[][' + uni.Lu + r'@^_]', String.Escape, '#pop'),
|
| 148 |
+
('|'.join(ascii), String.Escape, '#pop'),
|
| 149 |
+
(r'o[0-7]+', String.Escape, '#pop'),
|
| 150 |
+
(r'x[\da-fA-F]+', String.Escape, '#pop'),
|
| 151 |
+
(r'\d+', String.Escape, '#pop'),
|
| 152 |
+
(r'\s+\\', String.Escape, '#pop'),
|
| 153 |
+
],
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
class IdrisLexer(RegexLexer):
|
| 158 |
+
"""
|
| 159 |
+
A lexer for the dependently typed programming language Idris.
|
| 160 |
+
|
| 161 |
+
Based on the Haskell and Agda Lexer.
|
| 162 |
+
|
| 163 |
+
.. versionadded:: 2.0
|
| 164 |
+
"""
|
| 165 |
+
name = 'Idris'
|
| 166 |
+
aliases = ['idris', 'idr']
|
| 167 |
+
filenames = ['*.idr']
|
| 168 |
+
mimetypes = ['text/x-idris']
|
| 169 |
+
|
| 170 |
+
reserved = ('case', 'class', 'data', 'default', 'using', 'do', 'else',
|
| 171 |
+
'if', 'in', 'infix[lr]?', 'instance', 'rewrite', 'auto',
|
| 172 |
+
'namespace', 'codata', 'mutual', 'private', 'public', 'abstract',
|
| 173 |
+
'total', 'partial',
|
| 174 |
+
'let', 'proof', 'of', 'then', 'static', 'where', '_', 'with',
|
| 175 |
+
'pattern', 'term', 'syntax', 'prefix',
|
| 176 |
+
'postulate', 'parameters', 'record', 'dsl', 'impossible', 'implicit',
|
| 177 |
+
'tactics', 'intros', 'intro', 'compute', 'refine', 'exact', 'trivial')
|
| 178 |
+
|
| 179 |
+
ascii = ('NUL', 'SOH', '[SE]TX', 'EOT', 'ENQ', 'ACK',
|
| 180 |
+
'BEL', 'BS', 'HT', 'LF', 'VT', 'FF', 'CR', 'S[OI]', 'DLE',
|
| 181 |
+
'DC[1-4]', 'NAK', 'SYN', 'ETB', 'CAN',
|
| 182 |
+
'EM', 'SUB', 'ESC', '[FGRU]S', 'SP', 'DEL')
|
| 183 |
+
|
| 184 |
+
directives = ('lib', 'link', 'flag', 'include', 'hide', 'freeze', 'access',
|
| 185 |
+
'default', 'logging', 'dynamic', 'name', 'error_handlers', 'language')
|
| 186 |
+
|
| 187 |
+
tokens = {
|
| 188 |
+
'root': [
|
| 189 |
+
# Comments
|
| 190 |
+
(r'^(\s*)(%%%s)' % '|'.join(directives),
|
| 191 |
+
bygroups(Text, Keyword.Reserved)),
|
| 192 |
+
(r'(\s*)(--(?![!#$%&*+./<=>?@^|_~:\\]).*?)$', bygroups(Text, Comment.Single)),
|
| 193 |
+
(r'(\s*)(\|{3}.*?)$', bygroups(Text, Comment.Single)),
|
| 194 |
+
(r'(\s*)(\{-)', bygroups(Text, Comment.Multiline), 'comment'),
|
| 195 |
+
# Declaration
|
| 196 |
+
(r'^(\s*)([^\s(){}]+)(\s*)(:)(\s*)',
|
| 197 |
+
bygroups(Text, Name.Function, Text, Operator.Word, Text)),
|
| 198 |
+
# Identifiers
|
| 199 |
+
(r'\b(%s)(?!\')\b' % '|'.join(reserved), Keyword.Reserved),
|
| 200 |
+
(r'(import|module)(\s+)', bygroups(Keyword.Reserved, Text), 'module'),
|
| 201 |
+
(r"('')?[A-Z][\w\']*", Keyword.Type),
|
| 202 |
+
(r'[a-z][\w\']*', Text),
|
| 203 |
+
# Special Symbols
|
| 204 |
+
(r'(<-|::|->|=>|=)', Operator.Word), # specials
|
| 205 |
+
(r'([(){}\[\]:!#$%&*+.\\/<=>?@^|~-]+)', Operator.Word), # specials
|
| 206 |
+
# Numbers
|
| 207 |
+
(r'\d+[eE][+-]?\d+', Number.Float),
|
| 208 |
+
(r'\d+\.\d+([eE][+-]?\d+)?', Number.Float),
|
| 209 |
+
(r'0[xX][\da-fA-F]+', Number.Hex),
|
| 210 |
+
(r'\d+', Number.Integer),
|
| 211 |
+
# Strings
|
| 212 |
+
(r"'", String.Char, 'character'),
|
| 213 |
+
(r'"', String, 'string'),
|
| 214 |
+
(r'[^\s(){}]+', Text),
|
| 215 |
+
(r'\s+?', Text), # Whitespace
|
| 216 |
+
],
|
| 217 |
+
'module': [
|
| 218 |
+
(r'\s+', Text),
|
| 219 |
+
(r'([A-Z][\w.]*)(\s+)(\()',
|
| 220 |
+
bygroups(Name.Namespace, Text, Punctuation), 'funclist'),
|
| 221 |
+
(r'[A-Z][\w.]*', Name.Namespace, '#pop'),
|
| 222 |
+
],
|
| 223 |
+
'funclist': [
|
| 224 |
+
(r'\s+', Text),
|
| 225 |
+
(r'[A-Z]\w*', Keyword.Type),
|
| 226 |
+
(r'(_[\w\']+|[a-z][\w\']*)', Name.Function),
|
| 227 |
+
(r'--.*$', Comment.Single),
|
| 228 |
+
(r'\{-', Comment.Multiline, 'comment'),
|
| 229 |
+
(r',', Punctuation),
|
| 230 |
+
(r'[:!#$%&*+.\\/<=>?@^|~-]+', Operator),
|
| 231 |
+
# (HACK, but it makes sense to push two instances, believe me)
|
| 232 |
+
(r'\(', Punctuation, ('funclist', 'funclist')),
|
| 233 |
+
(r'\)', Punctuation, '#pop:2'),
|
| 234 |
+
],
|
| 235 |
+
# NOTE: the next four states are shared in the AgdaLexer; make sure
|
| 236 |
+
# any change is compatible with Agda as well or copy over and change
|
| 237 |
+
'comment': [
|
| 238 |
+
# Multiline Comments
|
| 239 |
+
(r'[^-{}]+', Comment.Multiline),
|
| 240 |
+
(r'\{-', Comment.Multiline, '#push'),
|
| 241 |
+
(r'-\}', Comment.Multiline, '#pop'),
|
| 242 |
+
(r'[-{}]', Comment.Multiline),
|
| 243 |
+
],
|
| 244 |
+
'character': [
|
| 245 |
+
# Allows multi-chars, incorrectly.
|
| 246 |
+
(r"[^\\']", String.Char),
|
| 247 |
+
(r"\\", String.Escape, 'escape'),
|
| 248 |
+
("'", String.Char, '#pop'),
|
| 249 |
+
],
|
| 250 |
+
'string': [
|
| 251 |
+
(r'[^\\"]+', String),
|
| 252 |
+
(r"\\", String.Escape, 'escape'),
|
| 253 |
+
('"', String, '#pop'),
|
| 254 |
+
],
|
| 255 |
+
'escape': [
|
| 256 |
+
(r'[abfnrtv"\'&\\]', String.Escape, '#pop'),
|
| 257 |
+
(r'\^[][A-Z@^_]', String.Escape, '#pop'),
|
| 258 |
+
('|'.join(ascii), String.Escape, '#pop'),
|
| 259 |
+
(r'o[0-7]+', String.Escape, '#pop'),
|
| 260 |
+
(r'x[\da-fA-F]+', String.Escape, '#pop'),
|
| 261 |
+
(r'\d+', String.Escape, '#pop'),
|
| 262 |
+
(r'\s+\\', String.Escape, '#pop')
|
| 263 |
+
],
|
| 264 |
+
}
|
| 265 |
+
|
| 266 |
+
|
| 267 |
+
class AgdaLexer(RegexLexer):
|
| 268 |
+
"""
|
| 269 |
+
For the `Agda <http://wiki.portal.chalmers.se/agda/pmwiki.php>`_
|
| 270 |
+
dependently typed functional programming language and proof assistant.
|
| 271 |
+
|
| 272 |
+
.. versionadded:: 2.0
|
| 273 |
+
"""
|
| 274 |
+
|
| 275 |
+
name = 'Agda'
|
| 276 |
+
aliases = ['agda']
|
| 277 |
+
filenames = ['*.agda']
|
| 278 |
+
mimetypes = ['text/x-agda']
|
| 279 |
+
|
| 280 |
+
reserved = ['abstract', 'codata', 'coinductive', 'constructor', 'data',
|
| 281 |
+
'field', 'forall', 'hiding', 'in', 'inductive', 'infix',
|
| 282 |
+
'infixl', 'infixr', 'instance', 'let', 'mutual', 'open',
|
| 283 |
+
'pattern', 'postulate', 'primitive', 'private',
|
| 284 |
+
'quote', 'quoteGoal', 'quoteTerm',
|
| 285 |
+
'record', 'renaming', 'rewrite', 'syntax', 'tactic',
|
| 286 |
+
'unquote', 'unquoteDecl', 'using', 'where', 'with']
|
| 287 |
+
|
| 288 |
+
tokens = {
|
| 289 |
+
'root': [
|
| 290 |
+
# Declaration
|
| 291 |
+
(r'^(\s*)([^\s(){}]+)(\s*)(:)(\s*)',
|
| 292 |
+
bygroups(Text, Name.Function, Text, Operator.Word, Text)),
|
| 293 |
+
# Comments
|
| 294 |
+
(r'--(?![!#$%&*+./<=>?@^|_~:\\]).*?$', Comment.Single),
|
| 295 |
+
(r'\{-', Comment.Multiline, 'comment'),
|
| 296 |
+
# Holes
|
| 297 |
+
(r'\{!', Comment.Directive, 'hole'),
|
| 298 |
+
# Lexemes:
|
| 299 |
+
# Identifiers
|
| 300 |
+
(r'\b(%s)(?!\')\b' % '|'.join(reserved), Keyword.Reserved),
|
| 301 |
+
(r'(import|module)(\s+)', bygroups(Keyword.Reserved, Text), 'module'),
|
| 302 |
+
(r'\b(Set|Prop)\b', Keyword.Type),
|
| 303 |
+
# Special Symbols
|
| 304 |
+
(r'(\(|\)|\{|\})', Operator),
|
| 305 |
+
(u'(\\.{1,3}|\\||\u039B|\u2200|\u2192|:|=|->)', Operator.Word),
|
| 306 |
+
# Numbers
|
| 307 |
+
(r'\d+[eE][+-]?\d+', Number.Float),
|
| 308 |
+
(r'\d+\.\d+([eE][+-]?\d+)?', Number.Float),
|
| 309 |
+
(r'0[xX][\da-fA-F]+', Number.Hex),
|
| 310 |
+
(r'\d+', Number.Integer),
|
| 311 |
+
# Strings
|
| 312 |
+
(r"'", String.Char, 'character'),
|
| 313 |
+
(r'"', String, 'string'),
|
| 314 |
+
(r'[^\s(){}]+', Text),
|
| 315 |
+
(r'\s+?', Text), # Whitespace
|
| 316 |
+
],
|
| 317 |
+
'hole': [
|
| 318 |
+
# Holes
|
| 319 |
+
(r'[^!{}]+', Comment.Directive),
|
| 320 |
+
(r'\{!', Comment.Directive, '#push'),
|
| 321 |
+
(r'!\}', Comment.Directive, '#pop'),
|
| 322 |
+
(r'[!{}]', Comment.Directive),
|
| 323 |
+
],
|
| 324 |
+
'module': [
|
| 325 |
+
(r'\{-', Comment.Multiline, 'comment'),
|
| 326 |
+
(r'[a-zA-Z][\w.]*', Name, '#pop'),
|
| 327 |
+
(r'[\W0-9_]+', Text)
|
| 328 |
+
],
|
| 329 |
+
'comment': HaskellLexer.tokens['comment'],
|
| 330 |
+
'character': HaskellLexer.tokens['character'],
|
| 331 |
+
'string': HaskellLexer.tokens['string'],
|
| 332 |
+
'escape': HaskellLexer.tokens['escape']
|
| 333 |
+
}
|
| 334 |
+
|
| 335 |
+
|
| 336 |
+
class CryptolLexer(RegexLexer):
|
| 337 |
+
"""
|
| 338 |
+
FIXME: A Cryptol2 lexer based on the lexemes defined in the Haskell 98 Report.
|
| 339 |
+
|
| 340 |
+
.. versionadded:: 2.0
|
| 341 |
+
"""
|
| 342 |
+
name = 'Cryptol'
|
| 343 |
+
aliases = ['cryptol', 'cry']
|
| 344 |
+
filenames = ['*.cry']
|
| 345 |
+
mimetypes = ['text/x-cryptol']
|
| 346 |
+
|
| 347 |
+
reserved = ('Arith', 'Bit', 'Cmp', 'False', 'Inf', 'True', 'else',
|
| 348 |
+
'export', 'extern', 'fin', 'if', 'import', 'inf', 'lg2',
|
| 349 |
+
'max', 'min', 'module', 'newtype', 'pragma', 'property',
|
| 350 |
+
'then', 'type', 'where', 'width')
|
| 351 |
+
ascii = ('NUL', 'SOH', '[SE]TX', 'EOT', 'ENQ', 'ACK',
|
| 352 |
+
'BEL', 'BS', 'HT', 'LF', 'VT', 'FF', 'CR', 'S[OI]', 'DLE',
|
| 353 |
+
'DC[1-4]', 'NAK', 'SYN', 'ETB', 'CAN',
|
| 354 |
+
'EM', 'SUB', 'ESC', '[FGRU]S', 'SP', 'DEL')
|
| 355 |
+
|
| 356 |
+
tokens = {
|
| 357 |
+
'root': [
|
| 358 |
+
# Whitespace:
|
| 359 |
+
(r'\s+', Text),
|
| 360 |
+
# (r'--\s*|.*$', Comment.Doc),
|
| 361 |
+
(r'//.*$', Comment.Single),
|
| 362 |
+
(r'/\*', Comment.Multiline, 'comment'),
|
| 363 |
+
# Lexemes:
|
| 364 |
+
# Identifiers
|
| 365 |
+
(r'\bimport\b', Keyword.Reserved, 'import'),
|
| 366 |
+
(r'\bmodule\b', Keyword.Reserved, 'module'),
|
| 367 |
+
(r'\berror\b', Name.Exception),
|
| 368 |
+
(r'\b(%s)(?!\')\b' % '|'.join(reserved), Keyword.Reserved),
|
| 369 |
+
(r'^[_a-z][\w\']*', Name.Function),
|
| 370 |
+
(r"'?[_a-z][\w']*", Name),
|
| 371 |
+
(r"('')?[A-Z][\w\']*", Keyword.Type),
|
| 372 |
+
# Operators
|
| 373 |
+
(r'\\(?![:!#$%&*+.\\/<=>?@^|~-]+)', Name.Function), # lambda operator
|
| 374 |
+
(r'(<-|::|->|=>|=)(?![:!#$%&*+.\\/<=>?@^|~-]+)', Operator.Word), # specials
|
| 375 |
+
(r':[:!#$%&*+.\\/<=>?@^|~-]*', Keyword.Type), # Constructor operators
|
| 376 |
+
(r'[:!#$%&*+.\\/<=>?@^|~-]+', Operator), # Other operators
|
| 377 |
+
# Numbers
|
| 378 |
+
(r'\d+[eE][+-]?\d+', Number.Float),
|
| 379 |
+
(r'\d+\.\d+([eE][+-]?\d+)?', Number.Float),
|
| 380 |
+
(r'0[oO][0-7]+', Number.Oct),
|
| 381 |
+
(r'0[xX][\da-fA-F]+', Number.Hex),
|
| 382 |
+
(r'\d+', Number.Integer),
|
| 383 |
+
# Character/String Literals
|
| 384 |
+
(r"'", String.Char, 'character'),
|
| 385 |
+
(r'"', String, 'string'),
|
| 386 |
+
# Special
|
| 387 |
+
(r'\[\]', Keyword.Type),
|
| 388 |
+
(r'\(\)', Name.Builtin),
|
| 389 |
+
(r'[][(),;`{}]', Punctuation),
|
| 390 |
+
],
|
| 391 |
+
'import': [
|
| 392 |
+
# Import statements
|
| 393 |
+
(r'\s+', Text),
|
| 394 |
+
(r'"', String, 'string'),
|
| 395 |
+
# after "funclist" state
|
| 396 |
+
(r'\)', Punctuation, '#pop'),
|
| 397 |
+
(r'qualified\b', Keyword),
|
| 398 |
+
# import X as Y
|
| 399 |
+
(r'([A-Z][\w.]*)(\s+)(as)(\s+)([A-Z][\w.]*)',
|
| 400 |
+
bygroups(Name.Namespace, Text, Keyword, Text, Name), '#pop'),
|
| 401 |
+
# import X hiding (functions)
|
| 402 |
+
(r'([A-Z][\w.]*)(\s+)(hiding)(\s+)(\()',
|
| 403 |
+
bygroups(Name.Namespace, Text, Keyword, Text, Punctuation), 'funclist'),
|
| 404 |
+
# import X (functions)
|
| 405 |
+
(r'([A-Z][\w.]*)(\s+)(\()',
|
| 406 |
+
bygroups(Name.Namespace, Text, Punctuation), 'funclist'),
|
| 407 |
+
# import X
|
| 408 |
+
(r'[\w.]+', Name.Namespace, '#pop'),
|
| 409 |
+
],
|
| 410 |
+
'module': [
|
| 411 |
+
(r'\s+', Text),
|
| 412 |
+
(r'([A-Z][\w.]*)(\s+)(\()',
|
| 413 |
+
bygroups(Name.Namespace, Text, Punctuation), 'funclist'),
|
| 414 |
+
(r'[A-Z][\w.]*', Name.Namespace, '#pop'),
|
| 415 |
+
],
|
| 416 |
+
'funclist': [
|
| 417 |
+
(r'\s+', Text),
|
| 418 |
+
(r'[A-Z]\w*', Keyword.Type),
|
| 419 |
+
(r'(_[\w\']+|[a-z][\w\']*)', Name.Function),
|
| 420 |
+
# TODO: these don't match the comments in docs, remove.
|
| 421 |
+
#(r'--(?![!#$%&*+./<=>?@^|_~:\\]).*?$', Comment.Single),
|
| 422 |
+
#(r'{-', Comment.Multiline, 'comment'),
|
| 423 |
+
(r',', Punctuation),
|
| 424 |
+
(r'[:!#$%&*+.\\/<=>?@^|~-]+', Operator),
|
| 425 |
+
# (HACK, but it makes sense to push two instances, believe me)
|
| 426 |
+
(r'\(', Punctuation, ('funclist', 'funclist')),
|
| 427 |
+
(r'\)', Punctuation, '#pop:2'),
|
| 428 |
+
],
|
| 429 |
+
'comment': [
|
| 430 |
+
# Multiline Comments
|
| 431 |
+
(r'[^/*]+', Comment.Multiline),
|
| 432 |
+
(r'/\*', Comment.Multiline, '#push'),
|
| 433 |
+
(r'\*/', Comment.Multiline, '#pop'),
|
| 434 |
+
(r'[*/]', Comment.Multiline),
|
| 435 |
+
],
|
| 436 |
+
'character': [
|
| 437 |
+
# Allows multi-chars, incorrectly.
|
| 438 |
+
(r"[^\\']'", String.Char, '#pop'),
|
| 439 |
+
(r"\\", String.Escape, 'escape'),
|
| 440 |
+
("'", String.Char, '#pop'),
|
| 441 |
+
],
|
| 442 |
+
'string': [
|
| 443 |
+
(r'[^\\"]+', String),
|
| 444 |
+
(r"\\", String.Escape, 'escape'),
|
| 445 |
+
('"', String, '#pop'),
|
| 446 |
+
],
|
| 447 |
+
'escape': [
|
| 448 |
+
(r'[abfnrtv"\'&\\]', String.Escape, '#pop'),
|
| 449 |
+
(r'\^[][A-Z@^_]', String.Escape, '#pop'),
|
| 450 |
+
('|'.join(ascii), String.Escape, '#pop'),
|
| 451 |
+
(r'o[0-7]+', String.Escape, '#pop'),
|
| 452 |
+
(r'x[\da-fA-F]+', String.Escape, '#pop'),
|
| 453 |
+
(r'\d+', String.Escape, '#pop'),
|
| 454 |
+
(r'\s+\\', String.Escape, '#pop'),
|
| 455 |
+
],
|
| 456 |
+
}
|
| 457 |
+
|
| 458 |
+
EXTRA_KEYWORDS = set(('join', 'split', 'reverse', 'transpose', 'width',
|
| 459 |
+
'length', 'tail', '<<', '>>', '<<<', '>>>', 'const',
|
| 460 |
+
'reg', 'par', 'seq', 'ASSERT', 'undefined', 'error',
|
| 461 |
+
'trace'))
|
| 462 |
+
|
| 463 |
+
def get_tokens_unprocessed(self, text):
|
| 464 |
+
stack = ['root']
|
| 465 |
+
for index, token, value in \
|
| 466 |
+
RegexLexer.get_tokens_unprocessed(self, text, stack):
|
| 467 |
+
if token is Name and value in self.EXTRA_KEYWORDS:
|
| 468 |
+
yield index, Name.Builtin, value
|
| 469 |
+
else:
|
| 470 |
+
yield index, token, value
|
| 471 |
+
|
| 472 |
+
|
| 473 |
+
class LiterateLexer(Lexer):
|
| 474 |
+
"""
|
| 475 |
+
Base class for lexers of literate file formats based on LaTeX or Bird-style
|
| 476 |
+
(prefixing each code line with ">").
|
| 477 |
+
|
| 478 |
+
Additional options accepted:
|
| 479 |
+
|
| 480 |
+
`litstyle`
|
| 481 |
+
If given, must be ``"bird"`` or ``"latex"``. If not given, the style
|
| 482 |
+
is autodetected: if the first non-whitespace character in the source
|
| 483 |
+
is a backslash or percent character, LaTeX is assumed, else Bird.
|
| 484 |
+
"""
|
| 485 |
+
|
| 486 |
+
bird_re = re.compile(r'(>[ \t]*)(.*\n)')
|
| 487 |
+
|
| 488 |
+
def __init__(self, baselexer, **options):
|
| 489 |
+
self.baselexer = baselexer
|
| 490 |
+
Lexer.__init__(self, **options)
|
| 491 |
+
|
| 492 |
+
def get_tokens_unprocessed(self, text):
|
| 493 |
+
style = self.options.get('litstyle')
|
| 494 |
+
if style is None:
|
| 495 |
+
style = (text.lstrip()[0:1] in '%\\') and 'latex' or 'bird'
|
| 496 |
+
|
| 497 |
+
code = ''
|
| 498 |
+
insertions = []
|
| 499 |
+
if style == 'bird':
|
| 500 |
+
# bird-style
|
| 501 |
+
for match in line_re.finditer(text):
|
| 502 |
+
line = match.group()
|
| 503 |
+
m = self.bird_re.match(line)
|
| 504 |
+
if m:
|
| 505 |
+
insertions.append((len(code),
|
| 506 |
+
[(0, Comment.Special, m.group(1))]))
|
| 507 |
+
code += m.group(2)
|
| 508 |
+
else:
|
| 509 |
+
insertions.append((len(code), [(0, Text, line)]))
|
| 510 |
+
else:
|
| 511 |
+
# latex-style
|
| 512 |
+
from pygments.lexers.markup import TexLexer
|
| 513 |
+
lxlexer = TexLexer(**self.options)
|
| 514 |
+
codelines = 0
|
| 515 |
+
latex = ''
|
| 516 |
+
for match in line_re.finditer(text):
|
| 517 |
+
line = match.group()
|
| 518 |
+
if codelines:
|
| 519 |
+
if line.lstrip().startswith('\\end{code}'):
|
| 520 |
+
codelines = 0
|
| 521 |
+
latex += line
|
| 522 |
+
else:
|
| 523 |
+
code += line
|
| 524 |
+
elif line.lstrip().startswith('\\begin{code}'):
|
| 525 |
+
codelines = 1
|
| 526 |
+
latex += line
|
| 527 |
+
insertions.append((len(code),
|
| 528 |
+
list(lxlexer.get_tokens_unprocessed(latex))))
|
| 529 |
+
latex = ''
|
| 530 |
+
else:
|
| 531 |
+
latex += line
|
| 532 |
+
insertions.append((len(code),
|
| 533 |
+
list(lxlexer.get_tokens_unprocessed(latex))))
|
| 534 |
+
for item in do_insertions(insertions, self.baselexer.get_tokens_unprocessed(code)):
|
| 535 |
+
yield item
|
| 536 |
+
|
| 537 |
+
|
| 538 |
+
class LiterateHaskellLexer(LiterateLexer):
|
| 539 |
+
"""
|
| 540 |
+
For Literate Haskell (Bird-style or LaTeX) source.
|
| 541 |
+
|
| 542 |
+
Additional options accepted:
|
| 543 |
+
|
| 544 |
+
`litstyle`
|
| 545 |
+
If given, must be ``"bird"`` or ``"latex"``. If not given, the style
|
| 546 |
+
is autodetected: if the first non-whitespace character in the source
|
| 547 |
+
is a backslash or percent character, LaTeX is assumed, else Bird.
|
| 548 |
+
|
| 549 |
+
.. versionadded:: 0.9
|
| 550 |
+
"""
|
| 551 |
+
name = 'Literate Haskell'
|
| 552 |
+
aliases = ['lhs', 'literate-haskell', 'lhaskell']
|
| 553 |
+
filenames = ['*.lhs']
|
| 554 |
+
mimetypes = ['text/x-literate-haskell']
|
| 555 |
+
|
| 556 |
+
def __init__(self, **options):
|
| 557 |
+
hslexer = HaskellLexer(**options)
|
| 558 |
+
LiterateLexer.__init__(self, hslexer, **options)
|
| 559 |
+
|
| 560 |
+
|
| 561 |
+
class LiterateIdrisLexer(LiterateLexer):
|
| 562 |
+
"""
|
| 563 |
+
For Literate Idris (Bird-style or LaTeX) source.
|
| 564 |
+
|
| 565 |
+
Additional options accepted:
|
| 566 |
+
|
| 567 |
+
`litstyle`
|
| 568 |
+
If given, must be ``"bird"`` or ``"latex"``. If not given, the style
|
| 569 |
+
is autodetected: if the first non-whitespace character in the source
|
| 570 |
+
is a backslash or percent character, LaTeX is assumed, else Bird.
|
| 571 |
+
|
| 572 |
+
.. versionadded:: 2.0
|
| 573 |
+
"""
|
| 574 |
+
name = 'Literate Idris'
|
| 575 |
+
aliases = ['lidr', 'literate-idris', 'lidris']
|
| 576 |
+
filenames = ['*.lidr']
|
| 577 |
+
mimetypes = ['text/x-literate-idris']
|
| 578 |
+
|
| 579 |
+
def __init__(self, **options):
|
| 580 |
+
hslexer = IdrisLexer(**options)
|
| 581 |
+
LiterateLexer.__init__(self, hslexer, **options)
|
| 582 |
+
|
| 583 |
+
|
| 584 |
+
class LiterateAgdaLexer(LiterateLexer):
|
| 585 |
+
"""
|
| 586 |
+
For Literate Agda source.
|
| 587 |
+
|
| 588 |
+
Additional options accepted:
|
| 589 |
+
|
| 590 |
+
`litstyle`
|
| 591 |
+
If given, must be ``"bird"`` or ``"latex"``. If not given, the style
|
| 592 |
+
is autodetected: if the first non-whitespace character in the source
|
| 593 |
+
is a backslash or percent character, LaTeX is assumed, else Bird.
|
| 594 |
+
|
| 595 |
+
.. versionadded:: 2.0
|
| 596 |
+
"""
|
| 597 |
+
name = 'Literate Agda'
|
| 598 |
+
aliases = ['lagda', 'literate-agda']
|
| 599 |
+
filenames = ['*.lagda']
|
| 600 |
+
mimetypes = ['text/x-literate-agda']
|
| 601 |
+
|
| 602 |
+
def __init__(self, **options):
|
| 603 |
+
agdalexer = AgdaLexer(**options)
|
| 604 |
+
LiterateLexer.__init__(self, agdalexer, litstyle='latex', **options)
|
| 605 |
+
|
| 606 |
+
|
| 607 |
+
class LiterateCryptolLexer(LiterateLexer):
|
| 608 |
+
"""
|
| 609 |
+
For Literate Cryptol (Bird-style or LaTeX) source.
|
| 610 |
+
|
| 611 |
+
Additional options accepted:
|
| 612 |
+
|
| 613 |
+
`litstyle`
|
| 614 |
+
If given, must be ``"bird"`` or ``"latex"``. If not given, the style
|
| 615 |
+
is autodetected: if the first non-whitespace character in the source
|
| 616 |
+
is a backslash or percent character, LaTeX is assumed, else Bird.
|
| 617 |
+
|
| 618 |
+
.. versionadded:: 2.0
|
| 619 |
+
"""
|
| 620 |
+
name = 'Literate Cryptol'
|
| 621 |
+
aliases = ['lcry', 'literate-cryptol', 'lcryptol']
|
| 622 |
+
filenames = ['*.lcry']
|
| 623 |
+
mimetypes = ['text/x-literate-cryptol']
|
| 624 |
+
|
| 625 |
+
def __init__(self, **options):
|
| 626 |
+
crylexer = CryptolLexer(**options)
|
| 627 |
+
LiterateLexer.__init__(self, crylexer, **options)
|
| 628 |
+
|
| 629 |
+
|
| 630 |
+
class KokaLexer(RegexLexer):
|
| 631 |
+
"""
|
| 632 |
+
Lexer for the `Koka <http://koka.codeplex.com>`_
|
| 633 |
+
language.
|
| 634 |
+
|
| 635 |
+
.. versionadded:: 1.6
|
| 636 |
+
"""
|
| 637 |
+
|
| 638 |
+
name = 'Koka'
|
| 639 |
+
aliases = ['koka']
|
| 640 |
+
filenames = ['*.kk', '*.kki']
|
| 641 |
+
mimetypes = ['text/x-koka']
|
| 642 |
+
|
| 643 |
+
keywords = [
|
| 644 |
+
'infix', 'infixr', 'infixl',
|
| 645 |
+
'type', 'cotype', 'rectype', 'alias',
|
| 646 |
+
'struct', 'con',
|
| 647 |
+
'fun', 'function', 'val', 'var',
|
| 648 |
+
'external',
|
| 649 |
+
'if', 'then', 'else', 'elif', 'return', 'match',
|
| 650 |
+
'private', 'public', 'private',
|
| 651 |
+
'module', 'import', 'as',
|
| 652 |
+
'include', 'inline',
|
| 653 |
+
'rec',
|
| 654 |
+
'try', 'yield', 'enum',
|
| 655 |
+
'interface', 'instance',
|
| 656 |
+
]
|
| 657 |
+
|
| 658 |
+
# keywords that are followed by a type
|
| 659 |
+
typeStartKeywords = [
|
| 660 |
+
'type', 'cotype', 'rectype', 'alias', 'struct', 'enum',
|
| 661 |
+
]
|
| 662 |
+
|
| 663 |
+
# keywords valid in a type
|
| 664 |
+
typekeywords = [
|
| 665 |
+
'forall', 'exists', 'some', 'with',
|
| 666 |
+
]
|
| 667 |
+
|
| 668 |
+
# builtin names and special names
|
| 669 |
+
builtin = [
|
| 670 |
+
'for', 'while', 'repeat',
|
| 671 |
+
'foreach', 'foreach-indexed',
|
| 672 |
+
'error', 'catch', 'finally',
|
| 673 |
+
'cs', 'js', 'file', 'ref', 'assigned',
|
| 674 |
+
]
|
| 675 |
+
|
| 676 |
+
# symbols that can be in an operator
|
| 677 |
+
symbols = r'[$%&*+@!/\\^~=.:\-?|<>]+'
|
| 678 |
+
|
| 679 |
+
# symbol boundary: an operator keyword should not be followed by any of these
|
| 680 |
+
sboundary = '(?!'+symbols+')'
|
| 681 |
+
|
| 682 |
+
# name boundary: a keyword should not be followed by any of these
|
| 683 |
+
boundary = '(?![\w/])'
|
| 684 |
+
|
| 685 |
+
# koka token abstractions
|
| 686 |
+
tokenType = Name.Attribute
|
| 687 |
+
tokenTypeDef = Name.Class
|
| 688 |
+
tokenConstructor = Generic.Emph
|
| 689 |
+
|
| 690 |
+
# main lexer
|
| 691 |
+
tokens = {
|
| 692 |
+
'root': [
|
| 693 |
+
include('whitespace'),
|
| 694 |
+
|
| 695 |
+
# go into type mode
|
| 696 |
+
(r'::?' + sboundary, tokenType, 'type'),
|
| 697 |
+
(r'(alias)(\s+)([a-z]\w*)?', bygroups(Keyword, Text, tokenTypeDef),
|
| 698 |
+
'alias-type'),
|
| 699 |
+
(r'(struct)(\s+)([a-z]\w*)?', bygroups(Keyword, Text, tokenTypeDef),
|
| 700 |
+
'struct-type'),
|
| 701 |
+
((r'(%s)' % '|'.join(typeStartKeywords)) +
|
| 702 |
+
r'(\s+)([a-z]\w*)?', bygroups(Keyword, Text, tokenTypeDef),
|
| 703 |
+
'type'),
|
| 704 |
+
|
| 705 |
+
# special sequences of tokens (we use ?: for non-capturing group as
|
| 706 |
+
# required by 'bygroups')
|
| 707 |
+
(r'(module)(\s+)(interface\s+)?((?:[a-z]\w*/)*[a-z]\w*)',
|
| 708 |
+
bygroups(Keyword, Text, Keyword, Name.Namespace)),
|
| 709 |
+
(r'(import)(\s+)((?:[a-z]\w*/)*[a-z]\w*)'
|
| 710 |
+
r'(?:(\s*)(=)(\s*)((?:qualified\s*)?)'
|
| 711 |
+
r'((?:[a-z]\w*/)*[a-z]\w*))?',
|
| 712 |
+
bygroups(Keyword, Text, Name.Namespace, Text, Keyword, Text,
|
| 713 |
+
Keyword, Name.Namespace)),
|
| 714 |
+
|
| 715 |
+
(r'(^(?:(?:public|private)\s*)?(?:function|fun|val))'
|
| 716 |
+
r'(\s+)([a-z]\w*|\((?:' + symbols + r'|/)\))',
|
| 717 |
+
bygroups(Keyword, Text, Name.Function)),
|
| 718 |
+
(r'(^(?:(?:public|private)\s*)?external)(\s+)(inline\s+)?'
|
| 719 |
+
r'([a-z]\w*|\((?:' + symbols + r'|/)\))',
|
| 720 |
+
bygroups(Keyword, Text, Keyword, Name.Function)),
|
| 721 |
+
|
| 722 |
+
# keywords
|
| 723 |
+
(r'(%s)' % '|'.join(typekeywords) + boundary, Keyword.Type),
|
| 724 |
+
(r'(%s)' % '|'.join(keywords) + boundary, Keyword),
|
| 725 |
+
(r'(%s)' % '|'.join(builtin) + boundary, Keyword.Pseudo),
|
| 726 |
+
(r'::?|:=|\->|[=.]' + sboundary, Keyword),
|
| 727 |
+
|
| 728 |
+
# names
|
| 729 |
+
(r'((?:[a-z]\w*/)*)([A-Z]\w*)',
|
| 730 |
+
bygroups(Name.Namespace, tokenConstructor)),
|
| 731 |
+
(r'((?:[a-z]\w*/)*)([a-z]\w*)', bygroups(Name.Namespace, Name)),
|
| 732 |
+
(r'((?:[a-z]\w*/)*)(\((?:' + symbols + r'|/)\))',
|
| 733 |
+
bygroups(Name.Namespace, Name)),
|
| 734 |
+
(r'_\w*', Name.Variable),
|
| 735 |
+
|
| 736 |
+
# literal string
|
| 737 |
+
(r'@"', String.Double, 'litstring'),
|
| 738 |
+
|
| 739 |
+
# operators
|
| 740 |
+
(symbols + "|/(?![*/])", Operator),
|
| 741 |
+
(r'`', Operator),
|
| 742 |
+
(r'[{}()\[\];,]', Punctuation),
|
| 743 |
+
|
| 744 |
+
# literals. No check for literal characters with len > 1
|
| 745 |
+
(r'[0-9]+\.[0-9]+([eE][\-+]?[0-9]+)?', Number.Float),
|
| 746 |
+
(r'0[xX][0-9a-fA-F]+', Number.Hex),
|
| 747 |
+
(r'[0-9]+', Number.Integer),
|
| 748 |
+
|
| 749 |
+
(r"'", String.Char, 'char'),
|
| 750 |
+
(r'"', String.Double, 'string'),
|
| 751 |
+
],
|
| 752 |
+
|
| 753 |
+
# type started by alias
|
| 754 |
+
'alias-type': [
|
| 755 |
+
(r'=', Keyword),
|
| 756 |
+
include('type')
|
| 757 |
+
],
|
| 758 |
+
|
| 759 |
+
# type started by struct
|
| 760 |
+
'struct-type': [
|
| 761 |
+
(r'(?=\((?!,*\)))', Punctuation, '#pop'),
|
| 762 |
+
include('type')
|
| 763 |
+
],
|
| 764 |
+
|
| 765 |
+
# type started by colon
|
| 766 |
+
'type': [
|
| 767 |
+
(r'[(\[<]', tokenType, 'type-nested'),
|
| 768 |
+
include('type-content')
|
| 769 |
+
],
|
| 770 |
+
|
| 771 |
+
# type nested in brackets: can contain parameters, comma etc.
|
| 772 |
+
'type-nested': [
|
| 773 |
+
(r'[)\]>]', tokenType, '#pop'),
|
| 774 |
+
(r'[(\[<]', tokenType, 'type-nested'),
|
| 775 |
+
(r',', tokenType),
|
| 776 |
+
(r'([a-z]\w*)(\s*)(:)(?!:)',
|
| 777 |
+
bygroups(Name, Text, tokenType)), # parameter name
|
| 778 |
+
include('type-content')
|
| 779 |
+
],
|
| 780 |
+
|
| 781 |
+
# shared contents of a type
|
| 782 |
+
'type-content': [
|
| 783 |
+
include('whitespace'),
|
| 784 |
+
|
| 785 |
+
# keywords
|
| 786 |
+
(r'(%s)' % '|'.join(typekeywords) + boundary, Keyword),
|
| 787 |
+
(r'(?=((%s)' % '|'.join(keywords) + boundary + '))',
|
| 788 |
+
Keyword, '#pop'), # need to match because names overlap...
|
| 789 |
+
|
| 790 |
+
# kinds
|
| 791 |
+
(r'[EPHVX]' + boundary, tokenType),
|
| 792 |
+
|
| 793 |
+
# type names
|
| 794 |
+
(r'[a-z][0-9]*(?![\w/])', tokenType),
|
| 795 |
+
(r'_\w*', tokenType.Variable), # Generic.Emph
|
| 796 |
+
(r'((?:[a-z]\w*/)*)([A-Z]\w*)',
|
| 797 |
+
bygroups(Name.Namespace, tokenType)),
|
| 798 |
+
(r'((?:[a-z]\w*/)*)([a-z]\w+)',
|
| 799 |
+
bygroups(Name.Namespace, tokenType)),
|
| 800 |
+
|
| 801 |
+
# type keyword operators
|
| 802 |
+
(r'::|->|[.:|]', tokenType),
|
| 803 |
+
|
| 804 |
+
# catchall
|
| 805 |
+
default('#pop')
|
| 806 |
+
],
|
| 807 |
+
|
| 808 |
+
# comments and literals
|
| 809 |
+
'whitespace': [
|
| 810 |
+
(r'\n\s*#.*$', Comment.Preproc),
|
| 811 |
+
(r'\s+', Text),
|
| 812 |
+
(r'/\*', Comment.Multiline, 'comment'),
|
| 813 |
+
(r'//.*$', Comment.Single)
|
| 814 |
+
],
|
| 815 |
+
'comment': [
|
| 816 |
+
(r'[^/*]+', Comment.Multiline),
|
| 817 |
+
(r'/\*', Comment.Multiline, '#push'),
|
| 818 |
+
(r'\*/', Comment.Multiline, '#pop'),
|
| 819 |
+
(r'[*/]', Comment.Multiline),
|
| 820 |
+
],
|
| 821 |
+
'litstring': [
|
| 822 |
+
(r'[^"]+', String.Double),
|
| 823 |
+
(r'""', String.Escape),
|
| 824 |
+
(r'"', String.Double, '#pop'),
|
| 825 |
+
],
|
| 826 |
+
'string': [
|
| 827 |
+
(r'[^\\"\n]+', String.Double),
|
| 828 |
+
include('escape-sequence'),
|
| 829 |
+
(r'["\n]', String.Double, '#pop'),
|
| 830 |
+
],
|
| 831 |
+
'char': [
|
| 832 |
+
(r'[^\\\'\n]+', String.Char),
|
| 833 |
+
include('escape-sequence'),
|
| 834 |
+
(r'[\'\n]', String.Char, '#pop'),
|
| 835 |
+
],
|
| 836 |
+
'escape-sequence': [
|
| 837 |
+
(r'\\[nrt\\"\']', String.Escape),
|
| 838 |
+
(r'\\x[0-9a-fA-F]{2}', String.Escape),
|
| 839 |
+
(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 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 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, words
|
| 15 |
+
from pygments.token import Text, Comment, Keyword, Name, String
|
| 16 |
+
|
| 17 |
+
__all__ = ['IgorLexer']
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
class IgorLexer(RegexLexer):
|
| 21 |
+
"""
|
| 22 |
+
Pygments Lexer for Igor Pro procedure files (.ipf).
|
| 23 |
+
See http://www.wavemetrics.com/ and http://www.igorexchange.com/.
|
| 24 |
+
|
| 25 |
+
.. versionadded:: 2.0
|
| 26 |
+
"""
|
| 27 |
+
|
| 28 |
+
name = 'Igor'
|
| 29 |
+
aliases = ['igor', 'igorpro']
|
| 30 |
+
filenames = ['*.ipf']
|
| 31 |
+
mimetypes = ['text/ipf']
|
| 32 |
+
|
| 33 |
+
flags = re.IGNORECASE | re.MULTILINE
|
| 34 |
+
|
| 35 |
+
flowControl = (
|
| 36 |
+
'if', 'else', 'elseif', 'endif', 'for', 'endfor', 'strswitch', 'switch',
|
| 37 |
+
'case', 'default', 'endswitch', 'do', 'while', 'try', 'catch', 'endtry',
|
| 38 |
+
'break', 'continue', 'return', 'AbortOnRTE', 'AbortOnValue'
|
| 39 |
+
)
|
| 40 |
+
types = (
|
| 41 |
+
'variable', 'string', 'constant', 'strconstant', 'NVAR', 'SVAR', 'WAVE',
|
| 42 |
+
'STRUCT', 'dfref', 'funcref', 'char', 'uchar', 'int16', 'uint16', 'int32',
|
| 43 |
+
'uint32', 'int64', 'uint64', 'float', 'double'
|
| 44 |
+
)
|
| 45 |
+
keywords = (
|
| 46 |
+
'override', 'ThreadSafe', 'MultiThread', 'static', 'Proc',
|
| 47 |
+
'Picture', 'Prompt', 'DoPrompt', 'macro', 'window', 'function', 'end',
|
| 48 |
+
'Structure', 'EndStructure', 'EndMacro', 'Menu', 'SubMenu'
|
| 49 |
+
)
|
| 50 |
+
operations = (
|
| 51 |
+
'Abort', 'AddFIFOData', 'AddFIFOVectData', 'AddMovieAudio', 'AddMovieFrame',
|
| 52 |
+
'AdoptFiles', 'APMath', 'Append', 'AppendImage', 'AppendLayoutObject',
|
| 53 |
+
'AppendMatrixContour', 'AppendText', 'AppendToGizmo', 'AppendToGraph',
|
| 54 |
+
'AppendToLayout', 'AppendToTable', 'AppendXYZContour', 'AutoPositionWindow',
|
| 55 |
+
'BackgroundInfo', 'Beep', 'BoundingBall', 'BoxSmooth', 'BrowseURL', 'BuildMenu',
|
| 56 |
+
'Button', 'cd', 'Chart', 'CheckBox', 'CheckDisplayed', 'ChooseColor', 'Close',
|
| 57 |
+
'CloseHelp', 'CloseMovie', 'CloseProc', 'ColorScale', 'ColorTab2Wave',
|
| 58 |
+
'Concatenate', 'ControlBar', 'ControlInfo', 'ControlUpdate',
|
| 59 |
+
'ConvertGlobalStringTextEncoding', 'ConvexHull', 'Convolve', 'CopyFile',
|
| 60 |
+
'CopyFolder', 'CopyScales', 'Correlate', 'CreateAliasShortcut', 'CreateBrowser',
|
| 61 |
+
'Cross', 'CtrlBackground', 'CtrlFIFO', 'CtrlNamedBackground', 'Cursor',
|
| 62 |
+
'CurveFit', 'CustomControl', 'CWT', 'Debugger', 'DebuggerOptions', 'DefaultFont',
|
| 63 |
+
'DefaultGuiControls', 'DefaultGuiFont', 'DefaultTextEncoding', 'DefineGuide',
|
| 64 |
+
'DelayUpdate', 'DeleteAnnotations', 'DeleteFile', 'DeleteFolder', 'DeletePoints',
|
| 65 |
+
'Differentiate', 'dir', 'Display', 'DisplayHelpTopic', 'DisplayProcedure',
|
| 66 |
+
'DoAlert', 'DoIgorMenu', 'DoUpdate', 'DoWindow', 'DoXOPIdle', 'DPSS',
|
| 67 |
+
'DrawAction', 'DrawArc', 'DrawBezier', 'DrawLine', 'DrawOval', 'DrawPICT',
|
| 68 |
+
'DrawPoly', 'DrawRect', 'DrawRRect', 'DrawText', 'DrawUserShape', 'DSPDetrend',
|
| 69 |
+
'DSPPeriodogram', 'Duplicate', 'DuplicateDataFolder', 'DWT', 'EdgeStats', 'Edit',
|
| 70 |
+
'ErrorBars', 'EstimatePeakSizes', 'Execute', 'ExecuteScriptText',
|
| 71 |
+
'ExperimentModified', 'ExportGizmo', 'Extract', 'FastGaussTransform', 'FastOp',
|
| 72 |
+
'FBinRead', 'FBinWrite', 'FFT', 'FIFOStatus', 'FIFO2Wave', 'FilterFIR',
|
| 73 |
+
'FilterIIR', 'FindAPeak', 'FindContour', 'FindDuplicates', 'FindLevel',
|
| 74 |
+
'FindLevels', 'FindPeak', 'FindPointsInPoly', 'FindRoots', 'FindSequence',
|
| 75 |
+
'FindValue', 'FPClustering', 'fprintf', 'FReadLine', 'FSetPos', 'FStatus',
|
| 76 |
+
'FTPCreateDirectory', 'FTPDelete', 'FTPDownload', 'FTPUpload', 'FuncFit',
|
| 77 |
+
'FuncFitMD', 'GBLoadWave', 'GetAxis', 'GetCamera', 'GetFileFolderInfo',
|
| 78 |
+
'GetGizmo', 'GetLastUserMenuInfo', 'GetMarquee', 'GetMouse', 'GetSelection',
|
| 79 |
+
'GetWindow', 'GPIBReadBinaryWave2', 'GPIBReadBinary2', 'GPIBReadWave2',
|
| 80 |
+
'GPIBRead2', 'GPIBWriteBinaryWave2', 'GPIBWriteBinary2', 'GPIBWriteWave2',
|
| 81 |
+
'GPIBWrite2', 'GPIB2', 'GraphNormal', 'GraphWaveDraw', 'GraphWaveEdit', 'Grep',
|
| 82 |
+
'GroupBox', 'Hanning', 'HDF5CloseFile', 'HDF5CloseGroup', 'HDF5ConvertColors',
|
| 83 |
+
'HDF5CreateFile', 'HDF5CreateGroup', 'HDF5CreateLink', 'HDF5Dump',
|
| 84 |
+
'HDF5DumpErrors', 'HDF5DumpState', 'HDF5ListAttributes', 'HDF5ListGroup',
|
| 85 |
+
'HDF5LoadData', 'HDF5LoadGroup', 'HDF5LoadImage', 'HDF5OpenFile', 'HDF5OpenGroup',
|
| 86 |
+
'HDF5SaveData', 'HDF5SaveGroup', 'HDF5SaveImage', 'HDF5TestOperation',
|
| 87 |
+
'HDF5UnlinkObject', 'HideIgorMenus', 'HideInfo', 'HideProcedures', 'HideTools',
|
| 88 |
+
'HilbertTransform', 'Histogram', 'ICA', 'IFFT', 'ImageAnalyzeParticles',
|
| 89 |
+
'ImageBlend', 'ImageBoundaryToMask', 'ImageEdgeDetection', 'ImageFileInfo',
|
| 90 |
+
'ImageFilter', 'ImageFocus', 'ImageFromXYZ', 'ImageGenerateROIMask', 'ImageGLCM',
|
| 91 |
+
'ImageHistModification', 'ImageHistogram', 'ImageInterpolate', 'ImageLineProfile',
|
| 92 |
+
'ImageLoad', 'ImageMorphology', 'ImageRegistration', 'ImageRemoveBackground',
|
| 93 |
+
'ImageRestore', 'ImageRotate', 'ImageSave', 'ImageSeedFill', 'ImageSkeleton3d',
|
| 94 |
+
'ImageSnake', 'ImageStats', 'ImageThreshold', 'ImageTransform',
|
| 95 |
+
'ImageUnwrapPhase', 'ImageWindow', 'IndexSort', 'InsertPoints', 'Integrate',
|
| 96 |
+
'IntegrateODE', 'Integrate2D', 'Interpolate2', 'Interpolate3D', 'Interp3DPath',
|
| 97 |
+
'JCAMPLoadWave', 'JointHistogram', 'KillBackground', 'KillControl',
|
| 98 |
+
'KillDataFolder', 'KillFIFO', 'KillFreeAxis', 'KillPath', 'KillPICTs',
|
| 99 |
+
'KillStrings', 'KillVariables', 'KillWaves', 'KillWindow', 'KMeans', 'Label',
|
| 100 |
+
'Layout', 'LayoutPageAction', 'LayoutSlideShow', 'Legend',
|
| 101 |
+
'LinearFeedbackShiftRegister', 'ListBox', 'LoadData', 'LoadPackagePreferences',
|
| 102 |
+
'LoadPICT', 'LoadWave', 'Loess', 'LombPeriodogram', 'Make', 'MakeIndex',
|
| 103 |
+
'MarkPerfTestTime', 'MatrixConvolve', 'MatrixCorr', 'MatrixEigenV',
|
| 104 |
+
'MatrixFilter', 'MatrixGaussJ', 'MatrixGLM', 'MatrixInverse', 'MatrixLinearSolve',
|
| 105 |
+
'MatrixLinearSolveTD', 'MatrixLLS', 'MatrixLUBkSub', 'MatrixLUD', 'MatrixLUDTD',
|
| 106 |
+
'MatrixMultiply', 'MatrixOP', 'MatrixSchur', 'MatrixSolve', 'MatrixSVBkSub',
|
| 107 |
+
'MatrixSVD', 'MatrixTranspose', 'MeasureStyledText', 'MLLoadWave', 'Modify',
|
| 108 |
+
'ModifyBrowser', 'ModifyCamera', 'ModifyContour', 'ModifyControl',
|
| 109 |
+
'ModifyControlList', 'ModifyFreeAxis', 'ModifyGizmo', 'ModifyGraph',
|
| 110 |
+
'ModifyImage', 'ModifyLayout', 'ModifyPanel', 'ModifyTable', 'ModifyWaterfall',
|
| 111 |
+
'MoveDataFolder', 'MoveFile', 'MoveFolder', 'MoveString', 'MoveSubwindow',
|
| 112 |
+
'MoveVariable', 'MoveWave', 'MoveWindow', 'MultiTaperPSD',
|
| 113 |
+
'MultiThreadingControl', 'NeuralNetworkRun', 'NeuralNetworkTrain', 'NewCamera',
|
| 114 |
+
'NewDataFolder', 'NewFIFO', 'NewFIFOChan', 'NewFreeAxis', 'NewGizmo', 'NewImage',
|
| 115 |
+
'NewLayout', 'NewMovie', 'NewNotebook', 'NewPanel', 'NewPath', 'NewWaterfall',
|
| 116 |
+
'NI4882', 'Note', 'Notebook', 'NotebookAction', 'Open', 'OpenHelp',
|
| 117 |
+
'OpenNotebook', 'Optimize', 'ParseOperationTemplate', 'PathInfo', 'PauseForUser',
|
| 118 |
+
'PauseUpdate', 'PCA', 'PlayMovie', 'PlayMovieAction', 'PlaySound',
|
| 119 |
+
'PopupContextualMenu', 'PopupMenu', 'Preferences', 'PrimeFactors', 'Print',
|
| 120 |
+
'printf', 'PrintGraphs', 'PrintLayout', 'PrintNotebook', 'PrintSettings',
|
| 121 |
+
'PrintTable', 'Project', 'PulseStats', 'PutScrapText', 'pwd', 'Quit',
|
| 122 |
+
'RatioFromNumber', 'Redimension', 'Remove', 'RemoveContour', 'RemoveFromGizmo',
|
| 123 |
+
'RemoveFromGraph', 'RemoveFromLayout', 'RemoveFromTable', 'RemoveImage',
|
| 124 |
+
'RemoveLayoutObjects', 'RemovePath', 'Rename', 'RenameDataFolder', 'RenamePath',
|
| 125 |
+
'RenamePICT', 'RenameWindow', 'ReorderImages', 'ReorderTraces', 'ReplaceText',
|
| 126 |
+
'ReplaceWave', 'Resample', 'ResumeUpdate', 'Reverse', 'Rotate', 'Save',
|
| 127 |
+
'SaveData', 'SaveExperiment', 'SaveGraphCopy', 'SaveNotebook',
|
| 128 |
+
'SavePackagePreferences', 'SavePICT', 'SaveTableCopy', 'SetActiveSubwindow',
|
| 129 |
+
'SetAxis', 'SetBackground', 'SetDashPattern', 'SetDataFolder', 'SetDimLabel',
|
| 130 |
+
'SetDrawEnv', 'SetDrawLayer', 'SetFileFolderInfo', 'SetFormula', 'SetIgorHook',
|
| 131 |
+
'SetIgorMenuMode', 'SetIgorOption', 'SetMarquee', 'SetProcessSleep',
|
| 132 |
+
'SetRandomSeed', 'SetScale', 'SetVariable', 'SetWaveLock', 'SetWaveTextEncoding',
|
| 133 |
+
'SetWindow', 'ShowIgorMenus', 'ShowInfo', 'ShowTools', 'Silent', 'Sleep',
|
| 134 |
+
'Slider', 'Smooth', 'SmoothCustom', 'Sort', 'SortColumns', 'SoundInRecord',
|
| 135 |
+
'SoundInSet', 'SoundInStartChart', 'SoundInStatus', 'SoundInStopChart',
|
| 136 |
+
'SoundLoadWave', 'SoundSaveWave', 'SphericalInterpolate', 'SphericalTriangulate',
|
| 137 |
+
'SplitString', 'SplitWave', 'sprintf', 'sscanf', 'Stack', 'StackWindows',
|
| 138 |
+
'StatsAngularDistanceTest', 'StatsANOVA1Test', 'StatsANOVA2NRTest',
|
| 139 |
+
'StatsANOVA2RMTest', 'StatsANOVA2Test', 'StatsChiTest',
|
| 140 |
+
'StatsCircularCorrelationTest', 'StatsCircularMeans', 'StatsCircularMoments',
|
| 141 |
+
'StatsCircularTwoSampleTest', 'StatsCochranTest', 'StatsContingencyTable',
|
| 142 |
+
'StatsDIPTest', 'StatsDunnettTest', 'StatsFriedmanTest', 'StatsFTest',
|
| 143 |
+
'StatsHodgesAjneTest', 'StatsJBTest', 'StatsKDE', 'StatsKendallTauTest',
|
| 144 |
+
'StatsKSTest', 'StatsKWTest', 'StatsLinearCorrelationTest',
|
| 145 |
+
'StatsLinearRegression', 'StatsMultiCorrelationTest', 'StatsNPMCTest',
|
| 146 |
+
'StatsNPNominalSRTest', 'StatsQuantiles', 'StatsRankCorrelationTest',
|
| 147 |
+
'StatsResample', 'StatsSample', 'StatsScheffeTest', 'StatsShapiroWilkTest',
|
| 148 |
+
'StatsSignTest', 'StatsSRTest', 'StatsTTest', 'StatsTukeyTest',
|
| 149 |
+
'StatsVariancesTest', 'StatsWatsonUSquaredTest', 'StatsWatsonWilliamsTest',
|
| 150 |
+
'StatsWheelerWatsonTest', 'StatsWilcoxonRankTest', 'StatsWRCorrelationTest',
|
| 151 |
+
'String', 'StructGet', 'StructPut', 'SumDimension', 'SumSeries', 'TabControl',
|
| 152 |
+
'Tag', 'TextBox', 'ThreadGroupPutDF', 'ThreadStart', 'Tile', 'TileWindows',
|
| 153 |
+
'TitleBox', 'ToCommandLine', 'ToolsGrid', 'Triangulate3d', 'Unwrap', 'URLRequest',
|
| 154 |
+
'ValDisplay', 'Variable', 'VDTClosePort2', 'VDTGetPortList2', 'VDTGetStatus2',
|
| 155 |
+
'VDTOpenPort2', 'VDTOperationsPort2', 'VDTReadBinaryWave2', 'VDTReadBinary2',
|
| 156 |
+
'VDTReadHexWave2', 'VDTReadHex2', 'VDTReadWave2', 'VDTRead2', 'VDTTerminalPort2',
|
| 157 |
+
'VDTWriteBinaryWave2', 'VDTWriteBinary2', 'VDTWriteHexWave2', 'VDTWriteHex2',
|
| 158 |
+
'VDTWriteWave2', 'VDTWrite2', 'VDT2', 'WaveMeanStdv', 'WaveStats',
|
| 159 |
+
'WaveTransform', 'wfprintf', 'WignerTransform', 'WindowFunction', 'XLLoadWave'
|
| 160 |
+
)
|
| 161 |
+
functions = (
|
| 162 |
+
'abs', 'acos', 'acosh', 'AddListItem', 'AiryA', 'AiryAD', 'AiryB', 'AiryBD',
|
| 163 |
+
'alog', 'AnnotationInfo', 'AnnotationList', 'area', 'areaXY', 'asin', 'asinh',
|
| 164 |
+
'atan', 'atanh', 'atan2', 'AxisInfo', 'AxisList', 'AxisValFromPixel', 'Besseli',
|
| 165 |
+
'Besselj', 'Besselk', 'Bessely', 'beta', 'betai', 'BinarySearch',
|
| 166 |
+
'BinarySearchInterp', 'binomial', 'binomialln', 'binomialNoise', 'cabs',
|
| 167 |
+
'CaptureHistory', 'CaptureHistoryStart', 'ceil', 'cequal', 'char2num',
|
| 168 |
+
'chebyshev', 'chebyshevU', 'CheckName', 'ChildWindowList', 'CleanupName', 'cmplx',
|
| 169 |
+
'cmpstr', 'conj', 'ContourInfo', 'ContourNameList', 'ContourNameToWaveRef',
|
| 170 |
+
'ContourZ', 'ControlNameList', 'ConvertTextEncoding', 'cos', 'cosh',
|
| 171 |
+
'cosIntegral', 'cot', 'coth', 'CountObjects', 'CountObjectsDFR', 'cpowi',
|
| 172 |
+
'CreationDate', 'csc', 'csch', 'CsrInfo', 'CsrWave', 'CsrWaveRef', 'CsrXWave',
|
| 173 |
+
'CsrXWaveRef', 'CTabList', 'DataFolderDir', 'DataFolderExists',
|
| 174 |
+
'DataFolderRefsEqual', 'DataFolderRefStatus', 'date', 'datetime', 'DateToJulian',
|
| 175 |
+
'date2secs', 'Dawson', 'DDERequestString', 'defined', 'deltax', 'digamma',
|
| 176 |
+
'dilogarithm', 'DimDelta', 'DimOffset', 'DimSize', 'ei', 'enoise', 'equalWaves',
|
| 177 |
+
'erf', 'erfc', 'erfcw', 'exists', 'exp', 'ExpConvExp', 'ExpConvExpFit',
|
| 178 |
+
'ExpConvExpFitBL', 'ExpConvExpFit1Shape', 'ExpConvExpFit1ShapeBL', 'ExpGauss',
|
| 179 |
+
'ExpGaussFit', 'ExpGaussFitBL', 'ExpGaussFit1Shape', 'ExpGaussFit1ShapeBL',
|
| 180 |
+
'expInt', 'expIntegralE1', 'expNoise', 'factorial', 'fakedata', 'faverage',
|
| 181 |
+
'faverageXY', 'FetchURL', 'FindDimLabel', 'FindListItem', 'floor', 'FontList',
|
| 182 |
+
'FontSizeHeight', 'FontSizeStringWidth', 'FresnelCos', 'FresnelSin',
|
| 183 |
+
'FuncRefInfo', 'FunctionInfo', 'FunctionList', 'FunctionPath', 'gamma',
|
| 184 |
+
'gammaEuler', 'gammaInc', 'gammaNoise', 'gammln', 'gammp', 'gammq', 'Gauss',
|
| 185 |
+
'GaussFit', 'GaussFitBL', 'GaussFit1Width', 'GaussFit1WidthBL', 'Gauss1D',
|
| 186 |
+
'Gauss2D', 'gcd', 'GetBrowserLine', 'GetBrowserSelection', 'GetDataFolder',
|
| 187 |
+
'GetDataFolderDFR', 'GetDefaultFont', 'GetDefaultFontSize', 'GetDefaultFontStyle',
|
| 188 |
+
'GetDimLabel', 'GetEnvironmentVariable', 'GetErrMessage', 'GetFormula',
|
| 189 |
+
'GetIndependentModuleName', 'GetIndexedObjName', 'GetIndexedObjNameDFR',
|
| 190 |
+
'GetKeyState', 'GetRTErrMessage', 'GetRTError', 'GetRTLocation', 'GetRTLocInfo',
|
| 191 |
+
'GetRTStackInfo', 'GetScrapText', 'GetUserData', 'GetWavesDataFolder',
|
| 192 |
+
'GetWavesDataFolderDFR', 'GizmoInfo', 'GizmoScale', 'gnoise', 'GrepList',
|
| 193 |
+
'GrepString', 'GuideInfo', 'GuideNameList', 'Hash', 'hcsr', 'HDF5AttributeInfo',
|
| 194 |
+
'HDF5DatasetInfo', 'HDF5LibraryInfo', 'HDF5TypeInfo', 'hermite', 'hermiteGauss',
|
| 195 |
+
'HyperGNoise', 'HyperGPFQ', 'HyperG0F1', 'HyperG1F1', 'HyperG2F1', 'IgorInfo',
|
| 196 |
+
'IgorVersion', 'imag', 'ImageInfo', 'ImageNameList', 'ImageNameToWaveRef',
|
| 197 |
+
'IndependentModuleList', 'IndexedDir', 'IndexedFile', 'Inf', 'Integrate1D',
|
| 198 |
+
'interp', 'Interp2D', 'Interp3D', 'inverseERF', 'inverseERFC', 'ItemsInList',
|
| 199 |
+
'JacobiCn', 'JacobiSn', 'JulianToDate', 'Laguerre', 'LaguerreA', 'LaguerreGauss',
|
| 200 |
+
'LambertW', 'LayoutInfo', 'leftx', 'LegendreA', 'limit', 'ListMatch',
|
| 201 |
+
'ListToTextWave', 'ListToWaveRefWave', 'ln', 'log', 'logNormalNoise',
|
| 202 |
+
'LorentzianFit', 'LorentzianFitBL', 'LorentzianFit1Width',
|
| 203 |
+
'LorentzianFit1WidthBL', 'lorentzianNoise', 'LowerStr', 'MacroList', 'magsqr',
|
| 204 |
+
'MandelbrotPoint', 'MarcumQ', 'MatrixCondition', 'MatrixDet', 'MatrixDot',
|
| 205 |
+
'MatrixRank', 'MatrixTrace', 'max', 'mean', 'median', 'min', 'mod', 'ModDate',
|
| 206 |
+
'MPFXEMGPeak', 'MPFXExpConvExpPeak', 'MPFXGaussPeak', 'MPFXLorenzianPeak',
|
| 207 |
+
'MPFXVoigtPeak', 'NameOfWave', 'NaN', 'NewFreeDataFolder', 'NewFreeWave', 'norm',
|
| 208 |
+
'NormalizeUnicode', 'note', 'NumberByKey', 'numpnts', 'numtype',
|
| 209 |
+
'NumVarOrDefault', 'num2char', 'num2istr', 'num2str', 'NVAR_Exists',
|
| 210 |
+
'OperationList', 'PadString', 'PanelResolution', 'ParamIsDefault',
|
| 211 |
+
'ParseFilePath', 'PathList', 'pcsr', 'Pi', 'PICTInfo', 'PICTList',
|
| 212 |
+
'PixelFromAxisVal', 'pnt2x', 'poissonNoise', 'poly', 'PolygonArea', 'poly2D',
|
| 213 |
+
'PossiblyQuoteName', 'ProcedureText', 'p2rect', 'qcsr', 'real', 'RemoveByKey',
|
| 214 |
+
'RemoveEnding', 'RemoveFromList', 'RemoveListItem', 'ReplaceNumberByKey',
|
| 215 |
+
'ReplaceString', 'ReplaceStringByKey', 'rightx', 'round', 'r2polar', 'sawtooth',
|
| 216 |
+
'scaleToIndex', 'ScreenResolution', 'sec', 'sech', 'Secs2Date', 'Secs2Time',
|
| 217 |
+
'SelectNumber', 'SelectString', 'SetEnvironmentVariable', 'sign', 'sin', 'sinc',
|
| 218 |
+
'sinh', 'sinIntegral', 'SortList', 'SpecialCharacterInfo', 'SpecialCharacterList',
|
| 219 |
+
'SpecialDirPath', 'SphericalBessJ', 'SphericalBessJD', 'SphericalBessY',
|
| 220 |
+
'SphericalBessYD', 'SphericalHarmonics', 'sqrt', 'StartMSTimer', 'StatsBetaCDF',
|
| 221 |
+
'StatsBetaPDF', 'StatsBinomialCDF', 'StatsBinomialPDF', 'StatsCauchyCDF',
|
| 222 |
+
'StatsCauchyPDF', 'StatsChiCDF', 'StatsChiPDF', 'StatsCMSSDCDF',
|
| 223 |
+
'StatsCorrelation', 'StatsDExpCDF', 'StatsDExpPDF', 'StatsErlangCDF',
|
| 224 |
+
'StatsErlangPDF', 'StatsErrorPDF', 'StatsEValueCDF', 'StatsEValuePDF',
|
| 225 |
+
'StatsExpCDF', 'StatsExpPDF', 'StatsFCDF', 'StatsFPDF', 'StatsFriedmanCDF',
|
| 226 |
+
'StatsGammaCDF', 'StatsGammaPDF', 'StatsGeometricCDF', 'StatsGeometricPDF',
|
| 227 |
+
'StatsGEVCDF', 'StatsGEVPDF', 'StatsHyperGCDF', 'StatsHyperGPDF',
|
| 228 |
+
'StatsInvBetaCDF', 'StatsInvBinomialCDF', 'StatsInvCauchyCDF', 'StatsInvChiCDF',
|
| 229 |
+
'StatsInvCMSSDCDF', 'StatsInvDExpCDF', 'StatsInvEValueCDF', 'StatsInvExpCDF',
|
| 230 |
+
'StatsInvFCDF', 'StatsInvFriedmanCDF', 'StatsInvGammaCDF', 'StatsInvGeometricCDF',
|
| 231 |
+
'StatsInvKuiperCDF', 'StatsInvLogisticCDF', 'StatsInvLogNormalCDF',
|
| 232 |
+
'StatsInvMaxwellCDF', 'StatsInvMooreCDF', 'StatsInvNBinomialCDF',
|
| 233 |
+
'StatsInvNCChiCDF', 'StatsInvNCFCDF', 'StatsInvNormalCDF', 'StatsInvParetoCDF',
|
| 234 |
+
'StatsInvPoissonCDF', 'StatsInvPowerCDF', 'StatsInvQCDF', 'StatsInvQpCDF',
|
| 235 |
+
'StatsInvRayleighCDF', 'StatsInvRectangularCDF', 'StatsInvSpearmanCDF',
|
| 236 |
+
'StatsInvStudentCDF', 'StatsInvTopDownCDF', 'StatsInvTriangularCDF',
|
| 237 |
+
'StatsInvUsquaredCDF', 'StatsInvVonMisesCDF', 'StatsInvWeibullCDF',
|
| 238 |
+
'StatsKuiperCDF', 'StatsLogisticCDF', 'StatsLogisticPDF', 'StatsLogNormalCDF',
|
| 239 |
+
'StatsLogNormalPDF', 'StatsMaxwellCDF', 'StatsMaxwellPDF', 'StatsMedian',
|
| 240 |
+
'StatsMooreCDF', 'StatsNBinomialCDF', 'StatsNBinomialPDF', 'StatsNCChiCDF',
|
| 241 |
+
'StatsNCChiPDF', 'StatsNCFCDF', 'StatsNCFPDF', 'StatsNCTCDF', 'StatsNCTPDF',
|
| 242 |
+
'StatsNormalCDF', 'StatsNormalPDF', 'StatsParetoCDF', 'StatsParetoPDF',
|
| 243 |
+
'StatsPermute', 'StatsPoissonCDF', 'StatsPoissonPDF', 'StatsPowerCDF',
|
| 244 |
+
'StatsPowerNoise', 'StatsPowerPDF', 'StatsQCDF', 'StatsQpCDF', 'StatsRayleighCDF',
|
| 245 |
+
'StatsRayleighPDF', 'StatsRectangularCDF', 'StatsRectangularPDF', 'StatsRunsCDF',
|
| 246 |
+
'StatsSpearmanRhoCDF', 'StatsStudentCDF', 'StatsStudentPDF', 'StatsTopDownCDF',
|
| 247 |
+
'StatsTriangularCDF', 'StatsTriangularPDF', 'StatsTrimmedMean',
|
| 248 |
+
'StatsUSquaredCDF', 'StatsVonMisesCDF', 'StatsVonMisesNoise', 'StatsVonMisesPDF',
|
| 249 |
+
'StatsWaldCDF', 'StatsWaldPDF', 'StatsWeibullCDF', 'StatsWeibullPDF',
|
| 250 |
+
'StopMSTimer', 'StringByKey', 'stringCRC', 'StringFromList', 'StringList',
|
| 251 |
+
'stringmatch', 'strlen', 'strsearch', 'StrVarOrDefault', 'str2num', 'StudentA',
|
| 252 |
+
'StudentT', 'sum', 'SVAR_Exists', 'TableInfo', 'TagVal', 'TagWaveRef', 'tan',
|
| 253 |
+
'tanh', 'TextEncodingCode', 'TextEncodingName', 'TextFile', 'ThreadGroupCreate',
|
| 254 |
+
'ThreadGroupGetDF', 'ThreadGroupGetDFR', 'ThreadGroupRelease', 'ThreadGroupWait',
|
| 255 |
+
'ThreadProcessorCount', 'ThreadReturnValue', 'ticks', 'time', 'TraceFromPixel',
|
| 256 |
+
'TraceInfo', 'TraceNameList', 'TraceNameToWaveRef', 'trunc', 'UniqueName',
|
| 257 |
+
'UnPadString', 'UnsetEnvironmentVariable', 'UpperStr', 'URLDecode', 'URLEncode',
|
| 258 |
+
'VariableList', 'Variance', 'vcsr', 'Voigt', 'VoigtFit', 'VoigtFitBL',
|
| 259 |
+
'VoigtFit1Shape', 'VoigtFit1ShapeBL', 'VoigtFit1Shape1Width',
|
| 260 |
+
'VoigtFit1Shape1WidthBL', 'VoigtFunc', 'WaveCRC', 'WaveDims', 'WaveExists',
|
| 261 |
+
'WaveInfo', 'WaveList', 'WaveMax', 'WaveMin', 'WaveName', 'WaveRefIndexed',
|
| 262 |
+
'WaveRefIndexedDFR', 'WaveRefsEqual', 'WaveRefWaveToList', 'WaveTextEncoding',
|
| 263 |
+
'WaveType', 'WaveUnits', 'WhichListItem', 'WinList', 'WinName', 'WinRecreation',
|
| 264 |
+
'WinType', 'WMFindWholeWord', 'WNoise', 'xcsr', 'XWaveName', 'XWaveRefFromTrace',
|
| 265 |
+
'x2pnt', 'zcsr', 'ZernikeR', 'zeta'
|
| 266 |
+
)
|
| 267 |
+
|
| 268 |
+
tokens = {
|
| 269 |
+
'root': [
|
| 270 |
+
(r'//.*$', Comment.Single),
|
| 271 |
+
(r'"([^"\\]|\\.)*"', String),
|
| 272 |
+
# Flow Control.
|
| 273 |
+
(words(flowControl, prefix=r'\b', suffix=r'\b'), Keyword),
|
| 274 |
+
# Types.
|
| 275 |
+
(words(types, prefix=r'\b', suffix=r'\b'), Keyword.Type),
|
| 276 |
+
# Keywords.
|
| 277 |
+
(words(keywords, prefix=r'\b', suffix=r'\b'), Keyword.Reserved),
|
| 278 |
+
# Built-in operations.
|
| 279 |
+
(words(operations, prefix=r'\b', suffix=r'\b'), Name.Class),
|
| 280 |
+
# Built-in functions.
|
| 281 |
+
(words(functions, prefix=r'\b', suffix=r'\b'), Name.Function),
|
| 282 |
+
# Compiler directives.
|
| 283 |
+
(r'^#(include|pragma|define|undef|ifdef|ifndef|if|elif|else|endif)',
|
| 284 |
+
Name.Decorator),
|
| 285 |
+
(r'[^a-z"/]+$', Text),
|
| 286 |
+
(r'.', Text),
|
| 287 |
+
],
|
| 288 |
+
}
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/inferno.py
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.inferno
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexers for Inferno os and all the related stuff.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 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, default
|
| 15 |
+
from pygments.token import Punctuation, Text, Comment, Operator, Keyword, \
|
| 16 |
+
Name, String, Number
|
| 17 |
+
|
| 18 |
+
__all__ = ['LimboLexer']
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
class LimboLexer(RegexLexer):
|
| 22 |
+
"""
|
| 23 |
+
Lexer for `Limbo programming language <http://www.vitanuova.com/inferno/limbo.html>`_
|
| 24 |
+
|
| 25 |
+
TODO:
|
| 26 |
+
- maybe implement better var declaration highlighting
|
| 27 |
+
- some simple syntax error highlighting
|
| 28 |
+
|
| 29 |
+
.. versionadded:: 2.0
|
| 30 |
+
"""
|
| 31 |
+
name = 'Limbo'
|
| 32 |
+
aliases = ['limbo']
|
| 33 |
+
filenames = ['*.b']
|
| 34 |
+
mimetypes = ['text/limbo']
|
| 35 |
+
|
| 36 |
+
tokens = {
|
| 37 |
+
'whitespace': [
|
| 38 |
+
(r'^(\s*)([a-zA-Z_]\w*:(\s*)\n)',
|
| 39 |
+
bygroups(Text, Name.Label)),
|
| 40 |
+
(r'\n', Text),
|
| 41 |
+
(r'\s+', Text),
|
| 42 |
+
(r'#(\n|(.|\n)*?[^\\]\n)', Comment.Single),
|
| 43 |
+
],
|
| 44 |
+
'string': [
|
| 45 |
+
(r'"', String, '#pop'),
|
| 46 |
+
(r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|'
|
| 47 |
+
r'u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}|[0-7]{1,3})', String.Escape),
|
| 48 |
+
(r'[^\\"\n]+', String), # all other characters
|
| 49 |
+
(r'\\', String), # stray backslash
|
| 50 |
+
],
|
| 51 |
+
'statements': [
|
| 52 |
+
(r'"', String, 'string'),
|
| 53 |
+
(r"'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'", String.Char),
|
| 54 |
+
(r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+', Number.Float),
|
| 55 |
+
(r'(\d+\.\d*|\.\d+|\d+[fF])', Number.Float),
|
| 56 |
+
(r'16r[0-9a-fA-F]+', Number.Hex),
|
| 57 |
+
(r'8r[0-7]+', Number.Oct),
|
| 58 |
+
(r'((([1-3]\d)|([2-9]))r)?(\d+)', Number.Integer),
|
| 59 |
+
(r'[()\[\],.]', Punctuation),
|
| 60 |
+
(r'[~!%^&*+=|?:<>/-]|(->)|(<-)|(=>)|(::)', Operator),
|
| 61 |
+
(r'(alt|break|case|continue|cyclic|do|else|exit'
|
| 62 |
+
r'for|hd|if|implement|import|include|len|load|or'
|
| 63 |
+
r'pick|return|spawn|tagof|tl|to|while)\b', Keyword),
|
| 64 |
+
(r'(byte|int|big|real|string|array|chan|list|adt'
|
| 65 |
+
r'|fn|ref|of|module|self|type)\b', Keyword.Type),
|
| 66 |
+
(r'(con|iota|nil)\b', Keyword.Constant),
|
| 67 |
+
('[a-zA-Z_]\w*', Name),
|
| 68 |
+
],
|
| 69 |
+
'statement' : [
|
| 70 |
+
include('whitespace'),
|
| 71 |
+
include('statements'),
|
| 72 |
+
('[{}]', Punctuation),
|
| 73 |
+
(';', Punctuation, '#pop'),
|
| 74 |
+
],
|
| 75 |
+
'root': [
|
| 76 |
+
include('whitespace'),
|
| 77 |
+
default('statement'),
|
| 78 |
+
],
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
def analyse_text(text):
|
| 82 |
+
# Any limbo module implements something
|
| 83 |
+
if re.search(r'^implement \w+;', text, re.MULTILINE):
|
| 84 |
+
return 0.7
|
| 85 |
+
|
| 86 |
+
# TODO:
|
| 87 |
+
# - Make lexers for:
|
| 88 |
+
# - asm sources
|
| 89 |
+
# - man pages
|
| 90 |
+
# - mkfiles
|
| 91 |
+
# - module definitions
|
| 92 |
+
# - namespace definitions
|
| 93 |
+
# - shell scripts
|
| 94 |
+
# - maybe keyfiles and fonts
|
| 95 |
+
# they all seem to be quite similar to their equivalents
|
| 96 |
+
# from unix world, so there should not be a lot of problems
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/int_fiction.py
ADDED
|
@@ -0,0 +1,1343 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.int_fiction
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexers for interactive fiction languages.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 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, using, \
|
| 15 |
+
this, default, words
|
| 16 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 17 |
+
Number, Punctuation, Error, Generic
|
| 18 |
+
|
| 19 |
+
__all__ = ['Inform6Lexer', 'Inform6TemplateLexer', 'Inform7Lexer',
|
| 20 |
+
'Tads3Lexer']
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
class Inform6Lexer(RegexLexer):
|
| 24 |
+
"""
|
| 25 |
+
For `Inform 6 <http://inform-fiction.org/>`_ source code.
|
| 26 |
+
|
| 27 |
+
.. versionadded:: 2.0
|
| 28 |
+
"""
|
| 29 |
+
|
| 30 |
+
name = 'Inform 6'
|
| 31 |
+
aliases = ['inform6', 'i6']
|
| 32 |
+
filenames = ['*.inf']
|
| 33 |
+
|
| 34 |
+
flags = re.MULTILINE | re.DOTALL | re.UNICODE
|
| 35 |
+
|
| 36 |
+
_name = r'[a-zA-Z_]\w*'
|
| 37 |
+
|
| 38 |
+
# Inform 7 maps these four character classes to their ASCII
|
| 39 |
+
# equivalents. To support Inform 6 inclusions within Inform 7,
|
| 40 |
+
# Inform6Lexer maps them too.
|
| 41 |
+
_dash = u'\\-\u2010-\u2014'
|
| 42 |
+
_dquote = u'"\u201c\u201d'
|
| 43 |
+
_squote = u"'\u2018\u2019"
|
| 44 |
+
_newline = u'\\n\u0085\u2028\u2029'
|
| 45 |
+
|
| 46 |
+
tokens = {
|
| 47 |
+
'root': [
|
| 48 |
+
(r'\A(!%%[^%s]*[%s])+' % (_newline, _newline), Comment.Preproc,
|
| 49 |
+
'directive'),
|
| 50 |
+
default('directive')
|
| 51 |
+
],
|
| 52 |
+
'_whitespace': [
|
| 53 |
+
(r'\s+', Text),
|
| 54 |
+
(r'![^%s]*' % _newline, Comment.Single)
|
| 55 |
+
],
|
| 56 |
+
'default': [
|
| 57 |
+
include('_whitespace'),
|
| 58 |
+
(r'\[', Punctuation, 'many-values'), # Array initialization
|
| 59 |
+
(r':|(?=;)', Punctuation, '#pop'),
|
| 60 |
+
(r'<', Punctuation), # Second angle bracket in an action statement
|
| 61 |
+
default(('expression', '_expression'))
|
| 62 |
+
],
|
| 63 |
+
|
| 64 |
+
# Expressions
|
| 65 |
+
'_expression': [
|
| 66 |
+
include('_whitespace'),
|
| 67 |
+
(r'(?=sp\b)', Text, '#pop'),
|
| 68 |
+
(r'(?=[%s%s$0-9#a-zA-Z_])' % (_dquote, _squote), Text,
|
| 69 |
+
('#pop', 'value')),
|
| 70 |
+
(r'\+\+|[%s]{1,2}(?!>)|~~?' % _dash, Operator),
|
| 71 |
+
(r'(?=[()\[%s,?@{:;])' % _dash, Text, '#pop')
|
| 72 |
+
],
|
| 73 |
+
'expression': [
|
| 74 |
+
include('_whitespace'),
|
| 75 |
+
(r'\(', Punctuation, ('expression', '_expression')),
|
| 76 |
+
(r'\)', Punctuation, '#pop'),
|
| 77 |
+
(r'\[', Punctuation, ('#pop', 'statements', 'locals')),
|
| 78 |
+
(r'>(?=(\s+|(![^%s]*))*[>;])' % _newline, Punctuation),
|
| 79 |
+
(r'\+\+|[%s]{2}(?!>)' % _dash, Operator),
|
| 80 |
+
(r',', Punctuation, '_expression'),
|
| 81 |
+
(r'&&?|\|\|?|[=~><]?=|[%s]{1,2}>?|\.\.?[&#]?|::|[<>+*/%%]' % _dash,
|
| 82 |
+
Operator, '_expression'),
|
| 83 |
+
(r'(has|hasnt|in|notin|ofclass|or|provides)\b', Operator.Word,
|
| 84 |
+
'_expression'),
|
| 85 |
+
(r'sp\b', Name),
|
| 86 |
+
(r'\?~?', Name.Label, 'label?'),
|
| 87 |
+
(r'[@{]', Error),
|
| 88 |
+
default('#pop')
|
| 89 |
+
],
|
| 90 |
+
'_assembly-expression': [
|
| 91 |
+
(r'\(', Punctuation, ('#push', '_expression')),
|
| 92 |
+
(r'[\[\]]', Punctuation),
|
| 93 |
+
(r'[%s]>' % _dash, Punctuation, '_expression'),
|
| 94 |
+
(r'sp\b', Keyword.Pseudo),
|
| 95 |
+
(r';', Punctuation, '#pop:3'),
|
| 96 |
+
include('expression')
|
| 97 |
+
],
|
| 98 |
+
'_for-expression': [
|
| 99 |
+
(r'\)', Punctuation, '#pop:2'),
|
| 100 |
+
(r':', Punctuation, '#pop'),
|
| 101 |
+
include('expression')
|
| 102 |
+
],
|
| 103 |
+
'_keyword-expression': [
|
| 104 |
+
(r'(from|near|to)\b', Keyword, '_expression'),
|
| 105 |
+
include('expression')
|
| 106 |
+
],
|
| 107 |
+
'_list-expression': [
|
| 108 |
+
(r',', Punctuation, '#pop'),
|
| 109 |
+
include('expression')
|
| 110 |
+
],
|
| 111 |
+
'_object-expression': [
|
| 112 |
+
(r'has\b', Keyword.Declaration, '#pop'),
|
| 113 |
+
include('_list-expression')
|
| 114 |
+
],
|
| 115 |
+
|
| 116 |
+
# Values
|
| 117 |
+
'value': [
|
| 118 |
+
include('_whitespace'),
|
| 119 |
+
# Strings
|
| 120 |
+
(r'[%s][^@][%s]' % (_squote, _squote), String.Char, '#pop'),
|
| 121 |
+
(r'([%s])(@\{[0-9a-fA-F]{1,4}\})([%s])' % (_squote, _squote),
|
| 122 |
+
bygroups(String.Char, String.Escape, String.Char), '#pop'),
|
| 123 |
+
(r'([%s])(@.{2})([%s])' % (_squote, _squote),
|
| 124 |
+
bygroups(String.Char, String.Escape, String.Char), '#pop'),
|
| 125 |
+
(r'[%s]' % _squote, String.Single, ('#pop', 'dictionary-word')),
|
| 126 |
+
(r'[%s]' % _dquote, String.Double, ('#pop', 'string')),
|
| 127 |
+
# Numbers
|
| 128 |
+
(r'\$[+%s][0-9]*\.?[0-9]*([eE][+%s]?[0-9]+)?' % (_dash, _dash),
|
| 129 |
+
Number.Float, '#pop'),
|
| 130 |
+
(r'\$[0-9a-fA-F]+', Number.Hex, '#pop'),
|
| 131 |
+
(r'\$\$[01]+', Number.Bin, '#pop'),
|
| 132 |
+
(r'[0-9]+', Number.Integer, '#pop'),
|
| 133 |
+
# Values prefixed by hashes
|
| 134 |
+
(r'(##|#a\$)(%s)' % _name, bygroups(Operator, Name), '#pop'),
|
| 135 |
+
(r'(#g\$)(%s)' % _name,
|
| 136 |
+
bygroups(Operator, Name.Variable.Global), '#pop'),
|
| 137 |
+
(r'#[nw]\$', Operator, ('#pop', 'obsolete-dictionary-word')),
|
| 138 |
+
(r'(#r\$)(%s)' % _name, bygroups(Operator, Name.Function), '#pop'),
|
| 139 |
+
(r'#', Name.Builtin, ('#pop', 'system-constant')),
|
| 140 |
+
# System functions
|
| 141 |
+
(words((
|
| 142 |
+
'child', 'children', 'elder', 'eldest', 'glk', 'indirect', 'metaclass',
|
| 143 |
+
'parent', 'random', 'sibling', 'younger', 'youngest'), suffix=r'\b'),
|
| 144 |
+
Name.Builtin, '#pop'),
|
| 145 |
+
# Metaclasses
|
| 146 |
+
(r'(?i)(Class|Object|Routine|String)\b', Name.Builtin, '#pop'),
|
| 147 |
+
# Veneer routines
|
| 148 |
+
(words((
|
| 149 |
+
'Box__Routine', 'CA__Pr', 'CDefArt', 'CInDefArt', 'Cl__Ms',
|
| 150 |
+
'Copy__Primitive', 'CP__Tab', 'DA__Pr', 'DB__Pr', 'DefArt', 'Dynam__String',
|
| 151 |
+
'EnglishNumber', 'Glk__Wrap', 'IA__Pr', 'IB__Pr', 'InDefArt', 'Main__',
|
| 152 |
+
'Meta__class', 'OB__Move', 'OB__Remove', 'OC__Cl', 'OP__Pr', 'Print__Addr',
|
| 153 |
+
'Print__PName', 'PrintShortName', 'RA__Pr', 'RA__Sc', 'RL__Pr', 'R_Process',
|
| 154 |
+
'RT__ChG', 'RT__ChGt', 'RT__ChLDB', 'RT__ChLDW', 'RT__ChPR', 'RT__ChPrintA',
|
| 155 |
+
'RT__ChPrintC', 'RT__ChPrintO', 'RT__ChPrintS', 'RT__ChPS', 'RT__ChR',
|
| 156 |
+
'RT__ChSTB', 'RT__ChSTW', 'RT__ChT', 'RT__Err', 'RT__TrPS', 'RV__Pr',
|
| 157 |
+
'Symb__Tab', 'Unsigned__Compare', 'WV__Pr', 'Z__Region'),
|
| 158 |
+
prefix='(?i)', suffix=r'\b'),
|
| 159 |
+
Name.Builtin, '#pop'),
|
| 160 |
+
# Other built-in symbols
|
| 161 |
+
(words((
|
| 162 |
+
'call', 'copy', 'create', 'DEBUG', 'destroy', 'DICT_CHAR_SIZE',
|
| 163 |
+
'DICT_ENTRY_BYTES', 'DICT_IS_UNICODE', 'DICT_WORD_SIZE', 'false',
|
| 164 |
+
'FLOAT_INFINITY', 'FLOAT_NAN', 'FLOAT_NINFINITY', 'GOBJFIELD_CHAIN',
|
| 165 |
+
'GOBJFIELD_CHILD', 'GOBJFIELD_NAME', 'GOBJFIELD_PARENT',
|
| 166 |
+
'GOBJFIELD_PROPTAB', 'GOBJFIELD_SIBLING', 'GOBJ_EXT_START',
|
| 167 |
+
'GOBJ_TOTAL_LENGTH', 'Grammar__Version', 'INDIV_PROP_START', 'INFIX',
|
| 168 |
+
'infix__watching', 'MODULE_MODE', 'name', 'nothing', 'NUM_ATTR_BYTES', 'print',
|
| 169 |
+
'print_to_array', 'recreate', 'remaining', 'self', 'sender', 'STRICT_MODE',
|
| 170 |
+
'sw__var', 'sys__glob0', 'sys__glob1', 'sys__glob2', 'sys_statusline_flag',
|
| 171 |
+
'TARGET_GLULX', 'TARGET_ZCODE', 'temp__global2', 'temp__global3',
|
| 172 |
+
'temp__global4', 'temp_global', 'true', 'USE_MODULES', 'WORDSIZE'),
|
| 173 |
+
prefix='(?i)', suffix=r'\b'),
|
| 174 |
+
Name.Builtin, '#pop'),
|
| 175 |
+
# Other values
|
| 176 |
+
(_name, Name, '#pop')
|
| 177 |
+
],
|
| 178 |
+
# Strings
|
| 179 |
+
'dictionary-word': [
|
| 180 |
+
(r'[~^]+', String.Escape),
|
| 181 |
+
(r'[^~^\\@({%s]+' % _squote, String.Single),
|
| 182 |
+
(r'[({]', String.Single),
|
| 183 |
+
(r'@\{[0-9a-fA-F]{,4}\}', String.Escape),
|
| 184 |
+
(r'@.{2}', String.Escape),
|
| 185 |
+
(r'[%s]' % _squote, String.Single, '#pop')
|
| 186 |
+
],
|
| 187 |
+
'string': [
|
| 188 |
+
(r'[~^]+', String.Escape),
|
| 189 |
+
(r'[^~^\\@({%s]+' % _dquote, String.Double),
|
| 190 |
+
(r'[({]', String.Double),
|
| 191 |
+
(r'\\', String.Escape),
|
| 192 |
+
(r'@(\\\s*[%s]\s*)*@((\\\s*[%s]\s*)*[0-9])*' %
|
| 193 |
+
(_newline, _newline), String.Escape),
|
| 194 |
+
(r'@(\\\s*[%s]\s*)*\{((\\\s*[%s]\s*)*[0-9a-fA-F]){,4}'
|
| 195 |
+
r'(\\\s*[%s]\s*)*\}' % (_newline, _newline, _newline),
|
| 196 |
+
String.Escape),
|
| 197 |
+
(r'@(\\\s*[%s]\s*)*.(\\\s*[%s]\s*)*.' % (_newline, _newline),
|
| 198 |
+
String.Escape),
|
| 199 |
+
(r'[%s]' % _dquote, String.Double, '#pop')
|
| 200 |
+
],
|
| 201 |
+
'plain-string': [
|
| 202 |
+
(r'[^~^\\({\[\]%s]+' % _dquote, String.Double),
|
| 203 |
+
(r'[~^({\[\]]', String.Double),
|
| 204 |
+
(r'\\', String.Escape),
|
| 205 |
+
(r'[%s]' % _dquote, String.Double, '#pop')
|
| 206 |
+
],
|
| 207 |
+
# Names
|
| 208 |
+
'_constant': [
|
| 209 |
+
include('_whitespace'),
|
| 210 |
+
(_name, Name.Constant, '#pop'),
|
| 211 |
+
include('value')
|
| 212 |
+
],
|
| 213 |
+
'_global': [
|
| 214 |
+
include('_whitespace'),
|
| 215 |
+
(_name, Name.Variable.Global, '#pop'),
|
| 216 |
+
include('value')
|
| 217 |
+
],
|
| 218 |
+
'label?': [
|
| 219 |
+
include('_whitespace'),
|
| 220 |
+
(_name, Name.Label, '#pop'),
|
| 221 |
+
default('#pop')
|
| 222 |
+
],
|
| 223 |
+
'variable?': [
|
| 224 |
+
include('_whitespace'),
|
| 225 |
+
(_name, Name.Variable, '#pop'),
|
| 226 |
+
default('#pop')
|
| 227 |
+
],
|
| 228 |
+
# Values after hashes
|
| 229 |
+
'obsolete-dictionary-word': [
|
| 230 |
+
(r'\S\w*', String.Other, '#pop')
|
| 231 |
+
],
|
| 232 |
+
'system-constant': [
|
| 233 |
+
include('_whitespace'),
|
| 234 |
+
(_name, Name.Builtin, '#pop')
|
| 235 |
+
],
|
| 236 |
+
|
| 237 |
+
# Directives
|
| 238 |
+
'directive': [
|
| 239 |
+
include('_whitespace'),
|
| 240 |
+
(r'#', Punctuation),
|
| 241 |
+
(r';', Punctuation, '#pop'),
|
| 242 |
+
(r'\[', Punctuation,
|
| 243 |
+
('default', 'statements', 'locals', 'routine-name?')),
|
| 244 |
+
(words((
|
| 245 |
+
'abbreviate', 'endif', 'dictionary', 'ifdef', 'iffalse', 'ifndef', 'ifnot',
|
| 246 |
+
'iftrue', 'ifv3', 'ifv5', 'release', 'serial', 'switches', 'system_file',
|
| 247 |
+
'version'), prefix='(?i)', suffix=r'\b'),
|
| 248 |
+
Keyword, 'default'),
|
| 249 |
+
(r'(?i)(array|global)\b', Keyword,
|
| 250 |
+
('default', 'directive-keyword?', '_global')),
|
| 251 |
+
(r'(?i)attribute\b', Keyword, ('default', 'alias?', '_constant')),
|
| 252 |
+
(r'(?i)class\b', Keyword,
|
| 253 |
+
('object-body', 'duplicates', 'class-name')),
|
| 254 |
+
(r'(?i)(constant|default)\b', Keyword,
|
| 255 |
+
('default', 'expression', '_constant')),
|
| 256 |
+
(r'(?i)(end\b)(.*)', bygroups(Keyword, Text)),
|
| 257 |
+
(r'(?i)(extend|verb)\b', Keyword, 'grammar'),
|
| 258 |
+
(r'(?i)fake_action\b', Keyword, ('default', '_constant')),
|
| 259 |
+
(r'(?i)import\b', Keyword, 'manifest'),
|
| 260 |
+
(r'(?i)(include|link)\b', Keyword,
|
| 261 |
+
('default', 'before-plain-string')),
|
| 262 |
+
(r'(?i)(lowstring|undef)\b', Keyword, ('default', '_constant')),
|
| 263 |
+
(r'(?i)message\b', Keyword, ('default', 'diagnostic')),
|
| 264 |
+
(r'(?i)(nearby|object)\b', Keyword,
|
| 265 |
+
('object-body', '_object-head')),
|
| 266 |
+
(r'(?i)property\b', Keyword,
|
| 267 |
+
('default', 'alias?', '_constant', 'property-keyword*')),
|
| 268 |
+
(r'(?i)replace\b', Keyword,
|
| 269 |
+
('default', 'routine-name?', 'routine-name?')),
|
| 270 |
+
(r'(?i)statusline\b', Keyword, ('default', 'directive-keyword?')),
|
| 271 |
+
(r'(?i)stub\b', Keyword, ('default', 'routine-name?')),
|
| 272 |
+
(r'(?i)trace\b', Keyword,
|
| 273 |
+
('default', 'trace-keyword?', 'trace-keyword?')),
|
| 274 |
+
(r'(?i)zcharacter\b', Keyword,
|
| 275 |
+
('default', 'directive-keyword?', 'directive-keyword?')),
|
| 276 |
+
(_name, Name.Class, ('object-body', '_object-head'))
|
| 277 |
+
],
|
| 278 |
+
# [, Replace, Stub
|
| 279 |
+
'routine-name?': [
|
| 280 |
+
include('_whitespace'),
|
| 281 |
+
(_name, Name.Function, '#pop'),
|
| 282 |
+
default('#pop')
|
| 283 |
+
],
|
| 284 |
+
'locals': [
|
| 285 |
+
include('_whitespace'),
|
| 286 |
+
(r';', Punctuation, '#pop'),
|
| 287 |
+
(r'\*', Punctuation),
|
| 288 |
+
(r'"', String.Double, 'plain-string'),
|
| 289 |
+
(_name, Name.Variable)
|
| 290 |
+
],
|
| 291 |
+
# Array
|
| 292 |
+
'many-values': [
|
| 293 |
+
include('_whitespace'),
|
| 294 |
+
(r';', Punctuation),
|
| 295 |
+
(r'\]', Punctuation, '#pop'),
|
| 296 |
+
(r':', Error),
|
| 297 |
+
default(('expression', '_expression'))
|
| 298 |
+
],
|
| 299 |
+
# Attribute, Property
|
| 300 |
+
'alias?': [
|
| 301 |
+
include('_whitespace'),
|
| 302 |
+
(r'alias\b', Keyword, ('#pop', '_constant')),
|
| 303 |
+
default('#pop')
|
| 304 |
+
],
|
| 305 |
+
# Class, Object, Nearby
|
| 306 |
+
'class-name': [
|
| 307 |
+
include('_whitespace'),
|
| 308 |
+
(r'(?=[,;]|(class|has|private|with)\b)', Text, '#pop'),
|
| 309 |
+
(_name, Name.Class, '#pop')
|
| 310 |
+
],
|
| 311 |
+
'duplicates': [
|
| 312 |
+
include('_whitespace'),
|
| 313 |
+
(r'\(', Punctuation, ('#pop', 'expression', '_expression')),
|
| 314 |
+
default('#pop')
|
| 315 |
+
],
|
| 316 |
+
'_object-head': [
|
| 317 |
+
(r'[%s]>' % _dash, Punctuation),
|
| 318 |
+
(r'(class|has|private|with)\b', Keyword.Declaration, '#pop'),
|
| 319 |
+
include('_global')
|
| 320 |
+
],
|
| 321 |
+
'object-body': [
|
| 322 |
+
include('_whitespace'),
|
| 323 |
+
(r';', Punctuation, '#pop:2'),
|
| 324 |
+
(r',', Punctuation),
|
| 325 |
+
(r'class\b', Keyword.Declaration, 'class-segment'),
|
| 326 |
+
(r'(has|private|with)\b', Keyword.Declaration),
|
| 327 |
+
(r':', Error),
|
| 328 |
+
default(('_object-expression', '_expression'))
|
| 329 |
+
],
|
| 330 |
+
'class-segment': [
|
| 331 |
+
include('_whitespace'),
|
| 332 |
+
(r'(?=[,;]|(class|has|private|with)\b)', Text, '#pop'),
|
| 333 |
+
(_name, Name.Class),
|
| 334 |
+
default('value')
|
| 335 |
+
],
|
| 336 |
+
# Extend, Verb
|
| 337 |
+
'grammar': [
|
| 338 |
+
include('_whitespace'),
|
| 339 |
+
(r'=', Punctuation, ('#pop', 'default')),
|
| 340 |
+
(r'\*', Punctuation, ('#pop', 'grammar-line')),
|
| 341 |
+
default('_directive-keyword')
|
| 342 |
+
],
|
| 343 |
+
'grammar-line': [
|
| 344 |
+
include('_whitespace'),
|
| 345 |
+
(r';', Punctuation, '#pop'),
|
| 346 |
+
(r'[/*]', Punctuation),
|
| 347 |
+
(r'[%s]>' % _dash, Punctuation, 'value'),
|
| 348 |
+
(r'(noun|scope)\b', Keyword, '=routine'),
|
| 349 |
+
default('_directive-keyword')
|
| 350 |
+
],
|
| 351 |
+
'=routine': [
|
| 352 |
+
include('_whitespace'),
|
| 353 |
+
(r'=', Punctuation, 'routine-name?'),
|
| 354 |
+
default('#pop')
|
| 355 |
+
],
|
| 356 |
+
# Import
|
| 357 |
+
'manifest': [
|
| 358 |
+
include('_whitespace'),
|
| 359 |
+
(r';', Punctuation, '#pop'),
|
| 360 |
+
(r',', Punctuation),
|
| 361 |
+
(r'(?i)global\b', Keyword, '_global'),
|
| 362 |
+
default('_global')
|
| 363 |
+
],
|
| 364 |
+
# Include, Link, Message
|
| 365 |
+
'diagnostic': [
|
| 366 |
+
include('_whitespace'),
|
| 367 |
+
(r'[%s]' % _dquote, String.Double, ('#pop', 'message-string')),
|
| 368 |
+
default(('#pop', 'before-plain-string', 'directive-keyword?'))
|
| 369 |
+
],
|
| 370 |
+
'before-plain-string': [
|
| 371 |
+
include('_whitespace'),
|
| 372 |
+
(r'[%s]' % _dquote, String.Double, ('#pop', 'plain-string'))
|
| 373 |
+
],
|
| 374 |
+
'message-string': [
|
| 375 |
+
(r'[~^]+', String.Escape),
|
| 376 |
+
include('plain-string')
|
| 377 |
+
],
|
| 378 |
+
|
| 379 |
+
# Keywords used in directives
|
| 380 |
+
'_directive-keyword!': [
|
| 381 |
+
include('_whitespace'),
|
| 382 |
+
(words((
|
| 383 |
+
'additive', 'alias', 'buffer', 'class', 'creature', 'data', 'error', 'fatalerror',
|
| 384 |
+
'first', 'has', 'held', 'initial', 'initstr', 'last', 'long', 'meta', 'multi',
|
| 385 |
+
'multiexcept', 'multiheld', 'multiinside', 'noun', 'number', 'only', 'private',
|
| 386 |
+
'replace', 'reverse', 'scope', 'score', 'special', 'string', 'table', 'terminating',
|
| 387 |
+
'time', 'topic', 'warning', 'with'), suffix=r'\b'),
|
| 388 |
+
Keyword, '#pop'),
|
| 389 |
+
(r'[%s]{1,2}>|[+=]' % _dash, Punctuation, '#pop')
|
| 390 |
+
],
|
| 391 |
+
'_directive-keyword': [
|
| 392 |
+
include('_directive-keyword!'),
|
| 393 |
+
include('value')
|
| 394 |
+
],
|
| 395 |
+
'directive-keyword?': [
|
| 396 |
+
include('_directive-keyword!'),
|
| 397 |
+
default('#pop')
|
| 398 |
+
],
|
| 399 |
+
'property-keyword*': [
|
| 400 |
+
include('_whitespace'),
|
| 401 |
+
(r'(additive|long)\b', Keyword),
|
| 402 |
+
default('#pop')
|
| 403 |
+
],
|
| 404 |
+
'trace-keyword?': [
|
| 405 |
+
include('_whitespace'),
|
| 406 |
+
(words((
|
| 407 |
+
'assembly', 'dictionary', 'expressions', 'lines', 'linker',
|
| 408 |
+
'objects', 'off', 'on', 'symbols', 'tokens', 'verbs'), suffix=r'\b'),
|
| 409 |
+
Keyword, '#pop'),
|
| 410 |
+
default('#pop')
|
| 411 |
+
],
|
| 412 |
+
|
| 413 |
+
# Statements
|
| 414 |
+
'statements': [
|
| 415 |
+
include('_whitespace'),
|
| 416 |
+
(r'\]', Punctuation, '#pop'),
|
| 417 |
+
(r'[;{}]', Punctuation),
|
| 418 |
+
(words((
|
| 419 |
+
'box', 'break', 'continue', 'default', 'give', 'inversion',
|
| 420 |
+
'new_line', 'quit', 'read', 'remove', 'return', 'rfalse', 'rtrue',
|
| 421 |
+
'spaces', 'string', 'until'), suffix=r'\b'),
|
| 422 |
+
Keyword, 'default'),
|
| 423 |
+
(r'(do|else)\b', Keyword),
|
| 424 |
+
(r'(font|style)\b', Keyword,
|
| 425 |
+
('default', 'miscellaneous-keyword?')),
|
| 426 |
+
(r'for\b', Keyword, ('for', '(?')),
|
| 427 |
+
(r'(if|switch|while)', Keyword,
|
| 428 |
+
('expression', '_expression', '(?')),
|
| 429 |
+
(r'(jump|save|restore)\b', Keyword, ('default', 'label?')),
|
| 430 |
+
(r'objectloop\b', Keyword,
|
| 431 |
+
('_keyword-expression', 'variable?', '(?')),
|
| 432 |
+
(r'print(_ret)?\b|(?=[%s])' % _dquote, Keyword, 'print-list'),
|
| 433 |
+
(r'\.', Name.Label, 'label?'),
|
| 434 |
+
(r'@', Keyword, 'opcode'),
|
| 435 |
+
(r'#(?![agrnw]\$|#)', Punctuation, 'directive'),
|
| 436 |
+
(r'<', Punctuation, 'default'),
|
| 437 |
+
(r'move\b', Keyword,
|
| 438 |
+
('default', '_keyword-expression', '_expression')),
|
| 439 |
+
default(('default', '_keyword-expression', '_expression'))
|
| 440 |
+
],
|
| 441 |
+
'miscellaneous-keyword?': [
|
| 442 |
+
include('_whitespace'),
|
| 443 |
+
(r'(bold|fixed|from|near|off|on|reverse|roman|to|underline)\b',
|
| 444 |
+
Keyword, '#pop'),
|
| 445 |
+
(r'(a|A|an|address|char|name|number|object|property|string|the|'
|
| 446 |
+
r'The)\b(?=(\s+|(![^%s]*))*\))' % _newline, Keyword.Pseudo,
|
| 447 |
+
'#pop'),
|
| 448 |
+
(r'%s(?=(\s+|(![^%s]*))*\))' % (_name, _newline), Name.Function,
|
| 449 |
+
'#pop'),
|
| 450 |
+
default('#pop')
|
| 451 |
+
],
|
| 452 |
+
'(?': [
|
| 453 |
+
include('_whitespace'),
|
| 454 |
+
(r'\(', Punctuation, '#pop'),
|
| 455 |
+
default('#pop')
|
| 456 |
+
],
|
| 457 |
+
'for': [
|
| 458 |
+
include('_whitespace'),
|
| 459 |
+
(r';', Punctuation, ('_for-expression', '_expression')),
|
| 460 |
+
default(('_for-expression', '_expression'))
|
| 461 |
+
],
|
| 462 |
+
'print-list': [
|
| 463 |
+
include('_whitespace'),
|
| 464 |
+
(r';', Punctuation, '#pop'),
|
| 465 |
+
(r':', Error),
|
| 466 |
+
default(('_list-expression', '_expression', '_list-expression', 'form'))
|
| 467 |
+
],
|
| 468 |
+
'form': [
|
| 469 |
+
include('_whitespace'),
|
| 470 |
+
(r'\(', Punctuation, ('#pop', 'miscellaneous-keyword?')),
|
| 471 |
+
default('#pop')
|
| 472 |
+
],
|
| 473 |
+
|
| 474 |
+
# Assembly
|
| 475 |
+
'opcode': [
|
| 476 |
+
include('_whitespace'),
|
| 477 |
+
(r'[%s]' % _dquote, String.Double, ('operands', 'plain-string')),
|
| 478 |
+
(_name, Keyword, 'operands')
|
| 479 |
+
],
|
| 480 |
+
'operands': [
|
| 481 |
+
(r':', Error),
|
| 482 |
+
default(('_assembly-expression', '_expression'))
|
| 483 |
+
]
|
| 484 |
+
}
|
| 485 |
+
|
| 486 |
+
def get_tokens_unprocessed(self, text):
|
| 487 |
+
# 'in' is either a keyword or an operator.
|
| 488 |
+
# If the token two tokens after 'in' is ')', 'in' is a keyword:
|
| 489 |
+
# objectloop(a in b)
|
| 490 |
+
# Otherwise, it is an operator:
|
| 491 |
+
# objectloop(a in b && true)
|
| 492 |
+
objectloop_queue = []
|
| 493 |
+
objectloop_token_count = -1
|
| 494 |
+
previous_token = None
|
| 495 |
+
for index, token, value in RegexLexer.get_tokens_unprocessed(self,
|
| 496 |
+
text):
|
| 497 |
+
if previous_token is Name.Variable and value == 'in':
|
| 498 |
+
objectloop_queue = [[index, token, value]]
|
| 499 |
+
objectloop_token_count = 2
|
| 500 |
+
elif objectloop_token_count > 0:
|
| 501 |
+
if token not in Comment and token not in Text:
|
| 502 |
+
objectloop_token_count -= 1
|
| 503 |
+
objectloop_queue.append((index, token, value))
|
| 504 |
+
else:
|
| 505 |
+
if objectloop_token_count == 0:
|
| 506 |
+
if objectloop_queue[-1][2] == ')':
|
| 507 |
+
objectloop_queue[0][1] = Keyword
|
| 508 |
+
while objectloop_queue:
|
| 509 |
+
yield objectloop_queue.pop(0)
|
| 510 |
+
objectloop_token_count = -1
|
| 511 |
+
yield index, token, value
|
| 512 |
+
if token not in Comment and token not in Text:
|
| 513 |
+
previous_token = token
|
| 514 |
+
while objectloop_queue:
|
| 515 |
+
yield objectloop_queue.pop(0)
|
| 516 |
+
|
| 517 |
+
|
| 518 |
+
class Inform7Lexer(RegexLexer):
|
| 519 |
+
"""
|
| 520 |
+
For `Inform 7 <http://inform7.com/>`_ source code.
|
| 521 |
+
|
| 522 |
+
.. versionadded:: 2.0
|
| 523 |
+
"""
|
| 524 |
+
|
| 525 |
+
name = 'Inform 7'
|
| 526 |
+
aliases = ['inform7', 'i7']
|
| 527 |
+
filenames = ['*.ni', '*.i7x']
|
| 528 |
+
|
| 529 |
+
flags = re.MULTILINE | re.DOTALL | re.UNICODE
|
| 530 |
+
|
| 531 |
+
_dash = Inform6Lexer._dash
|
| 532 |
+
_dquote = Inform6Lexer._dquote
|
| 533 |
+
_newline = Inform6Lexer._newline
|
| 534 |
+
_start = r'\A|(?<=[%s])' % _newline
|
| 535 |
+
|
| 536 |
+
# There are three variants of Inform 7, differing in how to
|
| 537 |
+
# interpret at signs and braces in I6T. In top-level inclusions, at
|
| 538 |
+
# signs in the first column are inweb syntax. In phrase definitions
|
| 539 |
+
# and use options, tokens in braces are treated as I7. Use options
|
| 540 |
+
# also interpret "{N}".
|
| 541 |
+
tokens = {}
|
| 542 |
+
token_variants = ['+i6t-not-inline', '+i6t-inline', '+i6t-use-option']
|
| 543 |
+
|
| 544 |
+
for level in token_variants:
|
| 545 |
+
tokens[level] = {
|
| 546 |
+
'+i6-root': list(Inform6Lexer.tokens['root']),
|
| 547 |
+
'+i6t-root': [ # For Inform6TemplateLexer
|
| 548 |
+
(r'[^%s]*' % Inform6Lexer._newline, Comment.Preproc,
|
| 549 |
+
('directive', '+p'))
|
| 550 |
+
],
|
| 551 |
+
'root': [
|
| 552 |
+
(r'(\|?\s)+', Text),
|
| 553 |
+
(r'\[', Comment.Multiline, '+comment'),
|
| 554 |
+
(r'[%s]' % _dquote, Generic.Heading,
|
| 555 |
+
('+main', '+titling', '+titling-string')),
|
| 556 |
+
default(('+main', '+heading?'))
|
| 557 |
+
],
|
| 558 |
+
'+titling-string': [
|
| 559 |
+
(r'[^%s]+' % _dquote, Generic.Heading),
|
| 560 |
+
(r'[%s]' % _dquote, Generic.Heading, '#pop')
|
| 561 |
+
],
|
| 562 |
+
'+titling': [
|
| 563 |
+
(r'\[', Comment.Multiline, '+comment'),
|
| 564 |
+
(r'[^%s.;:|%s]+' % (_dquote, _newline), Generic.Heading),
|
| 565 |
+
(r'[%s]' % _dquote, Generic.Heading, '+titling-string'),
|
| 566 |
+
(r'[%s]{2}|(?<=[\s%s])\|[\s%s]' % (_newline, _dquote, _dquote),
|
| 567 |
+
Text, ('#pop', '+heading?')),
|
| 568 |
+
(r'[.;:]|(?<=[\s%s])\|' % _dquote, Text, '#pop'),
|
| 569 |
+
(r'[|%s]' % _newline, Generic.Heading)
|
| 570 |
+
],
|
| 571 |
+
'+main': [
|
| 572 |
+
(r'(?i)[^%s:a\[(|%s]+' % (_dquote, _newline), Text),
|
| 573 |
+
(r'[%s]' % _dquote, String.Double, '+text'),
|
| 574 |
+
(r':', Text, '+phrase-definition'),
|
| 575 |
+
(r'(?i)\bas\b', Text, '+use-option'),
|
| 576 |
+
(r'\[', Comment.Multiline, '+comment'),
|
| 577 |
+
(r'(\([%s])(.*?)([%s]\))' % (_dash, _dash),
|
| 578 |
+
bygroups(Punctuation,
|
| 579 |
+
using(this, state=('+i6-root', 'directive'),
|
| 580 |
+
i6t='+i6t-not-inline'), Punctuation)),
|
| 581 |
+
(r'(%s|(?<=[\s;:.%s]))\|\s|[%s]{2,}' %
|
| 582 |
+
(_start, _dquote, _newline), Text, '+heading?'),
|
| 583 |
+
(r'(?i)[a(|%s]' % _newline, Text)
|
| 584 |
+
],
|
| 585 |
+
'+phrase-definition': [
|
| 586 |
+
(r'\s+', Text),
|
| 587 |
+
(r'\[', Comment.Multiline, '+comment'),
|
| 588 |
+
(r'(\([%s])(.*?)([%s]\))' % (_dash, _dash),
|
| 589 |
+
bygroups(Punctuation,
|
| 590 |
+
using(this, state=('+i6-root', 'directive',
|
| 591 |
+
'default', 'statements'),
|
| 592 |
+
i6t='+i6t-inline'), Punctuation), '#pop'),
|
| 593 |
+
default('#pop')
|
| 594 |
+
],
|
| 595 |
+
'+use-option': [
|
| 596 |
+
(r'\s+', Text),
|
| 597 |
+
(r'\[', Comment.Multiline, '+comment'),
|
| 598 |
+
(r'(\([%s])(.*?)([%s]\))' % (_dash, _dash),
|
| 599 |
+
bygroups(Punctuation,
|
| 600 |
+
using(this, state=('+i6-root', 'directive'),
|
| 601 |
+
i6t='+i6t-use-option'), Punctuation), '#pop'),
|
| 602 |
+
default('#pop')
|
| 603 |
+
],
|
| 604 |
+
'+comment': [
|
| 605 |
+
(r'[^\[\]]+', Comment.Multiline),
|
| 606 |
+
(r'\[', Comment.Multiline, '#push'),
|
| 607 |
+
(r'\]', Comment.Multiline, '#pop')
|
| 608 |
+
],
|
| 609 |
+
'+text': [
|
| 610 |
+
(r'[^\[%s]+' % _dquote, String.Double),
|
| 611 |
+
(r'\[.*?\]', String.Interpol),
|
| 612 |
+
(r'[%s]' % _dquote, String.Double, '#pop')
|
| 613 |
+
],
|
| 614 |
+
'+heading?': [
|
| 615 |
+
(r'(\|?\s)+', Text),
|
| 616 |
+
(r'\[', Comment.Multiline, '+comment'),
|
| 617 |
+
(r'[%s]{4}\s+' % _dash, Text, '+documentation-heading'),
|
| 618 |
+
(r'[%s]{1,3}' % _dash, Text),
|
| 619 |
+
(r'(?i)(volume|book|part|chapter|section)\b[^%s]*' % _newline,
|
| 620 |
+
Generic.Heading, '#pop'),
|
| 621 |
+
default('#pop')
|
| 622 |
+
],
|
| 623 |
+
'+documentation-heading': [
|
| 624 |
+
(r'\s+', Text),
|
| 625 |
+
(r'\[', Comment.Multiline, '+comment'),
|
| 626 |
+
(r'(?i)documentation\s+', Text, '+documentation-heading2'),
|
| 627 |
+
default('#pop')
|
| 628 |
+
],
|
| 629 |
+
'+documentation-heading2': [
|
| 630 |
+
(r'\s+', Text),
|
| 631 |
+
(r'\[', Comment.Multiline, '+comment'),
|
| 632 |
+
(r'[%s]{4}\s' % _dash, Text, '+documentation'),
|
| 633 |
+
default('#pop:2')
|
| 634 |
+
],
|
| 635 |
+
'+documentation': [
|
| 636 |
+
(r'(?i)(%s)\s*(chapter|example)\s*:[^%s]*' %
|
| 637 |
+
(_start, _newline), Generic.Heading),
|
| 638 |
+
(r'(?i)(%s)\s*section\s*:[^%s]*' % (_start, _newline),
|
| 639 |
+
Generic.Subheading),
|
| 640 |
+
(r'((%s)\t.*?[%s])+' % (_start, _newline),
|
| 641 |
+
using(this, state='+main')),
|
| 642 |
+
(r'[^%s\[]+|[%s\[]' % (_newline, _newline), Text),
|
| 643 |
+
(r'\[', Comment.Multiline, '+comment'),
|
| 644 |
+
],
|
| 645 |
+
'+i6t-not-inline': [
|
| 646 |
+
(r'(%s)@c( .*?)?([%s]|\Z)' % (_start, _newline),
|
| 647 |
+
Comment.Preproc),
|
| 648 |
+
(r'(%s)@([%s]+|Purpose:)[^%s]*' % (_start, _dash, _newline),
|
| 649 |
+
Comment.Preproc),
|
| 650 |
+
(r'(%s)@p( .*?)?([%s]|\Z)' % (_start, _newline),
|
| 651 |
+
Generic.Heading, '+p')
|
| 652 |
+
],
|
| 653 |
+
'+i6t-use-option': [
|
| 654 |
+
include('+i6t-not-inline'),
|
| 655 |
+
(r'(\{)(N)(\})', bygroups(Punctuation, Text, Punctuation))
|
| 656 |
+
],
|
| 657 |
+
'+i6t-inline': [
|
| 658 |
+
(r'(\{)(\S[^}]*)?(\})',
|
| 659 |
+
bygroups(Punctuation, using(this, state='+main'),
|
| 660 |
+
Punctuation))
|
| 661 |
+
],
|
| 662 |
+
'+i6t': [
|
| 663 |
+
(r'(\{[%s])(![^}]*)(\}?)' % _dash,
|
| 664 |
+
bygroups(Punctuation, Comment.Single, Punctuation)),
|
| 665 |
+
(r'(\{[%s])(lines)(:)([^}]*)(\}?)' % _dash,
|
| 666 |
+
bygroups(Punctuation, Keyword, Punctuation, Text,
|
| 667 |
+
Punctuation), '+lines'),
|
| 668 |
+
(r'(\{[%s])([^:}]*)(:?)([^}]*)(\}?)' % _dash,
|
| 669 |
+
bygroups(Punctuation, Keyword, Punctuation, Text,
|
| 670 |
+
Punctuation)),
|
| 671 |
+
(r'(\(\+)(.*?)(\+\)|\Z)',
|
| 672 |
+
bygroups(Punctuation, using(this, state='+main'),
|
| 673 |
+
Punctuation))
|
| 674 |
+
],
|
| 675 |
+
'+p': [
|
| 676 |
+
(r'[^@]+', Comment.Preproc),
|
| 677 |
+
(r'(%s)@c( .*?)?([%s]|\Z)' % (_start, _newline),
|
| 678 |
+
Comment.Preproc, '#pop'),
|
| 679 |
+
(r'(%s)@([%s]|Purpose:)' % (_start, _dash), Comment.Preproc),
|
| 680 |
+
(r'(%s)@p( .*?)?([%s]|\Z)' % (_start, _newline),
|
| 681 |
+
Generic.Heading),
|
| 682 |
+
(r'@', Comment.Preproc)
|
| 683 |
+
],
|
| 684 |
+
'+lines': [
|
| 685 |
+
(r'(%s)@c( .*?)?([%s]|\Z)' % (_start, _newline),
|
| 686 |
+
Comment.Preproc),
|
| 687 |
+
(r'(%s)@([%s]|Purpose:)[^%s]*' % (_start, _dash, _newline),
|
| 688 |
+
Comment.Preproc),
|
| 689 |
+
(r'(%s)@p( .*?)?([%s]|\Z)' % (_start, _newline),
|
| 690 |
+
Generic.Heading, '+p'),
|
| 691 |
+
(r'(%s)@\w*[ %s]' % (_start, _newline), Keyword),
|
| 692 |
+
(r'![^%s]*' % _newline, Comment.Single),
|
| 693 |
+
(r'(\{)([%s]endlines)(\})' % _dash,
|
| 694 |
+
bygroups(Punctuation, Keyword, Punctuation), '#pop'),
|
| 695 |
+
(r'[^@!{]+?([%s]|\Z)|.' % _newline, Text)
|
| 696 |
+
]
|
| 697 |
+
}
|
| 698 |
+
# Inform 7 can include snippets of Inform 6 template language,
|
| 699 |
+
# so all of Inform6Lexer's states are copied here, with
|
| 700 |
+
# modifications to account for template syntax. Inform7Lexer's
|
| 701 |
+
# own states begin with '+' to avoid name conflicts. Some of
|
| 702 |
+
# Inform6Lexer's states begin with '_': these are not modified.
|
| 703 |
+
# They deal with template syntax either by including modified
|
| 704 |
+
# states, or by matching r'' then pushing to modified states.
|
| 705 |
+
for token in Inform6Lexer.tokens:
|
| 706 |
+
if token == 'root':
|
| 707 |
+
continue
|
| 708 |
+
tokens[level][token] = list(Inform6Lexer.tokens[token])
|
| 709 |
+
if not token.startswith('_'):
|
| 710 |
+
tokens[level][token][:0] = [include('+i6t'), include(level)]
|
| 711 |
+
|
| 712 |
+
def __init__(self, **options):
|
| 713 |
+
level = options.get('i6t', '+i6t-not-inline')
|
| 714 |
+
if level not in self._all_tokens:
|
| 715 |
+
self._tokens = self.__class__.process_tokendef(level)
|
| 716 |
+
else:
|
| 717 |
+
self._tokens = self._all_tokens[level]
|
| 718 |
+
RegexLexer.__init__(self, **options)
|
| 719 |
+
|
| 720 |
+
|
| 721 |
+
class Inform6TemplateLexer(Inform7Lexer):
|
| 722 |
+
"""
|
| 723 |
+
For `Inform 6 template
|
| 724 |
+
<http://inform7.com/sources/src/i6template/Woven/index.html>`_ code.
|
| 725 |
+
|
| 726 |
+
.. versionadded:: 2.0
|
| 727 |
+
"""
|
| 728 |
+
|
| 729 |
+
name = 'Inform 6 template'
|
| 730 |
+
aliases = ['i6t']
|
| 731 |
+
filenames = ['*.i6t']
|
| 732 |
+
|
| 733 |
+
def get_tokens_unprocessed(self, text, stack=('+i6t-root',)):
|
| 734 |
+
return Inform7Lexer.get_tokens_unprocessed(self, text, stack)
|
| 735 |
+
|
| 736 |
+
|
| 737 |
+
class Tads3Lexer(RegexLexer):
|
| 738 |
+
"""
|
| 739 |
+
For `TADS 3 <http://www.tads.org/>`_ source code.
|
| 740 |
+
"""
|
| 741 |
+
|
| 742 |
+
name = 'TADS 3'
|
| 743 |
+
aliases = ['tads3']
|
| 744 |
+
filenames = ['*.t']
|
| 745 |
+
|
| 746 |
+
flags = re.DOTALL | re.MULTILINE
|
| 747 |
+
|
| 748 |
+
_comment_single = r'(?://(?:[^\\\n]|\\+[\w\W])*$)'
|
| 749 |
+
_comment_multiline = r'(?:/\*(?:[^*]|\*(?!/))*\*/)'
|
| 750 |
+
_escape = (r'(?:\\(?:[\n\\<>"\'^v bnrt]|u[\da-fA-F]{,4}|x[\da-fA-F]{,2}|'
|
| 751 |
+
r'[0-3]?[0-7]{1,2}))')
|
| 752 |
+
_name = r'(?:[_a-zA-Z]\w*)'
|
| 753 |
+
_no_quote = r'(?=\s|\\?>)'
|
| 754 |
+
_operator = (r'(?:&&|\|\||\+\+|--|\?\?|::|[.,@\[\]~]|'
|
| 755 |
+
r'(?:[=+\-*/%!&|^]|<<?|>>?>?)=?)')
|
| 756 |
+
_ws = r'(?:\\|\s|%s|%s)' % (_comment_single, _comment_multiline)
|
| 757 |
+
_ws_pp = r'(?:\\\n|[^\S\n]|%s|%s)' % (_comment_single, _comment_multiline)
|
| 758 |
+
|
| 759 |
+
def _make_string_state(triple, double, verbatim=None, _escape=_escape):
|
| 760 |
+
if verbatim:
|
| 761 |
+
verbatim = ''.join(['(?:%s|%s)' % (re.escape(c.lower()),
|
| 762 |
+
re.escape(c.upper()))
|
| 763 |
+
for c in verbatim])
|
| 764 |
+
char = r'"' if double else r"'"
|
| 765 |
+
token = String.Double if double else String.Single
|
| 766 |
+
escaped_quotes = r'+|%s(?!%s{2})' % (char, char) if triple else r''
|
| 767 |
+
prefix = '%s%s' % ('t' if triple else '', 'd' if double else 's')
|
| 768 |
+
tag_state_name = '%sqt' % prefix
|
| 769 |
+
state = []
|
| 770 |
+
if triple:
|
| 771 |
+
state += [
|
| 772 |
+
(r'%s{3,}' % char, token, '#pop'),
|
| 773 |
+
(r'\\%s+' % char, String.Escape),
|
| 774 |
+
(char, token)
|
| 775 |
+
]
|
| 776 |
+
else:
|
| 777 |
+
state.append((char, token, '#pop'))
|
| 778 |
+
state += [
|
| 779 |
+
include('s/verbatim'),
|
| 780 |
+
(r'[^\\<&{}%s]+' % char, token)
|
| 781 |
+
]
|
| 782 |
+
if verbatim:
|
| 783 |
+
# This regex can't use `(?i)` because escape sequences are
|
| 784 |
+
# case-sensitive. `<\XMP>` works; `<\xmp>` doesn't.
|
| 785 |
+
state.append((r'\\?<(/|\\\\|(?!%s)\\)%s(?=[\s=>])' %
|
| 786 |
+
(_escape, verbatim),
|
| 787 |
+
Name.Tag, ('#pop', '%sqs' % prefix, tag_state_name)))
|
| 788 |
+
else:
|
| 789 |
+
state += [
|
| 790 |
+
(r'\\?<!([^><\\%s]|<(?!<)|\\%s%s|%s|\\.)*>?' %
|
| 791 |
+
(char, char, escaped_quotes, _escape), Comment.Multiline),
|
| 792 |
+
(r'(?i)\\?<listing(?=[\s=>]|\\>)', Name.Tag,
|
| 793 |
+
('#pop', '%sqs/listing' % prefix, tag_state_name)),
|
| 794 |
+
(r'(?i)\\?<xmp(?=[\s=>]|\\>)', Name.Tag,
|
| 795 |
+
('#pop', '%sqs/xmp' % prefix, tag_state_name)),
|
| 796 |
+
(r'\\?<([^\s=><\\%s]|<(?!<)|\\%s%s|%s|\\.)*' %
|
| 797 |
+
(char, char, escaped_quotes, _escape), Name.Tag,
|
| 798 |
+
tag_state_name),
|
| 799 |
+
include('s/entity')
|
| 800 |
+
]
|
| 801 |
+
state += [
|
| 802 |
+
include('s/escape'),
|
| 803 |
+
(r'\{([^}<\\%s]|<(?!<)|\\%s%s|%s|\\.)*\}' %
|
| 804 |
+
(char, char, escaped_quotes, _escape), String.Interpol),
|
| 805 |
+
(r'[\\&{}<]', token)
|
| 806 |
+
]
|
| 807 |
+
return state
|
| 808 |
+
|
| 809 |
+
def _make_tag_state(triple, double, _escape=_escape):
|
| 810 |
+
char = r'"' if double else r"'"
|
| 811 |
+
quantifier = r'{3,}' if triple else r''
|
| 812 |
+
state_name = '%s%sqt' % ('t' if triple else '', 'd' if double else 's')
|
| 813 |
+
token = String.Double if double else String.Single
|
| 814 |
+
escaped_quotes = r'+|%s(?!%s{2})' % (char, char) if triple else r''
|
| 815 |
+
return [
|
| 816 |
+
(r'%s%s' % (char, quantifier), token, '#pop:2'),
|
| 817 |
+
(r'(\s|\\\n)+', Text),
|
| 818 |
+
(r'(=)(\\?")', bygroups(Punctuation, String.Double),
|
| 819 |
+
'dqs/%s' % state_name),
|
| 820 |
+
(r"(=)(\\?')", bygroups(Punctuation, String.Single),
|
| 821 |
+
'sqs/%s' % state_name),
|
| 822 |
+
(r'=', Punctuation, 'uqs/%s' % state_name),
|
| 823 |
+
(r'\\?>', Name.Tag, '#pop'),
|
| 824 |
+
(r'\{([^}<\\%s]|<(?!<)|\\%s%s|%s|\\.)*\}' %
|
| 825 |
+
(char, char, escaped_quotes, _escape), String.Interpol),
|
| 826 |
+
(r'([^\s=><\\%s]|<(?!<)|\\%s%s|%s|\\.)+' %
|
| 827 |
+
(char, char, escaped_quotes, _escape), Name.Attribute),
|
| 828 |
+
include('s/escape'),
|
| 829 |
+
include('s/verbatim'),
|
| 830 |
+
include('s/entity'),
|
| 831 |
+
(r'[\\{}&]', Name.Attribute)
|
| 832 |
+
]
|
| 833 |
+
|
| 834 |
+
def _make_attribute_value_state(terminator, host_triple, host_double,
|
| 835 |
+
_escape=_escape):
|
| 836 |
+
token = (String.Double if terminator == r'"' else
|
| 837 |
+
String.Single if terminator == r"'" else String.Other)
|
| 838 |
+
host_char = r'"' if host_double else r"'"
|
| 839 |
+
host_quantifier = r'{3,}' if host_triple else r''
|
| 840 |
+
host_token = String.Double if host_double else String.Single
|
| 841 |
+
escaped_quotes = (r'+|%s(?!%s{2})' % (host_char, host_char)
|
| 842 |
+
if host_triple else r'')
|
| 843 |
+
return [
|
| 844 |
+
(r'%s%s' % (host_char, host_quantifier), host_token, '#pop:3'),
|
| 845 |
+
(r'%s%s' % (r'' if token is String.Other else r'\\?', terminator),
|
| 846 |
+
token, '#pop'),
|
| 847 |
+
include('s/verbatim'),
|
| 848 |
+
include('s/entity'),
|
| 849 |
+
(r'\{([^}<\\%s]|<(?!<)|\\%s%s|%s|\\.)*\}' %
|
| 850 |
+
(host_char, host_char, escaped_quotes, _escape), String.Interpol),
|
| 851 |
+
(r'([^\s"\'<%s{}\\&])+' % (r'>' if token is String.Other else r''),
|
| 852 |
+
token),
|
| 853 |
+
include('s/escape'),
|
| 854 |
+
(r'["\'\s&{<}\\]', token)
|
| 855 |
+
]
|
| 856 |
+
|
| 857 |
+
tokens = {
|
| 858 |
+
'root': [
|
| 859 |
+
(u'\ufeff', Text),
|
| 860 |
+
(r'\{', Punctuation, 'object-body'),
|
| 861 |
+
(r';+', Punctuation),
|
| 862 |
+
(r'(?=(argcount|break|case|catch|continue|default|definingobj|'
|
| 863 |
+
r'delegated|do|else|for|foreach|finally|goto|if|inherited|'
|
| 864 |
+
r'invokee|local|nil|new|operator|replaced|return|self|switch|'
|
| 865 |
+
r'targetobj|targetprop|throw|true|try|while)\b)', Text, 'block'),
|
| 866 |
+
(r'(%s)(%s*)(\()' % (_name, _ws),
|
| 867 |
+
bygroups(Name.Function, using(this, state='whitespace'),
|
| 868 |
+
Punctuation),
|
| 869 |
+
('block?/root', 'more/parameters', 'main/parameters')),
|
| 870 |
+
include('whitespace'),
|
| 871 |
+
(r'\++', Punctuation),
|
| 872 |
+
(r'[^\s!"%-(*->@-_a-z{-~]+', Error), # Averts an infinite loop
|
| 873 |
+
(r'(?!\Z)', Text, 'main/root')
|
| 874 |
+
],
|
| 875 |
+
'main/root': [
|
| 876 |
+
include('main/basic'),
|
| 877 |
+
default(('#pop', 'object-body/no-braces', 'classes', 'class'))
|
| 878 |
+
],
|
| 879 |
+
'object-body/no-braces': [
|
| 880 |
+
(r';', Punctuation, '#pop'),
|
| 881 |
+
(r'\{', Punctuation, ('#pop', 'object-body')),
|
| 882 |
+
include('object-body')
|
| 883 |
+
],
|
| 884 |
+
'object-body': [
|
| 885 |
+
(r';', Punctuation),
|
| 886 |
+
(r'\{', Punctuation, '#push'),
|
| 887 |
+
(r'\}', Punctuation, '#pop'),
|
| 888 |
+
(r':', Punctuation, ('classes', 'class')),
|
| 889 |
+
(r'(%s?)(%s*)(\()' % (_name, _ws),
|
| 890 |
+
bygroups(Name.Function, using(this, state='whitespace'),
|
| 891 |
+
Punctuation),
|
| 892 |
+
('block?', 'more/parameters', 'main/parameters')),
|
| 893 |
+
(r'(%s)(%s*)(\{)' % (_name, _ws),
|
| 894 |
+
bygroups(Name.Function, using(this, state='whitespace'),
|
| 895 |
+
Punctuation), 'block'),
|
| 896 |
+
(r'(%s)(%s*)(:)' % (_name, _ws),
|
| 897 |
+
bygroups(Name.Variable, using(this, state='whitespace'),
|
| 898 |
+
Punctuation),
|
| 899 |
+
('object-body/no-braces', 'classes', 'class')),
|
| 900 |
+
include('whitespace'),
|
| 901 |
+
(r'->|%s' % _operator, Punctuation, 'main'),
|
| 902 |
+
default('main/object-body')
|
| 903 |
+
],
|
| 904 |
+
'main/object-body': [
|
| 905 |
+
include('main/basic'),
|
| 906 |
+
(r'(%s)(%s*)(=?)' % (_name, _ws),
|
| 907 |
+
bygroups(Name.Variable, using(this, state='whitespace'),
|
| 908 |
+
Punctuation), ('#pop', 'more', 'main')),
|
| 909 |
+
default('#pop:2')
|
| 910 |
+
],
|
| 911 |
+
'block?/root': [
|
| 912 |
+
(r'\{', Punctuation, ('#pop', 'block')),
|
| 913 |
+
include('whitespace'),
|
| 914 |
+
(r'(?=[[\'"<(:])', Text, # It might be a VerbRule macro.
|
| 915 |
+
('#pop', 'object-body/no-braces', 'grammar', 'grammar-rules')),
|
| 916 |
+
# It might be a macro like DefineAction.
|
| 917 |
+
default(('#pop', 'object-body/no-braces'))
|
| 918 |
+
],
|
| 919 |
+
'block?': [
|
| 920 |
+
(r'\{', Punctuation, ('#pop', 'block')),
|
| 921 |
+
include('whitespace'),
|
| 922 |
+
default('#pop')
|
| 923 |
+
],
|
| 924 |
+
'block/basic': [
|
| 925 |
+
(r'[;:]+', Punctuation),
|
| 926 |
+
(r'\{', Punctuation, '#push'),
|
| 927 |
+
(r'\}', Punctuation, '#pop'),
|
| 928 |
+
(r'default\b', Keyword.Reserved),
|
| 929 |
+
(r'(%s)(%s*)(:)' % (_name, _ws),
|
| 930 |
+
bygroups(Name.Label, using(this, state='whitespace'),
|
| 931 |
+
Punctuation)),
|
| 932 |
+
include('whitespace')
|
| 933 |
+
],
|
| 934 |
+
'block': [
|
| 935 |
+
include('block/basic'),
|
| 936 |
+
(r'(?!\Z)', Text, ('more', 'main'))
|
| 937 |
+
],
|
| 938 |
+
'block/embed': [
|
| 939 |
+
(r'>>', String.Interpol, '#pop'),
|
| 940 |
+
include('block/basic'),
|
| 941 |
+
(r'(?!\Z)', Text, ('more/embed', 'main'))
|
| 942 |
+
],
|
| 943 |
+
'main/basic': [
|
| 944 |
+
include('whitespace'),
|
| 945 |
+
(r'\(', Punctuation, ('#pop', 'more', 'main')),
|
| 946 |
+
(r'\[', Punctuation, ('#pop', 'more/list', 'main')),
|
| 947 |
+
(r'\{', Punctuation, ('#pop', 'more/inner', 'main/inner',
|
| 948 |
+
'more/parameters', 'main/parameters')),
|
| 949 |
+
(r'\*|\.{3}', Punctuation, '#pop'),
|
| 950 |
+
(r'(?i)0x[\da-f]+', Number.Hex, '#pop'),
|
| 951 |
+
(r'(\d+\.(?!\.)\d*|\.\d+)([eE][-+]?\d+)?|\d+[eE][-+]?\d+',
|
| 952 |
+
Number.Float, '#pop'),
|
| 953 |
+
(r'0[0-7]+', Number.Oct, '#pop'),
|
| 954 |
+
(r'\d+', Number.Integer, '#pop'),
|
| 955 |
+
(r'"""', String.Double, ('#pop', 'tdqs')),
|
| 956 |
+
(r"'''", String.Single, ('#pop', 'tsqs')),
|
| 957 |
+
(r'"', String.Double, ('#pop', 'dqs')),
|
| 958 |
+
(r"'", String.Single, ('#pop', 'sqs')),
|
| 959 |
+
(r'R"""', String.Regex, ('#pop', 'tdqr')),
|
| 960 |
+
(r"R'''", String.Regex, ('#pop', 'tsqr')),
|
| 961 |
+
(r'R"', String.Regex, ('#pop', 'dqr')),
|
| 962 |
+
(r"R'", String.Regex, ('#pop', 'sqr')),
|
| 963 |
+
# Two-token keywords
|
| 964 |
+
(r'(extern)(%s+)(object\b)' % _ws,
|
| 965 |
+
bygroups(Keyword.Reserved, using(this, state='whitespace'),
|
| 966 |
+
Keyword.Reserved)),
|
| 967 |
+
(r'(function|method)(%s*)(\()' % _ws,
|
| 968 |
+
bygroups(Keyword.Reserved, using(this, state='whitespace'),
|
| 969 |
+
Punctuation),
|
| 970 |
+
('#pop', 'block?', 'more/parameters', 'main/parameters')),
|
| 971 |
+
(r'(modify)(%s+)(grammar\b)' % _ws,
|
| 972 |
+
bygroups(Keyword.Reserved, using(this, state='whitespace'),
|
| 973 |
+
Keyword.Reserved),
|
| 974 |
+
('#pop', 'object-body/no-braces', ':', 'grammar')),
|
| 975 |
+
(r'(new)(%s+(?=(?:function|method)\b))' % _ws,
|
| 976 |
+
bygroups(Keyword.Reserved, using(this, state='whitespace'))),
|
| 977 |
+
(r'(object)(%s+)(template\b)' % _ws,
|
| 978 |
+
bygroups(Keyword.Reserved, using(this, state='whitespace'),
|
| 979 |
+
Keyword.Reserved), ('#pop', 'template')),
|
| 980 |
+
(r'(string)(%s+)(template\b)' % _ws,
|
| 981 |
+
bygroups(Keyword, using(this, state='whitespace'),
|
| 982 |
+
Keyword.Reserved), ('#pop', 'function-name')),
|
| 983 |
+
# Keywords
|
| 984 |
+
(r'(argcount|definingobj|invokee|replaced|targetobj|targetprop)\b',
|
| 985 |
+
Name.Builtin, '#pop'),
|
| 986 |
+
(r'(break|continue|goto)\b', Keyword.Reserved, ('#pop', 'label')),
|
| 987 |
+
(r'(case|extern|if|intrinsic|return|static|while)\b',
|
| 988 |
+
Keyword.Reserved),
|
| 989 |
+
(r'catch\b', Keyword.Reserved, ('#pop', 'catch')),
|
| 990 |
+
(r'class\b', Keyword.Reserved,
|
| 991 |
+
('#pop', 'object-body/no-braces', 'class')),
|
| 992 |
+
(r'(default|do|else|finally|try)\b', Keyword.Reserved, '#pop'),
|
| 993 |
+
(r'(dictionary|property)\b', Keyword.Reserved,
|
| 994 |
+
('#pop', 'constants')),
|
| 995 |
+
(r'enum\b', Keyword.Reserved, ('#pop', 'enum')),
|
| 996 |
+
(r'export\b', Keyword.Reserved, ('#pop', 'main')),
|
| 997 |
+
(r'(for|foreach)\b', Keyword.Reserved,
|
| 998 |
+
('#pop', 'more/inner', 'main/inner')),
|
| 999 |
+
(r'(function|method)\b', Keyword.Reserved,
|
| 1000 |
+
('#pop', 'block?', 'function-name')),
|
| 1001 |
+
(r'grammar\b', Keyword.Reserved,
|
| 1002 |
+
('#pop', 'object-body/no-braces', 'grammar')),
|
| 1003 |
+
(r'inherited\b', Keyword.Reserved, ('#pop', 'inherited')),
|
| 1004 |
+
(r'local\b', Keyword.Reserved,
|
| 1005 |
+
('#pop', 'more/local', 'main/local')),
|
| 1006 |
+
(r'(modify|replace|switch|throw|transient)\b', Keyword.Reserved,
|
| 1007 |
+
'#pop'),
|
| 1008 |
+
(r'new\b', Keyword.Reserved, ('#pop', 'class')),
|
| 1009 |
+
(r'(nil|true)\b', Keyword.Constant, '#pop'),
|
| 1010 |
+
(r'object\b', Keyword.Reserved, ('#pop', 'object-body/no-braces')),
|
| 1011 |
+
(r'operator\b', Keyword.Reserved, ('#pop', 'operator')),
|
| 1012 |
+
(r'propertyset\b', Keyword.Reserved,
|
| 1013 |
+
('#pop', 'propertyset', 'main')),
|
| 1014 |
+
(r'self\b', Name.Builtin.Pseudo, '#pop'),
|
| 1015 |
+
(r'template\b', Keyword.Reserved, ('#pop', 'template')),
|
| 1016 |
+
# Operators
|
| 1017 |
+
(r'(__objref|defined)(%s*)(\()' % _ws,
|
| 1018 |
+
bygroups(Operator.Word, using(this, state='whitespace'),
|
| 1019 |
+
Operator), ('#pop', 'more/__objref', 'main')),
|
| 1020 |
+
(r'delegated\b', Operator.Word),
|
| 1021 |
+
# Compiler-defined macros and built-in properties
|
| 1022 |
+
(r'(__DATE__|__DEBUG|__LINE__|__FILE__|'
|
| 1023 |
+
r'__TADS_MACRO_FORMAT_VERSION|__TADS_SYS_\w*|__TADS_SYSTEM_NAME|'
|
| 1024 |
+
r'__TADS_VERSION_MAJOR|__TADS_VERSION_MINOR|__TADS3|__TIME__|'
|
| 1025 |
+
r'construct|finalize|grammarInfo|grammarTag|lexicalParent|'
|
| 1026 |
+
r'miscVocab|sourceTextGroup|sourceTextGroupName|'
|
| 1027 |
+
r'sourceTextGroupOrder|sourceTextOrder)\b', Name.Builtin, '#pop')
|
| 1028 |
+
],
|
| 1029 |
+
'main': [
|
| 1030 |
+
include('main/basic'),
|
| 1031 |
+
(_name, Name, '#pop'),
|
| 1032 |
+
default('#pop')
|
| 1033 |
+
],
|
| 1034 |
+
'more/basic': [
|
| 1035 |
+
(r'\(', Punctuation, ('more/list', 'main')),
|
| 1036 |
+
(r'\[', Punctuation, ('more', 'main')),
|
| 1037 |
+
(r'\.{3}', Punctuation),
|
| 1038 |
+
(r'->|\.\.', Punctuation, 'main'),
|
| 1039 |
+
(r'(?=;)|[:)\]]', Punctuation, '#pop'),
|
| 1040 |
+
include('whitespace'),
|
| 1041 |
+
(_operator, Operator, 'main'),
|
| 1042 |
+
(r'\?', Operator, ('main', 'more/conditional', 'main')),
|
| 1043 |
+
(r'(is|not)(%s+)(in\b)' % _ws,
|
| 1044 |
+
bygroups(Operator.Word, using(this, state='whitespace'),
|
| 1045 |
+
Operator.Word)),
|
| 1046 |
+
(r'[^\s!"%-_a-z{-~]+', Error) # Averts an infinite loop
|
| 1047 |
+
],
|
| 1048 |
+
'more': [
|
| 1049 |
+
include('more/basic'),
|
| 1050 |
+
default('#pop')
|
| 1051 |
+
],
|
| 1052 |
+
# Then expression (conditional operator)
|
| 1053 |
+
'more/conditional': [
|
| 1054 |
+
(r':(?!:)', Operator, '#pop'),
|
| 1055 |
+
include('more')
|
| 1056 |
+
],
|
| 1057 |
+
# Embedded expressions
|
| 1058 |
+
'more/embed': [
|
| 1059 |
+
(r'>>', String.Interpol, '#pop:2'),
|
| 1060 |
+
include('more')
|
| 1061 |
+
],
|
| 1062 |
+
# For/foreach loop initializer or short-form anonymous function
|
| 1063 |
+
'main/inner': [
|
| 1064 |
+
(r'\(', Punctuation, ('#pop', 'more/inner', 'main/inner')),
|
| 1065 |
+
(r'local\b', Keyword.Reserved, ('#pop', 'main/local')),
|
| 1066 |
+
include('main')
|
| 1067 |
+
],
|
| 1068 |
+
'more/inner': [
|
| 1069 |
+
(r'\}', Punctuation, '#pop'),
|
| 1070 |
+
(r',', Punctuation, 'main/inner'),
|
| 1071 |
+
(r'(in|step)\b', Keyword, 'main/inner'),
|
| 1072 |
+
include('more')
|
| 1073 |
+
],
|
| 1074 |
+
# Local
|
| 1075 |
+
'main/local': [
|
| 1076 |
+
(_name, Name.Variable, '#pop'),
|
| 1077 |
+
include('whitespace')
|
| 1078 |
+
],
|
| 1079 |
+
'more/local': [
|
| 1080 |
+
(r',', Punctuation, 'main/local'),
|
| 1081 |
+
include('more')
|
| 1082 |
+
],
|
| 1083 |
+
# List
|
| 1084 |
+
'more/list': [
|
| 1085 |
+
(r'[,:]', Punctuation, 'main'),
|
| 1086 |
+
include('more')
|
| 1087 |
+
],
|
| 1088 |
+
# Parameter list
|
| 1089 |
+
'main/parameters': [
|
| 1090 |
+
(r'(%s)(%s*)(?=:)' % (_name, _ws),
|
| 1091 |
+
bygroups(Name.Variable, using(this, state='whitespace')), '#pop'),
|
| 1092 |
+
(r'(%s)(%s+)(%s)' % (_name, _ws, _name),
|
| 1093 |
+
bygroups(Name.Class, using(this, state='whitespace'),
|
| 1094 |
+
Name.Variable), '#pop'),
|
| 1095 |
+
(r'\[+', Punctuation),
|
| 1096 |
+
include('main/basic'),
|
| 1097 |
+
(_name, Name.Variable, '#pop'),
|
| 1098 |
+
default('#pop')
|
| 1099 |
+
],
|
| 1100 |
+
'more/parameters': [
|
| 1101 |
+
(r'(:)(%s*(?=[?=,:)]))' % _ws,
|
| 1102 |
+
bygroups(Punctuation, using(this, state='whitespace'))),
|
| 1103 |
+
(r'[?\]]+', Punctuation),
|
| 1104 |
+
(r'[:)]', Punctuation, ('#pop', 'multimethod?')),
|
| 1105 |
+
(r',', Punctuation, 'main/parameters'),
|
| 1106 |
+
(r'=', Punctuation, ('more/parameter', 'main')),
|
| 1107 |
+
include('more')
|
| 1108 |
+
],
|
| 1109 |
+
'more/parameter': [
|
| 1110 |
+
(r'(?=[,)])', Text, '#pop'),
|
| 1111 |
+
include('more')
|
| 1112 |
+
],
|
| 1113 |
+
'multimethod?': [
|
| 1114 |
+
(r'multimethod\b', Keyword, '#pop'),
|
| 1115 |
+
include('whitespace'),
|
| 1116 |
+
default('#pop')
|
| 1117 |
+
],
|
| 1118 |
+
|
| 1119 |
+
# Statements and expressions
|
| 1120 |
+
'more/__objref': [
|
| 1121 |
+
(r',', Punctuation, 'mode'),
|
| 1122 |
+
(r'\)', Operator, '#pop'),
|
| 1123 |
+
include('more')
|
| 1124 |
+
],
|
| 1125 |
+
'mode': [
|
| 1126 |
+
(r'(error|warn)\b', Keyword, '#pop'),
|
| 1127 |
+
include('whitespace')
|
| 1128 |
+
],
|
| 1129 |
+
'catch': [
|
| 1130 |
+
(r'\(+', Punctuation),
|
| 1131 |
+
(_name, Name.Exception, ('#pop', 'variables')),
|
| 1132 |
+
include('whitespace')
|
| 1133 |
+
],
|
| 1134 |
+
'enum': [
|
| 1135 |
+
include('whitespace'),
|
| 1136 |
+
(r'token\b', Keyword, ('#pop', 'constants')),
|
| 1137 |
+
default(('#pop', 'constants'))
|
| 1138 |
+
],
|
| 1139 |
+
'grammar': [
|
| 1140 |
+
(r'\)+', Punctuation),
|
| 1141 |
+
(r'\(', Punctuation, 'grammar-tag'),
|
| 1142 |
+
(r':', Punctuation, 'grammar-rules'),
|
| 1143 |
+
(_name, Name.Class),
|
| 1144 |
+
include('whitespace')
|
| 1145 |
+
],
|
| 1146 |
+
'grammar-tag': [
|
| 1147 |
+
include('whitespace'),
|
| 1148 |
+
(r'"""([^\\"<]|""?(?!")|\\"+|\\.|<(?!<))+("{3,}|<<)|'
|
| 1149 |
+
r'R"""([^\\"]|""?(?!")|\\"+|\\.)+"{3,}|'
|
| 1150 |
+
r"'''([^\\'<]|''?(?!')|\\'+|\\.|<(?!<))+('{3,}|<<)|"
|
| 1151 |
+
r"R'''([^\\']|''?(?!')|\\'+|\\.)+'{3,}|"
|
| 1152 |
+
r'"([^\\"<]|\\.|<(?!<))+("|<<)|R"([^\\"]|\\.)+"|'
|
| 1153 |
+
r"'([^\\'<]|\\.|<(?!<))+('|<<)|R'([^\\']|\\.)+'|"
|
| 1154 |
+
r"([^)\s\\/]|/(?![/*]))+|\)", String.Other, '#pop')
|
| 1155 |
+
],
|
| 1156 |
+
'grammar-rules': [
|
| 1157 |
+
include('string'),
|
| 1158 |
+
include('whitespace'),
|
| 1159 |
+
(r'(\[)(%s*)(badness)' % _ws,
|
| 1160 |
+
bygroups(Punctuation, using(this, state='whitespace'), Keyword),
|
| 1161 |
+
'main'),
|
| 1162 |
+
(r'->|%s|[()]' % _operator, Punctuation),
|
| 1163 |
+
(_name, Name.Constant),
|
| 1164 |
+
default('#pop:2')
|
| 1165 |
+
],
|
| 1166 |
+
':': [
|
| 1167 |
+
(r':', Punctuation, '#pop')
|
| 1168 |
+
],
|
| 1169 |
+
'function-name': [
|
| 1170 |
+
(r'(<<([^>]|>>>|>(?!>))*>>)+', String.Interpol),
|
| 1171 |
+
(r'(?=%s?%s*[({])' % (_name, _ws), Text, '#pop'),
|
| 1172 |
+
(_name, Name.Function, '#pop'),
|
| 1173 |
+
include('whitespace')
|
| 1174 |
+
],
|
| 1175 |
+
'inherited': [
|
| 1176 |
+
(r'<', Punctuation, ('#pop', 'classes', 'class')),
|
| 1177 |
+
include('whitespace'),
|
| 1178 |
+
(_name, Name.Class, '#pop'),
|
| 1179 |
+
default('#pop')
|
| 1180 |
+
],
|
| 1181 |
+
'operator': [
|
| 1182 |
+
(r'negate\b', Operator.Word, '#pop'),
|
| 1183 |
+
include('whitespace'),
|
| 1184 |
+
(_operator, Operator),
|
| 1185 |
+
default('#pop')
|
| 1186 |
+
],
|
| 1187 |
+
'propertyset': [
|
| 1188 |
+
(r'\(', Punctuation, ('more/parameters', 'main/parameters')),
|
| 1189 |
+
(r'\{', Punctuation, ('#pop', 'object-body')),
|
| 1190 |
+
include('whitespace')
|
| 1191 |
+
],
|
| 1192 |
+
'template': [
|
| 1193 |
+
(r'(?=;)', Text, '#pop'),
|
| 1194 |
+
include('string'),
|
| 1195 |
+
(r'inherited\b', Keyword.Reserved),
|
| 1196 |
+
include('whitespace'),
|
| 1197 |
+
(r'->|\?|%s' % _operator, Punctuation),
|
| 1198 |
+
(_name, Name.Variable)
|
| 1199 |
+
],
|
| 1200 |
+
|
| 1201 |
+
# Identifiers
|
| 1202 |
+
'class': [
|
| 1203 |
+
(r'\*|\.{3}', Punctuation, '#pop'),
|
| 1204 |
+
(r'object\b', Keyword.Reserved, '#pop'),
|
| 1205 |
+
(r'transient\b', Keyword.Reserved),
|
| 1206 |
+
(_name, Name.Class, '#pop'),
|
| 1207 |
+
include('whitespace'),
|
| 1208 |
+
default('#pop')
|
| 1209 |
+
],
|
| 1210 |
+
'classes': [
|
| 1211 |
+
(r'[:,]', Punctuation, 'class'),
|
| 1212 |
+
include('whitespace'),
|
| 1213 |
+
(r'>', Punctuation, '#pop'),
|
| 1214 |
+
default('#pop')
|
| 1215 |
+
],
|
| 1216 |
+
'constants': [
|
| 1217 |
+
(r',+', Punctuation),
|
| 1218 |
+
(r';', Punctuation, '#pop'),
|
| 1219 |
+
(r'property\b', Keyword.Reserved),
|
| 1220 |
+
(_name, Name.Constant),
|
| 1221 |
+
include('whitespace')
|
| 1222 |
+
],
|
| 1223 |
+
'label': [
|
| 1224 |
+
(_name, Name.Label, '#pop'),
|
| 1225 |
+
include('whitespace'),
|
| 1226 |
+
default('#pop')
|
| 1227 |
+
],
|
| 1228 |
+
'variables': [
|
| 1229 |
+
(r',+', Punctuation),
|
| 1230 |
+
(r'\)', Punctuation, '#pop'),
|
| 1231 |
+
include('whitespace'),
|
| 1232 |
+
(_name, Name.Variable)
|
| 1233 |
+
],
|
| 1234 |
+
|
| 1235 |
+
# Whitespace and comments
|
| 1236 |
+
'whitespace': [
|
| 1237 |
+
(r'^%s*#(%s|[^\n]|(?<=\\)\n)*\n?' % (_ws_pp, _comment_multiline),
|
| 1238 |
+
Comment.Preproc),
|
| 1239 |
+
(_comment_single, Comment.Single),
|
| 1240 |
+
(_comment_multiline, Comment.Multiline),
|
| 1241 |
+
(r'\\+\n+%s*#?|\n+|([^\S\n]|\\)+' % _ws_pp, Text)
|
| 1242 |
+
],
|
| 1243 |
+
|
| 1244 |
+
# Strings
|
| 1245 |
+
'string': [
|
| 1246 |
+
(r'"""', String.Double, 'tdqs'),
|
| 1247 |
+
(r"'''", String.Single, 'tsqs'),
|
| 1248 |
+
(r'"', String.Double, 'dqs'),
|
| 1249 |
+
(r"'", String.Single, 'sqs')
|
| 1250 |
+
],
|
| 1251 |
+
's/escape': [
|
| 1252 |
+
(r'\{\{|\}\}|%s' % _escape, String.Escape)
|
| 1253 |
+
],
|
| 1254 |
+
's/verbatim': [
|
| 1255 |
+
(r'<<\s*(as\s+decreasingly\s+likely\s+outcomes|cycling|else|end|'
|
| 1256 |
+
r'first\s+time|one\s+of|only|or|otherwise|'
|
| 1257 |
+
r'(sticky|(then\s+)?(purely\s+)?at)\s+random|stopping|'
|
| 1258 |
+
r'(then\s+)?(half\s+)?shuffled|\|\|)\s*>>', String.Interpol),
|
| 1259 |
+
(r'<<(%%(_(%s|\\?.)|[\-+ ,#]|\[\d*\]?)*\d*\.?\d*(%s|\\?.)|'
|
| 1260 |
+
r'\s*((else|otherwise)\s+)?(if|unless)\b)?' % (_escape, _escape),
|
| 1261 |
+
String.Interpol, ('block/embed', 'more/embed', 'main'))
|
| 1262 |
+
],
|
| 1263 |
+
's/entity': [
|
| 1264 |
+
(r'(?i)&(#(x[\da-f]+|\d+)|[a-z][\da-z]*);?', Name.Entity)
|
| 1265 |
+
],
|
| 1266 |
+
'tdqs': _make_string_state(True, True),
|
| 1267 |
+
'tsqs': _make_string_state(True, False),
|
| 1268 |
+
'dqs': _make_string_state(False, True),
|
| 1269 |
+
'sqs': _make_string_state(False, False),
|
| 1270 |
+
'tdqs/listing': _make_string_state(True, True, 'listing'),
|
| 1271 |
+
'tsqs/listing': _make_string_state(True, False, 'listing'),
|
| 1272 |
+
'dqs/listing': _make_string_state(False, True, 'listing'),
|
| 1273 |
+
'sqs/listing': _make_string_state(False, False, 'listing'),
|
| 1274 |
+
'tdqs/xmp': _make_string_state(True, True, 'xmp'),
|
| 1275 |
+
'tsqs/xmp': _make_string_state(True, False, 'xmp'),
|
| 1276 |
+
'dqs/xmp': _make_string_state(False, True, 'xmp'),
|
| 1277 |
+
'sqs/xmp': _make_string_state(False, False, 'xmp'),
|
| 1278 |
+
|
| 1279 |
+
# Tags
|
| 1280 |
+
'tdqt': _make_tag_state(True, True),
|
| 1281 |
+
'tsqt': _make_tag_state(True, False),
|
| 1282 |
+
'dqt': _make_tag_state(False, True),
|
| 1283 |
+
'sqt': _make_tag_state(False, False),
|
| 1284 |
+
'dqs/tdqt': _make_attribute_value_state(r'"', True, True),
|
| 1285 |
+
'dqs/tsqt': _make_attribute_value_state(r'"', True, False),
|
| 1286 |
+
'dqs/dqt': _make_attribute_value_state(r'"', False, True),
|
| 1287 |
+
'dqs/sqt': _make_attribute_value_state(r'"', False, False),
|
| 1288 |
+
'sqs/tdqt': _make_attribute_value_state(r"'", True, True),
|
| 1289 |
+
'sqs/tsqt': _make_attribute_value_state(r"'", True, False),
|
| 1290 |
+
'sqs/dqt': _make_attribute_value_state(r"'", False, True),
|
| 1291 |
+
'sqs/sqt': _make_attribute_value_state(r"'", False, False),
|
| 1292 |
+
'uqs/tdqt': _make_attribute_value_state(_no_quote, True, True),
|
| 1293 |
+
'uqs/tsqt': _make_attribute_value_state(_no_quote, True, False),
|
| 1294 |
+
'uqs/dqt': _make_attribute_value_state(_no_quote, False, True),
|
| 1295 |
+
'uqs/sqt': _make_attribute_value_state(_no_quote, False, False),
|
| 1296 |
+
|
| 1297 |
+
# Regular expressions
|
| 1298 |
+
'tdqr': [
|
| 1299 |
+
(r'[^\\"]+', String.Regex),
|
| 1300 |
+
(r'\\"*', String.Regex),
|
| 1301 |
+
(r'"{3,}', String.Regex, '#pop'),
|
| 1302 |
+
(r'"', String.Regex)
|
| 1303 |
+
],
|
| 1304 |
+
'tsqr': [
|
| 1305 |
+
(r"[^\\']+", String.Regex),
|
| 1306 |
+
(r"\\'*", String.Regex),
|
| 1307 |
+
(r"'{3,}", String.Regex, '#pop'),
|
| 1308 |
+
(r"'", String.Regex)
|
| 1309 |
+
],
|
| 1310 |
+
'dqr': [
|
| 1311 |
+
(r'[^\\"]+', String.Regex),
|
| 1312 |
+
(r'\\"?', String.Regex),
|
| 1313 |
+
(r'"', String.Regex, '#pop')
|
| 1314 |
+
],
|
| 1315 |
+
'sqr': [
|
| 1316 |
+
(r"[^\\']+", String.Regex),
|
| 1317 |
+
(r"\\'?", String.Regex),
|
| 1318 |
+
(r"'", String.Regex, '#pop')
|
| 1319 |
+
]
|
| 1320 |
+
}
|
| 1321 |
+
|
| 1322 |
+
def get_tokens_unprocessed(self, text, **kwargs):
|
| 1323 |
+
pp = r'^%s*#%s*' % (self._ws_pp, self._ws_pp)
|
| 1324 |
+
if_false_level = 0
|
| 1325 |
+
for index, token, value in (
|
| 1326 |
+
RegexLexer.get_tokens_unprocessed(self, text, **kwargs)):
|
| 1327 |
+
if if_false_level == 0: # Not in a false #if
|
| 1328 |
+
if (token is Comment.Preproc and
|
| 1329 |
+
re.match(r'%sif%s+(0|nil)%s*$\n?' %
|
| 1330 |
+
(pp, self._ws_pp, self._ws_pp), value)):
|
| 1331 |
+
if_false_level = 1
|
| 1332 |
+
else: # In a false #if
|
| 1333 |
+
if token is Comment.Preproc:
|
| 1334 |
+
if (if_false_level == 1 and
|
| 1335 |
+
re.match(r'%sel(if|se)\b' % pp, value)):
|
| 1336 |
+
if_false_level = 0
|
| 1337 |
+
elif re.match(r'%sif' % pp, value):
|
| 1338 |
+
if_false_level += 1
|
| 1339 |
+
elif re.match(r'%sendif\b' % pp, value):
|
| 1340 |
+
if_false_level -= 1
|
| 1341 |
+
else:
|
| 1342 |
+
token = Comment
|
| 1343 |
+
yield index, token, value
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/jvm.py
ADDED
|
@@ -0,0 +1,1573 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
+
"""
|
| 3 |
+
pygments.lexers.jvm
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Pygments lexers for JVM languages.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
import re
|
| 13 |
+
|
| 14 |
+
from pygments.lexer import Lexer, RegexLexer, include, bygroups, using, \
|
| 15 |
+
this, combined, default, words
|
| 16 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 17 |
+
Number, Punctuation
|
| 18 |
+
from pygments.util import shebang_matches
|
| 19 |
+
from pygments import unistring as uni
|
| 20 |
+
|
| 21 |
+
__all__ = ['JavaLexer', 'ScalaLexer', 'GosuLexer', 'GosuTemplateLexer',
|
| 22 |
+
'GroovyLexer', 'IokeLexer', 'ClojureLexer', 'ClojureScriptLexer',
|
| 23 |
+
'KotlinLexer', 'XtendLexer', 'AspectJLexer', 'CeylonLexer',
|
| 24 |
+
'PigLexer', 'GoloLexer', 'JasminLexer']
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
class JavaLexer(RegexLexer):
|
| 28 |
+
"""
|
| 29 |
+
For `Java <http://www.sun.com/java/>`_ source code.
|
| 30 |
+
"""
|
| 31 |
+
|
| 32 |
+
name = 'Java'
|
| 33 |
+
aliases = ['java']
|
| 34 |
+
filenames = ['*.java']
|
| 35 |
+
mimetypes = ['text/x-java']
|
| 36 |
+
|
| 37 |
+
flags = re.MULTILINE | re.DOTALL | re.UNICODE
|
| 38 |
+
|
| 39 |
+
tokens = {
|
| 40 |
+
'root': [
|
| 41 |
+
(r'[^\S\n]+', Text),
|
| 42 |
+
(r'//.*?\n', Comment.Single),
|
| 43 |
+
(r'/\*.*?\*/', Comment.Multiline),
|
| 44 |
+
# keywords: go before method names to avoid lexing "throw new XYZ"
|
| 45 |
+
# as a method signature
|
| 46 |
+
(r'(assert|break|case|catch|continue|default|do|else|finally|for|'
|
| 47 |
+
r'if|goto|instanceof|new|return|switch|this|throw|try|while)\b',
|
| 48 |
+
Keyword),
|
| 49 |
+
# method names
|
| 50 |
+
(r'((?:(?:[^\W\d]|\$)[\w.\[\]$<>]*\s+)+?)' # return arguments
|
| 51 |
+
r'((?:[^\W\d]|\$)[\w$]*)' # method name
|
| 52 |
+
r'(\s*)(\()', # signature start
|
| 53 |
+
bygroups(using(this), Name.Function, Text, Operator)),
|
| 54 |
+
(r'@[^\W\d][\w.]*', Name.Decorator),
|
| 55 |
+
(r'(abstract|const|enum|extends|final|implements|native|private|'
|
| 56 |
+
r'protected|public|static|strictfp|super|synchronized|throws|'
|
| 57 |
+
r'transient|volatile)\b', Keyword.Declaration),
|
| 58 |
+
(r'(boolean|byte|char|double|float|int|long|short|void)\b',
|
| 59 |
+
Keyword.Type),
|
| 60 |
+
(r'(package)(\s+)', bygroups(Keyword.Namespace, Text), 'import'),
|
| 61 |
+
(r'(true|false|null)\b', Keyword.Constant),
|
| 62 |
+
(r'(class|interface)(\s+)', bygroups(Keyword.Declaration, Text),
|
| 63 |
+
'class'),
|
| 64 |
+
(r'(import(?:\s+static)?)(\s+)', bygroups(Keyword.Namespace, Text),
|
| 65 |
+
'import'),
|
| 66 |
+
(r'"(\\\\|\\"|[^"])*"', String),
|
| 67 |
+
(r"'\\.'|'[^\\]'|'\\u[0-9a-fA-F]{4}'", String.Char),
|
| 68 |
+
(r'(\.)((?:[^\W\d]|\$)[\w$]*)', bygroups(Operator, Name.Attribute)),
|
| 69 |
+
(r'^\s*([^\W\d]|\$)[\w$]*:', Name.Label),
|
| 70 |
+
(r'([^\W\d]|\$)[\w$]*', Name),
|
| 71 |
+
(r'([0-9][0-9_]*\.([0-9][0-9_]*)?|'
|
| 72 |
+
r'\.[0-9][0-9_]*)'
|
| 73 |
+
r'([eE][+\-]?[0-9][0-9_]*)?[fFdD]?|'
|
| 74 |
+
r'[0-9][eE][+\-]?[0-9][0-9_]*[fFdD]?|'
|
| 75 |
+
r'[0-9]([eE][+\-]?[0-9][0-9_]*)?[fFdD]|'
|
| 76 |
+
r'0[xX]([0-9a-fA-F][0-9a-fA-F_]*\.?|'
|
| 77 |
+
r'([0-9a-fA-F][0-9a-fA-F_]*)?\.[0-9a-fA-F][0-9a-fA-F_]*)'
|
| 78 |
+
r'[pP][+\-]?[0-9][0-9_]*[fFdD]?', Number.Float),
|
| 79 |
+
(r'0[xX][0-9a-fA-F][0-9a-fA-F_]*[lL]?', Number.Hex),
|
| 80 |
+
(r'0[bB][01][01_]*[lL]?', Number.Bin),
|
| 81 |
+
(r'0[0-7_]+[lL]?', Number.Oct),
|
| 82 |
+
(r'0|[1-9][0-9_]*[lL]?', Number.Integer),
|
| 83 |
+
(r'[~^*!%&\[\](){}<>|+=:;,./?-]', Operator),
|
| 84 |
+
(r'\n', Text)
|
| 85 |
+
],
|
| 86 |
+
'class': [
|
| 87 |
+
(r'([^\W\d]|\$)[\w$]*', Name.Class, '#pop')
|
| 88 |
+
],
|
| 89 |
+
'import': [
|
| 90 |
+
(r'[\w.]+\*?', Name.Namespace, '#pop')
|
| 91 |
+
],
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
class AspectJLexer(JavaLexer):
|
| 96 |
+
"""
|
| 97 |
+
For `AspectJ <http://www.eclipse.org/aspectj/>`_ source code.
|
| 98 |
+
|
| 99 |
+
.. versionadded:: 1.6
|
| 100 |
+
"""
|
| 101 |
+
|
| 102 |
+
name = 'AspectJ'
|
| 103 |
+
aliases = ['aspectj']
|
| 104 |
+
filenames = ['*.aj']
|
| 105 |
+
mimetypes = ['text/x-aspectj']
|
| 106 |
+
|
| 107 |
+
aj_keywords = set((
|
| 108 |
+
'aspect', 'pointcut', 'privileged', 'call', 'execution',
|
| 109 |
+
'initialization', 'preinitialization', 'handler', 'get', 'set',
|
| 110 |
+
'staticinitialization', 'target', 'args', 'within', 'withincode',
|
| 111 |
+
'cflow', 'cflowbelow', 'annotation', 'before', 'after', 'around',
|
| 112 |
+
'proceed', 'throwing', 'returning', 'adviceexecution', 'declare',
|
| 113 |
+
'parents', 'warning', 'error', 'soft', 'precedence', 'thisJoinPoint',
|
| 114 |
+
'thisJoinPointStaticPart', 'thisEnclosingJoinPointStaticPart',
|
| 115 |
+
'issingleton', 'perthis', 'pertarget', 'percflow', 'percflowbelow',
|
| 116 |
+
'pertypewithin', 'lock', 'unlock', 'thisAspectInstance'
|
| 117 |
+
))
|
| 118 |
+
aj_inter_type = set(('parents:', 'warning:', 'error:', 'soft:', 'precedence:'))
|
| 119 |
+
aj_inter_type_annotation = set(('@type', '@method', '@constructor', '@field'))
|
| 120 |
+
|
| 121 |
+
def get_tokens_unprocessed(self, text):
|
| 122 |
+
for index, token, value in JavaLexer.get_tokens_unprocessed(self, text):
|
| 123 |
+
if token is Name and value in self.aj_keywords:
|
| 124 |
+
yield index, Keyword, value
|
| 125 |
+
elif token is Name.Label and value in self.aj_inter_type:
|
| 126 |
+
yield index, Keyword, value[:-1]
|
| 127 |
+
yield index, Operator, value[-1]
|
| 128 |
+
elif token is Name.Decorator and value in self.aj_inter_type_annotation:
|
| 129 |
+
yield index, Keyword, value
|
| 130 |
+
else:
|
| 131 |
+
yield index, token, value
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
class ScalaLexer(RegexLexer):
|
| 135 |
+
"""
|
| 136 |
+
For `Scala <http://www.scala-lang.org>`_ source code.
|
| 137 |
+
"""
|
| 138 |
+
|
| 139 |
+
name = 'Scala'
|
| 140 |
+
aliases = ['scala']
|
| 141 |
+
filenames = ['*.scala']
|
| 142 |
+
mimetypes = ['text/x-scala']
|
| 143 |
+
|
| 144 |
+
flags = re.MULTILINE | re.DOTALL
|
| 145 |
+
|
| 146 |
+
# don't use raw unicode strings!
|
| 147 |
+
op = (u'[-~\\^\\*!%&\\\\<>\\|+=:/?@\u00a6-\u00a7\u00a9\u00ac\u00ae\u00b0-\u00b1'
|
| 148 |
+
u'\u00b6\u00d7\u00f7\u03f6\u0482\u0606-\u0608\u060e-\u060f\u06e9'
|
| 149 |
+
u'\u06fd-\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0cf1-\u0cf2'
|
| 150 |
+
u'\u0d79\u0f01-\u0f03\u0f13-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38'
|
| 151 |
+
u'\u0fbe-\u0fc5\u0fc7-\u0fcf\u109e-\u109f\u1360\u1390-\u1399\u1940'
|
| 152 |
+
u'\u19e0-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2044\u2052\u207a-\u207c'
|
| 153 |
+
u'\u208a-\u208c\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2118'
|
| 154 |
+
u'\u211e-\u2123\u2125\u2127\u2129\u212e\u213a-\u213b\u2140-\u2144'
|
| 155 |
+
u'\u214a-\u214d\u214f\u2190-\u2328\u232b-\u244a\u249c-\u24e9\u2500-\u2767'
|
| 156 |
+
u'\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb'
|
| 157 |
+
u'\u29fe-\u2b54\u2ce5-\u2cea\u2e80-\u2ffb\u3004\u3012-\u3013\u3020'
|
| 158 |
+
u'\u3036-\u3037\u303e-\u303f\u3190-\u3191\u3196-\u319f\u31c0-\u31e3'
|
| 159 |
+
u'\u3200-\u321e\u322a-\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff'
|
| 160 |
+
u'\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ufb29\ufdfd\ufe62\ufe64-\ufe66'
|
| 161 |
+
u'\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe4\uffe8-\uffee\ufffc-\ufffd]+')
|
| 162 |
+
|
| 163 |
+
letter = (u'[a-zA-Z\\$_\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6'
|
| 164 |
+
u'\u00f8-\u02af\u0370-\u0373\u0376-\u0377\u037b-\u037d\u0386'
|
| 165 |
+
u'\u0388-\u03f5\u03f7-\u0481\u048a-\u0556\u0561-\u0587\u05d0-\u05f2'
|
| 166 |
+
u'\u0621-\u063f\u0641-\u064a\u066e-\u066f\u0671-\u06d3\u06d5'
|
| 167 |
+
u'\u06ee-\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5'
|
| 168 |
+
u'\u07b1\u07ca-\u07ea\u0904-\u0939\u093d\u0950\u0958-\u0961'
|
| 169 |
+
u'\u0972-\u097f\u0985-\u09b9\u09bd\u09ce\u09dc-\u09e1\u09f0-\u09f1'
|
| 170 |
+
u'\u0a05-\u0a39\u0a59-\u0a5e\u0a72-\u0a74\u0a85-\u0ab9\u0abd'
|
| 171 |
+
u'\u0ad0-\u0ae1\u0b05-\u0b39\u0b3d\u0b5c-\u0b61\u0b71\u0b83-\u0bb9'
|
| 172 |
+
u'\u0bd0\u0c05-\u0c3d\u0c58-\u0c61\u0c85-\u0cb9\u0cbd\u0cde-\u0ce1'
|
| 173 |
+
u'\u0d05-\u0d3d\u0d60-\u0d61\u0d7a-\u0d7f\u0d85-\u0dc6\u0e01-\u0e30'
|
| 174 |
+
u'\u0e32-\u0e33\u0e40-\u0e45\u0e81-\u0eb0\u0eb2-\u0eb3\u0ebd-\u0ec4'
|
| 175 |
+
u'\u0edc-\u0f00\u0f40-\u0f6c\u0f88-\u0f8b\u1000-\u102a\u103f'
|
| 176 |
+
u'\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070'
|
| 177 |
+
u'\u1075-\u1081\u108e\u10a0-\u10fa\u1100-\u135a\u1380-\u138f'
|
| 178 |
+
u'\u13a0-\u166c\u166f-\u1676\u1681-\u169a\u16a0-\u16ea\u16ee-\u1711'
|
| 179 |
+
u'\u1720-\u1731\u1740-\u1751\u1760-\u1770\u1780-\u17b3\u17dc'
|
| 180 |
+
u'\u1820-\u1842\u1844-\u18a8\u18aa-\u191c\u1950-\u19a9\u19c1-\u19c7'
|
| 181 |
+
u'\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae-\u1baf'
|
| 182 |
+
u'\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c77\u1d00-\u1d2b\u1d62-\u1d77'
|
| 183 |
+
u'\u1d79-\u1d9a\u1e00-\u1fbc\u1fbe\u1fc2-\u1fcc\u1fd0-\u1fdb'
|
| 184 |
+
u'\u1fe0-\u1fec\u1ff2-\u1ffc\u2071\u207f\u2102\u2107\u210a-\u2113'
|
| 185 |
+
u'\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139'
|
| 186 |
+
u'\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c7c'
|
| 187 |
+
u'\u2c80-\u2ce4\u2d00-\u2d65\u2d80-\u2dde\u3006-\u3007\u3021-\u3029'
|
| 188 |
+
u'\u3038-\u303a\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff-\u318e'
|
| 189 |
+
u'\u31a0-\u31b7\u31f0-\u31ff\u3400-\u4db5\u4e00-\ua014\ua016-\ua48c'
|
| 190 |
+
u'\ua500-\ua60b\ua610-\ua61f\ua62a-\ua66e\ua680-\ua697\ua722-\ua76f'
|
| 191 |
+
u'\ua771-\ua787\ua78b-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822'
|
| 192 |
+
u'\ua840-\ua873\ua882-\ua8b3\ua90a-\ua925\ua930-\ua946\uaa00-\uaa28'
|
| 193 |
+
u'\uaa40-\uaa42\uaa44-\uaa4b\uac00-\ud7a3\uf900-\ufb1d\ufb1f-\ufb28'
|
| 194 |
+
u'\ufb2a-\ufd3d\ufd50-\ufdfb\ufe70-\ufefc\uff21-\uff3a\uff41-\uff5a'
|
| 195 |
+
u'\uff66-\uff6f\uff71-\uff9d\uffa0-\uffdc]')
|
| 196 |
+
|
| 197 |
+
upper = (u'[A-Z\\$_\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108'
|
| 198 |
+
u'\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c'
|
| 199 |
+
u'\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130'
|
| 200 |
+
u'\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145'
|
| 201 |
+
u'\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a'
|
| 202 |
+
u'\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e'
|
| 203 |
+
u'\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182'
|
| 204 |
+
u'\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194'
|
| 205 |
+
u'\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7'
|
| 206 |
+
u'\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc'
|
| 207 |
+
u'\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9'
|
| 208 |
+
u'\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee'
|
| 209 |
+
u'\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204'
|
| 210 |
+
u'\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218'
|
| 211 |
+
u'\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c'
|
| 212 |
+
u'\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246'
|
| 213 |
+
u'\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038f'
|
| 214 |
+
u'\u0391-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0'
|
| 215 |
+
u'\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7'
|
| 216 |
+
u'\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a'
|
| 217 |
+
u'\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e'
|
| 218 |
+
u'\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a'
|
| 219 |
+
u'\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae'
|
| 220 |
+
u'\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1'
|
| 221 |
+
u'\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6'
|
| 222 |
+
u'\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea'
|
| 223 |
+
u'\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe'
|
| 224 |
+
u'\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512'
|
| 225 |
+
u'\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0531-\u0556'
|
| 226 |
+
u'\u10a0-\u10c5\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e'
|
| 227 |
+
u'\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22'
|
| 228 |
+
u'\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36'
|
| 229 |
+
u'\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a'
|
| 230 |
+
u'\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e'
|
| 231 |
+
u'\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72'
|
| 232 |
+
u'\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86'
|
| 233 |
+
u'\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2'
|
| 234 |
+
u'\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6'
|
| 235 |
+
u'\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca'
|
| 236 |
+
u'\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede'
|
| 237 |
+
u'\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2'
|
| 238 |
+
u'\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d'
|
| 239 |
+
u'\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59-\u1f5f'
|
| 240 |
+
u'\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb'
|
| 241 |
+
u'\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112'
|
| 242 |
+
u'\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133'
|
| 243 |
+
u'\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67'
|
| 244 |
+
u'\u2c69\u2c6b\u2c6d-\u2c6f\u2c72\u2c75\u2c80\u2c82\u2c84\u2c86'
|
| 245 |
+
u'\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a'
|
| 246 |
+
u'\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae'
|
| 247 |
+
u'\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2'
|
| 248 |
+
u'\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6'
|
| 249 |
+
u'\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\ua640\ua642\ua644\ua646'
|
| 250 |
+
u'\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a'
|
| 251 |
+
u'\ua65c\ua65e\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682'
|
| 252 |
+
u'\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696'
|
| 253 |
+
u'\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736'
|
| 254 |
+
u'\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a'
|
| 255 |
+
u'\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e'
|
| 256 |
+
u'\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b'
|
| 257 |
+
u'\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\uff21-\uff3a]')
|
| 258 |
+
|
| 259 |
+
idrest = u'%s(?:%s|[0-9])*(?:(?<=_)%s)?' % (letter, letter, op)
|
| 260 |
+
letter_letter_digit = u'%s(?:%s|\d)*' % (letter, letter)
|
| 261 |
+
|
| 262 |
+
tokens = {
|
| 263 |
+
'root': [
|
| 264 |
+
# method names
|
| 265 |
+
(r'(class|trait|object)(\s+)', bygroups(Keyword, Text), 'class'),
|
| 266 |
+
(r'[^\S\n]+', Text),
|
| 267 |
+
(r'//.*?\n', Comment.Single),
|
| 268 |
+
(r'/\*', Comment.Multiline, 'comment'),
|
| 269 |
+
(u'@%s' % idrest, Name.Decorator),
|
| 270 |
+
(u'(abstract|ca(?:se|tch)|d(?:ef|o)|e(?:lse|xtends)|'
|
| 271 |
+
u'f(?:inal(?:ly)?|or(?:Some)?)|i(?:f|mplicit)|'
|
| 272 |
+
u'lazy|match|new|override|pr(?:ivate|otected)'
|
| 273 |
+
u'|re(?:quires|turn)|s(?:ealed|uper)|'
|
| 274 |
+
u't(?:h(?:is|row)|ry)|va[lr]|w(?:hile|ith)|yield)\\b|'
|
| 275 |
+
u'(<[%:-]|=>|>:|[#=@_\u21D2\u2190])(\\b|(?=\\s)|$)', Keyword),
|
| 276 |
+
(u':(?!%s)' % op, Keyword, 'type'),
|
| 277 |
+
(u'%s%s\\b' % (upper, idrest), Name.Class),
|
| 278 |
+
(r'(true|false|null)\b', Keyword.Constant),
|
| 279 |
+
(r'(import|package)(\s+)', bygroups(Keyword, Text), 'import'),
|
| 280 |
+
(r'(type)(\s+)', bygroups(Keyword, Text), 'type'),
|
| 281 |
+
(r'""".*?"""(?!")', String),
|
| 282 |
+
(r'"(\\\\|\\"|[^"])*"', String),
|
| 283 |
+
(r"'\\.'|'[^\\]'|'\\u[0-9a-fA-F]{4}'", String.Char),
|
| 284 |
+
(u"'%s" % idrest, Text.Symbol),
|
| 285 |
+
(r'[fs]"""', String, 'interptriplestring'), # interpolated strings
|
| 286 |
+
(r'[fs]"', String, 'interpstring'), # interpolated strings
|
| 287 |
+
(r'raw"(\\\\|\\"|[^"])*"', String), # raw strings
|
| 288 |
+
# (ur'(\.)(%s|%s|`[^`]+`)' % (idrest, op), bygroups(Operator,
|
| 289 |
+
# Name.Attribute)),
|
| 290 |
+
(idrest, Name),
|
| 291 |
+
(r'`[^`]+`', Name),
|
| 292 |
+
(r'\[', Operator, 'typeparam'),
|
| 293 |
+
(r'[(){};,.#]', Operator),
|
| 294 |
+
(op, Operator),
|
| 295 |
+
(r'([0-9][0-9]*\.[0-9]*|\.[0-9]+)([eE][+-]?[0-9]+)?[fFdD]?',
|
| 296 |
+
Number.Float),
|
| 297 |
+
(r'0x[0-9a-fA-F]+', Number.Hex),
|
| 298 |
+
(r'[0-9]+L?', Number.Integer),
|
| 299 |
+
(r'\n', Text)
|
| 300 |
+
],
|
| 301 |
+
'class': [
|
| 302 |
+
(u'(%s|%s|`[^`]+`)(\\s*)(\\[)' % (idrest, op),
|
| 303 |
+
bygroups(Name.Class, Text, Operator), 'typeparam'),
|
| 304 |
+
(r'\s+', Text),
|
| 305 |
+
(r'\{', Operator, '#pop'),
|
| 306 |
+
(r'\(', Operator, '#pop'),
|
| 307 |
+
(r'//.*?\n', Comment.Single, '#pop'),
|
| 308 |
+
(u'%s|%s|`[^`]+`' % (idrest, op), Name.Class, '#pop'),
|
| 309 |
+
],
|
| 310 |
+
'type': [
|
| 311 |
+
(r'\s+', Text),
|
| 312 |
+
(r'<[%:]|>:|[#_]|forSome|type', Keyword),
|
| 313 |
+
(u'([,);}]|=>|=|\u21d2)(\\s*)', bygroups(Operator, Text), '#pop'),
|
| 314 |
+
(r'[({]', Operator, '#push'),
|
| 315 |
+
(u'((?:%s|%s|`[^`]+`)(?:\\.(?:%s|%s|`[^`]+`))*)(\\s*)(\\[)' %
|
| 316 |
+
(idrest, op, idrest, op),
|
| 317 |
+
bygroups(Keyword.Type, Text, Operator), ('#pop', 'typeparam')),
|
| 318 |
+
(u'((?:%s|%s|`[^`]+`)(?:\\.(?:%s|%s|`[^`]+`))*)(\\s*)$' %
|
| 319 |
+
(idrest, op, idrest, op),
|
| 320 |
+
bygroups(Keyword.Type, Text), '#pop'),
|
| 321 |
+
(r'//.*?\n', Comment.Single, '#pop'),
|
| 322 |
+
(u'\\.|%s|%s|`[^`]+`' % (idrest, op), Keyword.Type)
|
| 323 |
+
],
|
| 324 |
+
'typeparam': [
|
| 325 |
+
(r'[\s,]+', Text),
|
| 326 |
+
(u'<[%:]|=>|>:|[#_\u21D2]|forSome|type', Keyword),
|
| 327 |
+
(r'([\])}])', Operator, '#pop'),
|
| 328 |
+
(r'[(\[{]', Operator, '#push'),
|
| 329 |
+
(u'\\.|%s|%s|`[^`]+`' % (idrest, op), Keyword.Type)
|
| 330 |
+
],
|
| 331 |
+
'comment': [
|
| 332 |
+
(r'[^/*]+', Comment.Multiline),
|
| 333 |
+
(r'/\*', Comment.Multiline, '#push'),
|
| 334 |
+
(r'\*/', Comment.Multiline, '#pop'),
|
| 335 |
+
(r'[*/]', Comment.Multiline)
|
| 336 |
+
],
|
| 337 |
+
'import': [
|
| 338 |
+
(u'(%s|\\.)+' % idrest, Name.Namespace, '#pop')
|
| 339 |
+
],
|
| 340 |
+
'interpstringcommon': [
|
| 341 |
+
(r'[^"$\\]+', String),
|
| 342 |
+
(r'\$\$', String),
|
| 343 |
+
(r'\$' + letter_letter_digit, String.Interpol),
|
| 344 |
+
(r'\$\{', String.Interpol, 'interpbrace'),
|
| 345 |
+
(r'\\.', String),
|
| 346 |
+
],
|
| 347 |
+
'interptriplestring': [
|
| 348 |
+
(r'"""(?!")', String, '#pop'),
|
| 349 |
+
(r'"', String),
|
| 350 |
+
include('interpstringcommon'),
|
| 351 |
+
],
|
| 352 |
+
'interpstring': [
|
| 353 |
+
(r'"', String, '#pop'),
|
| 354 |
+
include('interpstringcommon'),
|
| 355 |
+
],
|
| 356 |
+
'interpbrace': [
|
| 357 |
+
(r'\}', String.Interpol, '#pop'),
|
| 358 |
+
(r'\{', String.Interpol, '#push'),
|
| 359 |
+
include('root'),
|
| 360 |
+
],
|
| 361 |
+
}
|
| 362 |
+
|
| 363 |
+
|
| 364 |
+
class GosuLexer(RegexLexer):
|
| 365 |
+
"""
|
| 366 |
+
For Gosu source code.
|
| 367 |
+
|
| 368 |
+
.. versionadded:: 1.5
|
| 369 |
+
"""
|
| 370 |
+
|
| 371 |
+
name = 'Gosu'
|
| 372 |
+
aliases = ['gosu']
|
| 373 |
+
filenames = ['*.gs', '*.gsx', '*.gsp', '*.vark']
|
| 374 |
+
mimetypes = ['text/x-gosu']
|
| 375 |
+
|
| 376 |
+
flags = re.MULTILINE | re.DOTALL
|
| 377 |
+
|
| 378 |
+
tokens = {
|
| 379 |
+
'root': [
|
| 380 |
+
# method names
|
| 381 |
+
(r'^(\s*(?:[a-zA-Z_][\w.\[\]]*\s+)+?)' # modifiers etc.
|
| 382 |
+
r'([a-zA-Z_]\w*)' # method name
|
| 383 |
+
r'(\s*)(\()', # signature start
|
| 384 |
+
bygroups(using(this), Name.Function, Text, Operator)),
|
| 385 |
+
(r'[^\S\n]+', Text),
|
| 386 |
+
(r'//.*?\n', Comment.Single),
|
| 387 |
+
(r'/\*.*?\*/', Comment.Multiline),
|
| 388 |
+
(r'@[a-zA-Z_][\w.]*', Name.Decorator),
|
| 389 |
+
(r'(in|as|typeof|statictypeof|typeis|typeas|if|else|foreach|for|'
|
| 390 |
+
r'index|while|do|continue|break|return|try|catch|finally|this|'
|
| 391 |
+
r'throw|new|switch|case|default|eval|super|outer|classpath|'
|
| 392 |
+
r'using)\b', Keyword),
|
| 393 |
+
(r'(var|delegate|construct|function|private|internal|protected|'
|
| 394 |
+
r'public|abstract|override|final|static|extends|transient|'
|
| 395 |
+
r'implements|represents|readonly)\b', Keyword.Declaration),
|
| 396 |
+
(r'(property\s+)(get|set)?', Keyword.Declaration),
|
| 397 |
+
(r'(boolean|byte|char|double|float|int|long|short|void|block)\b',
|
| 398 |
+
Keyword.Type),
|
| 399 |
+
(r'(package)(\s+)', bygroups(Keyword.Namespace, Text)),
|
| 400 |
+
(r'(true|false|null|NaN|Infinity)\b', Keyword.Constant),
|
| 401 |
+
(r'(class|interface|enhancement|enum)(\s+)([a-zA-Z_]\w*)',
|
| 402 |
+
bygroups(Keyword.Declaration, Text, Name.Class)),
|
| 403 |
+
(r'(uses)(\s+)([\w.]+\*?)',
|
| 404 |
+
bygroups(Keyword.Namespace, Text, Name.Namespace)),
|
| 405 |
+
(r'"', String, 'string'),
|
| 406 |
+
(r'(\??[.#])([a-zA-Z_]\w*)',
|
| 407 |
+
bygroups(Operator, Name.Attribute)),
|
| 408 |
+
(r'(:)([a-zA-Z_]\w*)',
|
| 409 |
+
bygroups(Operator, Name.Attribute)),
|
| 410 |
+
(r'[a-zA-Z_$]\w*', Name),
|
| 411 |
+
(r'and|or|not|[\\~^*!%&\[\](){}<>|+=:;,./?-]', Operator),
|
| 412 |
+
(r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
|
| 413 |
+
(r'[0-9]+', Number.Integer),
|
| 414 |
+
(r'\n', Text)
|
| 415 |
+
],
|
| 416 |
+
'templateText': [
|
| 417 |
+
(r'(\\<)|(\\\$)', String),
|
| 418 |
+
(r'(<%@\s+)(extends|params)',
|
| 419 |
+
bygroups(Operator, Name.Decorator), 'stringTemplate'),
|
| 420 |
+
(r'<%!--.*?--%>', Comment.Multiline),
|
| 421 |
+
(r'(<%)|(<%=)', Operator, 'stringTemplate'),
|
| 422 |
+
(r'\$\{', Operator, 'stringTemplateShorthand'),
|
| 423 |
+
(r'.', String)
|
| 424 |
+
],
|
| 425 |
+
'string': [
|
| 426 |
+
(r'"', String, '#pop'),
|
| 427 |
+
include('templateText')
|
| 428 |
+
],
|
| 429 |
+
'stringTemplate': [
|
| 430 |
+
(r'"', String, 'string'),
|
| 431 |
+
(r'%>', Operator, '#pop'),
|
| 432 |
+
include('root')
|
| 433 |
+
],
|
| 434 |
+
'stringTemplateShorthand': [
|
| 435 |
+
(r'"', String, 'string'),
|
| 436 |
+
(r'\{', Operator, 'stringTemplateShorthand'),
|
| 437 |
+
(r'\}', Operator, '#pop'),
|
| 438 |
+
include('root')
|
| 439 |
+
],
|
| 440 |
+
}
|
| 441 |
+
|
| 442 |
+
|
| 443 |
+
class GosuTemplateLexer(Lexer):
|
| 444 |
+
"""
|
| 445 |
+
For Gosu templates.
|
| 446 |
+
|
| 447 |
+
.. versionadded:: 1.5
|
| 448 |
+
"""
|
| 449 |
+
|
| 450 |
+
name = 'Gosu Template'
|
| 451 |
+
aliases = ['gst']
|
| 452 |
+
filenames = ['*.gst']
|
| 453 |
+
mimetypes = ['text/x-gosu-template']
|
| 454 |
+
|
| 455 |
+
def get_tokens_unprocessed(self, text):
|
| 456 |
+
lexer = GosuLexer()
|
| 457 |
+
stack = ['templateText']
|
| 458 |
+
for item in lexer.get_tokens_unprocessed(text, stack):
|
| 459 |
+
yield item
|
| 460 |
+
|
| 461 |
+
|
| 462 |
+
class GroovyLexer(RegexLexer):
|
| 463 |
+
"""
|
| 464 |
+
For `Groovy <http://groovy.codehaus.org/>`_ source code.
|
| 465 |
+
|
| 466 |
+
.. versionadded:: 1.5
|
| 467 |
+
"""
|
| 468 |
+
|
| 469 |
+
name = 'Groovy'
|
| 470 |
+
aliases = ['groovy']
|
| 471 |
+
filenames = ['*.groovy','*.gradle']
|
| 472 |
+
mimetypes = ['text/x-groovy']
|
| 473 |
+
|
| 474 |
+
flags = re.MULTILINE | re.DOTALL
|
| 475 |
+
|
| 476 |
+
tokens = {
|
| 477 |
+
'root': [
|
| 478 |
+
# Groovy allows a file to start with a shebang
|
| 479 |
+
(r'#!(.*?)$', Comment.Preproc, 'base'),
|
| 480 |
+
default('base'),
|
| 481 |
+
],
|
| 482 |
+
'base': [
|
| 483 |
+
# method names
|
| 484 |
+
(r'^(\s*(?:[a-zA-Z_][\w.\[\]]*\s+)+?)' # return arguments
|
| 485 |
+
r'([a-zA-Z_]\w*)' # method name
|
| 486 |
+
r'(\s*)(\()', # signature start
|
| 487 |
+
bygroups(using(this), Name.Function, Text, Operator)),
|
| 488 |
+
(r'[^\S\n]+', Text),
|
| 489 |
+
(r'//.*?\n', Comment.Single),
|
| 490 |
+
(r'/\*.*?\*/', Comment.Multiline),
|
| 491 |
+
(r'@[a-zA-Z_][\w.]*', Name.Decorator),
|
| 492 |
+
(r'(assert|break|case|catch|continue|default|do|else|finally|for|'
|
| 493 |
+
r'if|goto|instanceof|new|return|switch|this|throw|try|while|in|as)\b',
|
| 494 |
+
Keyword),
|
| 495 |
+
(r'(abstract|const|enum|extends|final|implements|native|private|'
|
| 496 |
+
r'protected|public|static|strictfp|super|synchronized|throws|'
|
| 497 |
+
r'transient|volatile)\b', Keyword.Declaration),
|
| 498 |
+
(r'(def|boolean|byte|char|double|float|int|long|short|void)\b',
|
| 499 |
+
Keyword.Type),
|
| 500 |
+
(r'(package)(\s+)', bygroups(Keyword.Namespace, Text)),
|
| 501 |
+
(r'(true|false|null)\b', Keyword.Constant),
|
| 502 |
+
(r'(class|interface)(\s+)', bygroups(Keyword.Declaration, Text),
|
| 503 |
+
'class'),
|
| 504 |
+
(r'(import)(\s+)', bygroups(Keyword.Namespace, Text), 'import'),
|
| 505 |
+
(r'""".*?"""', String.Double),
|
| 506 |
+
(r"'''.*?'''", String.Single),
|
| 507 |
+
(r'"(\\\\|\\"|[^"])*"', String.Double),
|
| 508 |
+
(r"'(\\\\|\\'|[^'])*'", String.Single),
|
| 509 |
+
(r'\$/((?!/\$).)*/\$', String),
|
| 510 |
+
(r'/(\\\\|\\"|[^/])*/', String),
|
| 511 |
+
(r"'\\.'|'[^\\]'|'\\u[0-9a-fA-F]{4}'", String.Char),
|
| 512 |
+
(r'(\.)([a-zA-Z_]\w*)', bygroups(Operator, Name.Attribute)),
|
| 513 |
+
(r'[a-zA-Z_]\w*:', Name.Label),
|
| 514 |
+
(r'[a-zA-Z_$]\w*', Name),
|
| 515 |
+
(r'[~^*!%&\[\](){}<>|+=:;,./?-]', Operator),
|
| 516 |
+
(r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
|
| 517 |
+
(r'0x[0-9a-fA-F]+', Number.Hex),
|
| 518 |
+
(r'[0-9]+L?', Number.Integer),
|
| 519 |
+
(r'\n', Text)
|
| 520 |
+
],
|
| 521 |
+
'class': [
|
| 522 |
+
(r'[a-zA-Z_]\w*', Name.Class, '#pop')
|
| 523 |
+
],
|
| 524 |
+
'import': [
|
| 525 |
+
(r'[\w.]+\*?', Name.Namespace, '#pop')
|
| 526 |
+
],
|
| 527 |
+
}
|
| 528 |
+
|
| 529 |
+
def analyse_text(text):
|
| 530 |
+
return shebang_matches(text, r'groovy')
|
| 531 |
+
|
| 532 |
+
|
| 533 |
+
class IokeLexer(RegexLexer):
|
| 534 |
+
"""
|
| 535 |
+
For `Ioke <http://ioke.org/>`_ (a strongly typed, dynamic,
|
| 536 |
+
prototype based programming language) source.
|
| 537 |
+
|
| 538 |
+
.. versionadded:: 1.4
|
| 539 |
+
"""
|
| 540 |
+
name = 'Ioke'
|
| 541 |
+
filenames = ['*.ik']
|
| 542 |
+
aliases = ['ioke', 'ik']
|
| 543 |
+
mimetypes = ['text/x-iokesrc']
|
| 544 |
+
tokens = {
|
| 545 |
+
'interpolatableText': [
|
| 546 |
+
(r'(\\b|\\e|\\t|\\n|\\f|\\r|\\"|\\\\|\\#|\\\Z|\\u[0-9a-fA-F]{1,4}'
|
| 547 |
+
r'|\\[0-3]?[0-7]?[0-7])', String.Escape),
|
| 548 |
+
(r'#\{', Punctuation, 'textInterpolationRoot')
|
| 549 |
+
],
|
| 550 |
+
|
| 551 |
+
'text': [
|
| 552 |
+
(r'(?<!\\)"', String, '#pop'),
|
| 553 |
+
include('interpolatableText'),
|
| 554 |
+
(r'[^"]', String)
|
| 555 |
+
],
|
| 556 |
+
|
| 557 |
+
'documentation': [
|
| 558 |
+
(r'(?<!\\)"', String.Doc, '#pop'),
|
| 559 |
+
include('interpolatableText'),
|
| 560 |
+
(r'[^"]', String.Doc)
|
| 561 |
+
],
|
| 562 |
+
|
| 563 |
+
'textInterpolationRoot': [
|
| 564 |
+
(r'\}', Punctuation, '#pop'),
|
| 565 |
+
include('root')
|
| 566 |
+
],
|
| 567 |
+
|
| 568 |
+
'slashRegexp': [
|
| 569 |
+
(r'(?<!\\)/[im-psux]*', String.Regex, '#pop'),
|
| 570 |
+
include('interpolatableText'),
|
| 571 |
+
(r'\\/', String.Regex),
|
| 572 |
+
(r'[^/]', String.Regex)
|
| 573 |
+
],
|
| 574 |
+
|
| 575 |
+
'squareRegexp': [
|
| 576 |
+
(r'(?<!\\)][im-psux]*', String.Regex, '#pop'),
|
| 577 |
+
include('interpolatableText'),
|
| 578 |
+
(r'\\]', String.Regex),
|
| 579 |
+
(r'[^\]]', String.Regex)
|
| 580 |
+
],
|
| 581 |
+
|
| 582 |
+
'squareText': [
|
| 583 |
+
(r'(?<!\\)]', String, '#pop'),
|
| 584 |
+
include('interpolatableText'),
|
| 585 |
+
(r'[^\]]', String)
|
| 586 |
+
],
|
| 587 |
+
|
| 588 |
+
'root': [
|
| 589 |
+
(r'\n', Text),
|
| 590 |
+
(r'\s+', Text),
|
| 591 |
+
|
| 592 |
+
# Comments
|
| 593 |
+
(r';(.*?)\n', Comment),
|
| 594 |
+
(r'\A#!(.*?)\n', Comment),
|
| 595 |
+
|
| 596 |
+
# Regexps
|
| 597 |
+
(r'#/', String.Regex, 'slashRegexp'),
|
| 598 |
+
(r'#r\[', String.Regex, 'squareRegexp'),
|
| 599 |
+
|
| 600 |
+
# Symbols
|
| 601 |
+
(r':[\w!:?]+', String.Symbol),
|
| 602 |
+
(r'[\w!:?]+:(?![\w!?])', String.Other),
|
| 603 |
+
(r':"(\\\\|\\"|[^"])*"', String.Symbol),
|
| 604 |
+
|
| 605 |
+
# Documentation
|
| 606 |
+
(r'((?<=fn\()|(?<=fnx\()|(?<=method\()|(?<=macro\()|(?<=lecro\()'
|
| 607 |
+
r'|(?<=syntax\()|(?<=dmacro\()|(?<=dlecro\()|(?<=dlecrox\()'
|
| 608 |
+
r'|(?<=dsyntax\())\s*"', String.Doc, 'documentation'),
|
| 609 |
+
|
| 610 |
+
# Text
|
| 611 |
+
(r'"', String, 'text'),
|
| 612 |
+
(r'#\[', String, 'squareText'),
|
| 613 |
+
|
| 614 |
+
# Mimic
|
| 615 |
+
(r'\w[\w!:?]+(?=\s*=.*mimic\s)', Name.Entity),
|
| 616 |
+
|
| 617 |
+
# Assignment
|
| 618 |
+
(r'[a-zA-Z_][\w!:?]*(?=[\s]*[+*/-]?=[^=].*($|\.))',
|
| 619 |
+
Name.Variable),
|
| 620 |
+
|
| 621 |
+
# keywords
|
| 622 |
+
(r'(break|cond|continue|do|ensure|for|for:dict|for:set|if|let|'
|
| 623 |
+
r'loop|p:for|p:for:dict|p:for:set|return|unless|until|while|'
|
| 624 |
+
r'with)(?![\w!:?])', Keyword.Reserved),
|
| 625 |
+
|
| 626 |
+
# Origin
|
| 627 |
+
(r'(eval|mimic|print|println)(?![\w!:?])', Keyword),
|
| 628 |
+
|
| 629 |
+
# Base
|
| 630 |
+
(r'(cell\?|cellNames|cellOwner\?|cellOwner|cells|cell|'
|
| 631 |
+
r'documentation|hash|identity|mimic|removeCell\!|undefineCell\!)'
|
| 632 |
+
r'(?![\w!:?])', Keyword),
|
| 633 |
+
|
| 634 |
+
# Ground
|
| 635 |
+
(r'(stackTraceAsText)(?![\w!:?])', Keyword),
|
| 636 |
+
|
| 637 |
+
# DefaultBehaviour Literals
|
| 638 |
+
(r'(dict|list|message|set)(?![\w!:?])', Keyword.Reserved),
|
| 639 |
+
|
| 640 |
+
# DefaultBehaviour Case
|
| 641 |
+
(r'(case|case:and|case:else|case:nand|case:nor|case:not|case:or|'
|
| 642 |
+
r'case:otherwise|case:xor)(?![\w!:?])', Keyword.Reserved),
|
| 643 |
+
|
| 644 |
+
# DefaultBehaviour Reflection
|
| 645 |
+
(r'(asText|become\!|derive|freeze\!|frozen\?|in\?|is\?|kind\?|'
|
| 646 |
+
r'mimic\!|mimics|mimics\?|prependMimic\!|removeAllMimics\!|'
|
| 647 |
+
r'removeMimic\!|same\?|send|thaw\!|uniqueHexId)'
|
| 648 |
+
r'(?![\w!:?])', Keyword),
|
| 649 |
+
|
| 650 |
+
# DefaultBehaviour Aspects
|
| 651 |
+
(r'(after|around|before)(?![\w!:?])', Keyword.Reserved),
|
| 652 |
+
|
| 653 |
+
# DefaultBehaviour
|
| 654 |
+
(r'(kind|cellDescriptionDict|cellSummary|genSym|inspect|notice)'
|
| 655 |
+
r'(?![\w!:?])', Keyword),
|
| 656 |
+
(r'(use|destructuring)', Keyword.Reserved),
|
| 657 |
+
|
| 658 |
+
# DefaultBehavior BaseBehavior
|
| 659 |
+
(r'(cell\?|cellOwner\?|cellOwner|cellNames|cells|cell|'
|
| 660 |
+
r'documentation|identity|removeCell!|undefineCell)'
|
| 661 |
+
r'(?![\w!:?])', Keyword),
|
| 662 |
+
|
| 663 |
+
# DefaultBehavior Internal
|
| 664 |
+
(r'(internal:compositeRegexp|internal:concatenateText|'
|
| 665 |
+
r'internal:createDecimal|internal:createNumber|'
|
| 666 |
+
r'internal:createRegexp|internal:createText)'
|
| 667 |
+
r'(?![\w!:?])', Keyword.Reserved),
|
| 668 |
+
|
| 669 |
+
# DefaultBehaviour Conditions
|
| 670 |
+
(r'(availableRestarts|bind|error\!|findRestart|handle|'
|
| 671 |
+
r'invokeRestart|rescue|restart|signal\!|warn\!)'
|
| 672 |
+
r'(?![\w!:?])', Keyword.Reserved),
|
| 673 |
+
|
| 674 |
+
# constants
|
| 675 |
+
(r'(nil|false|true)(?![\w!:?])', Name.Constant),
|
| 676 |
+
|
| 677 |
+
# names
|
| 678 |
+
(r'(Arity|Base|Call|Condition|DateTime|Aspects|Pointcut|'
|
| 679 |
+
r'Assignment|BaseBehavior|Boolean|Case|AndCombiner|Else|'
|
| 680 |
+
r'NAndCombiner|NOrCombiner|NotCombiner|OrCombiner|XOrCombiner|'
|
| 681 |
+
r'Conditions|Definitions|FlowControl|Internal|Literals|'
|
| 682 |
+
r'Reflection|DefaultMacro|DefaultMethod|DefaultSyntax|Dict|'
|
| 683 |
+
r'FileSystem|Ground|Handler|Hook|IO|IokeGround|Struct|'
|
| 684 |
+
r'LexicalBlock|LexicalMacro|List|Message|Method|Mixins|'
|
| 685 |
+
r'NativeMethod|Number|Origin|Pair|Range|Reflector|Regexp Match|'
|
| 686 |
+
r'Regexp|Rescue|Restart|Runtime|Sequence|Set|Symbol|'
|
| 687 |
+
r'System|Text|Tuple)(?![\w!:?])', Name.Builtin),
|
| 688 |
+
|
| 689 |
+
# functions
|
| 690 |
+
(u'(generateMatchMethod|aliasMethod|\u03bb|\u028E|fnx|fn|method|'
|
| 691 |
+
u'dmacro|dlecro|syntax|macro|dlecrox|lecrox|lecro|syntax)'
|
| 692 |
+
u'(?![\w!:?])', Name.Function),
|
| 693 |
+
|
| 694 |
+
# Numbers
|
| 695 |
+
(r'-?0[xX][0-9a-fA-F]+', Number.Hex),
|
| 696 |
+
(r'-?(\d+\.?\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float),
|
| 697 |
+
(r'-?\d+', Number.Integer),
|
| 698 |
+
|
| 699 |
+
(r'#\(', Punctuation),
|
| 700 |
+
|
| 701 |
+
# Operators
|
| 702 |
+
(r'(&&>>|\|\|>>|\*\*>>|:::|::|\.\.\.|===|\*\*>|\*\*=|&&>|&&=|'
|
| 703 |
+
r'\|\|>|\|\|=|\->>|\+>>|!>>|<>>>|<>>|&>>|%>>|#>>|@>>|/>>|\*>>|'
|
| 704 |
+
r'\?>>|\|>>|\^>>|~>>|\$>>|=>>|<<=|>>=|<=>|<\->|=~|!~|=>|\+\+|'
|
| 705 |
+
r'\-\-|<=|>=|==|!=|&&|\.\.|\+=|\-=|\*=|\/=|%=|&=|\^=|\|=|<\-|'
|
| 706 |
+
r'\+>|!>|<>|&>|%>|#>|\@>|\/>|\*>|\?>|\|>|\^>|~>|\$>|<\->|\->|'
|
| 707 |
+
r'<<|>>|\*\*|\?\||\?&|\|\||>|<|\*|\/|%|\+|\-|&|\^|\||=|\$|!|~|'
|
| 708 |
+
u'\\?|#|\u2260|\u2218|\u2208|\u2209)', Operator),
|
| 709 |
+
(r'(and|nand|or|xor|nor|return|import)(?![\w!?])',
|
| 710 |
+
Operator),
|
| 711 |
+
|
| 712 |
+
# Punctuation
|
| 713 |
+
(r'(\`\`|\`|\'\'|\'|\.|\,|@@|@|\[|\]|\(|\)|\{|\})', Punctuation),
|
| 714 |
+
|
| 715 |
+
# kinds
|
| 716 |
+
(r'[A-Z][\w!:?]*', Name.Class),
|
| 717 |
+
|
| 718 |
+
# default cellnames
|
| 719 |
+
(r'[a-z_][\w!:?]*', Name)
|
| 720 |
+
]
|
| 721 |
+
}
|
| 722 |
+
|
| 723 |
+
|
| 724 |
+
class ClojureLexer(RegexLexer):
|
| 725 |
+
"""
|
| 726 |
+
Lexer for `Clojure <http://clojure.org/>`_ source code.
|
| 727 |
+
|
| 728 |
+
.. versionadded:: 0.11
|
| 729 |
+
"""
|
| 730 |
+
name = 'Clojure'
|
| 731 |
+
aliases = ['clojure', 'clj']
|
| 732 |
+
filenames = ['*.clj']
|
| 733 |
+
mimetypes = ['text/x-clojure', 'application/x-clojure']
|
| 734 |
+
|
| 735 |
+
special_forms = (
|
| 736 |
+
'.', 'def', 'do', 'fn', 'if', 'let', 'new', 'quote', 'var', 'loop'
|
| 737 |
+
)
|
| 738 |
+
|
| 739 |
+
# It's safe to consider 'ns' a declaration thing because it defines a new
|
| 740 |
+
# namespace.
|
| 741 |
+
declarations = (
|
| 742 |
+
'def-', 'defn', 'defn-', 'defmacro', 'defmulti', 'defmethod',
|
| 743 |
+
'defstruct', 'defonce', 'declare', 'definline', 'definterface',
|
| 744 |
+
'defprotocol', 'defrecord', 'deftype', 'defproject', 'ns'
|
| 745 |
+
)
|
| 746 |
+
|
| 747 |
+
builtins = (
|
| 748 |
+
'*', '+', '-', '->', '/', '<', '<=', '=', '==', '>', '>=', '..',
|
| 749 |
+
'accessor', 'agent', 'agent-errors', 'aget', 'alength', 'all-ns',
|
| 750 |
+
'alter', 'and', 'append-child', 'apply', 'array-map', 'aset',
|
| 751 |
+
'aset-boolean', 'aset-byte', 'aset-char', 'aset-double', 'aset-float',
|
| 752 |
+
'aset-int', 'aset-long', 'aset-short', 'assert', 'assoc', 'await',
|
| 753 |
+
'await-for', 'bean', 'binding', 'bit-and', 'bit-not', 'bit-or',
|
| 754 |
+
'bit-shift-left', 'bit-shift-right', 'bit-xor', 'boolean', 'branch?',
|
| 755 |
+
'butlast', 'byte', 'cast', 'char', 'children', 'class',
|
| 756 |
+
'clear-agent-errors', 'comment', 'commute', 'comp', 'comparator',
|
| 757 |
+
'complement', 'concat', 'conj', 'cons', 'constantly', 'cond', 'if-not',
|
| 758 |
+
'construct-proxy', 'contains?', 'count', 'create-ns', 'create-struct',
|
| 759 |
+
'cycle', 'dec', 'deref', 'difference', 'disj', 'dissoc', 'distinct',
|
| 760 |
+
'doall', 'doc', 'dorun', 'doseq', 'dosync', 'dotimes', 'doto',
|
| 761 |
+
'double', 'down', 'drop', 'drop-while', 'edit', 'end?', 'ensure',
|
| 762 |
+
'eval', 'every?', 'false?', 'ffirst', 'file-seq', 'filter', 'find',
|
| 763 |
+
'find-doc', 'find-ns', 'find-var', 'first', 'float', 'flush', 'for',
|
| 764 |
+
'fnseq', 'frest', 'gensym', 'get-proxy-class', 'get',
|
| 765 |
+
'hash-map', 'hash-set', 'identical?', 'identity', 'if-let', 'import',
|
| 766 |
+
'in-ns', 'inc', 'index', 'insert-child', 'insert-left', 'insert-right',
|
| 767 |
+
'inspect-table', 'inspect-tree', 'instance?', 'int', 'interleave',
|
| 768 |
+
'intersection', 'into', 'into-array', 'iterate', 'join', 'key', 'keys',
|
| 769 |
+
'keyword', 'keyword?', 'last', 'lazy-cat', 'lazy-cons', 'left',
|
| 770 |
+
'lefts', 'line-seq', 'list*', 'list', 'load', 'load-file',
|
| 771 |
+
'locking', 'long', 'loop', 'macroexpand', 'macroexpand-1',
|
| 772 |
+
'make-array', 'make-node', 'map', 'map-invert', 'map?', 'mapcat',
|
| 773 |
+
'max', 'max-key', 'memfn', 'merge', 'merge-with', 'meta', 'min',
|
| 774 |
+
'min-key', 'name', 'namespace', 'neg?', 'new', 'newline', 'next',
|
| 775 |
+
'nil?', 'node', 'not', 'not-any?', 'not-every?', 'not=', 'ns-imports',
|
| 776 |
+
'ns-interns', 'ns-map', 'ns-name', 'ns-publics', 'ns-refers',
|
| 777 |
+
'ns-resolve', 'ns-unmap', 'nth', 'nthrest', 'or', 'parse', 'partial',
|
| 778 |
+
'path', 'peek', 'pop', 'pos?', 'pr', 'pr-str', 'print', 'print-str',
|
| 779 |
+
'println', 'println-str', 'prn', 'prn-str', 'project', 'proxy',
|
| 780 |
+
'proxy-mappings', 'quot', 'rand', 'rand-int', 'range', 're-find',
|
| 781 |
+
're-groups', 're-matcher', 're-matches', 're-pattern', 're-seq',
|
| 782 |
+
'read', 'read-line', 'reduce', 'ref', 'ref-set', 'refer', 'rem',
|
| 783 |
+
'remove', 'remove-method', 'remove-ns', 'rename', 'rename-keys',
|
| 784 |
+
'repeat', 'replace', 'replicate', 'resolve', 'rest', 'resultset-seq',
|
| 785 |
+
'reverse', 'rfirst', 'right', 'rights', 'root', 'rrest', 'rseq',
|
| 786 |
+
'second', 'select', 'select-keys', 'send', 'send-off', 'seq',
|
| 787 |
+
'seq-zip', 'seq?', 'set', 'short', 'slurp', 'some', 'sort',
|
| 788 |
+
'sort-by', 'sorted-map', 'sorted-map-by', 'sorted-set',
|
| 789 |
+
'special-symbol?', 'split-at', 'split-with', 'str', 'string?',
|
| 790 |
+
'struct', 'struct-map', 'subs', 'subvec', 'symbol', 'symbol?',
|
| 791 |
+
'sync', 'take', 'take-nth', 'take-while', 'test', 'time', 'to-array',
|
| 792 |
+
'to-array-2d', 'tree-seq', 'true?', 'union', 'up', 'update-proxy',
|
| 793 |
+
'val', 'vals', 'var-get', 'var-set', 'var?', 'vector', 'vector-zip',
|
| 794 |
+
'vector?', 'when', 'when-first', 'when-let', 'when-not',
|
| 795 |
+
'with-local-vars', 'with-meta', 'with-open', 'with-out-str',
|
| 796 |
+
'xml-seq', 'xml-zip', 'zero?', 'zipmap', 'zipper')
|
| 797 |
+
|
| 798 |
+
# valid names for identifiers
|
| 799 |
+
# well, names can only not consist fully of numbers
|
| 800 |
+
# but this should be good enough for now
|
| 801 |
+
|
| 802 |
+
# TODO / should divide keywords/symbols into namespace/rest
|
| 803 |
+
# but that's hard, so just pretend / is part of the name
|
| 804 |
+
valid_name = r'(?!#)[\w!$%*+<=>?/.#-]+'
|
| 805 |
+
|
| 806 |
+
tokens = {
|
| 807 |
+
'root': [
|
| 808 |
+
# the comments - always starting with semicolon
|
| 809 |
+
# and going to the end of the line
|
| 810 |
+
(r';.*$', Comment.Single),
|
| 811 |
+
|
| 812 |
+
# whitespaces - usually not relevant
|
| 813 |
+
(r'[,\s]+', Text),
|
| 814 |
+
|
| 815 |
+
# numbers
|
| 816 |
+
(r'-?\d+\.\d+', Number.Float),
|
| 817 |
+
(r'-?\d+', Number.Integer),
|
| 818 |
+
(r'0x-?[abcdef\d]+', Number.Hex),
|
| 819 |
+
|
| 820 |
+
# strings, symbols and characters
|
| 821 |
+
(r'"(\\\\|\\"|[^"])*"', String),
|
| 822 |
+
(r"'" + valid_name, String.Symbol),
|
| 823 |
+
(r"\\(.|[a-z]+)", String.Char),
|
| 824 |
+
|
| 825 |
+
# keywords
|
| 826 |
+
(r'::?#?' + valid_name, String.Symbol),
|
| 827 |
+
|
| 828 |
+
# special operators
|
| 829 |
+
(r'~@|[`\'#^~&@]', Operator),
|
| 830 |
+
|
| 831 |
+
# highlight the special forms
|
| 832 |
+
(words(special_forms, suffix=' '), Keyword),
|
| 833 |
+
|
| 834 |
+
# Technically, only the special forms are 'keywords'. The problem
|
| 835 |
+
# is that only treating them as keywords means that things like
|
| 836 |
+
# 'defn' and 'ns' need to be highlighted as builtins. This is ugly
|
| 837 |
+
# and weird for most styles. So, as a compromise we're going to
|
| 838 |
+
# highlight them as Keyword.Declarations.
|
| 839 |
+
(words(declarations, suffix=' '), Keyword.Declaration),
|
| 840 |
+
|
| 841 |
+
# highlight the builtins
|
| 842 |
+
(words(builtins, suffix=' '), Name.Builtin),
|
| 843 |
+
|
| 844 |
+
# the remaining functions
|
| 845 |
+
(r'(?<=\()' + valid_name, Name.Function),
|
| 846 |
+
|
| 847 |
+
# find the remaining variables
|
| 848 |
+
(valid_name, Name.Variable),
|
| 849 |
+
|
| 850 |
+
# Clojure accepts vector notation
|
| 851 |
+
(r'(\[|\])', Punctuation),
|
| 852 |
+
|
| 853 |
+
# Clojure accepts map notation
|
| 854 |
+
(r'(\{|\})', Punctuation),
|
| 855 |
+
|
| 856 |
+
# the famous parentheses!
|
| 857 |
+
(r'(\(|\))', Punctuation),
|
| 858 |
+
],
|
| 859 |
+
}
|
| 860 |
+
|
| 861 |
+
|
| 862 |
+
class ClojureScriptLexer(ClojureLexer):
|
| 863 |
+
"""
|
| 864 |
+
Lexer for `ClojureScript <http://clojure.org/clojurescript>`_
|
| 865 |
+
source code.
|
| 866 |
+
|
| 867 |
+
.. versionadded:: 2.0
|
| 868 |
+
"""
|
| 869 |
+
name = 'ClojureScript'
|
| 870 |
+
aliases = ['clojurescript', 'cljs']
|
| 871 |
+
filenames = ['*.cljs']
|
| 872 |
+
mimetypes = ['text/x-clojurescript', 'application/x-clojurescript']
|
| 873 |
+
|
| 874 |
+
|
| 875 |
+
class TeaLangLexer(RegexLexer):
|
| 876 |
+
"""
|
| 877 |
+
For `Tea <http://teatrove.org/>`_ source code. Only used within a
|
| 878 |
+
TeaTemplateLexer.
|
| 879 |
+
|
| 880 |
+
.. versionadded:: 1.5
|
| 881 |
+
"""
|
| 882 |
+
|
| 883 |
+
flags = re.MULTILINE | re.DOTALL
|
| 884 |
+
|
| 885 |
+
tokens = {
|
| 886 |
+
'root': [
|
| 887 |
+
# method names
|
| 888 |
+
(r'^(\s*(?:[a-zA-Z_][\w\.\[\]]*\s+)+?)' # return arguments
|
| 889 |
+
r'([a-zA-Z_]\w*)' # method name
|
| 890 |
+
r'(\s*)(\()', # signature start
|
| 891 |
+
bygroups(using(this), Name.Function, Text, Operator)),
|
| 892 |
+
(r'[^\S\n]+', Text),
|
| 893 |
+
(r'//.*?\n', Comment.Single),
|
| 894 |
+
(r'/\*.*?\*/', Comment.Multiline),
|
| 895 |
+
(r'@[a-zA-Z_][\w\.]*', Name.Decorator),
|
| 896 |
+
(r'(and|break|else|foreach|if|in|not|or|reverse)\b',
|
| 897 |
+
Keyword),
|
| 898 |
+
(r'(as|call|define)\b', Keyword.Declaration),
|
| 899 |
+
(r'(true|false|null)\b', Keyword.Constant),
|
| 900 |
+
(r'(template)(\s+)', bygroups(Keyword.Declaration, Text), 'template'),
|
| 901 |
+
(r'(import)(\s+)', bygroups(Keyword.Namespace, Text), 'import'),
|
| 902 |
+
(r'"(\\\\|\\"|[^"])*"', String),
|
| 903 |
+
(r'\'(\\\\|\\\'|[^\'])*\'', String),
|
| 904 |
+
(r'(\.)([a-zA-Z_]\w*)', bygroups(Operator, Name.Attribute)),
|
| 905 |
+
(r'[a-zA-Z_]\w*:', Name.Label),
|
| 906 |
+
(r'[a-zA-Z_\$]\w*', Name),
|
| 907 |
+
(r'(isa|[.]{3}|[.]{2}|[=#!<>+-/%&;,.\*\\\(\)\[\]\{\}])', Operator),
|
| 908 |
+
(r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
|
| 909 |
+
(r'0x[0-9a-fA-F]+', Number.Hex),
|
| 910 |
+
(r'[0-9]+L?', Number.Integer),
|
| 911 |
+
(r'\n', Text)
|
| 912 |
+
],
|
| 913 |
+
'template': [
|
| 914 |
+
(r'[a-zA-Z_]\w*', Name.Class, '#pop')
|
| 915 |
+
],
|
| 916 |
+
'import': [
|
| 917 |
+
(r'[\w.]+\*?', Name.Namespace, '#pop')
|
| 918 |
+
],
|
| 919 |
+
}
|
| 920 |
+
|
| 921 |
+
|
| 922 |
+
class CeylonLexer(RegexLexer):
|
| 923 |
+
"""
|
| 924 |
+
For `Ceylon <http://ceylon-lang.org/>`_ source code.
|
| 925 |
+
|
| 926 |
+
.. versionadded:: 1.6
|
| 927 |
+
"""
|
| 928 |
+
|
| 929 |
+
name = 'Ceylon'
|
| 930 |
+
aliases = ['ceylon']
|
| 931 |
+
filenames = ['*.ceylon']
|
| 932 |
+
mimetypes = ['text/x-ceylon']
|
| 933 |
+
|
| 934 |
+
flags = re.MULTILINE | re.DOTALL
|
| 935 |
+
|
| 936 |
+
#: optional Comment or Whitespace
|
| 937 |
+
_ws = r'(?:\s|//.*?\n|/[*].*?[*]/)+'
|
| 938 |
+
|
| 939 |
+
tokens = {
|
| 940 |
+
'root': [
|
| 941 |
+
# method names
|
| 942 |
+
(r'^(\s*(?:[a-zA-Z_][\w.\[\]]*\s+)+?)' # return arguments
|
| 943 |
+
r'([a-zA-Z_]\w*)' # method name
|
| 944 |
+
r'(\s*)(\()', # signature start
|
| 945 |
+
bygroups(using(this), Name.Function, Text, Operator)),
|
| 946 |
+
(r'[^\S\n]+', Text),
|
| 947 |
+
(r'//.*?\n', Comment.Single),
|
| 948 |
+
(r'/\*', Comment.Multiline, 'comment'),
|
| 949 |
+
(r'(shared|abstract|formal|default|actual|variable|deprecated|small|'
|
| 950 |
+
r'late|literal|doc|by|see|throws|optional|license|tagged|final|native|'
|
| 951 |
+
r'annotation|sealed)\b', Name.Decorator),
|
| 952 |
+
(r'(break|case|catch|continue|else|finally|for|in|'
|
| 953 |
+
r'if|return|switch|this|throw|try|while|is|exists|dynamic|'
|
| 954 |
+
r'nonempty|then|outer|assert|let)\b', Keyword),
|
| 955 |
+
(r'(abstracts|extends|satisfies|'
|
| 956 |
+
r'super|given|of|out|assign)\b', Keyword.Declaration),
|
| 957 |
+
(r'(function|value|void|new)\b',
|
| 958 |
+
Keyword.Type),
|
| 959 |
+
(r'(assembly|module|package)(\s+)', bygroups(Keyword.Namespace, Text)),
|
| 960 |
+
(r'(true|false|null)\b', Keyword.Constant),
|
| 961 |
+
(r'(class|interface|object|alias)(\s+)',
|
| 962 |
+
bygroups(Keyword.Declaration, Text), 'class'),
|
| 963 |
+
(r'(import)(\s+)', bygroups(Keyword.Namespace, Text), 'import'),
|
| 964 |
+
(r'"(\\\\|\\"|[^"])*"', String),
|
| 965 |
+
(r"'\\.'|'[^\\]'|'\\\{#[0-9a-fA-F]{4}\}'", String.Char),
|
| 966 |
+
(r'".*``.*``.*"', String.Interpol),
|
| 967 |
+
(r'(\.)([a-z_]\w*)',
|
| 968 |
+
bygroups(Operator, Name.Attribute)),
|
| 969 |
+
(r'[a-zA-Z_]\w*:', Name.Label),
|
| 970 |
+
(r'[a-zA-Z_]\w*', Name),
|
| 971 |
+
(r'[~^*!%&\[\](){}<>|+=:;,./?-]', Operator),
|
| 972 |
+
(r'\d{1,3}(_\d{3})+\.\d{1,3}(_\d{3})+[kMGTPmunpf]?', Number.Float),
|
| 973 |
+
(r'\d{1,3}(_\d{3})+\.[0-9]+([eE][+-]?[0-9]+)?[kMGTPmunpf]?',
|
| 974 |
+
Number.Float),
|
| 975 |
+
(r'[0-9][0-9]*\.\d{1,3}(_\d{3})+[kMGTPmunpf]?', Number.Float),
|
| 976 |
+
(r'[0-9][0-9]*\.[0-9]+([eE][+-]?[0-9]+)?[kMGTPmunpf]?',
|
| 977 |
+
Number.Float),
|
| 978 |
+
(r'#([0-9a-fA-F]{4})(_[0-9a-fA-F]{4})+', Number.Hex),
|
| 979 |
+
(r'#[0-9a-fA-F]+', Number.Hex),
|
| 980 |
+
(r'\$([01]{4})(_[01]{4})+', Number.Bin),
|
| 981 |
+
(r'\$[01]+', Number.Bin),
|
| 982 |
+
(r'\d{1,3}(_\d{3})+[kMGTP]?', Number.Integer),
|
| 983 |
+
(r'[0-9]+[kMGTP]?', Number.Integer),
|
| 984 |
+
(r'\n', Text)
|
| 985 |
+
],
|
| 986 |
+
'class': [
|
| 987 |
+
(r'[A-Za-z_]\w*', Name.Class, '#pop')
|
| 988 |
+
],
|
| 989 |
+
'import': [
|
| 990 |
+
(r'[a-z][\w.]*',
|
| 991 |
+
Name.Namespace, '#pop')
|
| 992 |
+
],
|
| 993 |
+
'comment': [
|
| 994 |
+
(r'[^*/]', Comment.Multiline),
|
| 995 |
+
(r'/\*', Comment.Multiline, '#push'),
|
| 996 |
+
(r'\*/', Comment.Multiline, '#pop'),
|
| 997 |
+
(r'[*/]', Comment.Multiline)
|
| 998 |
+
],
|
| 999 |
+
}
|
| 1000 |
+
|
| 1001 |
+
|
| 1002 |
+
class KotlinLexer(RegexLexer):
|
| 1003 |
+
"""
|
| 1004 |
+
For `Kotlin <http://kotlinlang.org/>`_
|
| 1005 |
+
source code.
|
| 1006 |
+
|
| 1007 |
+
.. versionadded:: 1.5
|
| 1008 |
+
"""
|
| 1009 |
+
|
| 1010 |
+
name = 'Kotlin'
|
| 1011 |
+
aliases = ['kotlin']
|
| 1012 |
+
filenames = ['*.kt']
|
| 1013 |
+
mimetypes = ['text/x-kotlin']
|
| 1014 |
+
|
| 1015 |
+
flags = re.MULTILINE | re.DOTALL | re.UNICODE
|
| 1016 |
+
|
| 1017 |
+
kt_name = ('@?[_' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl') + ']' +
|
| 1018 |
+
'[' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl', 'Nd', 'Pc', 'Cf',
|
| 1019 |
+
'Mn', 'Mc') + ']*')
|
| 1020 |
+
kt_id = '(' + kt_name + '|`' + kt_name + '`)'
|
| 1021 |
+
|
| 1022 |
+
tokens = {
|
| 1023 |
+
'root': [
|
| 1024 |
+
(r'^\s*\[.*?\]', Name.Attribute),
|
| 1025 |
+
(r'[^\S\n]+', Text),
|
| 1026 |
+
(r'\\\n', Text), # line continuation
|
| 1027 |
+
(r'//.*?\n', Comment.Single),
|
| 1028 |
+
(r'/[*].*?[*]/', Comment.Multiline),
|
| 1029 |
+
(r'\n', Text),
|
| 1030 |
+
(r'::|!!|\?[:.]', Operator),
|
| 1031 |
+
(r'[~!%^&*()+=|\[\]:;,.<>/?-]', Punctuation),
|
| 1032 |
+
(r'[{}]', Punctuation),
|
| 1033 |
+
(r'@"(""|[^"])*"', String),
|
| 1034 |
+
(r'"(\\\\|\\"|[^"\n])*["\n]', String),
|
| 1035 |
+
(r"'\\.'|'[^\\]'", String.Char),
|
| 1036 |
+
(r"[0-9](\.[0-9]*)?([eE][+-][0-9]+)?[flFL]?|"
|
| 1037 |
+
r"0[xX][0-9a-fA-F]+[Ll]?", Number),
|
| 1038 |
+
(r'(class)(\s+)(object)', bygroups(Keyword, Text, Keyword)),
|
| 1039 |
+
(r'(class|interface|object)(\s+)', bygroups(Keyword, Text), 'class'),
|
| 1040 |
+
(r'(package|import)(\s+)', bygroups(Keyword, Text), 'package'),
|
| 1041 |
+
(r'(val|var)(\s+)', bygroups(Keyword, Text), 'property'),
|
| 1042 |
+
(r'(fun)(\s+)', bygroups(Keyword, Text), 'function'),
|
| 1043 |
+
(r'(abstract|annotation|as|break|by|catch|class|companion|const|'
|
| 1044 |
+
r'constructor|continue|crossinline|data|do|dynamic|else|enum|'
|
| 1045 |
+
r'external|false|final|finally|for|fun|get|if|import|in|infix|'
|
| 1046 |
+
r'inline|inner|interface|internal|is|lateinit|noinline|null|'
|
| 1047 |
+
r'object|open|operator|out|override|package|private|protected|'
|
| 1048 |
+
r'public|reified|return|sealed|set|super|tailrec|this|throw|'
|
| 1049 |
+
r'true|try|val|var|vararg|when|where|while)\b', Keyword),
|
| 1050 |
+
(kt_id, Name),
|
| 1051 |
+
],
|
| 1052 |
+
'package': [
|
| 1053 |
+
(r'\S+', Name.Namespace, '#pop')
|
| 1054 |
+
],
|
| 1055 |
+
'class': [
|
| 1056 |
+
(kt_id, Name.Class, '#pop')
|
| 1057 |
+
],
|
| 1058 |
+
'property': [
|
| 1059 |
+
(kt_id, Name.Property, '#pop')
|
| 1060 |
+
],
|
| 1061 |
+
'function': [
|
| 1062 |
+
(kt_id, Name.Function, '#pop')
|
| 1063 |
+
],
|
| 1064 |
+
}
|
| 1065 |
+
|
| 1066 |
+
|
| 1067 |
+
class XtendLexer(RegexLexer):
|
| 1068 |
+
"""
|
| 1069 |
+
For `Xtend <http://xtend-lang.org/>`_ source code.
|
| 1070 |
+
|
| 1071 |
+
.. versionadded:: 1.6
|
| 1072 |
+
"""
|
| 1073 |
+
|
| 1074 |
+
name = 'Xtend'
|
| 1075 |
+
aliases = ['xtend']
|
| 1076 |
+
filenames = ['*.xtend']
|
| 1077 |
+
mimetypes = ['text/x-xtend']
|
| 1078 |
+
|
| 1079 |
+
flags = re.MULTILINE | re.DOTALL
|
| 1080 |
+
|
| 1081 |
+
tokens = {
|
| 1082 |
+
'root': [
|
| 1083 |
+
# method names
|
| 1084 |
+
(r'^(\s*(?:[a-zA-Z_][\w.\[\]]*\s+)+?)' # return arguments
|
| 1085 |
+
r'([a-zA-Z_$][\w$]*)' # method name
|
| 1086 |
+
r'(\s*)(\()', # signature start
|
| 1087 |
+
bygroups(using(this), Name.Function, Text, Operator)),
|
| 1088 |
+
(r'[^\S\n]+', Text),
|
| 1089 |
+
(r'//.*?\n', Comment.Single),
|
| 1090 |
+
(r'/\*.*?\*/', Comment.Multiline),
|
| 1091 |
+
(r'@[a-zA-Z_][\w.]*', Name.Decorator),
|
| 1092 |
+
(r'(assert|break|case|catch|continue|default|do|else|finally|for|'
|
| 1093 |
+
r'if|goto|instanceof|new|return|switch|this|throw|try|while|IF|'
|
| 1094 |
+
r'ELSE|ELSEIF|ENDIF|FOR|ENDFOR|SEPARATOR|BEFORE|AFTER)\b',
|
| 1095 |
+
Keyword),
|
| 1096 |
+
(r'(def|abstract|const|enum|extends|final|implements|native|private|'
|
| 1097 |
+
r'protected|public|static|strictfp|super|synchronized|throws|'
|
| 1098 |
+
r'transient|volatile)\b', Keyword.Declaration),
|
| 1099 |
+
(r'(boolean|byte|char|double|float|int|long|short|void)\b',
|
| 1100 |
+
Keyword.Type),
|
| 1101 |
+
(r'(package)(\s+)', bygroups(Keyword.Namespace, Text)),
|
| 1102 |
+
(r'(true|false|null)\b', Keyword.Constant),
|
| 1103 |
+
(r'(class|interface)(\s+)', bygroups(Keyword.Declaration, Text),
|
| 1104 |
+
'class'),
|
| 1105 |
+
(r'(import)(\s+)', bygroups(Keyword.Namespace, Text), 'import'),
|
| 1106 |
+
(r"(''')", String, 'template'),
|
| 1107 |
+
(u'(\u00BB)', String, 'template'),
|
| 1108 |
+
(r'"(\\\\|\\"|[^"])*"', String),
|
| 1109 |
+
(r"'(\\\\|\\'|[^'])*'", String),
|
| 1110 |
+
(r'[a-zA-Z_]\w*:', Name.Label),
|
| 1111 |
+
(r'[a-zA-Z_$]\w*', Name),
|
| 1112 |
+
(r'[~^*!%&\[\](){}<>\|+=:;,./?-]', Operator),
|
| 1113 |
+
(r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
|
| 1114 |
+
(r'0x[0-9a-fA-F]+', Number.Hex),
|
| 1115 |
+
(r'[0-9]+L?', Number.Integer),
|
| 1116 |
+
(r'\n', Text)
|
| 1117 |
+
],
|
| 1118 |
+
'class': [
|
| 1119 |
+
(r'[a-zA-Z_]\w*', Name.Class, '#pop')
|
| 1120 |
+
],
|
| 1121 |
+
'import': [
|
| 1122 |
+
(r'[\w.]+\*?', Name.Namespace, '#pop')
|
| 1123 |
+
],
|
| 1124 |
+
'template': [
|
| 1125 |
+
(r"'''", String, '#pop'),
|
| 1126 |
+
(u'\u00AB', String, '#pop'),
|
| 1127 |
+
(r'.', String)
|
| 1128 |
+
],
|
| 1129 |
+
}
|
| 1130 |
+
|
| 1131 |
+
|
| 1132 |
+
class PigLexer(RegexLexer):
|
| 1133 |
+
"""
|
| 1134 |
+
For `Pig Latin <https://pig.apache.org/>`_ source code.
|
| 1135 |
+
|
| 1136 |
+
.. versionadded:: 2.0
|
| 1137 |
+
"""
|
| 1138 |
+
|
| 1139 |
+
name = 'Pig'
|
| 1140 |
+
aliases = ['pig']
|
| 1141 |
+
filenames = ['*.pig']
|
| 1142 |
+
mimetypes = ['text/x-pig']
|
| 1143 |
+
|
| 1144 |
+
flags = re.MULTILINE | re.IGNORECASE
|
| 1145 |
+
|
| 1146 |
+
tokens = {
|
| 1147 |
+
'root': [
|
| 1148 |
+
(r'\s+', Text),
|
| 1149 |
+
(r'--.*', Comment),
|
| 1150 |
+
(r'/\*[\w\W]*?\*/', Comment.Multiline),
|
| 1151 |
+
(r'\\\n', Text),
|
| 1152 |
+
(r'\\', Text),
|
| 1153 |
+
(r'\'(?:\\[ntbrf\\\']|\\u[0-9a-f]{4}|[^\'\\\n\r])*\'', String),
|
| 1154 |
+
include('keywords'),
|
| 1155 |
+
include('types'),
|
| 1156 |
+
include('builtins'),
|
| 1157 |
+
include('punct'),
|
| 1158 |
+
include('operators'),
|
| 1159 |
+
(r'[0-9]*\.[0-9]+(e[0-9]+)?[fd]?', Number.Float),
|
| 1160 |
+
(r'0x[0-9a-f]+', Number.Hex),
|
| 1161 |
+
(r'[0-9]+L?', Number.Integer),
|
| 1162 |
+
(r'\n', Text),
|
| 1163 |
+
(r'([a-z_]\w*)(\s*)(\()',
|
| 1164 |
+
bygroups(Name.Function, Text, Punctuation)),
|
| 1165 |
+
(r'[()#:]', Text),
|
| 1166 |
+
(r'[^(:#\'")\s]+', Text),
|
| 1167 |
+
(r'\S+\s+', Text) # TODO: make tests pass without \s+
|
| 1168 |
+
],
|
| 1169 |
+
'keywords': [
|
| 1170 |
+
(r'(assert|and|any|all|arrange|as|asc|bag|by|cache|CASE|cat|cd|cp|'
|
| 1171 |
+
r'%declare|%default|define|dense|desc|describe|distinct|du|dump|'
|
| 1172 |
+
r'eval|exex|explain|filter|flatten|foreach|full|generate|group|'
|
| 1173 |
+
r'help|if|illustrate|import|inner|input|into|is|join|kill|left|'
|
| 1174 |
+
r'limit|load|ls|map|matches|mkdir|mv|not|null|onschema|or|order|'
|
| 1175 |
+
r'outer|output|parallel|pig|pwd|quit|register|returns|right|rm|'
|
| 1176 |
+
r'rmf|rollup|run|sample|set|ship|split|stderr|stdin|stdout|store|'
|
| 1177 |
+
r'stream|through|union|using|void)\b', Keyword)
|
| 1178 |
+
],
|
| 1179 |
+
'builtins': [
|
| 1180 |
+
(r'(AVG|BinStorage|cogroup|CONCAT|copyFromLocal|copyToLocal|COUNT|'
|
| 1181 |
+
r'cross|DIFF|MAX|MIN|PigDump|PigStorage|SIZE|SUM|TextLoader|'
|
| 1182 |
+
r'TOKENIZE)\b', Name.Builtin)
|
| 1183 |
+
],
|
| 1184 |
+
'types': [
|
| 1185 |
+
(r'(bytearray|BIGINTEGER|BIGDECIMAL|chararray|datetime|double|float|'
|
| 1186 |
+
r'int|long|tuple)\b', Keyword.Type)
|
| 1187 |
+
],
|
| 1188 |
+
'punct': [
|
| 1189 |
+
(r'[;(){}\[\]]', Punctuation),
|
| 1190 |
+
],
|
| 1191 |
+
'operators': [
|
| 1192 |
+
(r'[#=,./%+\-?]', Operator),
|
| 1193 |
+
(r'(eq|gt|lt|gte|lte|neq|matches)\b', Operator),
|
| 1194 |
+
(r'(==|<=|<|>=|>|!=)', Operator),
|
| 1195 |
+
],
|
| 1196 |
+
}
|
| 1197 |
+
|
| 1198 |
+
|
| 1199 |
+
class GoloLexer(RegexLexer):
|
| 1200 |
+
"""
|
| 1201 |
+
For `Golo <http://golo-lang.org/>`_ source code.
|
| 1202 |
+
|
| 1203 |
+
.. versionadded:: 2.0
|
| 1204 |
+
"""
|
| 1205 |
+
|
| 1206 |
+
name = 'Golo'
|
| 1207 |
+
filenames = ['*.golo']
|
| 1208 |
+
aliases = ['golo']
|
| 1209 |
+
|
| 1210 |
+
tokens = {
|
| 1211 |
+
'root': [
|
| 1212 |
+
(r'[^\S\n]+', Text),
|
| 1213 |
+
|
| 1214 |
+
(r'#.*$', Comment),
|
| 1215 |
+
|
| 1216 |
+
(r'(\^|\.\.\.|:|\?:|->|==|!=|=|\+|\*|%|/|<=|<|>=|>|=|\.)',
|
| 1217 |
+
Operator),
|
| 1218 |
+
(r'(?<=[^-])(-)(?=[^-])', Operator),
|
| 1219 |
+
|
| 1220 |
+
(r'(?<=[^`])(is|isnt|and|or|not|oftype|in|orIfNull)\b', Operator.Word),
|
| 1221 |
+
(r'[]{}|(),[]', Punctuation),
|
| 1222 |
+
|
| 1223 |
+
(r'(module|import)(\s+)',
|
| 1224 |
+
bygroups(Keyword.Namespace, Text),
|
| 1225 |
+
'modname'),
|
| 1226 |
+
(r'\b([a-zA-Z_][\w$.]*)(::)', bygroups(Name.Namespace, Punctuation)),
|
| 1227 |
+
(r'\b([a-zA-Z_][\w$]*(?:\.[a-zA-Z_][\w$]*)+)\b', Name.Namespace),
|
| 1228 |
+
|
| 1229 |
+
(r'(let|var)(\s+)',
|
| 1230 |
+
bygroups(Keyword.Declaration, Text),
|
| 1231 |
+
'varname'),
|
| 1232 |
+
(r'(struct)(\s+)',
|
| 1233 |
+
bygroups(Keyword.Declaration, Text),
|
| 1234 |
+
'structname'),
|
| 1235 |
+
(r'(function)(\s+)',
|
| 1236 |
+
bygroups(Keyword.Declaration, Text),
|
| 1237 |
+
'funcname'),
|
| 1238 |
+
|
| 1239 |
+
(r'(null|true|false)\b', Keyword.Constant),
|
| 1240 |
+
(r'(augment|pimp'
|
| 1241 |
+
r'|if|else|case|match|return'
|
| 1242 |
+
r'|case|when|then|otherwise'
|
| 1243 |
+
r'|while|for|foreach'
|
| 1244 |
+
r'|try|catch|finally|throw'
|
| 1245 |
+
r'|local'
|
| 1246 |
+
r'|continue|break)\b', Keyword),
|
| 1247 |
+
|
| 1248 |
+
(r'(map|array|list|set|vector|tuple)(\[)',
|
| 1249 |
+
bygroups(Name.Builtin, Punctuation)),
|
| 1250 |
+
(r'(print|println|readln|raise|fun'
|
| 1251 |
+
r'|asInterfaceInstance)\b', Name.Builtin),
|
| 1252 |
+
(r'(`?[a-zA-Z_][\w$]*)(\()',
|
| 1253 |
+
bygroups(Name.Function, Punctuation)),
|
| 1254 |
+
|
| 1255 |
+
(r'-?[\d_]*\.[\d_]*([eE][+-]?\d[\d_]*)?F?', Number.Float),
|
| 1256 |
+
(r'0[0-7]+j?', Number.Oct),
|
| 1257 |
+
(r'0[xX][a-fA-F0-9]+', Number.Hex),
|
| 1258 |
+
(r'-?\d[\d_]*L', Number.Integer.Long),
|
| 1259 |
+
(r'-?\d[\d_]*', Number.Integer),
|
| 1260 |
+
|
| 1261 |
+
('`?[a-zA-Z_][\w$]*', Name),
|
| 1262 |
+
(r'@[a-zA-Z_][\w$.]*', Name.Decorator),
|
| 1263 |
+
|
| 1264 |
+
(r'"""', String, combined('stringescape', 'triplestring')),
|
| 1265 |
+
(r'"', String, combined('stringescape', 'doublestring')),
|
| 1266 |
+
(r"'", String, combined('stringescape', 'singlestring')),
|
| 1267 |
+
(r'----((.|\n)*?)----', String.Doc)
|
| 1268 |
+
|
| 1269 |
+
],
|
| 1270 |
+
|
| 1271 |
+
'funcname': [
|
| 1272 |
+
(r'`?[a-zA-Z_][\w$]*', Name.Function, '#pop'),
|
| 1273 |
+
],
|
| 1274 |
+
'modname': [
|
| 1275 |
+
(r'[a-zA-Z_][\w$.]*\*?', Name.Namespace, '#pop')
|
| 1276 |
+
],
|
| 1277 |
+
'structname': [
|
| 1278 |
+
(r'`?[\w.]+\*?', Name.Class, '#pop')
|
| 1279 |
+
],
|
| 1280 |
+
'varname': [
|
| 1281 |
+
(r'`?[a-zA-Z_][\w$]*', Name.Variable, '#pop'),
|
| 1282 |
+
],
|
| 1283 |
+
'string': [
|
| 1284 |
+
(r'[^\\\'"\n]+', String),
|
| 1285 |
+
(r'[\'"\\]', String)
|
| 1286 |
+
],
|
| 1287 |
+
'stringescape': [
|
| 1288 |
+
(r'\\([\\abfnrtv"\']|\n|N\{.*?\}|u[a-fA-F0-9]{4}|'
|
| 1289 |
+
r'U[a-fA-F0-9]{8}|x[a-fA-F0-9]{2}|[0-7]{1,3})', String.Escape)
|
| 1290 |
+
],
|
| 1291 |
+
'triplestring': [
|
| 1292 |
+
(r'"""', String, '#pop'),
|
| 1293 |
+
include('string'),
|
| 1294 |
+
(r'\n', String),
|
| 1295 |
+
],
|
| 1296 |
+
'doublestring': [
|
| 1297 |
+
(r'"', String.Double, '#pop'),
|
| 1298 |
+
include('string'),
|
| 1299 |
+
],
|
| 1300 |
+
'singlestring': [
|
| 1301 |
+
(r"'", String, '#pop'),
|
| 1302 |
+
include('string'),
|
| 1303 |
+
],
|
| 1304 |
+
'operators': [
|
| 1305 |
+
(r'[#=,./%+\-?]', Operator),
|
| 1306 |
+
(r'(eq|gt|lt|gte|lte|neq|matches)\b', Operator),
|
| 1307 |
+
(r'(==|<=|<|>=|>|!=)', Operator),
|
| 1308 |
+
],
|
| 1309 |
+
}
|
| 1310 |
+
|
| 1311 |
+
|
| 1312 |
+
class JasminLexer(RegexLexer):
|
| 1313 |
+
"""
|
| 1314 |
+
For `Jasmin <http://jasmin.sourceforge.net/>`_ assembly code.
|
| 1315 |
+
|
| 1316 |
+
.. versionadded:: 2.0
|
| 1317 |
+
"""
|
| 1318 |
+
|
| 1319 |
+
name = 'Jasmin'
|
| 1320 |
+
aliases = ['jasmin', 'jasminxt']
|
| 1321 |
+
filenames = ['*.j']
|
| 1322 |
+
|
| 1323 |
+
_whitespace = r' \n\t\r'
|
| 1324 |
+
_ws = r'(?:[%s]+)' % _whitespace
|
| 1325 |
+
_separator = r'%s:=' % _whitespace
|
| 1326 |
+
_break = r'(?=[%s]|$)' % _separator
|
| 1327 |
+
_name = r'[^%s]+' % _separator
|
| 1328 |
+
_unqualified_name = r'(?:[^%s.;\[/]+)' % _separator
|
| 1329 |
+
|
| 1330 |
+
tokens = {
|
| 1331 |
+
'default': [
|
| 1332 |
+
(r'\n', Text, '#pop'),
|
| 1333 |
+
(r"'", String.Single, ('#pop', 'quote')),
|
| 1334 |
+
(r'"', String.Double, 'string'),
|
| 1335 |
+
(r'=', Punctuation),
|
| 1336 |
+
(r':', Punctuation, 'label'),
|
| 1337 |
+
(_ws, Text),
|
| 1338 |
+
(r';.*', Comment.Single),
|
| 1339 |
+
(r'(\$[-+])?0x-?[\da-fA-F]+%s' % _break, Number.Hex),
|
| 1340 |
+
(r'(\$[-+]|\+)?-?\d+%s' % _break, Number.Integer),
|
| 1341 |
+
(r'-?(\d+\.\d*|\.\d+)([eE][-+]?\d+)?[fFdD]?'
|
| 1342 |
+
r'[\x00-\x08\x0b\x0c\x0e-\x1f]*%s' % _break, Number.Float),
|
| 1343 |
+
(r'\$%s' % _name, Name.Variable),
|
| 1344 |
+
|
| 1345 |
+
# Directives
|
| 1346 |
+
(r'\.annotation%s' % _break, Keyword.Reserved, 'annotation'),
|
| 1347 |
+
(r'(\.attribute|\.bytecode|\.debug|\.deprecated|\.enclosing|'
|
| 1348 |
+
r'\.interface|\.line|\.signature|\.source|\.stack|\.var|abstract|'
|
| 1349 |
+
r'annotation|bridge|class|default|enum|field|final|fpstrict|'
|
| 1350 |
+
r'interface|native|private|protected|public|signature|static|'
|
| 1351 |
+
r'synchronized|synthetic|transient|varargs|volatile)%s' % _break,
|
| 1352 |
+
Keyword.Reserved),
|
| 1353 |
+
(r'\.catch%s' % _break, Keyword.Reserved, 'caught-exception'),
|
| 1354 |
+
(r'(\.class|\.implements|\.inner|\.super|inner|invisible|'
|
| 1355 |
+
r'invisibleparam|outer|visible|visibleparam)%s' % _break,
|
| 1356 |
+
Keyword.Reserved, 'class/convert-dots'),
|
| 1357 |
+
(r'\.field%s' % _break, Keyword.Reserved,
|
| 1358 |
+
('descriptor/convert-dots', 'field')),
|
| 1359 |
+
(r'(\.end|\.limit|use)%s' % _break, Keyword.Reserved,
|
| 1360 |
+
'no-verification'),
|
| 1361 |
+
(r'\.method%s' % _break, Keyword.Reserved, 'method'),
|
| 1362 |
+
(r'\.set%s' % _break, Keyword.Reserved, 'var'),
|
| 1363 |
+
(r'\.throws%s' % _break, Keyword.Reserved, 'exception'),
|
| 1364 |
+
(r'(from|offset|to|using)%s' % _break, Keyword.Reserved, 'label'),
|
| 1365 |
+
(r'is%s' % _break, Keyword.Reserved,
|
| 1366 |
+
('descriptor/convert-dots', 'var')),
|
| 1367 |
+
(r'(locals|stack)%s' % _break, Keyword.Reserved, 'verification'),
|
| 1368 |
+
(r'method%s' % _break, Keyword.Reserved, 'enclosing-method'),
|
| 1369 |
+
|
| 1370 |
+
# Instructions
|
| 1371 |
+
(words((
|
| 1372 |
+
'aaload', 'aastore', 'aconst_null', 'aload', 'aload_0', 'aload_1', 'aload_2',
|
| 1373 |
+
'aload_3', 'aload_w', 'areturn', 'arraylength', 'astore', 'astore_0', 'astore_1',
|
| 1374 |
+
'astore_2', 'astore_3', 'astore_w', 'athrow', 'baload', 'bastore', 'bipush',
|
| 1375 |
+
'breakpoint', 'caload', 'castore', 'd2f', 'd2i', 'd2l', 'dadd', 'daload', 'dastore',
|
| 1376 |
+
'dcmpg', 'dcmpl', 'dconst_0', 'dconst_1', 'ddiv', 'dload', 'dload_0', 'dload_1',
|
| 1377 |
+
'dload_2', 'dload_3', 'dload_w', 'dmul', 'dneg', 'drem', 'dreturn', 'dstore', 'dstore_0',
|
| 1378 |
+
'dstore_1', 'dstore_2', 'dstore_3', 'dstore_w', 'dsub', 'dup', 'dup2', 'dup2_x1',
|
| 1379 |
+
'dup2_x2', 'dup_x1', 'dup_x2', 'f2d', 'f2i', 'f2l', 'fadd', 'faload', 'fastore', 'fcmpg',
|
| 1380 |
+
'fcmpl', 'fconst_0', 'fconst_1', 'fconst_2', 'fdiv', 'fload', 'fload_0', 'fload_1',
|
| 1381 |
+
'fload_2', 'fload_3', 'fload_w', 'fmul', 'fneg', 'frem', 'freturn', 'fstore', 'fstore_0',
|
| 1382 |
+
'fstore_1', 'fstore_2', 'fstore_3', 'fstore_w', 'fsub', 'i2b', 'i2c', 'i2d', 'i2f', 'i2l',
|
| 1383 |
+
'i2s', 'iadd', 'iaload', 'iand', 'iastore', 'iconst_0', 'iconst_1', 'iconst_2',
|
| 1384 |
+
'iconst_3', 'iconst_4', 'iconst_5', 'iconst_m1', 'idiv', 'iinc', 'iinc_w', 'iload',
|
| 1385 |
+
'iload_0', 'iload_1', 'iload_2', 'iload_3', 'iload_w', 'imul', 'ineg', 'int2byte',
|
| 1386 |
+
'int2char', 'int2short', 'ior', 'irem', 'ireturn', 'ishl', 'ishr', 'istore', 'istore_0',
|
| 1387 |
+
'istore_1', 'istore_2', 'istore_3', 'istore_w', 'isub', 'iushr', 'ixor', 'l2d', 'l2f',
|
| 1388 |
+
'l2i', 'ladd', 'laload', 'land', 'lastore', 'lcmp', 'lconst_0', 'lconst_1', 'ldc2_w',
|
| 1389 |
+
'ldiv', 'lload', 'lload_0', 'lload_1', 'lload_2', 'lload_3', 'lload_w', 'lmul', 'lneg',
|
| 1390 |
+
'lookupswitch', 'lor', 'lrem', 'lreturn', 'lshl', 'lshr', 'lstore', 'lstore_0',
|
| 1391 |
+
'lstore_1', 'lstore_2', 'lstore_3', 'lstore_w', 'lsub', 'lushr', 'lxor',
|
| 1392 |
+
'monitorenter', 'monitorexit', 'nop', 'pop', 'pop2', 'ret', 'ret_w', 'return', 'saload',
|
| 1393 |
+
'sastore', 'sipush', 'swap'), suffix=_break), Keyword.Reserved),
|
| 1394 |
+
(r'(anewarray|checkcast|instanceof|ldc|ldc_w|new)%s' % _break,
|
| 1395 |
+
Keyword.Reserved, 'class/no-dots'),
|
| 1396 |
+
(r'invoke(dynamic|interface|nonvirtual|special|'
|
| 1397 |
+
r'static|virtual)%s' % _break, Keyword.Reserved,
|
| 1398 |
+
'invocation'),
|
| 1399 |
+
(r'(getfield|putfield)%s' % _break, Keyword.Reserved,
|
| 1400 |
+
('descriptor/no-dots', 'field')),
|
| 1401 |
+
(r'(getstatic|putstatic)%s' % _break, Keyword.Reserved,
|
| 1402 |
+
('descriptor/no-dots', 'static')),
|
| 1403 |
+
(words((
|
| 1404 |
+
'goto', 'goto_w', 'if_acmpeq', 'if_acmpne', 'if_icmpeq',
|
| 1405 |
+
'if_icmpge', 'if_icmpgt', 'if_icmple', 'if_icmplt', 'if_icmpne',
|
| 1406 |
+
'ifeq', 'ifge', 'ifgt', 'ifle', 'iflt', 'ifne', 'ifnonnull',
|
| 1407 |
+
'ifnull', 'jsr', 'jsr_w'), suffix=_break),
|
| 1408 |
+
Keyword.Reserved, 'label'),
|
| 1409 |
+
(r'(multianewarray|newarray)%s' % _break, Keyword.Reserved,
|
| 1410 |
+
'descriptor/convert-dots'),
|
| 1411 |
+
(r'tableswitch%s' % _break, Keyword.Reserved, 'table')
|
| 1412 |
+
],
|
| 1413 |
+
'quote': [
|
| 1414 |
+
(r"'", String.Single, '#pop'),
|
| 1415 |
+
(r'\\u[\da-fA-F]{4}', String.Escape),
|
| 1416 |
+
(r"[^'\\]+", String.Single)
|
| 1417 |
+
],
|
| 1418 |
+
'string': [
|
| 1419 |
+
(r'"', String.Double, '#pop'),
|
| 1420 |
+
(r'\\([nrtfb"\'\\]|u[\da-fA-F]{4}|[0-3]?[0-7]{1,2})',
|
| 1421 |
+
String.Escape),
|
| 1422 |
+
(r'[^"\\]+', String.Double)
|
| 1423 |
+
],
|
| 1424 |
+
'root': [
|
| 1425 |
+
(r'\n+', Text),
|
| 1426 |
+
(r"'", String.Single, 'quote'),
|
| 1427 |
+
include('default'),
|
| 1428 |
+
(r'(%s)([ \t\r]*)(:)' % _name,
|
| 1429 |
+
bygroups(Name.Label, Text, Punctuation)),
|
| 1430 |
+
(_name, String.Other)
|
| 1431 |
+
],
|
| 1432 |
+
'annotation': [
|
| 1433 |
+
(r'\n', Text, ('#pop', 'annotation-body')),
|
| 1434 |
+
(r'default%s' % _break, Keyword.Reserved,
|
| 1435 |
+
('#pop', 'annotation-default')),
|
| 1436 |
+
include('default')
|
| 1437 |
+
],
|
| 1438 |
+
'annotation-body': [
|
| 1439 |
+
(r'\n+', Text),
|
| 1440 |
+
(r'\.end%s' % _break, Keyword.Reserved, '#pop'),
|
| 1441 |
+
include('default'),
|
| 1442 |
+
(_name, String.Other, ('annotation-items', 'descriptor/no-dots'))
|
| 1443 |
+
],
|
| 1444 |
+
'annotation-default': [
|
| 1445 |
+
(r'\n+', Text),
|
| 1446 |
+
(r'\.end%s' % _break, Keyword.Reserved, '#pop'),
|
| 1447 |
+
include('default'),
|
| 1448 |
+
default(('annotation-items', 'descriptor/no-dots'))
|
| 1449 |
+
],
|
| 1450 |
+
'annotation-items': [
|
| 1451 |
+
(r"'", String.Single, 'quote'),
|
| 1452 |
+
include('default'),
|
| 1453 |
+
(_name, String.Other)
|
| 1454 |
+
],
|
| 1455 |
+
'caught-exception': [
|
| 1456 |
+
(r'all%s' % _break, Keyword, '#pop'),
|
| 1457 |
+
include('exception')
|
| 1458 |
+
],
|
| 1459 |
+
'class/convert-dots': [
|
| 1460 |
+
include('default'),
|
| 1461 |
+
(r'(L)((?:%s[/.])*)(%s)(;)' % (_unqualified_name, _name),
|
| 1462 |
+
bygroups(Keyword.Type, Name.Namespace, Name.Class, Punctuation),
|
| 1463 |
+
'#pop'),
|
| 1464 |
+
(r'((?:%s[/.])*)(%s)' % (_unqualified_name, _name),
|
| 1465 |
+
bygroups(Name.Namespace, Name.Class), '#pop')
|
| 1466 |
+
],
|
| 1467 |
+
'class/no-dots': [
|
| 1468 |
+
include('default'),
|
| 1469 |
+
(r'\[+', Punctuation, ('#pop', 'descriptor/no-dots')),
|
| 1470 |
+
(r'(L)((?:%s/)*)(%s)(;)' % (_unqualified_name, _name),
|
| 1471 |
+
bygroups(Keyword.Type, Name.Namespace, Name.Class, Punctuation),
|
| 1472 |
+
'#pop'),
|
| 1473 |
+
(r'((?:%s/)*)(%s)' % (_unqualified_name, _name),
|
| 1474 |
+
bygroups(Name.Namespace, Name.Class), '#pop')
|
| 1475 |
+
],
|
| 1476 |
+
'descriptor/convert-dots': [
|
| 1477 |
+
include('default'),
|
| 1478 |
+
(r'\[+', Punctuation),
|
| 1479 |
+
(r'(L)((?:%s[/.])*)(%s?)(;)' % (_unqualified_name, _name),
|
| 1480 |
+
bygroups(Keyword.Type, Name.Namespace, Name.Class, Punctuation),
|
| 1481 |
+
'#pop'),
|
| 1482 |
+
(r'[^%s\[)L]+' % _separator, Keyword.Type, '#pop'),
|
| 1483 |
+
default('#pop')
|
| 1484 |
+
],
|
| 1485 |
+
'descriptor/no-dots': [
|
| 1486 |
+
include('default'),
|
| 1487 |
+
(r'\[+', Punctuation),
|
| 1488 |
+
(r'(L)((?:%s/)*)(%s)(;)' % (_unqualified_name, _name),
|
| 1489 |
+
bygroups(Keyword.Type, Name.Namespace, Name.Class, Punctuation),
|
| 1490 |
+
'#pop'),
|
| 1491 |
+
(r'[^%s\[)L]+' % _separator, Keyword.Type, '#pop'),
|
| 1492 |
+
default('#pop')
|
| 1493 |
+
],
|
| 1494 |
+
'descriptors/convert-dots': [
|
| 1495 |
+
(r'\)', Punctuation, '#pop'),
|
| 1496 |
+
default('descriptor/convert-dots')
|
| 1497 |
+
],
|
| 1498 |
+
'enclosing-method': [
|
| 1499 |
+
(_ws, Text),
|
| 1500 |
+
(r'(?=[^%s]*\()' % _separator, Text, ('#pop', 'invocation')),
|
| 1501 |
+
default(('#pop', 'class/convert-dots'))
|
| 1502 |
+
],
|
| 1503 |
+
'exception': [
|
| 1504 |
+
include('default'),
|
| 1505 |
+
(r'((?:%s[/.])*)(%s)' % (_unqualified_name, _name),
|
| 1506 |
+
bygroups(Name.Namespace, Name.Exception), '#pop')
|
| 1507 |
+
],
|
| 1508 |
+
'field': [
|
| 1509 |
+
(r'static%s' % _break, Keyword.Reserved, ('#pop', 'static')),
|
| 1510 |
+
include('default'),
|
| 1511 |
+
(r'((?:%s[/.](?=[^%s]*[/.]))*)(%s[/.])?(%s)' %
|
| 1512 |
+
(_unqualified_name, _separator, _unqualified_name, _name),
|
| 1513 |
+
bygroups(Name.Namespace, Name.Class, Name.Variable.Instance),
|
| 1514 |
+
'#pop')
|
| 1515 |
+
],
|
| 1516 |
+
'invocation': [
|
| 1517 |
+
include('default'),
|
| 1518 |
+
(r'((?:%s[/.](?=[^%s(]*[/.]))*)(%s[/.])?(%s)(\()' %
|
| 1519 |
+
(_unqualified_name, _separator, _unqualified_name, _name),
|
| 1520 |
+
bygroups(Name.Namespace, Name.Class, Name.Function, Punctuation),
|
| 1521 |
+
('#pop', 'descriptor/convert-dots', 'descriptors/convert-dots',
|
| 1522 |
+
'descriptor/convert-dots'))
|
| 1523 |
+
],
|
| 1524 |
+
'label': [
|
| 1525 |
+
include('default'),
|
| 1526 |
+
(_name, Name.Label, '#pop')
|
| 1527 |
+
],
|
| 1528 |
+
'method': [
|
| 1529 |
+
include('default'),
|
| 1530 |
+
(r'(%s)(\()' % _name, bygroups(Name.Function, Punctuation),
|
| 1531 |
+
('#pop', 'descriptor/convert-dots', 'descriptors/convert-dots',
|
| 1532 |
+
'descriptor/convert-dots'))
|
| 1533 |
+
],
|
| 1534 |
+
'no-verification': [
|
| 1535 |
+
(r'(locals|method|stack)%s' % _break, Keyword.Reserved, '#pop'),
|
| 1536 |
+
include('default')
|
| 1537 |
+
],
|
| 1538 |
+
'static': [
|
| 1539 |
+
include('default'),
|
| 1540 |
+
(r'((?:%s[/.](?=[^%s]*[/.]))*)(%s[/.])?(%s)' %
|
| 1541 |
+
(_unqualified_name, _separator, _unqualified_name, _name),
|
| 1542 |
+
bygroups(Name.Namespace, Name.Class, Name.Variable.Class), '#pop')
|
| 1543 |
+
],
|
| 1544 |
+
'table': [
|
| 1545 |
+
(r'\n+', Text),
|
| 1546 |
+
(r'default%s' % _break, Keyword.Reserved, '#pop'),
|
| 1547 |
+
include('default'),
|
| 1548 |
+
(_name, Name.Label)
|
| 1549 |
+
],
|
| 1550 |
+
'var': [
|
| 1551 |
+
include('default'),
|
| 1552 |
+
(_name, Name.Variable, '#pop')
|
| 1553 |
+
],
|
| 1554 |
+
'verification': [
|
| 1555 |
+
include('default'),
|
| 1556 |
+
(r'(Double|Float|Integer|Long|Null|Top|UninitializedThis)%s' %
|
| 1557 |
+
_break, Keyword, '#pop'),
|
| 1558 |
+
(r'Object%s' % _break, Keyword, ('#pop', 'class/no-dots')),
|
| 1559 |
+
(r'Uninitialized%s' % _break, Keyword, ('#pop', 'label'))
|
| 1560 |
+
]
|
| 1561 |
+
}
|
| 1562 |
+
|
| 1563 |
+
def analyse_text(text):
|
| 1564 |
+
score = 0
|
| 1565 |
+
if re.search(r'^\s*\.class\s', text, re.MULTILINE):
|
| 1566 |
+
score += 0.5
|
| 1567 |
+
if re.search(r'^\s*[a-z]+_[a-z]+\b', text, re.MULTILINE):
|
| 1568 |
+
score += 0.3
|
| 1569 |
+
if re.search(r'^\s*\.(attribute|bytecode|debug|deprecated|enclosing|'
|
| 1570 |
+
r'inner|interface|limit|set|signature|stack)\b', text,
|
| 1571 |
+
re.MULTILINE):
|
| 1572 |
+
score += 0.6
|
| 1573 |
+
return score
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/lisp.py
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/markup.py
ADDED
|
@@ -0,0 +1,595 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.markup
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexers for non-HTML markup languages.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
import re
|
| 13 |
+
|
| 14 |
+
from pygments.lexers.html import HtmlLexer, XmlLexer
|
| 15 |
+
from pygments.lexers.javascript import JavascriptLexer
|
| 16 |
+
from pygments.lexers.css import CssLexer
|
| 17 |
+
|
| 18 |
+
from pygments.lexer import RegexLexer, DelegatingLexer, include, bygroups, \
|
| 19 |
+
using, this, do_insertions, default, words
|
| 20 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 21 |
+
Number, Punctuation, Generic, Other
|
| 22 |
+
from pygments.util import get_bool_opt, ClassNotFound
|
| 23 |
+
|
| 24 |
+
__all__ = ['BBCodeLexer', 'MoinWikiLexer', 'RstLexer', 'TexLexer', 'GroffLexer',
|
| 25 |
+
'MozPreprocHashLexer', 'MozPreprocPercentLexer',
|
| 26 |
+
'MozPreprocXulLexer', 'MozPreprocJavascriptLexer',
|
| 27 |
+
'MozPreprocCssLexer', 'MarkdownLexer']
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
class BBCodeLexer(RegexLexer):
|
| 31 |
+
"""
|
| 32 |
+
A lexer that highlights BBCode(-like) syntax.
|
| 33 |
+
|
| 34 |
+
.. versionadded:: 0.6
|
| 35 |
+
"""
|
| 36 |
+
|
| 37 |
+
name = 'BBCode'
|
| 38 |
+
aliases = ['bbcode']
|
| 39 |
+
mimetypes = ['text/x-bbcode']
|
| 40 |
+
|
| 41 |
+
tokens = {
|
| 42 |
+
'root': [
|
| 43 |
+
(r'[^[]+', Text),
|
| 44 |
+
# tag/end tag begin
|
| 45 |
+
(r'\[/?\w+', Keyword, 'tag'),
|
| 46 |
+
# stray bracket
|
| 47 |
+
(r'\[', Text),
|
| 48 |
+
],
|
| 49 |
+
'tag': [
|
| 50 |
+
(r'\s+', Text),
|
| 51 |
+
# attribute with value
|
| 52 |
+
(r'(\w+)(=)("?[^\s"\]]+"?)',
|
| 53 |
+
bygroups(Name.Attribute, Operator, String)),
|
| 54 |
+
# tag argument (a la [color=green])
|
| 55 |
+
(r'(=)("?[^\s"\]]+"?)',
|
| 56 |
+
bygroups(Operator, String)),
|
| 57 |
+
# tag end
|
| 58 |
+
(r'\]', Keyword, '#pop'),
|
| 59 |
+
],
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
class MoinWikiLexer(RegexLexer):
|
| 64 |
+
"""
|
| 65 |
+
For MoinMoin (and Trac) Wiki markup.
|
| 66 |
+
|
| 67 |
+
.. versionadded:: 0.7
|
| 68 |
+
"""
|
| 69 |
+
|
| 70 |
+
name = 'MoinMoin/Trac Wiki markup'
|
| 71 |
+
aliases = ['trac-wiki', 'moin']
|
| 72 |
+
filenames = []
|
| 73 |
+
mimetypes = ['text/x-trac-wiki']
|
| 74 |
+
flags = re.MULTILINE | re.IGNORECASE
|
| 75 |
+
|
| 76 |
+
tokens = {
|
| 77 |
+
'root': [
|
| 78 |
+
(r'^#.*$', Comment),
|
| 79 |
+
(r'(!)(\S+)', bygroups(Keyword, Text)), # Ignore-next
|
| 80 |
+
# Titles
|
| 81 |
+
(r'^(=+)([^=]+)(=+)(\s*#.+)?$',
|
| 82 |
+
bygroups(Generic.Heading, using(this), Generic.Heading, String)),
|
| 83 |
+
# Literal code blocks, with optional shebang
|
| 84 |
+
(r'(\{\{\{)(\n#!.+)?', bygroups(Name.Builtin, Name.Namespace), 'codeblock'),
|
| 85 |
+
(r'(\'\'\'?|\|\||`|__|~~|\^|,,|::)', Comment), # Formatting
|
| 86 |
+
# Lists
|
| 87 |
+
(r'^( +)([.*-])( )', bygroups(Text, Name.Builtin, Text)),
|
| 88 |
+
(r'^( +)([a-z]{1,5}\.)( )', bygroups(Text, Name.Builtin, Text)),
|
| 89 |
+
# Other Formatting
|
| 90 |
+
(r'\[\[\w+.*?\]\]', Keyword), # Macro
|
| 91 |
+
(r'(\[[^\s\]]+)(\s+[^\]]+?)?(\])',
|
| 92 |
+
bygroups(Keyword, String, Keyword)), # Link
|
| 93 |
+
(r'^----+$', Keyword), # Horizontal rules
|
| 94 |
+
(r'[^\n\'\[{!_~^,|]+', Text),
|
| 95 |
+
(r'\n', Text),
|
| 96 |
+
(r'.', Text),
|
| 97 |
+
],
|
| 98 |
+
'codeblock': [
|
| 99 |
+
(r'\}\}\}', Name.Builtin, '#pop'),
|
| 100 |
+
# these blocks are allowed to be nested in Trac, but not MoinMoin
|
| 101 |
+
(r'\{\{\{', Text, '#push'),
|
| 102 |
+
(r'[^{}]+', Comment.Preproc), # slurp boring text
|
| 103 |
+
(r'.', Comment.Preproc), # allow loose { or }
|
| 104 |
+
],
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
|
| 108 |
+
class RstLexer(RegexLexer):
|
| 109 |
+
"""
|
| 110 |
+
For `reStructuredText <http://docutils.sf.net/rst.html>`_ markup.
|
| 111 |
+
|
| 112 |
+
.. versionadded:: 0.7
|
| 113 |
+
|
| 114 |
+
Additional options accepted:
|
| 115 |
+
|
| 116 |
+
`handlecodeblocks`
|
| 117 |
+
Highlight the contents of ``.. sourcecode:: language``,
|
| 118 |
+
``.. code:: language`` and ``.. code-block:: language``
|
| 119 |
+
directives with a lexer for the given language (default:
|
| 120 |
+
``True``).
|
| 121 |
+
|
| 122 |
+
.. versionadded:: 0.8
|
| 123 |
+
"""
|
| 124 |
+
name = 'reStructuredText'
|
| 125 |
+
aliases = ['rst', 'rest', 'restructuredtext']
|
| 126 |
+
filenames = ['*.rst', '*.rest']
|
| 127 |
+
mimetypes = ["text/x-rst", "text/prs.fallenstein.rst"]
|
| 128 |
+
flags = re.MULTILINE
|
| 129 |
+
|
| 130 |
+
def _handle_sourcecode(self, match):
|
| 131 |
+
from pygments.lexers import get_lexer_by_name
|
| 132 |
+
|
| 133 |
+
# section header
|
| 134 |
+
yield match.start(1), Punctuation, match.group(1)
|
| 135 |
+
yield match.start(2), Text, match.group(2)
|
| 136 |
+
yield match.start(3), Operator.Word, match.group(3)
|
| 137 |
+
yield match.start(4), Punctuation, match.group(4)
|
| 138 |
+
yield match.start(5), Text, match.group(5)
|
| 139 |
+
yield match.start(6), Keyword, match.group(6)
|
| 140 |
+
yield match.start(7), Text, match.group(7)
|
| 141 |
+
|
| 142 |
+
# lookup lexer if wanted and existing
|
| 143 |
+
lexer = None
|
| 144 |
+
if self.handlecodeblocks:
|
| 145 |
+
try:
|
| 146 |
+
lexer = get_lexer_by_name(match.group(6).strip())
|
| 147 |
+
except ClassNotFound:
|
| 148 |
+
pass
|
| 149 |
+
indention = match.group(8)
|
| 150 |
+
indention_size = len(indention)
|
| 151 |
+
code = (indention + match.group(9) + match.group(10) + match.group(11))
|
| 152 |
+
|
| 153 |
+
# no lexer for this language. handle it like it was a code block
|
| 154 |
+
if lexer is None:
|
| 155 |
+
yield match.start(8), String, code
|
| 156 |
+
return
|
| 157 |
+
|
| 158 |
+
# highlight the lines with the lexer.
|
| 159 |
+
ins = []
|
| 160 |
+
codelines = code.splitlines(True)
|
| 161 |
+
code = ''
|
| 162 |
+
for line in codelines:
|
| 163 |
+
if len(line) > indention_size:
|
| 164 |
+
ins.append((len(code), [(0, Text, line[:indention_size])]))
|
| 165 |
+
code += line[indention_size:]
|
| 166 |
+
else:
|
| 167 |
+
code += line
|
| 168 |
+
for item in do_insertions(ins, lexer.get_tokens_unprocessed(code)):
|
| 169 |
+
yield item
|
| 170 |
+
|
| 171 |
+
# from docutils.parsers.rst.states
|
| 172 |
+
closers = u'\'")]}>\u2019\u201d\xbb!?'
|
| 173 |
+
unicode_delimiters = u'\u2010\u2011\u2012\u2013\u2014\u00a0'
|
| 174 |
+
end_string_suffix = (r'((?=$)|(?=[-/:.,; \n\x00%s%s]))'
|
| 175 |
+
% (re.escape(unicode_delimiters),
|
| 176 |
+
re.escape(closers)))
|
| 177 |
+
|
| 178 |
+
tokens = {
|
| 179 |
+
'root': [
|
| 180 |
+
# Heading with overline
|
| 181 |
+
(r'^(=+|-+|`+|:+|\.+|\'+|"+|~+|\^+|_+|\*+|\++|#+)([ \t]*\n)'
|
| 182 |
+
r'(.+)(\n)(\1)(\n)',
|
| 183 |
+
bygroups(Generic.Heading, Text, Generic.Heading,
|
| 184 |
+
Text, Generic.Heading, Text)),
|
| 185 |
+
# Plain heading
|
| 186 |
+
(r'^(\S.*)(\n)(={3,}|-{3,}|`{3,}|:{3,}|\.{3,}|\'{3,}|"{3,}|'
|
| 187 |
+
r'~{3,}|\^{3,}|_{3,}|\*{3,}|\+{3,}|#{3,})(\n)',
|
| 188 |
+
bygroups(Generic.Heading, Text, Generic.Heading, Text)),
|
| 189 |
+
# Bulleted lists
|
| 190 |
+
(r'^(\s*)([-*+])( .+\n(?:\1 .+\n)*)',
|
| 191 |
+
bygroups(Text, Number, using(this, state='inline'))),
|
| 192 |
+
# Numbered lists
|
| 193 |
+
(r'^(\s*)([0-9#ivxlcmIVXLCM]+\.)( .+\n(?:\1 .+\n)*)',
|
| 194 |
+
bygroups(Text, Number, using(this, state='inline'))),
|
| 195 |
+
(r'^(\s*)(\(?[0-9#ivxlcmIVXLCM]+\))( .+\n(?:\1 .+\n)*)',
|
| 196 |
+
bygroups(Text, Number, using(this, state='inline'))),
|
| 197 |
+
# Numbered, but keep words at BOL from becoming lists
|
| 198 |
+
(r'^(\s*)([A-Z]+\.)( .+\n(?:\1 .+\n)+)',
|
| 199 |
+
bygroups(Text, Number, using(this, state='inline'))),
|
| 200 |
+
(r'^(\s*)(\(?[A-Za-z]+\))( .+\n(?:\1 .+\n)+)',
|
| 201 |
+
bygroups(Text, Number, using(this, state='inline'))),
|
| 202 |
+
# Line blocks
|
| 203 |
+
(r'^(\s*)(\|)( .+\n(?:\| .+\n)*)',
|
| 204 |
+
bygroups(Text, Operator, using(this, state='inline'))),
|
| 205 |
+
# Sourcecode directives
|
| 206 |
+
(r'^( *\.\.)(\s*)((?:source)?code(?:-block)?)(::)([ \t]*)([^\n]+)'
|
| 207 |
+
r'(\n[ \t]*\n)([ \t]+)(.*)(\n)((?:(?:\8.*|)\n)+)',
|
| 208 |
+
_handle_sourcecode),
|
| 209 |
+
# A directive
|
| 210 |
+
(r'^( *\.\.)(\s*)([\w:-]+?)(::)(?:([ \t]*)(.*))',
|
| 211 |
+
bygroups(Punctuation, Text, Operator.Word, Punctuation, Text,
|
| 212 |
+
using(this, state='inline'))),
|
| 213 |
+
# A reference target
|
| 214 |
+
(r'^( *\.\.)(\s*)(_(?:[^:\\]|\\.)+:)(.*?)$',
|
| 215 |
+
bygroups(Punctuation, Text, Name.Tag, using(this, state='inline'))),
|
| 216 |
+
# A footnote/citation target
|
| 217 |
+
(r'^( *\.\.)(\s*)(\[.+\])(.*?)$',
|
| 218 |
+
bygroups(Punctuation, Text, Name.Tag, using(this, state='inline'))),
|
| 219 |
+
# A substitution def
|
| 220 |
+
(r'^( *\.\.)(\s*)(\|.+\|)(\s*)([\w:-]+?)(::)(?:([ \t]*)(.*))',
|
| 221 |
+
bygroups(Punctuation, Text, Name.Tag, Text, Operator.Word,
|
| 222 |
+
Punctuation, Text, using(this, state='inline'))),
|
| 223 |
+
# Comments
|
| 224 |
+
(r'^ *\.\..*(\n( +.*\n|\n)+)?', Comment.Preproc),
|
| 225 |
+
# Field list
|
| 226 |
+
(r'^( *)(:[a-zA-Z-]+:)(\s*)$', bygroups(Text, Name.Class, Text)),
|
| 227 |
+
(r'^( *)(:.*?:)([ \t]+)(.*?)$',
|
| 228 |
+
bygroups(Text, Name.Class, Text, Name.Function)),
|
| 229 |
+
# Definition list
|
| 230 |
+
(r'^(\S.*(?<!::)\n)((?:(?: +.*)\n)+)',
|
| 231 |
+
bygroups(using(this, state='inline'), using(this, state='inline'))),
|
| 232 |
+
# Code blocks
|
| 233 |
+
(r'(::)(\n[ \t]*\n)([ \t]+)(.*)(\n)((?:(?:\3.*|)\n)+)',
|
| 234 |
+
bygroups(String.Escape, Text, String, String, Text, String)),
|
| 235 |
+
include('inline'),
|
| 236 |
+
],
|
| 237 |
+
'inline': [
|
| 238 |
+
(r'\\.', Text), # escape
|
| 239 |
+
(r'``', String, 'literal'), # code
|
| 240 |
+
(r'(`.+?)(<.+?>)(`__?)', # reference with inline target
|
| 241 |
+
bygroups(String, String.Interpol, String)),
|
| 242 |
+
(r'`.+?`__?', String), # reference
|
| 243 |
+
(r'(`.+?`)(:[a-zA-Z0-9:-]+?:)?',
|
| 244 |
+
bygroups(Name.Variable, Name.Attribute)), # role
|
| 245 |
+
(r'(:[a-zA-Z0-9:-]+?:)(`.+?`)',
|
| 246 |
+
bygroups(Name.Attribute, Name.Variable)), # role (content first)
|
| 247 |
+
(r'\*\*.+?\*\*', Generic.Strong), # Strong emphasis
|
| 248 |
+
(r'\*.+?\*', Generic.Emph), # Emphasis
|
| 249 |
+
(r'\[.*?\]_', String), # Footnote or citation
|
| 250 |
+
(r'<.+?>', Name.Tag), # Hyperlink
|
| 251 |
+
(r'[^\\\n\[*`:]+', Text),
|
| 252 |
+
(r'.', Text),
|
| 253 |
+
],
|
| 254 |
+
'literal': [
|
| 255 |
+
(r'[^`]+', String),
|
| 256 |
+
(r'``' + end_string_suffix, String, '#pop'),
|
| 257 |
+
(r'`', String),
|
| 258 |
+
]
|
| 259 |
+
}
|
| 260 |
+
|
| 261 |
+
def __init__(self, **options):
|
| 262 |
+
self.handlecodeblocks = get_bool_opt(options, 'handlecodeblocks', True)
|
| 263 |
+
RegexLexer.__init__(self, **options)
|
| 264 |
+
|
| 265 |
+
def analyse_text(text):
|
| 266 |
+
if text[:2] == '..' and text[2:3] != '.':
|
| 267 |
+
return 0.3
|
| 268 |
+
p1 = text.find("\n")
|
| 269 |
+
p2 = text.find("\n", p1 + 1)
|
| 270 |
+
if (p2 > -1 and # has two lines
|
| 271 |
+
p1 * 2 + 1 == p2 and # they are the same length
|
| 272 |
+
text[p1+1] in '-=' and # the next line both starts and ends with
|
| 273 |
+
text[p1+1] == text[p2-1]): # ...a sufficiently high header
|
| 274 |
+
return 0.5
|
| 275 |
+
|
| 276 |
+
|
| 277 |
+
class TexLexer(RegexLexer):
|
| 278 |
+
"""
|
| 279 |
+
Lexer for the TeX and LaTeX typesetting languages.
|
| 280 |
+
"""
|
| 281 |
+
|
| 282 |
+
name = 'TeX'
|
| 283 |
+
aliases = ['tex', 'latex']
|
| 284 |
+
filenames = ['*.tex', '*.aux', '*.toc']
|
| 285 |
+
mimetypes = ['text/x-tex', 'text/x-latex']
|
| 286 |
+
|
| 287 |
+
tokens = {
|
| 288 |
+
'general': [
|
| 289 |
+
(r'%.*?\n', Comment),
|
| 290 |
+
(r'[{}]', Name.Builtin),
|
| 291 |
+
(r'[&_^]', Name.Builtin),
|
| 292 |
+
],
|
| 293 |
+
'root': [
|
| 294 |
+
(r'\\\[', String.Backtick, 'displaymath'),
|
| 295 |
+
(r'\\\(', String, 'inlinemath'),
|
| 296 |
+
(r'\$\$', String.Backtick, 'displaymath'),
|
| 297 |
+
(r'\$', String, 'inlinemath'),
|
| 298 |
+
(r'\\([a-zA-Z]+|.)', Keyword, 'command'),
|
| 299 |
+
(r'\\$', Keyword),
|
| 300 |
+
include('general'),
|
| 301 |
+
(r'[^\\$%&_^{}]+', Text),
|
| 302 |
+
],
|
| 303 |
+
'math': [
|
| 304 |
+
(r'\\([a-zA-Z]+|.)', Name.Variable),
|
| 305 |
+
include('general'),
|
| 306 |
+
(r'[0-9]+', Number),
|
| 307 |
+
(r'[-=!+*/()\[\]]', Operator),
|
| 308 |
+
(r'[^=!+*/()\[\]\\$%&_^{}0-9-]+', Name.Builtin),
|
| 309 |
+
],
|
| 310 |
+
'inlinemath': [
|
| 311 |
+
(r'\\\)', String, '#pop'),
|
| 312 |
+
(r'\$', String, '#pop'),
|
| 313 |
+
include('math'),
|
| 314 |
+
],
|
| 315 |
+
'displaymath': [
|
| 316 |
+
(r'\\\]', String, '#pop'),
|
| 317 |
+
(r'\$\$', String, '#pop'),
|
| 318 |
+
(r'\$', Name.Builtin),
|
| 319 |
+
include('math'),
|
| 320 |
+
],
|
| 321 |
+
'command': [
|
| 322 |
+
(r'\[.*?\]', Name.Attribute),
|
| 323 |
+
(r'\*', Keyword),
|
| 324 |
+
default('#pop'),
|
| 325 |
+
],
|
| 326 |
+
}
|
| 327 |
+
|
| 328 |
+
def analyse_text(text):
|
| 329 |
+
for start in ("\\documentclass", "\\input", "\\documentstyle",
|
| 330 |
+
"\\relax"):
|
| 331 |
+
if text[:len(start)] == start:
|
| 332 |
+
return True
|
| 333 |
+
|
| 334 |
+
|
| 335 |
+
class GroffLexer(RegexLexer):
|
| 336 |
+
"""
|
| 337 |
+
Lexer for the (g)roff typesetting language, supporting groff
|
| 338 |
+
extensions. Mainly useful for highlighting manpage sources.
|
| 339 |
+
|
| 340 |
+
.. versionadded:: 0.6
|
| 341 |
+
"""
|
| 342 |
+
|
| 343 |
+
name = 'Groff'
|
| 344 |
+
aliases = ['groff', 'nroff', 'man']
|
| 345 |
+
filenames = ['*.[1234567]', '*.man']
|
| 346 |
+
mimetypes = ['application/x-troff', 'text/troff']
|
| 347 |
+
|
| 348 |
+
tokens = {
|
| 349 |
+
'root': [
|
| 350 |
+
(r'(\.)(\w+)', bygroups(Text, Keyword), 'request'),
|
| 351 |
+
(r'\.', Punctuation, 'request'),
|
| 352 |
+
# Regular characters, slurp till we find a backslash or newline
|
| 353 |
+
(r'[^\\\n]+', Text, 'textline'),
|
| 354 |
+
default('textline'),
|
| 355 |
+
],
|
| 356 |
+
'textline': [
|
| 357 |
+
include('escapes'),
|
| 358 |
+
(r'[^\\\n]+', Text),
|
| 359 |
+
(r'\n', Text, '#pop'),
|
| 360 |
+
],
|
| 361 |
+
'escapes': [
|
| 362 |
+
# groff has many ways to write escapes.
|
| 363 |
+
(r'\\"[^\n]*', Comment),
|
| 364 |
+
(r'\\[fn]\w', String.Escape),
|
| 365 |
+
(r'\\\(.{2}', String.Escape),
|
| 366 |
+
(r'\\.\[.*\]', String.Escape),
|
| 367 |
+
(r'\\.', String.Escape),
|
| 368 |
+
(r'\\\n', Text, 'request'),
|
| 369 |
+
],
|
| 370 |
+
'request': [
|
| 371 |
+
(r'\n', Text, '#pop'),
|
| 372 |
+
include('escapes'),
|
| 373 |
+
(r'"[^\n"]+"', String.Double),
|
| 374 |
+
(r'\d+', Number),
|
| 375 |
+
(r'\S+', String),
|
| 376 |
+
(r'\s+', Text),
|
| 377 |
+
],
|
| 378 |
+
}
|
| 379 |
+
|
| 380 |
+
def analyse_text(text):
|
| 381 |
+
if text[:1] != '.':
|
| 382 |
+
return False
|
| 383 |
+
if text[:3] == '.\\"':
|
| 384 |
+
return True
|
| 385 |
+
if text[:4] == '.TH ':
|
| 386 |
+
return True
|
| 387 |
+
if text[1:3].isalnum() and text[3].isspace():
|
| 388 |
+
return 0.9
|
| 389 |
+
|
| 390 |
+
|
| 391 |
+
class MozPreprocHashLexer(RegexLexer):
|
| 392 |
+
"""
|
| 393 |
+
Lexer for Mozilla Preprocessor files (with '#' as the marker).
|
| 394 |
+
|
| 395 |
+
Other data is left untouched.
|
| 396 |
+
|
| 397 |
+
.. versionadded:: 2.0
|
| 398 |
+
"""
|
| 399 |
+
name = 'mozhashpreproc'
|
| 400 |
+
aliases = [name]
|
| 401 |
+
filenames = []
|
| 402 |
+
mimetypes = []
|
| 403 |
+
|
| 404 |
+
tokens = {
|
| 405 |
+
'root': [
|
| 406 |
+
(r'^#', Comment.Preproc, ('expr', 'exprstart')),
|
| 407 |
+
(r'.+', Other),
|
| 408 |
+
],
|
| 409 |
+
'exprstart': [
|
| 410 |
+
(r'(literal)(.*)', bygroups(Comment.Preproc, Text), '#pop:2'),
|
| 411 |
+
(words((
|
| 412 |
+
'define', 'undef', 'if', 'ifdef', 'ifndef', 'else', 'elif',
|
| 413 |
+
'elifdef', 'elifndef', 'endif', 'expand', 'filter', 'unfilter',
|
| 414 |
+
'include', 'includesubst', 'error')),
|
| 415 |
+
Comment.Preproc, '#pop'),
|
| 416 |
+
],
|
| 417 |
+
'expr': [
|
| 418 |
+
(words(('!', '!=', '==', '&&', '||')), Operator),
|
| 419 |
+
(r'(defined)(\()', bygroups(Keyword, Punctuation)),
|
| 420 |
+
(r'\)', Punctuation),
|
| 421 |
+
(r'[0-9]+', Number.Decimal),
|
| 422 |
+
(r'__\w+?__', Name.Variable),
|
| 423 |
+
(r'@\w+?@', Name.Class),
|
| 424 |
+
(r'\w+', Name),
|
| 425 |
+
(r'\n', Text, '#pop'),
|
| 426 |
+
(r'\s+', Text),
|
| 427 |
+
(r'\S', Punctuation),
|
| 428 |
+
],
|
| 429 |
+
}
|
| 430 |
+
|
| 431 |
+
|
| 432 |
+
class MozPreprocPercentLexer(MozPreprocHashLexer):
|
| 433 |
+
"""
|
| 434 |
+
Lexer for Mozilla Preprocessor files (with '%' as the marker).
|
| 435 |
+
|
| 436 |
+
Other data is left untouched.
|
| 437 |
+
|
| 438 |
+
.. versionadded:: 2.0
|
| 439 |
+
"""
|
| 440 |
+
name = 'mozpercentpreproc'
|
| 441 |
+
aliases = [name]
|
| 442 |
+
filenames = []
|
| 443 |
+
mimetypes = []
|
| 444 |
+
|
| 445 |
+
tokens = {
|
| 446 |
+
'root': [
|
| 447 |
+
(r'^%', Comment.Preproc, ('expr', 'exprstart')),
|
| 448 |
+
(r'.+', Other),
|
| 449 |
+
],
|
| 450 |
+
}
|
| 451 |
+
|
| 452 |
+
|
| 453 |
+
class MozPreprocXulLexer(DelegatingLexer):
|
| 454 |
+
"""
|
| 455 |
+
Subclass of the `MozPreprocHashLexer` that highlights unlexed data with the
|
| 456 |
+
`XmlLexer`.
|
| 457 |
+
|
| 458 |
+
.. versionadded:: 2.0
|
| 459 |
+
"""
|
| 460 |
+
name = "XUL+mozpreproc"
|
| 461 |
+
aliases = ['xul+mozpreproc']
|
| 462 |
+
filenames = ['*.xul.in']
|
| 463 |
+
mimetypes = []
|
| 464 |
+
|
| 465 |
+
def __init__(self, **options):
|
| 466 |
+
super(MozPreprocXulLexer, self).__init__(
|
| 467 |
+
XmlLexer, MozPreprocHashLexer, **options)
|
| 468 |
+
|
| 469 |
+
|
| 470 |
+
class MozPreprocJavascriptLexer(DelegatingLexer):
|
| 471 |
+
"""
|
| 472 |
+
Subclass of the `MozPreprocHashLexer` that highlights unlexed data with the
|
| 473 |
+
`JavascriptLexer`.
|
| 474 |
+
|
| 475 |
+
.. versionadded:: 2.0
|
| 476 |
+
"""
|
| 477 |
+
name = "Javascript+mozpreproc"
|
| 478 |
+
aliases = ['javascript+mozpreproc']
|
| 479 |
+
filenames = ['*.js.in']
|
| 480 |
+
mimetypes = []
|
| 481 |
+
|
| 482 |
+
def __init__(self, **options):
|
| 483 |
+
super(MozPreprocJavascriptLexer, self).__init__(
|
| 484 |
+
JavascriptLexer, MozPreprocHashLexer, **options)
|
| 485 |
+
|
| 486 |
+
|
| 487 |
+
class MozPreprocCssLexer(DelegatingLexer):
|
| 488 |
+
"""
|
| 489 |
+
Subclass of the `MozPreprocHashLexer` that highlights unlexed data with the
|
| 490 |
+
`CssLexer`.
|
| 491 |
+
|
| 492 |
+
.. versionadded:: 2.0
|
| 493 |
+
"""
|
| 494 |
+
name = "CSS+mozpreproc"
|
| 495 |
+
aliases = ['css+mozpreproc']
|
| 496 |
+
filenames = ['*.css.in']
|
| 497 |
+
mimetypes = []
|
| 498 |
+
|
| 499 |
+
def __init__(self, **options):
|
| 500 |
+
super(MozPreprocCssLexer, self).__init__(
|
| 501 |
+
CssLexer, MozPreprocPercentLexer, **options)
|
| 502 |
+
|
| 503 |
+
|
| 504 |
+
class MarkdownLexer(RegexLexer):
|
| 505 |
+
"""
|
| 506 |
+
For `Markdown <https://help.github.com/categories/writing-on-github/>`_ markup.
|
| 507 |
+
|
| 508 |
+
.. versionadded:: 2.2
|
| 509 |
+
"""
|
| 510 |
+
name = 'markdown'
|
| 511 |
+
aliases = ['md']
|
| 512 |
+
filenames = ['*.md']
|
| 513 |
+
mimetypes = ["text/x-markdown"]
|
| 514 |
+
flags = re.MULTILINE
|
| 515 |
+
|
| 516 |
+
def _handle_codeblock(self, match):
|
| 517 |
+
"""
|
| 518 |
+
match args: 1:backticks, 2:lang_name, 3:newline, 4:code, 5:backticks
|
| 519 |
+
"""
|
| 520 |
+
from pygments.lexers import get_lexer_by_name
|
| 521 |
+
|
| 522 |
+
# section header
|
| 523 |
+
yield match.start(1), String , match.group(1)
|
| 524 |
+
yield match.start(2), String , match.group(2)
|
| 525 |
+
yield match.start(3), Text , match.group(3)
|
| 526 |
+
|
| 527 |
+
# lookup lexer if wanted and existing
|
| 528 |
+
lexer = None
|
| 529 |
+
if self.handlecodeblocks:
|
| 530 |
+
try:
|
| 531 |
+
lexer = get_lexer_by_name( match.group(2).strip() )
|
| 532 |
+
except ClassNotFound:
|
| 533 |
+
pass
|
| 534 |
+
code = match.group(4)
|
| 535 |
+
|
| 536 |
+
# no lexer for this language. handle it like it was a code block
|
| 537 |
+
if lexer is None:
|
| 538 |
+
yield match.start(4), String, code
|
| 539 |
+
return
|
| 540 |
+
|
| 541 |
+
for item in do_insertions([], lexer.get_tokens_unprocessed(code)):
|
| 542 |
+
yield item
|
| 543 |
+
|
| 544 |
+
yield match.start(5), String , match.group(5)
|
| 545 |
+
|
| 546 |
+
tokens = {
|
| 547 |
+
'root': [
|
| 548 |
+
# heading with pound prefix
|
| 549 |
+
(r'^(#)([^#].+\n)', bygroups(Generic.Heading, Text)),
|
| 550 |
+
(r'^(#{2,6})(.+\n)', bygroups(Generic.Subheading, Text)),
|
| 551 |
+
# task list
|
| 552 |
+
(r'^(\s*)([*-] )(\[[ xX]\])( .+\n)',
|
| 553 |
+
bygroups(Text, Keyword, Keyword, using(this, state='inline'))),
|
| 554 |
+
# bulleted lists
|
| 555 |
+
(r'^(\s*)([*-])(\s)(.+\n)',
|
| 556 |
+
bygroups(Text, Keyword, Text, using(this, state='inline'))),
|
| 557 |
+
# numbered lists
|
| 558 |
+
(r'^(\s*)([0-9]+\.)( .+\n)',
|
| 559 |
+
bygroups(Text, Keyword, using(this, state='inline'))),
|
| 560 |
+
# quote
|
| 561 |
+
(r'^(\s*>\s)(.+\n)', bygroups(Keyword, Generic.Emph)),
|
| 562 |
+
# text block
|
| 563 |
+
(r'^(```\n)([\w\W]*?)(^```$)', bygroups(String, Text, String)),
|
| 564 |
+
# code block with language
|
| 565 |
+
(r'^(```)(\w+)(\n)([\w\W]*?)(^```$)', _handle_codeblock),
|
| 566 |
+
|
| 567 |
+
include('inline'),
|
| 568 |
+
],
|
| 569 |
+
'inline': [
|
| 570 |
+
# escape
|
| 571 |
+
(r'\\.', Text),
|
| 572 |
+
# italics
|
| 573 |
+
(r'(\s)([*_][^*_]+[*_])(\W|\n)', bygroups(Text, Generic.Emph, Text)),
|
| 574 |
+
# bold
|
| 575 |
+
# warning: the following rule eats internal tags. eg. **foo _bar_ baz** bar is not italics
|
| 576 |
+
(r'(\s)((\*\*|__).*\3)((?=\W|\n))', bygroups(Text, Generic.Strong, None, Text)),
|
| 577 |
+
# "proper way" (r'(\s)([*_]{2}[^*_]+[*_]{2})((?=\W|\n))', bygroups(Text, Generic.Strong, Text)),
|
| 578 |
+
# strikethrough
|
| 579 |
+
(r'(\s)(~~[^~]+~~)((?=\W|\n))', bygroups(Text, Generic.Deleted, Text)),
|
| 580 |
+
# inline code
|
| 581 |
+
(r'`[^`]+`', String.Backtick),
|
| 582 |
+
# mentions and topics (twitter and github stuff)
|
| 583 |
+
(r'[@#][\w/:]+', Name.Entity),
|
| 584 |
+
# (image?) links eg: 
|
| 585 |
+
(r'(!?\[)([^]]+)(\])(\()([^)]+)(\))', bygroups(Text, Name.Tag, Text, Text, Name.Attribute, Text)),
|
| 586 |
+
|
| 587 |
+
# general text, must come last!
|
| 588 |
+
(r'[^\\\s]+', Text),
|
| 589 |
+
(r'.', Text),
|
| 590 |
+
],
|
| 591 |
+
}
|
| 592 |
+
|
| 593 |
+
def __init__(self, **options):
|
| 594 |
+
self.handlecodeblocks = get_bool_opt(options, 'handlecodeblocks', True)
|
| 595 |
+
RegexLexer.__init__(self, **options)
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/math.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.math
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Just export lexers that were contained in this module.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
from pygments.lexers.python import NumPyLexer
|
| 13 |
+
from pygments.lexers.matlab import MatlabLexer, MatlabSessionLexer, \
|
| 14 |
+
OctaveLexer, ScilabLexer
|
| 15 |
+
from pygments.lexers.julia import JuliaLexer, JuliaConsoleLexer
|
| 16 |
+
from pygments.lexers.r import RConsoleLexer, SLexer, RdLexer
|
| 17 |
+
from pygments.lexers.modeling import BugsLexer, JagsLexer, StanLexer
|
| 18 |
+
from pygments.lexers.idl import IDLLexer
|
| 19 |
+
from pygments.lexers.algebra import MuPADLexer
|
| 20 |
+
|
| 21 |
+
__all__ = []
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/matlab.py
ADDED
|
@@ -0,0 +1,663 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.matlab
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexers for Matlab and related languages.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
import re
|
| 13 |
+
|
| 14 |
+
from pygments.lexer import Lexer, RegexLexer, bygroups, words, do_insertions
|
| 15 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 16 |
+
Number, Punctuation, Generic, Whitespace
|
| 17 |
+
|
| 18 |
+
from pygments.lexers import _scilab_builtins
|
| 19 |
+
|
| 20 |
+
__all__ = ['MatlabLexer', 'MatlabSessionLexer', 'OctaveLexer', 'ScilabLexer']
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
class MatlabLexer(RegexLexer):
|
| 24 |
+
"""
|
| 25 |
+
For Matlab source code.
|
| 26 |
+
|
| 27 |
+
.. versionadded:: 0.10
|
| 28 |
+
"""
|
| 29 |
+
name = 'Matlab'
|
| 30 |
+
aliases = ['matlab']
|
| 31 |
+
filenames = ['*.m']
|
| 32 |
+
mimetypes = ['text/matlab']
|
| 33 |
+
|
| 34 |
+
#
|
| 35 |
+
# These lists are generated automatically.
|
| 36 |
+
# Run the following in bash shell:
|
| 37 |
+
#
|
| 38 |
+
# for f in elfun specfun elmat; do
|
| 39 |
+
# echo -n "$f = "
|
| 40 |
+
# matlab -nojvm -r "help $f;exit;" | perl -ne \
|
| 41 |
+
# 'push(@c,$1) if /^ (\w+)\s+-/; END {print q{["}.join(q{","},@c).qq{"]\n};}'
|
| 42 |
+
# done
|
| 43 |
+
#
|
| 44 |
+
# elfun: Elementary math functions
|
| 45 |
+
# specfun: Special Math functions
|
| 46 |
+
# elmat: Elementary matrices and matrix manipulation
|
| 47 |
+
#
|
| 48 |
+
# taken from Matlab version 7.4.0.336 (R2007a)
|
| 49 |
+
#
|
| 50 |
+
elfun = ("sin", "sind", "sinh", "asin", "asind", "asinh", "cos", "cosd", "cosh",
|
| 51 |
+
"acos", "acosd", "acosh", "tan", "tand", "tanh", "atan", "atand", "atan2",
|
| 52 |
+
"atanh", "sec", "secd", "sech", "asec", "asecd", "asech", "csc", "cscd",
|
| 53 |
+
"csch", "acsc", "acscd", "acsch", "cot", "cotd", "coth", "acot", "acotd",
|
| 54 |
+
"acoth", "hypot", "exp", "expm1", "log", "log1p", "log10", "log2", "pow2",
|
| 55 |
+
"realpow", "reallog", "realsqrt", "sqrt", "nthroot", "nextpow2", "abs",
|
| 56 |
+
"angle", "complex", "conj", "imag", "real", "unwrap", "isreal", "cplxpair",
|
| 57 |
+
"fix", "floor", "ceil", "round", "mod", "rem", "sign")
|
| 58 |
+
specfun = ("airy", "besselj", "bessely", "besselh", "besseli", "besselk", "beta",
|
| 59 |
+
"betainc", "betaln", "ellipj", "ellipke", "erf", "erfc", "erfcx",
|
| 60 |
+
"erfinv", "expint", "gamma", "gammainc", "gammaln", "psi", "legendre",
|
| 61 |
+
"cross", "dot", "factor", "isprime", "primes", "gcd", "lcm", "rat",
|
| 62 |
+
"rats", "perms", "nchoosek", "factorial", "cart2sph", "cart2pol",
|
| 63 |
+
"pol2cart", "sph2cart", "hsv2rgb", "rgb2hsv")
|
| 64 |
+
elmat = ("zeros", "ones", "eye", "repmat", "rand", "randn", "linspace", "logspace",
|
| 65 |
+
"freqspace", "meshgrid", "accumarray", "size", "length", "ndims", "numel",
|
| 66 |
+
"disp", "isempty", "isequal", "isequalwithequalnans", "cat", "reshape",
|
| 67 |
+
"diag", "blkdiag", "tril", "triu", "fliplr", "flipud", "flipdim", "rot90",
|
| 68 |
+
"find", "end", "sub2ind", "ind2sub", "bsxfun", "ndgrid", "permute",
|
| 69 |
+
"ipermute", "shiftdim", "circshift", "squeeze", "isscalar", "isvector",
|
| 70 |
+
"ans", "eps", "realmax", "realmin", "pi", "i", "inf", "nan", "isnan",
|
| 71 |
+
"isinf", "isfinite", "j", "why", "compan", "gallery", "hadamard", "hankel",
|
| 72 |
+
"hilb", "invhilb", "magic", "pascal", "rosser", "toeplitz", "vander",
|
| 73 |
+
"wilkinson")
|
| 74 |
+
|
| 75 |
+
tokens = {
|
| 76 |
+
'root': [
|
| 77 |
+
# line starting with '!' is sent as a system command. not sure what
|
| 78 |
+
# label to use...
|
| 79 |
+
(r'^!.*', String.Other),
|
| 80 |
+
(r'%\{\s*\n', Comment.Multiline, 'blockcomment'),
|
| 81 |
+
(r'%.*$', Comment),
|
| 82 |
+
(r'^\s*function', Keyword, 'deffunc'),
|
| 83 |
+
|
| 84 |
+
# from 'iskeyword' on version 7.11 (R2010):
|
| 85 |
+
(words((
|
| 86 |
+
'break', 'case', 'catch', 'classdef', 'continue', 'else', 'elseif',
|
| 87 |
+
'end', 'enumerated', 'events', 'for', 'function', 'global', 'if',
|
| 88 |
+
'methods', 'otherwise', 'parfor', 'persistent', 'properties',
|
| 89 |
+
'return', 'spmd', 'switch', 'try', 'while'), suffix=r'\b'),
|
| 90 |
+
Keyword),
|
| 91 |
+
|
| 92 |
+
("(" + "|".join(elfun + specfun + elmat) + r')\b', Name.Builtin),
|
| 93 |
+
|
| 94 |
+
# line continuation with following comment:
|
| 95 |
+
(r'\.\.\..*$', Comment),
|
| 96 |
+
|
| 97 |
+
# operators:
|
| 98 |
+
(r'-|==|~=|<|>|<=|>=|&&|&|~|\|\|?', Operator),
|
| 99 |
+
# operators requiring escape for re:
|
| 100 |
+
(r'\.\*|\*|\+|\.\^|\.\\|\.\/|\/|\\', Operator),
|
| 101 |
+
|
| 102 |
+
# punctuation:
|
| 103 |
+
(r'\[|\]|\(|\)|\{|\}|:|@|\.|,', Punctuation),
|
| 104 |
+
(r'=|:|;', Punctuation),
|
| 105 |
+
|
| 106 |
+
# quote can be transpose, instead of string:
|
| 107 |
+
# (not great, but handles common cases...)
|
| 108 |
+
(r'(?<=[\w)\].])\'+', Operator),
|
| 109 |
+
|
| 110 |
+
(r'(\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?', Number.Float),
|
| 111 |
+
(r'\d+[eEf][+-]?[0-9]+', Number.Float),
|
| 112 |
+
(r'\d+', Number.Integer),
|
| 113 |
+
|
| 114 |
+
(r'(?<![\w)\].])\'', String, 'string'),
|
| 115 |
+
(r'[a-zA-Z_]\w*', Name),
|
| 116 |
+
(r'.', Text),
|
| 117 |
+
],
|
| 118 |
+
'string': [
|
| 119 |
+
(r'[^\']*\'', String, '#pop')
|
| 120 |
+
],
|
| 121 |
+
'blockcomment': [
|
| 122 |
+
(r'^\s*%\}', Comment.Multiline, '#pop'),
|
| 123 |
+
(r'^.*\n', Comment.Multiline),
|
| 124 |
+
(r'.', Comment.Multiline),
|
| 125 |
+
],
|
| 126 |
+
'deffunc': [
|
| 127 |
+
(r'(\s*)(?:(.+)(\s*)(=)(\s*))?(.+)(\()(.*)(\))(\s*)',
|
| 128 |
+
bygroups(Whitespace, Text, Whitespace, Punctuation,
|
| 129 |
+
Whitespace, Name.Function, Punctuation, Text,
|
| 130 |
+
Punctuation, Whitespace), '#pop'),
|
| 131 |
+
# function with no args
|
| 132 |
+
(r'(\s*)([a-zA-Z_]\w*)', bygroups(Text, Name.Function), '#pop'),
|
| 133 |
+
],
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
def analyse_text(text):
|
| 137 |
+
if re.match('^\s*%', text, re.M): # comment
|
| 138 |
+
return 0.2
|
| 139 |
+
elif re.match('^!\w+', text, re.M): # system cmd
|
| 140 |
+
return 0.2
|
| 141 |
+
|
| 142 |
+
|
| 143 |
+
line_re = re.compile('.*?\n')
|
| 144 |
+
|
| 145 |
+
|
| 146 |
+
class MatlabSessionLexer(Lexer):
|
| 147 |
+
"""
|
| 148 |
+
For Matlab sessions. Modeled after PythonConsoleLexer.
|
| 149 |
+
Contributed by Ken Schutte <kschutte@csail.mit.edu>.
|
| 150 |
+
|
| 151 |
+
.. versionadded:: 0.10
|
| 152 |
+
"""
|
| 153 |
+
name = 'Matlab session'
|
| 154 |
+
aliases = ['matlabsession']
|
| 155 |
+
|
| 156 |
+
def get_tokens_unprocessed(self, text):
|
| 157 |
+
mlexer = MatlabLexer(**self.options)
|
| 158 |
+
|
| 159 |
+
curcode = ''
|
| 160 |
+
insertions = []
|
| 161 |
+
|
| 162 |
+
for match in line_re.finditer(text):
|
| 163 |
+
line = match.group()
|
| 164 |
+
|
| 165 |
+
if line.startswith('>> '):
|
| 166 |
+
insertions.append((len(curcode),
|
| 167 |
+
[(0, Generic.Prompt, line[:3])]))
|
| 168 |
+
curcode += line[3:]
|
| 169 |
+
|
| 170 |
+
elif line.startswith('>>'):
|
| 171 |
+
insertions.append((len(curcode),
|
| 172 |
+
[(0, Generic.Prompt, line[:2])]))
|
| 173 |
+
curcode += line[2:]
|
| 174 |
+
|
| 175 |
+
elif line.startswith('???'):
|
| 176 |
+
|
| 177 |
+
idx = len(curcode)
|
| 178 |
+
|
| 179 |
+
# without is showing error on same line as before...?
|
| 180 |
+
# line = "\n" + line
|
| 181 |
+
token = (0, Generic.Traceback, line)
|
| 182 |
+
insertions.append((idx, [token]))
|
| 183 |
+
|
| 184 |
+
else:
|
| 185 |
+
if curcode:
|
| 186 |
+
for item in do_insertions(
|
| 187 |
+
insertions, mlexer.get_tokens_unprocessed(curcode)):
|
| 188 |
+
yield item
|
| 189 |
+
curcode = ''
|
| 190 |
+
insertions = []
|
| 191 |
+
|
| 192 |
+
yield match.start(), Generic.Output, line
|
| 193 |
+
|
| 194 |
+
if curcode: # or item:
|
| 195 |
+
for item in do_insertions(
|
| 196 |
+
insertions, mlexer.get_tokens_unprocessed(curcode)):
|
| 197 |
+
yield item
|
| 198 |
+
|
| 199 |
+
|
| 200 |
+
class OctaveLexer(RegexLexer):
|
| 201 |
+
"""
|
| 202 |
+
For GNU Octave source code.
|
| 203 |
+
|
| 204 |
+
.. versionadded:: 1.5
|
| 205 |
+
"""
|
| 206 |
+
name = 'Octave'
|
| 207 |
+
aliases = ['octave']
|
| 208 |
+
filenames = ['*.m']
|
| 209 |
+
mimetypes = ['text/octave']
|
| 210 |
+
|
| 211 |
+
# These lists are generated automatically.
|
| 212 |
+
# Run the following in bash shell:
|
| 213 |
+
#
|
| 214 |
+
# First dump all of the Octave manual into a plain text file:
|
| 215 |
+
#
|
| 216 |
+
# $ info octave --subnodes -o octave-manual
|
| 217 |
+
#
|
| 218 |
+
# Now grep through it:
|
| 219 |
+
|
| 220 |
+
# for i in \
|
| 221 |
+
# "Built-in Function" "Command" "Function File" \
|
| 222 |
+
# "Loadable Function" "Mapping Function";
|
| 223 |
+
# do
|
| 224 |
+
# perl -e '@name = qw('"$i"');
|
| 225 |
+
# print lc($name[0]),"_kw = [\n"';
|
| 226 |
+
#
|
| 227 |
+
# perl -n -e 'print "\"$1\",\n" if /-- '"$i"': .* (\w*) \(/;' \
|
| 228 |
+
# octave-manual | sort | uniq ;
|
| 229 |
+
# echo "]" ;
|
| 230 |
+
# echo;
|
| 231 |
+
# done
|
| 232 |
+
|
| 233 |
+
# taken from Octave Mercurial changeset 8cc154f45e37 (30-jan-2011)
|
| 234 |
+
|
| 235 |
+
builtin_kw = (
|
| 236 |
+
"addlistener", "addpath", "addproperty", "all",
|
| 237 |
+
"and", "any", "argnames", "argv", "assignin",
|
| 238 |
+
"atexit", "autoload",
|
| 239 |
+
"available_graphics_toolkits", "beep_on_error",
|
| 240 |
+
"bitand", "bitmax", "bitor", "bitshift", "bitxor",
|
| 241 |
+
"cat", "cell", "cellstr", "char", "class", "clc",
|
| 242 |
+
"columns", "command_line_path",
|
| 243 |
+
"completion_append_char", "completion_matches",
|
| 244 |
+
"complex", "confirm_recursive_rmdir", "cputime",
|
| 245 |
+
"crash_dumps_octave_core", "ctranspose", "cumprod",
|
| 246 |
+
"cumsum", "debug_on_error", "debug_on_interrupt",
|
| 247 |
+
"debug_on_warning", "default_save_options",
|
| 248 |
+
"dellistener", "diag", "diff", "disp",
|
| 249 |
+
"doc_cache_file", "do_string_escapes", "double",
|
| 250 |
+
"drawnow", "e", "echo_executing_commands", "eps",
|
| 251 |
+
"eq", "errno", "errno_list", "error", "eval",
|
| 252 |
+
"evalin", "exec", "exist", "exit", "eye", "false",
|
| 253 |
+
"fclear", "fclose", "fcntl", "fdisp", "feof",
|
| 254 |
+
"ferror", "feval", "fflush", "fgetl", "fgets",
|
| 255 |
+
"fieldnames", "file_in_loadpath", "file_in_path",
|
| 256 |
+
"filemarker", "filesep", "find_dir_in_path",
|
| 257 |
+
"fixed_point_format", "fnmatch", "fopen", "fork",
|
| 258 |
+
"formula", "fprintf", "fputs", "fread", "freport",
|
| 259 |
+
"frewind", "fscanf", "fseek", "fskipl", "ftell",
|
| 260 |
+
"functions", "fwrite", "ge", "genpath", "get",
|
| 261 |
+
"getegid", "getenv", "geteuid", "getgid",
|
| 262 |
+
"getpgrp", "getpid", "getppid", "getuid", "glob",
|
| 263 |
+
"gt", "gui_mode", "history_control",
|
| 264 |
+
"history_file", "history_size",
|
| 265 |
+
"history_timestamp_format_string", "home",
|
| 266 |
+
"horzcat", "hypot", "ifelse",
|
| 267 |
+
"ignore_function_time_stamp", "inferiorto",
|
| 268 |
+
"info_file", "info_program", "inline", "input",
|
| 269 |
+
"intmax", "intmin", "ipermute",
|
| 270 |
+
"is_absolute_filename", "isargout", "isbool",
|
| 271 |
+
"iscell", "iscellstr", "ischar", "iscomplex",
|
| 272 |
+
"isempty", "isfield", "isfloat", "isglobal",
|
| 273 |
+
"ishandle", "isieee", "isindex", "isinteger",
|
| 274 |
+
"islogical", "ismatrix", "ismethod", "isnull",
|
| 275 |
+
"isnumeric", "isobject", "isreal",
|
| 276 |
+
"is_rooted_relative_filename", "issorted",
|
| 277 |
+
"isstruct", "isvarname", "kbhit", "keyboard",
|
| 278 |
+
"kill", "lasterr", "lasterror", "lastwarn",
|
| 279 |
+
"ldivide", "le", "length", "link", "linspace",
|
| 280 |
+
"logical", "lstat", "lt", "make_absolute_filename",
|
| 281 |
+
"makeinfo_program", "max_recursion_depth", "merge",
|
| 282 |
+
"methods", "mfilename", "minus", "mislocked",
|
| 283 |
+
"mkdir", "mkfifo", "mkstemp", "mldivide", "mlock",
|
| 284 |
+
"mouse_wheel_zoom", "mpower", "mrdivide", "mtimes",
|
| 285 |
+
"munlock", "nargin", "nargout",
|
| 286 |
+
"native_float_format", "ndims", "ne", "nfields",
|
| 287 |
+
"nnz", "norm", "not", "numel", "nzmax",
|
| 288 |
+
"octave_config_info", "octave_core_file_limit",
|
| 289 |
+
"octave_core_file_name",
|
| 290 |
+
"octave_core_file_options", "ones", "or",
|
| 291 |
+
"output_max_field_width", "output_precision",
|
| 292 |
+
"page_output_immediately", "page_screen_output",
|
| 293 |
+
"path", "pathsep", "pause", "pclose", "permute",
|
| 294 |
+
"pi", "pipe", "plus", "popen", "power",
|
| 295 |
+
"print_empty_dimensions", "printf",
|
| 296 |
+
"print_struct_array_contents", "prod",
|
| 297 |
+
"program_invocation_name", "program_name",
|
| 298 |
+
"putenv", "puts", "pwd", "quit", "rats", "rdivide",
|
| 299 |
+
"readdir", "readlink", "read_readline_init_file",
|
| 300 |
+
"realmax", "realmin", "rehash", "rename",
|
| 301 |
+
"repelems", "re_read_readline_init_file", "reset",
|
| 302 |
+
"reshape", "resize", "restoredefaultpath",
|
| 303 |
+
"rethrow", "rmdir", "rmfield", "rmpath", "rows",
|
| 304 |
+
"save_header_format_string", "save_precision",
|
| 305 |
+
"saving_history", "scanf", "set", "setenv",
|
| 306 |
+
"shell_cmd", "sighup_dumps_octave_core",
|
| 307 |
+
"sigterm_dumps_octave_core", "silent_functions",
|
| 308 |
+
"single", "size", "size_equal", "sizemax",
|
| 309 |
+
"sizeof", "sleep", "source", "sparse_auto_mutate",
|
| 310 |
+
"split_long_rows", "sprintf", "squeeze", "sscanf",
|
| 311 |
+
"stat", "stderr", "stdin", "stdout", "strcmp",
|
| 312 |
+
"strcmpi", "string_fill_char", "strncmp",
|
| 313 |
+
"strncmpi", "struct", "struct_levels_to_print",
|
| 314 |
+
"strvcat", "subsasgn", "subsref", "sum", "sumsq",
|
| 315 |
+
"superiorto", "suppress_verbose_help_message",
|
| 316 |
+
"symlink", "system", "tic", "tilde_expand",
|
| 317 |
+
"times", "tmpfile", "tmpnam", "toc", "toupper",
|
| 318 |
+
"transpose", "true", "typeinfo", "umask", "uminus",
|
| 319 |
+
"uname", "undo_string_escapes", "unlink", "uplus",
|
| 320 |
+
"upper", "usage", "usleep", "vec", "vectorize",
|
| 321 |
+
"vertcat", "waitpid", "warning", "warranty",
|
| 322 |
+
"whos_line_format", "yes_or_no", "zeros",
|
| 323 |
+
"inf", "Inf", "nan", "NaN")
|
| 324 |
+
|
| 325 |
+
command_kw = ("close", "load", "who", "whos")
|
| 326 |
+
|
| 327 |
+
function_kw = (
|
| 328 |
+
"accumarray", "accumdim", "acosd", "acotd",
|
| 329 |
+
"acscd", "addtodate", "allchild", "ancestor",
|
| 330 |
+
"anova", "arch_fit", "arch_rnd", "arch_test",
|
| 331 |
+
"area", "arma_rnd", "arrayfun", "ascii", "asctime",
|
| 332 |
+
"asecd", "asind", "assert", "atand",
|
| 333 |
+
"autoreg_matrix", "autumn", "axes", "axis", "bar",
|
| 334 |
+
"barh", "bartlett", "bartlett_test", "beep",
|
| 335 |
+
"betacdf", "betainv", "betapdf", "betarnd",
|
| 336 |
+
"bicgstab", "bicubic", "binary", "binocdf",
|
| 337 |
+
"binoinv", "binopdf", "binornd", "bitcmp",
|
| 338 |
+
"bitget", "bitset", "blackman", "blanks",
|
| 339 |
+
"blkdiag", "bone", "box", "brighten", "calendar",
|
| 340 |
+
"cast", "cauchy_cdf", "cauchy_inv", "cauchy_pdf",
|
| 341 |
+
"cauchy_rnd", "caxis", "celldisp", "center", "cgs",
|
| 342 |
+
"chisquare_test_homogeneity",
|
| 343 |
+
"chisquare_test_independence", "circshift", "cla",
|
| 344 |
+
"clabel", "clf", "clock", "cloglog", "closereq",
|
| 345 |
+
"colon", "colorbar", "colormap", "colperm",
|
| 346 |
+
"comet", "common_size", "commutation_matrix",
|
| 347 |
+
"compan", "compare_versions", "compass",
|
| 348 |
+
"computer", "cond", "condest", "contour",
|
| 349 |
+
"contourc", "contourf", "contrast", "conv",
|
| 350 |
+
"convhull", "cool", "copper", "copyfile", "cor",
|
| 351 |
+
"corrcoef", "cor_test", "cosd", "cotd", "cov",
|
| 352 |
+
"cplxpair", "cross", "cscd", "cstrcat", "csvread",
|
| 353 |
+
"csvwrite", "ctime", "cumtrapz", "curl", "cut",
|
| 354 |
+
"cylinder", "date", "datenum", "datestr",
|
| 355 |
+
"datetick", "datevec", "dblquad", "deal",
|
| 356 |
+
"deblank", "deconv", "delaunay", "delaunayn",
|
| 357 |
+
"delete", "demo", "detrend", "diffpara", "diffuse",
|
| 358 |
+
"dir", "discrete_cdf", "discrete_inv",
|
| 359 |
+
"discrete_pdf", "discrete_rnd", "display",
|
| 360 |
+
"divergence", "dlmwrite", "dos", "dsearch",
|
| 361 |
+
"dsearchn", "duplication_matrix", "durbinlevinson",
|
| 362 |
+
"ellipsoid", "empirical_cdf", "empirical_inv",
|
| 363 |
+
"empirical_pdf", "empirical_rnd", "eomday",
|
| 364 |
+
"errorbar", "etime", "etreeplot", "example",
|
| 365 |
+
"expcdf", "expinv", "expm", "exppdf", "exprnd",
|
| 366 |
+
"ezcontour", "ezcontourf", "ezmesh", "ezmeshc",
|
| 367 |
+
"ezplot", "ezpolar", "ezsurf", "ezsurfc", "factor",
|
| 368 |
+
"factorial", "fail", "fcdf", "feather", "fftconv",
|
| 369 |
+
"fftfilt", "fftshift", "figure", "fileattrib",
|
| 370 |
+
"fileparts", "fill", "findall", "findobj",
|
| 371 |
+
"findstr", "finv", "flag", "flipdim", "fliplr",
|
| 372 |
+
"flipud", "fpdf", "fplot", "fractdiff", "freqz",
|
| 373 |
+
"freqz_plot", "frnd", "fsolve",
|
| 374 |
+
"f_test_regression", "ftp", "fullfile", "fzero",
|
| 375 |
+
"gamcdf", "gaminv", "gampdf", "gamrnd", "gca",
|
| 376 |
+
"gcbf", "gcbo", "gcf", "genvarname", "geocdf",
|
| 377 |
+
"geoinv", "geopdf", "geornd", "getfield", "ginput",
|
| 378 |
+
"glpk", "gls", "gplot", "gradient",
|
| 379 |
+
"graphics_toolkit", "gray", "grid", "griddata",
|
| 380 |
+
"griddatan", "gtext", "gunzip", "gzip", "hadamard",
|
| 381 |
+
"hamming", "hankel", "hanning", "hggroup",
|
| 382 |
+
"hidden", "hilb", "hist", "histc", "hold", "hot",
|
| 383 |
+
"hotelling_test", "housh", "hsv", "hurst",
|
| 384 |
+
"hygecdf", "hygeinv", "hygepdf", "hygernd",
|
| 385 |
+
"idivide", "ifftshift", "image", "imagesc",
|
| 386 |
+
"imfinfo", "imread", "imshow", "imwrite", "index",
|
| 387 |
+
"info", "inpolygon", "inputname", "interpft",
|
| 388 |
+
"interpn", "intersect", "invhilb", "iqr", "isa",
|
| 389 |
+
"isdefinite", "isdir", "is_duplicate_entry",
|
| 390 |
+
"isequal", "isequalwithequalnans", "isfigure",
|
| 391 |
+
"ishermitian", "ishghandle", "is_leap_year",
|
| 392 |
+
"isletter", "ismac", "ismember", "ispc", "isprime",
|
| 393 |
+
"isprop", "isscalar", "issquare", "isstrprop",
|
| 394 |
+
"issymmetric", "isunix", "is_valid_file_id",
|
| 395 |
+
"isvector", "jet", "kendall",
|
| 396 |
+
"kolmogorov_smirnov_cdf",
|
| 397 |
+
"kolmogorov_smirnov_test", "kruskal_wallis_test",
|
| 398 |
+
"krylov", "kurtosis", "laplace_cdf", "laplace_inv",
|
| 399 |
+
"laplace_pdf", "laplace_rnd", "legend", "legendre",
|
| 400 |
+
"license", "line", "linkprop", "list_primes",
|
| 401 |
+
"loadaudio", "loadobj", "logistic_cdf",
|
| 402 |
+
"logistic_inv", "logistic_pdf", "logistic_rnd",
|
| 403 |
+
"logit", "loglog", "loglogerr", "logm", "logncdf",
|
| 404 |
+
"logninv", "lognpdf", "lognrnd", "logspace",
|
| 405 |
+
"lookfor", "ls_command", "lsqnonneg", "magic",
|
| 406 |
+
"mahalanobis", "manova", "matlabroot",
|
| 407 |
+
"mcnemar_test", "mean", "meansq", "median", "menu",
|
| 408 |
+
"mesh", "meshc", "meshgrid", "meshz", "mexext",
|
| 409 |
+
"mget", "mkpp", "mode", "moment", "movefile",
|
| 410 |
+
"mpoles", "mput", "namelengthmax", "nargchk",
|
| 411 |
+
"nargoutchk", "nbincdf", "nbininv", "nbinpdf",
|
| 412 |
+
"nbinrnd", "nchoosek", "ndgrid", "newplot", "news",
|
| 413 |
+
"nonzeros", "normcdf", "normest", "norminv",
|
| 414 |
+
"normpdf", "normrnd", "now", "nthroot", "null",
|
| 415 |
+
"ocean", "ols", "onenormest", "optimget",
|
| 416 |
+
"optimset", "orderfields", "orient", "orth",
|
| 417 |
+
"pack", "pareto", "parseparams", "pascal", "patch",
|
| 418 |
+
"pathdef", "pcg", "pchip", "pcolor", "pcr",
|
| 419 |
+
"peaks", "periodogram", "perl", "perms", "pie",
|
| 420 |
+
"pink", "planerot", "playaudio", "plot",
|
| 421 |
+
"plotmatrix", "plotyy", "poisscdf", "poissinv",
|
| 422 |
+
"poisspdf", "poissrnd", "polar", "poly",
|
| 423 |
+
"polyaffine", "polyarea", "polyderiv", "polyfit",
|
| 424 |
+
"polygcd", "polyint", "polyout", "polyreduce",
|
| 425 |
+
"polyval", "polyvalm", "postpad", "powerset",
|
| 426 |
+
"ppder", "ppint", "ppjumps", "ppplot", "ppval",
|
| 427 |
+
"pqpnonneg", "prepad", "primes", "print",
|
| 428 |
+
"print_usage", "prism", "probit", "qp", "qqplot",
|
| 429 |
+
"quadcc", "quadgk", "quadl", "quadv", "quiver",
|
| 430 |
+
"qzhess", "rainbow", "randi", "range", "rank",
|
| 431 |
+
"ranks", "rat", "reallog", "realpow", "realsqrt",
|
| 432 |
+
"record", "rectangle_lw", "rectangle_sw",
|
| 433 |
+
"rectint", "refresh", "refreshdata",
|
| 434 |
+
"regexptranslate", "repmat", "residue", "ribbon",
|
| 435 |
+
"rindex", "roots", "rose", "rosser", "rotdim",
|
| 436 |
+
"rref", "run", "run_count", "rundemos", "run_test",
|
| 437 |
+
"runtests", "saveas", "saveaudio", "saveobj",
|
| 438 |
+
"savepath", "scatter", "secd", "semilogx",
|
| 439 |
+
"semilogxerr", "semilogy", "semilogyerr",
|
| 440 |
+
"setaudio", "setdiff", "setfield", "setxor",
|
| 441 |
+
"shading", "shift", "shiftdim", "sign_test",
|
| 442 |
+
"sinc", "sind", "sinetone", "sinewave", "skewness",
|
| 443 |
+
"slice", "sombrero", "sortrows", "spaugment",
|
| 444 |
+
"spconvert", "spdiags", "spearman", "spectral_adf",
|
| 445 |
+
"spectral_xdf", "specular", "speed", "spencer",
|
| 446 |
+
"speye", "spfun", "sphere", "spinmap", "spline",
|
| 447 |
+
"spones", "sprand", "sprandn", "sprandsym",
|
| 448 |
+
"spring", "spstats", "spy", "sqp", "stairs",
|
| 449 |
+
"statistics", "std", "stdnormal_cdf",
|
| 450 |
+
"stdnormal_inv", "stdnormal_pdf", "stdnormal_rnd",
|
| 451 |
+
"stem", "stft", "strcat", "strchr", "strjust",
|
| 452 |
+
"strmatch", "strread", "strsplit", "strtok",
|
| 453 |
+
"strtrim", "strtrunc", "structfun", "studentize",
|
| 454 |
+
"subplot", "subsindex", "subspace", "substr",
|
| 455 |
+
"substruct", "summer", "surf", "surface", "surfc",
|
| 456 |
+
"surfl", "surfnorm", "svds", "swapbytes",
|
| 457 |
+
"sylvester_matrix", "symvar", "synthesis", "table",
|
| 458 |
+
"tand", "tar", "tcdf", "tempdir", "tempname",
|
| 459 |
+
"test", "text", "textread", "textscan", "tinv",
|
| 460 |
+
"title", "toeplitz", "tpdf", "trace", "trapz",
|
| 461 |
+
"treelayout", "treeplot", "triangle_lw",
|
| 462 |
+
"triangle_sw", "tril", "trimesh", "triplequad",
|
| 463 |
+
"triplot", "trisurf", "triu", "trnd", "tsearchn",
|
| 464 |
+
"t_test", "t_test_regression", "type", "unidcdf",
|
| 465 |
+
"unidinv", "unidpdf", "unidrnd", "unifcdf",
|
| 466 |
+
"unifinv", "unifpdf", "unifrnd", "union", "unique",
|
| 467 |
+
"unix", "unmkpp", "unpack", "untabify", "untar",
|
| 468 |
+
"unwrap", "unzip", "u_test", "validatestring",
|
| 469 |
+
"vander", "var", "var_test", "vech", "ver",
|
| 470 |
+
"version", "view", "voronoi", "voronoin",
|
| 471 |
+
"waitforbuttonpress", "wavread", "wavwrite",
|
| 472 |
+
"wblcdf", "wblinv", "wblpdf", "wblrnd", "weekday",
|
| 473 |
+
"welch_test", "what", "white", "whitebg",
|
| 474 |
+
"wienrnd", "wilcoxon_test", "wilkinson", "winter",
|
| 475 |
+
"xlabel", "xlim", "ylabel", "yulewalker", "zip",
|
| 476 |
+
"zlabel", "z_test")
|
| 477 |
+
|
| 478 |
+
loadable_kw = (
|
| 479 |
+
"airy", "amd", "balance", "besselh", "besseli",
|
| 480 |
+
"besselj", "besselk", "bessely", "bitpack",
|
| 481 |
+
"bsxfun", "builtin", "ccolamd", "cellfun",
|
| 482 |
+
"cellslices", "chol", "choldelete", "cholinsert",
|
| 483 |
+
"cholinv", "cholshift", "cholupdate", "colamd",
|
| 484 |
+
"colloc", "convhulln", "convn", "csymamd",
|
| 485 |
+
"cummax", "cummin", "daspk", "daspk_options",
|
| 486 |
+
"dasrt", "dasrt_options", "dassl", "dassl_options",
|
| 487 |
+
"dbclear", "dbdown", "dbstack", "dbstatus",
|
| 488 |
+
"dbstop", "dbtype", "dbup", "dbwhere", "det",
|
| 489 |
+
"dlmread", "dmperm", "dot", "eig", "eigs",
|
| 490 |
+
"endgrent", "endpwent", "etree", "fft", "fftn",
|
| 491 |
+
"fftw", "filter", "find", "full", "gcd",
|
| 492 |
+
"getgrent", "getgrgid", "getgrnam", "getpwent",
|
| 493 |
+
"getpwnam", "getpwuid", "getrusage", "givens",
|
| 494 |
+
"gmtime", "gnuplot_binary", "hess", "ifft",
|
| 495 |
+
"ifftn", "inv", "isdebugmode", "issparse", "kron",
|
| 496 |
+
"localtime", "lookup", "lsode", "lsode_options",
|
| 497 |
+
"lu", "luinc", "luupdate", "matrix_type", "max",
|
| 498 |
+
"min", "mktime", "pinv", "qr", "qrdelete",
|
| 499 |
+
"qrinsert", "qrshift", "qrupdate", "quad",
|
| 500 |
+
"quad_options", "qz", "rand", "rande", "randg",
|
| 501 |
+
"randn", "randp", "randperm", "rcond", "regexp",
|
| 502 |
+
"regexpi", "regexprep", "schur", "setgrent",
|
| 503 |
+
"setpwent", "sort", "spalloc", "sparse", "spparms",
|
| 504 |
+
"sprank", "sqrtm", "strfind", "strftime",
|
| 505 |
+
"strptime", "strrep", "svd", "svd_driver", "syl",
|
| 506 |
+
"symamd", "symbfact", "symrcm", "time", "tsearch",
|
| 507 |
+
"typecast", "urlread", "urlwrite")
|
| 508 |
+
|
| 509 |
+
mapping_kw = (
|
| 510 |
+
"abs", "acos", "acosh", "acot", "acoth", "acsc",
|
| 511 |
+
"acsch", "angle", "arg", "asec", "asech", "asin",
|
| 512 |
+
"asinh", "atan", "atanh", "beta", "betainc",
|
| 513 |
+
"betaln", "bincoeff", "cbrt", "ceil", "conj", "cos",
|
| 514 |
+
"cosh", "cot", "coth", "csc", "csch", "erf", "erfc",
|
| 515 |
+
"erfcx", "erfinv", "exp", "finite", "fix", "floor",
|
| 516 |
+
"fmod", "gamma", "gammainc", "gammaln", "imag",
|
| 517 |
+
"isalnum", "isalpha", "isascii", "iscntrl",
|
| 518 |
+
"isdigit", "isfinite", "isgraph", "isinf",
|
| 519 |
+
"islower", "isna", "isnan", "isprint", "ispunct",
|
| 520 |
+
"isspace", "isupper", "isxdigit", "lcm", "lgamma",
|
| 521 |
+
"log", "lower", "mod", "real", "rem", "round",
|
| 522 |
+
"roundb", "sec", "sech", "sign", "sin", "sinh",
|
| 523 |
+
"sqrt", "tan", "tanh", "toascii", "tolower", "xor")
|
| 524 |
+
|
| 525 |
+
builtin_consts = (
|
| 526 |
+
"EDITOR", "EXEC_PATH", "I", "IMAGE_PATH", "NA",
|
| 527 |
+
"OCTAVE_HOME", "OCTAVE_VERSION", "PAGER",
|
| 528 |
+
"PAGER_FLAGS", "SEEK_CUR", "SEEK_END", "SEEK_SET",
|
| 529 |
+
"SIG", "S_ISBLK", "S_ISCHR", "S_ISDIR", "S_ISFIFO",
|
| 530 |
+
"S_ISLNK", "S_ISREG", "S_ISSOCK", "WCONTINUE",
|
| 531 |
+
"WCOREDUMP", "WEXITSTATUS", "WIFCONTINUED",
|
| 532 |
+
"WIFEXITED", "WIFSIGNALED", "WIFSTOPPED", "WNOHANG",
|
| 533 |
+
"WSTOPSIG", "WTERMSIG", "WUNTRACED")
|
| 534 |
+
|
| 535 |
+
tokens = {
|
| 536 |
+
'root': [
|
| 537 |
+
# We should look into multiline comments
|
| 538 |
+
(r'[%#].*$', Comment),
|
| 539 |
+
(r'^\s*function', Keyword, 'deffunc'),
|
| 540 |
+
|
| 541 |
+
# from 'iskeyword' on hg changeset 8cc154f45e37
|
| 542 |
+
(words((
|
| 543 |
+
'__FILE__', '__LINE__', 'break', 'case', 'catch', 'classdef', 'continue', 'do', 'else',
|
| 544 |
+
'elseif', 'end', 'end_try_catch', 'end_unwind_protect', 'endclassdef',
|
| 545 |
+
'endevents', 'endfor', 'endfunction', 'endif', 'endmethods', 'endproperties',
|
| 546 |
+
'endswitch', 'endwhile', 'events', 'for', 'function', 'get', 'global', 'if', 'methods',
|
| 547 |
+
'otherwise', 'persistent', 'properties', 'return', 'set', 'static', 'switch', 'try',
|
| 548 |
+
'until', 'unwind_protect', 'unwind_protect_cleanup', 'while'), suffix=r'\b'),
|
| 549 |
+
Keyword),
|
| 550 |
+
|
| 551 |
+
(words(builtin_kw + command_kw + function_kw + loadable_kw + mapping_kw,
|
| 552 |
+
suffix=r'\b'), Name.Builtin),
|
| 553 |
+
|
| 554 |
+
(words(builtin_consts, suffix=r'\b'), Name.Constant),
|
| 555 |
+
|
| 556 |
+
# operators in Octave but not Matlab:
|
| 557 |
+
(r'-=|!=|!|/=|--', Operator),
|
| 558 |
+
# operators:
|
| 559 |
+
(r'-|==|~=|<|>|<=|>=|&&|&|~|\|\|?', Operator),
|
| 560 |
+
# operators in Octave but not Matlab requiring escape for re:
|
| 561 |
+
(r'\*=|\+=|\^=|\/=|\\=|\*\*|\+\+|\.\*\*', Operator),
|
| 562 |
+
# operators requiring escape for re:
|
| 563 |
+
(r'\.\*|\*|\+|\.\^|\.\\|\.\/|\/|\\', Operator),
|
| 564 |
+
|
| 565 |
+
|
| 566 |
+
# punctuation:
|
| 567 |
+
(r'[\[\](){}:@.,]', Punctuation),
|
| 568 |
+
(r'=|:|;', Punctuation),
|
| 569 |
+
|
| 570 |
+
(r'"[^"]*"', String),
|
| 571 |
+
|
| 572 |
+
(r'(\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?', Number.Float),
|
| 573 |
+
(r'\d+[eEf][+-]?[0-9]+', Number.Float),
|
| 574 |
+
(r'\d+', Number.Integer),
|
| 575 |
+
|
| 576 |
+
# quote can be transpose, instead of string:
|
| 577 |
+
# (not great, but handles common cases...)
|
| 578 |
+
(r'(?<=[\w)\].])\'+', Operator),
|
| 579 |
+
(r'(?<![\w)\].])\'', String, 'string'),
|
| 580 |
+
|
| 581 |
+
(r'[a-zA-Z_]\w*', Name),
|
| 582 |
+
(r'.', Text),
|
| 583 |
+
],
|
| 584 |
+
'string': [
|
| 585 |
+
(r"[^']*'", String, '#pop'),
|
| 586 |
+
],
|
| 587 |
+
'deffunc': [
|
| 588 |
+
(r'(\s*)(?:(.+)(\s*)(=)(\s*))?(.+)(\()(.*)(\))(\s*)',
|
| 589 |
+
bygroups(Whitespace, Text, Whitespace, Punctuation,
|
| 590 |
+
Whitespace, Name.Function, Punctuation, Text,
|
| 591 |
+
Punctuation, Whitespace), '#pop'),
|
| 592 |
+
# function with no args
|
| 593 |
+
(r'(\s*)([a-zA-Z_]\w*)', bygroups(Text, Name.Function), '#pop'),
|
| 594 |
+
],
|
| 595 |
+
}
|
| 596 |
+
|
| 597 |
+
|
| 598 |
+
class ScilabLexer(RegexLexer):
|
| 599 |
+
"""
|
| 600 |
+
For Scilab source code.
|
| 601 |
+
|
| 602 |
+
.. versionadded:: 1.5
|
| 603 |
+
"""
|
| 604 |
+
name = 'Scilab'
|
| 605 |
+
aliases = ['scilab']
|
| 606 |
+
filenames = ['*.sci', '*.sce', '*.tst']
|
| 607 |
+
mimetypes = ['text/scilab']
|
| 608 |
+
|
| 609 |
+
tokens = {
|
| 610 |
+
'root': [
|
| 611 |
+
(r'//.*?$', Comment.Single),
|
| 612 |
+
(r'^\s*function', Keyword, 'deffunc'),
|
| 613 |
+
|
| 614 |
+
(words((
|
| 615 |
+
'__FILE__', '__LINE__', 'break', 'case', 'catch', 'classdef', 'continue', 'do', 'else',
|
| 616 |
+
'elseif', 'end', 'end_try_catch', 'end_unwind_protect', 'endclassdef',
|
| 617 |
+
'endevents', 'endfor', 'endfunction', 'endif', 'endmethods', 'endproperties',
|
| 618 |
+
'endswitch', 'endwhile', 'events', 'for', 'function', 'get', 'global', 'if', 'methods',
|
| 619 |
+
'otherwise', 'persistent', 'properties', 'return', 'set', 'static', 'switch', 'try',
|
| 620 |
+
'until', 'unwind_protect', 'unwind_protect_cleanup', 'while'), suffix=r'\b'),
|
| 621 |
+
Keyword),
|
| 622 |
+
|
| 623 |
+
(words(_scilab_builtins.functions_kw +
|
| 624 |
+
_scilab_builtins.commands_kw +
|
| 625 |
+
_scilab_builtins.macros_kw, suffix=r'\b'), Name.Builtin),
|
| 626 |
+
|
| 627 |
+
(words(_scilab_builtins.variables_kw, suffix=r'\b'), Name.Constant),
|
| 628 |
+
|
| 629 |
+
# operators:
|
| 630 |
+
(r'-|==|~=|<|>|<=|>=|&&|&|~|\|\|?', Operator),
|
| 631 |
+
# operators requiring escape for re:
|
| 632 |
+
(r'\.\*|\*|\+|\.\^|\.\\|\.\/|\/|\\', Operator),
|
| 633 |
+
|
| 634 |
+
# punctuation:
|
| 635 |
+
(r'[\[\](){}@.,=:;]', Punctuation),
|
| 636 |
+
|
| 637 |
+
(r'"[^"]*"', String),
|
| 638 |
+
|
| 639 |
+
# quote can be transpose, instead of string:
|
| 640 |
+
# (not great, but handles common cases...)
|
| 641 |
+
(r'(?<=[\w)\].])\'+', Operator),
|
| 642 |
+
(r'(?<![\w)\].])\'', String, 'string'),
|
| 643 |
+
|
| 644 |
+
(r'(\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?', Number.Float),
|
| 645 |
+
(r'\d+[eEf][+-]?[0-9]+', Number.Float),
|
| 646 |
+
(r'\d+', Number.Integer),
|
| 647 |
+
|
| 648 |
+
(r'[a-zA-Z_]\w*', Name),
|
| 649 |
+
(r'.', Text),
|
| 650 |
+
],
|
| 651 |
+
'string': [
|
| 652 |
+
(r"[^']*'", String, '#pop'),
|
| 653 |
+
(r'.', String, '#pop'),
|
| 654 |
+
],
|
| 655 |
+
'deffunc': [
|
| 656 |
+
(r'(\s*)(?:(.+)(\s*)(=)(\s*))?(.+)(\()(.*)(\))(\s*)',
|
| 657 |
+
bygroups(Whitespace, Text, Whitespace, Punctuation,
|
| 658 |
+
Whitespace, Name.Function, Punctuation, Text,
|
| 659 |
+
Punctuation, Whitespace), '#pop'),
|
| 660 |
+
# function with no args
|
| 661 |
+
(r'(\s*)([a-zA-Z_]\w*)', bygroups(Text, Name.Function), '#pop'),
|
| 662 |
+
],
|
| 663 |
+
}
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/ml.py
ADDED
|
@@ -0,0 +1,769 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 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, default, words
|
| 15 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 16 |
+
Number, Punctuation, Error
|
| 17 |
+
|
| 18 |
+
__all__ = ['SMLLexer', 'OcamlLexer', 'OpaLexer']
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
class SMLLexer(RegexLexer):
|
| 22 |
+
"""
|
| 23 |
+
For the Standard ML language.
|
| 24 |
+
|
| 25 |
+
.. versionadded:: 1.5
|
| 26 |
+
"""
|
| 27 |
+
|
| 28 |
+
name = 'Standard ML'
|
| 29 |
+
aliases = ['sml']
|
| 30 |
+
filenames = ['*.sml', '*.sig', '*.fun']
|
| 31 |
+
mimetypes = ['text/x-standardml', 'application/x-standardml']
|
| 32 |
+
|
| 33 |
+
alphanumid_reserved = set((
|
| 34 |
+
# Core
|
| 35 |
+
'abstype', 'and', 'andalso', 'as', 'case', 'datatype', 'do', 'else',
|
| 36 |
+
'end', 'exception', 'fn', 'fun', 'handle', 'if', 'in', 'infix',
|
| 37 |
+
'infixr', 'let', 'local', 'nonfix', 'of', 'op', 'open', 'orelse',
|
| 38 |
+
'raise', 'rec', 'then', 'type', 'val', 'with', 'withtype', 'while',
|
| 39 |
+
# Modules
|
| 40 |
+
'eqtype', 'functor', 'include', 'sharing', 'sig', 'signature',
|
| 41 |
+
'struct', 'structure', 'where',
|
| 42 |
+
))
|
| 43 |
+
|
| 44 |
+
symbolicid_reserved = set((
|
| 45 |
+
# Core
|
| 46 |
+
':', '\|', '=', '=>', '->', '#',
|
| 47 |
+
# Modules
|
| 48 |
+
':>',
|
| 49 |
+
))
|
| 50 |
+
|
| 51 |
+
nonid_reserved = set(('(', ')', '[', ']', '{', '}', ',', ';', '...', '_'))
|
| 52 |
+
|
| 53 |
+
alphanumid_re = r"[a-zA-Z][\w']*"
|
| 54 |
+
symbolicid_re = r"[!%&$#+\-/:<=>?@\\~`^|*]+"
|
| 55 |
+
|
| 56 |
+
# A character constant is a sequence of the form #s, where s is a string
|
| 57 |
+
# constant denoting a string of size one character. This setup just parses
|
| 58 |
+
# the entire string as either a String.Double or a String.Char (depending
|
| 59 |
+
# on the argument), even if the String.Char is an erronous
|
| 60 |
+
# multiple-character string.
|
| 61 |
+
def stringy(whatkind):
|
| 62 |
+
return [
|
| 63 |
+
(r'[^"\\]', whatkind),
|
| 64 |
+
(r'\\[\\"abtnvfr]', String.Escape),
|
| 65 |
+
# Control-character notation is used for codes < 32,
|
| 66 |
+
# where \^@ == \000
|
| 67 |
+
(r'\\\^[\x40-\x5e]', String.Escape),
|
| 68 |
+
# Docs say 'decimal digits'
|
| 69 |
+
(r'\\[0-9]{3}', String.Escape),
|
| 70 |
+
(r'\\u[0-9a-fA-F]{4}', String.Escape),
|
| 71 |
+
(r'\\\s+\\', String.Interpol),
|
| 72 |
+
(r'"', whatkind, '#pop'),
|
| 73 |
+
]
|
| 74 |
+
|
| 75 |
+
# Callbacks for distinguishing tokens and reserved words
|
| 76 |
+
def long_id_callback(self, match):
|
| 77 |
+
if match.group(1) in self.alphanumid_reserved:
|
| 78 |
+
token = Error
|
| 79 |
+
else:
|
| 80 |
+
token = Name.Namespace
|
| 81 |
+
yield match.start(1), token, match.group(1)
|
| 82 |
+
yield match.start(2), Punctuation, match.group(2)
|
| 83 |
+
|
| 84 |
+
def end_id_callback(self, match):
|
| 85 |
+
if match.group(1) in self.alphanumid_reserved:
|
| 86 |
+
token = Error
|
| 87 |
+
elif match.group(1) in self.symbolicid_reserved:
|
| 88 |
+
token = Error
|
| 89 |
+
else:
|
| 90 |
+
token = Name
|
| 91 |
+
yield match.start(1), token, match.group(1)
|
| 92 |
+
|
| 93 |
+
def id_callback(self, match):
|
| 94 |
+
str = match.group(1)
|
| 95 |
+
if str in self.alphanumid_reserved:
|
| 96 |
+
token = Keyword.Reserved
|
| 97 |
+
elif str in self.symbolicid_reserved:
|
| 98 |
+
token = Punctuation
|
| 99 |
+
else:
|
| 100 |
+
token = Name
|
| 101 |
+
yield match.start(1), token, str
|
| 102 |
+
|
| 103 |
+
tokens = {
|
| 104 |
+
# Whitespace and comments are (almost) everywhere
|
| 105 |
+
'whitespace': [
|
| 106 |
+
(r'\s+', Text),
|
| 107 |
+
(r'\(\*', Comment.Multiline, 'comment'),
|
| 108 |
+
],
|
| 109 |
+
|
| 110 |
+
'delimiters': [
|
| 111 |
+
# This lexer treats these delimiters specially:
|
| 112 |
+
# Delimiters define scopes, and the scope is how the meaning of
|
| 113 |
+
# the `|' is resolved - is it a case/handle expression, or function
|
| 114 |
+
# definition by cases? (This is not how the Definition works, but
|
| 115 |
+
# it's how MLton behaves, see http://mlton.org/SMLNJDeviations)
|
| 116 |
+
(r'\(|\[|\{', Punctuation, 'main'),
|
| 117 |
+
(r'\)|\]|\}', Punctuation, '#pop'),
|
| 118 |
+
(r'\b(let|if|local)\b(?!\')', Keyword.Reserved, ('main', 'main')),
|
| 119 |
+
(r'\b(struct|sig|while)\b(?!\')', Keyword.Reserved, 'main'),
|
| 120 |
+
(r'\b(do|else|end|in|then)\b(?!\')', Keyword.Reserved, '#pop'),
|
| 121 |
+
],
|
| 122 |
+
|
| 123 |
+
'core': [
|
| 124 |
+
# Punctuation that doesn't overlap symbolic identifiers
|
| 125 |
+
(r'(%s)' % '|'.join(re.escape(z) for z in nonid_reserved),
|
| 126 |
+
Punctuation),
|
| 127 |
+
|
| 128 |
+
# Special constants: strings, floats, numbers in decimal and hex
|
| 129 |
+
(r'#"', String.Char, 'char'),
|
| 130 |
+
(r'"', String.Double, 'string'),
|
| 131 |
+
(r'~?0x[0-9a-fA-F]+', Number.Hex),
|
| 132 |
+
(r'0wx[0-9a-fA-F]+', Number.Hex),
|
| 133 |
+
(r'0w\d+', Number.Integer),
|
| 134 |
+
(r'~?\d+\.\d+[eE]~?\d+', Number.Float),
|
| 135 |
+
(r'~?\d+\.\d+', Number.Float),
|
| 136 |
+
(r'~?\d+[eE]~?\d+', Number.Float),
|
| 137 |
+
(r'~?\d+', Number.Integer),
|
| 138 |
+
|
| 139 |
+
# Labels
|
| 140 |
+
(r'#\s*[1-9][0-9]*', Name.Label),
|
| 141 |
+
(r'#\s*(%s)' % alphanumid_re, Name.Label),
|
| 142 |
+
(r'#\s+(%s)' % symbolicid_re, Name.Label),
|
| 143 |
+
# Some reserved words trigger a special, local lexer state change
|
| 144 |
+
(r'\b(datatype|abstype)\b(?!\')', Keyword.Reserved, 'dname'),
|
| 145 |
+
(r'(?=\b(exception)\b(?!\'))', Text, ('ename')),
|
| 146 |
+
(r'\b(functor|include|open|signature|structure)\b(?!\')',
|
| 147 |
+
Keyword.Reserved, 'sname'),
|
| 148 |
+
(r'\b(type|eqtype)\b(?!\')', Keyword.Reserved, 'tname'),
|
| 149 |
+
|
| 150 |
+
# Regular identifiers, long and otherwise
|
| 151 |
+
(r'\'[\w\']*', Name.Decorator),
|
| 152 |
+
(r'(%s)(\.)' % alphanumid_re, long_id_callback, "dotted"),
|
| 153 |
+
(r'(%s)' % alphanumid_re, id_callback),
|
| 154 |
+
(r'(%s)' % symbolicid_re, id_callback),
|
| 155 |
+
],
|
| 156 |
+
'dotted': [
|
| 157 |
+
(r'(%s)(\.)' % alphanumid_re, long_id_callback),
|
| 158 |
+
(r'(%s)' % alphanumid_re, end_id_callback, "#pop"),
|
| 159 |
+
(r'(%s)' % symbolicid_re, end_id_callback, "#pop"),
|
| 160 |
+
(r'\s+', Error),
|
| 161 |
+
(r'\S+', Error),
|
| 162 |
+
],
|
| 163 |
+
|
| 164 |
+
|
| 165 |
+
# Main parser (prevents errors in files that have scoping errors)
|
| 166 |
+
'root': [
|
| 167 |
+
default('main')
|
| 168 |
+
],
|
| 169 |
+
|
| 170 |
+
# In this scope, I expect '|' to not be followed by a function name,
|
| 171 |
+
# and I expect 'and' to be followed by a binding site
|
| 172 |
+
'main': [
|
| 173 |
+
include('whitespace'),
|
| 174 |
+
|
| 175 |
+
# Special behavior of val/and/fun
|
| 176 |
+
(r'\b(val|and)\b(?!\')', Keyword.Reserved, 'vname'),
|
| 177 |
+
(r'\b(fun)\b(?!\')', Keyword.Reserved,
|
| 178 |
+
('#pop', 'main-fun', 'fname')),
|
| 179 |
+
|
| 180 |
+
include('delimiters'),
|
| 181 |
+
include('core'),
|
| 182 |
+
(r'\S+', Error),
|
| 183 |
+
],
|
| 184 |
+
|
| 185 |
+
# In this scope, I expect '|' and 'and' to be followed by a function
|
| 186 |
+
'main-fun': [
|
| 187 |
+
include('whitespace'),
|
| 188 |
+
|
| 189 |
+
(r'\s', Text),
|
| 190 |
+
(r'\(\*', Comment.Multiline, 'comment'),
|
| 191 |
+
|
| 192 |
+
# Special behavior of val/and/fun
|
| 193 |
+
(r'\b(fun|and)\b(?!\')', Keyword.Reserved, 'fname'),
|
| 194 |
+
(r'\b(val)\b(?!\')', Keyword.Reserved,
|
| 195 |
+
('#pop', 'main', 'vname')),
|
| 196 |
+
|
| 197 |
+
# Special behavior of '|' and '|'-manipulating keywords
|
| 198 |
+
(r'\|', Punctuation, 'fname'),
|
| 199 |
+
(r'\b(case|handle)\b(?!\')', Keyword.Reserved,
|
| 200 |
+
('#pop', 'main')),
|
| 201 |
+
|
| 202 |
+
include('delimiters'),
|
| 203 |
+
include('core'),
|
| 204 |
+
(r'\S+', Error),
|
| 205 |
+
],
|
| 206 |
+
|
| 207 |
+
# Character and string parsers
|
| 208 |
+
'char': stringy(String.Char),
|
| 209 |
+
'string': stringy(String.Double),
|
| 210 |
+
|
| 211 |
+
'breakout': [
|
| 212 |
+
(r'(?=\b(%s)\b(?!\'))' % '|'.join(alphanumid_reserved), Text, '#pop'),
|
| 213 |
+
],
|
| 214 |
+
|
| 215 |
+
# Dealing with what comes after module system keywords
|
| 216 |
+
'sname': [
|
| 217 |
+
include('whitespace'),
|
| 218 |
+
include('breakout'),
|
| 219 |
+
|
| 220 |
+
(r'(%s)' % alphanumid_re, Name.Namespace),
|
| 221 |
+
default('#pop'),
|
| 222 |
+
],
|
| 223 |
+
|
| 224 |
+
# Dealing with what comes after the 'fun' (or 'and' or '|') keyword
|
| 225 |
+
'fname': [
|
| 226 |
+
include('whitespace'),
|
| 227 |
+
(r'\'[\w\']*', Name.Decorator),
|
| 228 |
+
(r'\(', Punctuation, 'tyvarseq'),
|
| 229 |
+
|
| 230 |
+
(r'(%s)' % alphanumid_re, Name.Function, '#pop'),
|
| 231 |
+
(r'(%s)' % symbolicid_re, Name.Function, '#pop'),
|
| 232 |
+
|
| 233 |
+
# Ignore interesting function declarations like "fun (x + y) = ..."
|
| 234 |
+
default('#pop'),
|
| 235 |
+
],
|
| 236 |
+
|
| 237 |
+
# Dealing with what comes after the 'val' (or 'and') keyword
|
| 238 |
+
'vname': [
|
| 239 |
+
include('whitespace'),
|
| 240 |
+
(r'\'[\w\']*', Name.Decorator),
|
| 241 |
+
(r'\(', Punctuation, 'tyvarseq'),
|
| 242 |
+
|
| 243 |
+
(r'(%s)(\s*)(=(?!%s))' % (alphanumid_re, symbolicid_re),
|
| 244 |
+
bygroups(Name.Variable, Text, Punctuation), '#pop'),
|
| 245 |
+
(r'(%s)(\s*)(=(?!%s))' % (symbolicid_re, symbolicid_re),
|
| 246 |
+
bygroups(Name.Variable, Text, Punctuation), '#pop'),
|
| 247 |
+
(r'(%s)' % alphanumid_re, Name.Variable, '#pop'),
|
| 248 |
+
(r'(%s)' % symbolicid_re, Name.Variable, '#pop'),
|
| 249 |
+
|
| 250 |
+
# Ignore interesting patterns like 'val (x, y)'
|
| 251 |
+
default('#pop'),
|
| 252 |
+
],
|
| 253 |
+
|
| 254 |
+
# Dealing with what comes after the 'type' (or 'and') keyword
|
| 255 |
+
'tname': [
|
| 256 |
+
include('whitespace'),
|
| 257 |
+
include('breakout'),
|
| 258 |
+
|
| 259 |
+
(r'\'[\w\']*', Name.Decorator),
|
| 260 |
+
(r'\(', Punctuation, 'tyvarseq'),
|
| 261 |
+
(r'=(?!%s)' % symbolicid_re, Punctuation, ('#pop', 'typbind')),
|
| 262 |
+
|
| 263 |
+
(r'(%s)' % alphanumid_re, Keyword.Type),
|
| 264 |
+
(r'(%s)' % symbolicid_re, Keyword.Type),
|
| 265 |
+
(r'\S+', Error, '#pop'),
|
| 266 |
+
],
|
| 267 |
+
|
| 268 |
+
# A type binding includes most identifiers
|
| 269 |
+
'typbind': [
|
| 270 |
+
include('whitespace'),
|
| 271 |
+
|
| 272 |
+
(r'\b(and)\b(?!\')', Keyword.Reserved, ('#pop', 'tname')),
|
| 273 |
+
|
| 274 |
+
include('breakout'),
|
| 275 |
+
include('core'),
|
| 276 |
+
(r'\S+', Error, '#pop'),
|
| 277 |
+
],
|
| 278 |
+
|
| 279 |
+
# Dealing with what comes after the 'datatype' (or 'and') keyword
|
| 280 |
+
'dname': [
|
| 281 |
+
include('whitespace'),
|
| 282 |
+
include('breakout'),
|
| 283 |
+
|
| 284 |
+
(r'\'[\w\']*', Name.Decorator),
|
| 285 |
+
(r'\(', Punctuation, 'tyvarseq'),
|
| 286 |
+
(r'(=)(\s*)(datatype)',
|
| 287 |
+
bygroups(Punctuation, Text, Keyword.Reserved), '#pop'),
|
| 288 |
+
(r'=(?!%s)' % symbolicid_re, Punctuation,
|
| 289 |
+
('#pop', 'datbind', 'datcon')),
|
| 290 |
+
|
| 291 |
+
(r'(%s)' % alphanumid_re, Keyword.Type),
|
| 292 |
+
(r'(%s)' % symbolicid_re, Keyword.Type),
|
| 293 |
+
(r'\S+', Error, '#pop'),
|
| 294 |
+
],
|
| 295 |
+
|
| 296 |
+
# common case - A | B | C of int
|
| 297 |
+
'datbind': [
|
| 298 |
+
include('whitespace'),
|
| 299 |
+
|
| 300 |
+
(r'\b(and)\b(?!\')', Keyword.Reserved, ('#pop', 'dname')),
|
| 301 |
+
(r'\b(withtype)\b(?!\')', Keyword.Reserved, ('#pop', 'tname')),
|
| 302 |
+
(r'\b(of)\b(?!\')', Keyword.Reserved),
|
| 303 |
+
|
| 304 |
+
(r'(\|)(\s*)(%s)' % alphanumid_re,
|
| 305 |
+
bygroups(Punctuation, Text, Name.Class)),
|
| 306 |
+
(r'(\|)(\s+)(%s)' % symbolicid_re,
|
| 307 |
+
bygroups(Punctuation, Text, Name.Class)),
|
| 308 |
+
|
| 309 |
+
include('breakout'),
|
| 310 |
+
include('core'),
|
| 311 |
+
(r'\S+', Error),
|
| 312 |
+
],
|
| 313 |
+
|
| 314 |
+
# Dealing with what comes after an exception
|
| 315 |
+
'ename': [
|
| 316 |
+
include('whitespace'),
|
| 317 |
+
|
| 318 |
+
(r'(exception|and)\b(\s+)(%s)' % alphanumid_re,
|
| 319 |
+
bygroups(Keyword.Reserved, Text, Name.Class)),
|
| 320 |
+
(r'(exception|and)\b(\s*)(%s)' % symbolicid_re,
|
| 321 |
+
bygroups(Keyword.Reserved, Text, Name.Class)),
|
| 322 |
+
(r'\b(of)\b(?!\')', Keyword.Reserved),
|
| 323 |
+
|
| 324 |
+
include('breakout'),
|
| 325 |
+
include('core'),
|
| 326 |
+
(r'\S+', Error),
|
| 327 |
+
],
|
| 328 |
+
|
| 329 |
+
'datcon': [
|
| 330 |
+
include('whitespace'),
|
| 331 |
+
(r'(%s)' % alphanumid_re, Name.Class, '#pop'),
|
| 332 |
+
(r'(%s)' % symbolicid_re, Name.Class, '#pop'),
|
| 333 |
+
(r'\S+', Error, '#pop'),
|
| 334 |
+
],
|
| 335 |
+
|
| 336 |
+
# Series of type variables
|
| 337 |
+
'tyvarseq': [
|
| 338 |
+
(r'\s', Text),
|
| 339 |
+
(r'\(\*', Comment.Multiline, 'comment'),
|
| 340 |
+
|
| 341 |
+
(r'\'[\w\']*', Name.Decorator),
|
| 342 |
+
(alphanumid_re, Name),
|
| 343 |
+
(r',', Punctuation),
|
| 344 |
+
(r'\)', Punctuation, '#pop'),
|
| 345 |
+
(symbolicid_re, Name),
|
| 346 |
+
],
|
| 347 |
+
|
| 348 |
+
'comment': [
|
| 349 |
+
(r'[^(*)]', Comment.Multiline),
|
| 350 |
+
(r'\(\*', Comment.Multiline, '#push'),
|
| 351 |
+
(r'\*\)', Comment.Multiline, '#pop'),
|
| 352 |
+
(r'[(*)]', Comment.Multiline),
|
| 353 |
+
],
|
| 354 |
+
}
|
| 355 |
+
|
| 356 |
+
|
| 357 |
+
class OcamlLexer(RegexLexer):
|
| 358 |
+
"""
|
| 359 |
+
For the OCaml language.
|
| 360 |
+
|
| 361 |
+
.. versionadded:: 0.7
|
| 362 |
+
"""
|
| 363 |
+
|
| 364 |
+
name = 'OCaml'
|
| 365 |
+
aliases = ['ocaml']
|
| 366 |
+
filenames = ['*.ml', '*.mli', '*.mll', '*.mly']
|
| 367 |
+
mimetypes = ['text/x-ocaml']
|
| 368 |
+
|
| 369 |
+
keywords = (
|
| 370 |
+
'as', 'assert', 'begin', 'class', 'constraint', 'do', 'done',
|
| 371 |
+
'downto', 'else', 'end', 'exception', 'external', 'false',
|
| 372 |
+
'for', 'fun', 'function', 'functor', 'if', 'in', 'include',
|
| 373 |
+
'inherit', 'initializer', 'lazy', 'let', 'match', 'method',
|
| 374 |
+
'module', 'mutable', 'new', 'object', 'of', 'open', 'private',
|
| 375 |
+
'raise', 'rec', 'sig', 'struct', 'then', 'to', 'true', 'try',
|
| 376 |
+
'type', 'value', 'val', 'virtual', 'when', 'while', 'with',
|
| 377 |
+
)
|
| 378 |
+
keyopts = (
|
| 379 |
+
'!=', '#', '&', '&&', r'\(', r'\)', r'\*', r'\+', ',', '-',
|
| 380 |
+
r'-\.', '->', r'\.', r'\.\.', ':', '::', ':=', ':>', ';', ';;', '<',
|
| 381 |
+
'<-', '=', '>', '>]', r'>\}', r'\?', r'\?\?', r'\[', r'\[<', r'\[>',
|
| 382 |
+
r'\[\|', ']', '_', '`', r'\{', r'\{<', r'\|', r'\|]', r'\}', '~'
|
| 383 |
+
)
|
| 384 |
+
|
| 385 |
+
operators = r'[!$%&*+\./:<=>?@^|~-]'
|
| 386 |
+
word_operators = ('and', 'asr', 'land', 'lor', 'lsl', 'lxor', 'mod', 'or')
|
| 387 |
+
prefix_syms = r'[!?~]'
|
| 388 |
+
infix_syms = r'[=<>@^|&+\*/$%-]'
|
| 389 |
+
primitives = ('unit', 'int', 'float', 'bool', 'string', 'char', 'list', 'array')
|
| 390 |
+
|
| 391 |
+
tokens = {
|
| 392 |
+
'escape-sequence': [
|
| 393 |
+
(r'\\[\\"\'ntbr]', String.Escape),
|
| 394 |
+
(r'\\[0-9]{3}', String.Escape),
|
| 395 |
+
(r'\\x[0-9a-fA-F]{2}', String.Escape),
|
| 396 |
+
],
|
| 397 |
+
'root': [
|
| 398 |
+
(r'\s+', Text),
|
| 399 |
+
(r'false|true|\(\)|\[\]', Name.Builtin.Pseudo),
|
| 400 |
+
(r'\b([A-Z][\w\']*)(?=\s*\.)', Name.Namespace, 'dotted'),
|
| 401 |
+
(r'\b([A-Z][\w\']*)', Name.Class),
|
| 402 |
+
(r'\(\*(?![)])', Comment, 'comment'),
|
| 403 |
+
(r'\b(%s)\b' % '|'.join(keywords), Keyword),
|
| 404 |
+
(r'(%s)' % '|'.join(keyopts[::-1]), Operator),
|
| 405 |
+
(r'(%s|%s)?%s' % (infix_syms, prefix_syms, operators), Operator),
|
| 406 |
+
(r'\b(%s)\b' % '|'.join(word_operators), Operator.Word),
|
| 407 |
+
(r'\b(%s)\b' % '|'.join(primitives), Keyword.Type),
|
| 408 |
+
|
| 409 |
+
(r"[^\W\d][\w']*", Name),
|
| 410 |
+
|
| 411 |
+
(r'-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)', Number.Float),
|
| 412 |
+
(r'0[xX][\da-fA-F][\da-fA-F_]*', Number.Hex),
|
| 413 |
+
(r'0[oO][0-7][0-7_]*', Number.Oct),
|
| 414 |
+
(r'0[bB][01][01_]*', Number.Bin),
|
| 415 |
+
(r'\d[\d_]*', Number.Integer),
|
| 416 |
+
|
| 417 |
+
(r"'(?:(\\[\\\"'ntbr ])|(\\[0-9]{3})|(\\x[0-9a-fA-F]{2}))'",
|
| 418 |
+
String.Char),
|
| 419 |
+
(r"'.'", String.Char),
|
| 420 |
+
(r"'", Keyword), # a stray quote is another syntax element
|
| 421 |
+
|
| 422 |
+
(r'"', String.Double, 'string'),
|
| 423 |
+
|
| 424 |
+
(r'[~?][a-z][\w\']*:', Name.Variable),
|
| 425 |
+
],
|
| 426 |
+
'comment': [
|
| 427 |
+
(r'[^(*)]+', Comment),
|
| 428 |
+
(r'\(\*', Comment, '#push'),
|
| 429 |
+
(r'\*\)', Comment, '#pop'),
|
| 430 |
+
(r'[(*)]', Comment),
|
| 431 |
+
],
|
| 432 |
+
'string': [
|
| 433 |
+
(r'[^\\"]+', String.Double),
|
| 434 |
+
include('escape-sequence'),
|
| 435 |
+
(r'\\\n', String.Double),
|
| 436 |
+
(r'"', String.Double, '#pop'),
|
| 437 |
+
],
|
| 438 |
+
'dotted': [
|
| 439 |
+
(r'\s+', Text),
|
| 440 |
+
(r'\.', Punctuation),
|
| 441 |
+
(r'[A-Z][\w\']*(?=\s*\.)', Name.Namespace),
|
| 442 |
+
(r'[A-Z][\w\']*', Name.Class, '#pop'),
|
| 443 |
+
(r'[a-z_][\w\']*', Name, '#pop'),
|
| 444 |
+
default('#pop'),
|
| 445 |
+
],
|
| 446 |
+
}
|
| 447 |
+
|
| 448 |
+
|
| 449 |
+
class OpaLexer(RegexLexer):
|
| 450 |
+
"""
|
| 451 |
+
Lexer for the Opa language (http://opalang.org).
|
| 452 |
+
|
| 453 |
+
.. versionadded:: 1.5
|
| 454 |
+
"""
|
| 455 |
+
|
| 456 |
+
name = 'Opa'
|
| 457 |
+
aliases = ['opa']
|
| 458 |
+
filenames = ['*.opa']
|
| 459 |
+
mimetypes = ['text/x-opa']
|
| 460 |
+
|
| 461 |
+
# most of these aren't strictly keywords
|
| 462 |
+
# but if you color only real keywords, you might just
|
| 463 |
+
# as well not color anything
|
| 464 |
+
keywords = (
|
| 465 |
+
'and', 'as', 'begin', 'case', 'client', 'css', 'database', 'db', 'do',
|
| 466 |
+
'else', 'end', 'external', 'forall', 'function', 'if', 'import',
|
| 467 |
+
'match', 'module', 'or', 'package', 'parser', 'rec', 'server', 'then',
|
| 468 |
+
'type', 'val', 'with', 'xml_parser',
|
| 469 |
+
)
|
| 470 |
+
|
| 471 |
+
# matches both stuff and `stuff`
|
| 472 |
+
ident_re = r'(([a-zA-Z_]\w*)|(`[^`]*`))'
|
| 473 |
+
|
| 474 |
+
op_re = r'[.=\-<>,@~%/+?*&^!]'
|
| 475 |
+
punc_re = r'[()\[\],;|]' # '{' and '}' are treated elsewhere
|
| 476 |
+
# because they are also used for inserts
|
| 477 |
+
|
| 478 |
+
tokens = {
|
| 479 |
+
# copied from the caml lexer, should be adapted
|
| 480 |
+
'escape-sequence': [
|
| 481 |
+
(r'\\[\\"\'ntr}]', String.Escape),
|
| 482 |
+
(r'\\[0-9]{3}', String.Escape),
|
| 483 |
+
(r'\\x[0-9a-fA-F]{2}', String.Escape),
|
| 484 |
+
],
|
| 485 |
+
|
| 486 |
+
# factorizing these rules, because they are inserted many times
|
| 487 |
+
'comments': [
|
| 488 |
+
(r'/\*', Comment, 'nested-comment'),
|
| 489 |
+
(r'//.*?$', Comment),
|
| 490 |
+
],
|
| 491 |
+
'comments-and-spaces': [
|
| 492 |
+
include('comments'),
|
| 493 |
+
(r'\s+', Text),
|
| 494 |
+
],
|
| 495 |
+
|
| 496 |
+
'root': [
|
| 497 |
+
include('comments-and-spaces'),
|
| 498 |
+
# keywords
|
| 499 |
+
(words(keywords, prefix=r'\b', suffix=r'\b'), Keyword),
|
| 500 |
+
# directives
|
| 501 |
+
# we could parse the actual set of directives instead of anything
|
| 502 |
+
# starting with @, but this is troublesome
|
| 503 |
+
# because it needs to be adjusted all the time
|
| 504 |
+
# and assuming we parse only sources that compile, it is useless
|
| 505 |
+
(r'@' + ident_re + r'\b', Name.Builtin.Pseudo),
|
| 506 |
+
|
| 507 |
+
# number literals
|
| 508 |
+
(r'-?.[\d]+([eE][+\-]?\d+)', Number.Float),
|
| 509 |
+
(r'-?\d+.\d*([eE][+\-]?\d+)', Number.Float),
|
| 510 |
+
(r'-?\d+[eE][+\-]?\d+', Number.Float),
|
| 511 |
+
(r'0[xX][\da-fA-F]+', Number.Hex),
|
| 512 |
+
(r'0[oO][0-7]+', Number.Oct),
|
| 513 |
+
(r'0[bB][01]+', Number.Bin),
|
| 514 |
+
(r'\d+', Number.Integer),
|
| 515 |
+
# color literals
|
| 516 |
+
(r'#[\da-fA-F]{3,6}', Number.Integer),
|
| 517 |
+
|
| 518 |
+
# string literals
|
| 519 |
+
(r'"', String.Double, 'string'),
|
| 520 |
+
# char literal, should be checked because this is the regexp from
|
| 521 |
+
# the caml lexer
|
| 522 |
+
(r"'(?:(\\[\\\"'ntbr ])|(\\[0-9]{3})|(\\x[0-9a-fA-F]{2})|.)'",
|
| 523 |
+
String.Char),
|
| 524 |
+
|
| 525 |
+
# this is meant to deal with embedded exprs in strings
|
| 526 |
+
# every time we find a '}' we pop a state so that if we were
|
| 527 |
+
# inside a string, we are back in the string state
|
| 528 |
+
# as a consequence, we must also push a state every time we find a
|
| 529 |
+
# '{' or else we will have errors when parsing {} for instance
|
| 530 |
+
(r'\{', Operator, '#push'),
|
| 531 |
+
(r'\}', Operator, '#pop'),
|
| 532 |
+
|
| 533 |
+
# html literals
|
| 534 |
+
# this is a much more strict that the actual parser,
|
| 535 |
+
# since a<b would not be parsed as html
|
| 536 |
+
# but then again, the parser is way too lax, and we can't hope
|
| 537 |
+
# to have something as tolerant
|
| 538 |
+
(r'<(?=[a-zA-Z>])', String.Single, 'html-open-tag'),
|
| 539 |
+
|
| 540 |
+
# db path
|
| 541 |
+
# matching the '[_]' in '/a[_]' because it is a part
|
| 542 |
+
# of the syntax of the db path definition
|
| 543 |
+
# unfortunately, i don't know how to match the ']' in
|
| 544 |
+
# /a[1], so this is somewhat inconsistent
|
| 545 |
+
(r'[@?!]?(/\w+)+(\[_\])?', Name.Variable),
|
| 546 |
+
# putting the same color on <- as on db path, since
|
| 547 |
+
# it can be used only to mean Db.write
|
| 548 |
+
(r'<-(?!'+op_re+r')', Name.Variable),
|
| 549 |
+
|
| 550 |
+
# 'modules'
|
| 551 |
+
# although modules are not distinguished by their names as in caml
|
| 552 |
+
# the standard library seems to follow the convention that modules
|
| 553 |
+
# only area capitalized
|
| 554 |
+
(r'\b([A-Z]\w*)(?=\.)', Name.Namespace),
|
| 555 |
+
|
| 556 |
+
# operators
|
| 557 |
+
# = has a special role because this is the only
|
| 558 |
+
# way to syntactic distinguish binding constructions
|
| 559 |
+
# unfortunately, this colors the equal in {x=2} too
|
| 560 |
+
(r'=(?!'+op_re+r')', Keyword),
|
| 561 |
+
(r'(%s)+' % op_re, Operator),
|
| 562 |
+
(r'(%s)+' % punc_re, Operator),
|
| 563 |
+
|
| 564 |
+
# coercions
|
| 565 |
+
(r':', Operator, 'type'),
|
| 566 |
+
# type variables
|
| 567 |
+
# we need this rule because we don't parse specially type
|
| 568 |
+
# definitions so in "type t('a) = ...", "'a" is parsed by 'root'
|
| 569 |
+
("'"+ident_re, Keyword.Type),
|
| 570 |
+
|
| 571 |
+
# id literal, #something, or #{expr}
|
| 572 |
+
(r'#'+ident_re, String.Single),
|
| 573 |
+
(r'#(?=\{)', String.Single),
|
| 574 |
+
|
| 575 |
+
# identifiers
|
| 576 |
+
# this avoids to color '2' in 'a2' as an integer
|
| 577 |
+
(ident_re, Text),
|
| 578 |
+
|
| 579 |
+
# default, not sure if that is needed or not
|
| 580 |
+
# (r'.', Text),
|
| 581 |
+
],
|
| 582 |
+
|
| 583 |
+
# it is quite painful to have to parse types to know where they end
|
| 584 |
+
# this is the general rule for a type
|
| 585 |
+
# a type is either:
|
| 586 |
+
# * -> ty
|
| 587 |
+
# * type-with-slash
|
| 588 |
+
# * type-with-slash -> ty
|
| 589 |
+
# * type-with-slash (, type-with-slash)+ -> ty
|
| 590 |
+
#
|
| 591 |
+
# the code is pretty funky in here, but this code would roughly
|
| 592 |
+
# translate in caml to:
|
| 593 |
+
# let rec type stream =
|
| 594 |
+
# match stream with
|
| 595 |
+
# | [< "->"; stream >] -> type stream
|
| 596 |
+
# | [< ""; stream >] ->
|
| 597 |
+
# type_with_slash stream
|
| 598 |
+
# type_lhs_1 stream;
|
| 599 |
+
# and type_1 stream = ...
|
| 600 |
+
'type': [
|
| 601 |
+
include('comments-and-spaces'),
|
| 602 |
+
(r'->', Keyword.Type),
|
| 603 |
+
default(('#pop', 'type-lhs-1', 'type-with-slash')),
|
| 604 |
+
],
|
| 605 |
+
|
| 606 |
+
# parses all the atomic or closed constructions in the syntax of type
|
| 607 |
+
# expressions: record types, tuple types, type constructors, basic type
|
| 608 |
+
# and type variables
|
| 609 |
+
'type-1': [
|
| 610 |
+
include('comments-and-spaces'),
|
| 611 |
+
(r'\(', Keyword.Type, ('#pop', 'type-tuple')),
|
| 612 |
+
(r'~?\{', Keyword.Type, ('#pop', 'type-record')),
|
| 613 |
+
(ident_re+r'\(', Keyword.Type, ('#pop', 'type-tuple')),
|
| 614 |
+
(ident_re, Keyword.Type, '#pop'),
|
| 615 |
+
("'"+ident_re, Keyword.Type),
|
| 616 |
+
# this case is not in the syntax but sometimes
|
| 617 |
+
# we think we are parsing types when in fact we are parsing
|
| 618 |
+
# some css, so we just pop the states until we get back into
|
| 619 |
+
# the root state
|
| 620 |
+
default('#pop'),
|
| 621 |
+
],
|
| 622 |
+
|
| 623 |
+
# type-with-slash is either:
|
| 624 |
+
# * type-1
|
| 625 |
+
# * type-1 (/ type-1)+
|
| 626 |
+
'type-with-slash': [
|
| 627 |
+
include('comments-and-spaces'),
|
| 628 |
+
default(('#pop', 'slash-type-1', 'type-1')),
|
| 629 |
+
],
|
| 630 |
+
'slash-type-1': [
|
| 631 |
+
include('comments-and-spaces'),
|
| 632 |
+
('/', Keyword.Type, ('#pop', 'type-1')),
|
| 633 |
+
# same remark as above
|
| 634 |
+
default('#pop'),
|
| 635 |
+
],
|
| 636 |
+
|
| 637 |
+
# we go in this state after having parsed a type-with-slash
|
| 638 |
+
# while trying to parse a type
|
| 639 |
+
# and at this point we must determine if we are parsing an arrow
|
| 640 |
+
# type (in which case we must continue parsing) or not (in which
|
| 641 |
+
# case we stop)
|
| 642 |
+
'type-lhs-1': [
|
| 643 |
+
include('comments-and-spaces'),
|
| 644 |
+
(r'->', Keyword.Type, ('#pop', 'type')),
|
| 645 |
+
(r'(?=,)', Keyword.Type, ('#pop', 'type-arrow')),
|
| 646 |
+
default('#pop'),
|
| 647 |
+
],
|
| 648 |
+
'type-arrow': [
|
| 649 |
+
include('comments-and-spaces'),
|
| 650 |
+
# the look ahead here allows to parse f(x : int, y : float -> truc)
|
| 651 |
+
# correctly
|
| 652 |
+
(r',(?=[^:]*?->)', Keyword.Type, 'type-with-slash'),
|
| 653 |
+
(r'->', Keyword.Type, ('#pop', 'type')),
|
| 654 |
+
# same remark as above
|
| 655 |
+
default('#pop'),
|
| 656 |
+
],
|
| 657 |
+
|
| 658 |
+
# no need to do precise parsing for tuples and records
|
| 659 |
+
# because they are closed constructions, so we can simply
|
| 660 |
+
# find the closing delimiter
|
| 661 |
+
# note that this function would be not work if the source
|
| 662 |
+
# contained identifiers like `{)` (although it could be patched
|
| 663 |
+
# to support it)
|
| 664 |
+
'type-tuple': [
|
| 665 |
+
include('comments-and-spaces'),
|
| 666 |
+
(r'[^()/*]+', Keyword.Type),
|
| 667 |
+
(r'[/*]', Keyword.Type),
|
| 668 |
+
(r'\(', Keyword.Type, '#push'),
|
| 669 |
+
(r'\)', Keyword.Type, '#pop'),
|
| 670 |
+
],
|
| 671 |
+
'type-record': [
|
| 672 |
+
include('comments-and-spaces'),
|
| 673 |
+
(r'[^{}/*]+', Keyword.Type),
|
| 674 |
+
(r'[/*]', Keyword.Type),
|
| 675 |
+
(r'\{', Keyword.Type, '#push'),
|
| 676 |
+
(r'\}', Keyword.Type, '#pop'),
|
| 677 |
+
],
|
| 678 |
+
|
| 679 |
+
# 'type-tuple': [
|
| 680 |
+
# include('comments-and-spaces'),
|
| 681 |
+
# (r'\)', Keyword.Type, '#pop'),
|
| 682 |
+
# default(('#pop', 'type-tuple-1', 'type-1')),
|
| 683 |
+
# ],
|
| 684 |
+
# 'type-tuple-1': [
|
| 685 |
+
# include('comments-and-spaces'),
|
| 686 |
+
# (r',?\s*\)', Keyword.Type, '#pop'), # ,) is a valid end of tuple, in (1,)
|
| 687 |
+
# (r',', Keyword.Type, 'type-1'),
|
| 688 |
+
# ],
|
| 689 |
+
# 'type-record':[
|
| 690 |
+
# include('comments-and-spaces'),
|
| 691 |
+
# (r'\}', Keyword.Type, '#pop'),
|
| 692 |
+
# (r'~?(?:\w+|`[^`]*`)', Keyword.Type, 'type-record-field-expr'),
|
| 693 |
+
# ],
|
| 694 |
+
# 'type-record-field-expr': [
|
| 695 |
+
#
|
| 696 |
+
# ],
|
| 697 |
+
|
| 698 |
+
'nested-comment': [
|
| 699 |
+
(r'[^/*]+', Comment),
|
| 700 |
+
(r'/\*', Comment, '#push'),
|
| 701 |
+
(r'\*/', Comment, '#pop'),
|
| 702 |
+
(r'[/*]', Comment),
|
| 703 |
+
],
|
| 704 |
+
|
| 705 |
+
# the copy pasting between string and single-string
|
| 706 |
+
# is kinda sad. Is there a way to avoid that??
|
| 707 |
+
'string': [
|
| 708 |
+
(r'[^\\"{]+', String.Double),
|
| 709 |
+
(r'"', String.Double, '#pop'),
|
| 710 |
+
(r'\{', Operator, 'root'),
|
| 711 |
+
include('escape-sequence'),
|
| 712 |
+
],
|
| 713 |
+
'single-string': [
|
| 714 |
+
(r'[^\\\'{]+', String.Double),
|
| 715 |
+
(r'\'', String.Double, '#pop'),
|
| 716 |
+
(r'\{', Operator, 'root'),
|
| 717 |
+
include('escape-sequence'),
|
| 718 |
+
],
|
| 719 |
+
|
| 720 |
+
# all the html stuff
|
| 721 |
+
# can't really reuse some existing html parser
|
| 722 |
+
# because we must be able to parse embedded expressions
|
| 723 |
+
|
| 724 |
+
# we are in this state after someone parsed the '<' that
|
| 725 |
+
# started the html literal
|
| 726 |
+
'html-open-tag': [
|
| 727 |
+
(r'[\w\-:]+', String.Single, ('#pop', 'html-attr')),
|
| 728 |
+
(r'>', String.Single, ('#pop', 'html-content')),
|
| 729 |
+
],
|
| 730 |
+
|
| 731 |
+
# we are in this state after someone parsed the '</' that
|
| 732 |
+
# started the end of the closing tag
|
| 733 |
+
'html-end-tag': [
|
| 734 |
+
# this is a star, because </> is allowed
|
| 735 |
+
(r'[\w\-:]*>', String.Single, '#pop'),
|
| 736 |
+
],
|
| 737 |
+
|
| 738 |
+
# we are in this state after having parsed '<ident(:ident)?'
|
| 739 |
+
# we thus parse a possibly empty list of attributes
|
| 740 |
+
'html-attr': [
|
| 741 |
+
(r'\s+', Text),
|
| 742 |
+
(r'[\w\-:]+=', String.Single, 'html-attr-value'),
|
| 743 |
+
(r'/>', String.Single, '#pop'),
|
| 744 |
+
(r'>', String.Single, ('#pop', 'html-content')),
|
| 745 |
+
],
|
| 746 |
+
|
| 747 |
+
'html-attr-value': [
|
| 748 |
+
(r"'", String.Single, ('#pop', 'single-string')),
|
| 749 |
+
(r'"', String.Single, ('#pop', 'string')),
|
| 750 |
+
(r'#'+ident_re, String.Single, '#pop'),
|
| 751 |
+
(r'#(?=\{)', String.Single, ('#pop', 'root')),
|
| 752 |
+
(r'[^"\'{`=<>]+', String.Single, '#pop'),
|
| 753 |
+
(r'\{', Operator, ('#pop', 'root')), # this is a tail call!
|
| 754 |
+
],
|
| 755 |
+
|
| 756 |
+
# we should probably deal with '\' escapes here
|
| 757 |
+
'html-content': [
|
| 758 |
+
(r'<!--', Comment, 'html-comment'),
|
| 759 |
+
(r'</', String.Single, ('#pop', 'html-end-tag')),
|
| 760 |
+
(r'<', String.Single, 'html-open-tag'),
|
| 761 |
+
(r'\{', Operator, 'root'),
|
| 762 |
+
(r'[^<{]+', String.Single),
|
| 763 |
+
],
|
| 764 |
+
|
| 765 |
+
'html-comment': [
|
| 766 |
+
(r'-->',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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.monte
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexer for the Monte programming language.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
from pygments.token import Comment, Error, Keyword, Name, Number, Operator, \
|
| 13 |
+
Punctuation, String, Whitespace
|
| 14 |
+
from pygments.lexer import RegexLexer, include, words
|
| 15 |
+
|
| 16 |
+
__all__ = ['MonteLexer']
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
# `var` handled separately
|
| 20 |
+
# `interface` handled separately
|
| 21 |
+
_declarations = ['bind', 'def', 'fn', 'object']
|
| 22 |
+
_methods = ['method', 'to']
|
| 23 |
+
_keywords = [
|
| 24 |
+
'as', 'break', 'catch', 'continue', 'else', 'escape', 'exit', 'exports',
|
| 25 |
+
'extends', 'finally', 'for', 'guards', 'if', 'implements', 'import',
|
| 26 |
+
'in', 'match', 'meta', 'pass', 'return', 'switch', 'try', 'via', 'when',
|
| 27 |
+
'while',
|
| 28 |
+
]
|
| 29 |
+
_operators = [
|
| 30 |
+
# Unary
|
| 31 |
+
'~', '!',
|
| 32 |
+
# Binary
|
| 33 |
+
'+', '-', '*', '/', '%', '**', '&', '|', '^', '<<', '>>',
|
| 34 |
+
# Binary augmented
|
| 35 |
+
'+=', '-=', '*=', '/=', '%=', '**=', '&=', '|=', '^=', '<<=', '>>=',
|
| 36 |
+
# Comparison
|
| 37 |
+
'==', '!=', '<', '<=', '>', '>=', '<=>',
|
| 38 |
+
# Patterns and assignment
|
| 39 |
+
':=', '?', '=~', '!~', '=>',
|
| 40 |
+
# Calls and sends
|
| 41 |
+
'.', '<-', '->',
|
| 42 |
+
]
|
| 43 |
+
_escape_pattern = (
|
| 44 |
+
r'(?:\\x[0-9a-fA-F]{2}|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}|'
|
| 45 |
+
r'\\["\'\\bftnr])')
|
| 46 |
+
# _char = _escape_chars + [('.', String.Char)]
|
| 47 |
+
_identifier = r'[_a-zA-Z]\w*'
|
| 48 |
+
|
| 49 |
+
_constants = [
|
| 50 |
+
# Void constants
|
| 51 |
+
'null',
|
| 52 |
+
# Bool constants
|
| 53 |
+
'false', 'true',
|
| 54 |
+
# Double constants
|
| 55 |
+
'Infinity', 'NaN',
|
| 56 |
+
# Special objects
|
| 57 |
+
'M', 'Ref', 'throw', 'traceln',
|
| 58 |
+
]
|
| 59 |
+
|
| 60 |
+
_guards = [
|
| 61 |
+
'Any', 'Binding', 'Bool', 'Bytes', 'Char', 'DeepFrozen', 'Double',
|
| 62 |
+
'Empty', 'Int', 'List', 'Map', 'Near', 'NullOk', 'Same', 'Selfless',
|
| 63 |
+
'Set', 'Str', 'SubrangeGuard', 'Transparent', 'Void',
|
| 64 |
+
]
|
| 65 |
+
|
| 66 |
+
_safeScope = [
|
| 67 |
+
'_accumulateList', '_accumulateMap', '_auditedBy', '_bind',
|
| 68 |
+
'_booleanFlow', '_comparer', '_equalizer', '_iterForever', '_loop',
|
| 69 |
+
'_makeBytes', '_makeDouble', '_makeFinalSlot', '_makeInt', '_makeList',
|
| 70 |
+
'_makeMap', '_makeMessageDesc', '_makeOrderedSpace', '_makeParamDesc',
|
| 71 |
+
'_makeProtocolDesc', '_makeSourceSpan', '_makeString', '_makeVarSlot',
|
| 72 |
+
'_makeVerbFacet', '_mapExtract', '_matchSame', '_quasiMatcher',
|
| 73 |
+
'_slotToBinding', '_splitList', '_suchThat', '_switchFailed',
|
| 74 |
+
'_validateFor', 'b__quasiParser', 'eval', 'import', 'm__quasiParser',
|
| 75 |
+
'makeBrandPair', 'makeLazySlot', 'safeScope', 'simple__quasiParser',
|
| 76 |
+
]
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
class MonteLexer(RegexLexer):
|
| 80 |
+
"""
|
| 81 |
+
Lexer for the `Monte <https://monte.readthedocs.io/>`_ programming language.
|
| 82 |
+
|
| 83 |
+
.. versionadded:: 2.2
|
| 84 |
+
"""
|
| 85 |
+
name = 'Monte'
|
| 86 |
+
aliases = ['monte']
|
| 87 |
+
filenames = ['*.mt']
|
| 88 |
+
|
| 89 |
+
tokens = {
|
| 90 |
+
'root': [
|
| 91 |
+
# Comments
|
| 92 |
+
(r'#[^\n]*\n', Comment),
|
| 93 |
+
|
| 94 |
+
# Docstrings
|
| 95 |
+
# Apologies for the non-greedy matcher here.
|
| 96 |
+
(r'/\*\*.*?\*/', String.Doc),
|
| 97 |
+
|
| 98 |
+
# `var` declarations
|
| 99 |
+
(r'\bvar\b', Keyword.Declaration, 'var'),
|
| 100 |
+
|
| 101 |
+
# `interface` declarations
|
| 102 |
+
(r'\binterface\b', Keyword.Declaration, 'interface'),
|
| 103 |
+
|
| 104 |
+
# method declarations
|
| 105 |
+
(words(_methods, prefix='\\b', suffix='\\b'),
|
| 106 |
+
Keyword, 'method'),
|
| 107 |
+
|
| 108 |
+
# All other declarations
|
| 109 |
+
(words(_declarations, prefix='\\b', suffix='\\b'),
|
| 110 |
+
Keyword.Declaration),
|
| 111 |
+
|
| 112 |
+
# Keywords
|
| 113 |
+
(words(_keywords, prefix='\\b', suffix='\\b'), Keyword),
|
| 114 |
+
|
| 115 |
+
# Literals
|
| 116 |
+
('[+-]?0x[_0-9a-fA-F]+', Number.Hex),
|
| 117 |
+
(r'[+-]?[_0-9]+\.[_0-9]*([eE][+-]?[_0-9]+)?', Number.Float),
|
| 118 |
+
('[+-]?[_0-9]+', Number.Integer),
|
| 119 |
+
("'", String.Double, 'char'),
|
| 120 |
+
('"', String.Double, 'string'),
|
| 121 |
+
|
| 122 |
+
# Quasiliterals
|
| 123 |
+
('`', String.Backtick, 'ql'),
|
| 124 |
+
|
| 125 |
+
# Operators
|
| 126 |
+
(words(_operators), Operator),
|
| 127 |
+
|
| 128 |
+
# Verb operators
|
| 129 |
+
(_identifier + '=', Operator.Word),
|
| 130 |
+
|
| 131 |
+
# Safe scope constants
|
| 132 |
+
(words(_constants, prefix='\\b', suffix='\\b'),
|
| 133 |
+
Keyword.Pseudo),
|
| 134 |
+
|
| 135 |
+
# Safe scope guards
|
| 136 |
+
(words(_guards, prefix='\\b', suffix='\\b'), Keyword.Type),
|
| 137 |
+
|
| 138 |
+
# All other safe scope names
|
| 139 |
+
(words(_safeScope, prefix='\\b', suffix='\\b'),
|
| 140 |
+
Name.Builtin),
|
| 141 |
+
|
| 142 |
+
# Identifiers
|
| 143 |
+
(_identifier, Name),
|
| 144 |
+
|
| 145 |
+
# Punctuation
|
| 146 |
+
(r'\(|\)|\{|\}|\[|\]|:|,', Punctuation),
|
| 147 |
+
|
| 148 |
+
# Whitespace
|
| 149 |
+
(' +', Whitespace),
|
| 150 |
+
|
| 151 |
+
# Definite lexer errors
|
| 152 |
+
('=', Error),
|
| 153 |
+
],
|
| 154 |
+
'char': [
|
| 155 |
+
# It is definitely an error to have a char of width == 0.
|
| 156 |
+
("'", Error, 'root'),
|
| 157 |
+
(_escape_pattern, String.Escape, 'charEnd'),
|
| 158 |
+
('.', String.Char, 'charEnd'),
|
| 159 |
+
],
|
| 160 |
+
'charEnd': [
|
| 161 |
+
("'", String.Char, '#pop:2'),
|
| 162 |
+
# It is definitely an error to have a char of width > 1.
|
| 163 |
+
('.', Error),
|
| 164 |
+
],
|
| 165 |
+
# The state of things coming into an interface.
|
| 166 |
+
'interface': [
|
| 167 |
+
(' +', Whitespace),
|
| 168 |
+
(_identifier, Name.Class, '#pop'),
|
| 169 |
+
include('root'),
|
| 170 |
+
],
|
| 171 |
+
# The state of things coming into a method.
|
| 172 |
+
'method': [
|
| 173 |
+
(' +', Whitespace),
|
| 174 |
+
(_identifier, Name.Function, '#pop'),
|
| 175 |
+
include('root'),
|
| 176 |
+
],
|
| 177 |
+
'string': [
|
| 178 |
+
('"', String.Double, 'root'),
|
| 179 |
+
(_escape_pattern, String.Escape),
|
| 180 |
+
(r'\n', String.Double),
|
| 181 |
+
('.', String.Double),
|
| 182 |
+
],
|
| 183 |
+
'ql': [
|
| 184 |
+
('`', String.Backtick, 'root'),
|
| 185 |
+
(r'\$' + _escape_pattern, String.Escape),
|
| 186 |
+
(r'\$\$', String.Escape),
|
| 187 |
+
(r'@@', String.Escape),
|
| 188 |
+
(r'\$\{', String.Interpol, 'qlNest'),
|
| 189 |
+
(r'@\{', String.Interpol, 'qlNest'),
|
| 190 |
+
(r'\$' + _identifier, Name),
|
| 191 |
+
('@' + _identifier, Name),
|
| 192 |
+
('.', String.Backtick),
|
| 193 |
+
],
|
| 194 |
+
'qlNest': [
|
| 195 |
+
(r'\}', String.Interpol, '#pop'),
|
| 196 |
+
include('root'),
|
| 197 |
+
],
|
| 198 |
+
# The state of things immediately following `var`.
|
| 199 |
+
'var': [
|
| 200 |
+
(' +', Whitespace),
|
| 201 |
+
(_identifier, Name.Variable, '#pop'),
|
| 202 |
+
include('root'),
|
| 203 |
+
],
|
| 204 |
+
}
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/ncl.py
ADDED
|
@@ -0,0 +1,894 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.ncl
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexers for NCAR Command Language.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 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, words
|
| 15 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 16 |
+
Number, Punctuation
|
| 17 |
+
|
| 18 |
+
__all__ = ['NCLLexer']
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
class NCLLexer(RegexLexer):
|
| 22 |
+
"""
|
| 23 |
+
Lexer for NCL code.
|
| 24 |
+
|
| 25 |
+
.. versionadded:: 2.2
|
| 26 |
+
"""
|
| 27 |
+
name = 'NCL'
|
| 28 |
+
aliases = ['ncl']
|
| 29 |
+
filenames = ['*.ncl']
|
| 30 |
+
mimetypes = ['text/ncl']
|
| 31 |
+
flags = re.MULTILINE
|
| 32 |
+
|
| 33 |
+
tokens = {
|
| 34 |
+
'root': [
|
| 35 |
+
(r';.*\n', Comment),
|
| 36 |
+
include('strings'),
|
| 37 |
+
include('core'),
|
| 38 |
+
(r'[a-zA-Z_]\w*', Name),
|
| 39 |
+
include('nums'),
|
| 40 |
+
(r'[\s]+', Text),
|
| 41 |
+
],
|
| 42 |
+
'core': [
|
| 43 |
+
# Statements
|
| 44 |
+
(words((
|
| 45 |
+
'begin', 'break', 'continue', 'create', 'defaultapp', 'do',
|
| 46 |
+
'else', 'end', 'external', 'exit', 'True', 'False', 'file', 'function',
|
| 47 |
+
'getvalues', 'graphic', 'group', 'if', 'list', 'load', 'local',
|
| 48 |
+
'new', '_Missing', 'Missing', 'noparent', 'procedure',
|
| 49 |
+
'quit', 'QUIT', 'Quit', 'record', 'return', 'setvalues', 'stop',
|
| 50 |
+
'then', 'while'), prefix=r'\b', suffix=r'\s*\b'),
|
| 51 |
+
Keyword),
|
| 52 |
+
|
| 53 |
+
# Data Types
|
| 54 |
+
(words((
|
| 55 |
+
'ubyte', 'uint', 'uint64', 'ulong', 'string', 'byte',
|
| 56 |
+
'character', 'double', 'float', 'integer', 'int64', 'logical',
|
| 57 |
+
'long', 'short', 'ushort', 'enumeric', 'numeric', 'snumeric'),
|
| 58 |
+
prefix=r'\b', suffix=r'\s*\b'),
|
| 59 |
+
Keyword.Type),
|
| 60 |
+
|
| 61 |
+
# Operators
|
| 62 |
+
(r'[\%^*+\-/<>]', Operator),
|
| 63 |
+
|
| 64 |
+
# punctuation:
|
| 65 |
+
(r'[\[\]():@$!&|.,\\{}]', Punctuation),
|
| 66 |
+
(r'[=:]', Punctuation),
|
| 67 |
+
|
| 68 |
+
# Intrinsics
|
| 69 |
+
(words((
|
| 70 |
+
'abs', 'acos', 'addfile', 'addfiles', 'all', 'angmom_atm', 'any',
|
| 71 |
+
'area_conserve_remap', 'area_hi2lores', 'area_poly_sphere',
|
| 72 |
+
'asciiread', 'asciiwrite', 'asin', 'atan', 'atan2', 'attsetvalues',
|
| 73 |
+
'avg', 'betainc', 'bin_avg', 'bin_sum', 'bw_bandpass_filter',
|
| 74 |
+
'cancor', 'cbinread', 'cbinwrite', 'cd_calendar', 'cd_inv_calendar',
|
| 75 |
+
'cdfbin_p', 'cdfbin_pr', 'cdfbin_s', 'cdfbin_xn', 'cdfchi_p',
|
| 76 |
+
'cdfchi_x', 'cdfgam_p', 'cdfgam_x', 'cdfnor_p', 'cdfnor_x',
|
| 77 |
+
'cdft_p', 'cdft_t', 'ceil', 'center_finite_diff',
|
| 78 |
+
'center_finite_diff_n', 'cfftb', 'cfftf', 'cfftf_frq_reorder',
|
| 79 |
+
'charactertodouble', 'charactertofloat', 'charactertointeger',
|
| 80 |
+
'charactertolong', 'charactertoshort', 'charactertostring',
|
| 81 |
+
'chartodouble', 'chartofloat', 'chartoint', 'chartointeger',
|
| 82 |
+
'chartolong', 'chartoshort', 'chartostring', 'chiinv', 'clear',
|
| 83 |
+
'color_index_to_rgba', 'conform', 'conform_dims', 'cos', 'cosh',
|
| 84 |
+
'count_unique_values', 'covcorm', 'covcorm_xy', 'craybinnumrec',
|
| 85 |
+
'craybinrecread', 'create_graphic', 'csa1', 'csa1d', 'csa1s',
|
| 86 |
+
'csa1x', 'csa1xd', 'csa1xs', 'csa2', 'csa2d', 'csa2l', 'csa2ld',
|
| 87 |
+
'csa2ls', 'csa2lx', 'csa2lxd', 'csa2lxs', 'csa2s', 'csa2x',
|
| 88 |
+
'csa2xd', 'csa2xs', 'csa3', 'csa3d', 'csa3l', 'csa3ld', 'csa3ls',
|
| 89 |
+
'csa3lx', 'csa3lxd', 'csa3lxs', 'csa3s', 'csa3x', 'csa3xd',
|
| 90 |
+
'csa3xs', 'csc2s', 'csgetp', 'css2c', 'cssetp', 'cssgrid', 'csstri',
|
| 91 |
+
'csvoro', 'cumsum', 'cz2ccm', 'datatondc', 'day_of_week',
|
| 92 |
+
'day_of_year', 'days_in_month', 'default_fillvalue', 'delete',
|
| 93 |
+
'depth_to_pres', 'destroy', 'determinant', 'dewtemp_trh',
|
| 94 |
+
'dgeevx_lapack', 'dim_acumrun_n', 'dim_avg', 'dim_avg_n',
|
| 95 |
+
'dim_avg_wgt', 'dim_avg_wgt_n', 'dim_cumsum', 'dim_cumsum_n',
|
| 96 |
+
'dim_gamfit_n', 'dim_gbits', 'dim_max', 'dim_max_n', 'dim_median',
|
| 97 |
+
'dim_median_n', 'dim_min', 'dim_min_n', 'dim_num', 'dim_num_n',
|
| 98 |
+
'dim_numrun_n', 'dim_pqsort', 'dim_pqsort_n', 'dim_product',
|
| 99 |
+
'dim_product_n', 'dim_rmsd', 'dim_rmsd_n', 'dim_rmvmean',
|
| 100 |
+
'dim_rmvmean_n', 'dim_rmvmed', 'dim_rmvmed_n', 'dim_spi_n',
|
| 101 |
+
'dim_standardize', 'dim_standardize_n', 'dim_stat4', 'dim_stat4_n',
|
| 102 |
+
'dim_stddev', 'dim_stddev_n', 'dim_sum', 'dim_sum_n', 'dim_sum_wgt',
|
| 103 |
+
'dim_sum_wgt_n', 'dim_variance', 'dim_variance_n', 'dimsizes',
|
| 104 |
+
'doubletobyte', 'doubletochar', 'doubletocharacter',
|
| 105 |
+
'doubletofloat', 'doubletoint', 'doubletointeger', 'doubletolong',
|
| 106 |
+
'doubletoshort', 'dpres_hybrid_ccm', 'dpres_plevel', 'draw',
|
| 107 |
+
'draw_color_palette', 'dsgetp', 'dsgrid2', 'dsgrid2d', 'dsgrid2s',
|
| 108 |
+
'dsgrid3', 'dsgrid3d', 'dsgrid3s', 'dspnt2', 'dspnt2d', 'dspnt2s',
|
| 109 |
+
'dspnt3', 'dspnt3d', 'dspnt3s', 'dssetp', 'dtrend', 'dtrend_msg',
|
| 110 |
+
'dtrend_msg_n', 'dtrend_n', 'dtrend_quadratic',
|
| 111 |
+
'dtrend_quadratic_msg_n', 'dv2uvf', 'dv2uvg', 'dz_height',
|
| 112 |
+
'echo_off', 'echo_on', 'eof2data', 'eof_varimax', 'eofcor',
|
| 113 |
+
'eofcor_pcmsg', 'eofcor_ts', 'eofcov', 'eofcov_pcmsg', 'eofcov_ts',
|
| 114 |
+
'eofunc', 'eofunc_ts', 'eofunc_varimax', 'equiv_sample_size', 'erf',
|
| 115 |
+
'erfc', 'esacr', 'esacv', 'esccr', 'esccv', 'escorc', 'escorc_n',
|
| 116 |
+
'escovc', 'exit', 'exp', 'exp_tapersh', 'exp_tapersh_wgts',
|
| 117 |
+
'exp_tapershC', 'ezfftb', 'ezfftb_n', 'ezfftf', 'ezfftf_n',
|
| 118 |
+
'f2fosh', 'f2foshv', 'f2fsh', 'f2fshv', 'f2gsh', 'f2gshv', 'fabs',
|
| 119 |
+
'fbindirread', 'fbindirwrite', 'fbinnumrec', 'fbinread',
|
| 120 |
+
'fbinrecread', 'fbinrecwrite', 'fbinwrite', 'fft2db', 'fft2df',
|
| 121 |
+
'fftshift', 'fileattdef', 'filechunkdimdef', 'filedimdef',
|
| 122 |
+
'fileexists', 'filegrpdef', 'filevarattdef', 'filevarchunkdef',
|
| 123 |
+
'filevarcompressleveldef', 'filevardef', 'filevardimsizes',
|
| 124 |
+
'filwgts_lancos', 'filwgts_lanczos', 'filwgts_normal',
|
| 125 |
+
'floattobyte', 'floattochar', 'floattocharacter', 'floattoint',
|
| 126 |
+
'floattointeger', 'floattolong', 'floattoshort', 'floor',
|
| 127 |
+
'fluxEddy', 'fo2fsh', 'fo2fshv', 'fourier_info', 'frame', 'fspan',
|
| 128 |
+
'ftcurv', 'ftcurvd', 'ftcurvi', 'ftcurvp', 'ftcurvpi', 'ftcurvps',
|
| 129 |
+
'ftcurvs', 'ftest', 'ftgetp', 'ftkurv', 'ftkurvd', 'ftkurvp',
|
| 130 |
+
'ftkurvpd', 'ftsetp', 'ftsurf', 'g2fsh', 'g2fshv', 'g2gsh',
|
| 131 |
+
'g2gshv', 'gamma', 'gammainc', 'gaus', 'gaus_lobat',
|
| 132 |
+
'gaus_lobat_wgt', 'gc_aangle', 'gc_clkwise', 'gc_dangle',
|
| 133 |
+
'gc_inout', 'gc_latlon', 'gc_onarc', 'gc_pnt2gc', 'gc_qarea',
|
| 134 |
+
'gc_tarea', 'generate_2d_array', 'get_color_index',
|
| 135 |
+
'get_color_rgba', 'get_cpu_time', 'get_isolines', 'get_ncl_version',
|
| 136 |
+
'get_script_name', 'get_script_prefix_name', 'get_sphere_radius',
|
| 137 |
+
'get_unique_values', 'getbitsone', 'getenv', 'getfiledimsizes',
|
| 138 |
+
'getfilegrpnames', 'getfilepath', 'getfilevaratts',
|
| 139 |
+
'getfilevarchunkdimsizes', 'getfilevardims', 'getfilevardimsizes',
|
| 140 |
+
'getfilevarnames', 'getfilevartypes', 'getvaratts', 'getvardims',
|
| 141 |
+
'gradsf', 'gradsg', 'greg2jul', 'grid2triple', 'hlsrgb', 'hsvrgb',
|
| 142 |
+
'hydro', 'hyi2hyo', 'idsfft', 'igradsf', 'igradsg', 'ilapsf',
|
| 143 |
+
'ilapsg', 'ilapvf', 'ilapvg', 'ind', 'ind_resolve', 'int2p',
|
| 144 |
+
'int2p_n', 'integertobyte', 'integertochar', 'integertocharacter',
|
| 145 |
+
'integertoshort', 'inttobyte', 'inttochar', 'inttoshort',
|
| 146 |
+
'inverse_matrix', 'isatt', 'isbigendian', 'isbyte', 'ischar',
|
| 147 |
+
'iscoord', 'isdefined', 'isdim', 'isdimnamed', 'isdouble',
|
| 148 |
+
'isenumeric', 'isfile', 'isfilepresent', 'isfilevar',
|
| 149 |
+
'isfilevaratt', 'isfilevarcoord', 'isfilevardim', 'isfloat',
|
| 150 |
+
'isfunc', 'isgraphic', 'isint', 'isint64', 'isinteger',
|
| 151 |
+
'isleapyear', 'islogical', 'islong', 'ismissing', 'isnan_ieee',
|
| 152 |
+
'isnumeric', 'ispan', 'isproc', 'isshort', 'issnumeric', 'isstring',
|
| 153 |
+
'isubyte', 'isuint', 'isuint64', 'isulong', 'isunlimited',
|
| 154 |
+
'isunsigned', 'isushort', 'isvar', 'jul2greg', 'kmeans_as136',
|
| 155 |
+
'kolsm2_n', 'kron_product', 'lapsf', 'lapsg', 'lapvf', 'lapvg',
|
| 156 |
+
'latlon2utm', 'lclvl', 'lderuvf', 'lderuvg', 'linint1', 'linint1_n',
|
| 157 |
+
'linint2', 'linint2_points', 'linmsg', 'linmsg_n', 'linrood_latwgt',
|
| 158 |
+
'linrood_wgt', 'list_files', 'list_filevars', 'list_hlus',
|
| 159 |
+
'list_procfuncs', 'list_vars', 'ListAppend', 'ListCount',
|
| 160 |
+
'ListGetType', 'ListIndex', 'ListIndexFromName', 'ListPop',
|
| 161 |
+
'ListPush', 'ListSetType', 'loadscript', 'local_max', 'local_min',
|
| 162 |
+
'log', 'log10', 'longtobyte', 'longtochar', 'longtocharacter',
|
| 163 |
+
'longtoint', 'longtointeger', 'longtoshort', 'lspoly', 'lspoly_n',
|
| 164 |
+
'mask', 'max', 'maxind', 'min', 'minind', 'mixed_layer_depth',
|
| 165 |
+
'mixhum_ptd', 'mixhum_ptrh', 'mjo_cross_coh2pha',
|
| 166 |
+
'mjo_cross_segment', 'moc_globe_atl', 'monthday', 'natgrid',
|
| 167 |
+
'natgridd', 'natgrids', 'ncargpath', 'ncargversion', 'ndctodata',
|
| 168 |
+
'ndtooned', 'new', 'NewList', 'ngezlogo', 'nggcog', 'nggetp',
|
| 169 |
+
'nglogo', 'ngsetp', 'NhlAddAnnotation', 'NhlAddData',
|
| 170 |
+
'NhlAddOverlay', 'NhlAddPrimitive', 'NhlAppGetDefaultParentId',
|
| 171 |
+
'NhlChangeWorkstation', 'NhlClassName', 'NhlClearWorkstation',
|
| 172 |
+
'NhlDataPolygon', 'NhlDataPolyline', 'NhlDataPolymarker',
|
| 173 |
+
'NhlDataToNDC', 'NhlDestroy', 'NhlDraw', 'NhlFrame', 'NhlFreeColor',
|
| 174 |
+
'NhlGetBB', 'NhlGetClassResources', 'NhlGetErrorObjectId',
|
| 175 |
+
'NhlGetNamedColorIndex', 'NhlGetParentId',
|
| 176 |
+
'NhlGetParentWorkstation', 'NhlGetWorkspaceObjectId',
|
| 177 |
+
'NhlIsAllocatedColor', 'NhlIsApp', 'NhlIsDataComm', 'NhlIsDataItem',
|
| 178 |
+
'NhlIsDataSpec', 'NhlIsTransform', 'NhlIsView', 'NhlIsWorkstation',
|
| 179 |
+
'NhlName', 'NhlNDCPolygon', 'NhlNDCPolyline', 'NhlNDCPolymarker',
|
| 180 |
+
'NhlNDCToData', 'NhlNewColor', 'NhlNewDashPattern', 'NhlNewMarker',
|
| 181 |
+
'NhlPalGetDefined', 'NhlRemoveAnnotation', 'NhlRemoveData',
|
| 182 |
+
'NhlRemoveOverlay', 'NhlRemovePrimitive', 'NhlSetColor',
|
| 183 |
+
'NhlSetDashPattern', 'NhlSetMarker', 'NhlUpdateData',
|
| 184 |
+
'NhlUpdateWorkstation', 'nice_mnmxintvl', 'nngetaspectd',
|
| 185 |
+
'nngetaspects', 'nngetp', 'nngetsloped', 'nngetslopes', 'nngetwts',
|
| 186 |
+
'nngetwtsd', 'nnpnt', 'nnpntd', 'nnpntend', 'nnpntendd',
|
| 187 |
+
'nnpntinit', 'nnpntinitd', 'nnpntinits', 'nnpnts', 'nnsetp', 'num',
|
| 188 |
+
'obj_anal_ic', 'omega_ccm', 'onedtond', 'overlay', 'paleo_outline',
|
| 189 |
+
'pdfxy_bin', 'poisson_grid_fill', 'pop_remap', 'potmp_insitu_ocn',
|
| 190 |
+
'prcwater_dp', 'pres2hybrid', 'pres_hybrid_ccm', 'pres_sigma',
|
| 191 |
+
'print', 'print_table', 'printFileVarSummary', 'printVarSummary',
|
| 192 |
+
'product', 'pslec', 'pslhor', 'pslhyp', 'qsort', 'rand',
|
| 193 |
+
'random_chi', 'random_gamma', 'random_normal', 'random_setallseed',
|
| 194 |
+
'random_uniform', 'rcm2points', 'rcm2rgrid', 'rdsstoi',
|
| 195 |
+
'read_colormap_file', 'reg_multlin', 'regcoef', 'regCoef_n',
|
| 196 |
+
'regline', 'relhum', 'replace_ieeenan', 'reshape', 'reshape_ind',
|
| 197 |
+
'rgba_to_color_index', 'rgbhls', 'rgbhsv', 'rgbyiq', 'rgrid2rcm',
|
| 198 |
+
'rhomb_trunc', 'rip_cape_2d', 'rip_cape_3d', 'round', 'rtest',
|
| 199 |
+
'runave', 'runave_n', 'set_default_fillvalue', 'set_sphere_radius',
|
| 200 |
+
'setfileoption', 'sfvp2uvf', 'sfvp2uvg', 'shaec', 'shagc',
|
| 201 |
+
'shgetnp', 'shgetp', 'shgrid', 'shorttobyte', 'shorttochar',
|
| 202 |
+
'shorttocharacter', 'show_ascii', 'shsec', 'shsetp', 'shsgc',
|
| 203 |
+
'shsgc_R42', 'sigma2hybrid', 'simpeq', 'simpne', 'sin',
|
| 204 |
+
'sindex_yrmo', 'sinh', 'sizeof', 'sleep', 'smth9', 'snindex_yrmo',
|
| 205 |
+
'solve_linsys', 'span_color_indexes', 'span_color_rgba',
|
| 206 |
+
'sparse_matrix_mult', 'spcorr', 'spcorr_n', 'specx_anal',
|
| 207 |
+
'specxy_anal', 'spei', 'sprintf', 'sprinti', 'sqrt', 'sqsort',
|
| 208 |
+
'srand', 'stat2', 'stat4', 'stat_medrng', 'stat_trim',
|
| 209 |
+
'status_exit', 'stdatmus_p2tdz', 'stdatmus_z2tdp', 'stddev',
|
| 210 |
+
'str_capital', 'str_concat', 'str_fields_count', 'str_get_cols',
|
| 211 |
+
'str_get_dq', 'str_get_field', 'str_get_nl', 'str_get_sq',
|
| 212 |
+
'str_get_tab', 'str_index_of_substr', 'str_insert', 'str_is_blank',
|
| 213 |
+
'str_join', 'str_left_strip', 'str_lower', 'str_match',
|
| 214 |
+
'str_match_ic', 'str_match_ic_regex', 'str_match_ind',
|
| 215 |
+
'str_match_ind_ic', 'str_match_ind_ic_regex', 'str_match_ind_regex',
|
| 216 |
+
'str_match_regex', 'str_right_strip', 'str_split',
|
| 217 |
+
'str_split_by_length', 'str_split_csv', 'str_squeeze', 'str_strip',
|
| 218 |
+
'str_sub_str', 'str_switch', 'str_upper', 'stringtochar',
|
| 219 |
+
'stringtocharacter', 'stringtodouble', 'stringtofloat',
|
| 220 |
+
'stringtoint', 'stringtointeger', 'stringtolong', 'stringtoshort',
|
| 221 |
+
'strlen', 'student_t', 'sum', 'svd_lapack', 'svdcov', 'svdcov_sv',
|
| 222 |
+
'svdstd', 'svdstd_sv', 'system', 'systemfunc', 'tan', 'tanh',
|
| 223 |
+
'taper', 'taper_n', 'tdclrs', 'tdctri', 'tdcudp', 'tdcurv',
|
| 224 |
+
'tddtri', 'tdez2d', 'tdez3d', 'tdgetp', 'tdgrds', 'tdgrid',
|
| 225 |
+
'tdgtrs', 'tdinit', 'tditri', 'tdlbla', 'tdlblp', 'tdlbls',
|
| 226 |
+
'tdline', 'tdlndp', 'tdlnpa', 'tdlpdp', 'tdmtri', 'tdotri',
|
| 227 |
+
'tdpara', 'tdplch', 'tdprpa', 'tdprpi', 'tdprpt', 'tdsetp',
|
| 228 |
+
'tdsort', 'tdstri', 'tdstrs', 'tdttri', 'thornthwaite', 'tobyte',
|
| 229 |
+
'tochar', 'todouble', 'tofloat', 'toint', 'toint64', 'tointeger',
|
| 230 |
+
'tolong', 'toshort', 'tosigned', 'tostring', 'tostring_with_format',
|
| 231 |
+
'totype', 'toubyte', 'touint', 'touint64', 'toulong', 'tounsigned',
|
| 232 |
+
'toushort', 'trend_manken', 'tri_trunc', 'triple2grid',
|
| 233 |
+
'triple2grid2d', 'trop_wmo', 'ttest', 'typeof', 'undef',
|
| 234 |
+
'unique_string', 'update', 'ushorttoint', 'ut_calendar',
|
| 235 |
+
'ut_inv_calendar', 'utm2latlon', 'uv2dv_cfd', 'uv2dvf', 'uv2dvg',
|
| 236 |
+
'uv2sfvpf', 'uv2sfvpg', 'uv2vr_cfd', 'uv2vrdvf', 'uv2vrdvg',
|
| 237 |
+
'uv2vrf', 'uv2vrg', 'v5d_close', 'v5d_create', 'v5d_setLowLev',
|
| 238 |
+
'v5d_setUnits', 'v5d_write', 'v5d_write_var', 'variance', 'vhaec',
|
| 239 |
+
'vhagc', 'vhsec', 'vhsgc', 'vibeta', 'vinth2p', 'vinth2p_ecmwf',
|
| 240 |
+
'vinth2p_ecmwf_nodes', 'vinth2p_nodes', 'vintp2p_ecmwf', 'vr2uvf',
|
| 241 |
+
'vr2uvg', 'vrdv2uvf', 'vrdv2uvg', 'wavelet', 'wavelet_default',
|
| 242 |
+
'weibull', 'wgt_area_smooth', 'wgt_areaave', 'wgt_areaave2',
|
| 243 |
+
'wgt_arearmse', 'wgt_arearmse2', 'wgt_areasum2', 'wgt_runave',
|
| 244 |
+
'wgt_runave_n', 'wgt_vert_avg_beta', 'wgt_volave', 'wgt_volave_ccm',
|
| 245 |
+
'wgt_volrmse', 'wgt_volrmse_ccm', 'where', 'wk_smooth121', 'wmbarb',
|
| 246 |
+
'wmbarbmap', 'wmdrft', 'wmgetp', 'wmlabs', 'wmsetp', 'wmstnm',
|
| 247 |
+
'wmvect', 'wmvectmap', 'wmvlbl', 'wrf_avo', 'wrf_cape_2d',
|
| 248 |
+
'wrf_cape_3d', 'wrf_dbz', 'wrf_eth', 'wrf_helicity', 'wrf_ij_to_ll',
|
| 249 |
+
'wrf_interp_1d', 'wrf_interp_2d_xy', 'wrf_interp_3d_z',
|
| 250 |
+
'wrf_latlon_to_ij', 'wrf_ll_to_ij', 'wrf_omega', 'wrf_pvo',
|
| 251 |
+
'wrf_rh', 'wrf_slp', 'wrf_smooth_2d', 'wrf_td', 'wrf_tk',
|
| 252 |
+
'wrf_updraft_helicity', 'wrf_uvmet', 'wrf_virtual_temp',
|
| 253 |
+
'wrf_wetbulb', 'wrf_wps_close_int', 'wrf_wps_open_int',
|
| 254 |
+
'wrf_wps_rddata_int', 'wrf_wps_rdhead_int', 'wrf_wps_read_int',
|
| 255 |
+
'wrf_wps_write_int', 'write_matrix', 'write_table', 'yiqrgb',
|
| 256 |
+
'z2geouv', 'zonal_mpsi', 'addfiles_GetVar', 'advect_variable',
|
| 257 |
+
'area_conserve_remap_Wrap', 'area_hi2lores_Wrap',
|
| 258 |
+
'array_append_record', 'assignFillValue', 'byte2flt',
|
| 259 |
+
'byte2flt_hdf', 'calcDayAnomTLL', 'calcMonAnomLLLT',
|
| 260 |
+
'calcMonAnomLLT', 'calcMonAnomTLL', 'calcMonAnomTLLL',
|
| 261 |
+
'calculate_monthly_values', 'cd_convert', 'changeCase',
|
| 262 |
+
'changeCaseChar', 'clmDayTLL', 'clmDayTLLL', 'clmMon2clmDay',
|
| 263 |
+
'clmMonLLLT', 'clmMonLLT', 'clmMonTLL', 'clmMonTLLL', 'closest_val',
|
| 264 |
+
'copy_VarAtts', 'copy_VarCoords', 'copy_VarCoords_1',
|
| 265 |
+
'copy_VarCoords_2', 'copy_VarMeta', 'copyatt', 'crossp3',
|
| 266 |
+
'cshstringtolist', 'cssgrid_Wrap', 'dble2flt', 'decimalPlaces',
|
| 267 |
+
'delete_VarAtts', 'dim_avg_n_Wrap', 'dim_avg_wgt_n_Wrap',
|
| 268 |
+
'dim_avg_wgt_Wrap', 'dim_avg_Wrap', 'dim_cumsum_n_Wrap',
|
| 269 |
+
'dim_cumsum_Wrap', 'dim_max_n_Wrap', 'dim_min_n_Wrap',
|
| 270 |
+
'dim_rmsd_n_Wrap', 'dim_rmsd_Wrap', 'dim_rmvmean_n_Wrap',
|
| 271 |
+
'dim_rmvmean_Wrap', 'dim_rmvmed_n_Wrap', 'dim_rmvmed_Wrap',
|
| 272 |
+
'dim_standardize_n_Wrap', 'dim_standardize_Wrap',
|
| 273 |
+
'dim_stddev_n_Wrap', 'dim_stddev_Wrap', 'dim_sum_n_Wrap',
|
| 274 |
+
'dim_sum_wgt_n_Wrap', 'dim_sum_wgt_Wrap', 'dim_sum_Wrap',
|
| 275 |
+
'dim_variance_n_Wrap', 'dim_variance_Wrap', 'dpres_plevel_Wrap',
|
| 276 |
+
'dtrend_leftdim', 'dv2uvF_Wrap', 'dv2uvG_Wrap', 'eof_north',
|
| 277 |
+
'eofcor_Wrap', 'eofcov_Wrap', 'eofunc_north', 'eofunc_ts_Wrap',
|
| 278 |
+
'eofunc_varimax_reorder', 'eofunc_varimax_Wrap', 'eofunc_Wrap',
|
| 279 |
+
'epsZero', 'f2fosh_Wrap', 'f2foshv_Wrap', 'f2fsh_Wrap',
|
| 280 |
+
'f2fshv_Wrap', 'f2gsh_Wrap', 'f2gshv_Wrap', 'fbindirSwap',
|
| 281 |
+
'fbinseqSwap1', 'fbinseqSwap2', 'flt2dble', 'flt2string',
|
| 282 |
+
'fo2fsh_Wrap', 'fo2fshv_Wrap', 'g2fsh_Wrap', 'g2fshv_Wrap',
|
| 283 |
+
'g2gsh_Wrap', 'g2gshv_Wrap', 'generate_resample_indices',
|
| 284 |
+
'generate_sample_indices', 'generate_unique_indices',
|
| 285 |
+
'genNormalDist', 'get1Dindex', 'get1Dindex_Collapse',
|
| 286 |
+
'get1Dindex_Exclude', 'get_file_suffix', 'GetFillColor',
|
| 287 |
+
'GetFillColorIndex', 'getFillValue', 'getind_latlon2d',
|
| 288 |
+
'getVarDimNames', 'getVarFillValue', 'grib_stime2itime',
|
| 289 |
+
'hyi2hyo_Wrap', 'ilapsF_Wrap', 'ilapsG_Wrap', 'ind_nearest_coord',
|
| 290 |
+
'indStrSubset', 'int2dble', 'int2flt', 'int2p_n_Wrap', 'int2p_Wrap',
|
| 291 |
+
'isMonotonic', 'isStrSubset', 'latGau', 'latGauWgt', 'latGlobeF',
|
| 292 |
+
'latGlobeFo', 'latRegWgt', 'linint1_n_Wrap', 'linint1_Wrap',
|
| 293 |
+
'linint2_points_Wrap', 'linint2_Wrap', 'local_max_1d',
|
| 294 |
+
'local_min_1d', 'lonFlip', 'lonGlobeF', 'lonGlobeFo', 'lonPivot',
|
| 295 |
+
'merge_levels_sfc', 'mod', 'month_to_annual',
|
| 296 |
+
'month_to_annual_weighted', 'month_to_season', 'month_to_season12',
|
| 297 |
+
'month_to_seasonN', 'monthly_total_to_daily_mean', 'nameDim',
|
| 298 |
+
'natgrid_Wrap', 'NewCosWeight', 'niceLatLon2D', 'NormCosWgtGlobe',
|
| 299 |
+
'numAsciiCol', 'numAsciiRow', 'numeric2int',
|
| 300 |
+
'obj_anal_ic_deprecated', 'obj_anal_ic_Wrap', 'omega_ccm_driver',
|
| 301 |
+
'omega_to_w', 'oneDtostring', 'pack_values', 'pattern_cor', 'pdfx',
|
| 302 |
+
'pdfxy', 'pdfxy_conform', 'pot_temp', 'pot_vort_hybrid',
|
| 303 |
+
'pot_vort_isobaric', 'pres2hybrid_Wrap', 'print_clock',
|
| 304 |
+
'printMinMax', 'quadroots', 'rcm2points_Wrap', 'rcm2rgrid_Wrap',
|
| 305 |
+
'readAsciiHead', 'readAsciiTable', 'reg_multlin_stats',
|
| 306 |
+
'region_ind', 'regline_stats', 'relhum_ttd', 'replaceSingleChar',
|
| 307 |
+
'RGBtoCmap', 'rgrid2rcm_Wrap', 'rho_mwjf', 'rm_single_dims',
|
| 308 |
+
'rmAnnCycle1D', 'rmInsufData', 'rmMonAnnCycLLLT', 'rmMonAnnCycLLT',
|
| 309 |
+
'rmMonAnnCycTLL', 'runave_n_Wrap', 'runave_Wrap', 'short2flt',
|
| 310 |
+
'short2flt_hdf', 'shsgc_R42_Wrap', 'sign_f90', 'sign_matlab',
|
| 311 |
+
'smth9_Wrap', 'smthClmDayTLL', 'smthClmDayTLLL', 'SqrtCosWeight',
|
| 312 |
+
'stat_dispersion', 'static_stability', 'stdMonLLLT', 'stdMonLLT',
|
| 313 |
+
'stdMonTLL', 'stdMonTLLL', 'symMinMaxPlt', 'table_attach_columns',
|
| 314 |
+
'table_attach_rows', 'time_to_newtime', 'transpose',
|
| 315 |
+
'triple2grid_Wrap', 'ut_convert', 'uv2dvF_Wrap', 'uv2dvG_Wrap',
|
| 316 |
+
'uv2vrF_Wrap', 'uv2vrG_Wrap', 'vr2uvF_Wrap', 'vr2uvG_Wrap',
|
| 317 |
+
'w_to_omega', 'wallClockElapseTime', 'wave_number_spc',
|
| 318 |
+
'wgt_areaave_Wrap', 'wgt_runave_leftdim', 'wgt_runave_n_Wrap',
|
| 319 |
+
'wgt_runave_Wrap', 'wgt_vertical_n', 'wind_component',
|
| 320 |
+
'wind_direction', 'yyyyddd_to_yyyymmdd', 'yyyymm_time',
|
| 321 |
+
'yyyymm_to_yyyyfrac', 'yyyymmdd_time', 'yyyymmdd_to_yyyyddd',
|
| 322 |
+
'yyyymmdd_to_yyyyfrac', 'yyyymmddhh_time', 'yyyymmddhh_to_yyyyfrac',
|
| 323 |
+
'zonal_mpsi_Wrap', 'zonalAve', 'calendar_decode2', 'cd_string',
|
| 324 |
+
'kf_filter', 'run_cor', 'time_axis_labels', 'ut_string',
|
| 325 |
+
'wrf_contour', 'wrf_map', 'wrf_map_overlay', 'wrf_map_overlays',
|
| 326 |
+
'wrf_map_resources', 'wrf_map_zoom', 'wrf_overlay', 'wrf_overlays',
|
| 327 |
+
'wrf_user_getvar', 'wrf_user_ij_to_ll', 'wrf_user_intrp2d',
|
| 328 |
+
'wrf_user_intrp3d', 'wrf_user_latlon_to_ij', 'wrf_user_list_times',
|
| 329 |
+
'wrf_user_ll_to_ij', 'wrf_user_unstagger', 'wrf_user_vert_interp',
|
| 330 |
+
'wrf_vector', 'gsn_add_annotation', 'gsn_add_polygon',
|
| 331 |
+
'gsn_add_polyline', 'gsn_add_polymarker',
|
| 332 |
+
'gsn_add_shapefile_polygons', 'gsn_add_shapefile_polylines',
|
| 333 |
+
'gsn_add_shapefile_polymarkers', 'gsn_add_text', 'gsn_attach_plots',
|
| 334 |
+
'gsn_blank_plot', 'gsn_contour', 'gsn_contour_map',
|
| 335 |
+
'gsn_contour_shade', 'gsn_coordinates', 'gsn_create_labelbar',
|
| 336 |
+
'gsn_create_legend', 'gsn_create_text',
|
| 337 |
+
'gsn_csm_attach_zonal_means', 'gsn_csm_blank_plot',
|
| 338 |
+
'gsn_csm_contour', 'gsn_csm_contour_map', 'gsn_csm_contour_map_ce',
|
| 339 |
+
'gsn_csm_contour_map_overlay', 'gsn_csm_contour_map_polar',
|
| 340 |
+
'gsn_csm_hov', 'gsn_csm_lat_time', 'gsn_csm_map', 'gsn_csm_map_ce',
|
| 341 |
+
'gsn_csm_map_polar', 'gsn_csm_pres_hgt',
|
| 342 |
+
'gsn_csm_pres_hgt_streamline', 'gsn_csm_pres_hgt_vector',
|
| 343 |
+
'gsn_csm_streamline', 'gsn_csm_streamline_contour_map',
|
| 344 |
+
'gsn_csm_streamline_contour_map_ce',
|
| 345 |
+
'gsn_csm_streamline_contour_map_polar', 'gsn_csm_streamline_map',
|
| 346 |
+
'gsn_csm_streamline_map_ce', 'gsn_csm_streamline_map_polar',
|
| 347 |
+
'gsn_csm_streamline_scalar', 'gsn_csm_streamline_scalar_map',
|
| 348 |
+
'gsn_csm_streamline_scalar_map_ce',
|
| 349 |
+
'gsn_csm_streamline_scalar_map_polar', 'gsn_csm_time_lat',
|
| 350 |
+
'gsn_csm_vector', 'gsn_csm_vector_map', 'gsn_csm_vector_map_ce',
|
| 351 |
+
'gsn_csm_vector_map_polar', 'gsn_csm_vector_scalar',
|
| 352 |
+
'gsn_csm_vector_scalar_map', 'gsn_csm_vector_scalar_map_ce',
|
| 353 |
+
'gsn_csm_vector_scalar_map_polar', 'gsn_csm_x2y', 'gsn_csm_x2y2',
|
| 354 |
+
'gsn_csm_xy', 'gsn_csm_xy2', 'gsn_csm_xy3', 'gsn_csm_y',
|
| 355 |
+
'gsn_define_colormap', 'gsn_draw_colormap', 'gsn_draw_named_colors',
|
| 356 |
+
'gsn_histogram', 'gsn_labelbar_ndc', 'gsn_legend_ndc', 'gsn_map',
|
| 357 |
+
'gsn_merge_colormaps', 'gsn_open_wks', 'gsn_panel', 'gsn_polygon',
|
| 358 |
+
'gsn_polygon_ndc', 'gsn_polyline', 'gsn_polyline_ndc',
|
| 359 |
+
'gsn_polymarker', 'gsn_polymarker_ndc', 'gsn_retrieve_colormap',
|
| 360 |
+
'gsn_reverse_colormap', 'gsn_streamline', 'gsn_streamline_map',
|
| 361 |
+
'gsn_streamline_scalar', 'gsn_streamline_scalar_map', 'gsn_table',
|
| 362 |
+
'gsn_text', 'gsn_text_ndc', 'gsn_vector', 'gsn_vector_map',
|
| 363 |
+
'gsn_vector_scalar', 'gsn_vector_scalar_map', 'gsn_xy', 'gsn_y',
|
| 364 |
+
'hsv2rgb', 'maximize_output', 'namedcolor2rgb', 'namedcolor2rgba',
|
| 365 |
+
'reset_device_coordinates', 'span_named_colors'), prefix=r'\b'),
|
| 366 |
+
Name.Builtin),
|
| 367 |
+
|
| 368 |
+
# Resources
|
| 369 |
+
(words((
|
| 370 |
+
'amDataXF', 'amDataYF', 'amJust', 'amOn', 'amOrthogonalPosF',
|
| 371 |
+
'amParallelPosF', 'amResizeNotify', 'amSide', 'amTrackData',
|
| 372 |
+
'amViewId', 'amZone', 'appDefaultParent', 'appFileSuffix',
|
| 373 |
+
'appResources', 'appSysDir', 'appUsrDir', 'caCopyArrays',
|
| 374 |
+
'caXArray', 'caXCast', 'caXMaxV', 'caXMinV', 'caXMissingV',
|
| 375 |
+
'caYArray', 'caYCast', 'caYMaxV', 'caYMinV', 'caYMissingV',
|
| 376 |
+
'cnCellFillEdgeColor', 'cnCellFillMissingValEdgeColor',
|
| 377 |
+
'cnConpackParams', 'cnConstFEnableFill', 'cnConstFLabelAngleF',
|
| 378 |
+
'cnConstFLabelBackgroundColor', 'cnConstFLabelConstantSpacingF',
|
| 379 |
+
'cnConstFLabelFont', 'cnConstFLabelFontAspectF',
|
| 380 |
+
'cnConstFLabelFontColor', 'cnConstFLabelFontHeightF',
|
| 381 |
+
'cnConstFLabelFontQuality', 'cnConstFLabelFontThicknessF',
|
| 382 |
+
'cnConstFLabelFormat', 'cnConstFLabelFuncCode', 'cnConstFLabelJust',
|
| 383 |
+
'cnConstFLabelOn', 'cnConstFLabelOrthogonalPosF',
|
| 384 |
+
'cnConstFLabelParallelPosF', 'cnConstFLabelPerimColor',
|
| 385 |
+
'cnConstFLabelPerimOn', 'cnConstFLabelPerimSpaceF',
|
| 386 |
+
'cnConstFLabelPerimThicknessF', 'cnConstFLabelSide',
|
| 387 |
+
'cnConstFLabelString', 'cnConstFLabelTextDirection',
|
| 388 |
+
'cnConstFLabelZone', 'cnConstFUseInfoLabelRes',
|
| 389 |
+
'cnExplicitLabelBarLabelsOn', 'cnExplicitLegendLabelsOn',
|
| 390 |
+
'cnExplicitLineLabelsOn', 'cnFillBackgroundColor', 'cnFillColor',
|
| 391 |
+
'cnFillColors', 'cnFillDotSizeF', 'cnFillDrawOrder', 'cnFillMode',
|
| 392 |
+
'cnFillOn', 'cnFillOpacityF', 'cnFillPalette', 'cnFillPattern',
|
| 393 |
+
'cnFillPatterns', 'cnFillScaleF', 'cnFillScales', 'cnFixFillBleed',
|
| 394 |
+
'cnGridBoundFillColor', 'cnGridBoundFillPattern',
|
| 395 |
+
'cnGridBoundFillScaleF', 'cnGridBoundPerimColor',
|
| 396 |
+
'cnGridBoundPerimDashPattern', 'cnGridBoundPerimOn',
|
| 397 |
+
'cnGridBoundPerimThicknessF', 'cnHighLabelAngleF',
|
| 398 |
+
'cnHighLabelBackgroundColor', 'cnHighLabelConstantSpacingF',
|
| 399 |
+
'cnHighLabelCount', 'cnHighLabelFont', 'cnHighLabelFontAspectF',
|
| 400 |
+
'cnHighLabelFontColor', 'cnHighLabelFontHeightF',
|
| 401 |
+
'cnHighLabelFontQuality', 'cnHighLabelFontThicknessF',
|
| 402 |
+
'cnHighLabelFormat', 'cnHighLabelFuncCode', 'cnHighLabelPerimColor',
|
| 403 |
+
'cnHighLabelPerimOn', 'cnHighLabelPerimSpaceF',
|
| 404 |
+
'cnHighLabelPerimThicknessF', 'cnHighLabelString', 'cnHighLabelsOn',
|
| 405 |
+
'cnHighLowLabelOverlapMode', 'cnHighUseLineLabelRes',
|
| 406 |
+
'cnInfoLabelAngleF', 'cnInfoLabelBackgroundColor',
|
| 407 |
+
'cnInfoLabelConstantSpacingF', 'cnInfoLabelFont',
|
| 408 |
+
'cnInfoLabelFontAspectF', 'cnInfoLabelFontColor',
|
| 409 |
+
'cnInfoLabelFontHeightF', 'cnInfoLabelFontQuality',
|
| 410 |
+
'cnInfoLabelFontThicknessF', 'cnInfoLabelFormat',
|
| 411 |
+
'cnInfoLabelFuncCode', 'cnInfoLabelJust', 'cnInfoLabelOn',
|
| 412 |
+
'cnInfoLabelOrthogonalPosF', 'cnInfoLabelParallelPosF',
|
| 413 |
+
'cnInfoLabelPerimColor', 'cnInfoLabelPerimOn',
|
| 414 |
+
'cnInfoLabelPerimSpaceF', 'cnInfoLabelPerimThicknessF',
|
| 415 |
+
'cnInfoLabelSide', 'cnInfoLabelString', 'cnInfoLabelTextDirection',
|
| 416 |
+
'cnInfoLabelZone', 'cnLabelBarEndLabelsOn', 'cnLabelBarEndStyle',
|
| 417 |
+
'cnLabelDrawOrder', 'cnLabelMasking', 'cnLabelScaleFactorF',
|
| 418 |
+
'cnLabelScaleValueF', 'cnLabelScalingMode', 'cnLegendLevelFlags',
|
| 419 |
+
'cnLevelCount', 'cnLevelFlag', 'cnLevelFlags', 'cnLevelSelectionMode',
|
| 420 |
+
'cnLevelSpacingF', 'cnLevels', 'cnLineColor', 'cnLineColors',
|
| 421 |
+
'cnLineDashPattern', 'cnLineDashPatterns', 'cnLineDashSegLenF',
|
| 422 |
+
'cnLineDrawOrder', 'cnLineLabelAngleF', 'cnLineLabelBackgroundColor',
|
| 423 |
+
'cnLineLabelConstantSpacingF', 'cnLineLabelCount',
|
| 424 |
+
'cnLineLabelDensityF', 'cnLineLabelFont', 'cnLineLabelFontAspectF',
|
| 425 |
+
'cnLineLabelFontColor', 'cnLineLabelFontColors',
|
| 426 |
+
'cnLineLabelFontHeightF', 'cnLineLabelFontQuality',
|
| 427 |
+
'cnLineLabelFontThicknessF', 'cnLineLabelFormat',
|
| 428 |
+
'cnLineLabelFuncCode', 'cnLineLabelInterval', 'cnLineLabelPerimColor',
|
| 429 |
+
'cnLineLabelPerimOn', 'cnLineLabelPerimSpaceF',
|
| 430 |
+
'cnLineLabelPerimThicknessF', 'cnLineLabelPlacementMode',
|
| 431 |
+
'cnLineLabelStrings', 'cnLineLabelsOn', 'cnLinePalette',
|
| 432 |
+
'cnLineThicknessF', 'cnLineThicknesses', 'cnLinesOn',
|
| 433 |
+
'cnLowLabelAngleF', 'cnLowLabelBackgroundColor',
|
| 434 |
+
'cnLowLabelConstantSpacingF', 'cnLowLabelCount', 'cnLowLabelFont',
|
| 435 |
+
'cnLowLabelFontAspectF', 'cnLowLabelFontColor',
|
| 436 |
+
'cnLowLabelFontHeightF', 'cnLowLabelFontQuality',
|
| 437 |
+
'cnLowLabelFontThicknessF', 'cnLowLabelFormat', 'cnLowLabelFuncCode',
|
| 438 |
+
'cnLowLabelPerimColor', 'cnLowLabelPerimOn', 'cnLowLabelPerimSpaceF',
|
| 439 |
+
'cnLowLabelPerimThicknessF', 'cnLowLabelString', 'cnLowLabelsOn',
|
| 440 |
+
'cnLowUseHighLabelRes', 'cnMaxDataValueFormat', 'cnMaxLevelCount',
|
| 441 |
+
'cnMaxLevelValF', 'cnMaxPointDistanceF', 'cnMinLevelValF',
|
| 442 |
+
'cnMissingValFillColor', 'cnMissingValFillPattern',
|
| 443 |
+
'cnMissingValFillScaleF', 'cnMissingValPerimColor',
|
| 444 |
+
'cnMissingValPerimDashPattern', 'cnMissingValPerimGridBoundOn',
|
| 445 |
+
'cnMissingValPerimOn', 'cnMissingValPerimThicknessF',
|
| 446 |
+
'cnMonoFillColor', 'cnMonoFillPattern', 'cnMonoFillScale',
|
| 447 |
+
'cnMonoLevelFlag', 'cnMonoLineColor', 'cnMonoLineDashPattern',
|
| 448 |
+
'cnMonoLineLabelFontColor', 'cnMonoLineThickness', 'cnNoDataLabelOn',
|
| 449 |
+
'cnNoDataLabelString', 'cnOutOfRangeFillColor',
|
| 450 |
+
'cnOutOfRangeFillPattern', 'cnOutOfRangeFillScaleF',
|
| 451 |
+
'cnOutOfRangePerimColor', 'cnOutOfRangePerimDashPattern',
|
| 452 |
+
'cnOutOfRangePerimOn', 'cnOutOfRangePerimThicknessF',
|
| 453 |
+
'cnRasterCellSizeF', 'cnRasterMinCellSizeF', 'cnRasterModeOn',
|
| 454 |
+
'cnRasterSampleFactorF', 'cnRasterSmoothingOn', 'cnScalarFieldData',
|
| 455 |
+
'cnSmoothingDistanceF', 'cnSmoothingOn', 'cnSmoothingTensionF',
|
| 456 |
+
'cnSpanFillPalette', 'cnSpanLinePalette', 'ctCopyTables',
|
| 457 |
+
'ctXElementSize', 'ctXMaxV', 'ctXMinV', 'ctXMissingV', 'ctXTable',
|
| 458 |
+
'ctXTableLengths', 'ctXTableType', 'ctYElementSize', 'ctYMaxV',
|
| 459 |
+
'ctYMinV', 'ctYMissingV', 'ctYTable', 'ctYTableLengths',
|
| 460 |
+
'ctYTableType', 'dcDelayCompute', 'errBuffer',
|
| 461 |
+
'errFileName', 'errFilePtr', 'errLevel', 'errPrint', 'errUnitNumber',
|
| 462 |
+
'gsClipOn', 'gsColors', 'gsEdgeColor', 'gsEdgeDashPattern',
|
| 463 |
+
'gsEdgeDashSegLenF', 'gsEdgeThicknessF', 'gsEdgesOn',
|
| 464 |
+
'gsFillBackgroundColor', 'gsFillColor', 'gsFillDotSizeF',
|
| 465 |
+
'gsFillIndex', 'gsFillLineThicknessF', 'gsFillOpacityF',
|
| 466 |
+
'gsFillScaleF', 'gsFont', 'gsFontAspectF', 'gsFontColor',
|
| 467 |
+
'gsFontHeightF', 'gsFontOpacityF', 'gsFontQuality',
|
| 468 |
+
'gsFontThicknessF', 'gsLineColor', 'gsLineDashPattern',
|
| 469 |
+
'gsLineDashSegLenF', 'gsLineLabelConstantSpacingF', 'gsLineLabelFont',
|
| 470 |
+
'gsLineLabelFontAspectF', 'gsLineLabelFontColor',
|
| 471 |
+
'gsLineLabelFontHeightF', 'gsLineLabelFontQuality',
|
| 472 |
+
'gsLineLabelFontThicknessF', 'gsLineLabelFuncCode',
|
| 473 |
+
'gsLineLabelString', 'gsLineOpacityF', 'gsLineThicknessF',
|
| 474 |
+
'gsMarkerColor', 'gsMarkerIndex', 'gsMarkerOpacityF', 'gsMarkerSizeF',
|
| 475 |
+
'gsMarkerThicknessF', 'gsSegments', 'gsTextAngleF',
|
| 476 |
+
'gsTextConstantSpacingF', 'gsTextDirection', 'gsTextFuncCode',
|
| 477 |
+
'gsTextJustification', 'gsnAboveYRefLineBarColors',
|
| 478 |
+
'gsnAboveYRefLineBarFillScales', 'gsnAboveYRefLineBarPatterns',
|
| 479 |
+
'gsnAboveYRefLineColor', 'gsnAddCyclic', 'gsnAttachBorderOn',
|
| 480 |
+
'gsnAttachPlotsXAxis', 'gsnBelowYRefLineBarColors',
|
| 481 |
+
'gsnBelowYRefLineBarFillScales', 'gsnBelowYRefLineBarPatterns',
|
| 482 |
+
'gsnBelowYRefLineColor', 'gsnBoxMargin', 'gsnCenterString',
|
| 483 |
+
'gsnCenterStringFontColor', 'gsnCenterStringFontHeightF',
|
| 484 |
+
'gsnCenterStringFuncCode', 'gsnCenterStringOrthogonalPosF',
|
| 485 |
+
'gsnCenterStringParallelPosF', 'gsnContourLineThicknessesScale',
|
| 486 |
+
'gsnContourNegLineDashPattern', 'gsnContourPosLineDashPattern',
|
| 487 |
+
'gsnContourZeroLineThicknessF', 'gsnDebugWriteFileName', 'gsnDraw',
|
| 488 |
+
'gsnFrame', 'gsnHistogramBarWidthPercent', 'gsnHistogramBinIntervals',
|
| 489 |
+
'gsnHistogramBinMissing', 'gsnHistogramBinWidth',
|
| 490 |
+
'gsnHistogramClassIntervals', 'gsnHistogramCompare',
|
| 491 |
+
'gsnHistogramComputePercentages',
|
| 492 |
+
'gsnHistogramComputePercentagesNoMissing',
|
| 493 |
+
'gsnHistogramDiscreteBinValues', 'gsnHistogramDiscreteClassValues',
|
| 494 |
+
'gsnHistogramHorizontal', 'gsnHistogramMinMaxBinsOn',
|
| 495 |
+
'gsnHistogramNumberOfBins', 'gsnHistogramPercentSign',
|
| 496 |
+
'gsnHistogramSelectNiceIntervals', 'gsnLeftString',
|
| 497 |
+
'gsnLeftStringFontColor', 'gsnLeftStringFontHeightF',
|
| 498 |
+
'gsnLeftStringFuncCode', 'gsnLeftStringOrthogonalPosF',
|
| 499 |
+
'gsnLeftStringParallelPosF', 'gsnMajorLatSpacing',
|
| 500 |
+
'gsnMajorLonSpacing', 'gsnMaskLambertConformal',
|
| 501 |
+
'gsnMaskLambertConformalOutlineOn', 'gsnMaximize',
|
| 502 |
+
'gsnMinorLatSpacing', 'gsnMinorLonSpacing', 'gsnPanelBottom',
|
| 503 |
+
'gsnPanelCenter', 'gsnPanelDebug', 'gsnPanelFigureStrings',
|
| 504 |
+
'gsnPanelFigureStringsBackgroundFillColor',
|
| 505 |
+
'gsnPanelFigureStringsFontHeightF', 'gsnPanelFigureStringsJust',
|
| 506 |
+
'gsnPanelFigureStringsPerimOn', 'gsnPanelLabelBar', 'gsnPanelLeft',
|
| 507 |
+
'gsnPanelMainFont', 'gsnPanelMainFontColor',
|
| 508 |
+
'gsnPanelMainFontHeightF', 'gsnPanelMainString', 'gsnPanelRight',
|
| 509 |
+
'gsnPanelRowSpec', 'gsnPanelScalePlotIndex', 'gsnPanelTop',
|
| 510 |
+
'gsnPanelXF', 'gsnPanelXWhiteSpacePercent', 'gsnPanelYF',
|
| 511 |
+
'gsnPanelYWhiteSpacePercent', 'gsnPaperHeight', 'gsnPaperMargin',
|
| 512 |
+
'gsnPaperOrientation', 'gsnPaperWidth', 'gsnPolar',
|
| 513 |
+
'gsnPolarLabelDistance', 'gsnPolarLabelFont',
|
| 514 |
+
'gsnPolarLabelFontHeightF', 'gsnPolarLabelSpacing', 'gsnPolarTime',
|
| 515 |
+
'gsnPolarUT', 'gsnRightString', 'gsnRightStringFontColor',
|
| 516 |
+
'gsnRightStringFontHeightF', 'gsnRightStringFuncCode',
|
| 517 |
+
'gsnRightStringOrthogonalPosF', 'gsnRightStringParallelPosF',
|
| 518 |
+
'gsnScalarContour', 'gsnScale', 'gsnShape', 'gsnSpreadColorEnd',
|
| 519 |
+
'gsnSpreadColorStart', 'gsnSpreadColors', 'gsnStringFont',
|
| 520 |
+
'gsnStringFontColor', 'gsnStringFontHeightF', 'gsnStringFuncCode',
|
| 521 |
+
'gsnTickMarksOn', 'gsnXAxisIrregular2Linear', 'gsnXAxisIrregular2Log',
|
| 522 |
+
'gsnXRefLine', 'gsnXRefLineColor', 'gsnXRefLineDashPattern',
|
| 523 |
+
'gsnXRefLineThicknessF', 'gsnXYAboveFillColors', 'gsnXYBarChart',
|
| 524 |
+
'gsnXYBarChartBarWidth', 'gsnXYBarChartColors',
|
| 525 |
+
'gsnXYBarChartColors2', 'gsnXYBarChartFillDotSizeF',
|
| 526 |
+
'gsnXYBarChartFillLineThicknessF', 'gsnXYBarChartFillOpacityF',
|
| 527 |
+
'gsnXYBarChartFillScaleF', 'gsnXYBarChartOutlineOnly',
|
| 528 |
+
'gsnXYBarChartOutlineThicknessF', 'gsnXYBarChartPatterns',
|
| 529 |
+
'gsnXYBarChartPatterns2', 'gsnXYBelowFillColors', 'gsnXYFillColors',
|
| 530 |
+
'gsnXYFillOpacities', 'gsnXYLeftFillColors', 'gsnXYRightFillColors',
|
| 531 |
+
'gsnYAxisIrregular2Linear', 'gsnYAxisIrregular2Log', 'gsnYRefLine',
|
| 532 |
+
'gsnYRefLineColor', 'gsnYRefLineColors', 'gsnYRefLineDashPattern',
|
| 533 |
+
'gsnYRefLineDashPatterns', 'gsnYRefLineThicknessF',
|
| 534 |
+
'gsnYRefLineThicknesses', 'gsnZonalMean', 'gsnZonalMeanXMaxF',
|
| 535 |
+
'gsnZonalMeanXMinF', 'gsnZonalMeanYRefLine', 'lbAutoManage',
|
| 536 |
+
'lbBottomMarginF', 'lbBoxCount', 'lbBoxEndCapStyle', 'lbBoxFractions',
|
| 537 |
+
'lbBoxLineColor', 'lbBoxLineDashPattern', 'lbBoxLineDashSegLenF',
|
| 538 |
+
'lbBoxLineThicknessF', 'lbBoxLinesOn', 'lbBoxMajorExtentF',
|
| 539 |
+
'lbBoxMinorExtentF', 'lbBoxSeparatorLinesOn', 'lbBoxSizing',
|
| 540 |
+
'lbFillBackground', 'lbFillColor', 'lbFillColors', 'lbFillDotSizeF',
|
| 541 |
+
'lbFillLineThicknessF', 'lbFillPattern', 'lbFillPatterns',
|
| 542 |
+
'lbFillScaleF', 'lbFillScales', 'lbJustification', 'lbLabelAlignment',
|
| 543 |
+
'lbLabelAngleF', 'lbLabelAutoStride', 'lbLabelBarOn',
|
| 544 |
+
'lbLabelConstantSpacingF', 'lbLabelDirection', 'lbLabelFont',
|
| 545 |
+
'lbLabelFontAspectF', 'lbLabelFontColor', 'lbLabelFontHeightF',
|
| 546 |
+
'lbLabelFontQuality', 'lbLabelFontThicknessF', 'lbLabelFuncCode',
|
| 547 |
+
'lbLabelJust', 'lbLabelOffsetF', 'lbLabelPosition', 'lbLabelStride',
|
| 548 |
+
'lbLabelStrings', 'lbLabelsOn', 'lbLeftMarginF', 'lbMaxLabelLenF',
|
| 549 |
+
'lbMinLabelSpacingF', 'lbMonoFillColor', 'lbMonoFillPattern',
|
| 550 |
+
'lbMonoFillScale', 'lbOrientation', 'lbPerimColor',
|
| 551 |
+
'lbPerimDashPattern', 'lbPerimDashSegLenF', 'lbPerimFill',
|
| 552 |
+
'lbPerimFillColor', 'lbPerimOn', 'lbPerimThicknessF',
|
| 553 |
+
'lbRasterFillOn', 'lbRightMarginF', 'lbTitleAngleF',
|
| 554 |
+
'lbTitleConstantSpacingF', 'lbTitleDirection', 'lbTitleExtentF',
|
| 555 |
+
'lbTitleFont', 'lbTitleFontAspectF', 'lbTitleFontColor',
|
| 556 |
+
'lbTitleFontHeightF', 'lbTitleFontQuality', 'lbTitleFontThicknessF',
|
| 557 |
+
'lbTitleFuncCode', 'lbTitleJust', 'lbTitleOffsetF', 'lbTitleOn',
|
| 558 |
+
'lbTitlePosition', 'lbTitleString', 'lbTopMarginF', 'lgAutoManage',
|
| 559 |
+
'lgBottomMarginF', 'lgBoxBackground', 'lgBoxLineColor',
|
| 560 |
+
'lgBoxLineDashPattern', 'lgBoxLineDashSegLenF', 'lgBoxLineThicknessF',
|
| 561 |
+
'lgBoxLinesOn', 'lgBoxMajorExtentF', 'lgBoxMinorExtentF',
|
| 562 |
+
'lgDashIndex', 'lgDashIndexes', 'lgItemCount', 'lgItemOrder',
|
| 563 |
+
'lgItemPlacement', 'lgItemPositions', 'lgItemType', 'lgItemTypes',
|
| 564 |
+
'lgJustification', 'lgLabelAlignment', 'lgLabelAngleF',
|
| 565 |
+
'lgLabelAutoStride', 'lgLabelConstantSpacingF', 'lgLabelDirection',
|
| 566 |
+
'lgLabelFont', 'lgLabelFontAspectF', 'lgLabelFontColor',
|
| 567 |
+
'lgLabelFontHeightF', 'lgLabelFontQuality', 'lgLabelFontThicknessF',
|
| 568 |
+
'lgLabelFuncCode', 'lgLabelJust', 'lgLabelOffsetF', 'lgLabelPosition',
|
| 569 |
+
'lgLabelStride', 'lgLabelStrings', 'lgLabelsOn', 'lgLeftMarginF',
|
| 570 |
+
'lgLegendOn', 'lgLineColor', 'lgLineColors', 'lgLineDashSegLenF',
|
| 571 |
+
'lgLineDashSegLens', 'lgLineLabelConstantSpacingF', 'lgLineLabelFont',
|
| 572 |
+
'lgLineLabelFontAspectF', 'lgLineLabelFontColor',
|
| 573 |
+
'lgLineLabelFontColors', 'lgLineLabelFontHeightF',
|
| 574 |
+
'lgLineLabelFontHeights', 'lgLineLabelFontQuality',
|
| 575 |
+
'lgLineLabelFontThicknessF', 'lgLineLabelFuncCode',
|
| 576 |
+
'lgLineLabelStrings', 'lgLineLabelsOn', 'lgLineThicknessF',
|
| 577 |
+
'lgLineThicknesses', 'lgMarkerColor', 'lgMarkerColors',
|
| 578 |
+
'lgMarkerIndex', 'lgMarkerIndexes', 'lgMarkerSizeF', 'lgMarkerSizes',
|
| 579 |
+
'lgMarkerThicknessF', 'lgMarkerThicknesses', 'lgMonoDashIndex',
|
| 580 |
+
'lgMonoItemType', 'lgMonoLineColor', 'lgMonoLineDashSegLen',
|
| 581 |
+
'lgMonoLineLabelFontColor', 'lgMonoLineLabelFontHeight',
|
| 582 |
+
'lgMonoLineThickness', 'lgMonoMarkerColor', 'lgMonoMarkerIndex',
|
| 583 |
+
'lgMonoMarkerSize', 'lgMonoMarkerThickness', 'lgOrientation',
|
| 584 |
+
'lgPerimColor', 'lgPerimDashPattern', 'lgPerimDashSegLenF',
|
| 585 |
+
'lgPerimFill', 'lgPerimFillColor', 'lgPerimOn', 'lgPerimThicknessF',
|
| 586 |
+
'lgRightMarginF', 'lgTitleAngleF', 'lgTitleConstantSpacingF',
|
| 587 |
+
'lgTitleDirection', 'lgTitleExtentF', 'lgTitleFont',
|
| 588 |
+
'lgTitleFontAspectF', 'lgTitleFontColor', 'lgTitleFontHeightF',
|
| 589 |
+
'lgTitleFontQuality', 'lgTitleFontThicknessF', 'lgTitleFuncCode',
|
| 590 |
+
'lgTitleJust', 'lgTitleOffsetF', 'lgTitleOn', 'lgTitlePosition',
|
| 591 |
+
'lgTitleString', 'lgTopMarginF', 'mpAreaGroupCount',
|
| 592 |
+
'mpAreaMaskingOn', 'mpAreaNames', 'mpAreaTypes', 'mpBottomAngleF',
|
| 593 |
+
'mpBottomMapPosF', 'mpBottomNDCF', 'mpBottomNPCF',
|
| 594 |
+
'mpBottomPointLatF', 'mpBottomPointLonF', 'mpBottomWindowF',
|
| 595 |
+
'mpCenterLatF', 'mpCenterLonF', 'mpCenterRotF', 'mpCountyLineColor',
|
| 596 |
+
'mpCountyLineDashPattern', 'mpCountyLineDashSegLenF',
|
| 597 |
+
'mpCountyLineThicknessF', 'mpDataBaseVersion', 'mpDataResolution',
|
| 598 |
+
'mpDataSetName', 'mpDefaultFillColor', 'mpDefaultFillPattern',
|
| 599 |
+
'mpDefaultFillScaleF', 'mpDynamicAreaGroups', 'mpEllipticalBoundary',
|
| 600 |
+
'mpFillAreaSpecifiers', 'mpFillBoundarySets', 'mpFillColor',
|
| 601 |
+
'mpFillColors', 'mpFillColors-default', 'mpFillDotSizeF',
|
| 602 |
+
'mpFillDrawOrder', 'mpFillOn', 'mpFillPatternBackground',
|
| 603 |
+
'mpFillPattern', 'mpFillPatterns', 'mpFillPatterns-default',
|
| 604 |
+
'mpFillScaleF', 'mpFillScales', 'mpFillScales-default',
|
| 605 |
+
'mpFixedAreaGroups', 'mpGeophysicalLineColor',
|
| 606 |
+
'mpGeophysicalLineDashPattern', 'mpGeophysicalLineDashSegLenF',
|
| 607 |
+
'mpGeophysicalLineThicknessF', 'mpGreatCircleLinesOn',
|
| 608 |
+
'mpGridAndLimbDrawOrder', 'mpGridAndLimbOn', 'mpGridLatSpacingF',
|
| 609 |
+
'mpGridLineColor', 'mpGridLineDashPattern', 'mpGridLineDashSegLenF',
|
| 610 |
+
'mpGridLineThicknessF', 'mpGridLonSpacingF', 'mpGridMaskMode',
|
| 611 |
+
'mpGridMaxLatF', 'mpGridPolarLonSpacingF', 'mpGridSpacingF',
|
| 612 |
+
'mpInlandWaterFillColor', 'mpInlandWaterFillPattern',
|
| 613 |
+
'mpInlandWaterFillScaleF', 'mpLabelDrawOrder', 'mpLabelFontColor',
|
| 614 |
+
'mpLabelFontHeightF', 'mpLabelsOn', 'mpLambertMeridianF',
|
| 615 |
+
'mpLambertParallel1F', 'mpLambertParallel2F', 'mpLandFillColor',
|
| 616 |
+
'mpLandFillPattern', 'mpLandFillScaleF', 'mpLeftAngleF',
|
| 617 |
+
'mpLeftCornerLatF', 'mpLeftCornerLonF', 'mpLeftMapPosF',
|
| 618 |
+
'mpLeftNDCF', 'mpLeftNPCF', 'mpLeftPointLatF',
|
| 619 |
+
'mpLeftPointLonF', 'mpLeftWindowF', 'mpLimbLineColor',
|
| 620 |
+
'mpLimbLineDashPattern', 'mpLimbLineDashSegLenF',
|
| 621 |
+
'mpLimbLineThicknessF', 'mpLimitMode', 'mpMaskAreaSpecifiers',
|
| 622 |
+
'mpMaskOutlineSpecifiers', 'mpMaxLatF', 'mpMaxLonF',
|
| 623 |
+
'mpMinLatF', 'mpMinLonF', 'mpMonoFillColor', 'mpMonoFillPattern',
|
| 624 |
+
'mpMonoFillScale', 'mpNationalLineColor', 'mpNationalLineDashPattern',
|
| 625 |
+
'mpNationalLineThicknessF', 'mpOceanFillColor', 'mpOceanFillPattern',
|
| 626 |
+
'mpOceanFillScaleF', 'mpOutlineBoundarySets', 'mpOutlineDrawOrder',
|
| 627 |
+
'mpOutlineMaskingOn', 'mpOutlineOn', 'mpOutlineSpecifiers',
|
| 628 |
+
'mpPerimDrawOrder', 'mpPerimLineColor', 'mpPerimLineDashPattern',
|
| 629 |
+
'mpPerimLineDashSegLenF', 'mpPerimLineThicknessF', 'mpPerimOn',
|
| 630 |
+
'mpPolyMode', 'mpProjection', 'mpProvincialLineColor',
|
| 631 |
+
'mpProvincialLineDashPattern', 'mpProvincialLineDashSegLenF',
|
| 632 |
+
'mpProvincialLineThicknessF', 'mpRelativeCenterLat',
|
| 633 |
+
'mpRelativeCenterLon', 'mpRightAngleF', 'mpRightCornerLatF',
|
| 634 |
+
'mpRightCornerLonF', 'mpRightMapPosF', 'mpRightNDCF',
|
| 635 |
+
'mpRightNPCF', 'mpRightPointLatF', 'mpRightPointLonF',
|
| 636 |
+
'mpRightWindowF', 'mpSatelliteAngle1F', 'mpSatelliteAngle2F',
|
| 637 |
+
'mpSatelliteDistF', 'mpShapeMode', 'mpSpecifiedFillColors',
|
| 638 |
+
'mpSpecifiedFillDirectIndexing', 'mpSpecifiedFillPatterns',
|
| 639 |
+
'mpSpecifiedFillPriority', 'mpSpecifiedFillScales',
|
| 640 |
+
'mpTopAngleF', 'mpTopMapPosF', 'mpTopNDCF', 'mpTopNPCF',
|
| 641 |
+
'mpTopPointLatF', 'mpTopPointLonF', 'mpTopWindowF',
|
| 642 |
+
'mpUSStateLineColor', 'mpUSStateLineDashPattern',
|
| 643 |
+
'mpUSStateLineDashSegLenF', 'mpUSStateLineThicknessF',
|
| 644 |
+
'pmAnnoManagers', 'pmAnnoViews', 'pmLabelBarDisplayMode',
|
| 645 |
+
'pmLabelBarHeightF', 'pmLabelBarKeepAspect', 'pmLabelBarOrthogonalPosF',
|
| 646 |
+
'pmLabelBarParallelPosF', 'pmLabelBarSide', 'pmLabelBarWidthF',
|
| 647 |
+
'pmLabelBarZone', 'pmLegendDisplayMode', 'pmLegendHeightF',
|
| 648 |
+
'pmLegendKeepAspect', 'pmLegendOrthogonalPosF',
|
| 649 |
+
'pmLegendParallelPosF', 'pmLegendSide', 'pmLegendWidthF',
|
| 650 |
+
'pmLegendZone', 'pmOverlaySequenceIds', 'pmTickMarkDisplayMode',
|
| 651 |
+
'pmTickMarkZone', 'pmTitleDisplayMode', 'pmTitleZone',
|
| 652 |
+
'prGraphicStyle', 'prPolyType', 'prXArray', 'prYArray',
|
| 653 |
+
'sfCopyData', 'sfDataArray', 'sfDataMaxV', 'sfDataMinV',
|
| 654 |
+
'sfElementNodes', 'sfExchangeDimensions', 'sfFirstNodeIndex',
|
| 655 |
+
'sfMissingValueV', 'sfXArray', 'sfXCActualEndF', 'sfXCActualStartF',
|
| 656 |
+
'sfXCEndIndex', 'sfXCEndSubsetV', 'sfXCEndV', 'sfXCStartIndex',
|
| 657 |
+
'sfXCStartSubsetV', 'sfXCStartV', 'sfXCStride', 'sfXCellBounds',
|
| 658 |
+
'sfYArray', 'sfYCActualEndF', 'sfYCActualStartF', 'sfYCEndIndex',
|
| 659 |
+
'sfYCEndSubsetV', 'sfYCEndV', 'sfYCStartIndex', 'sfYCStartSubsetV',
|
| 660 |
+
'sfYCStartV', 'sfYCStride', 'sfYCellBounds', 'stArrowLengthF',
|
| 661 |
+
'stArrowStride', 'stCrossoverCheckCount',
|
| 662 |
+
'stExplicitLabelBarLabelsOn', 'stLabelBarEndLabelsOn',
|
| 663 |
+
'stLabelFormat', 'stLengthCheckCount', 'stLevelColors',
|
| 664 |
+
'stLevelCount', 'stLevelPalette', 'stLevelSelectionMode',
|
| 665 |
+
'stLevelSpacingF', 'stLevels', 'stLineColor', 'stLineOpacityF',
|
| 666 |
+
'stLineStartStride', 'stLineThicknessF', 'stMapDirection',
|
| 667 |
+
'stMaxLevelCount', 'stMaxLevelValF', 'stMinArrowSpacingF',
|
| 668 |
+
'stMinDistanceF', 'stMinLevelValF', 'stMinLineSpacingF',
|
| 669 |
+
'stMinStepFactorF', 'stMonoLineColor', 'stNoDataLabelOn',
|
| 670 |
+
'stNoDataLabelString', 'stScalarFieldData', 'stScalarMissingValColor',
|
| 671 |
+
'stSpanLevelPalette', 'stStepSizeF', 'stStreamlineDrawOrder',
|
| 672 |
+
'stUseScalarArray', 'stVectorFieldData', 'stZeroFLabelAngleF',
|
| 673 |
+
'stZeroFLabelBackgroundColor', 'stZeroFLabelConstantSpacingF',
|
| 674 |
+
'stZeroFLabelFont', 'stZeroFLabelFontAspectF',
|
| 675 |
+
'stZeroFLabelFontColor', 'stZeroFLabelFontHeightF',
|
| 676 |
+
'stZeroFLabelFontQuality', 'stZeroFLabelFontThicknessF',
|
| 677 |
+
'stZeroFLabelFuncCode', 'stZeroFLabelJust', 'stZeroFLabelOn',
|
| 678 |
+
'stZeroFLabelOrthogonalPosF', 'stZeroFLabelParallelPosF',
|
| 679 |
+
'stZeroFLabelPerimColor', 'stZeroFLabelPerimOn',
|
| 680 |
+
'stZeroFLabelPerimSpaceF', 'stZeroFLabelPerimThicknessF',
|
| 681 |
+
'stZeroFLabelSide', 'stZeroFLabelString', 'stZeroFLabelTextDirection',
|
| 682 |
+
'stZeroFLabelZone', 'tfDoNDCOverlay', 'tfPlotManagerOn',
|
| 683 |
+
'tfPolyDrawList', 'tfPolyDrawOrder', 'tiDeltaF', 'tiMainAngleF',
|
| 684 |
+
'tiMainConstantSpacingF', 'tiMainDirection', 'tiMainFont',
|
| 685 |
+
'tiMainFontAspectF', 'tiMainFontColor', 'tiMainFontHeightF',
|
| 686 |
+
'tiMainFontQuality', 'tiMainFontThicknessF', 'tiMainFuncCode',
|
| 687 |
+
'tiMainJust', 'tiMainOffsetXF', 'tiMainOffsetYF', 'tiMainOn',
|
| 688 |
+
'tiMainPosition', 'tiMainSide', 'tiMainString', 'tiUseMainAttributes',
|
| 689 |
+
'tiXAxisAngleF', 'tiXAxisConstantSpacingF', 'tiXAxisDirection',
|
| 690 |
+
'tiXAxisFont', 'tiXAxisFontAspectF', 'tiXAxisFontColor',
|
| 691 |
+
'tiXAxisFontHeightF', 'tiXAxisFontQuality', 'tiXAxisFontThicknessF',
|
| 692 |
+
'tiXAxisFuncCode', 'tiXAxisJust', 'tiXAxisOffsetXF',
|
| 693 |
+
'tiXAxisOffsetYF', 'tiXAxisOn', 'tiXAxisPosition', 'tiXAxisSide',
|
| 694 |
+
'tiXAxisString', 'tiYAxisAngleF', 'tiYAxisConstantSpacingF',
|
| 695 |
+
'tiYAxisDirection', 'tiYAxisFont', 'tiYAxisFontAspectF',
|
| 696 |
+
'tiYAxisFontColor', 'tiYAxisFontHeightF', 'tiYAxisFontQuality',
|
| 697 |
+
'tiYAxisFontThicknessF', 'tiYAxisFuncCode', 'tiYAxisJust',
|
| 698 |
+
'tiYAxisOffsetXF', 'tiYAxisOffsetYF', 'tiYAxisOn', 'tiYAxisPosition',
|
| 699 |
+
'tiYAxisSide', 'tiYAxisString', 'tmBorderLineColor',
|
| 700 |
+
'tmBorderThicknessF', 'tmEqualizeXYSizes', 'tmLabelAutoStride',
|
| 701 |
+
'tmSciNoteCutoff', 'tmXBAutoPrecision', 'tmXBBorderOn',
|
| 702 |
+
'tmXBDataLeftF', 'tmXBDataRightF', 'tmXBFormat', 'tmXBIrrTensionF',
|
| 703 |
+
'tmXBIrregularPoints', 'tmXBLabelAngleF', 'tmXBLabelConstantSpacingF',
|
| 704 |
+
'tmXBLabelDeltaF', 'tmXBLabelDirection', 'tmXBLabelFont',
|
| 705 |
+
'tmXBLabelFontAspectF', 'tmXBLabelFontColor', 'tmXBLabelFontHeightF',
|
| 706 |
+
'tmXBLabelFontQuality', 'tmXBLabelFontThicknessF',
|
| 707 |
+
'tmXBLabelFuncCode', 'tmXBLabelJust', 'tmXBLabelStride', 'tmXBLabels',
|
| 708 |
+
'tmXBLabelsOn', 'tmXBMajorLengthF', 'tmXBMajorLineColor',
|
| 709 |
+
'tmXBMajorOutwardLengthF', 'tmXBMajorThicknessF', 'tmXBMaxLabelLenF',
|
| 710 |
+
'tmXBMaxTicks', 'tmXBMinLabelSpacingF', 'tmXBMinorLengthF',
|
| 711 |
+
'tmXBMinorLineColor', 'tmXBMinorOn', 'tmXBMinorOutwardLengthF',
|
| 712 |
+
'tmXBMinorPerMajor', 'tmXBMinorThicknessF', 'tmXBMinorValues',
|
| 713 |
+
'tmXBMode', 'tmXBOn', 'tmXBPrecision', 'tmXBStyle', 'tmXBTickEndF',
|
| 714 |
+
'tmXBTickSpacingF', 'tmXBTickStartF', 'tmXBValues', 'tmXMajorGrid',
|
| 715 |
+
'tmXMajorGridLineColor', 'tmXMajorGridLineDashPattern',
|
| 716 |
+
'tmXMajorGridThicknessF', 'tmXMinorGrid', 'tmXMinorGridLineColor',
|
| 717 |
+
'tmXMinorGridLineDashPattern', 'tmXMinorGridThicknessF',
|
| 718 |
+
'tmXTAutoPrecision', 'tmXTBorderOn', 'tmXTDataLeftF',
|
| 719 |
+
'tmXTDataRightF', 'tmXTFormat', 'tmXTIrrTensionF',
|
| 720 |
+
'tmXTIrregularPoints', 'tmXTLabelAngleF', 'tmXTLabelConstantSpacingF',
|
| 721 |
+
'tmXTLabelDeltaF', 'tmXTLabelDirection', 'tmXTLabelFont',
|
| 722 |
+
'tmXTLabelFontAspectF', 'tmXTLabelFontColor', 'tmXTLabelFontHeightF',
|
| 723 |
+
'tmXTLabelFontQuality', 'tmXTLabelFontThicknessF',
|
| 724 |
+
'tmXTLabelFuncCode', 'tmXTLabelJust', 'tmXTLabelStride', 'tmXTLabels',
|
| 725 |
+
'tmXTLabelsOn', 'tmXTMajorLengthF', 'tmXTMajorLineColor',
|
| 726 |
+
'tmXTMajorOutwardLengthF', 'tmXTMajorThicknessF', 'tmXTMaxLabelLenF',
|
| 727 |
+
'tmXTMaxTicks', 'tmXTMinLabelSpacingF', 'tmXTMinorLengthF',
|
| 728 |
+
'tmXTMinorLineColor', 'tmXTMinorOn', 'tmXTMinorOutwardLengthF',
|
| 729 |
+
'tmXTMinorPerMajor', 'tmXTMinorThicknessF', 'tmXTMinorValues',
|
| 730 |
+
'tmXTMode', 'tmXTOn', 'tmXTPrecision', 'tmXTStyle', 'tmXTTickEndF',
|
| 731 |
+
'tmXTTickSpacingF', 'tmXTTickStartF', 'tmXTValues', 'tmXUseBottom',
|
| 732 |
+
'tmYLAutoPrecision', 'tmYLBorderOn', 'tmYLDataBottomF',
|
| 733 |
+
'tmYLDataTopF', 'tmYLFormat', 'tmYLIrrTensionF',
|
| 734 |
+
'tmYLIrregularPoints', 'tmYLLabelAngleF', 'tmYLLabelConstantSpacingF',
|
| 735 |
+
'tmYLLabelDeltaF', 'tmYLLabelDirection', 'tmYLLabelFont',
|
| 736 |
+
'tmYLLabelFontAspectF', 'tmYLLabelFontColor', 'tmYLLabelFontHeightF',
|
| 737 |
+
'tmYLLabelFontQuality', 'tmYLLabelFontThicknessF',
|
| 738 |
+
'tmYLLabelFuncCode', 'tmYLLabelJust', 'tmYLLabelStride', 'tmYLLabels',
|
| 739 |
+
'tmYLLabelsOn', 'tmYLMajorLengthF', 'tmYLMajorLineColor',
|
| 740 |
+
'tmYLMajorOutwardLengthF', 'tmYLMajorThicknessF', 'tmYLMaxLabelLenF',
|
| 741 |
+
'tmYLMaxTicks', 'tmYLMinLabelSpacingF', 'tmYLMinorLengthF',
|
| 742 |
+
'tmYLMinorLineColor', 'tmYLMinorOn', 'tmYLMinorOutwardLengthF',
|
| 743 |
+
'tmYLMinorPerMajor', 'tmYLMinorThicknessF', 'tmYLMinorValues',
|
| 744 |
+
'tmYLMode', 'tmYLOn', 'tmYLPrecision', 'tmYLStyle', 'tmYLTickEndF',
|
| 745 |
+
'tmYLTickSpacingF', 'tmYLTickStartF', 'tmYLValues', 'tmYMajorGrid',
|
| 746 |
+
'tmYMajorGridLineColor', 'tmYMajorGridLineDashPattern',
|
| 747 |
+
'tmYMajorGridThicknessF', 'tmYMinorGrid', 'tmYMinorGridLineColor',
|
| 748 |
+
'tmYMinorGridLineDashPattern', 'tmYMinorGridThicknessF',
|
| 749 |
+
'tmYRAutoPrecision', 'tmYRBorderOn', 'tmYRDataBottomF',
|
| 750 |
+
'tmYRDataTopF', 'tmYRFormat', 'tmYRIrrTensionF',
|
| 751 |
+
'tmYRIrregularPoints', 'tmYRLabelAngleF', 'tmYRLabelConstantSpacingF',
|
| 752 |
+
'tmYRLabelDeltaF', 'tmYRLabelDirection', 'tmYRLabelFont',
|
| 753 |
+
'tmYRLabelFontAspectF', 'tmYRLabelFontColor', 'tmYRLabelFontHeightF',
|
| 754 |
+
'tmYRLabelFontQuality', 'tmYRLabelFontThicknessF',
|
| 755 |
+
'tmYRLabelFuncCode', 'tmYRLabelJust', 'tmYRLabelStride', 'tmYRLabels',
|
| 756 |
+
'tmYRLabelsOn', 'tmYRMajorLengthF', 'tmYRMajorLineColor',
|
| 757 |
+
'tmYRMajorOutwardLengthF', 'tmYRMajorThicknessF', 'tmYRMaxLabelLenF',
|
| 758 |
+
'tmYRMaxTicks', 'tmYRMinLabelSpacingF', 'tmYRMinorLengthF',
|
| 759 |
+
'tmYRMinorLineColor', 'tmYRMinorOn', 'tmYRMinorOutwardLengthF',
|
| 760 |
+
'tmYRMinorPerMajor', 'tmYRMinorThicknessF', 'tmYRMinorValues',
|
| 761 |
+
'tmYRMode', 'tmYROn', 'tmYRPrecision', 'tmYRStyle', 'tmYRTickEndF',
|
| 762 |
+
'tmYRTickSpacingF', 'tmYRTickStartF', 'tmYRValues', 'tmYUseLeft',
|
| 763 |
+
'trGridType', 'trLineInterpolationOn',
|
| 764 |
+
'trXAxisType', 'trXCoordPoints', 'trXInterPoints', 'trXLog',
|
| 765 |
+
'trXMaxF', 'trXMinF', 'trXReverse', 'trXSamples', 'trXTensionF',
|
| 766 |
+
'trYAxisType', 'trYCoordPoints', 'trYInterPoints', 'trYLog',
|
| 767 |
+
'trYMaxF', 'trYMinF', 'trYReverse', 'trYSamples', 'trYTensionF',
|
| 768 |
+
'txAngleF', 'txBackgroundFillColor', 'txConstantSpacingF', 'txDirection',
|
| 769 |
+
'txFont', 'HLU-Fonts', 'txFontAspectF', 'txFontColor',
|
| 770 |
+
'txFontHeightF', 'txFontOpacityF', 'txFontQuality',
|
| 771 |
+
'txFontThicknessF', 'txFuncCode', 'txJust', 'txPerimColor',
|
| 772 |
+
'txPerimDashLengthF', 'txPerimDashPattern', 'txPerimOn',
|
| 773 |
+
'txPerimSpaceF', 'txPerimThicknessF', 'txPosXF', 'txPosYF',
|
| 774 |
+
'txString', 'vcExplicitLabelBarLabelsOn', 'vcFillArrowEdgeColor',
|
| 775 |
+
'vcFillArrowEdgeThicknessF', 'vcFillArrowFillColor',
|
| 776 |
+
'vcFillArrowHeadInteriorXF', 'vcFillArrowHeadMinFracXF',
|
| 777 |
+
'vcFillArrowHeadMinFracYF', 'vcFillArrowHeadXF', 'vcFillArrowHeadYF',
|
| 778 |
+
'vcFillArrowMinFracWidthF', 'vcFillArrowWidthF', 'vcFillArrowsOn',
|
| 779 |
+
'vcFillOverEdge', 'vcGlyphOpacityF', 'vcGlyphStyle',
|
| 780 |
+
'vcLabelBarEndLabelsOn', 'vcLabelFontColor', 'vcLabelFontHeightF',
|
| 781 |
+
'vcLabelsOn', 'vcLabelsUseVectorColor', 'vcLevelColors',
|
| 782 |
+
'vcLevelCount', 'vcLevelPalette', 'vcLevelSelectionMode',
|
| 783 |
+
'vcLevelSpacingF', 'vcLevels', 'vcLineArrowColor',
|
| 784 |
+
'vcLineArrowHeadMaxSizeF', 'vcLineArrowHeadMinSizeF',
|
| 785 |
+
'vcLineArrowThicknessF', 'vcMagnitudeFormat',
|
| 786 |
+
'vcMagnitudeScaleFactorF', 'vcMagnitudeScaleValueF',
|
| 787 |
+
'vcMagnitudeScalingMode', 'vcMapDirection', 'vcMaxLevelCount',
|
| 788 |
+
'vcMaxLevelValF', 'vcMaxMagnitudeF', 'vcMinAnnoAngleF',
|
| 789 |
+
'vcMinAnnoArrowAngleF', 'vcMinAnnoArrowEdgeColor',
|
| 790 |
+
'vcMinAnnoArrowFillColor', 'vcMinAnnoArrowLineColor',
|
| 791 |
+
'vcMinAnnoArrowMinOffsetF', 'vcMinAnnoArrowSpaceF',
|
| 792 |
+
'vcMinAnnoArrowUseVecColor', 'vcMinAnnoBackgroundColor',
|
| 793 |
+
'vcMinAnnoConstantSpacingF', 'vcMinAnnoExplicitMagnitudeF',
|
| 794 |
+
'vcMinAnnoFont', 'vcMinAnnoFontAspectF', 'vcMinAnnoFontColor',
|
| 795 |
+
'vcMinAnnoFontHeightF', 'vcMinAnnoFontQuality',
|
| 796 |
+
'vcMinAnnoFontThicknessF', 'vcMinAnnoFuncCode', 'vcMinAnnoJust',
|
| 797 |
+
'vcMinAnnoOn', 'vcMinAnnoOrientation', 'vcMinAnnoOrthogonalPosF',
|
| 798 |
+
'vcMinAnnoParallelPosF', 'vcMinAnnoPerimColor', 'vcMinAnnoPerimOn',
|
| 799 |
+
'vcMinAnnoPerimSpaceF', 'vcMinAnnoPerimThicknessF', 'vcMinAnnoSide',
|
| 800 |
+
'vcMinAnnoString1', 'vcMinAnnoString1On', 'vcMinAnnoString2',
|
| 801 |
+
'vcMinAnnoString2On', 'vcMinAnnoTextDirection', 'vcMinAnnoZone',
|
| 802 |
+
'vcMinDistanceF', 'vcMinFracLengthF', 'vcMinLevelValF',
|
| 803 |
+
'vcMinMagnitudeF', 'vcMonoFillArrowEdgeColor',
|
| 804 |
+
'vcMonoFillArrowFillColor', 'vcMonoLineArrowColor',
|
| 805 |
+
'vcMonoWindBarbColor', 'vcNoDataLabelOn', 'vcNoDataLabelString',
|
| 806 |
+
'vcPositionMode', 'vcRefAnnoAngleF', 'vcRefAnnoArrowAngleF',
|
| 807 |
+
'vcRefAnnoArrowEdgeColor', 'vcRefAnnoArrowFillColor',
|
| 808 |
+
'vcRefAnnoArrowLineColor', 'vcRefAnnoArrowMinOffsetF',
|
| 809 |
+
'vcRefAnnoArrowSpaceF', 'vcRefAnnoArrowUseVecColor',
|
| 810 |
+
'vcRefAnnoBackgroundColor', 'vcRefAnnoConstantSpacingF',
|
| 811 |
+
'vcRefAnnoExplicitMagnitudeF', 'vcRefAnnoFont',
|
| 812 |
+
'vcRefAnnoFontAspectF', 'vcRefAnnoFontColor', 'vcRefAnnoFontHeightF',
|
| 813 |
+
'vcRefAnnoFontQuality', 'vcRefAnnoFontThicknessF',
|
| 814 |
+
'vcRefAnnoFuncCode', 'vcRefAnnoJust', 'vcRefAnnoOn',
|
| 815 |
+
'vcRefAnnoOrientation', 'vcRefAnnoOrthogonalPosF',
|
| 816 |
+
'vcRefAnnoParallelPosF', 'vcRefAnnoPerimColor', 'vcRefAnnoPerimOn',
|
| 817 |
+
'vcRefAnnoPerimSpaceF', 'vcRefAnnoPerimThicknessF', 'vcRefAnnoSide',
|
| 818 |
+
'vcRefAnnoString1', 'vcRefAnnoString1On', 'vcRefAnnoString2',
|
| 819 |
+
'vcRefAnnoString2On', 'vcRefAnnoTextDirection', 'vcRefAnnoZone',
|
| 820 |
+
'vcRefLengthF', 'vcRefMagnitudeF', 'vcScalarFieldData',
|
| 821 |
+
'vcScalarMissingValColor', 'vcScalarValueFormat',
|
| 822 |
+
'vcScalarValueScaleFactorF', 'vcScalarValueScaleValueF',
|
| 823 |
+
'vcScalarValueScalingMode', 'vcSpanLevelPalette', 'vcUseRefAnnoRes',
|
| 824 |
+
'vcUseScalarArray', 'vcVectorDrawOrder', 'vcVectorFieldData',
|
| 825 |
+
'vcWindBarbCalmCircleSizeF', 'vcWindBarbColor',
|
| 826 |
+
'vcWindBarbLineThicknessF', 'vcWindBarbScaleFactorF',
|
| 827 |
+
'vcWindBarbTickAngleF', 'vcWindBarbTickLengthF',
|
| 828 |
+
'vcWindBarbTickSpacingF', 'vcZeroFLabelAngleF',
|
| 829 |
+
'vcZeroFLabelBackgroundColor', 'vcZeroFLabelConstantSpacingF',
|
| 830 |
+
'vcZeroFLabelFont', 'vcZeroFLabelFontAspectF',
|
| 831 |
+
'vcZeroFLabelFontColor', 'vcZeroFLabelFontHeightF',
|
| 832 |
+
'vcZeroFLabelFontQuality', 'vcZeroFLabelFontThicknessF',
|
| 833 |
+
'vcZeroFLabelFuncCode', 'vcZeroFLabelJust', 'vcZeroFLabelOn',
|
| 834 |
+
'vcZeroFLabelOrthogonalPosF', 'vcZeroFLabelParallelPosF',
|
| 835 |
+
'vcZeroFLabelPerimColor', 'vcZeroFLabelPerimOn',
|
| 836 |
+
'vcZeroFLabelPerimSpaceF', 'vcZeroFLabelPerimThicknessF',
|
| 837 |
+
'vcZeroFLabelSide', 'vcZeroFLabelString', 'vcZeroFLabelTextDirection',
|
| 838 |
+
'vcZeroFLabelZone', 'vfCopyData', 'vfDataArray',
|
| 839 |
+
'vfExchangeDimensions', 'vfExchangeUVData', 'vfMagMaxV', 'vfMagMinV',
|
| 840 |
+
'vfMissingUValueV', 'vfMissingVValueV', 'vfPolarData',
|
| 841 |
+
'vfSingleMissingValue', 'vfUDataArray', 'vfUMaxV', 'vfUMinV',
|
| 842 |
+
'vfVDataArray', 'vfVMaxV', 'vfVMinV', 'vfXArray', 'vfXCActualEndF',
|
| 843 |
+
'vfXCActualStartF', 'vfXCEndIndex', 'vfXCEndSubsetV', 'vfXCEndV',
|
| 844 |
+
'vfXCStartIndex', 'vfXCStartSubsetV', 'vfXCStartV', 'vfXCStride',
|
| 845 |
+
'vfYArray', 'vfYCActualEndF', 'vfYCActualStartF', 'vfYCEndIndex',
|
| 846 |
+
'vfYCEndSubsetV', 'vfYCEndV', 'vfYCStartIndex', 'vfYCStartSubsetV',
|
| 847 |
+
'vfYCStartV', 'vfYCStride', 'vpAnnoManagerId', 'vpClipOn',
|
| 848 |
+
'vpHeightF', 'vpKeepAspect', 'vpOn', 'vpUseSegments', 'vpWidthF',
|
| 849 |
+
'vpXF', 'vpYF', 'wkAntiAlias', 'wkBackgroundColor', 'wkBackgroundOpacityF',
|
| 850 |
+
'wkColorMapLen', 'wkColorMap', 'wkColorModel', 'wkDashTableLength',
|
| 851 |
+
'wkDefGraphicStyleId', 'wkDeviceLowerX', 'wkDeviceLowerY',
|
| 852 |
+
'wkDeviceUpperX', 'wkDeviceUpperY', 'wkFileName', 'wkFillTableLength',
|
| 853 |
+
'wkForegroundColor', 'wkFormat', 'wkFullBackground', 'wkGksWorkId',
|
| 854 |
+
'wkHeight', 'wkMarkerTableLength', 'wkMetaName', 'wkOrientation',
|
| 855 |
+
'wkPDFFileName', 'wkPDFFormat', 'wkPDFResolution', 'wkPSFileName',
|
| 856 |
+
'wkPSFormat', 'wkPSResolution', 'wkPaperHeightF', 'wkPaperSize',
|
| 857 |
+
'wkPaperWidthF', 'wkPause', 'wkTopLevelViews', 'wkViews',
|
| 858 |
+
'wkVisualType', 'wkWidth', 'wkWindowId', 'wkXColorMode', 'wsCurrentSize',
|
| 859 |
+
'wsMaximumSize', 'wsThresholdSize', 'xyComputeXMax',
|
| 860 |
+
'xyComputeXMin', 'xyComputeYMax', 'xyComputeYMin', 'xyCoordData',
|
| 861 |
+
'xyCoordDataSpec', 'xyCurveDrawOrder', 'xyDashPattern',
|
| 862 |
+
'xyDashPatterns', 'xyExplicitLabels', 'xyExplicitLegendLabels',
|
| 863 |
+
'xyLabelMode', 'xyLineColor', 'xyLineColors', 'xyLineDashSegLenF',
|
| 864 |
+
'xyLineLabelConstantSpacingF', 'xyLineLabelFont',
|
| 865 |
+
'xyLineLabelFontAspectF', 'xyLineLabelFontColor',
|
| 866 |
+
'xyLineLabelFontColors', 'xyLineLabelFontHeightF',
|
| 867 |
+
'xyLineLabelFontQuality', 'xyLineLabelFontThicknessF',
|
| 868 |
+
'xyLineLabelFuncCode', 'xyLineThicknessF', 'xyLineThicknesses',
|
| 869 |
+
'xyMarkLineMode', 'xyMarkLineModes', 'xyMarker', 'xyMarkerColor',
|
| 870 |
+
'xyMarkerColors', 'xyMarkerSizeF', 'xyMarkerSizes',
|
| 871 |
+
'xyMarkerThicknessF', 'xyMarkerThicknesses', 'xyMarkers',
|
| 872 |
+
'xyMonoDashPattern', 'xyMonoLineColor', 'xyMonoLineLabelFontColor',
|
| 873 |
+
'xyMonoLineThickness', 'xyMonoMarkLineMode', 'xyMonoMarker',
|
| 874 |
+
'xyMonoMarkerColor', 'xyMonoMarkerSize', 'xyMonoMarkerThickness',
|
| 875 |
+
'xyXIrrTensionF', 'xyXIrregularPoints', 'xyXStyle', 'xyYIrrTensionF',
|
| 876 |
+
'xyYIrregularPoints', 'xyYStyle'), prefix=r'\b'),
|
| 877 |
+
Name.Builtin),
|
| 878 |
+
|
| 879 |
+
# Booleans
|
| 880 |
+
(r'\.(True|False)\.', Name.Builtin),
|
| 881 |
+
# Comparing Operators
|
| 882 |
+
(r'\.(eq|ne|lt|le|gt|ge|not|and|or|xor)\.', Operator.Word),
|
| 883 |
+
],
|
| 884 |
+
|
| 885 |
+
'strings': [
|
| 886 |
+
(r'(?s)"(\\\\|\\[0-7]+|\\.|[^"\\])*"', String.Double),
|
| 887 |
+
],
|
| 888 |
+
|
| 889 |
+
'nums': [
|
| 890 |
+
(r'\d+(?![.e])(_[a-z]\w+)?', Number.Integer),
|
| 891 |
+
(r'[+-]?\d*\.\d+(e[-+]?\d+)?(_[a-z]\w+)?', Number.Float),
|
| 892 |
+
(r'[+-]?\d+\.\d*(e[-+]?\d+)?(_[a-z]\w+)?', Number.Float),
|
| 893 |
+
],
|
| 894 |
+
}
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/nit.py
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.nit
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexer for the Nit language.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
from pygments.lexer import RegexLexer, words
|
| 13 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 14 |
+
Number, Punctuation
|
| 15 |
+
|
| 16 |
+
__all__ = ['NitLexer']
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
class NitLexer(RegexLexer):
|
| 20 |
+
"""
|
| 21 |
+
For `nit <http://nitlanguage.org>`_ source.
|
| 22 |
+
|
| 23 |
+
.. versionadded:: 2.0
|
| 24 |
+
"""
|
| 25 |
+
|
| 26 |
+
name = 'Nit'
|
| 27 |
+
aliases = ['nit']
|
| 28 |
+
filenames = ['*.nit']
|
| 29 |
+
tokens = {
|
| 30 |
+
'root': [
|
| 31 |
+
(r'#.*?$', Comment.Single),
|
| 32 |
+
(words((
|
| 33 |
+
'package', 'module', 'import', 'class', 'abstract', 'interface',
|
| 34 |
+
'universal', 'enum', 'end', 'fun', 'type', 'init', 'redef',
|
| 35 |
+
'isa', 'do', 'readable', 'writable', 'var', 'intern', 'extern',
|
| 36 |
+
'public', 'protected', 'private', 'intrude', 'if', 'then',
|
| 37 |
+
'else', 'while', 'loop', 'for', 'in', 'and', 'or', 'not',
|
| 38 |
+
'implies', 'return', 'continue', 'break', 'abort', 'assert',
|
| 39 |
+
'new', 'is', 'once', 'super', 'self', 'true', 'false', 'nullable',
|
| 40 |
+
'null', 'as', 'isset', 'label', '__debug__'), suffix=r'(?=[\r\n\t( ])'),
|
| 41 |
+
Keyword),
|
| 42 |
+
(r'[A-Z]\w*', Name.Class),
|
| 43 |
+
(r'"""(([^\'\\]|\\.)|\\r|\\n)*((\{\{?)?(""?\{\{?)*""""*)', String), # Simple long string
|
| 44 |
+
(r'\'\'\'(((\\.|[^\'\\])|\\r|\\n)|\'((\\.|[^\'\\])|\\r|\\n)|'
|
| 45 |
+
r'\'\'((\\.|[^\'\\])|\\r|\\n))*\'\'\'', String), # Simple long string alt
|
| 46 |
+
(r'"""(([^\'\\]|\\.)|\\r|\\n)*((""?)?(\{\{?""?)*\{\{\{\{*)', String), # Start long string
|
| 47 |
+
(r'\}\}\}(((\\.|[^\'\\])|\\r|\\n))*(""?)?(\{\{?""?)*\{\{\{\{*', String), # Mid long string
|
| 48 |
+
(r'\}\}\}(((\\.|[^\'\\])|\\r|\\n))*(\{\{?)?(""?\{\{?)*""""*', String), # End long string
|
| 49 |
+
(r'"(\\.|([^"}{\\]))*"', String), # Simple String
|
| 50 |
+
(r'"(\\.|([^"}{\\]))*\{', String), # Start string
|
| 51 |
+
(r'\}(\\.|([^"}{\\]))*\{', String), # Mid String
|
| 52 |
+
(r'\}(\\.|([^"}{\\]))*"', String), # End String
|
| 53 |
+
(r'(\'[^\'\\]\')|(\'\\.\')', String.Char),
|
| 54 |
+
(r'[0-9]+', Number.Integer),
|
| 55 |
+
(r'[0-9]*.[0-9]+', Number.Float),
|
| 56 |
+
(r'0(x|X)[0-9A-Fa-f]+', Number.Hex),
|
| 57 |
+
(r'[a-z]\w*', Name),
|
| 58 |
+
(r'_\w+', Name.Variable.Instance),
|
| 59 |
+
(r'==|!=|<==>|>=|>>|>|<=|<<|<|\+|-|=|/|\*|%|\+=|-=|!|@', Operator),
|
| 60 |
+
(r'\(|\)|\[|\]|,|\.\.\.|\.\.|\.|::|:', Punctuation),
|
| 61 |
+
(r'`\{[^`]*`\}', Text), # Extern blocks won't be Lexed by Nit
|
| 62 |
+
(r'[\r\n\t ]+', Text),
|
| 63 |
+
],
|
| 64 |
+
}
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/nix.py
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|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
import re
|
| 13 |
+
|
| 14 |
+
from pygments.lexer import RegexLexer, include
|
| 15 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 16 |
+
Number, Punctuation, Literal
|
| 17 |
+
|
| 18 |
+
__all__ = ['NixLexer']
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
class NixLexer(RegexLexer):
|
| 22 |
+
"""
|
| 23 |
+
For the `Nix language <http://nixos.org/nix/>`_.
|
| 24 |
+
|
| 25 |
+
.. versionadded:: 2.0
|
| 26 |
+
"""
|
| 27 |
+
|
| 28 |
+
name = 'Nix'
|
| 29 |
+
aliases = ['nixos', 'nix']
|
| 30 |
+
filenames = ['*.nix']
|
| 31 |
+
mimetypes = ['text/x-nix']
|
| 32 |
+
|
| 33 |
+
flags = re.MULTILINE | re.UNICODE
|
| 34 |
+
|
| 35 |
+
keywords = ['rec', 'with', 'let', 'in', 'inherit', 'assert', 'if',
|
| 36 |
+
'else', 'then', '...']
|
| 37 |
+
builtins = ['import', 'abort', 'baseNameOf', 'dirOf', 'isNull', 'builtins',
|
| 38 |
+
'map', 'removeAttrs', 'throw', 'toString', 'derivation']
|
| 39 |
+
operators = ['++', '+', '?', '.', '!', '//', '==',
|
| 40 |
+
'!=', '&&', '||', '->', '=']
|
| 41 |
+
|
| 42 |
+
punctuations = ["(", ")", "[", "]", ";", "{", "}", ":", ",", "@"]
|
| 43 |
+
|
| 44 |
+
tokens = {
|
| 45 |
+
'root': [
|
| 46 |
+
# comments starting with #
|
| 47 |
+
(r'#.*$', Comment.Single),
|
| 48 |
+
|
| 49 |
+
# multiline comments
|
| 50 |
+
(r'/\*', Comment.Multiline, 'comment'),
|
| 51 |
+
|
| 52 |
+
# whitespace
|
| 53 |
+
(r'\s+', Text),
|
| 54 |
+
|
| 55 |
+
# keywords
|
| 56 |
+
('(%s)' % '|'.join(re.escape(entry) + '\\b' for entry in keywords), Keyword),
|
| 57 |
+
|
| 58 |
+
# highlight the builtins
|
| 59 |
+
('(%s)' % '|'.join(re.escape(entry) + '\\b' for entry in builtins),
|
| 60 |
+
Name.Builtin),
|
| 61 |
+
|
| 62 |
+
(r'\b(true|false|null)\b', Name.Constant),
|
| 63 |
+
|
| 64 |
+
# operators
|
| 65 |
+
('(%s)' % '|'.join(re.escape(entry) for entry in operators),
|
| 66 |
+
Operator),
|
| 67 |
+
|
| 68 |
+
# word operators
|
| 69 |
+
(r'\b(or|and)\b', Operator.Word),
|
| 70 |
+
|
| 71 |
+
# punctuations
|
| 72 |
+
('(%s)' % '|'.join(re.escape(entry) for entry in punctuations), Punctuation),
|
| 73 |
+
|
| 74 |
+
# integers
|
| 75 |
+
(r'[0-9]+', Number.Integer),
|
| 76 |
+
|
| 77 |
+
# strings
|
| 78 |
+
(r'"', String.Double, 'doublequote'),
|
| 79 |
+
(r"''", String.Single, 'singlequote'),
|
| 80 |
+
|
| 81 |
+
# paths
|
| 82 |
+
(r'[\w.+-]*(\/[\w.+-]+)+', Literal),
|
| 83 |
+
(r'\<[\w.+-]+(\/[\w.+-]+)*\>', Literal),
|
| 84 |
+
|
| 85 |
+
# urls
|
| 86 |
+
(r'[a-zA-Z][a-zA-Z0-9\+\-\.]*\:[\w%/?:@&=+$,\\.!~*\'-]+', Literal),
|
| 87 |
+
|
| 88 |
+
# names of variables
|
| 89 |
+
(r'[\w-]+\s*=', String.Symbol),
|
| 90 |
+
(r'[a-zA-Z_][\w\'-]*', Text),
|
| 91 |
+
|
| 92 |
+
],
|
| 93 |
+
'comment': [
|
| 94 |
+
(r'[^/*]+', Comment.Multiline),
|
| 95 |
+
(r'/\*', Comment.Multiline, '#push'),
|
| 96 |
+
(r'\*/', Comment.Multiline, '#pop'),
|
| 97 |
+
(r'[*/]', Comment.Multiline),
|
| 98 |
+
],
|
| 99 |
+
'singlequote': [
|
| 100 |
+
(r"'''", String.Escape),
|
| 101 |
+
(r"''\$\{", String.Escape),
|
| 102 |
+
(r"''\n", String.Escape),
|
| 103 |
+
(r"''\r", String.Escape),
|
| 104 |
+
(r"''\t", String.Escape),
|
| 105 |
+
(r"''", String.Single, '#pop'),
|
| 106 |
+
(r'\$\{', String.Interpol, 'antiquote'),
|
| 107 |
+
(r"[^']", String.Single),
|
| 108 |
+
],
|
| 109 |
+
'doublequote': [
|
| 110 |
+
(r'\\', String.Escape),
|
| 111 |
+
(r'\\"', String.Escape),
|
| 112 |
+
(r'\\$\{', String.Escape),
|
| 113 |
+
(r'"', String.Double, '#pop'),
|
| 114 |
+
(r'\$\{', String.Interpol, 'antiquote'),
|
| 115 |
+
(r'[^"]', String.Double),
|
| 116 |
+
],
|
| 117 |
+
'antiquote': [
|
| 118 |
+
(r"\}", String.Interpol, '#pop'),
|
| 119 |
+
# TODO: we should probably escape also here ''${ \${
|
| 120 |
+
(r"\$\{", String.Interpol, '#push'),
|
| 121 |
+
include('root'),
|
| 122 |
+
],
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
def analyse_text(text):
|
| 126 |
+
rv = 0.0
|
| 127 |
+
# TODO: let/in
|
| 128 |
+
if re.search(r'import.+?<[^>]+>', text):
|
| 129 |
+
rv += 0.4
|
| 130 |
+
if re.search(r'mkDerivation\s+(\(|\{|rec)', text):
|
| 131 |
+
rv += 0.4
|
| 132 |
+
if re.search(r'=\s+mkIf\s+', text):
|
| 133 |
+
rv += 0.4
|
| 134 |
+
if re.search(r'\{[a-zA-Z,\s]+\}:', text):
|
| 135 |
+
rv += 0.1
|
| 136 |
+
return rv
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/oberon.py
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.oberon
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexers for Oberon family languages.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 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, words
|
| 15 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 16 |
+
Number, Punctuation
|
| 17 |
+
|
| 18 |
+
__all__ = ['ComponentPascalLexer']
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
class ComponentPascalLexer(RegexLexer):
|
| 22 |
+
"""
|
| 23 |
+
For `Component Pascal <http://www.oberon.ch/pdf/CP-Lang.pdf>`_ source code.
|
| 24 |
+
|
| 25 |
+
.. versionadded:: 2.1
|
| 26 |
+
"""
|
| 27 |
+
name = 'Component Pascal'
|
| 28 |
+
aliases = ['componentpascal', 'cp']
|
| 29 |
+
filenames = ['*.cp', '*.cps']
|
| 30 |
+
mimetypes = ['text/x-component-pascal']
|
| 31 |
+
|
| 32 |
+
flags = re.MULTILINE | re.DOTALL
|
| 33 |
+
|
| 34 |
+
tokens = {
|
| 35 |
+
'root': [
|
| 36 |
+
include('whitespace'),
|
| 37 |
+
include('comments'),
|
| 38 |
+
include('punctuation'),
|
| 39 |
+
include('numliterals'),
|
| 40 |
+
include('strings'),
|
| 41 |
+
include('operators'),
|
| 42 |
+
include('builtins'),
|
| 43 |
+
include('identifiers'),
|
| 44 |
+
],
|
| 45 |
+
'whitespace': [
|
| 46 |
+
(r'\n+', Text), # blank lines
|
| 47 |
+
(r'\s+', Text), # whitespace
|
| 48 |
+
],
|
| 49 |
+
'comments': [
|
| 50 |
+
(r'\(\*([^$].*?)\*\)', Comment.Multiline),
|
| 51 |
+
# TODO: nested comments (* (* ... *) ... (* ... *) *) not supported!
|
| 52 |
+
],
|
| 53 |
+
'punctuation': [
|
| 54 |
+
(r'[()\[\]{},.:;|]', Punctuation),
|
| 55 |
+
],
|
| 56 |
+
'numliterals': [
|
| 57 |
+
(r'[0-9A-F]+X\b', Number.Hex), # char code
|
| 58 |
+
(r'[0-9A-F]+[HL]\b', Number.Hex), # hexadecimal number
|
| 59 |
+
(r'[0-9]+\.[0-9]+E[+-][0-9]+', Number.Float), # real number
|
| 60 |
+
(r'[0-9]+\.[0-9]+', Number.Float), # real number
|
| 61 |
+
(r'[0-9]+', Number.Integer), # decimal whole number
|
| 62 |
+
],
|
| 63 |
+
'strings': [
|
| 64 |
+
(r"'[^\n']*'", String), # single quoted string
|
| 65 |
+
(r'"[^\n"]*"', String), # double quoted string
|
| 66 |
+
],
|
| 67 |
+
'operators': [
|
| 68 |
+
# Arithmetic Operators
|
| 69 |
+
(r'[+-]', Operator),
|
| 70 |
+
(r'[*/]', Operator),
|
| 71 |
+
# Relational Operators
|
| 72 |
+
(r'[=#<>]', Operator),
|
| 73 |
+
# Dereferencing Operator
|
| 74 |
+
(r'\^', Operator),
|
| 75 |
+
# Logical AND Operator
|
| 76 |
+
(r'&', Operator),
|
| 77 |
+
# Logical NOT Operator
|
| 78 |
+
(r'~', Operator),
|
| 79 |
+
# Assignment Symbol
|
| 80 |
+
(r':=', Operator),
|
| 81 |
+
# Range Constructor
|
| 82 |
+
(r'\.\.', Operator),
|
| 83 |
+
(r'\$', Operator),
|
| 84 |
+
],
|
| 85 |
+
'identifiers': [
|
| 86 |
+
(r'([a-zA-Z_$][\w$]*)', Name),
|
| 87 |
+
],
|
| 88 |
+
'builtins': [
|
| 89 |
+
(words((
|
| 90 |
+
'ANYPTR', 'ANYREC', 'BOOLEAN', 'BYTE', 'CHAR', 'INTEGER', 'LONGINT',
|
| 91 |
+
'REAL', 'SET', 'SHORTCHAR', 'SHORTINT', 'SHORTREAL'
|
| 92 |
+
), suffix=r'\b'), Keyword.Type),
|
| 93 |
+
(words((
|
| 94 |
+
'ABS', 'ABSTRACT', 'ARRAY', 'ASH', 'ASSERT', 'BEGIN', 'BITS', 'BY',
|
| 95 |
+
'CAP', 'CASE', 'CHR', 'CLOSE', 'CONST', 'DEC', 'DIV', 'DO', 'ELSE',
|
| 96 |
+
'ELSIF', 'EMPTY', 'END', 'ENTIER', 'EXCL', 'EXIT', 'EXTENSIBLE', 'FOR',
|
| 97 |
+
'HALT', 'IF', 'IMPORT', 'IN', 'INC', 'INCL', 'IS', 'LEN', 'LIMITED',
|
| 98 |
+
'LONG', 'LOOP', 'MAX', 'MIN', 'MOD', 'MODULE', 'NEW', 'ODD', 'OF',
|
| 99 |
+
'OR', 'ORD', 'OUT', 'POINTER', 'PROCEDURE', 'RECORD', 'REPEAT', 'RETURN',
|
| 100 |
+
'SHORT', 'SHORTCHAR', 'SHORTINT', 'SIZE', 'THEN', 'TYPE', 'TO', 'UNTIL',
|
| 101 |
+
'VAR', 'WHILE', 'WITH'
|
| 102 |
+
), suffix=r'\b'), Keyword.Reserved),
|
| 103 |
+
(r'(TRUE|FALSE|NIL|INF)\b', Keyword.Constant),
|
| 104 |
+
]
|
| 105 |
+
}
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/other.py
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.other
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Just export lexer classes previously contained in this module.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
|
| 9 |
+
:license: BSD, see LICENSE for details.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
from pygments.lexers.sql import SqlLexer, MySqlLexer, SqliteConsoleLexer
|
| 13 |
+
from pygments.lexers.shell import BashLexer, BashSessionLexer, BatchLexer, \
|
| 14 |
+
TcshLexer
|
| 15 |
+
from pygments.lexers.robotframework import RobotFrameworkLexer
|
| 16 |
+
from pygments.lexers.testing import GherkinLexer
|
| 17 |
+
from pygments.lexers.esoteric import BrainfuckLexer, BefungeLexer, RedcodeLexer
|
| 18 |
+
from pygments.lexers.prolog import LogtalkLexer
|
| 19 |
+
from pygments.lexers.snobol import SnobolLexer
|
| 20 |
+
from pygments.lexers.rebol import RebolLexer
|
| 21 |
+
from pygments.lexers.configs import KconfigLexer, Cfengine3Lexer
|
| 22 |
+
from pygments.lexers.modeling import ModelicaLexer
|
| 23 |
+
from pygments.lexers.scripting import AppleScriptLexer, MOOCodeLexer, \
|
| 24 |
+
HybrisLexer
|
| 25 |
+
from pygments.lexers.graphics import PostScriptLexer, GnuplotLexer, \
|
| 26 |
+
AsymptoteLexer, PovrayLexer
|
| 27 |
+
from pygments.lexers.business import ABAPLexer, OpenEdgeLexer, \
|
| 28 |
+
GoodDataCLLexer, MaqlLexer
|
| 29 |
+
from pygments.lexers.automation import AutoItLexer, AutohotkeyLexer
|
| 30 |
+
from pygments.lexers.dsls import ProtoBufLexer, BroLexer, PuppetLexer, \
|
| 31 |
+
MscgenLexer, VGLLexer
|
| 32 |
+
from pygments.lexers.basic import CbmBasicV2Lexer
|
| 33 |
+
from pygments.lexers.pawn import SourcePawnLexer, PawnLexer
|
| 34 |
+
from pygments.lexers.ecl import ECLLexer
|
| 35 |
+
from pygments.lexers.urbi import UrbiscriptLexer
|
| 36 |
+
from pygments.lexers.smalltalk import SmalltalkLexer, NewspeakLexer
|
| 37 |
+
from pygments.lexers.installers import NSISLexer, RPMSpecLexer
|
| 38 |
+
from pygments.lexers.textedit import AwkLexer
|
| 39 |
+
from pygments.lexers.smv import NuSMVLexer
|
| 40 |
+
|
| 41 |
+
__all__ = []
|
evalkit_cambrian/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/parasail.py
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
pygments.lexers.parasail
|
| 4 |
+
~~~~~~~~~~~~~~~~~~~~~~~~
|
| 5 |
+
|
| 6 |
+
Lexer for ParaSail.
|
| 7 |
+
|
| 8 |
+
:copyright: Copyright 2006-2017 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
|
| 15 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 16 |
+
Number, Punctuation, Literal
|
| 17 |
+
|
| 18 |
+
__all__ = ['ParaSailLexer']
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
class ParaSailLexer(RegexLexer):
|
| 22 |
+
"""
|
| 23 |
+
For `ParaSail <http://www.parasail-lang.org>`_ source code.
|
| 24 |
+
|
| 25 |
+
.. versionadded:: 2.1
|
| 26 |
+
"""
|
| 27 |
+
|
| 28 |
+
name = 'ParaSail'
|
| 29 |
+
aliases = ['parasail']
|
| 30 |
+
filenames = ['*.psi', '*.psl']
|
| 31 |
+
mimetypes = ['text/x-parasail']
|
| 32 |
+
|
| 33 |
+
flags = re.MULTILINE
|
| 34 |
+
|
| 35 |
+
tokens = {
|
| 36 |
+
'root': [
|
| 37 |
+
(r'[^\S\n]+', Text),
|
| 38 |
+
(r'//.*?\n', Comment.Single),
|
| 39 |
+
(r'\b(and|or|xor)=', Operator.Word),
|
| 40 |
+
(r'\b(and(\s+then)?|or(\s+else)?|xor|rem|mod|'
|
| 41 |
+
r'(is|not)\s+null)\b',
|
| 42 |
+
Operator.Word),
|
| 43 |
+
# Keywords
|
| 44 |
+
(r'\b(abs|abstract|all|block|class|concurrent|const|continue|'
|
| 45 |
+
r'each|end|exit|extends|exports|forward|func|global|implements|'
|
| 46 |
+
r'import|in|interface|is|lambda|locked|new|not|null|of|op|'
|
| 47 |
+
r'optional|private|queued|ref|return|reverse|separate|some|'
|
| 48 |
+
r'type|until|var|with|'
|
| 49 |
+
# Control flow
|
| 50 |
+
r'if|then|else|elsif|case|for|while|loop)\b',
|
| 51 |
+
Keyword.Reserved),
|
| 52 |
+
(r'(abstract\s+)?(interface|class|op|func|type)',
|
| 53 |
+
Keyword.Declaration),
|
| 54 |
+
# Literals
|
| 55 |
+
(r'"[^"]*"', String),
|
| 56 |
+
(r'\\[\'ntrf"0]', String.Escape),
|
| 57 |
+
(r'#[a-zA-Z]\w*', Literal), # Enumeration
|
| 58 |
+
include('numbers'),
|
| 59 |
+
(r"'[^']'", String.Char),
|
| 60 |
+
(r'[a-zA-Z]\w*', Name),
|
| 61 |
+
# Operators and Punctuation
|
| 62 |
+
(r'(<==|==>|<=>|\*\*=|<\|=|<<=|>>=|==|!=|=\?|<=|>=|'
|
| 63 |
+
r'\*\*|<<|>>|=>|:=|\+=|-=|\*=|\|=|\||/=|\+|-|\*|/|'
|
| 64 |
+
r'\.\.|<\.\.|\.\.<|<\.\.<)',
|
| 65 |
+
Operator),
|
| 66 |
+
(r'(<|>|\[|\]|\(|\)|\||:|;|,|.|\{|\}|->)',
|
| 67 |
+
Punctuation),
|
| 68 |
+
(r'\n+', Text),
|
| 69 |
+
],
|
| 70 |
+
'numbers': [
|
| 71 |
+
(r'\d[0-9_]*#[0-9a-fA-F][0-9a-fA-F_]*#', Number.Hex), # any base
|
| 72 |
+
(r'0[xX][0-9a-fA-F][0-9a-fA-F_]*', Number.Hex), # C-like hex
|
| 73 |
+
(r'0[bB][01][01_]*', Number.Bin), # C-like bin
|
| 74 |
+
(r'\d[0-9_]*\.\d[0-9_]*[eE][+-]\d[0-9_]*', # float exp
|
| 75 |
+
Number.Float),
|
| 76 |
+
(r'\d[0-9_]*\.\d[0-9_]*', Number.Float), # float
|
| 77 |
+
(r'\d[0-9_]*', Number.Integer), # integer
|
| 78 |
+
],
|
| 79 |
+
}
|