summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS9
-rw-r--r--CHANGES68
-rw-r--r--bitbucket-pipelines.yml6
-rw-r--r--doc/conf.py4
-rw-r--r--doc/docs/styles.rst47
-rw-r--r--doc/languages.rst15
-rw-r--r--pygments/__init__.py2
-rw-r--r--pygments/console.py11
-rw-r--r--pygments/formatters/__init__.py3
-rw-r--r--pygments/formatters/html.py7
-rw-r--r--pygments/formatters/img.py2
-rw-r--r--pygments/formatters/irc.py76
-rw-r--r--pygments/formatters/terminal.py48
-rw-r--r--pygments/formatters/terminal256.py12
-rw-r--r--pygments/lexers/__init__.py3
-rw-r--r--pygments/lexers/_cocoa_builtins.py13
-rw-r--r--pygments/lexers/_mapping.py24
-rw-r--r--pygments/lexers/_php_builtins.py30
-rw-r--r--pygments/lexers/_stan_builtins.py276
-rw-r--r--pygments/lexers/_stata_builtins.py8
-rw-r--r--pygments/lexers/_vbscript_builtins.py279
-rw-r--r--pygments/lexers/actionscript.py4
-rw-r--r--pygments/lexers/apl.py8
-rw-r--r--pygments/lexers/asm.py221
-rw-r--r--pygments/lexers/basic.py165
-rw-r--r--pygments/lexers/bibtex.py6
-rw-r--r--pygments/lexers/boa.py80
-rw-r--r--pygments/lexers/c_cpp.py8
-rw-r--r--pygments/lexers/c_like.py26
-rw-r--r--pygments/lexers/capnproto.py12
-rw-r--r--pygments/lexers/chapel.py28
-rw-r--r--pygments/lexers/configs.py105
-rw-r--r--pygments/lexers/csound.py7
-rw-r--r--pygments/lexers/data.py12
-rw-r--r--pygments/lexers/dotnet.py20
-rw-r--r--pygments/lexers/dsls.py6
-rw-r--r--pygments/lexers/dylan.py6
-rw-r--r--pygments/lexers/elm.py2
-rw-r--r--pygments/lexers/erlang.py4
-rw-r--r--pygments/lexers/esoteric.py2
-rw-r--r--pygments/lexers/floscript.py87
-rw-r--r--pygments/lexers/forth.py2
-rw-r--r--pygments/lexers/fortran.py1
-rw-r--r--pygments/lexers/grammar_notation.py2
-rw-r--r--pygments/lexers/graph.py21
-rw-r--r--pygments/lexers/graphics.py120
-rw-r--r--pygments/lexers/haskell.py43
-rw-r--r--pygments/lexers/haxe.py10
-rw-r--r--pygments/lexers/html.py32
-rw-r--r--pygments/lexers/idl.py12
-rw-r--r--pygments/lexers/igor.py361
-rw-r--r--pygments/lexers/inferno.py2
-rw-r--r--pygments/lexers/int_fiction.py2
-rw-r--r--pygments/lexers/iolang.py2
-rw-r--r--pygments/lexers/j.py4
-rw-r--r--pygments/lexers/javascript.py12
-rw-r--r--pygments/lexers/julia.py8
-rw-r--r--pygments/lexers/jvm.py95
-rw-r--r--pygments/lexers/lisp.py24
-rw-r--r--pygments/lexers/make.py4
-rw-r--r--pygments/lexers/markup.py5
-rw-r--r--pygments/lexers/matlab.py4
-rw-r--r--pygments/lexers/ml.py2
-rw-r--r--pygments/lexers/modeling.py34
-rw-r--r--pygments/lexers/objective.py28
-rw-r--r--pygments/lexers/parsers.py12
-rw-r--r--pygments/lexers/pascal.py10
-rw-r--r--pygments/lexers/pawn.py8
-rw-r--r--pygments/lexers/perl.py16
-rw-r--r--pygments/lexers/php.py9
-rw-r--r--pygments/lexers/pony.py94
-rw-r--r--pygments/lexers/prolog.py8
-rw-r--r--pygments/lexers/python.py39
-rw-r--r--pygments/lexers/qvt.py12
-rw-r--r--pygments/lexers/r.py4
-rw-r--r--pygments/lexers/rdf.py15
-rw-r--r--pygments/lexers/rebol.py14
-rw-r--r--pygments/lexers/robotframework.py2
-rw-r--r--pygments/lexers/ruby.py12
-rw-r--r--pygments/lexers/scripting.py6
-rw-r--r--pygments/lexers/sgf.py54
-rw-r--r--pygments/lexers/shell.py59
-rw-r--r--pygments/lexers/slash.py187
-rw-r--r--pygments/lexers/sql.py62
-rw-r--r--pygments/lexers/stata.py143
-rw-r--r--pygments/lexers/templates.py46
-rw-r--r--pygments/lexers/teraterm.py158
-rw-r--r--pygments/lexers/testing.py2
-rw-r--r--pygments/lexers/text.py1
-rw-r--r--pygments/lexers/textfmts.py10
-rw-r--r--pygments/lexers/typoscript.py12
-rw-r--r--pygments/lexers/unicon.py390
-rw-r--r--pygments/lexers/varnish.py4
-rw-r--r--pygments/lexers/webmisc.py10
-rw-r--r--pygments/style.py63
-rw-r--r--pygments/styles/__init__.py6
-rw-r--r--pygments/styles/arduino.py4
-rw-r--r--pygments/styles/paraiso_dark.py2
-rw-r--r--pygments/styles/paraiso_light.py2
-rw-r--r--pygments/styles/solarized.py129
-rw-r--r--pygments/styles/stata_dark.py41
-rw-r--r--pygments/styles/stata_light.py (renamed from pygments/styles/stata.py)27
-rw-r--r--pygments/unistring.py76
-rwxr-xr-xscripts/check_sources.py3
-rwxr-xr-xsetup.py7
-rw-r--r--tests/examplefiles/99_bottles_of_beer.chpl27
-rw-r--r--tests/examplefiles/Charmci.ci20
-rw-r--r--tests/examplefiles/apache2.conf5
-rw-r--r--tests/examplefiles/example.bbc156
-rw-r--r--tests/examplefiles/example.boa18
-rw-r--r--tests/examplefiles/example.flo40
-rw-r--r--tests/examplefiles/example.icn283
-rw-r--r--tests/examplefiles/example.icon381
-rw-r--r--tests/examplefiles/example.md3
-rw-r--r--tests/examplefiles/example.pony18
-rw-r--r--tests/examplefiles/example.sgf35
-rw-r--r--tests/examplefiles/example.sl6
-rw-r--r--tests/examplefiles/example.stan4
-rw-r--r--tests/examplefiles/example.tf36
-rw-r--r--tests/examplefiles/example.toml181
-rw-r--r--tests/examplefiles/example.u1
-rw-r--r--tests/examplefiles/example.u1111
-rw-r--r--tests/examplefiles/example.vbs55
-rw-r--r--tests/examplefiles/teraterm.ttl34
-rw-r--r--tests/run.py8
-rw-r--r--tests/test_basic.py74
-rw-r--r--tests/test_cmdline.py13
-rw-r--r--tests/test_csound.py11
-rw-r--r--tests/test_html_formatter.py14
-rw-r--r--tests/test_kotlin.py131
-rw-r--r--tests/test_python.py20
-rw-r--r--tests/test_r.py4
-rw-r--r--tests/test_rtf_formatter.py2
-rw-r--r--tests/test_sql.py46
-rw-r--r--tests/test_terminal_formatter.py10
135 files changed, 5205 insertions, 883 deletions
diff --git a/AUTHORS b/AUTHORS
index da76dcfd..f7a7acad 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -7,7 +7,8 @@ Other contributors, listed alphabetically, are:
* Sam Aaron -- Ioke lexer
* Ali Afshar -- image formatter
-* Thomas Aglassinger -- Easytrieve, JCL, Rexx and Transact-SQL lexers
+* Thomas Aglassinger -- Easytrieve, JCL, Rexx, Transact-SQL and VBScript
+ lexers
* Muthiah Annamalai -- Ezhil lexer
* Kumar Appaiah -- Debian control lexer
* Andreas Amann -- AppleScript lexer
@@ -31,6 +32,7 @@ Other contributors, listed alphabetically, are:
* 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
@@ -130,6 +132,7 @@ Other contributors, listed alphabetically, are:
* Stephen McKamey -- Duel/JBST lexer
* Brian McKenna -- F# lexer
* Charles McLaughlin -- Puppet lexer
+* Kurt McKee -- Tera Term macro lexer
* Lukas Meuser -- BBCode formatter, Lua lexer
* Cat Miller -- Pig lexer
* Paul Miller -- LiveScript lexer
@@ -187,7 +190,7 @@ Other contributors, listed alphabetically, are:
* Alexander Smishlajev -- Visual FoxPro lexer
* Steve Spigarelli -- XQuery lexer
* Jerome St-Louis -- eC lexer
-* Camil Staps -- Clean and NuSMV lexers
+* Camil Staps -- Clean and NuSMV lexers; Solarized style
* James Strachan -- Kotlin lexer
* Tom Stuart -- Treetop lexer
* Colin Sullivan -- SuperCollider lexer
@@ -218,6 +221,8 @@ Other contributors, listed alphabetically, are:
* 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/CHANGES b/CHANGES
index c82ca1cf..833c2250 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,74 @@ Issue numbers refer to the tracker at
pull request numbers to the requests at
<https://bitbucket.org/birkenfeld/pygments-main/pull-requests/merged>.
+Version 2.4.0
+-------------
+(not released yet)
+
+- Added lexers:
+
+ * Augeas (PR#807)
+ * BBC Basic (PR#806)
+ * Boa (PR#756)
+ * Charm++ CI (PR#788)
+ * DASM16 (PR#807)
+ * FloScript (PR#750)
+ * Hspec (PR#790)
+ * Pony (PR#627)
+ * SGF (PR#780)
+ * Slash (PR#807)
+ * Slurm (PR#760)
+ * Tera Term Language (PR#749)
+ * TOML (PR#807)
+ * Unicon (PR#731)
+ * VBScript (PR#673)
+
+- Updated lexers:
+
+ * Apache2 (PR#766)
+ * Cypher (PR#746)
+ * LLVM (PR#792)
+ * Makefiles (PR#766)
+ * PHP (#1482)
+ * SQL (PR#672)
+ * Stan (PR#774)
+ * Stata (PR#800)
+ * Terraform (PR#787)
+
+- Add solarized style (PR#708)
+- Add support for Markdown reference-style links (PR#753)
+- Change ANSI color names (PR#777)
+- Fix catastrophic backtracking in the bash lexer (#1494)
+- Fix documentation failing to build using Sphinx 2.0 (#1501)
+- Fix incorrect links in the Lisp and R lexer documentation (PR#775)
+- Fix rare unicode errors on Python 2.7 (PR#798, #1492)
+- TypoScript uses ``.typoscript`` now (#1498)
+- Updated Trove classifiers and ``pip`` requirements (PR#799)
+
+Version 2.3.1
+-------------
+(released Dec 16, 2018)
+
+- Updated lexers:
+
+ * ASM (PR#784)
+ * Chapel (PR#735)
+ * Clean (PR#621)
+ * CSound (PR#684)
+ * Elm (PR#744)
+ * Fortran (PR#747)
+ * GLSL (PR#740)
+ * Haskell (PR#745)
+ * Hy (PR#754)
+ * Igor Pro (PR#764)
+ * PowerShell (PR#705)
+ * Python (PR#720, #1299, PR#715)
+ * SLexer (PR#680)
+ * YAML (PR#762, PR#724)
+
+- Fix invalid string escape sequences
+- Fix `FutureWarning` introduced by regex changes in Python 3.7
+
Version 2.3.0
-------------
(released Nov 25, 2018)
diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml
index fc745f0f..4a9f1b6d 100644
--- a/bitbucket-pipelines.yml
+++ b/bitbucket-pipelines.yml
@@ -9,13 +9,13 @@ pipelines:
- pip install -r requirements.txt
- tox -e py27
- step:
- name: Test on Python 3.4
- image: python:3.4
+ name: Test on Python 3.5
+ image: python:3.5
caches:
- pip
script:
- pip install -r requirements.txt
- - tox -e py34
+ - tox -e py35
- step:
name: Test on Python 3.6
image: python:3.6
diff --git a/doc/conf.py b/doc/conf.py
index 51a91617..00db7d9b 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -125,8 +125,8 @@ html_static_path = ['_static']
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
-html_sidebars = {'index': 'indexsidebar.html',
- 'docs/*': 'docssidebar.html'}
+html_sidebars = {'index': ['indexsidebar.html'],
+ 'docs/*': ['docssidebar.html']}
# Additional templates that should be rendered to pages, maps page names to
# template names.
diff --git a/doc/docs/styles.rst b/doc/docs/styles.rst
index 1094a270..570293a5 100644
--- a/doc/docs/styles.rst
+++ b/doc/docs/styles.rst
@@ -153,17 +153,17 @@ Terminal Styles
.. versionadded:: 2.2
Custom styles used with the 256-color terminal formatter can also map colors to
-use the 8 default ANSI colors. To do so, use ``#ansigreen``, ``#ansired`` or
+use the 8 default ANSI colors. To do so, use ``ansigreen``, ``ansibrightred`` or
any other colors defined in :attr:`pygments.style.ansicolors`. Foreground ANSI
colors will be mapped to the corresponding `escape codes 30 to 37
<https://en.wikipedia.org/wiki/ANSI_escape_code#Colors>`_ thus respecting any
custom color mapping and themes provided by many terminal emulators. Light
variants are treated as foreground color with and an added bold flag.
-``bg:#ansi<color>`` will also be respected, except the light variant will be the
+``bg:ansi<color>`` will also be respected, except the light variant will be the
same shade as their dark variant.
See the following example where the color of the string ``"hello world"`` is
-governed by the escape sequence ``\x1b[34;01m`` (Ansi Blue, Bold, 41 being red
+governed by the escape sequence ``\x1b[34;01m`` (Ansi bright blue, Bold, 41 being red
background) instead of an extended foreground & background color.
.. sourcecode:: pycon
@@ -176,7 +176,7 @@ background) instead of an extended foreground & background color.
>>> class MyStyle(Style):
styles = {
- Token.String: '#ansiblue bg:#ansired',
+ Token.String: 'ansibrightblue bg:ansibrightred',
}
>>> code = 'print("Hello World")'
@@ -184,18 +184,49 @@ background) instead of an extended foreground & background color.
>>> print(result.encode())
b'\x1b[34;41;01m"\x1b[39;49;00m\x1b[34;41;01mHello World\x1b[39;49;00m\x1b[34;41;01m"\x1b[39;49;00m'
-Colors specified using ``#ansi*`` are converted to a default set of RGB colors
+Colors specified using ``ansi*`` are converted to a default set of RGB colors
when used with formatters other than the terminal-256 formatter.
By definition of ANSI, the following colors are considered "light" colors, and
will be rendered by most terminals as bold:
-- "darkgray", "red", "green", "yellow", "blue", "fuchsia", "turquoise", "white"
+- "brightblack" (darkgrey), "brightred", "brightgreen", "brightyellow", "brightblue",
+ "brightmagenta", "brightcyan", "white"
The following are considered "dark" colors and will be rendered as non-bold:
-- "black", "darkred", "darkgreen", "brown", "darkblue", "purple", "teal",
- "lightgray"
+- "black", "red", "green", "yellow", "blue", "magenta", "cyan",
+ "gray"
Exact behavior might depends on the terminal emulator you are using, and its
settings.
+
+.. _new-ansi-color-names:
+
+.. versionchanged:: 2.4
+
+The definition of the ANSI color names has changed.
+New names are easier to understand and align to the colors used in other projects.
+
+===================== ====================
+New names Pygments up to 2.3
+===================== ====================
+``ansiblack`` ``#ansiblack``
+``ansired`` ``#ansidarkred``
+``ansigreen`` ``#ansidarkgreen``
+``ansiyellow`` ``#ansibrown``
+``ansiblue`` ``#ansidarkblue``
+``ansimagenta`` ``#ansipurple``
+``ansicyan`` ``#ansiteal``
+``ansigray`` ``#ansilightgray``
+``ansibrightblack`` ``#ansidarkgray``
+``ansibrightred`` ``#ansired``
+``ansibrightgreen`` ``#ansigreen``
+``ansibrightyellow`` ``#ansiyellow``
+``ansibrightblue`` ``#ansiblue``
+``ansibrightmagenta`` ``#ansifuchsia``
+``ansibrightcyan`` ``#ansiturquoise``
+``ansiwhite`` ``#ansiwhite``
+===================== ====================
+
+Old ANSI color names are deprecated but will still work.
diff --git a/doc/languages.rst b/doc/languages.rst
index e5399403..4f3166b5 100644
--- a/doc/languages.rst
+++ b/doc/languages.rst
@@ -14,12 +14,16 @@ Programming languages
* AppleScript
* Assembly (various)
* Asymptote
+* `Augeas <http://augeas.net>`_
* Awk
+* BBC Basic
* Befunge
+* `Boa <http://boa.cs.iastate.edu/docs/index.php>`_
* Boo
* BrainFuck
* C, C++
* C#
+* `Charm++ CI <http://charmplusplus.org/>`_
* Clojure
* CoffeeScript
* ColdFusion
@@ -30,6 +34,7 @@ Programming languages
* `Cython <http://cython.org>`_
* `D <http://dlang.org>`_
* Dart
+* DCPU-16
* Delphi
* Dylan
* `Elm <http://elm-lang.org/>`_
@@ -38,6 +43,7 @@ Programming languages
* Factor
* Fancy
* `Fennel <https://fennel-lang.org/>`_
+* `FloScript <http://ioflo.com/>`_
* Fortran
* F#
* GAP
@@ -46,6 +52,7 @@ Programming languages
* Groovy
* `Haskell <http://www.haskell.org>`_ (incl. Literate Haskell)
* HLSL
+* `HSpec <http://hackage.haskell.org/package/hspec>`_
* IDL
* Io
* Java
@@ -66,7 +73,8 @@ Programming languages
* Octave
* OCaml
* PHP
-* `Perl <http://perl.org>`_
+* `Perl 5 <http://perl.org>`_ and `Perl 6 <https://perl6.org>`_
+* `Pony <https://www.ponylang.io/>`_
* PovRay
* PostScript
* PowerShell
@@ -81,9 +89,14 @@ Programming languages
* Scala
* Scheme
* Scilab
+* `SGF <https://www.red-bean.com/sgf/>`_
+* `Slash <https://github.com/arturadib/Slash-A>`_
+* `Slurm <https://slurm.schedmd.com/overview.html>`_
* Smalltalk
* SNOBOL
* Tcl
+* `Tera Term language <https://ttssh2.osdn.jp/>`_
+* `TOML <https://github.com/toml-lang/toml>`_
* Vala
* Verilog
* VHDL
diff --git a/pygments/__init__.py b/pygments/__init__.py
index 19aafdeb..4dd38fee 100644
--- a/pygments/__init__.py
+++ b/pygments/__init__.py
@@ -29,7 +29,7 @@ import sys
from pygments.util import StringIO, BytesIO
-__version__ = '2.3.0'
+__version__ = '2.3.1'
__docformat__ = 'restructuredtext'
__all__ = ['lex', 'format', 'highlight']
diff --git a/pygments/console.py b/pygments/console.py
index 31b6839d..e61744ce 100644
--- a/pygments/console.py
+++ b/pygments/console.py
@@ -22,10 +22,10 @@ codes["underline"] = esc + "04m"
codes["blink"] = esc + "05m"
codes["overline"] = esc + "06m"
-dark_colors = ["black", "darkred", "darkgreen", "brown", "darkblue",
- "purple", "teal", "lightgray"]
-light_colors = ["darkgray", "red", "green", "yellow", "blue",
- "fuchsia", "turquoise", "white"]
+dark_colors = ["black", "red", "green", "yellow", "blue",
+ "magenta", "cyan", "gray"]
+light_colors = ["brightblack", "brightred", "brightgreen", "brightyellow", "brightblue",
+ "brightmagenta", "brightcyan", "white"]
x = 30
for d, l in zip(dark_colors, light_colors):
@@ -35,9 +35,6 @@ for d, l in zip(dark_colors, light_colors):
del d, l, x
-codes["darkteal"] = codes["turquoise"]
-codes["darkyellow"] = codes["brown"]
-codes["fuscia"] = codes["fuchsia"]
codes["white"] = codes["bold"]
diff --git a/pygments/formatters/__init__.py b/pygments/formatters/__init__.py
index 965c5f1a..457d76ec 100644
--- a/pygments/formatters/__init__.py
+++ b/pygments/formatters/__init__.py
@@ -98,7 +98,8 @@ def load_formatter_from_file(filename, formattername="CustomFormatter",
try:
# This empty dict will contain the namespace for the exec'd file
custom_namespace = {}
- exec(open(filename, 'rb').read(), custom_namespace)
+ with open(filename, 'rb') as f:
+ exec(f.read(), custom_namespace)
# Retrieve the class `formattername` from that namespace
if formattername not in custom_namespace:
raise ClassNotFound('no valid %s class found in %s' %
diff --git a/pygments/formatters/html.py b/pygments/formatters/html.py
index 2969d502..7d7605eb 100644
--- a/pygments/formatters/html.py
+++ b/pygments/formatters/html.py
@@ -535,10 +535,9 @@ class HtmlFormatter(Formatter):
# write CSS file only if noclobber_cssfile isn't given as an option.
try:
if not os.path.exists(cssfilename) or not self.noclobber_cssfile:
- cf = open(cssfilename, "w")
- cf.write(CSSFILE_TEMPLATE %
- {'styledefs': self.get_style_defs('body')})
- cf.close()
+ with open(cssfilename, "w") as cf:
+ cf.write(CSSFILE_TEMPLATE %
+ {'styledefs': self.get_style_defs('body')})
except IOError as err:
err.strerror = 'Error writing CSS file: ' + err.strerror
raise
diff --git a/pygments/formatters/img.py b/pygments/formatters/img.py
index 2fb0dea5..6fafc476 100644
--- a/pygments/formatters/img.py
+++ b/pygments/formatters/img.py
@@ -237,7 +237,7 @@ class ImageFormatter(Formatter):
bold and italic fonts will be generated. This really should be a
monospace font to look sane.
- Default: "Bitstream Vera Sans Mono" on Windows, Courier New on \*nix
+ Default: "Bitstream Vera Sans Mono" on Windows, Courier New on \\*nix
`font_size`
The font size in points to be used.
diff --git a/pygments/formatters/irc.py b/pygments/formatters/irc.py
index eb744d74..d55584f8 100644
--- a/pygments/formatters/irc.py
+++ b/pygments/formatters/irc.py
@@ -25,55 +25,55 @@ __all__ = ['IRCFormatter']
IRC_COLORS = {
Token: ('', ''),
- Whitespace: ('lightgray', 'darkgray'),
- Comment: ('lightgray', 'darkgray'),
- Comment.Preproc: ('teal', 'turquoise'),
- Keyword: ('darkblue', 'blue'),
- Keyword.Type: ('teal', 'turquoise'),
- Operator.Word: ('purple', 'fuchsia'),
- Name.Builtin: ('teal', 'turquoise'),
- Name.Function: ('darkgreen', 'green'),
- Name.Namespace: ('_teal_', '_turquoise_'),
- Name.Class: ('_darkgreen_', '_green_'),
- Name.Exception: ('teal', 'turquoise'),
- Name.Decorator: ('darkgray', 'lightgray'),
- Name.Variable: ('darkred', 'red'),
- Name.Constant: ('darkred', 'red'),
- Name.Attribute: ('teal', 'turquoise'),
- Name.Tag: ('blue', 'blue'),
- String: ('brown', 'brown'),
- Number: ('darkblue', 'blue'),
-
- Generic.Deleted: ('red', 'red'),
- Generic.Inserted: ('darkgreen', 'green'),
+ Whitespace: ('gray', 'brightblack'),
+ Comment: ('gray', 'brightblack'),
+ Comment.Preproc: ('cyan', 'brightcyan'),
+ Keyword: ('blue', 'brightblue'),
+ Keyword.Type: ('cyan', 'brightcyan'),
+ Operator.Word: ('magenta', 'brightcyan'),
+ Name.Builtin: ('cyan', 'brightcyan'),
+ Name.Function: ('green', 'brightgreen'),
+ Name.Namespace: ('_cyan_', '_brightcyan_'),
+ Name.Class: ('_green_', '_brightgreen_'),
+ Name.Exception: ('cyan', 'brightcyan'),
+ Name.Decorator: ('brightblack', 'gray'),
+ Name.Variable: ('red', 'brightred'),
+ Name.Constant: ('red', 'brightred'),
+ Name.Attribute: ('cyan', 'brightcyan'),
+ Name.Tag: ('brightblue', 'brightblue'),
+ String: ('yellow', 'yellow'),
+ Number: ('blue', 'brightblue'),
+
+ Generic.Deleted: ('brightred', 'brightred'),
+ Generic.Inserted: ('green', 'brightgreen'),
Generic.Heading: ('**', '**'),
- Generic.Subheading: ('*purple*', '*fuchsia*'),
- Generic.Error: ('red', 'red'),
+ Generic.Subheading: ('*magenta*', '*brightmagenta*'),
+ Generic.Error: ('brightred', 'brightred'),
- Error: ('_red_', '_red_'),
+ Error: ('_brightred_', '_brightred_'),
}
IRC_COLOR_MAP = {
'white': 0,
'black': 1,
- 'darkblue': 2,
- 'green': 3,
- 'red': 4,
- 'brown': 5,
- 'purple': 6,
+ 'blue': 2,
+ 'brightgreen': 3,
+ 'brightred': 4,
+ 'yellow': 5,
+ 'magenta': 6,
'orange': 7,
- 'darkgreen': 7, #compat w/ ansi
- 'yellow': 8,
+ 'green': 7, #compat w/ ansi
+ 'brightyellow': 8,
'lightgreen': 9,
- 'turquoise': 9, # compat w/ ansi
- 'teal': 10,
+ 'brightcyan': 9, # compat w/ ansi
+ 'cyan': 10,
'lightblue': 11,
- 'darkred': 11, # compat w/ ansi
- 'blue': 12,
- 'fuchsia': 13,
- 'darkgray': 14,
- 'lightgray': 15,
+ 'red': 11, # compat w/ ansi
+ 'brightblue': 12,
+ 'brightmagenta': 13,
+ 'brightblack': 14,
+ 'gray': 15,
}
def ircformat(color, text):
diff --git a/pygments/formatters/terminal.py b/pygments/formatters/terminal.py
index b8fec52e..fcb52d94 100644
--- a/pygments/formatters/terminal.py
+++ b/pygments/formatters/terminal.py
@@ -26,33 +26,33 @@ __all__ = ['TerminalFormatter']
TERMINAL_COLORS = {
Token: ('', ''),
- Whitespace: ('lightgray', 'darkgray'),
- Comment: ('lightgray', 'darkgray'),
- Comment.Preproc: ('teal', 'turquoise'),
- Keyword: ('darkblue', 'blue'),
- Keyword.Type: ('teal', 'turquoise'),
- Operator.Word: ('purple', 'fuchsia'),
- Name.Builtin: ('teal', 'turquoise'),
- Name.Function: ('darkgreen', 'green'),
- Name.Namespace: ('_teal_', '_turquoise_'),
- Name.Class: ('_darkgreen_', '_green_'),
- Name.Exception: ('teal', 'turquoise'),
- Name.Decorator: ('darkgray', 'lightgray'),
- Name.Variable: ('darkred', 'red'),
- Name.Constant: ('darkred', 'red'),
- Name.Attribute: ('teal', 'turquoise'),
- Name.Tag: ('blue', 'blue'),
- String: ('brown', 'brown'),
- Number: ('darkblue', 'blue'),
-
- Generic.Deleted: ('red', 'red'),
- Generic.Inserted: ('darkgreen', 'green'),
+ Whitespace: ('gray', 'brightblack'),
+ Comment: ('gray', 'brightblack'),
+ Comment.Preproc: ('cyan', 'brightcyan'),
+ Keyword: ('blue', 'brightblue'),
+ Keyword.Type: ('cyan', 'brightcyan'),
+ Operator.Word: ('magenta', 'brightmagenta'),
+ Name.Builtin: ('cyan', 'brightcyan'),
+ Name.Function: ('green', 'brightgreen'),
+ Name.Namespace: ('_cyan_', '_brightcyan_'),
+ Name.Class: ('_green_', '_brightgreen_'),
+ Name.Exception: ('cyan', 'brightcyan'),
+ Name.Decorator: ('brightblack', 'gray'),
+ Name.Variable: ('red', 'brightred'),
+ Name.Constant: ('red', 'brightred'),
+ Name.Attribute: ('cyan', 'brightcyan'),
+ Name.Tag: ('brightblue', 'brightblue'),
+ String: ('yellow', 'yellow'),
+ Number: ('blue', 'brightblue'),
+
+ Generic.Deleted: ('brightred', 'brightred'),
+ Generic.Inserted: ('green', 'brightgreen'),
Generic.Heading: ('**', '**'),
- Generic.Subheading: ('*purple*', '*fuchsia*'),
+ Generic.Subheading: ('*magenta*', '*brightmagenta*'),
Generic.Prompt: ('**', '**'),
- Generic.Error: ('red', 'red'),
+ Generic.Error: ('brightred', 'brightred'),
- Error: ('_red_', '_red_'),
+ Error: ('_brightred_', '_brightred_'),
}
diff --git a/pygments/formatters/terminal256.py b/pygments/formatters/terminal256.py
index b80dc7dd..1235e9ed 100644
--- a/pygments/formatters/terminal256.py
+++ b/pygments/formatters/terminal256.py
@@ -50,7 +50,7 @@ class EscapeSequence:
attrs = []
if self.fg is not None:
if self.fg in ansicolors:
- esc = codes[self.fg[5:]]
+ esc = codes[self.fg.replace('ansi','')]
if ';01m' in esc:
self.bold = True
# extract fg color code.
@@ -59,7 +59,7 @@ class EscapeSequence:
attrs.extend(("38", "5", "%i" % self.fg))
if self.bg is not None:
if self.bg in ansicolors:
- esc = codes[self.bg[5:]]
+ esc = codes[self.bg.replace('ansi','')]
# extract fg color code, add 10 for bg.
attrs.append(str(int(esc[2:4])+10))
else:
@@ -110,6 +110,12 @@ class Terminal256Formatter(Formatter):
`Terminal256Formatter` will map these to non extended foreground color.
See :ref:`AnsiTerminalStyle` for more information.
+ .. versionchanged:: 2.4
+ The ANSI color names have been updated with names that are easier to
+ understand and align with colornames of other projects and terminals.
+ See :ref:`this table <new-ansi-color-names>` for more information.
+
+
Options accepted:
`style`
@@ -189,7 +195,7 @@ class Terminal256Formatter(Formatter):
def _color_index(self, color):
index = self.best_match.get(color, None)
if color in ansicolors:
- # strip the `#ansi` part and look up code
+ # strip the `ansi/#ansi` part and look up code
index = color
self.best_match[color] = index
if index is None:
diff --git a/pygments/lexers/__init__.py b/pygments/lexers/__init__.py
index 328e072c..50f39d4e 100644
--- a/pygments/lexers/__init__.py
+++ b/pygments/lexers/__init__.py
@@ -133,7 +133,8 @@ def load_lexer_from_file(filename, lexername="CustomLexer", **options):
try:
# This empty dict will contain the namespace for the exec'd file
custom_namespace = {}
- exec(open(filename, 'rb').read(), custom_namespace)
+ with open(filename, 'rb') as f:
+ exec(f.read(), custom_namespace)
# Retrieve the class `lexername` from that namespace
if lexername not in custom_namespace:
raise ClassNotFound('no valid %s class found in %s' %
diff --git a/pygments/lexers/_cocoa_builtins.py b/pygments/lexers/_cocoa_builtins.py
index 064167ff..f17ea876 100644
--- a/pygments/lexers/_cocoa_builtins.py
+++ b/pygments/lexers/_cocoa_builtins.py
@@ -40,24 +40,25 @@ if __name__ == '__main__': # pragma: no cover
continue
headerFilePath = frameworkHeadersDir + f
- content = open(headerFilePath).read()
- res = re.findall('(?<=@interface )\w+', content)
+ with open(headerFilePath) as f:
+ content = f.read()
+ res = re.findall(r'(?<=@interface )\w+', content)
for r in res:
all_interfaces.add(r)
- res = re.findall('(?<=@protocol )\w+', content)
+ res = re.findall(r'(?<=@protocol )\w+', content)
for r in res:
all_protocols.add(r)
- res = re.findall('(?<=typedef enum )\w+', content)
+ res = re.findall(r'(?<=typedef enum )\w+', content)
for r in res:
all_primitives.add(r)
- res = re.findall('(?<=typedef struct )\w+', content)
+ res = re.findall(r'(?<=typedef struct )\w+', content)
for r in res:
all_primitives.add(r)
- res = re.findall('(?<=typedef const struct )\w+', content)
+ res = re.findall(r'(?<=typedef const struct )\w+', content)
for r in res:
all_primitives.add(r)
diff --git a/pygments/lexers/_mapping.py b/pygments/lexers/_mapping.py
index 5e936412..f974a160 100644
--- a/pygments/lexers/_mapping.py
+++ b/pygments/lexers/_mapping.py
@@ -44,14 +44,16 @@ LEXERS = {
'ArduinoLexer': ('pygments.lexers.c_like', 'Arduino', ('arduino',), ('*.ino',), ('text/x-arduino',)),
'AspectJLexer': ('pygments.lexers.jvm', 'AspectJ', ('aspectj',), ('*.aj',), ('text/x-aspectj',)),
'AsymptoteLexer': ('pygments.lexers.graphics', 'Asymptote', ('asy', 'asymptote'), ('*.asy',), ('text/x-asymptote',)),
+ 'AugeasLexer': ('pygments.lexers.configs', 'Augeas', ('augeas',), ('*.aug',), ()),
'AutoItLexer': ('pygments.lexers.automation', 'AutoIt', ('autoit',), ('*.au3',), ('text/x-autoit',)),
'AutohotkeyLexer': ('pygments.lexers.automation', 'autohotkey', ('ahk', 'autohotkey'), ('*.ahk', '*.ahkl'), ('text/x-autohotkey',)),
'AwkLexer': ('pygments.lexers.textedit', 'Awk', ('awk', 'gawk', 'mawk', 'nawk'), ('*.awk',), ('application/x-awk',)),
+ 'BBCBasicLexer': ('pygments.lexers.basic', 'BBC Basic', ('bbcbasic',), ('*.bbc',), ()),
'BBCodeLexer': ('pygments.lexers.markup', 'BBCode', ('bbcode',), (), ('text/x-bbcode',)),
'BCLexer': ('pygments.lexers.algebra', 'BC', ('bc',), ('*.bc',), ()),
'BSTLexer': ('pygments.lexers.bibtex', 'BST', ('bst', 'bst-pybtex'), ('*.bst',), ()),
'BaseMakefileLexer': ('pygments.lexers.make', 'Base Makefile', ('basemake',), (), ()),
- 'BashLexer': ('pygments.lexers.shell', 'Bash', ('bash', 'sh', 'ksh', 'zsh', 'shell'), ('*.sh', '*.ksh', '*.bash', '*.ebuild', '*.eclass', '*.exheres-0', '*.exlib', '*.zsh', '.bashrc', 'bashrc', '.bash_*', 'bash_*', 'zshrc', '.zshrc', 'PKGBUILD'), ('application/x-sh', 'application/x-shellscript')),
+ 'BashLexer': ('pygments.lexers.shell', 'Bash', ('bash', 'sh', 'ksh', 'zsh', 'shell'), ('*.sh', '*.ksh', '*.bash', '*.ebuild', '*.eclass', '*.exheres-0', '*.exlib', '*.zsh', '.bashrc', 'bashrc', '.bash_*', 'bash_*', 'zshrc', '.zshrc', 'PKGBUILD'), ('application/x-sh', 'application/x-shellscript', 'text/x-shellscript')),
'BashSessionLexer': ('pygments.lexers.shell', 'Bash Session', ('console', 'shell-session'), ('*.sh-session', '*.shell-session'), ('application/x-shell-session', 'application/x-sh-session')),
'BatchLexer': ('pygments.lexers.shell', 'Batchfile', ('bat', 'batch', 'dosbatch', 'winbatch'), ('*.bat', '*.cmd'), ('application/x-dos-batch',)),
'BefungeLexer': ('pygments.lexers.esoteric', 'Befunge', ('befunge',), ('*.befunge',), ('application/x-befunge',)),
@@ -59,6 +61,7 @@ LEXERS = {
'BlitzBasicLexer': ('pygments.lexers.basic', 'BlitzBasic', ('blitzbasic', 'b3d', 'bplus'), ('*.bb', '*.decls'), ('text/x-bb',)),
'BlitzMaxLexer': ('pygments.lexers.basic', 'BlitzMax', ('blitzmax', 'bmax'), ('*.bmx',), ('text/x-bmx',)),
'BnfLexer': ('pygments.lexers.grammar_notation', 'BNF', ('bnf',), ('*.bnf',), ('text/x-bnf',)),
+ 'BoaLexer': ('pygments.lexers.boa', 'Boa', ('boa',), ('*.boa',), ()),
'BooLexer': ('pygments.lexers.dotnet', 'Boo', ('boo',), ('*.boo',), ('text/x-boo',)),
'BoogieLexer': ('pygments.lexers.verification', 'Boogie', ('boogie',), ('*.bpl',), ()),
'BrainfuckLexer': ('pygments.lexers.esoteric', 'Brainfuck', ('brainfuck', 'bf'), ('*.bf', '*.b'), ('application/x-brainfuck',)),
@@ -80,6 +83,7 @@ LEXERS = {
'Cfengine3Lexer': ('pygments.lexers.configs', 'CFEngine3', ('cfengine3', 'cf3'), ('*.cf',), ()),
'ChaiscriptLexer': ('pygments.lexers.scripting', 'ChaiScript', ('chai', 'chaiscript'), ('*.chai',), ('text/x-chaiscript', 'application/x-chaiscript')),
'ChapelLexer': ('pygments.lexers.chapel', 'Chapel', ('chapel', 'chpl'), ('*.chpl',), ()),
+ 'CharmciLexer': ('pygments.lexers.c_like', 'Charmci', ('charmci',), ('*.ci',), ()),
'CheetahHtmlLexer': ('pygments.lexers.templates', 'HTML+Cheetah', ('html+cheetah', 'html+spitfire', 'htmlcheetah'), (), ('text/html+cheetah', 'text/html+spitfire')),
'CheetahJavascriptLexer': ('pygments.lexers.templates', 'JavaScript+Cheetah', ('js+cheetah', 'javascript+cheetah', 'js+spitfire', 'javascript+spitfire'), (), ('application/x-javascript+cheetah', 'text/x-javascript+cheetah', 'text/javascript+cheetah', 'application/x-javascript+spitfire', 'text/x-javascript+spitfire', 'text/javascript+spitfire')),
'CheetahLexer': ('pygments.lexers.templates', 'Cheetah', ('cheetah', 'spitfire'), ('*.tmpl', '*.spt'), ('application/x-cheetah', 'application/x-spitfire')),
@@ -105,7 +109,7 @@ LEXERS = {
'CryptolLexer': ('pygments.lexers.haskell', 'Cryptol', ('cryptol', 'cry'), ('*.cry',), ('text/x-cryptol',)),
'CrystalLexer': ('pygments.lexers.crystal', 'Crystal', ('cr', 'crystal'), ('*.cr',), ('text/x-crystal',)),
'CsoundDocumentLexer': ('pygments.lexers.csound', 'Csound Document', ('csound-document', 'csound-csd'), ('*.csd',), ()),
- 'CsoundOrchestraLexer': ('pygments.lexers.csound', 'Csound Orchestra', ('csound', 'csound-orc'), ('*.orc',), ()),
+ 'CsoundOrchestraLexer': ('pygments.lexers.csound', 'Csound Orchestra', ('csound', 'csound-orc'), ('*.orc', '*.udo'), ()),
'CsoundScoreLexer': ('pygments.lexers.csound', 'Csound Score', ('csound-score', 'csound-sco'), ('*.sco',), ()),
'CssDjangoLexer': ('pygments.lexers.templates', 'CSS+Django/Jinja', ('css+django', 'css+jinja'), (), ('text/css+django', 'text/css+jinja')),
'CssErbLexer': ('pygments.lexers.templates', 'CSS+Ruby', ('css+erb', 'css+ruby'), (), ('text/css+ruby',)),
@@ -120,6 +124,7 @@ LEXERS = {
'DObjdumpLexer': ('pygments.lexers.asm', 'd-objdump', ('d-objdump',), ('*.d-objdump',), ('text/x-d-objdump',)),
'DarcsPatchLexer': ('pygments.lexers.diff', 'Darcs Patch', ('dpatch',), ('*.dpatch', '*.darcspatch'), ()),
'DartLexer': ('pygments.lexers.javascript', 'Dart', ('dart',), ('*.dart',), ('text/x-dart',)),
+ 'Dasm16Lexer': ('pygments.lexers.asm', 'DASM16', ('dasm16',), ('*.dasm16', '*.dasm'), ('text/x-dasm16',)),
'DebianControlLexer': ('pygments.lexers.installers', 'Debian Control file', ('control', 'debcontrol'), ('control',), ()),
'DelphiLexer': ('pygments.lexers.pascal', 'Delphi', ('delphi', 'pas', 'pascal', 'objectpascal'), ('*.pas', '*.dpr'), ('text/x-pascal',)),
'DgLexer': ('pygments.lexers.python', 'dg', ('dg',), ('*.dg',), ('text/x-dg',)),
@@ -156,6 +161,7 @@ LEXERS = {
'FennelLexer': ('pygments.lexers.lisp', 'Fennel', ('fennel', 'fnl'), ('*.fnl',), ()),
'FishShellLexer': ('pygments.lexers.shell', 'Fish', ('fish', 'fishshell'), ('*.fish', '*.load'), ('application/x-fish',)),
'FlatlineLexer': ('pygments.lexers.dsls', 'Flatline', ('flatline',), (), ('text/x-flatline',)),
+ 'FloScriptLexer': ('pygments.lexers.floscript', 'FloScript', ('floscript', 'flo'), ('*.flo',), ()),
'ForthLexer': ('pygments.lexers.forth', 'Forth', ('forth',), ('*.frt', '*.fs'), ('application/x-forth',)),
'FortranFixedLexer': ('pygments.lexers.fortran', 'FortranFixed', ('fortranfixed',), ('*.f', '*.F'), ()),
'FortranLexer': ('pygments.lexers.fortran', 'Fortran', ('fortran',), ('*.f03', '*.f90', '*.F03', '*.F90'), ('text/x-fortran',)),
@@ -184,6 +190,7 @@ LEXERS = {
'HaxeLexer': ('pygments.lexers.haxe', 'Haxe', ('hx', 'haxe', 'hxsl'), ('*.hx', '*.hxsl'), ('text/haxe', 'text/x-haxe', 'text/x-hx')),
'HexdumpLexer': ('pygments.lexers.hexdump', 'Hexdump', ('hexdump',), (), ()),
'HsailLexer': ('pygments.lexers.asm', 'HSAIL', ('hsail', 'hsa'), ('*.hsail',), ('text/x-hsail',)),
+ 'HspecLexer': ('pygments.lexers.haskell', 'Hspec', ('hspec',), (), ()),
'HtmlDjangoLexer': ('pygments.lexers.templates', 'HTML+Django/Jinja', ('html+django', 'html+jinja', 'htmldjango'), (), ('text/html+django', 'text/html+jinja')),
'HtmlGenshiLexer': ('pygments.lexers.templates', 'HTML+Genshi', ('html+genshi', 'html+kid'), (), ('text/html+genshi',)),
'HtmlLexer': ('pygments.lexers.html', 'HTML', ('html',), ('*.html', '*.htm', '*.xhtml', '*.xslt'), ('text/html', 'application/xhtml+xml')),
@@ -194,6 +201,7 @@ LEXERS = {
'HyLexer': ('pygments.lexers.lisp', 'Hy', ('hylang',), ('*.hy',), ('text/x-hy', 'application/x-hy')),
'HybrisLexer': ('pygments.lexers.scripting', 'Hybris', ('hybris', 'hy'), ('*.hy', '*.hyb'), ('text/x-hybris', 'application/x-hybris')),
'IDLLexer': ('pygments.lexers.idl', 'IDL', ('idl',), ('*.pro',), ('text/idl',)),
+ 'IconLexer': ('pygments.lexers.unicon', 'Icon', ('icon',), ('*.icon', '*.ICON'), ()),
'IdrisLexer': ('pygments.lexers.haskell', 'Idris', ('idris', 'idr'), ('*.idr',), ('text/x-idris',)),
'IgorLexer': ('pygments.lexers.igor', 'Igor', ('igor', 'igorpro'), ('*.ipf',), ('text/ipf',)),
'Inform6Lexer': ('pygments.lexers.int_fiction', 'Inform 6', ('inform6', 'i6'), ('*.inf',), ()),
@@ -319,6 +327,7 @@ LEXERS = {
'PikeLexer': ('pygments.lexers.c_like', 'Pike', ('pike',), ('*.pike', '*.pmod'), ('text/x-pike',)),
'PkgConfigLexer': ('pygments.lexers.configs', 'PkgConfig', ('pkgconfig',), ('*.pc',), ()),
'PlPgsqlLexer': ('pygments.lexers.sql', 'PL/pgSQL', ('plpgsql',), (), ('text/x-plpgsql',)),
+ 'PonyLexer': ('pygments.lexers.pony', 'Pony', ('pony',), ('*.pony',), ()),
'PostScriptLexer': ('pygments.lexers.graphics', 'PostScript', ('postscript', 'postscr'), ('*.ps', '*.eps'), ('application/postscript',)),
'PostgresConsoleLexer': ('pygments.lexers.sql', 'PostgreSQL console (psql)', ('psql', 'postgresql-console', 'postgres-console'), (), ('text/x-postgresql-psql',)),
'PostgresLexer': ('pygments.lexers.sql', 'PostgreSQL SQL dialect', ('postgresql', 'postgres'), (), ('text/x-postgresql',)),
@@ -374,6 +383,7 @@ LEXERS = {
'SASLexer': ('pygments.lexers.sas', 'SAS', ('sas',), ('*.SAS', '*.sas'), ('text/x-sas', 'text/sas', 'application/x-sas')),
'SLexer': ('pygments.lexers.r', 'S', ('splus', 's', 'r'), ('*.S', '*.R', '.Rhistory', '.Rprofile', '.Renviron'), ('text/S-plus', 'text/S', 'text/x-r-source', 'text/x-r', 'text/x-R', 'text/x-r-history', 'text/x-r-profile')),
'SMLLexer': ('pygments.lexers.ml', 'Standard ML', ('sml',), ('*.sml', '*.sig', '*.fun'), ('text/x-standardml', 'application/x-standardml')),
+ 'SarlLexer': ('pygments.lexers.jvm', 'SARL', ('sarl',), ('*.sarl',), ('text/x-sarl',)),
'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',)),
@@ -382,9 +392,12 @@ LEXERS = {
'ScssLexer': ('pygments.lexers.css', 'SCSS', ('scss',), ('*.scss',), ('text/x-scss',)),
'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',), ()),
'SlimLexer': ('pygments.lexers.webmisc', 'Slim', ('slim',), ('*.slim',), ('text/x-slim',)),
+ 'SlurmBashLexer': ('pygments.lexers.shell', 'Slurm', ('slurm', 'sbatch'), ('*.sl',), ()),
'SmaliLexer': ('pygments.lexers.dalvik', 'Smali', ('smali',), ('*.smali',), ('text/smali',)),
'SmalltalkLexer': ('pygments.lexers.smalltalk', 'Smalltalk', ('smalltalk', 'squeak', 'st'), ('*.st',), ('text/x-smalltalk',)),
+ 'SmartGameFormatLexer': ('pygments.lexers.sgf', 'SmartGameFormat', ('sgf',), ('*.sgf',), ()),
'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',), ()),
@@ -402,12 +415,14 @@ LEXERS = {
'SwigLexer': ('pygments.lexers.c_like', 'SWIG', ('swig',), ('*.swg', '*.i'), ('text/swig',)),
'SystemVerilogLexer': ('pygments.lexers.hdl', 'systemverilog', ('systemverilog', 'sv'), ('*.sv', '*.svh'), ('text/x-systemverilog',)),
'TAPLexer': ('pygments.lexers.testing', 'TAP', ('tap',), ('*.tap',), ()),
+ 'TOMLLexer': ('pygments.lexers.configs', 'TOML', ('toml',), ('*.toml',), ()),
'Tads3Lexer': ('pygments.lexers.int_fiction', 'TADS 3', ('tads3',), ('*.t',), ()),
'TasmLexer': ('pygments.lexers.asm', 'TASM', ('tasm',), ('*.asm', '*.ASM', '*.tasm'), ('text/x-tasm',)),
'TclLexer': ('pygments.lexers.tcl', 'Tcl', ('tcl',), ('*.tcl', '*.rvt'), ('text/x-tcl', 'text/x-script.tcl', 'application/x-tcl')),
'TcshLexer': ('pygments.lexers.shell', 'Tcsh', ('tcsh', 'csh'), ('*.tcsh', '*.csh'), ('application/x-csh',)),
'TcshSessionLexer': ('pygments.lexers.shell', 'Tcsh Session', ('tcshcon',), (), ()),
'TeaTemplateLexer': ('pygments.lexers.templates', 'Tea', ('tea',), ('*.tea',), ('text/x-tea',)),
+ 'TeraTermLexer': ('pygments.lexers.teraterm', 'Tera Term macro', ('ttl', 'teraterm', 'teratermmacro'), ('*.ttl',), ('text/x-teratermmacro',)),
'TermcapLexer': ('pygments.lexers.configs', 'Termcap', ('termcap',), ('termcap', 'termcap.src'), ()),
'TerminfoLexer': ('pygments.lexers.configs', 'Terminfo', ('terminfo',), ('terminfo', 'terminfo.src'), ()),
'TerraformLexer': ('pygments.lexers.configs', 'Terraform', ('terraform', 'tf'), ('*.tf',), ('application/x-tf', 'application/x-terraform')),
@@ -423,8 +438,11 @@ LEXERS = {
'TypeScriptLexer': ('pygments.lexers.javascript', 'TypeScript', ('ts', 'typescript'), ('*.ts', '*.tsx'), ('text/x-typescript',)),
'TypoScriptCssDataLexer': ('pygments.lexers.typoscript', 'TypoScriptCssData', ('typoscriptcssdata',), (), ()),
'TypoScriptHtmlDataLexer': ('pygments.lexers.typoscript', 'TypoScriptHtmlData', ('typoscripthtmldata',), (), ()),
- 'TypoScriptLexer': ('pygments.lexers.typoscript', 'TypoScript', ('typoscript',), ('*.ts', '*.txt'), ('text/x-typoscript',)),
+ 'TypoScriptLexer': ('pygments.lexers.typoscript', 'TypoScript', ('typoscript',), ('*.typoscript',), ('text/x-typoscript',)),
+ 'UcodeLexer': ('pygments.lexers.unicon', 'ucode', ('ucode',), ('*.u', '*.u1', '*.u2'), ()),
+ 'UniconLexer': ('pygments.lexers.unicon', 'Unicon', ('unicon',), ('*.icn',), ('text/unicon',)),
'UrbiscriptLexer': ('pygments.lexers.urbi', 'UrbiScript', ('urbiscript',), ('*.u',), ('application/x-urbiscript',)),
+ 'VBScriptLexer': ('pygments.lexers.basic', 'VBScript', (), ('*.vbs', '*.VBS'), ()),
'VCLLexer': ('pygments.lexers.varnish', 'VCL', ('vcl',), ('*.vcl',), ('text/x-vclsrc',)),
'VCLSnippetLexer': ('pygments.lexers.varnish', 'VCLSnippets', ('vclsnippets', 'vclsnippet'), (), ('text/x-vclsnippet',)),
'VCTreeStatusLexer': ('pygments.lexers.console', 'VCTreeStatus', ('vctreestatus',), (), ()),
diff --git a/pygments/lexers/_php_builtins.py b/pygments/lexers/_php_builtins.py
index fec3286a..c6084003 100644
--- a/pygments/lexers/_php_builtins.py
+++ b/pygments/lexers/_php_builtins.py
@@ -4688,7 +4688,7 @@ if __name__ == '__main__': # pragma: no cover
PHP_MANUAL_URL = 'http://us3.php.net/distributions/manual/php_manual_en.tar.gz'
PHP_MANUAL_DIR = './php-chunked-xhtml/'
PHP_REFERENCE_GLOB = 'ref.*'
- PHP_FUNCTION_RE = '<a href="function\..*?\.html">(.*?)</a>'
+ PHP_FUNCTION_RE = r'<a href="function\..*?\.html">(.*?)</a>'
PHP_MODULE_RE = '<title>(.*?) Functions</title>'
def get_php_functions():
@@ -4698,18 +4698,19 @@ if __name__ == '__main__': # pragma: no cover
for file in get_php_references():
module = ''
- for line in open(file):
- if not module:
- search = module_re.search(line)
- if search:
- module = search.group(1)
- modules[module] = []
+ with open(file) as f:
+ for line in f:
+ if not module:
+ search = module_re.search(line)
+ if search:
+ module = search.group(1)
+ modules[module] = []
- elif 'href="function.' in line:
- for match in function_re.finditer(line):
- fn = match.group(1)
- if '-&gt;' not in fn and '::' not in fn and fn not in modules[module]:
- modules[module].append(fn)
+ elif 'href="function.' in line:
+ for match in function_re.finditer(line):
+ fn = match.group(1)
+ if '-&gt;' not in fn and '::' not in fn and fn not in modules[module]:
+ modules[module].append(fn)
if module:
# These are dummy manual pages, not actual functions
@@ -4726,9 +4727,8 @@ if __name__ == '__main__': # pragma: no cover
def get_php_references():
download = urlretrieve(PHP_MANUAL_URL)
- tar = tarfile.open(download[0])
- tar.extractall()
- tar.close()
+ with tarfile.open(download[0]) as tar:
+ tar.extractall()
for file in glob.glob("%s%s" % (PHP_MANUAL_DIR, PHP_REFERENCE_GLOB)):
yield file
os.remove(download[0])
diff --git a/pygments/lexers/_stan_builtins.py b/pygments/lexers/_stan_builtins.py
index a189647a..7f1e0ce3 100644
--- a/pygments/lexers/_stan_builtins.py
+++ b/pygments/lexers/_stan_builtins.py
@@ -4,24 +4,23 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This file contains the names of functions for Stan used by
- ``pygments.lexers.math.StanLexer. This is for Stan language version 2.8.0.
+ ``pygments.lexers.math.StanLexer. This is for Stan language version 2.17.0.
- :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2018 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
KEYWORDS = (
+ 'break',
+ 'continue',
'else',
'for',
'if',
'in',
- 'increment_log_prob',
- 'integrate_ode',
- 'lp__',
'print',
'reject',
'return',
- 'while'
+ 'while',
)
TYPES = (
@@ -35,18 +34,18 @@ TYPES = (
'positive_ordered',
'real',
'row_vector',
- 'row_vectormatrix',
'simplex',
'unit_vector',
'vector',
- 'void')
+ 'void',
+)
FUNCTIONS = (
- 'Phi',
- 'Phi_approx',
'abs',
'acos',
'acosh',
+ 'algebra_solver',
+ 'append_array',
'append_col',
'append_row',
'asin',
@@ -54,55 +53,59 @@ FUNCTIONS = (
'atan',
'atan2',
'atanh',
- 'bernoulli_ccdf_log',
'bernoulli_cdf',
- 'bernoulli_cdf_log',
- 'bernoulli_log',
- 'bernoulli_logit_log',
+ 'bernoulli_lccdf',
+ 'bernoulli_lcdf',
+ 'bernoulli_logit_lpmf',
+ 'bernoulli_logit_rng',
+ 'bernoulli_lpmf',
'bernoulli_rng',
'bessel_first_kind',
'bessel_second_kind',
- 'beta_binomial_ccdf_log',
'beta_binomial_cdf',
- 'beta_binomial_cdf_log',
- 'beta_binomial_log',
+ 'beta_binomial_lccdf',
+ 'beta_binomial_lcdf',
+ 'beta_binomial_lpmf',
'beta_binomial_rng',
- 'beta_ccdf_log',
'beta_cdf',
- 'beta_cdf_log',
- 'beta_log',
+ 'beta_lccdf',
+ 'beta_lcdf',
+ 'beta_lpdf',
'beta_rng',
'binary_log_loss',
- 'binomial_ccdf_log',
'binomial_cdf',
- 'binomial_cdf_log',
'binomial_coefficient_log',
- 'binomial_log',
- 'binomial_logit_log',
+ 'binomial_lccdf',
+ 'binomial_lcdf',
+ 'binomial_logit_lpmf',
+ 'binomial_lpmf',
'binomial_rng',
'block',
- 'categorical_log',
- 'categorical_logit_log',
+ 'categorical_logit_lpmf',
+ 'categorical_logit_rng',
+ 'categorical_lpmf',
'categorical_rng',
- 'cauchy_ccdf_log',
'cauchy_cdf',
- 'cauchy_cdf_log',
- 'cauchy_log',
+ 'cauchy_lccdf',
+ 'cauchy_lcdf',
+ 'cauchy_lpdf',
'cauchy_rng',
'cbrt',
'ceil',
- 'chi_square_ccdf_log',
'chi_square_cdf',
- 'chi_square_cdf_log',
- 'chi_square_log',
+ 'chi_square_lccdf',
+ 'chi_square_lcdf',
+ 'chi_square_lpdf',
'chi_square_rng',
'cholesky_decompose',
+ 'choose',
'col',
'cols',
'columns_dot_product',
'columns_dot_self',
'cos',
'cosh',
+ 'cov_exp_quad',
'crossprod',
'csr_extract_u',
'csr_extract_v',
@@ -117,15 +120,15 @@ FUNCTIONS = (
'diagonal',
'digamma',
'dims',
- 'dirichlet_log',
+ 'dirichlet_lpdf',
'dirichlet_rng',
'distance',
'dot_product',
'dot_self',
- 'double_exponential_ccdf_log',
'double_exponential_cdf',
- 'double_exponential_cdf_log',
- 'double_exponential_log',
+ 'double_exponential_lccdf',
+ 'double_exponential_lcdf',
+ 'double_exponential_lpdf',
'double_exponential_rng',
'e',
'eigenvalues_sym',
@@ -134,16 +137,16 @@ FUNCTIONS = (
'erfc',
'exp',
'exp2',
- 'exp_mod_normal_ccdf_log',
'exp_mod_normal_cdf',
- 'exp_mod_normal_cdf_log',
- 'exp_mod_normal_log',
+ 'exp_mod_normal_lccdf',
+ 'exp_mod_normal_lcdf',
+ 'exp_mod_normal_lpdf',
'exp_mod_normal_rng',
'expm1',
- 'exponential_ccdf_log',
'exponential_cdf',
- 'exponential_cdf_log',
- 'exponential_log',
+ 'exponential_lccdf',
+ 'exponential_lcdf',
+ 'exponential_lpdf',
'exponential_rng',
'fabs',
'falling_factorial',
@@ -153,60 +156,65 @@ FUNCTIONS = (
'fmax',
'fmin',
'fmod',
- 'frechet_ccdf_log',
'frechet_cdf',
- 'frechet_cdf_log',
- 'frechet_log',
+ 'frechet_lccdf',
+ 'frechet_lcdf',
+ 'frechet_lpdf',
'frechet_rng',
- 'gamma_ccdf_log',
'gamma_cdf',
- 'gamma_cdf_log',
- 'gamma_log',
+ 'gamma_lccdf',
+ 'gamma_lcdf',
+ 'gamma_lpdf',
'gamma_p',
'gamma_q',
'gamma_rng',
- 'gaussian_dlm_obs_log',
+ 'gaussian_dlm_obs_lpdf',
'get_lp',
- 'gumbel_ccdf_log',
'gumbel_cdf',
- 'gumbel_cdf_log',
- 'gumbel_log',
+ 'gumbel_lccdf',
+ 'gumbel_lcdf',
+ 'gumbel_lpdf',
'gumbel_rng',
'head',
- 'hypergeometric_log',
+ 'hypergeometric_lpmf',
'hypergeometric_rng',
'hypot',
- 'if_else',
+ 'inc_beta',
'int_step',
+ 'integrate_ode',
+ 'integrate_ode_bdf',
+ 'integrate_ode_rk45',
'inv',
- 'inv_chi_square_ccdf_log',
'inv_chi_square_cdf',
- 'inv_chi_square_cdf_log',
- 'inv_chi_square_log',
+ 'inv_chi_square_lccdf',
+ 'inv_chi_square_lcdf',
+ 'inv_chi_square_lpdf',
'inv_chi_square_rng',
'inv_cloglog',
- 'inv_gamma_ccdf_log',
'inv_gamma_cdf',
- 'inv_gamma_cdf_log',
- 'inv_gamma_log',
+ 'inv_gamma_lccdf',
+ 'inv_gamma_lcdf',
+ 'inv_gamma_lpdf',
'inv_gamma_rng',
'inv_logit',
- 'inv_phi',
+ 'inv_Phi',
'inv_sqrt',
'inv_square',
- 'inv_wishart_log',
+ 'inv_wishart_lpdf',
'inv_wishart_rng',
'inverse',
'inverse_spd',
'is_inf',
'is_nan',
'lbeta',
+ 'lchoose',
'lgamma',
- 'lkj_corr_cholesky_log',
+ 'lkj_corr_cholesky_lpdf',
'lkj_corr_cholesky_rng',
- 'lkj_corr_log',
+ 'lkj_corr_lpdf',
'lkj_corr_rng',
'lmgamma',
+ 'lmultiply',
'log',
'log10',
'log1m',
@@ -223,81 +231,87 @@ FUNCTIONS = (
'log_rising_factorial',
'log_softmax',
'log_sum_exp',
- 'logistic_ccdf_log',
'logistic_cdf',
- 'logistic_cdf_log',
- 'logistic_log',
+ 'logistic_lccdf',
+ 'logistic_lcdf',
+ 'logistic_lpdf',
'logistic_rng',
'logit',
- 'lognormal_ccdf_log',
'lognormal_cdf',
- 'lognormal_cdf_log',
- 'lognormal_log',
+ 'lognormal_lccdf',
+ 'lognormal_lcdf',
+ 'lognormal_lpdf',
'lognormal_rng',
'machine_precision',
+ 'matrix_exp',
'max',
+ 'mdivide_left_spd',
'mdivide_left_tri_low',
+ 'mdivide_right_spd',
'mdivide_right_tri_low',
'mean',
'min',
'modified_bessel_first_kind',
'modified_bessel_second_kind',
- 'multi_gp_cholesky_log',
- 'multi_gp_log',
- 'multi_normal_cholesky_log',
+ 'multi_gp_cholesky_lpdf',
+ 'multi_gp_lpdf',
+ 'multi_normal_cholesky_lpdf',
'multi_normal_cholesky_rng',
- 'multi_normal_log',
- 'multi_normal_prec_log',
+ 'multi_normal_lpdf',
+ 'multi_normal_prec_lpdf',
'multi_normal_rng',
- 'multi_student_t_log',
+ 'multi_student_t_lpdf',
'multi_student_t_rng',
- 'multinomial_log',
+ 'multinomial_lpmf',
'multinomial_rng',
'multiply_log',
'multiply_lower_tri_self_transpose',
- 'neg_binomial_2_ccdf_log',
'neg_binomial_2_cdf',
- 'neg_binomial_2_cdf_log',
- 'neg_binomial_2_log',
- 'neg_binomial_2_log_log',
+ 'neg_binomial_2_lccdf',
+ 'neg_binomial_2_lcdf',
+ 'neg_binomial_2_log_lpmf',
'neg_binomial_2_log_rng',
+ 'neg_binomial_2_lpmf',
'neg_binomial_2_rng',
- 'neg_binomial_ccdf_log',
'neg_binomial_cdf',
- 'neg_binomial_cdf_log',
- 'neg_binomial_log',
+ 'neg_binomial_lccdf',
+ 'neg_binomial_lcdf',
+ 'neg_binomial_lpmf',
'neg_binomial_rng',
'negative_infinity',
- 'normal_ccdf_log',
'normal_cdf',
- 'normal_cdf_log',
- 'normal_log',
+ 'normal_lccdf',
+ 'normal_lcdf',
+ 'normal_lpdf',
'normal_rng',
'not_a_number',
'num_elements',
- 'ordered_logistic_log',
+ 'ordered_logistic_lpmf',
'ordered_logistic_rng',
'owens_t',
- 'pareto_ccdf_log',
'pareto_cdf',
- 'pareto_cdf_log',
- 'pareto_log',
+ 'pareto_lccdf',
+ 'pareto_lcdf',
+ 'pareto_lpdf',
'pareto_rng',
- 'pareto_type_2_ccdf_log',
'pareto_type_2_cdf',
- 'pareto_type_2_cdf_log',
- 'pareto_type_2_log',
+ 'pareto_type_2_lccdf',
+ 'pareto_type_2_lcdf',
+ 'pareto_type_2_lpdf',
'pareto_type_2_rng',
+ 'Phi',
+ 'Phi_approx',
'pi',
- 'poisson_ccdf_log',
'poisson_cdf',
- 'poisson_cdf_log',
- 'poisson_log',
- 'poisson_log_log',
+ 'poisson_lccdf',
+ 'poisson_lcdf',
+ 'poisson_log_lpmf',
'poisson_log_rng',
+ 'poisson_lpmf',
'poisson_rng',
'positive_infinity',
'pow',
+ 'print',
'prod',
'qr_Q',
'qr_R',
@@ -305,11 +319,12 @@ FUNCTIONS = (
'quad_form_diag',
'quad_form_sym',
'rank',
- 'rayleigh_ccdf_log',
'rayleigh_cdf',
- 'rayleigh_cdf_log',
- 'rayleigh_log',
+ 'rayleigh_lccdf',
+ 'rayleigh_lcdf',
+ 'rayleigh_lpdf',
'rayleigh_rng',
+ 'reject',
'rep_array',
'rep_matrix',
'rep_row_vector',
@@ -320,10 +335,10 @@ FUNCTIONS = (
'rows',
'rows_dot_product',
'rows_dot_self',
- 'scaled_inv_chi_square_ccdf_log',
'scaled_inv_chi_square_cdf',
- 'scaled_inv_chi_square_cdf_log',
- 'scaled_inv_chi_square_log',
+ 'scaled_inv_chi_square_lccdf',
+ 'scaled_inv_chi_square_lcdf',
+ 'scaled_inv_chi_square_lpdf',
'scaled_inv_chi_square_rng',
'sd',
'segment',
@@ -331,10 +346,10 @@ FUNCTIONS = (
'singular_values',
'sinh',
'size',
- 'skew_normal_ccdf_log',
'skew_normal_cdf',
- 'skew_normal_cdf_log',
- 'skew_normal_log',
+ 'skew_normal_lccdf',
+ 'skew_normal_lcdf',
+ 'skew_normal_lpdf',
'skew_normal_rng',
'softmax',
'sort_asc',
@@ -346,10 +361,10 @@ FUNCTIONS = (
'square',
'squared_distance',
'step',
- 'student_t_ccdf_log',
'student_t_cdf',
- 'student_t_cdf_log',
- 'student_t_log',
+ 'student_t_lccdf',
+ 'student_t_lcdf',
+ 'student_t_lpdf',
'student_t_rng',
'sub_col',
'sub_row',
@@ -357,6 +372,7 @@ FUNCTIONS = (
'tail',
'tan',
'tanh',
+ 'target',
'tcrossprod',
'tgamma',
'to_array_1d',
@@ -369,22 +385,22 @@ FUNCTIONS = (
'trace_quad_form',
'trigamma',
'trunc',
- 'uniform_ccdf_log',
'uniform_cdf',
- 'uniform_cdf_log',
- 'uniform_log',
+ 'uniform_lccdf',
+ 'uniform_lcdf',
+ 'uniform_lpdf',
'uniform_rng',
'variance',
- 'von_mises_log',
+ 'von_mises_lpdf',
'von_mises_rng',
- 'weibull_ccdf_log',
'weibull_cdf',
- 'weibull_cdf_log',
- 'weibull_log',
+ 'weibull_lccdf',
+ 'weibull_lcdf',
+ 'weibull_lpdf',
'weibull_rng',
- 'wiener_log',
- 'wishart_log',
- 'wishart_rng'
+ 'wiener_lpdf',
+ 'wishart_lpdf',
+ 'wishart_rng',
)
DISTRIBUTIONS = (
@@ -438,7 +454,7 @@ DISTRIBUTIONS = (
'von_mises',
'weibull',
'wiener',
- 'wishart'
+ 'wishart',
)
RESERVED = (
@@ -469,19 +485,23 @@ RESERVED = (
'do',
'double',
'dynamic_cast',
+ 'else',
'enum',
'explicit',
'export',
'extern',
'false',
- 'false',
'float',
+ 'for',
'friend',
'fvar',
'goto',
+ 'if',
+ 'in',
'inline',
'int',
'long',
+ 'lp__',
'mutable',
'namespace',
'new',
@@ -498,9 +518,16 @@ RESERVED = (
'register',
'reinterpret_cast',
'repeat',
+ 'return',
'short',
'signed',
'sizeof',
+ 'STAN_MAJOR',
+ 'STAN_MATH_MAJOR',
+ 'STAN_MATH_MINOR',
+ 'STAN_MATH_PATCH',
+ 'STAN_MINOR',
+ 'STAN_PATCH',
'static',
'static_assert',
'static_cast',
@@ -512,7 +539,6 @@ RESERVED = (
'thread_local',
'throw',
'true',
- 'true',
'try',
'typedef',
'typeid',
@@ -526,7 +552,7 @@ RESERVED = (
'void',
'volatile',
'wchar_t',
+ 'while',
'xor',
- 'xor_eq'
+ 'xor_eq',
)
-
diff --git a/pygments/lexers/_stata_builtins.py b/pygments/lexers/_stata_builtins.py
index 5f5f72a9..3e5e75b2 100644
--- a/pygments/lexers/_stata_builtins.py
+++ b/pygments/lexers/_stata_builtins.py
@@ -10,6 +10,10 @@
"""
+builtins_special = (
+ "if", "in", "using", "replace", "by", "gen", "generate"
+)
+
builtins_base = (
"if", "else", "in", "foreach", "for", "forv", "forva",
"forval", "forvalu", "forvalue", "forvalues", "by", "bys",
@@ -66,7 +70,7 @@ builtins_base = (
"doedit", "dotplot", "dotplot_7", "dprobit", "drawnorm",
"drop", "ds", "ds_util", "dstdize", "duplicates", "durbina",
"dwstat", "dydx", "e", "ed", "edi", "edit", "egen",
- "eivreg", "emdef", "en", "enc", "enco", "encod", "encode",
+ "eivreg", "emdef", "end", "en", "enc", "enco", "encod", "encode",
"eq", "erase", "ereg", "ereg_lf", "ereg_p", "ereg_sw",
"ereghet", "ereghet_glf", "ereghet_glf_sh", "ereghet_gp",
"ereghet_ilf", "ereghet_ilf_sh", "ereghet_ip", "eret",
@@ -415,5 +419,3 @@ builtins_functions = (
"weekly", "wofd", "word", "wordcount", "year", "yearly",
"yh", "ym", "yofd", "yq", "yw"
)
-
-
diff --git a/pygments/lexers/_vbscript_builtins.py b/pygments/lexers/_vbscript_builtins.py
new file mode 100644
index 00000000..7d514790
--- /dev/null
+++ b/pygments/lexers/_vbscript_builtins.py
@@ -0,0 +1,279 @@
+# -*- coding: utf-8 -*-
+"""
+ pygments.lexers._vbscript_builtins
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ These are manually translated lists from
+ http://www.indusoft.com/pdf/VBScript%20Reference.pdf.
+
+ :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+KEYWORDS = [
+ 'ByRef',
+ 'ByVal',
+ # dim: special rule
+ 'call',
+ 'case',
+ 'class',
+ # const: special rule
+ 'do',
+ 'each',
+ 'else',
+ 'elseif',
+ 'end',
+ 'erase',
+ 'execute',
+ 'function',
+ 'exit',
+ 'for',
+ 'function',
+ 'GetRef',
+ 'global',
+ 'if',
+ 'let',
+ 'loop',
+ 'next',
+ 'new',
+ # option: special rule
+ 'private',
+ 'public',
+ 'redim',
+ 'select',
+ 'set',
+ 'sub',
+ 'then',
+ 'wend',
+ 'while',
+ 'with',
+]
+
+BUILTIN_FUNCTIONS = [
+ 'Abs',
+ 'Array',
+ 'Asc',
+ 'Atn',
+ 'CBool',
+ 'CByte',
+ 'CCur',
+ 'CDate',
+ 'CDbl',
+ 'Chr',
+ 'CInt',
+ 'CLng',
+ 'Cos',
+ 'CreateObject',
+ 'CSng',
+ 'CStr',
+ 'Date',
+ 'DateAdd',
+ 'DateDiff',
+ 'DatePart',
+ 'DateSerial',
+ 'DateValue',
+ 'Day',
+ 'Eval',
+ 'Exp',
+ 'Filter',
+ 'Fix',
+ 'FormatCurrency',
+ 'FormatDateTime',
+ 'FormatNumber',
+ 'FormatPercent',
+ 'GetObject',
+ 'GetLocale',
+ 'Hex',
+ 'Hour',
+ 'InStr',
+ 'inStrRev',
+ 'Int',
+ 'IsArray',
+ 'IsDate',
+ 'IsEmpty',
+ 'IsNull',
+ 'IsNumeric',
+ 'IsObject',
+ 'Join',
+ 'LBound',
+ 'LCase',
+ 'Left',
+ 'Len',
+ 'LoadPicture',
+ 'Log',
+ 'LTrim',
+ 'Mid',
+ 'Minute',
+ 'Month',
+ 'MonthName',
+ 'MsgBox',
+ 'Now',
+ 'Oct',
+ 'Randomize',
+ 'RegExp',
+ 'Replace',
+ 'RGB',
+ 'Right',
+ 'Rnd',
+ 'Round',
+ 'RTrim',
+ 'ScriptEngine',
+ 'ScriptEngineBuildVersion',
+ 'ScriptEngineMajorVersion',
+ 'ScriptEngineMinorVersion',
+ 'Second',
+ 'SetLocale',
+ 'Sgn',
+ 'Space',
+ 'Split',
+ 'Sqr',
+ 'StrComp',
+ 'String',
+ 'StrReverse',
+ 'Tan',
+ 'Time',
+ 'Timer',
+ 'TimeSerial',
+ 'TimeValue',
+ 'Trim',
+ 'TypeName',
+ 'UBound',
+ 'UCase',
+ 'VarType',
+ 'Weekday',
+ 'WeekdayName',
+ 'Year',
+]
+
+BUILTIN_VARIABLES = [
+ 'Debug',
+ 'Dictionary',
+ 'Drive',
+ 'Drives',
+ 'Err',
+ 'File',
+ 'Files',
+ 'FileSystemObject',
+ 'Folder',
+ 'Folders',
+ 'Match',
+ 'Matches',
+ 'RegExp',
+ 'Submatches',
+ 'TextStream',
+]
+
+OPERATORS = [
+ '+',
+ '-',
+ '*',
+ '/',
+ '\\',
+ '^',
+ '|',
+ '<',
+ '<=',
+ '>',
+ '>=',
+ '=',
+ '<>',
+ '&',
+ '$',
+]
+
+OPERATOR_WORDS = [
+ 'mod',
+ 'and',
+ 'or',
+ 'xor',
+ 'eqv',
+ 'imp',
+ 'is',
+ 'not',
+]
+
+BUILTIN_CONSTANTS = [
+ 'False',
+ 'True',
+ 'vbAbort',
+ 'vbAbortRetryIgnore',
+ 'vbApplicationModal',
+ 'vbArray',
+ 'vbBinaryCompare',
+ 'vbBlack',
+ 'vbBlue',
+ 'vbBoole',
+ 'vbByte',
+ 'vbCancel',
+ 'vbCr',
+ 'vbCritical',
+ 'vbCrLf',
+ 'vbCurrency',
+ 'vbCyan',
+ 'vbDataObject',
+ 'vbDate',
+ 'vbDefaultButton1',
+ 'vbDefaultButton2',
+ 'vbDefaultButton3',
+ 'vbDefaultButton4',
+ 'vbDouble',
+ 'vbEmpty',
+ 'vbError',
+ 'vbExclamation',
+ 'vbFalse',
+ 'vbFirstFullWeek',
+ 'vbFirstJan1',
+ 'vbFormFeed',
+ 'vbFriday',
+ 'vbGeneralDate',
+ 'vbGreen',
+ 'vbIgnore',
+ 'vbInformation',
+ 'vbInteger',
+ 'vbLf',
+ 'vbLong',
+ 'vbLongDate',
+ 'vbLongTime',
+ 'vbMagenta',
+ 'vbMonday',
+ 'vbMsgBoxHelpButton',
+ 'vbMsgBoxRight',
+ 'vbMsgBoxRtlReading',
+ 'vbMsgBoxSetForeground',
+ 'vbNewLine',
+ 'vbNo',
+ 'vbNull',
+ 'vbNullChar',
+ 'vbNullString',
+ 'vbObject',
+ 'vbObjectError',
+ 'vbOK',
+ 'vbOKCancel',
+ 'vbOKOnly',
+ 'vbQuestion',
+ 'vbRed',
+ 'vbRetry',
+ 'vbRetryCancel',
+ 'vbSaturday',
+ 'vbShortDate',
+ 'vbShortTime',
+ 'vbSingle',
+ 'vbString',
+ 'vbSunday',
+ 'vbSystemModal',
+ 'vbTab',
+ 'vbTextCompare',
+ 'vbThursday',
+ 'vbTrue',
+ 'vbTuesday',
+ 'vbUseDefault',
+ 'vbUseSystem',
+ 'vbUseSystem',
+ 'vbVariant',
+ 'vbVerticalTab',
+ 'vbWednesday',
+ 'vbWhite',
+ 'vbYellow',
+ 'vbYes',
+ 'vbYesNo',
+ 'vbYesNoCancel',
+] \ No newline at end of file
diff --git a/pygments/lexers/actionscript.py b/pygments/lexers/actionscript.py
index 84607e68..fc3b90cd 100644
--- a/pygments/lexers/actionscript.py
+++ b/pygments/lexers/actionscript.py
@@ -125,7 +125,7 @@ class ActionScript3Lexer(RegexLexer):
'text/actionscript3']
identifier = r'[$a-zA-Z_]\w*'
- typeidentifier = identifier + '(?:\.<\w+>)?'
+ typeidentifier = identifier + r'(?:\.<\w+>)?'
flags = re.DOTALL | re.MULTILINE
tokens = {
@@ -232,7 +232,7 @@ class MxmlLexer(RegexLexer):
(r'/?\s*>', Name.Tag, '#pop'),
],
'attr': [
- ('\s+', Text),
+ (r'\s+', Text),
('".*?"', String, '#pop'),
("'.*?'", String, '#pop'),
(r'[^\s>]+', String, '#pop'),
diff --git a/pygments/lexers/apl.py b/pygments/lexers/apl.py
index b3414cc0..4bb88ae3 100644
--- a/pygments/lexers/apl.py
+++ b/pygments/lexers/apl.py
@@ -71,14 +71,14 @@ class APLLexer(RegexLexer):
#
# Numbers
# =======
- (u'¯?(0[Xx][0-9A-Fa-f]+|[0-9]*\.?[0-9]+([Ee][+¯]?[0-9]+)?|¯|∞)'
- u'([Jj]¯?(0[Xx][0-9A-Fa-f]+|[0-9]*\.?[0-9]+([Ee][+¯]?[0-9]+)?|¯|∞))?',
+ (u'¯?(0[Xx][0-9A-Fa-f]+|[0-9]*\\.?[0-9]+([Ee][+¯]?[0-9]+)?|¯|∞)'
+ u'([Jj]¯?(0[Xx][0-9A-Fa-f]+|[0-9]*\\.?[0-9]+([Ee][+¯]?[0-9]+)?|¯|∞))?',
Number),
#
# Operators
# ==========
- (u'[\.\\\/⌿⍀¨⍣⍨⍠⍤∘]', Name.Attribute), # closest token type
- (u'[+\-×÷⌈⌊∣|⍳?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⌸⍯↗]',
+ (u'[\\.\\\\\\/⌿⍀¨⍣⍨⍠⍤∘]', Name.Attribute), # closest token type
+ (u'[+\\-×÷⌈⌊∣|⍳?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⌸⍯↗]',
Operator),
#
# Constant
diff --git a/pygments/lexers/asm.py b/pygments/lexers/asm.py
index 5b8cab80..7100868c 100644
--- a/pygments/lexers/asm.py
+++ b/pygments/lexers/asm.py
@@ -20,7 +20,7 @@ from pygments.token import Text, Name, Number, String, Comment, Punctuation, \
__all__ = ['GasLexer', 'ObjdumpLexer', 'DObjdumpLexer', 'CppObjdumpLexer',
'CObjdumpLexer', 'HsailLexer', 'LlvmLexer', 'NasmLexer',
- 'NasmObjdumpLexer', 'TasmLexer', 'Ca65Lexer']
+ 'NasmObjdumpLexer', 'TasmLexer', 'Ca65Lexer', 'Dasm16Lexer']
class GasLexer(RegexLexer):
@@ -35,7 +35,7 @@ class GasLexer(RegexLexer):
#: optional Comment or Whitespace
string = r'"(\\"|[^"])*"'
char = r'[\w$.@-]'
- identifier = r'(?:[a-zA-Z$_]' + char + '*|\.' + char + '+)'
+ identifier = r'(?:[a-zA-Z$_]' + char + r'*|\.' + char + '+)'
number = r'(?:0[xX][a-zA-Z0-9]+|\d+)'
tokens = {
@@ -53,6 +53,7 @@ class GasLexer(RegexLexer):
('@' + identifier, Name.Attribute),
(number, Number.Integer),
(r'[\r\n]+', Text, '#pop'),
+ (r'[;#].*?\n', Comment, '#pop'),
include('punctuation'),
include('whitespace')
@@ -76,6 +77,7 @@ class GasLexer(RegexLexer):
('$'+number, Number.Integer),
(r"$'(.|\\')'", String.Char),
(r'[\r\n]+', Text, '#pop'),
+ (r'[;#].*?\n', Comment, '#pop'),
include('punctuation'),
include('whitespace')
@@ -256,7 +258,7 @@ class HsailLexer(RegexLexer):
(r'0[xX][a-fA-F0-9]+', Number.Hex),
(ieeefloat, Number.Float),
(float, Number.Float),
- ('\d+', Number.Integer),
+ (r'\d+', Number.Integer),
(r'[=<>{}\[\]()*.,:;!]|x\b', Punctuation)
],
@@ -350,7 +352,7 @@ class LlvmLexer(RegexLexer):
include('whitespace'),
# Before keywords, because keywords are valid label names :(...
- (identifier + '\s*:', Name.Label),
+ (identifier + r'\s*:', Name.Label),
include('keyword'),
@@ -375,54 +377,63 @@ class LlvmLexer(RegexLexer):
'keyword': [
# Regular keywords
(words((
- 'begin', 'end', 'true', 'false', 'declare', 'define', 'global',
- 'constant', 'private', 'linker_private', 'internal',
- 'available_externally', 'linkonce', 'linkonce_odr', 'weak',
- 'weak_odr', 'appending', 'dllimport', 'dllexport', 'common',
- 'default', 'hidden', 'protected', 'extern_weak', 'external',
- 'thread_local', 'zeroinitializer', 'undef', 'null', 'to', 'tail',
- 'target', 'triple', 'datalayout', 'volatile', 'nuw', 'nsw', 'nnan',
- 'ninf', 'nsz', 'arcp', 'fast', 'exact', 'inbounds', 'align',
- 'addrspace', 'section', 'alias', 'module', 'asm', 'sideeffect',
- 'gc', 'dbg', 'linker_private_weak', 'attributes', 'blockaddress',
- 'initialexec', 'localdynamic', 'localexec', 'prefix', 'unnamed_addr',
- 'ccc', 'fastcc', 'coldcc', 'x86_stdcallcc', 'x86_fastcallcc',
- 'arm_apcscc', 'arm_aapcscc', 'arm_aapcs_vfpcc', 'ptx_device',
- 'ptx_kernel', 'intel_ocl_bicc', 'msp430_intrcc', 'spir_func',
- 'spir_kernel', 'x86_64_sysvcc', 'x86_64_win64cc', 'x86_thiscallcc',
- 'cc', 'c', 'signext', 'zeroext', 'inreg', 'sret', 'nounwind',
- 'noreturn', 'noalias', 'nocapture', 'byval', 'nest', 'readnone',
- 'readonly', 'inlinehint', 'noinline', 'alwaysinline', 'optsize', 'ssp',
- 'sspreq', 'noredzone', 'noimplicitfloat', 'naked', 'builtin', 'cold',
- 'nobuiltin', 'noduplicate', 'nonlazybind', 'optnone', 'returns_twice',
- 'sanitize_address', 'sanitize_memory', 'sanitize_thread', 'sspstrong',
- 'uwtable', 'returned', 'type', 'opaque', 'eq', 'ne', 'slt', 'sgt',
- 'sle', 'sge', 'ult', 'ugt', 'ule', 'uge', 'oeq', 'one', 'olt', 'ogt',
- 'ole', 'oge', 'ord', 'uno', 'ueq', 'une', 'x', 'acq_rel', 'acquire',
- 'alignstack', 'atomic', 'catch', 'cleanup', 'filter', 'inteldialect',
- 'max', 'min', 'monotonic', 'nand', 'personality', 'release', 'seq_cst',
- 'singlethread', 'umax', 'umin', 'unordered', 'xchg', 'add', 'fadd',
- 'sub', 'fsub', 'mul', 'fmul', 'udiv', 'sdiv', 'fdiv', 'urem', 'srem',
- 'frem', 'shl', 'lshr', 'ashr', 'and', 'or', 'xor', 'icmp', 'fcmp',
- 'phi', 'call', 'trunc', 'zext', 'sext', 'fptrunc', 'fpext', 'uitofp',
- 'sitofp', 'fptoui', 'fptosi', 'inttoptr', 'ptrtoint', 'bitcast',
- 'addrspacecast', 'select', 'va_arg', 'ret', 'br', 'switch', 'invoke',
- 'unwind', 'unreachable', 'indirectbr', 'landingpad', 'resume',
- 'malloc', 'alloca', 'free', 'load', 'store', 'getelementptr',
- 'extractelement', 'insertelement', 'shufflevector', 'getresult',
- 'extractvalue', 'insertvalue', 'atomicrmw', 'cmpxchg', 'fence',
- 'allocsize', 'amdgpu_cs', 'amdgpu_gs', 'amdgpu_kernel', 'amdgpu_ps',
- 'amdgpu_vs', 'any', 'anyregcc', 'argmemonly', 'avr_intrcc',
- 'avr_signalcc', 'caller', 'catchpad', 'catchret', 'catchswitch',
- 'cleanuppad', 'cleanupret', 'comdat', 'convergent', 'cxx_fast_tlscc',
- 'deplibs', 'dereferenceable', 'dereferenceable_or_null', 'distinct',
- 'exactmatch', 'externally_initialized', 'from', 'ghccc', 'hhvm_ccc',
- 'hhvmcc', 'ifunc', 'inaccessiblemem_or_argmemonly', 'inaccessiblememonly',
- 'inalloca', 'jumptable', 'largest', 'local_unnamed_addr', 'minsize',
- 'musttail', 'noduplicates', 'none', 'nonnull', 'norecurse', 'notail',
- 'preserve_allcc', 'preserve_mostcc', 'prologue', 'safestack', 'samesize',
- 'source_filename', 'swiftcc', 'swifterror', 'swiftself', 'webkit_jscc',
- 'within', 'writeonly', 'x86_intrcc', 'x86_vectorcallcc'),
+ 'acq_rel', 'acquire', 'add', 'addrspace', 'addrspacecast', 'afn', 'alias',
+ 'aliasee', 'align', 'alignLog2', 'alignstack', 'alloca', 'allocsize', 'allOnes',
+ 'alwaysinline', 'amdgpu_cs', 'amdgpu_es', 'amdgpu_gs', 'amdgpu_hs',
+ 'amdgpu_kernel', 'amdgpu_ls', 'amdgpu_ps', 'amdgpu_vs', 'and', 'any',
+ 'anyregcc', 'appending', 'arcp', 'argmemonly', 'args', 'arm_aapcs_vfpcc',
+ 'arm_aapcscc', 'arm_apcscc', 'ashr', 'asm', 'atomic', 'atomicrmw', 'attributes',
+ 'available_externally', 'avr_intrcc', 'avr_signalcc', 'bit', 'bitcast',
+ 'bitMask', 'blockaddress', 'br', 'branchFunnel', 'builtin', 'byArg', 'byte',
+ 'byteArray', 'byval', 'c', 'call', 'callee', 'caller', 'calls', 'catch',
+ 'catchpad', 'catchret', 'catchswitch', 'cc', 'ccc', 'cleanup', 'cleanuppad',
+ 'cleanupret', 'cmpxchg', 'cold', 'coldcc', 'comdat', 'common', 'constant',
+ 'contract', 'convergent', 'critical', 'cxx_fast_tlscc', 'datalayout', 'declare',
+ 'default', 'define', 'deplibs', 'dereferenceable', 'dereferenceable_or_null',
+ 'distinct', 'dllexport', 'dllimport', 'double', 'dso_local', 'dso_preemptable',
+ 'dsoLocal', 'eq', 'exact', 'exactmatch', 'extern_weak', 'external',
+ 'externally_initialized', 'extractelement', 'extractvalue', 'fadd', 'false',
+ 'fast', 'fastcc', 'fcmp', 'fdiv', 'fence', 'filter', 'flags', 'float', 'fmul',
+ 'fp128', 'fpext', 'fptosi', 'fptoui', 'fptrunc', 'frem', 'from', 'fsub',
+ 'funcFlags', 'function', 'gc', 'getelementptr', 'ghccc', 'global', 'guid', 'gv',
+ 'half', 'hash', 'hhvm_ccc', 'hhvmcc', 'hidden', 'hot', 'hotness', 'icmp',
+ 'ifunc', 'inaccessiblemem_or_argmemonly', 'inaccessiblememonly', 'inalloca',
+ 'inbounds', 'indir', 'indirectbr', 'info', 'initialexec', 'inline',
+ 'inlineBits', 'inlinehint', 'inrange', 'inreg', 'insertelement', 'insertvalue',
+ 'insts', 'intel_ocl_bicc', 'inteldialect', 'internal', 'inttoptr', 'invoke',
+ 'jumptable', 'kind', 'label', 'landingpad', 'largest', 'linkage', 'linkonce',
+ 'linkonce_odr', 'live', 'load', 'local_unnamed_addr', 'localdynamic',
+ 'localexec', 'lshr', 'max', 'metadata', 'min', 'minsize', 'module', 'monotonic',
+ 'msp430_intrcc', 'mul', 'musttail', 'naked', 'name', 'nand', 'ne', 'nest',
+ 'ninf', 'nnan', 'noalias', 'nobuiltin', 'nocapture', 'nocf_check',
+ 'noduplicate', 'noduplicates', 'noimplicitfloat', 'noinline', 'none',
+ 'nonlazybind', 'nonnull', 'norecurse', 'noRecurse', 'noredzone', 'noreturn',
+ 'notail', 'notEligibleToImport', 'nounwind', 'nsw', 'nsz', 'null', 'nuw', 'oeq',
+ 'offset', 'oge', 'ogt', 'ole', 'olt', 'one', 'opaque', 'optforfuzzing',
+ 'optnone', 'optsize', 'or', 'ord', 'path', 'personality', 'phi', 'ppc_fp128',
+ 'prefix', 'preserve_allcc', 'preserve_mostcc', 'private', 'prologue',
+ 'protected', 'ptrtoint', 'ptx_device', 'ptx_kernel', 'readnone', 'readNone',
+ 'readonly', 'readOnly', 'reassoc', 'refs', 'relbf', 'release', 'resByArg',
+ 'resume', 'ret', 'returnDoesNotAlias', 'returned', 'returns_twice', 'safestack',
+ 'samesize', 'sanitize_address', 'sanitize_hwaddress', 'sanitize_memory',
+ 'sanitize_thread', 'sdiv', 'section', 'select', 'seq_cst', 'sext', 'sge', 'sgt',
+ 'shadowcallstack', 'shl', 'shufflevector', 'sideeffect', 'signext', 'single',
+ 'singleImpl', 'singleImplName', 'sitofp', 'sizeM1', 'sizeM1BitWidth', 'sle',
+ 'slt', 'source_filename', 'speculatable', 'spir_func', 'spir_kernel', 'srem',
+ 'sret', 'ssp', 'sspreq', 'sspstrong', 'store', 'strictfp', 'sub', 'summaries',
+ 'summary', 'swiftcc', 'swifterror', 'swiftself', 'switch', 'syncscope', 'tail',
+ 'target', 'thread_local', 'to', 'token', 'triple', 'true', 'trunc', 'type',
+ 'typeCheckedLoadConstVCalls', 'typeCheckedLoadVCalls', 'typeid', 'typeIdInfo',
+ 'typeTestAssumeConstVCalls', 'typeTestAssumeVCalls', 'typeTestRes', 'typeTests',
+ 'udiv', 'ueq', 'uge', 'ugt', 'uitofp', 'ule', 'ult', 'umax', 'umin', 'undef',
+ 'une', 'uniformRetVal', 'uniqueRetVal', 'unknown', 'unnamed_addr', 'uno',
+ 'unordered', 'unreachable', 'unsat', 'unwind', 'urem', 'uselistorder',
+ 'uselistorder_bb', 'uwtable', 'va_arg', 'variable', 'vFuncId',
+ 'virtualConstProp', 'void', 'volatile', 'weak', 'weak_odr', 'webkit_jscc',
+ 'win64cc', 'within', 'wpdRes', 'wpdResolutions', 'writeonly', 'x',
+ 'x86_64_sysvcc', 'x86_fastcallcc', 'x86_fp80', 'x86_intrcc', 'x86_mmx',
+ 'x86_regcallcc', 'x86_stdcallcc', 'x86_thiscallcc', 'x86_vectorcallcc', 'xchg',
+ 'xor', 'zeroext', 'zeroinitializer', 'zext'),
suffix=r'\b'), Keyword),
# Types
@@ -639,3 +650,109 @@ class Ca65Lexer(RegexLexer):
# comments in GAS start with "#"
if re.match(r'^\s*;', text, re.MULTILINE):
return 0.9
+
+
+class Dasm16Lexer(RegexLexer):
+ """
+ Simple lexer for DCPU-16 Assembly
+
+ Check http://0x10c.com/doc/dcpu-16.txt
+
+ .. versionadded:: 2.4
+ """
+ name = 'DASM16'
+ aliases = ['dasm16']
+ filenames = ['*.dasm16', '*.dasm']
+ mimetypes = ['text/x-dasm16']
+
+ INSTRUCTIONS = [
+ 'SET',
+ 'ADD', 'SUB',
+ 'MUL', 'MLI',
+ 'DIV', 'DVI',
+ 'MOD', 'MDI',
+ 'AND', 'BOR', 'XOR',
+ 'SHR', 'ASR', 'SHL',
+ 'IFB', 'IFC', 'IFE', 'IFN', 'IFG', 'IFA', 'IFL', 'IFU',
+ 'ADX', 'SBX',
+ 'STI', 'STD',
+ 'JSR',
+ 'INT', 'IAG', 'IAS', 'RFI', 'IAQ', 'HWN', 'HWQ', 'HWI',
+ ]
+
+ REGISTERS = [
+ 'A', 'B', 'C',
+ 'X', 'Y', 'Z',
+ 'I', 'J',
+ 'SP', 'PC', 'EX',
+ 'POP', 'PEEK', 'PUSH'
+ ]
+
+ # Regexes yo
+ char = r'[a-zA-Z$._0-9@]'
+ identifier = r'(?:[a-zA-Z$_]' + char + '*|\.' + char + '+)'
+ number = r'[+-]?(?:0[xX][a-zA-Z0-9]+|\d+)'
+ binary_number = r'0b[01_]+'
+ instruction = r'(?i)(' + '|'.join(INSTRUCTIONS) + ')'
+ single_char = r"'\\?" + char + "'"
+ string = r'"(\\"|[^"])*"'
+
+ def guess_identifier(lexer, match):
+ ident = match.group(0)
+ klass = Name.Variable if ident.upper() in lexer.REGISTERS else Name.Label
+ yield match.start(), klass, ident
+
+ tokens = {
+ 'root': [
+ include('whitespace'),
+ (':' + identifier, Name.Label),
+ (identifier + ':', Name.Label),
+ (instruction, Name.Function, 'instruction-args'),
+ (r'\.' + identifier, Name.Function, 'data-args'),
+ (r'[\r\n]+', Text)
+ ],
+
+ 'numeric' : [
+ (binary_number, Number.Integer),
+ (number, Number.Integer),
+ (single_char, String),
+ ],
+
+ 'arg' : [
+ (identifier, guess_identifier),
+ include('numeric')
+ ],
+
+ 'deref' : [
+ (r'\+', Punctuation),
+ (r'\]', Punctuation, '#pop'),
+ include('arg'),
+ include('whitespace')
+ ],
+
+ 'instruction-line' : [
+ (r'[\r\n]+', Text, '#pop'),
+ (r';.*?$', Comment, '#pop'),
+ include('whitespace')
+ ],
+
+ 'instruction-args': [
+ (r',', Punctuation),
+ (r'\[', Punctuation, 'deref'),
+ include('arg'),
+ include('instruction-line')
+ ],
+
+ 'data-args' : [
+ (r',', Punctuation),
+ include('numeric'),
+ (string, String),
+ include('instruction-line')
+ ],
+
+ 'whitespace': [
+ (r'\n', Text),
+ (r'\s+', Text),
+ (r';.*?\n', Comment)
+ ],
+ }
diff --git a/pygments/lexers/basic.py b/pygments/lexers/basic.py
index e6545ee6..1aa3274c 100644
--- a/pygments/lexers/basic.py
+++ b/pygments/lexers/basic.py
@@ -12,11 +12,14 @@
import re
from pygments.lexer import RegexLexer, bygroups, default, words, include
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
- Number, Punctuation
+from pygments.token import Comment, Error, Keyword, Name, Number, \
+ Punctuation, Operator, String, Text, Whitespace
+from pygments.lexers import _vbscript_builtins
+
__all__ = ['BlitzBasicLexer', 'BlitzMaxLexer', 'MonkeyLexer', 'CbmBasicV2Lexer',
- 'QBasicLexer']
+ 'QBasicLexer', 'VBScriptLexer', 'BBCBasicLexer']
+
class BlitzMaxLexer(RegexLexer):
@@ -498,3 +501,159 @@ class QBasicLexer(RegexLexer):
def analyse_text(text):
if '$DYNAMIC' in text or '$STATIC' in text:
return 0.9
+
+
+class VBScriptLexer(RegexLexer):
+ """
+ VBScript is scripting language that is modeled on Visual Basic.
+
+ .. versionadded:: 2.4
+ """
+ name = 'VBScript'
+ aliases = []
+ filenames = ['*.vbs', '*.VBS']
+ flags = re.IGNORECASE
+
+ tokens = {
+ 'root': [
+ (r"'[^\n]*", Comment.Single),
+ (r'\s+', Whitespace),
+ ('"', String.Double, 'string'),
+ ('&h[0-9a-f]+', Number.Hex),
+ # Float variant 1, for example: 1., 1.e2, 1.2e3
+ (r'[0-9]+\.[0-9]*(e[+-]?[0-9]+)?', Number.Float),
+ (r'\.[0-9]+(e[+-]?[0-9]+)?', Number.Float), # Float variant 2, for example: .1, .1e2
+ (r'[0-9]+e[+-]?[0-9]+', Number.Float), # Float variant 3, for example: 123e45
+ (r'\d+', Number.Integer),
+ ('#.+#', String), # date or time value
+ (r'(dim)(\s+)([a-z_][a-z0-9_]*)',
+ bygroups(Keyword.Declaration, Whitespace, Name.Variable), 'dim_more'),
+ (r'(function|sub)(\s+)([a-z_][a-z0-9_]*)',
+ bygroups(Keyword.Declaration, Whitespace, Name.Function)),
+ (r'(class)(\s+)([a-z_][a-z0-9_]*)', bygroups(Keyword.Declaration, Whitespace, Name.Class)),
+ (r'(const)(\s+)([a-z_][a-z0-9_]*)', bygroups(Keyword.Declaration, Whitespace, Name.Constant)),
+ (r'(end)(\s+)(class|function|if|property|sub|with)', bygroups(Keyword, Whitespace, Keyword)),
+ (r'(on)(\s+)(error)(\s+)(goto)(\s+)(0)',
+ bygroups(Keyword, Whitespace, Keyword, Whitespace, Keyword, Whitespace, Number.Integer)),
+ (r'(on)(\s+)(error)(\s+)(resume)(\s+)(next)',
+ bygroups(Keyword, Whitespace, Keyword, Whitespace, Keyword, Whitespace, Keyword)),
+ (r'(option)(\s+)(explicit)', bygroups(Keyword, Whitespace, Keyword)),
+ (r'(property)(\s+)(get|let|set)(\s+)([a-z_][a-z0-9_]*)',
+ bygroups(Keyword.Declaration, Whitespace, Keyword.Declaration, Whitespace, Name.Property)),
+ (r'rem\s.*[^\n]*', Comment.Single),
+ (words(_vbscript_builtins.KEYWORDS, suffix=r'\b'), Keyword),
+ (words(_vbscript_builtins.OPERATORS), Operator),
+ (words(_vbscript_builtins.OPERATOR_WORDS, suffix=r'\b'), Operator.Word),
+ (words(_vbscript_builtins.BUILTIN_CONSTANTS, suffix=r'\b'), Name.Constant),
+ (words(_vbscript_builtins.BUILTIN_FUNCTIONS, suffix=r'\b'), Name.Builtin),
+ (words(_vbscript_builtins.BUILTIN_VARIABLES, suffix=r'\b'), Name.Builtin),
+ (r'[a-z_][a-z0-9_]*', Name),
+ (r'\b_\n', Operator),
+ (words(r'(),.:'), Punctuation),
+ (r'.+(\n)?', Error)
+ ],
+ 'dim_more': [
+ (r'(\s*)(,)(\s*)([a-z_][a-z0-9]*)', bygroups(Whitespace, Punctuation, Whitespace, Name.Variable)),
+ default('#pop'),
+ ],
+ 'string': [
+ (r'[^"\n]+', String.Double),
+ (r'\"\"', String.Double),
+ (r'"', String.Double, '#pop'),
+ (r'\n', Error, '#pop'), # Unterminated string
+ ],
+ }
+
+
+class BBCBasicLexer(RegexLexer):
+ """
+ BBC Basic was supplied on the BBC Micro, and later Acorn RISC OS.
+ It is also used by BBC Basic For Windows.
+
+ .. versionadded:: 2.4
+ """
+ base_keywords = ['OTHERWISE', 'AND', 'DIV', 'EOR', 'MOD', 'OR', 'ERROR',
+ 'LINE', 'OFF', 'STEP', 'SPC', 'TAB', 'ELSE', 'THEN',
+ 'OPENIN', 'PTR', 'PAGE', 'TIME', 'LOMEM', 'HIMEM', 'ABS',
+ 'ACS', 'ADVAL', 'ASC', 'ASN', 'ATN', 'BGET', 'COS', 'COUNT',
+ 'DEG', 'ERL', 'ERR', 'EVAL', 'EXP', 'EXT', 'FALSE', 'FN',
+ 'GET', 'INKEY', 'INSTR', 'INT', 'LEN', 'LN', 'LOG', 'NOT',
+ 'OPENUP', 'OPENOUT', 'PI', 'POINT', 'POS', 'RAD', 'RND',
+ 'SGN', 'SIN', 'SQR', 'TAN', 'TO', 'TRUE', 'USR', 'VAL',
+ 'VPOS', 'CHR$', 'GET$', 'INKEY$', 'LEFT$', 'MID$',
+ 'RIGHT$', 'STR$', 'STRING$', 'EOF', 'PTR', 'PAGE', 'TIME',
+ 'LOMEM', 'HIMEM', 'SOUND', 'BPUT', 'CALL', 'CHAIN', 'CLEAR',
+ 'CLOSE', 'CLG', 'CLS', 'DATA', 'DEF', 'DIM', 'DRAW', 'END',
+ 'ENDPROC', 'ENVELOPE', 'FOR', 'GOSUB', 'GOTO', 'GCOL', 'IF',
+ 'INPUT', 'LET', 'LOCAL', 'MODE', 'MOVE', 'NEXT', 'ON',
+ 'VDU', 'PLOT', 'PRINT', 'PROC', 'READ', 'REM', 'REPEAT',
+ 'REPORT', 'RESTORE', 'RETURN', 'RUN', 'STOP', 'COLOUR',
+ 'TRACE', 'UNTIL', 'WIDTH', 'OSCLI']
+
+ basic5_keywords = ['WHEN', 'OF', 'ENDCASE', 'ENDIF', 'ENDWHILE', 'CASE',
+ 'CIRCLE', 'FILL', 'ORIGIN', 'POINT', 'RECTANGLE', 'SWAP',
+ 'WHILE', 'WAIT', 'MOUSE', 'QUIT', 'SYS', 'INSTALL',
+ 'LIBRARY', 'TINT', 'ELLIPSE', 'BEATS', 'TEMPO', 'VOICES',
+ 'VOICE', 'STEREO', 'OVERLAY', 'APPEND', 'AUTO', 'CRUNCH',
+ 'DELETE', 'EDIT', 'HELP', 'LIST', 'LOAD', 'LVAR', 'NEW',
+ 'OLD', 'RENUMBER', 'SAVE', 'TEXTLOAD', 'TEXTSAVE',
+ 'TWIN', 'TWINO', 'INSTALL', 'SUM', 'BEAT']
+
+
+ name = 'BBC Basic'
+ aliases = ['bbcbasic']
+ filenames = ['*.bbc']
+
+ tokens = {
+ 'root': [
+ (r"[0-9]+", Name.Label),
+ (r"(\*)([^\n]*)",
+ bygroups(Keyword.Pseudo, Comment.Special)),
+ (r"", Whitespace, 'code'),
+ ],
+
+ 'code': [
+ (r"(REM)([^\n]*)",
+ bygroups(Keyword.Declaration, Comment.Single)),
+ (r'\n', Whitespace, 'root'),
+ (r'\s+', Whitespace),
+ (r':', Comment.Preproc),
+
+ # Some special cases to make functions come out nicer
+ (r'(DEF)(\s*)(FN|PROC)([A-Za-z_@][\w@]*)',
+ bygroups(Keyword.Declaration, Whitespace, Keyword.Declaration, Name.Function)),
+ (r'(FN|PROC)([A-Za-z_@][\w@]*)',
+ bygroups(Keyword, Name.Function)),
+
+ (r'(GOTO|GOSUB|THEN|RESTORE)(\s*)(\d+)',
+ bygroups(Keyword, Whitespace, Name.Label)),
+
+ (r'(TRUE|FALSE)', Keyword.Constant),
+ (r'(PAGE|LOMEM|HIMEM|TIME|WIDTH|ERL|ERR|REPORT\$|POS|VPOS|VOICES)', Keyword.Pseudo),
+
+ (words(base_keywords), Keyword),
+ (words(basic5_keywords), Keyword),
+
+ ('"', String.Double, 'string'),
+
+ ('%[01]{1,32}', Number.Bin),
+ ('&[0-9a-f]{1,8}', Number.Hex),
+
+ (r'[+-]?[0-9]+\.[0-9]*(E[+-]?[0-9]+)?', Number.Float),
+ (r'[+-]?\.[0-9]+(E[+-]?[0-9]+)?', Number.Float),
+ (r'[+-]?[0-9]+E[+-]?[0-9]+', Number.Float),
+ (r'[+-]?\d+', Number.Integer),
+
+ (r'([A-Za-z_@][\w@]*[%$]?)', Name.Variable),
+ (r'([+\-]=|[$!|?+\-*/%^=><();]|>=|<=|<>|<<|>>|>>>|,)', Operator),
+ ],
+ 'string': [
+ (r'[^"\n]+', String.Double),
+ (r'"', String.Double, '#pop'),
+ (r'\n', Error, 'root'), # Unterminated string
+ ],
+ }
+
+ def analyse_text(text):
+ if text.startswith('10REM >') or text.startswith('REM >'):
+ return 0.9
diff --git a/pygments/lexers/bibtex.py b/pygments/lexers/bibtex.py
index a6159f81..7244ef2f 100644
--- a/pygments/lexers/bibtex.py
+++ b/pygments/lexers/bibtex.py
@@ -101,12 +101,12 @@ class BibTeXLexer(ExtendedRegexLexer):
'quoted-string': [
(r'\{', String, 'braced-string'),
('"', String, '#pop'),
- ('[^\{\"]+', String),
+ (r'[^\{\"]+', String),
],
'braced-string': [
(r'\{', String, '#push'),
(r'\}', String, '#pop'),
- ('[^\{\}]+', String),
+ (r'[^\{\}]+', String),
],
'whitespace': [
(r'\s+', Text),
@@ -154,7 +154,7 @@ class BSTLexer(RegexLexer):
default('#pop'),
],
'whitespace': [
- ('\s+', Text),
+ (r'\s+', Text),
('%.*?$', Comment.SingleLine),
],
}
diff --git a/pygments/lexers/boa.py b/pygments/lexers/boa.py
new file mode 100644
index 00000000..41398cd4
--- /dev/null
+++ b/pygments/lexers/boa.py
@@ -0,0 +1,80 @@
+# -*- coding: utf-8 -*-
+import re
+
+from pygments.lexer import RegexLexer, words
+from pygments.token import *
+
+__all__ = ['BoaLexer']
+
+line_re = re.compile('.*?\n')
+
+
+class BoaLexer(RegexLexer):
+ """
+ http://boa.cs.iastate.edu/docs/
+ """
+ name = 'Boa'
+ aliases = ['boa']
+ filenames = ['*.boa']
+
+ reserved = words(
+ ('input', 'output', 'of', 'weight', 'before', 'after', 'stop', 'ifall', 'foreach', 'exists', 'function',
+ 'break', 'switch', 'case', 'visitor', 'default', 'return', 'visit', 'while', 'if', 'else'),
+ suffix=r'\b', prefix=r'\b')
+ keywords = words(
+ ('bottom', 'collection', 'maximum', 'mean', 'minimum', 'set', 'sum', 'top', 'string', 'int', 'bool', 'float',
+ 'time', 'false', 'true', 'array', 'map', 'stack', 'enum', 'type'), suffix=r'\b', prefix=r'\b')
+ classes = words(
+ ('Project', 'ForgeKind', 'CodeRepository', 'Revision', 'RepositoryKind', 'ChangedFile', 'FileKind', 'ASTRoot',
+ 'Namespace', 'Declaration', 'Type', 'Method', 'Variable', 'Statement', 'Expression', 'Modifier',
+ 'StatementKind', 'ExpressionKind', 'ModifierKind', 'Visibility', 'TypeKind', 'Person', 'ChangeKind'),
+ suffix=r'\b', prefix=r'\b')
+ operators = ('->', ':=', ':', '=', '<<', '!', '++', '||', '&&', '+', '-', '*', ">", "<")
+ string_sep = ('`', '\"')
+ built_in_functions = words(
+ (
+ # Array functions
+ 'new', 'sort',
+ # Date & Time functions
+ 'yearof', 'dayofyear', 'hourof', 'minuteof', 'secondof', 'now', 'addday', 'addmonth', 'addweek', 'addyear',
+ 'dayofmonth', 'dayofweek', 'dayofyear', 'formattime', 'trunctoday', 'trunctohour', 'trunctominute',
+ 'trunctomonth', 'trunctosecond', 'trunctoyear',
+ # Map functions
+ 'clear', 'haskey', 'keys', 'lookup', 'remove', 'values',
+ # Math functions
+ 'abs', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'cos', 'cosh', 'exp', 'floor',
+ 'highbit', 'isfinite', 'isinf', 'isnan', 'isnormal', 'log', 'log10', 'max', 'min', 'nrand', 'pow', 'rand',
+ 'round', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc',
+ # Other functions
+ 'def', 'hash', 'len',
+ # Set functions
+ 'add', 'contains', 'remove',
+ # String functions
+ 'format', 'lowercase', 'match', 'matchposns', 'matchstrs', 'regex', 'split', 'splitall', 'splitn',
+ 'strfind', 'strreplace', 'strrfind', 'substring', 'trim', 'uppercase',
+ # Type Conversion functions
+ 'bool', 'float', 'int', 'string', 'time',
+ # Domain-Specific functions
+ 'getast', 'getsnapshot', 'hasfiletype', 'isfixingrevision', 'iskind', 'isliteral',
+ ),
+ prefix=r'\b',
+ suffix=r'\(')
+
+ tokens = {
+ 'root': [
+ (r'#.*?$', Comment.Single),
+ (r'/\*.*?\*/', Comment.Multiline),
+ (reserved, Keyword.Reserved),
+ (built_in_functions, Name.Function),
+ (keywords, Keyword.Type),
+ (classes, Name.Classes),
+ (words(operators), Operator),
+ (r'[][(),;{}\\.]', Punctuation),
+ (r'"(\\\\|\\"|[^"])*"', String),
+ (r'`(\\\\|\\`|[^`])*`', String),
+ (words(string_sep), String.Delimeter),
+ (r'[a-zA-Z_]+', Name.Variable),
+ (r'[0-9]+', Number.Integer),
+ (r'\s+?', Text), # Whitespace
+ ]
+ }
diff --git a/pygments/lexers/c_cpp.py b/pygments/lexers/c_cpp.py
index 691f5ab4..38f425db 100644
--- a/pygments/lexers/c_cpp.py
+++ b/pygments/lexers/c_cpp.py
@@ -36,7 +36,7 @@ class CFamilyLexer(RegexLexer):
tokens = {
'whitespace': [
# preprocessor directives: without whitespace
- ('^#if\s+0', Comment.Preproc, 'if0'),
+ (r'^#if\s+0', Comment.Preproc, 'if0'),
('^#', Comment.Preproc, 'macro'),
# or with whitespace
('^(' + _ws1 + r')(#if\s+0)',
@@ -84,7 +84,7 @@ class CFamilyLexer(RegexLexer):
prefix=r'__', suffix=r'\b'), Keyword.Reserved),
(r'(true|false|NULL)\b', Name.Builtin),
(r'([a-zA-Z_]\w*)(\s*)(:)(?!:)', bygroups(Name.Label, Text, Punctuation)),
- ('[a-zA-Z_]\w*', Name),
+ (r'[a-zA-Z_]\w*', Name),
],
'root': [
include('whitespace'),
@@ -190,9 +190,9 @@ class CLexer(CFamilyLexer):
priority = 0.1
def analyse_text(text):
- if re.search('^\s*#include [<"]', text, re.MULTILINE):
+ if re.search(r'^\s*#include [<"]', text, re.MULTILINE):
return 0.1
- if re.search('^\s*#ifn?def ', text, re.MULTILINE):
+ if re.search(r'^\s*#ifn?def ', text, re.MULTILINE):
return 0.1
diff --git a/pygments/lexers/c_like.py b/pygments/lexers/c_like.py
index 38827219..58372b81 100644
--- a/pygments/lexers/c_like.py
+++ b/pygments/lexers/c_like.py
@@ -20,7 +20,7 @@ from pygments.lexers.c_cpp import CLexer, CppLexer
from pygments.lexers import _mql_builtins
__all__ = ['PikeLexer', 'NesCLexer', 'ClayLexer', 'ECLexer', 'ValaLexer',
- 'CudaLexer', 'SwigLexer', 'MqlLexer', 'ArduinoLexer']
+ 'CudaLexer', 'SwigLexer', 'MqlLexer', 'ArduinoLexer', 'CharmciLexer']
class PikeLexer(CppLexer):
@@ -245,7 +245,7 @@ class ValaLexer(RegexLexer):
'ulong', 'unichar', 'ushort'), suffix=r'\b'),
Keyword.Type),
(r'(true|false|null)\b', Name.Builtin),
- ('[a-zA-Z_]\w*', Name),
+ (r'[a-zA-Z_]\w*', Name),
],
'root': [
include('whitespace'),
@@ -344,7 +344,7 @@ class SwigLexer(CppLexer):
# SWIG directives
(r'(%[a-z_][a-z0-9_]*)', Name.Function),
# Special variables
- ('\$\**\&?\w+', Name),
+ (r'\$\**\&?\w+', Name),
# Stringification / additional preprocessor directives
(r'##*[a-zA-Z_]\w*', Comment.Preproc),
inherit,
@@ -539,3 +539,23 @@ class ArduinoLexer(CppLexer):
yield index, Name.Function, value
else:
yield index, token, value
+
+class CharmciLexer(CppLexer):
+ """
+ For `Charm++ <https://charm.cs.illinois.edu>`_ interface files (.ci).
+ """
+
+ name = 'Charmci'
+ aliases = ['charmci']
+ filenames = ['*.ci']
+
+ mimetypes = []
+
+ tokens = {
+ 'statements': [
+ (r'(module)(\s+)', bygroups(Keyword, Text), 'classname'),
+ (words(('mainmodule','mainchare','chare','array','group','nodegroup','message','conditional')), Keyword),
+ (words(('entry','aggregate','threaded','sync','exclusive','nokeep','notrace','immediate','expedited','inline','local','python','accel','readwrite','writeonly','accelblock','memcritical','packed','varsize','initproc','initnode','initcall','stacksize','createhere','createhome','reductiontarget','iget','nocopy','mutable','migratable','readonly')), Keyword),
+ inherit,
+ ],
+ }
diff --git a/pygments/lexers/capnproto.py b/pygments/lexers/capnproto.py
index 203523a1..2615dcaf 100644
--- a/pygments/lexers/capnproto.py
+++ b/pygments/lexers/capnproto.py
@@ -44,34 +44,34 @@ class CapnProtoLexer(RegexLexer):
],
'type': [
(r'[^][=;,(){}$]+', Name.Class),
- (r'[[(]', Name.Class, 'parentype'),
+ (r'[\[(]', Name.Class, 'parentype'),
default('#pop'),
],
'parentype': [
(r'[^][;()]+', Name.Class),
- (r'[[(]', Name.Class, '#push'),
+ (r'[\[(]', Name.Class, '#push'),
(r'[])]', Name.Class, '#pop'),
default('#pop'),
],
'expression': [
(r'[^][;,(){}$]+', Literal),
- (r'[[(]', Literal, 'parenexp'),
+ (r'[\[(]', Literal, 'parenexp'),
default('#pop'),
],
'parenexp': [
(r'[^][;()]+', Literal),
- (r'[[(]', Literal, '#push'),
+ (r'[\[(]', Literal, '#push'),
(r'[])]', Literal, '#pop'),
default('#pop'),
],
'annotation': [
(r'[^][;,(){}=:]+', Name.Attribute),
- (r'[[(]', Name.Attribute, 'annexp'),
+ (r'[\[(]', Name.Attribute, 'annexp'),
default('#pop'),
],
'annexp': [
(r'[^][;()]+', Name.Attribute),
- (r'[[(]', Name.Attribute, '#push'),
+ (r'[\[(]', Name.Attribute, '#push'),
(r'[])]', Name.Attribute, '#pop'),
default('#pop'),
],
diff --git a/pygments/lexers/chapel.py b/pygments/lexers/chapel.py
index 55bf0e1e..16ce720b 100644
--- a/pygments/lexers/chapel.py
+++ b/pygments/lexers/chapel.py
@@ -42,16 +42,26 @@ class ChapelLexer(RegexLexer):
(r'(bool|complex|imag|int|opaque|range|real|string|uint)\b',
Keyword.Type),
(words((
- 'align', 'as', 'atomic', 'begin', 'break', 'by', 'cobegin',
- 'coforall', 'continue', 'delete', 'dmapped', 'do', 'domain',
- 'else', 'enum', 'except', 'export', 'extern', 'for', 'forall',
- 'if', 'index', 'inline', 'iter', 'label', 'lambda', 'let',
- 'local', 'new', 'noinit', 'on', 'only', 'otherwise', 'pragma',
- 'private', 'public', 'reduce', 'require', 'return', 'scan',
- 'select', 'serial', 'single', 'sparse', 'subdomain', 'sync',
- 'then', 'use', 'when', 'where', 'while', 'with', 'yield',
+ 'align', 'as', 'atomic',
+ 'begin', 'borrowed', 'break', 'by',
+ 'catch', 'cobegin', 'coforall', 'continue',
+ 'delete', 'dmapped', 'do', 'domain',
+ 'else', 'enum', 'except', 'export', 'extern',
+ 'for', 'forall',
+ 'if', 'index', 'inline',
+ 'label', 'lambda', 'let', 'local',
+ 'new', 'noinit',
+ 'on', 'only', 'otherwise', 'override', 'owned',
+ 'pragma', 'private', 'prototype', 'public',
+ 'reduce', 'require', 'return',
+ 'scan', 'select', 'serial', 'shared', 'single', 'sparse', 'subdomain', 'sync',
+ 'then', 'throw', 'throws', 'try',
+ 'unmanaged', 'use',
+ 'when', 'where', 'while', 'with',
+ 'yield',
'zip'), suffix=r'\b'),
Keyword),
+ (r'(iter)((?:\s)+)', bygroups(Keyword, Text), 'procname'),
(r'(proc)((?:\s)+)', bygroups(Keyword, Text), 'procname'),
(r'(class|module|record|union)(\s+)', bygroups(Keyword, Text),
'classname'),
@@ -96,7 +106,7 @@ class ChapelLexer(RegexLexer):
(r'[a-zA-Z_][\w$]*', Name.Class, '#pop'),
],
'procname': [
- (r'([a-zA-Z_][\w$]+|\~[a-zA-Z_][\w$]+|[+*/!~%<>=&^|\-]{1,2})',
+ (r'([a-zA-Z_][.\w$]*|\~[a-zA-Z_][.\w$]*|[+*/!~%<>=&^|\-]{1,2})',
Name.Function, '#pop'),
],
}
diff --git a/pygments/lexers/configs.py b/pygments/lexers/configs.py
index 4af2adb6..1984bf36 100644
--- a/pygments/lexers/configs.py
+++ b/pygments/lexers/configs.py
@@ -21,7 +21,7 @@ __all__ = ['IniLexer', 'RegeditLexer', 'PropertiesLexer', 'KconfigLexer',
'Cfengine3Lexer', 'ApacheConfLexer', 'SquidConfLexer',
'NginxConfLexer', 'LighttpdConfLexer', 'DockerLexer',
'TerraformLexer', 'TermcapLexer', 'TerminfoLexer',
- 'PkgConfigLexer', 'PacmanConfLexer']
+ 'PkgConfigLexer', 'PacmanConfLexer', 'AugeasLexer', 'TOMLLexer']
class IniLexer(RegexLexer):
@@ -301,7 +301,7 @@ class ApacheConfLexer(RegexLexer):
'root': [
(r'\s+', Text),
(r'(#.*?)$', Comment),
- (r'(<[^\s>]+)(?:(\s+)(.*?))?(>)',
+ (r'(<[^\s>]+)(?:(\s+)(.*))?(>)',
bygroups(Name.Tag, Text, String, Name.Tag)),
(r'([a-z]\w*)(\s+)',
bygroups(Name.Builtin, Text), 'value'),
@@ -574,6 +574,8 @@ class TerraformLexer(RegexLexer):
filenames = ['*.tf']
mimetypes = ['application/x-tf', 'application/x-terraform']
+ embedded_keywords = ('ingress', 'egress', 'listener', 'default', 'connection', 'alias', 'tags', 'lifecycle', 'timeouts')
+
tokens = {
'root': [
include('string'),
@@ -590,9 +592,8 @@ class TerraformLexer(RegexLexer):
(r'(.*?)(\s*)(=)', bygroups(Name.Attribute, Text, Operator)),
(words(('variable', 'resource', 'provider', 'provisioner', 'module'),
prefix=r'\b', suffix=r'\b'), Keyword.Reserved, 'function'),
- (words(('ingress', 'egress', 'listener', 'default', 'connection', 'alias'),
- prefix=r'\b', suffix=r'\b'), Keyword.Declaration),
- ('\$\{', String.Interpol, 'var_builtin'),
+ (words(embedded_keywords, prefix=r'\b', suffix=r'\b'), Keyword.Declaration),
+ (r'\$\{', String.Interpol, 'var_builtin'),
],
'function': [
(r'(\s+)(".*")(\s+)', bygroups(Text, String, Text)),
@@ -837,3 +838,97 @@ class PacmanConfLexer(RegexLexer):
(r'.', Text),
],
}
+
+
+class AugeasLexer(RegexLexer):
+ """
+ Lexer for `Augeas <http://augeas.net>`_.
+
+ .. versionadded:: 2.4
+ """
+ name = 'Augeas'
+ aliases = ['augeas']
+ filenames = ['*.aug']
+
+ tokens = {
+ 'root': [
+ (r'(module)(\s*)([^\s=]+)', bygroups(Keyword.Namespace, Text, Name.Namespace)),
+ (r'(let)(\s*)([^\s=]+)', bygroups(Keyword.Declaration, Text, Name.Variable)),
+ (r'(del|store|value|counter|seq|key|label|autoload|incl|excl|transform|test|get|put)(\s+)', bygroups(Name.Builtin, Text)),
+ (r'(\()([^:]+)(\:)(unit|string|regexp|lens|tree|filter)(\))', bygroups(Punctuation, Name.Variable, Punctuation, Keyword.Type, Punctuation)),
+ (r'\(\*', Comment.Multiline, 'comment'),
+ (r'[*+\-.;=?|]', Operator),
+ (r'[()\[\]{}]', Operator),
+ (r'"', String.Double, 'string'),
+ (r'\/', String.Regex, 'regex'),
+ (r'([A-Z]\w*)(\.)(\w+)', bygroups(Name.Namespace, Punctuation, Name.Variable)),
+ (r'.', Name.Variable),
+ (r'\s', Text),
+ ],
+ 'string': [
+ (r'\\.', String.Escape),
+ (r'[^"]', String.Double),
+ (r'"', String.Double, '#pop'),
+ ],
+ 'regex': [
+ (r'\\.', String.Escape),
+ (r'[^/]', String.Regex),
+ (r'\/', String.Regex, '#pop'),
+ ],
+ 'comment': [
+ (r'[^*)]', Comment.Multiline),
+ (r'\(\*', Comment.Multiline, '#push'),
+ (r'\*\)', Comment.Multiline, '#pop'),
+ (r'[)*]', Comment.Multiline)
+ ],
+ }
+
+
+class TOMLLexer(RegexLexer):
+ """
+ Lexer for `TOML <https://github.com/toml-lang/toml>`_, a simple language
+ for config files.
+
+ .. versionadded:: 2.4
+ """
+
+ name = 'TOML'
+ aliases = ['toml']
+ filenames = ['*.toml']
+
+ tokens = {
+ 'root': [
+
+ # Basics, comments, strings
+ (r'\s+', Text),
+ (r'#.*?$', Comment.Single),
+ # Basic string
+ (r'"(\\\\|\\"|[^"])*"', String),
+ # Literal string
+ (r'\'\'\'(.*)\'\'\'', String),
+ (r'\'[^\']*\'', String),
+ (r'(true|false)$', Keyword.Constant),
+ (r'[a-zA-Z_][\w\-]*', Name),
+
+ (r'\[.*?\]$', Keyword),
+ # Datetime
+ # TODO this needs to be expanded, as TOML is rather flexible:
+ # https://github.com/toml-lang/toml#offset-date-time
+ (r'\d{4}-\d{2}-\d{2}(?:T| )\d{2}:\d{2}:\d{2}(?:Z|[-+]\d{2}:\d{2})', Number.Integer),
+
+ # Numbers
+ (r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?j?', Number.Float),
+ (r'\d+[eE][+-]?[0-9]+j?', Number.Float),
+ # Handle +-inf, +-infinity, +-nan
+ (r'[+-]?(?:(inf(?:inity)?)|nan)', Number.Float),
+ (r'[+-]?\d+', Number.Integer),
+
+ # Punctuation
+ (r'[]{}:(),;[]', Punctuation),
+ (r'\.', Punctuation),
+
+ # Operators
+ (r'=', Operator)
+
+ ]
+ }
diff --git a/pygments/lexers/csound.py b/pygments/lexers/csound.py
index b86de091..161e1576 100644
--- a/pygments/lexers/csound.py
+++ b/pygments/lexers/csound.py
@@ -228,6 +228,13 @@ class CsoundOrchestraLexer(CsoundLexer):
else:
yield match.start(), Name, name
+ # If there's a trailing :V, for example, we want to keep this around
+ # and emit it as well, otherwise this lexer will not pass round-trip
+ # testing
+ if match.group(2):
+ yield match.start(2), Punctuation, match.group(2)
+ yield match.start(3), Name, match.group(3)
+
tokens = {
'root': [
(r'\n', Text),
diff --git a/pygments/lexers/data.py b/pygments/lexers/data.py
index 296366c2..7593b487 100644
--- a/pygments/lexers/data.py
+++ b/pygments/lexers/data.py
@@ -205,7 +205,7 @@ class YamlLexer(ExtendedRegexLexer):
bygroups(Text, Number), 'ignored-line'),
],
- # the %YAG directive
+ # the %TAG directive
'tag-directive': [
# a tag handle and the corresponding prefix
(r'([ ]+)(!|![\w-]*!)'
@@ -218,7 +218,7 @@ class YamlLexer(ExtendedRegexLexer):
'indentation': [
# trailing whitespaces are ignored
(r'[ ]*$', something(Text), '#pop:2'),
- # whitespaces preceeding block collection indicators
+ # whitespaces preceding block collection indicators
(r'[ ]+(?=[?:-](?:[ ]|$))', save_indent(Text)),
# block collection indicators
(r'[?:-](?=[ ]|$)', set_indent(Punctuation.Indicator)),
@@ -232,6 +232,9 @@ class YamlLexer(ExtendedRegexLexer):
(r'[ ]*(?=#|$)', something(Text), '#pop'),
# whitespaces separating tokens
(r'[ ]+', Text),
+ # key with colon
+ (r'''([^,:?\[\]{}"'\n]+)(:)(?=[ ]|$)''',
+ bygroups(Name.Tag, set_indent(Punctuation, implicit=True))),
# tags, anchors and aliases,
include('descriptors'),
# block collections and scalars
@@ -250,7 +253,7 @@ class YamlLexer(ExtendedRegexLexer):
(r'!<[\w#;/?:@&=+$,.!~*\'()\[\]%-]+>', Keyword.Type),
# a tag in the form '!', '!suffix' or '!handle!suffix'
(r'!(?:[\w-]+!)?'
- r'[\w#;/?:@&=+$,.!~*\'()\[\]%-]+', Keyword.Type),
+ r'[\w#;/?:@&=+$,.!~*\'()\[\]%-]*', Keyword.Type),
# an anchor
(r'&[\w-]+', Name.Label),
# an alias
@@ -308,6 +311,9 @@ class YamlLexer(ExtendedRegexLexer):
# a flow mapping indicated by '{' and '}'
'flow-mapping': [
+ # key with colon
+ (r'''([^,:?\[\]{}"'\n]+)(:)(?=[ ]|$)''',
+ bygroups(Name.Tag, Punctuation)),
# include flow collection rules
include('flow-collection'),
# the closing indicator
diff --git a/pygments/lexers/dotnet.py b/pygments/lexers/dotnet.py
index 4e2bc8ab..27ae77c5 100644
--- a/pygments/lexers/dotnet.py
+++ b/pygments/lexers/dotnet.py
@@ -58,7 +58,7 @@ class CSharpLexer(RegexLexer):
# http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf
levels = {
- 'none': '@?[_a-zA-Z]\w*',
+ 'none': r'@?[_a-zA-Z]\w*',
'basic': ('@?[_' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl') + ']' +
'[' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl', 'Nd', 'Pc',
'Cf', 'Mn', 'Mc') + ']*'),
@@ -171,7 +171,7 @@ class NemerleLexer(RegexLexer):
# http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf
levels = {
- 'none': '@?[_a-zA-Z]\w*',
+ 'none': r'@?[_a-zA-Z]\w*',
'basic': ('@?[_' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl') + ']' +
'[' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl', 'Nd', 'Pc',
'Cf', 'Mn', 'Mc') + ']*'),
@@ -352,13 +352,13 @@ class BooLexer(RegexLexer):
('[*/]', Comment.Multiline)
],
'funcname': [
- ('[a-zA-Z_]\w*', Name.Function, '#pop')
+ (r'[a-zA-Z_]\w*', Name.Function, '#pop')
],
'classname': [
- ('[a-zA-Z_]\w*', Name.Class, '#pop')
+ (r'[a-zA-Z_]\w*', Name.Class, '#pop')
],
'namespace': [
- ('[a-zA-Z_][\w.]*', Name.Namespace, '#pop')
+ (r'[a-zA-Z_][\w.]*', Name.Namespace, '#pop')
]
}
@@ -413,7 +413,7 @@ class VbNetLexer(RegexLexer):
'Static', 'Step', 'Stop', 'SyncLock', 'Then', 'Throw', 'To',
'True', 'Try', 'TryCast', 'Wend', 'Using', 'When', 'While',
'Widening', 'With', 'WithEvents', 'WriteOnly'),
- prefix='(?<!\.)', suffix=r'\b'), Keyword),
+ prefix=r'(?<!\.)', suffix=r'\b'), Keyword),
(r'(?<!\.)End\b', Keyword, 'end'),
(r'(?<!\.)(Dim|Const)\b', Keyword, 'dim'),
(r'(?<!\.)(Function|Sub|Property)(\s+)',
@@ -574,10 +574,10 @@ class FSharpLexer(RegexLexer):
'virtual', 'volatile',
]
keyopts = [
- '!=', '#', '&&', '&', '\(', '\)', '\*', '\+', ',', '-\.',
- '->', '-', '\.\.', '\.', '::', ':=', ':>', ':', ';;', ';', '<-',
- '<\]', '<', '>\]', '>', '\?\?', '\?', '\[<', '\[\|', '\[', '\]',
- '_', '`', '\{', '\|\]', '\|', '\}', '~', '<@@', '<@', '=', '@>', '@@>',
+ '!=', '#', '&&', '&', r'\(', r'\)', r'\*', r'\+', ',', r'-\.',
+ '->', '-', r'\.\.', r'\.', '::', ':=', ':>', ':', ';;', ';', '<-',
+ r'<\]', '<', r'>\]', '>', r'\?\?', r'\?', r'\[<', r'\[\|', r'\[', r'\]',
+ '_', '`', r'\{', r'\|\]', r'\|', r'\}', '~', '<@@', '<@', '=', '@>', '@@>',
]
operators = r'[!$%&*+\./:<=>?@^|~-]'
diff --git a/pygments/lexers/dsls.py b/pygments/lexers/dsls.py
index a1426bd6..4451b480 100644
--- a/pygments/lexers/dsls.py
+++ b/pygments/lexers/dsls.py
@@ -66,7 +66,7 @@ class ProtoBufLexer(RegexLexer):
(r'[+-=]', Operator),
(r'([a-zA-Z_][\w.]*)([ \t]*)(=)',
bygroups(Name.Attribute, Text, Operator)),
- ('[a-zA-Z_][\w.]*', Name),
+ (r'[a-zA-Z_][\w.]*', Name),
],
'package': [
(r'[a-zA-Z_]\w*', Name.Namespace, '#pop'),
@@ -300,7 +300,7 @@ class PuppetLexer(RegexLexer):
],
'names': [
- ('[a-zA-Z_]\w*', Name.Attribute),
+ (r'[a-zA-Z_]\w*', Name.Attribute),
(r'(\$\S+)(\[)(\S+)(\])', bygroups(Name.Variable, Punctuation,
String, Punctuation)),
(r'\$\S+', Name.Variable),
@@ -688,7 +688,7 @@ class CrmshLexer(RegexLexer):
(r'([\w#$-]+)(?:(:)(%s))?(?![\w#$-])' % rsc_role_action,
bygroups(Name, Punctuation, Operator.Word)),
# punctuation
- (r'(\\(?=\n)|[[\](){}/:@])', Punctuation),
+ (r'(\\(?=\n)|[\[\](){}/:@])', Punctuation),
(r'\s+|\n', Whitespace),
],
}
diff --git a/pygments/lexers/dylan.py b/pygments/lexers/dylan.py
index f61bb60d..30318f38 100644
--- a/pygments/lexers/dylan.py
+++ b/pygments/lexers/dylan.py
@@ -179,10 +179,10 @@ class DylanLexer(RegexLexer):
(valid_name + ':', Keyword),
# class names
- (r'<' + valid_name + '>', Name.Class),
+ ('<' + valid_name + '>', Name.Class),
# define variable forms.
- (r'\*' + valid_name + '\*', Name.Variable.Global),
+ (r'\*' + valid_name + r'\*', Name.Variable.Global),
# define constant forms.
(r'\$' + valid_name, Name.Constant),
@@ -260,7 +260,7 @@ class DylanConsoleLexer(Lexer):
mimetypes = ['text/x-dylan-console']
_line_re = re.compile('.*?\n')
- _prompt_re = re.compile('\?| ')
+ _prompt_re = re.compile(r'\?| ')
def get_tokens_unprocessed(self, text):
dylexer = DylanLexer(**self.options)
diff --git a/pygments/lexers/elm.py b/pygments/lexers/elm.py
index 0fa36367..22a10bd9 100644
--- a/pygments/lexers/elm.py
+++ b/pygments/lexers/elm.py
@@ -27,7 +27,7 @@ class ElmLexer(RegexLexer):
filenames = ['*.elm']
mimetypes = ['text/x-elm']
- validName = r'[a-z_][a-zA-Z_\']*'
+ validName = r'[a-z_][a-zA-Z0-9_\']*'
specialName = r'^main '
diff --git a/pygments/lexers/erlang.py b/pygments/lexers/erlang.py
index 9e7f85c1..0d0d0798 100644
--- a/pygments/lexers/erlang.py
+++ b/pygments/lexers/erlang.py
@@ -344,7 +344,7 @@ class ElixirLexer(RegexLexer):
op1_re = "|".join(re.escape(s) for s in OPERATORS1)
ops_re = r'(?:%s|%s|%s)' % (op3_re, op2_re, op1_re)
punctuation_re = "|".join(re.escape(s) for s in PUNCTUATION)
- alnum = '\w'
+ alnum = r'\w'
name_re = r'(?:\.\.\.|[a-z_]%s*[!?]?)' % alnum
modname_re = r'[A-Z]%(alnum)s*(?:\.[A-Z]%(alnum)s*)*' % {'alnum': alnum}
complex_name_re = r'(?:%s|%s|%s)' % (name_re, modname_re, ops_re)
@@ -495,7 +495,7 @@ class ElixirConsoleLexer(Lexer):
aliases = ['iex']
mimetypes = ['text/x-elixir-shellsession']
- _prompt_re = re.compile('(iex|\.{3})(\(\d+\))?> ')
+ _prompt_re = re.compile(r'(iex|\.{3})(\(\d+\))?> ')
def get_tokens_unprocessed(self, text):
exlexer = ElixirLexer(**self.options)
diff --git a/pygments/lexers/esoteric.py b/pygments/lexers/esoteric.py
index 793c28be..26222c9f 100644
--- a/pygments/lexers/esoteric.py
+++ b/pygments/lexers/esoteric.py
@@ -245,7 +245,7 @@ class AheuiLexer(RegexLexer):
Aheui_ is esoteric language based on Korean alphabets.
- .. _Aheui:: http://aheui.github.io/
+ .. _Aheui: http://aheui.github.io/
"""
diff --git a/pygments/lexers/floscript.py b/pygments/lexers/floscript.py
new file mode 100644
index 00000000..4f200809
--- /dev/null
+++ b/pygments/lexers/floscript.py
@@ -0,0 +1,87 @@
+# -*- coding: utf-8 -*-
+"""
+ pygments.lexers.floscript
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Lexer for FloScript
+
+ :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+import re
+
+from pygments.lexer import Lexer, RegexLexer, include, bygroups, using, \
+ default, words, combined, do_insertions
+from pygments.util import get_bool_opt, shebang_matches
+from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
+ Number, Punctuation, Generic, Other, Error
+from pygments import unistring as uni
+
+__all__ = ['FloScriptLexer',]
+
+class FloScriptLexer(RegexLexer):
+ """
+ For `FloScript <https://github.com/ioflo/ioflo>`_ configuration language source code.
+
+ .. versionadded:: 2.4
+ """
+
+ name = 'FloScript'
+ aliases = ['floscript', 'flo']
+ filenames = ['*.flo']
+
+ def innerstring_rules(ttype):
+ return [
+ # the old style '%s' % (...) string formatting
+ (r'%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?'
+ '[hlL]?[E-GXc-giorsux%]', String.Interpol),
+ # backslashes, quotes and formatting signs must be parsed one at a time
+ (r'[^\\\'"%\n]+', ttype),
+ (r'[\'"\\]', ttype),
+ # unhandled string formatting sign
+ (r'%', ttype),
+ # newlines are an error (use "nl" state)
+ ]
+
+
+ tokens = {
+ 'root': [
+ (r'\n', Text),
+ (r'[^\S\n]+', Text),
+
+ (r'[]{}:(),;[]', Punctuation),
+ (r'\\\n', Text),
+ (r'\\', Text),
+ (r'(to|by|with|from|per|for|cum|qua|via|as|at|in|of|on|re|is|if|be|into|and|not)\b', Operator.Word),
+ (r'!=|==|<<|>>|[-~+/*%=<>&^|.]', Operator),
+ (r'(load|init|server|logger|log|loggee|first|over|under|next|done|timeout|repeat|native|benter|enter|recur|exit|precur|renter|rexit|print|put|inc|copy|set|aux|rear|raze|go|let|do|bid|ready|start|stop|run|abort|use|flo|give|take)\b', Name.Builtin),
+ (r'(frame|framer|house)\b', Keyword),
+ ('"', String, 'string'),
+
+ include('name'),
+ include('numbers'),
+ (r'#.+$', Comment.Singleline),
+ ],
+ 'string': [
+ ('[^"]+', String),
+ ('"', String, '#pop'),
+ ],
+ 'numbers': [
+ (r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?j?', Number.Float),
+ (r'\d+[eE][+-]?[0-9]+j?', Number.Float),
+ (r'0[0-7]+j?', Number.Oct),
+ (r'0[bB][01]+', Number.Bin),
+ (r'0[xX][a-fA-F0-9]+', Number.Hex),
+ (r'\d+L', Number.Integer.Long),
+ (r'\d+j?', Number.Integer)
+ ],
+
+ 'name': [
+ (r'@[\w.]+', Name.Decorator),
+ (r'[a-zA-Z_]\w*', Name),
+ ],
+
+
+
+ }
diff --git a/pygments/lexers/forth.py b/pygments/lexers/forth.py
index a51f1b57..7fecdd52 100644
--- a/pygments/lexers/forth.py
+++ b/pygments/lexers/forth.py
@@ -3,6 +3,8 @@
pygments.lexers.forth
~~~~~~~~~~~~~~~~~~~~~
+ Lexer for the Forth language.
+
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/lexers/fortran.py b/pygments/lexers/fortran.py
index 1a611c9d..5165bac0 100644
--- a/pygments/lexers/fortran.py
+++ b/pygments/lexers/fortran.py
@@ -158,6 +158,7 @@ class FortranLexer(RegexLexer):
(r'\d+(?![.e])(_[a-z]\w+)?', Number.Integer),
(r'[+-]?\d*\.\d+([ed][-+]?\d+)?(_[a-z]\w+)?', Number.Float),
(r'[+-]?\d+\.\d*([ed][-+]?\d+)?(_[a-z]\w+)?', Number.Float),
+ (r'[+-]?\d+(\.\d*)?[ed][-+]?\d+(_[a-z]\w+)?', Number.Float),
],
}
diff --git a/pygments/lexers/grammar_notation.py b/pygments/lexers/grammar_notation.py
index 076249d3..bc715ffa 100644
--- a/pygments/lexers/grammar_notation.py
+++ b/pygments/lexers/grammar_notation.py
@@ -158,7 +158,7 @@ class JsgfLexer(RegexLexer):
(r'//.*', Comment.Single),
],
'non-comments': [
- ('\A#JSGF[^;]*', Comment.Preproc),
+ (r'\A#JSGF[^;]*', Comment.Preproc),
(r'\s+', Text),
(r';', Punctuation),
(r'[=|()\[\]*+]', Operator),
diff --git a/pygments/lexers/graph.py b/pygments/lexers/graph.py
index 1a338246..6e836bdd 100644
--- a/pygments/lexers/graph.py
+++ b/pygments/lexers/graph.py
@@ -22,9 +22,9 @@ __all__ = ['CypherLexer']
class CypherLexer(RegexLexer):
"""
For `Cypher Query Language
- <http://docs.neo4j.org/chunked/milestone/cypher-query-lang.html>`_
+ <https://neo4j.com/docs/developer-manual/3.3/cypher/>`_
- For the Cypher version in Neo4J 2.0
+ For the Cypher version in Neo4j 3.3
.. versionadded:: 2.0
"""
@@ -49,14 +49,19 @@ class CypherLexer(RegexLexer):
],
'keywords': [
(r'(create|order|match|limit|set|skip|start|return|with|where|'
- r'delete|foreach|not|by)\b', Keyword),
+ r'delete|foreach|not|by|true|false)\b', Keyword),
],
'clauses': [
- # TODO: many missing ones, see http://docs.neo4j.org/refcard/2.0/
- (r'(all|any|as|asc|create|create\s+unique|delete|'
- r'desc|distinct|foreach|in|is\s+null|limit|match|none|'
- r'order\s+by|return|set|skip|single|start|union|where|with)\b',
- Keyword),
+ # based on https://neo4j.com/docs/cypher-refcard/3.3/
+ (r'(all|any|as|asc|ascending|assert|call|case|create|'
+ r'create\s+index|create\s+unique|delete|desc|descending|'
+ r'distinct|drop\s+constraint\s+on|drop\s+index\s+on|end|'
+ r'ends\s+with|fieldterminator|foreach|in|is\s+node\s+key|'
+ r'is\s+null|is\s+unique|limit|load\s+csv\s+from|match|merge|none|'
+ r'not|null|on\s+match|on\s+create|optional\s+match|order\s+by|'
+ r'remove|return|set|skip|single|start|starts\s+with|then|union|'
+ r'union\s+all|unwind|using\s+periodic\s+commit|yield|where|when|'
+ r'with)\b', Keyword),
],
'relations': [
(r'(-\[)(.*?)(\]->)', bygroups(Operator, using(this), Operator)),
diff --git a/pygments/lexers/graphics.py b/pygments/lexers/graphics.py
index fa5aa372..30ab2cbc 100644
--- a/pygments/lexers/graphics.py
+++ b/pygments/lexers/graphics.py
@@ -46,28 +46,102 @@ class GLShaderLexer(RegexLexer):
(r'0[0-7]*', Number.Oct),
(r'[1-9][0-9]*', Number.Integer),
(words((
- 'attribute', 'const', 'uniform', 'varying', 'centroid', 'break',
- 'continue', 'do', 'for', 'while', 'if', 'else', 'in', 'out',
- 'inout', 'float', 'int', 'void', 'bool', 'true', 'false',
- 'invariant', 'discard', 'return', 'mat2', 'mat3' 'mat4',
- 'mat2x2', 'mat3x2', 'mat4x2', 'mat2x3', 'mat3x3', 'mat4x3',
- 'mat2x4', 'mat3x4', 'mat4x4', 'vec2', 'vec3', 'vec4',
- 'ivec2', 'ivec3', 'ivec4', 'bvec2', 'bvec3', 'bvec4',
- 'sampler1D', 'sampler2D', 'sampler3D' 'samplerCube',
- 'sampler1DShadow', 'sampler2DShadow', 'struct'),
+ # Storage qualifiers
+ 'attribute', 'const', 'uniform', 'varying',
+ 'buffer', 'shared', 'in', 'out',
+ # Layout qualifiers
+ 'layout',
+ # Interpolation qualifiers
+ 'flat', 'smooth', 'noperspective',
+ # Auxiliary qualifiers
+ 'centroid', 'sample', 'patch',
+ # Parameter qualifiers. Some double as Storage qualifiers
+ 'inout',
+ # Precision qualifiers
+ 'lowp', 'mediump', 'highp', 'precision',
+ # Invariance qualifiers
+ 'invariant',
+ # Precise qualifiers
+ 'precise',
+ # Memory qualifiers
+ 'coherent', 'volatile', 'restrict', 'readonly', 'writeonly',
+ # Statements
+ 'break', 'continue', 'do', 'for', 'while', 'switch',
+ 'case', 'default', 'if', 'else', 'subroutine',
+ 'discard', 'return', 'struct'),
prefix=r'\b', suffix=r'\b'),
Keyword),
(words((
- 'asm', 'class', 'union', 'enum', 'typedef', 'template', 'this',
- 'packed', 'goto', 'switch', 'default', 'inline', 'noinline',
- 'volatile', 'public', 'static', 'extern', 'external', 'interface',
- 'long', 'short', 'double', 'half', 'fixed', 'unsigned', 'lowp',
- 'mediump', 'highp', 'precision', 'input', 'output',
- 'hvec2', 'hvec3', 'hvec4', 'dvec2', 'dvec3', 'dvec4',
- 'fvec2', 'fvec3', 'fvec4', 'sampler2DRect', 'sampler3DRect',
- 'sampler2DRectShadow', 'sizeof', 'cast', 'namespace', 'using'),
+ # Boolean values
+ 'true', 'false'),
prefix=r'\b', suffix=r'\b'),
- Keyword), # future use
+ Keyword.Constant),
+ (words((
+ # Miscellaneous types
+ 'void', 'atomic_uint',
+ # Floating-point scalars and vectors
+ 'float', 'vec2', 'vec3', 'vec4',
+ 'double', 'dvec2', 'dvec3', 'dvec4',
+ # Integer scalars and vectors
+ 'int', 'ivec2', 'ivec3', 'ivec4',
+ 'uint', 'uvec2', 'uvec3', 'uvec4',
+ # Boolean scalars and vectors
+ 'bool', 'bvec2', 'bvec3', 'bvec4',
+ # Matrices
+ 'mat2', 'mat3', 'mat4', 'dmat2', 'dmat3', 'dmat4',
+ 'mat2x2', 'mat2x3', 'mat2x4', 'dmat2x2', 'dmat2x3', 'dmat2x4',
+ 'mat3x2', 'mat3x3', 'mat3x4', 'dmat3x2', 'dmat3x3',
+ 'dmat3x4', 'mat4x2', 'mat4x3', 'mat4x4', 'dmat4x2', 'dmat4x3', 'dmat4x4',
+ # Floating-point samplers
+ 'sampler1D', 'sampler2D', 'sampler3D', 'samplerCube',
+ 'sampler1DArray', 'sampler2DArray', 'samplerCubeArray',
+ 'sampler2DRect', 'samplerBuffer',
+ 'sampler2DMS', 'sampler2DMSArray',
+ # Shadow samplers
+ 'sampler1DShadow', 'sampler2DShadow', 'samplerCubeShadow',
+ 'sampler1DArrayShadow', 'sampler2DArrayShadow',
+ 'samplerCubeArrayShadow', 'sampler2DRectShadow',
+ # Signed integer samplers
+ 'isampler1D', 'isampler2D', 'isampler3D', 'isamplerCube',
+ 'isampler1DArray', 'isampler2DArray', 'isamplerCubeArray',
+ 'isampler2DRect', 'isamplerBuffer',
+ 'isampler2DMS', 'isampler2DMSArray',
+ # Unsigned integer samplers
+ 'usampler1D', 'usampler2D', 'usampler3D', 'usamplerCube',
+ 'usampler1DArray', 'usampler2DArray', 'usamplerCubeArray',
+ 'usampler2DRect', 'usamplerBuffer',
+ 'usampler2DMS', 'usampler2DMSArray',
+ # Floating-point image types
+ 'image1D', 'image2D', 'image3D', 'imageCube',
+ 'image1DArray', 'image2DArray', 'imageCubeArray',
+ 'image2DRect', 'imageBuffer',
+ 'image2DMS', 'image2DMSArray',
+ # Signed integer image types
+ 'iimage1D', 'iimage2D', 'iimage3D', 'iimageCube',
+ 'iimage1DArray', 'iimage2DArray', 'iimageCubeArray',
+ 'iimage2DRect', 'iimageBuffer',
+ 'iimage2DMS', 'iimage2DMSArray',
+ # Unsigned integer image types
+ 'uimage1D', 'uimage2D', 'uimage3D', 'uimageCube',
+ 'uimage1DArray', 'uimage2DArray', 'uimageCubeArray',
+ 'uimage2DRect', 'uimageBuffer',
+ 'uimage2DMS', 'uimage2DMSArray'),
+ prefix=r'\b', suffix=r'\b'),
+ Keyword.Type),
+ (words((
+ # Reserved for future use.
+ 'common', 'partition', 'active', 'asm', 'class',
+ 'union', 'enum', 'typedef', 'template', 'this',
+ 'resource', 'goto', 'inline', 'noinline', 'public',
+ 'static', 'extern', 'external', 'interface', 'long',
+ 'short', 'half', 'fixed', 'unsigned', 'superp', 'input',
+ 'output', 'hvec2', 'hvec3', 'hvec4', 'fvec2', 'fvec3',
+ 'fvec4', 'sampler3DRect', 'filter', 'sizeof', 'cast',
+ 'namespace', 'using'),
+ prefix=r'\b', suffix=r'\b'),
+ Keyword.Reserved),
+ # All names beginning with "gl_" are reserved.
+ (r'gl_\w*', Name.Builtin),
(r'[a-zA-Z_]\w*', Name),
(r'\.', Punctuation),
(r'\s+', Text),
@@ -387,8 +461,8 @@ class AsymptoteLexer(RegexLexer):
r'bounds|coord|frame|guide|horner|int|linefit|marginT|pair|pen|'
r'picture|position|real|revolution|slice|splitface|ticksgridT|'
r'tickvalues|tree|triple|vertex|void)\b', Keyword.Type),
- ('[a-zA-Z_]\w*:(?!:)', Name.Label),
- ('[a-zA-Z_]\w*', Name),
+ (r'[a-zA-Z_]\w*:(?!:)', Name.Label),
+ (r'[a-zA-Z_]\w*', Name),
],
'root': [
include('whitespace'),
@@ -488,9 +562,9 @@ class GnuplotLexer(RegexLexer):
(_shortened_many('pwd$', 're$read', 'res$et', 'scr$eendump',
'she$ll', 'test$'),
Keyword, 'noargs'),
- ('([a-zA-Z_]\w*)(\s*)(=)',
+ (r'([a-zA-Z_]\w*)(\s*)(=)',
bygroups(Name.Variable, Text, Operator), 'genericargs'),
- ('([a-zA-Z_]\w*)(\s*\(.*?\)\s*)(=)',
+ (r'([a-zA-Z_]\w*)(\s*\(.*?\)\s*)(=)',
bygroups(Name.Function, Text, Operator), 'genericargs'),
(r'@[a-zA-Z_]\w*', Name.Constant), # macros
(r';', Keyword),
@@ -536,7 +610,7 @@ class GnuplotLexer(RegexLexer):
(r'(\d+\.\d*|\.\d+)', Number.Float),
(r'-?\d+', Number.Integer),
('[,.~!%^&*+=|?:<>/-]', Operator),
- ('[{}()\[\]]', Punctuation),
+ (r'[{}()\[\]]', Punctuation),
(r'(eq|ne)\b', Operator.Word),
(r'([a-zA-Z_]\w*)(\s*)(\()',
bygroups(Name.Function, Text, Punctuation)),
diff --git a/pygments/lexers/haskell.py b/pygments/lexers/haskell.py
index 1a2f2217..b3884f5c 100644
--- a/pygments/lexers/haskell.py
+++ b/pygments/lexers/haskell.py
@@ -12,12 +12,12 @@
import re
from pygments.lexer import Lexer, RegexLexer, bygroups, do_insertions, \
- default, include
+ default, include, inherit
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
Number, Punctuation, Generic
from pygments import unistring as uni
-__all__ = ['HaskellLexer', 'IdrisLexer', 'AgdaLexer', 'CryptolLexer',
+__all__ = ['HaskellLexer', 'HspecLexer', 'IdrisLexer', 'AgdaLexer', 'CryptolLexer',
'LiterateHaskellLexer', 'LiterateIdrisLexer', 'LiterateAgdaLexer',
'LiterateCryptolLexer', 'KokaLexer']
@@ -72,11 +72,14 @@ class HaskellLexer(RegexLexer):
(r':[:!#$%&*+.\\/<=>?@^|~-]*', Keyword.Type), # Constructor operators
(r'[:!#$%&*+.\\/<=>?@^|~-]+', Operator), # Other operators
# Numbers
- (r'\d+[eE][+-]?\d+', Number.Float),
- (r'\d+\.\d+([eE][+-]?\d+)?', Number.Float),
- (r'0[oO][0-7]+', Number.Oct),
- (r'0[xX][\da-fA-F]+', Number.Hex),
- (r'\d+', Number.Integer),
+ (r'0[xX]_*[\da-fA-F](_*[\da-fA-F])*_*[pP][+-]?\d(_*\d)*', Number.Float),
+ (r'0[xX]_*[\da-fA-F](_*[\da-fA-F])*\.[\da-fA-F](_*[\da-fA-F])*(_*[pP][+-]?\d(_*\d)*)?', Number.Float),
+ (r'\d(_*\d)*_*[eE][+-]?\d(_*\d)*', Number.Float),
+ (r'\d(_*\d)*\.\d(_*\d)*(_*[eE][+-]?\d(_*\d)*)?', Number.Float),
+ (r'0[bB]_*[01](_*[01])*', Number.Bin),
+ (r'0[oO]_*[0-7](_*[0-7])*', Number.Oct),
+ (r'0[xX]_*[\da-fA-F](_*[\da-fA-F])*', Number.Hex),
+ (r'\d(_*\d)*', Number.Integer),
# Character/String Literals
(r"'", String.Char, 'character'),
(r'"', String, 'string'),
@@ -154,6 +157,28 @@ class HaskellLexer(RegexLexer):
}
+class HspecLexer(HaskellLexer):
+ """
+ A Haskell lexer with support for Hspec constructs.
+
+ .. versionadded:: 2.4.0
+ """
+
+ name = 'Hspec'
+ aliases = ['hspec']
+ filenames = []
+ mimetypes = []
+
+ tokens = {
+ 'root': [
+ (r'(it\s*)("[^"]*")', bygroups(Text, String.Doc)),
+ (r'(describe\s*)("[^"]*")', bygroups(Text, String.Doc)),
+ (r'(context\s*)("[^"]*")', bygroups(Text, String.Doc)),
+ inherit,
+ ],
+ }
+
+
class IdrisLexer(RegexLexer):
"""
A lexer for the dependently typed programming language Idris.
@@ -677,10 +702,10 @@ class KokaLexer(RegexLexer):
symbols = r'[$%&*+@!/\\^~=.:\-?|<>]+'
# symbol boundary: an operator keyword should not be followed by any of these
- sboundary = '(?!'+symbols+')'
+ sboundary = '(?!' + symbols + ')'
# name boundary: a keyword should not be followed by any of these
- boundary = '(?![\w/])'
+ boundary = r'(?![\w/])'
# koka token abstractions
tokenType = Name.Attribute
diff --git a/pygments/lexers/haxe.py b/pygments/lexers/haxe.py
index 6f5c3599..364ad344 100644
--- a/pygments/lexers/haxe.py
+++ b/pygments/lexers/haxe.py
@@ -43,7 +43,7 @@ class HaxeLexer(ExtendedRegexLexer):
typeid = r'_*[A-Z]\w*'
# combined ident and dollar and idtype
- ident = r'(?:_*[a-z]\w*|_+[0-9]\w*|' + typeid + '|_+|\$\w+)'
+ ident = r'(?:_*[a-z]\w*|_+[0-9]\w*|' + typeid + r'|_+|\$\w+)'
binop = (r'(?:%=|&=|\|=|\^=|\+=|\-=|\*=|/=|<<=|>\s*>\s*=|>\s*>\s*>\s*=|==|'
r'!=|<=|>\s*=|&&|\|\||<<|>>>|>\s*>|\.\.\.|<|>|%|&|\||\^|\+|\*|'
@@ -182,7 +182,7 @@ class HaxeLexer(ExtendedRegexLexer):
(r'[0-9]+[eE][+\-]?[0-9]+', Number.Float),
(r'[0-9]+\.[0-9]*[eE][+\-]?[0-9]+', Number.Float),
(r'[0-9]+\.[0-9]+', Number.Float),
- (r'[0-9]+\.(?!' + ident + '|\.\.)', Number.Float),
+ (r'[0-9]+\.(?!' + ident + r'|\.\.)', Number.Float),
# Int
(r'0x[0-9a-fA-F]+', Number.Hex),
@@ -219,7 +219,7 @@ class HaxeLexer(ExtendedRegexLexer):
(r'[0-9]+[eE][+\-]?[0-9]+', Number.Float, ('#pop', 'preproc-expr-chain')),
(r'[0-9]+\.[0-9]*[eE][+\-]?[0-9]+', Number.Float, ('#pop', 'preproc-expr-chain')),
(r'[0-9]+\.[0-9]+', Number.Float, ('#pop', 'preproc-expr-chain')),
- (r'[0-9]+\.(?!' + ident + '|\.\.)', Number.Float, ('#pop', 'preproc-expr-chain')),
+ (r'[0-9]+\.(?!' + ident + r'|\.\.)', Number.Float, ('#pop', 'preproc-expr-chain')),
# Int
(r'0x[0-9a-fA-F]+', Number.Hex, ('#pop', 'preproc-expr-chain')),
@@ -456,7 +456,7 @@ class HaxeLexer(ExtendedRegexLexer):
(r'[0-9]+[eE][+\-]?[0-9]+', Number.Float, ('#pop', 'expr-chain')),
(r'[0-9]+\.[0-9]*[eE][+\-]?[0-9]+', Number.Float, ('#pop', 'expr-chain')),
(r'[0-9]+\.[0-9]+', Number.Float, ('#pop', 'expr-chain')),
- (r'[0-9]+\.(?!' + ident + '|\.\.)', Number.Float, ('#pop', 'expr-chain')),
+ (r'[0-9]+\.(?!' + ident + r'|\.\.)', Number.Float, ('#pop', 'expr-chain')),
# Int
(r'0x[0-9a-fA-F]+', Number.Hex, ('#pop', 'expr-chain')),
@@ -711,7 +711,7 @@ class HaxeLexer(ExtendedRegexLexer):
(r'[0-9]+[eE][+\-]?[0-9]+', Number.Float, '#pop'),
(r'[0-9]+\.[0-9]*[eE][+\-]?[0-9]+', Number.Float, '#pop'),
(r'[0-9]+\.[0-9]+', Number.Float, '#pop'),
- (r'[0-9]+\.(?!' + ident + '|\.\.)', Number.Float, '#pop'),
+ (r'[0-9]+\.(?!' + ident + r'|\.\.)', Number.Float, '#pop'),
# Int
(r'0x[0-9a-fA-F]+', Number.Hex, '#pop'),
diff --git a/pygments/lexers/html.py b/pygments/lexers/html.py
index 73f020fa..091379ce 100644
--- a/pygments/lexers/html.py
+++ b/pygments/lexers/html.py
@@ -220,7 +220,7 @@ class XmlLexer(RegexLexer):
(r'/?\s*>', Name.Tag, '#pop'),
],
'attr': [
- ('\s+', Text),
+ (r'\s+', Text),
('".*?"', String, '#pop'),
("'.*?'", String, '#pop'),
(r'[^\s>]+', String, '#pop'),
@@ -313,7 +313,7 @@ class HamlLexer(ExtendedRegexLexer):
include('css'),
(r'%[\w:-]+', Name.Tag, 'tag'),
(r'!!!' + _dot + r'*\n', Name.Namespace, '#pop'),
- (r'(/)(\[' + _dot + '*?\])(' + _dot + r'*\n)',
+ (r'(/)(\[' + _dot + r'*?\])(' + _dot + r'*\n)',
bygroups(Comment, Comment.Special, Comment),
'#pop'),
(r'/' + _dot + r'*\n', _starts_block(Comment, 'html-comment-block'),
@@ -330,8 +330,8 @@ class HamlLexer(ExtendedRegexLexer):
'tag': [
include('css'),
- (r'\{(,\n|' + _dot + ')*?\}', using(RubyLexer)),
- (r'\[' + _dot + '*?\]', using(RubyLexer)),
+ (r'\{(,\n|' + _dot + r')*?\}', using(RubyLexer)),
+ (r'\[' + _dot + r'*?\]', using(RubyLexer)),
(r'\(', Text, 'html-attributes'),
(r'/[ \t]*\n', Punctuation, '#pop:2'),
(r'[<>]{1,2}(?=[ \t=])', Punctuation),
@@ -340,7 +340,7 @@ class HamlLexer(ExtendedRegexLexer):
'plain': [
(r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Text),
- (r'(#\{)(' + _dot + '*?)(\})',
+ (r'(#\{)(' + _dot + r'*?)(\})',
bygroups(String.Interpol, using(RubyLexer), String.Interpol)),
(r'\n', Text, 'root'),
],
@@ -373,7 +373,7 @@ class HamlLexer(ExtendedRegexLexer):
'filter-block': [
(r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Name.Decorator),
- (r'(#\{)(' + _dot + '*?)(\})',
+ (r'(#\{)(' + _dot + r'*?)(\})',
bygroups(String.Interpol, using(RubyLexer), String.Interpol)),
(r'\n', Text, 'root'),
],
@@ -422,7 +422,7 @@ class ScamlLexer(ExtendedRegexLexer):
include('css'),
(r'%[\w:-]+', Name.Tag, 'tag'),
(r'!!!' + _dot + r'*\n', Name.Namespace, '#pop'),
- (r'(/)(\[' + _dot + '*?\])(' + _dot + r'*\n)',
+ (r'(/)(\[' + _dot + r'*?\])(' + _dot + r'*\n)',
bygroups(Comment, Comment.Special, Comment),
'#pop'),
(r'/' + _dot + r'*\n', _starts_block(Comment, 'html-comment-block'),
@@ -442,8 +442,8 @@ class ScamlLexer(ExtendedRegexLexer):
'tag': [
include('css'),
- (r'\{(,\n|' + _dot + ')*?\}', using(ScalaLexer)),
- (r'\[' + _dot + '*?\]', using(ScalaLexer)),
+ (r'\{(,\n|' + _dot + r')*?\}', using(ScalaLexer)),
+ (r'\[' + _dot + r'*?\]', using(ScalaLexer)),
(r'\(', Text, 'html-attributes'),
(r'/[ \t]*\n', Punctuation, '#pop:2'),
(r'[<>]{1,2}(?=[ \t=])', Punctuation),
@@ -452,7 +452,7 @@ class ScamlLexer(ExtendedRegexLexer):
'plain': [
(r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Text),
- (r'(#\{)(' + _dot + '*?)(\})',
+ (r'(#\{)(' + _dot + r'*?)(\})',
bygroups(String.Interpol, using(ScalaLexer), String.Interpol)),
(r'\n', Text, 'root'),
],
@@ -485,7 +485,7 @@ class ScamlLexer(ExtendedRegexLexer):
'filter-block': [
(r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Name.Decorator),
- (r'(#\{)(' + _dot + '*?)(\})',
+ (r'(#\{)(' + _dot + r'*?)(\})',
bygroups(String.Interpol, using(ScalaLexer), String.Interpol)),
(r'\n', Text, 'root'),
],
@@ -530,7 +530,7 @@ class PugLexer(ExtendedRegexLexer):
'content': [
include('css'),
(r'!!!' + _dot + r'*\n', Name.Namespace, '#pop'),
- (r'(/)(\[' + _dot + '*?\])(' + _dot + r'*\n)',
+ (r'(/)(\[' + _dot + r'*?\])(' + _dot + r'*\n)',
bygroups(Comment, Comment.Special, Comment),
'#pop'),
(r'/' + _dot + r'*\n', _starts_block(Comment, 'html-comment-block'),
@@ -551,8 +551,8 @@ class PugLexer(ExtendedRegexLexer):
'tag': [
include('css'),
- (r'\{(,\n|' + _dot + ')*?\}', using(ScalaLexer)),
- (r'\[' + _dot + '*?\]', using(ScalaLexer)),
+ (r'\{(,\n|' + _dot + r')*?\}', using(ScalaLexer)),
+ (r'\[' + _dot + r'*?\]', using(ScalaLexer)),
(r'\(', Text, 'html-attributes'),
(r'/[ \t]*\n', Punctuation, '#pop:2'),
(r'[<>]{1,2}(?=[ \t=])', Punctuation),
@@ -561,7 +561,7 @@ class PugLexer(ExtendedRegexLexer):
'plain': [
(r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Text),
- (r'(#\{)(' + _dot + '*?)(\})',
+ (r'(#\{)(' + _dot + r'*?)(\})',
bygroups(String.Interpol, using(ScalaLexer), String.Interpol)),
(r'\n', Text, 'root'),
],
@@ -594,7 +594,7 @@ class PugLexer(ExtendedRegexLexer):
'filter-block': [
(r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Name.Decorator),
- (r'(#\{)(' + _dot + '*?)(\})',
+ (r'(#\{)(' + _dot + r'*?)(\})',
bygroups(String.Interpol, using(ScalaLexer), String.Interpol)),
(r'\n', Text, 'root'),
],
diff --git a/pygments/lexers/idl.py b/pygments/lexers/idl.py
index 2fc39318..87cafe6a 100644
--- a/pygments/lexers/idl.py
+++ b/pygments/lexers/idl.py
@@ -53,7 +53,7 @@ class IDLLexer(RegexLexer):
'broyden', 'butterworth', 'bytarr', 'byte', 'byteorder',
'bytscl', 'caldat', 'calendar', 'call_external',
'call_function', 'call_method', 'call_procedure', 'canny',
- 'catch', 'cd', 'cdf_\w*', 'ceil', 'chebyshev',
+ 'catch', 'cd', r'cdf_\w*', 'ceil', 'chebyshev',
'check_math',
'chisqr_cvf', 'chisqr_pdf', 'choldc', 'cholsol', 'cindgen',
'cir_3pnt', 'close', 'cluster', 'cluster_tree', 'clust_wts',
@@ -87,7 +87,7 @@ class IDLLexer(RegexLexer):
'dlm_load', 'dlm_register', 'doc_library', 'double',
'draw_roi', 'edge_dog', 'efont', 'eigenql', 'eigenvec',
'ellipse', 'elmhes', 'emboss', 'empty', 'enable_sysrtn',
- 'eof', 'eos_\w*', 'erase', 'erf', 'erfc', 'erfcx',
+ 'eof', r'eos_\w*', 'erase', 'erf', 'erfc', 'erfcx',
'erode', 'errorplot', 'errplot', 'estimator_filter',
'execute', 'exit', 'exp', 'expand', 'expand_path', 'expint',
'extrac', 'extract_slice', 'factorial', 'fft', 'filepath',
@@ -104,11 +104,11 @@ class IDLLexer(RegexLexer):
'gauss_cvf', 'gauss_pdf', 'gauss_smooth', 'getenv',
'getwindows', 'get_drive_list', 'get_dxf_objects',
'get_kbrd', 'get_login_info', 'get_lun', 'get_screen_size',
- 'greg2jul', 'grib_\w*', 'grid3', 'griddata',
+ 'greg2jul', r'grib_\w*', 'grid3', 'griddata',
'grid_input', 'grid_tps', 'gs_iter',
- 'h5[adfgirst]_\w*', 'h5_browser', 'h5_close',
+ r'h5[adfgirst]_\w*', 'h5_browser', 'h5_close',
'h5_create', 'h5_get_libversion', 'h5_open', 'h5_parse',
- 'hanning', 'hash', 'hdf_\w*', 'heap_free',
+ 'hanning', 'hash', r'hdf_\w*', 'heap_free',
'heap_gc', 'heap_nosave', 'heap_refcount', 'heap_save',
'help', 'hilbert', 'histogram', 'hist_2d', 'hist_equal',
'hls', 'hough', 'hqr', 'hsv', 'h_eq_ct', 'h_eq_int',
@@ -156,7 +156,7 @@ class IDLLexer(RegexLexer):
'modifyct', 'moment', 'morph_close', 'morph_distance',
'morph_gradient', 'morph_hitormiss', 'morph_open',
'morph_thin', 'morph_tophat', 'multi', 'm_correlate',
- 'ncdf_\w*', 'newton', 'noise_hurl', 'noise_pick',
+ r'ncdf_\w*', 'newton', 'noise_hurl', 'noise_pick',
'noise_scatter', 'noise_slur', 'norm', 'n_elements',
'n_params', 'n_tags', 'objarr', 'obj_class', 'obj_destroy',
'obj_hasmethod', 'obj_isa', 'obj_new', 'obj_valid',
diff --git a/pygments/lexers/igor.py b/pygments/lexers/igor.py
index 1a21fe87..e2e2cdfa 100644
--- a/pygments/lexers/igor.py
+++ b/pygments/lexers/igor.py
@@ -5,7 +5,7 @@
Lexers for Igor Pro.
- :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2018 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -49,51 +49,71 @@ class IgorLexer(RegexLexer):
)
operations = (
'Abort', 'AddFIFOData', 'AddFIFOVectData', 'AddMovieAudio', 'AddMovieFrame',
- 'AdoptFiles', 'APMath', 'Append', 'AppendImage', 'AppendLayoutObject',
- 'AppendMatrixContour', 'AppendText', 'AppendToGizmo', 'AppendToGraph',
- 'AppendToLayout', 'AppendToTable', 'AppendXYZContour', 'AutoPositionWindow',
- 'BackgroundInfo', 'Beep', 'BoundingBall', 'BoxSmooth', 'BrowseURL', 'BuildMenu',
- 'Button', 'cd', 'Chart', 'CheckBox', 'CheckDisplayed', 'ChooseColor', 'Close',
- 'CloseHelp', 'CloseMovie', 'CloseProc', 'ColorScale', 'ColorTab2Wave',
- 'Concatenate', 'ControlBar', 'ControlInfo', 'ControlUpdate',
- 'ConvertGlobalStringTextEncoding', 'ConvexHull', 'Convolve', 'CopyFile',
- 'CopyFolder', 'CopyScales', 'Correlate', 'CreateAliasShortcut', 'CreateBrowser',
- 'Cross', 'CtrlBackground', 'CtrlFIFO', 'CtrlNamedBackground', 'Cursor',
- 'CurveFit', 'CustomControl', 'CWT', 'Debugger', 'DebuggerOptions', 'DefaultFont',
- 'DefaultGuiControls', 'DefaultGuiFont', 'DefaultTextEncoding', 'DefineGuide',
- 'DelayUpdate', 'DeleteAnnotations', 'DeleteFile', 'DeleteFolder', 'DeletePoints',
- 'Differentiate', 'dir', 'Display', 'DisplayHelpTopic', 'DisplayProcedure',
- 'DoAlert', 'DoIgorMenu', 'DoUpdate', 'DoWindow', 'DoXOPIdle', 'DPSS',
- 'DrawAction', 'DrawArc', 'DrawBezier', 'DrawLine', 'DrawOval', 'DrawPICT',
- 'DrawPoly', 'DrawRect', 'DrawRRect', 'DrawText', 'DrawUserShape', 'DSPDetrend',
- 'DSPPeriodogram', 'Duplicate', 'DuplicateDataFolder', 'DWT', 'EdgeStats', 'Edit',
- 'ErrorBars', 'EstimatePeakSizes', 'Execute', 'ExecuteScriptText',
+ 'AddWavesToBoxPlot', 'AddWavesToViolinPlot', 'AdoptFiles', 'APMath', 'Append',
+ 'AppendBoxPlot', 'AppendImage', 'AppendLayoutObject', 'AppendMatrixContour',
+ 'AppendText', 'AppendToGizmo', 'AppendToGraph', 'AppendToLayout', 'AppendToTable',
+ 'AppendViolinPlot', 'AppendXYZContour', 'AutoPositionWindow',
+ 'AxonTelegraphFindServers', 'BackgroundInfo', 'Beep', 'BoundingBall', 'BoxSmooth',
+ 'BrowseURL', 'BuildMenu', 'Button', 'cd', 'Chart', 'CheckBox', 'CheckDisplayed',
+ 'ChooseColor', 'Close', 'CloseHelp', 'CloseMovie', 'CloseProc', 'ColorScale',
+ 'ColorTab2Wave', 'Concatenate', 'ControlBar', 'ControlInfo', 'ControlUpdate',
+ 'ConvertGlobalStringTextEncoding', 'ConvexHull', 'Convolve', 'CopyDimLabels',
+ 'CopyFile', 'CopyFolder', 'CopyScales', 'Correlate', 'CreateAliasShortcut',
+ 'CreateBrowser', 'Cross', 'CtrlBackground', 'CtrlFIFO', 'CtrlNamedBackground',
+ 'Cursor', 'CurveFit', 'CustomControl', 'CWT', 'DAQmx_AI_SetupReader',
+ 'DAQmx_AO_SetOutputs', 'DAQmx_CTR_CountEdges', 'DAQmx_CTR_OutputPulse',
+ 'DAQmx_CTR_Period', 'DAQmx_CTR_PulseWidth', 'DAQmx_DIO_Config',
+ 'DAQmx_DIO_WriteNewData', 'DAQmx_Scan', 'DAQmx_WaveformGen', 'Debugger',
+ 'DebuggerOptions', 'DefaultFont', 'DefaultGuiControls', 'DefaultGuiFont',
+ 'DefaultTextEncoding', 'DefineGuide', 'DelayUpdate', 'DeleteAnnotations',
+ 'DeleteFile', 'DeleteFolder', 'DeletePoints', 'Differentiate', 'dir', 'Display',
+ 'DisplayHelpTopic', 'DisplayProcedure', 'DoAlert', 'DoIgorMenu', 'DoUpdate',
+ 'DoWindow', 'DoXOPIdle', 'DPSS', 'DrawAction', 'DrawArc', 'DrawBezier',
+ 'DrawLine', 'DrawOval', 'DrawPICT', 'DrawPoly', 'DrawRect', 'DrawRRect',
+ 'DrawText', 'DrawUserShape', 'DSPDetrend', 'DSPPeriodogram', 'Duplicate',
+ 'DuplicateDataFolder', 'DWT', 'EdgeStats', 'Edit', 'ErrorBars',
+ 'EstimatePeakSizes', 'Execute', 'ExecuteScriptText', 'ExperimentInfo',
'ExperimentModified', 'ExportGizmo', 'Extract', 'FastGaussTransform', 'FastOp',
- 'FBinRead', 'FBinWrite', 'FFT', 'FIFOStatus', 'FIFO2Wave', 'FilterFIR',
+ 'FBinRead', 'FBinWrite', 'FFT', 'FGetPos', 'FIFOStatus', 'FIFO2Wave', 'FilterFIR',
'FilterIIR', 'FindAPeak', 'FindContour', 'FindDuplicates', 'FindLevel',
'FindLevels', 'FindPeak', 'FindPointsInPoly', 'FindRoots', 'FindSequence',
- 'FindValue', 'FPClustering', 'fprintf', 'FReadLine', 'FSetPos', 'FStatus',
- 'FTPCreateDirectory', 'FTPDelete', 'FTPDownload', 'FTPUpload', 'FuncFit',
- 'FuncFitMD', 'GBLoadWave', 'GetAxis', 'GetCamera', 'GetFileFolderInfo',
+ 'FindValue', 'FMaxFlat', 'FPClustering', 'fprintf', 'FReadLine', 'FSetPos',
+ 'FStatus', 'FTPCreateDirectory', 'FTPDelete', 'FTPDownload', 'FTPUpload',
+ 'FuncFit', 'FuncFitMD', 'GBLoadWave', 'GetAxis', 'GetCamera', 'GetFileFolderInfo',
'GetGizmo', 'GetLastUserMenuInfo', 'GetMarquee', 'GetMouse', 'GetSelection',
- 'GetWindow', 'GPIBReadBinaryWave2', 'GPIBReadBinary2', 'GPIBReadWave2',
- 'GPIBRead2', 'GPIBWriteBinaryWave2', 'GPIBWriteBinary2', 'GPIBWriteWave2',
- 'GPIBWrite2', 'GPIB2', 'GraphNormal', 'GraphWaveDraw', 'GraphWaveEdit', 'Grep',
- 'GroupBox', 'Hanning', 'HDF5CloseFile', 'HDF5CloseGroup', 'HDF5ConvertColors',
- 'HDF5CreateFile', 'HDF5CreateGroup', 'HDF5CreateLink', 'HDF5Dump',
- 'HDF5DumpErrors', 'HDF5DumpState', 'HDF5ListAttributes', 'HDF5ListGroup',
- 'HDF5LoadData', 'HDF5LoadGroup', 'HDF5LoadImage', 'HDF5OpenFile', 'HDF5OpenGroup',
- 'HDF5SaveData', 'HDF5SaveGroup', 'HDF5SaveImage', 'HDF5TestOperation',
- 'HDF5UnlinkObject', 'HideIgorMenus', 'HideInfo', 'HideProcedures', 'HideTools',
- 'HilbertTransform', 'Histogram', 'ICA', 'IFFT', 'ImageAnalyzeParticles',
- 'ImageBlend', 'ImageBoundaryToMask', 'ImageEdgeDetection', 'ImageFileInfo',
- 'ImageFilter', 'ImageFocus', 'ImageFromXYZ', 'ImageGenerateROIMask', 'ImageGLCM',
+ 'GetWindow', 'GISCreateVectorLayer', 'GISGetRasterInfo',
+ 'GISGetRegisteredFileInfo', 'GISGetVectorLayerInfo', 'GISLoadRasterData',
+ 'GISLoadVectorData', 'GISRasterizeVectorData', 'GISRegisterFile',
+ 'GISTransformCoords', 'GISUnRegisterFile', 'GISWriteFieldData',
+ 'GISWriteGeometryData', 'GISWriteRaster', 'GPIBReadBinaryWave2',
+ 'GPIBReadBinary2', 'GPIBReadWave2', 'GPIBRead2', 'GPIBWriteBinaryWave2',
+ 'GPIBWriteBinary2', 'GPIBWriteWave2', 'GPIBWrite2', 'GPIB2', 'GraphNormal',
+ 'GraphWaveDraw', 'GraphWaveEdit', 'Grep', 'GroupBox', 'Hanning', 'HDFInfo',
+ 'HDFReadImage', 'HDFReadSDS', 'HDFReadVset', 'HDF5CloseFile', 'HDF5CloseGroup',
+ 'HDF5ConvertColors', 'HDF5CreateFile', 'HDF5CreateGroup', 'HDF5CreateLink',
+ 'HDF5Dump', 'HDF5DumpErrors', 'HDF5DumpState', 'HDF5FlushFile',
+ 'HDF5ListAttributes', 'HDF5ListGroup', 'HDF5LoadData', 'HDF5LoadGroup',
+ 'HDF5LoadImage', 'HDF5OpenFile', 'HDF5OpenGroup', 'HDF5SaveData', 'HDF5SaveGroup',
+ 'HDF5SaveImage', 'HDF5TestOperation', 'HDF5UnlinkObject', 'HideIgorMenus',
+ 'HideInfo', 'HideProcedures', 'HideTools', 'HilbertTransform', 'Histogram', 'ICA',
+ 'IFFT', 'ImageAnalyzeParticles', 'ImageBlend', 'ImageBoundaryToMask',
+ 'ImageComposite', 'ImageEdgeDetection', 'ImageFileInfo', 'ImageFilter',
+ 'ImageFocus', 'ImageFromXYZ', 'ImageGenerateROIMask', 'ImageGLCM',
'ImageHistModification', 'ImageHistogram', 'ImageInterpolate', 'ImageLineProfile',
'ImageLoad', 'ImageMorphology', 'ImageRegistration', 'ImageRemoveBackground',
'ImageRestore', 'ImageRotate', 'ImageSave', 'ImageSeedFill', 'ImageSkeleton3d',
'ImageSnake', 'ImageStats', 'ImageThreshold', 'ImageTransform',
'ImageUnwrapPhase', 'ImageWindow', 'IndexSort', 'InsertPoints', 'Integrate',
'IntegrateODE', 'Integrate2D', 'Interpolate2', 'Interpolate3D', 'Interp3DPath',
+ 'ITCCloseAll2', 'ITCCloseDevice2', 'ITCConfigAllChannels2',
+ 'ITCConfigChannelReset2', 'ITCConfigChannelUpload2', 'ITCConfigChannel2',
+ 'ITCFIFOAvailableAll2', 'ITCFIFOAvailable2', 'ITCGetAllChannelsConfig2',
+ 'ITCGetChannelConfig2', 'ITCGetCurrentDevice2', 'ITCGetDeviceInfo2',
+ 'ITCGetDevices2', 'ITCGetErrorString2', 'ITCGetSerialNumber2', 'ITCGetState2',
+ 'ITCGetVersions2', 'ITCInitialize2', 'ITCOpenDevice2', 'ITCReadADC2',
+ 'ITCReadDigital2', 'ITCReadTimer2', 'ITCSelectDevice2', 'ITCSetDAC2',
+ 'ITCSetGlobals2', 'ITCSetModes2', 'ITCSetState2', 'ITCStartAcq2', 'ITCStopAcq2',
+ 'ITCUpdateFIFOPositionAll2', 'ITCUpdateFIFOPosition2', 'ITCWriteDigital2',
'JCAMPLoadWave', 'JointHistogram', 'KillBackground', 'KillControl',
'KillDataFolder', 'KillFIFO', 'KillFreeAxis', 'KillPath', 'KillPICTs',
'KillStrings', 'KillVariables', 'KillWaves', 'KillWindow', 'KMeans', 'Label',
@@ -104,39 +124,48 @@ class IgorLexer(RegexLexer):
'MatrixFilter', 'MatrixGaussJ', 'MatrixGLM', 'MatrixInverse', 'MatrixLinearSolve',
'MatrixLinearSolveTD', 'MatrixLLS', 'MatrixLUBkSub', 'MatrixLUD', 'MatrixLUDTD',
'MatrixMultiply', 'MatrixOP', 'MatrixSchur', 'MatrixSolve', 'MatrixSVBkSub',
- 'MatrixSVD', 'MatrixTranspose', 'MeasureStyledText', 'MLLoadWave', 'Modify',
- 'ModifyBrowser', 'ModifyCamera', 'ModifyContour', 'ModifyControl',
- 'ModifyControlList', 'ModifyFreeAxis', 'ModifyGizmo', 'ModifyGraph',
- 'ModifyImage', 'ModifyLayout', 'ModifyPanel', 'ModifyTable', 'ModifyWaterfall',
- 'MoveDataFolder', 'MoveFile', 'MoveFolder', 'MoveString', 'MoveSubwindow',
- 'MoveVariable', 'MoveWave', 'MoveWindow', 'MultiTaperPSD',
- 'MultiThreadingControl', 'NeuralNetworkRun', 'NeuralNetworkTrain', 'NewCamera',
- 'NewDataFolder', 'NewFIFO', 'NewFIFOChan', 'NewFreeAxis', 'NewGizmo', 'NewImage',
- 'NewLayout', 'NewMovie', 'NewNotebook', 'NewPanel', 'NewPath', 'NewWaterfall',
- 'NI4882', 'Note', 'Notebook', 'NotebookAction', 'Open', 'OpenHelp',
- 'OpenNotebook', 'Optimize', 'ParseOperationTemplate', 'PathInfo', 'PauseForUser',
- 'PauseUpdate', 'PCA', 'PlayMovie', 'PlayMovieAction', 'PlaySound',
- 'PopupContextualMenu', 'PopupMenu', 'Preferences', 'PrimeFactors', 'Print',
- 'printf', 'PrintGraphs', 'PrintLayout', 'PrintNotebook', 'PrintSettings',
- 'PrintTable', 'Project', 'PulseStats', 'PutScrapText', 'pwd', 'Quit',
- 'RatioFromNumber', 'Redimension', 'Remove', 'RemoveContour', 'RemoveFromGizmo',
- 'RemoveFromGraph', 'RemoveFromLayout', 'RemoveFromTable', 'RemoveImage',
- 'RemoveLayoutObjects', 'RemovePath', 'Rename', 'RenameDataFolder', 'RenamePath',
- 'RenamePICT', 'RenameWindow', 'ReorderImages', 'ReorderTraces', 'ReplaceText',
- 'ReplaceWave', 'Resample', 'ResumeUpdate', 'Reverse', 'Rotate', 'Save',
- 'SaveData', 'SaveExperiment', 'SaveGraphCopy', 'SaveNotebook',
+ 'MatrixSVD', 'MatrixTranspose', 'MCC_FindServers', 'MeasureStyledText',
+ 'MFR_CheckForNewBricklets',
+ 'MFR_CloseResultFile', 'MFR_CreateOverviewTable', 'MFR_GetBrickletCount',
+ 'MFR_GetBrickletData', 'MFR_GetBrickletDeployData', 'MFR_GetBrickletMetaData',
+ 'MFR_GetBrickletRawData', 'MFR_GetReportTemplate', 'MFR_GetResultFileMetaData',
+ 'MFR_GetResultFileName', 'MFR_GetVernissageVersion', 'MFR_GetVersion',
+ 'MFR_GetXOPErrorMessage', 'MFR_OpenResultFile',
+ 'MLLoadWave', 'Modify', 'ModifyBoxPlot', 'ModifyBrowser', 'ModifyCamera',
+ 'ModifyContour', 'ModifyControl', 'ModifyControlList', 'ModifyFreeAxis',
+ 'ModifyGizmo', 'ModifyGraph', 'ModifyImage', 'ModifyLayout', 'ModifyPanel',
+ 'ModifyTable', 'ModifyViolinPlot', 'ModifyWaterfall', 'MoveDataFolder',
+ 'MoveFile', 'MoveFolder', 'MoveString', 'MoveSubwindow', 'MoveVariable',
+ 'MoveWave', 'MoveWindow', 'MultiTaperPSD', 'MultiThreadingControl',
+ 'NC_CloseFile', 'NC_DumpErrors', 'NC_Inquire', 'NC_ListAttributes',
+ 'NC_ListObjects', 'NC_LoadData', 'NC_OpenFile', 'NeuralNetworkRun',
+ 'NeuralNetworkTrain', 'NewCamera', 'NewDataFolder', 'NewFIFO', 'NewFIFOChan',
+ 'NewFreeAxis', 'NewGizmo', 'NewImage', 'NewLayout', 'NewMovie', 'NewNotebook',
+ 'NewPanel', 'NewPath', 'NewWaterfall', 'NILoadWave', 'NI4882', 'Note', 'Notebook',
+ 'NotebookAction', 'Open', 'OpenHelp', 'OpenNotebook', 'Optimize',
+ 'ParseOperationTemplate', 'PathInfo', 'PauseForUser', 'PauseUpdate', 'PCA',
+ 'PlayMovie', 'PlayMovieAction', 'PlaySound', 'PopupContextualMenu', 'PopupMenu',
+ 'Preferences', 'PrimeFactors', 'Print', 'printf', 'PrintGraphs', 'PrintLayout',
+ 'PrintNotebook', 'PrintSettings', 'PrintTable', 'Project', 'PulseStats',
+ 'PutScrapText', 'pwd', 'Quit', 'RatioFromNumber', 'Redimension', 'Remez',
+ 'Remove', 'RemoveContour', 'RemoveFromGizmo', 'RemoveFromGraph',
+ 'RemoveFromLayout', 'RemoveFromTable', 'RemoveImage', 'RemoveLayoutObjects',
+ 'RemovePath', 'Rename', 'RenameDataFolder', 'RenamePath', 'RenamePICT',
+ 'RenameWindow', 'ReorderImages', 'ReorderTraces', 'ReplaceText', 'ReplaceWave',
+ 'Resample', 'ResumeUpdate', 'Reverse', 'Rotate', 'Save', 'SaveData',
+ 'SaveExperiment', 'SaveGizmoCopy', 'SaveGraphCopy', 'SaveNotebook',
'SavePackagePreferences', 'SavePICT', 'SaveTableCopy', 'SetActiveSubwindow',
'SetAxis', 'SetBackground', 'SetDashPattern', 'SetDataFolder', 'SetDimLabel',
- 'SetDrawEnv', 'SetDrawLayer', 'SetFileFolderInfo', 'SetFormula', 'SetIgorHook',
- 'SetIgorMenuMode', 'SetIgorOption', 'SetMarquee', 'SetProcessSleep',
- 'SetRandomSeed', 'SetScale', 'SetVariable', 'SetWaveLock', 'SetWaveTextEncoding',
- 'SetWindow', 'ShowIgorMenus', 'ShowInfo', 'ShowTools', 'Silent', 'Sleep',
- 'Slider', 'Smooth', 'SmoothCustom', 'Sort', 'SortColumns', 'SoundInRecord',
- 'SoundInSet', 'SoundInStartChart', 'SoundInStatus', 'SoundInStopChart',
- 'SoundLoadWave', 'SoundSaveWave', 'SphericalInterpolate', 'SphericalTriangulate',
- 'SplitString', 'SplitWave', 'sprintf', 'sscanf', 'Stack', 'StackWindows',
- 'StatsAngularDistanceTest', 'StatsANOVA1Test', 'StatsANOVA2NRTest',
- 'StatsANOVA2RMTest', 'StatsANOVA2Test', 'StatsChiTest',
+ 'SetDrawEnv', 'SetDrawLayer', 'SetFileFolderInfo', 'SetFormula', 'SetIdlePeriod',
+ 'SetIgorHook', 'SetIgorMenuMode', 'SetIgorOption', 'SetMarquee',
+ 'SetProcessSleep', 'SetRandomSeed', 'SetScale', 'SetVariable', 'SetWaveLock',
+ 'SetWaveTextEncoding', 'SetWindow', 'ShowIgorMenus', 'ShowInfo', 'ShowTools',
+ 'Silent', 'Sleep', 'Slider', 'Smooth', 'SmoothCustom', 'Sort', 'SortColumns',
+ 'SoundInRecord', 'SoundInSet', 'SoundInStartChart', 'SoundInStatus',
+ 'SoundInStopChart', 'SoundLoadWave', 'SoundSaveWave', 'SphericalInterpolate',
+ 'SphericalTriangulate', 'SplitString', 'SplitWave', 'sprintf', 'SQLHighLevelOp',
+ 'sscanf', 'Stack', 'StackWindows', 'StatsAngularDistanceTest', 'StatsANOVA1Test',
+ 'StatsANOVA2NRTest', 'StatsANOVA2RMTest', 'StatsANOVA2Test', 'StatsChiTest',
'StatsCircularCorrelationTest', 'StatsCircularMeans', 'StatsCircularMoments',
'StatsCircularTwoSampleTest', 'StatsCochranTest', 'StatsContingencyTable',
'StatsDIPTest', 'StatsDunnettTest', 'StatsFriedmanTest', 'StatsFTest',
@@ -148,23 +177,30 @@ class IgorLexer(RegexLexer):
'StatsSignTest', 'StatsSRTest', 'StatsTTest', 'StatsTukeyTest',
'StatsVariancesTest', 'StatsWatsonUSquaredTest', 'StatsWatsonWilliamsTest',
'StatsWheelerWatsonTest', 'StatsWilcoxonRankTest', 'StatsWRCorrelationTest',
- 'String', 'StructGet', 'StructPut', 'SumDimension', 'SumSeries', 'TabControl',
- 'Tag', 'TextBox', 'ThreadGroupPutDF', 'ThreadStart', 'Tile', 'TileWindows',
+ 'STFT', 'String', 'StructFill', 'StructGet', 'StructPut', 'SumDimension',
+ 'SumSeries', 'TabControl', 'Tag', 'TDMLoadData', 'TDMSaveData', 'TextBox',
+ 'ThreadGroupPutDF', 'ThreadStart', 'TickWavesFromAxis', 'Tile', 'TileWindows',
'TitleBox', 'ToCommandLine', 'ToolsGrid', 'Triangulate3d', 'Unwrap', 'URLRequest',
'ValDisplay', 'Variable', 'VDTClosePort2', 'VDTGetPortList2', 'VDTGetStatus2',
'VDTOpenPort2', 'VDTOperationsPort2', 'VDTReadBinaryWave2', 'VDTReadBinary2',
'VDTReadHexWave2', 'VDTReadHex2', 'VDTReadWave2', 'VDTRead2', 'VDTTerminalPort2',
'VDTWriteBinaryWave2', 'VDTWriteBinary2', 'VDTWriteHexWave2', 'VDTWriteHex2',
- 'VDTWriteWave2', 'VDTWrite2', 'VDT2', 'WaveMeanStdv', 'WaveStats',
+ 'VDTWriteWave2', 'VDTWrite2', 'VDT2', 'VISAControl', 'VISARead', 'VISAReadBinary',
+ 'VISAReadBinaryWave', 'VISAReadWave', 'VISAWrite', 'VISAWriteBinary',
+ 'VISAWriteBinaryWave', 'VISAWriteWave', 'WaveMeanStdv', 'WaveStats',
'WaveTransform', 'wfprintf', 'WignerTransform', 'WindowFunction', 'XLLoadWave'
)
functions = (
'abs', 'acos', 'acosh', 'AddListItem', 'AiryA', 'AiryAD', 'AiryB', 'AiryBD',
'alog', 'AnnotationInfo', 'AnnotationList', 'area', 'areaXY', 'asin', 'asinh',
- 'atan', 'atanh', 'atan2', 'AxisInfo', 'AxisList', 'AxisValFromPixel', 'Besseli',
- 'Besselj', 'Besselk', 'Bessely', 'beta', 'betai', 'BinarySearch',
- 'BinarySearchInterp', 'binomial', 'binomialln', 'binomialNoise', 'cabs',
- 'CaptureHistory', 'CaptureHistoryStart', 'ceil', 'cequal', 'char2num',
+ 'atan', 'atanh', 'atan2', 'AxisInfo', 'AxisList', 'AxisValFromPixel',
+ 'AxonTelegraphAGetDataNum', 'AxonTelegraphAGetDataString',
+ 'AxonTelegraphAGetDataStruct', 'AxonTelegraphGetDataNum',
+ 'AxonTelegraphGetDataString', 'AxonTelegraphGetDataStruct',
+ 'AxonTelegraphGetTimeoutMs', 'AxonTelegraphSetTimeoutMs', 'Base64Decode',
+ 'Base64Encode', 'Besseli', 'Besselj', 'Besselk', 'Bessely', 'beta', 'betai',
+ 'BinarySearch', 'BinarySearchInterp', 'binomial', 'binomialln', 'binomialNoise',
+ 'cabs', 'CaptureHistory', 'CaptureHistoryStart', 'ceil', 'cequal', 'char2num',
'chebyshev', 'chebyshevU', 'CheckName', 'ChildWindowList', 'CleanupName', 'cmplx',
'cmpstr', 'conj', 'ContourInfo', 'ContourNameList', 'ContourNameToWaveRef',
'ContourZ', 'ControlNameList', 'ConvertTextEncoding', 'cos', 'cosh',
@@ -172,37 +208,70 @@ class IgorLexer(RegexLexer):
'CreationDate', 'csc', 'csch', 'CsrInfo', 'CsrWave', 'CsrWaveRef', 'CsrXWave',
'CsrXWaveRef', 'CTabList', 'DataFolderDir', 'DataFolderExists',
'DataFolderRefsEqual', 'DataFolderRefStatus', 'date', 'datetime', 'DateToJulian',
- 'date2secs', 'Dawson', 'DDERequestString', 'defined', 'deltax', 'digamma',
- 'dilogarithm', 'DimDelta', 'DimOffset', 'DimSize', 'ei', 'enoise', 'equalWaves',
- 'erf', 'erfc', 'erfcw', 'exists', 'exp', 'ExpConvExp', 'ExpConvExpFit',
- 'ExpConvExpFitBL', 'ExpConvExpFit1Shape', 'ExpConvExpFit1ShapeBL', 'ExpGauss',
- 'ExpGaussFit', 'ExpGaussFitBL', 'ExpGaussFit1Shape', 'ExpGaussFit1ShapeBL',
- 'expInt', 'expIntegralE1', 'expNoise', 'factorial', 'fakedata', 'faverage',
- 'faverageXY', 'FetchURL', 'FindDimLabel', 'FindListItem', 'floor', 'FontList',
- 'FontSizeHeight', 'FontSizeStringWidth', 'FresnelCos', 'FresnelSin',
+ 'date2secs', 'Dawson', 'defined', 'deltax', 'digamma', 'dilogarithm', 'DimDelta',
+ 'DimOffset', 'DimSize', 'ei', 'enoise', 'equalWaves', 'erf', 'erfc', 'erfcw',
+ 'exists', 'exp', 'expInt', 'expIntegralE1', 'expNoise', 'factorial', 'Faddeeva',
+ 'fakedata', 'faverage', 'faverageXY', 'fDAQmx_AI_GetReader',
+ 'fDAQmx_AO_UpdateOutputs', 'fDAQmx_ConnectTerminals', 'fDAQmx_CTR_Finished',
+ 'fDAQmx_CTR_IsFinished', 'fDAQmx_CTR_IsPulseFinished', 'fDAQmx_CTR_ReadCounter',
+ 'fDAQmx_CTR_ReadWithOptions', 'fDAQmx_CTR_SetPulseFrequency', 'fDAQmx_CTR_Start',
+ 'fDAQmx_DeviceNames', 'fDAQmx_DIO_Finished', 'fDAQmx_DIO_PortWidth',
+ 'fDAQmx_DIO_Read', 'fDAQmx_DIO_Write', 'fDAQmx_DisconnectTerminals',
+ 'fDAQmx_ErrorString', 'fDAQmx_ExternalCalDate', 'fDAQmx_NumAnalogInputs',
+ 'fDAQmx_NumAnalogOutputs', 'fDAQmx_NumCounters', 'fDAQmx_NumDIOPorts',
+ 'fDAQmx_ReadChan', 'fDAQmx_ReadNamedChan', 'fDAQmx_ResetDevice',
+ 'fDAQmx_ScanGetAvailable', 'fDAQmx_ScanGetNextIndex', 'fDAQmx_ScanStart',
+ 'fDAQmx_ScanStop', 'fDAQmx_ScanWait', 'fDAQmx_ScanWaitWithTimeout',
+ 'fDAQmx_SelfCalDate', 'fDAQmx_SelfCalibration', 'fDAQmx_WaveformStart',
+ 'fDAQmx_WaveformStop', 'fDAQmx_WF_IsFinished', 'fDAQmx_WF_WaitUntilFinished',
+ 'fDAQmx_WriteChan', 'FetchURL', 'FindDimLabel', 'FindListItem', 'floor',
+ 'FontList', 'FontSizeHeight', 'FontSizeStringWidth', 'FresnelCos', 'FresnelSin',
'FuncRefInfo', 'FunctionInfo', 'FunctionList', 'FunctionPath', 'gamma',
'gammaEuler', 'gammaInc', 'gammaNoise', 'gammln', 'gammp', 'gammq', 'Gauss',
- 'GaussFit', 'GaussFitBL', 'GaussFit1Width', 'GaussFit1WidthBL', 'Gauss1D',
- 'Gauss2D', 'gcd', 'GetBrowserLine', 'GetBrowserSelection', 'GetDataFolder',
- 'GetDataFolderDFR', 'GetDefaultFont', 'GetDefaultFontSize', 'GetDefaultFontStyle',
- 'GetDimLabel', 'GetEnvironmentVariable', 'GetErrMessage', 'GetFormula',
- 'GetIndependentModuleName', 'GetIndexedObjName', 'GetIndexedObjNameDFR',
- 'GetKeyState', 'GetRTErrMessage', 'GetRTError', 'GetRTLocation', 'GetRTLocInfo',
- 'GetRTStackInfo', 'GetScrapText', 'GetUserData', 'GetWavesDataFolder',
- 'GetWavesDataFolderDFR', 'GizmoInfo', 'GizmoScale', 'gnoise', 'GrepList',
- 'GrepString', 'GuideInfo', 'GuideNameList', 'Hash', 'hcsr', 'HDF5AttributeInfo',
+ 'Gauss1D', 'Gauss2D', 'gcd', 'GetBrowserLine', 'GetBrowserSelection',
+ 'GetDataFolder', 'GetDataFolderDFR', 'GetDefaultFont', 'GetDefaultFontSize',
+ 'GetDefaultFontStyle', 'GetDimLabel', 'GetEnvironmentVariable', 'GetErrMessage',
+ 'GetFormula', 'GetIndependentModuleName', 'GetIndexedObjName',
+ 'GetIndexedObjNameDFR', 'GetKeyState', 'GetRTErrMessage', 'GetRTError',
+ 'GetRTLocation', 'GetRTLocInfo', 'GetRTStackInfo', 'GetScrapText', 'GetUserData',
+ 'GetWavesDataFolder', 'GetWavesDataFolderDFR', 'GISGetAllFileFormats',
+ 'GISSRefsAreEqual', 'GizmoInfo', 'GizmoScale', 'gnoise', 'GrepList', 'GrepString',
+ 'GuideInfo', 'GuideNameList', 'Hash', 'hcsr', 'HDF5AttributeInfo',
'HDF5DatasetInfo', 'HDF5LibraryInfo', 'HDF5TypeInfo', 'hermite', 'hermiteGauss',
'HyperGNoise', 'HyperGPFQ', 'HyperG0F1', 'HyperG1F1', 'HyperG2F1', 'IgorInfo',
'IgorVersion', 'imag', 'ImageInfo', 'ImageNameList', 'ImageNameToWaveRef',
- 'IndependentModuleList', 'IndexedDir', 'IndexedFile', 'Inf', 'Integrate1D',
- 'interp', 'Interp2D', 'Interp3D', 'inverseERF', 'inverseERFC', 'ItemsInList',
- 'JacobiCn', 'JacobiSn', 'JulianToDate', 'Laguerre', 'LaguerreA', 'LaguerreGauss',
- 'LambertW', 'LayoutInfo', 'leftx', 'LegendreA', 'limit', 'ListMatch',
- 'ListToTextWave', 'ListToWaveRefWave', 'ln', 'log', 'logNormalNoise',
- 'LorentzianFit', 'LorentzianFitBL', 'LorentzianFit1Width',
- 'LorentzianFit1WidthBL', 'lorentzianNoise', 'LowerStr', 'MacroList', 'magsqr',
- 'MandelbrotPoint', 'MarcumQ', 'MatrixCondition', 'MatrixDet', 'MatrixDot',
- 'MatrixRank', 'MatrixTrace', 'max', 'mean', 'median', 'min', 'mod', 'ModDate',
+ 'IndependentModuleList', 'IndexedDir', 'IndexedFile', 'IndexToScale', 'Inf',
+ 'Integrate1D', 'interp', 'Interp2D', 'Interp3D', 'inverseERF', 'inverseERFC',
+ 'ItemsInList', 'JacobiCn', 'JacobiSn', 'JulianToDate', 'Laguerre', 'LaguerreA',
+ 'LaguerreGauss', 'LambertW', 'LayoutInfo', 'leftx', 'LegendreA', 'limit',
+ 'ListMatch', 'ListToTextWave', 'ListToWaveRefWave', 'ln', 'log', 'logNormalNoise',
+ 'lorentzianNoise', 'LowerStr', 'MacroList', 'magsqr', 'MandelbrotPoint',
+ 'MarcumQ', 'MatrixCondition', 'MatrixDet', 'MatrixDot', 'MatrixRank',
+ 'MatrixTrace', 'max', 'MCC_AutoBridgeBal', 'MCC_AutoFastComp',
+ 'MCC_AutoPipetteOffset', 'MCC_AutoSlowComp', 'MCC_AutoWholeCellComp',
+ 'MCC_GetBridgeBalEnable', 'MCC_GetBridgeBalResist', 'MCC_GetFastCompCap',
+ 'MCC_GetFastCompTau', 'MCC_GetHolding', 'MCC_GetHoldingEnable', 'MCC_GetMode',
+ 'MCC_GetNeutralizationCap', 'MCC_GetNeutralizationEnable',
+ 'MCC_GetOscKillerEnable', 'MCC_GetPipetteOffset', 'MCC_GetPrimarySignalGain',
+ 'MCC_GetPrimarySignalHPF', 'MCC_GetPrimarySignalLPF', 'MCC_GetRsCompBandwidth',
+ 'MCC_GetRsCompCorrection', 'MCC_GetRsCompEnable', 'MCC_GetRsCompPrediction',
+ 'MCC_GetSecondarySignalGain', 'MCC_GetSecondarySignalLPF', 'MCC_GetSlowCompCap',
+ 'MCC_GetSlowCompTau', 'MCC_GetSlowCompTauX20Enable',
+ 'MCC_GetSlowCurrentInjEnable', 'MCC_GetSlowCurrentInjLevel',
+ 'MCC_GetSlowCurrentInjSetlTime', 'MCC_GetWholeCellCompCap',
+ 'MCC_GetWholeCellCompEnable', 'MCC_GetWholeCellCompResist',
+ 'MCC_SelectMultiClamp700B', 'MCC_SetBridgeBalEnable', 'MCC_SetBridgeBalResist',
+ 'MCC_SetFastCompCap', 'MCC_SetFastCompTau', 'MCC_SetHolding',
+ 'MCC_SetHoldingEnable', 'MCC_SetMode', 'MCC_SetNeutralizationCap',
+ 'MCC_SetNeutralizationEnable', 'MCC_SetOscKillerEnable', 'MCC_SetPipetteOffset',
+ 'MCC_SetPrimarySignalGain', 'MCC_SetPrimarySignalHPF', 'MCC_SetPrimarySignalLPF',
+ 'MCC_SetRsCompBandwidth', 'MCC_SetRsCompCorrection', 'MCC_SetRsCompEnable',
+ 'MCC_SetRsCompPrediction', 'MCC_SetSecondarySignalGain',
+ 'MCC_SetSecondarySignalLPF', 'MCC_SetSlowCompCap', 'MCC_SetSlowCompTau',
+ 'MCC_SetSlowCompTauX20Enable', 'MCC_SetSlowCurrentInjEnable',
+ 'MCC_SetSlowCurrentInjLevel', 'MCC_SetSlowCurrentInjSetlTime', 'MCC_SetTimeoutMs',
+ 'MCC_SetWholeCellCompCap', 'MCC_SetWholeCellCompEnable',
+ 'MCC_SetWholeCellCompResist', 'mean', 'median', 'min', 'mod', 'ModDate',
'MPFXEMGPeak', 'MPFXExpConvExpPeak', 'MPFXGaussPeak', 'MPFXLorenzianPeak',
'MPFXVoigtPeak', 'NameOfWave', 'NaN', 'NewFreeDataFolder', 'NewFreeWave', 'norm',
'NormalizeUnicode', 'note', 'NumberByKey', 'numpnts', 'numtype',
@@ -217,9 +286,30 @@ class IgorLexer(RegexLexer):
'SelectNumber', 'SelectString', 'SetEnvironmentVariable', 'sign', 'sin', 'sinc',
'sinh', 'sinIntegral', 'SortList', 'SpecialCharacterInfo', 'SpecialCharacterList',
'SpecialDirPath', 'SphericalBessJ', 'SphericalBessJD', 'SphericalBessY',
- 'SphericalBessYD', 'SphericalHarmonics', 'sqrt', 'StartMSTimer', 'StatsBetaCDF',
- 'StatsBetaPDF', 'StatsBinomialCDF', 'StatsBinomialPDF', 'StatsCauchyCDF',
- 'StatsCauchyPDF', 'StatsChiCDF', 'StatsChiPDF', 'StatsCMSSDCDF',
+ 'SphericalBessYD', 'SphericalHarmonics', 'SQLAllocHandle', 'SQLAllocStmt',
+ 'SQLBinaryWavesToTextWave', 'SQLBindCol', 'SQLBindParameter', 'SQLBrowseConnect',
+ 'SQLBulkOperations', 'SQLCancel', 'SQLCloseCursor', 'SQLColAttributeNum',
+ 'SQLColAttributeStr', 'SQLColumnPrivileges', 'SQLColumns', 'SQLConnect',
+ 'SQLDataSources', 'SQLDescribeCol', 'SQLDescribeParam', 'SQLDisconnect',
+ 'SQLDriverConnect', 'SQLDrivers', 'SQLEndTran', 'SQLError', 'SQLExecDirect',
+ 'SQLExecute', 'SQLFetch', 'SQLFetchScroll', 'SQLForeignKeys', 'SQLFreeConnect',
+ 'SQLFreeEnv', 'SQLFreeHandle', 'SQLFreeStmt', 'SQLGetConnectAttrNum',
+ 'SQLGetConnectAttrStr', 'SQLGetCursorName', 'SQLGetDataNum', 'SQLGetDataStr',
+ 'SQLGetDescFieldNum', 'SQLGetDescFieldStr', 'SQLGetDescRec', 'SQLGetDiagFieldNum',
+ 'SQLGetDiagFieldStr', 'SQLGetDiagRec', 'SQLGetEnvAttrNum', 'SQLGetEnvAttrStr',
+ 'SQLGetFunctions', 'SQLGetInfoNum', 'SQLGetInfoStr', 'SQLGetStmtAttrNum',
+ 'SQLGetStmtAttrStr', 'SQLGetTypeInfo', 'SQLMoreResults', 'SQLNativeSql',
+ 'SQLNumParams', 'SQLNumResultCols', 'SQLNumResultRowsIfKnown',
+ 'SQLNumRowsFetched', 'SQLParamData', 'SQLPrepare', 'SQLPrimaryKeys',
+ 'SQLProcedureColumns', 'SQLProcedures', 'SQLPutData', 'SQLReinitialize',
+ 'SQLRowCount', 'SQLSetConnectAttrNum', 'SQLSetConnectAttrStr', 'SQLSetCursorName',
+ 'SQLSetDescFieldNum', 'SQLSetDescFieldStr', 'SQLSetDescRec', 'SQLSetEnvAttrNum',
+ 'SQLSetEnvAttrStr', 'SQLSetPos', 'SQLSetStmtAttrNum', 'SQLSetStmtAttrStr',
+ 'SQLSpecialColumns', 'SQLStatistics', 'SQLTablePrivileges', 'SQLTables',
+ 'SQLTextWaveToBinaryWaves', 'SQLTextWaveTo2DBinaryWave', 'SQLUpdateBoundValues',
+ 'SQLXOPCheckState', 'SQL2DBinaryWaveToTextWave', 'sqrt', 'StartMSTimer',
+ 'StatsBetaCDF', 'StatsBetaPDF', 'StatsBinomialCDF', 'StatsBinomialPDF',
+ 'StatsCauchyCDF', 'StatsCauchyPDF', 'StatsChiCDF', 'StatsChiPDF', 'StatsCMSSDCDF',
'StatsCorrelation', 'StatsDExpCDF', 'StatsDExpPDF', 'StatsErlangCDF',
'StatsErlangPDF', 'StatsErrorPDF', 'StatsEValueCDF', 'StatsEValuePDF',
'StatsExpCDF', 'StatsExpPDF', 'StatsFCDF', 'StatsFPDF', 'StatsFriedmanCDF',
@@ -250,19 +340,66 @@ class IgorLexer(RegexLexer):
'StopMSTimer', 'StringByKey', 'stringCRC', 'StringFromList', 'StringList',
'stringmatch', 'strlen', 'strsearch', 'StrVarOrDefault', 'str2num', 'StudentA',
'StudentT', 'sum', 'SVAR_Exists', 'TableInfo', 'TagVal', 'TagWaveRef', 'tan',
- 'tanh', 'TextEncodingCode', 'TextEncodingName', 'TextFile', 'ThreadGroupCreate',
+ 'tango_close_device', 'tango_command_inout', 'tango_compute_image_proj',
+ 'tango_get_dev_attr_list', 'tango_get_dev_black_box', 'tango_get_dev_cmd_list',
+ 'tango_get_dev_status', 'tango_get_dev_timeout', 'tango_get_error_stack',
+ 'tango_open_device', 'tango_ping_device', 'tango_read_attribute',
+ 'tango_read_attributes', 'tango_reload_dev_interface',
+ 'tango_resume_attr_monitor', 'tango_set_attr_monitor_period',
+ 'tango_set_dev_timeout', 'tango_start_attr_monitor', 'tango_stop_attr_monitor',
+ 'tango_suspend_attr_monitor', 'tango_write_attribute', 'tango_write_attributes',
+ 'tanh', 'TDMAddChannel', 'TDMAddGroup', 'TDMAppendDataValues',
+ 'TDMAppendDataValuesTime', 'TDMChannelPropertyExists', 'TDMCloseChannel',
+ 'TDMCloseFile', 'TDMCloseGroup', 'TDMCreateChannelProperty', 'TDMCreateFile',
+ 'TDMCreateFileProperty', 'TDMCreateGroupProperty', 'TDMFilePropertyExists',
+ 'TDMGetChannelPropertyNames', 'TDMGetChannelPropertyNum',
+ 'TDMGetChannelPropertyStr', 'TDMGetChannelPropertyTime',
+ 'TDMGetChannelPropertyType', 'TDMGetChannels', 'TDMGetChannelStringPropertyLen',
+ 'TDMGetDataType', 'TDMGetDataValues', 'TDMGetDataValuesTime',
+ 'TDMGetFilePropertyNames', 'TDMGetFilePropertyNum', 'TDMGetFilePropertyStr',
+ 'TDMGetFilePropertyTime', 'TDMGetFilePropertyType', 'TDMGetFileStringPropertyLen',
+ 'TDMGetGroupPropertyNames', 'TDMGetGroupPropertyNum', 'TDMGetGroupPropertyStr',
+ 'TDMGetGroupPropertyTime', 'TDMGetGroupPropertyType', 'TDMGetGroups',
+ 'TDMGetGroupStringPropertyLen', 'TDMGetLibraryErrorDescription',
+ 'TDMGetNumChannelProperties', 'TDMGetNumChannels', 'TDMGetNumDataValues',
+ 'TDMGetNumFileProperties', 'TDMGetNumGroupProperties', 'TDMGetNumGroups',
+ 'TDMGroupPropertyExists', 'TDMOpenFile', 'TDMOpenFileEx', 'TDMRemoveChannel',
+ 'TDMRemoveGroup', 'TDMReplaceDataValues', 'TDMReplaceDataValuesTime',
+ 'TDMSaveFile', 'TDMSetChannelPropertyNum', 'TDMSetChannelPropertyStr',
+ 'TDMSetChannelPropertyTime', 'TDMSetDataValues', 'TDMSetDataValuesTime',
+ 'TDMSetFilePropertyNum', 'TDMSetFilePropertyStr', 'TDMSetFilePropertyTime',
+ 'TDMSetGroupPropertyNum', 'TDMSetGroupPropertyStr', 'TDMSetGroupPropertyTime',
+ 'TextEncodingCode', 'TextEncodingName', 'TextFile', 'ThreadGroupCreate',
'ThreadGroupGetDF', 'ThreadGroupGetDFR', 'ThreadGroupRelease', 'ThreadGroupWait',
'ThreadProcessorCount', 'ThreadReturnValue', 'ticks', 'time', 'TraceFromPixel',
- 'TraceInfo', 'TraceNameList', 'TraceNameToWaveRef', 'trunc', 'UniqueName',
- 'UnPadString', 'UnsetEnvironmentVariable', 'UpperStr', 'URLDecode', 'URLEncode',
- 'VariableList', 'Variance', 'vcsr', 'Voigt', 'VoigtFit', 'VoigtFitBL',
- 'VoigtFit1Shape', 'VoigtFit1ShapeBL', 'VoigtFit1Shape1Width',
- 'VoigtFit1Shape1WidthBL', 'VoigtFunc', 'WaveCRC', 'WaveDims', 'WaveExists',
- 'WaveInfo', 'WaveList', 'WaveMax', 'WaveMin', 'WaveName', 'WaveRefIndexed',
+ 'TraceInfo', 'TraceNameList', 'TraceNameToWaveRef', 'TrimString', 'trunc',
+ 'UniqueName', 'UnPadString', 'UnsetEnvironmentVariable', 'UpperStr', 'URLDecode',
+ 'URLEncode', 'VariableList', 'Variance', 'vcsr', 'viAssertIntrSignal',
+ 'viAssertTrigger', 'viAssertUtilSignal', 'viClear', 'viClose', 'viDisableEvent',
+ 'viDiscardEvents', 'viEnableEvent', 'viFindNext', 'viFindRsrc', 'viGetAttribute',
+ 'viGetAttributeString', 'viGpibCommand', 'viGpibControlATN', 'viGpibControlREN',
+ 'viGpibPassControl', 'viGpibSendIFC', 'viIn8', 'viIn16', 'viIn32', 'viLock',
+ 'viMapAddress', 'viMapTrigger', 'viMemAlloc', 'viMemFree', 'viMoveIn8',
+ 'viMoveIn16', 'viMoveIn32', 'viMoveOut8', 'viMoveOut16', 'viMoveOut32', 'viOpen',
+ 'viOpenDefaultRM', 'viOut8', 'viOut16', 'viOut32', 'viPeek8', 'viPeek16',
+ 'viPeek32', 'viPoke8', 'viPoke16', 'viPoke32', 'viRead', 'viReadSTB',
+ 'viSetAttribute', 'viSetAttributeString', 'viStatusDesc', 'viTerminate',
+ 'viUnlock', 'viUnmapAddress', 'viUnmapTrigger', 'viUsbControlIn',
+ 'viUsbControlOut', 'viVxiCommandQuery', 'viWaitOnEvent', 'viWrite', 'VoigtFunc',
+ 'VoigtPeak', 'WaveCRC', 'WaveDims', 'WaveExists', 'WaveHash', 'WaveInfo',
+ 'WaveList', 'WaveMax', 'WaveMin', 'WaveName', 'WaveRefIndexed',
'WaveRefIndexedDFR', 'WaveRefsEqual', 'WaveRefWaveToList', 'WaveTextEncoding',
'WaveType', 'WaveUnits', 'WhichListItem', 'WinList', 'WinName', 'WinRecreation',
- 'WinType', 'WMFindWholeWord', 'WNoise', 'xcsr', 'XWaveName', 'XWaveRefFromTrace',
- 'x2pnt', 'zcsr', 'ZernikeR', 'zeta'
+ 'WinType', 'wnoise', 'xcsr', 'XWaveName', 'XWaveRefFromTrace', 'x2pnt', 'zcsr',
+ 'ZernikeR', 'zeromq_client_connect', 'zeromq_client_connect',
+ 'zeromq_client_recv', 'zeromq_client_recv', 'zeromq_client_send',
+ 'zeromq_client_send', 'zeromq_handler_start', 'zeromq_handler_start',
+ 'zeromq_handler_stop', 'zeromq_handler_stop', 'zeromq_server_bind',
+ 'zeromq_server_bind', 'zeromq_server_recv', 'zeromq_server_recv',
+ 'zeromq_server_send', 'zeromq_server_send', 'zeromq_set', 'zeromq_set',
+ 'zeromq_stop', 'zeromq_stop', 'zeromq_test_callfunction',
+ 'zeromq_test_callfunction', 'zeromq_test_serializeWave',
+ 'zeromq_test_serializeWave', 'zeta'
)
tokens = {
diff --git a/pygments/lexers/inferno.py b/pygments/lexers/inferno.py
index 5fc5a0ba..0d68856d 100644
--- a/pygments/lexers/inferno.py
+++ b/pygments/lexers/inferno.py
@@ -64,7 +64,7 @@ class LimboLexer(RegexLexer):
(r'(byte|int|big|real|string|array|chan|list|adt'
r'|fn|ref|of|module|self|type)\b', Keyword.Type),
(r'(con|iota|nil)\b', Keyword.Constant),
- ('[a-zA-Z_]\w*', Name),
+ (r'[a-zA-Z_]\w*', Name),
],
'statement' : [
include('whitespace'),
diff --git a/pygments/lexers/int_fiction.py b/pygments/lexers/int_fiction.py
index f280a56d..57ace259 100644
--- a/pygments/lexers/int_fiction.py
+++ b/pygments/lexers/int_fiction.py
@@ -911,7 +911,7 @@ class Tads3Lexer(RegexLexer):
'block?/root': [
(r'\{', Punctuation, ('#pop', 'block')),
include('whitespace'),
- (r'(?=[[\'"<(:])', Text, # It might be a VerbRule macro.
+ (r'(?=[\[\'"<(:])', Text, # It might be a VerbRule macro.
('#pop', 'object-body/no-braces', 'grammar', 'grammar-rules')),
# It might be a macro like DefineAction.
default(('#pop', 'object-body/no-braces'))
diff --git a/pygments/lexers/iolang.py b/pygments/lexers/iolang.py
index bbc17faf..26f44e27 100644
--- a/pygments/lexers/iolang.py
+++ b/pygments/lexers/iolang.py
@@ -49,7 +49,7 @@ class IoLexer(RegexLexer):
# names
(r'(Object|list|List|Map|args|Sequence|Coroutine|File)\b',
Name.Builtin),
- ('[a-zA-Z_]\w*', Name),
+ (r'[a-zA-Z_]\w*', Name),
# numbers
(r'(\d+\.?\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float),
(r'\d+', Number.Integer)
diff --git a/pygments/lexers/j.py b/pygments/lexers/j.py
index 434964fe..46037820 100644
--- a/pygments/lexers/j.py
+++ b/pygments/lexers/j.py
@@ -52,13 +52,13 @@ class JLexer(RegexLexer):
Name.Function, 'explicitDefinition'),
# Flow Control
- (words(('for_', 'goto_', 'label_'), suffix=validName+'\.'), Name.Label),
+ (words(('for_', 'goto_', 'label_'), suffix=validName+r'\.'), Name.Label),
(words((
'assert', 'break', 'case', 'catch', 'catchd',
'catcht', 'continue', 'do', 'else', 'elseif',
'end', 'fcase', 'for', 'if', 'return',
'select', 'throw', 'try', 'while', 'whilst',
- ), suffix='\.'), Name.Label),
+ ), suffix=r'\.'), Name.Label),
# Variable Names
(validName, Name.Variable),
diff --git a/pygments/lexers/javascript.py b/pygments/lexers/javascript.py
index 663557ab..0507375f 100644
--- a/pygments/lexers/javascript.py
+++ b/pygments/lexers/javascript.py
@@ -453,6 +453,10 @@ class TypeScriptLexer(RegexLexer):
flags = re.DOTALL | re.MULTILINE
+ # Higher priority than the TypoScriptLexer, as TypeScript is far more
+ # common these days
+ priority = 0.5
+
tokens = {
'commentsandwhitespace': [
(r'\s+', Text),
@@ -534,12 +538,6 @@ class TypeScriptLexer(RegexLexer):
],
}
- def analyse_text(text):
- if re.search('^(import.+(from\s+)?["\']|'
- '(export\s*)?(interface|class|function)\s+)',
- text, re.MULTILINE):
- return 1.0
-
class LassoLexer(RegexLexer):
"""
@@ -1015,7 +1013,7 @@ class ObjectiveJLexer(RegexLexer):
}
def analyse_text(text):
- if re.search('^\s*@import\s+[<"]', text, re.MULTILINE):
+ if re.search(r'^\s*@import\s+[<"]', text, re.MULTILINE):
# special directive found in most Objective-J files
return True
return False
diff --git a/pygments/lexers/julia.py b/pygments/lexers/julia.py
index 67453aba..84ae1ae7 100644
--- a/pygments/lexers/julia.py
+++ b/pygments/lexers/julia.py
@@ -48,6 +48,7 @@ class JuliaLexer(RegexLexer):
# keywords
(r'in\b', Keyword.Pseudo),
+ (r'isa\b', Keyword.Pseudo),
(r'(true|false)\b', Keyword.Constant),
(r'(local|global|const)\b', Keyword.Declaration),
(words([
@@ -55,7 +56,8 @@ class JuliaLexer(RegexLexer):
'baremodule', 'begin', 'bitstype', 'break', 'catch', 'ccall',
'continue', 'do', 'else', 'elseif', 'end', 'export', 'finally',
'for', 'if', 'import', 'importall', 'let', 'macro', 'module',
- 'quote', 'return', 'try', 'using', 'while'],
+ 'mutable', 'primitive', 'quote', 'return', 'struct', 'try',
+ 'using', 'while'],
suffix=r'\b'), Keyword),
# NOTE
@@ -146,7 +148,7 @@ class JuliaLexer(RegexLexer):
(words([
# prec-assignment
u'=', u':=', u'+=', u'-=', u'*=', u'/=', u'//=', u'.//=', u'.*=', u'./=',
- u'\=', u'.\=', u'^=', u'.^=', u'÷=', u'.÷=', u'%=', u'.%=', u'|=', u'&=',
+ u'\\=', u'.\\=', u'^=', u'.^=', u'÷=', u'.÷=', u'%=', u'.%=', u'|=', u'&=',
u'$=', u'=>', u'<<=', u'>>=', u'>>>=', u'~', u'.+=', u'.-=',
# prec-conditional
u'?',
@@ -181,7 +183,7 @@ class JuliaLexer(RegexLexer):
# prec-dot
u'.',
# unary op
- u'+', u'-', u'!', u'~', u'√', u'∛', u'∜'
+ u'+', u'-', u'!', u'√', u'∛', u'∜'
]), Operator),
# chars
diff --git a/pygments/lexers/jvm.py b/pygments/lexers/jvm.py
index ccff41c1..8de6e9f2 100644
--- a/pygments/lexers/jvm.py
+++ b/pygments/lexers/jvm.py
@@ -21,7 +21,7 @@ from pygments import unistring as uni
__all__ = ['JavaLexer', 'ScalaLexer', 'GosuLexer', 'GosuTemplateLexer',
'GroovyLexer', 'IokeLexer', 'ClojureLexer', 'ClojureScriptLexer',
'KotlinLexer', 'XtendLexer', 'AspectJLexer', 'CeylonLexer',
- 'PigLexer', 'GoloLexer', 'JasminLexer']
+ 'PigLexer', 'GoloLexer', 'JasminLexer', 'SarlLexer']
class JavaLexer(RegexLexer):
@@ -257,7 +257,7 @@ class ScalaLexer(RegexLexer):
u'\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\uff21-\uff3a]')
idrest = u'%s(?:%s|[0-9])*(?:(?<=_)%s)?' % (letter, letter, op)
- letter_letter_digit = u'%s(?:%s|\d)*' % (letter, letter)
+ letter_letter_digit = u'%s(?:%s|\\d)*' % (letter, letter)
tokens = {
'root': [
@@ -689,7 +689,7 @@ class IokeLexer(RegexLexer):
# functions
(u'(generateMatchMethod|aliasMethod|\u03bb|\u028E|fnx|fn|method|'
u'dmacro|dlecro|syntax|macro|dlecrox|lecrox|lecro|syntax)'
- u'(?![\w!:?])', Name.Function),
+ u'(?![\\w!:?])', Name.Function),
# Numbers
(r'-?0[xX][0-9a-fA-F]+', Number.Hex),
@@ -1006,7 +1006,7 @@ class KotlinLexer(RegexLexer):
.. versionadded:: 1.5
"""
-
+
name = 'Kotlin'
aliases = ['kotlin']
filenames = ['*.kt']
@@ -1017,15 +1017,22 @@ class KotlinLexer(RegexLexer):
kt_name = ('@?[_' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl') + ']' +
'[' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl', 'Nd', 'Pc', 'Cf',
'Mn', 'Mc') + ']*')
- kt_id = '(' + kt_name + '|`' + kt_name + '`)'
+
+ kt_space_name = ('@?[_' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl') + ']' +
+ '[' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl', 'Nd', 'Pc', 'Cf',
+ 'Mn', 'Mc', 'Zs') + ',-]*')
+
+ kt_id = '(' + kt_name + '|`' + kt_space_name + '`)'
tokens = {
'root': [
(r'^\s*\[.*?\]', Name.Attribute),
(r'[^\S\n]+', Text),
+ (r'\s+', Text),
(r'\\\n', Text), # line continuation
(r'//.*?\n', Comment.Single),
(r'/[*].*?[*]/', Comment.Multiline),
+ (r'""".*?"""', String),
(r'\n', Text),
(r'::|!!|\?[:.]', Operator),
(r'[~!%^&*()+=|\[\]:;,.<>/?-]', Punctuation),
@@ -1035,11 +1042,14 @@ class KotlinLexer(RegexLexer):
(r"'\\.'|'[^\\]'", String.Char),
(r"[0-9](\.[0-9]*)?([eE][+-][0-9]+)?[flFL]?|"
r"0[xX][0-9a-fA-F]+[Ll]?", Number),
- (r'(class)(\s+)(object)', bygroups(Keyword, Text, Keyword)),
+ (r'(object)(\s+)(:)(\s+)', bygroups(Keyword, Text, Punctuation, Text), 'class'),
+ (r'(companion)(\s+)(object)', bygroups(Keyword, Text, Keyword)),
(r'(class|interface|object)(\s+)', bygroups(Keyword, Text), 'class'),
(r'(package|import)(\s+)', bygroups(Keyword, Text), 'package'),
+ (r'(val|var)(\s+)([(])', bygroups(Keyword, Text, Punctuation), 'property_dec'),
(r'(val|var)(\s+)', bygroups(Keyword, Text), 'property'),
(r'(fun)(\s+)', bygroups(Keyword, Text), 'function'),
+ (r'(inline fun)(\s+)', bygroups(Keyword, Text), 'function'),
(r'(abstract|annotation|as|break|by|catch|class|companion|const|'
r'constructor|continue|crossinline|data|do|dynamic|else|enum|'
r'external|false|final|finally|for|fun|get|if|import|in|infix|'
@@ -1058,9 +1068,26 @@ class KotlinLexer(RegexLexer):
'property': [
(kt_id, Name.Property, '#pop')
],
+ 'property_dec': [
+ (r'(,)(\s*)', bygroups(Punctuation, Text)),
+ (r'(:)(\s*)', bygroups(Punctuation, Text)),
+ (r'<', Punctuation, 'generic'),
+ (r'([)])', Punctuation, '#pop'),
+ (kt_id, Name.Property)
+ ],
'function': [
+ (r'<', Punctuation, 'generic'),
+ (r''+kt_id+'([.])'+kt_id, bygroups(Name.Class, Punctuation, Name.Function), '#pop'),
(kt_id, Name.Function, '#pop')
],
+ 'generic': [
+ (r'(>)(\s*)', bygroups(Punctuation, Text), '#pop'),
+ (r':',Punctuation),
+ (r'(reified|out|in)\b', Keyword),
+ (r',',Text),
+ (r'\s+',Text),
+ (kt_id,Name)
+ ]
}
@@ -1258,7 +1285,7 @@ class GoloLexer(RegexLexer):
(r'-?\d[\d_]*L', Number.Integer.Long),
(r'-?\d[\d_]*', Number.Integer),
- ('`?[a-zA-Z_][\w$]*', Name),
+ (r'`?[a-zA-Z_][\w$]*', Name),
(r'@[a-zA-Z_][\w$.]*', Name.Decorator),
(r'"""', String, combined('stringescape', 'triplestring')),
@@ -1571,3 +1598,57 @@ class JasminLexer(RegexLexer):
re.MULTILINE):
score += 0.6
return score
+
+
+class SarlLexer(RegexLexer):
+ """
+ For `SARL <http://www.sarl.io>`_ source code.
+
+ .. versionadded:: 2.4
+ """
+
+ name = 'SARL'
+ aliases = ['sarl']
+ filenames = ['*.sarl']
+ mimetypes = ['text/x-sarl']
+
+ flags = re.MULTILINE | re.DOTALL
+
+ tokens = {
+ 'root': [
+ # method names
+ (r'^(\s*(?:[a-zA-Z_][\w.\[\]]*\s+)+?)' # return arguments
+ r'([a-zA-Z_$][\w$]*)' # method name
+ r'(\s*)(\()', # signature start
+ bygroups(using(this), Name.Function, Text, Operator)),
+ (r'[^\S\n]+', Text),
+ (r'//.*?\n', Comment.Single),
+ (r'/\*.*?\*/', Comment.Multiline),
+ (r'@[a-zA-Z_][\w.]*', Name.Decorator),
+ (r'(as|break|case|catch|default|do|else|extends|extension|finally|fires|for|if|implements|instanceof|new|on|requires|return|super|switch|throw|throws|try|typeof|uses|while|with)\b',
+ Keyword),
+ (r'(abstract|def|dispatch|final|native|override|private|protected|public|static|strictfp|synchronized|transient|val|var|volatile)\b', Keyword.Declaration),
+ (r'(boolean|byte|char|double|float|int|long|short|void)\b',
+ Keyword.Type),
+ (r'(package)(\s+)', bygroups(Keyword.Namespace, Text)),
+ (r'(false|it|null|occurrence|this|true|void)\b', Keyword.Constant),
+ (r'(agent|annotation|artifact|behavior|capacity|class|enum|event|interface|skill|space)(\s+)', bygroups(Keyword.Declaration, Text),
+ 'class'),
+ (r'(import)(\s+)', bygroups(Keyword.Namespace, Text), 'import'),
+ (r'"(\\\\|\\"|[^"])*"', String),
+ (r"'(\\\\|\\'|[^'])*'", String),
+ (r'[a-zA-Z_]\w*:', Name.Label),
+ (r'[a-zA-Z_$]\w*', Name),
+ (r'[~^*!%&\[\](){}<>\|+=:;,./?-]', Operator),
+ (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
+ (r'0x[0-9a-fA-F]+', Number.Hex),
+ (r'[0-9]+L?', Number.Integer),
+ (r'\n', Text)
+ ],
+ 'class': [
+ (r'[a-zA-Z_]\w*', Name.Class, '#pop')
+ ],
+ 'import': [
+ (r'[\w.]+\*?', Name.Namespace, '#pop')
+ ],
+ }
diff --git a/pygments/lexers/lisp.py b/pygments/lexers/lisp.py
index 4a1ce137..3bfc83a6 100644
--- a/pygments/lexers/lisp.py
+++ b/pygments/lexers/lisp.py
@@ -139,7 +139,7 @@ class SchemeLexer(RegexLexer):
(r"(?<=#\()" + valid_name, Name.Variable),
# highlight the builtins
- ("(?<=\()(%s)" % '|'.join(re.escape(entry) + ' ' for entry in builtins),
+ (r"(?<=\()(%s)" % '|'.join(re.escape(entry) + ' ' for entry in builtins),
Name.Builtin),
# the remaining functions
@@ -321,7 +321,7 @@ class CommonLispLexer(RegexLexer):
(r'#\d+#', Operator),
# read-time comment
- (r'#+nil' + terminated + '\s*\(', Comment.Preproc, 'commented-form'),
+ (r'#+nil' + terminated + r'\s*\(', Comment.Preproc, 'commented-form'),
# read-time conditional
(r'#[+-]', Operator),
@@ -333,7 +333,7 @@ class CommonLispLexer(RegexLexer):
(r'(t|nil)' + terminated, Name.Constant),
# functions and variables
- (r'\*' + symbol + '\*', Name.Variable.Global),
+ (r'\*' + symbol + r'\*', Name.Variable.Global),
(symbol, Name.Variable),
# parentheses
@@ -382,7 +382,7 @@ class HyLexer(RegexLexer):
# valid names for identifiers
# well, names can only not consist fully of numbers
# but this should be good enough for now
- valid_name = r'(?!#)[\w!$%*+<=>?/.#-]+'
+ valid_name = r'(?!#)[\w!$%*+<=>?/.#-:]+'
def _multi_escape(entries):
return words(entries, suffix=' ')
@@ -1249,7 +1249,7 @@ class RacketLexer(RegexLexer):
_opening_parenthesis = r'[([{]'
_closing_parenthesis = r'[)\]}]'
_delimiters = r'()[\]{}",\'`;\s'
- _symbol = r'(?u)(?:\|[^|]*\||\\[\w\W]|[^|\\%s]+)+' % _delimiters
+ _symbol = r'(?:\|[^|]*\||\\[\w\W]|[^|\\%s]+)+' % _delimiters
_exact_decimal_prefix = r'(?:#e)?(?:#d)?(?:#e)?'
_exponent = r'(?:[defls][-+]?\d+)'
_inexact_simple_no_hashes = r'(?:\d+(?:/\d+|\.\d*)?|\.\d+)'
@@ -1301,16 +1301,16 @@ class RacketLexer(RegexLexer):
(_inexact_simple, _delimiters), Number.Float, '#pop'),
# #b
- (r'(?i)(#[ei])?#b%s' % _symbol, Number.Bin, '#pop'),
+ (r'(?iu)(#[ei])?#b%s' % _symbol, Number.Bin, '#pop'),
# #o
- (r'(?i)(#[ei])?#o%s' % _symbol, Number.Oct, '#pop'),
+ (r'(?iu)(#[ei])?#o%s' % _symbol, Number.Oct, '#pop'),
# #x
- (r'(?i)(#[ei])?#x%s' % _symbol, Number.Hex, '#pop'),
+ (r'(?iu)(#[ei])?#x%s' % _symbol, Number.Hex, '#pop'),
# #i is always inexact, i.e. float
- (r'(?i)(#d)?#i%s' % _symbol, Number.Float, '#pop'),
+ (r'(?iu)(#d)?#i%s' % _symbol, Number.Float, '#pop'),
# Strings and characters
(r'#?"', String.Double, ('#pop', 'string')),
@@ -1323,7 +1323,7 @@ class RacketLexer(RegexLexer):
(r'#(true|false|[tTfF])', Name.Constant, '#pop'),
# Keyword argument names (e.g. #:keyword)
- (r'#:%s' % _symbol, Keyword.Declaration, '#pop'),
+ (r'(?u)#:%s' % _symbol, Keyword.Declaration, '#pop'),
# Reader extensions
(r'(#lang |#!)(\S+)',
@@ -1400,7 +1400,7 @@ class RacketLexer(RegexLexer):
class NewLispLexer(RegexLexer):
"""
- For `newLISP. <www.newlisp.org>`_ source code (version 10.3.0).
+ For `newLISP. <http://www.newlisp.org/>`_ source code (version 10.3.0).
.. versionadded:: 1.5
"""
@@ -2154,7 +2154,7 @@ class EmacsLispLexer(RegexLexer):
(r'(t|nil)' + terminated, Name.Constant),
# functions and variables
- (r'\*' + symbol + '\*', Name.Variable.Global),
+ (r'\*' + symbol + r'\*', Name.Variable.Global),
(symbol, Name.Variable),
# parentheses
diff --git a/pygments/lexers/make.py b/pygments/lexers/make.py
index b222b672..c1e2f3a9 100644
--- a/pygments/lexers/make.py
+++ b/pygments/lexers/make.py
@@ -102,8 +102,8 @@ class BaseMakefileLexer(RegexLexer):
(r'\$\(', Keyword, 'expansion'),
],
'expansion': [
- (r'[^$a-zA-Z_()]+', Text),
- (r'[a-zA-Z_]+', Name.Variable),
+ (r'[^\w$().-]+', Text),
+ (r'[\w.-]+', Name.Variable),
(r'\$', Keyword),
(r'\(', Keyword, '#push'),
(r'\)', Keyword, '#pop'),
diff --git a/pygments/lexers/markup.py b/pygments/lexers/markup.py
index e6265f40..6eb55fc4 100644
--- a/pygments/lexers/markup.py
+++ b/pygments/lexers/markup.py
@@ -582,6 +582,11 @@ class MarkdownLexer(RegexLexer):
(r'[@#][\w/:]+', Name.Entity),
# (image?) links eg: ![Image of Yaktocat](https://octodex.github.com/images/yaktocat.png)
(r'(!?\[)([^]]+)(\])(\()([^)]+)(\))', bygroups(Text, Name.Tag, Text, Text, Name.Attribute, Text)),
+ # reference-style links, e.g.:
+ # [an example][id]
+ # [id]: http://example.com/
+ (r'(\[)([^]]+)(\])(\[)([^]]*)(\])', bygroups(Text, Name.Tag, Text, Text, Name.Label, Text)),
+ (r'^(\s*\[)([^]]*)(\]:\s*)(.+)', bygroups(Text, Name.Label, Text, Name.Attribute)),
# general text, must come last!
(r'[^\\\s]+', Text),
diff --git a/pygments/lexers/matlab.py b/pygments/lexers/matlab.py
index 56a0f6d6..1c77b60c 100644
--- a/pygments/lexers/matlab.py
+++ b/pygments/lexers/matlab.py
@@ -134,9 +134,9 @@ class MatlabLexer(RegexLexer):
}
def analyse_text(text):
- if re.match('^\s*%', text, re.M): # comment
+ if re.match(r'^\s*%', text, re.M): # comment
return 0.2
- elif re.match('^!\w+', text, re.M): # system cmd
+ elif re.match(r'^!\w+', text, re.M): # system cmd
return 0.2
diff --git a/pygments/lexers/ml.py b/pygments/lexers/ml.py
index f80d5bfa..0bff9816 100644
--- a/pygments/lexers/ml.py
+++ b/pygments/lexers/ml.py
@@ -43,7 +43,7 @@ class SMLLexer(RegexLexer):
symbolicid_reserved = set((
# Core
- ':', '\|', '=', '=>', '->', '#',
+ ':', r'\|', '=', '=>', '->', '#',
# Modules
':>',
))
diff --git a/pygments/lexers/modeling.py b/pygments/lexers/modeling.py
index b354f1cf..481cce38 100644
--- a/pygments/lexers/modeling.py
+++ b/pygments/lexers/modeling.py
@@ -13,7 +13,7 @@ import re
from pygments.lexer import RegexLexer, include, bygroups, using, default
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
- Number, Punctuation
+ Number, Punctuation, Whitespace
from pygments.lexers.html import HtmlLexer
from pygments.lexers import _stan_builtins
@@ -284,8 +284,8 @@ class StanLexer(RegexLexer):
"""Pygments Lexer for Stan models.
The Stan modeling language is specified in the *Stan Modeling Language
- User's Guide and Reference Manual, v2.8.0*,
- `pdf <https://github.com/stan-dev/stan/releases/download/v2.8.8/stan-reference-2.8.0.pdf>`__.
+ User's Guide and Reference Manual, v2.17.0*,
+ `pdf <https://github.com/stan-dev/stan/releases/download/v2.17.0/stan-reference-2.17.0.pdf>`__.
.. versionadded:: 1.6
"""
@@ -316,19 +316,24 @@ class StanLexer(RegexLexer):
'parameters', r'transformed\s+parameters',
'model', r'generated\s+quantities')),
bygroups(Keyword.Namespace, Text, Punctuation)),
+ # target keyword
+ (r'target\s*\+=', Keyword),
# Reserved Words
(r'(%s)\b' % r'|'.join(_stan_builtins.KEYWORDS), Keyword),
# Truncation
(r'T(?=\s*\[)', Keyword),
# Data types
(r'(%s)\b' % r'|'.join(_stan_builtins.TYPES), Keyword.Type),
+ # < should be punctuation, but elsewhere I can't tell if it is in
+ # a range constraint
+ (r'(<)(\s*)(upper|lower)(\s*)(=)', bygroups(Operator, Whitespace, Keyword, Whitespace, Punctuation)),
+ (r'(,)(\s*)(upper)(\s*)(=)', bygroups(Punctuation, Whitespace, Keyword, Whitespace, Punctuation)),
# Punctuation
- (r"[;:,\[\]()]", Punctuation),
+ (r"[;,\[\]()]", Punctuation),
# Builtin
- (r'(%s)(?=\s*\()'
- % r'|'.join(_stan_builtins.FUNCTIONS
- + _stan_builtins.DISTRIBUTIONS),
- Name.Builtin),
+ (r'(%s)(?=\s*\()' % '|'.join(_stan_builtins.FUNCTIONS), Name.Builtin),
+ (r'(~)(\s*)(%s)(?=\s*\()' % '|'.join(_stan_builtins.DISTRIBUTIONS),
+ bygroups(Operator, Whitespace, Name.Builtin)),
# Special names ending in __, like lp__
(r'[A-Za-z]\w*__\b', Name.Builtin.Pseudo),
(r'(%s)\b' % r'|'.join(_stan_builtins.RESERVED), Keyword.Reserved),
@@ -337,17 +342,18 @@ class StanLexer(RegexLexer):
# Regular variable names
(r'[A-Za-z]\w*\b', Name),
# Real Literals
- (r'-?[0-9]+(\.[0-9]+)?[eE]-?[0-9]+', Number.Float),
- (r'-?[0-9]*\.[0-9]*', Number.Float),
+ (r'[0-9]+(\.[0-9]*)?([eE][+-]?[0-9]+)?', Number.Float),
+ (r'\.[0-9]+([eE][+-]?[0-9]+)?', Number.Float),
# Integer Literals
- (r'-?[0-9]+', Number.Integer),
+ (r'[0-9]+', Number.Integer),
# Assignment operators
- # SLexer makes these tokens Operators.
- (r'<-|~', Operator),
+ (r'<-|(?:\+|-|\.?/|\.?\*|=)?=|~', Operator),
# Infix, prefix and postfix operators (and = )
- (r"\+|-|\.?\*|\.?/|\\|'|\^|==?|!=?|<=?|>=?|\|\||&&", Operator),
+ (r"\+|-|\.?\*|\.?/|\\|'|\^|!=?|<=?|>=?|\|\||&&|%|\?|:", Operator),
# Block delimiters
(r'[{}]', Punctuation),
+ # Distribution |
+ (r'\|', Punctuation)
]
}
diff --git a/pygments/lexers/objective.py b/pygments/lexers/objective.py
index 7807255e..179928e9 100644
--- a/pygments/lexers/objective.py
+++ b/pygments/lexers/objective.py
@@ -87,26 +87,26 @@ def objective(baselexer):
],
'oc_classname': [
# interface definition that inherits
- ('([a-zA-Z$_][\w$]*)(\s*:\s*)([a-zA-Z$_][\w$]*)?(\s*)(\{)',
+ (r'([a-zA-Z$_][\w$]*)(\s*:\s*)([a-zA-Z$_][\w$]*)?(\s*)(\{)',
bygroups(Name.Class, Text, Name.Class, Text, Punctuation),
('#pop', 'oc_ivars')),
- ('([a-zA-Z$_][\w$]*)(\s*:\s*)([a-zA-Z$_][\w$]*)?',
+ (r'([a-zA-Z$_][\w$]*)(\s*:\s*)([a-zA-Z$_][\w$]*)?',
bygroups(Name.Class, Text, Name.Class), '#pop'),
# interface definition for a category
- ('([a-zA-Z$_][\w$]*)(\s*)(\([a-zA-Z$_][\w$]*\))(\s*)(\{)',
+ (r'([a-zA-Z$_][\w$]*)(\s*)(\([a-zA-Z$_][\w$]*\))(\s*)(\{)',
bygroups(Name.Class, Text, Name.Label, Text, Punctuation),
('#pop', 'oc_ivars')),
- ('([a-zA-Z$_][\w$]*)(\s*)(\([a-zA-Z$_][\w$]*\))',
+ (r'([a-zA-Z$_][\w$]*)(\s*)(\([a-zA-Z$_][\w$]*\))',
bygroups(Name.Class, Text, Name.Label), '#pop'),
# simple interface / implementation
- ('([a-zA-Z$_][\w$]*)(\s*)(\{)',
+ (r'([a-zA-Z$_][\w$]*)(\s*)(\{)',
bygroups(Name.Class, Text, Punctuation), ('#pop', 'oc_ivars')),
- ('([a-zA-Z$_][\w$]*)', Name.Class, '#pop')
+ (r'([a-zA-Z$_][\w$]*)', Name.Class, '#pop')
],
'oc_forward_classname': [
- ('([a-zA-Z$_][\w$]*)(\s*,\s*)',
+ (r'([a-zA-Z$_][\w$]*)(\s*,\s*)',
bygroups(Name.Class, Text), 'oc_forward_classname'),
- ('([a-zA-Z$_][\w$]*)(\s*;?)',
+ (r'([a-zA-Z$_][\w$]*)(\s*;?)',
bygroups(Name.Class, Text), '#pop')
],
'oc_ivars': [
@@ -244,17 +244,17 @@ class LogosLexer(ObjectiveCppLexer):
inherit,
],
'logos_init_directive': [
- ('\s+', Text),
+ (r'\s+', Text),
(',', Punctuation, ('logos_init_directive', '#pop')),
- ('([a-zA-Z$_][\w$]*)(\s*)(=)(\s*)([^);]*)',
+ (r'([a-zA-Z$_][\w$]*)(\s*)(=)(\s*)([^);]*)',
bygroups(Name.Class, Text, Punctuation, Text, Text)),
- ('([a-zA-Z$_][\w$]*)', Name.Class),
- ('\)', Punctuation, '#pop'),
+ (r'([a-zA-Z$_][\w$]*)', Name.Class),
+ (r'\)', Punctuation, '#pop'),
],
'logos_classname': [
- ('([a-zA-Z$_][\w$]*)(\s*:\s*)([a-zA-Z$_][\w$]*)?',
+ (r'([a-zA-Z$_][\w$]*)(\s*:\s*)([a-zA-Z$_][\w$]*)?',
bygroups(Name.Class, Text, Name.Class), '#pop'),
- ('([a-zA-Z$_][\w$]*)', Name.Class, '#pop')
+ (r'([a-zA-Z$_][\w$]*)', Name.Class, '#pop')
],
'root': [
(r'(%subclass)(\s+)', bygroups(Keyword, Text),
diff --git a/pygments/lexers/parsers.py b/pygments/lexers/parsers.py
index 1f3c9b4d..43eb6c1f 100644
--- a/pygments/lexers/parsers.py
+++ b/pygments/lexers/parsers.py
@@ -364,13 +364,13 @@ class AntlrLexer(RegexLexer):
# tokensSpec
(r'tokens\b', Keyword, 'tokens'),
# attrScope
- (r'(scope)(\s*)(' + _id + ')(\s*)(\{)',
+ (r'(scope)(\s*)(' + _id + r')(\s*)(\{)',
bygroups(Keyword, Whitespace, Name.Variable, Whitespace,
Punctuation), 'action'),
# exception
(r'(catch|finally)\b', Keyword, 'exception'),
# action
- (r'(@' + _id + ')(\s*)(::)?(\s*)(' + _id + ')(\s*)(\{)',
+ (r'(@' + _id + r')(\s*)(::)?(\s*)(' + _id + r')(\s*)(\{)',
bygroups(Name.Label, Whitespace, Punctuation, Whitespace,
Name.Label, Whitespace, Punctuation), 'action'),
# rule
@@ -405,10 +405,10 @@ class AntlrLexer(RegexLexer):
# L173 ANTLRv3.g from ANTLR book
(r'(scope)(\s+)(\{)', bygroups(Keyword, Whitespace, Punctuation),
'action'),
- (r'(scope)(\s+)(' + _id + ')(\s*)(;)',
+ (r'(scope)(\s+)(' + _id + r')(\s*)(;)',
bygroups(Keyword, Whitespace, Name.Label, Whitespace, Punctuation)),
# ruleAction
- (r'(@' + _id + ')(\s*)(\{)',
+ (r'(@' + _id + r')(\s*)(\{)',
bygroups(Name.Label, Whitespace, Punctuation), 'action'),
# finished prelims, go to rule alts!
(r':', Punctuation, '#pop')
@@ -442,7 +442,7 @@ class AntlrLexer(RegexLexer):
include('comments'),
(r'\{', Punctuation),
(r'(' + _TOKEN_REF + r')(\s*)(=)?(\s*)(' + _STRING_LITERAL
- + ')?(\s*)(;)',
+ + r')?(\s*)(;)',
bygroups(Name.Label, Whitespace, Punctuation, Whitespace,
String, Whitespace, Punctuation)),
(r'\}', Punctuation, '#pop'),
@@ -452,7 +452,7 @@ class AntlrLexer(RegexLexer):
include('comments'),
(r'\{', Punctuation),
(r'(' + _id + r')(\s*)(=)(\s*)(' +
- '|'.join((_id, _STRING_LITERAL, _INT, '\*')) + ')(\s*)(;)',
+ '|'.join((_id, _STRING_LITERAL, _INT, r'\*')) + r')(\s*)(;)',
bygroups(Name.Variable, Whitespace, Punctuation, Whitespace,
Text, Whitespace, Punctuation)),
(r'\}', Punctuation, '#pop'),
diff --git a/pygments/lexers/pascal.py b/pygments/lexers/pascal.py
index 9aa1ac8f..467a0b2c 100644
--- a/pygments/lexers/pascal.py
+++ b/pygments/lexers/pascal.py
@@ -593,8 +593,8 @@ class AdaLexer(RegexLexer):
],
'end': [
('(if|case|record|loop|select)', Keyword.Reserved),
- ('"[^"]+"|[\w.]+', Name.Function),
- ('\s+', Text),
+ (r'"[^"]+"|[\w.]+', Name.Function),
+ (r'\s+', Text),
(';', Punctuation, '#pop'),
],
'type_def': [
@@ -628,11 +628,11 @@ class AdaLexer(RegexLexer):
],
'package': [
('body', Keyword.Declaration),
- ('is\s+new|renames', Keyword.Reserved),
+ (r'is\s+new|renames', Keyword.Reserved),
('is', Keyword.Reserved, '#pop'),
(';', Punctuation, '#pop'),
- ('\(', Punctuation, 'package_instantiation'),
- ('([\w.]+)', Name.Class),
+ (r'\(', Punctuation, 'package_instantiation'),
+ (r'([\w.]+)', Name.Class),
include('root'),
],
'package_instantiation': [
diff --git a/pygments/lexers/pawn.py b/pygments/lexers/pawn.py
index f462a883..0ef28175 100644
--- a/pygments/lexers/pawn.py
+++ b/pygments/lexers/pawn.py
@@ -36,7 +36,7 @@ class SourcePawnLexer(RegexLexer):
tokens = {
'root': [
# preprocessor directives: without whitespace
- ('^#if\s+0', Comment.Preproc, 'if0'),
+ (r'^#if\s+0', Comment.Preproc, 'if0'),
('^#', Comment.Preproc, 'macro'),
# or with whitespace
('^' + _ws1 + r'#if\s+0', Comment.Preproc, 'if0'),
@@ -62,7 +62,7 @@ class SourcePawnLexer(RegexLexer):
r'public|return|sizeof|static|decl|struct|switch)\b', Keyword),
(r'(bool|Float)\b', Keyword.Type),
(r'(true|false)\b', Keyword.Constant),
- ('[a-zA-Z_]\w*', Name),
+ (r'[a-zA-Z_]\w*', Name),
],
'string': [
(r'"', String, '#pop'),
@@ -148,7 +148,7 @@ class PawnLexer(RegexLexer):
tokens = {
'root': [
# preprocessor directives: without whitespace
- ('^#if\s+0', Comment.Preproc, 'if0'),
+ (r'^#if\s+0', Comment.Preproc, 'if0'),
('^#', Comment.Preproc, 'macro'),
# or with whitespace
('^' + _ws1 + r'#if\s+0', Comment.Preproc, 'if0'),
@@ -174,7 +174,7 @@ class PawnLexer(RegexLexer):
r'public|return|sizeof|tagof|state|goto)\b', Keyword),
(r'(bool|Float)\b', Keyword.Type),
(r'(true|false)\b', Keyword.Constant),
- ('[a-zA-Z_]\w*', Name),
+ (r'[a-zA-Z_]\w*', Name),
],
'string': [
(r'"', String, '#pop'),
diff --git a/pygments/lexers/perl.py b/pygments/lexers/perl.py
index db5a9361..27e3cc79 100644
--- a/pygments/lexers/perl.py
+++ b/pygments/lexers/perl.py
@@ -208,7 +208,7 @@ class PerlLexer(RegexLexer):
def analyse_text(text):
if shebang_matches(text, r'perl'):
return True
- if re.search('(?:my|our)\s+[$@%(]', text):
+ if re.search(r'(?:my|our)\s+[$@%(]', text):
return 0.9
@@ -226,7 +226,7 @@ class Perl6Lexer(ExtendedRegexLexer):
mimetypes = ['text/x-perl6', 'application/x-perl6']
flags = re.MULTILINE | re.DOTALL | re.UNICODE
- PERL6_IDENTIFIER_RANGE = "['\w:-]"
+ PERL6_IDENTIFIER_RANGE = r"['\w:-]"
PERL6_KEYWORDS = (
'BEGIN', 'CATCH', 'CHECK', 'CONTROL', 'END', 'ENTER', 'FIRST', 'INIT',
@@ -495,7 +495,7 @@ class Perl6Lexer(ExtendedRegexLexer):
(r'^=.*?\n\s*?\n', Comment.Multiline),
(r'(regex|token|rule)(\s*' + PERL6_IDENTIFIER_RANGE + '+:sym)',
bygroups(Keyword, Name), 'token-sym-brackets'),
- (r'(regex|token|rule)(?!' + PERL6_IDENTIFIER_RANGE + ')(\s*' + PERL6_IDENTIFIER_RANGE + '+)?',
+ (r'(regex|token|rule)(?!' + PERL6_IDENTIFIER_RANGE + r')(\s*' + PERL6_IDENTIFIER_RANGE + '+)?',
bygroups(Keyword, Name), 'pre-token'),
# deal with a special case in the Perl 6 grammar (role q { ... })
(r'(role)(\s+)(q)(\s*)', bygroups(Keyword, Text, Name, Text)),
@@ -591,21 +591,21 @@ class Perl6Lexer(ExtendedRegexLexer):
rating = False
# check for my/our/has declarations
- if re.search("(?:my|our|has)\s+(?:" + Perl6Lexer.PERL6_IDENTIFIER_RANGE +
- "+\s+)?[$@%&(]", text):
+ if re.search(r"(?:my|our|has)\s+(?:" + Perl6Lexer.PERL6_IDENTIFIER_RANGE +
+ r"+\s+)?[$@%&(]", text):
rating = 0.8
saw_perl_decl = True
for line in lines:
line = re.sub('#.*', '', line)
- if re.match('^\s*$', line):
+ if re.match(r'^\s*$', line):
continue
# match v6; use v6; use v6.0; use v6.0.0;
- if re.match('^\s*(?:use\s+)?v6(?:\.\d(?:\.\d)?)?;', line):
+ if re.match(r'^\s*(?:use\s+)?v6(?:\.\d(?:\.\d)?)?;', line):
return True
# match class, module, role, enum, grammar declarations
- class_decl = re.match('^\s*(?:(?P<scope>my|our)\s+)?(?:module|class|role|enum|grammar)', line)
+ class_decl = re.match(r'^\s*(?:(?P<scope>my|our)\s+)?(?:module|class|role|enum|grammar)', line)
if class_decl:
if saw_perl_decl or class_decl.group('scope') is not None:
return True
diff --git a/pygments/lexers/php.py b/pygments/lexers/php.py
index f618b5fd..440d9d81 100644
--- a/pygments/lexers/php.py
+++ b/pygments/lexers/php.py
@@ -15,7 +15,8 @@ from pygments.lexer import RegexLexer, include, bygroups, default, using, \
this, words
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
Number, Punctuation, Other
-from pygments.util import get_bool_opt, get_list_opt, iteritems
+from pygments.util import get_bool_opt, get_list_opt, iteritems, \
+ shebang_matches
__all__ = ['ZephirLexer', 'PhpLexer']
@@ -173,7 +174,7 @@ class PhpLexer(RegexLexer):
r'finally)\b', Keyword),
(r'(true|false|null)\b', Keyword.Constant),
include('magicconstants'),
- (r'\$\{\$+' + _ident_inner + '\}', Name.Variable),
+ (r'\$\{\$+' + _ident_inner + r'\}', Name.Variable),
(r'\$+' + _ident_inner, Name.Variable),
(_ident_inner, Name.Other),
(r'(\d+\.\d*|\d*\.\d+)(e[+-]?[0-9]+)?', Number.Float),
@@ -214,7 +215,7 @@ class PhpLexer(RegexLexer):
(r'"', String.Double, '#pop'),
(r'[^{$"\\]+', String.Double),
(r'\\([nrt"$\\]|[0-7]{1,3}|x[0-9a-f]{1,2})', String.Escape),
- (r'\$' + _ident_inner + '(\[\S+?\]|->' + _ident_inner + ')?',
+ (r'\$' + _ident_inner + r'(\[\S+?\]|->' + _ident_inner + ')?',
String.Interpol),
(r'(\{\$\{)(.*?)(\}\})',
bygroups(String.Interpol, using(this, _startinline=True),
@@ -261,6 +262,8 @@ class PhpLexer(RegexLexer):
yield index, token, value
def analyse_text(text):
+ if shebang_matches(text, r'php'):
+ return True
rv = 0.0
if re.search(r'<\?(?!xml)', text):
rv += 0.3
diff --git a/pygments/lexers/pony.py b/pygments/lexers/pony.py
new file mode 100644
index 00000000..13239047
--- /dev/null
+++ b/pygments/lexers/pony.py
@@ -0,0 +1,94 @@
+# -*- coding: utf-8 -*-
+"""
+ pygments.lexers.pony
+ ~~~~~~~~~~~~~~~~~~~~
+
+ Lexers for Pony and related languages.
+
+ :copyright: Copyright 2006-2016 by the Pygments team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+from pygments.lexer import RegexLexer, bygroups, words
+from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
+ Number, Punctuation
+
+__all__ = ['PonyLexer']
+
+
+class PonyLexer(RegexLexer):
+ """
+ For Pony source code.
+
+ .. versionadded:: 2.4
+ """
+
+ name = 'Pony'
+ aliases = ['pony']
+ filenames = ['*.pony']
+
+ _caps = r'(iso|trn|ref|val|box|tag)'
+
+ tokens = {
+ 'root': [
+ (r'\n', Text),
+ (r'[^\S\n]+', Text),
+ (r'//.*\n', Comment.Single),
+ (r'/\*', Comment.Multiline, 'nested_comment'),
+ (r'"""(?:.|\n)*?"""', String.Doc),
+ (r'"', String, 'string'),
+ (r'\'.*\'', String.Char),
+ (r'=>|[]{}:().~;,|&!^?[]', Punctuation),
+ (words((
+ 'addressof', 'and', 'as', 'consume', 'digestof', 'is', 'isnt',
+ 'not', 'or'),
+ suffix=r'\b'),
+ Operator.Word),
+ (r'!=|==|<<|>>|[-+/*%=<>]', Operator),
+ (words((
+ 'box', 'break', 'compile_error', 'compile_intrinsic',
+ 'continue', 'do', 'else', 'elseif', 'embed', 'end', 'error',
+ 'for', 'if', 'ifdef', 'in', 'iso', 'lambda', 'let', 'match',
+ 'object', 'recover', 'ref', 'repeat', 'return', 'tag', 'then',
+ 'this', 'trn', 'try', 'until', 'use', 'var', 'val', 'where',
+ 'while', 'with', '#any', '#read', '#send', '#share'),
+ suffix=r'\b'),
+ Keyword),
+ (r'(actor|class|struct|primitive|interface|trait|type)((?:\s)+)',
+ bygroups(Keyword, Text), 'typename'),
+ (r'(new|fun|be)((?:\s)+)', bygroups(Keyword, Text), 'methodname'),
+ (words((
+ 'I8', 'U8', 'I16', 'U16', 'I32', 'U32', 'I64', 'U64', 'I128',
+ 'U128', 'ILong', 'ULong', 'ISize', 'USize', 'F32', 'F64',
+ 'Bool', 'Pointer', 'None', 'Any', 'Array', 'String',
+ 'Iterator'),
+ suffix=r'\b'),
+ Name.Builtin.Type),
+ (r'_?[A-Z]\w*', Name.Type),
+ (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+', Number.Float),
+ (r'0x[0-9a-fA-F]+', Number.Hex),
+ (r'\d+', Number.Integer),
+ (r'(true|false)\b', Name.Builtin),
+ (r'_\d*', Name),
+ (r'_?[a-z][\w\'_]*', Name)
+ ],
+ 'typename': [
+ (_caps + r'?((?:\s)*)(_?[A-Z]\w*)',
+ bygroups(Keyword, Text, Name.Class), '#pop')
+ ],
+ 'methodname': [
+ (_caps + r'?((?:\s)*)(_?[a-z]\w*)',
+ bygroups(Keyword, Text, Name.Function), '#pop')
+ ],
+ 'nested_comment': [
+ (r'[^*/]+', Comment.Multiline),
+ (r'/\*', Comment.Multiline, '#push'),
+ (r'\*/', Comment.Multiline, '#pop'),
+ (r'[*/]', Comment.Multiline)
+ ],
+ 'string': [
+ (r'"', String, '#pop'),
+ (r'\\"', String),
+ (r'[^\\"]+', String)
+ ]
+ }
diff --git a/pygments/lexers/prolog.py b/pygments/lexers/prolog.py
index 90f9529c..58e762b0 100644
--- a/pygments/lexers/prolog.py
+++ b/pygments/lexers/prolog.py
@@ -57,15 +57,15 @@ class PrologLexer(RegexLexer):
(r'_', Keyword), # The don't-care variable
(r'([a-z]+)(:)', bygroups(Name.Namespace, Punctuation)),
(u'([a-z\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]'
- u'[\w$\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]*)'
+ u'[\\w$\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]*)'
u'(\\s*)(:-|-->)',
bygroups(Name.Function, Text, Operator)), # function defn
(u'([a-z\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]'
- u'[\w$\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]*)'
+ u'[\\w$\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]*)'
u'(\\s*)(\\()',
bygroups(Name.Function, Text, Punctuation)),
(u'[a-z\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]'
- u'[\w$\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]*',
+ u'[\\w$\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]*',
String.Atom), # atom, characters
# This one includes !
(u'[#&*+\\-./:<=>?@\\\\^~\u00a1-\u00bf\u2010-\u303f]+',
@@ -300,7 +300,7 @@ class LogtalkLexer(RegexLexer):
return 1.0
elif ':- category(' in text:
return 1.0
- elif re.search('^:-\s[a-z]', text, re.M):
+ elif re.search(r'^:-\s[a-z]', text, re.M):
return 0.9
else:
return 0.0
diff --git a/pygments/lexers/python.py b/pygments/lexers/python.py
index 435dfe9c..c87282ca 100644
--- a/pygments/lexers/python.py
+++ b/pygments/lexers/python.py
@@ -124,10 +124,10 @@ class PythonLexer(RegexLexer):
'Exception', 'FloatingPointError', 'FutureWarning', 'GeneratorExit',
'IOError', 'ImportError', 'ImportWarning', 'IndentationError',
'IndexError', 'KeyError', 'KeyboardInterrupt', 'LookupError',
- 'MemoryError', 'NameError', 'NotImplemented', 'NotImplementedError',
+ 'MemoryError', 'ModuleNotFoundError', 'NameError', 'NotImplemented', 'NotImplementedError',
'OSError', 'OverflowError', 'OverflowWarning', 'PendingDeprecationWarning',
- 'ReferenceError', 'RuntimeError', 'RuntimeWarning', 'StandardError',
- 'StopIteration', 'SyntaxError', 'SyntaxWarning', 'SystemError',
+ 'RecursionError', 'ReferenceError', 'RuntimeError', 'RuntimeWarning', 'StandardError',
+ 'StopIteration', 'StopAsyncIteration', 'SyntaxError', 'SyntaxWarning', 'SystemError',
'SystemExit', 'TabError', 'TypeError', 'UnboundLocalError',
'UnicodeDecodeError', 'UnicodeEncodeError', 'UnicodeError',
'UnicodeTranslateError', 'UnicodeWarning', 'UserWarning',
@@ -180,15 +180,15 @@ class PythonLexer(RegexLexer):
],
'name': [
(r'@[\w.]+', Name.Decorator),
- ('[a-zA-Z_]\w*', Name),
+ (r'[a-zA-Z_]\w*', Name),
],
'funcname': [
include('magicfuncs'),
- ('[a-zA-Z_]\w*', Name.Function, '#pop'),
+ (r'[a-zA-Z_]\w*', Name.Function, '#pop'),
default('#pop'),
],
'classname': [
- ('[a-zA-Z_]\w*', Name.Class, '#pop')
+ (r'[a-zA-Z_]\w*', Name.Class, '#pop')
],
'import': [
(r'(?:[ \t]|\\\n)+', Text),
@@ -265,10 +265,10 @@ class Python3Lexer(RegexLexer):
'[hlL]?[E-GXc-giorsaux%]', String.Interpol),
# the new style '{}'.format(...) string formatting
(r'\{'
- '((\w+)((\.\w+)|(\[[^\]]+\]))*)?' # field name
- '(\![sra])?' # conversion
- '(\:(.?[<>=\^])?[-+ ]?#?0?(\d+)?,?(\.\d+)?[E-GXb-gnosx%]?)?'
- '\}', String.Interpol),
+ 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),
@@ -361,12 +361,12 @@ class Python3Lexer(RegexLexer):
Name.Variable.Magic),
]
tokens['numbers'] = [
- (r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float),
- (r'\d+[eE][+-]?[0-9]+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+', Number.Integer)
+ (r'(\d(?:_?\d)*\.(?:\d(?:_?\d)*)?|(?:\d(?:_?\d)*)?\.\d(?:_?\d)*)([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)
]
tokens['backtick'] = []
tokens['name'] = [
@@ -396,6 +396,7 @@ class Python3Lexer(RegexLexer):
tokens['strings-single'] = innerstring_rules(String.Single)
tokens['strings-double'] = innerstring_rules(String.Double)
+
def analyse_text(text):
return shebang_matches(text, r'pythonw?3(\.\d)?')
@@ -671,10 +672,10 @@ class CythonLexer(RegexLexer):
],
'name': [
(r'@\w+', Name.Decorator),
- ('[a-zA-Z_]\w*', Name),
+ (r'[a-zA-Z_]\w*', Name),
],
'funcname': [
- ('[a-zA-Z_]\w*', Name.Function, '#pop')
+ (r'[a-zA-Z_]\w*', Name.Function, '#pop')
],
'cdef': [
(r'(public|readonly|extern|api|inline)\b', Keyword.Reserved),
@@ -691,7 +692,7 @@ class CythonLexer(RegexLexer):
(r'.', Text),
],
'classname': [
- ('[a-zA-Z_]\w*', Name.Class, '#pop')
+ (r'[a-zA-Z_]\w*', Name.Class, '#pop')
],
'import': [
(r'(\s+)(as)(\s+)', bygroups(Text, Keyword, Text)),
diff --git a/pygments/lexers/qvt.py b/pygments/lexers/qvt.py
index f496d600..9b2559b1 100644
--- a/pygments/lexers/qvt.py
+++ b/pygments/lexers/qvt.py
@@ -18,7 +18,7 @@ __all__ = ['QVToLexer']
class QVToLexer(RegexLexer):
- """
+ u"""
For the `QVT Operational Mapping language <http://www.omg.org/spec/QVT/1.1/>`_.
Reference for implementing this: «Meta Object Facility (MOF) 2.0
@@ -126,7 +126,7 @@ class QVToLexer(RegexLexer):
(r'[^\\\'"\n]+', String),
# quotes, percents and backslashes must be parsed one at a time
(r'[\'"\\]', String),
- ],
+ ],
'stringescape': [
(r'\\([\\btnfr"\']|u[0-3][0-7]{2}|u[0-7]{1,2})', String.Escape)
],
@@ -134,15 +134,15 @@ class QVToLexer(RegexLexer):
(r'"', String, '#pop'),
(r'\\\\|\\"', String.Escape),
include('strings')
- ],
+ ],
'sqs': [ # single-quoted string
(r"'", String, '#pop'),
(r"\\\\|\\'", String.Escape),
include('strings')
- ],
+ ],
'name': [
- ('[a-zA-Z_]\w*', Name),
- ],
+ (r'[a-zA-Z_]\w*', Name),
+ ],
# numbers: excerpt taken from the python lexer
'numbers': [
(r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float),
diff --git a/pygments/lexers/r.py b/pygments/lexers/r.py
index 6ecdb95d..66d6402c 100644
--- a/pygments/lexers/r.py
+++ b/pygments/lexers/r.py
@@ -129,7 +129,7 @@ class SLexer(RegexLexer):
],
'root': [
# calls:
- ('r%s\s*(?=\()' % valid_name, Name.Function),
+ (r'(%s)\s*(?=\()' % valid_name, Name.Function),
include('statements'),
# blocks:
(r'\{|\}', Punctuation),
@@ -161,7 +161,7 @@ class RdLexer(RegexLexer):
This is a very minimal implementation, highlighting little more
than the macros. A description of Rd syntax is found in `Writing R
Extensions <http://cran.r-project.org/doc/manuals/R-exts.html>`_
- and `Parsing Rd files <developer.r-project.org/parseRd.pdf>`_.
+ and `Parsing Rd files <http://developer.r-project.org/parseRd.pdf>`_.
.. versionadded:: 1.6
"""
diff --git a/pygments/lexers/rdf.py b/pygments/lexers/rdf.py
index d0f8778a..72efdfad 100644
--- a/pygments/lexers/rdf.py
+++ b/pygments/lexers/rdf.py
@@ -97,7 +97,7 @@ class SparqlLexer(RegexLexer):
'root': [
(r'\s+', Text),
# keywords ::
- (r'((?i)select|construct|describe|ask|where|filter|group\s+by|minus|'
+ (r'(?i)(select|construct|describe|ask|where|filter|group\s+by|minus|'
r'distinct|reduced|from\s+named|from|order\s+by|desc|asc|limit|'
r'offset|bindings|load|clear|drop|create|add|move|copy|'
r'insert\s+data|delete\s+data|delete\s+where|delete|insert|'
@@ -111,10 +111,10 @@ class SparqlLexer(RegexLexer):
# # variables ::
('[?$]' + VARNAME, Name.Variable),
# prefixed names ::
- (r'(' + PN_PREFIX + ')?(\:)(' + PN_LOCAL + ')?',
+ (r'(' + PN_PREFIX + r')?(\:)(' + PN_LOCAL + r')?',
bygroups(Name.Namespace, Punctuation, Name.Tag)),
# function names ::
- (r'((?i)str|lang|langmatches|datatype|bound|iri|uri|bnode|rand|abs|'
+ (r'(?i)(str|lang|langmatches|datatype|bound|iri|uri|bnode|rand|abs|'
r'ceil|floor|round|concat|strlen|ucase|lcase|encode_for_uri|'
r'contains|strstarts|strends|strbefore|strafter|year|month|day|'
r'hours|minutes|seconds|timezone|tz|now|md5|sha1|sha256|sha384|'
@@ -125,7 +125,7 @@ class SparqlLexer(RegexLexer):
# boolean literals ::
(r'(true|false)', Keyword.Constant),
# double literals ::
- (r'[+\-]?(\d+\.\d*' + EXPONENT + '|\.?\d+' + EXPONENT + ')', Number.Float),
+ (r'[+\-]?(\d+\.\d*' + EXPONENT + r'|\.?\d+' + EXPONENT + ')', Number.Float),
# decimal literals ::
(r'[+\-]?(\d+\.\d*|\.\d+)', Number.Float),
# integer literals ::
@@ -268,3 +268,10 @@ class TurtleLexer(RegexLexer):
],
}
+
+ # Turtle and Tera Term macro files share the same file extension
+ # but each has a recognizable and distinct syntax.
+ def analyse_text(text):
+ for t in ('@base ', 'BASE ', '@prefix ', 'PREFIX '):
+ if re.search(r'^\s*%s' % t, text):
+ return 0.80
diff --git a/pygments/lexers/rebol.py b/pygments/lexers/rebol.py
index f3d00200..e58e01fa 100644
--- a/pygments/lexers/rebol.py
+++ b/pygments/lexers/rebol.py
@@ -102,12 +102,12 @@ class RebolLexer(RegexLexer):
yield match.start(), Generic.Heading, word
elif re.match("to-.*", word):
yield match.start(), Keyword, word
- elif re.match('(\+|-|\*|/|//|\*\*|and|or|xor|=\?|=|==|<>|<|>|<=|>=)$',
+ elif re.match(r'(\+|-|\*|/|//|\*\*|and|or|xor|=\?|=|==|<>|<|>|<=|>=)$',
word):
yield match.start(), Operator, word
- elif re.match(".*\?$", word):
+ elif re.match(r".*\?$", word):
yield match.start(), Keyword, word
- elif re.match(".*\!$", word):
+ elif re.match(r".*\!$", word):
yield match.start(), Keyword.Type, word
elif re.match("'.*", word):
yield match.start(), Name.Variable.Instance, word # lit-word
@@ -239,7 +239,7 @@ class RebolLexer(RegexLexer):
if re.match(r'^\s*REBOL\s*\[', text, re.IGNORECASE):
# The code starts with REBOL header
return 1.0
- elif re.search(r'\s*REBOL\s*[', text, re.IGNORECASE):
+ elif re.search(r'\s*REBOL\s*\[', text, re.IGNORECASE):
# The code contains REBOL header but also some text before it
return 0.5
@@ -297,10 +297,10 @@ class RedLexer(RegexLexer):
yield match.start(), Keyword.Namespace, word
elif re.match("to-.*", word):
yield match.start(), Keyword, word
- elif re.match('(\+|-\*\*|-|\*\*|//|/|\*|and|or|xor|=\?|===|==|=|<>|<=|>=|'
- '<<<|>>>|<<|>>|<|>%)$', word):
+ elif re.match(r'(\+|-\*\*|-|\*\*|//|/|\*|and|or|xor|=\?|===|==|=|<>|<=|>=|'
+ r'<<<|>>>|<<|>>|<|>%)$', word):
yield match.start(), Operator, word
- elif re.match(".*\!$", word):
+ elif re.match(r".*\!$", word):
yield match.start(), Keyword.Type, word
elif re.match("'.*", word):
yield match.start(), Name.Variable.Instance, word # lit-word
diff --git a/pygments/lexers/robotframework.py b/pygments/lexers/robotframework.py
index e868127b..5bacffa3 100644
--- a/pygments/lexers/robotframework.py
+++ b/pygments/lexers/robotframework.py
@@ -161,7 +161,7 @@ class RowTokenizer(object):
class RowSplitter(object):
_space_splitter = re.compile('( {2,})')
- _pipe_splitter = re.compile('((?:^| +)\|(?: +|$))')
+ _pipe_splitter = re.compile(r'((?:^| +)\|(?: +|$))')
def split(self, row):
splitter = (row.startswith('| ') and self._split_from_pipes
diff --git a/pygments/lexers/ruby.py b/pygments/lexers/ruby.py
index fe750f1a..ce2fc7a7 100644
--- a/pygments/lexers/ruby.py
+++ b/pygments/lexers/ruby.py
@@ -403,8 +403,8 @@ class RubyConsoleLexer(Lexer):
aliases = ['rbcon', 'irb']
mimetypes = ['text/x-ruby-shellsession']
- _prompt_re = re.compile('irb\([a-zA-Z_]\w*\):\d{3}:\d+[>*"\'] '
- '|>> |\?> ')
+ _prompt_re = re.compile(r'irb\([a-zA-Z_]\w*\):\d{3}:\d+[>*"\'] '
+ r'|>> |\?> ')
def get_tokens_unprocessed(self, text):
rblexer = RubyLexer(**self.options)
@@ -498,11 +498,11 @@ class FancyLexer(RegexLexer):
(r'[a-zA-Z](\w|[-+?!=*/^><%])*:', Name.Function),
# operators, must be below functions
(r'[-+*/~,<>=&!?%^\[\].$]+', Operator),
- ('[A-Z]\w*', Name.Constant),
- ('@[a-zA-Z_]\w*', Name.Variable.Instance),
- ('@@[a-zA-Z_]\w*', Name.Variable.Class),
+ (r'[A-Z]\w*', Name.Constant),
+ (r'@[a-zA-Z_]\w*', Name.Variable.Instance),
+ (r'@@[a-zA-Z_]\w*', Name.Variable.Class),
('@@?', Operator),
- ('[a-zA-Z_]\w*', Name),
+ (r'[a-zA-Z_]\w*', Name),
# numbers - / checks are necessary to avoid mismarking regexes,
# see comment in RubyLexer
(r'(0[oO]?[0-7]+(?:_[0-7]+)*)(\s*)([/?])?',
diff --git a/pygments/lexers/scripting.py b/pygments/lexers/scripting.py
index b3af606e..28c37db8 100644
--- a/pygments/lexers/scripting.py
+++ b/pygments/lexers/scripting.py
@@ -104,7 +104,7 @@ class LuaLexer(RegexLexer):
(r'%s(?=%s*[.:])' % (_name, _s), Name.Class),
(_name, Name.Function, '#pop'),
# inline function
- ('\(', Punctuation, '#pop'),
+ (r'\(', Punctuation, '#pop'),
],
'goto': [
@@ -696,8 +696,8 @@ class AppleScriptLexer(RegexLexer):
(r'[-+]?\d+', Number.Integer),
],
'comment': [
- ('\(\*', Comment.Multiline, '#push'),
- ('\*\)', Comment.Multiline, '#pop'),
+ (r'\(\*', Comment.Multiline, '#push'),
+ (r'\*\)', Comment.Multiline, '#pop'),
('[^*(]+', Comment.Multiline),
('[*(]', Comment.Multiline),
],
diff --git a/pygments/lexers/sgf.py b/pygments/lexers/sgf.py
new file mode 100644
index 00000000..aa934b49
--- /dev/null
+++ b/pygments/lexers/sgf.py
@@ -0,0 +1,54 @@
+# -*- coding: utf-8 -*-
+"""
+ pygments.lexers.sgf
+ ~~~~~~~~~~~~~~~~~~~~
+
+ Lexer for Smart Game Format (sgf) file format.
+
+ The format is used to store game records of board games for two players
+ (mainly Go game).
+ For more information about the definition of the format, see:
+ https://www.red-bean.com/sgf/
+
+ :copyright: Copyright 2006-2018 by the Pygments team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+
+ .. versionadded:: 2.4
+"""
+
+from pygments.lexer import RegexLexer, bygroups
+from pygments.token import *
+
+__all__ = ["SmartGameFormatLexer"]
+
+
+class SmartGameFormatLexer(RegexLexer):
+ name = 'SmartGameFormat'
+ aliases = ['sgf']
+ filenames = ['*.sgf']
+
+ tokens = {
+ 'root': [
+ (r'[\s():;]', Punctuation),
+ # tokens:
+ (r'(A[BW]|AE|AN|AP|AR|AS|[BW]L|BM|[BW]R|[BW]S|[BW]T|CA|CH|CP|CR|DD|DM|DO|DT|EL|EV|EX|FF|FG|G[BW]|GC|GM|GN|HA|HO|ID|IP|IT|IY|KM|KO|L|LB|LN|LT|M|MA|MN|N|OB|OM|ON|OP|OT|OV|P[BW]|PC|PL|PM|RE|RG|RO|RU|SO|SC|SE|SI|SL|SO|SQ|ST|SU|SZ|T[BW]|TC|TE|TM|TR|UC|US|V|VW|[BW]|C)',
+ Name.Builtin),
+ # number:
+ (r'(\[)([0-9.]+)(\])',
+ bygroups(Punctuation, Literal.Number, Punctuation)),
+ # date:
+ (r'(\[)([0-9]{4}-[0-9]{2}-[0-9]{2})(\])',
+ bygroups(Punctuation, Literal.Date, Punctuation)),
+ # point:
+ (r'(\[)([a-z]{2})(\])',
+ bygroups(Punctuation, String, Punctuation)),
+ # double points:
+ (r'(\[)([a-z]{2})(:)([a-z]{2})(\])',
+ bygroups(Punctuation, String, Punctuation, String, Punctuation)),
+
+ (r'(\[)([\w\s#()+,\-.:?]+)(\])',
+ bygroups(Punctuation, String, Punctuation)),
+ (r'(\[)(\s.*)(\])',
+ bygroups(Punctuation, Text, Punctuation)),
+ ],
+ }
diff --git a/pygments/lexers/shell.py b/pygments/lexers/shell.py
index ceb6f14d..31bc7e94 100644
--- a/pygments/lexers/shell.py
+++ b/pygments/lexers/shell.py
@@ -19,7 +19,7 @@ from pygments.util import shebang_matches
__all__ = ['BashLexer', 'BashSessionLexer', 'TcshLexer', 'BatchLexer',
- 'MSDOSSessionLexer', 'PowerShellLexer',
+ 'SlurmBashLexer', 'MSDOSSessionLexer', 'PowerShellLexer',
'PowerShellSessionLexer', 'TcshSessionLexer', 'FishShellLexer']
line_re = re.compile('.*?\n')
@@ -38,7 +38,7 @@ class BashLexer(RegexLexer):
'*.exheres-0', '*.exlib', '*.zsh',
'.bashrc', 'bashrc', '.bash_*', 'bash_*', 'zshrc', '.zshrc',
'PKGBUILD']
- mimetypes = ['application/x-sh', 'application/x-shellscript']
+ mimetypes = ['application/x-sh', 'application/x-shellscript', 'text/x-shellscript']
tokens = {
'root': [
@@ -76,7 +76,7 @@ class BashLexer(RegexLexer):
(r'&&|\|\|', Operator),
],
'data': [
- (r'(?s)\$?"(\\\\|\\[0-7]+|\\.|[^"\\$])*"', String.Double),
+ (r'(?s)\$?"(\\.|[^"\\$])*"', String.Double),
(r'"', String.Double, 'string'),
(r"(?s)\$'(\\\\|\\[0-7]+|\\.|[^'\\])*'", String.Single),
(r"(?s)'.*?'", String.Single),
@@ -126,6 +126,28 @@ class BashLexer(RegexLexer):
return 0.2
+class SlurmBashLexer(BashLexer):
+ """
+ Lexer for (ba|k|z|)sh Slurm scripts.
+
+ .. versionadded:: 2.4
+ """
+
+ name = 'Slurm'
+ aliases = ['slurm', 'sbatch']
+ filenames = ['*.sl']
+ mimetypes = []
+ EXTRA_KEYWORDS = {'srun'}
+
+ def get_tokens_unprocessed(self, text):
+ for index, token, value in BashLexer.get_tokens_unprocessed(self, text):
+ if token is Text and value in self.EXTRA_KEYWORDS:
+ yield index, Name.Builtin, value
+ elif token is Comment.Single and 'SBATCH' in value:
+ yield index, Keyword.Pseudo, value
+ else:
+ yield index, token, value
+
class ShellSessionBaseLexer(Lexer):
"""
Base lexer for simplistic shell sessions.
@@ -638,13 +660,29 @@ class PowerShellLexer(RegexLexer):
'wildcard').split()
verbs = (
- 'write where wait use update unregister undo trace test tee take '
- 'suspend stop start split sort skip show set send select scroll resume '
- 'restore restart resolve resize reset rename remove register receive '
- 'read push pop ping out new move measure limit join invoke import '
- 'group get format foreach export expand exit enter enable disconnect '
- 'disable debug cxnew copy convertto convertfrom convert connect '
- 'complete compare clear checkpoint aggregate add').split()
+ 'write where watch wait use update unregister unpublish unprotect '
+ 'unlock uninstall undo unblock trace test tee take sync switch '
+ 'suspend submit stop step start split sort skip show set send select '
+ 'search scroll save revoke resume restore restart resolve resize '
+ 'reset request repair rename remove register redo receive read push '
+ 'publish protect pop ping out optimize open new move mount merge '
+ 'measure lock limit join invoke install initialize import hide group '
+ 'grant get format foreach find export expand exit enter enable edit '
+ 'dismount disconnect disable deny debug cxnew copy convertto '
+ 'convertfrom convert connect confirm compress complete compare close '
+ 'clear checkpoint block backup assert approve aggregate add').split()
+
+ aliases_ = (
+ 'ac asnp cat cd cfs chdir clc clear clhy cli clp cls clv cnsn '
+ 'compare copy cp cpi cpp curl cvpa dbp del diff dir dnsn ebp echo epal '
+ 'epcsv epsn erase etsn exsn fc fhx fl foreach ft fw gal gbp gc gci gcm '
+ 'gcs gdr ghy gi gjb gl gm gmo gp gps gpv group gsn gsnp gsv gu gv gwmi '
+ 'h history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp '
+ 'ls man md measure mi mount move mp mv nal ndr ni nmo npssc nsn nv ogv '
+ 'oh popd ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo '
+ 'rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc select '
+ 'set shcm si sl sleep sls sort sp spjb spps spsv start sujb sv swmi tee '
+ 'trcm type wget where wjb write').split()
commenthelp = (
'component description example externalhelp forwardhelpcategory '
@@ -672,6 +710,7 @@ class PowerShellLexer(RegexLexer):
(r'(%s)\b' % '|'.join(keywords), Keyword),
(r'-(%s)\b' % '|'.join(operators), Operator),
(r'(%s)-[a-z_]\w*\b' % '|'.join(verbs), Name.Builtin),
+ (r'(%s)\s' % '|'.join(aliases_), Name.Builtin),
(r'\[[a-z_\[][\w. `,\[\]]*\]', Name.Constant), # .net [type]s
(r'-[a-z_]\w*', Name),
(r'\w+', Name),
diff --git a/pygments/lexers/slash.py b/pygments/lexers/slash.py
new file mode 100644
index 00000000..bd73d463
--- /dev/null
+++ b/pygments/lexers/slash.py
@@ -0,0 +1,187 @@
+# -*- coding: utf-8 -*-
+"""
+ pygments.lexers.slash
+ ~~~~~~~~~~~~~~~~~~~~~
+
+ Lexer for the `Slash <https://github.com/arturadib/Slash-A>`_ programming
+ language.
+
+ :copyright: Copyright 2012 by GitHub, Inc
+ :license: BSD, see LICENSE for details.
+"""
+
+import re
+
+from pygments.lexer import ExtendedRegexLexer, bygroups, DelegatingLexer
+from pygments.token import Name, Number, String, Comment, Punctuation, \
+ Other, Keyword, Operator, Whitespace
+
+__all__ = ['SlashLexer']
+
+
+class SlashLanguageLexer(ExtendedRegexLexer):
+ _nkw = r'(?=[^a-zA-Z_0-9])'
+
+ def move_state(new_state):
+ return ("#pop", new_state)
+
+ 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, "}"
+ ctx.pos = match.end()
+ pass
+
+ tokens = {
+ "root": [
+ (r"<%=", Comment.Preproc, move_state("slash")),
+ (r"<%!!", Comment.Preproc, move_state("slash")),
+ (r"<%#.*?%>", Comment.Multiline),
+ (r"<%", Comment.Preproc, move_state("slash")),
+ (r".|\n", Other),
+ ],
+ "string": [
+ (r"\\", String.Escape, move_state("string_e")),
+ (r"\"", String, move_state("slash")),
+ (r"#\{", String.Interpol, "slash"),
+ (r'.|\n', String),
+ ],
+ "string_e": [
+ (r'n', String.Escape, move_state("string")),
+ (r't', String.Escape, move_state("string")),
+ (r'r', String.Escape, move_state("string")),
+ (r'e', String.Escape, move_state("string")),
+ (r'x[a-fA-F0-9]{2}', String.Escape, move_state("string")),
+ (r'.', String.Escape, move_state("string")),
+ ],
+ "regexp": [
+ (r'}[a-z]*', String.Regex, move_state("slash")),
+ (r'\\(.|\n)', String.Regex),
+ (r'{', String.Regex, "regexp_r"),
+ (r'.|\n', String.Regex),
+ ],
+ "regexp_r": [
+ (r'}[a-z]*', String.Regex, "#pop"),
+ (r'\\(.|\n)', String.Regex),
+ (r'{', String.Regex, "regexp_r"),
+ ],
+ "slash": [
+ (r"%>", Comment.Preproc, move_state("root")),
+ (r"\"", String, move_state("string")),
+ (r"'[a-zA-Z0-9_]+", String),
+ (r'%r{', String.Regex, move_state("regexp")),
+ (r'/\*.*?\*/', Comment.Multiline),
+ (r"(#|//).*?\n", Comment.Single),
+ (r'-?[0-9]+e[+-]?[0-9]+', Number.Float),
+ (r'-?[0-9]+\.[0-9]+(e[+-]?[0-9]+)?', Number.Float),
+ (r'-?[0-9]+', Number.Integer),
+ (r'nil'+_nkw, Name.Builtin),
+ (r'true'+_nkw, Name.Builtin),
+ (r'false'+_nkw, Name.Builtin),
+ (r'self'+_nkw, Name.Builtin),
+ (r'(class)(\s+)([A-Z][a-zA-Z0-9_\']*)',
+ bygroups(Keyword, Whitespace, Name.Class)),
+ (r'class'+_nkw, Keyword),
+ (r'extends'+_nkw, Keyword),
+ (r'(def)(\s+)(self)(\s*)(\.)(\s*)([a-z_][a-zA-Z0-9_\']*=?|<<|>>|==|<=>|<=|<|>=|>|\+|-(self)?|~(self)?|\*|/|%|^|&&|&|\||\[\]=?)',
+ bygroups(Keyword, Whitespace, Name.Builtin, Whitespace, Punctuation, Whitespace, Name.Function)),
+ (r'(def)(\s+)([a-z_][a-zA-Z0-9_\']*=?|<<|>>|==|<=>|<=|<|>=|>|\+|-(self)?|~(self)?|\*|/|%|^|&&|&|\||\[\]=?)',
+ bygroups(Keyword, Whitespace, Name.Function)),
+ (r'def'+_nkw, Keyword),
+ (r'if'+_nkw, Keyword),
+ (r'elsif'+_nkw, Keyword),
+ (r'else'+_nkw, Keyword),
+ (r'unless'+_nkw, Keyword),
+ (r'for'+_nkw, Keyword),
+ (r'in'+_nkw, Keyword),
+ (r'while'+_nkw, Keyword),
+ (r'until'+_nkw, Keyword),
+ (r'and'+_nkw, Keyword),
+ (r'or'+_nkw, Keyword),
+ (r'not'+_nkw, Keyword),
+ (r'lambda'+_nkw, Keyword),
+ (r'try'+_nkw, Keyword),
+ (r'catch'+_nkw, Keyword),
+ (r'return'+_nkw, Keyword),
+ (r'next'+_nkw, Keyword),
+ (r'last'+_nkw, Keyword),
+ (r'throw'+_nkw, Keyword),
+ (r'use'+_nkw, Keyword),
+ (r'switch'+_nkw, Keyword),
+ (r'\\', Keyword),
+ (r'λ', Keyword),
+ (r'__FILE__'+_nkw, Name.Builtin.Pseudo),
+ (r'__LINE__'+_nkw, Name.Builtin.Pseudo),
+ (r'[A-Z][a-zA-Z0-9_\']*'+_nkw, Name.Constant),
+ (r'[a-z_][a-zA-Z0-9_\']*'+_nkw, Name),
+ (r'@[a-z_][a-zA-Z0-9_\']*'+_nkw, Name.Variable.Instance),
+ (r'@@[a-z_][a-zA-Z0-9_\']*'+_nkw, Name.Variable.Class),
+ (r'\(', Punctuation),
+ (r'\)', Punctuation),
+ (r'\[', Punctuation),
+ (r'\]', Punctuation),
+ (r'\{', Punctuation),
+ (r'\}', right_angle_bracket),
+ (r';', Punctuation),
+ (r',', Punctuation),
+ (r'<<=', Operator),
+ (r'>>=', Operator),
+ (r'<<', Operator),
+ (r'>>', Operator),
+ (r'==', Operator),
+ (r'!=', Operator),
+ (r'=>', Operator),
+ (r'=', Operator),
+ (r'<=>', Operator),
+ (r'<=', Operator),
+ (r'>=', Operator),
+ (r'<', Operator),
+ (r'>', Operator),
+ (r'\+\+', Operator),
+ (r'\+=', Operator),
+ (r'-=', Operator),
+ (r'\*\*=', Operator),
+ (r'\*=', Operator),
+ (r'\*\*', Operator),
+ (r'\*', Operator),
+ (r'/=', Operator),
+ (r'\+', Operator),
+ (r'-', Operator),
+ (r'/', Operator),
+ (r'%=', Operator),
+ (r'%', Operator),
+ (r'^=', Operator),
+ (r'&&=', Operator),
+ (r'&=', Operator),
+ (r'&&', Operator),
+ (r'&', Operator),
+ (r'\|\|=', Operator),
+ (r'\|=', Operator),
+ (r'\|\|', Operator),
+ (r'\|', Operator),
+ (r'!', Operator),
+ (r'\.\.\.', Operator),
+ (r'\.\.', Operator),
+ (r'\.', Operator),
+ (r'::', Operator),
+ (r':', Operator),
+ (r'(\s|\n)+', Whitespace),
+ (r'[a-z_][a-zA-Z0-9_\']*', Name.Variable),
+ ],
+ }
+
+
+class SlashLexer(DelegatingLexer):
+ """
+ Lexer for the Slash programming language.
+
+ .. versionadded:: 2.4
+ """
+
+ name = 'Slash'
+ aliases = ['slash']
+ filenames = ['*.sl']
+
+ def __init__(self, **options):
+ from pygments.lexers.web import HtmlLexer
+ super(SlashLexer, self).__init__(HtmlLexer, SlashLanguageLexer, **options)
diff --git a/pygments/lexers/sql.py b/pygments/lexers/sql.py
index 3f7dfdb8..8884db22 100644
--- a/pygments/lexers/sql.py
+++ b/pygments/lexers/sql.py
@@ -59,7 +59,14 @@ line_re = re.compile('.*?\n')
language_re = re.compile(r"\s+LANGUAGE\s+'?(\w+)'?", re.IGNORECASE)
-do_re = re.compile(r'\bDO\b', re.IGNORECASE)
+do_re = re.compile(r'\bDO\b', re.IGNORECASE)
+
+# Regular expressions for analyse_text()
+name_between_bracket_re = re.compile(r'\[[a-zA-Z_]\w*\]')
+name_between_backtick_re = re.compile(r'`[a-zA-Z_]\w*`')
+tsql_go_re = re.compile(r'\bgo\b', re.IGNORECASE)
+tsql_declare_re = re.compile(r'\bdeclare\s+@', re.IGNORECASE)
+tsql_variable_re = re.compile(r'@[a-zA-Z_]\w*\b')
def language_callback(lexer, match):
@@ -82,7 +89,7 @@ def language_callback(lexer, match):
lexer.text[max(0, match.start()-25):match.start()]))
if m:
l = 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))
@@ -155,7 +162,7 @@ class PostgresLexer(PostgresBase, RegexLexer):
(r'\s+', Text),
(r'--.*\n?', Comment.Single),
(r'/\*', Comment.Multiline, 'multiline-comments'),
- (r'(' + '|'.join(s.replace(" ", "\s+")
+ (r'(' + '|'.join(s.replace(" ", r"\s+")
for s in DATATYPES + PSEUDO_TYPES)
+ r')\b', Name.Builtin),
(words(KEYWORDS, suffix=r'\b'), Keyword),
@@ -474,6 +481,9 @@ class SqlLexer(RegexLexer):
]
}
+ def analyse_text(text):
+ return 0.01
+
class TransactSqlLexer(RegexLexer):
"""
@@ -493,7 +503,7 @@ class TransactSqlLexer(RegexLexer):
tokens = {
'root': [
(r'\s+', Whitespace),
- (r'--(?m).*?$\n?', Comment.Single),
+ (r'(?m)--.*?$\n?', Comment.Single),
(r'/\*', Comment.Multiline, 'multiline-comments'),
(words(_tsql_builtins.OPERATORS), Operator),
(words(_tsql_builtins.OPERATOR_WORDS, suffix=r'\b'), Operator.Word),
@@ -530,6 +540,33 @@ class TransactSqlLexer(RegexLexer):
]
}
+ def analyse_text(text):
+ rating = 0
+ if tsql_declare_re.search(text):
+ # Found T-SQL variable declaration.
+ rating = 1.0
+ else:
+ name_between_backtick_count = len(
+ 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:
+ # Found at least twice as many [name] as `name`.
+ rating += 0.5
+ elif name_between_bracket_count > name_between_backtick_count:
+ rating += 0.2
+ elif name_between_bracket_count > 0:
+ rating += 0.1
+ if tsql_variable_re.search(text) is not None:
+ rating += 0.1
+ if tsql_go_re.search(text) is not None:
+ rating += 0.1
+ return rating
+
class MySqlLexer(RegexLexer):
"""
@@ -603,6 +640,23 @@ class MySqlLexer(RegexLexer):
]
}
+ def analyse_text(text):
+ rating = 0
+ name_between_backtick_count = len(
+ 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:
+ # Found at least twice as many `name` as [name].
+ rating += 0.5
+ elif name_between_backtick_count > name_between_bracket_count:
+ rating += 0.2
+ elif name_between_backtick_count > 0:
+ rating += 0.1
+ return rating
+
class SqliteConsoleLexer(Lexer):
"""
diff --git a/pygments/lexers/stata.py b/pygments/lexers/stata.py
index a015a23e..9566d12a 100644
--- a/pygments/lexers/stata.py
+++ b/pygments/lexers/stata.py
@@ -9,6 +9,7 @@
:license: BSD, see LICENSE for details.
"""
+import re
from pygments.lexer import RegexLexer, include, words
from pygments.token import Comment, Keyword, Name, Number, \
String, Text, Operator
@@ -33,56 +34,118 @@ class StataLexer(RegexLexer):
aliases = ['stata', 'do']
filenames = ['*.do', '*.ado']
mimetypes = ['text/x-stata', 'text/stata', 'application/x-stata']
+ flags = re.MULTILINE | re.DOTALL
tokens = {
'root': [
include('comments'),
- include('vars-strings'),
+ include('strings'),
+ include('macros'),
include('numbers'),
include('keywords'),
+ include('operators'),
+ include('format'),
(r'.', Text),
],
- # Global and local macros; regular and special strings
- 'vars-strings': [
- (r'\$[\w{]', Name.Variable.Global, 'var_validglobal'),
- (r'`\w{0,31}\'', Name.Variable),
- (r'"', String, 'string_dquote'),
- (r'`"', String, 'string_mquote'),
- ],
- # For either string type, highlight macros as macros
- 'string_dquote': [
- (r'"', String, '#pop'),
- (r'\\\\|\\"|\\\n', String.Escape),
- (r'\$', Name.Variable.Global, 'var_validglobal'),
- (r'`', Name.Variable, 'var_validlocal'),
- (r'[^$`"\\]+', String),
- (r'[$"\\]', String),
- ],
- 'string_mquote': [
+ # Comments are a complicated beast in Stata because they can be
+ # nested and there are a few corner cases with that. See:
+ # - github.com/kylebarron/language-stata/issues/90
+ # - statalist.org/forums/forum/general-stata-discussion/general/1448244
+ 'comments': [
+ (r'(^//|(?<=\s)//)(?!/)', Comment.Single, 'comments-double-slash'),
+ (r'^\s*\*', Comment.Single, 'comments-star'),
+ (r'/\*', Comment.Multiline, 'comments-block'),
+ (r'(^///|(?<=\s)///)', Comment.Special, 'comments-triple-slash')
+ ],
+ 'comments-block': [
+ (r'/\*', Comment.Multiline, '#push'),
+ # this ends and restarts a comment block. but need to catch this so
+ # that it doesn\'t start _another_ level of comment blocks
+ (r'\*/\*', Comment.Multiline),
+ (r'(\*/\s+\*(?!/)[^\n]*)|(\*/)', Comment.Multiline, '#pop'),
+ # Match anything else as a character inside the comment
+ (r'.', Comment.Multiline),
+ ],
+ 'comments-star': [
+ (r'///.*?\n', Comment.Single,
+ ('#pop', 'comments-triple-slash')),
+ (r'(^//|(?<=\s)//)(?!/)', Comment.Single,
+ ('#pop', 'comments-double-slash')),
+ (r'/\*', Comment.Multiline, 'comments-block'),
+ (r'.(?=\n)', Comment.Single, '#pop'),
+ (r'.', Comment.Single),
+ ],
+ 'comments-triple-slash': [
+ (r'\n', Comment.Special, '#pop'),
+ # A // breaks out of a comment for the rest of the line
+ (r'//.*?(?=\n)', Comment.Single, '#pop'),
+ (r'.', Comment.Special),
+ ],
+ 'comments-double-slash': [
+ (r'\n', Text, '#pop'),
+ (r'.', Comment.Single),
+ ],
+ # `"compound string"' and regular "string"; note the former are
+ # nested.
+ 'strings': [
+ (r'`"', String, 'string-compound'),
+ (r'(?<!`)"', String, 'string-regular'),
+ ],
+ 'string-compound': [
+ (r'`"', String, '#push'),
(r'"\'', String, '#pop'),
- (r'\\\\|\\"|\\\n', String.Escape),
- (r'\$', Name.Variable.Global, 'var_validglobal'),
- (r'`', Name.Variable, 'var_validlocal'),
- (r'[^$`"\\]+', String),
- (r'[$"\\]', String),
- ],
- 'var_validglobal': [
- (r'\{\w{0,32}\}', Name.Variable.Global, '#pop'),
- (r'\w{1,32}', Name.Variable.Global, '#pop'),
+ (r'\\\\|\\"|\\\$|\\`|\\\n', String.Escape),
+ include('macros'),
+ (r'.', String)
],
- 'var_validlocal': [
- (r'\w{0,31}\'', Name.Variable, '#pop'),
+ 'string-regular': [
+ (r'(")(?!\')|(?=\n)', String, '#pop'),
+ (r'\\\\|\\"|\\\$|\\`|\\\n', String.Escape),
+ include('macros'),
+ (r'.', String)
],
- # * only OK at line start, // OK anywhere
- 'comments': [
- (r'^\s*\*.*$', Comment),
- (r'//.*', Comment.Single),
- (r'/\*.*?\*/', Comment.Multiline),
- (r'/[*](.|\n)*?[*]/', Comment.Multiline),
+ # A local is usually
+ # `\w{0,31}'
+ # `:extended macro'
+ # `=expression'
+ # `[rsen](results)'
+ # `(++--)scalar(++--)'
+ #
+ # However, there are all sorts of weird rules wrt edge
+ # cases. Instead of writing 27 exceptions, anything inside
+ # `' is a local.
+ #
+ # A global is more restricted, so we do follow rules. Note only
+ # locals explicitly enclosed ${} can be nested.
+ 'macros': [
+ (r'\$(\{|(?=[\$`]))', Name.Variable.Global, 'macro-global-nested'),
+ (r'\$', Name.Variable.Global, 'macro-global-name'),
+ (r'`', Name.Variable, 'macro-local'),
+ ],
+ 'macro-local': [
+ (r'`', Name.Variable, '#push'),
+ (r"'", Name.Variable, '#pop'),
+ (r'\$(\{|(?=[\$`]))', Name.Variable.Global, 'macro-global-nested'),
+ (r'\$', Name.Variable.Global, 'macro-global-name'),
+ (r'.', Name.Variable), # fallback
+ ],
+ 'macro-global-nested': [
+ (r'\$(\{|(?=[\$`]))', Name.Variable.Global, '#push'),
+ (r'\}', Name.Variable.Global, '#pop'),
+ (r'\$', Name.Variable.Global, 'macro-global-name'),
+ (r'`', Name.Variable, 'macro-local'),
+ (r'\w', Name.Variable.Global), # fallback
+ (r'(?!\w)', Name.Variable.Global, '#pop'),
+ ],
+ 'macro-global-name': [
+ (r'\$(\{|(?=[\$`]))', Name.Variable.Global, 'macro-global-nested', '#pop'),
+ (r'\$', Name.Variable.Global, 'macro-global-name', '#pop'),
+ (r'`', Name.Variable, 'macro-local', '#pop'),
+ (r'\w{1,32}', Name.Variable.Global, '#pop'),
],
# Built in functions and statements
'keywords': [
- (words(builtins_functions, prefix = r'\b', suffix = r'\('),
+ (words(builtins_functions, prefix = r'\b', suffix = r'(?=\()'),
Name.Function),
(words(builtins_base, prefix = r'(^\s*|\s)', suffix = r'\b'),
Keyword),
@@ -100,9 +163,9 @@ class StataLexer(RegexLexer):
],
# Stata formats
'format': [
- (r'%-?\d{1,2}(\.\d{1,2})?[gfe]c?', Name.Variable),
- (r'%(21x|16H|16L|8H|8L)', Name.Variable),
- (r'%-?(tc|tC|td|tw|tm|tq|th|ty|tg).{0,32}', Name.Variable),
- (r'%[-~]?\d{1,4}s', Name.Variable),
+ (r'%-?\d{1,2}(\.\d{1,2})?[gfe]c?', Name.Other),
+ (r'%(21x|16H|16L|8H|8L)', Name.Other),
+ (r'%-?(tc|tC|td|tw|tm|tq|th|ty|tg)\S{0,32}', Name.Other),
+ (r'%[-~]?\d{1,4}s', Name.Other),
]
}
diff --git a/pygments/lexers/templates.py b/pygments/lexers/templates.py
index 83c57db8..8000deba 100644
--- a/pygments/lexers/templates.py
+++ b/pygments/lexers/templates.py
@@ -187,13 +187,13 @@ class SmartyLexer(RegexLexer):
def analyse_text(text):
rv = 0.0
- if re.search('\{if\s+.*?\}.*?\{/if\}', text):
+ if re.search(r'\{if\s+.*?\}.*?\{/if\}', text):
rv += 0.15
- if re.search('\{include\s+file=.*?\}', text):
+ if re.search(r'\{include\s+file=.*?\}', text):
rv += 0.15
- if re.search('\{foreach\s+.*?\}.*?\{/foreach\}', text):
+ if re.search(r'\{foreach\s+.*?\}.*?\{/foreach\}', text):
rv += 0.15
- if re.search('\{\$.*?\}', text):
+ if re.search(r'\{\$.*?\}', text):
rv += 0.01
return rv
@@ -375,7 +375,7 @@ class DjangoLexer(RegexLexer):
(r'\.\w+', Name.Variable),
(r':?"(\\\\|\\"|[^"])*"', String.Double),
(r":?'(\\\\|\\'|[^'])*'", String.Single),
- (r'([{}()\[\]+\-*/,:~]|[><=]=?)', Operator),
+ (r'([{}()\[\]+\-*/%,:~]|[><=]=?|!=)', Operator),
(r"[0-9](\.[0-9]*)?(eE[+-][0-9])?[flFLdD]?|"
r"0[xX][0-9a-fA-F]+[Ll]?", Number),
],
@@ -421,18 +421,18 @@ class MyghtyLexer(RegexLexer):
tokens = {
'root': [
(r'\s+', Text),
- (r'(<%(?:def|method))(\s*)(.*?)(>)(.*?)(</%\2\s*>)(?s)',
+ (r'(?s)(<%(?:def|method))(\s*)(.*?)(>)(.*?)(</%\2\s*>)',
bygroups(Name.Tag, Text, Name.Function, Name.Tag,
using(this), Name.Tag)),
- (r'(<%\w+)(.*?)(>)(.*?)(</%\2\s*>)(?s)',
+ (r'(?s)(<%\w+)(.*?)(>)(.*?)(</%\2\s*>)',
bygroups(Name.Tag, Name.Function, Name.Tag,
using(PythonLexer), Name.Tag)),
(r'(<&[^|])(.*?)(,.*?)?(&>)',
bygroups(Name.Tag, Name.Function, using(PythonLexer), Name.Tag)),
- (r'(<&\|)(.*?)(,.*?)?(&>)(?s)',
+ (r'(?s)(<&\|)(.*?)(,.*?)?(&>)',
bygroups(Name.Tag, Name.Function, using(PythonLexer), Name.Tag)),
(r'</&>', Name.Tag),
- (r'(<%!?)(.*?)(%>)(?s)',
+ (r'(?s)(<%!?)(.*?)(%>)',
bygroups(Name.Tag, using(PythonLexer), Name.Tag)),
(r'(?<=^)#[^\n]*(\n|\Z)', Comment),
(r'(?<=^)(%)([^\n]*)(\n|\Z)',
@@ -538,20 +538,20 @@ class MasonLexer(RegexLexer):
tokens = {
'root': [
(r'\s+', Text),
- (r'(<%doc>)(.*?)(</%doc>)(?s)',
+ (r'(?s)(<%doc>)(.*?)(</%doc>)',
bygroups(Name.Tag, Comment.Multiline, Name.Tag)),
- (r'(<%(?:def|method))(\s*)(.*?)(>)(.*?)(</%\2\s*>)(?s)',
+ (r'(?s)(<%(?:def|method))(\s*)(.*?)(>)(.*?)(</%\2\s*>)',
bygroups(Name.Tag, Text, Name.Function, Name.Tag,
using(this), Name.Tag)),
- (r'(<%\w+)(.*?)(>)(.*?)(</%\2\s*>)(?s)',
+ (r'(?s)(<%\w+)(.*?)(>)(.*?)(</%\2\s*>)',
bygroups(Name.Tag, Name.Function, Name.Tag,
using(PerlLexer), Name.Tag)),
- (r'(<&[^|])(.*?)(,.*?)?(&>)(?s)',
+ (r'(?s)(<&[^|])(.*?)(,.*?)?(&>)',
bygroups(Name.Tag, Name.Function, using(PerlLexer), Name.Tag)),
- (r'(<&\|)(.*?)(,.*?)?(&>)(?s)',
+ (r'(?s)(<&\|)(.*?)(,.*?)?(&>)',
bygroups(Name.Tag, Name.Function, using(PerlLexer), Name.Tag)),
(r'</&>', Name.Tag),
- (r'(<%!?)(.*?)(%>)(?s)',
+ (r'(?s)(<%!?)(.*?)(%>)',
bygroups(Name.Tag, using(PerlLexer), Name.Tag)),
(r'(?<=^)#[^\n]*(\n|\Z)', Comment),
(r'(?<=^)(%)([^\n]*)(\n|\Z)',
@@ -607,7 +607,7 @@ class MakoLexer(RegexLexer):
(r'(</%)([\w.:]+)(>)',
bygroups(Comment.Preproc, Name.Builtin, Comment.Preproc)),
(r'<%(?=([\w.:]+))', Comment.Preproc, 'ondeftags'),
- (r'(<%(?:!?))(.*?)(%>)(?s)',
+ (r'(?s)(<%(?:!?))(.*?)(%>)',
bygroups(Comment.Preproc, using(PythonLexer), Comment.Preproc)),
(r'(\$\{)(.*?)(\})',
bygroups(Comment.Preproc, using(PythonLexer), Comment.Preproc)),
@@ -759,7 +759,7 @@ class CheetahLexer(RegexLexer):
# TODO support other Python syntax like $foo['bar']
(r'(\$)([a-zA-Z_][\w.]*\w)',
bygroups(Comment.Preproc, using(CheetahPythonLexer))),
- (r'(\$\{!?)(.*?)(\})(?s)',
+ (r'(?s)(\$\{!?)(.*?)(\})',
bygroups(Comment.Preproc, using(CheetahPythonLexer),
Comment.Preproc)),
(r'''(?sx)
@@ -942,9 +942,9 @@ class HtmlGenshiLexer(DelegatingLexer):
def analyse_text(text):
rv = 0.0
- if re.search('\$\{.*?\}', text) is not None:
+ if re.search(r'\$\{.*?\}', text) is not None:
rv += 0.2
- if re.search('py:(.*?)=["\']', text) is not None:
+ if re.search(r'py:(.*?)=["\']', text) is not None:
rv += 0.2
return rv + HtmlLexer.analyse_text(text) - 0.01
@@ -967,9 +967,9 @@ class GenshiLexer(DelegatingLexer):
def analyse_text(text):
rv = 0.0
- if re.search('\$\{.*?\}', text) is not None:
+ if re.search(r'\$\{.*?\}', text) is not None:
rv += 0.2
- if re.search('py:(.*?)=["\']', text) is not None:
+ if re.search(r'py:(.*?)=["\']', text) is not None:
rv += 0.2
return rv + XmlLexer.analyse_text(text) - 0.01
@@ -1627,7 +1627,7 @@ class SspLexer(DelegatingLexer):
def analyse_text(text):
rv = 0.0
- if re.search('val \w+\s*:', text):
+ if re.search(r'val \w+\s*:', text):
rv += 0.6
if looks_like_xml(text):
rv += 0.2
@@ -1955,7 +1955,7 @@ class LiquidLexer(RegexLexer):
'output': [
include('whitespace'),
- ('\}\}', Punctuation, '#pop'), # end of output
+ (r'\}\}', Punctuation, '#pop'), # end of output
(r'\|', Punctuation, 'filters')
],
diff --git a/pygments/lexers/teraterm.py b/pygments/lexers/teraterm.py
new file mode 100644
index 00000000..100a89e0
--- /dev/null
+++ b/pygments/lexers/teraterm.py
@@ -0,0 +1,158 @@
+# -*- coding: utf-8 -*-
+"""
+ pygments.lexers.teraterm
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Lexer for Tera Term macro files.
+
+ :copyright: Copyright 2006-2018 by the Pygments team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+import re
+
+from pygments.lexer import RegexLexer, include, bygroups
+from pygments.token import Text, Comment, Operator, Name, String, \
+ Number, Keyword
+
+__all__ = ['TeraTermLexer']
+
+
+class TeraTermLexer(RegexLexer):
+ """
+ For `Tera Term <https://ttssh2.osdn.jp/>`_ macro source code.
+
+ .. versionadded:: 2.4
+ """
+ name = 'Tera Term macro'
+ aliases = ['ttl', 'teraterm', 'teratermmacro']
+ filenames = ['*.ttl']
+ mimetypes = ['text/x-teratermmacro']
+
+ tokens = {
+ 'root': [
+ include('comments'),
+ include('labels'),
+ include('commands'),
+ include('builtin-variables'),
+ include('user-variables'),
+ include('operators'),
+ include('numeric-literals'),
+ include('string-literals'),
+ include('all-whitespace'),
+ (r'[^\s]', Text),
+ ],
+ 'comments': [
+ (r';[^\r\n]*', Comment.Single),
+ (r'/\*', Comment.Multiline, 'in-comment'),
+ ],
+ 'in-comment': [
+ (r'\*/', Comment.Multiline, '#pop'),
+ (r'[^*/]+', Comment.Multiline),
+ (r'[*/]', Comment.Multiline)
+ ],
+ 'labels': [
+ (r'(?i)^(\s*)(:[0-9a-z_]+)', bygroups(Text, Name.Label)),
+ ],
+ 'commands': [
+ (
+ r'(?i)\b('
+ r'basename|beep|bplusrecv|bplussend|break|bringupbox|'
+ r'callmenu|changedir|checksum16|checksum16file|'
+ r'checksum32|checksum32file|checksum8|checksum8file|'
+ r'clearscreen|clipb2var|closesbox|closett|code2str|'
+ r'connect|continue|crc16|crc16file|crc32|crc32file|'
+ r'cygconnect|delpassword|dirname|dirnamebox|disconnect|'
+ r'dispstr|do|else|elseif|enablekeyb|end|endif|enduntil|'
+ r'endwhile|exec|execcmnd|exit|expandenv|fileclose|'
+ r'fileconcat|filecopy|filecreate|filedelete|filelock|'
+ r'filemarkptr|filenamebox|fileopen|fileread|filereadln|'
+ r'filerename|filesearch|fileseek|fileseekback|filestat|'
+ r'filestrseek|filestrseek2|filetruncate|fileunlock|'
+ r'filewrite|filewriteln|findclose|findfirst|findnext|'
+ r'flushrecv|foldercreate|folderdelete|foldersearch|for|'
+ r'getdate|getdir|getenv|getfileattr|gethostname|'
+ r'getipv4addr|getipv6addr|getmodemstatus|getpassword|'
+ r'getspecialfolder|gettime|gettitle|getttdir|getver|'
+ r'if|ifdefined|include|inputbox|int2str|intdim|'
+ r'ispassword|kmtfinish|kmtget|kmtrecv|kmtsend|listbox|'
+ r'loadkeymap|logautoclosemode|logclose|loginfo|logopen|'
+ r'logpause|logrotate|logstart|logwrite|loop|makepath|'
+ r'messagebox|mpause|next|passwordbox|pause|quickvanrecv|'
+ r'quickvansend|random|recvln|regexoption|restoresetup|'
+ r'return|rotateleft|rotateright|scprecv|scpsend|send|'
+ r'sendbreak|sendbroadcast|sendfile|sendkcode|sendln|'
+ r'sendlnbroadcast|sendlnmulticast|sendmulticast|setbaud|'
+ r'setdate|setdebug|setdir|setdlgpos|setdtr|setecho|'
+ r'setenv|setexitcode|setfileattr|setflowctrl|'
+ r'setmulticastname|setpassword|setrts|setsync|settime|'
+ r'settitle|show|showtt|sprintf|sprintf2|statusbox|'
+ r'str2code|str2int|strcompare|strconcat|strcopy|strdim|'
+ r'strinsert|strjoin|strlen|strmatch|strremove|'
+ r'strreplace|strscan|strspecial|strsplit|strtrim|'
+ r'testlink|then|tolower|toupper|unlink|until|uptime|'
+ r'var2clipb|wait|wait4all|waitevent|waitln|waitn|'
+ r'waitrecv|waitregex|while|xmodemrecv|xmodemsend|'
+ r'yesnobox|ymodemrecv|ymodemsend|zmodemrecv|zmodemsend'
+ r')\b',
+ Keyword,
+ ),
+ (
+ r'(?i)(call|goto)([ \t]+)([0-9a-z_]+)',
+ bygroups(Keyword, Text, Name.Label),
+ )
+ ],
+ 'builtin-variables': [
+ (
+ r'(?i)('
+ r'groupmatchstr1|groupmatchstr2|groupmatchstr3|'
+ r'groupmatchstr4|groupmatchstr5|groupmatchstr6|'
+ r'groupmatchstr7|groupmatchstr8|groupmatchstr9|'
+ r'param1|param2|param3|param4|param5|param6|'
+ r'param7|param8|param9|paramcnt|params|'
+ r'inputstr|matchstr|mtimeout|result|timeout'
+ r')\b',
+ Name.Builtin
+ ),
+ ],
+ 'user-variables': [
+ (r'(?i)[A-Z_][A-Z0-9_]*', Name.Variable),
+ ],
+ 'numeric-literals': [
+ (r'(-?)([0-9]+)', bygroups(Operator, Number.Integer)),
+ (r'(?i)\$[0-9a-f]+', Number.Hex),
+ ],
+ 'string-literals': [
+ (r'(?i)#(?:[0-9]+|\$[0-9a-f]+)', String.Char),
+ (r"'", String.Single, 'in-single-string'),
+ (r'"', String.Double, 'in-double-string'),
+ ],
+ 'in-general-string': [
+ (r'[\\][\\nt]', String.Escape), # Only three escapes are supported.
+ (r'.', String),
+ ],
+ 'in-single-string': [
+ (r"'", String.Single, '#pop'),
+ include('in-general-string'),
+ ],
+ 'in-double-string': [
+ (r'"', String.Double, '#pop'),
+ include('in-general-string'),
+ ],
+ 'operators': [
+ (r'and|not|or|xor', Operator.Word),
+ (r'[!%&*+<=>^~\|\/-]+', Operator),
+ (r'[()]', String.Symbol),
+ ],
+ 'all-whitespace': [
+ (r'[\s]+', Text),
+ ],
+ }
+
+ # Turtle and Tera Term macro files share the same file extension
+ # but each has a recognizable and distinct syntax.
+ def analyse_text(text):
+ result = 0.0
+ if re.search(TeraTermLexer.tokens['commands'][0][0], text):
+ result += 0.60
+ return result
diff --git a/pygments/lexers/testing.py b/pygments/lexers/testing.py
index 1e0795b1..86e60f25 100644
--- a/pygments/lexers/testing.py
+++ b/pygments/lexers/testing.py
@@ -29,7 +29,7 @@ class GherkinLexer(RegexLexer):
feature_keywords = u'^(기능|機能|功能|フィーチャ|خاصية|תכונה|Функціонал|Функционалност|Функционал|Фича|Особина|Могућност|Özellik|Właściwość|Tính năng|Trajto|Savybė|Požiadavka|Požadavek|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Fīča|Funzionalità|Funktionalität|Funkcionalnost|Funkcionalitāte|Funcționalitate|Functionaliteit|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Feature|Egenskap|Egenskab|Crikey|Característica|Arwedd)(:)(.*)$'
feature_element_keywords = u'^(\\s*)(시나리오 개요|시나리오|배경|背景|場景大綱|場景|场景大纲|场景|劇本大綱|劇本|剧本大纲|剧本|テンプレ|シナリオテンプレート|シナリオテンプレ|シナリオアウトライン|シナリオ|سيناريو مخطط|سيناريو|الخلفية|תרחיש|תבנית תרחיש|רקע|Тарих|Сценарій|Сценарио|Сценарий структураси|Сценарий|Структура сценарію|Структура сценарија|Структура сценария|Скица|Рамка на сценарий|Пример|Предыстория|Предистория|Позадина|Передумова|Основа|Концепт|Контекст|Założenia|Wharrimean is|Tình huống|The thing of it is|Tausta|Taust|Tapausaihio|Tapaus|Szenariogrundriss|Szenario|Szablon scenariusza|Stsenaarium|Struktura scenarija|Skica|Skenario konsep|Skenario|Situācija|Senaryo taslağı|Senaryo|Scénář|Scénario|Schema dello scenario|Scenārijs pēc parauga|Scenārijs|Scenár|Scenaro|Scenariusz|Scenariul de şablon|Scenariul de sablon|Scenariu|Scenario Outline|Scenario Amlinellol|Scenario|Scenarijus|Scenarijaus šablonas|Scenarij|Scenarie|Rerefons|Raamstsenaarium|Primer|Pozadí|Pozadina|Pozadie|Plan du scénario|Plan du Scénario|Osnova scénáře|Osnova|Náčrt Scénáře|Náčrt Scenáru|Mate|MISHUN SRSLY|MISHUN|Kịch bản|Konturo de la scenaro|Kontext|Konteksts|Kontekstas|Kontekst|Koncept|Khung tình huống|Khung kịch bản|Háttér|Grundlage|Geçmiş|Forgatókönyv vázlat|Forgatókönyv|Fono|Esquema do Cenário|Esquema do Cenario|Esquema del escenario|Esquema de l\'escenari|Escenario|Escenari|Dis is what went down|Dasar|Contexto|Contexte|Contesto|Condiţii|Conditii|Cenário|Cenario|Cefndir|Bối cảnh|Blokes|Bakgrunn|Bakgrund|Baggrund|Background|B4|Antecedents|Antecedentes|All y\'all|Achtergrond|Abstrakt Scenario|Abstract Scenario)(:)(.*)$'
examples_keywords = u'^(\\s*)(예|例子|例|サンプル|امثلة|דוגמאות|Сценарији|Примери|Приклади|Мисоллар|Значения|Örnekler|Voorbeelden|Variantai|Tapaukset|Scenarios|Scenariji|Scenarijai|Příklady|Példák|Príklady|Przykłady|Primjeri|Primeri|Piemēri|Pavyzdžiai|Paraugs|Juhtumid|Exemplos|Exemples|Exemplele|Exempel|Examples|Esempi|Enghreifftiau|Ekzemploj|Eksempler|Ejemplos|EXAMPLZ|Dữ liệu|Contoh|Cobber|Beispiele)(:)(.*)$'
- step_keywords = u'^(\\s*)(하지만|조건|먼저|만일|만약|단|그리고|그러면|那麼|那么|而且|當|当|前提|假設|假设|假如|假定|但是|但し|並且|并且|同時|同时|もし|ならば|ただし|しかし|かつ|و |متى |لكن |عندما |ثم |بفرض |اذاً |כאשר |וגם |בהינתן |אזי |אז |אבל |Якщо |Унда |То |Припустимо, що |Припустимо |Онда |Но |Нехай |Лекин |Когато |Када |Кад |К тому же |И |Задато |Задати |Задате |Если |Допустим |Дадено |Ва |Бирок |Аммо |Али |Але |Агар |А |І |Și |És |Zatati |Zakładając |Zadato |Zadate |Zadano |Zadani |Zadan |Youse know when youse got |Youse know like when |Yna |Ya know how |Ya gotta |Y |Wun |Wtedy |When y\'all |When |Wenn |WEN |Và |Ve |Und |Un |Thì |Then y\'all |Then |Tapi |Tak |Tada |Tad |Så |Stel |Soit |Siis |Si |Sed |Se |Quando |Quand |Quan |Pryd |Pokud |Pokiaľ |Però |Pero |Pak |Oraz |Onda |Ond |Oletetaan |Og |Och |O zaman |Når |När |Niin |Nhưng |N |Mutta |Men |Mas |Maka |Majd |Mais |Maar |Ma |Lorsque |Lorsqu\'|Kun |Kuid |Kui |Khi |Keď |Ketika |Když |Kaj |Kai |Kada |Kad |Jeżeli |Ja |Ir |I CAN HAZ |I |Ha |Givun |Givet |Given y\'all |Given |Gitt |Gegeven |Gegeben sei |Fakat |Eğer ki |Etant donné |Et |Então |Entonces |Entao |En |Eeldades |E |Duota |Dun |Donitaĵo |Donat |Donada |Do |Diyelim ki |Dengan |Den youse gotta |De |Dato |Dar |Dann |Dan |Dado |Dacă |Daca |DEN |Când |Cuando |Cho |Cept |Cand |Cal |But y\'all |But |Buh |Biết |Bet |BUT |Atès |Atunci |Atesa |Anrhegedig a |Angenommen |And y\'all |And |An |Ama |Als |Alors |Allora |Ali |Aleshores |Ale |Akkor |Aber |AN |A také |A |\* )'
+ step_keywords = u'^(\\s*)(하지만|조건|먼저|만일|만약|단|그리고|그러면|那麼|那么|而且|當|当|前提|假設|假设|假如|假定|但是|但し|並且|并且|同時|同时|もし|ならば|ただし|しかし|かつ|و |متى |لكن |عندما |ثم |بفرض |اذاً |כאשר |וגם |בהינתן |אזי |אז |אבל |Якщо |Унда |То |Припустимо, що |Припустимо |Онда |Но |Нехай |Лекин |Когато |Када |Кад |К тому же |И |Задато |Задати |Задате |Если |Допустим |Дадено |Ва |Бирок |Аммо |Али |Але |Агар |А |І |Și |És |Zatati |Zakładając |Zadato |Zadate |Zadano |Zadani |Zadan |Youse know when youse got |Youse know like when |Yna |Ya know how |Ya gotta |Y |Wun |Wtedy |When y\'all |When |Wenn |WEN |Và |Ve |Und |Un |Thì |Then y\'all |Then |Tapi |Tak |Tada |Tad |Så |Stel |Soit |Siis |Si |Sed |Se |Quando |Quand |Quan |Pryd |Pokud |Pokiaľ |Però |Pero |Pak |Oraz |Onda |Ond |Oletetaan |Og |Och |O zaman |Når |När |Niin |Nhưng |N |Mutta |Men |Mas |Maka |Majd |Mais |Maar |Ma |Lorsque |Lorsqu\'|Kun |Kuid |Kui |Khi |Keď |Ketika |Když |Kaj |Kai |Kada |Kad |Jeżeli |Ja |Ir |I CAN HAZ |I |Ha |Givun |Givet |Given y\'all |Given |Gitt |Gegeven |Gegeben sei |Fakat |Eğer ki |Etant donné |Et |Então |Entonces |Entao |En |Eeldades |E |Duota |Dun |Donitaĵo |Donat |Donada |Do |Diyelim ki |Dengan |Den youse gotta |De |Dato |Dar |Dann |Dan |Dado |Dacă |Daca |DEN |Când |Cuando |Cho |Cept |Cand |Cal |But y\'all |But |Buh |Biết |Bet |BUT |Atès |Atunci |Atesa |Anrhegedig a |Angenommen |And y\'all |And |An |Ama |Als |Alors |Allora |Ali |Aleshores |Ale |Akkor |Aber |AN |A také |A |\\* )'
tokens = {
'comments': [
diff --git a/pygments/lexers/text.py b/pygments/lexers/text.py
index 9b3b5fea..bb1dccf2 100644
--- a/pygments/lexers/text.py
+++ b/pygments/lexers/text.py
@@ -18,6 +18,7 @@ from pygments.lexers.markup import BBCodeLexer, MoinWikiLexer, RstLexer, \
from pygments.lexers.installers import DebianControlLexer, SourcesListLexer
from pygments.lexers.make import MakefileLexer, BaseMakefileLexer, CMakeLexer
from pygments.lexers.haxe import HxmlLexer
+from pygments.lexers.sgf import SmartGameFormatLexer
from pygments.lexers.diff import DiffLexer, DarcsPatchLexer
from pygments.lexers.data import YamlLexer
from pygments.lexers.textfmts import IrcLogsLexer, GettextLexer, HttpLexer
diff --git a/pygments/lexers/textfmts.py b/pygments/lexers/textfmts.py
index bb8124ef..b70c2ad6 100644
--- a/pygments/lexers/textfmts.py
+++ b/pygments/lexers/textfmts.py
@@ -266,7 +266,7 @@ class TodotxtLexer(RegexLexer):
# 5. Leading project
(project_regex, Project, 'incomplete'),
# 6. Non-whitespace catch-all
- ('\S+', IncompleteTaskText, 'incomplete'),
+ (r'\S+', IncompleteTaskText, 'incomplete'),
],
# Parse a complete task
@@ -277,9 +277,9 @@ class TodotxtLexer(RegexLexer):
(context_regex, Context),
(project_regex, Project),
# Tokenize non-whitespace text
- ('\S+', CompleteTaskText),
+ (r'\S+', CompleteTaskText),
# Tokenize whitespace not containing a newline
- ('\s+', CompleteTaskText),
+ (r'\s+', CompleteTaskText),
],
# Parse an incomplete task
@@ -290,8 +290,8 @@ class TodotxtLexer(RegexLexer):
(context_regex, Context),
(project_regex, Project),
# Tokenize non-whitespace text
- ('\S+', IncompleteTaskText),
+ (r'\S+', IncompleteTaskText),
# Tokenize whitespace not containing a newline
- ('\s+', IncompleteTaskText),
+ (r'\s+', IncompleteTaskText),
],
}
diff --git a/pygments/lexers/typoscript.py b/pygments/lexers/typoscript.py
index e358af07..f75a6f02 100644
--- a/pygments/lexers/typoscript.py
+++ b/pygments/lexers/typoscript.py
@@ -108,13 +108,13 @@ class TypoScriptLexer(RegexLexer):
name = 'TypoScript'
aliases = ['typoscript']
- filenames = ['*.ts', '*.txt']
+ filenames = ['*.typoscript']
mimetypes = ['text/x-typoscript']
flags = re.DOTALL | re.MULTILINE
# Slightly higher than TypeScript (which is 0).
- priority = 0.1
+ priority = 0.0
tokens = {
'root': [
@@ -132,7 +132,7 @@ class TypoScriptLexer(RegexLexer):
],
'keywords': [
# Conditions
- (r'(\[)(?i)(browser|compatVersion|dayofmonth|dayofweek|dayofyear|'
+ (r'(?i)(\[)(browser|compatVersion|dayofmonth|dayofweek|dayofyear|'
r'device|ELSE|END|GLOBAL|globalString|globalVar|hostname|hour|IP|'
r'language|loginUser|loginuser|minute|month|page|PIDinRootline|'
r'PIDupinRootline|system|treeLevel|useragent|userFunc|usergroup|'
@@ -172,7 +172,7 @@ class TypoScriptLexer(RegexLexer):
'html': [
(r'<\S[^\n>]*>', using(TypoScriptHtmlDataLexer)),
(r'&[^;\n]*;', String),
- (r'(_CSS_DEFAULT_STYLE)(\s*)(\()(?s)(.*(?=\n\)))',
+ (r'(?s)(_CSS_DEFAULT_STYLE)(\s*)(\()(.*(?=\n\)))',
bygroups(Name.Class, Text, String.Symbol, using(TypoScriptCssDataLexer))),
],
'literal': [
@@ -220,7 +220,3 @@ class TypoScriptLexer(RegexLexer):
(r'[\w"\-!/&;]+', Text),
],
}
-
- def analyse_text(text):
- if '<INCLUDE_TYPOSCRIPT:' in text:
- return 1.0
diff --git a/pygments/lexers/unicon.py b/pygments/lexers/unicon.py
new file mode 100644
index 00000000..6301a88b
--- /dev/null
+++ b/pygments/lexers/unicon.py
@@ -0,0 +1,390 @@
+# -*- coding: utf-8 -*-
+"""
+ pygments.lexers.icon
+ ~~~~~~~~~~~~~~~~~~~~
+
+ Lexers for the Icon and Unicon languages, including ucode VM.
+
+ :copyright: Copyright 2006-2016 by the Pygments team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+import re
+
+from pygments.lexer import Lexer, RegexLexer, include, bygroups, words, \
+ using, this, default
+from pygments.util import get_bool_opt, get_list_opt
+from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
+ Number, Punctuation, Error
+from pygments.scanner import Scanner
+
+__all__ = ['IconLexer', 'UcodeLexer', 'UniconLexer']
+
+class UniconLexer(RegexLexer):
+ """
+ For Unicon source code.
+
+ .. versionadded:: 2.4
+ """
+
+ name = 'Unicon'
+ aliases = ['unicon']
+ filenames = ['*.icn']
+ mimetypes = ['text/unicon']
+
+ flags = re.MULTILINE
+
+ tokens = {
+ 'root': [
+ (r'[^\S\n]+', Text),
+ (r'#.*?\n', Comment.Single),
+ (r'[^\S\n]+', Text),
+ (r'class|method|procedure', Keyword.Declaration, 'subprogram'),
+ (r'(record)(\s+)(\w+)',
+ bygroups(Keyword.Declaration, Text, Keyword.Type), 'type_def'),
+ (r'(#line|\$C|\$Cend|\$define|\$else|\$endif|\$error|\$ifdef|'
+ r'\$ifndef|\$include|\$line|\$undef)\b', Keyword.PreProc),
+ (r'(&null|&fail)\b', Keyword.Constant),
+ (r'&allocated|&ascii|&clock|&collections|&column|&col|&control|'
+ r'&cset|&current|&dateline|&date|&digits|&dump|'
+ r'&errno|&errornumber|&errortext|&errorvalue|&error|&errout|'
+ r'&eventcode|&eventvalue|&eventsource|&e|'
+ r'&features|&file|&host|&input|&interval|&lcase|&letters|'
+ r'&level|&line|&ldrag|&lpress|&lrelease|'
+ r'&main|&mdrag|&meta|&mpress|&mrelease|&now|&output|'
+ r'&phi|&pick|&pi|&pos|&progname|'
+ r'&random|&rdrag|&regions|&resize|&row|&rpress|&rrelease|'
+ r'&shift|&source|&storage|&subject|'
+ r'&time|&trace|&ucase|&version|'
+ r'&window|&x|&y', Keyword.Reserved),
+ (r'(by|of|not|to)\b', Keyword.Reserved),
+ (r'(global|local|static|abstract)\b', Keyword.Reserved),
+ (r'package|link|import', Keyword.Declaration),
+ (words((
+ 'break', 'case', 'create', 'critical', 'default', 'end', 'all',
+ 'do', 'else', 'every', 'fail', 'if', 'import', 'initial',
+ 'initially', 'invocable', 'next',
+ 'repeat', 'return', 'suspend',
+ 'then', 'thread', 'until', 'while'), prefix=r'\b', suffix=r'\b'),
+ Keyword.Reserved),
+ (words((
+ 'Abort', 'abs', 'acos', 'Active', 'Alert', 'any', 'Any', 'Arb',
+ 'Arbno', 'args', 'array', 'asin', 'atan', 'atanh', 'Attrib',
+ 'Bal', 'bal', 'Bg', 'Break', 'Breakx',
+ 'callout', 'center', 'char', 'chdir', 'chmod', 'chown', 'chroot',
+ 'classname', 'Clip', 'Clone', 'close', 'cofail', 'collect',
+ 'Color', 'ColorValue', 'condvar', 'constructor', 'copy',
+ 'CopyArea', 'cos', 'Couple', 'crypt', 'cset', 'ctime',
+ 'dbcolumns', 'dbdriver', 'dbkeys', 'dblimits', 'dbproduct',
+ 'dbtables', 'delay', 'delete', 'detab', 'display', 'DrawArc',
+ 'DrawCircle', 'DrawCube', 'DrawCurve', 'DrawCylinder',
+ 'DrawDisk', 'DrawImage', 'DrawLine', 'DrawPoint', 'DrawPolygon',
+ 'DrawRectangle', 'DrawSegment', 'DrawSphere', 'DrawString',
+ 'DrawTorus', 'dtor',
+ 'entab', 'EraseArea', 'errorclear', 'Event', 'eventmask',
+ 'EvGet', 'EvSend', 'exec', 'exit', 'exp', 'Eye',
+ 'Fail', 'fcntl', 'fdup', 'Fence', 'fetch', 'Fg', 'fieldnames',
+ 'filepair', 'FillArc', 'FillCircle', 'FillPolygon',
+ 'FillRectangle', 'find', 'flock', 'flush', 'Font', 'fork',
+ 'FreeColor', 'FreeSpace', 'function',
+ 'get', 'getch', 'getche', 'getegid', 'getenv', 'geteuid',
+ 'getgid', 'getgr', 'gethost', 'getpgrp', 'getpid', 'getppid',
+ 'getpw', 'getrusage', 'getserv', 'GetSpace', 'gettimeofday',
+ 'getuid', 'globalnames', 'GotoRC', 'GotoXY', 'gtime', 'hardlink',
+ 'iand', 'icom', 'IdentityMatrix', 'image', 'InPort', 'insert',
+ 'Int86', 'integer', 'ioctl', 'ior', 'ishift', 'istate', 'ixor',
+ 'kbhit', 'key', 'keyword', 'kill',
+ 'left', 'Len', 'list', 'load', 'loadfunc', 'localnames',
+ 'lock', 'log', 'Lower', 'lstat',
+ 'many', 'map', 'match', 'MatrixMode', 'max', 'member',
+ 'membernames', 'methodnames', 'methods', 'min', 'mkdir', 'move',
+ 'MultMatrix', 'mutex',
+ 'name', 'NewColor', 'Normals', 'NotAny', 'numeric',
+ 'open', 'opencl', 'oprec', 'ord', 'OutPort',
+ 'PaletteChars', 'PaletteColor', 'PaletteKey', 'paramnames',
+ 'parent', 'Pattern', 'Peek', 'Pending', 'pipe', 'Pixel',
+ 'PlayAudio', 'Poke', 'pop', 'PopMatrix', 'Pos', 'pos',
+ 'proc', 'pull', 'push', 'PushMatrix', 'PushRotate', 'PushScale',
+ 'PushTranslate', 'put',
+ 'QueryPointer',
+ 'Raise', 'read', 'ReadImage', 'readlink', 'reads', 'ready',
+ 'real', 'receive', 'Refresh', 'Rem', 'remove', 'rename',
+ 'repl', 'reverse', 'right', 'rmdir', 'Rotate', 'Rpos',
+ 'Rtab', 'rtod', 'runerr',
+ 'save', 'Scale', 'seek', 'select', 'send', 'seq',
+ 'serial', 'set', 'setenv', 'setgid', 'setgrent',
+ 'sethostent', 'setpgrp', 'setpwent', 'setservent',
+ 'setuid', 'signal', 'sin', 'sort', 'sortf', 'Span',
+ 'spawn', 'sql', 'sqrt', 'stat', 'staticnames', 'stop',
+ 'StopAudio', 'string', 'structure', 'Succeed', 'Swi',
+ 'symlink', 'sys_errstr', 'system', 'syswrite',
+ 'Tab', 'tab', 'table', 'tan',
+ 'Texcoord', 'Texture', 'TextWidth', 'Translate',
+ 'trap', 'trim', 'truncate', 'trylock', 'type',
+ 'umask', 'Uncouple', 'unlock', 'upto', 'utime',
+ 'variable', 'VAttrib',
+ 'wait', 'WAttrib', 'WDefault', 'WFlush', 'where',
+ 'WinAssociate', 'WinButton', 'WinColorDialog', 'WindowContents',
+ 'WinEditRegion', 'WinFontDialog', 'WinMenuBar', 'WinOpenDialog',
+ 'WinPlayMedia', 'WinSaveDialog', 'WinScrollBar', 'WinSelectDialog',
+ 'write', 'WriteImage', 'writes', 'WSection',
+ 'WSync'), prefix=r'\b', suffix=r'\b'),
+ Name.Function),
+ include('numbers'),
+ (r'<@|<<@|>@|>>@|\.>|\->', Operator),
+ (r'\*\*|\+\+|\-\-|\.|\=|\~\=|<\=|>\=|\=\=|\~\=\=|<<|<<\=|>>|>>\=', Operator),
+ (r':\=|:\=:|\->|<\->|\+:\=|\|', Operator),
+ (r'\=\=\=|\~\=\=\=', Operator),
+ (r'"(?:[^\\"]|\\.)*"', String),
+ (r"'(?:[^\\']|\\.)*'", String.Character),
+ (r'[*<>+=/&!?@~\\-]', Operator),
+ (r'\^', Operator),
+ (r'(\w+)(\s*|[(,])', bygroups(Name, using(this))),
+ (r"([\[\]])", Punctuation),
+ (r"(<>|=>|[()|:;,.'`]|[{}]|[%]|[&?])", Punctuation),
+ (r'\n+', Text),
+ ],
+ 'numbers': [
+ (r'\b([+-]?([2-9]|[12][0-9]|3[0-6])[rR][0-9a-zA-Z]+)\b', Number.Hex),
+ (r'[+-]?[0-9]*\.([0-9]*)([Ee][+-]?[0-9]*)?', Number.Float),
+ (r'\b([+-]?[0-9]+[KMGTPkmgtp]?)\b', Number.Integer),
+ ],
+ 'subprogram': [
+ (r'\(', Punctuation, ('#pop', 'formal_part')),
+ (r';', Punctuation, '#pop'),
+ (r'"[^"]+"|\w+', Name.Function),
+ include('root'),
+ ],
+ 'type_def': [
+ (r'\(', Punctuation, 'formal_part'),
+ ],
+ 'formal_part': [
+ (r'\)', Punctuation, '#pop'),
+ (r'\w+', Name.Variable),
+ (r',', Punctuation),
+ (r'(:string|:integer|:real)\b', Keyword.Reserved),
+ include('root'),
+ ],
+ }
+
+class IconLexer(RegexLexer):
+ """
+ Lexer for Icon
+
+ .. versionadded:: 1.6
+ """
+ name = 'Icon'
+ aliases = ['icon']
+ filenames = ['*.icon', '*.ICON']
+ mimetypes = []
+ flags = re.MULTILINE
+
+ tokens = {
+ 'root': [
+ (r'[^\S\n]+', Text),
+ (r'#.*?\n', Comment.Single),
+ (r'[^\S\n]+', Text),
+ (r'class|method|procedure', Keyword.Declaration, 'subprogram'),
+ (r'(record)(\s+)(\w+)',
+ bygroups(Keyword.Declaration, Text, Keyword.Type), 'type_def'),
+ (r'(#line|\$C|\$Cend|\$define|\$else|\$endif|\$error|\$ifdef|'
+ r'\$ifndef|\$include|\$line|\$undef)\b', Keyword.PreProc),
+ (r'(&null|&fail)\b', Keyword.Constant),
+ (r'&allocated|&ascii|&clock|&collections|&column|&col|&control|'
+ r'&cset|&current|&dateline|&date|&digits|&dump|'
+ r'&errno|&errornumber|&errortext|&errorvalue|&error|&errout|'
+ r'&eventcode|&eventvalue|&eventsource|&e|'
+ r'&features|&file|&host|&input|&interval|&lcase|&letters|'
+ r'&level|&line|&ldrag|&lpress|&lrelease|'
+ r'&main|&mdrag|&meta|&mpress|&mrelease|&now|&output|'
+ r'&phi|&pick|&pi|&pos|&progname|'
+ r'&random|&rdrag|&regions|&resize|&row|&rpress|&rrelease|'
+ r'&shift|&source|&storage|&subject|'
+ r'&time|&trace|&ucase|&version|'
+ r'&window|&x|&y', Keyword.Reserved),
+ (r'(by|of|not|to)\b', Keyword.Reserved),
+ (r'(global|local|static)\b', Keyword.Reserved),
+ (r'link', Keyword.Declaration),
+ (words((
+ 'break', 'case', 'create', 'default', 'end', 'all',
+ 'do', 'else', 'every', 'fail', 'if', 'initial',
+ 'invocable', 'next',
+ 'repeat', 'return', 'suspend',
+ 'then', 'until', 'while'), prefix=r'\b', suffix=r'\b'),
+ Keyword.Reserved),
+ (words((
+ 'abs', 'acos', 'Active', 'Alert', 'any',
+ 'args', 'array', 'asin', 'atan', 'atanh', 'Attrib',
+ 'bal', 'Bg',
+ 'callout', 'center', 'char', 'chdir', 'chmod', 'chown', 'chroot',
+ 'Clip', 'Clone', 'close', 'cofail', 'collect',
+ 'Color', 'ColorValue', 'condvar', 'copy',
+ 'CopyArea', 'cos', 'Couple', 'crypt', 'cset', 'ctime',
+ 'delay', 'delete', 'detab', 'display', 'DrawArc',
+ 'DrawCircle', 'DrawCube', 'DrawCurve', 'DrawCylinder',
+ 'DrawDisk', 'DrawImage', 'DrawLine', 'DrawPoint', 'DrawPolygon',
+ 'DrawRectangle', 'DrawSegment', 'DrawSphere', 'DrawString',
+ 'DrawTorus', 'dtor',
+ 'entab', 'EraseArea', 'errorclear', 'Event', 'eventmask',
+ 'EvGet', 'EvSend', 'exec', 'exit', 'exp', 'Eye',
+ 'fcntl', 'fdup', 'fetch', 'Fg', 'fieldnames',
+ 'FillArc', 'FillCircle', 'FillPolygon',
+ 'FillRectangle', 'find', 'flock', 'flush', 'Font',
+ 'FreeColor', 'FreeSpace', 'function',
+ 'get', 'getch', 'getche', 'getenv',
+ 'GetSpace', 'gettimeofday',
+ 'getuid', 'globalnames', 'GotoRC', 'GotoXY', 'gtime', 'hardlink',
+ 'iand', 'icom', 'IdentityMatrix', 'image', 'InPort', 'insert',
+ 'Int86', 'integer', 'ioctl', 'ior', 'ishift', 'istate', 'ixor',
+ 'kbhit', 'key', 'keyword', 'kill',
+ 'left', 'Len', 'list', 'load', 'loadfunc', 'localnames',
+ 'lock', 'log', 'Lower', 'lstat',
+ 'many', 'map', 'match', 'MatrixMode', 'max', 'member',
+ 'membernames', 'methodnames', 'methods', 'min', 'mkdir', 'move',
+ 'MultMatrix', 'mutex',
+ 'name', 'NewColor', 'Normals', 'numeric',
+ 'open', 'opencl', 'oprec', 'ord', 'OutPort',
+ 'PaletteChars', 'PaletteColor', 'PaletteKey', 'paramnames',
+ 'parent', 'Pattern', 'Peek', 'Pending', 'pipe', 'Pixel',
+ 'Poke', 'pop', 'PopMatrix', 'Pos', 'pos',
+ 'proc', 'pull', 'push', 'PushMatrix', 'PushRotate', 'PushScale',
+ 'PushTranslate', 'put',
+ 'QueryPointer',
+ 'Raise', 'read', 'ReadImage', 'readlink', 'reads', 'ready',
+ 'real', 'receive', 'Refresh', 'Rem', 'remove', 'rename',
+ 'repl', 'reverse', 'right', 'rmdir', 'Rotate', 'Rpos',
+ 'rtod', 'runerr',
+ 'save', 'Scale', 'seek', 'select', 'send', 'seq',
+ 'serial', 'set', 'setenv',
+ 'setuid', 'signal', 'sin', 'sort', 'sortf',
+ 'spawn', 'sql', 'sqrt', 'stat', 'staticnames', 'stop',
+ 'string', 'structure', 'Swi',
+ 'symlink', 'sys_errstr', 'system', 'syswrite',
+ 'tab', 'table', 'tan',
+ 'Texcoord', 'Texture', 'TextWidth', 'Translate',
+ 'trap', 'trim', 'truncate', 'trylock', 'type',
+ 'umask', 'Uncouple', 'unlock', 'upto', 'utime',
+ 'variable',
+ 'wait', 'WAttrib', 'WDefault', 'WFlush', 'where',
+ 'WinAssociate', 'WinButton', 'WinColorDialog', 'WindowContents',
+ 'WinEditRegion', 'WinFontDialog', 'WinMenuBar', 'WinOpenDialog',
+ 'WinPlayMedia', 'WinSaveDialog', 'WinScrollBar', 'WinSelectDialog',
+ 'write', 'WriteImage', 'writes', 'WSection',
+ 'WSync'), prefix=r'\b', suffix=r'\b'),
+ Name.Function),
+ include('numbers'),
+ (r'\*\*|\+\+|\-\-|\.|\=|\~\=|<\=|>\=|\=\=|\~\=\=|<<|<<\=|>>|>>\=', Operator),
+ (r':\=|:\=:|<\-|<\->|\+:\=|\||\|\|', Operator),
+ (r'\=\=\=|\~\=\=\=', Operator),
+ (r'"(?:[^\\"]|\\.)*"', String),
+ (r"'(?:[^\\']|\\.)*'", String.Character),
+ (r'[*<>+=/&!?@~\\-]', Operator),
+ (r'(\w+)(\s*|[(,])', bygroups(Name, using(this))),
+ (r"([\[\]])", Punctuation),
+ (r"(<>|=>|[()|:;,.'`]|[{}]|[%^]|[&?])", Punctuation),
+ (r'\n+', Text),
+ ],
+ 'numbers': [
+ (r'\b([+-]?([2-9]|[12][0-9]|3[0-6])[rR][0-9a-zA-Z]+)\b', Number.Hex),
+ (r'[+-]?[0-9]*\.([0-9]*)([Ee][+-]?[0-9]*)?', Number.Float),
+ (r'\b([+-]?[0-9]+[KMGTPkmgtp]?)\b', Number.Integer),
+ ],
+ 'subprogram': [
+ (r'\(', Punctuation, ('#pop', 'formal_part')),
+ (r';', Punctuation, '#pop'),
+ (r'"[^"]+"|\w+', Name.Function),
+ include('root'),
+ ],
+ 'type_def': [
+ (r'\(', Punctuation, 'formal_part'),
+ ],
+ 'formal_part': [
+ (r'\)', Punctuation, '#pop'),
+ (r'\w+', Name.Variable),
+ (r',', Punctuation),
+ (r'(:string|:integer|:real)\b', Keyword.Reserved),
+ include('root'),
+ ],
+ }
+
+class UcodeLexer(RegexLexer):
+ """
+ Lexer for Icon ucode files
+
+ .. versionadded:: 2.4
+ """
+ name = 'ucode'
+ aliases = ['ucode']
+ filenames = ['*.u', '*.u1', '*.u2']
+ mimetypes = []
+ flags = re.MULTILINE
+
+ tokens = {
+ 'root': [
+ (r'(#.*\n)', Comment),
+ (words((
+ 'con', 'declend', 'end',
+ 'global',
+ 'impl', 'invocable',
+ 'lab', 'link', 'local',
+ 'record',
+ 'uid', 'unions',
+ 'version'),
+ prefix=r'\b', suffix=r'\b'),
+ Name.Function),
+ (words((
+ 'colm', 'filen', 'line', 'synt'),
+ prefix=r'\b', suffix=r'\b'),
+ Comment),
+ (words((
+ 'asgn',
+ 'bang', 'bscan',
+ 'cat', 'ccase', 'chfail',
+ 'coact', 'cofail', 'compl',
+ 'coret', 'create', 'cset',
+ 'diff', 'div', 'dup',
+ 'efail', 'einit', 'end', 'eqv', 'eret',
+ 'error', 'escan', 'esusp',
+ 'field',
+ 'goto',
+ 'init', 'int', 'inter',
+ 'invoke',
+ 'keywd',
+ 'lconcat', 'lexeq', 'lexge',
+ 'lexgt', 'lexle', 'lexlt', 'lexne',
+ 'limit', 'llist', 'lsusp',
+ 'mark', 'mark0', 'minus', 'mod', 'mult',
+ 'neg', 'neqv', 'nonnull', 'noop', 'null',
+ 'number', 'numeq', 'numge', 'numgt',
+ 'numle', 'numlt', 'numne',
+ 'pfail', 'plus', 'pnull', 'pop', 'power',
+ 'pret', 'proc', 'psusp', 'push1', 'pushn1',
+ 'random', 'rasgn', 'rcv', 'rcvbk', 'real',
+ 'refresh', 'rswap',
+ 'sdup', 'sect', 'size', 'snd', 'sndbk',
+ 'str', 'subsc', 'swap',
+ 'tabmat', 'tally', 'toby', 'trace',
+ 'unmark',
+ 'value', 'var'), prefix=r'\b', suffix=r'\b'),
+ Keyword.Declaration),
+ (words((
+ 'any',
+ 'case',
+ 'endcase', 'endevery', 'endif',
+ 'endifelse', 'endrepeat', 'endsuspend',
+ 'enduntil', 'endwhile', 'every',
+ 'if', 'ifelse',
+ 'repeat',
+ 'suspend',
+ 'until',
+ 'while'),
+ prefix=r'\b', suffix=r'\b'),
+ Name.Constant),
+ (r'\d+(\s*|\.$|$)', Number.Integer),
+ (r'[+-]?\d*\.\d+(E[-+]?\d+)?', Number.Float),
+ (r'[+-]?\d+\.\d*(E[-+]?\d+)?', Number.Float),
+ (r"(<>|=>|[()|:;,.'`]|[{}]|[%^]|[&?])", Punctuation),
+ (r'\s+\b', Text),
+ (r'[\w-]+', Text),
+ ],
+}
diff --git a/pygments/lexers/varnish.py b/pygments/lexers/varnish.py
index 44521422..f3b37d60 100644
--- a/pygments/lexers/varnish.py
+++ b/pygments/lexers/varnish.py
@@ -36,7 +36,7 @@ class VCLLexer(RegexLexer):
# Skip over comments and blank lines
# This is accurate enough that returning 0.9 is reasonable.
# Almost no VCL files start without some comments.
- elif '\nvcl 4\.0;' in text[:1000]:
+ elif '\nvcl 4.0;' in text[:1000]:
return 0.9
tokens = {
@@ -120,7 +120,7 @@ class VCLLexer(RegexLexer):
r'([a-zA-Z_]\w*)'
r'(\s*\(.*\))',
bygroups(Name.Function, Punctuation, Name.Function, using(this))),
- ('[a-zA-Z_]\w*', Name),
+ (r'[a-zA-Z_]\w*', Name),
],
'comment': [
(r'[^*/]+', Comment.Multiline),
diff --git a/pygments/lexers/webmisc.py b/pygments/lexers/webmisc.py
index 30dd3717..67aefe23 100644
--- a/pygments/lexers/webmisc.py
+++ b/pygments/lexers/webmisc.py
@@ -438,7 +438,7 @@ class XQueryLexer(ExtendedRegexLexer):
],
'varname': [
(r'\(:', Comment, 'comment'),
- (r'(' + qname + ')(\()?', bygroups(Name, Punctuation), 'operator'),
+ (r'(' + qname + r')(\()?', bygroups(Name, Punctuation), 'operator'),
],
'singletype': [
include('whitespace'),
@@ -643,9 +643,9 @@ class XQueryLexer(ExtendedRegexLexer):
bygroups(Keyword.Declaration, Text, Keyword.Declaration, Text, Keyword.Declaration), 'operator'),
(r'(declare)(\s+)(context)(\s+)(item)',
bygroups(Keyword.Declaration, Text, Keyword.Declaration, Text, Keyword.Declaration), 'operator'),
- (ncname + ':\*', Name, 'operator'),
- ('\*:'+ncname, Name.Tag, 'operator'),
- ('\*', Name.Tag, 'operator'),
+ (ncname + r':\*', Name, 'operator'),
+ (r'\*:'+ncname, Name.Tag, 'operator'),
+ (r'\*', Name.Tag, 'operator'),
(stringdouble, String.Double, 'operator'),
(stringsingle, String.Single, 'operator'),
@@ -862,7 +862,7 @@ class QmlLexer(RegexLexer):
class CirruLexer(RegexLexer):
- """
+ r"""
Syntax rules of Cirru can be found at:
http://cirru.org/
diff --git a/pygments/style.py b/pygments/style.py
index 879c4e05..89766d8c 100644
--- a/pygments/style.py
+++ b/pygments/style.py
@@ -12,26 +12,47 @@
from pygments.token import Token, STANDARD_TYPES
from pygments.util import add_metaclass
-# Default mapping of #ansixxx to RGB colors.
+# Default mapping of ansixxx to RGB colors.
_ansimap = {
# dark
- '#ansiblack': '000000',
- '#ansidarkred': '7f0000',
- '#ansidarkgreen': '007f00',
- '#ansibrown': '7f7fe0',
- '#ansidarkblue': '00007f',
- '#ansipurple': '7f007f',
- '#ansiteal': '007f7f',
- '#ansilightgray': 'e5e5e5',
+ 'ansiblack': '000000',
+ 'ansired': '7f0000',
+ 'ansigreen': '007f00',
+ 'ansiyellow': '7f7fe0',
+ 'ansiblue': '00007f',
+ 'ansimagenta': '7f007f',
+ 'ansicyan': '007f7f',
+ 'ansigray': 'e5e5e5',
# normal
- '#ansidarkgray': '555555',
- '#ansired': 'ff0000',
- '#ansigreen': '00ff00',
- '#ansiyellow': 'ffff00',
- '#ansiblue': '0000ff',
- '#ansifuchsia': 'ff00ff',
- '#ansiturquoise': '00ffff',
- '#ansiwhite': 'ffffff',
+ 'ansibrightblack': '555555',
+ 'ansibrightred': 'ff0000',
+ 'ansibrightgreen': '00ff00',
+ 'ansibrightyellow': 'ffff00',
+ 'ansibrightblue': '0000ff',
+ 'ansibrightmagenta': 'ff00ff',
+ 'ansibrightcyan': '00ffff',
+ 'ansiwhite': 'ffffff',
+}
+# mapping of deprecated #ansixxx colors to new color names
+_deprecated_ansicolors = {
+ # dark
+ '#ansiblack': 'ansiblack',
+ '#ansidarkred': 'ansired',
+ '#ansidarkgreen': 'ansigreen',
+ '#ansibrown': 'ansiyellow',
+ '#ansidarkblue': 'ansiblue',
+ '#ansipurple': 'ansimagenta',
+ '#ansiteal': 'ansicyan',
+ '#ansilightgray': 'ansigray',
+ # normal
+ '#ansidarkgray': 'ansibrightblack',
+ '#ansired': 'ansibrightred',
+ '#ansigreen': 'ansibrightgreen',
+ '#ansiyellow': 'ansibrightyellow',
+ '#ansiblue': 'ansibrightblue',
+ '#ansifuchsia': 'ansibrightmagenta',
+ '#ansiturquoise': 'ansibrightcyan',
+ '#ansiwhite': 'ansiwhite',
}
ansicolors = set(_ansimap)
@@ -106,11 +127,15 @@ class StyleMeta(type):
t = cls._styles[token]
ansicolor = bgansicolor = None
color = t[0]
- if color.startswith('#ansi'):
+ if color in _deprecated_ansicolors:
+ color = _deprecated_ansicolors[color]
+ if color in ansicolors:
ansicolor = color
color = _ansimap[color]
bgcolor = t[4]
- if bgcolor.startswith('#ansi'):
+ if bgcolor in _deprecated_ansicolors:
+ bgcolor = _deprecated_ansicolors[color]
+ if bgcolor in ansicolors:
bgansicolor = bgcolor
bgcolor = _ansimap[bgcolor]
diff --git a/pygments/styles/__init__.py b/pygments/styles/__init__.py
index 839a9b78..c7050a18 100644
--- a/pygments/styles/__init__.py
+++ b/pygments/styles/__init__.py
@@ -44,6 +44,12 @@ STYLE_MAP = {
'arduino': 'arduino::ArduinoStyle',
'rainbow_dash': 'rainbow_dash::RainbowDashStyle',
'abap': 'abap::AbapStyle',
+ 'solarized-dark': 'solarized::SolarizedDarkStyle',
+ 'solarized-light': 'solarized::SolarizedLightStyle',
+ 'sas': 'sas::SasStyle',
+ 'stata': 'stata_light::StataLightStyle',
+ 'stata-light': 'stata_light::StataLightStyle',
+ 'stata-dark': 'stata_dark::StataDarkStyle',
}
diff --git a/pygments/styles/arduino.py b/pygments/styles/arduino.py
index 57e3809e..b500b6d9 100644
--- a/pygments/styles/arduino.py
+++ b/pygments/styles/arduino.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-"""
+u"""
pygments.styles.arduino
~~~~~~~~~~~~~~~~~~~~~~~
@@ -15,7 +15,7 @@ from pygments.token import Keyword, Name, Comment, String, Error, \
class ArduinoStyle(Style):
- """
+ u"""
The Arduino® language style. This style is designed to highlight the
Arduino source code, so exepect the best results with it.
"""
diff --git a/pygments/styles/paraiso_dark.py b/pygments/styles/paraiso_dark.py
index 5f334bb9..68abb9f6 100644
--- a/pygments/styles/paraiso_dark.py
+++ b/pygments/styles/paraiso_dark.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-"""
+u"""
pygments.styles.paraiso_dark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/pygments/styles/paraiso_light.py b/pygments/styles/paraiso_light.py
index a8112819..186e4775 100644
--- a/pygments/styles/paraiso_light.py
+++ b/pygments/styles/paraiso_light.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-"""
+u"""
pygments.styles.paraiso_light
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/pygments/styles/solarized.py b/pygments/styles/solarized.py
new file mode 100644
index 00000000..a1790b08
--- /dev/null
+++ b/pygments/styles/solarized.py
@@ -0,0 +1,129 @@
+# -*- coding: utf-8 -*-
+"""
+ pygments.styles.solarized
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Solarized by Camil Staps
+
+ A Pygments style for the Solarized themes (licensed under MIT).
+ See: https://github.com/altercation/solarized
+
+ :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+from pygments.style import Style
+from pygments.token import Comment, Error, Generic, Keyword, Name, Number, \
+ Operator, String, Token
+
+
+def make_style(colors):
+ return {
+ Token: colors['base0'],
+
+ Comment: 'italic ' + colors['base01'],
+ Comment.Hashbang: colors['base01'],
+ Comment.Multiline: colors['base01'],
+ Comment.Preproc: 'noitalic ' + colors['magenta'],
+ Comment.PreprocFile: 'noitalic ' + colors['base01'],
+
+ Keyword: colors['green'],
+ Keyword.Constant: colors['cyan'],
+ Keyword.Declaration: colors['cyan'],
+ Keyword.Namespace: colors['orange'],
+ Keyword.Type: colors['yellow'],
+
+ Operator: colors['base01'],
+ Operator.Word: colors['green'],
+
+ Name.Builtin: colors['blue'],
+ Name.Builtin.Pseudo: colors['blue'],
+ Name.Class: colors['blue'],
+ Name.Constant: colors['blue'],
+ Name.Decorator: colors['blue'],
+ Name.Entity: colors['blue'],
+ Name.Exception: colors['blue'],
+ Name.Function: colors['blue'],
+ Name.Function.Magic: colors['blue'],
+ Name.Label: colors['blue'],
+ Name.Namespace: colors['blue'],
+ Name.Tag: colors['blue'],
+ Name.Variable: colors['blue'],
+ Name.Variable.Global:colors['blue'],
+ Name.Variable.Magic: colors['blue'],
+
+ String: colors['cyan'],
+ String.Doc: colors['base01'],
+ String.Regex: colors['orange'],
+
+ Number: colors['cyan'],
+
+ Generic.Deleted: colors['red'],
+ Generic.Emph: 'italic',
+ Generic.Error: colors['red'],
+ Generic.Heading: 'bold',
+ Generic.Subheading: 'underline',
+ Generic.Inserted: colors['green'],
+ Generic.Strong: 'bold',
+ Generic.Traceback: colors['blue'],
+
+ Error: 'bg:' + colors['red'],
+ }
+
+
+DARK_COLORS = {
+ 'base03': '#002b36',
+ 'base02': '#073642',
+ 'base01': '#586e75',
+ 'base00': '#657b83',
+ 'base0': '#839496',
+ 'base1': '#93a1a1',
+ 'base2': '#eee8d5',
+ 'base3': '#fdf6e3',
+ 'yellow': '#b58900',
+ 'orange': '#cb4b16',
+ 'red': '#dc322f',
+ 'magenta': '#d33682',
+ 'violet': '#6c71c4',
+ 'blue': '#268bd2',
+ 'cyan': '#2aa198',
+ 'green': '#859900',
+}
+
+LIGHT_COLORS = {
+ 'base3': '#002b36',
+ 'base2': '#073642',
+ 'base1': '#586e75',
+ 'base0': '#657b83',
+ 'base00': '#839496',
+ 'base01': '#93a1a1',
+ 'base02': '#eee8d5',
+ 'base03': '#fdf6e3',
+ 'yellow': '#b58900',
+ 'orange': '#cb4b16',
+ 'red': '#dc322f',
+ 'magenta': '#d33682',
+ 'violet': '#6c71c4',
+ 'blue': '#268bd2',
+ 'cyan': '#2aa198',
+ 'green': '#859900',
+}
+
+
+class SolarizedDarkStyle(Style):
+ """
+ The solarized style, dark.
+ """
+
+ styles = make_style(DARK_COLORS)
+ background_color = DARK_COLORS['base03']
+ highlight_color = DARK_COLORS['base02']
+
+class SolarizedLightStyle(SolarizedDarkStyle):
+ """
+ The solarized style, light.
+ """
+
+ styles = make_style(LIGHT_COLORS)
+ background_color = LIGHT_COLORS['base03']
+ highlight_color = LIGHT_COLORS['base02']
diff --git a/pygments/styles/stata_dark.py b/pygments/styles/stata_dark.py
new file mode 100644
index 00000000..851a9a8d
--- /dev/null
+++ b/pygments/styles/stata_dark.py
@@ -0,0 +1,41 @@
+# -*- coding: utf-8 -*-
+"""
+ pygments.styles.stata_dark
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Dark style inspired by Stata's do-file editor. Note this is not
+ meant to be a complete style, just for Stata's file formats.
+
+
+ :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+from pygments.style import Style
+from pygments.token import Keyword, Name, Comment, String, Error, \
+ Number, Operator, Whitespace, Generic, Text
+
+
+class StataDarkStyle(Style):
+
+ default_style = ''
+
+ background_color = "#232629"
+ highlight_color = "#49483e"
+
+ styles = {
+ Whitespace: '#bbbbbb',
+ Error: 'bg:#e3d2d2 #a61717',
+ Text: '#cccccc',
+ String: '#51cc99',
+ Number: '#4FB8CC',
+ Operator: '',
+ Name.Function: '#6a6aff',
+ Name.Other: '#e2828e',
+ Keyword: 'bold #7686bb',
+ Keyword.Constant: '',
+ Comment: 'italic #777777',
+ Name.Variable: 'bold #7AB4DB',
+ Name.Variable.Global: 'bold #BE646C',
+ Generic.Prompt: '#ffffff',
+ }
diff --git a/pygments/styles/stata.py b/pygments/styles/stata_light.py
index 2b5f5edd..fcca85e5 100644
--- a/pygments/styles/stata.py
+++ b/pygments/styles/stata_light.py
@@ -1,11 +1,10 @@
# -*- coding: utf-8 -*-
"""
- pygments.styles.stata
- ~~~~~~~~~~~~~~~~~~~~~
+ pygments.styles.stata_light
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Style inspired by Stata's do-file editor. Note this is not meant
- to be a complete style. It's merely meant to mimic Stata's do file
- editor syntax highlighting.
+ Light Style inspired by Stata's do-file editor. Note this is not
+ meant to be a complete style, just for Stata's file formats.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
@@ -13,28 +12,28 @@
from pygments.style import Style
from pygments.token import Keyword, Name, Comment, String, Error, \
- Number, Operator, Whitespace
+ Number, Operator, Whitespace, Text
-class StataStyle(Style):
+class StataLightStyle(Style):
"""
- Style inspired by Stata's do-file editor. Note this is not meant
- to be a complete style. It's merely meant to mimic Stata's do file
- editor syntax highlighting.
+ Light mode style inspired by Stata's do-file editor. This is not
+ meant to be a complete style, just for use with Stata.
"""
default_style = ''
-
styles = {
+ Text: '#111111',
Whitespace: '#bbbbbb',
- Comment: 'italic #008800',
+ Error: 'bg:#e3d2d2 #a61717',
String: '#7a2424',
Number: '#2c2cff',
Operator: '',
+ Name.Function: '#2c2cff',
+ Name.Other: '#be646c',
Keyword: 'bold #353580',
Keyword.Constant: '',
- Name.Function: '#2c2cff',
+ Comment: 'italic #008800',
Name.Variable: 'bold #35baba',
Name.Variable.Global: 'bold #b5565e',
- Error: 'bg:#e3d2d2 #a61717'
}
diff --git a/pygments/unistring.py b/pygments/unistring.py
index 6096d110..ba0e41de 100644
--- a/pygments/unistring.py
+++ b/pygments/unistring.py
@@ -16,9 +16,9 @@ import sys
Cc = u'\x00-\x1f\x7f-\x9f'
-Cf = u'\xad\u0600-\u0604\u061c\u06dd\u070f\u180e\u200b-\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff\ufff9-\ufffb'
+Cf = u'\xad\u0600-\u0605\u061c\u06dd\u070f\u08e2\u180e\u200b-\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff\ufff9-\ufffb'
-Cn = u'\u0378-\u0379\u037f-\u0383\u038b\u038d\u03a2\u0528-\u0530\u0557-\u0558\u0560\u0588\u058b-\u058e\u0590\u05c8-\u05cf\u05eb-\u05ef\u05f5-\u05ff\u0605\u061d\u070e\u074b-\u074c\u07b2-\u07bf\u07fb-\u07ff\u082e-\u082f\u083f\u085c-\u085d\u085f-\u089f\u08a1\u08ad-\u08e3\u08ff\u0978\u0980\u0984\u098d-\u098e\u0991-\u0992\u09a9\u09b1\u09b3-\u09b5\u09ba-\u09bb\u09c5-\u09c6\u09c9-\u09ca\u09cf-\u09d6\u09d8-\u09db\u09de\u09e4-\u09e5\u09fc-\u0a00\u0a04\u0a0b-\u0a0e\u0a11-\u0a12\u0a29\u0a31\u0a34\u0a37\u0a3a-\u0a3b\u0a3d\u0a43-\u0a46\u0a49-\u0a4a\u0a4e-\u0a50\u0a52-\u0a58\u0a5d\u0a5f-\u0a65\u0a76-\u0a80\u0a84\u0a8e\u0a92\u0aa9\u0ab1\u0ab4\u0aba-\u0abb\u0ac6\u0aca\u0ace-\u0acf\u0ad1-\u0adf\u0ae4-\u0ae5\u0af2-\u0b00\u0b04\u0b0d-\u0b0e\u0b11-\u0b12\u0b29\u0b31\u0b34\u0b3a-\u0b3b\u0b45-\u0b46\u0b49-\u0b4a\u0b4e-\u0b55\u0b58-\u0b5b\u0b5e\u0b64-\u0b65\u0b78-\u0b81\u0b84\u0b8b-\u0b8d\u0b91\u0b96-\u0b98\u0b9b\u0b9d\u0ba0-\u0ba2\u0ba5-\u0ba7\u0bab-\u0bad\u0bba-\u0bbd\u0bc3-\u0bc5\u0bc9\u0bce-\u0bcf\u0bd1-\u0bd6\u0bd8-\u0be5\u0bfb-\u0c00\u0c04\u0c0d\u0c11\u0c29\u0c34\u0c3a-\u0c3c\u0c45\u0c49\u0c4e-\u0c54\u0c57\u0c5a-\u0c5f\u0c64-\u0c65\u0c70-\u0c77\u0c80-\u0c81\u0c84\u0c8d\u0c91\u0ca9\u0cb4\u0cba-\u0cbb\u0cc5\u0cc9\u0cce-\u0cd4\u0cd7-\u0cdd\u0cdf\u0ce4-\u0ce5\u0cf0\u0cf3-\u0d01\u0d04\u0d0d\u0d11\u0d3b-\u0d3c\u0d45\u0d49\u0d4f-\u0d56\u0d58-\u0d5f\u0d64-\u0d65\u0d76-\u0d78\u0d80-\u0d81\u0d84\u0d97-\u0d99\u0db2\u0dbc\u0dbe-\u0dbf\u0dc7-\u0dc9\u0dcb-\u0dce\u0dd5\u0dd7\u0de0-\u0df1\u0df5-\u0e00\u0e3b-\u0e3e\u0e5c-\u0e80\u0e83\u0e85-\u0e86\u0e89\u0e8b-\u0e8c\u0e8e-\u0e93\u0e98\u0ea0\u0ea4\u0ea6\u0ea8-\u0ea9\u0eac\u0eba\u0ebe-\u0ebf\u0ec5\u0ec7\u0ece-\u0ecf\u0eda-\u0edb\u0ee0-\u0eff\u0f48\u0f6d-\u0f70\u0f98\u0fbd\u0fcd\u0fdb-\u0fff\u10c6\u10c8-\u10cc\u10ce-\u10cf\u1249\u124e-\u124f\u1257\u1259\u125e-\u125f\u1289\u128e-\u128f\u12b1\u12b6-\u12b7\u12bf\u12c1\u12c6-\u12c7\u12d7\u1311\u1316-\u1317\u135b-\u135c\u137d-\u137f\u139a-\u139f\u13f5-\u13ff\u169d-\u169f\u16f1-\u16ff\u170d\u1715-\u171f\u1737-\u173f\u1754-\u175f\u176d\u1771\u1774-\u177f\u17de-\u17df\u17ea-\u17ef\u17fa-\u17ff\u180f\u181a-\u181f\u1878-\u187f\u18ab-\u18af\u18f6-\u18ff\u191d-\u191f\u192c-\u192f\u193c-\u193f\u1941-\u1943\u196e-\u196f\u1975-\u197f\u19ac-\u19af\u19ca-\u19cf\u19db-\u19dd\u1a1c-\u1a1d\u1a5f\u1a7d-\u1a7e\u1a8a-\u1a8f\u1a9a-\u1a9f\u1aae-\u1aff\u1b4c-\u1b4f\u1b7d-\u1b7f\u1bf4-\u1bfb\u1c38-\u1c3a\u1c4a-\u1c4c\u1c80-\u1cbf\u1cc8-\u1ccf\u1cf7-\u1cff\u1de7-\u1dfb\u1f16-\u1f17\u1f1e-\u1f1f\u1f46-\u1f47\u1f4e-\u1f4f\u1f58\u1f5a\u1f5c\u1f5e\u1f7e-\u1f7f\u1fb5\u1fc5\u1fd4-\u1fd5\u1fdc\u1ff0-\u1ff1\u1ff5\u1fff\u2065\u2072-\u2073\u208f\u209d-\u209f\u20bb-\u20cf\u20f1-\u20ff\u218a-\u218f\u23f4-\u23ff\u2427-\u243f\u244b-\u245f\u2700\u2b4d-\u2b4f\u2b5a-\u2bff\u2c2f\u2c5f\u2cf4-\u2cf8\u2d26\u2d28-\u2d2c\u2d2e-\u2d2f\u2d68-\u2d6e\u2d71-\u2d7e\u2d97-\u2d9f\u2da7\u2daf\u2db7\u2dbf\u2dc7\u2dcf\u2dd7\u2ddf\u2e3c-\u2e7f\u2e9a\u2ef4-\u2eff\u2fd6-\u2fef\u2ffc-\u2fff\u3040\u3097-\u3098\u3100-\u3104\u312e-\u3130\u318f\u31bb-\u31bf\u31e4-\u31ef\u321f\u32ff\u4db6-\u4dbf\u9fcd-\u9fff\ua48d-\ua48f\ua4c7-\ua4cf\ua62c-\ua63f\ua698-\ua69e\ua6f8-\ua6ff\ua78f\ua794-\ua79f\ua7ab-\ua7f7\ua82c-\ua82f\ua83a-\ua83f\ua878-\ua87f\ua8c5-\ua8cd\ua8da-\ua8df\ua8fc-\ua8ff\ua954-\ua95e\ua97d-\ua97f\ua9ce\ua9da-\ua9dd\ua9e0-\ua9ff\uaa37-\uaa3f\uaa4e-\uaa4f\uaa5a-\uaa5b\uaa7c-\uaa7f\uaac3-\uaada\uaaf7-\uab00\uab07-\uab08\uab0f-\uab10\uab17-\uab1f\uab27\uab2f-\uabbf\uabee-\uabef\uabfa-\uabff\ud7a4-\ud7af\ud7c7-\ud7ca\ud7fc-\ud7ff\ufa6e-\ufa6f\ufada-\ufaff\ufb07-\ufb12\ufb18-\ufb1c\ufb37\ufb3d\ufb3f\ufb42\ufb45\ufbc2-\ufbd2\ufd40-\ufd4f\ufd90-\ufd91\ufdc8-\ufdef\ufdfe-\ufdff\ufe1a-\ufe1f\ufe27-\ufe2f\ufe53\ufe67\ufe6c-\ufe6f\ufe75\ufefd-\ufefe\uff00\uffbf-\uffc1\uffc8-\uffc9\uffd0-\uffd1\uffd8-\uffd9\uffdd-\uffdf\uffe7\uffef-\ufff8\ufffe-\uffff'
+Cn = u'\u0378-\u0379\u0380-\u0383\u038b\u038d\u03a2\u0530\u0557-\u0558\u058b-\u058c\u0590\u05c8-\u05cf\u05eb-\u05ee\u05f5-\u05ff\u061d\u070e\u074b-\u074c\u07b2-\u07bf\u07fb-\u07fc\u082e-\u082f\u083f\u085c-\u085d\u085f\u086b-\u089f\u08b5\u08be-\u08d2\u0984\u098d-\u098e\u0991-\u0992\u09a9\u09b1\u09b3-\u09b5\u09ba-\u09bb\u09c5-\u09c6\u09c9-\u09ca\u09cf-\u09d6\u09d8-\u09db\u09de\u09e4-\u09e5\u09ff-\u0a00\u0a04\u0a0b-\u0a0e\u0a11-\u0a12\u0a29\u0a31\u0a34\u0a37\u0a3a-\u0a3b\u0a3d\u0a43-\u0a46\u0a49-\u0a4a\u0a4e-\u0a50\u0a52-\u0a58\u0a5d\u0a5f-\u0a65\u0a77-\u0a80\u0a84\u0a8e\u0a92\u0aa9\u0ab1\u0ab4\u0aba-\u0abb\u0ac6\u0aca\u0ace-\u0acf\u0ad1-\u0adf\u0ae4-\u0ae5\u0af2-\u0af8\u0b00\u0b04\u0b0d-\u0b0e\u0b11-\u0b12\u0b29\u0b31\u0b34\u0b3a-\u0b3b\u0b45-\u0b46\u0b49-\u0b4a\u0b4e-\u0b55\u0b58-\u0b5b\u0b5e\u0b64-\u0b65\u0b78-\u0b81\u0b84\u0b8b-\u0b8d\u0b91\u0b96-\u0b98\u0b9b\u0b9d\u0ba0-\u0ba2\u0ba5-\u0ba7\u0bab-\u0bad\u0bba-\u0bbd\u0bc3-\u0bc5\u0bc9\u0bce-\u0bcf\u0bd1-\u0bd6\u0bd8-\u0be5\u0bfb-\u0bff\u0c0d\u0c11\u0c29\u0c3a-\u0c3c\u0c45\u0c49\u0c4e-\u0c54\u0c57\u0c5b-\u0c5f\u0c64-\u0c65\u0c70-\u0c77\u0c8d\u0c91\u0ca9\u0cb4\u0cba-\u0cbb\u0cc5\u0cc9\u0cce-\u0cd4\u0cd7-\u0cdd\u0cdf\u0ce4-\u0ce5\u0cf0\u0cf3-\u0cff\u0d04\u0d0d\u0d11\u0d45\u0d49\u0d50-\u0d53\u0d64-\u0d65\u0d80-\u0d81\u0d84\u0d97-\u0d99\u0db2\u0dbc\u0dbe-\u0dbf\u0dc7-\u0dc9\u0dcb-\u0dce\u0dd5\u0dd7\u0de0-\u0de5\u0df0-\u0df1\u0df5-\u0e00\u0e3b-\u0e3e\u0e5c-\u0e80\u0e83\u0e85-\u0e86\u0e89\u0e8b-\u0e8c\u0e8e-\u0e93\u0e98\u0ea0\u0ea4\u0ea6\u0ea8-\u0ea9\u0eac\u0eba\u0ebe-\u0ebf\u0ec5\u0ec7\u0ece-\u0ecf\u0eda-\u0edb\u0ee0-\u0eff\u0f48\u0f6d-\u0f70\u0f98\u0fbd\u0fcd\u0fdb-\u0fff\u10c6\u10c8-\u10cc\u10ce-\u10cf\u1249\u124e-\u124f\u1257\u1259\u125e-\u125f\u1289\u128e-\u128f\u12b1\u12b6-\u12b7\u12bf\u12c1\u12c6-\u12c7\u12d7\u1311\u1316-\u1317\u135b-\u135c\u137d-\u137f\u139a-\u139f\u13f6-\u13f7\u13fe-\u13ff\u169d-\u169f\u16f9-\u16ff\u170d\u1715-\u171f\u1737-\u173f\u1754-\u175f\u176d\u1771\u1774-\u177f\u17de-\u17df\u17ea-\u17ef\u17fa-\u17ff\u180f\u181a-\u181f\u1879-\u187f\u18ab-\u18af\u18f6-\u18ff\u191f\u192c-\u192f\u193c-\u193f\u1941-\u1943\u196e-\u196f\u1975-\u197f\u19ac-\u19af\u19ca-\u19cf\u19db-\u19dd\u1a1c-\u1a1d\u1a5f\u1a7d-\u1a7e\u1a8a-\u1a8f\u1a9a-\u1a9f\u1aae-\u1aaf\u1abf-\u1aff\u1b4c-\u1b4f\u1b7d-\u1b7f\u1bf4-\u1bfb\u1c38-\u1c3a\u1c4a-\u1c4c\u1c89-\u1c8f\u1cbb-\u1cbc\u1cc8-\u1ccf\u1cfa-\u1cff\u1dfa\u1f16-\u1f17\u1f1e-\u1f1f\u1f46-\u1f47\u1f4e-\u1f4f\u1f58\u1f5a\u1f5c\u1f5e\u1f7e-\u1f7f\u1fb5\u1fc5\u1fd4-\u1fd5\u1fdc\u1ff0-\u1ff1\u1ff5\u1fff\u2065\u2072-\u2073\u208f\u209d-\u209f\u20c0-\u20cf\u20f1-\u20ff\u218c-\u218f\u2427-\u243f\u244b-\u245f\u2b74-\u2b75\u2b96-\u2b97\u2bc9\u2bff\u2c2f\u2c5f\u2cf4-\u2cf8\u2d26\u2d28-\u2d2c\u2d2e-\u2d2f\u2d68-\u2d6e\u2d71-\u2d7e\u2d97-\u2d9f\u2da7\u2daf\u2db7\u2dbf\u2dc7\u2dcf\u2dd7\u2ddf\u2e4f-\u2e7f\u2e9a\u2ef4-\u2eff\u2fd6-\u2fef\u2ffc-\u2fff\u3040\u3097-\u3098\u3100-\u3104\u3130\u318f\u31bb-\u31bf\u31e4-\u31ef\u321f\u32ff\u4db6-\u4dbf\u9ff0-\u9fff\ua48d-\ua48f\ua4c7-\ua4cf\ua62c-\ua63f\ua6f8-\ua6ff\ua7ba-\ua7f6\ua82c-\ua82f\ua83a-\ua83f\ua878-\ua87f\ua8c6-\ua8cd\ua8da-\ua8df\ua954-\ua95e\ua97d-\ua97f\ua9ce\ua9da-\ua9dd\ua9ff\uaa37-\uaa3f\uaa4e-\uaa4f\uaa5a-\uaa5b\uaac3-\uaada\uaaf7-\uab00\uab07-\uab08\uab0f-\uab10\uab17-\uab1f\uab27\uab2f\uab66-\uab6f\uabee-\uabef\uabfa-\uabff\ud7a4-\ud7af\ud7c7-\ud7ca\ud7fc-\ud7ff\ufa6e-\ufa6f\ufada-\ufaff\ufb07-\ufb12\ufb18-\ufb1c\ufb37\ufb3d\ufb3f\ufb42\ufb45\ufbc2-\ufbd2\ufd40-\ufd4f\ufd90-\ufd91\ufdc8-\ufdef\ufdfe-\ufdff\ufe1a-\ufe1f\ufe53\ufe67\ufe6c-\ufe6f\ufe75\ufefd-\ufefe\uff00\uffbf-\uffc1\uffc8-\uffc9\uffd0-\uffd1\uffd8-\uffd9\uffdd-\uffdf\uffe7\uffef-\ufff8\ufffe-\uffff'
Co = u'\ue000-\uf8ff'
@@ -27,49 +27,49 @@ try:
except UnicodeDecodeError:
Cs = '' # Jython can't handle isolated surrogates
-Ll = u'a-z\xb5\xdf-\xf6\xf8-\xff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a'
+Ll = u'a-z\xb5\xdf-\xf6\xf8-\xff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0529\u052b\u052d\u052f\u0560-\u0588\u10d0-\u10fa\u10fd-\u10ff\u13f8-\u13fd\u1c80-\u1c88\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua699\ua69b\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793-\ua795\ua797\ua799\ua79b\ua79d\ua79f\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7af\ua7b5\ua7b7\ua7b9\ua7fa\uab30-\uab5a\uab60-\uab65\uab70-\uabbf\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a'
-Lm = u'\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f'
+Lm = u'\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua69c-\ua69d\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\ua9e6\uaa70\uaadd\uaaf3-\uaaf4\uab5c-\uab5f\uff70\uff9e-\uff9f'
-Lo = u'\xaa\xba\u01bb\u01c0-\u01c3\u0294\u05d0-\u05ea\u05f0-\u05f2\u0620-\u063f\u0641-\u064a\u066e-\u066f\u0671-\u06d3\u06d5\u06ee-\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u0800-\u0815\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0972-\u0977\u0979-\u097f\u0985-\u098c\u098f-\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc-\u09dd\u09df-\u09e1\u09f0-\u09f1\u0a05-\u0a0a\u0a0f-\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32-\u0a33\u0a35-\u0a36\u0a38-\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2-\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0-\u0ae1\u0b05-\u0b0c\u0b0f-\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32-\u0b33\u0b35-\u0b39\u0b3d\u0b5c-\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99-\u0b9a\u0b9c\u0b9e-\u0b9f\u0ba3-\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58-\u0c59\u0c60-\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0-\u0ce1\u0cf1-\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32-\u0e33\u0e40-\u0e45\u0e81-\u0e82\u0e84\u0e87-\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa-\u0eab\u0ead-\u0eb0\u0eb2-\u0eb3\u0ebd\u0ec0-\u0ec4\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070\u1075-\u1081\u108e\u10d0-\u10fa\u10fd-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17dc\u1820-\u1842\u1844-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae-\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c77\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5-\u1cf6\u2135-\u2138\u2d30-\u2d67\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3006\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua014\ua016-\ua48c\ua4d0-\ua4f7\ua500-\ua60b\ua610-\ua61f\ua62a-\ua62b\ua66e\ua6a0-\ua6e5\ua7fb-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa6f\uaa71-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5-\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadc\uaae0-\uaaea\uaaf2\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff66-\uff6f\uff71-\uff9d\uffa0-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc'
+Lo = u'\xaa\xba\u01bb\u01c0-\u01c3\u0294\u05d0-\u05ea\u05ef-\u05f2\u0620-\u063f\u0641-\u064a\u066e-\u066f\u0671-\u06d3\u06d5\u06ee-\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u0800-\u0815\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0972-\u0980\u0985-\u098c\u098f-\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc-\u09dd\u09df-\u09e1\u09f0-\u09f1\u09fc\u0a05-\u0a0a\u0a0f-\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32-\u0a33\u0a35-\u0a36\u0a38-\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2-\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0-\u0ae1\u0af9\u0b05-\u0b0c\u0b0f-\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32-\u0b33\u0b35-\u0b39\u0b3d\u0b5c-\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99-\u0b9a\u0b9c\u0b9e-\u0b9f\u0ba3-\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60-\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0-\u0ce1\u0cf1-\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32-\u0e33\u0e40-\u0e45\u0e81-\u0e82\u0e84\u0e87-\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa-\u0eab\u0ead-\u0eb0\u0eb2-\u0eb3\u0ebd\u0ec0-\u0ec4\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070\u1075-\u1081\u108e\u1100-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16f1-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17dc\u1820-\u1842\u1844-\u1878\u1880-\u1884\u1887-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae-\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c77\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5-\u1cf6\u2135-\u2138\u2d30-\u2d67\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3006\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua014\ua016-\ua48c\ua4d0-\ua4f7\ua500-\ua60b\ua610-\ua61f\ua62a-\ua62b\ua66e\ua6a0-\ua6e5\ua78f\ua7f7\ua7fb-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd-\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9e0-\ua9e4\ua9e7-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa6f\uaa71-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5-\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadc\uaae0-\uaaea\uaaf2\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff66-\uff6f\uff71-\uff9d\uffa0-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc'
Lt = u'\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc'
-Lu = u'A-Z\xc0-\xd6\xd8-\xde\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3a'
+Lu = u'A-Z\xc0-\xd6\xd8-\xde\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u037f\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0528\u052a\u052c\u052e\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u13a0-\u13f5\u1c90-\u1cba\u1cbd-\u1cbf\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua698\ua69a\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua796\ua798\ua79a\ua79c\ua79e\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa-\ua7ae\ua7b0-\ua7b4\ua7b6\ua7b8\uff21-\uff3a'
-Mc = u'\u0903\u093b\u093e-\u0940\u0949-\u094c\u094e-\u094f\u0982-\u0983\u09be-\u09c0\u09c7-\u09c8\u09cb-\u09cc\u09d7\u0a03\u0a3e-\u0a40\u0a83\u0abe-\u0ac0\u0ac9\u0acb-\u0acc\u0b02-\u0b03\u0b3e\u0b40\u0b47-\u0b48\u0b4b-\u0b4c\u0b57\u0bbe-\u0bbf\u0bc1-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcc\u0bd7\u0c01-\u0c03\u0c41-\u0c44\u0c82-\u0c83\u0cbe\u0cc0-\u0cc4\u0cc7-\u0cc8\u0cca-\u0ccb\u0cd5-\u0cd6\u0d02-\u0d03\u0d3e-\u0d40\u0d46-\u0d48\u0d4a-\u0d4c\u0d57\u0d82-\u0d83\u0dcf-\u0dd1\u0dd8-\u0ddf\u0df2-\u0df3\u0f3e-\u0f3f\u0f7f\u102b-\u102c\u1031\u1038\u103b-\u103c\u1056-\u1057\u1062-\u1064\u1067-\u106d\u1083-\u1084\u1087-\u108c\u108f\u109a-\u109c\u17b6\u17be-\u17c5\u17c7-\u17c8\u1923-\u1926\u1929-\u192b\u1930-\u1931\u1933-\u1938\u19b0-\u19c0\u19c8-\u19c9\u1a19-\u1a1a\u1a55\u1a57\u1a61\u1a63-\u1a64\u1a6d-\u1a72\u1b04\u1b35\u1b3b\u1b3d-\u1b41\u1b43-\u1b44\u1b82\u1ba1\u1ba6-\u1ba7\u1baa\u1bac-\u1bad\u1be7\u1bea-\u1bec\u1bee\u1bf2-\u1bf3\u1c24-\u1c2b\u1c34-\u1c35\u1ce1\u1cf2-\u1cf3\u302e-\u302f\ua823-\ua824\ua827\ua880-\ua881\ua8b4-\ua8c3\ua952-\ua953\ua983\ua9b4-\ua9b5\ua9ba-\ua9bb\ua9bd-\ua9c0\uaa2f-\uaa30\uaa33-\uaa34\uaa4d\uaa7b\uaaeb\uaaee-\uaaef\uaaf5\uabe3-\uabe4\uabe6-\uabe7\uabe9-\uabea\uabec'
+Mc = u'\u0903\u093b\u093e-\u0940\u0949-\u094c\u094e-\u094f\u0982-\u0983\u09be-\u09c0\u09c7-\u09c8\u09cb-\u09cc\u09d7\u0a03\u0a3e-\u0a40\u0a83\u0abe-\u0ac0\u0ac9\u0acb-\u0acc\u0b02-\u0b03\u0b3e\u0b40\u0b47-\u0b48\u0b4b-\u0b4c\u0b57\u0bbe-\u0bbf\u0bc1-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcc\u0bd7\u0c01-\u0c03\u0c41-\u0c44\u0c82-\u0c83\u0cbe\u0cc0-\u0cc4\u0cc7-\u0cc8\u0cca-\u0ccb\u0cd5-\u0cd6\u0d02-\u0d03\u0d3e-\u0d40\u0d46-\u0d48\u0d4a-\u0d4c\u0d57\u0d82-\u0d83\u0dcf-\u0dd1\u0dd8-\u0ddf\u0df2-\u0df3\u0f3e-\u0f3f\u0f7f\u102b-\u102c\u1031\u1038\u103b-\u103c\u1056-\u1057\u1062-\u1064\u1067-\u106d\u1083-\u1084\u1087-\u108c\u108f\u109a-\u109c\u17b6\u17be-\u17c5\u17c7-\u17c8\u1923-\u1926\u1929-\u192b\u1930-\u1931\u1933-\u1938\u1a19-\u1a1a\u1a55\u1a57\u1a61\u1a63-\u1a64\u1a6d-\u1a72\u1b04\u1b35\u1b3b\u1b3d-\u1b41\u1b43-\u1b44\u1b82\u1ba1\u1ba6-\u1ba7\u1baa\u1be7\u1bea-\u1bec\u1bee\u1bf2-\u1bf3\u1c24-\u1c2b\u1c34-\u1c35\u1ce1\u1cf2-\u1cf3\u1cf7\u302e-\u302f\ua823-\ua824\ua827\ua880-\ua881\ua8b4-\ua8c3\ua952-\ua953\ua983\ua9b4-\ua9b5\ua9ba-\ua9bb\ua9bd-\ua9c0\uaa2f-\uaa30\uaa33-\uaa34\uaa4d\uaa7b\uaa7d\uaaeb\uaaee-\uaaef\uaaf5\uabe3-\uabe4\uabe6-\uabe7\uabe9-\uabea\uabec'
-Me = u'\u0488-\u0489\u20dd-\u20e0\u20e2-\u20e4\ua670-\ua672'
+Me = u'\u0488-\u0489\u1abe\u20dd-\u20e0\u20e2-\u20e4\ua670-\ua672'
-Mn = u'\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09c1-\u09c4\u09cd\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b62-\u0b63\u0b82\u0bc0\u0bcd\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0cbc\u0cbf\u0cc6\u0ccc-\u0ccd\u0ce2-\u0ce3\u0d41-\u0d44\u0d4d\u0d62-\u0d63\u0dca\u0dd2-\u0dd4\u0dd6\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u3099-\u309a\ua66f\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe26'
+Mn = u'\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09c1-\u09c4\u09cd\u09e2-\u09e3\u09fe\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0afa-\u0aff\u0b01\u0b3c\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b62-\u0b63\u0b82\u0bc0\u0bcd\u0c00\u0c04\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0c81\u0cbc\u0cbf\u0cc6\u0ccc-\u0ccd\u0ce2-\u0ce3\u0d00-\u0d01\u0d3b-\u0d3c\u0d41-\u0d44\u0d4d\u0d62-\u0d63\u0dca\u0dd2-\u0dd4\u0dd6\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u1885-\u1886\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab-\u1bad\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u3099-\u309a\ua66f\ua674-\ua67d\ua69e-\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4-\ua8c5\ua8e0-\ua8f1\ua8ff\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\ua9e5\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f'
-Nd = u'0-9\u0660-\u0669\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\uaa50-\uaa59\uabf0-\uabf9\uff10-\uff19'
+Nd = u'0-9\u0660-\u0669\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0de6-\u0def\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\ua9f0-\ua9f9\uaa50-\uaa59\uabf0-\uabf9\uff10-\uff19'
Nl = u'\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef'
-No = u'\xb2-\xb3\xb9\xbc-\xbe\u09f4-\u09f9\u0b72-\u0b77\u0bf0-\u0bf2\u0c78-\u0c7e\u0d70-\u0d75\u0f2a-\u0f33\u1369-\u137c\u17f0-\u17f9\u19da\u2070\u2074-\u2079\u2080-\u2089\u2150-\u215f\u2189\u2460-\u249b\u24ea-\u24ff\u2776-\u2793\u2cfd\u3192-\u3195\u3220-\u3229\u3248-\u324f\u3251-\u325f\u3280-\u3289\u32b1-\u32bf\ua830-\ua835'
+No = u'\xb2-\xb3\xb9\xbc-\xbe\u09f4-\u09f9\u0b72-\u0b77\u0bf0-\u0bf2\u0c78-\u0c7e\u0d58-\u0d5e\u0d70-\u0d78\u0f2a-\u0f33\u1369-\u137c\u17f0-\u17f9\u19da\u2070\u2074-\u2079\u2080-\u2089\u2150-\u215f\u2189\u2460-\u249b\u24ea-\u24ff\u2776-\u2793\u2cfd\u3192-\u3195\u3220-\u3229\u3248-\u324f\u3251-\u325f\u3280-\u3289\u32b1-\u32bf\ua830-\ua835'
Pc = u'_\u203f-\u2040\u2054\ufe33-\ufe34\ufe4d-\ufe4f\uff3f'
-Pd = u'\\-\u058a\u05be\u1400\u1806\u2010-\u2015\u2e17\u2e1a\u2e3a-\u2e3b\u301c\u3030\u30a0\ufe31-\ufe32\ufe58\ufe63\uff0d'
+Pd = u'\\-\u058a\u05be\u1400\u1806\u2010-\u2015\u2e17\u2e1a\u2e3a-\u2e3b\u2e40\u301c\u3030\u30a0\ufe31-\ufe32\ufe58\ufe63\uff0d'
-Pe = u')\\]}\u0f3b\u0f3d\u169c\u2046\u207e\u208e\u2309\u230b\u232a\u2769\u276b\u276d\u276f\u2771\u2773\u2775\u27c6\u27e7\u27e9\u27eb\u27ed\u27ef\u2984\u2986\u2988\u298a\u298c\u298e\u2990\u2992\u2994\u2996\u2998\u29d9\u29db\u29fd\u2e23\u2e25\u2e27\u2e29\u3009\u300b\u300d\u300f\u3011\u3015\u3017\u3019\u301b\u301e-\u301f\ufd3f\ufe18\ufe36\ufe38\ufe3a\ufe3c\ufe3e\ufe40\ufe42\ufe44\ufe48\ufe5a\ufe5c\ufe5e\uff09\uff3d\uff5d\uff60\uff63'
+Pe = u')\\]}\u0f3b\u0f3d\u169c\u2046\u207e\u208e\u2309\u230b\u232a\u2769\u276b\u276d\u276f\u2771\u2773\u2775\u27c6\u27e7\u27e9\u27eb\u27ed\u27ef\u2984\u2986\u2988\u298a\u298c\u298e\u2990\u2992\u2994\u2996\u2998\u29d9\u29db\u29fd\u2e23\u2e25\u2e27\u2e29\u3009\u300b\u300d\u300f\u3011\u3015\u3017\u3019\u301b\u301e-\u301f\ufd3e\ufe18\ufe36\ufe38\ufe3a\ufe3c\ufe3e\ufe40\ufe42\ufe44\ufe48\ufe5a\ufe5c\ufe5e\uff09\uff3d\uff5d\uff60\uff63'
Pf = u'\xbb\u2019\u201d\u203a\u2e03\u2e05\u2e0a\u2e0d\u2e1d\u2e21'
Pi = u'\xab\u2018\u201b-\u201c\u201f\u2039\u2e02\u2e04\u2e09\u2e0c\u2e1c\u2e20'
-Po = u"!-#%-'*,.-/:-;?-@\\\\\xa1\xa7\xb6-\xb7\xbf\u037e\u0387\u055a-\u055f\u0589\u05c0\u05c3\u05c6\u05f3-\u05f4\u0609-\u060a\u060c-\u060d\u061b\u061e-\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964-\u0965\u0970\u0af0\u0df4\u0e4f\u0e5a-\u0e5b\u0f04-\u0f12\u0f14\u0f85\u0fd0-\u0fd4\u0fd9-\u0fda\u104a-\u104f\u10fb\u1360-\u1368\u166d-\u166e\u16eb-\u16ed\u1735-\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u1805\u1807-\u180a\u1944-\u1945\u1a1e-\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e-\u1c7f\u1cc0-\u1cc7\u1cd3\u2016-\u2017\u2020-\u2027\u2030-\u2038\u203b-\u203e\u2041-\u2043\u2047-\u2051\u2053\u2055-\u205e\u2cf9-\u2cfc\u2cfe-\u2cff\u2d70\u2e00-\u2e01\u2e06-\u2e08\u2e0b\u2e0e-\u2e16\u2e18-\u2e19\u2e1b\u2e1e-\u2e1f\u2e2a-\u2e2e\u2e30-\u2e39\u3001-\u3003\u303d\u30fb\ua4fe-\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce-\ua8cf\ua8f8-\ua8fa\ua92e-\ua92f\ua95f\ua9c1-\ua9cd\ua9de-\ua9df\uaa5c-\uaa5f\uaade-\uaadf\uaaf0-\uaaf1\uabeb\ufe10-\ufe16\ufe19\ufe30\ufe45-\ufe46\ufe49-\ufe4c\ufe50-\ufe52\ufe54-\ufe57\ufe5f-\ufe61\ufe68\ufe6a-\ufe6b\uff01-\uff03\uff05-\uff07\uff0a\uff0c\uff0e-\uff0f\uff1a-\uff1b\uff1f-\uff20\uff3c\uff61\uff64-\uff65"
+Po = u"!-#%-'*,.-/:-;?-@\\\\\xa1\xa7\xb6-\xb7\xbf\u037e\u0387\u055a-\u055f\u0589\u05c0\u05c3\u05c6\u05f3-\u05f4\u0609-\u060a\u060c-\u060d\u061b\u061e-\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964-\u0965\u0970\u09fd\u0a76\u0af0\u0c84\u0df4\u0e4f\u0e5a-\u0e5b\u0f04-\u0f12\u0f14\u0f85\u0fd0-\u0fd4\u0fd9-\u0fda\u104a-\u104f\u10fb\u1360-\u1368\u166d-\u166e\u16eb-\u16ed\u1735-\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u1805\u1807-\u180a\u1944-\u1945\u1a1e-\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e-\u1c7f\u1cc0-\u1cc7\u1cd3\u2016-\u2017\u2020-\u2027\u2030-\u2038\u203b-\u203e\u2041-\u2043\u2047-\u2051\u2053\u2055-\u205e\u2cf9-\u2cfc\u2cfe-\u2cff\u2d70\u2e00-\u2e01\u2e06-\u2e08\u2e0b\u2e0e-\u2e16\u2e18-\u2e19\u2e1b\u2e1e-\u2e1f\u2e2a-\u2e2e\u2e30-\u2e39\u2e3c-\u2e3f\u2e41\u2e43-\u2e4e\u3001-\u3003\u303d\u30fb\ua4fe-\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce-\ua8cf\ua8f8-\ua8fa\ua8fc\ua92e-\ua92f\ua95f\ua9c1-\ua9cd\ua9de-\ua9df\uaa5c-\uaa5f\uaade-\uaadf\uaaf0-\uaaf1\uabeb\ufe10-\ufe16\ufe19\ufe30\ufe45-\ufe46\ufe49-\ufe4c\ufe50-\ufe52\ufe54-\ufe57\ufe5f-\ufe61\ufe68\ufe6a-\ufe6b\uff01-\uff03\uff05-\uff07\uff0a\uff0c\uff0e-\uff0f\uff1a-\uff1b\uff1f-\uff20\uff3c\uff61\uff64-\uff65"
-Ps = u'(\\[{\u0f3a\u0f3c\u169b\u201a\u201e\u2045\u207d\u208d\u2308\u230a\u2329\u2768\u276a\u276c\u276e\u2770\u2772\u2774\u27c5\u27e6\u27e8\u27ea\u27ec\u27ee\u2983\u2985\u2987\u2989\u298b\u298d\u298f\u2991\u2993\u2995\u2997\u29d8\u29da\u29fc\u2e22\u2e24\u2e26\u2e28\u3008\u300a\u300c\u300e\u3010\u3014\u3016\u3018\u301a\u301d\ufd3e\ufe17\ufe35\ufe37\ufe39\ufe3b\ufe3d\ufe3f\ufe41\ufe43\ufe47\ufe59\ufe5b\ufe5d\uff08\uff3b\uff5b\uff5f\uff62'
+Ps = u'(\\[{\u0f3a\u0f3c\u169b\u201a\u201e\u2045\u207d\u208d\u2308\u230a\u2329\u2768\u276a\u276c\u276e\u2770\u2772\u2774\u27c5\u27e6\u27e8\u27ea\u27ec\u27ee\u2983\u2985\u2987\u2989\u298b\u298d\u298f\u2991\u2993\u2995\u2997\u29d8\u29da\u29fc\u2e22\u2e24\u2e26\u2e28\u2e42\u3008\u300a\u300c\u300e\u3010\u3014\u3016\u3018\u301a\u301d\ufd3f\ufe17\ufe35\ufe37\ufe39\ufe3b\ufe3d\ufe3f\ufe41\ufe43\ufe47\ufe59\ufe5b\ufe5d\uff08\uff3b\uff5b\uff5f\uff62'
-Sc = u'$\xa2-\xa5\u058f\u060b\u09f2-\u09f3\u09fb\u0af1\u0bf9\u0e3f\u17db\u20a0-\u20ba\ua838\ufdfc\ufe69\uff04\uffe0-\uffe1\uffe5-\uffe6'
+Sc = u'$\xa2-\xa5\u058f\u060b\u07fe-\u07ff\u09f2-\u09f3\u09fb\u0af1\u0bf9\u0e3f\u17db\u20a0-\u20bf\ua838\ufdfc\ufe69\uff04\uffe0-\uffe1\uffe5-\uffe6'
-Sk = u'\\^`\xa8\xaf\xb4\xb8\u02c2-\u02c5\u02d2-\u02df\u02e5-\u02eb\u02ed\u02ef-\u02ff\u0375\u0384-\u0385\u1fbd\u1fbf-\u1fc1\u1fcd-\u1fcf\u1fdd-\u1fdf\u1fed-\u1fef\u1ffd-\u1ffe\u309b-\u309c\ua700-\ua716\ua720-\ua721\ua789-\ua78a\ufbb2-\ufbc1\uff3e\uff40\uffe3'
+Sk = u'\\^`\xa8\xaf\xb4\xb8\u02c2-\u02c5\u02d2-\u02df\u02e5-\u02eb\u02ed\u02ef-\u02ff\u0375\u0384-\u0385\u1fbd\u1fbf-\u1fc1\u1fcd-\u1fcf\u1fdd-\u1fdf\u1fed-\u1fef\u1ffd-\u1ffe\u309b-\u309c\ua700-\ua716\ua720-\ua721\ua789-\ua78a\uab5b\ufbb2-\ufbc1\uff3e\uff40\uffe3'
Sm = u'+<->|~\xac\xb1\xd7\xf7\u03f6\u0606-\u0608\u2044\u2052\u207a-\u207c\u208a-\u208c\u2118\u2140-\u2144\u214b\u2190-\u2194\u219a-\u219b\u21a0\u21a3\u21a6\u21ae\u21ce-\u21cf\u21d2\u21d4\u21f4-\u22ff\u2320-\u2321\u237c\u239b-\u23b3\u23dc-\u23e1\u25b7\u25c1\u25f8-\u25ff\u266f\u27c0-\u27c4\u27c7-\u27e5\u27f0-\u27ff\u2900-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2aff\u2b30-\u2b44\u2b47-\u2b4c\ufb29\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe9-\uffec'
-So = u'\xa6\xa9\xae\xb0\u0482\u060e-\u060f\u06de\u06e9\u06fd-\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0d79\u0f01-\u0f03\u0f13\u0f15-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcc\u0fce-\u0fcf\u0fd5-\u0fd8\u109e-\u109f\u1390-\u1399\u1940\u19de-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2117\u211e-\u2123\u2125\u2127\u2129\u212e\u213a-\u213b\u214a\u214c-\u214d\u214f\u2195-\u2199\u219c-\u219f\u21a1-\u21a2\u21a4-\u21a5\u21a7-\u21ad\u21af-\u21cd\u21d0-\u21d1\u21d3\u21d5-\u21f3\u2300-\u2307\u230c-\u231f\u2322-\u2328\u232b-\u237b\u237d-\u239a\u23b4-\u23db\u23e2-\u23f3\u2400-\u2426\u2440-\u244a\u249c-\u24e9\u2500-\u25b6\u25b8-\u25c0\u25c2-\u25f7\u2600-\u266e\u2670-\u26ff\u2701-\u2767\u2794-\u27bf\u2800-\u28ff\u2b00-\u2b2f\u2b45-\u2b46\u2b50-\u2b59\u2ce5-\u2cea\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u2ff0-\u2ffb\u3004\u3012-\u3013\u3020\u3036-\u3037\u303e-\u303f\u3190-\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3247\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u32fe\u3300-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ua836-\ua837\ua839\uaa77-\uaa79\ufdfd\uffe4\uffe8\uffed-\uffee\ufffc-\ufffd'
+So = u'\xa6\xa9\xae\xb0\u0482\u058d-\u058e\u060e-\u060f\u06de\u06e9\u06fd-\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0d4f\u0d79\u0f01-\u0f03\u0f13\u0f15-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcc\u0fce-\u0fcf\u0fd5-\u0fd8\u109e-\u109f\u1390-\u1399\u1940\u19de-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2117\u211e-\u2123\u2125\u2127\u2129\u212e\u213a-\u213b\u214a\u214c-\u214d\u214f\u218a-\u218b\u2195-\u2199\u219c-\u219f\u21a1-\u21a2\u21a4-\u21a5\u21a7-\u21ad\u21af-\u21cd\u21d0-\u21d1\u21d3\u21d5-\u21f3\u2300-\u2307\u230c-\u231f\u2322-\u2328\u232b-\u237b\u237d-\u239a\u23b4-\u23db\u23e2-\u2426\u2440-\u244a\u249c-\u24e9\u2500-\u25b6\u25b8-\u25c0\u25c2-\u25f7\u2600-\u266e\u2670-\u2767\u2794-\u27bf\u2800-\u28ff\u2b00-\u2b2f\u2b45-\u2b46\u2b4d-\u2b73\u2b76-\u2b95\u2b98-\u2bc8\u2bca-\u2bfe\u2ce5-\u2cea\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u2ff0-\u2ffb\u3004\u3012-\u3013\u3020\u3036-\u3037\u303e-\u303f\u3190-\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3247\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u32fe\u3300-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ua836-\ua837\ua839\uaa77-\uaa79\ufdfd\uffe4\uffe8\uffed-\uffee\ufffc-\ufffd'
Zl = u'\u2028'
@@ -77,49 +77,53 @@ Zp = u'\u2029'
Zs = u' \xa0\u1680\u2000-\u200a\u202f\u205f\u3000'
-xid_continue = u'0-9A-Z_a-z\xaa\xb5\xb7\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376-\u0377\u037b-\u037d\u0386-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0\u08a2-\u08ac\u08e4-\u08fe\u0900-\u0963\u0966-\u096f\u0971-\u0977\u0979-\u097f\u0981-\u0983\u0985-\u098c\u098f-\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7-\u09c8\u09cb-\u09ce\u09d7\u09dc-\u09dd\u09df-\u09e3\u09e6-\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f-\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32-\u0a33\u0a35-\u0a36\u0a38-\u0a39\u0a3c\u0a3e-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2-\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b05-\u0b0c\u0b0f-\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32-\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47-\u0b48\u0b4b-\u0b4d\u0b56-\u0b57\u0b5c-\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82-\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99-\u0b9a\u0b9c\u0b9e-\u0b9f\u0ba3-\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c58-\u0c59\u0c60-\u0c63\u0c66-\u0c6f\u0c82-\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5-\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1-\u0cf2\u0d02-\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82-\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2-\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81-\u0e82\u0e84\u0e87-\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa-\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18-\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1369-\u1371\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772-\u1773\u1780-\u17d3\u17d7\u17dc-\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191c\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19da\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1d00-\u1de6\u1dfc-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u203f-\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099-\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua697\ua69f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua827\ua840-\ua873\ua880-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua900-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a-\uaa7b\uaa80-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabea\uabec-\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufbb1\ufbd3-\ufc5d\ufc64-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdf9\ufe00-\ufe0f\ufe20-\ufe26\ufe33-\ufe34\ufe4d-\ufe4f\ufe71\ufe73\ufe77\ufe79\ufe7b\ufe7d\ufe7f-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc'
+xid_continue = u'0-9A-Z_a-z\xaa\xb5\xb7\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376-\u0377\u037b-\u037d\u037f\u0386-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u05d0-\u05ea\u05ef-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u07fd\u0800-\u082d\u0840-\u085b\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u08d3-\u08e1\u08e3-\u0963\u0966-\u096f\u0971-\u0983\u0985-\u098c\u098f-\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7-\u09c8\u09cb-\u09ce\u09d7\u09dc-\u09dd\u09df-\u09e3\u09e6-\u09f1\u09fc\u09fe\u0a01-\u0a03\u0a05-\u0a0a\u0a0f-\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32-\u0a33\u0a35-\u0a36\u0a38-\u0a39\u0a3c\u0a3e-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2-\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0af9-\u0aff\u0b01-\u0b03\u0b05-\u0b0c\u0b0f-\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32-\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47-\u0b48\u0b4b-\u0b4d\u0b56-\u0b57\u0b5c-\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82-\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99-\u0b9a\u0b9c\u0b9e-\u0b9f\u0ba3-\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c00-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c58-\u0c5a\u0c60-\u0c63\u0c66-\u0c6f\u0c80-\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5-\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1-\u0cf2\u0d00-\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d54-\u0d57\u0d5f-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82-\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2-\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81-\u0e82\u0e84\u0e87-\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa-\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18-\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1369-\u1371\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772-\u1773\u1780-\u17d3\u17d7\u17dc-\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1878\u1880-\u18aa\u18b0-\u18f5\u1900-\u191e\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19da\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1ab0-\u1abd\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1cd0-\u1cd2\u1cd4-\u1cf9\u1d00-\u1df9\u1dfb-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u203f-\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099-\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua7b9\ua7f7-\ua827\ua840-\ua873\ua880-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua8fd-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\ua9e0-\ua9fe\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabea\uabec-\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufbb1\ufbd3-\ufc5d\ufc64-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdf9\ufe00-\ufe0f\ufe20-\ufe2f\ufe33-\ufe34\ufe4d-\ufe4f\ufe71\ufe73\ufe77\ufe79\ufe7b\ufe7d\ufe7f-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc'
-xid_start = u'A-Z_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376-\u0377\u037b-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e-\u066f\u0671-\u06d3\u06d5\u06e5-\u06e6\u06ee-\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4-\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f-\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc-\u09dd\u09df-\u09e1\u09f0-\u09f1\u0a05-\u0a0a\u0a0f-\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32-\u0a33\u0a35-\u0a36\u0a38-\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2-\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0-\u0ae1\u0b05-\u0b0c\u0b0f-\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32-\u0b33\u0b35-\u0b39\u0b3d\u0b5c-\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99-\u0b9a\u0b9c\u0b9e-\u0b9f\u0ba3-\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58-\u0c59\u0c60-\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0-\u0ce1\u0cf1-\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e40-\u0e46\u0e81-\u0e82\u0e84\u0e87-\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa-\u0eab\u0ead-\u0eb0\u0eb2\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae-\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5-\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a-\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5-\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufbb1\ufbd3-\ufc5d\ufc64-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdf9\ufe71\ufe73\ufe77\ufe79\ufe7b\ufe7d\ufe7f-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uff9d\uffa0-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc'
+xid_start = u'A-Z_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376-\u0377\u037b-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e-\u066f\u0671-\u06d3\u06d5\u06e5-\u06e6\u06ee-\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4-\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f-\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc-\u09dd\u09df-\u09e1\u09f0-\u09f1\u09fc\u0a05-\u0a0a\u0a0f-\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32-\u0a33\u0a35-\u0a36\u0a38-\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2-\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0-\u0ae1\u0af9\u0b05-\u0b0c\u0b0f-\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32-\u0b33\u0b35-\u0b39\u0b3d\u0b5c-\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99-\u0b9a\u0b9c\u0b9e-\u0b9f\u0ba3-\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60-\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0-\u0ce1\u0cf1-\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e40-\u0e46\u0e81-\u0e82\u0e84\u0e87-\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa-\u0eab\u0ead-\u0eb0\u0eb2\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae-\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5-\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a-\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7b9\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd-\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5-\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufbb1\ufbd3-\ufc5d\ufc64-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdf9\ufe71\ufe73\ufe77\ufe79\ufe7b\ufe7d\ufe7f-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uff9d\uffa0-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc'
if sys.maxunicode > 0xFFFF:
# non-BMP characters, use only on wide Unicode builds
- Cf += u'\U000110bd\U0001d173-\U0001d17a\U000e0001\U000e0020-\U000e007f'
+ Cf += u'\U000110bd\U000110cd\U0001bca0-\U0001bca3\U0001d173-\U0001d17a\U000e0001\U000e0020-\U000e007f'
- Cn += u'\U0001000c\U00010027\U0001003b\U0001003e\U0001004e-\U0001004f\U0001005e-\U0001007f\U000100fb-\U000100ff\U00010103-\U00010106\U00010134-\U00010136\U0001018b-\U0001018f\U0001019c-\U000101cf\U000101fe-\U0001027f\U0001029d-\U0001029f\U000102d1-\U000102ff\U0001031f\U00010324-\U0001032f\U0001034b-\U0001037f\U0001039e\U000103c4-\U000103c7\U000103d6-\U000103ff\U0001049e-\U0001049f\U000104aa-\U000107ff\U00010806-\U00010807\U00010809\U00010836\U00010839-\U0001083b\U0001083d-\U0001083e\U00010856\U00010860-\U000108ff\U0001091c-\U0001091e\U0001093a-\U0001093e\U00010940-\U0001097f\U000109b8-\U000109bd\U000109c0-\U000109ff\U00010a04\U00010a07-\U00010a0b\U00010a14\U00010a18\U00010a34-\U00010a37\U00010a3b-\U00010a3e\U00010a48-\U00010a4f\U00010a59-\U00010a5f\U00010a80-\U00010aff\U00010b36-\U00010b38\U00010b56-\U00010b57\U00010b73-\U00010b77\U00010b80-\U00010bff\U00010c49-\U00010e5f\U00010e7f-\U00010fff\U0001104e-\U00011051\U00011070-\U0001107f\U000110c2-\U000110cf\U000110e9-\U000110ef\U000110fa-\U000110ff\U00011135\U00011144-\U0001117f\U000111c9-\U000111cf\U000111da-\U0001167f\U000116b8-\U000116bf\U000116ca-\U00011fff\U0001236f-\U000123ff\U00012463-\U0001246f\U00012474-\U00012fff\U0001342f-\U000167ff\U00016a39-\U00016eff\U00016f45-\U00016f4f\U00016f7f-\U00016f8e\U00016fa0-\U0001afff\U0001b002-\U0001cfff\U0001d0f6-\U0001d0ff\U0001d127-\U0001d128\U0001d1de-\U0001d1ff\U0001d246-\U0001d2ff\U0001d357-\U0001d35f\U0001d372-\U0001d3ff\U0001d455\U0001d49d\U0001d4a0-\U0001d4a1\U0001d4a3-\U0001d4a4\U0001d4a7-\U0001d4a8\U0001d4ad\U0001d4ba\U0001d4bc\U0001d4c4\U0001d506\U0001d50b-\U0001d50c\U0001d515\U0001d51d\U0001d53a\U0001d53f\U0001d545\U0001d547-\U0001d549\U0001d551\U0001d6a6-\U0001d6a7\U0001d7cc-\U0001d7cd\U0001d800-\U0001edff\U0001ee04\U0001ee20\U0001ee23\U0001ee25-\U0001ee26\U0001ee28\U0001ee33\U0001ee38\U0001ee3a\U0001ee3c-\U0001ee41\U0001ee43-\U0001ee46\U0001ee48\U0001ee4a\U0001ee4c\U0001ee50\U0001ee53\U0001ee55-\U0001ee56\U0001ee58\U0001ee5a\U0001ee5c\U0001ee5e\U0001ee60\U0001ee63\U0001ee65-\U0001ee66\U0001ee6b\U0001ee73\U0001ee78\U0001ee7d\U0001ee7f\U0001ee8a\U0001ee9c-\U0001eea0\U0001eea4\U0001eeaa\U0001eebc-\U0001eeef\U0001eef2-\U0001efff\U0001f02c-\U0001f02f\U0001f094-\U0001f09f\U0001f0af-\U0001f0b0\U0001f0bf-\U0001f0c0\U0001f0d0\U0001f0e0-\U0001f0ff\U0001f10b-\U0001f10f\U0001f12f\U0001f16c-\U0001f16f\U0001f19b-\U0001f1e5\U0001f203-\U0001f20f\U0001f23b-\U0001f23f\U0001f249-\U0001f24f\U0001f252-\U0001f2ff\U0001f321-\U0001f32f\U0001f336\U0001f37d-\U0001f37f\U0001f394-\U0001f39f\U0001f3c5\U0001f3cb-\U0001f3df\U0001f3f1-\U0001f3ff\U0001f43f\U0001f441\U0001f4f8\U0001f4fd-\U0001f4ff\U0001f53e-\U0001f53f\U0001f544-\U0001f54f\U0001f568-\U0001f5fa\U0001f641-\U0001f644\U0001f650-\U0001f67f\U0001f6c6-\U0001f6ff\U0001f774-\U0001ffff\U0002a6d7-\U0002a6ff\U0002b735-\U0002b73f\U0002b81e-\U0002f7ff\U0002fa1e-\U000e0000\U000e0002-\U000e001f\U000e0080-\U000e00ff\U000e01f0-\U000effff\U000ffffe-\U000fffff\U0010fffe-\U0010ffff'
+ Cn += u'\U0001000c\U00010027\U0001003b\U0001003e\U0001004e-\U0001004f\U0001005e-\U0001007f\U000100fb-\U000100ff\U00010103-\U00010106\U00010134-\U00010136\U0001018f\U0001019c-\U0001019f\U000101a1-\U000101cf\U000101fe-\U0001027f\U0001029d-\U0001029f\U000102d1-\U000102df\U000102fc-\U000102ff\U00010324-\U0001032c\U0001034b-\U0001034f\U0001037b-\U0001037f\U0001039e\U000103c4-\U000103c7\U000103d6-\U000103ff\U0001049e-\U0001049f\U000104aa-\U000104af\U000104d4-\U000104d7\U000104fc-\U000104ff\U00010528-\U0001052f\U00010564-\U0001056e\U00010570-\U000105ff\U00010737-\U0001073f\U00010756-\U0001075f\U00010768-\U000107ff\U00010806-\U00010807\U00010809\U00010836\U00010839-\U0001083b\U0001083d-\U0001083e\U00010856\U0001089f-\U000108a6\U000108b0-\U000108df\U000108f3\U000108f6-\U000108fa\U0001091c-\U0001091e\U0001093a-\U0001093e\U00010940-\U0001097f\U000109b8-\U000109bb\U000109d0-\U000109d1\U00010a04\U00010a07-\U00010a0b\U00010a14\U00010a18\U00010a36-\U00010a37\U00010a3b-\U00010a3e\U00010a49-\U00010a4f\U00010a59-\U00010a5f\U00010aa0-\U00010abf\U00010ae7-\U00010aea\U00010af7-\U00010aff\U00010b36-\U00010b38\U00010b56-\U00010b57\U00010b73-\U00010b77\U00010b92-\U00010b98\U00010b9d-\U00010ba8\U00010bb0-\U00010bff\U00010c49-\U00010c7f\U00010cb3-\U00010cbf\U00010cf3-\U00010cf9\U00010d28-\U00010d2f\U00010d3a-\U00010e5f\U00010e7f-\U00010eff\U00010f28-\U00010f2f\U00010f5a-\U00010fff\U0001104e-\U00011051\U00011070-\U0001107e\U000110c2-\U000110cc\U000110ce-\U000110cf\U000110e9-\U000110ef\U000110fa-\U000110ff\U00011135\U00011147-\U0001114f\U00011177-\U0001117f\U000111ce-\U000111cf\U000111e0\U000111f5-\U000111ff\U00011212\U0001123f-\U0001127f\U00011287\U00011289\U0001128e\U0001129e\U000112aa-\U000112af\U000112eb-\U000112ef\U000112fa-\U000112ff\U00011304\U0001130d-\U0001130e\U00011311-\U00011312\U00011329\U00011331\U00011334\U0001133a\U00011345-\U00011346\U00011349-\U0001134a\U0001134e-\U0001134f\U00011351-\U00011356\U00011358-\U0001135c\U00011364-\U00011365\U0001136d-\U0001136f\U00011375-\U000113ff\U0001145a\U0001145c\U0001145f-\U0001147f\U000114c8-\U000114cf\U000114da-\U0001157f\U000115b6-\U000115b7\U000115de-\U000115ff\U00011645-\U0001164f\U0001165a-\U0001165f\U0001166d-\U0001167f\U000116b8-\U000116bf\U000116ca-\U000116ff\U0001171b-\U0001171c\U0001172c-\U0001172f\U00011740-\U000117ff\U0001183c-\U0001189f\U000118f3-\U000118fe\U00011900-\U000119ff\U00011a48-\U00011a4f\U00011a84-\U00011a85\U00011aa3-\U00011abf\U00011af9-\U00011bff\U00011c09\U00011c37\U00011c46-\U00011c4f\U00011c6d-\U00011c6f\U00011c90-\U00011c91\U00011ca8\U00011cb7-\U00011cff\U00011d07\U00011d0a\U00011d37-\U00011d39\U00011d3b\U00011d3e\U00011d48-\U00011d4f\U00011d5a-\U00011d5f\U00011d66\U00011d69\U00011d8f\U00011d92\U00011d99-\U00011d9f\U00011daa-\U00011edf\U00011ef9-\U00011fff\U0001239a-\U000123ff\U0001246f\U00012475-\U0001247f\U00012544-\U00012fff\U0001342f-\U000143ff\U00014647-\U000167ff\U00016a39-\U00016a3f\U00016a5f\U00016a6a-\U00016a6d\U00016a70-\U00016acf\U00016aee-\U00016aef\U00016af6-\U00016aff\U00016b46-\U00016b4f\U00016b5a\U00016b62\U00016b78-\U00016b7c\U00016b90-\U00016e3f\U00016e9b-\U00016eff\U00016f45-\U00016f4f\U00016f7f-\U00016f8e\U00016fa0-\U00016fdf\U00016fe2-\U00016fff\U000187f2-\U000187ff\U00018af3-\U0001afff\U0001b11f-\U0001b16f\U0001b2fc-\U0001bbff\U0001bc6b-\U0001bc6f\U0001bc7d-\U0001bc7f\U0001bc89-\U0001bc8f\U0001bc9a-\U0001bc9b\U0001bca4-\U0001cfff\U0001d0f6-\U0001d0ff\U0001d127-\U0001d128\U0001d1e9-\U0001d1ff\U0001d246-\U0001d2df\U0001d2f4-\U0001d2ff\U0001d357-\U0001d35f\U0001d379-\U0001d3ff\U0001d455\U0001d49d\U0001d4a0-\U0001d4a1\U0001d4a3-\U0001d4a4\U0001d4a7-\U0001d4a8\U0001d4ad\U0001d4ba\U0001d4bc\U0001d4c4\U0001d506\U0001d50b-\U0001d50c\U0001d515\U0001d51d\U0001d53a\U0001d53f\U0001d545\U0001d547-\U0001d549\U0001d551\U0001d6a6-\U0001d6a7\U0001d7cc-\U0001d7cd\U0001da8c-\U0001da9a\U0001daa0\U0001dab0-\U0001dfff\U0001e007\U0001e019-\U0001e01a\U0001e022\U0001e025\U0001e02b-\U0001e7ff\U0001e8c5-\U0001e8c6\U0001e8d7-\U0001e8ff\U0001e94b-\U0001e94f\U0001e95a-\U0001e95d\U0001e960-\U0001ec70\U0001ecb5-\U0001edff\U0001ee04\U0001ee20\U0001ee23\U0001ee25-\U0001ee26\U0001ee28\U0001ee33\U0001ee38\U0001ee3a\U0001ee3c-\U0001ee41\U0001ee43-\U0001ee46\U0001ee48\U0001ee4a\U0001ee4c\U0001ee50\U0001ee53\U0001ee55-\U0001ee56\U0001ee58\U0001ee5a\U0001ee5c\U0001ee5e\U0001ee60\U0001ee63\U0001ee65-\U0001ee66\U0001ee6b\U0001ee73\U0001ee78\U0001ee7d\U0001ee7f\U0001ee8a\U0001ee9c-\U0001eea0\U0001eea4\U0001eeaa\U0001eebc-\U0001eeef\U0001eef2-\U0001efff\U0001f02c-\U0001f02f\U0001f094-\U0001f09f\U0001f0af-\U0001f0b0\U0001f0c0\U0001f0d0\U0001f0f6-\U0001f0ff\U0001f10d-\U0001f10f\U0001f16c-\U0001f16f\U0001f1ad-\U0001f1e5\U0001f203-\U0001f20f\U0001f23c-\U0001f23f\U0001f249-\U0001f24f\U0001f252-\U0001f25f\U0001f266-\U0001f2ff\U0001f6d5-\U0001f6df\U0001f6ed-\U0001f6ef\U0001f6fa-\U0001f6ff\U0001f774-\U0001f77f\U0001f7d9-\U0001f7ff\U0001f80c-\U0001f80f\U0001f848-\U0001f84f\U0001f85a-\U0001f85f\U0001f888-\U0001f88f\U0001f8ae-\U0001f8ff\U0001f90c-\U0001f90f\U0001f93f\U0001f971-\U0001f972\U0001f977-\U0001f979\U0001f97b\U0001f9a3-\U0001f9af\U0001f9ba-\U0001f9bf\U0001f9c3-\U0001f9cf\U0001fa00-\U0001fa5f\U0001fa6e-\U0001ffff\U0002a6d7-\U0002a6ff\U0002b735-\U0002b73f\U0002b81e-\U0002b81f\U0002cea2-\U0002ceaf\U0002ebe1-\U0002f7ff\U0002fa1e-\U000e0000\U000e0002-\U000e001f\U000e0080-\U000e00ff\U000e01f0-\U000effff\U000ffffe-\U000fffff\U0010fffe-\U0010ffff'
Co += u'\U000f0000-\U000ffffd\U00100000-\U0010fffd'
- Ll += u'\U00010428-\U0001044f\U0001d41a-\U0001d433\U0001d44e-\U0001d454\U0001d456-\U0001d467\U0001d482-\U0001d49b\U0001d4b6-\U0001d4b9\U0001d4bb\U0001d4bd-\U0001d4c3\U0001d4c5-\U0001d4cf\U0001d4ea-\U0001d503\U0001d51e-\U0001d537\U0001d552-\U0001d56b\U0001d586-\U0001d59f\U0001d5ba-\U0001d5d3\U0001d5ee-\U0001d607\U0001d622-\U0001d63b\U0001d656-\U0001d66f\U0001d68a-\U0001d6a5\U0001d6c2-\U0001d6da\U0001d6dc-\U0001d6e1\U0001d6fc-\U0001d714\U0001d716-\U0001d71b\U0001d736-\U0001d74e\U0001d750-\U0001d755\U0001d770-\U0001d788\U0001d78a-\U0001d78f\U0001d7aa-\U0001d7c2\U0001d7c4-\U0001d7c9\U0001d7cb'
+ Ll += u'\U00010428-\U0001044f\U000104d8-\U000104fb\U00010cc0-\U00010cf2\U000118c0-\U000118df\U00016e60-\U00016e7f\U0001d41a-\U0001d433\U0001d44e-\U0001d454\U0001d456-\U0001d467\U0001d482-\U0001d49b\U0001d4b6-\U0001d4b9\U0001d4bb\U0001d4bd-\U0001d4c3\U0001d4c5-\U0001d4cf\U0001d4ea-\U0001d503\U0001d51e-\U0001d537\U0001d552-\U0001d56b\U0001d586-\U0001d59f\U0001d5ba-\U0001d5d3\U0001d5ee-\U0001d607\U0001d622-\U0001d63b\U0001d656-\U0001d66f\U0001d68a-\U0001d6a5\U0001d6c2-\U0001d6da\U0001d6dc-\U0001d6e1\U0001d6fc-\U0001d714\U0001d716-\U0001d71b\U0001d736-\U0001d74e\U0001d750-\U0001d755\U0001d770-\U0001d788\U0001d78a-\U0001d78f\U0001d7aa-\U0001d7c2\U0001d7c4-\U0001d7c9\U0001d7cb\U0001e922-\U0001e943'
- Lm += u'\U00016f93-\U00016f9f'
+ Lm += u'\U00016b40-\U00016b43\U00016f93-\U00016f9f\U00016fe0-\U00016fe1'
- Lo += u'\U00010000-\U0001000b\U0001000d-\U00010026\U00010028-\U0001003a\U0001003c-\U0001003d\U0001003f-\U0001004d\U00010050-\U0001005d\U00010080-\U000100fa\U00010280-\U0001029c\U000102a0-\U000102d0\U00010300-\U0001031e\U00010330-\U00010340\U00010342-\U00010349\U00010380-\U0001039d\U000103a0-\U000103c3\U000103c8-\U000103cf\U00010450-\U0001049d\U00010800-\U00010805\U00010808\U0001080a-\U00010835\U00010837-\U00010838\U0001083c\U0001083f-\U00010855\U00010900-\U00010915\U00010920-\U00010939\U00010980-\U000109b7\U000109be-\U000109bf\U00010a00\U00010a10-\U00010a13\U00010a15-\U00010a17\U00010a19-\U00010a33\U00010a60-\U00010a7c\U00010b00-\U00010b35\U00010b40-\U00010b55\U00010b60-\U00010b72\U00010c00-\U00010c48\U00011003-\U00011037\U00011083-\U000110af\U000110d0-\U000110e8\U00011103-\U00011126\U00011183-\U000111b2\U000111c1-\U000111c4\U00011680-\U000116aa\U00012000-\U0001236e\U00013000-\U0001342e\U00016800-\U00016a38\U00016f00-\U00016f44\U00016f50\U0001b000-\U0001b001\U0001ee00-\U0001ee03\U0001ee05-\U0001ee1f\U0001ee21-\U0001ee22\U0001ee24\U0001ee27\U0001ee29-\U0001ee32\U0001ee34-\U0001ee37\U0001ee39\U0001ee3b\U0001ee42\U0001ee47\U0001ee49\U0001ee4b\U0001ee4d-\U0001ee4f\U0001ee51-\U0001ee52\U0001ee54\U0001ee57\U0001ee59\U0001ee5b\U0001ee5d\U0001ee5f\U0001ee61-\U0001ee62\U0001ee64\U0001ee67-\U0001ee6a\U0001ee6c-\U0001ee72\U0001ee74-\U0001ee77\U0001ee79-\U0001ee7c\U0001ee7e\U0001ee80-\U0001ee89\U0001ee8b-\U0001ee9b\U0001eea1-\U0001eea3\U0001eea5-\U0001eea9\U0001eeab-\U0001eebb\U00020000-\U0002a6d6\U0002a700-\U0002b734\U0002b740-\U0002b81d\U0002f800-\U0002fa1d'
+ Lo += u'\U00010000-\U0001000b\U0001000d-\U00010026\U00010028-\U0001003a\U0001003c-\U0001003d\U0001003f-\U0001004d\U00010050-\U0001005d\U00010080-\U000100fa\U00010280-\U0001029c\U000102a0-\U000102d0\U00010300-\U0001031f\U0001032d-\U00010340\U00010342-\U00010349\U00010350-\U00010375\U00010380-\U0001039d\U000103a0-\U000103c3\U000103c8-\U000103cf\U00010450-\U0001049d\U00010500-\U00010527\U00010530-\U00010563\U00010600-\U00010736\U00010740-\U00010755\U00010760-\U00010767\U00010800-\U00010805\U00010808\U0001080a-\U00010835\U00010837-\U00010838\U0001083c\U0001083f-\U00010855\U00010860-\U00010876\U00010880-\U0001089e\U000108e0-\U000108f2\U000108f4-\U000108f5\U00010900-\U00010915\U00010920-\U00010939\U00010980-\U000109b7\U000109be-\U000109bf\U00010a00\U00010a10-\U00010a13\U00010a15-\U00010a17\U00010a19-\U00010a35\U00010a60-\U00010a7c\U00010a80-\U00010a9c\U00010ac0-\U00010ac7\U00010ac9-\U00010ae4\U00010b00-\U00010b35\U00010b40-\U00010b55\U00010b60-\U00010b72\U00010b80-\U00010b91\U00010c00-\U00010c48\U00010d00-\U00010d23\U00010f00-\U00010f1c\U00010f27\U00010f30-\U00010f45\U00011003-\U00011037\U00011083-\U000110af\U000110d0-\U000110e8\U00011103-\U00011126\U00011144\U00011150-\U00011172\U00011176\U00011183-\U000111b2\U000111c1-\U000111c4\U000111da\U000111dc\U00011200-\U00011211\U00011213-\U0001122b\U00011280-\U00011286\U00011288\U0001128a-\U0001128d\U0001128f-\U0001129d\U0001129f-\U000112a8\U000112b0-\U000112de\U00011305-\U0001130c\U0001130f-\U00011310\U00011313-\U00011328\U0001132a-\U00011330\U00011332-\U00011333\U00011335-\U00011339\U0001133d\U00011350\U0001135d-\U00011361\U00011400-\U00011434\U00011447-\U0001144a\U00011480-\U000114af\U000114c4-\U000114c5\U000114c7\U00011580-\U000115ae\U000115d8-\U000115db\U00011600-\U0001162f\U00011644\U00011680-\U000116aa\U00011700-\U0001171a\U00011800-\U0001182b\U000118ff\U00011a00\U00011a0b-\U00011a32\U00011a3a\U00011a50\U00011a5c-\U00011a83\U00011a86-\U00011a89\U00011a9d\U00011ac0-\U00011af8\U00011c00-\U00011c08\U00011c0a-\U00011c2e\U00011c40\U00011c72-\U00011c8f\U00011d00-\U00011d06\U00011d08-\U00011d09\U00011d0b-\U00011d30\U00011d46\U00011d60-\U00011d65\U00011d67-\U00011d68\U00011d6a-\U00011d89\U00011d98\U00011ee0-\U00011ef2\U00012000-\U00012399\U00012480-\U00012543\U00013000-\U0001342e\U00014400-\U00014646\U00016800-\U00016a38\U00016a40-\U00016a5e\U00016ad0-\U00016aed\U00016b00-\U00016b2f\U00016b63-\U00016b77\U00016b7d-\U00016b8f\U00016f00-\U00016f44\U00016f50\U00017000-\U000187f1\U00018800-\U00018af2\U0001b000-\U0001b11e\U0001b170-\U0001b2fb\U0001bc00-\U0001bc6a\U0001bc70-\U0001bc7c\U0001bc80-\U0001bc88\U0001bc90-\U0001bc99\U0001e800-\U0001e8c4\U0001ee00-\U0001ee03\U0001ee05-\U0001ee1f\U0001ee21-\U0001ee22\U0001ee24\U0001ee27\U0001ee29-\U0001ee32\U0001ee34-\U0001ee37\U0001ee39\U0001ee3b\U0001ee42\U0001ee47\U0001ee49\U0001ee4b\U0001ee4d-\U0001ee4f\U0001ee51-\U0001ee52\U0001ee54\U0001ee57\U0001ee59\U0001ee5b\U0001ee5d\U0001ee5f\U0001ee61-\U0001ee62\U0001ee64\U0001ee67-\U0001ee6a\U0001ee6c-\U0001ee72\U0001ee74-\U0001ee77\U0001ee79-\U0001ee7c\U0001ee7e\U0001ee80-\U0001ee89\U0001ee8b-\U0001ee9b\U0001eea1-\U0001eea3\U0001eea5-\U0001eea9\U0001eeab-\U0001eebb\U00020000-\U0002a6d6\U0002a700-\U0002b734\U0002b740-\U0002b81d\U0002b820-\U0002cea1\U0002ceb0-\U0002ebe0\U0002f800-\U0002fa1d'
- Lu += u'\U00010400-\U00010427\U0001d400-\U0001d419\U0001d434-\U0001d44d\U0001d468-\U0001d481\U0001d49c\U0001d49e-\U0001d49f\U0001d4a2\U0001d4a5-\U0001d4a6\U0001d4a9-\U0001d4ac\U0001d4ae-\U0001d4b5\U0001d4d0-\U0001d4e9\U0001d504-\U0001d505\U0001d507-\U0001d50a\U0001d50d-\U0001d514\U0001d516-\U0001d51c\U0001d538-\U0001d539\U0001d53b-\U0001d53e\U0001d540-\U0001d544\U0001d546\U0001d54a-\U0001d550\U0001d56c-\U0001d585\U0001d5a0-\U0001d5b9\U0001d5d4-\U0001d5ed\U0001d608-\U0001d621\U0001d63c-\U0001d655\U0001d670-\U0001d689\U0001d6a8-\U0001d6c0\U0001d6e2-\U0001d6fa\U0001d71c-\U0001d734\U0001d756-\U0001d76e\U0001d790-\U0001d7a8\U0001d7ca'
+ Lu += u'\U00010400-\U00010427\U000104b0-\U000104d3\U00010c80-\U00010cb2\U000118a0-\U000118bf\U00016e40-\U00016e5f\U0001d400-\U0001d419\U0001d434-\U0001d44d\U0001d468-\U0001d481\U0001d49c\U0001d49e-\U0001d49f\U0001d4a2\U0001d4a5-\U0001d4a6\U0001d4a9-\U0001d4ac\U0001d4ae-\U0001d4b5\U0001d4d0-\U0001d4e9\U0001d504-\U0001d505\U0001d507-\U0001d50a\U0001d50d-\U0001d514\U0001d516-\U0001d51c\U0001d538-\U0001d539\U0001d53b-\U0001d53e\U0001d540-\U0001d544\U0001d546\U0001d54a-\U0001d550\U0001d56c-\U0001d585\U0001d5a0-\U0001d5b9\U0001d5d4-\U0001d5ed\U0001d608-\U0001d621\U0001d63c-\U0001d655\U0001d670-\U0001d689\U0001d6a8-\U0001d6c0\U0001d6e2-\U0001d6fa\U0001d71c-\U0001d734\U0001d756-\U0001d76e\U0001d790-\U0001d7a8\U0001d7ca\U0001e900-\U0001e921'
- Mc += u'\U00011000\U00011002\U00011082\U000110b0-\U000110b2\U000110b7-\U000110b8\U0001112c\U00011182\U000111b3-\U000111b5\U000111bf-\U000111c0\U000116ac\U000116ae-\U000116af\U000116b6\U00016f51-\U00016f7e\U0001d165-\U0001d166\U0001d16d-\U0001d172'
+ Mc += u'\U00011000\U00011002\U00011082\U000110b0-\U000110b2\U000110b7-\U000110b8\U0001112c\U00011145-\U00011146\U00011182\U000111b3-\U000111b5\U000111bf-\U000111c0\U0001122c-\U0001122e\U00011232-\U00011233\U00011235\U000112e0-\U000112e2\U00011302-\U00011303\U0001133e-\U0001133f\U00011341-\U00011344\U00011347-\U00011348\U0001134b-\U0001134d\U00011357\U00011362-\U00011363\U00011435-\U00011437\U00011440-\U00011441\U00011445\U000114b0-\U000114b2\U000114b9\U000114bb-\U000114be\U000114c1\U000115af-\U000115b1\U000115b8-\U000115bb\U000115be\U00011630-\U00011632\U0001163b-\U0001163c\U0001163e\U000116ac\U000116ae-\U000116af\U000116b6\U00011720-\U00011721\U00011726\U0001182c-\U0001182e\U00011838\U00011a39\U00011a57-\U00011a58\U00011a97\U00011c2f\U00011c3e\U00011ca9\U00011cb1\U00011cb4\U00011d8a-\U00011d8e\U00011d93-\U00011d94\U00011d96\U00011ef5-\U00011ef6\U00016f51-\U00016f7e\U0001d165-\U0001d166\U0001d16d-\U0001d172'
- Mn += u'\U000101fd\U00010a01-\U00010a03\U00010a05-\U00010a06\U00010a0c-\U00010a0f\U00010a38-\U00010a3a\U00010a3f\U00011001\U00011038-\U00011046\U00011080-\U00011081\U000110b3-\U000110b6\U000110b9-\U000110ba\U00011100-\U00011102\U00011127-\U0001112b\U0001112d-\U00011134\U00011180-\U00011181\U000111b6-\U000111be\U000116ab\U000116ad\U000116b0-\U000116b5\U000116b7\U00016f8f-\U00016f92\U0001d167-\U0001d169\U0001d17b-\U0001d182\U0001d185-\U0001d18b\U0001d1aa-\U0001d1ad\U0001d242-\U0001d244\U000e0100-\U000e01ef'
+ Mn += u'\U000101fd\U000102e0\U00010376-\U0001037a\U00010a01-\U00010a03\U00010a05-\U00010a06\U00010a0c-\U00010a0f\U00010a38-\U00010a3a\U00010a3f\U00010ae5-\U00010ae6\U00010d24-\U00010d27\U00010f46-\U00010f50\U00011001\U00011038-\U00011046\U0001107f-\U00011081\U000110b3-\U000110b6\U000110b9-\U000110ba\U00011100-\U00011102\U00011127-\U0001112b\U0001112d-\U00011134\U00011173\U00011180-\U00011181\U000111b6-\U000111be\U000111c9-\U000111cc\U0001122f-\U00011231\U00011234\U00011236-\U00011237\U0001123e\U000112df\U000112e3-\U000112ea\U00011300-\U00011301\U0001133b-\U0001133c\U00011340\U00011366-\U0001136c\U00011370-\U00011374\U00011438-\U0001143f\U00011442-\U00011444\U00011446\U0001145e\U000114b3-\U000114b8\U000114ba\U000114bf-\U000114c0\U000114c2-\U000114c3\U000115b2-\U000115b5\U000115bc-\U000115bd\U000115bf-\U000115c0\U000115dc-\U000115dd\U00011633-\U0001163a\U0001163d\U0001163f-\U00011640\U000116ab\U000116ad\U000116b0-\U000116b5\U000116b7\U0001171d-\U0001171f\U00011722-\U00011725\U00011727-\U0001172b\U0001182f-\U00011837\U00011839-\U0001183a\U00011a01-\U00011a0a\U00011a33-\U00011a38\U00011a3b-\U00011a3e\U00011a47\U00011a51-\U00011a56\U00011a59-\U00011a5b\U00011a8a-\U00011a96\U00011a98-\U00011a99\U00011c30-\U00011c36\U00011c38-\U00011c3d\U00011c3f\U00011c92-\U00011ca7\U00011caa-\U00011cb0\U00011cb2-\U00011cb3\U00011cb5-\U00011cb6\U00011d31-\U00011d36\U00011d3a\U00011d3c-\U00011d3d\U00011d3f-\U00011d45\U00011d47\U00011d90-\U00011d91\U00011d95\U00011d97\U00011ef3-\U00011ef4\U00016af0-\U00016af4\U00016b30-\U00016b36\U00016f8f-\U00016f92\U0001bc9d-\U0001bc9e\U0001d167-\U0001d169\U0001d17b-\U0001d182\U0001d185-\U0001d18b\U0001d1aa-\U0001d1ad\U0001d242-\U0001d244\U0001da00-\U0001da36\U0001da3b-\U0001da6c\U0001da75\U0001da84\U0001da9b-\U0001da9f\U0001daa1-\U0001daaf\U0001e000-\U0001e006\U0001e008-\U0001e018\U0001e01b-\U0001e021\U0001e023-\U0001e024\U0001e026-\U0001e02a\U0001e8d0-\U0001e8d6\U0001e944-\U0001e94a\U000e0100-\U000e01ef'
- Nd += u'\U000104a0-\U000104a9\U00011066-\U0001106f\U000110f0-\U000110f9\U00011136-\U0001113f\U000111d0-\U000111d9\U000116c0-\U000116c9\U0001d7ce-\U0001d7ff'
+ Nd += u'\U000104a0-\U000104a9\U00010d30-\U00010d39\U00011066-\U0001106f\U000110f0-\U000110f9\U00011136-\U0001113f\U000111d0-\U000111d9\U000112f0-\U000112f9\U00011450-\U00011459\U000114d0-\U000114d9\U00011650-\U00011659\U000116c0-\U000116c9\U00011730-\U00011739\U000118e0-\U000118e9\U00011c50-\U00011c59\U00011d50-\U00011d59\U00011da0-\U00011da9\U00016a60-\U00016a69\U00016b50-\U00016b59\U0001d7ce-\U0001d7ff\U0001e950-\U0001e959'
- Nl += u'\U00010140-\U00010174\U00010341\U0001034a\U000103d1-\U000103d5\U00012400-\U00012462'
+ Nl += u'\U00010140-\U00010174\U00010341\U0001034a\U000103d1-\U000103d5\U00012400-\U0001246e'
- No += u'\U00010107-\U00010133\U00010175-\U00010178\U0001018a\U00010320-\U00010323\U00010858-\U0001085f\U00010916-\U0001091b\U00010a40-\U00010a47\U00010a7d-\U00010a7e\U00010b58-\U00010b5f\U00010b78-\U00010b7f\U00010e60-\U00010e7e\U00011052-\U00011065\U0001d360-\U0001d371\U0001f100-\U0001f10a'
+ No += u'\U00010107-\U00010133\U00010175-\U00010178\U0001018a-\U0001018b\U000102e1-\U000102fb\U00010320-\U00010323\U00010858-\U0001085f\U00010879-\U0001087f\U000108a7-\U000108af\U000108fb-\U000108ff\U00010916-\U0001091b\U000109bc-\U000109bd\U000109c0-\U000109cf\U000109d2-\U000109ff\U00010a40-\U00010a48\U00010a7d-\U00010a7e\U00010a9d-\U00010a9f\U00010aeb-\U00010aef\U00010b58-\U00010b5f\U00010b78-\U00010b7f\U00010ba9-\U00010baf\U00010cfa-\U00010cff\U00010e60-\U00010e7e\U00010f1d-\U00010f26\U00010f51-\U00010f54\U00011052-\U00011065\U000111e1-\U000111f4\U0001173a-\U0001173b\U000118ea-\U000118f2\U00011c5a-\U00011c6c\U00016b5b-\U00016b61\U00016e80-\U00016e96\U0001d2e0-\U0001d2f3\U0001d360-\U0001d378\U0001e8c7-\U0001e8cf\U0001ec71-\U0001ecab\U0001ecad-\U0001ecaf\U0001ecb1-\U0001ecb4\U0001f100-\U0001f10c'
- Po += u'\U00010100-\U00010102\U0001039f\U000103d0\U00010857\U0001091f\U0001093f\U00010a50-\U00010a58\U00010a7f\U00010b39-\U00010b3f\U00011047-\U0001104d\U000110bb-\U000110bc\U000110be-\U000110c1\U00011140-\U00011143\U000111c5-\U000111c8\U00012470-\U00012473'
+ Po += u'\U00010100-\U00010102\U0001039f\U000103d0\U0001056f\U00010857\U0001091f\U0001093f\U00010a50-\U00010a58\U00010a7f\U00010af0-\U00010af6\U00010b39-\U00010b3f\U00010b99-\U00010b9c\U00010f55-\U00010f59\U00011047-\U0001104d\U000110bb-\U000110bc\U000110be-\U000110c1\U00011140-\U00011143\U00011174-\U00011175\U000111c5-\U000111c8\U000111cd\U000111db\U000111dd-\U000111df\U00011238-\U0001123d\U000112a9\U0001144b-\U0001144f\U0001145b\U0001145d\U000114c6\U000115c1-\U000115d7\U00011641-\U00011643\U00011660-\U0001166c\U0001173c-\U0001173e\U0001183b\U00011a3f-\U00011a46\U00011a9a-\U00011a9c\U00011a9e-\U00011aa2\U00011c41-\U00011c45\U00011c70-\U00011c71\U00011ef7-\U00011ef8\U00012470-\U00012474\U00016a6e-\U00016a6f\U00016af5\U00016b37-\U00016b3b\U00016b44\U00016e97-\U00016e9a\U0001bc9f\U0001da87-\U0001da8b\U0001e95e-\U0001e95f'
+
+ Sc += u'\U0001ecb0'
+
+ Sk += u'\U0001f3fb-\U0001f3ff'
Sm += u'\U0001d6c1\U0001d6db\U0001d6fb\U0001d715\U0001d735\U0001d74f\U0001d76f\U0001d789\U0001d7a9\U0001d7c3\U0001eef0-\U0001eef1'
- So += u'\U00010137-\U0001013f\U00010179-\U00010189\U00010190-\U0001019b\U000101d0-\U000101fc\U0001d000-\U0001d0f5\U0001d100-\U0001d126\U0001d129-\U0001d164\U0001d16a-\U0001d16c\U0001d183-\U0001d184\U0001d18c-\U0001d1a9\U0001d1ae-\U0001d1dd\U0001d200-\U0001d241\U0001d245\U0001d300-\U0001d356\U0001f000-\U0001f02b\U0001f030-\U0001f093\U0001f0a0-\U0001f0ae\U0001f0b1-\U0001f0be\U0001f0c1-\U0001f0cf\U0001f0d1-\U0001f0df\U0001f110-\U0001f12e\U0001f130-\U0001f16b\U0001f170-\U0001f19a\U0001f1e6-\U0001f202\U0001f210-\U0001f23a\U0001f240-\U0001f248\U0001f250-\U0001f251\U0001f300-\U0001f320\U0001f330-\U0001f335\U0001f337-\U0001f37c\U0001f380-\U0001f393\U0001f3a0-\U0001f3c4\U0001f3c6-\U0001f3ca\U0001f3e0-\U0001f3f0\U0001f400-\U0001f43e\U0001f440\U0001f442-\U0001f4f7\U0001f4f9-\U0001f4fc\U0001f500-\U0001f53d\U0001f540-\U0001f543\U0001f550-\U0001f567\U0001f5fb-\U0001f640\U0001f645-\U0001f64f\U0001f680-\U0001f6c5\U0001f700-\U0001f773'
+ So += u'\U00010137-\U0001013f\U00010179-\U00010189\U0001018c-\U0001018e\U00010190-\U0001019b\U000101a0\U000101d0-\U000101fc\U00010877-\U00010878\U00010ac8\U0001173f\U00016b3c-\U00016b3f\U00016b45\U0001bc9c\U0001d000-\U0001d0f5\U0001d100-\U0001d126\U0001d129-\U0001d164\U0001d16a-\U0001d16c\U0001d183-\U0001d184\U0001d18c-\U0001d1a9\U0001d1ae-\U0001d1e8\U0001d200-\U0001d241\U0001d245\U0001d300-\U0001d356\U0001d800-\U0001d9ff\U0001da37-\U0001da3a\U0001da6d-\U0001da74\U0001da76-\U0001da83\U0001da85-\U0001da86\U0001ecac\U0001f000-\U0001f02b\U0001f030-\U0001f093\U0001f0a0-\U0001f0ae\U0001f0b1-\U0001f0bf\U0001f0c1-\U0001f0cf\U0001f0d1-\U0001f0f5\U0001f110-\U0001f16b\U0001f170-\U0001f1ac\U0001f1e6-\U0001f202\U0001f210-\U0001f23b\U0001f240-\U0001f248\U0001f250-\U0001f251\U0001f260-\U0001f265\U0001f300-\U0001f3fa\U0001f400-\U0001f6d4\U0001f6e0-\U0001f6ec\U0001f6f0-\U0001f6f9\U0001f700-\U0001f773\U0001f780-\U0001f7d8\U0001f800-\U0001f80b\U0001f810-\U0001f847\U0001f850-\U0001f859\U0001f860-\U0001f887\U0001f890-\U0001f8ad\U0001f900-\U0001f90b\U0001f910-\U0001f93e\U0001f940-\U0001f970\U0001f973-\U0001f976\U0001f97a\U0001f97c-\U0001f9a2\U0001f9b0-\U0001f9b9\U0001f9c0-\U0001f9c2\U0001f9d0-\U0001f9ff\U0001fa60-\U0001fa6d'
- xid_continue += u'\U00010000-\U0001000b\U0001000d-\U00010026\U00010028-\U0001003a\U0001003c-\U0001003d\U0001003f-\U0001004d\U00010050-\U0001005d\U00010080-\U000100fa\U00010140-\U00010174\U000101fd\U00010280-\U0001029c\U000102a0-\U000102d0\U00010300-\U0001031e\U00010330-\U0001034a\U00010380-\U0001039d\U000103a0-\U000103c3\U000103c8-\U000103cf\U000103d1-\U000103d5\U00010400-\U0001049d\U000104a0-\U000104a9\U00010800-\U00010805\U00010808\U0001080a-\U00010835\U00010837-\U00010838\U0001083c\U0001083f-\U00010855\U00010900-\U00010915\U00010920-\U00010939\U00010980-\U000109b7\U000109be-\U000109bf\U00010a00-\U00010a03\U00010a05-\U00010a06\U00010a0c-\U00010a13\U00010a15-\U00010a17\U00010a19-\U00010a33\U00010a38-\U00010a3a\U00010a3f\U00010a60-\U00010a7c\U00010b00-\U00010b35\U00010b40-\U00010b55\U00010b60-\U00010b72\U00010c00-\U00010c48\U00011000-\U00011046\U00011066-\U0001106f\U00011080-\U000110ba\U000110d0-\U000110e8\U000110f0-\U000110f9\U00011100-\U00011134\U00011136-\U0001113f\U00011180-\U000111c4\U000111d0-\U000111d9\U00011680-\U000116b7\U000116c0-\U000116c9\U00012000-\U0001236e\U00012400-\U00012462\U00013000-\U0001342e\U00016800-\U00016a38\U00016f00-\U00016f44\U00016f50-\U00016f7e\U00016f8f-\U00016f9f\U0001b000-\U0001b001\U0001d165-\U0001d169\U0001d16d-\U0001d172\U0001d17b-\U0001d182\U0001d185-\U0001d18b\U0001d1aa-\U0001d1ad\U0001d242-\U0001d244\U0001d400-\U0001d454\U0001d456-\U0001d49c\U0001d49e-\U0001d49f\U0001d4a2\U0001d4a5-\U0001d4a6\U0001d4a9-\U0001d4ac\U0001d4ae-\U0001d4b9\U0001d4bb\U0001d4bd-\U0001d4c3\U0001d4c5-\U0001d505\U0001d507-\U0001d50a\U0001d50d-\U0001d514\U0001d516-\U0001d51c\U0001d51e-\U0001d539\U0001d53b-\U0001d53e\U0001d540-\U0001d544\U0001d546\U0001d54a-\U0001d550\U0001d552-\U0001d6a5\U0001d6a8-\U0001d6c0\U0001d6c2-\U0001d6da\U0001d6dc-\U0001d6fa\U0001d6fc-\U0001d714\U0001d716-\U0001d734\U0001d736-\U0001d74e\U0001d750-\U0001d76e\U0001d770-\U0001d788\U0001d78a-\U0001d7a8\U0001d7aa-\U0001d7c2\U0001d7c4-\U0001d7cb\U0001d7ce-\U0001d7ff\U0001ee00-\U0001ee03\U0001ee05-\U0001ee1f\U0001ee21-\U0001ee22\U0001ee24\U0001ee27\U0001ee29-\U0001ee32\U0001ee34-\U0001ee37\U0001ee39\U0001ee3b\U0001ee42\U0001ee47\U0001ee49\U0001ee4b\U0001ee4d-\U0001ee4f\U0001ee51-\U0001ee52\U0001ee54\U0001ee57\U0001ee59\U0001ee5b\U0001ee5d\U0001ee5f\U0001ee61-\U0001ee62\U0001ee64\U0001ee67-\U0001ee6a\U0001ee6c-\U0001ee72\U0001ee74-\U0001ee77\U0001ee79-\U0001ee7c\U0001ee7e\U0001ee80-\U0001ee89\U0001ee8b-\U0001ee9b\U0001eea1-\U0001eea3\U0001eea5-\U0001eea9\U0001eeab-\U0001eebb\U00020000-\U0002a6d6\U0002a700-\U0002b734\U0002b740-\U0002b81d\U0002f800-\U0002fa1d\U000e0100-\U000e01ef'
+ xid_continue += u'\U00010000-\U0001000b\U0001000d-\U00010026\U00010028-\U0001003a\U0001003c-\U0001003d\U0001003f-\U0001004d\U00010050-\U0001005d\U00010080-\U000100fa\U00010140-\U00010174\U000101fd\U00010280-\U0001029c\U000102a0-\U000102d0\U000102e0\U00010300-\U0001031f\U0001032d-\U0001034a\U00010350-\U0001037a\U00010380-\U0001039d\U000103a0-\U000103c3\U000103c8-\U000103cf\U000103d1-\U000103d5\U00010400-\U0001049d\U000104a0-\U000104a9\U000104b0-\U000104d3\U000104d8-\U000104fb\U00010500-\U00010527\U00010530-\U00010563\U00010600-\U00010736\U00010740-\U00010755\U00010760-\U00010767\U00010800-\U00010805\U00010808\U0001080a-\U00010835\U00010837-\U00010838\U0001083c\U0001083f-\U00010855\U00010860-\U00010876\U00010880-\U0001089e\U000108e0-\U000108f2\U000108f4-\U000108f5\U00010900-\U00010915\U00010920-\U00010939\U00010980-\U000109b7\U000109be-\U000109bf\U00010a00-\U00010a03\U00010a05-\U00010a06\U00010a0c-\U00010a13\U00010a15-\U00010a17\U00010a19-\U00010a35\U00010a38-\U00010a3a\U00010a3f\U00010a60-\U00010a7c\U00010a80-\U00010a9c\U00010ac0-\U00010ac7\U00010ac9-\U00010ae6\U00010b00-\U00010b35\U00010b40-\U00010b55\U00010b60-\U00010b72\U00010b80-\U00010b91\U00010c00-\U00010c48\U00010c80-\U00010cb2\U00010cc0-\U00010cf2\U00010d00-\U00010d27\U00010d30-\U00010d39\U00010f00-\U00010f1c\U00010f27\U00010f30-\U00010f50\U00011000-\U00011046\U00011066-\U0001106f\U0001107f-\U000110ba\U000110d0-\U000110e8\U000110f0-\U000110f9\U00011100-\U00011134\U00011136-\U0001113f\U00011144-\U00011146\U00011150-\U00011173\U00011176\U00011180-\U000111c4\U000111c9-\U000111cc\U000111d0-\U000111da\U000111dc\U00011200-\U00011211\U00011213-\U00011237\U0001123e\U00011280-\U00011286\U00011288\U0001128a-\U0001128d\U0001128f-\U0001129d\U0001129f-\U000112a8\U000112b0-\U000112ea\U000112f0-\U000112f9\U00011300-\U00011303\U00011305-\U0001130c\U0001130f-\U00011310\U00011313-\U00011328\U0001132a-\U00011330\U00011332-\U00011333\U00011335-\U00011339\U0001133b-\U00011344\U00011347-\U00011348\U0001134b-\U0001134d\U00011350\U00011357\U0001135d-\U00011363\U00011366-\U0001136c\U00011370-\U00011374\U00011400-\U0001144a\U00011450-\U00011459\U0001145e\U00011480-\U000114c5\U000114c7\U000114d0-\U000114d9\U00011580-\U000115b5\U000115b8-\U000115c0\U000115d8-\U000115dd\U00011600-\U00011640\U00011644\U00011650-\U00011659\U00011680-\U000116b7\U000116c0-\U000116c9\U00011700-\U0001171a\U0001171d-\U0001172b\U00011730-\U00011739\U00011800-\U0001183a\U000118a0-\U000118e9\U000118ff\U00011a00-\U00011a3e\U00011a47\U00011a50-\U00011a83\U00011a86-\U00011a99\U00011a9d\U00011ac0-\U00011af8\U00011c00-\U00011c08\U00011c0a-\U00011c36\U00011c38-\U00011c40\U00011c50-\U00011c59\U00011c72-\U00011c8f\U00011c92-\U00011ca7\U00011ca9-\U00011cb6\U00011d00-\U00011d06\U00011d08-\U00011d09\U00011d0b-\U00011d36\U00011d3a\U00011d3c-\U00011d3d\U00011d3f-\U00011d47\U00011d50-\U00011d59\U00011d60-\U00011d65\U00011d67-\U00011d68\U00011d6a-\U00011d8e\U00011d90-\U00011d91\U00011d93-\U00011d98\U00011da0-\U00011da9\U00011ee0-\U00011ef6\U00012000-\U00012399\U00012400-\U0001246e\U00012480-\U00012543\U00013000-\U0001342e\U00014400-\U00014646\U00016800-\U00016a38\U00016a40-\U00016a5e\U00016a60-\U00016a69\U00016ad0-\U00016aed\U00016af0-\U00016af4\U00016b00-\U00016b36\U00016b40-\U00016b43\U00016b50-\U00016b59\U00016b63-\U00016b77\U00016b7d-\U00016b8f\U00016e40-\U00016e7f\U00016f00-\U00016f44\U00016f50-\U00016f7e\U00016f8f-\U00016f9f\U00016fe0-\U00016fe1\U00017000-\U000187f1\U00018800-\U00018af2\U0001b000-\U0001b11e\U0001b170-\U0001b2fb\U0001bc00-\U0001bc6a\U0001bc70-\U0001bc7c\U0001bc80-\U0001bc88\U0001bc90-\U0001bc99\U0001bc9d-\U0001bc9e\U0001d165-\U0001d169\U0001d16d-\U0001d172\U0001d17b-\U0001d182\U0001d185-\U0001d18b\U0001d1aa-\U0001d1ad\U0001d242-\U0001d244\U0001d400-\U0001d454\U0001d456-\U0001d49c\U0001d49e-\U0001d49f\U0001d4a2\U0001d4a5-\U0001d4a6\U0001d4a9-\U0001d4ac\U0001d4ae-\U0001d4b9\U0001d4bb\U0001d4bd-\U0001d4c3\U0001d4c5-\U0001d505\U0001d507-\U0001d50a\U0001d50d-\U0001d514\U0001d516-\U0001d51c\U0001d51e-\U0001d539\U0001d53b-\U0001d53e\U0001d540-\U0001d544\U0001d546\U0001d54a-\U0001d550\U0001d552-\U0001d6a5\U0001d6a8-\U0001d6c0\U0001d6c2-\U0001d6da\U0001d6dc-\U0001d6fa\U0001d6fc-\U0001d714\U0001d716-\U0001d734\U0001d736-\U0001d74e\U0001d750-\U0001d76e\U0001d770-\U0001d788\U0001d78a-\U0001d7a8\U0001d7aa-\U0001d7c2\U0001d7c4-\U0001d7cb\U0001d7ce-\U0001d7ff\U0001da00-\U0001da36\U0001da3b-\U0001da6c\U0001da75\U0001da84\U0001da9b-\U0001da9f\U0001daa1-\U0001daaf\U0001e000-\U0001e006\U0001e008-\U0001e018\U0001e01b-\U0001e021\U0001e023-\U0001e024\U0001e026-\U0001e02a\U0001e800-\U0001e8c4\U0001e8d0-\U0001e8d6\U0001e900-\U0001e94a\U0001e950-\U0001e959\U0001ee00-\U0001ee03\U0001ee05-\U0001ee1f\U0001ee21-\U0001ee22\U0001ee24\U0001ee27\U0001ee29-\U0001ee32\U0001ee34-\U0001ee37\U0001ee39\U0001ee3b\U0001ee42\U0001ee47\U0001ee49\U0001ee4b\U0001ee4d-\U0001ee4f\U0001ee51-\U0001ee52\U0001ee54\U0001ee57\U0001ee59\U0001ee5b\U0001ee5d\U0001ee5f\U0001ee61-\U0001ee62\U0001ee64\U0001ee67-\U0001ee6a\U0001ee6c-\U0001ee72\U0001ee74-\U0001ee77\U0001ee79-\U0001ee7c\U0001ee7e\U0001ee80-\U0001ee89\U0001ee8b-\U0001ee9b\U0001eea1-\U0001eea3\U0001eea5-\U0001eea9\U0001eeab-\U0001eebb\U00020000-\U0002a6d6\U0002a700-\U0002b734\U0002b740-\U0002b81d\U0002b820-\U0002cea1\U0002ceb0-\U0002ebe0\U0002f800-\U0002fa1d\U000e0100-\U000e01ef'
- xid_start += u'\U00010000-\U0001000b\U0001000d-\U00010026\U00010028-\U0001003a\U0001003c-\U0001003d\U0001003f-\U0001004d\U00010050-\U0001005d\U00010080-\U000100fa\U00010140-\U00010174\U00010280-\U0001029c\U000102a0-\U000102d0\U00010300-\U0001031e\U00010330-\U0001034a\U00010380-\U0001039d\U000103a0-\U000103c3\U000103c8-\U000103cf\U000103d1-\U000103d5\U00010400-\U0001049d\U00010800-\U00010805\U00010808\U0001080a-\U00010835\U00010837-\U00010838\U0001083c\U0001083f-\U00010855\U00010900-\U00010915\U00010920-\U00010939\U00010980-\U000109b7\U000109be-\U000109bf\U00010a00\U00010a10-\U00010a13\U00010a15-\U00010a17\U00010a19-\U00010a33\U00010a60-\U00010a7c\U00010b00-\U00010b35\U00010b40-\U00010b55\U00010b60-\U00010b72\U00010c00-\U00010c48\U00011003-\U00011037\U00011083-\U000110af\U000110d0-\U000110e8\U00011103-\U00011126\U00011183-\U000111b2\U000111c1-\U000111c4\U00011680-\U000116aa\U00012000-\U0001236e\U00012400-\U00012462\U00013000-\U0001342e\U00016800-\U00016a38\U00016f00-\U00016f44\U00016f50\U00016f93-\U00016f9f\U0001b000-\U0001b001\U0001d400-\U0001d454\U0001d456-\U0001d49c\U0001d49e-\U0001d49f\U0001d4a2\U0001d4a5-\U0001d4a6\U0001d4a9-\U0001d4ac\U0001d4ae-\U0001d4b9\U0001d4bb\U0001d4bd-\U0001d4c3\U0001d4c5-\U0001d505\U0001d507-\U0001d50a\U0001d50d-\U0001d514\U0001d516-\U0001d51c\U0001d51e-\U0001d539\U0001d53b-\U0001d53e\U0001d540-\U0001d544\U0001d546\U0001d54a-\U0001d550\U0001d552-\U0001d6a5\U0001d6a8-\U0001d6c0\U0001d6c2-\U0001d6da\U0001d6dc-\U0001d6fa\U0001d6fc-\U0001d714\U0001d716-\U0001d734\U0001d736-\U0001d74e\U0001d750-\U0001d76e\U0001d770-\U0001d788\U0001d78a-\U0001d7a8\U0001d7aa-\U0001d7c2\U0001d7c4-\U0001d7cb\U0001ee00-\U0001ee03\U0001ee05-\U0001ee1f\U0001ee21-\U0001ee22\U0001ee24\U0001ee27\U0001ee29-\U0001ee32\U0001ee34-\U0001ee37\U0001ee39\U0001ee3b\U0001ee42\U0001ee47\U0001ee49\U0001ee4b\U0001ee4d-\U0001ee4f\U0001ee51-\U0001ee52\U0001ee54\U0001ee57\U0001ee59\U0001ee5b\U0001ee5d\U0001ee5f\U0001ee61-\U0001ee62\U0001ee64\U0001ee67-\U0001ee6a\U0001ee6c-\U0001ee72\U0001ee74-\U0001ee77\U0001ee79-\U0001ee7c\U0001ee7e\U0001ee80-\U0001ee89\U0001ee8b-\U0001ee9b\U0001eea1-\U0001eea3\U0001eea5-\U0001eea9\U0001eeab-\U0001eebb\U00020000-\U0002a6d6\U0002a700-\U0002b734\U0002b740-\U0002b81d\U0002f800-\U0002fa1d'
+ xid_start += u'\U00010000-\U0001000b\U0001000d-\U00010026\U00010028-\U0001003a\U0001003c-\U0001003d\U0001003f-\U0001004d\U00010050-\U0001005d\U00010080-\U000100fa\U00010140-\U00010174\U00010280-\U0001029c\U000102a0-\U000102d0\U00010300-\U0001031f\U0001032d-\U0001034a\U00010350-\U00010375\U00010380-\U0001039d\U000103a0-\U000103c3\U000103c8-\U000103cf\U000103d1-\U000103d5\U00010400-\U0001049d\U000104b0-\U000104d3\U000104d8-\U000104fb\U00010500-\U00010527\U00010530-\U00010563\U00010600-\U00010736\U00010740-\U00010755\U00010760-\U00010767\U00010800-\U00010805\U00010808\U0001080a-\U00010835\U00010837-\U00010838\U0001083c\U0001083f-\U00010855\U00010860-\U00010876\U00010880-\U0001089e\U000108e0-\U000108f2\U000108f4-\U000108f5\U00010900-\U00010915\U00010920-\U00010939\U00010980-\U000109b7\U000109be-\U000109bf\U00010a00\U00010a10-\U00010a13\U00010a15-\U00010a17\U00010a19-\U00010a35\U00010a60-\U00010a7c\U00010a80-\U00010a9c\U00010ac0-\U00010ac7\U00010ac9-\U00010ae4\U00010b00-\U00010b35\U00010b40-\U00010b55\U00010b60-\U00010b72\U00010b80-\U00010b91\U00010c00-\U00010c48\U00010c80-\U00010cb2\U00010cc0-\U00010cf2\U00010d00-\U00010d23\U00010f00-\U00010f1c\U00010f27\U00010f30-\U00010f45\U00011003-\U00011037\U00011083-\U000110af\U000110d0-\U000110e8\U00011103-\U00011126\U00011144\U00011150-\U00011172\U00011176\U00011183-\U000111b2\U000111c1-\U000111c4\U000111da\U000111dc\U00011200-\U00011211\U00011213-\U0001122b\U00011280-\U00011286\U00011288\U0001128a-\U0001128d\U0001128f-\U0001129d\U0001129f-\U000112a8\U000112b0-\U000112de\U00011305-\U0001130c\U0001130f-\U00011310\U00011313-\U00011328\U0001132a-\U00011330\U00011332-\U00011333\U00011335-\U00011339\U0001133d\U00011350\U0001135d-\U00011361\U00011400-\U00011434\U00011447-\U0001144a\U00011480-\U000114af\U000114c4-\U000114c5\U000114c7\U00011580-\U000115ae\U000115d8-\U000115db\U00011600-\U0001162f\U00011644\U00011680-\U000116aa\U00011700-\U0001171a\U00011800-\U0001182b\U000118a0-\U000118df\U000118ff\U00011a00\U00011a0b-\U00011a32\U00011a3a\U00011a50\U00011a5c-\U00011a83\U00011a86-\U00011a89\U00011a9d\U00011ac0-\U00011af8\U00011c00-\U00011c08\U00011c0a-\U00011c2e\U00011c40\U00011c72-\U00011c8f\U00011d00-\U00011d06\U00011d08-\U00011d09\U00011d0b-\U00011d30\U00011d46\U00011d60-\U00011d65\U00011d67-\U00011d68\U00011d6a-\U00011d89\U00011d98\U00011ee0-\U00011ef2\U00012000-\U00012399\U00012400-\U0001246e\U00012480-\U00012543\U00013000-\U0001342e\U00014400-\U00014646\U00016800-\U00016a38\U00016a40-\U00016a5e\U00016ad0-\U00016aed\U00016b00-\U00016b2f\U00016b40-\U00016b43\U00016b63-\U00016b77\U00016b7d-\U00016b8f\U00016e40-\U00016e7f\U00016f00-\U00016f44\U00016f50\U00016f93-\U00016f9f\U00016fe0-\U00016fe1\U00017000-\U000187f1\U00018800-\U00018af2\U0001b000-\U0001b11e\U0001b170-\U0001b2fb\U0001bc00-\U0001bc6a\U0001bc70-\U0001bc7c\U0001bc80-\U0001bc88\U0001bc90-\U0001bc99\U0001d400-\U0001d454\U0001d456-\U0001d49c\U0001d49e-\U0001d49f\U0001d4a2\U0001d4a5-\U0001d4a6\U0001d4a9-\U0001d4ac\U0001d4ae-\U0001d4b9\U0001d4bb\U0001d4bd-\U0001d4c3\U0001d4c5-\U0001d505\U0001d507-\U0001d50a\U0001d50d-\U0001d514\U0001d516-\U0001d51c\U0001d51e-\U0001d539\U0001d53b-\U0001d53e\U0001d540-\U0001d544\U0001d546\U0001d54a-\U0001d550\U0001d552-\U0001d6a5\U0001d6a8-\U0001d6c0\U0001d6c2-\U0001d6da\U0001d6dc-\U0001d6fa\U0001d6fc-\U0001d714\U0001d716-\U0001d734\U0001d736-\U0001d74e\U0001d750-\U0001d76e\U0001d770-\U0001d788\U0001d78a-\U0001d7a8\U0001d7aa-\U0001d7c2\U0001d7c4-\U0001d7cb\U0001e800-\U0001e8c4\U0001e900-\U0001e943\U0001ee00-\U0001ee03\U0001ee05-\U0001ee1f\U0001ee21-\U0001ee22\U0001ee24\U0001ee27\U0001ee29-\U0001ee32\U0001ee34-\U0001ee37\U0001ee39\U0001ee3b\U0001ee42\U0001ee47\U0001ee49\U0001ee4b\U0001ee4d-\U0001ee4f\U0001ee51-\U0001ee52\U0001ee54\U0001ee57\U0001ee59\U0001ee5b\U0001ee5d\U0001ee5f\U0001ee61-\U0001ee62\U0001ee64\U0001ee67-\U0001ee6a\U0001ee6c-\U0001ee72\U0001ee74-\U0001ee77\U0001ee79-\U0001ee7c\U0001ee7e\U0001ee80-\U0001ee89\U0001ee8b-\U0001ee9b\U0001eea1-\U0001eea3\U0001eea5-\U0001eea9\U0001eeab-\U0001eebb\U00020000-\U0002a6d6\U0002a700-\U0002b734\U0002b740-\U0002b81d\U0002b820-\U0002cea1\U0002ceb0-\U0002ebe0\U0002f800-\U0002fa1d'
cats = ['Cc', 'Cf', 'Cn', 'Co', 'Cs', 'Ll', 'Lm', 'Lo', 'Lt', 'Lu', 'Mc', 'Me', 'Mn', 'Nd', 'Nl', 'No', 'Pc', 'Pd', 'Pe', 'Pf', 'Pi', 'Po', 'Ps', 'Sc', 'Sk', 'Sm', 'So', 'Zl', 'Zp', 'Zs']
-# Generated from unidata 6.3.0
+# Generated from unidata 11.0.0
def combine(*args):
return u''.join(globals()[cat] for cat in args)
diff --git a/scripts/check_sources.py b/scripts/check_sources.py
index db09de42..c0524b6c 100755
--- a/scripts/check_sources.py
+++ b/scripts/check_sources.py
@@ -185,7 +185,8 @@ def main(argv):
print("Checking %s..." % fn)
try:
- lines = open(fn, 'rb').read().decode('utf-8').splitlines()
+ with open(fn, 'rb') as f:
+ lines = f.read().decode('utf-8').splitlines()
except (IOError, OSError) as err:
print("%s: cannot open: %s" % (fn, err))
num += 1
diff --git a/setup.py b/setup.py
index 7e6eca8c..52889227 100755
--- a/setup.py
+++ b/setup.py
@@ -48,7 +48,7 @@ else:
setup(
name = 'Pygments',
- version = '2.3.0',
+ version = '2.3.1',
url = 'http://pygments.org/',
license = 'BSD License',
author = 'Georg Brandl',
@@ -60,6 +60,7 @@ setup(
platforms = 'any',
zip_safe = False,
include_package_data = True,
+ python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
classifiers = [
'License :: OSI Approved :: BSD License',
'Intended Audience :: Developers',
@@ -68,7 +69,11 @@ setup(
'Development Status :: 6 - Mature',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
+ 'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 3.5',
+ 'Programming Language :: Python :: 3.6',
+ 'Programming Language :: Python :: 3.7',
'Operating System :: OS Independent',
'Topic :: Text Processing :: Filters',
'Topic :: Utilities',
diff --git a/tests/examplefiles/99_bottles_of_beer.chpl b/tests/examplefiles/99_bottles_of_beer.chpl
index cdc1e650..ff50b294 100644
--- a/tests/examplefiles/99_bottles_of_beer.chpl
+++ b/tests/examplefiles/99_bottles_of_beer.chpl
@@ -177,3 +177,30 @@ private module M3 {
private var x: int;
}
+prototype module X {
+
+ proc f() throws {
+ throw new Error();
+ }
+
+ proc g() {
+ try {
+ f();
+ try! f();
+ } catch e {
+ writeln("Caught ", e);
+ }
+ }
+
+ proc int.add() { }
+
+ g();
+
+ override proc test() throws {
+ var a = new borrowed IntPair();
+ var b = new owned IntPair();
+ var c = new shared IntPair();
+ throw new unmanaged Error();
+ }
+}
+
diff --git a/tests/examplefiles/Charmci.ci b/tests/examplefiles/Charmci.ci
new file mode 100644
index 00000000..2e5cd5c6
--- /dev/null
+++ b/tests/examplefiles/Charmci.ci
@@ -0,0 +1,20 @@
+module CkCallback {
+ readonly CProxy_ckcallback_group _ckcallbackgroup;
+ message CkCcsRequestMsg {
+ char data[];
+ };
+ message CkDataMsg {
+ char data[];
+ };
+
+ mainchare ckcallback_main {
+ entry ckcallback_main(CkArgMsg *m);
+ };
+ group [migratable] ckcallback_group : IrrGroup {
+ entry ckcallback_group();
+ entry void registerCcsCallback(char name[strlen(name)+1],
+ CkCallback cb);
+ entry void call(CkCallback c,CkMarshalledMessage msg);
+ entry void call(CkCallback c, int length, char data[length]);
+ };
+};
diff --git a/tests/examplefiles/apache2.conf b/tests/examplefiles/apache2.conf
index d0e838e0..5db66b10 100644
--- a/tests/examplefiles/apache2.conf
+++ b/tests/examplefiles/apache2.conf
@@ -391,3 +391,8 @@ BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/[^.#]*
+
+# From PR#766
+<IfVersion >= 2.4>
+ErrorLogFormat "%{cu}t %M"
+</IfVersion> \ No newline at end of file
diff --git a/tests/examplefiles/example.bbc b/tests/examplefiles/example.bbc
new file mode 100644
index 00000000..ebdb8537
--- /dev/null
+++ b/tests/examplefiles/example.bbc
@@ -0,0 +1,156 @@
+10REM >EIRC
+20REM The simplest IRC client you can write. Maybe.
+30REM (C) Justin Fletcher, 1998
+40:
+50END=PAGE+1024*16
+60REM Change these if you wish
+70host$="irc.stealth.net"
+80port=6667
+90nick$="eirc"
+100ourchan$="#acorn"
+110:
+120REM Start connecting to a host
+130SYS "ESocket_ConnectToHost",host$,port TO handle
+140REPEAT
+150 SYS "ESocket_CheckState",handle TO state
+160 IF state<-1 THENSYS "ESocket_Forget",handle:SYS "ESocket_DecodeState",state TO a$:ERROR 1,"Failed ("+a$+")"
+170UNTIL state=4
+180:
+190REM We are now connected
+200PRINT"Connected"
+210:
+220REM Log on to the server
+230SYS "ESocket_SendLine",handle,"USER "+nick$+" x x :"+nick$
+240SYS "ESocket_SendLine",handle,"NICK "+nick$
+250SYS "ESocket_SendLine",handle,"JOIN "+ourchan$
+260REM Install a monitor so that we don't waste time
+270SYS "ESocket_Monitor",0,handle TO monitor
+280SYS "ESocket_ResetMonitor",monitor,0 TO polladdr%
+290:
+300REM If we crash, we should tidy up after ourselves
+310ON ERROR SYS "XESocket_Forget",handle:SYS "XESocket_Forget",monitor:ERROR EXT ERR,REPORT$+" at line "+STR$ERL
+320:
+330REM Memory buffer for our data
+340bufsize%=1024
+350DIM buf% bufsize%
+360:
+370input$="":REM The input line
+380REPEAT
+390 REM In a taskwindow we should yield until there is data
+400 SYS "OS_UpCall",6,polladdr%
+410 IF !polladdr%<>0 THEN
+420 REM Reset the monitor for the time being
+430 SYS "ESocket_ResetMonitor",monitor,0 TO polladdr%
+440 REPEAT
+450 REM Read lines from the connection until this buffer is empty
+460 SYS "ESocket_ReadLine",handle,buf%,bufsize%,%100 TO ,str,len
+470 IF str<>0 AND $str<>"" THEN
+480 line$=$str
+490 IF LEFT$(line$,4)="PING" THEN
+500 REM Ping's must be replied to immediately
+510 SYS "ESocket_SendLine",handle,"PONG "+MID$(line$,6)
+520 ELSE
+530 REM Extract source info
+540 from$=MID$(LEFT$(line$,INSTR(line$+" "," ")-1),2)
+550 line$=MID$(line$,INSTR(line$+" "," ")+1)
+560 uid$=LEFT$(from$,INSTR(from$+"!","!")-1)
+570 com$=LEFT$(line$,INSTR(line$+" "," ")-1)
+580 line$=MID$(line$,INSTR(line$+" "," ")+1)
+590 REM remove the input line
+600 IF input$<>"" THENFORI=1TOLEN(input$):VDU127:NEXT
+610 CASE FNupper(com$) OF
+620 WHEN "PRIVMSG"
+630 REM Extract the destination
+640 chan$=LEFT$(line$,INSTR(line$+" "," ")-1)
+650 line$=MID$(line$,INSTR(line$+" "," ")+2):REM Skip :
+660 IF LEFT$(line$,1)=CHR$1 THEN
+670 REM CTCP, so respond to it
+680 line$=MID$(line$,2,LEN(line$)-2)
+690 com$=LEFT$(line$,INSTR(line$+" "," ")-1)
+700 line$=MID$(line$,INSTR(line$+" "," ")+1)
+710 CASE FNupper(com$) OF
+720 WHEN "PING"
+730 REM Ping lag timing
+740 line$="PONG "+line$
+750 PRINTuid$;" pinged us"
+760 WHEN "VERSION"
+770 REM Version checking
+780 line$="VERSION EIRC 1.00 (c) Justin Fletcher"
+790 PRINTuid$;" wanted our version"
+800 WHEN "ACTION"
+810 PRINT"* ";uid$;" ";line$
+820 line$=""
+830 OTHERWISE
+840 REM everything else is an error
+850 line$="ERRMSG "+com$+" not understood"
+860 PRINT"CTCP '";com$;"' from ";uid$;" (";line$;")"
+870 ENDCASE
+880 IF line$<>"" THEN
+890 SYS "ESocket_SendLine",handle,"NOTICE "+uid$+" :"+CHR$1+line$+CHR$1
+900 ENDIF
+910 ELSE
+920 REM Somebody said something...
+930 PRINT"<";uid$;"> ";FNsafe(line$)
+940 ENDIF
+950 WHEN "JOIN"
+960 REM We (or someone else) has joined the channel
+970 chan$=LEFT$(line$,INSTR(line$+" "," ")):REM Skip :
+980 IF LEFT$(chan$,1)=":" THENchan$=MID$(chan$,2)
+990 PRINTuid$;" has joined ";chan$
+1000 WHEN "PART"
+1010 REM Someone else has left the channel
+1020 chan$=LEFT$(line$,INSTR(line$+" "," ")-1)
+1030 IF LEFT$(chan$,1)=":" THENchan$=MID$(chan$,2)
+1040 PRINTuid$;" has left ";chan$
+1050 WHEN "QUIT"
+1060 REM Someone else has quit IRC
+1070 PRINTuid$;" quit IRC"
+1080 OTHERWISE
+1090 REM Some unknown command
+1100 PRINTuid$;":";com$;":";FNsafe(line$)
+1110 ENDCASE
+1120 REM Re-display our input line
+1130 PRINTinput$;
+1140 ENDIF
+1150 ENDIF
+1160 UNTIL str=0
+1170 ENDIF
+1180 b$=INKEY$(0)
+1190 IF b$<>"" THEN
+1200 CASE b$ OF
+1210 WHEN CHR$13
+1220 SYS "ESocket_SendLine",handle,"PRIVMSG "+ourchan$+" :"+input$
+1230 REM Remove the line
+1240 IF input$<>"" THENFORI=1TOLEN(input$):VDU127:NEXT
+1250 REM We said it...
+1260 PRINT"<"+nick$+"> ";input$
+1270 input$=""
+1280 WHEN CHR$127,CHR$8
+1290 REM Backspace
+1300 IF input$<>"" THENVDU127
+1310 input$=LEFT$(input$)
+1320 OTHERWISE
+1330 REM Ad to current input
+1340 input$+=b$
+1350 PRINTb$;
+1360 ENDCASE
+1370 ENDIF
+1380 REM Has the socket closed
+1390 SYS "ESocket_Closed",handle,%0 TO closed
+1400UNTIL closed
+1410SYS "ESocket_Forget",handle
+1420SYS "ESocket_Forget",monitor
+1430END
+1440:
+1450DEFFNupper(a$):LOCAL c$,b$,I
+1460FORI=1TOLEN(a$)
+1470c$=MID$(a$,I,1):IF c$>="a"ANDc$<="z"THENc$=CHR$(ASC(c$)-32)
+1480b$+=c$:NEXT:=b$
+1490
+1500REM Remove control codes
+1510DEFFNsafe(line$)
+1520LOCAL I
+1530FORI=1TOLEN(line$)
+1540 IF MID$(line$,I,1)<" " THENMID$(line$,I,1)="*"
+1550NEXT
+1560=line$
diff --git a/tests/examplefiles/example.boa b/tests/examplefiles/example.boa
new file mode 100644
index 00000000..a18f1626
--- /dev/null
+++ b/tests/examplefiles/example.boa
@@ -0,0 +1,18 @@
+# Computes Number of Public Methods (NPM) for each project, per-type
+# Output is: NPM[ProjectID][TypeName] = NPM value
+p: Project = input;
+NPM: output sum[string][string] of int;
+
+visit(p, visitor {
+ # only look at the latest snapshot
+ before n: CodeRepository -> {
+ snapshot := getsnapshot(n);
+ foreach (i: int; def(snapshot[i]))
+ visit(snapshot[i]);
+ stop;
+ }
+ before node: Declaration ->
+ if (node.kind == TypeKind.CLASS)
+ foreach (i: int; has_modifier_public(node.methods[i]))
+ NPM[p.id][node.name] << 1;
+});
diff --git a/tests/examplefiles/example.flo b/tests/examplefiles/example.flo
new file mode 100644
index 00000000..2d4ab5e7
--- /dev/null
+++ b/tests/examplefiles/example.flo
@@ -0,0 +1,40 @@
+#example mission box1.flo
+#from: https://github.com/ioflo/ioflo
+
+house box1
+
+ framer vehiclesim be active first vehicle_run
+ frame vehicle_run
+ do simulator motion uuv
+
+ framer mission be active first northleg
+ frame northleg
+ set elapsed with 20.0
+ set heading with 0.0
+ set depth with 5.0
+ set speed with 2.5
+ go next if elapsed >= goal
+
+ frame eastleg
+ set heading with 90.0
+ go next if elapsed >= goal
+
+ frame southleg
+ set heading with 180.0
+ go next if elapsed >= goal
+
+ frame westleg
+ set heading with 270.0
+ go next if elapsed >= goal
+
+ frame mission_stop
+ bid stop vehiclesim
+ bid stop autopilot
+ bid stop me
+
+ framer autopilot be active first autopilot_run
+ frame autopilot_run
+ do controller pid speed
+ do controller pid heading
+ do controller pid depth
+ do controller pid pitch \ No newline at end of file
diff --git a/tests/examplefiles/example.icn b/tests/examplefiles/example.icn
new file mode 100644
index 00000000..c8fcf335
--- /dev/null
+++ b/tests/examplefiles/example.icn
@@ -0,0 +1,283 @@
+#
+# $Id: button.icn,v 1.7 2006-07-09 23:43:07 rparlett Exp $
+#
+# This file is in the public domain.
+#
+# Author: Robert Parlett (parlett@dial.pipex.com)
+#
+
+package gui
+link graphics
+
+$include "guih.icn"
+
+
+#
+# This is the parent class of the button classes, including
+# checkboxes.
+#
+# A {Button} produces a BUTTON_PRESS_EVENT when the button is
+# depressed, and code BUTTON_RELEASE_EVENT when it is released,
+# as well as an ACTION_EVENT.
+#
+# By default, when a button holds the keyboard focus a dashed
+# line appears just within the button. Then, when return is
+# pressed an ACTION_EVENT is generated. The method
+# {Dialog.set_initial_focus()} can be used to have the button
+# have the focus when the dialog is first displayed.
+#
+# Buttons also repeatedly produce a BUTTON_HELD_EVENT whilst they
+# are held down, rather like a repeating keyboard press. The
+# delay between the initial repeat event and subsequent repeat
+# events is set in the parent dialog (see above).
+#
+class Button : Toggle : Component(
+ is_down, #
+ is_held, #
+ is_checked_flag, #
+ label,
+ img_up, #
+ img_down, #
+ img_w, #
+ img_h, #
+ parent_check_box_group, #
+ parent_button_group, #
+ repeat_delay,
+ no_keyboard_flag, #
+ toggles_flag
+ )
+
+ method set_parent_button_group(x)
+ return self.parent_button_group := x
+ end
+
+ #
+ # Invoking this method disables the keyboard control over the
+ # button described above. No dashed line will ever appear in
+ # the button display and return will have no effect on the
+ # button even if it has the focus.
+ #
+ method set_no_keyboard()
+ self.no_keyboard_flag := 1
+ self.accepts_focus_flag := &null
+ end
+
+ #
+ # Clear the no keyboard behaviour (the default)
+ #
+ method clear_no_keyboard()
+ self.no_keyboard_flag := &null
+ self.accepts_focus_flag := 1
+ end
+
+ method tick()
+ if dispatcher.curr_time_of_day() > self.repeat_delay then
+ fire(BUTTON_HELD_EVENT)
+ end
+
+ method go_down()
+ self.is_down := 1
+ set_ticker(self.parent_dialog.repeat_rate)
+ end
+
+ method go_up()
+ self.is_down := &null
+ stop_ticker()
+ end
+
+ method handle_press(e)
+ local b
+ if self.in_region() then {
+ go_down()
+ self.repeat_delay := dispatcher.curr_time_of_day() + self.parent_dialog.repeat_delay
+ self.is_held := 1
+ every b := !(\self.parent_button_group).buttons do {
+ if b.is_unhidden() then {
+ b.is_held := 1
+ b.repeat_delay := self.repeat_delay
+ }
+ }
+ self.invalidate()
+ fire(BUTTON_PRESS_EVENT, e)
+ }
+ end
+
+ method handle_drag(e)
+ if \self.is_held then {
+ #
+ # Button held down; toggle on/off as it goes over the button
+ #
+ if self.in_region() then {
+ if /self.is_down then {
+ go_down()
+ invalidate()
+ }
+ } else {
+ if \self.is_down then {
+ go_up()
+ invalidate()
+ }
+ }
+ }
+ end
+
+ method handle_release(e)
+ if \self.is_held then {
+ self.is_held := &null
+ if \self.is_down then {
+ go_up()
+ fire(BUTTON_RELEASE_EVENT, e)
+ on_action(e)
+ }
+ }
+ end
+
+ method on_action(e)
+ if \self.toggles_flag then {
+ if \self.parent_check_box_group then
+ self.parent_check_box_group.set_which_one(self)
+ else
+ self.toggle_is_checked()
+ }
+ self.invalidate()
+ fire(ACTION_EVENT, e)
+ end
+
+ method handle_accel(e)
+ self.Component.handle_accel(e)
+ on_action(e)
+ end
+
+ method handle_default(e)
+ if \self.has_focus then {
+ if /self.no_keyboard_flag & e == ("\r" | "\l" | " ") then {
+ on_action(e)
+ }
+ }
+ end
+
+ method handle_event(e)
+ if e === (&lpress | &rpress | &mpress) then {
+ handle_press(e)
+ } else if e === (&ldrag | &rdrag | &mdrag) then {
+ handle_drag(e)
+ } else if e === (&lrelease | &rrelease | &mrelease) then {
+ handle_release(e)
+ } else
+ handle_default(e)
+ end
+
+ #
+ # Set the up/down images (if any) to the strings provided,
+ # which should be in Icon image format.
+ # The two images must have the same dimensions.
+ # @param x The up image
+ # @param y The down image
+ #
+ method set_imgs(x, y)
+ self.img_up := x
+ self.img_w := img_width(x) = img_width(y) | fatal("Image widths differ")
+ self.img_h := img_height(x) = img_height(y) | fatal("Image heights differ")
+
+ self.img_down := y
+
+ return
+ end
+
+ #
+ # Set the image (if any) to the given string, which should be in Icon image
+ # format.
+ # @param x The image
+ #
+ method set_img(x)
+ self.img_up := self.img_down := x
+ self.img_w := img_width(x)
+ self.img_h := img_height(x)
+ return x
+ end
+
+ #
+ # Toggle the checked status of the button. This method, and
+ # the following two methods, may be
+ # inappropriate for non-toggle styles of button.
+ #
+ method toggle_is_checked()
+ self.Toggle.toggle_is_checked()
+ self.invalidate()
+ end
+
+ #
+ # Set the status to checked.
+ #
+ method set_is_checked()
+ self.Toggle.set_is_checked()
+ self.invalidate()
+ end
+
+ #
+ # Set the status to unchecked.
+ #
+ method clear_is_checked()
+ self.Toggle.clear_is_checked()
+ self.invalidate()
+ end
+
+ #
+ # Set the button so that when it is pressed, it toggles
+ # between two states, as indicated by the is_checked
+ # flag.
+ #
+ # Instances of Checkbox have this flag on by default, but
+ # TextButton and IconButton do not. When the flag is on,
+ # the latter classes indicate their checked status by
+ # showing the button as being "down".
+ #
+ method set_toggles()
+ self.toggles_flag := 1
+ self.invalidate()
+ end
+
+ #
+ # Clear the toggles flag.
+ #
+ method clear_toggles()
+ self.toggles_flag := &null
+ self.invalidate()
+ end
+
+ #
+ # Set the label of the button, if any.
+ # @param x The label
+ #
+ method set_label(x)
+ self.label := x
+ self.invalidate()
+ return x
+ end
+
+ method set_one(attr, val)
+ case attr of {
+ "label" : set_label(string_val(attr, val))
+ "is_checked" :
+ if test_flag(attr, val) then
+ set_is_checked()
+ else
+ clear_is_checked()
+ "toggles" :
+ if test_flag(attr, val) then
+ set_toggles()
+ else
+ clear_toggles()
+ "no_keyboard" :
+ if test_flag(attr, val) then
+ set_no_keyboard()
+ else
+ clear_no_keyboard()
+ default: self.Component.set_one(attr, val)
+ }
+ end
+
+ initially()
+ self.Component.initially()
+ self.accepts_focus_flag := 1
+end \ No newline at end of file
diff --git a/tests/examplefiles/example.icon b/tests/examplefiles/example.icon
new file mode 100644
index 00000000..29bc548b
--- /dev/null
+++ b/tests/examplefiles/example.icon
@@ -0,0 +1,381 @@
+############################################################################
+#
+# File: kaleid.icn
+#
+# Subject: Program to produce kaleidoscope
+#
+# Author: Stephen B. Wampler
+#
+# Date: May 2, 2001
+#
+############################################################################
+#
+# This file is in the public domain.
+#
+############################################################################
+#
+# Lots of options, most easily set by with the interface after
+# startup. The only one that isn't set that way is -wn where 'n' is
+# the size of the kaleidoscope window (default is 600 square).
+#
+# Terminology (and options):
+#
+# Window_size (-wN): How big of a display window to use.
+# At the current time, this can only be set via a
+# command line argument.
+#
+# Density (-dN): How many circles per octant to keep on display
+# at any one time. There is NO LIMIT to the density.
+#
+# Duration (-lN): How long to keep drawing circles (measured in
+# in circles) once the density is reached. There is NO LIMIT
+# to the duration.
+#
+# MaxRadius (-MN): Maximum radius of any circle.
+#
+# MinRadius (-mN): Preferred minimum radius. Circles with centers
+# near the edge have their radii forced down to fit entirely
+# on the display
+#
+# MaxOffset (-XN): Maximum offset from center of display (may wrap).
+#
+# MinOffset (-xN): Minimum offset
+#
+# Skew (-sN): Shift probability of placing a circle at a 'typical'
+# offset.
+#
+# Fill (-F): Turns off filling the circles.
+#
+# Clear (-C): After the duration, reduces density back to 0 before
+# quitting.
+#
+# Random Seed: (-rN): Sets the random number seed.
+#
+# Thanks to Jon Lipp for help on using vidgets, and to Mary Camaron
+# for her Interface Builder.
+#
+############################################################################
+#
+# Requires: Version 9 graphics
+#
+############################################################################
+#
+# Links: vidgets, vslider, vtext, vbuttons, vradio, wopen, xcompat
+#
+############################################################################
+
+link vidgets
+link vslider
+link vtext
+link vbuttons
+link vradio
+link wopen
+link xcompat
+
+global Clear, fill, duration, density, maxoff, minoff
+global maxradius, minradius, r_seed, skew, win_size, mid_win
+global root, check1, mainwin, use_dialog
+global draw_circle
+
+global du_v, de_v, rs_v, sk_v
+
+procedure main (args)
+
+ draw_circle := DrawCircle
+
+ init_globs()
+ process_args(args)
+
+ if \use_dialog then { # have vidgets, so use them for args.
+ mainwin := WOpen("label=Kaleidoscope", "width=404", "height=313",
+ "font=6x12") |
+ stop ("bad mainwin")
+ root := ui (mainwin)
+ GetEvents (root, quit)
+ }
+ else { # just rely on command line arguments
+ kaleidoscope(r_seed)
+ }
+
+end
+
+procedure init_globs()
+
+ duration := 500 # set default characteristics
+ density := 30
+ win_size := 600
+ minoff := 1
+ maxradius := 150
+ minradius := 1
+ skew := 1
+ fill := "On"
+ draw_circle := FillCircle
+ Clear := "Off"
+ r_seed := map("HhMmYy", "Hh:Mm:Yy", &clock)
+ # See if the Vidget library is available or not
+ if \VSet then use_dialog := "yes"
+ else use_dialog := &null
+
+end
+
+procedure process_args(args)
+ local arg
+
+ # really only needed if you don't use the dialog box
+ every arg := !args do case arg[1+:2] of {
+ "-w" : win_size := integer(arg[3:0]) # window size
+ "-d" : density := integer(arg[3:0]) # density of circles
+ "-l" : duration := integer(arg[3:0]) # duration
+ "-M" : maxradius := integer(arg[3:0]) # maximum radius
+ "-m" : minradius := integer(arg[3:0]) # minimum radius
+ "-X" : maxoff := integer(arg[3:0]) # maximum offset
+ "-x" : minoff := integer(arg[3:0]) # minimum offset
+ "-s" : skew := numeric(arg[3:0]) # set skewedness
+ "-F" : fill := &null # turn off fill
+ "-C" : Clear := "yes" # turn on clear mode
+ "-r" : r_seed := integer(arg[3:0]) # random seed
+ "-h" : stop("usage: kal [-wn] [-dn] [-ln] [-Mn] [-mn] [-Xn] [-xn] _
+ [-sn] [-F] [-C] [-rn]")
+ }
+ # adjust parameters that depend on the window size...
+ mid_win := win_size/2
+ maxoff := win_size-1
+end
+
+# Lorraine Callahan's kaleidoscope program, translated into icon.
+# (some of the things she did were too sophisticated for me
+# to spend time to figure out, so the output is square instead of
+# round), and I use 'xor' to draw instead of writing to separate
+# bit planes.
+
+global putcircle, clrcircle
+
+procedure kaleidoscope(r)
+ local colors
+
+ # What colors to use? This can be changed to whatever!
+ colors := ["red","green","blue","cyan","magenta","yellow"]
+
+ &window := WOpen("label=Kaleidoscope: 'q' quits", "width="||win_size,
+ "height="||win_size, "bg=black")
+ WAttrib("drawop=xor")
+
+ # Create two *indentical* sequences of circles, one to use when
+ # when drawing, one for erasing. (Since 'xor' is used to
+ # place them, these both just draw the circles!)
+
+ putcircle := create { # draws sequence of circles
+ &random :=: r
+ |{
+ Fg(?colors)
+ outcircle()
+ &random <-> r
+ }
+ }
+
+ clrcircle := create { # erases sequence of circles
+ &random :=: r
+ |{
+ Fg(?colors)
+ outcircle()
+ &random <-> r
+ }
+ }
+
+ every 1 to density do @putcircle # fill screen to density
+
+ every 1 to duration do { # maintain steady state
+ @putcircle
+ @clrcircle
+ if *Pending(&window) > 0 then break
+ }
+
+ every (Clear == "On") & 1 to density do @clrcircle
+
+ close(&window)
+end
+
+
+procedure outcircle() # select a circle at random,
+local radius, xoff, yoff # draw it in kaleidoscopic form
+
+ # get a random center point and radius
+ xoff := (?(maxoff - minoff) + minoff) % mid_win
+ yoff := (?(maxoff - minoff) + minoff) % mid_win
+ radius := ?0 ^ skew
+ # force radius to 'fit'
+ radius := ((maxradius-minradius) * radius + minradius) %
+ (mid_win - ((xoff < yoff)|xoff))
+
+ # put into all 8 octants
+ draw_circle(mid_win+xoff, mid_win+yoff, radius)
+ draw_circle(mid_win+xoff, mid_win-yoff, radius)
+ draw_circle(mid_win-xoff, mid_win+yoff, radius)
+ draw_circle(mid_win-xoff, mid_win-yoff, radius)
+
+ draw_circle(mid_win+yoff, mid_win+xoff, radius)
+ draw_circle(mid_win+yoff, mid_win-xoff, radius)
+ draw_circle(mid_win-yoff, mid_win+xoff, radius)
+ draw_circle(mid_win-yoff, mid_win-xoff, radius)
+
+ return
+end
+
+
+############################################################################
+#
+# Vidget-based user interface -- developed originally using Mary
+# Camaron's XIB program. Don't expect this to be very readable -
+# you should have to play with it!
+#
+############################################################################
+procedure ui (win)
+ local cv1, cv2, cv3, cv4
+ local
+ radio_button2,
+ radio_button1,
+ text_input6,
+ text_input5,
+ slider4,
+ slider3,
+ text_input4,
+ text_input3,
+ slider2,
+ slider1
+
+ /win := WOpen("label=ui", "width=404", "height=313", "font=6x12") |
+ stop ("bad win")
+ root := Vroot_frame (win)
+
+ VInsert (root, Vmessage(win, win_size/2), 168, 98)
+ VInsert (root, Vmessage(win, "1"), 108, 97)
+
+ VInsert (root, sk_v := Vtext(win,"Skew:\\=1",get_skew,,6), 280, 39)
+
+ VInsert (root, du_v := Vtext(win, "Duration:\\="||duration, get_duration,,9),
+ 237, 15)
+
+ VInsert (root, Vmessage(win, "Clear at end?"), 232, 145)
+ VInsert (root, Vmessage(win, "Fill?"), 105, 142)
+ VInsert (root, Vmessage(win,"Quit?"), 267, 259)
+ VInsert (root, Vmessage(win,"Display it?"), 26, 260)
+
+ VInsert (root, Vcheckbox(win, do_quit, "check2",20), 305, 255, 20, 20)
+
+ VInsert (root, check1:=Vcheckbox(win, do_display, "check1",20),
+ 106, 258, 20, 20)
+
+ radio_button2 := Vradio_buttons (win, ["On", "Off"], get_clear, , V_CIRCLE)
+ VSet(radio_button2,Clear)
+ VInsert (root, radio_button2, 253, 165)
+
+ radio_button1 := Vradio_buttons (win, ["On", "Off"], get_fill, , V_CIRCLE)
+ VSet(radio_button1,fill)
+ VInsert (root, radio_button1, 99, 165)
+
+ cv1 := Vcoupler()
+ VAddClient(cv1, get_max_offset)
+ text_input6 := Vtext (win, "Max Offset:\\="||(win_size-1), cv1, , 3)
+ VAddClient(cv1, text_input6)
+ slider4 := Vhoriz_slider (win, cv1, "slider4", 70, 12, 0,
+ win_size-1, win_size-1, )
+ VAddClient(cv1, slider4)
+ VInsert (root, text_input6, 196, 103)
+ VInsert (root, slider4, 306, 106)
+
+ cv2 := Vcoupler()
+ VAddClient(cv2, get_min_offset)
+ text_input5 := Vtext (win, "Min Offset\\=1", cv2, , 3)
+ VAddClient(cv2, text_input5)
+ slider3 := Vhoriz_slider (win, cv2, "slider3", 70, 12, 1, win_size-1, 1, )
+ VAddClient(cv2, slider3)
+ VInsert (root, text_input5, 201, 80)
+ VInsert (root, slider3, 307, 82)
+
+ cv3 := Vcoupler()
+ VAddClient(cv3, get_max_radius)
+ text_input4 := Vtext (win, "Max Radius\\="||(win_size/4), cv3, , 3)
+ VAddClient(cv3, text_input4)
+ slider2 := Vhoriz_slider (win, cv3, "slider2", 70, 12, 1, win_size/2,
+ win_size/4, )
+ VAddClient(cv3, slider2)
+ VInsert (root, text_input4, 10, 104)
+ VInsert (root, slider2, 110, 108)
+
+ cv4 := Vcoupler()
+ VAddClient(cv4, get_min_radius)
+ text_input3 := Vtext (win, "Min Radius\\=1", cv4, , 3)
+ VAddClient(cv4, text_input3)
+ slider1 := Vhoriz_slider (win, cv4, "slider1", 70, 12, 1, win_size/2, 1, )
+ VAddClient(cv4, slider1)
+ VInsert (root, text_input3, 10, 81)
+ VInsert (root, slider1, 110, 84)
+
+ VInsert (root, rs_v := Vtext(win,"Random Seed:\\="||r_seed, get_random,, 11),
+ 30, 41)
+ VInsert (root, de_v := Vtext(win,"Density:\\="||density, get_density,,8),
+ 71, 16)
+
+ VResize (root)
+ return root
+end
+
+procedure get_skew (wit, value)
+ skew := value
+end
+
+procedure get_duration (wit, value)
+ duration := value
+end
+
+procedure do_quit (wit, value)
+ stop()
+end
+
+procedure do_display (wit, value)
+ r_seed := numeric(rs_v.data)
+ duration := integer(du_v.data)
+ density := integer(de_v.data)
+ skew := integer(sk_v.data)
+ kaleidoscope(r_seed)
+ wit.callback.value := &null
+ VDraw(check1)
+end
+
+procedure get_clear (wit, value)
+ Clear := value
+end
+
+procedure get_fill (wit, value)
+ fill := value
+ if fill == "Off" then draw_circle := DrawCircle
+ else draw_circle := FillCircle
+end
+
+procedure get_max_offset (wit, value)
+ maxoff := value
+end
+
+procedure get_min_offset (wit, value)
+ minoff := value
+end
+
+procedure get_max_radius (wit, value)
+ maxradius := value
+end
+
+procedure get_min_radius (wit, value)
+ minradius := value
+end
+
+procedure get_random (wit, value)
+ r_seed := integer(value)
+end
+
+procedure get_density (wit, value)
+ density := integer(value)
+end
+
+procedure quit(e)
+ if e === "q" then stop ("Exiting Kaleidoscope")
+end
diff --git a/tests/examplefiles/example.md b/tests/examplefiles/example.md
index 2befb107..e2bbacf1 100644
--- a/tests/examplefiles/example.md
+++ b/tests/examplefiles/example.md
@@ -46,6 +46,9 @@ this sentence @tweets a person about a #topic.
[google](https://google.com/some/path.html)
![Image of Yaktocat](https://octodex.github.com/images/yaktocat.png)
+[reference link][id]
+[id]: http://example.com/
+
```
* this is just unformated
__text__
diff --git a/tests/examplefiles/example.pony b/tests/examplefiles/example.pony
new file mode 100644
index 00000000..654f2376
--- /dev/null
+++ b/tests/examplefiles/example.pony
@@ -0,0 +1,18 @@
+use "somepkg"
+
+/*
+ /* Nested */
+*/
+
+class trn Foo[A: Stringable ref] is Stringable
+ let _x = "\""
+
+ fun val dofoo() =>
+ """
+ DocString
+ """
+ (U64(2), "foo")._2
+
+actor Main
+ new create(env: Env) =>
+ env.out.print("Hello world")
diff --git a/tests/examplefiles/example.sgf b/tests/examplefiles/example.sgf
new file mode 100644
index 00000000..024a461e
--- /dev/null
+++ b/tests/examplefiles/example.sgf
@@ -0,0 +1,35 @@
+(;FF[4]GM[1]SZ[19]FG[257:Figure 1]PM[1]
+PB[Takemiya Masaki]BR[9 dan]PW[Cho Chikun]
+WR[9 dan]RE[W+Resign]KM[5.5]TM[28800]DT[1996-10-18,19]
+EV[21st Meijin]RO[2 (final)]SO[Go World #78]US[Arno Hollosi]
+;B[pd];W[dp];B[pp];W[dd];B[pj];W[nc];B[oe];W[qc];B[pc];W[qd]
+(;B[qf];W[rf];B[rg];W[re];B[qg];W[pb];B[ob];W[qb]
+(;B[mp];W[fq];B[ci];W[cg];B[dl];W[cn];B[qo];W[ec];B[jp];W[jd]
+;B[ei];W[eg];B[kk]LB[qq:a][dj:b][ck:c][qp:d]N[Figure 1]
+
+;W[me]FG[257:Figure 2];B[kf];W[ke];B[lf];W[jf];B[jg]
+(;W[mf];B[if];W[je];B[ig];W[mg];B[mj];W[mq];B[lq];W[nq]
+(;B[lr];W[qq];B[pq];W[pr];B[rq];W[rr];B[rp];W[oq];B[mr];W[oo];B[mn]
+(;W[nr];B[qp]LB[kd:a][kh:b]N[Figure 2]
+
+;W[pk]FG[257:Figure 3];B[pm];W[oj];B[ok];W[qr];B[os];W[ol];B[nk];W[qj]
+;B[pi];W[pl];B[qm];W[ns];B[sr];W[om];B[op];W[qi];B[oi]
+(;W[rl];B[qh];W[rm];B[rn];W[ri];B[ql];W[qk];B[sm];W[sk];B[sh];W[og]
+;B[oh];W[np];B[no];W[mm];B[nn];W[lp];B[kp];W[lo];B[ln];W[ko];B[mo]
+;W[jo];B[km]N[Figure 3])
+
+(;W[ql]VW[ja:ss]FG[257:Dia. 6]MN[1];B[rm];W[ph];B[oh];W[pg];B[og];W[pf]
+;B[qh];W[qe];B[sh];W[of];B[sj]TR[oe][pd][pc][ob]LB[pe:a][sg:b][si:c]
+N[Diagram 6]))
+
+(;W[no]VW[jj:ss]FG[257:Dia. 5]MN[1];B[pn]N[Diagram 5]))
+
+(;B[pr]FG[257:Dia. 4]MN[1];W[kq];B[lp];W[lr];B[jq];W[jr];B[kp];W[kr];B[ir]
+;W[hr]LB[is:a][js:b][or:c]N[Diagram 4]))
+
+(;W[if]FG[257:Dia. 3]MN[1];B[mf];W[ig];B[jh]LB[ki:a]N[Diagram 3]))
+
+(;W[oc]VW[aa:sk]FG[257:Dia. 2]MN[1];B[md];W[mc];B[ld]N[Diagram 2]))
+
+(;B[qe]VW[aa:sj]FG[257:Dia. 1]MN[1];W[re];B[qf];W[rf];B[qg];W[pb];B[ob]
+;W[qb]LB[rg:a]N[Diagram 1]))
diff --git a/tests/examplefiles/example.sl b/tests/examplefiles/example.sl
new file mode 100644
index 00000000..5fb430de
--- /dev/null
+++ b/tests/examplefiles/example.sl
@@ -0,0 +1,6 @@
+#!/bin/bash
+#SBATCH --partition=part
+#SBATCH --job-name=job
+#SBATCH --mem=1G
+#SBATCH --cpus-per-task=8
+srun /usr/bin/sleep \ No newline at end of file
diff --git a/tests/examplefiles/example.stan b/tests/examplefiles/example.stan
index 69c9ac70..03b7b1b5 100644
--- a/tests/examplefiles/example.stan
+++ b/tests/examplefiles/example.stan
@@ -16,7 +16,7 @@ functions {
data {
// valid name
int abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_abc;
- // all types should be highlighed
+ // all types should be highlighted
int a3;
real foo[2];
vector[3] bar;
@@ -48,7 +48,7 @@ transformed data {
thud <- -12309865;
// ./ and .* should be recognized as operators
grault2 <- grault .* garply ./ garply;
- // ' and \ should be regognized as operators
+ // ' and \ should be recognized as operators
qux2 <- qux' \ bar;
}
diff --git a/tests/examplefiles/example.tf b/tests/examplefiles/example.tf
index 5a85dbee..4cbef52c 100644
--- a/tests/examplefiles/example.tf
+++ b/tests/examplefiles/example.tf
@@ -23,6 +23,14 @@ variable "aws_amis" {
}
+resource "aws_internet_gateway" "base_igw" {
+ vpc_id = "${aws_vpc.something.id}"
+ tags {
+ Name = "igw-${var.something}-${var.something}"
+ }
+}
+
+
@@ -170,3 +178,31 @@ resource "aws_instance" "web" {
}
}
+
+
+resource "aws_autoscaling_group" "bar" {
+ name = "terraform-asg-example"
+ launch_configuration = "${aws_launch_configuration.as_conf.name}"
+ min_size = 1
+ max_size = 2
+
+ lifecycle {
+ create_before_destroy = true
+ }
+}
+
+
+resource "aws_db_instance" "timeout_example" {
+ allocated_storage = 10
+ engine = "mysql"
+ engine_version = "5.6.17"
+ instance_class = "db.t1.micro"
+ name = "mydb"
+
+ timeouts {
+ create = "60m"
+ delete = "2h"
+ }
+}
+
+
diff --git a/tests/examplefiles/example.toml b/tests/examplefiles/example.toml
new file mode 100644
index 00000000..9c60c79f
--- /dev/null
+++ b/tests/examplefiles/example.toml
@@ -0,0 +1,181 @@
+# This is a TOML document comment
+
+title = "TOML example file" # This is an inline comment
+
+[examples]
+# Examples taken from https://github.com/toml-lang/toml/blob/master/README.md
+key = "value"
+bare_key = "value"
+bare-key = "value"
+1234 = "value"
+"127.0.0.1" = "value"
+"character encoding" = "value"
+"ʎǝʞ" = "value"
+'key2' = "value"
+'quoted "value"' = "value"
+name = "Orange"
+physical.color = "orange"
+physical.shape = "round"
+site."google.com" = true
+a.b.c = 1
+a.d = 2
+
+[strings]
+str = "I'm a string. \"You can quote me\". Name\tJos\u00E9\nLocation\tSF."
+str1 = """
+Roses are red
+Violets are blue"""
+str2 = "Roses are red\nViolets are blue"
+str3 = "Roses are red\r\nViolets are blue"
+
+ [strings.equivalents]
+ str1 = "The quick brown fox jumps over the lazy dog."
+ str2 = """
+The quick brown \
+
+
+ fox jumps over \
+ the lazy dog."""
+ str3 = """\
+ The quick brown \
+ fox jumps over \
+ the lazy dog.\
+ """
+
+ [strings.literal]
+ winpath = 'C:\Users\nodejs\templates'
+ winpath2 = '\\ServerX\admin$\system32\'
+ quoted = 'Tom "Dubs" Preston-Werner'
+ regex = '<\i\c*\s*>'
+
+ [strings.multiline]
+ regex2 = '''I [dw]on't need \d{2} apples'''
+ lines = '''
+The first newline is
+trimmed in raw strings.
+ All other whitespace
+ is preserved.
+'''
+
+[integers]
+int1 = +99
+int2 = 42
+int3 = 0
+int4 = -17
+int5 = 1_000
+int6 = 5_349_221
+int7 = 1_2_3_4_5 # discouraged format
+# hexadecimal with prefix `0x`
+hex1 = 0xDEADBEEF
+hex2 = 0xdeadbeef
+hex3 = 0xdead_beef
+# octal with prefix `0o`
+oct1 = 0o01234567
+oct2 = 0o755 # useful for Unix file permissions
+# binary with prefix `0b`
+bin1 = 0b11010110
+
+[floats]
+# fractional
+flt1 = +1.0
+flt2 = 3.1415
+flt3 = -0.01
+# exponent
+flt4 = 5e+22
+flt5 = 1e6
+flt6 = -2E-2
+# both
+flt7 = 6.626e-34
+# with underscores, for readability
+flt8 = 224_617.445_991_228
+# infinity
+sf1 = inf # positive infinity
+sf2 = +inf # positive infinity
+sf3 = -inf # negative infinity
+# not a number
+sf4 = nan # actual sNaN/qNaN encoding is implementation specific
+sf5 = +nan # same as `nan`
+sf6 = -nan # valid, actual encoding is implementation specific
+# plus/minus zero
+sf0_1 = +0.0
+sf0_2 = -0.0
+
+[booleans]
+bool1 = true
+bool2 = false
+
+[datetime.offset]
+odt1 = 1979-05-27T07:32:00Z
+odt2 = 1979-05-27T00:32:00-07:00
+odt3 = 1979-05-27T00:32:00.999999-07:00
+odt4 = 1979-05-27 07:32:00Z
+
+[datetime.local]
+ldt1 = 1979-05-27T07:32:00
+ldt2 = 1979-05-27T00:32:00.999999
+
+[date.local]
+ld1 = 1979-05-27
+
+[time.local]
+lt1 = 07:32:00
+lt2 = 00:32:00.999999
+
+[arrays]
+arr1 = [ 1, 2, 3 ]
+arr2 = [ "red", "yellow", "green" ]
+arr3 = [ [ 1, 2 ], [3, 4, 5] ]
+arr4 = [ "all", 'strings', """are the same""", '''type''']
+arr5 = [ [ 1, 2 ], ["a", "b", "c"] ]
+arr6 = [ 1, 2.0 ] # INVALID
+arr7 = [
+ 1, 2, 3
+]
+arr8 = [
+ 1,
+ 2, # this is ok
+]
+
+["inline tables"]
+name = { first = "Tom", last = "Preston-Werner" }
+point = { x = 1, y = 2 }
+animal = { type.name = "pug" }
+
+["arrays of tables"]
+points = [ { x = 1, y = 2, z = 3 },
+ { x = 7, y = 8, z = 9 },
+ { x = 2, y = 4, z = 8 } ]
+
+ [products]
+
+ [[products]]
+ name = "Hammer"
+ sku = 738594937
+
+ [[products]]
+
+ [[products]]
+ name = "Nail"
+ sku = 284758393
+ color = "gray"
+
+ [fruits]
+
+ [[fruit]]
+ name = "apple"
+
+ [fruit.physical]
+ color = "red"
+ shape = "round"
+
+ [[fruit.variety]]
+ name = "red delicious"
+
+ [[fruit.variety]]
+ name = "granny smith"
+
+ [[fruit]]
+ name = "banana"
+
+ [[fruit.variety]]
+ name = "plantain"
diff --git a/tests/examplefiles/example.u b/tests/examplefiles/example.u
index 42c85902..8c6686eb 100644
--- a/tests/examplefiles/example.u
+++ b/tests/examplefiles/example.u
@@ -545,4 +545,3 @@ var y = 0;
-
diff --git a/tests/examplefiles/example.u1 b/tests/examplefiles/example.u1
new file mode 100644
index 00000000..92c45365
--- /dev/null
+++ b/tests/examplefiles/example.u1
@@ -0,0 +1,111 @@
+version U12.1.00
+uid version.u1-1494453463-0
+impl local
+global 1
+ 0,000005,version,0
+
+
+proc version
+ local 0,000000,tab
+ local 1,000000,find
+ local 2,000000,many
+ con 0,010000,8,126,145,162,163,151,157,156,040
+ con 1,002000,1,8
+ con 2,020000,11,060,061,062,063,064,065,066,067,070,071,056
+ con 3,002000,1,1
+ declend
+ filen version.icn
+ line 23
+ colm 11
+ synt any
+ mark L1
+ line 25
+ colm 4
+ synt any
+ keywd version
+ line 25
+ colm 13
+ synt any
+ bscan
+ mark L2
+ mark L3
+ var 0
+ pnull
+ var 1
+ str 0
+ line 26
+ colm 15
+ synt any
+ invoke 1
+ int 1
+ line 26
+ colm 28
+ synt any
+ plus
+ line 26
+ colm 10
+ synt any
+ invoke 1
+ line 26
+ colm 33
+ synt any
+ esusp
+ goto L4
+lab L3
+ line 26
+ colm 35
+ synt any
+ pfail
+lab L4
+ unmark
+lab L2
+ var 0
+ var 2
+ cset 2
+ line 27
+ colm 15
+ synt any
+ invoke 1
+ line 27
+ colm 10
+ synt any
+ invoke 1
+ line 27
+ colm 32
+ synt any
+ bscan
+ mark L5
+ var 0
+ pnull
+ int 3
+ line 27
+ colm 45
+ synt any
+ neg
+ line 27
+ colm 44
+ synt any
+ invoke 1
+ line 27
+ colm 34
+ synt any
+ pret
+lab L5
+ synt any
+ pfail
+ line 27
+ colm 32
+ synt any
+ escan
+ line 25
+ colm 13
+ synt any
+ escan
+ unmark
+lab L1
+ pnull
+ line 30
+ colm 1
+ synt any
+ pfail
+ end \ No newline at end of file
diff --git a/tests/examplefiles/example.vbs b/tests/examplefiles/example.vbs
new file mode 100644
index 00000000..d962b73d
--- /dev/null
+++ b/tests/examplefiles/example.vbs
@@ -0,0 +1,55 @@
+rem VBScript examples
+
+' Various constants of different types
+const someText = "some " & """text"""
+const someInt = 123
+const someHex = &h3110c0d3
+const someFloat = 123.45e-67
+const someDate = #1/2/2016#
+const someTime = #12:34:56 AM#
+const someBool = vbTrue ' -1
+
+' Do some math.
+radius = 1.e2
+area = radius ^ 2 * 3.1315
+a = 17 : b = 23
+c = sqr(a ^2 + b ^ 2)
+
+' Write 10 files.
+For i = 1 to 10
+ createFile( i )
+Next
+
+Public Sub createFile(a)
+ Dim fso, TargetFile
+ TargetPath = "C:\some_" & a & ".tmp"
+ Set fso = CreateObject("Scripting.FileSystemObject")
+ Set TargetFile = fso.CreateTextFile(TargetPath)
+ TargetFile.WriteLine("Hello " & vbCrLf & "world!")
+ TargetFile.Close
+End Sub
+
+' Define a class with a property.
+Class Customer
+ Private m_CustomerName
+
+ Private Sub Class_Initialize
+ m_CustomerName = ""
+ End Sub
+
+ ' CustomerName property.
+ Public Property Get CustomerName
+ CustomerName = m_CustomerName
+ End Property
+
+ Public Property Let CustomerName(custname)
+ m_CustomerName = custname
+ End Property
+End Class
+
+' Special constructs
+Option Explicit
+On Error Resume Next
+On Error Goto 0
+
+' Comment without terminating CR/LF. \ No newline at end of file
diff --git a/tests/examplefiles/teraterm.ttl b/tests/examplefiles/teraterm.ttl
new file mode 100644
index 00000000..f6a3648a
--- /dev/null
+++ b/tests/examplefiles/teraterm.ttl
@@ -0,0 +1,34 @@
+messagebox "text \\not escaped \nescaped n" "other\n\rthing"
+messagebox "goto label /* a string */ ; same string"
+a=10
+b= 'abc'#$41'def'
+c =#65 /* multiline comment * / * / *//*
+comment */ d = 10 ; inline comment /* still inline */
+e = d + 20 - (($a * 2) / 4) << 3 % (2 >> 1) + result
+
+
+:thing
+
+strcompare c "thing"
+if result = 1 then
+ goto label_
+elseif result > -1 then
+ goto 10
+elseif d > (1+2*3)/7 then
+ messagebox "thing"
+else
+ messagebox "done"
+endif
+
+if abc messagebox "thing1" "title"
+
+
+; Invalid syntax
+bad = "no closing double quote
+bad = 'no closing single quote
+garbage
+...
+...
+...
+
+endgarbage
diff --git a/tests/run.py b/tests/run.py
index 07665b2a..2e962f2f 100644
--- a/tests/run.py
+++ b/tests/run.py
@@ -16,11 +16,19 @@ from __future__ import print_function
import os
import sys
+import warnings
# only find tests in this directory
if os.path.dirname(__file__):
os.chdir(os.path.dirname(__file__))
+# make FutureWarnings (coming from Regex syntax most likely) and
+# DeprecationWarnings due to non-raw strings an error
+warnings.filterwarnings("error", module=r"pygments\..*",
+ category=FutureWarning)
+warnings.filterwarnings("error", module=r".*pygments.*",
+ category=DeprecationWarning)
+
try:
import nose
diff --git a/tests/test_basic.py b/tests/test_basic.py
new file mode 100644
index 00000000..03d10cd2
--- /dev/null
+++ b/tests/test_basic.py
@@ -0,0 +1,74 @@
+# -*- coding: utf-8 -*-
+"""
+ Pygments Basic lexers tests
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ :copyright: Copyright 2006-2016 by the Pygments team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+import unittest
+
+from pygments.lexers.basic import VBScriptLexer
+from pygments.token import Error, Name, Number, Punctuation, String, Whitespace
+
+
+class VBScriptLexerTest(unittest.TestCase):
+
+ def setUp(self):
+ self.lexer = VBScriptLexer()
+
+ def _assert_are_tokens_of_type(self, examples, expected_token_type):
+ for test_number, example in enumerate(examples.split(), 1):
+ token_count = 0
+ for token_type, token_value in self.lexer.get_tokens(example):
+ if token_type != Whitespace:
+ token_count += 1
+ self.assertEqual(
+ token_type, expected_token_type,
+ 'token_type #%d for %s is be %s but must be %s' %
+ (test_number, token_value, token_type, expected_token_type))
+ self.assertEqual(
+ token_count, 1,
+ '%s must yield exactly 1 token instead of %d' %
+ (example, token_count))
+
+ def _assert_tokens_match(self, text, expected_tokens_without_trailing_newline):
+ actual_tokens = tuple(self.lexer.get_tokens(text))
+ if (len(actual_tokens) >= 1) and (actual_tokens[-1] == (Whitespace, '\n')):
+ actual_tokens = tuple(actual_tokens[:-1])
+ self.assertEqual(
+ expected_tokens_without_trailing_newline, actual_tokens,
+ 'text must yield expected tokens: %s' % text)
+
+ def test_can_lex_float(self):
+ self._assert_are_tokens_of_type(
+ '1. 1.e1 .1 1.2 1.2e3 1.2e+3 1.2e-3 1e2', Number.Float)
+ self._assert_tokens_match(
+ '1e2.1e2',
+ ((Number.Float, '1e2'), (Number.Float, '.1e2'))
+ )
+
+ def test_can_reject_almost_float(self):
+ self._assert_tokens_match(
+ '.e1',
+ ((Punctuation, '.'), (Name, 'e1')))
+
+ def test_can_lex_integer(self):
+ self._assert_are_tokens_of_type(
+ '1 23 456', Number.Integer)
+
+ def test_can_lex_names(self):
+ self._assert_are_tokens_of_type(
+ u'thingy thingy123 _thingy _123', Name)
+
+ def test_can_recover_after_unterminated_string(self):
+ self._assert_tokens_match(
+ '"x\nx',
+ ((String.Double, '"'), (String.Double, 'x'), (Error, '\n'), (Name, 'x'))
+ )
+
+ def test_can_recover_from_invalid_character(self):
+ self._assert_tokens_match(
+ 'a;bc\nd',
+ ((Name, 'a'), (Error, ';bc\n'), (Name, 'd'))
+ )
diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py
index 1500c875..a55e30ec 100644
--- a/tests/test_cmdline.py
+++ b/tests/test_cmdline.py
@@ -28,6 +28,13 @@ def func(args):
'''
+def _decode_output(text):
+ try:
+ return text.decode('utf-8')
+ except UnicodeEncodeError: # implicit encode on Python 2 with data loss
+ return text
+
+
def run_cmdline(*args, **kwds):
saved_stdin = sys.stdin
saved_stdout = sys.stdout
@@ -53,9 +60,9 @@ def run_cmdline(*args, **kwds):
sys.stderr = saved_stderr
new_stdout.flush()
new_stderr.flush()
- out, err = stdout_buffer.getvalue().decode('utf-8'), \
- stderr_buffer.getvalue().decode('utf-8')
- return (ret, out, err)
+ out, err = stdout_buffer.getvalue(), \
+ stderr_buffer.getvalue()
+ return (ret, _decode_output(out), _decode_output(err))
class CmdLineTest(unittest.TestCase):
diff --git a/tests/test_csound.py b/tests/test_csound.py
index 4d10c267..d493bd04 100644
--- a/tests/test_csound.py
+++ b/tests/test_csound.py
@@ -478,3 +478,14 @@ class CsoundOrchestraTest(unittest.TestCase):
(Text, u'\n')
]
self.assertEqual(tokens, list(self.lexer.get_tokens(fragment)))
+
+ def testName(self):
+ fragment = 'kG:V'
+ tokens = [
+ (Keyword.Type, 'k'),
+ (Name, 'G'),
+ (Punctuation, ':'),
+ (Name, 'V'),
+ (Text, '\n')
+ ]
+ self.assertEqual(tokens, list(self.lexer.get_tokens(fragment)))
diff --git a/tests/test_html_formatter.py b/tests/test_html_formatter.py
index 79990edd..670a5be9 100644
--- a/tests/test_html_formatter.py
+++ b/tests/test_html_formatter.py
@@ -100,7 +100,7 @@ class HtmlFormatterTest(unittest.TestCase):
fmt = HtmlFormatter(**optdict)
fmt.format(tokensource, outfile)
html = outfile.getvalue()
- self.assertTrue(re.search("<pre>\s+1\s+2\s+3", html))
+ self.assertTrue(re.search(r"<pre>\s+1\s+2\s+3", html))
def test_linenos_with_startnum(self):
optdict = dict(linenos=True, linenostart=5)
@@ -108,7 +108,7 @@ class HtmlFormatterTest(unittest.TestCase):
fmt = HtmlFormatter(**optdict)
fmt.format(tokensource, outfile)
html = outfile.getvalue()
- self.assertTrue(re.search("<pre>\s+5\s+6\s+7", html))
+ self.assertTrue(re.search(r"<pre>\s+5\s+6\s+7", html))
def test_lineanchors(self):
optdict = dict(lineanchors="foo")
@@ -132,9 +132,8 @@ class HtmlFormatterTest(unittest.TestCase):
outencoding='utf-8')
handle, pathname = tempfile.mkstemp('.html')
- tfile = os.fdopen(handle, 'w+b')
- fmt.format(tokensource, tfile)
- tfile.close()
+ with os.fdopen(handle, 'w+b') as tfile:
+ fmt.format(tokensource, tfile)
catname = os.path.join(TESTDIR, 'dtds', 'HTML4.soc')
try:
import subprocess
@@ -173,9 +172,8 @@ class HtmlFormatterTest(unittest.TestCase):
cssstyles=u'div:before { content: \'bäz\' }',
encoding='utf-8')
handle, pathname = tempfile.mkstemp('.html')
- tfile = os.fdopen(handle, 'w+b')
- fmt.format(tokensource, tfile)
- tfile.close()
+ with os.fdopen(handle, 'w+b') as tfile:
+ fmt.format(tokensource, tfile)
def test_ctags(self):
try:
diff --git a/tests/test_kotlin.py b/tests/test_kotlin.py
new file mode 100644
index 00000000..7c733ad9
--- /dev/null
+++ b/tests/test_kotlin.py
@@ -0,0 +1,131 @@
+# -*- coding: utf-8 -*-
+"""
+ Basic JavaLexer Test
+ ~~~~~~~~~~~~~~~~~~~~
+
+ :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+import unittest
+
+from pygments.token import Text, Name, Operator, Keyword, Number, Punctuation, String
+from pygments.lexers import KotlinLexer
+
+class KotlinTest(unittest.TestCase):
+
+ def setUp(self):
+ self.lexer = KotlinLexer()
+ self.maxDiff = None
+
+ def testCanCopeWithBackTickNamesInFunctions(self):
+ fragment = u'fun `wo bble`'
+ tokens = [
+ (Keyword, u'fun'),
+ (Text, u' '),
+ (Name.Function, u'`wo bble`'),
+ (Text, u'\n')
+ ]
+ self.assertEqual(tokens, list(self.lexer.get_tokens(fragment)))
+
+ def testCanCopeWithCommasAndDashesInBackTickNames(self):
+ fragment = u'fun `wo,-bble`'
+ tokens = [
+ (Keyword, u'fun'),
+ (Text, u' '),
+ (Name.Function, u'`wo,-bble`'),
+ (Text, u'\n')
+ ]
+ self.assertEqual(tokens, list(self.lexer.get_tokens(fragment)))
+
+ def testCanCopeWithDestructuring(self):
+ fragment = u'val (a, b) = '
+ tokens = [
+ (Keyword, u'val'),
+ (Text, u' '),
+ (Punctuation, u'('),
+ (Name.Property, u'a'),
+ (Punctuation, u','),
+ (Text, u' '),
+ (Name.Property, u'b'),
+ (Punctuation, u')'),
+ (Text, u' '),
+ (Punctuation, u'='),
+ (Text, u' '),
+ (Text, u'\n')
+ ]
+ self.assertEqual(tokens, list(self.lexer.get_tokens(fragment)))
+
+ def testCanCopeGenericsInDestructuring(self):
+ fragment = u'val (a: List<Something>, b: Set<Wobble>) ='
+ tokens = [
+ (Keyword, u'val'),
+ (Text, u' '),
+ (Punctuation, u'('),
+ (Name.Property, u'a'),
+ (Punctuation, u':'),
+ (Text, u' '),
+ (Name.Property, u'List'),
+ (Punctuation, u'<'),
+ (Name, u'Something'),
+ (Punctuation, u'>'),
+ (Punctuation, u','),
+ (Text, u' '),
+ (Name.Property, u'b'),
+ (Punctuation, u':'),
+ (Text, u' '),
+ (Name.Property, u'Set'),
+ (Punctuation, u'<'),
+ (Name, u'Wobble'),
+ (Punctuation, u'>'),
+ (Punctuation, u')'),
+ (Text, u' '),
+ (Punctuation, u'='),
+ (Text, u'\n')
+ ]
+ self.assertEqual(tokens, list(self.lexer.get_tokens(fragment)))
+
+ def testCanCopeWithGenerics(self):
+ fragment = u'inline fun <reified T : ContractState> VaultService.queryBy(): Vault.Page<T> {'
+ tokens = [
+ (Keyword, u'inline fun'),
+ (Text, u' '),
+ (Punctuation, u'<'),
+ (Keyword, u'reified'),
+ (Text, u' '),
+ (Name, u'T'),
+ (Text, u' '),
+ (Punctuation, u':'),
+ (Text, u' '),
+ (Name, u'ContractState'),
+ (Punctuation, u'>'),
+ (Text, u' '),
+ (Name.Class, u'VaultService'),
+ (Punctuation, u'.'),
+ (Name.Function, u'queryBy'),
+ (Punctuation, u'('),
+ (Punctuation, u')'),
+ (Punctuation, u':'),
+ (Text, u' '),
+ (Name, u'Vault'),
+ (Punctuation, u'.'),
+ (Name, u'Page'),
+ (Punctuation, u'<'),
+ (Name, u'T'),
+ (Punctuation, u'>'),
+ (Text, u' '),
+ (Punctuation, u'{'),
+ (Text, u'\n')
+ ]
+ self.assertEqual(tokens, list(self.lexer.get_tokens(fragment)))
+
+ def testShouldCopeWithMultilineComments(self):
+ fragment = u'"""\nthis\nis\na\ncomment"""'
+ tokens = [
+ (String, u'"""\nthis\nis\na\ncomment"""'),
+ (Text, u'\n')
+ ]
+ self.assertEqual(tokens, list(self.lexer.get_tokens(fragment)))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/tests/test_python.py b/tests/test_python.py
index e99687a6..6445022c 100644
--- a/tests/test_python.py
+++ b/tests/test_python.py
@@ -111,3 +111,23 @@ class Python3Test(unittest.TestCase):
(Token.Text, u'\n'),
]
self.assertEqual(tokens, list(self.lexer.get_tokens(fragment)))
+
+ def test_pep_515(self):
+ """
+ Tests that the lexer can parse numeric literals with underscores
+ """
+ fragments = (
+ (Token.Literal.Number.Integer, u'1_000_000'),
+ (Token.Literal.Number.Float, u'1_000.000_001'),
+ (Token.Literal.Number.Float, u'1_000e1_000j'),
+ (Token.Literal.Number.Hex, u'0xCAFE_F00D'),
+ (Token.Literal.Number.Bin, u'0b_0011_1111_0100_1110'),
+ (Token.Literal.Number.Oct, u'0o_777_123'),
+ )
+
+ for token, fragment in fragments:
+ tokens = [
+ (token, fragment),
+ (Token.Text, u'\n'),
+ ]
+ self.assertEqual(tokens, list(self.lexer.get_tokens(fragment)))
diff --git a/tests/test_r.py b/tests/test_r.py
index d0e9090b..70148e53 100644
--- a/tests/test_r.py
+++ b/tests/test_r.py
@@ -50,9 +50,9 @@ class RTest(unittest.TestCase):
def testName3(self):
# Internal backticks can be escaped
- fragment = u'`.1 \` blah`'
+ fragment = u'`.1 \\` blah`'
tokens = [
- (Name, u'`.1 \` blah`'),
+ (Name, u'`.1 \\` blah`'),
(Token.Text, u'\n'),
]
self.assertEqual(tokens, list(self.lexer.get_tokens(fragment)))
diff --git a/tests/test_rtf_formatter.py b/tests/test_rtf_formatter.py
index 756c03a9..44da5768 100644
--- a/tests/test_rtf_formatter.py
+++ b/tests/test_rtf_formatter.py
@@ -80,7 +80,7 @@ class RtfFormatterTest(StringTests, unittest.TestCase):
self.assertEndsWith(result, expected+self.foot, msg)
def test_escape_characters(self):
- t = u'\ {{'
+ t = u'\\ {{'
result = self.format_rtf(t)
expected = (r'\\ \{\{')
if not result.endswith(self.foot):
diff --git a/tests/test_sql.py b/tests/test_sql.py
index c5f5c758..6be34006 100644
--- a/tests/test_sql.py
+++ b/tests/test_sql.py
@@ -8,7 +8,10 @@
"""
import unittest
-from pygments.lexers.sql import TransactSqlLexer
+from pygments.lexers.sql import name_between_bracket_re, \
+ name_between_backtick_re, tsql_go_re, tsql_declare_re, \
+ tsql_variable_re, MySqlLexer, SqlLexer, TransactSqlLexer
+
from pygments.token import Comment, Name, Number, Punctuation, Whitespace
@@ -72,3 +75,44 @@ class TransactSqlLexerTest(unittest.TestCase):
(Comment.Multiline, '*/'),
(Comment.Multiline, '*/'),
))
+
+
+class SqlAnalyzeTextTest(unittest.TestCase):
+ def test_can_match_analyze_text_res(self):
+ self.assertEqual(['`a`', '`bc`'],
+ name_between_backtick_re.findall('select `a`, `bc` from some'))
+ self.assertEqual(['[a]', '[bc]'],
+ name_between_bracket_re.findall('select [a], [bc] from some'))
+ self.assertTrue(tsql_declare_re.search('--\nDeClaRe @some int;'))
+ self.assertTrue(tsql_go_re.search('select 1\ngo\n--'))
+ self.assertTrue(tsql_variable_re.search(
+ 'create procedure dbo.usp_x @a int, @b int'))
+
+ def test_can_analyze_text(self):
+ mysql_lexer = MySqlLexer()
+ sql_lexer = SqlLexer()
+ tsql_lexer = TransactSqlLexer()
+ code_to_expected_lexer_map = {
+ 'select `a`, `bc` from some': mysql_lexer,
+ 'select a, bc from some': sql_lexer,
+ 'select [a], [bc] from some': tsql_lexer,
+ '-- `a`, `bc`\nselect [a], [bc] from some': tsql_lexer,
+ '-- `a`, `bc`\nselect [a], [bc] from some; go': tsql_lexer,
+ }
+ sql_lexers = set(code_to_expected_lexer_map.values())
+ for code, expected_lexer in code_to_expected_lexer_map.items():
+ ratings_and_lexers = list((lexer.analyse_text(code), lexer.name) for lexer in sql_lexers)
+ best_rating, best_lexer_name = sorted(ratings_and_lexers, reverse=True)[0]
+ expected_rating = expected_lexer.analyse_text(code)
+ message = (
+ 'lexer must be %s (rating %.2f) instead of '
+ '%s (rating %.2f) for analyse_text() on code:\n%s') % (
+ expected_lexer.name,
+ expected_rating,
+ best_lexer_name,
+ best_rating,
+ code
+ )
+ self.assertEqual(
+ expected_lexer.name, best_lexer_name, message
+ )
diff --git a/tests/test_terminal_formatter.py b/tests/test_terminal_formatter.py
index ee0ac380..1f44807d 100644
--- a/tests/test_terminal_formatter.py
+++ b/tests/test_terminal_formatter.py
@@ -61,10 +61,10 @@ class TerminalFormatterTest(unittest.TestCase):
class MyStyle(Style):
styles = {
- Token.Comment: '#ansidarkgray',
- Token.String: '#ansiblue bg:#ansidarkred',
- Token.Number: '#ansigreen bg:#ansidarkgreen',
- Token.Number.Hex: '#ansidarkgreen bg:#ansired',
+ Token.Comment: 'ansibrightblack',
+ Token.String: 'ansibrightblue bg:ansired',
+ Token.Number: 'ansibrightgreen bg:ansigreen',
+ Token.Number.Hex: 'ansigreen bg:ansibrightred',
}
@@ -90,7 +90,7 @@ async def function(a,b,c, *d, **kwarg:Bool)->Bool:
def test_256esc_seq(self):
"""
- test that a few escape sequences are actualy used when using #ansi<> color codes
+ test that a few escape sequences are actualy used when using ansi<> color codes
"""
def termtest(x):
return highlight(x, Python3Lexer(),