diff options
author | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-06-09 14:39:19 +0300 |
---|---|---|
committer | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-06-09 14:39:19 +0300 |
commit | c04b663c7bb4b750deeb8f48f620497ec13da8fa (patch) | |
tree | 151ebc8bfdd2ad918caf5e6e2d8013e14272ddf8 | |
parent | 0d55ca22c507d18c2f35718687e0b06d9915397b (diff) | |
download | ydb-c04b663c7bb4b750deeb8f48f620497ec13da8fa.tar.gz |
intermediate changes
ref:2d4f292087954c9344efdabb7b2a67f466263c65
296 files changed, 8534 insertions, 3473 deletions
diff --git a/build/prebuilt/tools/enum_parser/enum_parser/ya.make.resource b/build/prebuilt/tools/enum_parser/enum_parser/ya.make.resource index f4ba3bbfae..db50ed37eb 100644 --- a/build/prebuilt/tools/enum_parser/enum_parser/ya.make.resource +++ b/build/prebuilt/tools/enum_parser/enum_parser/ya.make.resource @@ -1,9 +1,9 @@ IF (OS_DARWIN AND ARCH_X86_64) - SET(SANDBOX_RESOURCE_ID 2265845868) + SET(SANDBOX_RESOURCE_ID 3177959267) ELSEIF (OS_LINUX AND ARCH_X86_64) - SET(SANDBOX_RESOURCE_ID 2265846387) + SET(SANDBOX_RESOURCE_ID 3177959530) ELSEIF (OS_WINDOWS AND ARCH_X86_64) - SET(SANDBOX_RESOURCE_ID 2265845307) + SET(SANDBOX_RESOURCE_ID 3177958876) ELSE() SET(SANDBOX_RESOURCE_ID) ENDIF() diff --git a/contrib/python/Pygments/py3/.dist-info/METADATA b/contrib/python/Pygments/py3/.dist-info/METADATA index d1bac735c8..eec80799a7 100644 --- a/contrib/python/Pygments/py3/.dist-info/METADATA +++ b/contrib/python/Pygments/py3/.dist-info/METADATA @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: Pygments -Version: 2.11.2 +Version: 2.12.0 Summary: Pygments is a syntax highlighting package written in Python. Home-page: https://pygments.org/ Author: Georg Brandl @@ -20,7 +20,6 @@ Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 @@ -30,7 +29,7 @@ Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Text Processing :: Filters Classifier: Topic :: Utilities -Requires-Python: >=3.5 +Requires-Python: >=3.6 License-File: LICENSE License-File: AUTHORS diff --git a/contrib/python/Pygments/py3/.dist-info/entry_points.txt b/contrib/python/Pygments/py3/.dist-info/entry_points.txt index 756d801bdf..15498e35f5 100644 --- a/contrib/python/Pygments/py3/.dist-info/entry_points.txt +++ b/contrib/python/Pygments/py3/.dist-info/entry_points.txt @@ -1,3 +1,2 @@ [console_scripts] pygmentize = pygments.cmdline:main - diff --git a/contrib/python/Pygments/py3/AUTHORS b/contrib/python/Pygments/py3/AUTHORS index d33be64878..9f417bf909 100644 --- a/contrib/python/Pygments/py3/AUTHORS +++ b/contrib/python/Pygments/py3/AUTHORS @@ -16,6 +16,7 @@ Other contributors, listed alphabetically, are: * Andreas Amann -- AppleScript lexer * Timothy Armstrong -- Dart lexer fixes * Jeffrey Arnold -- R/S, Rd, BUGS, Jags, and Stan lexers +* Eiríkr Åsheim -- Uxntal lexer * Jeremy Ashkenas -- CoffeeScript lexer * José Joaquín Atria -- Praat lexer * Stefan Matthias Aust -- Smalltalk lexer @@ -50,6 +51,7 @@ Other contributors, listed alphabetically, are: * Pete Curry -- bugfixes * Bryan Davis -- EBNF lexer * Bruno Deferrari -- Shen lexer +* Walter Dörwald -- UL4 lexer * Luke Drummond -- Meson lexer * Giedrius Dubinskas -- HTML formatter improvements * Owen Durni -- Haxe lexer @@ -145,7 +147,7 @@ Other contributors, listed alphabetically, are: * Stephen McKamey -- Duel/JBST lexer * Brian McKenna -- F# lexer * Charles McLaughlin -- Puppet lexer -* Kurt McKee -- Tera Term macro lexer, PostgreSQL updates, MySQL overhaul +* Kurt McKee -- Tera Term macro lexer, PostgreSQL updates, MySQL overhaul, JSON lexer * Joe Eli McIlvain -- Savi lexer * Lukas Meuser -- BBCode formatter, Lua lexer * Cat Miller -- Pig lexer @@ -176,6 +178,7 @@ Other contributors, listed alphabetically, are: * Clément Prévost -- UrbiScript lexer * Tanner Prynn -- cmdline -x option and loading lexers from files * Oleh Prypin -- Crystal lexer (based on Ruby lexer) +* Nick Psaris -- K and Q lexers * Xidorn Quan -- Web IDL lexer * Elias Rabel -- Fortran fixed form lexer * raichoo -- Idris lexer @@ -185,6 +188,7 @@ Other contributors, listed alphabetically, are: * Justin Reidy -- MXML lexer * Norman Richards -- JSON lexer * Corey Richardson -- Rust lexer updates +* Fabrizio Riguzzi -- cplint leder * Lubomir Rintel -- GoodData MAQL and CL lexers * Andre Roberge -- Tango style * Georg Rollinger -- HSAIL lexer @@ -221,6 +225,7 @@ Other contributors, listed alphabetically, are: * Jeremy Thurgood -- Erlang, Squid config lexers * Brian Tiffin -- OpenCOBOL lexer * Bob Tolbert -- Hy lexer +* Doug Torrance -- Macaulay2 lexer * Matthias Trute -- Forth lexer * Tuoa Spi T4 -- Bdd lexer * Erick Tryzelaar -- Felix lexer diff --git a/contrib/python/Pygments/py3/LICENSE b/contrib/python/Pygments/py3/LICENSE index e1b15663d9..446a1a805c 100644 --- a/contrib/python/Pygments/py3/LICENSE +++ b/contrib/python/Pygments/py3/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2006-2021 by the respective authors (see AUTHORS file). +Copyright (c) 2006-2022 by the respective authors (see AUTHORS file). All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/contrib/python/Pygments/py3/README.rst b/contrib/python/Pygments/py3/README.rst index 77b2d565c0..9974cbbe1b 100644 --- a/contrib/python/Pygments/py3/README.rst +++ b/contrib/python/Pygments/py3/README.rst @@ -30,6 +30,10 @@ Continuous testing runs on GitHub workflows: .. image:: https://github.com/pygments/pygments/workflows/Pygments/badge.svg :target: https://github.com/pygments/pygments/actions?query=workflow%3APygments +Contribution guidelines are found in Contributing.md_. + +.. _Contributing.md: https://github.com/pygments/pygments/blob/master/Contributing.md + The authors ----------- diff --git a/contrib/python/Pygments/py3/pygments/__init__.py b/contrib/python/Pygments/py3/pygments/__init__.py index 22c50b356a..52ff035dd4 100644 --- a/contrib/python/Pygments/py3/pygments/__init__.py +++ b/contrib/python/Pygments/py3/pygments/__init__.py @@ -21,12 +21,12 @@ .. _Pygments master branch: https://github.com/pygments/pygments/archive/master.zip#egg=Pygments-dev - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from io import StringIO, BytesIO -__version__ = '2.11.2' +__version__ = '2.12.0' __docformat__ = 'restructuredtext' __all__ = ['lex', 'format', 'highlight'] diff --git a/contrib/python/Pygments/py3/pygments/__main__.py b/contrib/python/Pygments/py3/pygments/__main__.py index c6e2517dfe..423b46e225 100644 --- a/contrib/python/Pygments/py3/pygments/__main__.py +++ b/contrib/python/Pygments/py3/pygments/__main__.py @@ -4,7 +4,7 @@ Main entry point for ``python -m pygments``. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/cmdline.py b/contrib/python/Pygments/py3/pygments/cmdline.py index 4f688c7f8e..6a7532c294 100644 --- a/contrib/python/Pygments/py3/pygments/cmdline.py +++ b/contrib/python/Pygments/py3/pygments/cmdline.py @@ -4,7 +4,7 @@ Command line interface. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -185,7 +185,7 @@ def main_inner(parser, argns): return 0 if argns.V: - print('Pygments version %s, (c) 2006-2021 by Georg Brandl, Matthäus ' + print('Pygments version %s, (c) 2006-2022 by Georg Brandl, Matthäus ' 'Chajdas and contributors.' % __version__) return 0 diff --git a/contrib/python/Pygments/py3/pygments/console.py b/contrib/python/Pygments/py3/pygments/console.py index 8dd08abebc..2ada68e03b 100644 --- a/contrib/python/Pygments/py3/pygments/console.py +++ b/contrib/python/Pygments/py3/pygments/console.py @@ -4,7 +4,7 @@ Format colored console output. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/filter.py b/contrib/python/Pygments/py3/pygments/filter.py index 85b4829878..e5c9664938 100644 --- a/contrib/python/Pygments/py3/pygments/filter.py +++ b/contrib/python/Pygments/py3/pygments/filter.py @@ -4,7 +4,7 @@ Module that implements the default filter. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/filters/__init__.py b/contrib/python/Pygments/py3/pygments/filters/__init__.py index 930ff64e05..45dcda0e12 100644 --- a/contrib/python/Pygments/py3/pygments/filters/__init__.py +++ b/contrib/python/Pygments/py3/pygments/filters/__init__.py @@ -5,7 +5,7 @@ Module containing filter lookup functions and default filters. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/formatter.py b/contrib/python/Pygments/py3/pygments/formatter.py index c3fe68d3ef..e1455c5d12 100644 --- a/contrib/python/Pygments/py3/pygments/formatter.py +++ b/contrib/python/Pygments/py3/pygments/formatter.py @@ -4,7 +4,7 @@ Base formatter class. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/formatters/__init__.py b/contrib/python/Pygments/py3/pygments/formatters/__init__.py index 66c9e9d404..887015c8b9 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/__init__.py +++ b/contrib/python/Pygments/py3/pygments/formatters/__init__.py @@ -4,7 +4,7 @@ Pygments formatters. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/formatters/_mapping.py b/contrib/python/Pygments/py3/pygments/formatters/_mapping.py index 8b5e478e39..15c3fe7dd7 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/_mapping.py +++ b/contrib/python/Pygments/py3/pygments/formatters/_mapping.py @@ -2,13 +2,13 @@ pygments.formatters._mapping ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Formatter mapping definitions. This file is generated by itself. Everytime + Formatter mapping definitions. This file is generated by itself. Every time you change something on a builtin formatter definition, run this script from the formatters folder to update it. Do not alter the FORMATTERS dictionary by hand. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -67,7 +67,7 @@ if __name__ == '__main__': # pragma: no cover content = fp.read() # replace crnl to nl for Windows. # - # Note that, originally, contributers should keep nl of master + # Note that, originally, contributors should keep nl of master # repository, for example by using some kind of automatic # management EOL, like `EolExtension # <https://www.mercurial-scm.org/wiki/EolExtension>`. diff --git a/contrib/python/Pygments/py3/pygments/formatters/bbcode.py b/contrib/python/Pygments/py3/pygments/formatters/bbcode.py index 586a8925c6..8b23b354fa 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/bbcode.py +++ b/contrib/python/Pygments/py3/pygments/formatters/bbcode.py @@ -4,7 +4,7 @@ BBcode formatter. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/formatters/groff.py b/contrib/python/Pygments/py3/pygments/formatters/groff.py index 5aafe6d2f2..7d409baa36 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/groff.py +++ b/contrib/python/Pygments/py3/pygments/formatters/groff.py @@ -4,7 +4,7 @@ Formatter for groff output. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -144,6 +144,8 @@ class GroffFormatter(Formatter): self._write_lineno(outfile) for ttype, value in tokensource: + while ttype not in self.styles: + ttype = ttype.parent start, end = self.styles[ttype] for line in value.splitlines(True): diff --git a/contrib/python/Pygments/py3/pygments/formatters/html.py b/contrib/python/Pygments/py3/pygments/formatters/html.py index f3a77a2ddf..791f749a38 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/html.py +++ b/contrib/python/Pygments/py3/pygments/formatters/html.py @@ -4,7 +4,7 @@ Formatter for HTML output. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -62,7 +62,7 @@ def _get_ttype_class(ttype): CSSFILE_TEMPLATE = '''\ /* generated by Pygments <https://pygments.org/> -Copyright 2006-2021 by the Pygments team. +Copyright 2006-2022 by the Pygments team. Licensed under the BSD license, see LICENSE for details. */ %(styledefs)s @@ -73,7 +73,7 @@ DOC_HEADER = '''\ "http://www.w3.org/TR/html4/strict.dtd"> <!-- generated by Pygments <https://pygments.org/> -Copyright 2006-2021 by the Pygments team. +Copyright 2006-2022 by the Pygments team. Licensed under the BSD license, see LICENSE for details. --> <html> @@ -385,7 +385,7 @@ class HtmlFormatter(Formatter): class CodeHtmlFormatter(HtmlFormatter): - def wrap(self, source, outfile): + def wrap(self, source, *, include_div): return self._wrap_code(source) def _wrap_code(self, source): @@ -667,7 +667,7 @@ class HtmlFormatter(Formatter): mw = len(str(lncount + fl - 1)) sp = self.linenospecial st = self.linenostep - la = self.lineanchors + anchor_name = self.lineanchors or self.linespans aln = self.anchorlinenos nocls = self.noclasses @@ -680,7 +680,7 @@ class HtmlFormatter(Formatter): if print_line: line = '%*d' % (mw, i) if aln: - line = '<a href="#%s-%d">%s</a>' % (la, i, line) + line = '<a href="#%s-%d">%s</a>' % (anchor_name, i, line) else: line = ' ' * mw @@ -707,20 +707,21 @@ class HtmlFormatter(Formatter): filename_tr = "" if self.filename: filename_tr = ( - '<tr><th colspan="2" class="filename"><div class="highlight">' - '<span class="filename">' + self.filename + '</span></div>' + '<tr><th colspan="2" class="filename">' + '<span class="filename">' + self.filename + '</span>' '</th></tr>') # in case you wonder about the seemingly redundant <div> here: since the # content in the other cell also is wrapped in a div, some browsers in # some configurations seem to mess up the formatting... - yield 0, ( - '<table class="%stable">' % self.cssclass + filename_tr + + yield 0, (f'<table class="{self.cssclass}table">' + filename_tr + '<tr><td class="linenos"><div class="linenodiv"><pre>' + - ls + '</pre></div></td><td class="code">' - ) + ls + '</pre></div></td><td class="code">') + yield 0, '<div>' yield 0, dummyoutfile.getvalue() + yield 0, '</div>' yield 0, '</td></tr></table>' + def _wrap_inlinelinenos(self, inner): # need a list of lines since we need the width of a single number :( @@ -729,7 +730,7 @@ class HtmlFormatter(Formatter): st = self.linenostep num = self.linenostart mw = len(str(len(inner_lines) + num - 1)) - la = self.lineanchors + anchor_name = self.lineanchors or self.linespans aln = self.anchorlinenos nocls = self.noclasses @@ -759,7 +760,7 @@ class HtmlFormatter(Formatter): linenos = line if aln: - yield 1, ('<a href="#%s-%d">%s</a>' % (la, num, linenos) + + yield 1, ('<a href="#%s-%d">%s</a>' % (anchor_name, num, linenos) + inner_line) else: yield 1, linenos + inner_line @@ -933,16 +934,20 @@ class HtmlFormatter(Formatter): else: yield 1, value - def wrap(self, source, outfile): + def wrap(self, source): """ Wrap the ``source``, which is a generator yielding individual lines, in custom generators. See docstring for `format`. Can be overridden. """ + + output = source if self.wrapcode: - return self._wrap_div(self._wrap_pre(self._wrap_code(source))) - else: - return self._wrap_div(self._wrap_pre(source)) + output = self._wrap_code(output) + + output = self._wrap_pre(output) + + return output def format_unencoded(self, tokensource, outfile): """ @@ -973,9 +978,10 @@ class HtmlFormatter(Formatter): source = self._wrap_lineanchors(source) if self.linespans: source = self._wrap_linespans(source) - source = self.wrap(source, outfile) + source = self.wrap(source) if self.linenos == 1: source = self._wrap_tablelinenos(source) + source = self._wrap_div(source) if self.full: source = self._wrap_full(source, outfile) diff --git a/contrib/python/Pygments/py3/pygments/formatters/img.py b/contrib/python/Pygments/py3/pygments/formatters/img.py index f481afc4a4..08400407ab 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/img.py +++ b/contrib/python/Pygments/py3/pygments/formatters/img.py @@ -4,7 +4,7 @@ Formatter for Pixmap output. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/formatters/irc.py b/contrib/python/Pygments/py3/pygments/formatters/irc.py index d8da7a39de..fd263bb0b0 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/irc.py +++ b/contrib/python/Pygments/py3/pygments/formatters/irc.py @@ -4,7 +4,7 @@ Formatter for IRC output - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/formatters/latex.py b/contrib/python/Pygments/py3/pygments/formatters/latex.py index e32fcebc5a..d33b686d8f 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/latex.py +++ b/contrib/python/Pygments/py3/pygments/formatters/latex.py @@ -4,7 +4,7 @@ Formatter for LaTeX fancyvrb output. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -159,6 +159,8 @@ class LatexFormatter(Formatter): \PY{k}{pass} \end{Verbatim} + Wrapping can be disabled using the `nowrap` option. + The special command used here (``\PY``) and all the other macros it needs are output by the `get_style_defs` method. @@ -171,6 +173,11 @@ class LatexFormatter(Formatter): Additional options accepted: + `nowrap` + If set to ``True``, don't wrap the tokens at all, not even inside a + ``\begin{Verbatim}`` environment. This disables most other options + (default: ``False``). + `style` The style to use, can be a string or a Style subclass (default: ``'default'``). @@ -248,6 +255,7 @@ class LatexFormatter(Formatter): def __init__(self, **options): Formatter.__init__(self, **options) + self.nowrap = get_bool_opt(options, 'nowrap', False) self.docclass = options.get('docclass', 'article') self.preamble = options.get('preamble', '') self.linenos = get_bool_opt(options, 'linenos', False) @@ -334,18 +342,19 @@ class LatexFormatter(Formatter): realoutfile = outfile outfile = StringIO() - outfile.write('\\begin{' + self.envname + '}[commandchars=\\\\\\{\\}') - if self.linenos: - start, step = self.linenostart, self.linenostep - outfile.write(',numbers=left' + - (start and ',firstnumber=%d' % start or '') + - (step and ',stepnumber=%d' % step or '')) - if self.mathescape or self.texcomments or self.escapeinside: - outfile.write(',codes={\\catcode`\\$=3\\catcode`\\^=7' - '\\catcode`\\_=8\\relax}') - if self.verboptions: - outfile.write(',' + self.verboptions) - outfile.write(']\n') + if not self.nowrap: + outfile.write('\\begin{' + self.envname + '}[commandchars=\\\\\\{\\}') + if self.linenos: + start, step = self.linenostart, self.linenostep + outfile.write(',numbers=left' + + (start and ',firstnumber=%d' % start or '') + + (step and ',stepnumber=%d' % step or '')) + if self.mathescape or self.texcomments or self.escapeinside: + outfile.write(',codes={\\catcode`\\$=3\\catcode`\\^=7' + '\\catcode`\\_=8\\relax}') + if self.verboptions: + outfile.write(',' + self.verboptions) + outfile.write(']\n') for ttype, value in tokensource: if ttype in Token.Comment: @@ -408,7 +417,8 @@ class LatexFormatter(Formatter): else: outfile.write(value) - outfile.write('\\end{' + self.envname + '}\n') + if not self.nowrap: + outfile.write('\\end{' + self.envname + '}\n') if self.full: encoding = self.encoding or 'utf8' diff --git a/contrib/python/Pygments/py3/pygments/formatters/other.py b/contrib/python/Pygments/py3/pygments/formatters/other.py index 1a12c42b96..8c7ee280a0 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/other.py +++ b/contrib/python/Pygments/py3/pygments/formatters/other.py @@ -4,7 +4,7 @@ Other formatters: NullFormatter, RawTokenFormatter. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/formatters/pangomarkup.py b/contrib/python/Pygments/py3/pygments/formatters/pangomarkup.py index 926ccc6d3b..91c1b0161e 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/pangomarkup.py +++ b/contrib/python/Pygments/py3/pygments/formatters/pangomarkup.py @@ -4,7 +4,7 @@ Formatter for Pango markup output. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/formatters/rtf.py b/contrib/python/Pygments/py3/pygments/formatters/rtf.py index ba071c78f4..ccdfb0a734 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/rtf.py +++ b/contrib/python/Pygments/py3/pygments/formatters/rtf.py @@ -4,7 +4,7 @@ A formatter that generates RTF files. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/formatters/svg.py b/contrib/python/Pygments/py3/pygments/formatters/svg.py index 547a7bbcdd..32d40cb640 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/svg.py +++ b/contrib/python/Pygments/py3/pygments/formatters/svg.py @@ -4,7 +4,7 @@ Formatter for SVG output. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/formatters/terminal.py b/contrib/python/Pygments/py3/pygments/formatters/terminal.py index a27594d0df..23d3a71ef0 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/terminal.py +++ b/contrib/python/Pygments/py3/pygments/formatters/terminal.py @@ -4,7 +4,7 @@ Formatter for terminal output with ANSI sequences. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/formatters/terminal256.py b/contrib/python/Pygments/py3/pygments/formatters/terminal256.py index be6f890f44..addba42960 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/terminal256.py +++ b/contrib/python/Pygments/py3/pygments/formatters/terminal256.py @@ -10,7 +10,7 @@ Formatter version 1. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexer.py b/contrib/python/Pygments/py3/pygments/lexer.py index 33d738a8d6..27d73ee1c3 100644 --- a/contrib/python/Pygments/py3/pygments/lexer.py +++ b/contrib/python/Pygments/py3/pygments/lexer.py @@ -4,7 +4,7 @@ Base lexer classes. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -76,6 +76,9 @@ class Lexer(metaclass=LexerMeta): #: Name of the lexer name = None + #: URL of the language specification/definition + url = None + #: Shortcuts for the lexer aliases = [] @@ -618,7 +621,7 @@ class RegexLexer(Lexer, metaclass=RegexLexerMeta): """ Split ``text`` into (tokentype, text) pairs. - ``stack`` is the inital stack (default: ``['root']``) + ``stack`` is the initial stack (default: ``['root']``) """ pos = 0 tokendefs = self._tokens @@ -738,7 +741,7 @@ class ExtendedRegexLexer(RegexLexer): elif isinstance(new_state, int): # see RegexLexer for why this check is made if abs(new_state) >= len(ctx.stack): - del ctx.state[1:] + del ctx.stack[1:] else: del ctx.stack[new_state:] elif new_state == '#push': @@ -792,7 +795,7 @@ def do_insertions(insertions, tokens): # iterate over the token stream where we want to insert # the tokens from the insertion list. for i, t, v in tokens: - # first iteration. store the postition of first item + # first iteration. store the position of first item if realpos is None: realpos = i oldi = 0 diff --git a/contrib/python/Pygments/py3/pygments/lexers/__init__.py b/contrib/python/Pygments/py3/pygments/lexers/__init__.py index 9b89b6da3f..79c4e9bf35 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/__init__.py +++ b/contrib/python/Pygments/py3/pygments/lexers/__init__.py @@ -4,7 +4,7 @@ Pygments lexers. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -47,14 +47,18 @@ def _load_lexers(module_name): _lexer_cache[cls.name] = cls -def get_all_lexers(): +def get_all_lexers(plugins=True): """Return a generator of tuples in the form ``(name, aliases, filenames, mimetypes)`` of all know lexers. + + If *plugins* is true (the default), plugin lexers supplied by entrypoints + are also returned. Otherwise, only builtin ones are considered. """ for item in LEXERS.values(): yield item[1:] - for lexer in find_plugin_lexers(): - yield lexer.name, lexer.aliases, lexer.filenames, lexer.mimetypes + if plugins: + for lexer in find_plugin_lexers(): + yield lexer.name, lexer.aliases, lexer.filenames, lexer.mimetypes def find_lexer_class(name): diff --git a/contrib/python/Pygments/py3/pygments/lexers/_ada_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_ada_builtins.py new file mode 100644 index 0000000000..dce1a5b19b --- /dev/null +++ b/contrib/python/Pygments/py3/pygments/lexers/_ada_builtins.py @@ -0,0 +1,103 @@ +""" + pygments.lexers._ada_builtins + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Ada builtins. + + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +KEYWORD_LIST = ( + 'abort', + 'abs', + 'abstract', + 'accept', + 'access', + 'aliased', + 'all', + 'array', + 'at', + 'begin', + 'body', + 'case', + 'constant', + 'declare', + 'delay', + 'delta', + 'digits', + 'do', + 'else', + 'elsif', + 'end', + 'entry', + 'exception', + 'exit', + 'interface', + 'for', + 'goto', + 'if', + 'is', + 'limited', + 'loop', + 'new', + 'null', + 'of', + 'or', + 'others', + 'out', + 'overriding', + 'pragma', + 'protected', + 'raise', + 'range', + 'record', + 'renames', + 'requeue', + 'return', + 'reverse', + 'select', + 'separate', + 'some', + 'subtype', + 'synchronized', + 'task', + 'tagged', + 'terminate', + 'then', + 'type', + 'until', + 'when', + 'while', + 'xor' +) + +BUILTIN_LIST = ( + 'Address', + 'Byte', + 'Boolean', + 'Character', + 'Controlled', + 'Count', + 'Cursor', + 'Duration', + 'File_Mode', + 'File_Type', + 'Float', + 'Generator', + 'Integer', + 'Long_Float', + 'Long_Integer', + 'Long_Long_Float', + 'Long_Long_Integer', + 'Natural', + 'Positive', + 'Reference_Type', + 'Short_Float', + 'Short_Integer', + 'Short_Short_Float', + 'Short_Short_Integer', + 'String', + 'Wide_Character', + 'Wide_String' +) diff --git a/contrib/python/Pygments/py3/pygments/lexers/_asy_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_asy_builtins.py index 74e057ef40..88c2038880 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_asy_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_asy_builtins.py @@ -9,7 +9,7 @@ TODO: perl/python script in Asymptote SVN similar to asy-list.pl but only for function and variable names. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_cl_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_cl_builtins.py index 08d70e1549..342e62f16c 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_cl_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_cl_builtins.py @@ -4,7 +4,7 @@ ANSI Common Lisp builtins. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_cocoa_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_cocoa_builtins.py index 72d86db1e7..5171139a06 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_cocoa_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_cocoa_builtins.py @@ -5,9 +5,9 @@ This file defines a set of types used across Cocoa frameworks from Apple. There is a list of @interfaces, @protocols and some other (structs, unions) - File may be also used as standalone generator for aboves. + File may be also used as standalone generator for above. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_csound_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_csound_builtins.py index e7e395dc6a..b57043dc39 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_csound_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_csound_builtins.py @@ -2,7 +2,7 @@ pygments.lexers._csound_builtins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -34,7 +34,7 @@ tabrowlin vbap1move '''.split()) -# Opcodes in Csound 6.16.0 using: +# Opcodes in Csound 6.17.0 using: # python3 -c " # import re # from subprocess import Popen, PIPE @@ -256,6 +256,7 @@ bbcuts betarand bexprnd bformdec1 +bformdec2 bformenc1 binit biquad @@ -565,6 +566,7 @@ grain grain2 grain3 granule +gtadsr gtf guiro harmon @@ -896,6 +898,7 @@ median mediank metro metro2 +metrobpm mfb midglobal midiarp @@ -944,6 +947,7 @@ mp3bitrate mp3in mp3len mp3nchnls +mp3out mp3scal mp3sr mpulse @@ -1147,6 +1151,7 @@ pvsftr pvsftw pvsfwrite pvsgain +pvsgendy pvshift pvsifd pvsin @@ -1313,7 +1318,9 @@ scale scale2 scalearray scanhammer +scanmap scans +scansmap scantable scanu scanu2 @@ -1332,6 +1339,7 @@ sense sensekey seqtime seqtime2 +sequ serialBegin serialEnd serialFlush @@ -1524,8 +1532,10 @@ trfilter trhighest trigExpseg trigLinseg +trigexpseg trigger trighold +triglinseg trigphasor trigseq trim @@ -1656,10 +1666,6 @@ wterrain2 xadsr xin xout -xscanmap -xscans -xscansmap -xscanu xtratim xyscale zacl @@ -1761,5 +1767,9 @@ vbap4 vbap4move vbap8 vbap8move +xscanmap +xscans +xscansmap +xscanu xyin '''.split()) diff --git a/contrib/python/Pygments/py3/pygments/lexers/_css_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_css_builtins.py new file mode 100644 index 0000000000..785a6f339f --- /dev/null +++ b/contrib/python/Pygments/py3/pygments/lexers/_css_builtins.py @@ -0,0 +1,558 @@ +""" + pygments.lexers._css_builtins + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + This file is autogenerated by scripts/get_css_properties.py + + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +_css_properties = ( + '-webkit-line-clamp', + 'accent-color', + 'align-content', + 'align-items', + 'align-self', + 'alignment-baseline', + 'all', + 'animation', + 'animation-delay', + 'animation-direction', + 'animation-duration', + 'animation-fill-mode', + 'animation-iteration-count', + 'animation-name', + 'animation-play-state', + 'animation-timing-function', + 'appearance', + 'aspect-ratio', + 'azimuth', + 'backface-visibility', + 'background', + 'background-attachment', + 'background-blend-mode', + 'background-clip', + 'background-color', + 'background-image', + 'background-origin', + 'background-position', + 'background-repeat', + 'background-size', + 'baseline-shift', + 'baseline-source', + 'block-ellipsis', + 'block-size', + 'block-step', + 'block-step-align', + 'block-step-insert', + 'block-step-round', + 'block-step-size', + 'bookmark-label', + 'bookmark-level', + 'bookmark-state', + 'border', + 'border-block', + 'border-block-color', + 'border-block-end', + 'border-block-end-color', + 'border-block-end-style', + 'border-block-end-width', + 'border-block-start', + 'border-block-start-color', + 'border-block-start-style', + 'border-block-start-width', + 'border-block-style', + 'border-block-width', + 'border-bottom', + 'border-bottom-color', + 'border-bottom-left-radius', + 'border-bottom-right-radius', + 'border-bottom-style', + 'border-bottom-width', + 'border-boundary', + 'border-collapse', + 'border-color', + 'border-end-end-radius', + 'border-end-start-radius', + 'border-image', + 'border-image-outset', + 'border-image-repeat', + 'border-image-slice', + 'border-image-source', + 'border-image-width', + 'border-inline', + 'border-inline-color', + 'border-inline-end', + 'border-inline-end-color', + 'border-inline-end-style', + 'border-inline-end-width', + 'border-inline-start', + 'border-inline-start-color', + 'border-inline-start-style', + 'border-inline-start-width', + 'border-inline-style', + 'border-inline-width', + 'border-left', + 'border-left-color', + 'border-left-style', + 'border-left-width', + 'border-radius', + 'border-right', + 'border-right-color', + 'border-right-style', + 'border-right-width', + 'border-spacing', + 'border-start-end-radius', + 'border-start-start-radius', + 'border-style', + 'border-top', + 'border-top-color', + 'border-top-left-radius', + 'border-top-right-radius', + 'border-top-style', + 'border-top-width', + 'border-width', + 'bottom', + 'box-decoration-break', + 'box-shadow', + 'box-sizing', + 'box-snap', + 'break-after', + 'break-before', + 'break-inside', + 'caption-side', + 'caret', + 'caret-color', + 'caret-shape', + 'chains', + 'clear', + 'clip', + 'clip-path', + 'clip-rule', + 'color', + 'color-adjust', + 'color-interpolation-filters', + 'color-scheme', + 'column-count', + 'column-fill', + 'column-gap', + 'column-rule', + 'column-rule-color', + 'column-rule-style', + 'column-rule-width', + 'column-span', + 'column-width', + 'columns', + 'contain', + 'contain-intrinsic-block-size', + 'contain-intrinsic-height', + 'contain-intrinsic-inline-size', + 'contain-intrinsic-size', + 'contain-intrinsic-width', + 'container', + 'container-name', + 'container-type', + 'content', + 'content-visibility', + 'continue', + 'counter-increment', + 'counter-reset', + 'counter-set', + 'cue', + 'cue-after', + 'cue-before', + 'cursor', + 'direction', + 'display', + 'dominant-baseline', + 'elevation', + 'empty-cells', + 'fill', + 'fill-break', + 'fill-color', + 'fill-image', + 'fill-opacity', + 'fill-origin', + 'fill-position', + 'fill-repeat', + 'fill-rule', + 'fill-size', + 'filter', + 'flex', + 'flex-basis', + 'flex-direction', + 'flex-flow', + 'flex-grow', + 'flex-shrink', + 'flex-wrap', + 'float', + 'float-defer', + 'float-offset', + 'float-reference', + 'flood-color', + 'flood-opacity', + 'flow', + 'flow-from', + 'flow-into', + 'font', + 'font-family', + 'font-feature-settings', + 'font-kerning', + 'font-language-override', + 'font-optical-sizing', + 'font-palette', + 'font-size', + 'font-size-adjust', + 'font-stretch', + 'font-style', + 'font-synthesis', + 'font-synthesis-small-caps', + 'font-synthesis-style', + 'font-synthesis-weight', + 'font-variant', + 'font-variant-alternates', + 'font-variant-caps', + 'font-variant-east-asian', + 'font-variant-emoji', + 'font-variant-ligatures', + 'font-variant-numeric', + 'font-variant-position', + 'font-variation-settings', + 'font-weight', + 'footnote-display', + 'footnote-policy', + 'forced-color-adjust', + 'gap', + 'glyph-orientation-vertical', + 'grid', + 'grid-area', + 'grid-auto-columns', + 'grid-auto-flow', + 'grid-auto-rows', + 'grid-column', + 'grid-column-end', + 'grid-column-start', + 'grid-row', + 'grid-row-end', + 'grid-row-start', + 'grid-template', + 'grid-template-areas', + 'grid-template-columns', + 'grid-template-rows', + 'hanging-punctuation', + 'height', + 'hyphenate-character', + 'hyphenate-limit-chars', + 'hyphenate-limit-last', + 'hyphenate-limit-lines', + 'hyphenate-limit-zone', + 'hyphens', + 'image-orientation', + 'image-rendering', + 'image-resolution', + 'initial-letter', + 'initial-letter-align', + 'initial-letter-wrap', + 'inline-size', + 'inline-sizing', + 'input-security', + 'inset', + 'inset-block', + 'inset-block-end', + 'inset-block-start', + 'inset-inline', + 'inset-inline-end', + 'inset-inline-start', + 'isolation', + 'justify-content', + 'justify-items', + 'justify-self', + 'leading-trim', + 'left', + 'letter-spacing', + 'lighting-color', + 'line-break', + 'line-clamp', + 'line-grid', + 'line-height', + 'line-height-step', + 'line-padding', + 'line-snap', + 'list-style', + 'list-style-image', + 'list-style-position', + 'list-style-type', + 'margin', + 'margin-block', + 'margin-block-end', + 'margin-block-start', + 'margin-bottom', + 'margin-break', + 'margin-inline', + 'margin-inline-end', + 'margin-inline-start', + 'margin-left', + 'margin-right', + 'margin-top', + 'margin-trim', + 'marker', + 'marker-end', + 'marker-knockout-left', + 'marker-knockout-right', + 'marker-mid', + 'marker-pattern', + 'marker-segment', + 'marker-side', + 'marker-start', + 'mask', + 'mask-border', + 'mask-border-mode', + 'mask-border-outset', + 'mask-border-repeat', + 'mask-border-slice', + 'mask-border-source', + 'mask-border-width', + 'mask-clip', + 'mask-composite', + 'mask-image', + 'mask-mode', + 'mask-origin', + 'mask-position', + 'mask-repeat', + 'mask-size', + 'mask-type', + 'max-block-size', + 'max-height', + 'max-inline-size', + 'max-lines', + 'max-width', + 'min-block-size', + 'min-height', + 'min-inline-size', + 'min-intrinsic-sizing', + 'min-width', + 'mix-blend-mode', + 'nav-down', + 'nav-left', + 'nav-right', + 'nav-up', + 'object-fit', + 'object-overflow', + 'object-position', + 'object-view-box', + 'offset', + 'offset-anchor', + 'offset-distance', + 'offset-path', + 'offset-position', + 'offset-rotate', + 'opacity', + 'order', + 'orphans', + 'outline', + 'outline-color', + 'outline-offset', + 'outline-style', + 'outline-width', + 'overflow', + 'overflow-anchor', + 'overflow-block', + 'overflow-clip-margin', + 'overflow-inline', + 'overflow-wrap', + 'overflow-x', + 'overflow-y', + 'overscroll-behavior', + 'overscroll-behavior-block', + 'overscroll-behavior-inline', + 'overscroll-behavior-x', + 'overscroll-behavior-y', + 'padding', + 'padding-block', + 'padding-block-end', + 'padding-block-start', + 'padding-bottom', + 'padding-inline', + 'padding-inline-end', + 'padding-inline-start', + 'padding-left', + 'padding-right', + 'padding-top', + 'page', + 'page-break-after', + 'page-break-before', + 'page-break-inside', + 'pause', + 'pause-after', + 'pause-before', + 'perspective', + 'perspective-origin', + 'pitch', + 'pitch-range', + 'place-content', + 'place-items', + 'place-self', + 'play-during', + 'pointer-events', + 'position', + 'print-color-adjust', + 'property-name', + 'quotes', + 'region-fragment', + 'resize', + 'rest', + 'rest-after', + 'rest-before', + 'richness', + 'right', + 'rotate', + 'row-gap', + 'ruby-align', + 'ruby-merge', + 'ruby-overhang', + 'ruby-position', + 'running', + 'scale', + 'scroll-behavior', + 'scroll-margin', + 'scroll-margin-block', + 'scroll-margin-block-end', + 'scroll-margin-block-start', + 'scroll-margin-bottom', + 'scroll-margin-inline', + 'scroll-margin-inline-end', + 'scroll-margin-inline-start', + 'scroll-margin-left', + 'scroll-margin-right', + 'scroll-margin-top', + 'scroll-padding', + 'scroll-padding-block', + 'scroll-padding-block-end', + 'scroll-padding-block-start', + 'scroll-padding-bottom', + 'scroll-padding-inline', + 'scroll-padding-inline-end', + 'scroll-padding-inline-start', + 'scroll-padding-left', + 'scroll-padding-right', + 'scroll-padding-top', + 'scroll-snap-align', + 'scroll-snap-stop', + 'scroll-snap-type', + 'scrollbar-color', + 'scrollbar-gutter', + 'scrollbar-width', + 'shape-image-threshold', + 'shape-inside', + 'shape-margin', + 'shape-outside', + 'spatial-navigation-action', + 'spatial-navigation-contain', + 'spatial-navigation-function', + 'speak', + 'speak-as', + 'speak-header', + 'speak-numeral', + 'speak-punctuation', + 'speech-rate', + 'stress', + 'string-set', + 'stroke', + 'stroke-align', + 'stroke-alignment', + 'stroke-break', + 'stroke-color', + 'stroke-dash-corner', + 'stroke-dash-justify', + 'stroke-dashadjust', + 'stroke-dasharray', + 'stroke-dashcorner', + 'stroke-dashoffset', + 'stroke-image', + 'stroke-linecap', + 'stroke-linejoin', + 'stroke-miterlimit', + 'stroke-opacity', + 'stroke-origin', + 'stroke-position', + 'stroke-repeat', + 'stroke-size', + 'stroke-width', + 'tab-size', + 'table-layout', + 'text-align', + 'text-align-all', + 'text-align-last', + 'text-combine-upright', + 'text-decoration', + 'text-decoration-color', + 'text-decoration-line', + 'text-decoration-skip', + 'text-decoration-skip-box', + 'text-decoration-skip-ink', + 'text-decoration-skip-inset', + 'text-decoration-skip-self', + 'text-decoration-skip-spaces', + 'text-decoration-style', + 'text-decoration-thickness', + 'text-edge', + 'text-emphasis', + 'text-emphasis-color', + 'text-emphasis-position', + 'text-emphasis-skip', + 'text-emphasis-style', + 'text-group-align', + 'text-indent', + 'text-justify', + 'text-orientation', + 'text-overflow', + 'text-shadow', + 'text-space-collapse', + 'text-space-trim', + 'text-spacing', + 'text-transform', + 'text-underline-offset', + 'text-underline-position', + 'text-wrap', + 'top', + 'transform', + 'transform-box', + 'transform-origin', + 'transform-style', + 'transition', + 'transition-delay', + 'transition-duration', + 'transition-property', + 'transition-timing-function', + 'translate', + 'unicode-bidi', + 'user-select', + 'vertical-align', + 'visibility', + 'voice-balance', + 'voice-duration', + 'voice-family', + 'voice-pitch', + 'voice-range', + 'voice-rate', + 'voice-stress', + 'voice-volume', + 'volume', + 'white-space', + 'widows', + 'width', + 'will-change', + 'word-boundary-detection', + 'word-boundary-expansion', + 'word-break', + 'word-spacing', + 'word-wrap', + 'wrap-after', + 'wrap-before', + 'wrap-flow', + 'wrap-inside', + 'wrap-through', + 'writing-mode', + 'z-index', +)
\ No newline at end of file diff --git a/contrib/python/Pygments/py3/pygments/lexers/_julia_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_julia_builtins.py index ae786d89c0..533547ad64 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_julia_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_julia_builtins.py @@ -4,7 +4,7 @@ Julia builtins. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_lasso_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_lasso_builtins.py index 8fd0ff1be2..570c310d6c 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_lasso_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_lasso_builtins.py @@ -4,7 +4,7 @@ Built-in Lasso types, traits, methods, and members. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_lilypond_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_lilypond_builtins.py index c096273a90..7aff4120e9 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_lilypond_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_lilypond_builtins.py @@ -4,7 +4,7 @@ LilyPond builtins. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_lua_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_lua_builtins.py index f6a9b796ee..08bcfb17c4 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_lua_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_lua_builtins.py @@ -8,7 +8,9 @@ Do not edit the MODULES dict by hand. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + Run with `python -I` to regenerate. + + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -35,6 +37,7 @@ MODULES = {'basic': ('_G', 'tonumber', 'tostring', 'type', + 'warn', 'xpcall'), 'bit32': ('bit32.arshift', 'bit32.band', @@ -48,7 +51,8 @@ MODULES = {'basic': ('_G', 'bit32.replace', 'bit32.rrotate', 'bit32.rshift'), - 'coroutine': ('coroutine.create', + 'coroutine': ('coroutine.close', + 'coroutine.create', 'coroutine.isyieldable', 'coroutine.resume', 'coroutine.running', @@ -173,17 +177,7 @@ MODULES = {'basic': ('_G', if __name__ == '__main__': # pragma: no cover import re import sys - - # urllib ends up wanting to import a module called 'math' -- if - # pygments/lexers is in the path, this ends badly. - for i in range(len(sys.path)-1, -1, -1): - if sys.path[i].endswith('/lexers'): - del sys.path[i] - - try: - from urllib import urlopen - except ImportError: - from urllib.request import urlopen + from urllib.request import urlopen import pprint # you can't generally find out what module a function belongs to if you @@ -232,7 +226,7 @@ if __name__ == '__main__': # pragma: no cover f = urlopen('http://www.lua.org/manual/') r = re.compile(r'^<A HREF="(\d\.\d)/">(Lua )?\1</A>') for line in f: - m = r.match(line) + m = r.match(line.decode('iso-8859-1')) if m is not None: return m.groups()[0] @@ -241,7 +235,7 @@ if __name__ == '__main__': # pragma: no cover r = re.compile(r'^<A HREF="manual.html#pdf-(?!lua|LUA)([^:]+)">\1</A>') functions = [] for line in f: - m = r.match(line) + m = r.match(line.decode('iso-8859-1')) if m is not None: functions.append(m.groups()[0]) return functions diff --git a/contrib/python/Pygments/py3/pygments/lexers/_mapping.py b/contrib/python/Pygments/py3/pygments/lexers/_mapping.py index a7b1b2d96a..b9da25f9c7 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_mapping.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_mapping.py @@ -2,7 +2,7 @@ pygments.lexers._mapping ~~~~~~~~~~~~~~~~~~~~~~~~ - Lexer mapping definitions. This file is generated by itself. Everytime + Lexer mapping definitions. This file is generated by itself. Every time you change something on a builtin lexer definition, run this script from the lexers folder to update it. @@ -19,7 +19,7 @@ LEXERS = { 'AbnfLexer': ('pygments.lexers.grammar_notation', 'ABNF', ('abnf',), ('*.abnf',), ('text/x-abnf',)), 'ActionScript3Lexer': ('pygments.lexers.actionscript', 'ActionScript 3', ('actionscript3', 'as3'), ('*.as',), ('application/x-actionscript3', 'text/x-actionscript3', 'text/actionscript3')), 'ActionScriptLexer': ('pygments.lexers.actionscript', 'ActionScript', ('actionscript', 'as'), ('*.as',), ('application/x-actionscript', 'text/x-actionscript', 'text/actionscript')), - 'AdaLexer': ('pygments.lexers.pascal', 'Ada', ('ada', 'ada95', 'ada2005'), ('*.adb', '*.ads', '*.ada'), ('text/x-ada',)), + 'AdaLexer': ('pygments.lexers.ada', 'Ada', ('ada', 'ada95', 'ada2005'), ('*.adb', '*.ads', '*.ada'), ('text/x-ada',)), 'AdlLexer': ('pygments.lexers.archetype', 'ADL', ('adl',), ('*.adl', '*.adls', '*.adlf', '*.adlx'), ()), 'AgdaLexer': ('pygments.lexers.haskell', 'Agda', ('agda',), ('*.agda',), ('text/x-agda',)), 'AheuiLexer': ('pygments.lexers.esoteric', 'Aheui', ('aheui',), ('*.aheui',), ()), @@ -59,6 +59,7 @@ LEXERS = { 'BatchLexer': ('pygments.lexers.shell', 'Batchfile', ('batch', 'bat', 'dosbatch', 'winbatch'), ('*.bat', '*.cmd'), ('application/x-dos-batch',)), 'BddLexer': ('pygments.lexers.bdd', 'Bdd', ('bdd',), ('*.feature',), ('text/x-bdd',)), 'BefungeLexer': ('pygments.lexers.esoteric', 'Befunge', ('befunge',), ('*.befunge',), ('application/x-befunge',)), + 'BerryLexer': ('pygments.lexers.berry', 'Berry', ('berry', 'be'), ('*.be',), ('text/x-berry', 'application/x-berry')), 'BibTeXLexer': ('pygments.lexers.bibtex', 'BibTeX', ('bibtex', 'bib'), ('*.bib',), ('text/x-bibtex',)), 'BlitzBasicLexer': ('pygments.lexers.basic', 'BlitzBasic', ('blitzbasic', 'b3d', 'bplus'), ('*.bb', '*.decls'), ('text/x-bb',)), 'BlitzMaxLexer': ('pygments.lexers.basic', 'BlitzMax', ('blitzmax', 'bmax'), ('*.bmx',), ('text/x-bmx',)), @@ -73,6 +74,7 @@ LEXERS = { 'CMakeLexer': ('pygments.lexers.make', 'CMake', ('cmake',), ('*.cmake', 'CMakeLists.txt'), ('text/x-cmake',)), 'CObjdumpLexer': ('pygments.lexers.asm', 'c-objdump', ('c-objdump',), ('*.c-objdump',), ('text/x-c-objdump',)), 'CPSALexer': ('pygments.lexers.lisp', 'CPSA', ('cpsa',), ('*.cpsa',), ()), + 'CSSUL4Lexer': ('pygments.lexers.ul4', 'CSS+UL4', ('css+ul4',), ('*.cssul4',), ()), 'CSharpAspxLexer': ('pygments.lexers.dotnet', 'aspx-cs', ('aspx-cs',), ('*.aspx', '*.asax', '*.ascx', '*.ashx', '*.asmx', '*.axd'), ()), 'CSharpLexer': ('pygments.lexers.dotnet', 'C#', ('csharp', 'c#', 'cs'), ('*.cs',), ('text/x-csharp',)), 'Ca65Lexer': ('pygments.lexers.asm', 'ca65 assembler', ('ca65',), ('*.s',), ()), @@ -93,7 +95,7 @@ LEXERS = { 'CirruLexer': ('pygments.lexers.webmisc', 'Cirru', ('cirru',), ('*.cirru',), ('text/x-cirru',)), 'ClayLexer': ('pygments.lexers.c_like', 'Clay', ('clay',), ('*.clay',), ('text/x-clay',)), 'CleanLexer': ('pygments.lexers.clean', 'Clean', ('clean',), ('*.icl', '*.dcl'), ()), - 'ClojureLexer': ('pygments.lexers.jvm', 'Clojure', ('clojure', 'clj'), ('*.clj',), ('text/x-clojure', 'application/x-clojure')), + 'ClojureLexer': ('pygments.lexers.jvm', 'Clojure', ('clojure', 'clj'), ('*.clj', '*.cljc'), ('text/x-clojure', 'application/x-clojure')), 'ClojureScriptLexer': ('pygments.lexers.jvm', 'ClojureScript', ('clojurescript', 'cljs'), ('*.cljs',), ('text/x-clojurescript', 'application/x-clojurescript')), 'CobolFreeformatLexer': ('pygments.lexers.business', 'COBOLFree', ('cobolfree',), ('*.cbl', '*.CBL'), ()), 'CobolLexer': ('pygments.lexers.business', 'COBOL', ('cobol',), ('*.cob', '*.COB', '*.cpy', '*.CPY'), ('text/x-cobol',)), @@ -104,7 +106,8 @@ LEXERS = { 'CommonLispLexer': ('pygments.lexers.lisp', 'Common Lisp', ('common-lisp', 'cl', 'lisp'), ('*.cl', '*.lisp'), ('text/x-common-lisp',)), 'ComponentPascalLexer': ('pygments.lexers.oberon', 'Component Pascal', ('componentpascal', 'cp'), ('*.cp', '*.cps'), ('text/x-component-pascal',)), 'CoqLexer': ('pygments.lexers.theorem', 'Coq', ('coq',), ('*.v',), ('text/x-coq',)), - 'CppLexer': ('pygments.lexers.c_cpp', 'C++', ('cpp', 'c++'), ('*.cpp', '*.hpp', '*.c++', '*.h++', '*.cc', '*.hh', '*.cxx', '*.hxx', '*.C', '*.H', '*.cp', '*.CPP'), ('text/x-c++hdr', 'text/x-c++src')), + 'CplintLexer': ('pygments.lexers.cplint', 'cplint', ('cplint',), ('*.ecl', '*.prolog', '*.pro', '*.pl', '*.P', '*.lpad', '*.cpl'), ('text/x-cplint',)), + 'CppLexer': ('pygments.lexers.c_cpp', 'C++', ('cpp', 'c++'), ('*.cpp', '*.hpp', '*.c++', '*.h++', '*.cc', '*.hh', '*.cxx', '*.hxx', '*.C', '*.H', '*.cp', '*.CPP', '*.tpp'), ('text/x-c++hdr', 'text/x-c++src')), 'CppObjdumpLexer': ('pygments.lexers.asm', 'cpp-objdump', ('cpp-objdump', 'c++-objdumb', 'cxx-objdump'), ('*.cpp-objdump', '*.c++-objdump', '*.cxx-objdump'), ('text/x-cpp-objdump',)), 'CrmshLexer': ('pygments.lexers.dsls', 'Crmsh', ('crmsh', 'pcmk'), ('*.crmsh', '*.pcmk'), ()), 'CrocLexer': ('pygments.lexers.d', 'Croc', ('croc',), ('*.croc',), ('text/x-crocsrc',)), @@ -113,7 +116,7 @@ LEXERS = { 'CsoundDocumentLexer': ('pygments.lexers.csound', 'Csound Document', ('csound-document', 'csound-csd'), ('*.csd',), ()), 'CsoundOrchestraLexer': ('pygments.lexers.csound', 'Csound Orchestra', ('csound', 'csound-orc'), ('*.orc', '*.udo'), ()), 'CsoundScoreLexer': ('pygments.lexers.csound', 'Csound Score', ('csound-score', 'csound-sco'), ('*.sco',), ()), - 'CssDjangoLexer': ('pygments.lexers.templates', 'CSS+Django/Jinja', ('css+django', 'css+jinja'), (), ('text/css+django', 'text/css+jinja')), + 'CssDjangoLexer': ('pygments.lexers.templates', 'CSS+Django/Jinja', ('css+django', 'css+jinja'), ('*.css.j2', '*.css.jinja2'), ('text/css+django', 'text/css+jinja')), 'CssErbLexer': ('pygments.lexers.templates', 'CSS+Ruby', ('css+ruby', 'css+erb'), (), ('text/css+ruby',)), 'CssGenshiLexer': ('pygments.lexers.templates', 'CSS+Genshi Text', ('css+genshitext', 'css+genshi'), (), ('text/css+genshi',)), 'CssLexer': ('pygments.lexers.css', 'CSS', ('css',), ('*.css',), ('text/css',)), @@ -195,6 +198,7 @@ LEXERS = { 'GroffLexer': ('pygments.lexers.markup', 'Groff', ('groff', 'nroff', 'man'), ('*.[1-9]', '*.man', '*.1p', '*.3pm'), ('application/x-troff', 'text/troff')), 'GroovyLexer': ('pygments.lexers.jvm', 'Groovy', ('groovy',), ('*.groovy', '*.gradle'), ('text/x-groovy',)), 'HLSLShaderLexer': ('pygments.lexers.graphics', 'HLSL', ('hlsl',), ('*.hlsl', '*.hlsli'), ('text/x-hlsl',)), + 'HTMLUL4Lexer': ('pygments.lexers.ul4', 'HTML+UL4', ('html+ul4',), ('*.htmlul4',), ()), 'HamlLexer': ('pygments.lexers.html', 'Haml', ('haml',), ('*.haml',), ('text/x-haml',)), 'HandlebarsHtmlLexer': ('pygments.lexers.templates', 'HTML+Handlebars', ('html+handlebars',), ('*.handlebars', '*.hbs'), ('text/html+handlebars', 'text/x-handlebars-template')), 'HandlebarsLexer': ('pygments.lexers.templates', 'Handlebars', ('handlebars',), (), ()), @@ -203,7 +207,7 @@ LEXERS = { 'HexdumpLexer': ('pygments.lexers.hexdump', 'Hexdump', ('hexdump',), (), ()), 'HsailLexer': ('pygments.lexers.asm', 'HSAIL', ('hsail', 'hsa'), ('*.hsail',), ('text/x-hsail',)), 'HspecLexer': ('pygments.lexers.haskell', 'Hspec', ('hspec',), (), ()), - 'HtmlDjangoLexer': ('pygments.lexers.templates', 'HTML+Django/Jinja', ('html+django', 'html+jinja', 'htmldjango'), (), ('text/html+django', 'text/html+jinja')), + 'HtmlDjangoLexer': ('pygments.lexers.templates', 'HTML+Django/Jinja', ('html+django', 'html+jinja', 'htmldjango'), ('*.html.j2', '*.htm.j2', '*.xhtml.j2', '*.html.jinja2', '*.htm.jinja2', '*.xhtml.jinja2'), ('text/html+django', 'text/html+jinja')), 'HtmlGenshiLexer': ('pygments.lexers.templates', 'HTML+Genshi', ('html+genshi', 'html+kid'), (), ('text/html+genshi',)), 'HtmlLexer': ('pygments.lexers.html', 'HTML', ('html',), ('*.html', '*.htm', '*.xhtml', '*.xslt'), ('text/html', 'application/xhtml+xml')), 'HtmlPhpLexer': ('pygments.lexers.templates', 'HTML+PHP', ('html+php',), ('*.phtml',), ('application/x-php', 'application/x-httpd-php', 'application/x-httpd-php3', 'application/x-httpd-php4', 'application/x-httpd-php5')), @@ -229,12 +233,13 @@ LEXERS = { 'JagsLexer': ('pygments.lexers.modeling', 'JAGS', ('jags',), ('*.jag', '*.bug'), ()), 'JasminLexer': ('pygments.lexers.jvm', 'Jasmin', ('jasmin', 'jasminxt'), ('*.j',), ()), 'JavaLexer': ('pygments.lexers.jvm', 'Java', ('java',), ('*.java',), ('text/x-java',)), - 'JavascriptDjangoLexer': ('pygments.lexers.templates', 'JavaScript+Django/Jinja', ('javascript+django', 'js+django', 'javascript+jinja', 'js+jinja'), (), ('application/x-javascript+django', 'application/x-javascript+jinja', 'text/x-javascript+django', 'text/x-javascript+jinja', 'text/javascript+django', 'text/javascript+jinja')), + 'JavascriptDjangoLexer': ('pygments.lexers.templates', 'JavaScript+Django/Jinja', ('javascript+django', 'js+django', 'javascript+jinja', 'js+jinja'), ('*.js.j2', '*.js.jinja2'), ('application/x-javascript+django', 'application/x-javascript+jinja', 'text/x-javascript+django', 'text/x-javascript+jinja', 'text/javascript+django', 'text/javascript+jinja')), 'JavascriptErbLexer': ('pygments.lexers.templates', 'JavaScript+Ruby', ('javascript+ruby', 'js+ruby', 'javascript+erb', 'js+erb'), (), ('application/x-javascript+ruby', 'text/x-javascript+ruby', 'text/javascript+ruby')), 'JavascriptGenshiLexer': ('pygments.lexers.templates', 'JavaScript+Genshi Text', ('js+genshitext', 'js+genshi', 'javascript+genshitext', 'javascript+genshi'), (), ('application/x-javascript+genshi', 'text/x-javascript+genshi', 'text/javascript+genshi')), 'JavascriptLexer': ('pygments.lexers.javascript', 'JavaScript', ('javascript', 'js'), ('*.js', '*.jsm', '*.mjs', '*.cjs'), ('application/javascript', 'application/x-javascript', 'text/x-javascript', 'text/javascript')), 'JavascriptPhpLexer': ('pygments.lexers.templates', 'JavaScript+PHP', ('javascript+php', 'js+php'), (), ('application/x-javascript+php', 'text/x-javascript+php', 'text/javascript+php')), 'JavascriptSmartyLexer': ('pygments.lexers.templates', 'JavaScript+Smarty', ('javascript+smarty', 'js+smarty'), (), ('application/x-javascript+smarty', 'text/x-javascript+smarty', 'text/javascript+smarty')), + 'JavascriptUL4Lexer': ('pygments.lexers.ul4', 'Javascript+UL4', ('js+ul4',), ('*.jsul4',), ()), 'JclLexer': ('pygments.lexers.scripting', 'JCL', ('jcl',), ('*.jcl',), ('text/x-jcl',)), 'JsgfLexer': ('pygments.lexers.grammar_notation', 'JSGF', ('jsgf',), ('*.jsgf',), ('application/jsgf', 'application/x-jsgf', 'text/jsgf')), 'JsonBareObjectLexer': ('pygments.lexers.data', 'JSONBareObject', (), (), ()), @@ -244,6 +249,7 @@ LEXERS = { 'JuliaConsoleLexer': ('pygments.lexers.julia', 'Julia console', ('jlcon', 'julia-repl'), (), ()), 'JuliaLexer': ('pygments.lexers.julia', 'Julia', ('julia', 'jl'), ('*.jl',), ('text/x-julia', 'application/x-julia')), 'JuttleLexer': ('pygments.lexers.javascript', 'Juttle', ('juttle',), ('*.juttle',), ('application/juttle', 'application/x-juttle', 'text/x-juttle', 'text/juttle')), + 'KLexer': ('pygments.lexers.q', 'K', ('k',), ('*.k',), ()), 'KalLexer': ('pygments.lexers.javascript', 'Kal', ('kal',), ('*.kal',), ('text/kal', 'application/kal')), 'KconfigLexer': ('pygments.lexers.configs', 'Kconfig', ('kconfig', 'menuconfig', 'linux-config', 'kernel-config'), ('Kconfig*', '*Config.in*', 'external.in*', 'standard-modules.in'), ('text/x-kconfig',)), 'KernelLogLexer': ('pygments.lexers.textfmts', 'Kernel log', ('kmsg', 'dmesg'), ('*.kmsg', '*.dmesg'), ()), @@ -273,9 +279,11 @@ LEXERS = { 'LogosLexer': ('pygments.lexers.objective', 'Logos', ('logos',), ('*.x', '*.xi', '*.xm', '*.xmi'), ('text/x-logos',)), 'LogtalkLexer': ('pygments.lexers.prolog', 'Logtalk', ('logtalk',), ('*.lgt', '*.logtalk'), ('text/x-logtalk',)), 'LuaLexer': ('pygments.lexers.scripting', 'Lua', ('lua',), ('*.lua', '*.wlua'), ('text/x-lua', 'application/x-lua')), + 'MCFunctionLexer': ('pygments.lexers.mcfunction', 'MCFunction', ('mcfunction', 'mcf'), ('*.mcfunction',), ('text/mcfunction',)), 'MIMELexer': ('pygments.lexers.mime', 'MIME', ('mime',), (), ('multipart/mixed', 'multipart/related', 'multipart/alternative')), 'MOOCodeLexer': ('pygments.lexers.scripting', 'MOOCode', ('moocode', 'moo'), ('*.moo',), ('text/x-moocode',)), 'MSDOSSessionLexer': ('pygments.lexers.shell', 'MSDOS Session', ('doscon',), (), ()), + 'Macaulay2Lexer': ('pygments.lexers.macaulay2', 'Macaulay2', ('macaulay2',), ('*.m2',), ()), 'MakefileLexer': ('pygments.lexers.make', 'Makefile', ('make', 'makefile', 'mf', 'bsdmake'), ('*.mak', '*.mk', 'Makefile', 'makefile', 'Makefile.*', 'GNUmakefile'), ('text/x-makefile',)), 'MakoCssLexer': ('pygments.lexers.templates', 'CSS+Mako', ('css+mako',), (), ('text/css+mako',)), 'MakoHtmlLexer': ('pygments.lexers.templates', 'HTML+Mako', ('html+mako',), (), ('text/html+mako',)), @@ -379,8 +387,11 @@ LEXERS = { 'PythonConsoleLexer': ('pygments.lexers.python', 'Python console session', ('pycon',), (), ('text/x-python-doctest',)), 'PythonLexer': ('pygments.lexers.python', 'Python', ('python', 'py', 'sage', 'python3', 'py3'), ('*.py', '*.pyw', '*.jy', '*.sage', '*.sc', 'SConstruct', 'SConscript', '*.bzl', 'BUCK', 'BUILD', 'BUILD.bazel', 'WORKSPACE', '*.tac'), ('text/x-python', 'application/x-python', 'text/x-python3', 'application/x-python3')), 'PythonTracebackLexer': ('pygments.lexers.python', 'Python Traceback', ('pytb', 'py3tb'), ('*.pytb', '*.py3tb'), ('text/x-python-traceback', 'text/x-python3-traceback')), + 'PythonUL4Lexer': ('pygments.lexers.ul4', 'Python+UL4', ('py+ul4',), ('*.pyul4',), ()), 'QBasicLexer': ('pygments.lexers.basic', 'QBasic', ('qbasic', 'basic'), ('*.BAS', '*.bas'), ('text/basic',)), + 'QLexer': ('pygments.lexers.q', 'Q', ('q',), ('*.q',), ()), 'QVToLexer': ('pygments.lexers.qvt', 'QVTO', ('qvto', 'qvt'), ('*.qvto',), ()), + 'QlikLexer': ('pygments.lexers.qlik', 'Qlik', ('qlik', 'qlikview', 'qliksense', 'qlikscript'), ('*.qvs', '*.qvw'), ()), 'QmlLexer': ('pygments.lexers.webmisc', 'QML', ('qml', 'qbs'), ('*.qml', '*.qbs'), ('application/x-qml', 'application/x-qt.qbs+qml')), 'RConsoleLexer': ('pygments.lexers.r', 'RConsole', ('rconsole', 'rout'), ('*.Rout',), ()), 'RNCCompactLexer': ('pygments.lexers.rnc', 'Relax-NG Compact', ('rng-compact', 'rnc'), ('*.rnc',), ()), @@ -408,7 +419,7 @@ LEXERS = { 'RitaLexer': ('pygments.lexers.rita', 'Rita', ('rita',), ('*.rita',), ('text/rita',)), 'RoboconfGraphLexer': ('pygments.lexers.roboconf', 'Roboconf Graph', ('roboconf-graph',), ('*.graph',), ()), 'RoboconfInstancesLexer': ('pygments.lexers.roboconf', 'Roboconf Instances', ('roboconf-instances',), ('*.instances',), ()), - 'RobotFrameworkLexer': ('pygments.lexers.robotframework', 'RobotFramework', ('robotframework',), ('*.robot',), ('text/x-robotframework',)), + 'RobotFrameworkLexer': ('pygments.lexers.robotframework', 'RobotFramework', ('robotframework',), ('*.robot', '*.resource'), ('text/x-robotframework',)), 'RqlLexer': ('pygments.lexers.sql', 'RQL', ('rql',), ('*.rql',), ('text/x-rql',)), 'RslLexer': ('pygments.lexers.dsls', 'RSL', ('rsl',), ('*.rsl',), ('text/rsl',)), 'RstLexer': ('pygments.lexers.markup', 'reStructuredText', ('restructuredtext', 'rst', 'rest'), ('*.rst', '*.rest'), ('text/x-rst', 'text/prs.fallenstein.rst')), @@ -419,6 +430,7 @@ LEXERS = { 'SASLexer': ('pygments.lexers.sas', 'SAS', ('sas',), ('*.SAS', '*.sas'), ('text/x-sas', 'text/sas', 'application/x-sas')), 'SLexer': ('pygments.lexers.r', 'S', ('splus', 's', 'r'), ('*.S', '*.R', '.Rhistory', '.Rprofile', '.Renviron'), ('text/S-plus', 'text/S', 'text/x-r-source', 'text/x-r', 'text/x-R', 'text/x-r-history', 'text/x-r-profile')), 'SMLLexer': ('pygments.lexers.ml', 'Standard ML', ('sml',), ('*.sml', '*.sig', '*.fun'), ('text/x-standardml', 'application/x-standardml')), + 'SNBTLexer': ('pygments.lexers.mcfunction', 'SNBT', ('snbt',), ('*.snbt',), ('text/snbt',)), 'SarlLexer': ('pygments.lexers.jvm', 'SARL', ('sarl',), ('*.sarl',), ('text/x-sarl',)), 'SassLexer': ('pygments.lexers.css', 'Sass', ('sass',), ('*.sass',), ('text/x-sass',)), 'SaviLexer': ('pygments.lexers.savi', 'Savi', ('savi',), ('*.savi',), ()), @@ -465,6 +477,7 @@ LEXERS = { 'TNTLexer': ('pygments.lexers.tnt', 'Typographic Number Theory', ('tnt',), ('*.tnt',), ()), 'TOMLLexer': ('pygments.lexers.configs', 'TOML', ('toml',), ('*.toml', 'Pipfile', 'poetry.lock'), ()), 'Tads3Lexer': ('pygments.lexers.int_fiction', 'TADS 3', ('tads3',), ('*.t',), ()), + 'TalLexer': ('pygments.lexers.tal', 'Tal', ('tal', 'uxntal'), ('*.tal',), ('text/x-uxntal',)), 'TasmLexer': ('pygments.lexers.asm', 'TASM', ('tasm',), ('*.asm', '*.ASM', '*.tasm'), ('text/x-tasm',)), 'TclLexer': ('pygments.lexers.tcl', 'Tcl', ('tcl',), ('*.tcl', '*.rvt'), ('text/x-tcl', 'text/x-script.tcl', 'application/x-tcl')), 'TcshLexer': ('pygments.lexers.shell', 'Tcsh', ('tcsh', 'csh'), ('*.tcsh', '*.csh'), ('application/x-csh',)), @@ -490,8 +503,10 @@ LEXERS = { 'TypoScriptCssDataLexer': ('pygments.lexers.typoscript', 'TypoScriptCssData', ('typoscriptcssdata',), (), ()), 'TypoScriptHtmlDataLexer': ('pygments.lexers.typoscript', 'TypoScriptHtmlData', ('typoscripthtmldata',), (), ()), 'TypoScriptLexer': ('pygments.lexers.typoscript', 'TypoScript', ('typoscript',), ('*.typoscript',), ('text/x-typoscript',)), + 'UL4Lexer': ('pygments.lexers.ul4', 'UL4', ('ul4',), ('*.ul4',), ()), 'UcodeLexer': ('pygments.lexers.unicon', 'ucode', ('ucode',), ('*.u', '*.u1', '*.u2'), ()), 'UniconLexer': ('pygments.lexers.unicon', 'Unicon', ('unicon',), ('*.icn',), ('text/unicon',)), + 'UnixConfigLexer': ('pygments.lexers.configs', 'Unix/Linux config files', ('unixconfig', 'linuxconfig'), (), ()), 'UrbiscriptLexer': ('pygments.lexers.urbi', 'UrbiScript', ('urbiscript',), ('*.u',), ('application/x-urbiscript',)), 'UsdLexer': ('pygments.lexers.usd', 'USD', ('usd', 'usda'), ('*.usd', '*.usda'), ()), 'VBScriptLexer': ('pygments.lexers.basic', 'VBScript', ('vbscript',), ('*.vbs', '*.VBS'), ()), @@ -513,8 +528,9 @@ LEXERS = { 'WebIDLLexer': ('pygments.lexers.webidl', 'Web IDL', ('webidl',), ('*.webidl',), ()), 'WhileyLexer': ('pygments.lexers.whiley', 'Whiley', ('whiley',), ('*.whiley',), ('text/x-whiley',)), 'X10Lexer': ('pygments.lexers.x10', 'X10', ('x10', 'xten'), ('*.x10',), ('text/x-x10',)), + 'XMLUL4Lexer': ('pygments.lexers.ul4', 'XML+UL4', ('xml+ul4',), ('*.xmlul4',), ()), 'XQueryLexer': ('pygments.lexers.webmisc', 'XQuery', ('xquery', 'xqy', 'xq', 'xql', 'xqm'), ('*.xqy', '*.xquery', '*.xq', '*.xql', '*.xqm'), ('text/xquery', 'application/xquery')), - 'XmlDjangoLexer': ('pygments.lexers.templates', 'XML+Django/Jinja', ('xml+django', 'xml+jinja'), (), ('application/xml+django', 'application/xml+jinja')), + 'XmlDjangoLexer': ('pygments.lexers.templates', 'XML+Django/Jinja', ('xml+django', 'xml+jinja'), ('*.xml.j2', '*.xml.jinja2'), ('application/xml+django', 'application/xml+jinja')), 'XmlErbLexer': ('pygments.lexers.templates', 'XML+Ruby', ('xml+ruby', 'xml+erb'), (), ('application/xml+ruby',)), 'XmlLexer': ('pygments.lexers.html', 'XML', ('xml',), ('*.xml', '*.xsl', '*.rss', '*.xslt', '*.xsd', '*.wsdl', '*.wsf'), ('text/xml', 'application/xml', 'image/svg+xml', 'application/rss+xml', 'application/atom+xml')), 'XmlPhpLexer': ('pygments.lexers.templates', 'XML+PHP', ('xml+php',), (), ('application/xml+php',)), @@ -523,7 +539,7 @@ LEXERS = { 'XsltLexer': ('pygments.lexers.html', 'XSLT', ('xslt',), ('*.xsl', '*.xslt', '*.xpl'), ('application/xsl+xml', 'application/xslt+xml')), 'XtendLexer': ('pygments.lexers.jvm', 'Xtend', ('xtend',), ('*.xtend',), ('text/x-xtend',)), 'XtlangLexer': ('pygments.lexers.lisp', 'xtlang', ('extempore',), ('*.xtm',), ()), - 'YamlJinjaLexer': ('pygments.lexers.templates', 'YAML+Jinja', ('yaml+jinja', 'salt', 'sls'), ('*.sls',), ('text/x-yaml+jinja', 'text/x-sls')), + 'YamlJinjaLexer': ('pygments.lexers.templates', 'YAML+Jinja', ('yaml+jinja', 'salt', 'sls'), ('*.sls', '*.yaml.j2', '*.yml.j2', '*.yaml.jinja2', '*.yml.jinja2'), ('text/x-yaml+jinja', 'text/x-sls')), 'YamlLexer': ('pygments.lexers.data', 'YAML', ('yaml',), ('*.yaml', '*.yml'), ('text/x-yaml',)), 'YangLexer': ('pygments.lexers.yang', 'YANG', ('yang',), ('*.yang',), ('application/yang',)), 'ZeekLexer': ('pygments.lexers.dsls', 'Zeek', ('zeek', 'bro'), ('*.zeek', '*.bro'), ()), @@ -563,7 +579,7 @@ if __name__ == '__main__': # pragma: no cover content = fp.read() # replace crnl to nl for Windows. # - # Note that, originally, contributers should keep nl of master + # Note that, originally, contributors should keep nl of master # repository, for example by using some kind of automatic # management EOL, like `EolExtension # <https://www.mercurial-scm.org/wiki/EolExtension>`. diff --git a/contrib/python/Pygments/py3/pygments/lexers/_mql_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_mql_builtins.py index 5cc50a940b..3af29ebfc1 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_mql_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_mql_builtins.py @@ -4,7 +4,7 @@ Builtins for the MqlLexer. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ types = ( diff --git a/contrib/python/Pygments/py3/pygments/lexers/_mysql_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_mysql_builtins.py index dfc82bccea..d266789cae 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_mysql_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_mysql_builtins.py @@ -4,7 +4,9 @@ Self-updating data files for the MySQL lexer. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + Run with `python -I` to update. + + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -132,6 +134,7 @@ MYSQL_FUNCTIONS = ( 'can_access_routine', 'can_access_table', 'can_access_trigger', + 'can_access_user', 'can_access_view', 'cast', 'ceil', @@ -182,6 +185,7 @@ MYSQL_FUNCTIONS = ( 'get_dd_index_private_data', 'get_dd_index_sub_part_length', 'get_dd_property_key_value', + 'get_dd_schema_options', 'get_dd_tablespace_private_data', 'get_lock', 'greatest', @@ -346,6 +350,7 @@ MYSQL_FUNCTIONS = ( 'sin', 'sleep', 'soundex', + 'source_pos_wait', 'space', 'sqrt', 'st_area', @@ -357,6 +362,7 @@ MYSQL_FUNCTIONS = ( 'st_buffer', 'st_buffer_strategy', 'st_centroid', + 'st_collect', 'st_contains', 'st_convexhull', 'st_crosses', @@ -369,6 +375,7 @@ MYSQL_FUNCTIONS = ( 'st_envelope', 'st_equals', 'st_exteriorring', + 'st_frechetdistance', 'st_geohash', 'st_geomcollfromtext', 'st_geomcollfromtxt', @@ -382,6 +389,7 @@ MYSQL_FUNCTIONS = ( 'st_geomfromgeojson', 'st_geomfromtext', 'st_geomfromwkb', + 'st_hausdorffdistance', 'st_interiorringn', 'st_intersection', 'st_intersects', @@ -394,6 +402,8 @@ MYSQL_FUNCTIONS = ( 'st_length', 'st_linefromtext', 'st_linefromwkb', + 'st_lineinterpolatepoint', + 'st_lineinterpolatepoints', 'st_linestringfromtext', 'st_linestringfromwkb', 'st_longfromgeohash', @@ -416,6 +426,7 @@ MYSQL_FUNCTIONS = ( 'st_numinteriorrings', 'st_numpoints', 'st_overlaps', + 'st_pointatdistance', 'st_pointfromgeohash', 'st_pointfromtext', 'st_pointfromwkb', @@ -486,6 +497,7 @@ MYSQL_FUNCTIONS = ( MYSQL_OPTIMIZER_HINTS = ( 'bka', 'bnl', + 'derived_condition_pushdown', 'dupsweedout', 'firstmatch', 'group_index', @@ -505,6 +517,7 @@ MYSQL_OPTIMIZER_HINTS = ( 'mrr', 'no_bka', 'no_bnl', + 'no_derived_condition_pushdown', 'no_group_index', 'no_hash_join', 'no_icp', @@ -549,8 +562,10 @@ MYSQL_KEYWORDS = ( 'asc', 'ascii', 'asensitive', + 'assign_gtids_to_anonymous_transactions', 'at', 'attribute', + 'authentication', 'auto_increment', 'autoextend_size', 'avg', @@ -573,6 +588,7 @@ MYSQL_KEYWORDS = ( 'case', 'catalog_name', 'chain', + 'challenge_response', 'change', 'changed', 'channel', @@ -694,6 +710,7 @@ MYSQL_KEYWORDS = ( 'export', 'extended', 'extent_size', + 'factor', 'failed_login_attempts', 'false', 'fast', @@ -703,6 +720,7 @@ MYSQL_KEYWORDS = ( 'file', 'file_block_size', 'filter', + 'finish', 'first', 'first_value', 'flush', @@ -723,6 +741,7 @@ MYSQL_KEYWORDS = ( 'get', 'get_format', 'get_master_public_key', + 'get_source_public_key', 'global', 'grant', 'grants', @@ -730,6 +749,7 @@ MYSQL_KEYWORDS = ( 'group_replication', 'grouping', 'groups', + 'gtid_only', 'handler', 'hash', 'having', @@ -753,7 +773,9 @@ MYSQL_KEYWORDS = ( 'index', 'indexes', 'infile', + 'initial', 'initial_size', + 'initiate', 'inner', 'inout', 'insensitive', @@ -779,6 +801,7 @@ MYSQL_KEYWORDS = ( 'json_value', 'key', 'key_block_size', + 'keyring', 'keys', 'kill', 'lag', @@ -823,7 +846,6 @@ MYSQL_KEYWORDS = ( 'master_port', 'master_public_key_path', 'master_retry_count', - 'master_server_id', 'master_ssl', 'master_ssl_ca', 'master_ssl_capath', @@ -961,6 +983,7 @@ MYSQL_KEYWORDS = ( 'reference', 'references', 'regexp', + 'registration', 'relay', 'relay_log_file', 'relay_log_pos', @@ -975,6 +998,8 @@ MYSQL_KEYWORDS = ( 'repeat', 'repeatable', 'replace', + 'replica', + 'replicas', 'replicate_do_db', 'replicate_do_table', 'replicate_ignore_db', @@ -1049,6 +1074,33 @@ MYSQL_KEYWORDS = ( 'soname', 'sounds', 'source', + 'source_auto_position', + 'source_bind', + 'source_compression_algorithms', + 'source_connect_retry', + 'source_connection_auto_failover', + 'source_delay', + 'source_heartbeat_period', + 'source_host', + 'source_log_file', + 'source_log_pos', + 'source_password', + 'source_port', + 'source_public_key_path', + 'source_retry_count', + 'source_ssl', + 'source_ssl_ca', + 'source_ssl_capath', + 'source_ssl_cert', + 'source_ssl_cipher', + 'source_ssl_crl', + 'source_ssl_crlpath', + 'source_ssl_key', + 'source_ssl_verify_server_cert', + 'source_tls_ciphersuites', + 'source_tls_version', + 'source_user', + 'source_zstd_compression_level', 'spatial', 'specific', 'sql', @@ -1133,6 +1185,7 @@ MYSQL_KEYWORDS = ( 'unique', 'unknown', 'unlock', + 'unregister', 'unsigned', 'until', 'update', @@ -1174,6 +1227,7 @@ MYSQL_KEYWORDS = ( 'xor', 'year_month', 'zerofill', + 'zone', ) diff --git a/contrib/python/Pygments/py3/pygments/lexers/_openedge_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_openedge_builtins.py index 43611b29d0..dee62a963c 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_openedge_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_openedge_builtins.py @@ -4,7 +4,7 @@ Builtin list for the OpenEdgeLexer. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_php_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_php_builtins.py index 168cb4460b..a899f1d1f8 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_php_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_php_builtins.py @@ -5,71 +5,31 @@ This file loads the function names and their modules from the php webpage and generates itself. - Do not alter the MODULES dict by hand! + Run with `python -I` to regenerate. - WARNING: the generation transfers quite much data over your - internet connection. don't run that at home, use - a server ;-) - - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ -MODULES = {'.NET': ('dotnet_load',), - 'APC': ('apc_add', - 'apc_bin_dump', - 'apc_bin_dumpfile', - 'apc_bin_load', - 'apc_bin_loadfile', - 'apc_cache_info', - 'apc_cas', - 'apc_clear_cache', - 'apc_compile_file', - 'apc_dec', - 'apc_define_constants', - 'apc_delete_file', - 'apc_delete', - 'apc_exists', - 'apc_fetch', - 'apc_inc', - 'apc_load_constants', - 'apc_sma_info', - 'apc_store'), - 'APD': ('apd_breakpoint', - 'apd_callstack', - 'apd_clunk', - 'apd_continue', - 'apd_croak', - 'apd_dump_function_table', - 'apd_dump_persistent_resources', - 'apd_dump_regular_resources', - 'apd_echo', - 'apd_get_active_symbols', - 'apd_set_pprof_trace', - 'apd_set_session_trace_socket', - 'apd_set_session_trace', - 'apd_set_session', - 'override_function', - 'rename_function'), - 'Aliases and deprecated Mysqli': ('mysqli_bind_param', - 'mysqli_bind_result', - 'mysqli_client_encoding', - 'mysqli_connect', - 'mysqli_disable_rpl_parse', - 'mysqli_enable_reads_from_master', - 'mysqli_enable_rpl_parse', - 'mysqli_escape_string', +MODULES = {'APCu': ('apcu_add', + 'apcu_cache_info', + 'apcu_cas', + 'apcu_clear_cache', + 'apcu_dec', + 'apcu_delete', + 'apcu_enabled', + 'apcu_entry', + 'apcu_exists', + 'apcu_fetch', + 'apcu_inc', + 'apcu_key_info', + 'apcu_sma_info', + 'apcu_store'), + 'Aliases and deprecated Mysqli': ('mysqli_connect', 'mysqli_execute', - 'mysqli_fetch', - 'mysqli_get_cache_stats', - 'mysqli_get_metadata', - 'mysqli_master_query', - 'mysqli_param_count', - 'mysqli_report', - 'mysqli_rpl_parse_enabled', - 'mysqli_rpl_probe', - 'mysqli_send_long_data', - 'mysqli_slave_query'), + 'mysqli_get_client_stats', + 'mysqli_get_links_stats', + 'mysqli_report'), 'Apache': ('apache_child_terminate', 'apache_get_modules', 'apache_get_version', @@ -77,7 +37,6 @@ MODULES = {'.NET': ('dotnet_load',), 'apache_lookup_uri', 'apache_note', 'apache_request_headers', - 'apache_reset_timeout', 'apache_response_headers', 'apache_setenv', 'getallheaders', @@ -101,7 +60,10 @@ MODULES = {'.NET': ('dotnet_load',), 'array_intersect_uassoc', 'array_intersect_ukey', 'array_intersect', + 'array_is_list', 'array_key_exists', + 'array_key_first', + 'array_key_last', 'array_keys', 'array_map', 'array_merge_recursive', @@ -161,13 +123,6 @@ MODULES = {'.NET': ('dotnet_load',), 'uasort', 'uksort', 'usort'), - 'BBCode': ('bbcode_add_element', - 'bbcode_add_smiley', - 'bbcode_create', - 'bbcode_destroy', - 'bbcode_parse', - 'bbcode_set_arg_parser', - 'bbcode_set_flags'), 'BC Math': ('bcadd', 'bccomp', 'bcdiv', @@ -178,7 +133,6 @@ MODULES = {'.NET': ('dotnet_load',), 'bcscale', 'bcsqrt', 'bcsub'), - 'Blenc': ('blenc_encrypt',), 'Bzip2': ('bzclose', 'bzcompress', 'bzdecompress', @@ -189,22 +143,12 @@ MODULES = {'.NET': ('dotnet_load',), 'bzopen', 'bzread', 'bzwrite'), - 'COM': ('com_addref', - 'com_create_guid', + 'COM': ('com_create_guid', 'com_event_sink', 'com_get_active_object', - 'com_get', - 'com_invoke', - 'com_isenum', 'com_load_typelib', - 'com_load', 'com_message_pump', 'com_print_typeinfo', - 'com_propget', - 'com_propput', - 'com_propset', - 'com_release', - 'com_set', 'variant_abs', 'variant_add', 'variant_and', @@ -231,6 +175,7 @@ MODULES = {'.NET': ('dotnet_load',), 'variant_set', 'variant_sub', 'variant_xor'), + 'CSPRNG': ('random_bytes', 'random_int'), 'CUBRID': ('cubrid_bind', 'cubrid_close_prepare', 'cubrid_close_request', @@ -299,124 +244,28 @@ MODULES = {'.NET': ('dotnet_load',), 'cubrid_set_drop', 'cubrid_set_query_timeout', 'cubrid_version'), - 'Cairo': ('cairo_create', - 'cairo_font_face_get_type', - 'cairo_font_face_status', - 'cairo_font_options_create', - 'cairo_font_options_equal', - 'cairo_font_options_get_antialias', - 'cairo_font_options_get_hint_metrics', - 'cairo_font_options_get_hint_style', - 'cairo_font_options_get_subpixel_order', - 'cairo_font_options_hash', - 'cairo_font_options_merge', - 'cairo_font_options_set_antialias', - 'cairo_font_options_set_hint_metrics', - 'cairo_font_options_set_hint_style', - 'cairo_font_options_set_subpixel_order', - 'cairo_font_options_status', - 'cairo_format_stride_for_width', - 'cairo_image_surface_create_for_data', - 'cairo_image_surface_create_from_png', - 'cairo_image_surface_create', - 'cairo_image_surface_get_data', - 'cairo_image_surface_get_format', - 'cairo_image_surface_get_height', - 'cairo_image_surface_get_stride', - 'cairo_image_surface_get_width', - 'cairo_matrix_create_scale', - 'cairo_matrix_create_translate', - 'cairo_matrix_invert', - 'cairo_matrix_multiply', - 'cairo_matrix_rotate', - 'cairo_matrix_transform_distance', - 'cairo_matrix_transform_point', - 'cairo_matrix_translate', - 'cairo_pattern_add_color_stop_rgb', - 'cairo_pattern_add_color_stop_rgba', - 'cairo_pattern_create_for_surface', - 'cairo_pattern_create_linear', - 'cairo_pattern_create_radial', - 'cairo_pattern_create_rgb', - 'cairo_pattern_create_rgba', - 'cairo_pattern_get_color_stop_count', - 'cairo_pattern_get_color_stop_rgba', - 'cairo_pattern_get_extend', - 'cairo_pattern_get_filter', - 'cairo_pattern_get_linear_points', - 'cairo_pattern_get_matrix', - 'cairo_pattern_get_radial_circles', - 'cairo_pattern_get_rgba', - 'cairo_pattern_get_surface', - 'cairo_pattern_get_type', - 'cairo_pattern_set_extend', - 'cairo_pattern_set_filter', - 'cairo_pattern_set_matrix', - 'cairo_pattern_status', - 'cairo_pdf_surface_create', - 'cairo_pdf_surface_set_size', - 'cairo_ps_get_levels', - 'cairo_ps_level_to_string', - 'cairo_ps_surface_create', - 'cairo_ps_surface_dsc_begin_page_setup', - 'cairo_ps_surface_dsc_begin_setup', - 'cairo_ps_surface_dsc_comment', - 'cairo_ps_surface_get_eps', - 'cairo_ps_surface_restrict_to_level', - 'cairo_ps_surface_set_eps', - 'cairo_ps_surface_set_size', - 'cairo_scaled_font_create', - 'cairo_scaled_font_extents', - 'cairo_scaled_font_get_ctm', - 'cairo_scaled_font_get_font_face', - 'cairo_scaled_font_get_font_matrix', - 'cairo_scaled_font_get_font_options', - 'cairo_scaled_font_get_scale_matrix', - 'cairo_scaled_font_get_type', - 'cairo_scaled_font_glyph_extents', - 'cairo_scaled_font_status', - 'cairo_scaled_font_text_extents', - 'cairo_surface_copy_page', - 'cairo_surface_create_similar', - 'cairo_surface_finish', - 'cairo_surface_flush', - 'cairo_surface_get_content', - 'cairo_surface_get_device_offset', - 'cairo_surface_get_font_options', - 'cairo_surface_get_type', - 'cairo_surface_mark_dirty_rectangle', - 'cairo_surface_mark_dirty', - 'cairo_surface_set_device_offset', - 'cairo_surface_set_fallback_resolution', - 'cairo_surface_show_page', - 'cairo_surface_status', - 'cairo_surface_write_to_png', - 'cairo_svg_surface_create', - 'cairo_svg_surface_restrict_to_version', - 'cairo_svg_version_to_string'), 'Calendar': ('cal_days_in_month', 'cal_from_jd', 'cal_info', 'cal_to_jd', 'easter_date', 'easter_days', - 'FrenchToJD', - 'GregorianToJD', - 'JDDayOfWeek', - 'JDMonthName', - 'JDToFrench', - 'JDToGregorian', + 'frenchtojd', + 'gregoriantojd', + 'jddayofweek', + 'jdmonthname', + 'jdtofrench', + 'jdtogregorian', 'jdtojewish', - 'JDToJulian', + 'jdtojulian', 'jdtounix', - 'JewishToJD', - 'JulianToJD', + 'jewishtojd', + 'juliantojd', 'unixtojd'), 'Classes/Object': ('__autoload', - 'call_user_method_array', - 'call_user_method', 'class_alias', 'class_exists', + 'enum_exists', 'get_called_class', 'get_class_methods', 'get_class_vars', @@ -424,6 +273,7 @@ MODULES = {'.NET': ('dotnet_load',), 'get_declared_classes', 'get_declared_interfaces', 'get_declared_traits', + 'get_mangled_object_vars', 'get_object_vars', 'get_parent_class', 'interface_exists', @@ -432,16 +282,6 @@ MODULES = {'.NET': ('dotnet_load',), 'method_exists', 'property_exists', 'trait_exists'), - 'Classkit': ('classkit_import', - 'classkit_method_add', - 'classkit_method_copy', - 'classkit_method_redefine', - 'classkit_method_remove', - 'classkit_method_rename'), - 'Crack': ('crack_check', - 'crack_closedict', - 'crack_getlastmessage', - 'crack_opendict'), 'Ctype': ('ctype_alnum', 'ctype_alpha', 'ctype_cntrl', @@ -453,59 +293,6 @@ MODULES = {'.NET': ('dotnet_load',), 'ctype_space', 'ctype_upper', 'ctype_xdigit'), - 'Cyrus': ('cyrus_authenticate', - 'cyrus_bind', - 'cyrus_close', - 'cyrus_connect', - 'cyrus_query', - 'cyrus_unbind'), - 'DB++': ('dbplus_add', - 'dbplus_aql', - 'dbplus_chdir', - 'dbplus_close', - 'dbplus_curr', - 'dbplus_errcode', - 'dbplus_errno', - 'dbplus_find', - 'dbplus_first', - 'dbplus_flush', - 'dbplus_freealllocks', - 'dbplus_freelock', - 'dbplus_freerlocks', - 'dbplus_getlock', - 'dbplus_getunique', - 'dbplus_info', - 'dbplus_last', - 'dbplus_lockrel', - 'dbplus_next', - 'dbplus_open', - 'dbplus_prev', - 'dbplus_rchperm', - 'dbplus_rcreate', - 'dbplus_rcrtexact', - 'dbplus_rcrtlike', - 'dbplus_resolve', - 'dbplus_restorepos', - 'dbplus_rkeys', - 'dbplus_ropen', - 'dbplus_rquery', - 'dbplus_rrename', - 'dbplus_rsecindex', - 'dbplus_runlink', - 'dbplus_rzap', - 'dbplus_savepos', - 'dbplus_setindex', - 'dbplus_setindexbynumber', - 'dbplus_sql', - 'dbplus_tcl', - 'dbplus_tremove', - 'dbplus_undo', - 'dbplus_undoprepare', - 'dbplus_unlockrel', - 'dbplus_unselect', - 'dbplus_update', - 'dbplus_xlockrel', - 'dbplus_xunlockrel'), 'DBA': ('dba_close', 'dba_delete', 'dba_exists', @@ -654,23 +441,28 @@ MODULES = {'.NET': ('dotnet_load',), 'enchant_broker_dict_exists', 'enchant_broker_free_dict', 'enchant_broker_free', + 'enchant_broker_get_dict_path', 'enchant_broker_get_error', 'enchant_broker_init', 'enchant_broker_list_dicts', 'enchant_broker_request_dict', 'enchant_broker_request_pwl_dict', + 'enchant_broker_set_dict_path', 'enchant_broker_set_ordering', 'enchant_dict_add_to_personal', 'enchant_dict_add_to_session', + 'enchant_dict_add', 'enchant_dict_check', 'enchant_dict_describe', 'enchant_dict_get_error', + 'enchant_dict_is_added', 'enchant_dict_is_in_session', 'enchant_dict_quick_check', 'enchant_dict_store_replacement', 'enchant_dict_suggest'), 'Error Handling': ('debug_backtrace', 'debug_print_backtrace', + 'error_clear_last', 'error_get_last', 'error_log', 'error_reporting', @@ -686,16 +478,6 @@ MODULES = {'.NET': ('dotnet_load',), 'exif_thumbnail', 'read_exif_data'), 'Expect': ('expect_expectl', 'expect_popen'), - 'FAM': ('fam_cancel_monitor', - 'fam_close', - 'fam_monitor_collection', - 'fam_monitor_directory', - 'fam_monitor_file', - 'fam_next_event', - 'fam_open', - 'fam_pending', - 'fam_resume_monitor', - 'fam_suspend_monitor'), 'FDF': ('fdf_add_doc_javascript', 'fdf_add_template', 'fdf_close', @@ -733,6 +515,7 @@ MODULES = {'.NET': ('dotnet_load',), 'fdf_set_version'), 'FPM': ('fastcgi_finish_request',), 'FTP': ('ftp_alloc', + 'ftp_append', 'ftp_cdup', 'ftp_chdir', 'ftp_chmod', @@ -747,6 +530,7 @@ MODULES = {'.NET': ('dotnet_load',), 'ftp_login', 'ftp_mdtm', 'ftp_mkdir', + 'ftp_mlsd', 'ftp_nb_continue', 'ftp_nb_fget', 'ftp_nb_fput', @@ -924,6 +708,7 @@ MODULES = {'.NET': ('dotnet_load',), 'disk_total_space', 'diskfreespace', 'fclose', + 'fdatasync', 'feof', 'fflush', 'fgetc', @@ -953,6 +738,7 @@ MODULES = {'.NET': ('dotnet_load',), 'fscanf', 'fseek', 'fstat', + 'fsync', 'ftell', 'ftruncate', 'fwrite', @@ -1000,7 +786,55 @@ MODULES = {'.NET': ('dotnet_load',), 'filter_list', 'filter_var_array', 'filter_var'), - 'Firebird/InterBase': ('ibase_add_user', + 'Firebird/InterBase': ('fbird_add_user', + 'fbird_affected_rows', + 'fbird_backup', + 'fbird_blob_add', + 'fbird_blob_cancel', + 'fbird_blob_close', + 'fbird_blob_create', + 'fbird_blob_echo', + 'fbird_blob_get', + 'fbird_blob_import', + 'fbird_blob_info', + 'fbird_blob_open', + 'fbird_close', + 'fbird_commit_ret', + 'fbird_commit', + 'fbird_connect', + 'fbird_db_info', + 'fbird_delete_user', + 'fbird_drop_db', + 'fbird_errcode', + 'fbird_errmsg', + 'fbird_execute', + 'fbird_fetch_assoc', + 'fbird_fetch_object', + 'fbird_fetch_row', + 'fbird_field_info', + 'fbird_free_event_handler', + 'fbird_free_query', + 'fbird_free_result', + 'fbird_gen_id', + 'fbird_maintain_db', + 'fbird_modify_user', + 'fbird_name_result', + 'fbird_num_fields', + 'fbird_num_params', + 'fbird_param_info', + 'fbird_pconnect', + 'fbird_prepare', + 'fbird_query', + 'fbird_restore', + 'fbird_rollback_ret', + 'fbird_rollback', + 'fbird_server_info', + 'fbird_service_attach', + 'fbird_service_detach', + 'fbird_set_event_handler', + 'fbird_trans', + 'fbird_wait_event', + 'ibase_add_user', 'ibase_affected_rows', 'ibase_backup', 'ibase_blob_add', @@ -1048,67 +882,6 @@ MODULES = {'.NET': ('dotnet_load',), 'ibase_set_event_handler', 'ibase_trans', 'ibase_wait_event'), - 'FriBiDi': ('fribidi_log2vis',), - 'FrontBase': ('fbsql_affected_rows', - 'fbsql_autocommit', - 'fbsql_blob_size', - 'fbsql_change_user', - 'fbsql_clob_size', - 'fbsql_close', - 'fbsql_commit', - 'fbsql_connect', - 'fbsql_create_blob', - 'fbsql_create_clob', - 'fbsql_create_db', - 'fbsql_data_seek', - 'fbsql_database_password', - 'fbsql_database', - 'fbsql_db_query', - 'fbsql_db_status', - 'fbsql_drop_db', - 'fbsql_errno', - 'fbsql_error', - 'fbsql_fetch_array', - 'fbsql_fetch_assoc', - 'fbsql_fetch_field', - 'fbsql_fetch_lengths', - 'fbsql_fetch_object', - 'fbsql_fetch_row', - 'fbsql_field_flags', - 'fbsql_field_len', - 'fbsql_field_name', - 'fbsql_field_seek', - 'fbsql_field_table', - 'fbsql_field_type', - 'fbsql_free_result', - 'fbsql_get_autostart_info', - 'fbsql_hostname', - 'fbsql_insert_id', - 'fbsql_list_dbs', - 'fbsql_list_fields', - 'fbsql_list_tables', - 'fbsql_next_result', - 'fbsql_num_fields', - 'fbsql_num_rows', - 'fbsql_password', - 'fbsql_pconnect', - 'fbsql_query', - 'fbsql_read_blob', - 'fbsql_read_clob', - 'fbsql_result', - 'fbsql_rollback', - 'fbsql_rows_fetched', - 'fbsql_select_db', - 'fbsql_set_characterset', - 'fbsql_set_lob_mode', - 'fbsql_set_password', - 'fbsql_set_transaction', - 'fbsql_start_db', - 'fbsql_stop_db', - 'fbsql_table_name', - 'fbsql_tablename', - 'fbsql_username', - 'fbsql_warnings'), 'Function handling': ('call_user_func_array', 'call_user_func', 'create_function', @@ -1134,6 +907,8 @@ MODULES = {'.NET': ('dotnet_load',), 'imagealphablending', 'imageantialias', 'imagearc', + 'imageavif', + 'imagebmp', 'imagechar', 'imagecharup', 'imagecolorallocate', @@ -1159,6 +934,8 @@ MODULES = {'.NET': ('dotnet_load',), 'imagecopyresampled', 'imagecopyresized', 'imagecreate', + 'imagecreatefromavif', + 'imagecreatefrombmp', 'imagecreatefromgd2', 'imagecreatefromgd2part', 'imagecreatefromgd', @@ -1166,6 +943,7 @@ MODULES = {'.NET': ('dotnet_load',), 'imagecreatefromjpeg', 'imagecreatefrompng', 'imagecreatefromstring', + 'imagecreatefromtga', 'imagecreatefromwbmp', 'imagecreatefromwebp', 'imagecreatefromxbm', @@ -1191,6 +969,8 @@ MODULES = {'.NET': ('dotnet_load',), 'imagegammacorrect', 'imagegd2', 'imagegd', + 'imagegetclip', + 'imagegetinterpolation', 'imagegif', 'imagegrabscreen', 'imagegrabwindow', @@ -1200,22 +980,18 @@ MODULES = {'.NET': ('dotnet_load',), 'imagelayereffect', 'imageline', 'imageloadfont', + 'imageopenpolygon', 'imagepalettecopy', 'imagepalettetotruecolor', 'imagepng', 'imagepolygon', - 'imagepsbbox', - 'imagepsencodefont', - 'imagepsextendfont', - 'imagepsfreefont', - 'imagepsloadfont', - 'imagepsslantfont', - 'imagepstext', 'imagerectangle', + 'imageresolution', 'imagerotate', 'imagesavealpha', 'imagescale', 'imagesetbrush', + 'imagesetclip', 'imagesetinterpolation', 'imagesetpixel', 'imagesetstyle', @@ -1239,6 +1015,7 @@ MODULES = {'.NET': ('dotnet_load',), 'GMP': ('gmp_abs', 'gmp_add', 'gmp_and', + 'gmp_binomial', 'gmp_clrbit', 'gmp_cmp', 'gmp_com', @@ -1247,26 +1024,36 @@ MODULES = {'.NET': ('dotnet_load',), 'gmp_div_r', 'gmp_div', 'gmp_divexact', + 'gmp_export', 'gmp_fact', 'gmp_gcd', 'gmp_gcdext', 'gmp_hamdist', + 'gmp_import', 'gmp_init', 'gmp_intval', 'gmp_invert', 'gmp_jacobi', + 'gmp_kronecker', + 'gmp_lcm', 'gmp_legendre', 'gmp_mod', 'gmp_mul', 'gmp_neg', 'gmp_nextprime', 'gmp_or', + 'gmp_perfect_power', 'gmp_perfect_square', 'gmp_popcount', 'gmp_pow', 'gmp_powm', 'gmp_prob_prime', + 'gmp_random_bits', + 'gmp_random_range', + 'gmp_random_seed', 'gmp_random', + 'gmp_root', + 'gmp_rootrem', 'gmp_scan0', 'gmp_scan1', 'gmp_setbit', @@ -1316,7 +1103,9 @@ MODULES = {'.NET': ('dotnet_load',), 'gnupg_encrypt', 'gnupg_encryptsign', 'gnupg_export', + 'gnupg_getengineinfo', 'gnupg_geterror', + 'gnupg_geterrorinfo', 'gnupg_getprotocol', 'gnupg_import', 'gnupg_init', @@ -1326,7 +1115,6 @@ MODULES = {'.NET': ('dotnet_load',), 'gnupg_setsignmode', 'gnupg_sign', 'gnupg_verify'), - 'Gopher': ('gopher_parsedir',), 'Grapheme': ('grapheme_extract', 'grapheme_stripos', 'grapheme_stristr', @@ -1336,99 +1124,13 @@ MODULES = {'.NET': ('dotnet_load',), 'grapheme_strrpos', 'grapheme_strstr', 'grapheme_substr'), - 'Gupnp': ('gupnp_context_get_host_ip', - 'gupnp_context_get_port', - 'gupnp_context_get_subscription_timeout', - 'gupnp_context_host_path', - 'gupnp_context_new', - 'gupnp_context_set_subscription_timeout', - 'gupnp_context_timeout_add', - 'gupnp_context_unhost_path', - 'gupnp_control_point_browse_start', - 'gupnp_control_point_browse_stop', - 'gupnp_control_point_callback_set', - 'gupnp_control_point_new', - 'gupnp_device_action_callback_set', - 'gupnp_device_info_get_service', - 'gupnp_device_info_get', - 'gupnp_root_device_get_available', - 'gupnp_root_device_get_relative_location', - 'gupnp_root_device_new', - 'gupnp_root_device_set_available', - 'gupnp_root_device_start', - 'gupnp_root_device_stop', - 'gupnp_service_action_get', - 'gupnp_service_action_return_error', - 'gupnp_service_action_return', - 'gupnp_service_action_set', - 'gupnp_service_freeze_notify', - 'gupnp_service_info_get_introspection', - 'gupnp_service_info_get', - 'gupnp_service_introspection_get_state_variable', - 'gupnp_service_notify', - 'gupnp_service_proxy_action_get', - 'gupnp_service_proxy_action_set', - 'gupnp_service_proxy_add_notify', - 'gupnp_service_proxy_callback_set', - 'gupnp_service_proxy_get_subscribed', - 'gupnp_service_proxy_remove_notify', - 'gupnp_service_proxy_set_subscribed', - 'gupnp_service_thaw_notify'), - 'HTTP': ('http_cache_etag', - 'http_cache_last_modified', - 'http_chunked_decode', - 'http_deflate', - 'http_inflate', - 'http_build_cookie', - 'http_date', - 'http_get_request_body_stream', - 'http_get_request_body', - 'http_get_request_headers', - 'http_match_etag', - 'http_match_modified', - 'http_match_request_header', - 'http_support', - 'http_negotiate_charset', - 'http_negotiate_content_type', - 'http_negotiate_language', - 'ob_deflatehandler', - 'ob_etaghandler', - 'ob_inflatehandler', - 'http_parse_cookie', - 'http_parse_headers', - 'http_parse_message', - 'http_parse_params', - 'http_persistent_handles_clean', - 'http_persistent_handles_count', - 'http_persistent_handles_ident', - 'http_get', - 'http_head', - 'http_post_data', - 'http_post_fields', - 'http_put_data', - 'http_put_file', - 'http_put_stream', - 'http_request_body_encode', - 'http_request_method_exists', - 'http_request_method_name', - 'http_request_method_register', - 'http_request_method_unregister', - 'http_request', - 'http_redirect', - 'http_send_content_disposition', - 'http_send_content_type', - 'http_send_data', - 'http_send_file', - 'http_send_last_modified', - 'http_send_status', - 'http_send_stream', - 'http_throttle', - 'http_build_str', - 'http_build_url'), 'Hash': ('hash_algos', 'hash_copy', + 'hash_equals', 'hash_file', 'hash_final', + 'hash_hkdf', + 'hash_hmac_algos', 'hash_hmac_file', 'hash_hmac', 'hash_init', @@ -1437,72 +1139,6 @@ MODULES = {'.NET': ('dotnet_load',), 'hash_update_stream', 'hash_update', 'hash'), - 'Hyperwave': ('hw_Array2Objrec', - 'hw_changeobject', - 'hw_Children', - 'hw_ChildrenObj', - 'hw_Close', - 'hw_Connect', - 'hw_connection_info', - 'hw_cp', - 'hw_Deleteobject', - 'hw_DocByAnchor', - 'hw_DocByAnchorObj', - 'hw_Document_Attributes', - 'hw_Document_BodyTag', - 'hw_Document_Content', - 'hw_Document_SetContent', - 'hw_Document_Size', - 'hw_dummy', - 'hw_EditText', - 'hw_Error', - 'hw_ErrorMsg', - 'hw_Free_Document', - 'hw_GetAnchors', - 'hw_GetAnchorsObj', - 'hw_GetAndLock', - 'hw_GetChildColl', - 'hw_GetChildCollObj', - 'hw_GetChildDocColl', - 'hw_GetChildDocCollObj', - 'hw_GetObject', - 'hw_GetObjectByQuery', - 'hw_GetObjectByQueryColl', - 'hw_GetObjectByQueryCollObj', - 'hw_GetObjectByQueryObj', - 'hw_GetParents', - 'hw_GetParentsObj', - 'hw_getrellink', - 'hw_GetRemote', - 'hw_getremotechildren', - 'hw_GetSrcByDestObj', - 'hw_GetText', - 'hw_getusername', - 'hw_Identify', - 'hw_InCollections', - 'hw_Info', - 'hw_InsColl', - 'hw_InsDoc', - 'hw_insertanchors', - 'hw_InsertDocument', - 'hw_InsertObject', - 'hw_mapid', - 'hw_Modifyobject', - 'hw_mv', - 'hw_New_Document', - 'hw_objrec2array', - 'hw_Output_Document', - 'hw_pConnect', - 'hw_PipeDocument', - 'hw_Root', - 'hw_setlinkroot', - 'hw_stat', - 'hw_Unlock', - 'hw_Who'), - 'Hyperwave API': ('hwapi_attribute_new', - 'hwapi_content_new', - 'hwapi_hgcsp', - 'hwapi_object_new'), 'IBM DB2': ('db2_autocommit', 'db2_bind_param', 'db2_client_info', @@ -1554,32 +1190,7 @@ MODULES = {'.NET': ('dotnet_load',), 'db2_stmt_errormsg', 'db2_table_privileges', 'db2_tables'), - 'ID3': ('id3_get_frame_long_name', - 'id3_get_frame_short_name', - 'id3_get_genre_id', - 'id3_get_genre_list', - 'id3_get_genre_name', - 'id3_get_tag', - 'id3_get_version', - 'id3_remove_tag', - 'id3_set_tag'), - 'IDN': ('grapheme_substr', 'idn_to_ascii', 'idn_to_unicode', 'idn_to_utf8'), - 'IIS': ('iis_add_server', - 'iis_get_dir_security', - 'iis_get_script_map', - 'iis_get_server_by_comment', - 'iis_get_server_by_path', - 'iis_get_server_rights', - 'iis_get_service_state', - 'iis_remove_server', - 'iis_set_app_settings', - 'iis_set_dir_security', - 'iis_set_script_map', - 'iis_set_server_rights', - 'iis_start_server', - 'iis_start_service', - 'iis_stop_server', - 'iis_stop_service'), + 'IDN': ('idn_to_ascii', 'idn_to_utf8'), 'IMAP': ('imap_8bit', 'imap_alerts', 'imap_append', @@ -1624,6 +1235,7 @@ MODULES = {'.NET': ('dotnet_load',), 'imap_mailboxmsginfo', 'imap_mime_header_decode', 'imap_msgno', + 'imap_mutf7_to_utf8', 'imap_num_msg', 'imap_num_recent', 'imap_open', @@ -1652,79 +1264,9 @@ MODULES = {'.NET': ('dotnet_load',), 'imap_unsubscribe', 'imap_utf7_decode', 'imap_utf7_encode', + 'imap_utf8_to_mutf7', 'imap_utf8'), - 'Informix': ('ifx_affected_rows', - 'ifx_blobinfile_mode', - 'ifx_byteasvarchar', - 'ifx_close', - 'ifx_connect', - 'ifx_copy_blob', - 'ifx_create_blob', - 'ifx_create_char', - 'ifx_do', - 'ifx_error', - 'ifx_errormsg', - 'ifx_fetch_row', - 'ifx_fieldproperties', - 'ifx_fieldtypes', - 'ifx_free_blob', - 'ifx_free_char', - 'ifx_free_result', - 'ifx_get_blob', - 'ifx_get_char', - 'ifx_getsqlca', - 'ifx_htmltbl_result', - 'ifx_nullformat', - 'ifx_num_fields', - 'ifx_num_rows', - 'ifx_pconnect', - 'ifx_prepare', - 'ifx_query', - 'ifx_textasvarchar', - 'ifx_update_blob', - 'ifx_update_char', - 'ifxus_close_slob', - 'ifxus_create_slob', - 'ifxus_free_slob', - 'ifxus_open_slob', - 'ifxus_read_slob', - 'ifxus_seek_slob', - 'ifxus_tell_slob', - 'ifxus_write_slob'), - 'Ingres': ('ingres_autocommit_state', - 'ingres_autocommit', - 'ingres_charset', - 'ingres_close', - 'ingres_commit', - 'ingres_connect', - 'ingres_cursor', - 'ingres_errno', - 'ingres_error', - 'ingres_errsqlstate', - 'ingres_escape_string', - 'ingres_execute', - 'ingres_fetch_array', - 'ingres_fetch_assoc', - 'ingres_fetch_object', - 'ingres_fetch_proc_return', - 'ingres_fetch_row', - 'ingres_field_length', - 'ingres_field_name', - 'ingres_field_nullable', - 'ingres_field_precision', - 'ingres_field_scale', - 'ingres_field_type', - 'ingres_free_result', - 'ingres_next_error', - 'ingres_num_fields', - 'ingres_num_rows', - 'ingres_pconnect', - 'ingres_prepare', - 'ingres_query', - 'ingres_result_seek', - 'ingres_rollback', - 'ingres_set_environment', - 'ingres_unbuffered_query'), + 'Igbinary': ('igbinary_serialize', 'igbinary_unserialize'), 'Inotify': ('inotify_add_watch', 'inotify_init', 'inotify_queue_len', @@ -1734,20 +1276,10 @@ MODULES = {'.NET': ('dotnet_load',), 'json_encode', 'json_last_error_msg', 'json_last_error'), - 'Java': ('java_last_exception_clear', 'java_last_exception_get'), - 'Judy': ('judy_type', 'judy_version'), - 'KADM5': ('kadm5_chpass_principal', - 'kadm5_create_principal', - 'kadm5_delete_principal', - 'kadm5_destroy', - 'kadm5_flush', - 'kadm5_get_policies', - 'kadm5_get_principal', - 'kadm5_get_principals', - 'kadm5_init_with_password', - 'kadm5_modify_principal'), 'LDAP': ('ldap_8859_to_t61', + 'ldap_add_ext', 'ldap_add', + 'ldap_bind_ext', 'ldap_bind', 'ldap_close', 'ldap_compare', @@ -1755,11 +1287,18 @@ MODULES = {'.NET': ('dotnet_load',), 'ldap_control_paged_result_response', 'ldap_control_paged_result', 'ldap_count_entries', + 'ldap_count_references', + 'ldap_delete_ext', 'ldap_delete', 'ldap_dn2ufn', 'ldap_err2str', 'ldap_errno', 'ldap_error', + 'ldap_escape', + 'ldap_exop_passwd', + 'ldap_exop_refresh', + 'ldap_exop_whoami', + 'ldap_exop', 'ldap_explode_dn', 'ldap_first_attribute', 'ldap_first_entry', @@ -1772,16 +1311,22 @@ MODULES = {'.NET': ('dotnet_load',), 'ldap_get_values_len', 'ldap_get_values', 'ldap_list', + 'ldap_mod_add_ext', 'ldap_mod_add', + 'ldap_mod_del_ext', 'ldap_mod_del', + 'ldap_mod_replace_ext', 'ldap_mod_replace', + 'ldap_modify_batch', 'ldap_modify', 'ldap_next_attribute', 'ldap_next_entry', 'ldap_next_reference', + 'ldap_parse_exop', 'ldap_parse_reference', 'ldap_parse_result', 'ldap_read', + 'ldap_rename_ext', 'ldap_rename', 'ldap_sasl_bind', 'ldap_search', @@ -1792,83 +1337,6 @@ MODULES = {'.NET': ('dotnet_load',), 'ldap_t61_to_8859', 'ldap_unbind'), 'LZF': ('lzf_compress', 'lzf_decompress', 'lzf_optimized_for'), - 'Libevent': ('event_add', - 'event_base_free', - 'event_base_loop', - 'event_base_loopbreak', - 'event_base_loopexit', - 'event_base_new', - 'event_base_priority_init', - 'event_base_set', - 'event_buffer_base_set', - 'event_buffer_disable', - 'event_buffer_enable', - 'event_buffer_fd_set', - 'event_buffer_free', - 'event_buffer_new', - 'event_buffer_priority_set', - 'event_buffer_read', - 'event_buffer_set_callback', - 'event_buffer_timeout_set', - 'event_buffer_watermark_set', - 'event_buffer_write', - 'event_del', - 'event_free', - 'event_new', - 'event_set'), - 'Lotus Notes': ('notes_body', - 'notes_copy_db', - 'notes_create_db', - 'notes_create_note', - 'notes_drop_db', - 'notes_find_note', - 'notes_header_info', - 'notes_list_msgs', - 'notes_mark_read', - 'notes_mark_unread', - 'notes_nav_create', - 'notes_search', - 'notes_unread', - 'notes_version'), - 'MCVE': ('m_checkstatus', - 'm_completeauthorizations', - 'm_connect', - 'm_connectionerror', - 'm_deletetrans', - 'm_destroyconn', - 'm_destroyengine', - 'm_getcell', - 'm_getcellbynum', - 'm_getcommadelimited', - 'm_getheader', - 'm_initconn', - 'm_initengine', - 'm_iscommadelimited', - 'm_maxconntimeout', - 'm_monitor', - 'm_numcolumns', - 'm_numrows', - 'm_parsecommadelimited', - 'm_responsekeys', - 'm_responseparam', - 'm_returnstatus', - 'm_setblocking', - 'm_setdropfile', - 'm_setip', - 'm_setssl_cafile', - 'm_setssl_files', - 'm_setssl', - 'm_settimeout', - 'm_sslcert_gen_hash', - 'm_transactionssent', - 'm_transinqueue', - 'm_transkeyval', - 'm_transnew', - 'm_transsend', - 'm_uwait', - 'm_validateidentifier', - 'm_verifyconnection', - 'm_verifysslcert'), 'Mail': ('ezmlm_hash', 'mail'), 'Mailparse': ('mailparse_determine_best_xfer_encoding', 'mailparse_msg_create', @@ -1903,11 +1371,13 @@ MODULES = {'.NET': ('dotnet_load',), 'deg2rad', 'exp', 'expm1', + 'fdiv', 'floor', 'fmod', 'getrandmax', 'hexdec', 'hypot', + 'intdiv', 'is_finite', 'is_infinite', 'is_nan', @@ -1932,113 +1402,8 @@ MODULES = {'.NET': ('dotnet_load',), 'srand', 'tan', 'tanh'), - 'MaxDB': ('maxdb_affected_rows', - 'maxdb_autocommit', - 'maxdb_bind_param', - 'maxdb_bind_result', - 'maxdb_change_user', - 'maxdb_character_set_name', - 'maxdb_client_encoding', - 'maxdb_close_long_data', - 'maxdb_close', - 'maxdb_commit', - 'maxdb_connect_errno', - 'maxdb_connect_error', - 'maxdb_connect', - 'maxdb_data_seek', - 'maxdb_debug', - 'maxdb_disable_reads_from_master', - 'maxdb_disable_rpl_parse', - 'maxdb_dump_debug_info', - 'maxdb_embedded_connect', - 'maxdb_enable_reads_from_master', - 'maxdb_enable_rpl_parse', - 'maxdb_errno', - 'maxdb_error', - 'maxdb_escape_string', - 'maxdb_execute', - 'maxdb_fetch_array', - 'maxdb_fetch_assoc', - 'maxdb_fetch_field_direct', - 'maxdb_fetch_field', - 'maxdb_fetch_fields', - 'maxdb_fetch_lengths', - 'maxdb_fetch_object', - 'maxdb_fetch_row', - 'maxdb_fetch', - 'maxdb_field_count', - 'maxdb_field_seek', - 'maxdb_field_tell', - 'maxdb_free_result', - 'maxdb_get_client_info', - 'maxdb_get_client_version', - 'maxdb_get_host_info', - 'maxdb_get_metadata', - 'maxdb_get_proto_info', - 'maxdb_get_server_info', - 'maxdb_get_server_version', - 'maxdb_info', - 'maxdb_init', - 'maxdb_insert_id', - 'maxdb_kill', - 'maxdb_master_query', - 'maxdb_more_results', - 'maxdb_multi_query', - 'maxdb_next_result', - 'maxdb_num_fields', - 'maxdb_num_rows', - 'maxdb_options', - 'maxdb_param_count', - 'maxdb_ping', - 'maxdb_prepare', - 'maxdb_query', - 'maxdb_real_connect', - 'maxdb_real_escape_string', - 'maxdb_real_query', - 'maxdb_report', - 'maxdb_rollback', - 'maxdb_rpl_parse_enabled', - 'maxdb_rpl_probe', - 'maxdb_rpl_query_type', - 'maxdb_select_db', - 'maxdb_send_long_data', - 'maxdb_send_query', - 'maxdb_server_end', - 'maxdb_server_init', - 'maxdb_set_opt', - 'maxdb_sqlstate', - 'maxdb_ssl_set', - 'maxdb_stat', - 'maxdb_stmt_affected_rows', - 'maxdb_stmt_bind_param', - 'maxdb_stmt_bind_result', - 'maxdb_stmt_close_long_data', - 'maxdb_stmt_close', - 'maxdb_stmt_data_seek', - 'maxdb_stmt_errno', - 'maxdb_stmt_error', - 'maxdb_stmt_execute', - 'maxdb_stmt_fetch', - 'maxdb_stmt_free_result', - 'maxdb_stmt_init', - 'maxdb_stmt_num_rows', - 'maxdb_stmt_param_count', - 'maxdb_stmt_prepare', - 'maxdb_stmt_reset', - 'maxdb_stmt_result_metadata', - 'maxdb_stmt_send_long_data', - 'maxdb_stmt_sqlstate', - 'maxdb_stmt_store_result', - 'maxdb_store_result', - 'maxdb_thread_id', - 'maxdb_thread_safe', - 'maxdb_use_result', - 'maxdb_warning_count'), - 'Mcrypt': ('mcrypt_cbc', - 'mcrypt_cfb', - 'mcrypt_create_iv', + 'Mcrypt': ('mcrypt_create_iv', 'mcrypt_decrypt', - 'mcrypt_ecb', 'mcrypt_enc_get_algorithms_name', 'mcrypt_enc_get_block_size', 'mcrypt_enc_get_iv_size', @@ -2051,7 +1416,6 @@ MODULES = {'.NET': ('dotnet_load',), 'mcrypt_enc_self_test', 'mcrypt_encrypt', 'mcrypt_generic_deinit', - 'mcrypt_generic_end', 'mcrypt_generic_init', 'mcrypt_generic', 'mcrypt_get_block_size', @@ -2069,7 +1433,6 @@ MODULES = {'.NET': ('dotnet_load',), 'mcrypt_module_is_block_mode', 'mcrypt_module_open', 'mcrypt_module_self_test', - 'mcrypt_ofb', 'mdecrypt_generic'), 'Memcache': ('memcache_debug',), 'Mhash': ('mhash_count', @@ -2077,15 +1440,8 @@ MODULES = {'.NET': ('dotnet_load',), 'mhash_get_hash_name', 'mhash_keygen_s2k', 'mhash'), - 'Ming': ('ming_keypress', - 'ming_setcubicthreshold', - 'ming_setscale', - 'ming_setswfcompression', - 'ming_useconstants', - 'ming_useswfversion'), 'Misc.': ('connection_aborted', 'connection_status', - 'connection_timeout', 'constant', 'define', 'defined', @@ -2096,10 +1452,17 @@ MODULES = {'.NET': ('dotnet_load',), '__halt_compiler', 'highlight_file', 'highlight_string', + 'hrtime', 'ignore_user_abort', 'pack', - 'php_check_syntax', 'php_strip_whitespace', + 'sapi_windows_cp_conv', + 'sapi_windows_cp_get', + 'sapi_windows_cp_is_utf8', + 'sapi_windows_cp_set', + 'sapi_windows_generate_ctrl_event', + 'sapi_windows_set_ctrl_handler', + 'sapi_windows_vt100_support', 'show_source', 'sleep', 'sys_getloadavg', @@ -2108,59 +1471,8 @@ MODULES = {'.NET': ('dotnet_load',), 'uniqid', 'unpack', 'usleep'), - 'Mongo': ('bson_decode', 'bson_encode'), - 'Msession': ('msession_connect', - 'msession_count', - 'msession_create', - 'msession_destroy', - 'msession_disconnect', - 'msession_find', - 'msession_get_array', - 'msession_get_data', - 'msession_get', - 'msession_inc', - 'msession_list', - 'msession_listvar', - 'msession_lock', - 'msession_plugin', - 'msession_randstr', - 'msession_set_array', - 'msession_set_data', - 'msession_set', - 'msession_timeout', - 'msession_uniq', - 'msession_unlock'), - 'Mssql': ('mssql_bind', - 'mssql_close', - 'mssql_connect', - 'mssql_data_seek', - 'mssql_execute', - 'mssql_fetch_array', - 'mssql_fetch_assoc', - 'mssql_fetch_batch', - 'mssql_fetch_field', - 'mssql_fetch_object', - 'mssql_fetch_row', - 'mssql_field_length', - 'mssql_field_name', - 'mssql_field_seek', - 'mssql_field_type', - 'mssql_free_result', - 'mssql_free_statement', - 'mssql_get_last_message', - 'mssql_guid_string', - 'mssql_init', - 'mssql_min_error_severity', - 'mssql_min_message_severity', - 'mssql_next_result', - 'mssql_num_fields', - 'mssql_num_rows', - 'mssql_pconnect', - 'mssql_query', - 'mssql_result', - 'mssql_rows_affected', - 'mssql_select_db'), 'Multibyte String': ('mb_check_encoding', + 'mb_chr', 'mb_convert_case', 'mb_convert_encoding', 'mb_convert_kana', @@ -2191,13 +1503,16 @@ MODULES = {'.NET': ('dotnet_load',), 'mb_internal_encoding', 'mb_language', 'mb_list_encodings', + 'mb_ord', 'mb_output_handler', 'mb_parse_str', 'mb_preferred_mime_name', 'mb_regex_encoding', 'mb_regex_set_options', + 'mb_scrub', 'mb_send_mail', 'mb_split', + 'mb_str_split', 'mb_strcut', 'mb_strimwidth', 'mb_stripos', @@ -2263,184 +1578,9 @@ MODULES = {'.NET': ('dotnet_load',), 'mysql_tablename', 'mysql_thread_id', 'mysql_unbuffered_query'), - 'Mysqlnd_memcache': ('mysqlnd_memcache_get_config', 'mysqlnd_memcache_set'), - 'Mysqlnd_ms': ('mysqlnd_ms_dump_servers', - 'mysqlnd_ms_fabric_select_global', - 'mysqlnd_ms_fabric_select_shard', - 'mysqlnd_ms_get_last_gtid', - 'mysqlnd_ms_get_last_used_connection', - 'mysqlnd_ms_get_stats', - 'mysqlnd_ms_match_wild', - 'mysqlnd_ms_query_is_select', - 'mysqlnd_ms_set_qos', - 'mysqlnd_ms_set_user_pick_server'), - 'Mysqlnd_uh': ('mysqlnd_uh_convert_to_mysqlnd', - 'mysqlnd_uh_set_connection_proxy', - 'mysqlnd_uh_set_statement_proxy'), - 'NSAPI': ('nsapi_request_headers', 'nsapi_response_headers', 'nsapi_virtual'), - 'Ncurses': ('ncurses_addch', - 'ncurses_addchnstr', - 'ncurses_addchstr', - 'ncurses_addnstr', - 'ncurses_addstr', - 'ncurses_assume_default_colors', - 'ncurses_attroff', - 'ncurses_attron', - 'ncurses_attrset', - 'ncurses_baudrate', - 'ncurses_beep', - 'ncurses_bkgd', - 'ncurses_bkgdset', - 'ncurses_border', - 'ncurses_bottom_panel', - 'ncurses_can_change_color', - 'ncurses_cbreak', - 'ncurses_clear', - 'ncurses_clrtobot', - 'ncurses_clrtoeol', - 'ncurses_color_content', - 'ncurses_color_set', - 'ncurses_curs_set', - 'ncurses_def_prog_mode', - 'ncurses_def_shell_mode', - 'ncurses_define_key', - 'ncurses_del_panel', - 'ncurses_delay_output', - 'ncurses_delch', - 'ncurses_deleteln', - 'ncurses_delwin', - 'ncurses_doupdate', - 'ncurses_echo', - 'ncurses_echochar', - 'ncurses_end', - 'ncurses_erase', - 'ncurses_erasechar', - 'ncurses_filter', - 'ncurses_flash', - 'ncurses_flushinp', - 'ncurses_getch', - 'ncurses_getmaxyx', - 'ncurses_getmouse', - 'ncurses_getyx', - 'ncurses_halfdelay', - 'ncurses_has_colors', - 'ncurses_has_ic', - 'ncurses_has_il', - 'ncurses_has_key', - 'ncurses_hide_panel', - 'ncurses_hline', - 'ncurses_inch', - 'ncurses_init_color', - 'ncurses_init_pair', - 'ncurses_init', - 'ncurses_insch', - 'ncurses_insdelln', - 'ncurses_insertln', - 'ncurses_insstr', - 'ncurses_instr', - 'ncurses_isendwin', - 'ncurses_keyok', - 'ncurses_keypad', - 'ncurses_killchar', - 'ncurses_longname', - 'ncurses_meta', - 'ncurses_mouse_trafo', - 'ncurses_mouseinterval', - 'ncurses_mousemask', - 'ncurses_move_panel', - 'ncurses_move', - 'ncurses_mvaddch', - 'ncurses_mvaddchnstr', - 'ncurses_mvaddchstr', - 'ncurses_mvaddnstr', - 'ncurses_mvaddstr', - 'ncurses_mvcur', - 'ncurses_mvdelch', - 'ncurses_mvgetch', - 'ncurses_mvhline', - 'ncurses_mvinch', - 'ncurses_mvvline', - 'ncurses_mvwaddstr', - 'ncurses_napms', - 'ncurses_new_panel', - 'ncurses_newpad', - 'ncurses_newwin', - 'ncurses_nl', - 'ncurses_nocbreak', - 'ncurses_noecho', - 'ncurses_nonl', - 'ncurses_noqiflush', - 'ncurses_noraw', - 'ncurses_pair_content', - 'ncurses_panel_above', - 'ncurses_panel_below', - 'ncurses_panel_window', - 'ncurses_pnoutrefresh', - 'ncurses_prefresh', - 'ncurses_putp', - 'ncurses_qiflush', - 'ncurses_raw', - 'ncurses_refresh', - 'ncurses_replace_panel', - 'ncurses_reset_prog_mode', - 'ncurses_reset_shell_mode', - 'ncurses_resetty', - 'ncurses_savetty', - 'ncurses_scr_dump', - 'ncurses_scr_init', - 'ncurses_scr_restore', - 'ncurses_scr_set', - 'ncurses_scrl', - 'ncurses_show_panel', - 'ncurses_slk_attr', - 'ncurses_slk_attroff', - 'ncurses_slk_attron', - 'ncurses_slk_attrset', - 'ncurses_slk_clear', - 'ncurses_slk_color', - 'ncurses_slk_init', - 'ncurses_slk_noutrefresh', - 'ncurses_slk_refresh', - 'ncurses_slk_restore', - 'ncurses_slk_set', - 'ncurses_slk_touch', - 'ncurses_standend', - 'ncurses_standout', - 'ncurses_start_color', - 'ncurses_termattrs', - 'ncurses_termname', - 'ncurses_timeout', - 'ncurses_top_panel', - 'ncurses_typeahead', - 'ncurses_ungetch', - 'ncurses_ungetmouse', - 'ncurses_update_panels', - 'ncurses_use_default_colors', - 'ncurses_use_env', - 'ncurses_use_extended_names', - 'ncurses_vidattr', - 'ncurses_vline', - 'ncurses_waddch', - 'ncurses_waddstr', - 'ncurses_wattroff', - 'ncurses_wattron', - 'ncurses_wattrset', - 'ncurses_wborder', - 'ncurses_wclear', - 'ncurses_wcolor_set', - 'ncurses_werase', - 'ncurses_wgetch', - 'ncurses_whline', - 'ncurses_wmouse_trafo', - 'ncurses_wmove', - 'ncurses_wnoutrefresh', - 'ncurses_wrefresh', - 'ncurses_wstandend', - 'ncurses_wstandout', - 'ncurses_wvline'), + 'Mysql_xdevapi': ('expression', 'getSession'), 'Network': ('checkdnsrr', 'closelog', - 'define_syslog_variables', 'dns_check_record', 'dns_get_mx', 'dns_get_record', @@ -2464,6 +1604,7 @@ MODULES = {'.NET': ('dotnet_load',), 'inet_pton', 'ip2long', 'long2ip', + 'net_get_interfaces', 'openlog', 'pfsockopen', 'setcookie', @@ -2472,122 +1613,6 @@ MODULES = {'.NET': ('dotnet_load',), 'socket_set_blocking', 'socket_set_timeout', 'syslog'), - 'Newt': ('newt_bell', - 'newt_button_bar', - 'newt_button', - 'newt_centered_window', - 'newt_checkbox_get_value', - 'newt_checkbox_set_flags', - 'newt_checkbox_set_value', - 'newt_checkbox_tree_add_item', - 'newt_checkbox_tree_find_item', - 'newt_checkbox_tree_get_current', - 'newt_checkbox_tree_get_entry_value', - 'newt_checkbox_tree_get_multi_selection', - 'newt_checkbox_tree_get_selection', - 'newt_checkbox_tree_multi', - 'newt_checkbox_tree_set_current', - 'newt_checkbox_tree_set_entry_value', - 'newt_checkbox_tree_set_entry', - 'newt_checkbox_tree_set_width', - 'newt_checkbox_tree', - 'newt_checkbox', - 'newt_clear_key_buffer', - 'newt_cls', - 'newt_compact_button', - 'newt_component_add_callback', - 'newt_component_takes_focus', - 'newt_create_grid', - 'newt_cursor_off', - 'newt_cursor_on', - 'newt_delay', - 'newt_draw_form', - 'newt_draw_root_text', - 'newt_entry_get_value', - 'newt_entry_set_filter', - 'newt_entry_set_flags', - 'newt_entry_set', - 'newt_entry', - 'newt_finished', - 'newt_form_add_component', - 'newt_form_add_components', - 'newt_form_add_hot_key', - 'newt_form_destroy', - 'newt_form_get_current', - 'newt_form_run', - 'newt_form_set_background', - 'newt_form_set_height', - 'newt_form_set_size', - 'newt_form_set_timer', - 'newt_form_set_width', - 'newt_form_watch_fd', - 'newt_form', - 'newt_get_screen_size', - 'newt_grid_add_components_to_form', - 'newt_grid_basic_window', - 'newt_grid_free', - 'newt_grid_get_size', - 'newt_grid_h_close_stacked', - 'newt_grid_h_stacked', - 'newt_grid_place', - 'newt_grid_set_field', - 'newt_grid_simple_window', - 'newt_grid_v_close_stacked', - 'newt_grid_v_stacked', - 'newt_grid_wrapped_window_at', - 'newt_grid_wrapped_window', - 'newt_init', - 'newt_label_set_text', - 'newt_label', - 'newt_listbox_append_entry', - 'newt_listbox_clear_selection', - 'newt_listbox_clear', - 'newt_listbox_delete_entry', - 'newt_listbox_get_current', - 'newt_listbox_get_selection', - 'newt_listbox_insert_entry', - 'newt_listbox_item_count', - 'newt_listbox_select_item', - 'newt_listbox_set_current_by_key', - 'newt_listbox_set_current', - 'newt_listbox_set_data', - 'newt_listbox_set_entry', - 'newt_listbox_set_width', - 'newt_listbox', - 'newt_listitem_get_data', - 'newt_listitem_set', - 'newt_listitem', - 'newt_open_window', - 'newt_pop_help_line', - 'newt_pop_window', - 'newt_push_help_line', - 'newt_radio_get_current', - 'newt_radiobutton', - 'newt_redraw_help_line', - 'newt_reflow_text', - 'newt_refresh', - 'newt_resize_screen', - 'newt_resume', - 'newt_run_form', - 'newt_scale_set', - 'newt_scale', - 'newt_scrollbar_set', - 'newt_set_help_callback', - 'newt_set_suspend_callback', - 'newt_suspend', - 'newt_textbox_get_num_lines', - 'newt_textbox_reflowed', - 'newt_textbox_set_height', - 'newt_textbox_set_text', - 'newt_textbox', - 'newt_vertical_scrollbar', - 'newt_wait_for_key', - 'newt_win_choice', - 'newt_win_entries', - 'newt_win_menu', - 'newt_win_message', - 'newt_win_messagev', - 'newt_win_ternary'), 'OAuth': ('oauth_get_sbs', 'oauth_urlencode'), 'OCI8': ('oci_bind_array_by_name', 'oci_bind_by_name', @@ -2615,7 +1640,6 @@ MODULES = {'.NET': ('dotnet_load',), 'oci_free_descriptor', 'oci_free_statement', 'oci_get_implicit_resultset', - 'oci_internal_debug', 'oci_lob_copy', 'oci_lob_is_equal', 'oci_new_collection', @@ -2627,16 +1651,21 @@ MODULES = {'.NET': ('dotnet_load',), 'oci_parse', 'oci_password_change', 'oci_pconnect', + 'oci_register_taf_callback', 'oci_result', 'oci_rollback', 'oci_server_version', 'oci_set_action', + 'oci_set_call_timeout', 'oci_set_client_identifier', 'oci_set_client_info', + 'oci_set_db_operation', 'oci_set_edition', 'oci_set_module_name', + 'oci_set_prefetch_lob', 'oci_set_prefetch', - 'oci_statement_type'), + 'oci_statement_type', + 'oci_unregister_taf_callback'), 'ODBC': ('odbc_autocommit', 'odbc_binmode', 'odbc_close_all', @@ -2686,17 +1715,8 @@ MODULES = {'.NET': ('dotnet_load',), 'opcache_get_configuration', 'opcache_get_status', 'opcache_invalidate', + 'opcache_is_script_cached', 'opcache_reset'), - 'Object Aggregation': ('aggregate_info', - 'aggregate_methods_by_list', - 'aggregate_methods_by_regexp', - 'aggregate_methods', - 'aggregate_properties_by_list', - 'aggregate_properties_by_regexp', - 'aggregate_properties', - 'aggregate', - 'aggregation_info', - 'deaggregate'), 'OpenAL': ('openal_buffer_create', 'openal_buffer_data', 'openal_buffer_destroy', @@ -2721,6 +1741,11 @@ MODULES = {'.NET': ('dotnet_load',), 'openal_source_stop', 'openal_stream'), 'OpenSSL': ('openssl_cipher_iv_length', + 'openssl_cms_decrypt', + 'openssl_cms_encrypt', + 'openssl_cms_read', + 'openssl_cms_sign', + 'openssl_cms_verify', 'openssl_csr_export_to_file', 'openssl_csr_export', 'openssl_csr_get_public_key', @@ -2733,7 +1758,9 @@ MODULES = {'.NET': ('dotnet_load',), 'openssl_encrypt', 'openssl_error_string', 'openssl_free_key', + 'openssl_get_cert_locations', 'openssl_get_cipher_methods', + 'openssl_get_curve_names', 'openssl_get_md_methods', 'openssl_get_privatekey', 'openssl_get_publickey', @@ -2744,8 +1771,10 @@ MODULES = {'.NET': ('dotnet_load',), 'openssl_pkcs12_read', 'openssl_pkcs7_decrypt', 'openssl_pkcs7_encrypt', + 'openssl_pkcs7_read', 'openssl_pkcs7_sign', 'openssl_pkcs7_verify', + 'openssl_pkey_derive', 'openssl_pkey_export_to_file', 'openssl_pkey_export', 'openssl_pkey_free', @@ -2769,9 +1798,11 @@ MODULES = {'.NET': ('dotnet_load',), 'openssl_x509_checkpurpose', 'openssl_x509_export_to_file', 'openssl_x509_export', + 'openssl_x509_fingerprint', 'openssl_x509_free', 'openssl_x509_parse', - 'openssl_x509_read'), + 'openssl_x509_read', + 'openssl_x509_verify'), 'Output Control': ('flush', 'ob_clean', 'ob_end_clean', @@ -2789,27 +1820,8 @@ MODULES = {'.NET': ('dotnet_load',), 'ob_start', 'output_add_rewrite_var', 'output_reset_rewrite_vars'), - 'Ovrimos SQL': ('ovrimos_close', - 'ovrimos_commit', - 'ovrimos_connect', - 'ovrimos_cursor', - 'ovrimos_exec', - 'ovrimos_execute', - 'ovrimos_fetch_into', - 'ovrimos_fetch_row', - 'ovrimos_field_len', - 'ovrimos_field_name', - 'ovrimos_field_num', - 'ovrimos_field_type', - 'ovrimos_free_result', - 'ovrimos_longreadlen', - 'ovrimos_num_fields', - 'ovrimos_num_rows', - 'ovrimos_prepare', - 'ovrimos_result_all', - 'ovrimos_result', - 'ovrimos_rollback'), 'PCNTL': ('pcntl_alarm', + 'pcntl_async_signals', 'pcntl_errno', 'pcntl_exec', 'pcntl_fork', @@ -2817,6 +1829,7 @@ MODULES = {'.NET': ('dotnet_load',), 'pcntl_getpriority', 'pcntl_setpriority', 'pcntl_signal_dispatch', + 'pcntl_signal_get_handler', 'pcntl_signal', 'pcntl_sigprocmask', 'pcntl_sigtimedwait', @@ -2832,192 +1845,15 @@ MODULES = {'.NET': ('dotnet_load',), 'pcntl_wtermsig'), 'PCRE': ('preg_filter', 'preg_grep', + 'preg_last_error_msg', 'preg_last_error', 'preg_match_all', 'preg_match', 'preg_quote', + 'preg_replace_callback_array', 'preg_replace_callback', 'preg_replace', 'preg_split'), - 'PDF': ('PDF_activate_item', - 'PDF_add_annotation', - 'PDF_add_bookmark', - 'PDF_add_launchlink', - 'PDF_add_locallink', - 'PDF_add_nameddest', - 'PDF_add_note', - 'PDF_add_outline', - 'PDF_add_pdflink', - 'PDF_add_table_cell', - 'PDF_add_textflow', - 'PDF_add_thumbnail', - 'PDF_add_weblink', - 'PDF_arc', - 'PDF_arcn', - 'PDF_attach_file', - 'PDF_begin_document', - 'PDF_begin_font', - 'PDF_begin_glyph', - 'PDF_begin_item', - 'PDF_begin_layer', - 'PDF_begin_page_ext', - 'PDF_begin_page', - 'PDF_begin_pattern', - 'PDF_begin_template_ext', - 'PDF_begin_template', - 'PDF_circle', - 'PDF_clip', - 'PDF_close_image', - 'PDF_close_pdi_page', - 'PDF_close_pdi', - 'PDF_close', - 'PDF_closepath_fill_stroke', - 'PDF_closepath_stroke', - 'PDF_closepath', - 'PDF_concat', - 'PDF_continue_text', - 'PDF_create_3dview', - 'PDF_create_action', - 'PDF_create_annotation', - 'PDF_create_bookmark', - 'PDF_create_field', - 'PDF_create_fieldgroup', - 'PDF_create_gstate', - 'PDF_create_pvf', - 'PDF_create_textflow', - 'PDF_curveto', - 'PDF_define_layer', - 'PDF_delete_pvf', - 'PDF_delete_table', - 'PDF_delete_textflow', - 'PDF_delete', - 'PDF_encoding_set_char', - 'PDF_end_document', - 'PDF_end_font', - 'PDF_end_glyph', - 'PDF_end_item', - 'PDF_end_layer', - 'PDF_end_page_ext', - 'PDF_end_page', - 'PDF_end_pattern', - 'PDF_end_template', - 'PDF_endpath', - 'PDF_fill_imageblock', - 'PDF_fill_pdfblock', - 'PDF_fill_stroke', - 'PDF_fill_textblock', - 'PDF_fill', - 'PDF_findfont', - 'PDF_fit_image', - 'PDF_fit_pdi_page', - 'PDF_fit_table', - 'PDF_fit_textflow', - 'PDF_fit_textline', - 'PDF_get_apiname', - 'PDF_get_buffer', - 'PDF_get_errmsg', - 'PDF_get_errnum', - 'PDF_get_font', - 'PDF_get_fontname', - 'PDF_get_fontsize', - 'PDF_get_image_height', - 'PDF_get_image_width', - 'PDF_get_majorversion', - 'PDF_get_minorversion', - 'PDF_get_parameter', - 'PDF_get_pdi_parameter', - 'PDF_get_pdi_value', - 'PDF_get_value', - 'PDF_info_font', - 'PDF_info_matchbox', - 'PDF_info_table', - 'PDF_info_textflow', - 'PDF_info_textline', - 'PDF_initgraphics', - 'PDF_lineto', - 'PDF_load_3ddata', - 'PDF_load_font', - 'PDF_load_iccprofile', - 'PDF_load_image', - 'PDF_makespotcolor', - 'PDF_moveto', - 'PDF_new', - 'PDF_open_ccitt', - 'PDF_open_file', - 'PDF_open_gif', - 'PDF_open_image_file', - 'PDF_open_image', - 'PDF_open_jpeg', - 'PDF_open_memory_image', - 'PDF_open_pdi_document', - 'PDF_open_pdi_page', - 'PDF_open_pdi', - 'PDF_open_tiff', - 'PDF_pcos_get_number', - 'PDF_pcos_get_stream', - 'PDF_pcos_get_string', - 'PDF_place_image', - 'PDF_place_pdi_page', - 'PDF_process_pdi', - 'PDF_rect', - 'PDF_restore', - 'PDF_resume_page', - 'PDF_rotate', - 'PDF_save', - 'PDF_scale', - 'PDF_set_border_color', - 'PDF_set_border_dash', - 'PDF_set_border_style', - 'PDF_set_char_spacing', - 'PDF_set_duration', - 'PDF_set_gstate', - 'PDF_set_horiz_scaling', - 'PDF_set_info_author', - 'PDF_set_info_creator', - 'PDF_set_info_keywords', - 'PDF_set_info_subject', - 'PDF_set_info_title', - 'PDF_set_info', - 'PDF_set_layer_dependency', - 'PDF_set_leading', - 'PDF_set_parameter', - 'PDF_set_text_matrix', - 'PDF_set_text_pos', - 'PDF_set_text_rendering', - 'PDF_set_text_rise', - 'PDF_set_value', - 'PDF_set_word_spacing', - 'PDF_setcolor', - 'PDF_setdash', - 'PDF_setdashpattern', - 'PDF_setflat', - 'PDF_setfont', - 'PDF_setgray_fill', - 'PDF_setgray_stroke', - 'PDF_setgray', - 'PDF_setlinecap', - 'PDF_setlinejoin', - 'PDF_setlinewidth', - 'PDF_setmatrix', - 'PDF_setmiterlimit', - 'PDF_setpolydash', - 'PDF_setrgbcolor_fill', - 'PDF_setrgbcolor_stroke', - 'PDF_setrgbcolor', - 'PDF_shading_pattern', - 'PDF_shading', - 'PDF_shfill', - 'PDF_show_boxed', - 'PDF_show_xy', - 'PDF_show', - 'PDF_skew', - 'PDF_stringwidth', - 'PDF_stroke', - 'PDF_suspend_page', - 'PDF_translate', - 'PDF_utf16_to_utf8', - 'PDF_utf32_to_utf16', - 'PDF_utf8_to_utf16'), 'PHP Options/Info': ('assert_options', 'assert', 'cli_get_process_title', @@ -3028,6 +1864,8 @@ MODULES = {'.NET': ('dotnet_load',), 'gc_disable', 'gc_enable', 'gc_enabled', + 'gc_mem_caches', + 'gc_status', 'get_cfg_var', 'get_current_user', 'get_defined_constants', @@ -3038,6 +1876,7 @@ MODULES = {'.NET': ('dotnet_load',), 'get_magic_quotes_gpc', 'get_magic_quotes_runtime', 'get_required_files', + 'get_resources', 'getenv', 'getlastmod', 'getmygid', @@ -3051,12 +1890,10 @@ MODULES = {'.NET': ('dotnet_load',), 'ini_get', 'ini_restore', 'ini_set', - 'magic_quotes_runtime', 'memory_get_peak_usage', 'memory_get_usage', 'php_ini_loaded_file', 'php_ini_scanned_files', - 'php_logo_guid', 'php_sapi_name', 'php_uname', 'phpcredits', @@ -3065,11 +1902,9 @@ MODULES = {'.NET': ('dotnet_load',), 'putenv', 'restore_include_path', 'set_include_path', - 'set_magic_quotes_runtime', 'set_time_limit', 'sys_get_temp_dir', 'version_compare', - 'zend_logo_guid', 'zend_thread_id', 'zend_version'), 'POSIX': ('posix_access', @@ -3102,19 +1937,13 @@ MODULES = {'.NET': ('dotnet_load',), 'posix_seteuid', 'posix_setgid', 'posix_setpgid', + 'posix_setrlimit', 'posix_setsid', 'posix_setuid', 'posix_strerror', 'posix_times', 'posix_ttyname', 'posix_uname'), - 'POSIX Regex': ('ereg_replace', - 'ereg', - 'eregi_replace', - 'eregi', - 'split', - 'spliti', - 'sql_regcase'), 'PS': ('ps_add_bookmark', 'ps_add_launchlink', 'ps_add_locallink', @@ -3193,35 +2022,8 @@ MODULES = {'.NET': ('dotnet_load',), 'ps_symbol_width', 'ps_symbol', 'ps_translate'), - 'Paradox': ('px_close', - 'px_create_fp', - 'px_date2string', - 'px_delete_record', - 'px_delete', - 'px_get_field', - 'px_get_info', - 'px_get_parameter', - 'px_get_record', - 'px_get_schema', - 'px_get_value', - 'px_insert_record', - 'px_new', - 'px_numfields', - 'px_numrecords', - 'px_open_fp', - 'px_put_record', - 'px_retrieve_record', - 'px_set_blob_file', - 'px_set_parameter', - 'px_set_tablename', - 'px_set_targetencoding', - 'px_set_value', - 'px_timestamp2string', - 'px_update_record'), - 'Parsekit': ('parsekit_compile_file', - 'parsekit_compile_string', - 'parsekit_func_arginfo'), - 'Password Hashing': ('password_get_info', + 'Password Hashing': ('password_algos', + 'password_get_info', 'password_hash', 'password_needs_rehash', 'password_verify'), @@ -3229,10 +2031,12 @@ MODULES = {'.NET': ('dotnet_load',), 'pg_cancel_query', 'pg_client_encoding', 'pg_close', + 'pg_connect_poll', 'pg_connect', 'pg_connection_busy', 'pg_connection_reset', 'pg_connection_status', + 'pg_consume_input', 'pg_convert', 'pg_copy_from', 'pg_copy_to', @@ -3259,6 +2063,7 @@ MODULES = {'.NET': ('dotnet_load',), 'pg_field_table', 'pg_field_type_oid', 'pg_field_type', + 'pg_flush', 'pg_free_result', 'pg_get_notify', 'pg_get_pid', @@ -3303,6 +2108,7 @@ MODULES = {'.NET': ('dotnet_load',), 'pg_send_query', 'pg_set_client_encoding', 'pg_set_error_verbosity', + 'pg_socket', 'pg_trace', 'pg_transaction_status', 'pg_tty', @@ -3310,38 +2116,6 @@ MODULES = {'.NET': ('dotnet_load',), 'pg_untrace', 'pg_update', 'pg_version'), - 'Printer': ('printer_abort', - 'printer_close', - 'printer_create_brush', - 'printer_create_dc', - 'printer_create_font', - 'printer_create_pen', - 'printer_delete_brush', - 'printer_delete_dc', - 'printer_delete_font', - 'printer_delete_pen', - 'printer_draw_bmp', - 'printer_draw_chord', - 'printer_draw_elipse', - 'printer_draw_line', - 'printer_draw_pie', - 'printer_draw_rectangle', - 'printer_draw_roundrect', - 'printer_draw_text', - 'printer_end_doc', - 'printer_end_page', - 'printer_get_option', - 'printer_list', - 'printer_logical_fontheight', - 'printer_open', - 'printer_select_brush', - 'printer_select_font', - 'printer_select_pen', - 'printer_set_option', - 'printer_start_doc', - 'printer_start_page', - 'printer_write'), - 'Proctitle': ('setproctitle', 'setthreadtitle'), 'Program execution': ('escapeshellarg', 'escapeshellcmd', 'exec', @@ -3372,11 +2146,6 @@ MODULES = {'.NET': ('dotnet_load',), 'pspell_save_wordlist', 'pspell_store_replacement', 'pspell_suggest'), - 'RPM Reader': ('rpm_close', - 'rpm_get_tag', - 'rpm_is_valid', - 'rpm_open', - 'rpm_version'), 'RRD': ('rrd_create', 'rrd_error', 'rrd_fetch', @@ -3434,6 +2203,7 @@ MODULES = {'.NET': ('dotnet_load',), 'readline_write_history', 'readline'), 'Recode': ('recode_file', 'recode_string', 'recode'), + 'RpmInfo': ('rpmaddtag', 'rpmdbinfo', 'rpmdbsearch', 'rpminfo', 'rpmvercmp'), 'SNMP': ('snmp_get_quick_print', 'snmp_get_valueretrieval', 'snmp_read_mib', @@ -3472,8 +2242,8 @@ MODULES = {'.NET': ('dotnet_load',), 'spl_autoload_unregister', 'spl_autoload', 'spl_classes', - 'spl_object_hash'), - 'SPPLUS': ('calcul_hmac', 'calculhmac', 'nthmac', 'signeurlpaiement'), + 'spl_object_hash', + 'spl_object_id'), 'SQLSRV': ('sqlsrv_begin_transaction', 'sqlsrv_cancel', 'sqlsrv_client_info', @@ -3500,62 +2270,27 @@ MODULES = {'.NET': ('dotnet_load',), 'sqlsrv_rows_affected', 'sqlsrv_send_stream_data', 'sqlsrv_server_info'), - 'SQLite': ('sqlite_array_query', - 'sqlite_busy_timeout', - 'sqlite_changes', - 'sqlite_close', - 'sqlite_column', - 'sqlite_create_aggregate', - 'sqlite_create_function', - 'sqlite_current', - 'sqlite_error_string', - 'sqlite_escape_string', - 'sqlite_exec', - 'sqlite_factory', - 'sqlite_fetch_all', - 'sqlite_fetch_array', - 'sqlite_fetch_column_types', - 'sqlite_fetch_object', - 'sqlite_fetch_single', - 'sqlite_fetch_string', - 'sqlite_field_name', - 'sqlite_has_more', - 'sqlite_has_prev', - 'sqlite_key', - 'sqlite_last_error', - 'sqlite_last_insert_rowid', - 'sqlite_libencoding', - 'sqlite_libversion', - 'sqlite_next', - 'sqlite_num_fields', - 'sqlite_num_rows', - 'sqlite_open', - 'sqlite_popen', - 'sqlite_prev', - 'sqlite_query', - 'sqlite_rewind', - 'sqlite_seek', - 'sqlite_single_query', - 'sqlite_udf_decode_binary', - 'sqlite_udf_encode_binary', - 'sqlite_unbuffered_query', - 'sqlite_valid'), 'SSH2': ('ssh2_auth_agent', 'ssh2_auth_hostbased_file', 'ssh2_auth_none', 'ssh2_auth_password', 'ssh2_auth_pubkey_file', 'ssh2_connect', + 'ssh2_disconnect', 'ssh2_exec', 'ssh2_fetch_stream', 'ssh2_fingerprint', + 'ssh2_forward_accept', + 'ssh2_forward_listen', 'ssh2_methods_negotiated', + 'ssh2_poll', 'ssh2_publickey_add', 'ssh2_publickey_init', 'ssh2_publickey_list', 'ssh2_publickey_remove', 'ssh2_scp_recv', 'ssh2_scp_send', + 'ssh2_send_eof', 'ssh2_sftp_chmod', 'ssh2_sftp_lstat', 'ssh2_sftp_mkdir', @@ -3617,73 +2352,8 @@ MODULES = {'.NET': ('dotnet_load',), 'svn_revert', 'svn_status', 'svn_update'), - 'SWF': ('swf_actiongeturl', - 'swf_actiongotoframe', - 'swf_actiongotolabel', - 'swf_actionnextframe', - 'swf_actionplay', - 'swf_actionprevframe', - 'swf_actionsettarget', - 'swf_actionstop', - 'swf_actiontogglequality', - 'swf_actionwaitforframe', - 'swf_addbuttonrecord', - 'swf_addcolor', - 'swf_closefile', - 'swf_definebitmap', - 'swf_definefont', - 'swf_defineline', - 'swf_definepoly', - 'swf_definerect', - 'swf_definetext', - 'swf_endbutton', - 'swf_enddoaction', - 'swf_endshape', - 'swf_endsymbol', - 'swf_fontsize', - 'swf_fontslant', - 'swf_fonttracking', - 'swf_getbitmapinfo', - 'swf_getfontinfo', - 'swf_getframe', - 'swf_labelframe', - 'swf_lookat', - 'swf_modifyobject', - 'swf_mulcolor', - 'swf_nextid', - 'swf_oncondition', - 'swf_openfile', - 'swf_ortho2', - 'swf_ortho', - 'swf_perspective', - 'swf_placeobject', - 'swf_polarview', - 'swf_popmatrix', - 'swf_posround', - 'swf_pushmatrix', - 'swf_removeobject', - 'swf_rotate', - 'swf_scale', - 'swf_setfont', - 'swf_setframe', - 'swf_shapearc', - 'swf_shapecurveto3', - 'swf_shapecurveto', - 'swf_shapefillbitmapclip', - 'swf_shapefillbitmaptile', - 'swf_shapefilloff', - 'swf_shapefillsolid', - 'swf_shapelinesolid', - 'swf_shapelineto', - 'swf_shapemoveto', - 'swf_showframe', - 'swf_startbutton', - 'swf_startdoaction', - 'swf_startshape', - 'swf_startsymbol', - 'swf_textwidth', - 'swf_translate', - 'swf_viewport'), + 'Scoutapm': ('scoutapm_get_calls', 'scoutapm_list_instrumented_functions'), + 'Seaslog': ('seaslog_get_author', 'seaslog_get_version'), 'Semaphore': ('ftok', 'msg_get_queue', 'msg_queue_exists', @@ -3703,34 +2373,29 @@ MODULES = {'.NET': ('dotnet_load',), 'shm_put_var', 'shm_remove_var', 'shm_remove'), - 'Session': ('session_cache_expire', + 'Session': ('session_abort', + 'session_cache_expire', 'session_cache_limiter', 'session_commit', + 'session_create_id', 'session_decode', 'session_destroy', 'session_encode', + 'session_gc', 'session_get_cookie_params', 'session_id', - 'session_is_registered', 'session_module_name', 'session_name', 'session_regenerate_id', 'session_register_shutdown', - 'session_register', + 'session_reset', 'session_save_path', 'session_set_cookie_params', 'session_set_save_handler', 'session_start', 'session_status', - 'session_unregister', 'session_unset', 'session_write_close'), - 'Session PgSQL': ('session_pgsql_add_error', - 'session_pgsql_get_error', - 'session_pgsql_get_field', - 'session_pgsql_reset', - 'session_pgsql_set_field', - 'session_pgsql_status'), 'Shared Memory': ('shmop_close', 'shmop_delete', 'shmop_open', @@ -3741,6 +2406,10 @@ MODULES = {'.NET': ('dotnet_load',), 'simplexml_load_file', 'simplexml_load_string'), 'Socket': ('socket_accept', + 'socket_addrinfo_bind', + 'socket_addrinfo_connect', + 'socket_addrinfo_explain', + 'socket_addrinfo_lookup', 'socket_bind', 'socket_clear_error', 'socket_close', @@ -3749,7 +2418,9 @@ MODULES = {'.NET': ('dotnet_load',), 'socket_create_listen', 'socket_create_pair', 'socket_create', + 'socket_export_stream', 'socket_get_option', + 'socket_getopt', 'socket_getpeername', 'socket_getsockname', 'socket_import_stream', @@ -3766,81 +2437,101 @@ MODULES = {'.NET': ('dotnet_load',), 'socket_set_block', 'socket_set_nonblock', 'socket_set_option', + 'socket_setopt', 'socket_shutdown', 'socket_strerror', - 'socket_write'), + 'socket_write', + 'socket_wsaprotocol_info_export', + 'socket_wsaprotocol_info_import', + 'socket_wsaprotocol_info_release'), + 'Sodium': ('sodium_add', + 'sodium_base642bin', + 'sodium_bin2base64', + 'sodium_bin2hex', + 'sodium_compare', + 'sodium_crypto_aead_aes256gcm_decrypt', + 'sodium_crypto_aead_aes256gcm_encrypt', + 'sodium_crypto_aead_aes256gcm_is_available', + 'sodium_crypto_aead_aes256gcm_keygen', + 'sodium_crypto_aead_chacha20poly1305_decrypt', + 'sodium_crypto_aead_chacha20poly1305_encrypt', + 'sodium_crypto_aead_chacha20poly1305_ietf_decrypt', + 'sodium_crypto_aead_chacha20poly1305_ietf_encrypt', + 'sodium_crypto_aead_chacha20poly1305_ietf_keygen', + 'sodium_crypto_aead_chacha20poly1305_keygen', + 'sodium_crypto_aead_xchacha20poly1305_ietf_decrypt', + 'sodium_crypto_aead_xchacha20poly1305_ietf_encrypt', + 'sodium_crypto_aead_xchacha20poly1305_ietf_keygen', + 'sodium_crypto_auth_keygen', + 'sodium_crypto_auth_verify', + 'sodium_crypto_auth', + 'sodium_crypto_box_keypair_from_secretkey_and_publickey', + 'sodium_crypto_box_keypair', + 'sodium_crypto_box_open', + 'sodium_crypto_box_publickey_from_secretkey', + 'sodium_crypto_box_publickey', + 'sodium_crypto_box_seal_open', + 'sodium_crypto_box_seal', + 'sodium_crypto_box_secretkey', + 'sodium_crypto_box_seed_keypair', + 'sodium_crypto_box', + 'sodium_crypto_generichash_final', + 'sodium_crypto_generichash_init', + 'sodium_crypto_generichash_keygen', + 'sodium_crypto_generichash_update', + 'sodium_crypto_generichash', + 'sodium_crypto_kdf_derive_from_key', + 'sodium_crypto_kdf_keygen', + 'sodium_crypto_kx_client_session_keys', + 'sodium_crypto_kx_keypair', + 'sodium_crypto_kx_publickey', + 'sodium_crypto_kx_secretkey', + 'sodium_crypto_kx_seed_keypair', + 'sodium_crypto_kx_server_session_keys', + 'sodium_crypto_pwhash_scryptsalsa208sha256_str_verify', + 'sodium_crypto_pwhash_scryptsalsa208sha256_str', + 'sodium_crypto_pwhash_scryptsalsa208sha256', + 'sodium_crypto_pwhash_str_needs_rehash', + 'sodium_crypto_pwhash_str_verify', + 'sodium_crypto_pwhash_str', + 'sodium_crypto_pwhash', + 'sodium_crypto_scalarmult_base', + 'sodium_crypto_scalarmult', + 'sodium_crypto_secretbox_keygen', + 'sodium_crypto_secretbox_open', + 'sodium_crypto_secretbox', + 'sodium_crypto_secretstream_xchacha20poly1305_init_pull', + 'sodium_crypto_secretstream_xchacha20poly1305_init_push', + 'sodium_crypto_secretstream_xchacha20poly1305_keygen', + 'sodium_crypto_secretstream_xchacha20poly1305_pull', + 'sodium_crypto_secretstream_xchacha20poly1305_push', + 'sodium_crypto_secretstream_xchacha20poly1305_rekey', + 'sodium_crypto_shorthash_keygen', + 'sodium_crypto_shorthash', + 'sodium_crypto_sign_detached', + 'sodium_crypto_sign_ed25519_pk_to_curve25519', + 'sodium_crypto_sign_ed25519_sk_to_curve25519', + 'sodium_crypto_sign_keypair_from_secretkey_and_publickey', + 'sodium_crypto_sign_keypair', + 'sodium_crypto_sign_open', + 'sodium_crypto_sign_publickey_from_secretkey', + 'sodium_crypto_sign_publickey', + 'sodium_crypto_sign_secretkey', + 'sodium_crypto_sign_seed_keypair', + 'sodium_crypto_sign_verify_detached', + 'sodium_crypto_sign', + 'sodium_crypto_stream_keygen', + 'sodium_crypto_stream_xor', + 'sodium_crypto_stream', + 'sodium_hex2bin', + 'sodium_increment', + 'sodium_memcmp', + 'sodium_memzero', + 'sodium_pad', + 'sodium_unpad'), 'Solr': ('solr_get_version',), - 'Statistic': ('stats_absolute_deviation', - 'stats_cdf_beta', - 'stats_cdf_binomial', - 'stats_cdf_cauchy', - 'stats_cdf_chisquare', - 'stats_cdf_exponential', - 'stats_cdf_f', - 'stats_cdf_gamma', - 'stats_cdf_laplace', - 'stats_cdf_logistic', - 'stats_cdf_negative_binomial', - 'stats_cdf_noncentral_chisquare', - 'stats_cdf_noncentral_f', - 'stats_cdf_poisson', - 'stats_cdf_t', - 'stats_cdf_uniform', - 'stats_cdf_weibull', - 'stats_covariance', - 'stats_den_uniform', - 'stats_dens_beta', - 'stats_dens_cauchy', - 'stats_dens_chisquare', - 'stats_dens_exponential', - 'stats_dens_f', - 'stats_dens_gamma', - 'stats_dens_laplace', - 'stats_dens_logistic', - 'stats_dens_negative_binomial', - 'stats_dens_normal', - 'stats_dens_pmf_binomial', - 'stats_dens_pmf_hypergeometric', - 'stats_dens_pmf_poisson', - 'stats_dens_t', - 'stats_dens_weibull', - 'stats_harmonic_mean', - 'stats_kurtosis', - 'stats_rand_gen_beta', - 'stats_rand_gen_chisquare', - 'stats_rand_gen_exponential', - 'stats_rand_gen_f', - 'stats_rand_gen_funiform', - 'stats_rand_gen_gamma', - 'stats_rand_gen_ibinomial_negative', - 'stats_rand_gen_ibinomial', - 'stats_rand_gen_int', - 'stats_rand_gen_ipoisson', - 'stats_rand_gen_iuniform', - 'stats_rand_gen_noncenral_chisquare', - 'stats_rand_gen_noncentral_f', - 'stats_rand_gen_noncentral_t', - 'stats_rand_gen_normal', - 'stats_rand_gen_t', - 'stats_rand_get_seeds', - 'stats_rand_phrase_to_seeds', - 'stats_rand_ranf', - 'stats_rand_setall', - 'stats_skew', - 'stats_standard_deviation', - 'stats_stat_binomial_coef', - 'stats_stat_correlation', - 'stats_stat_gennch', - 'stats_stat_independent_t', - 'stats_stat_innerproduct', - 'stats_stat_noncentral_t', - 'stats_stat_paired_t', - 'stats_stat_percentile', - 'stats_stat_powersum', - 'stats_variance'), 'Stomp': ('stomp_connect_error', 'stomp_version'), - 'Stream': ('set_socket_blocking', - 'stream_bucket_append', + 'Stream': ('stream_bucket_append', 'stream_bucket_make_writeable', 'stream_bucket_new', 'stream_bucket_prepend', @@ -3852,7 +2543,6 @@ MODULES = {'.NET': ('dotnet_load',), 'stream_context_set_option', 'stream_context_set_params', 'stream_copy_to_stream', - 'stream_encoding', 'stream_filter_append', 'stream_filter_prepend', 'stream_filter_register', @@ -3864,6 +2554,7 @@ MODULES = {'.NET': ('dotnet_load',), 'stream_get_transports', 'stream_get_wrappers', 'stream_is_local', + 'stream_isatty', 'stream_notification_callback', 'stream_register_wrapper', 'stream_resolve_include_path', @@ -3937,6 +2628,8 @@ MODULES = {'.NET': ('dotnet_load',), 'soundex', 'sprintf', 'sscanf', + 'str_contains', + 'str_ends_with', 'str_getcsv', 'str_ireplace', 'str_pad', @@ -3945,6 +2638,7 @@ MODULES = {'.NET': ('dotnet_load',), 'str_rot13', 'str_shuffle', 'str_split', + 'str_starts_with', 'str_word_count', 'strcasecmp', 'strchr', @@ -3984,31 +2678,34 @@ MODULES = {'.NET': ('dotnet_load',), 'vprintf', 'vsprintf', 'wordwrap'), - 'Sybase': ('sybase_affected_rows', - 'sybase_close', - 'sybase_connect', - 'sybase_data_seek', - 'sybase_deadlock_retry_count', - 'sybase_fetch_array', - 'sybase_fetch_assoc', - 'sybase_fetch_field', - 'sybase_fetch_object', - 'sybase_fetch_row', - 'sybase_field_seek', - 'sybase_free_result', - 'sybase_get_last_message', - 'sybase_min_client_severity', - 'sybase_min_error_severity', - 'sybase_min_message_severity', - 'sybase_min_server_severity', - 'sybase_num_fields', - 'sybase_num_rows', - 'sybase_pconnect', - 'sybase_query', - 'sybase_result', - 'sybase_select_db', - 'sybase_set_message_handler', - 'sybase_unbuffered_query'), + 'Swoole': ('swoole_async_dns_lookup', + 'swoole_async_read', + 'swoole_async_readfile', + 'swoole_async_set', + 'swoole_async_write', + 'swoole_async_writefile', + 'swoole_clear_error', + 'swoole_client_select', + 'swoole_cpu_num', + 'swoole_errno', + 'swoole_error_log', + 'swoole_event_add', + 'swoole_event_defer', + 'swoole_event_del', + 'swoole_event_exit', + 'swoole_event_set', + 'swoole_event_wait', + 'swoole_event_write', + 'swoole_get_local_ip', + 'swoole_last_error', + 'swoole_load_module', + 'swoole_select', + 'swoole_set_process_name', + 'swoole_strerror', + 'swoole_timer_after', + 'swoole_timer_exists', + 'swoole_timer_tick', + 'swoole_version'), 'TCP': ('tcpwrap_check',), 'Taint': ('is_tainted', 'taint', 'untaint'), 'Tidy': ('ob_tidyhandler', @@ -4016,11 +2713,6 @@ MODULES = {'.NET': ('dotnet_load',), 'tidy_config_count', 'tidy_error_count', 'tidy_get_output', - 'tidy_load_config', - 'tidy_reset_config', - 'tidy_save_config', - 'tidy_set_encoding', - 'tidy_setopt', 'tidy_warning_count'), 'Tokenizer': ('token_get_all', 'token_name'), 'Trader': ('trader_acos', @@ -4196,36 +2888,56 @@ MODULES = {'.NET': ('dotnet_load',), 'rawurlencode', 'urldecode', 'urlencode'), - 'Uopz': ('uopz_backup', + 'Uopz': ('uopz_add_function', + 'uopz_allow_exit', + 'uopz_backup', 'uopz_compose', 'uopz_copy', + 'uopz_del_function', 'uopz_delete', 'uopz_extend', 'uopz_flags', 'uopz_function', + 'uopz_get_exit_status', + 'uopz_get_hook', + 'uopz_get_mock', + 'uopz_get_property', + 'uopz_get_return', + 'uopz_get_static', 'uopz_implement', 'uopz_overload', 'uopz_redefine', 'uopz_rename', 'uopz_restore', - 'uopz_undefine'), + 'uopz_set_hook', + 'uopz_set_mock', + 'uopz_set_property', + 'uopz_set_return', + 'uopz_set_static', + 'uopz_undefine', + 'uopz_unset_hook', + 'uopz_unset_mock', + 'uopz_unset_return'), 'Variable handling': ('boolval', 'debug_zval_dump', 'doubleval', 'empty', 'floatval', + 'get_debug_type', 'get_defined_vars', + 'get_resource_id', 'get_resource_type', 'gettype', - 'import_request_variables', 'intval', 'is_array', 'is_bool', 'is_callable', + 'is_countable', 'is_double', 'is_float', 'is_int', 'is_integer', + 'is_iterable', 'is_long', 'is_null', 'is_numeric', @@ -4243,11 +2955,6 @@ MODULES = {'.NET': ('dotnet_load',), 'unset', 'var_dump', 'var_export'), - 'W32api': ('w32api_deftype', - 'w32api_init_dtype', - 'w32api_invoke_function', - 'w32api_register_function', - 'w32api_set_call_method'), 'WDDX': ('wddx_add_vars', 'wddx_deserialize', 'wddx_packet_end', @@ -4314,25 +3021,6 @@ MODULES = {'.NET': ('dotnet_load',), 'xmlrpc_server_register_introspection_callback', 'xmlrpc_server_register_method', 'xmlrpc_set_type'), - 'XSLT (PHP 4)': ('xslt_backend_info', - 'xslt_backend_name', - 'xslt_backend_version', - 'xslt_create', - 'xslt_errno', - 'xslt_error', - 'xslt_free', - 'xslt_getopt', - 'xslt_process', - 'xslt_set_base', - 'xslt_set_encoding', - 'xslt_set_error_handler', - 'xslt_set_log', - 'xslt_set_object', - 'xslt_set_sax_handler', - 'xslt_set_sax_handlers', - 'xslt_set_scheme_handler', - 'xslt_set_scheme_handlers', - 'xslt_setopt'), 'Xhprof': ('xhprof_disable', 'xhprof_enable', 'xhprof_sample_disable', @@ -4362,16 +3050,6 @@ MODULES = {'.NET': ('dotnet_load',), 'yaz_sort', 'yaz_syntax', 'yaz_wait'), - 'YP/NIS': ('yp_all', - 'yp_cat', - 'yp_err_string', - 'yp_errno', - 'yp_first', - 'yp_get_default_domain', - 'yp_master', - 'yp_match', - 'yp_next', - 'yp_order'), 'Yaml': ('yaml_emit_file', 'yaml_emit', 'yaml_parse_file', @@ -4387,7 +3065,9 @@ MODULES = {'.NET': ('dotnet_load',), 'zip_entry_read', 'zip_open', 'zip_read'), - 'Zlib': ('gzclose', + 'Zlib': ('deflate_add', + 'deflate_init', + 'gzclose', 'gzcompress', 'gzdecode', 'gzdeflate', @@ -4407,23 +3087,15 @@ MODULES = {'.NET': ('dotnet_load',), 'gztell', 'gzuncompress', 'gzwrite', + 'inflate_add', + 'inflate_get_read_len', + 'inflate_get_status', + 'inflate_init', 'readgzfile', 'zlib_decode', 'zlib_encode', 'zlib_get_coding_type'), - 'bcompiler': ('bcompiler_load_exe', - 'bcompiler_load', - 'bcompiler_parse_class', - 'bcompiler_read', - 'bcompiler_write_class', - 'bcompiler_write_constant', - 'bcompiler_write_exe_footer', - 'bcompiler_write_file', - 'bcompiler_write_footer', - 'bcompiler_write_function', - 'bcompiler_write_functions_from_file', - 'bcompiler_write_header', - 'bcompiler_write_included_filename'), + 'ZooKeeper': ('zookeeper_dispatch',), 'cURL': ('curl_close', 'curl_copy_handle', 'curl_errno', @@ -4435,6 +3107,7 @@ MODULES = {'.NET': ('dotnet_load',), 'curl_init', 'curl_multi_add_handle', 'curl_multi_close', + 'curl_multi_errno', 'curl_multi_exec', 'curl_multi_getcontent', 'curl_multi_info_read', @@ -4448,12 +3121,13 @@ MODULES = {'.NET': ('dotnet_load',), 'curl_setopt_array', 'curl_setopt', 'curl_share_close', + 'curl_share_errno', 'curl_share_init', 'curl_share_setopt', + 'curl_share_strerror', 'curl_strerror', 'curl_unescape', 'curl_version'), - 'chdb': ('chdb_create',), 'dBase': ('dbase_add_record', 'dbase_close', 'dbase_create', @@ -4466,21 +3140,6 @@ MODULES = {'.NET': ('dotnet_load',), 'dbase_open', 'dbase_pack', 'dbase_replace_record'), - 'dbx': ('dbx_close', - 'dbx_compare', - 'dbx_connect', - 'dbx_error', - 'dbx_escape_string', - 'dbx_fetch_row', - 'dbx_query', - 'dbx_sort'), - 'filePro': ('filepro_fieldcount', - 'filepro_fieldname', - 'filepro_fieldtype', - 'filepro_fieldwidth', - 'filepro_retrieve', - 'filepro_rowcount', - 'filepro'), 'iconv': ('iconv_get_encoding', 'iconv_mime_decode_headers', 'iconv_mime_decode', @@ -4492,7 +3151,6 @@ MODULES = {'.NET': ('dotnet_load',), 'iconv_substr', 'iconv', 'ob_iconv_handler'), - 'inclued': ('inclued_get_data',), 'intl': ('intl_error_name', 'intl_get_error_code', 'intl_get_error_message', @@ -4504,70 +3162,6 @@ MODULES = {'.NET': ('dotnet_load',), 'libxml_set_external_entity_loader', 'libxml_set_streams_context', 'libxml_use_internal_errors'), - 'mSQL': ('msql_affected_rows', - 'msql_close', - 'msql_connect', - 'msql_create_db', - 'msql_createdb', - 'msql_data_seek', - 'msql_db_query', - 'msql_dbname', - 'msql_drop_db', - 'msql_error', - 'msql_fetch_array', - 'msql_fetch_field', - 'msql_fetch_object', - 'msql_fetch_row', - 'msql_field_flags', - 'msql_field_len', - 'msql_field_name', - 'msql_field_seek', - 'msql_field_table', - 'msql_field_type', - 'msql_fieldflags', - 'msql_fieldlen', - 'msql_fieldname', - 'msql_fieldtable', - 'msql_fieldtype', - 'msql_free_result', - 'msql_list_dbs', - 'msql_list_fields', - 'msql_list_tables', - 'msql_num_fields', - 'msql_num_rows', - 'msql_numfields', - 'msql_numrows', - 'msql_pconnect', - 'msql_query', - 'msql_regcase', - 'msql_result', - 'msql_select_db', - 'msql_tablename', - 'msql'), - 'mnoGoSearch': ('udm_add_search_limit', - 'udm_alloc_agent_array', - 'udm_alloc_agent', - 'udm_api_version', - 'udm_cat_list', - 'udm_cat_path', - 'udm_check_charset', - 'udm_check_stored', - 'udm_clear_search_limits', - 'udm_close_stored', - 'udm_crc32', - 'udm_errno', - 'udm_error', - 'udm_find', - 'udm_free_agent', - 'udm_free_ispell_data', - 'udm_free_res', - 'udm_get_doc_count', - 'udm_get_res_field', - 'udm_get_res_param', - 'udm_hash32', - 'udm_load_ispell_data', - 'udm_open_stored', - 'udm_set_agent_param'), 'mqseries': ('mqseries_back', 'mqseries_begin', 'mqseries_close', @@ -4582,65 +3176,47 @@ MODULES = {'.NET': ('dotnet_load',), 'mqseries_put', 'mqseries_set', 'mqseries_strerror'), - 'mysqlnd_qc': ('mysqlnd_qc_clear_cache', - 'mysqlnd_qc_get_available_handlers', - 'mysqlnd_qc_get_cache_info', - 'mysqlnd_qc_get_core_stats', - 'mysqlnd_qc_get_normalized_query_trace_log', - 'mysqlnd_qc_get_query_trace_log', - 'mysqlnd_qc_set_cache_condition', - 'mysqlnd_qc_set_is_select', - 'mysqlnd_qc_set_storage_handler', - 'mysqlnd_qc_set_user_handlers'), - 'qtdom': ('qdom_error', 'qdom_tree'), - 'runkit': ('runkit_class_adopt', - 'runkit_class_emancipate', - 'runkit_constant_add', - 'runkit_constant_redefine', - 'runkit_constant_remove', - 'runkit_function_add', - 'runkit_function_copy', - 'runkit_function_redefine', - 'runkit_function_remove', - 'runkit_function_rename', - 'runkit_import', - 'runkit_lint_file', - 'runkit_lint', - 'runkit_method_add', - 'runkit_method_copy', - 'runkit_method_redefine', - 'runkit_method_remove', - 'runkit_method_rename', - 'runkit_return_value_used', - 'runkit_sandbox_output_handler', - 'runkit_superglobals'), + 'phpdbg': ('phpdbg_break_file', + 'phpdbg_break_function', + 'phpdbg_break_method', + 'phpdbg_break_next', + 'phpdbg_clear', + 'phpdbg_color', + 'phpdbg_end_oplog', + 'phpdbg_exec', + 'phpdbg_get_executable', + 'phpdbg_prompt', + 'phpdbg_start_oplog'), + 'runkit7': ('runkit7_constant_add', + 'runkit7_constant_redefine', + 'runkit7_constant_remove', + 'runkit7_function_add', + 'runkit7_function_copy', + 'runkit7_function_redefine', + 'runkit7_function_remove', + 'runkit7_function_rename', + 'runkit7_import', + 'runkit7_method_add', + 'runkit7_method_copy', + 'runkit7_method_redefine', + 'runkit7_method_remove', + 'runkit7_method_rename', + 'runkit7_object_id', + 'runkit7_superglobals', + 'runkit7_zval_inspect'), 'ssdeep': ('ssdeep_fuzzy_compare', 'ssdeep_fuzzy_hash_filename', 'ssdeep_fuzzy_hash'), - 'vpopmail': ('vpopmail_add_alias_domain_ex', - 'vpopmail_add_alias_domain', - 'vpopmail_add_domain_ex', - 'vpopmail_add_domain', - 'vpopmail_add_user', - 'vpopmail_alias_add', - 'vpopmail_alias_del_domain', - 'vpopmail_alias_del', - 'vpopmail_alias_get_all', - 'vpopmail_alias_get', - 'vpopmail_auth_user', - 'vpopmail_del_domain_ex', - 'vpopmail_del_domain', - 'vpopmail_del_user', - 'vpopmail_error', - 'vpopmail_passwd', - 'vpopmail_set_user_quota'), - 'win32ps': ('win32_ps_list_procs', 'win32_ps_stat_mem', 'win32_ps_stat_proc'), + 'var_representation': ('var_representation',), 'win32service': ('win32_continue_service', 'win32_create_service', 'win32_delete_service', 'win32_get_last_control_message', 'win32_pause_service', 'win32_query_service_status', + 'win32_send_custom_control', + 'win32_set_service_exit_code', + 'win32_set_service_exit_mode', 'win32_set_service_status', 'win32_start_service_ctrl_dispatcher', 'win32_start_service', @@ -4669,7 +3245,6 @@ MODULES = {'.NET': ('dotnet_load',), 'xdiff_string_patch', 'xdiff_string_rabdiff')} - if __name__ == '__main__': # pragma: no cover import glob import os @@ -4677,10 +3252,7 @@ if __name__ == '__main__': # pragma: no cover import re import shutil import tarfile - try: - from urllib import urlretrieve - except ImportError: - from urllib.request import urlretrieve + from urllib.request import urlretrieve PHP_MANUAL_URL = 'http://us3.php.net/distributions/manual/php_manual_en.tar.gz' PHP_MANUAL_DIR = './php-chunked-xhtml/' @@ -4706,20 +3278,21 @@ if __name__ == '__main__': # pragma: no cover elif 'href="function.' in line: for match in function_re.finditer(line): fn = match.group(1) - if '->' not in fn and '::' not in fn and fn not in modules[module]: + if '»' not in fn and '«' not in fn and \ + '::' not in fn and '\\' not in fn and \ + fn not in modules[module]: modules[module].append(fn) if module: # These are dummy manual pages, not actual functions - if module == 'PHP Options/Info': - modules[module].remove('main') - if module == 'Filesystem': modules[module].remove('delete') if not modules[module]: del modules[module] + for key in modules: + modules[key] = tuple(modules[key]) return modules def get_php_references(): diff --git a/contrib/python/Pygments/py3/pygments/lexers/_postgres_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_postgres_builtins.py index 93bc42059a..3305f84518 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_postgres_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_postgres_builtins.py @@ -4,11 +4,12 @@ Self-updating data files for PostgreSQL lexer. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + Run with `python -I` to update itself. + + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ - # Autogenerated: please edit them if you like wasting your time. KEYWORDS = ( @@ -31,10 +32,12 @@ KEYWORDS = ( 'ARRAY', 'AS', 'ASC', + 'ASENSITIVE', 'ASSERTION', 'ASSIGNMENT', 'ASYMMETRIC', 'AT', + 'ATOMIC', 'ATTACH', 'ATTRIBUTE', 'AUTHORIZATION', @@ -47,6 +50,7 @@ KEYWORDS = ( 'BIT', 'BOOLEAN', 'BOTH', + 'BREADTH', 'BY', 'CACHE', 'CALL', @@ -74,6 +78,7 @@ KEYWORDS = ( 'COMMENTS', 'COMMIT', 'COMMITTED', + 'COMPRESSION', 'CONCURRENTLY', 'CONFIGURATION', 'CONFLICT', @@ -115,6 +120,7 @@ KEYWORDS = ( 'DELIMITER', 'DELIMITERS', 'DEPENDS', + 'DEPTH', 'DESC', 'DETACH', 'DICTIONARY', @@ -150,6 +156,7 @@ KEYWORDS = ( 'FAMILY', 'FETCH', 'FILTER', + 'FINALIZE', 'FIRST', 'FLOAT', 'FOLLOWING', @@ -331,6 +338,7 @@ KEYWORDS = ( 'RESET', 'RESTART', 'RESTRICT', + 'RETURN', 'RETURNING', 'RETURNS', 'REVOKE', @@ -531,10 +539,12 @@ PSEUDO_TYPES = ( 'anyarray', 'anycompatible', 'anycompatiblearray', + 'anycompatiblemultirange', 'anycompatiblenonarray', 'anycompatiblerange', 'anyelement', 'anyenum', + 'anymultirange', 'anynonarray', 'anyrange', 'cstring', @@ -564,10 +574,7 @@ PLPGSQL_KEYWORDS = ( if __name__ == '__main__': # pragma: no cover import re - try: - from urllib import urlopen - except ImportError: - from urllib.request import urlopen + from urllib.request import urlopen from pygments.util import format_lines diff --git a/contrib/python/Pygments/py3/pygments/lexers/_qlik_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_qlik_builtins.py new file mode 100644 index 0000000000..d2759b173a --- /dev/null +++ b/contrib/python/Pygments/py3/pygments/lexers/_qlik_builtins.py @@ -0,0 +1,666 @@ +""" + pygments.lexers._qlik_builtins + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Qlik builtins. + + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +# operators +# see https://help.qlik.com/en-US/sense/August2021/Subsystems/Hub/Content/Sense_Hub/Scripting/Operators/operators.htm +OPERATORS_LIST = { + "words": [ + # Bit operators + "bitnot", + "bitand", + "bitor", + "bitxor", + # Logical operators + "and", + "or", + "not", + "xor", + # Relational operators + "precedes", + "follows", + # String operators + "like", + ], + "symbols": [ + # Bit operators + ">>", + "<<", + # Logical operators + # Numeric operators + "+", + "-", + "/", + "*", + # Relational operators + "<", + "<=", + ">", + ">=", + "=", + "<>", + # String operators + "&", + ], +} + +# SCRIPT STATEMENTS +# see https://help.qlik.com/en-US/sense/August2021/Subsystems/Hub/Content/Sense_Hub/Scripting/ +STATEMENT_LIST = [ + # control statements + "for", + "each", + "in", + "next", + "do", + "while", + "until", + "unless", + "loop", + "return", + "switch", + "case", + "default", + "if", + "else", + "endif", + "then", + "end", + "exit", + "script", + "switch", + # prefixes + "Add", + "Buffer", + "Concatenate", + "Crosstable", + "First", + "Generic", + "Hierarchy", + "HierarchyBelongsTo", + "Inner", + "IntervalMatch", + "Join", + "Keep", + "Left", + "Mapping", + "Merge", + "NoConcatenate", + "Outer", + "Partial reload", + "Replace", + "Right", + "Sample", + "Semantic", + "Unless", + "When", + # regular statements + "Alias", # alias ... as ... + "as", + "AutoNumber", + "Binary", + "Comment field", # comment fields ... using ... + "Comment fields", # comment field ... with ... + "using", + "with", + "Comment table", # comment table ... with ... + "Comment tables", # comment tables ... using ... + "Connect", + "ODBC", # ODBC CONNECT TO ... + "OLEBD", # OLEDB CONNECT TO ... + "CUSTOM", # CUSTOM CONNECT TO ... + "LIB", # LIB CONNECT TO ... + "Declare", + "Derive", + "From", + "explicit", + "implicit", + "Direct Query", + "dimension", + "measure", + "Directory", + "Disconnect", + "Drop field", + "Drop fields", + "Drop table", + "Drop tables", + "Execute", + "FlushLog", + "Force", + "capitalization", + "case upper", + "case lower", + "case mixed", + "Load", + "distinct", + "from", + "inline", + "resident", + "from_field", + "autogenerate", + "extension", + "where", + "group by", + "order by", + "asc", + "desc", + "Let", + "Loosen Table", + "Map", + "NullAsNull", + "NullAsValue", + "Qualify", + "Rem", + "Rename field", + "Rename fields", + "Rename table", + "Rename tables", + "Search", + "include", + "exclude", + "Section", + "access", + "application", + "Select", + "Set", + "Sleep", + "SQL", + "SQLColumns", + "SQLTables", + "SQLTypes", + "Star", + "Store", + "Tag", + "Trace", + "Unmap", + "Unqualify", + "Untag", + # Qualifiers + "total", +] + +# Script functions +# see https://help.qlik.com/en-US/sense/August2021/Subsystems/Hub/Content/Sense_Hub/Scripting/functions-in-scripts-chart-expressions.htm +SCRIPT_FUNCTIONS = [ + # Basic aggregation functions in the data load script + "FirstSortedValue", + "Max", + "Min", + "Mode", + "Only", + "Sum", + # Counter aggregation functions in the data load script + "Count", + "MissingCount", + "NullCount", + "NumericCount", + "TextCount", + # Financial aggregation functions in the data load script + "IRR", + "XIRR", + "NPV", + "XNPV", + # Statistical aggregation functions in the data load script + "Avg", + "Correl", + "Fractile", + "FractileExc", + "Kurtosis", + "LINEST_B" "LINEST_df", + "LINEST_f", + "LINEST_m", + "LINEST_r2", + "LINEST_seb", + "LINEST_sem", + "LINEST_sey", + "LINEST_ssreg", + "Linest_ssresid", + "Median", + "Skew", + "Stdev", + "Sterr", + "STEYX", + # Statistical test functions + "Chi2Test_chi2", + "Chi2Test_df", + "Chi2Test_p", + # Two independent samples t-tests + "ttest_conf", + "ttest_df", + "ttest_dif", + "ttest_lower", + "ttest_sig", + "ttest_sterr", + "ttest_t", + "ttest_upper", + # Two independent weighted samples t-tests + "ttestw_conf", + "ttestw_df", + "ttestw_dif", + "ttestw_lower", + "ttestw_sig", + "ttestw_sterr", + "ttestw_t", + "ttestw_upper", + # One sample t-tests + "ttest1_conf", + "ttest1_df", + "ttest1_dif", + "ttest1_lower", + "ttest1_sig", + "ttest1_sterr", + "ttest1_t", + "ttest1_upper", + # One weighted sample t-tests + "ttest1w_conf", + "ttest1w_df", + "ttest1w_dif", + "ttest1w_lower", + "ttest1w_sig", + "ttest1w_sterr", + "ttest1w_t", + "ttest1w_upper", + # One column format functions + "ztest_conf", + "ztest_dif", + "ztest_sig", + "ztest_sterr", + "ztest_z", + "ztest_lower", + "ztest_upper", + # Weighted two-column format functions + "ztestw_conf", + "ztestw_dif", + "ztestw_lower", + "ztestw_sig", + "ztestw_sterr", + "ztestw_upper", + "ztestw_z", + # String aggregation functions in the data load script + "Concat", + "FirstValue", + "LastValue", + "MaxString", + "MinString", + # Synthetic dimension functions + "ValueList", + "ValueLoop", + # Color functions + "ARGB", + "HSL", + "RGB", + "Color", + "Colormix1", + "Colormix2", + "SysColor", + "ColorMapHue", + "ColorMapJet", + "black", + "blue", + "brown", + "cyan", + "darkgray", + "green", + "lightblue", + "lightcyan", + "lightgray", + "lightgreen", + "lightmagenta", + "lightred", + "magenta", + "red", + "white", + "yellow", + # Conditional functions + "alt", + "class", + "coalesce", + "if", + "match", + "mixmatch", + "pick", + "wildmatch", + # Counter functions + "autonumber", + "autonumberhash128", + "autonumberhash256", + "IterNo", + "RecNo", + "RowNo", + # Integer expressions of time + "second", + "minute", + "hour", + "day", + "week", + "month", + "year", + "weekyear", + "weekday", + # Timestamp functions + "now", + "today", + "LocalTime", + # Make functions + "makedate", + "makeweekdate", + "maketime", + # Other date functions + "AddMonths", + "AddYears", + "yeartodate", + # Timezone functions + "timezone", + "GMT", + "UTC", + "daylightsaving", + "converttolocaltime", + # Set time functions + "setdateyear", + "setdateyearmonth", + # In... functions + "inyear", + "inyeartodate", + "inquarter", + "inquartertodate", + "inmonth", + "inmonthtodate", + "inmonths", + "inmonthstodate", + "inweek", + "inweektodate", + "inlunarweek", + "inlunarweektodate", + "inday", + "indaytotime", + # Start ... end functions + "yearstart", + "yearend", + "yearname", + "quarterstart", + "quarterend", + "quartername", + "monthstart", + "monthend", + "monthname", + "monthsstart", + "monthsend", + "monthsname", + "weekstart", + "weekend", + "weekname", + "lunarweekstart", + "lunarweekend", + "lunarweekname", + "daystart", + "dayend", + "dayname", + # Day numbering functions + "age", + "networkdays", + "firstworkdate", + "lastworkdate", + "daynumberofyear", + "daynumberofquarter", + # Exponential and logarithmic + "exp", + "log", + "log10", + "pow", + "sqr", + "sqrt", + # Count functions + "GetAlternativeCount", + "GetExcludedCount", + "GetNotSelectedCount", + "GetPossibleCount", + "GetSelectedCount", + # Field and selection functions + "GetCurrentSelections", + "GetFieldSelections", + "GetObjectDimension", + "GetObjectField", + "GetObjectMeasure", + # File functions + "Attribute", + "ConnectString", + "FileBaseName", + "FileDir", + "FileExtension", + "FileName", + "FilePath", + "FileSize", + "FileTime", + "GetFolderPath", + "QvdCreateTime", + "QvdFieldName", + "QvdNoOfFields", + "QvdNoOfRecords", + "QvdTableName", + # Financial functions + "FV", + "nPer", + "Pmt", + "PV", + "Rate", + # Formatting functions + "ApplyCodepage", + "Date", + "Dual", + "Interval", + "Money", + "Num", + "Time", + "Timestamp", + # General numeric functions + "bitcount", + "div", + "fabs", + "fact", + "frac", + "sign", + # Combination and permutation functions + "combin", + "permut", + # Modulo functions + "fmod", + "mod", + # Parity functions + "even", + "odd", + # Rounding functions + "ceil", + "floor", + "round", + # Geospatial functions + "GeoAggrGeometry", + "GeoBoundingBox", + "GeoCountVertex", + "GeoInvProjectGeometry", + "GeoProjectGeometry", + "GeoReduceGeometry", + "GeoGetBoundingBox", + "GeoGetPolygonCenter", + "GeoMakePoint", + "GeoProject", + # Interpretation functions + "Date#", + "Interval#", + "Money#", + "Num#", + "Text", + "Time#", + "Timestamp#", + # Field functions + "FieldIndex", + "FieldValue", + "FieldValueCount", + # Inter-record functions in the data load script + "Exists", + "LookUp", + "Peek", + "Previous", + # Logical functions + "IsNum", + "IsText", + # Mapping functions + "ApplyMap", + "MapSubstring", + # Mathematical functions + "e", + "false", + "pi", + "rand", + "true", + # NULL functions + "EmptyIsNull", + "IsNull", + "Null", + # Basic range functions + "RangeMax", + "RangeMaxString", + "RangeMin", + "RangeMinString", + "RangeMode", + "RangeOnly", + "RangeSum", + # Counter range functions + "RangeCount", + "RangeMissingCount", + "RangeNullCount", + "RangeNumericCount", + "RangeTextCount", + # Statistical range functions + "RangeAvg", + "RangeCorrel", + "RangeFractile", + "RangeKurtosis", + "RangeSkew", + "RangeStdev", + # Financial range functions + "RangeIRR", + "RangeNPV", + "RangeXIRR", + "RangeXNPV", + # Statistical distribution + "CHIDIST", + "CHIINV", + "NORMDIST", + "NORMINV", + "TDIST", + "TINV", + "FDIST", + "FINV", + # String functions + "Capitalize", + "Chr", + "Evaluate", + "FindOneOf", + "Hash128", + "Hash160", + "Hash256", + "Index", + "KeepChar", + "Left", + "Len", + "LevenshteinDist", + "Lower", + "LTrim", + "Mid", + "Ord", + "PurgeChar", + "Repeat", + "Replace", + "Right", + "RTrim", + "SubField", + "SubStringCount", + "TextBetween", + "Trim", + "Upper", + # System functions + "Author", + "ClientPlatform", + "ComputerName", + "DocumentName", + "DocumentPath", + "DocumentTitle", + "EngineVersion", + "GetCollationLocale", + "GetObjectField", + "GetRegistryString", + "IsPartialReload", + "OSUser", + "ProductVersion", + "ReloadTime", + "StateName", + # Table functions + "FieldName", + "FieldNumber", + "NoOfFields", + "NoOfRows", + "NoOfTables", + "TableName", + "TableNumber", +] + +# System variables and constants +# see https://help.qlik.com/en-US/sense/August2021/Subsystems/Hub/Content/Sense_Hub/Scripting/work-with-variables-in-data-load-editor.htm +CONSTANT_LIST = [ + # System Variables + "floppy", + "cd", + "include", + "must_include", + "hideprefix", + "hidesuffix", + "qvpath", + "qvroot", + "QvWorkPath", + "QvWorkRoot", + "StripComments", + "Verbatim", + "OpenUrlTimeout", + "WinPath", + "WinRoot", + "CollationLocale", + "CreateSearchIndexOnReload", + # value handling variables + "NullDisplay", + "NullInterpret", + "NullValue", + "OtherSymbol", + # Currency formatting + "MoneyDecimalSep", + "MoneyFormat", + "MoneyThousandSep", + # Number formatting + "DecimalSep", + "ThousandSep", + "NumericalAbbreviation", + # Time formatting + "DateFormat", + "TimeFormat", + "TimestampFormat", + "MonthNames", + "LongMonthNames", + "DayNames", + "LongDayNames", + "FirstWeekDay", + "BrokenWeeks", + "ReferenceDay", + "FirstMonthOfYear", + # Error variables + "errormode", + "scripterror", + "scripterrorcount", + "scripterrorlist", + # Other + "null", +] diff --git a/contrib/python/Pygments/py3/pygments/lexers/_scheme_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_scheme_builtins.py new file mode 100644 index 0000000000..44535119af --- /dev/null +++ b/contrib/python/Pygments/py3/pygments/lexers/_scheme_builtins.py @@ -0,0 +1,1609 @@ +""" + pygments.lexers._scheme_builtins + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Scheme builtins. + + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +# Autogenerated by external/scheme-builtins-generator.scm +# using Guile 3.0.5.130-5a1e7. + +scheme_keywords = { + "*unspecified*", + "...", + "=>", + "@", + "@@", + "_", + "add-to-load-path", + "and", + "begin", + "begin-deprecated", + "case", + "case-lambda", + "case-lambda*", + "cond", + "cond-expand", + "current-filename", + "current-source-location", + "debug-set!", + "define", + "define*", + "define-inlinable", + "define-library", + "define-macro", + "define-module", + "define-once", + "define-option-interface", + "define-private", + "define-public", + "define-record-type", + "define-syntax", + "define-syntax-parameter", + "define-syntax-rule", + "define-values", + "defmacro", + "defmacro-public", + "delay", + "do", + "else", + "eval-when", + "export", + "export!", + "export-syntax", + "false-if-exception", + "identifier-syntax", + "if", + "import", + "include", + "include-ci", + "include-from-path", + "include-library-declarations", + "lambda", + "lambda*", + "let", + "let*", + "let*-values", + "let-syntax", + "let-values", + "letrec", + "letrec*", + "letrec-syntax", + "library", + "load", + "match", + "match-lambda", + "match-lambda*", + "match-let", + "match-let*", + "match-letrec", + "or", + "parameterize", + "print-set!", + "quasiquote", + "quasisyntax", + "quote", + "quote-syntax", + "re-export", + "re-export-syntax", + "read-set!", + "require-extension", + "set!", + "start-stack", + "syntax", + "syntax-case", + "syntax-error", + "syntax-parameterize", + "syntax-rules", + "unless", + "unquote", + "unquote-splicing", + "unsyntax", + "unsyntax-splicing", + "use-modules", + "when", + "while", + "with-ellipsis", + "with-fluids", + "with-syntax", + "λ", +} + +scheme_builtins = { + "$sc-dispatch", + "%char-set-dump", + "%get-pre-modules-obarray", + "%get-stack-size", + "%global-site-dir", + "%init-rdelim-builtins", + "%init-rw-builtins", + "%library-dir", + "%load-announce", + "%load-hook", + "%make-void-port", + "%package-data-dir", + "%port-property", + "%print-module", + "%resolve-variable", + "%search-load-path", + "%set-port-property!", + "%site-ccache-dir", + "%site-dir", + "%start-stack", + "%string-dump", + "%symbol-dump", + "%warn-auto-compilation-enabled", + "*", + "+", + "-", + "->bool", + "->char-set", + "/", + "1+", + "1-", + "<", + "<=", + "=", + ">", + ">=", + "abort-to-prompt", + "abort-to-prompt*", + "abs", + "absolute-file-name?", + "accept", + "access?", + "acons", + "acos", + "acosh", + "add-hook!", + "addrinfo:addr", + "addrinfo:canonname", + "addrinfo:fam", + "addrinfo:flags", + "addrinfo:protocol", + "addrinfo:socktype", + "adjust-port-revealed!", + "alarm", + "alist-cons", + "alist-copy", + "alist-delete", + "alist-delete!", + "allocate-struct", + "and-map", + "and=>", + "angle", + "any", + "append", + "append!", + "append-map", + "append-map!", + "append-reverse", + "append-reverse!", + "apply", + "array->list", + "array-cell-ref", + "array-cell-set!", + "array-contents", + "array-copy!", + "array-copy-in-order!", + "array-dimensions", + "array-equal?", + "array-fill!", + "array-for-each", + "array-in-bounds?", + "array-index-map!", + "array-length", + "array-map!", + "array-map-in-order!", + "array-rank", + "array-ref", + "array-set!", + "array-shape", + "array-slice", + "array-slice-for-each", + "array-slice-for-each-in-order", + "array-type", + "array-type-code", + "array?", + "ash", + "asin", + "asinh", + "assert-load-verbosity", + "assoc", + "assoc-ref", + "assoc-remove!", + "assoc-set!", + "assq", + "assq-ref", + "assq-remove!", + "assq-set!", + "assv", + "assv-ref", + "assv-remove!", + "assv-set!", + "atan", + "atanh", + "autoload-done!", + "autoload-done-or-in-progress?", + "autoload-in-progress!", + "backtrace", + "basename", + "batch-mode?", + "beautify-user-module!", + "bind", + "bind-textdomain-codeset", + "bindtextdomain", + "bit-count", + "bit-count*", + "bit-extract", + "bit-invert!", + "bit-position", + "bit-set*!", + "bitvector", + "bitvector->list", + "bitvector-bit-clear?", + "bitvector-bit-set?", + "bitvector-clear-all-bits!", + "bitvector-clear-bit!", + "bitvector-clear-bits!", + "bitvector-count", + "bitvector-count-bits", + "bitvector-fill!", + "bitvector-flip-all-bits!", + "bitvector-length", + "bitvector-position", + "bitvector-ref", + "bitvector-set!", + "bitvector-set-all-bits!", + "bitvector-set-bit!", + "bitvector-set-bits!", + "bitvector?", + "boolean?", + "bound-identifier=?", + "break", + "break!", + "caaaar", + "caaadr", + "caaar", + "caadar", + "caaddr", + "caadr", + "caar", + "cadaar", + "cadadr", + "cadar", + "caddar", + "cadddr", + "caddr", + "cadr", + "call-with-blocked-asyncs", + "call-with-current-continuation", + "call-with-deferred-observers", + "call-with-include-port", + "call-with-input-file", + "call-with-input-string", + "call-with-module-autoload-lock", + "call-with-output-file", + "call-with-output-string", + "call-with-port", + "call-with-prompt", + "call-with-unblocked-asyncs", + "call-with-values", + "call/cc", + "canonicalize-path", + "car", + "car+cdr", + "catch", + "cdaaar", + "cdaadr", + "cdaar", + "cdadar", + "cdaddr", + "cdadr", + "cdar", + "cddaar", + "cddadr", + "cddar", + "cdddar", + "cddddr", + "cdddr", + "cddr", + "cdr", + "ceiling", + "ceiling-quotient", + "ceiling-remainder", + "ceiling/", + "centered-quotient", + "centered-remainder", + "centered/", + "char->integer", + "char-alphabetic?", + "char-ci<=?", + "char-ci<?", + "char-ci=?", + "char-ci>=?", + "char-ci>?", + "char-downcase", + "char-general-category", + "char-is-both?", + "char-lower-case?", + "char-numeric?", + "char-ready?", + "char-set", + "char-set->list", + "char-set->string", + "char-set-adjoin", + "char-set-adjoin!", + "char-set-any", + "char-set-complement", + "char-set-complement!", + "char-set-contains?", + "char-set-copy", + "char-set-count", + "char-set-cursor", + "char-set-cursor-next", + "char-set-delete", + "char-set-delete!", + "char-set-diff+intersection", + "char-set-diff+intersection!", + "char-set-difference", + "char-set-difference!", + "char-set-every", + "char-set-filter", + "char-set-filter!", + "char-set-fold", + "char-set-for-each", + "char-set-hash", + "char-set-intersection", + "char-set-intersection!", + "char-set-map", + "char-set-ref", + "char-set-size", + "char-set-unfold", + "char-set-unfold!", + "char-set-union", + "char-set-union!", + "char-set-xor", + "char-set-xor!", + "char-set<=", + "char-set=", + "char-set?", + "char-titlecase", + "char-upcase", + "char-upper-case?", + "char-whitespace?", + "char<=?", + "char<?", + "char=?", + "char>=?", + "char>?", + "char?", + "chdir", + "chmod", + "chown", + "chroot", + "circular-list", + "circular-list?", + "close", + "close-fdes", + "close-input-port", + "close-output-port", + "close-port", + "closedir", + "command-line", + "complex?", + "compose", + "concatenate", + "concatenate!", + "cond-expand-provide", + "connect", + "cons", + "cons*", + "cons-source", + "const", + "convert-assignment", + "copy-file", + "copy-random-state", + "copy-tree", + "cos", + "cosh", + "count", + "crypt", + "ctermid", + "current-dynamic-state", + "current-error-port", + "current-input-port", + "current-language", + "current-load-port", + "current-module", + "current-output-port", + "current-time", + "current-warning-port", + "datum->random-state", + "datum->syntax", + "debug-disable", + "debug-enable", + "debug-options", + "debug-options-interface", + "default-duplicate-binding-handler", + "default-duplicate-binding-procedures", + "default-prompt-tag", + "define!", + "define-module*", + "defined?", + "delete", + "delete!", + "delete-duplicates", + "delete-duplicates!", + "delete-file", + "delete1!", + "delq", + "delq!", + "delq1!", + "delv", + "delv!", + "delv1!", + "denominator", + "directory-stream?", + "dirname", + "display", + "display-application", + "display-backtrace", + "display-error", + "dotted-list?", + "doubly-weak-hash-table?", + "drain-input", + "drop", + "drop-right", + "drop-right!", + "drop-while", + "dup", + "dup->fdes", + "dup->inport", + "dup->outport", + "dup->port", + "dup2", + "duplicate-port", + "dynamic-call", + "dynamic-func", + "dynamic-link", + "dynamic-object?", + "dynamic-pointer", + "dynamic-state?", + "dynamic-unlink", + "dynamic-wind", + "effective-version", + "eighth", + "end-of-char-set?", + "endgrent", + "endhostent", + "endnetent", + "endprotoent", + "endpwent", + "endservent", + "ensure-batch-mode!", + "environ", + "eof-object?", + "eq?", + "equal?", + "eqv?", + "error", + "euclidean-quotient", + "euclidean-remainder", + "euclidean/", + "eval", + "eval-string", + "even?", + "every", + "exact->inexact", + "exact-integer-sqrt", + "exact-integer?", + "exact?", + "exception-accessor", + "exception-args", + "exception-kind", + "exception-predicate", + "exception-type?", + "exception?", + "execl", + "execle", + "execlp", + "exit", + "exp", + "expt", + "f32vector", + "f32vector->list", + "f32vector-length", + "f32vector-ref", + "f32vector-set!", + "f32vector?", + "f64vector", + "f64vector->list", + "f64vector-length", + "f64vector-ref", + "f64vector-set!", + "f64vector?", + "fcntl", + "fdes->inport", + "fdes->outport", + "fdes->ports", + "fdopen", + "fifth", + "file-encoding", + "file-exists?", + "file-is-directory?", + "file-name-separator?", + "file-port?", + "file-position", + "file-set-position", + "fileno", + "filter", + "filter!", + "filter-map", + "find", + "find-tail", + "finite?", + "first", + "flock", + "floor", + "floor-quotient", + "floor-remainder", + "floor/", + "fluid->parameter", + "fluid-bound?", + "fluid-ref", + "fluid-ref*", + "fluid-set!", + "fluid-thread-local?", + "fluid-unset!", + "fluid?", + "flush-all-ports", + "fold", + "fold-right", + "for-each", + "force", + "force-output", + "format", + "fourth", + "frame-address", + "frame-arguments", + "frame-dynamic-link", + "frame-instruction-pointer", + "frame-previous", + "frame-procedure-name", + "frame-return-address", + "frame-source", + "frame-stack-pointer", + "frame?", + "free-identifier=?", + "fsync", + "ftell", + "gai-strerror", + "gc", + "gc-disable", + "gc-dump", + "gc-enable", + "gc-run-time", + "gc-stats", + "gcd", + "generate-temporaries", + "gensym", + "get-internal-real-time", + "get-internal-run-time", + "get-output-string", + "get-print-state", + "getaddrinfo", + "getaffinity", + "getcwd", + "getegid", + "getenv", + "geteuid", + "getgid", + "getgr", + "getgrent", + "getgrgid", + "getgrnam", + "getgroups", + "gethost", + "gethostbyaddr", + "gethostbyname", + "gethostent", + "gethostname", + "getitimer", + "getlogin", + "getnet", + "getnetbyaddr", + "getnetbyname", + "getnetent", + "getpass", + "getpeername", + "getpgrp", + "getpid", + "getppid", + "getpriority", + "getproto", + "getprotobyname", + "getprotobynumber", + "getprotoent", + "getpw", + "getpwent", + "getpwnam", + "getpwuid", + "getrlimit", + "getserv", + "getservbyname", + "getservbyport", + "getservent", + "getsid", + "getsockname", + "getsockopt", + "gettext", + "gettimeofday", + "getuid", + "gmtime", + "group:gid", + "group:mem", + "group:name", + "group:passwd", + "hash", + "hash-clear!", + "hash-count", + "hash-create-handle!", + "hash-fold", + "hash-for-each", + "hash-for-each-handle", + "hash-get-handle", + "hash-map->list", + "hash-ref", + "hash-remove!", + "hash-set!", + "hash-table?", + "hashq", + "hashq-create-handle!", + "hashq-get-handle", + "hashq-ref", + "hashq-remove!", + "hashq-set!", + "hashv", + "hashv-create-handle!", + "hashv-get-handle", + "hashv-ref", + "hashv-remove!", + "hashv-set!", + "hashx-create-handle!", + "hashx-get-handle", + "hashx-ref", + "hashx-remove!", + "hashx-set!", + "hook->list", + "hook-empty?", + "hook?", + "hostent:addr-list", + "hostent:addrtype", + "hostent:aliases", + "hostent:length", + "hostent:name", + "identifier?", + "identity", + "imag-part", + "in-vicinity", + "include-deprecated-features", + "inet-lnaof", + "inet-makeaddr", + "inet-netof", + "inet-ntop", + "inet-pton", + "inexact->exact", + "inexact?", + "inf", + "inf?", + "inherit-print-state", + "input-port?", + "install-r6rs!", + "install-r7rs!", + "integer->char", + "integer-expt", + "integer-length", + "integer?", + "interaction-environment", + "iota", + "isatty?", + "issue-deprecation-warning", + "keyword->symbol", + "keyword-like-symbol->keyword", + "keyword?", + "kill", + "kw-arg-ref", + "last", + "last-pair", + "lcm", + "length", + "length+", + "link", + "list", + "list->array", + "list->bitvector", + "list->char-set", + "list->char-set!", + "list->f32vector", + "list->f64vector", + "list->s16vector", + "list->s32vector", + "list->s64vector", + "list->s8vector", + "list->string", + "list->symbol", + "list->typed-array", + "list->u16vector", + "list->u32vector", + "list->u64vector", + "list->u8vector", + "list->vector", + "list-cdr-ref", + "list-cdr-set!", + "list-copy", + "list-head", + "list-index", + "list-ref", + "list-set!", + "list-tabulate", + "list-tail", + "list=", + "list?", + "listen", + "load-compiled", + "load-extension", + "load-from-path", + "load-in-vicinity", + "load-user-init", + "local-define", + "local-define-module", + "local-ref", + "local-ref-module", + "local-remove", + "local-set!", + "localtime", + "log", + "log10", + "logand", + "logbit?", + "logcount", + "logior", + "lognot", + "logtest", + "logxor", + "lookup-duplicates-handlers", + "lset-adjoin", + "lset-diff+intersection", + "lset-diff+intersection!", + "lset-difference", + "lset-difference!", + "lset-intersection", + "lset-intersection!", + "lset-union", + "lset-union!", + "lset-xor", + "lset-xor!", + "lset<=", + "lset=", + "lstat", + "macro-binding", + "macro-name", + "macro-transformer", + "macro-type", + "macro?", + "macroexpand", + "macroexpanded?", + "magnitude", + "major-version", + "make-array", + "make-autoload-interface", + "make-bitvector", + "make-doubly-weak-hash-table", + "make-exception", + "make-exception-from-throw", + "make-exception-type", + "make-f32vector", + "make-f64vector", + "make-fluid", + "make-fresh-user-module", + "make-generalized-vector", + "make-guardian", + "make-hash-table", + "make-hook", + "make-list", + "make-module", + "make-modules-in", + "make-mutable-parameter", + "make-object-property", + "make-parameter", + "make-polar", + "make-procedure-with-setter", + "make-promise", + "make-prompt-tag", + "make-record-type", + "make-rectangular", + "make-regexp", + "make-s16vector", + "make-s32vector", + "make-s64vector", + "make-s8vector", + "make-shared-array", + "make-socket-address", + "make-soft-port", + "make-srfi-4-vector", + "make-stack", + "make-string", + "make-struct-layout", + "make-struct/no-tail", + "make-struct/simple", + "make-symbol", + "make-syntax-transformer", + "make-thread-local-fluid", + "make-typed-array", + "make-u16vector", + "make-u32vector", + "make-u64vector", + "make-u8vector", + "make-unbound-fluid", + "make-undefined-variable", + "make-variable", + "make-variable-transformer", + "make-vector", + "make-vtable", + "make-weak-key-hash-table", + "make-weak-value-hash-table", + "map", + "map!", + "map-in-order", + "max", + "member", + "memoize-expression", + "memoized-typecode", + "memq", + "memv", + "merge", + "merge!", + "micro-version", + "min", + "minor-version", + "mkdir", + "mkdtemp", + "mknod", + "mkstemp", + "mkstemp!", + "mktime", + "module-add!", + "module-autoload!", + "module-binder", + "module-bound?", + "module-call-observers", + "module-clear!", + "module-constructor", + "module-declarative?", + "module-defer-observers", + "module-define!", + "module-define-submodule!", + "module-defined?", + "module-duplicates-handlers", + "module-ensure-local-variable!", + "module-export!", + "module-export-all!", + "module-filename", + "module-for-each", + "module-generate-unique-id!", + "module-gensym", + "module-import-interface", + "module-import-obarray", + "module-kind", + "module-local-variable", + "module-locally-bound?", + "module-make-local-var!", + "module-map", + "module-modified", + "module-name", + "module-next-unique-id", + "module-obarray", + "module-obarray-get-handle", + "module-obarray-ref", + "module-obarray-remove!", + "module-obarray-set!", + "module-observe", + "module-observe-weak", + "module-observers", + "module-public-interface", + "module-re-export!", + "module-ref", + "module-ref-submodule", + "module-remove!", + "module-replace!", + "module-replacements", + "module-reverse-lookup", + "module-search", + "module-set!", + "module-submodule-binder", + "module-submodules", + "module-symbol-binding", + "module-symbol-interned?", + "module-symbol-local-binding", + "module-symbol-locally-interned?", + "module-transformer", + "module-unobserve", + "module-use!", + "module-use-interfaces!", + "module-uses", + "module-variable", + "module-version", + "module-weak-observers", + "module?", + "modulo", + "modulo-expt", + "move->fdes", + "nan", + "nan?", + "negate", + "negative?", + "nested-define!", + "nested-define-module!", + "nested-ref", + "nested-ref-module", + "nested-remove!", + "nested-set!", + "netent:addrtype", + "netent:aliases", + "netent:name", + "netent:net", + "newline", + "ngettext", + "nice", + "nil?", + "ninth", + "noop", + "not", + "not-pair?", + "null-environment", + "null-list?", + "null?", + "number->string", + "number?", + "numerator", + "object->string", + "object-address", + "object-properties", + "object-property", + "odd?", + "open", + "open-fdes", + "open-file", + "open-input-file", + "open-input-string", + "open-io-file", + "open-output-file", + "open-output-string", + "opendir", + "or-map", + "output-port?", + "pair-fold", + "pair-fold-right", + "pair-for-each", + "pair?", + "parameter-converter", + "parameter-fluid", + "parameter?", + "parse-path", + "parse-path-with-ellipsis", + "partition", + "partition!", + "passwd:dir", + "passwd:gecos", + "passwd:gid", + "passwd:name", + "passwd:passwd", + "passwd:shell", + "passwd:uid", + "pause", + "peek", + "peek-char", + "pipe", + "pk", + "port->fdes", + "port-closed?", + "port-column", + "port-conversion-strategy", + "port-encoding", + "port-filename", + "port-for-each", + "port-line", + "port-mode", + "port-revealed", + "port-with-print-state", + "port?", + "positive?", + "primitive-_exit", + "primitive-eval", + "primitive-exit", + "primitive-fork", + "primitive-load", + "primitive-load-path", + "primitive-move->fdes", + "primitive-read", + "print-disable", + "print-enable", + "print-exception", + "print-options", + "print-options-interface", + "procedure", + "procedure-documentation", + "procedure-minimum-arity", + "procedure-name", + "procedure-properties", + "procedure-property", + "procedure-source", + "procedure-with-setter?", + "procedure?", + "process-use-modules", + "program-arguments", + "promise?", + "proper-list?", + "protoent:aliases", + "protoent:name", + "protoent:proto", + "provide", + "provided?", + "purify-module!", + "putenv", + "quit", + "quotient", + "raise", + "raise-exception", + "random", + "random-state->datum", + "random-state-from-platform", + "random:exp", + "random:hollow-sphere!", + "random:normal", + "random:normal-vector!", + "random:solid-sphere!", + "random:uniform", + "rational?", + "rationalize", + "read", + "read-char", + "read-disable", + "read-enable", + "read-hash-extend", + "read-hash-procedure", + "read-hash-procedures", + "read-options", + "read-options-interface", + "read-syntax", + "readdir", + "readlink", + "real-part", + "real?", + "record-accessor", + "record-constructor", + "record-modifier", + "record-predicate", + "record-type-constructor", + "record-type-descriptor", + "record-type-extensible?", + "record-type-fields", + "record-type-has-parent?", + "record-type-mutable-fields", + "record-type-name", + "record-type-opaque?", + "record-type-parent", + "record-type-parents", + "record-type-properties", + "record-type-uid", + "record-type?", + "record?", + "recv!", + "recvfrom!", + "redirect-port", + "reduce", + "reduce-right", + "regexp-exec", + "regexp?", + "release-port-handle", + "reload-module", + "remainder", + "remove", + "remove!", + "remove-hook!", + "rename-file", + "repl-reader", + "reset-hook!", + "resolve-interface", + "resolve-module", + "resolve-r6rs-interface", + "restore-signals", + "restricted-vector-sort!", + "reverse", + "reverse!", + "reverse-list->string", + "rewinddir", + "rmdir", + "round", + "round-ash", + "round-quotient", + "round-remainder", + "round/", + "run-hook", + "s16vector", + "s16vector->list", + "s16vector-length", + "s16vector-ref", + "s16vector-set!", + "s16vector?", + "s32vector", + "s32vector->list", + "s32vector-length", + "s32vector-ref", + "s32vector-set!", + "s32vector?", + "s64vector", + "s64vector->list", + "s64vector-length", + "s64vector-ref", + "s64vector-set!", + "s64vector?", + "s8vector", + "s8vector->list", + "s8vector-length", + "s8vector-ref", + "s8vector-set!", + "s8vector?", + "save-module-excursion", + "scheme-report-environment", + "scm-error", + "search-path", + "second", + "seed->random-state", + "seek", + "select", + "self-evaluating?", + "send", + "sendfile", + "sendto", + "servent:aliases", + "servent:name", + "servent:port", + "servent:proto", + "set-autoloaded!", + "set-car!", + "set-cdr!", + "set-current-dynamic-state", + "set-current-error-port", + "set-current-input-port", + "set-current-module", + "set-current-output-port", + "set-exception-printer!", + "set-module-binder!", + "set-module-declarative?!", + "set-module-duplicates-handlers!", + "set-module-filename!", + "set-module-kind!", + "set-module-name!", + "set-module-next-unique-id!", + "set-module-obarray!", + "set-module-observers!", + "set-module-public-interface!", + "set-module-submodule-binder!", + "set-module-submodules!", + "set-module-transformer!", + "set-module-uses!", + "set-module-version!", + "set-object-properties!", + "set-object-property!", + "set-port-column!", + "set-port-conversion-strategy!", + "set-port-encoding!", + "set-port-filename!", + "set-port-line!", + "set-port-revealed!", + "set-procedure-minimum-arity!", + "set-procedure-properties!", + "set-procedure-property!", + "set-program-arguments", + "set-source-properties!", + "set-source-property!", + "set-struct-vtable-name!", + "set-symbol-property!", + "set-tm:gmtoff", + "set-tm:hour", + "set-tm:isdst", + "set-tm:mday", + "set-tm:min", + "set-tm:mon", + "set-tm:sec", + "set-tm:wday", + "set-tm:yday", + "set-tm:year", + "set-tm:zone", + "setaffinity", + "setegid", + "setenv", + "seteuid", + "setgid", + "setgr", + "setgrent", + "setgroups", + "sethost", + "sethostent", + "sethostname", + "setitimer", + "setlocale", + "setnet", + "setnetent", + "setpgid", + "setpriority", + "setproto", + "setprotoent", + "setpw", + "setpwent", + "setrlimit", + "setserv", + "setservent", + "setsid", + "setsockopt", + "setter", + "setuid", + "setvbuf", + "seventh", + "shared-array-increments", + "shared-array-offset", + "shared-array-root", + "shutdown", + "sigaction", + "simple-exceptions", + "simple-format", + "sin", + "sinh", + "sixth", + "sleep", + "sloppy-assoc", + "sloppy-assq", + "sloppy-assv", + "sockaddr:addr", + "sockaddr:fam", + "sockaddr:flowinfo", + "sockaddr:path", + "sockaddr:port", + "sockaddr:scopeid", + "socket", + "socketpair", + "sort", + "sort!", + "sort-list", + "sort-list!", + "sorted?", + "source-properties", + "source-property", + "span", + "span!", + "split-at", + "split-at!", + "sqrt", + "stable-sort", + "stable-sort!", + "stack-id", + "stack-length", + "stack-ref", + "stack?", + "stat", + "stat:atime", + "stat:atimensec", + "stat:blksize", + "stat:blocks", + "stat:ctime", + "stat:ctimensec", + "stat:dev", + "stat:gid", + "stat:ino", + "stat:mode", + "stat:mtime", + "stat:mtimensec", + "stat:nlink", + "stat:perms", + "stat:rdev", + "stat:size", + "stat:type", + "stat:uid", + "status:exit-val", + "status:stop-sig", + "status:term-sig", + "strerror", + "strftime", + "string", + "string->char-set", + "string->char-set!", + "string->list", + "string->number", + "string->symbol", + "string-any", + "string-any-c-code", + "string-append", + "string-append/shared", + "string-bytes-per-char", + "string-capitalize", + "string-capitalize!", + "string-ci->symbol", + "string-ci<", + "string-ci<=", + "string-ci<=?", + "string-ci<>", + "string-ci<?", + "string-ci=", + "string-ci=?", + "string-ci>", + "string-ci>=", + "string-ci>=?", + "string-ci>?", + "string-compare", + "string-compare-ci", + "string-concatenate", + "string-concatenate-reverse", + "string-concatenate-reverse/shared", + "string-concatenate/shared", + "string-contains", + "string-contains-ci", + "string-copy", + "string-copy!", + "string-count", + "string-delete", + "string-downcase", + "string-downcase!", + "string-drop", + "string-drop-right", + "string-every", + "string-every-c-code", + "string-fill!", + "string-filter", + "string-fold", + "string-fold-right", + "string-for-each", + "string-for-each-index", + "string-hash", + "string-hash-ci", + "string-index", + "string-index-right", + "string-join", + "string-length", + "string-map", + "string-map!", + "string-normalize-nfc", + "string-normalize-nfd", + "string-normalize-nfkc", + "string-normalize-nfkd", + "string-null?", + "string-pad", + "string-pad-right", + "string-prefix-ci?", + "string-prefix-length", + "string-prefix-length-ci", + "string-prefix?", + "string-ref", + "string-replace", + "string-reverse", + "string-reverse!", + "string-rindex", + "string-set!", + "string-skip", + "string-skip-right", + "string-split", + "string-suffix-ci?", + "string-suffix-length", + "string-suffix-length-ci", + "string-suffix?", + "string-tabulate", + "string-take", + "string-take-right", + "string-titlecase", + "string-titlecase!", + "string-tokenize", + "string-trim", + "string-trim-both", + "string-trim-right", + "string-unfold", + "string-unfold-right", + "string-upcase", + "string-upcase!", + "string-utf8-length", + "string-xcopy!", + "string<", + "string<=", + "string<=?", + "string<>", + "string<?", + "string=", + "string=?", + "string>", + "string>=", + "string>=?", + "string>?", + "string?", + "strptime", + "struct-layout", + "struct-ref", + "struct-ref/unboxed", + "struct-set!", + "struct-set!/unboxed", + "struct-vtable", + "struct-vtable-name", + "struct-vtable?", + "struct?", + "substring", + "substring-fill!", + "substring-move!", + "substring/copy", + "substring/read-only", + "substring/shared", + "supports-source-properties?", + "symbol", + "symbol->keyword", + "symbol->string", + "symbol-append", + "symbol-fref", + "symbol-fset!", + "symbol-hash", + "symbol-interned?", + "symbol-pref", + "symbol-prefix-proc", + "symbol-property", + "symbol-property-remove!", + "symbol-pset!", + "symbol?", + "symlink", + "sync", + "syntax->datum", + "syntax-source", + "syntax-violation", + "system", + "system*", + "system-async-mark", + "system-error-errno", + "system-file-name-convention", + "take", + "take!", + "take-right", + "take-while", + "take-while!", + "tan", + "tanh", + "tcgetpgrp", + "tcsetpgrp", + "tenth", + "textdomain", + "third", + "throw", + "thunk?", + "times", + "tm:gmtoff", + "tm:hour", + "tm:isdst", + "tm:mday", + "tm:min", + "tm:mon", + "tm:sec", + "tm:wday", + "tm:yday", + "tm:year", + "tm:zone", + "tmpfile", + "tmpnam", + "tms:clock", + "tms:cstime", + "tms:cutime", + "tms:stime", + "tms:utime", + "transpose-array", + "truncate", + "truncate-file", + "truncate-quotient", + "truncate-remainder", + "truncate/", + "try-load-module", + "try-module-autoload", + "ttyname", + "typed-array?", + "tzset", + "u16vector", + "u16vector->list", + "u16vector-length", + "u16vector-ref", + "u16vector-set!", + "u16vector?", + "u32vector", + "u32vector->list", + "u32vector-length", + "u32vector-ref", + "u32vector-set!", + "u32vector?", + "u64vector", + "u64vector->list", + "u64vector-length", + "u64vector-ref", + "u64vector-set!", + "u64vector?", + "u8vector", + "u8vector->list", + "u8vector-length", + "u8vector-ref", + "u8vector-set!", + "u8vector?", + "ucs-range->char-set", + "ucs-range->char-set!", + "umask", + "uname", + "unfold", + "unfold-right", + "unmemoize-expression", + "unread-char", + "unread-string", + "unsetenv", + "unspecified?", + "unzip1", + "unzip2", + "unzip3", + "unzip4", + "unzip5", + "use-srfis", + "user-modules-declarative?", + "using-readline?", + "usleep", + "utime", + "utsname:machine", + "utsname:nodename", + "utsname:release", + "utsname:sysname", + "utsname:version", + "values", + "variable-bound?", + "variable-ref", + "variable-set!", + "variable-unset!", + "variable?", + "vector", + "vector->list", + "vector-copy", + "vector-fill!", + "vector-length", + "vector-move-left!", + "vector-move-right!", + "vector-ref", + "vector-set!", + "vector?", + "version", + "version-matches?", + "waitpid", + "warn", + "weak-key-hash-table?", + "weak-value-hash-table?", + "with-continuation-barrier", + "with-dynamic-state", + "with-error-to-file", + "with-error-to-port", + "with-error-to-string", + "with-exception-handler", + "with-fluid*", + "with-fluids*", + "with-input-from-file", + "with-input-from-port", + "with-input-from-string", + "with-output-to-file", + "with-output-to-port", + "with-output-to-string", + "with-throw-handler", + "write", + "write-char", + "xcons", + "xsubstring", + "zero?", + "zip", +} + diff --git a/contrib/python/Pygments/py3/pygments/lexers/_scilab_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_scilab_builtins.py index e2cfcb9622..c433bcfd39 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_scilab_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_scilab_builtins.py @@ -4,7 +4,7 @@ Builtin list for the ScilabLexer. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_sourcemod_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_sourcemod_builtins.py index 2977a2c04f..3884b4b603 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_sourcemod_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_sourcemod_builtins.py @@ -3,11 +3,12 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This file contains the names of SourceMod functions. - It is able to re-generate itself. Do not edit the FUNCTIONS list by hand. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + Run with `python -I` to regenerate. + + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -1093,19 +1094,10 @@ FUNCTIONS = ( if __name__ == '__main__': # pragma: no cover import re import sys - try: - from urllib import FancyURLopener - except ImportError: - from urllib.request import FancyURLopener + from urllib.request import FancyURLopener from pygments.util import format_lines - # urllib ends up wanting to import a module called 'math' -- if - # pygments/lexers is in the path, this ends badly. - for i in range(len(sys.path)-1, -1, -1): - if sys.path[i].endswith('/lexers'): - del sys.path[i] - class Opener(FancyURLopener): version = 'Mozilla/5.0 (Pygments Sourcemod Builtins Update)' @@ -1115,7 +1107,7 @@ if __name__ == '__main__': # pragma: no cover f = opener.open('http://docs.sourcemod.net/api/index.php') r = re.compile(r'SourceMod v\.<b>([\d\.]+(?:-\w+)?)</td>') for line in f: - m = r.search(line) + m = r.search(line.decode()) if m is not None: return m.groups()[0] raise ValueError('No version in api docs') @@ -1125,7 +1117,7 @@ if __name__ == '__main__': # pragma: no cover r = re.compile(r'SMfunctions\[\d+\] = Array \("(?:public )?([^,]+)",".+"\);') functions = [] for line in f: - m = r.match(line) + m = r.match(line.decode()) if m is not None: functions.append(m.groups()[0]) return functions @@ -1141,7 +1133,7 @@ if __name__ == '__main__': # pragma: no cover with open(filename, 'w') as fp: fp.write(header) fp.write(format_lines('FUNCTIONS', natives)) - fp.write(footer) + fp.write('\n\n' + footer) def run(): version = get_version() diff --git a/contrib/python/Pygments/py3/pygments/lexers/_stan_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_stan_builtins.py index f15167053a..2ab1c87493 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_stan_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_stan_builtins.py @@ -3,9 +3,9 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This file contains the names of functions for Stan used by - ``pygments.lexers.math.StanLexer. This is for Stan language version 2.17.0. + ``pygments.lexers.math.StanLexer. This is for Stan language version 2.29.0. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -37,16 +37,21 @@ TYPES = ( 'unit_vector', 'vector', 'void', + 'array', + 'complex' ) FUNCTIONS = ( 'abs', 'acos', 'acosh', + 'add_diag', 'algebra_solver', + 'algebra_solver_newton', 'append_array', 'append_col', 'append_row', + 'arg', 'asin', 'asinh', 'atan', @@ -55,21 +60,32 @@ FUNCTIONS = ( 'bernoulli_cdf', 'bernoulli_lccdf', 'bernoulli_lcdf', + 'bernoulli_logit_glm_lpmf', + 'bernoulli_logit_glm_lupmf', + 'bernoulli_logit_glm_rng', 'bernoulli_logit_lpmf', + 'bernoulli_logit_lupmf', 'bernoulli_logit_rng', 'bernoulli_lpmf', + 'bernoulli_lupmf', 'bernoulli_rng', 'bessel_first_kind', 'bessel_second_kind', + 'beta', 'beta_binomial_cdf', 'beta_binomial_lccdf', 'beta_binomial_lcdf', 'beta_binomial_lpmf', + 'beta_binomial_lupmf', 'beta_binomial_rng', 'beta_cdf', 'beta_lccdf', 'beta_lcdf', 'beta_lpdf', + 'beta_lupdf', + 'beta_proportion_lccdf', + 'beta_proportion_lcdf', + 'beta_proportion_rng', 'beta_rng', 'binary_log_loss', 'binomial_cdf', @@ -77,17 +93,24 @@ FUNCTIONS = ( 'binomial_lccdf', 'binomial_lcdf', 'binomial_logit_lpmf', + 'binomial_logit_lupmf', 'binomial_lpmf', + 'binomial_lupmf', 'binomial_rng', 'block', + 'categorical_logit_glm_lpmf', + 'categorical_logit_glm_lupmf', 'categorical_logit_lpmf', + 'categorical_logit_lupmf', 'categorical_logit_rng', 'categorical_lpmf', + 'categorical_lupmf', 'categorical_rng', 'cauchy_cdf', 'cauchy_lccdf', 'cauchy_lcdf', 'cauchy_lpdf', + 'cauchy_lupdf', 'cauchy_rng', 'cbrt', 'ceil', @@ -95,13 +118,16 @@ FUNCTIONS = ( 'chi_square_lccdf', 'chi_square_lcdf', 'chi_square_lpdf', + 'chi_square_lupdf', 'chi_square_rng', + 'chol2inv', 'cholesky_decompose', 'choose', 'col', 'cols', 'columns_dot_product', 'columns_dot_self', + 'conj', 'cos', 'cosh', 'cov_exp_quad', @@ -112,6 +138,8 @@ FUNCTIONS = ( 'csr_matrix_times_vector', 'csr_to_dense_matrix', 'cumulative_sum', + 'dae', + 'dae_tol', 'determinant', 'diag_matrix', 'diag_post_multiply', @@ -120,7 +148,14 @@ FUNCTIONS = ( 'digamma', 'dims', 'dirichlet_lpdf', + 'dirichlet_lupdf', 'dirichlet_rng', + 'discrete_range_cdf', + 'discrete_range_lccdf', + 'discrete_range_lcdf', + 'discrete_range_lpmf', + 'discrete_range_lupmf', + 'discrete_range_rng', 'distance', 'dot_product', 'dot_self', @@ -128,6 +163,7 @@ FUNCTIONS = ( 'double_exponential_lccdf', 'double_exponential_lcdf', 'double_exponential_lpdf', + 'double_exponential_lupdf', 'double_exponential_rng', 'e', 'eigenvalues_sym', @@ -140,12 +176,14 @@ FUNCTIONS = ( 'exp_mod_normal_lccdf', 'exp_mod_normal_lcdf', 'exp_mod_normal_lpdf', + 'exp_mod_normal_lupdf', 'exp_mod_normal_rng', 'expm1', 'exponential_cdf', 'exponential_lccdf', 'exponential_lcdf', 'exponential_lpdf', + 'exponential_lupdf', 'exponential_rng', 'fabs', 'falling_factorial', @@ -159,28 +197,42 @@ FUNCTIONS = ( 'frechet_lccdf', 'frechet_lcdf', 'frechet_lpdf', + 'frechet_lupdf', 'frechet_rng', 'gamma_cdf', 'gamma_lccdf', 'gamma_lcdf', 'gamma_lpdf', + 'gamma_lupdf', 'gamma_p', 'gamma_q', 'gamma_rng', 'gaussian_dlm_obs_lpdf', + 'gaussian_dlm_obs_lupdf', + 'generalized_inverse', + 'get_imag', 'get_lp', + 'get_real', 'gumbel_cdf', 'gumbel_lccdf', 'gumbel_lcdf', 'gumbel_lpdf', + 'gumbel_lupdf', 'gumbel_rng', 'head', + 'hmm_hidden_state_prob', + 'hmm_latent_rng', + 'hmm_marginal', 'hypergeometric_lpmf', + 'hypergeometric_lupmf', 'hypergeometric_rng', 'hypot', + 'identity_matrix', 'inc_beta', 'int_step', + 'integrate_1d', 'integrate_ode', + 'integrate_ode_adams', 'integrate_ode_bdf', 'integrate_ode_rk45', 'inv', @@ -188,29 +240,42 @@ FUNCTIONS = ( 'inv_chi_square_lccdf', 'inv_chi_square_lcdf', 'inv_chi_square_lpdf', + 'inv_chi_square_lupdf', 'inv_chi_square_rng', 'inv_cloglog', + 'inv_erfc', 'inv_gamma_cdf', 'inv_gamma_lccdf', 'inv_gamma_lcdf', 'inv_gamma_lpdf', + 'inv_gamma_lupdf', 'inv_gamma_rng', 'inv_logit', 'inv_Phi', 'inv_sqrt', 'inv_square', 'inv_wishart_lpdf', + 'inv_wishart_lupdf', 'inv_wishart_rng', 'inverse', 'inverse_spd', 'is_inf', 'is_nan', + 'lambert_w0', + 'lambert_wm1', 'lbeta', 'lchoose', + 'ldexp', 'lgamma', + 'linspaced_array', + 'linspaced_int_array', + 'linspaced_row_vector', + 'linspaced_vector', 'lkj_corr_cholesky_lpdf', + 'lkj_corr_cholesky_lupdf', 'lkj_corr_cholesky_rng', 'lkj_corr_lpdf', + 'lkj_corr_lupdf', 'lkj_corr_rng', 'lmgamma', 'lmultiply', @@ -226,7 +291,9 @@ FUNCTIONS = ( 'log_diff_exp', 'log_falling_factorial', 'log_inv_logit', + 'log_inv_logit_diff', 'log_mix', + 'log_modified_bessel_first_kind', 'log_rising_factorial', 'log_softmax', 'log_sum_exp', @@ -234,15 +301,23 @@ FUNCTIONS = ( 'logistic_lccdf', 'logistic_lcdf', 'logistic_lpdf', + 'logistic_lupdf', 'logistic_rng', 'logit', + 'loglogistic_cdf', + 'loglogistic_lpdf', + 'loglogistic_rng', 'lognormal_cdf', 'lognormal_lccdf', 'lognormal_lcdf', 'lognormal_lpdf', + 'lognormal_lupdf', 'lognormal_rng', 'machine_precision', + 'map_rect', 'matrix_exp', + 'matrix_exp_multiply', + 'matrix_power', 'max', 'mdivide_left_spd', 'mdivide_left_tri_low', @@ -253,50 +328,94 @@ FUNCTIONS = ( 'modified_bessel_first_kind', 'modified_bessel_second_kind', 'multi_gp_cholesky_lpdf', + 'multi_gp_cholesky_lupdf', 'multi_gp_lpdf', + 'multi_gp_lupdf', 'multi_normal_cholesky_lpdf', + 'multi_normal_cholesky_lupdf', 'multi_normal_cholesky_rng', 'multi_normal_lpdf', + 'multi_normal_lupdf', 'multi_normal_prec_lpdf', + 'multi_normal_prec_lupdf', 'multi_normal_rng', 'multi_student_t_lpdf', + 'multi_student_t_lupdf', 'multi_student_t_rng', + 'multinomial_logit_lpmf', + 'multinomial_logit_lupmf', + 'multinomial_logit_rng', 'multinomial_lpmf', + 'multinomial_lupmf', 'multinomial_rng', 'multiply_log', 'multiply_lower_tri_self_transpose', 'neg_binomial_2_cdf', 'neg_binomial_2_lccdf', 'neg_binomial_2_lcdf', + 'neg_binomial_2_log_glm_lpmf', + 'neg_binomial_2_log_glm_lupmf', 'neg_binomial_2_log_lpmf', + 'neg_binomial_2_log_lupmf', 'neg_binomial_2_log_rng', 'neg_binomial_2_lpmf', + 'neg_binomial_2_lupmf', 'neg_binomial_2_rng', 'neg_binomial_cdf', 'neg_binomial_lccdf', 'neg_binomial_lcdf', 'neg_binomial_lpmf', + 'neg_binomial_lupmf', 'neg_binomial_rng', 'negative_infinity', + 'norm', 'normal_cdf', + 'normal_id_glm_lpdf', + 'normal_id_glm_lupdf', 'normal_lccdf', 'normal_lcdf', 'normal_lpdf', + 'normal_lupdf', 'normal_rng', 'not_a_number', 'num_elements', + 'ode_adams', + 'ode_adams_tol', + 'ode_adjoint_tol_ctl', + 'ode_bdf', + 'ode_bdf_tol', + 'ode_ckrk', + 'ode_ckrk_tol', + 'ode_rk45', + 'ode_rk45_tol', + 'one_hot_array', + 'one_hot_int_array', + 'one_hot_row_vector', + 'one_hot_vector', + 'ones_array', + 'ones_int_array', + 'ones_row_vector', + 'ones_vector', + 'ordered_logistic_glm_lpmf', + 'ordered_logistic_glm_lupmf', 'ordered_logistic_lpmf', + 'ordered_logistic_lupmf', 'ordered_logistic_rng', + 'ordered_probit_lpmf', + 'ordered_probit_lupmf', + 'ordered_probit_rng', 'owens_t', 'pareto_cdf', 'pareto_lccdf', 'pareto_lcdf', 'pareto_lpdf', + 'pareto_lupdf', 'pareto_rng', 'pareto_type_2_cdf', 'pareto_type_2_lccdf', 'pareto_type_2_lcdf', 'pareto_type_2_lpdf', + 'pareto_type_2_lupdf', 'pareto_type_2_rng', 'Phi', 'Phi_approx', @@ -304,40 +423,54 @@ FUNCTIONS = ( 'poisson_cdf', 'poisson_lccdf', 'poisson_lcdf', + 'poisson_log_glm_lpmf', + 'poisson_log_glm_lupmf', 'poisson_log_lpmf', + 'poisson_log_lupmf', 'poisson_log_rng', 'poisson_lpmf', + 'poisson_lupmf', 'poisson_rng', + 'polar', 'positive_infinity', 'pow', 'print', 'prod', + 'proj', 'qr_Q', 'qr_R', + 'qr_thin_Q', + 'qr_thin_R', 'quad_form', 'quad_form_diag', 'quad_form_sym', + 'quantile', 'rank', 'rayleigh_cdf', 'rayleigh_lccdf', 'rayleigh_lcdf', 'rayleigh_lpdf', + 'rayleigh_lupdf', 'rayleigh_rng', + 'reduce_sum', 'reject', 'rep_array', 'rep_matrix', 'rep_row_vector', 'rep_vector', + 'reverse', 'rising_factorial', 'round', 'row', 'rows', 'rows_dot_product', 'rows_dot_self', + 'scale_matrix_exp_multiply', 'scaled_inv_chi_square_cdf', 'scaled_inv_chi_square_lccdf', 'scaled_inv_chi_square_lcdf', 'scaled_inv_chi_square_lpdf', + 'scaled_inv_chi_square_lupdf', 'scaled_inv_chi_square_rng', 'sd', 'segment', @@ -345,10 +478,17 @@ FUNCTIONS = ( 'singular_values', 'sinh', 'size', + 'skew_double_exponential_cdf', + 'skew_double_exponential_lccdf', + 'skew_double_exponential_lcdf', + 'skew_double_exponential_lpdf', + 'skew_double_exponential_lupdf', + 'skew_double_exponential_rng', 'skew_normal_cdf', 'skew_normal_lccdf', 'skew_normal_lcdf', 'skew_normal_lpdf', + 'skew_normal_lupdf', 'skew_normal_rng', 'softmax', 'sort_asc', @@ -359,15 +499,25 @@ FUNCTIONS = ( 'sqrt2', 'square', 'squared_distance', + 'std_normal_cdf', + 'std_normal_lccdf', + 'std_normal_lcdf', + 'std_normal_lpdf', + 'std_normal_lupdf', + 'std_normal_rng', 'step', 'student_t_cdf', 'student_t_lccdf', 'student_t_lcdf', 'student_t_lpdf', + 'student_t_lupdf', 'student_t_rng', 'sub_col', 'sub_row', 'sum', + 'svd_U', + 'svd_V', + 'symmetrize_from_lower_tri', 'tail', 'tan', 'tanh', @@ -376,6 +526,7 @@ FUNCTIONS = ( 'tgamma', 'to_array_1d', 'to_array_2d', + 'to_complex', 'to_matrix', 'to_row_vector', 'to_vector', @@ -388,32 +539,47 @@ FUNCTIONS = ( 'uniform_lccdf', 'uniform_lcdf', 'uniform_lpdf', + 'uniform_lupdf', 'uniform_rng', + 'uniform_simplex', 'variance', + 'von_mises_cdf', + 'von_mises_lccdf', + 'von_mises_lcdf', 'von_mises_lpdf', + 'von_mises_lupdf', 'von_mises_rng', 'weibull_cdf', 'weibull_lccdf', 'weibull_lcdf', 'weibull_lpdf', + 'weibull_lupdf', 'weibull_rng', 'wiener_lpdf', + 'wiener_lupdf', 'wishart_lpdf', + 'wishart_lupdf', 'wishart_rng', + 'zeros_array', + 'zeros_int_array', + 'zeros_row_vector' ) DISTRIBUTIONS = ( 'bernoulli', 'bernoulli_logit', + 'bernoulli_logit_glm', 'beta', 'beta_binomial', 'binomial', 'binomial_logit', 'categorical', 'categorical_logit', + 'categorical_logit_glm', 'cauchy', 'chi_square', 'dirichlet', + 'discrete_range', 'double_exponential', 'exp_mod_normal', 'exponential', @@ -428,6 +594,7 @@ DISTRIBUTIONS = ( 'lkj_corr', 'lkj_corr_cholesky', 'logistic', + 'loglogistic', 'lognormal', 'multi_gp', 'multi_gp_cholesky', @@ -436,18 +603,26 @@ DISTRIBUTIONS = ( 'multi_normal_prec', 'multi_student_t', 'multinomial', + 'multinomial_logit', 'neg_binomial', 'neg_binomial_2', 'neg_binomial_2_log', + 'neg_binomial_2_log_glm', 'normal', + 'normal_id_glm', 'ordered_logistic', + 'ordered_logistic_glm', + 'ordered_probit', 'pareto', 'pareto_type_2', 'poisson', 'poisson_log', + 'poisson_log_glm', 'rayleigh', 'scaled_inv_chi_square', + 'skew_double_exponential', 'skew_normal', + 'std_normal', 'student_t', 'uniform', 'von_mises', @@ -457,101 +632,17 @@ DISTRIBUTIONS = ( ) RESERVED = ( - 'alignas', - 'alignof', - 'and', - 'and_eq', - 'asm', - 'auto', - 'bitand', - 'bitor', - 'bool', - 'break', - 'case', - 'catch', - 'char', - 'char16_t', - 'char32_t', - 'class', - 'compl', - 'const', - 'const_cast', - 'constexpr', - 'continue', - 'decltype', - 'default', - 'delete', - 'do', - 'double', - 'dynamic_cast', - 'else', - 'enum', - 'explicit', - 'export', - 'extern', - 'false', - 'float', - 'for', - 'friend', - 'fvar', - 'goto', - 'if', - 'in', - 'inline', - 'int', - 'long', - 'lp__', - 'mutable', - 'namespace', - 'new', - 'noexcept', - 'not', - 'not_eq', - 'nullptr', - 'operator', - 'or', - 'or_eq', - 'private', - 'protected', - 'public', - 'register', - 'reinterpret_cast', 'repeat', - 'return', - 'short', - 'signed', - 'sizeof', - 'STAN_MAJOR', - 'STAN_MATH_MAJOR', - 'STAN_MATH_MINOR', - 'STAN_MATH_PATCH', - 'STAN_MINOR', - 'STAN_PATCH', - 'static', - 'static_assert', - 'static_cast', - 'struct', - 'switch', - 'template', + 'until', 'then', - 'this', - 'thread_local', - 'throw', 'true', - 'try', + 'false', + 'var', + 'struct', 'typedef', - 'typeid', - 'typename', - 'union', - 'unsigned', - 'until', - 'using', + 'export', + 'auto', + 'extern', 'var', - 'virtual', - 'void', - 'volatile', - 'wchar_t', - 'while', - 'xor', - 'xor_eq', + 'static', ) diff --git a/contrib/python/Pygments/py3/pygments/lexers/_stata_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_stata_builtins.py index 0fabe36863..1343212f73 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_stata_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_stata_builtins.py @@ -4,7 +4,7 @@ Builtins for Stata - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_tsql_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_tsql_builtins.py index e72e5a5a87..934e54af0d 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_tsql_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_tsql_builtins.py @@ -4,7 +4,7 @@ These are manually translated lists from https://msdn.microsoft.com. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_usd_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_usd_builtins.py index 28efd27115..de773419ec 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_usd_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_usd_builtins.py @@ -4,7 +4,7 @@ A collection of known USD-related keywords, attributes, and types. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_vbscript_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_vbscript_builtins.py index 7256a06f17..68e732e292 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_vbscript_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_vbscript_builtins.py @@ -5,7 +5,7 @@ These are manually translated lists from http://www.indusoft.com/pdf/VBScript%20Reference.pdf. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_vim_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_vim_builtins.py index 9690511304..12eac49fb8 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_vim_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_vim_builtins.py @@ -4,7 +4,7 @@ This file is autogenerated by scripts/get_vimkw.py - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/actionscript.py b/contrib/python/Pygments/py3/pygments/lexers/actionscript.py index 28625586bd..3a5bbf21a6 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/actionscript.py +++ b/contrib/python/Pygments/py3/pygments/lexers/actionscript.py @@ -4,7 +4,7 @@ Lexers for ActionScript and MXML. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -123,6 +123,7 @@ class ActionScript3Lexer(RegexLexer): """ name = 'ActionScript 3' + url = 'https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/index.html' aliases = ['actionscript3', 'as3'] filenames = ['*.as'] mimetypes = ['application/x-actionscript3', 'text/x-actionscript3', diff --git a/contrib/python/Pygments/py3/pygments/lexers/ada.py b/contrib/python/Pygments/py3/pygments/lexers/ada.py new file mode 100644 index 0000000000..67d55b1dce --- /dev/null +++ b/contrib/python/Pygments/py3/pygments/lexers/ada.py @@ -0,0 +1,145 @@ +""" + pygments.lexers.ada + ~~~~~~~~~~~~~~~~~~~ + + Lexers for Ada family languages. + + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import Lexer, RegexLexer, include, bygroups, words, \ + using, this, default +from pygments.util import get_bool_opt, get_list_opt +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation, Error +from pygments.scanner import Scanner +from pygments.lexers._ada_builtins import KEYWORD_LIST, BUILTIN_LIST + +# compatibility import +from pygments.lexers.modula2 import Modula2Lexer + +__all__ = ['AdaLexer'] + + +class AdaLexer(RegexLexer): + """ + For Ada source code. + + .. versionadded:: 1.3 + """ + + name = 'Ada' + aliases = ['ada', 'ada95', 'ada2005'] + filenames = ['*.adb', '*.ads', '*.ada'] + mimetypes = ['text/x-ada'] + + flags = re.MULTILINE | re.IGNORECASE + + tokens = { + 'root': [ + (r'[^\S\n]+', Text), + (r'--.*?\n', Comment.Single), + (r'[^\S\n]+', Text), + (r'function|procedure|entry', Keyword.Declaration, 'subprogram'), + (r'(subtype|type)(\s+)(\w+)', + bygroups(Keyword.Declaration, Text, Keyword.Type), 'type_def'), + (r'task|protected', Keyword.Declaration), + (r'(subtype)(\s+)', bygroups(Keyword.Declaration, Text)), + (r'(end)(\s+)', bygroups(Keyword.Reserved, Text), 'end'), + (r'(pragma)(\s+)(\w+)', bygroups(Keyword.Reserved, Text, + Comment.Preproc)), + (r'(true|false|null)\b', Keyword.Constant), + # builtin types + (words(BUILTIN_LIST, suffix=r'\b'), Keyword.Type), + (r'(and(\s+then)?|in|mod|not|or(\s+else)|rem)\b', Operator.Word), + (r'generic|private', Keyword.Declaration), + (r'package', Keyword.Declaration, 'package'), + (r'array\b', Keyword.Reserved, 'array_def'), + (r'(with|use)(\s+)', bygroups(Keyword.Namespace, Text), 'import'), + (r'(\w+)(\s*)(:)(\s*)(constant)', + bygroups(Name.Constant, Text, Punctuation, Text, + Keyword.Reserved)), + (r'<<\w+>>', Name.Label), + (r'(\w+)(\s*)(:)(\s*)(declare|begin|loop|for|while)', + bygroups(Name.Label, Text, Punctuation, Text, Keyword.Reserved)), + # keywords + (words(KEYWORD_LIST, prefix=r'\b', suffix=r'\b'), + Keyword.Reserved), + (r'"[^"]*"', String), + include('attribute'), + include('numbers'), + (r"'[^']'", String.Character), + (r'(\w+)(\s*|[(,])', bygroups(Name, using(this))), + (r"(<>|=>|:=|[()|:;,.'])", Punctuation), + (r'[*<>+=/&-]', Operator), + (r'\n+', Text), + ], + 'numbers': [ + (r'[0-9_]+#[0-9a-f_\.]+#', Number.Hex), + (r'[0-9_]+\.[0-9_]*', Number.Float), + (r'[0-9_]+', Number.Integer), + ], + 'attribute': [ + (r"(')(\w+)", bygroups(Punctuation, Name.Attribute)), + ], + 'subprogram': [ + (r'\(', Punctuation, ('#pop', 'formal_part')), + (r';', Punctuation, '#pop'), + (r'is\b', Keyword.Reserved, '#pop'), + (r'"[^"]+"|\w+', Name.Function), + include('root'), + ], + 'end': [ + ('(if|case|record|loop|select)', Keyword.Reserved), + (r'"[^"]+"|[\w.]+', Name.Function), + (r'\s+', Text), + (';', Punctuation, '#pop'), + ], + 'type_def': [ + (r';', Punctuation, '#pop'), + (r'\(', Punctuation, 'formal_part'), + (r'with|and|use', Keyword.Reserved), + (r'array\b', Keyword.Reserved, ('#pop', 'array_def')), + (r'record\b', Keyword.Reserved, ('record_def')), + (r'(null record)(;)', bygroups(Keyword.Reserved, Punctuation), '#pop'), + include('root'), + ], + 'array_def': [ + (r';', Punctuation, '#pop'), + (r'(\w+)(\s+)(range)', bygroups(Keyword.Type, Text, Keyword.Reserved)), + include('root'), + ], + 'record_def': [ + (r'end record', Keyword.Reserved, '#pop'), + include('root'), + ], + 'import': [ + (r'[\w.]+', Name.Namespace, '#pop'), + default('#pop'), + ], + 'formal_part': [ + (r'\)', Punctuation, '#pop'), + (r'\w+', Name.Variable), + (r',|:[^=]', Punctuation), + (r'(in|not|null|out|access)\b', Keyword.Reserved), + include('root'), + ], + 'package': [ + ('body', Keyword.Declaration), + (r'is\s+new|renames', Keyword.Reserved), + ('is', Keyword.Reserved, '#pop'), + (';', Punctuation, '#pop'), + (r'\(', Punctuation, 'package_instantiation'), + (r'([\w.]+)', Name.Class), + include('root'), + ], + 'package_instantiation': [ + (r'("[^"]+"|\w+)(\s+)(=>)', bygroups(Name.Variable, Text, Punctuation)), + (r'[\w.\'"]', Text), + (r'\)', Punctuation, '#pop'), + include('root'), + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/agile.py b/contrib/python/Pygments/py3/pygments/lexers/agile.py index e309624fa9..7c903a6e76 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/agile.py +++ b/contrib/python/Pygments/py3/pygments/lexers/agile.py @@ -4,7 +4,7 @@ Just export lexer classes previously contained in this module. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/algebra.py b/contrib/python/Pygments/py3/pygments/lexers/algebra.py index 3e5c47b8dd..59072708dd 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/algebra.py +++ b/contrib/python/Pygments/py3/pygments/lexers/algebra.py @@ -4,7 +4,7 @@ Lexers for computer algebra systems. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -19,11 +19,12 @@ __all__ = ['GAPLexer', 'MathematicaLexer', 'MuPADLexer', 'BCLexer'] class GAPLexer(RegexLexer): """ - For `GAP <http://www.gap-system.org>`_ source code. + For GAP source code. .. versionadded:: 2.0 """ name = 'GAP' + url = 'http://www.gap-system.org' aliases = ['gap'] filenames = ['*.g', '*.gd', '*.gi', '*.gap'] @@ -89,11 +90,12 @@ class GAPLexer(RegexLexer): class MathematicaLexer(RegexLexer): """ - Lexer for `Mathematica <http://www.wolfram.com/mathematica/>`_ source code. + Lexer for Mathematica source code. .. versionadded:: 2.0 """ name = 'Mathematica' + url = 'http://www.wolfram.com/mathematica/' aliases = ['mathematica', 'mma', 'nb'] filenames = ['*.nb', '*.cdf', '*.nbp', '*.ma'] mimetypes = ['application/mathematica', @@ -136,12 +138,13 @@ class MathematicaLexer(RegexLexer): class MuPADLexer(RegexLexer): """ - A `MuPAD <http://www.mupad.com>`_ lexer. + A MuPAD lexer. Contributed by Christopher Creutzig <christopher@creutzig.de>. .. versionadded:: 0.8 """ name = 'MuPAD' + url = 'http://www.mupad.com' aliases = ['mupad'] filenames = ['*.mu'] @@ -208,11 +211,12 @@ class MuPADLexer(RegexLexer): class BCLexer(RegexLexer): """ - A `BC <https://www.gnu.org/software/bc/>`_ lexer. + A BC lexer. .. versionadded:: 2.1 """ name = 'BC' + url = 'https://www.gnu.org/software/bc/' aliases = ['bc'] filenames = ['*.bc'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/ambient.py b/contrib/python/Pygments/py3/pygments/lexers/ambient.py index 5f82804a03..a5a7c57687 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ambient.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ambient.py @@ -4,7 +4,7 @@ Lexers for AmbientTalk language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -19,11 +19,12 @@ __all__ = ['AmbientTalkLexer'] class AmbientTalkLexer(RegexLexer): """ - Lexer for `AmbientTalk <https://code.google.com/p/ambienttalk>`_ source code. + Lexer for AmbientTalk source code. .. versionadded:: 2.0 """ name = 'AmbientTalk' + url = 'https://code.google.com/p/ambienttalk' filenames = ['*.at'] aliases = ['ambienttalk', 'ambienttalk/2', 'at'] mimetypes = ['text/x-ambienttalk'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/amdgpu.py b/contrib/python/Pygments/py3/pygments/lexers/amdgpu.py index 756b773135..5356b225a0 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/amdgpu.py +++ b/contrib/python/Pygments/py3/pygments/lexers/amdgpu.py @@ -4,7 +4,7 @@ Lexers for the AMDGPU ISA assembly. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/ampl.py b/contrib/python/Pygments/py3/pygments/lexers/ampl.py index 1d6e329020..fc26f3cf16 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ampl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ampl.py @@ -4,7 +4,7 @@ Lexers for the AMPL language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -17,11 +17,12 @@ __all__ = ['AmplLexer'] class AmplLexer(RegexLexer): """ - For `AMPL <http://ampl.com/>`_ source code. + For AMPL source code. .. versionadded:: 2.2 """ name = 'Ampl' + url = 'http://ampl.com/' aliases = ['ampl'] filenames = ['*.run'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/apdlexer.py b/contrib/python/Pygments/py3/pygments/lexers/apdlexer.py index 162f038ef0..6bc1641458 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/apdlexer.py +++ b/contrib/python/Pygments/py3/pygments/lexers/apdlexer.py @@ -4,7 +4,7 @@ Lexers for ANSYS Parametric Design Language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/apl.py b/contrib/python/Pygments/py3/pygments/lexers/apl.py index ab6bbe51df..944551f17e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/apl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/apl.py @@ -4,7 +4,7 @@ Lexers for APL. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -17,11 +17,12 @@ __all__ = ['APLLexer'] class APLLexer(RegexLexer): """ - A simple `APL <https://en.m.wikipedia.org/wiki/APL_(programming_language)>`_ lexer. + A simple APL lexer. .. versionadded:: 2.0 """ name = 'APL' + url = 'https://en.m.wikipedia.org/wiki/APL_(programming_language)' aliases = ['apl'] filenames = [ '*.apl', '*.aplf', '*.aplo', '*.apln', diff --git a/contrib/python/Pygments/py3/pygments/lexers/archetype.py b/contrib/python/Pygments/py3/pygments/lexers/archetype.py index 4dfd6672fa..0afcce8afb 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/archetype.py +++ b/contrib/python/Pygments/py3/pygments/lexers/archetype.py @@ -13,7 +13,7 @@ Contributed by Thomas Beale <https://github.com/wolandscat>, <https://bitbucket.org/thomas_beale>. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/arrow.py b/contrib/python/Pygments/py3/pygments/lexers/arrow.py index 20c9e9b5fb..bdfdc74072 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/arrow.py +++ b/contrib/python/Pygments/py3/pygments/lexers/arrow.py @@ -4,7 +4,7 @@ Lexer for Arrow. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -21,12 +21,13 @@ DECL = TYPES + r'(\s+)' + IDENT class ArrowLexer(RegexLexer): """ - Lexer for Arrow: https://pypi.org/project/py-arrow-lang/ + Lexer for Arrow .. versionadded:: 2.7 """ name = 'Arrow' + url = 'https://pypi.org/project/py-arrow-lang/' aliases = ['arrow'] filenames = ['*.arw'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/asc.py b/contrib/python/Pygments/py3/pygments/lexers/asc.py index b19f429f4c..18d779f6cb 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/asc.py +++ b/contrib/python/Pygments/py3/pygments/lexers/asc.py @@ -4,7 +4,7 @@ Lexer for various ASCII armored files. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re diff --git a/contrib/python/Pygments/py3/pygments/lexers/asm.py b/contrib/python/Pygments/py3/pygments/lexers/asm.py index e5f795f4f3..8e803c9116 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/asm.py +++ b/contrib/python/Pygments/py3/pygments/lexers/asm.py @@ -4,7 +4,7 @@ Lexers for assembly languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -350,6 +350,7 @@ class LlvmLexer(RegexLexer): For LLVM assembly code. """ name = 'LLVM' + url = 'https://llvm.org/docs/LangRef.html' aliases = ['llvm'] filenames = ['*.ll'] mimetypes = ['text/x-llvm'] @@ -490,11 +491,10 @@ class LlvmMirBodyLexer(RegexLexer): """ For LLVM MIR examples without the YAML wrapper. - For more information on LLVM MIR see https://llvm.org/docs/MIRLangRef.html. - .. versionadded:: 2.6 """ name = 'LLVM-MIR Body' + url = 'https://llvm.org/docs/MIRLangRef.html' aliases = ['llvm-mir-body'] filenames = [] mimetypes = [] @@ -636,11 +636,10 @@ class LlvmMirLexer(RegexLexer): see the state of the compilation process at various points, as well as test individual pieces of the compiler. - For more information on LLVM MIR see https://llvm.org/docs/MIRLangRef.html. - .. versionadded:: 2.6 """ name = 'LLVM-MIR' + url = 'https://llvm.org/docs/MIRLangRef.html' aliases = ['llvm-mir'] filenames = ['*.mir'] @@ -861,7 +860,7 @@ class TasmLexer(RegexLexer): include('punctuation'), (register, Name.Builtin), (identifier, Name.Variable), - # Do not match newline when it's preceeded by a backslash + # Do not match newline when it's preceded by a backslash (r'(\\)(\s*)(;.*)([\r\n])', bygroups(Text, Whitespace, Comment.Single, Whitespace)), (r'[\r\n]+', Whitespace, '#pop'), include('whitespace') @@ -935,11 +934,10 @@ class Dasm16Lexer(RegexLexer): """ For DCPU-16 Assembly. - Check http://0x10c.com/doc/dcpu-16.txt - .. versionadded:: 2.4 """ name = 'DASM16' + url = 'http://0x10c.com/doc/dcpu-16.txt' aliases = ['dasm16'] filenames = ['*.dasm16', '*.dasm'] mimetypes = ['text/x-dasm16'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/automation.py b/contrib/python/Pygments/py3/pygments/lexers/automation.py index 7b03e39a06..00f448ea1c 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/automation.py +++ b/contrib/python/Pygments/py3/pygments/lexers/automation.py @@ -4,7 +4,7 @@ Lexers for automation scripting languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -17,11 +17,12 @@ __all__ = ['AutohotkeyLexer', 'AutoItLexer'] class AutohotkeyLexer(RegexLexer): """ - For `autohotkey <http://www.autohotkey.com/>`_ source code. + For autohotkey source code. .. versionadded:: 1.4 """ name = 'autohotkey' + url = 'http://www.autohotkey.com/' aliases = ['autohotkey', 'ahk'] filenames = ['*.ahk', '*.ahkl'] mimetypes = ['text/x-autohotkey'] @@ -194,7 +195,7 @@ class AutohotkeyLexer(RegexLexer): class AutoItLexer(RegexLexer): """ - For `AutoIt <http://www.autoitscript.com/site/autoit/>`_ files. + For AutoIt files. AutoIt is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting @@ -202,6 +203,7 @@ class AutoItLexer(RegexLexer): .. versionadded:: 1.6 """ name = 'AutoIt' + url = 'http://www.autoitscript.com/site/autoit/' aliases = ['autoit'] filenames = ['*.au3'] mimetypes = ['text/x-autoit'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/bare.py b/contrib/python/Pygments/py3/pygments/lexers/bare.py index bd5855f166..c1d183370f 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/bare.py +++ b/contrib/python/Pygments/py3/pygments/lexers/bare.py @@ -4,7 +4,7 @@ Lexer for the BARE schema. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -18,16 +18,15 @@ __all__ = ['BareLexer'] class BareLexer(RegexLexer): """ - For `BARE schema <https://baremessages.org>`_ schema source. + For BARE schema source. .. versionadded:: 2.7 """ name = 'BARE' + url = 'https://baremessages.org' filenames = ['*.bare'] aliases = ['bare'] - flags = re.MULTILINE | re.UNICODE - keywords = [ 'type', 'enum', diff --git a/contrib/python/Pygments/py3/pygments/lexers/basic.py b/contrib/python/Pygments/py3/pygments/lexers/basic.py index 3ccadf1e07..f0a33ff9ac 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/basic.py +++ b/contrib/python/Pygments/py3/pygments/lexers/basic.py @@ -4,7 +4,7 @@ Lexers for BASIC like languages (other than VB.net). - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -22,12 +22,13 @@ __all__ = ['BlitzBasicLexer', 'BlitzMaxLexer', 'MonkeyLexer', 'CbmBasicV2Lexer', class BlitzMaxLexer(RegexLexer): """ - For `BlitzMax <http://blitzbasic.com>`_ source code. + For BlitzMax source code. .. versionadded:: 1.4 """ name = 'BlitzMax' + url = 'http://blitzbasic.com' aliases = ['blitzmax', 'bmax'] filenames = ['*.bmx'] mimetypes = ['text/x-bmx'] @@ -113,12 +114,13 @@ class BlitzMaxLexer(RegexLexer): class BlitzBasicLexer(RegexLexer): """ - For `BlitzBasic <http://blitzbasic.com>`_ source code. + For BlitzBasic source code. .. versionadded:: 2.0 """ name = 'BlitzBasic' + url = 'http://blitzbasic.com' aliases = ['blitzbasic', 'b3d', 'bplus'] filenames = ['*.bb', '*.decls'] mimetypes = ['text/x-bb'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/bdd.py b/contrib/python/Pygments/py3/pygments/lexers/bdd.py index 99d2d2868f..f9b582ceed 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/bdd.py +++ b/contrib/python/Pygments/py3/pygments/lexers/bdd.py @@ -5,7 +5,7 @@ Lexer for BDD(Behavior-driven development). More information: https://en.wikipedia.org/wiki/Behavior-driven_development - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/berry.py b/contrib/python/Pygments/py3/pygments/lexers/berry.py new file mode 100644 index 0000000000..d7525e984d --- /dev/null +++ b/contrib/python/Pygments/py3/pygments/lexers/berry.py @@ -0,0 +1,97 @@ +""" + pygments.lexers.berry + ~~~~~~~~~~~~~~~~~~~~~ + + Lexer for Berry. + + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re +from pygments.lexer import RegexLexer, words, default, include, bygroups +from pygments.token import Text, Comment, Whitespace, Operator, Keyword, Name, String, Number, Punctuation + +__all__ = ['BerryLexer'] + +line_re = re.compile('.*?\n') + +class BerryLexer(RegexLexer): + """ + For `berry <http://github.com/berry-lang/berry>`_ source code. + + .. versionadded:: 2.12.0 + """ + name = 'Berry' + aliases = ['berry', 'be'] + filenames = ['*.be'] + mimetypes = ['text/x-berry', 'application/x-berry'] + + _name = r'\b[^\W\d]\w*' + + tokens = { + 'root': [ + include('whitespace'), + include('numbers'), + include('keywords'), + (rf'(def)(\s+)({_name})', bygroups(Keyword.Declaration, Whitespace, Name.Function)), + (rf'\b(class)(\s+)({_name})', bygroups(Keyword.Declaration, Whitespace, Name.Class)), + (rf'\b(import)(\s+)({_name})', bygroups(Keyword.Namespace, Whitespace, Name.Namespace)), + include('expr') + ], + 'expr': [ + (r'[^\S\n]+', Whitespace), + (r'\.\.|[~!%^&*+=|?:<>/-]', Operator), + (r'[(){}\[\],.;]', Punctuation), + include('controls'), + include('builtins'), + include('funccall'), + include('member'), + include('name'), + include('strings') + ], + 'whitespace': [ + (r'\s+', Whitespace), + (r'#-(.|\n)*?-#', Comment.Multiline), + (r'#.*?$', Comment.Single) + ], + 'keywords': [ + (words(( + 'as', 'break', 'continue', 'import', 'static', 'self', 'super'), + suffix=r'\b'), Keyword.Reserved), + (r'(true|false|nil)\b', Keyword.Constant), + (r'(var|def)\b', Keyword.Declaration) + ], + 'controls': [ + (words(( + 'if', 'elif', 'else', 'for', 'while', 'do', 'end', 'break', + 'continue', 'return', 'try', 'except', 'raise'), + suffix=r'\b'), Keyword) + ], + 'builtins': [ + (words(( + 'assert', 'bool', 'input', 'classname', 'classof', 'number', 'real', + 'bytes', 'compile', 'map', 'list', 'int', 'isinstance', 'print', + 'range', 'str', 'super', 'module', 'size', 'issubclass', 'open', + 'file', 'type', 'call'), + suffix=r'\b'), Name.Builtin) + ], + 'numbers': [ + (r'0[xX][a-fA-F0-9]+', Number.Hex), + (r'-?\d+', Number.Integer), + (r'(-?\d+\.?|\.\d)\d*([eE][+-]?\d+)?', Number.Float) + ], + 'name': [ + (_name, Name) + ], + 'funccall': [ + (rf'{_name}(?=\s*\()', Name.Function, '#pop') + ], + 'member': [ + (rf'(?<=\.){_name}\b(?!\()', Name.Attribute, '#pop') + ], + 'strings': [ + (r'"([^\\]|\\.)*?"', String.Double, '#pop'), + (r'\'([^\\]|\\.)*?\'', String.Single, '#pop') + ] + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/bibtex.py b/contrib/python/Pygments/py3/pygments/lexers/bibtex.py index c169468901..4a7c1e51c3 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/bibtex.py +++ b/contrib/python/Pygments/py3/pygments/lexers/bibtex.py @@ -4,7 +4,7 @@ Lexers for BibTeX bibliography data and styles - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/boa.py b/contrib/python/Pygments/py3/pygments/lexers/boa.py index 8818eaded6..ce5e09be02 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/boa.py +++ b/contrib/python/Pygments/py3/pygments/lexers/boa.py @@ -4,7 +4,7 @@ Lexers for the Boa language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/business.py b/contrib/python/Pygments/py3/pygments/lexers/business.py index 47713198ed..da37d1464b 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/business.py +++ b/contrib/python/Pygments/py3/pygments/lexers/business.py @@ -4,7 +4,7 @@ Lexers for "business-oriented" languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/c_cpp.py b/contrib/python/Pygments/py3/pygments/lexers/c_cpp.py index c9d1ed38ea..1f27b89cc0 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/c_cpp.py +++ b/contrib/python/Pygments/py3/pygments/lexers/c_cpp.py @@ -4,7 +4,7 @@ Lexers for C/C++ languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -52,14 +52,17 @@ class CFamilyLexer(RegexLexer): bygroups(using(this), Comment.Preproc), 'if0'), ('^(' + _ws1 + ')(#)', bygroups(using(this), Comment.Preproc), 'macro'), - (r'(^[ \t]*)(?!(?:public|private|protected|default)\b)(case\b\s+)?(' + _ident + r')(\s*)(:)(?!:)', - bygroups(Whitespace, using(this), Name.Label, Whitespace, Punctuation)), + # Labels: + (r'(^[ \t]*)' # Line start and possible indentation. + r'(?!(?:public|private|protected|default)\b)' # Not followed by keywords which can be mistaken as labels. + r'(' + _ident + r')(\s*)(:)(?!:)', # Actual label, followed by a single colon. + bygroups(Whitespace, Name.Label, Whitespace, Punctuation)), (r'\n', Whitespace), (r'[^\S\n]+', Whitespace), (r'\\\n', Text), # line continuation (r'//(\n|[\w\W]*?[^\\]\n)', Comment.Single), (r'/(\\\n)?[*][\w\W]*?[*](\\\n)?/', Comment.Multiline), - # Open until EOF, so no ending delimeter + # Open until EOF, so no ending delimiter (r'/(\\\n)?[*][\w\W]*', Comment.Multiline), ], 'statements': [ @@ -91,9 +94,10 @@ class CFamilyLexer(RegexLexer): ], 'keywords': [ (r'(struct|union)(\s+)', bygroups(Keyword, Whitespace), 'classname'), - (words(('asm', 'auto', 'break', 'case', 'const', 'continue', - 'default', 'do', 'else', 'enum', 'extern', 'for', 'goto', - 'if', 'register', 'restricted', 'return', 'sizeof', 'struct', + (r'case\b', Keyword, 'case-value'), + (words(('asm', 'auto', 'break', 'const', 'continue', 'default', + 'do', 'else', 'enum', 'extern', 'for', 'goto', 'if', + 'register', 'restricted', 'return', 'sizeof', 'struct', 'static', 'switch', 'typedef', 'volatile', 'while', 'union', 'thread_local', 'alignas', 'alignof', 'static_assert', '_Pragma'), suffix=r'\b'), Keyword), @@ -174,6 +178,13 @@ class CFamilyLexer(RegexLexer): # template specification (r'\s*(?=>)', Text, '#pop'), default('#pop') + ], + # Mark identifiers preceded by `case` keyword as constants. + 'case-value': [ + (r'(?<!:)(:)(?!:)', Punctuation, '#pop'), + (_ident, Name.Constant), + include('whitespace'), + include('statements'), ] } @@ -300,10 +311,11 @@ class CppLexer(CFamilyLexer): (default: ``True``). """ name = 'C++' + url = 'https://isocpp.org/' aliases = ['cpp', 'c++'] filenames = ['*.cpp', '*.hpp', '*.c++', '*.h++', '*.cc', '*.hh', '*.cxx', '*.hxx', - '*.C', '*.H', '*.cp', '*.CPP'] + '*.C', '*.H', '*.cp', '*.CPP', '*.tpp'] mimetypes = ['text/x-c++hdr', 'text/x-c++src'] priority = 0.1 diff --git a/contrib/python/Pygments/py3/pygments/lexers/c_like.py b/contrib/python/Pygments/py3/pygments/lexers/c_like.py index ed3864832d..6b511ded85 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/c_like.py +++ b/contrib/python/Pygments/py3/pygments/lexers/c_like.py @@ -4,7 +4,7 @@ Lexers for other C-like languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -573,12 +573,13 @@ class CharmciLexer(CppLexer): class OmgIdlLexer(CLexer): """ - Lexer for `Object Management Group Interface Definition Language <https://www.omg.org/spec/IDL/About-IDL/>`_. + Lexer for Object Management Group Interface Definition Language. .. versionadded:: 2.9 """ name = 'OMG Interface Definition Language' + url = 'https://www.omg.org/spec/IDL/About-IDL/' aliases = ['omg-idl'] filenames = ['*.idl', '*.pidl'] mimetypes = [] diff --git a/contrib/python/Pygments/py3/pygments/lexers/capnproto.py b/contrib/python/Pygments/py3/pygments/lexers/capnproto.py index 0363eca470..202b072706 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/capnproto.py +++ b/contrib/python/Pygments/py3/pygments/lexers/capnproto.py @@ -4,7 +4,7 @@ Lexers for the Cap'n Proto schema language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -18,16 +18,15 @@ __all__ = ['CapnProtoLexer'] class CapnProtoLexer(RegexLexer): """ - For `Cap'n Proto <https://capnproto.org>`_ source. + For Cap'n Proto source. .. versionadded:: 2.2 """ name = 'Cap\'n Proto' + url = 'https://capnproto.org' filenames = ['*.capnp'] aliases = ['capnp'] - flags = re.MULTILINE | re.UNICODE - tokens = { 'root': [ (r'#.*?$', Comment.Single), diff --git a/contrib/python/Pygments/py3/pygments/lexers/cddl.py b/contrib/python/Pygments/py3/pygments/lexers/cddl.py index 5c949802e3..1d29787c1e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/cddl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/cddl.py @@ -8,7 +8,7 @@ More information: https://datatracker.ietf.org/doc/rfc8610/ - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -38,6 +38,7 @@ class CddlLexer(RegexLexer): .. versionadded:: 2.8 """ name = "CDDL" + url = 'https://datatracker.ietf.org/doc/rfc8610/' aliases = ["cddl"] filenames = ["*.cddl"] mimetypes = ["text/x-cddl"] @@ -114,15 +115,13 @@ class CddlLexer(RegexLexer): _re_uint = r"(?:0b[01]+|0x[0-9a-fA-F]+|[1-9]\d*|0(?!\d))" _re_int = r"-?" + _re_uint - flags = re.UNICODE | re.MULTILINE - tokens = { "commentsandwhitespace": [(r"\s+", Whitespace), (r";.+$", Comment.Single)], "root": [ include("commentsandwhitespace"), # tag types (r"#(\d\.{uint})?".format(uint=_re_uint), Keyword.Type), # type or any - # occurence + # occurrence ( r"({uint})?(\*)({uint})?".format(uint=_re_uint), bygroups(Number, Operator, Number), diff --git a/contrib/python/Pygments/py3/pygments/lexers/chapel.py b/contrib/python/Pygments/py3/pygments/lexers/chapel.py index ad25981d8c..908d391edf 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/chapel.py +++ b/contrib/python/Pygments/py3/pygments/lexers/chapel.py @@ -4,7 +4,7 @@ Lexer for the Chapel language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -17,11 +17,12 @@ __all__ = ['ChapelLexer'] class ChapelLexer(RegexLexer): """ - For `Chapel <https://chapel-lang.org/>`_ source. + For Chapel source. .. versionadded:: 2.0 """ name = 'Chapel' + url = 'https://chapel-lang.org/' filenames = ['*.chpl'] aliases = ['chapel', 'chpl'] # mimetypes = ['text/x-chapel'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/clean.py b/contrib/python/Pygments/py3/pygments/lexers/clean.py index 579cf7c30d..ff2bf6f5c0 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/clean.py +++ b/contrib/python/Pygments/py3/pygments/lexers/clean.py @@ -4,7 +4,7 @@ Lexer for the Clean language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -18,11 +18,12 @@ __all__ = ['CleanLexer'] class CleanLexer(ExtendedRegexLexer): """ Lexer for the general purpose, state-of-the-art, pure and lazy functional - programming language Clean (http://clean.cs.ru.nl/Clean). + programming language Clean. .. versionadded: 2.2 """ name = 'Clean' + url = 'http://clean.cs.ru.nl/Clean' aliases = ['clean'] filenames = ['*.icl', '*.dcl'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/compiled.py b/contrib/python/Pygments/py3/pygments/lexers/compiled.py index 13aa39ce2d..40493af4f8 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/compiled.py +++ b/contrib/python/Pygments/py3/pygments/lexers/compiled.py @@ -4,7 +4,7 @@ Just export lexer classes previously contained in this module. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -16,7 +16,8 @@ from pygments.lexers.objective import ObjectiveCLexer, \ from pygments.lexers.go import GoLexer from pygments.lexers.rust import RustLexer from pygments.lexers.c_like import ECLexer, ValaLexer, CudaLexer -from pygments.lexers.pascal import DelphiLexer, Modula2Lexer, AdaLexer +from pygments.lexers.pascal import DelphiLexer, Modula2Lexer +from pygments.lexers.ada import AdaLexer from pygments.lexers.business import CobolLexer, CobolFreeformatLexer from pygments.lexers.fortran import FortranLexer from pygments.lexers.prolog import PrologLexer diff --git a/contrib/python/Pygments/py3/pygments/lexers/configs.py b/contrib/python/Pygments/py3/pygments/lexers/configs.py index 99fab14860..51aefd7795 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/configs.py +++ b/contrib/python/Pygments/py3/pygments/lexers/configs.py @@ -4,7 +4,7 @@ Lexers for configuration file formats. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -22,7 +22,7 @@ __all__ = ['IniLexer', 'RegeditLexer', 'PropertiesLexer', 'KconfigLexer', 'NginxConfLexer', 'LighttpdConfLexer', 'DockerLexer', 'TerraformLexer', 'TermcapLexer', 'TerminfoLexer', 'PkgConfigLexer', 'PacmanConfLexer', 'AugeasLexer', 'TOMLLexer', - 'NestedTextLexer', 'SingularityLexer'] + 'NestedTextLexer', 'SingularityLexer', 'UnixConfigLexer'] class IniLexer(RegexLexer): @@ -62,14 +62,13 @@ class IniLexer(RegexLexer): class RegeditLexer(RegexLexer): """ - Lexer for `Windows Registry - <http://en.wikipedia.org/wiki/Windows_Registry#.REG_files>`_ files produced - by regedit. + Lexer for Windows Registry files produced by regedit. .. versionadded:: 1.6 """ name = 'reg' + url = 'http://en.wikipedia.org/wiki/Windows_Registry#.REG_files' aliases = ['registry'] filenames = ['*.reg'] mimetypes = ['text/x-windows-registry'] @@ -231,12 +230,13 @@ class KconfigLexer(RegexLexer): class Cfengine3Lexer(RegexLexer): """ - Lexer for `CFEngine3 <http://cfengine.org>`_ policy files. + Lexer for CFEngine3 policy files. .. versionadded:: 1.5 """ name = 'CFEngine3' + url = 'http://cfengine.org' aliases = ['cfengine3', 'cf3'] filenames = ['*.cf'] mimetypes = [] @@ -335,12 +335,13 @@ class ApacheConfLexer(RegexLexer): class SquidConfLexer(RegexLexer): """ - Lexer for `squid <http://www.squid-cache.org/>`_ configuration files. + Lexer for squid configuration files. .. versionadded:: 0.9 """ name = 'SquidConf' + url = 'http://www.squid-cache.org/' aliases = ['squidconf', 'squid.conf', 'squid'] filenames = ['squid.conf'] mimetypes = ['text/x-squidconf'] @@ -465,11 +466,12 @@ class SquidConfLexer(RegexLexer): class NginxConfLexer(RegexLexer): """ - Lexer for `Nginx <http://nginx.net/>`_ configuration files. + Lexer for Nginx configuration files. .. versionadded:: 0.11 """ name = 'Nginx configuration file' + url = 'http://nginx.net/' aliases = ['nginx'] filenames = ['nginx.conf'] mimetypes = ['text/x-nginx-conf'] @@ -511,11 +513,12 @@ class NginxConfLexer(RegexLexer): class LighttpdConfLexer(RegexLexer): """ - Lexer for `Lighttpd <http://lighttpd.net/>`_ configuration files. + Lexer for Lighttpd configuration files. .. versionadded:: 0.11 """ name = 'Lighttpd configuration file' + url = 'http://lighttpd.net/' aliases = ['lighttpd', 'lighty'] filenames = ['lighttpd.conf'] mimetypes = ['text/x-lighttpd-conf'] @@ -539,11 +542,12 @@ class LighttpdConfLexer(RegexLexer): class DockerLexer(RegexLexer): """ - Lexer for `Docker <http://docker.io>`_ configuration files. + Lexer for Docker configuration files. .. versionadded:: 2.0 """ name = 'Docker' + url = 'http://docker.io' aliases = ['docker', 'dockerfile'] filenames = ['Dockerfile', '*.docker'] mimetypes = ['text/x-dockerfile-config'] @@ -574,12 +578,13 @@ class DockerLexer(RegexLexer): class TerraformLexer(ExtendedRegexLexer): """ - Lexer for `terraformi .tf files <https://www.terraform.io/>`_. + Lexer for terraformi ``.tf`` files. .. versionadded:: 2.1 """ name = 'Terraform' + url = 'https://www.terraform.io/' aliases = ['terraform', 'tf'] filenames = ['*.tf'] mimetypes = ['application/x-tf', 'application/x-terraform'] @@ -690,7 +695,7 @@ class TerraformLexer(ExtendedRegexLexer): ], 'basic': [ (r'\s*/\*', Comment.Multiline, 'comment'), - (r'\s*#.*\n', Comment.Single), + (r'\s*(#|//).*\n', Comment.Single), include('whitespace'), # e.g. terraform { @@ -715,7 +720,8 @@ class TerraformLexer(ExtendedRegexLexer): # e.g. resource "aws_security_group" "allow_tls" { # e.g. backend "consul" { - (classes_re + r'(\s+)', bygroups(Keyword.Reserved, Whitespace), 'blockname'), + (classes_re + r'(\s+)("[0-9a-zA-Z-_]+")?(\s*)("[0-9a-zA-Z-_]+")(\s+)(\{)', + bygroups(Keyword.Reserved, Whitespace, Name.Class, Whitespace, Name.Variable, Whitespace, Punctuation)), # here-doc style delimited strings ( @@ -723,12 +729,6 @@ class TerraformLexer(ExtendedRegexLexer): heredoc_callback, ) ], - 'blockname': [ - # e.g. resource "aws_security_group" "allow_tls" { - # e.g. backend "consul" { - (r'(\s*)("[0-9a-zA-Z-_]+")?(\s*)("[0-9a-zA-Z-_]+")(\s+)(\{)', - bygroups(Whitespace, Name.Class, Whitespace, Name.Variable, Whitespace, Punctuation)), - ], 'identifier': [ (r'\b(var\.[0-9a-zA-Z-_\.\[\]]+)\b', bygroups(Name.Variable)), (r'\b([0-9a-zA-Z-_\[\]]+\.[0-9a-zA-Z-_\.\[\]]+)\b', bygroups(Name.Variable)), @@ -846,14 +846,14 @@ class TerminfoLexer(RegexLexer): class PkgConfigLexer(RegexLexer): """ - Lexer for `pkg-config - <http://www.freedesktop.org/wiki/Software/pkg-config/>`_ + Lexer for pkg-config (see also `manual page <http://linux.die.net/man/1/pkg-config>`_). .. versionadded:: 2.1 """ name = 'PkgConfig' + url = 'http://www.freedesktop.org/wiki/Software/pkg-config/' aliases = ['pkgconfig'] filenames = ['*.pc'] mimetypes = [] @@ -904,8 +904,7 @@ class PkgConfigLexer(RegexLexer): class PacmanConfLexer(RegexLexer): """ - Lexer for `pacman.conf - <https://www.archlinux.org/pacman/pacman.conf.5.html>`_. + Lexer for pacman.conf. Actually, IniLexer works almost fine for this format, but it yield error token. It is because pacman.conf has @@ -923,6 +922,7 @@ class PacmanConfLexer(RegexLexer): """ name = 'PacmanConf' + url = 'https://www.archlinux.org/pacman/pacman.conf.5.html' aliases = ['pacmanconf'] filenames = ['pacman.conf'] mimetypes = [] @@ -954,7 +954,7 @@ class PacmanConfLexer(RegexLexer): Name.Variable), # fallback - (r'\s+', Whitespace), + (r'\s+', Whitespace), (r'.', Text), ], } @@ -962,11 +962,12 @@ class PacmanConfLexer(RegexLexer): class AugeasLexer(RegexLexer): """ - Lexer for `Augeas <http://augeas.net>`_. + Lexer for Augeas. .. versionadded:: 2.4 """ name = 'Augeas' + url = 'http://augeas.net' aliases = ['augeas'] filenames = ['*.aug'] @@ -1006,13 +1007,14 @@ class AugeasLexer(RegexLexer): class TOMLLexer(RegexLexer): """ - Lexer for `TOML <https://github.com/toml-lang/toml>`_, a simple language + Lexer for TOML, a simple language for config files. .. versionadded:: 2.4 """ name = 'TOML' + url = 'https://github.com/toml-lang/toml' aliases = ['toml'] filenames = ['*.toml', 'Pipfile', 'poetry.lock'] @@ -1057,13 +1059,14 @@ class TOMLLexer(RegexLexer): class NestedTextLexer(RegexLexer): """ - Lexer for `NextedText <https://nestedtext.org>`_, a human-friendly data + Lexer for NextedText, a human-friendly data format. - + .. versionadded:: 2.9 """ name = 'NestedText' + url = 'https://nestedtext.org' aliases = ['nestedtext', 'nt'] filenames = ['*.nt'] @@ -1079,17 +1082,17 @@ class NestedTextLexer(RegexLexer): (r'^(\s*)(.*?)(:)( ?)(.*?)(\s*)$', bygroups(Whitespace, Name, Punctuation, Whitespace, String, Whitespace)), ], } - + class SingularityLexer(RegexLexer): """ - Lexer for `Singularity definition files - <https://www.sylabs.io/guides/3.0/user-guide/definition_files.html>`_. + Lexer for Singularity definition files. .. versionadded:: 2.6 """ name = 'Singularity' + url = 'https://www.sylabs.io/guides/3.0/user-guide/definition_files.html' aliases = ['singularity'] filenames = ['*.def', 'Singularity'] flags = re.IGNORECASE | re.MULTILINE | re.DOTALL @@ -1124,3 +1127,30 @@ class SingularityLexer(RegexLexer): result += 0.49 return result + + +class UnixConfigLexer(RegexLexer): + """ + Lexer for Unix/Linux config files using colon-separated values, e.g. + + * ``/etc/group`` + * ``/etc/passwd`` + * ``/etc/shadow`` + + .. versionadded:: 2.12 + """ + + name = 'Unix/Linux config files' + aliases = ['unixconfig', 'linuxconfig'] + filenames = [] + + tokens = { + 'root': [ + (r'^#.*', Comment), + (r'\n', Whitespace), + (r':', Punctuation), + (r'[0-9]+', Number), + (r'((?!\n)[a-zA-Z0-9\_\-\s\(\),]){2,}', Text), + (r'[^:\n]+', String), + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/console.py b/contrib/python/Pygments/py3/pygments/lexers/console.py index 5d7fea78f5..d4c0f0e373 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/console.py +++ b/contrib/python/Pygments/py3/pygments/lexers/console.py @@ -4,7 +4,7 @@ Lexers for misc console output. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/cplint.py b/contrib/python/Pygments/py3/pygments/lexers/cplint.py new file mode 100644 index 0000000000..5c10885f61 --- /dev/null +++ b/contrib/python/Pygments/py3/pygments/lexers/cplint.py @@ -0,0 +1,47 @@ +""" + pygments.lexers.cplint + ~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for the cplint language + + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import bygroups, inherit, words +from pygments.lexers import PrologLexer +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation + +__all__ = ['CplintLexer'] + + +class CplintLexer(PrologLexer): + """ + Lexer for cplint files, including CP-logic, Logic Programs with Annotated Disjunctions, + Distributional Clauses syntax, ProbLog, DTProbLog + + .. versionadded:: 2.12 + """ + name = 'cplint' + url = 'https://cplint.eu' + aliases = ['cplint'] + filenames = ['*.ecl', '*.prolog', '*.pro', '*.pl', '*.P', '*.lpad', '*.cpl'] + mimetypes = ['text/x-cplint'] + + tokens = { + 'root': [ + (r'map_query',Keyword), + (words(('gaussian','uniform_dens','dirichlet','gamma','beta','poisson','binomial','geometric', + 'exponential','pascal','multinomial','user','val', + 'uniform','discrete','finite')),Name.Builtin), + (r'([a-z]+)(:)', bygroups(String.Atom, Punctuation)), # annotations of atoms + (r':(-|=)|::?|~=?|=>', Operator), + (r'\?', Name.Builtin), + inherit, + ], + } + + diff --git a/contrib/python/Pygments/py3/pygments/lexers/crystal.py b/contrib/python/Pygments/py3/pygments/lexers/crystal.py index d06ab0c060..7154a9b69e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/crystal.py +++ b/contrib/python/Pygments/py3/pygments/lexers/crystal.py @@ -4,7 +4,7 @@ Lexer for Crystal. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -28,12 +28,13 @@ CRYSTAL_OPERATORS = [ class CrystalLexer(ExtendedRegexLexer): """ - For `Crystal <http://crystal-lang.org>`_ source code. + For Crystal source code. .. versionadded:: 2.2 """ name = 'Crystal' + url = 'http://crystal-lang.org' aliases = ['cr', 'crystal'] filenames = ['*.cr'] mimetypes = ['text/x-crystal'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/csound.py b/contrib/python/Pygments/py3/pygments/lexers/csound.py index a871de8d72..eddc834e78 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/csound.py +++ b/contrib/python/Pygments/py3/pygments/lexers/csound.py @@ -4,7 +4,7 @@ Lexers for Csound languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -24,6 +24,8 @@ newline = (r'((?:(?:;|//).*)*)(\n)', bygroups(Comment.Single, Text)) class CsoundLexer(RegexLexer): + url = 'https://csound.com/' + tokens = { 'whitespace': [ (r'[ \t]+', Whitespace), diff --git a/contrib/python/Pygments/py3/pygments/lexers/css.py b/contrib/python/Pygments/py3/pygments/lexers/css.py index 4b284cc8fa..9cbd0d33ac 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/css.py +++ b/contrib/python/Pygments/py3/pygments/lexers/css.py @@ -4,7 +4,7 @@ Lexers for CSS and related stylesheet formats. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -15,6 +15,7 @@ from pygments.lexer import ExtendedRegexLexer, RegexLexer, include, bygroups, \ default, words, inherit from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ Number, Punctuation, Whitespace +from pygments.lexers._css_builtins import _css_properties __all__ = ['CssLexer', 'SassLexer', 'ScssLexer', 'LessCssLexer'] @@ -26,102 +27,38 @@ _vendor_prefixes = ( '-webkit-', 'prince-', '-ah-', '-hp-', '-ro-', '-rim-', '-tc-', ) -# List of CSS properties obtained from: -# https://www.w3.org/Style/CSS/all-properties.en.html -# Note: handle --* separately -_css_properties = ( - 'align-content', 'align-items', 'align-self', 'alignment-baseline', 'all', - 'animation', 'animation-delay', 'animation-direction', - 'animation-duration', 'animation-fill-mode', 'animation-iteration-count', - 'animation-name', 'animation-play-state', 'animation-timing-function', - 'appearance', 'azimuth', 'backface-visibility', 'background', - 'background-attachment', 'background-blend-mode', 'background-clip', - 'background-color', 'background-image', 'background-origin', - 'background-position', 'background-repeat', 'background-size', - 'baseline-shift', 'bookmark-label', 'bookmark-level', 'bookmark-state', - 'border', 'border-bottom', 'border-bottom-color', - 'border-bottom-left-radius', 'border-bottom-right-radius', - 'border-bottom-style', 'border-bottom-width', 'border-boundary', - 'border-collapse', 'border-color', 'border-image', 'border-image-outset', - 'border-image-repeat', 'border-image-slice', 'border-image-source', - 'border-image-width', 'border-left', 'border-left-color', - 'border-left-style', 'border-left-width', 'border-radius', 'border-right', - 'border-right-color', 'border-right-style', 'border-right-width', - 'border-spacing', 'border-style', 'border-top', 'border-top-color', - 'border-top-left-radius', 'border-top-right-radius', 'border-top-style', - 'border-top-width', 'border-width', 'bottom', 'box-decoration-break', - 'box-shadow', 'box-sizing', 'box-snap', 'box-suppress', 'break-after', - 'break-before', 'break-inside', 'caption-side', 'caret', 'caret-animation', - 'caret-color', 'caret-shape', 'chains', 'clear', 'clip', 'clip-path', - 'clip-rule', 'color', 'color-interpolation-filters', 'column-count', - 'column-fill', 'column-gap', 'column-rule', 'column-rule-color', - 'column-rule-style', 'column-rule-width', 'column-span', 'column-width', - 'columns', 'content', 'counter-increment', 'counter-reset', 'counter-set', - 'crop', 'cue', 'cue-after', 'cue-before', 'cursor', 'direction', 'display', - 'dominant-baseline', 'elevation', 'empty-cells', 'filter', 'flex', - 'flex-basis', 'flex-direction', 'flex-flow', 'flex-grow', 'flex-shrink', - 'flex-wrap', 'float', 'float-defer', 'float-offset', 'float-reference', - 'flood-color', 'flood-opacity', 'flow', 'flow-from', 'flow-into', 'font', - 'font-family', 'font-feature-settings', 'font-kerning', - 'font-language-override', 'font-size', 'font-size-adjust', 'font-stretch', - 'font-style', 'font-synthesis', 'font-variant', 'font-variant-alternates', - 'font-variant-caps', 'font-variant-east-asian', 'font-variant-ligatures', - 'font-variant-numeric', 'font-variant-position', 'font-weight', - 'footnote-display', 'footnote-policy', 'glyph-orientation-vertical', - 'grid', 'grid-area', 'grid-auto-columns', 'grid-auto-flow', - 'grid-auto-rows', 'grid-column', 'grid-column-end', 'grid-column-gap', - 'grid-column-start', 'grid-gap', 'grid-row', 'grid-row-end', - 'grid-row-gap', 'grid-row-start', 'grid-template', 'grid-template-areas', - 'grid-template-columns', 'grid-template-rows', 'hanging-punctuation', - 'height', 'hyphenate-character', 'hyphenate-limit-chars', - 'hyphenate-limit-last', 'hyphenate-limit-lines', 'hyphenate-limit-zone', - 'hyphens', 'image-orientation', 'image-resolution', 'initial-letter', - 'initial-letter-align', 'initial-letter-wrap', 'isolation', - 'justify-content', 'justify-items', 'justify-self', 'left', - 'letter-spacing', 'lighting-color', 'line-break', 'line-grid', - 'line-height', 'line-snap', 'list-style', 'list-style-image', - 'list-style-position', 'list-style-type', 'margin', 'margin-bottom', - 'margin-left', 'margin-right', 'margin-top', 'marker-side', - 'marquee-direction', 'marquee-loop', 'marquee-speed', 'marquee-style', - 'mask', 'mask-border', 'mask-border-mode', 'mask-border-outset', - 'mask-border-repeat', 'mask-border-slice', 'mask-border-source', - 'mask-border-width', 'mask-clip', 'mask-composite', 'mask-image', - 'mask-mode', 'mask-origin', 'mask-position', 'mask-repeat', 'mask-size', - 'mask-type', 'max-height', 'max-lines', 'max-width', 'min-height', - 'min-width', 'mix-blend-mode', 'motion', 'motion-offset', 'motion-path', - 'motion-rotation', 'move-to', 'nav-down', 'nav-left', 'nav-right', - 'nav-up', 'object-fit', 'object-position', 'offset-after', 'offset-before', - 'offset-end', 'offset-start', 'opacity', 'order', 'orphans', 'outline', - 'outline-color', 'outline-offset', 'outline-style', 'outline-width', - 'overflow', 'overflow-style', 'overflow-wrap', 'overflow-x', 'overflow-y', - 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', - 'page', 'page-break-after', 'page-break-before', 'page-break-inside', - 'page-policy', 'pause', 'pause-after', 'pause-before', 'perspective', - 'perspective-origin', 'pitch', 'pitch-range', 'play-during', 'polar-angle', - 'polar-distance', 'position', 'presentation-level', 'quotes', - 'region-fragment', 'resize', 'rest', 'rest-after', 'rest-before', - 'richness', 'right', 'rotation', 'rotation-point', 'ruby-align', - 'ruby-merge', 'ruby-position', 'running', 'scroll-snap-coordinate', - 'scroll-snap-destination', 'scroll-snap-points-x', 'scroll-snap-points-y', - 'scroll-snap-type', 'shape-image-threshold', 'shape-inside', 'shape-margin', - 'shape-outside', 'size', 'speak', 'speak-as', 'speak-header', - 'speak-numeral', 'speak-punctuation', 'speech-rate', 'stress', 'string-set', - 'tab-size', 'table-layout', 'text-align', 'text-align-last', - 'text-combine-upright', 'text-decoration', 'text-decoration-color', - 'text-decoration-line', 'text-decoration-skip', 'text-decoration-style', - 'text-emphasis', 'text-emphasis-color', 'text-emphasis-position', - 'text-emphasis-style', 'text-indent', 'text-justify', 'text-orientation', - 'text-overflow', 'text-shadow', 'text-space-collapse', 'text-space-trim', - 'text-spacing', 'text-transform', 'text-underline-position', 'text-wrap', - 'top', 'transform', 'transform-origin', 'transform-style', 'transition', - 'transition-delay', 'transition-duration', 'transition-property', - 'transition-timing-function', 'unicode-bidi', 'user-select', - 'vertical-align', 'visibility', 'voice-balance', 'voice-duration', - 'voice-family', 'voice-pitch', 'voice-range', 'voice-rate', 'voice-stress', - 'voice-volume', 'volume', 'white-space', 'widows', 'width', 'will-change', - 'word-break', 'word-spacing', 'word-wrap', 'wrap-after', 'wrap-before', - 'wrap-flow', 'wrap-inside', 'wrap-through', 'writing-mode', 'z-index', -) +# List of extended color keywords obtained from: +# https://drafts.csswg.org/css-color/#named-colors +_color_keywords = ( + 'aliceblue', 'antiquewhite', 'aqua', 'aquamarine', 'azure', 'beige', + 'bisque', 'black', 'blanchedalmond', 'blue', 'blueviolet', 'brown', + 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', + 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', + 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', + 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', + 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', + 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', + 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', + 'forestgreen', 'fuchsia', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', + 'gray', 'green', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', + 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', + 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', + 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', + 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', + 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', + 'lime', 'limegreen', 'linen', 'magenta', 'maroon', 'mediumaquamarine', + 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', + 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', + 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', + 'navajowhite', 'navy', 'oldlace', 'olive', 'olivedrab', 'orange', + 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', + 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', + 'powderblue', 'purple', 'rebeccapurple', 'red', 'rosybrown', 'royalblue', + 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', + 'silver', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', + 'springgreen', 'steelblue', 'tan', 'teal', 'thistle', 'tomato', 'turquoise', + 'violet', 'wheat', 'white', 'whitesmoke', 'yellow', 'yellowgreen', +) + ('transparent',) # List of keyword values obtained from: # http://cssvalues.com/ @@ -179,39 +116,6 @@ _keyword_values = ( 'x-small', 'xx-large', 'xx-small', 'zoom-in', 'zoom-out', ) -# List of extended color keywords obtained from: -# https://drafts.csswg.org/css-color/#named-colors -_color_keywords = ( - 'aliceblue', 'antiquewhite', 'aqua', 'aquamarine', 'azure', 'beige', - 'bisque', 'black', 'blanchedalmond', 'blue', 'blueviolet', 'brown', - 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', - 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', - 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', - 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', - 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', - 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', - 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', - 'forestgreen', 'fuchsia', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', - 'gray', 'green', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', - 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', - 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', - 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', - 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', - 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', - 'lime', 'limegreen', 'linen', 'magenta', 'maroon', 'mediumaquamarine', - 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', - 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', - 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', - 'navajowhite', 'navy', 'oldlace', 'olive', 'olivedrab', 'orange', - 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', - 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', - 'powderblue', 'purple', 'rebeccapurple', 'red', 'rosybrown', 'royalblue', - 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', - 'silver', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', - 'springgreen', 'steelblue', 'tan', 'teal', 'thistle', 'tomato', 'turquoise', - 'violet', 'wheat', 'white', 'whitesmoke', 'yellow', 'yellowgreen', -) + ('transparent',) - # List of other keyword values from other sources: _other_keyword_values = ( 'above', 'aural', 'behind', 'bidi-override', 'center-left', 'center-right', @@ -270,6 +174,7 @@ class CssLexer(RegexLexer): """ name = 'CSS' + url = 'https://www.w3.org/TR/CSS/#css' aliases = ['css'] filenames = ['*.css'] mimetypes = ['text/css'] @@ -545,6 +450,7 @@ class SassLexer(ExtendedRegexLexer): """ name = 'Sass' + url = 'https://sass-lang.com/' aliases = ['sass'] filenames = ['*.sass'] mimetypes = ['text/x-sass'] @@ -625,6 +531,7 @@ class ScssLexer(RegexLexer): """ name = 'SCSS' + url = 'https://sass-lang.com/' aliases = ['scss'] filenames = ['*.scss'] mimetypes = ['text/x-scss'] @@ -671,12 +578,13 @@ class ScssLexer(RegexLexer): class LessCssLexer(CssLexer): """ - For `LESS <http://lesscss.org/>`_ styleshets. + For LESS styleshets. .. versionadded:: 2.1 """ name = 'LessCss' + url = 'http://lesscss.org/' aliases = ['less'] filenames = ['*.less'] mimetypes = ['text/x-less-css'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/d.py b/contrib/python/Pygments/py3/pygments/lexers/d.py index 7844de550f..672ffd3ee9 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/d.py +++ b/contrib/python/Pygments/py3/pygments/lexers/d.py @@ -4,7 +4,7 @@ Lexers for D languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -22,6 +22,7 @@ class DLexer(RegexLexer): .. versionadded:: 1.2 """ name = 'D' + url = 'https://dlang.org/' filenames = ['*.d', '*.di'] aliases = ['d'] mimetypes = ['text/x-dsrc'] @@ -186,9 +187,10 @@ class DLexer(RegexLexer): class CrocLexer(RegexLexer): """ - For `Croc <http://jfbillingsley.com/croc>`_ source. + For Croc source. """ name = 'Croc' + url = 'http://jfbillingsley.com/croc' filenames = ['*.croc'] aliases = ['croc'] mimetypes = ['text/x-crocsrc'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/dalvik.py b/contrib/python/Pygments/py3/pygments/lexers/dalvik.py index 6d9fb5464e..11cc230d18 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/dalvik.py +++ b/contrib/python/Pygments/py3/pygments/lexers/dalvik.py @@ -4,7 +4,7 @@ Pygments lexers for Dalvik VM-related languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -19,12 +19,13 @@ __all__ = ['SmaliLexer'] class SmaliLexer(RegexLexer): """ - For `Smali <http://code.google.com/p/smali/>`_ (Android/Dalvik) assembly + For Smali (Android/Dalvik) assembly code. .. versionadded:: 1.6 """ name = 'Smali' + url = 'http://code.google.com/p/smali/' aliases = ['smali'] filenames = ['*.smali'] mimetypes = ['text/smali'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/data.py b/contrib/python/Pygments/py3/pygments/lexers/data.py index c702d42093..e7d0a8436d 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/data.py +++ b/contrib/python/Pygments/py3/pygments/lexers/data.py @@ -4,14 +4,14 @@ Lexers for data file format. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import Lexer, ExtendedRegexLexer, LexerContext, \ include, bygroups -from pygments.token import Text, Comment, Keyword, Name, String, Number, \ - Punctuation, Literal, Error, Whitespace +from pygments.token import Comment, Error, Keyword, Literal, Name, Number, \ + Punctuation, String, Whitespace __all__ = ['YamlLexer', 'JsonLexer', 'JsonBareObjectLexer', 'JsonLdLexer'] @@ -29,13 +29,14 @@ class YamlLexerContext(LexerContext): class YamlLexer(ExtendedRegexLexer): """ - Lexer for `YAML <http://yaml.org/>`_, a human-friendly data serialization + Lexer for YAML, a human-friendly data serialization language. .. versionadded:: 0.11 """ name = 'YAML' + url = 'http://yaml.org/' aliases = ['yaml'] filenames = ['*.yaml', '*.yml'] mimetypes = ['text/x-yaml'] @@ -437,10 +438,17 @@ class JsonLexer(Lexer): """ For JSON data structures. + Javascript-style comments are supported (like ``/* */`` and ``//``), + though comments are not part of the JSON specification. + This allows users to highlight JSON as it is used in the wild. + + No validation is performed on the input JSON document. + .. versionadded:: 1.5 """ name = 'JSON' + url = 'https://www.json.org' aliases = ['json', 'json-object'] filenames = ['*.json', 'Pipfile.lock'] mimetypes = ['application/json', 'application/json-object'] @@ -471,6 +479,10 @@ class JsonLexer(Lexer): in_number = False in_float = False in_punctuation = False + in_comment_single = False + in_comment_multiline = False + expecting_second_comment_opener = False # // or /* + expecting_second_comment_closer = False # */ start = 0 @@ -564,6 +576,49 @@ class JsonLexer(Lexer): in_punctuation = False # Fall through so the new character can be evaluated. + elif in_comment_single: + if character != '\n': + continue + + if queue: + queue.append((start, Comment.Single, text[start:stop])) + else: + yield start, Comment.Single, text[start:stop] + + in_comment_single = False + # Fall through so the new character can be evaluated. + + elif in_comment_multiline: + if character == '*': + expecting_second_comment_closer = True + elif expecting_second_comment_closer: + expecting_second_comment_closer = False + if character == '/': + if queue: + queue.append((start, Comment.Multiline, text[start:stop + 1])) + else: + yield start, Comment.Multiline, text[start:stop + 1] + + in_comment_multiline = False + + continue + + elif expecting_second_comment_opener: + expecting_second_comment_opener = False + if character == '/': + in_comment_single = True + continue + elif character == '*': + in_comment_multiline = True + continue + + # Exhaust the queue. Accept the existing token types. + yield from queue + queue.clear() + + yield start, Error, text[start:stop] + # Fall through so the new character can be evaluated. + start = stop if character == '"': @@ -589,18 +644,18 @@ class JsonLexer(Lexer): elif character == ':': # Yield from the queue. Replace string token types. for _start, _token, _text in queue: - # There can be only two types of tokens before a ':': - # Whitespace, or a quoted string. If it's a quoted string - # we emit Name.Tag, otherwise, we yield the whitespace - # tokens. In all other cases this is invalid JSON. This - # allows for things like '"foo" "bar": "baz"' but we're not - # a validating JSON lexer so it's acceptable - if _token is Whitespace: - yield _start, _token, _text - elif _token is String.Double: + # There can be only three types of tokens before a ':': + # Whitespace, Comment, or a quoted string. + # + # If it's a quoted string we emit Name.Tag. + # Otherwise, we yield the original token. + # + # In all other cases this would be invalid JSON, + # but this is not a validating JSON lexer, so it's OK. + if _token is String.Double: yield _start, Name.Tag, _text else: - yield _start, Error, _text + yield _start, _token, _text queue.clear() in_punctuation = True @@ -612,6 +667,10 @@ class JsonLexer(Lexer): in_punctuation = True + elif character == '/': + # This is the beginning of a comment. + expecting_second_comment_opener = True + else: # Exhaust the queue. Accept the existing token types. yield from queue @@ -633,6 +692,12 @@ class JsonLexer(Lexer): yield start, Whitespace, text[start:] elif in_punctuation: yield start, Punctuation, text[start:] + elif in_comment_single: + yield start, Comment.Single, text[start:] + elif in_comment_multiline: + yield start, Error, text[start:] + elif expecting_second_comment_opener: + yield start, Error, text[start:] class JsonBareObjectLexer(JsonLexer): @@ -654,12 +719,13 @@ class JsonBareObjectLexer(JsonLexer): class JsonLdLexer(JsonLexer): """ - For `JSON-LD <https://json-ld.org/>`_ linked data. + For JSON-LD linked data. .. versionadded:: 2.0 """ name = 'JSON-LD' + url = 'https://json-ld.org/' aliases = ['jsonld', 'json-ld'] filenames = ['*.jsonld'] mimetypes = ['application/ld+json'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/devicetree.py b/contrib/python/Pygments/py3/pygments/lexers/devicetree.py index cb25a330fd..15b72ae716 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/devicetree.py +++ b/contrib/python/Pygments/py3/pygments/lexers/devicetree.py @@ -4,7 +4,7 @@ Lexers for Devicetree language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -17,12 +17,13 @@ __all__ = ['DevicetreeLexer'] class DevicetreeLexer(RegexLexer): """ - Lexer for `Devicetree <https://www.devicetree.org/>`_ files. + Lexer for Devicetree files. .. versionadded:: 2.7 """ name = 'Devicetree' + url = 'https://www.devicetree.org/' aliases = ['devicetree', 'dts'] filenames = ['*.dts', '*.dtsi'] mimetypes = ['text/x-c'] @@ -51,7 +52,7 @@ class DevicetreeLexer(RegexLexer): (r'\\\n', Text), # line continuation (r'//(\n|[\w\W]*?[^\\]\n)', Comment.Single), (r'/(\\\n)?[*][\w\W]*?[*](\\\n)?/', Comment.Multiline), - # Open until EOF, so no ending delimeter + # Open until EOF, so no ending delimiter (r'/(\\\n)?[*][\w\W]*', Comment.Multiline), ], 'statements': [ diff --git a/contrib/python/Pygments/py3/pygments/lexers/diff.py b/contrib/python/Pygments/py3/pygments/lexers/diff.py index a694bd68e6..6a7ba2f3aa 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/diff.py +++ b/contrib/python/Pygments/py3/pygments/lexers/diff.py @@ -4,7 +4,7 @@ Lexers for diff/patch formats. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -109,7 +109,7 @@ class DarcsPatchLexer(RegexLexer): class WDiffLexer(RegexLexer): """ - A `wdiff <https://www.gnu.org/software/wdiff/>`_ lexer. + A wdiff lexer. Note that: @@ -121,6 +121,7 @@ class WDiffLexer(RegexLexer): """ name = 'WDiff' + url = 'https://www.gnu.org/software/wdiff/' aliases = ['wdiff'] filenames = ['*.wdiff'] mimetypes = [] diff --git a/contrib/python/Pygments/py3/pygments/lexers/dotnet.py b/contrib/python/Pygments/py3/pygments/lexers/dotnet.py index c04d2a0a92..751fdae3aa 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/dotnet.py +++ b/contrib/python/Pygments/py3/pygments/lexers/dotnet.py @@ -4,7 +4,7 @@ Lexers for .net languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re @@ -24,8 +24,7 @@ __all__ = ['CSharpLexer', 'NemerleLexer', 'BooLexer', 'VbNetLexer', class CSharpLexer(RegexLexer): """ - For `C# <http://msdn2.microsoft.com/en-us/vcsharp/default.aspx>`_ - source code. + For C# source code. Additional options accepted: @@ -47,11 +46,12 @@ class CSharpLexer(RegexLexer): """ name = 'C#' + url = 'https://docs.microsoft.com/en-us/dotnet/csharp/' aliases = ['csharp', 'c#', 'cs'] filenames = ['*.cs'] mimetypes = ['text/x-csharp'] # inferred - flags = re.MULTILINE | re.DOTALL | re.UNICODE + flags = re.MULTILINE | re.DOTALL # for the range of allowed unicode characters in identifiers, see # http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf @@ -77,7 +77,7 @@ class CSharpLexer(RegexLexer): (r'^([ \t]*)((?:' + cs_ident + r'(?:\[\])?\s+)+?)' # return type r'(' + cs_ident + ')' # method name r'(\s*)(\()', # signature start - bygroups(Whitespace, using(this), Name.Function, Whitespace, + bygroups(Whitespace, using(this), Name.Function, Whitespace, Punctuation)), (r'^(\s*)(\[.*?\])', bygroups(Whitespace, Name.Attribute)), (r'[^\S\n]+', Whitespace), @@ -94,7 +94,7 @@ class CSharpLexer(RegexLexer): r"[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?", Number), (r'(#)([ \t]*)(if|endif|else|elif|define|undef|' r'line|error|warning|region|endregion|pragma)\b(.*?)(\n)', - bygroups(Comment.Preproc, Whitespace, Comment.Preproc, + bygroups(Comment.Preproc, Whitespace, Comment.Preproc, Comment.Preproc, Whitespace)), (r'\b(extern)(\s+)(alias)\b', bygroups(Keyword, Whitespace, Keyword)), @@ -140,7 +140,7 @@ class CSharpLexer(RegexLexer): class NemerleLexer(RegexLexer): """ - For `Nemerle <http://nemerle.org>`_ source code. + For Nemerle source code. Additional options accepted: @@ -162,11 +162,12 @@ class NemerleLexer(RegexLexer): """ name = 'Nemerle' + url = 'http://nemerle.org' aliases = ['nemerle'] filenames = ['*.n'] mimetypes = ['text/x-nemerle'] # inferred - flags = re.MULTILINE | re.DOTALL | re.UNICODE + flags = re.MULTILINE | re.DOTALL # for the range of allowed unicode characters in identifiers, see # http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf @@ -206,7 +207,7 @@ class NemerleLexer(RegexLexer): 'splice-string2'), (r'<#', String, 'recursive-string'), - (r'(<\[)(\s*)(' + cs_ident + ':)?', bygroups(Keyword, + (r'(<\[)(\s*)(' + cs_ident + ':)?', bygroups(Keyword, Whitespace, Keyword)), (r'\]\>', Keyword), @@ -317,10 +318,11 @@ class NemerleLexer(RegexLexer): class BooLexer(RegexLexer): """ - For `Boo <http://boo.codehaus.org/>`_ source code. + For Boo source code. """ name = 'Boo' + url = 'https://github.com/boo-lang/boo' aliases = ['boo'] filenames = ['*.boo'] mimetypes = ['text/x-boo'] @@ -384,12 +386,11 @@ class BooLexer(RegexLexer): class VbNetLexer(RegexLexer): """ - For - `Visual Basic.NET <http://msdn2.microsoft.com/en-us/vbasic/default.aspx>`_ - source code. + For Visual Basic.NET source code. """ name = 'VB.net' + url = 'https://docs.microsoft.com/en-us/dotnet/visual-basic/' aliases = ['vb.net', 'vbnet'] filenames = ['*.vb', '*.bas'] mimetypes = ['text/x-vbnet', 'text/x-vba'] # (?) @@ -559,12 +560,13 @@ class VbNetAspxLexer(DelegatingLexer): # Very close to functional.OcamlLexer class FSharpLexer(RegexLexer): """ - For the `F# language <https://fsharp.org/>`_ (version 3.0). + For the F# language (version 3.0). .. versionadded:: 1.5 """ name = 'F#' + url= 'https://fsharp.org/' aliases = ['fsharp', 'f#'] filenames = ['*.fs', '*.fsi'] mimetypes = ['text/x-fsharp'] @@ -645,7 +647,7 @@ class FSharpLexer(RegexLexer): (r'\b(%s)\b' % '|'.join(word_operators), Operator.Word), (r'\b(%s)\b' % '|'.join(primitives), Keyword.Type), (r'(#)([ \t]*)(if|endif|else|line|nowarn|light|\d+)\b(.*?)(\n)', - bygroups(Comment.Preproc, Whitespace, Comment.Preproc, + bygroups(Comment.Preproc, Whitespace, Comment.Preproc, Comment.Preproc, Whitespace)), (r"[^\W\d][\w']*", Name), diff --git a/contrib/python/Pygments/py3/pygments/lexers/dsls.py b/contrib/python/Pygments/py3/pygments/lexers/dsls.py index b6847d0447..0b51341a81 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/dsls.py +++ b/contrib/python/Pygments/py3/pygments/lexers/dsls.py @@ -4,7 +4,7 @@ Lexers for various domain-specific languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -22,13 +22,13 @@ __all__ = ['ProtoBufLexer', 'ZeekLexer', 'PuppetLexer', 'RslLexer', class ProtoBufLexer(RegexLexer): """ - Lexer for `Protocol Buffer <http://code.google.com/p/protobuf/>`_ - definition files. + Lexer for Protocol Buffer definition files. .. versionadded:: 1.4 """ name = 'Protocol Buffer' + url = 'https://developers.google.com/protocol-buffers/' aliases = ['protobuf', 'proto'] filenames = ['*.proto'] @@ -84,11 +84,12 @@ class ProtoBufLexer(RegexLexer): class ThriftLexer(RegexLexer): """ - For `Thrift <https://thrift.apache.org/>`__ interface definitions. + For Thrift interface definitions. .. versionadded:: 2.1 """ name = 'Thrift' + url = 'https://thrift.apache.org/' aliases = ['thrift'] filenames = ['*.thrift'] mimetypes = ['application/x-thrift'] @@ -189,11 +190,12 @@ class ThriftLexer(RegexLexer): class ZeekLexer(RegexLexer): """ - For `Zeek <https://www.zeek.org/>`_ scripts. + For Zeek scripts. .. versionadded:: 2.5 """ name = 'Zeek' + url = 'https://www.zeek.org/' aliases = ['zeek', 'bro'] filenames = ['*.zeek', '*.bro'] @@ -350,11 +352,12 @@ BroLexer = ZeekLexer class PuppetLexer(RegexLexer): """ - For `Puppet <http://puppetlabs.com/>`__ configuration DSL. + For Puppet configuration DSL. .. versionadded:: 1.6 """ name = 'Puppet' + url = 'https://puppet.com/' aliases = ['puppet'] filenames = ['*.pp'] @@ -437,13 +440,14 @@ class PuppetLexer(RegexLexer): class RslLexer(RegexLexer): """ - `RSL <http://en.wikipedia.org/wiki/RAISE>`_ is the formal specification + RSL is the formal specification language used in RAISE (Rigorous Approach to Industrial Software Engineering) method. .. versionadded:: 2.0 """ name = 'RSL' + url = 'http://en.wikipedia.org/wiki/RAISE' aliases = ['rsl'] filenames = ['*.rsl'] mimetypes = ['text/rsl'] @@ -500,11 +504,12 @@ class RslLexer(RegexLexer): class MscgenLexer(RegexLexer): """ - For `Mscgen <http://www.mcternan.me.uk/mscgen/>`_ files. + For Mscgen files. .. versionadded:: 1.6 """ name = 'Mscgen' + url = 'http://www.mcternan.me.uk/mscgen/' aliases = ['mscgen', 'msc'] filenames = ['*.msc'] @@ -549,12 +554,12 @@ class MscgenLexer(RegexLexer): class VGLLexer(RegexLexer): """ - For `SampleManager VGL <http://www.thermoscientific.com/samplemanager>`_ - source code. + For SampleManager VGL source code. .. versionadded:: 1.6 """ name = 'VGL' + url = 'http://www.thermoscientific.com/samplemanager' aliases = ['vgl'] filenames = ['*.rpf'] @@ -583,12 +588,13 @@ class VGLLexer(RegexLexer): class AlloyLexer(RegexLexer): """ - For `Alloy <http://alloy.mit.edu>`_ source code. + For Alloy source code. .. versionadded:: 2.0 """ name = 'Alloy' + url = 'http://alloy.mit.edu' aliases = ['alloy'] filenames = ['*.als'] mimetypes = ['text/x-alloy'] @@ -643,7 +649,7 @@ class AlloyLexer(RegexLexer): class PanLexer(RegexLexer): """ - Lexer for `pan <https://github.com/quattor/pan/>`_ source files. + Lexer for pan source files. Based on tcsh lexer. @@ -651,6 +657,7 @@ class PanLexer(RegexLexer): """ name = 'Pan' + url = 'https://github.com/quattor/pan/' aliases = ['pan'] filenames = ['*.pan'] @@ -711,12 +718,12 @@ class PanLexer(RegexLexer): class CrmshLexer(RegexLexer): """ - Lexer for `crmsh <http://crmsh.github.io/>`_ configuration files - for Pacemaker clusters. + Lexer for crmsh configuration files for Pacemaker clusters. .. versionadded:: 2.1 """ name = 'Crmsh' + url = 'http://crmsh.github.io/' aliases = ['crmsh', 'pcmk'] filenames = ['*.crmsh', '*.pcmk'] mimetypes = [] @@ -781,11 +788,12 @@ class CrmshLexer(RegexLexer): class FlatlineLexer(RegexLexer): """ - Lexer for `Flatline <https://github.com/bigmlcom/flatline>`_ expressions. + Lexer for Flatline expressions. .. versionadded:: 2.2 """ name = 'Flatline' + url = 'https://github.com/bigmlcom/flatline' aliases = ['flatline'] filenames = [] mimetypes = ['text/x-flatline'] @@ -857,12 +865,13 @@ class FlatlineLexer(RegexLexer): class SnowballLexer(ExtendedRegexLexer): """ - Lexer for `Snowball <http://snowballstem.org/>`_ source code. + Lexer for Snowball source code. .. versionadded:: 2.2 """ name = 'Snowball' + url = 'http://snowballstem.org/' aliases = ['snowball'] filenames = ['*.sbl'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/dylan.py b/contrib/python/Pygments/py3/pygments/lexers/dylan.py index 74f81191dc..38ddfb4a91 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/dylan.py +++ b/contrib/python/Pygments/py3/pygments/lexers/dylan.py @@ -4,7 +4,7 @@ Lexers for the Dylan language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -19,12 +19,13 @@ __all__ = ['DylanLexer', 'DylanConsoleLexer', 'DylanLidLexer'] class DylanLexer(RegexLexer): """ - For the `Dylan <http://www.opendylan.org/>`_ language. + For the Dylan language. .. versionadded:: 0.7 """ name = 'Dylan' + url = 'http://www.opendylan.org/' aliases = ['dylan'] filenames = ['*.dylan', '*.dyl', '*.intr'] mimetypes = ['text/x-dylan'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/ecl.py b/contrib/python/Pygments/py3/pygments/lexers/ecl.py index 47cad2220c..7fa243a0b2 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ecl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ecl.py @@ -4,7 +4,7 @@ Lexers for the ECL language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -19,14 +19,13 @@ __all__ = ['ECLLexer'] class ECLLexer(RegexLexer): """ - Lexer for the declarative big-data `ECL - <https://hpccsystems.com/training/documentation/ecl-language-reference/html>`_ - language. + Lexer for the declarative big-data ECL language. .. versionadded:: 1.5 """ name = 'ECL' + url = 'https://hpccsystems.com/training/documentation/ecl-language-reference/html' aliases = ['ecl'] filenames = ['*.ecl'] mimetypes = ['application/x-ecl'] @@ -124,7 +123,7 @@ class ECLLexer(RegexLexer): def analyse_text(text): """This is very difficult to guess relative to other business languages. - -> in conjuction with BEGIN/END seems relatively rare though.""" + -> in conjunction with BEGIN/END seems relatively rare though.""" result = 0 if '->' in text: diff --git a/contrib/python/Pygments/py3/pygments/lexers/eiffel.py b/contrib/python/Pygments/py3/pygments/lexers/eiffel.py index 599b446306..793fad882d 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/eiffel.py +++ b/contrib/python/Pygments/py3/pygments/lexers/eiffel.py @@ -4,7 +4,7 @@ Lexer for the Eiffel language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -17,11 +17,12 @@ __all__ = ['EiffelLexer'] class EiffelLexer(RegexLexer): """ - For `Eiffel <http://www.eiffel.com>`_ source code. + For Eiffel source code. .. versionadded:: 2.0 """ name = 'Eiffel' + url = 'http://www.eiffel.com' aliases = ['eiffel'] filenames = ['*.e'] mimetypes = ['text/x-eiffel'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/elm.py b/contrib/python/Pygments/py3/pygments/lexers/elm.py index 298dbf5986..c9fce501b6 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/elm.py +++ b/contrib/python/Pygments/py3/pygments/lexers/elm.py @@ -4,7 +4,7 @@ Lexer for the Elm programming language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -17,12 +17,13 @@ __all__ = ['ElmLexer'] class ElmLexer(RegexLexer): """ - For `Elm <http://elm-lang.org/>`_ source code. + For Elm source code. .. versionadded:: 2.1 """ name = 'Elm' + url = 'http://elm-lang.org/' aliases = ['elm'] filenames = ['*.elm'] mimetypes = ['text/x-elm'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/elpi.py b/contrib/python/Pygments/py3/pygments/lexers/elpi.py index 1f8a035af5..e1fc19d419 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/elpi.py +++ b/contrib/python/Pygments/py3/pygments/lexers/elpi.py @@ -4,7 +4,7 @@ Lexer for the `Elpi <http://github.com/LPCIC/elpi>`_ programming language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -16,12 +16,13 @@ __all__ = ['ElpiLexer'] class ElpiLexer(RegexLexer): """ - Lexer for the `Elpi <http://github.com/LPCIC/elpi>`_ programming language. + Lexer for the Elpi programming language. .. versionadded::2.11 """ name = 'Elpi' + url = 'http://github.com/LPCIC/elpi' aliases = ['elpi'] filenames = ['*.elpi'] mimetypes = ['text/x-elpi'] @@ -32,9 +33,9 @@ class ElpiLexer(RegexLexer): schar2_re = r"([+*^?/<>`'@#~=&!])" schar_re = r"({}|-|\$|_)".format(schar2_re) idchar_re = r"({}|{}|{}|{})".format(lcase_re,ucase_re,digit_re,schar_re) - idcharstarns_re = r"({}+|(?=\.[a-z])\.{}+)".format(idchar_re,idchar_re) + idcharstarns_re = r"({}*(\.({}|{}){}*)*)".format(idchar_re, lcase_re, ucase_re, idchar_re) symbchar_re = r"({}|{}|{}|{}|:)".format(lcase_re, ucase_re, digit_re, schar_re) - constant_re = r"({}{}*|{}{}*|{}{}*|_{}+)".format(ucase_re, idchar_re, lcase_re, idcharstarns_re,schar2_re, symbchar_re,idchar_re) + constant_re = r"({}{}*|{}{}|{}{}*|_{}+)".format(ucase_re, idchar_re, lcase_re, idcharstarns_re,schar2_re, symbchar_re,idchar_re) symbol_re=r"(,|<=>|->|:-|;|\?-|->|&|=>|\bas\b|\buvar\b|<|=<|=|==|>=|>|\bi<|\bi=<|\bi>=|\bi>|\bis\b|\br<|\br=<|\br>=|\br>|\bs<|\bs=<|\bs>=|\bs>|@|::|\[\]|`->|`:|`:=|\^|-|\+|\bi-|\bi\+|r-|r\+|/|\*|\bdiv\b|\bi\*|\bmod\b|\br\*|~|\bi~|\br~)" escape_re=r"\(({}|{})\)".format(constant_re,symbol_re) const_sym_re = r"({}|{}|{})".format(constant_re,symbol_re,escape_re) @@ -111,6 +112,7 @@ class ElpiLexer(RegexLexer): ], 'elpi-ctype': [ (r"(ctype\s+)(\")",bygroups(Keyword.Type,String.Double),'elpi-string'), + (r'->',Keyword.Type), (constant_re,Keyword.Type), (r"\(|\)",Keyword.Type), (r",",Text,'#pop'), diff --git a/contrib/python/Pygments/py3/pygments/lexers/email.py b/contrib/python/Pygments/py3/pygments/lexers/email.py index 0c3fe5febe..7d9f17e5c7 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/email.py +++ b/contrib/python/Pygments/py3/pygments/lexers/email.py @@ -4,7 +4,7 @@ Lexer for the raw E-mail. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/erlang.py b/contrib/python/Pygments/py3/pygments/lexers/erlang.py index 2563ffc263..6cdca98447 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/erlang.py +++ b/contrib/python/Pygments/py3/pygments/lexers/erlang.py @@ -4,7 +4,7 @@ Lexers for Erlang. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -26,12 +26,11 @@ class ErlangLexer(RegexLexer): """ For the Erlang functional programming language. - Blame Jeremy Thurgood (http://jerith.za.net/). - .. versionadded:: 0.9 """ name = 'Erlang' + url = 'https://www.erlang.org/' aliases = ['erlang'] filenames = ['*.erl', '*.hrl', '*.es', '*.escript'] mimetypes = ['text/x-erlang'] @@ -223,12 +222,13 @@ def gen_elixir_sigstr_rules(term, term_class, token, interpol=True): class ElixirLexer(RegexLexer): """ - For the `Elixir language <http://elixir-lang.org>`_. + For the Elixir language. .. versionadded:: 1.5 """ name = 'Elixir' + url = 'http://elixir-lang.org' aliases = ['elixir', 'ex', 'exs'] filenames = ['*.ex', '*.eex', '*.exs', '*.leex'] mimetypes = ['text/x-elixir'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/esoteric.py b/contrib/python/Pygments/py3/pygments/lexers/esoteric.py index a884d4687b..a0d1f1e268 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/esoteric.py +++ b/contrib/python/Pygments/py3/pygments/lexers/esoteric.py @@ -4,7 +4,7 @@ Lexers for esoteric languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -18,11 +18,11 @@ __all__ = ['BrainfuckLexer', 'BefungeLexer', 'RedcodeLexer', 'CAmkESLexer', class BrainfuckLexer(RegexLexer): """ - Lexer for the esoteric `BrainFuck <http://www.muppetlabs.com/~breadbox/bf/>`_ - language. + Lexer for the esoteric BrainFuck language. """ name = 'Brainfuck' + url = 'http://www.muppetlabs.com/~breadbox/bf/' aliases = ['brainfuck', 'bf'] filenames = ['*.bf', '*.b'] mimetypes = ['application/x-brainfuck'] @@ -75,12 +75,12 @@ class BrainfuckLexer(RegexLexer): class BefungeLexer(RegexLexer): """ - Lexer for the esoteric `Befunge <http://en.wikipedia.org/wiki/Befunge>`_ - language. + Lexer for the esoteric Befunge language. .. versionadded:: 0.7 """ name = 'Befunge' + url = 'http://en.wikipedia.org/wiki/Befunge' aliases = ['befunge'] filenames = ['*.befunge'] mimetypes = ['application/x-befunge'] @@ -105,12 +105,12 @@ class BefungeLexer(RegexLexer): class CAmkESLexer(RegexLexer): """ - Basic lexer for the input language for the - `CAmkES <https://sel4.systems/CAmkES/>`_ component platform. + Basic lexer for the input language for the CAmkES component platform. .. versionadded:: 2.1 """ name = 'CAmkES' + url = 'https://sel4.systems/CAmkES/' aliases = ['camkes', 'idl4'] filenames = ['*.camkes', '*.idl4'] @@ -173,8 +173,7 @@ class CAmkESLexer(RegexLexer): class CapDLLexer(RegexLexer): """ - Basic lexer for - `CapDL <https://ssrg.nicta.com.au/publications/nictaabstracts/Kuz_KLW_10.abstract.pml>`_. + Basic lexer for CapDL. The source of the primary tool that reads such specifications is available at https://github.com/seL4/capdl/tree/master/capDL-tool. Note that this @@ -186,6 +185,7 @@ class CapDLLexer(RegexLexer): .. versionadded:: 2.2 """ name = 'CapDL' + url = 'https://ssrg.nicta.com.au/publications/nictaabstracts/Kuz_KLW_10.abstract.pml' aliases = ['capdl'] filenames = ['*.cdl'] @@ -269,15 +269,11 @@ class RedcodeLexer(RegexLexer): class AheuiLexer(RegexLexer): """ - Aheui_ Lexer. - - Aheui_ is esoteric language based on Korean alphabets. - - .. _Aheui: http://aheui.github.io/ - + Aheui is esoteric language based on Korean alphabets. """ name = 'Aheui' + url = 'http://aheui.github.io/' aliases = ['aheui'] filenames = ['*.aheui'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/ezhil.py b/contrib/python/Pygments/py3/pygments/lexers/ezhil.py index 6d282c96bb..73b7c8b489 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ezhil.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ezhil.py @@ -4,7 +4,7 @@ Pygments lexers for Ezhil language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -18,15 +18,15 @@ __all__ = ['EzhilLexer'] class EzhilLexer(RegexLexer): """ - Lexer for `Ezhil, a Tamil script-based programming language <http://ezhillang.org>`_ + Lexer for Ezhil, a Tamil script-based programming language. .. versionadded:: 2.1 """ name = 'Ezhil' + url = 'http://ezhillang.org' aliases = ['ezhil'] filenames = ['*.n'] mimetypes = ['text/x-ezhil'] - flags = re.MULTILINE | re.UNICODE # Refer to tamil.utf8.tamil_letters from open-tamil for a stricter version of this. # This much simpler version is close enough, and includes combining marks. _TALETTERS = '[a-zA-Z_]|[\u0b80-\u0bff]' @@ -58,8 +58,8 @@ class EzhilLexer(RegexLexer): ], 'literal': [ (r'".*?"', String), - (r'(?u)\d+((\.\d*)?[eE][+-]?\d+|\.\d*)', Number.Float), - (r'(?u)\d+', Number.Integer), + (r'\d+((\.\d*)?[eE][+-]?\d+|\.\d*)', Number.Float), + (r'\d+', Number.Integer), ] } diff --git a/contrib/python/Pygments/py3/pygments/lexers/factor.py b/contrib/python/Pygments/py3/pygments/lexers/factor.py index 05159835d4..9697ac3959 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/factor.py +++ b/contrib/python/Pygments/py3/pygments/lexers/factor.py @@ -4,7 +4,7 @@ Lexers for the Factor language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -19,17 +19,16 @@ __all__ = ['FactorLexer'] class FactorLexer(RegexLexer): """ - Lexer for the `Factor <http://factorcode.org>`_ language. + Lexer for the Factor language. .. versionadded:: 1.4 """ name = 'Factor' + url = 'http://factorcode.org' aliases = ['factor'] filenames = ['*.factor'] mimetypes = ['text/x-factor'] - flags = re.MULTILINE | re.UNICODE - builtin_kernel = words(( '-rot', '2bi', '2bi@', '2bi*', '2curry', '2dip', '2drop', '2dup', '2keep', '2nip', '2over', '2tri', '2tri@', '2tri*', '3bi', '3curry', '3dip', '3drop', '3dup', '3keep', diff --git a/contrib/python/Pygments/py3/pygments/lexers/fantom.py b/contrib/python/Pygments/py3/pygments/lexers/fantom.py index 7272e006bd..1825b923b5 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/fantom.py +++ b/contrib/python/Pygments/py3/pygments/lexers/fantom.py @@ -4,7 +4,7 @@ Lexer for the Fantom language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/felix.py b/contrib/python/Pygments/py3/pygments/lexers/felix.py index 55dee25e6d..75df838189 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/felix.py +++ b/contrib/python/Pygments/py3/pygments/lexers/felix.py @@ -4,7 +4,7 @@ Lexer for the Felix language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -18,12 +18,13 @@ __all__ = ['FelixLexer'] class FelixLexer(RegexLexer): """ - For `Felix <http://www.felix-lang.org>`_ source code. + For Felix source code. .. versionadded:: 1.2 """ name = 'Felix' + url = 'http://www.felix-lang.org' aliases = ['felix', 'flx'] filenames = ['*.flx', '*.flxh'] mimetypes = ['text/x-felix'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/floscript.py b/contrib/python/Pygments/py3/pygments/lexers/floscript.py index e9b7da2bfc..61f687958a 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/floscript.py +++ b/contrib/python/Pygments/py3/pygments/lexers/floscript.py @@ -4,7 +4,7 @@ Lexer for FloScript - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -17,12 +17,13 @@ __all__ = ['FloScriptLexer'] class FloScriptLexer(RegexLexer): """ - For `FloScript <https://github.com/ioflo/ioflo>`_ configuration language source code. + For FloScript configuration language source code. .. versionadded:: 2.4 """ name = 'FloScript' + url = 'https://github.com/ioflo/ioflo' aliases = ['floscript', 'flo'] filenames = ['*.flo'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/forth.py b/contrib/python/Pygments/py3/pygments/lexers/forth.py index 1f67aa4ed5..6655cda5ed 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/forth.py +++ b/contrib/python/Pygments/py3/pygments/lexers/forth.py @@ -4,7 +4,7 @@ Lexer for the Forth language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -25,6 +25,7 @@ class ForthLexer(RegexLexer): .. versionadded:: 2.2 """ name = 'Forth' + url = 'https://www.forth.com/forth/' aliases = ['forth'] filenames = ['*.frt', '*.fs'] mimetypes = ['application/x-forth'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/fortran.py b/contrib/python/Pygments/py3/pygments/lexers/fortran.py index b5d977eaf0..f80795d97d 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/fortran.py +++ b/contrib/python/Pygments/py3/pygments/lexers/fortran.py @@ -4,7 +4,7 @@ Lexers for Fortran languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -24,6 +24,7 @@ class FortranLexer(RegexLexer): .. versionadded:: 0.10 """ name = 'Fortran' + url = 'https://fortran-lang.org/' aliases = ['fortran', 'f90'] filenames = ['*.f03', '*.f90', '*.F03', '*.F90'] mimetypes = ['text/x-fortran'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/foxpro.py b/contrib/python/Pygments/py3/pygments/lexers/foxpro.py index 0b756d4da3..62edef8e5c 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/foxpro.py +++ b/contrib/python/Pygments/py3/pygments/lexers/foxpro.py @@ -4,7 +4,7 @@ Simple lexer for Microsoft Visual FoxPro source code. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/freefem.py b/contrib/python/Pygments/py3/pygments/lexers/freefem.py index 532f134fa8..7947b107f4 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/freefem.py +++ b/contrib/python/Pygments/py3/pygments/lexers/freefem.py @@ -4,7 +4,7 @@ Lexer for FreeFem++ language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -21,7 +21,7 @@ __all__ = ['FreeFemLexer'] class FreeFemLexer(CppLexer): """ - For `FreeFem++ <https://freefem.org/>`_ source. + For FreeFem++ source. This is an extension of the CppLexer, as the FreeFem Language is a superset of C++. @@ -30,6 +30,7 @@ class FreeFemLexer(CppLexer): """ name = 'Freefem' + url = 'https://freefem.org/' aliases = ['freefem'] filenames = ['*.edp'] mimetypes = ['text/x-freefem'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/functional.py b/contrib/python/Pygments/py3/pygments/lexers/functional.py index e33a72e21e..58ba31d233 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/functional.py +++ b/contrib/python/Pygments/py3/pygments/lexers/functional.py @@ -4,7 +4,7 @@ Just export lexer classes previously contained in this module. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/futhark.py b/contrib/python/Pygments/py3/pygments/lexers/futhark.py index 57bfb94314..8e3d54f449 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/futhark.py +++ b/contrib/python/Pygments/py3/pygments/lexers/futhark.py @@ -4,7 +4,7 @@ Lexer for the Futhark language - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -28,17 +28,17 @@ class FutharkLexer(RegexLexer): .. versionadded:: 2.8 """ name = 'Futhark' + url = 'https://futhark-lang.org/' aliases = ['futhark'] filenames = ['*.fut'] mimetypes = ['text/x-futhark'] - flags = re.MULTILINE | re.UNICODE - num_types = ('i8', 'i16', 'i32', 'i64', 'u8', 'u16', 'u32', 'u64', 'f32', 'f64') other_types = ('bool', ) - reserved = ('if', 'then', 'else', 'let', 'loop', 'in', 'with', 'type', + reserved = ('if', 'then', 'else', 'def', 'let', 'loop', 'in', 'with', + 'type', 'type~', 'type^', 'val', 'entry', 'for', 'while', 'do', 'case', 'match', 'include', 'import', 'module', 'open', 'local', 'assert', '_') @@ -63,11 +63,11 @@ class FutharkLexer(RegexLexer): # Identifiers (r'#\[([a-zA-Z_\(\) ]*)\]', Comment.Preproc), - (r'!?(%s\.)*%s' % (identifier_re, identifier_re), Name), + (r'[#!]?(%s\.)*%s' % (identifier_re, identifier_re), Name), (r'\\', Operator), (r'[-+/%=!><|&*^][-+/%=!><|&*^.]*', Operator), - (r'[][(),:;`{}]', Punctuation), + (r'[][(),:;`{}?.\'~^]', Punctuation), # Numbers (r'0[xX]_*[\da-fA-F](_*[\da-fA-F])*_*[pP][+-]?\d(_*\d)*' + num_postfix, diff --git a/contrib/python/Pygments/py3/pygments/lexers/gcodelexer.py b/contrib/python/Pygments/py3/pygments/lexers/gcodelexer.py index 03be281f5d..2dd2875559 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/gcodelexer.py +++ b/contrib/python/Pygments/py3/pygments/lexers/gcodelexer.py @@ -4,7 +4,7 @@ Lexers for the G Code Language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/gdscript.py b/contrib/python/Pygments/py3/pygments/lexers/gdscript.py index 1048d1b56f..f5054f4646 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/gdscript.py +++ b/contrib/python/Pygments/py3/pygments/lexers/gdscript.py @@ -7,7 +7,7 @@ Modified by Daniel J. Ramirez <djrmuv@gmail.com> based on the original python.py. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -25,10 +25,11 @@ line_re = re.compile(".*?\n") class GDScriptLexer(RegexLexer): """ - For `GDScript source code <https://www.godotengine.org>`_. + For GDScript source code. """ name = "GDScript" + url = 'https://www.godotengine.org' aliases = ["gdscript", "gd"] filenames = ["*.gd"] mimetypes = ["text/x-gdscript", "application/x-gdscript"] diff --git a/contrib/python/Pygments/py3/pygments/lexers/go.py b/contrib/python/Pygments/py3/pygments/lexers/go.py index 33a57ce813..ce214bc544 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/go.py +++ b/contrib/python/Pygments/py3/pygments/lexers/go.py @@ -4,7 +4,7 @@ Lexers for the Google Go language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -19,17 +19,16 @@ __all__ = ['GoLexer'] class GoLexer(RegexLexer): """ - For `Go <http://golang.org>`_ source. + For Go source. .. versionadded:: 1.2 """ name = 'Go' + url = 'https://go.dev/' filenames = ['*.go'] aliases = ['go', 'golang'] mimetypes = ['text/x-gosrc'] - flags = re.MULTILINE | re.UNICODE - tokens = { 'root': [ (r'\n', Whitespace), diff --git a/contrib/python/Pygments/py3/pygments/lexers/grammar_notation.py b/contrib/python/Pygments/py3/pygments/lexers/grammar_notation.py index ff57c99917..6acc47e2dc 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/grammar_notation.py +++ b/contrib/python/Pygments/py3/pygments/lexers/grammar_notation.py @@ -4,7 +4,7 @@ Lexers for grammar notations like BNF. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -39,7 +39,7 @@ class BnfLexer(RegexLexer): * We don't distinguish any operators and punctuation except `::=`. - Though these desision making might cause too minimal highlighting + Though these decision making might cause too minimal highlighting and you might be disappointed, but it is reasonable for us. .. versionadded:: 2.1 @@ -67,15 +67,15 @@ class BnfLexer(RegexLexer): class AbnfLexer(RegexLexer): """ - Lexer for `IETF 7405 ABNF - <http://www.ietf.org/rfc/rfc7405.txt>`_ - (Updates `5234 <http://www.ietf.org/rfc/rfc5234.txt>`_) - grammars. + Lexer for IETF 7405 ABNF. + + (Updates `5234 <http://www.ietf.org/rfc/rfc5234.txt>`_) grammars. .. versionadded:: 2.1 """ name = 'ABNF' + url = 'http://www.ietf.org/rfc/rfc7405.txt' aliases = ['abnf'] filenames = ['*.abnf'] mimetypes = ['text/x-abnf'] @@ -134,18 +134,16 @@ class AbnfLexer(RegexLexer): class JsgfLexer(RegexLexer): """ - For `JSpeech Grammar Format <https://www.w3.org/TR/jsgf/>`_ - grammars. + For JSpeech Grammar Format grammars. .. versionadded:: 2.2 """ name = 'JSGF' + url = 'https://www.w3.org/TR/jsgf/' aliases = ['jsgf'] filenames = ['*.jsgf'] mimetypes = ['application/jsgf', 'application/x-jsgf', 'text/jsgf'] - flags = re.MULTILINE | re.UNICODE - tokens = { 'root': [ include('comments'), @@ -214,8 +212,7 @@ class JsgfLexer(RegexLexer): class PegLexer(RegexLexer): """ - This lexer is for `Parsing Expression Grammars - <https://bford.info/pub/lang/peg.pdf>`_ (PEG). + This lexer is for Parsing Expression Grammars (PEG). Various implementations of PEG have made different decisions regarding the syntax, so let's try to be accommodating: @@ -234,6 +231,7 @@ class PegLexer(RegexLexer): """ name = 'PEG' + url = 'https://bford.info/pub/lang/peg.pdf' aliases = ['peg'] filenames = ['*.peg'] mimetypes = ['text/x-peg'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/graph.py b/contrib/python/Pygments/py3/pygments/lexers/graph.py index 2af56af26b..de10e50278 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/graph.py +++ b/contrib/python/Pygments/py3/pygments/lexers/graph.py @@ -4,7 +4,7 @@ Lexers for graph query languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -20,14 +20,14 @@ __all__ = ['CypherLexer'] class CypherLexer(RegexLexer): """ - For `Cypher Query Language - <https://neo4j.com/docs/developer-manual/3.3/cypher/>`_ + For Cypher Query Language For the Cypher version in Neo4j 3.3 .. versionadded:: 2.0 """ name = 'Cypher' + url = 'https://neo4j.com/docs/developer-manual/3.3/cypher/' aliases = ['cypher'] filenames = ['*.cyp', '*.cypher'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/graphics.py b/contrib/python/Pygments/py3/pygments/lexers/graphics.py index 9f3e4a4431..95e56d0c66 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/graphics.py +++ b/contrib/python/Pygments/py3/pygments/lexers/graphics.py @@ -4,7 +4,7 @@ Lexers for computer graphics and plotting related languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -306,13 +306,10 @@ class PostScriptLexer(RegexLexer): """ Lexer for PostScript files. - The PostScript Language Reference published by Adobe at - <http://partners.adobe.com/public/developer/en/ps/PLRM.pdf> - is the authority for this. - .. versionadded:: 1.4 """ name = 'PostScript' + url = 'https://en.wikipedia.org/wiki/PostScript' aliases = ['postscript', 'postscr'] filenames = ['*.ps', '*.eps'] mimetypes = ['application/postscript'] @@ -402,11 +399,12 @@ class PostScriptLexer(RegexLexer): class AsymptoteLexer(RegexLexer): """ - For `Asymptote <http://asymptote.sf.net/>`_ source code. + For Asymptote source code. .. versionadded:: 1.2 """ name = 'Asymptote' + url = 'http://asymptote.sf.net/' aliases = ['asymptote', 'asy'] filenames = ['*.asy'] mimetypes = ['text/x-asymptote'] @@ -529,12 +527,13 @@ def _shortened_many(*words): class GnuplotLexer(RegexLexer): """ - For `Gnuplot <http://gnuplot.info/>`_ plotting scripts. + For Gnuplot plotting scripts. .. versionadded:: 0.11 """ name = 'Gnuplot' + url = 'http://gnuplot.info/' aliases = ['gnuplot'] filenames = ['*.plot', '*.plt'] mimetypes = ['text/x-gnuplot'] @@ -688,11 +687,12 @@ class GnuplotLexer(RegexLexer): class PovrayLexer(RegexLexer): """ - For `Persistence of Vision Raytracer <http://www.povray.org/>`_ files. + For Persistence of Vision Raytracer files. .. versionadded:: 0.11 """ name = 'POVRay' + url = 'http://www.povray.org/' aliases = ['pov'] filenames = ['*.pov', '*.inc'] mimetypes = ['text/x-povray'] @@ -766,14 +766,12 @@ class PovrayLexer(RegexLexer): 'quadric', 'quartic', 'smooth_triangle', 'sor', 'sphere', 'superellipsoid', 'text', 'torus', 'triangle', 'union'), suffix=r'\b'), Name.Builtin), - # TODO: <=, etc - (r'[\[\](){}<>;,]', Punctuation), - (r'[-+*/=]', Operator), (r'\b(x|y|z|u|v)\b', Name.Builtin.Pseudo), (r'[a-zA-Z_]\w*', Name), - (r'[0-9]+\.[0-9]*', Number.Float), - (r'\.[0-9]+', Number.Float), + (r'[0-9]*\.[0-9]+', Number.Float), (r'[0-9]+', Number.Integer), + (r'[\[\](){}<>;,]', Punctuation), + (r'[-+*/=.|&]|<=|>=|!=', Operator), (r'"(\\\\|\\[^\\]|[^"\\])*"', String), (r'\s+', Whitespace), ] diff --git a/contrib/python/Pygments/py3/pygments/lexers/graphviz.py b/contrib/python/Pygments/py3/pygments/lexers/graphviz.py index a685933744..c68ce2d3ea 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/graphviz.py +++ b/contrib/python/Pygments/py3/pygments/lexers/graphviz.py @@ -4,7 +4,7 @@ Lexer for the DOT language (graphviz). - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -23,6 +23,7 @@ class GraphvizLexer(RegexLexer): .. versionadded:: 2.8 """ name = 'Graphviz' + url = 'https://www.graphviz.org/doc/info/lang.html' aliases = ['graphviz', 'dot'] filenames = ['*.gv', '*.dot'] mimetypes = ['text/x-graphviz', 'text/vnd.graphviz'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/gsql.py b/contrib/python/Pygments/py3/pygments/lexers/gsql.py index 3dd3ea1a6f..6af99b27ce 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/gsql.py +++ b/contrib/python/Pygments/py3/pygments/lexers/gsql.py @@ -4,7 +4,7 @@ Lexers for TigerGraph GSQL graph query language - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -20,11 +20,12 @@ __all__ = ["GSQLLexer"] class GSQLLexer(RegexLexer): """ - For `GSQL <https://docs.tigergraph.com/dev/gsql-ref>`_ queries (version 3.x). + For GSQL queries (version 3.x). .. versionadded:: 2.10 """ name = 'GSQL' + url = 'https://docs.tigergraph.com/dev/gsql-ref' aliases = ['gsql'] filenames = ['*.gsql'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/haskell.py b/contrib/python/Pygments/py3/pygments/lexers/haskell.py index 6ab0f3340e..c5c5ca1291 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/haskell.py +++ b/contrib/python/Pygments/py3/pygments/lexers/haskell.py @@ -4,7 +4,7 @@ Lexers for Haskell and related languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -31,12 +31,11 @@ class HaskellLexer(RegexLexer): .. versionadded:: 0.8 """ name = 'Haskell' + url = 'https://www.haskell.org/' aliases = ['haskell', 'hs'] filenames = ['*.hs'] mimetypes = ['text/x-haskell'] - flags = re.MULTILINE | re.UNICODE - reserved = ('case', 'class', 'data', 'default', 'deriving', 'do', 'else', 'family', 'if', 'in', 'infix[lr]?', 'instance', 'let', 'newtype', 'of', 'then', 'type', 'where', '_') @@ -189,6 +188,7 @@ class IdrisLexer(RegexLexer): .. versionadded:: 2.0 """ name = 'Idris' + url = 'https://www.idris-lang.org/' aliases = ['idris', 'idr'] filenames = ['*.idr'] mimetypes = ['text/x-idris'] @@ -293,24 +293,25 @@ class IdrisLexer(RegexLexer): class AgdaLexer(RegexLexer): """ - For the `Agda <http://wiki.portal.chalmers.se/agda/pmwiki.php>`_ - dependently typed functional programming language and proof assistant. + For the Agda dependently typed functional programming language and + proof assistant. .. versionadded:: 2.0 """ name = 'Agda' + url = 'http://wiki.portal.chalmers.se/agda/pmwiki.php' aliases = ['agda'] filenames = ['*.agda'] mimetypes = ['text/x-agda'] - reserved = ['abstract', 'codata', 'coinductive', 'constructor', 'data', - 'field', 'forall', 'hiding', 'in', 'inductive', 'infix', - 'infixl', 'infixr', 'instance', 'let', 'mutual', 'open', - 'pattern', 'postulate', 'primitive', 'private', - 'quote', 'quoteGoal', 'quoteTerm', + reserved = ['abstract', 'codata', 'coinductive', 'constructor', 'data', 'do', + 'eta-equality', 'field', 'forall', 'hiding', 'in', 'inductive', 'infix', + 'infixl', 'infixr', 'instance', 'interleaved', 'let', 'macro', 'mutual', + 'no-eta-equality', 'open', 'overlap', 'pattern', 'postulate', 'primitive', 'private', + 'quote', 'quoteTerm', 'record', 'renaming', 'rewrite', 'syntax', 'tactic', - 'unquote', 'unquoteDecl', 'using', 'where', 'with'] + 'unquote', 'unquoteDecl', 'unquoteDef', 'using', 'variable', 'where', 'with'] tokens = { 'root': [ @@ -655,13 +656,13 @@ class LiterateCryptolLexer(LiterateLexer): class KokaLexer(RegexLexer): """ - Lexer for the `Koka <http://koka.codeplex.com>`_ - language. + Lexer for the Koka language. .. versionadded:: 1.6 """ name = 'Koka' + url = 'https://koka-lang.github.io/koka/doc/index.html' aliases = ['koka'] filenames = ['*.kk', '*.kki'] mimetypes = ['text/x-koka'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/haxe.py b/contrib/python/Pygments/py3/pygments/lexers/haxe.py index ee587e99b7..1d9c6f506c 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/haxe.py +++ b/contrib/python/Pygments/py3/pygments/lexers/haxe.py @@ -4,7 +4,7 @@ Lexers for Haxe and related stuff. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -20,12 +20,13 @@ __all__ = ['HaxeLexer', 'HxmlLexer'] class HaxeLexer(ExtendedRegexLexer): """ - For Haxe source code (http://haxe.org/). + For Haxe source code. .. versionadded:: 1.3 """ name = 'Haxe' + url = 'http://haxe.org/' aliases = ['haxe', 'hxsl', 'hx'] filenames = ['*.hx', '*.hxsl'] mimetypes = ['text/haxe', 'text/x-haxe', 'text/x-hx'] @@ -896,17 +897,18 @@ class HaxeLexer(ExtendedRegexLexer): class HxmlLexer(RegexLexer): """ - Lexer for `haXe build <http://haxe.org/doc/compiler>`_ files. + Lexer for haXe build files. .. versionadded:: 1.6 """ name = 'Hxml' + url = 'https://haxe.org/manual/compiler-usage-hxml.html' aliases = ['haxeml', 'hxml'] filenames = ['*.hxml'] tokens = { 'root': [ - # Seperator + # Separator (r'(--)(next)', bygroups(Punctuation, Generic.Heading)), # Compiler switches with one dash (r'(-)(prompt|debug|v)', bygroups(Punctuation, Keyword.Keyword)), diff --git a/contrib/python/Pygments/py3/pygments/lexers/hdl.py b/contrib/python/Pygments/py3/pygments/lexers/hdl.py index e96f79a475..c3be3a5157 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/hdl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/hdl.py @@ -4,7 +4,7 @@ Lexers for hardware descriptor languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/hexdump.py b/contrib/python/Pygments/py3/pygments/lexers/hexdump.py index 041d7f6c25..58f0e8d641 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/hexdump.py +++ b/contrib/python/Pygments/py3/pygments/lexers/hexdump.py @@ -4,7 +4,7 @@ Lexers for hexadecimal dumps. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/html.py b/contrib/python/Pygments/py3/pygments/lexers/html.py index 2e29f453cd..1c46504895 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/html.py +++ b/contrib/python/Pygments/py3/pygments/lexers/html.py @@ -4,7 +4,7 @@ Lexers for HTML, XML and related markup. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -32,6 +32,7 @@ class HtmlLexer(RegexLexer): """ name = 'HTML' + url = 'https://html.spec.whatwg.org/' aliases = ['html'] filenames = ['*.html', '*.htm', '*.xhtml', '*.xslt'] mimetypes = ['text/html', 'application/xhtml+xml'] @@ -42,7 +43,7 @@ class HtmlLexer(RegexLexer): ('[^<&]+', Text), (r'&\S*?;', Name.Entity), (r'\<\!\[CDATA\[.*?\]\]\>', Comment.Preproc), - (r'<!--(.|\n)*?-->', Comment.Multiline), + (r'<!--.*?-->', Comment.Multiline), (r'<\?.*?\?>', Comment.Preproc), ('<![^>]*>', Comment.Preproc), (r'(<)(\s*)(script)(\s*)', @@ -195,7 +196,7 @@ class XmlLexer(RegexLexer): Generic lexer for XML (eXtensible Markup Language). """ - flags = re.MULTILINE | re.DOTALL | re.UNICODE + flags = re.MULTILINE | re.DOTALL name = 'XML' aliases = ['xml'] @@ -208,8 +209,8 @@ class XmlLexer(RegexLexer): 'root': [ ('[^<&]+', Text), (r'&\S*?;', Name.Entity), - (r'\<\!\[CDATA\[.*?\]\]\>', Comment.Preproc), - (r'<!--(.|\n)*?-->', Comment.Multiline), + (r'\<\!\[CDATA\[.*?\]\]\>', Comment.Preproc), + (r'<!--.*?-->', Comment.Multiline), (r'<\?.*?\?>', Comment.Preproc), ('<![^>]*>', Comment.Preproc), (r'<\s*[\w:.-]+', Name.Tag, 'tag'), @@ -285,7 +286,7 @@ class HamlLexer(ExtendedRegexLexer): flags = re.IGNORECASE # Haml can include " |\n" anywhere, # which is ignored and used to wrap long lines. - # To accomodate this, use this custom faux dot instead. + # To accommodate this, use this custom faux dot instead. _dot = r'(?: \|\n(?=.* \|)|.)' # In certain places, a comma at the end of the line diff --git a/contrib/python/Pygments/py3/pygments/lexers/idl.py b/contrib/python/Pygments/py3/pygments/lexers/idl.py index 22b8346ac3..d24f8cdd33 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/idl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/idl.py @@ -4,14 +4,15 @@ Lexers for IDL. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re -from pygments.lexer import RegexLexer, words -from pygments.token import Text, Comment, Operator, Keyword, Name, Number, String +from pygments.lexer import RegexLexer, words, bygroups +from pygments.token import Text, Comment, Operator, Keyword, Name, Number, \ + String, Whitespace __all__ = ['IDLLexer'] @@ -23,6 +24,7 @@ class IDLLexer(RegexLexer): .. versionadded:: 1.6 """ name = 'IDL' + url = 'https://www.l3harrisgeospatial.com/Software-Technology/IDL' aliases = ['idl'] filenames = ['*.pro'] mimetypes = ['text/idl'] @@ -248,7 +250,8 @@ class IDLLexer(RegexLexer): tokens = { 'root': [ - (r'^\s*;.*?\n', Comment.Single), + (r'(^\s*)(;.*?)(\n)', bygroups(Whitespace, Comment.Single, + Whitespace)), (words(_RESERVED, prefix=r'\b', suffix=r'\b'), Keyword), (words(_BUILTIN_LIB, prefix=r'\b', suffix=r'\b'), Name.Builtin), (r'\+=|-=|\^=|\*=|/=|#=|##=|<=|>=|=', Operator), @@ -264,6 +267,8 @@ class IDLLexer(RegexLexer): (r'\b[+\-]?[0-9]+U?L{1,2}\b', Number.Integer.Long), (r'\b[+\-]?[0-9]+U?S?\b', Number.Integer), (r'\b[+\-]?[0-9]+B\b', Number), + (r'[ \t]+', Whitespace), + (r'\n', Whitespace), (r'.', Text), ] } @@ -277,4 +282,4 @@ class IDLLexer(RegexLexer): if 'endswitch' in text: result += 0.01 - return result
\ No newline at end of file + return result diff --git a/contrib/python/Pygments/py3/pygments/lexers/igor.py b/contrib/python/Pygments/py3/pygments/lexers/igor.py index e843d081f1..28b6b359ac 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/igor.py +++ b/contrib/python/Pygments/py3/pygments/lexers/igor.py @@ -4,14 +4,14 @@ Lexers for Igor Pro. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, words -from pygments.token import Text, Comment, Keyword, Name, String +from pygments.token import Text, Comment, Keyword, Name, String, Whitespace __all__ = ['IgorLexer'] @@ -413,6 +413,7 @@ class IgorLexer(RegexLexer): # Compiler directives. (r'^#(include|pragma|define|undef|ifdef|ifndef|if|elif|else|endif)', Name.Decorator), + (r'\s+', Whitespace), (r'[^a-z"/]+$', Text), (r'.', Text), ], diff --git a/contrib/python/Pygments/py3/pygments/lexers/inferno.py b/contrib/python/Pygments/py3/pygments/lexers/inferno.py index befe42ab51..93122b3c64 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/inferno.py +++ b/contrib/python/Pygments/py3/pygments/lexers/inferno.py @@ -4,7 +4,7 @@ Lexers for Inferno os and all the related stuff. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -12,14 +12,14 @@ import re from pygments.lexer import RegexLexer, include, bygroups, default from pygments.token import Punctuation, Text, Comment, Operator, Keyword, \ - Name, String, Number + Name, String, Number, Whitespace __all__ = ['LimboLexer'] class LimboLexer(RegexLexer): """ - Lexer for `Limbo programming language <http://www.vitanuova.com/inferno/limbo.html>`_ + Lexer for Limbo programming language TODO: - maybe implement better var declaration highlighting @@ -28,16 +28,17 @@ class LimboLexer(RegexLexer): .. versionadded:: 2.0 """ name = 'Limbo' + url = 'http://www.vitanuova.com/inferno/limbo.html' aliases = ['limbo'] filenames = ['*.b'] mimetypes = ['text/limbo'] tokens = { 'whitespace': [ - (r'^(\s*)([a-zA-Z_]\w*:(\s*)\n)', - bygroups(Text, Name.Label)), - (r'\n', Text), - (r'\s+', Text), + (r'^(\s*)([a-zA-Z_]\w*:)(\s*\n)', + bygroups(Whitespace, Name.Label, Whitespace)), + (r'\n', Whitespace), + (r'\s+', Whitespace), (r'#(\n|(.|\n)*?[^\\]\n)', Comment.Single), ], 'string': [ diff --git a/contrib/python/Pygments/py3/pygments/lexers/installers.py b/contrib/python/Pygments/py3/pygments/lexers/installers.py index 1f7b283146..e2013b2115 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/installers.py +++ b/contrib/python/Pygments/py3/pygments/lexers/installers.py @@ -4,7 +4,7 @@ Lexers for installer/packager DSLs and formats. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -20,11 +20,12 @@ __all__ = ['NSISLexer', 'RPMSpecLexer', 'SourcesListLexer', class NSISLexer(RegexLexer): """ - For `NSIS <http://nsis.sourceforge.net/>`_ scripts. + For NSIS scripts. .. versionadded:: 1.6 """ name = 'NSIS' + url = 'http://nsis.sourceforge.net/' aliases = ['nsis', 'nsi', 'nsh'] filenames = ['*.nsi', '*.nsh'] mimetypes = ['text/x-nsis'] @@ -33,7 +34,7 @@ class NSISLexer(RegexLexer): tokens = { 'root': [ - (r'[;#].*\n', Comment), + (r'([;#].*)(\n)', bygroups(Comment, Whitespace)), (r"'.*?'", String.Single), (r'"', String.Double, 'str_double'), (r'`', String.Backtick, 'str_backtick'), @@ -47,7 +48,7 @@ class NSISLexer(RegexLexer): ], 'basic': [ (r'(\n)(Function)(\s+)([._a-z][.\w]*)\b', - bygroups(Text, Keyword, Text, Name.Function)), + bygroups(Whitespace, Keyword, Whitespace, Name.Function)), (r'\b([_a-z]\w*)(::)([a-z][a-z0-9]*)\b', bygroups(Keyword.Namespace, Punctuation, Name.Function)), (r'\b([_a-z]\w*)(:)', bygroups(Name.Label, Punctuation)), @@ -160,20 +161,20 @@ class RPMSpecLexer(RegexLexer): tokens = { 'root': [ - (r'#.*\n', Comment), + (r'#.*$', Comment), include('basic'), ], 'description': [ (r'^(%' + _directives + ')(.*)$', bygroups(Name.Decorator, Text), '#pop'), - (r'\n', Text), + (r'\s+', Whitespace), (r'.', Text), ], 'changelog': [ - (r'\*.*\n', Generic.Subheading), + (r'\*.*$', Generic.Subheading), (r'^(%' + _directives + ')(.*)$', bygroups(Name.Decorator, Text), '#pop'), - (r'\n', Text), + (r'\s+', Whitespace), (r'.', Text), ], 'string': [ @@ -198,10 +199,11 @@ class RPMSpecLexer(RegexLexer): include('interpol'), (r"'.*?'", String.Single), (r'"', String.Double, 'string'), + (r'\s+', Whitespace), (r'.', Text), ], 'macro': [ - (r'%define.*\n', Comment.Preproc), + (r'%define.*$', Comment.Preproc), (r'%\{\!\?.*%define.*\}', Comment.Preproc), (r'(%(?:if(?:n?arch)?|else(?:if)?|endif))(.*)$', bygroups(Comment.Preproc, Text)), @@ -230,10 +232,10 @@ class SourcesListLexer(RegexLexer): tokens = { 'root': [ - (r'\s+', Text), + (r'\s+', Whitespace), (r'#.*?$', Comment), (r'^(deb(?:-src)?)(\s+)', - bygroups(Keyword, Text), 'distribution') + bygroups(Keyword, Whitespace), 'distribution') ], 'distribution': [ (r'#.*?$', Comment, '#pop'), @@ -241,7 +243,7 @@ class SourcesListLexer(RegexLexer): (r'[^\s$[]+', String), (r'\[', String.Other, 'escaped-distribution'), (r'\$', String), - (r'\s+', Text, 'components') + (r'\s+', Whitespace, 'components') ], 'escaped-distribution': [ (r'\]', String.Other, '#pop'), @@ -252,7 +254,7 @@ class SourcesListLexer(RegexLexer): 'components': [ (r'#.*?$', Comment, '#pop:2'), (r'$', Text, '#pop:2'), - (r'\s+', Text), + (r'\s+', Whitespace), (r'\S+', Keyword.Pseudo), ] } @@ -268,12 +270,10 @@ class DebianControlLexer(RegexLexer): """ Lexer for Debian ``control`` files and ``apt-cache show <pkg>`` outputs. - Specification of `control`` files is available at - https://www.debian.org/doc/debian-policy/ch-controlfields.html - .. versionadded:: 0.9 """ name = 'Debian Control file' + url = 'https://www.debian.org/doc/debian-policy/ch-controlfields.html' aliases = ['debcontrol', 'control'] filenames = ['control'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/int_fiction.py b/contrib/python/Pygments/py3/pygments/lexers/int_fiction.py index c309d19248..01ad8b7cbd 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/int_fiction.py +++ b/contrib/python/Pygments/py3/pygments/lexers/int_fiction.py @@ -4,7 +4,7 @@ Lexers for interactive fiction languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -21,16 +21,17 @@ __all__ = ['Inform6Lexer', 'Inform6TemplateLexer', 'Inform7Lexer', class Inform6Lexer(RegexLexer): """ - For `Inform 6 <http://inform-fiction.org/>`_ source code. + For Inform 6 source code. .. versionadded:: 2.0 """ name = 'Inform 6' + url = 'http://inform-fiction.org/' aliases = ['inform6', 'i6'] filenames = ['*.inf'] - flags = re.MULTILINE | re.DOTALL | re.UNICODE + flags = re.MULTILINE | re.DOTALL _name = r'[a-zA-Z_]\w*' @@ -381,10 +382,10 @@ class Inform6Lexer(RegexLexer): include('_whitespace'), (words(( 'additive', 'alias', 'buffer', 'class', 'creature', 'data', 'error', 'fatalerror', - 'first', 'has', 'held', 'initial', 'initstr', 'last', 'long', 'meta', 'multi', - 'multiexcept', 'multiheld', 'multiinside', 'noun', 'number', 'only', 'private', - 'replace', 'reverse', 'scope', 'score', 'special', 'string', 'table', 'terminating', - 'time', 'topic', 'warning', 'with'), suffix=r'\b'), + 'first', 'has', 'held', 'individual', 'initial', 'initstr', 'last', 'long', 'meta', + 'multi', 'multiexcept', 'multiheld', 'multiinside', 'noun', 'number', 'only', + 'private', 'replace', 'reverse', 'scope', 'score', 'special', 'string', 'table', + 'terminating', 'time', 'topic', 'warning', 'with'), suffix=r'\b'), Keyword, '#pop'), (r'static\b', Keyword), (r'[%s]{1,2}>|[+=]' % _dash, Punctuation, '#pop') @@ -399,7 +400,8 @@ class Inform6Lexer(RegexLexer): ], 'property-keyword*': [ include('_whitespace'), - (r'(additive|long)\b', Keyword), + (words(('additive', 'individual', 'long'), suffix=r'\b(?!(\s*|(![^%s]*))*;)' % _newline), + Keyword), default('#pop') ], 'trace-keyword?': [ @@ -527,16 +529,17 @@ class Inform6Lexer(RegexLexer): class Inform7Lexer(RegexLexer): """ - For `Inform 7 <http://inform7.com/>`_ source code. + For Inform 7 source code. .. versionadded:: 2.0 """ name = 'Inform 7' + url = 'http://inform7.com/' aliases = ['inform7', 'i7'] filenames = ['*.ni', '*.i7x'] - flags = re.MULTILINE | re.DOTALL | re.UNICODE + flags = re.MULTILINE | re.DOTALL _dash = Inform6Lexer._dash _dquote = Inform6Lexer._dquote @@ -730,8 +733,7 @@ class Inform7Lexer(RegexLexer): class Inform6TemplateLexer(Inform7Lexer): """ - For `Inform 6 template - <http://inform7.com/sources/src/i6template/Woven/index.html>`_ code. + For Inform 6 template code. .. versionadded:: 2.0 """ @@ -746,7 +748,7 @@ class Inform6TemplateLexer(Inform7Lexer): class Tads3Lexer(RegexLexer): """ - For `TADS 3 <http://www.tads.org/>`_ source code. + For TADS 3 source code. """ name = 'TADS 3' diff --git a/contrib/python/Pygments/py3/pygments/lexers/iolang.py b/contrib/python/Pygments/py3/pygments/lexers/iolang.py index c1fbe9084e..da247d918e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/iolang.py +++ b/contrib/python/Pygments/py3/pygments/lexers/iolang.py @@ -4,35 +4,35 @@ Lexers for the Io language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ - Number + Number, Whitespace __all__ = ['IoLexer'] class IoLexer(RegexLexer): """ - For `Io <http://iolanguage.com/>`_ (a small, prototype-based - programming language) source. + For Io (a small, prototype-based programming language) source. .. versionadded:: 0.10 """ name = 'Io' + url = 'http://iolanguage.com/' filenames = ['*.io'] aliases = ['io'] mimetypes = ['text/x-iosrc'] tokens = { 'root': [ - (r'\n', Text), - (r'\s+', Text), + (r'\n', Whitespace), + (r'\s+', Whitespace), # Comments - (r'//(.*?)\n', Comment.Single), - (r'#(.*?)\n', Comment.Single), + (r'//(.*?)$', Comment.Single), + (r'#(.*?)$', Comment.Single), (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline), (r'/\+', Comment.Multiline, 'nestedcomment'), # DoubleQuotedString diff --git a/contrib/python/Pygments/py3/pygments/lexers/j.py b/contrib/python/Pygments/py3/pygments/lexers/j.py index 8a3ddcbdd1..d33207d159 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/j.py +++ b/contrib/python/Pygments/py3/pygments/lexers/j.py @@ -4,25 +4,26 @@ Lexer for the J programming language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ -from pygments.lexer import RegexLexer, words, include +from pygments.lexer import RegexLexer, words, include, bygroups from pygments.token import Comment, Keyword, Name, Number, Operator, Punctuation, \ - String, Text + String, Text, Whitespace __all__ = ['JLexer'] class JLexer(RegexLexer): """ - For `J <http://jsoftware.com/>`_ source code. + For J source code. .. versionadded:: 2.1 """ name = 'J' + url = 'http://jsoftware.com/' aliases = ['j'] filenames = ['*.ijs'] mimetypes = ['text/x-j'] @@ -36,19 +37,25 @@ class JLexer(RegexLexer): # Comments (r'NB\..*', Comment.Single), - (r'\n+\s*Note', Comment.Multiline, 'comment'), - (r'\s*Note.*', Comment.Single), + (r'(\n+\s*)(Note)', bygroups(Whitespace, Comment.Multiline), + 'comment'), + (r'(\s*)(Note.*)', bygroups(Whitespace, Comment.Single)), # Whitespace - (r'\s+', Text), + (r'\s+', Whitespace), # Strings (r"'", String, 'singlequote'), # Definitions - (r'0\s+:\s*0|noun\s+define\s*$', Name.Entity, 'nounDefinition'), - (r'(([1-4]|13)\s+:\s*0|(adverb|conjunction|dyad|monad|verb)\s+define)\b', - Name.Function, 'explicitDefinition'), + (r'0\s+:\s*0', Name.Entity, 'nounDefinition'), + (r'(noun)(\s+)(define)(\s*)$', bygroups(Name.Entity, Whitespace, + Name.Entity, Whitespace), 'nounDefinition'), + (r'([1-4]|13)\s+:\s*0\b', + Name.Function, 'explicitDefinition'), + (r'(adverb|conjunction|dyad|monad|verb)(\s+)(define)\b', + bygroups(Name.Function, Whitespace, Name.Function), + 'explicitDefinition'), # Flow Control (words(('for_', 'goto_', 'label_'), suffix=validName+r'\.'), Name.Label), @@ -125,7 +132,7 @@ class JLexer(RegexLexer): ], 'nounDefinition': [ - (r'[^)]', String), + (r'[^)]+', String), (r'^\)', Name.Label, '#pop'), (r'[)]', String), ], @@ -138,7 +145,7 @@ class JLexer(RegexLexer): ], 'singlequote': [ - (r"[^']", String), + (r"[^']+", String), (r"''", String), (r"'", String, '#pop'), ], diff --git a/contrib/python/Pygments/py3/pygments/lexers/javascript.py b/contrib/python/Pygments/py3/pygments/lexers/javascript.py index 7ddd1148e6..1896fb46f6 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/javascript.py +++ b/contrib/python/Pygments/py3/pygments/lexers/javascript.py @@ -4,7 +4,7 @@ Lexers for JavaScript and related languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -13,7 +13,7 @@ import re from pygments.lexer import bygroups, combined, default, do_insertions, include, \ inherit, Lexer, RegexLexer, this, using, words from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ - Number, Punctuation, Other, Generic + Number, Punctuation, Other, Generic, Whitespace from pygments.util import get_bool_opt import pygments.unistring as uni @@ -37,18 +37,19 @@ class JavascriptLexer(RegexLexer): """ name = 'JavaScript' + url = 'https://www.ecma-international.org/publications-and-standards/standards/ecma-262/' aliases = ['javascript', 'js'] filenames = ['*.js', '*.jsm', '*.mjs', '*.cjs'] mimetypes = ['application/javascript', 'application/x-javascript', 'text/x-javascript', 'text/javascript'] - flags = re.DOTALL | re.UNICODE | re.MULTILINE + flags = re.DOTALL | re.MULTILINE tokens = { 'commentsandwhitespace': [ - (r'\s+', Text), + (r'\s+', Whitespace), (r'<!--', Comment), - (r'//.*?\n', Comment.Single), + (r'//.*?$', Comment.Single), (r'/\*.*?\*/', Comment.Multiline) ], 'slashstartsregex': [ @@ -59,10 +60,10 @@ class JavascriptLexer(RegexLexer): default('#pop') ], 'badregex': [ - (r'\n', Text, '#pop') + (r'\n', Whitespace, '#pop') ], 'root': [ - (r'\A#! ?/.*?\n', Comment.Hashbang), # recognized by node.js + (r'\A#! ?/.*?$', Comment.Hashbang), # recognized by node.js (r'^(?=\s|/|<!--)', Text, 'slashstartsregex'), include('commentsandwhitespace'), @@ -110,7 +111,7 @@ class JavascriptLexer(RegexLexer): # Match stuff like: super(argument, list) (r'(super)(\s*)(\([\w,?.$\s]+\s*\))', - bygroups(Keyword, Text), 'slashstartsregex'), + bygroups(Keyword, Whitespace), 'slashstartsregex'), # Match stuff like: function() {...} (r'([a-zA-Z_?.$][\w?.$]*)(?=\(\) \{)', Name.Other, 'slashstartsregex'), @@ -136,12 +137,13 @@ class JavascriptLexer(RegexLexer): class TypeScriptLexer(JavascriptLexer): """ - For `TypeScript <http://typescriptlang.org/>`_ source code. + For TypeScript source code. .. versionadded:: 1.6 """ name = 'TypeScript' + url = 'https://www.typescriptlang.org/' aliases = ['typescript', 'ts'] filenames = ['*.ts'] mimetypes = ['application/x-typescript', 'text/x-typescript'] @@ -159,11 +161,11 @@ class TypeScriptLexer(JavascriptLexer): # Match variable type keywords (r'\b(string|boolean|number)\b', Keyword.Type), # Match stuff like: module name {...} - (r'\b(module)(\s*)(\s*[\w?.$][\w?.$]*)(\s*)', - bygroups(Keyword.Reserved, Text, Name.Other, Text), 'slashstartsregex'), + (r'\b(module)(\s*)([\w?.$]+)(\s*)', + bygroups(Keyword.Reserved, Whitespace, Name.Other, Whitespace), 'slashstartsregex'), # Match stuff like: (function: return type) - (r'([\w?.$][\w?.$]*)(\s*:\s*)([\w?.$][\w?.$]*)', - bygroups(Name.Other, Text, Keyword.Type)), + (r'([\w?.$]+)(\s*)(:)(\s*)([\w?.$]+)', + bygroups(Name.Other, Whitespace, Operator, Whitespace, Keyword.Type)), # Match stuff like: Decorators (r'@' + JS_IDENT, Keyword.Declaration), inherit, @@ -173,15 +175,13 @@ class TypeScriptLexer(JavascriptLexer): class KalLexer(RegexLexer): """ - For `Kal`_ source code. - - .. _Kal: http://rzimmerman.github.io/kal - + For Kal source code. .. versionadded:: 2.0 """ name = 'Kal' + url = 'http://rzimmerman.github.io/kal' aliases = ['kal'] filenames = ['*.kal'] mimetypes = ['text/kal', 'application/kal'] @@ -189,18 +189,20 @@ class KalLexer(RegexLexer): flags = re.DOTALL tokens = { 'commentsandwhitespace': [ - (r'\s+', Text), + (r'\s+', Whitespace), (r'###[^#].*?###', Comment.Multiline), - (r'#(?!##[^#]).*?\n', Comment.Single), + (r'(#(?!##[^#]).*?)(\n)', bygroups(Comment.Single, Whitespace)), ], 'functiondef': [ - (r'[$a-zA-Z_][\w$]*\s*', Name.Function, '#pop'), + (r'([$a-zA-Z_][\w$]*)(\s*)', bygroups(Name.Function, Whitespace), + '#pop'), include('commentsandwhitespace'), ], 'classdef': [ - (r'\binherits\s+from\b', Keyword), - (r'[$a-zA-Z_][\w$]*\s*\n', Name.Class, '#pop'), - (r'[$a-zA-Z_][\w$]*\s*', Name.Class), + (r'\b(inherits)(\s+)(from)\b', + bygroups(Keyword, Whitespace, Keyword)), + (r'([$a-zA-Z_][\w$]*)(?=\s*\n)', Name.Class, '#pop'), + (r'[$a-zA-Z_][\w$]*\b', Name.Class), include('commentsandwhitespace'), ], 'listcomprehension': [ @@ -209,7 +211,7 @@ class KalLexer(RegexLexer): include('root'), ], 'waitfor': [ - (r'\n', Punctuation, '#pop'), + (r'\n', Whitespace, '#pop'), (r'\bfrom\b', Keyword), include('root'), ], @@ -221,29 +223,48 @@ class KalLexer(RegexLexer): Operator), (r'\b(and|or|isnt|is|not|but|bitwise|mod|\^|xor|exists|' r'doesnt\s+exist)\b', Operator.Word), - (r'(?:\([^()]+\))?\s*>', Name.Function), + (r'(\([^()]+\))?(\s*)(>)', + bygroups(Name.Function, Whitespace, Punctuation)), (r'[{(]', Punctuation), (r'\[', Punctuation, 'listcomprehension'), (r'[})\].,]', Punctuation), (r'\b(function|method|task)\b', Keyword.Declaration, 'functiondef'), (r'\bclass\b', Keyword.Declaration, 'classdef'), - (r'\b(safe\s+)?wait\s+for\b', Keyword, 'waitfor'), + (r'\b(safe(?=\s))?(\s*)(wait(?=\s))(\s+)(for)\b', + bygroups(Keyword, Whitespace, Keyword, Whitespace, + Keyword), 'waitfor'), (r'\b(me|this)(\.[$a-zA-Z_][\w.$]*)?\b', Name.Variable.Instance), - (r'(?<![.$])(for(\s+(parallel|series))?|in|of|while|until|' - r'break|return|continue|' - r'when|if|unless|else|otherwise|except\s+when|' - r'throw|raise|fail\s+with|try|catch|finally|new|delete|' - r'typeof|instanceof|super|run\s+in\s+parallel|' - r'inherits\s+from)\b', Keyword), - (r'(?<![.$])(true|false|yes|no|on|off|null|nothing|none|' - r'NaN|Infinity|undefined)\b', - Keyword.Constant), - (r'(Array|Boolean|Date|Error|Function|Math|' - r'Number|Object|RegExp|String|decodeURI|' - r'decodeURIComponent|encodeURI|encodeURIComponent|' - r'eval|isFinite|isNaN|isSafeInteger|parseFloat|parseInt|document|' - r'window|globalThis|Symbol|print)\b', Name.Builtin), - (r'[$a-zA-Z_][\w.$]*\s*(:|[+\-*/]?\=)?\b', Name.Variable), + (r'(?<![.$])(run)(\s+)(in)(\s+)(parallel)\b', + bygroups(Keyword, Whitespace, Keyword, Whitespace, Keyword)), + (r'(?<![.$])(for)(\s+)(parallel|series)?\b', + bygroups(Keyword, Whitespace, Keyword)), + (r'(?<![.$])(except)(\s+)(when)?\b', + bygroups(Keyword, Whitespace, Keyword)), + (r'(?<![.$])(fail)(\s+)(with)?\b', + bygroups(Keyword, Whitespace, Keyword)), + (r'(?<![.$])(inherits)(\s+)(from)?\b', + bygroups(Keyword, Whitespace, Keyword)), + (r'(?<![.$])(for)(\s+)(parallel|series)?\b', + bygroups(Keyword, Whitespace, Keyword)), + (words(( + 'in', 'of', 'while', 'until', 'break', 'return', 'continue', + 'when', 'if', 'unless', 'else', 'otherwise', 'throw', 'raise', + 'try', 'catch', 'finally', 'new', 'delete', 'typeof', + 'instanceof', 'super'), prefix=r'(?<![.$])', suffix=r'\b'), + Keyword), + (words(( + 'true', 'false', 'yes', 'no', 'on', 'off', 'null', 'nothing', + 'none', 'NaN', 'Infinity', 'undefined'), prefix=r'(?<![.$])', + suffix=r'\b'), Keyword.Constant), + (words(( + 'Array', 'Boolean', 'Date', 'Error', 'Function', 'Math', + 'Number', 'Object', 'RegExp', 'String', 'decodeURI', + 'decodeURIComponent', 'encodeURI', 'encodeURIComponent', 'eval', + 'isFinite', 'isNaN', 'isSafeInteger', 'parseFloat', 'parseInt', + 'document', 'window', 'globalThis', 'Symbol', 'print'), + suffix=r'\b'), Name.Builtin), + (r'([$a-zA-Z_][\w.$]*)(\s*)(:|[+\-*/]?\=)?\b', + bygroups(Name.Variable, Whitespace, Operator)), (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float), (r'0x[0-9a-fA-F]+', Number.Hex), (r'[0-9]+', Number.Integer), @@ -288,14 +309,13 @@ class KalLexer(RegexLexer): class LiveScriptLexer(RegexLexer): """ - For `LiveScript`_ source code. - - .. _LiveScript: https://livescript.net/ + For LiveScript source code. .. versionadded:: 1.6 """ name = 'LiveScript' + url = 'https://livescript.net/' aliases = ['livescript', 'live-script'] filenames = ['*.ls'] mimetypes = ['text/livescript'] @@ -303,9 +323,9 @@ class LiveScriptLexer(RegexLexer): flags = re.DOTALL tokens = { 'commentsandwhitespace': [ - (r'\s+', Text), + (r'\s+', Whitespace), (r'/\*.*?\*/', Comment.Multiline), - (r'#.*?\n', Comment.Single), + (r'(#.*?)(\n)', bygroups(Comment.Single, Whitespace)), ], 'multilineregex': [ include('commentsandwhitespace'), @@ -346,10 +366,13 @@ class LiveScriptLexer(RegexLexer): r'decodeURIComponent|encodeURI|encodeURIComponent|' r'eval|isFinite|isNaN|parseFloat|parseInt|document|window|' r'globalThis|Symbol|Symbol|BigInt)\b', Name.Builtin), - (r'[$a-zA-Z_][\w.\-:$]*\s*[:=]\s', Name.Variable, - 'slashstartsregex'), - (r'@[$a-zA-Z_][\w.\-:$]*\s*[:=]\s', Name.Variable.Instance, - 'slashstartsregex'), + (r'([$a-zA-Z_][\w.\-:$]*)(\s*)([:=])(\s+)', + bygroups(Name.Variable, Whitespace, Operator, Whitespace), + 'slashstartsregex'), + (r'(@[$a-zA-Z_][\w.\-:$]*)(\s*)([:=])(\s+)', + bygroups(Name.Variable.Instance, Whitespace, Operator, + Whitespace), + 'slashstartsregex'), (r'@', Name.Other, 'slashstartsregex'), (r'@?[$a-zA-Z_][\w-]*', Name.Other, 'slashstartsregex'), (r'[0-9]+\.[0-9]+([eE][0-9]+)?[fd]?(?:[a-zA-Z_]+)?', Number.Float), @@ -399,12 +422,13 @@ class LiveScriptLexer(RegexLexer): class DartLexer(RegexLexer): """ - For `Dart <http://dart.dev/>`_ source code. + For Dart source code. .. versionadded:: 1.5 """ name = 'Dart' + url = 'http://dart.dev/' aliases = ['dart'] filenames = ['*.dart'] mimetypes = ['text/x-dart'] @@ -417,11 +441,11 @@ class DartLexer(RegexLexer): (r'#!(.*?)$', Comment.Preproc), (r'\b(import|export)\b', Keyword, 'import_decl'), (r'\b(library|source|part of|part)\b', Keyword), - (r'[^\S\n]+', Text), - (r'//.*?\n', Comment.Single), + (r'[^\S\n]+', Whitespace), + (r'(//.*?)(\n)', bygroups(Comment.Single, Whitespace)), (r'/\*.*?\*/', Comment.Multiline), (r'\b(class|extension|mixin)\b(\s+)', - bygroups(Keyword.Declaration, Text), 'class'), + bygroups(Keyword.Declaration, Whitespace), 'class'), (r'\b(as|assert|break|case|catch|const|continue|default|do|else|finally|' r'for|if|in|is|new|rethrow|return|super|switch|this|throw|try|while)\b', Keyword), @@ -440,7 +464,7 @@ class DartLexer(RegexLexer): # DIGIT+ (‘.’ DIGIT*)? EXPONENT? (r'\d+(\.\d*)?([eE][+-]?\d+)?', Number), (r'\.\d+([eE][+-]?\d+)?', Number), # ‘.’ DIGIT+ EXPONENT? - (r'\n', Text) + (r'\n', Whitespace) # pseudo-keyword negate intentionally left out ], 'class': [ @@ -448,7 +472,7 @@ class DartLexer(RegexLexer): ], 'import_decl': [ include('string_literal'), - (r'\s+', Text), + (r'\s+', Whitespace), (r'\b(as|deferred|show|hide)\b', Keyword), (r'[a-zA-Z_$]\w*', Name), (r'\,', Punctuation), @@ -502,7 +526,7 @@ class DartLexer(RegexLexer): class LassoLexer(RegexLexer): """ - For `Lasso <http://www.lassosoft.com/>`_ source code, covering both Lasso 9 + For Lasso source code, covering both Lasso 9 syntax and LassoScript for Lasso 8.6 and earlier. For Lasso embedded in HTML, use the `LassoHtmlLexer`. @@ -529,7 +553,7 @@ class LassoLexer(RegexLexer): 'root': [ (r'^#![ \S]+lasso9\b', Comment.Preproc, 'lasso'), (r'(?=\[|<)', Other, 'delimiters'), - (r'\s+', Other), + (r'\s+', Whitespace), default(('delimiters', 'lassofile')), ], 'delimiters': [ @@ -565,8 +589,8 @@ class LassoLexer(RegexLexer): include('lasso'), ], 'whitespacecomments': [ - (r'\s+', Text), - (r'//.*?\n', Comment.Single), + (r'\s+', Whitespace), + (r'(//.*?)(\s*)$', bygroups(Comment.Single, Whitespace)), (r'/\*\*!.*?\*/', String.Doc), (r'/\*.*?\*/', Comment.Multiline), ], @@ -586,18 +610,20 @@ class LassoLexer(RegexLexer): # names (r'\$[a-z_][\w.]*', Name.Variable), (r'#([a-z_][\w.]*|\d+\b)', Name.Variable.Instance), - (r"(\.\s*)('[a-z_][\w.]*')", - bygroups(Name.Builtin.Pseudo, Name.Variable.Class)), - (r"(self)(\s*->\s*)('[a-z_][\w.]*')", - bygroups(Name.Builtin.Pseudo, Operator, Name.Variable.Class)), - (r'(\.\.?\s*)([a-z_][\w.]*(=(?!=))?)', - bygroups(Name.Builtin.Pseudo, Name.Other.Member)), - (r'(->\\?\s*|&\s*)([a-z_][\w.]*(=(?!=))?)', - bygroups(Operator, Name.Other.Member)), + (r"(\.)(\s*)('[a-z_][\w.]*')", + bygroups(Name.Builtin.Pseudo, Whitespace, Name.Variable.Class)), + (r"(self)(\s*)(->)(\s*)('[a-z_][\w.]*')", + bygroups(Name.Builtin.Pseudo, Whitespace, Operator, Whitespace, + Name.Variable.Class)), + (r'(\.\.?)(\s*)([a-z_][\w.]*(=(?!=))?)', + bygroups(Name.Builtin.Pseudo, Whitespace, Name.Other.Member)), + (r'(->\\?|&)(\s*)([a-z_][\w.]*(=(?!=))?)', + bygroups(Operator, Whitespace, Name.Other.Member)), (r'(?<!->)(self|inherited|currentcapture|givenblock)\b', Name.Builtin.Pseudo), (r'-(?!infinity)[a-z_][\w.]*', Name.Attribute), - (r'::\s*[a-z_][\w.]*', Name.Label), + (r'(::)(\s*)([a-z_][\w.]*)', + bygroups(Punctuation, Whitespace, Name.Label)), (r'(error_(code|msg)_\w+|Error_AddError|Error_ColumnRestriction|' r'Error_DatabaseConnectionUnavailable|Error_DatabaseTimeout|' r'Error_DeleteError|Error_FieldRestriction|Error_FileNotFound|' @@ -609,18 +635,20 @@ class LassoLexer(RegexLexer): r'Error_UpdateError)\b', Name.Exception), # definitions - (r'(define)(\s+)([a-z_][\w.]*)(\s*=>\s*)(type|trait|thread)\b', - bygroups(Keyword.Declaration, Text, Name.Class, Operator, Keyword)), - (r'(define)(\s+)([a-z_][\w.]*)(\s*->\s*)([a-z_][\w.]*=?|[-+*/%])', - bygroups(Keyword.Declaration, Text, Name.Class, Operator, - Name.Function), 'signature'), + (r'(define)(\s+)([a-z_][\w.]*)(\s*)(=>)(\s*)(type|trait|thread)\b', + bygroups(Keyword.Declaration, Whitespace, Name.Class, + Whitespace, Operator, Whitespace, Keyword)), + (r'(define)(\s+)([a-z_][\w.]*)(\s*)(->)(\s*)([a-z_][\w.]*=?|[-+*/%])', + bygroups(Keyword.Declaration, Whitespace, Name.Class, + Whitespace, Operator, Whitespace, Name.Function), + 'signature'), (r'(define)(\s+)([a-z_][\w.]*)', - bygroups(Keyword.Declaration, Text, Name.Function), 'signature'), + bygroups(Keyword.Declaration, Whitespace, Name.Function), 'signature'), (r'(public|protected|private|provide)(\s+)(([a-z_][\w.]*=?|[-+*/%])' - r'(?=\s*\())', bygroups(Keyword, Text, Name.Function), + r'(?=\s*\())', bygroups(Keyword, Whitespace, Name.Function), 'signature'), (r'(public|protected|private|provide)(\s+)([a-z_][\w.]*)', - bygroups(Keyword, Text, Name.Function)), + bygroups(Keyword, Whitespace, Name.Function)), # keywords (r'(true|false|none|minimal|full|all|void)\b', Keyword.Constant), @@ -628,8 +656,8 @@ class LassoLexer(RegexLexer): (r'(array|date|decimal|duration|integer|map|pair|string|tag|xml|' r'null|boolean|bytes|keyword|list|locale|queue|set|stack|' r'staticarray)\b', Keyword.Type), - (r'([a-z_][\w.]*)(\s+)(in)\b', bygroups(Name, Text, Keyword)), - (r'(let|into)(\s+)([a-z_][\w.]*)', bygroups(Keyword, Text, Name)), + (r'([a-z_][\w.]*)(\s+)(in)\b', bygroups(Name, Whitespace, Keyword)), + (r'(let|into)(\s+)([a-z_][\w.]*)', bygroups(Keyword, Whitespace, Name)), (r'require\b', Keyword, 'requiresection'), (r'(/?)(Namespace_Using)\b', bygroups(Punctuation, Keyword.Namespace)), (r'(/?)(Cache|Database_Names|Database_SchemaNames|' @@ -655,8 +683,9 @@ class LassoLexer(RegexLexer): # other (r',', Punctuation, 'commamember'), (r'(and|or|not)\b', Operator.Word), - (r'([a-z_][\w.]*)(\s*::\s*[a-z_][\w.]*)?(\s*=(?!=))', - bygroups(Name, Name.Label, Operator)), + (r'([a-z_][\w.]*)(\s*)(::)(\s*)([a-z_][\w.]*)?(\s*=(?!=))', + bygroups(Name, Whitespace, Punctuation, Whitespace, Name.Label, + Operator)), (r'(/?)([\w.]+)', bygroups(Punctuation, Name.Other)), (r'(=)(n?bw|n?ew|n?cn|lte?|gte?|n?eq|n?rx|ft)\b', bygroups(Operator, Operator.Word)), @@ -695,7 +724,8 @@ class LassoLexer(RegexLexer): (r'(([a-z_][\w.]*=?|[-+*/%])(?=\s*\())', Name, 'requiresignature'), (r'(([a-z_][\w.]*=?|[-+*/%])(?=(\s*::\s*[\w.]+)?\s*,))', Name), (r'[a-z_][\w.]*=?|[-+*/%]', Name, '#pop'), - (r'::\s*[a-z_][\w.]*', Name.Label), + (r'(::)(\s*)([a-z_][\w.]*)', + bygroups(Punctuation, Whitespace, Name.Label)), (r',', Punctuation), include('whitespacecomments'), ], @@ -703,7 +733,8 @@ class LassoLexer(RegexLexer): (r'(\)(?=(\s*::\s*[\w.]+)?\s*,))', Punctuation, '#pop'), (r'\)', Punctuation, '#pop:2'), (r'-?[a-z_][\w.]*', Name.Attribute), - (r'::\s*[a-z_][\w.]*', Name.Label), + (r'(::)(\s*)([a-z_][\w.]*)', + bygroups(Punctuation, Whitespace, Name.Label)), (r'\.\.\.', Name.Builtin.Pseudo), (r'[(,]', Punctuation), include('whitespacecomments'), @@ -784,11 +815,11 @@ class ObjectiveJLexer(RegexLexer): using(this))), # class definition - (r'(@interface|@implementation)(\s+)', bygroups(Keyword, Text), + (r'(@interface|@implementation)(\s+)', bygroups(Keyword, Whitespace), 'classname'), - (r'(@class|@protocol)(\s*)', bygroups(Keyword, Text), + (r'(@class|@protocol)(\s*)', bygroups(Keyword, Whitespace), 'forward_classname'), - (r'(\s*)(@end)(\s*)', bygroups(Text, Keyword, Text)), + (r'(\s*)(@end)(\s*)', bygroups(Whitespace, Keyword, Whitespace)), include('statements'), ('[{()}]', Punctuation), @@ -796,20 +827,20 @@ class ObjectiveJLexer(RegexLexer): ], 'whitespace': [ (r'(@import)(\s+)("(?:\\\\|\\"|[^"])*")', - bygroups(Comment.Preproc, Text, String.Double)), + bygroups(Comment.Preproc, Whitespace, String.Double)), (r'(@import)(\s+)(<(?:\\\\|\\>|[^>])*>)', - bygroups(Comment.Preproc, Text, String.Double)), + bygroups(Comment.Preproc, Whitespace, String.Double)), (r'(#(?:include|import))(\s+)("(?:\\\\|\\"|[^"])*")', - bygroups(Comment.Preproc, Text, String.Double)), + bygroups(Comment.Preproc, Whitespace, String.Double)), (r'(#(?:include|import))(\s+)(<(?:\\\\|\\>|[^>])*>)', - bygroups(Comment.Preproc, Text, String.Double)), + bygroups(Comment.Preproc, Whitespace, String.Double)), (r'#if\s+0', Comment.Preproc, 'if0'), (r'#', Comment.Preproc, 'macro'), - (r'\n', Text), - (r'\s+', Text), - (r'\\\n', Text), # line continuation + (r'\s+', Whitespace), + (r'(\\)(\n)', + bygroups(String.Escape, Whitespace)), # line continuation (r'//(\n|(.|\n)*?[^\\]\n)', Comment.Single), (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline), (r'<!--', Comment), @@ -822,7 +853,7 @@ class ObjectiveJLexer(RegexLexer): default('#pop'), ], 'badregex': [ - (r'\n', Text, '#pop'), + (r'\n', Whitespace, '#pop'), ], 'statements': [ (r'(L|@)?"', String, 'string'), @@ -889,10 +920,10 @@ class ObjectiveJLexer(RegexLexer): (r'([a-zA-Z_]\w*)', Name.Class, '#pop'), ], 'forward_classname': [ - (r'([a-zA-Z_]\w*)(\s*,\s*)', - bygroups(Name.Class, Text), '#push'), - (r'([a-zA-Z_]\w*)(\s*;?)', - bygroups(Name.Class, Text), '#pop'), + (r'([a-zA-Z_]\w*)(\s*)(,)(\s*)', + bygroups(Name.Class, Whitespace, Text, Whitespace), '#push'), + (r'([a-zA-Z_]\w*)(\s*)(;?)', + bygroups(Name.Class, Whitespace, Text), '#pop'), ], 'function_signature': [ include('whitespace'), @@ -955,21 +986,21 @@ class ObjectiveJLexer(RegexLexer): (r'"', String, '#pop'), (r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape), (r'[^\\"\n]+', String), # all other characters - (r'\\\n', String), # line continuation + (r'(\\)(\n)', bygroups(String.Escape, Whitespace)), # line continuation (r'\\', String), # stray backslash ], 'macro': [ (r'[^/\n]+', Comment.Preproc), (r'/[*](.|\n)*?[*]/', Comment.Multiline), - (r'//.*?\n', Comment.Single, '#pop'), + (r'(//.*?)(\n)', bygroups(Comment.Single, Whitespace), '#pop'), (r'/', Comment.Preproc), - (r'(?<=\\)\n', Comment.Preproc), - (r'\n', Comment.Preproc, '#pop'), + (r'(?<=\\)\n', Whitespace), + (r'\n', Whitespace, '#pop'), ], 'if0': [ (r'^\s*#if.*?(?<!\\)\n', Comment.Preproc, '#push'), (r'^\s*#endif.*?(?<!\\)\n', Comment.Preproc, '#pop'), - (r'.*?\n', Comment), + (r'(.*?)(\n)', bygroups(Comment, Whitespace)), ] } @@ -982,14 +1013,13 @@ class ObjectiveJLexer(RegexLexer): class CoffeeScriptLexer(RegexLexer): """ - For `CoffeeScript`_ source code. - - .. _CoffeeScript: http://coffeescript.org + For CoffeeScript source code. .. versionadded:: 1.3 """ name = 'CoffeeScript' + url = 'http://coffeescript.org' aliases = ['coffeescript', 'coffee-script', 'coffee'] filenames = ['*.coffee'] mimetypes = ['text/coffeescript'] @@ -1002,9 +1032,9 @@ class CoffeeScriptLexer(RegexLexer): flags = re.DOTALL tokens = { 'commentsandwhitespace': [ - (r'\s+', Text), + (r'\s+', Whitespace), (r'###[^#].*?###', Comment.Multiline), - (r'#(?!##[^#]).*?\n', Comment.Single), + (r'(#(?!##[^#]).*?)(\n)', bygroups(Comment.Single, Whitespace)), ], 'multilineregex': [ (r'[^/#]+', String.Regex), @@ -1043,10 +1073,12 @@ class CoffeeScriptLexer(RegexLexer): r'decodeURIComponent|encodeURI|encodeURIComponent|' r'eval|isFinite|isNaN|parseFloat|parseInt|document|window|globalThis|Symbol)\b', Name.Builtin), - (r'[$a-zA-Z_][\w.:$]*\s*[:=]\s', Name.Variable, - 'slashstartsregex'), - (r'@[$a-zA-Z_][\w.:$]*\s*[:=]\s', Name.Variable.Instance, - 'slashstartsregex'), + (r'([$a-zA-Z_][\w.:$]*)(\s*)([:=])(\s+)', + bygroups(Name.Variable, Whitespace, Operator, Whitespace), + 'slashstartsregex'), + (r'(@[$a-zA-Z_][\w.:$]*)(\s*)([:=])(\s+)', + bygroups(Name.Variable.Instance, Whitespace, Operator, Whitespace), + 'slashstartsregex'), (r'@', Name.Other, 'slashstartsregex'), (r'@?[$a-zA-Z_][\w$]*', Name.Other), (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float), @@ -1095,11 +1127,12 @@ class CoffeeScriptLexer(RegexLexer): class MaskLexer(RegexLexer): """ - For `Mask <https://github.com/atmajs/MaskJS>`__ markup. + For Mask markup. .. versionadded:: 2.0 """ name = 'Mask' + url = 'https://github.com/atmajs/MaskJS' aliases = ['mask'] filenames = ['*.mask'] mimetypes = ['text/x-mask'] @@ -1107,8 +1140,8 @@ class MaskLexer(RegexLexer): flags = re.MULTILINE | re.IGNORECASE | re.DOTALL tokens = { 'root': [ - (r'\s+', Text), - (r'//.*?\n', Comment.Single), + (r'\s+', Whitespace), + (r'(//.*?)(\n)', bygroups(Comment.Single, Whitespace)), (r'/\*.*?\*/', Comment.Multiline), (r'[{};>]', Punctuation), (r"'''", String, 'string-trpl-single'), @@ -1143,19 +1176,23 @@ class MaskLexer(RegexLexer): ], 'interpolation': [ (r'\]', String.Interpol, '#pop'), - (r'\s*:', String.Interpol, 'expression'), - (r'\s*\w+:', Name.Other), + (r'(\s*)(:)', bygroups(Whitespace, String.Interpol), 'expression'), + (r'(\s*)(\w+)(:)', bygroups(Whitespace, Name.Other, Punctuation)), (r'[^\]]+', String.Interpol) ], 'expression': [ (r'[^\]]+', using(JavascriptLexer), '#pop') ], 'node': [ - (r'\s+', Text), + (r'\s+', Whitespace), (r'\.', Name.Variable.Class, 'node-class'), (r'\#', Name.Function, 'node-id'), - (r'style[ \t]*=', Name.Attribute, 'node-attr-style-value'), - (r'[\w:-]+[ \t]*=', Name.Attribute, 'node-attr-value'), + (r'(style)([ \t]*)(=)', + bygroups(Name.Attribute, Whitespace, Operator), + 'node-attr-style-value'), + (r'([\w:-]+)([ \t]*)(=)', + bygroups(Name.Attribute, Whitespace, Operator), + 'node-attr-value'), (r'[\w:-]+', Name.Attribute), (r'[>{;]', Punctuation, '#pop') ], @@ -1170,20 +1207,20 @@ class MaskLexer(RegexLexer): default('#pop') ], 'node-attr-value': [ - (r'\s+', Text), + (r'\s+', Whitespace), (r'\w+', Name.Variable, '#pop'), (r"'", String, 'string-single-pop2'), (r'"', String, 'string-double-pop2'), default('#pop') ], 'node-attr-style-value': [ - (r'\s+', Text), + (r'\s+', Whitespace), (r"'", String.Single, 'css-single-end'), (r'"', String.Single, 'css-double-end'), include('node-attr-value') ], 'css-base': [ - (r'\s+', Text), + (r'\s+', Whitespace), (r";", Punctuation), (r"[\w\-]+\s*:", Name.Builtin) ], @@ -1210,9 +1247,7 @@ class MaskLexer(RegexLexer): class EarlGreyLexer(RegexLexer): """ - For `Earl-Grey`_ source code. - - .. _Earl-Grey: https://breuleux.github.io/earl-grey/ + For Earl-Grey source code. .. versionadded: 2.1 """ @@ -1224,12 +1259,12 @@ class EarlGreyLexer(RegexLexer): tokens = { 'root': [ - (r'\n', Text), + (r'\n', Whitespace), include('control'), (r'[^\S\n]+', Text), - (r';;.*\n', Comment), + (r'(;;.*)(\n)', bygroups(Comment, Whitespace)), (r'[\[\]{}:(),;]', Punctuation), - (r'\\\n', Text), + (r'(\\)(\n)', bygroups(String.Escape, Whitespace)), (r'\\', Text), include('errors'), (words(( @@ -1268,7 +1303,7 @@ class EarlGreyLexer(RegexLexer): bygroups(Punctuation, Name.Class.DBS)), (r'(\[)([\^#][a-zA-Z$_](?:[\w$\-]*[\w$])?)(\])', bygroups(Punctuation, Name.Entity.DBS, Punctuation)), - (r'\s+', Text), + (r'\s+', Whitespace), (r'%', Operator.DBS, '#pop'), ], 'import_paths': [ @@ -1298,8 +1333,8 @@ class EarlGreyLexer(RegexLexer): (?!and|as|each\*|each|in|is|mod|of|or|when|where|with) (?=(?:[+\-*/~^<>%&|?!@#.])?[a-zA-Z$_](?:[\w$-]*[\w$])?)''', Keyword.Control), - (r'([a-zA-Z$_](?:[\w$-]*[\w$])?)(?!\n)\s+(?=[\'"\d{\[(])', - Keyword.Control), + (r'([a-zA-Z$_](?:[\w$-]*[\w$])?)(?!\n)(\s+)(?=[\'"\d{\[(])', + bygroups(Keyword.Control, Whitespace)), (r'''(?x) (?: (?<=[%=])| @@ -1308,11 +1343,11 @@ class EarlGreyLexer(RegexLexer): (?<=each\*|where) )(\s+) ([a-zA-Z$_](?:[\w$-]*[\w$])?)(:)''', - bygroups(Text, Keyword.Control, Punctuation)), + bygroups(Whitespace, Keyword.Control, Punctuation)), (r'''(?x) (?<![+\-*/~^<>%&|?!@#.])(\s+) ([a-zA-Z$_](?:[\w$-]*[\w$])?)(:)''', - bygroups(Text, Keyword.Control, Punctuation)), + bygroups(Whitespace, Keyword.Control, Punctuation)), ], 'nested': [ (r'''(?x) @@ -1426,25 +1461,24 @@ class EarlGreyLexer(RegexLexer): class JuttleLexer(RegexLexer): """ - For `Juttle`_ source code. - - .. _Juttle: https://github.com/juttle/juttle + For Juttle source code. .. versionadded:: 2.2 """ name = 'Juttle' + url = 'http://juttle.github.io/' aliases = ['juttle'] filenames = ['*.juttle'] mimetypes = ['application/juttle', 'application/x-juttle', 'text/x-juttle', 'text/juttle'] - flags = re.DOTALL | re.UNICODE | re.MULTILINE + flags = re.DOTALL | re.MULTILINE tokens = { 'commentsandwhitespace': [ - (r'\s+', Text), - (r'//.*?\n', Comment.Single), + (r'\s+', Whitespace), + (r'(//.*?)(\n)', bygroups(Comment.Single, Whitespace)), (r'/\*.*?\*/', Comment.Multiline) ], 'slashstartsregex': [ @@ -1525,8 +1559,9 @@ class NodeConsoleLexer(Lexer): for match in line_re.finditer(text): line = match.group() if line.startswith('> '): - insertions.append((len(curcode), - [(0, Generic.Prompt, line[:2])])) + insertions.append((len(curcode), + [(0, Generic.Prompt, line[:1]), + (1, Whitespace, line[1:2])])) curcode += line[2:] elif line.startswith('...'): @@ -1534,21 +1569,21 @@ class NodeConsoleLexer(Lexer): code = line.lstrip('.') lead = len(line) - len(code) - insertions.append((len(curcode), + insertions.append((len(curcode), [(0, Generic.Prompt, line[:lead])])) curcode += code else: if curcode: - yield from do_insertions(insertions, + yield from do_insertions(insertions, jslexer.get_tokens_unprocessed(curcode)) curcode = '' insertions = [] - yield from do_insertions([], + yield from do_insertions([], jslexer.get_tokens_unprocessed(line)) if curcode: - yield from do_insertions(insertions, + yield from do_insertions(insertions, jslexer.get_tokens_unprocessed(curcode)) diff --git a/contrib/python/Pygments/py3/pygments/lexers/jslt.py b/contrib/python/Pygments/py3/pygments/lexers/jslt.py index f4f14a685b..b6554e5d36 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/jslt.py +++ b/contrib/python/Pygments/py3/pygments/lexers/jslt.py @@ -4,7 +4,7 @@ Lexers for the JSLT language - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -21,11 +21,12 @@ _WORD_END = r'(?=[^0-9A-Z_a-z-])' class JSLTLexer(RegexLexer): """ - For `JSLT <https://github.com/schibsted/jslt>`_ source. + For JSLT source. .. versionadded:: 2.10 """ name = 'JSLT' + url = 'https://github.com/schibsted/jslt' filenames = ['*.jslt'] aliases = ['jslt'] mimetypes = ['text/x-jslt'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/julia.py b/contrib/python/Pygments/py3/pygments/lexers/julia.py index 390d5d7158..97d9163af0 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/julia.py +++ b/contrib/python/Pygments/py3/pygments/lexers/julia.py @@ -4,7 +4,7 @@ Lexers for the Julia language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -13,7 +13,7 @@ import re from pygments.lexer import Lexer, RegexLexer, bygroups, do_insertions, \ words, include from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ - Number, Punctuation, Generic + Number, Punctuation, Generic, Whitespace from pygments.util import shebang_matches from pygments.lexers._julia_builtins import OPERATORS_LIST, DOTTED_OPERATORS_LIST, \ KEYWORD_LIST, BUILTIN_LIST, LITERAL_LIST @@ -28,22 +28,21 @@ operator_suffixes = r'[²³¹ʰʲʳʷʸˡˢˣᴬᴮᴰᴱᴳᴴᴵᴶᴷᴸᴹ class JuliaLexer(RegexLexer): """ - For `Julia <http://julialang.org/>`_ source code. + For Julia source code. .. versionadded:: 1.6 """ name = 'Julia' + url = 'https://julialang.org/' aliases = ['julia', 'jl'] filenames = ['*.jl'] mimetypes = ['text/x-julia', 'application/x-julia'] - flags = re.MULTILINE | re.UNICODE - tokens = { 'root': [ - (r'\n', Text), - (r'[^\S\n]+', Text), + (r'\n', Whitespace), + (r'[^\S\n]+', Whitespace), (r'#=', Comment.Multiline, "blockcomment"), (r'#.*$', Comment), (r'[\[\](),;]', Punctuation), @@ -51,23 +50,23 @@ class JuliaLexer(RegexLexer): # symbols # intercept range expressions first (r'(' + allowed_variable + r')(\s*)(:)(' + allowed_variable + ')', - bygroups(Name, Text, Operator, Name)), + bygroups(Name, Whitespace, Operator, Name)), # then match :name which does not follow closing brackets, digits, or the # ::, <:, and :> operators (r'(?<![\]):<>\d.])(:' + allowed_variable + ')', String.Symbol), # type assertions - excludes expressions like ::typeof(sin) and ::avec[1] - (r'(?<=::)(\s*)(' + allowed_variable + r')\b(?![(\[])', bygroups(Text, Keyword.Type)), + (r'(?<=::)(\s*)(' + allowed_variable + r')\b(?![(\[])', bygroups(Whitespace, Keyword.Type)), # type comparisons # - MyType <: A or MyType >: A ('(' + allowed_variable + r')(\s*)([<>]:)(\s*)(' + allowed_variable + r')\b(?![(\[])', - bygroups(Keyword.Type, Text, Operator, Text, Keyword.Type)), + bygroups(Keyword.Type, Whitespace, Operator, Whitespace, Keyword.Type)), # - <: B or >: B (r'([<>]:)(\s*)(' + allowed_variable + r')\b(?![(\[])', - bygroups(Operator, Text, Keyword.Type)), + bygroups(Operator, Whitespace, Keyword.Type)), # - A <: or A >: (r'\b(' + allowed_variable + r')(\s*)([<>]:)', - bygroups(Keyword.Type, Text, Operator)), + bygroups(Keyword.Type, Whitespace, Operator)), # operators # Suffixes aren't actually allowed on all operators, but we'll ignore that @@ -110,12 +109,16 @@ class JuliaLexer(RegexLexer): bygroups(Keyword.Type, Punctuation), 'curly'), # - names as part of bare 'where' (r'(where)(\s+)(' + allowed_variable + ')', - bygroups(Keyword, Text, Keyword.Type)), + bygroups(Keyword, Whitespace, Keyword.Type)), # - curly expressions in general (r'(\{)', Punctuation, 'curly'), # - names as part of type declaration - (r'(abstract[ \t]+type|primitive[ \t]+type|mutable[ \t]+struct|struct)([\s()]+)(' + - allowed_variable + r')', bygroups(Keyword, Text, Keyword.Type)), + (r'(abstract|primitive)([ \t]+)(type\b)([\s()]+)(' + + allowed_variable + r')', + bygroups(Keyword, Whitespace, Keyword, Text, Keyword.Type)), + (r'(mutable(?=[ \t]))?([ \t]+)?(struct\b)([\s()]+)(' + + allowed_variable + r')', + bygroups(Keyword, Whitespace, Keyword, Text, Keyword.Type)), # macros (r'@' + allowed_variable, Name.Decorator), @@ -261,7 +264,7 @@ class JuliaConsoleLexer(Lexer): output = False error = False elif line.startswith(' ') and not output: - insertions.append((len(curcode), [(0, Text, line[:6])])) + insertions.append((len(curcode), [(0, Whitespace, line[:6])])) curcode += line[6:] else: if curcode: diff --git a/contrib/python/Pygments/py3/pygments/lexers/jvm.py b/contrib/python/Pygments/py3/pygments/lexers/jvm.py index 4ffc5c7fdf..d053e3732e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/jvm.py +++ b/contrib/python/Pygments/py3/pygments/lexers/jvm.py @@ -4,7 +4,7 @@ Pygments lexers for JVM languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -13,7 +13,7 @@ import re from pygments.lexer import Lexer, RegexLexer, include, bygroups, using, \ this, combined, default, words from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ - Number, Punctuation + Number, Punctuation, Whitespace from pygments.util import shebang_matches from pygments import unistring as uni @@ -25,22 +25,23 @@ __all__ = ['JavaLexer', 'ScalaLexer', 'GosuLexer', 'GosuTemplateLexer', class JavaLexer(RegexLexer): """ - For `Java <https://www.oracle.com/technetwork/java/>`_ source code. + For Java source code. """ name = 'Java' + url = 'https://www.oracle.com/technetwork/java/' aliases = ['java'] filenames = ['*.java'] mimetypes = ['text/x-java'] - flags = re.MULTILINE | re.DOTALL | re.UNICODE + flags = re.MULTILINE | re.DOTALL tokens = { 'root': [ (r'(^\s*)((?:(?:public|private|protected|static|strictfp)(?:\s+))*)(record)\b', - bygroups(Text, using(this), Keyword.Declaration), 'class'), - (r'[^\S\n]+', Text), - (r'//.*?\n', Comment.Single), + bygroups(Whitespace, using(this), Keyword.Declaration), 'class'), + (r'[^\S\n]+', Whitespace), + (r'(//.*?)(\n)', bygroups(Comment.Single, Whitespace)), (r'/\*.*?\*/', Comment.Multiline), # keywords: go before method names to avoid lexing "throw new XYZ" # as a method signature @@ -51,26 +52,25 @@ class JavaLexer(RegexLexer): (r'((?:(?:[^\W\d]|\$)[\w.\[\]$<>]*\s+)+?)' # return arguments r'((?:[^\W\d]|\$)[\w$]*)' # method name r'(\s*)(\()', # signature start - bygroups(using(this), Name.Function, Text, Punctuation)), + bygroups(using(this), Name.Function, Whitespace, Punctuation)), (r'@[^\W\d][\w.]*', Name.Decorator), (r'(abstract|const|enum|extends|final|implements|native|private|' r'protected|public|sealed|static|strictfp|super|synchronized|throws|' r'transient|volatile|yield)\b', Keyword.Declaration), (r'(boolean|byte|char|double|float|int|long|short|void)\b', Keyword.Type), - (r'(package)(\s+)', bygroups(Keyword.Namespace, Text), 'import'), + (r'(package)(\s+)', bygroups(Keyword.Namespace, Whitespace), 'import'), (r'(true|false|null)\b', Keyword.Constant), (r'(class|interface)\b', Keyword.Declaration, 'class'), - (r'(var)(\s+)', bygroups(Keyword.Declaration, Text), - 'var'), - (r'(import(?:\s+static)?)(\s+)', bygroups(Keyword.Namespace, Text), + (r'(var)(\s+)', bygroups(Keyword.Declaration, Whitespace), 'var'), + (r'(import(?:\s+static)?)(\s+)', bygroups(Keyword.Namespace, Whitespace), 'import'), (r'"', String, 'string'), (r"'\\.'|'[^\\]'|'\\u[0-9a-fA-F]{4}'", String.Char), (r'(\.)((?:[^\W\d]|\$)[\w$]*)', bygroups(Punctuation, Name.Attribute)), - (r'^(\s*)(default)(:)', bygroups(Text, Keyword, Punctuation)), - (r'^(\s*)((?:[^\W\d]|\$)[\w$]*)(:)', bygroups(Text, Name.Label, + (r'^(\s*)(default)(:)', bygroups(Whitespace, Keyword, Punctuation)), + (r'^(\s*)((?:[^\W\d]|\$)[\w$]*)(:)', bygroups(Whitespace, Name.Label, Punctuation)), (r'([^\W\d]|\$)[\w$]*', Name), (r'([0-9][0-9_]*\.([0-9][0-9_]*)?|' @@ -87,7 +87,7 @@ class JavaLexer(RegexLexer): (r'0|[1-9][0-9_]*[lL]?', Number.Integer), (r'[~^*!%&\[\]<>|+=/?-]', Operator), (r'[{}();:.,]', Punctuation), - (r'\n', Text) + (r'\n', Whitespace) ], 'class': [ (r'\s+', Text), @@ -111,12 +111,13 @@ class JavaLexer(RegexLexer): class AspectJLexer(JavaLexer): """ - For `AspectJ <http://www.eclipse.org/aspectj/>`_ source code. + For AspectJ source code. .. versionadded:: 1.6 """ name = 'AspectJ' + url = 'http://www.eclipse.org/aspectj/' aliases = ['aspectj'] filenames = ['*.aj'] mimetypes = ['text/x-aspectj'] @@ -150,10 +151,11 @@ class AspectJLexer(JavaLexer): class ScalaLexer(RegexLexer): """ - For `Scala <http://www.scala-lang.org>`_ source code. + For Scala source code. """ name = 'Scala' + url = 'http://www.scala-lang.org' aliases = ['scala'] filenames = ['*.scala'] mimetypes = ['text/x-scala'] @@ -221,7 +223,7 @@ class ScalaLexer(RegexLexer): # Includes: 'whitespace': [ - (r'\s+', Text), + (r'\s+', Whitespace), ], 'comments': [ (r'//.*?\n', Comment.Single), @@ -231,12 +233,12 @@ class ScalaLexer(RegexLexer): (r'^#!([^\n]*)$', Comment.Hashbang), ], 'imports': [ - (r'\b(import)(\s+)', bygroups(Keyword, Text), 'import-path'), + (r'\b(import)(\s+)', bygroups(Keyword, Whitespace), 'import-path'), ], 'exports': [ (r'\b(export)(\s+)(given)(\s+)', - bygroups(Keyword, Text, Keyword, Text), 'export-path'), - (r'\b(export)(\s+)', bygroups(Keyword, Text), 'export-path'), + bygroups(Keyword, Whitespace, Keyword, Whitespace), 'export-path'), + (r'\b(export)(\s+)', bygroups(Keyword, Whitespace), 'export-path'), ], 'storage-modifiers': [ (words(storage_modifiers, prefix=r'\b', suffix=r'\b'), Keyword), @@ -253,56 +255,56 @@ class ScalaLexer(RegexLexer): 'using': [ # using is a soft keyword, can only be used in the first position of # a parameter or argument list. - (r'(\()(\s*)(using)(\s)', bygroups(Punctuation, Text, Keyword, Text)), + (r'(\()(\s*)(using)(\s)', bygroups(Punctuation, Whitespace, Keyword, Whitespace)), ], 'declarations': [ (r'\b(def)\b(\s*)%s(%s)?' % (notStartOfComment, anyId), - bygroups(Keyword, Text, Name.Function)), + bygroups(Keyword, Whitespace, Name.Function)), (r'\b(trait)\b(\s*)%s(%s)?' % (notStartOfComment, anyId), - bygroups(Keyword, Text, Name.Class)), + bygroups(Keyword, Whitespace, Name.Class)), (r'\b(?:(case)(\s+))?(class|object|enum)\b(\s*)%s(%s)?' % (notStartOfComment, anyId), - bygroups(Keyword, Text, Keyword, Text, Name.Class)), + bygroups(Keyword, Whitespace, Keyword, Whitespace, Name.Class)), (r'(?<!\.)\b(type)\b(\s*)%s(%s)?' % (notStartOfComment, anyId), - bygroups(Keyword, Text, Name.Class)), + bygroups(Keyword, Whitespace, Name.Class)), (r'\b(val|var)\b', Keyword.Declaration), (r'\b(package)(\s+)(object)\b(\s*)%s(%s)?' % (notStartOfComment, anyId), - bygroups(Keyword, Text, Keyword, Text, Name.Namespace)), - (r'\b(package)(\s+)', bygroups(Keyword, Text), 'package'), + bygroups(Keyword, Whitespace, Keyword, Whitespace, Name.Namespace)), + (r'\b(package)(\s+)', bygroups(Keyword, Whitespace), 'package'), (r'\b(given)\b(\s*)(%s)' % idUpper, - bygroups(Keyword, Text, Name.Class)), + bygroups(Keyword, Whitespace, Name.Class)), (r'\b(given)\b(\s*)(%s)?' % anyId, - bygroups(Keyword, Text, Name)), + bygroups(Keyword, Whitespace, Name)), ], 'inheritance': [ (r'\b(extends|with|derives)\b(\s*)' r'(%s|%s|(?=\([^\)]+=>)|(?=%s)|(?="))?' % (idUpper, backQuotedId, plainid), - bygroups(Keyword, Text, Name.Class)), + bygroups(Keyword, Whitespace, Name.Class)), ], 'extension': [ - (r'\b(extension)(\s+)(?=[\[\(])', bygroups(Keyword, Text)), + (r'\b(extension)(\s+)(?=[\[\(])', bygroups(Keyword, Whitespace)), ], 'end': [ # end is a soft keyword, should only be highlighted in certain cases (r'\b(end)(\s+)(if|while|for|match|new|extension|val|var)\b', - bygroups(Keyword, Text, Keyword)), + bygroups(Keyword, Whitespace, Keyword)), (r'\b(end)(\s+)(%s)%s' % (idUpper, endOfLineMaybeWithComment), - bygroups(Keyword, Text, Name.Class)), + bygroups(Keyword, Whitespace, Name.Class)), (r'\b(end)(\s+)(%s|%s)?%s' % (backQuotedId, plainid, endOfLineMaybeWithComment), - bygroups(Keyword, Text, Name.Namespace)), + bygroups(Keyword, Whitespace, Name.Namespace)), ], 'punctuation': [ (r'[{}()\[\];,.]', Punctuation), - (r'(?<!:):(?!:)', Punctuation), + (r'(?<!:):(?!:)', Punctuation), ], 'keywords': [ (words(keywords, prefix=r'\b', suffix=r'\b'), Keyword), ], 'operators': [ - (r'(%s{2,})(\s+)' % opchar, bygroups(Operator, Text)), + (r'(%s{2,})(\s+)' % opchar, bygroups(Operator, Whitespace)), (r'/(?![/*])', Operator), (words(operators), Operator), (r'(?<!%s)(!|&&|\|\|)(?!%s)' % (opchar, opchar), Operator), @@ -334,7 +336,7 @@ class ScalaLexer(RegexLexer): (r'(\.)(type)\b', bygroups(Punctuation, Keyword)), ], 'inline': [ - # inline is a soft modifer, only highlighted if followed by if, + # inline is a soft modifier, only highlighted if followed by if, # match or parameters. (r'\b(inline)(?=\s+(%s|%s)\s*:)' % (plainid, backQuotedId), Keyword), @@ -422,7 +424,7 @@ class ScalaLexer(RegexLexer): (r'(%s)(\.)' % anyId, bygroups(Name.Namespace, Punctuation)), (r'\.', Punctuation), (anyId, Name), - (r'[^\S\n]+', Text), + (r'[^\S\n]+', Whitespace), ], 'interpolated-string-common': [ (r'[^"$\\]+', String), @@ -455,8 +457,8 @@ class GosuLexer(RegexLexer): (r'^(\s*(?:[a-zA-Z_][\w.\[\]]*\s+)+?)' # modifiers etc. r'([a-zA-Z_]\w*)' # method name r'(\s*)(\()', # signature start - bygroups(using(this), Name.Function, Text, Operator)), - (r'[^\S\n]+', Text), + bygroups(using(this), Name.Function, Whitespace, Operator)), + (r'[^\S\n]+', Whitespace), (r'//.*?\n', Comment.Single), (r'/\*.*?\*/', Comment.Multiline), (r'@[a-zA-Z_][\w.]*', Name.Decorator), @@ -467,15 +469,15 @@ class GosuLexer(RegexLexer): (r'(var|delegate|construct|function|private|internal|protected|' r'public|abstract|override|final|static|extends|transient|' r'implements|represents|readonly)\b', Keyword.Declaration), - (r'(property\s+)(get|set)?', Keyword.Declaration), + (r'(property)(\s+)(get|set)?', bygroups(Keyword.Declaration, Whitespace, Keyword.Declaration)), (r'(boolean|byte|char|double|float|int|long|short|void|block)\b', Keyword.Type), - (r'(package)(\s+)', bygroups(Keyword.Namespace, Text)), + (r'(package)(\s+)', bygroups(Keyword.Namespace, Whitespace)), (r'(true|false|null|NaN|Infinity)\b', Keyword.Constant), (r'(class|interface|enhancement|enum)(\s+)([a-zA-Z_]\w*)', - bygroups(Keyword.Declaration, Text, Name.Class)), + bygroups(Keyword.Declaration, Whitespace, Name.Class)), (r'(uses)(\s+)([\w.]+\*?)', - bygroups(Keyword.Namespace, Text, Name.Namespace)), + bygroups(Keyword.Namespace, Whitespace, Name.Namespace)), (r'"', String, 'string'), (r'(\??[.#])([a-zA-Z_]\w*)', bygroups(Operator, Name.Attribute)), @@ -485,7 +487,7 @@ class GosuLexer(RegexLexer): (r'and|or|not|[\\~^*!%&\[\](){}<>|+=:;,./?-]', Operator), (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float), (r'[0-9]+', Number.Integer), - (r'\n', Text) + (r'\n', Whitespace) ], 'templateText': [ (r'(\\<)|(\\\$)', String), @@ -534,12 +536,13 @@ class GosuTemplateLexer(Lexer): class GroovyLexer(RegexLexer): """ - For `Groovy <http://groovy.codehaus.org/>`_ source code. + For Groovy source code. .. versionadded:: 1.5 """ name = 'Groovy' + url = 'https://groovy-lang.org/' aliases = ['groovy'] filenames = ['*.groovy','*.gradle'] mimetypes = ['text/x-groovy'] @@ -553,8 +556,8 @@ class GroovyLexer(RegexLexer): default('base'), ], 'base': [ - (r'[^\S\n]+', Text), - (r'//.*?\n', Comment.Single), + (r'[^\S\n]+', Whitespace), + (r'(//.*?)(\n)', bygroups(Comment.Single, Whitespace)), (r'/\*.*?\*/', Comment.Multiline), # keywords: go before method names to avoid lexing "throw new XYZ" # as a method signature @@ -569,18 +572,18 @@ class GroovyLexer(RegexLexer): r"|'(?:\\\\|\\[^\\]|[^'\\])*'" # or single-quoted method name r')' r'(\s*)(\()', # signature start - bygroups(using(this), Name.Function, Text, Operator)), + bygroups(using(this), Name.Function, Whitespace, Operator)), (r'@[a-zA-Z_][\w.]*', Name.Decorator), (r'(abstract|const|enum|extends|final|implements|native|private|' r'protected|public|static|strictfp|super|synchronized|throws|' r'transient|volatile)\b', Keyword.Declaration), (r'(def|boolean|byte|char|double|float|int|long|short|void)\b', Keyword.Type), - (r'(package)(\s+)', bygroups(Keyword.Namespace, Text)), + (r'(package)(\s+)', bygroups(Keyword.Namespace, Whitespace)), (r'(true|false|null)\b', Keyword.Constant), - (r'(class|interface)(\s+)', bygroups(Keyword.Declaration, Text), + (r'(class|interface)(\s+)', bygroups(Keyword.Declaration, Whitespace), 'class'), - (r'(import)(\s+)', bygroups(Keyword.Namespace, Text), 'import'), + (r'(import)(\s+)', bygroups(Keyword.Namespace, Whitespace), 'import'), (r'""".*?"""', String.Double), (r"'''.*?'''", String.Single), (r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double), @@ -595,7 +598,7 @@ class GroovyLexer(RegexLexer): (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float), (r'0x[0-9a-fA-F]+', Number.Hex), (r'[0-9]+L?', Number.Integer), - (r'\n', Text) + (r'\n', Whitespace) ], 'class': [ (r'[a-zA-Z_]\w*', Name.Class, '#pop') @@ -611,12 +614,13 @@ class GroovyLexer(RegexLexer): class IokeLexer(RegexLexer): """ - For `Ioke <http://ioke.org/>`_ (a strongly typed, dynamic, + For Ioke (a strongly typed, dynamic, prototype based programming language) source. .. versionadded:: 1.4 """ name = 'Ioke' + url = 'https://ioke.org/' filenames = ['*.ik'] aliases = ['ioke', 'ik'] mimetypes = ['text/x-iokesrc'] @@ -665,8 +669,8 @@ class IokeLexer(RegexLexer): ], 'root': [ - (r'\n', Text), - (r'\s+', Text), + (r'\n', Whitespace), + (r'\s+', Whitespace), # Comments (r';(.*?)\n', Comment), @@ -684,7 +688,7 @@ class IokeLexer(RegexLexer): # Documentation (r'((?<=fn\()|(?<=fnx\()|(?<=method\()|(?<=macro\()|(?<=lecro\()' r'|(?<=syntax\()|(?<=dmacro\()|(?<=dlecro\()|(?<=dlecrox\()' - r'|(?<=dsyntax\())\s*"', String.Doc, 'documentation'), + r'|(?<=dsyntax\())(\s*)"', String.Doc, 'documentation'), # Text (r'"', String, 'text'), @@ -802,13 +806,14 @@ class IokeLexer(RegexLexer): class ClojureLexer(RegexLexer): """ - Lexer for `Clojure <http://clojure.org/>`_ source code. + Lexer for Clojure source code. .. versionadded:: 0.11 """ name = 'Clojure' + url = 'http://clojure.org/' aliases = ['clojure', 'clj'] - filenames = ['*.clj'] + filenames = ['*.clj', '*.cljc'] mimetypes = ['text/x-clojure', 'application/x-clojure'] special_forms = ( @@ -889,10 +894,12 @@ class ClojureLexer(RegexLexer): (r';.*$', Comment.Single), # whitespaces - usually not relevant - (r'[,\s]+', Text), + (r',+', Text), + (r'\s+', Whitespace), # numbers (r'-?\d+\.\d+', Number.Float), + (r'-?\d+/\d+', Number), (r'-?\d+', Number.Integer), (r'0x-?[abcdef\d]+', Number.Hex), @@ -940,12 +947,12 @@ class ClojureLexer(RegexLexer): class ClojureScriptLexer(ClojureLexer): """ - Lexer for `ClojureScript <http://clojure.org/clojurescript>`_ - source code. + Lexer for ClojureScript source code. .. versionadded:: 2.0 """ name = 'ClojureScript' + url = 'http://clojure.org/clojurescript' aliases = ['clojurescript', 'cljs'] filenames = ['*.cljs'] mimetypes = ['text/x-clojurescript', 'application/x-clojurescript'] @@ -953,7 +960,7 @@ class ClojureScriptLexer(ClojureLexer): class TeaLangLexer(RegexLexer): """ - For `Tea <http://teatrove.org/>`_ source code. Only used within a + For Tea source code. Only used within a TeaTemplateLexer. .. versionadded:: 1.5 @@ -967,17 +974,17 @@ class TeaLangLexer(RegexLexer): (r'^(\s*(?:[a-zA-Z_][\w\.\[\]]*\s+)+?)' # return arguments r'([a-zA-Z_]\w*)' # method name r'(\s*)(\()', # signature start - bygroups(using(this), Name.Function, Text, Operator)), - (r'[^\S\n]+', Text), - (r'//.*?\n', Comment.Single), + bygroups(using(this), Name.Function, Whitespace, Operator)), + (r'[^\S\n]+', Whitespace), + (r'(//.*?)(\n)', bygroups(Comment.Single, Whitespace)), (r'/\*.*?\*/', Comment.Multiline), (r'@[a-zA-Z_][\w\.]*', Name.Decorator), (r'(and|break|else|foreach|if|in|not|or|reverse)\b', Keyword), (r'(as|call|define)\b', Keyword.Declaration), (r'(true|false|null)\b', Keyword.Constant), - (r'(template)(\s+)', bygroups(Keyword.Declaration, Text), 'template'), - (r'(import)(\s+)', bygroups(Keyword.Namespace, Text), 'import'), + (r'(template)(\s+)', bygroups(Keyword.Declaration, Whitespace), 'template'), + (r'(import)(\s+)', bygroups(Keyword.Namespace, Whitespace), 'import'), (r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double), (r"'(\\\\|\\[^\\]|[^'\\])*'", String.Single), (r'(\.)([a-zA-Z_]\w*)', bygroups(Operator, Name.Attribute)), @@ -987,7 +994,7 @@ class TeaLangLexer(RegexLexer): (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float), (r'0x[0-9a-fA-F]+', Number.Hex), (r'[0-9]+L?', Number.Integer), - (r'\n', Text) + (r'\n', Whitespace) ], 'template': [ (r'[a-zA-Z_]\w*', Name.Class, '#pop') @@ -1000,12 +1007,13 @@ class TeaLangLexer(RegexLexer): class CeylonLexer(RegexLexer): """ - For `Ceylon <http://ceylon-lang.org/>`_ source code. + For Ceylon source code. .. versionadded:: 1.6 """ name = 'Ceylon' + url = 'http://ceylon-lang.org/' aliases = ['ceylon'] filenames = ['*.ceylon'] mimetypes = ['text/x-ceylon'] @@ -1021,9 +1029,9 @@ class CeylonLexer(RegexLexer): (r'^(\s*(?:[a-zA-Z_][\w.\[\]]*\s+)+?)' # return arguments r'([a-zA-Z_]\w*)' # method name r'(\s*)(\()', # signature start - bygroups(using(this), Name.Function, Text, Operator)), - (r'[^\S\n]+', Text), - (r'//.*?\n', Comment.Single), + bygroups(using(this), Name.Function, Whitespace, Operator)), + (r'[^\S\n]+', Whitespace), + (r'(//.*?)(\n)', bygroups(Comment.Single, Whitespace)), (r'/\*', Comment.Multiline, 'comment'), (r'(shared|abstract|formal|default|actual|variable|deprecated|small|' r'late|literal|doc|by|see|throws|optional|license|tagged|final|native|' @@ -1035,11 +1043,11 @@ class CeylonLexer(RegexLexer): r'super|given|of|out|assign)\b', Keyword.Declaration), (r'(function|value|void|new)\b', Keyword.Type), - (r'(assembly|module|package)(\s+)', bygroups(Keyword.Namespace, Text)), + (r'(assembly|module|package)(\s+)', bygroups(Keyword.Namespace, Whitespace)), (r'(true|false|null)\b', Keyword.Constant), (r'(class|interface|object|alias)(\s+)', - bygroups(Keyword.Declaration, Text), 'class'), - (r'(import)(\s+)', bygroups(Keyword.Namespace, Text), 'import'), + bygroups(Keyword.Declaration, Whitespace), 'class'), + (r'(import)(\s+)', bygroups(Keyword.Namespace, Whitespace), 'import'), (r'"(\\\\|\\[^\\]|[^"\\])*"', String), (r"'\\.'|'[^\\]'|'\\\{#[0-9a-fA-F]{4}\}'", String.Char), (r'(\.)([a-z_]\w*)', @@ -1059,7 +1067,7 @@ class CeylonLexer(RegexLexer): (r'\$[01]+', Number.Bin), (r'\d{1,3}(_\d{3})+[kMGTP]?', Number.Integer), (r'[0-9]+[kMGTP]?', Number.Integer), - (r'\n', Text) + (r'\n', Whitespace) ], 'class': [ (r'[A-Za-z_]\w*', Name.Class, '#pop') @@ -1079,18 +1087,18 @@ class CeylonLexer(RegexLexer): class KotlinLexer(RegexLexer): """ - For `Kotlin <http://kotlinlang.org/>`_ - source code. + For Kotlin source code. .. versionadded:: 1.5 """ name = 'Kotlin' + url = 'http://kotlinlang.org/' aliases = ['kotlin'] filenames = ['*.kt', '*.kts'] mimetypes = ['text/x-kotlin'] - flags = re.MULTILINE | re.DOTALL | re.UNICODE + flags = re.MULTILINE | re.DOTALL kt_name = ('@?[_' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl') + ']' + '[' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl', 'Nd', 'Pc', 'Cf', @@ -1111,13 +1119,13 @@ class KotlinLexer(RegexLexer): tokens = { 'root': [ # Whitespaces - (r'[^\S\n]+', Text), - (r'\s+', Text), - (r'\\\n', Text), # line continuation - (r'\n', Text), + (r'[^\S\n]+', Whitespace), + (r'\s+', Whitespace), + (r'\\$', String.Escape), # line continuation + (r'\n', Whitespace), # Comments - (r'//.*?\n', Comment.Single), - (r'^#!/.+?\n', Comment.Single), # shebang for kotlin scripts + (r'(//.*?)(\n)', bygroups(Comment.Single, Whitespace)), + (r'^(#!/.+?)(\n)', bygroups(Comment.Single, Whitespace)), # shebang for kotlin scripts (r'/[*].*?[*]/', Comment.Multiline), # Keywords (r'as\?', Keyword), @@ -1133,7 +1141,7 @@ class KotlinLexer(RegexLexer): # Constants (r'(true|false|null)\b', Keyword.Constant), # Imports - (r'(package|import)(\s+)(\S+)', bygroups(Keyword, Text, Name.Namespace)), + (r'(package|import)(\s+)(\S+)', bygroups(Keyword, Whitespace, Name.Namespace)), # Dot access (r'(\?\.)((?:[^\W\d]|\$)[\w$]*)', bygroups(Operator, Name.Attribute)), (r'(\.)((?:[^\W\d]|\$)[\w$]*)', bygroups(Punctuation, Name.Attribute)), @@ -1142,18 +1150,18 @@ class KotlinLexer(RegexLexer): # Labels (r'[^\W\d][\w.]+@', Name.Decorator), # Object expression - (r'(object)(\s+)(:)(\s+)', bygroups(Keyword, Text, Punctuation, Text), 'class'), + (r'(object)(\s+)(:)(\s+)', bygroups(Keyword, Whitespace, Punctuation, Whitespace), 'class'), # Types (r'((?:(?:' + modifiers + r'|fun)\s+)*)(class|interface|object)(\s+)', - bygroups(using(this, state='modifiers'), Keyword.Declaration, Text), 'class'), + bygroups(using(this, state='modifiers'), Keyword.Declaration, Whitespace), 'class'), # Variables - (r'(var|val)(\s+)(\()', bygroups(Keyword.Declaration, Text, Punctuation), + (r'(var|val)(\s+)(\()', bygroups(Keyword.Declaration, Whitespace, Punctuation), 'destructuring_assignment'), (r'((?:(?:' + modifiers + r')\s+)*)(var|val)(\s+)', - bygroups(using(this, state='modifiers'), Keyword.Declaration, Text), 'variable'), + bygroups(using(this, state='modifiers'), Keyword.Declaration, Whitespace), 'variable'), # Functions (r'((?:(?:' + modifiers + r')\s+)*)(fun)(\s+)', - bygroups(using(this, state='modifiers'), Keyword.Declaration, Text), 'function'), + bygroups(using(this, state='modifiers'), Keyword.Declaration, Whitespace), 'function'), # Operators (r'::|!!|\?[:.]', Operator), (r'[~^*!%&\[\]<>|+=/?-]', Operator), @@ -1177,9 +1185,9 @@ class KotlinLexer(RegexLexer): ], 'destructuring_assignment': [ (r',', Punctuation), - (r'\s+', Text), + (r'\s+', Whitespace), (kt_id, Name.Variable), - (r'(:)(\s+)(' + kt_id + ')', bygroups(Punctuation, Text, Name)), + (r'(:)(\s+)(' + kt_id + ')', bygroups(Punctuation, Whitespace, Name)), (r'<', Operator, 'generic'), (r'\)', Punctuation, '#pop') ], @@ -1189,16 +1197,16 @@ class KotlinLexer(RegexLexer): (kt_id, Name.Function, '#pop') ], 'generic': [ - (r'(>)(\s*)', bygroups(Operator, Text), '#pop'), + (r'(>)(\s*)', bygroups(Operator, Whitespace), '#pop'), (r':', Punctuation), (r'(reified|out|in)\b', Keyword), (r',', Punctuation), - (r'\s+', Text), + (r'\s+', Whitespace), (kt_id, Name) ], 'modifiers': [ (r'\w+', Keyword.Declaration), - (r'\s+', Text), + (r'\s+', Whitespace), default('#pop') ], 'string': [ @@ -1213,7 +1221,7 @@ class KotlinLexer(RegexLexer): 'string_common': [ (r'\\\\', String), # escaped backslash (r'\\"', String), # escaped quote - (r'\\', String), # bare backslash + (r'\\', String), # bare backslash (r'\$\{', String.Interpol, 'interpolation'), (r'(\$)(\w+)', bygroups(String.Interpol, Name)), (r'[^\\"$]+', String) @@ -1235,12 +1243,13 @@ class KotlinLexer(RegexLexer): class XtendLexer(RegexLexer): """ - For `Xtend <http://xtend-lang.org/>`_ source code. + For Xtend source code. .. versionadded:: 1.6 """ name = 'Xtend' + url = 'https://www.eclipse.org/xtend/' aliases = ['xtend'] filenames = ['*.xtend'] mimetypes = ['text/x-xtend'] @@ -1253,9 +1262,9 @@ class XtendLexer(RegexLexer): (r'^(\s*(?:[a-zA-Z_][\w.\[\]]*\s+)+?)' # return arguments r'([a-zA-Z_$][\w$]*)' # method name r'(\s*)(\()', # signature start - bygroups(using(this), Name.Function, Text, Operator)), - (r'[^\S\n]+', Text), - (r'//.*?\n', Comment.Single), + bygroups(using(this), Name.Function, Whitespace, Operator)), + (r'[^\S\n]+', Whitespace), + (r'(//.*?)(\n)', bygroups(Comment.Single, Whitespace)), (r'/\*.*?\*/', Comment.Multiline), (r'@[a-zA-Z_][\w.]*', Name.Decorator), (r'(assert|break|case|catch|continue|default|do|else|finally|for|' @@ -1267,11 +1276,11 @@ class XtendLexer(RegexLexer): r'transient|volatile)\b', Keyword.Declaration), (r'(boolean|byte|char|double|float|int|long|short|void)\b', Keyword.Type), - (r'(package)(\s+)', bygroups(Keyword.Namespace, Text)), + (r'(package)(\s+)', bygroups(Keyword.Namespace, Whitespace)), (r'(true|false|null)\b', Keyword.Constant), - (r'(class|interface)(\s+)', bygroups(Keyword.Declaration, Text), + (r'(class|interface)(\s+)', bygroups(Keyword.Declaration, Whitespace), 'class'), - (r'(import)(\s+)', bygroups(Keyword.Namespace, Text), 'import'), + (r'(import)(\s+)', bygroups(Keyword.Namespace, Whitespace), 'import'), (r"(''')", String, 'template'), (r'(\u00BB)', String, 'template'), (r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double), @@ -1282,7 +1291,7 @@ class XtendLexer(RegexLexer): (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float), (r'0x[0-9a-fA-F]+', Number.Hex), (r'[0-9]+L?', Number.Integer), - (r'\n', Text) + (r'\n', Whitespace) ], 'class': [ (r'[a-zA-Z_]\w*', Name.Class, '#pop') @@ -1300,12 +1309,13 @@ class XtendLexer(RegexLexer): class PigLexer(RegexLexer): """ - For `Pig Latin <https://pig.apache.org/>`_ source code. + For Pig Latin source code. .. versionadded:: 2.0 """ name = 'Pig' + url = 'https://pig.apache.org/' aliases = ['pig'] filenames = ['*.pig'] mimetypes = ['text/x-pig'] @@ -1314,10 +1324,10 @@ class PigLexer(RegexLexer): tokens = { 'root': [ - (r'\s+', Text), + (r'\s+', Whitespace), (r'--.*', Comment), (r'/\*[\w\W]*?\*/', Comment.Multiline), - (r'\\\n', Text), + (r'\\$', String.Escape), (r'\\', Text), (r'\'(?:\\[ntbrf\\\']|\\u[0-9a-f]{4}|[^\'\\\n\r])*\'', String), include('keywords'), @@ -1328,9 +1338,9 @@ class PigLexer(RegexLexer): (r'[0-9]*\.[0-9]+(e[0-9]+)?[fd]?', Number.Float), (r'0x[0-9a-f]+', Number.Hex), (r'[0-9]+L?', Number.Integer), - (r'\n', Text), + (r'\n', Whitespace), (r'([a-z_]\w*)(\s*)(\()', - bygroups(Name.Function, Text, Punctuation)), + bygroups(Name.Function, Whitespace, Punctuation)), (r'[()#:]', Text), (r'[^(:#\'")\s]+', Text), (r'\S+\s+', Text) # TODO: make tests pass without \s+ @@ -1367,18 +1377,19 @@ class PigLexer(RegexLexer): class GoloLexer(RegexLexer): """ - For `Golo <http://golo-lang.org/>`_ source code. + For Golo source code. .. versionadded:: 2.0 """ name = 'Golo' + url = 'http://golo-lang.org/' filenames = ['*.golo'] aliases = ['golo'] tokens = { 'root': [ - (r'[^\S\n]+', Text), + (r'[^\S\n]+', Whitespace), (r'#.*$', Comment), @@ -1390,19 +1401,19 @@ class GoloLexer(RegexLexer): (r'[]{}|(),[]', Punctuation), (r'(module|import)(\s+)', - bygroups(Keyword.Namespace, Text), + bygroups(Keyword.Namespace, Whitespace), 'modname'), (r'\b([a-zA-Z_][\w$.]*)(::)', bygroups(Name.Namespace, Punctuation)), (r'\b([a-zA-Z_][\w$]*(?:\.[a-zA-Z_][\w$]*)+)\b', Name.Namespace), (r'(let|var)(\s+)', - bygroups(Keyword.Declaration, Text), + bygroups(Keyword.Declaration, Whitespace), 'varname'), (r'(struct)(\s+)', - bygroups(Keyword.Declaration, Text), + bygroups(Keyword.Declaration, Whitespace), 'structname'), (r'(function)(\s+)', - bygroups(Keyword.Declaration, Text), + bygroups(Keyword.Declaration, Whitespace), 'funcname'), (r'(null|true|false)\b', Keyword.Constant), @@ -1480,12 +1491,13 @@ class GoloLexer(RegexLexer): class JasminLexer(RegexLexer): """ - For `Jasmin <http://jasmin.sourceforge.net/>`_ assembly code. + For Jasmin assembly code. .. versionadded:: 2.0 """ name = 'Jasmin' + url = 'http://jasmin.sourceforge.net/' aliases = ['jasmin', 'jasminxt'] filenames = ['*.j'] @@ -1498,12 +1510,12 @@ class JasminLexer(RegexLexer): tokens = { 'default': [ - (r'\n', Text, '#pop'), + (r'\n', Whitespace, '#pop'), (r"'", String.Single, ('#pop', 'quote')), (r'"', String.Double, 'string'), (r'=', Punctuation), (r':', Punctuation, 'label'), - (_ws, Text), + (_ws, Whitespace), (r';.*', Comment.Single), (r'(\$[-+])?0x-?[\da-fA-F]+%s' % _break, Number.Hex), (r'(\$[-+]|\+)?-?\d+%s' % _break, Number.Integer), @@ -1591,27 +1603,27 @@ class JasminLexer(RegexLexer): (r'[^"\\]+', String.Double) ], 'root': [ - (r'\n+', Text), + (r'\n+', Whitespace), (r"'", String.Single, 'quote'), include('default'), (r'(%s)([ \t\r]*)(:)' % _name, - bygroups(Name.Label, Text, Punctuation)), + bygroups(Name.Label, Whitespace, Punctuation)), (_name, String.Other) ], 'annotation': [ - (r'\n', Text, ('#pop', 'annotation-body')), + (r'\n', Whitespace, ('#pop', 'annotation-body')), (r'default%s' % _break, Keyword.Reserved, ('#pop', 'annotation-default')), include('default') ], 'annotation-body': [ - (r'\n+', Text), + (r'\n+', Whitespace), (r'\.end%s' % _break, Keyword.Reserved, '#pop'), include('default'), (_name, String.Other, ('annotation-items', 'descriptor/no-dots')) ], 'annotation-default': [ - (r'\n+', Text), + (r'\n+', Whitespace), (r'\.end%s' % _break, Keyword.Reserved, '#pop'), include('default'), default(('annotation-items', 'descriptor/no-dots')) @@ -1665,7 +1677,7 @@ class JasminLexer(RegexLexer): default('descriptor/convert-dots') ], 'enclosing-method': [ - (_ws, Text), + (_ws, Whitespace), (r'(?=[^%s]*\()' % _separator, Text, ('#pop', 'invocation')), default(('#pop', 'class/convert-dots')) ], @@ -1711,7 +1723,7 @@ class JasminLexer(RegexLexer): bygroups(Name.Namespace, Name.Class, Name.Variable.Class), '#pop') ], 'table': [ - (r'\n+', Text), + (r'\n+', Whitespace), (r'default%s' % _break, Keyword.Reserved, '#pop'), include('default'), (_name, Name.Label) @@ -1744,12 +1756,13 @@ class JasminLexer(RegexLexer): class SarlLexer(RegexLexer): """ - For `SARL <http://www.sarl.io>`_ source code. + For SARL source code. .. versionadded:: 2.4 """ name = 'SARL' + url = 'http://www.sarl.io' aliases = ['sarl'] filenames = ['*.sarl'] mimetypes = ['text/x-sarl'] @@ -1762,9 +1775,9 @@ class SarlLexer(RegexLexer): (r'^(\s*(?:[a-zA-Z_][\w.\[\]]*\s+)+?)' # return arguments r'([a-zA-Z_$][\w$]*)' # method name r'(\s*)(\()', # signature start - bygroups(using(this), Name.Function, Text, Operator)), - (r'[^\S\n]+', Text), - (r'//.*?\n', Comment.Single), + bygroups(using(this), Name.Function, Whitespace, Operator)), + (r'[^\S\n]+', Whitespace), + (r'(//.*?)(\n)', bygroups(Comment.Single, Whitespace)), (r'/\*.*?\*/', Comment.Multiline), (r'@[a-zA-Z_][\w.]*', Name.Decorator), (r'(as|break|case|catch|default|do|else|extends|extension|finally|' @@ -1776,12 +1789,12 @@ class SarlLexer(RegexLexer): Keyword.Declaration), (r'(boolean|byte|char|double|float|int|long|short|void)\b', Keyword.Type), - (r'(package)(\s+)', bygroups(Keyword.Namespace, Text)), + (r'(package)(\s+)', bygroups(Keyword.Namespace, Whitespace)), (r'(false|it|null|occurrence|this|true|void)\b', Keyword.Constant), (r'(agent|annotation|artifact|behavior|capacity|class|enum|event|' - r'interface|skill|space)(\s+)', bygroups(Keyword.Declaration, Text), + r'interface|skill|space)(\s+)', bygroups(Keyword.Declaration, Whitespace), 'class'), - (r'(import)(\s+)', bygroups(Keyword.Namespace, Text), 'import'), + (r'(import)(\s+)', bygroups(Keyword.Namespace, Whitespace), 'import'), (r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double), (r"'(\\\\|\\[^\\]|[^'\\])*'", String.Single), (r'[a-zA-Z_]\w*:', Name.Label), @@ -1790,7 +1803,7 @@ class SarlLexer(RegexLexer): (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float), (r'0x[0-9a-fA-F]+', Number.Hex), (r'[0-9]+L?', Number.Integer), - (r'\n', Text) + (r'\n', Whitespace) ], 'class': [ (r'[a-zA-Z_]\w*', Name.Class, '#pop') diff --git a/contrib/python/Pygments/py3/pygments/lexers/kuin.py b/contrib/python/Pygments/py3/pygments/lexers/kuin.py index 676efef172..1d7ba67cca 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/kuin.py +++ b/contrib/python/Pygments/py3/pygments/lexers/kuin.py @@ -4,22 +4,24 @@ Lexers for the Kuin language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer, include, using, this, bygroups, words -from pygments.token import Text, Comment, Operator, Keyword, Name, String, Number, Punctuation +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation, Whitespace __all__ = ['KuinLexer'] class KuinLexer(RegexLexer): """ - For `Kuin <https://github.com/kuina/Kuin>`_ source code + For Kuin source code .. versionadded:: 2.9 """ name = 'Kuin' + url = 'https://github.com/kuina/Kuin' aliases = ['kuin'] filenames = ['*.kn'] @@ -32,7 +34,7 @@ class KuinLexer(RegexLexer): include('whitespace'), # Block-statement - (r'(\+?[ \t]*\*?[ \t]*\bfunc)([ \t]+(?:\n\s*\|)*[ \t]*)([a-zA-Z_][0-9a-zA-Z_]*)', bygroups(Keyword, using(this), Name.Function), 'func_'), + (r'(\+?)([ \t]*)(\*?)([ \t]*)(\bfunc)([ \t]+(?:\n\s*\|)*[ \t]*)([a-zA-Z_][0-9a-zA-Z_]*)', bygroups(Keyword,Whitespace, Keyword, Whitespace, Keyword, using(this), Name.Function), 'func_'), (r'\b(class)([ \t]+(?:\n\s*\|)*[ \t]*)([a-zA-Z_][0-9a-zA-Z_]*)', bygroups(Keyword, using(this), Name.Class), 'class_'), (r'\b(enum)([ \t]+(?:\n\s*\|)*[ \t]*)([a-zA-Z_][0-9a-zA-Z_]*)', bygroups(Keyword, using(this), Name.Constant), 'enum_'), (r'\b(block)\b(?:([ \t]+(?:\n\s*\|)*[ \t]*)([a-zA-Z_][0-9a-zA-Z_]*))?', bygroups(Keyword, using(this), Name.Other), 'block_'), @@ -53,13 +55,13 @@ class KuinLexer(RegexLexer): (r'\b(alias)\b', Keyword, 'alias'), (r'\b(assert)\b', Keyword, 'assert'), (r'\|', Text, 'continued_line'), - (r'[ \t]*\n', Text), + (r'[ \t]*\n', Whitespace), ], # Whitespace / Comment 'whitespace': [ - (r'^[ \t]*;.*', Comment.Single), - (r'[ \t]+(?![; \t])', Text), + (r'^([ \t]*)(;.*)', bygroups(Comment.Single, Whitespace)), + (r'[ \t]+(?![; \t])', Whitespace), (r'\{', Comment.Multiline, 'multiline_comment'), ], 'multiline_comment': [ @@ -72,7 +74,7 @@ class KuinLexer(RegexLexer): # Block-statement 'func_': [ include('expr'), - (r'\n', Text, 'func'), + (r'\n', Whitespace, 'func'), ], 'func': [ (r'\b(end)([ \t]+(?:\n\s*\|)*[ \t]*)(func)\b', bygroups(Keyword, using(this), Keyword), '#pop:2'), @@ -80,7 +82,7 @@ class KuinLexer(RegexLexer): ], 'class_': [ include('expr'), - (r'\n', Text, 'class'), + (r'\n', Whitespace, 'class'), ], 'class': [ (r'\b(end)([ \t]+(?:\n\s*\|)*[ \t]*)(class)\b', bygroups(Keyword, using(this), Keyword), '#pop:2'), @@ -88,16 +90,16 @@ class KuinLexer(RegexLexer): ], 'enum_': [ include('expr'), - (r'\n', Text, 'enum'), + (r'\n', Whitespace, 'enum'), ], 'enum': [ (r'\b(end)([ \t]+(?:\n\s*\|)*[ \t]*)(enum)\b', bygroups(Keyword, using(this), Keyword), '#pop:2'), include('expr'), - (r'\n', Text), + (r'\n', Whitespace), ], 'block_': [ include('expr'), - (r'\n', Text, 'block'), + (r'\n', Whitespace, 'block'), ], 'block': [ (r'\b(end)([ \t]+(?:\n\s*\|)*[ \t]*)(block)\b', bygroups(Keyword, using(this), Keyword), '#pop:2'), @@ -107,7 +109,7 @@ class KuinLexer(RegexLexer): ], 'ifdef_': [ include('expr'), - (r'\n', Text, 'ifdef'), + (r'\n', Whitespace, 'ifdef'), ], 'ifdef': [ (r'\b(end)([ \t]+(?:\n\s*\|)*[ \t]*)(ifdef)\b', bygroups(Keyword, using(this), Keyword), '#pop:2'), @@ -118,11 +120,11 @@ class KuinLexer(RegexLexer): ], 'ifdef_sp': [ include('expr'), - (r'\n', Text, '#pop'), + (r'\n', Whitespace, '#pop'), ], 'if_': [ include('expr'), - (r'\n', Text, 'if'), + (r'\n', Whitespace, 'if'), ], 'if': [ (r'\b(end)([ \t]+(?:\n\s*\|)*[ \t]*)(if)\b', bygroups(Keyword, using(this), Keyword), '#pop:2'), @@ -133,11 +135,11 @@ class KuinLexer(RegexLexer): ], 'if_sp': [ include('expr'), - (r'\n', Text, '#pop'), + (r'\n', Whitespace, '#pop'), ], 'switch_': [ include('expr'), - (r'\n', Text, 'switch'), + (r'\n', Whitespace, 'switch'), ], 'switch': [ (r'\b(end)([ \t]+(?:\n\s*\|)*[ \t]*)(switch)\b', bygroups(Keyword, using(this), Keyword), '#pop:2'), @@ -148,11 +150,11 @@ class KuinLexer(RegexLexer): ], 'switch_sp': [ include('expr'), - (r'\n', Text, '#pop'), + (r'\n', Whitespace, '#pop'), ], 'while_': [ include('expr'), - (r'\n', Text, 'while'), + (r'\n', Whitespace, 'while'), ], 'while': [ (r'\b(end)([ \t]+(?:\n\s*\|)*[ \t]*)(while)\b', bygroups(Keyword, using(this), Keyword), '#pop:2'), @@ -162,7 +164,7 @@ class KuinLexer(RegexLexer): ], 'for_': [ include('expr'), - (r'\n', Text, 'for'), + (r'\n', Whitespace, 'for'), ], 'for': [ (r'\b(end)([ \t]+(?:\n\s*\|)*[ \t]*)(for)\b', bygroups(Keyword, using(this), Keyword), '#pop:2'), @@ -172,7 +174,7 @@ class KuinLexer(RegexLexer): ], 'foreach_': [ include('expr'), - (r'\n', Text, 'foreach'), + (r'\n', Whitespace, 'foreach'), ], 'foreach': [ (r'\b(end)([ \t]+(?:\n\s*\|)*[ \t]*)(foreach)\b', bygroups(Keyword, using(this), Keyword), '#pop:2'), @@ -182,7 +184,7 @@ class KuinLexer(RegexLexer): ], 'try_': [ include('expr'), - (r'\n', Text, 'try'), + (r'\n', Whitespace, 'try'), ], 'try': [ (r'\b(end)([ \t]+(?:\n\s*\|)*[ \t]*)(try)\b', bygroups(Keyword, using(this), Keyword), '#pop:2'), @@ -193,7 +195,7 @@ class KuinLexer(RegexLexer): ], 'try_sp': [ include('expr'), - (r'\n', Text, '#pop'), + (r'\n', Whitespace, '#pop'), ], # Line-statement @@ -205,35 +207,35 @@ class KuinLexer(RegexLexer): ], 'alias': [ include('expr'), - (r'\n', Text, '#pop'), + (r'\n', Whitespace, '#pop'), ], 'assert': [ include('expr'), - (r'\n', Text, '#pop'), + (r'\n', Whitespace, '#pop'), ], 'const': [ include('expr'), - (r'\n', Text, '#pop'), + (r'\n', Whitespace, '#pop'), ], 'do': [ include('expr'), - (r'\n', Text, '#pop'), + (r'\n', Whitespace, '#pop'), ], 'ret': [ include('expr'), - (r'\n', Text, '#pop'), + (r'\n', Whitespace, '#pop'), ], 'throw': [ include('expr'), - (r'\n', Text, '#pop'), + (r'\n', Whitespace, '#pop'), ], 'var': [ include('expr'), - (r'\n', Text, '#pop'), + (r'\n', Whitespace, '#pop'), ], 'continued_line': [ include('expr'), - (r'\n', Text, '#pop'), + (r'\n', Whitespace, '#pop'), ], 'expr': [ diff --git a/contrib/python/Pygments/py3/pygments/lexers/lilypond.py b/contrib/python/Pygments/py3/pygments/lexers/lilypond.py index 9705cbadcb..0debac85dd 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/lilypond.py +++ b/contrib/python/Pygments/py3/pygments/lexers/lilypond.py @@ -4,13 +4,13 @@ Lexer for LilyPond. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re -from pygments.lexer import default, inherit, words +from pygments.lexer import bygroups, default, inherit, words from pygments.lexers.lisp import SchemeLexer from pygments.lexers._lilypond_builtins import ( keywords, pitch_language_names, clefs, scales, repeat_types, units, @@ -37,7 +37,7 @@ def builtin_words(names, backslash, suffix=NAME_END_RE): class LilyPondLexer(SchemeLexer): """ - Lexer for input to `LilyPond <https://lilypond.org>`_, a text-based music typesetter. + Lexer for input to LilyPond, a text-based music typesetter. .. important:: @@ -46,6 +46,7 @@ class LilyPondLexer(SchemeLexer): .. versionadded:: 2.11 """ name = 'LilyPond' + url = 'https://lilypond.org' aliases = ['lilypond'] filenames = ['*.ly'] mimetypes = [] @@ -99,7 +100,7 @@ class LilyPondLexer(SchemeLexer): # - chord: < >, # - bar check: |, # - dot in nested properties: \revert NoteHead.color, - # - equals sign in assignemnts and lists for various commands: + # - equals sign in assignments and lists for various commands: # \override Stem.color = red, # - comma as alternative syntax for lists: \time 3,3,2 4/4, # - colon in tremolos: c:32, @@ -169,7 +170,9 @@ class LilyPondLexer(SchemeLexer): (r"([^\W\d]|-)+(?=([^\W\d]|[\-.])*\s*=)", Token.Name.Lvalue), # Virtually everything can appear in markup mode, so we highlight - # as text. + # as text. Try to get a complete word, or we might wrongly lex + # a suffix that happens to be a builtin as a builtin (e.g., "myStaff"). + (r"([^\W\d]|-)+?" + NAME_END_RE, Token.Text), (r".", Token.Text), ], "string": [ @@ -188,9 +191,9 @@ class LilyPondLexer(SchemeLexer): # everything that looks like a-known-property.foo.bar-baz as # one single property name. "maybe-subproperties": [ - (r"\.", Token.Punctuation), (r"\s+", Token.Whitespace), - (r"([^\W\d])+" + NAME_END_RE, Token.Name.Builtin.GrobProperty), + (r"(\.)((?:[^\W\d]|-)+?)" + NAME_END_RE, + bygroups(Token.Punctuation, Token.Name.Builtin.GrobProperty)), default("#pop"), ] } diff --git a/contrib/python/Pygments/py3/pygments/lexers/lisp.py b/contrib/python/Pygments/py3/pygments/lexers/lisp.py index 5628e336ca..6dab1fdaea 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/lisp.py +++ b/contrib/python/Pygments/py3/pygments/lexers/lisp.py @@ -4,7 +4,7 @@ Lexers for Lispy languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -12,21 +12,19 @@ import re from pygments.lexer import RegexLexer, include, bygroups, words, default from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ - Number, Punctuation, Literal, Error + Number, Punctuation, Literal, Error, Whitespace from pygments.lexers.python import PythonLexer +from pygments.lexers._scheme_builtins import scheme_keywords, scheme_builtins + __all__ = ['SchemeLexer', 'CommonLispLexer', 'HyLexer', 'RacketLexer', 'NewLispLexer', 'EmacsLispLexer', 'ShenLexer', 'CPSALexer', 'XtlangLexer', 'FennelLexer'] - class SchemeLexer(RegexLexer): """ - A Scheme lexer, parsing a stream and outputting the tokens - needed to highlight scheme code. - This lexer could be most probably easily subclassed to parse - other LISP-Dialects like Common Lisp, Emacs Lisp or AutoLisp. + A Scheme lexer. This parser is checked with pastes from the LISP pastebin at http://paste.lisp.org/ to cover as much syntax as possible. @@ -36,65 +34,154 @@ class SchemeLexer(RegexLexer): .. versionadded:: 0.6 """ name = 'Scheme' + url = 'http://www.scheme-reports.org/' aliases = ['scheme', 'scm'] filenames = ['*.scm', '*.ss'] mimetypes = ['text/x-scheme', 'application/x-scheme'] flags = re.DOTALL | re.MULTILINE - # list of known keywords and builtins taken form vim 6.4 scheme.vim - # syntax file. - keywords = ( - 'lambda', 'define', 'if', 'else', 'cond', 'and', 'or', 'case', 'let', - 'let*', 'letrec', 'begin', 'do', 'delay', 'set!', '=>', 'quote', - 'quasiquote', 'unquote', 'unquote-splicing', 'define-syntax', - 'let-syntax', 'letrec-syntax', 'syntax-rules' - ) - builtins = ( - '*', '+', '-', '/', '<', '<=', '=', '>', '>=', 'abs', 'acos', 'angle', - 'append', 'apply', 'asin', 'assoc', 'assq', 'assv', 'atan', - 'boolean?', 'caaaar', 'caaadr', 'caaar', 'caadar', 'caaddr', 'caadr', - 'caar', 'cadaar', 'cadadr', 'cadar', 'caddar', 'cadddr', 'caddr', - 'cadr', 'call-with-current-continuation', 'call-with-input-file', - 'call-with-output-file', 'call-with-values', 'call/cc', 'car', - 'cdaaar', 'cdaadr', 'cdaar', 'cdadar', 'cdaddr', 'cdadr', 'cdar', - 'cddaar', 'cddadr', 'cddar', 'cdddar', 'cddddr', 'cdddr', 'cddr', - 'cdr', 'ceiling', 'char->integer', 'char-alphabetic?', 'char-ci<=?', - 'char-ci<?', 'char-ci=?', 'char-ci>=?', 'char-ci>?', 'char-downcase', - 'char-lower-case?', 'char-numeric?', 'char-ready?', 'char-upcase', - 'char-upper-case?', 'char-whitespace?', 'char<=?', 'char<?', 'char=?', - 'char>=?', 'char>?', 'char?', 'close-input-port', 'close-output-port', - 'complex?', 'cons', 'cos', 'current-input-port', 'current-output-port', - 'denominator', 'display', 'dynamic-wind', 'eof-object?', 'eq?', - 'equal?', 'eqv?', 'eval', 'even?', 'exact->inexact', 'exact?', 'exp', - 'expt', 'floor', 'for-each', 'force', 'gcd', 'imag-part', - 'inexact->exact', 'inexact?', 'input-port?', 'integer->char', - 'integer?', 'interaction-environment', 'lcm', 'length', 'list', - 'list->string', 'list->vector', 'list-ref', 'list-tail', 'list?', - 'load', 'log', 'magnitude', 'make-polar', 'make-rectangular', - 'make-string', 'make-vector', 'map', 'max', 'member', 'memq', 'memv', - 'min', 'modulo', 'negative?', 'newline', 'not', 'null-environment', - 'null?', 'number->string', 'number?', 'numerator', 'odd?', - 'open-input-file', 'open-output-file', 'output-port?', 'pair?', - 'peek-char', 'port?', 'positive?', 'procedure?', 'quotient', - 'rational?', 'rationalize', 'read', 'read-char', 'real-part', 'real?', - 'remainder', 'reverse', 'round', 'scheme-report-environment', - 'set-car!', 'set-cdr!', 'sin', 'sqrt', 'string', 'string->list', - 'string->number', 'string->symbol', 'string-append', 'string-ci<=?', - 'string-ci<?', 'string-ci=?', 'string-ci>=?', 'string-ci>?', - 'string-copy', 'string-fill!', 'string-length', 'string-ref', - 'string-set!', 'string<=?', 'string<?', 'string=?', 'string>=?', - 'string>?', 'string?', 'substring', 'symbol->string', 'symbol?', - 'tan', 'transcript-off', 'transcript-on', 'truncate', 'values', - 'vector', 'vector->list', 'vector-fill!', 'vector-length', - 'vector-ref', 'vector-set!', 'vector?', 'with-input-from-file', - 'with-output-to-file', 'write', 'write-char', 'zero?' - ) # valid names for identifiers # well, names can only not consist fully of numbers # but this should be good enough for now valid_name = r'[\w!$%&*+,/:<=>?@^~|-]+' + # Use within verbose regexes + token_end = r''' + (?= + \s # whitespace + | ; # comment + | \#[;|!] # fancy comments + | [)\]] # end delimiters + | $ # end of file + ) + ''' + + # Recognizing builtins. + def get_tokens_unprocessed(self, text): + for index, token, value in super().get_tokens_unprocessed(text): + if token is Name.Function or token is Name.Variable: + if value in scheme_keywords: + yield index, Keyword, value + elif value in scheme_builtins: + yield index, Name.Builtin, value + else: + yield index, token, value + else: + yield index, token, value + + # Scheme has funky syntactic rules for numbers. These are all + # valid number literals: 5.0e55|14, 14/13, -1+5j, +1@5, #b110, + # #o#Iinf.0-nan.0i. This is adapted from the formal grammar given + # in http://www.r6rs.org/final/r6rs.pdf, section 4.2.1. Take a + # deep breath ... + + # It would be simpler if we could just not bother about invalid + # numbers like #b35. But we cannot parse 'abcdef' without #x as a + # number. + + number_rules = {} + for base in (2, 8, 10, 16): + if base == 2: + digit = r'[01]' + radix = r'( \#[bB] )' + elif base == 8: + digit = r'[0-7]' + radix = r'( \#[oO] )' + elif base == 10: + digit = r'[0-9]' + radix = r'( (\#[dD])? )' + elif base == 16: + digit = r'[0-9a-fA-F]' + radix = r'( \#[xX] )' + + # Radix, optional exactness indicator. + prefix = rf''' + ( + {radix} (\#[iIeE])? + | \#[iIeE] {radix} + ) + ''' + + # Simple unsigned number or fraction. + ureal = rf''' + ( + {digit}+ + ( / {digit}+ )? + ) + ''' + + # Add decimal numbers. + if base == 10: + decimal = r''' + ( + # Decimal part + ( + [0-9]+ ([.][0-9]*)? + | [.][0-9]+ + ) + + # Optional exponent + ( + [eEsSfFdDlL] [+-]? [0-9]+ + )? + + # Optional mantissa width + ( + \|[0-9]+ + )? + ) + ''' + ureal = rf''' + ( + {decimal} (?!/) + | {ureal} + ) + ''' + + naninf = r'(nan.0|inf.0)' + + real = rf''' + ( + [+-] {naninf} # Sign mandatory + | [+-]? {ureal} # Sign optional + ) + ''' + + complex_ = rf''' + ( + {real}? [+-] ({naninf}|{ureal})? i + | {real} (@ {real})? + + ) + ''' + + num = rf'''(?x) + ( + {prefix} + {complex_} + ) + # Need to ensure we have a full token. 1+ is not a + # number followed by something else, but a function + # name. + {token_end} + ''' + + number_rules[base] = num + + # If you have a headache now, say thanks to RnRS editors. + + # Doing it this way is simpler than splitting the number(10) + # regex in a floating-point and a no-floating-point version. + def decimal_cb(self, match): + if '.' in match.group(): + token_type = Number.Float # includes [+-](inf|nan).0 + else: + token_type = Number.Integer + yield match.start(), token_type, match.group() + + # -- + # The 'scheme-root' state parses as many expressions as needed, always # delegating to the 'scheme-value' state. The latter parses one complete # expression and immediately pops back. This is needed for the LilyPondLexer. @@ -119,25 +206,27 @@ class SchemeLexer(RegexLexer): (r';.*?$', Comment.Single), # multi-line comment (r'#\|', Comment.Multiline, 'multiline-comment'), - # commented form (entire sexpr folliwng) - (r'#;\s*\(', Comment, 'commented-form'), + # commented form (entire sexpr following) + (r'#;[([]', Comment, 'commented-form'), + # commented datum + (r'#;', Comment, 'commented-datum'), # signifies that the program text that follows is written with the # lexical and datum syntax described in r6rs (r'#!r6rs', Comment), # whitespaces - usually not relevant - (r'\s+', Text), + (r'\s+', Whitespace), # numbers - (r'-?\d+\.\d+', Number.Float, '#pop'), - (r'-?\d+', Number.Integer, '#pop'), - # support for uncommon kinds of numbers - - # have to figure out what the characters mean - # (r'(#e|#i|#b|#o|#d|#x)[\d.]+', Number), + (number_rules[2], Number.Bin, '#pop'), + (number_rules[8], Number.Oct, '#pop'), + (number_rules[10], decimal_cb, '#pop'), + (number_rules[16], Number.Hex, '#pop'), - # strings, symbols and characters - (r'"(\\\\|\\[^\\]|[^"\\])*"', String, "#pop"), + # strings, symbols, keywords and characters + (r'"', String, 'string'), (r"'" + valid_name, String.Symbol, "#pop"), + (r'#:' + valid_name, Keyword.Declaration, '#pop'), (r"#\\([()/'\"._!§$%& ?=+-]|[a-zA-Z0-9]+)", String.Char, "#pop"), # constants @@ -146,23 +235,16 @@ class SchemeLexer(RegexLexer): # special operators (r"('|#|`|,@|,|\.)", Operator), - # highlight the keywords - ('(%s)' % '|'.join(re.escape(entry) + ' ' for entry in keywords), - Keyword, - '#pop'), - # first variable in a quoted string like # '(this is syntactic sugar) (r"(?<='\()" + valid_name, Name.Variable, '#pop'), (r"(?<=#\()" + valid_name, Name.Variable, '#pop'), - # highlight the builtins - (r"(?<=\()(%s)" % '|'.join(re.escape(entry) + ' ' for entry in builtins), - Name.Builtin, - '#pop'), - - # the remaining functions + # Functions -- note that this also catches variables + # defined in let/let*, but there is little that can + # be done about it. (r'(?<=\()' + valid_name, Name.Function, '#pop'), + # find the remaining variables (valid_name, Name.Variable, '#pop'), @@ -170,11 +252,11 @@ class SchemeLexer(RegexLexer): # Push scheme-root to enter a state that will parse as many things # as needed in the parentheses. - (r'\(|\[', Punctuation, 'scheme-root'), + (r'[([]', Punctuation, 'scheme-root'), # Pop one 'value', one 'scheme-root', and yet another 'value', so # we get back to a state parsing expressions as needed in the # enclosing context. - (r'\)|\]', Punctuation, '#pop:3'), + (r'[)\]]', Punctuation, '#pop:3'), ], 'multiline-comment': [ (r'#\|', Comment.Multiline, '#push'), @@ -183,10 +265,30 @@ class SchemeLexer(RegexLexer): (r'[|#]', Comment.Multiline), ], 'commented-form': [ - (r'\(', Comment, '#push'), - (r'\)', Comment, '#pop'), - (r'[^()]+', Comment), + (r'[([]', Comment, '#push'), + (r'[)\]]', Comment, '#pop'), + (r'[^()[\]]+', Comment), ], + 'commented-datum': [ + (rf'(?x).*?{token_end}', Comment, '#pop'), + ], + 'string': [ + # Pops back from 'string', and pops 'value' as well. + ('"', String, '#pop:2'), + # Hex escape sequences, R6RS-style. + (r'\\x[0-9a-fA-F]+;', String.Escape), + # We try R6RS style first, but fall back to Guile-style. + (r'\\x[0-9a-fA-F]{2}', String.Escape), + # Other special escape sequences implemented by Guile. + (r'\\u[0-9a-fA-F]{4}', String.Escape), + (r'\\U[0-9a-fA-F]{6}', String.Escape), + # Escape sequences are not overly standardized. Recognizing + # a single character after the backslash should be good enough. + # NB: we have DOTALL. + (r'\\.', String.Escape), + # The rest + (r'[^\\"]+', String), + ] } @@ -197,6 +299,7 @@ class CommonLispLexer(RegexLexer): .. versionadded:: 0.9 """ name = 'Common Lisp' + url = 'https://lisp-lang.org/' aliases = ['common-lisp', 'cl', 'lisp'] filenames = ['*.cl', '*.lisp'] mimetypes = ['text/x-common-lisp'] @@ -271,7 +374,7 @@ class CommonLispLexer(RegexLexer): ], 'body': [ # whitespace - (r'\s+', Text), + (r'\s+', Whitespace), # single-line comment (r';.*$', Comment.Single), @@ -370,11 +473,12 @@ class CommonLispLexer(RegexLexer): class HyLexer(RegexLexer): """ - Lexer for `Hy <http://hylang.org/>`_ source code. + Lexer for Hy source code. .. versionadded:: 2.0 """ name = 'Hy' + url = 'http://hylang.org/' aliases = ['hylang'] filenames = ['*.hy'] mimetypes = ['text/x-hy', 'application/x-hy'] @@ -419,7 +523,8 @@ class HyLexer(RegexLexer): (r';.*$', Comment.Single), # whitespaces - usually not relevant - (r'[,\s]+', Text), + (r',+', Text), + (r'\s+', Whitespace), # numbers (r'-?\d+\.\d+', Number.Float), @@ -483,13 +588,14 @@ class HyLexer(RegexLexer): class RacketLexer(RegexLexer): """ - Lexer for `Racket <http://racket-lang.org/>`_ source code (formerly + Lexer for Racket source code (formerly known as PLT Scheme). .. versionadded:: 1.6 """ name = 'Racket' + url = 'http://racket-lang.org/' aliases = ['racket', 'rkt'] filenames = ['*.rkt', '*.rktd', '*.rktl'] mimetypes = ['text/x-racket', 'application/x-racket'] @@ -1299,7 +1405,7 @@ class RacketLexer(RegexLexer): (r'#\|', Comment.Multiline, 'block-comment'), # Whitespaces - (r'(?u)\s+', Text), + (r'(?u)\s+', Whitespace), # Numbers: Keep in mind Racket reader hash prefixes, which # can denote the base or the type. These don't map neatly @@ -1348,7 +1454,7 @@ class RacketLexer(RegexLexer): (r'#(true|false|[tTfF])', Name.Constant, '#pop'), # Keyword argument names (e.g. #:keyword) - (r'(?u)#:%s' % _symbol, Keyword.Declaration, '#pop'), + (r'#:%s' % _symbol, Keyword.Declaration, '#pop'), # Reader extensions (r'(#lang |#!)(\S+)', @@ -1377,9 +1483,9 @@ class RacketLexer(RegexLexer): (r'quasiquote(?=[%s])' % _delimiters, Keyword, ('#pop', 'quasiquoted-datum')), (_opening_parenthesis, Punctuation, ('#pop', 'unquoted-list')), - (words(_keywords, prefix='(?u)', suffix='(?=[%s])' % _delimiters), + (words(_keywords, suffix='(?=[%s])' % _delimiters), Keyword, '#pop'), - (words(_builtins, prefix='(?u)', suffix='(?=[%s])' % _delimiters), + (words(_builtins, suffix='(?=[%s])' % _delimiters), Name.Builtin, '#pop'), (_symbol, Name, '#pop'), include('datum*') @@ -1425,17 +1531,18 @@ class RacketLexer(RegexLexer): class NewLispLexer(RegexLexer): """ - For `newLISP. <http://www.newlisp.org/>`_ source code (version 10.3.0). + For newLISP source code (version 10.3.0). .. versionadded:: 1.5 """ name = 'NewLisp' + url = 'http://www.newlisp.org/' aliases = ['newlisp'] filenames = ['*.lsp', '*.nl', '*.kif'] mimetypes = ['text/x-newlisp', 'application/x-newlisp'] - flags = re.IGNORECASE | re.MULTILINE | re.UNICODE + flags = re.IGNORECASE | re.MULTILINE # list of built-in functions for newLISP version 10.3 builtins = ( @@ -1512,7 +1619,7 @@ class NewLispLexer(RegexLexer): (r'#.*$', Comment.Single), # whitespace - (r'\s+', Text), + (r'\s+', Whitespace), # strings, symbols and characters (r'"(\\\\|\\[^\\]|[^"\\])*"', String), @@ -2124,7 +2231,7 @@ class EmacsLispLexer(RegexLexer): ], 'body': [ # whitespace - (r'\s+', Text), + (r'\s+', Whitespace), # single-line comment (r';.*$', Comment.Single), @@ -2201,11 +2308,12 @@ class EmacsLispLexer(RegexLexer): class ShenLexer(RegexLexer): """ - Lexer for `Shen <http://shenlanguage.org/>`_ source code. + Lexer for Shen source code. .. versionadded:: 2.1 """ name = 'Shen' + url = 'http://shenlanguage.org/' aliases = ['shen'] filenames = ['*.shen'] mimetypes = ['text/x-shen', 'application/x-shen'] @@ -2271,7 +2379,7 @@ class ShenLexer(RegexLexer): 'root': [ (r'(?s)\\\*.*?\*\\', Comment.Multiline), # \* ... *\ (r'\\\\.*', Comment.Single), # \\ ... - (r'\s+', Text), + (r'\s+', Whitespace), (r'_{5,}', Punctuation), (r'={5,}', Punctuation), (r'(;|:=|\||--?>|<--?)', Punctuation), @@ -2293,7 +2401,7 @@ class ShenLexer(RegexLexer): return tokens def _relevant(self, token): - return token not in (Text, Comment.Single, Comment.Multiline) + return token not in (Text, Whitespace, Comment.Single, Comment.Multiline) def _process_declarations(self, tokens): opening_paren = False @@ -2398,7 +2506,7 @@ class CPSALexer(RegexLexer): (r';.*$', Comment.Single), # whitespaces - usually not relevant - (r'\s+', Text), + (r'\s+', Whitespace), # numbers (r'-?\d+\.\d+', Number.Float), @@ -2442,8 +2550,7 @@ class CPSALexer(RegexLexer): class XtlangLexer(RegexLexer): - """An xtlang lexer for the `Extempore programming environment - <http://extempore.moso.com.au>`_. + """An xtlang lexer for the Extempore programming environment. This is a mixture of Scheme and xtlang, really. Keyword lists are taken from the Extempore Emacs mode @@ -2452,6 +2559,7 @@ class XtlangLexer(RegexLexer): .. versionadded:: 2.2 """ name = 'xtlang' + url = 'http://extempore.moso.com.au' aliases = ['extempore'] filenames = ['*.xtm'] mimetypes = [] @@ -2611,7 +2719,7 @@ class XtlangLexer(RegexLexer): (r';.*$', Comment.Single), # whitespaces - usually not relevant - (r'\s+', Text), + (r'\s+', Whitespace), # numbers (r'-?\d+\.\d+', Number.Float), @@ -2646,7 +2754,7 @@ class XtlangLexer(RegexLexer): class FennelLexer(RegexLexer): - """A lexer for the `Fennel programming language <https://fennel-lang.org>`_. + """A lexer for the Fennel programming language. Fennel compiles to Lua, so all the Lua builtins are recognized as well as the special forms that are particular to the Fennel compiler. @@ -2654,6 +2762,7 @@ class FennelLexer(RegexLexer): .. versionadded:: 2.3 """ name = 'Fennel' + url = 'https://fennel-lang.org' aliases = ['fennel', 'fnl'] filenames = ['*.fnl'] @@ -2692,7 +2801,8 @@ class FennelLexer(RegexLexer): # the only comment form is a semicolon; goes to the end of the line (r';.*$', Comment.Single), - (r'[,\s]+', Text), + (r',+', Text), + (r'\s+', Whitespace), (r'-?\d+\.\d+', Number.Float), (r'-?\d+', Number.Integer), diff --git a/contrib/python/Pygments/py3/pygments/lexers/macaulay2.py b/contrib/python/Pygments/py3/pygments/lexers/macaulay2.py new file mode 100644 index 0000000000..47e7abfec0 --- /dev/null +++ b/contrib/python/Pygments/py3/pygments/lexers/macaulay2.py @@ -0,0 +1,1692 @@ +""" + pygments.lexers.macaulay2 + ~~~~~~~~~~~~~~~~~~~~~~~~~ + Lexer for Macaulay2. + + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, words +from pygments.token import Comment, Keyword, Name, String, Text + +__all__ = ['Macaulay2Lexer'] + +# Auto-generated for Macaulay2-1.19. Do not modify this file manually. + +M2KEYWORDS = ( + "and", + "break", + "catch", + "continue", + "do", + "elapsedTime", + "elapsedTiming", + "else", + "for", + "from", + "global", + "if", + "in", + "list", + "local", + "new", + "not", + "of", + "or", + "return", + "shield", + "SPACE", + "step", + "symbol", + "then", + "threadVariable", + "throw", + "time", + "timing", + "to", + "try", + "when", + "while", + "xor" + ) + +M2DATATYPES = ( + "Adjacent", + "AffineVariety", + "Analyzer", + "ANCHOR", + "AngleBarList", + "Array", + "AssociativeExpression", + "Bag", + "BasicList", + "BettiTally", + "BinaryOperation", + "BLOCKQUOTE", + "BODY", + "BOLD", + "Boolean", + "BR", + "CacheFunction", + "CacheTable", + "CC", + "CDATA", + "ChainComplex", + "ChainComplexMap", + "CODE", + "CoherentSheaf", + "Command", + "COMMENT", + "CompiledFunction", + "CompiledFunctionBody", + "CompiledFunctionClosure", + "ComplexField", + "Constant", + "Database", + "DD", + "Descent", + "Describe", + "Dictionary", + "DIV", + "Divide", + "DL", + "DocumentTag", + "DT", + "Eliminate", + "EM", + "EngineRing", + "Equation", + "ExampleItem", + "Expression", + "File", + "FilePosition", + "FractionField", + "Function", + "FunctionApplication", + "FunctionBody", + "FunctionClosure", + "GaloisField", + "GeneralOrderedMonoid", + "GlobalDictionary", + "GradedModule", + "GradedModuleMap", + "GroebnerBasis", + "GroebnerBasisOptions", + "HashTable", + "HEAD", + "HEADER1", + "HEADER2", + "HEADER3", + "HEADER4", + "HEADER5", + "HEADER6", + "HeaderType", + "Holder", + "HR", + "HREF", + "HTML", + "Hybrid", + "Hypertext", + "HypertextContainer", + "HypertextParagraph", + "Ideal", + "IMG", + "ImmutableType", + "IndeterminateNumber", + "IndexedVariable", + "IndexedVariableTable", + "InexactField", + "InexactFieldFamily", + "InexactNumber", + "InfiniteNumber", + "IntermediateMarkUpType", + "ITALIC", + "Keyword", + "LABEL", + "LATER", + "LI", + "LINK", + "List", + "LITERAL", + "LocalDictionary", + "LowerBound", + "Manipulator", + "MapExpression", + "MarkUpType", + "Matrix", + "MatrixExpression", + "MENU", + "META", + "MethodFunction", + "MethodFunctionBinary", + "MethodFunctionSingle", + "MethodFunctionWithOptions", + "Minus", + "Module", + "Monoid", + "MonoidElement", + "MonomialIdeal", + "MultigradedBettiTally", + "MutableHashTable", + "MutableList", + "MutableMatrix", + "Net", + "NetFile", + "NonAssociativeProduct", + "Nothing", + "Number", + "NumberedVerticalList", + "OL", + "OneExpression", + "Option", + "OptionTable", + "OrderedMonoid", + "Package", + "PARA", + "Parenthesize", + "Parser", + "Partition", + "PolynomialRing", + "Power", + "PRE", + "Product", + "ProductOrder", + "Program", + "ProgramRun", + "ProjectiveHilbertPolynomial", + "ProjectiveVariety", + "Pseudocode", + "QQ", + "QuotientRing", + "RealField", + "Resolution", + "Ring", + "RingElement", + "RingFamily", + "RingMap", + "RowExpression", + "RR", + "RRi", + "ScriptedFunctor", + "SelfInitializingType", + "Sequence", + "Set", + "SheafExpression", + "SheafOfRings", + "SMALL", + "SPAN", + "SparseMonomialVectorExpression", + "SparseVectorExpression", + "String", + "STRONG", + "STYLE", + "SUB", + "Subscript", + "SUBSECTION", + "Sum", + "SumOfTwists", + "SUP", + "Superscript", + "Symbol", + "SymbolBody", + "TABLE", + "Table", + "Tally", + "Task", + "TD", + "TestInput", + "TEX", + "TH", + "Thing", + "Time", + "TITLE", + "TO", + "TO2", + "TOH", + "TR", + "TT", + "Type", + "UL", + "URL", + "Variety", + "Vector", + "VectorExpression", + "VerticalList", + "VirtualTally", + "VisibleList", + "WrapperType", + "ZeroExpression", + "ZZ" + ) + +M2FUNCTIONS = ( + "about", + "abs", + "accumulate", + "acos", + "acosh", + "acot", + "addCancelTask", + "addDependencyTask", + "addEndFunction", + "addHook", + "addStartFunction", + "addStartTask", + "adjoint", + "agm", + "alarm", + "all", + "ambient", + "analyticSpread", + "ancestor", + "ancestors", + "andP", + "ann", + "annihilator", + "antipode", + "any", + "append", + "applicationDirectory", + "apply", + "applyKeys", + "applyPairs", + "applyTable", + "applyValues", + "apropos", + "arXiv", + "ascii", + "asin", + "asinh", + "ass", + "assert", + "associatedGradedRing", + "associatedPrimes", + "atan", + "atan2", + "atEndOfFile", + "autoload", + "baseFilename", + "baseName", + "baseRing", + "basis", + "beginDocumentation", + "benchmark", + "BesselJ", + "BesselY", + "betti", + "between", + "binomial", + "borel", + "cacheValue", + "cancelTask", + "capture", + "ceiling", + "centerString", + "chainComplex", + "char", + "characters", + "charAnalyzer", + "check", + "chi", + "class", + "clean", + "clearEcho", + "code", + "codim", + "coefficient", + "coefficientRing", + "coefficients", + "cohomology", + "coimage", + "coker", + "cokernel", + "collectGarbage", + "columnAdd", + "columnate", + "columnMult", + "columnPermute", + "columnRankProfile", + "columnSwap", + "combine", + "commandInterpreter", + "commonest", + "commonRing", + "comodule", + "complement", + "complete", + "components", + "compose", + "compositions", + "compress", + "concatenate", + "conductor", + "cone", + "conjugate", + "connectionCount", + "constParser", + "content", + "contract", + "conwayPolynomial", + "copy", + "copyDirectory", + "copyFile", + "cos", + "cosh", + "cot", + "cotangentSheaf", + "coth", + "cover", + "coverMap", + "cpuTime", + "createTask", + "csc", + "csch", + "currentDirectory", + "currentLineNumber", + "currentTime", + "deadParser", + "debug", + "debugError", + "decompose", + "deepSplice", + "default", + "degree", + "degreeLength", + "degrees", + "degreesMonoid", + "degreesRing", + "delete", + "demark", + "denominator", + "depth", + "describe", + "det", + "determinant", + "diagonalMatrix", + "diameter", + "dictionary", + "diff", + "difference", + "dim", + "directSum", + "disassemble", + "discriminant", + "dismiss", + "distinguished", + "divideByVariable", + "doc", + "document", + "drop", + "dual", + "eagonNorthcott", + "echoOff", + "echoOn", + "eigenvalues", + "eigenvectors", + "eint", + "elements", + "eliminate", + "End", + "endPackage", + "entries", + "erase", + "erf", + "erfc", + "error", + "euler", + "eulers", + "even", + "EXAMPLE", + "examples", + "exec", + "exp", + "expectedReesIdeal", + "expm1", + "exponents", + "export", + "exportFrom", + "exportMutable", + "expression", + "extend", + "exteriorPower", + "factor", + "Fano", + "fileExecutable", + "fileExists", + "fileLength", + "fileMode", + "fileReadable", + "fileTime", + "fileWritable", + "fillMatrix", + "findFiles", + "findHeft", + "findProgram", + "findSynonyms", + "first", + "firstkey", + "fittingIdeal", + "flagLookup", + "flatten", + "flattenRing", + "flip", + "floor", + "fold", + "forceGB", + "fork", + "format", + "formation", + "frac", + "fraction", + "frames", + "fromDividedPowers", + "fromDual", + "functionBody", + "futureParser", + "Gamma", + "gb", + "gbRemove", + "gbSnapshot", + "gcd", + "gcdCoefficients", + "gcdLLL", + "GCstats", + "genera", + "generateAssertions", + "generator", + "generators", + "genericMatrix", + "genericSkewMatrix", + "genericSymmetricMatrix", + "gens", + "genus", + "get", + "getc", + "getChangeMatrix", + "getenv", + "getGlobalSymbol", + "getNetFile", + "getNonUnit", + "getPrimeWithRootOfUnity", + "getSymbol", + "getWWW", + "GF", + "globalAssign", + "globalAssignFunction", + "globalAssignment", + "globalReleaseFunction", + "gradedModule", + "gradedModuleMap", + "gramm", + "graphIdeal", + "graphRing", + "Grassmannian", + "groebnerBasis", + "groupID", + "hash", + "hashTable", + "heft", + "height", + "hermite", + "hilbertFunction", + "hilbertPolynomial", + "hilbertSeries", + "hold", + "Hom", + "homogenize", + "homology", + "homomorphism", + "hooks", + "horizontalJoin", + "html", + "httpHeaders", + "hypertext", + "icFracP", + "icFractions", + "icMap", + "icPIdeal", + "ideal", + "idealizer", + "identity", + "image", + "imaginaryPart", + "importFrom", + "independentSets", + "index", + "indices", + "inducedMap", + "inducesWellDefinedMap", + "info", + "input", + "insert", + "installAssignmentMethod", + "installedPackages", + "installHilbertFunction", + "installMethod", + "installMinprimes", + "installPackage", + "instance", + "instances", + "integralClosure", + "integrate", + "intersect", + "intersectInP", + "intersection", + "interval", + "inverse", + "inversePermutation", + "inverseSystem", + "irreducibleCharacteristicSeries", + "irreducibleDecomposition", + "isAffineRing", + "isANumber", + "isBorel", + "isCanceled", + "isCommutative", + "isConstant", + "isDirectory", + "isDirectSum", + "isEmpty", + "isField", + "isFinite", + "isFinitePrimeField", + "isFreeModule", + "isGlobalSymbol", + "isHomogeneous", + "isIdeal", + "isInfinite", + "isInjective", + "isInputFile", + "isIsomorphism", + "isLinearType", + "isListener", + "isLLL", + "isMember", + "isModule", + "isMonomialIdeal", + "isNormal", + "isOpen", + "isOutputFile", + "isPolynomialRing", + "isPrimary", + "isPrime", + "isPrimitive", + "isPseudoprime", + "isQuotientModule", + "isQuotientOf", + "isQuotientRing", + "isReady", + "isReal", + "isReduction", + "isRegularFile", + "isRing", + "isSkewCommutative", + "isSorted", + "isSquareFree", + "isStandardGradedPolynomialRing", + "isSubmodule", + "isSubquotient", + "isSubset", + "isSupportedInZeroLocus", + "isSurjective", + "isTable", + "isUnit", + "isWellDefined", + "isWeylAlgebra", + "jacobian", + "jacobianDual", + "join", + "ker", + "kernel", + "kernelLLL", + "kernelOfLocalization", + "keys", + "kill", + "koszul", + "last", + "lcm", + "leadCoefficient", + "leadComponent", + "leadMonomial", + "leadTerm", + "left", + "length", + "letterParser", + "lift", + "liftable", + "limitFiles", + "limitProcesses", + "lines", + "linkFile", + "listForm", + "listSymbols", + "LLL", + "lngamma", + "load", + "loadPackage", + "localDictionaries", + "localize", + "locate", + "log", + "log1p", + "lookup", + "lookupCount", + "LUdecomposition", + "makeDirectory", + "makeDocumentTag", + "makePackageIndex", + "makeS2", + "map", + "markedGB", + "match", + "mathML", + "matrix", + "max", + "maxPosition", + "member", + "memoize", + "merge", + "mergePairs", + "method", + "methodOptions", + "methods", + "midpoint", + "min", + "mingens", + "mingle", + "minimalBetti", + "minimalPresentation", + "minimalPrimes", + "minimalReduction", + "minimizeFilename", + "minors", + "minPosition", + "minPres", + "minprimes", + "minus", + "mkdir", + "mod", + "module", + "modulo", + "monoid", + "monomialCurveIdeal", + "monomialIdeal", + "monomials", + "monomialSubideal", + "moveFile", + "multidegree", + "multidoc", + "multigraded", + "multiplicity", + "mutable", + "mutableIdentity", + "mutableMatrix", + "nanosleep", + "needs", + "needsPackage", + "net", + "netList", + "newClass", + "newCoordinateSystem", + "newNetFile", + "newPackage", + "newRing", + "nextkey", + "nextPrime", + "NNParser", + "nonspaceAnalyzer", + "norm", + "normalCone", + "notImplemented", + "nullhomotopy", + "nullParser", + "nullSpace", + "number", + "numcols", + "numColumns", + "numerator", + "numeric", + "numericInterval", + "numgens", + "numRows", + "numrows", + "odd", + "ofClass", + "on", + "openDatabase", + "openDatabaseOut", + "openFiles", + "openIn", + "openInOut", + "openListener", + "openOut", + "openOutAppend", + "optionalSignParser", + "options", + "optP", + "orP", + "override", + "pack", + "package", + "packageTemplate", + "pad", + "pager", + "pairs", + "parent", + "part", + "partition", + "partitions", + "parts", + "pdim", + "peek", + "permanents", + "permutations", + "pfaffians", + "pivots", + "plus", + "poincare", + "poincareN", + "polarize", + "poly", + "position", + "positions", + "power", + "powermod", + "precision", + "preimage", + "prepend", + "presentation", + "pretty", + "primaryComponent", + "primaryDecomposition", + "print", + "printerr", + "printString", + "processID", + "product", + "profile", + "Proj", + "projectiveHilbertPolynomial", + "promote", + "protect", + "prune", + "pseudocode", + "pseudoRemainder", + "pushForward", + "QQParser", + "QRDecomposition", + "quotient", + "quotientRemainder", + "radical", + "radicalContainment", + "random", + "randomKRationalPoint", + "randomMutableMatrix", + "rank", + "read", + "readDirectory", + "readlink", + "readPackage", + "realPart", + "realpath", + "recursionDepth", + "reducedRowEchelonForm", + "reduceHilbert", + "reductionNumber", + "reesAlgebra", + "reesAlgebraIdeal", + "reesIdeal", + "regex", + "regexQuote", + "registerFinalizer", + "regSeqInIdeal", + "regularity", + "relations", + "relativizeFilename", + "remainder", + "remove", + "removeDirectory", + "removeFile", + "removeLowestDimension", + "reorganize", + "replace", + "res", + "reshape", + "resolution", + "resultant", + "reverse", + "right", + "ring", + "ringFromFractions", + "roots", + "rotate", + "round", + "rowAdd", + "rowMult", + "rowPermute", + "rowRankProfile", + "rowSwap", + "rsort", + "run", + "runHooks", + "runLengthEncode", + "runProgram", + "same", + "saturate", + "scan", + "scanKeys", + "scanLines", + "scanPairs", + "scanValues", + "schedule", + "schreyerOrder", + "Schubert", + "searchPath", + "sec", + "sech", + "seeParsing", + "select", + "selectInSubring", + "selectVariables", + "separate", + "separateRegexp", + "sequence", + "serialNumber", + "set", + "setEcho", + "setGroupID", + "setIOExclusive", + "setIOSynchronized", + "setIOUnSynchronized", + "setRandomSeed", + "setup", + "setupEmacs", + "sheaf", + "sheafHom", + "show", + "showHtml", + "showTex", + "simpleDocFrob", + "sin", + "singularLocus", + "sinh", + "size", + "size2", + "sleep", + "smithNormalForm", + "solve", + "someTerms", + "sort", + "sortColumns", + "source", + "span", + "Spec", + "specialFiber", + "specialFiberIdeal", + "splice", + "splitWWW", + "sqrt", + "stack", + "stacksProject", + "standardForm", + "standardPairs", + "stashValue", + "status", + "style", + "sub", + "sublists", + "submatrix", + "submatrixByDegrees", + "subquotient", + "subsets", + "substitute", + "substring", + "subtable", + "sum", + "super", + "support", + "SVD", + "switch", + "sylvesterMatrix", + "symbolBody", + "symlinkDirectory", + "symlinkFile", + "symmetricAlgebra", + "symmetricAlgebraIdeal", + "symmetricKernel", + "symmetricPower", + "synonym", + "SYNOPSIS", + "syz", + "syzygyScheme", + "table", + "take", + "tally", + "tan", + "tangentCone", + "tangentSheaf", + "tanh", + "target", + "taskResult", + "temporaryFileName", + "tensor", + "tensorAssociativity", + "terminalParser", + "terms", + "TEST", + "testHunekeQuestion", + "tests", + "tex", + "texMath", + "times", + "toAbsolutePath", + "toCC", + "toDividedPowers", + "toDual", + "toExternalString", + "toField", + "toList", + "toLower", + "top", + "topCoefficients", + "topComponents", + "toRR", + "toRRi", + "toSequence", + "toString", + "toUpper", + "trace", + "transpose", + "trim", + "truncate", + "truncateOutput", + "tutorial", + "ultimate", + "unbag", + "uncurry", + "undocumented", + "uniform", + "uninstallAllPackages", + "uninstallPackage", + "unique", + "unsequence", + "unstack", + "use", + "userSymbols", + "utf8", + "utf8check", + "validate", + "value", + "values", + "variety", + "vars", + "vector", + "versalEmbedding", + "wait", + "wedgeProduct", + "weightRange", + "whichGm", + "width", + "wikipedia", + "wrap", + "youngest", + "zero", + "zeta", + "ZZParser" + ) + +M2CONSTANTS = ( + "AbstractToricVarieties", + "Acknowledgement", + "AdditionalPaths", + "AdjointIdeal", + "AfterEval", + "AfterNoPrint", + "AfterPrint", + "AInfinity", + "AlgebraicSplines", + "Algorithm", + "Alignment", + "AllCodimensions", + "allowableThreads", + "AnalyzeSheafOnP1", + "applicationDirectorySuffix", + "argument", + "Ascending", + "AssociativeAlgebras", + "Authors", + "AuxiliaryFiles", + "backtrace", + "Bareiss", + "BaseFunction", + "baseRings", + "BaseRow", + "BasisElementLimit", + "Bayer", + "BeforePrint", + "BeginningMacaulay2", + "Benchmark", + "Bertini", + "BettiCharacters", + "BGG", + "BIBasis", + "Binary", + "Binomial", + "BinomialEdgeIdeals", + "Binomials", + "BKZ", + "BlockMatrix", + "Body", + "BoijSoederberg", + "Book3264Examples", + "BooleanGB", + "Boxes", + "Browse", + "Bruns", + "cache", + "CacheExampleOutput", + "CallLimit", + "CannedExample", + "Caveat", + "Center", + "Certification", + "ChainComplexExtras", + "ChainComplexOperations", + "ChangeMatrix", + "CharacteristicClasses", + "CheckDocumentation", + "Chordal", + "Classic", + "clearAll", + "clearOutput", + "close", + "closeIn", + "closeOut", + "ClosestFit", + "Code", + "CodimensionLimit", + "CoefficientRing", + "Cofactor", + "CohenEngine", + "CohenTopLevel", + "CohomCalg", + "CoincidentRootLoci", + "commandLine", + "CompactMatrix", + "compactMatrixForm", + "Complement", + "CompleteIntersection", + "CompleteIntersectionResolutions", + "Complexes", + "ConductorElement", + "Configuration", + "ConformalBlocks", + "Consequences", + "Constants", + "Contributors", + "ConvexInterface", + "ConwayPolynomials", + "copyright", + "Core", + "CorrespondenceScrolls", + "Cremona", + "currentFileDirectory", + "currentFileName", + "currentLayout", + "currentPackage", + "Cyclotomic", + "Date", + "dd", + "DebuggingMode", + "debuggingMode", + "debugLevel", + "DecomposableSparseSystems", + "Decompose", + "Default", + "defaultPrecision", + "Degree", + "DegreeLift", + "DegreeLimit", + "DegreeMap", + "DegreeOrder", + "DegreeRank", + "Degrees", + "Dense", + "Density", + "Depth", + "Descending", + "Description", + "DeterminantalRepresentations", + "DGAlgebras", + "dictionaryPath", + "DiffAlg", + "Dispatch", + "DivideConquer", + "DividedPowers", + "Divisor", + "Dmodules", + "docExample", + "docTemplate", + "Down", + "EagonResolution", + "EdgeIdeals", + "edit", + "EigenSolver", + "EisenbudHunekeVasconcelos", + "Elimination", + "EliminationMatrices", + "EllipticCurves", + "EllipticIntegrals", + "Email", + "end", + "endl", + "Engine", + "engineDebugLevel", + "EngineTests", + "EnumerationCurves", + "environment", + "EquivariantGB", + "errorDepth", + "EulerConstant", + "Example", + "ExampleFiles", + "ExampleSystems", + "Exclude", + "exit", + "Ext", + "ExteriorIdeals", + "ExteriorModules", + "false", + "FastMinors", + "FastNonminimal", + "FGLM", + "fileDictionaries", + "fileExitHooks", + "FileName", + "FindOne", + "FiniteFittingIdeals", + "First", + "FirstPackage", + "FlatMonoid", + "Flexible", + "flush", + "FollowLinks", + "FormalGroupLaws", + "Format", + "FourierMotzkin", + "FourTiTwo", + "fpLLL", + "FrobeniusThresholds", + "FunctionFieldDesingularization", + "GBDegrees", + "gbTrace", + "GenerateAssertions", + "Generic", + "GenericInitialIdeal", + "gfanInterface", + "Givens", + "GKMVarieties", + "GLex", + "Global", + "GlobalAssignHook", + "globalAssignmentHooks", + "GlobalHookStore", + "GlobalReleaseHook", + "Gorenstein", + "GradedLieAlgebras", + "GraphicalModels", + "GraphicalModelsMLE", + "Graphics", + "Graphs", + "GRevLex", + "GroebnerStrata", + "GroebnerWalk", + "GroupLex", + "GroupRevLex", + "GTZ", + "Hadamard", + "handleInterrupts", + "HardDegreeLimit", + "Heading", + "Headline", + "Heft", + "Height", + "help", + "Hermite", + "Hermitian", + "HH", + "hh", + "HigherCIOperators", + "HighestWeights", + "Hilbert", + "HodgeIntegrals", + "homeDirectory", + "HomePage", + "Homogeneous", + "Homogeneous2", + "HomotopyLieAlgebra", + "HorizontalSpace", + "HyperplaneArrangements", + "id", + "IgnoreExampleErrors", + "ii", + "incomparable", + "Increment", + "indeterminate", + "Index", + "indexComponents", + "infinity", + "InfoDirSection", + "infoHelp", + "Inhomogeneous", + "Inputs", + "InstallPrefix", + "IntegralClosure", + "interpreterDepth", + "Intersection", + "InvariantRing", + "InverseMethod", + "Inverses", + "InverseSystems", + "Invertible", + "InvolutiveBases", + "Item", + "Iterate", + "Jacobian", + "Jets", + "Join", + "Jupyter", + "K3Carpets", + "K3Surfaces", + "Keep", + "KeepFiles", + "KeepZeroes", + "Key", + "Keywords", + "Kronecker", + "KustinMiller", + "lastMatch", + "LatticePolytopes", + "Layout", + "Left", + "LengthLimit", + "Lex", + "LexIdeals", + "Licenses", + "LieTypes", + "Limit", + "Linear", + "LinearAlgebra", + "LinearTruncations", + "lineNumber", + "listLocalSymbols", + "listUserSymbols", + "LLLBases", + "loadDepth", + "LoadDocumentation", + "loadedFiles", + "loadedPackages", + "Local", + "LocalRings", + "LongPolynomial", + "M0nbar", + "Macaulay2Doc", + "MakeDocumentation", + "MakeHTML", + "MakeInfo", + "MakeLinks", + "MakePDF", + "MapleInterface", + "Markov", + "Matroids", + "maxAllowableThreads", + "maxExponent", + "MaximalRank", + "MaxReductionCount", + "MCMApproximations", + "minExponent", + "MinimalGenerators", + "MinimalMatrix", + "minimalPresentationMap", + "minimalPresentationMapInv", + "MinimalPrimes", + "Minimize", + "MinimumVersion", + "Miura", + "MixedMultiplicity", + "ModuleDeformations", + "MonodromySolver", + "Monomial", + "MonomialAlgebras", + "MonomialIntegerPrograms", + "MonomialOrbits", + "MonomialOrder", + "Monomials", + "MonomialSize", + "MultiGradedRationalMap", + "MultiplicitySequence", + "MultiplierIdeals", + "MultiplierIdealsDim2", + "MultiprojectiveVarieties", + "NAGtypes", + "Name", + "Nauty", + "NautyGraphs", + "NCAlgebra", + "NCLex", + "NewFromMethod", + "newline", + "NewMethod", + "NewOfFromMethod", + "NewOfMethod", + "nil", + "Node", + "NoetherianOperators", + "NoetherNormalization", + "NonminimalComplexes", + "NoPrint", + "Normaliz", + "NormalToricVarieties", + "notify", + "NTL", + "null", + "nullaryMethods", + "NumericalAlgebraicGeometry", + "NumericalCertification", + "NumericalImplicitization", + "NumericalLinearAlgebra", + "NumericalSchubertCalculus", + "NumericSolutions", + "OldPolyhedra", + "OldToricVectorBundles", + "OO", + "oo", + "ooo", + "oooo", + "OpenMath", + "operatorAttributes", + "OptionalComponentsPresent", + "Options", + "Order", + "order", + "OutputDictionary", + "Outputs", + "PackageCitations", + "PackageDictionary", + "PackageExports", + "PackageImports", + "PackageTemplate", + "PairLimit", + "PairsRemaining", + "Parametrization", + "Parsing", + "path", + "PencilsOfQuadrics", + "Permanents", + "PHCpack", + "PhylogeneticTrees", + "pi", + "PieriMaps", + "PlaneCurveSingularities", + "Points", + "Polyhedra", + "Polymake", + "Posets", + "Position", + "PositivityToricBundles", + "POSIX", + "Postfix", + "Pre", + "Precision", + "Prefix", + "prefixDirectory", + "prefixPath", + "PrimaryDecomposition", + "PrimaryTag", + "PrimitiveElement", + "Print", + "printingAccuracy", + "printingLeadLimit", + "printingPrecision", + "printingSeparator", + "printingTimeLimit", + "printingTrailLimit", + "printWidth", + "profileSummary", + "programPaths", + "Projective", + "Prune", + "PruneComplex", + "pruningMap", + "Pullback", + "PushForward", + "Python", + "QthPower", + "Quasidegrees", + "QuaternaryQuartics", + "QuillenSuslin", + "quit", + "Quotient", + "Radical", + "RadicalCodim1", + "RaiseError", + "RandomCanonicalCurves", + "RandomComplexes", + "RandomCurves", + "RandomCurvesOverVerySmallFiniteFields", + "RandomGenus14Curves", + "RandomIdeals", + "RandomMonomialIdeals", + "RandomObjects", + "RandomPlaneCurves", + "RandomPoints", + "RandomSpaceCurves", + "Range", + "RationalMaps", + "RationalPoints", + "RationalPoints2", + "ReactionNetworks", + "RealFP", + "RealQP", + "RealQP1", + "RealRoots", + "RealRR", + "RealXD", + "recursionLimit", + "Reduce", + "ReesAlgebra", + "References", + "ReflexivePolytopesDB", + "Regularity", + "RelativeCanonicalResolution", + "Reload", + "RemakeAllDocumentation", + "RerunExamples", + "ResidualIntersections", + "ResLengthThree", + "ResolutionsOfStanleyReisnerRings", + "restart", + "Result", + "Resultants", + "returnCode", + "Reverse", + "RevLex", + "Right", + "rootPath", + "rootURI", + "RunDirectory", + "RunExamples", + "RunExternalM2", + "Saturation", + "Schubert2", + "SchurComplexes", + "SchurFunctors", + "SchurRings", + "scriptCommandLine", + "SCSCP", + "SectionRing", + "SeeAlso", + "SegreClasses", + "SemidefiniteProgramming", + "Seminormalization", + "SeparateExec", + "Serialization", + "sheafExt", + "ShimoyamaYokoyama", + "showClassStructure", + "showStructure", + "showUserStructure", + "SimpleDoc", + "SimplicialComplexes", + "SimplicialDecomposability", + "SimplicialPosets", + "SimplifyFractions", + "SizeLimit", + "SkewCommutative", + "SlackIdeals", + "SLnEquivariantMatrices", + "SLPexpressions", + "Sort", + "SortStrategy", + "SourceCode", + "SourceRing", + "SpaceCurves", + "SparseResultants", + "SpechtModule", + "SpecialFanoFourfolds", + "SpectralSequences", + "SRdeformations", + "Standard", + "StartWithOneMinor", + "StatePolytope", + "StatGraphs", + "stderr", + "stdio", + "StopBeforeComputation", + "stopIfError", + "StopWithMinimalGenerators", + "Strategy", + "StronglyStableIdeals", + "Style", + "SubalgebraBases", + "Subnodes", + "SubringLimit", + "subscript", + "Sugarless", + "SumsOfSquares", + "SuperLinearAlgebra", + "superscript", + "SVDComplexes", + "SwitchingFields", + "SymbolicPowers", + "SymmetricPolynomials", + "Synopsis", + "Syzygies", + "SyzygyLimit", + "SyzygyMatrix", + "SyzygyRows", + "TangentCone", + "TateOnProducts", + "TensorComplexes", + "Test", + "testExample", + "TestIdeals", + "TeXmacs", + "Text", + "ThinSincereQuivers", + "ThreadedGB", + "Threshold", + "Topcom", + "topLevelMode", + "Tor", + "TorAlgebra", + "Toric", + "ToricInvariants", + "ToricTopology", + "ToricVectorBundles", + "TotalPairs", + "Tree", + "TriangularSets", + "Tries", + "Trim", + "Triplets", + "Tropical", + "true", + "Truncate", + "Truncations", + "TSpreadIdeals", + "TypicalValue", + "typicalValues", + "Undo", + "Unique", + "Units", + "Unmixed", + "Up", + "UpdateOnly", + "UpperTriangular", + "Usage", + "UseCachedExampleOutput", + "UseHilbertFunction", + "UserMode", + "UseSyzygies", + "Variable", + "VariableBaseName", + "Variables", + "Vasconcelos", + "VectorFields", + "VectorGraphics", + "Verbose", + "Verbosity", + "Verify", + "VersalDeformations", + "Version", + "version", + "VerticalSpace", + "viewHelp", + "VirtualResolutions", + "Visualize", + "WebApp", + "Weights", + "WeylAlgebra", + "WeylGroups", + "Wrap", + "XML" + ) + +class Macaulay2Lexer(RegexLexer): + name = 'Macaulay2' + url = 'https://faculty.math.illinois.edu/Macaulay2/' + aliases = ['macaulay2'] + filenames = ['*.m2'] + + tokens = { + 'root': [ + (r'--.*$', Comment.Single), + (r'-\*', Comment.Multiline, 'block comment'), + (r'"', String, 'quote string'), + (r'///', String, 'slash string'), + (words(M2KEYWORDS, prefix=r'\b', suffix=r'\b'), Keyword), + (words(M2DATATYPES, prefix=r'\b', suffix=r'\b'), Name.Builtin), + (words(M2FUNCTIONS, prefix=r'\b', suffix=r'\b'), Name.Function), + (words(M2CONSTANTS, prefix=r'\b', suffix=r'\b'), Name.Constant), + (r'\s+', Text.Whitespace), + (r'.', Text) + ], + 'block comment' : [ + (r'[^*-]+', Comment.Multiline), + (r'\*-', Comment.Multiline, '#pop'), + (r'[*-]', Comment.Multiline) + ], + 'quote string' : [ + (r'[^\\"]+', String), + (r'"', String, '#pop'), + (r'\\"?', String), + ], + 'slash string' : [ + (r'[^/]+', String), + (r'(//)+(?!/)', String), + (r'/(//)+(?!/)', String, '#pop'), + (r'/', String) + ] + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/make.py b/contrib/python/Pygments/py3/pygments/lexers/make.py index 3e317e819e..d9027f3c28 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/make.py +++ b/contrib/python/Pygments/py3/pygments/lexers/make.py @@ -4,7 +4,7 @@ Lexers for Makefiles and similar. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -125,11 +125,12 @@ class BaseMakefileLexer(RegexLexer): class CMakeLexer(RegexLexer): """ - Lexer for `CMake <http://cmake.org/Wiki/CMake>`_ files. + Lexer for CMake files. .. versionadded:: 1.2 """ name = 'CMake' + url = 'https://cmake.org/documentation/' aliases = ['cmake'] filenames = ['*.cmake', 'CMakeLists.txt'] mimetypes = ['text/x-cmake'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/markup.py b/contrib/python/Pygments/py3/pygments/lexers/markup.py index e1a8429ef0..47feaeb684 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/markup.py +++ b/contrib/python/Pygments/py3/pygments/lexers/markup.py @@ -4,7 +4,7 @@ Lexers for non-HTML markup languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -106,7 +106,7 @@ class MoinWikiLexer(RegexLexer): class RstLexer(RegexLexer): """ - For `reStructuredText <http://docutils.sf.net/rst.html>`_ markup. + For reStructuredText markup. .. versionadded:: 0.7 @@ -121,6 +121,7 @@ class RstLexer(RegexLexer): .. versionadded:: 0.8 """ name = 'reStructuredText' + url = 'https://docutils.sourceforge.io/rst.html' aliases = ['restructuredtext', 'rst', 'rest'] filenames = ['*.rst', '*.rest'] mimetypes = ["text/x-rst", "text/prs.fallenstein.rst"] @@ -497,11 +498,12 @@ class MozPreprocCssLexer(DelegatingLexer): class MarkdownLexer(RegexLexer): """ - For `Markdown <https://help.github.com/categories/writing-on-github/>`_ markup. + For Markdown markup. .. versionadded:: 2.2 """ name = 'Markdown' + url = 'https://daringfireball.net/projects/markdown/' aliases = ['markdown', 'md'] filenames = ['*.md', '*.markdown'] mimetypes = ["text/x-markdown"] @@ -606,11 +608,12 @@ class MarkdownLexer(RegexLexer): class TiddlyWiki5Lexer(RegexLexer): """ - For `TiddlyWiki5 <https://tiddlywiki.com/#TiddlerFiles>`_ markup. + For TiddlyWiki5 markup. .. versionadded:: 2.7 """ name = 'tiddler' + url = 'https://tiddlywiki.com/#TiddlerFiles' aliases = ['tid'] filenames = ['*.tid'] mimetypes = ["text/vnd.tiddlywiki"] diff --git a/contrib/python/Pygments/py3/pygments/lexers/math.py b/contrib/python/Pygments/py3/pygments/lexers/math.py index 88f810e70f..22144fadf6 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/math.py +++ b/contrib/python/Pygments/py3/pygments/lexers/math.py @@ -4,7 +4,7 @@ Just export lexers that were contained in this module. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/matlab.py b/contrib/python/Pygments/py3/pygments/lexers/matlab.py index 445063935b..7790a2ab4c 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/matlab.py +++ b/contrib/python/Pygments/py3/pygments/lexers/matlab.py @@ -4,7 +4,7 @@ Lexers for Matlab and related languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -2815,6 +2815,7 @@ class OctaveLexer(RegexLexer): .. versionadded:: 1.5 """ name = 'Octave' + url = 'https://www.gnu.org/software/octave/index' aliases = ['octave'] filenames = ['*.m'] mimetypes = ['text/octave'] @@ -3232,6 +3233,7 @@ class ScilabLexer(RegexLexer): .. versionadded:: 1.5 """ name = 'Scilab' + url = 'https://www.scilab.org/' aliases = ['scilab'] filenames = ['*.sci', '*.sce', '*.tst'] mimetypes = ['text/scilab'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/maxima.py b/contrib/python/Pygments/py3/pygments/lexers/maxima.py index 73b9eea15b..214e24e71d 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/maxima.py +++ b/contrib/python/Pygments/py3/pygments/lexers/maxima.py @@ -6,7 +6,7 @@ Derived from pygments/lexers/algebra.py. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -20,12 +20,13 @@ __all__ = ['MaximaLexer'] class MaximaLexer(RegexLexer): """ - A `Maxima <http://maxima.sourceforge.net>`_ lexer. + A Maxima lexer. Derived from pygments.lexers.MuPADLexer. .. versionadded:: 2.11 """ name = 'Maxima' + url = 'http://maxima.sourceforge.net' aliases = ['maxima', 'macsyma'] filenames = ['*.mac', '*.max'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/mcfunction.py b/contrib/python/Pygments/py3/pygments/lexers/mcfunction.py new file mode 100644 index 0000000000..b05e21d403 --- /dev/null +++ b/contrib/python/Pygments/py3/pygments/lexers/mcfunction.py @@ -0,0 +1,324 @@ +""" + pygments.lexers.mcfunction + ~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Lexers for MCFunction and related languages. + + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, default, include, bygroups +from pygments.token import (Comment, Keyword, Literal, Name, Number, + Operator, Punctuation, String, Text, Token, + Whitespace) + + +__all__ = ['SNBTLexer', 'MCFunctionLexer'] + + +class SNBTLexer(RegexLexer): + """Lexer for stringified NBT, a data format used in Minecraft + + .. versionadded:: 2.12.0 + """ + + name = "SNBT" + url = "https://minecraft.fandom.com/wiki/NBT_format" + aliases = ["snbt"] + filenames = ["*.snbt"] + mimetypes = ["text/snbt"] + + tokens = { + "root": [ + # We only look for the open bracket here since square bracket + # is only valid in NBT pathing (which is a mcfunction idea). + (r"\{", Punctuation, "compound"), + (r"[^\{]+", Text), + ], + + "whitespace": [ + (r"\s+", Whitespace), + ], + + "operators": [ + (r"[,:;]", Punctuation), + ], + + "literals": [ + (r"(true|false)", Keyword.Constant), + (r"-?\d+[eE]-?\d+", Number.Float), + (r"-?\d*\.\d+[fFdD]?", Number.Float), + (r"-?\d+[bBsSlLfFdD]?", Number.Integer), + + # Separate states for both types of strings so they don't entangle + (r'"', String.Double, "literals.string_double"), + (r"'", String.Single, "literals.string_single"), + ], + "literals.string_double": [ + (r"\\.", String.Escape), + (r'[^\\"\n]+', String.Double), + (r'"', String.Double, "#pop"), + ], + "literals.string_single": [ + (r"\\.", String.Escape), + (r"[^\\'\n]+", String.Single), + (r"'", String.Single, "#pop"), + ], + + "compound": [ + # this handles the unquoted snbt keys + # note: stringified keys still work + (r"[A-Z_a-z]+", Name.Attribute), + include("operators"), + include("whitespace"), + include("literals"), + (r"\{", Punctuation, "#push"), + (r"\[", Punctuation, "list"), + (r"\}", Punctuation, "#pop"), + ], + + "list": [ + (r"[A-Z_a-z]+", Name.Attribute), + include("literals"), + include("operators"), + include("whitespace"), + (r"\[", Punctuation, "#push"), + (r"\{", Punctuation, "compound"), + (r"\]", Punctuation, "#pop"), + ], + } + + +class MCFunctionLexer(RegexLexer): + """Lexer for the mcfunction scripting language used in Minecraft + Modelled somewhat after the `GitHub mcfunction grammar <https://github.com/Arcensoth/language-mcfunction>`_. + + .. versionadded:: 2.12.0 + """ + + name = "MCFunction" + url = "https://minecraft.fandom.com/wiki/Commands" + aliases = ["mcfunction", "mcf"] + filenames = ["*.mcfunction"] + mimetypes = ["text/mcfunction"] + + # Used to denotate the start of a block comment, borrowed from Github's mcfunction + _block_comment_prefix = "[>!]" + + tokens = { + "root": [ + include("names"), + include("comments"), + include("literals"), + include("whitespace"), + include("property"), + include("operators"), + include("selectors"), + ], + + "names": [ + # The start of a command (either beginning of line OR after the run keyword) + # We don't encode a list of keywords since mods, plugins, or even pre-processors + # may add new commands, so we have a 'close-enough' regex which catches them. + (r"^(\s*)([a-z_]+)", bygroups(Whitespace, Name.Builtin)), + (r"(?<=run)\s+[a-z_]+", Name.Builtin), + + # UUID + ( + r"\b[0-9a-fA-F]+(?:-[0-9a-fA-F]+){4}\b", + Name.Variable, + ), + include("resource-name"), + # normal command names and scoreboards + # there's no way to know the differences unfortuntely + (r"[A-Za-z_][A-Za-z0-9_.#%$]+", Keyword.Constant), + (r"[#%$][A-Za-z0-9_.#%$]+", Name.Variable.Magic), + ], + + "resource-name": [ + ( + # resource names have to be lowercase + r"#?[a-z_][a-z_.-]*:[a-z0-9_./-]+", + Name.Function, + ), + ( + # similar to above except optional `:`` + # a `/` must be present "somewhere" + r"#?[a-z0-9_\.\-]+\/[a-z0-9_\.\-\/]+", + Name.Function, + ) + ], + + "whitespace": [ + (r"\s+", Whitespace), + ], + + "comments": [ + ( + rf"^\s*(#{_block_comment_prefix})", + Comment.Multiline, + ( + "comments.block", + "comments.block.emphasized", + ), + ), + (r"#.*$", Comment.Single), + ], + "comments.block": [ + (rf"^\s*#{_block_comment_prefix}", Comment.Multiline, "comments.block.emphasized"), + (r"^\s*#", Comment.Multiline, "comments.block.normal"), + default("#pop"), + ], + "comments.block.normal": [ + include("comments.block.special"), + (r"\S+", Comment.Multiline), + (r"\n", Text, "#pop"), + include("whitespace"), + ], + "comments.block.emphasized": [ + include("comments.block.special"), + (r"\S+", String.Doc), + (r"\n", Text, "#pop"), + include("whitespace"), + ], + "comments.block.special": [ + # Params + (r"@\S+", Name.Decorator), + + include("resource-name"), + + # Scoreboard player names + (r"[#%$][A-Za-z0-9_.#%$]+", Name.Variable.Magic), + ], + + "operators": [ + (r"[\-~%^?!+*<>\\/|&=.]", Operator), + ], + + "literals": [ + (r"\.\.", Literal), + (r"(true|false)", Keyword.Pseudo), + + # these are like unquoted strings and appear in many places + (r"[A-Za-z_]+", Name.Variable.Class), + + (r"[0-7]b", Number.Byte), + (r"[+-]?\d*\.?\d+([eE]?[+-]?\d+)?[df]?\b", Number.Float), + (r"[+-]?\d+\b", Number.Integer), + (r'"', String.Double, "literals.string-double"), + (r"'", String.Single, "literals.string-single"), + ], + "literals.string-double": [ + (r"\\.", String.Escape), + (r'[^\\"\n]+', String.Double), + (r'"', String.Double, "#pop"), + ], + "literals.string-single": [ + (r"\\.", String.Escape), + (r"[^\\'\n]+", String.Single), + (r"'", String.Single, "#pop"), + ], + + "selectors": [ + (r"@[a-z]", Name.Variable), + ], + + + ## Generic Property Container + # There are several, differing instances where the language accepts + # specific contained keys or contained key, value pairings. + # + # Property Maps: + # - Starts with either `[` or `{` + # - Key separated by `:` or `=` + # - Deliminated by `,` + # + # Property Lists: + # - Starts with `[` + # - Deliminated by `,` + # + # For simplicity, these patterns match a generic, nestable structure + # which follow a key, value pattern. For normal lists, there's only keys. + # This allow some "illegal" structures, but we'll accept those for + # sake of simplicity + # + # Examples: + # - `[facing=up, powered=true]` (blockstate) + # - `[name="hello world", nbt={key: 1b}]` (selector + nbt) + # - `[{"text": "value"}, "literal"]` (json) + ## + "property": [ + # This state gets included in root and also several substates + # We do this to shortcut the starting of new properties + # within other properties. Lists can have sublists and compounds + # and values can start a new property (see the `difficult_1.txt` + # snippet). + (r"\{", Punctuation, ("property.curly", "property.key")), + (r"\[", Punctuation, ("property.square", "property.key")), + ], + "property.curly": [ + include("whitespace"), + include("property"), + (r"\}", Punctuation, "#pop"), + ], + "property.square": [ + include("whitespace"), + include("property"), + (r"\]", Punctuation, "#pop"), + + # lists can have sequences of items + (r",", Punctuation), + ], + "property.key": [ + include("whitespace"), + + # resource names (for advancements) + # can omit `:` to default `minecraft:` + # must check if there is a future equals sign if `:` is in the name + (r"#?[a-z_][a-z_\.\-]*\:[a-z0-9_\.\-/]+(?=\s*\=)", Name.Attribute, "property.delimiter"), + (r"#?[a-z_][a-z0-9_\.\-/]+", Name.Attribute, "property.delimiter"), + + # unquoted NBT key + (r"[A-Za-z_\-\+]+", Name.Attribute, "property.delimiter"), + + # quoted JSON or NBT key + (r'"', Name.Attribute, "property.delimiter", "literals.string-double"), + (r"'", Name.Attribute, "property.delimiter", "literals.string-single"), + + # index for a list + (r"-?\d+", Number.Integer, "property.delimiter"), + + default("#pop"), + ], + "property.key.string-double": [ + (r"\\.", String.Escape), + (r'[^\\"\n]+', Name.Attribute), + (r'"', Name.Attribute, "#pop"), + ], + "property.key.string-single": [ + (r"\\.", String.Escape), + (r"[^\\'\n]+", Name.Attribute), + (r"'", Name.Attribute, "#pop"), + ], + "property.delimiter": [ + include("whitespace"), + + (r"[:=]!?", Punctuation, "property.value"), + (r",", Punctuation), + + default("#pop"), + ], + "property.value": [ + include("whitespace"), + + # unquoted resource names are valid literals here + (r"#?[a-z_][a-z_\.\-]*\:[a-z0-9_\.\-/]+", Name.Tag), + (r"#?[a-z_][a-z0-9_\.\-/]+", Name.Tag), + + include("literals"), + include("property"), + + default("#pop"), + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/meson.py b/contrib/python/Pygments/py3/pygments/lexers/meson.py index 47db014187..a05c3776d9 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/meson.py +++ b/contrib/python/Pygments/py3/pygments/lexers/meson.py @@ -4,7 +4,7 @@ Pygments lexer for the Meson build system - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -31,7 +31,7 @@ __all__ = ['MesonLexer'] class MesonLexer(RegexLexer): """ - `meson <https://mesonbuild.com/>`_ language lexer. + `meson language lexer. The grammar definition use to transcribe the syntax was retrieved from https://mesonbuild.com/Syntax.html#grammar for version 0.58 Some of those definitions are improperly transcribed so the Meson++ @@ -44,12 +44,11 @@ class MesonLexer(RegexLexer): # TODO keyword_arg: value inner matches name = 'Meson' + url = 'https://mesonbuild.com/' aliases = ['meson', 'meson.build'] filenames = ['meson.build', 'meson_options.txt'] mimetypes = ['text/x-meson'] - flags = re.MULTILINE | re.UNICODE - tokens = { 'root': [ (r'#.*?$', Comment), diff --git a/contrib/python/Pygments/py3/pygments/lexers/mime.py b/contrib/python/Pygments/py3/pygments/lexers/mime.py index 6dcc81556e..0a2db093fe 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/mime.py +++ b/contrib/python/Pygments/py3/pygments/lexers/mime.py @@ -4,7 +4,7 @@ Lexer for Multipurpose Internet Mail Extensions (MIME) data. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -88,7 +88,7 @@ class MIMELexer(RegexLexer): pos_body_start = pos_body_start + 1 entire_body = entire_body[1:] - # if it is not a mulitpart + # if it is not a multipart if not self.content_type.startswith("multipart") or not self.boundary: for i, t, v in self.get_bodypart_tokens(entire_body): yield pos_body_start + i, t, v diff --git a/contrib/python/Pygments/py3/pygments/lexers/ml.py b/contrib/python/Pygments/py3/pygments/lexers/ml.py index 60bd8b9dbc..614e4eb464 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ml.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ml.py @@ -4,7 +4,7 @@ Lexers for ML family languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -55,7 +55,7 @@ class SMLLexer(RegexLexer): # A character constant is a sequence of the form #s, where s is a string # constant denoting a string of size one character. This setup just parses # the entire string as either a String.Double or a String.Char (depending - # on the argument), even if the String.Char is an erronous + # on the argument), even if the String.Char is an erroneous # multiple-character string. def stringy(whatkind): return [ @@ -360,6 +360,7 @@ class OcamlLexer(RegexLexer): """ name = 'OCaml' + url = 'https://ocaml.org/' aliases = ['ocaml'] filenames = ['*.ml', '*.mli', '*.mll', '*.mly'] mimetypes = ['text/x-ocaml'] @@ -446,7 +447,7 @@ class OcamlLexer(RegexLexer): class OpaLexer(RegexLexer): """ - Lexer for the Opa language (http://opalang.org). + Lexer for the Opa language. .. versionadded:: 1.5 """ @@ -769,12 +770,13 @@ class OpaLexer(RegexLexer): class ReasonLexer(RegexLexer): """ - For the ReasonML language (https://reasonml.github.io/). + For the ReasonML language. .. versionadded:: 2.6 """ name = 'ReasonML' + url = 'https://reasonml.github.io/' aliases = ['reasonml', 'reason'] filenames = ['*.re', '*.rei'] mimetypes = ['text/x-reasonml'] @@ -861,11 +863,12 @@ class ReasonLexer(RegexLexer): class FStarLexer(RegexLexer): """ - For the F* language (https://www.fstar-lang.org/). + For the F* language. .. versionadded:: 2.7 """ name = 'FStar' + url = 'https://www.fstar-lang.org/' aliases = ['fstar'] filenames = ['*.fst', '*.fsti'] mimetypes = ['text/x-fstar'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/modeling.py b/contrib/python/Pygments/py3/pygments/lexers/modeling.py index b00a7f10b3..56448f5036 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/modeling.py +++ b/contrib/python/Pygments/py3/pygments/lexers/modeling.py @@ -4,7 +4,7 @@ Lexers for modeling languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -22,11 +22,12 @@ __all__ = ['ModelicaLexer', 'BugsLexer', 'JagsLexer', 'StanLexer'] class ModelicaLexer(RegexLexer): """ - For `Modelica <http://www.modelica.org/>`_ source code. + For Modelica source code. .. versionadded:: 1.1 """ name = 'Modelica' + url = 'http://www.modelica.org/' aliases = ['modelica'] filenames = ['*.mo'] mimetypes = ['text/x-modelica'] @@ -97,7 +98,7 @@ class ModelicaLexer(RegexLexer): class BugsLexer(RegexLexer): """ - Pygments Lexer for `OpenBugs <http://www.openbugs.net/>`_ and WinBugs + Pygments Lexer for OpenBugs and WinBugs models. .. versionadded:: 1.6 @@ -303,7 +304,6 @@ class StanLexer(RegexLexer): (r'(//|#).*$', Comment.Single), ], 'root': [ - # Stan is more restrictive on strings than this regex (r'"[^"]*"', String), # Comments include('comments'), @@ -325,7 +325,7 @@ class StanLexer(RegexLexer): (r'(%s)\b' % r'|'.join(_stan_builtins.TYPES), Keyword.Type), # < should be punctuation, but elsewhere I can't tell if it is in # a range constraint - (r'(<)(\s*)(upper|lower)(\s*)(=)', + (r'(<)(\s*)(upper|lower|offset|multiplier)(\s*)(=)', bygroups(Operator, Whitespace, Keyword, Whitespace, Punctuation)), (r'(,)(\s*)(upper)(\s*)(=)', bygroups(Punctuation, Whitespace, Keyword, Whitespace, Punctuation)), @@ -340,17 +340,21 @@ class StanLexer(RegexLexer): (r'(%s)\b' % r'|'.join(_stan_builtins.RESERVED), Keyword.Reserved), # user-defined functions (r'[A-Za-z]\w*(?=\s*\()]', Name.Function), - # Regular variable names - (r'[A-Za-z]\w*\b', Name), + # Imaginary Literals + (r'[0-9]+(\.[0-9]*)?([eE][+-]?[0-9]+)?i', Number.Float), + (r'\.[0-9]+([eE][+-]?[0-9]+)?i', Number.Float), + (r'[0-9]+i', Number.Float), # Real Literals (r'[0-9]+(\.[0-9]*)?([eE][+-]?[0-9]+)?', Number.Float), (r'\.[0-9]+([eE][+-]?[0-9]+)?', Number.Float), # Integer Literals (r'[0-9]+', Number.Integer), + # Regular variable names + (r'[A-Za-z]\w*\b', Name), # Assignment operators (r'<-|(?:\+|-|\.?/|\.?\*|=)?=|~', Operator), # Infix, prefix and postfix operators (and = ) - (r"\+|-|\.?\*|\.?/|\\|'|\^|!=?|<=?|>=?|\|\||&&|%|\?|:", Operator), + (r"\+|-|\.?\*|\.?/|\\|'|\.?\^|!=?|<=?|>=?|\|\||&&|%|\?|:|%/%|!", Operator), # Block delimiters (r'[{}]', Punctuation), # Distribution | diff --git a/contrib/python/Pygments/py3/pygments/lexers/modula2.py b/contrib/python/Pygments/py3/pygments/lexers/modula2.py index cad2f4fd40..a94d48632a 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/modula2.py +++ b/contrib/python/Pygments/py3/pygments/lexers/modula2.py @@ -4,7 +4,7 @@ Multi-Dialect Lexer for Modula-2. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -21,7 +21,7 @@ __all__ = ['Modula2Lexer'] # Multi-Dialect Modula-2 Lexer class Modula2Lexer(RegexLexer): """ - For `Modula-2 <http://www.modula2.org/>`_ source code. + For Modula-2 source code. The Modula-2 lexer supports several dialects. By default, it operates in fallback mode, recognising the *combined* literals, punctuation symbols @@ -159,6 +159,7 @@ class Modula2Lexer(RegexLexer): Added multi-dialect support. """ name = 'Modula-2' + url = 'http://www.modula2.org/' aliases = ['modula2', 'm2'] filenames = ['*.def', '*.mod'] mimetypes = ['text/x-modula2'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/monte.py b/contrib/python/Pygments/py3/pygments/lexers/monte.py index 4cd83241dd..e22fb93592 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/monte.py +++ b/contrib/python/Pygments/py3/pygments/lexers/monte.py @@ -4,7 +4,7 @@ Lexer for the Monte programming language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -77,11 +77,12 @@ _safeScope = [ class MonteLexer(RegexLexer): """ - Lexer for the `Monte <https://monte.readthedocs.io/>`_ programming language. + Lexer for the Monte programming language. .. versionadded:: 2.2 """ name = 'Monte' + url = 'https://monte.readthedocs.io/' aliases = ['monte'] filenames = ['*.mt'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/mosel.py b/contrib/python/Pygments/py3/pygments/lexers/mosel.py index 62cb3b4c16..1214ba40b7 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/mosel.py +++ b/contrib/python/Pygments/py3/pygments/lexers/mosel.py @@ -5,7 +5,7 @@ Lexers for the mosel language. http://www.fico.com/en/products/fico-xpress-optimization - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/ncl.py b/contrib/python/Pygments/py3/pygments/lexers/ncl.py index f9df40bdeb..30cc510f8a 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ncl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ncl.py @@ -4,7 +4,7 @@ Lexers for NCAR Command Language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/nimrod.py b/contrib/python/Pygments/py3/pygments/lexers/nimrod.py index ce6ba87537..b94d18f05c 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/nimrod.py +++ b/contrib/python/Pygments/py3/pygments/lexers/nimrod.py @@ -4,7 +4,7 @@ Lexer for the Nim language (formerly known as Nimrod). - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -19,17 +19,18 @@ __all__ = ['NimrodLexer'] class NimrodLexer(RegexLexer): """ - For `Nim <http://nim-lang.org/>`_ source code. + For Nim source code. .. versionadded:: 1.5 """ name = 'Nimrod' + url = 'http://nim-lang.org/' aliases = ['nimrod', 'nim'] filenames = ['*.nim', '*.nimrod'] mimetypes = ['text/x-nim'] - flags = re.MULTILINE | re.IGNORECASE | re.UNICODE + flags = re.MULTILINE | re.IGNORECASE def underscorize(words): newWords = [] diff --git a/contrib/python/Pygments/py3/pygments/lexers/nit.py b/contrib/python/Pygments/py3/pygments/lexers/nit.py index 7a15d78f99..5c9757413f 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/nit.py +++ b/contrib/python/Pygments/py3/pygments/lexers/nit.py @@ -4,7 +4,7 @@ Lexer for the Nit language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -17,12 +17,13 @@ __all__ = ['NitLexer'] class NitLexer(RegexLexer): """ - For `nit <http://nitlanguage.org>`_ source. + For nit source. .. versionadded:: 2.0 """ name = 'Nit' + url = 'http://nitlanguage.org' aliases = ['nit'] filenames = ['*.nit'] tokens = { diff --git a/contrib/python/Pygments/py3/pygments/lexers/nix.py b/contrib/python/Pygments/py3/pygments/lexers/nix.py index bd7afe7440..83731c7b1a 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/nix.py +++ b/contrib/python/Pygments/py3/pygments/lexers/nix.py @@ -4,7 +4,7 @@ Lexers for the NixOS Nix language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -19,18 +19,17 @@ __all__ = ['NixLexer'] class NixLexer(RegexLexer): """ - For the `Nix language <http://nixos.org/nix/>`_. + For the Nix language. .. versionadded:: 2.0 """ name = 'Nix' + url = 'http://nixos.org/nix/' aliases = ['nixos', 'nix'] filenames = ['*.nix'] mimetypes = ['text/x-nix'] - flags = re.MULTILINE | re.UNICODE - keywords = ['rec', 'with', 'let', 'in', 'inherit', 'assert', 'if', 'else', 'then', '...'] builtins = ['import', 'abort', 'baseNameOf', 'dirOf', 'isNull', 'builtins', diff --git a/contrib/python/Pygments/py3/pygments/lexers/oberon.py b/contrib/python/Pygments/py3/pygments/lexers/oberon.py index 7010e910b5..da7a248416 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/oberon.py +++ b/contrib/python/Pygments/py3/pygments/lexers/oberon.py @@ -4,7 +4,7 @@ Lexers for Oberon family languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -19,7 +19,7 @@ __all__ = ['ComponentPascalLexer'] class ComponentPascalLexer(RegexLexer): """ - For `Component Pascal <http://www.oberon.ch/pdf/CP-Lang.pdf>`_ source code. + For Component Pascal source code. .. versionadded:: 2.1 """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/objective.py b/contrib/python/Pygments/py3/pygments/lexers/objective.py index a4cc44b387..bbe949622d 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/objective.py +++ b/contrib/python/Pygments/py3/pygments/lexers/objective.py @@ -4,7 +4,7 @@ Lexers for Objective-C family languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -197,6 +197,7 @@ class ObjectiveCLexer(objective(CLexer)): """ name = 'Objective-C' + url = 'https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Introduction/Introduction.html' aliases = ['objective-c', 'objectivec', 'obj-c', 'objc'] filenames = ['*.m', '*.h'] mimetypes = ['text/x-objective-c'] @@ -281,11 +282,12 @@ class LogosLexer(ObjectiveCppLexer): class SwiftLexer(RegexLexer): """ - For `Swift <https://developer.apple.com/swift/>`_ source. + For Swift source. .. versionadded:: 2.0 """ name = 'Swift' + url = 'https://www.swift.org/' filenames = ['*.swift'] aliases = ['swift'] mimetypes = ['text/x-swift'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/ooc.py b/contrib/python/Pygments/py3/pygments/lexers/ooc.py index 0c74cdec4b..5b1df2c75e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ooc.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ooc.py @@ -4,7 +4,7 @@ Lexers for the Ooc language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -17,11 +17,12 @@ __all__ = ['OocLexer'] class OocLexer(RegexLexer): """ - For `Ooc <http://ooc-lang.org/>`_ source code + For Ooc source code .. versionadded:: 1.2 """ name = 'Ooc' + url = 'http://ooc-lang.org/' aliases = ['ooc'] filenames = ['*.ooc'] mimetypes = ['text/x-ooc'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/other.py b/contrib/python/Pygments/py3/pygments/lexers/other.py index b0930088e6..6c73c01d61 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/other.py +++ b/contrib/python/Pygments/py3/pygments/lexers/other.py @@ -4,7 +4,7 @@ Just export lexer classes previously contained in this module. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/parasail.py b/contrib/python/Pygments/py3/pygments/lexers/parasail.py index 49d8d672e1..de50c65bb4 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/parasail.py +++ b/contrib/python/Pygments/py3/pygments/lexers/parasail.py @@ -4,7 +4,7 @@ Lexer for ParaSail. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -19,12 +19,13 @@ __all__ = ['ParaSailLexer'] class ParaSailLexer(RegexLexer): """ - For `ParaSail <http://www.parasail-lang.org>`_ source code. + For ParaSail source code. .. versionadded:: 2.1 """ name = 'ParaSail' + url = 'http://www.parasail-lang.org' aliases = ['parasail'] filenames = ['*.psi', '*.psl'] mimetypes = ['text/x-parasail'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/parsers.py b/contrib/python/Pygments/py3/pygments/lexers/parsers.py index 0009082fc4..80ef08904e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/parsers.py +++ b/contrib/python/Pygments/py3/pygments/lexers/parsers.py @@ -4,7 +4,7 @@ Lexers for parser generators. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -34,7 +34,7 @@ __all__ = ['RagelLexer', 'RagelEmbeddedLexer', 'RagelCLexer', 'RagelDLexer', class RagelLexer(RegexLexer): """ - A pure `Ragel <http://www.complang.org/ragel/>`_ lexer. Use this for + A pure Ragel lexer. Use this for fragments of Ragel. For ``.rl`` files, use RagelEmbeddedLexer instead (or one of the language-specific subclasses). @@ -42,6 +42,7 @@ class RagelLexer(RegexLexer): """ name = 'Ragel' + url = 'http://www.colm.net/open-source/ragel/' aliases = ['ragel'] filenames = [] diff --git a/contrib/python/Pygments/py3/pygments/lexers/pascal.py b/contrib/python/Pygments/py3/pygments/lexers/pascal.py index 0d1ac3fdb7..2253a22e7c 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/pascal.py +++ b/contrib/python/Pygments/py3/pygments/lexers/pascal.py @@ -4,7 +4,7 @@ Lexers for Pascal family languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -20,12 +20,12 @@ from pygments.scanner import Scanner # compatibility import from pygments.lexers.modula2 import Modula2Lexer -__all__ = ['DelphiLexer', 'AdaLexer'] +__all__ = ['DelphiLexer'] class DelphiLexer(Lexer): """ - For `Delphi <http://www.borland.com/delphi/>`_ (Borland Object Pascal), + For Delphi (Borland Object Pascal), Turbo Pascal and Free Pascal source code. Additional options accepted: @@ -363,7 +363,7 @@ class DelphiLexer(Lexer): elif lowercase_name in self.keywords: token = Keyword # if we are in a special block and a - # block ending keyword occours (and the parenthesis + # block ending keyword occurs (and the parenthesis # is balanced) we end the current block context if (in_function_block or in_property_block) and \ lowercase_name in self.BLOCK_KEYWORDS and \ @@ -505,139 +505,3 @@ class DelphiLexer(Lexer): if scanner.match.strip(): was_dot = scanner.match == '.' yield scanner.start_pos, token, scanner.match or '' - - -class AdaLexer(RegexLexer): - """ - For Ada source code. - - .. versionadded:: 1.3 - """ - - name = 'Ada' - aliases = ['ada', 'ada95', 'ada2005'] - filenames = ['*.adb', '*.ads', '*.ada'] - mimetypes = ['text/x-ada'] - - flags = re.MULTILINE | re.IGNORECASE - - tokens = { - 'root': [ - (r'[^\S\n]+', Text), - (r'--.*?\n', Comment.Single), - (r'[^\S\n]+', Text), - (r'function|procedure|entry', Keyword.Declaration, 'subprogram'), - (r'(subtype|type)(\s+)(\w+)', - bygroups(Keyword.Declaration, Text, Keyword.Type), 'type_def'), - (r'task|protected', Keyword.Declaration), - (r'(subtype)(\s+)', bygroups(Keyword.Declaration, Text)), - (r'(end)(\s+)', bygroups(Keyword.Reserved, Text), 'end'), - (r'(pragma)(\s+)(\w+)', bygroups(Keyword.Reserved, Text, - Comment.Preproc)), - (r'(true|false|null)\b', Keyword.Constant), - (words(( - 'Address', 'Byte', 'Boolean', 'Character', 'Controlled', 'Count', - 'Cursor', 'Duration', 'File_Mode', 'File_Type', 'Float', 'Generator', - 'Integer', 'Long_Float', 'Long_Integer', 'Long_Long_Float', - 'Long_Long_Integer', 'Natural', 'Positive', 'Reference_Type', - 'Short_Float', 'Short_Integer', 'Short_Short_Float', - 'Short_Short_Integer', 'String', 'Wide_Character', 'Wide_String'), - suffix=r'\b'), - Keyword.Type), - (r'(and(\s+then)?|in|mod|not|or(\s+else)|rem)\b', Operator.Word), - (r'generic|private', Keyword.Declaration), - (r'package', Keyword.Declaration, 'package'), - (r'array\b', Keyword.Reserved, 'array_def'), - (r'(with|use)(\s+)', bygroups(Keyword.Namespace, Text), 'import'), - (r'(\w+)(\s*)(:)(\s*)(constant)', - bygroups(Name.Constant, Text, Punctuation, Text, - Keyword.Reserved)), - (r'<<\w+>>', Name.Label), - (r'(\w+)(\s*)(:)(\s*)(declare|begin|loop|for|while)', - bygroups(Name.Label, Text, Punctuation, Text, Keyword.Reserved)), - (words(( - 'abort', 'abs', 'abstract', 'accept', 'access', 'aliased', 'all', - 'array', 'at', 'begin', 'body', 'case', 'constant', 'declare', - 'delay', 'delta', 'digits', 'do', 'else', 'elsif', 'end', 'entry', - 'exception', 'exit', 'interface', 'for', 'goto', 'if', 'is', 'limited', - 'loop', 'new', 'null', 'of', 'or', 'others', 'out', 'overriding', - 'pragma', 'protected', 'raise', 'range', 'record', 'renames', 'requeue', - 'return', 'reverse', 'select', 'separate', 'some', 'subtype', - 'synchronized', 'task', 'tagged', 'terminate', 'then', 'type', 'until', - 'when', 'while', 'xor'), prefix=r'\b', suffix=r'\b'), - Keyword.Reserved), - (r'"[^"]*"', String), - include('attribute'), - include('numbers'), - (r"'[^']'", String.Character), - (r'(\w+)(\s*|[(,])', bygroups(Name, using(this))), - (r"(<>|=>|:=|[()|:;,.'])", Punctuation), - (r'[*<>+=/&-]', Operator), - (r'\n+', Text), - ], - 'numbers': [ - (r'[0-9_]+#[0-9a-f_\.]+#', Number.Hex), - (r'[0-9_]+\.[0-9_]*', Number.Float), - (r'[0-9_]+', Number.Integer), - ], - 'attribute': [ - (r"(')(\w+)", bygroups(Punctuation, Name.Attribute)), - ], - 'subprogram': [ - (r'\(', Punctuation, ('#pop', 'formal_part')), - (r';', Punctuation, '#pop'), - (r'is\b', Keyword.Reserved, '#pop'), - (r'"[^"]+"|\w+', Name.Function), - include('root'), - ], - 'end': [ - ('(if|case|record|loop|select)', Keyword.Reserved), - (r'"[^"]+"|[\w.]+', Name.Function), - (r'\s+', Text), - (';', Punctuation, '#pop'), - ], - 'type_def': [ - (r';', Punctuation, '#pop'), - (r'\(', Punctuation, 'formal_part'), - (r'with|and|use', Keyword.Reserved), - (r'array\b', Keyword.Reserved, ('#pop', 'array_def')), - (r'record\b', Keyword.Reserved, ('record_def')), - (r'(null record)(;)', bygroups(Keyword.Reserved, Punctuation), '#pop'), - include('root'), - ], - 'array_def': [ - (r';', Punctuation, '#pop'), - (r'(\w+)(\s+)(range)', bygroups(Keyword.Type, Text, Keyword.Reserved)), - include('root'), - ], - 'record_def': [ - (r'end record', Keyword.Reserved, '#pop'), - include('root'), - ], - 'import': [ - (r'[\w.]+', Name.Namespace, '#pop'), - default('#pop'), - ], - 'formal_part': [ - (r'\)', Punctuation, '#pop'), - (r'\w+', Name.Variable), - (r',|:[^=]', Punctuation), - (r'(in|not|null|out|access)\b', Keyword.Reserved), - include('root'), - ], - 'package': [ - ('body', Keyword.Declaration), - (r'is\s+new|renames', Keyword.Reserved), - ('is', Keyword.Reserved, '#pop'), - (';', Punctuation, '#pop'), - (r'\(', Punctuation, 'package_instantiation'), - (r'([\w.]+)', Name.Class), - include('root'), - ], - 'package_instantiation': [ - (r'("[^"]+"|\w+)(\s+)(=>)', bygroups(Name.Variable, Text, Punctuation)), - (r'[\w.\'"]', Text), - (r'\)', Punctuation, '#pop'), - include('root'), - ], - } diff --git a/contrib/python/Pygments/py3/pygments/lexers/pawn.py b/contrib/python/Pygments/py3/pygments/lexers/pawn.py index 5a303e4949..41b19dae79 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/pawn.py +++ b/contrib/python/Pygments/py3/pygments/lexers/pawn.py @@ -4,7 +4,7 @@ Lexers for the Pawn languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/perl.py b/contrib/python/Pygments/py3/pygments/lexers/perl.py index bac325bb45..3689fc7aad 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/perl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/perl.py @@ -4,7 +4,7 @@ Lexers for Perl, Raku and related languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -21,10 +21,11 @@ __all__ = ['PerlLexer', 'Perl6Lexer'] class PerlLexer(RegexLexer): """ - For `Perl <https://www.perl.org>`_ source code. + For Perl source code. """ name = 'Perl' + url = 'https://www.perl.org' aliases = ['perl', 'pl'] filenames = ['*.pl', '*.pm', '*.t', '*.perl'] mimetypes = ['text/x-perl', 'application/x-perl'] @@ -223,18 +224,19 @@ class PerlLexer(RegexLexer): class Perl6Lexer(ExtendedRegexLexer): """ - For `Raku <https://www.raku.org>`_ (a.k.a. Perl 6) source code. + For Raku (a.k.a. Perl 6) source code. .. versionadded:: 2.0 """ name = 'Perl6' + url = 'https://www.raku.org' aliases = ['perl6', 'pl6', 'raku'] filenames = ['*.pl', '*.pm', '*.nqp', '*.p6', '*.6pl', '*.p6l', '*.pl6', '*.6pm', '*.p6m', '*.pm6', '*.t', '*.raku', '*.rakumod', '*.rakutest', '*.rakudoc'] mimetypes = ['text/x-perl6', 'application/x-perl6'] - flags = re.MULTILINE | re.DOTALL | re.UNICODE + flags = re.MULTILINE | re.DOTALL PERL6_IDENTIFIER_RANGE = r"['\w:-]" diff --git a/contrib/python/Pygments/py3/pygments/lexers/php.py b/contrib/python/Pygments/py3/pygments/lexers/php.py index 3ba299ac0a..5f2ac12a05 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/php.py +++ b/contrib/python/Pygments/py3/pygments/lexers/php.py @@ -4,7 +4,7 @@ Lexers for PHP and related languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -23,7 +23,7 @@ line_re = re.compile('.*?\n') class ZephirLexer(RegexLexer): """ - For `Zephir language <http://zephir-lang.com/>`_ source code. + For Zephir language source code. Zephir is a compiled high level language aimed to the creation of C-extensions for PHP. @@ -32,6 +32,7 @@ class ZephirLexer(RegexLexer): """ name = 'Zephir' + url = 'http://zephir-lang.com/' aliases = ['zephir'] filenames = ['*.zep'] @@ -71,7 +72,7 @@ class ZephirLexer(RegexLexer): (r'(abstract|boolean|bool|char|class|const|double|enum|export|extends|final|' r'native|goto|implements|import|int|string|interface|long|ulong|char|uchar|' r'float|unsigned|private|protected|public|short|static|self|throws|reverse|' - r'transient|volatile)\b', Keyword.Reserved), + r'transient|volatile|readonly)\b', Keyword.Reserved), (r'(true|false|null|undefined)\b', Keyword.Constant), (r'(Array|Boolean|Date|_REQUEST|_COOKIE|_SESSION|' r'_GET|_POST|_SERVER|this|stdClass|range|count|iterator|' @@ -88,7 +89,7 @@ class ZephirLexer(RegexLexer): class PsyshConsoleLexer(Lexer): """ - For `PsySH`_ console output, such as: + For PsySH console output, such as: .. sourcecode:: psysh @@ -99,10 +100,10 @@ class PsyshConsoleLexer(Lexer): >>> $greeting('World') => "Hello, World" - .. _PsySH: https://psysh.org/ .. versionadded:: 2.7 """ name = 'PsySH console session for PHP' + url = 'https://psysh.org/' aliases = ['psysh'] def __init__(self, **options): @@ -137,7 +138,7 @@ class PsyshConsoleLexer(Lexer): class PhpLexer(RegexLexer): """ - For `PHP <http://www.php.net/>`_ source code. + For PHP source code. For PHP embedded in HTML, use the `HtmlPhpLexer`. Additional options accepted: @@ -169,6 +170,7 @@ class PhpLexer(RegexLexer): """ name = 'PHP' + url = 'https://www.php.net/' aliases = ['php', 'php3', 'php4', 'php5'] filenames = ['*.php', '*.php[345]', '*.inc'] mimetypes = ['text/x-php'] @@ -221,7 +223,7 @@ class PhpLexer(RegexLexer): r'array|E_ALL|NULL|final|php_user_filter|interface|' r'implements|public|private|protected|abstract|clone|try|' r'catch|throw|this|use|namespace|trait|yield|' - r'finally)\b', Keyword), + r'finally|match)\b', Keyword), (r'(true|false|null)\b', Keyword.Constant), include('magicconstants'), (r'\$\{\$+' + _ident_inner + r'\}', Name.Variable), diff --git a/contrib/python/Pygments/py3/pygments/lexers/pointless.py b/contrib/python/Pygments/py3/pygments/lexers/pointless.py index c340107374..9fea7ea3e3 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/pointless.py +++ b/contrib/python/Pygments/py3/pygments/lexers/pointless.py @@ -4,7 +4,7 @@ Lexers for Pointless. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -17,12 +17,13 @@ __all__ = ['PointlessLexer'] class PointlessLexer(RegexLexer): """ - For `Pointless <https://ptls.dev>`_ source code. + For Pointless source code. .. versionadded:: 2.7 """ name = 'Pointless' + url = 'https://ptls.dev' aliases = ['pointless'] filenames = ['*.ptls'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/pony.py b/contrib/python/Pygments/py3/pygments/lexers/pony.py index 0cd5dbd3df..014f8f8735 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/pony.py +++ b/contrib/python/Pygments/py3/pygments/lexers/pony.py @@ -4,7 +4,7 @@ Lexers for Pony and related languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/praat.py b/contrib/python/Pygments/py3/pygments/lexers/praat.py index 8fbae8c520..834f15b7b2 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/praat.py +++ b/contrib/python/Pygments/py3/pygments/lexers/praat.py @@ -4,7 +4,7 @@ Lexer for Praat - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -17,12 +17,13 @@ __all__ = ['PraatLexer'] class PraatLexer(RegexLexer): """ - For `Praat <http://www.praat.org>`_ scripts. + For Praat scripts. .. versionadded:: 2.1 """ name = 'Praat' + url = 'http://www.praat.org' aliases = ['praat'] filenames = ['*.praat', '*.proc', '*.psc'] @@ -287,7 +288,7 @@ class PraatLexer(RegexLexer): (r'(boolean)(\s+\S+\s*)(0|1|"?(?:yes|no)"?)', bygroups(Keyword, Text, Name.Variable)), - # Ideally processing of the number would happend in the 'number' + # Ideally processing of the number would happen in the 'number' # but that doesn't seem to work (r'(real|natural|positive|integer)([ \t]+\S+[ \t]*)([+-]?)(\d+(?:\.\d*)?' r'(?:[eE][-+]?\d+)?%?)', diff --git a/contrib/python/Pygments/py3/pygments/lexers/procfile.py b/contrib/python/Pygments/py3/pygments/lexers/procfile.py index cac0a25440..72395ceecd 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/procfile.py +++ b/contrib/python/Pygments/py3/pygments/lexers/procfile.py @@ -4,7 +4,7 @@ Lexer for Procfile file format. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -20,12 +20,11 @@ class ProcfileLexer(RegexLexer): The format is used to run processes on Heroku or is used by Foreman or Honcho tools. - For more information about the definition of the format, see: - https://devcenter.heroku.com/articles/procfile#procfile-format .. versionadded:: 2.10 """ name = 'Procfile' + url = 'https://devcenter.heroku.com/articles/procfile#procfile-format' aliases = ['procfile'] filenames = ['Procfile'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/prolog.py b/contrib/python/Pygments/py3/pygments/lexers/prolog.py index 21c813625d..2cdceeddd7 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/prolog.py +++ b/contrib/python/Pygments/py3/pygments/lexers/prolog.py @@ -4,7 +4,7 @@ Lexers for Prolog and Prolog-like languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -26,8 +26,6 @@ class PrologLexer(RegexLexer): filenames = ['*.ecl', '*.prolog', '*.pro', '*.pl'] mimetypes = ['text/x-prolog'] - flags = re.UNICODE | re.MULTILINE - tokens = { 'root': [ (r'/\*', Comment.Multiline, 'nested-comment'), @@ -85,12 +83,13 @@ class PrologLexer(RegexLexer): class LogtalkLexer(RegexLexer): """ - For `Logtalk <http://logtalk.org/>`_ source code. + For Logtalk source code. .. versionadded:: 0.10 """ name = 'Logtalk' + url = 'http://logtalk.org/' aliases = ['logtalk'] filenames = ['*.lgt', '*.logtalk'] mimetypes = ['text/x-logtalk'] @@ -200,9 +199,9 @@ class LogtalkLexer(RegexLexer): (r'(>>|<<|/\\|\\\\|\\)', Operator), # Predicate aliases (r'\bas\b', Operator), - # Arithemtic evaluation + # Arithmetic evaluation (r'\bis\b', Keyword), - # Arithemtic comparison + # Arithmetic comparison (r'(=:=|=\\=|<|=<|>=|>)', Operator), # Term creation and decomposition (r'=\.\.', Operator), @@ -213,7 +212,7 @@ class LogtalkLexer(RegexLexer): # Evaluable functors (r'(//|[-+*/])', Operator), (r'\b(e|pi|div|mod|rem)\b', Operator), - # Other arithemtic functors + # Other arithmetic functors (r'\b\*\*\b', Operator), # DCG rules (r'-->', Operator), diff --git a/contrib/python/Pygments/py3/pygments/lexers/promql.py b/contrib/python/Pygments/py3/pygments/lexers/promql.py index b9646d4640..1c239a26a7 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/promql.py +++ b/contrib/python/Pygments/py3/pygments/lexers/promql.py @@ -4,7 +4,7 @@ Lexer for Prometheus Query Language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -25,7 +25,7 @@ __all__ = ["PromQLLexer"] class PromQLLexer(RegexLexer): """ - For `PromQL <https://prometheus.io/docs/prometheus/latest/querying/basics/>`_ queries. + For PromQL queries. For details about the grammar see: https://github.com/prometheus/prometheus/tree/master/promql/parser @@ -34,6 +34,7 @@ class PromQLLexer(RegexLexer): """ name = "PromQL" + url = 'https://prometheus.io/docs/prometheus/latest/querying/basics/' aliases = ["promql"] filenames = ["*.promql"] diff --git a/contrib/python/Pygments/py3/pygments/lexers/python.py b/contrib/python/Pygments/py3/pygments/lexers/python.py index 2901d7b982..83c5ef4e91 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/python.py +++ b/contrib/python/Pygments/py3/pygments/lexers/python.py @@ -4,7 +4,7 @@ Lexers for Python and related languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -27,7 +27,7 @@ line_re = re.compile('.*?\n') class PythonLexer(RegexLexer): """ - For `Python <http://www.python.org>`_ source code (version 3.x). + For Python source code (version 3.x). .. versionadded:: 0.10 @@ -37,6 +37,7 @@ class PythonLexer(RegexLexer): """ name = 'Python' + url = 'http://www.python.org' aliases = ['python', 'py', 'sage', 'python3', 'py3'] filenames = [ '*.py', @@ -61,8 +62,6 @@ class PythonLexer(RegexLexer): mimetypes = ['text/x-python', 'application/x-python', 'text/x-python3', 'application/x-python3'] - flags = re.MULTILINE | re.UNICODE - uni_name = "[%s][%s]*" % (uni.xid_start, uni.xid_continue) def innerstring_rules(ttype): @@ -214,7 +213,7 @@ class PythonLexer(RegexLexer): (r'(^[ \t]*)' # at beginning of line + possible indentation r'(match|case)\b' # a possible keyword r'(?![ \t]*(?:' # not followed by... - r'[:,;=^&|@~)\]}]|(?:' + # characters and keywords that mean this isn't + r'[:,;=^&|@~)\]}]|(?:' + # characters and keywords that mean this isn't r'|'.join(keyword.kwlist) + r')\b))', # pattern matching bygroups(Text, Keyword), 'soft-keywords-inner'), ], @@ -259,7 +258,8 @@ class PythonLexer(RegexLexer): 'InterruptedError', 'IsADirectoryError', 'NotADirectoryError', 'PermissionError', 'ProcessLookupError', 'TimeoutError', # others new in Python 3 - 'StopAsyncIteration', 'ModuleNotFoundError', 'RecursionError'), + 'StopAsyncIteration', 'ModuleNotFoundError', 'RecursionError', + 'EncodingWarning'), prefix=r'(?<!\.)', suffix=r'\b'), Name.Exception), ], @@ -403,7 +403,7 @@ Python3Lexer = PythonLexer class Python2Lexer(RegexLexer): """ - For `Python 2.x <http://www.python.org>`_ source code. + For Python 2.x source code. .. versionchanged:: 2.5 This class has been renamed from ``PythonLexer``. ``PythonLexer`` now @@ -412,6 +412,7 @@ class Python2Lexer(RegexLexer): """ name = 'Python 2.x' + url = 'http://www.python.org' aliases = ['python2', 'py2'] filenames = [] # now taken over by PythonLexer (3.x) mimetypes = ['text/x-python2', 'application/x-python2'] @@ -816,12 +817,13 @@ class Python2TracebackLexer(RegexLexer): class CythonLexer(RegexLexer): """ - For Pyrex and `Cython <http://cython.org>`_ source code. + For Pyrex and Cython source code. .. versionadded:: 1.1 """ name = 'Cython' + url = 'http://cython.org' aliases = ['cython', 'pyx', 'pyrex'] filenames = ['*.pyx', '*.pxd', '*.pxi'] mimetypes = ['text/x-cython', 'application/x-cython'] @@ -995,7 +997,7 @@ class CythonLexer(RegexLexer): class DgLexer(RegexLexer): """ - Lexer for `dg <http://pyos.github.com/dg>`_, + Lexer for dg, a functional and object-oriented programming language running on the CPython 3 VM. @@ -1100,6 +1102,7 @@ class NumPyLexer(PythonLexer): """ name = 'NumPy' + url = 'https://numpy.org/' aliases = ['numpy'] # override the mimetypes to not inherit them from python diff --git a/contrib/python/Pygments/py3/pygments/lexers/q.py b/contrib/python/Pygments/py3/pygments/lexers/q.py new file mode 100644 index 0000000000..21a049fab4 --- /dev/null +++ b/contrib/python/Pygments/py3/pygments/lexers/q.py @@ -0,0 +1,235 @@ +""" + pygments.lexers.q + ~~~~~~~~~~~~~~~~~ + + Lexer for the Q programming language. + + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, words, include, bygroups, inherit +from pygments.token import ( + Comment, + Keyword, + Name, + Number, + Operator, + Punctuation, + String, + Text, + Whitespace, + Literal, + Generic, +) + +__all__ = ["KLexer", "QLexer"] + + +class KLexer(RegexLexer): + """ + For `K <https://code.kx.com/>`_ source code. + + .. versionadded:: 2.12 + """ + + name = "K" + aliases = ["k"] + filenames = ["*.k"] + + tokens = { + "whitespace": [ + # hashbang script + (r"^#!.*", Comment.Hashbang), + # Comments + (r"^/\s*\n", Comment.Multiline, "comments"), + (r"(?<!\S)/.*", Comment.Single), + # Whitespace + (r"\s+", Whitespace), + # Strings + (r"\"", String.Double, "strings"), + ], + "root": [ + include("whitespace"), + include("keywords"), + include("declarations"), + ], + "keywords": [ + ( + words( + ("abs", "acos", "asin", "atan", "avg", "bin", + "binr", "by", "cor", "cos", "cov", "dev", + "delete", "div", "do", "enlist", "exec", "exit", + "exp", "from", "getenv", "hopen", "if", "in", + "insert", "last", "like", "log", "max", "min", + "prd", "select", "setenv", "sin", "sqrt", "ss", + "sum", "tan", "update", "var", "wavg", "while", + "within", "wsum", "xexp"), + suffix=r"\b", + ), + Operator.Word, + ), + ], + "declarations": [ + # Timing + (r"^\\ts?", Comment.Preproc), + ( + r"^(\\\w\s+[^/\n]*?)(/.*)", + bygroups(Comment.Preproc, Comment.Single), + ), + # Generic System Commands + (r"^\\\w.*", Comment.Preproc), + # Prompt + (r"^[a-zA-Z]\)", Generic.Prompt), + # Function Names + ( + r"([.]?[a-zA-Z][\w.]*)(\s*)([-.~=!@#$%^&*_+|,<>?/\\:']?:)(\s*)(\{)", + bygroups(Name.Function, Whitespace, Operator, Whitespace, Punctuation), + "functions", + ), + # Variable Names + ( + r"([.]?[a-zA-Z][\w.]*)(\s*)([-.~=!@#$%^&*_+|,<>?/\\:']?:)", + bygroups(Name.Variable, Whitespace, Operator), + ), + # Functions + (r"\{", Punctuation, "functions"), + # Parentheses + (r"\(", Punctuation, "parentheses"), + # Brackets + (r"\[", Punctuation, "brackets"), + # Errors + (r"'`([a-zA-Z][\w.]*)?", Name.Exception), + # File Symbols + (r"`:([a-zA-Z/][\w./]*)?", String.Symbol), + # Symbols + (r"`([a-zA-Z][\w.]*)?", String.Symbol), + # Numbers + include("numbers"), + # Variable Names + (r"[a-zA-Z][\w.]*", Name), + # Operators + (r"[-=+*#$%@!~^&:.,<>'\\|/?_]", Operator), + # Punctuation + (r";", Punctuation), + ], + "functions": [ + include("root"), + (r"\}", Punctuation, "#pop"), + ], + "parentheses": [ + include("root"), + (r"\)", Punctuation, "#pop"), + ], + "brackets": [ + include("root"), + (r"\]", Punctuation, "#pop"), + ], + "numbers": [ + # Binary Values + (r"[01]+b", Number.Bin), + # Nulls/Infinities + (r"0[nNwW][cefghijmndzuvtp]?", Number), + # Timestamps + ( + ( + r"(?:[0-9]{4}[.][0-9]{2}[.][0-9]{2}|[0-9]+)" + "D(?:[0-9](?:[0-9](?::[0-9]{2}" + "(?::[0-9]{2}(?:[.][0-9]*)?)?)?)?)?" + ), + Literal.Date, + ), + # Datetimes + ( + ( + r"[0-9]{4}[.][0-9]{2}" + "(?:m|[.][0-9]{2}(?:T(?:[0-9]{2}:[0-9]{2}" + "(?::[0-9]{2}(?:[.][0-9]*)?)?)?)?)" + ), + Literal.Date, + ), + # Times + ( + (r"[0-9]{2}:[0-9]{2}(?::[0-9]{2}(?:[.][0-9]{1,3})?)?"), + Literal.Date, + ), + # GUIDs + ( + r"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", + Number.Hex, + ), + # Byte Vectors + (r"0x[0-9a-fA-F]+", Number.Hex), + # Floats + ( + r"([0-9]*[.]?[0-9]+|[0-9]+[.]?[0-9]*)[eE][+-]?[0-9]+[ef]?", + Number.Float, + ), + (r"([0-9]*[.][0-9]+|[0-9]+[.][0-9]*)[ef]?", Number.Float), + (r"[0-9]+[ef]", Number.Float), + # Characters + (r"[0-9]+c", Number), + # Integers + (r"[0-9]+[ihtuv]", Number.Integer), + # Long Integers + (r"[0-9]+[jnp]?", Number.Integer.Long), + ], + "comments": [ + (r"[^\\]+", Comment.Multiline), + (r"^\\", Comment.Multiline, "#pop"), + (r"\\", Comment.Multiline), + ], + "strings": [ + (r'[^"\\]+', String.Double), + (r"\\.", String.Escape), + (r'"', String.Double, "#pop"), + ], + } + + +class QLexer(KLexer): + """ + For `Q <https://code.kx.com/>`_ source code. + + .. versionadded:: 2.12 + """ + + name = "Q" + aliases = ["q"] + filenames = ["*.q"] + + tokens = { + "root": [ + ( + words( + ("aj", "aj0", "ajf", "ajf0", "all", "and", "any", + "asc", "asof", "attr", "avgs", "ceiling", "cols", + "count", "cross", "csv", "cut", "deltas", "desc", + "differ", "distinct", "dsave", "each", "ej", + "ema", "eval", "except", "fby", "fills", "first", + "fkeys", "flip", "floor", "get", "group", "gtime", + "hclose", "hcount", "hdel", "hsym", "iasc", + "idesc", "ij", "ijf", "inter", "inv", "key", + "keys", "lj", "ljf", "load", "lower", "lsq", + "ltime", "ltrim", "mavg", "maxs", "mcount", "md5", + "mdev", "med", "meta", "mins", "mmax", "mmin", + "mmu", "mod", "msum", "neg", "next", "not", + "null", "or", "over", "parse", "peach", "pj", + "prds", "prior", "prev", "rand", "rank", "ratios", + "raze", "read0", "read1", "reciprocal", "reval", + "reverse", "rload", "rotate", "rsave", "rtrim", + "save", "scan", "scov", "sdev", "set", "show", + "signum", "ssr", "string", "sublist", "sums", + "sv", "svar", "system", "tables", "til", "trim", + "txf", "type", "uj", "ujf", "ungroup", "union", + "upper", "upsert", "value", "view", "views", "vs", + "where", "wj", "wj1", "ww", "xasc", "xbar", + "xcol", "xcols", "xdesc", "xgroup", "xkey", + "xlog", "xprev", "xrank"), + suffix=r"\b", + ), + Name.Builtin, + ), + inherit, + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/qlik.py b/contrib/python/Pygments/py3/pygments/lexers/qlik.py new file mode 100644 index 0000000000..96ca53c0dd --- /dev/null +++ b/contrib/python/Pygments/py3/pygments/lexers/qlik.py @@ -0,0 +1,142 @@ +""" + pygments.lexers.qlik + ~~~~~~~~~~~~~~~~~~~~ + + Lexer for the qlik scripting language + + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, include, bygroups, words +from pygments.token import ( + Comment, + Keyword, + Name, + Number, + Operator, + Punctuation, + String, + Text, +) +from pygments.lexers._qlik_builtins import ( + OPERATORS_LIST, + STATEMENT_LIST, + SCRIPT_FUNCTIONS, + CONSTANT_LIST, +) + +__all__ = ["QlikLexer"] + + +class QlikLexer(RegexLexer): + """ + Lexer for qlik code, including .qvs files + + .. versionadded:: 2.12 + """ + + name = "Qlik" + aliases = ["qlik", "qlikview", "qliksense", "qlikscript"] + filenames = ["*.qvs", "*.qvw"] + + flags = re.IGNORECASE + + tokens = { + # Handle multi-line comments + "comment": [ + (r"\*/", Comment.Multiline, "#pop"), + (r"[^*]+", Comment.Multiline), + ], + # Handle numbers + "numerics": [ + (r"\b\d+\.\d+(e\d+)?[fd]?\b", Number.Float), + (r"\b\d+\b", Number.Integer), + ], + # Handle variable names in things + "interp": [ + ( + r"(\$\()(\w+)(\))", + bygroups(String.Interpol, Name.Variable, String.Interpol), + ), + ], + # Handle strings + "string": [ + (r"'", String, "#pop"), + include("interp"), + (r"[^'$]+", String), + (r"\$", String), + ], + # + "assignment": [ + (r";", Punctuation, "#pop"), + include("root"), + ], + "field_name_quote": [ + (r'"', String.Symbol, "#pop"), + include("interp"), + (r"[^\"$]+", String.Symbol), + (r"\$", String.Symbol), + ], + "field_name_bracket": [ + (r"\]", String.Symbol, "#pop"), + include("interp"), + (r"[^\]$]+", String.Symbol), + (r"\$", String.Symbol), + ], + "function": [(r"\)", Punctuation, "#pop"), include("root")], + "root": [ + # Whitespace and comments + (r"\s+", Text.Whitespace), + (r"/\*", Comment.Multiline, "comment"), + (r"//.*\n", Comment.Single), + # variable assignment + ( + r"(let|set)(\s+)", + bygroups( + Keyword.Declaration, + Text.Whitespace, + ), + "assignment", + ), + # Word operators + ( + words(OPERATORS_LIST["words"], prefix=r"\b", suffix=r"\b"), + Operator.Word, + ), + # Statements + ( + words( + STATEMENT_LIST, + suffix=r"\b", + ), + Keyword, + ), + # Table names + (r"[a-z]\w*:", Keyword.Declaration), + # Constants + (words(CONSTANT_LIST, suffix=r"\b"), Keyword.Constant), + # Functions + (words(SCRIPT_FUNCTIONS, suffix=r"(?=\s*\()"), Name.Builtin, "function"), + # interpolation - e.g. $(variableName) + include("interp"), + # Quotes denote a field/file name + (r'"', String.Symbol, "field_name_quote"), + # Square brackets denote a field/file name + (r"\[", String.Symbol, "field_name_bracket"), + # Strings + (r"'", String, "string"), + # Numbers + include("numerics"), + # Operator symbols + (words(OPERATORS_LIST["symbols"]), Operator), + # Strings denoted by single quotes + (r"'.+?'", String), + # Words as text + (r"\b\w+\b", Text), + # Basic punctuation + (r"[,;.()\\/]", Punctuation), + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/qvt.py b/contrib/python/Pygments/py3/pygments/lexers/qvt.py index 72817f09c1..07d1818034 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/qvt.py +++ b/contrib/python/Pygments/py3/pygments/lexers/qvt.py @@ -4,7 +4,7 @@ Lexer for QVT Operational language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/r.py b/contrib/python/Pygments/py3/pygments/lexers/r.py index 44168a7ad5..539e3802da 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/r.py +++ b/contrib/python/Pygments/py3/pygments/lexers/r.py @@ -4,7 +4,7 @@ Lexers for the R/S languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/rdf.py b/contrib/python/Pygments/py3/pygments/lexers/rdf.py index bd7a4f690c..ed5420776c 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/rdf.py +++ b/contrib/python/Pygments/py3/pygments/lexers/rdf.py @@ -4,7 +4,7 @@ Lexers for semantic web and RDF query languages and markup. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/rebol.py b/contrib/python/Pygments/py3/pygments/lexers/rebol.py index 57480a1cb9..7d363dd506 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/rebol.py +++ b/contrib/python/Pygments/py3/pygments/lexers/rebol.py @@ -4,7 +4,7 @@ Lexers for the REBOL and related languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/resource.py b/contrib/python/Pygments/py3/pygments/lexers/resource.py index 3ed176a181..2e6b2ddc33 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/resource.py +++ b/contrib/python/Pygments/py3/pygments/lexers/resource.py @@ -4,7 +4,7 @@ Lexer for resource definition files. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/ride.py b/contrib/python/Pygments/py3/pygments/lexers/ride.py index 07cc1ef6b7..9d535d80cd 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ride.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ride.py @@ -4,7 +4,7 @@ Lexer for the Ride programming language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/rita.py b/contrib/python/Pygments/py3/pygments/lexers/rita.py index f8f517b9ed..a8e4eca995 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/rita.py +++ b/contrib/python/Pygments/py3/pygments/lexers/rita.py @@ -4,7 +4,7 @@ Lexers for RITA language - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -19,11 +19,12 @@ __all__ = ['RitaLexer'] class RitaLexer(RegexLexer): """ - Lexer for `RITA <https://github.com/zaibacu/rita-dsl>`_ + Lexer for RITA. .. versionadded:: 2.11 """ name = 'Rita' + url = 'https://github.com/zaibacu/rita-dsl' filenames = ['*.rita'] aliases = ['rita'] mimetypes = ['text/rita'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/rnc.py b/contrib/python/Pygments/py3/pygments/lexers/rnc.py index cc8950a0b7..fc1c9a89d6 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/rnc.py +++ b/contrib/python/Pygments/py3/pygments/lexers/rnc.py @@ -4,7 +4,7 @@ Lexer for Relax-NG Compact syntax - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -17,12 +17,13 @@ __all__ = ['RNCCompactLexer'] class RNCCompactLexer(RegexLexer): """ - For `RelaxNG-compact <http://relaxng.org>`_ syntax. + For RelaxNG-compact syntax. .. versionadded:: 2.2 """ name = 'Relax-NG Compact' + url = 'http://relaxng.org' aliases = ['rng-compact', 'rnc'] filenames = ['*.rnc'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/roboconf.py b/contrib/python/Pygments/py3/pygments/lexers/roboconf.py index 4380113831..2d8e5ff4db 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/roboconf.py +++ b/contrib/python/Pygments/py3/pygments/lexers/roboconf.py @@ -4,7 +4,7 @@ Lexers for Roboconf DSL. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -16,7 +16,7 @@ __all__ = ['RoboconfGraphLexer', 'RoboconfInstancesLexer'] class RoboconfGraphLexer(RegexLexer): """ - Lexer for `Roboconf <http://roboconf.net/en/roboconf.html>`_ graph files. + Lexer for Roboconf graph files. .. versionadded:: 2.1 """ @@ -51,7 +51,7 @@ class RoboconfGraphLexer(RegexLexer): class RoboconfInstancesLexer(RegexLexer): """ - Lexer for `Roboconf <http://roboconf.net/en/roboconf.html>`_ instances files. + Lexer for Roboconf instances files. .. versionadded:: 2.1 """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/robotframework.py b/contrib/python/Pygments/py3/pygments/lexers/robotframework.py index 3c212f5e20..91794d0f2b 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/robotframework.py +++ b/contrib/python/Pygments/py3/pygments/lexers/robotframework.py @@ -4,7 +4,7 @@ Lexer for Robot Framework. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -54,15 +54,16 @@ def normalize(string, remove=''): class RobotFrameworkLexer(Lexer): """ - For `Robot Framework <http://robotframework.org>`_ test data. + For Robot Framework test data. Supports both space and pipe separated plain text formats. .. versionadded:: 1.6 """ name = 'RobotFramework' + url = 'http://robotframework.org' aliases = ['robotframework'] - filenames = ['*.robot'] + filenames = ['*.robot', '*.resource'] mimetypes = ['text/x-robotframework'] def __init__(self, **options): @@ -285,7 +286,7 @@ class KeywordCall(Tokenizer): class GherkinTokenizer: - _gherkin_prefix = re.compile('^(Given|When|Then|And) ', re.IGNORECASE) + _gherkin_prefix = re.compile('^(Given|When|Then|And|But) ', re.IGNORECASE) def tokenize(self, value, token): match = self._gherkin_prefix.match(value) diff --git a/contrib/python/Pygments/py3/pygments/lexers/ruby.py b/contrib/python/Pygments/py3/pygments/lexers/ruby.py index 2b2f923eb9..82aac3603e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ruby.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ruby.py @@ -4,7 +4,7 @@ Lexers for Ruby and related languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -29,10 +29,11 @@ RUBY_OPERATORS = ( class RubyLexer(ExtendedRegexLexer): """ - For `Ruby <http://www.ruby-lang.org>`_ source code. + For Ruby source code. """ name = 'Ruby' + url = 'http://www.ruby-lang.org' aliases = ['ruby', 'rb', 'duby'] filenames = ['*.rb', '*.rbw', 'Rakefile', '*.rake', '*.gemspec', '*.rbx', '*.duby', 'Gemfile', 'Vagrantfile'] @@ -439,7 +440,7 @@ class RubyConsoleLexer(Lexer): class FancyLexer(RegexLexer): """ - Pygments Lexer For `Fancy <http://www.fancy-lang.org/>`_. + Pygments Lexer For Fancy. Fancy is a self-hosted, pure object-oriented, dynamic, class-based, concurrent general-purpose programming language @@ -448,6 +449,7 @@ class FancyLexer(RegexLexer): .. versionadded:: 1.5 """ name = 'Fancy' + url = 'https://github.com/bakkdoor/fancy' filenames = ['*.fy', '*.fancypack'] aliases = ['fancy', 'fy'] mimetypes = ['text/x-fancysrc'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/rust.py b/contrib/python/Pygments/py3/pygments/lexers/rust.py index d01f73e4a4..500c7a55e1 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/rust.py +++ b/contrib/python/Pygments/py3/pygments/lexers/rust.py @@ -4,7 +4,7 @@ Lexers for the Rust language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -22,6 +22,7 @@ class RustLexer(RegexLexer): .. versionadded:: 1.6 """ name = 'Rust' + url = 'https://www.rust-lang.org/' filenames = ['*.rs', '*.rs.in'] aliases = ['rust', 'rs'] mimetypes = ['text/rust', 'text/x-rust'] @@ -104,7 +105,7 @@ class RustLexer(RegexLexer): # Prelude (taken from Rust's src/libstd/prelude.rs) builtin_funcs_types, builtin_macros, - # Path seperators, so types don't catch them. + # Path separators, so types don't catch them. (r'::\b', Text), # Types in positions. (r'(?::|->)', Text, 'typename'), diff --git a/contrib/python/Pygments/py3/pygments/lexers/sas.py b/contrib/python/Pygments/py3/pygments/lexers/sas.py index 7d7f9d3689..f2f408c6d7 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/sas.py +++ b/contrib/python/Pygments/py3/pygments/lexers/sas.py @@ -4,7 +4,7 @@ Lexer for SAS. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -18,7 +18,7 @@ __all__ = ['SASLexer'] class SASLexer(RegexLexer): """ - For `SAS <http://www.sas.com/>`_ files. + For SAS files. .. versionadded:: 2.2 """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/savi.py b/contrib/python/Pygments/py3/pygments/lexers/savi.py index 88fddab014..280a3e4781 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/savi.py +++ b/contrib/python/Pygments/py3/pygments/lexers/savi.py @@ -4,7 +4,7 @@ Lexer for Savi. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -31,12 +31,13 @@ __all__ = ['SaviLexer'] class SaviLexer(RegexLexer): """ - For `Savi <https://github.com/savi-lang/savi>`_ source code. + For Savi source code. .. versionadded: 2.10 """ name = 'Savi' + url = 'https://github.com/savi-lang/savi' aliases = ['savi'] filenames = ['*.savi'] @@ -57,8 +58,11 @@ class SaviLexer(RegexLexer): # Single-Char String (r"'", String.Char, "string.char"), - # Class (or other type) - (r'([_A-Z]\w*)', Name.Class), + # Type Name + (r'(_?[A-Z]\w*)', Name.Class), + + # Nested Type Name + (r'(\.)(\s*)(_?[A-Z]\w*)', bygroups(Punctuation, Whitespace, Name.Class)), # Declare (r'^([ \t]*)(:\w+)', @@ -137,6 +141,7 @@ class SaviLexer(RegexLexer): # Double-Quote String (nested rules) "string.double": [ + (r'\\\(', String.Interpol, "string.interpolation"), (r'\\u[0-9a-fA-F]{4}', String.Escape), (r'\\x[0-9a-fA-F]{2}', String.Escape), (r'\\[bfnrt\\\']', String.Escape), @@ -156,4 +161,10 @@ class SaviLexer(RegexLexer): (r"[^\\']+", String.Char), (r'.', Error), ], + + # Interpolation inside String (nested rules) + "string.interpolation": [ + (r"\)", String.Interpol, "#pop"), + include("root"), + ] } diff --git a/contrib/python/Pygments/py3/pygments/lexers/scdoc.py b/contrib/python/Pygments/py3/pygments/lexers/scdoc.py index 48b0682ae3..cb602db97d 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/scdoc.py +++ b/contrib/python/Pygments/py3/pygments/lexers/scdoc.py @@ -4,7 +4,7 @@ Lexer for scdoc, a simple man page generator. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -22,11 +22,11 @@ __all__ = ['ScdocLexer'] class ScdocLexer(RegexLexer): """ `scdoc` is a simple man page generator for POSIX systems written in C99. - https://git.sr.ht/~sircmpwn/scdoc - + .. versionadded:: 2.5 """ name = 'scdoc' + url = 'https://git.sr.ht/~sircmpwn/scdoc' aliases = ['scdoc', 'scd'] filenames = ['*.scd', '*.scdoc'] flags = re.MULTILINE diff --git a/contrib/python/Pygments/py3/pygments/lexers/scripting.py b/contrib/python/Pygments/py3/pygments/lexers/scripting.py index 9a1e63d66a..25cc406c2e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/scripting.py +++ b/contrib/python/Pygments/py3/pygments/lexers/scripting.py @@ -4,7 +4,7 @@ Lexer for scripting and embedded languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -23,7 +23,7 @@ __all__ = ['LuaLexer', 'MoonScriptLexer', 'ChaiscriptLexer', 'LSLLexer', class LuaLexer(RegexLexer): """ - For `Lua <http://www.lua.org>`_ source code. + For Lua source code. Additional options accepted: @@ -45,6 +45,7 @@ class LuaLexer(RegexLexer): """ name = 'Lua' + url = 'https://www.lua.org/' aliases = ['lua'] filenames = ['*.lua', '*.wlua'] mimetypes = ['text/x-lua', 'application/x-lua'] @@ -163,12 +164,13 @@ class LuaLexer(RegexLexer): class MoonScriptLexer(LuaLexer): """ - For `MoonScript <http://moonscript.org>`_ source code. + For MoonScript source code. .. versionadded:: 1.5 """ name = 'MoonScript' + url = 'http://moonscript.org' aliases = ['moonscript', 'moon'] filenames = ['*.moon'] mimetypes = ['text/x-moonscript', 'application/x-moonscript'] @@ -231,12 +233,13 @@ class MoonScriptLexer(LuaLexer): class ChaiscriptLexer(RegexLexer): """ - For `ChaiScript <http://chaiscript.com/>`_ source code. + For ChaiScript source code. .. versionadded:: 2.0 """ name = 'ChaiScript' + url = 'http://chaiscript.com/' aliases = ['chaiscript', 'chai'] filenames = ['*.chai'] mimetypes = ['text/x-chaiscript', 'application/x-chaiscript'] @@ -381,9 +384,7 @@ class LSLLexer(RegexLexer): class AppleScriptLexer(RegexLexer): """ - For `AppleScript source code - <http://developer.apple.com/documentation/AppleScript/ - Conceptual/AppleScriptLangGuide>`_, + For AppleScript source code, including `AppleScript Studio <http://developer.apple.com/documentation/AppleScript/ Reference/StudioReference>`_. @@ -393,6 +394,7 @@ class AppleScriptLexer(RegexLexer): """ name = 'AppleScript' + url = 'https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html' aliases = ['applescript'] filenames = ['*.applescript'] @@ -704,7 +706,7 @@ class AppleScriptLexer(RegexLexer): class RexxLexer(RegexLexer): """ - `Rexx <http://www.rexxinfo.org/>`_ is a scripting language available for + Rexx is a scripting language available for a wide range of different platforms with its roots found on mainframe systems. It is popular for I/O- and data based tasks and can act as glue language to bind different applications together. @@ -712,6 +714,7 @@ class RexxLexer(RegexLexer): .. versionadded:: 2.0 """ name = 'Rexx' + url = 'http://www.rexxinfo.org/' aliases = ['rexx', 'arexx'] filenames = ['*.rexx', '*.rex', '*.rx', '*.arexx'] mimetypes = ['text/x-rexx'] @@ -798,7 +801,7 @@ class RexxLexer(RegexLexer): def analyse_text(text): """ - Check for inital comment and patterns that distinguish Rexx from other + Check for initial comment and patterns that distinguish Rexx from other C-like languages. """ if re.search(r'/\*\**\s*rexx', text, re.IGNORECASE): @@ -817,12 +820,12 @@ class RexxLexer(RegexLexer): class MOOCodeLexer(RegexLexer): """ - For `MOOCode <http://www.moo.mud.org/>`_ (the MOO scripting - language). + For MOOCode (the MOO scripting language). .. versionadded:: 0.9 """ name = 'MOOCode' + url = 'http://www.moo.mud.org/' filenames = ['*.moo'] aliases = ['moocode', 'moo'] mimetypes = ['text/x-moocode'] @@ -860,7 +863,7 @@ class MOOCodeLexer(RegexLexer): class HybrisLexer(RegexLexer): """ - For `Hybris <http://www.hybris-lang.org>`_ source code. + For Hybris source code. .. versionadded:: 1.4 """ @@ -975,7 +978,7 @@ class EasytrieveLexer(RegexLexer): # * apostrophe (') # * period (.) # * comma (,) - # * paranthesis ( and ) + # * parenthesis ( and ) # * colon (:) # # Additionally words end once a '*' appears, indicatins a comment. @@ -1147,8 +1150,7 @@ class EasytrieveLexer(RegexLexer): class JclLexer(RegexLexer): """ - `Job Control Language (JCL) - <http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B570/CCONTENTS>`_ + Job Control Language (JCL) is a scripting language used on mainframe platforms to instruct the system on how to run a batch job or start a subsystem. It is somewhat comparable to MS DOS batch and Unix shell scripts. @@ -1231,12 +1233,13 @@ class JclLexer(RegexLexer): class MiniScriptLexer(RegexLexer): """ - For `MiniScript <https://miniscript.org>`_ source code. + For MiniScript source code. .. versionadded:: 2.6 """ name = 'MiniScript' + url = 'https://miniscript.org' aliases = ['miniscript', 'ms'] filenames = ['*.ms'] mimetypes = ['text/x-minicript', 'application/x-miniscript'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/sgf.py b/contrib/python/Pygments/py3/pygments/lexers/sgf.py index 35c90ff54f..1b066b1c03 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/sgf.py +++ b/contrib/python/Pygments/py3/pygments/lexers/sgf.py @@ -4,7 +4,7 @@ Lexer for Smart Game Format (sgf) file format. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -20,12 +20,11 @@ class SmartGameFormatLexer(RegexLexer): The format is used to store game records of board games for two players (mainly Go game). - For more information about the definition of the format, see: - https://www.red-bean.com/sgf/ .. versionadded:: 2.4 """ name = 'SmartGameFormat' + url = 'https://www.red-bean.com/sgf/' aliases = ['sgf'] filenames = ['*.sgf'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/shell.py b/contrib/python/Pygments/py3/pygments/lexers/shell.py index fd26a4b3ea..474fbf66a8 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/shell.py +++ b/contrib/python/Pygments/py3/pygments/lexers/shell.py @@ -4,7 +4,7 @@ Lexers for various shells. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/sieve.py b/contrib/python/Pygments/py3/pygments/lexers/sieve.py index 6fa33d3181..7f59651d21 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/sieve.py +++ b/contrib/python/Pygments/py3/pygments/lexers/sieve.py @@ -13,7 +13,7 @@ https://tools.ietf.org/html/rfc5429 https://tools.ietf.org/html/rfc8580 - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/slash.py b/contrib/python/Pygments/py3/pygments/lexers/slash.py index df0e23de5f..e3434c5df8 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/slash.py +++ b/contrib/python/Pygments/py3/pygments/lexers/slash.py @@ -5,7 +5,7 @@ Lexer for the `Slash <https://github.com/arturadib/Slash-A>`_ programming language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/smalltalk.py b/contrib/python/Pygments/py3/pygments/lexers/smalltalk.py index ebb3311dd2..ca41c07b07 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/smalltalk.py +++ b/contrib/python/Pygments/py3/pygments/lexers/smalltalk.py @@ -4,7 +4,7 @@ Lexers for Smalltalk and related languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -17,13 +17,14 @@ __all__ = ['SmalltalkLexer', 'NewspeakLexer'] class SmalltalkLexer(RegexLexer): """ - For `Smalltalk <http://www.smalltalk.org/>`_ syntax. + For Smalltalk syntax. Contributed by Stefan Matthias Aust. Rewritten by Nils Winter. .. versionadded:: 0.10 """ name = 'Smalltalk' + url = 'http://www.smalltalk.org/' filenames = ['*.st'] aliases = ['smalltalk', 'squeak', 'st'] mimetypes = ['text/x-smalltalk'] @@ -138,11 +139,12 @@ class SmalltalkLexer(RegexLexer): class NewspeakLexer(RegexLexer): """ - For `Newspeak <http://newspeaklanguage.org/>`_ syntax. + For Newspeak syntax. .. versionadded:: 1.1 """ name = 'Newspeak' + url = 'http://newspeaklanguage.org/' filenames = ['*.ns2'] aliases = ['newspeak', ] mimetypes = ['text/x-newspeak'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/smithy.py b/contrib/python/Pygments/py3/pygments/lexers/smithy.py index 0f0a91204c..08301d5e1a 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/smithy.py +++ b/contrib/python/Pygments/py3/pygments/lexers/smithy.py @@ -4,7 +4,7 @@ Lexers for the Smithy IDL. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -24,10 +24,10 @@ class SmithyLexer(RegexLexer): .. versionadded:: 2.10 """ name = 'Smithy' + url = 'https://awslabs.github.io/smithy/' filenames = ['*.smithy'] aliases = ['smithy'] - flags = re.MULTILINE | re.UNICODE unquoted = r'[A-Za-z0-9_\.#$-]+' identifier = r"[A-Za-z0-9_\.#$-]+" diff --git a/contrib/python/Pygments/py3/pygments/lexers/smv.py b/contrib/python/Pygments/py3/pygments/lexers/smv.py index a4cbf9455e..b51e170e15 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/smv.py +++ b/contrib/python/Pygments/py3/pygments/lexers/smv.py @@ -4,7 +4,7 @@ Lexers for the SMV languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/snobol.py b/contrib/python/Pygments/py3/pygments/lexers/snobol.py index b5719c3a5a..c336d196fd 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/snobol.py +++ b/contrib/python/Pygments/py3/pygments/lexers/snobol.py @@ -4,7 +4,7 @@ Lexers for the SNOBOL language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/solidity.py b/contrib/python/Pygments/py3/pygments/lexers/solidity.py index 0c42586fae..2b406173b6 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/solidity.py +++ b/contrib/python/Pygments/py3/pygments/lexers/solidity.py @@ -4,7 +4,7 @@ Lexers for Solidity. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -29,8 +29,6 @@ class SolidityLexer(RegexLexer): filenames = ['*.sol'] mimetypes = [] - flags = re.MULTILINE | re.UNICODE - datatype = ( r'\b(address|bool|(?:(?:bytes|hash|int|string|uint)(?:8|16|24|32|40|48|56|64' r'|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208' diff --git a/contrib/python/Pygments/py3/pygments/lexers/sophia.py b/contrib/python/Pygments/py3/pygments/lexers/sophia.py index 5410369fad..fc9018149b 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/sophia.py +++ b/contrib/python/Pygments/py3/pygments/lexers/sophia.py @@ -6,7 +6,7 @@ Derived from pygments/lexers/reason.py. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -18,7 +18,7 @@ __all__ = ['SophiaLexer'] class SophiaLexer(RegexLexer): """ - A `Sophia <https://buildwithsophia.com/>`_ lexer. + A Sophia lexer. .. versionadded:: 2.11 """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/special.py b/contrib/python/Pygments/py3/pygments/lexers/special.py index bff6652c56..216dad4a14 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/special.py +++ b/contrib/python/Pygments/py3/pygments/lexers/special.py @@ -4,7 +4,7 @@ Special lexers. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/spice.py b/contrib/python/Pygments/py3/pygments/lexers/spice.py index 51552b59f3..59d59b44c9 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/spice.py +++ b/contrib/python/Pygments/py3/pygments/lexers/spice.py @@ -4,7 +4,7 @@ Lexers for the Spice programming language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -19,17 +19,16 @@ __all__ = ['SpiceLexer'] class SpiceLexer(RegexLexer): """ - For `Spice <http://spicelang.com>`_ source. + For Spice source. .. versionadded:: 2.11 """ name = 'Spice' + url = 'https://www.spicelang.com' filenames = ['*.spice'] aliases = ['spice', 'spicelang'] mimetypes = ['text/x-spice'] - flags = re.MULTILINE | re.UNICODE - tokens = { 'root': [ (r'\n', Whitespace), @@ -39,22 +38,27 @@ class SpiceLexer(RegexLexer): (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline), (r'(import|as)\b', Keyword.Namespace), (r'(f|p|type|struct|const)\b', Keyword.Declaration), - (words(('if', 'else', 'for', 'foreach', 'while', 'break', 'continue', 'return', 'new', 'ext'), suffix=r'\b'), Keyword), + (words(('if', 'else', 'for', 'foreach', 'while', 'break', 'continue', 'return', 'ext', 'inline', 'public'), suffix=r'\b'), Keyword), (r'(true|false)\b', Keyword.Constant), (words(('printf', 'sizeof'), suffix=r'\b(\()'), bygroups(Name.Builtin, Punctuation)), (words(('double', 'int', 'short', 'long', 'byte', 'char', 'string', 'bool', 'dyn'), suffix=r'\b'), Keyword.Type), # double_lit (r'\d+(\.\d+[eE][+\-]?\d+|\.\d*|[eE][+\-]?\d+)', Number.Double), (r'\.\d+([eE][+\-]?\d+)?', Number.Double), + # short_lit + (r'(0|[1-9][0-9]*s)', Number.Integer), + # long_lit + (r'(0|[1-9][0-9]*l)', Number.Integer.Long), # int_lit (r'(0|[1-9][0-9]*)', Number.Integer), - # StringLiteral - # -- interpreted_string_lit + # string_lit (r'"(\\\\|\\[^\\]|[^"\\])*"', String), - # Tokens + # char_lit + (r'\'(\\\\|\\[^\\]|[^\'\\])\'', String.Char), + # tokens (r'(<<=|>>=|<<|>>|<=|>=|\+=|-=|\*=|/=|&&|\|\||&|\||\+\+|--|\%|==|!=|[.]{3}|[+\-*/&])', Operator), (r'[|<>=!()\[\]{}.,;:\?]', Punctuation), - # identifier + # identifiers (r'[^\W\d]\w*', Name.Other), ] } diff --git a/contrib/python/Pygments/py3/pygments/lexers/sql.py b/contrib/python/Pygments/py3/pygments/lexers/sql.py index 752f135005..043a3d17cf 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/sql.py +++ b/contrib/python/Pygments/py3/pygments/lexers/sql.py @@ -33,7 +33,7 @@ The ``tests/examplefiles`` contains a few test files with data to be parsed by these lexers. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -513,8 +513,8 @@ class TransactSqlLexer(RegexLexer): filenames = ['*.sql'] mimetypes = ['text/x-tsql'] - # Use re.UNICODE to allow non ASCII letters in names. - flags = re.IGNORECASE | re.UNICODE + flags = re.IGNORECASE + tokens = { 'root': [ (r'\s+', Whitespace), @@ -812,11 +812,10 @@ class RqlLexer(RegexLexer): """ Lexer for Relation Query Language. - `RQL <http://www.logilab.org/project/rql>`_ - .. versionadded:: 2.0 """ name = 'RQL' + url = 'http://www.logilab.org/project/rql' aliases = ['rql'] filenames = ['*.rql'] mimetypes = ['text/x-rql'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/srcinfo.py b/contrib/python/Pygments/py3/pygments/lexers/srcinfo.py index 8bc0f88e56..644d9b882b 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/srcinfo.py +++ b/contrib/python/Pygments/py3/pygments/lexers/srcinfo.py @@ -6,7 +6,7 @@ The description of the format can be found in the wiki: https://wiki.archlinux.org/title/.SRCINFO - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/stata.py b/contrib/python/Pygments/py3/pygments/lexers/stata.py index 4ec6cf4f75..4fbe773663 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/stata.py +++ b/contrib/python/Pygments/py3/pygments/lexers/stata.py @@ -4,7 +4,7 @@ Lexer for Stata - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -20,7 +20,7 @@ __all__ = ['StataLexer'] class StataLexer(RegexLexer): """ - For `Stata <http://www.stata.com/>`_ do files. + For Stata do files. .. versionadded:: 2.2 """ @@ -29,7 +29,8 @@ class StataLexer(RegexLexer): # - https://github.com/isagalaev/highlight.js/blob/master/src/languages/stata.js # - https://github.com/jpitblado/vim-stata/blob/master/syntax/stata.vim - name = 'Stata' + name = 'Stata' + url = 'http://www.stata.com/' aliases = ['stata', 'do'] filenames = ['*.do', '*.ado'] mimetypes = ['text/x-stata', 'text/stata', 'application/x-stata'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/supercollider.py b/contrib/python/Pygments/py3/pygments/lexers/supercollider.py index 724674f5e6..efa44b7326 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/supercollider.py +++ b/contrib/python/Pygments/py3/pygments/lexers/supercollider.py @@ -4,7 +4,7 @@ Lexer for SuperCollider - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -19,12 +19,13 @@ __all__ = ['SuperColliderLexer'] class SuperColliderLexer(RegexLexer): """ - For `SuperCollider <http://supercollider.github.io/>`_ source code. + For SuperCollider source code. .. versionadded:: 2.1 """ name = 'SuperCollider' + url = 'http://supercollider.github.io/' aliases = ['supercollider', 'sc'] filenames = ['*.sc', '*.scd'] mimetypes = ['application/supercollider', 'text/supercollider', ] diff --git a/contrib/python/Pygments/py3/pygments/lexers/tal.py b/contrib/python/Pygments/py3/pygments/lexers/tal.py new file mode 100644 index 0000000000..7bc3fcb1f7 --- /dev/null +++ b/contrib/python/Pygments/py3/pygments/lexers/tal.py @@ -0,0 +1,73 @@ +""" + pygments.lexers.tal + ~~~~~~~~~~~~~~~~~~~ + + Lexer for Uxntal + + .. versionadded:: 2.12 + + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, words +from pygments.token import Comment, Keyword, Name, String, Number, Punctuation, Whitespace, Literal + +__all__ = ['TalLexer'] + +class TalLexer(RegexLexer): + """ + For `Uxntal <https://wiki.xxiivv.com/site/uxntal.html>`_ source code. + + .. versionadded:: 2.12 + """ + + name = 'Tal' + aliases = ['tal', 'uxntal'] + filenames = ['*.tal'] + mimetypes = ['text/x-uxntal'] + + instructions = [ + 'BRK', 'LIT', 'INC', 'POP', 'DUP', 'NIP', 'SWP', 'OVR', 'ROT', + 'EQU', 'NEQ', 'GTH', 'LTH', 'JMP', 'JCN', 'JSR', 'STH', + 'LDZ', 'STZ', 'LDR', 'STR', 'LDA', 'STA', 'DEI', 'DEO', + 'ADD', 'SUB', 'MUL', 'DIV', 'AND', 'ORA', 'EOR', 'SFT' + ] + + tokens = { + # the comment delimiters must not be adjacent to non-space characters. + # this means ( foo ) is a valid comment but (foo) is not. this also + # applies to nested comments. + 'comment': [ + (r'(?<!\S)\((?!\S)', Comment.Multiline, '#push'), # nested comments + (r'(?<!\S)\)(?!\S)', Comment.Multiline, '#pop'), # nested comments + (r'[^()]+', Comment.Multiline), # comments + (r'[()]+', Comment.Multiline), # comments + ], + 'root': [ + (r'\s+', Whitespace), # spaces + (r'(?<!\S)\((?!\S)', Comment.Multiline, 'comment'), # comments + (words(instructions, prefix=r'(?<!\S)', suffix=r'2?k?r?(?!\S)'), Keyword.Reserved), # instructions + (r'[][{}](?!\S)', Punctuation), # delimiters + (r'#([0-9a-f]{2}){1,2}(?!\S)', Number.Hex), # integer + (r'"\S+', String), # raw string + (r"'\S(?!\S)", String.Char), # raw char + (r'([0-9a-f]{2}){1,2}(?!\S)', Literal), # raw integer + (r'[|$][0-9a-f]{1,4}(?!\S)', Keyword.Declaration), # abs/rel pad + (r'%\S+', Name.Decorator), # macro + (r'@\S+', Name.Function), # label + (r'&\S+', Name.Label), # sublabel + (r'/\S+', Name.Tag), # spacer + (r'\.\S+', Name.Variable.Magic), # zero page addr + (r',\S+', Name.Variable.Instance), # rel addr + (r';\S+', Name.Variable.Global), # abs addr + (r':\S+', Literal), # raw addr + (r'~\S+', Keyword.Namespace), # include + (r'\S+', Name), + ] + } + + def analyse_text(text): + return '|0100' in text[:500] diff --git a/contrib/python/Pygments/py3/pygments/lexers/tcl.py b/contrib/python/Pygments/py3/pygments/lexers/tcl.py index 7be07357aa..9c8b48425b 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/tcl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/tcl.py @@ -4,7 +4,7 @@ Lexers for Tcl and related languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -41,6 +41,7 @@ class TclLexer(RegexLexer): 'subst', 'tell', 'time', 'tm', 'unknown', 'unload'), prefix=r'\b', suffix=r'\b') name = 'Tcl' + url = 'https://www.tcl.tk/about/language.html' aliases = ['tcl'] filenames = ['*.tcl', '*.rvt'] mimetypes = ['text/x-tcl', 'text/x-script.tcl', 'application/x-tcl'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/teal.py b/contrib/python/Pygments/py3/pygments/lexers/teal.py index 33088c882b..5676f2f2b8 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/teal.py +++ b/contrib/python/Pygments/py3/pygments/lexers/teal.py @@ -4,7 +4,7 @@ Lexer for TEAL. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -15,8 +15,7 @@ __all__ = ['TealLexer'] class TealLexer(RegexLexer): """ - For the `Transaction Execution Approval Language (TEAL) - <https://developer.algorand.org/docs/reference/teal/specification/>` + For the Transaction Execution Approval Language (TEAL) For more information about the grammar, see: https://github.com/algorand/go-algorand/blob/master/data/transactions/logic/assembler.go @@ -24,6 +23,7 @@ class TealLexer(RegexLexer): .. versionadded:: 2.9 """ name = 'teal' + url = 'https://developer.algorand.org/docs/reference/teal/specification/' aliases = ['teal'] filenames = ['*.teal'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/templates.py b/contrib/python/Pygments/py3/pygments/lexers/templates.py index 548e14afe2..304c4d349c 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/templates.py +++ b/contrib/python/Pygments/py3/pygments/lexers/templates.py @@ -4,7 +4,7 @@ Lexers for various template engines' markup. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -48,8 +48,7 @@ __all__ = ['HtmlPhpLexer', 'XmlPhpLexer', 'CssPhpLexer', class ErbLexer(Lexer): """ - Generic `ERB <http://ruby-doc.org/core/classes/ERB.html>`_ (Ruby Templating) - lexer. + Generic ERB (Ruby Templating) lexer. Just highlights ruby code between the preprocessor directives, other data is left untouched by the lexer. @@ -58,6 +57,7 @@ class ErbLexer(Lexer): """ name = 'ERB' + url = 'https://github.com/ruby/erb' aliases = ['erb'] mimetypes = ['application/x-ruby-templating'] @@ -143,13 +143,14 @@ class ErbLexer(Lexer): class SmartyLexer(RegexLexer): """ - Generic `Smarty <http://smarty.php.net/>`_ template lexer. + Generic Smarty template lexer. Just highlights smarty code between the preprocessor directives, other data is left untouched by the lexer. """ name = 'Smarty' + url = 'https://www.smarty.net/' aliases = ['smarty'] filenames = ['*.tpl'] mimetypes = ['application/x-smarty'] @@ -199,13 +200,14 @@ class SmartyLexer(RegexLexer): class VelocityLexer(RegexLexer): """ - Generic `Velocity <http://velocity.apache.org/>`_ template lexer. + Generic Velocity template lexer. Just highlights velocity directives and variable references, other data is left untouched by the lexer. """ name = 'Velocity' + url = 'https://velocity.apache.org/' aliases = ['velocity'] filenames = ['*.vm', '*.fhtml'] @@ -402,15 +404,14 @@ class DjangoLexer(RegexLexer): class MyghtyLexer(RegexLexer): """ - Generic `myghty templates`_ lexer. Code that isn't Myghty + Generic myghty templates lexer. Code that isn't Myghty markup is yielded as `Token.Other`. .. versionadded:: 0.6 - - .. _myghty templates: http://www.myghty.org/ """ name = 'Myghty' + url = 'http://www.myghty.org/' aliases = ['myghty'] filenames = ['*.myt', 'autodelegate'] mimetypes = ['application/x-myghty'] @@ -516,14 +517,13 @@ class MyghtyCssLexer(DelegatingLexer): class MasonLexer(RegexLexer): """ - Generic `mason templates`_ lexer. Stolen from Myghty lexer. Code that isn't + Generic mason templates lexer. Stolen from Myghty lexer. Code that isn't Mason markup is HTML. - .. _mason templates: http://www.masonhq.com/ - .. versionadded:: 1.4 """ name = 'Mason' + url = 'http://www.masonhq.com/' aliases = ['mason'] filenames = ['*.m', '*.mhtml', '*.mc', '*.mi', 'autohandler', 'dhandler'] mimetypes = ['application/x-mason'] @@ -572,15 +572,14 @@ class MasonLexer(RegexLexer): class MakoLexer(RegexLexer): """ - Generic `mako templates`_ lexer. Code that isn't Mako + Generic mako templates lexer. Code that isn't Mako markup is yielded as `Token.Other`. .. versionadded:: 0.7 - - .. _mako templates: http://www.makotemplates.org/ """ name = 'Mako' + url = 'http://www.makotemplates.org/' aliases = ['mako'] filenames = ['*.mao'] mimetypes = ['application/x-mako'] @@ -721,15 +720,15 @@ class CheetahPythonLexer(Lexer): class CheetahLexer(RegexLexer): """ - Generic `cheetah templates`_ lexer. Code that isn't Cheetah + Generic cheetah templates lexer. Code that isn't Cheetah markup is yielded as `Token.Other`. This also works for `spitfire templates`_ which use the same syntax. - .. _cheetah templates: http://www.cheetahtemplate.org/ .. _spitfire templates: http://code.google.com/p/spitfire/ """ name = 'Cheetah' + url = 'http://www.cheetahtemplate.org/' aliases = ['cheetah', 'spitfire'] filenames = ['*.tmpl', '*.spt'] mimetypes = ['application/x-cheetah', 'application/x-spitfire'] @@ -813,11 +812,11 @@ class CheetahJavascriptLexer(DelegatingLexer): class GenshiTextLexer(RegexLexer): """ - A lexer that highlights `genshi <http://genshi.edgewall.org/>`_ text - templates. + A lexer that highlights genshi text templates. """ name = 'Genshi Text' + url = 'http://genshi.edgewall.org/' aliases = ['genshitext'] mimetypes = ['application/x-genshi-text', 'text/x-genshi'] @@ -1252,6 +1251,7 @@ class HtmlDjangoLexer(DelegatingLexer): name = 'HTML+Django/Jinja' aliases = ['html+django', 'html+jinja', 'htmldjango'] + filenames = ['*.html.j2', '*.htm.j2', '*.xhtml.j2', '*.html.jinja2', '*.htm.jinja2', '*.xhtml.jinja2'] alias_filenames = ['*.html', '*.htm', '*.xhtml'] mimetypes = ['text/html+django', 'text/html+jinja'] @@ -1273,6 +1273,7 @@ class XmlDjangoLexer(DelegatingLexer): name = 'XML+Django/Jinja' aliases = ['xml+django', 'xml+jinja'] + filenames = ['*.xml.j2', '*.xml.jinja2'] alias_filenames = ['*.xml'] mimetypes = ['application/xml+django', 'application/xml+jinja'] @@ -1294,6 +1295,7 @@ class CssDjangoLexer(DelegatingLexer): name = 'CSS+Django/Jinja' aliases = ['css+django', 'css+jinja'] + filenames = ['*.css.j2', '*.css.jinja2'] alias_filenames = ['*.css'] mimetypes = ['text/css+django', 'text/css+jinja'] @@ -1313,6 +1315,7 @@ class JavascriptDjangoLexer(DelegatingLexer): name = 'JavaScript+Django/Jinja' aliases = ['javascript+django', 'js+django', 'javascript+jinja', 'js+jinja'] + filenames = ['*.js.j2', '*.js.jinja2'] alias_filenames = ['*.js'] mimetypes = ['application/x-javascript+django', 'application/x-javascript+jinja', @@ -1767,7 +1770,7 @@ class LassoJavascriptLexer(DelegatingLexer): class HandlebarsLexer(RegexLexer): """ - Generic `handlebars <http://handlebarsjs.com/>` template lexer. + Generic handlebars template lexer. Highlights only the Handlebars template tags (stuff between `{{` and `}}`). Everything else is left for a delegating lexer. @@ -1776,6 +1779,7 @@ class HandlebarsLexer(RegexLexer): """ name = "Handlebars" + url = 'https://handlebarsjs.com/' aliases = ['handlebars'] tokens = { @@ -1870,7 +1874,7 @@ class YamlJinjaLexer(DelegatingLexer): name = 'YAML+Jinja' aliases = ['yaml+jinja', 'salt', 'sls'] - filenames = ['*.sls'] + filenames = ['*.sls', '*.yaml.j2', '*.yml.j2', '*.yaml.jinja2', '*.yml.jinja2'] mimetypes = ['text/x-yaml+jinja', 'text/x-sls'] def __init__(self, **options): @@ -1879,12 +1883,12 @@ class YamlJinjaLexer(DelegatingLexer): class LiquidLexer(RegexLexer): """ - Lexer for `Liquid templates - <http://www.rubydoc.info/github/Shopify/liquid>`_. + Lexer for Liquid templates. .. versionadded:: 2.0 """ name = 'liquid' + url = 'https://www.rubydoc.info/github/Shopify/liquid' aliases = ['liquid'] filenames = ['*.liquid'] @@ -2085,7 +2089,7 @@ class LiquidLexer(RegexLexer): class TwigLexer(RegexLexer): """ - `Twig <http://twig.sensiolabs.org/>`_ template lexer. + Twig template lexer. It just highlights Twig code between the preprocessor directives, other data is left untouched by the lexer. @@ -2185,9 +2189,7 @@ class TwigHtmlLexer(DelegatingLexer): class Angular2Lexer(RegexLexer): """ - Generic - `angular2 <http://victorsavkin.com/post/119943127151/angular-2-template-syntax>`_ - template lexer. + Generic angular2 template lexer. Highlights only the Angular template tags (stuff between `{{` and `}}` and special attributes: '(event)=', '[property]=', '[(twoWayBinding)]='). @@ -2197,6 +2199,7 @@ class Angular2Lexer(RegexLexer): """ name = "Angular2" + url = 'https://angular.io/guide/template-syntax' aliases = ['ng2'] tokens = { diff --git a/contrib/python/Pygments/py3/pygments/lexers/teraterm.py b/contrib/python/Pygments/py3/pygments/lexers/teraterm.py index feb552d314..5fada1d100 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/teraterm.py +++ b/contrib/python/Pygments/py3/pygments/lexers/teraterm.py @@ -4,7 +4,7 @@ Lexer for Tera Term macro files. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -19,11 +19,12 @@ __all__ = ['TeraTermLexer'] class TeraTermLexer(RegexLexer): """ - For `Tera Term <https://ttssh2.osdn.jp/>`_ macro source code. + For Tera Term macro source code. .. versionadded:: 2.4 """ name = 'Tera Term macro' + url = 'https://ttssh2.osdn.jp/' aliases = ['teratermmacro', 'teraterm', 'ttl'] filenames = ['*.ttl'] mimetypes = ['text/x-teratermmacro'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/testing.py b/contrib/python/Pygments/py3/pygments/lexers/testing.py index e52f572e88..e45fe52160 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/testing.py +++ b/contrib/python/Pygments/py3/pygments/lexers/testing.py @@ -4,7 +4,7 @@ Lexers for testing languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -16,7 +16,7 @@ __all__ = ['GherkinLexer', 'TAPLexer'] class GherkinLexer(RegexLexer): """ - For `Gherkin <https://github.com/aslakhellesoy/gherkin/>` syntax. + For Gherkin syntax. .. versionadded:: 1.2 """ @@ -140,6 +140,7 @@ class TAPLexer(RegexLexer): .. versionadded:: 2.1 """ name = 'TAP' + url = 'https://testanything.org/' aliases = ['tap'] filenames = ['*.tap'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/text.py b/contrib/python/Pygments/py3/pygments/lexers/text.py index 68e06594f7..d9bf03dcdb 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/text.py +++ b/contrib/python/Pygments/py3/pygments/lexers/text.py @@ -4,12 +4,13 @@ Lexers for non-source code file types. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexers.configs import ApacheConfLexer, NginxConfLexer, \ - SquidConfLexer, LighttpdConfLexer, IniLexer, RegeditLexer, PropertiesLexer + SquidConfLexer, LighttpdConfLexer, IniLexer, RegeditLexer, PropertiesLexer, \ + UnixConfigLexer from pygments.lexers.console import PyPyLogLexer from pygments.lexers.textedit import VimLexer from pygments.lexers.markup import BBCodeLexer, MoinWikiLexer, RstLexer, \ diff --git a/contrib/python/Pygments/py3/pygments/lexers/textedit.py b/contrib/python/Pygments/py3/pygments/lexers/textedit.py index 0e567bca1d..1eb1b2f677 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/textedit.py +++ b/contrib/python/Pygments/py3/pygments/lexers/textedit.py @@ -4,7 +4,7 @@ Lexers for languages related to text processing. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -83,7 +83,7 @@ class SedLexer(RegexLexer): mimetypes = ['text/x-sed'] flags = re.MULTILINE - # Match the contents within delimeters such as /<contents>/ + # Match the contents within delimiters such as /<contents>/ _inside_delims = r'((?:(?:\\[^\n]|[^\\])*?\\\n)*?(?:\\.|[^\\])*?)' tokens = { diff --git a/contrib/python/Pygments/py3/pygments/lexers/textfmts.py b/contrib/python/Pygments/py3/pygments/lexers/textfmts.py index 62d300a5b5..e67410ac91 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/textfmts.py +++ b/contrib/python/Pygments/py3/pygments/lexers/textfmts.py @@ -4,7 +4,7 @@ Lexers for various text formats. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -200,12 +200,13 @@ class HttpLexer(RegexLexer): class TodotxtLexer(RegexLexer): """ - Lexer for `Todo.txt <http://todotxt.com/>`_ todo list format. + Lexer for Todo.txt todo list format. .. versionadded:: 2.0 """ name = 'Todotxt' + url = 'http://todotxt.com/' aliases = ['todotxt'] # *.todotxt is not a standard extension for Todo.txt files; including it # makes testing easier, and also makes autodetecting file type easier. @@ -300,7 +301,7 @@ class TodotxtLexer(RegexLexer): class NotmuchLexer(RegexLexer): """ - For `Notmuch <https://notmuchmail.org/>`_ email text format. + For Notmuch email text format. .. versionadded:: 2.5 @@ -312,6 +313,7 @@ class NotmuchLexer(RegexLexer): """ name = 'Notmuch' + url = 'https://notmuchmail.org/' aliases = ['notmuch'] def _highlight_code(self, match): diff --git a/contrib/python/Pygments/py3/pygments/lexers/theorem.py b/contrib/python/Pygments/py3/pygments/lexers/theorem.py index a7f4330a54..e4ed753904 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/theorem.py +++ b/contrib/python/Pygments/py3/pygments/lexers/theorem.py @@ -4,7 +4,7 @@ Lexers for theorem-proving languages. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -19,17 +19,18 @@ __all__ = ['CoqLexer', 'IsabelleLexer', 'LeanLexer'] class CoqLexer(RegexLexer): """ - For the `Coq <http://coq.inria.fr/>`_ theorem prover. + For the Coq theorem prover. .. versionadded:: 1.5 """ name = 'Coq' + url = 'http://coq.inria.fr/' aliases = ['coq'] filenames = ['*.v'] mimetypes = ['text/x-coq'] - flags = re.UNICODE + flags = 0 # no re.MULTILINE keywords1 = ( # Vernacular commands @@ -165,12 +166,13 @@ class CoqLexer(RegexLexer): class IsabelleLexer(RegexLexer): """ - For the `Isabelle <http://isabelle.in.tum.de/>`_ proof assistant. + For the Isabelle proof assistant. .. versionadded:: 2.0 """ name = 'Isabelle' + url = 'http://isabelle.in.tum.de/' aliases = ['isabelle'] filenames = ['*.thy'] mimetypes = ['text/x-isabelle'] @@ -381,18 +383,16 @@ class IsabelleLexer(RegexLexer): class LeanLexer(RegexLexer): """ - For the `Lean <https://github.com/leanprover/lean>`_ - theorem prover. + For the Lean theorem prover. .. versionadded:: 2.0 """ name = 'Lean' + url = 'https://github.com/leanprover/lean' aliases = ['lean'] filenames = ['*.lean'] mimetypes = ['text/x-lean'] - flags = re.MULTILINE | re.UNICODE - tokens = { 'root': [ (r'\s+', Text), diff --git a/contrib/python/Pygments/py3/pygments/lexers/thingsdb.py b/contrib/python/Pygments/py3/pygments/lexers/thingsdb.py index 3b94da5744..502b63c4e5 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/thingsdb.py +++ b/contrib/python/Pygments/py3/pygments/lexers/thingsdb.py @@ -4,7 +4,7 @@ Lexers for the ThingsDB language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/tnt.py b/contrib/python/Pygments/py3/pygments/lexers/tnt.py index e6e71961d4..582b2a2fdf 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/tnt.py +++ b/contrib/python/Pygments/py3/pygments/lexers/tnt.py @@ -4,7 +4,7 @@ Lexer for Typographic Number Theory. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -20,14 +20,13 @@ __all__ = ['TNTLexer'] class TNTLexer(Lexer): """ Lexer for Typographic Number Theory, as described in the book - Gödel, Escher, Bach, by Douglas R. Hofstadter, - or as summarized here: - https://github.com/Kenny2github/language-tnt/blob/master/README.md#summary-of-tnt - + Gödel, Escher, Bach, by Douglas R. Hofstadter + .. versionadded:: 2.7 """ name = 'Typographic Number Theory' + url = 'https://github.com/Kenny2github/language-tnt' aliases = ['tnt'] filenames = ['*.tnt'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/trafficscript.py b/contrib/python/Pygments/py3/pygments/lexers/trafficscript.py index 67ecd243cb..b8ef8243f1 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/trafficscript.py +++ b/contrib/python/Pygments/py3/pygments/lexers/trafficscript.py @@ -4,7 +4,7 @@ Lexer for RiverBed's TrafficScript (RTS) language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -16,7 +16,7 @@ __all__ = ['RtsLexer'] class RtsLexer(RegexLexer): """ - For `Riverbed Stingray Traffic Manager <http://www.riverbed.com/stingray>`_ + For Riverbed Stingray Traffic Manager .. versionadded:: 2.1 """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/typoscript.py b/contrib/python/Pygments/py3/pygments/lexers/typoscript.py index b2e4299beb..737169a981 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/typoscript.py +++ b/contrib/python/Pygments/py3/pygments/lexers/typoscript.py @@ -13,7 +13,7 @@ `TypoScriptHtmlDataLexer` Lexer that highlights markers, constants and registers within html tags. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -100,12 +100,11 @@ class TypoScriptLexer(RegexLexer): """ Lexer for TypoScript code. - http://docs.typo3.org/typo3cms/TyposcriptReference/ - .. versionadded:: 2.2 """ name = 'TypoScript' + url = 'http://docs.typo3.org/typo3cms/TyposcriptReference/' aliases = ['typoscript'] filenames = ['*.typoscript'] mimetypes = ['text/x-typoscript'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/ul4.py b/contrib/python/Pygments/py3/pygments/lexers/ul4.py new file mode 100644 index 0000000000..2511cee6d7 --- /dev/null +++ b/contrib/python/Pygments/py3/pygments/lexers/ul4.py @@ -0,0 +1,271 @@ +""" + pygments.lexers.ul4 + ~~~~~~~~~~~~~~~~~~~ + + Lexer for the UL4 templating language. + + More information: https://python.livinglogic.de/UL4.html + + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, DelegatingLexer, bygroups, words, include +from pygments.token import Comment, Text, Keyword, String, Number, Literal, \ + Name, Other, Operator +from pygments.lexers.web import HtmlLexer, XmlLexer, CssLexer, JavascriptLexer +from pygments.lexers.python import PythonLexer + + +__all__ = [ + 'UL4Lexer', + 'HTMLUL4Lexer', + 'XMLUL4Lexer', + 'CSSUL4Lexer', + 'JavascriptUL4Lexer', + 'PythonUL4Lexer', +] + + +class UL4Lexer(RegexLexer): + """ + Generic lexer for UL4. + + .. versionadded:: 2.12 + """ + + flags = re.MULTILINE | re.DOTALL + + name = 'UL4' + aliases = ['ul4'] + filenames = ['*.ul4'] + + tokens = { + "root": [ + ( + # Template header without name: + # ``<?ul4?>`` + r"(<\?)(\s*)(ul4)(\s*)(\?>)", + bygroups(Comment.Preproc, Text.Whitespace, Keyword, Text.Whitespace, Comment.Preproc), + ), + ( + # Template header with name (potentially followed by the signature): + # ``<?ul4 foo(bar=42)?>`` + r"(<\?)(\s*)(ul4)(\s*)([a-zA-Z_][a-zA-Z_0-9]*)?", + bygroups(Comment.Preproc, Text.Whitespace, Keyword, Text.Whitespace, Name.Function), + "ul4", # Switch to "expression" mode + ), + ( + # Comment: + # ``<?note foobar?>`` + r"<\?\s*note\s.*?\?>", + Comment, + ), + ( + # Template documentation: + # ``<?doc foobar?>`` + r"<\?\s*doc\s.*?\?>", + String.Doc, + ), + ( + # ``<?ignore?>`` tag for commenting out code: + # ``<?ignore?>...<?end ignore?>`` + r"<\?\s*ignore\s*\?>", + Comment, + "ignore", # Switch to "ignore" mode + ), + ( + # ``<?def?>`` tag for defining local templates + # ``<?def foo(bar=42)?>...<?end def?>`` + r"(<\?)(\s*)(def)(\s*)([a-zA-Z_][a-zA-Z_0-9]*)?", + bygroups(Comment.Preproc, Text.Whitespace, Keyword, Text.Whitespace, Name.Function), + "ul4", # Switch to "expression" mode + ), + ( + # The rest of the supported tags + r"(<\?)(\s*)(printx|print|for|if|elif|else|while|code|renderblocks?|render)\b", + bygroups(Comment.Preproc, Text.Whitespace, Keyword), + "ul4", # Switch to "expression" mode + ), + ( + # ``<?end?>`` tag for ending ``<?def?>``, ``<?for?>``, + # ``<?if?>``, ``<?while?>``, ``<?renderblock?>`` and + # ``<?renderblocks?>`` blocks. + r"(<\?)(\s*)(end)\b", + bygroups(Comment.Preproc, Text.Whitespace, Keyword), + "end", # Switch to "end tag" mode + ), + ( + # ``<?whitespace?>`` tag for configuring whitespace handlng + r"(<\?)(\s*)(whitespace)\b", + bygroups(Comment.Preproc, Text.Whitespace, Keyword), + "whitespace", # Switch to "whitespace" mode + ), + # Plain text + (r"[^<]+", Other), + (r"<", Other), + ], + # Ignore mode ignores everything upto the matching ``<?end ignore?>`` tag + "ignore": [ + # Nested ``<?ignore?>`` tag + (r"<\?\s*ignore\s*\?>", Comment, "#push"), + # ``<?end ignore?>`` tag + (r"<\?\s*end\s+ignore\s*\?>", Comment, "#pop"), + # Everything else + (r"[^<]+", Comment), + (r".", Comment), + ], + # UL4 expressions + "ul4": [ + # End the tag + (r"\?>", Comment.Preproc, "#pop"), + # Start triple quoted string constant + ("'''", String, "string13"), + ('"""', String, "string23"), + # Start single quoted string constant + ("'", String, "string1"), + ('"', String, "string2"), + # Floating point number + (r"\d+\.\d*([eE][+-]?\d+)?", Number.Float), + (r"\.\d+([eE][+-]?\d+)?", Number.Float), + (r"\d+[eE][+-]?\d+", Number.Float), + # Binary integer: ``0b101010`` + (r"0[bB][01]+", Number.Bin), + # Octal integer: ``0o52`` + (r"0[oO][0-7]+", Number.Oct), + # Hexadecimal integer: ``0x2a`` + (r"0[xX][0-9a-fA-F]+", Number.Hex), + # Date or datetime: ``@(2000-02-29)``/``@(2000-02-29T12:34:56.987654)`` + (r"@\(\d\d\d\d-\d\d-\d\d(T(\d\d:\d\d(:\d\d(\.\d{6})?)?)?)?\)", Literal.Date), + # Color: ``#fff``, ``#fff8f0`` etc. + (r"#[0-9a-fA-F]{8}", Literal.Color), + (r"#[0-9a-fA-F]{6}", Literal.Color), + (r"#[0-9a-fA-F]{3,4}", Literal.Color), + # Decimal integer: ``42`` + (r"\d+", Number.Integer), + # Operators + (r"//|==|!=|>=|<=|<<|>>|\+=|-=|\*=|/=|//=|<<=|>>=|&=|\|=|^=|=|[\[\]{},:*/().~%&|<>^+-]", Operator), + # Keywords + (words(("for", "in", "if", "else", "not", "is", "and", "or"), suffix=r"\b"), Keyword), + # Builtin constants + (words(("None", "False", "True"), suffix=r"\b"), Keyword.Constant), + # Variable names + (r"[a-zA-Z_][a-zA-Z0-9_]*", Name), + # Whitespace + (r"\s+", Text.Whitespace), + ], + # ``<?end ...?>`` tag for closing the last open block + "end": [ + (r"\?>", Comment.Preproc, "#pop"), + (words(("for", "if", "def", "while", "renderblock", "renderblocks"), suffix=r"\b"), Keyword), + (r"\s+", Text), + ], + # Content of the ``<?whitespace ...?>`` tag: + # ``keep``, ``strip`` or ``smart`` + "whitespace": [ + (r"\?>", Comment.Preproc, "#pop"), + (words(("keep", "strip", "smart"), suffix=r"\b"), Comment.Preproc), + (r"\s+", Text.Whitespace), + ], + # Inside a string constant + "stringescapes": [ + (r"""\\[\\'"abtnfr]""", String.Escape), + (r"\\x[0-9a-fA-F]{2}", String.Escape), + (r"\\u[0-9a-fA-F]{4}", String.Escape), + (r"\\U[0-9a-fA-F]{8}", String.Escape), + ], + # Inside a triple quoted string started with ``'''`` + "string13": [ + (r"'''", String, "#pop"), + include("stringescapes"), + (r"[^\\']+", String), + (r'.', String), + ], + # Inside a triple quoted string started with ``"""`` + "string23": [ + (r'"""', String, "#pop"), + include("stringescapes"), + (r'[^\\"]+', String), + (r'.', String), + ], + # Inside a single quoted string started with ``'`` + "string1": [ + (r"'", String, "#pop"), + include("stringescapes"), + (r"[^\\']+", String), + (r'.', String), + ], + # Inside a single quoted string started with ``"`` + "string2": [ + (r'"', String, "#pop"), + include("stringescapes"), + (r'[^\\"]+', String), + (r'.', String), + ], + } + +class HTMLUL4Lexer(DelegatingLexer): + """ + Lexer for UL4 embedded in HTML. + """ + + name = 'HTML+UL4' + aliases = ['html+ul4'] + filenames = ['*.htmlul4'] + + def __init__(self, **options): + super().__init__(HtmlLexer, UL4Lexer, **options) + + +class XMLUL4Lexer(DelegatingLexer): + """ + Lexer for UL4 embedded in XML. + """ + + name = 'XML+UL4' + aliases = ['xml+ul4'] + filenames = ['*.xmlul4'] + + def __init__(self, **options): + super().__init__(XmlLexer, UL4Lexer, **options) + + +class CSSUL4Lexer(DelegatingLexer): + """ + Lexer for UL4 embedded in CSS. + """ + + name = 'CSS+UL4' + aliases = ['css+ul4'] + filenames = ['*.cssul4'] + + def __init__(self, **options): + super().__init__(CssLexer, UL4Lexer, **options) + + +class JavascriptUL4Lexer(DelegatingLexer): + """ + Lexer for UL4 embedded in Javascript. + """ + + name = 'Javascript+UL4' + aliases = ['js+ul4'] + filenames = ['*.jsul4'] + + def __init__(self, **options): + super().__init__(JavascriptLexer, UL4Lexer, **options) + + +class PythonUL4Lexer(DelegatingLexer): + """ + Lexer for UL4 embedded in Python. + """ + + name = 'Python+UL4' + aliases = ['py+ul4'] + filenames = ['*.pyul4'] + + def __init__(self, **options): + super().__init__(PythonLexer, UL4Lexer, **options) diff --git a/contrib/python/Pygments/py3/pygments/lexers/unicon.py b/contrib/python/Pygments/py3/pygments/lexers/unicon.py index 4a76a0f821..3d7311abef 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/unicon.py +++ b/contrib/python/Pygments/py3/pygments/lexers/unicon.py @@ -4,7 +4,7 @@ Lexers for the Icon and Unicon languages, including ucode VM. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/urbi.py b/contrib/python/Pygments/py3/pygments/lexers/urbi.py index d9c1c9f82c..f197d590e5 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/urbi.py +++ b/contrib/python/Pygments/py3/pygments/lexers/urbi.py @@ -4,7 +4,7 @@ Lexers for UrbiScript language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -51,7 +51,7 @@ class UrbiscriptLexer(ExtendedRegexLexer): ctx.pos += len(result) return - # if blob is well formated, yield as Escape + # if blob is well formatted, yield as Escape blob_text = blob_start + ctx.text[match.end():match.end()+blob_size] + ")" yield match.start(), String.Escape, blob_text ctx.pos = match.end() + blob_size + 1 # +1 is the ending ")" @@ -78,9 +78,9 @@ class UrbiscriptLexer(ExtendedRegexLexer): 'struct', 'template', 'typedef', 'typeid', 'typename', 'union', 'unsigned', 'using', 'virtual', 'volatile', 'wchar_t'), suffix=r'\b'), Keyword.Reserved), - # deprecated keywords, use a meaningfull token when available + # deprecated keywords, use a meaningful token when available (r'(emit|foreach|internal|loopn|static)\b', Keyword), - # ignored keywords, use a meaningfull token when available + # ignored keywords, use a meaningful token when available (r'(private|protected|public)\b', Keyword), (r'(var|do|const|function|class)\b', Keyword.Declaration), (r'(true|false|nil|void)\b', Keyword.Constant), diff --git a/contrib/python/Pygments/py3/pygments/lexers/usd.py b/contrib/python/Pygments/py3/pygments/lexers/usd.py index 2b4ace862c..8c8e5a6bef 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/usd.py +++ b/contrib/python/Pygments/py3/pygments/lexers/usd.py @@ -4,7 +4,7 @@ The module that parses Pixar's Universal Scene Description file format. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -35,6 +35,7 @@ class UsdLexer(RegexLexer): """ name = "USD" + url = 'https://graphics.pixar.com/usd/release/index.html' aliases = ["usd", "usda"] filenames = ["*.usd", "*.usda"] diff --git a/contrib/python/Pygments/py3/pygments/lexers/varnish.py b/contrib/python/Pygments/py3/pygments/lexers/varnish.py index 618049be5b..c06d688616 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/varnish.py +++ b/contrib/python/Pygments/py3/pygments/lexers/varnish.py @@ -4,7 +4,7 @@ Lexers for Varnish configuration - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/verification.py b/contrib/python/Pygments/py3/pygments/lexers/verification.py index 2d473ae812..1721d77924 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/verification.py +++ b/contrib/python/Pygments/py3/pygments/lexers/verification.py @@ -4,7 +4,7 @@ Lexer for Intermediate Verification Languages (IVLs). - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -17,11 +17,12 @@ __all__ = ['BoogieLexer', 'SilverLexer'] class BoogieLexer(RegexLexer): """ - For `Boogie <https://boogie.codeplex.com/>`_ source code. + For Boogie source code. .. versionadded:: 2.1 """ name = 'Boogie' + url = 'https://boogie-docs.readthedocs.io/en/latest/' aliases = ['boogie'] filenames = ['*.bpl'] @@ -64,7 +65,7 @@ class BoogieLexer(RegexLexer): class SilverLexer(RegexLexer): """ - For `Silver <https://bitbucket.org/viperproject/silver>`_ source code. + For Silver source code. .. versionadded:: 2.2 """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/web.py b/contrib/python/Pygments/py3/pygments/lexers/web.py index a186048888..4acd3dd6d0 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/web.py +++ b/contrib/python/Pygments/py3/pygments/lexers/web.py @@ -4,7 +4,7 @@ Just export previously exported lexers. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/webassembly.py b/contrib/python/Pygments/py3/pygments/lexers/webassembly.py index d8d84b5c47..e10884f242 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/webassembly.py +++ b/contrib/python/Pygments/py3/pygments/lexers/webassembly.py @@ -8,7 +8,7 @@ and https://webassembly.github.io/spec/core/text/. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -62,12 +62,13 @@ builtins = ( class WatLexer(RegexLexer): - """Lexer for the `WebAssembly text format <https://webassembly.org/>`_. + """Lexer for the WebAssembly text format. .. versionadded:: 2.9 """ name = 'WebAssembly' + url = 'https://webassembly.org/' aliases = ['wast', 'wat'] filenames = ['*.wat', '*.wast'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/webidl.py b/contrib/python/Pygments/py3/pygments/lexers/webidl.py index d805484c74..3a8460d44a 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/webidl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/webidl.py @@ -4,7 +4,7 @@ Lexers for Web IDL, including some extensions. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -44,6 +44,7 @@ class WebIDLLexer(RegexLexer): """ name = 'Web IDL' + url = 'https://www.w3.org/wiki/Web_IDL' aliases = ['webidl'] filenames = ['*.webidl'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/webmisc.py b/contrib/python/Pygments/py3/pygments/lexers/webmisc.py index b1fd455525..187d641e1f 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/webmisc.py +++ b/contrib/python/Pygments/py3/pygments/lexers/webmisc.py @@ -4,7 +4,7 @@ Lexers for misc. web stuff. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -26,13 +26,12 @@ __all__ = ['DuelLexer', 'SlimLexer', 'XQueryLexer', 'QmlLexer', 'CirruLexer'] class DuelLexer(RegexLexer): """ Lexer for Duel Views Engine (formerly JBST) markup with JavaScript code blocks. - See http://duelengine.org/. - See http://jsonml.org/jbst/. - + .. versionadded:: 1.4 """ name = 'Duel' + url = 'http://duelengine.org/' aliases = ['duel', 'jbst', 'jsonml+bst'] filenames = ['*.duel', '*.jbst'] mimetypes = ['text/x-duel', 'text/x-jbst'] @@ -64,6 +63,7 @@ class XQueryLexer(ExtendedRegexLexer): .. versionadded:: 1.4 """ name = 'XQuery' + url = 'https://www.w3.org/XML/Query/' aliases = ['xquery', 'xqy', 'xq', 'xql', 'xqm'] filenames = ['*.xqy', '*.xquery', '*.xq', '*.xql', '*.xqm'] mimetypes = ['text/xquery', 'application/xquery'] @@ -111,7 +111,7 @@ class XQueryLexer(ExtendedRegexLexer): # aposattrcontentchar # x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] - flags = re.DOTALL | re.MULTILINE | re.UNICODE + flags = re.DOTALL | re.MULTILINE def punctuation_root_callback(lexer, match, ctx): yield match.start(), Punctuation, match.group(1) @@ -792,7 +792,7 @@ class XQueryLexer(ExtendedRegexLexer): class QmlLexer(RegexLexer): """ - For QML files. See http://doc.qt.digia.com/4.7/qdeclarativeintroduction.html. + For QML files. .. versionadded:: 1.6 """ @@ -801,6 +801,7 @@ class QmlLexer(RegexLexer): # JavascriptLexer above. name = 'QML' + url = 'https://doc.qt.io/qt-6/qmlapplications.html' aliases = ['qml', 'qbs'] filenames = ['*.qml', '*.qbs'] mimetypes = ['application/x-qml', 'application/x-qt.qbs+qml'] @@ -865,9 +866,6 @@ class QmlLexer(RegexLexer): class CirruLexer(RegexLexer): r""" - Syntax rules of Cirru can be found at: - http://cirru.org/ - * using ``()`` for expressions, but restricted in a same line * using ``""`` for strings, with ``\`` for escaping chars * using ``$`` as folding operator @@ -878,6 +876,7 @@ class CirruLexer(RegexLexer): """ name = 'Cirru' + url = 'http://cirru.org/' aliases = ['cirru'] filenames = ['*.cirru'] mimetypes = ['text/x-cirru'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/whiley.py b/contrib/python/Pygments/py3/pygments/lexers/whiley.py index 82b100bc45..ad9f2dc56f 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/whiley.py +++ b/contrib/python/Pygments/py3/pygments/lexers/whiley.py @@ -4,7 +4,7 @@ Lexers for the Whiley language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -22,6 +22,7 @@ class WhileyLexer(RegexLexer): .. versionadded:: 2.2 """ name = 'Whiley' + url = 'http://whiley.org/' filenames = ['*.whiley'] aliases = ['whiley'] mimetypes = ['text/x-whiley'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/x10.py b/contrib/python/Pygments/py3/pygments/lexers/x10.py index a5aff36d49..855b8ccb58 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/x10.py +++ b/contrib/python/Pygments/py3/pygments/lexers/x10.py @@ -4,7 +4,7 @@ Lexers for the X10 programming language. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -21,6 +21,7 @@ class X10Lexer(RegexLexer): """ name = 'X10' + url = 'http://x10-lang.org/' aliases = ['x10', 'xten'] filenames = ['*.x10'] mimetypes = ['text/x-x10'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/xorg.py b/contrib/python/Pygments/py3/pygments/lexers/xorg.py index 490b7c1d18..54f131fee5 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/xorg.py +++ b/contrib/python/Pygments/py3/pygments/lexers/xorg.py @@ -4,7 +4,7 @@ Lexers for Xorg configs. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -17,6 +17,7 @@ __all__ = ['XorgLexer'] class XorgLexer(RegexLexer): """Lexer for xorg.conf file.""" name = 'Xorg' + url = 'https://www.x.org/wiki/' aliases = ['xorg.conf'] filenames = ['xorg.conf'] mimetypes = [] diff --git a/contrib/python/Pygments/py3/pygments/lexers/yang.py b/contrib/python/Pygments/py3/pygments/lexers/yang.py index 4452df2d56..0e68cb828f 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/yang.py +++ b/contrib/python/Pygments/py3/pygments/lexers/yang.py @@ -4,7 +4,7 @@ Lexer for the YANG 1.1 modeling language. See :rfc:`7950`. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -16,11 +16,12 @@ __all__ = ['YangLexer'] class YangLexer(RegexLexer): """ - Lexer for `YANG <https://tools.ietf.org/html/rfc7950/>`_, based on RFC7950 + Lexer for YANG, based on RFC7950. .. versionadded:: 2.7 """ name = 'YANG' + url = 'https://tools.ietf.org/html/rfc7950/' aliases = ['yang'] filenames = ['*.yang'] mimetypes = ['application/yang'] diff --git a/contrib/python/Pygments/py3/pygments/lexers/zig.py b/contrib/python/Pygments/py3/pygments/lexers/zig.py index 4a36832be5..3101154ae5 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/zig.py +++ b/contrib/python/Pygments/py3/pygments/lexers/zig.py @@ -4,7 +4,7 @@ Lexers for Zig. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -17,11 +17,10 @@ __all__ = ['ZigLexer'] class ZigLexer(RegexLexer): """ - For `Zig <http://www.ziglang.org>`_ source code. - grammar: https://ziglang.org/documentation/master/#Grammar """ name = 'Zig' + url = 'http://www.ziglang.org' aliases = ['zig'] filenames = ['*.zig'] mimetypes = ['text/zig'] diff --git a/contrib/python/Pygments/py3/pygments/modeline.py b/contrib/python/Pygments/py3/pygments/modeline.py index 047d86d6be..43630835ca 100644 --- a/contrib/python/Pygments/py3/pygments/modeline.py +++ b/contrib/python/Pygments/py3/pygments/modeline.py @@ -4,7 +4,7 @@ A simple modeline parser (based on pymodeline). - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/plugin.py b/contrib/python/Pygments/py3/pygments/plugin.py index b1085b7ae4..247d5083b6 100644 --- a/contrib/python/Pygments/py3/pygments/plugin.py +++ b/contrib/python/Pygments/py3/pygments/plugin.py @@ -31,7 +31,7 @@ yourfilter = yourfilter:YourFilter - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ LEXER_ENTRY_POINT = 'pygments.lexers' diff --git a/contrib/python/Pygments/py3/pygments/regexopt.py b/contrib/python/Pygments/py3/pygments/regexopt.py index cb2c8e21a9..ae0079199b 100644 --- a/contrib/python/Pygments/py3/pygments/regexopt.py +++ b/contrib/python/Pygments/py3/pygments/regexopt.py @@ -5,7 +5,7 @@ An algorithm that generates optimized regexes for matching long lists of literal strings. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/scanner.py b/contrib/python/Pygments/py3/pygments/scanner.py index 5f32a22c3c..d47ed4828a 100644 --- a/contrib/python/Pygments/py3/pygments/scanner.py +++ b/contrib/python/Pygments/py3/pygments/scanner.py @@ -11,7 +11,7 @@ Have a look at the `DelphiLexer` to get an idea of how to use this scanner. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re @@ -72,7 +72,7 @@ class Scanner: def scan(self, pattern): """ Scan the text for the given pattern and update pos/match - and related fields. The return value is a boolen that + and related fields. The return value is a boolean that indicates if the pattern matched. The matched value is stored on the instance as ``match``, the last value is stored as ``last``. ``start_pos`` is the position of the diff --git a/contrib/python/Pygments/py3/pygments/sphinxext.py b/contrib/python/Pygments/py3/pygments/sphinxext.py index 644eb8c338..f1405eb82b 100644 --- a/contrib/python/Pygments/py3/pygments/sphinxext.py +++ b/contrib/python/Pygments/py3/pygments/sphinxext.py @@ -5,7 +5,7 @@ Sphinx extension to generate automatic documentation of lexers, formatters and filters. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/style.py b/contrib/python/Pygments/py3/pygments/style.py index 88ccaf263c..8faa4dc7ba 100644 --- a/contrib/python/Pygments/py3/pygments/style.py +++ b/contrib/python/Pygments/py3/pygments/style.py @@ -4,7 +4,7 @@ Basic style object. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/__init__.py b/contrib/python/Pygments/py3/pygments/styles/__init__.py index d75de1a521..7d72ceba1c 100644 --- a/contrib/python/Pygments/py3/pygments/styles/__init__.py +++ b/contrib/python/Pygments/py3/pygments/styles/__init__.py @@ -4,7 +4,7 @@ Contains built-in styles. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/abap.py b/contrib/python/Pygments/py3/pygments/styles/abap.py index 1e51e05021..8629e66c44 100644 --- a/contrib/python/Pygments/py3/pygments/styles/abap.py +++ b/contrib/python/Pygments/py3/pygments/styles/abap.py @@ -4,7 +4,7 @@ ABAP workbench like style. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/algol.py b/contrib/python/Pygments/py3/pygments/styles/algol.py index f293b0eca9..d6b4926a76 100644 --- a/contrib/python/Pygments/py3/pygments/styles/algol.py +++ b/contrib/python/Pygments/py3/pygments/styles/algol.py @@ -25,7 +25,7 @@ [1] `Revised Report on the Algorithmic Language Algol-60 <http://www.masswerk.at/algol60/report.htm>` - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/algol_nu.py b/contrib/python/Pygments/py3/pygments/styles/algol_nu.py index fe2846693b..68bdb7eca1 100644 --- a/contrib/python/Pygments/py3/pygments/styles/algol_nu.py +++ b/contrib/python/Pygments/py3/pygments/styles/algol_nu.py @@ -25,7 +25,7 @@ [1] `Revised Report on the Algorithmic Language Algol-60 <http://www.masswerk.at/algol60/report.htm>` - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/arduino.py b/contrib/python/Pygments/py3/pygments/styles/arduino.py index 4dfe0f3ce2..08782c73d6 100644 --- a/contrib/python/Pygments/py3/pygments/styles/arduino.py +++ b/contrib/python/Pygments/py3/pygments/styles/arduino.py @@ -4,7 +4,7 @@ Arduino® Syntax highlighting style. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -16,7 +16,7 @@ from pygments.token import Keyword, Name, Comment, String, Error, \ class ArduinoStyle(Style): """ The Arduino® language style. This style is designed to highlight the - Arduino source code, so exepect the best results with it. + Arduino source code, so expect the best results with it. """ background_color = "#ffffff" diff --git a/contrib/python/Pygments/py3/pygments/styles/autumn.py b/contrib/python/Pygments/py3/pygments/styles/autumn.py index 85fd8982a9..878b55d5f1 100644 --- a/contrib/python/Pygments/py3/pygments/styles/autumn.py +++ b/contrib/python/Pygments/py3/pygments/styles/autumn.py @@ -4,7 +4,7 @@ A colorful style, inspired by the terminal highlighting style. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/borland.py b/contrib/python/Pygments/py3/pygments/styles/borland.py index 427e149f2f..ecdff617db 100644 --- a/contrib/python/Pygments/py3/pygments/styles/borland.py +++ b/contrib/python/Pygments/py3/pygments/styles/borland.py @@ -4,7 +4,7 @@ Style similar to the style used in the Borland IDEs. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/bw.py b/contrib/python/Pygments/py3/pygments/styles/bw.py index 1b38538761..3a92d82c3f 100644 --- a/contrib/python/Pygments/py3/pygments/styles/bw.py +++ b/contrib/python/Pygments/py3/pygments/styles/bw.py @@ -4,7 +4,7 @@ Simple black/white only style. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/colorful.py b/contrib/python/Pygments/py3/pygments/styles/colorful.py index a67b8e3e61..ad7b0828ad 100644 --- a/contrib/python/Pygments/py3/pygments/styles/colorful.py +++ b/contrib/python/Pygments/py3/pygments/styles/colorful.py @@ -4,7 +4,7 @@ A colorful style, inspired by CodeRay. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/default.py b/contrib/python/Pygments/py3/pygments/styles/default.py index c69325f432..531f9565c7 100644 --- a/contrib/python/Pygments/py3/pygments/styles/default.py +++ b/contrib/python/Pygments/py3/pygments/styles/default.py @@ -4,7 +4,7 @@ The default highlighting style. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/dracula.py b/contrib/python/Pygments/py3/pygments/styles/dracula.py index 99d6a51862..0b75efe559 100644 --- a/contrib/python/Pygments/py3/pygments/styles/dracula.py +++ b/contrib/python/Pygments/py3/pygments/styles/dracula.py @@ -7,7 +7,7 @@ Based on the Dracula Theme for pygments by Chris Bracco. See https://github.com/dracula/pygments/tree/fee9ed5613d1086bc01b9d0a5a0e9867a009f571 - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/emacs.py b/contrib/python/Pygments/py3/pygments/styles/emacs.py index e9cbc33da8..d0a8cb67db 100644 --- a/contrib/python/Pygments/py3/pygments/styles/emacs.py +++ b/contrib/python/Pygments/py3/pygments/styles/emacs.py @@ -4,7 +4,7 @@ A highlighting style for Pygments, inspired by Emacs. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/friendly.py b/contrib/python/Pygments/py3/pygments/styles/friendly.py index 82f2479475..c8a94a9e38 100644 --- a/contrib/python/Pygments/py3/pygments/styles/friendly.py +++ b/contrib/python/Pygments/py3/pygments/styles/friendly.py @@ -4,7 +4,7 @@ A modern style based on the VIM pyte theme. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/friendly_grayscale.py b/contrib/python/Pygments/py3/pygments/styles/friendly_grayscale.py index eb35026406..58b09c9175 100644 --- a/contrib/python/Pygments/py3/pygments/styles/friendly_grayscale.py +++ b/contrib/python/Pygments/py3/pygments/styles/friendly_grayscale.py @@ -7,7 +7,7 @@ using the luminosity value calculated by http://www.workwithcolor.com/color-converter-01.htm - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/fruity.py b/contrib/python/Pygments/py3/pygments/styles/fruity.py index 2446915d66..2151565d59 100644 --- a/contrib/python/Pygments/py3/pygments/styles/fruity.py +++ b/contrib/python/Pygments/py3/pygments/styles/fruity.py @@ -4,7 +4,7 @@ pygments version of my "fruity" vim theme. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/gruvbox.py b/contrib/python/Pygments/py3/pygments/styles/gruvbox.py index 1077e6d86f..24c3983172 100644 --- a/contrib/python/Pygments/py3/pygments/styles/gruvbox.py +++ b/contrib/python/Pygments/py3/pygments/styles/gruvbox.py @@ -5,7 +5,7 @@ pygments version of the "gruvbox" vim theme. https://github.com/morhetz/gruvbox - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/igor.py b/contrib/python/Pygments/py3/pygments/styles/igor.py index 278e9da1d4..a38481ba8f 100644 --- a/contrib/python/Pygments/py3/pygments/styles/igor.py +++ b/contrib/python/Pygments/py3/pygments/styles/igor.py @@ -4,7 +4,7 @@ Igor Pro default style. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/inkpot.py b/contrib/python/Pygments/py3/pygments/styles/inkpot.py index d2eff2c8d5..891c722318 100644 --- a/contrib/python/Pygments/py3/pygments/styles/inkpot.py +++ b/contrib/python/Pygments/py3/pygments/styles/inkpot.py @@ -4,7 +4,7 @@ A highlighting style for Pygments, inspired by the Inkpot theme for VIM. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/lilypond.py b/contrib/python/Pygments/py3/pygments/styles/lilypond.py index fe364fb996..f2d690ccdd 100644 --- a/contrib/python/Pygments/py3/pygments/styles/lilypond.py +++ b/contrib/python/Pygments/py3/pygments/styles/lilypond.py @@ -4,7 +4,7 @@ LilyPond-specific style. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/lovelace.py b/contrib/python/Pygments/py3/pygments/styles/lovelace.py index ec8d2a9106..ca83135c90 100644 --- a/contrib/python/Pygments/py3/pygments/styles/lovelace.py +++ b/contrib/python/Pygments/py3/pygments/styles/lovelace.py @@ -8,7 +8,7 @@ A desaturated, somewhat subdued style created for the Lovelace interactive learning environment. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/manni.py b/contrib/python/Pygments/py3/pygments/styles/manni.py index 167dcebd5a..f5fe876422 100644 --- a/contrib/python/Pygments/py3/pygments/styles/manni.py +++ b/contrib/python/Pygments/py3/pygments/styles/manni.py @@ -7,7 +7,7 @@ This is a port of the style used in the `php port`_ of pygments by Manni. The style is called 'default' there. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/material.py b/contrib/python/Pygments/py3/pygments/styles/material.py index c7012fe516..8acb3bc6e4 100644 --- a/contrib/python/Pygments/py3/pygments/styles/material.py +++ b/contrib/python/Pygments/py3/pygments/styles/material.py @@ -6,7 +6,7 @@ https://github.com/material-theme/vsc-material-theme - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/monokai.py b/contrib/python/Pygments/py3/pygments/styles/monokai.py index 9de82f35ef..610dc0ae0a 100644 --- a/contrib/python/Pygments/py3/pygments/styles/monokai.py +++ b/contrib/python/Pygments/py3/pygments/styles/monokai.py @@ -6,7 +6,7 @@ http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/ - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/murphy.py b/contrib/python/Pygments/py3/pygments/styles/murphy.py index 9115c2d87f..e07c755b5e 100644 --- a/contrib/python/Pygments/py3/pygments/styles/murphy.py +++ b/contrib/python/Pygments/py3/pygments/styles/murphy.py @@ -4,7 +4,7 @@ Murphy's style from CodeRay. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/native.py b/contrib/python/Pygments/py3/pygments/styles/native.py index 9c2f2c16b8..fa4687c71f 100644 --- a/contrib/python/Pygments/py3/pygments/styles/native.py +++ b/contrib/python/Pygments/py3/pygments/styles/native.py @@ -4,7 +4,7 @@ pygments version of my "native" vim theme. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -26,27 +26,27 @@ class NativeStyle(Style): Token: '#d0d0d0', Whitespace: '#666666', - Comment: 'italic #999999', + Comment: 'italic #ababab', Comment.Preproc: 'noitalic bold #cd2828', Comment.Special: 'noitalic bold #e50808 bg:#520000', - Keyword: 'bold #6ab825', + Keyword: 'bold #6ebf26', Keyword.Pseudo: 'nobold', - Operator.Word: 'bold #6ab825', + Operator.Word: 'bold #6ebf26', String: '#ed9d13', String.Other: '#ffa500', - Number: '#3677a9', + Number: '#51b2fd', - Name.Builtin: '#24909d', + Name.Builtin: '#2fbccd', Name.Variable: '#40ffff', Name.Constant: '#40ffff', - Name.Class: 'underline #447fcf', - Name.Function: '#447fcf', - Name.Namespace: 'underline #447fcf', + Name.Class: 'underline #71adff', + Name.Function: '#71adff', + Name.Namespace: 'underline #71adff', Name.Exception: '#bbbbbb', - Name.Tag: 'bold #6ab825', + Name.Tag: 'bold #6ebf26', Name.Attribute: '#bbbbbb', Name.Decorator: '#ffa500', diff --git a/contrib/python/Pygments/py3/pygments/styles/onedark.py b/contrib/python/Pygments/py3/pygments/styles/onedark.py index b6a33b50d6..91ace5b51c 100644 --- a/contrib/python/Pygments/py3/pygments/styles/onedark.py +++ b/contrib/python/Pygments/py3/pygments/styles/onedark.py @@ -7,7 +7,7 @@ Inspired by one-dark-ui for the code editor Atom (https://atom.io/themes/one-dark-ui). - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/paraiso_dark.py b/contrib/python/Pygments/py3/pygments/styles/paraiso_dark.py index 0c98f0058d..6f200bf4c2 100644 --- a/contrib/python/Pygments/py3/pygments/styles/paraiso_dark.py +++ b/contrib/python/Pygments/py3/pygments/styles/paraiso_dark.py @@ -8,7 +8,7 @@ Created with Base16 Builder by Chris Kempson (https://github.com/chriskempson/base16-builder). - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/paraiso_light.py b/contrib/python/Pygments/py3/pygments/styles/paraiso_light.py index 4c9f1392ac..bc164f076e 100644 --- a/contrib/python/Pygments/py3/pygments/styles/paraiso_light.py +++ b/contrib/python/Pygments/py3/pygments/styles/paraiso_light.py @@ -8,7 +8,7 @@ Created with Base16 Builder by Chris Kempson (https://github.com/chriskempson/base16-builder). - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/pastie.py b/contrib/python/Pygments/py3/pygments/styles/pastie.py index 14ec7007f5..41814e27e1 100644 --- a/contrib/python/Pygments/py3/pygments/styles/pastie.py +++ b/contrib/python/Pygments/py3/pygments/styles/pastie.py @@ -6,7 +6,7 @@ .. _pastie: http://pastie.caboo.se/ - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/perldoc.py b/contrib/python/Pygments/py3/pygments/styles/perldoc.py index 5eae210fd8..eaea0abcc7 100644 --- a/contrib/python/Pygments/py3/pygments/styles/perldoc.py +++ b/contrib/python/Pygments/py3/pygments/styles/perldoc.py @@ -6,7 +6,7 @@ .. _perldoc: http://perldoc.perl.org/ - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/rainbow_dash.py b/contrib/python/Pygments/py3/pygments/styles/rainbow_dash.py index 3996332a25..fa0e0ca5a6 100644 --- a/contrib/python/Pygments/py3/pygments/styles/rainbow_dash.py +++ b/contrib/python/Pygments/py3/pygments/styles/rainbow_dash.py @@ -6,7 +6,7 @@ .. _theme: http://sanssecours.github.io/Rainbow-Dash.tmbundle - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/rrt.py b/contrib/python/Pygments/py3/pygments/styles/rrt.py index 0b58152d4c..ce248f689a 100644 --- a/contrib/python/Pygments/py3/pygments/styles/rrt.py +++ b/contrib/python/Pygments/py3/pygments/styles/rrt.py @@ -4,7 +4,7 @@ pygments "rrt" theme, based on Zap and Emacs defaults. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/sas.py b/contrib/python/Pygments/py3/pygments/styles/sas.py index ed5eb2666a..b64b14b5f1 100644 --- a/contrib/python/Pygments/py3/pygments/styles/sas.py +++ b/contrib/python/Pygments/py3/pygments/styles/sas.py @@ -6,7 +6,7 @@ meant to be a complete style. It's merely meant to mimic SAS' program editor syntax highlighting. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/solarized.py b/contrib/python/Pygments/py3/pygments/styles/solarized.py index 1e051eb477..fc382355e2 100644 --- a/contrib/python/Pygments/py3/pygments/styles/solarized.py +++ b/contrib/python/Pygments/py3/pygments/styles/solarized.py @@ -7,7 +7,7 @@ A Pygments style for the Solarized themes (licensed under MIT). See: https://github.com/altercation/solarized - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/stata_dark.py b/contrib/python/Pygments/py3/pygments/styles/stata_dark.py index 86d23be002..c05f962e5a 100644 --- a/contrib/python/Pygments/py3/pygments/styles/stata_dark.py +++ b/contrib/python/Pygments/py3/pygments/styles/stata_dark.py @@ -6,7 +6,7 @@ meant to be a complete style, just for Stata's file formats. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/stata_light.py b/contrib/python/Pygments/py3/pygments/styles/stata_light.py index 9dead703dc..c97fef12ee 100644 --- a/contrib/python/Pygments/py3/pygments/styles/stata_light.py +++ b/contrib/python/Pygments/py3/pygments/styles/stata_light.py @@ -5,7 +5,7 @@ Light Style inspired by Stata's do-file editor. Note this is not meant to be a complete style, just for Stata's file formats. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/tango.py b/contrib/python/Pygments/py3/pygments/styles/tango.py index 7a2f005b6c..7012a34132 100644 --- a/contrib/python/Pygments/py3/pygments/styles/tango.py +++ b/contrib/python/Pygments/py3/pygments/styles/tango.py @@ -32,7 +32,7 @@ have been chosen to have the same style. Similarly, keywords (Keyword.*), and Operator.Word (and, or, in) have been assigned the same style. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/trac.py b/contrib/python/Pygments/py3/pygments/styles/trac.py index b2a1fd4d2e..0885ced8f2 100644 --- a/contrib/python/Pygments/py3/pygments/styles/trac.py +++ b/contrib/python/Pygments/py3/pygments/styles/trac.py @@ -4,7 +4,7 @@ Port of the default trac highlighter design. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/vim.py b/contrib/python/Pygments/py3/pygments/styles/vim.py index f498606bdb..074a37bbe2 100644 --- a/contrib/python/Pygments/py3/pygments/styles/vim.py +++ b/contrib/python/Pygments/py3/pygments/styles/vim.py @@ -4,7 +4,7 @@ A highlighting style for Pygments, inspired by vim. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/vs.py b/contrib/python/Pygments/py3/pygments/styles/vs.py index a504f912a2..01a51c0db0 100644 --- a/contrib/python/Pygments/py3/pygments/styles/vs.py +++ b/contrib/python/Pygments/py3/pygments/styles/vs.py @@ -4,7 +4,7 @@ Simple style with MS Visual Studio colors. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/xcode.py b/contrib/python/Pygments/py3/pygments/styles/xcode.py index fd8621e7d1..e1ac936f35 100644 --- a/contrib/python/Pygments/py3/pygments/styles/xcode.py +++ b/contrib/python/Pygments/py3/pygments/styles/xcode.py @@ -4,7 +4,7 @@ Style similar to the `Xcode` default theme. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/zenburn.py b/contrib/python/Pygments/py3/pygments/styles/zenburn.py index 8797df7f25..1bebb1d97a 100644 --- a/contrib/python/Pygments/py3/pygments/styles/zenburn.py +++ b/contrib/python/Pygments/py3/pygments/styles/zenburn.py @@ -7,7 +7,7 @@ See: https://kippura.org/zenburnpage/ https://github.com/jnurmine/Zenburn - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/token.py b/contrib/python/Pygments/py3/pygments/token.py index 9013acb709..8aee88a835 100644 --- a/contrib/python/Pygments/py3/pygments/token.py +++ b/contrib/python/Pygments/py3/pygments/token.py @@ -4,7 +4,7 @@ Basic token types and the standard tokens. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/unistring.py b/contrib/python/Pygments/py3/pygments/unistring.py index 2872985c14..2e3c80869d 100644 --- a/contrib/python/Pygments/py3/pygments/unistring.py +++ b/contrib/python/Pygments/py3/pygments/unistring.py @@ -7,7 +7,7 @@ Inspired by chartypes_create.py from the MoinMoin project. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -122,7 +122,7 @@ if __name__ == '__main__': # pragma: no cover c = chr(code) cat = unicodedata.category(c) if ord(c) == 0xdc00: - # Hack to avoid combining this combining with the preceeding high + # Hack to avoid combining this combining with the preceding high # surrogate, 0xdbff, when doing a repr. c = '\\' + c elif ord(c) in (0x2d, 0x5b, 0x5c, 0x5d, 0x5e): diff --git a/contrib/python/Pygments/py3/pygments/util.py b/contrib/python/Pygments/py3/pygments/util.py index 5d6ddc3f5b..8032962dc9 100644 --- a/contrib/python/Pygments/py3/pygments/util.py +++ b/contrib/python/Pygments/py3/pygments/util.py @@ -4,7 +4,7 @@ Utility functions. - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -23,7 +23,7 @@ doctype_lookup_re = re.compile(r''' [^>]*> ''', re.DOTALL | re.MULTILINE | re.VERBOSE) tag_re = re.compile(r'<(.+?)(\s.*?)?>.*?</.+?>', - re.UNICODE | re.IGNORECASE | re.DOTALL | re.MULTILINE) + re.IGNORECASE | re.DOTALL | re.MULTILINE) xml_decl_re = re.compile(r'\s*<\?xml[^>]*\?>', re.I) diff --git a/tools/enum_parser/enum_parser/main.cpp b/tools/enum_parser/enum_parser/main.cpp index 1985f2d42f..4ad43d4a35 100644 --- a/tools/enum_parser/enum_parser/main.cpp +++ b/tools/enum_parser/enum_parser/main.cpp @@ -246,7 +246,15 @@ void GenerateEnum( out << " using TNameBufsBase = ::NEnumSerializationRuntime::TEnumDescription<" << name << ">;\n\n"; // Initialization data - defineConstArray(" ", "TNameBufsBase::TEnumStringPair", "NAMES_INITIALIZATION_PAIRS", nameInitializerPairs); + { + out << " static constexpr const std::array<TNameBufsBase::TEnumStringPair, " << nameInitializerPairs.size() << "> NAMES_INITIALIZATION_PAIRS_PAYLOAD = ::NEnumSerializationRuntime::TryStableSortKeys("; + out << "std::array<TNameBufsBase::TEnumStringPair, " << nameInitializerPairs.size() << ">{{\n"; + for (const auto& it : nameInitializerPairs) { + out << " " << it << ",\n"; + } + out << " }});\n"; + out << " " << "static constexpr const TArrayRef<const TNameBufsBase::TEnumStringPair> " << "NAMES_INITIALIZATION_PAIRS{NAMES_INITIALIZATION_PAIRS_PAYLOAD};\n\n"; + } { StableSortBy(valueInitializerPairsUnsorted, [](const auto& pair) -> const TString& { return pair.second; }); TVector<TString> valueInitializerPairs(Reserve(valueInitializerPairsUnsorted.size())); diff --git a/tools/enum_parser/enum_serialization_runtime/ordered_pairs.h b/tools/enum_parser/enum_serialization_runtime/ordered_pairs.h index 874c709418..4dce4dc3f3 100644 --- a/tools/enum_parser/enum_serialization_runtime/ordered_pairs.h +++ b/tools/enum_parser/enum_serialization_runtime/ordered_pairs.h @@ -1,20 +1,23 @@ #pragma once +#include <util/generic/algorithm.h> #include <util/generic/array_ref.h> #include <util/generic/strbuf.h> +#include <array> +#include <functional> namespace NEnumSerializationRuntime { enum class ESortOrder: int { - Unordered = 0, - Ascending = 1, - StrictlyAscending = 2, - DirectMapping = 3, + Unordered = 0, // беспорядок + Ascending = 1, // можно искать бинарным поиском, но есть эквивалентные ключи. Гланый ключ находится через lower_bound + StrictlyAscending = 2, // + все ключи уникальны + DirectMapping = 3, // последовательность целых чисел без пропусков, индекс элемента можно вычислить из его значения не делая поиск }; template <typename TEnumRepresentationType> struct TEnumStringPair { - const TEnumRepresentationType Key; - const TStringBuf Name; + TEnumRepresentationType Key; + TStringBuf Name; }; template <typename TEnumRepresentationType> @@ -25,10 +28,12 @@ namespace NEnumSerializationRuntime { bool direct = true; bool strict = true; bool sorted = true; - TEnumRepresentationType expected = initializer.data()[0].Key; - for (size_t i = 1; i < initializer.size(); ++i) { - const auto& prev = initializer.data()[i - 1].Key; - const auto& next = initializer.data()[i - 0].Key; + const auto* data = initializer.data(); + const size_t size = initializer.size(); + TEnumRepresentationType expected = data[0].Key; + for (size_t i = 1; i < size; ++i) { + const auto& prev = data[i - 1].Key; + const auto& next = data[i - 0].Key; if (++expected != next) { direct = false; } @@ -53,13 +58,16 @@ namespace NEnumSerializationRuntime { } bool strict = true; bool sorted = true; - for (size_t i = 1; i < initializer.size(); ++i) { - const std::string_view prev = initializer.data()[i - 1].Name; - const std::string_view next = initializer.data()[i - 0].Name; - if (prev >= next) { + const auto* data = initializer.data(); + const size_t size = initializer.size(); + for (size_t i = 1; i < size; ++i) { + const std::string_view& prev = data[i - 1].Name; + const std::string_view& next = data[i - 0].Name; + const int cmp = prev.compare(next); + if (cmp >= 0) { strict = false; } - if (prev > next) { + if (cmp > 0) { sorted = false; break; } @@ -68,4 +76,59 @@ namespace NEnumSerializationRuntime { : sorted ? ESortOrder::Ascending : ESortOrder::Unordered; } + +#if defined(__cpp_lib_array_constexpr) && defined(__cpp_lib_constexpr_algorithms) && defined(__cpp_lib_constexpr_functional) + + // Функция должна состоять из единственного вызова + // std::stable_sort(v.begin(), v.end(), [](const T& a, const T& b) { return a.Key < b.Key; }); + // и возврата отсортированного массива. + // Но в C++20 stable_sort ещё не имеет спецификатора constexpr и не может использоваться тут. + // Поэтому в текущей реализации вместо этого делается обычная нестабильная сортировка пар {ключ элемента, положение элемента}. + template <class T, size_t N> + constexpr std::array<T, N> TryStableSortKeys(std::array<T, N> v) { + // Компилятор обычно ограничивает число шагов, которые можно сделать при вычислении constexpr-функции (см. опции `-fconstexpr-steps=N` или `/constexpr:stepsN`). + // Число же шагов, необходимых для сортировки, зависит не только от длины массива, + // но и от используемого алгоритма, от числа вложенных функций в его реализации, и от наличия assert'ов в ней. + // Что также означает, что число шагов может меняться в несколько раз при смене реализации STL или при сборке с NDEBUG и без. + // + // Исчерпание бюджета на действия приведёт к ошибки компиляции без возможности восстановления. + // То есть без возможности обнаружить эту ситуацию и переключится на другой алгоритм. + // + // Поэтому максимальный размер сортируемого массива заранее ограничивается безопасной константой. + // А все массивы большего размера досортировываются уже во время исполнения программы. + constexpr size_t MAX_COMPILE_TIME_SORT_ARRAY_SIZE = 2'000; + if (v.size() > MAX_COMPILE_TIME_SORT_ARRAY_SIZE) { + return v; + } + + // Многие перечисления уже отсортированы. Но текущая реализация constexpr std::sort в libcxx не проверяет этот случай и всегда работает за время Θ(NlogN) + if (IsSortedBy(v.begin(), v.end(), std::mem_fn(&T::Key))) { + return v; + } + + std::array<const T*, N> ptrs; + Iota(ptrs.begin(), ptrs.end(), &v[0]); + auto cmpKeyPointersFn = [](const T* a, const T* b) { + if (a->Key != b->Key) { + return a->Key < b->Key; + } + return a < b; // ensure stable sort order + }; + Sort(ptrs.begin(), ptrs.end(), cmpKeyPointersFn); + + std::array<T, N> r; + for (size_t i = 0; i < N; ++i) { + r[i] = *ptrs[i]; + } + return r; + } + +#else + + template <class T, size_t N> + constexpr std::array<T, N> TryStableSortKeys(std::array<T, N> v) { + return v; // skip sort in case of old language version + } + +#endif } diff --git a/tools/enum_parser/parse_enum/benchmark_build/README.md b/tools/enum_parser/parse_enum/benchmark_build/README.md new file mode 100644 index 0000000000..255592bc99 --- /dev/null +++ b/tools/enum_parser/parse_enum/benchmark_build/README.md @@ -0,0 +1,2 @@ +Модуль для проверки компилируемости больших перечислений и замера времени. +Размечен как unittest, но проверки делаются во время компиляции. diff --git a/tools/enum_parser/parse_enum/benchmark_build/lib/gen.py b/tools/enum_parser/parse_enum/benchmark_build/lib/gen.py new file mode 100644 index 0000000000..783ab9f181 --- /dev/null +++ b/tools/enum_parser/parse_enum/benchmark_build/lib/gen.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# - * - encoding: UTF-8 - * - + +from argparse import ArgumentParser +import random +import sys +import math + + +def parse_args(): + parser = ArgumentParser(description="") + parser.add_argument('--range', type=int) + parser.add_argument('--enum', nargs=2, action="append", metavar=("NAME", "SIZE")) + parser.add_argument('--namespace', type=str) + args = parser.parse_args() + return args + + +def gen_enum(name, n): + rg = random.Random(n) + h1 = list(range(n)) + h2 = list(range(n)) + rg.shuffle(h1) + rg.shuffle(h2) + + print("enum class %s {" % name) + for k, v in zip(h1, h2): + print(" V%x = 0x%04x," % (k, v)) + print("};") + print() + + +def main(): + args = parse_args() + + print("#pragma once\n\n") + + gr = {} + for name, size in args.enum or []: + assert name not in gr + gr[name] = int(size) + if args.range: + step = max(int(math.sqrt(args.range)), 1) + for s in range(args.range, -1, -step): + gr["EDenseEnum%04d" % s] = s + + if args.namespace: + print(f"namespace {args.namespace} {{") + + for name, size in sorted(gr.items(), key=lambda kv: -kv[1]): + gen_enum(name, size) + + if args.namespace: + print(f"}} // namespace {args.namespace}") + + return 0 + + +if __name__ == '__main__': + sys.exit(main()) diff --git a/tools/enum_parser/parse_enum/benchmark_build/ut/huge_enums_fallback_ut.cpp b/tools/enum_parser/parse_enum/benchmark_build/ut/huge_enums_fallback_ut.cpp new file mode 100644 index 0000000000..8d6800946f --- /dev/null +++ b/tools/enum_parser/parse_enum/benchmark_build/ut/huge_enums_fallback_ut.cpp @@ -0,0 +1,31 @@ +#include <tools/enum_parser/parse_enum/benchmark_build/lib/enum_huge.h_serialized.h> +#include <tools/enum_parser/parse_enum/benchmark_build/lib/enum_enormous.h_serialized.h> +#include <library/cpp/testing/unittest/registar.h> +#include <util/generic/serialized_enum.h> +#include <util/string/cast.h> + + +namespace { + template <class EEnum> + void EnumerateEnum() { + const auto& allValues = GetEnumAllValues<EEnum>(); + + TString s; + for (EEnum e : allValues) { + UNIT_ASSERT_NO_EXCEPTION(s = ToString(e)); + UNIT_ASSERT_NO_EXCEPTION(e = FromString<EEnum>(s)); + } + + EEnum tmp; + UNIT_ASSERT_VALUES_EQUAL(TryFromString<EEnum>("", tmp), false); + } +} + +Y_UNIT_TEST_SUITE(TTestHugeEnums) { + Y_UNIT_TEST(Huge) { + EnumerateEnum<NHuge::EHuge>(); + } + Y_UNIT_TEST(Enormous) { + EnumerateEnum<EEnormous>(); + } +}; |