diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
commit | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch) | |
tree | 64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/python/Pygments/py2 | |
parent | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff) | |
download | ydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/Pygments/py2')
70 files changed, 2485 insertions, 2485 deletions
diff --git a/contrib/python/Pygments/py2/.dist-info/METADATA b/contrib/python/Pygments/py2/.dist-info/METADATA index 2741a0de96..4214b2f67c 100644 --- a/contrib/python/Pygments/py2/.dist-info/METADATA +++ b/contrib/python/Pygments/py2/.dist-info/METADATA @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: Pygments -Version: 2.5.2 +Version: 2.5.2 Summary: Pygments is a syntax highlighting package written in Python. Home-page: http://pygments.org/ Author: Georg Brandl @@ -20,9 +20,9 @@ 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 -Classifier: Programming Language :: Python :: Implementation :: CPython -Classifier: Programming Language :: Python :: Implementation :: PyPy +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Operating System :: OS Independent Classifier: Topic :: Text Processing :: Filters Classifier: Topic :: Utilities diff --git a/contrib/python/Pygments/py2/AUTHORS b/contrib/python/Pygments/py2/AUTHORS index ee02af7311..f7a7acadf6 100644 --- a/contrib/python/Pygments/py2/AUTHORS +++ b/contrib/python/Pygments/py2/AUTHORS @@ -1,228 +1,228 @@ -Pygments is written and maintained by Georg Brandl <georg@python.org>. - -Major developers are Tim Hatch <tim@timhatch.com> and Armin Ronacher -<armin.ronacher@active-4.com>. - -Other contributors, listed alphabetically, are: - -* Sam Aaron -- Ioke lexer -* Ali Afshar -- image formatter -* Thomas Aglassinger -- Easytrieve, JCL, Rexx, Transact-SQL and VBScript - lexers -* Muthiah Annamalai -- Ezhil lexer -* Kumar Appaiah -- Debian control lexer -* Andreas Amann -- AppleScript lexer -* Timothy Armstrong -- Dart lexer fixes -* Jeffrey Arnold -- R/S, Rd, BUGS, Jags, and Stan lexers -* Jeremy Ashkenas -- CoffeeScript lexer -* José Joaquín Atria -- Praat lexer -* Stefan Matthias Aust -- Smalltalk lexer -* Lucas Bajolet -- Nit lexer -* Ben Bangert -- Mako lexers -* Max Battcher -- Darcs patch lexer -* Thomas Baruchel -- APL lexer -* Tim Baumann -- (Literate) Agda lexer -* Paul Baumgart, 280 North, Inc. -- Objective-J lexer -* Michael Bayer -- Myghty lexers -* Thomas Beale -- Archetype lexers -* John Benediktsson -- Factor lexer -* Trevor Bergeron -- mIRC formatter -* Vincent Bernat -- LessCSS lexer -* Christopher Bertels -- Fancy lexer -* Sébastien Bigaret -- QVT Operational lexer -* Jarrett Billingsley -- MiniD lexer -* Adam Blinkinsop -- Haskell, Redcode lexers -* Stéphane Blondon -- SGF lexer -* Frits van Bommel -- assembler lexers -* Pierre Bourdon -- bugfixes -* Matthias Bussonnier -- ANSI style handling for terminal-256 formatter -* chebee7i -- Python traceback lexer improvements -* Hiram Chirino -- Scaml and Jade lexers -* Mauricio Caceres -- SAS and Stata lexers. -* Ian Cooper -- VGL lexer -* David Corbett -- Inform, Jasmin, JSGF, Snowball, and TADS 3 lexers -* Leaf Corcoran -- MoonScript lexer -* Christopher Creutzig -- MuPAD lexer -* Daniël W. Crompton -- Pike lexer -* Pete Curry -- bugfixes -* Bryan Davis -- EBNF lexer -* Bruno Deferrari -- Shen lexer -* Giedrius Dubinskas -- HTML formatter improvements -* Owen Durni -- Haxe lexer -* Alexander Dutton, Oxford University Computing Services -- SPARQL lexer -* James Edwards -- Terraform lexer -* Nick Efford -- Python 3 lexer -* Sven Efftinge -- Xtend lexer -* Artem Egorkine -- terminal256 formatter -* Matthew Fernandez -- CAmkES lexer -* Michael Ficarra -- CPSA lexer -* James H. Fisher -- PostScript lexer -* William S. Fulton -- SWIG lexer -* Carlos Galdino -- Elixir and Elixir Console lexers -* Michael Galloy -- IDL lexer -* Naveen Garg -- Autohotkey lexer -* Laurent Gautier -- R/S lexer -* Alex Gaynor -- PyPy log lexer -* Richard Gerkin -- Igor Pro lexer -* Alain Gilbert -- TypeScript lexer -* Alex Gilding -- BlitzBasic lexer -* Bertrand Goetzmann -- Groovy lexer -* Krzysiek Goj -- Scala lexer -* Andrey Golovizin -- BibTeX lexers -* Matt Good -- Genshi, Cheetah lexers -* Michał Górny -- vim modeline support -* Alex Gosse -- TrafficScript lexer -* Patrick Gotthardt -- PHP namespaces support -* Olivier Guibe -- Asymptote lexer -* Phil Hagelberg -- Fennel lexer -* Florian Hahn -- Boogie lexer -* Martin Harriman -- SNOBOL lexer -* Matthew Harrison -- SVG formatter -* Steven Hazel -- Tcl lexer -* Dan Michael Heggø -- Turtle lexer -* Aslak Hellesøy -- Gherkin lexer -* Greg Hendershott -- Racket lexer -* Justin Hendrick -- ParaSail lexer -* Jordi Gutiérrez Hermoso -- Octave lexer -* David Hess, Fish Software, Inc. -- Objective-J lexer -* Varun Hiremath -- Debian control lexer -* Rob Hoelz -- Perl 6 lexer -* Doug Hogan -- Mscgen lexer -* Ben Hollis -- Mason lexer -* Max Horn -- GAP lexer -* Alastair Houghton -- Lexer inheritance facility -* Tim Howard -- BlitzMax lexer -* Dustin Howett -- Logos lexer -* Ivan Inozemtsev -- Fantom lexer -* Hiroaki Itoh -- Shell console rewrite, Lexers for PowerShell session, - MSDOS session, BC, WDiff -* Brian R. Jackson -- Tea lexer -* Christian Jann -- ShellSession lexer -* Dennis Kaarsemaker -- sources.list lexer -* Dmitri Kabak -- Inferno Limbo lexer -* Igor Kalnitsky -- vhdl lexer -* Alexander Kit -- MaskJS lexer -* Pekka Klärck -- Robot Framework lexer -* Gerwin Klein -- Isabelle lexer -* Eric Knibbe -- Lasso lexer -* Stepan Koltsov -- Clay lexer -* Adam Koprowski -- Opa lexer -* Benjamin Kowarsch -- Modula-2 lexer -* Domen Kožar -- Nix lexer -* Oleh Krekel -- Emacs Lisp lexer -* Alexander Kriegisch -- Kconfig and AspectJ lexers -* Marek Kubica -- Scheme lexer -* Jochen Kupperschmidt -- Markdown processor -* Gerd Kurzbach -- Modelica lexer -* Jon Larimer, Google Inc. -- Smali lexer -* Olov Lassus -- Dart lexer -* Matt Layman -- TAP lexer -* Kristian Lyngstøl -- Varnish lexers -* Sylvestre Ledru -- Scilab lexer -* Chee Sing Lee -- Flatline lexer -* Mark Lee -- Vala lexer -* Valentin Lorentz -- C++ lexer improvements -* Ben Mabey -- Gherkin lexer -* Angus MacArthur -- QML lexer -* Louis Mandel -- X10 lexer -* Louis Marchand -- Eiffel lexer -* Simone Margaritelli -- Hybris lexer -* Kirk McDonald -- D lexer -* Gordon McGregor -- SystemVerilog lexer -* Stephen McKamey -- Duel/JBST lexer -* Brian McKenna -- F# lexer -* Charles McLaughlin -- Puppet lexer -* Kurt McKee -- Tera Term macro lexer -* Lukas Meuser -- BBCode formatter, Lua lexer -* Cat Miller -- Pig lexer -* Paul Miller -- LiveScript lexer -* Hong Minhee -- HTTP lexer -* Michael Mior -- Awk lexer -* Bruce Mitchener -- Dylan lexer rewrite -* Reuben Morais -- SourcePawn lexer -* Jon Morton -- Rust lexer -* Paulo Moura -- Logtalk lexer -* Mher Movsisyan -- DTD lexer -* Dejan Muhamedagic -- Crmsh lexer -* Ana Nelson -- Ragel, ANTLR, R console lexers -* Kurt Neufeld -- Markdown lexer -* Nam T. Nguyen -- Monokai style -* Jesper Noehr -- HTML formatter "anchorlinenos" -* Mike Nolta -- Julia lexer -* Jonas Obrist -- BBCode lexer -* Edward O'Callaghan -- Cryptol lexer -* David Oliva -- Rebol lexer -* Pat Pannuto -- nesC lexer -* Jon Parise -- Protocol buffers and Thrift lexers -* Benjamin Peterson -- Test suite refactoring -* Ronny Pfannschmidt -- BBCode lexer -* Dominik Picheta -- Nimrod lexer -* Andrew Pinkham -- RTF Formatter Refactoring -* Clément Prévost -- UrbiScript lexer -* Tanner Prynn -- cmdline -x option and loading lexers from files -* Oleh Prypin -- Crystal lexer (based on Ruby lexer) -* Elias Rabel -- Fortran fixed form lexer -* raichoo -- Idris lexer -* Kashif Rasul -- CUDA lexer -* Nathan Reed -- HLSL lexer -* Justin Reidy -- MXML lexer -* Norman Richards -- JSON lexer -* Corey Richardson -- Rust lexer updates -* Lubomir Rintel -- GoodData MAQL and CL lexers -* Andre Roberge -- Tango style -* Georg Rollinger -- HSAIL lexer -* Michiel Roos -- TypoScript lexer -* Konrad Rudolph -- LaTeX formatter enhancements -* Mario Ruggier -- Evoque lexers -* Miikka Salminen -- Lovelace style, Hexdump lexer, lexer enhancements -* Stou Sandalski -- NumPy, FORTRAN, tcsh and XSLT lexers -* Matteo Sasso -- Common Lisp lexer -* Joe Schafer -- Ada lexer -* Ken Schutte -- Matlab lexers -* René Schwaiger -- Rainbow Dash style -* Sebastian Schweizer -- Whiley lexer -* Tassilo Schweyer -- Io, MOOCode lexers -* Ted Shaw -- AutoIt lexer -* Joerg Sieker -- ABAP lexer -* Robert Simmons -- Standard ML lexer -* Kirill Simonov -- YAML lexer -* Corbin Simpson -- Monte lexer -* Alexander Smishlajev -- Visual FoxPro lexer -* Steve Spigarelli -- XQuery lexer -* Jerome St-Louis -- eC lexer -* Camil Staps -- Clean and NuSMV lexers; Solarized style -* James Strachan -- Kotlin lexer -* Tom Stuart -- Treetop lexer -* Colin Sullivan -- SuperCollider lexer -* Ben Swift -- Extempore lexer -* Edoardo Tenani -- Arduino lexer -* Tiberius Teng -- default style overhaul -* Jeremy Thurgood -- Erlang, Squid config lexers -* Brian Tiffin -- OpenCOBOL lexer -* Bob Tolbert -- Hy lexer -* Matthias Trute -- Forth lexer -* Erick Tryzelaar -- Felix lexer -* Alexander Udalov -- Kotlin lexer improvements -* Thomas Van Doren -- Chapel lexer -* Daniele Varrazzo -- PostgreSQL lexers -* Abe Voelker -- OpenEdge ABL lexer -* Pepijn de Vos -- HTML formatter CTags support -* Matthias Vallentin -- Bro lexer -* Benoît Vinot -- AMPL lexer -* Linh Vu Hong -- RSL lexer -* Nathan Weizenbaum -- Haml and Sass lexers -* Nathan Whetsell -- Csound lexers -* Dietmar Winkler -- Modelica lexer -* Nils Winter -- Smalltalk lexer -* Davy Wybiral -- Clojure lexer -* Whitney Young -- ObjectiveC lexer -* Diego Zamboni -- CFengine3 lexer -* Enrique Zamudio -- Ceylon lexer -* Alex Zimin -- Nemerle lexer -* Rob Zimmerman -- Kal lexer -* Vincent Zurczak -- Roboconf lexer -* Rostyslav Golda -- FloScript lexer -* GitHub, Inc -- DASM16, Augeas, TOML, and Slash lexers -* Simon Garnotel -- FreeFem++ lexer - -Many thanks for all contributions! +Pygments is written and maintained by Georg Brandl <georg@python.org>. + +Major developers are Tim Hatch <tim@timhatch.com> and Armin Ronacher +<armin.ronacher@active-4.com>. + +Other contributors, listed alphabetically, are: + +* Sam Aaron -- Ioke lexer +* Ali Afshar -- image formatter +* Thomas Aglassinger -- Easytrieve, JCL, Rexx, Transact-SQL and VBScript + lexers +* Muthiah Annamalai -- Ezhil lexer +* Kumar Appaiah -- Debian control lexer +* Andreas Amann -- AppleScript lexer +* Timothy Armstrong -- Dart lexer fixes +* Jeffrey Arnold -- R/S, Rd, BUGS, Jags, and Stan lexers +* Jeremy Ashkenas -- CoffeeScript lexer +* José Joaquín Atria -- Praat lexer +* Stefan Matthias Aust -- Smalltalk lexer +* Lucas Bajolet -- Nit lexer +* Ben Bangert -- Mako lexers +* Max Battcher -- Darcs patch lexer +* Thomas Baruchel -- APL lexer +* Tim Baumann -- (Literate) Agda lexer +* Paul Baumgart, 280 North, Inc. -- Objective-J lexer +* Michael Bayer -- Myghty lexers +* Thomas Beale -- Archetype lexers +* John Benediktsson -- Factor lexer +* Trevor Bergeron -- mIRC formatter +* Vincent Bernat -- LessCSS lexer +* Christopher Bertels -- Fancy lexer +* Sébastien Bigaret -- QVT Operational lexer +* Jarrett Billingsley -- MiniD lexer +* Adam Blinkinsop -- Haskell, Redcode lexers +* Stéphane Blondon -- SGF lexer +* Frits van Bommel -- assembler lexers +* Pierre Bourdon -- bugfixes +* Matthias Bussonnier -- ANSI style handling for terminal-256 formatter +* chebee7i -- Python traceback lexer improvements +* Hiram Chirino -- Scaml and Jade lexers +* Mauricio Caceres -- SAS and Stata lexers. +* Ian Cooper -- VGL lexer +* David Corbett -- Inform, Jasmin, JSGF, Snowball, and TADS 3 lexers +* Leaf Corcoran -- MoonScript lexer +* Christopher Creutzig -- MuPAD lexer +* Daniël W. Crompton -- Pike lexer +* Pete Curry -- bugfixes +* Bryan Davis -- EBNF lexer +* Bruno Deferrari -- Shen lexer +* Giedrius Dubinskas -- HTML formatter improvements +* Owen Durni -- Haxe lexer +* Alexander Dutton, Oxford University Computing Services -- SPARQL lexer +* James Edwards -- Terraform lexer +* Nick Efford -- Python 3 lexer +* Sven Efftinge -- Xtend lexer +* Artem Egorkine -- terminal256 formatter +* Matthew Fernandez -- CAmkES lexer +* Michael Ficarra -- CPSA lexer +* James H. Fisher -- PostScript lexer +* William S. Fulton -- SWIG lexer +* Carlos Galdino -- Elixir and Elixir Console lexers +* Michael Galloy -- IDL lexer +* Naveen Garg -- Autohotkey lexer +* Laurent Gautier -- R/S lexer +* Alex Gaynor -- PyPy log lexer +* Richard Gerkin -- Igor Pro lexer +* Alain Gilbert -- TypeScript lexer +* Alex Gilding -- BlitzBasic lexer +* Bertrand Goetzmann -- Groovy lexer +* Krzysiek Goj -- Scala lexer +* Andrey Golovizin -- BibTeX lexers +* Matt Good -- Genshi, Cheetah lexers +* Michał Górny -- vim modeline support +* Alex Gosse -- TrafficScript lexer +* Patrick Gotthardt -- PHP namespaces support +* Olivier Guibe -- Asymptote lexer +* Phil Hagelberg -- Fennel lexer +* Florian Hahn -- Boogie lexer +* Martin Harriman -- SNOBOL lexer +* Matthew Harrison -- SVG formatter +* Steven Hazel -- Tcl lexer +* Dan Michael Heggø -- Turtle lexer +* Aslak Hellesøy -- Gherkin lexer +* Greg Hendershott -- Racket lexer +* Justin Hendrick -- ParaSail lexer +* Jordi Gutiérrez Hermoso -- Octave lexer +* David Hess, Fish Software, Inc. -- Objective-J lexer +* Varun Hiremath -- Debian control lexer +* Rob Hoelz -- Perl 6 lexer +* Doug Hogan -- Mscgen lexer +* Ben Hollis -- Mason lexer +* Max Horn -- GAP lexer +* Alastair Houghton -- Lexer inheritance facility +* Tim Howard -- BlitzMax lexer +* Dustin Howett -- Logos lexer +* Ivan Inozemtsev -- Fantom lexer +* Hiroaki Itoh -- Shell console rewrite, Lexers for PowerShell session, + MSDOS session, BC, WDiff +* Brian R. Jackson -- Tea lexer +* Christian Jann -- ShellSession lexer +* Dennis Kaarsemaker -- sources.list lexer +* Dmitri Kabak -- Inferno Limbo lexer +* Igor Kalnitsky -- vhdl lexer +* Alexander Kit -- MaskJS lexer +* Pekka Klärck -- Robot Framework lexer +* Gerwin Klein -- Isabelle lexer +* Eric Knibbe -- Lasso lexer +* Stepan Koltsov -- Clay lexer +* Adam Koprowski -- Opa lexer +* Benjamin Kowarsch -- Modula-2 lexer +* Domen Kožar -- Nix lexer +* Oleh Krekel -- Emacs Lisp lexer +* Alexander Kriegisch -- Kconfig and AspectJ lexers +* Marek Kubica -- Scheme lexer +* Jochen Kupperschmidt -- Markdown processor +* Gerd Kurzbach -- Modelica lexer +* Jon Larimer, Google Inc. -- Smali lexer +* Olov Lassus -- Dart lexer +* Matt Layman -- TAP lexer +* Kristian Lyngstøl -- Varnish lexers +* Sylvestre Ledru -- Scilab lexer +* Chee Sing Lee -- Flatline lexer +* Mark Lee -- Vala lexer +* Valentin Lorentz -- C++ lexer improvements +* Ben Mabey -- Gherkin lexer +* Angus MacArthur -- QML lexer +* Louis Mandel -- X10 lexer +* Louis Marchand -- Eiffel lexer +* Simone Margaritelli -- Hybris lexer +* Kirk McDonald -- D lexer +* Gordon McGregor -- SystemVerilog lexer +* Stephen McKamey -- Duel/JBST lexer +* Brian McKenna -- F# lexer +* Charles McLaughlin -- Puppet lexer +* Kurt McKee -- Tera Term macro lexer +* Lukas Meuser -- BBCode formatter, Lua lexer +* Cat Miller -- Pig lexer +* Paul Miller -- LiveScript lexer +* Hong Minhee -- HTTP lexer +* Michael Mior -- Awk lexer +* Bruce Mitchener -- Dylan lexer rewrite +* Reuben Morais -- SourcePawn lexer +* Jon Morton -- Rust lexer +* Paulo Moura -- Logtalk lexer +* Mher Movsisyan -- DTD lexer +* Dejan Muhamedagic -- Crmsh lexer +* Ana Nelson -- Ragel, ANTLR, R console lexers +* Kurt Neufeld -- Markdown lexer +* Nam T. Nguyen -- Monokai style +* Jesper Noehr -- HTML formatter "anchorlinenos" +* Mike Nolta -- Julia lexer +* Jonas Obrist -- BBCode lexer +* Edward O'Callaghan -- Cryptol lexer +* David Oliva -- Rebol lexer +* Pat Pannuto -- nesC lexer +* Jon Parise -- Protocol buffers and Thrift lexers +* Benjamin Peterson -- Test suite refactoring +* Ronny Pfannschmidt -- BBCode lexer +* Dominik Picheta -- Nimrod lexer +* Andrew Pinkham -- RTF Formatter Refactoring +* Clément Prévost -- UrbiScript lexer +* Tanner Prynn -- cmdline -x option and loading lexers from files +* Oleh Prypin -- Crystal lexer (based on Ruby lexer) +* Elias Rabel -- Fortran fixed form lexer +* raichoo -- Idris lexer +* Kashif Rasul -- CUDA lexer +* Nathan Reed -- HLSL lexer +* Justin Reidy -- MXML lexer +* Norman Richards -- JSON lexer +* Corey Richardson -- Rust lexer updates +* Lubomir Rintel -- GoodData MAQL and CL lexers +* Andre Roberge -- Tango style +* Georg Rollinger -- HSAIL lexer +* Michiel Roos -- TypoScript lexer +* Konrad Rudolph -- LaTeX formatter enhancements +* Mario Ruggier -- Evoque lexers +* Miikka Salminen -- Lovelace style, Hexdump lexer, lexer enhancements +* Stou Sandalski -- NumPy, FORTRAN, tcsh and XSLT lexers +* Matteo Sasso -- Common Lisp lexer +* Joe Schafer -- Ada lexer +* Ken Schutte -- Matlab lexers +* René Schwaiger -- Rainbow Dash style +* Sebastian Schweizer -- Whiley lexer +* Tassilo Schweyer -- Io, MOOCode lexers +* Ted Shaw -- AutoIt lexer +* Joerg Sieker -- ABAP lexer +* Robert Simmons -- Standard ML lexer +* Kirill Simonov -- YAML lexer +* Corbin Simpson -- Monte lexer +* Alexander Smishlajev -- Visual FoxPro lexer +* Steve Spigarelli -- XQuery lexer +* Jerome St-Louis -- eC lexer +* Camil Staps -- Clean and NuSMV lexers; Solarized style +* James Strachan -- Kotlin lexer +* Tom Stuart -- Treetop lexer +* Colin Sullivan -- SuperCollider lexer +* Ben Swift -- Extempore lexer +* Edoardo Tenani -- Arduino lexer +* Tiberius Teng -- default style overhaul +* Jeremy Thurgood -- Erlang, Squid config lexers +* Brian Tiffin -- OpenCOBOL lexer +* Bob Tolbert -- Hy lexer +* Matthias Trute -- Forth lexer +* Erick Tryzelaar -- Felix lexer +* Alexander Udalov -- Kotlin lexer improvements +* Thomas Van Doren -- Chapel lexer +* Daniele Varrazzo -- PostgreSQL lexers +* Abe Voelker -- OpenEdge ABL lexer +* Pepijn de Vos -- HTML formatter CTags support +* Matthias Vallentin -- Bro lexer +* Benoît Vinot -- AMPL lexer +* Linh Vu Hong -- RSL lexer +* Nathan Weizenbaum -- Haml and Sass lexers +* Nathan Whetsell -- Csound lexers +* Dietmar Winkler -- Modelica lexer +* Nils Winter -- Smalltalk lexer +* Davy Wybiral -- Clojure lexer +* Whitney Young -- ObjectiveC lexer +* Diego Zamboni -- CFengine3 lexer +* Enrique Zamudio -- Ceylon lexer +* Alex Zimin -- Nemerle lexer +* Rob Zimmerman -- Kal lexer +* Vincent Zurczak -- Roboconf lexer +* Rostyslav Golda -- FloScript lexer +* GitHub, Inc -- DASM16, Augeas, TOML, and Slash lexers +* Simon Garnotel -- FreeFem++ lexer + +Many thanks for all contributions! diff --git a/contrib/python/Pygments/py2/README.rst b/contrib/python/Pygments/py2/README.rst index 9d59609bcd..ef0cbfd248 100644 --- a/contrib/python/Pygments/py2/README.rst +++ b/contrib/python/Pygments/py2/README.rst @@ -1,44 +1,44 @@ -Welcome to Pygments -=================== - -This is the source of Pygments. It is a **generic syntax highlighter** written -in Python that supports over 300 languages and text formats, for use in code -hosting, forums, wikis or other applications that need to prettify source code. - -Installing ----------- - -... works as usual, use ``pip install Pygments`` to get published versions, -or ``python setup.py install`` to install from a checkout. - -Documentation -------------- - -... can be found online at http://pygments.org/ or created with Sphinx by :: - - cd doc - make html - -Development ------------ - -... takes place on `GitHub <https://github.com/pygments/pygments>`_, where the -Git repository, tickets and pull requests can be viewed. - -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 - -The authors ------------ - -Pygments is maintained by **Georg Brandl**, e-mail address *georg*\ *@*\ *python.org* -and **Matthäus Chajdas**. - -Many lexers and fixes have been contributed by **Armin Ronacher**, the rest of -the `Pocoo <http://dev.pocoo.org/>`_ team and **Tim Hatch**. - -The code is distributed under the BSD 2-clause license. Contributors making pull -requests must agree that they are able and willing to put their contributions -under that license. +Welcome to Pygments +=================== + +This is the source of Pygments. It is a **generic syntax highlighter** written +in Python that supports over 300 languages and text formats, for use in code +hosting, forums, wikis or other applications that need to prettify source code. + +Installing +---------- + +... works as usual, use ``pip install Pygments`` to get published versions, +or ``python setup.py install`` to install from a checkout. + +Documentation +------------- + +... can be found online at http://pygments.org/ or created with Sphinx by :: + + cd doc + make html + +Development +----------- + +... takes place on `GitHub <https://github.com/pygments/pygments>`_, where the +Git repository, tickets and pull requests can be viewed. + +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 + +The authors +----------- + +Pygments is maintained by **Georg Brandl**, e-mail address *georg*\ *@*\ *python.org* +and **Matthäus Chajdas**. + +Many lexers and fixes have been contributed by **Armin Ronacher**, the rest of +the `Pocoo <http://dev.pocoo.org/>`_ team and **Tim Hatch**. + +The code is distributed under the BSD 2-clause license. Contributors making pull +requests must agree that they are able and willing to put their contributions +under that license. diff --git a/contrib/python/Pygments/py2/pygments/__init__.py b/contrib/python/Pygments/py2/pygments/__init__.py index 4b2b62f086..89efc350ee 100644 --- a/contrib/python/Pygments/py2/pygments/__init__.py +++ b/contrib/python/Pygments/py2/pygments/__init__.py @@ -17,10 +17,10 @@ * it is usable as a command-line tool and as a library * ... and it highlights even Brainfuck! - The `Pygments master branch`_ is installable with ``easy_install Pygments==dev``. + The `Pygments master branch`_ is installable with ``easy_install Pygments==dev``. - .. _Pygments master branch: - https://github.com/pygments/pygments/archive/master.zip#egg=Pygments-dev + .. _Pygments master branch: + https://github.com/pygments/pygments/archive/master.zip#egg=Pygments-dev :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. @@ -29,7 +29,7 @@ import sys from pygments.util import StringIO, BytesIO -__version__ = '2.5.2' +__version__ = '2.5.2' __docformat__ = 'restructuredtext' __all__ = ['lex', 'format', 'highlight'] diff --git a/contrib/python/Pygments/py2/pygments/__main__.py b/contrib/python/Pygments/py2/pygments/__main__.py index 6a0376081a..af231b3d63 100644 --- a/contrib/python/Pygments/py2/pygments/__main__.py +++ b/contrib/python/Pygments/py2/pygments/__main__.py @@ -1,18 +1,18 @@ -# -*- coding: utf-8 -*- -""" - pygments.__main__ - ~~~~~~~~~~~~~~~~~ - - Main entry point for ``python -m pygments``. - - :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import sys -import pygments.cmdline - -try: - sys.exit(pygments.cmdline.main(sys.argv)) -except KeyboardInterrupt: - sys.exit(1) +# -*- coding: utf-8 -*- +""" + pygments.__main__ + ~~~~~~~~~~~~~~~~~ + + Main entry point for ``python -m pygments``. + + :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import sys +import pygments.cmdline + +try: + sys.exit(pygments.cmdline.main(sys.argv)) +except KeyboardInterrupt: + sys.exit(1) diff --git a/contrib/python/Pygments/py2/pygments/cmdline.py b/contrib/python/Pygments/py2/pygments/cmdline.py index c45eb69805..34752d66b2 100644 --- a/contrib/python/Pygments/py2/pygments/cmdline.py +++ b/contrib/python/Pygments/py2/pygments/cmdline.py @@ -554,7 +554,7 @@ def main(args=sys.argv): file=sys.stderr) print('Please report the whole traceback to the issue tracker at', file=sys.stderr) - print('<https://github.com/pygments/pygments/issues>.', + print('<https://github.com/pygments/pygments/issues>.', file=sys.stderr) print('*' * 65, file=sys.stderr) print(file=sys.stderr) diff --git a/contrib/python/Pygments/py2/pygments/formatters/__init__.py b/contrib/python/Pygments/py2/pygments/formatters/__init__.py index 329a21c0e4..6f1130a801 100644 --- a/contrib/python/Pygments/py2/pygments/formatters/__init__.py +++ b/contrib/python/Pygments/py2/pygments/formatters/__init__.py @@ -108,8 +108,8 @@ def load_formatter_from_file(filename, formattername="CustomFormatter", # And finally instantiate it with the options return formatter_class(**options) except IOError as err: - raise ClassNotFound('cannot read %s: %s' % (filename, err)) - except ClassNotFound: + raise ClassNotFound('cannot read %s: %s' % (filename, err)) + except ClassNotFound: raise except Exception as err: raise ClassNotFound('error when loading custom formatter: %s' % err) diff --git a/contrib/python/Pygments/py2/pygments/formatters/html.py b/contrib/python/Pygments/py2/pygments/formatters/html.py index 9c8bff0547..042f04cfb1 100644 --- a/contrib/python/Pygments/py2/pygments/formatters/html.py +++ b/contrib/python/Pygments/py2/pygments/formatters/html.py @@ -435,7 +435,7 @@ class HtmlFormatter(Formatter): self.linenostep = abs(get_int_opt(options, 'linenostep', 1)) self.linenospecial = abs(get_int_opt(options, 'linenospecial', 0)) self.nobackground = get_bool_opt(options, 'nobackground', False) - self.lineseparator = options.get('lineseparator', u'\n') + self.lineseparator = options.get('lineseparator', u'\n') self.lineanchors = options.get('lineanchors', '') self.linespans = options.get('linespans', '') self.anchorlinenos = options.get('anchorlinenos', False) diff --git a/contrib/python/Pygments/py2/pygments/formatters/img.py b/contrib/python/Pygments/py2/pygments/formatters/img.py index d1737a7a74..6bb3364458 100644 --- a/contrib/python/Pygments/py2/pygments/formatters/img.py +++ b/contrib/python/Pygments/py2/pygments/formatters/img.py @@ -46,9 +46,9 @@ STYLES = { } # A sane default for modern systems -DEFAULT_FONT_NAME_NIX = 'DejaVu Sans Mono' +DEFAULT_FONT_NAME_NIX = 'DejaVu Sans Mono' DEFAULT_FONT_NAME_WIN = 'Courier New' -DEFAULT_FONT_NAME_MAC = 'Menlo' +DEFAULT_FONT_NAME_MAC = 'Menlo' class PilNotAvailable(ImportError): @@ -125,8 +125,8 @@ class FontManager(object): for font_dir in (os.path.join(os.getenv("HOME"), 'Library/Fonts/'), '/Library/Fonts/', '/System/Library/Fonts/'): font_map.update( - (os.path.splitext(f)[0].lower(), os.path.join(font_dir, f)) - for f in os.listdir(font_dir) if f.lower().endswith('ttf')) + (os.path.splitext(f)[0].lower(), os.path.join(font_dir, f)) + for f in os.listdir(font_dir) if f.lower().endswith('ttf')) for name in STYLES['NORMAL']: path = self._get_mac_font_path(font_map, self.font_name, name) @@ -237,8 +237,8 @@ class ImageFormatter(Formatter): bold and italic fonts will be generated. This really should be a monospace font to look sane. - Default: "Courier New" on Windows, "Menlo" on Mac OS, and - "DejaVu Sans Mono" on \\*nix + Default: "Courier New" on Windows, "Menlo" on Mac OS, and + "DejaVu Sans Mono" on \\*nix `font_size` The font size in points to be used. @@ -522,8 +522,8 @@ class ImageFormatter(Formatter): rectw = self.image_pad + self.line_number_width - self.line_number_pad draw.rectangle([(0, 0), (rectw, recth)], fill=self.line_number_bg) - if self.line_number_separator: - draw.line([(rectw, 0), (rectw, recth)], fill=self.line_number_fg) + if self.line_number_separator: + draw.line([(rectw, 0), (rectw, recth)], fill=self.line_number_fg) del draw def format(self, tokensource, outfile): diff --git a/contrib/python/Pygments/py2/pygments/formatters/other.py b/contrib/python/Pygments/py2/pygments/formatters/other.py index f3fe919a50..c09eff0cb4 100644 --- a/contrib/python/Pygments/py2/pygments/formatters/other.py +++ b/contrib/python/Pygments/py2/pygments/formatters/other.py @@ -10,7 +10,7 @@ """ from pygments.formatter import Formatter -from pygments.util import get_choice_opt +from pygments.util import get_choice_opt from pygments.token import Token from pygments.console import colorize @@ -87,17 +87,17 @@ class RawTokenFormatter(Formatter): if self.compress == 'gz': import gzip outfile = gzip.GzipFile('', 'wb', 9, outfile) - + def write(text): outfile.write(text.encode()) flush = outfile.flush elif self.compress == 'bz2': import bz2 compressor = bz2.BZ2Compressor(9) - + def write(text): outfile.write(compressor.compress(text.encode())) - + def flush(): outfile.write(compressor.flush()) outfile.flush() @@ -118,15 +118,15 @@ class RawTokenFormatter(Formatter): write("%s\t%r\n" % (ttype, value)) flush() - + TESTCASE_BEFORE = u'''\ - def testNeedsName(lexer): + def testNeedsName(lexer): fragment = %r tokens = [ ''' TESTCASE_AFTER = u'''\ ] - assert list(lexer.get_tokens(fragment)) == tokens + assert list(lexer.get_tokens(fragment)) == tokens ''' diff --git a/contrib/python/Pygments/py2/pygments/formatters/rtf.py b/contrib/python/Pygments/py2/pygments/formatters/rtf.py index b980b19281..1246db2a73 100644 --- a/contrib/python/Pygments/py2/pygments/formatters/rtf.py +++ b/contrib/python/Pygments/py2/pygments/formatters/rtf.py @@ -35,7 +35,7 @@ class RtfFormatter(Formatter): ``'default'``). `fontface` - The used font family, for example ``Bitstream Vera Sans``. Defaults to + The used font family, for example ``Bitstream Vera Sans``. Defaults to some generic font which is supposed to have fixed width. `fontsize` @@ -70,7 +70,7 @@ class RtfFormatter(Formatter): .replace(u'}', u'\\}') def _escape_text(self, text): - # empty strings, should give a small performance improvement + # empty strings, should give a small performance improvement if not text: return u'' diff --git a/contrib/python/Pygments/py2/pygments/lexer.py b/contrib/python/Pygments/py2/pygments/lexer.py index 5d717d3f88..56a7e1e8e3 100644 --- a/contrib/python/Pygments/py2/pygments/lexer.py +++ b/contrib/python/Pygments/py2/pygments/lexer.py @@ -469,7 +469,7 @@ class RegexLexerMeta(LexerMeta): def _process_state(cls, unprocessed, processed, state): """Preprocess a single state definition.""" - assert type(state) is str, "wrong state name %r" % state + assert type(state) is str, "wrong state name %r" % state assert state[0] != '#', "invalid state name %r" % state if state in processed: return processed[state] diff --git a/contrib/python/Pygments/py2/pygments/lexers/__init__.py b/contrib/python/Pygments/py2/pygments/lexers/__init__.py index 3443573b6d..100d807660 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/__init__.py +++ b/contrib/python/Pygments/py2/pygments/lexers/__init__.py @@ -20,13 +20,13 @@ from pygments.modeline import get_filetype_from_buffer from pygments.plugin import find_plugin_lexers from pygments.util import ClassNotFound, itervalues, guess_decode, text_type -COMPAT = { - 'Python3Lexer': 'PythonLexer', - 'Python3TracebackLexer': 'PythonTracebackLexer', -} +COMPAT = { + 'Python3Lexer': 'PythonLexer', + 'Python3TracebackLexer': 'PythonTracebackLexer', +} __all__ = ['get_lexer_by_name', 'get_lexer_for_filename', 'find_lexer_class', - 'guess_lexer', 'load_lexer_from_file'] + list(LEXERS) + list(COMPAT) + 'guess_lexer', 'load_lexer_from_file'] + list(LEXERS) + list(COMPAT) _lexer_cache = {} _pattern_cache = {} @@ -147,8 +147,8 @@ def load_lexer_from_file(filename, lexername="CustomLexer", **options): # And finally instantiate it with the options return lexer_class(**options) except IOError as err: - raise ClassNotFound('cannot read %s: %s' % (filename, err)) - except ClassNotFound: + raise ClassNotFound('cannot read %s: %s' % (filename, err)) + except ClassNotFound: raise except Exception as err: raise ClassNotFound('error when loading custom lexer: %s' % err) @@ -331,8 +331,8 @@ class _automodule(types.ModuleType): cls = _lexer_cache[info[1]] setattr(self, name, cls) return cls - if name in COMPAT: - return getattr(self, COMPAT[name]) + if name in COMPAT: + return getattr(self, COMPAT[name]) raise AttributeError(name) diff --git a/contrib/python/Pygments/py2/pygments/lexers/_asy_builtins.py b/contrib/python/Pygments/py2/pygments/lexers/_asy_builtins.py index 4cd5ac1733..b76c22aba8 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/_asy_builtins.py +++ b/contrib/python/Pygments/py2/pygments/lexers/_asy_builtins.py @@ -14,7 +14,7 @@ :license: BSD, see LICENSE for details. """ -ASYFUNCNAME = { +ASYFUNCNAME = { 'AND', 'Arc', 'ArcArrow', @@ -1038,9 +1038,9 @@ ASYFUNCNAME = { 'ztick', 'ztick3', 'ztrans' -} +} -ASYVARNAME = { +ASYVARNAME = { 'AliceBlue', 'Align', 'Allow', @@ -1642,4 +1642,4 @@ ASYVARNAME = { 'ylabelwidth', 'zerotickfuzz', 'zerowinding' -} +} diff --git a/contrib/python/Pygments/py2/pygments/lexers/_cl_builtins.py b/contrib/python/Pygments/py2/pygments/lexers/_cl_builtins.py index c28985ed43..7722e81f53 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/_cl_builtins.py +++ b/contrib/python/Pygments/py2/pygments/lexers/_cl_builtins.py @@ -9,7 +9,7 @@ :license: BSD, see LICENSE for details. """ -BUILTIN_FUNCTIONS = { # 638 functions +BUILTIN_FUNCTIONS = { # 638 functions '<', '<=', '=', '>', '>=', '-', '/', '/=', '*', '+', '1-', '1+', 'abort', 'abs', 'acons', 'acos', 'acosh', 'add-method', 'adjoin', 'adjustable-array-p', 'adjust-array', 'allocate-instance', @@ -157,17 +157,17 @@ BUILTIN_FUNCTIONS = { # 638 functions 'wild-pathname-p', 'write', 'write-byte', 'write-char', 'write-line', 'write-sequence', 'write-string', 'write-to-string', 'yes-or-no-p', 'y-or-n-p', 'zerop', -} +} -SPECIAL_FORMS = { +SPECIAL_FORMS = { 'block', 'catch', 'declare', 'eval-when', 'flet', 'function', 'go', 'if', 'labels', 'lambda', 'let', 'let*', 'load-time-value', 'locally', 'macrolet', 'multiple-value-call', 'multiple-value-prog1', 'progn', 'progv', 'quote', 'return-from', 'setq', 'symbol-macrolet', 'tagbody', 'the', 'throw', 'unwind-protect', -} +} -MACROS = { +MACROS = { 'and', 'assert', 'call-method', 'case', 'ccase', 'check-type', 'cond', 'ctypecase', 'decf', 'declaim', 'defclass', 'defconstant', 'defgeneric', 'define-compiler-macro', 'define-condition', 'define-method-combination', @@ -188,19 +188,19 @@ MACROS = { 'with-input-from-string', 'with-open-file', 'with-open-stream', 'with-output-to-string', 'with-package-iterator', 'with-simple-restart', 'with-slots', 'with-standard-io-syntax', -} +} -LAMBDA_LIST_KEYWORDS = { +LAMBDA_LIST_KEYWORDS = { '&allow-other-keys', '&aux', '&body', '&environment', '&key', '&optional', '&rest', '&whole', -} +} -DECLARATIONS = { +DECLARATIONS = { 'dynamic-extent', 'ignore', 'optimize', 'ftype', 'inline', 'special', 'ignorable', 'notinline', 'type', -} +} -BUILTIN_TYPES = { +BUILTIN_TYPES = { 'atom', 'boolean', 'base-char', 'base-string', 'bignum', 'bit', 'compiled-function', 'extended-char', 'fixnum', 'keyword', 'nil', 'signed-byte', 'short-float', 'single-float', 'double-float', 'long-float', @@ -217,9 +217,9 @@ BUILTIN_TYPES = { 'simple-type-error', 'simple-warning', 'stream-error', 'storage-condition', 'style-warning', 'type-error', 'unbound-variable', 'unbound-slot', 'undefined-function', 'warning', -} +} -BUILTIN_CLASSES = { +BUILTIN_CLASSES = { 'array', 'broadcast-stream', 'bit-vector', 'built-in-class', 'character', 'class', 'complex', 'concatenated-stream', 'cons', 'echo-stream', 'file-stream', 'float', 'function', 'generic-function', 'hash-table', @@ -229,4 +229,4 @@ BUILTIN_CLASSES = { 'standard-generic-function', 'standard-method', 'standard-object', 'string-stream', 'stream', 'string', 'structure-class', 'structure-object', 'symbol', 'synonym-stream', 't', 'two-way-stream', 'vector', -} +} diff --git a/contrib/python/Pygments/py2/pygments/lexers/_cocoa_builtins.py b/contrib/python/Pygments/py2/pygments/lexers/_cocoa_builtins.py index 39cd6f75be..2cf4443851 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/_cocoa_builtins.py +++ b/contrib/python/Pygments/py2/pygments/lexers/_cocoa_builtins.py @@ -14,9 +14,9 @@ from __future__ import print_function -COCOA_INTERFACES = {'UITableViewCell', 'HKCorrelationQuery', 'NSURLSessionDataTask', 'PHFetchOptions', 'NSLinguisticTagger', 'NSStream', 'AVAudioUnitDelay', 'GCMotion', 'SKPhysicsWorld', 'NSString', 'CMAttitude', 'AVAudioEnvironmentDistanceAttenuationParameters', 'HKStatisticsCollection', 'SCNPlane', 'CBPeer', 'JSContext', 'SCNTransaction', 'SCNTorus', 'AVAudioUnitEffect', 'UICollectionReusableView', 'MTLSamplerDescriptor', 'AVAssetReaderSampleReferenceOutput', 'AVMutableCompositionTrack', 'GKLeaderboard', 'NSFetchedResultsController', 'SKRange', 'MKTileOverlayRenderer', 'MIDINetworkSession', 'UIVisualEffectView', 'CIWarpKernel', 'PKObject', 'MKRoute', 'MPVolumeView', 'UIPrintInfo', 'SCNText', 'ADClient', 'PKPayment', 'AVMutableAudioMix', 'GLKEffectPropertyLight', 'WKScriptMessage', 'AVMIDIPlayer', 'PHCollectionListChangeRequest', 'UICollectionViewLayout', 'NSMutableCharacterSet', 'SKPaymentTransaction', 'NEOnDemandRuleConnect', 'NSShadow', 'SCNView', 'NSURLSessionConfiguration', 'MTLVertexAttributeDescriptor', 'CBCharacteristic', 'HKQuantityType', 'CKLocationSortDescriptor', 'NEVPNIKEv2SecurityAssociationParameters', 'CMStepCounter', 'NSNetService', 'AVAssetWriterInputMetadataAdaptor', 'UICollectionView', 'UIViewPrintFormatter', 'SCNLevelOfDetail', 'CAShapeLayer', 'MCPeerID', 'MPRatingCommand', 'WKNavigation', 'NSDictionary', 'NSFileVersion', 'CMGyroData', 'AVAudioUnitDistortion', 'CKFetchRecordsOperation', 'SKPhysicsJointSpring', 'SCNHitTestResult', 'AVAudioTime', 'CIFilter', 'UIView', 'SCNConstraint', 'CAPropertyAnimation', 'MKMapItem', 'MPRemoteCommandCenter', 'PKPaymentSummaryItem', 'UICollectionViewFlowLayoutInvalidationContext', 'UIInputViewController', 'PKPass', 'SCNPhysicsBehavior', 'MTLRenderPassColorAttachmentDescriptor', 'MKPolygonRenderer', 'CKNotification', 'JSValue', 'PHCollectionList', 'CLGeocoder', 'NSByteCountFormatter', 'AVCaptureScreenInput', 'MPFeedbackCommand', 'CAAnimation', 'MKOverlayPathView', 'UIActionSheet', 'UIMotionEffectGroup', 'NSLengthFormatter', 'UIBarItem', 'SKProduct', 'AVAssetExportSession', 'NSKeyedUnarchiver', 'NSMutableSet', 'SCNPyramid', 'PHAssetCollection', 'MKMapView', 'HMHomeManager', 'CATransition', 'MTLCompileOptions', 'UIVibrancyEffect', 'CLCircularRegion', 'MKTileOverlay', 'SCNShape', 'ACAccountCredential', 'SKPhysicsJointLimit', 'MKMapSnapshotter', 'AVMediaSelectionGroup', 'NSIndexSet', 'CBPeripheralManager', 'CKRecordZone', 'AVAudioRecorder', 'NSURL', 'CBCentral', 'NSNumber', 'AVAudioOutputNode', 'MTLVertexAttributeDescriptorArray', 'MKETAResponse', 'SKTransition', 'SSReadingList', 'HKSourceQuery', 'UITableViewRowAction', 'UITableView', 'SCNParticlePropertyController', 'AVCaptureStillImageOutput', 'GCController', 'AVAudioPlayerNode', 'AVAudioSessionPortDescription', 'NSHTTPURLResponse', 'NEOnDemandRuleEvaluateConnection', 'SKEffectNode', 'HKQuantity', 'GCControllerElement', 'AVPlayerItemAccessLogEvent', 'SCNBox', 'NSExtensionContext', 'MKOverlayRenderer', 'SCNPhysicsVehicle', 'NSDecimalNumber', 'EKReminder', 'MKPolylineView', 'CKQuery', 'AVAudioMixerNode', 'GKAchievementDescription', 'EKParticipant', 'NSBlockOperation', 'UIActivityItemProvider', 'CLLocation', 'NSBatchUpdateRequest', 'PHContentEditingOutput', 'PHObjectChangeDetails', 'HKWorkoutType', 'MPMoviePlayerController', 'AVAudioFormat', 'HMTrigger', 'MTLRenderPassDepthAttachmentDescriptor', 'SCNRenderer', 'GKScore', 'UISplitViewController', 'HKSource', 'NSURLConnection', 'ABUnknownPersonViewController', 'SCNTechnique', 'UIMenuController', 'NSEvent', 'SKTextureAtlas', 'NSKeyedArchiver', 'GKLeaderboardSet', 'NSSimpleCString', 'AVAudioPCMBuffer', 'CBATTRequest', 'GKMatchRequest', 'AVMetadataObject', 'SKProductsRequest', 'UIAlertView', 'NSIncrementalStore', 'MFMailComposeViewController', 'SCNFloor', 'NSSortDescriptor', 'CKFetchNotificationChangesOperation', 'MPMovieAccessLog', 'NSManagedObjectContext', 'AVAudioUnitGenerator', 'WKBackForwardList', 'SKMutableTexture', 'AVCaptureAudioDataOutput', 'ACAccount', 'AVMetadataItem', 'MPRatingCommandEvent', 'AVCaptureDeviceInputSource', 'CLLocationManager', 'MPRemoteCommand', 'AVCaptureSession', 'UIStepper', 'UIRefreshControl', 'NEEvaluateConnectionRule', 'CKModifyRecordsOperation', 'UICollectionViewTransitionLayout', 'CBCentralManager', 'NSPurgeableData', 'PKShippingMethod', 'SLComposeViewController', 'NSHashTable', 'MKUserTrackingBarButtonItem', 'UILexiconEntry', 'CMMotionActivity', 'SKAction', 'SKShader', 'AVPlayerItemOutput', 'MTLRenderPassAttachmentDescriptor', 'UIDocumentInteractionController', 'UIDynamicItemBehavior', 'NSMutableDictionary', 'UILabel', 'AVCaptureInputPort', 'NSExpression', 'CAInterAppAudioTransportView', 'SKMutablePayment', 'UIImage', 'PHCachingImageManager', 'SCNTransformConstraint', 'HKCorrelationType', 'UIColor', 'SCNGeometrySource', 'AVCaptureAutoExposureBracketedStillImageSettings', 'UIPopoverBackgroundView', 'UIToolbar', 'NSNotificationCenter', 'UICollectionViewLayoutAttributes', 'AVAssetReaderOutputMetadataAdaptor', 'NSEntityMigrationPolicy', 'HMUser', 'NSLocale', 'NSURLSession', 'SCNCamera', 'NSTimeZone', 'UIManagedDocument', 'AVMutableVideoCompositionLayerInstruction', 'AVAssetTrackGroup', 'NSInvocationOperation', 'ALAssetRepresentation', 'AVQueuePlayer', 'HMServiceGroup', 'UIPasteboard', 'PHContentEditingInput', 'NSLayoutManager', 'EKCalendarChooser', 'EKObject', 'CATiledLayer', 'GLKReflectionMapEffect', 'NSManagedObjectID', 'NSEnergyFormatter', 'SLRequest', 'HMCharacteristic', 'AVPlayerLayer', 'MTLRenderPassDescriptor', 'SKPayment', 'NSPointerArray', 'AVAudioMix', 'SCNLight', 'MCAdvertiserAssistant', 'MKMapSnapshotOptions', 'HKCategorySample', 'AVAudioEnvironmentReverbParameters', 'SCNMorpher', 'AVTimedMetadataGroup', 'CBMutableCharacteristic', 'NSFetchRequest', 'UIDevice', 'NSManagedObject', 'NKAssetDownload', 'AVOutputSettingsAssistant', 'SKPhysicsJointPin', 'UITabBar', 'UITextInputMode', 'NSFetchRequestExpression', 'HMActionSet', 'CTSubscriber', 'PHAssetChangeRequest', 'NSPersistentStoreRequest', 'UITabBarController', 'HKQuantitySample', 'AVPlayerItem', 'AVSynchronizedLayer', 'MKDirectionsRequest', 'NSMetadataItem', 'UIPresentationController', 'UINavigationItem', 'PHFetchResultChangeDetails', 'PHImageManager', 'AVCaptureManualExposureBracketedStillImageSettings', 'UIStoryboardPopoverSegue', 'SCNLookAtConstraint', 'UIGravityBehavior', 'UIWindow', 'CBMutableDescriptor', 'NEOnDemandRuleDisconnect', 'UIBezierPath', 'UINavigationController', 'ABPeoplePickerNavigationController', 'EKSource', 'AVAssetWriterInput', 'AVPlayerItemTrack', 'GLKEffectPropertyTexture', 'NSHTTPCookie', 'NSURLResponse', 'SKPaymentQueue', 'NSAssertionHandler', 'MKReverseGeocoder', 'GCControllerAxisInput', 'NSArray', 'NSOrthography', 'NSURLSessionUploadTask', 'NSCharacterSet', 'AVMutableVideoCompositionInstruction', 'AVAssetReaderOutput', 'EAGLContext', 'WKFrameInfo', 'CMPedometer', 'MyClass', 'CKModifyBadgeOperation', 'AVCaptureAudioFileOutput', 'SKEmitterNode', 'NSMachPort', 'AVVideoCompositionCoreAnimationTool', 'PHCollection', 'SCNPhysicsWorld', 'NSURLRequest', 'CMAccelerometerData', 'NSNetServiceBrowser', 'CLFloor', 'AVAsynchronousVideoCompositionRequest', 'SCNGeometry', 'SCNIKConstraint', 'CIKernel', 'CAGradientLayer', 'HKCharacteristicType', 'NSFormatter', 'SCNAction', 'CATransaction', 'CBUUID', 'UIStoryboard', 'MPMediaLibrary', 'UITapGestureRecognizer', 'MPMediaItemArtwork', 'NSURLSessionTask', 'AVAudioUnit', 'MCBrowserViewController', 'UIFontDescriptor', 'NSRelationshipDescription', 'HKSample', 'WKWebView', 'NSMutableAttributedString', 'NSPersistentStoreAsynchronousResult', 'MPNowPlayingInfoCenter', 'MKLocalSearch', 'EAAccessory', 'HKCorrelation', 'CATextLayer', 'NSNotificationQueue', 'UINib', 'GLKTextureLoader', 'HKObjectType', 'NSValue', 'NSMutableIndexSet', 'SKPhysicsContact', 'NSProgress', 'AVPlayerViewController', 'CAScrollLayer', 'GKSavedGame', 'NSTextCheckingResult', 'PHObjectPlaceholder', 'SKConstraint', 'EKEventEditViewController', 'NSEntityDescription', 'NSURLCredentialStorage', 'UIApplication', 'SKDownload', 'SCNNode', 'MKLocalSearchRequest', 'SKScene', 'UISearchDisplayController', 'NEOnDemandRule', 'MTLRenderPassStencilAttachmentDescriptor', 'CAReplicatorLayer', 'UIPrintPageRenderer', 'EKCalendarItem', 'NSUUID', 'EAAccessoryManager', 'NEOnDemandRuleIgnore', 'SKRegion', 'AVAssetResourceLoader', 'EAWiFiUnconfiguredAccessoryBrowser', 'NSUserActivity', 'CTCall', 'UIPrinterPickerController', 'CIVector', 'UINavigationBar', 'UIPanGestureRecognizer', 'MPMediaQuery', 'ABNewPersonViewController', 'CKRecordZoneID', 'HKAnchoredObjectQuery', 'CKFetchRecordZonesOperation', 'UIStoryboardSegue', 'ACAccountType', 'GKSession', 'SKVideoNode', 'PHChange', 'SKReceiptRefreshRequest', 'GCExtendedGamepadSnapshot', 'MPSeekCommandEvent', 'GCExtendedGamepad', 'CAValueFunction', 'SCNCylinder', 'NSNotification', 'NSBatchUpdateResult', 'PKPushCredentials', 'SCNPhysicsSliderJoint', 'AVCaptureDeviceFormat', 'AVPlayerItemErrorLog', 'NSMapTable', 'NSSet', 'CMMotionManager', 'GKVoiceChatService', 'UIPageControl', 'UILexicon', 'MTLArrayType', 'AVAudioUnitReverb', 'MKGeodesicPolyline', 'AVMutableComposition', 'NSLayoutConstraint', 'UIPrinter', 'NSOrderedSet', 'CBAttribute', 'PKPushPayload', 'NSIncrementalStoreNode', 'EKEventStore', 'MPRemoteCommandEvent', 'UISlider', 'UIBlurEffect', 'CKAsset', 'AVCaptureInput', 'AVAudioEngine', 'MTLVertexDescriptor', 'SKPhysicsBody', 'NSOperation', 'PKPaymentPass', 'UIImageAsset', 'MKMapCamera', 'SKProductsResponse', 'GLKEffectPropertyMaterial', 'AVCaptureDevice', 'CTCallCenter', 'CABTMIDILocalPeripheralViewController', 'NEVPNManager', 'HKQuery', 'SCNPhysicsContact', 'CBMutableService', 'AVSampleBufferDisplayLayer', 'SCNSceneSource', 'SKLightNode', 'CKDiscoveredUserInfo', 'NSMutableArray', 'MTLDepthStencilDescriptor', 'MTLArgument', 'NSMassFormatter', 'CIRectangleFeature', 'PKPushRegistry', 'NEVPNConnection', 'MCNearbyServiceBrowser', 'NSOperationQueue', 'MKPolylineRenderer', 'HKWorkout', 'NSValueTransformer', 'UICollectionViewFlowLayout', 'MPChangePlaybackRateCommandEvent', 'NSEntityMapping', 'SKTexture', 'NSMergePolicy', 'UITextInputStringTokenizer', 'NSRecursiveLock', 'AVAsset', 'NSUndoManager', 'AVAudioUnitSampler', 'NSItemProvider', 'SKUniform', 'MPMediaPickerController', 'CKOperation', 'MTLRenderPipelineDescriptor', 'EAWiFiUnconfiguredAccessory', 'NSFileCoordinator', 'SKRequest', 'NSFileHandle', 'NSConditionLock', 'UISegmentedControl', 'NSManagedObjectModel', 'UITabBarItem', 'SCNCone', 'MPMediaItem', 'SCNMaterial', 'EKRecurrenceRule', 'UIEvent', 'UITouch', 'UIPrintInteractionController', 'CMDeviceMotion', 'NEVPNProtocol', 'NSCompoundPredicate', 'HKHealthStore', 'MKMultiPoint', 'HKSampleType', 'UIPrintFormatter', 'AVAudioUnitEQFilterParameters', 'SKView', 'NSConstantString', 'UIPopoverController', 'CKDatabase', 'AVMetadataFaceObject', 'UIAccelerometer', 'EKEventViewController', 'CMAltitudeData', 'MTLStencilDescriptor', 'UISwipeGestureRecognizer', 'NSPort', 'MKCircleRenderer', 'AVCompositionTrack', 'NSAsynchronousFetchRequest', 'NSUbiquitousKeyValueStore', 'NSMetadataQueryResultGroup', 'AVAssetResourceLoadingDataRequest', 'UITableViewHeaderFooterView', 'CKNotificationID', 'AVAudioSession', 'HKUnit', 'NSNull', 'NSPersistentStoreResult', 'MKCircleView', 'AVAudioChannelLayout', 'NEVPNProtocolIKEv2', 'WKProcessPool', 'UIAttachmentBehavior', 'CLBeacon', 'NSInputStream', 'NSURLCache', 'GKPlayer', 'NSMappingModel', 'CIQRCodeFeature', 'AVMutableVideoComposition', 'PHFetchResult', 'NSAttributeDescription', 'AVPlayer', 'MKAnnotationView', 'PKPaymentRequest', 'NSTimer', 'CBDescriptor', 'MKOverlayView', 'AVAudioUnitTimePitch', 'NSSaveChangesRequest', 'UIReferenceLibraryViewController', 'SKPhysicsJointFixed', 'UILocalizedIndexedCollation', 'UIInterpolatingMotionEffect', 'UIDocumentPickerViewController', 'AVAssetWriter', 'NSBundle', 'SKStoreProductViewController', 'GLKViewController', 'NSMetadataQueryAttributeValueTuple', 'GKTurnBasedMatch', 'AVAudioFile', 'UIActivity', 'NSPipe', 'MKShape', 'NSMergeConflict', 'CIImage', 'HKObject', 'UIRotationGestureRecognizer', 'AVPlayerItemLegibleOutput', 'AVAssetImageGenerator', 'GCControllerButtonInput', 'CKMarkNotificationsReadOperation', 'CKSubscription', 'MPTimedMetadata', 'NKIssue', 'UIScreenMode', 'HMAccessoryBrowser', 'GKTurnBasedEventHandler', 'UIWebView', 'MKPolyline', 'JSVirtualMachine', 'AVAssetReader', 'NSAttributedString', 'GKMatchmakerViewController', 'NSCountedSet', 'UIButton', 'WKNavigationResponse', 'GKLocalPlayer', 'MPMovieErrorLog', 'AVSpeechUtterance', 'HKStatistics', 'UILocalNotification', 'HKBiologicalSexObject', 'AVURLAsset', 'CBPeripheral', 'NSDateComponentsFormatter', 'SKSpriteNode', 'UIAccessibilityElement', 'AVAssetWriterInputGroup', 'HMZone', 'AVAssetReaderAudioMixOutput', 'NSEnumerator', 'UIDocument', 'MKLocalSearchResponse', 'UISimpleTextPrintFormatter', 'PHPhotoLibrary', 'CBService', 'UIDocumentMenuViewController', 'MCSession', 'QLPreviewController', 'CAMediaTimingFunction', 'UITextPosition', 'ASIdentifierManager', 'AVAssetResourceLoadingRequest', 'SLComposeServiceViewController', 'UIPinchGestureRecognizer', 'PHObject', 'NSExtensionItem', 'HKSampleQuery', 'MTLRenderPipelineColorAttachmentDescriptorArray', 'MKRouteStep', 'SCNCapsule', 'NSMetadataQuery', 'AVAssetResourceLoadingContentInformationRequest', 'UITraitCollection', 'CTCarrier', 'NSFileSecurity', 'UIAcceleration', 'UIMotionEffect', 'MTLRenderPipelineReflection', 'CLHeading', 'CLVisit', 'MKDirectionsResponse', 'HMAccessory', 'MTLStructType', 'UITextView', 'CMMagnetometerData', 'UICollisionBehavior', 'UIProgressView', 'CKServerChangeToken', 'UISearchBar', 'MKPlacemark', 'AVCaptureConnection', 'NSPropertyMapping', 'ALAssetsFilter', 'SK3DNode', 'AVPlayerItemErrorLogEvent', 'NSJSONSerialization', 'AVAssetReaderVideoCompositionOutput', 'ABPersonViewController', 'CIDetector', 'GKTurnBasedMatchmakerViewController', 'MPMediaItemCollection', 'SCNSphere', 'NSCondition', 'NSURLCredential', 'MIDINetworkConnection', 'NSFileProviderExtension', 'NSDecimalNumberHandler', 'NSAtomicStoreCacheNode', 'NSAtomicStore', 'EKAlarm', 'CKNotificationInfo', 'AVAudioUnitEQ', 'UIPercentDrivenInteractiveTransition', 'MKPolygon', 'AVAssetTrackSegment', 'MTLVertexAttribute', 'NSExpressionDescription', 'HKStatisticsCollectionQuery', 'NSURLAuthenticationChallenge', 'NSDirectoryEnumerator', 'MKDistanceFormatter', 'UIAlertAction', 'NSPropertyListSerialization', 'GKPeerPickerController', 'UIUserNotificationSettings', 'UITableViewController', 'GKNotificationBanner', 'MKPointAnnotation', 'MTLRenderPassColorAttachmentDescriptorArray', 'NSCache', 'SKPhysicsJoint', 'NSXMLParser', 'UIViewController', 'PKPaymentToken', 'MFMessageComposeViewController', 'AVAudioInputNode', 'NSDataDetector', 'CABTMIDICentralViewController', 'AVAudioUnitMIDIInstrument', 'AVCaptureVideoPreviewLayer', 'AVAssetWriterInputPassDescription', 'MPChangePlaybackRateCommand', 'NSURLComponents', 'CAMetalLayer', 'UISnapBehavior', 'AVMetadataMachineReadableCodeObject', 'CKDiscoverUserInfosOperation', 'NSTextAttachment', 'NSException', 'UIMenuItem', 'CMMotionActivityManager', 'SCNGeometryElement', 'NCWidgetController', 'CAEmitterLayer', 'MKUserLocation', 'UIImagePickerController', 'CIFeature', 'AVCaptureDeviceInput', 'ALAsset', 'NSURLSessionDownloadTask', 'SCNPhysicsHingeJoint', 'MPMoviePlayerViewController', 'NSMutableOrderedSet', 'SCNMaterialProperty', 'UIFont', 'AVCaptureVideoDataOutput', 'NSCachedURLResponse', 'ALAssetsLibrary', 'NSInvocation', 'UILongPressGestureRecognizer', 'NSTextStorage', 'WKWebViewConfiguration', 'CIFaceFeature', 'MKMapSnapshot', 'GLKEffectPropertyFog', 'AVComposition', 'CKDiscoverAllContactsOperation', 'AVAudioMixInputParameters', 'CAEmitterBehavior', 'PKPassLibrary', 'UIMutableUserNotificationCategory', 'NSLock', 'NEVPNProtocolIPSec', 'ADBannerView', 'UIDocumentPickerExtensionViewController', 'UIActivityIndicatorView', 'AVPlayerMediaSelectionCriteria', 'CALayer', 'UIAccessibilityCustomAction', 'UIBarButtonItem', 'AVAudioSessionRouteDescription', 'CLBeaconRegion', 'HKBloodTypeObject', 'MTLVertexBufferLayoutDescriptorArray', 'CABasicAnimation', 'AVVideoCompositionInstruction', 'AVMutableTimedMetadataGroup', 'EKRecurrenceEnd', 'NSTextContainer', 'TWTweetComposeViewController', 'PKPaymentAuthorizationViewController', 'UIScrollView', 'WKNavigationAction', 'AVPlayerItemMetadataOutput', 'EKRecurrenceDayOfWeek', 'NSNumberFormatter', 'MTLComputePipelineReflection', 'UIScreen', 'CLRegion', 'NSProcessInfo', 'GLKTextureInfo', 'SCNSkinner', 'AVCaptureMetadataOutput', 'SCNAnimationEvent', 'NSTextTab', 'JSManagedValue', 'NSDate', 'UITextChecker', 'WKBackForwardListItem', 'NSData', 'NSParagraphStyle', 'AVMutableMetadataItem', 'EKCalendar', 'HKWorkoutEvent', 'NSMutableURLRequest', 'UIVideoEditorController', 'HMTimerTrigger', 'AVAudioUnitVarispeed', 'UIDynamicAnimator', 'AVCompositionTrackSegment', 'GCGamepadSnapshot', 'MPMediaEntity', 'GLKSkyboxEffect', 'UISwitch', 'EKStructuredLocation', 'UIGestureRecognizer', 'NSProxy', 'GLKBaseEffect', 'UIPushBehavior', 'GKScoreChallenge', 'NSCoder', 'MPMediaPlaylist', 'NSDateComponents', 'WKUserScript', 'EKEvent', 'NSDateFormatter', 'NSAsynchronousFetchResult', 'AVAssetWriterInputPixelBufferAdaptor', 'UIVisualEffect', 'UICollectionViewCell', 'UITextField', 'CLPlacemark', 'MPPlayableContentManager', 'AVCaptureOutput', 'HMCharacteristicWriteAction', 'CKModifySubscriptionsOperation', 'NSPropertyDescription', 'GCGamepad', 'UIMarkupTextPrintFormatter', 'SCNTube', 'NSPersistentStoreCoordinator', 'AVAudioEnvironmentNode', 'GKMatchmaker', 'CIContext', 'NSThread', 'SLComposeSheetConfigurationItem', 'SKPhysicsJointSliding', 'NSPredicate', 'GKVoiceChat', 'SKCropNode', 'AVCaptureAudioPreviewOutput', 'NSStringDrawingContext', 'GKGameCenterViewController', 'UIPrintPaper', 'SCNPhysicsBallSocketJoint', 'UICollectionViewLayoutInvalidationContext', 'GLKEffectPropertyTransform', 'AVAudioIONode', 'UIDatePicker', 'MKDirections', 'ALAssetsGroup', 'CKRecordZoneNotification', 'SCNScene', 'MPMovieAccessLogEvent', 'CKFetchSubscriptionsOperation', 'CAEmitterCell', 'AVAudioUnitTimeEffect', 'HMCharacteristicMetadata', 'MKPinAnnotationView', 'UIPickerView', 'UIImageView', 'UIUserNotificationCategory', 'SCNPhysicsVehicleWheel', 'HKCategoryType', 'MPMediaQuerySection', 'GKFriendRequestComposeViewController', 'NSError', 'MTLRenderPipelineColorAttachmentDescriptor', 'SCNPhysicsShape', 'UISearchController', 'SCNPhysicsBody', 'CTSubscriberInfo', 'AVPlayerItemAccessLog', 'MPMediaPropertyPredicate', 'CMLogItem', 'NSAutoreleasePool', 'NSSocketPort', 'AVAssetReaderTrackOutput', 'SKNode', 'UIMutableUserNotificationAction', 'SCNProgram', 'AVSpeechSynthesisVoice', 'CMAltimeter', 'AVCaptureAudioChannel', 'GKTurnBasedExchangeReply', 'AVVideoCompositionLayerInstruction', 'AVSpeechSynthesizer', 'GKChallengeEventHandler', 'AVCaptureFileOutput', 'UIControl', 'SCNPhysicsField', 'CKReference', 'LAContext', 'CKRecordID', 'ADInterstitialAd', 'AVAudioSessionDataSourceDescription', 'AVAudioBuffer', 'CIColorKernel', 'GCControllerDirectionPad', 'NSFileManager', 'AVMutableAudioMixInputParameters', 'UIScreenEdgePanGestureRecognizer', 'CAKeyframeAnimation', 'CKQueryNotification', 'PHAdjustmentData', 'EASession', 'AVAssetResourceRenewalRequest', 'UIInputView', 'NSFileWrapper', 'UIResponder', 'NSPointerFunctions', 'UIKeyCommand', 'NSHTTPCookieStorage', 'AVMediaSelectionOption', 'NSRunLoop', 'NSFileAccessIntent', 'CAAnimationGroup', 'MKCircle', 'UIAlertController', 'NSMigrationManager', 'NSDateIntervalFormatter', 'UICollectionViewUpdateItem', 'CKDatabaseOperation', 'PHImageRequestOptions', 'SKReachConstraints', 'CKRecord', 'CAInterAppAudioSwitcherView', 'WKWindowFeatures', 'GKInvite', 'NSMutableData', 'PHAssetCollectionChangeRequest', 'NSMutableParagraphStyle', 'UIDynamicBehavior', 'GLKEffectProperty', 'CKFetchRecordChangesOperation', 'SKShapeNode', 'MPMovieErrorLogEvent', 'MKPolygonView', 'MPContentItem', 'HMAction', 'NSScanner', 'GKAchievementChallenge', 'AVAudioPlayer', 'CKContainer', 'AVVideoComposition', 'NKLibrary', 'NSPersistentStore', 'AVCaptureMovieFileOutput', 'HMRoom', 'GKChallenge', 'UITextRange', 'NSURLProtectionSpace', 'ACAccountStore', 'MPSkipIntervalCommand', 'NSComparisonPredicate', 'HMHome', 'PHVideoRequestOptions', 'NSOutputStream', 'MPSkipIntervalCommandEvent', 'PKAddPassesViewController', 'UITextSelectionRect', 'CTTelephonyNetworkInfo', 'AVTextStyleRule', 'NSFetchedPropertyDescription', 'UIPageViewController', 'CATransformLayer', 'UICollectionViewController', 'AVAudioNode', 'MCNearbyServiceAdvertiser', 'NSObject', 'PHAsset', 'GKLeaderboardViewController', 'CKQueryCursor', 'MPMusicPlayerController', 'MKOverlayPathRenderer', 'CMPedometerData', 'HMService', 'SKFieldNode', 'GKAchievement', 'WKUserContentController', 'AVAssetTrack', 'TWRequest', 'SKLabelNode', 'AVCaptureBracketedStillImageSettings', 'MIDINetworkHost', 'MPMediaPredicate', 'AVFrameRateRange', 'MTLTextureDescriptor', 'MTLVertexBufferLayoutDescriptor', 'MPFeedbackCommandEvent', 'UIUserNotificationAction', 'HKStatisticsQuery', 'SCNParticleSystem', 'NSIndexPath', 'AVVideoCompositionRenderContext', 'CADisplayLink', 'HKObserverQuery', 'UIPopoverPresentationController', 'CKQueryOperation', 'CAEAGLLayer', 'NSMutableString', 'NSMessagePort', 'NSURLQueryItem', 'MTLStructMember', 'AVAudioSessionChannelDescription', 'GLKView', 'UIActivityViewController', 'GKAchievementViewController', 'GKTurnBasedParticipant', 'NSURLProtocol', 'NSUserDefaults', 'NSCalendar', 'SKKeyframeSequence', 'AVMetadataItemFilter', 'CKModifyRecordZonesOperation', 'WKPreferences', 'NSMethodSignature', 'NSRegularExpression', 'EAGLSharegroup', 'AVPlayerItemVideoOutput', 'PHContentEditingInputRequestOptions', 'GKMatch', 'CIColor', 'UIDictationPhrase'} -COCOA_PROTOCOLS = {'SKStoreProductViewControllerDelegate', 'AVVideoCompositionInstruction', 'AVAudioSessionDelegate', 'GKMatchDelegate', 'NSFileManagerDelegate', 'UILayoutSupport', 'NSCopying', 'UIPrintInteractionControllerDelegate', 'QLPreviewControllerDataSource', 'SKProductsRequestDelegate', 'NSTextStorageDelegate', 'MCBrowserViewControllerDelegate', 'MTLComputeCommandEncoder', 'SCNSceneExportDelegate', 'UISearchResultsUpdating', 'MFMailComposeViewControllerDelegate', 'MTLBlitCommandEncoder', 'NSDecimalNumberBehaviors', 'PHContentEditingController', 'NSMutableCopying', 'UIActionSheetDelegate', 'UIViewControllerTransitioningDelegate', 'UIAlertViewDelegate', 'AVAudioPlayerDelegate', 'MKReverseGeocoderDelegate', 'NSCoding', 'UITextInputTokenizer', 'GKFriendRequestComposeViewControllerDelegate', 'UIActivityItemSource', 'NSCacheDelegate', 'UIAdaptivePresentationControllerDelegate', 'GKAchievementViewControllerDelegate', 'UIViewControllerTransitionCoordinator', 'EKEventEditViewDelegate', 'NSURLConnectionDelegate', 'UITableViewDelegate', 'GKPeerPickerControllerDelegate', 'UIGuidedAccessRestrictionDelegate', 'AVSpeechSynthesizerDelegate', 'AVAudio3DMixing', 'AVPlayerItemLegibleOutputPushDelegate', 'ADInterstitialAdDelegate', 'HMAccessoryBrowserDelegate', 'AVAssetResourceLoaderDelegate', 'UITabBarControllerDelegate', 'CKRecordValue', 'SKPaymentTransactionObserver', 'AVCaptureAudioDataOutputSampleBufferDelegate', 'UIInputViewAudioFeedback', 'GKChallengeListener', 'SKSceneDelegate', 'UIPickerViewDelegate', 'UIWebViewDelegate', 'UIApplicationDelegate', 'GKInviteEventListener', 'MPMediaPlayback', 'MyClassJavaScriptMethods', 'AVAsynchronousKeyValueLoading', 'QLPreviewItem', 'SCNBoundingVolume', 'NSPortDelegate', 'UIContentContainer', 'SCNNodeRendererDelegate', 'SKRequestDelegate', 'SKPhysicsContactDelegate', 'HMAccessoryDelegate', 'UIPageViewControllerDataSource', 'SCNSceneRendererDelegate', 'SCNPhysicsContactDelegate', 'MKMapViewDelegate', 'AVPlayerItemOutputPushDelegate', 'UICollectionViewDelegate', 'UIImagePickerControllerDelegate', 'MTLRenderCommandEncoder', 'PKPaymentAuthorizationViewControllerDelegate', 'UIToolbarDelegate', 'WKUIDelegate', 'SCNActionable', 'NSURLConnectionDataDelegate', 'MKOverlay', 'CBCentralManagerDelegate', 'JSExport', 'NSTextLayoutOrientationProvider', 'UIPickerViewDataSource', 'PKPushRegistryDelegate', 'UIViewControllerTransitionCoordinatorContext', 'NSLayoutManagerDelegate', 'MTLLibrary', 'NSFetchedResultsControllerDelegate', 'ABPeoplePickerNavigationControllerDelegate', 'MTLResource', 'NSDiscardableContent', 'UITextFieldDelegate', 'MTLBuffer', 'MTLSamplerState', 'GKGameCenterControllerDelegate', 'MPMediaPickerControllerDelegate', 'UISplitViewControllerDelegate', 'UIAppearance', 'UIPickerViewAccessibilityDelegate', 'UITraitEnvironment', 'UIScrollViewAccessibilityDelegate', 'ADBannerViewDelegate', 'MPPlayableContentDataSource', 'MTLComputePipelineState', 'NSURLSessionDelegate', 'MTLCommandBuffer', 'NSXMLParserDelegate', 'UIViewControllerRestoration', 'UISearchBarDelegate', 'UIBarPositioning', 'CBPeripheralDelegate', 'UISearchDisplayDelegate', 'CAAction', 'PKAddPassesViewControllerDelegate', 'MCNearbyServiceAdvertiserDelegate', 'MTLDepthStencilState', 'GKTurnBasedMatchmakerViewControllerDelegate', 'MPPlayableContentDelegate', 'AVCaptureVideoDataOutputSampleBufferDelegate', 'UIAppearanceContainer', 'UIStateRestoring', 'UITextDocumentProxy', 'MTLDrawable', 'NSURLSessionTaskDelegate', 'NSFilePresenter', 'AVAudioStereoMixing', 'UIViewControllerContextTransitioning', 'UITextInput', 'CBPeripheralManagerDelegate', 'UITextInputDelegate', 'NSFastEnumeration', 'NSURLAuthenticationChallengeSender', 'SCNProgramDelegate', 'AVVideoCompositing', 'SCNAnimatable', 'NSSecureCoding', 'MCAdvertiserAssistantDelegate', 'GKLocalPlayerListener', 'GLKNamedEffect', 'UIPopoverControllerDelegate', 'AVCaptureMetadataOutputObjectsDelegate', 'NSExtensionRequestHandling', 'UITextSelecting', 'UIPrinterPickerControllerDelegate', 'NCWidgetProviding', 'MTLCommandEncoder', 'NSURLProtocolClient', 'MFMessageComposeViewControllerDelegate', 'UIVideoEditorControllerDelegate', 'WKNavigationDelegate', 'GKSavedGameListener', 'UITableViewDataSource', 'MTLFunction', 'EKCalendarChooserDelegate', 'NSUserActivityDelegate', 'UICollisionBehaviorDelegate', 'NSStreamDelegate', 'MCNearbyServiceBrowserDelegate', 'HMHomeDelegate', 'UINavigationControllerDelegate', 'MCSessionDelegate', 'UIDocumentPickerDelegate', 'UIViewControllerInteractiveTransitioning', 'GKTurnBasedEventListener', 'SCNSceneRenderer', 'MTLTexture', 'GLKViewDelegate', 'EAAccessoryDelegate', 'WKScriptMessageHandler', 'PHPhotoLibraryChangeObserver', 'NSKeyedUnarchiverDelegate', 'AVPlayerItemMetadataOutputPushDelegate', 'NSMachPortDelegate', 'SCNShadable', 'UIPopoverBackgroundViewMethods', 'UIDocumentMenuDelegate', 'UIBarPositioningDelegate', 'ABPersonViewControllerDelegate', 'NSNetServiceBrowserDelegate', 'EKEventViewDelegate', 'UIScrollViewDelegate', 'NSURLConnectionDownloadDelegate', 'UIGestureRecognizerDelegate', 'UINavigationBarDelegate', 'AVAudioMixing', 'NSFetchedResultsSectionInfo', 'UIDocumentInteractionControllerDelegate', 'MTLParallelRenderCommandEncoder', 'QLPreviewControllerDelegate', 'UIAccessibilityReadingContent', 'ABUnknownPersonViewControllerDelegate', 'GLKViewControllerDelegate', 'UICollectionViewDelegateFlowLayout', 'UIPopoverPresentationControllerDelegate', 'UIDynamicAnimatorDelegate', 'NSTextAttachmentContainer', 'MKAnnotation', 'UIAccessibilityIdentification', 'UICoordinateSpace', 'ABNewPersonViewControllerDelegate', 'MTLDevice', 'CAMediaTiming', 'AVCaptureFileOutputRecordingDelegate', 'HMHomeManagerDelegate', 'UITextViewDelegate', 'UITabBarDelegate', 'GKLeaderboardViewControllerDelegate', 'UISearchControllerDelegate', 'EAWiFiUnconfiguredAccessoryBrowserDelegate', 'UITextInputTraits', 'MTLRenderPipelineState', 'GKVoiceChatClient', 'UIKeyInput', 'UICollectionViewDataSource', 'SCNTechniqueSupport', 'NSLocking', 'AVCaptureFileOutputDelegate', 'GKChallengeEventHandlerDelegate', 'UIObjectRestoration', 'CIFilterConstructor', 'AVPlayerItemOutputPullDelegate', 'EAGLDrawable', 'AVVideoCompositionValidationHandling', 'UIViewControllerAnimatedTransitioning', 'NSURLSessionDownloadDelegate', 'UIAccelerometerDelegate', 'UIPageViewControllerDelegate', 'MTLCommandQueue', 'UIDataSourceModelAssociation', 'AVAudioRecorderDelegate', 'GKSessionDelegate', 'NSKeyedArchiverDelegate', 'CAMetalDrawable', 'UIDynamicItem', 'CLLocationManagerDelegate', 'NSMetadataQueryDelegate', 'NSNetServiceDelegate', 'GKMatchmakerViewControllerDelegate', 'NSURLSessionDataDelegate'} -COCOA_PRIMITIVES = {'ROTAHeader', '__CFBundle', 'MortSubtable', 'AudioFilePacketTableInfo', 'CGPDFOperatorTable', 'KerxStateEntry', 'ExtendedTempoEvent', 'CTParagraphStyleSetting', 'OpaqueMIDIPort', '_GLKMatrix3', '_GLKMatrix2', '_GLKMatrix4', 'ExtendedControlEvent', 'CAFAudioDescription', 'OpaqueCMBlockBuffer', 'CGTextDrawingMode', 'EKErrorCode', 'gss_buffer_desc_struct', 'AudioUnitParameterInfo', '__SCPreferences', '__CTFrame', '__CTLine', 'AudioFile_SMPTE_Time', 'gss_krb5_lucid_context_v1', 'OpaqueJSValue', 'TrakTableEntry', 'AudioFramePacketTranslation', 'CGImageSource', 'OpaqueJSPropertyNameAccumulator', 'JustPCGlyphRepeatAddAction', '__CFBinaryHeap', 'OpaqueMIDIThruConnection', 'opaqueCMBufferQueue', 'OpaqueMusicSequence', 'MortRearrangementSubtable', 'MixerDistanceParams', 'MorxSubtable', 'MIDIObjectPropertyChangeNotification', 'SFNTLookupSegment', 'CGImageMetadataErrors', 'CGPath', 'OpaqueMIDIEndpoint', 'AudioComponentPlugInInterface', 'gss_ctx_id_t_desc_struct', 'sfntFontFeatureSetting', 'OpaqueJSContextGroup', '__SCNetworkConnection', 'AudioUnitParameterValueTranslation', 'CGImageMetadataType', 'CGPattern', 'AudioFileTypeAndFormatID', 'CGContext', 'AUNodeInteraction', 'SFNTLookupTable', 'JustPCDecompositionAction', 'KerxControlPointHeader', 'AudioStreamPacketDescription', 'KernSubtableHeader', '__SecCertificate', 'AUMIDIOutputCallbackStruct', 'MIDIMetaEvent', 'AudioQueueChannelAssignment', 'AnchorPoint', 'JustTable', '__CFNetService', 'CF_BRIDGED_TYPE', 'gss_krb5_lucid_key', 'CGPDFDictionary', 'KerxSubtableHeader', 'CAF_UUID_ChunkHeader', 'gss_krb5_cfx_keydata', 'OpaqueJSClass', 'CGGradient', 'OpaqueMIDISetup', 'JustPostcompTable', '__CTParagraphStyle', 'AudioUnitParameterHistoryInfo', 'OpaqueJSContext', 'CGShading', 'MIDIThruConnectionParams', 'BslnFormat0Part', 'SFNTLookupSingle', '__CFHost', '__SecRandom', '__CTFontDescriptor', '_NSRange', 'sfntDirectory', 'AudioQueueLevelMeterState', 'CAFPositionPeak', 'PropLookupSegment', '__CVOpenGLESTextureCache', 'sfntInstance', '_GLKQuaternion', 'AnkrTable', '__SCNetworkProtocol', 'CAFFileHeader', 'KerxOrderedListHeader', 'CGBlendMode', 'STXEntryOne', 'CAFRegion', 'SFNTLookupTrimmedArrayHeader', 'SCNMatrix4', 'KerxControlPointEntry', 'OpaqueMusicTrack', '_GLKVector4', 'gss_OID_set_desc_struct', 'OpaqueMusicPlayer', '_CFHTTPAuthentication', 'CGAffineTransform', 'CAFMarkerChunk', 'AUHostIdentifier', 'ROTAGlyphEntry', 'BslnTable', 'gss_krb5_lucid_context_version', '_GLKMatrixStack', 'CGImage', 'KernStateEntry', 'SFNTLookupSingleHeader', 'MortLigatureSubtable', 'CAFUMIDChunk', 'SMPTETime', 'CAFDataChunk', 'CGPDFStream', 'AudioFileRegionList', 'STEntryTwo', 'SFNTLookupBinarySearchHeader', 'OpbdTable', '__CTGlyphInfo', 'BslnFormat2Part', 'KerxIndexArrayHeader', 'TrakTable', 'KerxKerningPair', '__CFBitVector', 'KernVersion0SubtableHeader', 'OpaqueAudioComponentInstance', 'AudioChannelLayout', '__CFUUID', 'MIDISysexSendRequest', '__CFNumberFormatter', 'CGImageSourceStatus', 'AudioFileMarkerList', 'AUSamplerBankPresetData', 'CGDataProvider', 'AudioFormatInfo', '__SecIdentity', 'sfntCMapExtendedSubHeader', 'MIDIChannelMessage', 'KernOffsetTable', 'CGColorSpaceModel', 'MFMailComposeErrorCode', 'CGFunction', '__SecTrust', 'AVAudio3DAngularOrientation', 'CGFontPostScriptFormat', 'KernStateHeader', 'AudioUnitCocoaViewInfo', 'CGDataConsumer', 'OpaqueMIDIDevice', 'KernVersion0Header', 'AnchorPointTable', 'CGImageDestination', 'CAFInstrumentChunk', 'AudioUnitMeterClipping', 'MorxChain', '__CTFontCollection', 'STEntryOne', 'STXEntryTwo', 'ExtendedNoteOnEvent', 'CGColorRenderingIntent', 'KerxSimpleArrayHeader', 'MorxTable', '_GLKVector3', '_GLKVector2', 'MortTable', 'CGPDFBox', 'AudioUnitParameterValueFromString', '__CFSocket', 'ALCdevice_struct', 'MIDINoteMessage', 'sfntFeatureHeader', 'CGRect', '__SCNetworkInterface', '__CFTree', 'MusicEventUserData', 'TrakTableData', 'GCQuaternion', 'MortContextualSubtable', '__CTRun', 'AudioUnitFrequencyResponseBin', 'MortChain', 'MorxInsertionSubtable', 'CGImageMetadata', 'gss_auth_identity', 'AudioUnitMIDIControlMapping', 'CAFChunkHeader', 'CGImagePropertyOrientation', 'CGPDFScanner', 'OpaqueMusicEventIterator', 'sfntDescriptorHeader', 'AudioUnitNodeConnection', 'OpaqueMIDIDeviceList', 'ExtendedAudioFormatInfo', 'BslnFormat1Part', 'sfntFontDescriptor', 'KernSimpleArrayHeader', '__CFRunLoopObserver', 'CGPatternTiling', 'MIDINotification', 'MorxLigatureSubtable', 'MessageComposeResult', 'MIDIThruConnectionEndpoint', 'MusicDeviceStdNoteParams', 'opaqueCMSimpleQueue', 'ALCcontext_struct', 'OpaqueAudioQueue', 'PropLookupSingle', 'CGInterpolationQuality', 'CGColor', 'AudioOutputUnitStartAtTimeParams', 'gss_name_t_desc_struct', 'CGFunctionCallbacks', 'CAFPacketTableHeader', 'AudioChannelDescription', 'sfntFeatureName', 'MorxContextualSubtable', 'CVSMPTETime', 'AudioValueRange', 'CGTextEncoding', 'AudioStreamBasicDescription', 'AUNodeRenderCallback', 'AudioPanningInfo', 'KerxOrderedListEntry', '__CFAllocator', 'OpaqueJSPropertyNameArray', '__SCDynamicStore', 'OpaqueMIDIEntity', '__CTRubyAnnotation', 'SCNVector4', 'CFHostClientContext', 'CFNetServiceClientContext', 'AudioUnitPresetMAS_SettingData', 'opaqueCMBufferQueueTriggerToken', 'AudioUnitProperty', 'CAFRegionChunk', 'CGPDFString', '__GLsync', '__CFStringTokenizer', 'JustWidthDeltaEntry', 'sfntVariationAxis', '__CFNetDiagnostic', 'CAFOverviewSample', 'sfntCMapEncoding', 'CGVector', '__SCNetworkService', 'opaqueCMSampleBuffer', 'AUHostVersionIdentifier', 'AudioBalanceFade', 'sfntFontRunFeature', 'KerxCoordinateAction', 'sfntCMapSubHeader', 'CVPlanarPixelBufferInfo', 'AUNumVersion', 'AUSamplerInstrumentData', 'AUPreset', '__CTRunDelegate', 'OpaqueAudioQueueProcessingTap', 'KerxTableHeader', '_NSZone', 'OpaqueExtAudioFile', '__CFRunLoopSource', '__CVMetalTextureCache', 'KerxAnchorPointAction', 'OpaqueJSString', 'AudioQueueParameterEvent', '__CFHTTPMessage', 'OpaqueCMClock', 'ScheduledAudioFileRegion', 'STEntryZero', 'AVAudio3DPoint', 'gss_channel_bindings_struct', 'sfntVariationHeader', 'AUChannelInfo', 'UIOffset', 'GLKEffectPropertyPrv', 'KerxStateHeader', 'CGLineJoin', 'CGPDFDocument', '__CFBag', 'KernOrderedListHeader', '__SCNetworkSet', '__SecKey', 'MIDIObjectAddRemoveNotification', 'AudioUnitParameter', 'JustPCActionSubrecord', 'AudioComponentDescription', 'AudioUnitParameterValueName', 'AudioUnitParameterEvent', 'KerxControlPointAction', 'AudioTimeStamp', 'KernKerningPair', 'gss_buffer_set_desc_struct', 'MortFeatureEntry', 'FontVariation', 'CAFStringID', 'LcarCaretClassEntry', 'AudioUnitParameterStringFromValue', 'ACErrorCode', 'ALMXGlyphEntry', 'LtagTable', '__CTTypesetter', 'AuthorizationOpaqueRef', 'UIEdgeInsets', 'CGPathElement', 'CAFMarker', 'KernTableHeader', 'NoteParamsControlValue', 'SSLContext', 'gss_cred_id_t_desc_struct', 'AudioUnitParameterNameInfo', 'CGDataConsumerCallbacks', 'ALMXHeader', 'CGLineCap', 'MIDIControlTransform', 'CGPDFArray', '__SecPolicy', 'AudioConverterPrimeInfo', '__CTTextTab', '__CFNetServiceMonitor', 'AUInputSamplesInOutputCallbackStruct', '__CTFramesetter', 'CGPDFDataFormat', 'STHeader', 'CVPlanarPixelBufferInfo_YCbCrPlanar', 'MIDIValueMap', 'JustDirectionTable', '__SCBondStatus', 'SFNTLookupSegmentHeader', 'OpaqueCMMemoryPool', 'CGPathDrawingMode', 'CGFont', '__SCNetworkReachability', 'AudioClassDescription', 'CGPoint', 'AVAudio3DVectorOrientation', 'CAFStrings', '__CFNetServiceBrowser', 'opaqueMTAudioProcessingTap', 'sfntNameRecord', 'CGPDFPage', 'CGLayer', 'ComponentInstanceRecord', 'CAFInfoStrings', 'HostCallbackInfo', 'MusicDeviceNoteParams', 'OpaqueVTCompressionSession', 'KernIndexArrayHeader', 'CVPlanarPixelBufferInfo_YCbCrBiPlanar', 'MusicTrackLoopInfo', 'opaqueCMFormatDescription', 'STClassTable', 'sfntDirectoryEntry', 'OpaqueCMTimebase', 'CGDataProviderDirectCallbacks', 'MIDIPacketList', 'CAFOverviewChunk', 'MIDIPacket', 'ScheduledAudioSlice', 'CGDataProviderSequentialCallbacks', 'AudioBuffer', 'MorxRearrangementSubtable', 'CGPatternCallbacks', 'AUDistanceAttenuationData', 'MIDIIOErrorNotification', 'CGPDFContentStream', 'IUnknownVTbl', 'MIDITransform', 'MortInsertionSubtable', 'CABarBeatTime', 'AudioBufferList', '__CVBuffer', 'AURenderCallbackStruct', 'STXEntryZero', 'JustPCDuctilityAction', 'OpaqueAudioQueueTimeline', 'VTDecompressionOutputCallbackRecord', 'OpaqueMIDIClient', '__CFPlugInInstance', 'AudioQueueBuffer', '__CFFileDescriptor', 'AudioUnitConnection', '_GKTurnBasedExchangeStatus', 'LcarCaretTable', 'CVPlanarComponentInfo', 'JustWidthDeltaGroup', 'OpaqueAudioComponent', 'ParameterEvent', '__CVPixelBufferPool', '__CTFont', 'CGColorSpace', 'CGSize', 'AUDependentParameter', 'MIDIDriverInterface', 'gss_krb5_rfc1964_keydata', '__CFDateFormatter', 'LtagStringRange', 'OpaqueVTDecompressionSession', 'gss_iov_buffer_desc_struct', 'AUPresetEvent', 'PropTable', 'KernOrderedListEntry', 'CF_BRIDGED_MUTABLE_TYPE', 'gss_OID_desc_struct', 'AudioUnitPresetMAS_Settings', 'AudioFileMarker', 'JustPCConditionalAddAction', 'BslnFormat3Part', '__CFNotificationCenter', 'MortSwashSubtable', 'AUParameterMIDIMapping', 'SCNVector3', 'OpaqueAudioConverter', 'MIDIRawData', 'sfntNameHeader', '__CFRunLoop', 'MFMailComposeResult', 'CATransform3D', 'OpbdSideValues', 'CAF_SMPTE_Time', '__SecAccessControl', 'JustPCAction', 'OpaqueVTFrameSilo', 'OpaqueVTMultiPassStorage', 'CGPathElementType', 'AudioFormatListItem', 'AudioUnitExternalBuffer', 'AudioFileRegion', 'AudioValueTranslation', 'CGImageMetadataTag', 'CAFPeakChunk', 'AudioBytePacketTranslation', 'sfntCMapHeader', '__CFURLEnumerator', 'STXHeader', 'CGPDFObjectType', 'SFNTLookupArrayHeader'} +COCOA_INTERFACES = {'UITableViewCell', 'HKCorrelationQuery', 'NSURLSessionDataTask', 'PHFetchOptions', 'NSLinguisticTagger', 'NSStream', 'AVAudioUnitDelay', 'GCMotion', 'SKPhysicsWorld', 'NSString', 'CMAttitude', 'AVAudioEnvironmentDistanceAttenuationParameters', 'HKStatisticsCollection', 'SCNPlane', 'CBPeer', 'JSContext', 'SCNTransaction', 'SCNTorus', 'AVAudioUnitEffect', 'UICollectionReusableView', 'MTLSamplerDescriptor', 'AVAssetReaderSampleReferenceOutput', 'AVMutableCompositionTrack', 'GKLeaderboard', 'NSFetchedResultsController', 'SKRange', 'MKTileOverlayRenderer', 'MIDINetworkSession', 'UIVisualEffectView', 'CIWarpKernel', 'PKObject', 'MKRoute', 'MPVolumeView', 'UIPrintInfo', 'SCNText', 'ADClient', 'PKPayment', 'AVMutableAudioMix', 'GLKEffectPropertyLight', 'WKScriptMessage', 'AVMIDIPlayer', 'PHCollectionListChangeRequest', 'UICollectionViewLayout', 'NSMutableCharacterSet', 'SKPaymentTransaction', 'NEOnDemandRuleConnect', 'NSShadow', 'SCNView', 'NSURLSessionConfiguration', 'MTLVertexAttributeDescriptor', 'CBCharacteristic', 'HKQuantityType', 'CKLocationSortDescriptor', 'NEVPNIKEv2SecurityAssociationParameters', 'CMStepCounter', 'NSNetService', 'AVAssetWriterInputMetadataAdaptor', 'UICollectionView', 'UIViewPrintFormatter', 'SCNLevelOfDetail', 'CAShapeLayer', 'MCPeerID', 'MPRatingCommand', 'WKNavigation', 'NSDictionary', 'NSFileVersion', 'CMGyroData', 'AVAudioUnitDistortion', 'CKFetchRecordsOperation', 'SKPhysicsJointSpring', 'SCNHitTestResult', 'AVAudioTime', 'CIFilter', 'UIView', 'SCNConstraint', 'CAPropertyAnimation', 'MKMapItem', 'MPRemoteCommandCenter', 'PKPaymentSummaryItem', 'UICollectionViewFlowLayoutInvalidationContext', 'UIInputViewController', 'PKPass', 'SCNPhysicsBehavior', 'MTLRenderPassColorAttachmentDescriptor', 'MKPolygonRenderer', 'CKNotification', 'JSValue', 'PHCollectionList', 'CLGeocoder', 'NSByteCountFormatter', 'AVCaptureScreenInput', 'MPFeedbackCommand', 'CAAnimation', 'MKOverlayPathView', 'UIActionSheet', 'UIMotionEffectGroup', 'NSLengthFormatter', 'UIBarItem', 'SKProduct', 'AVAssetExportSession', 'NSKeyedUnarchiver', 'NSMutableSet', 'SCNPyramid', 'PHAssetCollection', 'MKMapView', 'HMHomeManager', 'CATransition', 'MTLCompileOptions', 'UIVibrancyEffect', 'CLCircularRegion', 'MKTileOverlay', 'SCNShape', 'ACAccountCredential', 'SKPhysicsJointLimit', 'MKMapSnapshotter', 'AVMediaSelectionGroup', 'NSIndexSet', 'CBPeripheralManager', 'CKRecordZone', 'AVAudioRecorder', 'NSURL', 'CBCentral', 'NSNumber', 'AVAudioOutputNode', 'MTLVertexAttributeDescriptorArray', 'MKETAResponse', 'SKTransition', 'SSReadingList', 'HKSourceQuery', 'UITableViewRowAction', 'UITableView', 'SCNParticlePropertyController', 'AVCaptureStillImageOutput', 'GCController', 'AVAudioPlayerNode', 'AVAudioSessionPortDescription', 'NSHTTPURLResponse', 'NEOnDemandRuleEvaluateConnection', 'SKEffectNode', 'HKQuantity', 'GCControllerElement', 'AVPlayerItemAccessLogEvent', 'SCNBox', 'NSExtensionContext', 'MKOverlayRenderer', 'SCNPhysicsVehicle', 'NSDecimalNumber', 'EKReminder', 'MKPolylineView', 'CKQuery', 'AVAudioMixerNode', 'GKAchievementDescription', 'EKParticipant', 'NSBlockOperation', 'UIActivityItemProvider', 'CLLocation', 'NSBatchUpdateRequest', 'PHContentEditingOutput', 'PHObjectChangeDetails', 'HKWorkoutType', 'MPMoviePlayerController', 'AVAudioFormat', 'HMTrigger', 'MTLRenderPassDepthAttachmentDescriptor', 'SCNRenderer', 'GKScore', 'UISplitViewController', 'HKSource', 'NSURLConnection', 'ABUnknownPersonViewController', 'SCNTechnique', 'UIMenuController', 'NSEvent', 'SKTextureAtlas', 'NSKeyedArchiver', 'GKLeaderboardSet', 'NSSimpleCString', 'AVAudioPCMBuffer', 'CBATTRequest', 'GKMatchRequest', 'AVMetadataObject', 'SKProductsRequest', 'UIAlertView', 'NSIncrementalStore', 'MFMailComposeViewController', 'SCNFloor', 'NSSortDescriptor', 'CKFetchNotificationChangesOperation', 'MPMovieAccessLog', 'NSManagedObjectContext', 'AVAudioUnitGenerator', 'WKBackForwardList', 'SKMutableTexture', 'AVCaptureAudioDataOutput', 'ACAccount', 'AVMetadataItem', 'MPRatingCommandEvent', 'AVCaptureDeviceInputSource', 'CLLocationManager', 'MPRemoteCommand', 'AVCaptureSession', 'UIStepper', 'UIRefreshControl', 'NEEvaluateConnectionRule', 'CKModifyRecordsOperation', 'UICollectionViewTransitionLayout', 'CBCentralManager', 'NSPurgeableData', 'PKShippingMethod', 'SLComposeViewController', 'NSHashTable', 'MKUserTrackingBarButtonItem', 'UILexiconEntry', 'CMMotionActivity', 'SKAction', 'SKShader', 'AVPlayerItemOutput', 'MTLRenderPassAttachmentDescriptor', 'UIDocumentInteractionController', 'UIDynamicItemBehavior', 'NSMutableDictionary', 'UILabel', 'AVCaptureInputPort', 'NSExpression', 'CAInterAppAudioTransportView', 'SKMutablePayment', 'UIImage', 'PHCachingImageManager', 'SCNTransformConstraint', 'HKCorrelationType', 'UIColor', 'SCNGeometrySource', 'AVCaptureAutoExposureBracketedStillImageSettings', 'UIPopoverBackgroundView', 'UIToolbar', 'NSNotificationCenter', 'UICollectionViewLayoutAttributes', 'AVAssetReaderOutputMetadataAdaptor', 'NSEntityMigrationPolicy', 'HMUser', 'NSLocale', 'NSURLSession', 'SCNCamera', 'NSTimeZone', 'UIManagedDocument', 'AVMutableVideoCompositionLayerInstruction', 'AVAssetTrackGroup', 'NSInvocationOperation', 'ALAssetRepresentation', 'AVQueuePlayer', 'HMServiceGroup', 'UIPasteboard', 'PHContentEditingInput', 'NSLayoutManager', 'EKCalendarChooser', 'EKObject', 'CATiledLayer', 'GLKReflectionMapEffect', 'NSManagedObjectID', 'NSEnergyFormatter', 'SLRequest', 'HMCharacteristic', 'AVPlayerLayer', 'MTLRenderPassDescriptor', 'SKPayment', 'NSPointerArray', 'AVAudioMix', 'SCNLight', 'MCAdvertiserAssistant', 'MKMapSnapshotOptions', 'HKCategorySample', 'AVAudioEnvironmentReverbParameters', 'SCNMorpher', 'AVTimedMetadataGroup', 'CBMutableCharacteristic', 'NSFetchRequest', 'UIDevice', 'NSManagedObject', 'NKAssetDownload', 'AVOutputSettingsAssistant', 'SKPhysicsJointPin', 'UITabBar', 'UITextInputMode', 'NSFetchRequestExpression', 'HMActionSet', 'CTSubscriber', 'PHAssetChangeRequest', 'NSPersistentStoreRequest', 'UITabBarController', 'HKQuantitySample', 'AVPlayerItem', 'AVSynchronizedLayer', 'MKDirectionsRequest', 'NSMetadataItem', 'UIPresentationController', 'UINavigationItem', 'PHFetchResultChangeDetails', 'PHImageManager', 'AVCaptureManualExposureBracketedStillImageSettings', 'UIStoryboardPopoverSegue', 'SCNLookAtConstraint', 'UIGravityBehavior', 'UIWindow', 'CBMutableDescriptor', 'NEOnDemandRuleDisconnect', 'UIBezierPath', 'UINavigationController', 'ABPeoplePickerNavigationController', 'EKSource', 'AVAssetWriterInput', 'AVPlayerItemTrack', 'GLKEffectPropertyTexture', 'NSHTTPCookie', 'NSURLResponse', 'SKPaymentQueue', 'NSAssertionHandler', 'MKReverseGeocoder', 'GCControllerAxisInput', 'NSArray', 'NSOrthography', 'NSURLSessionUploadTask', 'NSCharacterSet', 'AVMutableVideoCompositionInstruction', 'AVAssetReaderOutput', 'EAGLContext', 'WKFrameInfo', 'CMPedometer', 'MyClass', 'CKModifyBadgeOperation', 'AVCaptureAudioFileOutput', 'SKEmitterNode', 'NSMachPort', 'AVVideoCompositionCoreAnimationTool', 'PHCollection', 'SCNPhysicsWorld', 'NSURLRequest', 'CMAccelerometerData', 'NSNetServiceBrowser', 'CLFloor', 'AVAsynchronousVideoCompositionRequest', 'SCNGeometry', 'SCNIKConstraint', 'CIKernel', 'CAGradientLayer', 'HKCharacteristicType', 'NSFormatter', 'SCNAction', 'CATransaction', 'CBUUID', 'UIStoryboard', 'MPMediaLibrary', 'UITapGestureRecognizer', 'MPMediaItemArtwork', 'NSURLSessionTask', 'AVAudioUnit', 'MCBrowserViewController', 'UIFontDescriptor', 'NSRelationshipDescription', 'HKSample', 'WKWebView', 'NSMutableAttributedString', 'NSPersistentStoreAsynchronousResult', 'MPNowPlayingInfoCenter', 'MKLocalSearch', 'EAAccessory', 'HKCorrelation', 'CATextLayer', 'NSNotificationQueue', 'UINib', 'GLKTextureLoader', 'HKObjectType', 'NSValue', 'NSMutableIndexSet', 'SKPhysicsContact', 'NSProgress', 'AVPlayerViewController', 'CAScrollLayer', 'GKSavedGame', 'NSTextCheckingResult', 'PHObjectPlaceholder', 'SKConstraint', 'EKEventEditViewController', 'NSEntityDescription', 'NSURLCredentialStorage', 'UIApplication', 'SKDownload', 'SCNNode', 'MKLocalSearchRequest', 'SKScene', 'UISearchDisplayController', 'NEOnDemandRule', 'MTLRenderPassStencilAttachmentDescriptor', 'CAReplicatorLayer', 'UIPrintPageRenderer', 'EKCalendarItem', 'NSUUID', 'EAAccessoryManager', 'NEOnDemandRuleIgnore', 'SKRegion', 'AVAssetResourceLoader', 'EAWiFiUnconfiguredAccessoryBrowser', 'NSUserActivity', 'CTCall', 'UIPrinterPickerController', 'CIVector', 'UINavigationBar', 'UIPanGestureRecognizer', 'MPMediaQuery', 'ABNewPersonViewController', 'CKRecordZoneID', 'HKAnchoredObjectQuery', 'CKFetchRecordZonesOperation', 'UIStoryboardSegue', 'ACAccountType', 'GKSession', 'SKVideoNode', 'PHChange', 'SKReceiptRefreshRequest', 'GCExtendedGamepadSnapshot', 'MPSeekCommandEvent', 'GCExtendedGamepad', 'CAValueFunction', 'SCNCylinder', 'NSNotification', 'NSBatchUpdateResult', 'PKPushCredentials', 'SCNPhysicsSliderJoint', 'AVCaptureDeviceFormat', 'AVPlayerItemErrorLog', 'NSMapTable', 'NSSet', 'CMMotionManager', 'GKVoiceChatService', 'UIPageControl', 'UILexicon', 'MTLArrayType', 'AVAudioUnitReverb', 'MKGeodesicPolyline', 'AVMutableComposition', 'NSLayoutConstraint', 'UIPrinter', 'NSOrderedSet', 'CBAttribute', 'PKPushPayload', 'NSIncrementalStoreNode', 'EKEventStore', 'MPRemoteCommandEvent', 'UISlider', 'UIBlurEffect', 'CKAsset', 'AVCaptureInput', 'AVAudioEngine', 'MTLVertexDescriptor', 'SKPhysicsBody', 'NSOperation', 'PKPaymentPass', 'UIImageAsset', 'MKMapCamera', 'SKProductsResponse', 'GLKEffectPropertyMaterial', 'AVCaptureDevice', 'CTCallCenter', 'CABTMIDILocalPeripheralViewController', 'NEVPNManager', 'HKQuery', 'SCNPhysicsContact', 'CBMutableService', 'AVSampleBufferDisplayLayer', 'SCNSceneSource', 'SKLightNode', 'CKDiscoveredUserInfo', 'NSMutableArray', 'MTLDepthStencilDescriptor', 'MTLArgument', 'NSMassFormatter', 'CIRectangleFeature', 'PKPushRegistry', 'NEVPNConnection', 'MCNearbyServiceBrowser', 'NSOperationQueue', 'MKPolylineRenderer', 'HKWorkout', 'NSValueTransformer', 'UICollectionViewFlowLayout', 'MPChangePlaybackRateCommandEvent', 'NSEntityMapping', 'SKTexture', 'NSMergePolicy', 'UITextInputStringTokenizer', 'NSRecursiveLock', 'AVAsset', 'NSUndoManager', 'AVAudioUnitSampler', 'NSItemProvider', 'SKUniform', 'MPMediaPickerController', 'CKOperation', 'MTLRenderPipelineDescriptor', 'EAWiFiUnconfiguredAccessory', 'NSFileCoordinator', 'SKRequest', 'NSFileHandle', 'NSConditionLock', 'UISegmentedControl', 'NSManagedObjectModel', 'UITabBarItem', 'SCNCone', 'MPMediaItem', 'SCNMaterial', 'EKRecurrenceRule', 'UIEvent', 'UITouch', 'UIPrintInteractionController', 'CMDeviceMotion', 'NEVPNProtocol', 'NSCompoundPredicate', 'HKHealthStore', 'MKMultiPoint', 'HKSampleType', 'UIPrintFormatter', 'AVAudioUnitEQFilterParameters', 'SKView', 'NSConstantString', 'UIPopoverController', 'CKDatabase', 'AVMetadataFaceObject', 'UIAccelerometer', 'EKEventViewController', 'CMAltitudeData', 'MTLStencilDescriptor', 'UISwipeGestureRecognizer', 'NSPort', 'MKCircleRenderer', 'AVCompositionTrack', 'NSAsynchronousFetchRequest', 'NSUbiquitousKeyValueStore', 'NSMetadataQueryResultGroup', 'AVAssetResourceLoadingDataRequest', 'UITableViewHeaderFooterView', 'CKNotificationID', 'AVAudioSession', 'HKUnit', 'NSNull', 'NSPersistentStoreResult', 'MKCircleView', 'AVAudioChannelLayout', 'NEVPNProtocolIKEv2', 'WKProcessPool', 'UIAttachmentBehavior', 'CLBeacon', 'NSInputStream', 'NSURLCache', 'GKPlayer', 'NSMappingModel', 'CIQRCodeFeature', 'AVMutableVideoComposition', 'PHFetchResult', 'NSAttributeDescription', 'AVPlayer', 'MKAnnotationView', 'PKPaymentRequest', 'NSTimer', 'CBDescriptor', 'MKOverlayView', 'AVAudioUnitTimePitch', 'NSSaveChangesRequest', 'UIReferenceLibraryViewController', 'SKPhysicsJointFixed', 'UILocalizedIndexedCollation', 'UIInterpolatingMotionEffect', 'UIDocumentPickerViewController', 'AVAssetWriter', 'NSBundle', 'SKStoreProductViewController', 'GLKViewController', 'NSMetadataQueryAttributeValueTuple', 'GKTurnBasedMatch', 'AVAudioFile', 'UIActivity', 'NSPipe', 'MKShape', 'NSMergeConflict', 'CIImage', 'HKObject', 'UIRotationGestureRecognizer', 'AVPlayerItemLegibleOutput', 'AVAssetImageGenerator', 'GCControllerButtonInput', 'CKMarkNotificationsReadOperation', 'CKSubscription', 'MPTimedMetadata', 'NKIssue', 'UIScreenMode', 'HMAccessoryBrowser', 'GKTurnBasedEventHandler', 'UIWebView', 'MKPolyline', 'JSVirtualMachine', 'AVAssetReader', 'NSAttributedString', 'GKMatchmakerViewController', 'NSCountedSet', 'UIButton', 'WKNavigationResponse', 'GKLocalPlayer', 'MPMovieErrorLog', 'AVSpeechUtterance', 'HKStatistics', 'UILocalNotification', 'HKBiologicalSexObject', 'AVURLAsset', 'CBPeripheral', 'NSDateComponentsFormatter', 'SKSpriteNode', 'UIAccessibilityElement', 'AVAssetWriterInputGroup', 'HMZone', 'AVAssetReaderAudioMixOutput', 'NSEnumerator', 'UIDocument', 'MKLocalSearchResponse', 'UISimpleTextPrintFormatter', 'PHPhotoLibrary', 'CBService', 'UIDocumentMenuViewController', 'MCSession', 'QLPreviewController', 'CAMediaTimingFunction', 'UITextPosition', 'ASIdentifierManager', 'AVAssetResourceLoadingRequest', 'SLComposeServiceViewController', 'UIPinchGestureRecognizer', 'PHObject', 'NSExtensionItem', 'HKSampleQuery', 'MTLRenderPipelineColorAttachmentDescriptorArray', 'MKRouteStep', 'SCNCapsule', 'NSMetadataQuery', 'AVAssetResourceLoadingContentInformationRequest', 'UITraitCollection', 'CTCarrier', 'NSFileSecurity', 'UIAcceleration', 'UIMotionEffect', 'MTLRenderPipelineReflection', 'CLHeading', 'CLVisit', 'MKDirectionsResponse', 'HMAccessory', 'MTLStructType', 'UITextView', 'CMMagnetometerData', 'UICollisionBehavior', 'UIProgressView', 'CKServerChangeToken', 'UISearchBar', 'MKPlacemark', 'AVCaptureConnection', 'NSPropertyMapping', 'ALAssetsFilter', 'SK3DNode', 'AVPlayerItemErrorLogEvent', 'NSJSONSerialization', 'AVAssetReaderVideoCompositionOutput', 'ABPersonViewController', 'CIDetector', 'GKTurnBasedMatchmakerViewController', 'MPMediaItemCollection', 'SCNSphere', 'NSCondition', 'NSURLCredential', 'MIDINetworkConnection', 'NSFileProviderExtension', 'NSDecimalNumberHandler', 'NSAtomicStoreCacheNode', 'NSAtomicStore', 'EKAlarm', 'CKNotificationInfo', 'AVAudioUnitEQ', 'UIPercentDrivenInteractiveTransition', 'MKPolygon', 'AVAssetTrackSegment', 'MTLVertexAttribute', 'NSExpressionDescription', 'HKStatisticsCollectionQuery', 'NSURLAuthenticationChallenge', 'NSDirectoryEnumerator', 'MKDistanceFormatter', 'UIAlertAction', 'NSPropertyListSerialization', 'GKPeerPickerController', 'UIUserNotificationSettings', 'UITableViewController', 'GKNotificationBanner', 'MKPointAnnotation', 'MTLRenderPassColorAttachmentDescriptorArray', 'NSCache', 'SKPhysicsJoint', 'NSXMLParser', 'UIViewController', 'PKPaymentToken', 'MFMessageComposeViewController', 'AVAudioInputNode', 'NSDataDetector', 'CABTMIDICentralViewController', 'AVAudioUnitMIDIInstrument', 'AVCaptureVideoPreviewLayer', 'AVAssetWriterInputPassDescription', 'MPChangePlaybackRateCommand', 'NSURLComponents', 'CAMetalLayer', 'UISnapBehavior', 'AVMetadataMachineReadableCodeObject', 'CKDiscoverUserInfosOperation', 'NSTextAttachment', 'NSException', 'UIMenuItem', 'CMMotionActivityManager', 'SCNGeometryElement', 'NCWidgetController', 'CAEmitterLayer', 'MKUserLocation', 'UIImagePickerController', 'CIFeature', 'AVCaptureDeviceInput', 'ALAsset', 'NSURLSessionDownloadTask', 'SCNPhysicsHingeJoint', 'MPMoviePlayerViewController', 'NSMutableOrderedSet', 'SCNMaterialProperty', 'UIFont', 'AVCaptureVideoDataOutput', 'NSCachedURLResponse', 'ALAssetsLibrary', 'NSInvocation', 'UILongPressGestureRecognizer', 'NSTextStorage', 'WKWebViewConfiguration', 'CIFaceFeature', 'MKMapSnapshot', 'GLKEffectPropertyFog', 'AVComposition', 'CKDiscoverAllContactsOperation', 'AVAudioMixInputParameters', 'CAEmitterBehavior', 'PKPassLibrary', 'UIMutableUserNotificationCategory', 'NSLock', 'NEVPNProtocolIPSec', 'ADBannerView', 'UIDocumentPickerExtensionViewController', 'UIActivityIndicatorView', 'AVPlayerMediaSelectionCriteria', 'CALayer', 'UIAccessibilityCustomAction', 'UIBarButtonItem', 'AVAudioSessionRouteDescription', 'CLBeaconRegion', 'HKBloodTypeObject', 'MTLVertexBufferLayoutDescriptorArray', 'CABasicAnimation', 'AVVideoCompositionInstruction', 'AVMutableTimedMetadataGroup', 'EKRecurrenceEnd', 'NSTextContainer', 'TWTweetComposeViewController', 'PKPaymentAuthorizationViewController', 'UIScrollView', 'WKNavigationAction', 'AVPlayerItemMetadataOutput', 'EKRecurrenceDayOfWeek', 'NSNumberFormatter', 'MTLComputePipelineReflection', 'UIScreen', 'CLRegion', 'NSProcessInfo', 'GLKTextureInfo', 'SCNSkinner', 'AVCaptureMetadataOutput', 'SCNAnimationEvent', 'NSTextTab', 'JSManagedValue', 'NSDate', 'UITextChecker', 'WKBackForwardListItem', 'NSData', 'NSParagraphStyle', 'AVMutableMetadataItem', 'EKCalendar', 'HKWorkoutEvent', 'NSMutableURLRequest', 'UIVideoEditorController', 'HMTimerTrigger', 'AVAudioUnitVarispeed', 'UIDynamicAnimator', 'AVCompositionTrackSegment', 'GCGamepadSnapshot', 'MPMediaEntity', 'GLKSkyboxEffect', 'UISwitch', 'EKStructuredLocation', 'UIGestureRecognizer', 'NSProxy', 'GLKBaseEffect', 'UIPushBehavior', 'GKScoreChallenge', 'NSCoder', 'MPMediaPlaylist', 'NSDateComponents', 'WKUserScript', 'EKEvent', 'NSDateFormatter', 'NSAsynchronousFetchResult', 'AVAssetWriterInputPixelBufferAdaptor', 'UIVisualEffect', 'UICollectionViewCell', 'UITextField', 'CLPlacemark', 'MPPlayableContentManager', 'AVCaptureOutput', 'HMCharacteristicWriteAction', 'CKModifySubscriptionsOperation', 'NSPropertyDescription', 'GCGamepad', 'UIMarkupTextPrintFormatter', 'SCNTube', 'NSPersistentStoreCoordinator', 'AVAudioEnvironmentNode', 'GKMatchmaker', 'CIContext', 'NSThread', 'SLComposeSheetConfigurationItem', 'SKPhysicsJointSliding', 'NSPredicate', 'GKVoiceChat', 'SKCropNode', 'AVCaptureAudioPreviewOutput', 'NSStringDrawingContext', 'GKGameCenterViewController', 'UIPrintPaper', 'SCNPhysicsBallSocketJoint', 'UICollectionViewLayoutInvalidationContext', 'GLKEffectPropertyTransform', 'AVAudioIONode', 'UIDatePicker', 'MKDirections', 'ALAssetsGroup', 'CKRecordZoneNotification', 'SCNScene', 'MPMovieAccessLogEvent', 'CKFetchSubscriptionsOperation', 'CAEmitterCell', 'AVAudioUnitTimeEffect', 'HMCharacteristicMetadata', 'MKPinAnnotationView', 'UIPickerView', 'UIImageView', 'UIUserNotificationCategory', 'SCNPhysicsVehicleWheel', 'HKCategoryType', 'MPMediaQuerySection', 'GKFriendRequestComposeViewController', 'NSError', 'MTLRenderPipelineColorAttachmentDescriptor', 'SCNPhysicsShape', 'UISearchController', 'SCNPhysicsBody', 'CTSubscriberInfo', 'AVPlayerItemAccessLog', 'MPMediaPropertyPredicate', 'CMLogItem', 'NSAutoreleasePool', 'NSSocketPort', 'AVAssetReaderTrackOutput', 'SKNode', 'UIMutableUserNotificationAction', 'SCNProgram', 'AVSpeechSynthesisVoice', 'CMAltimeter', 'AVCaptureAudioChannel', 'GKTurnBasedExchangeReply', 'AVVideoCompositionLayerInstruction', 'AVSpeechSynthesizer', 'GKChallengeEventHandler', 'AVCaptureFileOutput', 'UIControl', 'SCNPhysicsField', 'CKReference', 'LAContext', 'CKRecordID', 'ADInterstitialAd', 'AVAudioSessionDataSourceDescription', 'AVAudioBuffer', 'CIColorKernel', 'GCControllerDirectionPad', 'NSFileManager', 'AVMutableAudioMixInputParameters', 'UIScreenEdgePanGestureRecognizer', 'CAKeyframeAnimation', 'CKQueryNotification', 'PHAdjustmentData', 'EASession', 'AVAssetResourceRenewalRequest', 'UIInputView', 'NSFileWrapper', 'UIResponder', 'NSPointerFunctions', 'UIKeyCommand', 'NSHTTPCookieStorage', 'AVMediaSelectionOption', 'NSRunLoop', 'NSFileAccessIntent', 'CAAnimationGroup', 'MKCircle', 'UIAlertController', 'NSMigrationManager', 'NSDateIntervalFormatter', 'UICollectionViewUpdateItem', 'CKDatabaseOperation', 'PHImageRequestOptions', 'SKReachConstraints', 'CKRecord', 'CAInterAppAudioSwitcherView', 'WKWindowFeatures', 'GKInvite', 'NSMutableData', 'PHAssetCollectionChangeRequest', 'NSMutableParagraphStyle', 'UIDynamicBehavior', 'GLKEffectProperty', 'CKFetchRecordChangesOperation', 'SKShapeNode', 'MPMovieErrorLogEvent', 'MKPolygonView', 'MPContentItem', 'HMAction', 'NSScanner', 'GKAchievementChallenge', 'AVAudioPlayer', 'CKContainer', 'AVVideoComposition', 'NKLibrary', 'NSPersistentStore', 'AVCaptureMovieFileOutput', 'HMRoom', 'GKChallenge', 'UITextRange', 'NSURLProtectionSpace', 'ACAccountStore', 'MPSkipIntervalCommand', 'NSComparisonPredicate', 'HMHome', 'PHVideoRequestOptions', 'NSOutputStream', 'MPSkipIntervalCommandEvent', 'PKAddPassesViewController', 'UITextSelectionRect', 'CTTelephonyNetworkInfo', 'AVTextStyleRule', 'NSFetchedPropertyDescription', 'UIPageViewController', 'CATransformLayer', 'UICollectionViewController', 'AVAudioNode', 'MCNearbyServiceAdvertiser', 'NSObject', 'PHAsset', 'GKLeaderboardViewController', 'CKQueryCursor', 'MPMusicPlayerController', 'MKOverlayPathRenderer', 'CMPedometerData', 'HMService', 'SKFieldNode', 'GKAchievement', 'WKUserContentController', 'AVAssetTrack', 'TWRequest', 'SKLabelNode', 'AVCaptureBracketedStillImageSettings', 'MIDINetworkHost', 'MPMediaPredicate', 'AVFrameRateRange', 'MTLTextureDescriptor', 'MTLVertexBufferLayoutDescriptor', 'MPFeedbackCommandEvent', 'UIUserNotificationAction', 'HKStatisticsQuery', 'SCNParticleSystem', 'NSIndexPath', 'AVVideoCompositionRenderContext', 'CADisplayLink', 'HKObserverQuery', 'UIPopoverPresentationController', 'CKQueryOperation', 'CAEAGLLayer', 'NSMutableString', 'NSMessagePort', 'NSURLQueryItem', 'MTLStructMember', 'AVAudioSessionChannelDescription', 'GLKView', 'UIActivityViewController', 'GKAchievementViewController', 'GKTurnBasedParticipant', 'NSURLProtocol', 'NSUserDefaults', 'NSCalendar', 'SKKeyframeSequence', 'AVMetadataItemFilter', 'CKModifyRecordZonesOperation', 'WKPreferences', 'NSMethodSignature', 'NSRegularExpression', 'EAGLSharegroup', 'AVPlayerItemVideoOutput', 'PHContentEditingInputRequestOptions', 'GKMatch', 'CIColor', 'UIDictationPhrase'} +COCOA_PROTOCOLS = {'SKStoreProductViewControllerDelegate', 'AVVideoCompositionInstruction', 'AVAudioSessionDelegate', 'GKMatchDelegate', 'NSFileManagerDelegate', 'UILayoutSupport', 'NSCopying', 'UIPrintInteractionControllerDelegate', 'QLPreviewControllerDataSource', 'SKProductsRequestDelegate', 'NSTextStorageDelegate', 'MCBrowserViewControllerDelegate', 'MTLComputeCommandEncoder', 'SCNSceneExportDelegate', 'UISearchResultsUpdating', 'MFMailComposeViewControllerDelegate', 'MTLBlitCommandEncoder', 'NSDecimalNumberBehaviors', 'PHContentEditingController', 'NSMutableCopying', 'UIActionSheetDelegate', 'UIViewControllerTransitioningDelegate', 'UIAlertViewDelegate', 'AVAudioPlayerDelegate', 'MKReverseGeocoderDelegate', 'NSCoding', 'UITextInputTokenizer', 'GKFriendRequestComposeViewControllerDelegate', 'UIActivityItemSource', 'NSCacheDelegate', 'UIAdaptivePresentationControllerDelegate', 'GKAchievementViewControllerDelegate', 'UIViewControllerTransitionCoordinator', 'EKEventEditViewDelegate', 'NSURLConnectionDelegate', 'UITableViewDelegate', 'GKPeerPickerControllerDelegate', 'UIGuidedAccessRestrictionDelegate', 'AVSpeechSynthesizerDelegate', 'AVAudio3DMixing', 'AVPlayerItemLegibleOutputPushDelegate', 'ADInterstitialAdDelegate', 'HMAccessoryBrowserDelegate', 'AVAssetResourceLoaderDelegate', 'UITabBarControllerDelegate', 'CKRecordValue', 'SKPaymentTransactionObserver', 'AVCaptureAudioDataOutputSampleBufferDelegate', 'UIInputViewAudioFeedback', 'GKChallengeListener', 'SKSceneDelegate', 'UIPickerViewDelegate', 'UIWebViewDelegate', 'UIApplicationDelegate', 'GKInviteEventListener', 'MPMediaPlayback', 'MyClassJavaScriptMethods', 'AVAsynchronousKeyValueLoading', 'QLPreviewItem', 'SCNBoundingVolume', 'NSPortDelegate', 'UIContentContainer', 'SCNNodeRendererDelegate', 'SKRequestDelegate', 'SKPhysicsContactDelegate', 'HMAccessoryDelegate', 'UIPageViewControllerDataSource', 'SCNSceneRendererDelegate', 'SCNPhysicsContactDelegate', 'MKMapViewDelegate', 'AVPlayerItemOutputPushDelegate', 'UICollectionViewDelegate', 'UIImagePickerControllerDelegate', 'MTLRenderCommandEncoder', 'PKPaymentAuthorizationViewControllerDelegate', 'UIToolbarDelegate', 'WKUIDelegate', 'SCNActionable', 'NSURLConnectionDataDelegate', 'MKOverlay', 'CBCentralManagerDelegate', 'JSExport', 'NSTextLayoutOrientationProvider', 'UIPickerViewDataSource', 'PKPushRegistryDelegate', 'UIViewControllerTransitionCoordinatorContext', 'NSLayoutManagerDelegate', 'MTLLibrary', 'NSFetchedResultsControllerDelegate', 'ABPeoplePickerNavigationControllerDelegate', 'MTLResource', 'NSDiscardableContent', 'UITextFieldDelegate', 'MTLBuffer', 'MTLSamplerState', 'GKGameCenterControllerDelegate', 'MPMediaPickerControllerDelegate', 'UISplitViewControllerDelegate', 'UIAppearance', 'UIPickerViewAccessibilityDelegate', 'UITraitEnvironment', 'UIScrollViewAccessibilityDelegate', 'ADBannerViewDelegate', 'MPPlayableContentDataSource', 'MTLComputePipelineState', 'NSURLSessionDelegate', 'MTLCommandBuffer', 'NSXMLParserDelegate', 'UIViewControllerRestoration', 'UISearchBarDelegate', 'UIBarPositioning', 'CBPeripheralDelegate', 'UISearchDisplayDelegate', 'CAAction', 'PKAddPassesViewControllerDelegate', 'MCNearbyServiceAdvertiserDelegate', 'MTLDepthStencilState', 'GKTurnBasedMatchmakerViewControllerDelegate', 'MPPlayableContentDelegate', 'AVCaptureVideoDataOutputSampleBufferDelegate', 'UIAppearanceContainer', 'UIStateRestoring', 'UITextDocumentProxy', 'MTLDrawable', 'NSURLSessionTaskDelegate', 'NSFilePresenter', 'AVAudioStereoMixing', 'UIViewControllerContextTransitioning', 'UITextInput', 'CBPeripheralManagerDelegate', 'UITextInputDelegate', 'NSFastEnumeration', 'NSURLAuthenticationChallengeSender', 'SCNProgramDelegate', 'AVVideoCompositing', 'SCNAnimatable', 'NSSecureCoding', 'MCAdvertiserAssistantDelegate', 'GKLocalPlayerListener', 'GLKNamedEffect', 'UIPopoverControllerDelegate', 'AVCaptureMetadataOutputObjectsDelegate', 'NSExtensionRequestHandling', 'UITextSelecting', 'UIPrinterPickerControllerDelegate', 'NCWidgetProviding', 'MTLCommandEncoder', 'NSURLProtocolClient', 'MFMessageComposeViewControllerDelegate', 'UIVideoEditorControllerDelegate', 'WKNavigationDelegate', 'GKSavedGameListener', 'UITableViewDataSource', 'MTLFunction', 'EKCalendarChooserDelegate', 'NSUserActivityDelegate', 'UICollisionBehaviorDelegate', 'NSStreamDelegate', 'MCNearbyServiceBrowserDelegate', 'HMHomeDelegate', 'UINavigationControllerDelegate', 'MCSessionDelegate', 'UIDocumentPickerDelegate', 'UIViewControllerInteractiveTransitioning', 'GKTurnBasedEventListener', 'SCNSceneRenderer', 'MTLTexture', 'GLKViewDelegate', 'EAAccessoryDelegate', 'WKScriptMessageHandler', 'PHPhotoLibraryChangeObserver', 'NSKeyedUnarchiverDelegate', 'AVPlayerItemMetadataOutputPushDelegate', 'NSMachPortDelegate', 'SCNShadable', 'UIPopoverBackgroundViewMethods', 'UIDocumentMenuDelegate', 'UIBarPositioningDelegate', 'ABPersonViewControllerDelegate', 'NSNetServiceBrowserDelegate', 'EKEventViewDelegate', 'UIScrollViewDelegate', 'NSURLConnectionDownloadDelegate', 'UIGestureRecognizerDelegate', 'UINavigationBarDelegate', 'AVAudioMixing', 'NSFetchedResultsSectionInfo', 'UIDocumentInteractionControllerDelegate', 'MTLParallelRenderCommandEncoder', 'QLPreviewControllerDelegate', 'UIAccessibilityReadingContent', 'ABUnknownPersonViewControllerDelegate', 'GLKViewControllerDelegate', 'UICollectionViewDelegateFlowLayout', 'UIPopoverPresentationControllerDelegate', 'UIDynamicAnimatorDelegate', 'NSTextAttachmentContainer', 'MKAnnotation', 'UIAccessibilityIdentification', 'UICoordinateSpace', 'ABNewPersonViewControllerDelegate', 'MTLDevice', 'CAMediaTiming', 'AVCaptureFileOutputRecordingDelegate', 'HMHomeManagerDelegate', 'UITextViewDelegate', 'UITabBarDelegate', 'GKLeaderboardViewControllerDelegate', 'UISearchControllerDelegate', 'EAWiFiUnconfiguredAccessoryBrowserDelegate', 'UITextInputTraits', 'MTLRenderPipelineState', 'GKVoiceChatClient', 'UIKeyInput', 'UICollectionViewDataSource', 'SCNTechniqueSupport', 'NSLocking', 'AVCaptureFileOutputDelegate', 'GKChallengeEventHandlerDelegate', 'UIObjectRestoration', 'CIFilterConstructor', 'AVPlayerItemOutputPullDelegate', 'EAGLDrawable', 'AVVideoCompositionValidationHandling', 'UIViewControllerAnimatedTransitioning', 'NSURLSessionDownloadDelegate', 'UIAccelerometerDelegate', 'UIPageViewControllerDelegate', 'MTLCommandQueue', 'UIDataSourceModelAssociation', 'AVAudioRecorderDelegate', 'GKSessionDelegate', 'NSKeyedArchiverDelegate', 'CAMetalDrawable', 'UIDynamicItem', 'CLLocationManagerDelegate', 'NSMetadataQueryDelegate', 'NSNetServiceDelegate', 'GKMatchmakerViewControllerDelegate', 'NSURLSessionDataDelegate'} +COCOA_PRIMITIVES = {'ROTAHeader', '__CFBundle', 'MortSubtable', 'AudioFilePacketTableInfo', 'CGPDFOperatorTable', 'KerxStateEntry', 'ExtendedTempoEvent', 'CTParagraphStyleSetting', 'OpaqueMIDIPort', '_GLKMatrix3', '_GLKMatrix2', '_GLKMatrix4', 'ExtendedControlEvent', 'CAFAudioDescription', 'OpaqueCMBlockBuffer', 'CGTextDrawingMode', 'EKErrorCode', 'gss_buffer_desc_struct', 'AudioUnitParameterInfo', '__SCPreferences', '__CTFrame', '__CTLine', 'AudioFile_SMPTE_Time', 'gss_krb5_lucid_context_v1', 'OpaqueJSValue', 'TrakTableEntry', 'AudioFramePacketTranslation', 'CGImageSource', 'OpaqueJSPropertyNameAccumulator', 'JustPCGlyphRepeatAddAction', '__CFBinaryHeap', 'OpaqueMIDIThruConnection', 'opaqueCMBufferQueue', 'OpaqueMusicSequence', 'MortRearrangementSubtable', 'MixerDistanceParams', 'MorxSubtable', 'MIDIObjectPropertyChangeNotification', 'SFNTLookupSegment', 'CGImageMetadataErrors', 'CGPath', 'OpaqueMIDIEndpoint', 'AudioComponentPlugInInterface', 'gss_ctx_id_t_desc_struct', 'sfntFontFeatureSetting', 'OpaqueJSContextGroup', '__SCNetworkConnection', 'AudioUnitParameterValueTranslation', 'CGImageMetadataType', 'CGPattern', 'AudioFileTypeAndFormatID', 'CGContext', 'AUNodeInteraction', 'SFNTLookupTable', 'JustPCDecompositionAction', 'KerxControlPointHeader', 'AudioStreamPacketDescription', 'KernSubtableHeader', '__SecCertificate', 'AUMIDIOutputCallbackStruct', 'MIDIMetaEvent', 'AudioQueueChannelAssignment', 'AnchorPoint', 'JustTable', '__CFNetService', 'CF_BRIDGED_TYPE', 'gss_krb5_lucid_key', 'CGPDFDictionary', 'KerxSubtableHeader', 'CAF_UUID_ChunkHeader', 'gss_krb5_cfx_keydata', 'OpaqueJSClass', 'CGGradient', 'OpaqueMIDISetup', 'JustPostcompTable', '__CTParagraphStyle', 'AudioUnitParameterHistoryInfo', 'OpaqueJSContext', 'CGShading', 'MIDIThruConnectionParams', 'BslnFormat0Part', 'SFNTLookupSingle', '__CFHost', '__SecRandom', '__CTFontDescriptor', '_NSRange', 'sfntDirectory', 'AudioQueueLevelMeterState', 'CAFPositionPeak', 'PropLookupSegment', '__CVOpenGLESTextureCache', 'sfntInstance', '_GLKQuaternion', 'AnkrTable', '__SCNetworkProtocol', 'CAFFileHeader', 'KerxOrderedListHeader', 'CGBlendMode', 'STXEntryOne', 'CAFRegion', 'SFNTLookupTrimmedArrayHeader', 'SCNMatrix4', 'KerxControlPointEntry', 'OpaqueMusicTrack', '_GLKVector4', 'gss_OID_set_desc_struct', 'OpaqueMusicPlayer', '_CFHTTPAuthentication', 'CGAffineTransform', 'CAFMarkerChunk', 'AUHostIdentifier', 'ROTAGlyphEntry', 'BslnTable', 'gss_krb5_lucid_context_version', '_GLKMatrixStack', 'CGImage', 'KernStateEntry', 'SFNTLookupSingleHeader', 'MortLigatureSubtable', 'CAFUMIDChunk', 'SMPTETime', 'CAFDataChunk', 'CGPDFStream', 'AudioFileRegionList', 'STEntryTwo', 'SFNTLookupBinarySearchHeader', 'OpbdTable', '__CTGlyphInfo', 'BslnFormat2Part', 'KerxIndexArrayHeader', 'TrakTable', 'KerxKerningPair', '__CFBitVector', 'KernVersion0SubtableHeader', 'OpaqueAudioComponentInstance', 'AudioChannelLayout', '__CFUUID', 'MIDISysexSendRequest', '__CFNumberFormatter', 'CGImageSourceStatus', 'AudioFileMarkerList', 'AUSamplerBankPresetData', 'CGDataProvider', 'AudioFormatInfo', '__SecIdentity', 'sfntCMapExtendedSubHeader', 'MIDIChannelMessage', 'KernOffsetTable', 'CGColorSpaceModel', 'MFMailComposeErrorCode', 'CGFunction', '__SecTrust', 'AVAudio3DAngularOrientation', 'CGFontPostScriptFormat', 'KernStateHeader', 'AudioUnitCocoaViewInfo', 'CGDataConsumer', 'OpaqueMIDIDevice', 'KernVersion0Header', 'AnchorPointTable', 'CGImageDestination', 'CAFInstrumentChunk', 'AudioUnitMeterClipping', 'MorxChain', '__CTFontCollection', 'STEntryOne', 'STXEntryTwo', 'ExtendedNoteOnEvent', 'CGColorRenderingIntent', 'KerxSimpleArrayHeader', 'MorxTable', '_GLKVector3', '_GLKVector2', 'MortTable', 'CGPDFBox', 'AudioUnitParameterValueFromString', '__CFSocket', 'ALCdevice_struct', 'MIDINoteMessage', 'sfntFeatureHeader', 'CGRect', '__SCNetworkInterface', '__CFTree', 'MusicEventUserData', 'TrakTableData', 'GCQuaternion', 'MortContextualSubtable', '__CTRun', 'AudioUnitFrequencyResponseBin', 'MortChain', 'MorxInsertionSubtable', 'CGImageMetadata', 'gss_auth_identity', 'AudioUnitMIDIControlMapping', 'CAFChunkHeader', 'CGImagePropertyOrientation', 'CGPDFScanner', 'OpaqueMusicEventIterator', 'sfntDescriptorHeader', 'AudioUnitNodeConnection', 'OpaqueMIDIDeviceList', 'ExtendedAudioFormatInfo', 'BslnFormat1Part', 'sfntFontDescriptor', 'KernSimpleArrayHeader', '__CFRunLoopObserver', 'CGPatternTiling', 'MIDINotification', 'MorxLigatureSubtable', 'MessageComposeResult', 'MIDIThruConnectionEndpoint', 'MusicDeviceStdNoteParams', 'opaqueCMSimpleQueue', 'ALCcontext_struct', 'OpaqueAudioQueue', 'PropLookupSingle', 'CGInterpolationQuality', 'CGColor', 'AudioOutputUnitStartAtTimeParams', 'gss_name_t_desc_struct', 'CGFunctionCallbacks', 'CAFPacketTableHeader', 'AudioChannelDescription', 'sfntFeatureName', 'MorxContextualSubtable', 'CVSMPTETime', 'AudioValueRange', 'CGTextEncoding', 'AudioStreamBasicDescription', 'AUNodeRenderCallback', 'AudioPanningInfo', 'KerxOrderedListEntry', '__CFAllocator', 'OpaqueJSPropertyNameArray', '__SCDynamicStore', 'OpaqueMIDIEntity', '__CTRubyAnnotation', 'SCNVector4', 'CFHostClientContext', 'CFNetServiceClientContext', 'AudioUnitPresetMAS_SettingData', 'opaqueCMBufferQueueTriggerToken', 'AudioUnitProperty', 'CAFRegionChunk', 'CGPDFString', '__GLsync', '__CFStringTokenizer', 'JustWidthDeltaEntry', 'sfntVariationAxis', '__CFNetDiagnostic', 'CAFOverviewSample', 'sfntCMapEncoding', 'CGVector', '__SCNetworkService', 'opaqueCMSampleBuffer', 'AUHostVersionIdentifier', 'AudioBalanceFade', 'sfntFontRunFeature', 'KerxCoordinateAction', 'sfntCMapSubHeader', 'CVPlanarPixelBufferInfo', 'AUNumVersion', 'AUSamplerInstrumentData', 'AUPreset', '__CTRunDelegate', 'OpaqueAudioQueueProcessingTap', 'KerxTableHeader', '_NSZone', 'OpaqueExtAudioFile', '__CFRunLoopSource', '__CVMetalTextureCache', 'KerxAnchorPointAction', 'OpaqueJSString', 'AudioQueueParameterEvent', '__CFHTTPMessage', 'OpaqueCMClock', 'ScheduledAudioFileRegion', 'STEntryZero', 'AVAudio3DPoint', 'gss_channel_bindings_struct', 'sfntVariationHeader', 'AUChannelInfo', 'UIOffset', 'GLKEffectPropertyPrv', 'KerxStateHeader', 'CGLineJoin', 'CGPDFDocument', '__CFBag', 'KernOrderedListHeader', '__SCNetworkSet', '__SecKey', 'MIDIObjectAddRemoveNotification', 'AudioUnitParameter', 'JustPCActionSubrecord', 'AudioComponentDescription', 'AudioUnitParameterValueName', 'AudioUnitParameterEvent', 'KerxControlPointAction', 'AudioTimeStamp', 'KernKerningPair', 'gss_buffer_set_desc_struct', 'MortFeatureEntry', 'FontVariation', 'CAFStringID', 'LcarCaretClassEntry', 'AudioUnitParameterStringFromValue', 'ACErrorCode', 'ALMXGlyphEntry', 'LtagTable', '__CTTypesetter', 'AuthorizationOpaqueRef', 'UIEdgeInsets', 'CGPathElement', 'CAFMarker', 'KernTableHeader', 'NoteParamsControlValue', 'SSLContext', 'gss_cred_id_t_desc_struct', 'AudioUnitParameterNameInfo', 'CGDataConsumerCallbacks', 'ALMXHeader', 'CGLineCap', 'MIDIControlTransform', 'CGPDFArray', '__SecPolicy', 'AudioConverterPrimeInfo', '__CTTextTab', '__CFNetServiceMonitor', 'AUInputSamplesInOutputCallbackStruct', '__CTFramesetter', 'CGPDFDataFormat', 'STHeader', 'CVPlanarPixelBufferInfo_YCbCrPlanar', 'MIDIValueMap', 'JustDirectionTable', '__SCBondStatus', 'SFNTLookupSegmentHeader', 'OpaqueCMMemoryPool', 'CGPathDrawingMode', 'CGFont', '__SCNetworkReachability', 'AudioClassDescription', 'CGPoint', 'AVAudio3DVectorOrientation', 'CAFStrings', '__CFNetServiceBrowser', 'opaqueMTAudioProcessingTap', 'sfntNameRecord', 'CGPDFPage', 'CGLayer', 'ComponentInstanceRecord', 'CAFInfoStrings', 'HostCallbackInfo', 'MusicDeviceNoteParams', 'OpaqueVTCompressionSession', 'KernIndexArrayHeader', 'CVPlanarPixelBufferInfo_YCbCrBiPlanar', 'MusicTrackLoopInfo', 'opaqueCMFormatDescription', 'STClassTable', 'sfntDirectoryEntry', 'OpaqueCMTimebase', 'CGDataProviderDirectCallbacks', 'MIDIPacketList', 'CAFOverviewChunk', 'MIDIPacket', 'ScheduledAudioSlice', 'CGDataProviderSequentialCallbacks', 'AudioBuffer', 'MorxRearrangementSubtable', 'CGPatternCallbacks', 'AUDistanceAttenuationData', 'MIDIIOErrorNotification', 'CGPDFContentStream', 'IUnknownVTbl', 'MIDITransform', 'MortInsertionSubtable', 'CABarBeatTime', 'AudioBufferList', '__CVBuffer', 'AURenderCallbackStruct', 'STXEntryZero', 'JustPCDuctilityAction', 'OpaqueAudioQueueTimeline', 'VTDecompressionOutputCallbackRecord', 'OpaqueMIDIClient', '__CFPlugInInstance', 'AudioQueueBuffer', '__CFFileDescriptor', 'AudioUnitConnection', '_GKTurnBasedExchangeStatus', 'LcarCaretTable', 'CVPlanarComponentInfo', 'JustWidthDeltaGroup', 'OpaqueAudioComponent', 'ParameterEvent', '__CVPixelBufferPool', '__CTFont', 'CGColorSpace', 'CGSize', 'AUDependentParameter', 'MIDIDriverInterface', 'gss_krb5_rfc1964_keydata', '__CFDateFormatter', 'LtagStringRange', 'OpaqueVTDecompressionSession', 'gss_iov_buffer_desc_struct', 'AUPresetEvent', 'PropTable', 'KernOrderedListEntry', 'CF_BRIDGED_MUTABLE_TYPE', 'gss_OID_desc_struct', 'AudioUnitPresetMAS_Settings', 'AudioFileMarker', 'JustPCConditionalAddAction', 'BslnFormat3Part', '__CFNotificationCenter', 'MortSwashSubtable', 'AUParameterMIDIMapping', 'SCNVector3', 'OpaqueAudioConverter', 'MIDIRawData', 'sfntNameHeader', '__CFRunLoop', 'MFMailComposeResult', 'CATransform3D', 'OpbdSideValues', 'CAF_SMPTE_Time', '__SecAccessControl', 'JustPCAction', 'OpaqueVTFrameSilo', 'OpaqueVTMultiPassStorage', 'CGPathElementType', 'AudioFormatListItem', 'AudioUnitExternalBuffer', 'AudioFileRegion', 'AudioValueTranslation', 'CGImageMetadataTag', 'CAFPeakChunk', 'AudioBytePacketTranslation', 'sfntCMapHeader', '__CFURLEnumerator', 'STXHeader', 'CGPDFObjectType', 'SFNTLookupArrayHeader'} if __name__ == '__main__': # pragma: no cover import os diff --git a/contrib/python/Pygments/py2/pygments/lexers/_csound_builtins.py b/contrib/python/Pygments/py2/pygments/lexers/_csound_builtins.py index 3e891be4ff..72e1fe39e9 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/_csound_builtins.py +++ b/contrib/python/Pygments/py2/pygments/lexers/_csound_builtins.py @@ -7,51 +7,51 @@ :license: BSD, see LICENSE for details. """ -# Opcodes in Csound 6.13.0 using: -# python3 -c " -# import re -# from subprocess import Popen, PIPE -# output = Popen(['csound', '--list-opcodes0'], stderr=PIPE, text=True).communicate()[1] -# opcodes = output[re.search(r'^\$', output, re.M).end() : re.search(r'^\d+ opcodes\$', output, re.M).start()].split() -# output = Popen(['csound', '--list-opcodes2'], stderr=PIPE, text=True).communicate()[1] -# all_opcodes = output[re.search(r'^\$', output, re.M).end() : re.search(r'^\d+ opcodes\$', output, re.M).start()].split() +# Opcodes in Csound 6.13.0 using: +# python3 -c " +# import re +# from subprocess import Popen, PIPE +# output = Popen(['csound', '--list-opcodes0'], stderr=PIPE, text=True).communicate()[1] +# opcodes = output[re.search(r'^\$', output, re.M).end() : re.search(r'^\d+ opcodes\$', output, re.M).start()].split() +# output = Popen(['csound', '--list-opcodes2'], stderr=PIPE, text=True).communicate()[1] +# all_opcodes = output[re.search(r'^\$', output, re.M).end() : re.search(r'^\d+ opcodes\$', output, re.M).start()].split() # deprecated_opcodes = [opcode for opcode in all_opcodes if opcode not in opcodes] -# # Remove opcodes that csound.py treats as keywords. -# keyword_opcodes = [ -# 'cggoto', # https://csound.com/docs/manual/cggoto.html -# 'cigoto', # https://csound.com/docs/manual/cigoto.html -# 'cingoto', # (undocumented) -# 'ckgoto', # https://csound.com/docs/manual/ckgoto.html -# 'cngoto', # https://csound.com/docs/manual/cngoto.html -# 'cnkgoto', # (undocumented) -# 'endin', # https://csound.com/docs/manual/endin.html -# 'endop', # https://csound.com/docs/manual/endop.html -# 'goto', # https://csound.com/docs/manual/goto.html -# 'igoto', # https://csound.com/docs/manual/igoto.html -# 'instr', # https://csound.com/docs/manual/instr.html -# 'kgoto', # https://csound.com/docs/manual/kgoto.html -# 'loop_ge', # https://csound.com/docs/manual/loop_ge.html -# 'loop_gt', # https://csound.com/docs/manual/loop_gt.html -# 'loop_le', # https://csound.com/docs/manual/loop_le.html -# 'loop_lt', # https://csound.com/docs/manual/loop_lt.html -# 'opcode', # https://csound.com/docs/manual/opcode.html -# 'reinit', # https://csound.com/docs/manual/reinit.html -# 'return', # https://csound.com/docs/manual/return.html -# 'rireturn', # https://csound.com/docs/manual/rireturn.html -# 'rigoto', # https://csound.com/docs/manual/rigoto.html -# 'tigoto', # https://csound.com/docs/manual/tigoto.html -# 'timout' # https://csound.com/docs/manual/timout.html -# ] -# opcodes = [opcode for opcode in opcodes if opcode not in keyword_opcodes] -# newline = '\n' -# print(f'''OPCODES = set(\''' -# {newline.join(opcodes)} +# # Remove opcodes that csound.py treats as keywords. +# keyword_opcodes = [ +# 'cggoto', # https://csound.com/docs/manual/cggoto.html +# 'cigoto', # https://csound.com/docs/manual/cigoto.html +# 'cingoto', # (undocumented) +# 'ckgoto', # https://csound.com/docs/manual/ckgoto.html +# 'cngoto', # https://csound.com/docs/manual/cngoto.html +# 'cnkgoto', # (undocumented) +# 'endin', # https://csound.com/docs/manual/endin.html +# 'endop', # https://csound.com/docs/manual/endop.html +# 'goto', # https://csound.com/docs/manual/goto.html +# 'igoto', # https://csound.com/docs/manual/igoto.html +# 'instr', # https://csound.com/docs/manual/instr.html +# 'kgoto', # https://csound.com/docs/manual/kgoto.html +# 'loop_ge', # https://csound.com/docs/manual/loop_ge.html +# 'loop_gt', # https://csound.com/docs/manual/loop_gt.html +# 'loop_le', # https://csound.com/docs/manual/loop_le.html +# 'loop_lt', # https://csound.com/docs/manual/loop_lt.html +# 'opcode', # https://csound.com/docs/manual/opcode.html +# 'reinit', # https://csound.com/docs/manual/reinit.html +# 'return', # https://csound.com/docs/manual/return.html +# 'rireturn', # https://csound.com/docs/manual/rireturn.html +# 'rigoto', # https://csound.com/docs/manual/rigoto.html +# 'tigoto', # https://csound.com/docs/manual/tigoto.html +# 'timout' # https://csound.com/docs/manual/timout.html +# ] +# opcodes = [opcode for opcode in opcodes if opcode not in keyword_opcodes] +# newline = '\n' +# print(f'''OPCODES = set(\''' +# {newline.join(opcodes)} # \'''.split()) # # DEPRECATED_OPCODES = set(\''' -# {newline.join(deprecated_opcodes)} +# {newline.join(deprecated_opcodes)} # \'''.split()) -# ''') +# ''') # " OPCODES = set(''' @@ -173,7 +173,7 @@ STKBowed STKBrass STKClarinet STKDrummer -STKFMVoices +STKFMVoices STKFlute STKHevyMetl STKMandolin @@ -205,7 +205,7 @@ alwayson ampdb ampdbfs ampmidi -ampmidicurve +ampmidicurve ampmidid areson aresonk @@ -422,17 +422,17 @@ flashtxt flooper flooper2 floor -fluidAllOut -fluidCCi -fluidCCk -fluidControl -fluidEngine -fluidInfo -fluidLoad -fluidNote -fluidOut -fluidProgramSelect -fluidSetInterpMethod +fluidAllOut +fluidCCi +fluidCCk +fluidControl +fluidEngine +fluidInfo +fluidLoad +fluidNote +fluidOut +fluidProgramSelect +fluidSetInterpMethod fmanal fmax fmb3 @@ -507,7 +507,7 @@ grain grain2 grain3 granule -gtf +gtf guiro harmon harmon2 @@ -615,10 +615,10 @@ la_i_multiply_mc la_i_multiply_mr la_i_multiply_vc la_i_multiply_vr -la_i_norm1_mc -la_i_norm1_mr -la_i_norm1_vc -la_i_norm1_vr +la_i_norm1_mc +la_i_norm1_mr +la_i_norm1_vc +la_i_norm1_vr la_i_norm_euclid_mc la_i_norm_euclid_mr la_i_norm_euclid_vc @@ -713,10 +713,10 @@ la_k_multiply_mc la_k_multiply_mr la_k_multiply_vc la_k_multiply_vr -la_k_norm1_mc -la_k_norm1_mr -la_k_norm1_vc -la_k_norm1_vr +la_k_norm1_mc +la_k_norm1_mr +la_k_norm1_vc +la_k_norm1_vr la_k_norm_euclid_mc la_k_norm_euclid_mr la_k_norm_euclid_vc @@ -916,8 +916,8 @@ nrpn nsamp nstance nstrnum -nstrstr -ntof +nstrstr +ntof ntom ntrpol nxtpow2 @@ -1354,7 +1354,7 @@ strfromurl strget strindex strindexk -string2array +string2array strlen strlenk strlower @@ -1606,7 +1606,7 @@ DEPRECATED_OPCODES = set(''' array bformdec bformenc -changed +changed copy2ftab copy2ttab hrtfer @@ -1616,7 +1616,7 @@ maxtab mintab pop pop_f -ptableiw +ptableiw push push_f scalet @@ -1635,7 +1635,7 @@ spectrum stack sumtab tabgen -tableiw +tableiw tabmap tabmap_i tabslice diff --git a/contrib/python/Pygments/py2/pygments/lexers/_lua_builtins.py b/contrib/python/Pygments/py2/pygments/lexers/_lua_builtins.py index 9b0f123d74..ca3acb1c10 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/_lua_builtins.py +++ b/contrib/python/Pygments/py2/pygments/lexers/_lua_builtins.py @@ -288,7 +288,7 @@ if __name__ == '__main__': # pragma: no cover print('>> %s' % full_function_name) m = get_function_module(full_function_name) modules.setdefault(m, []).append(full_function_name) - modules = {k: tuple(v) for k, v in modules.iteritems()} + modules = {k: tuple(v) for k, v in modules.iteritems()} regenerate(__file__, modules) diff --git a/contrib/python/Pygments/py2/pygments/lexers/_mapping.py b/contrib/python/Pygments/py2/pygments/lexers/_mapping.py index 71c692a476..acb71ad94b 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/_mapping.py +++ b/contrib/python/Pygments/py2/pygments/lexers/_mapping.py @@ -145,7 +145,7 @@ LEXERS = { 'ElixirLexer': ('pygments.lexers.erlang', 'Elixir', ('elixir', 'ex', 'exs'), ('*.ex', '*.exs'), ('text/x-elixir',)), 'ElmLexer': ('pygments.lexers.elm', 'Elm', ('elm',), ('*.elm',), ('text/x-elm',)), 'EmacsLispLexer': ('pygments.lexers.lisp', 'EmacsLisp', ('emacs', 'elisp', 'emacs-lisp'), ('*.el',), ('text/x-elisp', 'application/x-elisp')), - 'EmailLexer': ('pygments.lexers.email', 'E-mail', ('email', 'eml'), ('*.eml',), ('message/rfc822',)), + 'EmailLexer': ('pygments.lexers.email', 'E-mail', ('email', 'eml'), ('*.eml',), ('message/rfc822',)), 'ErbLexer': ('pygments.lexers.templates', 'ERB', ('erb',), (), ('application/x-ruby-templating',)), 'ErlangLexer': ('pygments.lexers.erlang', 'Erlang', ('erlang',), ('*.erl', '*.hrl', '*.es', '*.escript'), ('text/x-erlang',)), 'ErlangShellLexer': ('pygments.lexers.erlang', 'Erlang erl session', ('erl',), ('*.erl-sh',), ('text/x-erl-shellsession',)), @@ -255,7 +255,7 @@ 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')), - 'MIMELexer': ('pygments.lexers.mime', 'MIME', ('mime',), (), ('multipart/mixed', 'multipart/related', 'multipart/alternative')), + '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',), (), ()), 'MakefileLexer': ('pygments.lexers.make', 'Makefile', ('make', 'makefile', 'mf', 'bsdmake'), ('*.mak', '*.mk', 'Makefile', 'makefile', 'Makefile.*', 'GNUmakefile'), ('text/x-makefile',)), @@ -305,7 +305,7 @@ LEXERS = { 'NimrodLexer': ('pygments.lexers.nimrod', 'Nimrod', ('nim', 'nimrod'), ('*.nim', '*.nimrod'), ('text/x-nim',)), 'NitLexer': ('pygments.lexers.nit', 'Nit', ('nit',), ('*.nit',), ()), 'NixLexer': ('pygments.lexers.nix', 'Nix', ('nixos', 'nix'), ('*.nix',), ('text/x-nix',)), - 'NotmuchLexer': ('pygments.lexers.textfmts', 'Notmuch', ('notmuch',), (), ()), + 'NotmuchLexer': ('pygments.lexers.textfmts', 'Notmuch', ('notmuch',), (), ()), 'NuSMVLexer': ('pygments.lexers.smv', 'NuSMV', ('nusmv',), ('*.smv',), ()), 'NumPyLexer': ('pygments.lexers.python', 'NumPy', ('numpy',), (), ()), 'ObjdumpLexer': ('pygments.lexers.asm', 'objdump', ('objdump',), ('*.objdump',), ('text/x-objdump',)), @@ -343,11 +343,11 @@ LEXERS = { 'PugLexer': ('pygments.lexers.html', 'Pug', ('pug', 'jade'), ('*.pug', '*.jade'), ('text/x-pug', 'text/x-jade')), 'PuppetLexer': ('pygments.lexers.dsls', 'Puppet', ('puppet',), ('*.pp',), ()), 'PyPyLogLexer': ('pygments.lexers.console', 'PyPy Log', ('pypylog', 'pypy'), ('*.pypylog',), ('application/x-pypylog',)), - 'Python2Lexer': ('pygments.lexers.python', 'Python 2.x', ('python2', 'py2'), (), ('text/x-python2', 'application/x-python2')), - 'Python2TracebackLexer': ('pygments.lexers.python', 'Python 2.x Traceback', ('py2tb',), ('*.py2tb',), ('text/x-python2-traceback',)), + 'Python2Lexer': ('pygments.lexers.python', 'Python 2.x', ('python2', 'py2'), (), ('text/x-python2', 'application/x-python2')), + 'Python2TracebackLexer': ('pygments.lexers.python', 'Python 2.x Traceback', ('py2tb',), ('*.py2tb',), ('text/x-python2-traceback',)), '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')), + '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')), 'QBasicLexer': ('pygments.lexers.basic', 'QBasic', ('qbasic', 'basic'), ('*.BAS', '*.bas'), ('text/basic',)), 'QVToLexer': ('pygments.lexers.qvt', 'QVTO', ('qvto', 'qvt'), ('*.qvto',), ()), 'QmlLexer': ('pygments.lexers.webmisc', 'QML', ('qml', 'qbs'), ('*.qml', '*.qbs'), ('application/x-qml', 'application/x-qt.qbs+qml')), @@ -369,12 +369,12 @@ LEXERS = { 'RedLexer': ('pygments.lexers.rebol', 'Red', ('red', 'red/system'), ('*.red', '*.reds'), ('text/x-red', 'text/x-red-system')), 'RedcodeLexer': ('pygments.lexers.esoteric', 'Redcode', ('redcode',), ('*.cw',), ()), 'RegeditLexer': ('pygments.lexers.configs', 'reg', ('registry',), ('*.reg',), ('text/x-windows-registry',)), - 'ResourceLexer': ('pygments.lexers.resource', 'ResourceBundle', ('resource', 'resourcebundle'), (), ()), + 'ResourceLexer': ('pygments.lexers.resource', 'ResourceBundle', ('resource', 'resourcebundle'), (), ()), 'RexxLexer': ('pygments.lexers.scripting', 'Rexx', ('rexx', 'arexx'), ('*.rexx', '*.rex', '*.rx', '*.arexx'), ('text/x-rexx',)), 'RhtmlLexer': ('pygments.lexers.templates', 'RHTML', ('rhtml', 'html+erb', 'html+ruby'), ('*.rhtml',), ('text/html+ruby',)), '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',), ('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', ('rst', 'rest', 'restructuredtext'), ('*.rst', '*.rest'), ('text/x-rst', 'text/prs.fallenstein.rst')), @@ -389,11 +389,11 @@ LEXERS = { 'SassLexer': ('pygments.lexers.css', 'Sass', ('sass',), ('*.sass',), ('text/x-sass',)), 'ScalaLexer': ('pygments.lexers.jvm', 'Scala', ('scala',), ('*.scala',), ('text/x-scala',)), 'ScamlLexer': ('pygments.lexers.html', 'Scaml', ('scaml',), ('*.scaml',), ('text/x-scaml',)), - 'ScdocLexer': ('pygments.lexers.scdoc', 'scdoc', ('scdoc', 'scd'), ('*.scd', '*.scdoc'), ()), + 'ScdocLexer': ('pygments.lexers.scdoc', 'scdoc', ('scdoc', 'scd'), ('*.scd', '*.scdoc'), ()), 'SchemeLexer': ('pygments.lexers.lisp', 'Scheme', ('scheme', 'scm'), ('*.scm', '*.ss'), ('text/x-scheme', 'application/x-scheme')), 'ScilabLexer': ('pygments.lexers.matlab', 'Scilab', ('scilab',), ('*.sci', '*.sce', '*.tst'), ('text/scilab',)), 'ScssLexer': ('pygments.lexers.css', 'SCSS', ('scss',), ('*.scss',), ('text/x-scss',)), - 'ShExCLexer': ('pygments.lexers.rdf', 'ShExC', ('shexc', 'shex'), ('*.shex',), ('text/shex',)), + 'ShExCLexer': ('pygments.lexers.rdf', 'ShExC', ('shexc', 'shex'), ('*.shex',), ('text/shex',)), 'ShenLexer': ('pygments.lexers.lisp', 'Shen', ('shen',), ('*.shen',), ('text/x-shen', 'application/x-shen')), 'SilverLexer': ('pygments.lexers.verification', 'Silver', ('silver',), ('*.sil', '*.vpr'), ()), 'SlashLexer': ('pygments.lexers.slash', 'Slash', ('slash',), ('*.sl',), ()), @@ -405,7 +405,7 @@ LEXERS = { 'SmartyLexer': ('pygments.lexers.templates', 'Smarty', ('smarty',), ('*.tpl',), ('application/x-smarty',)), 'SnobolLexer': ('pygments.lexers.snobol', 'Snobol', ('snobol',), ('*.snobol',), ('text/x-snobol',)), 'SnowballLexer': ('pygments.lexers.dsls', 'Snowball', ('snowball',), ('*.sbl',), ()), - 'SolidityLexer': ('pygments.lexers.solidity', 'Solidity', ('solidity',), ('*.sol',), ()), + 'SolidityLexer': ('pygments.lexers.solidity', 'Solidity', ('solidity',), ('*.sol',), ()), 'SourcePawnLexer': ('pygments.lexers.pawn', 'SourcePawn', ('sp',), ('*.sp',), ('text/x-sourcepawn',)), 'SourcesListLexer': ('pygments.lexers.installers', 'Debian Sourcelist', ('sourceslist', 'sources.list', 'debsources'), ('sources.list',), ()), 'SparqlLexer': ('pygments.lexers.rdf', 'SPARQL', ('sparql',), ('*.rq', '*.sparql'), ('application/sparql-query',)), @@ -476,9 +476,9 @@ LEXERS = { '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')), 'YamlLexer': ('pygments.lexers.data', 'YAML', ('yaml',), ('*.yaml', '*.yml'), ('text/x-yaml',)), - 'ZeekLexer': ('pygments.lexers.dsls', 'Zeek', ('zeek', 'bro'), ('*.zeek', '*.bro'), ()), + 'ZeekLexer': ('pygments.lexers.dsls', 'Zeek', ('zeek', 'bro'), ('*.zeek', '*.bro'), ()), 'ZephirLexer': ('pygments.lexers.php', 'Zephir', ('zephir',), ('*.zep',), ()), - 'ZigLexer': ('pygments.lexers.zig', 'Zig', ('zig',), ('*.zig',), ('text/zig',)), + 'ZigLexer': ('pygments.lexers.zig', 'Zig', ('zig',), ('*.zig',), ('text/zig',)), } if __name__ == '__main__': # pragma: no cover diff --git a/contrib/python/Pygments/py2/pygments/lexers/_mql_builtins.py b/contrib/python/Pygments/py2/pygments/lexers/_mql_builtins.py index 0b6ae38ccf..e59fd910d1 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/_mql_builtins.py +++ b/contrib/python/Pygments/py2/pygments/lexers/_mql_builtins.py @@ -884,7 +884,7 @@ constants = ( 'PERIOD_W1', 'POINTER_AUTOMATIC', 'POINTER_DYNAMIC', - 'POINTER_INVALID', + 'POINTER_INVALID', 'PRICE_CLOSE', 'PRICE_HIGH', 'PRICE_LOW', diff --git a/contrib/python/Pygments/py2/pygments/lexers/asm.py b/contrib/python/Pygments/py2/pygments/lexers/asm.py index a55dd27bb1..32ac936127 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/asm.py +++ b/contrib/python/Pygments/py2/pygments/lexers/asm.py @@ -37,7 +37,7 @@ class GasLexer(RegexLexer): char = r'[\w$.@-]' identifier = r'(?:[a-zA-Z$_]' + char + r'*|\.' + char + '+)' number = r'(?:0[xX][a-zA-Z0-9]+|\d+)' - register = '%' + identifier + register = '%' + identifier tokens = { 'root': [ @@ -53,7 +53,7 @@ class GasLexer(RegexLexer): (string, String), ('@' + identifier, Name.Attribute), (number, Number.Integer), - (register, Name.Variable), + (register, Name.Variable), (r'[\r\n]+', Text, '#pop'), (r'[;#].*?\n', Comment, '#pop'), @@ -74,7 +74,7 @@ class GasLexer(RegexLexer): (identifier, Name.Constant), (number, Number.Integer), # Registers - (register, Name.Variable), + (register, Name.Variable), # Numeric constants ('$'+number, Number.Integer), (r"$'(.|\\')'", String.Char), @@ -457,10 +457,10 @@ class NasmLexer(RegexLexer): filenames = ['*.asm', '*.ASM'] mimetypes = ['text/x-nasm'] - # Tasm uses the same file endings, but TASM is not as common as NASM, so - # we prioritize NASM higher by default - priority = 1.0 - + # Tasm uses the same file endings, but TASM is not as common as NASM, so + # we prioritize NASM higher by default + priority = 1.0 + identifier = r'[a-z$._?][\w$.?#@~]*' hexn = r'(?:0x[0-9a-f]+|$0[0-9a-f]*|[0-9]+[0-9a-f]*h)' octn = r'[0-7]+q' @@ -526,12 +526,12 @@ class NasmLexer(RegexLexer): ], } - def analyse_text(text): - # Probably TASM - if re.match(r'PROC', text, re.IGNORECASE): - return False + def analyse_text(text): + # Probably TASM + if re.match(r'PROC', text, re.IGNORECASE): + return False + - class NasmObjdumpLexer(ObjdumpLexer): """ For the output of 'objdump -d -M intel'. @@ -625,12 +625,12 @@ class TasmLexer(RegexLexer): ], } - def analyse_text(text): - # See above - if re.match(r'PROC', text, re.I): - return True + def analyse_text(text): + # See above + if re.match(r'PROC', text, re.I): + return True + - class Ca65Lexer(RegexLexer): """ For ca65 assembler sources. diff --git a/contrib/python/Pygments/py2/pygments/lexers/bibtex.py b/contrib/python/Pygments/py2/pygments/lexers/bibtex.py index 2c4c84b54e..6d15c230d2 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/bibtex.py +++ b/contrib/python/Pygments/py2/pygments/lexers/bibtex.py @@ -33,7 +33,7 @@ class BibTeXLexer(ExtendedRegexLexer): flags = re.IGNORECASE ALLOWED_CHARS = r'@!$&*+\-./:;<>?\[\\\]^`|~' - IDENTIFIER = '[{}][{}]*'.format('a-z_' + ALLOWED_CHARS, r'\w' + ALLOWED_CHARS) + IDENTIFIER = '[{}][{}]*'.format('a-z_' + ALLOWED_CHARS, r'\w' + ALLOWED_CHARS) def open_brace_callback(self, match, ctx): opening_brace = match.group() diff --git a/contrib/python/Pygments/py2/pygments/lexers/c_cpp.py b/contrib/python/Pygments/py2/pygments/lexers/c_cpp.py index fd7acfed4b..5d84a37758 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/c_cpp.py +++ b/contrib/python/Pygments/py2/pygments/lexers/c_cpp.py @@ -144,21 +144,21 @@ class CFamilyLexer(RegexLexer): ] } - stdlib_types = { + stdlib_types = { 'size_t', 'ssize_t', 'off_t', 'wchar_t', 'ptrdiff_t', 'sig_atomic_t', 'fpos_t', 'clock_t', 'time_t', 'va_list', 'jmp_buf', 'FILE', 'DIR', 'div_t', 'ldiv_t', - 'mbstate_t', 'wctrans_t', 'wint_t', 'wctype_t'} - c99_types = { + 'mbstate_t', 'wctrans_t', 'wint_t', 'wctype_t'} + c99_types = { '_Bool', '_Complex', 'int8_t', 'int16_t', 'int32_t', 'int64_t', 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', 'int_least8_t', 'int_least16_t', 'int_least32_t', 'int_least64_t', 'uint_least8_t', 'uint_least16_t', 'uint_least32_t', 'uint_least64_t', 'int_fast8_t', 'int_fast16_t', 'int_fast32_t', 'int_fast64_t', 'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t', 'uint_fast64_t', - 'intptr_t', 'uintptr_t', 'intmax_t', 'uintmax_t'} - linux_types = { + 'intptr_t', 'uintptr_t', 'intmax_t', 'uintmax_t'} + linux_types = { 'clockid_t', 'cpu_set_t', 'cpumask_t', 'dev_t', 'gid_t', 'id_t', 'ino_t', 'key_t', 'mode_t', 'nfds_t', 'pid_t', 'rlim_t', 'sig_t', 'sighandler_t', 'siginfo_t', - 'sigset_t', 'sigval_t', 'socklen_t', 'timer_t', 'uid_t'} + 'sigset_t', 'sigval_t', 'socklen_t', 'timer_t', 'uid_t'} def __init__(self, **options): self.stdlibhighlighting = get_bool_opt(options, 'stdlibhighlighting', True) diff --git a/contrib/python/Pygments/py2/pygments/lexers/c_like.py b/contrib/python/Pygments/py2/pygments/lexers/c_like.py index 2d39f2812c..82dee35ad3 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/c_like.py +++ b/contrib/python/Pygments/py2/pygments/lexers/c_like.py @@ -291,23 +291,23 @@ class CudaLexer(CLexer): aliases = ['cuda', 'cu'] mimetypes = ['text/x-cuda'] - function_qualifiers = {'__device__', '__global__', '__host__', - '__noinline__', '__forceinline__'} - variable_qualifiers = {'__device__', '__constant__', '__shared__', - '__restrict__'} - vector_types = {'char1', 'uchar1', 'char2', 'uchar2', 'char3', 'uchar3', - 'char4', 'uchar4', 'short1', 'ushort1', 'short2', 'ushort2', - 'short3', 'ushort3', 'short4', 'ushort4', 'int1', 'uint1', - 'int2', 'uint2', 'int3', 'uint3', 'int4', 'uint4', 'long1', - 'ulong1', 'long2', 'ulong2', 'long3', 'ulong3', 'long4', - 'ulong4', 'longlong1', 'ulonglong1', 'longlong2', - 'ulonglong2', 'float1', 'float2', 'float3', 'float4', - 'double1', 'double2', 'dim3'} - variables = {'gridDim', 'blockIdx', 'blockDim', 'threadIdx', 'warpSize'} - functions = {'__threadfence_block', '__threadfence', '__threadfence_system', - '__syncthreads', '__syncthreads_count', '__syncthreads_and', - '__syncthreads_or'} - execution_confs = {'<<<', '>>>'} + function_qualifiers = {'__device__', '__global__', '__host__', + '__noinline__', '__forceinline__'} + variable_qualifiers = {'__device__', '__constant__', '__shared__', + '__restrict__'} + vector_types = {'char1', 'uchar1', 'char2', 'uchar2', 'char3', 'uchar3', + 'char4', 'uchar4', 'short1', 'ushort1', 'short2', 'ushort2', + 'short3', 'ushort3', 'short4', 'ushort4', 'int1', 'uint1', + 'int2', 'uint2', 'int3', 'uint3', 'int4', 'uint4', 'long1', + 'ulong1', 'long2', 'ulong2', 'long3', 'ulong3', 'long4', + 'ulong4', 'longlong1', 'ulonglong1', 'longlong2', + 'ulonglong2', 'float1', 'float2', 'float3', 'float4', + 'double1', 'double2', 'dim3'} + variables = {'gridDim', 'blockIdx', 'blockDim', 'threadIdx', 'warpSize'} + functions = {'__threadfence_block', '__threadfence', '__threadfence_system', + '__syncthreads', '__syncthreads_count', '__syncthreads_and', + '__syncthreads_or'} + execution_confs = {'<<<', '>>>'} def get_tokens_unprocessed(self, text): for index, token, value in CLexer.get_tokens_unprocessed(self, text): @@ -352,7 +352,7 @@ class SwigLexer(CppLexer): } # This is a far from complete set of SWIG directives - swig_directives = { + swig_directives = { # Most common directives '%apply', '%define', '%director', '%enddef', '%exception', '%extend', '%feature', '%fragment', '%ignore', '%immutable', '%import', '%include', @@ -371,7 +371,7 @@ class SwigLexer(CppLexer): '%pythoncallback', '%pythoncode', '%pythondynamic', '%pythonmaybecall', '%pythonnondynamic', '%pythonprepend', '%refobject', '%shadow', '%sizeof', '%trackobjects', '%types', '%unrefobject', '%varargs', '%warn', - '%warnfilter'} + '%warnfilter'} def analyse_text(text): rv = 0 @@ -429,13 +429,13 @@ class ArduinoLexer(CppLexer): mimetypes = ['text/x-arduino'] # Language sketch main structure functions - structure = {'setup', 'loop'} + structure = {'setup', 'loop'} # Language operators - operators = {'not', 'or', 'and', 'xor'} + operators = {'not', 'or', 'and', 'xor'} # Language 'variables' - variables = { + variables = { 'DIGITAL_MESSAGE', 'FIRMATA_STRING', 'ANALOG_MESSAGE', 'REPORT_DIGITAL', 'REPORT_ANALOG', 'INPUT_PULLUP', 'SET_PIN_MODE', 'INTERNAL2V56', 'SYSTEM_RESET', 'LED_BUILTIN', 'INTERNAL1V1', 'SYSEX_START', 'INTERNAL', 'EXTERNAL', 'HIGH', @@ -452,10 +452,10 @@ class ArduinoLexer(CppLexer): 'signed', 'inline', 'delete', '_Bool', 'complex', '_Complex', '_Imaginary', 'atomic_bool', 'atomic_char', 'atomic_schar', 'atomic_uchar', 'atomic_short', 'atomic_ushort', 'atomic_int', 'atomic_uint', 'atomic_long', 'atomic_ulong', - 'atomic_llong', 'atomic_ullong', 'PROGMEM'} + 'atomic_llong', 'atomic_ullong', 'PROGMEM'} # Language shipped functions and class ( ) - functions = { + functions = { 'KeyboardController', 'MouseController', 'SoftwareSerial', 'EthernetServer', 'EthernetClient', 'LiquidCrystal', 'RobotControl', 'GSMVoiceCall', 'EthernetUDP', 'EsploraTFT', 'HttpClient', 'RobotMotor', 'WiFiClient', @@ -517,13 +517,13 @@ class ArduinoLexer(CppLexer): 'cos', 'sin', 'pow', 'map', 'abs', 'max', 'min', 'get', 'run', 'put', 'isAlphaNumeric', 'isAlpha', 'isAscii', 'isWhitespace', 'isControl', 'isDigit', 'isGraph', 'isLowerCase', 'isPrintable', 'isPunct', 'isSpace', 'isUpperCase', - 'isHexadecimalDigit'} + 'isHexadecimalDigit'} # do not highlight - suppress_highlight = { + suppress_highlight = { 'namespace', 'template', 'mutable', 'using', 'asm', 'typeid', 'typename', 'this', 'alignof', 'constexpr', 'decltype', 'noexcept', - 'static_assert', 'thread_local', 'restrict'} + 'static_assert', 'thread_local', 'restrict'} def get_tokens_unprocessed(self, text): for index, token, value in CppLexer.get_tokens_unprocessed(self, text): diff --git a/contrib/python/Pygments/py2/pygments/lexers/configs.py b/contrib/python/Pygments/py2/pygments/lexers/configs.py index d9b0f188b2..0911b6e24c 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/configs.py +++ b/contrib/python/Pygments/py2/pygments/lexers/configs.py @@ -300,7 +300,7 @@ class ApacheConfLexer(RegexLexer): tokens = { 'root': [ (r'\s+', Text), - (r'#(.*\\\n)+.*$|(#.*?)$', Comment), + (r'#(.*\\\n)+.*$|(#.*?)$', Comment), (r'(<[^\s>]+)(?:(\s+)(.*))?(>)', bygroups(Name.Tag, Text, String, Name.Tag)), (r'([a-z]\w*)(\s+)', @@ -319,7 +319,7 @@ class ApacheConfLexer(RegexLexer): r'os|productonly|full|emerg|alert|crit|error|warn|' r'notice|info|debug|registry|script|inetd|standalone|' r'user|group)\b', Keyword), - (r'"([^"\\]*(?:\\(.|[\n])[^"\\]*)*)"', String.Double), + (r'"([^"\\]*(?:\\(.|[\n])[^"\\]*)*)"', String.Double), (r'[^\s"\\]+', Text) ], } @@ -540,16 +540,16 @@ class DockerLexer(RegexLexer): filenames = ['Dockerfile', '*.docker'] mimetypes = ['text/x-dockerfile-config'] - _keywords = (r'(?:MAINTAINER|EXPOSE|WORKDIR|USER|STOPSIGNAL)') + _keywords = (r'(?:MAINTAINER|EXPOSE|WORKDIR|USER|STOPSIGNAL)') _bash_keywords = (r'(?:RUN|CMD|ENTRYPOINT|ENV|ARG|LABEL|ADD|COPY)') - _lb = r'(?:\s*\\?\s*)' # dockerfile line break regex + _lb = r'(?:\s*\\?\s*)' # dockerfile line break regex flags = re.IGNORECASE | re.MULTILINE tokens = { 'root': [ (r'#.*', Comment), - (r'(FROM)([ \t]*)(\S*)([ \t]*)(?:(AS)([ \t]*)(\S*))?', - bygroups(Keyword, Text, String, Text, Keyword, Text, String)), + (r'(FROM)([ \t]*)(\S*)([ \t]*)(?:(AS)([ \t]*)(\S*))?', + bygroups(Keyword, Text, String, Text, Keyword, Text, String)), (r'(ONBUILD)(%s)' % (_lb,), bygroups(Keyword, using(BashLexer))), (r'(HEALTHCHECK)((%s--\w+=\w+%s)*)' % (_lb, _lb), bygroups(Keyword, using(BashLexer))), @@ -576,35 +576,35 @@ class TerraformLexer(RegexLexer): filenames = ['*.tf'] mimetypes = ['application/x-tf', 'application/x-terraform'] - embedded_keywords = ('ingress', 'egress', 'listener', 'default', - 'connection', 'alias', 'terraform', 'tags', 'vars', - 'config', 'lifecycle', 'timeouts') + embedded_keywords = ('ingress', 'egress', 'listener', 'default', + 'connection', 'alias', 'terraform', 'tags', 'vars', + 'config', 'lifecycle', 'timeouts') tokens = { 'root': [ - include('string'), - include('punctuation'), - include('curly'), - include('basic'), - include('whitespace'), - (r'[0-9]+', Number), + include('string'), + include('punctuation'), + include('curly'), + include('basic'), + include('whitespace'), + (r'[0-9]+', Number), ], 'basic': [ - (words(('true', 'false'), prefix=r'\b', suffix=r'\b'), Keyword.Type), - (r'\s*/\*', Comment.Multiline, 'comment'), - (r'\s*#.*\n', Comment.Single), - (r'(.*?)(\s*)(=)', bygroups(Name.Attribute, Text, Operator)), - (words(('variable', 'resource', 'provider', 'provisioner', 'module', - 'backend', 'data', 'output'), prefix=r'\b', suffix=r'\b'), - Keyword.Reserved, 'function'), - (words(embedded_keywords, prefix=r'\b', suffix=r'\b'), - Keyword.Declaration), - (r'\$\{', String.Interpol, 'var_builtin'), + (words(('true', 'false'), prefix=r'\b', suffix=r'\b'), Keyword.Type), + (r'\s*/\*', Comment.Multiline, 'comment'), + (r'\s*#.*\n', Comment.Single), + (r'(.*?)(\s*)(=)', bygroups(Name.Attribute, Text, Operator)), + (words(('variable', 'resource', 'provider', 'provisioner', 'module', + 'backend', 'data', 'output'), prefix=r'\b', suffix=r'\b'), + Keyword.Reserved, 'function'), + (words(embedded_keywords, prefix=r'\b', suffix=r'\b'), + Keyword.Declaration), + (r'\$\{', String.Interpol, 'var_builtin'), ], 'function': [ - (r'(\s+)(".*")(\s+)', bygroups(Text, String, Text)), - include('punctuation'), - include('curly'), + (r'(\s+)(".*")(\s+)', bygroups(Text, String, Text)), + include('punctuation'), + include('curly'), ], 'var_builtin': [ (r'\$\{', String.Interpol, '#push'), diff --git a/contrib/python/Pygments/py2/pygments/lexers/csound.py b/contrib/python/Pygments/py2/pygments/lexers/csound.py index e5ee14c652..c35bd94b0e 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/csound.py +++ b/contrib/python/Pygments/py2/pygments/lexers/csound.py @@ -35,7 +35,7 @@ class CsoundLexer(RegexLexer): 'preprocessor directives': [ (r'#(?:e(?:nd(?:if)?|lse)\b|##)|@@?[ \t]*\d+', Comment.Preproc), - (r'#includestr', Comment.Preproc, 'includestr directive'), + (r'#includestr', Comment.Preproc, 'includestr directive'), (r'#include', Comment.Preproc, 'include directive'), (r'#[ \t]*define', Comment.Preproc, 'define directive'), (r'#(?:ifn?def|undef)\b', Comment.Preproc, 'macro directive') @@ -45,10 +45,10 @@ class CsoundLexer(RegexLexer): include('whitespace'), (r'([^ \t]).*?\1', String, '#pop') ], - 'includestr directive': [ - include('whitespace'), - (r'"', String, ('#pop', 'quoted string')) - ], + 'includestr directive': [ + include('whitespace'), + (r'"', String, ('#pop', 'quoted string')) + ], 'define directive': [ (r'\n', Text), @@ -119,13 +119,13 @@ class CsoundLexer(RegexLexer): (r'\d+', Number.Integer) ], - 'quoted string': [ - (r'"', String, '#pop'), - (r'[^"$]+', String), - include('macro uses'), - (r'[$]', String) - ], - + 'quoted string': [ + (r'"', String, '#pop'), + (r'[^"$]+', String), + include('macro uses'), + (r'[$]', String) + ], + 'braced string': [ # Do nothing. This must be defined in subclasses. ] @@ -134,7 +134,7 @@ class CsoundLexer(RegexLexer): class CsoundScoreLexer(CsoundLexer): """ - For `Csound <https://csound.com>`_ scores. + For `Csound <https://csound.com>`_ scores. .. versionadded:: 2.1 """ @@ -156,7 +156,7 @@ class CsoundScoreLexer(CsoundLexer): (r'z', Keyword.Constant), # z is a constant equal to 800,000,000,000. 800 billion seconds is about # 25,367.8 years. See also - # https://csound.com/docs/manual/ScoreTop.html and + # https://csound.com/docs/manual/ScoreTop.html and # https://github.com/csound/csound/search?q=stof+path%3AEngine+filename%3Asread.c. (r'([nNpP][pP])(\d+)', bygroups(Keyword, Number.Integer)), @@ -200,7 +200,7 @@ class CsoundScoreLexer(CsoundLexer): class CsoundOrchestraLexer(CsoundLexer): """ - For `Csound <https://csound.com>`_ orchestras. + For `Csound <https://csound.com>`_ orchestras. .. versionadded:: 2.1 """ @@ -217,25 +217,25 @@ class CsoundOrchestraLexer(CsoundLexer): yield match.start(), Name.Function, opcode def name_callback(lexer, match): - type_annotation_token = Keyword.Type - + type_annotation_token = Keyword.Type + name = match.group(1) if name in OPCODES or name in DEPRECATED_OPCODES: yield match.start(), Name.Builtin, name elif name in lexer.user_defined_opcodes: yield match.start(), Name.Function, name else: - type_annotation_token = Name - name_match = re.search(r'^(g?[afikSw])(\w+)', name) - if name_match: - yield name_match.start(1), Keyword.Type, name_match.group(1) - yield name_match.start(2), Name, name_match.group(2) + type_annotation_token = Name + name_match = re.search(r'^(g?[afikSw])(\w+)', name) + if name_match: + yield name_match.start(1), Keyword.Type, name_match.group(1) + yield name_match.start(2), Name, name_match.group(2) else: yield match.start(), Name, name - if match.group(2): - yield match.start(2), Punctuation, match.group(2) - yield match.start(3), type_annotation_token, match.group(3) + if match.group(2): + yield match.start(2), Punctuation, match.group(2) + yield match.start(3), type_annotation_token, match.group(3) tokens = { 'root': [ @@ -330,13 +330,13 @@ class CsoundOrchestraLexer(CsoundLexer): (r'\\(?:[\\abnrt"]|[0-7]{1,3})', String.Escape) ], # Format specifiers are highlighted in all strings, even though only - # fprintks https://csound.com/docs/manual/fprintks.html - # fprints https://csound.com/docs/manual/fprints.html - # printf/printf_i https://csound.com/docs/manual/printf.html - # printks https://csound.com/docs/manual/printks.html - # prints https://csound.com/docs/manual/prints.html - # sprintf https://csound.com/docs/manual/sprintf.html - # sprintfk https://csound.com/docs/manual/sprintfk.html + # fprintks https://csound.com/docs/manual/fprintks.html + # fprints https://csound.com/docs/manual/fprints.html + # printf/printf_i https://csound.com/docs/manual/printf.html + # printks https://csound.com/docs/manual/printks.html + # prints https://csound.com/docs/manual/prints.html + # sprintf https://csound.com/docs/manual/sprintf.html + # sprintfk https://csound.com/docs/manual/sprintfk.html # work with strings that contain format specifiers. In addition, these # opcodes’ handling of format specifiers is inconsistent: # - fprintks, fprints, printks, and prints do accept %a and %A @@ -373,7 +373,7 @@ class CsoundOrchestraLexer(CsoundLexer): 'Csound score opcode': [ include('whitespace and macro uses'), - (r'"', String, 'quoted string'), + (r'"', String, 'quoted string'), (r'\{\{', String, 'Csound score'), (r'\n', Text, '#pop') ], @@ -384,7 +384,7 @@ class CsoundOrchestraLexer(CsoundLexer): 'Python opcode': [ include('whitespace and macro uses'), - (r'"', String, 'quoted string'), + (r'"', String, 'quoted string'), (r'\{\{', String, 'Python'), (r'\n', Text, '#pop') ], @@ -395,7 +395,7 @@ class CsoundOrchestraLexer(CsoundLexer): 'Lua opcode': [ include('whitespace and macro uses'), - (r'"', String, 'quoted string'), + (r'"', String, 'quoted string'), (r'\{\{', String, 'Lua'), (r'\n', Text, '#pop') ], @@ -408,7 +408,7 @@ class CsoundOrchestraLexer(CsoundLexer): class CsoundDocumentLexer(RegexLexer): """ - For `Csound <https://csound.com>`_ documents. + For `Csound <https://csound.com>`_ documents. .. versionadded:: 2.1 """ diff --git a/contrib/python/Pygments/py2/pygments/lexers/data.py b/contrib/python/Pygments/py2/pygments/lexers/data.py index ccfe8a31ef..46ca734006 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/data.py +++ b/contrib/python/Pygments/py2/pygments/lexers/data.py @@ -233,7 +233,7 @@ class YamlLexer(ExtendedRegexLexer): # whitespaces separating tokens (r'[ ]+', Text), # key with colon - (r'''([^#,:?\[\]{}"'\n]+)(:)(?=[ ]|$)''', + (r'''([^#,:?\[\]{}"'\n]+)(:)(?=[ ]|$)''', bygroups(Name.Tag, set_indent(Punctuation, implicit=True))), # tags, anchors and aliases, include('descriptors'), diff --git a/contrib/python/Pygments/py2/pygments/lexers/dsls.py b/contrib/python/Pygments/py2/pygments/lexers/dsls.py index d940ca4461..0af3c6c273 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/dsls.py +++ b/contrib/python/Pygments/py2/pygments/lexers/dsls.py @@ -16,7 +16,7 @@ from pygments.lexer import ExtendedRegexLexer, RegexLexer, bygroups, words, \ from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ Number, Punctuation, Literal, Whitespace -__all__ = ['ProtoBufLexer', 'ZeekLexer', 'PuppetLexer', 'RslLexer', +__all__ = ['ProtoBufLexer', 'ZeekLexer', 'PuppetLexer', 'RslLexer', 'MscgenLexer', 'VGLLexer', 'AlloyLexer', 'PanLexer', 'CrmshLexer', 'ThriftLexer', 'FlatlineLexer', 'SnowballLexer'] @@ -40,9 +40,9 @@ class ProtoBufLexer(RegexLexer): (r'/(\\\n)?/(\n|(.|\n)*?[^\\]\n)', Comment.Single), (r'/(\\\n)?\*(.|\n)*?\*(\\\n)?/', Comment.Multiline), (words(( - 'import', 'option', 'optional', 'required', 'repeated', - 'reserved', 'default', 'packed', 'ctype', 'extensions', 'to', - 'max', 'rpc', 'returns', 'oneof'), prefix=r'\b', suffix=r'\b'), + 'import', 'option', 'optional', 'required', 'repeated', + 'reserved', 'default', 'packed', 'ctype', 'extensions', 'to', + 'max', 'rpc', 'returns', 'oneof'), prefix=r'\b', suffix=r'\b'), Keyword), (words(( 'int32', 'int64', 'uint32', 'uint64', 'sint32', 'sint64', @@ -188,166 +188,166 @@ class ThriftLexer(RegexLexer): } -class ZeekLexer(RegexLexer): +class ZeekLexer(RegexLexer): """ - For `Zeek <https://www.zeek.org/>`_ scripts. + For `Zeek <https://www.zeek.org/>`_ scripts. - .. versionadded:: 2.5 + .. versionadded:: 2.5 """ - name = 'Zeek' - aliases = ['zeek', 'bro'] - filenames = ['*.zeek', '*.bro'] + name = 'Zeek' + aliases = ['zeek', 'bro'] + filenames = ['*.zeek', '*.bro'] - _hex = r'[0-9a-fA-F]' + _hex = r'[0-9a-fA-F]' _float = r'((\d*\.?\d+)|(\d+\.?\d*))([eE][-+]?\d+)?' _h = r'[A-Za-z0-9][-A-Za-z0-9]*' tokens = { 'root': [ - include('whitespace'), - include('comments'), - include('directives'), - include('attributes'), - include('types'), - include('keywords'), - include('literals'), - include('operators'), - include('punctuation'), - (r'((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)(?=\s*\()', - Name.Function), - include('identifiers'), - ], - - 'whitespace': [ + include('whitespace'), + include('comments'), + include('directives'), + include('attributes'), + include('types'), + include('keywords'), + include('literals'), + include('operators'), + include('punctuation'), + (r'((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)(?=\s*\()', + Name.Function), + include('identifiers'), + ], + + 'whitespace': [ (r'\n', Text), (r'\s+', Text), (r'\\\n', Text), - ], - - 'comments': [ - (r'#.*$', Comment), - ], - - 'directives': [ - (r'@(load-plugin|load-sigs|load|unload)\b.*$', Comment.Preproc), - (r'@(DEBUG|DIR|FILENAME|deprecated|if|ifdef|ifndef|else|endif)\b', Comment.Preproc), - (r'(@prefixes)\s*(\+?=).*$', Comment.Preproc), - ], - - 'attributes': [ - (words(('redef', 'priority', 'log', 'optional', 'default', 'add_func', - 'delete_func', 'expire_func', 'read_expire', 'write_expire', - 'create_expire', 'synchronized', 'persistent', 'rotate_interval', - 'rotate_size', 'encrypt', 'raw_output', 'mergeable', 'error_handler', - 'type_column', 'deprecated'), - prefix=r'&', suffix=r'\b'), - Keyword.Pseudo), - ], - - 'types': [ - (words(('any', - 'enum', 'record', 'set', 'table', 'vector', - 'function', 'hook', 'event', - 'addr', 'bool', 'count', 'double', 'file', 'int', 'interval', - 'pattern', 'port', 'string', 'subnet', 'time'), - suffix=r'\b'), - Keyword.Type), - - (r'(opaque)(\s+)(of)(\s+)((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)\b', - bygroups(Keyword.Type, Text, Operator.Word, Text, Keyword.Type)), - - (r'(type)(\s+)((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)(\s*)(:)(\s*)\b(record|enum)\b', - bygroups(Keyword, Text, Name.Class, Text, Operator, Text, Keyword.Type)), - - (r'(type)(\s+)((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)(\s*)(:)', - bygroups(Keyword, Text, Name, Text, Operator)), - - (r'(redef)(\s+)(record|enum)(\s+)((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)\b', - bygroups(Keyword, Text, Keyword.Type, Text, Name.Class)), - ], - - 'keywords': [ - (words(('redef', 'export', 'if', 'else', 'for', 'while', - 'return', 'break', 'next', 'continue', 'fallthrough', - 'switch', 'default', 'case', - 'add', 'delete', - 'when', 'timeout', 'schedule'), - suffix=r'\b'), - Keyword), - (r'(print)\b', Keyword), - (r'(global|local|const|option)\b', Keyword.Declaration), - (r'(module)(\s+)(([A-Za-z_]\w*)(?:::([A-Za-z_]\w*))*)\b', - bygroups(Keyword.Namespace, Text, Name.Namespace)), - ], - - 'literals': [ - (r'"', String, 'string'), - - # Not the greatest match for patterns, but generally helps - # disambiguate between start of a pattern and just a division - # operator. - (r'/(?=.*/)', String.Regex, 'regex'), - + ], + + 'comments': [ + (r'#.*$', Comment), + ], + + 'directives': [ + (r'@(load-plugin|load-sigs|load|unload)\b.*$', Comment.Preproc), + (r'@(DEBUG|DIR|FILENAME|deprecated|if|ifdef|ifndef|else|endif)\b', Comment.Preproc), + (r'(@prefixes)\s*(\+?=).*$', Comment.Preproc), + ], + + 'attributes': [ + (words(('redef', 'priority', 'log', 'optional', 'default', 'add_func', + 'delete_func', 'expire_func', 'read_expire', 'write_expire', + 'create_expire', 'synchronized', 'persistent', 'rotate_interval', + 'rotate_size', 'encrypt', 'raw_output', 'mergeable', 'error_handler', + 'type_column', 'deprecated'), + prefix=r'&', suffix=r'\b'), + Keyword.Pseudo), + ], + + 'types': [ + (words(('any', + 'enum', 'record', 'set', 'table', 'vector', + 'function', 'hook', 'event', + 'addr', 'bool', 'count', 'double', 'file', 'int', 'interval', + 'pattern', 'port', 'string', 'subnet', 'time'), + suffix=r'\b'), + Keyword.Type), + + (r'(opaque)(\s+)(of)(\s+)((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)\b', + bygroups(Keyword.Type, Text, Operator.Word, Text, Keyword.Type)), + + (r'(type)(\s+)((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)(\s*)(:)(\s*)\b(record|enum)\b', + bygroups(Keyword, Text, Name.Class, Text, Operator, Text, Keyword.Type)), + + (r'(type)(\s+)((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)(\s*)(:)', + bygroups(Keyword, Text, Name, Text, Operator)), + + (r'(redef)(\s+)(record|enum)(\s+)((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)\b', + bygroups(Keyword, Text, Keyword.Type, Text, Name.Class)), + ], + + 'keywords': [ + (words(('redef', 'export', 'if', 'else', 'for', 'while', + 'return', 'break', 'next', 'continue', 'fallthrough', + 'switch', 'default', 'case', + 'add', 'delete', + 'when', 'timeout', 'schedule'), + suffix=r'\b'), + Keyword), + (r'(print)\b', Keyword), + (r'(global|local|const|option)\b', Keyword.Declaration), + (r'(module)(\s+)(([A-Za-z_]\w*)(?:::([A-Za-z_]\w*))*)\b', + bygroups(Keyword.Namespace, Text, Name.Namespace)), + ], + + 'literals': [ + (r'"', String, 'string'), + + # Not the greatest match for patterns, but generally helps + # disambiguate between start of a pattern and just a division + # operator. + (r'/(?=.*/)', String.Regex, 'regex'), + (r'(T|F)\b', Keyword.Constant), - - # Port - (r'\d{1,5}/(udp|tcp|icmp|unknown)\b', Number), - - # IPv4 Address - (r'(\d{1,3}.){3}(\d{1,3})\b', Number), - - # IPv6 Address - (r'\[([0-9a-fA-F]{0,4}:){2,7}([0-9a-fA-F]{0,4})?((\d{1,3}.){3}(\d{1,3}))?\]', Number), - - # Numeric - (r'0[xX]' + _hex + r'+\b', Number.Hex), - (_float + r'\s*(day|hr|min|sec|msec|usec)s?\b', Number.Float), - (_float + r'\b', Number.Float), - (r'(\d+)\b', Number.Integer), - + + # Port + (r'\d{1,5}/(udp|tcp|icmp|unknown)\b', Number), + + # IPv4 Address + (r'(\d{1,3}.){3}(\d{1,3})\b', Number), + + # IPv6 Address + (r'\[([0-9a-fA-F]{0,4}:){2,7}([0-9a-fA-F]{0,4})?((\d{1,3}.){3}(\d{1,3}))?\]', Number), + + # Numeric + (r'0[xX]' + _hex + r'+\b', Number.Hex), + (_float + r'\s*(day|hr|min|sec|msec|usec)s?\b', Number.Float), + (_float + r'\b', Number.Float), + (r'(\d+)\b', Number.Integer), + # Hostnames (_h + r'(\.' + _h + r')+', String), - ], - - 'operators': [ - (r'[!%*/+<=>~|&^-]', Operator), + ], + + 'operators': [ + (r'[!%*/+<=>~|&^-]', Operator), (r'([-+=&|]{2}|[+=!><-]=)', Operator), - (r'(in|as|is|of)\b', Operator.Word), - (r'\??\$', Operator), - ], - - 'punctuation': [ - (r'[{}()\[\],;.]', Punctuation), - # The "ternary if", which uses '?' and ':', could instead be - # treated as an Operator, but colons are more frequently used to - # separate field/identifier names from their types, so the (often) - # less-prominent Punctuation is used even with '?' for consistency. - (r'[?:]', Punctuation), - ], - - 'identifiers': [ - (r'([a-zA-Z_]\w*)(::)', bygroups(Name, Punctuation)), + (r'(in|as|is|of)\b', Operator.Word), + (r'\??\$', Operator), + ], + + 'punctuation': [ + (r'[{}()\[\],;.]', Punctuation), + # The "ternary if", which uses '?' and ':', could instead be + # treated as an Operator, but colons are more frequently used to + # separate field/identifier names from their types, so the (often) + # less-prominent Punctuation is used even with '?' for consistency. + (r'[?:]', Punctuation), + ], + + 'identifiers': [ + (r'([a-zA-Z_]\w*)(::)', bygroups(Name, Punctuation)), (r'[a-zA-Z_]\w*', Name) ], - + 'string': [ - (r'\\.', String.Escape), - (r'%-?[0-9]*(\.[0-9]+)?[DTdxsefg]', String.Escape), + (r'\\.', String.Escape), + (r'%-?[0-9]*(\.[0-9]+)?[DTdxsefg]', String.Escape), (r'"', String, '#pop'), - (r'.', String), + (r'.', String), ], - + 'regex': [ - (r'\\.', String.Escape), + (r'\\.', String.Escape), (r'/', String.Regex, '#pop'), - (r'.', String.Regex), - ], + (r'.', String.Regex), + ], } -BroLexer = ZeekLexer - - +BroLexer = ZeekLexer + + class PuppetLexer(RegexLexer): """ For `Puppet <http://puppetlabs.com/>`__ configuration DSL. diff --git a/contrib/python/Pygments/py2/pygments/lexers/dylan.py b/contrib/python/Pygments/py2/pygments/lexers/dylan.py index e0a9f76d5c..dd972bf4d6 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/dylan.py +++ b/contrib/python/Pygments/py2/pygments/lexers/dylan.py @@ -32,27 +32,27 @@ class DylanLexer(RegexLexer): flags = re.IGNORECASE - builtins = { + builtins = { 'subclass', 'abstract', 'block', 'concrete', 'constant', 'class', 'compiler-open', 'compiler-sideways', 'domain', 'dynamic', 'each-subclass', 'exception', 'exclude', 'function', 'generic', 'handler', 'inherited', 'inline', 'inline-only', 'instance', 'interface', 'import', 'keyword', 'library', 'macro', 'method', 'module', 'open', 'primary', 'required', 'sealed', 'sideways', - 'singleton', 'slot', 'thread', 'variable', 'virtual'} + 'singleton', 'slot', 'thread', 'variable', 'virtual'} - keywords = { + keywords = { 'above', 'afterwards', 'begin', 'below', 'by', 'case', 'cleanup', 'create', 'define', 'else', 'elseif', 'end', 'export', 'finally', 'for', 'from', 'if', 'in', 'let', 'local', 'otherwise', 'rename', 'select', 'signal', 'then', 'to', 'unless', 'until', 'use', 'when', - 'while'} + 'while'} - operators = { + operators = { '~', '+', '-', '*', '|', '^', '=', '==', '~=', '~==', '<', '<=', - '>', '>=', '&', '|'} + '>', '>=', '&', '|'} - functions = { + functions = { 'abort', 'abs', 'add', 'add!', 'add-method', 'add-new', 'add-new!', 'all-superclasses', 'always', 'any?', 'applicable-method?', 'apply', 'aref', 'aref-setter', 'as', 'as-lowercase', 'as-lowercase!', @@ -86,7 +86,7 @@ class DylanLexer(RegexLexer): 'subtype?', 'table-protocol', 'tail', 'tail-setter', 'third', 'third-setter', 'truncate', 'truncate/', 'type-error-expected-type', 'type-error-value', 'type-for-copy', 'type-union', 'union', 'values', - 'vector', 'zero?'} + 'vector', 'zero?'} valid_name = '\\\\?[\\w!&*<>|^$%@\\-+~?/=]+' diff --git a/contrib/python/Pygments/py2/pygments/lexers/elm.py b/contrib/python/Pygments/py2/pygments/lexers/elm.py index 36bc2b5c30..ee941d7dbb 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/elm.py +++ b/contrib/python/Pygments/py2/pygments/lexers/elm.py @@ -77,7 +77,7 @@ class ElmLexer(RegexLexer): (words((builtinOps), prefix=r'\(', suffix=r'\)'), Name.Function), # Infix Operators - (words(builtinOps), Name.Function), + (words(builtinOps), Name.Function), # Numbers include('numbers'), diff --git a/contrib/python/Pygments/py2/pygments/lexers/email.py b/contrib/python/Pygments/py2/pygments/lexers/email.py index 3009021518..5ad225bb75 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/email.py +++ b/contrib/python/Pygments/py2/pygments/lexers/email.py @@ -1,154 +1,154 @@ -# -*- coding: utf-8 -*- -""" - pygments.lexers.email - ~~~~~~~~~~~~~~~~~~~~~ - - Lexer for the raw E-mail. - - :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -from pygments.lexer import RegexLexer, DelegatingLexer, bygroups -from pygments.lexers.mime import MIMELexer -from pygments.token import Text, Keyword, Name, String, Number, Comment -from pygments.util import get_bool_opt - -__all__ = ["EmailLexer"] - - -class EmailHeaderLexer(RegexLexer): - """ - Sub-lexer for raw E-mail. This lexer only process header part of e-mail. - - .. versionadded:: 2.5 - """ - - def __init__(self, **options): - super(EmailHeaderLexer, self).__init__(**options) - self.highlight_x = get_bool_opt(options, "highlight-X-header", False) - - def get_x_header_tokens(self, match): - if self.highlight_x: - # field - yield match.start(1), Name.Tag, match.group(1) - - # content - default_actions = self.get_tokens_unprocessed( - match.group(2), stack=("root", "header")) - for item in default_actions: - yield item - else: - # lowlight - yield match.start(1), Comment.Special, match.group(1) - yield match.start(2), Comment.Multiline, match.group(2) - - tokens = { - "root": [ - (r"^(?:[A-WYZ]|X400)[\w\-]*:", Name.Tag, "header"), - (r"^(X-(?:\w[\w\-]*:))([\s\S]*?\n)(?![ \t])", get_x_header_tokens), - ], - "header": [ - # folding - (r"\n[ \t]", Text.Whitespace), - (r"\n(?![ \t])", Text.Whitespace, "#pop"), - - # keywords - (r"\bE?SMTPS?\b", Keyword), - (r"\b(?:HE|EH)LO\b", Keyword), - - # mailbox - (r"[\w\.\-\+=]+@[\w\.\-]+", Name.Label), - (r"<[\w\.\-\+=]+@[\w\.\-]+>", Name.Label), - - # domain - (r"\b(\w[\w\.-]*\.[\w\.-]*\w[a-zA-Z]+)\b", Name.Function), - - # IPv4 - ( - r"(?<=\b)(?:(?:25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?)\.){3}(?:25[0" - r"-5]|2[0-4][0-9]|1?[0-9][0-9]?)(?=\b)", - Number.Integer, - ), - - # IPv6 - (r"(?<=\b)([0-9a-fA-F]{1,4}:){1,7}:(?!\b)", Number.Hex), - (r"(?<=\b):((:[0-9a-fA-F]{1,4}){1,7}|:)(?=\b)", Number.Hex), - (r"(?<=\b)([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}(?=\b)", Number.Hex), - (r"(?<=\b)([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}(?=\b)", Number.Hex), - (r"(?<=\b)[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})(?=\b)", Number.Hex), - (r"(?<=\b)fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}(?=\b)", Number.Hex), - (r"(?<=\b)([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}(?=\b)", Number.Hex), - (r"(?<=\b)([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}(?=\b)", - Number.Hex), - (r"(?<=\b)([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}(?=\b)", - Number.Hex), - (r"(?<=\b)([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}(?=\b)", - Number.Hex), - ( - r"(?<=\b)::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}" - r"[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}" - r"[0-9])(?=\b)", - Number.Hex, - ), - ( - r"(?<=\b)([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-" - r"9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-" - r"9])(?=\b)", - Number.Hex, - ), - - # Date time - ( - r"(?:(Sun|Mon|Tue|Wed|Thu|Fri|Sat),\s+)?(0[1-9]|[1-2]?[0-9]|3[" - r"01])\s+(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+(" - r"19[0-9]{2}|[2-9][0-9]{3})\s+(2[0-3]|[0-1][0-9]):([0-5][0-9])" - r"(?::(60|[0-5][0-9]))?(?:\.\d{1,5})?\s+([-\+][0-9]{2}[0-5][0-" - r"9]|\(?(?:UTC?|GMT|(?:E|C|M|P)(?:ST|ET|DT)|[A-IK-Z])\)?)", - Name.Decorator, - ), - - # RFC-2047 encoded string - ( - r"(=\?)([\w-]+)(\?)([BbQq])(\?)([\[\w!\"#$%&\'()*+,-./:;<=>@[\\" - r"\]^_`{|}~]+)(\?=)", - bygroups( - String.Affix, - Name.Constant, - String.Affix, - Keyword.Constant, - String.Affix, - Number.Hex, - String.Affix - ) - ), - - # others - (r'[\s]+', Text.Whitespace), - (r'[\S]', Text), - ], - } - - -class EmailLexer(DelegatingLexer): - """ - Lexer for raw E-mail. - - Additional options accepted: - - `highlight-X-header` - Highlight the fields of ``X-`` user-defined email header. (default: - ``False``). - - .. versionadded:: 2.5 - """ - - name = "E-mail" - aliases = ["email", "eml"] - filenames = ["*.eml"] - mimetypes = ["message/rfc822"] - - def __init__(self, **options): - super(EmailLexer, self).__init__( - EmailHeaderLexer, MIMELexer, Comment, **options - ) +# -*- coding: utf-8 -*- +""" + pygments.lexers.email + ~~~~~~~~~~~~~~~~~~~~~ + + Lexer for the raw E-mail. + + :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, DelegatingLexer, bygroups +from pygments.lexers.mime import MIMELexer +from pygments.token import Text, Keyword, Name, String, Number, Comment +from pygments.util import get_bool_opt + +__all__ = ["EmailLexer"] + + +class EmailHeaderLexer(RegexLexer): + """ + Sub-lexer for raw E-mail. This lexer only process header part of e-mail. + + .. versionadded:: 2.5 + """ + + def __init__(self, **options): + super(EmailHeaderLexer, self).__init__(**options) + self.highlight_x = get_bool_opt(options, "highlight-X-header", False) + + def get_x_header_tokens(self, match): + if self.highlight_x: + # field + yield match.start(1), Name.Tag, match.group(1) + + # content + default_actions = self.get_tokens_unprocessed( + match.group(2), stack=("root", "header")) + for item in default_actions: + yield item + else: + # lowlight + yield match.start(1), Comment.Special, match.group(1) + yield match.start(2), Comment.Multiline, match.group(2) + + tokens = { + "root": [ + (r"^(?:[A-WYZ]|X400)[\w\-]*:", Name.Tag, "header"), + (r"^(X-(?:\w[\w\-]*:))([\s\S]*?\n)(?![ \t])", get_x_header_tokens), + ], + "header": [ + # folding + (r"\n[ \t]", Text.Whitespace), + (r"\n(?![ \t])", Text.Whitespace, "#pop"), + + # keywords + (r"\bE?SMTPS?\b", Keyword), + (r"\b(?:HE|EH)LO\b", Keyword), + + # mailbox + (r"[\w\.\-\+=]+@[\w\.\-]+", Name.Label), + (r"<[\w\.\-\+=]+@[\w\.\-]+>", Name.Label), + + # domain + (r"\b(\w[\w\.-]*\.[\w\.-]*\w[a-zA-Z]+)\b", Name.Function), + + # IPv4 + ( + r"(?<=\b)(?:(?:25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?)\.){3}(?:25[0" + r"-5]|2[0-4][0-9]|1?[0-9][0-9]?)(?=\b)", + Number.Integer, + ), + + # IPv6 + (r"(?<=\b)([0-9a-fA-F]{1,4}:){1,7}:(?!\b)", Number.Hex), + (r"(?<=\b):((:[0-9a-fA-F]{1,4}){1,7}|:)(?=\b)", Number.Hex), + (r"(?<=\b)([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}(?=\b)", Number.Hex), + (r"(?<=\b)([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}(?=\b)", Number.Hex), + (r"(?<=\b)[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})(?=\b)", Number.Hex), + (r"(?<=\b)fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}(?=\b)", Number.Hex), + (r"(?<=\b)([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}(?=\b)", Number.Hex), + (r"(?<=\b)([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}(?=\b)", + Number.Hex), + (r"(?<=\b)([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}(?=\b)", + Number.Hex), + (r"(?<=\b)([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}(?=\b)", + Number.Hex), + ( + r"(?<=\b)::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}" + r"[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}" + r"[0-9])(?=\b)", + Number.Hex, + ), + ( + r"(?<=\b)([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-" + r"9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-" + r"9])(?=\b)", + Number.Hex, + ), + + # Date time + ( + r"(?:(Sun|Mon|Tue|Wed|Thu|Fri|Sat),\s+)?(0[1-9]|[1-2]?[0-9]|3[" + r"01])\s+(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+(" + r"19[0-9]{2}|[2-9][0-9]{3})\s+(2[0-3]|[0-1][0-9]):([0-5][0-9])" + r"(?::(60|[0-5][0-9]))?(?:\.\d{1,5})?\s+([-\+][0-9]{2}[0-5][0-" + r"9]|\(?(?:UTC?|GMT|(?:E|C|M|P)(?:ST|ET|DT)|[A-IK-Z])\)?)", + Name.Decorator, + ), + + # RFC-2047 encoded string + ( + r"(=\?)([\w-]+)(\?)([BbQq])(\?)([\[\w!\"#$%&\'()*+,-./:;<=>@[\\" + r"\]^_`{|}~]+)(\?=)", + bygroups( + String.Affix, + Name.Constant, + String.Affix, + Keyword.Constant, + String.Affix, + Number.Hex, + String.Affix + ) + ), + + # others + (r'[\s]+', Text.Whitespace), + (r'[\S]', Text), + ], + } + + +class EmailLexer(DelegatingLexer): + """ + Lexer for raw E-mail. + + Additional options accepted: + + `highlight-X-header` + Highlight the fields of ``X-`` user-defined email header. (default: + ``False``). + + .. versionadded:: 2.5 + """ + + name = "E-mail" + aliases = ["email", "eml"] + filenames = ["*.eml"] + mimetypes = ["message/rfc822"] + + def __init__(self, **options): + super(EmailLexer, self).__init__( + EmailHeaderLexer, MIMELexer, Comment, **options + ) diff --git a/contrib/python/Pygments/py2/pygments/lexers/erlang.py b/contrib/python/Pygments/py2/pygments/lexers/erlang.py index 39fd05a387..07a46c80ff 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/erlang.py +++ b/contrib/python/Pygments/py2/pygments/lexers/erlang.py @@ -163,7 +163,7 @@ class ErlangShellLexer(Lexer): filenames = ['*.erl-sh'] mimetypes = ['text/x-erl-shellsession'] - _prompt_re = re.compile(r'(?:\([\w@_.]+\))?\d+>(?=\s|\Z)') + _prompt_re = re.compile(r'(?:\([\w@_.]+\))?\d+>(?=\s|\Z)') def get_tokens_unprocessed(self, text): erlexer = ErlangLexer(**self.options) @@ -495,7 +495,7 @@ class ElixirConsoleLexer(Lexer): aliases = ['iex'] mimetypes = ['text/x-elixir-shellsession'] - _prompt_re = re.compile(r'(iex|\.{3})((?:\([\w@_.]+\))?\d+|\(\d+\))?> ') + _prompt_re = re.compile(r'(iex|\.{3})((?:\([\w@_.]+\))?\d+|\(\d+\))?> ') def get_tokens_unprocessed(self, text): exlexer = ElixirLexer(**self.options) diff --git a/contrib/python/Pygments/py2/pygments/lexers/freefem.py b/contrib/python/Pygments/py2/pygments/lexers/freefem.py index e4543d2175..3e9ac8e840 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/freefem.py +++ b/contrib/python/Pygments/py2/pygments/lexers/freefem.py @@ -36,27 +36,27 @@ class FreeFemLexer(CppLexer): mimetypes = ['text/x-freefem'] # Language operators - operators = {'+', '-', '*', '.*', '/', './', '%', '^', '^-1', ':', '\''} + operators = {'+', '-', '*', '.*', '/', './', '%', '^', '^-1', ':', '\''} # types - types = {'bool', 'border', 'complex', 'dmatrix', 'fespace', 'func', 'gslspline', - 'ifstream', 'int', 'macro', 'matrix', 'mesh', 'mesh3', 'mpiComm', - 'mpiGroup', 'mpiRequest', 'NewMacro', 'EndMacro', 'ofstream', 'Pmmap', - 'problem', 'Psemaphore', 'real', 'solve', 'string', 'varf'} + types = {'bool', 'border', 'complex', 'dmatrix', 'fespace', 'func', 'gslspline', + 'ifstream', 'int', 'macro', 'matrix', 'mesh', 'mesh3', 'mpiComm', + 'mpiGroup', 'mpiRequest', 'NewMacro', 'EndMacro', 'ofstream', 'Pmmap', + 'problem', 'Psemaphore', 'real', 'solve', 'string', 'varf'} # finite element spaces - fespaces = {'BDM1', 'BDM1Ortho', 'Edge03d', 'Edge13d', 'Edge23d', 'FEQF', 'HCT', - 'P0', 'P03d', 'P0Edge', 'P1', 'P13d', 'P1b', 'P1b3d', 'P1bl', 'P1bl3d', - 'P1dc', 'P1Edge', 'P1nc', 'P2', 'P23d', 'P2b', 'P2BR', 'P2dc', 'P2Edge', - 'P2h', 'P2Morley', 'P2pnc', 'P3', 'P3dc', 'P3Edge', 'P4', 'P4dc', - 'P4Edge', 'P5Edge', 'RT0', 'RT03d', 'RT0Ortho', 'RT1', 'RT1Ortho', - 'RT2', 'RT2Ortho'} + fespaces = {'BDM1', 'BDM1Ortho', 'Edge03d', 'Edge13d', 'Edge23d', 'FEQF', 'HCT', + 'P0', 'P03d', 'P0Edge', 'P1', 'P13d', 'P1b', 'P1b3d', 'P1bl', 'P1bl3d', + 'P1dc', 'P1Edge', 'P1nc', 'P2', 'P23d', 'P2b', 'P2BR', 'P2dc', 'P2Edge', + 'P2h', 'P2Morley', 'P2pnc', 'P3', 'P3dc', 'P3Edge', 'P4', 'P4dc', + 'P4Edge', 'P5Edge', 'RT0', 'RT03d', 'RT0Ortho', 'RT1', 'RT1Ortho', + 'RT2', 'RT2Ortho'} # preprocessor - preprocessor = {'ENDIFMACRO', 'include', 'IFMACRO', 'load'} + preprocessor = {'ENDIFMACRO', 'include', 'IFMACRO', 'load'} # Language keywords - keywords = { + keywords = { 'adj', 'append', 'area', @@ -169,10 +169,10 @@ class FreeFemLexer(CppLexer): 'x', 'y', 'z' - } + } # Language shipped functions and class ( ) - functions = { + functions = { 'abs', 'acos', 'acosh', @@ -702,10 +702,10 @@ class FreeFemLexer(CppLexer): 'y0', 'y1', 'yn' - } + } # function parameters - parameters = { + parameters = { 'A', 'A1', 'abserror', @@ -849,13 +849,13 @@ class FreeFemLexer(CppLexer): 'WindowIndex', 'which', 'zbound' - } + } # deprecated - deprecated = {'fixeborder'} + deprecated = {'fixeborder'} # do not highlight - suppress_highlight = { + suppress_highlight = { 'alignof', 'asm', 'constexpr', @@ -874,7 +874,7 @@ class FreeFemLexer(CppLexer): 'typeid', 'typename', 'using' - } + } def get_tokens_unprocessed(self, text): for index, token, value in CppLexer.get_tokens_unprocessed(self, text): diff --git a/contrib/python/Pygments/py2/pygments/lexers/haskell.py b/contrib/python/Pygments/py2/pygments/lexers/haskell.py index a01669c5f8..0c0917e721 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/haskell.py +++ b/contrib/python/Pygments/py2/pygments/lexers/haskell.py @@ -325,10 +325,10 @@ class AgdaLexer(RegexLexer): # Identifiers (r'\b(%s)(?!\')\b' % '|'.join(reserved), Keyword.Reserved), (r'(import|module)(\s+)', bygroups(Keyword.Reserved, Text), 'module'), - (u'\\b(Set|Prop)[\u2080-\u2089]*\\b', Keyword.Type), + (u'\\b(Set|Prop)[\u2080-\u2089]*\\b', Keyword.Type), # Special Symbols (r'(\(|\)|\{|\})', Operator), - (u'(\\.{1,3}|\\||\u03BB|\u2200|\u2192|:|=|->)', Operator.Word), + (u'(\\.{1,3}|\\||\u03BB|\u2200|\u2192|:|=|->)', Operator.Word), # Numbers (r'\d+[eE][+-]?\d+', Number.Float), (r'\d+\.\d+([eE][+-]?\d+)?', Number.Float), @@ -481,10 +481,10 @@ class CryptolLexer(RegexLexer): ], } - EXTRA_KEYWORDS = {'join', 'split', 'reverse', 'transpose', 'width', - 'length', 'tail', '<<', '>>', '<<<', '>>>', 'const', - 'reg', 'par', 'seq', 'ASSERT', 'undefined', 'error', - 'trace'} + EXTRA_KEYWORDS = {'join', 'split', 'reverse', 'transpose', 'width', + 'length', 'tail', '<<', '>>', '<<<', '>>>', 'const', + 'reg', 'par', 'seq', 'ASSERT', 'undefined', 'error', + 'trace'} def get_tokens_unprocessed(self, text): stack = ['root'] diff --git a/contrib/python/Pygments/py2/pygments/lexers/haxe.py b/contrib/python/Pygments/py2/pygments/lexers/haxe.py index 11e190b2de..b3575080d3 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/haxe.py +++ b/contrib/python/Pygments/py2/pygments/lexers/haxe.py @@ -79,7 +79,7 @@ class HaxeLexer(ExtendedRegexLexer): if proc in ['error']: ctx.stack.append('preproc-error') - yield match.start(), Comment.Preproc, u'#' + proc + yield match.start(), Comment.Preproc, u'#' + proc ctx.pos = match.end() tokens = { diff --git a/contrib/python/Pygments/py2/pygments/lexers/hdl.py b/contrib/python/Pygments/py2/pygments/lexers/hdl.py index 1e07cfc9c0..b45654ebc8 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/hdl.py +++ b/contrib/python/Pygments/py2/pygments/lexers/hdl.py @@ -175,75 +175,75 @@ class SystemVerilogLexer(RegexLexer): (r'`[a-zA-Z_]\w*', Name.Constant), (words(( - 'accept_on', 'alias', 'always', 'always_comb', 'always_ff', - 'always_latch', 'and', 'assert', 'assign', 'assume', 'automatic', - 'before', 'begin', 'bind', 'bins', 'binsof', 'bit', 'break', 'buf', - 'bufif0', 'bufif1', 'byte', 'case', 'casex', 'casez', 'cell', - 'chandle', 'checker', 'class', 'clocking', 'cmos', 'config', - 'const', 'constraint', 'context', 'continue', 'cover', 'covergroup', - 'coverpoint', 'cross', 'deassign', 'default', 'defparam', 'design', - 'disable', 'dist', 'do', 'edge', 'else', 'end', 'endcase', - 'endchecker', 'endclass', 'endclocking', 'endconfig', 'endfunction', - 'endgenerate', 'endgroup', 'endinterface', 'endmodule', 'endpackage', - 'endprimitive', 'endprogram', 'endproperty', 'endsequence', - 'endspecify', 'endtable', 'endtask', 'enum', 'event', 'eventually', - 'expect', 'export', 'extends', 'extern', 'final', 'first_match', - 'for', 'force', 'foreach', 'forever', 'fork', 'forkjoin', 'function', - 'generate', 'genvar', 'global', 'highz0', 'highz1', 'if', 'iff', - 'ifnone', 'ignore_bins', 'illegal_bins', 'implies', 'import', - 'incdir', 'include', 'initial', 'inout', 'input', 'inside', - 'instance', 'int', 'integer', 'interface', 'intersect', 'join', - 'join_any', 'join_none', 'large', 'let', 'liblist', 'library', - 'local', 'localparam', 'logic', 'longint', 'macromodule', 'matches', - 'medium', 'modport', 'module', 'nand', 'negedge', 'new', 'nexttime', - 'nmos', 'nor', 'noshowcancelled', 'not', 'notif0', 'notif1', 'null', - 'or', 'output', 'package', 'packed', 'parameter', 'pmos', 'posedge', - 'primitive', 'priority', 'program', 'property', 'protected', 'pull0', - 'pull1', 'pulldown', 'pullup', 'pulsestyle_ondetect', - 'pulsestyle_onevent', 'pure', 'rand', 'randc', 'randcase', - 'randsequence', 'rcmos', 'real', 'realtime', 'ref', 'reg', - 'reject_on', 'release', 'repeat', 'restrict', 'return', 'rnmos', - 'rpmos', 'rtran', 'rtranif0', 'rtranif1', 's_always', 's_eventually', - 's_nexttime', 's_until', 's_until_with', 'scalared', 'sequence', - 'shortint', 'shortreal', 'showcancelled', 'signed', 'small', 'solve', - 'specify', 'specparam', 'static', 'string', 'strong', 'strong0', - 'strong1', 'struct', 'super', 'supply0', 'supply1', 'sync_accept_on', - 'sync_reject_on', 'table', 'tagged', 'task', 'this', 'throughout', - 'time', 'timeprecision', 'timeunit', 'tran', 'tranif0', 'tranif1', - 'tri', 'tri0', 'tri1', 'triand', 'trior', 'trireg', 'type', - 'typedef', 'union', 'unique', 'unique0', 'unsigned', 'until', - 'until_with', 'untyped', 'use', 'uwire', 'var', 'vectored', - 'virtual', 'void', 'wait', 'wait_order', 'wand', 'weak', 'weak0', - 'weak1', 'while', 'wildcard', 'wire', 'with', 'within', 'wor', - 'xnor', 'xor'), suffix=r'\b'), + 'accept_on', 'alias', 'always', 'always_comb', 'always_ff', + 'always_latch', 'and', 'assert', 'assign', 'assume', 'automatic', + 'before', 'begin', 'bind', 'bins', 'binsof', 'bit', 'break', 'buf', + 'bufif0', 'bufif1', 'byte', 'case', 'casex', 'casez', 'cell', + 'chandle', 'checker', 'class', 'clocking', 'cmos', 'config', + 'const', 'constraint', 'context', 'continue', 'cover', 'covergroup', + 'coverpoint', 'cross', 'deassign', 'default', 'defparam', 'design', + 'disable', 'dist', 'do', 'edge', 'else', 'end', 'endcase', + 'endchecker', 'endclass', 'endclocking', 'endconfig', 'endfunction', + 'endgenerate', 'endgroup', 'endinterface', 'endmodule', 'endpackage', + 'endprimitive', 'endprogram', 'endproperty', 'endsequence', + 'endspecify', 'endtable', 'endtask', 'enum', 'event', 'eventually', + 'expect', 'export', 'extends', 'extern', 'final', 'first_match', + 'for', 'force', 'foreach', 'forever', 'fork', 'forkjoin', 'function', + 'generate', 'genvar', 'global', 'highz0', 'highz1', 'if', 'iff', + 'ifnone', 'ignore_bins', 'illegal_bins', 'implies', 'import', + 'incdir', 'include', 'initial', 'inout', 'input', 'inside', + 'instance', 'int', 'integer', 'interface', 'intersect', 'join', + 'join_any', 'join_none', 'large', 'let', 'liblist', 'library', + 'local', 'localparam', 'logic', 'longint', 'macromodule', 'matches', + 'medium', 'modport', 'module', 'nand', 'negedge', 'new', 'nexttime', + 'nmos', 'nor', 'noshowcancelled', 'not', 'notif0', 'notif1', 'null', + 'or', 'output', 'package', 'packed', 'parameter', 'pmos', 'posedge', + 'primitive', 'priority', 'program', 'property', 'protected', 'pull0', + 'pull1', 'pulldown', 'pullup', 'pulsestyle_ondetect', + 'pulsestyle_onevent', 'pure', 'rand', 'randc', 'randcase', + 'randsequence', 'rcmos', 'real', 'realtime', 'ref', 'reg', + 'reject_on', 'release', 'repeat', 'restrict', 'return', 'rnmos', + 'rpmos', 'rtran', 'rtranif0', 'rtranif1', 's_always', 's_eventually', + 's_nexttime', 's_until', 's_until_with', 'scalared', 'sequence', + 'shortint', 'shortreal', 'showcancelled', 'signed', 'small', 'solve', + 'specify', 'specparam', 'static', 'string', 'strong', 'strong0', + 'strong1', 'struct', 'super', 'supply0', 'supply1', 'sync_accept_on', + 'sync_reject_on', 'table', 'tagged', 'task', 'this', 'throughout', + 'time', 'timeprecision', 'timeunit', 'tran', 'tranif0', 'tranif1', + 'tri', 'tri0', 'tri1', 'triand', 'trior', 'trireg', 'type', + 'typedef', 'union', 'unique', 'unique0', 'unsigned', 'until', + 'until_with', 'untyped', 'use', 'uwire', 'var', 'vectored', + 'virtual', 'void', 'wait', 'wait_order', 'wand', 'weak', 'weak0', + 'weak1', 'while', 'wildcard', 'wire', 'with', 'within', 'wor', + 'xnor', 'xor'), suffix=r'\b'), Keyword), (words(( - '`__FILE__', '`__LINE__', '`begin_keywords', '`celldefine', - '`default_nettype', '`define', '`else', '`elsif', '`end_keywords', - '`endcelldefine', '`endif', '`ifdef', '`ifndef', '`include', - '`line', '`nounconnected_drive', '`pragma', '`resetall', - '`timescale', '`unconnected_drive', '`undef', '`undefineall'), + '`__FILE__', '`__LINE__', '`begin_keywords', '`celldefine', + '`default_nettype', '`define', '`else', '`elsif', '`end_keywords', + '`endcelldefine', '`endif', '`ifdef', '`ifndef', '`include', + '`line', '`nounconnected_drive', '`pragma', '`resetall', + '`timescale', '`unconnected_drive', '`undef', '`undefineall'), suffix=r'\b'), Comment.Preproc), (words(( - '$display', '$displayb', '$displayh', '$displayo', '$dumpall', - '$dumpfile', '$dumpflush', '$dumplimit', '$dumpoff', '$dumpon', - '$dumpports', '$dumpportsall', '$dumpportsflush', '$dumpportslimit', - '$dumpportsoff', '$dumpportson', '$dumpvars', '$fclose', - '$fdisplay', '$fdisplayb', '$fdisplayh', '$fdisplayo', '$feof', - '$ferror', '$fflush', '$fgetc', '$fgets', '$finish', '$fmonitor', - '$fmonitorb', '$fmonitorh', '$fmonitoro', '$fopen', '$fread', - '$fscanf', '$fseek', '$fstrobe', '$fstrobeb', '$fstrobeh', + '$display', '$displayb', '$displayh', '$displayo', '$dumpall', + '$dumpfile', '$dumpflush', '$dumplimit', '$dumpoff', '$dumpon', + '$dumpports', '$dumpportsall', '$dumpportsflush', '$dumpportslimit', + '$dumpportsoff', '$dumpportson', '$dumpvars', '$fclose', + '$fdisplay', '$fdisplayb', '$fdisplayh', '$fdisplayo', '$feof', + '$ferror', '$fflush', '$fgetc', '$fgets', '$finish', '$fmonitor', + '$fmonitorb', '$fmonitorh', '$fmonitoro', '$fopen', '$fread', + '$fscanf', '$fseek', '$fstrobe', '$fstrobeb', '$fstrobeh', '$fstrobeo', '$ftell', '$fwrite', '$fwriteb', '$fwriteh', '$fwriteo', '$monitor', '$monitorb', '$monitorh', '$monitoro', '$monitoroff', - '$monitoron', '$plusargs', '$random', '$readmemb', '$readmemh', - '$rewind', '$sformat', '$sformatf', '$sscanf', '$strobe', - '$strobeb', '$strobeh', '$strobeo', '$swrite', '$swriteb', - '$swriteh', '$swriteo', '$test', '$ungetc', '$value$plusargs', - '$write', '$writeb', '$writeh', '$writememb', '$writememh', - '$writeo'), suffix=r'\b'), + '$monitoron', '$plusargs', '$random', '$readmemb', '$readmemh', + '$rewind', '$sformat', '$sformatf', '$sscanf', '$strobe', + '$strobeb', '$strobeh', '$strobeo', '$swrite', '$swriteb', + '$swriteh', '$swriteo', '$test', '$ungetc', '$value$plusargs', + '$write', '$writeb', '$writeh', '$writememb', '$writememh', + '$writeo'), suffix=r'\b'), Name.Builtin), (r'(class)(\s+)', bygroups(Keyword, Text), 'classname'), diff --git a/contrib/python/Pygments/py2/pygments/lexers/html.py b/contrib/python/Pygments/py2/pygments/lexers/html.py index 3b3fe329f4..cbef4f7e98 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/html.py +++ b/contrib/python/Pygments/py2/pygments/lexers/html.py @@ -244,7 +244,7 @@ class XsltLexer(XmlLexer): filenames = ['*.xsl', '*.xslt', '*.xpl'] # xpl is XProc mimetypes = ['application/xsl+xml', 'application/xslt+xml'] - EXTRA_KEYWORDS = { + EXTRA_KEYWORDS = { 'apply-imports', 'apply-templates', 'attribute', 'attribute-set', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'decimal-format', 'element', 'fallback', @@ -253,7 +253,7 @@ class XsltLexer(XmlLexer): 'preserve-space', 'processing-instruction', 'sort', 'strip-space', 'stylesheet', 'template', 'text', 'transform', 'value-of', 'variable', 'when', 'with-param' - } + } def get_tokens_unprocessed(self, text): for index, token, value in XmlLexer.get_tokens_unprocessed(self, text): diff --git a/contrib/python/Pygments/py2/pygments/lexers/javascript.py b/contrib/python/Pygments/py2/pygments/lexers/javascript.py index e701860e91..e9cf672278 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/javascript.py +++ b/contrib/python/Pygments/py2/pygments/lexers/javascript.py @@ -372,7 +372,7 @@ class DartLexer(RegexLexer): (r'\b(bool|double|dynamic|int|num|Object|String|void)\b', Keyword.Type), (r'\b(false|null|true)\b', Keyword.Constant), (r'[~!%^&*+=|?:<>/-]|as\b', Operator), - (r'@[a-zA-Z_$]\w*', Name.Decorator), + (r'@[a-zA-Z_$]\w*', Name.Decorator), (r'[a-zA-Z_$]\w*:', Name.Label), (r'[a-zA-Z_$]\w*', Name), (r'[(){}\[\],.;]', Punctuation), @@ -1457,20 +1457,20 @@ class EarlGreyLexer(RegexLexer): (r'8r[0-7]+', Number.Oct), (r'2r[01]+', Number.Bin), (r'16r[a-fA-F0-9]+', Number.Hex), - (r'([3-79]|[12][0-9]|3[0-6])r[a-zA-Z\d]+(\.[a-zA-Z\d]+)?', - Number.Radix), + (r'([3-79]|[12][0-9]|3[0-6])r[a-zA-Z\d]+(\.[a-zA-Z\d]+)?', + Number.Radix), (r'\d+', Number.Integer) ], } - + class JuttleLexer(RegexLexer): """ For `Juttle`_ source code. .. _Juttle: https://github.com/juttle/juttle - .. versionadded:: 2.2 + .. versionadded:: 2.2 """ name = 'Juttle' @@ -1505,24 +1505,24 @@ class JuttleLexer(RegexLexer): r'(\d+(\.\d*)?|\.\d+)(ms|[smhdwMy])?):', String.Moment), (r':\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d*)?)?' r'(Z|[+-]\d{2}:\d{2}|[+-]\d{4})?:', String.Moment), - (r':((\d+(\.\d*)?|\.\d+)[ ]+)?(millisecond|second|minute|hour|' - r'day|week|month|year)[s]?' - r'(([ ]+and[ ]+(\d+[ ]+)?(millisecond|second|minute|hour|' - r'day|week|month|year)[s]?)' + (r':((\d+(\.\d*)?|\.\d+)[ ]+)?(millisecond|second|minute|hour|' + r'day|week|month|year)[s]?' + r'(([ ]+and[ ]+(\d+[ ]+)?(millisecond|second|minute|hour|' + r'day|week|month|year)[s]?)' r'|[ ]+(ago|from[ ]+now))*:', String.Moment), (r'\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|' r'(==?|!=?|[-<>+*%&|^/])=?', Operator, 'slashstartsregex'), (r'[{(\[;,]', Punctuation, 'slashstartsregex'), (r'[})\].]', Punctuation), (r'(import|return|continue|if|else)\b', Keyword, 'slashstartsregex'), - (r'(var|const|function|reducer|sub|input)\b', Keyword.Declaration, - 'slashstartsregex'), + (r'(var|const|function|reducer|sub|input)\b', Keyword.Declaration, + 'slashstartsregex'), (r'(batch|emit|filter|head|join|keep|pace|pass|put|read|reduce|remove|' - r'sequence|skip|sort|split|tail|unbatch|uniq|view|write)\b', - Keyword.Reserved), + r'sequence|skip|sort|split|tail|unbatch|uniq|view|write)\b', + Keyword.Reserved), (r'(true|false|null|Infinity)\b', Keyword.Constant), - (r'(Array|Date|Juttle|Math|Number|Object|RegExp|String)\b', - Name.Builtin), + (r'(Array|Date|Juttle|Math|Number|Object|RegExp|String)\b', + Name.Builtin), (JS_IDENT, Name.Other), (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float), (r'[0-9]+', Number.Integer), diff --git a/contrib/python/Pygments/py2/pygments/lexers/jvm.py b/contrib/python/Pygments/py2/pygments/lexers/jvm.py index cabb7f909e..5588b79660 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/jvm.py +++ b/contrib/python/Pygments/py2/pygments/lexers/jvm.py @@ -26,7 +26,7 @@ __all__ = ['JavaLexer', 'ScalaLexer', 'GosuLexer', 'GosuTemplateLexer', class JavaLexer(RegexLexer): """ - For `Java <https://www.oracle.com/technetwork/java/>`_ source code. + For `Java <https://www.oracle.com/technetwork/java/>`_ source code. """ name = 'Java' @@ -50,7 +50,7 @@ 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, Text, Punctuation)), (r'@[^\W\d][\w.]*', Name.Decorator), (r'(abstract|const|enum|extends|final|implements|native|private|' r'protected|public|static|strictfp|super|synchronized|throws|' @@ -61,14 +61,14 @@ class JavaLexer(RegexLexer): (r'(true|false|null)\b', Keyword.Constant), (r'(class|interface)(\s+)', bygroups(Keyword.Declaration, Text), 'class'), - (r'(var)(\s+)', bygroups(Keyword.Declaration, Text), - 'var'), + (r'(var)(\s+)', bygroups(Keyword.Declaration, Text), + 'var'), (r'(import(?:\s+static)?)(\s+)', bygroups(Keyword.Namespace, Text), 'import'), (r'"(\\\\|\\"|[^"])*"', String), (r"'\\.'|'[^\\]'|'\\u[0-9a-fA-F]{4}'", String.Char), - (r'(\.)((?:[^\W\d]|\$)[\w$]*)', bygroups(Punctuation, - Name.Attribute)), + (r'(\.)((?:[^\W\d]|\$)[\w$]*)', bygroups(Punctuation, + Name.Attribute)), (r'^\s*([^\W\d]|\$)[\w$]*:', Name.Label), (r'([^\W\d]|\$)[\w$]*', Name), (r'([0-9][0-9_]*\.([0-9][0-9_]*)?|' @@ -83,16 +83,16 @@ class JavaLexer(RegexLexer): (r'0[bB][01][01_]*[lL]?', Number.Bin), (r'0[0-7_]+[lL]?', Number.Oct), (r'0|[1-9][0-9_]*[lL]?', Number.Integer), - (r'[~^*!%&\[\]<>|+=/?-]', Operator), - (r'[{}();:.,]', Punctuation), + (r'[~^*!%&\[\]<>|+=/?-]', Operator), + (r'[{}();:.,]', Punctuation), (r'\n', Text) ], 'class': [ (r'([^\W\d]|\$)[\w$]*', Name.Class, '#pop') ], - 'var': [ - (r'([^\W\d]|\$)[\w$]*', Name, '#pop') - ], + 'var': [ + (r'([^\W\d]|\$)[\w$]*', Name, '#pop') + ], 'import': [ (r'[\w.]+\*?', Name.Namespace, '#pop') ], @@ -111,7 +111,7 @@ class AspectJLexer(JavaLexer): filenames = ['*.aj'] mimetypes = ['text/x-aspectj'] - aj_keywords = { + aj_keywords = { 'aspect', 'pointcut', 'privileged', 'call', 'execution', 'initialization', 'preinitialization', 'handler', 'get', 'set', 'staticinitialization', 'target', 'args', 'within', 'withincode', @@ -121,9 +121,9 @@ class AspectJLexer(JavaLexer): 'thisJoinPointStaticPart', 'thisEnclosingJoinPointStaticPart', 'issingleton', 'perthis', 'pertarget', 'percflow', 'percflowbelow', 'pertypewithin', 'lock', 'unlock', 'thisAspectInstance' - } - aj_inter_type = {'parents:', 'warning:', 'error:', 'soft:', 'precedence:'} - aj_inter_type_annotation = {'@type', '@method', '@constructor', '@field'} + } + aj_inter_type = {'parents:', 'warning:', 'error:', 'soft:', 'precedence:'} + aj_inter_type_annotation = {'@type', '@method', '@constructor', '@field'} def get_tokens_unprocessed(self, text): for index, token, value in JavaLexer.get_tokens_unprocessed(self, text): @@ -271,7 +271,7 @@ class ScalaLexer(RegexLexer): # method names (r'(class|trait|object)(\s+)', bygroups(Keyword, Text), 'class'), (r'[^\S\n]+', Text), - include('comments'), + include('comments'), (u'@%s' % idrest, Name.Decorator), (u'(abstract|ca(?:se|tch)|d(?:ef|o)|e(?:lse|xtends)|' u'f(?:inal(?:ly)?|or(?:Some)?)|i(?:f|mplicit)|' @@ -306,17 +306,17 @@ class ScalaLexer(RegexLexer): ], 'class': [ (u'(%s|%s|`[^`]+`)(\\s*)(\\[)' % (idrest, op), - bygroups(Name.Class, Text, Operator), ('#pop', 'typeparam')), + bygroups(Name.Class, Text, Operator), ('#pop', 'typeparam')), (r'\s+', Text), - include('comments'), + include('comments'), (r'\{', Operator, '#pop'), (r'\(', Operator, '#pop'), (u'%s|%s|`[^`]+`' % (idrest, op), Name.Class, '#pop'), ], 'type': [ (r'\s+', Text), - include('comments'), - (r'<[%:]|>:|[#_]|\bforSome\b|\btype\b', Keyword), + include('comments'), + (r'<[%:]|>:|[#_]|\bforSome\b|\btype\b', Keyword), (u'([,);}]|=>|=|\u21d2)(\\s*)', bygroups(Operator, Text), '#pop'), (r'[({]', Operator, '#push'), (u'((?:%s|%s|`[^`]+`)(?:\\.(?:%s|%s|`[^`]+`))*)(\\s*)(\\[)' % @@ -328,18 +328,18 @@ class ScalaLexer(RegexLexer): (u'\\.|%s|%s|`[^`]+`' % (idrest, op), Keyword.Type) ], 'typeparam': [ - (r'\s+', Text), - include('comments'), - (r',+', Punctuation), - (u'<[%:]|=>|>:|[#_\u21D2]|\bforSome\b|\btype\b', Keyword), + (r'\s+', Text), + include('comments'), + (r',+', Punctuation), + (u'<[%:]|=>|>:|[#_\u21D2]|\bforSome\b|\btype\b', Keyword), (r'([\])}])', Operator, '#pop'), (r'[(\[{]', Operator, '#push'), (u'\\.|%s|%s|`[^`]+`' % (idrest, op), Keyword.Type) ], - 'comments': [ - (r'//.*?\n', Comment.Single), - (r'/\*', Comment.Multiline, 'comment'), - ], + 'comments': [ + (r'//.*?\n', Comment.Single), + (r'/\*', Comment.Multiline, 'comment'), + ], 'comment': [ (r'[^/*]+', Comment.Multiline), (r'/\*', Comment.Multiline, '#push'), diff --git a/contrib/python/Pygments/py2/pygments/lexers/lisp.py b/contrib/python/Pygments/py2/pygments/lexers/lisp.py index d7f5b79a6a..601d5a5f27 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/lisp.py +++ b/contrib/python/Pygments/py2/pygments/lexers/lisp.py @@ -1554,7 +1554,7 @@ class EmacsLispLexer(RegexLexer): # Take a deep breath... symbol = r'((?:%s)(?:%s)*)' % (nonmacro, constituent) - macros = { + macros = { 'atomic-change-group', 'case', 'block', 'cl-block', 'cl-callf', 'cl-callf2', 'cl-case', 'cl-decf', 'cl-declaim', 'cl-declare', 'cl-define-compiler-macro', 'cl-defmacro', 'cl-defstruct', @@ -1601,17 +1601,17 @@ class EmacsLispLexer(RegexLexer): 'with-tramp-file-property', 'with-tramp-progress-reporter', 'with-wrapper-hook', 'load-time-value', 'locally', 'macrolet', 'progv', 'return-from', - } + } - special_forms = { + special_forms = { 'and', 'catch', 'cond', 'condition-case', 'defconst', 'defvar', 'function', 'if', 'interactive', 'let', 'let*', 'or', 'prog1', 'prog2', 'progn', 'quote', 'save-current-buffer', 'save-excursion', 'save-restriction', 'setq', 'setq-default', 'subr-arity', 'unwind-protect', 'while', - } + } - builtin_function = { + builtin_function = { '%', '*', '+', '-', '/', '/=', '1+', '1-', '<', '<=', '=', '>', '>=', 'Snarf-documentation', 'abort-recursive-edit', 'abs', 'accept-process-output', 'access-file', 'accessible-keymaps', 'acos', @@ -1937,9 +1937,9 @@ class EmacsLispLexer(RegexLexer): 'split-window-internal', 'sqrt', 'standard-case-table', 'standard-category-table', 'standard-syntax-table', 'start-kbd-macro', 'start-process', 'stop-process', 'store-kbd-macro-event', 'string', - 'string=', 'string<', 'string>', 'string-as-multibyte', - 'string-as-unibyte', 'string-bytes', 'string-collate-equalp', - 'string-collate-lessp', 'string-equal', 'string-greaterp', + 'string=', 'string<', 'string>', 'string-as-multibyte', + 'string-as-unibyte', 'string-bytes', 'string-collate-equalp', + 'string-collate-lessp', 'string-equal', 'string-greaterp', 'string-lessp', 'string-make-multibyte', 'string-make-unibyte', 'string-match', 'string-to-char', 'string-to-multibyte', 'string-to-number', 'string-to-syntax', 'string-to-unibyte', @@ -2051,23 +2051,23 @@ class EmacsLispLexer(RegexLexer): 'xw-color-values', 'xw-display-color-p', 'xw-display-color-p', 'yes-or-no-p', 'zlib-available-p', 'zlib-decompress-region', 'forward-point', - } + } - builtin_function_highlighted = { + builtin_function_highlighted = { 'defvaralias', 'provide', 'require', 'with-no-warnings', 'define-widget', 'with-electric-help', 'throw', 'defalias', 'featurep' - } + } - lambda_list_keywords = { + lambda_list_keywords = { '&allow-other-keys', '&aux', '&body', '&environment', '&key', '&optional', '&rest', '&whole', - } + } - error_keywords = { + error_keywords = { 'cl-assert', 'cl-check-type', 'error', 'signal', 'user-error', 'warn', - } + } def get_tokens_unprocessed(self, text): stack = ['root'] @@ -2226,7 +2226,7 @@ class ShenLexer(RegexLexer): BUILTINS_ANYWHERE = ('where', 'skip', '>>', '_', '!', '<e>', '<!>') - MAPPINGS = {s: Keyword for s in DECLARATIONS} + MAPPINGS = {s: Keyword for s in DECLARATIONS} MAPPINGS.update((s, Name.Builtin) for s in BUILTINS) MAPPINGS.update((s, Keyword) for s in SPECIAL_FORMS) diff --git a/contrib/python/Pygments/py2/pygments/lexers/markup.py b/contrib/python/Pygments/py2/pygments/lexers/markup.py index 5901025f14..ad2491ad1f 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/markup.py +++ b/contrib/python/Pygments/py2/pygments/lexers/markup.py @@ -222,9 +222,9 @@ class RstLexer(RegexLexer): Punctuation, Text, using(this, state='inline'))), # Comments (r'^ *\.\..*(\n( +.*\n|\n)+)?', Comment.Preproc), - # Field list marker - (r'^( *)(:(?:\\\\|\\:|[^:\n])+:(?=\s))([ \t]*)', - bygroups(Text, Name.Class, Text)), + # Field list marker + (r'^( *)(:(?:\\\\|\\:|[^:\n])+:(?=\s))([ \t]*)', + bygroups(Text, Name.Class, Text)), # Definition list (r'^(\S.*(?<!::)\n)((?:(?: +.*)\n)+)', bygroups(using(this, state='inline'), using(this, state='inline'))), diff --git a/contrib/python/Pygments/py2/pygments/lexers/matlab.py b/contrib/python/Pygments/py2/pygments/lexers/matlab.py index 6ff588c61b..64dd3a3c2d 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/matlab.py +++ b/contrib/python/Pygments/py2/pygments/lexers/matlab.py @@ -72,8 +72,8 @@ class MatlabLexer(RegexLexer): "hilb", "invhilb", "magic", "pascal", "rosser", "toeplitz", "vander", "wilkinson") - _operators = r'-|==|~=|<=|>=|<|>|&&|&|~|\|\|?|\.\*|\*|\+|\.\^|\.\\|\.\/|\/|\\' - + _operators = r'-|==|~=|<=|>=|<|>|&&|&|~|\|\|?|\.\*|\*|\+|\.\^|\.\\|\.\/|\/|\\' + tokens = { 'root': [ # line starting with '!' is sent as a system command. not sure what @@ -81,17 +81,17 @@ class MatlabLexer(RegexLexer): (r'^!.*', String.Other), (r'%\{\s*\n', Comment.Multiline, 'blockcomment'), (r'%.*$', Comment), - (r'^\s*function\b', Keyword, 'deffunc'), + (r'^\s*function\b', Keyword, 'deffunc'), # from 'iskeyword' on version 7.11 (R2010): - # Check that there is no preceding dot, as keywords are valid field - # names. - (words(('break', 'case', 'catch', 'classdef', 'continue', 'else', - 'elseif', 'end', 'enumerated', 'events', 'for', 'function', - 'global', 'if', 'methods', 'otherwise', 'parfor', - 'persistent', 'properties', 'return', 'spmd', 'switch', - 'try', 'while'), - prefix=r'(?<!\.)', suffix=r'\b'), + # Check that there is no preceding dot, as keywords are valid field + # names. + (words(('break', 'case', 'catch', 'classdef', 'continue', 'else', + 'elseif', 'end', 'enumerated', 'events', 'for', 'function', + 'global', 'if', 'methods', 'otherwise', 'parfor', + 'persistent', 'properties', 'return', 'spmd', 'switch', + 'try', 'while'), + prefix=r'(?<!\.)', suffix=r'\b'), Keyword), ("(" + "|".join(elfun + specfun + elmat) + r')\b', Name.Builtin), @@ -99,23 +99,23 @@ class MatlabLexer(RegexLexer): # line continuation with following comment: (r'\.\.\..*$', Comment), - # command form: - # "How MATLAB Recognizes Command Syntax" specifies that an operator - # is recognized if it is either surrounded by spaces or by no - # spaces on both sides; only the former case matters for us. (This - # allows distinguishing `cd ./foo` from `cd ./ foo`.) - (r'(?:^|(?<=;))\s*\w+\s+(?!=|\(|(%s)\s+)' % _operators, Name, - 'commandargs'), - + # command form: + # "How MATLAB Recognizes Command Syntax" specifies that an operator + # is recognized if it is either surrounded by spaces or by no + # spaces on both sides; only the former case matters for us. (This + # allows distinguishing `cd ./foo` from `cd ./ foo`.) + (r'(?:^|(?<=;))\s*\w+\s+(?!=|\(|(%s)\s+)' % _operators, Name, + 'commandargs'), + # operators: - (_operators, Operator), - - # numbers (must come before punctuation to handle `.5`; cannot use - # `\b` due to e.g. `5. + .5`). - (r'(?<!\w)((\d+\.\d*)|(\d*\.\d+))([eEf][+-]?\d+)?(?!\w)', Number.Float), - (r'\b\d+[eEf][+-]?[0-9]+\b', Number.Float), - (r'\b\d+\b', Number.Integer), - + (_operators, Operator), + + # numbers (must come before punctuation to handle `.5`; cannot use + # `\b` due to e.g. `5. + .5`). + (r'(?<!\w)((\d+\.\d*)|(\d*\.\d+))([eEf][+-]?\d+)?(?!\w)', Number.Float), + (r'\b\d+[eEf][+-]?[0-9]+\b', Number.Float), + (r'\b\d+\b', Number.Integer), + # punctuation: (r'\[|\]|\(|\)|\{|\}|:|@|\.|,', Punctuation), (r'=|:|;', Punctuation), @@ -124,7 +124,7 @@ class MatlabLexer(RegexLexer): # (not great, but handles common cases...) (r'(?<=[\w)\].])\'+', Operator), - (r'"(""|[^"])*"', String), + (r'"(""|[^"])*"', String), (r'(?<![\w)\].])\'', String, 'string'), (r'[a-zA-Z_]\w*', Name), @@ -143,28 +143,28 @@ class MatlabLexer(RegexLexer): # function with no args (r'(\s*)([a-zA-Z_]\w*)', bygroups(Text, Name.Function), '#pop'), ], - 'string': [ - (r"[^']*'", String, '#pop'), - ], - 'commandargs': [ - ("'[^']*'", String), - ("[^';\n]+", String), - (";?\n?", Punctuation, '#pop'), - ] + 'string': [ + (r"[^']*'", String, '#pop'), + ], + 'commandargs': [ + ("'[^']*'", String), + ("[^';\n]+", String), + (";?\n?", Punctuation, '#pop'), + ] } def analyse_text(text): - # function declaration. - first_non_comment = next((line for line in text.splitlines() - if not re.match(r'^\s*%', text)), '').strip() - if (first_non_comment.startswith('function') - and '{' not in first_non_comment): - return 1. - # comment - elif re.match(r'^\s*%', text, re.M): + # function declaration. + first_non_comment = next((line for line in text.splitlines() + if not re.match(r'^\s*%', text)), '').strip() + if (first_non_comment.startswith('function') + and '{' not in first_non_comment): + return 1. + # comment + elif re.match(r'^\s*%', text, re.M): return 0.2 - # system cmd - elif re.match(r'^!\w+', text, re.M): + # system cmd + elif re.match(r'^!\w+', text, re.M): return 0.2 @@ -564,7 +564,7 @@ class OctaveLexer(RegexLexer): 'root': [ # We should look into multiline comments (r'[%#].*$', Comment), - (r'^\s*function\b', Keyword, 'deffunc'), + (r'^\s*function\b', Keyword, 'deffunc'), # from 'iskeyword' on hg changeset 8cc154f45e37 (words(( @@ -637,7 +637,7 @@ class ScilabLexer(RegexLexer): tokens = { 'root': [ (r'//.*?$', Comment.Single), - (r'^\s*function\b', Keyword, 'deffunc'), + (r'^\s*function\b', Keyword, 'deffunc'), (words(( '__FILE__', '__LINE__', 'break', 'case', 'catch', 'classdef', 'continue', 'do', 'else', diff --git a/contrib/python/Pygments/py2/pygments/lexers/mime.py b/contrib/python/Pygments/py2/pygments/lexers/mime.py index aadfdc9c7a..95979f35c5 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/mime.py +++ b/contrib/python/Pygments/py2/pygments/lexers/mime.py @@ -1,226 +1,226 @@ -# -*- coding: utf-8 -*- -""" - pygments.lexers.mime - ~~~~~~~~~~~~~~~~~~~~ - - Lexer for Multipurpose Internet Mail Extensions (MIME) data. - - :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import re - -from pygments.lexer import RegexLexer, include -from pygments.lexers import get_lexer_for_mimetype -from pygments.token import Text, Name, String, Operator, Comment, Other -from pygments.util import get_int_opt, ClassNotFound - -__all__ = ["MIMELexer"] - - -class MIMELexer(RegexLexer): - """ - Lexer for Multipurpose Internet Mail Extensions (MIME) data. This lexer is - designed to process the nested mulitpart data. - - It assumes that the given data contains both header and body (and is - splitted by empty line). If no valid header is found, then the entire data - would be treated as body. - - Additional options accepted: - - `MIME-max-level` - Max recurssion level for nested MIME structure. Any negative number - would treated as unlimited. (default: -1) - - `Content-Type` - Treat the data as specific content type. Useful when header is - missing, or this lexer would try to parse from header. (default: - `text/plain`) - - `Multipart-Boundary` - Set the default multipart boundary delimiter. This option is only used - when `Content-Type` is `multipart` and header is missing. This lexer - would try to parse from header by default. (default: None) - - `Content-Transfer-Encoding` - Treat the data as specific encoding. Or this lexer would try to parse - from header by default. (default: None) - - .. versionadded:: 2.5 - """ - - name = "MIME" - aliases = ["mime"] - mimetypes = ["multipart/mixed", - "multipart/related", - "multipart/alternative"] - - def __init__(self, **options): - super(MIMELexer, self).__init__(**options) - self.boundary = options.get("Multipart-Boundary") - self.content_transfer_encoding = options.get("Content_Transfer_Encoding") - self.content_type = options.get("Content_Type", "text/plain") - self.max_nested_level = get_int_opt(options, "MIME-max-level", -1) - - def analyse_text(text): - try: - header, body = text.strip().split("\n\n", 1) - if not body.strip(): - return 0.1 - - invalid_headers = MIMELexer.tokens["header"].sub("", header) - if invalid_headers.strip(): - return 0.1 - else: - return 1 - - except ValueError: - return 0.1 - - def get_header_tokens(self, match): - field = match.group(1) - - if field.lower() in self.attention_headers: - yield match.start(1), Name.Tag, field + ":" - yield match.start(2), Text.Whitespace, match.group(2) - - pos = match.end(2) - body = match.group(3) - for i, t, v in self.get_tokens_unprocessed(body, ("root", field.lower())): - yield pos + i, t, v - - else: - yield match.start(), Comment, match.group() - - def get_body_tokens(self, match): - pos_body_start = match.start() - entire_body = match.group() - - # skip first newline - if entire_body[0] == '\n': - yield pos_body_start, Text.Whitespace, u'\n' - pos_body_start = pos_body_start + 1 - entire_body = entire_body[1:] - - # if it is not a mulitpart - 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 - return - - # find boundary - bdry_pattern = r"^--%s(--)?\n" % re.escape(self.boundary) - bdry_matcher = re.compile(bdry_pattern, re.MULTILINE) - - # some data has prefix text before first boundary - m = bdry_matcher.search(entire_body) - if m: - pos_part_start = pos_body_start + m.end() - pos_iter_start = lpos_end = m.end() - yield pos_body_start, Text, entire_body[:m.start()] - yield pos_body_start + lpos_end, String.Delimiter, m.group() - else: - pos_part_start = pos_body_start - pos_iter_start = 0 - - # process tokens of each body part - for m in bdry_matcher.finditer(entire_body, pos_iter_start): - # bodypart - lpos_start = pos_part_start - pos_body_start - lpos_end = m.start() - part = entire_body[lpos_start:lpos_end] - for i, t, v in self.get_bodypart_tokens(part): - yield pos_part_start + i, t, v - - # boundary - yield pos_body_start + lpos_end, String.Delimiter, m.group() - pos_part_start = pos_body_start + m.end() - - # some data has suffix text after last boundary - lpos_start = pos_part_start - pos_body_start - if lpos_start != len(entire_body): - yield pos_part_start, Text, entire_body[lpos_start:] - - def get_bodypart_tokens(self, text): - # return if: - # * no content - # * no content type specific - # * content encoding is not readable - # * max recurrsion exceed - if not text.strip() or not self.content_type: - return [(0, Other, text)] - - cte = self.content_transfer_encoding - if cte and cte not in {"8bit", "7bit", "quoted-printable"}: - return [(0, Other, text)] - - if self.max_nested_level == 0: - return [(0, Other, text)] - - # get lexer - try: - lexer = get_lexer_for_mimetype(self.content_type) - except ClassNotFound: - return [(0, Other, text)] - - if isinstance(lexer, type(self)): - lexer.max_nested_level = self.max_nested_level - 1 - - return lexer.get_tokens_unprocessed(text) - - def store_content_type(self, match): - self.content_type = match.group(1) - - prefix_len = match.start(1) - match.start(0) - yield match.start(0), Text.Whitespace, match.group(0)[:prefix_len] - yield match.start(1), Name.Label, match.group(2) - yield match.end(2), String.Delimiter, u"/" - yield match.start(3), Name.Label, match.group(3) - - def get_content_type_subtokens(self, match): - yield match.start(1), Text, match.group(1) - yield match.start(2), Text.Whitespace, match.group(2) - yield match.start(3), Name.Attribute, match.group(3) - yield match.start(4), Operator, match.group(4) - yield match.start(5), String, match.group(5) - - if match.group(3).lower() == "boundary": - boundary = match.group(5).strip() - if boundary[0] == '"' and boundary[-1] == '"': - boundary = boundary[1:-1] - self.boundary = boundary - - def store_content_transfer_encoding(self, match): - self.content_transfer_encoding = match.group(0).lower() - yield match.start(0), Name.Constant, match.group(0) - - attention_headers = {"content-type", "content-transfer-encoding"} - - tokens = { - "root": [ - (r"^([\w-]+):( *)([\s\S]*?\n)(?![ \t])", get_header_tokens), - (r"^$[\s\S]+", get_body_tokens), - ], - "header": [ - # folding - (r"\n[ \t]", Text.Whitespace), - (r"\n(?![ \t])", Text.Whitespace, "#pop"), - ], - "content-type": [ - include("header"), - ( - r"^\s*((multipart|application|audio|font|image|model|text|video" - r"|message)/([\w-]+))", - store_content_type, - ), - (r'(;)((?:[ \t]|\n[ \t])*)([\w:-]+)(=)([\s\S]*?)(?=;|\n(?![ \t]))', - get_content_type_subtokens), - (r';[ \t]*\n(?![ \t])', Text, '#pop'), - ], - "content-transfer-encoding": [ - include("header"), - (r"([\w-]+)", store_content_transfer_encoding), - ], - } +# -*- coding: utf-8 -*- +""" + pygments.lexers.mime + ~~~~~~~~~~~~~~~~~~~~ + + Lexer for Multipurpose Internet Mail Extensions (MIME) data. + + :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, include +from pygments.lexers import get_lexer_for_mimetype +from pygments.token import Text, Name, String, Operator, Comment, Other +from pygments.util import get_int_opt, ClassNotFound + +__all__ = ["MIMELexer"] + + +class MIMELexer(RegexLexer): + """ + Lexer for Multipurpose Internet Mail Extensions (MIME) data. This lexer is + designed to process the nested mulitpart data. + + It assumes that the given data contains both header and body (and is + splitted by empty line). If no valid header is found, then the entire data + would be treated as body. + + Additional options accepted: + + `MIME-max-level` + Max recurssion level for nested MIME structure. Any negative number + would treated as unlimited. (default: -1) + + `Content-Type` + Treat the data as specific content type. Useful when header is + missing, or this lexer would try to parse from header. (default: + `text/plain`) + + `Multipart-Boundary` + Set the default multipart boundary delimiter. This option is only used + when `Content-Type` is `multipart` and header is missing. This lexer + would try to parse from header by default. (default: None) + + `Content-Transfer-Encoding` + Treat the data as specific encoding. Or this lexer would try to parse + from header by default. (default: None) + + .. versionadded:: 2.5 + """ + + name = "MIME" + aliases = ["mime"] + mimetypes = ["multipart/mixed", + "multipart/related", + "multipart/alternative"] + + def __init__(self, **options): + super(MIMELexer, self).__init__(**options) + self.boundary = options.get("Multipart-Boundary") + self.content_transfer_encoding = options.get("Content_Transfer_Encoding") + self.content_type = options.get("Content_Type", "text/plain") + self.max_nested_level = get_int_opt(options, "MIME-max-level", -1) + + def analyse_text(text): + try: + header, body = text.strip().split("\n\n", 1) + if not body.strip(): + return 0.1 + + invalid_headers = MIMELexer.tokens["header"].sub("", header) + if invalid_headers.strip(): + return 0.1 + else: + return 1 + + except ValueError: + return 0.1 + + def get_header_tokens(self, match): + field = match.group(1) + + if field.lower() in self.attention_headers: + yield match.start(1), Name.Tag, field + ":" + yield match.start(2), Text.Whitespace, match.group(2) + + pos = match.end(2) + body = match.group(3) + for i, t, v in self.get_tokens_unprocessed(body, ("root", field.lower())): + yield pos + i, t, v + + else: + yield match.start(), Comment, match.group() + + def get_body_tokens(self, match): + pos_body_start = match.start() + entire_body = match.group() + + # skip first newline + if entire_body[0] == '\n': + yield pos_body_start, Text.Whitespace, u'\n' + pos_body_start = pos_body_start + 1 + entire_body = entire_body[1:] + + # if it is not a mulitpart + 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 + return + + # find boundary + bdry_pattern = r"^--%s(--)?\n" % re.escape(self.boundary) + bdry_matcher = re.compile(bdry_pattern, re.MULTILINE) + + # some data has prefix text before first boundary + m = bdry_matcher.search(entire_body) + if m: + pos_part_start = pos_body_start + m.end() + pos_iter_start = lpos_end = m.end() + yield pos_body_start, Text, entire_body[:m.start()] + yield pos_body_start + lpos_end, String.Delimiter, m.group() + else: + pos_part_start = pos_body_start + pos_iter_start = 0 + + # process tokens of each body part + for m in bdry_matcher.finditer(entire_body, pos_iter_start): + # bodypart + lpos_start = pos_part_start - pos_body_start + lpos_end = m.start() + part = entire_body[lpos_start:lpos_end] + for i, t, v in self.get_bodypart_tokens(part): + yield pos_part_start + i, t, v + + # boundary + yield pos_body_start + lpos_end, String.Delimiter, m.group() + pos_part_start = pos_body_start + m.end() + + # some data has suffix text after last boundary + lpos_start = pos_part_start - pos_body_start + if lpos_start != len(entire_body): + yield pos_part_start, Text, entire_body[lpos_start:] + + def get_bodypart_tokens(self, text): + # return if: + # * no content + # * no content type specific + # * content encoding is not readable + # * max recurrsion exceed + if not text.strip() or not self.content_type: + return [(0, Other, text)] + + cte = self.content_transfer_encoding + if cte and cte not in {"8bit", "7bit", "quoted-printable"}: + return [(0, Other, text)] + + if self.max_nested_level == 0: + return [(0, Other, text)] + + # get lexer + try: + lexer = get_lexer_for_mimetype(self.content_type) + except ClassNotFound: + return [(0, Other, text)] + + if isinstance(lexer, type(self)): + lexer.max_nested_level = self.max_nested_level - 1 + + return lexer.get_tokens_unprocessed(text) + + def store_content_type(self, match): + self.content_type = match.group(1) + + prefix_len = match.start(1) - match.start(0) + yield match.start(0), Text.Whitespace, match.group(0)[:prefix_len] + yield match.start(1), Name.Label, match.group(2) + yield match.end(2), String.Delimiter, u"/" + yield match.start(3), Name.Label, match.group(3) + + def get_content_type_subtokens(self, match): + yield match.start(1), Text, match.group(1) + yield match.start(2), Text.Whitespace, match.group(2) + yield match.start(3), Name.Attribute, match.group(3) + yield match.start(4), Operator, match.group(4) + yield match.start(5), String, match.group(5) + + if match.group(3).lower() == "boundary": + boundary = match.group(5).strip() + if boundary[0] == '"' and boundary[-1] == '"': + boundary = boundary[1:-1] + self.boundary = boundary + + def store_content_transfer_encoding(self, match): + self.content_transfer_encoding = match.group(0).lower() + yield match.start(0), Name.Constant, match.group(0) + + attention_headers = {"content-type", "content-transfer-encoding"} + + tokens = { + "root": [ + (r"^([\w-]+):( *)([\s\S]*?\n)(?![ \t])", get_header_tokens), + (r"^$[\s\S]+", get_body_tokens), + ], + "header": [ + # folding + (r"\n[ \t]", Text.Whitespace), + (r"\n(?![ \t])", Text.Whitespace, "#pop"), + ], + "content-type": [ + include("header"), + ( + r"^\s*((multipart|application|audio|font|image|model|text|video" + r"|message)/([\w-]+))", + store_content_type, + ), + (r'(;)((?:[ \t]|\n[ \t])*)([\w:-]+)(=)([\s\S]*?)(?=;|\n(?![ \t]))', + get_content_type_subtokens), + (r';[ \t]*\n(?![ \t])', Text, '#pop'), + ], + "content-transfer-encoding": [ + include("header"), + (r"([\w-]+)", store_content_transfer_encoding), + ], + } diff --git a/contrib/python/Pygments/py2/pygments/lexers/ml.py b/contrib/python/Pygments/py2/pygments/lexers/ml.py index 34d6c3e4ef..461af88134 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/ml.py +++ b/contrib/python/Pygments/py2/pygments/lexers/ml.py @@ -30,7 +30,7 @@ class SMLLexer(RegexLexer): filenames = ['*.sml', '*.sig', '*.fun'] mimetypes = ['text/x-standardml', 'application/x-standardml'] - alphanumid_reserved = { + alphanumid_reserved = { # Core 'abstype', 'and', 'andalso', 'as', 'case', 'datatype', 'do', 'else', 'end', 'exception', 'fn', 'fun', 'handle', 'if', 'in', 'infix', @@ -39,16 +39,16 @@ class SMLLexer(RegexLexer): # Modules 'eqtype', 'functor', 'include', 'sharing', 'sig', 'signature', 'struct', 'structure', 'where', - } + } - symbolicid_reserved = { + symbolicid_reserved = { # Core ':', r'\|', '=', '=>', '->', '#', # Modules ':>', - } + } - nonid_reserved = {'(', ')', '[', ']', '{', '}', ',', ';', '...', '_'} + nonid_reserved = {'(', ')', '[', ']', '{', '}', ',', ';', '...', '_'} alphanumid_re = r"[a-zA-Z][\w']*" symbolicid_re = r"[!%&$#+\-/:<=>?@\\~`^|*]+" diff --git a/contrib/python/Pygments/py2/pygments/lexers/modeling.py b/contrib/python/Pygments/py2/pygments/lexers/modeling.py index f7336a445f..f4dca4a905 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/modeling.py +++ b/contrib/python/Pygments/py2/pygments/lexers/modeling.py @@ -62,8 +62,8 @@ class ModelicaLexer(RegexLexer): r'transpose|vector|zeros)\b', Name.Builtin), (r'(algorithm|annotation|break|connect|constant|constrainedby|der|' r'discrete|each|else|elseif|elsewhen|encapsulated|enumeration|' - r'equation|exit|expandable|extends|external|firstTick|final|flow|for|if|' - r'import|impure|in|initial|inner|input|interval|loop|nondiscrete|outer|' + r'equation|exit|expandable|extends|external|firstTick|final|flow|for|if|' + r'import|impure|in|initial|inner|input|interval|loop|nondiscrete|outer|' r'output|parameter|partial|protected|public|pure|redeclare|' r'replaceable|return|stream|then|when|while)\b', Keyword.Reserved), diff --git a/contrib/python/Pygments/py2/pygments/lexers/pascal.py b/contrib/python/Pygments/py2/pygments/lexers/pascal.py index c554b4a915..0a8dd7df4d 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/pascal.py +++ b/contrib/python/Pygments/py2/pygments/lexers/pascal.py @@ -68,29 +68,29 @@ class DelphiLexer(Lexer): 'dispose', 'exit', 'false', 'new', 'true' ) - BLOCK_KEYWORDS = { + BLOCK_KEYWORDS = { 'begin', 'class', 'const', 'constructor', 'destructor', 'end', 'finalization', 'function', 'implementation', 'initialization', 'label', 'library', 'operator', 'procedure', 'program', 'property', 'record', 'threadvar', 'type', 'unit', 'uses', 'var' - } + } - FUNCTION_MODIFIERS = { + FUNCTION_MODIFIERS = { 'alias', 'cdecl', 'export', 'inline', 'interrupt', 'nostackframe', 'pascal', 'register', 'safecall', 'softfloat', 'stdcall', 'varargs', 'name', 'dynamic', 'near', 'virtual', 'external', 'override', 'assembler' - } + } # XXX: those aren't global. but currently we know no way for defining # them just for the type context. - DIRECTIVES = { + DIRECTIVES = { 'absolute', 'abstract', 'assembler', 'cppdecl', 'default', 'far', 'far16', 'forward', 'index', 'oldfpccall', 'private', 'protected', 'published', 'public' - } + } - BUILTIN_TYPES = { + BUILTIN_TYPES = { 'ansichar', 'ansistring', 'bool', 'boolean', 'byte', 'bytebool', 'cardinal', 'char', 'comp', 'currency', 'double', 'dword', 'extended', 'int64', 'integer', 'iunknown', 'longbool', 'longint', @@ -104,7 +104,7 @@ class DelphiLexer(Lexer): 'shortstring', 'single', 'smallint', 'string', 'tclass', 'tdate', 'tdatetime', 'textfile', 'thandle', 'tobject', 'ttime', 'variant', 'widechar', 'widestring', 'word', 'wordbool' - } + } BUILTIN_UNITS = { 'System': ( @@ -246,7 +246,7 @@ class DelphiLexer(Lexer): ) } - ASM_REGISTERS = { + ASM_REGISTERS = { 'ah', 'al', 'ax', 'bh', 'bl', 'bp', 'bx', 'ch', 'cl', 'cr0', 'cr1', 'cr2', 'cr3', 'cr4', 'cs', 'cx', 'dh', 'di', 'dl', 'dr0', 'dr1', 'dr2', 'dr3', 'dr4', 'dr5', 'dr6', 'dr7', 'ds', 'dx', @@ -255,9 +255,9 @@ class DelphiLexer(Lexer): 'mm7', 'si', 'sp', 'ss', 'st0', 'st1', 'st2', 'st3', 'st4', 'st5', 'st6', 'st7', 'xmm0', 'xmm1', 'xmm2', 'xmm3', 'xmm4', 'xmm5', 'xmm6', 'xmm7' - } + } - ASM_INSTRUCTIONS = { + ASM_INSTRUCTIONS = { 'aaa', 'aad', 'aam', 'aas', 'adc', 'add', 'and', 'arpl', 'bound', 'bsf', 'bsr', 'bswap', 'bt', 'btc', 'btr', 'bts', 'call', 'cbw', 'cdq', 'clc', 'cld', 'cli', 'clts', 'cmc', 'cmova', 'cmovae', @@ -296,7 +296,7 @@ class DelphiLexer(Lexer): 'sysret', 'test', 'ud1', 'ud2', 'umov', 'verr', 'verw', 'wait', 'wbinvd', 'wrmsr', 'wrshr', 'xadd', 'xbts', 'xchg', 'xlat', 'xlatb', 'xor' - } + } def __init__(self, **options): Lexer.__init__(self, **options) diff --git a/contrib/python/Pygments/py2/pygments/lexers/pawn.py b/contrib/python/Pygments/py2/pygments/lexers/pawn.py index 6123d40e21..3cdfbd03e8 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/pawn.py +++ b/contrib/python/Pygments/py2/pygments/lexers/pawn.py @@ -86,25 +86,25 @@ class SourcePawnLexer(RegexLexer): ] } - SM_TYPES = {'Action', 'bool', 'Float', 'Plugin', 'String', 'any', - 'AdminFlag', 'OverrideType', 'OverrideRule', 'ImmunityType', - 'GroupId', 'AdminId', 'AdmAccessMode', 'AdminCachePart', - 'CookieAccess', 'CookieMenu', 'CookieMenuAction', 'NetFlow', - 'ConVarBounds', 'QueryCookie', 'ReplySource', - 'ConVarQueryResult', 'ConVarQueryFinished', 'Function', - 'Action', 'Identity', 'PluginStatus', 'PluginInfo', 'DBResult', - 'DBBindType', 'DBPriority', 'PropType', 'PropFieldType', - 'MoveType', 'RenderMode', 'RenderFx', 'EventHookMode', - 'EventHook', 'FileType', 'FileTimeMode', 'PathType', - 'ParamType', 'ExecType', 'DialogType', 'Handle', 'KvDataTypes', - 'NominateResult', 'MapChange', 'MenuStyle', 'MenuAction', - 'MenuSource', 'RegexError', 'SDKCallType', 'SDKLibrary', - 'SDKFuncConfSource', 'SDKType', 'SDKPassMethod', 'RayType', - 'TraceEntityFilter', 'ListenOverride', 'SortOrder', 'SortType', - 'SortFunc2D', 'APLRes', 'FeatureType', 'FeatureStatus', - 'SMCResult', 'SMCError', 'TFClassType', 'TFTeam', 'TFCond', - 'TFResourceType', 'Timer', 'TopMenuAction', 'TopMenuObjectType', - 'TopMenuPosition', 'TopMenuObject', 'UserMsg'} + SM_TYPES = {'Action', 'bool', 'Float', 'Plugin', 'String', 'any', + 'AdminFlag', 'OverrideType', 'OverrideRule', 'ImmunityType', + 'GroupId', 'AdminId', 'AdmAccessMode', 'AdminCachePart', + 'CookieAccess', 'CookieMenu', 'CookieMenuAction', 'NetFlow', + 'ConVarBounds', 'QueryCookie', 'ReplySource', + 'ConVarQueryResult', 'ConVarQueryFinished', 'Function', + 'Action', 'Identity', 'PluginStatus', 'PluginInfo', 'DBResult', + 'DBBindType', 'DBPriority', 'PropType', 'PropFieldType', + 'MoveType', 'RenderMode', 'RenderFx', 'EventHookMode', + 'EventHook', 'FileType', 'FileTimeMode', 'PathType', + 'ParamType', 'ExecType', 'DialogType', 'Handle', 'KvDataTypes', + 'NominateResult', 'MapChange', 'MenuStyle', 'MenuAction', + 'MenuSource', 'RegexError', 'SDKCallType', 'SDKLibrary', + 'SDKFuncConfSource', 'SDKType', 'SDKPassMethod', 'RayType', + 'TraceEntityFilter', 'ListenOverride', 'SortOrder', 'SortType', + 'SortFunc2D', 'APLRes', 'FeatureType', 'FeatureStatus', + 'SMCResult', 'SMCError', 'TFClassType', 'TFTeam', 'TFCond', + 'TFResourceType', 'Timer', 'TopMenuAction', 'TopMenuObjectType', + 'TopMenuPosition', 'TopMenuObject', 'UserMsg'} def __init__(self, **options): self.smhighlighting = get_bool_opt(options, diff --git a/contrib/python/Pygments/py2/pygments/lexers/praat.py b/contrib/python/Pygments/py2/pygments/lexers/praat.py index 48c4ef10e0..4a6a14f0ea 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/praat.py +++ b/contrib/python/Pygments/py2/pygments/lexers/praat.py @@ -55,7 +55,7 @@ class PraatLexer(RegexLexer): 'exitScript', 'exp', 'extractNumber', 'fileReadable', 'fisherP', 'fisherQ', 'floor', 'gaussP', 'gaussQ', 'hertzToBark', 'hertzToErb', 'hertzToMel', 'hertzToSemitones', 'imax', 'imin', 'incompleteBeta', 'incompleteGammaP', 'index', - 'index_regex', 'integer', 'invBinomialP', 'invBinomialQ', 'invChiSquareQ', 'invFisherQ', + 'index_regex', 'integer', 'invBinomialP', 'invBinomialQ', 'invChiSquareQ', 'invFisherQ', 'invGaussQ', 'invSigmoid', 'invStudentQ', 'length', 'ln', 'lnBeta', 'lnGamma', 'log10', 'log2', 'max', 'melToHertz', 'min', 'minusObject', 'natural', 'number', 'numberOfColumns', 'numberOfRows', 'numberOfSelected', 'objectsAreIdentical', @@ -63,9 +63,9 @@ class PraatLexer(RegexLexer): 'positive', 'randomBinomial', 'randomGauss', 'randomInteger', 'randomPoisson', 'randomUniform', 'real', 'readFile', 'removeObject', 'rindex', 'rindex_regex', 'round', 'runScript', 'runSystem', 'runSystem_nocheck', 'selectObject', - 'selected', 'semitonesToHertz', 'sentence', 'sentencetext', 'sigmoid', 'sin', 'sinc', + 'selected', 'semitonesToHertz', 'sentence', 'sentencetext', 'sigmoid', 'sin', 'sinc', 'sincpi', 'sinh', 'soundPressureToPhon', 'sqrt', 'startsWith', 'studentP', - 'studentQ', 'tan', 'tanh', 'text', 'variableExists', 'word', 'writeFile', 'writeFileLine', + 'studentQ', 'tan', 'tanh', 'text', 'variableExists', 'word', 'writeFile', 'writeFileLine', 'writeInfo', 'writeInfoLine', ) @@ -90,9 +90,9 @@ class PraatLexer(RegexLexer): 'KNN', 'KlattGrid', 'KlattTable', 'LFCC', 'LPC', 'Label', 'LegendreSeries', 'LinearRegression', 'LogisticRegression', 'LongSound', 'Ltas', 'MFCC', 'MSpline', 'ManPages', 'Manipulation', 'Matrix', 'MelFilter', 'MelSpectrogram', - 'MixingMatrix', 'Movie', 'Network', 'Object', 'OTGrammar', 'OTHistory', 'OTMulti', - 'PCA', 'PairDistribution', 'ParamCurve', 'Pattern', 'Permutation', 'Photo', - 'Pitch', 'PitchModeler', 'PitchTier', 'PointProcess', 'Polygon', 'Polynomial', + 'MixingMatrix', 'Movie', 'Network', 'Object', 'OTGrammar', 'OTHistory', 'OTMulti', + 'PCA', 'PairDistribution', 'ParamCurve', 'Pattern', 'Permutation', 'Photo', + 'Pitch', 'PitchModeler', 'PitchTier', 'PointProcess', 'Polygon', 'Polynomial', 'PowerCepstrogram', 'PowerCepstrum', 'Procrustes', 'RealPoint', 'RealTier', 'ResultsMFC', 'Roots', 'SPINET', 'SSCP', 'SVD', 'Salience', 'ScalarProduct', 'Similarity', 'SimpleString', 'SortedSetOfString', 'Sound', 'Speaker', @@ -112,10 +112,10 @@ class PraatLexer(RegexLexer): 'defaultDirectory', ) - object_attributes = ( - 'ncol', 'nrow', 'xmin', 'ymin', 'xmax', 'ymax', 'nx', 'ny', 'dx', 'dy', - ) - + object_attributes = ( + 'ncol', 'nrow', 'xmin', 'ymin', 'xmax', 'ymax', 'nx', 'ny', 'dx', 'dy', + ) + tokens = { 'root': [ (r'(\s+)(#.*?$)', bygroups(Text, Comment.Single)), @@ -152,9 +152,9 @@ class PraatLexer(RegexLexer): ], 'command': [ (r'( ?[\w()-]+ ?)', Keyword), - - include('string_interpolated'), - + + include('string_interpolated'), + (r'\.{3}', Keyword, ('#pop', 'old_arguments')), (r':', Keyword, ('#pop', 'comma_list')), (r'\s', Text, '#pop'), @@ -213,39 +213,39 @@ class PraatLexer(RegexLexer): (r'\n', Text, '#pop'), (r'\b\d+(\.\d*)?([eE][-+]?\d+)?%?', Number), ], - 'object_reference': [ - include('string_interpolated'), - (r'([a-z][a-zA-Z0-9_]*|\d+)', Name.Builtin), - - (words(object_attributes, prefix=r'\.'), Name.Builtin, '#pop'), - - (r'\$', Name.Builtin), - (r'\[', Text, '#pop'), + 'object_reference': [ + include('string_interpolated'), + (r'([a-z][a-zA-Z0-9_]*|\d+)', Name.Builtin), + + (words(object_attributes, prefix=r'\.'), Name.Builtin, '#pop'), + + (r'\$', Name.Builtin), + (r'\[', Text, '#pop'), ], 'variable_name': [ include('operator'), include('number'), (words(variables_string, suffix=r'\$'), Name.Variable.Global), - (words(variables_numeric, - suffix=r'(?=[^a-zA-Z0-9\._"\'\$#\[:\(]|\s|^|$)'), - Name.Variable.Global), + (words(variables_numeric, + suffix=r'(?=[^a-zA-Z0-9\._"\'\$#\[:\(]|\s|^|$)'), + Name.Variable.Global), - (words(objects, prefix=r'\b', suffix=r"(_)"), - bygroups(Name.Builtin, Name.Builtin), - 'object_reference'), + (words(objects, prefix=r'\b', suffix=r"(_)"), + bygroups(Name.Builtin, Name.Builtin), + 'object_reference'), (r'\.?_?[a-z][\w.]*(\$|#)?', Text), (r'[\[\]]', Punctuation, 'comma_list'), - - include('string_interpolated'), + + include('string_interpolated'), ], 'operator': [ (r'([+\/*<>=!-]=?|[&*|][&*|]?|\^|<>)', Operator), (r'(?<![\w.])(and|or|not|div|mod)(?![\w.])', Operator.Word), ], 'string_interpolated': [ - (r'\'[_a-z][^\[\]\'":]*(\[([\d,]+|"[\w\d,]+")\])?(:[0-9]+)?\'', + (r'\'[_a-z][^\[\]\'":]*(\[([\d,]+|"[\w\d,]+")\])?(:[0-9]+)?\'', String.Interpol), ], 'string_unquoted': [ @@ -253,9 +253,9 @@ class PraatLexer(RegexLexer): (r'\n', Text, '#pop'), (r'\s', Text), - - include('string_interpolated'), - + + include('string_interpolated'), + (r"'", String), (r"[^'\n]+", String), ], @@ -263,14 +263,14 @@ class PraatLexer(RegexLexer): (r'(\n\s*)(\.{3})', bygroups(Text, Punctuation)), (r'"', String, '#pop'), - - include('string_interpolated'), - + + include('string_interpolated'), + (r"'", String), (r'[^\'"\n]+', String), ], 'old_form': [ - (r'(\s+)(#.*?$)', bygroups(Text, Comment.Single)), + (r'(\s+)(#.*?$)', bygroups(Text, Comment.Single)), (r'\s+', Text), (r'(optionmenu|choice)([ \t]+\S+:[ \t]+)', diff --git a/contrib/python/Pygments/py2/pygments/lexers/prolog.py b/contrib/python/Pygments/py2/pygments/lexers/prolog.py index 4682ca4bb4..70783625e0 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/prolog.py +++ b/contrib/python/Pygments/py2/pygments/lexers/prolog.py @@ -107,19 +107,19 @@ class LogtalkLexer(RegexLexer): (r'\n', Text), (r'\s+', Text), # Numbers - (r"0'[\\]?.", Number), + (r"0'[\\]?.", Number), (r'0b[01]+', Number.Bin), (r'0o[0-7]+', Number.Oct), (r'0x[0-9a-fA-F]+', Number.Hex), (r'\d+\.?\d*((e|E)(\+|-)?\d+)?', Number), # Variables - (r'([A-Z_][a-zA-Z0-9_]*)', Name.Variable), + (r'([A-Z_][a-zA-Z0-9_]*)', Name.Variable), # Event handlers (r'(after|before)(?=[(])', Keyword), # Message forwarding handler (r'forward(?=[(])', Keyword), # Execution-context methods - (r'(context|parameter|this|se(lf|nder))(?=[(])', Keyword), + (r'(context|parameter|this|se(lf|nder))(?=[(])', Keyword), # Reflection (r'(current_predicate|predicate_property)(?=[(])', Keyword), # DCGs and term expansion @@ -135,23 +135,23 @@ class LogtalkLexer(RegexLexer): # Events (r'(current_event|(abolish|define)_events)(?=[(])', Keyword), # Flags - (r'(create|current|set)_logtalk_flag(?=[(])', Keyword), + (r'(create|current|set)_logtalk_flag(?=[(])', Keyword), # Compiling, loading, and library paths - (r'logtalk_(compile|l(ibrary_path|oad|oad_context)|make(_target_action)?)(?=[(])', Keyword), + (r'logtalk_(compile|l(ibrary_path|oad|oad_context)|make(_target_action)?)(?=[(])', Keyword), (r'\blogtalk_make\b', Keyword), # Database (r'(clause|retract(all)?)(?=[(])', Keyword), (r'a(bolish|ssert(a|z))(?=[(])', Keyword), # Control constructs (r'(ca(ll|tch)|throw)(?=[(])', Keyword), - (r'(fa(il|lse)|true|(instantiation|system)_error)\b', Keyword), - (r'(type|domain|existence|permission|representation|evaluation|resource|syntax)_error(?=[(])', Keyword), + (r'(fa(il|lse)|true|(instantiation|system)_error)\b', Keyword), + (r'(type|domain|existence|permission|representation|evaluation|resource|syntax)_error(?=[(])', Keyword), # All solutions (r'((bag|set)of|f(ind|or)all)(?=[(])', Keyword), - # Multi-threading predicates - (r'threaded(_(ca(ll|ncel)|once|ignore|exit|peek|wait|notify))?(?=[(])', Keyword), - # Engine predicates - (r'threaded_engine(_(create|destroy|self|next|next_reified|yield|post|fetch))?(?=[(])', Keyword), + # Multi-threading predicates + (r'threaded(_(ca(ll|ncel)|once|ignore|exit|peek|wait|notify))?(?=[(])', Keyword), + # Engine predicates + (r'threaded_engine(_(create|destroy|self|next|next_reified|yield|post|fetch))?(?=[(])', Keyword), # Term unification (r'(subsumes_term|unify_with_occurs_check)(?=[(])', Keyword), # Term creation and decomposition @@ -163,7 +163,7 @@ class LogtalkLexer(RegexLexer): # Other arithmetic functors (r'(cos|a(cos|sin|tan|tan2)|exp|log|s(in|qrt)|xor)(?=[(])', Keyword), # Term testing - (r'(var|atom(ic)?|integer|float|c(allable|ompound)|n(onvar|umber)|ground|acyclic_term)(?=[(])', Keyword), + (r'(var|atom(ic)?|integer|float|c(allable|ompound)|n(onvar|umber)|ground|acyclic_term)(?=[(])', Keyword), # Term comparison (r'compare(?=[(])', Keyword), # Stream selection and control @@ -228,10 +228,10 @@ class LogtalkLexer(RegexLexer): (r'\^', Operator), # Strings (r'"(\\\\|\\"|[^"])*"', String), - # Punctuation + # Punctuation (r'[()\[\],.|]', Text), # Atoms - (r"[a-z][a-zA-Z0-9_]*", Text), + (r"[a-z][a-zA-Z0-9_]*", Text), (r"'", String, 'quoted_atom'), ], @@ -246,35 +246,35 @@ class LogtalkLexer(RegexLexer): 'directive': [ # Conditional compilation directives (r'(el)?if(?=[(])', Keyword, 'root'), - (r'(e(lse|ndif))(?=[.])', Keyword, 'root'), + (r'(e(lse|ndif))(?=[.])', Keyword, 'root'), # Entity directives (r'(category|object|protocol)(?=[(])', Keyword, 'entityrelations'), - (r'(end_(category|object|protocol))(?=[.])', Keyword, 'root'), + (r'(end_(category|object|protocol))(?=[.])', Keyword, 'root'), # Predicate scope directives (r'(public|protected|private)(?=[(])', Keyword, 'root'), # Other directives (r'e(n(coding|sure_loaded)|xport)(?=[(])', Keyword, 'root'), (r'in(clude|itialization|fo)(?=[(])', Keyword, 'root'), - (r'(built_in|dynamic|synchronized|threaded)(?=[.])', Keyword, 'root'), - (r'(alias|d(ynamic|iscontiguous)|m(eta_(non_terminal|predicate)|ode|ultifile)|s(et_(logtalk|prolog)_flag|ynchronized))(?=[(])', Keyword, 'root'), + (r'(built_in|dynamic|synchronized|threaded)(?=[.])', Keyword, 'root'), + (r'(alias|d(ynamic|iscontiguous)|m(eta_(non_terminal|predicate)|ode|ultifile)|s(et_(logtalk|prolog)_flag|ynchronized))(?=[(])', Keyword, 'root'), (r'op(?=[(])', Keyword, 'root'), (r'(c(alls|oinductive)|module|reexport|use(s|_module))(?=[(])', Keyword, 'root'), - (r'[a-z][a-zA-Z0-9_]*(?=[(])', Text, 'root'), - (r'[a-z][a-zA-Z0-9_]*(?=[.])', Text, 'root'), + (r'[a-z][a-zA-Z0-9_]*(?=[(])', Text, 'root'), + (r'[a-z][a-zA-Z0-9_]*(?=[.])', Text, 'root'), ], 'entityrelations': [ (r'(complements|extends|i(nstantiates|mp(lements|orts))|specializes)(?=[(])', Keyword), # Numbers - (r"0'[\\]?.", Number), + (r"0'[\\]?.", Number), (r'0b[01]+', Number.Bin), (r'0o[0-7]+', Number.Oct), (r'0x[0-9a-fA-F]+', Number.Hex), (r'\d+\.?\d*((e|E)(\+|-)?\d+)?', Number), # Variables - (r'([A-Z_][a-zA-Z0-9_]*)', Name.Variable), + (r'([A-Z_][a-zA-Z0-9_]*)', Name.Variable), # Atoms - (r"[a-z][a-zA-Z0-9_]*", Text), + (r"[a-z][a-zA-Z0-9_]*", Text), (r"'", String, 'quoted_atom'), # Strings (r'"(\\\\|\\"|[^"])*"', String), @@ -282,7 +282,7 @@ class LogtalkLexer(RegexLexer): (r'([)]\.)', Text, 'root'), # Scope operator (r'(::)', Operator), - # Punctuation + # Punctuation (r'[()\[\],.|]', Text), # Comments (r'%.*?\n', Comment), diff --git a/contrib/python/Pygments/py2/pygments/lexers/python.py b/contrib/python/Pygments/py2/pygments/lexers/python.py index ece2e75962..5f700e7f5d 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/python.py +++ b/contrib/python/Pygments/py2/pygments/lexers/python.py @@ -19,291 +19,291 @@ from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ from pygments import unistring as uni __all__ = ['PythonLexer', 'PythonConsoleLexer', 'PythonTracebackLexer', - 'Python2Lexer', 'Python2TracebackLexer', - 'CythonLexer', 'DgLexer', 'NumPyLexer'] + 'Python2Lexer', 'Python2TracebackLexer', + 'CythonLexer', 'DgLexer', 'NumPyLexer'] line_re = re.compile('.*?\n') class PythonLexer(RegexLexer): """ - For `Python <http://www.python.org>`_ source code (version 3.x). - - .. versionadded:: 0.10 - - .. versionchanged:: 2.5 - This is now the default ``PythonLexer``. It is still available as the - alias ``Python3Lexer``. + For `Python <http://www.python.org>`_ source code (version 3.x). + + .. versionadded:: 0.10 + + .. versionchanged:: 2.5 + This is now the default ``PythonLexer``. It is still available as the + alias ``Python3Lexer``. """ name = 'Python' - aliases = ['python', 'py', 'sage', 'python3', 'py3'] - filenames = [ - '*.py', - '*.pyw', - # Jython - '*.jy', - # Sage - '*.sage', - # SCons - '*.sc', - 'SConstruct', - 'SConscript', - # Skylark/Starlark (used by Bazel, Buck, and Pants) - '*.bzl', - 'BUCK', - 'BUILD', - 'BUILD.bazel', - 'WORKSPACE', - # Twisted Application infrastructure - '*.tac', - ] - 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) - + aliases = ['python', 'py', 'sage', 'python3', 'py3'] + filenames = [ + '*.py', + '*.pyw', + # Jython + '*.jy', + # Sage + '*.sage', + # SCons + '*.sc', + 'SConstruct', + 'SConscript', + # Skylark/Starlark (used by Bazel, Buck, and Pants) + '*.bzl', + 'BUCK', + 'BUILD', + 'BUILD.bazel', + 'WORKSPACE', + # Twisted Application infrastructure + '*.tac', + ] + 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): + return [ + # the old style '%s' % (...) string formatting (still valid in Py3) + (r'%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?' + '[hlL]?[E-GXc-giorsaux%]', String.Interpol), + # the new style '{}'.format(...) string formatting + (r'\{' + r'((\w+)((\.\w+)|(\[[^\]]+\]))*)?' # field name + r'(\![sra])?' # conversion + r'(\:(.?[<>=\^])?[-+ ]?#?0?(\d+)?,?(\.\d+)?[E-GXb-gnosx%]?)?' + r'\}', String.Interpol), + + # backslashes, quotes and formatting signs must be parsed one at a time + (r'[^\\\'"%{\n]+', ttype), + (r'[\'"\\]', ttype), + # unhandled string formatting sign + (r'%|(\{{1,2})', ttype) + # newlines are an error (use "nl" state) + ] + + tokens = { + 'root': [ + (r'\n', Text), + (r'^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")', + bygroups(Text, String.Affix, String.Doc)), + (r"^(\s*)([rRuUbB]{,2})('''(?:.|\n)*?''')", + bygroups(Text, String.Affix, String.Doc)), + (r'[^\S\n]+', Text), + (r'\A#!.+$', Comment.Hashbang), + (r'#.*$', Comment.Single), + (r'[]{}:(),;[]', Punctuation), + (r'\\\n', Text), + (r'\\', Text), + (r'(in|is|and|or|not)\b', Operator.Word), + (r'!=|==|<<|>>|[-~+/*%=<>&^|.]', Operator), + include('keywords'), + (r'(def)((?:\s|\\\s)+)', bygroups(Keyword, Text), 'funcname'), + (r'(class)((?:\s|\\\s)+)', bygroups(Keyword, Text), 'classname'), + (r'(from)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Text), + 'fromimport'), + (r'(import)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Text), + 'import'), + include('builtins'), + include('magicfuncs'), + include('magicvars'), + # raw strings + ('(?i)(rb|br|fr|rf|r)(""")', + bygroups(String.Affix, String.Double), 'tdqs'), + ("(?i)(rb|br|fr|rf|r)(''')", + bygroups(String.Affix, String.Single), 'tsqs'), + ('(?i)(rb|br|fr|rf|r)(")', + bygroups(String.Affix, String.Double), 'dqs'), + ("(?i)(rb|br|fr|rf|r)(')", + bygroups(String.Affix, String.Single), 'sqs'), + # non-raw strings + ('([uUbBfF]?)(""")', bygroups(String.Affix, String.Double), + combined('stringescape', 'tdqs')), + ("([uUbBfF]?)(''')", bygroups(String.Affix, String.Single), + combined('stringescape', 'tsqs')), + ('([uUbBfF]?)(")', bygroups(String.Affix, String.Double), + combined('stringescape', 'dqs')), + ("([uUbBfF]?)(')", bygroups(String.Affix, String.Single), + combined('stringescape', 'sqs')), + include('name'), + include('numbers'), + ], + 'keywords': [ + (words(( + 'assert', 'async', 'await', 'break', 'continue', 'del', 'elif', + 'else', 'except', 'finally', 'for', 'global', 'if', 'lambda', + 'pass', 'raise', 'nonlocal', 'return', 'try', 'while', 'yield', + 'yield from', 'as', 'with'), suffix=r'\b'), + Keyword), + (words(('True', 'False', 'None'), suffix=r'\b'), Keyword.Constant), + ], + 'builtins': [ + (words(( + '__import__', 'abs', 'all', 'any', 'bin', 'bool', 'bytearray', + 'bytes', 'chr', 'classmethod', 'cmp', 'compile', 'complex', + 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'filter', + 'float', 'format', 'frozenset', 'getattr', 'globals', 'hasattr', + 'hash', 'hex', 'id', 'input', 'int', 'isinstance', 'issubclass', + 'iter', 'len', 'list', 'locals', 'map', 'max', 'memoryview', + 'min', 'next', 'object', 'oct', 'open', 'ord', 'pow', 'print', + 'property', 'range', 'repr', 'reversed', 'round', 'set', 'setattr', + 'slice', 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', + 'type', 'vars', 'zip'), prefix=r'(?<!\.)', suffix=r'\b'), + Name.Builtin), + (r'(?<!\.)(self|Ellipsis|NotImplemented|cls)\b', Name.Builtin.Pseudo), + (words(( + 'ArithmeticError', 'AssertionError', 'AttributeError', + 'BaseException', 'BufferError', 'BytesWarning', 'DeprecationWarning', + 'EOFError', 'EnvironmentError', 'Exception', 'FloatingPointError', + 'FutureWarning', 'GeneratorExit', 'IOError', 'ImportError', + 'ImportWarning', 'IndentationError', 'IndexError', 'KeyError', + 'KeyboardInterrupt', 'LookupError', 'MemoryError', 'NameError', + 'NotImplementedError', 'OSError', 'OverflowError', + 'PendingDeprecationWarning', 'ReferenceError', 'ResourceWarning', + 'RuntimeError', 'RuntimeWarning', 'StopIteration', + 'SyntaxError', 'SyntaxWarning', 'SystemError', 'SystemExit', + 'TabError', 'TypeError', 'UnboundLocalError', 'UnicodeDecodeError', + 'UnicodeEncodeError', 'UnicodeError', 'UnicodeTranslateError', + 'UnicodeWarning', 'UserWarning', 'ValueError', 'VMSError', + 'Warning', 'WindowsError', 'ZeroDivisionError', + # new builtin exceptions from PEP 3151 + 'BlockingIOError', 'ChildProcessError', 'ConnectionError', + 'BrokenPipeError', 'ConnectionAbortedError', 'ConnectionRefusedError', + 'ConnectionResetError', 'FileExistsError', 'FileNotFoundError', + 'InterruptedError', 'IsADirectoryError', 'NotADirectoryError', + 'PermissionError', 'ProcessLookupError', 'TimeoutError', + # others new in Python 3 + 'StopAsyncIteration'), + prefix=r'(?<!\.)', suffix=r'\b'), + Name.Exception), + ], + 'magicfuncs': [ + (words(( + '__abs__', '__add__', '__aenter__', '__aexit__', '__aiter__', + '__and__', '__anext__', '__await__', '__bool__', '__bytes__', + '__call__', '__complex__', '__contains__', '__del__', '__delattr__', + '__delete__', '__delitem__', '__dir__', '__divmod__', '__enter__', + '__eq__', '__exit__', '__float__', '__floordiv__', '__format__', + '__ge__', '__get__', '__getattr__', '__getattribute__', + '__getitem__', '__gt__', '__hash__', '__iadd__', '__iand__', + '__ifloordiv__', '__ilshift__', '__imatmul__', '__imod__', + '__imul__', '__index__', '__init__', '__instancecheck__', + '__int__', '__invert__', '__ior__', '__ipow__', '__irshift__', + '__isub__', '__iter__', '__itruediv__', '__ixor__', '__le__', + '__len__', '__length_hint__', '__lshift__', '__lt__', '__matmul__', + '__missing__', '__mod__', '__mul__', '__ne__', '__neg__', + '__new__', '__next__', '__or__', '__pos__', '__pow__', + '__prepare__', '__radd__', '__rand__', '__rdivmod__', '__repr__', + '__reversed__', '__rfloordiv__', '__rlshift__', '__rmatmul__', + '__rmod__', '__rmul__', '__ror__', '__round__', '__rpow__', + '__rrshift__', '__rshift__', '__rsub__', '__rtruediv__', + '__rxor__', '__set__', '__setattr__', '__setitem__', '__str__', + '__sub__', '__subclasscheck__', '__truediv__', + '__xor__'), suffix=r'\b'), + Name.Function.Magic), + ], + 'magicvars': [ + (words(( + '__annotations__', '__bases__', '__class__', '__closure__', + '__code__', '__defaults__', '__dict__', '__doc__', '__file__', + '__func__', '__globals__', '__kwdefaults__', '__module__', + '__mro__', '__name__', '__objclass__', '__qualname__', + '__self__', '__slots__', '__weakref__'), suffix=r'\b'), + Name.Variable.Magic), + ], + 'numbers': [ + (r'(\d(?:_?\d)*\.(?:\d(?:_?\d)*)?|(?:\d(?:_?\d)*)?\.\d(?:_?\d)*)' + r'([eE][+-]?\d(?:_?\d)*)?', Number.Float), + (r'\d(?:_?\d)*[eE][+-]?\d(?:_?\d)*j?', Number.Float), + (r'0[oO](?:_?[0-7])+', Number.Oct), + (r'0[bB](?:_?[01])+', Number.Bin), + (r'0[xX](?:_?[a-fA-F0-9])+', Number.Hex), + (r'\d(?:_?\d)*', Number.Integer), + ], + 'name': [ + (r'@' + uni_name, Name.Decorator), + (r'@', Operator), # new matrix multiplication operator + (uni_name, Name), + ], + 'funcname': [ + include('magicfuncs'), + (uni_name, Name.Function, '#pop'), + default('#pop'), + ], + 'classname': [ + (uni_name, Name.Class, '#pop'), + ], + 'import': [ + (r'(\s+)(as)(\s+)', bygroups(Text, Keyword, Text)), + (r'\.', Name.Namespace), + (uni_name, Name.Namespace), + (r'(\s*)(,)(\s*)', bygroups(Text, Operator, Text)), + default('#pop') # all else: go back + ], + 'fromimport': [ + (r'(\s+)(import)\b', bygroups(Text, Keyword.Namespace), '#pop'), + (r'\.', Name.Namespace), + # if None occurs here, it's "raise x from None", since None can + # never be a module name + (r'None\b', Name.Builtin.Pseudo, '#pop'), + (uni_name, Name.Namespace), + default('#pop'), + ], + 'stringescape': [ + (r'\\([\\abfnrtv"\']|\n|N\{.*?\}|u[a-fA-F0-9]{4}|' + r'U[a-fA-F0-9]{8}|x[a-fA-F0-9]{2}|[0-7]{1,3})', String.Escape) + ], + 'strings-single': innerstring_rules(String.Single), + 'strings-double': innerstring_rules(String.Double), + 'dqs': [ + (r'"', String.Double, '#pop'), + (r'\\\\|\\"|\\\n', String.Escape), # included here for raw strings + include('strings-double') + ], + 'sqs': [ + (r"'", String.Single, '#pop'), + (r"\\\\|\\'|\\\n", String.Escape), # included here for raw strings + include('strings-single') + ], + 'tdqs': [ + (r'"""', String.Double, '#pop'), + include('strings-double'), + (r'\n', String.Double) + ], + 'tsqs': [ + (r"'''", String.Single, '#pop'), + include('strings-single'), + (r'\n', String.Single) + ], + } + + def analyse_text(text): + return shebang_matches(text, r'pythonw?(3(\.\d)?)?') + + +Python3Lexer = PythonLexer + + +class Python2Lexer(RegexLexer): + """ + For `Python 2.x <http://www.python.org>`_ source code. + + .. versionchanged:: 2.5 + This class has been renamed from ``PythonLexer``. ``PythonLexer`` now + refers to the Python 3 variant. File name patterns like ``*.py`` have + been moved to Python 3 as well. + """ + + name = 'Python 2.x' + aliases = ['python2', 'py2'] + filenames = [] # now taken over by PythonLexer (3.x) + mimetypes = ['text/x-python2', 'application/x-python2'] + def innerstring_rules(ttype): return [ - # the old style '%s' % (...) string formatting (still valid in Py3) - (r'%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?' - '[hlL]?[E-GXc-giorsaux%]', String.Interpol), - # the new style '{}'.format(...) string formatting - (r'\{' - r'((\w+)((\.\w+)|(\[[^\]]+\]))*)?' # field name - r'(\![sra])?' # conversion - r'(\:(.?[<>=\^])?[-+ ]?#?0?(\d+)?,?(\.\d+)?[E-GXb-gnosx%]?)?' - r'\}', String.Interpol), - - # backslashes, quotes and formatting signs must be parsed one at a time - (r'[^\\\'"%{\n]+', ttype), - (r'[\'"\\]', ttype), - # unhandled string formatting sign - (r'%|(\{{1,2})', ttype) - # newlines are an error (use "nl" state) - ] - - tokens = { - 'root': [ - (r'\n', Text), - (r'^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")', - bygroups(Text, String.Affix, String.Doc)), - (r"^(\s*)([rRuUbB]{,2})('''(?:.|\n)*?''')", - bygroups(Text, String.Affix, String.Doc)), - (r'[^\S\n]+', Text), - (r'\A#!.+$', Comment.Hashbang), - (r'#.*$', Comment.Single), - (r'[]{}:(),;[]', Punctuation), - (r'\\\n', Text), - (r'\\', Text), - (r'(in|is|and|or|not)\b', Operator.Word), - (r'!=|==|<<|>>|[-~+/*%=<>&^|.]', Operator), - include('keywords'), - (r'(def)((?:\s|\\\s)+)', bygroups(Keyword, Text), 'funcname'), - (r'(class)((?:\s|\\\s)+)', bygroups(Keyword, Text), 'classname'), - (r'(from)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Text), - 'fromimport'), - (r'(import)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Text), - 'import'), - include('builtins'), - include('magicfuncs'), - include('magicvars'), - # raw strings - ('(?i)(rb|br|fr|rf|r)(""")', - bygroups(String.Affix, String.Double), 'tdqs'), - ("(?i)(rb|br|fr|rf|r)(''')", - bygroups(String.Affix, String.Single), 'tsqs'), - ('(?i)(rb|br|fr|rf|r)(")', - bygroups(String.Affix, String.Double), 'dqs'), - ("(?i)(rb|br|fr|rf|r)(')", - bygroups(String.Affix, String.Single), 'sqs'), - # non-raw strings - ('([uUbBfF]?)(""")', bygroups(String.Affix, String.Double), - combined('stringescape', 'tdqs')), - ("([uUbBfF]?)(''')", bygroups(String.Affix, String.Single), - combined('stringescape', 'tsqs')), - ('([uUbBfF]?)(")', bygroups(String.Affix, String.Double), - combined('stringescape', 'dqs')), - ("([uUbBfF]?)(')", bygroups(String.Affix, String.Single), - combined('stringescape', 'sqs')), - include('name'), - include('numbers'), - ], - 'keywords': [ - (words(( - 'assert', 'async', 'await', 'break', 'continue', 'del', 'elif', - 'else', 'except', 'finally', 'for', 'global', 'if', 'lambda', - 'pass', 'raise', 'nonlocal', 'return', 'try', 'while', 'yield', - 'yield from', 'as', 'with'), suffix=r'\b'), - Keyword), - (words(('True', 'False', 'None'), suffix=r'\b'), Keyword.Constant), - ], - 'builtins': [ - (words(( - '__import__', 'abs', 'all', 'any', 'bin', 'bool', 'bytearray', - 'bytes', 'chr', 'classmethod', 'cmp', 'compile', 'complex', - 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'filter', - 'float', 'format', 'frozenset', 'getattr', 'globals', 'hasattr', - 'hash', 'hex', 'id', 'input', 'int', 'isinstance', 'issubclass', - 'iter', 'len', 'list', 'locals', 'map', 'max', 'memoryview', - 'min', 'next', 'object', 'oct', 'open', 'ord', 'pow', 'print', - 'property', 'range', 'repr', 'reversed', 'round', 'set', 'setattr', - 'slice', 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', - 'type', 'vars', 'zip'), prefix=r'(?<!\.)', suffix=r'\b'), - Name.Builtin), - (r'(?<!\.)(self|Ellipsis|NotImplemented|cls)\b', Name.Builtin.Pseudo), - (words(( - 'ArithmeticError', 'AssertionError', 'AttributeError', - 'BaseException', 'BufferError', 'BytesWarning', 'DeprecationWarning', - 'EOFError', 'EnvironmentError', 'Exception', 'FloatingPointError', - 'FutureWarning', 'GeneratorExit', 'IOError', 'ImportError', - 'ImportWarning', 'IndentationError', 'IndexError', 'KeyError', - 'KeyboardInterrupt', 'LookupError', 'MemoryError', 'NameError', - 'NotImplementedError', 'OSError', 'OverflowError', - 'PendingDeprecationWarning', 'ReferenceError', 'ResourceWarning', - 'RuntimeError', 'RuntimeWarning', 'StopIteration', - 'SyntaxError', 'SyntaxWarning', 'SystemError', 'SystemExit', - 'TabError', 'TypeError', 'UnboundLocalError', 'UnicodeDecodeError', - 'UnicodeEncodeError', 'UnicodeError', 'UnicodeTranslateError', - 'UnicodeWarning', 'UserWarning', 'ValueError', 'VMSError', - 'Warning', 'WindowsError', 'ZeroDivisionError', - # new builtin exceptions from PEP 3151 - 'BlockingIOError', 'ChildProcessError', 'ConnectionError', - 'BrokenPipeError', 'ConnectionAbortedError', 'ConnectionRefusedError', - 'ConnectionResetError', 'FileExistsError', 'FileNotFoundError', - 'InterruptedError', 'IsADirectoryError', 'NotADirectoryError', - 'PermissionError', 'ProcessLookupError', 'TimeoutError', - # others new in Python 3 - 'StopAsyncIteration'), - prefix=r'(?<!\.)', suffix=r'\b'), - Name.Exception), - ], - 'magicfuncs': [ - (words(( - '__abs__', '__add__', '__aenter__', '__aexit__', '__aiter__', - '__and__', '__anext__', '__await__', '__bool__', '__bytes__', - '__call__', '__complex__', '__contains__', '__del__', '__delattr__', - '__delete__', '__delitem__', '__dir__', '__divmod__', '__enter__', - '__eq__', '__exit__', '__float__', '__floordiv__', '__format__', - '__ge__', '__get__', '__getattr__', '__getattribute__', - '__getitem__', '__gt__', '__hash__', '__iadd__', '__iand__', - '__ifloordiv__', '__ilshift__', '__imatmul__', '__imod__', - '__imul__', '__index__', '__init__', '__instancecheck__', - '__int__', '__invert__', '__ior__', '__ipow__', '__irshift__', - '__isub__', '__iter__', '__itruediv__', '__ixor__', '__le__', - '__len__', '__length_hint__', '__lshift__', '__lt__', '__matmul__', - '__missing__', '__mod__', '__mul__', '__ne__', '__neg__', - '__new__', '__next__', '__or__', '__pos__', '__pow__', - '__prepare__', '__radd__', '__rand__', '__rdivmod__', '__repr__', - '__reversed__', '__rfloordiv__', '__rlshift__', '__rmatmul__', - '__rmod__', '__rmul__', '__ror__', '__round__', '__rpow__', - '__rrshift__', '__rshift__', '__rsub__', '__rtruediv__', - '__rxor__', '__set__', '__setattr__', '__setitem__', '__str__', - '__sub__', '__subclasscheck__', '__truediv__', - '__xor__'), suffix=r'\b'), - Name.Function.Magic), - ], - 'magicvars': [ - (words(( - '__annotations__', '__bases__', '__class__', '__closure__', - '__code__', '__defaults__', '__dict__', '__doc__', '__file__', - '__func__', '__globals__', '__kwdefaults__', '__module__', - '__mro__', '__name__', '__objclass__', '__qualname__', - '__self__', '__slots__', '__weakref__'), suffix=r'\b'), - Name.Variable.Magic), - ], - 'numbers': [ - (r'(\d(?:_?\d)*\.(?:\d(?:_?\d)*)?|(?:\d(?:_?\d)*)?\.\d(?:_?\d)*)' - r'([eE][+-]?\d(?:_?\d)*)?', Number.Float), - (r'\d(?:_?\d)*[eE][+-]?\d(?:_?\d)*j?', Number.Float), - (r'0[oO](?:_?[0-7])+', Number.Oct), - (r'0[bB](?:_?[01])+', Number.Bin), - (r'0[xX](?:_?[a-fA-F0-9])+', Number.Hex), - (r'\d(?:_?\d)*', Number.Integer), - ], - 'name': [ - (r'@' + uni_name, Name.Decorator), - (r'@', Operator), # new matrix multiplication operator - (uni_name, Name), - ], - 'funcname': [ - include('magicfuncs'), - (uni_name, Name.Function, '#pop'), - default('#pop'), - ], - 'classname': [ - (uni_name, Name.Class, '#pop'), - ], - 'import': [ - (r'(\s+)(as)(\s+)', bygroups(Text, Keyword, Text)), - (r'\.', Name.Namespace), - (uni_name, Name.Namespace), - (r'(\s*)(,)(\s*)', bygroups(Text, Operator, Text)), - default('#pop') # all else: go back - ], - 'fromimport': [ - (r'(\s+)(import)\b', bygroups(Text, Keyword.Namespace), '#pop'), - (r'\.', Name.Namespace), - # if None occurs here, it's "raise x from None", since None can - # never be a module name - (r'None\b', Name.Builtin.Pseudo, '#pop'), - (uni_name, Name.Namespace), - default('#pop'), - ], - 'stringescape': [ - (r'\\([\\abfnrtv"\']|\n|N\{.*?\}|u[a-fA-F0-9]{4}|' - r'U[a-fA-F0-9]{8}|x[a-fA-F0-9]{2}|[0-7]{1,3})', String.Escape) - ], - 'strings-single': innerstring_rules(String.Single), - 'strings-double': innerstring_rules(String.Double), - 'dqs': [ - (r'"', String.Double, '#pop'), - (r'\\\\|\\"|\\\n', String.Escape), # included here for raw strings - include('strings-double') - ], - 'sqs': [ - (r"'", String.Single, '#pop'), - (r"\\\\|\\'|\\\n", String.Escape), # included here for raw strings - include('strings-single') - ], - 'tdqs': [ - (r'"""', String.Double, '#pop'), - include('strings-double'), - (r'\n', String.Double) - ], - 'tsqs': [ - (r"'''", String.Single, '#pop'), - include('strings-single'), - (r'\n', String.Single) - ], - } - - def analyse_text(text): - return shebang_matches(text, r'pythonw?(3(\.\d)?)?') - - -Python3Lexer = PythonLexer - - -class Python2Lexer(RegexLexer): - """ - For `Python 2.x <http://www.python.org>`_ source code. - - .. versionchanged:: 2.5 - This class has been renamed from ``PythonLexer``. ``PythonLexer`` now - refers to the Python 3 variant. File name patterns like ``*.py`` have - been moved to Python 3 as well. - """ - - name = 'Python 2.x' - aliases = ['python2', 'py2'] - filenames = [] # now taken over by PythonLexer (3.x) - mimetypes = ['text/x-python2', 'application/x-python2'] - - def innerstring_rules(ttype): - return [ # the old style '%s' % (...) string formatting (r'%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?' '[hlL]?[E-GXc-giorsux%]', String.Interpol), @@ -391,15 +391,15 @@ class Python2Lexer(RegexLexer): 'Exception', 'FloatingPointError', 'FutureWarning', 'GeneratorExit', 'IOError', 'ImportError', 'ImportWarning', 'IndentationError', 'IndexError', 'KeyError', 'KeyboardInterrupt', 'LookupError', - 'MemoryError', 'ModuleNotFoundError', 'NameError', - 'NotImplementedError', 'OSError', 'OverflowError', 'OverflowWarning', - 'PendingDeprecationWarning', 'RecursionError', 'ReferenceError', - 'RuntimeError', 'RuntimeWarning', 'StandardError', 'StopIteration', - 'SyntaxError', 'SyntaxWarning', 'SystemError', 'SystemExit', - 'TabError', 'TypeError', 'UnboundLocalError', 'UnicodeDecodeError', - 'UnicodeEncodeError', 'UnicodeError', 'UnicodeTranslateError', - 'UnicodeWarning', 'UserWarning', 'ValueError', 'VMSError', 'Warning', - 'WindowsError', 'ZeroDivisionError'), prefix=r'(?<!\.)', suffix=r'\b'), + 'MemoryError', 'ModuleNotFoundError', 'NameError', + 'NotImplementedError', 'OSError', 'OverflowError', 'OverflowWarning', + 'PendingDeprecationWarning', 'RecursionError', 'ReferenceError', + 'RuntimeError', 'RuntimeWarning', 'StandardError', 'StopIteration', + 'SyntaxError', 'SyntaxWarning', 'SystemError', 'SystemExit', + 'TabError', 'TypeError', 'UnboundLocalError', 'UnicodeDecodeError', + 'UnicodeEncodeError', 'UnicodeError', 'UnicodeTranslateError', + 'UnicodeWarning', 'UserWarning', 'ValueError', 'VMSError', 'Warning', + 'WindowsError', 'ZeroDivisionError'), prefix=r'(?<!\.)', suffix=r'\b'), Name.Exception), ], 'magicfuncs': [ @@ -505,7 +505,7 @@ class Python2Lexer(RegexLexer): } def analyse_text(text): - return shebang_matches(text, r'pythonw?2(\.\d)?') or \ + return shebang_matches(text, r'pythonw?2(\.\d)?') or \ 'import ' in text[:1000] @@ -526,27 +526,27 @@ class PythonConsoleLexer(Lexer): Additional options: `python3` - Use Python 3 lexer for code. Default is ``True``. + Use Python 3 lexer for code. Default is ``True``. .. versionadded:: 1.0 - .. versionchanged:: 2.5 - Now defaults to ``True``. + .. versionchanged:: 2.5 + Now defaults to ``True``. """ name = 'Python console session' aliases = ['pycon'] mimetypes = ['text/x-python-doctest'] def __init__(self, **options): - self.python3 = get_bool_opt(options, 'python3', True) + self.python3 = get_bool_opt(options, 'python3', True) Lexer.__init__(self, **options) def get_tokens_unprocessed(self, text): if self.python3: pylexer = PythonLexer(**self.options) tblexer = PythonTracebackLexer(**self.options) - else: - pylexer = Python2Lexer(**self.options) - tblexer = Python2TracebackLexer(**self.options) + else: + pylexer = Python2Lexer(**self.options) + tblexer = Python2TracebackLexer(**self.options) curcode = '' insertions = [] @@ -601,28 +601,28 @@ class PythonConsoleLexer(Lexer): class PythonTracebackLexer(RegexLexer): """ - For Python 3.x tracebacks, with support for chained exceptions. + For Python 3.x tracebacks, with support for chained exceptions. + + .. versionadded:: 1.0 - .. versionadded:: 1.0 - - .. versionchanged:: 2.5 - This is now the default ``PythonTracebackLexer``. It is still available - as the alias ``Python3TracebackLexer``. + .. versionchanged:: 2.5 + This is now the default ``PythonTracebackLexer``. It is still available + as the alias ``Python3TracebackLexer``. """ name = 'Python Traceback' - aliases = ['pytb', 'py3tb'] - filenames = ['*.pytb', '*.py3tb'] - mimetypes = ['text/x-python-traceback', 'text/x-python3-traceback'] + aliases = ['pytb', 'py3tb'] + filenames = ['*.pytb', '*.py3tb'] + mimetypes = ['text/x-python-traceback', 'text/x-python3-traceback'] tokens = { 'root': [ - (r'\n', Text), - (r'^Traceback \(most recent call last\):\n', Generic.Traceback, 'intb'), - (r'^During handling of the above exception, another ' - r'exception occurred:\n\n', Generic.Traceback), - (r'^The above exception was the direct cause of the ' - r'following exception:\n\n', Generic.Traceback), + (r'\n', Text), + (r'^Traceback \(most recent call last\):\n', Generic.Traceback, 'intb'), + (r'^During handling of the above exception, another ' + r'exception occurred:\n\n', Generic.Traceback), + (r'^The above exception was the direct cause of the ' + r'following exception:\n\n', Generic.Traceback), (r'^(?= File "[^"]+", line \d+)', Generic.Traceback, 'intb'), (r'^.*\n', Other), ], @@ -643,34 +643,34 @@ class PythonTracebackLexer(RegexLexer): } -Python3TracebackLexer = PythonTracebackLexer - - -class Python2TracebackLexer(RegexLexer): +Python3TracebackLexer = PythonTracebackLexer + + +class Python2TracebackLexer(RegexLexer): """ - For Python tracebacks. + For Python tracebacks. + + .. versionadded:: 0.7 - .. versionadded:: 0.7 - - .. versionchanged:: 2.5 - This class has been renamed from ``PythonTracebackLexer``. - ``PythonTracebackLexer`` now refers to the Python 3 variant. + .. versionchanged:: 2.5 + This class has been renamed from ``PythonTracebackLexer``. + ``PythonTracebackLexer`` now refers to the Python 3 variant. """ - name = 'Python 2.x Traceback' - aliases = ['py2tb'] - filenames = ['*.py2tb'] - mimetypes = ['text/x-python2-traceback'] + name = 'Python 2.x Traceback' + aliases = ['py2tb'] + filenames = ['*.py2tb'] + mimetypes = ['text/x-python2-traceback'] tokens = { 'root': [ - # Cover both (most recent call last) and (innermost last) - # The optional ^C allows us to catch keyboard interrupt signals. - (r'^(\^C)?(Traceback.*\n)', - bygroups(Text, Generic.Traceback), 'intb'), - # SyntaxError starts with this. + # Cover both (most recent call last) and (innermost last) + # The optional ^C allows us to catch keyboard interrupt signals. + (r'^(\^C)?(Traceback.*\n)', + bygroups(Text, Generic.Traceback), 'intb'), + # SyntaxError starts with this. (r'^(?= File "[^"]+", line \d+)', Generic.Traceback, 'intb'), - (r'^.*\n', Other), + (r'^.*\n', Other), ], 'intb': [ (r'^( File )("[^"]+")(, line )(\d+)(, in )(.+)(\n)', @@ -678,7 +678,7 @@ class Python2TracebackLexer(RegexLexer): (r'^( File )("[^"]+")(, line )(\d+)(\n)', bygroups(Text, Name.Builtin, Text, Number, Text)), (r'^( )(.+)(\n)', - bygroups(Text, using(Python2Lexer), Text)), + bygroups(Text, using(Python2Lexer), Text)), (r'^([ \t]*)(\.\.\.)(\n)', bygroups(Text, Comment, Text)), # for doctests... (r'^([^:]+)(: )(.+)(\n)', @@ -981,7 +981,7 @@ class NumPyLexer(PythonLexer): mimetypes = [] filenames = [] - EXTRA_KEYWORDS = { + EXTRA_KEYWORDS = { 'abs', 'absolute', 'accumulate', 'add', 'alen', 'all', 'allclose', 'alltrue', 'alterdot', 'amax', 'amin', 'angle', 'any', 'append', 'apply_along_axis', 'apply_over_axes', 'arange', 'arccos', 'arccosh', @@ -1046,7 +1046,7 @@ class NumPyLexer(PythonLexer): 'typename', 'uniform', 'union1d', 'unique', 'unique1d', 'unravel_index', 'unwrap', 'vander', 'var', 'vdot', 'vectorize', 'view', 'vonmises', 'vsplit', 'vstack', 'weibull', 'where', 'who', 'zeros', 'zeros_like' - } + } def get_tokens_unprocessed(self, text): for index, token, value in \ @@ -1057,6 +1057,6 @@ class NumPyLexer(PythonLexer): yield index, token, value def analyse_text(text): - return (shebang_matches(text, r'pythonw?(3(\.\d)?)?') or + return (shebang_matches(text, r'pythonw?(3(\.\d)?)?') or 'import ' in text[:1000]) \ and ('import numpy' in text or 'from numpy import' in text) diff --git a/contrib/python/Pygments/py2/pygments/lexers/rdf.py b/contrib/python/Pygments/py2/pygments/lexers/rdf.py index 5240a1bd97..5927a686d4 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/rdf.py +++ b/contrib/python/Pygments/py2/pygments/lexers/rdf.py @@ -15,7 +15,7 @@ from pygments.lexer import RegexLexer, bygroups, default from pygments.token import Keyword, Punctuation, String, Number, Operator, Generic, \ Whitespace, Name, Literal, Comment, Text -__all__ = ['SparqlLexer', 'TurtleLexer', 'ShExCLexer'] +__all__ = ['SparqlLexer', 'TurtleLexer', 'ShExCLexer'] class SparqlLexer(RegexLexer): @@ -275,149 +275,149 @@ class TurtleLexer(RegexLexer): for t in ('@base ', 'BASE ', '@prefix ', 'PREFIX '): if re.search(r'^\s*%s' % t, text): return 0.80 - - -class ShExCLexer(RegexLexer): - """ - Lexer for `ShExC <https://shex.io/shex-semantics/#shexc>`_ shape expressions language syntax. - """ - name = 'ShExC' - aliases = ['shexc', 'shex'] - filenames = ['*.shex'] - mimetypes = ['text/shex'] - - # character group definitions :: - - PN_CHARS_BASE_GRP = (u'a-zA-Z' - u'\u00c0-\u00d6' - u'\u00d8-\u00f6' - u'\u00f8-\u02ff' - u'\u0370-\u037d' - u'\u037f-\u1fff' - u'\u200c-\u200d' - u'\u2070-\u218f' - u'\u2c00-\u2fef' - u'\u3001-\ud7ff' - u'\uf900-\ufdcf' - u'\ufdf0-\ufffd') - - PN_CHARS_U_GRP = (PN_CHARS_BASE_GRP + '_') - - PN_CHARS_GRP = (PN_CHARS_U_GRP + - r'\-' + - r'0-9' + - u'\u00b7' + - u'\u0300-\u036f' + - u'\u203f-\u2040') - - HEX_GRP = '0-9A-Fa-f' - - PN_LOCAL_ESC_CHARS_GRP = r"_~.\-!$&'()*+,;=/?#@%" - - # terminal productions :: - - PN_CHARS_BASE = '[' + PN_CHARS_BASE_GRP + ']' - - PN_CHARS_U = '[' + PN_CHARS_U_GRP + ']' - - PN_CHARS = '[' + PN_CHARS_GRP + ']' - - HEX = '[' + HEX_GRP + ']' - - PN_LOCAL_ESC_CHARS = '[' + PN_LOCAL_ESC_CHARS_GRP + ']' - - UCHAR_NO_BACKSLASH = '(?:u' + HEX + '{4}|U' + HEX + '{8})' - - UCHAR = r'\\' + UCHAR_NO_BACKSLASH - - IRIREF = r'<(?:[^\x00-\x20<>"{}|^`\\]|' + UCHAR + ')*>' - - BLANK_NODE_LABEL = '_:[0-9' + PN_CHARS_U_GRP + '](?:[' + PN_CHARS_GRP + \ - '.]*' + PN_CHARS + ')?' - - PN_PREFIX = PN_CHARS_BASE + '(?:[' + PN_CHARS_GRP + '.]*' + PN_CHARS + ')?' - - PERCENT = '%' + HEX + HEX - - PN_LOCAL_ESC = r'\\' + PN_LOCAL_ESC_CHARS - - PLX = '(?:' + PERCENT + ')|(?:' + PN_LOCAL_ESC + ')' - - PN_LOCAL = ('(?:[' + PN_CHARS_U_GRP + ':0-9' + ']|' + PLX + ')' + - '(?:(?:[' + PN_CHARS_GRP + '.:]|' + PLX + ')*(?:[' + - PN_CHARS_GRP + ':]|' + PLX + '))?') - - EXPONENT = r'[eE][+-]?\d+' - - # Lexer token definitions :: - - tokens = { - 'root': [ - (r'\s+', Text), - # keywords :: - (r'(?i)(base|prefix|start|external|' - r'literal|iri|bnode|nonliteral|length|minlength|maxlength|' - r'mininclusive|minexclusive|maxinclusive|maxexclusive|' - r'totaldigits|fractiondigits|' - r'closed|extra)\b', Keyword), - (r'(a)\b', Keyword), - # IRIs :: - ('(' + IRIREF + ')', Name.Label), - # blank nodes :: - ('(' + BLANK_NODE_LABEL + ')', Name.Label), - # prefixed names :: - (r'(' + PN_PREFIX + r')?(\:)(' + PN_LOCAL + ')?', - bygroups(Name.Namespace, Punctuation, Name.Tag)), - # boolean literals :: - (r'(true|false)', Keyword.Constant), - # double literals :: - (r'[+\-]?(\d+\.\d*' + EXPONENT + r'|\.?\d+' + EXPONENT + ')', Number.Float), - # decimal literals :: - (r'[+\-]?(\d+\.\d*|\.\d+)', Number.Float), - # integer literals :: - (r'[+\-]?\d+', Number.Integer), - # operators :: - (r'[@|$&=*+?^\-~]', Operator), - # operator keywords :: - (r'(?i)(and|or|not)\b', Operator.Word), - # punctuation characters :: - (r'[(){}.;,:^\[\]]', Punctuation), - # line comments :: - (r'#[^\n]*', Comment), - # strings :: - (r'"""', String, 'triple-double-quoted-string'), - (r'"', String, 'single-double-quoted-string'), - (r"'''", String, 'triple-single-quoted-string'), - (r"'", String, 'single-single-quoted-string'), - ], - 'triple-double-quoted-string': [ - (r'"""', String, 'end-of-string'), - (r'[^\\]+', String), - (r'\\', String, 'string-escape'), - ], - 'single-double-quoted-string': [ - (r'"', String, 'end-of-string'), - (r'[^"\\\n]+', String), - (r'\\', String, 'string-escape'), - ], - 'triple-single-quoted-string': [ - (r"'''", String, 'end-of-string'), - (r'[^\\]+', String), - (r'\\', String.Escape, 'string-escape'), - ], - 'single-single-quoted-string': [ - (r"'", String, 'end-of-string'), - (r"[^'\\\n]+", String), - (r'\\', String, 'string-escape'), - ], - 'string-escape': [ - (UCHAR_NO_BACKSLASH, String.Escape, '#pop'), - (r'.', String.Escape, '#pop'), - ], - 'end-of-string': [ - (r'(@)([a-zA-Z]+(?:-[a-zA-Z0-9]+)*)', - bygroups(Operator, Name.Function), '#pop:2'), - (r'\^\^', Operator, '#pop:2'), - default('#pop:2'), - ], - } + + +class ShExCLexer(RegexLexer): + """ + Lexer for `ShExC <https://shex.io/shex-semantics/#shexc>`_ shape expressions language syntax. + """ + name = 'ShExC' + aliases = ['shexc', 'shex'] + filenames = ['*.shex'] + mimetypes = ['text/shex'] + + # character group definitions :: + + PN_CHARS_BASE_GRP = (u'a-zA-Z' + u'\u00c0-\u00d6' + u'\u00d8-\u00f6' + u'\u00f8-\u02ff' + u'\u0370-\u037d' + u'\u037f-\u1fff' + u'\u200c-\u200d' + u'\u2070-\u218f' + u'\u2c00-\u2fef' + u'\u3001-\ud7ff' + u'\uf900-\ufdcf' + u'\ufdf0-\ufffd') + + PN_CHARS_U_GRP = (PN_CHARS_BASE_GRP + '_') + + PN_CHARS_GRP = (PN_CHARS_U_GRP + + r'\-' + + r'0-9' + + u'\u00b7' + + u'\u0300-\u036f' + + u'\u203f-\u2040') + + HEX_GRP = '0-9A-Fa-f' + + PN_LOCAL_ESC_CHARS_GRP = r"_~.\-!$&'()*+,;=/?#@%" + + # terminal productions :: + + PN_CHARS_BASE = '[' + PN_CHARS_BASE_GRP + ']' + + PN_CHARS_U = '[' + PN_CHARS_U_GRP + ']' + + PN_CHARS = '[' + PN_CHARS_GRP + ']' + + HEX = '[' + HEX_GRP + ']' + + PN_LOCAL_ESC_CHARS = '[' + PN_LOCAL_ESC_CHARS_GRP + ']' + + UCHAR_NO_BACKSLASH = '(?:u' + HEX + '{4}|U' + HEX + '{8})' + + UCHAR = r'\\' + UCHAR_NO_BACKSLASH + + IRIREF = r'<(?:[^\x00-\x20<>"{}|^`\\]|' + UCHAR + ')*>' + + BLANK_NODE_LABEL = '_:[0-9' + PN_CHARS_U_GRP + '](?:[' + PN_CHARS_GRP + \ + '.]*' + PN_CHARS + ')?' + + PN_PREFIX = PN_CHARS_BASE + '(?:[' + PN_CHARS_GRP + '.]*' + PN_CHARS + ')?' + + PERCENT = '%' + HEX + HEX + + PN_LOCAL_ESC = r'\\' + PN_LOCAL_ESC_CHARS + + PLX = '(?:' + PERCENT + ')|(?:' + PN_LOCAL_ESC + ')' + + PN_LOCAL = ('(?:[' + PN_CHARS_U_GRP + ':0-9' + ']|' + PLX + ')' + + '(?:(?:[' + PN_CHARS_GRP + '.:]|' + PLX + ')*(?:[' + + PN_CHARS_GRP + ':]|' + PLX + '))?') + + EXPONENT = r'[eE][+-]?\d+' + + # Lexer token definitions :: + + tokens = { + 'root': [ + (r'\s+', Text), + # keywords :: + (r'(?i)(base|prefix|start|external|' + r'literal|iri|bnode|nonliteral|length|minlength|maxlength|' + r'mininclusive|minexclusive|maxinclusive|maxexclusive|' + r'totaldigits|fractiondigits|' + r'closed|extra)\b', Keyword), + (r'(a)\b', Keyword), + # IRIs :: + ('(' + IRIREF + ')', Name.Label), + # blank nodes :: + ('(' + BLANK_NODE_LABEL + ')', Name.Label), + # prefixed names :: + (r'(' + PN_PREFIX + r')?(\:)(' + PN_LOCAL + ')?', + bygroups(Name.Namespace, Punctuation, Name.Tag)), + # boolean literals :: + (r'(true|false)', Keyword.Constant), + # double literals :: + (r'[+\-]?(\d+\.\d*' + EXPONENT + r'|\.?\d+' + EXPONENT + ')', Number.Float), + # decimal literals :: + (r'[+\-]?(\d+\.\d*|\.\d+)', Number.Float), + # integer literals :: + (r'[+\-]?\d+', Number.Integer), + # operators :: + (r'[@|$&=*+?^\-~]', Operator), + # operator keywords :: + (r'(?i)(and|or|not)\b', Operator.Word), + # punctuation characters :: + (r'[(){}.;,:^\[\]]', Punctuation), + # line comments :: + (r'#[^\n]*', Comment), + # strings :: + (r'"""', String, 'triple-double-quoted-string'), + (r'"', String, 'single-double-quoted-string'), + (r"'''", String, 'triple-single-quoted-string'), + (r"'", String, 'single-single-quoted-string'), + ], + 'triple-double-quoted-string': [ + (r'"""', String, 'end-of-string'), + (r'[^\\]+', String), + (r'\\', String, 'string-escape'), + ], + 'single-double-quoted-string': [ + (r'"', String, 'end-of-string'), + (r'[^"\\\n]+', String), + (r'\\', String, 'string-escape'), + ], + 'triple-single-quoted-string': [ + (r"'''", String, 'end-of-string'), + (r'[^\\]+', String), + (r'\\', String.Escape, 'string-escape'), + ], + 'single-single-quoted-string': [ + (r"'", String, 'end-of-string'), + (r"[^'\\\n]+", String), + (r'\\', String, 'string-escape'), + ], + 'string-escape': [ + (UCHAR_NO_BACKSLASH, String.Escape, '#pop'), + (r'.', String.Escape, '#pop'), + ], + 'end-of-string': [ + (r'(@)([a-zA-Z]+(?:-[a-zA-Z0-9]+)*)', + bygroups(Operator, Name.Function), '#pop:2'), + (r'\^\^', Operator, '#pop:2'), + default('#pop:2'), + ], + } diff --git a/contrib/python/Pygments/py2/pygments/lexers/resource.py b/contrib/python/Pygments/py2/pygments/lexers/resource.py index ce7cd4fee7..ccd4e5f6cc 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/resource.py +++ b/contrib/python/Pygments/py2/pygments/lexers/resource.py @@ -26,7 +26,7 @@ class ResourceLexer(RegexLexer): """ name = 'ResourceBundle' aliases = ['resource', 'resourcebundle'] - filenames = [] + filenames = [] _types = (':table', ':array', ':string', ':bin', ':import', ':intvector', ':int', ':alias') diff --git a/contrib/python/Pygments/py2/pygments/lexers/robotframework.py b/contrib/python/Pygments/py2/pygments/lexers/robotframework.py index 3189d9b6fc..642c90c5c1 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/robotframework.py +++ b/contrib/python/Pygments/py2/pygments/lexers/robotframework.py @@ -64,7 +64,7 @@ class RobotFrameworkLexer(Lexer): """ name = 'RobotFramework' aliases = ['robotframework'] - filenames = ['*.robot'] + filenames = ['*.robot'] mimetypes = ['text/x-robotframework'] def __init__(self, **options): diff --git a/contrib/python/Pygments/py2/pygments/lexers/ruby.py b/contrib/python/Pygments/py2/pygments/lexers/ruby.py index bf6a56ecc4..8bcbde6714 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/ruby.py +++ b/contrib/python/Pygments/py2/pygments/lexers/ruby.py @@ -43,17 +43,17 @@ class RubyLexer(ExtendedRegexLexer): def heredoc_callback(self, match, ctx): # okay, this is the hardest part of parsing Ruby... - # match: 1 = <<[-~]?, 2 = quote? 3 = name 4 = quote? 5 = rest of line + # match: 1 = <<[-~]?, 2 = quote? 3 = name 4 = quote? 5 = rest of line start = match.start(1) - yield start, Operator, match.group(1) # <<[-~]? + yield start, Operator, match.group(1) # <<[-~]? yield match.start(2), String.Heredoc, match.group(2) # quote ", ', ` yield match.start(3), String.Delimiter, match.group(3) # heredoc name yield match.start(4), String.Heredoc, match.group(4) # quote again heredocstack = ctx.__dict__.setdefault('heredocstack', []) outermost = not bool(heredocstack) - heredocstack.append((match.group(1) in ('<<-', '<<~'), match.group(3))) + heredocstack.append((match.group(1) in ('<<-', '<<~'), match.group(3))) ctx.pos = match.start(5) ctx.end = match.end(5) @@ -247,10 +247,10 @@ class RubyLexer(ExtendedRegexLexer): Name.Builtin), (r'__(FILE|LINE)__\b', Name.Builtin.Pseudo), # normal heredocs - (r'(?<!\w)(<<[-~]?)(["`\']?)([a-zA-Z_]\w*)(\2)(.*?\n)', + (r'(?<!\w)(<<[-~]?)(["`\']?)([a-zA-Z_]\w*)(\2)(.*?\n)', heredoc_callback), # empty string heredocs - (r'(<<[-~]?)("|\')()(\2)(.*?\n)', heredoc_callback), + (r'(<<[-~]?)("|\')()(\2)(.*?\n)', heredoc_callback), (r'__END__', Comment.Preproc, 'end-part'), # multiline regex (after keywords or assignments) (r'(?:^|(?<=[=<>~!:])|' diff --git a/contrib/python/Pygments/py2/pygments/lexers/rust.py b/contrib/python/Pygments/py2/pygments/lexers/rust.py index 118d7f3a92..f731785fe6 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/rust.py +++ b/contrib/python/Pygments/py2/pygments/lexers/rust.py @@ -59,7 +59,7 @@ class RustLexer(RegexLexer): tokens = { 'root': [ # rust allows a file to start with a shebang, but if the first line - # starts with #![ then it's not a shebang but a crate attribute. + # starts with #![ then it's not a shebang but a crate attribute. (r'#![^[\r\n].*$', Comment.Preproc), default('base'), ], @@ -78,10 +78,10 @@ class RustLexer(RegexLexer): (r"""\$([a-zA-Z_]\w*|\(,?|\),?|,?)""", Comment.Preproc), # Keywords (words(( - 'as', 'async', 'await', 'box', 'const', 'crate', 'else', - 'extern', 'for', 'if', 'impl', 'in', 'loop', 'match', 'move', - 'mut', 'pub', 'ref', 'return', 'static', 'super', 'trait', - 'try', 'unsafe', 'use', 'where', 'while'), suffix=r'\b'), + 'as', 'async', 'await', 'box', 'const', 'crate', 'else', + 'extern', 'for', 'if', 'impl', 'in', 'loop', 'match', 'move', + 'mut', 'pub', 'ref', 'return', 'static', 'super', 'trait', + 'try', 'unsafe', 'use', 'where', 'while'), suffix=r'\b'), Keyword), (words(('abstract', 'alignof', 'become', 'do', 'final', 'macro', 'offsetof', 'override', 'priv', 'proc', 'pure', 'sizeof', @@ -95,7 +95,7 @@ class RustLexer(RegexLexer): (r'(default)(\s+)(type|fn)\b', bygroups(Keyword, Text, Keyword)), keyword_types, (r'self\b', Name.Builtin.Pseudo), - # Prelude (taken from Rust's src/libstd/prelude.rs) + # Prelude (taken from Rust's src/libstd/prelude.rs) builtin_types, # Path seperators, so types don't catch them. (r'::\b', Text), diff --git a/contrib/python/Pygments/py2/pygments/lexers/scdoc.py b/contrib/python/Pygments/py2/pygments/lexers/scdoc.py index 40b3ac9147..4916393fde 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/scdoc.py +++ b/contrib/python/Pygments/py2/pygments/lexers/scdoc.py @@ -1,70 +1,70 @@ -# -*- coding: utf-8 -*- -""" - pygments.lexers.scdoc - ~~~~~~~~~~~~~~~~~~~~~ - - Lexer for scdoc, a simple man page generator. - - :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import re - -from pygments.lexer import RegexLexer, include, bygroups, \ - using, this -from pygments.token import Text, Comment, Keyword, String, \ - Generic - - -__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' - aliases = ['scdoc', 'scd'] - filenames = ['*.scd', '*.scdoc'] - flags = re.MULTILINE - - tokens = { - 'root': [ - # comment - (r'^(;.+\n)', bygroups(Comment)), - - # heading with pound prefix - (r'^(#)([^#].+\n)', bygroups(Generic.Heading, Text)), - (r'^(#{2})(.+\n)', bygroups(Generic.Subheading, Text)), - # bulleted lists - (r'^(\s*)([*-])(\s)(.+\n)', - bygroups(Text, Keyword, Text, using(this, state='inline'))), - # numbered lists - (r'^(\s*)(\.+\.)( .+\n)', - bygroups(Text, Keyword, using(this, state='inline'))), - # quote - (r'^(\s*>\s)(.+\n)', bygroups(Keyword, Generic.Emph)), - # text block - (r'^(```\n)([\w\W]*?)(^```$)', bygroups(String, Text, String)), - - include('inline'), - ], - 'inline': [ - # escape - (r'\\.', Text), - # underlines - (r'(\s)(_[^_]+_)(\W|\n)', bygroups(Text, Generic.Emph, Text)), - # bold - (r'(\s)(\*[^\*]+\*)(\W|\n)', bygroups(Text, Generic.Strong, Text)), - # inline code - (r'`[^`]+`', String.Backtick), - - # general text, must come last! - (r'[^\\\s]+', Text), - (r'.', Text), - ], - } +# -*- coding: utf-8 -*- +""" + pygments.lexers.scdoc + ~~~~~~~~~~~~~~~~~~~~~ + + Lexer for scdoc, a simple man page generator. + + :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, include, bygroups, \ + using, this +from pygments.token import Text, Comment, Keyword, String, \ + Generic + + +__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' + aliases = ['scdoc', 'scd'] + filenames = ['*.scd', '*.scdoc'] + flags = re.MULTILINE + + tokens = { + 'root': [ + # comment + (r'^(;.+\n)', bygroups(Comment)), + + # heading with pound prefix + (r'^(#)([^#].+\n)', bygroups(Generic.Heading, Text)), + (r'^(#{2})(.+\n)', bygroups(Generic.Subheading, Text)), + # bulleted lists + (r'^(\s*)([*-])(\s)(.+\n)', + bygroups(Text, Keyword, Text, using(this, state='inline'))), + # numbered lists + (r'^(\s*)(\.+\.)( .+\n)', + bygroups(Text, Keyword, using(this, state='inline'))), + # quote + (r'^(\s*>\s)(.+\n)', bygroups(Keyword, Generic.Emph)), + # text block + (r'^(```\n)([\w\W]*?)(^```$)', bygroups(String, Text, String)), + + include('inline'), + ], + 'inline': [ + # escape + (r'\\.', Text), + # underlines + (r'(\s)(_[^_]+_)(\W|\n)', bygroups(Text, Generic.Emph, Text)), + # bold + (r'(\s)(\*[^\*]+\*)(\W|\n)', bygroups(Text, Generic.Strong, Text)), + # inline code + (r'`[^`]+`', String.Backtick), + + # general text, must come last! + (r'[^\\\s]+', Text), + (r'.', Text), + ], + } diff --git a/contrib/python/Pygments/py2/pygments/lexers/shell.py b/contrib/python/Pygments/py2/pygments/lexers/shell.py index c64f151dd4..c12cb3f137 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/shell.py +++ b/contrib/python/Pygments/py2/pygments/lexers/shell.py @@ -154,9 +154,9 @@ class ShellSessionBaseLexer(Lexer): .. versionadded:: 2.1 """ - - _venv = re.compile(r'^(\([^)]*\))(\s*)') - + + _venv = re.compile(r'^(\([^)]*\))(\s*)') + def get_tokens_unprocessed(self, text): innerlexer = self._innerLexerCls(**self.options) @@ -170,21 +170,21 @@ class ShellSessionBaseLexer(Lexer): if backslash_continuation: curcode += line backslash_continuation = curcode.endswith('\\\n') - continue - - venv_match = self._venv.match(line) - if venv_match: - venv = venv_match.group(1) - venv_whitespace = venv_match.group(2) - insertions.append((len(curcode), - [(0, Generic.Prompt.VirtualEnv, venv)])) - if venv_whitespace: - insertions.append((len(curcode), - [(0, Text, venv_whitespace)])) - line = line[venv_match.end():] - - m = self._ps1rgx.match(line) - if m: + continue + + venv_match = self._venv.match(line) + if venv_match: + venv = venv_match.group(1) + venv_whitespace = venv_match.group(2) + insertions.append((len(curcode), + [(0, Generic.Prompt.VirtualEnv, venv)])) + if venv_whitespace: + insertions.append((len(curcode), + [(0, Text, venv_whitespace)])) + line = line[venv_match.end():] + + m = self._ps1rgx.match(line) + if m: # To support output lexers (say diff output), the output # needs to be broken by prompts whenever the output lexer # changes. @@ -227,9 +227,9 @@ class BashSessionLexer(ShellSessionBaseLexer): mimetypes = ['application/x-shell-session', 'application/x-sh-session'] _innerLexerCls = BashLexer - _ps1rgx = re.compile( + _ps1rgx = re.compile( r'^((?:(?:\[.*?\])|(?:\(\S+\))?(?:| |sh\S*?|\w+\S+[@:]\S+(?:\s+\S+)' \ - r'?|\[\S+[@:][^\n]+\].+))\s*[$#%])(.*\n?)') + r'?|\[\S+[@:][^\n]+\].+))\s*[$#%])(.*\n?)') _ps2 = '>' @@ -556,7 +556,7 @@ class MSDOSSessionLexer(ShellSessionBaseLexer): mimetypes = [] _innerLexerCls = BatchLexer - _ps1rgx = re.compile(r'^([^>]*>)(.*\n?)') + _ps1rgx = re.compile(r'^([^>]*>)(.*\n?)') _ps2 = 'More? ' @@ -641,7 +641,7 @@ class TcshSessionLexer(ShellSessionBaseLexer): mimetypes = [] _innerLexerCls = TcshLexer - _ps1rgx = re.compile(r'^([^>]+>)(.*\n?)') + _ps1rgx = re.compile(r'^([^>]+>)(.*\n?)') _ps2 = '? ' @@ -772,7 +772,7 @@ class PowerShellSessionLexer(ShellSessionBaseLexer): mimetypes = [] _innerLexerCls = PowerShellLexer - _ps1rgx = re.compile(r'^(PS [^>]+> )(.*\n?)') + _ps1rgx = re.compile(r'^(PS [^>]+> )(.*\n?)') _ps2 = '>> ' diff --git a/contrib/python/Pygments/py2/pygments/lexers/slash.py b/contrib/python/Pygments/py2/pygments/lexers/slash.py index 94ca655e70..76e5929d38 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/slash.py +++ b/contrib/python/Pygments/py2/pygments/lexers/slash.py @@ -26,7 +26,7 @@ class SlashLanguageLexer(ExtendedRegexLexer): def right_angle_bracket(lexer, match, ctx): if len(ctx.stack) > 1 and ctx.stack[-2] == "string": ctx.stack.pop() - yield match.start(), String.Interpol, u"}" + yield match.start(), String.Interpol, u"}" ctx.pos = match.end() pass diff --git a/contrib/python/Pygments/py2/pygments/lexers/solidity.py b/contrib/python/Pygments/py2/pygments/lexers/solidity.py index c16daa3f35..9966837197 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/solidity.py +++ b/contrib/python/Pygments/py2/pygments/lexers/solidity.py @@ -1,93 +1,93 @@ -# -*- coding: utf-8 -*- -""" - pygments.lexers.solidity - ~~~~~~~~~~~~~~~~~~~~~~~~ - - Lexers for Solidity. - - :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import re - -from pygments.lexer import RegexLexer, bygroups, include, words -from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ - Number, Punctuation - -__all__ = ['SolidityLexer'] - - -class SolidityLexer(RegexLexer): - """ - For Solidity source code. - - .. versionadded:: 2.5 - """ - - name = 'Solidity' - aliases = ['solidity'] - 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' - r'|216|224|232|240|248|256)?))\b' - ) - - tokens = { - 'root': [ - include('whitespace'), - include('comments'), - (r'\bpragma\s+solidity\b', Keyword, 'pragma'), - (r'\b(contract)(\s+)([a-zA-Z_]\w*)', - bygroups(Keyword, Text.WhiteSpace, Name.Entity)), - (datatype + r'(\s+)((external|public|internal|private)\s+)?' + - r'([a-zA-Z_]\w*)', - bygroups(Keyword.Type, None, None, None, Text.WhiteSpace, Keyword, - None, Name.Variable)), - (r'\b(enum|event|function|struct)(\s+)([a-zA-Z_]\w*)', - bygroups(Keyword.Type, Text.WhiteSpace, Name.Variable)), - (r'\b(msg|block|tx)\.([A-Za-z_][A-Za-z0-9_]*)\b', Keyword), - (words(( - 'block', 'break', 'constant', 'constructor', 'continue', - 'contract', 'do', 'else', 'external', 'false', 'for', - 'function', 'if', 'import', 'inherited', 'internal', 'is', - 'library', 'mapping', 'memory', 'modifier', 'msg', 'new', - 'payable', 'private', 'public', 'require', 'return', - 'returns', 'struct', 'suicide', 'throw', 'this', 'true', - 'tx', 'var', 'while'), prefix=r'\b', suffix=r'\b'), - Keyword.Type), - (words(('keccak256',), prefix=r'\b', suffix=r'\b'), Name.Builtin), - (datatype, Keyword.Type), - include('constants'), - (r'[a-zA-Z_]\w*', Text), - (r'[!<=>+*/-]', Operator), - (r'[.;:{}(),\[\]]', Punctuation) - ], - 'comments': [ - (r'//(\n|[\w\W]*?[^\\]\n)', Comment.Single), - (r'/(\\\n)?[*][\w\W]*?[*](\\\n)?/', Comment.Multiline), - (r'/(\\\n)?[*][\w\W]*', Comment.Multiline) - ], - 'constants': [ - (r'("([\\]"|.)*?")', String.Double), - (r"('([\\]'|.)*?')", String.Single), - (r'\b0[xX][0-9a-fA-F]+\b', Number.Hex), - (r'\b\d+\b', Number.Decimal), - ], - 'pragma': [ - include('whitespace'), - include('comments'), - (r'(\^|>=|<)(\s*)(\d+\.\d+\.\d+)', - bygroups(Operator, Text.WhiteSpace, Keyword)), - (r';', Punctuation, '#pop') - ], - 'whitespace': [ - (r'\s+', Text.WhiteSpace), - (r'\n', Text.WhiteSpace) - ] - } +# -*- coding: utf-8 -*- +""" + pygments.lexers.solidity + ~~~~~~~~~~~~~~~~~~~~~~~~ + + Lexers for Solidity. + + :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, bygroups, include, words +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation + +__all__ = ['SolidityLexer'] + + +class SolidityLexer(RegexLexer): + """ + For Solidity source code. + + .. versionadded:: 2.5 + """ + + name = 'Solidity' + aliases = ['solidity'] + 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' + r'|216|224|232|240|248|256)?))\b' + ) + + tokens = { + 'root': [ + include('whitespace'), + include('comments'), + (r'\bpragma\s+solidity\b', Keyword, 'pragma'), + (r'\b(contract)(\s+)([a-zA-Z_]\w*)', + bygroups(Keyword, Text.WhiteSpace, Name.Entity)), + (datatype + r'(\s+)((external|public|internal|private)\s+)?' + + r'([a-zA-Z_]\w*)', + bygroups(Keyword.Type, None, None, None, Text.WhiteSpace, Keyword, + None, Name.Variable)), + (r'\b(enum|event|function|struct)(\s+)([a-zA-Z_]\w*)', + bygroups(Keyword.Type, Text.WhiteSpace, Name.Variable)), + (r'\b(msg|block|tx)\.([A-Za-z_][A-Za-z0-9_]*)\b', Keyword), + (words(( + 'block', 'break', 'constant', 'constructor', 'continue', + 'contract', 'do', 'else', 'external', 'false', 'for', + 'function', 'if', 'import', 'inherited', 'internal', 'is', + 'library', 'mapping', 'memory', 'modifier', 'msg', 'new', + 'payable', 'private', 'public', 'require', 'return', + 'returns', 'struct', 'suicide', 'throw', 'this', 'true', + 'tx', 'var', 'while'), prefix=r'\b', suffix=r'\b'), + Keyword.Type), + (words(('keccak256',), prefix=r'\b', suffix=r'\b'), Name.Builtin), + (datatype, Keyword.Type), + include('constants'), + (r'[a-zA-Z_]\w*', Text), + (r'[!<=>+*/-]', Operator), + (r'[.;:{}(),\[\]]', Punctuation) + ], + 'comments': [ + (r'//(\n|[\w\W]*?[^\\]\n)', Comment.Single), + (r'/(\\\n)?[*][\w\W]*?[*](\\\n)?/', Comment.Multiline), + (r'/(\\\n)?[*][\w\W]*', Comment.Multiline) + ], + 'constants': [ + (r'("([\\]"|.)*?")', String.Double), + (r"('([\\]'|.)*?')", String.Single), + (r'\b0[xX][0-9a-fA-F]+\b', Number.Hex), + (r'\b\d+\b', Number.Decimal), + ], + 'pragma': [ + include('whitespace'), + include('comments'), + (r'(\^|>=|<)(\s*)(\d+\.\d+\.\d+)', + bygroups(Operator, Text.WhiteSpace, Keyword)), + (r';', Punctuation, '#pop') + ], + 'whitespace': [ + (r'\s+', Text.WhiteSpace), + (r'\n', Text.WhiteSpace) + ] + } diff --git a/contrib/python/Pygments/py2/pygments/lexers/special.py b/contrib/python/Pygments/py2/pygments/lexers/special.py index 6ee1b59346..4016c5949b 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/special.py +++ b/contrib/python/Pygments/py2/pygments/lexers/special.py @@ -35,7 +35,7 @@ class TextLexer(Lexer): def analyse_text(text): return TextLexer.priority - + _ttype_cache = {} line_re = re.compile(b'.*?\n') diff --git a/contrib/python/Pygments/py2/pygments/lexers/sql.py b/contrib/python/Pygments/py2/pygments/lexers/sql.py index a975e3f2ed..afcaa6d4f7 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/sql.py +++ b/contrib/python/Pygments/py2/pygments/lexers/sql.py @@ -41,8 +41,8 @@ import re from pygments.lexer import Lexer, RegexLexer, do_insertions, bygroups, words -from pygments.token import Punctuation, Whitespace, Text, Comment, Operator, \ - Keyword, Name, String, Number, Generic +from pygments.token import Punctuation, Whitespace, Text, Comment, Operator, \ + Keyword, Name, String, Number, Generic from pygments.lexers import get_lexer_by_name, ClassNotFound from pygments.util import iteritems @@ -75,28 +75,28 @@ def language_callback(lexer, match): The lexer is chosen looking for a nearby LANGUAGE or assumed as plpgsql if inside a DO statement and no LANGUAGE has been found. """ - lx = None + lx = None m = language_re.match(lexer.text[match.end():match.end()+100]) if m is not None: - lx = lexer._get_lexer(m.group(1)) + lx = lexer._get_lexer(m.group(1)) else: m = list(language_re.finditer( lexer.text[max(0, match.start()-100):match.start()])) if m: - lx = lexer._get_lexer(m[-1].group(1)) + lx = lexer._get_lexer(m[-1].group(1)) else: m = list(do_re.finditer( lexer.text[max(0, match.start()-25):match.start()])) if m: - lx = lexer._get_lexer('plpgsql') + lx = lexer._get_lexer('plpgsql') # 1 = $, 2 = delimiter, 3 = $ yield (match.start(1), String, match.group(1)) yield (match.start(2), String.Delimiter, match.group(2)) yield (match.start(3), String, match.group(3)) # 4 = string contents - if lx: - for x in lx.get_tokens_unprocessed(match.group(4)): + if lx: + for x in lx.get_tokens_unprocessed(match.group(4)): yield x else: yield (match.start(4), String, match.group(4)) @@ -134,9 +134,9 @@ class PostgresBase(object): if lang.startswith('pl') and lang.endswith('u'): tries.append(lang[2:-1]) - for lx in tries: + for lx in tries: try: - return get_lexer_by_name(lx, **self.options) + return get_lexer_by_name(lx, **self.options) except ClassNotFound: pass else: @@ -163,8 +163,8 @@ class PostgresLexer(PostgresBase, RegexLexer): (r'--.*\n?', Comment.Single), (r'/\*', Comment.Multiline, 'multiline-comments'), (r'(' + '|'.join(s.replace(" ", r"\s+") - for s in DATATYPES + PSEUDO_TYPES) + r')\b', - Name.Builtin), + for s in DATATYPES + PSEUDO_TYPES) + r')\b', + Name.Builtin), (words(KEYWORDS, suffix=r'\b'), Keyword), (r'[+*/<>=~!@#%^&|`?-]+', Operator), (r'::', Operator), # cast @@ -212,7 +212,7 @@ class PlPgsqlLexer(PostgresBase, RegexLexer): mimetypes = ['text/x-plpgsql'] flags = re.IGNORECASE - tokens = {k: l[:] for (k, l) in iteritems(PostgresLexer.tokens)} + tokens = {k: l[:] for (k, l) in iteritems(PostgresLexer.tokens)} # extend the keywords list for i, pattern in enumerate(tokens['root']): @@ -246,7 +246,7 @@ class PsqlRegexLexer(PostgresBase, RegexLexer): aliases = [] # not public flags = re.IGNORECASE - tokens = {k: l[:] for (k, l) in iteritems(PostgresLexer.tokens)} + tokens = {k: l[:] for (k, l) in iteritems(PostgresLexer.tokens)} tokens['root'].append( (r'\\[^\s]+', Keyword.Pseudo, 'psql-command')) @@ -260,7 +260,7 @@ class PsqlRegexLexer(PostgresBase, RegexLexer): (r"[^\s]+", String.Symbol), ] - + re_prompt = re.compile(r'^(\S.*?)??[=\-\(\$\'\"][#>]') re_psql_command = re.compile(r'\s*\\') re_end_command = re.compile(r';\s*(--.*?)?$') @@ -385,98 +385,98 @@ class SqlLexer(RegexLexer): (r'--.*\n?', Comment.Single), (r'/\*', Comment.Multiline, 'multiline-comments'), (words(( - 'ABORT', 'ABS', 'ABSOLUTE', 'ACCESS', 'ADA', 'ADD', 'ADMIN', 'AFTER', - 'AGGREGATE', 'ALIAS', 'ALL', 'ALLOCATE', 'ALTER', 'ANALYSE', 'ANALYZE', - 'AND', 'ANY', 'ARE', 'AS', 'ASC', 'ASENSITIVE', 'ASSERTION', 'ASSIGNMENT', - 'ASYMMETRIC', 'AT', 'ATOMIC', 'AUTHORIZATION', 'AVG', 'BACKWARD', - 'BEFORE', 'BEGIN', 'BETWEEN', 'BITVAR', 'BIT_LENGTH', 'BOTH', 'BREADTH', - 'BY', 'C', 'CACHE', 'CALL', 'CALLED', 'CARDINALITY', 'CASCADE', - 'CASCADED', 'CASE', 'CAST', 'CATALOG', 'CATALOG_NAME', 'CHAIN', + 'ABORT', 'ABS', 'ABSOLUTE', 'ACCESS', 'ADA', 'ADD', 'ADMIN', 'AFTER', + 'AGGREGATE', 'ALIAS', 'ALL', 'ALLOCATE', 'ALTER', 'ANALYSE', 'ANALYZE', + 'AND', 'ANY', 'ARE', 'AS', 'ASC', 'ASENSITIVE', 'ASSERTION', 'ASSIGNMENT', + 'ASYMMETRIC', 'AT', 'ATOMIC', 'AUTHORIZATION', 'AVG', 'BACKWARD', + 'BEFORE', 'BEGIN', 'BETWEEN', 'BITVAR', 'BIT_LENGTH', 'BOTH', 'BREADTH', + 'BY', 'C', 'CACHE', 'CALL', 'CALLED', 'CARDINALITY', 'CASCADE', + 'CASCADED', 'CASE', 'CAST', 'CATALOG', 'CATALOG_NAME', 'CHAIN', 'CHARACTERISTICS', 'CHARACTER_LENGTH', 'CHARACTER_SET_CATALOG', 'CHARACTER_SET_NAME', 'CHARACTER_SET_SCHEMA', 'CHAR_LENGTH', 'CHECK', - 'CHECKED', 'CHECKPOINT', 'CLASS', 'CLASS_ORIGIN', 'CLOB', 'CLOSE', - 'CLUSTER', 'COALSECE', 'COBOL', 'COLLATE', 'COLLATION', - 'COLLATION_CATALOG', 'COLLATION_NAME', 'COLLATION_SCHEMA', 'COLUMN', - 'COLUMN_NAME', 'COMMAND_FUNCTION', 'COMMAND_FUNCTION_CODE', 'COMMENT', - 'COMMIT', 'COMMITTED', 'COMPLETION', 'CONDITION_NUMBER', 'CONNECT', - 'CONNECTION', 'CONNECTION_NAME', 'CONSTRAINT', 'CONSTRAINTS', - 'CONSTRAINT_CATALOG', 'CONSTRAINT_NAME', 'CONSTRAINT_SCHEMA', - 'CONSTRUCTOR', 'CONTAINS', 'CONTINUE', 'CONVERSION', 'CONVERT', - 'COPY', 'CORRESPONTING', 'COUNT', 'CREATE', 'CREATEDB', 'CREATEUSER', - 'CROSS', 'CUBE', 'CURRENT', 'CURRENT_DATE', 'CURRENT_PATH', - 'CURRENT_ROLE', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_USER', - 'CURSOR', 'CURSOR_NAME', 'CYCLE', 'DATA', 'DATABASE', + 'CHECKED', 'CHECKPOINT', 'CLASS', 'CLASS_ORIGIN', 'CLOB', 'CLOSE', + 'CLUSTER', 'COALSECE', 'COBOL', 'COLLATE', 'COLLATION', + 'COLLATION_CATALOG', 'COLLATION_NAME', 'COLLATION_SCHEMA', 'COLUMN', + 'COLUMN_NAME', 'COMMAND_FUNCTION', 'COMMAND_FUNCTION_CODE', 'COMMENT', + 'COMMIT', 'COMMITTED', 'COMPLETION', 'CONDITION_NUMBER', 'CONNECT', + 'CONNECTION', 'CONNECTION_NAME', 'CONSTRAINT', 'CONSTRAINTS', + 'CONSTRAINT_CATALOG', 'CONSTRAINT_NAME', 'CONSTRAINT_SCHEMA', + 'CONSTRUCTOR', 'CONTAINS', 'CONTINUE', 'CONVERSION', 'CONVERT', + 'COPY', 'CORRESPONTING', 'COUNT', 'CREATE', 'CREATEDB', 'CREATEUSER', + 'CROSS', 'CUBE', 'CURRENT', 'CURRENT_DATE', 'CURRENT_PATH', + 'CURRENT_ROLE', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_USER', + 'CURSOR', 'CURSOR_NAME', 'CYCLE', 'DATA', 'DATABASE', 'DATETIME_INTERVAL_CODE', 'DATETIME_INTERVAL_PRECISION', 'DAY', - 'DEALLOCATE', 'DECLARE', 'DEFAULT', 'DEFAULTS', 'DEFERRABLE', - 'DEFERRED', 'DEFINED', 'DEFINER', 'DELETE', 'DELIMITER', 'DELIMITERS', - 'DEREF', 'DESC', 'DESCRIBE', 'DESCRIPTOR', 'DESTROY', 'DESTRUCTOR', - 'DETERMINISTIC', 'DIAGNOSTICS', 'DICTIONARY', 'DISCONNECT', 'DISPATCH', - 'DISTINCT', 'DO', 'DOMAIN', 'DROP', 'DYNAMIC', 'DYNAMIC_FUNCTION', - 'DYNAMIC_FUNCTION_CODE', 'EACH', 'ELSE', 'ELSIF', 'ENCODING', - 'ENCRYPTED', 'END', 'END-EXEC', 'EQUALS', 'ESCAPE', 'EVERY', 'EXCEPTION', - 'EXCEPT', 'EXCLUDING', 'EXCLUSIVE', 'EXEC', 'EXECUTE', 'EXISTING', - 'EXISTS', 'EXPLAIN', 'EXTERNAL', 'EXTRACT', 'FALSE', 'FETCH', 'FINAL', - 'FIRST', 'FOR', 'FORCE', 'FOREIGN', 'FORTRAN', 'FORWARD', 'FOUND', 'FREE', - 'FREEZE', 'FROM', 'FULL', 'FUNCTION', 'G', 'GENERAL', 'GENERATED', 'GET', - 'GLOBAL', 'GO', 'GOTO', 'GRANT', 'GRANTED', 'GROUP', 'GROUPING', - 'HANDLER', 'HAVING', 'HIERARCHY', 'HOLD', 'HOST', 'IDENTITY', 'IF', - 'IGNORE', 'ILIKE', 'IMMEDIATE', 'IMMUTABLE', 'IMPLEMENTATION', 'IMPLICIT', - 'IN', 'INCLUDING', 'INCREMENT', 'INDEX', 'INDITCATOR', 'INFIX', - 'INHERITS', 'INITIALIZE', 'INITIALLY', 'INNER', 'INOUT', 'INPUT', - 'INSENSITIVE', 'INSERT', 'INSTANTIABLE', 'INSTEAD', 'INTERSECT', 'INTO', - 'INVOKER', 'IS', 'ISNULL', 'ISOLATION', 'ITERATE', 'JOIN', 'KEY', - 'KEY_MEMBER', 'KEY_TYPE', 'LANCOMPILER', 'LANGUAGE', 'LARGE', 'LAST', - 'LATERAL', 'LEADING', 'LEFT', 'LENGTH', 'LESS', 'LEVEL', 'LIKE', 'LIMIT', - 'LISTEN', 'LOAD', 'LOCAL', 'LOCALTIME', 'LOCALTIMESTAMP', 'LOCATION', - 'LOCATOR', 'LOCK', 'LOWER', 'MAP', 'MATCH', 'MAX', 'MAXVALUE', - 'MESSAGE_LENGTH', 'MESSAGE_OCTET_LENGTH', 'MESSAGE_TEXT', 'METHOD', 'MIN', - 'MINUTE', 'MINVALUE', 'MOD', 'MODE', 'MODIFIES', 'MODIFY', 'MONTH', - 'MORE', 'MOVE', 'MUMPS', 'NAMES', 'NATIONAL', 'NATURAL', 'NCHAR', 'NCLOB', - 'NEW', 'NEXT', 'NO', 'NOCREATEDB', 'NOCREATEUSER', 'NONE', 'NOT', - 'NOTHING', 'NOTIFY', 'NOTNULL', 'NULL', 'NULLABLE', 'NULLIF', 'OBJECT', - 'OCTET_LENGTH', 'OF', 'OFF', 'OFFSET', 'OIDS', 'OLD', 'ON', 'ONLY', - 'OPEN', 'OPERATION', 'OPERATOR', 'OPTION', 'OPTIONS', 'OR', 'ORDER', - 'ORDINALITY', 'OUT', 'OUTER', 'OUTPUT', 'OVERLAPS', 'OVERLAY', - 'OVERRIDING', 'OWNER', 'PAD', 'PARAMETER', 'PARAMETERS', 'PARAMETER_MODE', - 'PARAMATER_NAME', 'PARAMATER_ORDINAL_POSITION', - 'PARAMETER_SPECIFIC_CATALOG', 'PARAMETER_SPECIFIC_NAME', - 'PARAMATER_SPECIFIC_SCHEMA', 'PARTIAL', 'PASCAL', 'PENDANT', 'PLACING', - 'PLI', 'POSITION', 'POSTFIX', 'PRECISION', 'PREFIX', 'PREORDER', - 'PREPARE', 'PRESERVE', 'PRIMARY', 'PRIOR', 'PRIVILEGES', 'PROCEDURAL', - 'PROCEDURE', 'PUBLIC', 'READ', 'READS', 'RECHECK', 'RECURSIVE', 'REF', - 'REFERENCES', 'REFERENCING', 'REINDEX', 'RELATIVE', 'RENAME', - 'REPEATABLE', 'REPLACE', 'RESET', 'RESTART', 'RESTRICT', 'RESULT', - 'RETURN', 'RETURNED_LENGTH', 'RETURNED_OCTET_LENGTH', 'RETURNED_SQLSTATE', - 'RETURNS', 'REVOKE', 'RIGHT', 'ROLE', 'ROLLBACK', 'ROLLUP', 'ROUTINE', - 'ROUTINE_CATALOG', 'ROUTINE_NAME', 'ROUTINE_SCHEMA', 'ROW', 'ROWS', - 'ROW_COUNT', 'RULE', 'SAVE_POINT', 'SCALE', 'SCHEMA', 'SCHEMA_NAME', - 'SCOPE', 'SCROLL', 'SEARCH', 'SECOND', 'SECURITY', 'SELECT', 'SELF', - 'SENSITIVE', 'SERIALIZABLE', 'SERVER_NAME', 'SESSION', 'SESSION_USER', - 'SET', 'SETOF', 'SETS', 'SHARE', 'SHOW', 'SIMILAR', 'SIMPLE', 'SIZE', - 'SOME', 'SOURCE', 'SPACE', 'SPECIFIC', 'SPECIFICTYPE', 'SPECIFIC_NAME', - 'SQL', 'SQLCODE', 'SQLERROR', 'SQLEXCEPTION', 'SQLSTATE', 'SQLWARNINIG', - 'STABLE', 'START', 'STATE', 'STATEMENT', 'STATIC', 'STATISTICS', 'STDIN', - 'STDOUT', 'STORAGE', 'STRICT', 'STRUCTURE', 'STYPE', 'SUBCLASS_ORIGIN', - 'SUBLIST', 'SUBSTRING', 'SUM', 'SYMMETRIC', 'SYSID', 'SYSTEM', - 'SYSTEM_USER', 'TABLE', 'TABLE_NAME', ' TEMP', 'TEMPLATE', 'TEMPORARY', - 'TERMINATE', 'THAN', 'THEN', 'TIMESTAMP', 'TIMEZONE_HOUR', - 'TIMEZONE_MINUTE', 'TO', 'TOAST', 'TRAILING', 'TRANSATION', - 'TRANSACTIONS_COMMITTED', 'TRANSACTIONS_ROLLED_BACK', 'TRANSATION_ACTIVE', - 'TRANSFORM', 'TRANSFORMS', 'TRANSLATE', 'TRANSLATION', 'TREAT', 'TRIGGER', - 'TRIGGER_CATALOG', 'TRIGGER_NAME', 'TRIGGER_SCHEMA', 'TRIM', 'TRUE', - 'TRUNCATE', 'TRUSTED', 'TYPE', 'UNCOMMITTED', 'UNDER', 'UNENCRYPTED', - 'UNION', 'UNIQUE', 'UNKNOWN', 'UNLISTEN', 'UNNAMED', 'UNNEST', 'UNTIL', - 'UPDATE', 'UPPER', 'USAGE', 'USER', 'USER_DEFINED_TYPE_CATALOG', - 'USER_DEFINED_TYPE_NAME', 'USER_DEFINED_TYPE_SCHEMA', 'USING', 'VACUUM', - 'VALID', 'VALIDATOR', 'VALUES', 'VARIABLE', 'VERBOSE', 'VERSION', 'VIEW', - 'VOLATILE', 'WHEN', 'WHENEVER', 'WHERE', 'WITH', 'WITHOUT', 'WORK', - 'WRITE', 'YEAR', 'ZONE'), suffix=r'\b'), + 'DEALLOCATE', 'DECLARE', 'DEFAULT', 'DEFAULTS', 'DEFERRABLE', + 'DEFERRED', 'DEFINED', 'DEFINER', 'DELETE', 'DELIMITER', 'DELIMITERS', + 'DEREF', 'DESC', 'DESCRIBE', 'DESCRIPTOR', 'DESTROY', 'DESTRUCTOR', + 'DETERMINISTIC', 'DIAGNOSTICS', 'DICTIONARY', 'DISCONNECT', 'DISPATCH', + 'DISTINCT', 'DO', 'DOMAIN', 'DROP', 'DYNAMIC', 'DYNAMIC_FUNCTION', + 'DYNAMIC_FUNCTION_CODE', 'EACH', 'ELSE', 'ELSIF', 'ENCODING', + 'ENCRYPTED', 'END', 'END-EXEC', 'EQUALS', 'ESCAPE', 'EVERY', 'EXCEPTION', + 'EXCEPT', 'EXCLUDING', 'EXCLUSIVE', 'EXEC', 'EXECUTE', 'EXISTING', + 'EXISTS', 'EXPLAIN', 'EXTERNAL', 'EXTRACT', 'FALSE', 'FETCH', 'FINAL', + 'FIRST', 'FOR', 'FORCE', 'FOREIGN', 'FORTRAN', 'FORWARD', 'FOUND', 'FREE', + 'FREEZE', 'FROM', 'FULL', 'FUNCTION', 'G', 'GENERAL', 'GENERATED', 'GET', + 'GLOBAL', 'GO', 'GOTO', 'GRANT', 'GRANTED', 'GROUP', 'GROUPING', + 'HANDLER', 'HAVING', 'HIERARCHY', 'HOLD', 'HOST', 'IDENTITY', 'IF', + 'IGNORE', 'ILIKE', 'IMMEDIATE', 'IMMUTABLE', 'IMPLEMENTATION', 'IMPLICIT', + 'IN', 'INCLUDING', 'INCREMENT', 'INDEX', 'INDITCATOR', 'INFIX', + 'INHERITS', 'INITIALIZE', 'INITIALLY', 'INNER', 'INOUT', 'INPUT', + 'INSENSITIVE', 'INSERT', 'INSTANTIABLE', 'INSTEAD', 'INTERSECT', 'INTO', + 'INVOKER', 'IS', 'ISNULL', 'ISOLATION', 'ITERATE', 'JOIN', 'KEY', + 'KEY_MEMBER', 'KEY_TYPE', 'LANCOMPILER', 'LANGUAGE', 'LARGE', 'LAST', + 'LATERAL', 'LEADING', 'LEFT', 'LENGTH', 'LESS', 'LEVEL', 'LIKE', 'LIMIT', + 'LISTEN', 'LOAD', 'LOCAL', 'LOCALTIME', 'LOCALTIMESTAMP', 'LOCATION', + 'LOCATOR', 'LOCK', 'LOWER', 'MAP', 'MATCH', 'MAX', 'MAXVALUE', + 'MESSAGE_LENGTH', 'MESSAGE_OCTET_LENGTH', 'MESSAGE_TEXT', 'METHOD', 'MIN', + 'MINUTE', 'MINVALUE', 'MOD', 'MODE', 'MODIFIES', 'MODIFY', 'MONTH', + 'MORE', 'MOVE', 'MUMPS', 'NAMES', 'NATIONAL', 'NATURAL', 'NCHAR', 'NCLOB', + 'NEW', 'NEXT', 'NO', 'NOCREATEDB', 'NOCREATEUSER', 'NONE', 'NOT', + 'NOTHING', 'NOTIFY', 'NOTNULL', 'NULL', 'NULLABLE', 'NULLIF', 'OBJECT', + 'OCTET_LENGTH', 'OF', 'OFF', 'OFFSET', 'OIDS', 'OLD', 'ON', 'ONLY', + 'OPEN', 'OPERATION', 'OPERATOR', 'OPTION', 'OPTIONS', 'OR', 'ORDER', + 'ORDINALITY', 'OUT', 'OUTER', 'OUTPUT', 'OVERLAPS', 'OVERLAY', + 'OVERRIDING', 'OWNER', 'PAD', 'PARAMETER', 'PARAMETERS', 'PARAMETER_MODE', + 'PARAMATER_NAME', 'PARAMATER_ORDINAL_POSITION', + 'PARAMETER_SPECIFIC_CATALOG', 'PARAMETER_SPECIFIC_NAME', + 'PARAMATER_SPECIFIC_SCHEMA', 'PARTIAL', 'PASCAL', 'PENDANT', 'PLACING', + 'PLI', 'POSITION', 'POSTFIX', 'PRECISION', 'PREFIX', 'PREORDER', + 'PREPARE', 'PRESERVE', 'PRIMARY', 'PRIOR', 'PRIVILEGES', 'PROCEDURAL', + 'PROCEDURE', 'PUBLIC', 'READ', 'READS', 'RECHECK', 'RECURSIVE', 'REF', + 'REFERENCES', 'REFERENCING', 'REINDEX', 'RELATIVE', 'RENAME', + 'REPEATABLE', 'REPLACE', 'RESET', 'RESTART', 'RESTRICT', 'RESULT', + 'RETURN', 'RETURNED_LENGTH', 'RETURNED_OCTET_LENGTH', 'RETURNED_SQLSTATE', + 'RETURNS', 'REVOKE', 'RIGHT', 'ROLE', 'ROLLBACK', 'ROLLUP', 'ROUTINE', + 'ROUTINE_CATALOG', 'ROUTINE_NAME', 'ROUTINE_SCHEMA', 'ROW', 'ROWS', + 'ROW_COUNT', 'RULE', 'SAVE_POINT', 'SCALE', 'SCHEMA', 'SCHEMA_NAME', + 'SCOPE', 'SCROLL', 'SEARCH', 'SECOND', 'SECURITY', 'SELECT', 'SELF', + 'SENSITIVE', 'SERIALIZABLE', 'SERVER_NAME', 'SESSION', 'SESSION_USER', + 'SET', 'SETOF', 'SETS', 'SHARE', 'SHOW', 'SIMILAR', 'SIMPLE', 'SIZE', + 'SOME', 'SOURCE', 'SPACE', 'SPECIFIC', 'SPECIFICTYPE', 'SPECIFIC_NAME', + 'SQL', 'SQLCODE', 'SQLERROR', 'SQLEXCEPTION', 'SQLSTATE', 'SQLWARNINIG', + 'STABLE', 'START', 'STATE', 'STATEMENT', 'STATIC', 'STATISTICS', 'STDIN', + 'STDOUT', 'STORAGE', 'STRICT', 'STRUCTURE', 'STYPE', 'SUBCLASS_ORIGIN', + 'SUBLIST', 'SUBSTRING', 'SUM', 'SYMMETRIC', 'SYSID', 'SYSTEM', + 'SYSTEM_USER', 'TABLE', 'TABLE_NAME', ' TEMP', 'TEMPLATE', 'TEMPORARY', + 'TERMINATE', 'THAN', 'THEN', 'TIMESTAMP', 'TIMEZONE_HOUR', + 'TIMEZONE_MINUTE', 'TO', 'TOAST', 'TRAILING', 'TRANSATION', + 'TRANSACTIONS_COMMITTED', 'TRANSACTIONS_ROLLED_BACK', 'TRANSATION_ACTIVE', + 'TRANSFORM', 'TRANSFORMS', 'TRANSLATE', 'TRANSLATION', 'TREAT', 'TRIGGER', + 'TRIGGER_CATALOG', 'TRIGGER_NAME', 'TRIGGER_SCHEMA', 'TRIM', 'TRUE', + 'TRUNCATE', 'TRUSTED', 'TYPE', 'UNCOMMITTED', 'UNDER', 'UNENCRYPTED', + 'UNION', 'UNIQUE', 'UNKNOWN', 'UNLISTEN', 'UNNAMED', 'UNNEST', 'UNTIL', + 'UPDATE', 'UPPER', 'USAGE', 'USER', 'USER_DEFINED_TYPE_CATALOG', + 'USER_DEFINED_TYPE_NAME', 'USER_DEFINED_TYPE_SCHEMA', 'USING', 'VACUUM', + 'VALID', 'VALIDATOR', 'VALUES', 'VARIABLE', 'VERBOSE', 'VERSION', 'VIEW', + 'VOLATILE', 'WHEN', 'WHENEVER', 'WHERE', 'WITH', 'WITHOUT', 'WORK', + 'WRITE', 'YEAR', 'ZONE'), suffix=r'\b'), Keyword), (words(( - 'ARRAY', 'BIGINT', 'BINARY', 'BIT', 'BLOB', 'BOOLEAN', 'CHAR', - 'CHARACTER', 'DATE', 'DEC', 'DECIMAL', 'FLOAT', 'INT', 'INTEGER', - 'INTERVAL', 'NUMBER', 'NUMERIC', 'REAL', 'SERIAL', 'SMALLINT', - 'VARCHAR', 'VARYING', 'INT8', 'SERIAL8', 'TEXT'), suffix=r'\b'), + 'ARRAY', 'BIGINT', 'BINARY', 'BIT', 'BLOB', 'BOOLEAN', 'CHAR', + 'CHARACTER', 'DATE', 'DEC', 'DECIMAL', 'FLOAT', 'INT', 'INTEGER', + 'INTERVAL', 'NUMBER', 'NUMERIC', 'REAL', 'SERIAL', 'SMALLINT', + 'VARCHAR', 'VARYING', 'INT8', 'SERIAL8', 'TEXT'), suffix=r'\b'), Name.Builtin), (r'[+*/<>=~!@#%^&|`?-]', Operator), (r'[0-9]+', Number.Integer), @@ -560,15 +560,15 @@ class TransactSqlLexer(RegexLexer): rating = 1.0 else: name_between_backtick_count = len( - name_between_backtick_re.findall(text)) + name_between_backtick_re.findall(text)) name_between_bracket_count = len( name_between_bracket_re.findall(text)) # We need to check if there are any names using # backticks or brackets, as otherwise both are 0 # and 0 >= 2 * 0, so we would always assume it's true dialect_name_count = name_between_backtick_count + name_between_bracket_count - if dialect_name_count >= 1 and \ - name_between_bracket_count >= 2 * name_between_backtick_count: + if dialect_name_count >= 1 and \ + name_between_bracket_count >= 2 * name_between_backtick_count: # Found at least twice as many [name] as `name`. rating += 0.5 elif name_between_bracket_count > name_between_backtick_count: @@ -657,13 +657,13 @@ class MySqlLexer(RegexLexer): def analyse_text(text): rating = 0 name_between_backtick_count = len( - name_between_backtick_re.findall(text)) + name_between_backtick_re.findall(text)) name_between_bracket_count = len( name_between_bracket_re.findall(text)) # Same logic as above in the TSQL analysis dialect_name_count = name_between_backtick_count + name_between_bracket_count - if dialect_name_count >= 1 and \ - name_between_backtick_count >= 2 * name_between_bracket_count: + if dialect_name_count >= 1 and \ + name_between_backtick_count >= 2 * name_between_bracket_count: # Found at least twice as many `name` as [name]. rating += 0.5 elif name_between_backtick_count > name_between_bracket_count: diff --git a/contrib/python/Pygments/py2/pygments/lexers/templates.py b/contrib/python/Pygments/py2/pygments/lexers/templates.py index edd8179daf..f891242cb8 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/templates.py +++ b/contrib/python/Pygments/py2/pygments/lexers/templates.py @@ -226,7 +226,7 @@ class VelocityLexer(RegexLexer): 'directiveparams'), (r'(#\{?)(' + identifier + r')(\}|\b)', bygroups(Comment.Preproc, Name.Function, Comment.Preproc)), - (r'\$!?\{?', Punctuation, 'variable') + (r'\$!?\{?', Punctuation, 'variable') ], 'variable': [ (identifier, Name.Variable), @@ -249,7 +249,7 @@ class VelocityLexer(RegexLexer): (r'\]', Operator, '#pop') ], 'funcparams': [ - (r'\$!?\{?', Punctuation, 'variable'), + (r'\$!?\{?', Punctuation, 'variable'), (r'\s+', Text), (r'[,:]', Punctuation), (r'"(\\\\|\\"|[^"])*"', String.Double), @@ -274,7 +274,7 @@ class VelocityLexer(RegexLexer): rv += 0.15 if re.search(r'#\{?foreach\}?\(.+?\).*?#\{?end\}?', text): rv += 0.15 - if re.search(r'\$!?\{?[a-zA-Z_]\w*(\([^)]*\))?' + if re.search(r'\$!?\{?[a-zA-Z_]\w*(\([^)]*\))?' r'(\.\w+(\([^)]*\))?)*\}?', text): rv += 0.01 return rv @@ -1802,26 +1802,26 @@ class HandlebarsLexer(RegexLexer): 'root': [ (r'[^{]+', Other), - # Comment start {{! }} or {{!-- + # Comment start {{! }} or {{!-- (r'\{\{!.*\}\}', Comment), - # HTML Escaping open {{{expression + # HTML Escaping open {{{expression (r'(\{\{\{)(\s*)', bygroups(Comment.Special, Text), 'tag'), - - # {{blockOpen {{#blockOpen {{/blockClose with optional tilde ~ - (r'(\{\{)([#~/]+)([^\s}]*)', bygroups(Comment.Preproc, Number.Attribute,Number.Attribute), 'tag'), + + # {{blockOpen {{#blockOpen {{/blockClose with optional tilde ~ + (r'(\{\{)([#~/]+)([^\s}]*)', bygroups(Comment.Preproc, Number.Attribute,Number.Attribute), 'tag'), (r'(\{\{)(\s*)', bygroups(Comment.Preproc, Text), 'tag'), ], 'tag': [ (r'\s+', Text), - # HTML Escaping close }}} + # HTML Escaping close }}} (r'\}\}\}', Comment.Special, '#pop'), - # blockClose}}, includes optional tilde ~ - (r'(~?)(\}\})', bygroups(Number, Comment.Preproc), '#pop'), + # blockClose}}, includes optional tilde ~ + (r'(~?)(\}\})', bygroups(Number, Comment.Preproc), '#pop'), # {{opt=something}} - (r'([^\s}]+)(=)', bygroups(Name.Attribute, Operator)), + (r'([^\s}]+)(=)', bygroups(Name.Attribute, Operator)), # Partials {{> ...}} (r'(>)(\s*)(@partial-block)', bygroups(Keyword, Text, Keyword)), @@ -1844,7 +1844,7 @@ class HandlebarsLexer(RegexLexer): include('generic'), ], 'variable': [ - (r'[()/@a-zA-Z][\w-]*', Name.Variable), + (r'[()/@a-zA-Z][\w-]*', Name.Variable), (r'\.[\w-]+', Name.Variable), (r'(this\/|\.\/|(\.\.\/)+)[\w-]+', Name.Variable), ], diff --git a/contrib/python/Pygments/py2/pygments/lexers/teraterm.py b/contrib/python/Pygments/py2/pygments/lexers/teraterm.py index 6a94c8b549..1d7483da24 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/teraterm.py +++ b/contrib/python/Pygments/py2/pygments/lexers/teraterm.py @@ -154,5 +154,5 @@ class TeraTermLexer(RegexLexer): def analyse_text(text): result = 0.0 if re.search(TeraTermLexer.tokens['commands'][0][0], text): - result += 0.01 + result += 0.01 return result diff --git a/contrib/python/Pygments/py2/pygments/lexers/textedit.py b/contrib/python/Pygments/py2/pygments/lexers/textedit.py index f6b38fa200..3c6fb570df 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/textedit.py +++ b/contrib/python/Pygments/py2/pygments/lexers/textedit.py @@ -102,9 +102,9 @@ class VimLexer(RegexLexer): (r'[ \t]+', Text), # TODO: regexes can have other delims - (r'/[^/\\\n]*(?:\\[\s\S][^/\\\n]*)*/', String.Regex), - (r'"[^"\\\n]*(?:\\[\s\S][^"\\\n]*)*"', String.Double), - (r"'[^\n']*(?:''[^\n']*)*'", String.Single), + (r'/[^/\\\n]*(?:\\[\s\S][^/\\\n]*)*/', String.Regex), + (r'"[^"\\\n]*(?:\\[\s\S][^"\\\n]*)*"', String.Double), + (r"'[^\n']*(?:''[^\n']*)*'", String.Single), # Who decided that doublequote was a good comment character?? (r'(?<=\s)"[^\-:.%#=*].*', Comment), diff --git a/contrib/python/Pygments/py2/pygments/lexers/textfmts.py b/contrib/python/Pygments/py2/pygments/lexers/textfmts.py index 3a6b47034a..d3a191b08f 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/textfmts.py +++ b/contrib/python/Pygments/py2/pygments/lexers/textfmts.py @@ -11,14 +11,14 @@ import re -from pygments.lexers import guess_lexer, get_lexer_by_name -from pygments.lexer import RegexLexer, bygroups, default, do_insertions +from pygments.lexers import guess_lexer, get_lexer_by_name +from pygments.lexer import RegexLexer, bygroups, default, do_insertions from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ - Number, Generic, Literal, Punctuation + Number, Generic, Literal, Punctuation from pygments.util import ClassNotFound -__all__ = ['IrcLogsLexer', 'TodotxtLexer', 'HttpLexer', 'GettextLexer', - 'NotmuchLexer'] +__all__ = ['IrcLogsLexer', 'TodotxtLexer', 'HttpLexer', 'GettextLexer', + 'NotmuchLexer'] class IrcLogsLexer(RegexLexer): @@ -297,86 +297,86 @@ class TodotxtLexer(RegexLexer): (r'\s+', IncompleteTaskText), ], } - - -class NotmuchLexer(RegexLexer): - """ - For `Notmuch <https://notmuchmail.org/>`_ email text format. - - .. versionadded:: 2.5 - - Additional options accepted: - - `body_lexer` - If given, highlight the contents of the message body with the specified - lexer, else guess it according to the body content (default: ``None``). - """ - - name = 'Notmuch' - aliases = ['notmuch'] - - def _highlight_code(self, match): - code = match.group(1) - - try: - if self.body_lexer: - lexer = get_lexer_by_name(self.body_lexer) - else: - lexer = guess_lexer(code.strip()) - except ClassNotFound: - lexer = get_lexer_by_name('text') - - for item in lexer.get_tokens_unprocessed(code): - yield item - - tokens = { - 'root': [ - (r'\fmessage{\s*', Keyword, ('message', 'message-attr')), - ], - 'message-attr': [ - (r'(\s*id:\s*)([^\s]+)', bygroups(Name.Attribute, String)), - (r'(\s*(?:depth|match|excluded):\s*)(\d+)', - bygroups(Name.Attribute, Number.Integer)), - (r'(\s*filename:\s*)(.+\n)', - bygroups(Name.Attribute, String)), - default('#pop'), - ], - 'message': [ - (r'\fmessage}\n', Keyword, '#pop'), - (r'\fheader{\n', Keyword, 'header'), - (r'\fbody{\n', Keyword, 'body'), - ], - 'header': [ - (r'\fheader}\n', Keyword, '#pop'), - (r'((?:Subject|From|To|Cc|Date):\s*)(.*\n)', - bygroups(Name.Attribute, String)), - (r'(.*)(\s*\(.*\))(\s*\(.*\)\n)', - bygroups(Generic.Strong, Literal, Name.Tag)), - ], - 'body': [ - (r'\fpart{\n', Keyword, 'part'), - (r'\f(part|attachment){\s*', Keyword, ('part', 'part-attr')), - (r'\fbody}\n', Keyword, '#pop'), - ], - 'part-attr': [ - (r'(ID:\s*)(\d+)', bygroups(Name.Attribute, Number.Integer)), - (r'(,\s*)((?:Filename|Content-id):\s*)([^,]+)', - bygroups(Punctuation, Name.Attribute, String)), - (r'(,\s*)(Content-type:\s*)(.+\n)', - bygroups(Punctuation, Name.Attribute, String)), - default('#pop'), - ], - 'part': [ - (r'\f(?:part|attachment)}\n', Keyword, '#pop'), - (r'\f(?:part|attachment){\s*', Keyword, ('#push', 'part-attr')), - (r'^Non-text part: .*\n', Comment), - (r'(?s)(.*?(?=\f(?:part|attachment)}\n))', _highlight_code), - ], - } - - def analyse_text(text): - return 1.0 if text.startswith('\fmessage{') else 0.0 - - def __init__(self, **options): - self.body_lexer = options.get('body_lexer', None) - RegexLexer.__init__(self, **options) + + +class NotmuchLexer(RegexLexer): + """ + For `Notmuch <https://notmuchmail.org/>`_ email text format. + + .. versionadded:: 2.5 + + Additional options accepted: + + `body_lexer` + If given, highlight the contents of the message body with the specified + lexer, else guess it according to the body content (default: ``None``). + """ + + name = 'Notmuch' + aliases = ['notmuch'] + + def _highlight_code(self, match): + code = match.group(1) + + try: + if self.body_lexer: + lexer = get_lexer_by_name(self.body_lexer) + else: + lexer = guess_lexer(code.strip()) + except ClassNotFound: + lexer = get_lexer_by_name('text') + + for item in lexer.get_tokens_unprocessed(code): + yield item + + tokens = { + 'root': [ + (r'\fmessage{\s*', Keyword, ('message', 'message-attr')), + ], + 'message-attr': [ + (r'(\s*id:\s*)([^\s]+)', bygroups(Name.Attribute, String)), + (r'(\s*(?:depth|match|excluded):\s*)(\d+)', + bygroups(Name.Attribute, Number.Integer)), + (r'(\s*filename:\s*)(.+\n)', + bygroups(Name.Attribute, String)), + default('#pop'), + ], + 'message': [ + (r'\fmessage}\n', Keyword, '#pop'), + (r'\fheader{\n', Keyword, 'header'), + (r'\fbody{\n', Keyword, 'body'), + ], + 'header': [ + (r'\fheader}\n', Keyword, '#pop'), + (r'((?:Subject|From|To|Cc|Date):\s*)(.*\n)', + bygroups(Name.Attribute, String)), + (r'(.*)(\s*\(.*\))(\s*\(.*\)\n)', + bygroups(Generic.Strong, Literal, Name.Tag)), + ], + 'body': [ + (r'\fpart{\n', Keyword, 'part'), + (r'\f(part|attachment){\s*', Keyword, ('part', 'part-attr')), + (r'\fbody}\n', Keyword, '#pop'), + ], + 'part-attr': [ + (r'(ID:\s*)(\d+)', bygroups(Name.Attribute, Number.Integer)), + (r'(,\s*)((?:Filename|Content-id):\s*)([^,]+)', + bygroups(Punctuation, Name.Attribute, String)), + (r'(,\s*)(Content-type:\s*)(.+\n)', + bygroups(Punctuation, Name.Attribute, String)), + default('#pop'), + ], + 'part': [ + (r'\f(?:part|attachment)}\n', Keyword, '#pop'), + (r'\f(?:part|attachment){\s*', Keyword, ('#push', 'part-attr')), + (r'^Non-text part: .*\n', Comment), + (r'(?s)(.*?(?=\f(?:part|attachment)}\n))', _highlight_code), + ], + } + + def analyse_text(text): + return 1.0 if text.startswith('\fmessage{') else 0.0 + + def __init__(self, **options): + self.body_lexer = options.get('body_lexer', None) + RegexLexer.__init__(self, **options) diff --git a/contrib/python/Pygments/py2/pygments/lexers/zig.py b/contrib/python/Pygments/py2/pygments/lexers/zig.py index cecb4adbd1..c989386285 100644 --- a/contrib/python/Pygments/py2/pygments/lexers/zig.py +++ b/contrib/python/Pygments/py2/pygments/lexers/zig.py @@ -1,129 +1,129 @@ -# -*- coding: utf-8 -*- -""" - pygments.lexers.zig - ~~~~~~~~~~~~~~~~~~~ - - Lexers for Zig. - - :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -from pygments.lexer import RegexLexer, words -from pygments.token import Comment, Operator, Keyword, Name, String, \ - Number, Punctuation, Whitespace - -__all__ = ['ZigLexer'] - - -class ZigLexer(RegexLexer): - """ - For `Zig <http://www.ziglang.org>`_ source code. - - grammar: https://ziglang.org/documentation/master/#Grammar - """ - name = 'Zig' - aliases = ['zig'] - filenames = ['*.zig'] - mimetypes = ['text/zig'] - - type_keywords = ( - words(('bool', 'f16', 'f32', 'f64', 'f128', 'void', 'noreturn', 'type', - 'anyerror', 'promise', 'i0', 'u0', 'isize', 'usize', 'comptime_int', - 'comptime_float', 'c_short', 'c_ushort', 'c_int', 'c_uint', 'c_long', - 'c_ulong', 'c_longlong', 'c_ulonglong', 'c_longdouble', 'c_void' - 'i8', 'u8', 'i16', 'u16', 'i32', 'u32', 'i64', 'u64', 'i128', - 'u128'), suffix=r'\b'), - Keyword.Type) - - storage_keywords = ( - words(('const', 'var', 'extern', 'packed', 'export', 'pub', 'noalias', - 'inline', 'comptime', 'nakedcc', 'stdcallcc', 'volatile', 'allowzero', - 'align', 'linksection', 'threadlocal'), suffix=r'\b'), - Keyword.Reserved) - - structure_keywords = ( - words(('struct', 'enum', 'union', 'error'), suffix=r'\b'), - Keyword) - - statement_keywords = ( - words(('break', 'return', 'continue', 'asm', 'defer', 'errdefer', - 'unreachable', 'try', 'catch', 'async', 'await', 'suspend', - 'resume', 'cancel'), suffix=r'\b'), - Keyword) - - conditional_keywords = ( - words(('if', 'else', 'switch', 'and', 'or', 'orelse'), suffix=r'\b'), - Keyword) - - repeat_keywords = ( - words(('while', 'for'), suffix=r'\b'), - Keyword) - - other_keywords = ( - words(('fn', 'usingnamespace', 'test'), suffix=r'\b'), - Keyword) - - constant_keywords = ( - words(('true', 'false', 'null', 'undefined'), suffix=r'\b'), - Keyword.Constant) - - tokens = { - 'root': [ - (r'\n', Whitespace), - (r'\s+', Whitespace), - (r'//.*?\n', Comment.Single), - - # Keywords - statement_keywords, - storage_keywords, - structure_keywords, - repeat_keywords, - type_keywords, - constant_keywords, - conditional_keywords, - other_keywords, - - # Floats - (r'0x[0-9a-fA-F]+\.[0-9a-fA-F]+([pP][\-+]?[0-9a-fA-F]+)?', Number.Float), - (r'0x[0-9a-fA-F]+\.?[pP][\-+]?[0-9a-fA-F]+', Number.Float), - (r'[0-9]+\.[0-9]+([eE][-+]?[0-9]+)?', Number.Float), - (r'[0-9]+\.?[eE][-+]?[0-9]+', Number.Float), - - # Integers - (r'0b[01]+', Number.Bin), - (r'0o[0-7]+', Number.Oct), - (r'0x[0-9a-fA-F]+', Number.Hex), - (r'[0-9]+', Number.Integer), - - # Identifier - (r'@[a-zA-Z_]\w*', Name.Builtin), - (r'[a-zA-Z_]\w*', Name), - - # Characters - (r'\'\\\'\'', String.Escape), - (r'\'\\(|x[a-fA-F0-9]{2}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{6}|[nr\\t\'"])\'', - String.Escape), - (r'\'[^\\\']\'', String), - - # Strings - (r'\\\\[^\n]*', String.Heredoc), - (r'c\\\\[^\n]*', String.Heredoc), - (r'c?"', String, 'string'), - - # Operators, Punctuation - (r'[+%=><|^!?/\-*&~:]', Operator), - (r'[{}()\[\],.;]', Punctuation) - ], - 'string': [ - (r'\\(x[a-fA-F0-9]{2}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{6}|[nr\\t\'"])', - String.Escape), - (r'[^\\"\n]+', String), - (r'"', String, '#pop') - ] - } - - def get_tokens_unprocessed(self, text): - for index, token, value in \ - RegexLexer.get_tokens_unprocessed(self, text): - yield index, token, value +# -*- coding: utf-8 -*- +""" + pygments.lexers.zig + ~~~~~~~~~~~~~~~~~~~ + + Lexers for Zig. + + :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, words +from pygments.token import Comment, Operator, Keyword, Name, String, \ + Number, Punctuation, Whitespace + +__all__ = ['ZigLexer'] + + +class ZigLexer(RegexLexer): + """ + For `Zig <http://www.ziglang.org>`_ source code. + + grammar: https://ziglang.org/documentation/master/#Grammar + """ + name = 'Zig' + aliases = ['zig'] + filenames = ['*.zig'] + mimetypes = ['text/zig'] + + type_keywords = ( + words(('bool', 'f16', 'f32', 'f64', 'f128', 'void', 'noreturn', 'type', + 'anyerror', 'promise', 'i0', 'u0', 'isize', 'usize', 'comptime_int', + 'comptime_float', 'c_short', 'c_ushort', 'c_int', 'c_uint', 'c_long', + 'c_ulong', 'c_longlong', 'c_ulonglong', 'c_longdouble', 'c_void' + 'i8', 'u8', 'i16', 'u16', 'i32', 'u32', 'i64', 'u64', 'i128', + 'u128'), suffix=r'\b'), + Keyword.Type) + + storage_keywords = ( + words(('const', 'var', 'extern', 'packed', 'export', 'pub', 'noalias', + 'inline', 'comptime', 'nakedcc', 'stdcallcc', 'volatile', 'allowzero', + 'align', 'linksection', 'threadlocal'), suffix=r'\b'), + Keyword.Reserved) + + structure_keywords = ( + words(('struct', 'enum', 'union', 'error'), suffix=r'\b'), + Keyword) + + statement_keywords = ( + words(('break', 'return', 'continue', 'asm', 'defer', 'errdefer', + 'unreachable', 'try', 'catch', 'async', 'await', 'suspend', + 'resume', 'cancel'), suffix=r'\b'), + Keyword) + + conditional_keywords = ( + words(('if', 'else', 'switch', 'and', 'or', 'orelse'), suffix=r'\b'), + Keyword) + + repeat_keywords = ( + words(('while', 'for'), suffix=r'\b'), + Keyword) + + other_keywords = ( + words(('fn', 'usingnamespace', 'test'), suffix=r'\b'), + Keyword) + + constant_keywords = ( + words(('true', 'false', 'null', 'undefined'), suffix=r'\b'), + Keyword.Constant) + + tokens = { + 'root': [ + (r'\n', Whitespace), + (r'\s+', Whitespace), + (r'//.*?\n', Comment.Single), + + # Keywords + statement_keywords, + storage_keywords, + structure_keywords, + repeat_keywords, + type_keywords, + constant_keywords, + conditional_keywords, + other_keywords, + + # Floats + (r'0x[0-9a-fA-F]+\.[0-9a-fA-F]+([pP][\-+]?[0-9a-fA-F]+)?', Number.Float), + (r'0x[0-9a-fA-F]+\.?[pP][\-+]?[0-9a-fA-F]+', Number.Float), + (r'[0-9]+\.[0-9]+([eE][-+]?[0-9]+)?', Number.Float), + (r'[0-9]+\.?[eE][-+]?[0-9]+', Number.Float), + + # Integers + (r'0b[01]+', Number.Bin), + (r'0o[0-7]+', Number.Oct), + (r'0x[0-9a-fA-F]+', Number.Hex), + (r'[0-9]+', Number.Integer), + + # Identifier + (r'@[a-zA-Z_]\w*', Name.Builtin), + (r'[a-zA-Z_]\w*', Name), + + # Characters + (r'\'\\\'\'', String.Escape), + (r'\'\\(|x[a-fA-F0-9]{2}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{6}|[nr\\t\'"])\'', + String.Escape), + (r'\'[^\\\']\'', String), + + # Strings + (r'\\\\[^\n]*', String.Heredoc), + (r'c\\\\[^\n]*', String.Heredoc), + (r'c?"', String, 'string'), + + # Operators, Punctuation + (r'[+%=><|^!?/\-*&~:]', Operator), + (r'[{}()\[\],.;]', Punctuation) + ], + 'string': [ + (r'\\(x[a-fA-F0-9]{2}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{6}|[nr\\t\'"])', + String.Escape), + (r'[^\\"\n]+', String), + (r'"', String, '#pop') + ] + } + + def get_tokens_unprocessed(self, text): + for index, token, value in \ + RegexLexer.get_tokens_unprocessed(self, text): + yield index, token, value diff --git a/contrib/python/Pygments/py2/pygments/styles/__init__.py b/contrib/python/Pygments/py2/pygments/styles/__init__.py index 199eb534fd..c0614718a2 100644 --- a/contrib/python/Pygments/py2/pygments/styles/__init__.py +++ b/contrib/python/Pygments/py2/pygments/styles/__init__.py @@ -50,7 +50,7 @@ STYLE_MAP = { 'stata': 'stata_light::StataLightStyle', 'stata-light': 'stata_light::StataLightStyle', 'stata-dark': 'stata_dark::StataDarkStyle', - 'inkpot': 'inkpot::InkPotStyle', + 'inkpot': 'inkpot::InkPotStyle', } diff --git a/contrib/python/Pygments/py2/pygments/styles/inkpot.py b/contrib/python/Pygments/py2/pygments/styles/inkpot.py index c2f98de4e3..0b7ea74ed9 100644 --- a/contrib/python/Pygments/py2/pygments/styles/inkpot.py +++ b/contrib/python/Pygments/py2/pygments/styles/inkpot.py @@ -1,67 +1,67 @@ -# -*- coding: utf-8 -*- -""" - pygments.styles.inkpot - ~~~~~~~~~~~~~~~~~~~~~~ - - A highlighting style for Pygments, inspired by the Inkpot theme for VIM. - - :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -from pygments.style import Style -from pygments.token import Text, Other, Keyword, Name, Comment, String, \ - Error, Number, Operator, Generic, Whitespace, Punctuation - - -class InkPotStyle(Style): - background_color = "#1e1e27" - default_style = "" - styles = { - Text: "#cfbfad", - Other: "#cfbfad", - Whitespace: "#434357", - Comment: "#cd8b00", - Comment.Preproc: "#409090", - Comment.PreprocFile: "bg:#404040 #ffcd8b", - Comment.Special: "#808bed", - - Keyword: "#808bed", - Keyword.Pseudo: "nobold", - Keyword.Type: "#ff8bff", - - Operator: "#666666", - - Punctuation: "#cfbfad", - - Name: "#cfbfad", - Name.Attribute: "#cfbfad", - Name.Builtin.Pseudo: '#ffff00', - Name.Builtin: "#808bed", - Name.Class: "#ff8bff", - Name.Constant: "#409090", - Name.Decorator: "#409090", - Name.Exception: "#ff0000", - Name.Function: "#c080d0", - Name.Label: "#808bed", - Name.Namespace: "#ff0000", - Name.Variable: "#cfbfad", - - String: "bg:#404040 #ffcd8b", - String.Doc: "#808bed", - - Number: "#f0ad6d", - - Generic.Heading: "bold #000080", - Generic.Subheading: "bold #800080", - Generic.Deleted: "#A00000", - Generic.Inserted: "#00A000", - Generic.Error: "#FF0000", - Generic.Emph: "italic", - Generic.Strong: "bold", - Generic.Prompt: "bold #000080", - Generic.Output: "#888", - Generic.Traceback: "#04D", - - Error: "bg:#6e2e2e #ffffff" - } +# -*- coding: utf-8 -*- +""" + pygments.styles.inkpot + ~~~~~~~~~~~~~~~~~~~~~~ + + A highlighting style for Pygments, inspired by the Inkpot theme for VIM. + + :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.style import Style +from pygments.token import Text, Other, Keyword, Name, Comment, String, \ + Error, Number, Operator, Generic, Whitespace, Punctuation + + +class InkPotStyle(Style): + background_color = "#1e1e27" + default_style = "" + styles = { + Text: "#cfbfad", + Other: "#cfbfad", + Whitespace: "#434357", + Comment: "#cd8b00", + Comment.Preproc: "#409090", + Comment.PreprocFile: "bg:#404040 #ffcd8b", + Comment.Special: "#808bed", + + Keyword: "#808bed", + Keyword.Pseudo: "nobold", + Keyword.Type: "#ff8bff", + + Operator: "#666666", + + Punctuation: "#cfbfad", + + Name: "#cfbfad", + Name.Attribute: "#cfbfad", + Name.Builtin.Pseudo: '#ffff00', + Name.Builtin: "#808bed", + Name.Class: "#ff8bff", + Name.Constant: "#409090", + Name.Decorator: "#409090", + Name.Exception: "#ff0000", + Name.Function: "#c080d0", + Name.Label: "#808bed", + Name.Namespace: "#ff0000", + Name.Variable: "#cfbfad", + + String: "bg:#404040 #ffcd8b", + String.Doc: "#808bed", + + Number: "#f0ad6d", + + Generic.Heading: "bold #000080", + Generic.Subheading: "bold #800080", + Generic.Deleted: "#A00000", + Generic.Inserted: "#00A000", + Generic.Error: "#FF0000", + Generic.Emph: "italic", + Generic.Strong: "bold", + Generic.Prompt: "bold #000080", + Generic.Output: "#888", + Generic.Traceback: "#04D", + + Error: "bg:#6e2e2e #ffffff" + } diff --git a/contrib/python/Pygments/py2/pygments/styles/monokai.py b/contrib/python/Pygments/py2/pygments/styles/monokai.py index b17124ee48..c9db9f2218 100644 --- a/contrib/python/Pygments/py2/pygments/styles/monokai.py +++ b/contrib/python/Pygments/py2/pygments/styles/monokai.py @@ -92,15 +92,15 @@ class MonokaiStyle(Style): String.Single: "", # class: 's1' String.Symbol: "", # class: 'ss' - + Generic: "", # class: 'g' Generic.Deleted: "#f92672", # class: 'gd', Generic.Emph: "italic", # class: 'ge' Generic.Error: "", # class: 'gr' Generic.Heading: "", # class: 'gh' Generic.Inserted: "#a6e22e", # class: 'gi' - Generic.Output: "#66d9ef", # class: 'go' - Generic.Prompt: "bold #f92672", # class: 'gp' + Generic.Output: "#66d9ef", # class: 'go' + Generic.Prompt: "bold #f92672", # class: 'gp' Generic.Strong: "bold", # class: 'gs' Generic.Subheading: "#75715e", # class: 'gu' Generic.Traceback: "", # class: 'gt' diff --git a/contrib/python/Pygments/py2/ya.make b/contrib/python/Pygments/py2/ya.make index cf5d52a2ae..978caf3d68 100644 --- a/contrib/python/Pygments/py2/ya.make +++ b/contrib/python/Pygments/py2/ya.make @@ -1,15 +1,15 @@ -# Generated by devtools/yamaker (pypi). - +# Generated by devtools/yamaker (pypi). + PY2_LIBRARY() -OWNER(blinkov g:python-contrib) +OWNER(blinkov g:python-contrib) + +VERSION(2.5.2) + +LICENSE(BSD-3-Clause) -VERSION(2.5.2) +NO_LINT() -LICENSE(BSD-3-Clause) - -NO_LINT() - NO_CHECK_IMPORTS( pygments.sphinxext ) @@ -17,7 +17,7 @@ NO_CHECK_IMPORTS( PY_SRCS( TOP_LEVEL pygments/__init__.py - pygments/__main__.py + pygments/__main__.py pygments/cmdline.py pygments/console.py pygments/filter.py @@ -89,7 +89,7 @@ PY_SRCS( pygments/lexers/ecl.py pygments/lexers/eiffel.py pygments/lexers/elm.py - pygments/lexers/email.py + pygments/lexers/email.py pygments/lexers/erlang.py pygments/lexers/esoteric.py pygments/lexers/ezhil.py @@ -126,7 +126,7 @@ PY_SRCS( pygments/lexers/markup.py pygments/lexers/math.py pygments/lexers/matlab.py - pygments/lexers/mime.py + pygments/lexers/mime.py pygments/lexers/ml.py pygments/lexers/modeling.py pygments/lexers/modula2.py @@ -160,7 +160,7 @@ PY_SRCS( pygments/lexers/ruby.py pygments/lexers/rust.py pygments/lexers/sas.py - pygments/lexers/scdoc.py + pygments/lexers/scdoc.py pygments/lexers/scripting.py pygments/lexers/sgf.py pygments/lexers/shell.py @@ -168,7 +168,7 @@ PY_SRCS( pygments/lexers/smalltalk.py pygments/lexers/smv.py pygments/lexers/snobol.py - pygments/lexers/solidity.py + pygments/lexers/solidity.py pygments/lexers/special.py pygments/lexers/sql.py pygments/lexers/stata.py @@ -192,7 +192,7 @@ PY_SRCS( pygments/lexers/whiley.py pygments/lexers/x10.py pygments/lexers/xorg.py - pygments/lexers/zig.py + pygments/lexers/zig.py pygments/modeline.py pygments/plugin.py pygments/regexopt.py @@ -213,7 +213,7 @@ PY_SRCS( pygments/styles/friendly.py pygments/styles/fruity.py pygments/styles/igor.py - pygments/styles/inkpot.py + pygments/styles/inkpot.py pygments/styles/lovelace.py pygments/styles/manni.py pygments/styles/monokai.py @@ -240,7 +240,7 @@ PY_SRCS( ) RESOURCE_FILES( - PREFIX contrib/python/Pygments/py2/ + PREFIX contrib/python/Pygments/py2/ .dist-info/METADATA .dist-info/entry_points.txt .dist-info/top_level.txt |