pull request numbers to the requests at
<http://bitbucket.org/birkenfeld/pygments-main/pull-requests/merged>.
+Version 2.0
+-----------
+(released Nov 9, 2014)
+
+- Default lexer encoding is now "guess", i.e. UTF-8 / Locale / Latin1 is
+ tried in that order.
+
+- Major update to Swift lexer (PR#410).
+
+- Multiple fixes to lexer guessing in conflicting cases:
+
+ * recognize HTML5 by doctype
+ * recognize XML by XML declaration
+ * don't recognize C/C++ as SystemVerilog
+
+- Simplified regexes and builtin lists.
+
+
Version 2.0rc1
--------------
(released Oct 16, 2014)
- Pygments will now recognize "vim" modelines when guessing the lexer for
a file based on content (PR#118).
+- Major restructure of the ``pygments.lexers`` module namespace. There are now
+ many more modules with less lexers per module. Old modules are still around
+ and re-export the lexers they previously contained.
+
- The NameHighlightFilter now works with any Name.* token type (#790).
- Python 3 lexer: add new exceptions from PEP 3151.
Metadata-Version: 1.1
Name: Pygments
-Version: 2.0rc1
+Version: 2.0
Summary: Pygments is a syntax highlighting package written in Python.
Home-page: http://pygments.org/
Author: Georg Brandl
Metadata-Version: 1.1
Name: Pygments
-Version: 2.0rc1
+Version: 2.0
Summary: Pygments is a syntax highlighting package written in Python.
Home-page: http://pygments.org/
Author: Georg Brandl
doc/languages.rst
doc/make.bat
doc/pygmentize.1
+doc/_build/doctrees/download.doctree
+doc/_build/doctrees/environment.pickle
+doc/_build/doctrees/faq.doctree
+doc/_build/doctrees/index.doctree
+doc/_build/doctrees/languages.doctree
+doc/_build/doctrees/docs/api.doctree
+doc/_build/doctrees/docs/authors.doctree
+doc/_build/doctrees/docs/changelog.doctree
+doc/_build/doctrees/docs/cmdline.doctree
+doc/_build/doctrees/docs/filterdevelopment.doctree
+doc/_build/doctrees/docs/filters.doctree
+doc/_build/doctrees/docs/formatterdevelopment.doctree
+doc/_build/doctrees/docs/formatters.doctree
+doc/_build/doctrees/docs/index.doctree
+doc/_build/doctrees/docs/integrate.doctree
+doc/_build/doctrees/docs/java.doctree
+doc/_build/doctrees/docs/lexerdevelopment.doctree
+doc/_build/doctrees/docs/lexers.doctree
+doc/_build/doctrees/docs/moinmoin.doctree
+doc/_build/doctrees/docs/plugins.doctree
+doc/_build/doctrees/docs/quickstart.doctree
+doc/_build/doctrees/docs/rstdirective.doctree
+doc/_build/doctrees/docs/styles.doctree
+doc/_build/doctrees/docs/tokens.doctree
+doc/_build/doctrees/docs/unicode.doctree
+doc/_build/html/.buildinfo
+doc/_build/html/download.html
+doc/_build/html/faq.html
+doc/_build/html/genindex.html
+doc/_build/html/index.html
+doc/_build/html/languages.html
+doc/_build/html/objects.inv
+doc/_build/html/py-modindex.html
+doc/_build/html/search.html
+doc/_build/html/searchindex.js
+doc/_build/html/_sources/download.txt
+doc/_build/html/_sources/faq.txt
+doc/_build/html/_sources/index.txt
+doc/_build/html/_sources/languages.txt
+doc/_build/html/_sources/docs/api.txt
+doc/_build/html/_sources/docs/authors.txt
+doc/_build/html/_sources/docs/changelog.txt
+doc/_build/html/_sources/docs/cmdline.txt
+doc/_build/html/_sources/docs/filterdevelopment.txt
+doc/_build/html/_sources/docs/filters.txt
+doc/_build/html/_sources/docs/formatterdevelopment.txt
+doc/_build/html/_sources/docs/formatters.txt
+doc/_build/html/_sources/docs/index.txt
+doc/_build/html/_sources/docs/integrate.txt
+doc/_build/html/_sources/docs/java.txt
+doc/_build/html/_sources/docs/lexerdevelopment.txt
+doc/_build/html/_sources/docs/lexers.txt
+doc/_build/html/_sources/docs/moinmoin.txt
+doc/_build/html/_sources/docs/plugins.txt
+doc/_build/html/_sources/docs/quickstart.txt
+doc/_build/html/_sources/docs/rstdirective.txt
+doc/_build/html/_sources/docs/styles.txt
+doc/_build/html/_sources/docs/tokens.txt
+doc/_build/html/_sources/docs/unicode.txt
+doc/_build/html/_static/ajax-loader.gif
+doc/_build/html/_static/basic.css
+doc/_build/html/_static/comment-bright.png
+doc/_build/html/_static/comment-close.png
+doc/_build/html/_static/comment.png
+doc/_build/html/_static/default.css
+doc/_build/html/_static/doctools.js
+doc/_build/html/_static/down-pressed.png
+doc/_build/html/_static/down.png
+doc/_build/html/_static/favicon.ico
+doc/_build/html/_static/file.png
+doc/_build/html/_static/jquery-1.11.1.js
+doc/_build/html/_static/jquery.js
+doc/_build/html/_static/logo_new.png
+doc/_build/html/_static/logo_only.png
+doc/_build/html/_static/minus.png
+doc/_build/html/_static/plus.png
+doc/_build/html/_static/pygments.css
+doc/_build/html/_static/searchtools.js
+doc/_build/html/_static/sidebar.js
+doc/_build/html/_static/underscore-1.3.1.js
+doc/_build/html/_static/underscore.js
+doc/_build/html/_static/up-pressed.png
+doc/_build/html/_static/up.png
+doc/_build/html/_static/websupport.js
+doc/_build/html/docs/api.html
+doc/_build/html/docs/authors.html
+doc/_build/html/docs/changelog.html
+doc/_build/html/docs/cmdline.html
+doc/_build/html/docs/filterdevelopment.html
+doc/_build/html/docs/filters.html
+doc/_build/html/docs/formatterdevelopment.html
+doc/_build/html/docs/formatters.html
+doc/_build/html/docs/index.html
+doc/_build/html/docs/integrate.html
+doc/_build/html/docs/java.html
+doc/_build/html/docs/lexerdevelopment.html
+doc/_build/html/docs/lexers.html
+doc/_build/html/docs/moinmoin.html
+doc/_build/html/docs/plugins.html
+doc/_build/html/docs/quickstart.html
+doc/_build/html/docs/rstdirective.html
+doc/_build/html/docs/styles.html
+doc/_build/html/docs/tokens.html
+doc/_build/html/docs/unicode.html
doc/_static/favicon.ico
doc/_static/logo_new.png
doc/_static/logo_only.png
pygments/lexers/_lasso_builtins.py
pygments/lexers/_lua_builtins.py
pygments/lexers/_mapping.py
+pygments/lexers/_mql_builtins.py
pygments/lexers/_openedge_builtins.py
pygments/lexers/_php_builtins.py
pygments/lexers/_postgres_builtins.py
scripts/debug_lexer.py
scripts/detect_missing_analyse_text.py
scripts/epydoc.css
-scripts/find_codetags.py
scripts/find_error.py
scripts/get_vimkw.py
scripts/pylintrc
scripts/vim2pygments.py
tests/run.py
tests/string_asserts.py
+tests/string_asserts.pyc
tests/support.py
+tests/support.pyc
tests/test_basic_api.py
+tests/test_basic_api.pyc
tests/test_cfm.py
+tests/test_cfm.pyc
tests/test_clexer.py
+tests/test_clexer.pyc
tests/test_cmdline.py
+tests/test_cmdline.pyc
tests/test_examplefiles.py
+tests/test_examplefiles.pyc
tests/test_html_formatter.py
+tests/test_html_formatter.pyc
+tests/test_inherit.py
+tests/test_inherit.pyc
tests/test_java.py
+tests/test_java.pyc
tests/test_latex_formatter.py
+tests/test_latex_formatter.pyc
tests/test_lexers_other.py
+tests/test_lexers_other.pyc
tests/test_objectiveclexer.py
+tests/test_objectiveclexer.pyc
tests/test_perllexer.py
+tests/test_perllexer.pyc
tests/test_qbasiclexer.py
+tests/test_qbasiclexer.pyc
tests/test_regexlexer.py
+tests/test_regexlexer.pyc
tests/test_regexopt.py
+tests/test_regexopt.pyc
tests/test_rtf_formatter.py
+tests/test_rtf_formatter.pyc
tests/test_ruby.py
+tests/test_ruby.pyc
tests/test_shell.py
+tests/test_shell.pyc
tests/test_smarty.py
+tests/test_smarty.pyc
tests/test_string_asserts.py
+tests/test_string_asserts.pyc
tests/test_textfmts.py
+tests/test_textfmts.pyc
tests/test_token.py
+tests/test_token.pyc
tests/test_unistring.py
+tests/test_unistring.pyc
tests/test_using_api.py
+tests/test_using_api.pyc
tests/test_util.py
+tests/test_util.pyc
tests/dtds/HTML4-f.dtd
tests/dtds/HTML4-s.dtd
tests/dtds/HTML4.dcl
--- /dev/null
+# Sphinx build info version 1
+# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
+config: 0670439a985eaa37a8495ece7eb186a6
+tags: 645f666f9bcd5a90fca523b33c5a78b7
--- /dev/null
+.. -*- mode: rst -*-
+
+=====================
+The full Pygments API
+=====================
+
+This page describes the Pygments API.
+
+High-level API
+==============
+
+.. module:: pygments
+
+Functions from the :mod:`pygments` module:
+
+.. function:: lex(code, lexer)
+
+ Lex `code` with the `lexer` (must be a `Lexer` instance)
+ and return an iterable of tokens. Currently, this only calls
+ `lexer.get_tokens()`.
+
+.. function:: format(tokens, formatter, outfile=None)
+
+ Format a token stream (iterable of tokens) `tokens` with the
+ `formatter` (must be a `Formatter` instance). The result is
+ written to `outfile`, or if that is ``None``, returned as a
+ string.
+
+.. function:: highlight(code, lexer, formatter, outfile=None)
+
+ This is the most high-level highlighting function.
+ It combines `lex` and `format` in one function.
+
+
+.. module:: pygments.lexers
+
+Functions from :mod:`pygments.lexers`:
+
+.. function:: get_lexer_by_name(alias, **options)
+
+ Return an instance of a `Lexer` subclass that has `alias` in its
+ aliases list. The lexer is given the `options` at its
+ instantiation.
+
+ Will raise :exc:`pygments.util.ClassNotFound` if no lexer with that alias is
+ found.
+
+.. function:: get_lexer_for_filename(fn, **options)
+
+ Return a `Lexer` subclass instance that has a filename pattern
+ matching `fn`. The lexer is given the `options` at its
+ instantiation.
+
+ Will raise :exc:`pygments.util.ClassNotFound` if no lexer for that filename
+ is found.
+
+.. function:: get_lexer_for_mimetype(mime, **options)
+
+ Return a `Lexer` subclass instance that has `mime` in its mimetype
+ list. The lexer is given the `options` at its instantiation.
+
+ Will raise :exc:`pygments.util.ClassNotFound` if not lexer for that mimetype
+ is found.
+
+.. function:: guess_lexer(text, **options)
+
+ Return a `Lexer` subclass instance that's guessed from the text in
+ `text`. For that, the :meth:`.analyse_text()` method of every known lexer
+ class is called with the text as argument, and the lexer which returned the
+ highest value will be instantiated and returned.
+
+ :exc:`pygments.util.ClassNotFound` is raised if no lexer thinks it can
+ handle the content.
+
+.. function:: guess_lexer_for_filename(filename, text, **options)
+
+ As :func:`guess_lexer()`, but only lexers which have a pattern in `filenames`
+ or `alias_filenames` that matches `filename` are taken into consideration.
+
+ :exc:`pygments.util.ClassNotFound` is raised if no lexer thinks it can
+ handle the content.
+
+.. function:: get_all_lexers()
+
+ Return an iterable over all registered lexers, yielding tuples in the
+ format::
+
+ (longname, tuple of aliases, tuple of filename patterns, tuple of mimetypes)
+
+ .. versionadded:: 0.6
+
+
+.. module:: pygments.formatters
+
+Functions from :mod:`pygments.formatters`:
+
+.. function:: get_formatter_by_name(alias, **options)
+
+ Return an instance of a :class:`.Formatter` subclass that has `alias` in its
+ aliases list. The formatter is given the `options` at its instantiation.
+
+ Will raise :exc:`pygments.util.ClassNotFound` if no formatter with that
+ alias is found.
+
+.. function:: get_formatter_for_filename(fn, **options)
+
+ Return a :class:`.Formatter` subclass instance that has a filename pattern
+ matching `fn`. The formatter is given the `options` at its instantiation.
+
+ Will raise :exc:`pygments.util.ClassNotFound` if no formatter for that filename
+ is found.
+
+
+.. module:: pygments.styles
+
+Functions from :mod:`pygments.styles`:
+
+.. function:: get_style_by_name(name)
+
+ Return a style class by its short name. The names of the builtin styles
+ are listed in :data:`pygments.styles.STYLE_MAP`.
+
+ Will raise :exc:`pygments.util.ClassNotFound` if no style of that name is
+ found.
+
+.. function:: get_all_styles()
+
+ Return an iterable over all registered styles, yielding their names.
+
+ .. versionadded:: 0.6
+
+
+.. module:: pygments.lexer
+
+Lexers
+======
+
+The base lexer class from which all lexers are derived is:
+
+.. class:: Lexer(**options)
+
+ The constructor takes a \*\*keywords dictionary of options.
+ Every subclass must first process its own options and then call
+ the `Lexer` constructor, since it processes the `stripnl`,
+ `stripall` and `tabsize` options.
+
+ An example looks like this:
+
+ .. sourcecode:: python
+
+ def __init__(self, **options):
+ self.compress = options.get('compress', '')
+ Lexer.__init__(self, **options)
+
+ As these options must all be specifiable as strings (due to the
+ command line usage), there are various utility functions
+ available to help with that, see `Option processing`_.
+
+ .. method:: get_tokens(text)
+
+ This method is the basic interface of a lexer. It is called by
+ the `highlight()` function. It must process the text and return an
+ iterable of ``(tokentype, value)`` pairs from `text`.
+
+ Normally, you don't need to override this method. The default
+ implementation processes the `stripnl`, `stripall` and `tabsize`
+ options and then yields all tokens from `get_tokens_unprocessed()`,
+ with the ``index`` dropped.
+
+ .. method:: get_tokens_unprocessed(text)
+
+ This method should process the text and return an iterable of
+ ``(index, tokentype, value)`` tuples where ``index`` is the starting
+ position of the token within the input text.
+
+ This method must be overridden by subclasses.
+
+ .. staticmethod:: analyse_text(text)
+
+ A static method which is called for lexer guessing. It should analyse
+ the text and return a float in the range from ``0.0`` to ``1.0``.
+ If it returns ``0.0``, the lexer will not be selected as the most
+ probable one, if it returns ``1.0``, it will be selected immediately.
+
+ .. note:: You don't have to add ``@staticmethod`` to the definition of
+ this method, this will be taken care of by the Lexer's metaclass.
+
+ For a list of known tokens have a look at the :doc:`tokens` page.
+
+ A lexer also can have the following attributes (in fact, they are mandatory
+ except `alias_filenames`) that are used by the builtin lookup mechanism.
+
+ .. attribute:: name
+
+ Full name for the lexer, in human-readable form.
+
+ .. attribute:: aliases
+
+ A list of short, unique identifiers that can be used to lookup
+ the lexer from a list, e.g. using `get_lexer_by_name()`.
+
+ .. attribute:: filenames
+
+ A list of `fnmatch` patterns that match filenames which contain
+ content for this lexer. The patterns in this list should be unique among
+ all lexers.
+
+ .. attribute:: alias_filenames
+
+ A list of `fnmatch` patterns that match filenames which may or may not
+ contain content for this lexer. This list is used by the
+ :func:`.guess_lexer_for_filename()` function, to determine which lexers
+ are then included in guessing the correct one. That means that
+ e.g. every lexer for HTML and a template language should include
+ ``\*.html`` in this list.
+
+ .. attribute:: mimetypes
+
+ A list of MIME types for content that can be lexed with this
+ lexer.
+
+
+.. module:: pygments.formatter
+
+Formatters
+==========
+
+A formatter is derived from this class:
+
+
+.. class:: Formatter(**options)
+
+ As with lexers, this constructor processes options and then must call the
+ base class :meth:`__init__`.
+
+ The :class:`Formatter` class recognizes the options `style`, `full` and
+ `title`. It is up to the formatter class whether it uses them.
+
+ .. method:: get_style_defs(arg='')
+
+ This method must return statements or declarations suitable to define
+ the current style for subsequent highlighted text (e.g. CSS classes
+ in the `HTMLFormatter`).
+
+ The optional argument `arg` can be used to modify the generation and
+ is formatter dependent (it is standardized because it can be given on
+ the command line).
+
+ This method is called by the ``-S`` :doc:`command-line option <cmdline>`,
+ the `arg` is then given by the ``-a`` option.
+
+ .. method:: format(tokensource, outfile)
+
+ This method must format the tokens from the `tokensource` iterable and
+ write the formatted version to the file object `outfile`.
+
+ Formatter options can control how exactly the tokens are converted.
+
+ .. versionadded:: 0.7
+ A formatter must have the following attributes that are used by the
+ builtin lookup mechanism.
+
+ .. attribute:: name
+
+ Full name for the formatter, in human-readable form.
+
+ .. attribute:: aliases
+
+ A list of short, unique identifiers that can be used to lookup
+ the formatter from a list, e.g. using :func:`.get_formatter_by_name()`.
+
+ .. attribute:: filenames
+
+ A list of :mod:`fnmatch` patterns that match filenames for which this
+ formatter can produce output. The patterns in this list should be unique
+ among all formatters.
+
+
+.. module:: pygments.util
+
+Option processing
+=================
+
+The :mod:`pygments.util` module has some utility functions usable for option
+processing:
+
+.. exception:: OptionError
+
+ This exception will be raised by all option processing functions if
+ the type or value of the argument is not correct.
+
+.. function:: get_bool_opt(options, optname, default=None)
+
+ Interpret the key `optname` from the dictionary `options` as a boolean and
+ return it. Return `default` if `optname` is not in `options`.
+
+ The valid string values for ``True`` are ``1``, ``yes``, ``true`` and
+ ``on``, the ones for ``False`` are ``0``, ``no``, ``false`` and ``off``
+ (matched case-insensitively).
+
+.. function:: get_int_opt(options, optname, default=None)
+
+ As :func:`get_bool_opt`, but interpret the value as an integer.
+
+.. function:: get_list_opt(options, optname, default=None)
+
+ If the key `optname` from the dictionary `options` is a string,
+ split it at whitespace and return it. If it is already a list
+ or a tuple, it is returned as a list.
+
+.. function:: get_choice_opt(options, optname, allowed, default=None)
+
+ If the key `optname` from the dictionary is not in the sequence
+ `allowed`, raise an error, otherwise return it.
+
+ .. versionadded:: 0.8
--- /dev/null
+Full contributor list
+=====================
+
+.. include:: ../../AUTHORS
--- /dev/null
+.. include:: ../../CHANGES
--- /dev/null
+.. -*- mode: rst -*-
+
+======================
+Command Line Interface
+======================
+
+You can use Pygments from the shell, provided you installed the
+:program:`pygmentize` script::
+
+ $ pygmentize test.py
+ print "Hello World"
+
+will print the file test.py to standard output, using the Python lexer
+(inferred from the file name extension) and the terminal formatter (because
+you didn't give an explicit formatter name).
+
+If you want HTML output::
+
+ $ pygmentize -f html -l python -o test.html test.py
+
+As you can see, the -l option explicitly selects a lexer. As seen above, if you
+give an input file name and it has an extension that Pygments recognizes, you can
+omit this option.
+
+The ``-o`` option gives an output file name. If it is not given, output is
+written to stdout.
+
+The ``-f`` option selects a formatter (as with ``-l``, it can also be omitted
+if an output file name is given and has a supported extension).
+If no output file name is given and ``-f`` is omitted, the
+:class:`.TerminalFormatter` is used.
+
+The above command could therefore also be given as::
+
+ $ pygmentize -o test.html test.py
+
+To create a full HTML document, including line numbers and stylesheet (using the
+"emacs" style), highlighting the Python file ``test.py`` to ``test.html``::
+
+ $ pygmentize -O full,style=emacs -o test.html test.py
+
+
+Options and filters
+-------------------
+
+Lexer and formatter options can be given using the ``-O`` option::
+
+ $ pygmentize -f html -O style=colorful,linenos=1 -l python test.py
+
+Be sure to enclose the option string in quotes if it contains any special shell
+characters, such as spaces or expansion wildcards like ``*``. If an option
+expects a list value, separate the list entries with spaces (you'll have to
+quote the option value in this case too, so that the shell doesn't split it).
+
+Since the ``-O`` option argument is split at commas and expects the split values
+to be of the form ``name=value``, you can't give an option value that contains
+commas or equals signs. Therefore, an option ``-P`` is provided (as of Pygments
+0.9) that works like ``-O`` but can only pass one option per ``-P``. Its value
+can then contain all characters::
+
+ $ pygmentize -P "heading=Pygments, the Python highlighter" ...
+
+Filters are added to the token stream using the ``-F`` option::
+
+ $ pygmentize -f html -l pascal -F keywordcase:case=upper main.pas
+
+As you see, options for the filter are given after a colon. As for ``-O``, the
+filter name and options must be one shell word, so there may not be any spaces
+around the colon.
+
+
+Generating styles
+-----------------
+
+Formatters normally don't output full style information. For example, the HTML
+formatter by default only outputs ``<span>`` tags with ``class`` attributes.
+Therefore, there's a special ``-S`` option for generating style definitions.
+Usage is as follows::
+
+ $ pygmentize -f html -S colorful -a .syntax
+
+generates a CSS style sheet (because you selected the HTML formatter) for
+the "colorful" style prepending a ".syntax" selector to all style rules.
+
+For an explanation what ``-a`` means for :doc:`a particular formatter
+<formatters>`, look for the `arg` argument for the formatter's
+:meth:`.get_style_defs()` method.
+
+
+Getting lexer names
+-------------------
+
+.. versionadded:: 1.0
+
+The ``-N`` option guesses a lexer name for a given filename, so that ::
+
+ $ pygmentize -N setup.py
+
+will print out ``python``. It won't highlight anything yet. If no specific
+lexer is known for that filename, ``text`` is printed.
+
+
+Getting help
+------------
+
+The ``-L`` option lists lexers, formatters, along with their short
+names and supported file name extensions, styles and filters. If you want to see
+only one category, give it as an argument::
+
+ $ pygmentize -L filters
+
+will list only all installed filters.
+
+The ``-H`` option will give you detailed information (the same that can be found
+in this documentation) about a lexer, formatter or filter. Usage is as follows::
+
+ $ pygmentize -H formatter html
+
+will print the help for the HTML formatter, while ::
+
+ $ pygmentize -H lexer python
+
+will print the help for the Python lexer, etc.
+
+
+A note on encodings
+-------------------
+
+.. versionadded:: 0.9
+
+Pygments tries to be smart regarding encodings in the formatting process:
+
+* If you give an ``encoding`` option, it will be used as the input and
+ output encoding.
+
+* If you give an ``outencoding`` option, it will override ``encoding``
+ as the output encoding.
+
+* If you give an ``inencoding`` option, it will override ``encoding``
+ as the input encoding.
+
+* If you don't give an encoding and have given an output file, the default
+ encoding for lexer and formatter is the terminal encoding or the default
+ locale encoding of the system. As a last resort, ``latin1`` is used (which
+ will pass through all non-ASCII characters).
+
+* If you don't give an encoding and haven't given an output file (that means
+ output is written to the console), the default encoding for lexer and
+ formatter is the terminal encoding (``sys.stdout.encoding``).
--- /dev/null
+.. -*- mode: rst -*-
+
+=====================
+Write your own filter
+=====================
+
+.. versionadded:: 0.7
+
+Writing own filters is very easy. All you have to do is to subclass
+the `Filter` class and override the `filter` method. Additionally a
+filter is instanciated with some keyword arguments you can use to
+adjust the behavior of your filter.
+
+
+Subclassing Filters
+===================
+
+As an example, we write a filter that converts all `Name.Function` tokens
+to normal `Name` tokens to make the output less colorful.
+
+.. sourcecode:: python
+
+ from pygments.util import get_bool_opt
+ from pygments.token import Name
+ from pygments.filter import Filter
+
+ class UncolorFilter(Filter):
+
+ def __init__(self, **options):
+ Filter.__init__(self, **options)
+ self.class_too = get_bool_opt(options, 'classtoo')
+
+ def filter(self, lexer, stream):
+ for ttype, value in stream:
+ if ttype is Name.Function or (self.class_too and
+ ttype is Name.Class):
+ ttype = Name
+ yield ttype, value
+
+Some notes on the `lexer` argument: that can be quite confusing since it doesn't
+need to be a lexer instance. If a filter was added by using the `add_filter()`
+function of lexers, that lexer is registered for the filter. In that case
+`lexer` will refer to the lexer that has registered the filter. It *can* be used
+to access options passed to a lexer. Because it could be `None` you always have
+to check for that case if you access it.
+
+
+Using a decorator
+=================
+
+You can also use the `simplefilter` decorator from the `pygments.filter` module:
+
+.. sourcecode:: python
+
+ from pygments.util import get_bool_opt
+ from pygments.token import Name
+ from pygments.filter import simplefilter
+
+
+ @simplefilter
+ def uncolor(lexer, stream, options):
+ class_too = get_bool_opt(options, 'classtoo')
+ for ttype, value in stream:
+ if ttype is Name.Function or (class_too and
+ ttype is Name.Class):
+ ttype = Name
+ yield ttype, value
+
+The decorator automatically subclasses an internal filter class and uses the
+decorated function for filtering.
--- /dev/null
+.. -*- mode: rst -*-
+
+=======
+Filters
+=======
+
+.. versionadded:: 0.7
+
+You can filter token streams coming from lexers to improve or annotate the
+output. For example, you can highlight special words in comments, convert
+keywords to upper or lowercase to enforce a style guide etc.
+
+To apply a filter, you can use the `add_filter()` method of a lexer:
+
+.. sourcecode:: pycon
+
+ >>> from pygments.lexers import PythonLexer
+ >>> l = PythonLexer()
+ >>> # add a filter given by a string and options
+ >>> l.add_filter('codetagify', case='lower')
+ >>> l.filters
+ [<pygments.filters.CodeTagFilter object at 0xb785decc>]
+ >>> from pygments.filters import KeywordCaseFilter
+ >>> # or give an instance
+ >>> l.add_filter(KeywordCaseFilter(case='lower'))
+
+The `add_filter()` method takes keyword arguments which are forwarded to
+the constructor of the filter.
+
+To get a list of all registered filters by name, you can use the
+`get_all_filters()` function from the `pygments.filters` module that returns an
+iterable for all known filters.
+
+If you want to write your own filter, have a look at :doc:`Write your own filter
+<filterdevelopment>`.
+
+
+Builtin Filters
+===============
+
+.. pygmentsdoc:: filters
--- /dev/null
+.. -*- mode: rst -*-
+
+========================
+Write your own formatter
+========================
+
+As well as creating :doc:`your own lexer <lexerdevelopment>`, writing a new
+formatter for Pygments is easy and straightforward.
+
+A formatter is a class that is initialized with some keyword arguments (the
+formatter options) and that must provides a `format()` method.
+Additionally a formatter should provide a `get_style_defs()` method that
+returns the style definitions from the style in a form usable for the
+formatter's output format.
+
+
+Quickstart
+==========
+
+The most basic formatter shipped with Pygments is the `NullFormatter`. It just
+sends the value of a token to the output stream:
+
+.. sourcecode:: python
+
+ from pygments.formatter import Formatter
+
+ class NullFormatter(Formatter):
+ def format(self, tokensource, outfile):
+ for ttype, value in tokensource:
+ outfile.write(value)
+
+As you can see, the `format()` method is passed two parameters: `tokensource`
+and `outfile`. The first is an iterable of ``(token_type, value)`` tuples,
+the latter a file like object with a `write()` method.
+
+Because the formatter is that basic it doesn't overwrite the `get_style_defs()`
+method.
+
+
+Styles
+======
+
+Styles aren't instantiated but their metaclass provides some class functions
+so that you can access the style definitions easily.
+
+Styles are iterable and yield tuples in the form ``(ttype, d)`` where `ttype`
+is a token and `d` is a dict with the following keys:
+
+``'color'``
+ Hexadecimal color value (eg: ``'ff0000'`` for red) or `None` if not
+ defined.
+
+``'bold'``
+ `True` if the value should be bold
+
+``'italic'``
+ `True` if the value should be italic
+
+``'underline'``
+ `True` if the value should be underlined
+
+``'bgcolor'``
+ Hexadecimal color value for the background (eg: ``'eeeeeee'`` for light
+ gray) or `None` if not defined.
+
+``'border'``
+ Hexadecimal color value for the border (eg: ``'0000aa'`` for a dark
+ blue) or `None` for no border.
+
+Additional keys might appear in the future, formatters should ignore all keys
+they don't support.
+
+
+HTML 3.2 Formatter
+==================
+
+For an more complex example, let's implement a HTML 3.2 Formatter. We don't
+use CSS but inline markup (``<u>``, ``<font>``, etc). Because this isn't good
+style this formatter isn't in the standard library ;-)
+
+.. sourcecode:: python
+
+ from pygments.formatter import Formatter
+
+ class OldHtmlFormatter(Formatter):
+
+ def __init__(self, **options):
+ Formatter.__init__(self, **options)
+
+ # create a dict of (start, end) tuples that wrap the
+ # value of a token so that we can use it in the format
+ # method later
+ self.styles = {}
+
+ # we iterate over the `_styles` attribute of a style item
+ # that contains the parsed style values.
+ for token, style in self.style:
+ start = end = ''
+ # a style item is a tuple in the following form:
+ # colors are readily specified in hex: 'RRGGBB'
+ if style['color']:
+ start += '<font color="#%s">' % style['color']
+ end = '</font>' + end
+ if style['bold']:
+ start += '<b>'
+ end = '</b>' + end
+ if style['italic']:
+ start += '<i>'
+ end = '</i>' + end
+ if style['underline']:
+ start += '<u>'
+ end = '</u>' + end
+ self.styles[token] = (start, end)
+
+ def format(self, tokensource, outfile):
+ # lastval is a string we use for caching
+ # because it's possible that an lexer yields a number
+ # of consecutive tokens with the same token type.
+ # to minimize the size of the generated html markup we
+ # try to join the values of same-type tokens here
+ lastval = ''
+ lasttype = None
+
+ # wrap the whole output with <pre>
+ outfile.write('<pre>')
+
+ for ttype, value in tokensource:
+ # if the token type doesn't exist in the stylemap
+ # we try it with the parent of the token type
+ # eg: parent of Token.Literal.String.Double is
+ # Token.Literal.String
+ while ttype not in self.styles:
+ ttype = ttype.parent
+ if ttype == lasttype:
+ # the current token type is the same of the last
+ # iteration. cache it
+ lastval += value
+ else:
+ # not the same token as last iteration, but we
+ # have some data in the buffer. wrap it with the
+ # defined style and write it to the output file
+ if lastval:
+ stylebegin, styleend = self.styles[lasttype]
+ outfile.write(stylebegin + lastval + styleend)
+ # set lastval/lasttype to current values
+ lastval = value
+ lasttype = ttype
+
+ # if something is left in the buffer, write it to the
+ # output file, then close the opened <pre> tag
+ if lastval:
+ stylebegin, styleend = self.styles[lasttype]
+ outfile.write(stylebegin + lastval + styleend)
+ outfile.write('</pre>\n')
+
+The comments should explain it. Again, this formatter doesn't override the
+`get_style_defs()` method. If we would have used CSS classes instead of
+inline HTML markup, we would need to generate the CSS first. For that
+purpose the `get_style_defs()` method exists:
+
+
+Generating Style Definitions
+============================
+
+Some formatters like the `LatexFormatter` and the `HtmlFormatter` don't
+output inline markup but reference either macros or css classes. Because
+the definitions of those are not part of the output, the `get_style_defs()`
+method exists. It is passed one parameter (if it's used and how it's used
+is up to the formatter) and has to return a string or ``None``.
--- /dev/null
+.. -*- mode: rst -*-
+
+====================
+Available formatters
+====================
+
+This page lists all builtin formatters.
+
+Common options
+==============
+
+All formatters support these options:
+
+`encoding`
+ If given, must be an encoding name (such as ``"utf-8"``). This will
+ be used to convert the token strings (which are Unicode strings)
+ to byte strings in the output (default: ``None``).
+ It will also be written in an encoding declaration suitable for the
+ document format if the `full` option is given (e.g. a ``meta
+ content-type`` directive in HTML or an invocation of the `inputenc`
+ package in LaTeX).
+
+ If this is ``""`` or ``None``, Unicode strings will be written
+ to the output file, which most file-like objects do not support.
+ For example, `pygments.highlight()` will return a Unicode string if
+ called with no `outfile` argument and a formatter that has `encoding`
+ set to ``None`` because it uses a `StringIO.StringIO` object that
+ supports Unicode arguments to `write()`. Using a regular file object
+ wouldn't work.
+
+ .. versionadded:: 0.6
+
+`outencoding`
+ When using Pygments from the command line, any `encoding` option given is
+ passed to the lexer and the formatter. This is sometimes not desirable,
+ for example if you want to set the input encoding to ``"guess"``.
+ Therefore, `outencoding` has been introduced which overrides `encoding`
+ for the formatter if given.
+
+ .. versionadded:: 0.7
+
+
+Formatter classes
+=================
+
+All these classes are importable from :mod:`pygments.formatters`.
+
+.. pygmentsdoc:: formatters
--- /dev/null
+Pygments documentation
+======================
+
+**Starting with Pygments**
+
+.. toctree::
+ :maxdepth: 1
+
+ ../download
+ quickstart
+ cmdline
+
+**Builtin components**
+
+.. toctree::
+ :maxdepth: 1
+
+ lexers
+ filters
+ formatters
+ styles
+
+**Reference**
+
+.. toctree::
+ :maxdepth: 1
+
+ unicode
+ tokens
+ api
+
+**Hacking for Pygments**
+
+.. toctree::
+ :maxdepth: 1
+
+ lexerdevelopment
+ formatterdevelopment
+ filterdevelopment
+ plugins
+
+**Hints and tricks**
+
+.. toctree::
+ :maxdepth: 1
+
+ rstdirective
+ moinmoin
+ java
+ integrate
+
+**About Pygments**
+
+.. toctree::
+ :maxdepth: 1
+
+ changelog
+ authors
+
+
+If you find bugs or have suggestions for the documentation, please look
+:ref:`here <contribute>` for info on how to contact the team.
+
+.. XXX You can download an offline version of this documentation from the
+ :doc:`download page </download>`.
+
--- /dev/null
+.. -*- mode: rst -*-
+
+===================================
+Using Pygments in various scenarios
+===================================
+
+PyGtk
+-----
+
+Armin has written a piece of sample code that shows how to create a Gtk
+`TextBuffer` object containing Pygments-highlighted text.
+
+See the article here: http://lucumr.pocoo.org/cogitations/2007/05/30/pygments-gtk-rendering/
+
+Wordpress
+---------
+
+He also has a snippet that shows how to use Pygments in WordPress:
+
+http://lucumr.pocoo.org/cogitations/2007/05/30/pygments-in-wordpress/
+
+Markdown
+--------
+
+Since Pygments 0.9, the distribution ships Markdown_ preprocessor sample code
+that uses Pygments to render source code in
+:file:`external/markdown-processor.py`. You can copy and adapt it to your
+liking.
+
+.. _Markdown: http://www.freewisdom.org/projects/python-markdown/
+
+TextMate
+--------
+
+Antonio Cangiano has created a Pygments bundle for TextMate that allows to
+colorize code via a simple menu option. It can be found here_.
+
+.. _here: http://antoniocangiano.com/2008/10/28/pygments-textmate-bundle/
+
+Bash completion
+---------------
+
+The source distribution contains a file ``external/pygments.bashcomp`` that
+sets up completion for the ``pygmentize`` command in bash.
--- /dev/null
+=====================
+Use Pygments in Java
+=====================
+
+Thanks to `Jython <http://www.jython.org>`__ it is possible to use Pygments in
+Java.
+
+This page is a simple tutorial to get an idea of how this is working. You can
+then look at the `Jython documentation <http://www.jython.org/docs/>`__ for more
+advanced use.
+
+Since version 1.5, Pygments is deployed on `Maven Central
+<http://repo1.maven.org/maven2/org/pygments/pygments/>`__ as a JAR so is Jython
+which makes it a lot easier to create the Java project.
+
+Here is an example of a `Maven <http://www.maven.org>`__ ``pom.xml`` file for a
+project running Pygments:
+
+.. sourcecode:: xml
+
+ <?xml version="1.0" encoding="UTF-8"?>
+
+ <project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>example</groupId>
+ <artifactId>example</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.python</groupId>
+ <artifactId>jython-standalone</artifactId>
+ <version>2.5.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.pygments</groupId>
+ <artifactId>pygments</artifactId>
+ <version>1.5</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </project>
+
+The following Java example:
+
+.. sourcecode:: java
+
+ PythonInterpreter interpreter = new PythonInterpreter();
+
+ // Set a variable with the content you want to work with
+ interpreter.set("code", code);
+
+ // Simple use Pygments as you would in Python
+ interpreter.exec("from pygments import highlight\n"
+ + "from pygments.lexers import PythonLexer\n"
+ + "from pygments.formatters import HtmlFormatter\n"
+ + "\nresult = highlight(code, PythonLexer(), HtmlFormatter())");
+
+ // Get the result that has been set in a variable
+ System.out.println(interpreter.get("result", String.class));
+
+will print something like:
+
+.. sourcecode:: html
+
+ <div class="highlight">
+ <pre><span class="k">print</span> <span class="s">"Hello World"</span></pre>
+ </div>
--- /dev/null
+.. -*- mode: rst -*-
+
+.. highlight:: python
+
+====================
+Write your own lexer
+====================
+
+If a lexer for your favorite language is missing in the Pygments package, you
+can easily write your own and extend Pygments.
+
+All you need can be found inside the :mod:`pygments.lexer` module. As you can
+read in the :doc:`API documentation <api>`, a lexer is a class that is
+initialized with some keyword arguments (the lexer options) and that provides a
+:meth:`.get_tokens_unprocessed()` method which is given a string or unicode
+object with the data to lex.
+
+The :meth:`.get_tokens_unprocessed()` method must return an iterator or iterable
+containing tuples in the form ``(index, token, value)``. Normally you don't
+need to do this since there are base lexers that do most of the work and that
+you can subclass.
+
+
+RegexLexer
+==========
+
+The lexer base class used by almost all of Pygments' lexers is the
+:class:`RegexLexer`. This class allows you to define lexing rules in terms of
+*regular expressions* for different *states*.
+
+States are groups of regular expressions that are matched against the input
+string at the *current position*. If one of these expressions matches, a
+corresponding action is performed (such as yielding a token with a specific
+type, or changing state), the current position is set to where the last match
+ended and the matching process continues with the first regex of the current
+state.
+
+Lexer states are kept on a stack: each time a new state is entered, the new
+state is pushed onto the stack. The most basic lexers (like the `DiffLexer`)
+just need one state.
+
+Each state is defined as a list of tuples in the form (`regex`, `action`,
+`new_state`) where the last item is optional. In the most basic form, `action`
+is a token type (like `Name.Builtin`). That means: When `regex` matches, emit a
+token with the match text and type `tokentype` and push `new_state` on the state
+stack. If the new state is ``'#pop'``, the topmost state is popped from the
+stack instead. To pop more than one state, use ``'#pop:2'`` and so on.
+``'#push'`` is a synonym for pushing the current state on the stack.
+
+The following example shows the `DiffLexer` from the builtin lexers. Note that
+it contains some additional attributes `name`, `aliases` and `filenames` which
+aren't required for a lexer. They are used by the builtin lexer lookup
+functions. ::
+
+ from pygments.lexer import RegexLexer
+ from pygments.token import *
+
+ class DiffLexer(RegexLexer):
+ name = 'Diff'
+ aliases = ['diff']
+ filenames = ['*.diff']
+
+ tokens = {
+ 'root': [
+ (r' .*\n', Text),
+ (r'\+.*\n', Generic.Inserted),
+ (r'-.*\n', Generic.Deleted),
+ (r'@.*\n', Generic.Subheading),
+ (r'Index.*\n', Generic.Heading),
+ (r'=.*\n', Generic.Heading),
+ (r'.*\n', Text),
+ ]
+ }
+
+As you can see this lexer only uses one state. When the lexer starts scanning
+the text, it first checks if the current character is a space. If this is true
+it scans everything until newline and returns the data as a `Text` token (which
+is the "no special highlighting" token).
+
+If this rule doesn't match, it checks if the current char is a plus sign. And
+so on.
+
+If no rule matches at the current position, the current char is emitted as an
+`Error` token that indicates a lexing error, and the position is increased by
+one.
+
+
+Adding and testing a new lexer
+==============================
+
+To make pygments aware of your new lexer, you have to perform the following
+steps:
+
+First, change to the current directory containing the pygments source code:
+
+.. code-block:: console
+
+ $ cd .../pygments-main
+
+Select a matching module under ``pygments/lexers``, or create a new module for
+your lexer class.
+
+Next, make sure the lexer is known from outside of the module. All modules in
+the ``pygments.lexers`` specify ``__all__``. For example, ``esoteric.py`` sets::
+
+ __all__ = ['BrainfuckLexer', 'BefungeLexer', ...]
+
+Simply add the name of your lexer class to this list.
+
+Finally the lexer can be made publicly known by rebuilding the lexer mapping:
+
+.. code-block:: console
+
+ $ make mapfiles
+
+To test the new lexer, store an example file with the proper extension in
+``tests/examplefiles``. For example, to test your ``DiffLexer``, add a
+``tests/examplefiles/example.diff`` containing a sample diff output.
+
+Now you can use pygmentize to render your example to HTML:
+
+.. code-block:: console
+
+ $ ./pygmentize -O full -f html -o /tmp/example.html tests/examplefiles/example.diff
+
+Note that this explicitely calls the ``pygmentize`` in the current directory
+by preceding it with ``./``. This ensures your modifications are used.
+Otherwise a possibly already installed, unmodified version without your new
+lexer would have been called from the system search path (``$PATH``).
+
+To view the result, open ``/tmp/example.html`` in your browser.
+
+Once the example renders as expected, you should run the complete test suite:
+
+.. code-block:: console
+
+ $ make test
+
+It also tests that your lexer fulfills the lexer API and certain invariants,
+such as that the concatenation of all token text is the same as the input text.
+
+
+Regex Flags
+===========
+
+You can either define regex flags locally in the regex (``r'(?x)foo bar'``) or
+globally by adding a `flags` attribute to your lexer class. If no attribute is
+defined, it defaults to `re.MULTILINE`. For more informations about regular
+expression flags see the page about `regular expressions`_ in the Python
+documentation.
+
+.. _regular expressions: http://docs.python.org/library/re.html#regular-expression-syntax
+
+
+Scanning multiple tokens at once
+================================
+
+So far, the `action` element in the rule tuple of regex, action and state has
+been a single token type. Now we look at the first of several other possible
+values.
+
+Here is a more complex lexer that highlights INI files. INI files consist of
+sections, comments and ``key = value`` pairs::
+
+ from pygments.lexer import RegexLexer, bygroups
+ from pygments.token import *
+
+ class IniLexer(RegexLexer):
+ name = 'INI'
+ aliases = ['ini', 'cfg']
+ filenames = ['*.ini', '*.cfg']
+
+ tokens = {
+ 'root': [
+ (r'\s+', Text),
+ (r';.*?$', Comment),
+ (r'\[.*?\]$', Keyword),
+ (r'(.*?)(\s*)(=)(\s*)(.*?)$',
+ bygroups(Name.Attribute, Text, Operator, Text, String))
+ ]
+ }
+
+The lexer first looks for whitespace, comments and section names. Later it
+looks for a line that looks like a key, value pair, separated by an ``'='``
+sign, and optional whitespace.
+
+The `bygroups` helper yields each capturing group in the regex with a different
+token type. First the `Name.Attribute` token, then a `Text` token for the
+optional whitespace, after that a `Operator` token for the equals sign. Then a
+`Text` token for the whitespace again. The rest of the line is returned as
+`String`.
+
+Note that for this to work, every part of the match must be inside a capturing
+group (a ``(...)``), and there must not be any nested capturing groups. If you
+nevertheless need a group, use a non-capturing group defined using this syntax:
+``(?:some|words|here)`` (note the ``?:`` after the beginning parenthesis).
+
+If you find yourself needing a capturing group inside the regex which shouldn't
+be part of the output but is used in the regular expressions for backreferencing
+(eg: ``r'(<(foo|bar)>)(.*?)(</\2>)'``), you can pass `None` to the bygroups
+function and that group will be skipped in the output.
+
+
+Changing states
+===============
+
+Many lexers need multiple states to work as expected. For example, some
+languages allow multiline comments to be nested. Since this is a recursive
+pattern it's impossible to lex just using regular expressions.
+
+Here is a lexer that recognizes C++ style comments (multi-line with ``/* */``
+and single-line with ``//`` until end of line)::
+
+ from pygments.lexer import RegexLexer
+ from pygments.token import *
+
+ class CppCommentLexer(RegexLexer):
+ name = 'Example Lexer with states'
+
+ tokens = {
+ 'root': [
+ (r'[^/]+', Text),
+ (r'/\*', Comment.Multiline, 'comment'),
+ (r'//.*?$', Comment.Singleline),
+ (r'/', Text)
+ ],
+ 'comment': [
+ (r'[^*/]', Comment.Multiline),
+ (r'/\*', Comment.Multiline, '#push'),
+ (r'\*/', Comment.Multiline, '#pop'),
+ (r'[*/]', Comment.Multiline)
+ ]
+ }
+
+This lexer starts lexing in the ``'root'`` state. It tries to match as much as
+possible until it finds a slash (``'/'``). If the next character after the slash
+is an asterisk (``'*'``) the `RegexLexer` sends those two characters to the
+output stream marked as `Comment.Multiline` and continues lexing with the rules
+defined in the ``'comment'`` state.
+
+If there wasn't an asterisk after the slash, the `RegexLexer` checks if it's a
+singleline comment (i.e. followed by a second slash). If this also wasn't the
+case it must be a single slash, which is not a comment starter (the separate
+regex for a single slash must also be given, else the slash would be marked as
+an error token).
+
+Inside the ``'comment'`` state, we do the same thing again. Scan until the
+lexer finds a star or slash. If it's the opening of a multiline comment, push
+the ``'comment'`` state on the stack and continue scanning, again in the
+``'comment'`` state. Else, check if it's the end of the multiline comment. If
+yes, pop one state from the stack.
+
+Note: If you pop from an empty stack you'll get an `IndexError`. (There is an
+easy way to prevent this from happening: don't ``'#pop'`` in the root state).
+
+If the `RegexLexer` encounters a newline that is flagged as an error token, the
+stack is emptied and the lexer continues scanning in the ``'root'`` state. This
+can help producing error-tolerant highlighting for erroneous input, e.g. when a
+single-line string is not closed.
+
+
+Advanced state tricks
+=====================
+
+There are a few more things you can do with states:
+
+- You can push multiple states onto the stack if you give a tuple instead of a
+ simple string as the third item in a rule tuple. For example, if you want to
+ match a comment containing a directive, something like:
+
+ .. code-block:: text
+
+ /* <processing directive> rest of comment */
+
+ you can use this rule::
+
+ tokens = {
+ 'root': [
+ (r'/\* <', Comment, ('comment', 'directive')),
+ ...
+ ],
+ 'directive': [
+ (r'[^>]*', Comment.Directive),
+ (r'>', Comment, '#pop'),
+ ],
+ 'comment': [
+ (r'[^*]+', Comment),
+ (r'\*/', Comment, '#pop'),
+ (r'\*', Comment),
+ ]
+ }
+
+ When this encounters the above sample, first ``'comment'`` and ``'directive'``
+ are pushed onto the stack, then the lexer continues in the directive state
+ until it finds the closing ``>``, then it continues in the comment state until
+ the closing ``*/``. Then, both states are popped from the stack again and
+ lexing continues in the root state.
+
+ .. versionadded:: 0.9
+ The tuple can contain the special ``'#push'`` and ``'#pop'`` (but not
+ ``'#pop:n'``) directives.
+
+
+- You can include the rules of a state in the definition of another. This is
+ done by using `include` from `pygments.lexer`::
+
+ from pygments.lexer import RegexLexer, bygroups, include
+ from pygments.token import *
+
+ class ExampleLexer(RegexLexer):
+ tokens = {
+ 'comments': [
+ (r'/\*.*?\*/', Comment),
+ (r'//.*?\n', Comment),
+ ],
+ 'root': [
+ include('comments'),
+ (r'(function )(\w+)( {)',
+ bygroups(Keyword, Name, Keyword), 'function'),
+ (r'.', Text),
+ ],
+ 'function': [
+ (r'[^}/]+', Text),
+ include('comments'),
+ (r'/', Text),
+ (r'\}', Keyword, '#pop'),
+ ]
+ }
+
+ This is a hypothetical lexer for a language that consist of functions and
+ comments. Because comments can occur at toplevel and in functions, we need
+ rules for comments in both states. As you can see, the `include` helper saves
+ repeating rules that occur more than once (in this example, the state
+ ``'comment'`` will never be entered by the lexer, as it's only there to be
+ included in ``'root'`` and ``'function'``).
+
+- Sometimes, you may want to "combine" a state from existing ones. This is
+ possible with the `combined` helper from `pygments.lexer`.
+
+ If you, instead of a new state, write ``combined('state1', 'state2')`` as the
+ third item of a rule tuple, a new anonymous state will be formed from state1
+ and state2 and if the rule matches, the lexer will enter this state.
+
+ This is not used very often, but can be helpful in some cases, such as the
+ `PythonLexer`'s string literal processing.
+
+- If you want your lexer to start lexing in a different state you can modify the
+ stack by overloading the `get_tokens_unprocessed()` method::
+
+ from pygments.lexer import RegexLexer
+
+ class ExampleLexer(RegexLexer):
+ tokens = {...}
+
+ def get_tokens_unprocessed(self, text):
+ stack = ['root', 'otherstate']
+ for item in RegexLexer.get_tokens_unprocessed(text, stack):
+ yield item
+
+ Some lexers like the `PhpLexer` use this to make the leading ``<?php``
+ preprocessor comments optional. Note that you can crash the lexer easily by
+ putting values into the stack that don't exist in the token map. Also
+ removing ``'root'`` from the stack can result in strange errors!
+
+- In some lexers, a state should be popped if anything is encountered that isn't
+ matched by a rule in the state. You could use an empty regex at the end of
+ the state list, but Pygments provides a more obvious way of spelling that:
+ ``default('#pop')`` is equivalent to ``('', Text, '#pop')``.
+
+ .. versionadded:: 2.0
+
+
+Subclassing lexers derived from RegexLexer
+==========================================
+
+.. versionadded:: 1.6
+
+Sometimes multiple languages are very similar, but should still be lexed by
+different lexer classes.
+
+When subclassing a lexer derived from RegexLexer, the ``tokens`` dictionaries
+defined in the parent and child class are merged. For example::
+
+ from pygments.lexer import RegexLexer, inherit
+ from pygments.token import *
+
+ class BaseLexer(RegexLexer):
+ tokens = {
+ 'root': [
+ ('[a-z]+', Name),
+ (r'/\*', Comment, 'comment'),
+ ('"', String, 'string'),
+ ('\s+', Text),
+ ],
+ 'string': [
+ ('[^"]+', String),
+ ('"', String, '#pop'),
+ ],
+ 'comment': [
+ ...
+ ],
+ }
+
+ class DerivedLexer(BaseLexer):
+ tokens = {
+ 'root': [
+ ('[0-9]+', Number),
+ inherit,
+ ],
+ 'string': [
+ (r'[^"\\]+', String),
+ (r'\\.', String.Escape),
+ ('"', String, '#pop'),
+ ],
+ }
+
+The `BaseLexer` defines two states, lexing names and strings. The
+`DerivedLexer` defines its own tokens dictionary, which extends the definitions
+of the base lexer:
+
+* The "root" state has an additional rule and then the special object `inherit`,
+ which tells Pygments to insert the token definitions of the parent class at
+ that point.
+
+* The "string" state is replaced entirely, since there is not `inherit` rule.
+
+* The "comment" state is inherited entirely.
+
+
+Using multiple lexers
+=====================
+
+Using multiple lexers for the same input can be tricky. One of the easiest
+combination techniques is shown here: You can replace the action entry in a rule
+tuple with a lexer class. The matched text will then be lexed with that lexer,
+and the resulting tokens will be yielded.
+
+For example, look at this stripped-down HTML lexer::
+
+ from pygments.lexer import RegexLexer, bygroups, using
+ from pygments.token import *
+ from pygments.lexers.javascript import JavascriptLexer
+
+ class HtmlLexer(RegexLexer):
+ name = 'HTML'
+ aliases = ['html']
+ filenames = ['*.html', '*.htm']
+
+ flags = re.IGNORECASE | re.DOTALL
+ tokens = {
+ 'root': [
+ ('[^<&]+', Text),
+ ('&.*?;', Name.Entity),
+ (r'<\s*script\s*', Name.Tag, ('script-content', 'tag')),
+ (r'<\s*[a-zA-Z0-9:]+', Name.Tag, 'tag'),
+ (r'<\s*/\s*[a-zA-Z0-9:]+\s*>', Name.Tag),
+ ],
+ 'script-content': [
+ (r'(.+?)(<\s*/\s*script\s*>)',
+ bygroups(using(JavascriptLexer), Name.Tag),
+ '#pop'),
+ ]
+ }
+
+Here the content of a ``<script>`` tag is passed to a newly created instance of
+a `JavascriptLexer` and not processed by the `HtmlLexer`. This is done using
+the `using` helper that takes the other lexer class as its parameter.
+
+Note the combination of `bygroups` and `using`. This makes sure that the
+content up to the ``</script>`` end tag is processed by the `JavascriptLexer`,
+while the end tag is yielded as a normal token with the `Name.Tag` type.
+
+Also note the ``(r'<\s*script\s*', Name.Tag, ('script-content', 'tag'))`` rule.
+Here, two states are pushed onto the state stack, ``'script-content'`` and
+``'tag'``. That means that first ``'tag'`` is processed, which will lex
+attributes and the closing ``>``, then the ``'tag'`` state is popped and the
+next state on top of the stack will be ``'script-content'``.
+
+Since you cannot refer to the class currently being defined, use `this`
+(imported from `pygments.lexer`) to refer to the current lexer class, i.e.
+``using(this)``. This construct may seem unnecessary, but this is often the
+most obvious way of lexing arbitrary syntax between fixed delimiters without
+introducing deeply nested states.
+
+The `using()` helper has a special keyword argument, `state`, which works as
+follows: if given, the lexer to use initially is not in the ``"root"`` state,
+but in the state given by this argument. This does not work with advanced
+`RegexLexer` subclasses such as `ExtendedRegexLexer` (see below).
+
+Any other keywords arguments passed to `using()` are added to the keyword
+arguments used to create the lexer.
+
+
+Delegating Lexer
+================
+
+Another approach for nested lexers is the `DelegatingLexer` which is for example
+used for the template engine lexers. It takes two lexers as arguments on
+initialisation: a `root_lexer` and a `language_lexer`.
+
+The input is processed as follows: First, the whole text is lexed with the
+`language_lexer`. All tokens yielded with the special type of ``Other`` are
+then concatenated and given to the `root_lexer`. The language tokens of the
+`language_lexer` are then inserted into the `root_lexer`'s token stream at the
+appropriate positions. ::
+
+ from pygments.lexer import DelegatingLexer
+ from pygments.lexers.web import HtmlLexer, PhpLexer
+
+ class HtmlPhpLexer(DelegatingLexer):
+ def __init__(self, **options):
+ super(HtmlPhpLexer, self).__init__(HtmlLexer, PhpLexer, **options)
+
+This procedure ensures that e.g. HTML with template tags in it is highlighted
+correctly even if the template tags are put into HTML tags or attributes.
+
+If you want to change the needle token ``Other`` to something else, you can give
+the lexer another token type as the third parameter::
+
+ DelegatingLexer.__init__(MyLexer, OtherLexer, Text, **options)
+
+
+Callbacks
+=========
+
+Sometimes the grammar of a language is so complex that a lexer would be unable
+to process it just by using regular expressions and stacks.
+
+For this, the `RegexLexer` allows callbacks to be given in rule tuples, instead
+of token types (`bygroups` and `using` are nothing else but preimplemented
+callbacks). The callback must be a function taking two arguments:
+
+* the lexer itself
+* the match object for the last matched rule
+
+The callback must then return an iterable of (or simply yield) ``(index,
+tokentype, value)`` tuples, which are then just passed through by
+`get_tokens_unprocessed()`. The ``index`` here is the position of the token in
+the input string, ``tokentype`` is the normal token type (like `Name.Builtin`),
+and ``value`` the associated part of the input string.
+
+You can see an example here::
+
+ from pygments.lexer import RegexLexer
+ from pygments.token import Generic
+
+ class HypotheticLexer(RegexLexer):
+
+ def headline_callback(lexer, match):
+ equal_signs = match.group(1)
+ text = match.group(2)
+ yield match.start(), Generic.Headline, equal_signs + text + equal_signs
+
+ tokens = {
+ 'root': [
+ (r'(=+)(.*?)(\1)', headline_callback)
+ ]
+ }
+
+If the regex for the `headline_callback` matches, the function is called with
+the match object. Note that after the callback is done, processing continues
+normally, that is, after the end of the previous match. The callback has no
+possibility to influence the position.
+
+There are not really any simple examples for lexer callbacks, but you can see
+them in action e.g. in the `SMLLexer` class in `ml.py`_.
+
+.. _ml.py: http://bitbucket.org/birkenfeld/pygments-main/src/tip/pygments/lexers/ml.py
+
+
+The ExtendedRegexLexer class
+============================
+
+The `RegexLexer`, even with callbacks, unfortunately isn't powerful enough for
+the funky syntax rules of languages such as Ruby.
+
+But fear not; even then you don't have to abandon the regular expression
+approach: Pygments has a subclass of `RegexLexer`, the `ExtendedRegexLexer`.
+All features known from RegexLexers are available here too, and the tokens are
+specified in exactly the same way, *except* for one detail:
+
+The `get_tokens_unprocessed()` method holds its internal state data not as local
+variables, but in an instance of the `pygments.lexer.LexerContext` class, and
+that instance is passed to callbacks as a third argument. This means that you
+can modify the lexer state in callbacks.
+
+The `LexerContext` class has the following members:
+
+* `text` -- the input text
+* `pos` -- the current starting position that is used for matching regexes
+* `stack` -- a list containing the state stack
+* `end` -- the maximum position to which regexes are matched, this defaults to
+ the length of `text`
+
+Additionally, the `get_tokens_unprocessed()` method can be given a
+`LexerContext` instead of a string and will then process this context instead of
+creating a new one for the string argument.
+
+Note that because you can set the current position to anything in the callback,
+it won't be automatically be set by the caller after the callback is finished.
+For example, this is how the hypothetical lexer above would be written with the
+`ExtendedRegexLexer`::
+
+ from pygments.lexer import ExtendedRegexLexer
+ from pygments.token import Generic
+
+ class ExHypotheticLexer(ExtendedRegexLexer):
+
+ def headline_callback(lexer, match, ctx):
+ equal_signs = match.group(1)
+ text = match.group(2)
+ yield match.start(), Generic.Headline, equal_signs + text + equal_signs
+ ctx.pos = match.end()
+
+ tokens = {
+ 'root': [
+ (r'(=+)(.*?)(\1)', headline_callback)
+ ]
+ }
+
+This might sound confusing (and it can really be). But it is needed, and for an
+example look at the Ruby lexer in `ruby.py`_.
+
+.. _ruby.py: https://bitbucket.org/birkenfeld/pygments-main/src/tip/pygments/lexers/ruby.py
+
+
+Handling Lists of Keywords
+==========================
+
+For a relatively short list (hundreds) you can construct an optimized regular
+expression directly using ``words()`` (longer lists, see next section). This
+function handles a few things for you automatically, including escaping
+metacharacters and Python's first-match rather than longest-match in
+alternations. Feel free to put the lists themselves in
+``pygments/lexers/_$lang_builtins.py`` (see examples there), and generated by
+code if possible.
+
+An example of using ``words()`` is something like::
+
+ from pygments.lexer import RegexLexer, words, Name
+
+ class MyLexer(RegexLexer):
+
+ tokens = {
+ 'root': [
+ (words(('else', 'elseif'), suffix=r'\b'), Name.Builtin),
+ (r'\w+', Name),
+ ],
+ }
+
+As you can see, you can add ``prefix`` and ``suffix`` parts to the constructed
+regex.
+
+
+Modifying Token Streams
+=======================
+
+Some languages ship a lot of builtin functions (for example PHP). The total
+amount of those functions differs from system to system because not everybody
+has every extension installed. In the case of PHP there are over 3000 builtin
+functions. That's an incredibly huge amount of functions, much more than you
+want to put into a regular expression.
+
+But because only `Name` tokens can be function names this is solvable by
+overriding the ``get_tokens_unprocessed()`` method. The following lexer
+subclasses the `PythonLexer` so that it highlights some additional names as
+pseudo keywords::
+
+ from pygments.lexers.python import PythonLexer
+ from pygments.token import Name, Keyword
+
+ class MyPythonLexer(PythonLexer):
+ EXTRA_KEYWORDS = set(('foo', 'bar', 'foobar', 'barfoo', 'spam', 'eggs'))
+
+ def get_tokens_unprocessed(self, text):
+ for index, token, value in PythonLexer.get_tokens_unprocessed(self, text):
+ if token is Name and value in self.EXTRA_KEYWORDS:
+ yield index, Keyword.Pseudo, value
+ else:
+ yield index, token, value
+
+The `PhpLexer` and `LuaLexer` use this method to resolve builtin functions.
--- /dev/null
+.. -*- mode: rst -*-
+
+================
+Available lexers
+================
+
+This page lists all available builtin lexers and the options they take.
+
+Currently, **all lexers** support these options:
+
+`stripnl`
+ Strip leading and trailing newlines from the input (default: ``True``)
+
+`stripall`
+ Strip all leading and trailing whitespace from the input (default:
+ ``False``).
+
+`ensurenl`
+ Make sure that the input ends with a newline (default: ``True``). This
+ is required for some lexers that consume input linewise.
+
+ .. versionadded:: 1.3
+
+`tabsize`
+ If given and greater than 0, expand tabs in the input (default: ``0``).
+
+`encoding`
+ If given, must be an encoding name (such as ``"utf-8"``). This encoding
+ will be used to convert the input string to Unicode (if it is not already
+ a Unicode string). The default is ``"guess"``.
+
+ If this option is set to ``"guess"``, a simple UTF-8 vs. Latin-1
+ detection is used, if it is set to ``"chardet"``, the
+ `chardet library <http://chardet.feedparser.org/>`__ is used to
+ guess the encoding of the input.
+
+ .. versionadded:: 0.6
+
+
+The "Short Names" field lists the identifiers that can be used with the
+`get_lexer_by_name()` function.
+
+These lexers are builtin and can be imported from `pygments.lexers`:
+
+.. pygmentsdoc:: lexers
+
+
+Iterating over all lexers
+-------------------------
+
+.. versionadded:: 0.6
+
+To get all lexers (both the builtin and the plugin ones), you can
+use the `get_all_lexers()` function from the `pygments.lexers`
+module:
+
+.. sourcecode:: pycon
+
+ >>> from pygments.lexers import get_all_lexers
+ >>> i = get_all_lexers()
+ >>> i.next()
+ ('Diff', ('diff',), ('*.diff', '*.patch'), ('text/x-diff', 'text/x-patch'))
+ >>> i.next()
+ ('Delphi', ('delphi', 'objectpascal', 'pas', 'pascal'), ('*.pas',), ('text/x-pascal',))
+ >>> i.next()
+ ('XML+Ruby', ('xml+erb', 'xml+ruby'), (), ())
+
+As you can see, the return value is an iterator which yields tuples
+in the form ``(name, aliases, filetypes, mimetypes)``.
--- /dev/null
+.. -*- mode: rst -*-
+
+============================
+Using Pygments with MoinMoin
+============================
+
+From Pygments 0.7, the source distribution ships a `Moin`_ parser plugin that
+can be used to get Pygments highlighting in Moin wiki pages.
+
+To use it, copy the file `external/moin-parser.py` from the Pygments
+distribution to the `data/plugin/parser` subdirectory of your Moin instance.
+Edit the options at the top of the file (currently ``ATTACHMENTS`` and
+``INLINESTYLES``) and rename the file to the name that the parser directive
+should have. For example, if you name the file ``code.py``, you can get a
+highlighted Python code sample with this Wiki markup::
+
+ {{{
+ #!code python
+ [...]
+ }}}
+
+where ``python`` is the Pygments name of the lexer to use.
+
+Additionally, if you set the ``ATTACHMENTS`` option to True, Pygments will also
+be called for all attachments for whose filenames there is no other parser
+registered.
+
+You are responsible for including CSS rules that will map the Pygments CSS
+classes to colors. You can output a stylesheet file with `pygmentize`, put it
+into the `htdocs` directory of your Moin instance and then include it in the
+`stylesheets` configuration option in the Moin config, e.g.::
+
+ stylesheets = [('screen', '/htdocs/pygments.css')]
+
+If you do not want to do that and are willing to accept larger HTML output, you
+can set the ``INLINESTYLES`` option to True.
+
+
+.. _Moin: http://moinmoin.wikiwikiweb.de/
--- /dev/null
+================
+Register Plugins
+================
+
+If you want to extend Pygments without hacking the sources, but want to
+use the lexer/formatter/style/filter lookup functions (`lexers.get_lexer_by_name`
+et al.), you can use `setuptools`_ entrypoints to add new lexers, formatters
+or styles as if they were in the Pygments core.
+
+.. _setuptools: http://peak.telecommunity.com/DevCenter/setuptools
+
+That means you can use your highlighter modules with the `pygmentize` script,
+which relies on the mentioned functions.
+
+
+Entrypoints
+===========
+
+Here is a list of setuptools entrypoints that Pygments understands:
+
+`pygments.lexers`
+
+ This entrypoint is used for adding new lexers to the Pygments core.
+ The name of the entrypoint values doesn't really matter, Pygments extracts
+ required metadata from the class definition:
+
+ .. sourcecode:: ini
+
+ [pygments.lexers]
+ yourlexer = yourmodule:YourLexer
+
+ Note that you have to define ``name``, ``aliases`` and ``filename``
+ attributes so that you can use the highlighter from the command line:
+
+ .. sourcecode:: python
+
+ class YourLexer(...):
+ name = 'Name Of Your Lexer'
+ aliases = ['alias']
+ filenames = ['*.ext']
+
+
+`pygments.formatters`
+
+ You can use this entrypoint to add new formatters to Pygments. The
+ name of an entrypoint item is the name of the formatter. If you
+ prefix the name with a slash it's used as a filename pattern:
+
+ .. sourcecode:: ini
+
+ [pygments.formatters]
+ yourformatter = yourmodule:YourFormatter
+ /.ext = yourmodule:YourFormatter
+
+
+`pygments.styles`
+
+ To add a new style you can use this entrypoint. The name of the entrypoint
+ is the name of the style:
+
+ .. sourcecode:: ini
+
+ [pygments.styles]
+ yourstyle = yourmodule:YourStyle
+
+
+`pygments.filters`
+
+ Use this entrypoint to register a new filter. The name of the
+ entrypoint is the name of the filter:
+
+ .. sourcecode:: ini
+
+ [pygments.filters]
+ yourfilter = yourmodule:YourFilter
+
+
+How To Use Entrypoints
+======================
+
+This documentation doesn't explain how to use those entrypoints because this is
+covered in the `setuptools documentation`_. That page should cover everything
+you need to write a plugin.
+
+.. _setuptools documentation: http://peak.telecommunity.com/DevCenter/setuptools
+
+
+Extending The Core
+==================
+
+If you have written a Pygments plugin that is open source, please inform us
+about that. There is a high chance that we'll add it to the Pygments
+distribution.
--- /dev/null
+.. -*- mode: rst -*-
+
+===========================
+Introduction and Quickstart
+===========================
+
+
+Welcome to Pygments! This document explains the basic concepts and terms and
+gives a few examples of how to use the library.
+
+
+Architecture
+============
+
+There are four types of components that work together highlighting a piece of
+code:
+
+* A **lexer** splits the source into tokens, fragments of the source that
+ have a token type that determines what the text represents semantically
+ (e.g., keyword, string, or comment). There is a lexer for every language
+ or markup format that Pygments supports.
+* The token stream can be piped through **filters**, which usually modify
+ the token types or text fragments, e.g. uppercasing all keywords.
+* A **formatter** then takes the token stream and writes it to an output
+ file, in a format such as HTML, LaTeX or RTF.
+* While writing the output, a **style** determines how to highlight all the
+ different token types. It maps them to attributes like "red and bold".
+
+
+Example
+=======
+
+Here is a small example for highlighting Python code:
+
+.. sourcecode:: python
+
+ from pygments import highlight
+ from pygments.lexers import PythonLexer
+ from pygments.formatters import HtmlFormatter
+
+ code = 'print "Hello World"'
+ print highlight(code, PythonLexer(), HtmlFormatter())
+
+which prints something like this:
+
+.. sourcecode:: html
+
+ <div class="highlight">
+ <pre><span class="k">print</span> <span class="s">"Hello World"</span></pre>
+ </div>
+
+As you can see, Pygments uses CSS classes (by default, but you can change that)
+instead of inline styles in order to avoid outputting redundant style information over
+and over. A CSS stylesheet that contains all CSS classes possibly used in the output
+can be produced by:
+
+.. sourcecode:: python
+
+ print HtmlFormatter().get_style_defs('.highlight')
+
+The argument to :func:`get_style_defs` is used as an additional CSS selector:
+the output may look like this:
+
+.. sourcecode:: css
+
+ .highlight .k { color: #AA22FF; font-weight: bold }
+ .highlight .s { color: #BB4444 }
+ ...
+
+
+Options
+=======
+
+The :func:`highlight()` function supports a fourth argument called *outfile*, it
+must be a file object if given. The formatted output will then be written to
+this file instead of being returned as a string.
+
+Lexers and formatters both support options. They are given to them as keyword
+arguments either to the class or to the lookup method:
+
+.. sourcecode:: python
+
+ from pygments import highlight
+ from pygments.lexers import get_lexer_by_name
+ from pygments.formatters import HtmlFormatter
+
+ lexer = get_lexer_by_name("python", stripall=True)
+ formatter = HtmlFormatter(linenos=True, cssclass="source")
+ result = highlight(code, lexer, formatter)
+
+This makes the lexer strip all leading and trailing whitespace from the input
+(`stripall` option), lets the formatter output line numbers (`linenos` option),
+and sets the wrapping ``<div>``'s class to ``source`` (instead of
+``highlight``).
+
+Important options include:
+
+`encoding` : for lexers and formatters
+ Since Pygments uses Unicode strings internally, this determines which
+ encoding will be used to convert to or from byte strings.
+`style` : for formatters
+ The name of the style to use when writing the output.
+
+
+For an overview of builtin lexers and formatters and their options, visit the
+:doc:`lexer <lexers>` and :doc:`formatters <formatters>` lists.
+
+For a documentation on filters, see :doc:`this page <filters>`.
+
+
+Lexer and formatter lookup
+==========================
+
+If you want to lookup a built-in lexer by its alias or a filename, you can use
+one of the following methods:
+
+.. sourcecode:: pycon
+
+ >>> from pygments.lexers import (get_lexer_by_name,
+ ... get_lexer_for_filename, get_lexer_for_mimetype)
+
+ >>> get_lexer_by_name('python')
+ <pygments.lexers.PythonLexer>
+
+ >>> get_lexer_for_filename('spam.rb')
+ <pygments.lexers.RubyLexer>
+
+ >>> get_lexer_for_mimetype('text/x-perl')
+ <pygments.lexers.PerlLexer>
+
+All these functions accept keyword arguments; they will be passed to the lexer
+as options.
+
+A similar API is available for formatters: use :func:`.get_formatter_by_name()`
+and :func:`.get_formatter_for_filename()` from the :mod:`pygments.formatters`
+module for this purpose.
+
+
+Guessing lexers
+===============
+
+If you don't know the content of the file, or you want to highlight a file
+whose extension is ambiguous, such as ``.html`` (which could contain plain HTML
+or some template tags), use these functions:
+
+.. sourcecode:: pycon
+
+ >>> from pygments.lexers import guess_lexer, guess_lexer_for_filename
+
+ >>> guess_lexer('#!/usr/bin/python\nprint "Hello World!"')
+ <pygments.lexers.PythonLexer>
+
+ >>> guess_lexer_for_filename('test.py', 'print "Hello World!"')
+ <pygments.lexers.PythonLexer>
+
+:func:`.guess_lexer()` passes the given content to the lexer classes'
+:meth:`analyse_text()` method and returns the one for which it returns the
+highest number.
+
+All lexers have two different filename pattern lists: the primary and the
+secondary one. The :func:`.get_lexer_for_filename()` function only uses the
+primary list, whose entries are supposed to be unique among all lexers.
+:func:`.guess_lexer_for_filename()`, however, will first loop through all lexers
+and look at the primary and secondary filename patterns if the filename matches.
+If only one lexer matches, it is returned, else the guessing mechanism of
+:func:`.guess_lexer()` is used with the matching lexers.
+
+As usual, keyword arguments to these functions are given to the created lexer
+as options.
+
+
+Command line usage
+==================
+
+You can use Pygments from the command line, using the :program:`pygmentize`
+script::
+
+ $ pygmentize test.py
+
+will highlight the Python file test.py using ANSI escape sequences
+(a.k.a. terminal colors) and print the result to standard output.
+
+To output HTML, use the ``-f`` option::
+
+ $ pygmentize -f html -o test.html test.py
+
+to write an HTML-highlighted version of test.py to the file test.html.
+Note that it will only be a snippet of HTML, if you want a full HTML document,
+use the "full" option::
+
+ $ pygmentize -f html -O full -o test.html test.py
+
+This will produce a full HTML document with included stylesheet.
+
+A style can be selected with ``-O style=<name>``.
+
+If you need a stylesheet for an existing HTML file using Pygments CSS classes,
+it can be created with::
+
+ $ pygmentize -S default -f html > style.css
+
+where ``default`` is the style name.
+
+More options and tricks and be found in the :doc:`command line reference
+<cmdline>`.
--- /dev/null
+.. -*- mode: rst -*-
+
+================================
+Using Pygments in ReST documents
+================================
+
+Many Python people use `ReST`_ for documentation their sourcecode, programs,
+scripts et cetera. This also means that documentation often includes sourcecode
+samples or snippets.
+
+You can easily enable Pygments support for your ReST texts using a custom
+directive -- this is also how this documentation displays source code.
+
+From Pygments 0.9, the directive is shipped in the distribution as
+`external/rst-directive.py`. You can copy and adapt this code to your liking.
+
+.. removed -- too confusing
+ *Loosely related note:* The ReST lexer now recognizes ``.. sourcecode::`` and
+ ``.. code::`` directives and highlights the contents in the specified language
+ if the `handlecodeblocks` option is true.
+
+.. _ReST: http://docutils.sf.net/rst.html
--- /dev/null
+.. -*- mode: rst -*-
+
+======
+Styles
+======
+
+Pygments comes with some builtin styles that work for both the HTML and
+LaTeX formatter.
+
+The builtin styles can be looked up with the `get_style_by_name` function:
+
+.. sourcecode:: pycon
+
+ >>> from pygments.styles import get_style_by_name
+ >>> get_style_by_name('colorful')
+ <class 'pygments.styles.colorful.ColorfulStyle'>
+
+You can pass a instance of a `Style` class to a formatter as the `style`
+option in form of a string:
+
+.. sourcecode:: pycon
+
+ >>> from pygments.styles import get_style_by_name
+ >>> from pygments.formatters import HtmlFormatter
+ >>> HtmlFormatter(style='colorful').style
+ <class 'pygments.styles.colorful.ColorfulStyle'>
+
+Or you can also import your own style (which must be a subclass of
+`pygments.style.Style`) and pass it to the formatter:
+
+.. sourcecode:: pycon
+
+ >>> from yourapp.yourmodule import YourStyle
+ >>> from pygments.formatters import HtmlFormatter
+ >>> HtmlFormatter(style=YourStyle).style
+ <class 'yourapp.yourmodule.YourStyle'>
+
+
+Creating Own Styles
+===================
+
+So, how to create a style? All you have to do is to subclass `Style` and
+define some styles:
+
+.. sourcecode:: python
+
+ from pygments.style import Style
+ from pygments.token import Keyword, Name, Comment, String, Error, \
+ Number, Operator, Generic
+
+ class YourStyle(Style):
+ default_style = ""
+ styles = {
+ Comment: 'italic #888',
+ Keyword: 'bold #005',
+ Name: '#f00',
+ Name.Function: '#0f0',
+ Name.Class: 'bold #0f0',
+ String: 'bg:#eee #111'
+ }
+
+That's it. There are just a few rules. When you define a style for `Name`
+the style automatically also affects `Name.Function` and so on. If you
+defined ``'bold'`` and you don't want boldface for a subtoken use ``'nobold'``.
+
+(Philosophy: the styles aren't written in CSS syntax since this way
+they can be used for a variety of formatters.)
+
+`default_style` is the style inherited by all token types.
+
+To make the style usable for Pygments, you must
+
+* either register it as a plugin (see :doc:`the plugin docs <plugins>`)
+* or drop it into the `styles` subpackage of your Pygments distribution one style
+ class per style, where the file name is the style name and the class name is
+ `StylenameClass`. For example, if your style should be called
+ ``"mondrian"``, name the class `MondrianStyle`, put it into the file
+ ``mondrian.py`` and this file into the ``pygments.styles`` subpackage
+ directory.
+
+
+Style Rules
+===========
+
+Here a small overview of all allowed styles:
+
+``bold``
+ render text as bold
+``nobold``
+ don't render text as bold (to prevent subtokens being highlighted bold)
+``italic``
+ render text italic
+``noitalic``
+ don't render text as italic
+``underline``
+ render text underlined
+``nounderline``
+ don't render text underlined
+``bg:``
+ transparent background
+``bg:#000000``
+ background color (black)
+``border:``
+ no border
+``border:#ffffff``
+ border color (white)
+``#ff0000``
+ text color (red)
+``noinherit``
+ don't inherit styles from supertoken
+
+Note that there may not be a space between ``bg:`` and the color value
+since the style definition string is split at whitespace.
+Also, using named colors is not allowed since the supported color names
+vary for different formatters.
+
+Furthermore, not all lexers might support every style.
+
+
+Builtin Styles
+==============
+
+Pygments ships some builtin styles which are maintained by the Pygments team.
+
+To get a list of known styles you can use this snippet:
+
+.. sourcecode:: pycon
+
+ >>> from pygments.styles import STYLE_MAP
+ >>> STYLE_MAP.keys()
+ ['default', 'emacs', 'friendly', 'colorful']
+
+
+Getting a list of available styles
+==================================
+
+.. versionadded:: 0.6
+
+Because it could be that a plugin registered a style, there is
+a way to iterate over all styles:
+
+.. sourcecode:: pycon
+
+ >>> from pygments.styles import get_all_styles
+ >>> styles = list(get_all_styles())
--- /dev/null
+.. -*- mode: rst -*-
+
+==============
+Builtin Tokens
+==============
+
+.. module:: pygments.token
+
+In the :mod:`pygments.token` module, there is a special object called `Token`
+that is used to create token types.
+
+You can create a new token type by accessing an attribute of `Token`:
+
+.. sourcecode:: pycon
+
+ >>> from pygments.token import Token
+ >>> Token.String
+ Token.String
+ >>> Token.String is Token.String
+ True
+
+Note that tokens are singletons so you can use the ``is`` operator for comparing
+token types.
+
+As of Pygments 0.7 you can also use the ``in`` operator to perform set tests:
+
+.. sourcecode:: pycon
+
+ >>> from pygments.token import Comment
+ >>> Comment.Single in Comment
+ True
+ >>> Comment in Comment.Multi
+ False
+
+This can be useful in :doc:`filters <filters>` and if you write lexers on your
+own without using the base lexers.
+
+You can also split a token type into a hierarchy, and get the parent of it:
+
+.. sourcecode:: pycon
+
+ >>> String.split()
+ [Token, Token.Literal, Token.Literal.String]
+ >>> String.parent
+ Token.Literal
+
+In principle, you can create an unlimited number of token types but nobody can
+guarantee that a style would define style rules for a token type. Because of
+that, Pygments proposes some global token types defined in the
+`pygments.token.STANDARD_TYPES` dict.
+
+For some tokens aliases are already defined:
+
+.. sourcecode:: pycon
+
+ >>> from pygments.token import String
+ >>> String
+ Token.Literal.String
+
+Inside the :mod:`pygments.token` module the following aliases are defined:
+
+============= ============================ ====================================
+`Text` `Token.Text` for any type of text data
+`Whitespace` `Token.Text.Whitespace` for specially highlighted whitespace
+`Error` `Token.Error` represents lexer errors
+`Other` `Token.Other` special token for data not
+ matched by a parser (e.g. HTML
+ markup in PHP code)
+`Keyword` `Token.Keyword` any kind of keywords
+`Name` `Token.Name` variable/function names
+`Literal` `Token.Literal` Any literals
+`String` `Token.Literal.String` string literals
+`Number` `Token.Literal.Number` number literals
+`Operator` `Token.Operator` operators (``+``, ``not``...)
+`Punctuation` `Token.Punctuation` punctuation (``[``, ``(``...)
+`Comment` `Token.Comment` any kind of comments
+`Generic` `Token.Generic` generic tokens (have a look at
+ the explanation below)
+============= ============================ ====================================
+
+The `Whitespace` token type is new in Pygments 0.8. It is used only by the
+`VisibleWhitespaceFilter` currently.
+
+Normally you just create token types using the already defined aliases. For each
+of those token aliases, a number of subtypes exists (excluding the special tokens
+`Token.Text`, `Token.Error` and `Token.Other`)
+
+The `is_token_subtype()` function in the `pygments.token` module can be used to
+test if a token type is a subtype of another (such as `Name.Tag` and `Name`).
+(This is the same as ``Name.Tag in Name``. The overloaded `in` operator was newly
+introduced in Pygments 0.7, the function still exists for backwards
+compatiblity.)
+
+With Pygments 0.7, it's also possible to convert strings to token types (for example
+if you want to supply a token from the command line):
+
+.. sourcecode:: pycon
+
+ >>> from pygments.token import String, string_to_tokentype
+ >>> string_to_tokentype("String")
+ Token.Literal.String
+ >>> string_to_tokentype("Token.Literal.String")
+ Token.Literal.String
+ >>> string_to_tokentype(String)
+ Token.Literal.String
+
+
+Keyword Tokens
+==============
+
+`Keyword`
+ For any kind of keyword (especially if it doesn't match any of the
+ subtypes of course).
+
+`Keyword.Constant`
+ For keywords that are constants (e.g. ``None`` in future Python versions).
+
+`Keyword.Declaration`
+ For keywords used for variable declaration (e.g. ``var`` in some programming
+ languages like JavaScript).
+
+`Keyword.Namespace`
+ For keywords used for namespace declarations (e.g. ``import`` in Python and
+ Java and ``package`` in Java).
+
+`Keyword.Pseudo`
+ For keywords that aren't really keywords (e.g. ``None`` in old Python
+ versions).
+
+`Keyword.Reserved`
+ For reserved keywords.
+
+`Keyword.Type`
+ For builtin types that can't be used as identifiers (e.g. ``int``,
+ ``char`` etc. in C).
+
+
+Name Tokens
+===========
+
+`Name`
+ For any name (variable names, function names, classes).
+
+`Name.Attribute`
+ For all attributes (e.g. in HTML tags).
+
+`Name.Builtin`
+ Builtin names; names that are available in the global namespace.
+
+`Name.Builtin.Pseudo`
+ Builtin names that are implicit (e.g. ``self`` in Ruby, ``this`` in Java).
+
+`Name.Class`
+ Class names. Because no lexer can know if a name is a class or a function
+ or something else this token is meant for class declarations.
+
+`Name.Constant`
+ Token type for constants. In some languages you can recognise a token by the
+ way it's defined (the value after a ``const`` keyword for example). In
+ other languages constants are uppercase by definition (Ruby).
+
+`Name.Decorator`
+ Token type for decorators. Decorators are synatic elements in the Python
+ language. Similar syntax elements exist in C# and Java.
+
+`Name.Entity`
+ Token type for special entities. (e.g. `` `` in HTML).
+
+`Name.Exception`
+ Token type for exception names (e.g. ``RuntimeError`` in Python). Some languages
+ define exceptions in the function signature (Java). You can highlight
+ the name of that exception using this token then.
+
+`Name.Function`
+ Token type for function names.
+
+`Name.Label`
+ Token type for label names (e.g. in languages that support ``goto``).
+
+`Name.Namespace`
+ Token type for namespaces. (e.g. import paths in Java/Python), names following
+ the ``module``/``namespace`` keyword in other languages.
+
+`Name.Other`
+ Other names. Normally unused.
+
+`Name.Tag`
+ Tag names (in HTML/XML markup or configuration files).
+
+`Name.Variable`
+ Token type for variables. Some languages have prefixes for variable names
+ (PHP, Ruby, Perl). You can highlight them using this token.
+
+`Name.Variable.Class`
+ same as `Name.Variable` but for class variables (also static variables).
+
+`Name.Variable.Global`
+ same as `Name.Variable` but for global variables (used in Ruby, for
+ example).
+
+`Name.Variable.Instance`
+ same as `Name.Variable` but for instance variables.
+
+
+Literals
+========
+
+`Literal`
+ For any literal (if not further defined).
+
+`Literal.Date`
+ for date literals (e.g. ``42d`` in Boo).
+
+
+`String`
+ For any string literal.
+
+`String.Backtick`
+ Token type for strings enclosed in backticks.
+
+`String.Char`
+ Token type for single characters (e.g. Java, C).
+
+`String.Doc`
+ Token type for documentation strings (for example Python).
+
+`String.Double`
+ Double quoted strings.
+
+`String.Escape`
+ Token type for escape sequences in strings.
+
+`String.Heredoc`
+ Token type for "heredoc" strings (e.g. in Ruby or Perl).
+
+`String.Interpol`
+ Token type for interpolated parts in strings (e.g. ``#{foo}`` in Ruby).
+
+`String.Other`
+ Token type for any other strings (for example ``%q{foo}`` string constructs
+ in Ruby).
+
+`String.Regex`
+ Token type for regular expression literals (e.g. ``/foo/`` in JavaScript).
+
+`String.Single`
+ Token type for single quoted strings.
+
+`String.Symbol`
+ Token type for symbols (e.g. ``:foo`` in LISP or Ruby).
+
+
+`Number`
+ Token type for any number literal.
+
+`Number.Bin`
+ Token type for binary literals (e.g. ``0b101010``).
+
+`Number.Float`
+ Token type for float literals (e.g. ``42.0``).
+
+`Number.Hex`
+ Token type for hexadecimal number literals (e.g. ``0xdeadbeef``).
+
+`Number.Integer`
+ Token type for integer literals (e.g. ``42``).
+
+`Number.Integer.Long`
+ Token type for long integer literals (e.g. ``42L`` in Python).
+
+`Number.Oct`
+ Token type for octal literals.
+
+
+Operators
+=========
+
+`Operator`
+ For any punctuation operator (e.g. ``+``, ``-``).
+
+`Operator.Word`
+ For any operator that is a word (e.g. ``not``).
+
+
+Punctuation
+===========
+
+.. versionadded:: 0.7
+
+`Punctuation`
+ For any punctuation which is not an operator (e.g. ``[``, ``(``...)
+
+
+Comments
+========
+
+`Comment`
+ Token type for any comment.
+
+`Comment.Multiline`
+ Token type for multiline comments.
+
+`Comment.Preproc`
+ Token type for preprocessor comments (also ``<?php``/``<%`` constructs).
+
+`Comment.Single`
+ Token type for comments that end at the end of a line (e.g. ``# foo``).
+
+`Comment.Special`
+ Special data in comments. For example code tags, author and license
+ information, etc.
+
+
+Generic Tokens
+==============
+
+Generic tokens are for special lexers like the `DiffLexer` that doesn't really
+highlight a programming language but a patch file.
+
+
+`Generic`
+ A generic, unstyled token. Normally you don't use this token type.
+
+`Generic.Deleted`
+ Marks the token value as deleted.
+
+`Generic.Emph`
+ Marks the token value as emphasized.
+
+`Generic.Error`
+ Marks the token value as an error message.
+
+`Generic.Heading`
+ Marks the token value as headline.
+
+`Generic.Inserted`
+ Marks the token value as inserted.
+
+`Generic.Output`
+ Marks the token value as program output (e.g. for python cli lexer).
+
+`Generic.Prompt`
+ Marks the token value as command prompt (e.g. bash lexer).
+
+`Generic.Strong`
+ Marks the token value as bold (e.g. for rst lexer).
+
+`Generic.Subheading`
+ Marks the token value as subheadline.
+
+`Generic.Traceback`
+ Marks the token value as a part of an error traceback.
--- /dev/null
+=====================
+Unicode and Encodings
+=====================
+
+Since Pygments 0.6, all lexers use unicode strings internally. Because of that
+you might encounter the occasional :exc:`UnicodeDecodeError` if you pass strings
+with the wrong encoding.
+
+Per default all lexers have their input encoding set to `guess`. This means
+that the following encodings are tried:
+
+* UTF-8 (including BOM handling)
+* The locale encoding (i.e. the result of `locale.getpreferredencoding()`)
+* As a last resort, `latin1`
+
+If you pass a lexer a byte string object (not unicode), it tries to decode the
+data using this encoding.
+
+You can override the encoding using the `encoding` or `inencoding` lexer
+options. If you have the `chardet`_ library installed and set the encoding to
+``chardet`` if will ananlyse the text and use the encoding it thinks is the
+right one automatically:
+
+.. sourcecode:: python
+
+ from pygments.lexers import PythonLexer
+ lexer = PythonLexer(encoding='chardet')
+
+The best way is to pass Pygments unicode objects. In that case you can't get
+unexpected output.
+
+The formatters now send Unicode objects to the stream if you don't set the
+output encoding. You can do so by passing the formatters an `encoding` option:
+
+.. sourcecode:: python
+
+ from pygments.formatters import HtmlFormatter
+ f = HtmlFormatter(encoding='utf-8')
+
+**You will have to set this option if you have non-ASCII characters in the
+source and the output stream does not accept Unicode written to it!**
+This is the case for all regular files and for terminals.
+
+Note: The Terminal formatter tries to be smart: if its output stream has an
+`encoding` attribute, and you haven't set the option, it will encode any
+Unicode string with this encoding before writing it. This is the case for
+`sys.stdout`, for example. The other formatters don't have that behavior.
+
+Another note: If you call Pygments via the command line (`pygmentize`),
+encoding is handled differently, see :doc:`the command line docs <cmdline>`.
+
+.. versionadded:: 0.7
+ The formatters now also accept an `outencoding` option which will override
+ the `encoding` option if given. This makes it possible to use a single
+ options dict with lexers and formatters, and still have different input and
+ output encodings.
+
+.. _chardet: http://chardet.feedparser.org/
--- /dev/null
+Download and installation
+=========================
+
+The current release is version |version|.
+
+Packaged versions
+-----------------
+
+You can download it `from the Python Package Index
+<http://pypi.python.org/pypi/Pygments>`_. For installation of packages from
+PyPI, we recommend `Pip <http://www.pip-installer.org>`_, which works on all
+major platforms.
+
+Under Linux, most distributions include a package for Pygments, usually called
+``pygments`` or ``python-pygments``. You can install it with the package
+manager as usual.
+
+Development sources
+-------------------
+
+We're using the `Mercurial <http://selenic.com/mercurial>`_ version control
+system. You can get the development source using this command::
+
+ hg clone http://bitbucket.org/birkenfeld/pygments-main pygments
+
+Development takes place at `Bitbucket
+<http://bitbucket.org/birkenfeld/pygments-main>`_, you can browse the source
+online `here <http://bitbucket.org/birkenfeld/pygments-main/src>`_.
+
+The latest changes in the development source code are listed in the `changelog
+<http://bitbucket.org/birkenfeld/pygments-main/src/tip/CHANGES>`_.
+
+.. Documentation
+ -------------
+
+.. XXX todo
+
+ You can download the <a href="/docs/">documentation</a> either as
+ a bunch of rst files from the Mercurial repository, see above, or
+ as a tar.gz containing rendered HTML files:</p>
+ <p><a href="/docs/download/pygmentsdocs.tar.gz">pygmentsdocs.tar.gz</a></p>
--- /dev/null
+:orphan:
+
+Pygments FAQ
+=============
+
+What is Pygments?
+-----------------
+
+Pygments is a syntax highlighting engine written in Python. That means, it will
+take source code (or other markup) in a supported language and output a
+processed version (in different formats) containing syntax highlighting markup.
+
+Its features include:
+
+* a wide range of common languages and markup formats is supported (look here
+ for a list)
+* new languages and formats are added easily
+* a number of output formats is available, including:
+
+ - HTML
+ - ANSI sequences (console output)
+ - LaTeX
+ - RTF
+
+* it is usable as a command-line tool and as a library
+* parsing and formatting is fast
+
+Pygments is licensed under the BSD license.
+
+Where does the name Pygments come from?
+---------------------------------------
+
+*Py* of course stands for Python, while *pigments* are used for coloring paint,
+and in this case, source code!
+
+What are the system requirements?
+---------------------------------
+
+Pygments only needs a standard Python install, version 2.6 or higher or version
+3.3 or higher for Python 3. No additional libraries are needed.
+
+How can I use Pygments?
+-----------------------
+
+Pygments is usable as a command-line tool as well as a library.
+
+From the command-line, usage looks like this (assuming the pygmentize script is
+properly installed)::
+
+ pygmentize -f html /path/to/file.py
+
+This will print a HTML-highlighted version of /path/to/file.py to standard output.
+
+For a complete help, please run ``pygmentize -h``.
+
+Usage as a library is thoroughly demonstrated in the Documentation section.
+
+How do I make a new style?
+--------------------------
+
+Please see the :doc:`documentation on styles <docs/styles>`.
+
+How can I report a bug or suggest a feature?
+--------------------------------------------
+
+Please report bugs and feature wishes in the tracker at Bitbucket.
+
+You can also e-mail the author or use IRC, see the contact details.
+
+I want this support for this language!
+--------------------------------------
+
+Instead of waiting for others to include language support, why not write it
+yourself? All you have to know is :doc:`outlined in the docs
+<docs/lexerdevelopment>`.
+
+Can I use Pygments for programming language processing?
+-------------------------------------------------------
+
+The Pygments lexing machinery is quite powerful can be used to build lexers for
+basically all languages. However, parsing them is not possible, though some
+lexers go some steps in this direction in order to e.g. highlight function names
+differently.
+
+Also, error reporting is not the scope of Pygments. It focuses on correctly
+highlighting syntactically valid documents, not finding and compensating errors.
+
+Who uses Pygments?
+------------------
+
+This is an (incomplete) list of projects and sites known to use the Pygments highlighter.
+
+* `Pygments API <http://pygments.appspot.com/>`_, a HTTP POST interface to Pygments
+* `The Sphinx documentation builder <http://sphinx.pocoo.org/>`_, for embedded source examples
+* `rst2pdf <http://code.google.com/p/rst2pdf/>`_, a reStructuredText to PDF converter
+* `Zine <http://zine.pocoo.org/>`_, a Python blogging system
+* `Trac <http://trac.edgewall.org/>`_, the universal project management tool
+* `Bruce <http://r1chardj0n3s.googlepages.com/bruce>`_, a reStructuredText presentation tool
+* `AsciiDoc <http://www.methods.co.nz/asciidoc/>`_, a text-based documentation generator
+* `ActiveState Code <http://code.activestate.com/>`_, the Python Cookbook successor
+* `ViewVC <http://viewvc.org/>`_, a web-based version control repository browser
+* `BzrFruit <http://repo.or.cz/w/bzrfruit.git>`_, a Bazaar branch viewer
+* `QBzr <http://bazaar-vcs.org/QBzr>`_, a cross-platform Qt-based GUI front end for Bazaar
+* `BitBucket <http://bitbucket.org/>`_, a Mercurial and Git hosting site
+* `GitHub <http://github.com/>`_, a site offering secure Git hosting and collaborative development
+* `Review Board <http://www.review-board.org/>`_, a collaborative code reviewing tool
+* `skeletonz <http://orangoo.com/skeletonz/>`_, a Python powered content management system
+* `Diamanda <http://code.google.com/p/diamanda/>`_, a Django powered wiki system with support for Pygments
+* `Progopedia <http://progopedia.ru/>`_ (`English <http://progopedia.com/>`_),
+ an encyclopedia of programming languages
+* `Postmarkup <http://code.google.com/p/postmarkup/>`_, a BBCode to XHTML generator
+* `Language Comparison <http://michaelsilver.us/lc>`_, a site that compares different programming languages
+* `BPython <http://www.noiseforfree.com/bpython/>`_, a curses-based intelligent Python shell
+* `Challenge-You! <http://challenge-you.appspot.com/>`_, a site offering programming challenges
+* `PIDA <http://pida.co.uk/>`_, a universal IDE written in Python
+* `PuDB <http://pypi.python.org/pypi/pudb>`_, a console Python debugger
+* `XWiki <http://www.xwiki.org/>`_, a wiki-based development framework in Java, using Jython
+* `roux <http://ananelson.com/software/roux/>`_, a script for running R scripts
+ and creating beautiful output including graphs
+* `hurl <http://hurl.it/>`_, a web service for making HTTP requests
+* `wxHTMLPygmentizer <http://colinbarnette.net/projects/wxHTMLPygmentizer>`_ is
+ a GUI utility, used to make code-colorization easier
+* `WpPygments <http://blog.mirotin.net/?page_id=49>`_, a highlighter plugin for WordPress
+* `LodgeIt <http://paste.pocoo.org/>`_, a pastebin with XMLRPC support and diffs
+* `SpammCan <http://chrisarndt.de/projects/spammcan/>`_, a pastebin (demo see
+ `here <http://paste.chrisarndt.de/>`_)
+* `WowAce.com pastes <http://www.wowace.com/paste/>`_, a pastebin
+* `Siafoo <http://siafoo.net>`_, a tool for sharing and storing useful code and programming experience
+* `D source <http://www.dsource.org/>`_, a community for the D programming language
+* `dumpz.org <http://dumpz.org/>`_, a pastebin
+* `dpaste.com <http://dpaste.com/>`_, another Django pastebin
+* `PylonsHQ Pasties <http://pylonshq.com/pasties/new>`_, a pastebin
+* `Django snippets <http://www.djangosnippets.org/>`_, a pastebin for Django code
+* `Fayaa <http://www.fayaa.com/code/>`_, a Chinese pastebin
+* `Incollo.com <http://incollo.com>`_, a free collaborative debugging tool
+* `PasteBox <http://p.boxnet.eu/>`_, a pastebin focused on privacy
+* `xinotes.org <http://www.xinotes.org/>`_, a site to share notes, code snippets etc.
+* `hilite.me <http://www.hilite.me/>`_, a site to highlight code snippets
+* `patx.me <http://patx.me/paste>`_, a pastebin
+
+If you have a project or web site using Pygments, drop me a line, and I'll add a
+link here.
+
--- /dev/null
+Welcome!
+========
+
+This is the home of Pygments. It is a generic syntax highlighter suitable for
+use in code hosting, forums, wikis or other applications that need to prettify
+source code. Highlights are:
+
+* a wide range of over 300 languages and other text formats is supported
+* special attention is paid to details that increase highlighting quality
+* support for new languages and formats are added easily; most languages use a
+ simple regex-based lexing mechanism
+* a number of output formats is available, among them HTML, RTF, LaTeX and ANSI
+ sequences
+* it is usable as a command-line tool and as a library
+* ... and it highlights even Perl 6!
+
+Read more in the :doc:`FAQ list <faq>` or the :doc:`documentation <docs/index>`,
+or `download the latest release <http://pypi.python.org/pypi/Pygments>`_.
+
+.. _contribute:
+
+Contribute
+----------
+
+Like every open-source project, we are always looking for volunteers to help us
+with programming. Python knowledge is required, but don't fear: Python is a very
+clear and easy to learn language.
+
+Development takes place on `Bitbucket
+<https://bitbucket.org/birkenfeld/pygments-main>`_, where the Mercurial
+repository, tickets and pull requests can be viewed.
+
+Our primary communication instrument is the IRC channel **#pocoo** on the
+Freenode network. To join it, let your IRC client connect to
+``irc.freenode.net`` and do ``/join #pocoo``.
+
+If you found a bug, just open a ticket in the Bitbucket tracker. Be sure to log
+in to be notified when the issue is fixed -- development is not fast-paced as
+the library is quite stable. You can also send an e-mail to the developers, see
+below.
+
+The authors
+-----------
+
+Pygments is maintained by **Georg Brandl**, e-mail address *georg*\ *@*\ *python.org*.
+
+Many lexers and fixes have been contributed by **Armin Ronacher**, the rest of
+the `Pocoo <http://dev.pocoo.org/>`_ team and **Tim Hatch**.
+
+.. toctree::
+ :maxdepth: 1
+ :hidden:
+
+ docs/index
--- /dev/null
+:orphan:
+
+Supported languages
+===================
+
+Pygments supports an ever-growing range of languages. Watch this space...
+
+Programming languages
+---------------------
+
+* ActionScript
+* Ada
+* ANTLR
+* AppleScript
+* Assembly (various)
+* Asymptote
+* Awk
+* Befunge
+* Boo
+* BrainFuck
+* C, C++
+* C#
+* Clojure
+* CoffeeScript
+* ColdFusion
+* Common Lisp
+* Coq
+* Cryptol (incl. Literate Cryptol)
+* `Cython <http://cython.org>`_
+* `D <http://digitalmars.com/d>`_
+* Dart
+* Delphi
+* Dylan
+* Erlang
+* Factor
+* Fancy
+* Fortran
+* F#
+* GAP
+* Gherkin (Cucumber)
+* GL shaders
+* Groovy
+* `Haskell <http://www.haskell.org>`_ (incl. Literate Haskell)
+* IDL
+* Io
+* Java
+* JavaScript
+* LLVM
+* Logtalk
+* `Lua <http://www.lua.org>`_
+* Matlab
+* MiniD
+* Modelica
+* Modula-2
+* MuPad
+* Nemerle
+* Nimrod
+* Objective-C
+* Objective-J
+* Octave
+* OCaml
+* PHP
+* `Perl <http://perl.org>`_
+* PovRay
+* PostScript
+* PowerShell
+* Prolog
+* `Python <http://www.python.org>`_ 2.x and 3.x (incl. console sessions and tracebacks)
+* `REBOL <http://www.rebol.com>`_
+* `Red <http://www.red-lang.org>`_
+* Redcode
+* `Ruby <http://www.ruby-lang.org>`_ (incl. irb sessions)
+* Rust
+* S, S-Plus, R
+* Scala
+* Scheme
+* Scilab
+* Smalltalk
+* SNOBOL
+* Tcl
+* Vala
+* Verilog
+* VHDL
+* Visual Basic.NET
+* Visual FoxPro
+* XQuery
+* Zephir
+ </ul>
+
+Template languages
+------------------
+
+* Cheetah templates
+* `Django <http://www.djangoproject.com>`_ / `Jinja
+ <http://jinja.pocoo.org/jinja>`_ templates
+* ERB (Ruby templating)
+* `Genshi <http://genshi.edgewall.org>`_ (the Trac template language)
+* JSP (Java Server Pages)
+* `Myghty <http://www.myghty.org>`_ (the HTML::Mason based framework)
+* `Mako <http://www.makotemplates.org/>`_ (the Myghty successor)
+* `Smarty <http://smarty.php.net>`_ templates (PHP templating)
+* Tea
+
+Other markup
+------------
+
+* Apache config files
+* Bash shell scripts
+* BBCode
+* CMake
+* CSS
+* Debian control files
+* Diff files
+* DTD
+* Gettext catalogs
+* Gnuplot script
+* Groff markup
+* HTML
+* HTTP sessions
+* INI-style config files
+* IRC logs (irssi style)
+* Lighttpd config files
+* Makefiles
+* MoinMoin/Trac Wiki markup
+* MySQL
+* Nginx config files
+* POV-Ray scenes
+* Ragel
+* Redcode
+* ReST
+* Robot Framework
+* RPM spec files
+* SQL, also MySQL, SQLite
+* Squid configuration
+* TeX
+* tcsh
+* Vim Script
+* Windows batch files
+* XML
+* XSLT
+* YAML
+
+... that's all?
+---------------
+
+Well, why not write your own? Contributing to Pygments is easy and fun. Look
+:doc:`here <docs/lexerdevelopment>` for the docs on lexer development and
+:ref:`here <contribute>` for contact details.
+
+Note: the languages listed here are supported in the development version. The
+latest release may lack a few of them.
--- /dev/null
+/*
+ * basic.css
+ * ~~~~~~~~~
+ *
+ * Sphinx stylesheet -- basic theme.
+ *
+ * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+/* -- main layout ----------------------------------------------------------- */
+
+div.clearer {
+ clear: both;
+}
+
+/* -- relbar ---------------------------------------------------------------- */
+
+div.related {
+ width: 100%;
+ font-size: 90%;
+}
+
+div.related h3 {
+ display: none;
+}
+
+div.related ul {
+ margin: 0;
+ padding: 0 0 0 10px;
+ list-style: none;
+}
+
+div.related li {
+ display: inline;
+}
+
+div.related li.right {
+ float: right;
+ margin-right: 5px;
+}
+
+/* -- sidebar --------------------------------------------------------------- */
+
+div.sphinxsidebarwrapper {
+ padding: 10px 5px 0 10px;
+}
+
+div.sphinxsidebar {
+ float: left;
+ width: 230px;
+ margin-left: -100%;
+ font-size: 90%;
+}
+
+div.sphinxsidebar ul {
+ list-style: none;
+}
+
+div.sphinxsidebar ul ul,
+div.sphinxsidebar ul.want-points {
+ margin-left: 20px;
+ list-style: square;
+}
+
+div.sphinxsidebar ul ul {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+div.sphinxsidebar form {
+ margin-top: 10px;
+}
+
+div.sphinxsidebar input {
+ border: 1px solid #98dbcc;
+ font-family: sans-serif;
+ font-size: 1em;
+}
+
+div.sphinxsidebar #searchbox input[type="text"] {
+ width: 170px;
+}
+
+div.sphinxsidebar #searchbox input[type="submit"] {
+ width: 30px;
+}
+
+img {
+ border: 0;
+ max-width: 100%;
+}
+
+/* -- search page ----------------------------------------------------------- */
+
+ul.search {
+ margin: 10px 0 0 20px;
+ padding: 0;
+}
+
+ul.search li {
+ padding: 5px 0 5px 20px;
+ background-image: url(file.png);
+ background-repeat: no-repeat;
+ background-position: 0 7px;
+}
+
+ul.search li a {
+ font-weight: bold;
+}
+
+ul.search li div.context {
+ color: #888;
+ margin: 2px 0 0 30px;
+ text-align: left;
+}
+
+ul.keywordmatches li.goodmatch a {
+ font-weight: bold;
+}
+
+/* -- index page ------------------------------------------------------------ */
+
+table.contentstable {
+ width: 90%;
+}
+
+table.contentstable p.biglink {
+ line-height: 150%;
+}
+
+a.biglink {
+ font-size: 1.3em;
+}
+
+span.linkdescr {
+ font-style: italic;
+ padding-top: 5px;
+ font-size: 90%;
+}
+
+/* -- general index --------------------------------------------------------- */
+
+table.indextable {
+ width: 100%;
+}
+
+table.indextable td {
+ text-align: left;
+ vertical-align: top;
+}
+
+table.indextable dl, table.indextable dd {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+table.indextable tr.pcap {
+ height: 10px;
+}
+
+table.indextable tr.cap {
+ margin-top: 10px;
+ background-color: #f2f2f2;
+}
+
+img.toggler {
+ margin-right: 3px;
+ margin-top: 3px;
+ cursor: pointer;
+}
+
+div.modindex-jumpbox {
+ border-top: 1px solid #ddd;
+ border-bottom: 1px solid #ddd;
+ margin: 1em 0 1em 0;
+ padding: 0.4em;
+}
+
+div.genindex-jumpbox {
+ border-top: 1px solid #ddd;
+ border-bottom: 1px solid #ddd;
+ margin: 1em 0 1em 0;
+ padding: 0.4em;
+}
+
+/* -- general body styles --------------------------------------------------- */
+
+a.headerlink {
+ visibility: hidden;
+}
+
+h1:hover > a.headerlink,
+h2:hover > a.headerlink,
+h3:hover > a.headerlink,
+h4:hover > a.headerlink,
+h5:hover > a.headerlink,
+h6:hover > a.headerlink,
+dt:hover > a.headerlink,
+caption:hover > a.headerlink,
+p.caption:hover > a.headerlink,
+div.code-block-caption:hover > a.headerlink {
+ visibility: visible;
+}
+
+div.body p.caption {
+ text-align: inherit;
+}
+
+div.body td {
+ text-align: left;
+}
+
+.field-list ul {
+ padding-left: 1em;
+}
+
+.first {
+ margin-top: 0 !important;
+}
+
+p.rubric {
+ margin-top: 30px;
+ font-weight: bold;
+}
+
+img.align-left, .figure.align-left, object.align-left {
+ clear: left;
+ float: left;
+ margin-right: 1em;
+}
+
+img.align-right, .figure.align-right, object.align-right {
+ clear: right;
+ float: right;
+ margin-left: 1em;
+}
+
+img.align-center, .figure.align-center, object.align-center {
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+.align-left {
+ text-align: left;
+}
+
+.align-center {
+ text-align: center;
+}
+
+.align-right {
+ text-align: right;
+}
+
+/* -- sidebars -------------------------------------------------------------- */
+
+div.sidebar {
+ margin: 0 0 0.5em 1em;
+ border: 1px solid #ddb;
+ padding: 7px 7px 0 7px;
+ background-color: #ffe;
+ width: 40%;
+ float: right;
+}
+
+p.sidebar-title {
+ font-weight: bold;
+}
+
+/* -- topics ---------------------------------------------------------------- */
+
+div.topic {
+ border: 1px solid #ccc;
+ padding: 7px 7px 0 7px;
+ margin: 10px 0 10px 0;
+}
+
+p.topic-title {
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-top: 10px;
+}
+
+/* -- admonitions ----------------------------------------------------------- */
+
+div.admonition {
+ margin-top: 10px;
+ margin-bottom: 10px;
+ padding: 7px;
+}
+
+div.admonition dt {
+ font-weight: bold;
+}
+
+div.admonition dl {
+ margin-bottom: 0;
+}
+
+p.admonition-title {
+ margin: 0px 10px 5px 0px;
+ font-weight: bold;
+}
+
+div.body p.centered {
+ text-align: center;
+ margin-top: 25px;
+}
+
+/* -- tables ---------------------------------------------------------------- */
+
+table.docutils {
+ border: 0;
+ border-collapse: collapse;
+}
+
+table caption span.caption-number {
+ font-style: italic;
+}
+
+table caption span.caption-text {
+}
+
+table.docutils td, table.docutils th {
+ padding: 1px 8px 1px 5px;
+ border-top: 0;
+ border-left: 0;
+ border-right: 0;
+ border-bottom: 1px solid #aaa;
+}
+
+table.field-list td, table.field-list th {
+ border: 0 !important;
+}
+
+table.footnote td, table.footnote th {
+ border: 0 !important;
+}
+
+th {
+ text-align: left;
+ padding-right: 5px;
+}
+
+table.citation {
+ border-left: solid 1px gray;
+ margin-left: 1px;
+}
+
+table.citation td {
+ border-bottom: none;
+}
+
+/* -- figures --------------------------------------------------------------- */
+
+div.figure {
+ margin: 0.5em;
+ padding: 0.5em;
+}
+
+div.figure p.caption {
+ padding: 0.3em;
+}
+
+div.figure p.caption span.caption-number {
+ font-style: italic;
+}
+
+div.figure p.caption span.caption-text {
+}
+
+
+/* -- other body styles ----------------------------------------------------- */
+
+ol.arabic {
+ list-style: decimal;
+}
+
+ol.loweralpha {
+ list-style: lower-alpha;
+}
+
+ol.upperalpha {
+ list-style: upper-alpha;
+}
+
+ol.lowerroman {
+ list-style: lower-roman;
+}
+
+ol.upperroman {
+ list-style: upper-roman;
+}
+
+dl {
+ margin-bottom: 15px;
+}
+
+dd p {
+ margin-top: 0px;
+}
+
+dd ul, dd table {
+ margin-bottom: 10px;
+}
+
+dd {
+ margin-top: 3px;
+ margin-bottom: 10px;
+ margin-left: 30px;
+}
+
+dt:target, .highlighted {
+ background-color: #fbe54e;
+}
+
+dl.glossary dt {
+ font-weight: bold;
+ font-size: 1.1em;
+}
+
+.field-list ul {
+ margin: 0;
+ padding-left: 1em;
+}
+
+.field-list p {
+ margin: 0;
+}
+
+.optional {
+ font-size: 1.3em;
+}
+
+.sig-paren {
+ font-size: larger;
+}
+
+.versionmodified {
+ font-style: italic;
+}
+
+.system-message {
+ background-color: #fda;
+ padding: 5px;
+ border: 3px solid red;
+}
+
+.footnote:target {
+ background-color: #ffa;
+}
+
+.line-block {
+ display: block;
+ margin-top: 1em;
+ margin-bottom: 1em;
+}
+
+.line-block .line-block {
+ margin-top: 0;
+ margin-bottom: 0;
+ margin-left: 1.5em;
+}
+
+.guilabel, .menuselection {
+ font-family: sans-serif;
+}
+
+.accelerator {
+ text-decoration: underline;
+}
+
+.classifier {
+ font-style: oblique;
+}
+
+abbr, acronym {
+ border-bottom: dotted 1px;
+ cursor: help;
+}
+
+/* -- code displays --------------------------------------------------------- */
+
+pre {
+ overflow: auto;
+ overflow-y: hidden; /* fixes display issues on Chrome browsers */
+}
+
+td.linenos pre {
+ padding: 5px 0px;
+ border: 0;
+ background-color: transparent;
+ color: #aaa;
+}
+
+table.highlighttable {
+ margin-left: 0.5em;
+}
+
+table.highlighttable td {
+ padding: 0 0.5em 0 0.5em;
+}
+
+div.code-block-caption {
+ padding: 2px 5px;
+ font-size: small;
+}
+
+div.code-block-caption code {
+ background-color: transparent;
+}
+
+div.code-block-caption + div > div.highlight > pre {
+ margin-top: 0;
+}
+
+div.code-block-caption span.caption-number {
+ padding: 0.1em 0.3em;
+ font-style: italic;
+}
+
+div.code-block-caption span.caption-text {
+}
+
+div.container {
+ padding: 1em 1em 0;
+}
+
+div.container div.highlight {
+ margin: 0;
+}
+
+code.descname {
+ background-color: transparent;
+ font-weight: bold;
+ font-size: 1.2em;
+}
+
+code.descclassname {
+ background-color: transparent;
+}
+
+code.xref, a code {
+ background-color: transparent;
+ font-weight: bold;
+}
+
+h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
+ background-color: transparent;
+}
+
+.viewcode-link {
+ float: right;
+}
+
+.viewcode-back {
+ float: right;
+ font-family: sans-serif;
+}
+
+div.viewcode-block:target {
+ margin: -1px -10px;
+ padding: 0 10px;
+}
+
+/* -- math display ---------------------------------------------------------- */
+
+img.math {
+ vertical-align: middle;
+}
+
+div.body div.math p {
+ text-align: center;
+}
+
+span.eqno {
+ float: right;
+}
+
+/* -- printout stylesheet --------------------------------------------------- */
+
+@media print {
+ div.document,
+ div.documentwrapper,
+ div.bodywrapper {
+ margin: 0 !important;
+ width: 100%;
+ }
+
+ div.sphinxsidebar,
+ div.related,
+ div.footer,
+ #top-link {
+ display: none;
+ }
+}
\ No newline at end of file
--- /dev/null
+/*
+ * default.css_t
+ * ~~~~~~~~~~~~~
+ *
+ * Sphinx stylesheet -- default theme.
+ *
+ * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+@import url("basic.css");
+
+/* -- page layout ----------------------------------------------------------- */
+
+body {
+ font-family: sans-serif;
+ font-size: 100%;
+ background-color: #11303d;
+ color: #000;
+ margin: 0;
+ padding: 0;
+}
+
+div.document {
+ background-color: #1c4e63;
+}
+
+div.documentwrapper {
+ float: left;
+ width: 100%;
+}
+
+div.bodywrapper {
+ margin: 0 0 0 230px;
+}
+
+div.body {
+ background-color: #ffffff;
+ color: #000000;
+ padding: 0 20px 30px 20px;
+}
+
+div.footer {
+ color: #ffffff;
+ width: 100%;
+ padding: 9px 0 9px 0;
+ text-align: center;
+ font-size: 75%;
+}
+
+div.footer a {
+ color: #ffffff;
+ text-decoration: underline;
+}
+
+div.related {
+ background-color: #133f52;
+ line-height: 30px;
+ color: #ffffff;
+}
+
+div.related a {
+ color: #ffffff;
+}
+
+div.sphinxsidebar {
+}
+
+div.sphinxsidebar h3 {
+ font-family: 'Trebuchet MS', sans-serif;
+ color: #ffffff;
+ font-size: 1.4em;
+ font-weight: normal;
+ margin: 0;
+ padding: 0;
+}
+
+div.sphinxsidebar h3 a {
+ color: #ffffff;
+}
+
+div.sphinxsidebar h4 {
+ font-family: 'Trebuchet MS', sans-serif;
+ color: #ffffff;
+ font-size: 1.3em;
+ font-weight: normal;
+ margin: 5px 0 0 0;
+ padding: 0;
+}
+
+div.sphinxsidebar p {
+ color: #ffffff;
+}
+
+div.sphinxsidebar p.topless {
+ margin: 5px 10px 10px 10px;
+}
+
+div.sphinxsidebar ul {
+ margin: 10px;
+ padding: 0;
+ color: #ffffff;
+}
+
+div.sphinxsidebar a {
+ color: #98dbcc;
+}
+
+div.sphinxsidebar input {
+ border: 1px solid #98dbcc;
+ font-family: sans-serif;
+ font-size: 1em;
+}
+
+
+
+/* -- hyperlink styles ------------------------------------------------------ */
+
+a {
+ color: #355f7c;
+ text-decoration: none;
+}
+
+a:visited {
+ color: #355f7c;
+ text-decoration: none;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+
+
+/* -- body styles ----------------------------------------------------------- */
+
+div.body h1,
+div.body h2,
+div.body h3,
+div.body h4,
+div.body h5,
+div.body h6 {
+ font-family: 'Trebuchet MS', sans-serif;
+ background-color: #f2f2f2;
+ font-weight: normal;
+ color: #20435c;
+ border-bottom: 1px solid #ccc;
+ margin: 20px -20px 10px -20px;
+ padding: 3px 0 3px 10px;
+}
+
+div.body h1 { margin-top: 0; font-size: 200%; }
+div.body h2 { font-size: 160%; }
+div.body h3 { font-size: 140%; }
+div.body h4 { font-size: 120%; }
+div.body h5 { font-size: 110%; }
+div.body h6 { font-size: 100%; }
+
+a.headerlink {
+ color: #c60f0f;
+ font-size: 0.8em;
+ padding: 0 4px 0 4px;
+ text-decoration: none;
+}
+
+a.headerlink:hover {
+ background-color: #c60f0f;
+ color: white;
+}
+
+div.body p, div.body dd, div.body li {
+ text-align: justify;
+ line-height: 130%;
+}
+
+div.admonition p.admonition-title + p {
+ display: inline;
+}
+
+div.admonition p {
+ margin-bottom: 5px;
+}
+
+div.admonition pre {
+ margin-bottom: 5px;
+}
+
+div.admonition ul, div.admonition ol {
+ margin-bottom: 5px;
+}
+
+div.note {
+ background-color: #eee;
+ border: 1px solid #ccc;
+}
+
+div.seealso {
+ background-color: #ffc;
+ border: 1px solid #ff6;
+}
+
+div.topic {
+ background-color: #eee;
+}
+
+div.warning {
+ background-color: #ffe4e4;
+ border: 1px solid #f66;
+}
+
+p.admonition-title {
+ display: inline;
+}
+
+p.admonition-title:after {
+ content: ":";
+}
+
+pre {
+ padding: 5px;
+ background-color: #eeffcc;
+ color: #333333;
+ line-height: 120%;
+ border: 1px solid #ac9;
+ border-left: none;
+ border-right: none;
+}
+
+code {
+ background-color: #ecf0f3;
+ padding: 0 1px 0 1px;
+ font-size: 0.95em;
+}
+
+th {
+ background-color: #ede;
+}
+
+.warning code {
+ background: #efc2c2;
+}
+
+.note code {
+ background: #d6d6d6;
+}
+
+.viewcode-back {
+ font-family: sans-serif;
+}
+
+div.viewcode-block:target {
+ background-color: #f4debf;
+ border-top: 1px solid #ac9;
+ border-bottom: 1px solid #ac9;
+}
+
+div.code-block-caption {
+ color: #efefef;
+ background-color: #1c4e63;
+}
\ No newline at end of file
--- /dev/null
+/*
+ * doctools.js
+ * ~~~~~~~~~~~
+ *
+ * Sphinx JavaScript utilities for all documentation.
+ *
+ * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+/**
+ * select a different prefix for underscore
+ */
+$u = _.noConflict();
+
+/**
+ * make the code below compatible with browsers without
+ * an installed firebug like debugger
+if (!window.console || !console.firebug) {
+ var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
+ "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
+ "profile", "profileEnd"];
+ window.console = {};
+ for (var i = 0; i < names.length; ++i)
+ window.console[names[i]] = function() {};
+}
+ */
+
+/**
+ * small helper function to urldecode strings
+ */
+jQuery.urldecode = function(x) {
+ return decodeURIComponent(x).replace(/\+/g, ' ');
+};
+
+/**
+ * small helper function to urlencode strings
+ */
+jQuery.urlencode = encodeURIComponent;
+
+/**
+ * This function returns the parsed url parameters of the
+ * current request. Multiple values per key are supported,
+ * it will always return arrays of strings for the value parts.
+ */
+jQuery.getQueryParameters = function(s) {
+ if (typeof s == 'undefined')
+ s = document.location.search;
+ var parts = s.substr(s.indexOf('?') + 1).split('&');
+ var result = {};
+ for (var i = 0; i < parts.length; i++) {
+ var tmp = parts[i].split('=', 2);
+ var key = jQuery.urldecode(tmp[0]);
+ var value = jQuery.urldecode(tmp[1]);
+ if (key in result)
+ result[key].push(value);
+ else
+ result[key] = [value];
+ }
+ return result;
+};
+
+/**
+ * highlight a given string on a jquery object by wrapping it in
+ * span elements with the given class name.
+ */
+jQuery.fn.highlightText = function(text, className) {
+ function highlight(node) {
+ if (node.nodeType == 3) {
+ var val = node.nodeValue;
+ var pos = val.toLowerCase().indexOf(text);
+ if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) {
+ var span = document.createElement("span");
+ span.className = className;
+ span.appendChild(document.createTextNode(val.substr(pos, text.length)));
+ node.parentNode.insertBefore(span, node.parentNode.insertBefore(
+ document.createTextNode(val.substr(pos + text.length)),
+ node.nextSibling));
+ node.nodeValue = val.substr(0, pos);
+ }
+ }
+ else if (!jQuery(node).is("button, select, textarea")) {
+ jQuery.each(node.childNodes, function() {
+ highlight(this);
+ });
+ }
+ }
+ return this.each(function() {
+ highlight(this);
+ });
+};
+
+/*
+ * backward compatibility for jQuery.browser
+ * This will be supported until firefox bug is fixed.
+ */
+if (!jQuery.browser) {
+ jQuery.uaMatch = function(ua) {
+ ua = ua.toLowerCase();
+
+ var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
+ /(webkit)[ \/]([\w.]+)/.exec(ua) ||
+ /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
+ /(msie) ([\w.]+)/.exec(ua) ||
+ ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
+ [];
+
+ return {
+ browser: match[ 1 ] || "",
+ version: match[ 2 ] || "0"
+ };
+ };
+ jQuery.browser = {};
+ jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
+}
+
+/**
+ * Small JavaScript module for the documentation.
+ */
+var Documentation = {
+
+ init : function() {
+ this.fixFirefoxAnchorBug();
+ this.highlightSearchWords();
+ this.initIndexTable();
+ },
+
+ /**
+ * i18n support
+ */
+ TRANSLATIONS : {},
+ PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; },
+ LOCALE : 'unknown',
+
+ // gettext and ngettext don't access this so that the functions
+ // can safely bound to a different name (_ = Documentation.gettext)
+ gettext : function(string) {
+ var translated = Documentation.TRANSLATIONS[string];
+ if (typeof translated == 'undefined')
+ return string;
+ return (typeof translated == 'string') ? translated : translated[0];
+ },
+
+ ngettext : function(singular, plural, n) {
+ var translated = Documentation.TRANSLATIONS[singular];
+ if (typeof translated == 'undefined')
+ return (n == 1) ? singular : plural;
+ return translated[Documentation.PLURALEXPR(n)];
+ },
+
+ addTranslations : function(catalog) {
+ for (var key in catalog.messages)
+ this.TRANSLATIONS[key] = catalog.messages[key];
+ this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
+ this.LOCALE = catalog.locale;
+ },
+
+ /**
+ * add context elements like header anchor links
+ */
+ addContextElements : function() {
+ $('div[id] > :header:first').each(function() {
+ $('<a class="headerlink">\u00B6</a>').
+ attr('href', '#' + this.id).
+ attr('title', _('Permalink to this headline')).
+ appendTo(this);
+ });
+ $('dt[id]').each(function() {
+ $('<a class="headerlink">\u00B6</a>').
+ attr('href', '#' + this.id).
+ attr('title', _('Permalink to this definition')).
+ appendTo(this);
+ });
+ },
+
+ /**
+ * workaround a firefox stupidity
+ * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
+ */
+ fixFirefoxAnchorBug : function() {
+ if (document.location.hash && $.browser.mozilla)
+ window.setTimeout(function() {
+ document.location.href += '';
+ }, 10);
+ },
+
+ /**
+ * highlight the search words provided in the url in the text
+ */
+ highlightSearchWords : function() {
+ var params = $.getQueryParameters();
+ var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
+ if (terms.length) {
+ var body = $('div.body');
+ if (!body.length) {
+ body = $('body');
+ }
+ window.setTimeout(function() {
+ $.each(terms, function() {
+ body.highlightText(this.toLowerCase(), 'highlighted');
+ });
+ }, 10);
+ $('<p class="highlight-link"><a href="javascript:Documentation.' +
+ 'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
+ .appendTo($('#searchbox'));
+ }
+ },
+
+ /**
+ * init the domain index toggle buttons
+ */
+ initIndexTable : function() {
+ var togglers = $('img.toggler').click(function() {
+ var src = $(this).attr('src');
+ var idnum = $(this).attr('id').substr(7);
+ $('tr.cg-' + idnum).toggle();
+ if (src.substr(-9) == 'minus.png')
+ $(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
+ else
+ $(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
+ }).css('display', '');
+ if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
+ togglers.click();
+ }
+ },
+
+ /**
+ * helper function to hide the search marks again
+ */
+ hideSearchWords : function() {
+ $('#searchbox .highlight-link').fadeOut(300);
+ $('span.highlighted').removeClass('highlighted');
+ },
+
+ /**
+ * make the url absolute
+ */
+ makeURL : function(relativeURL) {
+ return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
+ },
+
+ /**
+ * get the current relative url
+ */
+ getCurrentURL : function() {
+ var path = document.location.pathname;
+ var parts = path.split(/\//);
+ $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
+ if (this == '..')
+ parts.pop();
+ });
+ var url = parts.join('/');
+ return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
+ }
+};
+
+// quick alias for translations
+_ = Documentation.gettext;
+
+$(document).ready(function() {
+ Documentation.init();
+});
--- /dev/null
+/*!
+ * jQuery JavaScript Library v1.11.1
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2014-05-01T17:42Z
+ */
+
+(function( global, factory ) {
+
+ if ( typeof module === "object" && typeof module.exports === "object" ) {
+ // For CommonJS and CommonJS-like environments where a proper window is present,
+ // execute the factory and get jQuery
+ // For environments that do not inherently posses a window with a document
+ // (such as Node.js), expose a jQuery-making factory as module.exports
+ // This accentuates the need for the creation of a real window
+ // e.g. var jQuery = require("jquery")(window);
+ // See ticket #14549 for more info
+ module.exports = global.document ?
+ factory( global, true ) :
+ function( w ) {
+ if ( !w.document ) {
+ throw new Error( "jQuery requires a window with a document" );
+ }
+ return factory( w );
+ };
+ } else {
+ factory( global );
+ }
+
+// Pass this if window is not defined yet
+}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
+
+// Can't do this because several apps including ASP.NET trace
+// the stack via arguments.caller.callee and Firefox dies if
+// you try to trace through "use strict" call chains. (#13335)
+// Support: Firefox 18+
+//
+
+var deletedIds = [];
+
+var slice = deletedIds.slice;
+
+var concat = deletedIds.concat;
+
+var push = deletedIds.push;
+
+var indexOf = deletedIds.indexOf;
+
+var class2type = {};
+
+var toString = class2type.toString;
+
+var hasOwn = class2type.hasOwnProperty;
+
+var support = {};
+
+
+
+var
+ version = "1.11.1",
+
+ // Define a local copy of jQuery
+ jQuery = function( selector, context ) {
+ // The jQuery object is actually just the init constructor 'enhanced'
+ // Need init if jQuery is called (just allow error to be thrown if not included)
+ return new jQuery.fn.init( selector, context );
+ },
+
+ // Support: Android<4.1, IE<9
+ // Make sure we trim BOM and NBSP
+ rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+ // Matches dashed string for camelizing
+ rmsPrefix = /^-ms-/,
+ rdashAlpha = /-([\da-z])/gi,
+
+ // Used by jQuery.camelCase as callback to replace()
+ fcamelCase = function( all, letter ) {
+ return letter.toUpperCase();
+ };
+
+jQuery.fn = jQuery.prototype = {
+ // The current version of jQuery being used
+ jquery: version,
+
+ constructor: jQuery,
+
+ // Start with an empty selector
+ selector: "",
+
+ // The default length of a jQuery object is 0
+ length: 0,
+
+ toArray: function() {
+ return slice.call( this );
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+ return num != null ?
+
+ // Return just the one element from the set
+ ( num < 0 ? this[ num + this.length ] : this[ num ] ) :
+
+ // Return all the elements in a clean array
+ slice.call( this );
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems ) {
+
+ // Build a new jQuery matched element set
+ var ret = jQuery.merge( this.constructor(), elems );
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+ ret.context = this.context;
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Execute a callback for every element in the matched set.
+ // (You can seed the arguments with an array of args, but this is
+ // only used internally.)
+ each: function( callback, args ) {
+ return jQuery.each( this, callback, args );
+ },
+
+ map: function( callback ) {
+ return this.pushStack( jQuery.map(this, function( elem, i ) {
+ return callback.call( elem, i, elem );
+ }));
+ },
+
+ slice: function() {
+ return this.pushStack( slice.apply( this, arguments ) );
+ },
+
+ first: function() {
+ return this.eq( 0 );
+ },
+
+ last: function() {
+ return this.eq( -1 );
+ },
+
+ eq: function( i ) {
+ var len = this.length,
+ j = +i + ( i < 0 ? len : 0 );
+ return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
+ },
+
+ end: function() {
+ return this.prevObject || this.constructor(null);
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: push,
+ sort: deletedIds.sort,
+ splice: deletedIds.splice
+};
+
+jQuery.extend = jQuery.fn.extend = function() {
+ var src, copyIsArray, copy, name, options, clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+
+ // skip the boolean and the target
+ target = arguments[ i ] || {};
+ i++;
+ }
+
+ // Handle case when target is a string or something (possible in deep copy)
+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+ target = {};
+ }
+
+ // extend jQuery itself if only one argument is passed
+ if ( i === length ) {
+ target = this;
+ i--;
+ }
+
+ for ( ; i < length; i++ ) {
+ // Only deal with non-null/undefined values
+ if ( (options = arguments[ i ]) != null ) {
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && jQuery.isArray(src) ? src : [];
+
+ } else {
+ clone = src && jQuery.isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend({
+ // Unique for each copy of jQuery on the page
+ expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
+
+ // Assume jQuery is ready without the ready module
+ isReady: true,
+
+ error: function( msg ) {
+ throw new Error( msg );
+ },
+
+ noop: function() {},
+
+ // See test/unit/core.js for details concerning isFunction.
+ // Since version 1.3, DOM methods and functions like alert
+ // aren't supported. They return false on IE (#2968).
+ isFunction: function( obj ) {
+ return jQuery.type(obj) === "function";
+ },
+
+ isArray: Array.isArray || function( obj ) {
+ return jQuery.type(obj) === "array";
+ },
+
+ isWindow: function( obj ) {
+ /* jshint eqeqeq: false */
+ return obj != null && obj == obj.window;
+ },
+
+ isNumeric: function( obj ) {
+ // parseFloat NaNs numeric-cast false positives (null|true|false|"")
+ // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
+ // subtraction forces infinities to NaN
+ return !jQuery.isArray( obj ) && obj - parseFloat( obj ) >= 0;
+ },
+
+ isEmptyObject: function( obj ) {
+ var name;
+ for ( name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ isPlainObject: function( obj ) {
+ var key;
+
+ // Must be an Object.
+ // Because of IE, we also have to check the presence of the constructor property.
+ // Make sure that DOM nodes and window objects don't pass through, as well
+ if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ try {
+ // Not own constructor property must be Object
+ if ( obj.constructor &&
+ !hasOwn.call(obj, "constructor") &&
+ !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+ return false;
+ }
+ } catch ( e ) {
+ // IE8,9 Will throw exceptions on certain host objects #9897
+ return false;
+ }
+
+ // Support: IE<9
+ // Handle iteration over inherited properties before own properties.
+ if ( support.ownLast ) {
+ for ( key in obj ) {
+ return hasOwn.call( obj, key );
+ }
+ }
+
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+ for ( key in obj ) {}
+
+ return key === undefined || hasOwn.call( obj, key );
+ },
+
+ type: function( obj ) {
+ if ( obj == null ) {
+ return obj + "";
+ }
+ return typeof obj === "object" || typeof obj === "function" ?
+ class2type[ toString.call(obj) ] || "object" :
+ typeof obj;
+ },
+
+ // Evaluates a script in a global context
+ // Workarounds based on findings by Jim Driscoll
+ // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+ globalEval: function( data ) {
+ if ( data && jQuery.trim( data ) ) {
+ // We use execScript on Internet Explorer
+ // We use an anonymous function so that context is window
+ // rather than jQuery in Firefox
+ ( window.execScript || function( data ) {
+ window[ "eval" ].call( window, data );
+ } )( data );
+ }
+ },
+
+ // Convert dashed to camelCase; used by the css and data modules
+ // Microsoft forgot to hump their vendor prefix (#9572)
+ camelCase: function( string ) {
+ return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+ },
+
+ // args is for internal usage only
+ each: function( obj, callback, args ) {
+ var value,
+ i = 0,
+ length = obj.length,
+ isArray = isArraylike( obj );
+
+ if ( args ) {
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback.apply( obj[ i ], args );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( i in obj ) {
+ value = callback.apply( obj[ i ], args );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ }
+
+ // A special, fast, case for the most common use of each
+ } else {
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback.call( obj[ i ], i, obj[ i ] );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( i in obj ) {
+ value = callback.call( obj[ i ], i, obj[ i ] );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ }
+ }
+
+ return obj;
+ },
+
+ // Support: Android<4.1, IE<9
+ trim: function( text ) {
+ return text == null ?
+ "" :
+ ( text + "" ).replace( rtrim, "" );
+ },
+
+ // results is for internal usage only
+ makeArray: function( arr, results ) {
+ var ret = results || [];
+
+ if ( arr != null ) {
+ if ( isArraylike( Object(arr) ) ) {
+ jQuery.merge( ret,
+ typeof arr === "string" ?
+ [ arr ] : arr
+ );
+ } else {
+ push.call( ret, arr );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, arr, i ) {
+ var len;
+
+ if ( arr ) {
+ if ( indexOf ) {
+ return indexOf.call( arr, elem, i );
+ }
+
+ len = arr.length;
+ i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
+
+ for ( ; i < len; i++ ) {
+ // Skip accessing in sparse arrays
+ if ( i in arr && arr[ i ] === elem ) {
+ return i;
+ }
+ }
+ }
+
+ return -1;
+ },
+
+ merge: function( first, second ) {
+ var len = +second.length,
+ j = 0,
+ i = first.length;
+
+ while ( j < len ) {
+ first[ i++ ] = second[ j++ ];
+ }
+
+ // Support: IE<9
+ // Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists)
+ if ( len !== len ) {
+ while ( second[j] !== undefined ) {
+ first[ i++ ] = second[ j++ ];
+ }
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, invert ) {
+ var callbackInverse,
+ matches = [],
+ i = 0,
+ length = elems.length,
+ callbackExpect = !invert;
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( ; i < length; i++ ) {
+ callbackInverse = !callback( elems[ i ], i );
+ if ( callbackInverse !== callbackExpect ) {
+ matches.push( elems[ i ] );
+ }
+ }
+
+ return matches;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var value,
+ i = 0,
+ length = elems.length,
+ isArray = isArraylike( elems ),
+ ret = [];
+
+ // Go through the array, translating each of the items to their new values
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret.push( value );
+ }
+ }
+
+ // Go through every key on the object,
+ } else {
+ for ( i in elems ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret.push( value );
+ }
+ }
+ }
+
+ // Flatten any nested arrays
+ return concat.apply( [], ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ // Bind a function to a context, optionally partially applying any
+ // arguments.
+ proxy: function( fn, context ) {
+ var args, proxy, tmp;
+
+ if ( typeof context === "string" ) {
+ tmp = fn[ context ];
+ context = fn;
+ fn = tmp;
+ }
+
+ // Quick check to determine if target is callable, in the spec
+ // this throws a TypeError, but we will just return undefined.
+ if ( !jQuery.isFunction( fn ) ) {
+ return undefined;
+ }
+
+ // Simulated bind
+ args = slice.call( arguments, 2 );
+ proxy = function() {
+ return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
+ };
+
+ // Set the guid of unique handler to the same of original handler, so it can be removed
+ proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+ return proxy;
+ },
+
+ now: function() {
+ return +( new Date() );
+ },
+
+ // jQuery.support is not used in Core but other projects attach their
+ // properties to it so it needs to exist.
+ support: support
+});
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+function isArraylike( obj ) {
+ var length = obj.length,
+ type = jQuery.type( obj );
+
+ if ( type === "function" || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ if ( obj.nodeType === 1 && length ) {
+ return true;
+ }
+
+ return type === "array" || length === 0 ||
+ typeof length === "number" && length > 0 && ( length - 1 ) in obj;
+}
+var Sizzle =
+/*!
+ * Sizzle CSS Selector Engine v1.10.19
+ * http://sizzlejs.com/
+ *
+ * Copyright 2013 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2014-04-18
+ */
+(function( window ) {
+
+var i,
+ support,
+ Expr,
+ getText,
+ isXML,
+ tokenize,
+ compile,
+ select,
+ outermostContext,
+ sortInput,
+ hasDuplicate,
+
+ // Local document vars
+ setDocument,
+ document,
+ docElem,
+ documentIsHTML,
+ rbuggyQSA,
+ rbuggyMatches,
+ matches,
+ contains,
+
+ // Instance-specific data
+ expando = "sizzle" + -(new Date()),
+ preferredDoc = window.document,
+ dirruns = 0,
+ done = 0,
+ classCache = createCache(),
+ tokenCache = createCache(),
+ compilerCache = createCache(),
+ sortOrder = function( a, b ) {
+ if ( a === b ) {
+ hasDuplicate = true;
+ }
+ return 0;
+ },
+
+ // General-purpose constants
+ strundefined = typeof undefined,
+ MAX_NEGATIVE = 1 << 31,
+
+ // Instance methods
+ hasOwn = ({}).hasOwnProperty,
+ arr = [],
+ pop = arr.pop,
+ push_native = arr.push,
+ push = arr.push,
+ slice = arr.slice,
+ // Use a stripped-down indexOf if we can't use a native one
+ indexOf = arr.indexOf || function( elem ) {
+ var i = 0,
+ len = this.length;
+ for ( ; i < len; i++ ) {
+ if ( this[i] === elem ) {
+ return i;
+ }
+ }
+ return -1;
+ },
+
+ booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
+
+ // Regular expressions
+
+ // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
+ whitespace = "[\\x20\\t\\r\\n\\f]",
+ // http://www.w3.org/TR/css3-syntax/#characters
+ characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
+
+ // Loosely modeled on CSS identifier characters
+ // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
+ // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+ identifier = characterEncoding.replace( "w", "w#" ),
+
+ // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
+ attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace +
+ // Operator (capture 2)
+ "*([*^$|!~]?=)" + whitespace +
+ // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
+ "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
+ "*\\]",
+
+ pseudos = ":(" + characterEncoding + ")(?:\\((" +
+ // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
+ // 1. quoted (capture 3; capture 4 or capture 5)
+ "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
+ // 2. simple (capture 6)
+ "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
+ // 3. anything else (capture 2)
+ ".*" +
+ ")\\)|)",
+
+ // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+ rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+ rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+ rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
+
+ rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
+
+ rpseudo = new RegExp( pseudos ),
+ ridentifier = new RegExp( "^" + identifier + "$" ),
+
+ matchExpr = {
+ "ID": new RegExp( "^#(" + characterEncoding + ")" ),
+ "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
+ "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
+ "ATTR": new RegExp( "^" + attributes ),
+ "PSEUDO": new RegExp( "^" + pseudos ),
+ "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
+ "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+ "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+ "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
+ // For use in libraries implementing .is()
+ // We use this for POS matching in `select`
+ "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
+ whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
+ },
+
+ rinputs = /^(?:input|select|textarea|button)$/i,
+ rheader = /^h\d$/i,
+
+ rnative = /^[^{]+\{\s*\[native \w/,
+
+ // Easily-parseable/retrievable ID or TAG or CLASS selectors
+ rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+ rsibling = /[+~]/,
+ rescape = /'|\\/g,
+
+ // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+ runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
+ funescape = function( _, escaped, escapedWhitespace ) {
+ var high = "0x" + escaped - 0x10000;
+ // NaN means non-codepoint
+ // Support: Firefox<24
+ // Workaround erroneous numeric interpretation of +"0x"
+ return high !== high || escapedWhitespace ?
+ escaped :
+ high < 0 ?
+ // BMP codepoint
+ String.fromCharCode( high + 0x10000 ) :
+ // Supplemental Plane codepoint (surrogate pair)
+ String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
+ };
+
+// Optimize for push.apply( _, NodeList )
+try {
+ push.apply(
+ (arr = slice.call( preferredDoc.childNodes )),
+ preferredDoc.childNodes
+ );
+ // Support: Android<4.0
+ // Detect silently failing push.apply
+ arr[ preferredDoc.childNodes.length ].nodeType;
+} catch ( e ) {
+ push = { apply: arr.length ?
+
+ // Leverage slice if possible
+ function( target, els ) {
+ push_native.apply( target, slice.call(els) );
+ } :
+
+ // Support: IE<9
+ // Otherwise append directly
+ function( target, els ) {
+ var j = target.length,
+ i = 0;
+ // Can't trust NodeList.length
+ while ( (target[j++] = els[i++]) ) {}
+ target.length = j - 1;
+ }
+ };
+}
+
+function Sizzle( selector, context, results, seed ) {
+ var match, elem, m, nodeType,
+ // QSA vars
+ i, groups, old, nid, newContext, newSelector;
+
+ if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
+ setDocument( context );
+ }
+
+ context = context || document;
+ results = results || [];
+
+ if ( !selector || typeof selector !== "string" ) {
+ return results;
+ }
+
+ if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
+ return [];
+ }
+
+ if ( documentIsHTML && !seed ) {
+
+ // Shortcuts
+ if ( (match = rquickExpr.exec( selector )) ) {
+ // Speed-up: Sizzle("#ID")
+ if ( (m = match[1]) ) {
+ if ( nodeType === 9 ) {
+ elem = context.getElementById( m );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document (jQuery #6963)
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE, Opera, and Webkit return items
+ // by name instead of ID
+ if ( elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ } else {
+ return results;
+ }
+ } else {
+ // Context is not a document
+ if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
+ contains( context, elem ) && elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ }
+
+ // Speed-up: Sizzle("TAG")
+ } else if ( match[2] ) {
+ push.apply( results, context.getElementsByTagName( selector ) );
+ return results;
+
+ // Speed-up: Sizzle(".CLASS")
+ } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
+ push.apply( results, context.getElementsByClassName( m ) );
+ return results;
+ }
+ }
+
+ // QSA path
+ if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
+ nid = old = expando;
+ newContext = context;
+ newSelector = nodeType === 9 && selector;
+
+ // qSA works strangely on Element-rooted queries
+ // We can work around this by specifying an extra ID on the root
+ // and working up from there (Thanks to Andrew Dupont for the technique)
+ // IE 8 doesn't work on object elements
+ if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+ groups = tokenize( selector );
+
+ if ( (old = context.getAttribute("id")) ) {
+ nid = old.replace( rescape, "\\$&" );
+ } else {
+ context.setAttribute( "id", nid );
+ }
+ nid = "[id='" + nid + "'] ";
+
+ i = groups.length;
+ while ( i-- ) {
+ groups[i] = nid + toSelector( groups[i] );
+ }
+ newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context;
+ newSelector = groups.join(",");
+ }
+
+ if ( newSelector ) {
+ try {
+ push.apply( results,
+ newContext.querySelectorAll( newSelector )
+ );
+ return results;
+ } catch(qsaError) {
+ } finally {
+ if ( !old ) {
+ context.removeAttribute("id");
+ }
+ }
+ }
+ }
+ }
+
+ // All others
+ return select( selector.replace( rtrim, "$1" ), context, results, seed );
+}
+
+/**
+ * Create key-value caches of limited size
+ * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
+ * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+ * deleting the oldest entry
+ */
+function createCache() {
+ var keys = [];
+
+ function cache( key, value ) {
+ // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+ if ( keys.push( key + " " ) > Expr.cacheLength ) {
+ // Only keep the most recent entries
+ delete cache[ keys.shift() ];
+ }
+ return (cache[ key + " " ] = value);
+ }
+ return cache;
+}
+
+/**
+ * Mark a function for special use by Sizzle
+ * @param {Function} fn The function to mark
+ */
+function markFunction( fn ) {
+ fn[ expando ] = true;
+ return fn;
+}
+
+/**
+ * Support testing using an element
+ * @param {Function} fn Passed the created div and expects a boolean result
+ */
+function assert( fn ) {
+ var div = document.createElement("div");
+
+ try {
+ return !!fn( div );
+ } catch (e) {
+ return false;
+ } finally {
+ // Remove from its parent by default
+ if ( div.parentNode ) {
+ div.parentNode.removeChild( div );
+ }
+ // release memory in IE
+ div = null;
+ }
+}
+
+/**
+ * Adds the same handler for all of the specified attrs
+ * @param {String} attrs Pipe-separated list of attributes
+ * @param {Function} handler The method that will be applied
+ */
+function addHandle( attrs, handler ) {
+ var arr = attrs.split("|"),
+ i = attrs.length;
+
+ while ( i-- ) {
+ Expr.attrHandle[ arr[i] ] = handler;
+ }
+}
+
+/**
+ * Checks document order of two siblings
+ * @param {Element} a
+ * @param {Element} b
+ * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
+ */
+function siblingCheck( a, b ) {
+ var cur = b && a,
+ diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
+ ( ~b.sourceIndex || MAX_NEGATIVE ) -
+ ( ~a.sourceIndex || MAX_NEGATIVE );
+
+ // Use IE sourceIndex if available on both nodes
+ if ( diff ) {
+ return diff;
+ }
+
+ // Check if b follows a
+ if ( cur ) {
+ while ( (cur = cur.nextSibling) ) {
+ if ( cur === b ) {
+ return -1;
+ }
+ }
+ }
+
+ return a ? 1 : -1;
+}
+
+/**
+ * Returns a function to use in pseudos for input types
+ * @param {String} type
+ */
+function createInputPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === type;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for buttons
+ * @param {String} type
+ */
+function createButtonPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return (name === "input" || name === "button") && elem.type === type;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for positionals
+ * @param {Function} fn
+ */
+function createPositionalPseudo( fn ) {
+ return markFunction(function( argument ) {
+ argument = +argument;
+ return markFunction(function( seed, matches ) {
+ var j,
+ matchIndexes = fn( [], seed.length, argument ),
+ i = matchIndexes.length;
+
+ // Match elements found at the specified indexes
+ while ( i-- ) {
+ if ( seed[ (j = matchIndexes[i]) ] ) {
+ seed[j] = !(matches[j] = seed[j]);
+ }
+ }
+ });
+ });
+}
+
+/**
+ * Checks a node for validity as a Sizzle context
+ * @param {Element|Object=} context
+ * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
+ */
+function testContext( context ) {
+ return context && typeof context.getElementsByTagName !== strundefined && context;
+}
+
+// Expose support vars for convenience
+support = Sizzle.support = {};
+
+/**
+ * Detects XML nodes
+ * @param {Element|Object} elem An element or a document
+ * @returns {Boolean} True iff elem is a non-HTML XML node
+ */
+isXML = Sizzle.isXML = function( elem ) {
+ // documentElement is verified for cases where it doesn't yet exist
+ // (such as loading iframes in IE - #4833)
+ var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+/**
+ * Sets document-related variables once based on the current document
+ * @param {Element|Object} [doc] An element or document object to use to set the document
+ * @returns {Object} Returns the current document
+ */
+setDocument = Sizzle.setDocument = function( node ) {
+ var hasCompare,
+ doc = node ? node.ownerDocument || node : preferredDoc,
+ parent = doc.defaultView;
+
+ // If no document and documentElement is available, return
+ if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
+ return document;
+ }
+
+ // Set our document
+ document = doc;
+ docElem = doc.documentElement;
+
+ // Support tests
+ documentIsHTML = !isXML( doc );
+
+ // Support: IE>8
+ // If iframe document is assigned to "document" variable and if iframe has been reloaded,
+ // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
+ // IE6-8 do not support the defaultView property so parent will be undefined
+ if ( parent && parent !== parent.top ) {
+ // IE11 does not have attachEvent, so all must suffer
+ if ( parent.addEventListener ) {
+ parent.addEventListener( "unload", function() {
+ setDocument();
+ }, false );
+ } else if ( parent.attachEvent ) {
+ parent.attachEvent( "onunload", function() {
+ setDocument();
+ });
+ }
+ }
+
+ /* Attributes
+ ---------------------------------------------------------------------- */
+
+ // Support: IE<8
+ // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
+ support.attributes = assert(function( div ) {
+ div.className = "i";
+ return !div.getAttribute("className");
+ });
+
+ /* getElement(s)By*
+ ---------------------------------------------------------------------- */
+
+ // Check if getElementsByTagName("*") returns only elements
+ support.getElementsByTagName = assert(function( div ) {
+ div.appendChild( doc.createComment("") );
+ return !div.getElementsByTagName("*").length;
+ });
+
+ // Check if getElementsByClassName can be trusted
+ support.getElementsByClassName = rnative.test( doc.getElementsByClassName ) && assert(function( div ) {
+ div.innerHTML = "<div class='a'></div><div class='a i'></div>";
+
+ // Support: Safari<4
+ // Catch class over-caching
+ div.firstChild.className = "i";
+ // Support: Opera<10
+ // Catch gEBCN failure to find non-leading classes
+ return div.getElementsByClassName("i").length === 2;
+ });
+
+ // Support: IE<10
+ // Check if getElementById returns elements by name
+ // The broken getElementById methods don't pick up programatically-set names,
+ // so use a roundabout getElementsByName test
+ support.getById = assert(function( div ) {
+ docElem.appendChild( div ).id = expando;
+ return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
+ });
+
+ // ID find and filter
+ if ( support.getById ) {
+ Expr.find["ID"] = function( id, context ) {
+ if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
+ var m = context.getElementById( id );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ return m && m.parentNode ? [ m ] : [];
+ }
+ };
+ Expr.filter["ID"] = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ return elem.getAttribute("id") === attrId;
+ };
+ };
+ } else {
+ // Support: IE6/7
+ // getElementById is not reliable as a find shortcut
+ delete Expr.find["ID"];
+
+ Expr.filter["ID"] = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
+ return node && node.value === attrId;
+ };
+ };
+ }
+
+ // Tag
+ Expr.find["TAG"] = support.getElementsByTagName ?
+ function( tag, context ) {
+ if ( typeof context.getElementsByTagName !== strundefined ) {
+ return context.getElementsByTagName( tag );
+ }
+ } :
+ function( tag, context ) {
+ var elem,
+ tmp = [],
+ i = 0,
+ results = context.getElementsByTagName( tag );
+
+ // Filter out possible comments
+ if ( tag === "*" ) {
+ while ( (elem = results[i++]) ) {
+ if ( elem.nodeType === 1 ) {
+ tmp.push( elem );
+ }
+ }
+
+ return tmp;
+ }
+ return results;
+ };
+
+ // Class
+ Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
+ if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {
+ return context.getElementsByClassName( className );
+ }
+ };
+
+ /* QSA/matchesSelector
+ ---------------------------------------------------------------------- */
+
+ // QSA and matchesSelector support
+
+ // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+ rbuggyMatches = [];
+
+ // qSa(:focus) reports false when true (Chrome 21)
+ // We allow this because of a bug in IE8/9 that throws an error
+ // whenever `document.activeElement` is accessed on an iframe
+ // So, we allow :focus to pass through QSA all the time to avoid the IE error
+ // See http://bugs.jquery.com/ticket/13378
+ rbuggyQSA = [];
+
+ if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
+ // Build QSA regex
+ // Regex strategy adopted from Diego Perini
+ assert(function( div ) {
+ // Select is set to empty string on purpose
+ // This is to test IE's treatment of not explicitly
+ // setting a boolean content attribute,
+ // since its presence should be enough
+ // http://bugs.jquery.com/ticket/12359
+ div.innerHTML = "<select msallowclip=''><option selected=''></option></select>";
+
+ // Support: IE8, Opera 11-12.16
+ // Nothing should be selected when empty strings follow ^= or $= or *=
+ // The test attribute must be unknown in Opera but "safe" for WinRT
+ // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
+ if ( div.querySelectorAll("[msallowclip^='']").length ) {
+ rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
+ }
+
+ // Support: IE8
+ // Boolean attributes and "value" are not treated correctly
+ if ( !div.querySelectorAll("[selected]").length ) {
+ rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
+ }
+
+ // Webkit/Opera - :checked should return selected option elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ // IE8 throws error here and will not see later tests
+ if ( !div.querySelectorAll(":checked").length ) {
+ rbuggyQSA.push(":checked");
+ }
+ });
+
+ assert(function( div ) {
+ // Support: Windows 8 Native Apps
+ // The type and name attributes are restricted during .innerHTML assignment
+ var input = doc.createElement("input");
+ input.setAttribute( "type", "hidden" );
+ div.appendChild( input ).setAttribute( "name", "D" );
+
+ // Support: IE8
+ // Enforce case-sensitivity of name attribute
+ if ( div.querySelectorAll("[name=d]").length ) {
+ rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
+ }
+
+ // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+ // IE8 throws error here and will not see later tests
+ if ( !div.querySelectorAll(":enabled").length ) {
+ rbuggyQSA.push( ":enabled", ":disabled" );
+ }
+
+ // Opera 10-11 does not throw on post-comma invalid pseudos
+ div.querySelectorAll("*,:x");
+ rbuggyQSA.push(",.*:");
+ });
+ }
+
+ if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
+ docElem.webkitMatchesSelector ||
+ docElem.mozMatchesSelector ||
+ docElem.oMatchesSelector ||
+ docElem.msMatchesSelector) )) ) {
+
+ assert(function( div ) {
+ // Check to see if it's possible to do matchesSelector
+ // on a disconnected node (IE 9)
+ support.disconnectedMatch = matches.call( div, "div" );
+
+ // This should fail with an exception
+ // Gecko does not error, returns false instead
+ matches.call( div, "[s!='']:x" );
+ rbuggyMatches.push( "!=", pseudos );
+ });
+ }
+
+ rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
+ rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
+
+ /* Contains
+ ---------------------------------------------------------------------- */
+ hasCompare = rnative.test( docElem.compareDocumentPosition );
+
+ // Element contains another
+ // Purposefully does not implement inclusive descendent
+ // As in, an element does not contain itself
+ contains = hasCompare || rnative.test( docElem.contains ) ?
+ function( a, b ) {
+ var adown = a.nodeType === 9 ? a.documentElement : a,
+ bup = b && b.parentNode;
+ return a === bup || !!( bup && bup.nodeType === 1 && (
+ adown.contains ?
+ adown.contains( bup ) :
+ a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+ ));
+ } :
+ function( a, b ) {
+ if ( b ) {
+ while ( (b = b.parentNode) ) {
+ if ( b === a ) {
+ return true;
+ }
+ }
+ }
+ return false;
+ };
+
+ /* Sorting
+ ---------------------------------------------------------------------- */
+
+ // Document order sorting
+ sortOrder = hasCompare ?
+ function( a, b ) {
+
+ // Flag for duplicate removal
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ // Sort on method existence if only one input has compareDocumentPosition
+ var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
+ if ( compare ) {
+ return compare;
+ }
+
+ // Calculate position if both inputs belong to the same document
+ compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
+ a.compareDocumentPosition( b ) :
+
+ // Otherwise we know they are disconnected
+ 1;
+
+ // Disconnected nodes
+ if ( compare & 1 ||
+ (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
+
+ // Choose the first element that is related to our preferred document
+ if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
+ return -1;
+ }
+ if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
+ return 1;
+ }
+
+ // Maintain original order
+ return sortInput ?
+ ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
+ 0;
+ }
+
+ return compare & 4 ? -1 : 1;
+ } :
+ function( a, b ) {
+ // Exit early if the nodes are identical
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ var cur,
+ i = 0,
+ aup = a.parentNode,
+ bup = b.parentNode,
+ ap = [ a ],
+ bp = [ b ];
+
+ // Parentless nodes are either documents or disconnected
+ if ( !aup || !bup ) {
+ return a === doc ? -1 :
+ b === doc ? 1 :
+ aup ? -1 :
+ bup ? 1 :
+ sortInput ?
+ ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
+ 0;
+
+ // If the nodes are siblings, we can do a quick check
+ } else if ( aup === bup ) {
+ return siblingCheck( a, b );
+ }
+
+ // Otherwise we need full lists of their ancestors for comparison
+ cur = a;
+ while ( (cur = cur.parentNode) ) {
+ ap.unshift( cur );
+ }
+ cur = b;
+ while ( (cur = cur.parentNode) ) {
+ bp.unshift( cur );
+ }
+
+ // Walk down the tree looking for a discrepancy
+ while ( ap[i] === bp[i] ) {
+ i++;
+ }
+
+ return i ?
+ // Do a sibling check if the nodes have a common ancestor
+ siblingCheck( ap[i], bp[i] ) :
+
+ // Otherwise nodes in our document sort first
+ ap[i] === preferredDoc ? -1 :
+ bp[i] === preferredDoc ? 1 :
+ 0;
+ };
+
+ return doc;
+};
+
+Sizzle.matches = function( expr, elements ) {
+ return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ // Make sure that attribute selectors are quoted
+ expr = expr.replace( rattributeQuotes, "='$1']" );
+
+ if ( support.matchesSelector && documentIsHTML &&
+ ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
+ ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
+
+ try {
+ var ret = matches.call( elem, expr );
+
+ // IE 9's matchesSelector returns false on disconnected nodes
+ if ( ret || support.disconnectedMatch ||
+ // As well, disconnected nodes are said to be in a document
+ // fragment in IE 9
+ elem.document && elem.document.nodeType !== 11 ) {
+ return ret;
+ }
+ } catch(e) {}
+ }
+
+ return Sizzle( expr, document, null, [ elem ] ).length > 0;
+};
+
+Sizzle.contains = function( context, elem ) {
+ // Set document vars if needed
+ if ( ( context.ownerDocument || context ) !== document ) {
+ setDocument( context );
+ }
+ return contains( context, elem );
+};
+
+Sizzle.attr = function( elem, name ) {
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ var fn = Expr.attrHandle[ name.toLowerCase() ],
+ // Don't get fooled by Object.prototype properties (jQuery #13807)
+ val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
+ fn( elem, name, !documentIsHTML ) :
+ undefined;
+
+ return val !== undefined ?
+ val :
+ support.attributes || !documentIsHTML ?
+ elem.getAttribute( name ) :
+ (val = elem.getAttributeNode(name)) && val.specified ?
+ val.value :
+ null;
+};
+
+Sizzle.error = function( msg ) {
+ throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Document sorting and removing duplicates
+ * @param {ArrayLike} results
+ */
+Sizzle.uniqueSort = function( results ) {
+ var elem,
+ duplicates = [],
+ j = 0,
+ i = 0;
+
+ // Unless we *know* we can detect duplicates, assume their presence
+ hasDuplicate = !support.detectDuplicates;
+ sortInput = !support.sortStable && results.slice( 0 );
+ results.sort( sortOrder );
+
+ if ( hasDuplicate ) {
+ while ( (elem = results[i++]) ) {
+ if ( elem === results[ i ] ) {
+ j = duplicates.push( i );
+ }
+ }
+ while ( j-- ) {
+ results.splice( duplicates[ j ], 1 );
+ }
+ }
+
+ // Clear input after sorting to release objects
+ // See https://github.com/jquery/sizzle/pull/225
+ sortInput = null;
+
+ return results;
+};
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+ var node,
+ ret = "",
+ i = 0,
+ nodeType = elem.nodeType;
+
+ if ( !nodeType ) {
+ // If no nodeType, this is expected to be an array
+ while ( (node = elem[i++]) ) {
+ // Do not traverse comment nodes
+ ret += getText( node );
+ }
+ } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+ // Use textContent for elements
+ // innerText usage removed for consistency of new lines (jQuery #11153)
+ if ( typeof elem.textContent === "string" ) {
+ return elem.textContent;
+ } else {
+ // Traverse its children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ ret += getText( elem );
+ }
+ }
+ } else if ( nodeType === 3 || nodeType === 4 ) {
+ return elem.nodeValue;
+ }
+ // Do not include comment or processing instruction nodes
+
+ return ret;
+};
+
+Expr = Sizzle.selectors = {
+
+ // Can be adjusted by the user
+ cacheLength: 50,
+
+ createPseudo: markFunction,
+
+ match: matchExpr,
+
+ attrHandle: {},
+
+ find: {},
+
+ relative: {
+ ">": { dir: "parentNode", first: true },
+ " ": { dir: "parentNode" },
+ "+": { dir: "previousSibling", first: true },
+ "~": { dir: "previousSibling" }
+ },
+
+ preFilter: {
+ "ATTR": function( match ) {
+ match[1] = match[1].replace( runescape, funescape );
+
+ // Move the given value to match[3] whether quoted or unquoted
+ match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
+
+ if ( match[2] === "~=" ) {
+ match[3] = " " + match[3] + " ";
+ }
+
+ return match.slice( 0, 4 );
+ },
+
+ "CHILD": function( match ) {
+ /* matches from matchExpr["CHILD"]
+ 1 type (only|nth|...)
+ 2 what (child|of-type)
+ 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+ 4 xn-component of xn+y argument ([+-]?\d*n|)
+ 5 sign of xn-component
+ 6 x of xn-component
+ 7 sign of y-component
+ 8 y of y-component
+ */
+ match[1] = match[1].toLowerCase();
+
+ if ( match[1].slice( 0, 3 ) === "nth" ) {
+ // nth-* requires argument
+ if ( !match[3] ) {
+ Sizzle.error( match[0] );
+ }
+
+ // numeric x and y parameters for Expr.filter.CHILD
+ // remember that false/true cast respectively to 0/1
+ match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
+ match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
+
+ // other types prohibit arguments
+ } else if ( match[3] ) {
+ Sizzle.error( match[0] );
+ }
+
+ return match;
+ },
+
+ "PSEUDO": function( match ) {
+ var excess,
+ unquoted = !match[6] && match[2];
+
+ if ( matchExpr["CHILD"].test( match[0] ) ) {
+ return null;
+ }
+
+ // Accept quoted arguments as-is
+ if ( match[3] ) {
+ match[2] = match[4] || match[5] || "";
+
+ // Strip excess characters from unquoted arguments
+ } else if ( unquoted && rpseudo.test( unquoted ) &&
+ // Get excess from tokenize (recursively)
+ (excess = tokenize( unquoted, true )) &&
+ // advance to the next closing parenthesis
+ (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+ // excess is a negative index
+ match[0] = match[0].slice( 0, excess );
+ match[2] = unquoted.slice( 0, excess );
+ }
+
+ // Return only captures needed by the pseudo filter method (type and argument)
+ return match.slice( 0, 3 );
+ }
+ },
+
+ filter: {
+
+ "TAG": function( nodeNameSelector ) {
+ var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
+ return nodeNameSelector === "*" ?
+ function() { return true; } :
+ function( elem ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+ };
+ },
+
+ "CLASS": function( className ) {
+ var pattern = classCache[ className + " " ];
+
+ return pattern ||
+ (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+ classCache( className, function( elem ) {
+ return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );
+ });
+ },
+
+ "ATTR": function( name, operator, check ) {
+ return function( elem ) {
+ var result = Sizzle.attr( elem, name );
+
+ if ( result == null ) {
+ return operator === "!=";
+ }
+ if ( !operator ) {
+ return true;
+ }
+
+ result += "";
+
+ return operator === "=" ? result === check :
+ operator === "!=" ? result !== check :
+ operator === "^=" ? check && result.indexOf( check ) === 0 :
+ operator === "*=" ? check && result.indexOf( check ) > -1 :
+ operator === "$=" ? check && result.slice( -check.length ) === check :
+ operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
+ operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
+ false;
+ };
+ },
+
+ "CHILD": function( type, what, argument, first, last ) {
+ var simple = type.slice( 0, 3 ) !== "nth",
+ forward = type.slice( -4 ) !== "last",
+ ofType = what === "of-type";
+
+ return first === 1 && last === 0 ?
+
+ // Shortcut for :nth-*(n)
+ function( elem ) {
+ return !!elem.parentNode;
+ } :
+
+ function( elem, context, xml ) {
+ var cache, outerCache, node, diff, nodeIndex, start,
+ dir = simple !== forward ? "nextSibling" : "previousSibling",
+ parent = elem.parentNode,
+ name = ofType && elem.nodeName.toLowerCase(),
+ useCache = !xml && !ofType;
+
+ if ( parent ) {
+
+ // :(first|last|only)-(child|of-type)
+ if ( simple ) {
+ while ( dir ) {
+ node = elem;
+ while ( (node = node[ dir ]) ) {
+ if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
+ return false;
+ }
+ }
+ // Reverse direction for :only-* (if we haven't yet done so)
+ start = dir = type === "only" && !start && "nextSibling";
+ }
+ return true;
+ }
+
+ start = [ forward ? parent.firstChild : parent.lastChild ];
+
+ // non-xml :nth-child(...) stores cache data on `parent`
+ if ( forward && useCache ) {
+ // Seek `elem` from a previously-cached index
+ outerCache = parent[ expando ] || (parent[ expando ] = {});
+ cache = outerCache[ type ] || [];
+ nodeIndex = cache[0] === dirruns && cache[1];
+ diff = cache[0] === dirruns && cache[2];
+ node = nodeIndex && parent.childNodes[ nodeIndex ];
+
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
+
+ // Fallback to seeking `elem` from the start
+ (diff = nodeIndex = 0) || start.pop()) ) {
+
+ // When found, cache indexes on `parent` and break
+ if ( node.nodeType === 1 && ++diff && node === elem ) {
+ outerCache[ type ] = [ dirruns, nodeIndex, diff ];
+ break;
+ }
+ }
+
+ // Use previously-cached element index if available
+ } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
+ diff = cache[1];
+
+ // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
+ } else {
+ // Use the same loop as above to seek `elem` from the start
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
+ (diff = nodeIndex = 0) || start.pop()) ) {
+
+ if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
+ // Cache the index of each encountered element
+ if ( useCache ) {
+ (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
+ }
+
+ if ( node === elem ) {
+ break;
+ }
+ }
+ }
+ }
+
+ // Incorporate the offset, then check against cycle size
+ diff -= last;
+ return diff === first || ( diff % first === 0 && diff / first >= 0 );
+ }
+ };
+ },
+
+ "PSEUDO": function( pseudo, argument ) {
+ // pseudo-class names are case-insensitive
+ // http://www.w3.org/TR/selectors/#pseudo-classes
+ // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+ // Remember that setFilters inherits from pseudos
+ var args,
+ fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+ Sizzle.error( "unsupported pseudo: " + pseudo );
+
+ // The user may use createPseudo to indicate that
+ // arguments are needed to create the filter function
+ // just as Sizzle does
+ if ( fn[ expando ] ) {
+ return fn( argument );
+ }
+
+ // But maintain support for old signatures
+ if ( fn.length > 1 ) {
+ args = [ pseudo, pseudo, "", argument ];
+ return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+ markFunction(function( seed, matches ) {
+ var idx,
+ matched = fn( seed, argument ),
+ i = matched.length;
+ while ( i-- ) {
+ idx = indexOf.call( seed, matched[i] );
+ seed[ idx ] = !( matches[ idx ] = matched[i] );
+ }
+ }) :
+ function( elem ) {
+ return fn( elem, 0, args );
+ };
+ }
+
+ return fn;
+ }
+ },
+
+ pseudos: {
+ // Potentially complex pseudos
+ "not": markFunction(function( selector ) {
+ // Trim the selector passed to compile
+ // to avoid treating leading and trailing
+ // spaces as combinators
+ var input = [],
+ results = [],
+ matcher = compile( selector.replace( rtrim, "$1" ) );
+
+ return matcher[ expando ] ?
+ markFunction(function( seed, matches, context, xml ) {
+ var elem,
+ unmatched = matcher( seed, null, xml, [] ),
+ i = seed.length;
+
+ // Match elements unmatched by `matcher`
+ while ( i-- ) {
+ if ( (elem = unmatched[i]) ) {
+ seed[i] = !(matches[i] = elem);
+ }
+ }
+ }) :
+ function( elem, context, xml ) {
+ input[0] = elem;
+ matcher( input, null, xml, results );
+ return !results.pop();
+ };
+ }),
+
+ "has": markFunction(function( selector ) {
+ return function( elem ) {
+ return Sizzle( selector, elem ).length > 0;
+ };
+ }),
+
+ "contains": markFunction(function( text ) {
+ return function( elem ) {
+ return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+ };
+ }),
+
+ // "Whether an element is represented by a :lang() selector
+ // is based solely on the element's language value
+ // being equal to the identifier C,
+ // or beginning with the identifier C immediately followed by "-".
+ // The matching of C against the element's language value is performed case-insensitively.
+ // The identifier C does not have to be a valid language name."
+ // http://www.w3.org/TR/selectors/#lang-pseudo
+ "lang": markFunction( function( lang ) {
+ // lang value must be a valid identifier
+ if ( !ridentifier.test(lang || "") ) {
+ Sizzle.error( "unsupported lang: " + lang );
+ }
+ lang = lang.replace( runescape, funescape ).toLowerCase();
+ return function( elem ) {
+ var elemLang;
+ do {
+ if ( (elemLang = documentIsHTML ?
+ elem.lang :
+ elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
+
+ elemLang = elemLang.toLowerCase();
+ return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
+ }
+ } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
+ return false;
+ };
+ }),
+
+ // Miscellaneous
+ "target": function( elem ) {
+ var hash = window.location && window.location.hash;
+ return hash && hash.slice( 1 ) === elem.id;
+ },
+
+ "root": function( elem ) {
+ return elem === docElem;
+ },
+
+ "focus": function( elem ) {
+ return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+ },
+
+ // Boolean properties
+ "enabled": function( elem ) {
+ return elem.disabled === false;
+ },
+
+ "disabled": function( elem ) {
+ return elem.disabled === true;
+ },
+
+ "checked": function( elem ) {
+ // In CSS3, :checked should return both checked and selected elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ var nodeName = elem.nodeName.toLowerCase();
+ return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+ },
+
+ "selected": function( elem ) {
+ // Accessing this property makes selected-by-default
+ // options in Safari work properly
+ if ( elem.parentNode ) {
+ elem.parentNode.selectedIndex;
+ }
+
+ return elem.selected === true;
+ },
+
+ // Contents
+ "empty": function( elem ) {
+ // http://www.w3.org/TR/selectors/#empty-pseudo
+ // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
+ // but not by others (comment: 8; processing instruction: 7; etc.)
+ // nodeType < 6 works because attributes (2) do not appear as children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ if ( elem.nodeType < 6 ) {
+ return false;
+ }
+ }
+ return true;
+ },
+
+ "parent": function( elem ) {
+ return !Expr.pseudos["empty"]( elem );
+ },
+
+ // Element/input types
+ "header": function( elem ) {
+ return rheader.test( elem.nodeName );
+ },
+
+ "input": function( elem ) {
+ return rinputs.test( elem.nodeName );
+ },
+
+ "button": function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === "button" || name === "button";
+ },
+
+ "text": function( elem ) {
+ var attr;
+ return elem.nodeName.toLowerCase() === "input" &&
+ elem.type === "text" &&
+
+ // Support: IE<8
+ // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
+ ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
+ },
+
+ // Position-in-collection
+ "first": createPositionalPseudo(function() {
+ return [ 0 ];
+ }),
+
+ "last": createPositionalPseudo(function( matchIndexes, length ) {
+ return [ length - 1 ];
+ }),
+
+ "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ return [ argument < 0 ? argument + length : argument ];
+ }),
+
+ "even": createPositionalPseudo(function( matchIndexes, length ) {
+ var i = 0;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "odd": createPositionalPseudo(function( matchIndexes, length ) {
+ var i = 1;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; --i >= 0; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; ++i < length; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ })
+ }
+};
+
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Add button/input type pseudos
+for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
+ Expr.pseudos[ i ] = createInputPseudo( i );
+}
+for ( i in { submit: true, reset: true } ) {
+ Expr.pseudos[ i ] = createButtonPseudo( i );
+}
+
+// Easy API for creating new setFilters
+function setFilters() {}
+setFilters.prototype = Expr.filters = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
+ var matched, match, tokens, type,
+ soFar, groups, preFilters,
+ cached = tokenCache[ selector + " " ];
+
+ if ( cached ) {
+ return parseOnly ? 0 : cached.slice( 0 );
+ }
+
+ soFar = selector;
+ groups = [];
+ preFilters = Expr.preFilter;
+
+ while ( soFar ) {
+
+ // Comma and first run
+ if ( !matched || (match = rcomma.exec( soFar )) ) {
+ if ( match ) {
+ // Don't consume trailing commas as valid
+ soFar = soFar.slice( match[0].length ) || soFar;
+ }
+ groups.push( (tokens = []) );
+ }
+
+ matched = false;
+
+ // Combinators
+ if ( (match = rcombinators.exec( soFar )) ) {
+ matched = match.shift();
+ tokens.push({
+ value: matched,
+ // Cast descendant combinators to space
+ type: match[0].replace( rtrim, " " )
+ });
+ soFar = soFar.slice( matched.length );
+ }
+
+ // Filters
+ for ( type in Expr.filter ) {
+ if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+ (match = preFilters[ type ]( match ))) ) {
+ matched = match.shift();
+ tokens.push({
+ value: matched,
+ type: type,
+ matches: match
+ });
+ soFar = soFar.slice( matched.length );
+ }
+ }
+
+ if ( !matched ) {
+ break;
+ }
+ }
+
+ // Return the length of the invalid excess
+ // if we're just parsing
+ // Otherwise, throw an error or return tokens
+ return parseOnly ?
+ soFar.length :
+ soFar ?
+ Sizzle.error( selector ) :
+ // Cache the tokens
+ tokenCache( selector, groups ).slice( 0 );
+};
+
+function toSelector( tokens ) {
+ var i = 0,
+ len = tokens.length,
+ selector = "";
+ for ( ; i < len; i++ ) {
+ selector += tokens[i].value;
+ }
+ return selector;
+}
+
+function addCombinator( matcher, combinator, base ) {
+ var dir = combinator.dir,
+ checkNonElements = base && dir === "parentNode",
+ doneName = done++;
+
+ return combinator.first ?
+ // Check against closest ancestor/preceding element
+ function( elem, context, xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ return matcher( elem, context, xml );
+ }
+ }
+ } :
+
+ // Check against all ancestor/preceding elements
+ function( elem, context, xml ) {
+ var oldCache, outerCache,
+ newCache = [ dirruns, doneName ];
+
+ // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
+ if ( xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ if ( matcher( elem, context, xml ) ) {
+ return true;
+ }
+ }
+ }
+ } else {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ outerCache = elem[ expando ] || (elem[ expando ] = {});
+ if ( (oldCache = outerCache[ dir ]) &&
+ oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
+
+ // Assign to newCache so results back-propagate to previous elements
+ return (newCache[ 2 ] = oldCache[ 2 ]);
+ } else {
+ // Reuse newcache so results back-propagate to previous elements
+ outerCache[ dir ] = newCache;
+
+ // A match means we're done; a fail means we have to keep checking
+ if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ };
+}
+
+function elementMatcher( matchers ) {
+ return matchers.length > 1 ?
+ function( elem, context, xml ) {
+ var i = matchers.length;
+ while ( i-- ) {
+ if ( !matchers[i]( elem, context, xml ) ) {
+ return false;
+ }
+ }
+ return true;
+ } :
+ matchers[0];
+}
+
+function multipleContexts( selector, contexts, results ) {
+ var i = 0,
+ len = contexts.length;
+ for ( ; i < len; i++ ) {
+ Sizzle( selector, contexts[i], results );
+ }
+ return results;
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+ var elem,
+ newUnmatched = [],
+ i = 0,
+ len = unmatched.length,
+ mapped = map != null;
+
+ for ( ; i < len; i++ ) {
+ if ( (elem = unmatched[i]) ) {
+ if ( !filter || filter( elem, context, xml ) ) {
+ newUnmatched.push( elem );
+ if ( mapped ) {
+ map.push( i );
+ }
+ }
+ }
+ }
+
+ return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+ if ( postFilter && !postFilter[ expando ] ) {
+ postFilter = setMatcher( postFilter );
+ }
+ if ( postFinder && !postFinder[ expando ] ) {
+ postFinder = setMatcher( postFinder, postSelector );
+ }
+ return markFunction(function( seed, results, context, xml ) {
+ var temp, i, elem,
+ preMap = [],
+ postMap = [],
+ preexisting = results.length,
+
+ // Get initial elements from seed or context
+ elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+
+ // Prefilter to get matcher input, preserving a map for seed-results synchronization
+ matcherIn = preFilter && ( seed || !selector ) ?
+ condense( elems, preMap, preFilter, context, xml ) :
+ elems,
+
+ matcherOut = matcher ?
+ // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+ postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+ // ...intermediate processing is necessary
+ [] :
+
+ // ...otherwise use results directly
+ results :
+ matcherIn;
+
+ // Find primary matches
+ if ( matcher ) {
+ matcher( matcherIn, matcherOut, context, xml );
+ }
+
+ // Apply postFilter
+ if ( postFilter ) {
+ temp = condense( matcherOut, postMap );
+ postFilter( temp, [], context, xml );
+
+ // Un-match failing elements by moving them back to matcherIn
+ i = temp.length;
+ while ( i-- ) {
+ if ( (elem = temp[i]) ) {
+ matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+ }
+ }
+ }
+
+ if ( seed ) {
+ if ( postFinder || preFilter ) {
+ if ( postFinder ) {
+ // Get the final matcherOut by condensing this intermediate into postFinder contexts
+ temp = [];
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) ) {
+ // Restore matcherIn since elem is not yet a final match
+ temp.push( (matcherIn[i] = elem) );
+ }
+ }
+ postFinder( null, (matcherOut = []), temp, xml );
+ }
+
+ // Move matched elements from seed to results to keep them synchronized
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) &&
+ (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
+
+ seed[temp] = !(results[temp] = elem);
+ }
+ }
+ }
+
+ // Add elements to results, through postFinder if defined
+ } else {
+ matcherOut = condense(
+ matcherOut === results ?
+ matcherOut.splice( preexisting, matcherOut.length ) :
+ matcherOut
+ );
+ if ( postFinder ) {
+ postFinder( null, results, matcherOut, xml );
+ } else {
+ push.apply( results, matcherOut );
+ }
+ }
+ });
+}
+
+function matcherFromTokens( tokens ) {
+ var checkContext, matcher, j,
+ len = tokens.length,
+ leadingRelative = Expr.relative[ tokens[0].type ],
+ implicitRelative = leadingRelative || Expr.relative[" "],
+ i = leadingRelative ? 1 : 0,
+
+ // The foundational matcher ensures that elements are reachable from top-level context(s)
+ matchContext = addCombinator( function( elem ) {
+ return elem === checkContext;
+ }, implicitRelative, true ),
+ matchAnyContext = addCombinator( function( elem ) {
+ return indexOf.call( checkContext, elem ) > -1;
+ }, implicitRelative, true ),
+ matchers = [ function( elem, context, xml ) {
+ return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+ (checkContext = context).nodeType ?
+ matchContext( elem, context, xml ) :
+ matchAnyContext( elem, context, xml ) );
+ } ];
+
+ for ( ; i < len; i++ ) {
+ if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+ matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
+ } else {
+ matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+ // Return special upon seeing a positional matcher
+ if ( matcher[ expando ] ) {
+ // Find the next relative operator (if any) for proper handling
+ j = ++i;
+ for ( ; j < len; j++ ) {
+ if ( Expr.relative[ tokens[j].type ] ) {
+ break;
+ }
+ }
+ return setMatcher(
+ i > 1 && elementMatcher( matchers ),
+ i > 1 && toSelector(
+ // If the preceding token was a descendant combinator, insert an implicit any-element `*`
+ tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
+ ).replace( rtrim, "$1" ),
+ matcher,
+ i < j && matcherFromTokens( tokens.slice( i, j ) ),
+ j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+ j < len && toSelector( tokens )
+ );
+ }
+ matchers.push( matcher );
+ }
+ }
+
+ return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+ var bySet = setMatchers.length > 0,
+ byElement = elementMatchers.length > 0,
+ superMatcher = function( seed, context, xml, results, outermost ) {
+ var elem, j, matcher,
+ matchedCount = 0,
+ i = "0",
+ unmatched = seed && [],
+ setMatched = [],
+ contextBackup = outermostContext,
+ // We must always have either seed elements or outermost context
+ elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
+ // Use integer dirruns iff this is the outermost matcher
+ dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
+ len = elems.length;
+
+ if ( outermost ) {
+ outermostContext = context !== document && context;
+ }
+
+ // Add elements passing elementMatchers directly to results
+ // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
+ // Support: IE<9, Safari
+ // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
+ for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
+ if ( byElement && elem ) {
+ j = 0;
+ while ( (matcher = elementMatchers[j++]) ) {
+ if ( matcher( elem, context, xml ) ) {
+ results.push( elem );
+ break;
+ }
+ }
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ }
+ }
+
+ // Track unmatched elements for set filters
+ if ( bySet ) {
+ // They will have gone through all possible matchers
+ if ( (elem = !matcher && elem) ) {
+ matchedCount--;
+ }
+
+ // Lengthen the array for every element, matched or not
+ if ( seed ) {
+ unmatched.push( elem );
+ }
+ }
+ }
+
+ // Apply set filters to unmatched elements
+ matchedCount += i;
+ if ( bySet && i !== matchedCount ) {
+ j = 0;
+ while ( (matcher = setMatchers[j++]) ) {
+ matcher( unmatched, setMatched, context, xml );
+ }
+
+ if ( seed ) {
+ // Reintegrate element matches to eliminate the need for sorting
+ if ( matchedCount > 0 ) {
+ while ( i-- ) {
+ if ( !(unmatched[i] || setMatched[i]) ) {
+ setMatched[i] = pop.call( results );
+ }
+ }
+ }
+
+ // Discard index placeholder values to get only actual matches
+ setMatched = condense( setMatched );
+ }
+
+ // Add matches to results
+ push.apply( results, setMatched );
+
+ // Seedless set matches succeeding multiple successful matchers stipulate sorting
+ if ( outermost && !seed && setMatched.length > 0 &&
+ ( matchedCount + setMatchers.length ) > 1 ) {
+
+ Sizzle.uniqueSort( results );
+ }
+ }
+
+ // Override manipulation of globals by nested matchers
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ outermostContext = contextBackup;
+ }
+
+ return unmatched;
+ };
+
+ return bySet ?
+ markFunction( superMatcher ) :
+ superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
+ var i,
+ setMatchers = [],
+ elementMatchers = [],
+ cached = compilerCache[ selector + " " ];
+
+ if ( !cached ) {
+ // Generate a function of recursive functions that can be used to check each element
+ if ( !match ) {
+ match = tokenize( selector );
+ }
+ i = match.length;
+ while ( i-- ) {
+ cached = matcherFromTokens( match[i] );
+ if ( cached[ expando ] ) {
+ setMatchers.push( cached );
+ } else {
+ elementMatchers.push( cached );
+ }
+ }
+
+ // Cache the compiled function
+ cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+
+ // Save selector and tokenization
+ cached.selector = selector;
+ }
+ return cached;
+};
+
+/**
+ * A low-level selection function that works with Sizzle's compiled
+ * selector functions
+ * @param {String|Function} selector A selector or a pre-compiled
+ * selector function built with Sizzle.compile
+ * @param {Element} context
+ * @param {Array} [results]
+ * @param {Array} [seed] A set of elements to match against
+ */
+select = Sizzle.select = function( selector, context, results, seed ) {
+ var i, tokens, token, type, find,
+ compiled = typeof selector === "function" && selector,
+ match = !seed && tokenize( (selector = compiled.selector || selector) );
+
+ results = results || [];
+
+ // Try to minimize operations if there is no seed and only one group
+ if ( match.length === 1 ) {
+
+ // Take a shortcut and set the context if the root selector is an ID
+ tokens = match[0] = match[0].slice( 0 );
+ if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+ support.getById && context.nodeType === 9 && documentIsHTML &&
+ Expr.relative[ tokens[1].type ] ) {
+
+ context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
+ if ( !context ) {
+ return results;
+
+ // Precompiled matchers will still verify ancestry, so step up a level
+ } else if ( compiled ) {
+ context = context.parentNode;
+ }
+
+ selector = selector.slice( tokens.shift().value.length );
+ }
+
+ // Fetch a seed set for right-to-left matching
+ i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
+ while ( i-- ) {
+ token = tokens[i];
+
+ // Abort if we hit a combinator
+ if ( Expr.relative[ (type = token.type) ] ) {
+ break;
+ }
+ if ( (find = Expr.find[ type ]) ) {
+ // Search, expanding context for leading sibling combinators
+ if ( (seed = find(
+ token.matches[0].replace( runescape, funescape ),
+ rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
+ )) ) {
+
+ // If seed is empty or no tokens remain, we can return early
+ tokens.splice( i, 1 );
+ selector = seed.length && toSelector( tokens );
+ if ( !selector ) {
+ push.apply( results, seed );
+ return results;
+ }
+
+ break;
+ }
+ }
+ }
+ }
+
+ // Compile and execute a filtering function if one is not provided
+ // Provide `match` to avoid retokenization if we modified the selector above
+ ( compiled || compile( selector, match ) )(
+ seed,
+ context,
+ !documentIsHTML,
+ results,
+ rsibling.test( selector ) && testContext( context.parentNode ) || context
+ );
+ return results;
+};
+
+// One-time assignments
+
+// Sort stability
+support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
+
+// Support: Chrome<14
+// Always assume duplicates if they aren't passed to the comparison function
+support.detectDuplicates = !!hasDuplicate;
+
+// Initialize against the default document
+setDocument();
+
+// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
+// Detached nodes confoundingly follow *each other*
+support.sortDetached = assert(function( div1 ) {
+ // Should return 1, but returns 4 (following)
+ return div1.compareDocumentPosition( document.createElement("div") ) & 1;
+});
+
+// Support: IE<8
+// Prevent attribute/property "interpolation"
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !assert(function( div ) {
+ div.innerHTML = "<a href='#'></a>";
+ return div.firstChild.getAttribute("href") === "#" ;
+}) ) {
+ addHandle( "type|href|height|width", function( elem, name, isXML ) {
+ if ( !isXML ) {
+ return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
+ }
+ });
+}
+
+// Support: IE<9
+// Use defaultValue in place of getAttribute("value")
+if ( !support.attributes || !assert(function( div ) {
+ div.innerHTML = "<input/>";
+ div.firstChild.setAttribute( "value", "" );
+ return div.firstChild.getAttribute( "value" ) === "";
+}) ) {
+ addHandle( "value", function( elem, name, isXML ) {
+ if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
+ return elem.defaultValue;
+ }
+ });
+}
+
+// Support: IE<9
+// Use getAttributeNode to fetch booleans when getAttribute lies
+if ( !assert(function( div ) {
+ return div.getAttribute("disabled") == null;
+}) ) {
+ addHandle( booleans, function( elem, name, isXML ) {
+ var val;
+ if ( !isXML ) {
+ return elem[ name ] === true ? name.toLowerCase() :
+ (val = elem.getAttributeNode( name )) && val.specified ?
+ val.value :
+ null;
+ }
+ });
+}
+
+return Sizzle;
+
+})( window );
+
+
+
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.pseudos;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+
+var rneedsContext = jQuery.expr.match.needsContext;
+
+var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/);
+
+
+
+var risSimple = /^.[^:#\[\.,]*$/;
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, not ) {
+ if ( jQuery.isFunction( qualifier ) ) {
+ return jQuery.grep( elements, function( elem, i ) {
+ /* jshint -W018 */
+ return !!qualifier.call( elem, i, elem ) !== not;
+ });
+
+ }
+
+ if ( qualifier.nodeType ) {
+ return jQuery.grep( elements, function( elem ) {
+ return ( elem === qualifier ) !== not;
+ });
+
+ }
+
+ if ( typeof qualifier === "string" ) {
+ if ( risSimple.test( qualifier ) ) {
+ return jQuery.filter( qualifier, elements, not );
+ }
+
+ qualifier = jQuery.filter( qualifier, elements );
+ }
+
+ return jQuery.grep( elements, function( elem ) {
+ return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not;
+ });
+}
+
+jQuery.filter = function( expr, elems, not ) {
+ var elem = elems[ 0 ];
+
+ if ( not ) {
+ expr = ":not(" + expr + ")";
+ }
+
+ return elems.length === 1 && elem.nodeType === 1 ?
+ jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
+ jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
+ return elem.nodeType === 1;
+ }));
+};
+
+jQuery.fn.extend({
+ find: function( selector ) {
+ var i,
+ ret = [],
+ self = this,
+ len = self.length;
+
+ if ( typeof selector !== "string" ) {
+ return this.pushStack( jQuery( selector ).filter(function() {
+ for ( i = 0; i < len; i++ ) {
+ if ( jQuery.contains( self[ i ], this ) ) {
+ return true;
+ }
+ }
+ }) );
+ }
+
+ for ( i = 0; i < len; i++ ) {
+ jQuery.find( selector, self[ i ], ret );
+ }
+
+ // Needed because $( selector, context ) becomes $( context ).find( selector )
+ ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
+ ret.selector = this.selector ? this.selector + " " + selector : selector;
+ return ret;
+ },
+ filter: function( selector ) {
+ return this.pushStack( winnow(this, selector || [], false) );
+ },
+ not: function( selector ) {
+ return this.pushStack( winnow(this, selector || [], true) );
+ },
+ is: function( selector ) {
+ return !!winnow(
+ this,
+
+ // If this is a positional/relative selector, check membership in the returned set
+ // so $("p:first").is("p:last") won't return true for a doc with two "p".
+ typeof selector === "string" && rneedsContext.test( selector ) ?
+ jQuery( selector ) :
+ selector || [],
+ false
+ ).length;
+ }
+});
+
+
+// Initialize a jQuery object
+
+
+// A central reference to the root jQuery(document)
+var rootjQuery,
+
+ // Use the correct document accordingly with window argument (sandbox)
+ document = window.document,
+
+ // A simple way to check for HTML strings
+ // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+ // Strict HTML recognition (#11290: must start with <)
+ rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
+
+ init = jQuery.fn.init = function( selector, context ) {
+ var match, elem;
+
+ // HANDLE: $(""), $(null), $(undefined), $(false)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+ // Assume that strings that start and end with <> are HTML and skip the regex check
+ match = [ null, selector, null ];
+
+ } else {
+ match = rquickExpr.exec( selector );
+ }
+
+ // Match html or make sure no context is specified for #id
+ if ( match && (match[1] || !context) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[1] ) {
+ context = context instanceof jQuery ? context[0] : context;
+
+ // scripts is true for back-compat
+ // Intentionally let the error be thrown if parseHTML is not present
+ jQuery.merge( this, jQuery.parseHTML(
+ match[1],
+ context && context.nodeType ? context.ownerDocument || context : document,
+ true
+ ) );
+
+ // HANDLE: $(html, props)
+ if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
+ for ( match in context ) {
+ // Properties of context are called as methods if possible
+ if ( jQuery.isFunction( this[ match ] ) ) {
+ this[ match ]( context[ match ] );
+
+ // ...and otherwise set as attributes
+ } else {
+ this.attr( match, context[ match ] );
+ }
+ }
+ }
+
+ return this;
+
+ // HANDLE: $(#id)
+ } else {
+ elem = document.getElementById( match[2] );
+
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE and Opera return items
+ // by name instead of ID
+ if ( elem.id !== match[2] ) {
+ return rootjQuery.find( selector );
+ }
+
+ // Otherwise, we inject the element directly into the jQuery object
+ this.length = 1;
+ this[0] = elem;
+ }
+
+ this.context = document;
+ this.selector = selector;
+ return this;
+ }
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return ( context || rootjQuery ).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
+ return this.constructor( context ).find( selector );
+ }
+
+ // HANDLE: $(DOMElement)
+ } else if ( selector.nodeType ) {
+ this.context = this[0] = selector;
+ this.length = 1;
+ return this;
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( jQuery.isFunction( selector ) ) {
+ return typeof rootjQuery.ready !== "undefined" ?
+ rootjQuery.ready( selector ) :
+ // Execute immediately if ready is not present
+ selector( jQuery );
+ }
+
+ if ( selector.selector !== undefined ) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return jQuery.makeArray( selector, this );
+ };
+
+// Give the init function the jQuery prototype for later instantiation
+init.prototype = jQuery.fn;
+
+// Initialize central reference
+rootjQuery = jQuery( document );
+
+
+var rparentsprev = /^(?:parents|prev(?:Until|All))/,
+ // methods guaranteed to produce a unique set when starting from a unique set
+ guaranteedUnique = {
+ children: true,
+ contents: true,
+ next: true,
+ prev: true
+ };
+
+jQuery.extend({
+ dir: function( elem, dir, until ) {
+ var matched = [],
+ cur = elem[ dir ];
+
+ while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+ if ( cur.nodeType === 1 ) {
+ matched.push( cur );
+ }
+ cur = cur[dir];
+ }
+ return matched;
+ },
+
+ sibling: function( n, elem ) {
+ var r = [];
+
+ for ( ; n; n = n.nextSibling ) {
+ if ( n.nodeType === 1 && n !== elem ) {
+ r.push( n );
+ }
+ }
+
+ return r;
+ }
+});
+
+jQuery.fn.extend({
+ has: function( target ) {
+ var i,
+ targets = jQuery( target, this ),
+ len = targets.length;
+
+ return this.filter(function() {
+ for ( i = 0; i < len; i++ ) {
+ if ( jQuery.contains( this, targets[i] ) ) {
+ return true;
+ }
+ }
+ });
+ },
+
+ closest: function( selectors, context ) {
+ var cur,
+ i = 0,
+ l = this.length,
+ matched = [],
+ pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
+ jQuery( selectors, context || this.context ) :
+ 0;
+
+ for ( ; i < l; i++ ) {
+ for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
+ // Always skip document fragments
+ if ( cur.nodeType < 11 && (pos ?
+ pos.index(cur) > -1 :
+
+ // Don't pass non-elements to Sizzle
+ cur.nodeType === 1 &&
+ jQuery.find.matchesSelector(cur, selectors)) ) {
+
+ matched.push( cur );
+ break;
+ }
+ }
+ }
+
+ return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched );
+ },
+
+ // Determine the position of an element within
+ // the matched set of elements
+ index: function( elem ) {
+
+ // No argument, return index in parent
+ if ( !elem ) {
+ return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;
+ }
+
+ // index in selector
+ if ( typeof elem === "string" ) {
+ return jQuery.inArray( this[0], jQuery( elem ) );
+ }
+
+ // Locate the position of the desired element
+ return jQuery.inArray(
+ // If it receives a jQuery object, the first element is used
+ elem.jquery ? elem[0] : elem, this );
+ },
+
+ add: function( selector, context ) {
+ return this.pushStack(
+ jQuery.unique(
+ jQuery.merge( this.get(), jQuery( selector, context ) )
+ )
+ );
+ },
+
+ addBack: function( selector ) {
+ return this.add( selector == null ?
+ this.prevObject : this.prevObject.filter(selector)
+ );
+ }
+});
+
+function sibling( cur, dir ) {
+ do {
+ cur = cur[ dir ];
+ } while ( cur && cur.nodeType !== 1 );
+
+ return cur;
+}
+
+jQuery.each({
+ parent: function( elem ) {
+ var parent = elem.parentNode;
+ return parent && parent.nodeType !== 11 ? parent : null;
+ },
+ parents: function( elem ) {
+ return jQuery.dir( elem, "parentNode" );
+ },
+ parentsUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "parentNode", until );
+ },
+ next: function( elem ) {
+ return sibling( elem, "nextSibling" );
+ },
+ prev: function( elem ) {
+ return sibling( elem, "previousSibling" );
+ },
+ nextAll: function( elem ) {
+ return jQuery.dir( elem, "nextSibling" );
+ },
+ prevAll: function( elem ) {
+ return jQuery.dir( elem, "previousSibling" );
+ },
+ nextUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "nextSibling", until );
+ },
+ prevUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "previousSibling", until );
+ },
+ siblings: function( elem ) {
+ return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
+ },
+ children: function( elem ) {
+ return jQuery.sibling( elem.firstChild );
+ },
+ contents: function( elem ) {
+ return jQuery.nodeName( elem, "iframe" ) ?
+ elem.contentDocument || elem.contentWindow.document :
+ jQuery.merge( [], elem.childNodes );
+ }
+}, function( name, fn ) {
+ jQuery.fn[ name ] = function( until, selector ) {
+ var ret = jQuery.map( this, fn, until );
+
+ if ( name.slice( -5 ) !== "Until" ) {
+ selector = until;
+ }
+
+ if ( selector && typeof selector === "string" ) {
+ ret = jQuery.filter( selector, ret );
+ }
+
+ if ( this.length > 1 ) {
+ // Remove duplicates
+ if ( !guaranteedUnique[ name ] ) {
+ ret = jQuery.unique( ret );
+ }
+
+ // Reverse order for parents* and prev-derivatives
+ if ( rparentsprev.test( name ) ) {
+ ret = ret.reverse();
+ }
+ }
+
+ return this.pushStack( ret );
+ };
+});
+var rnotwhite = (/\S+/g);
+
+
+
+// String to Object options format cache
+var optionsCache = {};
+
+// Convert String-formatted options into Object-formatted ones and store in cache
+function createOptions( options ) {
+ var object = optionsCache[ options ] = {};
+ jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
+ object[ flag ] = true;
+ });
+ return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ * options: an optional list of space-separated options that will change how
+ * the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ * once: will ensure the callback list can only be fired once (like a Deferred)
+ *
+ * memory: will keep track of previous values and will call any callback added
+ * after the list has been fired right away with the latest "memorized"
+ * values (like a Deferred)
+ *
+ * unique: will ensure a callback can only be added once (no duplicate in the list)
+ *
+ * stopOnFalse: interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+ // Convert options from String-formatted to Object-formatted if needed
+ // (we check in cache first)
+ options = typeof options === "string" ?
+ ( optionsCache[ options ] || createOptions( options ) ) :
+ jQuery.extend( {}, options );
+
+ var // Flag to know if list is currently firing
+ firing,
+ // Last fire value (for non-forgettable lists)
+ memory,
+ // Flag to know if list was already fired
+ fired,
+ // End of the loop when firing
+ firingLength,
+ // Index of currently firing callback (modified by remove if needed)
+ firingIndex,
+ // First callback to fire (used internally by add and fireWith)
+ firingStart,
+ // Actual callback list
+ list = [],
+ // Stack of fire calls for repeatable lists
+ stack = !options.once && [],
+ // Fire callbacks
+ fire = function( data ) {
+ memory = options.memory && data;
+ fired = true;
+ firingIndex = firingStart || 0;
+ firingStart = 0;
+ firingLength = list.length;
+ firing = true;
+ for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+ if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
+ memory = false; // To prevent further calls using add
+ break;
+ }
+ }
+ firing = false;
+ if ( list ) {
+ if ( stack ) {
+ if ( stack.length ) {
+ fire( stack.shift() );
+ }
+ } else if ( memory ) {
+ list = [];
+ } else {
+ self.disable();
+ }
+ }
+ },
+ // Actual Callbacks object
+ self = {
+ // Add a callback or a collection of callbacks to the list
+ add: function() {
+ if ( list ) {
+ // First, we save the current length
+ var start = list.length;
+ (function add( args ) {
+ jQuery.each( args, function( _, arg ) {
+ var type = jQuery.type( arg );
+ if ( type === "function" ) {
+ if ( !options.unique || !self.has( arg ) ) {
+ list.push( arg );
+ }
+ } else if ( arg && arg.length && type !== "string" ) {
+ // Inspect recursively
+ add( arg );
+ }
+ });
+ })( arguments );
+ // Do we need to add the callbacks to the
+ // current firing batch?
+ if ( firing ) {
+ firingLength = list.length;
+ // With memory, if we're not firing then
+ // we should call right away
+ } else if ( memory ) {
+ firingStart = start;
+ fire( memory );
+ }
+ }
+ return this;
+ },
+ // Remove a callback from the list
+ remove: function() {
+ if ( list ) {
+ jQuery.each( arguments, function( _, arg ) {
+ var index;
+ while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
+ list.splice( index, 1 );
+ // Handle firing indexes
+ if ( firing ) {
+ if ( index <= firingLength ) {
+ firingLength--;
+ }
+ if ( index <= firingIndex ) {
+ firingIndex--;
+ }
+ }
+ }
+ });
+ }
+ return this;
+ },
+ // Check if a given callback is in the list.
+ // If no argument is given, return whether or not list has callbacks attached.
+ has: function( fn ) {
+ return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
+ },
+ // Remove all callbacks from the list
+ empty: function() {
+ list = [];
+ firingLength = 0;
+ return this;
+ },
+ // Have the list do nothing anymore
+ disable: function() {
+ list = stack = memory = undefined;
+ return this;
+ },
+ // Is it disabled?
+ disabled: function() {
+ return !list;
+ },
+ // Lock the list in its current state
+ lock: function() {
+ stack = undefined;
+ if ( !memory ) {
+ self.disable();
+ }
+ return this;
+ },
+ // Is it locked?
+ locked: function() {
+ return !stack;
+ },
+ // Call all callbacks with the given context and arguments
+ fireWith: function( context, args ) {
+ if ( list && ( !fired || stack ) ) {
+ args = args || [];
+ args = [ context, args.slice ? args.slice() : args ];
+ if ( firing ) {
+ stack.push( args );
+ } else {
+ fire( args );
+ }
+ }
+ return this;
+ },
+ // Call all the callbacks with the given arguments
+ fire: function() {
+ self.fireWith( this, arguments );
+ return this;
+ },
+ // To know if the callbacks have already been called at least once
+ fired: function() {
+ return !!fired;
+ }
+ };
+
+ return self;
+};
+
+
+jQuery.extend({
+
+ Deferred: function( func ) {
+ var tuples = [
+ // action, add listener, listener list, final state
+ [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
+ [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
+ [ "notify", "progress", jQuery.Callbacks("memory") ]
+ ],
+ state = "pending",
+ promise = {
+ state: function() {
+ return state;
+ },
+ always: function() {
+ deferred.done( arguments ).fail( arguments );
+ return this;
+ },
+ then: function( /* fnDone, fnFail, fnProgress */ ) {
+ var fns = arguments;
+ return jQuery.Deferred(function( newDefer ) {
+ jQuery.each( tuples, function( i, tuple ) {
+ var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
+ // deferred[ done | fail | progress ] for forwarding actions to newDefer
+ deferred[ tuple[1] ](function() {
+ var returned = fn && fn.apply( this, arguments );
+ if ( returned && jQuery.isFunction( returned.promise ) ) {
+ returned.promise()
+ .done( newDefer.resolve )
+ .fail( newDefer.reject )
+ .progress( newDefer.notify );
+ } else {
+ newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
+ }
+ });
+ });
+ fns = null;
+ }).promise();
+ },
+ // Get a promise for this deferred
+ // If obj is provided, the promise aspect is added to the object
+ promise: function( obj ) {
+ return obj != null ? jQuery.extend( obj, promise ) : promise;
+ }
+ },
+ deferred = {};
+
+ // Keep pipe for back-compat
+ promise.pipe = promise.then;
+
+ // Add list-specific methods
+ jQuery.each( tuples, function( i, tuple ) {
+ var list = tuple[ 2 ],
+ stateString = tuple[ 3 ];
+
+ // promise[ done | fail | progress ] = list.add
+ promise[ tuple[1] ] = list.add;
+
+ // Handle state
+ if ( stateString ) {
+ list.add(function() {
+ // state = [ resolved | rejected ]
+ state = stateString;
+
+ // [ reject_list | resolve_list ].disable; progress_list.lock
+ }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
+ }
+
+ // deferred[ resolve | reject | notify ]
+ deferred[ tuple[0] ] = function() {
+ deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
+ return this;
+ };
+ deferred[ tuple[0] + "With" ] = list.fireWith;
+ });
+
+ // Make the deferred a promise
+ promise.promise( deferred );
+
+ // Call given func if any
+ if ( func ) {
+ func.call( deferred, deferred );
+ }
+
+ // All done!
+ return deferred;
+ },
+
+ // Deferred helper
+ when: function( subordinate /* , ..., subordinateN */ ) {
+ var i = 0,
+ resolveValues = slice.call( arguments ),
+ length = resolveValues.length,
+
+ // the count of uncompleted subordinates
+ remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
+
+ // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
+ deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
+
+ // Update function for both resolve and progress values
+ updateFunc = function( i, contexts, values ) {
+ return function( value ) {
+ contexts[ i ] = this;
+ values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
+ if ( values === progressValues ) {
+ deferred.notifyWith( contexts, values );
+
+ } else if ( !(--remaining) ) {
+ deferred.resolveWith( contexts, values );
+ }
+ };
+ },
+
+ progressValues, progressContexts, resolveContexts;
+
+ // add listeners to Deferred subordinates; treat others as resolved
+ if ( length > 1 ) {
+ progressValues = new Array( length );
+ progressContexts = new Array( length );
+ resolveContexts = new Array( length );
+ for ( ; i < length; i++ ) {
+ if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
+ resolveValues[ i ].promise()
+ .done( updateFunc( i, resolveContexts, resolveValues ) )
+ .fail( deferred.reject )
+ .progress( updateFunc( i, progressContexts, progressValues ) );
+ } else {
+ --remaining;
+ }
+ }
+ }
+
+ // if we're not waiting on anything, resolve the master
+ if ( !remaining ) {
+ deferred.resolveWith( resolveContexts, resolveValues );
+ }
+
+ return deferred.promise();
+ }
+});
+
+
+// The deferred used on DOM ready
+var readyList;
+
+jQuery.fn.ready = function( fn ) {
+ // Add the callback
+ jQuery.ready.promise().done( fn );
+
+ return this;
+};
+
+jQuery.extend({
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // A counter to track how many items to wait for before
+ // the ready event fires. See #6781
+ readyWait: 1,
+
+ // Hold (or release) the ready event
+ holdReady: function( hold ) {
+ if ( hold ) {
+ jQuery.readyWait++;
+ } else {
+ jQuery.ready( true );
+ }
+ },
+
+ // Handle when the DOM is ready
+ ready: function( wait ) {
+
+ // Abort if there are pending holds or we're already ready
+ if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+ return;
+ }
+
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( !document.body ) {
+ return setTimeout( jQuery.ready );
+ }
+
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If a normal DOM Ready event fired, decrement, and wait if need be
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
+ return;
+ }
+
+ // If there are functions bound, to execute
+ readyList.resolveWith( document, [ jQuery ] );
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.triggerHandler ) {
+ jQuery( document ).triggerHandler( "ready" );
+ jQuery( document ).off( "ready" );
+ }
+ }
+});
+
+/**
+ * Clean-up method for dom ready events
+ */
+function detach() {
+ if ( document.addEventListener ) {
+ document.removeEventListener( "DOMContentLoaded", completed, false );
+ window.removeEventListener( "load", completed, false );
+
+ } else {
+ document.detachEvent( "onreadystatechange", completed );
+ window.detachEvent( "onload", completed );
+ }
+}
+
+/**
+ * The ready event handler and self cleanup method
+ */
+function completed() {
+ // readyState === "complete" is good enough for us to call the dom ready in oldIE
+ if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {
+ detach();
+ jQuery.ready();
+ }
+}
+
+jQuery.ready.promise = function( obj ) {
+ if ( !readyList ) {
+
+ readyList = jQuery.Deferred();
+
+ // Catch cases where $(document).ready() is called after the browser event has already occurred.
+ // we once tried to use readyState "interactive" here, but it caused issues like the one
+ // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+ if ( document.readyState === "complete" ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ setTimeout( jQuery.ready );
+
+ // Standards-based browsers support DOMContentLoaded
+ } else if ( document.addEventListener ) {
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", completed, false );
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", completed, false );
+
+ // If IE event model is used
+ } else {
+ // Ensure firing before onload, maybe late but safe also for iframes
+ document.attachEvent( "onreadystatechange", completed );
+
+ // A fallback to window.onload, that will always work
+ window.attachEvent( "onload", completed );
+
+ // If IE and not a frame
+ // continually check to see if the document is ready
+ var top = false;
+
+ try {
+ top = window.frameElement == null && document.documentElement;
+ } catch(e) {}
+
+ if ( top && top.doScroll ) {
+ (function doScrollCheck() {
+ if ( !jQuery.isReady ) {
+
+ try {
+ // Use the trick by Diego Perini
+ // http://javascript.nwbox.com/IEContentLoaded/
+ top.doScroll("left");
+ } catch(e) {
+ return setTimeout( doScrollCheck, 50 );
+ }
+
+ // detach all dom ready events
+ detach();
+
+ // and execute any waiting functions
+ jQuery.ready();
+ }
+ })();
+ }
+ }
+ }
+ return readyList.promise( obj );
+};
+
+
+var strundefined = typeof undefined;
+
+
+
+// Support: IE<9
+// Iteration over object's inherited properties before its own
+var i;
+for ( i in jQuery( support ) ) {
+ break;
+}
+support.ownLast = i !== "0";
+
+// Note: most support tests are defined in their respective modules.
+// false until the test is run
+support.inlineBlockNeedsLayout = false;
+
+// Execute ASAP in case we need to set body.style.zoom
+jQuery(function() {
+ // Minified: var a,b,c,d
+ var val, div, body, container;
+
+ body = document.getElementsByTagName( "body" )[ 0 ];
+ if ( !body || !body.style ) {
+ // Return for frameset docs that don't have a body
+ return;
+ }
+
+ // Setup
+ div = document.createElement( "div" );
+ container = document.createElement( "div" );
+ container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
+ body.appendChild( container ).appendChild( div );
+
+ if ( typeof div.style.zoom !== strundefined ) {
+ // Support: IE<8
+ // Check if natively block-level elements act like inline-block
+ // elements when setting their display to 'inline' and giving
+ // them layout
+ div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1";
+
+ support.inlineBlockNeedsLayout = val = div.offsetWidth === 3;
+ if ( val ) {
+ // Prevent IE 6 from affecting layout for positioned elements #11048
+ // Prevent IE from shrinking the body in IE 7 mode #12869
+ // Support: IE<8
+ body.style.zoom = 1;
+ }
+ }
+
+ body.removeChild( container );
+});
+
+
+
+
+(function() {
+ var div = document.createElement( "div" );
+
+ // Execute the test only if not already executed in another module.
+ if (support.deleteExpando == null) {
+ // Support: IE<9
+ support.deleteExpando = true;
+ try {
+ delete div.test;
+ } catch( e ) {
+ support.deleteExpando = false;
+ }
+ }
+
+ // Null elements to avoid leaks in IE.
+ div = null;
+})();
+
+
+/**
+ * Determines whether an object can have data
+ */
+jQuery.acceptData = function( elem ) {
+ var noData = jQuery.noData[ (elem.nodeName + " ").toLowerCase() ],
+ nodeType = +elem.nodeType || 1;
+
+ // Do not set data on non-element DOM nodes because it will not be cleared (#8335).
+ return nodeType !== 1 && nodeType !== 9 ?
+ false :
+
+ // Nodes accept data unless otherwise specified; rejection can be conditional
+ !noData || noData !== true && elem.getAttribute("classid") === noData;
+};
+
+
+var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
+ rmultiDash = /([A-Z])/g;
+
+function dataAttr( elem, key, data ) {
+ // If nothing was found internally, try to fetch any
+ // data from the HTML5 data-* attribute
+ if ( data === undefined && elem.nodeType === 1 ) {
+
+ var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
+
+ data = elem.getAttribute( name );
+
+ if ( typeof data === "string" ) {
+ try {
+ data = data === "true" ? true :
+ data === "false" ? false :
+ data === "null" ? null :
+ // Only convert to a number if it doesn't change the string
+ +data + "" === data ? +data :
+ rbrace.test( data ) ? jQuery.parseJSON( data ) :
+ data;
+ } catch( e ) {}
+
+ // Make sure we set the data so it isn't changed later
+ jQuery.data( elem, key, data );
+
+ } else {
+ data = undefined;
+ }
+ }
+
+ return data;
+}
+
+// checks a cache object for emptiness
+function isEmptyDataObject( obj ) {
+ var name;
+ for ( name in obj ) {
+
+ // if the public data object is empty, the private is still empty
+ if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
+ continue;
+ }
+ if ( name !== "toJSON" ) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+function internalData( elem, name, data, pvt /* Internal Use Only */ ) {
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ var ret, thisCache,
+ internalKey = jQuery.expando,
+
+ // We have to handle DOM nodes and JS objects differently because IE6-7
+ // can't GC object references properly across the DOM-JS boundary
+ isNode = elem.nodeType,
+
+ // Only DOM nodes need the global jQuery cache; JS object data is
+ // attached directly to the object so GC can occur automatically
+ cache = isNode ? jQuery.cache : elem,
+
+ // Only defining an ID for JS objects if its cache already exists allows
+ // the code to shortcut on the same path as a DOM node with no cache
+ id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
+
+ // Avoid doing any more work than we need to when trying to get data on an
+ // object that has no data at all
+ if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) {
+ return;
+ }
+
+ if ( !id ) {
+ // Only DOM nodes need a new unique ID for each element since their data
+ // ends up in the global cache
+ if ( isNode ) {
+ id = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++;
+ } else {
+ id = internalKey;
+ }
+ }
+
+ if ( !cache[ id ] ) {
+ // Avoid exposing jQuery metadata on plain JS objects when the object
+ // is serialized using JSON.stringify
+ cache[ id ] = isNode ? {} : { toJSON: jQuery.noop };
+ }
+
+ // An object can be passed to jQuery.data instead of a key/value pair; this gets
+ // shallow copied over onto the existing cache
+ if ( typeof name === "object" || typeof name === "function" ) {
+ if ( pvt ) {
+ cache[ id ] = jQuery.extend( cache[ id ], name );
+ } else {
+ cache[ id ].data = jQuery.extend( cache[ id ].data, name );
+ }
+ }
+
+ thisCache = cache[ id ];
+
+ // jQuery data() is stored in a separate object inside the object's internal data
+ // cache in order to avoid key collisions between internal data and user-defined
+ // data.
+ if ( !pvt ) {
+ if ( !thisCache.data ) {
+ thisCache.data = {};
+ }
+
+ thisCache = thisCache.data;
+ }
+
+ if ( data !== undefined ) {
+ thisCache[ jQuery.camelCase( name ) ] = data;
+ }
+
+ // Check for both converted-to-camel and non-converted data property names
+ // If a data property was specified
+ if ( typeof name === "string" ) {
+
+ // First Try to find as-is property data
+ ret = thisCache[ name ];
+
+ // Test for null|undefined property data
+ if ( ret == null ) {
+
+ // Try to find the camelCased property
+ ret = thisCache[ jQuery.camelCase( name ) ];
+ }
+ } else {
+ ret = thisCache;
+ }
+
+ return ret;
+}
+
+function internalRemoveData( elem, name, pvt ) {
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ var thisCache, i,
+ isNode = elem.nodeType,
+
+ // See jQuery.data for more information
+ cache = isNode ? jQuery.cache : elem,
+ id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
+
+ // If there is already no cache entry for this object, there is no
+ // purpose in continuing
+ if ( !cache[ id ] ) {
+ return;
+ }
+
+ if ( name ) {
+
+ thisCache = pvt ? cache[ id ] : cache[ id ].data;
+
+ if ( thisCache ) {
+
+ // Support array or space separated string names for data keys
+ if ( !jQuery.isArray( name ) ) {
+
+ // try the string as a key before any manipulation
+ if ( name in thisCache ) {
+ name = [ name ];
+ } else {
+
+ // split the camel cased version by spaces unless a key with the spaces exists
+ name = jQuery.camelCase( name );
+ if ( name in thisCache ) {
+ name = [ name ];
+ } else {
+ name = name.split(" ");
+ }
+ }
+ } else {
+ // If "name" is an array of keys...
+ // When data is initially created, via ("key", "val") signature,
+ // keys will be converted to camelCase.
+ // Since there is no way to tell _how_ a key was added, remove
+ // both plain key and camelCase key. #12786
+ // This will only penalize the array argument path.
+ name = name.concat( jQuery.map( name, jQuery.camelCase ) );
+ }
+
+ i = name.length;
+ while ( i-- ) {
+ delete thisCache[ name[i] ];
+ }
+
+ // If there is no data left in the cache, we want to continue
+ // and let the cache object itself get destroyed
+ if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) {
+ return;
+ }
+ }
+ }
+
+ // See jQuery.data for more information
+ if ( !pvt ) {
+ delete cache[ id ].data;
+
+ // Don't destroy the parent cache unless the internal data object
+ // had been the only thing left in it
+ if ( !isEmptyDataObject( cache[ id ] ) ) {
+ return;
+ }
+ }
+
+ // Destroy the cache
+ if ( isNode ) {
+ jQuery.cleanData( [ elem ], true );
+
+ // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
+ /* jshint eqeqeq: false */
+ } else if ( support.deleteExpando || cache != cache.window ) {
+ /* jshint eqeqeq: true */
+ delete cache[ id ];
+
+ // When all else fails, null
+ } else {
+ cache[ id ] = null;
+ }
+}
+
+jQuery.extend({
+ cache: {},
+
+ // The following elements (space-suffixed to avoid Object.prototype collisions)
+ // throw uncatchable exceptions if you attempt to set expando properties
+ noData: {
+ "applet ": true,
+ "embed ": true,
+ // ...but Flash objects (which have this classid) *can* handle expandos
+ "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
+ },
+
+ hasData: function( elem ) {
+ elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
+ return !!elem && !isEmptyDataObject( elem );
+ },
+
+ data: function( elem, name, data ) {
+ return internalData( elem, name, data );
+ },
+
+ removeData: function( elem, name ) {
+ return internalRemoveData( elem, name );
+ },
+
+ // For internal use only.
+ _data: function( elem, name, data ) {
+ return internalData( elem, name, data, true );
+ },
+
+ _removeData: function( elem, name ) {
+ return internalRemoveData( elem, name, true );
+ }
+});
+
+jQuery.fn.extend({
+ data: function( key, value ) {
+ var i, name, data,
+ elem = this[0],
+ attrs = elem && elem.attributes;
+
+ // Special expections of .data basically thwart jQuery.access,
+ // so implement the relevant behavior ourselves
+
+ // Gets all values
+ if ( key === undefined ) {
+ if ( this.length ) {
+ data = jQuery.data( elem );
+
+ if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
+ i = attrs.length;
+ while ( i-- ) {
+
+ // Support: IE11+
+ // The attrs elements can be null (#14894)
+ if ( attrs[ i ] ) {
+ name = attrs[ i ].name;
+ if ( name.indexOf( "data-" ) === 0 ) {
+ name = jQuery.camelCase( name.slice(5) );
+ dataAttr( elem, name, data[ name ] );
+ }
+ }
+ }
+ jQuery._data( elem, "parsedAttrs", true );
+ }
+ }
+
+ return data;
+ }
+
+ // Sets multiple values
+ if ( typeof key === "object" ) {
+ return this.each(function() {
+ jQuery.data( this, key );
+ });
+ }
+
+ return arguments.length > 1 ?
+
+ // Sets one value
+ this.each(function() {
+ jQuery.data( this, key, value );
+ }) :
+
+ // Gets one value
+ // Try to fetch any internally stored data first
+ elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined;
+ },
+
+ removeData: function( key ) {
+ return this.each(function() {
+ jQuery.removeData( this, key );
+ });
+ }
+});
+
+
+jQuery.extend({
+ queue: function( elem, type, data ) {
+ var queue;
+
+ if ( elem ) {
+ type = ( type || "fx" ) + "queue";
+ queue = jQuery._data( elem, type );
+
+ // Speed up dequeue by getting out quickly if this is just a lookup
+ if ( data ) {
+ if ( !queue || jQuery.isArray(data) ) {
+ queue = jQuery._data( elem, type, jQuery.makeArray(data) );
+ } else {
+ queue.push( data );
+ }
+ }
+ return queue || [];
+ }
+ },
+
+ dequeue: function( elem, type ) {
+ type = type || "fx";
+
+ var queue = jQuery.queue( elem, type ),
+ startLength = queue.length,
+ fn = queue.shift(),
+ hooks = jQuery._queueHooks( elem, type ),
+ next = function() {
+ jQuery.dequeue( elem, type );
+ };
+
+ // If the fx queue is dequeued, always remove the progress sentinel
+ if ( fn === "inprogress" ) {
+ fn = queue.shift();
+ startLength--;
+ }
+
+ if ( fn ) {
+
+ // Add a progress sentinel to prevent the fx queue from being
+ // automatically dequeued
+ if ( type === "fx" ) {
+ queue.unshift( "inprogress" );
+ }
+
+ // clear up the last queue stop function
+ delete hooks.stop;
+ fn.call( elem, next, hooks );
+ }
+
+ if ( !startLength && hooks ) {
+ hooks.empty.fire();
+ }
+ },
+
+ // not intended for public consumption - generates a queueHooks object, or returns the current one
+ _queueHooks: function( elem, type ) {
+ var key = type + "queueHooks";
+ return jQuery._data( elem, key ) || jQuery._data( elem, key, {
+ empty: jQuery.Callbacks("once memory").add(function() {
+ jQuery._removeData( elem, type + "queue" );
+ jQuery._removeData( elem, key );
+ })
+ });
+ }
+});
+
+jQuery.fn.extend({
+ queue: function( type, data ) {
+ var setter = 2;
+
+ if ( typeof type !== "string" ) {
+ data = type;
+ type = "fx";
+ setter--;
+ }
+
+ if ( arguments.length < setter ) {
+ return jQuery.queue( this[0], type );
+ }
+
+ return data === undefined ?
+ this :
+ this.each(function() {
+ var queue = jQuery.queue( this, type, data );
+
+ // ensure a hooks for this queue
+ jQuery._queueHooks( this, type );
+
+ if ( type === "fx" && queue[0] !== "inprogress" ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ dequeue: function( type ) {
+ return this.each(function() {
+ jQuery.dequeue( this, type );
+ });
+ },
+ clearQueue: function( type ) {
+ return this.queue( type || "fx", [] );
+ },
+ // Get a promise resolved when queues of a certain type
+ // are emptied (fx is the type by default)
+ promise: function( type, obj ) {
+ var tmp,
+ count = 1,
+ defer = jQuery.Deferred(),
+ elements = this,
+ i = this.length,
+ resolve = function() {
+ if ( !( --count ) ) {
+ defer.resolveWith( elements, [ elements ] );
+ }
+ };
+
+ if ( typeof type !== "string" ) {
+ obj = type;
+ type = undefined;
+ }
+ type = type || "fx";
+
+ while ( i-- ) {
+ tmp = jQuery._data( elements[ i ], type + "queueHooks" );
+ if ( tmp && tmp.empty ) {
+ count++;
+ tmp.empty.add( resolve );
+ }
+ }
+ resolve();
+ return defer.promise( obj );
+ }
+});
+var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;
+
+var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
+
+var isHidden = function( elem, el ) {
+ // isHidden might be called from jQuery#filter function;
+ // in that case, element will be second argument
+ elem = el || elem;
+ return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
+ };
+
+
+
+// Multifunctional method to get and set values of a collection
+// The value/s can optionally be executed if it's a function
+var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
+ var i = 0,
+ length = elems.length,
+ bulk = key == null;
+
+ // Sets many values
+ if ( jQuery.type( key ) === "object" ) {
+ chainable = true;
+ for ( i in key ) {
+ jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
+ }
+
+ // Sets one value
+ } else if ( value !== undefined ) {
+ chainable = true;
+
+ if ( !jQuery.isFunction( value ) ) {
+ raw = true;
+ }
+
+ if ( bulk ) {
+ // Bulk operations run against the entire set
+ if ( raw ) {
+ fn.call( elems, value );
+ fn = null;
+
+ // ...except when executing function values
+ } else {
+ bulk = fn;
+ fn = function( elem, key, value ) {
+ return bulk.call( jQuery( elem ), value );
+ };
+ }
+ }
+
+ if ( fn ) {
+ for ( ; i < length; i++ ) {
+ fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
+ }
+ }
+ }
+
+ return chainable ?
+ elems :
+
+ // Gets
+ bulk ?
+ fn.call( elems ) :
+ length ? fn( elems[0], key ) : emptyGet;
+};
+var rcheckableType = (/^(?:checkbox|radio)$/i);
+
+
+
+(function() {
+ // Minified: var a,b,c
+ var input = document.createElement( "input" ),
+ div = document.createElement( "div" ),
+ fragment = document.createDocumentFragment();
+
+ // Setup
+ div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
+
+ // IE strips leading whitespace when .innerHTML is used
+ support.leadingWhitespace = div.firstChild.nodeType === 3;
+
+ // Make sure that tbody elements aren't automatically inserted
+ // IE will insert them into empty tables
+ support.tbody = !div.getElementsByTagName( "tbody" ).length;
+
+ // Make sure that link elements get serialized correctly by innerHTML
+ // This requires a wrapper element in IE
+ support.htmlSerialize = !!div.getElementsByTagName( "link" ).length;
+
+ // Makes sure cloning an html5 element does not cause problems
+ // Where outerHTML is undefined, this still works
+ support.html5Clone =
+ document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav></:nav>";
+
+ // Check if a disconnected checkbox will retain its checked
+ // value of true after appended to the DOM (IE6/7)
+ input.type = "checkbox";
+ input.checked = true;
+ fragment.appendChild( input );
+ support.appendChecked = input.checked;
+
+ // Make sure textarea (and checkbox) defaultValue is properly cloned
+ // Support: IE6-IE11+
+ div.innerHTML = "<textarea>x</textarea>";
+ support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
+
+ // #11217 - WebKit loses check when the name is after the checked attribute
+ fragment.appendChild( div );
+ div.innerHTML = "<input type='radio' checked='checked' name='t'/>";
+
+ // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3
+ // old WebKit doesn't clone checked state correctly in fragments
+ support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+ // Support: IE<9
+ // Opera does not clone events (and typeof div.attachEvent === undefined).
+ // IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
+ support.noCloneEvent = true;
+ if ( div.attachEvent ) {
+ div.attachEvent( "onclick", function() {
+ support.noCloneEvent = false;
+ });
+
+ div.cloneNode( true ).click();
+ }
+
+ // Execute the test only if not already executed in another module.
+ if (support.deleteExpando == null) {
+ // Support: IE<9
+ support.deleteExpando = true;
+ try {
+ delete div.test;
+ } catch( e ) {
+ support.deleteExpando = false;
+ }
+ }
+})();
+
+
+(function() {
+ var i, eventName,
+ div = document.createElement( "div" );
+
+ // Support: IE<9 (lack submit/change bubble), Firefox 23+ (lack focusin event)
+ for ( i in { submit: true, change: true, focusin: true }) {
+ eventName = "on" + i;
+
+ if ( !(support[ i + "Bubbles" ] = eventName in window) ) {
+ // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
+ div.setAttribute( eventName, "t" );
+ support[ i + "Bubbles" ] = div.attributes[ eventName ].expando === false;
+ }
+ }
+
+ // Null elements to avoid leaks in IE.
+ div = null;
+})();
+
+
+var rformElems = /^(?:input|select|textarea)$/i,
+ rkeyEvent = /^key/,
+ rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/,
+ rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+ rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
+
+function returnTrue() {
+ return true;
+}
+
+function returnFalse() {
+ return false;
+}
+
+function safeActiveElement() {
+ try {
+ return document.activeElement;
+ } catch ( err ) { }
+}
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+ global: {},
+
+ add: function( elem, types, handler, data, selector ) {
+ var tmp, events, t, handleObjIn,
+ special, eventHandle, handleObj,
+ handlers, type, namespaces, origType,
+ elemData = jQuery._data( elem );
+
+ // Don't attach events to noData or text/comment nodes (but allow plain objects)
+ if ( !elemData ) {
+ return;
+ }
+
+ // Caller can pass in an object of custom data in lieu of the handler
+ if ( handler.handler ) {
+ handleObjIn = handler;
+ handler = handleObjIn.handler;
+ selector = handleObjIn.selector;
+ }
+
+ // Make sure that the handler has a unique ID, used to find/remove it later
+ if ( !handler.guid ) {
+ handler.guid = jQuery.guid++;
+ }
+
+ // Init the element's event structure and main handler, if this is the first
+ if ( !(events = elemData.events) ) {
+ events = elemData.events = {};
+ }
+ if ( !(eventHandle = elemData.handle) ) {
+ eventHandle = elemData.handle = function( e ) {
+ // Discard the second event of a jQuery.event.trigger() and
+ // when an event is called after a page has unloaded
+ return typeof jQuery !== strundefined && (!e || jQuery.event.triggered !== e.type) ?
+ jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
+ undefined;
+ };
+ // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
+ eventHandle.elem = elem;
+ }
+
+ // Handle multiple events separated by a space
+ types = ( types || "" ).match( rnotwhite ) || [ "" ];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tmp[1];
+ namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+ // There *must* be a type, no attaching namespace-only handlers
+ if ( !type ) {
+ continue;
+ }
+
+ // If event changes its type, use the special event handlers for the changed type
+ special = jQuery.event.special[ type ] || {};
+
+ // If selector defined, determine special event api type, otherwise given type
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+
+ // Update special based on newly reset type
+ special = jQuery.event.special[ type ] || {};
+
+ // handleObj is passed to all event handlers
+ handleObj = jQuery.extend({
+ type: type,
+ origType: origType,
+ data: data,
+ handler: handler,
+ guid: handler.guid,
+ selector: selector,
+ needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
+ namespace: namespaces.join(".")
+ }, handleObjIn );
+
+ // Init the event handler queue if we're the first
+ if ( !(handlers = events[ type ]) ) {
+ handlers = events[ type ] = [];
+ handlers.delegateCount = 0;
+
+ // Only use addEventListener/attachEvent if the special events handler returns false
+ if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+ // Bind the global event handler to the element
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, eventHandle, false );
+
+ } else if ( elem.attachEvent ) {
+ elem.attachEvent( "on" + type, eventHandle );
+ }
+ }
+ }
+
+ if ( special.add ) {
+ special.add.call( elem, handleObj );
+
+ if ( !handleObj.handler.guid ) {
+ handleObj.handler.guid = handler.guid;
+ }
+ }
+
+ // Add to the element's handler list, delegates in front
+ if ( selector ) {
+ handlers.splice( handlers.delegateCount++, 0, handleObj );
+ } else {
+ handlers.push( handleObj );
+ }
+
+ // Keep track of which events have ever been used, for event optimization
+ jQuery.event.global[ type ] = true;
+ }
+
+ // Nullify elem to prevent memory leaks in IE
+ elem = null;
+ },
+
+ // Detach an event or set of events from an element
+ remove: function( elem, types, handler, selector, mappedTypes ) {
+ var j, handleObj, tmp,
+ origCount, t, events,
+ special, handlers, type,
+ namespaces, origType,
+ elemData = jQuery.hasData( elem ) && jQuery._data( elem );
+
+ if ( !elemData || !(events = elemData.events) ) {
+ return;
+ }
+
+ // Once for each type.namespace in types; type may be omitted
+ types = ( types || "" ).match( rnotwhite ) || [ "" ];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tmp[1];
+ namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+ // Unbind all events (on this namespace, if provided) for the element
+ if ( !type ) {
+ for ( type in events ) {
+ jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+ }
+ continue;
+ }
+
+ special = jQuery.event.special[ type ] || {};
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+ handlers = events[ type ] || [];
+ tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
+
+ // Remove matching events
+ origCount = j = handlers.length;
+ while ( j-- ) {
+ handleObj = handlers[ j ];
+
+ if ( ( mappedTypes || origType === handleObj.origType ) &&
+ ( !handler || handler.guid === handleObj.guid ) &&
+ ( !tmp || tmp.test( handleObj.namespace ) ) &&
+ ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+ handlers.splice( j, 1 );
+
+ if ( handleObj.selector ) {
+ handlers.delegateCount--;
+ }
+ if ( special.remove ) {
+ special.remove.call( elem, handleObj );
+ }
+ }
+ }
+
+ // Remove generic event handler if we removed something and no more handlers exist
+ // (avoids potential for endless recursion during removal of special event handlers)
+ if ( origCount && !handlers.length ) {
+ if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+ jQuery.removeEvent( elem, type, elemData.handle );
+ }
+
+ delete events[ type ];
+ }
+ }
+
+ // Remove the expando if it's no longer used
+ if ( jQuery.isEmptyObject( events ) ) {
+ delete elemData.handle;
+
+ // removeData also checks for emptiness and clears the expando if empty
+ // so use it instead of delete
+ jQuery._removeData( elem, "events" );
+ }
+ },
+
+ trigger: function( event, data, elem, onlyHandlers ) {
+ var handle, ontype, cur,
+ bubbleType, special, tmp, i,
+ eventPath = [ elem || document ],
+ type = hasOwn.call( event, "type" ) ? event.type : event,
+ namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
+
+ cur = tmp = elem = elem || document;
+
+ // Don't do events on text and comment nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return;
+ }
+
+ // focus/blur morphs to focusin/out; ensure we're not firing them right now
+ if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+ return;
+ }
+
+ if ( type.indexOf(".") >= 0 ) {
+ // Namespaced trigger; create a regexp to match event type in handle()
+ namespaces = type.split(".");
+ type = namespaces.shift();
+ namespaces.sort();
+ }
+ ontype = type.indexOf(":") < 0 && "on" + type;
+
+ // Caller can pass in a jQuery.Event object, Object, or just an event type string
+ event = event[ jQuery.expando ] ?
+ event :
+ new jQuery.Event( type, typeof event === "object" && event );
+
+ // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
+ event.isTrigger = onlyHandlers ? 2 : 3;
+ event.namespace = namespaces.join(".");
+ event.namespace_re = event.namespace ?
+ new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
+ null;
+
+ // Clean up the event in case it is being reused
+ event.result = undefined;
+ if ( !event.target ) {
+ event.target = elem;
+ }
+
+ // Clone any incoming data and prepend the event, creating the handler arg list
+ data = data == null ?
+ [ event ] :
+ jQuery.makeArray( data, [ event ] );
+
+ // Allow special events to draw outside the lines
+ special = jQuery.event.special[ type ] || {};
+ if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
+ return;
+ }
+
+ // Determine event propagation path in advance, per W3C events spec (#9951)
+ // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+ if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+ bubbleType = special.delegateType || type;
+ if ( !rfocusMorph.test( bubbleType + type ) ) {
+ cur = cur.parentNode;
+ }
+ for ( ; cur; cur = cur.parentNode ) {
+ eventPath.push( cur );
+ tmp = cur;
+ }
+
+ // Only add window if we got to document (e.g., not plain obj or detached DOM)
+ if ( tmp === (elem.ownerDocument || document) ) {
+ eventPath.push( tmp.defaultView || tmp.parentWindow || window );
+ }
+ }
+
+ // Fire handlers on the event path
+ i = 0;
+ while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
+
+ event.type = i > 1 ?
+ bubbleType :
+ special.bindType || type;
+
+ // jQuery handler
+ handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
+ if ( handle ) {
+ handle.apply( cur, data );
+ }
+
+ // Native handler
+ handle = ontype && cur[ ontype ];
+ if ( handle && handle.apply && jQuery.acceptData( cur ) ) {
+ event.result = handle.apply( cur, data );
+ if ( event.result === false ) {
+ event.preventDefault();
+ }
+ }
+ }
+ event.type = type;
+
+ // If nobody prevented the default action, do it now
+ if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+ if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&
+ jQuery.acceptData( elem ) ) {
+
+ // Call a native DOM method on the target with the same name name as the event.
+ // Can't use an .isFunction() check here because IE6/7 fails that test.
+ // Don't do default actions on window, that's where global variables be (#6170)
+ if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
+
+ // Don't re-trigger an onFOO event when we call its FOO() method
+ tmp = elem[ ontype ];
+
+ if ( tmp ) {
+ elem[ ontype ] = null;
+ }
+
+ // Prevent re-triggering of the same event, since we already bubbled it above
+ jQuery.event.triggered = type;
+ try {
+ elem[ type ]();
+ } catch ( e ) {
+ // IE<9 dies on focus/blur to hidden element (#1486,#12518)
+ // only reproducible on winXP IE8 native, not IE9 in IE8 mode
+ }
+ jQuery.event.triggered = undefined;
+
+ if ( tmp ) {
+ elem[ ontype ] = tmp;
+ }
+ }
+ }
+ }
+
+ return event.result;
+ },
+
+ dispatch: function( event ) {
+
+ // Make a writable jQuery.Event from the native event object
+ event = jQuery.event.fix( event );
+
+ var i, ret, handleObj, matched, j,
+ handlerQueue = [],
+ args = slice.call( arguments ),
+ handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
+ special = jQuery.event.special[ event.type ] || {};
+
+ // Use the fix-ed jQuery.Event rather than the (read-only) native event
+ args[0] = event;
+ event.delegateTarget = this;
+
+ // Call the preDispatch hook for the mapped type, and let it bail if desired
+ if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+ return;
+ }
+
+ // Determine handlers
+ handlerQueue = jQuery.event.handlers.call( this, event, handlers );
+
+ // Run delegates first; they may want to stop propagation beneath us
+ i = 0;
+ while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
+ event.currentTarget = matched.elem;
+
+ j = 0;
+ while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
+
+ // Triggered event must either 1) have no namespace, or
+ // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
+ if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
+
+ event.handleObj = handleObj;
+ event.data = handleObj.data;
+
+ ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
+ .apply( matched.elem, args );
+
+ if ( ret !== undefined ) {
+ if ( (event.result = ret) === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ }
+ }
+ }
+ }
+
+ // Call the postDispatch hook for the mapped type
+ if ( special.postDispatch ) {
+ special.postDispatch.call( this, event );
+ }
+
+ return event.result;
+ },
+
+ handlers: function( event, handlers ) {
+ var sel, handleObj, matches, i,
+ handlerQueue = [],
+ delegateCount = handlers.delegateCount,
+ cur = event.target;
+
+ // Find delegate handlers
+ // Black-hole SVG <use> instance trees (#13180)
+ // Avoid non-left-click bubbling in Firefox (#3861)
+ if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
+
+ /* jshint eqeqeq: false */
+ for ( ; cur != this; cur = cur.parentNode || this ) {
+ /* jshint eqeqeq: true */
+
+ // Don't check non-elements (#13208)
+ // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
+ if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) {
+ matches = [];
+ for ( i = 0; i < delegateCount; i++ ) {
+ handleObj = handlers[ i ];
+
+ // Don't conflict with Object.prototype properties (#13203)
+ sel = handleObj.selector + " ";
+
+ if ( matches[ sel ] === undefined ) {
+ matches[ sel ] = handleObj.needsContext ?
+ jQuery( sel, this ).index( cur ) >= 0 :
+ jQuery.find( sel, this, null, [ cur ] ).length;
+ }
+ if ( matches[ sel ] ) {
+ matches.push( handleObj );
+ }
+ }
+ if ( matches.length ) {
+ handlerQueue.push({ elem: cur, handlers: matches });
+ }
+ }
+ }
+ }
+
+ // Add the remaining (directly-bound) handlers
+ if ( delegateCount < handlers.length ) {
+ handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
+ }
+
+ return handlerQueue;
+ },
+
+ fix: function( event ) {
+ if ( event[ jQuery.expando ] ) {
+ return event;
+ }
+
+ // Create a writable copy of the event object and normalize some properties
+ var i, prop, copy,
+ type = event.type,
+ originalEvent = event,
+ fixHook = this.fixHooks[ type ];
+
+ if ( !fixHook ) {
+ this.fixHooks[ type ] = fixHook =
+ rmouseEvent.test( type ) ? this.mouseHooks :
+ rkeyEvent.test( type ) ? this.keyHooks :
+ {};
+ }
+ copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+ event = new jQuery.Event( originalEvent );
+
+ i = copy.length;
+ while ( i-- ) {
+ prop = copy[ i ];
+ event[ prop ] = originalEvent[ prop ];
+ }
+
+ // Support: IE<9
+ // Fix target property (#1925)
+ if ( !event.target ) {
+ event.target = originalEvent.srcElement || document;
+ }
+
+ // Support: Chrome 23+, Safari?
+ // Target should not be a text node (#504, #13143)
+ if ( event.target.nodeType === 3 ) {
+ event.target = event.target.parentNode;
+ }
+
+ // Support: IE<9
+ // For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
+ event.metaKey = !!event.metaKey;
+
+ return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
+ },
+
+ // Includes some event props shared by KeyEvent and MouseEvent
+ props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
+
+ fixHooks: {},
+
+ keyHooks: {
+ props: "char charCode key keyCode".split(" "),
+ filter: function( event, original ) {
+
+ // Add which for key events
+ if ( event.which == null ) {
+ event.which = original.charCode != null ? original.charCode : original.keyCode;
+ }
+
+ return event;
+ }
+ },
+
+ mouseHooks: {
+ props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
+ filter: function( event, original ) {
+ var body, eventDoc, doc,
+ button = original.button,
+ fromElement = original.fromElement;
+
+ // Calculate pageX/Y if missing and clientX/Y available
+ if ( event.pageX == null && original.clientX != null ) {
+ eventDoc = event.target.ownerDocument || document;
+ doc = eventDoc.documentElement;
+ body = eventDoc.body;
+
+ event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+ event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
+ }
+
+ // Add relatedTarget, if necessary
+ if ( !event.relatedTarget && fromElement ) {
+ event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
+ }
+
+ // Add which for click: 1 === left; 2 === middle; 3 === right
+ // Note: button is not normalized, so don't use it
+ if ( !event.which && button !== undefined ) {
+ event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+ }
+
+ return event;
+ }
+ },
+
+ special: {
+ load: {
+ // Prevent triggered image.load events from bubbling to window.load
+ noBubble: true
+ },
+ focus: {
+ // Fire native event if possible so blur/focus sequence is correct
+ trigger: function() {
+ if ( this !== safeActiveElement() && this.focus ) {
+ try {
+ this.focus();
+ return false;
+ } catch ( e ) {
+ // Support: IE<9
+ // If we error on focus to hidden element (#1486, #12518),
+ // let .trigger() run the handlers
+ }
+ }
+ },
+ delegateType: "focusin"
+ },
+ blur: {
+ trigger: function() {
+ if ( this === safeActiveElement() && this.blur ) {
+ this.blur();
+ return false;
+ }
+ },
+ delegateType: "focusout"
+ },
+ click: {
+ // For checkbox, fire native event so checked state will be right
+ trigger: function() {
+ if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
+ this.click();
+ return false;
+ }
+ },
+
+ // For cross-browser consistency, don't fire native .click() on links
+ _default: function( event ) {
+ return jQuery.nodeName( event.target, "a" );
+ }
+ },
+
+ beforeunload: {
+ postDispatch: function( event ) {
+
+ // Support: Firefox 20+
+ // Firefox doesn't alert if the returnValue field is not set.
+ if ( event.result !== undefined && event.originalEvent ) {
+ event.originalEvent.returnValue = event.result;
+ }
+ }
+ }
+ },
+
+ simulate: function( type, elem, event, bubble ) {
+ // Piggyback on a donor event to simulate a different one.
+ // Fake originalEvent to avoid donor's stopPropagation, but if the
+ // simulated event prevents default then we do the same on the donor.
+ var e = jQuery.extend(
+ new jQuery.Event(),
+ event,
+ {
+ type: type,
+ isSimulated: true,
+ originalEvent: {}
+ }
+ );
+ if ( bubble ) {
+ jQuery.event.trigger( e, null, elem );
+ } else {
+ jQuery.event.dispatch.call( elem, e );
+ }
+ if ( e.isDefaultPrevented() ) {
+ event.preventDefault();
+ }
+ }
+};
+
+jQuery.removeEvent = document.removeEventListener ?
+ function( elem, type, handle ) {
+ if ( elem.removeEventListener ) {
+ elem.removeEventListener( type, handle, false );
+ }
+ } :
+ function( elem, type, handle ) {
+ var name = "on" + type;
+
+ if ( elem.detachEvent ) {
+
+ // #8545, #7054, preventing memory leaks for custom events in IE6-8
+ // detachEvent needed property on element, by name of that event, to properly expose it to GC
+ if ( typeof elem[ name ] === strundefined ) {
+ elem[ name ] = null;
+ }
+
+ elem.detachEvent( name, handle );
+ }
+ };
+
+jQuery.Event = function( src, props ) {
+ // Allow instantiation without the 'new' keyword
+ if ( !(this instanceof jQuery.Event) ) {
+ return new jQuery.Event( src, props );
+ }
+
+ // Event object
+ if ( src && src.type ) {
+ this.originalEvent = src;
+ this.type = src.type;
+
+ // Events bubbling up the document may have been marked as prevented
+ // by a handler lower down the tree; reflect the correct value.
+ this.isDefaultPrevented = src.defaultPrevented ||
+ src.defaultPrevented === undefined &&
+ // Support: IE < 9, Android < 4.0
+ src.returnValue === false ?
+ returnTrue :
+ returnFalse;
+
+ // Event type
+ } else {
+ this.type = src;
+ }
+
+ // Put explicitly provided properties onto the event object
+ if ( props ) {
+ jQuery.extend( this, props );
+ }
+
+ // Create a timestamp if incoming event doesn't have one
+ this.timeStamp = src && src.timeStamp || jQuery.now();
+
+ // Mark it as fixed
+ this[ jQuery.expando ] = true;
+};
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+ isDefaultPrevented: returnFalse,
+ isPropagationStopped: returnFalse,
+ isImmediatePropagationStopped: returnFalse,
+
+ preventDefault: function() {
+ var e = this.originalEvent;
+
+ this.isDefaultPrevented = returnTrue;
+ if ( !e ) {
+ return;
+ }
+
+ // If preventDefault exists, run it on the original event
+ if ( e.preventDefault ) {
+ e.preventDefault();
+
+ // Support: IE
+ // Otherwise set the returnValue property of the original event to false
+ } else {
+ e.returnValue = false;
+ }
+ },
+ stopPropagation: function() {
+ var e = this.originalEvent;
+
+ this.isPropagationStopped = returnTrue;
+ if ( !e ) {
+ return;
+ }
+ // If stopPropagation exists, run it on the original event
+ if ( e.stopPropagation ) {
+ e.stopPropagation();
+ }
+
+ // Support: IE
+ // Set the cancelBubble property of the original event to true
+ e.cancelBubble = true;
+ },
+ stopImmediatePropagation: function() {
+ var e = this.originalEvent;
+
+ this.isImmediatePropagationStopped = returnTrue;
+
+ if ( e && e.stopImmediatePropagation ) {
+ e.stopImmediatePropagation();
+ }
+
+ this.stopPropagation();
+ }
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+jQuery.each({
+ mouseenter: "mouseover",
+ mouseleave: "mouseout",
+ pointerenter: "pointerover",
+ pointerleave: "pointerout"
+}, function( orig, fix ) {
+ jQuery.event.special[ orig ] = {
+ delegateType: fix,
+ bindType: fix,
+
+ handle: function( event ) {
+ var ret,
+ target = this,
+ related = event.relatedTarget,
+ handleObj = event.handleObj;
+
+ // For mousenter/leave call the handler if related is outside the target.
+ // NB: No relatedTarget if the mouse left/entered the browser window
+ if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
+ event.type = handleObj.origType;
+ ret = handleObj.handler.apply( this, arguments );
+ event.type = fix;
+ }
+ return ret;
+ }
+ };
+});
+
+// IE submit delegation
+if ( !support.submitBubbles ) {
+
+ jQuery.event.special.submit = {
+ setup: function() {
+ // Only need this for delegated form submit events
+ if ( jQuery.nodeName( this, "form" ) ) {
+ return false;
+ }
+
+ // Lazy-add a submit handler when a descendant form may potentially be submitted
+ jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
+ // Node name check avoids a VML-related crash in IE (#9807)
+ var elem = e.target,
+ form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
+ if ( form && !jQuery._data( form, "submitBubbles" ) ) {
+ jQuery.event.add( form, "submit._submit", function( event ) {
+ event._submit_bubble = true;
+ });
+ jQuery._data( form, "submitBubbles", true );
+ }
+ });
+ // return undefined since we don't need an event listener
+ },
+
+ postDispatch: function( event ) {
+ // If form was submitted by the user, bubble the event up the tree
+ if ( event._submit_bubble ) {
+ delete event._submit_bubble;
+ if ( this.parentNode && !event.isTrigger ) {
+ jQuery.event.simulate( "submit", this.parentNode, event, true );
+ }
+ }
+ },
+
+ teardown: function() {
+ // Only need this for delegated form submit events
+ if ( jQuery.nodeName( this, "form" ) ) {
+ return false;
+ }
+
+ // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
+ jQuery.event.remove( this, "._submit" );
+ }
+ };
+}
+
+// IE change delegation and checkbox/radio fix
+if ( !support.changeBubbles ) {
+
+ jQuery.event.special.change = {
+
+ setup: function() {
+
+ if ( rformElems.test( this.nodeName ) ) {
+ // IE doesn't fire change on a check/radio until blur; trigger it on click
+ // after a propertychange. Eat the blur-change in special.change.handle.
+ // This still fires onchange a second time for check/radio after blur.
+ if ( this.type === "checkbox" || this.type === "radio" ) {
+ jQuery.event.add( this, "propertychange._change", function( event ) {
+ if ( event.originalEvent.propertyName === "checked" ) {
+ this._just_changed = true;
+ }
+ });
+ jQuery.event.add( this, "click._change", function( event ) {
+ if ( this._just_changed && !event.isTrigger ) {
+ this._just_changed = false;
+ }
+ // Allow triggered, simulated change events (#11500)
+ jQuery.event.simulate( "change", this, event, true );
+ });
+ }
+ return false;
+ }
+ // Delegated event; lazy-add a change handler on descendant inputs
+ jQuery.event.add( this, "beforeactivate._change", function( e ) {
+ var elem = e.target;
+
+ if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) {
+ jQuery.event.add( elem, "change._change", function( event ) {
+ if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
+ jQuery.event.simulate( "change", this.parentNode, event, true );
+ }
+ });
+ jQuery._data( elem, "changeBubbles", true );
+ }
+ });
+ },
+
+ handle: function( event ) {
+ var elem = event.target;
+
+ // Swallow native change events from checkbox/radio, we already triggered them above
+ if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
+ return event.handleObj.handler.apply( this, arguments );
+ }
+ },
+
+ teardown: function() {
+ jQuery.event.remove( this, "._change" );
+
+ return !rformElems.test( this.nodeName );
+ }
+ };
+}
+
+// Create "bubbling" focus and blur events
+if ( !support.focusinBubbles ) {
+ jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+ // Attach a single capturing handler on the document while someone wants focusin/focusout
+ var handler = function( event ) {
+ jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+ };
+
+ jQuery.event.special[ fix ] = {
+ setup: function() {
+ var doc = this.ownerDocument || this,
+ attaches = jQuery._data( doc, fix );
+
+ if ( !attaches ) {
+ doc.addEventListener( orig, handler, true );
+ }
+ jQuery._data( doc, fix, ( attaches || 0 ) + 1 );
+ },
+ teardown: function() {
+ var doc = this.ownerDocument || this,
+ attaches = jQuery._data( doc, fix ) - 1;
+
+ if ( !attaches ) {
+ doc.removeEventListener( orig, handler, true );
+ jQuery._removeData( doc, fix );
+ } else {
+ jQuery._data( doc, fix, attaches );
+ }
+ }
+ };
+ });
+}
+
+jQuery.fn.extend({
+
+ on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
+ var type, origFn;
+
+ // Types can be a map of types/handlers
+ if ( typeof types === "object" ) {
+ // ( types-Object, selector, data )
+ if ( typeof selector !== "string" ) {
+ // ( types-Object, data )
+ data = data || selector;
+ selector = undefined;
+ }
+ for ( type in types ) {
+ this.on( type, selector, data, types[ type ], one );
+ }
+ return this;
+ }
+
+ if ( data == null && fn == null ) {
+ // ( types, fn )
+ fn = selector;
+ data = selector = undefined;
+ } else if ( fn == null ) {
+ if ( typeof selector === "string" ) {
+ // ( types, selector, fn )
+ fn = data;
+ data = undefined;
+ } else {
+ // ( types, data, fn )
+ fn = data;
+ data = selector;
+ selector = undefined;
+ }
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ } else if ( !fn ) {
+ return this;
+ }
+
+ if ( one === 1 ) {
+ origFn = fn;
+ fn = function( event ) {
+ // Can use an empty set, since event contains the info
+ jQuery().off( event );
+ return origFn.apply( this, arguments );
+ };
+ // Use same guid so caller can remove using origFn
+ fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+ }
+ return this.each( function() {
+ jQuery.event.add( this, types, fn, data, selector );
+ });
+ },
+ one: function( types, selector, data, fn ) {
+ return this.on( types, selector, data, fn, 1 );
+ },
+ off: function( types, selector, fn ) {
+ var handleObj, type;
+ if ( types && types.preventDefault && types.handleObj ) {
+ // ( event ) dispatched jQuery.Event
+ handleObj = types.handleObj;
+ jQuery( types.delegateTarget ).off(
+ handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
+ handleObj.selector,
+ handleObj.handler
+ );
+ return this;
+ }
+ if ( typeof types === "object" ) {
+ // ( types-object [, selector] )
+ for ( type in types ) {
+ this.off( type, selector, types[ type ] );
+ }
+ return this;
+ }
+ if ( selector === false || typeof selector === "function" ) {
+ // ( types [, fn] )
+ fn = selector;
+ selector = undefined;
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ }
+ return this.each(function() {
+ jQuery.event.remove( this, types, fn, selector );
+ });
+ },
+
+ trigger: function( type, data ) {
+ return this.each(function() {
+ jQuery.event.trigger( type, data, this );
+ });
+ },
+ triggerHandler: function( type, data ) {
+ var elem = this[0];
+ if ( elem ) {
+ return jQuery.event.trigger( type, data, elem, true );
+ }
+ }
+});
+
+
+function createSafeFragment( document ) {
+ var list = nodeNames.split( "|" ),
+ safeFrag = document.createDocumentFragment();
+
+ if ( safeFrag.createElement ) {
+ while ( list.length ) {
+ safeFrag.createElement(
+ list.pop()
+ );
+ }
+ }
+ return safeFrag;
+}
+
+var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
+ "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
+ rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
+ rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
+ rleadingWhitespace = /^\s+/,
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
+ rtagName = /<([\w:]+)/,
+ rtbody = /<tbody/i,
+ rhtml = /<|&#?\w+;/,
+ rnoInnerhtml = /<(?:script|style|link)/i,
+ // checked="checked" or checked
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+ rscriptType = /^$|\/(?:java|ecma)script/i,
+ rscriptTypeMasked = /^true\/(.*)/,
+ rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
+
+ // We have to close these tags to support XHTML (#13200)
+ wrapMap = {
+ option: [ 1, "<select multiple='multiple'>", "</select>" ],
+ legend: [ 1, "<fieldset>", "</fieldset>" ],
+ area: [ 1, "<map>", "</map>" ],
+ param: [ 1, "<object>", "</object>" ],
+ thead: [ 1, "<table>", "</table>" ],
+ tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+ col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
+ td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+
+ // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
+ // unless wrapped in a div with non-breaking characters in front of it.
+ _default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
+ },
+ safeFragment = createSafeFragment( document ),
+ fragmentDiv = safeFragment.appendChild( document.createElement("div") );
+
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+function getAll( context, tag ) {
+ var elems, elem,
+ i = 0,
+ found = typeof context.getElementsByTagName !== strundefined ? context.getElementsByTagName( tag || "*" ) :
+ typeof context.querySelectorAll !== strundefined ? context.querySelectorAll( tag || "*" ) :
+ undefined;
+
+ if ( !found ) {
+ for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {
+ if ( !tag || jQuery.nodeName( elem, tag ) ) {
+ found.push( elem );
+ } else {
+ jQuery.merge( found, getAll( elem, tag ) );
+ }
+ }
+ }
+
+ return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
+ jQuery.merge( [ context ], found ) :
+ found;
+}
+
+// Used in buildFragment, fixes the defaultChecked property
+function fixDefaultChecked( elem ) {
+ if ( rcheckableType.test( elem.type ) ) {
+ elem.defaultChecked = elem.checked;
+ }
+}
+
+// Support: IE<8
+// Manipulating tables requires a tbody
+function manipulationTarget( elem, content ) {
+ return jQuery.nodeName( elem, "table" ) &&
+ jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?
+
+ elem.getElementsByTagName("tbody")[0] ||
+ elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
+ elem;
+}
+
+// Replace/restore the type attribute of script elements for safe DOM manipulation
+function disableScript( elem ) {
+ elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type;
+ return elem;
+}
+function restoreScript( elem ) {
+ var match = rscriptTypeMasked.exec( elem.type );
+ if ( match ) {
+ elem.type = match[1];
+ } else {
+ elem.removeAttribute("type");
+ }
+ return elem;
+}
+
+// Mark scripts as having already been evaluated
+function setGlobalEval( elems, refElements ) {
+ var elem,
+ i = 0;
+ for ( ; (elem = elems[i]) != null; i++ ) {
+ jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) );
+ }
+}
+
+function cloneCopyEvent( src, dest ) {
+
+ if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
+ return;
+ }
+
+ var type, i, l,
+ oldData = jQuery._data( src ),
+ curData = jQuery._data( dest, oldData ),
+ events = oldData.events;
+
+ if ( events ) {
+ delete curData.handle;
+ curData.events = {};
+
+ for ( type in events ) {
+ for ( i = 0, l = events[ type ].length; i < l; i++ ) {
+ jQuery.event.add( dest, type, events[ type ][ i ] );
+ }
+ }
+ }
+
+ // make the cloned public data object a copy from the original
+ if ( curData.data ) {
+ curData.data = jQuery.extend( {}, curData.data );
+ }
+}
+
+function fixCloneNodeIssues( src, dest ) {
+ var nodeName, e, data;
+
+ // We do not need to do anything for non-Elements
+ if ( dest.nodeType !== 1 ) {
+ return;
+ }
+
+ nodeName = dest.nodeName.toLowerCase();
+
+ // IE6-8 copies events bound via attachEvent when using cloneNode.
+ if ( !support.noCloneEvent && dest[ jQuery.expando ] ) {
+ data = jQuery._data( dest );
+
+ for ( e in data.events ) {
+ jQuery.removeEvent( dest, e, data.handle );
+ }
+
+ // Event data gets referenced instead of copied if the expando gets copied too
+ dest.removeAttribute( jQuery.expando );
+ }
+
+ // IE blanks contents when cloning scripts, and tries to evaluate newly-set text
+ if ( nodeName === "script" && dest.text !== src.text ) {
+ disableScript( dest ).text = src.text;
+ restoreScript( dest );
+
+ // IE6-10 improperly clones children of object elements using classid.
+ // IE10 throws NoModificationAllowedError if parent is null, #12132.
+ } else if ( nodeName === "object" ) {
+ if ( dest.parentNode ) {
+ dest.outerHTML = src.outerHTML;
+ }
+
+ // This path appears unavoidable for IE9. When cloning an object
+ // element in IE9, the outerHTML strategy above is not sufficient.
+ // If the src has innerHTML and the destination does not,
+ // copy the src.innerHTML into the dest.innerHTML. #10324
+ if ( support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {
+ dest.innerHTML = src.innerHTML;
+ }
+
+ } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
+ // IE6-8 fails to persist the checked state of a cloned checkbox
+ // or radio button. Worse, IE6-7 fail to give the cloned element
+ // a checked appearance if the defaultChecked value isn't also set
+
+ dest.defaultChecked = dest.checked = src.checked;
+
+ // IE6-7 get confused and end up setting the value of a cloned
+ // checkbox/radio button to an empty string instead of "on"
+ if ( dest.value !== src.value ) {
+ dest.value = src.value;
+ }
+
+ // IE6-8 fails to return the selected option to the default selected
+ // state when cloning options
+ } else if ( nodeName === "option" ) {
+ dest.defaultSelected = dest.selected = src.defaultSelected;
+
+ // IE6-8 fails to set the defaultValue to the correct value when
+ // cloning other types of input fields
+ } else if ( nodeName === "input" || nodeName === "textarea" ) {
+ dest.defaultValue = src.defaultValue;
+ }
+}
+
+jQuery.extend({
+ clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+ var destElements, node, clone, i, srcElements,
+ inPage = jQuery.contains( elem.ownerDocument, elem );
+
+ if ( support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
+ clone = elem.cloneNode( true );
+
+ // IE<=8 does not properly clone detached, unknown element nodes
+ } else {
+ fragmentDiv.innerHTML = elem.outerHTML;
+ fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
+ }
+
+ if ( (!support.noCloneEvent || !support.noCloneChecked) &&
+ (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
+
+ // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
+ destElements = getAll( clone );
+ srcElements = getAll( elem );
+
+ // Fix all IE cloning issues
+ for ( i = 0; (node = srcElements[i]) != null; ++i ) {
+ // Ensure that the destination node is not null; Fixes #9587
+ if ( destElements[i] ) {
+ fixCloneNodeIssues( node, destElements[i] );
+ }
+ }
+ }
+
+ // Copy the events from the original to the clone
+ if ( dataAndEvents ) {
+ if ( deepDataAndEvents ) {
+ srcElements = srcElements || getAll( elem );
+ destElements = destElements || getAll( clone );
+
+ for ( i = 0; (node = srcElements[i]) != null; i++ ) {
+ cloneCopyEvent( node, destElements[i] );
+ }
+ } else {
+ cloneCopyEvent( elem, clone );
+ }
+ }
+
+ // Preserve script evaluation history
+ destElements = getAll( clone, "script" );
+ if ( destElements.length > 0 ) {
+ setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
+ }
+
+ destElements = srcElements = node = null;
+
+ // Return the cloned set
+ return clone;
+ },
+
+ buildFragment: function( elems, context, scripts, selection ) {
+ var j, elem, contains,
+ tmp, tag, tbody, wrap,
+ l = elems.length,
+
+ // Ensure a safe fragment
+ safe = createSafeFragment( context ),
+
+ nodes = [],
+ i = 0;
+
+ for ( ; i < l; i++ ) {
+ elem = elems[ i ];
+
+ if ( elem || elem === 0 ) {
+
+ // Add nodes directly
+ if ( jQuery.type( elem ) === "object" ) {
+ jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
+
+ // Convert non-html into a text node
+ } else if ( !rhtml.test( elem ) ) {
+ nodes.push( context.createTextNode( elem ) );
+
+ // Convert html into DOM nodes
+ } else {
+ tmp = tmp || safe.appendChild( context.createElement("div") );
+
+ // Deserialize a standard representation
+ tag = (rtagName.exec( elem ) || [ "", "" ])[ 1 ].toLowerCase();
+ wrap = wrapMap[ tag ] || wrapMap._default;
+
+ tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];
+
+ // Descend through wrappers to the right content
+ j = wrap[0];
+ while ( j-- ) {
+ tmp = tmp.lastChild;
+ }
+
+ // Manually add leading whitespace removed by IE
+ if ( !support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
+ nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );
+ }
+
+ // Remove IE's autoinserted <tbody> from table fragments
+ if ( !support.tbody ) {
+
+ // String was a <table>, *may* have spurious <tbody>
+ elem = tag === "table" && !rtbody.test( elem ) ?
+ tmp.firstChild :
+
+ // String was a bare <thead> or <tfoot>
+ wrap[1] === "<table>" && !rtbody.test( elem ) ?
+ tmp :
+ 0;
+
+ j = elem && elem.childNodes.length;
+ while ( j-- ) {
+ if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) {
+ elem.removeChild( tbody );
+ }
+ }
+ }
+
+ jQuery.merge( nodes, tmp.childNodes );
+
+ // Fix #12392 for WebKit and IE > 9
+ tmp.textContent = "";
+
+ // Fix #12392 for oldIE
+ while ( tmp.firstChild ) {
+ tmp.removeChild( tmp.firstChild );
+ }
+
+ // Remember the top-level container for proper cleanup
+ tmp = safe.lastChild;
+ }
+ }
+ }
+
+ // Fix #11356: Clear elements from fragment
+ if ( tmp ) {
+ safe.removeChild( tmp );
+ }
+
+ // Reset defaultChecked for any radios and checkboxes
+ // about to be appended to the DOM in IE 6/7 (#8060)
+ if ( !support.appendChecked ) {
+ jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
+ }
+
+ i = 0;
+ while ( (elem = nodes[ i++ ]) ) {
+
+ // #4087 - If origin and destination elements are the same, and this is
+ // that element, do not do anything
+ if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
+ continue;
+ }
+
+ contains = jQuery.contains( elem.ownerDocument, elem );
+
+ // Append to fragment
+ tmp = getAll( safe.appendChild( elem ), "script" );
+
+ // Preserve script evaluation history
+ if ( contains ) {
+ setGlobalEval( tmp );
+ }
+
+ // Capture executables
+ if ( scripts ) {
+ j = 0;
+ while ( (elem = tmp[ j++ ]) ) {
+ if ( rscriptType.test( elem.type || "" ) ) {
+ scripts.push( elem );
+ }
+ }
+ }
+ }
+
+ tmp = null;
+
+ return safe;
+ },
+
+ cleanData: function( elems, /* internal */ acceptData ) {
+ var elem, type, id, data,
+ i = 0,
+ internalKey = jQuery.expando,
+ cache = jQuery.cache,
+ deleteExpando = support.deleteExpando,
+ special = jQuery.event.special;
+
+ for ( ; (elem = elems[i]) != null; i++ ) {
+ if ( acceptData || jQuery.acceptData( elem ) ) {
+
+ id = elem[ internalKey ];
+ data = id && cache[ id ];
+
+ if ( data ) {
+ if ( data.events ) {
+ for ( type in data.events ) {
+ if ( special[ type ] ) {
+ jQuery.event.remove( elem, type );
+
+ // This is a shortcut to avoid jQuery.event.remove's overhead
+ } else {
+ jQuery.removeEvent( elem, type, data.handle );
+ }
+ }
+ }
+
+ // Remove cache only if it was not already removed by jQuery.event.remove
+ if ( cache[ id ] ) {
+
+ delete cache[ id ];
+
+ // IE does not allow us to delete expando properties from nodes,
+ // nor does it have a removeAttribute function on Document nodes;
+ // we must handle all of these cases
+ if ( deleteExpando ) {
+ delete elem[ internalKey ];
+
+ } else if ( typeof elem.removeAttribute !== strundefined ) {
+ elem.removeAttribute( internalKey );
+
+ } else {
+ elem[ internalKey ] = null;
+ }
+
+ deletedIds.push( id );
+ }
+ }
+ }
+ }
+ }
+});
+
+jQuery.fn.extend({
+ text: function( value ) {
+ return access( this, function( value ) {
+ return value === undefined ?
+ jQuery.text( this ) :
+ this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
+ }, null, value, arguments.length );
+ },
+
+ append: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ var target = manipulationTarget( this, elem );
+ target.appendChild( elem );
+ }
+ });
+ },
+
+ prepend: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ var target = manipulationTarget( this, elem );
+ target.insertBefore( elem, target.firstChild );
+ }
+ });
+ },
+
+ before: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.parentNode ) {
+ this.parentNode.insertBefore( elem, this );
+ }
+ });
+ },
+
+ after: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.parentNode ) {
+ this.parentNode.insertBefore( elem, this.nextSibling );
+ }
+ });
+ },
+
+ remove: function( selector, keepData /* Internal Use Only */ ) {
+ var elem,
+ elems = selector ? jQuery.filter( selector, this ) : this,
+ i = 0;
+
+ for ( ; (elem = elems[i]) != null; i++ ) {
+
+ if ( !keepData && elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem ) );
+ }
+
+ if ( elem.parentNode ) {
+ if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
+ setGlobalEval( getAll( elem, "script" ) );
+ }
+ elem.parentNode.removeChild( elem );
+ }
+ }
+
+ return this;
+ },
+
+ empty: function() {
+ var elem,
+ i = 0;
+
+ for ( ; (elem = this[i]) != null; i++ ) {
+ // Remove element nodes and prevent memory leaks
+ if ( elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem, false ) );
+ }
+
+ // Remove any remaining nodes
+ while ( elem.firstChild ) {
+ elem.removeChild( elem.firstChild );
+ }
+
+ // If this is a select, ensure that it displays empty (#12336)
+ // Support: IE<9
+ if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
+ elem.options.length = 0;
+ }
+ }
+
+ return this;
+ },
+
+ clone: function( dataAndEvents, deepDataAndEvents ) {
+ dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+ deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+ return this.map(function() {
+ return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+ });
+ },
+
+ html: function( value ) {
+ return access( this, function( value ) {
+ var elem = this[ 0 ] || {},
+ i = 0,
+ l = this.length;
+
+ if ( value === undefined ) {
+ return elem.nodeType === 1 ?
+ elem.innerHTML.replace( rinlinejQuery, "" ) :
+ undefined;
+ }
+
+ // See if we can take a shortcut and just use innerHTML
+ if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
+ ( support.htmlSerialize || !rnoshimcache.test( value ) ) &&
+ ( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
+ !wrapMap[ (rtagName.exec( value ) || [ "", "" ])[ 1 ].toLowerCase() ] ) {
+
+ value = value.replace( rxhtmlTag, "<$1></$2>" );
+
+ try {
+ for (; i < l; i++ ) {
+ // Remove element nodes and prevent memory leaks
+ elem = this[i] || {};
+ if ( elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem, false ) );
+ elem.innerHTML = value;
+ }
+ }
+
+ elem = 0;
+
+ // If using innerHTML throws an exception, use the fallback method
+ } catch(e) {}
+ }
+
+ if ( elem ) {
+ this.empty().append( value );
+ }
+ }, null, value, arguments.length );
+ },
+
+ replaceWith: function() {
+ var arg = arguments[ 0 ];
+
+ // Make the changes, replacing each context element with the new content
+ this.domManip( arguments, function( elem ) {
+ arg = this.parentNode;
+
+ jQuery.cleanData( getAll( this ) );
+
+ if ( arg ) {
+ arg.replaceChild( elem, this );
+ }
+ });
+
+ // Force removal if there was no new content (e.g., from empty arguments)
+ return arg && (arg.length || arg.nodeType) ? this : this.remove();
+ },
+
+ detach: function( selector ) {
+ return this.remove( selector, true );
+ },
+
+ domManip: function( args, callback ) {
+
+ // Flatten any nested arrays
+ args = concat.apply( [], args );
+
+ var first, node, hasScripts,
+ scripts, doc, fragment,
+ i = 0,
+ l = this.length,
+ set = this,
+ iNoClone = l - 1,
+ value = args[0],
+ isFunction = jQuery.isFunction( value );
+
+ // We can't cloneNode fragments that contain checked, in WebKit
+ if ( isFunction ||
+ ( l > 1 && typeof value === "string" &&
+ !support.checkClone && rchecked.test( value ) ) ) {
+ return this.each(function( index ) {
+ var self = set.eq( index );
+ if ( isFunction ) {
+ args[0] = value.call( this, index, self.html() );
+ }
+ self.domManip( args, callback );
+ });
+ }
+
+ if ( l ) {
+ fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );
+ first = fragment.firstChild;
+
+ if ( fragment.childNodes.length === 1 ) {
+ fragment = first;
+ }
+
+ if ( first ) {
+ scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
+ hasScripts = scripts.length;
+
+ // Use the original fragment for the last item instead of the first because it can end up
+ // being emptied incorrectly in certain situations (#8070).
+ for ( ; i < l; i++ ) {
+ node = fragment;
+
+ if ( i !== iNoClone ) {
+ node = jQuery.clone( node, true, true );
+
+ // Keep references to cloned scripts for later restoration
+ if ( hasScripts ) {
+ jQuery.merge( scripts, getAll( node, "script" ) );
+ }
+ }
+
+ callback.call( this[i], node, i );
+ }
+
+ if ( hasScripts ) {
+ doc = scripts[ scripts.length - 1 ].ownerDocument;
+
+ // Reenable scripts
+ jQuery.map( scripts, restoreScript );
+
+ // Evaluate executable scripts on first document insertion
+ for ( i = 0; i < hasScripts; i++ ) {
+ node = scripts[ i ];
+ if ( rscriptType.test( node.type || "" ) &&
+ !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
+
+ if ( node.src ) {
+ // Optional AJAX dependency, but won't run scripts if not present
+ if ( jQuery._evalUrl ) {
+ jQuery._evalUrl( node.src );
+ }
+ } else {
+ jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
+ }
+ }
+ }
+ }
+
+ // Fix #11809: Avoid leaking memory
+ fragment = first = null;
+ }
+ }
+
+ return this;
+ }
+});
+
+jQuery.each({
+ appendTo: "append",
+ prependTo: "prepend",
+ insertBefore: "before",
+ insertAfter: "after",
+ replaceAll: "replaceWith"
+}, function( name, original ) {
+ jQuery.fn[ name ] = function( selector ) {
+ var elems,
+ i = 0,
+ ret = [],
+ insert = jQuery( selector ),
+ last = insert.length - 1;
+
+ for ( ; i <= last; i++ ) {
+ elems = i === last ? this : this.clone(true);
+ jQuery( insert[i] )[ original ]( elems );
+
+ // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
+ push.apply( ret, elems.get() );
+ }
+
+ return this.pushStack( ret );
+ };
+});
+
+
+var iframe,
+ elemdisplay = {};
+
+/**
+ * Retrieve the actual display of a element
+ * @param {String} name nodeName of the element
+ * @param {Object} doc Document object
+ */
+// Called only from within defaultDisplay
+function actualDisplay( name, doc ) {
+ var style,
+ elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
+
+ // getDefaultComputedStyle might be reliably used only on attached element
+ display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
+
+ // Use of this method is a temporary fix (more like optmization) until something better comes along,
+ // since it was removed from specification and supported only in FF
+ style.display : jQuery.css( elem[ 0 ], "display" );
+
+ // We don't have any data stored on the element,
+ // so use "detach" method as fast way to get rid of the element
+ elem.detach();
+
+ return display;
+}
+
+/**
+ * Try to determine the default display value of an element
+ * @param {String} nodeName
+ */
+function defaultDisplay( nodeName ) {
+ var doc = document,
+ display = elemdisplay[ nodeName ];
+
+ if ( !display ) {
+ display = actualDisplay( nodeName, doc );
+
+ // If the simple way fails, read from inside an iframe
+ if ( display === "none" || !display ) {
+
+ // Use the already-created iframe if possible
+ iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement );
+
+ // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
+ doc = ( iframe[ 0 ].contentWindow || iframe[ 0 ].contentDocument ).document;
+
+ // Support: IE
+ doc.write();
+ doc.close();
+
+ display = actualDisplay( nodeName, doc );
+ iframe.detach();
+ }
+
+ // Store the correct default display
+ elemdisplay[ nodeName ] = display;
+ }
+
+ return display;
+}
+
+
+(function() {
+ var shrinkWrapBlocksVal;
+
+ support.shrinkWrapBlocks = function() {
+ if ( shrinkWrapBlocksVal != null ) {
+ return shrinkWrapBlocksVal;
+ }
+
+ // Will be changed later if needed.
+ shrinkWrapBlocksVal = false;
+
+ // Minified: var b,c,d
+ var div, body, container;
+
+ body = document.getElementsByTagName( "body" )[ 0 ];
+ if ( !body || !body.style ) {
+ // Test fired too early or in an unsupported environment, exit.
+ return;
+ }
+
+ // Setup
+ div = document.createElement( "div" );
+ container = document.createElement( "div" );
+ container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
+ body.appendChild( container ).appendChild( div );
+
+ // Support: IE6
+ // Check if elements with layout shrink-wrap their children
+ if ( typeof div.style.zoom !== strundefined ) {
+ // Reset CSS: box-sizing; display; margin; border
+ div.style.cssText =
+ // Support: Firefox<29, Android 2.3
+ // Vendor-prefix box-sizing
+ "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
+ "box-sizing:content-box;display:block;margin:0;border:0;" +
+ "padding:1px;width:1px;zoom:1";
+ div.appendChild( document.createElement( "div" ) ).style.width = "5px";
+ shrinkWrapBlocksVal = div.offsetWidth !== 3;
+ }
+
+ body.removeChild( container );
+
+ return shrinkWrapBlocksVal;
+ };
+
+})();
+var rmargin = (/^margin/);
+
+var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
+
+
+
+var getStyles, curCSS,
+ rposition = /^(top|right|bottom|left)$/;
+
+if ( window.getComputedStyle ) {
+ getStyles = function( elem ) {
+ return elem.ownerDocument.defaultView.getComputedStyle( elem, null );
+ };
+
+ curCSS = function( elem, name, computed ) {
+ var width, minWidth, maxWidth, ret,
+ style = elem.style;
+
+ computed = computed || getStyles( elem );
+
+ // getPropertyValue is only needed for .css('filter') in IE9, see #12537
+ ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined;
+
+ if ( computed ) {
+
+ if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
+ ret = jQuery.style( elem, name );
+ }
+
+ // A tribute to the "awesome hack by Dean Edwards"
+ // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
+ // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
+ // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
+ if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
+
+ // Remember the original values
+ width = style.width;
+ minWidth = style.minWidth;
+ maxWidth = style.maxWidth;
+
+ // Put in the new values to get a computed value out
+ style.minWidth = style.maxWidth = style.width = ret;
+ ret = computed.width;
+
+ // Revert the changed values
+ style.width = width;
+ style.minWidth = minWidth;
+ style.maxWidth = maxWidth;
+ }
+ }
+
+ // Support: IE
+ // IE returns zIndex value as an integer.
+ return ret === undefined ?
+ ret :
+ ret + "";
+ };
+} else if ( document.documentElement.currentStyle ) {
+ getStyles = function( elem ) {
+ return elem.currentStyle;
+ };
+
+ curCSS = function( elem, name, computed ) {
+ var left, rs, rsLeft, ret,
+ style = elem.style;
+
+ computed = computed || getStyles( elem );
+ ret = computed ? computed[ name ] : undefined;
+
+ // Avoid setting ret to empty string here
+ // so we don't default to auto
+ if ( ret == null && style && style[ name ] ) {
+ ret = style[ name ];
+ }
+
+ // From the awesome hack by Dean Edwards
+ // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+ // If we're not dealing with a regular pixel number
+ // but a number that has a weird ending, we need to convert it to pixels
+ // but not position css attributes, as those are proportional to the parent element instead
+ // and we can't measure the parent instead because it might trigger a "stacking dolls" problem
+ if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
+
+ // Remember the original values
+ left = style.left;
+ rs = elem.runtimeStyle;
+ rsLeft = rs && rs.left;
+
+ // Put in the new values to get a computed value out
+ if ( rsLeft ) {
+ rs.left = elem.currentStyle.left;
+ }
+ style.left = name === "fontSize" ? "1em" : ret;
+ ret = style.pixelLeft + "px";
+
+ // Revert the changed values
+ style.left = left;
+ if ( rsLeft ) {
+ rs.left = rsLeft;
+ }
+ }
+
+ // Support: IE
+ // IE returns zIndex value as an integer.
+ return ret === undefined ?
+ ret :
+ ret + "" || "auto";
+ };
+}
+
+
+
+
+function addGetHookIf( conditionFn, hookFn ) {
+ // Define the hook, we'll check on the first run if it's really needed.
+ return {
+ get: function() {
+ var condition = conditionFn();
+
+ if ( condition == null ) {
+ // The test was not ready at this point; screw the hook this time
+ // but check again when needed next time.
+ return;
+ }
+
+ if ( condition ) {
+ // Hook not needed (or it's not possible to use it due to missing dependency),
+ // remove it.
+ // Since there are no other hooks for marginRight, remove the whole object.
+ delete this.get;
+ return;
+ }
+
+ // Hook needed; redefine it so that the support test is not executed again.
+
+ return (this.get = hookFn).apply( this, arguments );
+ }
+ };
+}
+
+
+(function() {
+ // Minified: var b,c,d,e,f,g, h,i
+ var div, style, a, pixelPositionVal, boxSizingReliableVal,
+ reliableHiddenOffsetsVal, reliableMarginRightVal;
+
+ // Setup
+ div = document.createElement( "div" );
+ div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
+ a = div.getElementsByTagName( "a" )[ 0 ];
+ style = a && a.style;
+
+ // Finish early in limited (non-browser) environments
+ if ( !style ) {
+ return;
+ }
+
+ style.cssText = "float:left;opacity:.5";
+
+ // Support: IE<9
+ // Make sure that element opacity exists (as opposed to filter)
+ support.opacity = style.opacity === "0.5";
+
+ // Verify style float existence
+ // (IE uses styleFloat instead of cssFloat)
+ support.cssFloat = !!style.cssFloat;
+
+ div.style.backgroundClip = "content-box";
+ div.cloneNode( true ).style.backgroundClip = "";
+ support.clearCloneStyle = div.style.backgroundClip === "content-box";
+
+ // Support: Firefox<29, Android 2.3
+ // Vendor-prefix box-sizing
+ support.boxSizing = style.boxSizing === "" || style.MozBoxSizing === "" ||
+ style.WebkitBoxSizing === "";
+
+ jQuery.extend(support, {
+ reliableHiddenOffsets: function() {
+ if ( reliableHiddenOffsetsVal == null ) {
+ computeStyleTests();
+ }
+ return reliableHiddenOffsetsVal;
+ },
+
+ boxSizingReliable: function() {
+ if ( boxSizingReliableVal == null ) {
+ computeStyleTests();
+ }
+ return boxSizingReliableVal;
+ },
+
+ pixelPosition: function() {
+ if ( pixelPositionVal == null ) {
+ computeStyleTests();
+ }
+ return pixelPositionVal;
+ },
+
+ // Support: Android 2.3
+ reliableMarginRight: function() {
+ if ( reliableMarginRightVal == null ) {
+ computeStyleTests();
+ }
+ return reliableMarginRightVal;
+ }
+ });
+
+ function computeStyleTests() {
+ // Minified: var b,c,d,j
+ var div, body, container, contents;
+
+ body = document.getElementsByTagName( "body" )[ 0 ];
+ if ( !body || !body.style ) {
+ // Test fired too early or in an unsupported environment, exit.
+ return;
+ }
+
+ // Setup
+ div = document.createElement( "div" );
+ container = document.createElement( "div" );
+ container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
+ body.appendChild( container ).appendChild( div );
+
+ div.style.cssText =
+ // Support: Firefox<29, Android 2.3
+ // Vendor-prefix box-sizing
+ "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" +
+ "box-sizing:border-box;display:block;margin-top:1%;top:1%;" +
+ "border:1px;padding:1px;width:4px;position:absolute";
+
+ // Support: IE<9
+ // Assume reasonable values in the absence of getComputedStyle
+ pixelPositionVal = boxSizingReliableVal = false;
+ reliableMarginRightVal = true;
+
+ // Check for getComputedStyle so that this code is not run in IE<9.
+ if ( window.getComputedStyle ) {
+ pixelPositionVal = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
+ boxSizingReliableVal =
+ ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
+
+ // Support: Android 2.3
+ // Div with explicit width and no margin-right incorrectly
+ // gets computed margin-right based on width of container (#3333)
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ contents = div.appendChild( document.createElement( "div" ) );
+
+ // Reset CSS: box-sizing; display; margin; border; padding
+ contents.style.cssText = div.style.cssText =
+ // Support: Firefox<29, Android 2.3
+ // Vendor-prefix box-sizing
+ "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
+ "box-sizing:content-box;display:block;margin:0;border:0;padding:0";
+ contents.style.marginRight = contents.style.width = "0";
+ div.style.width = "1px";
+
+ reliableMarginRightVal =
+ !parseFloat( ( window.getComputedStyle( contents, null ) || {} ).marginRight );
+ }
+
+ // Support: IE8
+ // Check if table cells still have offsetWidth/Height when they are set
+ // to display:none and there are still other visible table cells in a
+ // table row; if so, offsetWidth/Height are not reliable for use when
+ // determining if an element has been hidden directly using
+ // display:none (it is still safe to use offsets if a parent element is
+ // hidden; don safety goggles and see bug #4512 for more information).
+ div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
+ contents = div.getElementsByTagName( "td" );
+ contents[ 0 ].style.cssText = "margin:0;border:0;padding:0;display:none";
+ reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;
+ if ( reliableHiddenOffsetsVal ) {
+ contents[ 0 ].style.display = "";
+ contents[ 1 ].style.display = "none";
+ reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;
+ }
+
+ body.removeChild( container );
+ }
+
+})();
+
+
+// A method for quickly swapping in/out CSS properties to get correct calculations.
+jQuery.swap = function( elem, options, callback, args ) {
+ var ret, name,
+ old = {};
+
+ // Remember the old values, and insert the new ones
+ for ( name in options ) {
+ old[ name ] = elem.style[ name ];
+ elem.style[ name ] = options[ name ];
+ }
+
+ ret = callback.apply( elem, args || [] );
+
+ // Revert the old values
+ for ( name in options ) {
+ elem.style[ name ] = old[ name ];
+ }
+
+ return ret;
+};
+
+
+var
+ ralpha = /alpha\([^)]*\)/i,
+ ropacity = /opacity\s*=\s*([^)]*)/,
+
+ // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
+ // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
+ rdisplayswap = /^(none|table(?!-c[ea]).+)/,
+ rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ),
+ rrelNum = new RegExp( "^([+-])=(" + pnum + ")", "i" ),
+
+ cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+ cssNormalTransform = {
+ letterSpacing: "0",
+ fontWeight: "400"
+ },
+
+ cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
+
+
+// return a css property mapped to a potentially vendor prefixed property
+function vendorPropName( style, name ) {
+
+ // shortcut for names that are not vendor prefixed
+ if ( name in style ) {
+ return name;
+ }
+
+ // check for vendor prefixed names
+ var capName = name.charAt(0).toUpperCase() + name.slice(1),
+ origName = name,
+ i = cssPrefixes.length;
+
+ while ( i-- ) {
+ name = cssPrefixes[ i ] + capName;
+ if ( name in style ) {
+ return name;
+ }
+ }
+
+ return origName;
+}
+
+function showHide( elements, show ) {
+ var display, elem, hidden,
+ values = [],
+ index = 0,
+ length = elements.length;
+
+ for ( ; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+
+ values[ index ] = jQuery._data( elem, "olddisplay" );
+ display = elem.style.display;
+ if ( show ) {
+ // Reset the inline display of this element to learn if it is
+ // being hidden by cascaded rules or not
+ if ( !values[ index ] && display === "none" ) {
+ elem.style.display = "";
+ }
+
+ // Set elements which have been overridden with display: none
+ // in a stylesheet to whatever the default browser style is
+ // for such an element
+ if ( elem.style.display === "" && isHidden( elem ) ) {
+ values[ index ] = jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) );
+ }
+ } else {
+ hidden = isHidden( elem );
+
+ if ( display && display !== "none" || !hidden ) {
+ jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
+ }
+ }
+ }
+
+ // Set the display of most of the elements in a second loop
+ // to avoid the constant reflow
+ for ( index = 0; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+ if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
+ elem.style.display = show ? values[ index ] || "" : "none";
+ }
+ }
+
+ return elements;
+}
+
+function setPositiveNumber( elem, value, subtract ) {
+ var matches = rnumsplit.exec( value );
+ return matches ?
+ // Guard against undefined "subtract", e.g., when used as in cssHooks
+ Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
+ value;
+}
+
+function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
+ var i = extra === ( isBorderBox ? "border" : "content" ) ?
+ // If we already have the right measurement, avoid augmentation
+ 4 :
+ // Otherwise initialize for horizontal or vertical properties
+ name === "width" ? 1 : 0,
+
+ val = 0;
+
+ for ( ; i < 4; i += 2 ) {
+ // both box models exclude margin, so add it if we want it
+ if ( extra === "margin" ) {
+ val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
+ }
+
+ if ( isBorderBox ) {
+ // border-box includes padding, so remove it if we want content
+ if ( extra === "content" ) {
+ val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+ }
+
+ // at this point, extra isn't border nor margin, so remove border
+ if ( extra !== "margin" ) {
+ val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+ }
+ } else {
+ // at this point, extra isn't content, so add padding
+ val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+
+ // at this point, extra isn't content nor padding, so add border
+ if ( extra !== "padding" ) {
+ val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+ }
+ }
+ }
+
+ return val;
+}
+
+function getWidthOrHeight( elem, name, extra ) {
+
+ // Start with offset property, which is equivalent to the border-box value
+ var valueIsBorderBox = true,
+ val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+ styles = getStyles( elem ),
+ isBorderBox = support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
+
+ // some non-html elements return undefined for offsetWidth, so check for null/undefined
+ // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
+ // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
+ if ( val <= 0 || val == null ) {
+ // Fall back to computed then uncomputed css if necessary
+ val = curCSS( elem, name, styles );
+ if ( val < 0 || val == null ) {
+ val = elem.style[ name ];
+ }
+
+ // Computed unit is not pixels. Stop here and return.
+ if ( rnumnonpx.test(val) ) {
+ return val;
+ }
+
+ // we need the check for style in case a browser which returns unreliable values
+ // for getComputedStyle silently falls back to the reliable elem.style
+ valueIsBorderBox = isBorderBox && ( support.boxSizingReliable() || val === elem.style[ name ] );
+
+ // Normalize "", auto, and prepare for extra
+ val = parseFloat( val ) || 0;
+ }
+
+ // use the active box-sizing model to add/subtract irrelevant styles
+ return ( val +
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra || ( isBorderBox ? "border" : "content" ),
+ valueIsBorderBox,
+ styles
+ )
+ ) + "px";
+}
+
+jQuery.extend({
+ // Add in style property hooks for overriding the default
+ // behavior of getting and setting a style property
+ cssHooks: {
+ opacity: {
+ get: function( elem, computed ) {
+ if ( computed ) {
+ // We should always get a number back from opacity
+ var ret = curCSS( elem, "opacity" );
+ return ret === "" ? "1" : ret;
+ }
+ }
+ }
+ },
+
+ // Don't automatically add "px" to these possibly-unitless properties
+ cssNumber: {
+ "columnCount": true,
+ "fillOpacity": true,
+ "flexGrow": true,
+ "flexShrink": true,
+ "fontWeight": true,
+ "lineHeight": true,
+ "opacity": true,
+ "order": true,
+ "orphans": true,
+ "widows": true,
+ "zIndex": true,
+ "zoom": true
+ },
+
+ // Add in properties whose names you wish to fix before
+ // setting or getting the value
+ cssProps: {
+ // normalize float css property
+ "float": support.cssFloat ? "cssFloat" : "styleFloat"
+ },
+
+ // Get and set the style property on a DOM Node
+ style: function( elem, name, value, extra ) {
+ // Don't set styles on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+ return;
+ }
+
+ // Make sure that we're working with the right name
+ var ret, type, hooks,
+ origName = jQuery.camelCase( name ),
+ style = elem.style;
+
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
+
+ // gets hook for the prefixed version
+ // followed by the unprefixed version
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // Check if we're setting a value
+ if ( value !== undefined ) {
+ type = typeof value;
+
+ // convert relative number strings (+= or -=) to relative numbers. #7345
+ if ( type === "string" && (ret = rrelNum.exec( value )) ) {
+ value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
+ // Fixes bug #9237
+ type = "number";
+ }
+
+ // Make sure that null and NaN values aren't set. See: #7116
+ if ( value == null || value !== value ) {
+ return;
+ }
+
+ // If a number was passed in, add 'px' to the (except for certain CSS properties)
+ if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
+ value += "px";
+ }
+
+ // Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
+ // but it would mean to define eight (for every problematic property) identical functions
+ if ( !support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {
+ style[ name ] = "inherit";
+ }
+
+ // If a hook was provided, use that value, otherwise just set the specified value
+ if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
+
+ // Support: IE
+ // Swallow errors from 'invalid' CSS values (#5509)
+ try {
+ style[ name ] = value;
+ } catch(e) {}
+ }
+
+ } else {
+ // If a hook was provided get the non-computed value from there
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+ return ret;
+ }
+
+ // Otherwise just get the value from the style object
+ return style[ name ];
+ }
+ },
+
+ css: function( elem, name, extra, styles ) {
+ var num, val, hooks,
+ origName = jQuery.camelCase( name );
+
+ // Make sure that we're working with the right name
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
+
+ // gets hook for the prefixed version
+ // followed by the unprefixed version
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // If a hook was provided get the computed value from there
+ if ( hooks && "get" in hooks ) {
+ val = hooks.get( elem, true, extra );
+ }
+
+ // Otherwise, if a way to get the computed value exists, use that
+ if ( val === undefined ) {
+ val = curCSS( elem, name, styles );
+ }
+
+ //convert "normal" to computed value
+ if ( val === "normal" && name in cssNormalTransform ) {
+ val = cssNormalTransform[ name ];
+ }
+
+ // Return, converting to number if forced or a qualifier was provided and val looks numeric
+ if ( extra === "" || extra ) {
+ num = parseFloat( val );
+ return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
+ }
+ return val;
+ }
+});
+
+jQuery.each([ "height", "width" ], function( i, name ) {
+ jQuery.cssHooks[ name ] = {
+ get: function( elem, computed, extra ) {
+ if ( computed ) {
+ // certain elements can have dimension info if we invisibly show them
+ // however, it must have a current display style that would benefit from this
+ return rdisplayswap.test( jQuery.css( elem, "display" ) ) && elem.offsetWidth === 0 ?
+ jQuery.swap( elem, cssShow, function() {
+ return getWidthOrHeight( elem, name, extra );
+ }) :
+ getWidthOrHeight( elem, name, extra );
+ }
+ },
+
+ set: function( elem, value, extra ) {
+ var styles = extra && getStyles( elem );
+ return setPositiveNumber( elem, value, extra ?
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra,
+ support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
+ styles
+ ) : 0
+ );
+ }
+ };
+});
+
+if ( !support.opacity ) {
+ jQuery.cssHooks.opacity = {
+ get: function( elem, computed ) {
+ // IE uses filters for opacity
+ return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
+ ( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
+ computed ? "1" : "";
+ },
+
+ set: function( elem, value ) {
+ var style = elem.style,
+ currentStyle = elem.currentStyle,
+ opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
+ filter = currentStyle && currentStyle.filter || style.filter || "";
+
+ // IE has trouble with opacity if it does not have layout
+ // Force it by setting the zoom level
+ style.zoom = 1;
+
+ // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
+ // if value === "", then remove inline opacity #12685
+ if ( ( value >= 1 || value === "" ) &&
+ jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
+ style.removeAttribute ) {
+
+ // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
+ // if "filter:" is present at all, clearType is disabled, we want to avoid this
+ // style.removeAttribute is IE Only, but so apparently is this code path...
+ style.removeAttribute( "filter" );
+
+ // if there is no filter style applied in a css rule or unset inline opacity, we are done
+ if ( value === "" || currentStyle && !currentStyle.filter ) {
+ return;
+ }
+ }
+
+ // otherwise, set new filter values
+ style.filter = ralpha.test( filter ) ?
+ filter.replace( ralpha, opacity ) :
+ filter + " " + opacity;
+ }
+ };
+}
+
+jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
+ function( elem, computed ) {
+ if ( computed ) {
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ // Work around by temporarily setting element display to inline-block
+ return jQuery.swap( elem, { "display": "inline-block" },
+ curCSS, [ elem, "marginRight" ] );
+ }
+ }
+);
+
+// These hooks are used by animate to expand properties
+jQuery.each({
+ margin: "",
+ padding: "",
+ border: "Width"
+}, function( prefix, suffix ) {
+ jQuery.cssHooks[ prefix + suffix ] = {
+ expand: function( value ) {
+ var i = 0,
+ expanded = {},
+
+ // assumes a single number if not a string
+ parts = typeof value === "string" ? value.split(" ") : [ value ];
+
+ for ( ; i < 4; i++ ) {
+ expanded[ prefix + cssExpand[ i ] + suffix ] =
+ parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
+ }
+
+ return expanded;
+ }
+ };
+
+ if ( !rmargin.test( prefix ) ) {
+ jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
+ }
+});
+
+jQuery.fn.extend({
+ css: function( name, value ) {
+ return access( this, function( elem, name, value ) {
+ var styles, len,
+ map = {},
+ i = 0;
+
+ if ( jQuery.isArray( name ) ) {
+ styles = getStyles( elem );
+ len = name.length;
+
+ for ( ; i < len; i++ ) {
+ map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
+ }
+
+ return map;
+ }
+
+ return value !== undefined ?
+ jQuery.style( elem, name, value ) :
+ jQuery.css( elem, name );
+ }, name, value, arguments.length > 1 );
+ },
+ show: function() {
+ return showHide( this, true );
+ },
+ hide: function() {
+ return showHide( this );
+ },
+ toggle: function( state ) {
+ if ( typeof state === "boolean" ) {
+ return state ? this.show() : this.hide();
+ }
+
+ return this.each(function() {
+ if ( isHidden( this ) ) {
+ jQuery( this ).show();
+ } else {
+ jQuery( this ).hide();
+ }
+ });
+ }
+});
+
+
+function Tween( elem, options, prop, end, easing ) {
+ return new Tween.prototype.init( elem, options, prop, end, easing );
+}
+jQuery.Tween = Tween;
+
+Tween.prototype = {
+ constructor: Tween,
+ init: function( elem, options, prop, end, easing, unit ) {
+ this.elem = elem;
+ this.prop = prop;
+ this.easing = easing || "swing";
+ this.options = options;
+ this.start = this.now = this.cur();
+ this.end = end;
+ this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
+ },
+ cur: function() {
+ var hooks = Tween.propHooks[ this.prop ];
+
+ return hooks && hooks.get ?
+ hooks.get( this ) :
+ Tween.propHooks._default.get( this );
+ },
+ run: function( percent ) {
+ var eased,
+ hooks = Tween.propHooks[ this.prop ];
+
+ if ( this.options.duration ) {
+ this.pos = eased = jQuery.easing[ this.easing ](
+ percent, this.options.duration * percent, 0, 1, this.options.duration
+ );
+ } else {
+ this.pos = eased = percent;
+ }
+ this.now = ( this.end - this.start ) * eased + this.start;
+
+ if ( this.options.step ) {
+ this.options.step.call( this.elem, this.now, this );
+ }
+
+ if ( hooks && hooks.set ) {
+ hooks.set( this );
+ } else {
+ Tween.propHooks._default.set( this );
+ }
+ return this;
+ }
+};
+
+Tween.prototype.init.prototype = Tween.prototype;
+
+Tween.propHooks = {
+ _default: {
+ get: function( tween ) {
+ var result;
+
+ if ( tween.elem[ tween.prop ] != null &&
+ (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
+ return tween.elem[ tween.prop ];
+ }
+
+ // passing an empty string as a 3rd parameter to .css will automatically
+ // attempt a parseFloat and fallback to a string if the parse fails
+ // so, simple values such as "10px" are parsed to Float.
+ // complex values such as "rotate(1rad)" are returned as is.
+ result = jQuery.css( tween.elem, tween.prop, "" );
+ // Empty strings, null, undefined and "auto" are converted to 0.
+ return !result || result === "auto" ? 0 : result;
+ },
+ set: function( tween ) {
+ // use step hook for back compat - use cssHook if its there - use .style if its
+ // available and use plain properties where available
+ if ( jQuery.fx.step[ tween.prop ] ) {
+ jQuery.fx.step[ tween.prop ]( tween );
+ } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
+ jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
+ } else {
+ tween.elem[ tween.prop ] = tween.now;
+ }
+ }
+ }
+};
+
+// Support: IE <=9
+// Panic based approach to setting things on disconnected nodes
+
+Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
+ set: function( tween ) {
+ if ( tween.elem.nodeType && tween.elem.parentNode ) {
+ tween.elem[ tween.prop ] = tween.now;
+ }
+ }
+};
+
+jQuery.easing = {
+ linear: function( p ) {
+ return p;
+ },
+ swing: function( p ) {
+ return 0.5 - Math.cos( p * Math.PI ) / 2;
+ }
+};
+
+jQuery.fx = Tween.prototype.init;
+
+// Back Compat <1.8 extension point
+jQuery.fx.step = {};
+
+
+
+
+var
+ fxNow, timerId,
+ rfxtypes = /^(?:toggle|show|hide)$/,
+ rfxnum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ),
+ rrun = /queueHooks$/,
+ animationPrefilters = [ defaultPrefilter ],
+ tweeners = {
+ "*": [ function( prop, value ) {
+ var tween = this.createTween( prop, value ),
+ target = tween.cur(),
+ parts = rfxnum.exec( value ),
+ unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
+
+ // Starting value computation is required for potential unit mismatches
+ start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&
+ rfxnum.exec( jQuery.css( tween.elem, prop ) ),
+ scale = 1,
+ maxIterations = 20;
+
+ if ( start && start[ 3 ] !== unit ) {
+ // Trust units reported by jQuery.css
+ unit = unit || start[ 3 ];
+
+ // Make sure we update the tween properties later on
+ parts = parts || [];
+
+ // Iteratively approximate from a nonzero starting point
+ start = +target || 1;
+
+ do {
+ // If previous iteration zeroed out, double until we get *something*
+ // Use a string for doubling factor so we don't accidentally see scale as unchanged below
+ scale = scale || ".5";
+
+ // Adjust and apply
+ start = start / scale;
+ jQuery.style( tween.elem, prop, start + unit );
+
+ // Update scale, tolerating zero or NaN from tween.cur()
+ // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
+ } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
+ }
+
+ // Update tween properties
+ if ( parts ) {
+ start = tween.start = +start || +target || 0;
+ tween.unit = unit;
+ // If a +=/-= token was provided, we're doing a relative animation
+ tween.end = parts[ 1 ] ?
+ start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
+ +parts[ 2 ];
+ }
+
+ return tween;
+ } ]
+ };
+
+// Animations created synchronously will run synchronously
+function createFxNow() {
+ setTimeout(function() {
+ fxNow = undefined;
+ });
+ return ( fxNow = jQuery.now() );
+}
+
+// Generate parameters to create a standard animation
+function genFx( type, includeWidth ) {
+ var which,
+ attrs = { height: type },
+ i = 0;
+
+ // if we include width, step value is 1 to do all cssExpand values,
+ // if we don't include width, step value is 2 to skip over Left and Right
+ includeWidth = includeWidth ? 1 : 0;
+ for ( ; i < 4 ; i += 2 - includeWidth ) {
+ which = cssExpand[ i ];
+ attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
+ }
+
+ if ( includeWidth ) {
+ attrs.opacity = attrs.width = type;
+ }
+
+ return attrs;
+}
+
+function createTween( value, prop, animation ) {
+ var tween,
+ collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
+ index = 0,
+ length = collection.length;
+ for ( ; index < length; index++ ) {
+ if ( (tween = collection[ index ].call( animation, prop, value )) ) {
+
+ // we're done with this property
+ return tween;
+ }
+ }
+}
+
+function defaultPrefilter( elem, props, opts ) {
+ /* jshint validthis: true */
+ var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
+ anim = this,
+ orig = {},
+ style = elem.style,
+ hidden = elem.nodeType && isHidden( elem ),
+ dataShow = jQuery._data( elem, "fxshow" );
+
+ // handle queue: false promises
+ if ( !opts.queue ) {
+ hooks = jQuery._queueHooks( elem, "fx" );
+ if ( hooks.unqueued == null ) {
+ hooks.unqueued = 0;
+ oldfire = hooks.empty.fire;
+ hooks.empty.fire = function() {
+ if ( !hooks.unqueued ) {
+ oldfire();
+ }
+ };
+ }
+ hooks.unqueued++;
+
+ anim.always(function() {
+ // doing this makes sure that the complete handler will be called
+ // before this completes
+ anim.always(function() {
+ hooks.unqueued--;
+ if ( !jQuery.queue( elem, "fx" ).length ) {
+ hooks.empty.fire();
+ }
+ });
+ });
+ }
+
+ // height/width overflow pass
+ if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
+ // Make sure that nothing sneaks out
+ // Record all 3 overflow attributes because IE does not
+ // change the overflow attribute when overflowX and
+ // overflowY are set to the same value
+ opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
+
+ // Set display property to inline-block for height/width
+ // animations on inline elements that are having width/height animated
+ display = jQuery.css( elem, "display" );
+
+ // Test default display if display is currently "none"
+ checkDisplay = display === "none" ?
+ jQuery._data( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;
+
+ if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {
+
+ // inline-level elements accept inline-block;
+ // block-level elements need to be inline with layout
+ if ( !support.inlineBlockNeedsLayout || defaultDisplay( elem.nodeName ) === "inline" ) {
+ style.display = "inline-block";
+ } else {
+ style.zoom = 1;
+ }
+ }
+ }
+
+ if ( opts.overflow ) {
+ style.overflow = "hidden";
+ if ( !support.shrinkWrapBlocks() ) {
+ anim.always(function() {
+ style.overflow = opts.overflow[ 0 ];
+ style.overflowX = opts.overflow[ 1 ];
+ style.overflowY = opts.overflow[ 2 ];
+ });
+ }
+ }
+
+ // show/hide pass
+ for ( prop in props ) {
+ value = props[ prop ];
+ if ( rfxtypes.exec( value ) ) {
+ delete props[ prop ];
+ toggle = toggle || value === "toggle";
+ if ( value === ( hidden ? "hide" : "show" ) ) {
+
+ // If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden
+ if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
+ hidden = true;
+ } else {
+ continue;
+ }
+ }
+ orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
+
+ // Any non-fx value stops us from restoring the original display value
+ } else {
+ display = undefined;
+ }
+ }
+
+ if ( !jQuery.isEmptyObject( orig ) ) {
+ if ( dataShow ) {
+ if ( "hidden" in dataShow ) {
+ hidden = dataShow.hidden;
+ }
+ } else {
+ dataShow = jQuery._data( elem, "fxshow", {} );
+ }
+
+ // store state if its toggle - enables .stop().toggle() to "reverse"
+ if ( toggle ) {
+ dataShow.hidden = !hidden;
+ }
+ if ( hidden ) {
+ jQuery( elem ).show();
+ } else {
+ anim.done(function() {
+ jQuery( elem ).hide();
+ });
+ }
+ anim.done(function() {
+ var prop;
+ jQuery._removeData( elem, "fxshow" );
+ for ( prop in orig ) {
+ jQuery.style( elem, prop, orig[ prop ] );
+ }
+ });
+ for ( prop in orig ) {
+ tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
+
+ if ( !( prop in dataShow ) ) {
+ dataShow[ prop ] = tween.start;
+ if ( hidden ) {
+ tween.end = tween.start;
+ tween.start = prop === "width" || prop === "height" ? 1 : 0;
+ }
+ }
+ }
+
+ // If this is a noop like .hide().hide(), restore an overwritten display value
+ } else if ( (display === "none" ? defaultDisplay( elem.nodeName ) : display) === "inline" ) {
+ style.display = display;
+ }
+}
+
+function propFilter( props, specialEasing ) {
+ var index, name, easing, value, hooks;
+
+ // camelCase, specialEasing and expand cssHook pass
+ for ( index in props ) {
+ name = jQuery.camelCase( index );
+ easing = specialEasing[ name ];
+ value = props[ index ];
+ if ( jQuery.isArray( value ) ) {
+ easing = value[ 1 ];
+ value = props[ index ] = value[ 0 ];
+ }
+
+ if ( index !== name ) {
+ props[ name ] = value;
+ delete props[ index ];
+ }
+
+ hooks = jQuery.cssHooks[ name ];
+ if ( hooks && "expand" in hooks ) {
+ value = hooks.expand( value );
+ delete props[ name ];
+
+ // not quite $.extend, this wont overwrite keys already present.
+ // also - reusing 'index' from above because we have the correct "name"
+ for ( index in value ) {
+ if ( !( index in props ) ) {
+ props[ index ] = value[ index ];
+ specialEasing[ index ] = easing;
+ }
+ }
+ } else {
+ specialEasing[ name ] = easing;
+ }
+ }
+}
+
+function Animation( elem, properties, options ) {
+ var result,
+ stopped,
+ index = 0,
+ length = animationPrefilters.length,
+ deferred = jQuery.Deferred().always( function() {
+ // don't match elem in the :animated selector
+ delete tick.elem;
+ }),
+ tick = function() {
+ if ( stopped ) {
+ return false;
+ }
+ var currentTime = fxNow || createFxNow(),
+ remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
+ // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
+ temp = remaining / animation.duration || 0,
+ percent = 1 - temp,
+ index = 0,
+ length = animation.tweens.length;
+
+ for ( ; index < length ; index++ ) {
+ animation.tweens[ index ].run( percent );
+ }
+
+ deferred.notifyWith( elem, [ animation, percent, remaining ]);
+
+ if ( percent < 1 && length ) {
+ return remaining;
+ } else {
+ deferred.resolveWith( elem, [ animation ] );
+ return false;
+ }
+ },
+ animation = deferred.promise({
+ elem: elem,
+ props: jQuery.extend( {}, properties ),
+ opts: jQuery.extend( true, { specialEasing: {} }, options ),
+ originalProperties: properties,
+ originalOptions: options,
+ startTime: fxNow || createFxNow(),
+ duration: options.duration,
+ tweens: [],
+ createTween: function( prop, end ) {
+ var tween = jQuery.Tween( elem, animation.opts, prop, end,
+ animation.opts.specialEasing[ prop ] || animation.opts.easing );
+ animation.tweens.push( tween );
+ return tween;
+ },
+ stop: function( gotoEnd ) {
+ var index = 0,
+ // if we are going to the end, we want to run all the tweens
+ // otherwise we skip this part
+ length = gotoEnd ? animation.tweens.length : 0;
+ if ( stopped ) {
+ return this;
+ }
+ stopped = true;
+ for ( ; index < length ; index++ ) {
+ animation.tweens[ index ].run( 1 );
+ }
+
+ // resolve when we played the last frame
+ // otherwise, reject
+ if ( gotoEnd ) {
+ deferred.resolveWith( elem, [ animation, gotoEnd ] );
+ } else {
+ deferred.rejectWith( elem, [ animation, gotoEnd ] );
+ }
+ return this;
+ }
+ }),
+ props = animation.props;
+
+ propFilter( props, animation.opts.specialEasing );
+
+ for ( ; index < length ; index++ ) {
+ result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
+ if ( result ) {
+ return result;
+ }
+ }
+
+ jQuery.map( props, createTween, animation );
+
+ if ( jQuery.isFunction( animation.opts.start ) ) {
+ animation.opts.start.call( elem, animation );
+ }
+
+ jQuery.fx.timer(
+ jQuery.extend( tick, {
+ elem: elem,
+ anim: animation,
+ queue: animation.opts.queue
+ })
+ );
+
+ // attach callbacks from options
+ return animation.progress( animation.opts.progress )
+ .done( animation.opts.done, animation.opts.complete )
+ .fail( animation.opts.fail )
+ .always( animation.opts.always );
+}
+
+jQuery.Animation = jQuery.extend( Animation, {
+ tweener: function( props, callback ) {
+ if ( jQuery.isFunction( props ) ) {
+ callback = props;
+ props = [ "*" ];
+ } else {
+ props = props.split(" ");
+ }
+
+ var prop,
+ index = 0,
+ length = props.length;
+
+ for ( ; index < length ; index++ ) {
+ prop = props[ index ];
+ tweeners[ prop ] = tweeners[ prop ] || [];
+ tweeners[ prop ].unshift( callback );
+ }
+ },
+
+ prefilter: function( callback, prepend ) {
+ if ( prepend ) {
+ animationPrefilters.unshift( callback );
+ } else {
+ animationPrefilters.push( callback );
+ }
+ }
+});
+
+jQuery.speed = function( speed, easing, fn ) {
+ var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
+ complete: fn || !fn && easing ||
+ jQuery.isFunction( speed ) && speed,
+ duration: speed,
+ easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
+ };
+
+ opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
+ opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
+
+ // normalize opt.queue - true/undefined/null -> "fx"
+ if ( opt.queue == null || opt.queue === true ) {
+ opt.queue = "fx";
+ }
+
+ // Queueing
+ opt.old = opt.complete;
+
+ opt.complete = function() {
+ if ( jQuery.isFunction( opt.old ) ) {
+ opt.old.call( this );
+ }
+
+ if ( opt.queue ) {
+ jQuery.dequeue( this, opt.queue );
+ }
+ };
+
+ return opt;
+};
+
+jQuery.fn.extend({
+ fadeTo: function( speed, to, easing, callback ) {
+
+ // show any hidden elements after setting opacity to 0
+ return this.filter( isHidden ).css( "opacity", 0 ).show()
+
+ // animate to the value specified
+ .end().animate({ opacity: to }, speed, easing, callback );
+ },
+ animate: function( prop, speed, easing, callback ) {
+ var empty = jQuery.isEmptyObject( prop ),
+ optall = jQuery.speed( speed, easing, callback ),
+ doAnimation = function() {
+ // Operate on a copy of prop so per-property easing won't be lost
+ var anim = Animation( this, jQuery.extend( {}, prop ), optall );
+
+ // Empty animations, or finishing resolves immediately
+ if ( empty || jQuery._data( this, "finish" ) ) {
+ anim.stop( true );
+ }
+ };
+ doAnimation.finish = doAnimation;
+
+ return empty || optall.queue === false ?
+ this.each( doAnimation ) :
+ this.queue( optall.queue, doAnimation );
+ },
+ stop: function( type, clearQueue, gotoEnd ) {
+ var stopQueue = function( hooks ) {
+ var stop = hooks.stop;
+ delete hooks.stop;
+ stop( gotoEnd );
+ };
+
+ if ( typeof type !== "string" ) {
+ gotoEnd = clearQueue;
+ clearQueue = type;
+ type = undefined;
+ }
+ if ( clearQueue && type !== false ) {
+ this.queue( type || "fx", [] );
+ }
+
+ return this.each(function() {
+ var dequeue = true,
+ index = type != null && type + "queueHooks",
+ timers = jQuery.timers,
+ data = jQuery._data( this );
+
+ if ( index ) {
+ if ( data[ index ] && data[ index ].stop ) {
+ stopQueue( data[ index ] );
+ }
+ } else {
+ for ( index in data ) {
+ if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
+ stopQueue( data[ index ] );
+ }
+ }
+ }
+
+ for ( index = timers.length; index--; ) {
+ if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
+ timers[ index ].anim.stop( gotoEnd );
+ dequeue = false;
+ timers.splice( index, 1 );
+ }
+ }
+
+ // start the next in the queue if the last step wasn't forced
+ // timers currently will call their complete callbacks, which will dequeue
+ // but only if they were gotoEnd
+ if ( dequeue || !gotoEnd ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ finish: function( type ) {
+ if ( type !== false ) {
+ type = type || "fx";
+ }
+ return this.each(function() {
+ var index,
+ data = jQuery._data( this ),
+ queue = data[ type + "queue" ],
+ hooks = data[ type + "queueHooks" ],
+ timers = jQuery.timers,
+ length = queue ? queue.length : 0;
+
+ // enable finishing flag on private data
+ data.finish = true;
+
+ // empty the queue first
+ jQuery.queue( this, type, [] );
+
+ if ( hooks && hooks.stop ) {
+ hooks.stop.call( this, true );
+ }
+
+ // look for any active animations, and finish them
+ for ( index = timers.length; index--; ) {
+ if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
+ timers[ index ].anim.stop( true );
+ timers.splice( index, 1 );
+ }
+ }
+
+ // look for any animations in the old queue and finish them
+ for ( index = 0; index < length; index++ ) {
+ if ( queue[ index ] && queue[ index ].finish ) {
+ queue[ index ].finish.call( this );
+ }
+ }
+
+ // turn off finishing flag
+ delete data.finish;
+ });
+ }
+});
+
+jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
+ var cssFn = jQuery.fn[ name ];
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
+ return speed == null || typeof speed === "boolean" ?
+ cssFn.apply( this, arguments ) :
+ this.animate( genFx( name, true ), speed, easing, callback );
+ };
+});
+
+// Generate shortcuts for custom animations
+jQuery.each({
+ slideDown: genFx("show"),
+ slideUp: genFx("hide"),
+ slideToggle: genFx("toggle"),
+ fadeIn: { opacity: "show" },
+ fadeOut: { opacity: "hide" },
+ fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
+ return this.animate( props, speed, easing, callback );
+ };
+});
+
+jQuery.timers = [];
+jQuery.fx.tick = function() {
+ var timer,
+ timers = jQuery.timers,
+ i = 0;
+
+ fxNow = jQuery.now();
+
+ for ( ; i < timers.length; i++ ) {
+ timer = timers[ i ];
+ // Checks the timer has not already been removed
+ if ( !timer() && timers[ i ] === timer ) {
+ timers.splice( i--, 1 );
+ }
+ }
+
+ if ( !timers.length ) {
+ jQuery.fx.stop();
+ }
+ fxNow = undefined;
+};
+
+jQuery.fx.timer = function( timer ) {
+ jQuery.timers.push( timer );
+ if ( timer() ) {
+ jQuery.fx.start();
+ } else {
+ jQuery.timers.pop();
+ }
+};
+
+jQuery.fx.interval = 13;
+
+jQuery.fx.start = function() {
+ if ( !timerId ) {
+ timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
+ }
+};
+
+jQuery.fx.stop = function() {
+ clearInterval( timerId );
+ timerId = null;
+};
+
+jQuery.fx.speeds = {
+ slow: 600,
+ fast: 200,
+ // Default speed
+ _default: 400
+};
+
+
+// Based off of the plugin by Clint Helfers, with permission.
+// http://blindsignals.com/index.php/2009/07/jquery-delay/
+jQuery.fn.delay = function( time, type ) {
+ time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+ type = type || "fx";
+
+ return this.queue( type, function( next, hooks ) {
+ var timeout = setTimeout( next, time );
+ hooks.stop = function() {
+ clearTimeout( timeout );
+ };
+ });
+};
+
+
+(function() {
+ // Minified: var a,b,c,d,e
+ var input, div, select, a, opt;
+
+ // Setup
+ div = document.createElement( "div" );
+ div.setAttribute( "className", "t" );
+ div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
+ a = div.getElementsByTagName("a")[ 0 ];
+
+ // First batch of tests.
+ select = document.createElement("select");
+ opt = select.appendChild( document.createElement("option") );
+ input = div.getElementsByTagName("input")[ 0 ];
+
+ a.style.cssText = "top:1px";
+
+ // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+ support.getSetAttribute = div.className !== "t";
+
+ // Get the style information from getAttribute
+ // (IE uses .cssText instead)
+ support.style = /top/.test( a.getAttribute("style") );
+
+ // Make sure that URLs aren't manipulated
+ // (IE normalizes it by default)
+ support.hrefNormalized = a.getAttribute("href") === "/a";
+
+ // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
+ support.checkOn = !!input.value;
+
+ // Make sure that a selected-by-default option has a working selected property.
+ // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+ support.optSelected = opt.selected;
+
+ // Tests for enctype support on a form (#6743)
+ support.enctype = !!document.createElement("form").enctype;
+
+ // Make sure that the options inside disabled selects aren't marked as disabled
+ // (WebKit marks them as disabled)
+ select.disabled = true;
+ support.optDisabled = !opt.disabled;
+
+ // Support: IE8 only
+ // Check if we can trust getAttribute("value")
+ input = document.createElement( "input" );
+ input.setAttribute( "value", "" );
+ support.input = input.getAttribute( "value" ) === "";
+
+ // Check if an input maintains its value after becoming a radio
+ input.value = "t";
+ input.setAttribute( "type", "radio" );
+ support.radioValue = input.value === "t";
+})();
+
+
+var rreturn = /\r/g;
+
+jQuery.fn.extend({
+ val: function( value ) {
+ var hooks, ret, isFunction,
+ elem = this[0];
+
+ if ( !arguments.length ) {
+ if ( elem ) {
+ hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+ return ret;
+ }
+
+ ret = elem.value;
+
+ return typeof ret === "string" ?
+ // handle most common string cases
+ ret.replace(rreturn, "") :
+ // handle cases where value is null/undef or number
+ ret == null ? "" : ret;
+ }
+
+ return;
+ }
+
+ isFunction = jQuery.isFunction( value );
+
+ return this.each(function( i ) {
+ var val;
+
+ if ( this.nodeType !== 1 ) {
+ return;
+ }
+
+ if ( isFunction ) {
+ val = value.call( this, i, jQuery( this ).val() );
+ } else {
+ val = value;
+ }
+
+ // Treat null/undefined as ""; convert numbers to string
+ if ( val == null ) {
+ val = "";
+ } else if ( typeof val === "number" ) {
+ val += "";
+ } else if ( jQuery.isArray( val ) ) {
+ val = jQuery.map( val, function( value ) {
+ return value == null ? "" : value + "";
+ });
+ }
+
+ hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+ // If set returns undefined, fall back to normal setting
+ if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+ this.value = val;
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ valHooks: {
+ option: {
+ get: function( elem ) {
+ var val = jQuery.find.attr( elem, "value" );
+ return val != null ?
+ val :
+ // Support: IE10-11+
+ // option.text throws exceptions (#14686, #14858)
+ jQuery.trim( jQuery.text( elem ) );
+ }
+ },
+ select: {
+ get: function( elem ) {
+ var value, option,
+ options = elem.options,
+ index = elem.selectedIndex,
+ one = elem.type === "select-one" || index < 0,
+ values = one ? null : [],
+ max = one ? index + 1 : options.length,
+ i = index < 0 ?
+ max :
+ one ? index : 0;
+
+ // Loop through all the selected options
+ for ( ; i < max; i++ ) {
+ option = options[ i ];
+
+ // oldIE doesn't update selected after form reset (#2551)
+ if ( ( option.selected || i === index ) &&
+ // Don't return options that are disabled or in a disabled optgroup
+ ( support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
+ ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
+
+ // Get the specific value for the option
+ value = jQuery( option ).val();
+
+ // We don't need an array for one selects
+ if ( one ) {
+ return value;
+ }
+
+ // Multi-Selects return an array
+ values.push( value );
+ }
+ }
+
+ return values;
+ },
+
+ set: function( elem, value ) {
+ var optionSet, option,
+ options = elem.options,
+ values = jQuery.makeArray( value ),
+ i = options.length;
+
+ while ( i-- ) {
+ option = options[ i ];
+
+ if ( jQuery.inArray( jQuery.valHooks.option.get( option ), values ) >= 0 ) {
+
+ // Support: IE6
+ // When new option element is added to select box we need to
+ // force reflow of newly added node in order to workaround delay
+ // of initialization properties
+ try {
+ option.selected = optionSet = true;
+
+ } catch ( _ ) {
+
+ // Will be executed only in IE6
+ option.scrollHeight;
+ }
+
+ } else {
+ option.selected = false;
+ }
+ }
+
+ // Force browsers to behave consistently when non-matching value is set
+ if ( !optionSet ) {
+ elem.selectedIndex = -1;
+ }
+
+ return options;
+ }
+ }
+ }
+});
+
+// Radios and checkboxes getter/setter
+jQuery.each([ "radio", "checkbox" ], function() {
+ jQuery.valHooks[ this ] = {
+ set: function( elem, value ) {
+ if ( jQuery.isArray( value ) ) {
+ return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
+ }
+ }
+ };
+ if ( !support.checkOn ) {
+ jQuery.valHooks[ this ].get = function( elem ) {
+ // Support: Webkit
+ // "" is returned instead of "on" if a value isn't specified
+ return elem.getAttribute("value") === null ? "on" : elem.value;
+ };
+ }
+});
+
+
+
+
+var nodeHook, boolHook,
+ attrHandle = jQuery.expr.attrHandle,
+ ruseDefault = /^(?:checked|selected)$/i,
+ getSetAttribute = support.getSetAttribute,
+ getSetInput = support.input;
+
+jQuery.fn.extend({
+ attr: function( name, value ) {
+ return access( this, jQuery.attr, name, value, arguments.length > 1 );
+ },
+
+ removeAttr: function( name ) {
+ return this.each(function() {
+ jQuery.removeAttr( this, name );
+ });
+ }
+});
+
+jQuery.extend({
+ attr: function( elem, name, value ) {
+ var hooks, ret,
+ nType = elem.nodeType;
+
+ // don't get/set attributes on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ // Fallback to prop when attributes are not supported
+ if ( typeof elem.getAttribute === strundefined ) {
+ return jQuery.prop( elem, name, value );
+ }
+
+ // All attributes are lowercase
+ // Grab necessary hook if one is defined
+ if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
+ name = name.toLowerCase();
+ hooks = jQuery.attrHooks[ name ] ||
+ ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
+ }
+
+ if ( value !== undefined ) {
+
+ if ( value === null ) {
+ jQuery.removeAttr( elem, name );
+
+ } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ elem.setAttribute( name, value + "" );
+ return value;
+ }
+
+ } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+ return ret;
+
+ } else {
+ ret = jQuery.find.attr( elem, name );
+
+ // Non-existent attributes return null, we normalize to undefined
+ return ret == null ?
+ undefined :
+ ret;
+ }
+ },
+
+ removeAttr: function( elem, value ) {
+ var name, propName,
+ i = 0,
+ attrNames = value && value.match( rnotwhite );
+
+ if ( attrNames && elem.nodeType === 1 ) {
+ while ( (name = attrNames[i++]) ) {
+ propName = jQuery.propFix[ name ] || name;
+
+ // Boolean attributes get special treatment (#10870)
+ if ( jQuery.expr.match.bool.test( name ) ) {
+ // Set corresponding property to false
+ if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
+ elem[ propName ] = false;
+ // Support: IE<9
+ // Also clear defaultChecked/defaultSelected (if appropriate)
+ } else {
+ elem[ jQuery.camelCase( "default-" + name ) ] =
+ elem[ propName ] = false;
+ }
+
+ // See #9699 for explanation of this approach (setting first, then removal)
+ } else {
+ jQuery.attr( elem, name, "" );
+ }
+
+ elem.removeAttribute( getSetAttribute ? name : propName );
+ }
+ }
+ },
+
+ attrHooks: {
+ type: {
+ set: function( elem, value ) {
+ if ( !support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
+ // Setting the type on a radio button after the value resets the value in IE6-9
+ // Reset value to default in case type is set after value during creation
+ var val = elem.value;
+ elem.setAttribute( "type", value );
+ if ( val ) {
+ elem.value = val;
+ }
+ return value;
+ }
+ }
+ }
+ }
+});
+
+// Hook for boolean attributes
+boolHook = {
+ set: function( elem, value, name ) {
+ if ( value === false ) {
+ // Remove boolean attributes when set to false
+ jQuery.removeAttr( elem, name );
+ } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
+ // IE<8 needs the *property* name
+ elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );
+
+ // Use defaultChecked and defaultSelected for oldIE
+ } else {
+ elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;
+ }
+
+ return name;
+ }
+};
+
+// Retrieve booleans specially
+jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
+
+ var getter = attrHandle[ name ] || jQuery.find.attr;
+
+ attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ?
+ function( elem, name, isXML ) {
+ var ret, handle;
+ if ( !isXML ) {
+ // Avoid an infinite loop by temporarily removing this function from the getter
+ handle = attrHandle[ name ];
+ attrHandle[ name ] = ret;
+ ret = getter( elem, name, isXML ) != null ?
+ name.toLowerCase() :
+ null;
+ attrHandle[ name ] = handle;
+ }
+ return ret;
+ } :
+ function( elem, name, isXML ) {
+ if ( !isXML ) {
+ return elem[ jQuery.camelCase( "default-" + name ) ] ?
+ name.toLowerCase() :
+ null;
+ }
+ };
+});
+
+// fix oldIE attroperties
+if ( !getSetInput || !getSetAttribute ) {
+ jQuery.attrHooks.value = {
+ set: function( elem, value, name ) {
+ if ( jQuery.nodeName( elem, "input" ) ) {
+ // Does not return so that setAttribute is also used
+ elem.defaultValue = value;
+ } else {
+ // Use nodeHook if defined (#1954); otherwise setAttribute is fine
+ return nodeHook && nodeHook.set( elem, value, name );
+ }
+ }
+ };
+}
+
+// IE6/7 do not support getting/setting some attributes with get/setAttribute
+if ( !getSetAttribute ) {
+
+ // Use this for any attribute in IE6/7
+ // This fixes almost every IE6/7 issue
+ nodeHook = {
+ set: function( elem, value, name ) {
+ // Set the existing or create a new attribute node
+ var ret = elem.getAttributeNode( name );
+ if ( !ret ) {
+ elem.setAttributeNode(
+ (ret = elem.ownerDocument.createAttribute( name ))
+ );
+ }
+
+ ret.value = value += "";
+
+ // Break association with cloned elements by also using setAttribute (#9646)
+ if ( name === "value" || value === elem.getAttribute( name ) ) {
+ return value;
+ }
+ }
+ };
+
+ // Some attributes are constructed with empty-string values when not defined
+ attrHandle.id = attrHandle.name = attrHandle.coords =
+ function( elem, name, isXML ) {
+ var ret;
+ if ( !isXML ) {
+ return (ret = elem.getAttributeNode( name )) && ret.value !== "" ?
+ ret.value :
+ null;
+ }
+ };
+
+ // Fixing value retrieval on a button requires this module
+ jQuery.valHooks.button = {
+ get: function( elem, name ) {
+ var ret = elem.getAttributeNode( name );
+ if ( ret && ret.specified ) {
+ return ret.value;
+ }
+ },
+ set: nodeHook.set
+ };
+
+ // Set contenteditable to false on removals(#10429)
+ // Setting to empty string throws an error as an invalid value
+ jQuery.attrHooks.contenteditable = {
+ set: function( elem, value, name ) {
+ nodeHook.set( elem, value === "" ? false : value, name );
+ }
+ };
+
+ // Set width and height to auto instead of 0 on empty string( Bug #8150 )
+ // This is for removals
+ jQuery.each([ "width", "height" ], function( i, name ) {
+ jQuery.attrHooks[ name ] = {
+ set: function( elem, value ) {
+ if ( value === "" ) {
+ elem.setAttribute( name, "auto" );
+ return value;
+ }
+ }
+ };
+ });
+}
+
+if ( !support.style ) {
+ jQuery.attrHooks.style = {
+ get: function( elem ) {
+ // Return undefined in the case of empty string
+ // Note: IE uppercases css property names, but if we were to .toLowerCase()
+ // .cssText, that would destroy case senstitivity in URL's, like in "background"
+ return elem.style.cssText || undefined;
+ },
+ set: function( elem, value ) {
+ return ( elem.style.cssText = value + "" );
+ }
+ };
+}
+
+
+
+
+var rfocusable = /^(?:input|select|textarea|button|object)$/i,
+ rclickable = /^(?:a|area)$/i;
+
+jQuery.fn.extend({
+ prop: function( name, value ) {
+ return access( this, jQuery.prop, name, value, arguments.length > 1 );
+ },
+
+ removeProp: function( name ) {
+ name = jQuery.propFix[ name ] || name;
+ return this.each(function() {
+ // try/catch handles cases where IE balks (such as removing a property on window)
+ try {
+ this[ name ] = undefined;
+ delete this[ name ];
+ } catch( e ) {}
+ });
+ }
+});
+
+jQuery.extend({
+ propFix: {
+ "for": "htmlFor",
+ "class": "className"
+ },
+
+ prop: function( elem, name, value ) {
+ var ret, hooks, notxml,
+ nType = elem.nodeType;
+
+ // don't get/set properties on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+ if ( notxml ) {
+ // Fix name and attach hooks
+ name = jQuery.propFix[ name ] || name;
+ hooks = jQuery.propHooks[ name ];
+ }
+
+ if ( value !== undefined ) {
+ return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
+ ret :
+ ( elem[ name ] = value );
+
+ } else {
+ return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
+ ret :
+ elem[ name ];
+ }
+ },
+
+ propHooks: {
+ tabIndex: {
+ get: function( elem ) {
+ // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+ // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+ // Use proper attribute retrieval(#12072)
+ var tabindex = jQuery.find.attr( elem, "tabindex" );
+
+ return tabindex ?
+ parseInt( tabindex, 10 ) :
+ rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+ 0 :
+ -1;
+ }
+ }
+ }
+});
+
+// Some attributes require a special call on IE
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !support.hrefNormalized ) {
+ // href/src property should get the full normalized URL (#10299/#12915)
+ jQuery.each([ "href", "src" ], function( i, name ) {
+ jQuery.propHooks[ name ] = {
+ get: function( elem ) {
+ return elem.getAttribute( name, 4 );
+ }
+ };
+ });
+}
+
+// Support: Safari, IE9+
+// mis-reports the default selected property of an option
+// Accessing the parent's selectedIndex property fixes it
+if ( !support.optSelected ) {
+ jQuery.propHooks.selected = {
+ get: function( elem ) {
+ var parent = elem.parentNode;
+
+ if ( parent ) {
+ parent.selectedIndex;
+
+ // Make sure that it also works with optgroups, see #5701
+ if ( parent.parentNode ) {
+ parent.parentNode.selectedIndex;
+ }
+ }
+ return null;
+ }
+ };
+}
+
+jQuery.each([
+ "tabIndex",
+ "readOnly",
+ "maxLength",
+ "cellSpacing",
+ "cellPadding",
+ "rowSpan",
+ "colSpan",
+ "useMap",
+ "frameBorder",
+ "contentEditable"
+], function() {
+ jQuery.propFix[ this.toLowerCase() ] = this;
+});
+
+// IE6/7 call enctype encoding
+if ( !support.enctype ) {
+ jQuery.propFix.enctype = "encoding";
+}
+
+
+
+
+var rclass = /[\t\r\n\f]/g;
+
+jQuery.fn.extend({
+ addClass: function( value ) {
+ var classes, elem, cur, clazz, j, finalValue,
+ i = 0,
+ len = this.length,
+ proceed = typeof value === "string" && value;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).addClass( value.call( this, j, this.className ) );
+ });
+ }
+
+ if ( proceed ) {
+ // The disjunction here is for better compressibility (see removeClass)
+ classes = ( value || "" ).match( rnotwhite ) || [];
+
+ for ( ; i < len; i++ ) {
+ elem = this[ i ];
+ cur = elem.nodeType === 1 && ( elem.className ?
+ ( " " + elem.className + " " ).replace( rclass, " " ) :
+ " "
+ );
+
+ if ( cur ) {
+ j = 0;
+ while ( (clazz = classes[j++]) ) {
+ if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
+ cur += clazz + " ";
+ }
+ }
+
+ // only assign if different to avoid unneeded rendering.
+ finalValue = jQuery.trim( cur );
+ if ( elem.className !== finalValue ) {
+ elem.className = finalValue;
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ removeClass: function( value ) {
+ var classes, elem, cur, clazz, j, finalValue,
+ i = 0,
+ len = this.length,
+ proceed = arguments.length === 0 || typeof value === "string" && value;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).removeClass( value.call( this, j, this.className ) );
+ });
+ }
+ if ( proceed ) {
+ classes = ( value || "" ).match( rnotwhite ) || [];
+
+ for ( ; i < len; i++ ) {
+ elem = this[ i ];
+ // This expression is here for better compressibility (see addClass)
+ cur = elem.nodeType === 1 && ( elem.className ?
+ ( " " + elem.className + " " ).replace( rclass, " " ) :
+ ""
+ );
+
+ if ( cur ) {
+ j = 0;
+ while ( (clazz = classes[j++]) ) {
+ // Remove *all* instances
+ while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
+ cur = cur.replace( " " + clazz + " ", " " );
+ }
+ }
+
+ // only assign if different to avoid unneeded rendering.
+ finalValue = value ? jQuery.trim( cur ) : "";
+ if ( elem.className !== finalValue ) {
+ elem.className = finalValue;
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ toggleClass: function( value, stateVal ) {
+ var type = typeof value;
+
+ if ( typeof stateVal === "boolean" && type === "string" ) {
+ return stateVal ? this.addClass( value ) : this.removeClass( value );
+ }
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+ });
+ }
+
+ return this.each(function() {
+ if ( type === "string" ) {
+ // toggle individual class names
+ var className,
+ i = 0,
+ self = jQuery( this ),
+ classNames = value.match( rnotwhite ) || [];
+
+ while ( (className = classNames[ i++ ]) ) {
+ // check each className given, space separated list
+ if ( self.hasClass( className ) ) {
+ self.removeClass( className );
+ } else {
+ self.addClass( className );
+ }
+ }
+
+ // Toggle whole class name
+ } else if ( type === strundefined || type === "boolean" ) {
+ if ( this.className ) {
+ // store className if set
+ jQuery._data( this, "__className__", this.className );
+ }
+
+ // If the element has a class name or if we're passed "false",
+ // then remove the whole classname (if there was one, the above saved it).
+ // Otherwise bring back whatever was previously saved (if anything),
+ // falling back to the empty string if nothing was stored.
+ this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
+ }
+ });
+ },
+
+ hasClass: function( selector ) {
+ var className = " " + selector + " ",
+ i = 0,
+ l = this.length;
+ for ( ; i < l; i++ ) {
+ if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+});
+
+
+
+
+// Return jQuery for attributes-only inclusion
+
+
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+ "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+ "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
+
+ // Handle event binding
+ jQuery.fn[ name ] = function( data, fn ) {
+ return arguments.length > 0 ?
+ this.on( name, null, data, fn ) :
+ this.trigger( name );
+ };
+});
+
+jQuery.fn.extend({
+ hover: function( fnOver, fnOut ) {
+ return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+ },
+
+ bind: function( types, data, fn ) {
+ return this.on( types, null, data, fn );
+ },
+ unbind: function( types, fn ) {
+ return this.off( types, null, fn );
+ },
+
+ delegate: function( selector, types, data, fn ) {
+ return this.on( types, selector, data, fn );
+ },
+ undelegate: function( selector, types, fn ) {
+ // ( namespace ) or ( selector, types [, fn] )
+ return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
+ }
+});
+
+
+var nonce = jQuery.now();
+
+var rquery = (/\?/);
+
+
+
+var rvalidtokens = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;
+
+jQuery.parseJSON = function( data ) {
+ // Attempt to parse using the native JSON parser first
+ if ( window.JSON && window.JSON.parse ) {
+ // Support: Android 2.3
+ // Workaround failure to string-cast null input
+ return window.JSON.parse( data + "" );
+ }
+
+ var requireNonComma,
+ depth = null,
+ str = jQuery.trim( data + "" );
+
+ // Guard against invalid (and possibly dangerous) input by ensuring that nothing remains
+ // after removing valid tokens
+ return str && !jQuery.trim( str.replace( rvalidtokens, function( token, comma, open, close ) {
+
+ // Force termination if we see a misplaced comma
+ if ( requireNonComma && comma ) {
+ depth = 0;
+ }
+
+ // Perform no more replacements after returning to outermost depth
+ if ( depth === 0 ) {
+ return token;
+ }
+
+ // Commas must not follow "[", "{", or ","
+ requireNonComma = open || comma;
+
+ // Determine new depth
+ // array/object open ("[" or "{"): depth += true - false (increment)
+ // array/object close ("]" or "}"): depth += false - true (decrement)
+ // other cases ("," or primitive): depth += true - true (numeric cast)
+ depth += !close - !open;
+
+ // Remove this token
+ return "";
+ }) ) ?
+ ( Function( "return " + str ) )() :
+ jQuery.error( "Invalid JSON: " + data );
+};
+
+
+// Cross-browser xml parsing
+jQuery.parseXML = function( data ) {
+ var xml, tmp;
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+ try {
+ if ( window.DOMParser ) { // Standard
+ tmp = new DOMParser();
+ xml = tmp.parseFromString( data, "text/xml" );
+ } else { // IE
+ xml = new ActiveXObject( "Microsoft.XMLDOM" );
+ xml.async = "false";
+ xml.loadXML( data );
+ }
+ } catch( e ) {
+ xml = undefined;
+ }
+ if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
+ jQuery.error( "Invalid XML: " + data );
+ }
+ return xml;
+};
+
+
+var
+ // Document location
+ ajaxLocParts,
+ ajaxLocation,
+
+ rhash = /#.*$/,
+ rts = /([?&])_=[^&]*/,
+ rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
+ // #7653, #8125, #8152: local protocol detection
+ rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
+ rnoContent = /^(?:GET|HEAD)$/,
+ rprotocol = /^\/\//,
+ rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
+
+ /* Prefilters
+ * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+ * 2) These are called:
+ * - BEFORE asking for a transport
+ * - AFTER param serialization (s.data is a string if s.processData is true)
+ * 3) key is the dataType
+ * 4) the catchall symbol "*" can be used
+ * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+ */
+ prefilters = {},
+
+ /* Transports bindings
+ * 1) key is the dataType
+ * 2) the catchall symbol "*" can be used
+ * 3) selection will start with transport dataType and THEN go to "*" if needed
+ */
+ transports = {},
+
+ // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+ allTypes = "*/".concat("*");
+
+// #8138, IE may throw an exception when accessing
+// a field from window.location if document.domain has been set
+try {
+ ajaxLocation = location.href;
+} catch( e ) {
+ // Use the href attribute of an A element
+ // since IE will modify it given document.location
+ ajaxLocation = document.createElement( "a" );
+ ajaxLocation.href = "";
+ ajaxLocation = ajaxLocation.href;
+}
+
+// Segment location into parts
+ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+ // dataTypeExpression is optional and defaults to "*"
+ return function( dataTypeExpression, func ) {
+
+ if ( typeof dataTypeExpression !== "string" ) {
+ func = dataTypeExpression;
+ dataTypeExpression = "*";
+ }
+
+ var dataType,
+ i = 0,
+ dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];
+
+ if ( jQuery.isFunction( func ) ) {
+ // For each dataType in the dataTypeExpression
+ while ( (dataType = dataTypes[i++]) ) {
+ // Prepend if requested
+ if ( dataType.charAt( 0 ) === "+" ) {
+ dataType = dataType.slice( 1 ) || "*";
+ (structure[ dataType ] = structure[ dataType ] || []).unshift( func );
+
+ // Otherwise append
+ } else {
+ (structure[ dataType ] = structure[ dataType ] || []).push( func );
+ }
+ }
+ }
+ };
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
+
+ var inspected = {},
+ seekingTransport = ( structure === transports );
+
+ function inspect( dataType ) {
+ var selected;
+ inspected[ dataType ] = true;
+ jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
+ var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
+ if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
+ options.dataTypes.unshift( dataTypeOrTransport );
+ inspect( dataTypeOrTransport );
+ return false;
+ } else if ( seekingTransport ) {
+ return !( selected = dataTypeOrTransport );
+ }
+ });
+ return selected;
+ }
+
+ return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
+}
+
+// A special extend for ajax options
+// that takes "flat" options (not to be deep extended)
+// Fixes #9887
+function ajaxExtend( target, src ) {
+ var deep, key,
+ flatOptions = jQuery.ajaxSettings.flatOptions || {};
+
+ for ( key in src ) {
+ if ( src[ key ] !== undefined ) {
+ ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
+ }
+ }
+ if ( deep ) {
+ jQuery.extend( true, target, deep );
+ }
+
+ return target;
+}
+
+/* Handles responses to an ajax request:
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+ var firstDataType, ct, finalDataType, type,
+ contents = s.contents,
+ dataTypes = s.dataTypes;
+
+ // Remove auto dataType and get content-type in the process
+ while ( dataTypes[ 0 ] === "*" ) {
+ dataTypes.shift();
+ if ( ct === undefined ) {
+ ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
+ }
+ }
+
+ // Check if we're dealing with a known content-type
+ if ( ct ) {
+ for ( type in contents ) {
+ if ( contents[ type ] && contents[ type ].test( ct ) ) {
+ dataTypes.unshift( type );
+ break;
+ }
+ }
+ }
+
+ // Check to see if we have a response for the expected dataType
+ if ( dataTypes[ 0 ] in responses ) {
+ finalDataType = dataTypes[ 0 ];
+ } else {
+ // Try convertible dataTypes
+ for ( type in responses ) {
+ if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
+ finalDataType = type;
+ break;
+ }
+ if ( !firstDataType ) {
+ firstDataType = type;
+ }
+ }
+ // Or just use first one
+ finalDataType = finalDataType || firstDataType;
+ }
+
+ // If we found a dataType
+ // We add the dataType to the list if needed
+ // and return the corresponding response
+ if ( finalDataType ) {
+ if ( finalDataType !== dataTypes[ 0 ] ) {
+ dataTypes.unshift( finalDataType );
+ }
+ return responses[ finalDataType ];
+ }
+}
+
+/* Chain conversions given the request and the original response
+ * Also sets the responseXXX fields on the jqXHR instance
+ */
+function ajaxConvert( s, response, jqXHR, isSuccess ) {
+ var conv2, current, conv, tmp, prev,
+ converters = {},
+ // Work with a copy of dataTypes in case we need to modify it for conversion
+ dataTypes = s.dataTypes.slice();
+
+ // Create converters map with lowercased keys
+ if ( dataTypes[ 1 ] ) {
+ for ( conv in s.converters ) {
+ converters[ conv.toLowerCase() ] = s.converters[ conv ];
+ }
+ }
+
+ current = dataTypes.shift();
+
+ // Convert to each sequential dataType
+ while ( current ) {
+
+ if ( s.responseFields[ current ] ) {
+ jqXHR[ s.responseFields[ current ] ] = response;
+ }
+
+ // Apply the dataFilter if provided
+ if ( !prev && isSuccess && s.dataFilter ) {
+ response = s.dataFilter( response, s.dataType );
+ }
+
+ prev = current;
+ current = dataTypes.shift();
+
+ if ( current ) {
+
+ // There's only work to do if current dataType is non-auto
+ if ( current === "*" ) {
+
+ current = prev;
+
+ // Convert response if prev dataType is non-auto and differs from current
+ } else if ( prev !== "*" && prev !== current ) {
+
+ // Seek a direct converter
+ conv = converters[ prev + " " + current ] || converters[ "* " + current ];
+
+ // If none found, seek a pair
+ if ( !conv ) {
+ for ( conv2 in converters ) {
+
+ // If conv2 outputs current
+ tmp = conv2.split( " " );
+ if ( tmp[ 1 ] === current ) {
+
+ // If prev can be converted to accepted input
+ conv = converters[ prev + " " + tmp[ 0 ] ] ||
+ converters[ "* " + tmp[ 0 ] ];
+ if ( conv ) {
+ // Condense equivalence converters
+ if ( conv === true ) {
+ conv = converters[ conv2 ];
+
+ // Otherwise, insert the intermediate dataType
+ } else if ( converters[ conv2 ] !== true ) {
+ current = tmp[ 0 ];
+ dataTypes.unshift( tmp[ 1 ] );
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ // Apply converter (if not an equivalence)
+ if ( conv !== true ) {
+
+ // Unless errors are allowed to bubble, catch and return them
+ if ( conv && s[ "throws" ] ) {
+ response = conv( response );
+ } else {
+ try {
+ response = conv( response );
+ } catch ( e ) {
+ return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return { state: "success", data: response };
+}
+
+jQuery.extend({
+
+ // Counter for holding the number of active queries
+ active: 0,
+
+ // Last-Modified header cache for next request
+ lastModified: {},
+ etag: {},
+
+ ajaxSettings: {
+ url: ajaxLocation,
+ type: "GET",
+ isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
+ global: true,
+ processData: true,
+ async: true,
+ contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+ /*
+ timeout: 0,
+ data: null,
+ dataType: null,
+ username: null,
+ password: null,
+ cache: null,
+ throws: false,
+ traditional: false,
+ headers: {},
+ */
+
+ accepts: {
+ "*": allTypes,
+ text: "text/plain",
+ html: "text/html",
+ xml: "application/xml, text/xml",
+ json: "application/json, text/javascript"
+ },
+
+ contents: {
+ xml: /xml/,
+ html: /html/,
+ json: /json/
+ },
+
+ responseFields: {
+ xml: "responseXML",
+ text: "responseText",
+ json: "responseJSON"
+ },
+
+ // Data converters
+ // Keys separate source (or catchall "*") and destination types with a single space
+ converters: {
+
+ // Convert anything to text
+ "* text": String,
+
+ // Text to html (true = no transformation)
+ "text html": true,
+
+ // Evaluate text as a json expression
+ "text json": jQuery.parseJSON,
+
+ // Parse text as xml
+ "text xml": jQuery.parseXML
+ },
+
+ // For options that shouldn't be deep extended:
+ // you can add your own custom options here if
+ // and when you create one that shouldn't be
+ // deep extended (see ajaxExtend)
+ flatOptions: {
+ url: true,
+ context: true
+ }
+ },
+
+ // Creates a full fledged settings object into target
+ // with both ajaxSettings and settings fields.
+ // If target is omitted, writes into ajaxSettings.
+ ajaxSetup: function( target, settings ) {
+ return settings ?
+
+ // Building a settings object
+ ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
+
+ // Extending ajaxSettings
+ ajaxExtend( jQuery.ajaxSettings, target );
+ },
+
+ ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+ ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+ // Main method
+ ajax: function( url, options ) {
+
+ // If url is an object, simulate pre-1.5 signature
+ if ( typeof url === "object" ) {
+ options = url;
+ url = undefined;
+ }
+
+ // Force options to be an object
+ options = options || {};
+
+ var // Cross-domain detection vars
+ parts,
+ // Loop variable
+ i,
+ // URL without anti-cache param
+ cacheURL,
+ // Response headers as string
+ responseHeadersString,
+ // timeout handle
+ timeoutTimer,
+
+ // To know if global events are to be dispatched
+ fireGlobals,
+
+ transport,
+ // Response headers
+ responseHeaders,
+ // Create the final options object
+ s = jQuery.ajaxSetup( {}, options ),
+ // Callbacks context
+ callbackContext = s.context || s,
+ // Context for global events is callbackContext if it is a DOM node or jQuery collection
+ globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
+ jQuery( callbackContext ) :
+ jQuery.event,
+ // Deferreds
+ deferred = jQuery.Deferred(),
+ completeDeferred = jQuery.Callbacks("once memory"),
+ // Status-dependent callbacks
+ statusCode = s.statusCode || {},
+ // Headers (they are sent all at once)
+ requestHeaders = {},
+ requestHeadersNames = {},
+ // The jqXHR state
+ state = 0,
+ // Default abort message
+ strAbort = "canceled",
+ // Fake xhr
+ jqXHR = {
+ readyState: 0,
+
+ // Builds headers hashtable if needed
+ getResponseHeader: function( key ) {
+ var match;
+ if ( state === 2 ) {
+ if ( !responseHeaders ) {
+ responseHeaders = {};
+ while ( (match = rheaders.exec( responseHeadersString )) ) {
+ responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
+ }
+ }
+ match = responseHeaders[ key.toLowerCase() ];
+ }
+ return match == null ? null : match;
+ },
+
+ // Raw string
+ getAllResponseHeaders: function() {
+ return state === 2 ? responseHeadersString : null;
+ },
+
+ // Caches the header
+ setRequestHeader: function( name, value ) {
+ var lname = name.toLowerCase();
+ if ( !state ) {
+ name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
+ requestHeaders[ name ] = value;
+ }
+ return this;
+ },
+
+ // Overrides response content-type header
+ overrideMimeType: function( type ) {
+ if ( !state ) {
+ s.mimeType = type;
+ }
+ return this;
+ },
+
+ // Status-dependent callbacks
+ statusCode: function( map ) {
+ var code;
+ if ( map ) {
+ if ( state < 2 ) {
+ for ( code in map ) {
+ // Lazy-add the new callback in a way that preserves old ones
+ statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
+ }
+ } else {
+ // Execute the appropriate callbacks
+ jqXHR.always( map[ jqXHR.status ] );
+ }
+ }
+ return this;
+ },
+
+ // Cancel the request
+ abort: function( statusText ) {
+ var finalText = statusText || strAbort;
+ if ( transport ) {
+ transport.abort( finalText );
+ }
+ done( 0, finalText );
+ return this;
+ }
+ };
+
+ // Attach deferreds
+ deferred.promise( jqXHR ).complete = completeDeferred.add;
+ jqXHR.success = jqXHR.done;
+ jqXHR.error = jqXHR.fail;
+
+ // Remove hash character (#7531: and string promotion)
+ // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
+ // Handle falsy url in the settings object (#10093: consistency with old signature)
+ // We also use the url parameter if available
+ s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
+
+ // Alias method option to type as per ticket #12004
+ s.type = options.method || options.type || s.method || s.type;
+
+ // Extract dataTypes list
+ s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];
+
+ // A cross-domain request is in order when we have a protocol:host:port mismatch
+ if ( s.crossDomain == null ) {
+ parts = rurl.exec( s.url.toLowerCase() );
+ s.crossDomain = !!( parts &&
+ ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
+ ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
+ ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
+ );
+ }
+
+ // Convert data if not already a string
+ if ( s.data && s.processData && typeof s.data !== "string" ) {
+ s.data = jQuery.param( s.data, s.traditional );
+ }
+
+ // Apply prefilters
+ inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+ // If request was aborted inside a prefilter, stop there
+ if ( state === 2 ) {
+ return jqXHR;
+ }
+
+ // We can fire global events as of now if asked to
+ fireGlobals = s.global;
+
+ // Watch for a new set of requests
+ if ( fireGlobals && jQuery.active++ === 0 ) {
+ jQuery.event.trigger("ajaxStart");
+ }
+
+ // Uppercase the type
+ s.type = s.type.toUpperCase();
+
+ // Determine if request has content
+ s.hasContent = !rnoContent.test( s.type );
+
+ // Save the URL in case we're toying with the If-Modified-Since
+ // and/or If-None-Match header later on
+ cacheURL = s.url;
+
+ // More options handling for requests with no content
+ if ( !s.hasContent ) {
+
+ // If data is available, append data to url
+ if ( s.data ) {
+ cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
+ // #9682: remove data so that it's not used in an eventual retry
+ delete s.data;
+ }
+
+ // Add anti-cache in url if needed
+ if ( s.cache === false ) {
+ s.url = rts.test( cacheURL ) ?
+
+ // If there is already a '_' parameter, set its value
+ cacheURL.replace( rts, "$1_=" + nonce++ ) :
+
+ // Otherwise add one to the end
+ cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++;
+ }
+ }
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ if ( jQuery.lastModified[ cacheURL ] ) {
+ jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
+ }
+ if ( jQuery.etag[ cacheURL ] ) {
+ jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
+ }
+ }
+
+ // Set the correct header, if data is being sent
+ if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+ jqXHR.setRequestHeader( "Content-Type", s.contentType );
+ }
+
+ // Set the Accepts header for the server, depending on the dataType
+ jqXHR.setRequestHeader(
+ "Accept",
+ s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
+ s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+ s.accepts[ "*" ]
+ );
+
+ // Check for headers option
+ for ( i in s.headers ) {
+ jqXHR.setRequestHeader( i, s.headers[ i ] );
+ }
+
+ // Allow custom headers/mimetypes and early abort
+ if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+ // Abort if not done already and return
+ return jqXHR.abort();
+ }
+
+ // aborting is no longer a cancellation
+ strAbort = "abort";
+
+ // Install callbacks on deferreds
+ for ( i in { success: 1, error: 1, complete: 1 } ) {
+ jqXHR[ i ]( s[ i ] );
+ }
+
+ // Get transport
+ transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+ // If no transport, we auto-abort
+ if ( !transport ) {
+ done( -1, "No Transport" );
+ } else {
+ jqXHR.readyState = 1;
+
+ // Send global event
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+ }
+ // Timeout
+ if ( s.async && s.timeout > 0 ) {
+ timeoutTimer = setTimeout(function() {
+ jqXHR.abort("timeout");
+ }, s.timeout );
+ }
+
+ try {
+ state = 1;
+ transport.send( requestHeaders, done );
+ } catch ( e ) {
+ // Propagate exception as error if not done
+ if ( state < 2 ) {
+ done( -1, e );
+ // Simply rethrow otherwise
+ } else {
+ throw e;
+ }
+ }
+ }
+
+ // Callback for when everything is done
+ function done( status, nativeStatusText, responses, headers ) {
+ var isSuccess, success, error, response, modified,
+ statusText = nativeStatusText;
+
+ // Called once
+ if ( state === 2 ) {
+ return;
+ }
+
+ // State is "done" now
+ state = 2;
+
+ // Clear timeout if it exists
+ if ( timeoutTimer ) {
+ clearTimeout( timeoutTimer );
+ }
+
+ // Dereference transport for early garbage collection
+ // (no matter how long the jqXHR object will be used)
+ transport = undefined;
+
+ // Cache response headers
+ responseHeadersString = headers || "";
+
+ // Set readyState
+ jqXHR.readyState = status > 0 ? 4 : 0;
+
+ // Determine if successful
+ isSuccess = status >= 200 && status < 300 || status === 304;
+
+ // Get response data
+ if ( responses ) {
+ response = ajaxHandleResponses( s, jqXHR, responses );
+ }
+
+ // Convert no matter what (that way responseXXX fields are always set)
+ response = ajaxConvert( s, response, jqXHR, isSuccess );
+
+ // If successful, handle type chaining
+ if ( isSuccess ) {
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ modified = jqXHR.getResponseHeader("Last-Modified");
+ if ( modified ) {
+ jQuery.lastModified[ cacheURL ] = modified;
+ }
+ modified = jqXHR.getResponseHeader("etag");
+ if ( modified ) {
+ jQuery.etag[ cacheURL ] = modified;
+ }
+ }
+
+ // if no content
+ if ( status === 204 || s.type === "HEAD" ) {
+ statusText = "nocontent";
+
+ // if not modified
+ } else if ( status === 304 ) {
+ statusText = "notmodified";
+
+ // If we have data, let's convert it
+ } else {
+ statusText = response.state;
+ success = response.data;
+ error = response.error;
+ isSuccess = !error;
+ }
+ } else {
+ // We extract error from statusText
+ // then normalize statusText and status for non-aborts
+ error = statusText;
+ if ( status || !statusText ) {
+ statusText = "error";
+ if ( status < 0 ) {
+ status = 0;
+ }
+ }
+ }
+
+ // Set data for the fake xhr object
+ jqXHR.status = status;
+ jqXHR.statusText = ( nativeStatusText || statusText ) + "";
+
+ // Success/Error
+ if ( isSuccess ) {
+ deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+ } else {
+ deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+ }
+
+ // Status-dependent callbacks
+ jqXHR.statusCode( statusCode );
+ statusCode = undefined;
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
+ [ jqXHR, s, isSuccess ? success : error ] );
+ }
+
+ // Complete
+ completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
+ // Handle the global AJAX counter
+ if ( !( --jQuery.active ) ) {
+ jQuery.event.trigger("ajaxStop");
+ }
+ }
+ }
+
+ return jqXHR;
+ },
+
+ getJSON: function( url, data, callback ) {
+ return jQuery.get( url, data, callback, "json" );
+ },
+
+ getScript: function( url, callback ) {
+ return jQuery.get( url, undefined, callback, "script" );
+ }
+});
+
+jQuery.each( [ "get", "post" ], function( i, method ) {
+ jQuery[ method ] = function( url, data, callback, type ) {
+ // shift arguments if data argument was omitted
+ if ( jQuery.isFunction( data ) ) {
+ type = type || callback;
+ callback = data;
+ data = undefined;
+ }
+
+ return jQuery.ajax({
+ url: url,
+ type: method,
+ dataType: type,
+ data: data,
+ success: callback
+ });
+ };
+});
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {
+ jQuery.fn[ type ] = function( fn ) {
+ return this.on( type, fn );
+ };
+});
+
+
+jQuery._evalUrl = function( url ) {
+ return jQuery.ajax({
+ url: url,
+ type: "GET",
+ dataType: "script",
+ async: false,
+ global: false,
+ "throws": true
+ });
+};
+
+
+jQuery.fn.extend({
+ wrapAll: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function(i) {
+ jQuery(this).wrapAll( html.call(this, i) );
+ });
+ }
+
+ if ( this[0] ) {
+ // The elements to wrap the target around
+ var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
+
+ if ( this[0].parentNode ) {
+ wrap.insertBefore( this[0] );
+ }
+
+ wrap.map(function() {
+ var elem = this;
+
+ while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
+ elem = elem.firstChild;
+ }
+
+ return elem;
+ }).append( this );
+ }
+
+ return this;
+ },
+
+ wrapInner: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function(i) {
+ jQuery(this).wrapInner( html.call(this, i) );
+ });
+ }
+
+ return this.each(function() {
+ var self = jQuery( this ),
+ contents = self.contents();
+
+ if ( contents.length ) {
+ contents.wrapAll( html );
+
+ } else {
+ self.append( html );
+ }
+ });
+ },
+
+ wrap: function( html ) {
+ var isFunction = jQuery.isFunction( html );
+
+ return this.each(function(i) {
+ jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
+ });
+ },
+
+ unwrap: function() {
+ return this.parent().each(function() {
+ if ( !jQuery.nodeName( this, "body" ) ) {
+ jQuery( this ).replaceWith( this.childNodes );
+ }
+ }).end();
+ }
+});
+
+
+jQuery.expr.filters.hidden = function( elem ) {
+ // Support: Opera <= 12.12
+ // Opera reports offsetWidths and offsetHeights less than zero on some elements
+ return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||
+ (!support.reliableHiddenOffsets() &&
+ ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
+};
+
+jQuery.expr.filters.visible = function( elem ) {
+ return !jQuery.expr.filters.hidden( elem );
+};
+
+
+
+
+var r20 = /%20/g,
+ rbracket = /\[\]$/,
+ rCRLF = /\r?\n/g,
+ rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
+ rsubmittable = /^(?:input|select|textarea|keygen)/i;
+
+function buildParams( prefix, obj, traditional, add ) {
+ var name;
+
+ if ( jQuery.isArray( obj ) ) {
+ // Serialize array item.
+ jQuery.each( obj, function( i, v ) {
+ if ( traditional || rbracket.test( prefix ) ) {
+ // Treat each array item as a scalar.
+ add( prefix, v );
+
+ } else {
+ // Item is non-scalar (array or object), encode its numeric index.
+ buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
+ }
+ });
+
+ } else if ( !traditional && jQuery.type( obj ) === "object" ) {
+ // Serialize object item.
+ for ( name in obj ) {
+ buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+ }
+
+ } else {
+ // Serialize scalar item.
+ add( prefix, obj );
+ }
+}
+
+// Serialize an array of form elements or a set of
+// key/values into a query string
+jQuery.param = function( a, traditional ) {
+ var prefix,
+ s = [],
+ add = function( key, value ) {
+ // If value is a function, invoke it and return its value
+ value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
+ s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+ };
+
+ // Set traditional to true for jQuery <= 1.3.2 behavior.
+ if ( traditional === undefined ) {
+ traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
+ }
+
+ // If an array was passed in, assume that it is an array of form elements.
+ if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+ // Serialize the form elements
+ jQuery.each( a, function() {
+ add( this.name, this.value );
+ });
+
+ } else {
+ // If traditional, encode the "old" way (the way 1.3.2 or older
+ // did it), otherwise encode params recursively.
+ for ( prefix in a ) {
+ buildParams( prefix, a[ prefix ], traditional, add );
+ }
+ }
+
+ // Return the resulting serialization
+ return s.join( "&" ).replace( r20, "+" );
+};
+
+jQuery.fn.extend({
+ serialize: function() {
+ return jQuery.param( this.serializeArray() );
+ },
+ serializeArray: function() {
+ return this.map(function() {
+ // Can add propHook for "elements" to filter or add form elements
+ var elements = jQuery.prop( this, "elements" );
+ return elements ? jQuery.makeArray( elements ) : this;
+ })
+ .filter(function() {
+ var type = this.type;
+ // Use .is(":disabled") so that fieldset[disabled] works
+ return this.name && !jQuery( this ).is( ":disabled" ) &&
+ rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
+ ( this.checked || !rcheckableType.test( type ) );
+ })
+ .map(function( i, elem ) {
+ var val = jQuery( this ).val();
+
+ return val == null ?
+ null :
+ jQuery.isArray( val ) ?
+ jQuery.map( val, function( val ) {
+ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }) :
+ { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }).get();
+ }
+});
+
+
+// Create the request object
+// (This is still attached to ajaxSettings for backward compatibility)
+jQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ?
+ // Support: IE6+
+ function() {
+
+ // XHR cannot access local files, always use ActiveX for that case
+ return !this.isLocal &&
+
+ // Support: IE7-8
+ // oldIE XHR does not support non-RFC2616 methods (#13240)
+ // See http://msdn.microsoft.com/en-us/library/ie/ms536648(v=vs.85).aspx
+ // and http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9
+ // Although this check for six methods instead of eight
+ // since IE also does not support "trace" and "connect"
+ /^(get|post|head|put|delete|options)$/i.test( this.type ) &&
+
+ createStandardXHR() || createActiveXHR();
+ } :
+ // For all other browsers, use the standard XMLHttpRequest object
+ createStandardXHR;
+
+var xhrId = 0,
+ xhrCallbacks = {},
+ xhrSupported = jQuery.ajaxSettings.xhr();
+
+// Support: IE<10
+// Open requests must be manually aborted on unload (#5280)
+if ( window.ActiveXObject ) {
+ jQuery( window ).on( "unload", function() {
+ for ( var key in xhrCallbacks ) {
+ xhrCallbacks[ key ]( undefined, true );
+ }
+ });
+}
+
+// Determine support properties
+support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
+xhrSupported = support.ajax = !!xhrSupported;
+
+// Create transport if the browser can provide an xhr
+if ( xhrSupported ) {
+
+ jQuery.ajaxTransport(function( options ) {
+ // Cross domain only allowed if supported through XMLHttpRequest
+ if ( !options.crossDomain || support.cors ) {
+
+ var callback;
+
+ return {
+ send: function( headers, complete ) {
+ var i,
+ xhr = options.xhr(),
+ id = ++xhrId;
+
+ // Open the socket
+ xhr.open( options.type, options.url, options.async, options.username, options.password );
+
+ // Apply custom fields if provided
+ if ( options.xhrFields ) {
+ for ( i in options.xhrFields ) {
+ xhr[ i ] = options.xhrFields[ i ];
+ }
+ }
+
+ // Override mime type if needed
+ if ( options.mimeType && xhr.overrideMimeType ) {
+ xhr.overrideMimeType( options.mimeType );
+ }
+
+ // X-Requested-With header
+ // For cross-domain requests, seeing as conditions for a preflight are
+ // akin to a jigsaw puzzle, we simply never set it to be sure.
+ // (it can always be set on a per-request basis or even using ajaxSetup)
+ // For same-domain requests, won't change header if already provided.
+ if ( !options.crossDomain && !headers["X-Requested-With"] ) {
+ headers["X-Requested-With"] = "XMLHttpRequest";
+ }
+
+ // Set headers
+ for ( i in headers ) {
+ // Support: IE<9
+ // IE's ActiveXObject throws a 'Type Mismatch' exception when setting
+ // request header to a null-value.
+ //
+ // To keep consistent with other XHR implementations, cast the value
+ // to string and ignore `undefined`.
+ if ( headers[ i ] !== undefined ) {
+ xhr.setRequestHeader( i, headers[ i ] + "" );
+ }
+ }
+
+ // Do send the request
+ // This may raise an exception which is actually
+ // handled in jQuery.ajax (so no try/catch here)
+ xhr.send( ( options.hasContent && options.data ) || null );
+
+ // Listener
+ callback = function( _, isAbort ) {
+ var status, statusText, responses;
+
+ // Was never called and is aborted or complete
+ if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
+ // Clean up
+ delete xhrCallbacks[ id ];
+ callback = undefined;
+ xhr.onreadystatechange = jQuery.noop;
+
+ // Abort manually if needed
+ if ( isAbort ) {
+ if ( xhr.readyState !== 4 ) {
+ xhr.abort();
+ }
+ } else {
+ responses = {};
+ status = xhr.status;
+
+ // Support: IE<10
+ // Accessing binary-data responseText throws an exception
+ // (#11426)
+ if ( typeof xhr.responseText === "string" ) {
+ responses.text = xhr.responseText;
+ }
+
+ // Firefox throws an exception when accessing
+ // statusText for faulty cross-domain requests
+ try {
+ statusText = xhr.statusText;
+ } catch( e ) {
+ // We normalize with Webkit giving an empty statusText
+ statusText = "";
+ }
+
+ // Filter status for non standard behaviors
+
+ // If the request is local and we have data: assume a success
+ // (success with no data won't get notified, that's the best we
+ // can do given current implementations)
+ if ( !status && options.isLocal && !options.crossDomain ) {
+ status = responses.text ? 200 : 404;
+ // IE - #1450: sometimes returns 1223 when it should be 204
+ } else if ( status === 1223 ) {
+ status = 204;
+ }
+ }
+ }
+
+ // Call complete if needed
+ if ( responses ) {
+ complete( status, statusText, responses, xhr.getAllResponseHeaders() );
+ }
+ };
+
+ if ( !options.async ) {
+ // if we're in sync mode we fire the callback
+ callback();
+ } else if ( xhr.readyState === 4 ) {
+ // (IE6 & IE7) if it's in cache and has been
+ // retrieved directly we need to fire the callback
+ setTimeout( callback );
+ } else {
+ // Add to the list of active xhr callbacks
+ xhr.onreadystatechange = xhrCallbacks[ id ] = callback;
+ }
+ },
+
+ abort: function() {
+ if ( callback ) {
+ callback( undefined, true );
+ }
+ }
+ };
+ }
+ });
+}
+
+// Functions to create xhrs
+function createStandardXHR() {
+ try {
+ return new window.XMLHttpRequest();
+ } catch( e ) {}
+}
+
+function createActiveXHR() {
+ try {
+ return new window.ActiveXObject( "Microsoft.XMLHTTP" );
+ } catch( e ) {}
+}
+
+
+
+
+// Install script dataType
+jQuery.ajaxSetup({
+ accepts: {
+ script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
+ },
+ contents: {
+ script: /(?:java|ecma)script/
+ },
+ converters: {
+ "text script": function( text ) {
+ jQuery.globalEval( text );
+ return text;
+ }
+ }
+});
+
+// Handle cache's special case and global
+jQuery.ajaxPrefilter( "script", function( s ) {
+ if ( s.cache === undefined ) {
+ s.cache = false;
+ }
+ if ( s.crossDomain ) {
+ s.type = "GET";
+ s.global = false;
+ }
+});
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function(s) {
+
+ // This transport only deals with cross domain requests
+ if ( s.crossDomain ) {
+
+ var script,
+ head = document.head || jQuery("head")[0] || document.documentElement;
+
+ return {
+
+ send: function( _, callback ) {
+
+ script = document.createElement("script");
+
+ script.async = true;
+
+ if ( s.scriptCharset ) {
+ script.charset = s.scriptCharset;
+ }
+
+ script.src = s.url;
+
+ // Attach handlers for all browsers
+ script.onload = script.onreadystatechange = function( _, isAbort ) {
+
+ if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
+
+ // Handle memory leak in IE
+ script.onload = script.onreadystatechange = null;
+
+ // Remove the script
+ if ( script.parentNode ) {
+ script.parentNode.removeChild( script );
+ }
+
+ // Dereference the script
+ script = null;
+
+ // Callback if not abort
+ if ( !isAbort ) {
+ callback( 200, "success" );
+ }
+ }
+ };
+
+ // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
+ // Use native DOM manipulation to avoid our domManip AJAX trickery
+ head.insertBefore( script, head.firstChild );
+ },
+
+ abort: function() {
+ if ( script ) {
+ script.onload( undefined, true );
+ }
+ }
+ };
+ }
+});
+
+
+
+
+var oldCallbacks = [],
+ rjsonp = /(=)\?(?=&|$)|\?\?/;
+
+// Default jsonp settings
+jQuery.ajaxSetup({
+ jsonp: "callback",
+ jsonpCallback: function() {
+ var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
+ this[ callback ] = true;
+ return callback;
+ }
+});
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
+
+ var callbackName, overwritten, responseContainer,
+ jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
+ "url" :
+ typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
+ );
+
+ // Handle iff the expected data type is "jsonp" or we have a parameter to set
+ if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
+
+ // Get callback name, remembering preexisting value associated with it
+ callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
+ s.jsonpCallback() :
+ s.jsonpCallback;
+
+ // Insert callback into url or form data
+ if ( jsonProp ) {
+ s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
+ } else if ( s.jsonp !== false ) {
+ s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
+ }
+
+ // Use data converter to retrieve json after script execution
+ s.converters["script json"] = function() {
+ if ( !responseContainer ) {
+ jQuery.error( callbackName + " was not called" );
+ }
+ return responseContainer[ 0 ];
+ };
+
+ // force json dataType
+ s.dataTypes[ 0 ] = "json";
+
+ // Install callback
+ overwritten = window[ callbackName ];
+ window[ callbackName ] = function() {
+ responseContainer = arguments;
+ };
+
+ // Clean-up function (fires after converters)
+ jqXHR.always(function() {
+ // Restore preexisting value
+ window[ callbackName ] = overwritten;
+
+ // Save back as free
+ if ( s[ callbackName ] ) {
+ // make sure that re-using the options doesn't screw things around
+ s.jsonpCallback = originalSettings.jsonpCallback;
+
+ // save the callback name for future use
+ oldCallbacks.push( callbackName );
+ }
+
+ // Call if it was a function and we have a response
+ if ( responseContainer && jQuery.isFunction( overwritten ) ) {
+ overwritten( responseContainer[ 0 ] );
+ }
+
+ responseContainer = overwritten = undefined;
+ });
+
+ // Delegate to script
+ return "script";
+ }
+});
+
+
+
+
+// data: string of html
+// context (optional): If specified, the fragment will be created in this context, defaults to document
+// keepScripts (optional): If true, will include scripts passed in the html string
+jQuery.parseHTML = function( data, context, keepScripts ) {
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+ if ( typeof context === "boolean" ) {
+ keepScripts = context;
+ context = false;
+ }
+ context = context || document;
+
+ var parsed = rsingleTag.exec( data ),
+ scripts = !keepScripts && [];
+
+ // Single tag
+ if ( parsed ) {
+ return [ context.createElement( parsed[1] ) ];
+ }
+
+ parsed = jQuery.buildFragment( [ data ], context, scripts );
+
+ if ( scripts && scripts.length ) {
+ jQuery( scripts ).remove();
+ }
+
+ return jQuery.merge( [], parsed.childNodes );
+};
+
+
+// Keep a copy of the old load method
+var _load = jQuery.fn.load;
+
+/**
+ * Load a url into a page
+ */
+jQuery.fn.load = function( url, params, callback ) {
+ if ( typeof url !== "string" && _load ) {
+ return _load.apply( this, arguments );
+ }
+
+ var selector, response, type,
+ self = this,
+ off = url.indexOf(" ");
+
+ if ( off >= 0 ) {
+ selector = jQuery.trim( url.slice( off, url.length ) );
+ url = url.slice( 0, off );
+ }
+
+ // If it's a function
+ if ( jQuery.isFunction( params ) ) {
+
+ // We assume that it's the callback
+ callback = params;
+ params = undefined;
+
+ // Otherwise, build a param string
+ } else if ( params && typeof params === "object" ) {
+ type = "POST";
+ }
+
+ // If we have elements to modify, make the request
+ if ( self.length > 0 ) {
+ jQuery.ajax({
+ url: url,
+
+ // if "type" variable is undefined, then "GET" method will be used
+ type: type,
+ dataType: "html",
+ data: params
+ }).done(function( responseText ) {
+
+ // Save response for use in complete callback
+ response = arguments;
+
+ self.html( selector ?
+
+ // If a selector was specified, locate the right elements in a dummy div
+ // Exclude scripts to avoid IE 'Permission Denied' errors
+ jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
+
+ // Otherwise use the full result
+ responseText );
+
+ }).complete( callback && function( jqXHR, status ) {
+ self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
+ });
+ }
+
+ return this;
+};
+
+
+
+
+jQuery.expr.filters.animated = function( elem ) {
+ return jQuery.grep(jQuery.timers, function( fn ) {
+ return elem === fn.elem;
+ }).length;
+};
+
+
+
+
+
+var docElem = window.document.documentElement;
+
+/**
+ * Gets a window from an element
+ */
+function getWindow( elem ) {
+ return jQuery.isWindow( elem ) ?
+ elem :
+ elem.nodeType === 9 ?
+ elem.defaultView || elem.parentWindow :
+ false;
+}
+
+jQuery.offset = {
+ setOffset: function( elem, options, i ) {
+ var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
+ position = jQuery.css( elem, "position" ),
+ curElem = jQuery( elem ),
+ props = {};
+
+ // set position first, in-case top/left are set even on static elem
+ if ( position === "static" ) {
+ elem.style.position = "relative";
+ }
+
+ curOffset = curElem.offset();
+ curCSSTop = jQuery.css( elem, "top" );
+ curCSSLeft = jQuery.css( elem, "left" );
+ calculatePosition = ( position === "absolute" || position === "fixed" ) &&
+ jQuery.inArray("auto", [ curCSSTop, curCSSLeft ] ) > -1;
+
+ // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
+ if ( calculatePosition ) {
+ curPosition = curElem.position();
+ curTop = curPosition.top;
+ curLeft = curPosition.left;
+ } else {
+ curTop = parseFloat( curCSSTop ) || 0;
+ curLeft = parseFloat( curCSSLeft ) || 0;
+ }
+
+ if ( jQuery.isFunction( options ) ) {
+ options = options.call( elem, i, curOffset );
+ }
+
+ if ( options.top != null ) {
+ props.top = ( options.top - curOffset.top ) + curTop;
+ }
+ if ( options.left != null ) {
+ props.left = ( options.left - curOffset.left ) + curLeft;
+ }
+
+ if ( "using" in options ) {
+ options.using.call( elem, props );
+ } else {
+ curElem.css( props );
+ }
+ }
+};
+
+jQuery.fn.extend({
+ offset: function( options ) {
+ if ( arguments.length ) {
+ return options === undefined ?
+ this :
+ this.each(function( i ) {
+ jQuery.offset.setOffset( this, options, i );
+ });
+ }
+
+ var docElem, win,
+ box = { top: 0, left: 0 },
+ elem = this[ 0 ],
+ doc = elem && elem.ownerDocument;
+
+ if ( !doc ) {
+ return;
+ }
+
+ docElem = doc.documentElement;
+
+ // Make sure it's not a disconnected DOM node
+ if ( !jQuery.contains( docElem, elem ) ) {
+ return box;
+ }
+
+ // If we don't have gBCR, just use 0,0 rather than error
+ // BlackBerry 5, iOS 3 (original iPhone)
+ if ( typeof elem.getBoundingClientRect !== strundefined ) {
+ box = elem.getBoundingClientRect();
+ }
+ win = getWindow( doc );
+ return {
+ top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),
+ left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
+ };
+ },
+
+ position: function() {
+ if ( !this[ 0 ] ) {
+ return;
+ }
+
+ var offsetParent, offset,
+ parentOffset = { top: 0, left: 0 },
+ elem = this[ 0 ];
+
+ // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent
+ if ( jQuery.css( elem, "position" ) === "fixed" ) {
+ // we assume that getBoundingClientRect is available when computed position is fixed
+ offset = elem.getBoundingClientRect();
+ } else {
+ // Get *real* offsetParent
+ offsetParent = this.offsetParent();
+
+ // Get correct offsets
+ offset = this.offset();
+ if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
+ parentOffset = offsetParent.offset();
+ }
+
+ // Add offsetParent borders
+ parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
+ parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
+ }
+
+ // Subtract parent offsets and element margins
+ // note: when an element has margin: auto the offsetLeft and marginLeft
+ // are the same in Safari causing offset.left to incorrectly be 0
+ return {
+ top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
+ left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true)
+ };
+ },
+
+ offsetParent: function() {
+ return this.map(function() {
+ var offsetParent = this.offsetParent || docElem;
+
+ while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) {
+ offsetParent = offsetParent.offsetParent;
+ }
+ return offsetParent || docElem;
+ });
+ }
+});
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
+ var top = /Y/.test( prop );
+
+ jQuery.fn[ method ] = function( val ) {
+ return access( this, function( elem, method, val ) {
+ var win = getWindow( elem );
+
+ if ( val === undefined ) {
+ return win ? (prop in win) ? win[ prop ] :
+ win.document.documentElement[ method ] :
+ elem[ method ];
+ }
+
+ if ( win ) {
+ win.scrollTo(
+ !top ? val : jQuery( win ).scrollLeft(),
+ top ? val : jQuery( win ).scrollTop()
+ );
+
+ } else {
+ elem[ method ] = val;
+ }
+ }, method, val, arguments.length, null );
+ };
+});
+
+// Add the top/left cssHooks using jQuery.fn.position
+// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
+// getComputedStyle returns percent when specified for top/left/bottom/right
+// rather than make the css module depend on the offset module, we just check for it here
+jQuery.each( [ "top", "left" ], function( i, prop ) {
+ jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
+ function( elem, computed ) {
+ if ( computed ) {
+ computed = curCSS( elem, prop );
+ // if curCSS returns percentage, fallback to offset
+ return rnumnonpx.test( computed ) ?
+ jQuery( elem ).position()[ prop ] + "px" :
+ computed;
+ }
+ }
+ );
+});
+
+
+// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
+jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
+ jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
+ // margin is only for outerHeight, outerWidth
+ jQuery.fn[ funcName ] = function( margin, value ) {
+ var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
+ extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
+
+ return access( this, function( elem, type, value ) {
+ var doc;
+
+ if ( jQuery.isWindow( elem ) ) {
+ // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
+ // isn't a whole lot we can do. See pull request at this URL for discussion:
+ // https://github.com/jquery/jquery/pull/764
+ return elem.document.documentElement[ "client" + name ];
+ }
+
+ // Get document width or height
+ if ( elem.nodeType === 9 ) {
+ doc = elem.documentElement;
+
+ // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
+ // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
+ return Math.max(
+ elem.body[ "scroll" + name ], doc[ "scroll" + name ],
+ elem.body[ "offset" + name ], doc[ "offset" + name ],
+ doc[ "client" + name ]
+ );
+ }
+
+ return value === undefined ?
+ // Get width or height on the element, requesting but not forcing parseFloat
+ jQuery.css( elem, type, extra ) :
+
+ // Set width or height on the element
+ jQuery.style( elem, type, value, extra );
+ }, type, chainable ? margin : undefined, chainable, null );
+ };
+ });
+});
+
+
+// The number of elements contained in the matched element set
+jQuery.fn.size = function() {
+ return this.length;
+};
+
+jQuery.fn.andSelf = jQuery.fn.addBack;
+
+
+
+
+// Register as a named AMD module, since jQuery can be concatenated with other
+// files that may use define, but not via a proper concatenation script that
+// understands anonymous AMD modules. A named AMD is safest and most robust
+// way to register. Lowercase jquery is used because AMD module names are
+// derived from file names, and jQuery is normally delivered in a lowercase
+// file name. Do this after creating the global so that if an AMD module wants
+// to call noConflict to hide this version of jQuery, it will work.
+
+// Note that for maximum portability, libraries that are not jQuery should
+// declare themselves as anonymous modules, and avoid setting a global if an
+// AMD loader is present. jQuery is a special case. For more information, see
+// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
+
+if ( typeof define === "function" && define.amd ) {
+ define( "jquery", [], function() {
+ return jQuery;
+ });
+}
+
+
+
+
+var
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+
+ // Map over the $ in case of overwrite
+ _$ = window.$;
+
+jQuery.noConflict = function( deep ) {
+ if ( window.$ === jQuery ) {
+ window.$ = _$;
+ }
+
+ if ( deep && window.jQuery === jQuery ) {
+ window.jQuery = _jQuery;
+ }
+
+ return jQuery;
+};
+
+// Expose jQuery and $ identifiers, even in
+// AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
+// and CommonJS for browser emulators (#13566)
+if ( typeof noGlobal === strundefined ) {
+ window.jQuery = window.$ = jQuery;
+}
+
+
+
+
+return jQuery;
+
+}));
--- /dev/null
+/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;
+if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=bb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fb=/ jQuery\d+="(?:null|\d+)"/g,gb=new RegExp("<(?:"+eb+")[\\s/>]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/<tbody/i,lb=/<|&#?\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\s*(?:[^=]|=\s*.checked.)/i,ob=/^$|\/(?:java|ecma)script/i,pb=/^true\/(.*)/,qb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?"<table>"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")
+},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$b=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.ActiveXObject&&m(a).on("unload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});
--- /dev/null
+.highlight .hll { background-color: #ffffcc }
+.highlight { background: #eeffcc; }
+.highlight .c { color: #408090; font-style: italic } /* Comment */
+.highlight .err { border: 1px solid #FF0000 } /* Error */
+.highlight .k { color: #007020; font-weight: bold } /* Keyword */
+.highlight .o { color: #666666 } /* Operator */
+.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */
+.highlight .cp { color: #007020 } /* Comment.Preproc */
+.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */
+.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
+.highlight .gd { color: #A00000 } /* Generic.Deleted */
+.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .gr { color: #FF0000 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
+.highlight .go { color: #333333 } /* Generic.Output */
+.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
+.highlight .gs { font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #0044DD } /* Generic.Traceback */
+.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #007020 } /* Keyword.Pseudo */
+.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #902000 } /* Keyword.Type */
+.highlight .m { color: #208050 } /* Literal.Number */
+.highlight .s { color: #4070a0 } /* Literal.String */
+.highlight .na { color: #4070a0 } /* Name.Attribute */
+.highlight .nb { color: #007020 } /* Name.Builtin */
+.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
+.highlight .no { color: #60add5 } /* Name.Constant */
+.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
+.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
+.highlight .ne { color: #007020 } /* Name.Exception */
+.highlight .nf { color: #06287e } /* Name.Function */
+.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
+.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
+.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
+.highlight .nv { color: #bb60d5 } /* Name.Variable */
+.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
+.highlight .mf { color: #208050 } /* Literal.Number.Float */
+.highlight .mh { color: #208050 } /* Literal.Number.Hex */
+.highlight .mi { color: #208050 } /* Literal.Number.Integer */
+.highlight .mo { color: #208050 } /* Literal.Number.Oct */
+.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
+.highlight .sc { color: #4070a0 } /* Literal.String.Char */
+.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
+.highlight .s2 { color: #4070a0 } /* Literal.String.Double */
+.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
+.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
+.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
+.highlight .sx { color: #c65d09 } /* Literal.String.Other */
+.highlight .sr { color: #235388 } /* Literal.String.Regex */
+.highlight .s1 { color: #4070a0 } /* Literal.String.Single */
+.highlight .ss { color: #517918 } /* Literal.String.Symbol */
+.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
+.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
+.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
+.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
+.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */
\ No newline at end of file
--- /dev/null
+/*
+ * searchtools.js_t
+ * ~~~~~~~~~~~~~~~~
+ *
+ * Sphinx JavaScript utilties for the full-text search.
+ *
+ * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+
+/**
+ * Porter Stemmer
+ */
+var Stemmer = function() {
+
+ var step2list = {
+ ational: 'ate',
+ tional: 'tion',
+ enci: 'ence',
+ anci: 'ance',
+ izer: 'ize',
+ bli: 'ble',
+ alli: 'al',
+ entli: 'ent',
+ eli: 'e',
+ ousli: 'ous',
+ ization: 'ize',
+ ation: 'ate',
+ ator: 'ate',
+ alism: 'al',
+ iveness: 'ive',
+ fulness: 'ful',
+ ousness: 'ous',
+ aliti: 'al',
+ iviti: 'ive',
+ biliti: 'ble',
+ logi: 'log'
+ };
+
+ var step3list = {
+ icate: 'ic',
+ ative: '',
+ alize: 'al',
+ iciti: 'ic',
+ ical: 'ic',
+ ful: '',
+ ness: ''
+ };
+
+ var c = "[^aeiou]"; // consonant
+ var v = "[aeiouy]"; // vowel
+ var C = c + "[^aeiouy]*"; // consonant sequence
+ var V = v + "[aeiou]*"; // vowel sequence
+
+ var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
+ var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
+ var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
+ var s_v = "^(" + C + ")?" + v; // vowel in stem
+
+ this.stemWord = function (w) {
+ var stem;
+ var suffix;
+ var firstch;
+ var origword = w;
+
+ if (w.length < 3)
+ return w;
+
+ var re;
+ var re2;
+ var re3;
+ var re4;
+
+ firstch = w.substr(0,1);
+ if (firstch == "y")
+ w = firstch.toUpperCase() + w.substr(1);
+
+ // Step 1a
+ re = /^(.+?)(ss|i)es$/;
+ re2 = /^(.+?)([^s])s$/;
+
+ if (re.test(w))
+ w = w.replace(re,"$1$2");
+ else if (re2.test(w))
+ w = w.replace(re2,"$1$2");
+
+ // Step 1b
+ re = /^(.+?)eed$/;
+ re2 = /^(.+?)(ed|ing)$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ re = new RegExp(mgr0);
+ if (re.test(fp[1])) {
+ re = /.$/;
+ w = w.replace(re,"");
+ }
+ }
+ else if (re2.test(w)) {
+ var fp = re2.exec(w);
+ stem = fp[1];
+ re2 = new RegExp(s_v);
+ if (re2.test(stem)) {
+ w = stem;
+ re2 = /(at|bl|iz)$/;
+ re3 = new RegExp("([^aeiouylsz])\\1$");
+ re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+ if (re2.test(w))
+ w = w + "e";
+ else if (re3.test(w)) {
+ re = /.$/;
+ w = w.replace(re,"");
+ }
+ else if (re4.test(w))
+ w = w + "e";
+ }
+ }
+
+ // Step 1c
+ re = /^(.+?)y$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ re = new RegExp(s_v);
+ if (re.test(stem))
+ w = stem + "i";
+ }
+
+ // Step 2
+ re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ suffix = fp[2];
+ re = new RegExp(mgr0);
+ if (re.test(stem))
+ w = stem + step2list[suffix];
+ }
+
+ // Step 3
+ re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ suffix = fp[2];
+ re = new RegExp(mgr0);
+ if (re.test(stem))
+ w = stem + step3list[suffix];
+ }
+
+ // Step 4
+ re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
+ re2 = /^(.+?)(s|t)(ion)$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ re = new RegExp(mgr1);
+ if (re.test(stem))
+ w = stem;
+ }
+ else if (re2.test(w)) {
+ var fp = re2.exec(w);
+ stem = fp[1] + fp[2];
+ re2 = new RegExp(mgr1);
+ if (re2.test(stem))
+ w = stem;
+ }
+
+ // Step 5
+ re = /^(.+?)e$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ re = new RegExp(mgr1);
+ re2 = new RegExp(meq1);
+ re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+ if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
+ w = stem;
+ }
+ re = /ll$/;
+ re2 = new RegExp(mgr1);
+ if (re.test(w) && re2.test(w)) {
+ re = /.$/;
+ w = w.replace(re,"");
+ }
+
+ // and turn initial Y back to y
+ if (firstch == "y")
+ w = firstch.toLowerCase() + w.substr(1);
+ return w;
+ }
+}
+
+
+
+/**
+ * Simple result scoring code.
+ */
+var Scorer = {
+ // Implement the following function to further tweak the score for each result
+ // The function takes a result array [filename, title, anchor, descr, score]
+ // and returns the new score.
+ /*
+ score: function(result) {
+ return result[4];
+ },
+ */
+
+ // query matches the full name of an object
+ objNameMatch: 11,
+ // or matches in the last dotted part of the object name
+ objPartialMatch: 6,
+ // Additive scores depending on the priority of the object
+ objPrio: {0: 15, // used to be importantResults
+ 1: 5, // used to be objectResults
+ 2: -5}, // used to be unimportantResults
+ // Used when the priority is not in the mapping.
+ objPrioDefault: 0,
+
+ // query found in title
+ title: 15,
+ // query found in terms
+ term: 5
+};
+
+
+/**
+ * Search Module
+ */
+var Search = {
+
+ _index : null,
+ _queued_query : null,
+ _pulse_status : -1,
+
+ init : function() {
+ var params = $.getQueryParameters();
+ if (params.q) {
+ var query = params.q[0];
+ $('input[name="q"]')[0].value = query;
+ this.performSearch(query);
+ }
+ },
+
+ loadIndex : function(url) {
+ $.ajax({type: "GET", url: url, data: null,
+ dataType: "script", cache: true,
+ complete: function(jqxhr, textstatus) {
+ if (textstatus != "success") {
+ document.getElementById("searchindexloader").src = url;
+ }
+ }});
+ },
+
+ setIndex : function(index) {
+ var q;
+ this._index = index;
+ if ((q = this._queued_query) !== null) {
+ this._queued_query = null;
+ Search.query(q);
+ }
+ },
+
+ hasIndex : function() {
+ return this._index !== null;
+ },
+
+ deferQuery : function(query) {
+ this._queued_query = query;
+ },
+
+ stopPulse : function() {
+ this._pulse_status = 0;
+ },
+
+ startPulse : function() {
+ if (this._pulse_status >= 0)
+ return;
+ function pulse() {
+ var i;
+ Search._pulse_status = (Search._pulse_status + 1) % 4;
+ var dotString = '';
+ for (i = 0; i < Search._pulse_status; i++)
+ dotString += '.';
+ Search.dots.text(dotString);
+ if (Search._pulse_status > -1)
+ window.setTimeout(pulse, 500);
+ }
+ pulse();
+ },
+
+ /**
+ * perform a search for something (or wait until index is loaded)
+ */
+ performSearch : function(query) {
+ // create the required interface elements
+ this.out = $('#search-results');
+ this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
+ this.dots = $('<span></span>').appendTo(this.title);
+ this.status = $('<p style="display: none"></p>').appendTo(this.out);
+ this.output = $('<ul class="search"/>').appendTo(this.out);
+
+ $('#search-progress').text(_('Preparing search...'));
+ this.startPulse();
+
+ // index already loaded, the browser was quick!
+ if (this.hasIndex())
+ this.query(query);
+ else
+ this.deferQuery(query);
+ },
+
+ /**
+ * execute search (requires search index to be loaded)
+ */
+ query : function(query) {
+ var i;
+ var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
+
+ // stem the searchterms and add them to the correct list
+ var stemmer = new Stemmer();
+ var searchterms = [];
+ var excluded = [];
+ var hlterms = [];
+ var tmp = query.split(/\s+/);
+ var objectterms = [];
+ for (i = 0; i < tmp.length; i++) {
+ if (tmp[i] !== "") {
+ objectterms.push(tmp[i].toLowerCase());
+ }
+
+ if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i].match(/^\d+$/) ||
+ tmp[i] === "") {
+ // skip this "word"
+ continue;
+ }
+ // stem the word
+ var word = stemmer.stemWord(tmp[i].toLowerCase());
+ var toAppend;
+ // select the correct list
+ if (word[0] == '-') {
+ toAppend = excluded;
+ word = word.substr(1);
+ }
+ else {
+ toAppend = searchterms;
+ hlterms.push(tmp[i].toLowerCase());
+ }
+ // only add if not already in the list
+ if (!$u.contains(toAppend, word))
+ toAppend.push(word);
+ }
+ var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
+
+ // console.debug('SEARCH: searching for:');
+ // console.info('required: ', searchterms);
+ // console.info('excluded: ', excluded);
+
+ // prepare search
+ var terms = this._index.terms;
+ var titleterms = this._index.titleterms;
+
+ // array of [filename, title, anchor, descr, score]
+ var results = [];
+ $('#search-progress').empty();
+
+ // lookup as object
+ for (i = 0; i < objectterms.length; i++) {
+ var others = [].concat(objectterms.slice(0, i),
+ objectterms.slice(i+1, objectterms.length));
+ results = results.concat(this.performObjectSearch(objectterms[i], others));
+ }
+
+ // lookup as search terms in fulltext
+ results = results.concat(this.performTermsSearch(searchterms, excluded, terms, Scorer.term))
+ .concat(this.performTermsSearch(searchterms, excluded, titleterms, Scorer.title));
+
+ // let the scorer override scores with a custom scoring function
+ if (Scorer.score) {
+ for (i = 0; i < results.length; i++)
+ results[i][4] = Scorer.score(results[i]);
+ }
+
+ // now sort the results by score (in opposite order of appearance, since the
+ // display function below uses pop() to retrieve items) and then
+ // alphabetically
+ results.sort(function(a, b) {
+ var left = a[4];
+ var right = b[4];
+ if (left > right) {
+ return 1;
+ } else if (left < right) {
+ return -1;
+ } else {
+ // same score: sort alphabetically
+ left = a[1].toLowerCase();
+ right = b[1].toLowerCase();
+ return (left > right) ? -1 : ((left < right) ? 1 : 0);
+ }
+ });
+
+ // for debugging
+ //Search.lastresults = results.slice(); // a copy
+ //console.info('search results:', Search.lastresults);
+
+ // print the results
+ var resultCount = results.length;
+ function displayNextItem() {
+ // results left, load the summary and display it
+ if (results.length) {
+ var item = results.pop();
+ var listItem = $('<li style="display:none"></li>');
+ if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') {
+ // dirhtml builder
+ var dirname = item[0] + '/';
+ if (dirname.match(/\/index\/$/)) {
+ dirname = dirname.substring(0, dirname.length-6);
+ } else if (dirname == 'index/') {
+ dirname = '';
+ }
+ listItem.append($('<a/>').attr('href',
+ DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
+ highlightstring + item[2]).html(item[1]));
+ } else {
+ // normal html builders
+ listItem.append($('<a/>').attr('href',
+ item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
+ highlightstring + item[2]).html(item[1]));
+ }
+ if (item[3]) {
+ listItem.append($('<span> (' + item[3] + ')</span>'));
+ Search.output.append(listItem);
+ listItem.slideDown(5, function() {
+ displayNextItem();
+ });
+ } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
+ $.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[0] + '.txt',
+ dataType: "text",
+ complete: function(jqxhr, textstatus) {
+ var data = jqxhr.responseText;
+ if (data !== '') {
+ listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
+ }
+ Search.output.append(listItem);
+ listItem.slideDown(5, function() {
+ displayNextItem();
+ });
+ }});
+ } else {
+ // no source available, just display title
+ Search.output.append(listItem);
+ listItem.slideDown(5, function() {
+ displayNextItem();
+ });
+ }
+ }
+ // search finished, update title and status message
+ else {
+ Search.stopPulse();
+ Search.title.text(_('Search Results'));
+ if (!resultCount)
+ Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
+ else
+ Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
+ Search.status.fadeIn(500);
+ }
+ }
+ displayNextItem();
+ },
+
+ /**
+ * search for object names
+ */
+ performObjectSearch : function(object, otherterms) {
+ var filenames = this._index.filenames;
+ var objects = this._index.objects;
+ var objnames = this._index.objnames;
+ var titles = this._index.titles;
+
+ var i;
+ var results = [];
+
+ for (var prefix in objects) {
+ for (var name in objects[prefix]) {
+ var fullname = (prefix ? prefix + '.' : '') + name;
+ if (fullname.toLowerCase().indexOf(object) > -1) {
+ var score = 0;
+ var parts = fullname.split('.');
+ // check for different match types: exact matches of full name or
+ // "last name" (i.e. last dotted part)
+ if (fullname == object || parts[parts.length - 1] == object) {
+ score += Scorer.objNameMatch;
+ // matches in last name
+ } else if (parts[parts.length - 1].indexOf(object) > -1) {
+ score += Scorer.objPartialMatch;
+ }
+ var match = objects[prefix][name];
+ var objname = objnames[match[1]][2];
+ var title = titles[match[0]];
+ // If more than one term searched for, we require other words to be
+ // found in the name/title/description
+ if (otherterms.length > 0) {
+ var haystack = (prefix + ' ' + name + ' ' +
+ objname + ' ' + title).toLowerCase();
+ var allfound = true;
+ for (i = 0; i < otherterms.length; i++) {
+ if (haystack.indexOf(otherterms[i]) == -1) {
+ allfound = false;
+ break;
+ }
+ }
+ if (!allfound) {
+ continue;
+ }
+ }
+ var descr = objname + _(', in ') + title;
+
+ var anchor = match[3];
+ if (anchor === '')
+ anchor = fullname;
+ else if (anchor == '-')
+ anchor = objnames[match[1]][1] + '-' + fullname;
+ // add custom score for some objects according to scorer
+ if (Scorer.objPrio.hasOwnProperty(match[2])) {
+ score += Scorer.objPrio[match[2]];
+ } else {
+ score += Scorer.objPrioDefault;
+ }
+ results.push([filenames[match[0]], fullname, '#'+anchor, descr, score]);
+ }
+ }
+ }
+
+ return results;
+ },
+
+ /**
+ * search for full-text terms in the index
+ */
+ performTermsSearch : function(searchterms, excluded, terms, score) {
+ var filenames = this._index.filenames;
+ var titles = this._index.titles;
+
+ var i, j, file, files;
+ var fileMap = {};
+ var results = [];
+
+ // perform the search on the required terms
+ for (i = 0; i < searchterms.length; i++) {
+ var word = searchterms[i];
+ // no match but word was a required one
+ if ((files = terms[word]) === undefined)
+ break;
+ if (files.length === undefined) {
+ files = [files];
+ }
+ // create the mapping
+ for (j = 0; j < files.length; j++) {
+ file = files[j];
+ if (file in fileMap)
+ fileMap[file].push(word);
+ else
+ fileMap[file] = [word];
+ }
+ }
+
+ // now check if the files don't contain excluded terms
+ for (file in fileMap) {
+ var valid = true;
+
+ // check if all requirements are matched
+ if (fileMap[file].length != searchterms.length)
+ continue;
+
+ // ensure that none of the excluded terms is in the search result
+ for (i = 0; i < excluded.length; i++) {
+ if (terms[excluded[i]] == file ||
+ $u.contains(terms[excluded[i]] || [], file)) {
+ valid = false;
+ break;
+ }
+ }
+
+ // if we have still a valid result we can add it to the result list
+ if (valid) {
+ results.push([filenames[file], titles[file], '', null, score]);
+ }
+ }
+ return results;
+ },
+
+ /**
+ * helper function to return a node containing the
+ * search summary for a given text. keywords is a list
+ * of stemmed words, hlwords is the list of normal, unstemmed
+ * words. the first one is used to find the occurance, the
+ * latter for highlighting it.
+ */
+ makeSearchSummary : function(text, keywords, hlwords) {
+ var textLower = text.toLowerCase();
+ var start = 0;
+ $.each(keywords, function() {
+ var i = textLower.indexOf(this.toLowerCase());
+ if (i > -1)
+ start = i;
+ });
+ start = Math.max(start - 120, 0);
+ var excerpt = ((start > 0) ? '...' : '') +
+ $.trim(text.substr(start, 240)) +
+ ((start + 240 - text.length) ? '...' : '');
+ var rv = $('<div class="context"></div>').text(excerpt);
+ $.each(hlwords, function() {
+ rv = rv.highlightText(this, 'highlighted');
+ });
+ return rv;
+ }
+};
+
+$(document).ready(function() {
+ Search.init();
+});
\ No newline at end of file
--- /dev/null
+/*
+ * sidebar.js
+ * ~~~~~~~~~~
+ *
+ * This script makes the Sphinx sidebar collapsible.
+ *
+ * .sphinxsidebar contains .sphinxsidebarwrapper. This script adds
+ * in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton
+ * used to collapse and expand the sidebar.
+ *
+ * When the sidebar is collapsed the .sphinxsidebarwrapper is hidden
+ * and the width of the sidebar and the margin-left of the document
+ * are decreased. When the sidebar is expanded the opposite happens.
+ * This script saves a per-browser/per-session cookie used to
+ * remember the position of the sidebar among the pages.
+ * Once the browser is closed the cookie is deleted and the position
+ * reset to the default (expanded).
+ *
+ * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+$(function() {
+
+
+
+
+
+
+
+
+ // global elements used by the functions.
+ // the 'sidebarbutton' element is defined as global after its
+ // creation, in the add_sidebar_button function
+ var bodywrapper = $('.bodywrapper');
+ var sidebar = $('.sphinxsidebar');
+ var sidebarwrapper = $('.sphinxsidebarwrapper');
+
+ // for some reason, the document has no sidebar; do not run into errors
+ if (!sidebar.length) return;
+
+ // original margin-left of the bodywrapper and width of the sidebar
+ // with the sidebar expanded
+ var bw_margin_expanded = bodywrapper.css('margin-left');
+ var ssb_width_expanded = sidebar.width();
+
+ // margin-left of the bodywrapper and width of the sidebar
+ // with the sidebar collapsed
+ var bw_margin_collapsed = '.8em';
+ var ssb_width_collapsed = '.8em';
+
+ // colors used by the current theme
+ var dark_color = $('.related').css('background-color');
+ var light_color = $('.document').css('background-color');
+
+ function sidebar_is_collapsed() {
+ return sidebarwrapper.is(':not(:visible)');
+ }
+
+ function toggle_sidebar() {
+ if (sidebar_is_collapsed())
+ expand_sidebar();
+ else
+ collapse_sidebar();
+ }
+
+ function collapse_sidebar() {
+ sidebarwrapper.hide();
+ sidebar.css('width', ssb_width_collapsed);
+ bodywrapper.css('margin-left', bw_margin_collapsed);
+ sidebarbutton.css({
+ 'margin-left': '0',
+ 'height': bodywrapper.height()
+ });
+ sidebarbutton.find('span').text('»');
+ sidebarbutton.attr('title', _('Expand sidebar'));
+ document.cookie = 'sidebar=collapsed';
+ }
+
+ function expand_sidebar() {
+ bodywrapper.css('margin-left', bw_margin_expanded);
+ sidebar.css('width', ssb_width_expanded);
+ sidebarwrapper.show();
+ sidebarbutton.css({
+ 'margin-left': ssb_width_expanded-12,
+ 'height': bodywrapper.height()
+ });
+ sidebarbutton.find('span').text('«');
+ sidebarbutton.attr('title', _('Collapse sidebar'));
+ document.cookie = 'sidebar=expanded';
+ }
+
+ function add_sidebar_button() {
+ sidebarwrapper.css({
+ 'float': 'left',
+ 'margin-right': '0',
+ 'width': ssb_width_expanded - 28
+ });
+ // create the button
+ sidebar.append(
+ '<div id="sidebarbutton"><span>«</span></div>'
+ );
+ var sidebarbutton = $('#sidebarbutton');
+ light_color = sidebarbutton.css('background-color');
+ // find the height of the viewport to center the '<<' in the page
+ var viewport_height;
+ if (window.innerHeight)
+ viewport_height = window.innerHeight;
+ else
+ viewport_height = $(window).height();
+ sidebarbutton.find('span').css({
+ 'display': 'block',
+ 'margin-top': (viewport_height - sidebar.position().top - 20) / 2
+ });
+
+ sidebarbutton.click(toggle_sidebar);
+ sidebarbutton.attr('title', _('Collapse sidebar'));
+ sidebarbutton.css({
+ 'color': '#FFFFFF',
+ 'border-left': '1px solid ' + dark_color,
+ 'font-size': '1.2em',
+ 'cursor': 'pointer',
+ 'height': bodywrapper.height(),
+ 'padding-top': '1px',
+ 'margin-left': ssb_width_expanded - 12
+ });
+
+ sidebarbutton.hover(
+ function () {
+ $(this).css('background-color', dark_color);
+ },
+ function () {
+ $(this).css('background-color', light_color);
+ }
+ );
+ }
+
+ function set_position_from_cookie() {
+ if (!document.cookie)
+ return;
+ var items = document.cookie.split(';');
+ for(var k=0; k<items.length; k++) {
+ var key_val = items[k].split('=');
+ var key = key_val[0].replace(/ /, ""); // strip leading spaces
+ if (key == 'sidebar') {
+ var value = key_val[1];
+ if ((value == 'collapsed') && (!sidebar_is_collapsed()))
+ collapse_sidebar();
+ else if ((value == 'expanded') && (sidebar_is_collapsed()))
+ expand_sidebar();
+ }
+ }
+ }
+
+ add_sidebar_button();
+ var sidebarbutton = $('#sidebarbutton');
+ set_position_from_cookie();
+});
\ No newline at end of file
--- /dev/null
+// Underscore.js 1.3.1
+// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
+// Underscore is freely distributable under the MIT license.
+// Portions of Underscore are inspired or borrowed from Prototype,
+// Oliver Steele's Functional, and John Resig's Micro-Templating.
+// For all details and documentation:
+// http://documentcloud.github.com/underscore
+
+(function() {
+
+ // Baseline setup
+ // --------------
+
+ // Establish the root object, `window` in the browser, or `global` on the server.
+ var root = this;
+
+ // Save the previous value of the `_` variable.
+ var previousUnderscore = root._;
+
+ // Establish the object that gets returned to break out of a loop iteration.
+ var breaker = {};
+
+ // Save bytes in the minified (but not gzipped) version:
+ var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
+
+ // Create quick reference variables for speed access to core prototypes.
+ var slice = ArrayProto.slice,
+ unshift = ArrayProto.unshift,
+ toString = ObjProto.toString,
+ hasOwnProperty = ObjProto.hasOwnProperty;
+
+ // All **ECMAScript 5** native function implementations that we hope to use
+ // are declared here.
+ var
+ nativeForEach = ArrayProto.forEach,
+ nativeMap = ArrayProto.map,
+ nativeReduce = ArrayProto.reduce,
+ nativeReduceRight = ArrayProto.reduceRight,
+ nativeFilter = ArrayProto.filter,
+ nativeEvery = ArrayProto.every,
+ nativeSome = ArrayProto.some,
+ nativeIndexOf = ArrayProto.indexOf,
+ nativeLastIndexOf = ArrayProto.lastIndexOf,
+ nativeIsArray = Array.isArray,
+ nativeKeys = Object.keys,
+ nativeBind = FuncProto.bind;
+
+ // Create a safe reference to the Underscore object for use below.
+ var _ = function(obj) { return new wrapper(obj); };
+
+ // Export the Underscore object for **Node.js**, with
+ // backwards-compatibility for the old `require()` API. If we're in
+ // the browser, add `_` as a global object via a string identifier,
+ // for Closure Compiler "advanced" mode.
+ if (typeof exports !== 'undefined') {
+ if (typeof module !== 'undefined' && module.exports) {
+ exports = module.exports = _;
+ }
+ exports._ = _;
+ } else {
+ root['_'] = _;
+ }
+
+ // Current version.
+ _.VERSION = '1.3.1';
+
+ // Collection Functions
+ // --------------------
+
+ // The cornerstone, an `each` implementation, aka `forEach`.
+ // Handles objects with the built-in `forEach`, arrays, and raw objects.
+ // Delegates to **ECMAScript 5**'s native `forEach` if available.
+ var each = _.each = _.forEach = function(obj, iterator, context) {
+ if (obj == null) return;
+ if (nativeForEach && obj.forEach === nativeForEach) {
+ obj.forEach(iterator, context);
+ } else if (obj.length === +obj.length) {
+ for (var i = 0, l = obj.length; i < l; i++) {
+ if (i in obj && iterator.call(context, obj[i], i, obj) === breaker) return;
+ }
+ } else {
+ for (var key in obj) {
+ if (_.has(obj, key)) {
+ if (iterator.call(context, obj[key], key, obj) === breaker) return;
+ }
+ }
+ }
+ };
+
+ // Return the results of applying the iterator to each element.
+ // Delegates to **ECMAScript 5**'s native `map` if available.
+ _.map = _.collect = function(obj, iterator, context) {
+ var results = [];
+ if (obj == null) return results;
+ if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
+ each(obj, function(value, index, list) {
+ results[results.length] = iterator.call(context, value, index, list);
+ });
+ if (obj.length === +obj.length) results.length = obj.length;
+ return results;
+ };
+
+ // **Reduce** builds up a single result from a list of values, aka `inject`,
+ // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.
+ _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {
+ var initial = arguments.length > 2;
+ if (obj == null) obj = [];
+ if (nativeReduce && obj.reduce === nativeReduce) {
+ if (context) iterator = _.bind(iterator, context);
+ return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
+ }
+ each(obj, function(value, index, list) {
+ if (!initial) {
+ memo = value;
+ initial = true;
+ } else {
+ memo = iterator.call(context, memo, value, index, list);
+ }
+ });
+ if (!initial) throw new TypeError('Reduce of empty array with no initial value');
+ return memo;
+ };
+
+ // The right-associative version of reduce, also known as `foldr`.
+ // Delegates to **ECMAScript 5**'s native `reduceRight` if available.
+ _.reduceRight = _.foldr = function(obj, iterator, memo, context) {
+ var initial = arguments.length > 2;
+ if (obj == null) obj = [];
+ if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
+ if (context) iterator = _.bind(iterator, context);
+ return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
+ }
+ var reversed = _.toArray(obj).reverse();
+ if (context && !initial) iterator = _.bind(iterator, context);
+ return initial ? _.reduce(reversed, iterator, memo, context) : _.reduce(reversed, iterator);
+ };
+
+ // Return the first value which passes a truth test. Aliased as `detect`.
+ _.find = _.detect = function(obj, iterator, context) {
+ var result;
+ any(obj, function(value, index, list) {
+ if (iterator.call(context, value, index, list)) {
+ result = value;
+ return true;
+ }
+ });
+ return result;
+ };
+
+ // Return all the elements that pass a truth test.
+ // Delegates to **ECMAScript 5**'s native `filter` if available.
+ // Aliased as `select`.
+ _.filter = _.select = function(obj, iterator, context) {
+ var results = [];
+ if (obj == null) return results;
+ if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);
+ each(obj, function(value, index, list) {
+ if (iterator.call(context, value, index, list)) results[results.length] = value;
+ });
+ return results;
+ };
+
+ // Return all the elements for which a truth test fails.
+ _.reject = function(obj, iterator, context) {
+ var results = [];
+ if (obj == null) return results;
+ each(obj, function(value, index, list) {
+ if (!iterator.call(context, value, index, list)) results[results.length] = value;
+ });
+ return results;
+ };
+
+ // Determine whether all of the elements match a truth test.
+ // Delegates to **ECMAScript 5**'s native `every` if available.
+ // Aliased as `all`.
+ _.every = _.all = function(obj, iterator, context) {
+ var result = true;
+ if (obj == null) return result;
+ if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);
+ each(obj, function(value, index, list) {
+ if (!(result = result && iterator.call(context, value, index, list))) return breaker;
+ });
+ return result;
+ };
+
+ // Determine if at least one element in the object matches a truth test.
+ // Delegates to **ECMAScript 5**'s native `some` if available.
+ // Aliased as `any`.
+ var any = _.some = _.any = function(obj, iterator, context) {
+ iterator || (iterator = _.identity);
+ var result = false;
+ if (obj == null) return result;
+ if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);
+ each(obj, function(value, index, list) {
+ if (result || (result = iterator.call(context, value, index, list))) return breaker;
+ });
+ return !!result;
+ };
+
+ // Determine if a given value is included in the array or object using `===`.
+ // Aliased as `contains`.
+ _.include = _.contains = function(obj, target) {
+ var found = false;
+ if (obj == null) return found;
+ if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
+ found = any(obj, function(value) {
+ return value === target;
+ });
+ return found;
+ };
+
+ // Invoke a method (with arguments) on every item in a collection.
+ _.invoke = function(obj, method) {
+ var args = slice.call(arguments, 2);
+ return _.map(obj, function(value) {
+ return (_.isFunction(method) ? method || value : value[method]).apply(value, args);
+ });
+ };
+
+ // Convenience version of a common use case of `map`: fetching a property.
+ _.pluck = function(obj, key) {
+ return _.map(obj, function(value){ return value[key]; });
+ };
+
+ // Return the maximum element or (element-based computation).
+ _.max = function(obj, iterator, context) {
+ if (!iterator && _.isArray(obj)) return Math.max.apply(Math, obj);
+ if (!iterator && _.isEmpty(obj)) return -Infinity;
+ var result = {computed : -Infinity};
+ each(obj, function(value, index, list) {
+ var computed = iterator ? iterator.call(context, value, index, list) : value;
+ computed >= result.computed && (result = {value : value, computed : computed});
+ });
+ return result.value;
+ };
+
+ // Return the minimum element (or element-based computation).
+ _.min = function(obj, iterator, context) {
+ if (!iterator && _.isArray(obj)) return Math.min.apply(Math, obj);
+ if (!iterator && _.isEmpty(obj)) return Infinity;
+ var result = {computed : Infinity};
+ each(obj, function(value, index, list) {
+ var computed = iterator ? iterator.call(context, value, index, list) : value;
+ computed < result.computed && (result = {value : value, computed : computed});
+ });
+ return result.value;
+ };
+
+ // Shuffle an array.
+ _.shuffle = function(obj) {
+ var shuffled = [], rand;
+ each(obj, function(value, index, list) {
+ if (index == 0) {
+ shuffled[0] = value;
+ } else {
+ rand = Math.floor(Math.random() * (index + 1));
+ shuffled[index] = shuffled[rand];
+ shuffled[rand] = value;
+ }
+ });
+ return shuffled;
+ };
+
+ // Sort the object's values by a criterion produced by an iterator.
+ _.sortBy = function(obj, iterator, context) {
+ return _.pluck(_.map(obj, function(value, index, list) {
+ return {
+ value : value,
+ criteria : iterator.call(context, value, index, list)
+ };
+ }).sort(function(left, right) {
+ var a = left.criteria, b = right.criteria;
+ return a < b ? -1 : a > b ? 1 : 0;
+ }), 'value');
+ };
+
+ // Groups the object's values by a criterion. Pass either a string attribute
+ // to group by, or a function that returns the criterion.
+ _.groupBy = function(obj, val) {
+ var result = {};
+ var iterator = _.isFunction(val) ? val : function(obj) { return obj[val]; };
+ each(obj, function(value, index) {
+ var key = iterator(value, index);
+ (result[key] || (result[key] = [])).push(value);
+ });
+ return result;
+ };
+
+ // Use a comparator function to figure out at what index an object should
+ // be inserted so as to maintain order. Uses binary search.
+ _.sortedIndex = function(array, obj, iterator) {
+ iterator || (iterator = _.identity);
+ var low = 0, high = array.length;
+ while (low < high) {
+ var mid = (low + high) >> 1;
+ iterator(array[mid]) < iterator(obj) ? low = mid + 1 : high = mid;
+ }
+ return low;
+ };
+
+ // Safely convert anything iterable into a real, live array.
+ _.toArray = function(iterable) {
+ if (!iterable) return [];
+ if (iterable.toArray) return iterable.toArray();
+ if (_.isArray(iterable)) return slice.call(iterable);
+ if (_.isArguments(iterable)) return slice.call(iterable);
+ return _.values(iterable);
+ };
+
+ // Return the number of elements in an object.
+ _.size = function(obj) {
+ return _.toArray(obj).length;
+ };
+
+ // Array Functions
+ // ---------------
+
+ // Get the first element of an array. Passing **n** will return the first N
+ // values in the array. Aliased as `head`. The **guard** check allows it to work
+ // with `_.map`.
+ _.first = _.head = function(array, n, guard) {
+ return (n != null) && !guard ? slice.call(array, 0, n) : array[0];
+ };
+
+ // Returns everything but the last entry of the array. Especcialy useful on
+ // the arguments object. Passing **n** will return all the values in
+ // the array, excluding the last N. The **guard** check allows it to work with
+ // `_.map`.
+ _.initial = function(array, n, guard) {
+ return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));
+ };
+
+ // Get the last element of an array. Passing **n** will return the last N
+ // values in the array. The **guard** check allows it to work with `_.map`.
+ _.last = function(array, n, guard) {
+ if ((n != null) && !guard) {
+ return slice.call(array, Math.max(array.length - n, 0));
+ } else {
+ return array[array.length - 1];
+ }
+ };
+
+ // Returns everything but the first entry of the array. Aliased as `tail`.
+ // Especially useful on the arguments object. Passing an **index** will return
+ // the rest of the values in the array from that index onward. The **guard**
+ // check allows it to work with `_.map`.
+ _.rest = _.tail = function(array, index, guard) {
+ return slice.call(array, (index == null) || guard ? 1 : index);
+ };
+
+ // Trim out all falsy values from an array.
+ _.compact = function(array) {
+ return _.filter(array, function(value){ return !!value; });
+ };
+
+ // Return a completely flattened version of an array.
+ _.flatten = function(array, shallow) {
+ return _.reduce(array, function(memo, value) {
+ if (_.isArray(value)) return memo.concat(shallow ? value : _.flatten(value));
+ memo[memo.length] = value;
+ return memo;
+ }, []);
+ };
+
+ // Return a version of the array that does not contain the specified value(s).
+ _.without = function(array) {
+ return _.difference(array, slice.call(arguments, 1));
+ };
+
+ // Produce a duplicate-free version of the array. If the array has already
+ // been sorted, you have the option of using a faster algorithm.
+ // Aliased as `unique`.
+ _.uniq = _.unique = function(array, isSorted, iterator) {
+ var initial = iterator ? _.map(array, iterator) : array;
+ var result = [];
+ _.reduce(initial, function(memo, el, i) {
+ if (0 == i || (isSorted === true ? _.last(memo) != el : !_.include(memo, el))) {
+ memo[memo.length] = el;
+ result[result.length] = array[i];
+ }
+ return memo;
+ }, []);
+ return result;
+ };
+
+ // Produce an array that contains the union: each distinct element from all of
+ // the passed-in arrays.
+ _.union = function() {
+ return _.uniq(_.flatten(arguments, true));
+ };
+
+ // Produce an array that contains every item shared between all the
+ // passed-in arrays. (Aliased as "intersect" for back-compat.)
+ _.intersection = _.intersect = function(array) {
+ var rest = slice.call(arguments, 1);
+ return _.filter(_.uniq(array), function(item) {
+ return _.every(rest, function(other) {
+ return _.indexOf(other, item) >= 0;
+ });
+ });
+ };
+
+ // Take the difference between one array and a number of other arrays.
+ // Only the elements present in just the first array will remain.
+ _.difference = function(array) {
+ var rest = _.flatten(slice.call(arguments, 1));
+ return _.filter(array, function(value){ return !_.include(rest, value); });
+ };
+
+ // Zip together multiple lists into a single array -- elements that share
+ // an index go together.
+ _.zip = function() {
+ var args = slice.call(arguments);
+ var length = _.max(_.pluck(args, 'length'));
+ var results = new Array(length);
+ for (var i = 0; i < length; i++) results[i] = _.pluck(args, "" + i);
+ return results;
+ };
+
+ // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),
+ // we need this function. Return the position of the first occurrence of an
+ // item in an array, or -1 if the item is not included in the array.
+ // Delegates to **ECMAScript 5**'s native `indexOf` if available.
+ // If the array is large and already in sort order, pass `true`
+ // for **isSorted** to use binary search.
+ _.indexOf = function(array, item, isSorted) {
+ if (array == null) return -1;
+ var i, l;
+ if (isSorted) {
+ i = _.sortedIndex(array, item);
+ return array[i] === item ? i : -1;
+ }
+ if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item);
+ for (i = 0, l = array.length; i < l; i++) if (i in array && array[i] === item) return i;
+ return -1;
+ };
+
+ // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.
+ _.lastIndexOf = function(array, item) {
+ if (array == null) return -1;
+ if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) return array.lastIndexOf(item);
+ var i = array.length;
+ while (i--) if (i in array && array[i] === item) return i;
+ return -1;
+ };
+
+ // Generate an integer Array containing an arithmetic progression. A port of
+ // the native Python `range()` function. See
+ // [the Python documentation](http://docs.python.org/library/functions.html#range).
+ _.range = function(start, stop, step) {
+ if (arguments.length <= 1) {
+ stop = start || 0;
+ start = 0;
+ }
+ step = arguments[2] || 1;
+
+ var len = Math.max(Math.ceil((stop - start) / step), 0);
+ var idx = 0;
+ var range = new Array(len);
+
+ while(idx < len) {
+ range[idx++] = start;
+ start += step;
+ }
+
+ return range;
+ };
+
+ // Function (ahem) Functions
+ // ------------------
+
+ // Reusable constructor function for prototype setting.
+ var ctor = function(){};
+
+ // Create a function bound to a given object (assigning `this`, and arguments,
+ // optionally). Binding with arguments is also known as `curry`.
+ // Delegates to **ECMAScript 5**'s native `Function.bind` if available.
+ // We check for `func.bind` first, to fail fast when `func` is undefined.
+ _.bind = function bind(func, context) {
+ var bound, args;
+ if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
+ if (!_.isFunction(func)) throw new TypeError;
+ args = slice.call(arguments, 2);
+ return bound = function() {
+ if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));
+ ctor.prototype = func.prototype;
+ var self = new ctor;
+ var result = func.apply(self, args.concat(slice.call(arguments)));
+ if (Object(result) === result) return result;
+ return self;
+ };
+ };
+
+ // Bind all of an object's methods to that object. Useful for ensuring that
+ // all callbacks defined on an object belong to it.
+ _.bindAll = function(obj) {
+ var funcs = slice.call(arguments, 1);
+ if (funcs.length == 0) funcs = _.functions(obj);
+ each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });
+ return obj;
+ };
+
+ // Memoize an expensive function by storing its results.
+ _.memoize = function(func, hasher) {
+ var memo = {};
+ hasher || (hasher = _.identity);
+ return function() {
+ var key = hasher.apply(this, arguments);
+ return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
+ };
+ };
+
+ // Delays a function for the given number of milliseconds, and then calls
+ // it with the arguments supplied.
+ _.delay = function(func, wait) {
+ var args = slice.call(arguments, 2);
+ return setTimeout(function(){ return func.apply(func, args); }, wait);
+ };
+
+ // Defers a function, scheduling it to run after the current call stack has
+ // cleared.
+ _.defer = function(func) {
+ return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
+ };
+
+ // Returns a function, that, when invoked, will only be triggered at most once
+ // during a given window of time.
+ _.throttle = function(func, wait) {
+ var context, args, timeout, throttling, more;
+ var whenDone = _.debounce(function(){ more = throttling = false; }, wait);
+ return function() {
+ context = this; args = arguments;
+ var later = function() {
+ timeout = null;
+ if (more) func.apply(context, args);
+ whenDone();
+ };
+ if (!timeout) timeout = setTimeout(later, wait);
+ if (throttling) {
+ more = true;
+ } else {
+ func.apply(context, args);
+ }
+ whenDone();
+ throttling = true;
+ };
+ };
+
+ // Returns a function, that, as long as it continues to be invoked, will not
+ // be triggered. The function will be called after it stops being called for
+ // N milliseconds.
+ _.debounce = function(func, wait) {
+ var timeout;
+ return function() {
+ var context = this, args = arguments;
+ var later = function() {
+ timeout = null;
+ func.apply(context, args);
+ };
+ clearTimeout(timeout);
+ timeout = setTimeout(later, wait);
+ };
+ };
+
+ // Returns a function that will be executed at most one time, no matter how
+ // often you call it. Useful for lazy initialization.
+ _.once = function(func) {
+ var ran = false, memo;
+ return function() {
+ if (ran) return memo;
+ ran = true;
+ return memo = func.apply(this, arguments);
+ };
+ };
+
+ // Returns the first function passed as an argument to the second,
+ // allowing you to adjust arguments, run code before and after, and
+ // conditionally execute the original function.
+ _.wrap = function(func, wrapper) {
+ return function() {
+ var args = [func].concat(slice.call(arguments, 0));
+ return wrapper.apply(this, args);
+ };
+ };
+
+ // Returns a function that is the composition of a list of functions, each
+ // consuming the return value of the function that follows.
+ _.compose = function() {
+ var funcs = arguments;
+ return function() {
+ var args = arguments;
+ for (var i = funcs.length - 1; i >= 0; i--) {
+ args = [funcs[i].apply(this, args)];
+ }
+ return args[0];
+ };
+ };
+
+ // Returns a function that will only be executed after being called N times.
+ _.after = function(times, func) {
+ if (times <= 0) return func();
+ return function() {
+ if (--times < 1) { return func.apply(this, arguments); }
+ };
+ };
+
+ // Object Functions
+ // ----------------
+
+ // Retrieve the names of an object's properties.
+ // Delegates to **ECMAScript 5**'s native `Object.keys`
+ _.keys = nativeKeys || function(obj) {
+ if (obj !== Object(obj)) throw new TypeError('Invalid object');
+ var keys = [];
+ for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key;
+ return keys;
+ };
+
+ // Retrieve the values of an object's properties.
+ _.values = function(obj) {
+ return _.map(obj, _.identity);
+ };
+
+ // Return a sorted list of the function names available on the object.
+ // Aliased as `methods`
+ _.functions = _.methods = function(obj) {
+ var names = [];
+ for (var key in obj) {
+ if (_.isFunction(obj[key])) names.push(key);
+ }
+ return names.sort();
+ };
+
+ // Extend a given object with all the properties in passed-in object(s).
+ _.extend = function(obj) {
+ each(slice.call(arguments, 1), function(source) {
+ for (var prop in source) {
+ obj[prop] = source[prop];
+ }
+ });
+ return obj;
+ };
+
+ // Fill in a given object with default properties.
+ _.defaults = function(obj) {
+ each(slice.call(arguments, 1), function(source) {
+ for (var prop in source) {
+ if (obj[prop] == null) obj[prop] = source[prop];
+ }
+ });
+ return obj;
+ };
+
+ // Create a (shallow-cloned) duplicate of an object.
+ _.clone = function(obj) {
+ if (!_.isObject(obj)) return obj;
+ return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
+ };
+
+ // Invokes interceptor with the obj, and then returns obj.
+ // The primary purpose of this method is to "tap into" a method chain, in
+ // order to perform operations on intermediate results within the chain.
+ _.tap = function(obj, interceptor) {
+ interceptor(obj);
+ return obj;
+ };
+
+ // Internal recursive comparison function.
+ function eq(a, b, stack) {
+ // Identical objects are equal. `0 === -0`, but they aren't identical.
+ // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.
+ if (a === b) return a !== 0 || 1 / a == 1 / b;
+ // A strict comparison is necessary because `null == undefined`.
+ if (a == null || b == null) return a === b;
+ // Unwrap any wrapped objects.
+ if (a._chain) a = a._wrapped;
+ if (b._chain) b = b._wrapped;
+ // Invoke a custom `isEqual` method if one is provided.
+ if (a.isEqual && _.isFunction(a.isEqual)) return a.isEqual(b);
+ if (b.isEqual && _.isFunction(b.isEqual)) return b.isEqual(a);
+ // Compare `[[Class]]` names.
+ var className = toString.call(a);
+ if (className != toString.call(b)) return false;
+ switch (className) {
+ // Strings, numbers, dates, and booleans are compared by value.
+ case '[object String]':
+ // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
+ // equivalent to `new String("5")`.
+ return a == String(b);
+ case '[object Number]':
+ // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for
+ // other numeric values.
+ return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);
+ case '[object Date]':
+ case '[object Boolean]':
+ // Coerce dates and booleans to numeric primitive values. Dates are compared by their
+ // millisecond representations. Note that invalid dates with millisecond representations
+ // of `NaN` are not equivalent.
+ return +a == +b;
+ // RegExps are compared by their source patterns and flags.
+ case '[object RegExp]':
+ return a.source == b.source &&
+ a.global == b.global &&
+ a.multiline == b.multiline &&
+ a.ignoreCase == b.ignoreCase;
+ }
+ if (typeof a != 'object' || typeof b != 'object') return false;
+ // Assume equality for cyclic structures. The algorithm for detecting cyclic
+ // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
+ var length = stack.length;
+ while (length--) {
+ // Linear search. Performance is inversely proportional to the number of
+ // unique nested structures.
+ if (stack[length] == a) return true;
+ }
+ // Add the first object to the stack of traversed objects.
+ stack.push(a);
+ var size = 0, result = true;
+ // Recursively compare objects and arrays.
+ if (className == '[object Array]') {
+ // Compare array lengths to determine if a deep comparison is necessary.
+ size = a.length;
+ result = size == b.length;
+ if (result) {
+ // Deep compare the contents, ignoring non-numeric properties.
+ while (size--) {
+ // Ensure commutative equality for sparse arrays.
+ if (!(result = size in a == size in b && eq(a[size], b[size], stack))) break;
+ }
+ }
+ } else {
+ // Objects with different constructors are not equivalent.
+ if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false;
+ // Deep compare objects.
+ for (var key in a) {
+ if (_.has(a, key)) {
+ // Count the expected number of properties.
+ size++;
+ // Deep compare each member.
+ if (!(result = _.has(b, key) && eq(a[key], b[key], stack))) break;
+ }
+ }
+ // Ensure that both objects contain the same number of properties.
+ if (result) {
+ for (key in b) {
+ if (_.has(b, key) && !(size--)) break;
+ }
+ result = !size;
+ }
+ }
+ // Remove the first object from the stack of traversed objects.
+ stack.pop();
+ return result;
+ }
+
+ // Perform a deep comparison to check if two objects are equal.
+ _.isEqual = function(a, b) {
+ return eq(a, b, []);
+ };
+
+ // Is a given array, string, or object empty?
+ // An "empty" object has no enumerable own-properties.
+ _.isEmpty = function(obj) {
+ if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;
+ for (var key in obj) if (_.has(obj, key)) return false;
+ return true;
+ };
+
+ // Is a given value a DOM element?
+ _.isElement = function(obj) {
+ return !!(obj && obj.nodeType == 1);
+ };
+
+ // Is a given value an array?
+ // Delegates to ECMA5's native Array.isArray
+ _.isArray = nativeIsArray || function(obj) {
+ return toString.call(obj) == '[object Array]';
+ };
+
+ // Is a given variable an object?
+ _.isObject = function(obj) {
+ return obj === Object(obj);
+ };
+
+ // Is a given variable an arguments object?
+ _.isArguments = function(obj) {
+ return toString.call(obj) == '[object Arguments]';
+ };
+ if (!_.isArguments(arguments)) {
+ _.isArguments = function(obj) {
+ return !!(obj && _.has(obj, 'callee'));
+ };
+ }
+
+ // Is a given value a function?
+ _.isFunction = function(obj) {
+ return toString.call(obj) == '[object Function]';
+ };
+
+ // Is a given value a string?
+ _.isString = function(obj) {
+ return toString.call(obj) == '[object String]';
+ };
+
+ // Is a given value a number?
+ _.isNumber = function(obj) {
+ return toString.call(obj) == '[object Number]';
+ };
+
+ // Is the given value `NaN`?
+ _.isNaN = function(obj) {
+ // `NaN` is the only value for which `===` is not reflexive.
+ return obj !== obj;
+ };
+
+ // Is a given value a boolean?
+ _.isBoolean = function(obj) {
+ return obj === true || obj === false || toString.call(obj) == '[object Boolean]';
+ };
+
+ // Is a given value a date?
+ _.isDate = function(obj) {
+ return toString.call(obj) == '[object Date]';
+ };
+
+ // Is the given value a regular expression?
+ _.isRegExp = function(obj) {
+ return toString.call(obj) == '[object RegExp]';
+ };
+
+ // Is a given value equal to null?
+ _.isNull = function(obj) {
+ return obj === null;
+ };
+
+ // Is a given variable undefined?
+ _.isUndefined = function(obj) {
+ return obj === void 0;
+ };
+
+ // Has own property?
+ _.has = function(obj, key) {
+ return hasOwnProperty.call(obj, key);
+ };
+
+ // Utility Functions
+ // -----------------
+
+ // Run Underscore.js in *noConflict* mode, returning the `_` variable to its
+ // previous owner. Returns a reference to the Underscore object.
+ _.noConflict = function() {
+ root._ = previousUnderscore;
+ return this;
+ };
+
+ // Keep the identity function around for default iterators.
+ _.identity = function(value) {
+ return value;
+ };
+
+ // Run a function **n** times.
+ _.times = function (n, iterator, context) {
+ for (var i = 0; i < n; i++) iterator.call(context, i);
+ };
+
+ // Escape a string for HTML interpolation.
+ _.escape = function(string) {
+ return (''+string).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''').replace(/\//g,'/');
+ };
+
+ // Add your own custom functions to the Underscore object, ensuring that
+ // they're correctly added to the OOP wrapper as well.
+ _.mixin = function(obj) {
+ each(_.functions(obj), function(name){
+ addToWrapper(name, _[name] = obj[name]);
+ });
+ };
+
+ // Generate a unique integer id (unique within the entire client session).
+ // Useful for temporary DOM ids.
+ var idCounter = 0;
+ _.uniqueId = function(prefix) {
+ var id = idCounter++;
+ return prefix ? prefix + id : id;
+ };
+
+ // By default, Underscore uses ERB-style template delimiters, change the
+ // following template settings to use alternative delimiters.
+ _.templateSettings = {
+ evaluate : /<%([\s\S]+?)%>/g,
+ interpolate : /<%=([\s\S]+?)%>/g,
+ escape : /<%-([\s\S]+?)%>/g
+ };
+
+ // When customizing `templateSettings`, if you don't want to define an
+ // interpolation, evaluation or escaping regex, we need one that is
+ // guaranteed not to match.
+ var noMatch = /.^/;
+
+ // Within an interpolation, evaluation, or escaping, remove HTML escaping
+ // that had been previously added.
+ var unescape = function(code) {
+ return code.replace(/\\\\/g, '\\').replace(/\\'/g, "'");
+ };
+
+ // JavaScript micro-templating, similar to John Resig's implementation.
+ // Underscore templating handles arbitrary delimiters, preserves whitespace,
+ // and correctly escapes quotes within interpolated code.
+ _.template = function(str, data) {
+ var c = _.templateSettings;
+ var tmpl = 'var __p=[],print=function(){__p.push.apply(__p,arguments);};' +
+ 'with(obj||{}){__p.push(\'' +
+ str.replace(/\\/g, '\\\\')
+ .replace(/'/g, "\\'")
+ .replace(c.escape || noMatch, function(match, code) {
+ return "',_.escape(" + unescape(code) + "),'";
+ })
+ .replace(c.interpolate || noMatch, function(match, code) {
+ return "'," + unescape(code) + ",'";
+ })
+ .replace(c.evaluate || noMatch, function(match, code) {
+ return "');" + unescape(code).replace(/[\r\n\t]/g, ' ') + ";__p.push('";
+ })
+ .replace(/\r/g, '\\r')
+ .replace(/\n/g, '\\n')
+ .replace(/\t/g, '\\t')
+ + "');}return __p.join('');";
+ var func = new Function('obj', '_', tmpl);
+ if (data) return func(data, _);
+ return function(data) {
+ return func.call(this, data, _);
+ };
+ };
+
+ // Add a "chain" function, which will delegate to the wrapper.
+ _.chain = function(obj) {
+ return _(obj).chain();
+ };
+
+ // The OOP Wrapper
+ // ---------------
+
+ // If Underscore is called as a function, it returns a wrapped object that
+ // can be used OO-style. This wrapper holds altered versions of all the
+ // underscore functions. Wrapped objects may be chained.
+ var wrapper = function(obj) { this._wrapped = obj; };
+
+ // Expose `wrapper.prototype` as `_.prototype`
+ _.prototype = wrapper.prototype;
+
+ // Helper function to continue chaining intermediate results.
+ var result = function(obj, chain) {
+ return chain ? _(obj).chain() : obj;
+ };
+
+ // A method to easily add functions to the OOP wrapper.
+ var addToWrapper = function(name, func) {
+ wrapper.prototype[name] = function() {
+ var args = slice.call(arguments);
+ unshift.call(args, this._wrapped);
+ return result(func.apply(_, args), this._chain);
+ };
+ };
+
+ // Add all of the Underscore functions to the wrapper object.
+ _.mixin(_);
+
+ // Add all mutator Array functions to the wrapper.
+ each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
+ var method = ArrayProto[name];
+ wrapper.prototype[name] = function() {
+ var wrapped = this._wrapped;
+ method.apply(wrapped, arguments);
+ var length = wrapped.length;
+ if ((name == 'shift' || name == 'splice') && length === 0) delete wrapped[0];
+ return result(wrapped, this._chain);
+ };
+ });
+
+ // Add all accessor Array functions to the wrapper.
+ each(['concat', 'join', 'slice'], function(name) {
+ var method = ArrayProto[name];
+ wrapper.prototype[name] = function() {
+ return result(method.apply(this._wrapped, arguments), this._chain);
+ };
+ });
+
+ // Start chaining a wrapped Underscore object.
+ wrapper.prototype.chain = function() {
+ this._chain = true;
+ return this;
+ };
+
+ // Extracts the result from a wrapped and chained object.
+ wrapper.prototype.value = function() {
+ return this._wrapped;
+ };
+
+}).call(this);
--- /dev/null
+// Underscore.js 1.3.1
+// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
+// Underscore is freely distributable under the MIT license.
+// Portions of Underscore are inspired or borrowed from Prototype,
+// Oliver Steele's Functional, and John Resig's Micro-Templating.
+// For all details and documentation:
+// http://documentcloud.github.com/underscore
+(function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source==
+c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&q(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&q(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c,
+h)&&!f--)break;g=!f}}d.pop();return g}var r=this,G=r._,n={},k=Array.prototype,o=Object.prototype,i=k.slice,H=k.unshift,l=o.toString,I=o.hasOwnProperty,w=k.forEach,x=k.map,y=k.reduce,z=k.reduceRight,A=k.filter,B=k.every,C=k.some,p=k.indexOf,D=k.lastIndexOf,o=Array.isArray,J=Object.keys,s=Function.prototype.bind,b=function(a){return new m(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else r._=b;b.VERSION="1.3.1";var j=b.each=
+b.forEach=function(a,c,d){if(a!=null)if(w&&a.forEach===w)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e<f;e++){if(e in a&&c.call(d,a[e],e,a)===n)break}else for(e in a)if(b.has(a,e)&&c.call(d,a[e],e,a)===n)break};b.map=b.collect=function(a,c,b){var e=[];if(a==null)return e;if(x&&a.map===x)return a.map(c,b);j(a,function(a,g,h){e[e.length]=c.call(b,a,g,h)});if(a.length===+a.length)e.length=a.length;return e};b.reduce=b.foldl=b.inject=function(a,c,d,e){var f=arguments.length>2;a==
+null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect=
+function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e=
+e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck=
+function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b<e.computed&&(e={value:a,computed:b})});
+return e.value};b.shuffle=function(a){var b=[],d;j(a,function(a,f){f==0?b[0]=a:(d=Math.floor(Math.random()*(f+1)),b[f]=b[d],b[d]=a)});return b};b.sortBy=function(a,c,d){return b.pluck(b.map(a,function(a,b,g){return{value:a,criteria:c.call(d,a,b,g)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;return c<d?-1:c>d?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a,
+c,d){d||(d=b.identity);for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?e=g+1:f=g}return e};b.toArray=function(a){return!a?[]:a.toArray?a.toArray():b.isArray(a)?i.call(a):b.isArguments(a)?i.call(a):b.values(a)};b.size=function(a){return b.toArray(a).length};b.first=b.head=function(a,b,d){return b!=null&&!d?i.call(a,0,b):a[0]};b.initial=function(a,b,d){return i.call(a,0,a.length-(b==null||d?1:b))};b.last=function(a,b,d){return b!=null&&!d?i.call(a,Math.max(a.length-b,0)):a[a.length-1]};b.rest=
+b.tail=function(a,b,d){return i.call(a,b==null||d?1:b)};b.compact=function(a){return b.filter(a,function(a){return!!a})};b.flatten=function(a,c){return b.reduce(a,function(a,e){if(b.isArray(e))return a.concat(c?e:b.flatten(e));a[a.length]=e;return a},[])};b.without=function(a){return b.difference(a,i.call(arguments,1))};b.uniq=b.unique=function(a,c,d){var d=d?b.map(a,d):a,e=[];b.reduce(d,function(d,g,h){if(0==h||(c===true?b.last(d)!=g:!b.include(d,g)))d[d.length]=g,e[e.length]=a[h];return d},[]);
+return e};b.union=function(){return b.uniq(b.flatten(arguments,true))};b.intersection=b.intersect=function(a){var c=i.call(arguments,1);return b.filter(b.uniq(a),function(a){return b.every(c,function(c){return b.indexOf(c,a)>=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e<c;e++)d[e]=b.pluck(a,""+e);return d};b.indexOf=function(a,c,
+d){if(a==null)return-1;var e;if(d)return d=b.sortedIndex(a,c),a[d]===c?d:-1;if(p&&a.indexOf===p)return a.indexOf(c);for(d=0,e=a.length;d<e;d++)if(d in a&&a[d]===c)return d;return-1};b.lastIndexOf=function(a,b){if(a==null)return-1;if(D&&a.lastIndexOf===D)return a.lastIndexOf(b);for(var d=a.length;d--;)if(d in a&&a[d]===b)return d;return-1};b.range=function(a,b,d){arguments.length<=1&&(b=a||0,a=0);for(var d=arguments[2]||1,e=Math.max(Math.ceil((b-a)/d),0),f=0,g=Array(e);f<e;)g[f++]=a,a+=d;return g};
+var F=function(){};b.bind=function(a,c){var d,e;if(a.bind===s&&s)return s.apply(a,i.call(arguments,1));if(!b.isFunction(a))throw new TypeError;e=i.call(arguments,2);return d=function(){if(!(this instanceof d))return a.apply(c,e.concat(i.call(arguments)));F.prototype=a.prototype;var b=new F,g=a.apply(b,e.concat(i.call(arguments)));return Object(g)===g?g:b}};b.bindAll=function(a){var c=i.call(arguments,1);c.length==0&&(c=b.functions(a));j(c,function(c){a[c]=b.bind(a[c],a)});return a};b.memoize=function(a,
+c){var d={};c||(c=b.identity);return function(){var e=c.apply(this,arguments);return b.has(d,e)?d[e]:d[e]=a.apply(this,arguments)}};b.delay=function(a,b){var d=i.call(arguments,2);return setTimeout(function(){return a.apply(a,d)},b)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(i.call(arguments,1)))};b.throttle=function(a,c){var d,e,f,g,h,i=b.debounce(function(){h=g=false},c);return function(){d=this;e=arguments;var b;f||(f=setTimeout(function(){f=null;h&&a.apply(d,e);i()},c));g?h=true:
+a.apply(d,e);i();g=true}};b.debounce=function(a,b){var d;return function(){var e=this,f=arguments;clearTimeout(d);d=setTimeout(function(){d=null;a.apply(e,f)},b)}};b.once=function(a){var b=false,d;return function(){if(b)return d;b=true;return d=a.apply(this,arguments)}};b.wrap=function(a,b){return function(){var d=[a].concat(i.call(arguments,0));return b.apply(this,d)}};b.compose=function(){var a=arguments;return function(){for(var b=arguments,d=a.length-1;d>=0;d--)b=[a[d].apply(this,b)];return b[0]}};
+b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments,
+1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)};
+b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"};
+b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e<a;e++)b.call(d,e)};b.escape=function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};b.mixin=function(a){j(b.functions(a),
+function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+
+u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]=
+function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain=
+true;return this};m.prototype.value=function(){return this._wrapped}}).call(this);
--- /dev/null
+/*
+ * websupport.js
+ * ~~~~~~~~~~~~~
+ *
+ * sphinx.websupport utilties for all documentation.
+ *
+ * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+(function($) {
+ $.fn.autogrow = function() {
+ return this.each(function() {
+ var textarea = this;
+
+ $.fn.autogrow.resize(textarea);
+
+ $(textarea)
+ .focus(function() {
+ textarea.interval = setInterval(function() {
+ $.fn.autogrow.resize(textarea);
+ }, 500);
+ })
+ .blur(function() {
+ clearInterval(textarea.interval);
+ });
+ });
+ };
+
+ $.fn.autogrow.resize = function(textarea) {
+ var lineHeight = parseInt($(textarea).css('line-height'), 10);
+ var lines = textarea.value.split('\n');
+ var columns = textarea.cols;
+ var lineCount = 0;
+ $.each(lines, function() {
+ lineCount += Math.ceil(this.length / columns) || 1;
+ });
+ var height = lineHeight * (lineCount + 1);
+ $(textarea).css('height', height);
+ };
+})(jQuery);
+
+(function($) {
+ var comp, by;
+
+ function init() {
+ initEvents();
+ initComparator();
+ }
+
+ function initEvents() {
+ $(document).on("click", 'a.comment-close', function(event) {
+ event.preventDefault();
+ hide($(this).attr('id').substring(2));
+ });
+ $(document).on("click", 'a.vote', function(event) {
+ event.preventDefault();
+ handleVote($(this));
+ });
+ $(document).on("click", 'a.reply', function(event) {
+ event.preventDefault();
+ openReply($(this).attr('id').substring(2));
+ });
+ $(document).on("click", 'a.close-reply', function(event) {
+ event.preventDefault();
+ closeReply($(this).attr('id').substring(2));
+ });
+ $(document).on("click", 'a.sort-option', function(event) {
+ event.preventDefault();
+ handleReSort($(this));
+ });
+ $(document).on("click", 'a.show-proposal', function(event) {
+ event.preventDefault();
+ showProposal($(this).attr('id').substring(2));
+ });
+ $(document).on("click", 'a.hide-proposal', function(event) {
+ event.preventDefault();
+ hideProposal($(this).attr('id').substring(2));
+ });
+ $(document).on("click", 'a.show-propose-change', function(event) {
+ event.preventDefault();
+ showProposeChange($(this).attr('id').substring(2));
+ });
+ $(document).on("click", 'a.hide-propose-change', function(event) {
+ event.preventDefault();
+ hideProposeChange($(this).attr('id').substring(2));
+ });
+ $(document).on("click", 'a.accept-comment', function(event) {
+ event.preventDefault();
+ acceptComment($(this).attr('id').substring(2));
+ });
+ $(document).on("click", 'a.delete-comment', function(event) {
+ event.preventDefault();
+ deleteComment($(this).attr('id').substring(2));
+ });
+ $(document).on("click", 'a.comment-markup', function(event) {
+ event.preventDefault();
+ toggleCommentMarkupBox($(this).attr('id').substring(2));
+ });
+ }
+
+ /**
+ * Set comp, which is a comparator function used for sorting and
+ * inserting comments into the list.
+ */
+ function setComparator() {
+ // If the first three letters are "asc", sort in ascending order
+ // and remove the prefix.
+ if (by.substring(0,3) == 'asc') {
+ var i = by.substring(3);
+ comp = function(a, b) { return a[i] - b[i]; };
+ } else {
+ // Otherwise sort in descending order.
+ comp = function(a, b) { return b[by] - a[by]; };
+ }
+
+ // Reset link styles and format the selected sort option.
+ $('a.sel').attr('href', '#').removeClass('sel');
+ $('a.by' + by).removeAttr('href').addClass('sel');
+ }
+
+ /**
+ * Create a comp function. If the user has preferences stored in
+ * the sortBy cookie, use those, otherwise use the default.
+ */
+ function initComparator() {
+ by = 'rating'; // Default to sort by rating.
+ // If the sortBy cookie is set, use that instead.
+ if (document.cookie.length > 0) {
+ var start = document.cookie.indexOf('sortBy=');
+ if (start != -1) {
+ start = start + 7;
+ var end = document.cookie.indexOf(";", start);
+ if (end == -1) {
+ end = document.cookie.length;
+ by = unescape(document.cookie.substring(start, end));
+ }
+ }
+ }
+ setComparator();
+ }
+
+ /**
+ * Show a comment div.
+ */
+ function show(id) {
+ $('#ao' + id).hide();
+ $('#ah' + id).show();
+ var context = $.extend({id: id}, opts);
+ var popup = $(renderTemplate(popupTemplate, context)).hide();
+ popup.find('textarea[name="proposal"]').hide();
+ popup.find('a.by' + by).addClass('sel');
+ var form = popup.find('#cf' + id);
+ form.submit(function(event) {
+ event.preventDefault();
+ addComment(form);
+ });
+ $('#s' + id).after(popup);
+ popup.slideDown('fast', function() {
+ getComments(id);
+ });
+ }
+
+ /**
+ * Hide a comment div.
+ */
+ function hide(id) {
+ $('#ah' + id).hide();
+ $('#ao' + id).show();
+ var div = $('#sc' + id);
+ div.slideUp('fast', function() {
+ div.remove();
+ });
+ }
+
+ /**
+ * Perform an ajax request to get comments for a node
+ * and insert the comments into the comments tree.
+ */
+ function getComments(id) {
+ $.ajax({
+ type: 'GET',
+ url: opts.getCommentsURL,
+ data: {node: id},
+ success: function(data, textStatus, request) {
+ var ul = $('#cl' + id);
+ var speed = 100;
+ $('#cf' + id)
+ .find('textarea[name="proposal"]')
+ .data('source', data.source);
+
+ if (data.comments.length === 0) {
+ ul.html('<li>No comments yet.</li>');
+ ul.data('empty', true);
+ } else {
+ // If there are comments, sort them and put them in the list.
+ var comments = sortComments(data.comments);
+ speed = data.comments.length * 100;
+ appendComments(comments, ul);
+ ul.data('empty', false);
+ }
+ $('#cn' + id).slideUp(speed + 200);
+ ul.slideDown(speed);
+ },
+ error: function(request, textStatus, error) {
+ showError('Oops, there was a problem retrieving the comments.');
+ },
+ dataType: 'json'
+ });
+ }
+
+ /**
+ * Add a comment via ajax and insert the comment into the comment tree.
+ */
+ function addComment(form) {
+ var node_id = form.find('input[name="node"]').val();
+ var parent_id = form.find('input[name="parent"]').val();
+ var text = form.find('textarea[name="comment"]').val();
+ var proposal = form.find('textarea[name="proposal"]').val();
+
+ if (text == '') {
+ showError('Please enter a comment.');
+ return;
+ }
+
+ // Disable the form that is being submitted.
+ form.find('textarea,input').attr('disabled', 'disabled');
+
+ // Send the comment to the server.
+ $.ajax({
+ type: "POST",
+ url: opts.addCommentURL,
+ dataType: 'json',
+ data: {
+ node: node_id,
+ parent: parent_id,
+ text: text,
+ proposal: proposal
+ },
+ success: function(data, textStatus, error) {
+ // Reset the form.
+ if (node_id) {
+ hideProposeChange(node_id);
+ }
+ form.find('textarea')
+ .val('')
+ .add(form.find('input'))
+ .removeAttr('disabled');
+ var ul = $('#cl' + (node_id || parent_id));
+ if (ul.data('empty')) {
+ $(ul).empty();
+ ul.data('empty', false);
+ }
+ insertComment(data.comment);
+ var ao = $('#ao' + node_id);
+ ao.find('img').attr({'src': opts.commentBrightImage});
+ if (node_id) {
+ // if this was a "root" comment, remove the commenting box
+ // (the user can get it back by reopening the comment popup)
+ $('#ca' + node_id).slideUp();
+ }
+ },
+ error: function(request, textStatus, error) {
+ form.find('textarea,input').removeAttr('disabled');
+ showError('Oops, there was a problem adding the comment.');
+ }
+ });
+ }
+
+ /**
+ * Recursively append comments to the main comment list and children
+ * lists, creating the comment tree.
+ */
+ function appendComments(comments, ul) {
+ $.each(comments, function() {
+ var div = createCommentDiv(this);
+ ul.append($(document.createElement('li')).html(div));
+ appendComments(this.children, div.find('ul.comment-children'));
+ // To avoid stagnating data, don't store the comments children in data.
+ this.children = null;
+ div.data('comment', this);
+ });
+ }
+
+ /**
+ * After adding a new comment, it must be inserted in the correct
+ * location in the comment tree.
+ */
+ function insertComment(comment) {
+ var div = createCommentDiv(comment);
+
+ // To avoid stagnating data, don't store the comments children in data.
+ comment.children = null;
+ div.data('comment', comment);
+
+ var ul = $('#cl' + (comment.node || comment.parent));
+ var siblings = getChildren(ul);
+
+ var li = $(document.createElement('li'));
+ li.hide();
+
+ // Determine where in the parents children list to insert this comment.
+ for(i=0; i < siblings.length; i++) {
+ if (comp(comment, siblings[i]) <= 0) {
+ $('#cd' + siblings[i].id)
+ .parent()
+ .before(li.html(div));
+ li.slideDown('fast');
+ return;
+ }
+ }
+
+ // If we get here, this comment rates lower than all the others,
+ // or it is the only comment in the list.
+ ul.append(li.html(div));
+ li.slideDown('fast');
+ }
+
+ function acceptComment(id) {
+ $.ajax({
+ type: 'POST',
+ url: opts.acceptCommentURL,
+ data: {id: id},
+ success: function(data, textStatus, request) {
+ $('#cm' + id).fadeOut('fast');
+ $('#cd' + id).removeClass('moderate');
+ },
+ error: function(request, textStatus, error) {
+ showError('Oops, there was a problem accepting the comment.');
+ }
+ });
+ }
+
+ function deleteComment(id) {
+ $.ajax({
+ type: 'POST',
+ url: opts.deleteCommentURL,
+ data: {id: id},
+ success: function(data, textStatus, request) {
+ var div = $('#cd' + id);
+ if (data == 'delete') {
+ // Moderator mode: remove the comment and all children immediately
+ div.slideUp('fast', function() {
+ div.remove();
+ });
+ return;
+ }
+ // User mode: only mark the comment as deleted
+ div
+ .find('span.user-id:first')
+ .text('[deleted]').end()
+ .find('div.comment-text:first')
+ .text('[deleted]').end()
+ .find('#cm' + id + ', #dc' + id + ', #ac' + id + ', #rc' + id +
+ ', #sp' + id + ', #hp' + id + ', #cr' + id + ', #rl' + id)
+ .remove();
+ var comment = div.data('comment');
+ comment.username = '[deleted]';
+ comment.text = '[deleted]';
+ div.data('comment', comment);
+ },
+ error: function(request, textStatus, error) {
+ showError('Oops, there was a problem deleting the comment.');
+ }
+ });
+ }
+
+ function showProposal(id) {
+ $('#sp' + id).hide();
+ $('#hp' + id).show();
+ $('#pr' + id).slideDown('fast');
+ }
+
+ function hideProposal(id) {
+ $('#hp' + id).hide();
+ $('#sp' + id).show();
+ $('#pr' + id).slideUp('fast');
+ }
+
+ function showProposeChange(id) {
+ $('#pc' + id).hide();
+ $('#hc' + id).show();
+ var textarea = $('#pt' + id);
+ textarea.val(textarea.data('source'));
+ $.fn.autogrow.resize(textarea[0]);
+ textarea.slideDown('fast');
+ }
+
+ function hideProposeChange(id) {
+ $('#hc' + id).hide();
+ $('#pc' + id).show();
+ var textarea = $('#pt' + id);
+ textarea.val('').removeAttr('disabled');
+ textarea.slideUp('fast');
+ }
+
+ function toggleCommentMarkupBox(id) {
+ $('#mb' + id).toggle();
+ }
+
+ /** Handle when the user clicks on a sort by link. */
+ function handleReSort(link) {
+ var classes = link.attr('class').split(/\s+/);
+ for (var i=0; i<classes.length; i++) {
+ if (classes[i] != 'sort-option') {
+ by = classes[i].substring(2);
+ }
+ }
+ setComparator();
+ // Save/update the sortBy cookie.
+ var expiration = new Date();
+ expiration.setDate(expiration.getDate() + 365);
+ document.cookie= 'sortBy=' + escape(by) +
+ ';expires=' + expiration.toUTCString();
+ $('ul.comment-ul').each(function(index, ul) {
+ var comments = getChildren($(ul), true);
+ comments = sortComments(comments);
+ appendComments(comments, $(ul).empty());
+ });
+ }
+
+ /**
+ * Function to process a vote when a user clicks an arrow.
+ */
+ function handleVote(link) {
+ if (!opts.voting) {
+ showError("You'll need to login to vote.");
+ return;
+ }
+
+ var id = link.attr('id');
+ if (!id) {
+ // Didn't click on one of the voting arrows.
+ return;
+ }
+ // If it is an unvote, the new vote value is 0,
+ // Otherwise it's 1 for an upvote, or -1 for a downvote.
+ var value = 0;
+ if (id.charAt(1) != 'u') {
+ value = id.charAt(0) == 'u' ? 1 : -1;
+ }
+ // The data to be sent to the server.
+ var d = {
+ comment_id: id.substring(2),
+ value: value
+ };
+
+ // Swap the vote and unvote links.
+ link.hide();
+ $('#' + id.charAt(0) + (id.charAt(1) == 'u' ? 'v' : 'u') + d.comment_id)
+ .show();
+
+ // The div the comment is displayed in.
+ var div = $('div#cd' + d.comment_id);
+ var data = div.data('comment');
+
+ // If this is not an unvote, and the other vote arrow has
+ // already been pressed, unpress it.
+ if ((d.value !== 0) && (data.vote === d.value * -1)) {
+ $('#' + (d.value == 1 ? 'd' : 'u') + 'u' + d.comment_id).hide();
+ $('#' + (d.value == 1 ? 'd' : 'u') + 'v' + d.comment_id).show();
+ }
+
+ // Update the comments rating in the local data.
+ data.rating += (data.vote === 0) ? d.value : (d.value - data.vote);
+ data.vote = d.value;
+ div.data('comment', data);
+
+ // Change the rating text.
+ div.find('.rating:first')
+ .text(data.rating + ' point' + (data.rating == 1 ? '' : 's'));
+
+ // Send the vote information to the server.
+ $.ajax({
+ type: "POST",
+ url: opts.processVoteURL,
+ data: d,
+ error: function(request, textStatus, error) {
+ showError('Oops, there was a problem casting that vote.');
+ }
+ });
+ }
+
+ /**
+ * Open a reply form used to reply to an existing comment.
+ */
+ function openReply(id) {
+ // Swap out the reply link for the hide link
+ $('#rl' + id).hide();
+ $('#cr' + id).show();
+
+ // Add the reply li to the children ul.
+ var div = $(renderTemplate(replyTemplate, {id: id})).hide();
+ $('#cl' + id)
+ .prepend(div)
+ // Setup the submit handler for the reply form.
+ .find('#rf' + id)
+ .submit(function(event) {
+ event.preventDefault();
+ addComment($('#rf' + id));
+ closeReply(id);
+ })
+ .find('input[type=button]')
+ .click(function() {
+ closeReply(id);
+ });
+ div.slideDown('fast', function() {
+ $('#rf' + id).find('textarea').focus();
+ });
+ }
+
+ /**
+ * Close the reply form opened with openReply.
+ */
+ function closeReply(id) {
+ // Remove the reply div from the DOM.
+ $('#rd' + id).slideUp('fast', function() {
+ $(this).remove();
+ });
+
+ // Swap out the hide link for the reply link
+ $('#cr' + id).hide();
+ $('#rl' + id).show();
+ }
+
+ /**
+ * Recursively sort a tree of comments using the comp comparator.
+ */
+ function sortComments(comments) {
+ comments.sort(comp);
+ $.each(comments, function() {
+ this.children = sortComments(this.children);
+ });
+ return comments;
+ }
+
+ /**
+ * Get the children comments from a ul. If recursive is true,
+ * recursively include childrens' children.
+ */
+ function getChildren(ul, recursive) {
+ var children = [];
+ ul.children().children("[id^='cd']")
+ .each(function() {
+ var comment = $(this).data('comment');
+ if (recursive)
+ comment.children = getChildren($(this).find('#cl' + comment.id), true);
+ children.push(comment);
+ });
+ return children;
+ }
+
+ /** Create a div to display a comment in. */
+ function createCommentDiv(comment) {
+ if (!comment.displayed && !opts.moderator) {
+ return $('<div class="moderate">Thank you! Your comment will show up '
+ + 'once it is has been approved by a moderator.</div>');
+ }
+ // Prettify the comment rating.
+ comment.pretty_rating = comment.rating + ' point' +
+ (comment.rating == 1 ? '' : 's');
+ // Make a class (for displaying not yet moderated comments differently)
+ comment.css_class = comment.displayed ? '' : ' moderate';
+ // Create a div for this comment.
+ var context = $.extend({}, opts, comment);
+ var div = $(renderTemplate(commentTemplate, context));
+
+ // If the user has voted on this comment, highlight the correct arrow.
+ if (comment.vote) {
+ var direction = (comment.vote == 1) ? 'u' : 'd';
+ div.find('#' + direction + 'v' + comment.id).hide();
+ div.find('#' + direction + 'u' + comment.id).show();
+ }
+
+ if (opts.moderator || comment.text != '[deleted]') {
+ div.find('a.reply').show();
+ if (comment.proposal_diff)
+ div.find('#sp' + comment.id).show();
+ if (opts.moderator && !comment.displayed)
+ div.find('#cm' + comment.id).show();
+ if (opts.moderator || (opts.username == comment.username))
+ div.find('#dc' + comment.id).show();
+ }
+ return div;
+ }
+
+ /**
+ * A simple template renderer. Placeholders such as <%id%> are replaced
+ * by context['id'] with items being escaped. Placeholders such as <#id#>
+ * are not escaped.
+ */
+ function renderTemplate(template, context) {
+ var esc = $(document.createElement('div'));
+
+ function handle(ph, escape) {
+ var cur = context;
+ $.each(ph.split('.'), function() {
+ cur = cur[this];
+ });
+ return escape ? esc.text(cur || "").html() : cur;
+ }
+
+ return template.replace(/<([%#])([\w\.]*)\1>/g, function() {
+ return handle(arguments[2], arguments[1] == '%' ? true : false);
+ });
+ }
+
+ /** Flash an error message briefly. */
+ function showError(message) {
+ $(document.createElement('div')).attr({'class': 'popup-error'})
+ .append($(document.createElement('div'))
+ .attr({'class': 'error-message'}).text(message))
+ .appendTo('body')
+ .fadeIn("slow")
+ .delay(2000)
+ .fadeOut("slow");
+ }
+
+ /** Add a link the user uses to open the comments popup. */
+ $.fn.comment = function() {
+ return this.each(function() {
+ var id = $(this).attr('id').substring(1);
+ var count = COMMENT_METADATA[id];
+ var title = count + ' comment' + (count == 1 ? '' : 's');
+ var image = count > 0 ? opts.commentBrightImage : opts.commentImage;
+ var addcls = count == 0 ? ' nocomment' : '';
+ $(this)
+ .append(
+ $(document.createElement('a')).attr({
+ href: '#',
+ 'class': 'sphinx-comment-open' + addcls,
+ id: 'ao' + id
+ })
+ .append($(document.createElement('img')).attr({
+ src: image,
+ alt: 'comment',
+ title: title
+ }))
+ .click(function(event) {
+ event.preventDefault();
+ show($(this).attr('id').substring(2));
+ })
+ )
+ .append(
+ $(document.createElement('a')).attr({
+ href: '#',
+ 'class': 'sphinx-comment-close hidden',
+ id: 'ah' + id
+ })
+ .append($(document.createElement('img')).attr({
+ src: opts.closeCommentImage,
+ alt: 'close',
+ title: 'close'
+ }))
+ .click(function(event) {
+ event.preventDefault();
+ hide($(this).attr('id').substring(2));
+ })
+ );
+ });
+ };
+
+ var opts = {
+ processVoteURL: '/_process_vote',
+ addCommentURL: '/_add_comment',
+ getCommentsURL: '/_get_comments',
+ acceptCommentURL: '/_accept_comment',
+ deleteCommentURL: '/_delete_comment',
+ commentImage: '/static/_static/comment.png',
+ closeCommentImage: '/static/_static/comment-close.png',
+ loadingImage: '/static/_static/ajax-loader.gif',
+ commentBrightImage: '/static/_static/comment-bright.png',
+ upArrow: '/static/_static/up.png',
+ downArrow: '/static/_static/down.png',
+ upArrowPressed: '/static/_static/up-pressed.png',
+ downArrowPressed: '/static/_static/down-pressed.png',
+ voting: false,
+ moderator: false
+ };
+
+ if (typeof COMMENT_OPTIONS != "undefined") {
+ opts = jQuery.extend(opts, COMMENT_OPTIONS);
+ }
+
+ var popupTemplate = '\
+ <div class="sphinx-comments" id="sc<%id%>">\
+ <p class="sort-options">\
+ Sort by:\
+ <a href="#" class="sort-option byrating">best rated</a>\
+ <a href="#" class="sort-option byascage">newest</a>\
+ <a href="#" class="sort-option byage">oldest</a>\
+ </p>\
+ <div class="comment-header">Comments</div>\
+ <div class="comment-loading" id="cn<%id%>">\
+ loading comments... <img src="<%loadingImage%>" alt="" /></div>\
+ <ul id="cl<%id%>" class="comment-ul"></ul>\
+ <div id="ca<%id%>">\
+ <p class="add-a-comment">Add a comment\
+ (<a href="#" class="comment-markup" id="ab<%id%>">markup</a>):</p>\
+ <div class="comment-markup-box" id="mb<%id%>">\
+ reStructured text markup: <i>*emph*</i>, <b>**strong**</b>, \
+ <code>``code``</code>, \
+ code blocks: <code>::</code> and an indented block after blank line</div>\
+ <form method="post" id="cf<%id%>" class="comment-form" action="">\
+ <textarea name="comment" cols="80"></textarea>\
+ <p class="propose-button">\
+ <a href="#" id="pc<%id%>" class="show-propose-change">\
+ Propose a change ▹\
+ </a>\
+ <a href="#" id="hc<%id%>" class="hide-propose-change">\
+ Propose a change ▿\
+ </a>\
+ </p>\
+ <textarea name="proposal" id="pt<%id%>" cols="80"\
+ spellcheck="false"></textarea>\
+ <input type="submit" value="Add comment" />\
+ <input type="hidden" name="node" value="<%id%>" />\
+ <input type="hidden" name="parent" value="" />\
+ </form>\
+ </div>\
+ </div>';
+
+ var commentTemplate = '\
+ <div id="cd<%id%>" class="sphinx-comment<%css_class%>">\
+ <div class="vote">\
+ <div class="arrow">\
+ <a href="#" id="uv<%id%>" class="vote" title="vote up">\
+ <img src="<%upArrow%>" />\
+ </a>\
+ <a href="#" id="uu<%id%>" class="un vote" title="vote up">\
+ <img src="<%upArrowPressed%>" />\
+ </a>\
+ </div>\
+ <div class="arrow">\
+ <a href="#" id="dv<%id%>" class="vote" title="vote down">\
+ <img src="<%downArrow%>" id="da<%id%>" />\
+ </a>\
+ <a href="#" id="du<%id%>" class="un vote" title="vote down">\
+ <img src="<%downArrowPressed%>" />\
+ </a>\
+ </div>\
+ </div>\
+ <div class="comment-content">\
+ <p class="tagline comment">\
+ <span class="user-id"><%username%></span>\
+ <span class="rating"><%pretty_rating%></span>\
+ <span class="delta"><%time.delta%></span>\
+ </p>\
+ <div class="comment-text comment"><#text#></div>\
+ <p class="comment-opts comment">\
+ <a href="#" class="reply hidden" id="rl<%id%>">reply ▹</a>\
+ <a href="#" class="close-reply" id="cr<%id%>">reply ▿</a>\
+ <a href="#" id="sp<%id%>" class="show-proposal">proposal ▹</a>\
+ <a href="#" id="hp<%id%>" class="hide-proposal">proposal ▿</a>\
+ <a href="#" id="dc<%id%>" class="delete-comment hidden">delete</a>\
+ <span id="cm<%id%>" class="moderation hidden">\
+ <a href="#" id="ac<%id%>" class="accept-comment">accept</a>\
+ </span>\
+ </p>\
+ <pre class="proposal" id="pr<%id%>">\
+<#proposal_diff#>\
+ </pre>\
+ <ul class="comment-children" id="cl<%id%>"></ul>\
+ </div>\
+ <div class="clearleft"></div>\
+ </div>\
+ </div>';
+
+ var replyTemplate = '\
+ <li>\
+ <div class="reply-div" id="rd<%id%>">\
+ <form id="rf<%id%>">\
+ <textarea name="comment" cols="80"></textarea>\
+ <input type="submit" value="Add reply" />\
+ <input type="button" value="Cancel" />\
+ <input type="hidden" name="parent" value="<%id%>" />\
+ <input type="hidden" name="node" value="" />\
+ </form>\
+ </div>\
+ </li>';
+
+ $(document).ready(function() {
+ init();
+ });
+})(jQuery);
+
+$(document).ready(function() {
+ // add comment anchors for all paragraphs that are commentable
+ $('.sphinx-has-comment').comment();
+
+ // highlight search words in search results
+ $("div.context").each(function() {
+ var params = $.getQueryParameters();
+ var terms = (params.q) ? params.q[0].split(/\s+/) : [];
+ var result = $(this);
+ $.each(terms, function() {
+ result.highlightText(this.toLowerCase(), 'highlighted');
+ });
+ });
+
+ // directly open comment window if requested
+ var anchor = document.location.hash;
+ if (anchor.substring(0, 9) == '#comment-') {
+ $('#ao' + anchor.substring(9)).click();
+ document.location.hash = '#s' + anchor.substring(9);
+ }
+});
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>The full Pygments API — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '../',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+ <link rel="shortcut icon" href="../_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="../index.html" />
+ <link rel="up" title="Pygments documentation" href="index.html" />
+ <link rel="next" title="Write your own lexer" href="lexerdevelopment.html" />
+ <link rel="prev" title="Builtin Tokens" href="tokens.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="lexerdevelopment.html" title="Write your own lexer"
+ accesskey="N">next</a> |</li>
+ <li class="right" >
+ <a href="tokens.html" title="Builtin Tokens"
+ accesskey="P">previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" accesskey="U">Pygments documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <div class="section" id="the-full-pygments-api">
+<h1>The full Pygments API<a class="headerlink" href="#the-full-pygments-api" title="Permalink to this headline">¶</a></h1>
+<p>This page describes the Pygments API.</p>
+<div class="section" id="module-pygments">
+<span id="high-level-api"></span><h2>High-level API<a class="headerlink" href="#module-pygments" title="Permalink to this headline">¶</a></h2>
+<p>Functions from the <a class="reference internal" href="#module-pygments" title="pygments"><code class="xref py py-mod docutils literal"><span class="pre">pygments</span></code></a> module:</p>
+<dl class="function">
+<dt id="pygments.lex">
+<code class="descclassname">pygments.</code><code class="descname">lex</code><span class="sig-paren">(</span><em>code</em>, <em>lexer</em><span class="sig-paren">)</span><a class="headerlink" href="#pygments.lex" title="Permalink to this definition">¶</a></dt>
+<dd><p>Lex <cite>code</cite> with the <cite>lexer</cite> (must be a <cite>Lexer</cite> instance)
+and return an iterable of tokens. Currently, this only calls
+<cite>lexer.get_tokens()</cite>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pygments.format">
+<code class="descclassname">pygments.</code><code class="descname">format</code><span class="sig-paren">(</span><em>tokens</em>, <em>formatter</em>, <em>outfile=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pygments.format" title="Permalink to this definition">¶</a></dt>
+<dd><p>Format a token stream (iterable of tokens) <cite>tokens</cite> with the
+<cite>formatter</cite> (must be a <cite>Formatter</cite> instance). The result is
+written to <cite>outfile</cite>, or if that is <code class="docutils literal"><span class="pre">None</span></code>, returned as a
+string.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pygments.highlight">
+<code class="descclassname">pygments.</code><code class="descname">highlight</code><span class="sig-paren">(</span><em>code</em>, <em>lexer</em>, <em>formatter</em>, <em>outfile=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pygments.highlight" title="Permalink to this definition">¶</a></dt>
+<dd><p>This is the most high-level highlighting function.
+It combines <cite>lex</cite> and <cite>format</cite> in one function.</p>
+</dd></dl>
+
+<span class="target" id="module-pygments.lexers"></span><p>Functions from <a class="reference internal" href="#module-pygments.lexers" title="pygments.lexers"><code class="xref py py-mod docutils literal"><span class="pre">pygments.lexers</span></code></a>:</p>
+<dl class="function">
+<dt id="pygments.lexers.get_lexer_by_name">
+<code class="descclassname">pygments.lexers.</code><code class="descname">get_lexer_by_name</code><span class="sig-paren">(</span><em>alias</em>, <em>**options</em><span class="sig-paren">)</span><a class="headerlink" href="#pygments.lexers.get_lexer_by_name" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return an instance of a <cite>Lexer</cite> subclass that has <cite>alias</cite> in its
+aliases list. The lexer is given the <cite>options</cite> at its
+instantiation.</p>
+<p>Will raise <code class="xref py py-exc docutils literal"><span class="pre">pygments.util.ClassNotFound</span></code> if no lexer with that alias is
+found.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pygments.lexers.get_lexer_for_filename">
+<code class="descclassname">pygments.lexers.</code><code class="descname">get_lexer_for_filename</code><span class="sig-paren">(</span><em>fn</em>, <em>**options</em><span class="sig-paren">)</span><a class="headerlink" href="#pygments.lexers.get_lexer_for_filename" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a <cite>Lexer</cite> subclass instance that has a filename pattern
+matching <cite>fn</cite>. The lexer is given the <cite>options</cite> at its
+instantiation.</p>
+<p>Will raise <code class="xref py py-exc docutils literal"><span class="pre">pygments.util.ClassNotFound</span></code> if no lexer for that filename
+is found.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pygments.lexers.get_lexer_for_mimetype">
+<code class="descclassname">pygments.lexers.</code><code class="descname">get_lexer_for_mimetype</code><span class="sig-paren">(</span><em>mime</em>, <em>**options</em><span class="sig-paren">)</span><a class="headerlink" href="#pygments.lexers.get_lexer_for_mimetype" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a <cite>Lexer</cite> subclass instance that has <cite>mime</cite> in its mimetype
+list. The lexer is given the <cite>options</cite> at its instantiation.</p>
+<p>Will raise <code class="xref py py-exc docutils literal"><span class="pre">pygments.util.ClassNotFound</span></code> if not lexer for that mimetype
+is found.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pygments.lexers.guess_lexer">
+<code class="descclassname">pygments.lexers.</code><code class="descname">guess_lexer</code><span class="sig-paren">(</span><em>text</em>, <em>**options</em><span class="sig-paren">)</span><a class="headerlink" href="#pygments.lexers.guess_lexer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a <cite>Lexer</cite> subclass instance that’s guessed from the text in
+<cite>text</cite>. For that, the <a class="reference internal" href="#pygments.lexer.Lexer.analyse_text" title="pygments.lexer.Lexer.analyse_text"><code class="xref py py-meth docutils literal"><span class="pre">analyse_text()</span></code></a> method of every known lexer
+class is called with the text as argument, and the lexer which returned the
+highest value will be instantiated and returned.</p>
+<p><code class="xref py py-exc docutils literal"><span class="pre">pygments.util.ClassNotFound</span></code> is raised if no lexer thinks it can
+handle the content.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pygments.lexers.guess_lexer_for_filename">
+<code class="descclassname">pygments.lexers.</code><code class="descname">guess_lexer_for_filename</code><span class="sig-paren">(</span><em>filename</em>, <em>text</em>, <em>**options</em><span class="sig-paren">)</span><a class="headerlink" href="#pygments.lexers.guess_lexer_for_filename" title="Permalink to this definition">¶</a></dt>
+<dd><p>As <a class="reference internal" href="#pygments.lexers.guess_lexer" title="pygments.lexers.guess_lexer"><code class="xref py py-func docutils literal"><span class="pre">guess_lexer()</span></code></a>, but only lexers which have a pattern in <cite>filenames</cite>
+or <cite>alias_filenames</cite> that matches <cite>filename</cite> are taken into consideration.</p>
+<p><code class="xref py py-exc docutils literal"><span class="pre">pygments.util.ClassNotFound</span></code> is raised if no lexer thinks it can
+handle the content.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pygments.lexers.get_all_lexers">
+<code class="descclassname">pygments.lexers.</code><code class="descname">get_all_lexers</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygments.lexers.get_all_lexers" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return an iterable over all registered lexers, yielding tuples in the
+format:</p>
+<div class="highlight-python"><div class="highlight"><pre>(longname, tuple of aliases, tuple of filename patterns, tuple of mimetypes)
+</pre></div>
+</div>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.6.</span></p>
+</div>
+</dd></dl>
+
+<span class="target" id="module-pygments.formatters"></span><p>Functions from <a class="reference internal" href="#module-pygments.formatters" title="pygments.formatters"><code class="xref py py-mod docutils literal"><span class="pre">pygments.formatters</span></code></a>:</p>
+<dl class="function">
+<dt id="pygments.formatters.get_formatter_by_name">
+<code class="descclassname">pygments.formatters.</code><code class="descname">get_formatter_by_name</code><span class="sig-paren">(</span><em>alias</em>, <em>**options</em><span class="sig-paren">)</span><a class="headerlink" href="#pygments.formatters.get_formatter_by_name" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return an instance of a <a class="reference internal" href="#pygments.formatter.Formatter" title="pygments.formatter.Formatter"><code class="xref py py-class docutils literal"><span class="pre">Formatter</span></code></a> subclass that has <cite>alias</cite> in its
+aliases list. The formatter is given the <cite>options</cite> at its instantiation.</p>
+<p>Will raise <code class="xref py py-exc docutils literal"><span class="pre">pygments.util.ClassNotFound</span></code> if no formatter with that
+alias is found.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pygments.formatters.get_formatter_for_filename">
+<code class="descclassname">pygments.formatters.</code><code class="descname">get_formatter_for_filename</code><span class="sig-paren">(</span><em>fn</em>, <em>**options</em><span class="sig-paren">)</span><a class="headerlink" href="#pygments.formatters.get_formatter_for_filename" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a <a class="reference internal" href="#pygments.formatter.Formatter" title="pygments.formatter.Formatter"><code class="xref py py-class docutils literal"><span class="pre">Formatter</span></code></a> subclass instance that has a filename pattern
+matching <cite>fn</cite>. The formatter is given the <cite>options</cite> at its instantiation.</p>
+<p>Will raise <code class="xref py py-exc docutils literal"><span class="pre">pygments.util.ClassNotFound</span></code> if no formatter for that filename
+is found.</p>
+</dd></dl>
+
+<span class="target" id="module-pygments.styles"></span><p>Functions from <a class="reference internal" href="#module-pygments.styles" title="pygments.styles"><code class="xref py py-mod docutils literal"><span class="pre">pygments.styles</span></code></a>:</p>
+<dl class="function">
+<dt id="pygments.styles.get_style_by_name">
+<code class="descclassname">pygments.styles.</code><code class="descname">get_style_by_name</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#pygments.styles.get_style_by_name" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a style class by its short name. The names of the builtin styles
+are listed in <code class="xref py py-data docutils literal"><span class="pre">pygments.styles.STYLE_MAP</span></code>.</p>
+<p>Will raise <code class="xref py py-exc docutils literal"><span class="pre">pygments.util.ClassNotFound</span></code> if no style of that name is
+found.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pygments.styles.get_all_styles">
+<code class="descclassname">pygments.styles.</code><code class="descname">get_all_styles</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygments.styles.get_all_styles" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return an iterable over all registered styles, yielding their names.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.6.</span></p>
+</div>
+</dd></dl>
+
+<span class="target" id="module-pygments.lexer"></span></div>
+<div class="section" id="lexers">
+<h2>Lexers<a class="headerlink" href="#lexers" title="Permalink to this headline">¶</a></h2>
+<p>The base lexer class from which all lexers are derived is:</p>
+<dl class="class">
+<dt id="pygments.lexer.Lexer">
+<em class="property">class </em><code class="descclassname">pygments.lexer.</code><code class="descname">Lexer</code><span class="sig-paren">(</span><em>**options</em><span class="sig-paren">)</span><a class="headerlink" href="#pygments.lexer.Lexer" title="Permalink to this definition">¶</a></dt>
+<dd><p>The constructor takes a **keywords dictionary of options.
+Every subclass must first process its own options and then call
+the <cite>Lexer</cite> constructor, since it processes the <cite>stripnl</cite>,
+<cite>stripall</cite> and <cite>tabsize</cite> options.</p>
+<p>An example looks like this:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">options</span><span class="p">):</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">compress</span> <span class="o">=</span> <span class="n">options</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">'compress'</span><span class="p">,</span> <span class="s">''</span><span class="p">)</span>
+ <span class="n">Lexer</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">options</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>As these options must all be specifiable as strings (due to the
+command line usage), there are various utility functions
+available to help with that, see <a class="reference internal" href="#option-processing">Option processing</a>.</p>
+<dl class="method">
+<dt id="pygments.lexer.Lexer.get_tokens">
+<code class="descname">get_tokens</code><span class="sig-paren">(</span><em>text</em><span class="sig-paren">)</span><a class="headerlink" href="#pygments.lexer.Lexer.get_tokens" title="Permalink to this definition">¶</a></dt>
+<dd><p>This method is the basic interface of a lexer. It is called by
+the <cite>highlight()</cite> function. It must process the text and return an
+iterable of <code class="docutils literal"><span class="pre">(tokentype,</span> <span class="pre">value)</span></code> pairs from <cite>text</cite>.</p>
+<p>Normally, you don’t need to override this method. The default
+implementation processes the <cite>stripnl</cite>, <cite>stripall</cite> and <cite>tabsize</cite>
+options and then yields all tokens from <cite>get_tokens_unprocessed()</cite>,
+with the <code class="docutils literal"><span class="pre">index</span></code> dropped.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="pygments.lexer.Lexer.get_tokens_unprocessed">
+<code class="descname">get_tokens_unprocessed</code><span class="sig-paren">(</span><em>text</em><span class="sig-paren">)</span><a class="headerlink" href="#pygments.lexer.Lexer.get_tokens_unprocessed" title="Permalink to this definition">¶</a></dt>
+<dd><p>This method should process the text and return an iterable of
+<code class="docutils literal"><span class="pre">(index,</span> <span class="pre">tokentype,</span> <span class="pre">value)</span></code> tuples where <code class="docutils literal"><span class="pre">index</span></code> is the starting
+position of the token within the input text.</p>
+<p>This method must be overridden by subclasses.</p>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="pygments.lexer.Lexer.analyse_text">
+<em class="property">static </em><code class="descname">analyse_text</code><span class="sig-paren">(</span><em>text</em><span class="sig-paren">)</span><a class="headerlink" href="#pygments.lexer.Lexer.analyse_text" title="Permalink to this definition">¶</a></dt>
+<dd><p>A static method which is called for lexer guessing. It should analyse
+the text and return a float in the range from <code class="docutils literal"><span class="pre">0.0</span></code> to <code class="docutils literal"><span class="pre">1.0</span></code>.
+If it returns <code class="docutils literal"><span class="pre">0.0</span></code>, the lexer will not be selected as the most
+probable one, if it returns <code class="docutils literal"><span class="pre">1.0</span></code>, it will be selected immediately.</p>
+<div class="admonition note">
+<p class="first admonition-title">Note</p>
+<p class="last">You don’t have to add <code class="docutils literal"><span class="pre">@staticmethod</span></code> to the definition of
+this method, this will be taken care of by the Lexer’s metaclass.</p>
+</div>
+</dd></dl>
+
+<p>For a list of known tokens have a look at the <a class="reference internal" href="tokens.html"><em>Builtin Tokens</em></a> page.</p>
+<p>A lexer also can have the following attributes (in fact, they are mandatory
+except <cite>alias_filenames</cite>) that are used by the builtin lookup mechanism.</p>
+<dl class="attribute">
+<dt id="pygments.lexer.Lexer.name">
+<code class="descname">name</code><a class="headerlink" href="#pygments.lexer.Lexer.name" title="Permalink to this definition">¶</a></dt>
+<dd><p>Full name for the lexer, in human-readable form.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="pygments.lexer.Lexer.aliases">
+<code class="descname">aliases</code><a class="headerlink" href="#pygments.lexer.Lexer.aliases" title="Permalink to this definition">¶</a></dt>
+<dd><p>A list of short, unique identifiers that can be used to lookup
+the lexer from a list, e.g. using <cite>get_lexer_by_name()</cite>.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="pygments.lexer.Lexer.filenames">
+<code class="descname">filenames</code><a class="headerlink" href="#pygments.lexer.Lexer.filenames" title="Permalink to this definition">¶</a></dt>
+<dd><p>A list of <cite>fnmatch</cite> patterns that match filenames which contain
+content for this lexer. The patterns in this list should be unique among
+all lexers.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="pygments.lexer.Lexer.alias_filenames">
+<code class="descname">alias_filenames</code><a class="headerlink" href="#pygments.lexer.Lexer.alias_filenames" title="Permalink to this definition">¶</a></dt>
+<dd><p>A list of <cite>fnmatch</cite> patterns that match filenames which may or may not
+contain content for this lexer. This list is used by the
+<a class="reference internal" href="#pygments.lexers.guess_lexer_for_filename" title="pygments.lexers.guess_lexer_for_filename"><code class="xref py py-func docutils literal"><span class="pre">guess_lexer_for_filename()</span></code></a> function, to determine which lexers
+are then included in guessing the correct one. That means that
+e.g. every lexer for HTML and a template language should include
+<code class="docutils literal"><span class="pre">\*.html</span></code> in this list.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="pygments.lexer.Lexer.mimetypes">
+<code class="descname">mimetypes</code><a class="headerlink" href="#pygments.lexer.Lexer.mimetypes" title="Permalink to this definition">¶</a></dt>
+<dd><p>A list of MIME types for content that can be lexed with this
+lexer.</p>
+</dd></dl>
+
+</dd></dl>
+
+<span class="target" id="module-pygments.formatter"></span></div>
+<div class="section" id="formatters">
+<h2>Formatters<a class="headerlink" href="#formatters" title="Permalink to this headline">¶</a></h2>
+<p>A formatter is derived from this class:</p>
+<dl class="class">
+<dt id="pygments.formatter.Formatter">
+<em class="property">class </em><code class="descclassname">pygments.formatter.</code><code class="descname">Formatter</code><span class="sig-paren">(</span><em>**options</em><span class="sig-paren">)</span><a class="headerlink" href="#pygments.formatter.Formatter" title="Permalink to this definition">¶</a></dt>
+<dd><p>As with lexers, this constructor processes options and then must call the
+base class <code class="xref py py-meth docutils literal"><span class="pre">__init__()</span></code>.</p>
+<p>The <a class="reference internal" href="#pygments.formatter.Formatter" title="pygments.formatter.Formatter"><code class="xref py py-class docutils literal"><span class="pre">Formatter</span></code></a> class recognizes the options <cite>style</cite>, <cite>full</cite> and
+<cite>title</cite>. It is up to the formatter class whether it uses them.</p>
+<dl class="method">
+<dt id="pygments.formatter.Formatter.get_style_defs">
+<code class="descname">get_style_defs</code><span class="sig-paren">(</span><em>arg=''</em><span class="sig-paren">)</span><a class="headerlink" href="#pygments.formatter.Formatter.get_style_defs" title="Permalink to this definition">¶</a></dt>
+<dd><p>This method must return statements or declarations suitable to define
+the current style for subsequent highlighted text (e.g. CSS classes
+in the <cite>HTMLFormatter</cite>).</p>
+<p>The optional argument <cite>arg</cite> can be used to modify the generation and
+is formatter dependent (it is standardized because it can be given on
+the command line).</p>
+<p>This method is called by the <code class="docutils literal"><span class="pre">-S</span></code> <a class="reference internal" href="cmdline.html"><em>command-line option</em></a>,
+the <cite>arg</cite> is then given by the <code class="docutils literal"><span class="pre">-a</span></code> option.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="pygments.formatter.Formatter.format">
+<code class="descname">format</code><span class="sig-paren">(</span><em>tokensource</em>, <em>outfile</em><span class="sig-paren">)</span><a class="headerlink" href="#pygments.formatter.Formatter.format" title="Permalink to this definition">¶</a></dt>
+<dd><p>This method must format the tokens from the <cite>tokensource</cite> iterable and
+write the formatted version to the file object <cite>outfile</cite>.</p>
+<p>Formatter options can control how exactly the tokens are converted.</p>
+</dd></dl>
+
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.7: </span>A formatter must have the following attributes that are used by the
+builtin lookup mechanism.</p>
+</div>
+<dl class="attribute">
+<dt id="pygments.formatter.Formatter.name">
+<code class="descname">name</code><a class="headerlink" href="#pygments.formatter.Formatter.name" title="Permalink to this definition">¶</a></dt>
+<dd><p>Full name for the formatter, in human-readable form.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="pygments.formatter.Formatter.aliases">
+<code class="descname">aliases</code><a class="headerlink" href="#pygments.formatter.Formatter.aliases" title="Permalink to this definition">¶</a></dt>
+<dd><p>A list of short, unique identifiers that can be used to lookup
+the formatter from a list, e.g. using <a class="reference internal" href="#pygments.formatters.get_formatter_by_name" title="pygments.formatters.get_formatter_by_name"><code class="xref py py-func docutils literal"><span class="pre">get_formatter_by_name()</span></code></a>.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="pygments.formatter.Formatter.filenames">
+<code class="descname">filenames</code><a class="headerlink" href="#pygments.formatter.Formatter.filenames" title="Permalink to this definition">¶</a></dt>
+<dd><p>A list of <code class="xref py py-mod docutils literal"><span class="pre">fnmatch</span></code> patterns that match filenames for which this
+formatter can produce output. The patterns in this list should be unique
+among all formatters.</p>
+</dd></dl>
+
+</dd></dl>
+
+<span class="target" id="module-pygments.util"></span></div>
+<div class="section" id="option-processing">
+<h2>Option processing<a class="headerlink" href="#option-processing" title="Permalink to this headline">¶</a></h2>
+<p>The <a class="reference internal" href="#module-pygments.util" title="pygments.util"><code class="xref py py-mod docutils literal"><span class="pre">pygments.util</span></code></a> module has some utility functions usable for option
+processing:</p>
+<dl class="exception">
+<dt id="pygments.util.OptionError">
+<em class="property">exception </em><code class="descclassname">pygments.util.</code><code class="descname">OptionError</code><a class="headerlink" href="#pygments.util.OptionError" title="Permalink to this definition">¶</a></dt>
+<dd><p>This exception will be raised by all option processing functions if
+the type or value of the argument is not correct.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pygments.util.get_bool_opt">
+<code class="descclassname">pygments.util.</code><code class="descname">get_bool_opt</code><span class="sig-paren">(</span><em>options</em>, <em>optname</em>, <em>default=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pygments.util.get_bool_opt" title="Permalink to this definition">¶</a></dt>
+<dd><p>Interpret the key <cite>optname</cite> from the dictionary <cite>options</cite> as a boolean and
+return it. Return <cite>default</cite> if <cite>optname</cite> is not in <cite>options</cite>.</p>
+<p>The valid string values for <code class="docutils literal"><span class="pre">True</span></code> are <code class="docutils literal"><span class="pre">1</span></code>, <code class="docutils literal"><span class="pre">yes</span></code>, <code class="docutils literal"><span class="pre">true</span></code> and
+<code class="docutils literal"><span class="pre">on</span></code>, the ones for <code class="docutils literal"><span class="pre">False</span></code> are <code class="docutils literal"><span class="pre">0</span></code>, <code class="docutils literal"><span class="pre">no</span></code>, <code class="docutils literal"><span class="pre">false</span></code> and <code class="docutils literal"><span class="pre">off</span></code>
+(matched case-insensitively).</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pygments.util.get_int_opt">
+<code class="descclassname">pygments.util.</code><code class="descname">get_int_opt</code><span class="sig-paren">(</span><em>options</em>, <em>optname</em>, <em>default=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pygments.util.get_int_opt" title="Permalink to this definition">¶</a></dt>
+<dd><p>As <a class="reference internal" href="#pygments.util.get_bool_opt" title="pygments.util.get_bool_opt"><code class="xref py py-func docutils literal"><span class="pre">get_bool_opt()</span></code></a>, but interpret the value as an integer.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pygments.util.get_list_opt">
+<code class="descclassname">pygments.util.</code><code class="descname">get_list_opt</code><span class="sig-paren">(</span><em>options</em>, <em>optname</em>, <em>default=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pygments.util.get_list_opt" title="Permalink to this definition">¶</a></dt>
+<dd><p>If the key <cite>optname</cite> from the dictionary <cite>options</cite> is a string,
+split it at whitespace and return it. If it is already a list
+or a tuple, it is returned as a list.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pygments.util.get_choice_opt">
+<code class="descclassname">pygments.util.</code><code class="descname">get_choice_opt</code><span class="sig-paren">(</span><em>options</em>, <em>optname</em>, <em>allowed</em>, <em>default=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pygments.util.get_choice_opt" title="Permalink to this definition">¶</a></dt>
+<dd><p>If the key <cite>optname</cite> from the dictionary is not in the sequence
+<cite>allowed</cite>, raise an error, otherwise return it.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.8.</span></p>
+</div>
+</dd></dl>
+
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ <h3><a href="../index.html">Table Of Contents</a></h3>
+ <ul>
+<li><a class="reference internal" href="#">The full Pygments API</a><ul>
+<li><a class="reference internal" href="#module-pygments">High-level API</a></li>
+<li><a class="reference internal" href="#lexers">Lexers</a></li>
+<li><a class="reference internal" href="#formatters">Formatters</a></li>
+<li><a class="reference internal" href="#option-processing">Option processing</a></li>
+</ul>
+</li>
+</ul>
+
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="tokens.html"
+ title="previous chapter">Builtin Tokens</a></p>
+ <h4>Next topic</h4>
+ <p class="topless"><a href="lexerdevelopment.html"
+ title="next chapter">Write your own lexer</a></p>
+ <div role="note" aria-label="source link">
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="../_sources/docs/api.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+ </div>
+<strong>« <a href="index.html">Back to docs index</a></strong>
+
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="../search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="lexerdevelopment.html" title="Write your own lexer"
+ >next</a> |</li>
+ <li class="right" >
+ <a href="tokens.html" title="Builtin Tokens"
+ >previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" >Pygments documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Full contributor list — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '../',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+ <link rel="shortcut icon" href="../_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="../index.html" />
+ <link rel="up" title="Pygments documentation" href="index.html" />
+ <link rel="prev" title="Pygments changelog" href="changelog.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="changelog.html" title="Pygments changelog"
+ accesskey="P">previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" accesskey="U">Pygments documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <div class="section" id="full-contributor-list">
+<h1>Full contributor list<a class="headerlink" href="#full-contributor-list" title="Permalink to this headline">¶</a></h1>
+<p>Pygments is written and maintained by Georg Brandl <<a class="reference external" href="mailto:georg%40python.org">georg<span>@</span>python<span>.</span>org</a>>.</p>
+<p>Major developers are Tim Hatch <<a class="reference external" href="mailto:tim%40timhatch.com">tim<span>@</span>timhatch<span>.</span>com</a>> and Armin Ronacher
+<<a class="reference external" href="mailto:armin.ronacher%40active-4.com">armin<span>.</span>ronacher<span>@</span>active-4<span>.</span>com</a>>.</p>
+<p>Other contributors, listed alphabetically, are:</p>
+<ul class="simple">
+<li>Sam Aaron – Ioke lexer</li>
+<li>Ali Afshar – image formatter</li>
+<li>Thomas Aglassinger – Rexx lexer</li>
+<li>Kumar Appaiah – Debian control lexer</li>
+<li>Andreas Amann – AppleScript lexer</li>
+<li>Timothy Armstrong – Dart lexer fixes</li>
+<li>Jeffrey Arnold – R/S, Rd, BUGS, Jags, and Stan lexers</li>
+<li>Jeremy Ashkenas – CoffeeScript lexer</li>
+<li>Stefan Matthias Aust – Smalltalk lexer</li>
+<li>Lucas Bajolet – Nit lexer</li>
+<li>Ben Bangert – Mako lexers</li>
+<li>Max Battcher – Darcs patch lexer</li>
+<li>Thomas Baruchel – APL lexer</li>
+<li>Tim Baumann – (Literate) Agda lexer</li>
+<li>Paul Baumgart, 280 North, Inc. – Objective-J lexer</li>
+<li>Michael Bayer – Myghty lexers</li>
+<li>John Benediktsson – Factor lexer</li>
+<li>Christopher Bertels – Fancy lexer</li>
+<li>Jarrett Billingsley – MiniD lexer</li>
+<li>Adam Blinkinsop – Haskell, Redcode lexers</li>
+<li>Frits van Bommel – assembler lexers</li>
+<li>Pierre Bourdon – bugfixes</li>
+<li>Hiram Chirino – Scaml and Jade lexers</li>
+<li>Ian Cooper – VGL lexer</li>
+<li>David Corbett – Inform, Jasmin, and TADS 3 lexers</li>
+<li>Leaf Corcoran – MoonScript lexer</li>
+<li>Christopher Creutzig – MuPAD lexer</li>
+<li>Daniël W. Crompton - Pike lexer</li>
+<li>Pete Curry – bugfixes</li>
+<li>Bryan Davis – EBNF lexer</li>
+<li>Owen Durni – Haxe lexer</li>
+<li>Alexander Dutton, Oxford University Computing Services – SPARQL lexer</li>
+<li>Nick Efford – Python 3 lexer</li>
+<li>Sven Efftinge – Xtend lexer</li>
+<li>Artem Egorkine – terminal256 formatter</li>
+<li>James H. Fisher – PostScript lexer</li>
+<li>William S. Fulton – SWIG lexer</li>
+<li>Carlos Galdino – Elixir and Elixir Console lexers</li>
+<li>Michael Galloy – IDL lexer</li>
+<li>Naveen Garg – Autohotkey lexer</li>
+<li>Laurent Gautier – R/S lexer</li>
+<li>Alex Gaynor – PyPy log lexer</li>
+<li>Richard Gerkin – Igor Pro lexer</li>
+<li>Alain Gilbert – TypeScript lexer</li>
+<li>Alex Gilding – BlitzBasic lexer</li>
+<li>Bertrand Goetzmann – Groovy lexer</li>
+<li>Krzysiek Goj – Scala lexer</li>
+<li>Matt Good – Genshi, Cheetah lexers</li>
+<li>Michał Górny – vim modeline support</li>
+<li>Patrick Gotthardt – PHP namespaces support</li>
+<li>Olivier Guibe – Asymptote lexer</li>
+<li>Jordi Gutiérrez Hermoso – Octave lexer</li>
+<li>Martin Harriman – SNOBOL lexer</li>
+<li>Matthew Harrison – SVG formatter</li>
+<li>Steven Hazel – Tcl lexer</li>
+<li>Aslak Hellesøy – Gherkin lexer</li>
+<li>Greg Hendershott – Racket lexer</li>
+<li>David Hess, Fish Software, Inc. – Objective-J lexer</li>
+<li>Varun Hiremath – Debian control lexer</li>
+<li>Rob Hoelz – Perl 6 lexer</li>
+<li>Doug Hogan – Mscgen lexer</li>
+<li>Ben Hollis – Mason lexer</li>
+<li>Max Horn – GAP lexer</li>
+<li>Dustin Howett – Logos lexer</li>
+<li>Alastair Houghton – Lexer inheritance facility</li>
+<li>Tim Howard – BlitzMax lexer</li>
+<li>Ivan Inozemtsev – Fantom lexer</li>
+<li>Brian R. Jackson – Tea lexer</li>
+<li>Christian Jann – ShellSession lexer</li>
+<li>Dennis Kaarsemaker – sources.list lexer</li>
+<li>Dmitri Kabak - Inferno Limbo lexer</li>
+<li>Igor Kalnitsky – vhdl lexer</li>
+<li>Alexander Kit – MaskJS lexer</li>
+<li>Pekka Klärck – Robot Framework lexer</li>
+<li>Gerwin Klein – Isabelle lexer</li>
+<li>Eric Knibbe – Lasso lexer</li>
+<li>Stepan Koltsov – Clay lexer</li>
+<li>Adam Koprowski – Opa lexer</li>
+<li>Benjamin Kowarsch – Modula-2 lexer</li>
+<li>Domen Kožar – Nix lexer</li>
+<li>Alexander Kriegisch – Kconfig and AspectJ lexers</li>
+<li>Marek Kubica – Scheme lexer</li>
+<li>Jochen Kupperschmidt – Markdown processor</li>
+<li>Gerd Kurzbach – Modelica lexer</li>
+<li>Jon Larimer, Google Inc. – Smali lexer</li>
+<li>Olov Lassus – Dart lexer</li>
+<li>Sylvestre Ledru – Scilab lexer</li>
+<li>Mark Lee – Vala lexer</li>
+<li>Ben Mabey – Gherkin lexer</li>
+<li>Angus MacArthur – QML lexer</li>
+<li>Louis Marchand – Eiffel lexer</li>
+<li>Simone Margaritelli – Hybris lexer</li>
+<li>Kirk McDonald – D lexer</li>
+<li>Gordon McGregor – SystemVerilog lexer</li>
+<li>Stephen McKamey – Duel/JBST lexer</li>
+<li>Brian McKenna – F# lexer</li>
+<li>Charles McLaughlin – Puppet lexer</li>
+<li>Lukas Meuser – BBCode formatter, Lua lexer</li>
+<li>Cat Miller – Pig lexer</li>
+<li>Paul Miller – LiveScript lexer</li>
+<li>Hong Minhee – HTTP lexer</li>
+<li>Michael Mior – Awk lexer</li>
+<li>Bruce Mitchener – Dylan lexer rewrite</li>
+<li>Reuben Morais – SourcePawn lexer</li>
+<li>Jon Morton – Rust lexer</li>
+<li>Paulo Moura – Logtalk lexer</li>
+<li>Mher Movsisyan – DTD lexer</li>
+<li>Ana Nelson – Ragel, ANTLR, R console lexers</li>
+<li>Nam T. Nguyen – Monokai style</li>
+<li>Jesper Noehr – HTML formatter “anchorlinenos”</li>
+<li>Mike Nolta – Julia lexer</li>
+<li>Jonas Obrist – BBCode lexer</li>
+<li>Edward O’Callaghan – Cryptol lexer</li>
+<li>David Oliva – Rebol lexer</li>
+<li>Pat Pannuto – nesC lexer</li>
+<li>Jon Parise – Protocol buffers lexer</li>
+<li>Ronny Pfannschmidt – BBCode lexer</li>
+<li>Benjamin Peterson – Test suite refactoring</li>
+<li>Dominik Picheta – Nimrod lexer</li>
+<li>Andrew Pinkham – RTF Formatter Refactoring</li>
+<li>Clément Prévost – UrbiScript lexer</li>
+<li>raichoo – Idris lexer</li>
+<li>Kashif Rasul – CUDA lexer</li>
+<li>Justin Reidy – MXML lexer</li>
+<li>Norman Richards – JSON lexer</li>
+<li>Corey Richardson – Rust lexer updates</li>
+<li>Lubomir Rintel – GoodData MAQL and CL lexers</li>
+<li>Andre Roberge – Tango style</li>
+<li>Konrad Rudolph – LaTeX formatter enhancements</li>
+<li>Mario Ruggier – Evoque lexers</li>
+<li>Stou Sandalski – NumPy, FORTRAN, tcsh and XSLT lexers</li>
+<li>Matteo Sasso – Common Lisp lexer</li>
+<li>Joe Schafer – Ada lexer</li>
+<li>Ken Schutte – Matlab lexers</li>
+<li>Tassilo Schweyer – Io, MOOCode lexers</li>
+<li>Ted Shaw – AutoIt lexer</li>
+<li>Joerg Sieker – ABAP lexer</li>
+<li>Robert Simmons – Standard ML lexer</li>
+<li>Kirill Simonov – YAML lexer</li>
+<li>Alexander Smishlajev – Visual FoxPro lexer</li>
+<li>Steve Spigarelli – XQuery lexer</li>
+<li>Jerome St-Louis – eC lexer</li>
+<li>James Strachan – Kotlin lexer</li>
+<li>Tom Stuart – Treetop lexer</li>
+<li>Tiberius Teng – default style overhaul</li>
+<li>Jeremy Thurgood – Erlang, Squid config lexers</li>
+<li>Brian Tiffin – OpenCOBOL lexer</li>
+<li>Bob Tolbert – Hy lexer</li>
+<li>Erick Tryzelaar – Felix lexer</li>
+<li>Alexander Udalov – Kotlin lexer improvements</li>
+<li>Thomas Van Doren – Chapel lexer</li>
+<li>Daniele Varrazzo – PostgreSQL lexers</li>
+<li>Abe Voelker – OpenEdge ABL lexer</li>
+<li>Pepijn de Vos – HTML formatter CTags support</li>
+<li>Whitney Young – ObjectiveC lexer</li>
+<li>Matthias Vallentin – Bro lexer</li>
+<li>Linh Vu Hong – RSL lexer</li>
+<li>Nathan Weizenbaum – Haml and Sass lexers</li>
+<li>Dietmar Winkler – Modelica lexer</li>
+<li>Nils Winter – Smalltalk lexer</li>
+<li>Davy Wybiral – Clojure lexer</li>
+<li>Diego Zamboni – CFengine3 lexer</li>
+<li>Enrique Zamudio – Ceylon lexer</li>
+<li>Alex Zimin – Nemerle lexer</li>
+<li>Rob Zimmerman – Kal lexer</li>
+</ul>
+<p>Many thanks for all contributions!</p>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="changelog.html"
+ title="previous chapter">Pygments changelog</a></p>
+ <div role="note" aria-label="source link">
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="../_sources/docs/authors.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+ </div>
+<strong>« <a href="index.html">Back to docs index</a></strong>
+
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="../search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="changelog.html" title="Pygments changelog"
+ >previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" >Pygments documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Pygments changelog — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '../',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+ <link rel="shortcut icon" href="../_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="../index.html" />
+ <link rel="up" title="Pygments documentation" href="index.html" />
+ <link rel="next" title="Full contributor list" href="authors.html" />
+ <link rel="prev" title="Using Pygments in various scenarios" href="integrate.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="authors.html" title="Full contributor list"
+ accesskey="N">next</a> |</li>
+ <li class="right" >
+ <a href="integrate.html" title="Using Pygments in various scenarios"
+ accesskey="P">previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" accesskey="U">Pygments documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <div class="section" id="pygments-changelog">
+<h1>Pygments changelog<a class="headerlink" href="#pygments-changelog" title="Permalink to this headline">¶</a></h1>
+<p>Issue numbers refer to the tracker at
+<<a class="reference external" href="http://bitbucket.org/birkenfeld/pygments-main/issues">http://bitbucket.org/birkenfeld/pygments-main/issues</a>>,
+pull request numbers to the requests at
+<<a class="reference external" href="http://bitbucket.org/birkenfeld/pygments-main/pull-requests/merged">http://bitbucket.org/birkenfeld/pygments-main/pull-requests/merged</a>>.</p>
+<div class="section" id="version-2-0rc1">
+<h2>Version 2.0rc1<a class="headerlink" href="#version-2-0rc1" title="Permalink to this headline">¶</a></h2>
+<p>(released Oct 16, 2014)</p>
+<ul class="simple">
+<li>Dropped Python 2.4 and 2.5 compatibility. This is in favor of single-source
+compatibility between Python 2.6, 2.7 and 3.3+.</li>
+<li>New website and documentation based on Sphinx (finally!)</li>
+<li>Lexers added:<ul>
+<li>APL (#969)</li>
+<li>Agda and Literate Agda (PR#203)</li>
+<li>Alloy (PR#355)</li>
+<li>AmbientTalk</li>
+<li>BlitzBasic (PR#197)</li>
+<li>ChaiScript (PR#24)</li>
+<li>Chapel (PR#256)</li>
+<li>Cirru (PR#275)</li>
+<li>Clay (PR#184)</li>
+<li>ColdFusion CFC (PR#283)</li>
+<li>Cryptol and Literate Cryptol (PR#344)</li>
+<li>Cypher (PR#257)</li>
+<li>Docker config files</li>
+<li>EBNF (PR#193)</li>
+<li>Eiffel (PR#273)</li>
+<li>GAP (PR#311)</li>
+<li>Golo (PR#309)</li>
+<li>Handlebars (PR#186)</li>
+<li>Hy (PR#238)</li>
+<li>Idris and Literate Idris (PR#210)</li>
+<li>Igor Pro (PR#172)</li>
+<li>Inform 6/7 (PR#281)</li>
+<li>Intel objdump (PR#279)</li>
+<li>Isabelle (PR#386)</li>
+<li>Jasmin (PR#349)</li>
+<li>JSON-LD (PR#289)</li>
+<li>Kal (PR#233)</li>
+<li>Lean (PR#399)</li>
+<li>LSL (PR#296)</li>
+<li>Limbo (PR#291)</li>
+<li>Liquid (#977)</li>
+<li>MQL (PR#285)</li>
+<li>MaskJS (PR#280)</li>
+<li>Mozilla preprocessors</li>
+<li>Mathematica (PR#245)</li>
+<li>NesC (PR#166)</li>
+<li>Nit (PR#375)</li>
+<li>Nix (PR#267)</li>
+<li>Pan</li>
+<li>Pawn (PR#211)</li>
+<li>Perl 6 (PR#181)</li>
+<li>Pig (PR#304)</li>
+<li>Pike (PR#237)</li>
+<li>QBasic (PR#182)</li>
+<li>Red (PR#341)</li>
+<li>ResourceBundle (#1038)</li>
+<li>Rexx (PR#199)</li>
+<li>Rql (PR#251)</li>
+<li>Rsl</li>
+<li>SPARQL (PR#78)</li>
+<li>Slim (PR#366)</li>
+<li>Swift (PR#371)</li>
+<li>Swig (PR#168)</li>
+<li>TADS 3 (PR#407)</li>
+<li>Todo.txt todo lists</li>
+<li>Twig (PR#404)</li>
+</ul>
+</li>
+<li>Default lexer encoding is now “guess”, i.e. UTF-8 / Locale / Latin1 is
+tried in that order.</li>
+<li>Added a helper to “optimize” regular expressions that match one of many
+literal words; this can save 20% and more lexing time with lexers that
+highlight many keywords or builtins.</li>
+<li>New styles: “xcode” and “igor”, similar to the default highlighting of
+the respective IDEs.</li>
+<li>The command-line “pygmentize” tool now tries a little harder to find the
+correct encoding for files and the terminal (#979).</li>
+<li>Added “inencoding” option for lexers to override “encoding” analogous
+to “outencoding” (#800).</li>
+<li>Added line-by-line “streaming” mode for pygmentize with the “-s” option.
+(PR#165) Only fully works for lexers that have no constructs spanning
+lines!</li>
+<li>Added an “envname” option to the LaTeX formatter to select a replacement
+verbatim environment (PR#235).</li>
+<li>Updated the Makefile lexer to yield a little more useful highlighting.</li>
+<li>Lexer aliases passed to <code class="docutils literal"><span class="pre">get_lexer_by_name()</span></code> are now case-insensitive.</li>
+<li>File name matching in lexers and formatters will now use a regex cache
+for speed (PR#205).</li>
+<li>Pygments will now recognize “vim” modelines when guessing the lexer for
+a file based on content (PR#118).</li>
+<li>The NameHighlightFilter now works with any Name.* token type (#790).</li>
+<li>Python 3 lexer: add new exceptions from PEP 3151.</li>
+<li>Opa lexer: add new keywords (PR#170).</li>
+<li>Julia lexer: add keywords and underscore-separated number
+literals (PR#176).</li>
+<li>Lasso lexer: fix method highlighting, update builtins. Fix
+guessing so that plain XML isn’t always taken as Lasso (PR#163).</li>
+<li>Objective C/C++ lexers: allow “@” prefixing any expression (#871).</li>
+<li>Ruby lexer: fix lexing of Name::Space tokens (#860) and of symbols
+in hashes (#873).</li>
+<li>Stan lexer: update for version 2.4.0 of the language (PR#162, PR#255, PR#377).</li>
+<li>JavaScript lexer: add the “yield” keyword (PR#196).</li>
+<li>HTTP lexer: support for PATCH method (PR#190).</li>
+<li>Koka lexer: update to newest language spec (PR#201).</li>
+<li>Haxe lexer: rewrite and support for Haxe 3 (PR#174).</li>
+<li>Prolog lexer: add different kinds of numeric literals (#864).</li>
+<li>F# lexer: rewrite with newest spec for F# 3.0 (#842), fix a bug with
+dotted chains (#948).</li>
+<li>Kotlin lexer: general update (PR#271).</li>
+<li>Rebol lexer: fix comment detection and analyse_text (PR#261).</li>
+<li>LLVM lexer: update keywords to v3.4 (PR#258).</li>
+<li>PHP lexer: add new keywords and binary literals (PR#222).</li>
+<li>external/markdown-processor.py updated to newest python-markdown (PR#221).</li>
+<li>CSS lexer: some highlighting order fixes (PR#231).</li>
+<li>Ceylon lexer: fix parsing of nested multiline comments (#915).</li>
+<li>C family lexers: fix parsing of indented preprocessor directives (#944).</li>
+<li>Rust lexer: update to 0.9 language version (PR#270, PR#388).</li>
+<li>Elixir lexer: update to 0.15 language version (PR#392).</li>
+<li>Fix swallowing incomplete tracebacks in Python console lexer (#874).</li>
+</ul>
+</div>
+<div class="section" id="version-1-6">
+<h2>Version 1.6<a class="headerlink" href="#version-1-6" title="Permalink to this headline">¶</a></h2>
+<p>(released Feb 3, 2013)</p>
+<ul class="simple">
+<li>Lexers added:<ul>
+<li>Dylan console (PR#149)</li>
+<li>Logos (PR#150)</li>
+<li>Shell sessions (PR#158)</li>
+</ul>
+</li>
+<li>Fix guessed lexers not receiving lexer options (#838).</li>
+<li>Fix unquoted HTML attribute lexing in Opa (#841).</li>
+<li>Fixes to the Dart lexer (PR#160).</li>
+</ul>
+</div>
+<div class="section" id="version-1-6rc1">
+<h2>Version 1.6rc1<a class="headerlink" href="#version-1-6rc1" title="Permalink to this headline">¶</a></h2>
+<p>(released Jan 9, 2013)</p>
+<ul class="simple">
+<li>Lexers added:<ul>
+<li>AspectJ (PR#90)</li>
+<li>AutoIt (PR#122)</li>
+<li>BUGS-like languages (PR#89)</li>
+<li>Ceylon (PR#86)</li>
+<li>Croc (new name for MiniD)</li>
+<li>CUDA (PR#75)</li>
+<li>Dg (PR#116)</li>
+<li>IDL (PR#115)</li>
+<li>Jags (PR#89)</li>
+<li>Julia (PR#61)</li>
+<li>Kconfig (#711)</li>
+<li>Lasso (PR#95, PR#113)</li>
+<li>LiveScript (PR#84)</li>
+<li>Monkey (PR#117)</li>
+<li>Mscgen (PR#80)</li>
+<li>NSIS scripts (PR#136)</li>
+<li>OpenCOBOL (PR#72)</li>
+<li>QML (PR#123)</li>
+<li>Puppet (PR#133)</li>
+<li>Racket (PR#94)</li>
+<li>Rdoc (PR#99)</li>
+<li>Robot Framework (PR#137)</li>
+<li>RPM spec files (PR#124)</li>
+<li>Rust (PR#67)</li>
+<li>Smali (Dalvik assembly)</li>
+<li>SourcePawn (PR#39)</li>
+<li>Stan (PR#89)</li>
+<li>Treetop (PR#125)</li>
+<li>TypeScript (PR#114)</li>
+<li>VGL (PR#12)</li>
+<li>Visual FoxPro (#762)</li>
+<li>Windows Registry (#819)</li>
+<li>Xtend (PR#68)</li>
+</ul>
+</li>
+<li>The HTML formatter now supports linking to tags using CTags files, when the
+python-ctags package is installed (PR#87).</li>
+<li>The HTML formatter now has a “linespans” option that wraps every line in a
+<span> tag with a specific id (PR#82).</li>
+<li>When deriving a lexer from another lexer with token definitions, definitions
+for states not in the child lexer are now inherited. If you override a state
+in the child lexer, an “inherit” keyword has been added to insert the base
+state at that position (PR#141).</li>
+<li>The C family lexers now inherit token definitions from a common base class,
+removing code duplication (PR#141).</li>
+<li>Use “colorama” on Windows for console color output (PR#142).</li>
+<li>Fix Template Haskell highlighting (PR#63).</li>
+<li>Fix some S/R lexer errors (PR#91).</li>
+<li>Fix a bug in the Prolog lexer with names that start with ‘is’ (#810).</li>
+<li>Rewrite Dylan lexer, add Dylan LID lexer (PR#147).</li>
+<li>Add a Java quickstart document (PR#146).</li>
+<li>Add a “external/autopygmentize” file that can be used as .lessfilter (#802).</li>
+</ul>
+</div>
+<div class="section" id="version-1-5">
+<h2>Version 1.5<a class="headerlink" href="#version-1-5" title="Permalink to this headline">¶</a></h2>
+<p>(codename Zeitdilatation, released Mar 10, 2012)</p>
+<ul class="simple">
+<li>Lexers added:<ul>
+<li>Awk (#630)</li>
+<li>Fancy (#633)</li>
+<li>PyPy Log</li>
+<li>eC</li>
+<li>Nimrod</li>
+<li>Nemerle (#667)</li>
+<li>F# (#353)</li>
+<li>Groovy (#501)</li>
+<li>PostgreSQL (#660)</li>
+<li>DTD</li>
+<li>Gosu (#634)</li>
+<li>Octave (PR#22)</li>
+<li>Standard ML (PR#14)</li>
+<li>CFengine3 (#601)</li>
+<li>Opa (PR#37)</li>
+<li>HTTP sessions (PR#42)</li>
+<li>JSON (PR#31)</li>
+<li>SNOBOL (PR#30)</li>
+<li>MoonScript (PR#43)</li>
+<li>ECL (PR#29)</li>
+<li>Urbiscript (PR#17)</li>
+<li>OpenEdge ABL (PR#27)</li>
+<li>SystemVerilog (PR#35)</li>
+<li>Coq (#734)</li>
+<li>PowerShell (#654)</li>
+<li>Dart (#715)</li>
+<li>Fantom (PR#36)</li>
+<li>Bro (PR#5)</li>
+<li>NewLISP (PR#26)</li>
+<li>VHDL (PR#45)</li>
+<li>Scilab (#740)</li>
+<li>Elixir (PR#57)</li>
+<li>Tea (PR#56)</li>
+<li>Kotlin (PR#58)</li>
+</ul>
+</li>
+<li>Fix Python 3 terminal highlighting with pygmentize (#691).</li>
+<li>In the LaTeX formatter, escape special &, < and > chars (#648).</li>
+<li>In the LaTeX formatter, fix display problems for styles with token
+background colors (#670).</li>
+<li>Enhancements to the Squid conf lexer (#664).</li>
+<li>Several fixes to the reStructuredText lexer (#636).</li>
+<li>Recognize methods in the ObjC lexer (#638).</li>
+<li>Fix Lua “class” highlighting: it does not have classes (#665).</li>
+<li>Fix degenerate regex in Scala lexer (#671) and highlighting bugs (#713, 708).</li>
+<li>Fix number pattern order in Ocaml lexer (#647).</li>
+<li>Fix generic type highlighting in ActionScript 3 (#666).</li>
+<li>Fixes to the Clojure lexer (PR#9).</li>
+<li>Fix degenerate regex in Nemerle lexer (#706).</li>
+<li>Fix infinite looping in CoffeeScript lexer (#729).</li>
+<li>Fix crashes and analysis with ObjectiveC lexer (#693, #696).</li>
+<li>Add some Fortran 2003 keywords.</li>
+<li>Fix Boo string regexes (#679).</li>
+<li>Add “rrt” style (#727).</li>
+<li>Fix infinite looping in Darcs Patch lexer.</li>
+<li>Lots of misc fixes to character-eating bugs and ordering problems in many
+different lexers.</li>
+</ul>
+</div>
+<div class="section" id="version-1-4">
+<h2>Version 1.4<a class="headerlink" href="#version-1-4" title="Permalink to this headline">¶</a></h2>
+<p>(codename Unschärfe, released Jan 03, 2011)</p>
+<ul class="simple">
+<li>Lexers added:<ul>
+<li>Factor (#520)</li>
+<li>PostScript (#486)</li>
+<li>Verilog (#491)</li>
+<li>BlitzMax Basic (#478)</li>
+<li>Ioke (#465)</li>
+<li>Java properties, split out of the INI lexer (#445)</li>
+<li>Scss (#509)</li>
+<li>Duel/JBST</li>
+<li>XQuery (#617)</li>
+<li>Mason (#615)</li>
+<li>GoodData (#609)</li>
+<li>SSP (#473)</li>
+<li>Autohotkey (#417)</li>
+<li>Google Protocol Buffers</li>
+<li>Hybris (#506)</li>
+</ul>
+</li>
+<li>Do not fail in analyse_text methods (#618).</li>
+<li>Performance improvements in the HTML formatter (#523).</li>
+<li>With the <code class="docutils literal"><span class="pre">noclasses</span></code> option in the HTML formatter, some styles
+present in the stylesheet were not added as inline styles.</li>
+<li>Four fixes to the Lua lexer (#480, #481, #482, #497).</li>
+<li>More context-sensitive Gherkin lexer with support for more i18n translations.</li>
+<li>Support new OO keywords in Matlab lexer (#521).</li>
+<li>Small fix in the CoffeeScript lexer (#519).</li>
+<li>A bugfix for backslashes in ocaml strings (#499).</li>
+<li>Fix unicode/raw docstrings in the Python lexer (#489).</li>
+<li>Allow PIL to work without PIL.pth (#502).</li>
+<li>Allow seconds as a unit in CSS (#496).</li>
+<li>Support <code class="docutils literal"><span class="pre">application/javascript</span></code> as a JavaScript mime type (#504).</li>
+<li>Support <a class="reference external" href="http://offload.codeplay.com">Offload</a> C++ Extensions as
+keywords in the C++ lexer (#484).</li>
+<li>Escape more characters in LaTeX output (#505).</li>
+<li>Update Haml/Sass lexers to version 3 (#509).</li>
+<li>Small PHP lexer string escaping fix (#515).</li>
+<li>Support comments before preprocessor directives, and unsigned/
+long long literals in C/C++ (#613, #616).</li>
+<li>Support line continuations in the INI lexer (#494).</li>
+<li>Fix lexing of Dylan string and char literals (#628).</li>
+<li>Fix class/procedure name highlighting in VB.NET lexer (#624).</li>
+</ul>
+</div>
+<div class="section" id="version-1-3-1">
+<h2>Version 1.3.1<a class="headerlink" href="#version-1-3-1" title="Permalink to this headline">¶</a></h2>
+<p>(bugfix release, released Mar 05, 2010)</p>
+<ul class="simple">
+<li>The <code class="docutils literal"><span class="pre">pygmentize</span></code> script was missing from the distribution.</li>
+</ul>
+</div>
+<div class="section" id="version-1-3">
+<h2>Version 1.3<a class="headerlink" href="#version-1-3" title="Permalink to this headline">¶</a></h2>
+<p>(codename Schneeglöckchen, released Mar 01, 2010)</p>
+<ul class="simple">
+<li>Added the <code class="docutils literal"><span class="pre">ensurenl</span></code> lexer option, which can be used to suppress the
+automatic addition of a newline to the lexer input.</li>
+<li>Lexers added:<ul>
+<li>Ada</li>
+<li>Coldfusion</li>
+<li>Modula-2</li>
+<li>Haxe</li>
+<li>R console</li>
+<li>Objective-J</li>
+<li>Haml and Sass</li>
+<li>CoffeeScript</li>
+</ul>
+</li>
+<li>Enhanced reStructuredText highlighting.</li>
+<li>Added support for PHP 5.3 namespaces in the PHP lexer.</li>
+<li>Added a bash completion script for <cite>pygmentize</cite>, to the external/
+directory (#466).</li>
+<li>Fixed a bug in <cite>do_insertions()</cite> used for multi-lexer languages.</li>
+<li>Fixed a Ruby regex highlighting bug (#476).</li>
+<li>Fixed regex highlighting bugs in Perl lexer (#258).</li>
+<li>Add small enhancements to the C lexer (#467) and Bash lexer (#469).</li>
+<li>Small fixes for the Tcl, Debian control file, Nginx config,
+Smalltalk, Objective-C, Clojure, Lua lexers.</li>
+<li>Gherkin lexer: Fixed single apostrophe bug and added new i18n keywords.</li>
+</ul>
+</div>
+<div class="section" id="version-1-2-2">
+<h2>Version 1.2.2<a class="headerlink" href="#version-1-2-2" title="Permalink to this headline">¶</a></h2>
+<p>(bugfix release, released Jan 02, 2010)</p>
+<ul class="simple">
+<li>Removed a backwards incompatibility in the LaTeX formatter that caused
+Sphinx to produce invalid commands when writing LaTeX output (#463).</li>
+<li>Fixed a forever-backtracking regex in the BashLexer (#462).</li>
+</ul>
+</div>
+<div class="section" id="version-1-2-1">
+<h2>Version 1.2.1<a class="headerlink" href="#version-1-2-1" title="Permalink to this headline">¶</a></h2>
+<p>(bugfix release, released Jan 02, 2010)</p>
+<ul class="simple">
+<li>Fixed mishandling of an ellipsis in place of the frames in a Python
+console traceback, resulting in clobbered output.</li>
+</ul>
+</div>
+<div class="section" id="version-1-2">
+<h2>Version 1.2<a class="headerlink" href="#version-1-2" title="Permalink to this headline">¶</a></h2>
+<p>(codename Neujahr, released Jan 01, 2010)</p>
+<ul class="simple">
+<li>Dropped Python 2.3 compatibility.</li>
+<li>Lexers added:<ul>
+<li>Asymptote</li>
+<li>Go</li>
+<li>Gherkin (Cucumber)</li>
+<li>CMake</li>
+<li>Ooc</li>
+<li>Coldfusion</li>
+<li>Haxe</li>
+<li>R console</li>
+</ul>
+</li>
+<li>Added options for rendering LaTeX in source code comments in the
+LaTeX formatter (#461).</li>
+<li>Updated the Logtalk lexer.</li>
+<li>Added <cite>line_number_start</cite> option to image formatter (#456).</li>
+<li>Added <cite>hl_lines</cite> and <cite>hl_color</cite> options to image formatter (#457).</li>
+<li>Fixed the HtmlFormatter’s handling of noclasses=True to not output any
+classes (#427).</li>
+<li>Added the Monokai style (#453).</li>
+<li>Fixed LLVM lexer identifier syntax and added new keywords (#442).</li>
+<li>Fixed the PythonTracebackLexer to handle non-traceback data in header or
+trailer, and support more partial tracebacks that start on line 2 (#437).</li>
+<li>Fixed the CLexer to not highlight ternary statements as labels.</li>
+<li>Fixed lexing of some Ruby quoting peculiarities (#460).</li>
+<li>A few ASM lexer fixes (#450).</li>
+</ul>
+</div>
+<div class="section" id="version-1-1-1">
+<h2>Version 1.1.1<a class="headerlink" href="#version-1-1-1" title="Permalink to this headline">¶</a></h2>
+<p>(bugfix release, released Sep 15, 2009)</p>
+<ul class="simple">
+<li>Fixed the BBCode lexer (#435).</li>
+<li>Added support for new Jinja2 keywords.</li>
+<li>Fixed test suite failures.</li>
+<li>Added Gentoo-specific suffixes to Bash lexer.</li>
+</ul>
+</div>
+<div class="section" id="version-1-1">
+<h2>Version 1.1<a class="headerlink" href="#version-1-1" title="Permalink to this headline">¶</a></h2>
+<p>(codename Brillouin, released Sep 11, 2009)</p>
+<ul class="simple">
+<li>Ported Pygments to Python 3. This needed a few changes in the way
+encodings are handled; they may affect corner cases when used with
+Python 2 as well.</li>
+<li>Lexers added:<ul>
+<li>Antlr/Ragel, thanks to Ana Nelson</li>
+<li>(Ba)sh shell</li>
+<li>Erlang shell</li>
+<li>GLSL</li>
+<li>Prolog</li>
+<li>Evoque</li>
+<li>Modelica</li>
+<li>Rebol</li>
+<li>MXML</li>
+<li>Cython</li>
+<li>ABAP</li>
+<li>ASP.net (VB/C#)</li>
+<li>Vala</li>
+<li>Newspeak</li>
+</ul>
+</li>
+<li>Fixed the LaTeX formatter’s output so that output generated for one style
+can be used with the style definitions of another (#384).</li>
+<li>Added “anchorlinenos” and “noclobber_cssfile” (#396) options to HTML
+formatter.</li>
+<li>Support multiline strings in Lua lexer.</li>
+<li>Rewrite of the JavaScript lexer by Pumbaa80 to better support regular
+expression literals (#403).</li>
+<li>When pygmentize is asked to highlight a file for which multiple lexers
+match the filename, use the analyse_text guessing engine to determine the
+winner (#355).</li>
+<li>Fixed minor bugs in the JavaScript lexer (#383), the Matlab lexer (#378),
+the Scala lexer (#392), the INI lexer (#391), the Clojure lexer (#387)
+and the AS3 lexer (#389).</li>
+<li>Fixed three Perl heredoc lexing bugs (#379, #400, #422).</li>
+<li>Fixed a bug in the image formatter which misdetected lines (#380).</li>
+<li>Fixed bugs lexing extended Ruby strings and regexes.</li>
+<li>Fixed a bug when lexing git diffs.</li>
+<li>Fixed a bug lexing the empty commit in the PHP lexer (#405).</li>
+<li>Fixed a bug causing Python numbers to be mishighlighted as floats (#397).</li>
+<li>Fixed a bug when backslashes are used in odd locations in Python (#395).</li>
+<li>Fixed various bugs in Matlab and S-Plus lexers, thanks to Winston Chang (#410,
+#411, #413, #414) and fmarc (#419).</li>
+<li>Fixed a bug in Haskell single-line comment detection (#426).</li>
+<li>Added new-style reStructuredText directive for docutils 0.5+ (#428).</li>
+</ul>
+</div>
+<div class="section" id="version-1-0">
+<h2>Version 1.0<a class="headerlink" href="#version-1-0" title="Permalink to this headline">¶</a></h2>
+<p>(codename Dreiundzwanzig, released Nov 23, 2008)</p>
+<ul>
+<li><p class="first">Don’t use join(splitlines()) when converting newlines to <code class="docutils literal"><span class="pre">\n</span></code>,
+because that doesn’t keep all newlines at the end when the
+<code class="docutils literal"><span class="pre">stripnl</span></code> lexer option is False.</p>
+</li>
+<li><p class="first">Added <code class="docutils literal"><span class="pre">-N</span></code> option to command-line interface to get a lexer name
+for a given filename.</p>
+</li>
+<li><p class="first">Added Tango style, written by Andre Roberge for the Crunchy project.</p>
+</li>
+<li><p class="first">Added Python3TracebackLexer and <code class="docutils literal"><span class="pre">python3</span></code> option to
+PythonConsoleLexer.</p>
+</li>
+<li><p class="first">Fixed a few bugs in the Haskell lexer.</p>
+</li>
+<li><p class="first">Fixed PythonTracebackLexer to be able to recognize SyntaxError and
+KeyboardInterrupt (#360).</p>
+</li>
+<li><p class="first">Provide one formatter class per image format, so that surprises like:</p>
+<div class="highlight-python"><div class="highlight"><pre>pygmentize -f gif -o foo.gif foo.py
+</pre></div>
+</div>
+<p>creating a PNG file are avoided.</p>
+</li>
+<li><p class="first">Actually use the <cite>font_size</cite> option of the image formatter.</p>
+</li>
+<li><p class="first">Fixed numpy lexer that it doesn’t listen for <cite>*.py</cite> any longer.</p>
+</li>
+<li><p class="first">Fixed HTML formatter so that text options can be Unicode
+strings (#371).</p>
+</li>
+<li><p class="first">Unified Diff lexer supports the “udiff” alias now.</p>
+</li>
+<li><p class="first">Fixed a few issues in Scala lexer (#367).</p>
+</li>
+<li><p class="first">RubyConsoleLexer now supports simple prompt mode (#363).</p>
+</li>
+<li><p class="first">JavascriptLexer is smarter about what constitutes a regex (#356).</p>
+</li>
+<li><p class="first">Add Applescript lexer, thanks to Andreas Amann (#330).</p>
+</li>
+<li><p class="first">Make the codetags more strict about matching words (#368).</p>
+</li>
+<li><p class="first">NginxConfLexer is a little more accurate on mimetypes and
+variables (#370).</p>
+</li>
+</ul>
+</div>
+<div class="section" id="version-0-11-1">
+<h2>Version 0.11.1<a class="headerlink" href="#version-0-11-1" title="Permalink to this headline">¶</a></h2>
+<p>(released Aug 24, 2008)</p>
+<ul class="simple">
+<li>Fixed a Jython compatibility issue in pygments.unistring (#358).</li>
+</ul>
+</div>
+<div class="section" id="version-0-11">
+<h2>Version 0.11<a class="headerlink" href="#version-0-11" title="Permalink to this headline">¶</a></h2>
+<p>(codename Straußenei, released Aug 23, 2008)</p>
+<p>Many thanks go to Tim Hatch for writing or integrating most of the bug
+fixes and new features.</p>
+<ul class="simple">
+<li>Lexers added:<ul>
+<li>Nasm-style assembly language, thanks to delroth</li>
+<li>YAML, thanks to Kirill Simonov</li>
+<li>ActionScript 3, thanks to Pierre Bourdon</li>
+<li>Cheetah/Spitfire templates, thanks to Matt Good</li>
+<li>Lighttpd config files</li>
+<li>Nginx config files</li>
+<li>Gnuplot plotting scripts</li>
+<li>Clojure</li>
+<li>POV-Ray scene files</li>
+<li>Sqlite3 interactive console sessions</li>
+<li>Scala source files, thanks to Krzysiek Goj</li>
+</ul>
+</li>
+<li>Lexers improved:<ul>
+<li>C lexer highlights standard library functions now and supports C99
+types.</li>
+<li>Bash lexer now correctly highlights heredocs without preceding
+whitespace.</li>
+<li>Vim lexer now highlights hex colors properly and knows a couple
+more keywords.</li>
+<li>Irc logs lexer now handles xchat’s default time format (#340) and
+correctly highlights lines ending in <code class="docutils literal"><span class="pre">></span></code>.</li>
+<li>Support more delimiters for perl regular expressions (#258).</li>
+<li>ObjectiveC lexer now supports 2.0 features.</li>
+</ul>
+</li>
+<li>Added “Visual Studio” style.</li>
+<li>Updated markdown processor to Markdown 1.7.</li>
+<li>Support roman/sans/mono style defs and use them in the LaTeX
+formatter.</li>
+<li>The RawTokenFormatter is no longer registered to <code class="docutils literal"><span class="pre">*.raw</span></code> and it’s
+documented that tokenization with this lexer may raise exceptions.</li>
+<li>New option <code class="docutils literal"><span class="pre">hl_lines</span></code> to HTML formatter, to highlight certain
+lines.</li>
+<li>New option <code class="docutils literal"><span class="pre">prestyles</span></code> to HTML formatter.</li>
+<li>New option <em>-g</em> to pygmentize, to allow lexer guessing based on
+filetext (can be slowish, so file extensions are still checked
+first).</li>
+<li><code class="docutils literal"><span class="pre">guess_lexer()</span></code> now makes its decision much faster due to a cache
+of whether data is xml-like (a check which is used in several
+versions of <code class="docutils literal"><span class="pre">analyse_text()</span></code>. Several lexers also have more
+accurate <code class="docutils literal"><span class="pre">analyse_text()</span></code> now.</li>
+</ul>
+</div>
+<div class="section" id="version-0-10">
+<h2>Version 0.10<a class="headerlink" href="#version-0-10" title="Permalink to this headline">¶</a></h2>
+<p>(codename Malzeug, released May 06, 2008)</p>
+<ul class="simple">
+<li>Lexers added:<ul>
+<li>Io</li>
+<li>Smalltalk</li>
+<li>Darcs patches</li>
+<li>Tcl</li>
+<li>Matlab</li>
+<li>Matlab sessions</li>
+<li>FORTRAN</li>
+<li>XSLT</li>
+<li>tcsh</li>
+<li>NumPy</li>
+<li>Python 3</li>
+<li>S, S-plus, R statistics languages</li>
+<li>Logtalk</li>
+</ul>
+</li>
+<li>In the LatexFormatter, the <em>commandprefix</em> option is now by default
+‘PY’ instead of ‘C’, since the latter resulted in several collisions
+with other packages. Also, the special meaning of the <em>arg</em>
+argument to <code class="docutils literal"><span class="pre">get_style_defs()</span></code> was removed.</li>
+<li>Added ImageFormatter, to format code as PNG, JPG, GIF or BMP.
+(Needs the Python Imaging Library.)</li>
+<li>Support doc comments in the PHP lexer.</li>
+<li>Handle format specifications in the Perl lexer.</li>
+<li>Fix comment handling in the Batch lexer.</li>
+<li>Add more file name extensions for the C++, INI and XML lexers.</li>
+<li>Fixes in the IRC and MuPad lexers.</li>
+<li>Fix function and interface name highlighting in the Java lexer.</li>
+<li>Fix at-rule handling in the CSS lexer.</li>
+<li>Handle KeyboardInterrupts gracefully in pygmentize.</li>
+<li>Added BlackWhiteStyle.</li>
+<li>Bash lexer now correctly highlights math, does not require
+whitespace after semicolons, and correctly highlights boolean
+operators.</li>
+<li>Makefile lexer is now capable of handling BSD and GNU make syntax.</li>
+</ul>
+</div>
+<div class="section" id="version-0-9">
+<h2>Version 0.9<a class="headerlink" href="#version-0-9" title="Permalink to this headline">¶</a></h2>
+<p>(codename Herbstzeitlose, released Oct 14, 2007)</p>
+<ul class="simple">
+<li>Lexers added:<ul>
+<li>Erlang</li>
+<li>ActionScript</li>
+<li>Literate Haskell</li>
+<li>Common Lisp</li>
+<li>Various assembly languages</li>
+<li>Gettext catalogs</li>
+<li>Squid configuration</li>
+<li>Debian control files</li>
+<li>MySQL-style SQL</li>
+<li>MOOCode</li>
+</ul>
+</li>
+<li>Lexers improved:<ul>
+<li>Greatly improved the Haskell and OCaml lexers.</li>
+<li>Improved the Bash lexer’s handling of nested constructs.</li>
+<li>The C# and Java lexers exhibited abysmal performance with some
+input code; this should now be fixed.</li>
+<li>The IRC logs lexer is now able to colorize weechat logs too.</li>
+<li>The Lua lexer now recognizes multi-line comments.</li>
+<li>Fixed bugs in the D and MiniD lexer.</li>
+</ul>
+</li>
+<li>The encoding handling of the command line mode (pygmentize) was
+enhanced. You shouldn’t get UnicodeErrors from it anymore if you
+don’t give an encoding option.</li>
+<li>Added a <code class="docutils literal"><span class="pre">-P</span></code> option to the command line mode which can be used to
+give options whose values contain commas or equals signs.</li>
+<li>Added 256-color terminal formatter.</li>
+<li>Added an experimental SVG formatter.</li>
+<li>Added the <code class="docutils literal"><span class="pre">lineanchors</span></code> option to the HTML formatter, thanks to
+Ian Charnas for the idea.</li>
+<li>Gave the line numbers table a CSS class in the HTML formatter.</li>
+<li>Added a Vim 7-like style.</li>
+</ul>
+</div>
+<div class="section" id="version-0-8-1">
+<h2>Version 0.8.1<a class="headerlink" href="#version-0-8-1" title="Permalink to this headline">¶</a></h2>
+<p>(released Jun 27, 2007)</p>
+<ul class="simple">
+<li>Fixed POD highlighting in the Ruby lexer.</li>
+<li>Fixed Unicode class and namespace name highlighting in the C# lexer.</li>
+<li>Fixed Unicode string prefix highlighting in the Python lexer.</li>
+<li>Fixed a bug in the D and MiniD lexers.</li>
+<li>Fixed the included MoinMoin parser.</li>
+</ul>
+</div>
+<div class="section" id="version-0-8">
+<h2>Version 0.8<a class="headerlink" href="#version-0-8" title="Permalink to this headline">¶</a></h2>
+<p>(codename Maikäfer, released May 30, 2007)</p>
+<ul class="simple">
+<li>Lexers added:<ul>
+<li>Haskell, thanks to Adam Blinkinsop</li>
+<li>Redcode, thanks to Adam Blinkinsop</li>
+<li>D, thanks to Kirk McDonald</li>
+<li>MuPad, thanks to Christopher Creutzig</li>
+<li>MiniD, thanks to Jarrett Billingsley</li>
+<li>Vim Script, by Tim Hatch</li>
+</ul>
+</li>
+<li>The HTML formatter now has a second line-numbers mode in which it
+will just integrate the numbers in the same <code class="docutils literal"><span class="pre"><pre></span></code> tag as the
+code.</li>
+<li>The <cite>CSharpLexer</cite> now is Unicode-aware, which means that it has an
+option that can be set so that it correctly lexes Unicode
+identifiers allowed by the C# specs.</li>
+<li>Added a <cite>RaiseOnErrorTokenFilter</cite> that raises an exception when the
+lexer generates an error token, and a <cite>VisibleWhitespaceFilter</cite> that
+converts whitespace (spaces, tabs, newlines) into visible
+characters.</li>
+<li>Fixed the <cite>do_insertions()</cite> helper function to yield correct
+indices.</li>
+<li>The ReST lexer now automatically highlights source code blocks in
+”.. sourcecode:: language” and ”.. code:: language” directive
+blocks.</li>
+<li>Improved the default style (thanks to Tiberius Teng). The old
+default is still available as the “emacs” style (which was an alias
+before).</li>
+<li>The <cite>get_style_defs</cite> method of HTML formatters now uses the
+<cite>cssclass</cite> option as the default selector if it was given.</li>
+<li>Improved the ReST and Bash lexers a bit.</li>
+<li>Fixed a few bugs in the Makefile and Bash lexers, thanks to Tim
+Hatch.</li>
+<li>Fixed a bug in the command line code that disallowed <code class="docutils literal"><span class="pre">-O</span></code> options
+when using the <code class="docutils literal"><span class="pre">-S</span></code> option.</li>
+<li>Fixed a bug in the <cite>RawTokenFormatter</cite>.</li>
+</ul>
+</div>
+<div class="section" id="version-0-7-1">
+<h2>Version 0.7.1<a class="headerlink" href="#version-0-7-1" title="Permalink to this headline">¶</a></h2>
+<p>(released Feb 15, 2007)</p>
+<ul class="simple">
+<li>Fixed little highlighting bugs in the Python, Java, Scheme and
+Apache Config lexers.</li>
+<li>Updated the included manpage.</li>
+<li>Included a built version of the documentation in the source tarball.</li>
+</ul>
+</div>
+<div class="section" id="version-0-7">
+<h2>Version 0.7<a class="headerlink" href="#version-0-7" title="Permalink to this headline">¶</a></h2>
+<p>(codename Faschingskrapfn, released Feb 14, 2007)</p>
+<ul class="simple">
+<li>Added a MoinMoin parser that uses Pygments. With it, you get
+Pygments highlighting in Moin Wiki pages.</li>
+<li>Changed the exception raised if no suitable lexer, formatter etc. is
+found in one of the <cite>get_*_by_*</cite> functions to a custom exception,
+<cite>pygments.util.ClassNotFound</cite>. It is, however, a subclass of
+<cite>ValueError</cite> in order to retain backwards compatibility.</li>
+<li>Added a <cite>-H</cite> command line option which can be used to get the
+docstring of a lexer, formatter or filter.</li>
+<li>Made the handling of lexers and formatters more consistent. The
+aliases and filename patterns of formatters are now attributes on
+them.</li>
+<li>Added an OCaml lexer, thanks to Adam Blinkinsop.</li>
+<li>Made the HTML formatter more flexible, and easily subclassable in
+order to make it easy to implement custom wrappers, e.g. alternate
+line number markup. See the documentation.</li>
+<li>Added an <cite>outencoding</cite> option to all formatters, making it possible
+to override the <cite>encoding</cite> (which is used by lexers and formatters)
+when using the command line interface. Also, if using the terminal
+formatter and the output file is a terminal and has an encoding
+attribute, use it if no encoding is given.</li>
+<li>Made it possible to just drop style modules into the <cite>styles</cite>
+subpackage of the Pygments installation.</li>
+<li>Added a “state” keyword argument to the <cite>using</cite> helper.</li>
+<li>Added a <cite>commandprefix</cite> option to the <cite>LatexFormatter</cite> which allows
+to control how the command names are constructed.</li>
+<li>Added quite a few new lexers, thanks to Tim Hatch:<ul>
+<li>Java Server Pages</li>
+<li>Windows batch files</li>
+<li>Trac Wiki markup</li>
+<li>Python tracebacks</li>
+<li>ReStructuredText</li>
+<li>Dylan</li>
+<li>and the Befunge esoteric programming language (yay!)</li>
+</ul>
+</li>
+<li>Added Mako lexers by Ben Bangert.</li>
+<li>Added “fruity” style, another dark background originally vim-based
+theme.</li>
+<li>Added sources.list lexer by Dennis Kaarsemaker.</li>
+<li>Added token stream filters, and a pygmentize option to use them.</li>
+<li>Changed behavior of <cite>in</cite> Operator for tokens.</li>
+<li>Added mimetypes for all lexers.</li>
+<li>Fixed some problems lexing Python strings.</li>
+<li>Fixed tickets: #167, #178, #179, #180, #185, #201.</li>
+</ul>
+</div>
+<div class="section" id="version-0-6">
+<h2>Version 0.6<a class="headerlink" href="#version-0-6" title="Permalink to this headline">¶</a></h2>
+<p>(codename Zimtstern, released Dec 20, 2006)</p>
+<ul class="simple">
+<li>Added option for the HTML formatter to write the CSS to an external
+file in “full document” mode.</li>
+<li>Added RTF formatter.</li>
+<li>Added Bash and Apache configuration lexers (thanks to Tim Hatch).</li>
+<li>Improved guessing methods for various lexers.</li>
+<li>Added <cite>@media</cite> support to CSS lexer (thanks to Tim Hatch).</li>
+<li>Added a Groff lexer (thanks to Tim Hatch).</li>
+<li>License change to BSD.</li>
+<li>Added lexers for the Myghty template language.</li>
+<li>Added a Scheme lexer (thanks to Marek Kubica).</li>
+<li>Added some functions to iterate over existing lexers, formatters and
+lexers.</li>
+<li>The HtmlFormatter’s <cite>get_style_defs()</cite> can now take a list as an
+argument to generate CSS with multiple prefixes.</li>
+<li>Support for guessing input encoding added.</li>
+<li>Encoding support added: all processing is now done with Unicode
+strings, input and output are converted from and optionally to byte
+strings (see the <code class="docutils literal"><span class="pre">encoding</span></code> option of lexers and formatters).</li>
+<li>Some improvements in the C(++) lexers handling comments and line
+continuations.</li>
+</ul>
+</div>
+<div class="section" id="version-0-5-1">
+<h2>Version 0.5.1<a class="headerlink" href="#version-0-5-1" title="Permalink to this headline">¶</a></h2>
+<p>(released Oct 30, 2006)</p>
+<ul class="simple">
+<li>Fixed traceback in <code class="docutils literal"><span class="pre">pygmentize</span> <span class="pre">-L</span></code> (thanks to Piotr Ozarowski).</li>
+</ul>
+</div>
+<div class="section" id="version-0-5">
+<h2>Version 0.5<a class="headerlink" href="#version-0-5" title="Permalink to this headline">¶</a></h2>
+<p>(codename PyKleur, released Oct 30, 2006)</p>
+<ul class="simple">
+<li>Initial public release.</li>
+</ul>
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ <h3><a href="../index.html">Table Of Contents</a></h3>
+ <ul>
+<li><a class="reference internal" href="#">Pygments changelog</a><ul>
+<li><a class="reference internal" href="#version-2-0rc1">Version 2.0rc1</a></li>
+<li><a class="reference internal" href="#version-1-6">Version 1.6</a></li>
+<li><a class="reference internal" href="#version-1-6rc1">Version 1.6rc1</a></li>
+<li><a class="reference internal" href="#version-1-5">Version 1.5</a></li>
+<li><a class="reference internal" href="#version-1-4">Version 1.4</a></li>
+<li><a class="reference internal" href="#version-1-3-1">Version 1.3.1</a></li>
+<li><a class="reference internal" href="#version-1-3">Version 1.3</a></li>
+<li><a class="reference internal" href="#version-1-2-2">Version 1.2.2</a></li>
+<li><a class="reference internal" href="#version-1-2-1">Version 1.2.1</a></li>
+<li><a class="reference internal" href="#version-1-2">Version 1.2</a></li>
+<li><a class="reference internal" href="#version-1-1-1">Version 1.1.1</a></li>
+<li><a class="reference internal" href="#version-1-1">Version 1.1</a></li>
+<li><a class="reference internal" href="#version-1-0">Version 1.0</a></li>
+<li><a class="reference internal" href="#version-0-11-1">Version 0.11.1</a></li>
+<li><a class="reference internal" href="#version-0-11">Version 0.11</a></li>
+<li><a class="reference internal" href="#version-0-10">Version 0.10</a></li>
+<li><a class="reference internal" href="#version-0-9">Version 0.9</a></li>
+<li><a class="reference internal" href="#version-0-8-1">Version 0.8.1</a></li>
+<li><a class="reference internal" href="#version-0-8">Version 0.8</a></li>
+<li><a class="reference internal" href="#version-0-7-1">Version 0.7.1</a></li>
+<li><a class="reference internal" href="#version-0-7">Version 0.7</a></li>
+<li><a class="reference internal" href="#version-0-6">Version 0.6</a></li>
+<li><a class="reference internal" href="#version-0-5-1">Version 0.5.1</a></li>
+<li><a class="reference internal" href="#version-0-5">Version 0.5</a></li>
+</ul>
+</li>
+</ul>
+
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="integrate.html"
+ title="previous chapter">Using Pygments in various scenarios</a></p>
+ <h4>Next topic</h4>
+ <p class="topless"><a href="authors.html"
+ title="next chapter">Full contributor list</a></p>
+ <div role="note" aria-label="source link">
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="../_sources/docs/changelog.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+ </div>
+<strong>« <a href="index.html">Back to docs index</a></strong>
+
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="../search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="authors.html" title="Full contributor list"
+ >next</a> |</li>
+ <li class="right" >
+ <a href="integrate.html" title="Using Pygments in various scenarios"
+ >previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" >Pygments documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Command Line Interface — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '../',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+ <link rel="shortcut icon" href="../_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="../index.html" />
+ <link rel="up" title="Pygments documentation" href="index.html" />
+ <link rel="next" title="Available lexers" href="lexers.html" />
+ <link rel="prev" title="Introduction and Quickstart" href="quickstart.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="lexers.html" title="Available lexers"
+ accesskey="N">next</a> |</li>
+ <li class="right" >
+ <a href="quickstart.html" title="Introduction and Quickstart"
+ accesskey="P">previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" accesskey="U">Pygments documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <div class="section" id="command-line-interface">
+<h1>Command Line Interface<a class="headerlink" href="#command-line-interface" title="Permalink to this headline">¶</a></h1>
+<p>You can use Pygments from the shell, provided you installed the
+<strong class="program">pygmentize</strong> script:</p>
+<div class="highlight-python"><div class="highlight"><pre>$ pygmentize test.py
+print "Hello World"
+</pre></div>
+</div>
+<p>will print the file test.py to standard output, using the Python lexer
+(inferred from the file name extension) and the terminal formatter (because
+you didn’t give an explicit formatter name).</p>
+<p>If you want HTML output:</p>
+<div class="highlight-python"><div class="highlight"><pre>$ pygmentize -f html -l python -o test.html test.py
+</pre></div>
+</div>
+<p>As you can see, the -l option explicitly selects a lexer. As seen above, if you
+give an input file name and it has an extension that Pygments recognizes, you can
+omit this option.</p>
+<p>The <code class="docutils literal"><span class="pre">-o</span></code> option gives an output file name. If it is not given, output is
+written to stdout.</p>
+<p>The <code class="docutils literal"><span class="pre">-f</span></code> option selects a formatter (as with <code class="docutils literal"><span class="pre">-l</span></code>, it can also be omitted
+if an output file name is given and has a supported extension).
+If no output file name is given and <code class="docutils literal"><span class="pre">-f</span></code> is omitted, the
+<a class="reference internal" href="formatters.html#TerminalFormatter" title="TerminalFormatter"><code class="xref py py-class docutils literal"><span class="pre">TerminalFormatter</span></code></a> is used.</p>
+<p>The above command could therefore also be given as:</p>
+<div class="highlight-python"><div class="highlight"><pre>$ pygmentize -o test.html test.py
+</pre></div>
+</div>
+<p>To create a full HTML document, including line numbers and stylesheet (using the
+“emacs” style), highlighting the Python file <code class="docutils literal"><span class="pre">test.py</span></code> to <code class="docutils literal"><span class="pre">test.html</span></code>:</p>
+<div class="highlight-python"><div class="highlight"><pre>$ pygmentize -O full,style=emacs -o test.html test.py
+</pre></div>
+</div>
+<div class="section" id="options-and-filters">
+<h2>Options and filters<a class="headerlink" href="#options-and-filters" title="Permalink to this headline">¶</a></h2>
+<p>Lexer and formatter options can be given using the <code class="docutils literal"><span class="pre">-O</span></code> option:</p>
+<div class="highlight-python"><div class="highlight"><pre>$ pygmentize -f html -O style=colorful,linenos=1 -l python test.py
+</pre></div>
+</div>
+<p>Be sure to enclose the option string in quotes if it contains any special shell
+characters, such as spaces or expansion wildcards like <code class="docutils literal"><span class="pre">*</span></code>. If an option
+expects a list value, separate the list entries with spaces (you’ll have to
+quote the option value in this case too, so that the shell doesn’t split it).</p>
+<p>Since the <code class="docutils literal"><span class="pre">-O</span></code> option argument is split at commas and expects the split values
+to be of the form <code class="docutils literal"><span class="pre">name=value</span></code>, you can’t give an option value that contains
+commas or equals signs. Therefore, an option <code class="docutils literal"><span class="pre">-P</span></code> is provided (as of Pygments
+0.9) that works like <code class="docutils literal"><span class="pre">-O</span></code> but can only pass one option per <code class="docutils literal"><span class="pre">-P</span></code>. Its value
+can then contain all characters:</p>
+<div class="highlight-python"><div class="highlight"><pre>$ pygmentize -P "heading=Pygments, the Python highlighter" ...
+</pre></div>
+</div>
+<p>Filters are added to the token stream using the <code class="docutils literal"><span class="pre">-F</span></code> option:</p>
+<div class="highlight-python"><div class="highlight"><pre>$ pygmentize -f html -l pascal -F keywordcase:case=upper main.pas
+</pre></div>
+</div>
+<p>As you see, options for the filter are given after a colon. As for <code class="docutils literal"><span class="pre">-O</span></code>, the
+filter name and options must be one shell word, so there may not be any spaces
+around the colon.</p>
+</div>
+<div class="section" id="generating-styles">
+<h2>Generating styles<a class="headerlink" href="#generating-styles" title="Permalink to this headline">¶</a></h2>
+<p>Formatters normally don’t output full style information. For example, the HTML
+formatter by default only outputs <code class="docutils literal"><span class="pre"><span></span></code> tags with <code class="docutils literal"><span class="pre">class</span></code> attributes.
+Therefore, there’s a special <code class="docutils literal"><span class="pre">-S</span></code> option for generating style definitions.
+Usage is as follows:</p>
+<div class="highlight-python"><div class="highlight"><pre>$ pygmentize -f html -S colorful -a .syntax
+</pre></div>
+</div>
+<p>generates a CSS style sheet (because you selected the HTML formatter) for
+the “colorful” style prepending a ”.syntax” selector to all style rules.</p>
+<p>For an explanation what <code class="docutils literal"><span class="pre">-a</span></code> means for <a class="reference internal" href="formatters.html"><em>a particular formatter</em></a>, look for the <cite>arg</cite> argument for the formatter’s
+<a class="reference internal" href="api.html#pygments.formatter.Formatter.get_style_defs" title="pygments.formatter.Formatter.get_style_defs"><code class="xref py py-meth docutils literal"><span class="pre">get_style_defs()</span></code></a> method.</p>
+</div>
+<div class="section" id="getting-lexer-names">
+<h2>Getting lexer names<a class="headerlink" href="#getting-lexer-names" title="Permalink to this headline">¶</a></h2>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.0.</span></p>
+</div>
+<p>The <code class="docutils literal"><span class="pre">-N</span></code> option guesses a lexer name for a given filename, so that</p>
+<div class="highlight-python"><div class="highlight"><pre>$ pygmentize -N setup.py
+</pre></div>
+</div>
+<p>will print out <code class="docutils literal"><span class="pre">python</span></code>. It won’t highlight anything yet. If no specific
+lexer is known for that filename, <code class="docutils literal"><span class="pre">text</span></code> is printed.</p>
+</div>
+<div class="section" id="getting-help">
+<h2>Getting help<a class="headerlink" href="#getting-help" title="Permalink to this headline">¶</a></h2>
+<p>The <code class="docutils literal"><span class="pre">-L</span></code> option lists lexers, formatters, along with their short
+names and supported file name extensions, styles and filters. If you want to see
+only one category, give it as an argument:</p>
+<div class="highlight-python"><div class="highlight"><pre>$ pygmentize -L filters
+</pre></div>
+</div>
+<p>will list only all installed filters.</p>
+<p>The <code class="docutils literal"><span class="pre">-H</span></code> option will give you detailed information (the same that can be found
+in this documentation) about a lexer, formatter or filter. Usage is as follows:</p>
+<div class="highlight-python"><div class="highlight"><pre>$ pygmentize -H formatter html
+</pre></div>
+</div>
+<p>will print the help for the HTML formatter, while</p>
+<div class="highlight-python"><div class="highlight"><pre>$ pygmentize -H lexer python
+</pre></div>
+</div>
+<p>will print the help for the Python lexer, etc.</p>
+</div>
+<div class="section" id="a-note-on-encodings">
+<h2>A note on encodings<a class="headerlink" href="#a-note-on-encodings" title="Permalink to this headline">¶</a></h2>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.9.</span></p>
+</div>
+<p>Pygments tries to be smart regarding encodings in the formatting process:</p>
+<ul class="simple">
+<li>If you give an <code class="docutils literal"><span class="pre">encoding</span></code> option, it will be used as the input and
+output encoding.</li>
+<li>If you give an <code class="docutils literal"><span class="pre">outencoding</span></code> option, it will override <code class="docutils literal"><span class="pre">encoding</span></code>
+as the output encoding.</li>
+<li>If you give an <code class="docutils literal"><span class="pre">inencoding</span></code> option, it will override <code class="docutils literal"><span class="pre">encoding</span></code>
+as the input encoding.</li>
+<li>If you don’t give an encoding and have given an output file, the default
+encoding for lexer and formatter is the terminal encoding or the default
+locale encoding of the system. As a last resort, <code class="docutils literal"><span class="pre">latin1</span></code> is used (which
+will pass through all non-ASCII characters).</li>
+<li>If you don’t give an encoding and haven’t given an output file (that means
+output is written to the console), the default encoding for lexer and
+formatter is the terminal encoding (<code class="docutils literal"><span class="pre">sys.stdout.encoding</span></code>).</li>
+</ul>
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ <h3><a href="../index.html">Table Of Contents</a></h3>
+ <ul>
+<li><a class="reference internal" href="#">Command Line Interface</a><ul>
+<li><a class="reference internal" href="#options-and-filters">Options and filters</a></li>
+<li><a class="reference internal" href="#generating-styles">Generating styles</a></li>
+<li><a class="reference internal" href="#getting-lexer-names">Getting lexer names</a></li>
+<li><a class="reference internal" href="#getting-help">Getting help</a></li>
+<li><a class="reference internal" href="#a-note-on-encodings">A note on encodings</a></li>
+</ul>
+</li>
+</ul>
+
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="quickstart.html"
+ title="previous chapter">Introduction and Quickstart</a></p>
+ <h4>Next topic</h4>
+ <p class="topless"><a href="lexers.html"
+ title="next chapter">Available lexers</a></p>
+ <div role="note" aria-label="source link">
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="../_sources/docs/cmdline.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+ </div>
+<strong>« <a href="index.html">Back to docs index</a></strong>
+
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="../search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="lexers.html" title="Available lexers"
+ >next</a> |</li>
+ <li class="right" >
+ <a href="quickstart.html" title="Introduction and Quickstart"
+ >previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" >Pygments documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Write your own filter — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '../',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+ <link rel="shortcut icon" href="../_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="../index.html" />
+ <link rel="up" title="Pygments documentation" href="index.html" />
+ <link rel="next" title="Register Plugins" href="plugins.html" />
+ <link rel="prev" title="Write your own formatter" href="formatterdevelopment.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="plugins.html" title="Register Plugins"
+ accesskey="N">next</a> |</li>
+ <li class="right" >
+ <a href="formatterdevelopment.html" title="Write your own formatter"
+ accesskey="P">previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" accesskey="U">Pygments documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <div class="section" id="write-your-own-filter">
+<h1>Write your own filter<a class="headerlink" href="#write-your-own-filter" title="Permalink to this headline">¶</a></h1>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.7.</span></p>
+</div>
+<p>Writing own filters is very easy. All you have to do is to subclass
+the <cite>Filter</cite> class and override the <cite>filter</cite> method. Additionally a
+filter is instanciated with some keyword arguments you can use to
+adjust the behavior of your filter.</p>
+<div class="section" id="subclassing-filters">
+<h2>Subclassing Filters<a class="headerlink" href="#subclassing-filters" title="Permalink to this headline">¶</a></h2>
+<p>As an example, we write a filter that converts all <cite>Name.Function</cite> tokens
+to normal <cite>Name</cite> tokens to make the output less colorful.</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">pygments.util</span> <span class="kn">import</span> <span class="n">get_bool_opt</span>
+<span class="kn">from</span> <span class="nn">pygments.token</span> <span class="kn">import</span> <span class="n">Name</span>
+<span class="kn">from</span> <span class="nn">pygments.filter</span> <span class="kn">import</span> <span class="n">Filter</span>
+
+<span class="k">class</span> <span class="nc">UncolorFilter</span><span class="p">(</span><span class="n">Filter</span><span class="p">):</span>
+
+ <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">options</span><span class="p">):</span>
+ <span class="n">Filter</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">options</span><span class="p">)</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">class_too</span> <span class="o">=</span> <span class="n">get_bool_opt</span><span class="p">(</span><span class="n">options</span><span class="p">,</span> <span class="s">'classtoo'</span><span class="p">)</span>
+
+ <span class="k">def</span> <span class="nf">filter</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">lexer</span><span class="p">,</span> <span class="n">stream</span><span class="p">):</span>
+ <span class="k">for</span> <span class="n">ttype</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">stream</span><span class="p">:</span>
+ <span class="k">if</span> <span class="n">ttype</span> <span class="ow">is</span> <span class="n">Name</span><span class="o">.</span><span class="n">Function</span> <span class="ow">or</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">class_too</span> <span class="ow">and</span>
+ <span class="n">ttype</span> <span class="ow">is</span> <span class="n">Name</span><span class="o">.</span><span class="n">Class</span><span class="p">):</span>
+ <span class="n">ttype</span> <span class="o">=</span> <span class="n">Name</span>
+ <span class="k">yield</span> <span class="n">ttype</span><span class="p">,</span> <span class="n">value</span>
+</pre></div>
+</div>
+<p>Some notes on the <cite>lexer</cite> argument: that can be quite confusing since it doesn’t
+need to be a lexer instance. If a filter was added by using the <cite>add_filter()</cite>
+function of lexers, that lexer is registered for the filter. In that case
+<cite>lexer</cite> will refer to the lexer that has registered the filter. It <em>can</em> be used
+to access options passed to a lexer. Because it could be <cite>None</cite> you always have
+to check for that case if you access it.</p>
+</div>
+<div class="section" id="using-a-decorator">
+<h2>Using a decorator<a class="headerlink" href="#using-a-decorator" title="Permalink to this headline">¶</a></h2>
+<p>You can also use the <cite>simplefilter</cite> decorator from the <cite>pygments.filter</cite> module:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">pygments.util</span> <span class="kn">import</span> <span class="n">get_bool_opt</span>
+<span class="kn">from</span> <span class="nn">pygments.token</span> <span class="kn">import</span> <span class="n">Name</span>
+<span class="kn">from</span> <span class="nn">pygments.filter</span> <span class="kn">import</span> <span class="n">simplefilter</span>
+
+
+<span class="nd">@simplefilter</span>
+<span class="k">def</span> <span class="nf">uncolor</span><span class="p">(</span><span class="n">lexer</span><span class="p">,</span> <span class="n">stream</span><span class="p">,</span> <span class="n">options</span><span class="p">):</span>
+ <span class="n">class_too</span> <span class="o">=</span> <span class="n">get_bool_opt</span><span class="p">(</span><span class="n">options</span><span class="p">,</span> <span class="s">'classtoo'</span><span class="p">)</span>
+ <span class="k">for</span> <span class="n">ttype</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">stream</span><span class="p">:</span>
+ <span class="k">if</span> <span class="n">ttype</span> <span class="ow">is</span> <span class="n">Name</span><span class="o">.</span><span class="n">Function</span> <span class="ow">or</span> <span class="p">(</span><span class="n">class_too</span> <span class="ow">and</span>
+ <span class="n">ttype</span> <span class="ow">is</span> <span class="n">Name</span><span class="o">.</span><span class="n">Class</span><span class="p">):</span>
+ <span class="n">ttype</span> <span class="o">=</span> <span class="n">Name</span>
+ <span class="k">yield</span> <span class="n">ttype</span><span class="p">,</span> <span class="n">value</span>
+</pre></div>
+</div>
+<p>The decorator automatically subclasses an internal filter class and uses the
+decorated function for filtering.</p>
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ <h3><a href="../index.html">Table Of Contents</a></h3>
+ <ul>
+<li><a class="reference internal" href="#">Write your own filter</a><ul>
+<li><a class="reference internal" href="#subclassing-filters">Subclassing Filters</a></li>
+<li><a class="reference internal" href="#using-a-decorator">Using a decorator</a></li>
+</ul>
+</li>
+</ul>
+
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="formatterdevelopment.html"
+ title="previous chapter">Write your own formatter</a></p>
+ <h4>Next topic</h4>
+ <p class="topless"><a href="plugins.html"
+ title="next chapter">Register Plugins</a></p>
+ <div role="note" aria-label="source link">
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="../_sources/docs/filterdevelopment.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+ </div>
+<strong>« <a href="index.html">Back to docs index</a></strong>
+
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="../search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="plugins.html" title="Register Plugins"
+ >next</a> |</li>
+ <li class="right" >
+ <a href="formatterdevelopment.html" title="Write your own formatter"
+ >previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" >Pygments documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Filters — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '../',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+ <link rel="shortcut icon" href="../_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="../index.html" />
+ <link rel="up" title="Pygments documentation" href="index.html" />
+ <link rel="next" title="Available formatters" href="formatters.html" />
+ <link rel="prev" title="Available lexers" href="lexers.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="formatters.html" title="Available formatters"
+ accesskey="N">next</a> |</li>
+ <li class="right" >
+ <a href="lexers.html" title="Available lexers"
+ accesskey="P">previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" accesskey="U">Pygments documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <div class="section" id="filters">
+<h1>Filters<a class="headerlink" href="#filters" title="Permalink to this headline">¶</a></h1>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.7.</span></p>
+</div>
+<p>You can filter token streams coming from lexers to improve or annotate the
+output. For example, you can highlight special words in comments, convert
+keywords to upper or lowercase to enforce a style guide etc.</p>
+<p>To apply a filter, you can use the <cite>add_filter()</cite> method of a lexer:</p>
+<div class="highlight-pycon"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">pygments.lexers</span> <span class="kn">import</span> <span class="n">PythonLexer</span>
+<span class="gp">>>> </span><span class="n">l</span> <span class="o">=</span> <span class="n">PythonLexer</span><span class="p">()</span>
+<span class="gp">>>> </span><span class="c"># add a filter given by a string and options</span>
+<span class="gp">>>> </span><span class="n">l</span><span class="o">.</span><span class="n">add_filter</span><span class="p">(</span><span class="s">'codetagify'</span><span class="p">,</span> <span class="n">case</span><span class="o">=</span><span class="s">'lower'</span><span class="p">)</span>
+<span class="gp">>>> </span><span class="n">l</span><span class="o">.</span><span class="n">filters</span>
+<span class="go">[<pygments.filters.CodeTagFilter object at 0xb785decc>]</span>
+<span class="gp">>>> </span><span class="kn">from</span> <span class="nn">pygments.filters</span> <span class="kn">import</span> <span class="n">KeywordCaseFilter</span>
+<span class="gp">>>> </span><span class="c"># or give an instance</span>
+<span class="gp">>>> </span><span class="n">l</span><span class="o">.</span><span class="n">add_filter</span><span class="p">(</span><span class="n">KeywordCaseFilter</span><span class="p">(</span><span class="n">case</span><span class="o">=</span><span class="s">'lower'</span><span class="p">))</span>
+</pre></div>
+</div>
+<p>The <cite>add_filter()</cite> method takes keyword arguments which are forwarded to
+the constructor of the filter.</p>
+<p>To get a list of all registered filters by name, you can use the
+<cite>get_all_filters()</cite> function from the <cite>pygments.filters</cite> module that returns an
+iterable for all known filters.</p>
+<p>If you want to write your own filter, have a look at <a class="reference internal" href="filterdevelopment.html"><em>Write your own filter</em></a>.</p>
+<div class="section" id="builtin-filters">
+<h2>Builtin Filters<a class="headerlink" href="#builtin-filters" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="RaiseOnErrorTokenFilter">
+<em class="property">class </em><code class="descname">RaiseOnErrorTokenFilter</code><a class="headerlink" href="#RaiseOnErrorTokenFilter" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Name:</th><td class="field-body">raiseonerror</td>
+</tr>
+</tbody>
+</table>
+<p>Raise an exception when the lexer generates an error token.</p>
+<p>Options accepted:</p>
+<dl class="docutils">
+<dt><cite>excclass</cite> <span class="classifier-delimiter">:</span> <span class="classifier">Exception class</span></dt>
+<dd>The exception class to raise.
+The default is <cite>pygments.filters.ErrorToken</cite>.</dd>
+</dl>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.8.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="VisibleWhitespaceFilter">
+<em class="property">class </em><code class="descname">VisibleWhitespaceFilter</code><a class="headerlink" href="#VisibleWhitespaceFilter" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Name:</th><td class="field-body">whitespace</td>
+</tr>
+</tbody>
+</table>
+<p>Convert tabs, newlines and/or spaces to visible characters.</p>
+<p>Options accepted:</p>
+<dl class="docutils">
+<dt><cite>spaces</cite> <span class="classifier-delimiter">:</span> <span class="classifier">string or bool</span></dt>
+<dd>If this is a one-character string, spaces will be replaces by this string.
+If it is another true value, spaces will be replaced by <code class="docutils literal"><span class="pre">·</span></code> (unicode
+MIDDLE DOT). If it is a false value, spaces will not be replaced. The
+default is <code class="docutils literal"><span class="pre">False</span></code>.</dd>
+<dt><cite>tabs</cite> <span class="classifier-delimiter">:</span> <span class="classifier">string or bool</span></dt>
+<dd>The same as for <cite>spaces</cite>, but the default replacement character is <code class="docutils literal"><span class="pre">»</span></code>
+(unicode RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK). The default value
+is <code class="docutils literal"><span class="pre">False</span></code>. Note: this will not work if the <cite>tabsize</cite> option for the
+lexer is nonzero, as tabs will already have been expanded then.</dd>
+<dt><cite>tabsize</cite> <span class="classifier-delimiter">:</span> <span class="classifier">int</span></dt>
+<dd>If tabs are to be replaced by this filter (see the <cite>tabs</cite> option), this
+is the total number of characters that a tab should be expanded to.
+The default is <code class="docutils literal"><span class="pre">8</span></code>.</dd>
+<dt><cite>newlines</cite> <span class="classifier-delimiter">:</span> <span class="classifier">string or bool</span></dt>
+<dd>The same as for <cite>spaces</cite>, but the default replacement character is <code class="docutils literal"><span class="pre">¶</span></code>
+(unicode PILCROW SIGN). The default value is <code class="docutils literal"><span class="pre">False</span></code>.</dd>
+<dt><cite>wstokentype</cite> <span class="classifier-delimiter">:</span> <span class="classifier">bool</span></dt>
+<dd>If true, give whitespace the special <cite>Whitespace</cite> token type. This allows
+styling the visible whitespace differently (e.g. greyed out), but it can
+disrupt background colors. The default is <code class="docutils literal"><span class="pre">True</span></code>.</dd>
+</dl>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.8.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="TokenMergeFilter">
+<em class="property">class </em><code class="descname">TokenMergeFilter</code><a class="headerlink" href="#TokenMergeFilter" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Name:</th><td class="field-body">tokenmerge</td>
+</tr>
+</tbody>
+</table>
+<p>Merges consecutive tokens with the same token type in the output stream of a
+lexer.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.2.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="NameHighlightFilter">
+<em class="property">class </em><code class="descname">NameHighlightFilter</code><a class="headerlink" href="#NameHighlightFilter" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Name:</th><td class="field-body">highlight</td>
+</tr>
+</tbody>
+</table>
+<p>Highlight a normal Name (and Name.*) token with a different token type.</p>
+<p>Example:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="nb">filter</span> <span class="o">=</span> <span class="n">NameHighlightFilter</span><span class="p">(</span>
+ <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s">'foo'</span><span class="p">,</span> <span class="s">'bar'</span><span class="p">,</span> <span class="s">'baz'</span><span class="p">],</span>
+ <span class="n">tokentype</span><span class="o">=</span><span class="n">Name</span><span class="o">.</span><span class="n">Function</span><span class="p">,</span>
+<span class="p">)</span>
+</pre></div>
+</div>
+<p>This would highlight the names “foo”, “bar” and “baz”
+as functions. <cite>Name.Function</cite> is the default token type.</p>
+<p>Options accepted:</p>
+<dl class="docutils">
+<dt><cite>names</cite> <span class="classifier-delimiter">:</span> <span class="classifier">list of strings</span></dt>
+<dd>A list of names that should be given the different token type.
+There is no default.</dd>
+<dt><cite>tokentype</cite> <span class="classifier-delimiter">:</span> <span class="classifier">TokenType or string</span></dt>
+<dd>A token type or a string containing a token type name that is
+used for highlighting the strings in <cite>names</cite>. The default is
+<cite>Name.Function</cite>.</dd>
+</dl>
+</dd></dl>
+
+<dl class="class">
+<dt id="GobbleFilter">
+<em class="property">class </em><code class="descname">GobbleFilter</code><a class="headerlink" href="#GobbleFilter" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Name:</th><td class="field-body">gobble</td>
+</tr>
+</tbody>
+</table>
+<p>Gobbles source code lines (eats initial characters).</p>
+<p>This filter drops the first <code class="docutils literal"><span class="pre">n</span></code> characters off every line of code. This
+may be useful when the source code fed to the lexer is indented by a fixed
+amount of space that isn’t desired in the output.</p>
+<p>Options accepted:</p>
+<dl class="docutils">
+<dt><cite>n</cite> <span class="classifier-delimiter">:</span> <span class="classifier">int</span></dt>
+<dd>The number of characters to gobble.</dd>
+</dl>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.2.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="CodeTagFilter">
+<em class="property">class </em><code class="descname">CodeTagFilter</code><a class="headerlink" href="#CodeTagFilter" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Name:</th><td class="field-body">codetagify</td>
+</tr>
+</tbody>
+</table>
+<p>Highlight special code tags in comments and docstrings.</p>
+<p>Options accepted:</p>
+<dl class="docutils">
+<dt><cite>codetags</cite> <span class="classifier-delimiter">:</span> <span class="classifier">list of strings</span></dt>
+<dd>A list of strings that are flagged as code tags. The default is to
+highlight <code class="docutils literal"><span class="pre">XXX</span></code>, <code class="docutils literal"><span class="pre">TODO</span></code>, <code class="docutils literal"><span class="pre">BUG</span></code> and <code class="docutils literal"><span class="pre">NOTE</span></code>.</dd>
+</dl>
+</dd></dl>
+
+<dl class="class">
+<dt id="KeywordCaseFilter">
+<em class="property">class </em><code class="descname">KeywordCaseFilter</code><a class="headerlink" href="#KeywordCaseFilter" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Name:</th><td class="field-body">keywordcase</td>
+</tr>
+</tbody>
+</table>
+<p>Convert keywords to lowercase or uppercase or capitalize them, which
+means first letter uppercase, rest lowercase.</p>
+<p>This can be useful e.g. if you highlight Pascal code and want to adapt the
+code to your styleguide.</p>
+<p>Options accepted:</p>
+<dl class="docutils">
+<dt><cite>case</cite> <span class="classifier-delimiter">:</span> <span class="classifier">string</span></dt>
+<dd>The casing to convert keywords to. Must be one of <code class="docutils literal"><span class="pre">'lower'</span></code>,
+<code class="docutils literal"><span class="pre">'upper'</span></code> or <code class="docutils literal"><span class="pre">'capitalize'</span></code>. The default is <code class="docutils literal"><span class="pre">'lower'</span></code>.</dd>
+</dl>
+</dd></dl>
+
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ <h3><a href="../index.html">Table Of Contents</a></h3>
+ <ul>
+<li><a class="reference internal" href="#">Filters</a><ul>
+<li><a class="reference internal" href="#builtin-filters">Builtin Filters</a></li>
+</ul>
+</li>
+</ul>
+
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="lexers.html"
+ title="previous chapter">Available lexers</a></p>
+ <h4>Next topic</h4>
+ <p class="topless"><a href="formatters.html"
+ title="next chapter">Available formatters</a></p>
+ <div role="note" aria-label="source link">
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="../_sources/docs/filters.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+ </div>
+<strong>« <a href="index.html">Back to docs index</a></strong>
+
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="../search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="formatters.html" title="Available formatters"
+ >next</a> |</li>
+ <li class="right" >
+ <a href="lexers.html" title="Available lexers"
+ >previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" >Pygments documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Write your own formatter — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '../',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+ <link rel="shortcut icon" href="../_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="../index.html" />
+ <link rel="up" title="Pygments documentation" href="index.html" />
+ <link rel="next" title="Write your own filter" href="filterdevelopment.html" />
+ <link rel="prev" title="Write your own lexer" href="lexerdevelopment.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="filterdevelopment.html" title="Write your own filter"
+ accesskey="N">next</a> |</li>
+ <li class="right" >
+ <a href="lexerdevelopment.html" title="Write your own lexer"
+ accesskey="P">previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" accesskey="U">Pygments documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <div class="section" id="write-your-own-formatter">
+<h1>Write your own formatter<a class="headerlink" href="#write-your-own-formatter" title="Permalink to this headline">¶</a></h1>
+<p>As well as creating <a class="reference internal" href="lexerdevelopment.html"><em>your own lexer</em></a>, writing a new
+formatter for Pygments is easy and straightforward.</p>
+<p>A formatter is a class that is initialized with some keyword arguments (the
+formatter options) and that must provides a <cite>format()</cite> method.
+Additionally a formatter should provide a <cite>get_style_defs()</cite> method that
+returns the style definitions from the style in a form usable for the
+formatter’s output format.</p>
+<div class="section" id="quickstart">
+<h2>Quickstart<a class="headerlink" href="#quickstart" title="Permalink to this headline">¶</a></h2>
+<p>The most basic formatter shipped with Pygments is the <cite>NullFormatter</cite>. It just
+sends the value of a token to the output stream:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">pygments.formatter</span> <span class="kn">import</span> <span class="n">Formatter</span>
+
+<span class="k">class</span> <span class="nc">NullFormatter</span><span class="p">(</span><span class="n">Formatter</span><span class="p">):</span>
+ <span class="k">def</span> <span class="nf">format</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">tokensource</span><span class="p">,</span> <span class="n">outfile</span><span class="p">):</span>
+ <span class="k">for</span> <span class="n">ttype</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">tokensource</span><span class="p">:</span>
+ <span class="n">outfile</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">value</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>As you can see, the <cite>format()</cite> method is passed two parameters: <cite>tokensource</cite>
+and <cite>outfile</cite>. The first is an iterable of <code class="docutils literal"><span class="pre">(token_type,</span> <span class="pre">value)</span></code> tuples,
+the latter a file like object with a <cite>write()</cite> method.</p>
+<p>Because the formatter is that basic it doesn’t overwrite the <cite>get_style_defs()</cite>
+method.</p>
+</div>
+<div class="section" id="styles">
+<h2>Styles<a class="headerlink" href="#styles" title="Permalink to this headline">¶</a></h2>
+<p>Styles aren’t instantiated but their metaclass provides some class functions
+so that you can access the style definitions easily.</p>
+<p>Styles are iterable and yield tuples in the form <code class="docutils literal"><span class="pre">(ttype,</span> <span class="pre">d)</span></code> where <cite>ttype</cite>
+is a token and <cite>d</cite> is a dict with the following keys:</p>
+<dl class="docutils">
+<dt><code class="docutils literal"><span class="pre">'color'</span></code></dt>
+<dd>Hexadecimal color value (eg: <code class="docutils literal"><span class="pre">'ff0000'</span></code> for red) or <cite>None</cite> if not
+defined.</dd>
+<dt><code class="docutils literal"><span class="pre">'bold'</span></code></dt>
+<dd><cite>True</cite> if the value should be bold</dd>
+<dt><code class="docutils literal"><span class="pre">'italic'</span></code></dt>
+<dd><cite>True</cite> if the value should be italic</dd>
+<dt><code class="docutils literal"><span class="pre">'underline'</span></code></dt>
+<dd><cite>True</cite> if the value should be underlined</dd>
+<dt><code class="docutils literal"><span class="pre">'bgcolor'</span></code></dt>
+<dd>Hexadecimal color value for the background (eg: <code class="docutils literal"><span class="pre">'eeeeeee'</span></code> for light
+gray) or <cite>None</cite> if not defined.</dd>
+<dt><code class="docutils literal"><span class="pre">'border'</span></code></dt>
+<dd>Hexadecimal color value for the border (eg: <code class="docutils literal"><span class="pre">'0000aa'</span></code> for a dark
+blue) or <cite>None</cite> for no border.</dd>
+</dl>
+<p>Additional keys might appear in the future, formatters should ignore all keys
+they don’t support.</p>
+</div>
+<div class="section" id="html-3-2-formatter">
+<h2>HTML 3.2 Formatter<a class="headerlink" href="#html-3-2-formatter" title="Permalink to this headline">¶</a></h2>
+<p>For an more complex example, let’s implement a HTML 3.2 Formatter. We don’t
+use CSS but inline markup (<code class="docutils literal"><span class="pre"><u></span></code>, <code class="docutils literal"><span class="pre"><font></span></code>, etc). Because this isn’t good
+style this formatter isn’t in the standard library ;-)</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">pygments.formatter</span> <span class="kn">import</span> <span class="n">Formatter</span>
+
+<span class="k">class</span> <span class="nc">OldHtmlFormatter</span><span class="p">(</span><span class="n">Formatter</span><span class="p">):</span>
+
+ <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">options</span><span class="p">):</span>
+ <span class="n">Formatter</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">options</span><span class="p">)</span>
+
+ <span class="c"># create a dict of (start, end) tuples that wrap the</span>
+ <span class="c"># value of a token so that we can use it in the format</span>
+ <span class="c"># method later</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">styles</span> <span class="o">=</span> <span class="p">{}</span>
+
+ <span class="c"># we iterate over the `_styles` attribute of a style item</span>
+ <span class="c"># that contains the parsed style values.</span>
+ <span class="k">for</span> <span class="n">token</span><span class="p">,</span> <span class="n">style</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">style</span><span class="p">:</span>
+ <span class="n">start</span> <span class="o">=</span> <span class="n">end</span> <span class="o">=</span> <span class="s">''</span>
+ <span class="c"># a style item is a tuple in the following form:</span>
+ <span class="c"># colors are readily specified in hex: 'RRGGBB'</span>
+ <span class="k">if</span> <span class="n">style</span><span class="p">[</span><span class="s">'color'</span><span class="p">]:</span>
+ <span class="n">start</span> <span class="o">+=</span> <span class="s">'<font color="#</span><span class="si">%s</span><span class="s">">'</span> <span class="o">%</span> <span class="n">style</span><span class="p">[</span><span class="s">'color'</span><span class="p">]</span>
+ <span class="n">end</span> <span class="o">=</span> <span class="s">'</font>'</span> <span class="o">+</span> <span class="n">end</span>
+ <span class="k">if</span> <span class="n">style</span><span class="p">[</span><span class="s">'bold'</span><span class="p">]:</span>
+ <span class="n">start</span> <span class="o">+=</span> <span class="s">'<b>'</span>
+ <span class="n">end</span> <span class="o">=</span> <span class="s">'</b>'</span> <span class="o">+</span> <span class="n">end</span>
+ <span class="k">if</span> <span class="n">style</span><span class="p">[</span><span class="s">'italic'</span><span class="p">]:</span>
+ <span class="n">start</span> <span class="o">+=</span> <span class="s">'<i>'</span>
+ <span class="n">end</span> <span class="o">=</span> <span class="s">'</i>'</span> <span class="o">+</span> <span class="n">end</span>
+ <span class="k">if</span> <span class="n">style</span><span class="p">[</span><span class="s">'underline'</span><span class="p">]:</span>
+ <span class="n">start</span> <span class="o">+=</span> <span class="s">'<u>'</span>
+ <span class="n">end</span> <span class="o">=</span> <span class="s">'</u>'</span> <span class="o">+</span> <span class="n">end</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">styles</span><span class="p">[</span><span class="n">token</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span><span class="n">start</span><span class="p">,</span> <span class="n">end</span><span class="p">)</span>
+
+ <span class="k">def</span> <span class="nf">format</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">tokensource</span><span class="p">,</span> <span class="n">outfile</span><span class="p">):</span>
+ <span class="c"># lastval is a string we use for caching</span>
+ <span class="c"># because it's possible that an lexer yields a number</span>
+ <span class="c"># of consecutive tokens with the same token type.</span>
+ <span class="c"># to minimize the size of the generated html markup we</span>
+ <span class="c"># try to join the values of same-type tokens here</span>
+ <span class="n">lastval</span> <span class="o">=</span> <span class="s">''</span>
+ <span class="n">lasttype</span> <span class="o">=</span> <span class="bp">None</span>
+
+ <span class="c"># wrap the whole output with <pre></span>
+ <span class="n">outfile</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">'<pre>'</span><span class="p">)</span>
+
+ <span class="k">for</span> <span class="n">ttype</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">tokensource</span><span class="p">:</span>
+ <span class="c"># if the token type doesn't exist in the stylemap</span>
+ <span class="c"># we try it with the parent of the token type</span>
+ <span class="c"># eg: parent of Token.Literal.String.Double is</span>
+ <span class="c"># Token.Literal.String</span>
+ <span class="k">while</span> <span class="n">ttype</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">styles</span><span class="p">:</span>
+ <span class="n">ttype</span> <span class="o">=</span> <span class="n">ttype</span><span class="o">.</span><span class="n">parent</span>
+ <span class="k">if</span> <span class="n">ttype</span> <span class="o">==</span> <span class="n">lasttype</span><span class="p">:</span>
+ <span class="c"># the current token type is the same of the last</span>
+ <span class="c"># iteration. cache it</span>
+ <span class="n">lastval</span> <span class="o">+=</span> <span class="n">value</span>
+ <span class="k">else</span><span class="p">:</span>
+ <span class="c"># not the same token as last iteration, but we</span>
+ <span class="c"># have some data in the buffer. wrap it with the</span>
+ <span class="c"># defined style and write it to the output file</span>
+ <span class="k">if</span> <span class="n">lastval</span><span class="p">:</span>
+ <span class="n">stylebegin</span><span class="p">,</span> <span class="n">styleend</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">styles</span><span class="p">[</span><span class="n">lasttype</span><span class="p">]</span>
+ <span class="n">outfile</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">stylebegin</span> <span class="o">+</span> <span class="n">lastval</span> <span class="o">+</span> <span class="n">styleend</span><span class="p">)</span>
+ <span class="c"># set lastval/lasttype to current values</span>
+ <span class="n">lastval</span> <span class="o">=</span> <span class="n">value</span>
+ <span class="n">lasttype</span> <span class="o">=</span> <span class="n">ttype</span>
+
+ <span class="c"># if something is left in the buffer, write it to the</span>
+ <span class="c"># output file, then close the opened <pre> tag</span>
+ <span class="k">if</span> <span class="n">lastval</span><span class="p">:</span>
+ <span class="n">stylebegin</span><span class="p">,</span> <span class="n">styleend</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">styles</span><span class="p">[</span><span class="n">lasttype</span><span class="p">]</span>
+ <span class="n">outfile</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">stylebegin</span> <span class="o">+</span> <span class="n">lastval</span> <span class="o">+</span> <span class="n">styleend</span><span class="p">)</span>
+ <span class="n">outfile</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">'</pre></span><span class="se">\n</span><span class="s">'</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>The comments should explain it. Again, this formatter doesn’t override the
+<cite>get_style_defs()</cite> method. If we would have used CSS classes instead of
+inline HTML markup, we would need to generate the CSS first. For that
+purpose the <cite>get_style_defs()</cite> method exists:</p>
+</div>
+<div class="section" id="generating-style-definitions">
+<h2>Generating Style Definitions<a class="headerlink" href="#generating-style-definitions" title="Permalink to this headline">¶</a></h2>
+<p>Some formatters like the <cite>LatexFormatter</cite> and the <cite>HtmlFormatter</cite> don’t
+output inline markup but reference either macros or css classes. Because
+the definitions of those are not part of the output, the <cite>get_style_defs()</cite>
+method exists. It is passed one parameter (if it’s used and how it’s used
+is up to the formatter) and has to return a string or <code class="docutils literal"><span class="pre">None</span></code>.</p>
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ <h3><a href="../index.html">Table Of Contents</a></h3>
+ <ul>
+<li><a class="reference internal" href="#">Write your own formatter</a><ul>
+<li><a class="reference internal" href="#quickstart">Quickstart</a></li>
+<li><a class="reference internal" href="#styles">Styles</a></li>
+<li><a class="reference internal" href="#html-3-2-formatter">HTML 3.2 Formatter</a></li>
+<li><a class="reference internal" href="#generating-style-definitions">Generating Style Definitions</a></li>
+</ul>
+</li>
+</ul>
+
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="lexerdevelopment.html"
+ title="previous chapter">Write your own lexer</a></p>
+ <h4>Next topic</h4>
+ <p class="topless"><a href="filterdevelopment.html"
+ title="next chapter">Write your own filter</a></p>
+ <div role="note" aria-label="source link">
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="../_sources/docs/formatterdevelopment.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+ </div>
+<strong>« <a href="index.html">Back to docs index</a></strong>
+
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="../search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="filterdevelopment.html" title="Write your own filter"
+ >next</a> |</li>
+ <li class="right" >
+ <a href="lexerdevelopment.html" title="Write your own lexer"
+ >previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" >Pygments documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Available formatters — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '../',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+ <link rel="shortcut icon" href="../_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="../index.html" />
+ <link rel="up" title="Pygments documentation" href="index.html" />
+ <link rel="next" title="Styles" href="styles.html" />
+ <link rel="prev" title="Filters" href="filters.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="styles.html" title="Styles"
+ accesskey="N">next</a> |</li>
+ <li class="right" >
+ <a href="filters.html" title="Filters"
+ accesskey="P">previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" accesskey="U">Pygments documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <div class="section" id="available-formatters">
+<h1>Available formatters<a class="headerlink" href="#available-formatters" title="Permalink to this headline">¶</a></h1>
+<p>This page lists all builtin formatters.</p>
+<div class="section" id="common-options">
+<h2>Common options<a class="headerlink" href="#common-options" title="Permalink to this headline">¶</a></h2>
+<p>All formatters support these options:</p>
+<dl class="docutils">
+<dt><cite>encoding</cite></dt>
+<dd><p class="first">If given, must be an encoding name (such as <code class="docutils literal"><span class="pre">"utf-8"</span></code>). This will
+be used to convert the token strings (which are Unicode strings)
+to byte strings in the output (default: <code class="docutils literal"><span class="pre">None</span></code>).
+It will also be written in an encoding declaration suitable for the
+document format if the <cite>full</cite> option is given (e.g. a <code class="docutils literal"><span class="pre">meta</span>
+<span class="pre">content-type</span></code> directive in HTML or an invocation of the <cite>inputenc</cite>
+package in LaTeX).</p>
+<p>If this is <code class="docutils literal"><span class="pre">""</span></code> or <code class="docutils literal"><span class="pre">None</span></code>, Unicode strings will be written
+to the output file, which most file-like objects do not support.
+For example, <cite>pygments.highlight()</cite> will return a Unicode string if
+called with no <cite>outfile</cite> argument and a formatter that has <cite>encoding</cite>
+set to <code class="docutils literal"><span class="pre">None</span></code> because it uses a <cite>StringIO.StringIO</cite> object that
+supports Unicode arguments to <cite>write()</cite>. Using a regular file object
+wouldn’t work.</p>
+<div class="last versionadded">
+<p><span class="versionmodified">New in version 0.6.</span></p>
+</div>
+</dd>
+<dt><cite>outencoding</cite></dt>
+<dd><p class="first">When using Pygments from the command line, any <cite>encoding</cite> option given is
+passed to the lexer and the formatter. This is sometimes not desirable,
+for example if you want to set the input encoding to <code class="docutils literal"><span class="pre">"guess"</span></code>.
+Therefore, <cite>outencoding</cite> has been introduced which overrides <cite>encoding</cite>
+for the formatter if given.</p>
+<div class="last versionadded">
+<p><span class="versionmodified">New in version 0.7.</span></p>
+</div>
+</dd>
+</dl>
+</div>
+<div class="section" id="formatter-classes">
+<h2>Formatter classes<a class="headerlink" href="#formatter-classes" title="Permalink to this headline">¶</a></h2>
+<p>All these classes are importable from <a class="reference internal" href="api.html#module-pygments.formatters" title="pygments.formatters"><code class="xref py py-mod docutils literal"><span class="pre">pygments.formatters</span></code></a>.</p>
+<dl class="class">
+<dt id="BBCodeFormatter">
+<em class="property">class </em><code class="descname">BBCodeFormatter</code><a class="headerlink" href="#BBCodeFormatter" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">bbcode, bb</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>Format tokens with BBcodes. These formatting codes are used by many
+bulletin boards, so you can highlight your sourcecode with pygments before
+posting it there.</p>
+<p>This formatter has no support for background colors and borders, as there
+are no common BBcode tags for that.</p>
+<p>Some board systems (e.g. phpBB) don’t support colors in their [code] tag,
+so you can’t use the highlighting together with that tag.
+Text in a [code] tag usually is shown with a monospace font (which this
+formatter can do with the <code class="docutils literal"><span class="pre">monofont</span></code> option) and no spaces (which you
+need for indentation) are removed.</p>
+<p>Additional options accepted:</p>
+<dl class="docutils">
+<dt><cite>style</cite></dt>
+<dd>The style to use, can be a string or a Style subclass (default:
+<code class="docutils literal"><span class="pre">'default'</span></code>).</dd>
+<dt><cite>codetag</cite></dt>
+<dd>If set to true, put the output into <code class="docutils literal"><span class="pre">[code]</span></code> tags (default:
+<code class="docutils literal"><span class="pre">false</span></code>)</dd>
+<dt><cite>monofont</cite></dt>
+<dd>If set to true, add a tag to show the code with a monospace font
+(default: <code class="docutils literal"><span class="pre">false</span></code>).</dd>
+</dl>
+</dd></dl>
+
+<dl class="class">
+<dt id="BmpImageFormatter">
+<em class="property">class </em><code class="descname">BmpImageFormatter</code><a class="headerlink" href="#BmpImageFormatter" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">bmp, bitmap</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.bmp</td>
+</tr>
+</tbody>
+</table>
+<p>Create a bitmap image from source code. This uses the Python Imaging Library to
+generate a pixmap from the source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="GifImageFormatter">
+<em class="property">class </em><code class="descname">GifImageFormatter</code><a class="headerlink" href="#GifImageFormatter" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">gif</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.gif</td>
+</tr>
+</tbody>
+</table>
+<p>Create a GIF image from source code. This uses the Python Imaging Library to
+generate a pixmap from the source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="HtmlFormatter">
+<em class="property">class </em><code class="descname">HtmlFormatter</code><a class="headerlink" href="#HtmlFormatter" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">html</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.html, *.htm</td>
+</tr>
+</tbody>
+</table>
+<p>Format tokens as HTML 4 <code class="docutils literal"><span class="pre"><span></span></code> tags within a <code class="docutils literal"><span class="pre"><pre></span></code> tag, wrapped
+in a <code class="docutils literal"><span class="pre"><div></span></code> tag. The <code class="docutils literal"><span class="pre"><div></span></code>‘s CSS class can be set by the <cite>cssclass</cite>
+option.</p>
+<p>If the <cite>linenos</cite> option is set to <code class="docutils literal"><span class="pre">"table"</span></code>, the <code class="docutils literal"><span class="pre"><pre></span></code> is
+additionally wrapped inside a <code class="docutils literal"><span class="pre"><table></span></code> which has one row and two
+cells: one containing the line numbers and one containing the code.
+Example:</p>
+<div class="highlight-html"><div class="highlight"><pre><span class="nt"><div</span> <span class="na">class=</span><span class="s">"highlight"</span> <span class="nt">></span>
+<span class="nt"><table><tr></span>
+ <span class="nt"><td</span> <span class="na">class=</span><span class="s">"linenos"</span> <span class="na">title=</span><span class="s">"click to toggle"</span>
+ <span class="na">onclick=</span><span class="s">"with (this.firstChild.style)</span>
+<span class="s"> { display = (display == '') ? 'none' : '' }"</span><span class="nt">></span>
+ <span class="nt"><pre></span>1
+ 2<span class="nt"></pre></span>
+ <span class="nt"></td></span>
+ <span class="nt"><td</span> <span class="na">class=</span><span class="s">"code"</span><span class="nt">></span>
+ <span class="nt"><pre><span</span> <span class="na">class=</span><span class="s">"Ke"</span><span class="nt">></span>def <span class="nt"></span><span</span> <span class="na">class=</span><span class="s">"NaFu"</span><span class="nt">></span>foo<span class="nt"></span></span>(bar):
+ <span class="nt"><span</span> <span class="na">class=</span><span class="s">"Ke"</span><span class="nt">></span>pass<span class="nt"></span></span>
+ <span class="nt"></pre></span>
+ <span class="nt"></td></span>
+<span class="nt"></tr></table></div></span>
+</pre></div>
+</div>
+<p>(whitespace added to improve clarity).</p>
+<p>Wrapping can be disabled using the <cite>nowrap</cite> option.</p>
+<p>A list of lines can be specified using the <cite>hl_lines</cite> option to make these
+lines highlighted (as of Pygments 0.11).</p>
+<p>With the <cite>full</cite> option, a complete HTML 4 document is output, including
+the style definitions inside a <code class="docutils literal"><span class="pre"><style></span></code> tag, or in a separate file if
+the <cite>cssfile</cite> option is given.</p>
+<p>When <cite>tagsfile</cite> is set to the path of a ctags index file, it is used to
+generate hyperlinks from names to their definition. You must enable
+<cite>anchorlines</cite> and run ctags with the <cite>-n</cite> option for this to work. The
+<cite>python-ctags</cite> module from PyPI must be installed to use this feature;
+otherwise a <cite>RuntimeError</cite> will be raised.</p>
+<p>The <cite>get_style_defs(arg=’‘)</cite> method of a <cite>HtmlFormatter</cite> returns a string
+containing CSS rules for the CSS classes used by the formatter. The
+argument <cite>arg</cite> can be used to specify additional CSS selectors that
+are prepended to the classes. A call <cite>fmter.get_style_defs(‘td .code’)</cite>
+would result in the following CSS classes:</p>
+<div class="highlight-css"><div class="highlight"><pre><span class="nt">td</span> <span class="nc">.code</span> <span class="nc">.kw</span> <span class="p">{</span> <span class="k">font-weight</span><span class="o">:</span> <span class="k">bold</span><span class="p">;</span> <span class="k">color</span><span class="o">:</span> <span class="m">#00FF00</span> <span class="p">}</span>
+<span class="nt">td</span> <span class="nc">.code</span> <span class="nc">.cm</span> <span class="p">{</span> <span class="k">color</span><span class="o">:</span> <span class="m">#999999</span> <span class="p">}</span>
+<span class="o">...</span>
+</pre></div>
+</div>
+<p>If you have Pygments 0.6 or higher, you can also pass a list or tuple to the
+<cite>get_style_defs()</cite> method to request multiple prefixes for the tokens:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">formatter</span><span class="o">.</span><span class="n">get_style_defs</span><span class="p">([</span><span class="s">'div.syntax pre'</span><span class="p">,</span> <span class="s">'pre.syntax'</span><span class="p">])</span>
+</pre></div>
+</div>
+<p>The output would then look like this:</p>
+<div class="highlight-css"><div class="highlight"><pre><span class="nt">div</span><span class="nc">.syntax</span> <span class="nt">pre</span> <span class="nc">.kw</span><span class="o">,</span>
+<span class="nt">pre</span><span class="nc">.syntax</span> <span class="nc">.kw</span> <span class="p">{</span> <span class="k">font-weight</span><span class="o">:</span> <span class="k">bold</span><span class="p">;</span> <span class="k">color</span><span class="o">:</span> <span class="m">#00FF00</span> <span class="p">}</span>
+<span class="nt">div</span><span class="nc">.syntax</span> <span class="nt">pre</span> <span class="nc">.cm</span><span class="o">,</span>
+<span class="nt">pre</span><span class="nc">.syntax</span> <span class="nc">.cm</span> <span class="p">{</span> <span class="k">color</span><span class="o">:</span> <span class="m">#999999</span> <span class="p">}</span>
+<span class="o">...</span>
+</pre></div>
+</div>
+<p>Additional options accepted:</p>
+<dl class="docutils">
+<dt><cite>nowrap</cite></dt>
+<dd>If set to <code class="docutils literal"><span class="pre">True</span></code>, don’t wrap the tokens at all, not even inside a <code class="docutils literal"><span class="pre"><pre></span></code>
+tag. This disables most other options (default: <code class="docutils literal"><span class="pre">False</span></code>).</dd>
+<dt><cite>full</cite></dt>
+<dd>Tells the formatter to output a “full” document, i.e. a complete
+self-contained document (default: <code class="docutils literal"><span class="pre">False</span></code>).</dd>
+<dt><cite>title</cite></dt>
+<dd>If <cite>full</cite> is true, the title that should be used to caption the
+document (default: <code class="docutils literal"><span class="pre">''</span></code>).</dd>
+<dt><cite>style</cite></dt>
+<dd>The style to use, can be a string or a Style subclass (default:
+<code class="docutils literal"><span class="pre">'default'</span></code>). This option has no effect if the <cite>cssfile</cite>
+and <cite>noclobber_cssfile</cite> option are given and the file specified in
+<cite>cssfile</cite> exists.</dd>
+<dt><cite>noclasses</cite></dt>
+<dd>If set to true, token <code class="docutils literal"><span class="pre"><span></span></code> tags will not use CSS classes, but
+inline styles. This is not recommended for larger pieces of code since
+it increases output size by quite a bit (default: <code class="docutils literal"><span class="pre">False</span></code>).</dd>
+<dt><cite>classprefix</cite></dt>
+<dd>Since the token types use relatively short class names, they may clash
+with some of your own class names. In this case you can use the
+<cite>classprefix</cite> option to give a string to prepend to all Pygments-generated
+CSS class names for token types.
+Note that this option also affects the output of <cite>get_style_defs()</cite>.</dd>
+<dt><cite>cssclass</cite></dt>
+<dd><p class="first">CSS class for the wrapping <code class="docutils literal"><span class="pre"><div></span></code> tag (default: <code class="docutils literal"><span class="pre">'highlight'</span></code>).
+If you set this option, the default selector for <cite>get_style_defs()</cite>
+will be this class.</p>
+<div class="last versionadded">
+<p><span class="versionmodified">New in version 0.9: </span>If you select the <code class="docutils literal"><span class="pre">'table'</span></code> line numbers, the wrapping table will
+have a CSS class of this string plus <code class="docutils literal"><span class="pre">'table'</span></code>, the default is
+accordingly <code class="docutils literal"><span class="pre">'highlighttable'</span></code>.</p>
+</div>
+</dd>
+<dt><cite>cssstyles</cite></dt>
+<dd>Inline CSS styles for the wrapping <code class="docutils literal"><span class="pre"><div></span></code> tag (default: <code class="docutils literal"><span class="pre">''</span></code>).</dd>
+<dt><cite>prestyles</cite></dt>
+<dd><p class="first">Inline CSS styles for the <code class="docutils literal"><span class="pre"><pre></span></code> tag (default: <code class="docutils literal"><span class="pre">''</span></code>).</p>
+<div class="last versionadded">
+<p><span class="versionmodified">New in version 0.11.</span></p>
+</div>
+</dd>
+<dt><cite>cssfile</cite></dt>
+<dd><p class="first">If the <cite>full</cite> option is true and this option is given, it must be the
+name of an external file. If the filename does not include an absolute
+path, the file’s path will be assumed to be relative to the main output
+file’s path, if the latter can be found. The stylesheet is then written
+to this file instead of the HTML file.</p>
+<div class="last versionadded">
+<p><span class="versionmodified">New in version 0.6.</span></p>
+</div>
+</dd>
+<dt><cite>noclobber_cssfile</cite></dt>
+<dd><p class="first">If <cite>cssfile</cite> is given and the specified file exists, the css file will
+not be overwritten. This allows the use of the <cite>full</cite> option in
+combination with a user specified css file. Default is <code class="docutils literal"><span class="pre">False</span></code>.</p>
+<div class="last versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd>
+<dt><cite>linenos</cite></dt>
+<dd><p class="first">If set to <code class="docutils literal"><span class="pre">'table'</span></code>, output line numbers as a table with two cells,
+one containing the line numbers, the other the whole code. This is
+copy-and-paste-friendly, but may cause alignment problems with some
+browsers or fonts. If set to <code class="docutils literal"><span class="pre">'inline'</span></code>, the line numbers will be
+integrated in the <code class="docutils literal"><span class="pre"><pre></span></code> tag that contains the code (that setting
+is <em>new in Pygments 0.8</em>).</p>
+<p>For compatibility with Pygments 0.7 and earlier, every true value
+except <code class="docutils literal"><span class="pre">'inline'</span></code> means the same as <code class="docutils literal"><span class="pre">'table'</span></code> (in particular, that
+means also <code class="docutils literal"><span class="pre">True</span></code>).</p>
+<p>The default value is <code class="docutils literal"><span class="pre">False</span></code>, which means no line numbers at all.</p>
+<p class="last"><strong>Note:</strong> with the default (“table”) line number mechanism, the line
+numbers and code can have different line heights in Internet Explorer
+unless you give the enclosing <code class="docutils literal"><span class="pre"><pre></span></code> tags an explicit <code class="docutils literal"><span class="pre">line-height</span></code>
+CSS property (you get the default line spacing with <code class="docutils literal"><span class="pre">line-height:</span>
+<span class="pre">125%</span></code>).</p>
+</dd>
+<dt><cite>hl_lines</cite></dt>
+<dd><p class="first">Specify a list of lines to be highlighted.</p>
+<div class="last versionadded">
+<p><span class="versionmodified">New in version 0.11.</span></p>
+</div>
+</dd>
+<dt><cite>linenostart</cite></dt>
+<dd>The line number for the first line (default: <code class="docutils literal"><span class="pre">1</span></code>).</dd>
+<dt><cite>linenostep</cite></dt>
+<dd>If set to a number n > 1, only every nth line number is printed.</dd>
+<dt><cite>linenospecial</cite></dt>
+<dd>If set to a number n > 0, every nth line number is given the CSS
+class <code class="docutils literal"><span class="pre">"special"</span></code> (default: <code class="docutils literal"><span class="pre">0</span></code>).</dd>
+<dt><cite>nobackground</cite></dt>
+<dd><p class="first">If set to <code class="docutils literal"><span class="pre">True</span></code>, the formatter won’t output the background color
+for the wrapping element (this automatically defaults to <code class="docutils literal"><span class="pre">False</span></code>
+when there is no wrapping element [eg: no argument for the
+<cite>get_syntax_defs</cite> method given]) (default: <code class="docutils literal"><span class="pre">False</span></code>).</p>
+<div class="last versionadded">
+<p><span class="versionmodified">New in version 0.6.</span></p>
+</div>
+</dd>
+<dt><cite>lineseparator</cite></dt>
+<dd><p class="first">This string is output between lines of code. It defaults to <code class="docutils literal"><span class="pre">"\n"</span></code>,
+which is enough to break a line inside <code class="docutils literal"><span class="pre"><pre></span></code> tags, but you can
+e.g. set it to <code class="docutils literal"><span class="pre">"<br>"</span></code> to get HTML line breaks.</p>
+<div class="last versionadded">
+<p><span class="versionmodified">New in version 0.7.</span></p>
+</div>
+</dd>
+<dt><cite>lineanchors</cite></dt>
+<dd><p class="first">If set to a nonempty string, e.g. <code class="docutils literal"><span class="pre">foo</span></code>, the formatter will wrap each
+output line in an anchor tag with a <code class="docutils literal"><span class="pre">name</span></code> of <code class="docutils literal"><span class="pre">foo-linenumber</span></code>.
+This allows easy linking to certain lines.</p>
+<div class="last versionadded">
+<p><span class="versionmodified">New in version 0.9.</span></p>
+</div>
+</dd>
+<dt><cite>linespans</cite></dt>
+<dd><p class="first">If set to a nonempty string, e.g. <code class="docutils literal"><span class="pre">foo</span></code>, the formatter will wrap each
+output line in a span tag with an <code class="docutils literal"><span class="pre">id</span></code> of <code class="docutils literal"><span class="pre">foo-linenumber</span></code>.
+This allows easy access to lines via javascript.</p>
+<div class="last versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd>
+<dt><cite>anchorlinenos</cite></dt>
+<dd>If set to <cite>True</cite>, will wrap line numbers in <a> tags. Used in
+combination with <cite>linenos</cite> and <cite>lineanchors</cite>.</dd>
+<dt><cite>tagsfile</cite></dt>
+<dd><p class="first">If set to the path of a ctags file, wrap names in anchor tags that
+link to their definitions. <cite>lineanchors</cite> should be used, and the
+tags file should specify line numbers (see the <cite>-n</cite> option to ctags).</p>
+<div class="last versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd>
+<dt><cite>tagurlformat</cite></dt>
+<dd><p class="first">A string formatting pattern used to generate links to ctags definitions.
+Available variables are <cite>%(path)s</cite>, <cite>%(fname)s</cite> and <cite>%(fext)s</cite>.
+Defaults to an empty string, resulting in just <cite>#prefix-number</cite> links.</p>
+<div class="last versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd>
+</dl>
+<p><strong>Subclassing the HTML formatter</strong></p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.7.</span></p>
+</div>
+<p>The HTML formatter is now built in a way that allows easy subclassing, thus
+customizing the output HTML code. The <cite>format()</cite> method calls
+<cite>self._format_lines()</cite> which returns a generator that yields tuples of <code class="docutils literal"><span class="pre">(1,</span>
+<span class="pre">line)</span></code>, where the <code class="docutils literal"><span class="pre">1</span></code> indicates that the <code class="docutils literal"><span class="pre">line</span></code> is a line of the
+formatted source code.</p>
+<p>If the <cite>nowrap</cite> option is set, the generator is the iterated over and the
+resulting HTML is output.</p>
+<p>Otherwise, <cite>format()</cite> calls <cite>self.wrap()</cite>, which wraps the generator with
+other generators. These may add some HTML code to the one generated by
+<cite>_format_lines()</cite>, either by modifying the lines generated by the latter,
+then yielding them again with <code class="docutils literal"><span class="pre">(1,</span> <span class="pre">line)</span></code>, and/or by yielding other HTML
+code before or after the lines, with <code class="docutils literal"><span class="pre">(0,</span> <span class="pre">html)</span></code>. The distinction between
+source lines and other code makes it possible to wrap the generator multiple
+times.</p>
+<p>The default <cite>wrap()</cite> implementation adds a <code class="docutils literal"><span class="pre"><div></span></code> and a <code class="docutils literal"><span class="pre"><pre></span></code> tag.</p>
+<p>A custom <cite>HtmlFormatter</cite> subclass could look like this:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="k">class</span> <span class="nc">CodeHtmlFormatter</span><span class="p">(</span><span class="n">HtmlFormatter</span><span class="p">):</span>
+
+ <span class="k">def</span> <span class="nf">wrap</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">source</span><span class="p">,</span> <span class="n">outfile</span><span class="p">):</span>
+ <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_wrap_code</span><span class="p">(</span><span class="n">source</span><span class="p">)</span>
+
+ <span class="k">def</span> <span class="nf">_wrap_code</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">source</span><span class="p">):</span>
+ <span class="k">yield</span> <span class="mi">0</span><span class="p">,</span> <span class="s">'<code>'</span>
+ <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">t</span> <span class="ow">in</span> <span class="n">source</span><span class="p">:</span>
+ <span class="k">if</span> <span class="n">i</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
+ <span class="c"># it's a line of formatted code</span>
+ <span class="n">t</span> <span class="o">+=</span> <span class="s">'<br>'</span>
+ <span class="k">yield</span> <span class="n">i</span><span class="p">,</span> <span class="n">t</span>
+ <span class="k">yield</span> <span class="mi">0</span><span class="p">,</span> <span class="s">'</code>'</span>
+</pre></div>
+</div>
+<p>This results in wrapping the formatted lines with a <code class="docutils literal"><span class="pre"><code></span></code> tag, where the
+source lines are broken using <code class="docutils literal"><span class="pre"><br></span></code> tags.</p>
+<p>After calling <cite>wrap()</cite>, the <cite>format()</cite> method also adds the “line numbers”
+and/or “full document” wrappers if the respective options are set. Then, all
+HTML yielded by the wrapped generator is output.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="ImageFormatter">
+<em class="property">class </em><code class="descname">ImageFormatter</code><a class="headerlink" href="#ImageFormatter" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">img, IMG, png</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.png</td>
+</tr>
+</tbody>
+</table>
+<p>Create a PNG image from source code. This uses the Python Imaging Library to
+generate a pixmap from the source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.10.</span></p>
+</div>
+<p>Additional options accepted:</p>
+<dl class="docutils">
+<dt><cite>image_format</cite></dt>
+<dd><p class="first">An image format to output to that is recognised by PIL, these include:</p>
+<ul class="last simple">
+<li>“PNG” (default)</li>
+<li>“JPEG”</li>
+<li>“BMP”</li>
+<li>“GIF”</li>
+</ul>
+</dd>
+<dt><cite>line_pad</cite></dt>
+<dd><p class="first">The extra spacing (in pixels) between each line of text.</p>
+<p class="last">Default: 2</p>
+</dd>
+<dt><cite>font_name</cite></dt>
+<dd><p class="first">The font name to be used as the base font from which others, such as
+bold and italic fonts will be generated. This really should be a
+monospace font to look sane.</p>
+<p class="last">Default: “Bitstream Vera Sans Mono”</p>
+</dd>
+<dt><cite>font_size</cite></dt>
+<dd><p class="first">The font size in points to be used.</p>
+<p class="last">Default: 14</p>
+</dd>
+<dt><cite>image_pad</cite></dt>
+<dd><p class="first">The padding, in pixels to be used at each edge of the resulting image.</p>
+<p class="last">Default: 10</p>
+</dd>
+<dt><cite>line_numbers</cite></dt>
+<dd><p class="first">Whether line numbers should be shown: True/False</p>
+<p class="last">Default: True</p>
+</dd>
+<dt><cite>line_number_start</cite></dt>
+<dd><p class="first">The line number of the first line.</p>
+<p class="last">Default: 1</p>
+</dd>
+<dt><cite>line_number_step</cite></dt>
+<dd><p class="first">The step used when printing line numbers.</p>
+<p class="last">Default: 1</p>
+</dd>
+<dt><cite>line_number_bg</cite></dt>
+<dd><p class="first">The background colour (in “#123456” format) of the line number bar, or
+None to use the style background color.</p>
+<p class="last">Default: “#eed”</p>
+</dd>
+<dt><cite>line_number_fg</cite></dt>
+<dd><p class="first">The text color of the line numbers (in “#123456”-like format).</p>
+<p class="last">Default: “#886”</p>
+</dd>
+<dt><cite>line_number_chars</cite></dt>
+<dd><p class="first">The number of columns of line numbers allowable in the line number
+margin.</p>
+<p class="last">Default: 2</p>
+</dd>
+<dt><cite>line_number_bold</cite></dt>
+<dd><p class="first">Whether line numbers will be bold: True/False</p>
+<p class="last">Default: False</p>
+</dd>
+<dt><cite>line_number_italic</cite></dt>
+<dd><p class="first">Whether line numbers will be italicized: True/False</p>
+<p class="last">Default: False</p>
+</dd>
+<dt><cite>line_number_separator</cite></dt>
+<dd><p class="first">Whether a line will be drawn between the line number area and the
+source code area: True/False</p>
+<p class="last">Default: True</p>
+</dd>
+<dt><cite>line_number_pad</cite></dt>
+<dd><p class="first">The horizontal padding (in pixels) between the line number margin, and
+the source code area.</p>
+<p class="last">Default: 6</p>
+</dd>
+<dt><cite>hl_lines</cite></dt>
+<dd><p class="first">Specify a list of lines to be highlighted.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.2.</span></p>
+</div>
+<p class="last">Default: empty list</p>
+</dd>
+<dt><cite>hl_color</cite></dt>
+<dd><p class="first">Specify the color for highlighting lines.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.2.</span></p>
+</div>
+<p class="last">Default: highlight color of the selected style</p>
+</dd>
+</dl>
+</dd></dl>
+
+<dl class="class">
+<dt id="JpgImageFormatter">
+<em class="property">class </em><code class="descname">JpgImageFormatter</code><a class="headerlink" href="#JpgImageFormatter" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">jpg, jpeg</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.jpg</td>
+</tr>
+</tbody>
+</table>
+<p>Create a JPEG image from source code. This uses the Python Imaging Library to
+generate a pixmap from the source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="LatexFormatter">
+<em class="property">class </em><code class="descname">LatexFormatter</code><a class="headerlink" href="#LatexFormatter" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">latex, tex</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.tex</td>
+</tr>
+</tbody>
+</table>
+<p>Format tokens as LaTeX code. This needs the <cite>fancyvrb</cite> and <cite>color</cite>
+standard packages.</p>
+<p>Without the <cite>full</cite> option, code is formatted as one <code class="docutils literal"><span class="pre">Verbatim</span></code>
+environment, like this:</p>
+<div class="highlight-latex"><div class="highlight"><pre><span class="k">\begin</span><span class="nb">{</span>Verbatim<span class="nb">}</span>[commandchars=<span class="k">\\\{\}</span>]
+<span class="k">\PY</span><span class="nb">{</span>k<span class="nb">}{</span>def <span class="nb">}</span><span class="k">\PY</span><span class="nb">{</span>n+nf<span class="nb">}{</span>foo<span class="nb">}</span>(<span class="k">\PY</span><span class="nb">{</span>n<span class="nb">}{</span>bar<span class="nb">}</span>):
+ <span class="k">\PY</span><span class="nb">{</span>k<span class="nb">}{</span>pass<span class="nb">}</span>
+<span class="k">\end</span><span class="nb">{</span>Verbatim<span class="nb">}</span>
+</pre></div>
+</div>
+<p>The special command used here (<code class="docutils literal"><span class="pre">\PY</span></code>) and all the other macros it needs
+are output by the <cite>get_style_defs</cite> method.</p>
+<p>With the <cite>full</cite> option, a complete LaTeX document is output, including
+the command definitions in the preamble.</p>
+<p>The <cite>get_style_defs()</cite> method of a <cite>LatexFormatter</cite> returns a string
+containing <code class="docutils literal"><span class="pre">\def</span></code> commands defining the macros needed inside the
+<code class="docutils literal"><span class="pre">Verbatim</span></code> environments.</p>
+<p>Additional options accepted:</p>
+<dl class="docutils">
+<dt><cite>style</cite></dt>
+<dd>The style to use, can be a string or a Style subclass (default:
+<code class="docutils literal"><span class="pre">'default'</span></code>).</dd>
+<dt><cite>full</cite></dt>
+<dd>Tells the formatter to output a “full” document, i.e. a complete
+self-contained document (default: <code class="docutils literal"><span class="pre">False</span></code>).</dd>
+<dt><cite>title</cite></dt>
+<dd>If <cite>full</cite> is true, the title that should be used to caption the
+document (default: <code class="docutils literal"><span class="pre">''</span></code>).</dd>
+<dt><cite>docclass</cite></dt>
+<dd>If the <cite>full</cite> option is enabled, this is the document class to use
+(default: <code class="docutils literal"><span class="pre">'article'</span></code>).</dd>
+<dt><cite>preamble</cite></dt>
+<dd>If the <cite>full</cite> option is enabled, this can be further preamble commands,
+e.g. <code class="docutils literal"><span class="pre">\usepackage</span></code> (default: <code class="docutils literal"><span class="pre">''</span></code>).</dd>
+<dt><cite>linenos</cite></dt>
+<dd>If set to <code class="docutils literal"><span class="pre">True</span></code>, output line numbers (default: <code class="docutils literal"><span class="pre">False</span></code>).</dd>
+<dt><cite>linenostart</cite></dt>
+<dd>The line number for the first line (default: <code class="docutils literal"><span class="pre">1</span></code>).</dd>
+<dt><cite>linenostep</cite></dt>
+<dd>If set to a number n > 1, only every nth line number is printed.</dd>
+<dt><cite>verboptions</cite></dt>
+<dd>Additional options given to the Verbatim environment (see the <em>fancyvrb</em>
+docs for possible values) (default: <code class="docutils literal"><span class="pre">''</span></code>).</dd>
+<dt><cite>commandprefix</cite></dt>
+<dd><p class="first">The LaTeX commands used to produce colored output are constructed
+using this prefix and some letters (default: <code class="docutils literal"><span class="pre">'PY'</span></code>).</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.7.</span></p>
+</div>
+<div class="last versionchanged">
+<p><span class="versionmodified">Changed in version 0.10: </span>The default is now <code class="docutils literal"><span class="pre">'PY'</span></code> instead of <code class="docutils literal"><span class="pre">'C'</span></code>.</p>
+</div>
+</dd>
+<dt><cite>texcomments</cite></dt>
+<dd><p class="first">If set to <code class="docutils literal"><span class="pre">True</span></code>, enables LaTeX comment lines. That is, LaTex markup
+in comment tokens is not escaped so that LaTeX can render it (default:
+<code class="docutils literal"><span class="pre">False</span></code>).</p>
+<div class="last versionadded">
+<p><span class="versionmodified">New in version 1.2.</span></p>
+</div>
+</dd>
+<dt><cite>mathescape</cite></dt>
+<dd><p class="first">If set to <code class="docutils literal"><span class="pre">True</span></code>, enables LaTeX math mode escape in comments. That
+is, <code class="docutils literal"><span class="pre">'$...$'</span></code> inside a comment will trigger math mode (default:
+<code class="docutils literal"><span class="pre">False</span></code>).</p>
+<div class="last versionadded">
+<p><span class="versionmodified">New in version 1.2.</span></p>
+</div>
+</dd>
+</dl>
+</dd></dl>
+
+<dl class="class">
+<dt id="NullFormatter">
+<em class="property">class </em><code class="descname">NullFormatter</code><a class="headerlink" href="#NullFormatter" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">text, null</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.txt</td>
+</tr>
+</tbody>
+</table>
+<p>Output the text unchanged without any formatting.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="RawTokenFormatter">
+<em class="property">class </em><code class="descname">RawTokenFormatter</code><a class="headerlink" href="#RawTokenFormatter" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">raw, tokens</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.raw</td>
+</tr>
+</tbody>
+</table>
+<p>Format tokens as a raw representation for storing token streams.</p>
+<p>The format is <code class="docutils literal"><span class="pre">tokentype<TAB>repr(tokenstring)\n</span></code>. The output can later
+be converted to a token stream with the <cite>RawTokenLexer</cite>, described in the
+<a class="reference internal" href="lexers.html"><em>lexer list</em></a>.</p>
+<p>Only two options are accepted:</p>
+<dl class="docutils">
+<dt><cite>compress</cite></dt>
+<dd>If set to <code class="docutils literal"><span class="pre">'gz'</span></code> or <code class="docutils literal"><span class="pre">'bz2'</span></code>, compress the output with the given
+compression algorithm after encoding (default: <code class="docutils literal"><span class="pre">''</span></code>).</dd>
+<dt><cite>error_color</cite></dt>
+<dd><p class="first">If set to a color name, highlight error tokens using that color. If
+set but with no value, defaults to <code class="docutils literal"><span class="pre">'red'</span></code>.</p>
+<div class="last versionadded">
+<p><span class="versionmodified">New in version 0.11.</span></p>
+</div>
+</dd>
+</dl>
+</dd></dl>
+
+<dl class="class">
+<dt id="RtfFormatter">
+<em class="property">class </em><code class="descname">RtfFormatter</code><a class="headerlink" href="#RtfFormatter" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">rtf</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.rtf</td>
+</tr>
+</tbody>
+</table>
+<p>Format tokens as RTF markup. This formatter automatically outputs full RTF
+documents with color information and other useful stuff. Perfect for Copy and
+Paste into Microsoft® Word® documents.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.6.</span></p>
+</div>
+<p>Additional options accepted:</p>
+<dl class="docutils">
+<dt><cite>style</cite></dt>
+<dd>The style to use, can be a string or a Style subclass (default:
+<code class="docutils literal"><span class="pre">'default'</span></code>).</dd>
+<dt><cite>fontface</cite></dt>
+<dd>The used font famliy, for example <code class="docutils literal"><span class="pre">Bitstream</span> <span class="pre">Vera</span> <span class="pre">Sans</span></code>. Defaults to
+some generic font which is supposed to have fixed width.</dd>
+</dl>
+</dd></dl>
+
+<dl class="class">
+<dt id="SvgFormatter">
+<em class="property">class </em><code class="descname">SvgFormatter</code><a class="headerlink" href="#SvgFormatter" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">svg</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.svg</td>
+</tr>
+</tbody>
+</table>
+<p>Format tokens as an SVG graphics file. This formatter is still experimental.
+Each line of code is a <code class="docutils literal"><span class="pre"><text></span></code> element with explicit <code class="docutils literal"><span class="pre">x</span></code> and <code class="docutils literal"><span class="pre">y</span></code>
+coordinates containing <code class="docutils literal"><span class="pre"><tspan></span></code> elements with the individual token styles.</p>
+<p>By default, this formatter outputs a full SVG document including doctype
+declaration and the <code class="docutils literal"><span class="pre"><svg></span></code> root element.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.9.</span></p>
+</div>
+<p>Additional options accepted:</p>
+<dl class="docutils">
+<dt><cite>nowrap</cite></dt>
+<dd>Don’t wrap the SVG <code class="docutils literal"><span class="pre"><text></span></code> elements in <code class="docutils literal"><span class="pre"><svg><g></span></code> elements and
+don’t add a XML declaration and a doctype. If true, the <cite>fontfamily</cite>
+and <cite>fontsize</cite> options are ignored. Defaults to <code class="docutils literal"><span class="pre">False</span></code>.</dd>
+<dt><cite>fontfamily</cite></dt>
+<dd>The value to give the wrapping <code class="docutils literal"><span class="pre"><g></span></code> element’s <code class="docutils literal"><span class="pre">font-family</span></code>
+attribute, defaults to <code class="docutils literal"><span class="pre">"monospace"</span></code>.</dd>
+<dt><cite>fontsize</cite></dt>
+<dd>The value to give the wrapping <code class="docutils literal"><span class="pre"><g></span></code> element’s <code class="docutils literal"><span class="pre">font-size</span></code>
+attribute, defaults to <code class="docutils literal"><span class="pre">"14px"</span></code>.</dd>
+<dt><cite>xoffset</cite></dt>
+<dd>Starting offset in X direction, defaults to <code class="docutils literal"><span class="pre">0</span></code>.</dd>
+<dt><cite>yoffset</cite></dt>
+<dd>Starting offset in Y direction, defaults to the font size if it is given
+in pixels, or <code class="docutils literal"><span class="pre">20</span></code> else. (This is necessary since text coordinates
+refer to the text baseline, not the top edge.)</dd>
+<dt><cite>ystep</cite></dt>
+<dd>Offset to add to the Y coordinate for each subsequent line. This should
+roughly be the text size plus 5. It defaults to that value if the text
+size is given in pixels, or <code class="docutils literal"><span class="pre">25</span></code> else.</dd>
+<dt><cite>spacehack</cite></dt>
+<dd>Convert spaces in the source to <code class="docutils literal"><span class="pre">&#160;</span></code>, which are non-breaking
+spaces. SVG provides the <code class="docutils literal"><span class="pre">xml:space</span></code> attribute to control how
+whitespace inside tags is handled, in theory, the <code class="docutils literal"><span class="pre">preserve</span></code> value
+could be used to keep all whitespace as-is. However, many current SVG
+viewers don’t obey that rule, so this option is provided as a workaround
+and defaults to <code class="docutils literal"><span class="pre">True</span></code>.</dd>
+</dl>
+</dd></dl>
+
+<dl class="class">
+<dt id="Terminal256Formatter">
+<em class="property">class </em><code class="descname">Terminal256Formatter</code><a class="headerlink" href="#Terminal256Formatter" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">terminal256, console256, 256</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>Format tokens with ANSI color sequences, for output in a 256-color
+terminal or console. Like in <cite>TerminalFormatter</cite> color sequences
+are terminated at newlines, so that paging the output works correctly.</p>
+<p>The formatter takes colors from a style defined by the <cite>style</cite> option
+and converts them to nearest ANSI 256-color escape sequences. Bold and
+underline attributes from the style are preserved (and displayed).</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.9.</span></p>
+</div>
+<p>Options accepted:</p>
+<dl class="docutils">
+<dt><cite>style</cite></dt>
+<dd>The style to use, can be a string or a Style subclass (default:
+<code class="docutils literal"><span class="pre">'default'</span></code>).</dd>
+</dl>
+</dd></dl>
+
+<dl class="class">
+<dt id="TerminalFormatter">
+<em class="property">class </em><code class="descname">TerminalFormatter</code><a class="headerlink" href="#TerminalFormatter" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">terminal, console</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>Format tokens with ANSI color sequences, for output in a text console.
+Color sequences are terminated at newlines, so that paging the output
+works correctly.</p>
+<p>The <cite>get_style_defs()</cite> method doesn’t do anything special since there is
+no support for common styles.</p>
+<p>Options accepted:</p>
+<dl class="docutils">
+<dt><cite>bg</cite></dt>
+<dd>Set to <code class="docutils literal"><span class="pre">"light"</span></code> or <code class="docutils literal"><span class="pre">"dark"</span></code> depending on the terminal’s background
+(default: <code class="docutils literal"><span class="pre">"light"</span></code>).</dd>
+<dt><cite>colorscheme</cite></dt>
+<dd>A dictionary mapping token types to (lightbg, darkbg) color names or
+<code class="docutils literal"><span class="pre">None</span></code> (default: <code class="docutils literal"><span class="pre">None</span></code> = use builtin colorscheme).</dd>
+</dl>
+</dd></dl>
+
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ <h3><a href="../index.html">Table Of Contents</a></h3>
+ <ul>
+<li><a class="reference internal" href="#">Available formatters</a><ul>
+<li><a class="reference internal" href="#common-options">Common options</a></li>
+<li><a class="reference internal" href="#formatter-classes">Formatter classes</a></li>
+</ul>
+</li>
+</ul>
+
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="filters.html"
+ title="previous chapter">Filters</a></p>
+ <h4>Next topic</h4>
+ <p class="topless"><a href="styles.html"
+ title="next chapter">Styles</a></p>
+ <div role="note" aria-label="source link">
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="../_sources/docs/formatters.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+ </div>
+<strong>« <a href="index.html">Back to docs index</a></strong>
+
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="../search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="styles.html" title="Styles"
+ >next</a> |</li>
+ <li class="right" >
+ <a href="filters.html" title="Filters"
+ >previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" >Pygments documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Pygments documentation — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '../',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+ <link rel="shortcut icon" href="../_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="../index.html" />
+ <link rel="next" title="Download and installation" href="../download.html" />
+ <link rel="prev" title="Welcome!" href="../index.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="../download.html" title="Download and installation"
+ accesskey="N">next</a> |</li>
+ <li class="right" >
+ <a href="../index.html" title="Welcome!"
+ accesskey="P">previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <div class="section" id="pygments-documentation">
+<h1>Pygments documentation<a class="headerlink" href="#pygments-documentation" title="Permalink to this headline">¶</a></h1>
+<p><strong>Starting with Pygments</strong></p>
+<div class="toctree-wrapper compound">
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../download.html">Download and installation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="quickstart.html">Introduction and Quickstart</a></li>
+<li class="toctree-l1"><a class="reference internal" href="cmdline.html">Command Line Interface</a></li>
+</ul>
+</div>
+<p><strong>Builtin components</strong></p>
+<div class="toctree-wrapper compound">
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="lexers.html">Available lexers</a></li>
+<li class="toctree-l1"><a class="reference internal" href="filters.html">Filters</a></li>
+<li class="toctree-l1"><a class="reference internal" href="formatters.html">Available formatters</a></li>
+<li class="toctree-l1"><a class="reference internal" href="styles.html">Styles</a></li>
+</ul>
+</div>
+<p><strong>Reference</strong></p>
+<div class="toctree-wrapper compound">
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="unicode.html">Unicode and Encodings</a></li>
+<li class="toctree-l1"><a class="reference internal" href="tokens.html">Builtin Tokens</a></li>
+<li class="toctree-l1"><a class="reference internal" href="api.html">The full Pygments API</a></li>
+</ul>
+</div>
+<p><strong>Hacking for Pygments</strong></p>
+<div class="toctree-wrapper compound">
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="lexerdevelopment.html">Write your own lexer</a></li>
+<li class="toctree-l1"><a class="reference internal" href="formatterdevelopment.html">Write your own formatter</a></li>
+<li class="toctree-l1"><a class="reference internal" href="filterdevelopment.html">Write your own filter</a></li>
+<li class="toctree-l1"><a class="reference internal" href="plugins.html">Register Plugins</a></li>
+</ul>
+</div>
+<p><strong>Hints and tricks</strong></p>
+<div class="toctree-wrapper compound">
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="rstdirective.html">Using Pygments in ReST documents</a></li>
+<li class="toctree-l1"><a class="reference internal" href="moinmoin.html">Using Pygments with MoinMoin</a></li>
+<li class="toctree-l1"><a class="reference internal" href="java.html">Use Pygments in Java</a></li>
+<li class="toctree-l1"><a class="reference internal" href="integrate.html">Using Pygments in various scenarios</a></li>
+</ul>
+</div>
+<p><strong>About Pygments</strong></p>
+<div class="toctree-wrapper compound">
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="changelog.html">Pygments changelog</a></li>
+<li class="toctree-l1"><a class="reference internal" href="authors.html">Full contributor list</a></li>
+</ul>
+</div>
+<p>If you find bugs or have suggestions for the documentation, please look
+<a class="reference internal" href="../index.html#contribute"><em>here</em></a> for info on how to contact the team.</p>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="../index.html"
+ title="previous chapter">Welcome!</a></p>
+ <h4>Next topic</h4>
+ <p class="topless"><a href="../download.html"
+ title="next chapter">Download and installation</a></p>
+ <div role="note" aria-label="source link">
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="../_sources/docs/index.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+ </div>
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="../search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="../download.html" title="Download and installation"
+ >next</a> |</li>
+ <li class="right" >
+ <a href="../index.html" title="Welcome!"
+ >previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Using Pygments in various scenarios — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '../',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+ <link rel="shortcut icon" href="../_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="../index.html" />
+ <link rel="up" title="Pygments documentation" href="index.html" />
+ <link rel="next" title="Pygments changelog" href="changelog.html" />
+ <link rel="prev" title="Use Pygments in Java" href="java.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="changelog.html" title="Pygments changelog"
+ accesskey="N">next</a> |</li>
+ <li class="right" >
+ <a href="java.html" title="Use Pygments in Java"
+ accesskey="P">previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" accesskey="U">Pygments documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <div class="section" id="using-pygments-in-various-scenarios">
+<h1>Using Pygments in various scenarios<a class="headerlink" href="#using-pygments-in-various-scenarios" title="Permalink to this headline">¶</a></h1>
+<div class="section" id="pygtk">
+<h2>PyGtk<a class="headerlink" href="#pygtk" title="Permalink to this headline">¶</a></h2>
+<p>Armin has written a piece of sample code that shows how to create a Gtk
+<cite>TextBuffer</cite> object containing Pygments-highlighted text.</p>
+<p>See the article here: <a class="reference external" href="http://lucumr.pocoo.org/cogitations/2007/05/30/pygments-gtk-rendering/">http://lucumr.pocoo.org/cogitations/2007/05/30/pygments-gtk-rendering/</a></p>
+</div>
+<div class="section" id="wordpress">
+<h2>Wordpress<a class="headerlink" href="#wordpress" title="Permalink to this headline">¶</a></h2>
+<p>He also has a snippet that shows how to use Pygments in WordPress:</p>
+<p><a class="reference external" href="http://lucumr.pocoo.org/cogitations/2007/05/30/pygments-in-wordpress/">http://lucumr.pocoo.org/cogitations/2007/05/30/pygments-in-wordpress/</a></p>
+</div>
+<div class="section" id="markdown">
+<h2>Markdown<a class="headerlink" href="#markdown" title="Permalink to this headline">¶</a></h2>
+<p>Since Pygments 0.9, the distribution ships <a class="reference external" href="http://www.freewisdom.org/projects/python-markdown/">Markdown</a> preprocessor sample code
+that uses Pygments to render source code in
+<code class="file docutils literal"><span class="pre">external/markdown-processor.py</span></code>. You can copy and adapt it to your
+liking.</p>
+</div>
+<div class="section" id="textmate">
+<h2>TextMate<a class="headerlink" href="#textmate" title="Permalink to this headline">¶</a></h2>
+<p>Antonio Cangiano has created a Pygments bundle for TextMate that allows to
+colorize code via a simple menu option. It can be found <a class="reference external" href="http://antoniocangiano.com/2008/10/28/pygments-textmate-bundle/">here</a>.</p>
+</div>
+<div class="section" id="bash-completion">
+<h2>Bash completion<a class="headerlink" href="#bash-completion" title="Permalink to this headline">¶</a></h2>
+<p>The source distribution contains a file <code class="docutils literal"><span class="pre">external/pygments.bashcomp</span></code> that
+sets up completion for the <code class="docutils literal"><span class="pre">pygmentize</span></code> command in bash.</p>
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ <h3><a href="../index.html">Table Of Contents</a></h3>
+ <ul>
+<li><a class="reference internal" href="#">Using Pygments in various scenarios</a><ul>
+<li><a class="reference internal" href="#pygtk">PyGtk</a></li>
+<li><a class="reference internal" href="#wordpress">Wordpress</a></li>
+<li><a class="reference internal" href="#markdown">Markdown</a></li>
+<li><a class="reference internal" href="#textmate">TextMate</a></li>
+<li><a class="reference internal" href="#bash-completion">Bash completion</a></li>
+</ul>
+</li>
+</ul>
+
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="java.html"
+ title="previous chapter">Use Pygments in Java</a></p>
+ <h4>Next topic</h4>
+ <p class="topless"><a href="changelog.html"
+ title="next chapter">Pygments changelog</a></p>
+ <div role="note" aria-label="source link">
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="../_sources/docs/integrate.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+ </div>
+<strong>« <a href="index.html">Back to docs index</a></strong>
+
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="../search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="changelog.html" title="Pygments changelog"
+ >next</a> |</li>
+ <li class="right" >
+ <a href="java.html" title="Use Pygments in Java"
+ >previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" >Pygments documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Use Pygments in Java — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '../',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+ <link rel="shortcut icon" href="../_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="../index.html" />
+ <link rel="up" title="Pygments documentation" href="index.html" />
+ <link rel="next" title="Using Pygments in various scenarios" href="integrate.html" />
+ <link rel="prev" title="Using Pygments with MoinMoin" href="moinmoin.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="integrate.html" title="Using Pygments in various scenarios"
+ accesskey="N">next</a> |</li>
+ <li class="right" >
+ <a href="moinmoin.html" title="Using Pygments with MoinMoin"
+ accesskey="P">previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" accesskey="U">Pygments documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <div class="section" id="use-pygments-in-java">
+<h1>Use Pygments in Java<a class="headerlink" href="#use-pygments-in-java" title="Permalink to this headline">¶</a></h1>
+<p>Thanks to <a class="reference external" href="http://www.jython.org">Jython</a> it is possible to use Pygments in
+Java.</p>
+<p>This page is a simple tutorial to get an idea of how this is working. You can
+then look at the <a class="reference external" href="http://www.jython.org/docs/">Jython documentation</a> for more
+advanced use.</p>
+<p>Since version 1.5, Pygments is deployed on <a class="reference external" href="http://repo1.maven.org/maven2/org/pygments/pygments/">Maven Central</a> as a JAR so is Jython
+which makes it a lot easier to create the Java project.</p>
+<p>Here is an example of a <a class="reference external" href="http://www.maven.org">Maven</a> <code class="docutils literal"><span class="pre">pom.xml</span></code> file for a
+project running Pygments:</p>
+<div class="highlight-xml"><div class="highlight"><pre><span class="cp"><?xml version="1.0" encoding="UTF-8"?></span>
+
+<span class="nt"><project</span> <span class="na">xmlns=</span><span class="s">"http://maven.apache.org/POM/4.0.0"</span>
+ <span class="na">xmlns:xsi=</span><span class="s">"http://www.w3.org/2001/XMLSchema-instance"</span>
+ <span class="na">xsi:schemaLocation=</span><span class="s">"http://maven.apache.org/POM/4.0.0</span>
+<span class="s"> http://maven.apache.org/maven-v4_0_0.xsd"</span><span class="nt">></span>
+ <span class="nt"><modelVersion></span>4.0.0<span class="nt"></modelVersion></span>
+ <span class="nt"><groupId></span>example<span class="nt"></groupId></span>
+ <span class="nt"><artifactId></span>example<span class="nt"></artifactId></span>
+ <span class="nt"><version></span>1.0-SNAPSHOT<span class="nt"></version></span>
+ <span class="nt"><dependencies></span>
+ <span class="nt"><dependency></span>
+ <span class="nt"><groupId></span>org.python<span class="nt"></groupId></span>
+ <span class="nt"><artifactId></span>jython-standalone<span class="nt"></artifactId></span>
+ <span class="nt"><version></span>2.5.3<span class="nt"></version></span>
+ <span class="nt"></dependency></span>
+ <span class="nt"><dependency></span>
+ <span class="nt"><groupId></span>org.pygments<span class="nt"></groupId></span>
+ <span class="nt"><artifactId></span>pygments<span class="nt"></artifactId></span>
+ <span class="nt"><version></span>1.5<span class="nt"></version></span>
+ <span class="nt"><scope></span>runtime<span class="nt"></scope></span>
+ <span class="nt"></dependency></span>
+ <span class="nt"></dependencies></span>
+<span class="nt"></project></span>
+</pre></div>
+</div>
+<p>The following Java example:</p>
+<div class="highlight-java"><div class="highlight"><pre><span class="n">PythonInterpreter</span> <span class="n">interpreter</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PythonInterpreter</span><span class="o">();</span>
+
+<span class="c1">// Set a variable with the content you want to work with</span>
+<span class="n">interpreter</span><span class="o">.</span><span class="na">set</span><span class="o">(</span><span class="s">"code"</span><span class="o">,</span> <span class="n">code</span><span class="o">);</span>
+
+<span class="c1">// Simple use Pygments as you would in Python</span>
+<span class="n">interpreter</span><span class="o">.</span><span class="na">exec</span><span class="o">(</span><span class="s">"from pygments import highlight\n"</span>
+ <span class="o">+</span> <span class="s">"from pygments.lexers import PythonLexer\n"</span>
+ <span class="o">+</span> <span class="s">"from pygments.formatters import HtmlFormatter\n"</span>
+ <span class="o">+</span> <span class="s">"\nresult = highlight(code, PythonLexer(), HtmlFormatter())"</span><span class="o">);</span>
+
+<span class="c1">// Get the result that has been set in a variable</span>
+<span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">interpreter</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="s">"result"</span><span class="o">,</span> <span class="n">String</span><span class="o">.</span><span class="na">class</span><span class="o">));</span>
+</pre></div>
+</div>
+<p>will print something like:</p>
+<div class="highlight-html"><div class="highlight"><pre><span class="nt"><div</span> <span class="na">class=</span><span class="s">"highlight"</span><span class="nt">></span>
+<span class="nt"><pre><span</span> <span class="na">class=</span><span class="s">"k"</span><span class="nt">></span>print<span class="nt"></span></span> <span class="nt"><span</span> <span class="na">class=</span><span class="s">"s"</span><span class="nt">></span><span class="ni">&quot;</span>Hello World<span class="ni">&quot;</span><span class="nt"></span></pre></span>
+<span class="nt"></div></span>
+</pre></div>
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="moinmoin.html"
+ title="previous chapter">Using Pygments with MoinMoin</a></p>
+ <h4>Next topic</h4>
+ <p class="topless"><a href="integrate.html"
+ title="next chapter">Using Pygments in various scenarios</a></p>
+ <div role="note" aria-label="source link">
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="../_sources/docs/java.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+ </div>
+<strong>« <a href="index.html">Back to docs index</a></strong>
+
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="../search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="integrate.html" title="Using Pygments in various scenarios"
+ >next</a> |</li>
+ <li class="right" >
+ <a href="moinmoin.html" title="Using Pygments with MoinMoin"
+ >previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" >Pygments documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Write your own lexer — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '../',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+ <link rel="shortcut icon" href="../_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="../index.html" />
+ <link rel="up" title="Pygments documentation" href="index.html" />
+ <link rel="next" title="Write your own formatter" href="formatterdevelopment.html" />
+ <link rel="prev" title="The full Pygments API" href="api.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="formatterdevelopment.html" title="Write your own formatter"
+ accesskey="N">next</a> |</li>
+ <li class="right" >
+ <a href="api.html" title="The full Pygments API"
+ accesskey="P">previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" accesskey="U">Pygments documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <div class="section" id="write-your-own-lexer">
+<h1>Write your own lexer<a class="headerlink" href="#write-your-own-lexer" title="Permalink to this headline">¶</a></h1>
+<p>If a lexer for your favorite language is missing in the Pygments package, you
+can easily write your own and extend Pygments.</p>
+<p>All you need can be found inside the <a class="reference internal" href="api.html#module-pygments.lexer" title="pygments.lexer"><code class="xref py py-mod docutils literal"><span class="pre">pygments.lexer</span></code></a> module. As you can
+read in the <a class="reference internal" href="api.html"><em>API documentation</em></a>, a lexer is a class that is
+initialized with some keyword arguments (the lexer options) and that provides a
+<a class="reference internal" href="api.html#pygments.lexer.Lexer.get_tokens_unprocessed" title="pygments.lexer.Lexer.get_tokens_unprocessed"><code class="xref py py-meth docutils literal"><span class="pre">get_tokens_unprocessed()</span></code></a> method which is given a string or unicode
+object with the data to lex.</p>
+<p>The <a class="reference internal" href="api.html#pygments.lexer.Lexer.get_tokens_unprocessed" title="pygments.lexer.Lexer.get_tokens_unprocessed"><code class="xref py py-meth docutils literal"><span class="pre">get_tokens_unprocessed()</span></code></a> method must return an iterator or iterable
+containing tuples in the form <code class="docutils literal"><span class="pre">(index,</span> <span class="pre">token,</span> <span class="pre">value)</span></code>. Normally you don’t
+need to do this since there are base lexers that do most of the work and that
+you can subclass.</p>
+<div class="section" id="regexlexer">
+<h2>RegexLexer<a class="headerlink" href="#regexlexer" title="Permalink to this headline">¶</a></h2>
+<p>The lexer base class used by almost all of Pygments’ lexers is the
+<code class="xref py py-class docutils literal"><span class="pre">RegexLexer</span></code>. This class allows you to define lexing rules in terms of
+<em>regular expressions</em> for different <em>states</em>.</p>
+<p>States are groups of regular expressions that are matched against the input
+string at the <em>current position</em>. If one of these expressions matches, a
+corresponding action is performed (such as yielding a token with a specific
+type, or changing state), the current position is set to where the last match
+ended and the matching process continues with the first regex of the current
+state.</p>
+<p>Lexer states are kept on a stack: each time a new state is entered, the new
+state is pushed onto the stack. The most basic lexers (like the <cite>DiffLexer</cite>)
+just need one state.</p>
+<p>Each state is defined as a list of tuples in the form (<cite>regex</cite>, <cite>action</cite>,
+<cite>new_state</cite>) where the last item is optional. In the most basic form, <cite>action</cite>
+is a token type (like <cite>Name.Builtin</cite>). That means: When <cite>regex</cite> matches, emit a
+token with the match text and type <cite>tokentype</cite> and push <cite>new_state</cite> on the state
+stack. If the new state is <code class="docutils literal"><span class="pre">'#pop'</span></code>, the topmost state is popped from the
+stack instead. To pop more than one state, use <code class="docutils literal"><span class="pre">'#pop:2'</span></code> and so on.
+<code class="docutils literal"><span class="pre">'#push'</span></code> is a synonym for pushing the current state on the stack.</p>
+<p>The following example shows the <cite>DiffLexer</cite> from the builtin lexers. Note that
+it contains some additional attributes <cite>name</cite>, <cite>aliases</cite> and <cite>filenames</cite> which
+aren’t required for a lexer. They are used by the builtin lexer lookup
+functions.</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">pygments.lexer</span> <span class="kn">import</span> <span class="n">RegexLexer</span>
+<span class="kn">from</span> <span class="nn">pygments.token</span> <span class="kn">import</span> <span class="o">*</span>
+
+<span class="k">class</span> <span class="nc">DiffLexer</span><span class="p">(</span><span class="n">RegexLexer</span><span class="p">):</span>
+ <span class="n">name</span> <span class="o">=</span> <span class="s">'Diff'</span>
+ <span class="n">aliases</span> <span class="o">=</span> <span class="p">[</span><span class="s">'diff'</span><span class="p">]</span>
+ <span class="n">filenames</span> <span class="o">=</span> <span class="p">[</span><span class="s">'*.diff'</span><span class="p">]</span>
+
+ <span class="n">tokens</span> <span class="o">=</span> <span class="p">{</span>
+ <span class="s">'root'</span><span class="p">:</span> <span class="p">[</span>
+ <span class="p">(</span><span class="s">r' .*\n'</span><span class="p">,</span> <span class="n">Text</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'\+.*\n'</span><span class="p">,</span> <span class="n">Generic</span><span class="o">.</span><span class="n">Inserted</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'-.*\n'</span><span class="p">,</span> <span class="n">Generic</span><span class="o">.</span><span class="n">Deleted</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'@.*\n'</span><span class="p">,</span> <span class="n">Generic</span><span class="o">.</span><span class="n">Subheading</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'Index.*\n'</span><span class="p">,</span> <span class="n">Generic</span><span class="o">.</span><span class="n">Heading</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'=.*\n'</span><span class="p">,</span> <span class="n">Generic</span><span class="o">.</span><span class="n">Heading</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'.*\n'</span><span class="p">,</span> <span class="n">Text</span><span class="p">),</span>
+ <span class="p">]</span>
+ <span class="p">}</span>
+</pre></div>
+</div>
+<p>As you can see this lexer only uses one state. When the lexer starts scanning
+the text, it first checks if the current character is a space. If this is true
+it scans everything until newline and returns the data as a <cite>Text</cite> token (which
+is the “no special highlighting” token).</p>
+<p>If this rule doesn’t match, it checks if the current char is a plus sign. And
+so on.</p>
+<p>If no rule matches at the current position, the current char is emitted as an
+<cite>Error</cite> token that indicates a lexing error, and the position is increased by
+one.</p>
+</div>
+<div class="section" id="adding-and-testing-a-new-lexer">
+<h2>Adding and testing a new lexer<a class="headerlink" href="#adding-and-testing-a-new-lexer" title="Permalink to this headline">¶</a></h2>
+<p>To make pygments aware of your new lexer, you have to perform the following
+steps:</p>
+<p>First, change to the current directory containing the pygments source code:</p>
+<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> <span class="nb">cd</span> .../pygments-main
+</pre></div>
+</div>
+<p>Select a matching module under <code class="docutils literal"><span class="pre">pygments/lexers</span></code>, or create a new module for
+your lexer class.</p>
+<p>Next, make sure the lexer is known from outside of the module. All modules in
+the <code class="docutils literal"><span class="pre">pygments.lexers</span></code> specify <code class="docutils literal"><span class="pre">__all__</span></code>. For example, <code class="docutils literal"><span class="pre">esoteric.py</span></code> sets:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">__all__</span> <span class="o">=</span> <span class="p">[</span><span class="s">'BrainfuckLexer'</span><span class="p">,</span> <span class="s">'BefungeLexer'</span><span class="p">,</span> <span class="o">...</span><span class="p">]</span>
+</pre></div>
+</div>
+<p>Simply add the name of your lexer class to this list.</p>
+<p>Finally the lexer can be made publicly known by rebuilding the lexer mapping:</p>
+<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> make mapfiles
+</pre></div>
+</div>
+<p>To test the new lexer, store an example file with the proper extension in
+<code class="docutils literal"><span class="pre">tests/examplefiles</span></code>. For example, to test your <code class="docutils literal"><span class="pre">DiffLexer</span></code>, add a
+<code class="docutils literal"><span class="pre">tests/examplefiles/example.diff</span></code> containing a sample diff output.</p>
+<p>Now you can use pygmentize to render your example to HTML:</p>
+<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> ./pygmentize -O full -f html -o /tmp/example.html tests/examplefiles/example.diff
+</pre></div>
+</div>
+<p>Note that this explicitely calls the <code class="docutils literal"><span class="pre">pygmentize</span></code> in the current directory
+by preceding it with <code class="docutils literal"><span class="pre">./</span></code>. This ensures your modifications are used.
+Otherwise a possibly already installed, unmodified version without your new
+lexer would have been called from the system search path (<code class="docutils literal"><span class="pre">$PATH</span></code>).</p>
+<p>To view the result, open <code class="docutils literal"><span class="pre">/tmp/example.html</span></code> in your browser.</p>
+<p>Once the example renders as expected, you should run the complete test suite:</p>
+<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> make <span class="nb">test</span>
+</pre></div>
+</div>
+<p>It also tests that your lexer fulfills the lexer API and certain invariants,
+such as that the concatenation of all token text is the same as the input text.</p>
+</div>
+<div class="section" id="regex-flags">
+<h2>Regex Flags<a class="headerlink" href="#regex-flags" title="Permalink to this headline">¶</a></h2>
+<p>You can either define regex flags locally in the regex (<code class="docutils literal"><span class="pre">r'(?x)foo</span> <span class="pre">bar'</span></code>) or
+globally by adding a <cite>flags</cite> attribute to your lexer class. If no attribute is
+defined, it defaults to <cite>re.MULTILINE</cite>. For more informations about regular
+expression flags see the page about <a class="reference external" href="http://docs.python.org/library/re.html#regular-expression-syntax">regular expressions</a> in the Python
+documentation.</p>
+</div>
+<div class="section" id="scanning-multiple-tokens-at-once">
+<h2>Scanning multiple tokens at once<a class="headerlink" href="#scanning-multiple-tokens-at-once" title="Permalink to this headline">¶</a></h2>
+<p>So far, the <cite>action</cite> element in the rule tuple of regex, action and state has
+been a single token type. Now we look at the first of several other possible
+values.</p>
+<p>Here is a more complex lexer that highlights INI files. INI files consist of
+sections, comments and <code class="docutils literal"><span class="pre">key</span> <span class="pre">=</span> <span class="pre">value</span></code> pairs:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">pygments.lexer</span> <span class="kn">import</span> <span class="n">RegexLexer</span><span class="p">,</span> <span class="n">bygroups</span>
+<span class="kn">from</span> <span class="nn">pygments.token</span> <span class="kn">import</span> <span class="o">*</span>
+
+<span class="k">class</span> <span class="nc">IniLexer</span><span class="p">(</span><span class="n">RegexLexer</span><span class="p">):</span>
+ <span class="n">name</span> <span class="o">=</span> <span class="s">'INI'</span>
+ <span class="n">aliases</span> <span class="o">=</span> <span class="p">[</span><span class="s">'ini'</span><span class="p">,</span> <span class="s">'cfg'</span><span class="p">]</span>
+ <span class="n">filenames</span> <span class="o">=</span> <span class="p">[</span><span class="s">'*.ini'</span><span class="p">,</span> <span class="s">'*.cfg'</span><span class="p">]</span>
+
+ <span class="n">tokens</span> <span class="o">=</span> <span class="p">{</span>
+ <span class="s">'root'</span><span class="p">:</span> <span class="p">[</span>
+ <span class="p">(</span><span class="s">r'\s+'</span><span class="p">,</span> <span class="n">Text</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r';.*?$'</span><span class="p">,</span> <span class="n">Comment</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'\[.*?\]$'</span><span class="p">,</span> <span class="n">Keyword</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'(.*?)(\s*)(=)(\s*)(.*?)$'</span><span class="p">,</span>
+ <span class="n">bygroups</span><span class="p">(</span><span class="n">Name</span><span class="o">.</span><span class="n">Attribute</span><span class="p">,</span> <span class="n">Text</span><span class="p">,</span> <span class="n">Operator</span><span class="p">,</span> <span class="n">Text</span><span class="p">,</span> <span class="n">String</span><span class="p">))</span>
+ <span class="p">]</span>
+ <span class="p">}</span>
+</pre></div>
+</div>
+<p>The lexer first looks for whitespace, comments and section names. Later it
+looks for a line that looks like a key, value pair, separated by an <code class="docutils literal"><span class="pre">'='</span></code>
+sign, and optional whitespace.</p>
+<p>The <cite>bygroups</cite> helper yields each capturing group in the regex with a different
+token type. First the <cite>Name.Attribute</cite> token, then a <cite>Text</cite> token for the
+optional whitespace, after that a <cite>Operator</cite> token for the equals sign. Then a
+<cite>Text</cite> token for the whitespace again. The rest of the line is returned as
+<cite>String</cite>.</p>
+<p>Note that for this to work, every part of the match must be inside a capturing
+group (a <code class="docutils literal"><span class="pre">(...)</span></code>), and there must not be any nested capturing groups. If you
+nevertheless need a group, use a non-capturing group defined using this syntax:
+<code class="docutils literal"><span class="pre">(?:some|words|here)</span></code> (note the <code class="docutils literal"><span class="pre">?:</span></code> after the beginning parenthesis).</p>
+<p>If you find yourself needing a capturing group inside the regex which shouldn’t
+be part of the output but is used in the regular expressions for backreferencing
+(eg: <code class="docutils literal"><span class="pre">r'(<(foo|bar)>)(.*?)(</\2>)'</span></code>), you can pass <cite>None</cite> to the bygroups
+function and that group will be skipped in the output.</p>
+</div>
+<div class="section" id="changing-states">
+<h2>Changing states<a class="headerlink" href="#changing-states" title="Permalink to this headline">¶</a></h2>
+<p>Many lexers need multiple states to work as expected. For example, some
+languages allow multiline comments to be nested. Since this is a recursive
+pattern it’s impossible to lex just using regular expressions.</p>
+<p>Here is a lexer that recognizes C++ style comments (multi-line with <code class="docutils literal"><span class="pre">/*</span> <span class="pre">*/</span></code>
+and single-line with <code class="docutils literal"><span class="pre">//</span></code> until end of line):</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">pygments.lexer</span> <span class="kn">import</span> <span class="n">RegexLexer</span>
+<span class="kn">from</span> <span class="nn">pygments.token</span> <span class="kn">import</span> <span class="o">*</span>
+
+<span class="k">class</span> <span class="nc">CppCommentLexer</span><span class="p">(</span><span class="n">RegexLexer</span><span class="p">):</span>
+ <span class="n">name</span> <span class="o">=</span> <span class="s">'Example Lexer with states'</span>
+
+ <span class="n">tokens</span> <span class="o">=</span> <span class="p">{</span>
+ <span class="s">'root'</span><span class="p">:</span> <span class="p">[</span>
+ <span class="p">(</span><span class="s">r'[^/]+'</span><span class="p">,</span> <span class="n">Text</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'/\*'</span><span class="p">,</span> <span class="n">Comment</span><span class="o">.</span><span class="n">Multiline</span><span class="p">,</span> <span class="s">'comment'</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'//.*?$'</span><span class="p">,</span> <span class="n">Comment</span><span class="o">.</span><span class="n">Singleline</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'/'</span><span class="p">,</span> <span class="n">Text</span><span class="p">)</span>
+ <span class="p">],</span>
+ <span class="s">'comment'</span><span class="p">:</span> <span class="p">[</span>
+ <span class="p">(</span><span class="s">r'[^*/]'</span><span class="p">,</span> <span class="n">Comment</span><span class="o">.</span><span class="n">Multiline</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'/\*'</span><span class="p">,</span> <span class="n">Comment</span><span class="o">.</span><span class="n">Multiline</span><span class="p">,</span> <span class="s">'#push'</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'\*/'</span><span class="p">,</span> <span class="n">Comment</span><span class="o">.</span><span class="n">Multiline</span><span class="p">,</span> <span class="s">'#pop'</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'[*/]'</span><span class="p">,</span> <span class="n">Comment</span><span class="o">.</span><span class="n">Multiline</span><span class="p">)</span>
+ <span class="p">]</span>
+ <span class="p">}</span>
+</pre></div>
+</div>
+<p>This lexer starts lexing in the <code class="docutils literal"><span class="pre">'root'</span></code> state. It tries to match as much as
+possible until it finds a slash (<code class="docutils literal"><span class="pre">'/'</span></code>). If the next character after the slash
+is an asterisk (<code class="docutils literal"><span class="pre">'*'</span></code>) the <cite>RegexLexer</cite> sends those two characters to the
+output stream marked as <cite>Comment.Multiline</cite> and continues lexing with the rules
+defined in the <code class="docutils literal"><span class="pre">'comment'</span></code> state.</p>
+<p>If there wasn’t an asterisk after the slash, the <cite>RegexLexer</cite> checks if it’s a
+singleline comment (i.e. followed by a second slash). If this also wasn’t the
+case it must be a single slash, which is not a comment starter (the separate
+regex for a single slash must also be given, else the slash would be marked as
+an error token).</p>
+<p>Inside the <code class="docutils literal"><span class="pre">'comment'</span></code> state, we do the same thing again. Scan until the
+lexer finds a star or slash. If it’s the opening of a multiline comment, push
+the <code class="docutils literal"><span class="pre">'comment'</span></code> state on the stack and continue scanning, again in the
+<code class="docutils literal"><span class="pre">'comment'</span></code> state. Else, check if it’s the end of the multiline comment. If
+yes, pop one state from the stack.</p>
+<p>Note: If you pop from an empty stack you’ll get an <cite>IndexError</cite>. (There is an
+easy way to prevent this from happening: don’t <code class="docutils literal"><span class="pre">'#pop'</span></code> in the root state).</p>
+<p>If the <cite>RegexLexer</cite> encounters a newline that is flagged as an error token, the
+stack is emptied and the lexer continues scanning in the <code class="docutils literal"><span class="pre">'root'</span></code> state. This
+can help producing error-tolerant highlighting for erroneous input, e.g. when a
+single-line string is not closed.</p>
+</div>
+<div class="section" id="advanced-state-tricks">
+<h2>Advanced state tricks<a class="headerlink" href="#advanced-state-tricks" title="Permalink to this headline">¶</a></h2>
+<p>There are a few more things you can do with states:</p>
+<ul>
+<li><p class="first">You can push multiple states onto the stack if you give a tuple instead of a
+simple string as the third item in a rule tuple. For example, if you want to
+match a comment containing a directive, something like:</p>
+<div class="highlight-text"><div class="highlight"><pre>/* <processing directive> rest of comment */
+</pre></div>
+</div>
+<p>you can use this rule:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">tokens</span> <span class="o">=</span> <span class="p">{</span>
+ <span class="s">'root'</span><span class="p">:</span> <span class="p">[</span>
+ <span class="p">(</span><span class="s">r'/\* <'</span><span class="p">,</span> <span class="n">Comment</span><span class="p">,</span> <span class="p">(</span><span class="s">'comment'</span><span class="p">,</span> <span class="s">'directive'</span><span class="p">)),</span>
+ <span class="o">...</span>
+ <span class="p">],</span>
+ <span class="s">'directive'</span><span class="p">:</span> <span class="p">[</span>
+ <span class="p">(</span><span class="s">r'[^>]*'</span><span class="p">,</span> <span class="n">Comment</span><span class="o">.</span><span class="n">Directive</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'>'</span><span class="p">,</span> <span class="n">Comment</span><span class="p">,</span> <span class="s">'#pop'</span><span class="p">),</span>
+ <span class="p">],</span>
+ <span class="s">'comment'</span><span class="p">:</span> <span class="p">[</span>
+ <span class="p">(</span><span class="s">r'[^*]+'</span><span class="p">,</span> <span class="n">Comment</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'\*/'</span><span class="p">,</span> <span class="n">Comment</span><span class="p">,</span> <span class="s">'#pop'</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'\*'</span><span class="p">,</span> <span class="n">Comment</span><span class="p">),</span>
+ <span class="p">]</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>When this encounters the above sample, first <code class="docutils literal"><span class="pre">'comment'</span></code> and <code class="docutils literal"><span class="pre">'directive'</span></code>
+are pushed onto the stack, then the lexer continues in the directive state
+until it finds the closing <code class="docutils literal"><span class="pre">></span></code>, then it continues in the comment state until
+the closing <code class="docutils literal"><span class="pre">*/</span></code>. Then, both states are popped from the stack again and
+lexing continues in the root state.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.9: </span>The tuple can contain the special <code class="docutils literal"><span class="pre">'#push'</span></code> and <code class="docutils literal"><span class="pre">'#pop'</span></code> (but not
+<code class="docutils literal"><span class="pre">'#pop:n'</span></code>) directives.</p>
+</div>
+</li>
+<li><p class="first">You can include the rules of a state in the definition of another. This is
+done by using <cite>include</cite> from <cite>pygments.lexer</cite>:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">pygments.lexer</span> <span class="kn">import</span> <span class="n">RegexLexer</span><span class="p">,</span> <span class="n">bygroups</span><span class="p">,</span> <span class="n">include</span>
+<span class="kn">from</span> <span class="nn">pygments.token</span> <span class="kn">import</span> <span class="o">*</span>
+
+<span class="k">class</span> <span class="nc">ExampleLexer</span><span class="p">(</span><span class="n">RegexLexer</span><span class="p">):</span>
+ <span class="n">tokens</span> <span class="o">=</span> <span class="p">{</span>
+ <span class="s">'comments'</span><span class="p">:</span> <span class="p">[</span>
+ <span class="p">(</span><span class="s">r'/\*.*?\*/'</span><span class="p">,</span> <span class="n">Comment</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'//.*?\n'</span><span class="p">,</span> <span class="n">Comment</span><span class="p">),</span>
+ <span class="p">],</span>
+ <span class="s">'root'</span><span class="p">:</span> <span class="p">[</span>
+ <span class="n">include</span><span class="p">(</span><span class="s">'comments'</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'(function )(\w+)( {)'</span><span class="p">,</span>
+ <span class="n">bygroups</span><span class="p">(</span><span class="n">Keyword</span><span class="p">,</span> <span class="n">Name</span><span class="p">,</span> <span class="n">Keyword</span><span class="p">),</span> <span class="s">'function'</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'.'</span><span class="p">,</span> <span class="n">Text</span><span class="p">),</span>
+ <span class="p">],</span>
+ <span class="s">'function'</span><span class="p">:</span> <span class="p">[</span>
+ <span class="p">(</span><span class="s">r'[^}/]+'</span><span class="p">,</span> <span class="n">Text</span><span class="p">),</span>
+ <span class="n">include</span><span class="p">(</span><span class="s">'comments'</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'/'</span><span class="p">,</span> <span class="n">Text</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'\}'</span><span class="p">,</span> <span class="n">Keyword</span><span class="p">,</span> <span class="s">'#pop'</span><span class="p">),</span>
+ <span class="p">]</span>
+ <span class="p">}</span>
+</pre></div>
+</div>
+<p>This is a hypothetical lexer for a language that consist of functions and
+comments. Because comments can occur at toplevel and in functions, we need
+rules for comments in both states. As you can see, the <cite>include</cite> helper saves
+repeating rules that occur more than once (in this example, the state
+<code class="docutils literal"><span class="pre">'comment'</span></code> will never be entered by the lexer, as it’s only there to be
+included in <code class="docutils literal"><span class="pre">'root'</span></code> and <code class="docutils literal"><span class="pre">'function'</span></code>).</p>
+</li>
+<li><p class="first">Sometimes, you may want to “combine” a state from existing ones. This is
+possible with the <cite>combined</cite> helper from <cite>pygments.lexer</cite>.</p>
+<p>If you, instead of a new state, write <code class="docutils literal"><span class="pre">combined('state1',</span> <span class="pre">'state2')</span></code> as the
+third item of a rule tuple, a new anonymous state will be formed from state1
+and state2 and if the rule matches, the lexer will enter this state.</p>
+<p>This is not used very often, but can be helpful in some cases, such as the
+<cite>PythonLexer</cite>‘s string literal processing.</p>
+</li>
+<li><p class="first">If you want your lexer to start lexing in a different state you can modify the
+stack by overloading the <cite>get_tokens_unprocessed()</cite> method:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">pygments.lexer</span> <span class="kn">import</span> <span class="n">RegexLexer</span>
+
+<span class="k">class</span> <span class="nc">ExampleLexer</span><span class="p">(</span><span class="n">RegexLexer</span><span class="p">):</span>
+ <span class="n">tokens</span> <span class="o">=</span> <span class="p">{</span><span class="o">...</span><span class="p">}</span>
+
+ <span class="k">def</span> <span class="nf">get_tokens_unprocessed</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">text</span><span class="p">):</span>
+ <span class="n">stack</span> <span class="o">=</span> <span class="p">[</span><span class="s">'root'</span><span class="p">,</span> <span class="s">'otherstate'</span><span class="p">]</span>
+ <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">RegexLexer</span><span class="o">.</span><span class="n">get_tokens_unprocessed</span><span class="p">(</span><span class="n">text</span><span class="p">,</span> <span class="n">stack</span><span class="p">):</span>
+ <span class="k">yield</span> <span class="n">item</span>
+</pre></div>
+</div>
+<p>Some lexers like the <cite>PhpLexer</cite> use this to make the leading <code class="docutils literal"><span class="pre"><?php</span></code>
+preprocessor comments optional. Note that you can crash the lexer easily by
+putting values into the stack that don’t exist in the token map. Also
+removing <code class="docutils literal"><span class="pre">'root'</span></code> from the stack can result in strange errors!</p>
+</li>
+<li><p class="first">In some lexers, a state should be popped if anything is encountered that isn’t
+matched by a rule in the state. You could use an empty regex at the end of
+the state list, but Pygments provides a more obvious way of spelling that:
+<code class="docutils literal"><span class="pre">default('#pop')</span></code> is equivalent to <code class="docutils literal"><span class="pre">('',</span> <span class="pre">Text,</span> <span class="pre">'#pop')</span></code>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</li>
+</ul>
+</div>
+<div class="section" id="subclassing-lexers-derived-from-regexlexer">
+<h2>Subclassing lexers derived from RegexLexer<a class="headerlink" href="#subclassing-lexers-derived-from-regexlexer" title="Permalink to this headline">¶</a></h2>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+<p>Sometimes multiple languages are very similar, but should still be lexed by
+different lexer classes.</p>
+<p>When subclassing a lexer derived from RegexLexer, the <code class="docutils literal"><span class="pre">tokens</span></code> dictionaries
+defined in the parent and child class are merged. For example:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">pygments.lexer</span> <span class="kn">import</span> <span class="n">RegexLexer</span><span class="p">,</span> <span class="n">inherit</span>
+<span class="kn">from</span> <span class="nn">pygments.token</span> <span class="kn">import</span> <span class="o">*</span>
+
+<span class="k">class</span> <span class="nc">BaseLexer</span><span class="p">(</span><span class="n">RegexLexer</span><span class="p">):</span>
+ <span class="n">tokens</span> <span class="o">=</span> <span class="p">{</span>
+ <span class="s">'root'</span><span class="p">:</span> <span class="p">[</span>
+ <span class="p">(</span><span class="s">'[a-z]+'</span><span class="p">,</span> <span class="n">Name</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'/\*'</span><span class="p">,</span> <span class="n">Comment</span><span class="p">,</span> <span class="s">'comment'</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">'"'</span><span class="p">,</span> <span class="n">String</span><span class="p">,</span> <span class="s">'string'</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">'\s+'</span><span class="p">,</span> <span class="n">Text</span><span class="p">),</span>
+ <span class="p">],</span>
+ <span class="s">'string'</span><span class="p">:</span> <span class="p">[</span>
+ <span class="p">(</span><span class="s">'[^"]+'</span><span class="p">,</span> <span class="n">String</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">'"'</span><span class="p">,</span> <span class="n">String</span><span class="p">,</span> <span class="s">'#pop'</span><span class="p">),</span>
+ <span class="p">],</span>
+ <span class="s">'comment'</span><span class="p">:</span> <span class="p">[</span>
+ <span class="o">...</span>
+ <span class="p">],</span>
+ <span class="p">}</span>
+
+<span class="k">class</span> <span class="nc">DerivedLexer</span><span class="p">(</span><span class="n">BaseLexer</span><span class="p">):</span>
+ <span class="n">tokens</span> <span class="o">=</span> <span class="p">{</span>
+ <span class="s">'root'</span><span class="p">:</span> <span class="p">[</span>
+ <span class="p">(</span><span class="s">'[0-9]+'</span><span class="p">,</span> <span class="n">Number</span><span class="p">),</span>
+ <span class="n">inherit</span><span class="p">,</span>
+ <span class="p">],</span>
+ <span class="s">'string'</span><span class="p">:</span> <span class="p">[</span>
+ <span class="p">(</span><span class="s">r'[^"</span><span class="se">\\</span><span class="s">]+'</span><span class="p">,</span> <span class="n">String</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'</span><span class="se">\\</span><span class="s">.'</span><span class="p">,</span> <span class="n">String</span><span class="o">.</span><span class="n">Escape</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">'"'</span><span class="p">,</span> <span class="n">String</span><span class="p">,</span> <span class="s">'#pop'</span><span class="p">),</span>
+ <span class="p">],</span>
+ <span class="p">}</span>
+</pre></div>
+</div>
+<p>The <cite>BaseLexer</cite> defines two states, lexing names and strings. The
+<cite>DerivedLexer</cite> defines its own tokens dictionary, which extends the definitions
+of the base lexer:</p>
+<ul class="simple">
+<li>The “root” state has an additional rule and then the special object <cite>inherit</cite>,
+which tells Pygments to insert the token definitions of the parent class at
+that point.</li>
+<li>The “string” state is replaced entirely, since there is not <cite>inherit</cite> rule.</li>
+<li>The “comment” state is inherited entirely.</li>
+</ul>
+</div>
+<div class="section" id="using-multiple-lexers">
+<h2>Using multiple lexers<a class="headerlink" href="#using-multiple-lexers" title="Permalink to this headline">¶</a></h2>
+<p>Using multiple lexers for the same input can be tricky. One of the easiest
+combination techniques is shown here: You can replace the action entry in a rule
+tuple with a lexer class. The matched text will then be lexed with that lexer,
+and the resulting tokens will be yielded.</p>
+<p>For example, look at this stripped-down HTML lexer:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">pygments.lexer</span> <span class="kn">import</span> <span class="n">RegexLexer</span><span class="p">,</span> <span class="n">bygroups</span><span class="p">,</span> <span class="n">using</span>
+<span class="kn">from</span> <span class="nn">pygments.token</span> <span class="kn">import</span> <span class="o">*</span>
+<span class="kn">from</span> <span class="nn">pygments.lexers.javascript</span> <span class="kn">import</span> <span class="n">JavascriptLexer</span>
+
+<span class="k">class</span> <span class="nc">HtmlLexer</span><span class="p">(</span><span class="n">RegexLexer</span><span class="p">):</span>
+ <span class="n">name</span> <span class="o">=</span> <span class="s">'HTML'</span>
+ <span class="n">aliases</span> <span class="o">=</span> <span class="p">[</span><span class="s">'html'</span><span class="p">]</span>
+ <span class="n">filenames</span> <span class="o">=</span> <span class="p">[</span><span class="s">'*.html'</span><span class="p">,</span> <span class="s">'*.htm'</span><span class="p">]</span>
+
+ <span class="n">flags</span> <span class="o">=</span> <span class="n">re</span><span class="o">.</span><span class="n">IGNORECASE</span> <span class="o">|</span> <span class="n">re</span><span class="o">.</span><span class="n">DOTALL</span>
+ <span class="n">tokens</span> <span class="o">=</span> <span class="p">{</span>
+ <span class="s">'root'</span><span class="p">:</span> <span class="p">[</span>
+ <span class="p">(</span><span class="s">'[^<&]+'</span><span class="p">,</span> <span class="n">Text</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">'&.*?;'</span><span class="p">,</span> <span class="n">Name</span><span class="o">.</span><span class="n">Entity</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'<\s*script\s*'</span><span class="p">,</span> <span class="n">Name</span><span class="o">.</span><span class="n">Tag</span><span class="p">,</span> <span class="p">(</span><span class="s">'script-content'</span><span class="p">,</span> <span class="s">'tag'</span><span class="p">)),</span>
+ <span class="p">(</span><span class="s">r'<\s*[a-zA-Z0-9:]+'</span><span class="p">,</span> <span class="n">Name</span><span class="o">.</span><span class="n">Tag</span><span class="p">,</span> <span class="s">'tag'</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'<\s*/\s*[a-zA-Z0-9:]+\s*>'</span><span class="p">,</span> <span class="n">Name</span><span class="o">.</span><span class="n">Tag</span><span class="p">),</span>
+ <span class="p">],</span>
+ <span class="s">'script-content'</span><span class="p">:</span> <span class="p">[</span>
+ <span class="p">(</span><span class="s">r'(.+?)(<\s*/\s*script\s*>)'</span><span class="p">,</span>
+ <span class="n">bygroups</span><span class="p">(</span><span class="n">using</span><span class="p">(</span><span class="n">JavascriptLexer</span><span class="p">),</span> <span class="n">Name</span><span class="o">.</span><span class="n">Tag</span><span class="p">),</span>
+ <span class="s">'#pop'</span><span class="p">),</span>
+ <span class="p">]</span>
+ <span class="p">}</span>
+</pre></div>
+</div>
+<p>Here the content of a <code class="docutils literal"><span class="pre"><script></span></code> tag is passed to a newly created instance of
+a <cite>JavascriptLexer</cite> and not processed by the <cite>HtmlLexer</cite>. This is done using
+the <cite>using</cite> helper that takes the other lexer class as its parameter.</p>
+<p>Note the combination of <cite>bygroups</cite> and <cite>using</cite>. This makes sure that the
+content up to the <code class="docutils literal"><span class="pre"></script></span></code> end tag is processed by the <cite>JavascriptLexer</cite>,
+while the end tag is yielded as a normal token with the <cite>Name.Tag</cite> type.</p>
+<p>Also note the <code class="docutils literal"><span class="pre">(r'<\s*script\s*',</span> <span class="pre">Name.Tag,</span> <span class="pre">('script-content',</span> <span class="pre">'tag'))</span></code> rule.
+Here, two states are pushed onto the state stack, <code class="docutils literal"><span class="pre">'script-content'</span></code> and
+<code class="docutils literal"><span class="pre">'tag'</span></code>. That means that first <code class="docutils literal"><span class="pre">'tag'</span></code> is processed, which will lex
+attributes and the closing <code class="docutils literal"><span class="pre">></span></code>, then the <code class="docutils literal"><span class="pre">'tag'</span></code> state is popped and the
+next state on top of the stack will be <code class="docutils literal"><span class="pre">'script-content'</span></code>.</p>
+<p>Since you cannot refer to the class currently being defined, use <cite>this</cite>
+(imported from <cite>pygments.lexer</cite>) to refer to the current lexer class, i.e.
+<code class="docutils literal"><span class="pre">using(this)</span></code>. This construct may seem unnecessary, but this is often the
+most obvious way of lexing arbitrary syntax between fixed delimiters without
+introducing deeply nested states.</p>
+<p>The <cite>using()</cite> helper has a special keyword argument, <cite>state</cite>, which works as
+follows: if given, the lexer to use initially is not in the <code class="docutils literal"><span class="pre">"root"</span></code> state,
+but in the state given by this argument. This does not work with advanced
+<cite>RegexLexer</cite> subclasses such as <cite>ExtendedRegexLexer</cite> (see below).</p>
+<p>Any other keywords arguments passed to <cite>using()</cite> are added to the keyword
+arguments used to create the lexer.</p>
+</div>
+<div class="section" id="delegating-lexer">
+<h2>Delegating Lexer<a class="headerlink" href="#delegating-lexer" title="Permalink to this headline">¶</a></h2>
+<p>Another approach for nested lexers is the <cite>DelegatingLexer</cite> which is for example
+used for the template engine lexers. It takes two lexers as arguments on
+initialisation: a <cite>root_lexer</cite> and a <cite>language_lexer</cite>.</p>
+<p>The input is processed as follows: First, the whole text is lexed with the
+<cite>language_lexer</cite>. All tokens yielded with the special type of <code class="docutils literal"><span class="pre">Other</span></code> are
+then concatenated and given to the <cite>root_lexer</cite>. The language tokens of the
+<cite>language_lexer</cite> are then inserted into the <cite>root_lexer</cite>‘s token stream at the
+appropriate positions.</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">pygments.lexer</span> <span class="kn">import</span> <span class="n">DelegatingLexer</span>
+<span class="kn">from</span> <span class="nn">pygments.lexers.web</span> <span class="kn">import</span> <span class="n">HtmlLexer</span><span class="p">,</span> <span class="n">PhpLexer</span>
+
+<span class="k">class</span> <span class="nc">HtmlPhpLexer</span><span class="p">(</span><span class="n">DelegatingLexer</span><span class="p">):</span>
+ <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">options</span><span class="p">):</span>
+ <span class="nb">super</span><span class="p">(</span><span class="n">HtmlPhpLexer</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span><span class="n">HtmlLexer</span><span class="p">,</span> <span class="n">PhpLexer</span><span class="p">,</span> <span class="o">**</span><span class="n">options</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>This procedure ensures that e.g. HTML with template tags in it is highlighted
+correctly even if the template tags are put into HTML tags or attributes.</p>
+<p>If you want to change the needle token <code class="docutils literal"><span class="pre">Other</span></code> to something else, you can give
+the lexer another token type as the third parameter:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">DelegatingLexer</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span><span class="n">MyLexer</span><span class="p">,</span> <span class="n">OtherLexer</span><span class="p">,</span> <span class="n">Text</span><span class="p">,</span> <span class="o">**</span><span class="n">options</span><span class="p">)</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="callbacks">
+<h2>Callbacks<a class="headerlink" href="#callbacks" title="Permalink to this headline">¶</a></h2>
+<p>Sometimes the grammar of a language is so complex that a lexer would be unable
+to process it just by using regular expressions and stacks.</p>
+<p>For this, the <cite>RegexLexer</cite> allows callbacks to be given in rule tuples, instead
+of token types (<cite>bygroups</cite> and <cite>using</cite> are nothing else but preimplemented
+callbacks). The callback must be a function taking two arguments:</p>
+<ul class="simple">
+<li>the lexer itself</li>
+<li>the match object for the last matched rule</li>
+</ul>
+<p>The callback must then return an iterable of (or simply yield) <code class="docutils literal"><span class="pre">(index,</span>
+<span class="pre">tokentype,</span> <span class="pre">value)</span></code> tuples, which are then just passed through by
+<cite>get_tokens_unprocessed()</cite>. The <code class="docutils literal"><span class="pre">index</span></code> here is the position of the token in
+the input string, <code class="docutils literal"><span class="pre">tokentype</span></code> is the normal token type (like <cite>Name.Builtin</cite>),
+and <code class="docutils literal"><span class="pre">value</span></code> the associated part of the input string.</p>
+<p>You can see an example here:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">pygments.lexer</span> <span class="kn">import</span> <span class="n">RegexLexer</span>
+<span class="kn">from</span> <span class="nn">pygments.token</span> <span class="kn">import</span> <span class="n">Generic</span>
+
+<span class="k">class</span> <span class="nc">HypotheticLexer</span><span class="p">(</span><span class="n">RegexLexer</span><span class="p">):</span>
+
+ <span class="k">def</span> <span class="nf">headline_callback</span><span class="p">(</span><span class="n">lexer</span><span class="p">,</span> <span class="n">match</span><span class="p">):</span>
+ <span class="n">equal_signs</span> <span class="o">=</span> <span class="n">match</span><span class="o">.</span><span class="n">group</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
+ <span class="n">text</span> <span class="o">=</span> <span class="n">match</span><span class="o">.</span><span class="n">group</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
+ <span class="k">yield</span> <span class="n">match</span><span class="o">.</span><span class="n">start</span><span class="p">(),</span> <span class="n">Generic</span><span class="o">.</span><span class="n">Headline</span><span class="p">,</span> <span class="n">equal_signs</span> <span class="o">+</span> <span class="n">text</span> <span class="o">+</span> <span class="n">equal_signs</span>
+
+ <span class="n">tokens</span> <span class="o">=</span> <span class="p">{</span>
+ <span class="s">'root'</span><span class="p">:</span> <span class="p">[</span>
+ <span class="p">(</span><span class="s">r'(=+)(.*?)(\1)'</span><span class="p">,</span> <span class="n">headline_callback</span><span class="p">)</span>
+ <span class="p">]</span>
+ <span class="p">}</span>
+</pre></div>
+</div>
+<p>If the regex for the <cite>headline_callback</cite> matches, the function is called with
+the match object. Note that after the callback is done, processing continues
+normally, that is, after the end of the previous match. The callback has no
+possibility to influence the position.</p>
+<p>There are not really any simple examples for lexer callbacks, but you can see
+them in action e.g. in the <cite>SMLLexer</cite> class in <a class="reference external" href="http://bitbucket.org/birkenfeld/pygments-main/src/tip/pygments/lexers/ml.py">ml.py</a>.</p>
+</div>
+<div class="section" id="the-extendedregexlexer-class">
+<h2>The ExtendedRegexLexer class<a class="headerlink" href="#the-extendedregexlexer-class" title="Permalink to this headline">¶</a></h2>
+<p>The <cite>RegexLexer</cite>, even with callbacks, unfortunately isn’t powerful enough for
+the funky syntax rules of languages such as Ruby.</p>
+<p>But fear not; even then you don’t have to abandon the regular expression
+approach: Pygments has a subclass of <cite>RegexLexer</cite>, the <cite>ExtendedRegexLexer</cite>.
+All features known from RegexLexers are available here too, and the tokens are
+specified in exactly the same way, <em>except</em> for one detail:</p>
+<p>The <cite>get_tokens_unprocessed()</cite> method holds its internal state data not as local
+variables, but in an instance of the <cite>pygments.lexer.LexerContext</cite> class, and
+that instance is passed to callbacks as a third argument. This means that you
+can modify the lexer state in callbacks.</p>
+<p>The <cite>LexerContext</cite> class has the following members:</p>
+<ul class="simple">
+<li><cite>text</cite> – the input text</li>
+<li><cite>pos</cite> – the current starting position that is used for matching regexes</li>
+<li><cite>stack</cite> – a list containing the state stack</li>
+<li><cite>end</cite> – the maximum position to which regexes are matched, this defaults to
+the length of <cite>text</cite></li>
+</ul>
+<p>Additionally, the <cite>get_tokens_unprocessed()</cite> method can be given a
+<cite>LexerContext</cite> instead of a string and will then process this context instead of
+creating a new one for the string argument.</p>
+<p>Note that because you can set the current position to anything in the callback,
+it won’t be automatically be set by the caller after the callback is finished.
+For example, this is how the hypothetical lexer above would be written with the
+<cite>ExtendedRegexLexer</cite>:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">pygments.lexer</span> <span class="kn">import</span> <span class="n">ExtendedRegexLexer</span>
+<span class="kn">from</span> <span class="nn">pygments.token</span> <span class="kn">import</span> <span class="n">Generic</span>
+
+<span class="k">class</span> <span class="nc">ExHypotheticLexer</span><span class="p">(</span><span class="n">ExtendedRegexLexer</span><span class="p">):</span>
+
+ <span class="k">def</span> <span class="nf">headline_callback</span><span class="p">(</span><span class="n">lexer</span><span class="p">,</span> <span class="n">match</span><span class="p">,</span> <span class="n">ctx</span><span class="p">):</span>
+ <span class="n">equal_signs</span> <span class="o">=</span> <span class="n">match</span><span class="o">.</span><span class="n">group</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
+ <span class="n">text</span> <span class="o">=</span> <span class="n">match</span><span class="o">.</span><span class="n">group</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
+ <span class="k">yield</span> <span class="n">match</span><span class="o">.</span><span class="n">start</span><span class="p">(),</span> <span class="n">Generic</span><span class="o">.</span><span class="n">Headline</span><span class="p">,</span> <span class="n">equal_signs</span> <span class="o">+</span> <span class="n">text</span> <span class="o">+</span> <span class="n">equal_signs</span>
+ <span class="n">ctx</span><span class="o">.</span><span class="n">pos</span> <span class="o">=</span> <span class="n">match</span><span class="o">.</span><span class="n">end</span><span class="p">()</span>
+
+ <span class="n">tokens</span> <span class="o">=</span> <span class="p">{</span>
+ <span class="s">'root'</span><span class="p">:</span> <span class="p">[</span>
+ <span class="p">(</span><span class="s">r'(=+)(.*?)(\1)'</span><span class="p">,</span> <span class="n">headline_callback</span><span class="p">)</span>
+ <span class="p">]</span>
+ <span class="p">}</span>
+</pre></div>
+</div>
+<p>This might sound confusing (and it can really be). But it is needed, and for an
+example look at the Ruby lexer in <a class="reference external" href="https://bitbucket.org/birkenfeld/pygments-main/src/tip/pygments/lexers/ruby.py">ruby.py</a>.</p>
+</div>
+<div class="section" id="handling-lists-of-keywords">
+<h2>Handling Lists of Keywords<a class="headerlink" href="#handling-lists-of-keywords" title="Permalink to this headline">¶</a></h2>
+<p>For a relatively short list (hundreds) you can construct an optimized regular
+expression directly using <code class="docutils literal"><span class="pre">words()</span></code> (longer lists, see next section). This
+function handles a few things for you automatically, including escaping
+metacharacters and Python’s first-match rather than longest-match in
+alternations. Feel free to put the lists themselves in
+<code class="docutils literal"><span class="pre">pygments/lexers/_$lang_builtins.py</span></code> (see examples there), and generated by
+code if possible.</p>
+<p>An example of using <code class="docutils literal"><span class="pre">words()</span></code> is something like:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">pygments.lexer</span> <span class="kn">import</span> <span class="n">RegexLexer</span><span class="p">,</span> <span class="n">words</span><span class="p">,</span> <span class="n">Name</span>
+
+<span class="k">class</span> <span class="nc">MyLexer</span><span class="p">(</span><span class="n">RegexLexer</span><span class="p">):</span>
+
+ <span class="n">tokens</span> <span class="o">=</span> <span class="p">{</span>
+ <span class="s">'root'</span><span class="p">:</span> <span class="p">[</span>
+ <span class="p">(</span><span class="n">words</span><span class="p">((</span><span class="s">'else'</span><span class="p">,</span> <span class="s">'elseif'</span><span class="p">),</span> <span class="n">suffix</span><span class="o">=</span><span class="s">r'\b'</span><span class="p">),</span> <span class="n">Name</span><span class="o">.</span><span class="n">Builtin</span><span class="p">),</span>
+ <span class="p">(</span><span class="s">r'\w+'</span><span class="p">,</span> <span class="n">Name</span><span class="p">),</span>
+ <span class="p">],</span>
+ <span class="p">}</span>
+</pre></div>
+</div>
+<p>As you can see, you can add <code class="docutils literal"><span class="pre">prefix</span></code> and <code class="docutils literal"><span class="pre">suffix</span></code> parts to the constructed
+regex.</p>
+</div>
+<div class="section" id="modifying-token-streams">
+<h2>Modifying Token Streams<a class="headerlink" href="#modifying-token-streams" title="Permalink to this headline">¶</a></h2>
+<p>Some languages ship a lot of builtin functions (for example PHP). The total
+amount of those functions differs from system to system because not everybody
+has every extension installed. In the case of PHP there are over 3000 builtin
+functions. That’s an incredibly huge amount of functions, much more than you
+want to put into a regular expression.</p>
+<p>But because only <cite>Name</cite> tokens can be function names this is solvable by
+overriding the <code class="docutils literal"><span class="pre">get_tokens_unprocessed()</span></code> method. The following lexer
+subclasses the <cite>PythonLexer</cite> so that it highlights some additional names as
+pseudo keywords:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">pygments.lexers.python</span> <span class="kn">import</span> <span class="n">PythonLexer</span>
+<span class="kn">from</span> <span class="nn">pygments.token</span> <span class="kn">import</span> <span class="n">Name</span><span class="p">,</span> <span class="n">Keyword</span>
+
+<span class="k">class</span> <span class="nc">MyPythonLexer</span><span class="p">(</span><span class="n">PythonLexer</span><span class="p">):</span>
+ <span class="n">EXTRA_KEYWORDS</span> <span class="o">=</span> <span class="nb">set</span><span class="p">((</span><span class="s">'foo'</span><span class="p">,</span> <span class="s">'bar'</span><span class="p">,</span> <span class="s">'foobar'</span><span class="p">,</span> <span class="s">'barfoo'</span><span class="p">,</span> <span class="s">'spam'</span><span class="p">,</span> <span class="s">'eggs'</span><span class="p">))</span>
+
+ <span class="k">def</span> <span class="nf">get_tokens_unprocessed</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">text</span><span class="p">):</span>
+ <span class="k">for</span> <span class="n">index</span><span class="p">,</span> <span class="n">token</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">PythonLexer</span><span class="o">.</span><span class="n">get_tokens_unprocessed</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">text</span><span class="p">):</span>
+ <span class="k">if</span> <span class="n">token</span> <span class="ow">is</span> <span class="n">Name</span> <span class="ow">and</span> <span class="n">value</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">EXTRA_KEYWORDS</span><span class="p">:</span>
+ <span class="k">yield</span> <span class="n">index</span><span class="p">,</span> <span class="n">Keyword</span><span class="o">.</span><span class="n">Pseudo</span><span class="p">,</span> <span class="n">value</span>
+ <span class="k">else</span><span class="p">:</span>
+ <span class="k">yield</span> <span class="n">index</span><span class="p">,</span> <span class="n">token</span><span class="p">,</span> <span class="n">value</span>
+</pre></div>
+</div>
+<p>The <cite>PhpLexer</cite> and <cite>LuaLexer</cite> use this method to resolve builtin functions.</p>
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ <h3><a href="../index.html">Table Of Contents</a></h3>
+ <ul>
+<li><a class="reference internal" href="#">Write your own lexer</a><ul>
+<li><a class="reference internal" href="#regexlexer">RegexLexer</a></li>
+<li><a class="reference internal" href="#adding-and-testing-a-new-lexer">Adding and testing a new lexer</a></li>
+<li><a class="reference internal" href="#regex-flags">Regex Flags</a></li>
+<li><a class="reference internal" href="#scanning-multiple-tokens-at-once">Scanning multiple tokens at once</a></li>
+<li><a class="reference internal" href="#changing-states">Changing states</a></li>
+<li><a class="reference internal" href="#advanced-state-tricks">Advanced state tricks</a></li>
+<li><a class="reference internal" href="#subclassing-lexers-derived-from-regexlexer">Subclassing lexers derived from RegexLexer</a></li>
+<li><a class="reference internal" href="#using-multiple-lexers">Using multiple lexers</a></li>
+<li><a class="reference internal" href="#delegating-lexer">Delegating Lexer</a></li>
+<li><a class="reference internal" href="#callbacks">Callbacks</a></li>
+<li><a class="reference internal" href="#the-extendedregexlexer-class">The ExtendedRegexLexer class</a></li>
+<li><a class="reference internal" href="#handling-lists-of-keywords">Handling Lists of Keywords</a></li>
+<li><a class="reference internal" href="#modifying-token-streams">Modifying Token Streams</a></li>
+</ul>
+</li>
+</ul>
+
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="api.html"
+ title="previous chapter">The full Pygments API</a></p>
+ <h4>Next topic</h4>
+ <p class="topless"><a href="formatterdevelopment.html"
+ title="next chapter">Write your own formatter</a></p>
+ <div role="note" aria-label="source link">
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="../_sources/docs/lexerdevelopment.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+ </div>
+<strong>« <a href="index.html">Back to docs index</a></strong>
+
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="../search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="formatterdevelopment.html" title="Write your own formatter"
+ >next</a> |</li>
+ <li class="right" >
+ <a href="api.html" title="The full Pygments API"
+ >previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" >Pygments documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Available lexers — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '../',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+ <link rel="shortcut icon" href="../_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="../index.html" />
+ <link rel="up" title="Pygments documentation" href="index.html" />
+ <link rel="next" title="Filters" href="filters.html" />
+ <link rel="prev" title="Command Line Interface" href="cmdline.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="filters.html" title="Filters"
+ accesskey="N">next</a> |</li>
+ <li class="right" >
+ <a href="cmdline.html" title="Command Line Interface"
+ accesskey="P">previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" accesskey="U">Pygments documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <div class="section" id="available-lexers">
+<h1>Available lexers<a class="headerlink" href="#available-lexers" title="Permalink to this headline">¶</a></h1>
+<p>This page lists all available builtin lexers and the options they take.</p>
+<p>Currently, <strong>all lexers</strong> support these options:</p>
+<dl class="docutils">
+<dt><cite>stripnl</cite></dt>
+<dd>Strip leading and trailing newlines from the input (default: <code class="docutils literal"><span class="pre">True</span></code>)</dd>
+<dt><cite>stripall</cite></dt>
+<dd>Strip all leading and trailing whitespace from the input (default:
+<code class="docutils literal"><span class="pre">False</span></code>).</dd>
+<dt><cite>ensurenl</cite></dt>
+<dd><p class="first">Make sure that the input ends with a newline (default: <code class="docutils literal"><span class="pre">True</span></code>). This
+is required for some lexers that consume input linewise.</p>
+<div class="last versionadded">
+<p><span class="versionmodified">New in version 1.3.</span></p>
+</div>
+</dd>
+<dt><cite>tabsize</cite></dt>
+<dd>If given and greater than 0, expand tabs in the input (default: <code class="docutils literal"><span class="pre">0</span></code>).</dd>
+<dt><cite>encoding</cite></dt>
+<dd><p class="first">If given, must be an encoding name (such as <code class="docutils literal"><span class="pre">"utf-8"</span></code>). This encoding
+will be used to convert the input string to Unicode (if it is not already
+a Unicode string). The default is <code class="docutils literal"><span class="pre">"guess"</span></code>.</p>
+<p>If this option is set to <code class="docutils literal"><span class="pre">"guess"</span></code>, a simple UTF-8 vs. Latin-1
+detection is used, if it is set to <code class="docutils literal"><span class="pre">"chardet"</span></code>, the
+<a class="reference external" href="http://chardet.feedparser.org/">chardet library</a> is used to
+guess the encoding of the input.</p>
+<div class="last versionadded">
+<p><span class="versionmodified">New in version 0.6.</span></p>
+</div>
+</dd>
+</dl>
+<p>The “Short Names” field lists the identifiers that can be used with the
+<cite>get_lexer_by_name()</cite> function.</p>
+<p>These lexers are builtin and can be imported from <cite>pygments.lexers</cite>:</p>
+<span class="target" id="module-pygments.lexers.agile"></span><div class="section" id="lexers-for-agile-languages">
+<h2>Lexers for agile languages<a class="headerlink" href="#lexers-for-agile-languages" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="pygments.lexers.agile.CrocLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.agile.</code><code class="descname">CrocLexer</code><a class="headerlink" href="#pygments.lexers.agile.CrocLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">croc</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.croc</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-crocsrc</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://jfbillingsley.com/croc">Croc</a> source.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.agile.DgLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.agile.</code><code class="descname">DgLexer</code><a class="headerlink" href="#pygments.lexers.agile.DgLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">dg</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.dg</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-dg</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for <a class="reference external" href="http://pyos.github.com/dg">dg</a>,
+a functional and object-oriented programming language
+running on the CPython 3 VM.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.agile.FactorLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.agile.</code><code class="descname">FactorLexer</code><a class="headerlink" href="#pygments.lexers.agile.FactorLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">factor</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.factor</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-factor</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for the <a class="reference external" href="http://factorcode.org">Factor</a> language.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.4.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.agile.FancyLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.agile.</code><code class="descname">FancyLexer</code><a class="headerlink" href="#pygments.lexers.agile.FancyLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">fancy, fy</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.fy, *.fancypack</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-fancysrc</td>
+</tr>
+</tbody>
+</table>
+<p>Pygments Lexer For <a class="reference external" href="http://www.fancy-lang.org/">Fancy</a>.</p>
+<p>Fancy is a self-hosted, pure object-oriented, dynamic,
+class-based, concurrent general-purpose programming language
+running on Rubinius, the Ruby VM.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.agile.HyLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.agile.</code><code class="descname">HyLexer</code><a class="headerlink" href="#pygments.lexers.agile.HyLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">hylang</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.hy</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-hy, application/x-hy</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for <a class="reference external" href="http://hylang.org/">Hy</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.agile.IoLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.agile.</code><code class="descname">IoLexer</code><a class="headerlink" href="#pygments.lexers.agile.IoLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">io</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.io</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-iosrc</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://iolanguage.com/">Io</a> (a small, prototype-based
+programming language) source.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.10.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.agile.LuaLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.agile.</code><code class="descname">LuaLexer</code><a class="headerlink" href="#pygments.lexers.agile.LuaLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">lua</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.lua, *.wlua</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-lua, application/x-lua</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.lua.org">Lua</a> source code.</p>
+<p>Additional options accepted:</p>
+<dl class="docutils">
+<dt><cite>func_name_highlighting</cite></dt>
+<dd>If given and <code class="docutils literal"><span class="pre">True</span></code>, highlight builtin function names
+(default: <code class="docutils literal"><span class="pre">True</span></code>).</dd>
+<dt><cite>disabled_modules</cite></dt>
+<dd><p class="first">If given, must be a list of module names whose function names
+should not be highlighted. By default all modules are highlighted.</p>
+<p>To get a list of allowed modules have a look into the
+<cite>_luabuiltins</cite> module:</p>
+<div class="last highlight-pycon"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">pygments.lexers._luabuiltins</span> <span class="kn">import</span> <span class="n">MODULES</span>
+<span class="gp">>>> </span><span class="n">MODULES</span><span class="o">.</span><span class="n">keys</span><span class="p">()</span>
+<span class="go">['string', 'coroutine', 'modules', 'io', 'basic', ...]</span>
+</pre></div>
+</div>
+</dd>
+</dl>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.agile.MiniDLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.agile.</code><code class="descname">MiniDLexer</code><a class="headerlink" href="#pygments.lexers.agile.MiniDLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">minid</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.md</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-minidsrc</td>
+</tr>
+</tbody>
+</table>
+<p>For MiniD source. MiniD is now known as Croc.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.agile.MoonScriptLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.agile.</code><code class="descname">MoonScriptLexer</code><a class="headerlink" href="#pygments.lexers.agile.MoonScriptLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">moon, moonscript</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.moon</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-moonscript, application/x-moonscript</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://moonscript.org.org">MoonScript</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.agile.Perl6Lexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.agile.</code><code class="descname">Perl6Lexer</code><a class="headerlink" href="#pygments.lexers.agile.Perl6Lexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">perl6, pl6</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.pl, *.pm, *.nqp, *.p6, *.6pl, *.p6l, *.pl6, *.6pm, *.p6m, *.pm6, *.t</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-perl6, application/x-perl6</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.perl6.org">Perl 6</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.agile.PerlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.agile.</code><code class="descname">PerlLexer</code><a class="headerlink" href="#pygments.lexers.agile.PerlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">perl, pl</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.pl, *.pm, *.t</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-perl, application/x-perl</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.perl.org">Perl</a> source code.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.agile.Python3Lexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.agile.</code><code class="descname">Python3Lexer</code><a class="headerlink" href="#pygments.lexers.agile.Python3Lexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">python3, py3</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-python3, application/x-python3</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.python.org">Python</a> source code (version 3.0).</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.10.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.agile.Python3TracebackLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.agile.</code><code class="descname">Python3TracebackLexer</code><a class="headerlink" href="#pygments.lexers.agile.Python3TracebackLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">py3tb</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.py3tb</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-python3-traceback</td>
+</tr>
+</tbody>
+</table>
+<p>For Python 3.0 tracebacks, with support for chained exceptions.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.agile.PythonConsoleLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.agile.</code><code class="descname">PythonConsoleLexer</code><a class="headerlink" href="#pygments.lexers.agile.PythonConsoleLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">pycon</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-python-doctest</td>
+</tr>
+</tbody>
+</table>
+<p>For Python console output or doctests, such as:</p>
+<div class="highlight-pycon"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="s">'foo'</span>
+<span class="gp">>>> </span><span class="k">print</span> <span class="n">a</span>
+<span class="go">foo</span>
+<span class="gp">>>> </span><span class="mi">1</span> <span class="o">/</span> <span class="mi">0</span>
+<span class="gt">Traceback (most recent call last):</span>
+ File <span class="nb">"<stdin>"</span>, line <span class="m">1</span>, in <span class="n"><module></span>
+<span class="gr">ZeroDivisionError</span>: <span class="n">integer division or modulo by zero</span>
+</pre></div>
+</div>
+<p>Additional options:</p>
+<dl class="docutils">
+<dt><cite>python3</cite></dt>
+<dd><p class="first">Use Python 3 lexer for code. Default is <code class="docutils literal"><span class="pre">False</span></code>.</p>
+<div class="last versionadded">
+<p><span class="versionmodified">New in version 1.0.</span></p>
+</div>
+</dd>
+</dl>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.agile.PythonLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.agile.</code><code class="descname">PythonLexer</code><a class="headerlink" href="#pygments.lexers.agile.PythonLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">python, py, sage</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.py, *.pyw, *.sc, SConstruct, SConscript, *.tac, *.sage</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-python, application/x-python</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.python.org">Python</a> source code.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.agile.PythonTracebackLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.agile.</code><code class="descname">PythonTracebackLexer</code><a class="headerlink" href="#pygments.lexers.agile.PythonTracebackLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">pytb</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.pytb</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-python-traceback</td>
+</tr>
+</tbody>
+</table>
+<p>For Python tracebacks.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.7.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.agile.RubyConsoleLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.agile.</code><code class="descname">RubyConsoleLexer</code><a class="headerlink" href="#pygments.lexers.agile.RubyConsoleLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">rbcon, irb</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-ruby-shellsession</td>
+</tr>
+</tbody>
+</table>
+<p>For Ruby interactive console (<strong>irb</strong>) output like:</p>
+<div class="highlight-rbcon"><div class="highlight"><pre><span class="gp">irb(main):001:0> </span><span class="n">a</span> <span class="o">=</span> <span class="mi">1</span>
+<span class="go">=> 1</span>
+<span class="gp">irb(main):002:0> </span><span class="nb">puts</span> <span class="n">a</span>
+<span class="go">1</span>
+<span class="go">=> nil</span>
+</pre></div>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.agile.RubyLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.agile.</code><code class="descname">RubyLexer</code><a class="headerlink" href="#pygments.lexers.agile.RubyLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">rb, ruby, duby</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.rb, *.rbw, Rakefile, *.rake, *.gemspec, *.rbx, *.duby</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-ruby, application/x-ruby</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.ruby-lang.org">Ruby</a> source code.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.agile.TclLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.agile.</code><code class="descname">TclLexer</code><a class="headerlink" href="#pygments.lexers.agile.TclLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">tcl</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.tcl</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-tcl, text/x-script.tcl, application/x-tcl</td>
+</tr>
+</tbody>
+</table>
+<p>For Tcl source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.10.</span></p>
+</div>
+</dd></dl>
+
+<span class="target" id="module-pygments.lexers.asm"></span></div>
+<div class="section" id="lexers-for-assembly-languages">
+<h2>Lexers for assembly languages<a class="headerlink" href="#lexers-for-assembly-languages" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="pygments.lexers.asm.CObjdumpLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.asm.</code><code class="descname">CObjdumpLexer</code><a class="headerlink" href="#pygments.lexers.asm.CObjdumpLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">c-objdump</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.c-objdump</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-c-objdump</td>
+</tr>
+</tbody>
+</table>
+<p>For the output of ‘objdump -Sr on compiled C files’</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.asm.Ca65Lexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.asm.</code><code class="descname">Ca65Lexer</code><a class="headerlink" href="#pygments.lexers.asm.Ca65Lexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">ca65</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.s</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>For ca65 assembler sources.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.asm.CppObjdumpLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.asm.</code><code class="descname">CppObjdumpLexer</code><a class="headerlink" href="#pygments.lexers.asm.CppObjdumpLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">cpp-objdump, c++-objdumb, cxx-objdump</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.cpp-objdump, *.c++-objdump, *.cxx-objdump</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-cpp-objdump</td>
+</tr>
+</tbody>
+</table>
+<p>For the output of ‘objdump -Sr on compiled C++ files’</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.asm.DObjdumpLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.asm.</code><code class="descname">DObjdumpLexer</code><a class="headerlink" href="#pygments.lexers.asm.DObjdumpLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">d-objdump</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.d-objdump</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-d-objdump</td>
+</tr>
+</tbody>
+</table>
+<p>For the output of ‘objdump -Sr on compiled D files’</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.asm.GasLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.asm.</code><code class="descname">GasLexer</code><a class="headerlink" href="#pygments.lexers.asm.GasLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">gas, asm</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.s, *.S</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-gas</td>
+</tr>
+</tbody>
+</table>
+<p>For Gas (AT&T) assembly code.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.asm.LlvmLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.asm.</code><code class="descname">LlvmLexer</code><a class="headerlink" href="#pygments.lexers.asm.LlvmLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">llvm</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.ll</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-llvm</td>
+</tr>
+</tbody>
+</table>
+<p>For LLVM assembly code.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.asm.NasmLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.asm.</code><code class="descname">NasmLexer</code><a class="headerlink" href="#pygments.lexers.asm.NasmLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">nasm</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.asm, *.ASM</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-nasm</td>
+</tr>
+</tbody>
+</table>
+<p>For Nasm (Intel) assembly code.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.asm.NasmObjdumpLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.asm.</code><code class="descname">NasmObjdumpLexer</code><a class="headerlink" href="#pygments.lexers.asm.NasmObjdumpLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">objdump-nasm</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.objdump-intel</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-nasm-objdump</td>
+</tr>
+</tbody>
+</table>
+<p>For the output of ‘objdump -d -M intel’.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.asm.ObjdumpLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.asm.</code><code class="descname">ObjdumpLexer</code><a class="headerlink" href="#pygments.lexers.asm.ObjdumpLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">objdump</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.objdump</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-objdump</td>
+</tr>
+</tbody>
+</table>
+<p>For the output of ‘objdump -dr’</p>
+</dd></dl>
+
+<span class="target" id="module-pygments.lexers.compiled"></span></div>
+<div class="section" id="lexers-for-compiled-languages">
+<h2>Lexers for compiled languages<a class="headerlink" href="#lexers-for-compiled-languages" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="pygments.lexers.compiled.AdaLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">AdaLexer</code><a class="headerlink" href="#pygments.lexers.compiled.AdaLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">ada, ada95ada2005</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.adb, *.ads, *.ada</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-ada</td>
+</tr>
+</tbody>
+</table>
+<p>For Ada source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.3.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.BlitzBasicLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">BlitzBasicLexer</code><a class="headerlink" href="#pygments.lexers.compiled.BlitzBasicLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">blitzbasic, b3d, bplus</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.bb, *.decls</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-bb</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://blitzbasic.com">BlitzBasic</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.BlitzMaxLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">BlitzMaxLexer</code><a class="headerlink" href="#pygments.lexers.compiled.BlitzMaxLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">blitzmax, bmax</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.bmx</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-bmx</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://blitzbasic.com">BlitzMax</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.4.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.CLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">CLexer</code><a class="headerlink" href="#pygments.lexers.compiled.CLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">c</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.c, *.h, *.idc</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-chdr, text/x-csrc</td>
+</tr>
+</tbody>
+</table>
+<p>For C source code with preprocessor directives.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.ChapelLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">ChapelLexer</code><a class="headerlink" href="#pygments.lexers.compiled.ChapelLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">chapel, chpl</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.chpl</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://chapel.cray.com/">Chapel</a> source.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.ClayLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">ClayLexer</code><a class="headerlink" href="#pygments.lexers.compiled.ClayLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">clay</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.clay</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-clay</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://claylabs.com/clay/">Clay</a> source.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.CobolFreeformatLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">CobolFreeformatLexer</code><a class="headerlink" href="#pygments.lexers.compiled.CobolFreeformatLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">cobolfree</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.cbl, *.CBL</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for Free format OpenCOBOL code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.CobolLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">CobolLexer</code><a class="headerlink" href="#pygments.lexers.compiled.CobolLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">cobol</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.cob, *.COB, *.cpy, *.CPY</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-cobol</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for OpenCOBOL code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.CppLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">CppLexer</code><a class="headerlink" href="#pygments.lexers.compiled.CppLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">cpp, c++</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.cpp, *.hpp, *.c++, *.h++, *.cc, *.hh, *.cxx, *.hxx, *.C, *.H, *.cp, *.CPP</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-c++hdr, text/x-c++src</td>
+</tr>
+</tbody>
+</table>
+<p>For C++ source code with preprocessor directives.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.CudaLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">CudaLexer</code><a class="headerlink" href="#pygments.lexers.compiled.CudaLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">cuda, cu</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.cu, *.cuh</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-cuda</td>
+</tr>
+</tbody>
+</table>
+<p>For NVIDIA <a class="reference external" href="http://developer.nvidia.com/category/zone/cuda-zone">CUDA™</a>
+source.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.CythonLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">CythonLexer</code><a class="headerlink" href="#pygments.lexers.compiled.CythonLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">cython, pyx, pyrex</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.pyx, *.pxd, *.pxi</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-cython, application/x-cython</td>
+</tr>
+</tbody>
+</table>
+<p>For Pyrex and <a class="reference external" href="http://cython.org">Cython</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.DLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">DLexer</code><a class="headerlink" href="#pygments.lexers.compiled.DLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">d</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.d, *.di</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-dsrc</td>
+</tr>
+</tbody>
+</table>
+<p>For D source.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.2.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.DelphiLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">DelphiLexer</code><a class="headerlink" href="#pygments.lexers.compiled.DelphiLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">delphi, pas, pascal, objectpascal</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.pas</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-pascal</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.borland.com/delphi/">Delphi</a> (Borland Object Pascal),
+Turbo Pascal and Free Pascal source code.</p>
+<p>Additional options accepted:</p>
+<dl class="docutils">
+<dt><cite>turbopascal</cite></dt>
+<dd>Highlight Turbo Pascal specific keywords (default: <code class="docutils literal"><span class="pre">True</span></code>).</dd>
+<dt><cite>delphi</cite></dt>
+<dd>Highlight Borland Delphi specific keywords (default: <code class="docutils literal"><span class="pre">True</span></code>).</dd>
+<dt><cite>freepascal</cite></dt>
+<dd>Highlight Free Pascal specific keywords (default: <code class="docutils literal"><span class="pre">True</span></code>).</dd>
+<dt><cite>units</cite></dt>
+<dd>A list of units that should be considered builtin, supported are
+<code class="docutils literal"><span class="pre">System</span></code>, <code class="docutils literal"><span class="pre">SysUtils</span></code>, <code class="docutils literal"><span class="pre">Classes</span></code> and <code class="docutils literal"><span class="pre">Math</span></code>.
+Default is to consider all of them builtin.</dd>
+</dl>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.DylanConsoleLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">DylanConsoleLexer</code><a class="headerlink" href="#pygments.lexers.compiled.DylanConsoleLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">dylan-console, dylan-repl</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.dylan-console</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-dylan-console</td>
+</tr>
+</tbody>
+</table>
+<p>For Dylan interactive console output like:</p>
+<div class="highlight-dylan-console"><div class="highlight"><pre><span class="gp">?</span> <span class="k">let</span> <span class="n">a</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
+<span class="go">=> 1</span>
+<span class="gp">?</span> <span class="n">a</span>
+<span class="go">=> 1</span>
+</pre></div>
+</div>
+<p>This is based on a copy of the RubyConsoleLexer.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.DylanLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">DylanLexer</code><a class="headerlink" href="#pygments.lexers.compiled.DylanLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">dylan</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.dylan, *.dyl, *.intr</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-dylan</td>
+</tr>
+</tbody>
+</table>
+<p>For the <a class="reference external" href="http://www.opendylan.org/">Dylan</a> language.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.7.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.DylanLidLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">DylanLidLexer</code><a class="headerlink" href="#pygments.lexers.compiled.DylanLidLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">dylan-lid, lid</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.lid, *.hdp</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-dylan-lid</td>
+</tr>
+</tbody>
+</table>
+<p>For Dylan LID (Library Interchange Definition) files.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.ECLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">ECLexer</code><a class="headerlink" href="#pygments.lexers.compiled.ECLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">ec</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.ec, *.eh</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-echdr, text/x-ecsrc</td>
+</tr>
+</tbody>
+</table>
+<p>For eC source code with preprocessor directives.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.EiffelLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">EiffelLexer</code><a class="headerlink" href="#pygments.lexers.compiled.EiffelLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">eiffel</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.e</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-eiffel</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.eiffel.com">Eiffel</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.FantomLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">FantomLexer</code><a class="headerlink" href="#pygments.lexers.compiled.FantomLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">fan</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.fan</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-fantom</td>
+</tr>
+</tbody>
+</table>
+<p>For Fantom source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.FelixLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">FelixLexer</code><a class="headerlink" href="#pygments.lexers.compiled.FelixLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">felix, flx</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.flx, *.flxh</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-felix</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.felix-lang.org">Felix</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.2.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.FortranLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">FortranLexer</code><a class="headerlink" href="#pygments.lexers.compiled.FortranLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">fortran</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.f, *.f90, *.F, *.F90</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-fortran</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for FORTRAN 90 code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.10.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.GLShaderLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">GLShaderLexer</code><a class="headerlink" href="#pygments.lexers.compiled.GLShaderLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">glsl</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.vert, *.frag, *.geo</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-glslsrc</td>
+</tr>
+</tbody>
+</table>
+<p>GLSL (OpenGL Shader) lexer.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.GoLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">GoLexer</code><a class="headerlink" href="#pygments.lexers.compiled.GoLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">go</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.go</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-gosrc</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://golang.org">Go</a> source.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.Inform6Lexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">Inform6Lexer</code><a class="headerlink" href="#pygments.lexers.compiled.Inform6Lexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">inform6, i6</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.inf</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://inform-fiction.org/">Inform 6</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.Inform6TemplateLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">Inform6TemplateLexer</code><a class="headerlink" href="#pygments.lexers.compiled.Inform6TemplateLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">i6t</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.i6t</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://inform7.com/sources/src/i6template/Woven/index.html">Inform 6 template</a> code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.Inform7Lexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">Inform7Lexer</code><a class="headerlink" href="#pygments.lexers.compiled.Inform7Lexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">inform7, i7</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.ni, *.i7x</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://inform7.com/">Inform 7</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.LogosLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">LogosLexer</code><a class="headerlink" href="#pygments.lexers.compiled.LogosLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">logos</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.x, *.xi, *.xm, *.xmi</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-logos</td>
+</tr>
+</tbody>
+</table>
+<p>For Logos + Objective-C source code with preprocessor directives.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.Modula2Lexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">Modula2Lexer</code><a class="headerlink" href="#pygments.lexers.compiled.Modula2Lexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">modula2, m2</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.def, *.mod</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-modula2</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.modula2.org/">Modula-2</a> source code.</p>
+<p>Additional options that determine which keywords are highlighted:</p>
+<dl class="docutils">
+<dt><cite>pim</cite></dt>
+<dd>Select PIM Modula-2 dialect (default: True).</dd>
+<dt><cite>iso</cite></dt>
+<dd>Select ISO Modula-2 dialect (default: False).</dd>
+<dt><cite>objm2</cite></dt>
+<dd>Select Objective Modula-2 dialect (default: False).</dd>
+<dt><cite>gm2ext</cite></dt>
+<dd>Also highlight GNU extensions (default: False).</dd>
+</dl>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.3.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.MonkeyLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">MonkeyLexer</code><a class="headerlink" href="#pygments.lexers.compiled.MonkeyLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">monkey</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.monkey</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-monkey</td>
+</tr>
+</tbody>
+</table>
+<p>For
+<a class="reference external" href="https://en.wikipedia.org/wiki/Monkey_(programming_language)">Monkey</a>
+source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.MqlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">MqlLexer</code><a class="headerlink" href="#pygments.lexers.compiled.MqlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">mql, mq4, mq5, mql4, mql5</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.mq4, *.mq5, *.mqh</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-mql</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://docs.mql4.com/">MQL4</a> and
+<a class="reference external" href="http://www.mql5.com/en/docs">MQL5</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.NesCLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">NesCLexer</code><a class="headerlink" href="#pygments.lexers.compiled.NesCLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">nesc</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.nc</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-nescsrc</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="https://github.com/tinyos/nesc">nesC</a> source code with preprocessor
+directives.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.NimrodLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">NimrodLexer</code><a class="headerlink" href="#pygments.lexers.compiled.NimrodLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">nimrod, nim</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.nim, *.nimrod</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-nimrod</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://nimrod-code.org/">Nimrod</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.ObjectiveCLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">ObjectiveCLexer</code><a class="headerlink" href="#pygments.lexers.compiled.ObjectiveCLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">objective-c, objectivec, obj-c, objc</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.m, *.h</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-objective-c</td>
+</tr>
+</tbody>
+</table>
+<p>For Objective-C source code with preprocessor directives.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.ObjectiveCppLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">ObjectiveCppLexer</code><a class="headerlink" href="#pygments.lexers.compiled.ObjectiveCppLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">objective-c++, objectivec++, obj-c++, objc++</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.mm, *.hh</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-objective-c++</td>
+</tr>
+</tbody>
+</table>
+<p>For Objective-C++ source code with preprocessor directives.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.OocLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">OocLexer</code><a class="headerlink" href="#pygments.lexers.compiled.OocLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">ooc</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.ooc</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-ooc</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://ooc-lang.org/">Ooc</a> source code</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.2.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.PikeLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">PikeLexer</code><a class="headerlink" href="#pygments.lexers.compiled.PikeLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">pike</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.pike, *.pmod</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-pike</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://pike.lysator.liu.se/">Pike</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.PrologLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">PrologLexer</code><a class="headerlink" href="#pygments.lexers.compiled.PrologLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">prolog</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.prolog, *.pro, *.pl</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-prolog</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for Prolog files.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.RustLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">RustLexer</code><a class="headerlink" href="#pygments.lexers.compiled.RustLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">rust</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.rs</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-rustsrc</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for the Rust programming language (version 0.9).</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.SwigLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">SwigLexer</code><a class="headerlink" href="#pygments.lexers.compiled.SwigLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">swig</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.swg, *.i</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/swig</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.swig.org/">SWIG</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.compiled.ValaLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.compiled.</code><code class="descname">ValaLexer</code><a class="headerlink" href="#pygments.lexers.compiled.ValaLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">vala, vapi</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.vala, *.vapi</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-vala</td>
+</tr>
+</tbody>
+</table>
+<p>For Vala source code with preprocessor directives.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<span class="target" id="module-pygments.lexers.dalvik"></span></div>
+<div class="section" id="pygments-lexers-for-dalvik-vm-related-languages">
+<h2>Pygments lexers for Dalvik VM-related languages<a class="headerlink" href="#pygments-lexers-for-dalvik-vm-related-languages" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="pygments.lexers.dalvik.SmaliLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.dalvik.</code><code class="descname">SmaliLexer</code><a class="headerlink" href="#pygments.lexers.dalvik.SmaliLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">smali</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.smali</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/smali</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://code.google.com/p/smali/">Smali</a> (Android/Dalvik) assembly
+code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<span class="target" id="module-pygments.lexers.dotnet"></span></div>
+<div class="section" id="lexers-for-net-languages">
+<h2>Lexers for .net languages<a class="headerlink" href="#lexers-for-net-languages" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="pygments.lexers.dotnet.BooLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.dotnet.</code><code class="descname">BooLexer</code><a class="headerlink" href="#pygments.lexers.dotnet.BooLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">boo</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.boo</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-boo</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://boo.codehaus.org/">Boo</a> source code.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.dotnet.CSharpAspxLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.dotnet.</code><code class="descname">CSharpAspxLexer</code><a class="headerlink" href="#pygments.lexers.dotnet.CSharpAspxLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">aspx-cs</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.aspx, *.asax, *.ascx, *.ashx, *.asmx, *.axd</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for highligting C# within ASP.NET pages.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.dotnet.CSharpLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.dotnet.</code><code class="descname">CSharpLexer</code><a class="headerlink" href="#pygments.lexers.dotnet.CSharpLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">csharp, c#</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.cs</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-csharp</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://msdn2.microsoft.com/en-us/vcsharp/default.aspx">C#</a>
+source code.</p>
+<p>Additional options accepted:</p>
+<dl class="docutils">
+<dt><cite>unicodelevel</cite></dt>
+<dd><p class="first">Determines which Unicode characters this lexer allows for identifiers.
+The possible values are:</p>
+<ul class="simple">
+<li><code class="docutils literal"><span class="pre">none</span></code> – only the ASCII letters and numbers are allowed. This
+is the fastest selection.</li>
+<li><code class="docutils literal"><span class="pre">basic</span></code> – all Unicode characters from the specification except
+category <code class="docutils literal"><span class="pre">Lo</span></code> are allowed.</li>
+<li><code class="docutils literal"><span class="pre">full</span></code> – all Unicode characters as specified in the C# specs
+are allowed. Note that this means a considerable slowdown since the
+<code class="docutils literal"><span class="pre">Lo</span></code> category has more than 40,000 characters in it!</li>
+</ul>
+<p>The default value is <code class="docutils literal"><span class="pre">basic</span></code>.</p>
+<div class="last versionadded">
+<p><span class="versionmodified">New in version 0.8.</span></p>
+</div>
+</dd>
+</dl>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.dotnet.FSharpLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.dotnet.</code><code class="descname">FSharpLexer</code><a class="headerlink" href="#pygments.lexers.dotnet.FSharpLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">fsharp</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.fs, *.fsi</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-fsharp</td>
+</tr>
+</tbody>
+</table>
+<p>For the F# language (version 3.0).</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.dotnet.NemerleLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.dotnet.</code><code class="descname">NemerleLexer</code><a class="headerlink" href="#pygments.lexers.dotnet.NemerleLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">nemerle</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.n</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-nemerle</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://nemerle.org">Nemerle</a> source code.</p>
+<p>Additional options accepted:</p>
+<dl class="docutils">
+<dt><cite>unicodelevel</cite></dt>
+<dd><p class="first">Determines which Unicode characters this lexer allows for identifiers.
+The possible values are:</p>
+<ul class="simple">
+<li><code class="docutils literal"><span class="pre">none</span></code> – only the ASCII letters and numbers are allowed. This
+is the fastest selection.</li>
+<li><code class="docutils literal"><span class="pre">basic</span></code> – all Unicode characters from the specification except
+category <code class="docutils literal"><span class="pre">Lo</span></code> are allowed.</li>
+<li><code class="docutils literal"><span class="pre">full</span></code> – all Unicode characters as specified in the C# specs
+are allowed. Note that this means a considerable slowdown since the
+<code class="docutils literal"><span class="pre">Lo</span></code> category has more than 40,000 characters in it!</li>
+</ul>
+<p class="last">The default value is <code class="docutils literal"><span class="pre">basic</span></code>.</p>
+</dd>
+</dl>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.dotnet.VbNetAspxLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.dotnet.</code><code class="descname">VbNetAspxLexer</code><a class="headerlink" href="#pygments.lexers.dotnet.VbNetAspxLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">aspx-vb</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.aspx, *.asax, *.ascx, *.ashx, *.asmx, *.axd</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for highligting Visual Basic.net within ASP.NET pages.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.dotnet.VbNetLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.dotnet.</code><code class="descname">VbNetLexer</code><a class="headerlink" href="#pygments.lexers.dotnet.VbNetLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">vb.net, vbnet</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.vb, *.bas</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-vbnet, text/x-vba</td>
+</tr>
+</tbody>
+</table>
+<p>For
+<a class="reference external" href="http://msdn2.microsoft.com/en-us/vbasic/default.aspx">Visual Basic.NET</a>
+source code.</p>
+</dd></dl>
+
+<span class="target" id="module-pygments.lexers.foxpro"></span></div>
+<div class="section" id="simple-lexer-for-microsoft-visual-foxpro-source-code">
+<h2>Simple lexer for Microsoft Visual FoxPro source code<a class="headerlink" href="#simple-lexer-for-microsoft-visual-foxpro-source-code" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="pygments.lexers.foxpro.FoxProLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.foxpro.</code><code class="descname">FoxProLexer</code><a class="headerlink" href="#pygments.lexers.foxpro.FoxProLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">foxpro, vfp, clipper, xbase</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.PRG, *.prg</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for Microsoft Visual FoxPro language.</p>
+<p>FoxPro syntax allows to shorten all keywords and function names
+to 4 characters. Shortened forms are not recognized by this lexer.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<span class="target" id="module-pygments.lexers.functional"></span></div>
+<div class="section" id="lexers-for-functional-languages">
+<h2>Lexers for functional languages<a class="headerlink" href="#lexers-for-functional-languages" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="pygments.lexers.functional.AgdaLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.functional.</code><code class="descname">AgdaLexer</code><a class="headerlink" href="#pygments.lexers.functional.AgdaLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">agda</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.agda</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-agda</td>
+</tr>
+</tbody>
+</table>
+<p>For the <a class="reference external" href="http://wiki.portal.chalmers.se/agda/pmwiki.php">Agda</a>
+dependently typed functional programming language and proof assistant.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.functional.CommonLispLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.functional.</code><code class="descname">CommonLispLexer</code><a class="headerlink" href="#pygments.lexers.functional.CommonLispLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">common-lisp, cl, lisp, elisp, emacs</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.cl, *.lisp, *.el</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-common-lisp</td>
+</tr>
+</tbody>
+</table>
+<p>A Common Lisp lexer.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.9.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.functional.CoqLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.functional.</code><code class="descname">CoqLexer</code><a class="headerlink" href="#pygments.lexers.functional.CoqLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">coq</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.v</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-coq</td>
+</tr>
+</tbody>
+</table>
+<p>For the <a class="reference external" href="http://coq.inria.fr/">Coq</a> theorem prover.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.functional.ElixirConsoleLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.functional.</code><code class="descname">ElixirConsoleLexer</code><a class="headerlink" href="#pygments.lexers.functional.ElixirConsoleLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">iex</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-elixir-shellsession</td>
+</tr>
+</tbody>
+</table>
+<p>For Elixir interactive console (iex) output like:</p>
+<div class="highlight-iex"><div class="highlight"><pre><span class="gp">iex> </span><span class="p">[</span><span class="n">head</span> <span class="o">|</span> <span class="n">tail</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="m">1</span><span class="p">,</span><span class="m">2</span><span class="p">,</span><span class="m">3</span><span class="p">]</span>
+<span class="go">[1,2,3]</span>
+<span class="gp">iex> </span><span class="n">head</span>
+<span class="go">1</span>
+<span class="gp">iex> </span><span class="n">tail</span>
+<span class="go">[2,3]</span>
+<span class="gp">iex> </span><span class="p">[</span><span class="n">head</span> <span class="o">|</span> <span class="n">tail</span><span class="p">]</span>
+<span class="go">[1,2,3]</span>
+<span class="gp">iex> </span><span class="n">length</span> <span class="p">[</span><span class="n">head</span> <span class="o">|</span> <span class="n">tail</span><span class="p">]</span>
+<span class="go">3</span>
+</pre></div>
+</div>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.functional.ElixirLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.functional.</code><code class="descname">ElixirLexer</code><a class="headerlink" href="#pygments.lexers.functional.ElixirLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">elixir, ex, exs</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.ex, *.exs</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-elixir</td>
+</tr>
+</tbody>
+</table>
+<p>For the <a class="reference external" href="http://elixir-lang.org">Elixir language</a>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.functional.ErlangLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.functional.</code><code class="descname">ErlangLexer</code><a class="headerlink" href="#pygments.lexers.functional.ErlangLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">erlang</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.erl, *.hrl, *.es, *.escript</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-erlang</td>
+</tr>
+</tbody>
+</table>
+<p>For the Erlang functional programming language.</p>
+<p>Blame Jeremy Thurgood (<a class="reference external" href="http://jerith.za.net/">http://jerith.za.net/</a>).</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.9.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.functional.ErlangShellLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.functional.</code><code class="descname">ErlangShellLexer</code><a class="headerlink" href="#pygments.lexers.functional.ErlangShellLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">erl</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.erl-sh</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-erl-shellsession</td>
+</tr>
+</tbody>
+</table>
+<p>Shell sessions in erl (for Erlang code).</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.functional.HaskellLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.functional.</code><code class="descname">HaskellLexer</code><a class="headerlink" href="#pygments.lexers.functional.HaskellLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">haskell, hs</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.hs</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-haskell</td>
+</tr>
+</tbody>
+</table>
+<p>A Haskell lexer based on the lexemes defined in the Haskell 98 Report.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.8.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.functional.IdrisLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.functional.</code><code class="descname">IdrisLexer</code><a class="headerlink" href="#pygments.lexers.functional.IdrisLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">idris, idr</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.idr</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-idris</td>
+</tr>
+</tbody>
+</table>
+<p>A lexer for the dependently typed programming language Idris.</p>
+<p>Based on the Haskell and Agda Lexer.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.functional.KokaLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.functional.</code><code class="descname">KokaLexer</code><a class="headerlink" href="#pygments.lexers.functional.KokaLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">koka</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.kk, *.kki</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-koka</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for the <a class="reference external" href="http://koka.codeplex.com">Koka</a>
+language.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.functional.LiterateAgdaLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.functional.</code><code class="descname">LiterateAgdaLexer</code><a class="headerlink" href="#pygments.lexers.functional.LiterateAgdaLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">lagda, literate-agda</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.lagda</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-literate-agda</td>
+</tr>
+</tbody>
+</table>
+<p>For Literate Agda source.</p>
+<p>Additional options accepted:</p>
+<dl class="docutils">
+<dt><cite>litstyle</cite></dt>
+<dd>If given, must be <code class="docutils literal"><span class="pre">"bird"</span></code> or <code class="docutils literal"><span class="pre">"latex"</span></code>. If not given, the style
+is autodetected: if the first non-whitespace character in the source
+is a backslash or percent character, LaTeX is assumed, else Bird.</dd>
+</dl>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.functional.LiterateHaskellLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.functional.</code><code class="descname">LiterateHaskellLexer</code><a class="headerlink" href="#pygments.lexers.functional.LiterateHaskellLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">lhs, literate-haskell, lhaskell</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.lhs</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-literate-haskell</td>
+</tr>
+</tbody>
+</table>
+<p>For Literate Haskell (Bird-style or LaTeX) source.</p>
+<p>Additional options accepted:</p>
+<dl class="docutils">
+<dt><cite>litstyle</cite></dt>
+<dd>If given, must be <code class="docutils literal"><span class="pre">"bird"</span></code> or <code class="docutils literal"><span class="pre">"latex"</span></code>. If not given, the style
+is autodetected: if the first non-whitespace character in the source
+is a backslash or percent character, LaTeX is assumed, else Bird.</dd>
+</dl>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.9.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.functional.LiterateIdrisLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.functional.</code><code class="descname">LiterateIdrisLexer</code><a class="headerlink" href="#pygments.lexers.functional.LiterateIdrisLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">lidr, literate-idris, lidris</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.lidr</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-literate-idris</td>
+</tr>
+</tbody>
+</table>
+<p>For Literate Idris (Bird-style or LaTeX) source.</p>
+<p>Additional options accepted:</p>
+<dl class="docutils">
+<dt><cite>litstyle</cite></dt>
+<dd>If given, must be <code class="docutils literal"><span class="pre">"bird"</span></code> or <code class="docutils literal"><span class="pre">"latex"</span></code>. If not given, the style
+is autodetected: if the first non-whitespace character in the source
+is a backslash or percent character, LaTeX is assumed, else Bird.</dd>
+</dl>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.functional.NewLispLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.functional.</code><code class="descname">NewLispLexer</code><a class="headerlink" href="#pygments.lexers.functional.NewLispLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">newlisp</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.lsp, *.nl</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-newlisp, application/x-newlisp</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="www.newlisp.org">newLISP.</a> source code (version 10.3.0).</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.functional.NixLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.functional.</code><code class="descname">NixLexer</code><a class="headerlink" href="#pygments.lexers.functional.NixLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">nixos, nix</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.nix</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-nix</td>
+</tr>
+</tbody>
+</table>
+<p>For the <a class="reference external" href="http://nixos.org/nix/">Nix language</a>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.functional.OcamlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.functional.</code><code class="descname">OcamlLexer</code><a class="headerlink" href="#pygments.lexers.functional.OcamlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">ocaml</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.ml, *.mli, *.mll, *.mly</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-ocaml</td>
+</tr>
+</tbody>
+</table>
+<p>For the OCaml language.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.7.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.functional.OpaLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.functional.</code><code class="descname">OpaLexer</code><a class="headerlink" href="#pygments.lexers.functional.OpaLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">opa</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.opa</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-opa</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for the Opa language (<a class="reference external" href="http://opalang.org">http://opalang.org</a>).</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.functional.RacketLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.functional.</code><code class="descname">RacketLexer</code><a class="headerlink" href="#pygments.lexers.functional.RacketLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">racket, rkt</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.rkt, *.rktl</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-racket, application/x-racket</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for <a class="reference external" href="http://racket-lang.org/">Racket</a> source code (formerly known as
+PLT Scheme).</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.functional.SMLLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.functional.</code><code class="descname">SMLLexer</code><a class="headerlink" href="#pygments.lexers.functional.SMLLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">sml</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.sml, *.sig, *.fun</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-standardml, application/x-standardml</td>
+</tr>
+</tbody>
+</table>
+<p>For the Standard ML language.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.functional.SchemeLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.functional.</code><code class="descname">SchemeLexer</code><a class="headerlink" href="#pygments.lexers.functional.SchemeLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">scheme, scm</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.scm, *.ss</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-scheme, application/x-scheme</td>
+</tr>
+</tbody>
+</table>
+<p>A Scheme lexer, parsing a stream and outputting the tokens
+needed to highlight scheme code.
+This lexer could be most probably easily subclassed to parse
+other LISP-Dialects like Common Lisp, Emacs Lisp or AutoLisp.</p>
+<p>This parser is checked with pastes from the LISP pastebin
+at <a class="reference external" href="http://paste.lisp.org/">http://paste.lisp.org/</a> to cover as much syntax as possible.</p>
+<p>It supports the full Scheme syntax as defined in R5RS.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.6.</span></p>
+</div>
+</dd></dl>
+
+<span class="target" id="module-pygments.lexers.hdl"></span></div>
+<div class="section" id="lexers-for-hardware-descriptor-languages">
+<h2>Lexers for hardware descriptor languages<a class="headerlink" href="#lexers-for-hardware-descriptor-languages" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="pygments.lexers.hdl.SystemVerilogLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.hdl.</code><code class="descname">SystemVerilogLexer</code><a class="headerlink" href="#pygments.lexers.hdl.SystemVerilogLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">systemverilog, sv</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.sv, *.svh</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-systemverilog</td>
+</tr>
+</tbody>
+</table>
+<p>Extends verilog lexer to recognise all SystemVerilog keywords from IEEE
+1800-2009 standard.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.hdl.VerilogLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.hdl.</code><code class="descname">VerilogLexer</code><a class="headerlink" href="#pygments.lexers.hdl.VerilogLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">verilog, v</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.v</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-verilog</td>
+</tr>
+</tbody>
+</table>
+<p>For verilog source code with preprocessor directives.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.4.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.hdl.VhdlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.hdl.</code><code class="descname">VhdlLexer</code><a class="headerlink" href="#pygments.lexers.hdl.VhdlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">vhdl</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.vhdl, *.vhd</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-vhdl</td>
+</tr>
+</tbody>
+</table>
+<p>For VHDL source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<span class="target" id="module-pygments.lexers.jvm"></span></div>
+<div class="section" id="pygments-lexers-for-jvm-languages">
+<h2>Pygments lexers for JVM languages<a class="headerlink" href="#pygments-lexers-for-jvm-languages" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="pygments.lexers.jvm.AspectJLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.jvm.</code><code class="descname">AspectJLexer</code><a class="headerlink" href="#pygments.lexers.jvm.AspectJLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">aspectj</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.aj</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-aspectj</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.eclipse.org/aspectj/">AspectJ</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.jvm.CeylonLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.jvm.</code><code class="descname">CeylonLexer</code><a class="headerlink" href="#pygments.lexers.jvm.CeylonLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">ceylon</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.ceylon</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-ceylon</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://ceylon-lang.org/">Ceylon</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.jvm.ClojureLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.jvm.</code><code class="descname">ClojureLexer</code><a class="headerlink" href="#pygments.lexers.jvm.ClojureLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">clojure, clj</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.clj</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-clojure, application/x-clojure</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for <a class="reference external" href="http://clojure.org/">Clojure</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.11.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.jvm.GosuLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.jvm.</code><code class="descname">GosuLexer</code><a class="headerlink" href="#pygments.lexers.jvm.GosuLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">gosu</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.gs, *.gsx, *.gsp, *.vark</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-gosu</td>
+</tr>
+</tbody>
+</table>
+<p>For Gosu source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.jvm.GosuTemplateLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.jvm.</code><code class="descname">GosuTemplateLexer</code><a class="headerlink" href="#pygments.lexers.jvm.GosuTemplateLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">gst</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.gst</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-gosu-template</td>
+</tr>
+</tbody>
+</table>
+<p>For Gosu templates.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.jvm.GroovyLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.jvm.</code><code class="descname">GroovyLexer</code><a class="headerlink" href="#pygments.lexers.jvm.GroovyLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">groovy</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.groovy</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-groovy</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://groovy.codehaus.org/">Groovy</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.jvm.IokeLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.jvm.</code><code class="descname">IokeLexer</code><a class="headerlink" href="#pygments.lexers.jvm.IokeLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">ioke, ik</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.ik</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-iokesrc</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://ioke.org/">Ioke</a> (a strongly typed, dynamic,
+prototype based programming language) source.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.4.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.jvm.JavaLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.jvm.</code><code class="descname">JavaLexer</code><a class="headerlink" href="#pygments.lexers.jvm.JavaLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">java</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.java</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-java</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.sun.com/java/">Java</a> source code.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.jvm.KotlinLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.jvm.</code><code class="descname">KotlinLexer</code><a class="headerlink" href="#pygments.lexers.jvm.KotlinLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">kotlin</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.kt</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-kotlin</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://kotlin.jetbrains.org/">Kotlin</a>
+source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.jvm.ScalaLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.jvm.</code><code class="descname">ScalaLexer</code><a class="headerlink" href="#pygments.lexers.jvm.ScalaLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">scala</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.scala</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-scala</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.scala-lang.org">Scala</a> source code.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.jvm.XtendLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.jvm.</code><code class="descname">XtendLexer</code><a class="headerlink" href="#pygments.lexers.jvm.XtendLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">xtend</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.xtend</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-xtend</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://xtend-lang.org/">Xtend</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<span class="target" id="module-pygments.lexers.math"></span></div>
+<div class="section" id="lexers-for-math-languages">
+<h2>Lexers for math languages<a class="headerlink" href="#lexers-for-math-languages" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="pygments.lexers.math.BugsLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.math.</code><code class="descname">BugsLexer</code><a class="headerlink" href="#pygments.lexers.math.BugsLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">bugs, winbugs, openbugs</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.bug</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>Pygments Lexer for <a class="reference external" href="http://www.openbugs.info/w/">OpenBugs</a> and WinBugs
+models.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.math.IDLLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.math.</code><code class="descname">IDLLexer</code><a class="headerlink" href="#pygments.lexers.math.IDLLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">idl</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.pro</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/idl</td>
+</tr>
+</tbody>
+</table>
+<p>Pygments Lexer for IDL (Interactive Data Language).</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.math.IgorLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.math.</code><code class="descname">IgorLexer</code><a class="headerlink" href="#pygments.lexers.math.IgorLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">igor, igorpro</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.ipf</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/ipf</td>
+</tr>
+</tbody>
+</table>
+<p>Pygments Lexer for Igor Pro procedure files (.ipf).
+See <a class="reference external" href="http://www.wavemetrics.com/">http://www.wavemetrics.com/</a> and <a class="reference external" href="http://www.igorexchange.com/">http://www.igorexchange.com/</a>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.math.JagsLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.math.</code><code class="descname">JagsLexer</code><a class="headerlink" href="#pygments.lexers.math.JagsLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">jags</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.jag, *.bug</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>Pygments Lexer for JAGS.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.math.JuliaConsoleLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.math.</code><code class="descname">JuliaConsoleLexer</code><a class="headerlink" href="#pygments.lexers.math.JuliaConsoleLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">jlcon</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>For Julia console sessions. Modeled after MatlabSessionLexer.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.math.JuliaLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.math.</code><code class="descname">JuliaLexer</code><a class="headerlink" href="#pygments.lexers.math.JuliaLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">julia, jl</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.jl</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-julia, application/x-julia</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://julialang.org/">Julia</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.math.MathematicaLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.math.</code><code class="descname">MathematicaLexer</code><a class="headerlink" href="#pygments.lexers.math.MathematicaLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">mathematica, mma, nb</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.nb, *.cdf, *.nbp, *.ma</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/mathematica, application/vnd.wolfram.mathematica, application/vnd.wolfram.mathematica.package, application/vnd.wolfram.cdf</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for <a class="reference external" href="http://www.wolfram.com/mathematica/">Mathematica</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.math.MatlabLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.math.</code><code class="descname">MatlabLexer</code><a class="headerlink" href="#pygments.lexers.math.MatlabLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">matlab</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.m</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/matlab</td>
+</tr>
+</tbody>
+</table>
+<p>For Matlab source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.10.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.math.MatlabSessionLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.math.</code><code class="descname">MatlabSessionLexer</code><a class="headerlink" href="#pygments.lexers.math.MatlabSessionLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">matlabsession</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>For Matlab sessions. Modeled after PythonConsoleLexer.
+Contributed by Ken Schutte <<a class="reference external" href="mailto:kschutte%40csail.mit.edu">kschutte<span>@</span>csail<span>.</span>mit<span>.</span>edu</a>>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.10.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.math.MuPADLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.math.</code><code class="descname">MuPADLexer</code><a class="headerlink" href="#pygments.lexers.math.MuPADLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">mupad</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.mu</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>A <a class="reference external" href="http://www.mupad.com">MuPAD</a> lexer.
+Contributed by Christopher Creutzig <<a class="reference external" href="mailto:christopher%40creutzig.de">christopher<span>@</span>creutzig<span>.</span>de</a>>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.8.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.math.NumPyLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.math.</code><code class="descname">NumPyLexer</code><a class="headerlink" href="#pygments.lexers.math.NumPyLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">numpy</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>A Python lexer recognizing Numerical Python builtins.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.10.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.math.OctaveLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.math.</code><code class="descname">OctaveLexer</code><a class="headerlink" href="#pygments.lexers.math.OctaveLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">octave</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.m</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/octave</td>
+</tr>
+</tbody>
+</table>
+<p>For GNU Octave source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.math.RConsoleLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.math.</code><code class="descname">RConsoleLexer</code><a class="headerlink" href="#pygments.lexers.math.RConsoleLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">rconsole, rout</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.Rout</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>For R console transcripts or R CMD BATCH output files.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.math.RdLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.math.</code><code class="descname">RdLexer</code><a class="headerlink" href="#pygments.lexers.math.RdLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">rd</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.Rd</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-r-doc</td>
+</tr>
+</tbody>
+</table>
+<p>Pygments Lexer for R documentation (Rd) files</p>
+<p>This is a very minimal implementation, highlighting little more
+than the macros. A description of Rd syntax is found in <a class="reference external" href="http://cran.r-project.org/doc/manuals/R-exts.html">Writing R
+Extensions</a>
+and <a class="reference external" href="developer.r-project.org/parseRd.pdf">Parsing Rd files</a>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.math.SLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.math.</code><code class="descname">SLexer</code><a class="headerlink" href="#pygments.lexers.math.SLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">splus, s, r</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.S, *.R, .Rhistory, .Rprofile</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/S-plus, text/S, text/x-r-source, text/x-r, text/x-R, text/x-r-history, text/x-r-profile</td>
+</tr>
+</tbody>
+</table>
+<p>For S, S-plus, and R source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.10.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.math.ScilabLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.math.</code><code class="descname">ScilabLexer</code><a class="headerlink" href="#pygments.lexers.math.ScilabLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">scilab</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.sci, *.sce, *.tst</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/scilab</td>
+</tr>
+</tbody>
+</table>
+<p>For Scilab source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.math.StanLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.math.</code><code class="descname">StanLexer</code><a class="headerlink" href="#pygments.lexers.math.StanLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">stan</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.stan</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>Pygments Lexer for Stan models.</p>
+<p>The Stan modeling language is specified in the <em>Stan 2.0.1
+Modeling Language Manual</em> <a class="reference external" href="https://github.com/stan-dev/stan/releases/download/v2.0.1/stan-reference-2.0.1.pdf">pdf</a></p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<span class="target" id="module-pygments.lexers.other"></span></div>
+<div class="section" id="lexers-for-other-languages">
+<h2>Lexers for other languages<a class="headerlink" href="#lexers-for-other-languages" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="pygments.lexers.other.ABAPLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">ABAPLexer</code><a class="headerlink" href="#pygments.lexers.other.ABAPLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">abap</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.abap</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-abap</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for ABAP, SAP’s integrated language.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.APLLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">APLLexer</code><a class="headerlink" href="#pygments.lexers.other.APLLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">apl</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.apl</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>A simple APL lexer.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.AppleScriptLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">AppleScriptLexer</code><a class="headerlink" href="#pygments.lexers.other.AppleScriptLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">applescript</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.applescript</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://developer.apple.com/documentation/AppleScript/Conceptual/AppleScriptLangGuide">AppleScript source code</a>,
+including <a class="reference external" href="http://developer.apple.com/documentation/AppleScript/Reference/StudioReference">AppleScript Studio</a>.
+Contributed by Andreas Amann <<a class="reference external" href="mailto:aamann%40mac.com">aamann<span>@</span>mac<span>.</span>com</a>>.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.AsymptoteLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">AsymptoteLexer</code><a class="headerlink" href="#pygments.lexers.other.AsymptoteLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">asy, asymptote</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.asy</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-asymptote</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://asymptote.sf.net/">Asymptote</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.2.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.AutoItLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">AutoItLexer</code><a class="headerlink" href="#pygments.lexers.other.AutoItLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">autoit</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.au3</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-autoit</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.autoitscript.com/site/autoit/">AutoIt</a> files.</p>
+<p>AutoIt is a freeware BASIC-like scripting language
+designed for automating the Windows GUI and general scripting</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.AutohotkeyLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">AutohotkeyLexer</code><a class="headerlink" href="#pygments.lexers.other.AutohotkeyLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">ahk, autohotkey</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.ahk, *.ahkl</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-autohotkey</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.autohotkey.com/">autohotkey</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.4.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.AwkLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">AwkLexer</code><a class="headerlink" href="#pygments.lexers.other.AwkLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">awk, gawk, mawk, nawk</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.awk</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-awk</td>
+</tr>
+</tbody>
+</table>
+<p>For Awk scripts.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.BefungeLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">BefungeLexer</code><a class="headerlink" href="#pygments.lexers.other.BefungeLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">befunge</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.befunge</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-befunge</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for the esoteric <a class="reference external" href="http://en.wikipedia.org/wiki/Befunge">Befunge</a>
+language.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.7.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.BrainfuckLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">BrainfuckLexer</code><a class="headerlink" href="#pygments.lexers.other.BrainfuckLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">brainfuck, bf</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.bf, *.b</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-brainfuck</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for the esoteric <a class="reference external" href="http://www.muppetlabs.com/~breadbox/bf/">BrainFuck</a>
+language.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.BroLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">BroLexer</code><a class="headerlink" href="#pygments.lexers.other.BroLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">bro</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.bro</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://bro-ids.org/">Bro</a> scripts.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.CbmBasicV2Lexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">CbmBasicV2Lexer</code><a class="headerlink" href="#pygments.lexers.other.CbmBasicV2Lexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">cbmbas</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.bas</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>For CBM BASIC V2 sources.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.Cfengine3Lexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">Cfengine3Lexer</code><a class="headerlink" href="#pygments.lexers.other.Cfengine3Lexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">cfengine3, cf3</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.cf</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for <a class="reference external" href="http://cfengine.org">CFEngine3</a> policy files.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.ECLLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">ECLLexer</code><a class="headerlink" href="#pygments.lexers.other.ECLLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">ecl</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.ecl</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-ecl</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for the declarative big-data <a class="reference external" href="http://hpccsystems.com/community/docs/ecl-language-reference/html">ECL</a>
+language.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.GherkinLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">GherkinLexer</code><a class="headerlink" href="#pygments.lexers.other.GherkinLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">cucumber, gherkin</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.feature</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-gherkin</td>
+</tr>
+</tbody>
+</table>
+<p>For <cite>Gherkin <http://github.com/aslakhellesoy/gherkin/></cite> syntax.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.2.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.GnuplotLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">GnuplotLexer</code><a class="headerlink" href="#pygments.lexers.other.GnuplotLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">gnuplot</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.plot, *.plt</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-gnuplot</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://gnuplot.info/">Gnuplot</a> plotting scripts.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.11.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.GoodDataCLLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">GoodDataCLLexer</code><a class="headerlink" href="#pygments.lexers.other.GoodDataCLLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">gooddata-cl</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.gdc</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-gooddata-cl</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for <a class="reference external" href="http://github.com/gooddata/GoodData-CL/raw/master/cli/src/main/resources/com/gooddata/processor/COMMANDS.txt">GoodData-CL</a>
+script files.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.4.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.HybrisLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">HybrisLexer</code><a class="headerlink" href="#pygments.lexers.other.HybrisLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">hybris, hy</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.hy, *.hyb</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-hybris, application/x-hybris</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.hybris-lang.org">Hybris</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.4.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.KconfigLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">KconfigLexer</code><a class="headerlink" href="#pygments.lexers.other.KconfigLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">kconfig, menuconfig, linux-config, kernel-config</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">Kconfig, *Config.in*, external.in*, standard-modules.in</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-kconfig</td>
+</tr>
+</tbody>
+</table>
+<p>For Linux-style Kconfig files.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.LogtalkLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">LogtalkLexer</code><a class="headerlink" href="#pygments.lexers.other.LogtalkLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">logtalk</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.lgt</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-logtalk</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://logtalk.org/">Logtalk</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.10.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.MOOCodeLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">MOOCodeLexer</code><a class="headerlink" href="#pygments.lexers.other.MOOCodeLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">moocode, moo</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.moo</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-moocode</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.moo.mud.org/">MOOCode</a> (the MOO scripting
+language).</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.9.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.MaqlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">MaqlLexer</code><a class="headerlink" href="#pygments.lexers.other.MaqlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">maql</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.maql</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-gooddata-maql, application/x-gooddata-maql</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for <a class="reference external" href="https://secure.gooddata.com/docs/html/advanced.metric.tutorial.html">GoodData MAQL</a>
+scripts.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.4.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.ModelicaLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">ModelicaLexer</code><a class="headerlink" href="#pygments.lexers.other.ModelicaLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">modelica</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.mo</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-modelica</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.modelica.org/">Modelica</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.MscgenLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">MscgenLexer</code><a class="headerlink" href="#pygments.lexers.other.MscgenLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">mscgen, msc</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.msc</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.mcternan.me.uk/mscgen/">Mscgen</a> files.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.NSISLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">NSISLexer</code><a class="headerlink" href="#pygments.lexers.other.NSISLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">nsis, nsi, nsh</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.nsi, *.nsh</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-nsis</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://nsis.sourceforge.net/">NSIS</a> scripts.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.NewspeakLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">NewspeakLexer</code><a class="headerlink" href="#pygments.lexers.other.NewspeakLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">newspeak</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.ns2</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-newspeak</td>
+</tr>
+</tbody>
+</table>
+<p>For <cite>Newspeak <http://newspeaklanguage.org/></cite> syntax.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.OpenEdgeLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">OpenEdgeLexer</code><a class="headerlink" href="#pygments.lexers.other.OpenEdgeLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">openedge, abl, progress</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.p, *.cls</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-openedge, application/x-openedge</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for <a class="reference external" href="http://web.progress.com/en/openedge/abl.html">OpenEdge ABL (formerly Progress)</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.PostScriptLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">PostScriptLexer</code><a class="headerlink" href="#pygments.lexers.other.PostScriptLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">postscript, postscr</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.ps, *.eps</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/postscript</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for PostScript files.</p>
+<p>The PostScript Language Reference published by Adobe at
+<<a class="reference external" href="http://partners.adobe.com/public/developer/en/ps/PLRM.pdf">http://partners.adobe.com/public/developer/en/ps/PLRM.pdf</a>>
+is the authority for this.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.4.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.PovrayLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">PovrayLexer</code><a class="headerlink" href="#pygments.lexers.other.PovrayLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">pov</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.pov, *.inc</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-povray</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.povray.org/">Persistence of Vision Raytracer</a> files.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.11.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.ProtoBufLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">ProtoBufLexer</code><a class="headerlink" href="#pygments.lexers.other.ProtoBufLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">protobuf, proto</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.proto</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for <a class="reference external" href="http://code.google.com/p/protobuf/">Protocol Buffer</a>
+definition files.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.4.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.PuppetLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">PuppetLexer</code><a class="headerlink" href="#pygments.lexers.other.PuppetLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">puppet</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.pp</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://puppetlabs.com/">Puppet</a> configuration DSL.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.RPMSpecLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">RPMSpecLexer</code><a class="headerlink" href="#pygments.lexers.other.RPMSpecLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">spec</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.spec</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-rpm-spec</td>
+</tr>
+</tbody>
+</table>
+<p>For RPM <code class="docutils literal"><span class="pre">.spec</span></code> files.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.RebolLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">RebolLexer</code><a class="headerlink" href="#pygments.lexers.other.RebolLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">rebol</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.r, *.r3</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-rebol</td>
+</tr>
+</tbody>
+</table>
+<p>A <a class="reference external" href="http://www.rebol.com/">REBOL</a> lexer.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.RedcodeLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">RedcodeLexer</code><a class="headerlink" href="#pygments.lexers.other.RedcodeLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">redcode</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.cw</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>A simple Redcode lexer based on ICWS‘94.
+Contributed by Adam Blinkinsop <<a class="reference external" href="mailto:blinks%40acm.org">blinks<span>@</span>acm<span>.</span>org</a>>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.8.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.RexxLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">RexxLexer</code><a class="headerlink" href="#pygments.lexers.other.RexxLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">rexx, arexx</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.rexx, *.rex, *.rx, *.arexx</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-rexx</td>
+</tr>
+</tbody>
+</table>
+<p><a class="reference external" href="http://www.rexxinfo.org/">Rexx</a> is a scripting language available for
+a wide range of different platforms with its roots found on mainframe
+systems. It is popular for I/O- and data based tasks and can act as glue
+language to bind different applications together.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.RobotFrameworkLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">RobotFrameworkLexer</code><a class="headerlink" href="#pygments.lexers.other.RobotFrameworkLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">robotframework</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.txt, *.robot</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-robotframework</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://robotframework.org">Robot Framework</a> test data.</p>
+<p>Supports both space and pipe separated plain text formats.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.SmalltalkLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">SmalltalkLexer</code><a class="headerlink" href="#pygments.lexers.other.SmalltalkLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">smalltalk, squeak, st</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.st</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-smalltalk</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.smalltalk.org/">Smalltalk</a> syntax.
+Contributed by Stefan Matthias Aust.
+Rewritten by Nils Winter.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.10.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.SnobolLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">SnobolLexer</code><a class="headerlink" href="#pygments.lexers.other.SnobolLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">snobol</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.snobol</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-snobol</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for the SNOBOL4 programming language.</p>
+<p>Recognizes the common ASCII equivalents of the original SNOBOL4 operators.
+Does not require spaces around binary operators.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.SourcePawnLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">SourcePawnLexer</code><a class="headerlink" href="#pygments.lexers.other.SourcePawnLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">sp</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.sp</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-sourcepawn</td>
+</tr>
+</tbody>
+</table>
+<p>For SourcePawn source code with preprocessor directives.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.UrbiscriptLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">UrbiscriptLexer</code><a class="headerlink" href="#pygments.lexers.other.UrbiscriptLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">urbiscript</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.u</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-urbiscript</td>
+</tr>
+</tbody>
+</table>
+<p>For UrbiScript source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.other.VGLLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.other.</code><code class="descname">VGLLexer</code><a class="headerlink" href="#pygments.lexers.other.VGLLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">vgl</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.rpf</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.thermoscientific.com/samplemanager">SampleManager VGL</a>
+source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<span class="target" id="module-pygments.lexers.parsers"></span></div>
+<div class="section" id="lexers-for-parser-generators">
+<h2>Lexers for parser generators<a class="headerlink" href="#lexers-for-parser-generators" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="pygments.lexers.parsers.AntlrActionScriptLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.parsers.</code><code class="descname">AntlrActionScriptLexer</code><a class="headerlink" href="#pygments.lexers.parsers.AntlrActionScriptLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">antlr-as, antlr-actionscript</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.G, *.g</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p><a class="reference external" href="http://www.antlr.org/">ANTLR</a> with ActionScript Target</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.parsers.AntlrCSharpLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.parsers.</code><code class="descname">AntlrCSharpLexer</code><a class="headerlink" href="#pygments.lexers.parsers.AntlrCSharpLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">antlr-csharp, antlr-c#</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.G, *.g</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p><a class="reference external" href="http://www.antlr.org/">ANTLR</a> with C# Target</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.parsers.AntlrCppLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.parsers.</code><code class="descname">AntlrCppLexer</code><a class="headerlink" href="#pygments.lexers.parsers.AntlrCppLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">antlr-cpp</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.G, *.g</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p><a class="reference external" href="http://www.antlr.org/">ANTLR</a> with CPP Target</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.parsers.AntlrJavaLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.parsers.</code><code class="descname">AntlrJavaLexer</code><a class="headerlink" href="#pygments.lexers.parsers.AntlrJavaLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">antlr-java</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.G, *.g</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p><a class="reference external" href="http://www.antlr.org/">ANTLR</a> with Java Target</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1..</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.parsers.AntlrLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.parsers.</code><code class="descname">AntlrLexer</code><a class="headerlink" href="#pygments.lexers.parsers.AntlrLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">antlr</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>Generic <a class="reference external" href="http://www.antlr.org/">ANTLR</a> Lexer.
+Should not be called directly, instead
+use DelegatingLexer for your target language.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.parsers.AntlrObjectiveCLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.parsers.</code><code class="descname">AntlrObjectiveCLexer</code><a class="headerlink" href="#pygments.lexers.parsers.AntlrObjectiveCLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">antlr-objc</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.G, *.g</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p><a class="reference external" href="http://www.antlr.org/">ANTLR</a> with Objective-C Target</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.parsers.AntlrPerlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.parsers.</code><code class="descname">AntlrPerlLexer</code><a class="headerlink" href="#pygments.lexers.parsers.AntlrPerlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">antlr-perl</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.G, *.g</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p><a class="reference external" href="http://www.antlr.org/">ANTLR</a> with Perl Target</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.parsers.AntlrPythonLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.parsers.</code><code class="descname">AntlrPythonLexer</code><a class="headerlink" href="#pygments.lexers.parsers.AntlrPythonLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">antlr-python</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.G, *.g</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p><a class="reference external" href="http://www.antlr.org/">ANTLR</a> with Python Target</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.parsers.AntlrRubyLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.parsers.</code><code class="descname">AntlrRubyLexer</code><a class="headerlink" href="#pygments.lexers.parsers.AntlrRubyLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">antlr-ruby, antlr-rb</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.G, *.g</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p><a class="reference external" href="http://www.antlr.org/">ANTLR</a> with Ruby Target</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.parsers.RagelCLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.parsers.</code><code class="descname">RagelCLexer</code><a class="headerlink" href="#pygments.lexers.parsers.RagelCLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">ragel-c</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.rl</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>A lexer for <a class="reference external" href="http://www.complang.org/ragel/">Ragel</a> in a C host file.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.parsers.RagelCppLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.parsers.</code><code class="descname">RagelCppLexer</code><a class="headerlink" href="#pygments.lexers.parsers.RagelCppLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">ragel-cpp</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.rl</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>A lexer for <a class="reference external" href="http://www.complang.org/ragel/">Ragel</a> in a CPP host file.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.parsers.RagelDLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.parsers.</code><code class="descname">RagelDLexer</code><a class="headerlink" href="#pygments.lexers.parsers.RagelDLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">ragel-d</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.rl</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>A lexer for <a class="reference external" href="http://www.complang.org/ragel/">Ragel</a> in a D host file.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.parsers.RagelEmbeddedLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.parsers.</code><code class="descname">RagelEmbeddedLexer</code><a class="headerlink" href="#pygments.lexers.parsers.RagelEmbeddedLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">ragel-em</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.rl</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>A lexer for <a class="reference external" href="http://www.complang.org/ragel/">Ragel</a> embedded in a host language file.</p>
+<p>This will only highlight Ragel statements. If you want host language
+highlighting then call the language-specific Ragel lexer.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.parsers.RagelJavaLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.parsers.</code><code class="descname">RagelJavaLexer</code><a class="headerlink" href="#pygments.lexers.parsers.RagelJavaLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">ragel-java</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.rl</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>A lexer for <a class="reference external" href="http://www.complang.org/ragel/">Ragel</a> in a Java host file.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.parsers.RagelLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.parsers.</code><code class="descname">RagelLexer</code><a class="headerlink" href="#pygments.lexers.parsers.RagelLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">ragel</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>A pure <a class="reference external" href="http://www.complang.org/ragel/">Ragel</a> lexer. Use this for
+fragments of Ragel. For <code class="docutils literal"><span class="pre">.rl</span></code> files, use RagelEmbeddedLexer instead
+(or one of the language-specific subclasses).</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.parsers.RagelObjectiveCLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.parsers.</code><code class="descname">RagelObjectiveCLexer</code><a class="headerlink" href="#pygments.lexers.parsers.RagelObjectiveCLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">ragel-objc</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.rl</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>A lexer for <a class="reference external" href="http://www.complang.org/ragel/">Ragel</a> in an Objective C host file.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.parsers.RagelRubyLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.parsers.</code><code class="descname">RagelRubyLexer</code><a class="headerlink" href="#pygments.lexers.parsers.RagelRubyLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">ragel-ruby, ragel-rb</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.rl</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>A lexer for <a class="reference external" href="http://www.complang.org/ragel/">Ragel</a> in a Ruby host file.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.parsers.TreetopLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.parsers.</code><code class="descname">TreetopLexer</code><a class="headerlink" href="#pygments.lexers.parsers.TreetopLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">treetop</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.treetop, *.tt</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>A lexer for <a class="reference external" href="http://treetop.rubyforge.org/">Treetop</a> grammars.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<span class="target" id="module-pygments.lexers.shell"></span></div>
+<div class="section" id="lexers-for-various-shells">
+<h2>Lexers for various shells<a class="headerlink" href="#lexers-for-various-shells" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="pygments.lexers.shell.BashLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.shell.</code><code class="descname">BashLexer</code><a class="headerlink" href="#pygments.lexers.shell.BashLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">bash, sh, ksh</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.sh, *.ksh, *.bash, *.ebuild, *.eclass, .bashrc, bashrc, .bash\*, bash\*, PKGBUILD</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-sh, application/x-shellscript</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for (ba|k|)sh shell scripts.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.shell.BashSessionLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.shell.</code><code class="descname">BashSessionLexer</code><a class="headerlink" href="#pygments.lexers.shell.BashSessionLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">console</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.sh-session</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-shell-session</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for simplistic shell sessions.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.shell.BatchLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.shell.</code><code class="descname">BatchLexer</code><a class="headerlink" href="#pygments.lexers.shell.BatchLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">bat, batch, dosbatch, winbatch</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.bat, *.cmd</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-dos-batch</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for the DOS/Windows Batch file format.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.7.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.shell.PowerShellLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.shell.</code><code class="descname">PowerShellLexer</code><a class="headerlink" href="#pygments.lexers.shell.PowerShellLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">powershell, posh, ps1, psm1</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.ps1, *.psm1</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-powershell</td>
+</tr>
+</tbody>
+</table>
+<p>For Windows PowerShell code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.shell.ShellSessionLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.shell.</code><code class="descname">ShellSessionLexer</code><a class="headerlink" href="#pygments.lexers.shell.ShellSessionLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">shell-session</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.shell-session</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-sh-session</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for shell sessions that works with different command prompts</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.shell.TcshLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.shell.</code><code class="descname">TcshLexer</code><a class="headerlink" href="#pygments.lexers.shell.TcshLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">tcsh, csh</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.tcsh, *.csh</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-csh</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for tcsh scripts.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.10.</span></p>
+</div>
+</dd></dl>
+
+<span class="target" id="module-pygments.lexers.special"></span></div>
+<div class="section" id="special-lexers">
+<h2>Special lexers<a class="headerlink" href="#special-lexers" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="pygments.lexers.special.RawTokenLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.special.</code><code class="descname">RawTokenLexer</code><a class="headerlink" href="#pygments.lexers.special.RawTokenLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">raw</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-pygments-tokens</td>
+</tr>
+</tbody>
+</table>
+<p>Recreate a token stream formatted with the <cite>RawTokenFormatter</cite>. This
+lexer raises exceptions during parsing if the token stream in the
+file is malformed.</p>
+<p>Additional options accepted:</p>
+<dl class="docutils">
+<dt><cite>compress</cite></dt>
+<dd>If set to <code class="docutils literal"><span class="pre">"gz"</span></code> or <code class="docutils literal"><span class="pre">"bz2"</span></code>, decompress the token stream with
+the given compression algorithm before lexing (default: <code class="docutils literal"><span class="pre">""</span></code>).</dd>
+</dl>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.special.TextLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.special.</code><code class="descname">TextLexer</code><a class="headerlink" href="#pygments.lexers.special.TextLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">text</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.txt</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/plain</td>
+</tr>
+</tbody>
+</table>
+<p>“Null” lexer, doesn’t highlight anything.</p>
+</dd></dl>
+
+<span class="target" id="module-pygments.lexers.sql"></span></div>
+<div class="section" id="lexers-for-various-sql-dialects-and-related-interactive-sessions">
+<h2>Lexers for various SQL dialects and related interactive sessions<a class="headerlink" href="#lexers-for-various-sql-dialects-and-related-interactive-sessions" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="pygments.lexers.sql.MySqlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.sql.</code><code class="descname">MySqlLexer</code><a class="headerlink" href="#pygments.lexers.sql.MySqlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">mysql</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-mysql</td>
+</tr>
+</tbody>
+</table>
+<p>Special lexer for MySQL.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.sql.PlPgsqlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.sql.</code><code class="descname">PlPgsqlLexer</code><a class="headerlink" href="#pygments.lexers.sql.PlPgsqlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">plpgsql</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-plpgsql</td>
+</tr>
+</tbody>
+</table>
+<p>Handle the extra syntax in Pl/pgSQL language.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.sql.PostgresConsoleLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.sql.</code><code class="descname">PostgresConsoleLexer</code><a class="headerlink" href="#pygments.lexers.sql.PostgresConsoleLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">psql, postgresql-console, postgres-console</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-postgresql-psql</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for psql sessions.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.sql.PostgresLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.sql.</code><code class="descname">PostgresLexer</code><a class="headerlink" href="#pygments.lexers.sql.PostgresLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">postgresql, postgres</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-postgresql</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for the PostgreSQL dialect of SQL.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.sql.SqlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.sql.</code><code class="descname">SqlLexer</code><a class="headerlink" href="#pygments.lexers.sql.SqlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">sql</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.sql</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-sql</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for Structured Query Language. Currently, this lexer does
+not recognize any special syntax except ANSI SQL.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.sql.SqliteConsoleLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.sql.</code><code class="descname">SqliteConsoleLexer</code><a class="headerlink" href="#pygments.lexers.sql.SqliteConsoleLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">sqlite3</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.sqlite3-console</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-sqlite3-console</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for example sessions using sqlite3.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.11.</span></p>
+</div>
+</dd></dl>
+
+<span class="target" id="module-pygments.lexers.templates"></span></div>
+<div class="section" id="lexers-for-various-template-engines-markup">
+<h2>Lexers for various template engines’ markup<a class="headerlink" href="#lexers-for-various-template-engines-markup" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="pygments.lexers.templates.CheetahHtmlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">CheetahHtmlLexer</code><a class="headerlink" href="#pygments.lexers.templates.CheetahHtmlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">html+cheetah, html+spitfire, htmlcheetah</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/html+cheetah, text/html+spitfire</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>CheetahLexer</cite> that highlights unlexer data
+with the <cite>HtmlLexer</cite>.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.CheetahJavascriptLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">CheetahJavascriptLexer</code><a class="headerlink" href="#pygments.lexers.templates.CheetahJavascriptLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">js+cheetah, javascript+cheetah, js+spitfire, javascript+spitfire</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-javascript+cheetah, text/x-javascript+cheetah, text/javascript+cheetah, application/x-javascript+spitfire, text/x-javascript+spitfire, text/javascript+spitfire</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>CheetahLexer</cite> that highlights unlexer data
+with the <cite>JavascriptLexer</cite>.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.CheetahLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">CheetahLexer</code><a class="headerlink" href="#pygments.lexers.templates.CheetahLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">cheetah, spitfire</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.tmpl, *.spt</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-cheetah, application/x-spitfire</td>
+</tr>
+</tbody>
+</table>
+<p>Generic <a class="reference external" href="http://www.cheetahtemplate.org/">cheetah templates</a> lexer. Code that isn’t Cheetah
+markup is yielded as <cite>Token.Other</cite>. This also works for
+<a class="reference external" href="http://code.google.com/p/spitfire/">spitfire templates</a> which use the same syntax.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.CheetahXmlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">CheetahXmlLexer</code><a class="headerlink" href="#pygments.lexers.templates.CheetahXmlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">xml+cheetah, xml+spitfire</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/xml+cheetah, application/xml+spitfire</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>CheetahLexer</cite> that highlights unlexer data
+with the <cite>XmlLexer</cite>.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.ColdfusionCFCLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">ColdfusionCFCLexer</code><a class="headerlink" href="#pygments.lexers.templates.ColdfusionCFCLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">cfc</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.cfc</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>Coldfusion markup/script components</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.ColdfusionHtmlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">ColdfusionHtmlLexer</code><a class="headerlink" href="#pygments.lexers.templates.ColdfusionHtmlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">cfm</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.cfm, *.cfml</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-coldfusion</td>
+</tr>
+</tbody>
+</table>
+<p>Coldfusion markup in html</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.ColdfusionLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">ColdfusionLexer</code><a class="headerlink" href="#pygments.lexers.templates.ColdfusionLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">cfs</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>Coldfusion statements</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.CssDjangoLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">CssDjangoLexer</code><a class="headerlink" href="#pygments.lexers.templates.CssDjangoLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">css+django, css+jinja</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/css+django, text/css+jinja</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>DjangoLexer</cite> that highlights unlexed data with the
+<cite>CssLexer</cite>.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.CssErbLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">CssErbLexer</code><a class="headerlink" href="#pygments.lexers.templates.CssErbLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">css+erb, css+ruby</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/css+ruby</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of <cite>ErbLexer</cite> which highlights unlexed data with the <cite>CssLexer</cite>.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.CssGenshiLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">CssGenshiLexer</code><a class="headerlink" href="#pygments.lexers.templates.CssGenshiLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">css+genshitext, css+genshi</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/css+genshi</td>
+</tr>
+</tbody>
+</table>
+<p>A lexer that highlights CSS definitions in genshi text templates.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.CssPhpLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">CssPhpLexer</code><a class="headerlink" href="#pygments.lexers.templates.CssPhpLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">css+php</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/css+php</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of <cite>PhpLexer</cite> which highlights unmatched data with the <cite>CssLexer</cite>.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.CssSmartyLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">CssSmartyLexer</code><a class="headerlink" href="#pygments.lexers.templates.CssSmartyLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">css+smarty</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/css+smarty</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>SmartyLexer</cite> that highlights unlexed data with the
+<cite>CssLexer</cite>.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.DjangoLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">DjangoLexer</code><a class="headerlink" href="#pygments.lexers.templates.DjangoLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">django, jinja</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-django-templating, application/x-jinja</td>
+</tr>
+</tbody>
+</table>
+<p>Generic <a class="reference external" href="http://www.djangoproject.com/documentation/templates/">django</a>
+and <a class="reference external" href="http://wsgiarea.pocoo.org/jinja/">jinja</a> template lexer.</p>
+<p>It just highlights django/jinja code between the preprocessor directives,
+other data is left untouched by the lexer.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.ErbLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">ErbLexer</code><a class="headerlink" href="#pygments.lexers.templates.ErbLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">erb</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-ruby-templating</td>
+</tr>
+</tbody>
+</table>
+<p>Generic <a class="reference external" href="http://ruby-doc.org/core/classes/ERB.html">ERB</a> (Ruby Templating)
+lexer.</p>
+<p>Just highlights ruby code between the preprocessor directives, other data
+is left untouched by the lexer.</p>
+<p>All options are also forwarded to the <cite>RubyLexer</cite>.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.EvoqueHtmlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">EvoqueHtmlLexer</code><a class="headerlink" href="#pygments.lexers.templates.EvoqueHtmlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">html+evoque</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.html</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/html+evoque</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>EvoqueLexer</cite> that highlights unlexed data with the
+<cite>HtmlLexer</cite>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.EvoqueLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">EvoqueLexer</code><a class="headerlink" href="#pygments.lexers.templates.EvoqueLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">evoque</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.evoque</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-evoque</td>
+</tr>
+</tbody>
+</table>
+<p>For files using the Evoque templating system.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.EvoqueXmlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">EvoqueXmlLexer</code><a class="headerlink" href="#pygments.lexers.templates.EvoqueXmlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">xml+evoque</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.xml</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/xml+evoque</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>EvoqueLexer</cite> that highlights unlexed data with the
+<cite>XmlLexer</cite>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.GenshiLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">GenshiLexer</code><a class="headerlink" href="#pygments.lexers.templates.GenshiLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">genshi, kid, xml+genshi, xml+kid</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.kid</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-genshi, application/x-kid</td>
+</tr>
+</tbody>
+</table>
+<p>A lexer that highlights <a class="reference external" href="http://genshi.edgewall.org/">genshi</a> and
+<a class="reference external" href="http://kid-templating.org/">kid</a> kid XML templates.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.GenshiTextLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">GenshiTextLexer</code><a class="headerlink" href="#pygments.lexers.templates.GenshiTextLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">genshitext</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-genshi-text, text/x-genshi</td>
+</tr>
+</tbody>
+</table>
+<p>A lexer that highlights <a class="reference external" href="http://genshi.edgewall.org/">genshi</a> text
+templates.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.HtmlDjangoLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">HtmlDjangoLexer</code><a class="headerlink" href="#pygments.lexers.templates.HtmlDjangoLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">html+django, html+jinja, htmldjango</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/html+django, text/html+jinja</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>DjangoLexer</cite> that highighlights unlexed data with the
+<cite>HtmlLexer</cite>.</p>
+<p>Nested Javascript and CSS is highlighted too.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.HtmlGenshiLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">HtmlGenshiLexer</code><a class="headerlink" href="#pygments.lexers.templates.HtmlGenshiLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">html+genshi, html+kid</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/html+genshi</td>
+</tr>
+</tbody>
+</table>
+<p>A lexer that highlights <a class="reference external" href="http://genshi.edgewall.org/">genshi</a> and
+<a class="reference external" href="http://kid-templating.org/">kid</a> kid HTML templates.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.HtmlPhpLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">HtmlPhpLexer</code><a class="headerlink" href="#pygments.lexers.templates.HtmlPhpLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">html+php</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.phtml</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-php, application/x-httpd-php, application/x-httpd-php3, application/x-httpd-php4, application/x-httpd-php5</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of <cite>PhpLexer</cite> that highlights unhandled data with the <cite>HtmlLexer</cite>.</p>
+<p>Nested Javascript and CSS is highlighted too.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.HtmlSmartyLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">HtmlSmartyLexer</code><a class="headerlink" href="#pygments.lexers.templates.HtmlSmartyLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">html+smarty</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/html+smarty</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>SmartyLexer</cite> that highighlights unlexed data with the
+<cite>HtmlLexer</cite>.</p>
+<p>Nested Javascript and CSS is highlighted too.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.JavascriptDjangoLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">JavascriptDjangoLexer</code><a class="headerlink" href="#pygments.lexers.templates.JavascriptDjangoLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">js+django, javascript+django, js+jinja, javascript+jinja</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-javascript+django, application/x-javascript+jinja, text/x-javascript+django, text/x-javascript+jinja, text/javascript+django, text/javascript+jinja</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>DjangoLexer</cite> that highlights unlexed data with the
+<cite>JavascriptLexer</cite>.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.JavascriptErbLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">JavascriptErbLexer</code><a class="headerlink" href="#pygments.lexers.templates.JavascriptErbLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">js+erb, javascript+erb, js+ruby, javascript+ruby</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-javascript+ruby, text/x-javascript+ruby, text/javascript+ruby</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of <cite>ErbLexer</cite> which highlights unlexed data with the
+<cite>JavascriptLexer</cite>.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.JavascriptGenshiLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">JavascriptGenshiLexer</code><a class="headerlink" href="#pygments.lexers.templates.JavascriptGenshiLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">js+genshitext, js+genshi, javascript+genshitext, javascript+genshi</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-javascript+genshi, text/x-javascript+genshi, text/javascript+genshi</td>
+</tr>
+</tbody>
+</table>
+<p>A lexer that highlights javascript code in genshi text templates.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.JavascriptPhpLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">JavascriptPhpLexer</code><a class="headerlink" href="#pygments.lexers.templates.JavascriptPhpLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">js+php, javascript+php</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-javascript+php, text/x-javascript+php, text/javascript+php</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of <cite>PhpLexer</cite> which highlights unmatched data with the
+<cite>JavascriptLexer</cite>.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.JavascriptSmartyLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">JavascriptSmartyLexer</code><a class="headerlink" href="#pygments.lexers.templates.JavascriptSmartyLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">js+smarty, javascript+smarty</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-javascript+smarty, text/x-javascript+smarty, text/javascript+smarty</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>SmartyLexer</cite> that highlights unlexed data with the
+<cite>JavascriptLexer</cite>.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.JspLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">JspLexer</code><a class="headerlink" href="#pygments.lexers.templates.JspLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">jsp</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.jsp</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-jsp</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for Java Server Pages.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.7.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.LassoCssLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">LassoCssLexer</code><a class="headerlink" href="#pygments.lexers.templates.LassoCssLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">css+lasso</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/css+lasso</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>LassoLexer</cite> which highlights unhandled data with the
+<cite>CssLexer</cite>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.LassoHtmlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">LassoHtmlLexer</code><a class="headerlink" href="#pygments.lexers.templates.LassoHtmlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">html+lasso</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/html+lasso, application/x-httpd-lasso, application/x-httpd-lasso[89]</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>LassoLexer</cite> which highlights unhandled data with the
+<cite>HtmlLexer</cite>.</p>
+<p>Nested JavaScript and CSS is also highlighted.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.LassoJavascriptLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">LassoJavascriptLexer</code><a class="headerlink" href="#pygments.lexers.templates.LassoJavascriptLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">js+lasso, javascript+lasso</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-javascript+lasso, text/x-javascript+lasso, text/javascript+lasso</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>LassoLexer</cite> which highlights unhandled data with the
+<cite>JavascriptLexer</cite>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.LassoXmlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">LassoXmlLexer</code><a class="headerlink" href="#pygments.lexers.templates.LassoXmlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">xml+lasso</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/xml+lasso</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>LassoLexer</cite> which highlights unhandled data with the
+<cite>XmlLexer</cite>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.MakoCssLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">MakoCssLexer</code><a class="headerlink" href="#pygments.lexers.templates.MakoCssLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">css+mako</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/css+mako</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>MakoLexer</cite> that highlights unlexer data
+with the <cite>CssLexer</cite>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.7.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.MakoHtmlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">MakoHtmlLexer</code><a class="headerlink" href="#pygments.lexers.templates.MakoHtmlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">html+mako</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/html+mako</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>MakoLexer</cite> that highlights unlexed data
+with the <cite>HtmlLexer</cite>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.7.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.MakoJavascriptLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">MakoJavascriptLexer</code><a class="headerlink" href="#pygments.lexers.templates.MakoJavascriptLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">js+mako, javascript+mako</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-javascript+mako, text/x-javascript+mako, text/javascript+mako</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>MakoLexer</cite> that highlights unlexer data
+with the <cite>JavascriptLexer</cite>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.7.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.MakoLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">MakoLexer</code><a class="headerlink" href="#pygments.lexers.templates.MakoLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">mako</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.mao</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-mako</td>
+</tr>
+</tbody>
+</table>
+<p>Generic <a class="reference external" href="http://www.makotemplates.org/">mako templates</a> lexer. Code that isn’t Mako
+markup is yielded as <cite>Token.Other</cite>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.7.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.MakoXmlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">MakoXmlLexer</code><a class="headerlink" href="#pygments.lexers.templates.MakoXmlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">xml+mako</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/xml+mako</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>MakoLexer</cite> that highlights unlexer data
+with the <cite>XmlLexer</cite>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.7.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.MasonLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">MasonLexer</code><a class="headerlink" href="#pygments.lexers.templates.MasonLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">mason</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.m, *.mhtml, *.mc, *.mi, autohandler, dhandler</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-mason</td>
+</tr>
+</tbody>
+</table>
+<p>Generic <a class="reference external" href="http://www.masonhq.com/">mason templates</a> lexer. Stolen from Myghty lexer. Code that isn’t
+Mason markup is HTML.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.4.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.MyghtyCssLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">MyghtyCssLexer</code><a class="headerlink" href="#pygments.lexers.templates.MyghtyCssLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">css+myghty</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/css+myghty</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>MyghtyLexer</cite> that highlights unlexer data
+with the <cite>CssLexer</cite>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.MyghtyHtmlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">MyghtyHtmlLexer</code><a class="headerlink" href="#pygments.lexers.templates.MyghtyHtmlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">html+myghty</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/html+myghty</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>MyghtyLexer</cite> that highlights unlexer data
+with the <cite>HtmlLexer</cite>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.MyghtyJavascriptLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">MyghtyJavascriptLexer</code><a class="headerlink" href="#pygments.lexers.templates.MyghtyJavascriptLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">js+myghty, javascript+myghty</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-javascript+myghty, text/x-javascript+myghty, text/javascript+mygthy</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>MyghtyLexer</cite> that highlights unlexer data
+with the <cite>JavascriptLexer</cite>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.MyghtyLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">MyghtyLexer</code><a class="headerlink" href="#pygments.lexers.templates.MyghtyLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">myghty</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.myt, autodelegate</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-myghty</td>
+</tr>
+</tbody>
+</table>
+<p>Generic <a class="reference external" href="http://www.myghty.org/">myghty templates</a> lexer. Code that isn’t Myghty
+markup is yielded as <cite>Token.Other</cite>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.MyghtyXmlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">MyghtyXmlLexer</code><a class="headerlink" href="#pygments.lexers.templates.MyghtyXmlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">xml+myghty</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/xml+myghty</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>MyghtyLexer</cite> that highlights unlexer data
+with the <cite>XmlLexer</cite>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.RhtmlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">RhtmlLexer</code><a class="headerlink" href="#pygments.lexers.templates.RhtmlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">rhtml, html+erb, html+ruby</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.rhtml</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/html+ruby</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the ERB lexer that highlights the unlexed data with the
+html lexer.</p>
+<p>Nested Javascript and CSS is highlighted too.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.SmartyLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">SmartyLexer</code><a class="headerlink" href="#pygments.lexers.templates.SmartyLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">smarty</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.tpl</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-smarty</td>
+</tr>
+</tbody>
+</table>
+<p>Generic <a class="reference external" href="http://smarty.php.net/">Smarty</a> template lexer.</p>
+<p>Just highlights smarty code between the preprocessor directives, other
+data is left untouched by the lexer.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.SspLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">SspLexer</code><a class="headerlink" href="#pygments.lexers.templates.SspLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">ssp</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.ssp</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-ssp</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for Scalate Server Pages.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.4.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.TeaTemplateLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">TeaTemplateLexer</code><a class="headerlink" href="#pygments.lexers.templates.TeaTemplateLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">tea</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.tea</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-tea</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for <a class="reference external" href="http://teatrove.org/">Tea Templates</a>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.VelocityHtmlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">VelocityHtmlLexer</code><a class="headerlink" href="#pygments.lexers.templates.VelocityHtmlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">html+velocity</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/html+velocity</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>VelocityLexer</cite> that highlights unlexer data
+with the <cite>HtmlLexer</cite>.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.VelocityLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">VelocityLexer</code><a class="headerlink" href="#pygments.lexers.templates.VelocityLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">velocity</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.vm, *.fhtml</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>Generic <a class="reference external" href="http://velocity.apache.org/">Velocity</a> template lexer.</p>
+<p>Just highlights velocity directives and variable references, other
+data is left untouched by the lexer.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.VelocityXmlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">VelocityXmlLexer</code><a class="headerlink" href="#pygments.lexers.templates.VelocityXmlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">xml+velocity</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/xml+velocity</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>VelocityLexer</cite> that highlights unlexer data
+with the <cite>XmlLexer</cite>.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.XmlDjangoLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">XmlDjangoLexer</code><a class="headerlink" href="#pygments.lexers.templates.XmlDjangoLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">xml+django, xml+jinja</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/xml+django, application/xml+jinja</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>DjangoLexer</cite> that highlights unlexed data with the
+<cite>XmlLexer</cite>.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.XmlErbLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">XmlErbLexer</code><a class="headerlink" href="#pygments.lexers.templates.XmlErbLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">xml+erb, xml+ruby</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/xml+ruby</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of <cite>ErbLexer</cite> which highlights data outside preprocessor
+directives with the <cite>XmlLexer</cite>.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.XmlPhpLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">XmlPhpLexer</code><a class="headerlink" href="#pygments.lexers.templates.XmlPhpLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">xml+php</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/xml+php</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of <cite>PhpLexer</cite> that higlights unhandled data with the <cite>XmlLexer</cite>.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.templates.XmlSmartyLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.templates.</code><code class="descname">XmlSmartyLexer</code><a class="headerlink" href="#pygments.lexers.templates.XmlSmartyLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">xml+smarty</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/xml+smarty</td>
+</tr>
+</tbody>
+</table>
+<p>Subclass of the <cite>SmartyLexer</cite> that highlights unlexed data with the
+<cite>XmlLexer</cite>.</p>
+</dd></dl>
+
+<span class="target" id="module-pygments.lexers.text"></span></div>
+<div class="section" id="lexers-for-non-source-code-file-types">
+<h2>Lexers for non-source code file types<a class="headerlink" href="#lexers-for-non-source-code-file-types" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="pygments.lexers.text.ApacheConfLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">ApacheConfLexer</code><a class="headerlink" href="#pygments.lexers.text.ApacheConfLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">apacheconf, aconf, apache</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">.htaccess, apache.conf, apache2.conf</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-apacheconf</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for configuration files following the Apache config file
+format.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.BBCodeLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">BBCodeLexer</code><a class="headerlink" href="#pygments.lexers.text.BBCodeLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">bbcode</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-bbcode</td>
+</tr>
+</tbody>
+</table>
+<p>A lexer that highlights BBCode(-like) syntax.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.BaseMakefileLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">BaseMakefileLexer</code><a class="headerlink" href="#pygments.lexers.text.BaseMakefileLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">basemake</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for simple Makefiles (no preprocessing).</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.10.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.CMakeLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">CMakeLexer</code><a class="headerlink" href="#pygments.lexers.text.CMakeLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">cmake</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.cmake, CMakeLists.txt</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-cmake</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for <a class="reference external" href="http://cmake.org/Wiki/CMake">CMake</a> files.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.2.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.DarcsPatchLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">DarcsPatchLexer</code><a class="headerlink" href="#pygments.lexers.text.DarcsPatchLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">dpatch</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.dpatch, *.darcspatch</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>DarcsPatchLexer is a lexer for the various versions of the darcs patch
+format. Examples of this format are derived by commands such as
+<code class="docutils literal"><span class="pre">darcs</span> <span class="pre">annotate</span> <span class="pre">--patch</span></code> and <code class="docutils literal"><span class="pre">darcs</span> <span class="pre">send</span></code>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.10.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.DebianControlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">DebianControlLexer</code><a class="headerlink" href="#pygments.lexers.text.DebianControlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">control, debcontrol</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">control</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for Debian <code class="docutils literal"><span class="pre">control</span></code> files and <code class="docutils literal"><span class="pre">apt-cache</span> <span class="pre">show</span> <span class="pre"><pkg></span></code> outputs.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.9.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.DiffLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">DiffLexer</code><a class="headerlink" href="#pygments.lexers.text.DiffLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">diff, udiff</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.diff, *.patch</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-diff, text/x-patch</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for unified or context-style diffs or patches.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.EbnfLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">EbnfLexer</code><a class="headerlink" href="#pygments.lexers.text.EbnfLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">ebnf</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.ebnf</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-ebnf</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for <a class="reference external" href="http://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_Form">ISO/IEC 14977 EBNF</a>
+grammars.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.GettextLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">GettextLexer</code><a class="headerlink" href="#pygments.lexers.text.GettextLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">pot, po</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.pot, *.po</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-gettext, text/x-gettext, text/gettext</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for Gettext catalog files.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.9.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.GroffLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">GroffLexer</code><a class="headerlink" href="#pygments.lexers.text.GroffLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">groff, nroff, man</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.[1234567], *.man</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-troff, text/troff</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for the (g)roff typesetting language, supporting groff
+extensions. Mainly useful for highlighting manpage sources.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.HttpLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">HttpLexer</code><a class="headerlink" href="#pygments.lexers.text.HttpLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">http</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for HTTP sessions.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.HxmlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">HxmlLexer</code><a class="headerlink" href="#pygments.lexers.text.HxmlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">haxeml, hxml</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.hxml</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for <a class="reference external" href="http://haxe.org/doc/compiler">haXe build</a> files.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.IniLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">IniLexer</code><a class="headerlink" href="#pygments.lexers.text.IniLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">ini, cfg, dosini</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.ini, *.cfg</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-ini</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for configuration files in INI style.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.IrcLogsLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">IrcLogsLexer</code><a class="headerlink" href="#pygments.lexers.text.IrcLogsLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">irc</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.weechatlog</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-irclog</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for IRC logs in <em>irssi</em>, <em>xchat</em> or <em>weechat</em> style.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.LighttpdConfLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">LighttpdConfLexer</code><a class="headerlink" href="#pygments.lexers.text.LighttpdConfLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">lighty, lighttpd</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-lighttpd-conf</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for <a class="reference external" href="http://lighttpd.net/">Lighttpd</a> configuration files.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.11.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.MakefileLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">MakefileLexer</code><a class="headerlink" href="#pygments.lexers.text.MakefileLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">make, makefile, mf, bsdmake</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.mak, *.mk, Makefile, makefile, Makefile.*, GNUmakefile</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-makefile</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for BSD and GNU make extensions (lenient enough to handle both in
+the same file even).</p>
+<p><em>Rewritten in Pygments 0.10.</em></p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.MoinWikiLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">MoinWikiLexer</code><a class="headerlink" href="#pygments.lexers.text.MoinWikiLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">trac-wiki, moin</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-trac-wiki</td>
+</tr>
+</tbody>
+</table>
+<p>For MoinMoin (and Trac) Wiki markup.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.7.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.NginxConfLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">NginxConfLexer</code><a class="headerlink" href="#pygments.lexers.text.NginxConfLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">nginx</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">None</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-nginx-conf</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for <a class="reference external" href="http://nginx.net/">Nginx</a> configuration files.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.11.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.PropertiesLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">PropertiesLexer</code><a class="headerlink" href="#pygments.lexers.text.PropertiesLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">properties, jproperties</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.properties</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-java-properties</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for configuration files in Java’s properties format.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.4.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.PyPyLogLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">PyPyLogLexer</code><a class="headerlink" href="#pygments.lexers.text.PyPyLogLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">pypylog, pypy</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.pypylog</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-pypylog</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for PyPy log files.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.RegeditLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">RegeditLexer</code><a class="headerlink" href="#pygments.lexers.text.RegeditLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">registry</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.reg</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-windows-registry</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for <a class="reference external" href="http://en.wikipedia.org/wiki/Windows_Registry#.REG_files">Windows Registry</a> files produced
+by regedit.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.RstLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">RstLexer</code><a class="headerlink" href="#pygments.lexers.text.RstLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">rst, rest, restructuredtext</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.rst, *.rest</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-rst, text/prs.fallenstein.rst</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://docutils.sf.net/rst.html">reStructuredText</a> markup.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.7.</span></p>
+</div>
+<p>Additional options accepted:</p>
+<dl class="docutils">
+<dt><cite>handlecodeblocks</cite></dt>
+<dd><p class="first">Highlight the contents of <code class="docutils literal"><span class="pre">..</span> <span class="pre">sourcecode::</span> <span class="pre">language</span></code>,
+<code class="docutils literal"><span class="pre">..</span> <span class="pre">code::</span> <span class="pre">language</span></code> and <code class="docutils literal"><span class="pre">..</span> <span class="pre">code-block::</span> <span class="pre">language</span></code>
+directives with a lexer for the given language (default:
+<code class="docutils literal"><span class="pre">True</span></code>).</p>
+<div class="last versionadded">
+<p><span class="versionmodified">New in version 0.8.</span></p>
+</div>
+</dd>
+</dl>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.SourcesListLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">SourcesListLexer</code><a class="headerlink" href="#pygments.lexers.text.SourcesListLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">sourceslist, sources.list, debsources</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">sources.list</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer that highlights debian sources.list files.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.7.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.SquidConfLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">SquidConfLexer</code><a class="headerlink" href="#pygments.lexers.text.SquidConfLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">squidconf, squid.conf, squid</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">squid.conf</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-squidconf</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for <a class="reference external" href="http://www.squid-cache.org/">squid</a> configuration files.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.9.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.TexLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">TexLexer</code><a class="headerlink" href="#pygments.lexers.text.TexLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">tex, latex</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.tex, *.aux, *.toc</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-tex, text/x-latex</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for the TeX and LaTeX typesetting languages.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.VimLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">VimLexer</code><a class="headerlink" href="#pygments.lexers.text.VimLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">vim</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.vim, .vimrc, .exrc, .gvimrc, vimrc, exrc, gvimrc, vimrc, gvimrc</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-vim</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for VimL script files.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.8.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.text.YamlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.text.</code><code class="descname">YamlLexer</code><a class="headerlink" href="#pygments.lexers.text.YamlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">yaml</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.yaml, *.yml</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-yaml</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for <a class="reference external" href="http://yaml.org/">YAML</a>, a human-friendly data serialization
+language.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.11.</span></p>
+</div>
+</dd></dl>
+
+<span class="target" id="module-pygments.lexers.web"></span></div>
+<div class="section" id="lexers-for-web-related-languages-and-markup">
+<h2>Lexers for web-related languages and markup<a class="headerlink" href="#lexers-for-web-related-languages-and-markup" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="pygments.lexers.web.ActionScript3Lexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">ActionScript3Lexer</code><a class="headerlink" href="#pygments.lexers.web.ActionScript3Lexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">as3, actionscript3</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.as</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-actionscript, text/x-actionscript, text/actionscript</td>
+</tr>
+</tbody>
+</table>
+<p>For ActionScript 3 source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.11.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.ActionScriptLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">ActionScriptLexer</code><a class="headerlink" href="#pygments.lexers.web.ActionScriptLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">as, actionscript</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.as</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-actionscript3, text/x-actionscript3, text/actionscript3</td>
+</tr>
+</tbody>
+</table>
+<p>For ActionScript source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.9.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.CirruLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">CirruLexer</code><a class="headerlink" href="#pygments.lexers.web.CirruLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">cirru</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.cirru, *.cr</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-cirru</td>
+</tr>
+</tbody>
+</table>
+<p>Syntax rules of Cirru can be found at:
+<a class="reference external" href="http://grammar.cirru.org/">http://grammar.cirru.org/</a></p>
+<ul class="simple">
+<li>using <code class="docutils literal"><span class="pre">()</span></code> to markup blocks, but limited in the same line</li>
+<li>using <code class="docutils literal"><span class="pre">""</span></code> to markup strings, allow <code class="docutils literal"><span class="pre">\</span></code> to escape</li>
+<li>using <code class="docutils literal"><span class="pre">$</span></code> as a shorthand for <code class="docutils literal"><span class="pre">()</span></code> till indentation end or <code class="docutils literal"><span class="pre">)</span></code></li>
+<li>using indentations for create nesting</li>
+</ul>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.CoffeeScriptLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">CoffeeScriptLexer</code><a class="headerlink" href="#pygments.lexers.web.CoffeeScriptLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">coffee-script, coffeescript, coffee</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.coffee</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/coffeescript</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://coffeescript.org">CoffeeScript</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.3.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.CssLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">CssLexer</code><a class="headerlink" href="#pygments.lexers.web.CssLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">css</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.css</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/css</td>
+</tr>
+</tbody>
+</table>
+<p>For CSS (Cascading Style Sheets).</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.DartLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">DartLexer</code><a class="headerlink" href="#pygments.lexers.web.DartLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">dart</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.dart</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-dart</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://dartlang.org/">Dart</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.DtdLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">DtdLexer</code><a class="headerlink" href="#pygments.lexers.web.DtdLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">dtd</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.dtd</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/xml-dtd</td>
+</tr>
+</tbody>
+</table>
+<p>A lexer for DTDs (Document Type Definitions).</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.DuelLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">DuelLexer</code><a class="headerlink" href="#pygments.lexers.web.DuelLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">duel, jbst, jsonml+bst</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.duel, *.jbst</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-duel, text/x-jbst</td>
+</tr>
+</tbody>
+</table>
+<p>Lexer for Duel Views Engine (formerly JBST) markup with JavaScript code blocks.
+See <a class="reference external" href="http://duelengine.org/">http://duelengine.org/</a>.
+See <a class="reference external" href="http://jsonml.org/jbst/">http://jsonml.org/jbst/</a>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.4.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.HamlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">HamlLexer</code><a class="headerlink" href="#pygments.lexers.web.HamlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">haml</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.haml</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-haml</td>
+</tr>
+</tbody>
+</table>
+<p>For Haml markup.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.3.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.HaxeLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">HaxeLexer</code><a class="headerlink" href="#pygments.lexers.web.HaxeLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">hx, haxe, hxsl</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.hx, *.hxsl</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/haxe, text/x-haxe, text/x-hx</td>
+</tr>
+</tbody>
+</table>
+<p>For Haxe source code (<a class="reference external" href="http://haxe.org/">http://haxe.org/</a>).</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.3.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.HtmlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">HtmlLexer</code><a class="headerlink" href="#pygments.lexers.web.HtmlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">html</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.html, *.htm, *.xhtml, *.xslt</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/html, application/xhtml+xml</td>
+</tr>
+</tbody>
+</table>
+<p>For HTML 4 and XHTML 1 markup. Nested JavaScript and CSS is highlighted
+by the appropriate lexer.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.JadeLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">JadeLexer</code><a class="headerlink" href="#pygments.lexers.web.JadeLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">jade</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.jade</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-jade</td>
+</tr>
+</tbody>
+</table>
+<p>For Jade markup.
+Jade is a variant of Scaml, see:
+<a class="reference external" href="http://scalate.fusesource.org/documentation/scaml-reference.html">http://scalate.fusesource.org/documentation/scaml-reference.html</a></p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.4.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.JavascriptLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">JavascriptLexer</code><a class="headerlink" href="#pygments.lexers.web.JavascriptLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">js, javascript</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.js</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/javascript, application/x-javascript, text/x-javascript, text/javascript</td>
+</tr>
+</tbody>
+</table>
+<p>For JavaScript source code.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.JsonLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">JsonLexer</code><a class="headerlink" href="#pygments.lexers.web.JsonLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">json</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.json</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/json</td>
+</tr>
+</tbody>
+</table>
+<p>For JSON data structures.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.5.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.KalLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">KalLexer</code><a class="headerlink" href="#pygments.lexers.web.KalLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">kal</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.kal</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/kal, application/kal</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://rzimmerman.github.io/kal">Kal</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.LassoLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">LassoLexer</code><a class="headerlink" href="#pygments.lexers.web.LassoLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">lasso, lassoscript</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.lasso, *.lasso[89]</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-lasso</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.lassosoft.com/">Lasso</a> source code, covering both Lasso 9
+syntax and LassoScript for Lasso 8.6 and earlier. For Lasso embedded in
+HTML, use the <cite>LassoHtmlLexer</cite>.</p>
+<p>Additional options accepted:</p>
+<dl class="docutils">
+<dt><cite>builtinshighlighting</cite></dt>
+<dd>If given and <code class="docutils literal"><span class="pre">True</span></code>, highlight builtin types, traits, methods, and
+members (default: <code class="docutils literal"><span class="pre">True</span></code>).</dd>
+<dt><cite>requiredelimiters</cite></dt>
+<dd>If given and <code class="docutils literal"><span class="pre">True</span></code>, only highlight code between delimiters as Lasso
+(default: <code class="docutils literal"><span class="pre">False</span></code>).</dd>
+</dl>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.LiveScriptLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">LiveScriptLexer</code><a class="headerlink" href="#pygments.lexers.web.LiveScriptLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">live-script, livescript</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.ls</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/livescript</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://gkz.github.com/LiveScript/">LiveScript</a> source code.</p>
+<p>New in Pygments 1.6.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.MaskLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">MaskLexer</code><a class="headerlink" href="#pygments.lexers.web.MaskLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">mask</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.mask</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-mask</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://github.com/atmajs/MaskJS">Mask</a> markup.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 2.0.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.MxmlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">MxmlLexer</code><a class="headerlink" href="#pygments.lexers.web.MxmlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">mxml</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.mxml</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">None</td>
+</tr>
+</tbody>
+</table>
+<p>For MXML markup.
+Nested AS3 in <script> tags is highlighted by the appropriate lexer.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.1.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.ObjectiveJLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">ObjectiveJLexer</code><a class="headerlink" href="#pygments.lexers.web.ObjectiveJLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">objective-j, objectivej, obj-j, objj</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.j</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-objective-j</td>
+</tr>
+</tbody>
+</table>
+<p>For Objective-J source code with preprocessor directives.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.3.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.PhpLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">PhpLexer</code><a class="headerlink" href="#pygments.lexers.web.PhpLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">php, php3, php4, php5</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.php, *.php[345], *.inc</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-php</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://www.php.net/">PHP</a> source code.
+For PHP embedded in HTML, use the <cite>HtmlPhpLexer</cite>.</p>
+<p>Additional options accepted:</p>
+<dl class="docutils">
+<dt><cite>startinline</cite></dt>
+<dd>If given and <code class="docutils literal"><span class="pre">True</span></code> the lexer starts highlighting with
+php code (i.e.: no starting <code class="docutils literal"><span class="pre"><?php</span></code> required). The default
+is <code class="docutils literal"><span class="pre">False</span></code>.</dd>
+<dt><cite>funcnamehighlighting</cite></dt>
+<dd>If given and <code class="docutils literal"><span class="pre">True</span></code>, highlight builtin function names
+(default: <code class="docutils literal"><span class="pre">True</span></code>).</dd>
+<dt><cite>disabledmodules</cite></dt>
+<dd><p class="first">If given, must be a list of module names whose function names
+should not be highlighted. By default all modules are highlighted
+except the special <code class="docutils literal"><span class="pre">'unknown'</span></code> module that includes functions
+that are known to php but are undocumented.</p>
+<p>To get a list of allowed modules have a look into the
+<cite>_phpbuiltins</cite> module:</p>
+<div class="highlight-pycon"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">pygments.lexers._phpbuiltins</span> <span class="kn">import</span> <span class="n">MODULES</span>
+<span class="gp">>>> </span><span class="n">MODULES</span><span class="o">.</span><span class="n">keys</span><span class="p">()</span>
+<span class="go">['PHP Options/Info', 'Zip', 'dba', ...]</span>
+</pre></div>
+</div>
+<p class="last">In fact the names of those modules match the module names from
+the php documentation.</p>
+</dd>
+</dl>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.QmlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">QmlLexer</code><a class="headerlink" href="#pygments.lexers.web.QmlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">qml</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.qml</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/x-qml</td>
+</tr>
+</tbody>
+</table>
+<p>For QML files. See <a class="reference external" href="http://doc.qt.digia.com/4.7/qdeclarativeintroduction.html">http://doc.qt.digia.com/4.7/qdeclarativeintroduction.html</a>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.SassLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">SassLexer</code><a class="headerlink" href="#pygments.lexers.web.SassLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">sass</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.sass</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-sass</td>
+</tr>
+</tbody>
+</table>
+<p>For Sass stylesheets.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.3.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.ScamlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">ScamlLexer</code><a class="headerlink" href="#pygments.lexers.web.ScamlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">scaml</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.scaml</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-scaml</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://scalate.fusesource.org/">Scaml markup</a>. Scaml is Haml for Scala.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.4.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.ScssLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">ScssLexer</code><a class="headerlink" href="#pygments.lexers.web.ScssLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">scss</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.scss</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-scss</td>
+</tr>
+</tbody>
+</table>
+<p>For SCSS stylesheets.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.TypeScriptLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">TypeScriptLexer</code><a class="headerlink" href="#pygments.lexers.web.TypeScriptLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">ts</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.ts</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/x-typescript</td>
+</tr>
+</tbody>
+</table>
+<p>For <a class="reference external" href="http://typescriptlang.org/">TypeScript</a> source code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.6.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.XQueryLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">XQueryLexer</code><a class="headerlink" href="#pygments.lexers.web.XQueryLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">xquery, xqy, xq, xql, xqm</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.xqy, *.xquery, *.xq, *.xql, *.xqm</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/xquery, application/xquery</td>
+</tr>
+</tbody>
+</table>
+<p>An XQuery lexer, parsing a stream and outputting the tokens needed to
+highlight xquery code.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 1.4.</span></p>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.XmlLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">XmlLexer</code><a class="headerlink" href="#pygments.lexers.web.XmlLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">xml</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.xml, *.xsl, *.rss, *.xslt, *.xsd, *.wsdl, *.wsf</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">text/xml, application/xml, image/svg+xml, application/rss+xml, application/atom+xml</td>
+</tr>
+</tbody>
+</table>
+<p>Generic lexer for XML (eXtensible Markup Language).</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="pygments.lexers.web.XsltLexer">
+<em class="property">class </em><code class="descclassname">pygments.lexers.web.</code><code class="descname">XsltLexer</code><a class="headerlink" href="#pygments.lexers.web.XsltLexer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Short names:</th><td class="field-body">xslt</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Filenames:</th><td class="field-body">*.xsl, *.xslt, *.xpl</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">MIME types:</th><td class="field-body">application/xsl+xml, application/xslt+xml</td>
+</tr>
+</tbody>
+</table>
+<p>A lexer for XSLT.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.10.</span></p>
+</div>
+</dd></dl>
+
+</div>
+<div class="section" id="iterating-over-all-lexers">
+<h2>Iterating over all lexers<a class="headerlink" href="#iterating-over-all-lexers" title="Permalink to this headline">¶</a></h2>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.6.</span></p>
+</div>
+<p>To get all lexers (both the builtin and the plugin ones), you can
+use the <cite>get_all_lexers()</cite> function from the <cite>pygments.lexers</cite>
+module:</p>
+<div class="highlight-pycon"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">pygments.lexers</span> <span class="kn">import</span> <span class="n">get_all_lexers</span>
+<span class="gp">>>> </span><span class="n">i</span> <span class="o">=</span> <span class="n">get_all_lexers</span><span class="p">()</span>
+<span class="gp">>>> </span><span class="n">i</span><span class="o">.</span><span class="n">next</span><span class="p">()</span>
+<span class="go">('Diff', ('diff',), ('*.diff', '*.patch'), ('text/x-diff', 'text/x-patch'))</span>
+<span class="gp">>>> </span><span class="n">i</span><span class="o">.</span><span class="n">next</span><span class="p">()</span>
+<span class="go">('Delphi', ('delphi', 'objectpascal', 'pas', 'pascal'), ('*.pas',), ('text/x-pascal',))</span>
+<span class="gp">>>> </span><span class="n">i</span><span class="o">.</span><span class="n">next</span><span class="p">()</span>
+<span class="go">('XML+Ruby', ('xml+erb', 'xml+ruby'), (), ())</span>
+</pre></div>
+</div>
+<p>As you can see, the return value is an iterator which yields tuples
+in the form <code class="docutils literal"><span class="pre">(name,</span> <span class="pre">aliases,</span> <span class="pre">filetypes,</span> <span class="pre">mimetypes)</span></code>.</p>
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ <h3><a href="../index.html">Table Of Contents</a></h3>
+ <ul>
+<li><a class="reference internal" href="#">Available lexers</a><ul>
+<li><a class="reference internal" href="#lexers-for-agile-languages">Lexers for agile languages</a></li>
+<li><a class="reference internal" href="#lexers-for-assembly-languages">Lexers for assembly languages</a></li>
+<li><a class="reference internal" href="#lexers-for-compiled-languages">Lexers for compiled languages</a></li>
+<li><a class="reference internal" href="#pygments-lexers-for-dalvik-vm-related-languages">Pygments lexers for Dalvik VM-related languages</a></li>
+<li><a class="reference internal" href="#lexers-for-net-languages">Lexers for .net languages</a></li>
+<li><a class="reference internal" href="#simple-lexer-for-microsoft-visual-foxpro-source-code">Simple lexer for Microsoft Visual FoxPro source code</a></li>
+<li><a class="reference internal" href="#lexers-for-functional-languages">Lexers for functional languages</a></li>
+<li><a class="reference internal" href="#lexers-for-hardware-descriptor-languages">Lexers for hardware descriptor languages</a></li>
+<li><a class="reference internal" href="#pygments-lexers-for-jvm-languages">Pygments lexers for JVM languages</a></li>
+<li><a class="reference internal" href="#lexers-for-math-languages">Lexers for math languages</a></li>
+<li><a class="reference internal" href="#lexers-for-other-languages">Lexers for other languages</a></li>
+<li><a class="reference internal" href="#lexers-for-parser-generators">Lexers for parser generators</a></li>
+<li><a class="reference internal" href="#lexers-for-various-shells">Lexers for various shells</a></li>
+<li><a class="reference internal" href="#special-lexers">Special lexers</a></li>
+<li><a class="reference internal" href="#lexers-for-various-sql-dialects-and-related-interactive-sessions">Lexers for various SQL dialects and related interactive sessions</a></li>
+<li><a class="reference internal" href="#lexers-for-various-template-engines-markup">Lexers for various template engines’ markup</a></li>
+<li><a class="reference internal" href="#lexers-for-non-source-code-file-types">Lexers for non-source code file types</a></li>
+<li><a class="reference internal" href="#lexers-for-web-related-languages-and-markup">Lexers for web-related languages and markup</a></li>
+<li><a class="reference internal" href="#iterating-over-all-lexers">Iterating over all lexers</a></li>
+</ul>
+</li>
+</ul>
+
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="cmdline.html"
+ title="previous chapter">Command Line Interface</a></p>
+ <h4>Next topic</h4>
+ <p class="topless"><a href="filters.html"
+ title="next chapter">Filters</a></p>
+ <div role="note" aria-label="source link">
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="../_sources/docs/lexers.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+ </div>
+<strong>« <a href="index.html">Back to docs index</a></strong>
+
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="../search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="filters.html" title="Filters"
+ >next</a> |</li>
+ <li class="right" >
+ <a href="cmdline.html" title="Command Line Interface"
+ >previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" >Pygments documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Using Pygments with MoinMoin — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '../',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+ <link rel="shortcut icon" href="../_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="../index.html" />
+ <link rel="up" title="Pygments documentation" href="index.html" />
+ <link rel="next" title="Use Pygments in Java" href="java.html" />
+ <link rel="prev" title="Using Pygments in ReST documents" href="rstdirective.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="java.html" title="Use Pygments in Java"
+ accesskey="N">next</a> |</li>
+ <li class="right" >
+ <a href="rstdirective.html" title="Using Pygments in ReST documents"
+ accesskey="P">previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" accesskey="U">Pygments documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <div class="section" id="using-pygments-with-moinmoin">
+<h1>Using Pygments with MoinMoin<a class="headerlink" href="#using-pygments-with-moinmoin" title="Permalink to this headline">¶</a></h1>
+<p>From Pygments 0.7, the source distribution ships a <a class="reference external" href="http://moinmoin.wikiwikiweb.de/">Moin</a> parser plugin that
+can be used to get Pygments highlighting in Moin wiki pages.</p>
+<p>To use it, copy the file <cite>external/moin-parser.py</cite> from the Pygments
+distribution to the <cite>data/plugin/parser</cite> subdirectory of your Moin instance.
+Edit the options at the top of the file (currently <code class="docutils literal"><span class="pre">ATTACHMENTS</span></code> and
+<code class="docutils literal"><span class="pre">INLINESTYLES</span></code>) and rename the file to the name that the parser directive
+should have. For example, if you name the file <code class="docutils literal"><span class="pre">code.py</span></code>, you can get a
+highlighted Python code sample with this Wiki markup:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="p">{{{</span>
+<span class="c">#!code python</span>
+<span class="p">[</span><span class="o">...</span><span class="p">]</span>
+<span class="p">}}}</span>
+</pre></div>
+</div>
+<p>where <code class="docutils literal"><span class="pre">python</span></code> is the Pygments name of the lexer to use.</p>
+<p>Additionally, if you set the <code class="docutils literal"><span class="pre">ATTACHMENTS</span></code> option to True, Pygments will also
+be called for all attachments for whose filenames there is no other parser
+registered.</p>
+<p>You are responsible for including CSS rules that will map the Pygments CSS
+classes to colors. You can output a stylesheet file with <cite>pygmentize</cite>, put it
+into the <cite>htdocs</cite> directory of your Moin instance and then include it in the
+<cite>stylesheets</cite> configuration option in the Moin config, e.g.:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">stylesheets</span> <span class="o">=</span> <span class="p">[(</span><span class="s">'screen'</span><span class="p">,</span> <span class="s">'/htdocs/pygments.css'</span><span class="p">)]</span>
+</pre></div>
+</div>
+<p>If you do not want to do that and are willing to accept larger HTML output, you
+can set the <code class="docutils literal"><span class="pre">INLINESTYLES</span></code> option to True.</p>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="rstdirective.html"
+ title="previous chapter">Using Pygments in ReST documents</a></p>
+ <h4>Next topic</h4>
+ <p class="topless"><a href="java.html"
+ title="next chapter">Use Pygments in Java</a></p>
+ <div role="note" aria-label="source link">
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="../_sources/docs/moinmoin.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+ </div>
+<strong>« <a href="index.html">Back to docs index</a></strong>
+
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="../search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="java.html" title="Use Pygments in Java"
+ >next</a> |</li>
+ <li class="right" >
+ <a href="rstdirective.html" title="Using Pygments in ReST documents"
+ >previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" >Pygments documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Register Plugins — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '../',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+ <link rel="shortcut icon" href="../_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="../index.html" />
+ <link rel="up" title="Pygments documentation" href="index.html" />
+ <link rel="next" title="Using Pygments in ReST documents" href="rstdirective.html" />
+ <link rel="prev" title="Write your own filter" href="filterdevelopment.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="rstdirective.html" title="Using Pygments in ReST documents"
+ accesskey="N">next</a> |</li>
+ <li class="right" >
+ <a href="filterdevelopment.html" title="Write your own filter"
+ accesskey="P">previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" accesskey="U">Pygments documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <div class="section" id="register-plugins">
+<h1>Register Plugins<a class="headerlink" href="#register-plugins" title="Permalink to this headline">¶</a></h1>
+<p>If you want to extend Pygments without hacking the sources, but want to
+use the lexer/formatter/style/filter lookup functions (<cite>lexers.get_lexer_by_name</cite>
+et al.), you can use <a class="reference external" href="http://peak.telecommunity.com/DevCenter/setuptools">setuptools</a> entrypoints to add new lexers, formatters
+or styles as if they were in the Pygments core.</p>
+<p>That means you can use your highlighter modules with the <cite>pygmentize</cite> script,
+which relies on the mentioned functions.</p>
+<div class="section" id="entrypoints">
+<h2>Entrypoints<a class="headerlink" href="#entrypoints" title="Permalink to this headline">¶</a></h2>
+<p>Here is a list of setuptools entrypoints that Pygments understands:</p>
+<p><cite>pygments.lexers</cite></p>
+<blockquote>
+<div><p>This entrypoint is used for adding new lexers to the Pygments core.
+The name of the entrypoint values doesn’t really matter, Pygments extracts
+required metadata from the class definition:</p>
+<div class="highlight-ini"><div class="highlight"><pre><span class="k">[pygments.lexers]</span>
+<span class="na">yourlexer</span> <span class="o">=</span> <span class="s">yourmodule:YourLexer</span>
+</pre></div>
+</div>
+<p>Note that you have to define <code class="docutils literal"><span class="pre">name</span></code>, <code class="docutils literal"><span class="pre">aliases</span></code> and <code class="docutils literal"><span class="pre">filename</span></code>
+attributes so that you can use the highlighter from the command line:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="k">class</span> <span class="nc">YourLexer</span><span class="p">(</span><span class="o">...</span><span class="p">):</span>
+ <span class="n">name</span> <span class="o">=</span> <span class="s">'Name Of Your Lexer'</span>
+ <span class="n">aliases</span> <span class="o">=</span> <span class="p">[</span><span class="s">'alias'</span><span class="p">]</span>
+ <span class="n">filenames</span> <span class="o">=</span> <span class="p">[</span><span class="s">'*.ext'</span><span class="p">]</span>
+</pre></div>
+</div>
+</div></blockquote>
+<p><cite>pygments.formatters</cite></p>
+<blockquote>
+<div><p>You can use this entrypoint to add new formatters to Pygments. The
+name of an entrypoint item is the name of the formatter. If you
+prefix the name with a slash it’s used as a filename pattern:</p>
+<div class="highlight-ini"><div class="highlight"><pre><span class="k">[pygments.formatters]</span>
+<span class="na">yourformatter</span> <span class="o">=</span> <span class="s">yourmodule:YourFormatter</span>
+<span class="na">/.ext</span> <span class="o">=</span> <span class="s">yourmodule:YourFormatter</span>
+</pre></div>
+</div>
+</div></blockquote>
+<p><cite>pygments.styles</cite></p>
+<blockquote>
+<div><p>To add a new style you can use this entrypoint. The name of the entrypoint
+is the name of the style:</p>
+<div class="highlight-ini"><div class="highlight"><pre><span class="k">[pygments.styles]</span>
+<span class="na">yourstyle</span> <span class="o">=</span> <span class="s">yourmodule:YourStyle</span>
+</pre></div>
+</div>
+</div></blockquote>
+<p><cite>pygments.filters</cite></p>
+<blockquote>
+<div><p>Use this entrypoint to register a new filter. The name of the
+entrypoint is the name of the filter:</p>
+<div class="highlight-ini"><div class="highlight"><pre><span class="k">[pygments.filters]</span>
+<span class="na">yourfilter</span> <span class="o">=</span> <span class="s">yourmodule:YourFilter</span>
+</pre></div>
+</div>
+</div></blockquote>
+</div>
+<div class="section" id="how-to-use-entrypoints">
+<h2>How To Use Entrypoints<a class="headerlink" href="#how-to-use-entrypoints" title="Permalink to this headline">¶</a></h2>
+<p>This documentation doesn’t explain how to use those entrypoints because this is
+covered in the <a class="reference external" href="http://peak.telecommunity.com/DevCenter/setuptools">setuptools documentation</a>. That page should cover everything
+you need to write a plugin.</p>
+</div>
+<div class="section" id="extending-the-core">
+<h2>Extending The Core<a class="headerlink" href="#extending-the-core" title="Permalink to this headline">¶</a></h2>
+<p>If you have written a Pygments plugin that is open source, please inform us
+about that. There is a high chance that we’ll add it to the Pygments
+distribution.</p>
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ <h3><a href="../index.html">Table Of Contents</a></h3>
+ <ul>
+<li><a class="reference internal" href="#">Register Plugins</a><ul>
+<li><a class="reference internal" href="#entrypoints">Entrypoints</a></li>
+<li><a class="reference internal" href="#how-to-use-entrypoints">How To Use Entrypoints</a></li>
+<li><a class="reference internal" href="#extending-the-core">Extending The Core</a></li>
+</ul>
+</li>
+</ul>
+
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="filterdevelopment.html"
+ title="previous chapter">Write your own filter</a></p>
+ <h4>Next topic</h4>
+ <p class="topless"><a href="rstdirective.html"
+ title="next chapter">Using Pygments in ReST documents</a></p>
+ <div role="note" aria-label="source link">
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="../_sources/docs/plugins.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+ </div>
+<strong>« <a href="index.html">Back to docs index</a></strong>
+
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="../search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="rstdirective.html" title="Using Pygments in ReST documents"
+ >next</a> |</li>
+ <li class="right" >
+ <a href="filterdevelopment.html" title="Write your own filter"
+ >previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" >Pygments documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Introduction and Quickstart — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '../',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+ <link rel="shortcut icon" href="../_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="../index.html" />
+ <link rel="up" title="Pygments documentation" href="index.html" />
+ <link rel="next" title="Command Line Interface" href="cmdline.html" />
+ <link rel="prev" title="Download and installation" href="../download.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="cmdline.html" title="Command Line Interface"
+ accesskey="N">next</a> |</li>
+ <li class="right" >
+ <a href="../download.html" title="Download and installation"
+ accesskey="P">previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" accesskey="U">Pygments documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <div class="section" id="introduction-and-quickstart">
+<h1>Introduction and Quickstart<a class="headerlink" href="#introduction-and-quickstart" title="Permalink to this headline">¶</a></h1>
+<p>Welcome to Pygments! This document explains the basic concepts and terms and
+gives a few examples of how to use the library.</p>
+<div class="section" id="architecture">
+<h2>Architecture<a class="headerlink" href="#architecture" title="Permalink to this headline">¶</a></h2>
+<p>There are four types of components that work together highlighting a piece of
+code:</p>
+<ul class="simple">
+<li>A <strong>lexer</strong> splits the source into tokens, fragments of the source that
+have a token type that determines what the text represents semantically
+(e.g., keyword, string, or comment). There is a lexer for every language
+or markup format that Pygments supports.</li>
+<li>The token stream can be piped through <strong>filters</strong>, which usually modify
+the token types or text fragments, e.g. uppercasing all keywords.</li>
+<li>A <strong>formatter</strong> then takes the token stream and writes it to an output
+file, in a format such as HTML, LaTeX or RTF.</li>
+<li>While writing the output, a <strong>style</strong> determines how to highlight all the
+different token types. It maps them to attributes like “red and bold”.</li>
+</ul>
+</div>
+<div class="section" id="example">
+<h2>Example<a class="headerlink" href="#example" title="Permalink to this headline">¶</a></h2>
+<p>Here is a small example for highlighting Python code:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">pygments</span> <span class="kn">import</span> <span class="n">highlight</span>
+<span class="kn">from</span> <span class="nn">pygments.lexers</span> <span class="kn">import</span> <span class="n">PythonLexer</span>
+<span class="kn">from</span> <span class="nn">pygments.formatters</span> <span class="kn">import</span> <span class="n">HtmlFormatter</span>
+
+<span class="n">code</span> <span class="o">=</span> <span class="s">'print "Hello World"'</span>
+<span class="k">print</span> <span class="n">highlight</span><span class="p">(</span><span class="n">code</span><span class="p">,</span> <span class="n">PythonLexer</span><span class="p">(),</span> <span class="n">HtmlFormatter</span><span class="p">())</span>
+</pre></div>
+</div>
+<p>which prints something like this:</p>
+<div class="highlight-html"><div class="highlight"><pre><span class="nt"><div</span> <span class="na">class=</span><span class="s">"highlight"</span><span class="nt">></span>
+<span class="nt"><pre><span</span> <span class="na">class=</span><span class="s">"k"</span><span class="nt">></span>print<span class="nt"></span></span> <span class="nt"><span</span> <span class="na">class=</span><span class="s">"s"</span><span class="nt">></span><span class="ni">&quot;</span>Hello World<span class="ni">&quot;</span><span class="nt"></span></pre></span>
+<span class="nt"></div></span>
+</pre></div>
+</div>
+<p>As you can see, Pygments uses CSS classes (by default, but you can change that)
+instead of inline styles in order to avoid outputting redundant style information over
+and over. A CSS stylesheet that contains all CSS classes possibly used in the output
+can be produced by:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="k">print</span> <span class="n">HtmlFormatter</span><span class="p">()</span><span class="o">.</span><span class="n">get_style_defs</span><span class="p">(</span><span class="s">'.highlight'</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>The argument to <code class="xref py py-func docutils literal"><span class="pre">get_style_defs()</span></code> is used as an additional CSS selector:
+the output may look like this:</p>
+<div class="highlight-css"><div class="highlight"><pre><span class="nc">.highlight</span> <span class="nc">.k</span> <span class="p">{</span> <span class="k">color</span><span class="o">:</span> <span class="m">#AA22FF</span><span class="p">;</span> <span class="k">font-weight</span><span class="o">:</span> <span class="k">bold</span> <span class="p">}</span>
+<span class="nc">.highlight</span> <span class="nc">.s</span> <span class="p">{</span> <span class="k">color</span><span class="o">:</span> <span class="m">#BB4444</span> <span class="p">}</span>
+<span class="o">...</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="options">
+<h2>Options<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h2>
+<p>The <code class="xref py py-func docutils literal"><span class="pre">highlight()</span></code> function supports a fourth argument called <em>outfile</em>, it
+must be a file object if given. The formatted output will then be written to
+this file instead of being returned as a string.</p>
+<p>Lexers and formatters both support options. They are given to them as keyword
+arguments either to the class or to the lookup method:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">pygments</span> <span class="kn">import</span> <span class="n">highlight</span>
+<span class="kn">from</span> <span class="nn">pygments.lexers</span> <span class="kn">import</span> <span class="n">get_lexer_by_name</span>
+<span class="kn">from</span> <span class="nn">pygments.formatters</span> <span class="kn">import</span> <span class="n">HtmlFormatter</span>
+
+<span class="n">lexer</span> <span class="o">=</span> <span class="n">get_lexer_by_name</span><span class="p">(</span><span class="s">"python"</span><span class="p">,</span> <span class="n">stripall</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
+<span class="n">formatter</span> <span class="o">=</span> <span class="n">HtmlFormatter</span><span class="p">(</span><span class="n">linenos</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">cssclass</span><span class="o">=</span><span class="s">"source"</span><span class="p">)</span>
+<span class="n">result</span> <span class="o">=</span> <span class="n">highlight</span><span class="p">(</span><span class="n">code</span><span class="p">,</span> <span class="n">lexer</span><span class="p">,</span> <span class="n">formatter</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>This makes the lexer strip all leading and trailing whitespace from the input
+(<cite>stripall</cite> option), lets the formatter output line numbers (<cite>linenos</cite> option),
+and sets the wrapping <code class="docutils literal"><span class="pre"><div></span></code>‘s class to <code class="docutils literal"><span class="pre">source</span></code> (instead of
+<code class="docutils literal"><span class="pre">highlight</span></code>).</p>
+<p>Important options include:</p>
+<dl class="docutils">
+<dt><cite>encoding</cite> <span class="classifier-delimiter">:</span> <span class="classifier">for lexers and formatters</span></dt>
+<dd>Since Pygments uses Unicode strings internally, this determines which
+encoding will be used to convert to or from byte strings.</dd>
+<dt><cite>style</cite> <span class="classifier-delimiter">:</span> <span class="classifier">for formatters</span></dt>
+<dd>The name of the style to use when writing the output.</dd>
+</dl>
+<p>For an overview of builtin lexers and formatters and their options, visit the
+<a class="reference internal" href="lexers.html"><em>lexer</em></a> and <a class="reference internal" href="formatters.html"><em>formatters</em></a> lists.</p>
+<p>For a documentation on filters, see <a class="reference internal" href="filters.html"><em>this page</em></a>.</p>
+</div>
+<div class="section" id="lexer-and-formatter-lookup">
+<h2>Lexer and formatter lookup<a class="headerlink" href="#lexer-and-formatter-lookup" title="Permalink to this headline">¶</a></h2>
+<p>If you want to lookup a built-in lexer by its alias or a filename, you can use
+one of the following methods:</p>
+<div class="highlight-pycon"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">pygments.lexers</span> <span class="kn">import</span> <span class="p">(</span><span class="n">get_lexer_by_name</span><span class="p">,</span>
+<span class="gp">... </span> <span class="n">get_lexer_for_filename</span><span class="p">,</span> <span class="n">get_lexer_for_mimetype</span><span class="p">)</span>
+
+<span class="gp">>>> </span><span class="n">get_lexer_by_name</span><span class="p">(</span><span class="s">'python'</span><span class="p">)</span>
+<span class="go"><pygments.lexers.PythonLexer></span>
+
+<span class="gp">>>> </span><span class="n">get_lexer_for_filename</span><span class="p">(</span><span class="s">'spam.rb'</span><span class="p">)</span>
+<span class="go"><pygments.lexers.RubyLexer></span>
+
+<span class="gp">>>> </span><span class="n">get_lexer_for_mimetype</span><span class="p">(</span><span class="s">'text/x-perl'</span><span class="p">)</span>
+<span class="go"><pygments.lexers.PerlLexer></span>
+</pre></div>
+</div>
+<p>All these functions accept keyword arguments; they will be passed to the lexer
+as options.</p>
+<p>A similar API is available for formatters: use <a class="reference internal" href="api.html#pygments.formatters.get_formatter_by_name" title="pygments.formatters.get_formatter_by_name"><code class="xref py py-func docutils literal"><span class="pre">get_formatter_by_name()</span></code></a>
+and <a class="reference internal" href="api.html#pygments.formatters.get_formatter_for_filename" title="pygments.formatters.get_formatter_for_filename"><code class="xref py py-func docutils literal"><span class="pre">get_formatter_for_filename()</span></code></a> from the <a class="reference internal" href="api.html#module-pygments.formatters" title="pygments.formatters"><code class="xref py py-mod docutils literal"><span class="pre">pygments.formatters</span></code></a>
+module for this purpose.</p>
+</div>
+<div class="section" id="guessing-lexers">
+<h2>Guessing lexers<a class="headerlink" href="#guessing-lexers" title="Permalink to this headline">¶</a></h2>
+<p>If you don’t know the content of the file, or you want to highlight a file
+whose extension is ambiguous, such as <code class="docutils literal"><span class="pre">.html</span></code> (which could contain plain HTML
+or some template tags), use these functions:</p>
+<div class="highlight-pycon"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">pygments.lexers</span> <span class="kn">import</span> <span class="n">guess_lexer</span><span class="p">,</span> <span class="n">guess_lexer_for_filename</span>
+
+<span class="gp">>>> </span><span class="n">guess_lexer</span><span class="p">(</span><span class="s">'#!/usr/bin/python</span><span class="se">\n</span><span class="s">print "Hello World!"'</span><span class="p">)</span>
+<span class="go"><pygments.lexers.PythonLexer></span>
+
+<span class="gp">>>> </span><span class="n">guess_lexer_for_filename</span><span class="p">(</span><span class="s">'test.py'</span><span class="p">,</span> <span class="s">'print "Hello World!"'</span><span class="p">)</span>
+<span class="go"><pygments.lexers.PythonLexer></span>
+</pre></div>
+</div>
+<p><a class="reference internal" href="api.html#pygments.lexers.guess_lexer" title="pygments.lexers.guess_lexer"><code class="xref py py-func docutils literal"><span class="pre">guess_lexer()</span></code></a> passes the given content to the lexer classes’
+<code class="xref py py-meth docutils literal"><span class="pre">analyse_text()</span></code> method and returns the one for which it returns the
+highest number.</p>
+<p>All lexers have two different filename pattern lists: the primary and the
+secondary one. The <a class="reference internal" href="api.html#pygments.lexers.get_lexer_for_filename" title="pygments.lexers.get_lexer_for_filename"><code class="xref py py-func docutils literal"><span class="pre">get_lexer_for_filename()</span></code></a> function only uses the
+primary list, whose entries are supposed to be unique among all lexers.
+<a class="reference internal" href="api.html#pygments.lexers.guess_lexer_for_filename" title="pygments.lexers.guess_lexer_for_filename"><code class="xref py py-func docutils literal"><span class="pre">guess_lexer_for_filename()</span></code></a>, however, will first loop through all lexers
+and look at the primary and secondary filename patterns if the filename matches.
+If only one lexer matches, it is returned, else the guessing mechanism of
+<a class="reference internal" href="api.html#pygments.lexers.guess_lexer" title="pygments.lexers.guess_lexer"><code class="xref py py-func docutils literal"><span class="pre">guess_lexer()</span></code></a> is used with the matching lexers.</p>
+<p>As usual, keyword arguments to these functions are given to the created lexer
+as options.</p>
+</div>
+<div class="section" id="command-line-usage">
+<h2>Command line usage<a class="headerlink" href="#command-line-usage" title="Permalink to this headline">¶</a></h2>
+<p>You can use Pygments from the command line, using the <strong class="program">pygmentize</strong>
+script:</p>
+<div class="highlight-python"><div class="highlight"><pre>$ pygmentize test.py
+</pre></div>
+</div>
+<p>will highlight the Python file test.py using ANSI escape sequences
+(a.k.a. terminal colors) and print the result to standard output.</p>
+<p>To output HTML, use the <code class="docutils literal"><span class="pre">-f</span></code> option:</p>
+<div class="highlight-python"><div class="highlight"><pre>$ pygmentize -f html -o test.html test.py
+</pre></div>
+</div>
+<p>to write an HTML-highlighted version of test.py to the file test.html.
+Note that it will only be a snippet of HTML, if you want a full HTML document,
+use the “full” option:</p>
+<div class="highlight-python"><div class="highlight"><pre>$ pygmentize -f html -O full -o test.html test.py
+</pre></div>
+</div>
+<p>This will produce a full HTML document with included stylesheet.</p>
+<p>A style can be selected with <code class="docutils literal"><span class="pre">-O</span> <span class="pre">style=<name></span></code>.</p>
+<p>If you need a stylesheet for an existing HTML file using Pygments CSS classes,
+it can be created with:</p>
+<div class="highlight-python"><div class="highlight"><pre>$ pygmentize -S default -f html > style.css
+</pre></div>
+</div>
+<p>where <code class="docutils literal"><span class="pre">default</span></code> is the style name.</p>
+<p>More options and tricks and be found in the <a class="reference internal" href="cmdline.html"><em>command line reference</em></a>.</p>
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ <h3><a href="../index.html">Table Of Contents</a></h3>
+ <ul>
+<li><a class="reference internal" href="#">Introduction and Quickstart</a><ul>
+<li><a class="reference internal" href="#architecture">Architecture</a></li>
+<li><a class="reference internal" href="#example">Example</a></li>
+<li><a class="reference internal" href="#options">Options</a></li>
+<li><a class="reference internal" href="#lexer-and-formatter-lookup">Lexer and formatter lookup</a></li>
+<li><a class="reference internal" href="#guessing-lexers">Guessing lexers</a></li>
+<li><a class="reference internal" href="#command-line-usage">Command line usage</a></li>
+</ul>
+</li>
+</ul>
+
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="../download.html"
+ title="previous chapter">Download and installation</a></p>
+ <h4>Next topic</h4>
+ <p class="topless"><a href="cmdline.html"
+ title="next chapter">Command Line Interface</a></p>
+ <div role="note" aria-label="source link">
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="../_sources/docs/quickstart.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+ </div>
+<strong>« <a href="index.html">Back to docs index</a></strong>
+
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="../search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="cmdline.html" title="Command Line Interface"
+ >next</a> |</li>
+ <li class="right" >
+ <a href="../download.html" title="Download and installation"
+ >previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" >Pygments documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Using Pygments in ReST documents — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '../',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+ <link rel="shortcut icon" href="../_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="../index.html" />
+ <link rel="up" title="Pygments documentation" href="index.html" />
+ <link rel="next" title="Using Pygments with MoinMoin" href="moinmoin.html" />
+ <link rel="prev" title="Register Plugins" href="plugins.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="moinmoin.html" title="Using Pygments with MoinMoin"
+ accesskey="N">next</a> |</li>
+ <li class="right" >
+ <a href="plugins.html" title="Register Plugins"
+ accesskey="P">previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" accesskey="U">Pygments documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <div class="section" id="using-pygments-in-rest-documents">
+<h1>Using Pygments in ReST documents<a class="headerlink" href="#using-pygments-in-rest-documents" title="Permalink to this headline">¶</a></h1>
+<p>Many Python people use <a class="reference external" href="http://docutils.sf.net/rst.html">ReST</a> for documentation their sourcecode, programs,
+scripts et cetera. This also means that documentation often includes sourcecode
+samples or snippets.</p>
+<p>You can easily enable Pygments support for your ReST texts using a custom
+directive – this is also how this documentation displays source code.</p>
+<p>From Pygments 0.9, the directive is shipped in the distribution as
+<cite>external/rst-directive.py</cite>. You can copy and adapt this code to your liking.</p>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="plugins.html"
+ title="previous chapter">Register Plugins</a></p>
+ <h4>Next topic</h4>
+ <p class="topless"><a href="moinmoin.html"
+ title="next chapter">Using Pygments with MoinMoin</a></p>
+ <div role="note" aria-label="source link">
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="../_sources/docs/rstdirective.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+ </div>
+<strong>« <a href="index.html">Back to docs index</a></strong>
+
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="../search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="moinmoin.html" title="Using Pygments with MoinMoin"
+ >next</a> |</li>
+ <li class="right" >
+ <a href="plugins.html" title="Register Plugins"
+ >previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" >Pygments documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Styles — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '../',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+ <link rel="shortcut icon" href="../_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="../index.html" />
+ <link rel="up" title="Pygments documentation" href="index.html" />
+ <link rel="next" title="Unicode and Encodings" href="unicode.html" />
+ <link rel="prev" title="Available formatters" href="formatters.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="unicode.html" title="Unicode and Encodings"
+ accesskey="N">next</a> |</li>
+ <li class="right" >
+ <a href="formatters.html" title="Available formatters"
+ accesskey="P">previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" accesskey="U">Pygments documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <div class="section" id="styles">
+<h1>Styles<a class="headerlink" href="#styles" title="Permalink to this headline">¶</a></h1>
+<p>Pygments comes with some builtin styles that work for both the HTML and
+LaTeX formatter.</p>
+<p>The builtin styles can be looked up with the <cite>get_style_by_name</cite> function:</p>
+<div class="highlight-pycon"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">pygments.styles</span> <span class="kn">import</span> <span class="n">get_style_by_name</span>
+<span class="gp">>>> </span><span class="n">get_style_by_name</span><span class="p">(</span><span class="s">'colorful'</span><span class="p">)</span>
+<span class="go"><class 'pygments.styles.colorful.ColorfulStyle'></span>
+</pre></div>
+</div>
+<p>You can pass a instance of a <cite>Style</cite> class to a formatter as the <cite>style</cite>
+option in form of a string:</p>
+<div class="highlight-pycon"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">pygments.styles</span> <span class="kn">import</span> <span class="n">get_style_by_name</span>
+<span class="gp">>>> </span><span class="kn">from</span> <span class="nn">pygments.formatters</span> <span class="kn">import</span> <span class="n">HtmlFormatter</span>
+<span class="gp">>>> </span><span class="n">HtmlFormatter</span><span class="p">(</span><span class="n">style</span><span class="o">=</span><span class="s">'colorful'</span><span class="p">)</span><span class="o">.</span><span class="n">style</span>
+<span class="go"><class 'pygments.styles.colorful.ColorfulStyle'></span>
+</pre></div>
+</div>
+<p>Or you can also import your own style (which must be a subclass of
+<cite>pygments.style.Style</cite>) and pass it to the formatter:</p>
+<div class="highlight-pycon"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">yourapp.yourmodule</span> <span class="kn">import</span> <span class="n">YourStyle</span>
+<span class="gp">>>> </span><span class="kn">from</span> <span class="nn">pygments.formatters</span> <span class="kn">import</span> <span class="n">HtmlFormatter</span>
+<span class="gp">>>> </span><span class="n">HtmlFormatter</span><span class="p">(</span><span class="n">style</span><span class="o">=</span><span class="n">YourStyle</span><span class="p">)</span><span class="o">.</span><span class="n">style</span>
+<span class="go"><class 'yourapp.yourmodule.YourStyle'></span>
+</pre></div>
+</div>
+<div class="section" id="creating-own-styles">
+<h2>Creating Own Styles<a class="headerlink" href="#creating-own-styles" title="Permalink to this headline">¶</a></h2>
+<p>So, how to create a style? All you have to do is to subclass <cite>Style</cite> and
+define some styles:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">pygments.style</span> <span class="kn">import</span> <span class="n">Style</span>
+<span class="kn">from</span> <span class="nn">pygments.token</span> <span class="kn">import</span> <span class="n">Keyword</span><span class="p">,</span> <span class="n">Name</span><span class="p">,</span> <span class="n">Comment</span><span class="p">,</span> <span class="n">String</span><span class="p">,</span> <span class="n">Error</span><span class="p">,</span> \
+ <span class="n">Number</span><span class="p">,</span> <span class="n">Operator</span><span class="p">,</span> <span class="n">Generic</span>
+
+<span class="k">class</span> <span class="nc">YourStyle</span><span class="p">(</span><span class="n">Style</span><span class="p">):</span>
+ <span class="n">default_style</span> <span class="o">=</span> <span class="s">""</span>
+ <span class="n">styles</span> <span class="o">=</span> <span class="p">{</span>
+ <span class="n">Comment</span><span class="p">:</span> <span class="s">'italic #888'</span><span class="p">,</span>
+ <span class="n">Keyword</span><span class="p">:</span> <span class="s">'bold #005'</span><span class="p">,</span>
+ <span class="n">Name</span><span class="p">:</span> <span class="s">'#f00'</span><span class="p">,</span>
+ <span class="n">Name</span><span class="o">.</span><span class="n">Function</span><span class="p">:</span> <span class="s">'#0f0'</span><span class="p">,</span>
+ <span class="n">Name</span><span class="o">.</span><span class="n">Class</span><span class="p">:</span> <span class="s">'bold #0f0'</span><span class="p">,</span>
+ <span class="n">String</span><span class="p">:</span> <span class="s">'bg:#eee #111'</span>
+ <span class="p">}</span>
+</pre></div>
+</div>
+<p>That’s it. There are just a few rules. When you define a style for <cite>Name</cite>
+the style automatically also affects <cite>Name.Function</cite> and so on. If you
+defined <code class="docutils literal"><span class="pre">'bold'</span></code> and you don’t want boldface for a subtoken use <code class="docutils literal"><span class="pre">'nobold'</span></code>.</p>
+<p>(Philosophy: the styles aren’t written in CSS syntax since this way
+they can be used for a variety of formatters.)</p>
+<p><cite>default_style</cite> is the style inherited by all token types.</p>
+<p>To make the style usable for Pygments, you must</p>
+<ul class="simple">
+<li>either register it as a plugin (see <a class="reference internal" href="plugins.html"><em>the plugin docs</em></a>)</li>
+<li>or drop it into the <cite>styles</cite> subpackage of your Pygments distribution one style
+class per style, where the file name is the style name and the class name is
+<cite>StylenameClass</cite>. For example, if your style should be called
+<code class="docutils literal"><span class="pre">"mondrian"</span></code>, name the class <cite>MondrianStyle</cite>, put it into the file
+<code class="docutils literal"><span class="pre">mondrian.py</span></code> and this file into the <code class="docutils literal"><span class="pre">pygments.styles</span></code> subpackage
+directory.</li>
+</ul>
+</div>
+<div class="section" id="style-rules">
+<h2>Style Rules<a class="headerlink" href="#style-rules" title="Permalink to this headline">¶</a></h2>
+<p>Here a small overview of all allowed styles:</p>
+<dl class="docutils">
+<dt><code class="docutils literal"><span class="pre">bold</span></code></dt>
+<dd>render text as bold</dd>
+<dt><code class="docutils literal"><span class="pre">nobold</span></code></dt>
+<dd>don’t render text as bold (to prevent subtokens being highlighted bold)</dd>
+<dt><code class="docutils literal"><span class="pre">italic</span></code></dt>
+<dd>render text italic</dd>
+<dt><code class="docutils literal"><span class="pre">noitalic</span></code></dt>
+<dd>don’t render text as italic</dd>
+<dt><code class="docutils literal"><span class="pre">underline</span></code></dt>
+<dd>render text underlined</dd>
+<dt><code class="docutils literal"><span class="pre">nounderline</span></code></dt>
+<dd>don’t render text underlined</dd>
+<dt><code class="docutils literal"><span class="pre">bg:</span></code></dt>
+<dd>transparent background</dd>
+<dt><code class="docutils literal"><span class="pre">bg:#000000</span></code></dt>
+<dd>background color (black)</dd>
+<dt><code class="docutils literal"><span class="pre">border:</span></code></dt>
+<dd>no border</dd>
+<dt><code class="docutils literal"><span class="pre">border:#ffffff</span></code></dt>
+<dd>border color (white)</dd>
+<dt><code class="docutils literal"><span class="pre">#ff0000</span></code></dt>
+<dd>text color (red)</dd>
+<dt><code class="docutils literal"><span class="pre">noinherit</span></code></dt>
+<dd>don’t inherit styles from supertoken</dd>
+</dl>
+<p>Note that there may not be a space between <code class="docutils literal"><span class="pre">bg:</span></code> and the color value
+since the style definition string is split at whitespace.
+Also, using named colors is not allowed since the supported color names
+vary for different formatters.</p>
+<p>Furthermore, not all lexers might support every style.</p>
+</div>
+<div class="section" id="builtin-styles">
+<h2>Builtin Styles<a class="headerlink" href="#builtin-styles" title="Permalink to this headline">¶</a></h2>
+<p>Pygments ships some builtin styles which are maintained by the Pygments team.</p>
+<p>To get a list of known styles you can use this snippet:</p>
+<div class="highlight-pycon"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">pygments.styles</span> <span class="kn">import</span> <span class="n">STYLE_MAP</span>
+<span class="gp">>>> </span><span class="n">STYLE_MAP</span><span class="o">.</span><span class="n">keys</span><span class="p">()</span>
+<span class="go">['default', 'emacs', 'friendly', 'colorful']</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="getting-a-list-of-available-styles">
+<h2>Getting a list of available styles<a class="headerlink" href="#getting-a-list-of-available-styles" title="Permalink to this headline">¶</a></h2>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.6.</span></p>
+</div>
+<p>Because it could be that a plugin registered a style, there is
+a way to iterate over all styles:</p>
+<div class="highlight-pycon"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">pygments.styles</span> <span class="kn">import</span> <span class="n">get_all_styles</span>
+<span class="gp">>>> </span><span class="n">styles</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">get_all_styles</span><span class="p">())</span>
+</pre></div>
+</div>
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ <h3><a href="../index.html">Table Of Contents</a></h3>
+ <ul>
+<li><a class="reference internal" href="#">Styles</a><ul>
+<li><a class="reference internal" href="#creating-own-styles">Creating Own Styles</a></li>
+<li><a class="reference internal" href="#style-rules">Style Rules</a></li>
+<li><a class="reference internal" href="#builtin-styles">Builtin Styles</a></li>
+<li><a class="reference internal" href="#getting-a-list-of-available-styles">Getting a list of available styles</a></li>
+</ul>
+</li>
+</ul>
+
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="formatters.html"
+ title="previous chapter">Available formatters</a></p>
+ <h4>Next topic</h4>
+ <p class="topless"><a href="unicode.html"
+ title="next chapter">Unicode and Encodings</a></p>
+ <div role="note" aria-label="source link">
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="../_sources/docs/styles.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+ </div>
+<strong>« <a href="index.html">Back to docs index</a></strong>
+
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="../search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="unicode.html" title="Unicode and Encodings"
+ >next</a> |</li>
+ <li class="right" >
+ <a href="formatters.html" title="Available formatters"
+ >previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" >Pygments documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Builtin Tokens — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '../',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+ <link rel="shortcut icon" href="../_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="../index.html" />
+ <link rel="up" title="Pygments documentation" href="index.html" />
+ <link rel="next" title="The full Pygments API" href="api.html" />
+ <link rel="prev" title="Unicode and Encodings" href="unicode.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="api.html" title="The full Pygments API"
+ accesskey="N">next</a> |</li>
+ <li class="right" >
+ <a href="unicode.html" title="Unicode and Encodings"
+ accesskey="P">previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" accesskey="U">Pygments documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <div class="section" id="module-pygments.token">
+<span id="builtin-tokens"></span><h1>Builtin Tokens<a class="headerlink" href="#module-pygments.token" title="Permalink to this headline">¶</a></h1>
+<p>In the <a class="reference internal" href="#module-pygments.token" title="pygments.token"><code class="xref py py-mod docutils literal"><span class="pre">pygments.token</span></code></a> module, there is a special object called <cite>Token</cite>
+that is used to create token types.</p>
+<p>You can create a new token type by accessing an attribute of <cite>Token</cite>:</p>
+<div class="highlight-pycon"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">pygments.token</span> <span class="kn">import</span> <span class="n">Token</span>
+<span class="gp">>>> </span><span class="n">Token</span><span class="o">.</span><span class="n">String</span>
+<span class="go">Token.String</span>
+<span class="gp">>>> </span><span class="n">Token</span><span class="o">.</span><span class="n">String</span> <span class="ow">is</span> <span class="n">Token</span><span class="o">.</span><span class="n">String</span>
+<span class="go">True</span>
+</pre></div>
+</div>
+<p>Note that tokens are singletons so you can use the <code class="docutils literal"><span class="pre">is</span></code> operator for comparing
+token types.</p>
+<p>As of Pygments 0.7 you can also use the <code class="docutils literal"><span class="pre">in</span></code> operator to perform set tests:</p>
+<div class="highlight-pycon"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">pygments.token</span> <span class="kn">import</span> <span class="n">Comment</span>
+<span class="gp">>>> </span><span class="n">Comment</span><span class="o">.</span><span class="n">Single</span> <span class="ow">in</span> <span class="n">Comment</span>
+<span class="go">True</span>
+<span class="gp">>>> </span><span class="n">Comment</span> <span class="ow">in</span> <span class="n">Comment</span><span class="o">.</span><span class="n">Multi</span>
+<span class="go">False</span>
+</pre></div>
+</div>
+<p>This can be useful in <a class="reference internal" href="filters.html"><em>filters</em></a> and if you write lexers on your
+own without using the base lexers.</p>
+<p>You can also split a token type into a hierarchy, and get the parent of it:</p>
+<div class="highlight-pycon"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">String</span><span class="o">.</span><span class="n">split</span><span class="p">()</span>
+<span class="go">[Token, Token.Literal, Token.Literal.String]</span>
+<span class="gp">>>> </span><span class="n">String</span><span class="o">.</span><span class="n">parent</span>
+<span class="go">Token.Literal</span>
+</pre></div>
+</div>
+<p>In principle, you can create an unlimited number of token types but nobody can
+guarantee that a style would define style rules for a token type. Because of
+that, Pygments proposes some global token types defined in the
+<cite>pygments.token.STANDARD_TYPES</cite> dict.</p>
+<p>For some tokens aliases are already defined:</p>
+<div class="highlight-pycon"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">pygments.token</span> <span class="kn">import</span> <span class="n">String</span>
+<span class="gp">>>> </span><span class="n">String</span>
+<span class="go">Token.Literal.String</span>
+</pre></div>
+</div>
+<p>Inside the <a class="reference internal" href="#module-pygments.token" title="pygments.token"><code class="xref py py-mod docutils literal"><span class="pre">pygments.token</span></code></a> module the following aliases are defined:</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="17%" />
+<col width="36%" />
+<col width="47%" />
+</colgroup>
+<tbody valign="top">
+<tr class="row-odd"><td><cite>Text</cite></td>
+<td><cite>Token.Text</cite></td>
+<td>for any type of text data</td>
+</tr>
+<tr class="row-even"><td><cite>Whitespace</cite></td>
+<td><cite>Token.Text.Whitespace</cite></td>
+<td>for specially highlighted whitespace</td>
+</tr>
+<tr class="row-odd"><td><cite>Error</cite></td>
+<td><cite>Token.Error</cite></td>
+<td>represents lexer errors</td>
+</tr>
+<tr class="row-even"><td><cite>Other</cite></td>
+<td><cite>Token.Other</cite></td>
+<td>special token for data not
+matched by a parser (e.g. HTML
+markup in PHP code)</td>
+</tr>
+<tr class="row-odd"><td><cite>Keyword</cite></td>
+<td><cite>Token.Keyword</cite></td>
+<td>any kind of keywords</td>
+</tr>
+<tr class="row-even"><td><cite>Name</cite></td>
+<td><cite>Token.Name</cite></td>
+<td>variable/function names</td>
+</tr>
+<tr class="row-odd"><td><cite>Literal</cite></td>
+<td><cite>Token.Literal</cite></td>
+<td>Any literals</td>
+</tr>
+<tr class="row-even"><td><cite>String</cite></td>
+<td><cite>Token.Literal.String</cite></td>
+<td>string literals</td>
+</tr>
+<tr class="row-odd"><td><cite>Number</cite></td>
+<td><cite>Token.Literal.Number</cite></td>
+<td>number literals</td>
+</tr>
+<tr class="row-even"><td><cite>Operator</cite></td>
+<td><cite>Token.Operator</cite></td>
+<td>operators (<code class="docutils literal"><span class="pre">+</span></code>, <code class="docutils literal"><span class="pre">not</span></code>...)</td>
+</tr>
+<tr class="row-odd"><td><cite>Punctuation</cite></td>
+<td><cite>Token.Punctuation</cite></td>
+<td>punctuation (<code class="docutils literal"><span class="pre">[</span></code>, <code class="docutils literal"><span class="pre">(</span></code>...)</td>
+</tr>
+<tr class="row-even"><td><cite>Comment</cite></td>
+<td><cite>Token.Comment</cite></td>
+<td>any kind of comments</td>
+</tr>
+<tr class="row-odd"><td><cite>Generic</cite></td>
+<td><cite>Token.Generic</cite></td>
+<td>generic tokens (have a look at
+the explanation below)</td>
+</tr>
+</tbody>
+</table>
+<p>The <cite>Whitespace</cite> token type is new in Pygments 0.8. It is used only by the
+<cite>VisibleWhitespaceFilter</cite> currently.</p>
+<p>Normally you just create token types using the already defined aliases. For each
+of those token aliases, a number of subtypes exists (excluding the special tokens
+<cite>Token.Text</cite>, <cite>Token.Error</cite> and <cite>Token.Other</cite>)</p>
+<p>The <cite>is_token_subtype()</cite> function in the <cite>pygments.token</cite> module can be used to
+test if a token type is a subtype of another (such as <cite>Name.Tag</cite> and <cite>Name</cite>).
+(This is the same as <code class="docutils literal"><span class="pre">Name.Tag</span> <span class="pre">in</span> <span class="pre">Name</span></code>. The overloaded <cite>in</cite> operator was newly
+introduced in Pygments 0.7, the function still exists for backwards
+compatiblity.)</p>
+<p>With Pygments 0.7, it’s also possible to convert strings to token types (for example
+if you want to supply a token from the command line):</p>
+<div class="highlight-pycon"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">pygments.token</span> <span class="kn">import</span> <span class="n">String</span><span class="p">,</span> <span class="n">string_to_tokentype</span>
+<span class="gp">>>> </span><span class="n">string_to_tokentype</span><span class="p">(</span><span class="s">"String"</span><span class="p">)</span>
+<span class="go">Token.Literal.String</span>
+<span class="gp">>>> </span><span class="n">string_to_tokentype</span><span class="p">(</span><span class="s">"Token.Literal.String"</span><span class="p">)</span>
+<span class="go">Token.Literal.String</span>
+<span class="gp">>>> </span><span class="n">string_to_tokentype</span><span class="p">(</span><span class="n">String</span><span class="p">)</span>
+<span class="go">Token.Literal.String</span>
+</pre></div>
+</div>
+<div class="section" id="keyword-tokens">
+<h2>Keyword Tokens<a class="headerlink" href="#keyword-tokens" title="Permalink to this headline">¶</a></h2>
+<dl class="docutils">
+<dt><cite>Keyword</cite></dt>
+<dd>For any kind of keyword (especially if it doesn’t match any of the
+subtypes of course).</dd>
+<dt><cite>Keyword.Constant</cite></dt>
+<dd>For keywords that are constants (e.g. <code class="docutils literal"><span class="pre">None</span></code> in future Python versions).</dd>
+<dt><cite>Keyword.Declaration</cite></dt>
+<dd>For keywords used for variable declaration (e.g. <code class="docutils literal"><span class="pre">var</span></code> in some programming
+languages like JavaScript).</dd>
+<dt><cite>Keyword.Namespace</cite></dt>
+<dd>For keywords used for namespace declarations (e.g. <code class="docutils literal"><span class="pre">import</span></code> in Python and
+Java and <code class="docutils literal"><span class="pre">package</span></code> in Java).</dd>
+<dt><cite>Keyword.Pseudo</cite></dt>
+<dd>For keywords that aren’t really keywords (e.g. <code class="docutils literal"><span class="pre">None</span></code> in old Python
+versions).</dd>
+<dt><cite>Keyword.Reserved</cite></dt>
+<dd>For reserved keywords.</dd>
+<dt><cite>Keyword.Type</cite></dt>
+<dd>For builtin types that can’t be used as identifiers (e.g. <code class="docutils literal"><span class="pre">int</span></code>,
+<code class="docutils literal"><span class="pre">char</span></code> etc. in C).</dd>
+</dl>
+</div>
+<div class="section" id="name-tokens">
+<h2>Name Tokens<a class="headerlink" href="#name-tokens" title="Permalink to this headline">¶</a></h2>
+<dl class="docutils">
+<dt><cite>Name</cite></dt>
+<dd>For any name (variable names, function names, classes).</dd>
+<dt><cite>Name.Attribute</cite></dt>
+<dd>For all attributes (e.g. in HTML tags).</dd>
+<dt><cite>Name.Builtin</cite></dt>
+<dd>Builtin names; names that are available in the global namespace.</dd>
+<dt><cite>Name.Builtin.Pseudo</cite></dt>
+<dd>Builtin names that are implicit (e.g. <code class="docutils literal"><span class="pre">self</span></code> in Ruby, <code class="docutils literal"><span class="pre">this</span></code> in Java).</dd>
+<dt><cite>Name.Class</cite></dt>
+<dd>Class names. Because no lexer can know if a name is a class or a function
+or something else this token is meant for class declarations.</dd>
+<dt><cite>Name.Constant</cite></dt>
+<dd>Token type for constants. In some languages you can recognise a token by the
+way it’s defined (the value after a <code class="docutils literal"><span class="pre">const</span></code> keyword for example). In
+other languages constants are uppercase by definition (Ruby).</dd>
+<dt><cite>Name.Decorator</cite></dt>
+<dd>Token type for decorators. Decorators are synatic elements in the Python
+language. Similar syntax elements exist in C# and Java.</dd>
+<dt><cite>Name.Entity</cite></dt>
+<dd>Token type for special entities. (e.g. <code class="docutils literal"><span class="pre">&nbsp;</span></code> in HTML).</dd>
+<dt><cite>Name.Exception</cite></dt>
+<dd>Token type for exception names (e.g. <code class="docutils literal"><span class="pre">RuntimeError</span></code> in Python). Some languages
+define exceptions in the function signature (Java). You can highlight
+the name of that exception using this token then.</dd>
+<dt><cite>Name.Function</cite></dt>
+<dd>Token type for function names.</dd>
+<dt><cite>Name.Label</cite></dt>
+<dd>Token type for label names (e.g. in languages that support <code class="docutils literal"><span class="pre">goto</span></code>).</dd>
+<dt><cite>Name.Namespace</cite></dt>
+<dd>Token type for namespaces. (e.g. import paths in Java/Python), names following
+the <code class="docutils literal"><span class="pre">module</span></code>/<code class="docutils literal"><span class="pre">namespace</span></code> keyword in other languages.</dd>
+<dt><cite>Name.Other</cite></dt>
+<dd>Other names. Normally unused.</dd>
+<dt><cite>Name.Tag</cite></dt>
+<dd>Tag names (in HTML/XML markup or configuration files).</dd>
+<dt><cite>Name.Variable</cite></dt>
+<dd>Token type for variables. Some languages have prefixes for variable names
+(PHP, Ruby, Perl). You can highlight them using this token.</dd>
+<dt><cite>Name.Variable.Class</cite></dt>
+<dd>same as <cite>Name.Variable</cite> but for class variables (also static variables).</dd>
+<dt><cite>Name.Variable.Global</cite></dt>
+<dd>same as <cite>Name.Variable</cite> but for global variables (used in Ruby, for
+example).</dd>
+<dt><cite>Name.Variable.Instance</cite></dt>
+<dd>same as <cite>Name.Variable</cite> but for instance variables.</dd>
+</dl>
+</div>
+<div class="section" id="literals">
+<h2>Literals<a class="headerlink" href="#literals" title="Permalink to this headline">¶</a></h2>
+<dl class="docutils">
+<dt><cite>Literal</cite></dt>
+<dd>For any literal (if not further defined).</dd>
+<dt><cite>Literal.Date</cite></dt>
+<dd>for date literals (e.g. <code class="docutils literal"><span class="pre">42d</span></code> in Boo).</dd>
+<dt><cite>String</cite></dt>
+<dd>For any string literal.</dd>
+<dt><cite>String.Backtick</cite></dt>
+<dd>Token type for strings enclosed in backticks.</dd>
+<dt><cite>String.Char</cite></dt>
+<dd>Token type for single characters (e.g. Java, C).</dd>
+<dt><cite>String.Doc</cite></dt>
+<dd>Token type for documentation strings (for example Python).</dd>
+<dt><cite>String.Double</cite></dt>
+<dd>Double quoted strings.</dd>
+<dt><cite>String.Escape</cite></dt>
+<dd>Token type for escape sequences in strings.</dd>
+<dt><cite>String.Heredoc</cite></dt>
+<dd>Token type for “heredoc” strings (e.g. in Ruby or Perl).</dd>
+<dt><cite>String.Interpol</cite></dt>
+<dd>Token type for interpolated parts in strings (e.g. <code class="docutils literal"><span class="pre">#{foo}</span></code> in Ruby).</dd>
+<dt><cite>String.Other</cite></dt>
+<dd>Token type for any other strings (for example <code class="docutils literal"><span class="pre">%q{foo}</span></code> string constructs
+in Ruby).</dd>
+<dt><cite>String.Regex</cite></dt>
+<dd>Token type for regular expression literals (e.g. <code class="docutils literal"><span class="pre">/foo/</span></code> in JavaScript).</dd>
+<dt><cite>String.Single</cite></dt>
+<dd>Token type for single quoted strings.</dd>
+<dt><cite>String.Symbol</cite></dt>
+<dd>Token type for symbols (e.g. <code class="docutils literal"><span class="pre">:foo</span></code> in LISP or Ruby).</dd>
+<dt><cite>Number</cite></dt>
+<dd>Token type for any number literal.</dd>
+<dt><cite>Number.Bin</cite></dt>
+<dd>Token type for binary literals (e.g. <code class="docutils literal"><span class="pre">0b101010</span></code>).</dd>
+<dt><cite>Number.Float</cite></dt>
+<dd>Token type for float literals (e.g. <code class="docutils literal"><span class="pre">42.0</span></code>).</dd>
+<dt><cite>Number.Hex</cite></dt>
+<dd>Token type for hexadecimal number literals (e.g. <code class="docutils literal"><span class="pre">0xdeadbeef</span></code>).</dd>
+<dt><cite>Number.Integer</cite></dt>
+<dd>Token type for integer literals (e.g. <code class="docutils literal"><span class="pre">42</span></code>).</dd>
+<dt><cite>Number.Integer.Long</cite></dt>
+<dd>Token type for long integer literals (e.g. <code class="docutils literal"><span class="pre">42L</span></code> in Python).</dd>
+<dt><cite>Number.Oct</cite></dt>
+<dd>Token type for octal literals.</dd>
+</dl>
+</div>
+<div class="section" id="operators">
+<h2>Operators<a class="headerlink" href="#operators" title="Permalink to this headline">¶</a></h2>
+<dl class="docutils">
+<dt><cite>Operator</cite></dt>
+<dd>For any punctuation operator (e.g. <code class="docutils literal"><span class="pre">+</span></code>, <code class="docutils literal"><span class="pre">-</span></code>).</dd>
+<dt><cite>Operator.Word</cite></dt>
+<dd>For any operator that is a word (e.g. <code class="docutils literal"><span class="pre">not</span></code>).</dd>
+</dl>
+</div>
+<div class="section" id="punctuation">
+<h2>Punctuation<a class="headerlink" href="#punctuation" title="Permalink to this headline">¶</a></h2>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.7.</span></p>
+</div>
+<dl class="docutils">
+<dt><cite>Punctuation</cite></dt>
+<dd>For any punctuation which is not an operator (e.g. <code class="docutils literal"><span class="pre">[</span></code>, <code class="docutils literal"><span class="pre">(</span></code>...)</dd>
+</dl>
+</div>
+<div class="section" id="comments">
+<h2>Comments<a class="headerlink" href="#comments" title="Permalink to this headline">¶</a></h2>
+<dl class="docutils">
+<dt><cite>Comment</cite></dt>
+<dd>Token type for any comment.</dd>
+<dt><cite>Comment.Multiline</cite></dt>
+<dd>Token type for multiline comments.</dd>
+<dt><cite>Comment.Preproc</cite></dt>
+<dd>Token type for preprocessor comments (also <code class="docutils literal"><span class="pre"><?php</span></code>/<code class="docutils literal"><span class="pre"><%</span></code> constructs).</dd>
+<dt><cite>Comment.Single</cite></dt>
+<dd>Token type for comments that end at the end of a line (e.g. <code class="docutils literal"><span class="pre">#</span> <span class="pre">foo</span></code>).</dd>
+<dt><cite>Comment.Special</cite></dt>
+<dd>Special data in comments. For example code tags, author and license
+information, etc.</dd>
+</dl>
+</div>
+<div class="section" id="generic-tokens">
+<h2>Generic Tokens<a class="headerlink" href="#generic-tokens" title="Permalink to this headline">¶</a></h2>
+<p>Generic tokens are for special lexers like the <cite>DiffLexer</cite> that doesn’t really
+highlight a programming language but a patch file.</p>
+<dl class="docutils">
+<dt><cite>Generic</cite></dt>
+<dd>A generic, unstyled token. Normally you don’t use this token type.</dd>
+<dt><cite>Generic.Deleted</cite></dt>
+<dd>Marks the token value as deleted.</dd>
+<dt><cite>Generic.Emph</cite></dt>
+<dd>Marks the token value as emphasized.</dd>
+<dt><cite>Generic.Error</cite></dt>
+<dd>Marks the token value as an error message.</dd>
+<dt><cite>Generic.Heading</cite></dt>
+<dd>Marks the token value as headline.</dd>
+<dt><cite>Generic.Inserted</cite></dt>
+<dd>Marks the token value as inserted.</dd>
+<dt><cite>Generic.Output</cite></dt>
+<dd>Marks the token value as program output (e.g. for python cli lexer).</dd>
+<dt><cite>Generic.Prompt</cite></dt>
+<dd>Marks the token value as command prompt (e.g. bash lexer).</dd>
+<dt><cite>Generic.Strong</cite></dt>
+<dd>Marks the token value as bold (e.g. for rst lexer).</dd>
+<dt><cite>Generic.Subheading</cite></dt>
+<dd>Marks the token value as subheadline.</dd>
+<dt><cite>Generic.Traceback</cite></dt>
+<dd>Marks the token value as a part of an error traceback.</dd>
+</dl>
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ <h3><a href="../index.html">Table Of Contents</a></h3>
+ <ul>
+<li><a class="reference internal" href="#">Builtin Tokens</a><ul>
+<li><a class="reference internal" href="#keyword-tokens">Keyword Tokens</a></li>
+<li><a class="reference internal" href="#name-tokens">Name Tokens</a></li>
+<li><a class="reference internal" href="#literals">Literals</a></li>
+<li><a class="reference internal" href="#operators">Operators</a></li>
+<li><a class="reference internal" href="#punctuation">Punctuation</a></li>
+<li><a class="reference internal" href="#comments">Comments</a></li>
+<li><a class="reference internal" href="#generic-tokens">Generic Tokens</a></li>
+</ul>
+</li>
+</ul>
+
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="unicode.html"
+ title="previous chapter">Unicode and Encodings</a></p>
+ <h4>Next topic</h4>
+ <p class="topless"><a href="api.html"
+ title="next chapter">The full Pygments API</a></p>
+ <div role="note" aria-label="source link">
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="../_sources/docs/tokens.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+ </div>
+<strong>« <a href="index.html">Back to docs index</a></strong>
+
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="../search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="api.html" title="The full Pygments API"
+ >next</a> |</li>
+ <li class="right" >
+ <a href="unicode.html" title="Unicode and Encodings"
+ >previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" >Pygments documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Unicode and Encodings — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '../',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+ <link rel="shortcut icon" href="../_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="../index.html" />
+ <link rel="up" title="Pygments documentation" href="index.html" />
+ <link rel="next" title="Builtin Tokens" href="tokens.html" />
+ <link rel="prev" title="Styles" href="styles.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="tokens.html" title="Builtin Tokens"
+ accesskey="N">next</a> |</li>
+ <li class="right" >
+ <a href="styles.html" title="Styles"
+ accesskey="P">previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" accesskey="U">Pygments documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <div class="section" id="unicode-and-encodings">
+<h1>Unicode and Encodings<a class="headerlink" href="#unicode-and-encodings" title="Permalink to this headline">¶</a></h1>
+<p>Since Pygments 0.6, all lexers use unicode strings internally. Because of that
+you might encounter the occasional <code class="xref py py-exc docutils literal"><span class="pre">UnicodeDecodeError</span></code> if you pass strings
+with the wrong encoding.</p>
+<p>Per default all lexers have their input encoding set to <cite>guess</cite>. This means
+that the following encodings are tried:</p>
+<ul class="simple">
+<li>UTF-8 (including BOM handling)</li>
+<li>The locale encoding (i.e. the result of <cite>locale.getpreferredencoding()</cite>)</li>
+<li>As a last resort, <cite>latin1</cite></li>
+</ul>
+<p>If you pass a lexer a byte string object (not unicode), it tries to decode the
+data using this encoding.</p>
+<p>You can override the encoding using the <cite>encoding</cite> or <cite>inencoding</cite> lexer
+options. If you have the <a class="reference external" href="http://chardet.feedparser.org/">chardet</a> library installed and set the encoding to
+<code class="docutils literal"><span class="pre">chardet</span></code> if will ananlyse the text and use the encoding it thinks is the
+right one automatically:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">pygments.lexers</span> <span class="kn">import</span> <span class="n">PythonLexer</span>
+<span class="n">lexer</span> <span class="o">=</span> <span class="n">PythonLexer</span><span class="p">(</span><span class="n">encoding</span><span class="o">=</span><span class="s">'chardet'</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>The best way is to pass Pygments unicode objects. In that case you can’t get
+unexpected output.</p>
+<p>The formatters now send Unicode objects to the stream if you don’t set the
+output encoding. You can do so by passing the formatters an <cite>encoding</cite> option:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">pygments.formatters</span> <span class="kn">import</span> <span class="n">HtmlFormatter</span>
+<span class="n">f</span> <span class="o">=</span> <span class="n">HtmlFormatter</span><span class="p">(</span><span class="n">encoding</span><span class="o">=</span><span class="s">'utf-8'</span><span class="p">)</span>
+</pre></div>
+</div>
+<p><strong>You will have to set this option if you have non-ASCII characters in the
+source and the output stream does not accept Unicode written to it!</strong>
+This is the case for all regular files and for terminals.</p>
+<p>Note: The Terminal formatter tries to be smart: if its output stream has an
+<cite>encoding</cite> attribute, and you haven’t set the option, it will encode any
+Unicode string with this encoding before writing it. This is the case for
+<cite>sys.stdout</cite>, for example. The other formatters don’t have that behavior.</p>
+<p>Another note: If you call Pygments via the command line (<cite>pygmentize</cite>),
+encoding is handled differently, see <a class="reference internal" href="cmdline.html"><em>the command line docs</em></a>.</p>
+<div class="versionadded">
+<p><span class="versionmodified">New in version 0.7: </span>The formatters now also accept an <cite>outencoding</cite> option which will override
+the <cite>encoding</cite> option if given. This makes it possible to use a single
+options dict with lexers and formatters, and still have different input and
+output encodings.</p>
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="styles.html"
+ title="previous chapter">Styles</a></p>
+ <h4>Next topic</h4>
+ <p class="topless"><a href="tokens.html"
+ title="next chapter">Builtin Tokens</a></p>
+ <div role="note" aria-label="source link">
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="../_sources/docs/unicode.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+ </div>
+<strong>« <a href="index.html">Back to docs index</a></strong>
+
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="../search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="tokens.html" title="Builtin Tokens"
+ >next</a> |</li>
+ <li class="right" >
+ <a href="styles.html" title="Styles"
+ >previous</a> |</li>
+ <li><a href="../index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="index.html" >Pygments documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Download and installation — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: './',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="_static/jquery.js"></script>
+ <script type="text/javascript" src="_static/underscore.js"></script>
+ <script type="text/javascript" src="_static/doctools.js"></script>
+ <link rel="shortcut icon" href="_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="index.html" />
+ <link rel="up" title="Pygments documentation" href="docs/index.html" />
+ <link rel="next" title="Introduction and Quickstart" href="docs/quickstart.html" />
+ <link rel="prev" title="Pygments documentation" href="docs/index.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="docs/quickstart.html" title="Introduction and Quickstart"
+ accesskey="N">next</a> |</li>
+ <li class="right" >
+ <a href="docs/index.html" title="Pygments documentation"
+ accesskey="P">previous</a> |</li>
+ <li><a href="index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="docs/index.html" accesskey="U">Pygments documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <div class="section" id="download-and-installation">
+<h1>Download and installation<a class="headerlink" href="#download-and-installation" title="Permalink to this headline">¶</a></h1>
+<p>The current release is version 2.0pre.</p>
+<div class="section" id="packaged-versions">
+<h2>Packaged versions<a class="headerlink" href="#packaged-versions" title="Permalink to this headline">¶</a></h2>
+<p>You can download it <a class="reference external" href="http://pypi.python.org/pypi/Pygments">from the Python Package Index</a>. For installation of packages from
+PyPI, we recommend <a class="reference external" href="http://www.pip-installer.org">Pip</a>, which works on all
+major platforms.</p>
+<p>Under Linux, most distributions include a package for Pygments, usually called
+<code class="docutils literal"><span class="pre">pygments</span></code> or <code class="docutils literal"><span class="pre">python-pygments</span></code>. You can install it with the package
+manager as usual.</p>
+</div>
+<div class="section" id="development-sources">
+<h2>Development sources<a class="headerlink" href="#development-sources" title="Permalink to this headline">¶</a></h2>
+<p>We’re using the <a class="reference external" href="http://selenic.com/mercurial">Mercurial</a> version control
+system. You can get the development source using this command:</p>
+<div class="highlight-python"><div class="highlight"><pre>hg clone http://bitbucket.org/birkenfeld/pygments-main pygments
+</pre></div>
+</div>
+<p>Development takes place at <a class="reference external" href="http://bitbucket.org/birkenfeld/pygments-main">Bitbucket</a>, you can browse the source
+online <a class="reference external" href="http://bitbucket.org/birkenfeld/pygments-main/src">here</a>.</p>
+<p>The latest changes in the development source code are listed in the <a class="reference external" href="http://bitbucket.org/birkenfeld/pygments-main/src/tip/CHANGES">changelog</a>.</p>
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ <h3><a href="index.html">Table Of Contents</a></h3>
+ <ul>
+<li><a class="reference internal" href="#">Download and installation</a><ul>
+<li><a class="reference internal" href="#packaged-versions">Packaged versions</a></li>
+<li><a class="reference internal" href="#development-sources">Development sources</a></li>
+</ul>
+</li>
+</ul>
+
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="docs/index.html"
+ title="previous chapter">Pygments documentation</a></p>
+ <h4>Next topic</h4>
+ <p class="topless"><a href="docs/quickstart.html"
+ title="next chapter">Introduction and Quickstart</a></p>
+ <div role="note" aria-label="source link">
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="_sources/download.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+ </div>
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="docs/quickstart.html" title="Introduction and Quickstart"
+ >next</a> |</li>
+ <li class="right" >
+ <a href="docs/index.html" title="Pygments documentation"
+ >previous</a> |</li>
+ <li><a href="index.html">Pygments 2.0pre documentation</a> »</li>
+ <li><a href="docs/index.html" >Pygments documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Pygments FAQ — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: './',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="_static/jquery.js"></script>
+ <script type="text/javascript" src="_static/underscore.js"></script>
+ <script type="text/javascript" src="_static/doctools.js"></script>
+ <link rel="shortcut icon" href="_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="index.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li><a href="index.html">Pygments 2.0pre documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <div class="section" id="pygments-faq">
+<h1>Pygments FAQ<a class="headerlink" href="#pygments-faq" title="Permalink to this headline">¶</a></h1>
+<div class="section" id="what-is-pygments">
+<h2>What is Pygments?<a class="headerlink" href="#what-is-pygments" title="Permalink to this headline">¶</a></h2>
+<p>Pygments is a syntax highlighting engine written in Python. That means, it will
+take source code (or other markup) in a supported language and output a
+processed version (in different formats) containing syntax highlighting markup.</p>
+<p>Its features include:</p>
+<ul class="simple">
+<li>a wide range of common languages and markup formats is supported (look here
+for a list)</li>
+<li>new languages and formats are added easily</li>
+<li>a number of output formats is available, including:<ul>
+<li>HTML</li>
+<li>ANSI sequences (console output)</li>
+<li>LaTeX</li>
+<li>RTF</li>
+</ul>
+</li>
+<li>it is usable as a command-line tool and as a library</li>
+<li>parsing and formatting is fast</li>
+</ul>
+<p>Pygments is licensed under the BSD license.</p>
+</div>
+<div class="section" id="where-does-the-name-pygments-come-from">
+<h2>Where does the name Pygments come from?<a class="headerlink" href="#where-does-the-name-pygments-come-from" title="Permalink to this headline">¶</a></h2>
+<p><em>Py</em> of course stands for Python, while <em>pigments</em> are used for coloring paint,
+and in this case, source code!</p>
+</div>
+<div class="section" id="what-are-the-system-requirements">
+<h2>What are the system requirements?<a class="headerlink" href="#what-are-the-system-requirements" title="Permalink to this headline">¶</a></h2>
+<p>Pygments only needs a standard Python install, version 2.6 or higher or version
+3.3 or higher for Python 3. No additional libraries are needed.</p>
+</div>
+<div class="section" id="how-can-i-use-pygments">
+<h2>How can I use Pygments?<a class="headerlink" href="#how-can-i-use-pygments" title="Permalink to this headline">¶</a></h2>
+<p>Pygments is usable as a command-line tool as well as a library.</p>
+<p>From the command-line, usage looks like this (assuming the pygmentize script is
+properly installed):</p>
+<div class="highlight-python"><div class="highlight"><pre>pygmentize -f html /path/to/file.py
+</pre></div>
+</div>
+<p>This will print a HTML-highlighted version of /path/to/file.py to standard output.</p>
+<p>For a complete help, please run <code class="docutils literal"><span class="pre">pygmentize</span> <span class="pre">-h</span></code>.</p>
+<p>Usage as a library is thoroughly demonstrated in the Documentation section.</p>
+</div>
+<div class="section" id="how-do-i-make-a-new-style">
+<h2>How do I make a new style?<a class="headerlink" href="#how-do-i-make-a-new-style" title="Permalink to this headline">¶</a></h2>
+<p>Please see the <a class="reference internal" href="docs/styles.html"><em>documentation on styles</em></a>.</p>
+</div>
+<div class="section" id="how-can-i-report-a-bug-or-suggest-a-feature">
+<h2>How can I report a bug or suggest a feature?<a class="headerlink" href="#how-can-i-report-a-bug-or-suggest-a-feature" title="Permalink to this headline">¶</a></h2>
+<p>Please report bugs and feature wishes in the tracker at Bitbucket.</p>
+<p>You can also e-mail the author or use IRC, see the contact details.</p>
+</div>
+<div class="section" id="i-want-this-support-for-this-language">
+<h2>I want this support for this language!<a class="headerlink" href="#i-want-this-support-for-this-language" title="Permalink to this headline">¶</a></h2>
+<p>Instead of waiting for others to include language support, why not write it
+yourself? All you have to know is <a class="reference internal" href="docs/lexerdevelopment.html"><em>outlined in the docs</em></a>.</p>
+</div>
+<div class="section" id="can-i-use-pygments-for-programming-language-processing">
+<h2>Can I use Pygments for programming language processing?<a class="headerlink" href="#can-i-use-pygments-for-programming-language-processing" title="Permalink to this headline">¶</a></h2>
+<p>The Pygments lexing machinery is quite powerful can be used to build lexers for
+basically all languages. However, parsing them is not possible, though some
+lexers go some steps in this direction in order to e.g. highlight function names
+differently.</p>
+<p>Also, error reporting is not the scope of Pygments. It focuses on correctly
+highlighting syntactically valid documents, not finding and compensating errors.</p>
+</div>
+<div class="section" id="who-uses-pygments">
+<h2>Who uses Pygments?<a class="headerlink" href="#who-uses-pygments" title="Permalink to this headline">¶</a></h2>
+<p>This is an (incomplete) list of projects and sites known to use the Pygments highlighter.</p>
+<ul class="simple">
+<li><a class="reference external" href="http://pygments.appspot.com/">Pygments API</a>, a HTTP POST interface to Pygments</li>
+<li><a class="reference external" href="http://sphinx.pocoo.org/">The Sphinx documentation builder</a>, for embedded source examples</li>
+<li><a class="reference external" href="http://code.google.com/p/rst2pdf/">rst2pdf</a>, a reStructuredText to PDF converter</li>
+<li><a class="reference external" href="http://zine.pocoo.org/">Zine</a>, a Python blogging system</li>
+<li><a class="reference external" href="http://trac.edgewall.org/">Trac</a>, the universal project management tool</li>
+<li><a class="reference external" href="http://r1chardj0n3s.googlepages.com/bruce">Bruce</a>, a reStructuredText presentation tool</li>
+<li><a class="reference external" href="http://www.methods.co.nz/asciidoc/">AsciiDoc</a>, a text-based documentation generator</li>
+<li><a class="reference external" href="http://code.activestate.com/">ActiveState Code</a>, the Python Cookbook successor</li>
+<li><a class="reference external" href="http://viewvc.org/">ViewVC</a>, a web-based version control repository browser</li>
+<li><a class="reference external" href="http://repo.or.cz/w/bzrfruit.git">BzrFruit</a>, a Bazaar branch viewer</li>
+<li><a class="reference external" href="http://bazaar-vcs.org/QBzr">QBzr</a>, a cross-platform Qt-based GUI front end for Bazaar</li>
+<li><a class="reference external" href="http://bitbucket.org/">BitBucket</a>, a Mercurial and Git hosting site</li>
+<li><a class="reference external" href="http://github.com/">GitHub</a>, a site offering secure Git hosting and collaborative development</li>
+<li><a class="reference external" href="http://www.review-board.org/">Review Board</a>, a collaborative code reviewing tool</li>
+<li><a class="reference external" href="http://orangoo.com/skeletonz/">skeletonz</a>, a Python powered content management system</li>
+<li><a class="reference external" href="http://code.google.com/p/diamanda/">Diamanda</a>, a Django powered wiki system with support for Pygments</li>
+<li><a class="reference external" href="http://progopedia.ru/">Progopedia</a> (<a class="reference external" href="http://progopedia.com/">English</a>),
+an encyclopedia of programming languages</li>
+<li><a class="reference external" href="http://code.google.com/p/postmarkup/">Postmarkup</a>, a BBCode to XHTML generator</li>
+<li><a class="reference external" href="http://michaelsilver.us/lc">Language Comparison</a>, a site that compares different programming languages</li>
+<li><a class="reference external" href="http://www.noiseforfree.com/bpython/">BPython</a>, a curses-based intelligent Python shell</li>
+<li><a class="reference external" href="http://challenge-you.appspot.com/">Challenge-You!</a>, a site offering programming challenges</li>
+<li><a class="reference external" href="http://pida.co.uk/">PIDA</a>, a universal IDE written in Python</li>
+<li><a class="reference external" href="http://pypi.python.org/pypi/pudb">PuDB</a>, a console Python debugger</li>
+<li><a class="reference external" href="http://www.xwiki.org/">XWiki</a>, a wiki-based development framework in Java, using Jython</li>
+<li><a class="reference external" href="http://ananelson.com/software/roux/">roux</a>, a script for running R scripts
+and creating beautiful output including graphs</li>
+<li><a class="reference external" href="http://hurl.it/">hurl</a>, a web service for making HTTP requests</li>
+<li><a class="reference external" href="http://colinbarnette.net/projects/wxHTMLPygmentizer">wxHTMLPygmentizer</a> is
+a GUI utility, used to make code-colorization easier</li>
+<li><a class="reference external" href="http://blog.mirotin.net/?page_id=49">WpPygments</a>, a highlighter plugin for WordPress</li>
+<li><a class="reference external" href="http://paste.pocoo.org/">LodgeIt</a>, a pastebin with XMLRPC support and diffs</li>
+<li><a class="reference external" href="http://chrisarndt.de/projects/spammcan/">SpammCan</a>, a pastebin (demo see
+<a class="reference external" href="http://paste.chrisarndt.de/">here</a>)</li>
+<li><a class="reference external" href="http://www.wowace.com/paste/">WowAce.com pastes</a>, a pastebin</li>
+<li><a class="reference external" href="http://siafoo.net">Siafoo</a>, a tool for sharing and storing useful code and programming experience</li>
+<li><a class="reference external" href="http://www.dsource.org/">D source</a>, a community for the D programming language</li>
+<li><a class="reference external" href="http://dumpz.org/">dumpz.org</a>, a pastebin</li>
+<li><a class="reference external" href="http://dpaste.com/">dpaste.com</a>, another Django pastebin</li>
+<li><a class="reference external" href="http://pylonshq.com/pasties/new">PylonsHQ Pasties</a>, a pastebin</li>
+<li><a class="reference external" href="http://www.djangosnippets.org/">Django snippets</a>, a pastebin for Django code</li>
+<li><a class="reference external" href="http://www.fayaa.com/code/">Fayaa</a>, a Chinese pastebin</li>
+<li><a class="reference external" href="http://incollo.com">Incollo.com</a>, a free collaborative debugging tool</li>
+<li><a class="reference external" href="http://p.boxnet.eu/">PasteBox</a>, a pastebin focused on privacy</li>
+<li><a class="reference external" href="http://www.xinotes.org/">xinotes.org</a>, a site to share notes, code snippets etc.</li>
+<li><a class="reference external" href="http://www.hilite.me/">hilite.me</a>, a site to highlight code snippets</li>
+<li><a class="reference external" href="http://patx.me/paste">patx.me</a>, a pastebin</li>
+</ul>
+<p>If you have a project or web site using Pygments, drop me a line, and I’ll add a
+link here.</p>
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ <h3><a href="index.html">Table Of Contents</a></h3>
+ <ul>
+<li><a class="reference internal" href="#">Pygments FAQ</a><ul>
+<li><a class="reference internal" href="#what-is-pygments">What is Pygments?</a></li>
+<li><a class="reference internal" href="#where-does-the-name-pygments-come-from">Where does the name Pygments come from?</a></li>
+<li><a class="reference internal" href="#what-are-the-system-requirements">What are the system requirements?</a></li>
+<li><a class="reference internal" href="#how-can-i-use-pygments">How can I use Pygments?</a></li>
+<li><a class="reference internal" href="#how-do-i-make-a-new-style">How do I make a new style?</a></li>
+<li><a class="reference internal" href="#how-can-i-report-a-bug-or-suggest-a-feature">How can I report a bug or suggest a feature?</a></li>
+<li><a class="reference internal" href="#i-want-this-support-for-this-language">I want this support for this language!</a></li>
+<li><a class="reference internal" href="#can-i-use-pygments-for-programming-language-processing">Can I use Pygments for programming language processing?</a></li>
+<li><a class="reference internal" href="#who-uses-pygments">Who uses Pygments?</a></li>
+</ul>
+</li>
+</ul>
+
+ <div role="note" aria-label="source link">
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="_sources/faq.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+ </div>
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li><a href="index.html">Pygments 2.0pre documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Index — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: './',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="_static/jquery.js"></script>
+ <script type="text/javascript" src="_static/underscore.js"></script>
+ <script type="text/javascript" src="_static/doctools.js"></script>
+ <link rel="shortcut icon" href="_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="index.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="#" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li><a href="index.html">Pygments 2.0pre documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+
+<h1 id="index">Index</h1>
+
+<div class="genindex-jumpbox">
+ <a href="#A"><strong>A</strong></a>
+ | <a href="#B"><strong>B</strong></a>
+ | <a href="#C"><strong>C</strong></a>
+ | <a href="#D"><strong>D</strong></a>
+ | <a href="#E"><strong>E</strong></a>
+ | <a href="#F"><strong>F</strong></a>
+ | <a href="#G"><strong>G</strong></a>
+ | <a href="#H"><strong>H</strong></a>
+ | <a href="#I"><strong>I</strong></a>
+ | <a href="#J"><strong>J</strong></a>
+ | <a href="#K"><strong>K</strong></a>
+ | <a href="#L"><strong>L</strong></a>
+ | <a href="#M"><strong>M</strong></a>
+ | <a href="#N"><strong>N</strong></a>
+ | <a href="#O"><strong>O</strong></a>
+ | <a href="#P"><strong>P</strong></a>
+ | <a href="#Q"><strong>Q</strong></a>
+ | <a href="#R"><strong>R</strong></a>
+ | <a href="#S"><strong>S</strong></a>
+ | <a href="#T"><strong>T</strong></a>
+ | <a href="#U"><strong>U</strong></a>
+ | <a href="#V"><strong>V</strong></a>
+ | <a href="#X"><strong>X</strong></a>
+ | <a href="#Y"><strong>Y</strong></a>
+
+</div>
+<h2 id="A">A</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.ABAPLexer">ABAPLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.ActionScript3Lexer">ActionScript3Lexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.ActionScriptLexer">ActionScriptLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.AdaLexer">AdaLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.functional.AgdaLexer">AgdaLexer (class in pygments.lexers.functional)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#pygments.lexer.Lexer.alias_filenames">alias_filenames (pygments.lexer.Lexer attribute)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#pygments.formatter.Formatter.aliases">aliases (pygments.formatter.Formatter attribute)</a>
+ </dt>
+
+ <dd><dl>
+
+ <dt><a href="docs/api.html#pygments.lexer.Lexer.aliases">(pygments.lexer.Lexer attribute)</a>
+ </dt>
+
+ </dl></dd>
+
+ <dt><a href="docs/api.html#pygments.lexer.Lexer.analyse_text">analyse_text() (pygments.lexer.Lexer static method)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.parsers.AntlrActionScriptLexer">AntlrActionScriptLexer (class in pygments.lexers.parsers)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.parsers.AntlrCppLexer">AntlrCppLexer (class in pygments.lexers.parsers)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.parsers.AntlrCSharpLexer">AntlrCSharpLexer (class in pygments.lexers.parsers)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.parsers.AntlrJavaLexer">AntlrJavaLexer (class in pygments.lexers.parsers)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.parsers.AntlrLexer">AntlrLexer (class in pygments.lexers.parsers)</a>
+ </dt>
+
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.parsers.AntlrObjectiveCLexer">AntlrObjectiveCLexer (class in pygments.lexers.parsers)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.parsers.AntlrPerlLexer">AntlrPerlLexer (class in pygments.lexers.parsers)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.parsers.AntlrPythonLexer">AntlrPythonLexer (class in pygments.lexers.parsers)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.parsers.AntlrRubyLexer">AntlrRubyLexer (class in pygments.lexers.parsers)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.ApacheConfLexer">ApacheConfLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.APLLexer">APLLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.AppleScriptLexer">AppleScriptLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.jvm.AspectJLexer">AspectJLexer (class in pygments.lexers.jvm)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.AsymptoteLexer">AsymptoteLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.AutohotkeyLexer">AutohotkeyLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.AutoItLexer">AutoItLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.AwkLexer">AwkLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+ </dl></td>
+</tr></table>
+
+<h2 id="B">B</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.BaseMakefileLexer">BaseMakefileLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.shell.BashLexer">BashLexer (class in pygments.lexers.shell)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.shell.BashSessionLexer">BashSessionLexer (class in pygments.lexers.shell)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.shell.BatchLexer">BatchLexer (class in pygments.lexers.shell)</a>
+ </dt>
+
+
+ <dt><a href="docs/formatters.html#BBCodeFormatter">BBCodeFormatter (built-in class)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.BBCodeLexer">BBCodeLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.BefungeLexer">BefungeLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.BlitzBasicLexer">BlitzBasicLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.BlitzMaxLexer">BlitzMaxLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/formatters.html#BmpImageFormatter">BmpImageFormatter (built-in class)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.dotnet.BooLexer">BooLexer (class in pygments.lexers.dotnet)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.BrainfuckLexer">BrainfuckLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.BroLexer">BroLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.math.BugsLexer">BugsLexer (class in pygments.lexers.math)</a>
+ </dt>
+
+ </dl></td>
+</tr></table>
+
+<h2 id="C">C</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.asm.Ca65Lexer">Ca65Lexer (class in pygments.lexers.asm)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.CbmBasicV2Lexer">CbmBasicV2Lexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.jvm.CeylonLexer">CeylonLexer (class in pygments.lexers.jvm)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.Cfengine3Lexer">Cfengine3Lexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.ChapelLexer">ChapelLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.CheetahHtmlLexer">CheetahHtmlLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.CheetahJavascriptLexer">CheetahJavascriptLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.CheetahLexer">CheetahLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.CheetahXmlLexer">CheetahXmlLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.CirruLexer">CirruLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.ClayLexer">ClayLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.CLexer">CLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.jvm.ClojureLexer">ClojureLexer (class in pygments.lexers.jvm)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.CMakeLexer">CMakeLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.asm.CObjdumpLexer">CObjdumpLexer (class in pygments.lexers.asm)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.CobolFreeformatLexer">CobolFreeformatLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.CobolLexer">CobolLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/filters.html#CodeTagFilter">CodeTagFilter (built-in class)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.CoffeeScriptLexer">CoffeeScriptLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.ColdfusionCFCLexer">ColdfusionCFCLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.ColdfusionHtmlLexer">ColdfusionHtmlLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.ColdfusionLexer">ColdfusionLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.functional.CommonLispLexer">CommonLispLexer (class in pygments.lexers.functional)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.functional.CoqLexer">CoqLexer (class in pygments.lexers.functional)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.CppLexer">CppLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.asm.CppObjdumpLexer">CppObjdumpLexer (class in pygments.lexers.asm)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.agile.CrocLexer">CrocLexer (class in pygments.lexers.agile)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.dotnet.CSharpAspxLexer">CSharpAspxLexer (class in pygments.lexers.dotnet)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.dotnet.CSharpLexer">CSharpLexer (class in pygments.lexers.dotnet)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.CssDjangoLexer">CssDjangoLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.CssErbLexer">CssErbLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.CssGenshiLexer">CssGenshiLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.CssLexer">CssLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.CssPhpLexer">CssPhpLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.CssSmartyLexer">CssSmartyLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.CudaLexer">CudaLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.CythonLexer">CythonLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+ </dl></td>
+</tr></table>
+
+<h2 id="D">D</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.DarcsPatchLexer">DarcsPatchLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.DartLexer">DartLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.DebianControlLexer">DebianControlLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.DelphiLexer">DelphiLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.agile.DgLexer">DgLexer (class in pygments.lexers.agile)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.DiffLexer">DiffLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.DjangoLexer">DjangoLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.DLexer">DLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.asm.DObjdumpLexer">DObjdumpLexer (class in pygments.lexers.asm)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.DtdLexer">DtdLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.DuelLexer">DuelLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.DylanConsoleLexer">DylanConsoleLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.DylanLexer">DylanLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.DylanLidLexer">DylanLidLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+ </dl></td>
+</tr></table>
+
+<h2 id="E">E</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.EbnfLexer">EbnfLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.ECLexer">ECLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.ECLLexer">ECLLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.EiffelLexer">EiffelLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.functional.ElixirConsoleLexer">ElixirConsoleLexer (class in pygments.lexers.functional)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.functional.ElixirLexer">ElixirLexer (class in pygments.lexers.functional)</a>
+ </dt>
+
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.ErbLexer">ErbLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.functional.ErlangLexer">ErlangLexer (class in pygments.lexers.functional)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.functional.ErlangShellLexer">ErlangShellLexer (class in pygments.lexers.functional)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.EvoqueHtmlLexer">EvoqueHtmlLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.EvoqueLexer">EvoqueLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.EvoqueXmlLexer">EvoqueXmlLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+ </dl></td>
+</tr></table>
+
+<h2 id="F">F</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.agile.FactorLexer">FactorLexer (class in pygments.lexers.agile)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.agile.FancyLexer">FancyLexer (class in pygments.lexers.agile)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.FantomLexer">FantomLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.FelixLexer">FelixLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#pygments.formatter.Formatter.filenames">filenames (pygments.formatter.Formatter attribute)</a>
+ </dt>
+
+ <dd><dl>
+
+ <dt><a href="docs/api.html#pygments.lexer.Lexer.filenames">(pygments.lexer.Lexer attribute)</a>
+ </dt>
+
+ </dl></dd>
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/api.html#pygments.format">format() (in module pygments)</a>
+ </dt>
+
+ <dd><dl>
+
+ <dt><a href="docs/api.html#pygments.formatter.Formatter.format">(pygments.formatter.Formatter method)</a>
+ </dt>
+
+ </dl></dd>
+
+ <dt><a href="docs/api.html#pygments.formatter.Formatter">Formatter (class in pygments.formatter)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.FortranLexer">FortranLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.foxpro.FoxProLexer">FoxProLexer (class in pygments.lexers.foxpro)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.dotnet.FSharpLexer">FSharpLexer (class in pygments.lexers.dotnet)</a>
+ </dt>
+
+ </dl></td>
+</tr></table>
+
+<h2 id="G">G</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.asm.GasLexer">GasLexer (class in pygments.lexers.asm)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.GenshiLexer">GenshiLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.GenshiTextLexer">GenshiTextLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#pygments.lexers.get_all_lexers">get_all_lexers() (in module pygments.lexers)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#pygments.styles.get_all_styles">get_all_styles() (in module pygments.styles)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#pygments.util.get_bool_opt">get_bool_opt() (in module pygments.util)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#pygments.util.get_choice_opt">get_choice_opt() (in module pygments.util)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#pygments.formatters.get_formatter_by_name">get_formatter_by_name() (in module pygments.formatters)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#pygments.formatters.get_formatter_for_filename">get_formatter_for_filename() (in module pygments.formatters)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#pygments.util.get_int_opt">get_int_opt() (in module pygments.util)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#pygments.lexers.get_lexer_by_name">get_lexer_by_name() (in module pygments.lexers)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#pygments.lexers.get_lexer_for_filename">get_lexer_for_filename() (in module pygments.lexers)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#pygments.lexers.get_lexer_for_mimetype">get_lexer_for_mimetype() (in module pygments.lexers)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#pygments.util.get_list_opt">get_list_opt() (in module pygments.util)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#pygments.styles.get_style_by_name">get_style_by_name() (in module pygments.styles)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#pygments.formatter.Formatter.get_style_defs">get_style_defs() (pygments.formatter.Formatter method)</a>
+ </dt>
+
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/api.html#pygments.lexer.Lexer.get_tokens">get_tokens() (pygments.lexer.Lexer method)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#pygments.lexer.Lexer.get_tokens_unprocessed">get_tokens_unprocessed() (pygments.lexer.Lexer method)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.GettextLexer">GettextLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.GherkinLexer">GherkinLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/formatters.html#GifImageFormatter">GifImageFormatter (built-in class)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.GLShaderLexer">GLShaderLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.GnuplotLexer">GnuplotLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/filters.html#GobbleFilter">GobbleFilter (built-in class)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.GoLexer">GoLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.GoodDataCLLexer">GoodDataCLLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.jvm.GosuLexer">GosuLexer (class in pygments.lexers.jvm)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.jvm.GosuTemplateLexer">GosuTemplateLexer (class in pygments.lexers.jvm)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.GroffLexer">GroffLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.jvm.GroovyLexer">GroovyLexer (class in pygments.lexers.jvm)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#pygments.lexers.guess_lexer">guess_lexer() (in module pygments.lexers)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#pygments.lexers.guess_lexer_for_filename">guess_lexer_for_filename() (in module pygments.lexers)</a>
+ </dt>
+
+ </dl></td>
+</tr></table>
+
+<h2 id="H">H</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.HamlLexer">HamlLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.functional.HaskellLexer">HaskellLexer (class in pygments.lexers.functional)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.HaxeLexer">HaxeLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#pygments.highlight">highlight() (in module pygments)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.HtmlDjangoLexer">HtmlDjangoLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/formatters.html#HtmlFormatter">HtmlFormatter (built-in class)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.HtmlGenshiLexer">HtmlGenshiLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.HtmlLexer">HtmlLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.HtmlPhpLexer">HtmlPhpLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.HtmlSmartyLexer">HtmlSmartyLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.HttpLexer">HttpLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.HxmlLexer">HxmlLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.HybrisLexer">HybrisLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.agile.HyLexer">HyLexer (class in pygments.lexers.agile)</a>
+ </dt>
+
+ </dl></td>
+</tr></table>
+
+<h2 id="I">I</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.math.IDLLexer">IDLLexer (class in pygments.lexers.math)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.functional.IdrisLexer">IdrisLexer (class in pygments.lexers.functional)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.math.IgorLexer">IgorLexer (class in pygments.lexers.math)</a>
+ </dt>
+
+
+ <dt><a href="docs/formatters.html#ImageFormatter">ImageFormatter (built-in class)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.Inform6Lexer">Inform6Lexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.Inform6TemplateLexer">Inform6TemplateLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.Inform7Lexer">Inform7Lexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.IniLexer">IniLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.jvm.IokeLexer">IokeLexer (class in pygments.lexers.jvm)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.agile.IoLexer">IoLexer (class in pygments.lexers.agile)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.IrcLogsLexer">IrcLogsLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+ </dl></td>
+</tr></table>
+
+<h2 id="J">J</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.JadeLexer">JadeLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.math.JagsLexer">JagsLexer (class in pygments.lexers.math)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.jvm.JavaLexer">JavaLexer (class in pygments.lexers.jvm)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.JavascriptDjangoLexer">JavascriptDjangoLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.JavascriptErbLexer">JavascriptErbLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.JavascriptGenshiLexer">JavascriptGenshiLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.JavascriptLexer">JavascriptLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.JavascriptPhpLexer">JavascriptPhpLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.JavascriptSmartyLexer">JavascriptSmartyLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/formatters.html#JpgImageFormatter">JpgImageFormatter (built-in class)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.JsonLexer">JsonLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.JspLexer">JspLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.math.JuliaConsoleLexer">JuliaConsoleLexer (class in pygments.lexers.math)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.math.JuliaLexer">JuliaLexer (class in pygments.lexers.math)</a>
+ </dt>
+
+ </dl></td>
+</tr></table>
+
+<h2 id="K">K</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.KalLexer">KalLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.KconfigLexer">KconfigLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/filters.html#KeywordCaseFilter">KeywordCaseFilter (built-in class)</a>
+ </dt>
+
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.functional.KokaLexer">KokaLexer (class in pygments.lexers.functional)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.jvm.KotlinLexer">KotlinLexer (class in pygments.lexers.jvm)</a>
+ </dt>
+
+ </dl></td>
+</tr></table>
+
+<h2 id="L">L</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.LassoCssLexer">LassoCssLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.LassoHtmlLexer">LassoHtmlLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.LassoJavascriptLexer">LassoJavascriptLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.LassoLexer">LassoLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.LassoXmlLexer">LassoXmlLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/formatters.html#LatexFormatter">LatexFormatter (built-in class)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#pygments.lex">lex() (in module pygments)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#pygments.lexer.Lexer">Lexer (class in pygments.lexer)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.LighttpdConfLexer">LighttpdConfLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.functional.LiterateAgdaLexer">LiterateAgdaLexer (class in pygments.lexers.functional)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.functional.LiterateHaskellLexer">LiterateHaskellLexer (class in pygments.lexers.functional)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.functional.LiterateIdrisLexer">LiterateIdrisLexer (class in pygments.lexers.functional)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.LiveScriptLexer">LiveScriptLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.asm.LlvmLexer">LlvmLexer (class in pygments.lexers.asm)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.LogosLexer">LogosLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.LogtalkLexer">LogtalkLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.agile.LuaLexer">LuaLexer (class in pygments.lexers.agile)</a>
+ </dt>
+
+ </dl></td>
+</tr></table>
+
+<h2 id="M">M</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.MakefileLexer">MakefileLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.MakoCssLexer">MakoCssLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.MakoHtmlLexer">MakoHtmlLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.MakoJavascriptLexer">MakoJavascriptLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.MakoLexer">MakoLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.MakoXmlLexer">MakoXmlLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.MaqlLexer">MaqlLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.MaskLexer">MaskLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.MasonLexer">MasonLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.math.MathematicaLexer">MathematicaLexer (class in pygments.lexers.math)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.math.MatlabLexer">MatlabLexer (class in pygments.lexers.math)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.math.MatlabSessionLexer">MatlabSessionLexer (class in pygments.lexers.math)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#pygments.lexer.Lexer.mimetypes">mimetypes (pygments.lexer.Lexer attribute)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.agile.MiniDLexer">MiniDLexer (class in pygments.lexers.agile)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.ModelicaLexer">ModelicaLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.Modula2Lexer">Modula2Lexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.MoinWikiLexer">MoinWikiLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.MonkeyLexer">MonkeyLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.MOOCodeLexer">MOOCodeLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.agile.MoonScriptLexer">MoonScriptLexer (class in pygments.lexers.agile)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.MqlLexer">MqlLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.MscgenLexer">MscgenLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.math.MuPADLexer">MuPADLexer (class in pygments.lexers.math)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.MxmlLexer">MxmlLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.MyghtyCssLexer">MyghtyCssLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.MyghtyHtmlLexer">MyghtyHtmlLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.MyghtyJavascriptLexer">MyghtyJavascriptLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.MyghtyLexer">MyghtyLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.MyghtyXmlLexer">MyghtyXmlLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.sql.MySqlLexer">MySqlLexer (class in pygments.lexers.sql)</a>
+ </dt>
+
+ </dl></td>
+</tr></table>
+
+<h2 id="N">N</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/api.html#pygments.formatter.Formatter.name">name (pygments.formatter.Formatter attribute)</a>
+ </dt>
+
+ <dd><dl>
+
+ <dt><a href="docs/api.html#pygments.lexer.Lexer.name">(pygments.lexer.Lexer attribute)</a>
+ </dt>
+
+ </dl></dd>
+
+ <dt><a href="docs/filters.html#NameHighlightFilter">NameHighlightFilter (built-in class)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.asm.NasmLexer">NasmLexer (class in pygments.lexers.asm)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.asm.NasmObjdumpLexer">NasmObjdumpLexer (class in pygments.lexers.asm)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.dotnet.NemerleLexer">NemerleLexer (class in pygments.lexers.dotnet)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.NesCLexer">NesCLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.functional.NewLispLexer">NewLispLexer (class in pygments.lexers.functional)</a>
+ </dt>
+
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.NewspeakLexer">NewspeakLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.NginxConfLexer">NginxConfLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.NimrodLexer">NimrodLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.functional.NixLexer">NixLexer (class in pygments.lexers.functional)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.NSISLexer">NSISLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/formatters.html#NullFormatter">NullFormatter (built-in class)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.math.NumPyLexer">NumPyLexer (class in pygments.lexers.math)</a>
+ </dt>
+
+ </dl></td>
+</tr></table>
+
+<h2 id="O">O</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.asm.ObjdumpLexer">ObjdumpLexer (class in pygments.lexers.asm)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.ObjectiveCLexer">ObjectiveCLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.ObjectiveCppLexer">ObjectiveCppLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.ObjectiveJLexer">ObjectiveJLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.functional.OcamlLexer">OcamlLexer (class in pygments.lexers.functional)</a>
+ </dt>
+
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.math.OctaveLexer">OctaveLexer (class in pygments.lexers.math)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.OocLexer">OocLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.functional.OpaLexer">OpaLexer (class in pygments.lexers.functional)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.OpenEdgeLexer">OpenEdgeLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#pygments.util.OptionError">OptionError</a>
+ </dt>
+
+ </dl></td>
+</tr></table>
+
+<h2 id="P">P</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.agile.Perl6Lexer">Perl6Lexer (class in pygments.lexers.agile)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.agile.PerlLexer">PerlLexer (class in pygments.lexers.agile)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.PhpLexer">PhpLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.PikeLexer">PikeLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.sql.PlPgsqlLexer">PlPgsqlLexer (class in pygments.lexers.sql)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.sql.PostgresConsoleLexer">PostgresConsoleLexer (class in pygments.lexers.sql)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.sql.PostgresLexer">PostgresLexer (class in pygments.lexers.sql)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.PostScriptLexer">PostScriptLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.PovrayLexer">PovrayLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.shell.PowerShellLexer">PowerShellLexer (class in pygments.lexers.shell)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.PrologLexer">PrologLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.PropertiesLexer">PropertiesLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.ProtoBufLexer">ProtoBufLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.PuppetLexer">PuppetLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#module-pygments">pygments (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#module-pygments.formatter">pygments.formatter (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#module-pygments.formatters">pygments.formatters (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#module-pygments.lexer">pygments.lexer (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#module-pygments.lexers">pygments.lexers (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#module-pygments.lexers.agile">pygments.lexers.agile (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#module-pygments.lexers.asm">pygments.lexers.asm (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#module-pygments.lexers.compiled">pygments.lexers.compiled (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#module-pygments.lexers.dalvik">pygments.lexers.dalvik (module)</a>
+ </dt>
+
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#module-pygments.lexers.dotnet">pygments.lexers.dotnet (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#module-pygments.lexers.foxpro">pygments.lexers.foxpro (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#module-pygments.lexers.functional">pygments.lexers.functional (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#module-pygments.lexers.hdl">pygments.lexers.hdl (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#module-pygments.lexers.jvm">pygments.lexers.jvm (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#module-pygments.lexers.math">pygments.lexers.math (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#module-pygments.lexers.other">pygments.lexers.other (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#module-pygments.lexers.parsers">pygments.lexers.parsers (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#module-pygments.lexers.shell">pygments.lexers.shell (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#module-pygments.lexers.special">pygments.lexers.special (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#module-pygments.lexers.sql">pygments.lexers.sql (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#module-pygments.lexers.templates">pygments.lexers.templates (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#module-pygments.lexers.text">pygments.lexers.text (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#module-pygments.lexers.web">pygments.lexers.web (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#module-pygments.styles">pygments.styles (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/tokens.html#module-pygments.token">pygments.token (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/api.html#module-pygments.util">pygments.util (module)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.PyPyLogLexer">PyPyLogLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.agile.Python3Lexer">Python3Lexer (class in pygments.lexers.agile)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.agile.Python3TracebackLexer">Python3TracebackLexer (class in pygments.lexers.agile)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.agile.PythonConsoleLexer">PythonConsoleLexer (class in pygments.lexers.agile)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.agile.PythonLexer">PythonLexer (class in pygments.lexers.agile)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.agile.PythonTracebackLexer">PythonTracebackLexer (class in pygments.lexers.agile)</a>
+ </dt>
+
+ </dl></td>
+</tr></table>
+
+<h2 id="Q">Q</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.QmlLexer">QmlLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+ </dl></td>
+</tr></table>
+
+<h2 id="R">R</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.functional.RacketLexer">RacketLexer (class in pygments.lexers.functional)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.parsers.RagelCLexer">RagelCLexer (class in pygments.lexers.parsers)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.parsers.RagelCppLexer">RagelCppLexer (class in pygments.lexers.parsers)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.parsers.RagelDLexer">RagelDLexer (class in pygments.lexers.parsers)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.parsers.RagelEmbeddedLexer">RagelEmbeddedLexer (class in pygments.lexers.parsers)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.parsers.RagelJavaLexer">RagelJavaLexer (class in pygments.lexers.parsers)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.parsers.RagelLexer">RagelLexer (class in pygments.lexers.parsers)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.parsers.RagelObjectiveCLexer">RagelObjectiveCLexer (class in pygments.lexers.parsers)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.parsers.RagelRubyLexer">RagelRubyLexer (class in pygments.lexers.parsers)</a>
+ </dt>
+
+
+ <dt><a href="docs/filters.html#RaiseOnErrorTokenFilter">RaiseOnErrorTokenFilter (built-in class)</a>
+ </dt>
+
+
+ <dt><a href="docs/formatters.html#RawTokenFormatter">RawTokenFormatter (built-in class)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.special.RawTokenLexer">RawTokenLexer (class in pygments.lexers.special)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.math.RConsoleLexer">RConsoleLexer (class in pygments.lexers.math)</a>
+ </dt>
+
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.math.RdLexer">RdLexer (class in pygments.lexers.math)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.RebolLexer">RebolLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.RedcodeLexer">RedcodeLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.RegeditLexer">RegeditLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.RexxLexer">RexxLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.RhtmlLexer">RhtmlLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.RobotFrameworkLexer">RobotFrameworkLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.RPMSpecLexer">RPMSpecLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.RstLexer">RstLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+
+ <dt><a href="docs/formatters.html#RtfFormatter">RtfFormatter (built-in class)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.agile.RubyConsoleLexer">RubyConsoleLexer (class in pygments.lexers.agile)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.agile.RubyLexer">RubyLexer (class in pygments.lexers.agile)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.RustLexer">RustLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+ </dl></td>
+</tr></table>
+
+<h2 id="S">S</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.SassLexer">SassLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.jvm.ScalaLexer">ScalaLexer (class in pygments.lexers.jvm)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.ScamlLexer">ScamlLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.functional.SchemeLexer">SchemeLexer (class in pygments.lexers.functional)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.math.ScilabLexer">ScilabLexer (class in pygments.lexers.math)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.ScssLexer">ScssLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.shell.ShellSessionLexer">ShellSessionLexer (class in pygments.lexers.shell)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.math.SLexer">SLexer (class in pygments.lexers.math)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.dalvik.SmaliLexer">SmaliLexer (class in pygments.lexers.dalvik)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.SmalltalkLexer">SmalltalkLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.SmartyLexer">SmartyLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.functional.SMLLexer">SMLLexer (class in pygments.lexers.functional)</a>
+ </dt>
+
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.SnobolLexer">SnobolLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.SourcePawnLexer">SourcePawnLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.SourcesListLexer">SourcesListLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.sql.SqliteConsoleLexer">SqliteConsoleLexer (class in pygments.lexers.sql)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.sql.SqlLexer">SqlLexer (class in pygments.lexers.sql)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.SquidConfLexer">SquidConfLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.SspLexer">SspLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.math.StanLexer">StanLexer (class in pygments.lexers.math)</a>
+ </dt>
+
+
+ <dt><a href="docs/formatters.html#SvgFormatter">SvgFormatter (built-in class)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.SwigLexer">SwigLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.hdl.SystemVerilogLexer">SystemVerilogLexer (class in pygments.lexers.hdl)</a>
+ </dt>
+
+ </dl></td>
+</tr></table>
+
+<h2 id="T">T</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.agile.TclLexer">TclLexer (class in pygments.lexers.agile)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.shell.TcshLexer">TcshLexer (class in pygments.lexers.shell)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.TeaTemplateLexer">TeaTemplateLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/formatters.html#Terminal256Formatter">Terminal256Formatter (built-in class)</a>
+ </dt>
+
+
+ <dt><a href="docs/formatters.html#TerminalFormatter">TerminalFormatter (built-in class)</a>
+ </dt>
+
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.TexLexer">TexLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.special.TextLexer">TextLexer (class in pygments.lexers.special)</a>
+ </dt>
+
+
+ <dt><a href="docs/filters.html#TokenMergeFilter">TokenMergeFilter (built-in class)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.parsers.TreetopLexer">TreetopLexer (class in pygments.lexers.parsers)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.TypeScriptLexer">TypeScriptLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+ </dl></td>
+</tr></table>
+
+<h2 id="U">U</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.UrbiscriptLexer">UrbiscriptLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+ </dl></td>
+</tr></table>
+
+<h2 id="V">V</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.compiled.ValaLexer">ValaLexer (class in pygments.lexers.compiled)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.dotnet.VbNetAspxLexer">VbNetAspxLexer (class in pygments.lexers.dotnet)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.dotnet.VbNetLexer">VbNetLexer (class in pygments.lexers.dotnet)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.VelocityHtmlLexer">VelocityHtmlLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.VelocityLexer">VelocityLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.VelocityXmlLexer">VelocityXmlLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.hdl.VerilogLexer">VerilogLexer (class in pygments.lexers.hdl)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.other.VGLLexer">VGLLexer (class in pygments.lexers.other)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.hdl.VhdlLexer">VhdlLexer (class in pygments.lexers.hdl)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.VimLexer">VimLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+
+ <dt><a href="docs/filters.html#VisibleWhitespaceFilter">VisibleWhitespaceFilter (built-in class)</a>
+ </dt>
+
+ </dl></td>
+</tr></table>
+
+<h2 id="X">X</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.XmlDjangoLexer">XmlDjangoLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.XmlErbLexer">XmlErbLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.XmlLexer">XmlLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.XmlPhpLexer">XmlPhpLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.templates.XmlSmartyLexer">XmlSmartyLexer (class in pygments.lexers.templates)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.XQueryLexer">XQueryLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.web.XsltLexer">XsltLexer (class in pygments.lexers.web)</a>
+ </dt>
+
+
+ <dt><a href="docs/lexers.html#pygments.lexers.jvm.XtendLexer">XtendLexer (class in pygments.lexers.jvm)</a>
+ </dt>
+
+ </dl></td>
+</tr></table>
+
+<h2 id="Y">Y</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+ <td style="width: 33%" valign="top"><dl>
+
+ <dt><a href="docs/lexers.html#pygments.lexers.text.YamlLexer">YamlLexer (class in pygments.lexers.text)</a>
+ </dt>
+
+ </dl></td>
+</tr></table>
+
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+
+
+
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="#" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li><a href="index.html">Pygments 2.0pre documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Welcome! — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: './',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="_static/jquery.js"></script>
+ <script type="text/javascript" src="_static/underscore.js"></script>
+ <script type="text/javascript" src="_static/doctools.js"></script>
+ <link rel="shortcut icon" href="_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="#" />
+ <link rel="next" title="Pygments documentation" href="docs/index.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="docs/index.html" title="Pygments documentation"
+ accesskey="N">next</a> |</li>
+ <li><a href="#">Pygments 2.0pre documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <div class="section" id="welcome">
+<h1>Welcome!<a class="headerlink" href="#welcome" title="Permalink to this headline">¶</a></h1>
+<p>This is the home of Pygments. It is a generic syntax highlighter suitable for
+use in code hosting, forums, wikis or other applications that need to prettify
+source code. Highlights are:</p>
+<ul class="simple">
+<li>a wide range of over 300 languages and other text formats is supported</li>
+<li>special attention is paid to details that increase highlighting quality</li>
+<li>support for new languages and formats are added easily; most languages use a
+simple regex-based lexing mechanism</li>
+<li>a number of output formats is available, among them HTML, RTF, LaTeX and ANSI
+sequences</li>
+<li>it is usable as a command-line tool and as a library</li>
+<li>... and it highlights even Perl 6!</li>
+</ul>
+<p>Read more in the <a class="reference internal" href="faq.html"><em>FAQ list</em></a> or the <a class="reference internal" href="docs/index.html"><em>documentation</em></a>,
+or <a class="reference external" href="http://pypi.python.org/pypi/Pygments">download the latest release</a>.</p>
+<div class="section" id="contribute">
+<span id="id1"></span><h2>Contribute<a class="headerlink" href="#contribute" title="Permalink to this headline">¶</a></h2>
+<p>Like every open-source project, we are always looking for volunteers to help us
+with programming. Python knowledge is required, but don’t fear: Python is a very
+clear and easy to learn language.</p>
+<p>Development takes place on <a class="reference external" href="https://bitbucket.org/birkenfeld/pygments-main">Bitbucket</a>, where the Mercurial
+repository, tickets and pull requests can be viewed.</p>
+<p>Our primary communication instrument is the IRC channel <strong>#pocoo</strong> on the
+Freenode network. To join it, let your IRC client connect to
+<code class="docutils literal"><span class="pre">irc.freenode.net</span></code> and do <code class="docutils literal"><span class="pre">/join</span> <span class="pre">#pocoo</span></code>.</p>
+<p>If you found a bug, just open a ticket in the Bitbucket tracker. Be sure to log
+in to be notified when the issue is fixed – development is not fast-paced as
+the library is quite stable. You can also send an e-mail to the developers, see
+below.</p>
+</div>
+<div class="section" id="the-authors">
+<h2>The authors<a class="headerlink" href="#the-authors" title="Permalink to this headline">¶</a></h2>
+<p>Pygments is maintained by <strong>Georg Brandl</strong>, e-mail address <em>georg</em><em>@</em><em>python.org</em>.</p>
+<p>Many lexers and fixes have been contributed by <strong>Armin Ronacher</strong>, the rest of
+the <a class="reference external" href="http://dev.pocoo.org/">Pocoo</a> team and <strong>Tim Hatch</strong>.</p>
+<div class="toctree-wrapper compound">
+</div>
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ <h3><a href="#">Table Of Contents</a></h3>
+ <ul>
+<li><a class="reference internal" href="#">Welcome!</a><ul>
+<li><a class="reference internal" href="#contribute">Contribute</a></li>
+<li><a class="reference internal" href="#the-authors">The authors</a></li>
+</ul>
+</li>
+</ul>
+
+ <h4>Next topic</h4>
+ <p class="topless"><a href="docs/index.html"
+ title="next chapter">Pygments documentation</a></p>
+ <div role="note" aria-label="source link">
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="_sources/index.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+ </div><h3>Download</h3>
+
+<p>Current version: <b>2.0pre</b></p>
+<p>Get Pygments from the <a href="http://pypi.python.org/pypi/Pygments">Python Package
+Index</a>, or install it with:</p>
+<pre>pip install Pygments</pre>
+
+
+<h3>Questions? Suggestions?</h3>
+
+<p>Clone at <a href="https://bitbucket.org/birkenfeld/pygments-main">Bitbucket</a>
+or come to the <tt>#pocoo</tt> channel on FreeNode.</p>
+<p>You can also open an issue at the
+ <a href="https://www.bitbucket.org/birkenfeld/pygments-main/issues/">tracker</a>.</p>
+
+<p class="logo">A <a href="http://pocoo.org/">
+ <img src="_static/pocoo.png" /></a> project</a></p>
+
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="docs/index.html" title="Pygments documentation"
+ >next</a> |</li>
+ <li><a href="#">Pygments 2.0pre documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Supported languages — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: './',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="_static/jquery.js"></script>
+ <script type="text/javascript" src="_static/underscore.js"></script>
+ <script type="text/javascript" src="_static/doctools.js"></script>
+ <link rel="shortcut icon" href="_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="index.html" />
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li><a href="index.html">Pygments 2.0pre documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <div class="section" id="supported-languages">
+<h1>Supported languages<a class="headerlink" href="#supported-languages" title="Permalink to this headline">¶</a></h1>
+<p>Pygments supports an ever-growing range of languages. Watch this space...</p>
+<div class="section" id="programming-languages">
+<h2>Programming languages<a class="headerlink" href="#programming-languages" title="Permalink to this headline">¶</a></h2>
+<ul class="simple">
+<li>ActionScript</li>
+<li>Ada</li>
+<li>ANTLR</li>
+<li>AppleScript</li>
+<li>Assembly (various)</li>
+<li>Asymptote</li>
+<li>Awk</li>
+<li>Befunge</li>
+<li>Boo</li>
+<li>BrainFuck</li>
+<li>C, C++</li>
+<li>C#</li>
+<li>Clojure</li>
+<li>CoffeeScript</li>
+<li>ColdFusion</li>
+<li>Common Lisp</li>
+<li>Coq</li>
+<li>Cryptol (incl. Literate Cryptol)</li>
+<li><a class="reference external" href="http://cython.org">Cython</a></li>
+<li><a class="reference external" href="http://digitalmars.com/d">D</a></li>
+<li>Dart</li>
+<li>Delphi</li>
+<li>Dylan</li>
+<li>Erlang</li>
+<li>Factor</li>
+<li>Fancy</li>
+<li>Fortran</li>
+<li>F#</li>
+<li>GAP</li>
+<li>Gherkin (Cucumber)</li>
+<li>GL shaders</li>
+<li>Groovy</li>
+<li><a class="reference external" href="http://www.haskell.org">Haskell</a> (incl. Literate Haskell)</li>
+<li>IDL</li>
+<li>Io</li>
+<li>Java</li>
+<li>JavaScript</li>
+<li>LLVM</li>
+<li>Logtalk</li>
+<li><a class="reference external" href="http://www.lua.org">Lua</a></li>
+<li>Matlab</li>
+<li>MiniD</li>
+<li>Modelica</li>
+<li>Modula-2</li>
+<li>MuPad</li>
+<li>Nemerle</li>
+<li>Nimrod</li>
+<li>Objective-C</li>
+<li>Objective-J</li>
+<li>Octave</li>
+<li>OCaml</li>
+<li>PHP</li>
+<li><a class="reference external" href="http://perl.org">Perl</a></li>
+<li>PovRay</li>
+<li>PostScript</li>
+<li>PowerShell</li>
+<li>Prolog</li>
+<li><a class="reference external" href="http://www.python.org">Python</a> 2.x and 3.x (incl. console sessions and tracebacks)</li>
+<li><a class="reference external" href="http://www.rebol.com">REBOL</a></li>
+<li><a class="reference external" href="http://www.red-lang.org">Red</a></li>
+<li>Redcode</li>
+<li><a class="reference external" href="http://www.ruby-lang.org">Ruby</a> (incl. irb sessions)</li>
+<li>Rust</li>
+<li>S, S-Plus, R</li>
+<li>Scala</li>
+<li>Scheme</li>
+<li>Scilab</li>
+<li>Smalltalk</li>
+<li>SNOBOL</li>
+<li>Tcl</li>
+<li>Vala</li>
+<li>Verilog</li>
+<li>VHDL</li>
+<li>Visual Basic.NET</li>
+<li>Visual FoxPro</li>
+<li>XQuery</li>
+<li>Zephir
+</ul></li>
+</ul>
+</div>
+<div class="section" id="template-languages">
+<h2>Template languages<a class="headerlink" href="#template-languages" title="Permalink to this headline">¶</a></h2>
+<ul class="simple">
+<li>Cheetah templates</li>
+<li><a class="reference external" href="http://www.djangoproject.com">Django</a> / <a class="reference external" href="http://jinja.pocoo.org/jinja">Jinja</a> templates</li>
+<li>ERB (Ruby templating)</li>
+<li><a class="reference external" href="http://genshi.edgewall.org">Genshi</a> (the Trac template language)</li>
+<li>JSP (Java Server Pages)</li>
+<li><a class="reference external" href="http://www.myghty.org">Myghty</a> (the HTML::Mason based framework)</li>
+<li><a class="reference external" href="http://www.makotemplates.org/">Mako</a> (the Myghty successor)</li>
+<li><a class="reference external" href="http://smarty.php.net">Smarty</a> templates (PHP templating)</li>
+<li>Tea</li>
+</ul>
+</div>
+<div class="section" id="other-markup">
+<h2>Other markup<a class="headerlink" href="#other-markup" title="Permalink to this headline">¶</a></h2>
+<ul class="simple">
+<li>Apache config files</li>
+<li>Bash shell scripts</li>
+<li>BBCode</li>
+<li>CMake</li>
+<li>CSS</li>
+<li>Debian control files</li>
+<li>Diff files</li>
+<li>DTD</li>
+<li>Gettext catalogs</li>
+<li>Gnuplot script</li>
+<li>Groff markup</li>
+<li>HTML</li>
+<li>HTTP sessions</li>
+<li>INI-style config files</li>
+<li>IRC logs (irssi style)</li>
+<li>Lighttpd config files</li>
+<li>Makefiles</li>
+<li>MoinMoin/Trac Wiki markup</li>
+<li>MySQL</li>
+<li>Nginx config files</li>
+<li>POV-Ray scenes</li>
+<li>Ragel</li>
+<li>Redcode</li>
+<li>ReST</li>
+<li>Robot Framework</li>
+<li>RPM spec files</li>
+<li>SQL, also MySQL, SQLite</li>
+<li>Squid configuration</li>
+<li>TeX</li>
+<li>tcsh</li>
+<li>Vim Script</li>
+<li>Windows batch files</li>
+<li>XML</li>
+<li>XSLT</li>
+<li>YAML</li>
+</ul>
+</div>
+<div class="section" id="that-s-all">
+<h2>... that’s all?<a class="headerlink" href="#that-s-all" title="Permalink to this headline">¶</a></h2>
+<p>Well, why not write your own? Contributing to Pygments is easy and fun. Look
+<a class="reference internal" href="docs/lexerdevelopment.html"><em>here</em></a> for the docs on lexer development and
+<a class="reference internal" href="index.html#contribute"><em>here</em></a> for contact details.</p>
+<p>Note: the languages listed here are supported in the development version. The
+latest release may lack a few of them.</p>
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ <h3><a href="index.html">Table Of Contents</a></h3>
+ <ul>
+<li><a class="reference internal" href="#">Supported languages</a><ul>
+<li><a class="reference internal" href="#programming-languages">Programming languages</a></li>
+<li><a class="reference internal" href="#template-languages">Template languages</a></li>
+<li><a class="reference internal" href="#other-markup">Other markup</a></li>
+<li><a class="reference internal" href="#that-s-all">... that’s all?</a></li>
+</ul>
+</li>
+</ul>
+
+ <div role="note" aria-label="source link">
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="_sources/languages.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+ </div>
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li><a href="index.html">Pygments 2.0pre documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Python Module Index — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: './',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="_static/jquery.js"></script>
+ <script type="text/javascript" src="_static/underscore.js"></script>
+ <script type="text/javascript" src="_static/doctools.js"></script>
+ <link rel="shortcut icon" href="_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="index.html" />
+
+
+
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="#" title="Python Module Index"
+ >modules</a> |</li>
+ <li><a href="index.html">Pygments 2.0pre documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+
+ <h1>Python Module Index</h1>
+
+ <div class="modindex-jumpbox">
+ <a href="#cap-p"><strong>p</strong></a>
+ </div>
+
+ <table class="indextable modindextable" cellspacing="0" cellpadding="2">
+ <tr class="pcap"><td></td><td> </td><td></td></tr>
+ <tr class="cap" id="cap-p"><td></td><td>
+ <strong>p</strong></td><td></td></tr>
+ <tr>
+ <td><img src="_static/minus.png" class="toggler"
+ id="toggle-1" style="display: none" alt="-" /></td>
+ <td>
+ <a href="docs/api.html#module-pygments"><code class="xref">pygments</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/api.html#module-pygments.formatter"><code class="xref">pygments.formatter</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/api.html#module-pygments.formatters"><code class="xref">pygments.formatters</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/api.html#module-pygments.lexer"><code class="xref">pygments.lexer</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/api.html#module-pygments.lexers"><code class="xref">pygments.lexers</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/lexers.html#module-pygments.lexers.agile"><code class="xref">pygments.lexers.agile</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/lexers.html#module-pygments.lexers.asm"><code class="xref">pygments.lexers.asm</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/lexers.html#module-pygments.lexers.compiled"><code class="xref">pygments.lexers.compiled</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/lexers.html#module-pygments.lexers.dalvik"><code class="xref">pygments.lexers.dalvik</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/lexers.html#module-pygments.lexers.dotnet"><code class="xref">pygments.lexers.dotnet</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/lexers.html#module-pygments.lexers.foxpro"><code class="xref">pygments.lexers.foxpro</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/lexers.html#module-pygments.lexers.functional"><code class="xref">pygments.lexers.functional</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/lexers.html#module-pygments.lexers.hdl"><code class="xref">pygments.lexers.hdl</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/lexers.html#module-pygments.lexers.jvm"><code class="xref">pygments.lexers.jvm</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/lexers.html#module-pygments.lexers.math"><code class="xref">pygments.lexers.math</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/lexers.html#module-pygments.lexers.other"><code class="xref">pygments.lexers.other</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/lexers.html#module-pygments.lexers.parsers"><code class="xref">pygments.lexers.parsers</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/lexers.html#module-pygments.lexers.shell"><code class="xref">pygments.lexers.shell</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/lexers.html#module-pygments.lexers.special"><code class="xref">pygments.lexers.special</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/lexers.html#module-pygments.lexers.sql"><code class="xref">pygments.lexers.sql</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/lexers.html#module-pygments.lexers.templates"><code class="xref">pygments.lexers.templates</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/lexers.html#module-pygments.lexers.text"><code class="xref">pygments.lexers.text</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/lexers.html#module-pygments.lexers.web"><code class="xref">pygments.lexers.web</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/api.html#module-pygments.styles"><code class="xref">pygments.styles</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/tokens.html#module-pygments.token"><code class="xref">pygments.token</code></a></td><td>
+ <em></em></td></tr>
+ <tr class="cg-1">
+ <td></td>
+ <td>
+ <a href="docs/api.html#module-pygments.util"><code class="xref">pygments.util</code></a></td><td>
+ <em></em></td></tr>
+ </table>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+<div id="searchbox" style="display: none" role="search">
+ <h3>Quick search</h3>
+ <form class="search" action="search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="#" title="Python Module Index"
+ >modules</a> |</li>
+ <li><a href="index.html">Pygments 2.0pre documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Search — Pygments 2.0pre documentation</title>
+
+ <link rel="stylesheet" href="_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: './',
+ VERSION: '2.0pre',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="_static/jquery.js"></script>
+ <script type="text/javascript" src="_static/underscore.js"></script>
+ <script type="text/javascript" src="_static/doctools.js"></script>
+ <script type="text/javascript" src="_static/searchtools.js"></script>
+ <link rel="shortcut icon" href="_static/favicon.ico"/>
+ <link rel="top" title="Pygments 2.0pre documentation" href="index.html" />
+ <script type="text/javascript">
+ jQuery(function() { Search.loadIndex("searchindex.js"); });
+ </script>
+
+ <script type="text/javascript" id="searchindexloader"></script>
+
+
+ </head>
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li><a href="index.html">Pygments 2.0pre documentation</a> »</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+
+ <h1 id="search-documentation">Search</h1>
+ <div id="fallback" class="admonition warning">
+ <script type="text/javascript">$('#fallback').hide();</script>
+ <p>
+ Please activate JavaScript to enable the search
+ functionality.
+ </p>
+ </div>
+ <p>
+ From here you can search these documents. Enter your search
+ words into the box below and click "search". Note that the search
+ function will automatically search for all of the words. Pages
+ containing fewer words won't appear in the result list.
+ </p>
+ <form action="" method="get">
+ <input type="text" name="q" value="" />
+ <input type="submit" value="search" />
+ <span id="search-progress" style="padding-left: 10px"></span>
+ </form>
+
+ <div id="search-results">
+
+ </div>
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+ <div class="sphinxsidebarwrapper">
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related" role="navigation" aria-label="related navigation">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li><a href="index.html">Pygments 2.0pre documentation</a> »</li>
+ </ul>
+ </div>
+ <div class="footer" role="contentinfo">
+ © Copyright 2014, Georg Brandl.
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3b2.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+Search.setIndex({envversion:46,terms:{stylemap:17,pida:15,child:[14,1],interchang:3,four:[14,23],prefix:[14,5,9,1,12],ronach:[8,11],"6pm":3,"6pl":3,nemerl:[10,14,3,11],hiremath:11,whose:[14,23,3,22],accur:14,"const":12,aug:14,paris:11,ali:11,bajolet:11,ebuild:3,edward:11,matlab:[10,14,3,11],mishighlight:14,preprocess:3,aux:3,spec:[10,14,3],suitabl:[14,8,9,21],everi:[8,9,1,2,14,21,23,7],rel:[9,1],simmon:11,pigment:15,digia:3,affect:[14,9,7],chapel:[14,3,11],classprefix:9,metaclass:[21,17],cmd:3,escript:3,au3:3,examplefil:1,kaarsemak:[14,11],println:4,rtfformatt:9,erron:1,vhdl:[10,14,3,11],bitstream:9,miller:11,xbase:3,direct:[9,1,14,3,15,22,19],turbopasc:3,horn:11,second:[14,1],nresult:4,obrist:11,blue:17,tcshlexer:3,udiff:[14,3],lighti:3,mygthi:3,"while":[23,17,0,15,1],samplemanag:3,"new":[0,2,14,9,16,21,4,17],net:14,mhtml:3,ever:10,groupid:4,metadata:5,otherst:1,behavior:[14,18,16],patx:15,never:1,newlisp:[14,3],here:[9,1,7,20,13,23,15,10,4,5,6,17],mscgenlex:3,studio:[14,3],debugg:15,get_style_def:[0,14,9,21,17,23],path:[9,15,1,12],vgllexer:3,hoelz:11,interpret:[21,4],forum:8,anymor:14,pypi:[6,14,3,11,9],jame:11,fontsiz:9,subheadlin:12,volunt:8,grofflex:3,mitchen:11,julia:[14,3,11],bro:[14,3,11],morai:11,varrazzo:11,total:[1,2],handlebar:14,unit:[14,3],fhtml:3,plot:[14,3],sourcepawn:[14,3,11],describ:[21,9],would:[9,1,2,4,17,12],aaron:11,brolex:3,rebol:[10,14,3,11],call:[9,22,1,7,3,21,23,18,6,12],recommend:[6,9],type:[9,1,2,14,21,17],tell:[9,1],alphabet:11,systemveriloglex:3,pudb:15,under:[6,15,1],yoffset:9,rprofil:3,hurl:15,matlabsessionlex:3,moin:[14,3,22],hold:1,dietmar:11,must:[0,1,2,3,9,21,17,23,7],kumar:11,kotlinlex:3,join:[14,8,17],setup:0,work:[0,1,2,14,23,3,9,4,6,7],erb:[10,3],erl:3,root:[3,1,9],could:[0,1,7,3,9,16,23],pierr:[14,11],overrid:[0,1,14,9,16,21,17,18],give:[0,1,2,14,9,23],autodetect:3,indic:[14,9,1],want:[0,22,1,2,3,9,4,5,12,23,7],keep:[14,9],unsign:14,dosini:3,py3tb:3,end:[9,1,12,14,3,15,17],quot:[14,4,0,12,23],mscgen:[14,3,11],bommel:11,jochen:11,how:[9,1,20,13,14,21,4,17],enforc:2,actionscript:[10,14,3],cheetah:[10,14,3,11],config:[10,14,3,11,22],linewis:3,updat:[14,11],recogn:[14,21,0,1,3],chines:15,after:[0,1,12,14,3,9],"micha\u0142":11,befor:[14,3,9,18],wrong:18,beauti:15,mypythonlex:1,demonstr:15,util:[14,21,15,16],gherkinlex:3,sparql:[14,11],third:1,interpol:12,imposs:1,alias:[1,12,14,3,21,5],maintain:[8,11,7],environ:[14,9],subtoken:7,enter:1,mechan:[21,8,9,23],order:[14,23,15],vfp:3,decl:3,oper:[14,3,1,7],over:[14,17,9,1,21],xmlschema:4,becaus:[0,1,7,14,9,16,21,5,18,17,12],jpeg:9,pascal:[0,2,3],mabei:11,lassoscript:3,jordi:11,flexibl:14,vari:7,vark:3,artifactid:4,cli:12,img:9,standard_typ:12,fix:[8,9,11,2,14,1],commonlisplex:3,highlightt:9,better:14,preimplement:1,goetzmann:11,persist:3,modelicalex:3,erlang:[10,14,3,11],easier:[4,15],postgreslex:3,them:[8,9,1,2,21,14,3,15,10,23,12],typescript:[14,3,11],thei:[9,1,7,14,3,21,5,23,17],fragment:[23,3],benediktsson:11,yamllex:3,"break":9,sqlite3:[14,3],jinja2:14,blink:3,bzrfruit:15,optionerror:21,cssdjangolex:3,propertieslex:3,myghti:[10,14,3,11],luca:11,each:[9,1,12],antlrrubylex:3,dumpz:15,crunchi:14,mean:[0,1,2,14,3,15,9,21,5,18,19],exactli:[21,1],kiril:[14,11],line:[14,21],kirk:[14,11],stripal:[21,23,3],doug:11,logo:[14,3,11],extract:5,builtinshighlight:3,goj:[14,11],newli:[1,12],jsonml:3,alex:11,mason:[10,14,3,11],hermoso:11,rewrit:[14,11],dsl:3,daniel:11,golex:3,adapt:[19,2,13],hogan:11,multilin:[14,1,12],requiredelimit:3,minidsrc:3,free:[3,15,1],standard:[0,11,14,3,15,9,21,17,23],nth:9,htmllexer:[3,1],elixirconsolelex:3,bertel:11,longnam:21,bugslex:3,basemak:3,angl:2,coldfusionhtmllex:3,traceback:[10,14,3,12],initialis:1,filter:14,loui:11,lucumr:13,chirino:11,iso:3,isn:[14,17,3,1,2],ivan:11,nroff:3,python3tracebacklex:[14,3],confus:[1,16],glsl:[14,3],rang:[10,8,3,15,21],render:[14,9,1,7,13],pyrex:3,clariti:9,alreadi:[21,3,1,2,12],wrapper:[14,9],wasn:1,ignorecas:1,primari:[23,8],rewritten:3,func_name_highlight:3,top:[9,1,22],reuben:11,tango:[14,11],mercuri:[6,8,15],timothi:11,underlin:[9,17,7],too:[14,0,1,3],tom:11,toc:3,gilbert:11,john:11,listen:14,slexer:3,chdr:3,consol:[0,11,14,3,15,9,10],namespac:[14,11,12],tool:[14,8,15],lighttpd:[10,14,3],makohtmllex:3,valalex:3,peculiar:14,myghtycsslex:3,gst:3,past:[3,15,9],spammcan:15,igorpro:3,tryzelaar:11,keyword:[14,21,17,2,16],provid:[14,17,0,1,9],cfengine3:[14,3,11],matteo:11,"final":[14,1],project:[14,4,15,8],matter:5,inilex:[3,1],entri:[23,0,1],cythonlex:3,javalex:3,brainfucklex:[3,1],rai:[10,14],raw:[14,3,9],rageldlex:3,cobollex:3,seen:0,seem:1,incompat:14,plpgsql:3,vgl:[14,3,11],recreat:3,latter:[14,9,17],rudolph:11,rubyconsolelex:[14,3],client:8,fname:9,hatch:[14,8,11],thoma:11,thoroughli:15,snobol:[10,14,3,11],even:[8,3,1,9],koka:[14,3],though:15,bruce:[15,11],object:[21,9,11,2,13,14,3,10,17,18,23,1,12],monkeylex:3,mario:11,regular:[14,9,1,12,18],pythonlex:[1,2,3,4,18,23],letter:[3,9,2],bsd:[14,3,15],redcod:[10,14,3,11],sourceslistlex:3,don:[8,0,1,7,14,9,21,17,18,23,12],doc:[9,7,14,3,15,10,18,12],newlisplex:3,doe:[14,3,1,9,18],declar:[21,3,9,12],wildcard:0,psm1:3,unchang:9,dot:[14,2],fantomlex:3,esoter:[14,3,1],sage:3,syntax:[8,0,1,7,14,3,15,9,12],pkg:3,autoit:[14,3,11],identifi:[14,21,3,12],pylonshq:15,absolut:9,mathematicalex:3,inozemtsev:11,menu:13,explain:[23,17,5],configur:[10,14,3,12,22],apach:[10,4,3,14],hrl:3,theme:14,oct:[14,12],lighttpdconflex:3,klein:11,tagsfil:9,stou:11,mupadlex:3,groovylex:3,csharpaspxlex:3,linenostart:9,apacheconflex:3,report:3,incollo:15,asymptotelex:3,bat:3,bar:[9,1,2],baz:2,patch:[14,3,11,12],"00ff00":9,howett:11,kriegisch:11,black:7,line_number_fg:9,cheetahlex:3,mysql:[10,14,3],pinkham:11,mandatori:21,result:[9,1,14,21,4,18,23],respons:22,fail:14,christian:11,"guti\u00e9rrez":11,cirru:[14,3],best:18,pete:11,awar:[14,1],get_list_opt:21,delphi:[10,3],languag:[14,21,1],drawn:9,irb:[10,3],irc:[10,8,3,15,14],approach:1,attribut:[0,1,12,14,9,21,5,18,23,17],dtdlexer:3,manpag:[14,3],nawk:3,extens:[14,23,0,1,3],unabl:1,preprocessor:[14,3,1,12,13],ruggier:11,toler:1,xchat:[14,3],coq:[10,14,3],pythontracebacklex:[14,3],howev:[14,23,9,15],livescriptlex:3,against:1,cob:3,moocod:[14,3,11],smllexer:[3,1],com:[3,15,11],schafer:11,coldfusionlex:3,foobar:1,height:9,postgresconsolelex:3,rstlexer:3,diff:[10,14,3,15,1],guid:2,assum:[3,15,9],guib:11,ana:[14,11],code:[9,1,2,13,14,21,4],herbstzeitlos:14,sam:11,numpi:[14,3,11],three:14,been:[8,9,1,2,14,4],schutt:[3,11],joerg:11,much:[14,3,1],basic:[21,1,14,3,15,10,17,23],postscr:3,suppress:14,pytb:3,mher:11,argument:[0,1,2,14,9,16,21,17,23],"_by_":14,davi:11,gnu:[14,3],servic:[15,11],properti:[14,3,9],zeitdilat:14,publicli:1,tolbert:11,anchor:9,powershel:[10,14,3],xinot:15,tabl:[14,9],conf:[14,3],cobolfreeformatlex:3,sever:[14,1],piotr:14,mako:[10,14,3,11],hong:11,sap:3,"helles\u00f8i":11,perform:[14,1,12],suggest:20,make:[9,1,7,14,3,16,4,18,23],format:[8,0,14,3,15,9,21,17,23],header:14,htmlformatt:[9,7,14,21,4,17,18,23],complex:[17,1],split:[0,7,14,21,23,12],complet:[14,9],tiffin:11,nil:[3,11],nim:3,kit:11,stylebegin:17,grammar:[3,1],nix:[14,3,11],rais:[14,21,3,9,2],boldfac:7,nixlex:3,corbett:11,p6m:3,p6l:3,nit:[14,11],kid:3,dylan:[10,14,3,11],kept:1,scenario:20,thu:9,singlelin:1,hypothet:1,inherit:[14,11,1,7],contact:[10,15,20],thi:[0,22,1,2,14,23,3,9,21,4,18,5,12,6,17,19,7],codehtmlformatt:9,everyth:[5,1],left:[3,17],protocol:[14,3,11],lassu:11,just:[8,9,1,7,14,3,17,12],autohotkeylex:3,stylenameclass:7,agdalex:3,human:[21,3],startinlin:3,yet:0,resourcebundl:14,lasso:[14,3,11],easi:[8,9,1,14,16,10,17],debug:15,hax:[14,3,11],fortran:[10,14,3,11],board:[9,15],koprowski:11,els:[9,1,12,3,17,23],ffffff:7,save:[14,1],gave:14,applic:[14,8,3],rbcon:3,preserv:9,newspeaklanguag:3,opa:[14,3,11],background:[14,9,17,2,7],mior:11,vim:[10,14,3,11],ragelrubylex:3,colour:9,baselex:1,specif:[14,0,1,3],arbitrari:1,manual:3,instanci:16,fastest:3,siafoo:15,antlrcpplex:3,unnecessari:1,pl6:3,www:[4,3],right:[2,18],old:[14,12],ledru:11,intern:[23,1,18,16],dlexer:3,mishandl:14,raytrac:3,scsslexer:3,cooper:11,harriman:11,applescript:[10,14,3,11],subclass:[14,21],tracker:[14,8,15],highligt:3,foo:[9,1,2,14,3,12],inform6lex:3,plu:[10,14,3,1,9],plt:3,bold:[23,9,17,7,12],posh:3,kallex:3,stefan:[3,11],fancyvrb:9,makoxmllex:3,popular:3,repositori:[8,15],eed:9,post:[9,15],kabak:11,"super":1,baumann:11,numpylex:3,noinherit:7,alexand:11,"42l":12,eat:[14,2],kotlin:[14,3,11],curri:11,"42d":12,smishlajev:11,unfortun:1,befung:[10,14,3],dutton:11,commit:14,produc:[9,1,14,3,21,23],ahk:3,"float":[14,21,12],encod:14,standardml:3,two:[23,17,9,1],down:1,noital:7,vbnetaspxlex:3,autohotkei:[14,3,11],formerli:3,r5r:3,hybri:[14,3,11],accordingli:9,git:[14,15],tokentyp:[21,9,1,2],newspeaklex:3,support:[0,11,12,14,3,9,17,23,19,7],colorfulstyl:7,"class":[0,2,14,16,21,17],avail:[14,21],width:9,reli:5,jann:11,freepasc:3,analysi:14,get_all_styl:[21,7],head:[0,1,3,12],form:[0,1,7,3,21,17],latex:[8,9,11,7,14,3,15,23],enabl:[9,19],renam:22,"unsch\u00e4rf":14,"true":[9,1,2,14,3,21,17,22,23,12],freenod:8,duel:[14,3,11],bugfix:[14,11],maximum:1,until:1,minor:14,cudalex:3,emit:1,leaf:11,featur:[14,3,1,9],semicolon:14,qbzr:15,postscript:[10,14,3,11],prover:3,exist:[9,1,12,14,17,23],ship:[1,7,13,17,22,19],check:[14,3,1,16],assembl:[14,11],httplexer:3,holli:11,when:[8,9,1,2,14,23,7],refactor:11,tim:[14,8,11],jona:11,"14px":9,test:[14,0,11],unlimit:12,exrc:3,ahkl:3,uncolorfilt:16,stringio:9,irclog:3,sconscript:3,eiffel:[14,3,11],asterisk:1,moinwikilex:3,consid:3,sql:14,dhandler:3,gobbl:2,bitbucket:[6,8,15,14],receiv:14,codetagfilt:2,furthermor:7,nasmlex:3,htdoc:22,pseudo:[1,12],pilcrow:2,blinkinsop:[14,3,11],ignor:[9,17],time:[14,9,1],push:1,unicodedecodeerror:18,coldfusioncfclex:3,cssclass:[14,23,9],inc:[3,11],concept:23,chain:[14,3],skip:1,rob:11,global:[1,12],focus:15,get_formatter_by_nam:[21,23],known:[0,1,2,3,15,21,7],get_token:21,mql4:3,mql5:3,row:9,middl:2,depend:[21,4,3,9],codetag:[14,9,2],bpython:15,graph:15,readabl:21,applescriptlex:3,"maik\u00e4fer":14,decis:14,gotthardt:11,aspx:3,filetyp:3,rageljavalex:3,sourc:[9,11,2,13,14,1],string:[0,1,2,14,3,9,21,4,18,17,12,23,7],asymptot:[10,14,3,11],mylex:1,anchorlineno:[14,9,11],gemspec:3,word:[0,1,2,14,9,12],moura:11,brows:6,fancypack:3,matlabsess:3,hendershott:11,gui:[3,15],iter:[9,1,2,14,21,17],item:[5,1,17],team:[8,7,20],div:[23,4,9],strachan:11,cetera:19,upper:[0,2],htm:[3,1,9],compens:15,sign:[14,0,1,2],fontfac:9,port:14,ambienttalk:14,appear:17,apllex:3,erlanglex:3,current:[9,1,12,3,21,17,22,6],sinc:[0,1,7,13,14,3,9,16,21,4,18,23],pm6:3,deriv:[14,21],nimrodlex:3,gener:[14,21],echdr:3,gawk:3,fnmatch:21,modif:1,teatemplatelex:3,address:8,along:0,xoffset:9,wait:15,heredoc:[14,12],weechat:[14,3],bom:18,boo:[10,14,3,12],bob:11,hypotheticlex:1,kowarsch:11,reg:3,semant:23,ipf:3,jbst:[14,3,11],extra:[3,9],modul:[9,1,2,14,3,16,21,5,23,12],backtick:12,visibl:[14,2],instal:[0,1,20,14,9,18],mckenna:11,nowrap:9,codenam:14,bsdmake:3,red:[9,7,14,10,17,23],regex:14,httpd:3,univers:[15,11],visit:23,perl:[8,11,12,14,3,10,23],everybodi:1,stylesheet:[0,14,3,9,22,23],cucumb:[10,14,3],scope:[4,15],msc:3,andr:[14,11],capit:2,ooc:[14,3],alastair:11,peopl:19,efford:11,"_wrap_cod":9,enhanc:[14,11],nguyen:11,visual:[14,11],olivi:11,noehr:11,postgresql:[14,3,11],oliva:11,easiest:1,flx:3,graphic:9,rubylex:[23,3],dmitri:11,gosutemplatelex:3,uniqu:[21,23],cat:11,can:[0,22,1,2,13,14,23,3,9,16,21,4,18,5,12,6,17,19,7],purpos:[23,3,17],fulton:11,nearest:9,wybir:11,stream:[0,2,14,9,16,21,17],winston:14,spt:3,backslash:[14,3],konrad:11,get_all_filt:2,inform7:3,occur:1,alwai:[14,8,16],durni:11,multipl:[14,9],winter:[3,11],barfoo:1,write:[14,21],mapfil:1,dpast:15,fourth:23,ebnf:[14,3,11],xhtml:[3,15],urbiscriptlex:3,antlrperllex:3,map:[23,9,1,22],irclogslex:3,mar:14,protobuf:3,max:11,schweyer:11,usabl:[21,8,15,17,7],actionscript3:3,mac:3,thurgood:[3,11],mai:[21,0,1,2,14,9,10,23,7],underscor:14,data:[1,12,14,3,17,18,22],grow:10,mao:3,lidr:3,boolex:3,liquid:14,cfml:3,stdin:3,explicit:[0,1,9],inform:[0,11,12,14,3,9,5,23,1],preced:[14,1],combin:[21,9,1],antlrlex:3,tcsh:[10,14,3,11],lsl:14,optnam:21,synat:12,kubica:[14,11],nbsp:12,"g\u00f3rny":11,peterson:11,still:[14,9,1,12,18],ieee:3,dynam:3,entiti:[1,12],pixmap:9,overhaul:11,thank:[14,4,11],picheta:11,polici:3,theorem:3,gtk:13,sven:11,yaml:[10,14,3,11],window:[10,14,3],nullformatt:[9,17],erlangshelllex:3,mail:[8,15],main:[0,1,14,3,9,6],lidri:3,limbo:[14,11],non:[14,0,1,9],gerd:11,smarter:14,root_lex:1,codetagifi:2,initi:[14,17,1,2],kki:3,nov:14,now:[14,3,1,9,18],introduct:20,terminalformatt:[0,9],term:[23,1],name:[14,21],lassojavascriptlex:3,drop:[14,21,15,2,7],gautier:11,dylanlidlex:3,separ:[14,0,9,1,3],wolfram:3,objm2:3,replac:[14,1,2],individu:9,steven:11,continu:[14,1],ensur:1,wrap:[14,23,9,17],jsonlex:3,minidlex:3,happen:1,baselin:9,uncolor:16,shown:[9,1],"strau\u00dfenei":14,jackson:11,space:[0,1,2,14,3,9,10,7],enriqu:11,profil:3,internet:9,bplu:3,correct:[14,21],tmpl:3,earlier:[3,9],"goto":12,"_style":17,runtimeerror:[9,12],hiram:11,headlin:[1,12],bayer:11,theori:9,org:[8,11,13,14,3,15,4,6],"byte":[14,23,9,18],care:21,funki:1,wai:[9,1,7,14,18,12],spam:[23,1],ocaml:[10,14,3],domen:11,thing:1,place:[6,8,14],gordon:11,classtoo:16,mondrianstyl:7,principl:12,think:[21,18],first:[9,1,2,14,3,21,17,23],origin:[14,3],ragel:[10,14,3,11],directli:[3,1],yourself:[15,1],claylex:3,qmllexer:3,"long":[14,12],sylvestr:11,open:[5,1,17,8],litstyl:3,size:[9,17],given:[0,1,2,14,3,9,21,18,23],ian:[14,11],sheet:[0,3],workaround:9,gif:[14,9],line_number_bold:9,smalltalklex:3,ashkena:11,white:7,modula:[10,14,3,11],includ:[0,1,14,3,15,9,21,23,18,6,19,22],get_syntax_def:9,phtml:3,jagslex:3,especi:12,masonlex:3,"public":[14,3],copi:[3,19,9,22,13],specifi:[21,17,3,1,9],callaghan:11,"short":[21,0,9,1,3],enclos:[0,9,12],than:[3,1],png:[14,9],blitzbas:[14,3,11],wide:[8,3,15],nathan:11,fruiti:14,invari:1,bashlex:[14,3],were:[14,5],posit:[14,21,1],ragelobjectiveclex:3,batchlex:3,browser:[9,15,1],pre:[14,4,9,17,23],prg:3,san:[14,9],alias_filenam:21,pro:[14,3,11],ani:[0,1,12,14,3,9,18],properli:[14,15],brainfuck:[10,3],exclud:12,engin:[14,1],techniqu:1,offer:15,rhtmllexer:3,inform7lex:3,take:[8,9,1,2,14,3,15,21,23,6],noth:1,channel:8,monokai:[14,11],begin:[9,1],sure:[8,0,1,3],offload:14,norman:11,pumbaa80:14,normal:[0,1,2,16,21,12],buffer:[14,17,3,11],c99:14,frit:11,compress:[21,3,9],dylanlex:3,paid:8,toplevel:1,lhaskel:3,colorama:14,pair:[21,1],fantom:[14,3,11],disabled_modul:3,yourmodul:[5,7],synonym:1,kal:[14,3,11],later:[17,9,1],typeset:3,sqliteconsolelex:3,textlex:3,runtim:4,axd:3,pattern:[9,1,14,21,5,23],preambl:9,gracefulli:14,cmakelist:3,cppobjdumplex:3,show:[3,1,9,13],guess_lex:[14,21,23],linh:11,terminal256:[9,11],gooddata:[14,3,11],concurr:3,hack:[5,20],spigarelli:11,corner:14,treetoplex:3,token_typ:17,menuconfig:3,xml:[9,12,14,3,10,4],onli:[0,1,12,14,3,15,9,21,23],explicitli:0,xmi:3,delphilex:3,zamboni:11,activ:11,state:14,opalex:3,dict:[17,12,18],backreferenc:1,analys:21,overwritten:9,hylex:3,variou:[14,21,20],get:[14,21],ssp:[14,3],secondari:23,dyl:3,class_too:16,cannot:1,progress:3,geo:3,requir:[14,5,3,1],vhdllexer:3,equal_sign:1,yield:[9,1,14,3,16,21,17],tagurlformat:9,where:[9,1,7,21,17,22,23],vision:3,wiki:[8,14,3,15,10,22],kernel:3,dobjdumplex:3,csail:3,cppcommentlex:1,cobolfre:3,cypher:14,get_bool_opt:[21,16],isabel:[14,11],cogit:13,"0pre":6,stanlex:3,cssgenshilex:3,infinit:14,haxeml:3,detect:[14,3],"__all__":1,review:15,bashcomp:13,label:[14,12],enough:[3,1,9],between:[14,3,9,1,7],"import":[9,1,2,3,16,4,18,17,12,23,7],get_choice_opt:21,"kl\u00e4rck":11,inputenc:9,misdetect:14,objdumplex:3,get_int_opt:21,program:[14,3,19,12],parent:[17,1,12],screen:22,blame:3,idrislex:3,cheetahhtmllex:3,come:[2,7],tiberiu:[14,11],vimrc:3,clj:3,zimtstern:14,mono:[14,9],afshar:11,tutori:4,unlex:3,genshitext:3,improv:[14,9,11,2],among:[21,8,23],undocu:3,pov:[10,14,3],xwiki:15,pot:3,rustsrc:3,pop:1,pom:4,colon:0,tokenstr:9,pod:14,twig:14,unistr:14,curs:15,coupl:14,howard:11,swift:14,rebuild:1,mark:[11,1,2,12],derivedlex:1,higlight:3,valueerror:14,highighlight:3,parser:14,timhatch:11,amann:[14,3,11],emphas:12,rubi:[10,14,3,1,12],andrew:11,bmp:[14,9],rubiniu:3,koltsov:11,i18n:14,bmx:3,andrea:[14,3,11],those:[5,3,1,12,17],"case":[0,1,2,14,15,9,16,21,18],hdr:3,hdp:3,pfannschmidt:11,arnold:11,trick:20,invoc:9,hdl:3,margin:9,chapellex:3,stdout:[0,18],plpgsqllexer:3,"0xb785decc":2,equal:[14,0,1],antlrpythonlex:3,veriloglex:3,cobol:3,mcgregor:11,ascii:[0,3,18],haml:[14,3,11],"__init__":[21,17,1,16],lualex:[3,1],language_lex:1,develop:[3,11],author:[3,15,12],media:14,robotframeworklex:3,same:[0,1,2,14,3,9,17,12],binari:[14,3,12],html:[14,21,0,11],pad:9,wavemetr:3,povraylex:3,document:[14,0,9],pan:14,rdlexer:3,finish:1,nest:[14,3,1],assist:3,decompress:3,capabl:14,jeffrei:11,mq5:3,mq4:3,mani:[8,9,11,14,1,19],extern:[9,13,14,3,22,19],solvabl:1,nesc:[14,3,11],genshilex:3,appropri:[3,1],macro:[3,17,9],markup:[14,9,17],clobber:14,without:[14,5,9,1,12],igorexchang:3,model:3,roughli:9,harrison:11,autohandl:3,young:11,rest:[14,3,1,2,20],bitmap:9,newspeak:[14,3],get_lexer_for_mimetyp:[21,23],gdc:3,genshi:[10,3,11],ps1:3,speed:14,otherlex:1,rake:3,sourceslist:3,mcdonald:[14,11],except:[9,1,2,14,3,21,12],littl:[14,3],apache2:3,blog:15,linenospeci:9,appaiah:11,scilablex:3,overview:[23,7],lasttyp:17,fmarc:14,disrupt:2,around:[0,3],noclobber_cssfil:[14,9],read:[8,1],swig:[14,3,11],viml:3,dart:[10,14,3,11],dark:[14,9,17],bb4444:23,mxmllexer:3,moo:3,darc:[14,3,11],phpbb:9,aspectj:[14,3,11],color:[0,2,13,14,15,9,16,17,22,23,7],mod:3,macarthur:11,intel:[14,3],whitespac:[9,1,12,14,3,21,7,23,2],patrick:11,integ:[21,3,12],server:[10,14,3],either:[23,17,9,1,7],cascad:3,output:[8,0,22,1,2,14,3,15,9,16,21,17,18,23,12],velocitylex:3,manag:[6,15],modula2lex:3,fulfil:1,hylang:3,csharplex:[14,3],constitut:14,simplefilt:16,nonzero:2,aust:[3,11],famlii:9,definit:[14,21,0],token:[0,2,20,14,9,16,21,17],moon:3,kurzbach:11,modelica:[10,14,3,11],fayaa:15,apostroph:14,refer:[9,1,20,14,3,16,17,23],linenostep:9,power:[15,1],openedg:[14,3,11],asax:3,raiseonerrortokenfilt:[14,2],broken:9,olov:11,fulli:14,bazaar:15,src:3,battcher:11,central:4,greatli:14,acm:3,extra_keyword:1,splitlin:14,cuda:[14,3,11],act:3,headline_callback:1,processor:[14,11,13],iokesrc:3,activest:15,garg:11,irssi:[10,3],nixo:3,treetop:[14,3,11],strip:[23,3,1],cheetahxmllex:3,tokenmerg:2,log:[10,8,3,11,14],opengl:3,aren:[17,1,7,12],hex:[14,17,12],haskel:[10,14,3,11],start:[9,1,20,14,3,21,17],interfac:[14,21],lot:[14,4,1],guess_lexer_for_filenam:[21,23],yai:14,rhtml:3,verbatim:[14,9],tupl:[21,17,3,1,9],bundl:13,regard:0,jun:14,ragelembeddedlex:3,yourlex:5,gooddatacllex:3,stripnl:[14,21,3],realli:[5,9,1,12],anchorlin:9,add_filt:[2,16],pull:[14,8],algorithm:[3,9],juliaconsolelex:3,possibl:[9,1,12,14,3,15,4,17,18,23],"default":[0,1,2,14,3,9,21,18,23,11,7],repr:9,jerith:3,fsi:3,default_styl:7,blitzmax:[14,3,11],embed:[3,15],rust:[10,14,3,11],expect:[0,1],openedgelex:3,creat:[0,1,13,14,3,9,4,17,23],certain:[14,9,1],felix:[3,11],commandprefix:[14,9],cbl:3,cbm:3,strongli:3,file:[0,1,13,14,9,21,4,17],urbiscript:[14,3,11],opencobol:[14,3,11],again:[17,9,1],googl:[14,11],pmod:3,kconfiglex:3,mathematica:[14,3],gettext:[10,14,3],prepend:[0,9],field:3,valid:[21,15],collis:14,you:[0,1,2,3,4,5,6,7,8,9,21,12,13,14,15,16,17,18,19,20,22,23],abysm:14,registri:[14,3],ragellex:3,brandl:[8,11],sequenc:[8,9,12,15,21,23],symbol:[14,12],docstr:[14,2],croclex:3,ansi:[23,8,3,15,9],larim:11,releas:[6,8,14,10],image_pad:9,network:8,raichoo:11,corei:11,racketlex:3,zimin:11,descript:3,f90:3,do_insert:14,cpy:3,regeditlex:3,nelson:[14,11],cpp:3,escap:[9,1,12,14,3,23],ocamllex:3,scm:3,represent:9,all:[0,11,2,14,9,16,21,17,1],sci:3,consider:[21,3],pth:14,sce:3,lack:10,rasul:11,zine:15,postscriptlex:3,scalat:3,follow:[0,1,12,3,9,21,4,17,18,23],faster:14,yourapp:7,content:[9,1,14,3,15,21,4,23],repl:3,ragelclex:3,evoqu:[14,3,11],spitfir:[14,3],articl:[9,13],tail:3,sml:3,present:[14,15],vbnet:3,introduc:[9,1,12],sound:1,liter:[14,11,3,1,17],vert:3,straightforward:17,fals:[9,2,14,3,21,12],cheetahjavascriptlex:3,vera:9,arexx:3,fan:3,failur:14,veri:[8,3,1,16],ticket:[14,8],strang:1,gm2ext:3,hyb:3,wsf:3,lisp:[10,14,3,11,12],cryptol:[10,14,11],scamllex:3,list:21,cssstyle:9,sane:9,small:[14,23,3,7],smali:[14,3,11],fsharp:3,tea:[10,14,3,11],apacheconf:3,nbp:3,ted:11,fmter:9,tex:[10,3,9],modula2:3,zero:3,asp:[14,3],design:3,qml:[14,3,11],pass:[0,1,7,14,9,16,17,18,23],further:[9,12],befungelex:[3,1],htmldjangolex:3,sysutil:3,what:[14,23,0],richard:11,fancysrc:3,favor:14,section:[15,1],abl:[14,3,11],overload:[1,12],delet:[1,12],version:21,consecut:[17,2],deepli:1,line_number_step:9,method:[0,1,2,14,3,9,16,21,17,23],hash:14,haxelex:3,vala:[10,14,3,11],unmodifi:1,javascriptlex:[14,3,1],shouldn:[14,1],elixirlex:3,strong:12,modifi:[21,9],sandalski:11,valu:[0,1,2,14,3,9,16,21,5,12,17,7],zamudio:11,search:1,basemakefilelex:3,pypylog:3,htmlphplexer:[3,1],amount:[1,2],splu:3,doctest:3,action:1,moonscriptlex:3,rkt:3,via:[9,18,13],shorthand:3,gosu:[14,3],nsislex:3,eclex:3,readili:17,filenam:[0,1,14,3,9,21,5,22,23],string_to_tokentyp:12,sourcepawnlex:3,famili:[14,9],select:[0,1,14,3,9,21,23],"_luabuiltin":3,kalnitski:11,hexadecim:[17,12],spacehack:9,helper:[14,1],foxpro:[14,11],povrai:[10,3],distinct:9,regist:[2,20,14,16,21,22],snobollex:3,objectivejlex:3,asm:[14,3],line_number_char:9,taken:[14,21],objectivec:[14,3,11],toggl:9,more:[8,1,14,3,4,17,23],turbo:3,icw:3,desir:[9,2],"schneegl\u00f6ckchen":14,hundr:1,mozilla:14,ital:[9,17,7],mql:[14,3],flag:2,particular:[0,9],shellscript:3,sourcecod:[14,3,19,9],cach:[14,3,17],psql:3,lassocsslex:3,none:[9,1,12,3,16,21,17],pkgbuild:3,wppygment:15,outlin:15,histori:3,xmlerblex:3,redcodelex:3,xqueri:[10,14,3,11],learn:8,abandon:1,dec:14,def:[9,1,14,3,16,21,17],stepan:11,lastval:17,prompt:[14,3,12],challeng:15,share:15,templat:[14,21,1],makolex:3,explor:9,unicodelevel:3,galloi:11,dreiundzwanzig:14,huge:1,cours:[15,12],csh:3,angu:11,rather:1,anoth:[1,2,14,15,18,12],dsrc:3,snippet:[23,15,7,19,13],smalltalk:[10,14,3,11],plrm:3,simpl:[14,4,1,13],needl:1,css:[21,0,7,14,3,9,10,17,22,23],wxhtmlpygment:15,jarrett:[14,11],"_phpbuiltin":3,objdump:[14,3],lexercontext:1,variant:3,state2:1,ff0000:[17,7],objdumb:3,pat:11,associ:1,agda:[14,3,11],scss:[14,3],github:[3,15],linesepar:9,line_number_separ:9,onto:1,dotal:1,krzysiek:[14,11],django:[10,3,15],caus:[14,9],zerodivisionerror:3,logtalk:[10,14,3,11],nvidia:3,aspectjlex:3,egg:1,debcontrol:3,help:21,openbug:3,glshaderlex:3,through:[23,0,1],csharp:3,hierarchi:12,zephir:10,paramet:[17,1],paulo:11,style:[14,21,11],ystep:9,matthew:11,"pr\u00e9vost":11,catalog:[10,14,3],resort:[0,18],stephen:11,autolisp:3,might:[17,1,7,18],wouldn:9,good:[14,17,11],"return":[9,1,2,3,21,17,23],lassoxmllex:3,framework:[10,14,3,15,11],oxford:11,parenthesi:1,bryan:11,hxx:3,easili:[8,1,14,3,15,17,19],supertoken:7,systemverilog:[14,3,11],found:[8,0,1,13,14,3,9,21,23],unicod:[9,1,2,20,14,3,23],compatibl:12,trailer:14,denni:[14,11],as3:[14,3],weight:[23,9],fish:11,idea:[14,4],procedur:[14,3,1],slowdown:3,sep:14,connect:8,b3d:3,djangolex:3,todo:[14,2],orient:3,unquot:14,terminal256formatt:9,robert:11,publish:3,myghtyxmllex:3,lineno:[23,0,9],print:[0,3,15,9,4,23],roberg:[14,11],ca65lex:3,benjamin:11,postgr:3,advanc:4,guess:[14,21,0,9,3],base:[8,9,1,12,21,14,3,15,10],prestyl:[14,9],ask:14,asi:3,mma:3,bash:14,bbcodeformatt:9,unhandl:3,veloc:3,omit:0,fsharplex:3,caption:9,rconsol:3,blackwhitestyl:14,pikelex:3,interact:14,egorkin:11,singleton:12,notifi:8,obviou:1,prevent:[1,7],feel:1,aconf:3,misc:14,number:[8,0,1,2,14,3,15,9,17,12,23,7],sometim:[9,1],done:[14,1],"_format_lin":9,stabl:8,miss:[14,1],fanci:[10,14,3,11],prologlex:3,differ:[9,1,2,14,3,15,18,23,7],ebnflex:3,script:[0,1,14,3,15,10,5,23,19],cmakelex:3,gnuplotlex:3,opalang:3,construct:[14,9,1,12],paint:15,statement:[14,21,3],ttype:[17,16],scheme:[10,14,3,11],store:[9,15,1],xmln:4,ascx:3,v4_0_0:4,selector:[14,23,0,9],part:[17,1,12],pars:[14,3,15,17],inferno:11,kind:[14,12],ca65:3,houghton:11,bbcode:[9,11,14,3,15,10],remov:[14,9,1],nemerlelex:3,dtd:[10,14,3,11],mysqllex:3,pythoninterpret:4,greg:11,julialex:3,keyboardinterrupt:14,logoslex:3,grei:2,udalov:11,get_lexer_by_nam:[14,21,3,5,23],igor:[14,3,11],bourdon:[14,11],malzeug:14,charna:14,handlecodeblock:3,baruchel:11,mupad:[10,14,3,11],"null":[3,9],lid:[14,3],built:[14,23,9],equival:[3,1],eeeeeee:17,carlo:11,self:[9,1,12,3,16,21,17],schemelex:3,croc:[14,3],excclass:2,preproc:12,rakefil:3,build:[3,15],xsltlexer:3,cirrulex:3,vnd:3,distribut:[7,13,14,5,22,6,19],exec:4,aslakhellesoi:3,livescript:[14,3,11],previou:1,firstchild:9,ronni:11,font_siz:[14,9],most:[8,9,1,14,3,21,17,6],weizenbaum:11,jsp:[10,3],charl:11,verbopt:9,metacharact:1,clear:8,tpl:3,minhe:11,ext:5,clojur:[10,14,3,11],duelengin:3,artem:11,scilab:[10,14,3,11],usual:[6,23,9],bulletin:9,ctag:[14,9,11],cdf:3,rtf:[8,9,11,14,15,23],xcode:14,golo:14,faschingskrapfn:14,inencod:[14,0,18],session:14,modelin:[14,11],font:[23,9,17],find:[14,15,1,20],access:[9,17,12,16],indexerror:1,rustlex:3,mqllexer:3,factor:[10,14,3,11],htmlcheetah:3,iec:3,yml:3,duellex:3,snobol4:3,unus:12,dpatch:3,express:[14,1,12],mclaughlin:11,simplist:3,ecllex:3,phplexer:[3,1],target:3,maql:[3,11],abap:[14,3,11],kokalex:3,common:[14,11],coqlex:3,set:[9,1,12,13,14,3,4,17,18,23,22],dosbatch:3,fext:9,perl6lex:3,emac:[14,0,3,7],arg:[14,21,0,9],reserv:12,slowish:14,horizont:9,analog:14,pythonconsolelex:[14,3],hess:11,postmarkup:15,someth:[23,4,1,12,17],topmost:1,bmpimageformatt:9,billingslei:[14,11],won:[0,1,9],qbasic:14,experi:15,jasmin:[14,11],birkenfeld:[6,14],protobuflex:3,altern:[14,1],signatur:12,llvmlexer:3,latin:3,syntact:15,xslt:[10,14,3,11],numer:[14,3],javascript:[9,1,12,14,3,10],simonov:[14,11],disallow:14,lowercas:2,matthia:[3,11],outfil:[21,23,9,17],matlablex:3,both:[23,3,1,7],last:[17,0,1,3,18],delimit:[14,3,1],hyperlink:9,scaml:[3,11],hint:20,roman:14,context:[14,3,1],pdf:[3,15],blitzmaxlex:3,whole:[17,9,1],markdown:[14,11],simpli:1,roff:3,point:[9,1,2],instanti:[21,17],get_lexer_for_filenam:[21,23],gild:11,xtend:[14,3,11],linux:[6,3],comput:11,hxml:3,ooclex:3,pycon:3,java:[14,20],kconfig:[14,3,11],instrument:8,bertrand:11,due:[14,21],swg:3,cf3:3,bgcolor:17,txt:[14,3,9],xmldjangolex:3,nobackground:9,aslak:11,tcllexer:3,imag:[14,3,11,9],convert:[9,2,14,3,15,16,21,23,12],gap:[10,14,11],coordin:9,mak:3,understand:5,stolen:3,look:[8,0,1,2,20,21,3,15,9,10,4,12,23,7],fusesourc:3,packag:[14,3,1,9,12],mli:3,batch:[10,14,3],mll:3,pace:8,dominik:11,unifi:[14,3],smart:[0,18],abov:[0,1],error:[9,1,12,14,15,21,7,2],fun:[10,3],anonym:1,mly:3,loop:[14,23],prolog:[10,14,3],owen:11,classnotfound:[14,21],jython:[14,4,15],jpg:[14,9],itself:1,dotnet:3,gvimrc:3,coroutin:3,octav:[10,14,3,11],shaw:11,bangert:[14,11],minim:[3,17],shorten:3,minid:[10,14,3,11],coffeescript:[10,14,3,11],decod:18,onclick:9,octal:12,lenient:3,higher:[9,15],weechatlog:3,optim:[14,1],javascriptdjangolex:3,user:9,filetext:14,stack:1,recent:3,subpackag:[14,7],gsp:3,lower:2,task:3,get_tokens_unprocess:[21,1],machineri:15,clexer:[14,3],gsx:3,docker:14,propos:12,explan:[0,12],usepackag:9,iolex:3,antlr:[10,14,3,11],sasslex:3,recognis:[3,9,12],collabor:15,world:[23,4,0],makefilelex:3,texlex:3,also:[8,0,22,1,7,13,14,3,15,9,16,10,18,21,19,12],restructuredtext:[14,3,15],armin:[8,11,13],hilit:15,input:[0,1,14,3,9,21,18,23],jerom:11,subsequ:[21,9],velocityxmllex:3,cuh:3,bin:[23,12],transpar:7,texcom:9,big:3,literateagdalex:3,nginx:[10,14,3],outencod:[14,0,9,18],bit:[14,9],like:[8,0,1,12,13,14,3,15,9,21,4,17,23,19],docutil:14,clai:[14,3,11],resolv:1,eee:7,actionscript3lex:3,encount:[1,18],subhead:[1,12],often:[19,1],some:[9,1,7,14,3,15,16,21,17,23,12],styleguid:2,emph:12,sampl:[19,1,22,13],blitzbasiclex:3,surpris:14,rebollex:3,scala:[10,14,3,11],pep:14,per:[14,0,7,18],backward:[14,12],bst:3,slash:[5,1],cfengine3lex:3,bygroup:1,run:[4,3,15,1,9],step:[9,15,1],namehighlightfilt:[14,2],elixir:[14,3,11],from:[0,2,14,9,16,21,4,17],major:[6,11],tabsiz:[21,3,2],voelker:11,unicodeerror:14,winbatch:3,docclass:9,idr:3,kashif:11,idl:[10,14,3,11],masklex:3,stuart:11,idc:3,block:[14,3],javascriptsmartylex:3,nsh:3,nsi:[14,3],proto:3,within:[21,3,9],pastebin:[3,15],ellipsi:14,lightbg:9,lubomir:11,intr:3,dustin:11,neujahr:14,jlcon:3,span:[14,4,0,9,23],line_numb:9,xpl:3,coffeescriptlex:3,live:3,fast:[8,15],custom:[14,9,19],pocoo:[8,13],suit:[14,11,1],forward:[3,2],adam:[14,3,11],usr:23,doctyp:9,schemaloc:4,colorschem:9,link:[14,9,15],translat:14,atom:3,latexformatt:[14,9,17],ns2:3,antlrcsharplex:3,info:[3,20],concaten:1,utf:[14,4,3,9,18],erick:11,consist:[14,1],caller:1,cobjdumplex:3,groovi:[10,14,3,11],foxprolex:3,objectpasc:3,regedit:3,hl_line:[14,9],coldfus:[10,14,3],highlight:[8,0,22,1,2,13,14,3,15,9,21,4,5,12,23,7],maqllex:3,similar:[14,23,1,12],python3lex:3,yourformatt:5,constant:12,mathescap:9,armstrong:11,cover:[3,5],darcspatchlex:3,csssmartylex:3,knibb:11,doesn:[0,1,12,14,3,9,16,5,17],repres:[23,12],"char":[14,1,12],incomplet:[14,15],guarante:12,examplelex:1,"dani\u00ebl":11,winbug:3,cmake:[10,14,3],gnuplot:[10,14,3],nasm:[14,3],titl:[21,9],rawtokenformatt:[14,3,9],crompton:11,invalid:14,nam:11,nick:11,delegatinglex:[3,1],rrggbb:17,error_color:9,iosrc:3,bmax:3,debsourc:3,pannuto:11,llvm:[10,14,3],skeletonz:15,progopedia:15,asciidoc:15,william:11,fisher:11,borland:3,imageformatt:[14,9],freewar:3,svh:3,mimetyp:[14,21,3],svg:[14,3,11,9],rst2pdf:15,microsoft:9,obj:3,far:1,hello:[23,4,0],prototyp:3,cssphplexer:3,ecsrc:3,partial:14,edg:9,nasmobjdumplex:3,queri:3,steve:11,difflex:[3,1,12],edu:3,myghtyjavascriptlex:3,cython:[10,14,3],simon:11,secur:15,sensit:14,tspan:9,avoid:[14,23],friendli:[3,9,7],send:[8,3,1,18,17],marchand:11,moocodelex:3,troff:3,movsisyan:11,kschutt:3,pekka:11,vallentin:11,inlinestyl:22,"0f0":7,dartlex:3,tassilo:11,shellsess:[3,11],asmx:3,tri:[14,0,1,18],michael:11,robotframework:3,"try":17,squidconf:3,felixlex:3,pleas:[15,5,20],cfm:3,monospac:9,hxmllexer:3,cfg:[3,1],elisp:3,cfc:[14,3],gettextlex:3,download:20,rrt:14,odd:14,click:9,xmllexer:3,compat:[14,9],index:[6,21,9,1],rawtokenlex:[3,9],compar:[15,12],ananlys:18,cell:9,experiment:[14,9],evoquexmllex:3,bird:3,modelvers:4,lee:11,iex:3,flxh:3,hl_color:[14,9],let:[23,8,3,17],lex:[8,1,14,3,15,21],implicit:12,mawk:3,i6t:3,vba:3,hamllex:3,larger:[9,22],ctx:1,shader:[10,3],antlractionscriptlex:3,staticmethod:21,lodgeit:15,chang:[14,9],chaiscript:14,envnam:14,chanc:5,winkler:11,appli:2,apt:3,pxi:3,"boolean":[14,21],apl:[14,3,11],perllex:[23,3],pxd:3,fed:2,feb:14,objectiveclex:3,zip:3,commun:[8,15],doubl:[17,2,12],next:[3,1],websit:14,few:[10,14,23,1,7],f00:7,length:[3,1],ternari:14,"0000aa":17,comparison:15,trait:3,jinja:[10,3],xmlphplexer:3,console256:9,trail:[23,3],insensit:[14,21],wstokentyp:2,maven:4,gherkin:[10,14,3,11],starter:1,awklex:3,alia:[14,21,23,5],annot:[3,2],linenumb:9,jsplexer:3,fancylex:3,inform6:3,proof:3,myghtylex:3,sqlite:10,malform:3,quickstart:14,pawn:14,slim:14,erblex:3,tad:[14,11],tag:[0,1,2,14,3,9,17,23,12],tab:[14,3,9,2],tac:3,tarbal:14,onlin:6,smartylex:3,serial:3,rktl:3,octavelex:3,ragelcpplex:3,crocsrc:3,georg:[8,11],brian:11,aa22ff:23,sig:3,textbuff:13,subdirectori:22,instead:[9,1,14,3,15,17,23],eclass:3,stand:15,frag:3,gentoo:14,watch:10,wlua:3,pypyloglex:3,rhistori:3,inform6templatelex:3,luka:11,jproperti:3,raiseonerror:2,attent:8,maskj:[14,11],redund:23,philosophi:7,gerkin:11,xql:3,xqm:3,shellsessionlex:3,wowac:15,light:[9,17],robot:[10,14,3,11],font_nam:9,element:[9,1,12],issu:[14,8],xqy:3,lineanchor:[14,9],encyclopedia:15,allow:[9,1,2,13,14,3,21,7],subtyp:12,line_pad:9,mainfram:3,longest:1,adjust:16,setuptool:5,nesclex:3,objectivej:3,comma:[14,0],perfect:9,fontfamili:9,till:3,get_style_by_nam:[21,7],reidi:11,vimlex:3,tst:3,darkbg:9,pixel:9,crash:[14,1],pure:3,javascriptgenshilex:3,handl:[14,21,9],unmatch:3,baumgart:11,mention:5,front:15,rexx:[14,3,11],autoitlex:3,trac:[10,14,3,15],anyth:[0,9,1,3],edit:22,new_stat:1,puppetlex:3,mode:[14,9],autodeleg:3,pepijn:11,tokenmergefilt:2,themselv:1,scalalex:3,intellig:15,literateidrislex:3,consum:3,makocsslex:3,meta:9,"static":[21,12],mxml:[14,3,11],our:8,morton:11,special:[14,0,9,1,2],out:[14,4,0,2],variabl:[9,1,12,14,3,4],matt:[14,11],overridden:21,influenc:1,categori:[0,3],ceylon:[14,3,11],typescriptlex:3,cbmba:3,zimmerman:11,line_number_ital:9,clone:6,math:[14,9],statist:14,marek:[14,11],insid:[9,1,12],squidconflex:3,ecl:[14,3],monofont:9,standalon:4,control:[21,9,11,14,3,15,10,6],dictionari:[21,9,1],moinmoin:[14,3,20],galdino:11,indent:[14,3,9,2],disabledmodul:3,area:9,put:[3,9,1,7,22],velocityhtmllex:3,david:11,delroth:14,abaplex:3,svgformatt:9,lexem:3,clojurelex:3,outsid:[3,1],retain:14,htmlgenshilex:3,lessfilt:14,xmlsmartylex:3,nounderlin:7,softwar:11,suffix:[14,1],christoph:[14,3,11],qualiti:8,scene:[10,14],date:12,puppet:[14,3,11],overwrit:17,javascriptphplex:3,jadelex:3,facil:11,makojavascriptlex:3,strict:14,unknown:3,licens:[14,15,12],backtrack:14,system:[0,1,3,9,4,6],messag:12,state1:1,attach:22,csserblex:3,monkei:[14,3],privaci:15,termin:[14,23,0,9,18],man:3,jade:[3,11],rsl:[14,11],shell:[14,0],italic:9,analyse_text:[14,21,23],rdoc:14,moonscript:[14,3,11],nolta:11,rst:[3,19,12],nobodi:12,haven:[0,18],rss:3,ben:[14,11],cpython:3,creutzig:[14,3,11],see:[8,0,1,2,13,14,3,15,9,21,17,18,23,7],structur:3,charact:[0,1,2,14,3,18,12],alloi:14,htaccess:3,chardet:[3,18],"0b101010":12,kupperschmidt:11,bind:3,lang_builtin:1,pgsql:3,iokelex:3,greater:3,exhibit:14,nqp:3,viewer:[9,15],favorit:1,line_number_bg:9,py3:3,pastebox:15,xquerylex:3,correspond:1,have:[8,0,22,1,2,20,14,3,15,9,16,21,18,5,12,23,17,7],close:[17,1],need:[8,9,1,14,3,15,16,21,5,23,17],line_number_start:[14,9],border:[9,17,7],actionscriptlex:3,roux:15,rout:3,ceylonlex:3,hxsl:3,builtin:[14,21],prettifi:8,which:[0,1,2,14,23,3,9,21,4,18,5,12,6,7],mit:3,singl:[14,1,12,18],uppercas:[23,2,12],pyx:3,unless:9,clash:9,alain:11,hazel:11,pyw:3,awk:[10,14,3,11],dubi:3,deploi:4,transcript:3,why:[10,15],gaynor:11,cangiano:13,laurent:11,latin1:[14,0,18],request:[14,8,9,15],pipe:[23,3],snapshot:4,determin:[14,21,3,23],occasion:18,literatehaskelllex:3,fact:[21,3],cssfile:9,mondrian:7,dba:3,text:[8,0,1,7,13,14,3,15,9,21,18,23,19,12],qdeclarativeintroduct:3,bbcodelex:3,objc:[14,3],fear:[8,1],objj:3,i7x:3,inlin:[14,23,9,17],locat:14,winner:14,jar:4,forev:14,should:[9,1,2,14,3,21,5,22,17,7],jan:14,visiblewhitespacefilt:[14,2,12],suppos:[23,9],elseif:1,jag:[14,3,11],local:[14,0,1,18],ksh:3,meant:12,contribut:[3,11],wsdl:3,sasso:11,autom:3,nginxconflex:[14,3],csrc:3,brillouin:14,dylanconsolelex:3,increas:[8,9,1],linespan:[14,9],varun:11,htmldjango:3,grai:17,perl6:3,stuff:9,integr:[14,3,9],contain:[0,1,2,13,14,15,9,21,17,23],errortoken:2,nobold:7,view:[8,3,1],line_number_pad:9,modulo:3,lsp:3,aglassing:11,frame:14,knowledg:8,exhypotheticlex:1,racket:[14,3,11],diamanda:15,extend:[14,3,1],correctli:[14,9,15,1],style_map:[21,7],mainli:3,teng:[14,11],lua:[10,14,3,11],written:[0,11,7,13,14,15,9,21,5,18,23,1],jpgimageformatt:9,verilog:[10,14,3],lassolex:3,ken:[3,11],kei:[21,17,3,1,7],csslexer:3,rexxlex:3,lagda:3,entir:1,joe:11,vhd:3,group:1,sieker:11,lassohtmllex:3,jon:11,addit:[9,1,14,3,15,17,23],plugin:[3,22,20],ssplexer:3,logtalklex:3,etc:[0,2,14,15,17,12],instanc:[7,1,12,16,21,4,22,2],swallow:14,comment:[9,1,2,14,17,23,7],bashsessionlex:3,cxx:3,syntaxerror:14,rpf:3,respect:[14,9],image_format:9,rpm:[10,14,3],ozarowski:14,quit:[14,8,9,15,16],platform:[6,3,15],addition:[17,9,1,22,16],quotat:2,compon:[23,3,20],json:[14,3,11],accept:[9,2,3,22,23,18],mime:[14,21,3],untouch:3,immedi:21,dure:3,xtendlex:3,"ko\u017ear":11,mike:11,adob:3,gaslex:3,togeth:[23,3,9],lgt:3,multi:[14,1,12],therefor:[0,9],rbx:3,rbw:3,plain:[14,23,3],align:9,harder:14,debiancontrollex:3,defin:[9,1,7,3,21,5,17,12],dalvik:14,oldhtmlformatt:17,nescsrc:3,vapi:3,almost:1,demo:15,squid:[10,14,3,11],site:15,powershelllex:3,sconstruct:3,get_:14,partner:3,get_formatter_for_filenam:[21,23],fortranlex:3,welcom:23,cross:15,evoquelex:3,member:[3,1],python:[8,0,1,12,14,23,3,15,9,10,4,22,6,11,19],adalex:3,antlrjavalex:3,android:3,probabl:[21,3],incl:10,infer:0,spell:1,http:[11,13,14,3,15,10,4,6],rconsolelex:3,expans:0,ensurenl:[14,3],effect:9,coffe:3,iok:[14,3,11],php:[11,12,14,3,10,1],expand:[3,2],commandchar:9,off:[21,2],nevertheless:1,darcspatch:3,builder:15,well:[10,14,15,17],antonio:13,exampl:[0,1,2,3,9,16,21,4,17,22],command:[14,21],english:15,latest:[6,8,10],aamann:3,newest:14,less:16,yourfilt:5,tcl:[10,14,3,11],margaritelli:11,gosulex:3,paul:11,glue:3,clipper:3,web:1,yourstyl:[5,7],unstyl:12,gosrc:3,pykleur:14,makefil:[10,14,3],chpl:3,add:[9,1,2,14,15,21,5],divis:3,adb:3,ada:[10,14,3,11],bool:2,successor:[10,15],match:[1,12,14,3,21,23],futur:[17,12],cbmbasicv2lex:3,jesper:11,fallenstein:3,xmlrpc:15,glslsrc:3,effting:11,mckamei:11,piec:[23,9,13],get_all_lex:[21,3],know:[14,23,15,12],recurs:1,nimrod:[10,14,3,11],python3:[14,3],insert:[14,1,12],newlin:[14,3,9,1,2],keywordcasefilt:2,incred:1,genshitextlex:3,necessari:9,xsd:[4,3],martin:11,xsi:4,noclass:[14,9],page:[21,9,1,14,3,10,4,5,22,23],xsl:3,gnumakefil:3,didn:0,captur:1,suppli:12,haskelllex:3,is_token_subtyp:12,autopygment:14,repeat:1,proper:1,home:8,librari:[8,9,14,3,15,17,18,23],tmp:1,objectivecpplex:3,gerwin:11,lead:[23,3,1],funcnamehighlight:3,sqllexer:3,lean:14,gifimageformatt:9,jeremi:[3,11],nonempti:9,factorlex:3,duplic:14,eiffellex:3,nafu:9,usag:[21,0],pasti:15,host:[8,3,15],degener:14,obei:9,offset:9,mqh:3,idri:[14,3,11],pike:[14,3,11],about:[14,5,0,1,20],actual:14,justin:11,column:9,rintel:11,viewvc:15,ashx:3,constructor:[21,2],bz2:[3,9],disabl:9,own:21,meuser:11,ambigu:23,smalilex:3,bashrc:3,automat:[9,1,7,14,16,18],hybrislex:3,stan:[14,3,11],empti:[14,9,1],doren:11,keywordcas:[0,2],rql:14,smarti:[10,3],merg:[14,1,2],antlrobjectiveclex:3,van:11,dglexer:3,naveen:11,trigger:9,styleend:17,cpplexer:3,"var":12,groff:[10,14,3],"function":[1,2,14,16,21,17],vbnetlex:3,north:11,unexpect:18,tokensourc:[21,17],gobblefilt:2,highest:[21,23],bug:[14,3,11,2,20],made:[14,1],getpreferredencod:18,whether:[14,21,9],wish:15,displai:[14,9,19],directori:[14,1,7,22],below:[8,1,12],limit:3,myghtyhtmllex:3,idllex:3,otherwis:[21,9,1],problem:[14,9],nprint:23,pil:[14,9],pim:3,"int":[2,12],mask:3,evoquehtmllex:3,myt:3,pig:[14,11],implement:[14,21,3,17,9],ini:[10,14,3,1],pip:6,inf:3,eric:11,whitnei:11,tricki:1,htmlsmartylex:3,hpp:3,percent:3,detail:[10,8,0,15,1],longer:[14,1],other:[14,11,9,1],lookup:[21,5,1],diego:11,branch:15,varieti:7,php4:3,php5:3,php3:3,xxx:2,star:1,corcoran:11,"0xdeadbeef":12,igorlex:3,rex:3,squeak:3,javascripterblex:3,swiglex:3,debian:[10,14,3,11],"cl\u00e9ment":11,rpmspeclex:3,sphinx:[14,15],sass:[14,3,11],ada95ada2005:3,rule:[0,1,14,3,9,22],richardson:11,cookbook:15},objtypes:{"0":"py:module","1":"py:class","2":"py:attribute","3":"py:method","4":"py:staticmethod","5":"py:function","6":"py:exception"},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","attribute","Python attribute"],"3":["py","method","Python method"],"4":["py","staticmethod","Python static method"],"5":["py","function","Python function"],"6":["py","exception","Python exception"]},filenames:["docs/cmdline","docs/lexerdevelopment","docs/filters","docs/lexers","docs/java","docs/plugins","download","docs/styles","index","docs/formatters","languages","docs/authors","docs/tokens","docs/integrate","docs/changelog","faq","docs/filterdevelopment","docs/formatterdevelopment","docs/unicode","docs/rstdirective","docs/index","docs/api","docs/moinmoin","docs/quickstart"],titles:["Command Line Interface","Write your own lexer","Filters","Available lexers","Use Pygments in Java","Register Plugins","Download and installation","Styles","Welcome!","Available formatters","Supported languages","Full contributor list","Builtin Tokens","Using Pygments in various scenarios","Pygments changelog","Pygments FAQ","Write your own filter","Write your own formatter","Unicode and Encodings","Using Pygments in ReST documents","Pygments documentation","The full Pygments API","Using Pygments with MoinMoin","Introduction and Quickstart"],objects:{"":{VisibleWhitespaceFilter:[2,1,1,""],NullFormatter:[9,1,1,""],TerminalFormatter:[9,1,1,""],BBCodeFormatter:[9,1,1,""],TokenMergeFilter:[2,1,1,""],BmpImageFormatter:[9,1,1,""],GifImageFormatter:[9,1,1,""],CodeTagFilter:[2,1,1,""],JpgImageFormatter:[9,1,1,""],LatexFormatter:[9,1,1,""],ImageFormatter:[9,1,1,""],KeywordCaseFilter:[2,1,1,""],pygments:[21,0,0,"-"],RawTokenFormatter:[9,1,1,""],GobbleFilter:[2,1,1,""],SvgFormatter:[9,1,1,""],HtmlFormatter:[9,1,1,""],RaiseOnErrorTokenFilter:[2,1,1,""],NameHighlightFilter:[2,1,1,""],RtfFormatter:[9,1,1,""],Terminal256Formatter:[9,1,1,""]},"pygments.lexers.web":{SassLexer:[3,1,1,""],DuelLexer:[3,1,1,""],CirruLexer:[3,1,1,""],LiveScriptLexer:[3,1,1,""],HtmlLexer:[3,1,1,""],QmlLexer:[3,1,1,""],ActionScript3Lexer:[3,1,1,""],HaxeLexer:[3,1,1,""],XsltLexer:[3,1,1,""],ScamlLexer:[3,1,1,""],DtdLexer:[3,1,1,""],ObjectiveJLexer:[3,1,1,""],ActionScriptLexer:[3,1,1,""],MaskLexer:[3,1,1,""],JavascriptLexer:[3,1,1,""],MxmlLexer:[3,1,1,""],CoffeeScriptLexer:[3,1,1,""],LassoLexer:[3,1,1,""],ScssLexer:[3,1,1,""],HamlLexer:[3,1,1,""],PhpLexer:[3,1,1,""],XmlLexer:[3,1,1,""],CssLexer:[3,1,1,""],KalLexer:[3,1,1,""],DartLexer:[3,1,1,""],XQueryLexer:[3,1,1,""],JadeLexer:[3,1,1,""],JsonLexer:[3,1,1,""],TypeScriptLexer:[3,1,1,""]},"pygments.styles":{get_all_styles:[21,5,1,""],get_style_by_name:[21,5,1,""]},"pygments.lexers.compiled":{BlitzMaxLexer:[3,1,1,""],DelphiLexer:[3,1,1,""],DylanLexer:[3,1,1,""],CobolLexer:[3,1,1,""],MqlLexer:[3,1,1,""],AdaLexer:[3,1,1,""],SwigLexer:[3,1,1,""],Modula2Lexer:[3,1,1,""],CLexer:[3,1,1,""],EiffelLexer:[3,1,1,""],NimrodLexer:[3,1,1,""],Inform6TemplateLexer:[3,1,1,""],DylanConsoleLexer:[3,1,1,""],FantomLexer:[3,1,1,""],CudaLexer:[3,1,1,""],Inform6Lexer:[3,1,1,""],ValaLexer:[3,1,1,""],PrologLexer:[3,1,1,""],ObjectiveCppLexer:[3,1,1,""],CobolFreeformatLexer:[3,1,1,""],DylanLidLexer:[3,1,1,""],GLShaderLexer:[3,1,1,""],PikeLexer:[3,1,1,""],RustLexer:[3,1,1,""],ECLexer:[3,1,1,""],ClayLexer:[3,1,1,""],ObjectiveCLexer:[3,1,1,""],Inform7Lexer:[3,1,1,""],ChapelLexer:[3,1,1,""],GoLexer:[3,1,1,""],LogosLexer:[3,1,1,""],BlitzBasicLexer:[3,1,1,""],MonkeyLexer:[3,1,1,""],CythonLexer:[3,1,1,""],OocLexer:[3,1,1,""],NesCLexer:[3,1,1,""],FelixLexer:[3,1,1,""],FortranLexer:[3,1,1,""],CppLexer:[3,1,1,""],DLexer:[3,1,1,""]},"pygments.lexer.Lexer":{mimetypes:[21,2,1,""],name:[21,2,1,""],analyse_text:[21,4,1,""],get_tokens_unprocessed:[21,3,1,""],filenames:[21,2,1,""],alias_filenames:[21,2,1,""],get_tokens:[21,3,1,""],aliases:[21,2,1,""]},"pygments.lexers.parsers":{RagelCLexer:[3,1,1,""],RagelDLexer:[3,1,1,""],AntlrRubyLexer:[3,1,1,""],TreetopLexer:[3,1,1,""],RagelLexer:[3,1,1,""],RagelCppLexer:[3,1,1,""],RagelJavaLexer:[3,1,1,""],RagelObjectiveCLexer:[3,1,1,""],RagelEmbeddedLexer:[3,1,1,""],AntlrLexer:[3,1,1,""],AntlrCSharpLexer:[3,1,1,""],AntlrJavaLexer:[3,1,1,""],RagelRubyLexer:[3,1,1,""],AntlrObjectiveCLexer:[3,1,1,""],AntlrActionScriptLexer:[3,1,1,""],AntlrCppLexer:[3,1,1,""],AntlrPerlLexer:[3,1,1,""],AntlrPythonLexer:[3,1,1,""]},"pygments.formatter.Formatter":{get_style_defs:[21,3,1,""],format:[21,3,1,""],filenames:[21,2,1,""],name:[21,2,1,""],aliases:[21,2,1,""]},"pygments.lexers.hdl":{VhdlLexer:[3,1,1,""],VerilogLexer:[3,1,1,""],SystemVerilogLexer:[3,1,1,""]},"pygments.lexers.asm":{LlvmLexer:[3,1,1,""],CppObjdumpLexer:[3,1,1,""],DObjdumpLexer:[3,1,1,""],GasLexer:[3,1,1,""],CObjdumpLexer:[3,1,1,""],ObjdumpLexer:[3,1,1,""],NasmLexer:[3,1,1,""],NasmObjdumpLexer:[3,1,1,""],Ca65Lexer:[3,1,1,""]},"pygments.util":{get_list_opt:[21,5,1,""],get_choice_opt:[21,5,1,""],OptionError:[21,6,1,""],get_bool_opt:[21,5,1,""],get_int_opt:[21,5,1,""]},"pygments.lexers.functional":{KokaLexer:[3,1,1,""],ErlangLexer:[3,1,1,""],NewLispLexer:[3,1,1,""],ElixirConsoleLexer:[3,1,1,""],NixLexer:[3,1,1,""],ElixirLexer:[3,1,1,""],AgdaLexer:[3,1,1,""],LiterateAgdaLexer:[3,1,1,""],OcamlLexer:[3,1,1,""],SchemeLexer:[3,1,1,""],HaskellLexer:[3,1,1,""],LiterateIdrisLexer:[3,1,1,""],OpaLexer:[3,1,1,""],SMLLexer:[3,1,1,""],ErlangShellLexer:[3,1,1,""],CommonLispLexer:[3,1,1,""],IdrisLexer:[3,1,1,""],RacketLexer:[3,1,1,""],LiterateHaskellLexer:[3,1,1,""],CoqLexer:[3,1,1,""]},"pygments.lexers.dalvik":{SmaliLexer:[3,1,1,""]},"pygments.lexers.dotnet":{CSharpLexer:[3,1,1,""],VbNetAspxLexer:[3,1,1,""],BooLexer:[3,1,1,""],FSharpLexer:[3,1,1,""],NemerleLexer:[3,1,1,""],VbNetLexer:[3,1,1,""],CSharpAspxLexer:[3,1,1,""]},"pygments.lexers.special":{TextLexer:[3,1,1,""],RawTokenLexer:[3,1,1,""]},"pygments.lexers.templates":{MakoJavascriptLexer:[3,1,1,""],MyghtyLexer:[3,1,1,""],HtmlGenshiLexer:[3,1,1,""],XmlSmartyLexer:[3,1,1,""],ColdfusionLexer:[3,1,1,""],CheetahHtmlLexer:[3,1,1,""],MasonLexer:[3,1,1,""],JavascriptDjangoLexer:[3,1,1,""],EvoqueHtmlLexer:[3,1,1,""],LassoCssLexer:[3,1,1,""],GenshiLexer:[3,1,1,""],MakoCssLexer:[3,1,1,""],MakoLexer:[3,1,1,""],HtmlPhpLexer:[3,1,1,""],HtmlDjangoLexer:[3,1,1,""],VelocityLexer:[3,1,1,""],LassoXmlLexer:[3,1,1,""],LassoHtmlLexer:[3,1,1,""],MyghtyCssLexer:[3,1,1,""],ColdfusionHtmlLexer:[3,1,1,""],SspLexer:[3,1,1,""],SmartyLexer:[3,1,1,""],CssDjangoLexer:[3,1,1,""],EvoqueXmlLexer:[3,1,1,""],CssSmartyLexer:[3,1,1,""],MyghtyJavascriptLexer:[3,1,1,""],CheetahLexer:[3,1,1,""],JavascriptErbLexer:[3,1,1,""],MakoXmlLexer:[3,1,1,""],DjangoLexer:[3,1,1,""],LassoJavascriptLexer:[3,1,1,""],CssPhpLexer:[3,1,1,""],GenshiTextLexer:[3,1,1,""],JavascriptGenshiLexer:[3,1,1,""],RhtmlLexer:[3,1,1,""],HtmlSmartyLexer:[3,1,1,""],VelocityHtmlLexer:[3,1,1,""],CssGenshiLexer:[3,1,1,""],CheetahXmlLexer:[3,1,1,""],CheetahJavascriptLexer:[3,1,1,""],JavascriptSmartyLexer:[3,1,1,""],MyghtyHtmlLexer:[3,1,1,""],TeaTemplateLexer:[3,1,1,""],JavascriptPhpLexer:[3,1,1,""],ColdfusionCFCLexer:[3,1,1,""],XmlErbLexer:[3,1,1,""],XmlPhpLexer:[3,1,1,""],CssErbLexer:[3,1,1,""],XmlDjangoLexer:[3,1,1,""],JspLexer:[3,1,1,""],VelocityXmlLexer:[3,1,1,""],ErbLexer:[3,1,1,""],MakoHtmlLexer:[3,1,1,""],MyghtyXmlLexer:[3,1,1,""],EvoqueLexer:[3,1,1,""]},"pygments.lexers":{text:[3,0,0,"-"],guess_lexer:[21,5,1,""],functional:[3,0,0,"-"],parsers:[3,0,0,"-"],special:[3,0,0,"-"],web:[3,0,0,"-"],foxpro:[3,0,0,"-"],agile:[3,0,0,"-"],guess_lexer_for_filename:[21,5,1,""],other:[3,0,0,"-"],jvm:[3,0,0,"-"],math:[3,0,0,"-"],templates:[3,0,0,"-"],shell:[3,0,0,"-"],get_lexer_by_name:[21,5,1,""],compiled:[3,0,0,"-"],get_lexer_for_mimetype:[21,5,1,""],sql:[3,0,0,"-"],asm:[3,0,0,"-"],get_all_lexers:[21,5,1,""],dalvik:[3,0,0,"-"],dotnet:[3,0,0,"-"],hdl:[3,0,0,"-"],get_lexer_for_filename:[21,5,1,""]},"pygments.lexers.text":{SourcesListLexer:[3,1,1,""],DiffLexer:[3,1,1,""],HxmlLexer:[3,1,1,""],MoinWikiLexer:[3,1,1,""],RstLexer:[3,1,1,""],IniLexer:[3,1,1,""],CMakeLexer:[3,1,1,""],MakefileLexer:[3,1,1,""],VimLexer:[3,1,1,""],HttpLexer:[3,1,1,""],IrcLogsLexer:[3,1,1,""],TexLexer:[3,1,1,""],YamlLexer:[3,1,1,""],RegeditLexer:[3,1,1,""],GroffLexer:[3,1,1,""],ApacheConfLexer:[3,1,1,""],LighttpdConfLexer:[3,1,1,""],PyPyLogLexer:[3,1,1,""],NginxConfLexer:[3,1,1,""],SquidConfLexer:[3,1,1,""],DarcsPatchLexer:[3,1,1,""],BBCodeLexer:[3,1,1,""],EbnfLexer:[3,1,1,""],DebianControlLexer:[3,1,1,""],PropertiesLexer:[3,1,1,""],BaseMakefileLexer:[3,1,1,""],GettextLexer:[3,1,1,""]},"pygments.formatters":{get_formatter_by_name:[21,5,1,""],get_formatter_for_filename:[21,5,1,""]},"pygments.lexers.other":{Cfengine3Lexer:[3,1,1,""],MOOCodeLexer:[3,1,1,""],BrainfuckLexer:[3,1,1,""],AutohotkeyLexer:[3,1,1,""],OpenEdgeLexer:[3,1,1,""],RexxLexer:[3,1,1,""],NSISLexer:[3,1,1,""],SourcePawnLexer:[3,1,1,""],NewspeakLexer:[3,1,1,""],GherkinLexer:[3,1,1,""],VGLLexer:[3,1,1,""],GnuplotLexer:[3,1,1,""],UrbiscriptLexer:[3,1,1,""],BroLexer:[3,1,1,""],PostScriptLexer:[3,1,1,""],ProtoBufLexer:[3,1,1,""],SmalltalkLexer:[3,1,1,""],RedcodeLexer:[3,1,1,""],RobotFrameworkLexer:[3,1,1,""],RPMSpecLexer:[3,1,1,""],MaqlLexer:[3,1,1,""],AsymptoteLexer:[3,1,1,""],GoodDataCLLexer:[3,1,1,""],SnobolLexer:[3,1,1,""],LogtalkLexer:[3,1,1,""],AppleScriptLexer:[3,1,1,""],PuppetLexer:[3,1,1,""],APLLexer:[3,1,1,""],HybrisLexer:[3,1,1,""],PovrayLexer:[3,1,1,""],MscgenLexer:[3,1,1,""],ECLLexer:[3,1,1,""],KconfigLexer:[3,1,1,""],AwkLexer:[3,1,1,""],ABAPLexer:[3,1,1,""],RebolLexer:[3,1,1,""],ModelicaLexer:[3,1,1,""],CbmBasicV2Lexer:[3,1,1,""],BefungeLexer:[3,1,1,""],AutoItLexer:[3,1,1,""]},"pygments.lexer":{Lexer:[21,1,1,""]},"pygments.lexers.math":{JagsLexer:[3,1,1,""],SLexer:[3,1,1,""],MuPADLexer:[3,1,1,""],MathematicaLexer:[3,1,1,""],IDLLexer:[3,1,1,""],MatlabSessionLexer:[3,1,1,""],BugsLexer:[3,1,1,""],MatlabLexer:[3,1,1,""],NumPyLexer:[3,1,1,""],ScilabLexer:[3,1,1,""],StanLexer:[3,1,1,""],OctaveLexer:[3,1,1,""],JuliaConsoleLexer:[3,1,1,""],RConsoleLexer:[3,1,1,""],JuliaLexer:[3,1,1,""],IgorLexer:[3,1,1,""],RdLexer:[3,1,1,""]},"pygments.lexers.shell":{TcshLexer:[3,1,1,""],BatchLexer:[3,1,1,""],PowerShellLexer:[3,1,1,""],BashLexer:[3,1,1,""],ShellSessionLexer:[3,1,1,""],BashSessionLexer:[3,1,1,""]},"pygments.lexers.foxpro":{FoxProLexer:[3,1,1,""]},"pygments.lexers.agile":{LuaLexer:[3,1,1,""],FancyLexer:[3,1,1,""],FactorLexer:[3,1,1,""],DgLexer:[3,1,1,""],Python3Lexer:[3,1,1,""],IoLexer:[3,1,1,""],MiniDLexer:[3,1,1,""],CrocLexer:[3,1,1,""],PythonLexer:[3,1,1,""],Python3TracebackLexer:[3,1,1,""],Perl6Lexer:[3,1,1,""],MoonScriptLexer:[3,1,1,""],RubyConsoleLexer:[3,1,1,""],HyLexer:[3,1,1,""],PythonConsoleLexer:[3,1,1,""],PerlLexer:[3,1,1,""],PythonTracebackLexer:[3,1,1,""],RubyLexer:[3,1,1,""],TclLexer:[3,1,1,""]},pygments:{styles:[21,0,0,"-"],format:[21,5,1,""],lexer:[21,0,0,"-"],formatters:[21,0,0,"-"],util:[21,0,0,"-"],token:[12,0,0,"-"],lex:[21,5,1,""],highlight:[21,5,1,""],formatter:[21,0,0,"-"],lexers:[21,0,0,"-"]},"pygments.lexers.jvm":{GosuLexer:[3,1,1,""],ScalaLexer:[3,1,1,""],GroovyLexer:[3,1,1,""],KotlinLexer:[3,1,1,""],CeylonLexer:[3,1,1,""],GosuTemplateLexer:[3,1,1,""],XtendLexer:[3,1,1,""],IokeLexer:[3,1,1,""],ClojureLexer:[3,1,1,""],JavaLexer:[3,1,1,""],AspectJLexer:[3,1,1,""]},"pygments.lexers.sql":{SqliteConsoleLexer:[3,1,1,""],SqlLexer:[3,1,1,""],MySqlLexer:[3,1,1,""],PostgresLexer:[3,1,1,""],PostgresConsoleLexer:[3,1,1,""],PlPgsqlLexer:[3,1,1,""]},"pygments.formatter":{Formatter:[21,1,1,""]}},titleterms:{oper:12,all:[10,3],code:3,help:0,over:3,rest:19,own:[17,1,7,16],languag:[10,3,15],web:3,style:[0,15,17,7],program:[10,15],jvm:3,entrypoint:5,non:3,sourc:[6,3],contribut:8,variou:[3,13],get:[0,7],handl:1,faq:15,punctuat:12,report:15,requir:15,introduct:23,name:[0,15,12],changelog:14,level:21,list:[11,1,7],html:17,iter:3,token:[1,12],session:3,common:9,unicod:18,complet:13,where:15,pygment:[20,13,14,3,15,21,4,22,19],compil:3,agil:3,download:6,engin:3,special:3,trick:1,deleg:1,definit:17,subclass:[1,16],state:1,version:[6,14],hardwar:3,"new":[15,1],net:3,math:3,core:5,full:[21,11],deriv:1,extend:5,advanc:1,gener:[0,17,3,12],usag:23,pygtk:13,moinmoin:22,from:[15,1],come:15,bash:13,plugin:5,dalvik:3,lexer:[21,23,0,1,3],filter:[0,2,16],chang:1,interact:3,comment:12,markdown:13,onc:1,encod:[0,18],api:21,contributor:11,instal:6,your:[17,1,16],regex:1,guess:23,java:4,stream:1,foxpro:3,modifi:1,support:[10,15],regist:5,system:15,avail:[3,9,7],wordpress:13,regexlex:1,"0rc1":14,type:3,"function":3,shell:3,option:[21,23,0,9],relat:3,"6rc1":14,visual:3,line:[23,0],bug:15,keyword:[1,12],formatt:[21,23,9,17],descriptor:3,note:0,can:15,featur:15,quickstart:[23,17],creat:7,scan:1,process:[21,15],parser:3,templat:[10,3],high:21,packag:6,liter:12,file:3,interfac:0,extendedregexlex:1,assembl:3,decor:16,develop:6,welcom:8,want:15,author:8,suggest:15,make:15,write:[17,1,16],how:[15,5],builtin:[12,2,7],other:[10,3],lookup:23,test:1,document:[19,20],simpl:3,architectur:23,dialect:3,who:15,what:15,textmat:13,sql:3,multipl:1,"class":[9,1],scenario:13,markup:[10,3],flag:1,rule:7,doe:15,callback:1,exampl:23,command:[23,0],thi:15,microsoft:3}})
\ No newline at end of file
* If you give an ``outencoding`` option, it will override ``encoding``
as the output encoding.
+* If you give an ``inencoding`` option, it will override ``encoding``
+ as the input encoding.
+
* If you don't give an encoding and have given an output file, the default
- encoding for lexer and formatter is ``latin1`` (which will pass through
- all non-ASCII characters).
+ encoding for lexer and formatter is the terminal encoding or the default
+ locale encoding of the system. As a last resort, ``latin1`` is used (which
+ will pass through all non-ASCII characters).
* If you don't give an encoding and haven't given an output file (that means
output is written to the console), the default encoding for lexer and
`encoding`
If given, must be an encoding name (such as ``"utf-8"``). This encoding
will be used to convert the input string to Unicode (if it is not already
- a Unicode string). The default is ``"latin1"``.
+ a Unicode string). The default is ``"guess"``.
If this option is set to ``"guess"``, a simple UTF-8 vs. Latin-1
detection is used, if it is set to ``"chardet"``, the
you might encounter the occasional :exc:`UnicodeDecodeError` if you pass strings
with the wrong encoding.
-Per default all lexers have their input encoding set to `latin1`.
-If you pass a lexer a string object (not unicode), it tries to decode the data
-using this encoding.
-You can override the encoding using the `encoding` lexer option. If you have the
-`chardet`_ library installed and set the encoding to ``chardet`` if will ananlyse
-the text and use the encoding it thinks is the right one automatically:
+Per default all lexers have their input encoding set to `guess`. This means
+that the following encodings are tried:
+
+* UTF-8 (including BOM handling)
+* The locale encoding (i.e. the result of `locale.getpreferredencoding()`)
+* As a last resort, `latin1`
+
+If you pass a lexer a byte string object (not unicode), it tries to decode the
+data using this encoding.
+
+You can override the encoding using the `encoding` or `inencoding` lexer
+options. If you have the `chardet`_ library installed and set the encoding to
+``chardet`` if will ananlyse the text and use the encoding it thinks is the
+right one automatically:
.. sourcecode:: python
:license: BSD, see LICENSE for details.
"""
-__version__ = '2.0rc1'
+__version__ = '2.0'
__docformat__ = 'restructuredtext'
__all__ = ['lex', 'format', 'highlight']
return 1
# read input code
+ code = None
+
if args:
if len(args) > 1:
print(usage, file=sys.stderr)
dict(docclass = self.docclass,
preamble = self.preamble,
title = self.title,
- encoding = self.encoding or 'latin1',
+ encoding = self.encoding or 'utf8',
styledefs = self.get_style_defs(),
code = outfile.getvalue()))
Formatter.__init__(self, **options)
# We ignore self.encoding if it is set, since it gets set for lexer
# and formatter if given with -Oencoding on the command line.
+ # The RawTokenFormatter outputs only ASCII. Override here.
self.encoding = 'ascii' # let pygments.format() do the right thing
self.compress = get_choice_opt(options, 'compress',
['', 'none', 'gz', 'bz2'], '')
filenames = ['*.rtf']
def __init__(self, **options):
- """
+ r"""
Additional options accepted:
``fontface``
``encoding``
If given, must be an encoding name. This encoding will be used to
convert the input string to Unicode, if it is not already a Unicode
- string (default: ``'latin1'``).
- Can also be ``'guess'`` to use a simple UTF-8 / Locale / Latin1
- detection, or ``'chardet'`` to use the chardet library, if it is
- installed.
+ string (default: ``'guess'``, which uses a simple UTF-8 / Locale /
+ Latin1 detection. Can also be ``'chardet'`` to use the chardet
+ library, if it is installed.
``inencoding``
Overrides the ``encoding`` if given.
"""
self.stripall = get_bool_opt(options, 'stripall', False)
self.ensurenl = get_bool_opt(options, 'ensurenl', True)
self.tabsize = get_int_opt(options, 'tabsize', 0)
- self.encoding = options.get('encoding', 'latin1')
+ self.encoding = options.get('encoding', 'guess')
self.encoding = options.get('inencoding') or self.encoding
self.filters = []
for filter_ in get_list_opt(options, 'filters', ()):
str(tdef)))
continue
if isinstance(tdef, _inherit):
- # processed already
+ # should be processed already, but may not in the case of:
+ # 1. the state has no counterpart in any parent
+ # 2. the state includes more than one 'inherit'
continue
if isinstance(tdef, default):
new_state = cls._process_new_state(tdef.state, unprocessed, processed)
"""
tokens = {}
inheritable = {}
- for c in itertools.chain((cls,), cls.__mro__):
+ for c in cls.__mro__:
toks = c.__dict__.get('tokens', {})
for state, items in iteritems(toks):
curitems = tokens.get(state)
if curitems is None:
+ # N.b. because this is assigned by reference, sufficiently
+ # deep hierarchies are processed incrementally (e.g. for
+ # A(B), B(C), C(RegexLexer), B will be premodified so X(B)
+ # will not see any inherits in B).
tokens[state] = items
try:
inherit_ndx = items.index(inherit)
# Replace the "inherit" value with the items
curitems[inherit_ndx:inherit_ndx+1] = items
try:
+ # N.b. this is the index in items (that is, the superclass
+ # copy), so offset required when storing below.
new_inh_ndx = items.index(inherit)
except ValueError:
pass
from pygments.lexers._mapping import LEXERS
from pygments.modeline import get_filetype_from_buffer
from pygments.plugin import find_plugin_lexers
-from pygments.util import ClassNotFound, itervalues
+from pygments.util import ClassNotFound, itervalues, guess_decode
__all__ = ['get_lexer_by_name', 'get_lexer_for_filename', 'find_lexer_class',
if sys.version_info > (3,) and isinstance(code, bytes):
# decode it, since all analyse_text functions expect unicode
- code = code.decode('latin1')
+ code = guess_decode(code)
def get_rating(info):
cls, filename = info
<pygments.lexers.templates.CssPhpLexer object at 0xb7ba518c>
"""
fn = basename(_fn)
- primary = None
+ primary = {}
matching_lexers = set()
for lexer in _iter_lexerclasses():
for filename in lexer.filenames:
if _fn_matches(fn, filename):
matching_lexers.add(lexer)
- primary = lexer
+ primary[lexer] = True
for filename in lexer.alias_filenames:
if _fn_matches(fn, filename):
matching_lexers.add(lexer)
+ primary[lexer] = False
if not matching_lexers:
raise ClassNotFound('no lexer for filename %r found' % fn)
if len(matching_lexers) == 1:
return lexer(**options)
result.append((rv, lexer))
- # since py3 can no longer sort by class name by default, here is the
- # sorting function that works in both
- def type_sort(type_):
- return (type_[0], type_[1].__name__)
+ def type_sort(t):
+ # sort by:
+ # - analyse score
+ # - is primary filename pattern?
+ # - priority
+ # - last resort: class name
+ return (t[0], primary[t[1]], t[1].priority, t[1].__name__)
result.sort(key=type_sort)
- if not result[-1][0] and primary is not None:
- return primary(**options)
return result[-1][1](**options)
--- /dev/null
+# -*- coding: utf-8 -*-
+"""
+ pygments.lexers._mql_builtins
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Builtins for the MqlLexer.
+
+ :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+types = (
+ 'AccountBalance',
+ 'AccountCompany',
+ 'AccountCredit',
+ 'AccountCurrency',
+ 'AccountEquity',
+ 'AccountFreeMarginCheck',
+ 'AccountFreeMarginMode',
+ 'AccountFreeMargin',
+ 'AccountInfoDouble',
+ 'AccountInfoInteger',
+ 'AccountInfoString',
+ 'AccountLeverage',
+ 'AccountMargin',
+ 'AccountName',
+ 'AccountNumber',
+ 'AccountProfit',
+ 'AccountServer',
+ 'AccountStopoutLevel',
+ 'AccountStopoutMode',
+ 'Alert',
+ 'ArrayBsearch',
+ 'ArrayCompare',
+ 'ArrayCopyRates',
+ 'ArrayCopySeries',
+ 'ArrayCopy',
+ 'ArrayDimension',
+ 'ArrayFill',
+ 'ArrayFree',
+ 'ArrayGetAsSeries',
+ 'ArrayInitialize',
+ 'ArrayIsDynamic',
+ 'ArrayIsSeries',
+ 'ArrayMaximum',
+ 'ArrayMinimum',
+ 'ArrayRange',
+ 'ArrayResize',
+ 'ArraySetAsSeries',
+ 'ArraySize',
+ 'ArraySort',
+ 'CharArrayToString',
+ 'CharToString',
+ 'CharToStr',
+ 'CheckPointer',
+ 'ColorToARGB',
+ 'ColorToString',
+ 'Comment',
+ 'CopyClose',
+ 'CopyHigh',
+ 'CopyLow',
+ 'CopyOpen',
+ 'CopyRates',
+ 'CopyRealVolume',
+ 'CopySpread',
+ 'CopyTickVolume',
+ 'CopyTime',
+ 'DayOfWeek',
+ 'DayOfYear',
+ 'Day',
+ 'DebugBreak',
+ 'Digits',
+ 'DoubleToString',
+ 'DoubleToStr',
+ 'EnumToString',
+ 'EventChartCustom',
+ 'EventKillTimer',
+ 'EventSetMillisecondTimer',
+ 'EventSetTimer',
+ 'ExpertRemove',
+ 'FileClose',
+ 'FileCopy',
+ 'FileDelete',
+ 'FileFindClose',
+ 'FileFindFirst',
+ 'FileFindNext',
+ 'FileFlush',
+ 'FileGetInteger',
+ 'FileIsEnding',
+ 'FileIsExist',
+ 'FileIsLineEnding',
+ 'FileMove',
+ 'FileOpenHistory',
+ 'FileOpen',
+ 'FileReadArray',
+ 'FileReadBool',
+ 'FileReadDatetime',
+ 'FileReadDouble',
+ 'FileReadFloat',
+ 'FileReadInteger',
+ 'FileReadLong',
+ 'FileReadNumber',
+ 'FileReadString',
+ 'FileReadStruct',
+ 'FileSeek',
+ 'FileSize',
+ 'FileTell',
+ 'FileWriteArray',
+ 'FileWriteDouble',
+ 'FileWriteFloat',
+ 'FileWriteInteger',
+ 'FileWriteLong',
+ 'FileWriteString',
+ 'FileWriteStruct',
+ 'FileWrite',
+ 'FolderClean',
+ 'FolderCreate',
+ 'FolderDelete',
+ 'GetLastError',
+ 'GetPointer',
+ 'GetTickCount',
+ 'GlobalVariableCheck',
+ 'GlobalVariableDel',
+ 'GlobalVariableGet',
+ 'GlobalVariableName',
+ 'GlobalVariableSetOnCondition',
+ 'GlobalVariableSet',
+ 'GlobalVariableTemp',
+ 'GlobalVariableTime',
+ 'GlobalVariablesDeleteAll',
+ 'GlobalVariablesFlush',
+ 'GlobalVariablesTotal',
+ 'HideTestIndicators',
+ 'Hour',
+ 'IndicatorBuffers',
+ 'IndicatorCounted',
+ 'IndicatorDigits',
+ 'IndicatorSetDouble',
+ 'IndicatorSetInteger',
+ 'IndicatorSetString',
+ 'IndicatorShortName',
+ 'IntegerToString',
+ 'IsConnected',
+ 'IsDemo',
+ 'IsDllsAllowed',
+ 'IsExpertEnabled',
+ 'IsLibrariesAllowed',
+ 'IsOptimization',
+ 'IsStopped',
+ 'IsTesting',
+ 'IsTradeAllowed',
+ 'IsTradeContextBusy',
+ 'IsVisualMode',
+ 'MQLInfoInteger',
+ 'MQLInfoString',
+ 'MarketInfo',
+ 'MathAbs',
+ 'MathArccos',
+ 'MathArcsin',
+ 'MathArctan',
+ 'MathCeil',
+ 'MathCos',
+ 'MathExp',
+ 'MathFloor',
+ 'MathIsValidNumber',
+ 'MathLog',
+ 'MathMax',
+ 'MathMin',
+ 'MathMod',
+ 'MathPow',
+ 'MathRand',
+ 'MathRound',
+ 'MathSin',
+ 'MathSqrt',
+ 'MathSrand',
+ 'MathTan',
+ 'MessageBox',
+ 'Minute',
+ 'Month',
+ 'NormalizeDouble',
+ 'ObjectCreate',
+ 'ObjectDelete',
+ 'ObjectDescription',
+ 'ObjectFind',
+ 'ObjectGetDouble',
+ 'ObjectGetFiboDescription',
+ 'ObjectGetInteger',
+ 'ObjectGetShiftByValue',
+ 'ObjectGetString',
+ 'ObjectGetTimeByValue',
+ 'ObjectGetValueByShift',
+ 'ObjectGetValueByTime',
+ 'ObjectGet',
+ 'ObjectMove',
+ 'ObjectName',
+ 'ObjectSetDouble',
+ 'ObjectSetFiboDescription',
+ 'ObjectSetInteger',
+ 'ObjectSetString',
+ 'ObjectSetText',
+ 'ObjectSet',
+ 'ObjectType',
+ 'ObjectsDeleteAll',
+ 'ObjectsTotal',
+ 'OrderCloseBy',
+ 'OrderClosePrice',
+ 'OrderCloseTime',
+ 'OrderClose',
+ 'OrderComment',
+ 'OrderCommission',
+ 'OrderDelete',
+ 'OrderExpiration',
+ 'OrderLots',
+ 'OrderMagicNumber',
+ 'OrderModify',
+ 'OrderOpenPrice',
+ 'OrderOpenTime',
+ 'OrderPrint',
+ 'OrderProfit',
+ 'OrderSelect',
+ 'OrderSend',
+ 'OrderStopLoss',
+ 'OrderSwap',
+ 'OrderSymbol',
+ 'OrderTakeProfit',
+ 'OrderTicket',
+ 'OrderType',
+ 'OrdersHistoryTotal',
+ 'OrdersTotal',
+ 'PeriodSeconds',
+ 'Period',
+ 'PlaySound',
+ 'Point',
+ 'PrintFormat',
+ 'Print',
+ 'RefreshRates',
+ 'ResetLastError',
+ 'ResourceCreate',
+ 'ResourceFree',
+ 'ResourceReadImage',
+ 'ResourceSave',
+ 'Seconds',
+ 'SendFTP',
+ 'SendMail',
+ 'SendNotification',
+ 'SeriesInfoInteger',
+ 'SetIndexArrow',
+ 'SetIndexBuffer',
+ 'SetIndexDrawBegin',
+ 'SetIndexEmptyValue',
+ 'SetIndexLabel',
+ 'SetIndexShift',
+ 'SetIndexStyle',
+ 'SetLevelStyle',
+ 'SetLevelValue',
+ 'ShortArrayToString',
+ 'ShortToString',
+ 'Sleep',
+ 'StrToDouble',
+ 'StrToInteger',
+ 'StrToTime',
+ 'StringAdd',
+ 'StringBufferLen',
+ 'StringCompare',
+ 'StringConcatenate',
+ 'StringFill',
+ 'StringFind',
+ 'StringFormat',
+ 'StringGetCharacter',
+ 'StringGetChar',
+ 'StringInit',
+ 'StringLen',
+ 'StringReplace',
+ 'StringSetCharacter',
+ 'StringSetChar',
+ 'StringSplit',
+ 'StringSubstr',
+ 'StringToCharArray',
+ 'StringToColor',
+ 'StringToDouble',
+ 'StringToInteger',
+ 'StringToLower',
+ 'StringToShortArray',
+ 'StringToTime',
+ 'StringToUpper',
+ 'StringTrimLeft',
+ 'StringTrimRight',
+ 'StructToTime',
+ 'SymbolInfoDouble',
+ 'SymbolInfoInteger',
+ 'SymbolInfoSessionQuote',
+ 'SymbolInfoSessionTrade',
+ 'SymbolInfoString',
+ 'SymbolInfoTick',
+ 'SymbolIsSynchronized',
+ 'SymbolName',
+ 'SymbolSelect',
+ 'SymbolsTotal',
+ 'Symbol',
+ 'TerminalClose',
+ 'TerminalCompany',
+ 'TerminalName',
+ 'TerminalPath',
+ 'TesterStatistics',
+ 'TextGetSize',
+ 'TextOut',
+ 'TextSetFont',
+ 'TimeCurrent',
+ 'TimeDayOfWeek',
+ 'TimeDayOfYear',
+ 'TimeDaylightSavings',
+ 'TimeDay',
+ 'TimeGMTOffset',
+ 'TimeGMT',
+ 'TimeHour',
+ 'TimeLocal',
+ 'TimeMinute',
+ 'TimeMonth',
+ 'TimeSeconds',
+ 'TimeToString',
+ 'TimeToStruct',
+ 'TimeToStr',
+ 'TimeTradeServer',
+ 'TimeYear',
+ 'UninitializeReason',
+ 'WindowBarsPerChart',
+ 'WindowExpertName',
+ 'WindowFind',
+ 'WindowFirstVisibleBar',
+ 'WindowHandle',
+ 'WindowIsVisible',
+ 'WindowOnDropped',
+ 'WindowPriceMax',
+ 'WindowPriceMin',
+ 'WindowPriceOnDropped',
+ 'WindowRedraw',
+ 'WindowScreenShot',
+ 'WindowTimeOnDropped',
+ 'WindowXOnDropped',
+ 'WindowYOnDropped',
+ 'WindowsTotal',
+ 'Year',
+ 'ZeroMemory',
+ 'iAC',
+ 'iADX',
+ 'iAD',
+ 'iAO',
+ 'iATR',
+ 'iAlligator',
+ 'iBWMFI',
+ 'iBandsOnArray',
+ 'iBands',
+ 'iBarShift',
+ 'iBars',
+ 'iBearsPower',
+ 'iBullsPower',
+ 'iCCIOnArray',
+ 'iCCI',
+ 'iClose',
+ 'iCustom',
+ 'iDeMarker',
+ 'iEnvelopesOnArray',
+ 'iEnvelopes',
+ 'iForce',
+ 'iFractals',
+ 'iGator',
+ 'iHighest',
+ 'iHigh',
+ 'iIchimoku',
+ 'iLowest',
+ 'iLow',
+ 'iMACD',
+ 'iMAOnArray',
+ 'iMA',
+ 'iMFI',
+ 'iMomentumOnArray',
+ 'iMomentum',
+ 'iOBV',
+ 'iOpen',
+ 'iOsMA',
+ 'iRSIOnArray',
+ 'iRSI',
+ 'iRVI',
+ 'iSAR',
+ 'iStdDevOnArray',
+ 'iStdDev',
+ 'iStochastic',
+ 'iTime',
+ 'iVolume',
+ 'iWPR',
+)
+
+constants = (
+ 'ACCOUNT_BALANCE',
+ 'ACCOUNT_COMPANY',
+ 'ACCOUNT_CREDIT',
+ 'ACCOUNT_CURRENCY',
+ 'ACCOUNT_EQUITY',
+ 'ACCOUNT_FREEMARGIN',
+ 'ACCOUNT_LEVERAGE',
+ 'ACCOUNT_LIMIT_ORDERS',
+ 'ACCOUNT_LOGIN',
+ 'ACCOUNT_MARGIN',
+ 'ACCOUNT_MARGIN_LEVEL',
+ 'ACCOUNT_MARGIN_SO_CALL',
+ 'ACCOUNT_MARGIN_SO_MODE',
+ 'ACCOUNT_MARGIN_SO_SO',
+ 'ACCOUNT_NAME',
+ 'ACCOUNT_PROFIT',
+ 'ACCOUNT_SERVER',
+ 'ACCOUNT_STOPOUT_MODE_MONEY',
+ 'ACCOUNT_STOPOUT_MODE_PERCENT',
+ 'ACCOUNT_TRADE_ALLOWED',
+ 'ACCOUNT_TRADE_EXPERT',
+ 'ACCOUNT_TRADE_MODE',
+ 'ACCOUNT_TRADE_MODE_CONTEST',
+ 'ACCOUNT_TRADE_MODE_DEMO',
+ 'ACCOUNT_TRADE_MODE_REAL',
+ 'ALIGN_CENTER',
+ 'ALIGN_LEFT',
+ 'ALIGN_RIGHT',
+ 'ANCHOR_BOTTOM',
+ 'ANCHOR_CENTER',
+ 'ANCHOR_LEFT',
+ 'ANCHOR_LEFT_LOWER',
+ 'ANCHOR_LEFT_UPPER',
+ 'ANCHOR_LOWER',
+ 'ANCHOR_RIGHT',
+ 'ANCHOR_RIGHT_LOWER',
+ 'ANCHOR_RIGHT_UPPER',
+ 'ANCHOR_TOP',
+ 'ANCHOR_UPPER',
+ 'BORDER_FLAT',
+ 'BORDER_RAISED',
+ 'BORDER_SUNKEN',
+ 'CHARTEVENT_CHART_CHANGE',
+ 'CHARTEVENT_CLICK',
+ 'CHARTEVENT_CUSTOM',
+ 'CHARTEVENT_CUSTOM_LAST',
+ 'CHARTEVENT_KEYDOWN',
+ 'CHARTEVENT_MOUSE_MOVE',
+ 'CHARTEVENT_OBJECT_CHANGE',
+ 'CHARTEVENT_OBJECT_CLICK',
+ 'CHARTEVENT_OBJECT_CREATE',
+ 'CHARTEVENT_OBJECT_DELETE',
+ 'CHARTEVENT_OBJECT_DRAG',
+ 'CHARTEVENT_OBJECT_ENDEDIT',
+ 'CHARTS_MAX',
+ 'CHART_AUTOSCROLL',
+ 'CHART_BARS',
+ 'CHART_BEGIN',
+ 'CHART_BRING_TO_TOP',
+ 'CHART_CANDLES',
+ 'CHART_COLOR_ASK',
+ 'CHART_COLOR_BACKGROUND',
+ 'CHART_COLOR_BID',
+ 'CHART_COLOR_CANDLE_BEAR',
+ 'CHART_COLOR_CANDLE_BULL',
+ 'CHART_COLOR_CHART_DOWN',
+ 'CHART_COLOR_CHART_LINE',
+ 'CHART_COLOR_CHART_UP',
+ 'CHART_COLOR_FOREGROUND',
+ 'CHART_COLOR_GRID',
+ 'CHART_COLOR_LAST',
+ 'CHART_COLOR_STOP_LEVEL',
+ 'CHART_COLOR_VOLUME',
+ 'CHART_COMMENT',
+ 'CHART_CURRENT_POS',
+ 'CHART_DRAG_TRADE_LEVELS',
+ 'CHART_END',
+ 'CHART_EVENT_MOUSE_MOVE',
+ 'CHART_EVENT_OBJECT_CREATE',
+ 'CHART_EVENT_OBJECT_DELETE',
+ 'CHART_FIRST_VISIBLE_BAR',
+ 'CHART_FIXED_MAX',
+ 'CHART_FIXED_MIN',
+ 'CHART_FIXED_POSITION',
+ 'CHART_FOREGROUND',
+ 'CHART_HEIGHT_IN_PIXELS',
+ 'CHART_IS_OBJECT',
+ 'CHART_LINE',
+ 'CHART_MODE',
+ 'CHART_MOUSE_SCROLL',
+ 'CHART_POINTS_PER_BAR',
+ 'CHART_PRICE_MAX',
+ 'CHART_PRICE_MIN',
+ 'CHART_SCALEFIX',
+ 'CHART_SCALEFIX_11',
+ 'CHART_SCALE',
+ 'CHART_SCALE_PT_PER_BAR',
+ 'CHART_SHIFT',
+ 'CHART_SHIFT_SIZE',
+ 'CHART_SHOW_ASK_LINE',
+ 'CHART_SHOW_BID_LINE',
+ 'CHART_SHOW_DATE_SCALE',
+ 'CHART_SHOW_GRID',
+ 'CHART_SHOW_LAST_LINE',
+ 'CHART_SHOW_OBJECT_DESCR',
+ 'CHART_SHOW_OHLC',
+ 'CHART_SHOW_PERIOD_SEP',
+ 'CHART_SHOW_PRICE_SCALE',
+ 'CHART_SHOW_TRADE_LEVELS',
+ 'CHART_SHOW_VOLUMES',
+ 'CHART_VISIBLE_BARS',
+ 'CHART_VOLUME_HIDE',
+ 'CHART_VOLUME_REAL',
+ 'CHART_VOLUME_TICK',
+ 'CHART_WIDTH_IN_BARS',
+ 'CHART_WIDTH_IN_PIXELS',
+ 'CHART_WINDOWS_TOTAL',
+ 'CHART_WINDOW_HANDLE',
+ 'CHART_WINDOW_IS_VISIBLE',
+ 'CHART_WINDOW_YDISTANCE',
+ 'CHAR_MAX',
+ 'CHAR_MIN',
+ 'CLR_NONE',
+ 'CORNER_LEFT_LOWER',
+ 'CORNER_LEFT_UPPER',
+ 'CORNER_RIGHT_LOWER',
+ 'CORNER_RIGHT_UPPER',
+ 'CP_ACP',
+ 'CP_MACCP',
+ 'CP_OEMCP',
+ 'CP_SYMBOL',
+ 'CP_THREAD_ACP',
+ 'CP_UTF7',
+ 'CP_UTF8',
+ 'DBL_DIG',
+ 'DBL_EPSILON',
+ 'DBL_MANT_DIG',
+ 'DBL_MAX',
+ 'DBL_MAX_10_EXP',
+ 'DBL_MAX_EXP',
+ 'DBL_MIN',
+ 'DBL_MIN_10_EXP',
+ 'DBL_MIN_EXP',
+ 'DRAW_ARROW',
+ 'DRAW_FILLING',
+ 'DRAW_HISTOGRAM',
+ 'DRAW_LINE',
+ 'DRAW_NONE',
+ 'DRAW_SECTION',
+ 'DRAW_ZIGZAG',
+ 'EMPTY',
+ 'EMPTY_VALUE',
+ 'ERR_ACCOUNT_DISABLED',
+ 'ERR_BROKER_BUSY',
+ 'ERR_COMMON_ERROR',
+ 'ERR_INVALID_ACCOUNT',
+ 'ERR_INVALID_PRICE',
+ 'ERR_INVALID_STOPS',
+ 'ERR_INVALID_TRADE_PARAMETERS',
+ 'ERR_INVALID_TRADE_VOLUME',
+ 'ERR_LONG_POSITIONS_ONLY_ALLOWED',
+ 'ERR_MALFUNCTIONAL_TRADE',
+ 'ERR_MARKET_CLOSED',
+ 'ERR_NOT_ENOUGH_MONEY',
+ 'ERR_NOT_ENOUGH_RIGHTS',
+ 'ERR_NO_CONNECTION',
+ 'ERR_NO_ERROR',
+ 'ERR_NO_RESULT',
+ 'ERR_OFF_QUOTES',
+ 'ERR_OLD_VERSION',
+ 'ERR_ORDER_LOCKED',
+ 'ERR_PRICE_CHANGED',
+ 'ERR_REQUOTE',
+ 'ERR_SERVER_BUSY',
+ 'ERR_TOO_FREQUENT_REQUESTS',
+ 'ERR_TOO_MANY_REQUESTS',
+ 'ERR_TRADE_CONTEXT_BUSY',
+ 'ERR_TRADE_DISABLED',
+ 'ERR_TRADE_EXPIRATION_DENIED',
+ 'ERR_TRADE_HEDGE_PROHIBITED',
+ 'ERR_TRADE_MODIFY_DENIED',
+ 'ERR_TRADE_PROHIBITED_BY_FIFO',
+ 'ERR_TRADE_TIMEOUT',
+ 'ERR_TRADE_TOO_MANY_ORDERS',
+ 'FILE_ACCESS_DATE',
+ 'FILE_ANSI',
+ 'FILE_BIN',
+ 'FILE_COMMON',
+ 'FILE_CREATE_DATE',
+ 'FILE_CSV',
+ 'FILE_END',
+ 'FILE_EXISTS',
+ 'FILE_IS_ANSI',
+ 'FILE_IS_BINARY',
+ 'FILE_IS_COMMON',
+ 'FILE_IS_CSV',
+ 'FILE_IS_READABLE',
+ 'FILE_IS_TEXT',
+ 'FILE_IS_WRITABLE',
+ 'FILE_LINE_END',
+ 'FILE_MODIFY_DATE',
+ 'FILE_POSITION',
+ 'FILE_READ',
+ 'FILE_REWRITE',
+ 'FILE_SHARE_READ',
+ 'FILE_SHARE_WRITE',
+ 'FILE_SIZE',
+ 'FILE_TXT',
+ 'FILE_UNICODE',
+ 'FILE_WRITE',
+ 'FLT_DIG',
+ 'FLT_EPSILON',
+ 'FLT_MANT_DIG',
+ 'FLT_MAX',
+ 'FLT_MAX_10_EXP',
+ 'FLT_MAX_EXP',
+ 'FLT_MIN',
+ 'FLT_MIN_10_EXP',
+ 'FLT_MIN_EXP',
+ 'FRIDAY',
+ 'GANN_DOWN_TREND',
+ 'GANN_UP_TREND',
+ 'IDABORT',
+ 'IDCANCEL',
+ 'IDCONTINUE',
+ 'IDIGNORE',
+ 'IDNO',
+ 'IDOK',
+ 'IDRETRY',
+ 'IDTRYAGAIN',
+ 'IDYES',
+ 'INDICATOR_CALCULATIONS',
+ 'INDICATOR_COLOR_INDEX',
+ 'INDICATOR_DATA',
+ 'INDICATOR_DIGITS',
+ 'INDICATOR_HEIGHT',
+ 'INDICATOR_LEVELCOLOR',
+ 'INDICATOR_LEVELSTYLE',
+ 'INDICATOR_LEVELS',
+ 'INDICATOR_LEVELTEXT',
+ 'INDICATOR_LEVELVALUE',
+ 'INDICATOR_LEVELWIDTH',
+ 'INDICATOR_MAXIMUM',
+ 'INDICATOR_MINIMUM',
+ 'INDICATOR_SHORTNAME',
+ 'INT_MAX',
+ 'INT_MIN',
+ 'INVALID_HANDLE',
+ 'IS_DEBUG_MODE',
+ 'IS_PROFILE_MODE',
+ 'LICENSE_DEMO',
+ 'LICENSE_FREE',
+ 'LICENSE_FULL',
+ 'LICENSE_TIME',
+ 'LONG_MAX',
+ 'LONG_MIN',
+ 'MB_ABORTRETRYIGNORE',
+ 'MB_CANCELTRYCONTINUE',
+ 'MB_DEFBUTTON1',
+ 'MB_DEFBUTTON2',
+ 'MB_DEFBUTTON3',
+ 'MB_DEFBUTTON4',
+ 'MB_ICONASTERISK',
+ 'MB_ICONERROR',
+ 'MB_ICONEXCLAMATION',
+ 'MB_ICONHAND',
+ 'MB_ICONINFORMATION',
+ 'MB_ICONQUESTION',
+ 'MB_ICONSTOP',
+ 'MB_ICONWARNING',
+ 'MB_OKCANCEL',
+ 'MB_OK',
+ 'MB_RETRYCANCEL',
+ 'MB_YESNOCANCEL',
+ 'MB_YESNO',
+ 'MODE_ASK',
+ 'MODE_BID',
+ 'MODE_CHINKOUSPAN',
+ 'MODE_CLOSE',
+ 'MODE_DIGITS',
+ 'MODE_EMA',
+ 'MODE_EXPIRATION',
+ 'MODE_FREEZELEVEL',
+ 'MODE_GATORJAW',
+ 'MODE_GATORLIPS',
+ 'MODE_GATORTEETH',
+ 'MODE_HIGH',
+ 'MODE_KIJUNSEN',
+ 'MODE_LOTSIZE',
+ 'MODE_LOTSTEP',
+ 'MODE_LOWER',
+ 'MODE_LOW',
+ 'MODE_LWMA',
+ 'MODE_MAIN',
+ 'MODE_MARGINCALCMODE',
+ 'MODE_MARGINHEDGED',
+ 'MODE_MARGININIT',
+ 'MODE_MARGINMAINTENANCE',
+ 'MODE_MARGINREQUIRED',
+ 'MODE_MAXLOT',
+ 'MODE_MINLOT',
+ 'MODE_MINUSDI',
+ 'MODE_OPEN',
+ 'MODE_PLUSDI',
+ 'MODE_POINT',
+ 'MODE_PROFITCALCMODE',
+ 'MODE_SENKOUSPANA',
+ 'MODE_SENKOUSPANB',
+ 'MODE_SIGNAL',
+ 'MODE_SMA',
+ 'MODE_SMMA',
+ 'MODE_SPREAD',
+ 'MODE_STARTING',
+ 'MODE_STOPLEVEL',
+ 'MODE_SWAPLONG',
+ 'MODE_SWAPSHORT',
+ 'MODE_SWAPTYPE',
+ 'MODE_TENKANSEN',
+ 'MODE_TICKSIZE',
+ 'MODE_TICKVALUE',
+ 'MODE_TIME',
+ 'MODE_TRADEALLOWED',
+ 'MODE_UPPER',
+ 'MODE_VOLUME',
+ 'MONDAY',
+ 'MQL_DEBUG',
+ 'MQL_DLLS_ALLOWED',
+ 'MQL_FRAME_MODE',
+ 'MQL_LICENSE_TYPE',
+ 'MQL_OPTIMIZATION',
+ 'MQL_PROFILER',
+ 'MQL_PROGRAM_NAME',
+ 'MQL_PROGRAM_PATH',
+ 'MQL_PROGRAM_TYPE',
+ 'MQL_TESTER',
+ 'MQL_TRADE_ALLOWED',
+ 'MQL_VISUAL_MODE',
+ 'M_1_PI',
+ 'M_2_PI',
+ 'M_2_SQRTPI',
+ 'M_E',
+ 'M_LN2',
+ 'M_LN10',
+ 'M_LOG2E',
+ 'M_LOG10E',
+ 'M_PI',
+ 'M_PI_2',
+ 'M_PI_4',
+ 'M_SQRT1_2',
+ 'M_SQRT2',
+ 'NULL',
+ 'OBJPROP_ALIGN',
+ 'OBJPROP_ANCHOR',
+ 'OBJPROP_ANGLE',
+ 'OBJPROP_ARROWCODE',
+ 'OBJPROP_BACK',
+ 'OBJPROP_BGCOLOR',
+ 'OBJPROP_BMPFILE',
+ 'OBJPROP_BORDER_COLOR',
+ 'OBJPROP_BORDER_TYPE',
+ 'OBJPROP_CHART_ID',
+ 'OBJPROP_CHART_SCALE',
+ 'OBJPROP_COLOR',
+ 'OBJPROP_CORNER',
+ 'OBJPROP_CREATETIME',
+ 'OBJPROP_DATE_SCALE',
+ 'OBJPROP_DEVIATION',
+ 'OBJPROP_DRAWLINES',
+ 'OBJPROP_ELLIPSE',
+ 'OBJPROP_FIBOLEVELS',
+ 'OBJPROP_FILL',
+ 'OBJPROP_FIRSTLEVEL',
+ 'OBJPROP_FONTSIZE',
+ 'OBJPROP_FONT',
+ 'OBJPROP_HIDDEN',
+ 'OBJPROP_LEVELCOLOR',
+ 'OBJPROP_LEVELSTYLE',
+ 'OBJPROP_LEVELS',
+ 'OBJPROP_LEVELTEXT',
+ 'OBJPROP_LEVELVALUE',
+ 'OBJPROP_LEVELWIDTH',
+ 'OBJPROP_NAME',
+ 'OBJPROP_PERIOD',
+ 'OBJPROP_PRICE1',
+ 'OBJPROP_PRICE2',
+ 'OBJPROP_PRICE3',
+ 'OBJPROP_PRICE',
+ 'OBJPROP_PRICE_SCALE',
+ 'OBJPROP_RAY',
+ 'OBJPROP_RAY_RIGHT',
+ 'OBJPROP_READONLY',
+ 'OBJPROP_SCALE',
+ 'OBJPROP_SELECTABLE',
+ 'OBJPROP_SELECTED',
+ 'OBJPROP_STATE',
+ 'OBJPROP_STYLE',
+ 'OBJPROP_SYMBOL',
+ 'OBJPROP_TEXT',
+ 'OBJPROP_TIME1',
+ 'OBJPROP_TIME2',
+ 'OBJPROP_TIME3',
+ 'OBJPROP_TIMEFRAMES',
+ 'OBJPROP_TIME',
+ 'OBJPROP_TOOLTIP',
+ 'OBJPROP_TYPE',
+ 'OBJPROP_WIDTH',
+ 'OBJPROP_XDISTANCE',
+ 'OBJPROP_XOFFSET',
+ 'OBJPROP_XSIZE',
+ 'OBJPROP_YDISTANCE',
+ 'OBJPROP_YOFFSET',
+ 'OBJPROP_YSIZE',
+ 'OBJPROP_ZORDER',
+ 'OBJ_ALL_PERIODS',
+ 'OBJ_ARROW',
+ 'OBJ_ARROW_BUY',
+ 'OBJ_ARROW_CHECK',
+ 'OBJ_ARROW_DOWN',
+ 'OBJ_ARROW_LEFT_PRICE',
+ 'OBJ_ARROW_RIGHT_PRICE',
+ 'OBJ_ARROW_SELL',
+ 'OBJ_ARROW_STOP',
+ 'OBJ_ARROW_THUMB_DOWN',
+ 'OBJ_ARROW_THUMB_UP',
+ 'OBJ_ARROW_UP',
+ 'OBJ_BITMAP',
+ 'OBJ_BITMAP_LABEL',
+ 'OBJ_BUTTON',
+ 'OBJ_CHANNEL',
+ 'OBJ_CYCLES',
+ 'OBJ_EDIT',
+ 'OBJ_ELLIPSE',
+ 'OBJ_EVENT',
+ 'OBJ_EXPANSION',
+ 'OBJ_FIBOARC',
+ 'OBJ_FIBOCHANNEL',
+ 'OBJ_FIBOFAN',
+ 'OBJ_FIBOTIMES',
+ 'OBJ_FIBO',
+ 'OBJ_GANNFAN',
+ 'OBJ_GANNGRID',
+ 'OBJ_GANNLINE',
+ 'OBJ_HLINE',
+ 'OBJ_LABEL',
+ 'OBJ_NO_PERIODS',
+ 'OBJ_PERIOD_D1',
+ 'OBJ_PERIOD_H1',
+ 'OBJ_PERIOD_H4',
+ 'OBJ_PERIOD_M1',
+ 'OBJ_PERIOD_M5',
+ 'OBJ_PERIOD_M15',
+ 'OBJ_PERIOD_M30',
+ 'OBJ_PERIOD_MN1',
+ 'OBJ_PERIOD_W1',
+ 'OBJ_PITCHFORK',
+ 'OBJ_RECTANGLE',
+ 'OBJ_RECTANGLE_LABEL',
+ 'OBJ_REGRESSION',
+ 'OBJ_STDDEVCHANNEL',
+ 'OBJ_TEXT',
+ 'OBJ_TRENDBYANGLE',
+ 'OBJ_TREND',
+ 'OBJ_TRIANGLE',
+ 'OBJ_VLINE',
+ 'OP_BUYLIMIT',
+ 'OP_BUYSTOP',
+ 'OP_BUY',
+ 'OP_SELLLIMIT',
+ 'OP_SELLSTOP',
+ 'OP_SELL',
+ 'PERIOD_CURRENT',
+ 'PERIOD_D1',
+ 'PERIOD_H1',
+ 'PERIOD_H2',
+ 'PERIOD_H3',
+ 'PERIOD_H4',
+ 'PERIOD_H6',
+ 'PERIOD_H8',
+ 'PERIOD_H12',
+ 'PERIOD_M1',
+ 'PERIOD_M2',
+ 'PERIOD_M3',
+ 'PERIOD_M4',
+ 'PERIOD_M5',
+ 'PERIOD_M6',
+ 'PERIOD_M10',
+ 'PERIOD_M12',
+ 'PERIOD_M15',
+ 'PERIOD_M20',
+ 'PERIOD_M30',
+ 'PERIOD_MN1',
+ 'PERIOD_W1',
+ 'POINTER_AUTOMATIC',
+ 'POINTER_DYNAMIC',
+ 'POINTER_INVALID'
+ 'PRICE_CLOSE',
+ 'PRICE_HIGH',
+ 'PRICE_LOW',
+ 'PRICE_MEDIAN',
+ 'PRICE_OPEN',
+ 'PRICE_TYPICAL',
+ 'PRICE_WEIGHTED',
+ 'PROGRAM_EXPERT',
+ 'PROGRAM_INDICATOR',
+ 'PROGRAM_SCRIPT',
+ 'REASON_ACCOUNT',
+ 'REASON_CHARTCHANGE',
+ 'REASON_CHARTCLOSE',
+ 'REASON_CLOSE',
+ 'REASON_INITFAILED',
+ 'REASON_PARAMETERS',
+ 'REASON_PROGRAM'
+ 'REASON_RECOMPILE',
+ 'REASON_REMOVE',
+ 'REASON_TEMPLATE',
+ 'SATURDAY',
+ 'SEEK_CUR',
+ 'SEEK_END',
+ 'SEEK_SET',
+ 'SERIES_BARS_COUNT',
+ 'SERIES_FIRSTDATE',
+ 'SERIES_LASTBAR_DATE',
+ 'SERIES_SERVER_FIRSTDATE',
+ 'SERIES_SYNCHRONIZED',
+ 'SERIES_TERMINAL_FIRSTDATE',
+ 'SHORT_MAX',
+ 'SHORT_MIN',
+ 'STAT_BALANCEDD_PERCENT',
+ 'STAT_BALANCEMIN',
+ 'STAT_BALANCE_DDREL_PERCENT',
+ 'STAT_BALANCE_DD',
+ 'STAT_BALANCE_DD_RELATIVE',
+ 'STAT_CONLOSSMAX',
+ 'STAT_CONLOSSMAX_TRADES',
+ 'STAT_CONPROFITMAX',
+ 'STAT_CONPROFITMAX_TRADES',
+ 'STAT_CUSTOM_ONTESTER',
+ 'STAT_DEALS',
+ 'STAT_EQUITYDD_PERCENT',
+ 'STAT_EQUITYMIN',
+ 'STAT_EQUITY_DDREL_PERCENT',
+ 'STAT_EQUITY_DD',
+ 'STAT_EQUITY_DD_RELATIVE',
+ 'STAT_EXPECTED_PAYOFF',
+ 'STAT_GROSS_LOSS',
+ 'STAT_GROSS_PROFIT',
+ 'STAT_INITIAL_DEPOSIT',
+ 'STAT_LONG_TRADES',
+ 'STAT_LOSSTRADES_AVGCON',
+ 'STAT_LOSS_TRADES',
+ 'STAT_MAX_CONLOSSES',
+ 'STAT_MAX_CONLOSS_TRADES',
+ 'STAT_MAX_CONPROFIT_TRADES',
+ 'STAT_MAX_CONWINS',
+ 'STAT_MAX_LOSSTRADE',
+ 'STAT_MAX_PROFITTRADE',
+ 'STAT_MIN_MARGINLEVEL',
+ 'STAT_PROFITTRADES_AVGCON',
+ 'STAT_PROFIT',
+ 'STAT_PROFIT_FACTOR',
+ 'STAT_PROFIT_LONGTRADES',
+ 'STAT_PROFIT_SHORTTRADES',
+ 'STAT_PROFIT_TRADES',
+ 'STAT_RECOVERY_FACTOR',
+ 'STAT_SHARPE_RATIO',
+ 'STAT_SHORT_TRADES',
+ 'STAT_TRADES',
+ 'STAT_WITHDRAWAL',
+ 'STO_CLOSECLOSE',
+ 'STO_LOWHIGH',
+ 'STYLE_DASHDOTDOT',
+ 'STYLE_DASHDOT',
+ 'STYLE_DASH',
+ 'STYLE_DOT',
+ 'STYLE_SOLID',
+ 'SUNDAY',
+ 'SYMBOL_ARROWDOWN',
+ 'SYMBOL_ARROWUP',
+ 'SYMBOL_CHECKSIGN',
+ 'SYMBOL_LEFTPRICE',
+ 'SYMBOL_RIGHTPRICE',
+ 'SYMBOL_STOPSIGN',
+ 'SYMBOL_THUMBSDOWN',
+ 'SYMBOL_THUMBSUP',
+ 'TERMINAL_BUILD',
+ 'TERMINAL_CODEPAGE',
+ 'TERMINAL_COMMONDATA_PATH',
+ 'TERMINAL_COMPANY',
+ 'TERMINAL_CONNECTED',
+ 'TERMINAL_CPU_CORES',
+ 'TERMINAL_DATA_PATH',
+ 'TERMINAL_DISK_SPACE',
+ 'TERMINAL_DLLS_ALLOWED',
+ 'TERMINAL_EMAIL_ENABLED',
+ 'TERMINAL_FTP_ENABLED',
+ 'TERMINAL_LANGUAGE',
+ 'TERMINAL_MAXBARS',
+ 'TERMINAL_MEMORY_AVAILABLE',
+ 'TERMINAL_MEMORY_PHYSICAL',
+ 'TERMINAL_MEMORY_TOTAL',
+ 'TERMINAL_MEMORY_USED',
+ 'TERMINAL_NAME',
+ 'TERMINAL_OPENCL_SUPPORT',
+ 'TERMINAL_PATH',
+ 'TERMINAL_TRADE_ALLOWED',
+ 'TERMINAL_X64',
+ 'THURSDAY',
+ 'TRADE_ACTION_DEAL',
+ 'TRADE_ACTION_MODIFY',
+ 'TRADE_ACTION_PENDING',
+ 'TRADE_ACTION_REMOVE',
+ 'TRADE_ACTION_SLTP',
+ 'TUESDAY',
+ 'UCHAR_MAX',
+ 'UINT_MAX',
+ 'ULONG_MAX',
+ 'USHORT_MAX',
+ 'VOLUME_REAL',
+ 'VOLUME_TICK',
+ 'WEDNESDAY',
+ 'WHOLE_ARRAY',
+ 'WRONG_VALUE',
+ 'clrNONE',
+ '__DATETIME__',
+ '__DATE__',
+ '__FILE__',
+ '__FUNCSIG__',
+ '__FUNCTION__',
+ '__LINE__',
+ '__MQL4BUILD__',
+ '__MQLBUILD__',
+ '__PATH__',
+)
+
+colors = (
+ 'AliceBlue',
+ 'AntiqueWhite',
+ 'Aquamarine',
+ 'Aqua',
+ 'Beige',
+ 'Bisque',
+ 'Black',
+ 'BlanchedAlmond',
+ 'BlueViolet',
+ 'Blue',
+ 'Brown',
+ 'BurlyWood',
+ 'CadetBlue',
+ 'Chartreuse',
+ 'Chocolate',
+ 'Coral',
+ 'CornflowerBlue',
+ 'Cornsilk',
+ 'Crimson',
+ 'DarkBlue',
+ 'DarkGoldenrod',
+ 'DarkGray',
+ 'DarkGreen',
+ 'DarkKhaki',
+ 'DarkOliveGreen',
+ 'DarkOrange',
+ 'DarkOrchid',
+ 'DarkSalmon',
+ 'DarkSeaGreen',
+ 'DarkSlateBlue',
+ 'DarkSlateGray',
+ 'DarkTurquoise',
+ 'DarkViolet',
+ 'DeepPink',
+ 'DeepSkyBlue',
+ 'DimGray',
+ 'DodgerBlue',
+ 'FireBrick',
+ 'ForestGreen',
+ 'Gainsboro',
+ 'Goldenrod',
+ 'Gold',
+ 'Gray',
+ 'GreenYellow',
+ 'Green',
+ 'Honeydew',
+ 'HotPink',
+ 'IndianRed',
+ 'Indigo',
+ 'Ivory',
+ 'Khaki',
+ 'LavenderBlush',
+ 'Lavender',
+ 'LawnGreen',
+ 'LemonChiffon',
+ 'LightBlue',
+ 'LightCoral',
+ 'LightCyan',
+ 'LightGoldenrod',
+ 'LightGray',
+ 'LightGreen',
+ 'LightPink',
+ 'LightSalmon',
+ 'LightSeaGreen',
+ 'LightSkyBlue',
+ 'LightSlateGray',
+ 'LightSteelBlue',
+ 'LightYellow',
+ 'LimeGreen',
+ 'Lime',
+ 'Linen',
+ 'Magenta',
+ 'Maroon',
+ 'MediumAquamarine',
+ 'MediumBlue',
+ 'MediumOrchid',
+ 'MediumPurple',
+ 'MediumSeaGreen',
+ 'MediumSlateBlue',
+ 'MediumSpringGreen',
+ 'MediumTurquoise',
+ 'MediumVioletRed',
+ 'MidnightBlue',
+ 'MintCream',
+ 'MistyRose',
+ 'Moccasin',
+ 'NavajoWhite',
+ 'Navy',
+ 'OldLace',
+ 'OliveDrab',
+ 'Olive',
+ 'OrangeRed',
+ 'Orange',
+ 'Orchid',
+ 'PaleGoldenrod',
+ 'PaleGreen',
+ 'PaleTurquoise',
+ 'PaleVioletRed',
+ 'PapayaWhip',
+ 'PeachPuff',
+ 'Peru',
+ 'Pink',
+ 'Plum',
+ 'PowderBlue',
+ 'Purple',
+ 'Red',
+ 'RosyBrown',
+ 'RoyalBlue',
+ 'SaddleBrown',
+ 'Salmon',
+ 'SandyBrown',
+ 'SeaGreen',
+ 'Seashell',
+ 'Sienna',
+ 'Silver',
+ 'SkyBlue',
+ 'SlateBlue',
+ 'SlateGray',
+ 'Snow',
+ 'SpringGreen',
+ 'SteelBlue',
+ 'Tan',
+ 'Teal',
+ 'Thistle',
+ 'Tomato',
+ 'Turquoise',
+ 'Violet',
+ 'Wheat',
+ 'WhiteSmoke',
+ 'White',
+ 'YellowGreen',
+ 'Yellow',
+)
+
+keywords = (
+ 'input', '_Digits', '_Point', '_LastError', '_Period', '_RandomSeed',
+ '_StopFlag', '_Symbol', '_UninitReason', 'Ask', 'Bars', 'Bid',
+ 'Close', 'Digits', 'High', 'Low', 'Open', 'Point', 'Time',
+ 'Volume',
+)
+c_types = (
+ 'void', 'char', 'uchar', 'bool', 'short', 'ushort', 'int', 'uint',
+ 'color', 'long', 'ulong', 'datetime', 'float', 'double',
+ 'string',
+)
'ABSOLU',
'ABSOLUT',
'ACCELERATOR',
- 'ACCUM',
'ACCUMULATE',
'ACCUM',
'ACCUMU',
'BUFFER-VALUE',
'BUTTON',
'BUTTONS',
- 'BUTTON',
'BY',
'BY-POINTER',
'BY-VARIANT-POINTER',
'CREATE-TEST-FILE',
'CURRENT',
'CURRENT_DATE',
- 'CURRENT_DATE',
'CURRENT-CHANGED',
'CURRENT-COLUMN',
'CURRENT-ENVIRONMENT',
'FGCOLO',
'FIELD',
'FIELDS',
- 'FIELD',
'FILE',
'FILE-CREATE-DATE',
'FILE-CREATE-TIME',
'FORM-LONG-INPUT',
'FORWARD',
'FORWARDS',
- 'FORWARD',
'FRAGMENT',
'FRAGMEN',
'FRAME',
'IS-CLASS',
'IS-CLAS',
'IS-LEAD-BYTE',
- 'IS-ATTR',
'IS-OPEN',
'IS-PARAMETER-SET',
'IS-ROW-SELECTED',
'TEMP-TABLE-PREPARE',
'TERM',
'TERMINAL',
- 'TERM',
'TERMI',
'TERMIN',
'TERMINA',
:license: BSD, see LICENSE for details.
"""
-import re
-try:
- from urllib import urlopen
-except ImportError:
- from urllib.request import urlopen
-
-from pygments.util import format_lines
-
-# One man's constant is another man's variable.
-SOURCE_URL = 'https://github.com/postgres/postgres/raw/master'
-KEYWORDS_URL = SOURCE_URL + '/doc/src/sgml/keywords.sgml'
-DATATYPES_URL = SOURCE_URL + '/doc/src/sgml/datatype.sgml'
-
-def update_myself():
- data_file = list(urlopen(DATATYPES_URL))
- datatypes = parse_datatypes(data_file)
- pseudos = parse_pseudos(data_file)
-
- keywords = parse_keywords(urlopen(KEYWORDS_URL))
- update_consts(__file__, 'DATATYPES', datatypes)
- update_consts(__file__, 'PSEUDO_TYPES', pseudos)
- update_consts(__file__, 'KEYWORDS', keywords)
-
-def parse_keywords(f):
- kw = []
- for m in re.finditer(
- r'\s*<entry><token>([^<]+)</token></entry>\s*'
- r'<entry>([^<]+)</entry>', f.read()):
- kw.append(m.group(1))
-
- if not kw:
- raise ValueError('no keyword found')
-
- kw.sort()
- return kw
-
-def parse_datatypes(f):
- dt = set()
- for line in f:
- if '<sect1' in line:
- break
- if '<entry><type>' not in line:
- continue
-
- # Parse a string such as
- # time [ (<replaceable>p</replaceable>) ] [ without time zone ]
- # into types "time" and "without time zone"
-
- # remove all the tags
- line = re.sub("<replaceable>[^<]+</replaceable>", "", line)
- line = re.sub("<[^>]+>", "", line)
-
- # Drop the parts containing braces
- for tmp in [t for tmp in line.split('[')
- for t in tmp.split(']') if "(" not in t]:
- for t in tmp.split(','):
- t = t.strip()
- if not t: continue
- dt.add(" ".join(t.split()))
-
- dt = list(dt)
- dt.sort()
- return dt
-
-def parse_pseudos(f):
- dt = []
- re_start = re.compile(r'\s*<table id="datatype-pseudotypes-table">')
- re_entry = re.compile(r'\s*<entry><type>([^<]+)</></entry>')
- re_end = re.compile(r'\s*</table>')
-
- f = iter(f)
- for line in f:
- if re_start.match(line) is not None:
- break
- else:
- raise ValueError('pseudo datatypes table not found')
-
- for line in f:
- m = re_entry.match(line)
- if m is not None:
- dt.append(m.group(1))
-
- if re_end.match(line) is not None:
- break
- else:
- raise ValueError('end of pseudo datatypes table not found')
-
- if not dt:
- raise ValueError('pseudo datatypes not found')
-
- return dt
-
-def update_consts(filename, constname, content):
- with open(filename) as f:
- data = f.read()
-
- # Line to start/end inserting
- re_match = re.compile(r'^%s\s*=\s*\($.*?^\s*\)$' % constname, re.M | re.S)
- m = re_match.search(data)
- if not m:
- raise ValueError('Could not find existing definition for %s' %
- (constname,))
-
- new_block = format_lines(constname, content)
- data = data[:m.start()] + new_block + data[m.end():]
-
- with open(filename, 'w') as f:
- f.write(data)
-
# Autogenerated: please edit them if you like wasting your time.
)
if __name__ == '__main__':
+ import re
+ try:
+ from urllib import urlopen
+ except ImportError:
+ from urllib.request import urlopen
+
+ from pygments.util import format_lines
+
+ # One man's constant is another man's variable.
+ SOURCE_URL = 'https://github.com/postgres/postgres/raw/master'
+ KEYWORDS_URL = SOURCE_URL + '/doc/src/sgml/keywords.sgml'
+ DATATYPES_URL = SOURCE_URL + '/doc/src/sgml/datatype.sgml'
+
+ def update_myself():
+ data_file = list(urlopen(DATATYPES_URL))
+ datatypes = parse_datatypes(data_file)
+ pseudos = parse_pseudos(data_file)
+
+ keywords = parse_keywords(urlopen(KEYWORDS_URL))
+ update_consts(__file__, 'DATATYPES', datatypes)
+ update_consts(__file__, 'PSEUDO_TYPES', pseudos)
+ update_consts(__file__, 'KEYWORDS', keywords)
+
+ def parse_keywords(f):
+ kw = []
+ for m in re.finditer(
+ r'\s*<entry><token>([^<]+)</token></entry>\s*'
+ r'<entry>([^<]+)</entry>', f.read()):
+ kw.append(m.group(1))
+
+ if not kw:
+ raise ValueError('no keyword found')
+
+ kw.sort()
+ return kw
+
+ def parse_datatypes(f):
+ dt = set()
+ for line in f:
+ if '<sect1' in line:
+ break
+ if '<entry><type>' not in line:
+ continue
+
+ # Parse a string such as
+ # time [ (<replaceable>p</replaceable>) ] [ without time zone ]
+ # into types "time" and "without time zone"
+
+ # remove all the tags
+ line = re.sub("<replaceable>[^<]+</replaceable>", "", line)
+ line = re.sub("<[^>]+>", "", line)
+
+ # Drop the parts containing braces
+ for tmp in [t for tmp in line.split('[')
+ for t in tmp.split(']') if "(" not in t]:
+ for t in tmp.split(','):
+ t = t.strip()
+ if not t: continue
+ dt.add(" ".join(t.split()))
+
+ dt = list(dt)
+ dt.sort()
+ return dt
+
+ def parse_pseudos(f):
+ dt = []
+ re_start = re.compile(r'\s*<table id="datatype-pseudotypes-table">')
+ re_entry = re.compile(r'\s*<entry><type>([^<]+)</></entry>')
+ re_end = re.compile(r'\s*</table>')
+
+ f = iter(f)
+ for line in f:
+ if re_start.match(line) is not None:
+ break
+ else:
+ raise ValueError('pseudo datatypes table not found')
+
+ for line in f:
+ m = re_entry.match(line)
+ if m is not None:
+ dt.append(m.group(1))
+
+ if re_end.match(line) is not None:
+ break
+ else:
+ raise ValueError('end of pseudo datatypes table not found')
+
+ if not dt:
+ raise ValueError('pseudo datatypes not found')
+
+ return dt
+
+ def update_consts(filename, constname, content):
+ with open(filename) as f:
+ data = f.read()
+
+ # Line to start/end inserting
+ re_match = re.compile(r'^%s\s*=\s*\($.*?^\s*\)$' % constname, re.M | re.S)
+ m = re_match.search(data)
+ if not m:
+ raise ValueError('Could not find existing definition for %s' %
+ (constname,))
+
+ new_block = format_lines(constname, content)
+ data = data[:m.start()] + new_block + data[m.end():]
+
+ with open(filename, 'w') as f:
+ f.write(data)
+
update_myself()
'break',
'case',
'catch',
- 'clc',
- 'clear',
'continue',
'do',
'else',
'elseif',
'end',
'endfunction',
- 'exit',
'for',
'function',
'help',
'if',
'pause',
- 'pwd',
'quit',
- 'resume',
- 'return',
'select',
'then',
'try',
- 'what',
'while',
- 'who',
)
functions_kw = (
'htmlReadStr',
'htmlWrite',
'iconvert',
- 'iconvert',
'ieee',
'ilib_verbose',
'imag',
'analpf',
'analyze',
'aplat',
- 'apropos',
'arhnk',
'arl2',
'arma2p',
'harmean',
'haveacompiler',
'head_comments',
- 'help',
'help_from_sci',
'help_skeleton',
'hermit',
if __name__ == '__main__':
import subprocess
- from pygments.util import format_lines
+ from pygments.util import format_lines, duplicates_removed
mapping = {'variables': 'builtin'}
mclose(fd)\n''' % var_type)
if '||' not in output[1]:
raise Exception(output[0])
- return output[1].strip().split('||')
+ # Invalid DISPLAY causes this to be output:
+ text = output[1].strip()
+ if text.startswith('Error: unable to open display \n'):
+ text = text[len('Error: unable to open display \n'):]
+ return text.split('||')
new_data = {}
+ seen = set() # only keep first type for a given word
for t in ('functions', 'commands', 'macros', 'variables'):
- new_data[t] = extract_completion(t)
+ new_data[t] = duplicates_removed(extract_completion(t), seen)
+ seen.update(set(new_data[t]))
+
with open(__file__) as f:
content = f.read()
(r'//.*?\n', Comment.Single),
(r'/\*.*?\*/', Comment.Multiline),
(r'/(\\\\|\\/|[^/\n])*/[gim]*', String.Regex),
- (r'[~\^\*!%&<>\|+=:;,/?\\-]+', Operator),
+ (r'[~^*!%&<>|+=:;,/?\\-]+', Operator),
(r'[{}\[\]();.]+', Punctuation),
(words((
'case', 'default', 'for', 'each', 'in', 'while', 'do', 'break',
(words((
'decodeURI', 'decodeURIComponent', 'encodeURI', 'escape', 'eval', 'isFinite', 'isNaN',
'isXMLName', 'clearInterval', 'fscommand', 'getTimer', 'getURL', 'getVersion',
- 'isFinite', 'parseFloat', 'parseInt', 'setInterval', 'trace', 'updateAfterEvent',
+ 'parseFloat', 'parseInt', 'setInterval', 'trace', 'updateAfterEvent',
'unescape'), suffix=r'\b'),
Name.Function),
(r'[$a-zA-Z_]\w*', Name.Other),
(r'[0-9]+', Number.Integer),
(r'"(\\\\|\\"|[^"])*"', String.Double),
(r"'(\\\\|\\'|[^'])*'", String.Single),
- (r'[~\^\*!%&<>\|+=:;,/?\\{}\[\]().-]+', Operator),
+ (r'[~^*!%&<>|+=:;,/?\\{}\[\]().-]+', Operator),
],
'funcparams': [
(r'\s+', Text),
)\b''',
Operator.Word),
(r'''(?x)
- (?:[a-zA-Z_0-9]+|`[^`]*`)
- (?:::[a-zA-Z_0-9]+|`[^`]*`)*''', Name.Variable),
+ (?:\w+|`[^`]*`)
+ (?:::\w+|`[^`]*`)*''', Name.Variable),
(r'[0-9]+(?:\.[0-9]*)?(?:e[0-9]+)?', Number),
(r'\.[0-9]+(?:e[0-9]+)?', Number),
(r'.', Text)
(r'\b(?:I|RDN_INF|RD_NINF|RD_NAN)\b', Number),
# (r'\b(?:adt|linalg|newDomain|hold)\b', Name.Builtin),
(r'''(?x)
- ((?:[a-zA-Z_#][a-zA-Z_#0-9]*|`[^`]*`)
- (?:::[a-zA-Z_#][a-zA-Z_#0-9]*|`[^`]*`)*)(\s*)([(])''',
+ ((?:[a-zA-Z_#][\w#]*|`[^`]*`)
+ (?:::[a-zA-Z_#][\w#]*|`[^`]*`)*)(\s*)([(])''',
bygroups(Name.Function, Text, Punctuation)),
(r'''(?x)
- (?:[a-zA-Z_#][a-zA-Z_#0-9]*|`[^`]*`)
- (?:::[a-zA-Z_#][a-zA-Z_#0-9]*|`[^`]*`)*''', Name.Variable),
+ (?:[a-zA-Z_#][\w#]*|`[^`]*`)
+ (?:::[a-zA-Z_#][\w#]*|`[^`]*`)*''', Name.Variable),
(r'[0-9]+(?:\.[0-9]*)?(?:e[0-9]+)?', Number),
(r'\.[0-9]+(?:e[0-9]+)?', Number),
(r'.', Text)
(r'(~|lobby|jlobby|/)\.', Keyword.Constant, 'namespace'),
(r'"(\\\\|\\"|[^"])*"', String),
(r'\|', Punctuation, 'arglist'),
- (r'<:|[\^\*!%&<>+=,./?-]|:=', Operator),
+ (r'<:|[*^!%&<>+=,./?-]|:=', Operator),
(r"`[a-zA-Z_]\w*", String.Symbol),
(r"[a-zA-Z_]\w*:", Name.Function),
- (r"[\{\}()\[\];`]", Punctuation),
+ (r"[{}()\[\];`]", Punctuation),
(r'(self|super)\b', Name.Variable.Instance),
(r"[a-zA-Z_]\w*", Name.Variable),
(r"@[a-zA-Z_]\w*", Name.Class),
#: optional Comment or Whitespace
string = r'"(\\"|[^"])*"'
- char = r'[a-zA-Z$._0-9@-]'
+ char = r'[\w$.@-]'
identifier = r'(?:[a-zA-Z$_]' + char + '*|\.' + char + '+)'
number = r'(?:0[xX][a-zA-Z0-9]+|\d+)'
#: optional Comment or Whitespace
string = r'"[^"]*?"'
- identifier = r'([-a-zA-Z$._][-a-zA-Z$._0-9]*|' + string + ')'
+ identifier = r'([-a-zA-Z$._][\w\-$.]*|' + string + ')'
tokens = {
'root': [
mimetypes = ['text/x-nasm']
identifier = r'[a-z$._?][\w$.?#@~]*'
- hexn = r'(?:0[xX][0-9a-f]+|$0[0-9a-f]*|[0-9]+[0-9a-f]*h)'
+ hexn = r'(?:0x[0-9a-f]+|$0[0-9a-f]*|[0-9]+[0-9a-f]*h)'
octn = r'[0-7]+q'
binn = r'[01]+b'
decn = r'[0-9]+'
flags = re.IGNORECASE | re.MULTILINE
tokens = {
'root': [
- include('whitespace'),
(r'^\s*%', Comment.Preproc, 'preproc'),
+ include('whitespace'),
(identifier + ':', Name.Label),
(r'(%s)(\s+)(equ)' % identifier,
bygroups(Name.Constant, Keyword.Declaration, Keyword.Declaration),
include('numbers'),
(r'[a-zA-Z_#@$][\w#@$]*', Name),
(r'\\|\'', Text),
- (r'\`([\,\%\`abfnrtv\-\+;])', String.Escape),
+ (r'\`([,%`abfnrtv\-+;])', String.Escape),
include('garbage'),
],
'incomment': [
'labels': [
# hotkeys and labels
# technically, hotkey names are limited to named keys and buttons
- (r'(^\s*)([^:\s\(\"]+?:{1,2})', bygroups(Text, Name.Label)),
+ (r'(^\s*)([^:\s("]+?:{1,2})', bygroups(Text, Name.Label)),
(r'(^\s*)(::[^:\s]+?::)', bygroups(Text, Name.Label)),
],
'numbers': [
(r'\d+', Number.Integer)
],
'stringescape': [
- (r'\"\"|\`([\,\%\`abfnrtv])', String.Escape),
+ (r'\"\"|\`([,%`abfnrtv])', String.Escape),
],
'strings': [
(r'[^"\n]+', String),
(r'(#comments-start|#cs).*?(#comments-end|#ce)', Comment.Multiline),
(r'[\[\]{}(),;]', Punctuation),
(r'(and|or|not)\b', Operator.Word),
- (r'[\$|@][a-zA-Z_]\w*', Name.Variable),
+ (r'[$|@][a-zA-Z_]\w*', Name.Variable),
(r'!=|==|:=|\.=|<<|>>|[-~+/*%=<>&^|?:!.]', Operator),
include('commands'),
include('labels'),
include('numbers'),
(r'[a-zA-Z_#@$][\w#@$]*', Name),
(r'\\|\'', Text),
- (r'\`([\,\%\`abfnrtv\-\+;])', String.Escape),
+ (r'\`([,%`abfnrtv\-+;])', String.Escape),
(r'_\n', Text), # Line continuation
include('garbage'),
],
(r'\d+', Number.Integer)
],
'stringescape': [
- (r'\"\"|\`([\,\%\`abfnrtv])', String.Escape),
+ (r'\"\"|\`([,%`abfnrtv])', String.Escape),
],
'strings': [
(r'[^"\n]+', String),
# Other
(r'<=|>=|<>|\*=|/=|\+=|-=|&=|~=|\|=|[-&*/^+=<>|~]', Operator),
(r'(?i)(?:Not|Mod|Shl|Shr|And|Or)', Operator.Word),
- (r'[\(\){}!#,.:]', Punctuation),
+ (r'[(){}!#,.:]', Punctuation),
# catch the rest
(r'%s\b' % name_constant, Name.Constant),
(r'%s\b' % name_function, Name.Function),
(r'not|and|or', Operator.Word),
(r'"[^"\n]*.', String),
(r'\d+|[-+]?\d*\.\d*(e[-+]?\d+)?', Number.Float),
- (r'[\(\),:;]', Punctuation),
+ (r'[(),:;]', Punctuation),
(r'\w+[$%]?', Name),
]
}
bygroups(Text.Whitespace, Name.Label, Text.Whitespace)),
(r'(?=[\s]*)(\w+)(?=[\s]*=)', Name.Variable.Global),
(r'(?=[^"]*)\'.*$', Comment.Single),
- (r'"[^\n\"]*"', String.Double),
+ (r'"[^\n"]*"', String.Double),
(r'(END)(\s+)(FUNCTION|IF|SELECT|SUB)',
bygroups(Keyword.Reserved, Text.Whitespace, Keyword.Reserved)),
(r'(DECLARE)(\s+)([A-Z]+)(\s+)(\S+)',
bygroups(Keyword.Declaration, Text.Whitespace, Name.Variable,
Text.Whitespace, Name)),
- (r'(DIM)(\s+)(SHARED)(\s+)([^\s\(]+)',
+ (r'(DIM)(\s+)(SHARED)(\s+)([^\s(]+)',
bygroups(Keyword.Declaration, Text.Whitespace, Name.Variable,
Text.Whitespace, Name.Variable.Global)),
- (r'(DIM)(\s+)([^\s\(]+)',
+ (r'(DIM)(\s+)([^\s(]+)',
bygroups(Keyword.Declaration, Text.Whitespace, Name.Variable.Global)),
(r'^(\s*)([a-zA-Z_]+)(\s*)(\=)',
bygroups(Text.Whitespace, Name.Variable.Global, Text.Whitespace,
include('operators'),
include('statements'),
include('keywords'),
- (r'[a-zA-Z_]\w*[\$@#&!]', Name.Variable.Global),
+ (r'[a-zA-Z_]\w*[$@#&!]', Name.Variable.Global),
(r'[a-zA-Z_]\w*\:', Name.Label),
(r'\-?\d*\.\d+[@|#]?', Number.Float),
(r'\-?\d+[@|#]', Number.Float),
include('strings'),
include('core'),
include('nums'),
- (r'[a-z0-9]([_a-z0-9\-]*[a-z0-9]+)?', Name.Variable),
+ (r'[a-z0-9]([\w\-]*[a-z0-9]+)?', Name.Variable),
# (r'[\s]+', Text),
(r'[ \t]+', Text),
],
'nums': [
(r'\d+(\s*|\.$|$)', Number.Integer),
- (r'[+-]?\d*\.\d+([eE][-+]?\d+)?', Number.Float),
- (r'[+-]?\d+\.\d*([eE][-+]?\d+)?', Number.Float),
+ (r'[+-]?\d*\.\d+(E[-+]?\d+)?', Number.Float),
+ (r'[+-]?\d+\.\d*(E[-+]?\d+)?', Number.Float),
],
}
(r'[?*<>=\-+]', Operator),
(r"'(''|[^'])*'", String.Single),
(r"`([^`])*`", String.Single),
- (r'[/;:()\[\],\.]', Punctuation)
+ (r'[/;:()\[\],.]', Punctuation)
],
}
(r'[a-z]\w*', Name.Variable),
(r'=', Operator),
(r'"', String, 'string-literal'),
- (r'[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]{1,3})?', Number),
+ (r'[0-9]+(?:\.[0-9]+)?(?:e[+-]?[0-9]{1,3})?', Number),
# Space is not significant
(r'\s', Text)
],
# IDENTIFIER
(r'\{[^}]+\}', Name.Variable),
# NUMBER
- (r'[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]{1,3})?', Number),
+ (r'[0-9]+(?:\.[0-9]+)?(?:e[+-]?[0-9]{1,3})?', Number),
# STRING
(r'"', String, 'string-literal'),
# RELATION
'FALSE', 'ROW', 'ROWS', 'FROM', 'ALL', 'AS', 'PF', 'COLUMN',
'COLUMNS', 'DEFINE', 'REPORT', 'LIMIT', 'TABLE', 'LIKE', 'AND',
'BY', 'BETWEEN', 'EXCEPT', 'SELECT', 'MATCH', 'WHERE', 'TRUE',
- 'FOR', 'IN', 'WITHOUT', 'FILTER', 'ALIAS', 'ORDER', 'FACT',
- 'WHEN', 'NOT', 'ON', 'KEYS', 'KEY', 'FULLSET', 'PRIMARY',
- 'LABELS', 'LABEL', 'VISUAL', 'TITLE', 'DESCRIPTION', 'FOLDER',
- 'ALTER', 'DROP', 'ADD', 'DATASET', 'DATATYPE', 'INT', 'BIGINT',
- 'DOUBLE', 'DATE', 'VARCHAR', 'DECIMAL', 'SYNCHRONIZE', 'TYPE',
- 'DEFAULT', 'ORDER', 'ASC', 'DESC', 'HYPERLINK', 'INCLUDE',
- 'TEMPLATE', 'MODIFY'), suffix=r'\b'),
+ 'FOR', 'IN', 'WITHOUT', 'FILTER', 'ALIAS', 'WHEN', 'NOT', 'ON',
+ 'KEYS', 'KEY', 'FULLSET', 'PRIMARY', 'LABELS', 'LABEL',
+ 'VISUAL', 'TITLE', 'DESCRIPTION', 'FOLDER', 'ALTER', 'DROP',
+ 'ADD', 'DATASET', 'DATATYPE', 'INT', 'BIGINT', 'DOUBLE', 'DATE',
+ 'VARCHAR', 'DECIMAL', 'SYNCHRONIZE', 'TYPE', 'DEFAULT', 'ORDER',
+ 'ASC', 'DESC', 'HYPERLINK', 'INCLUDE', 'TEMPLATE', 'MODIFY'),
+ suffix=r'\b'),
Keyword),
# FUNCNAME
(r'[a-z]\w*\b', Name.Function),
# Comments
(r'#.*', Comment.Single),
# Punctuation
- (r'[,;\(\)]', Punctuation),
+ (r'[,;()]', Punctuation),
# Space is not significant
(r'\s+', Text)
],
priority = 0.1
def analyse_text(text):
- if re.search('#include [<"]', text):
+ if re.search('^\s*#include [<"]', text, re.MULTILINE):
+ return 0.1
+ if re.search('^\s*#ifdef ', text, re.MULTILINE):
return 0.1
Number, Punctuation
from pygments.lexers.c_cpp import CLexer, CppLexer
+from pygments.lexers import _mql_builtins
__all__ = ['PikeLexer', 'NesCLexer', 'ClayLexer', 'ECLexer', 'ValaLexer',
'CudaLexer', 'SwigLexer', 'MqlLexer']
(words((
'catch', 'new', 'private', 'protected', 'public', 'gauge',
'throw', 'throws', 'class', 'interface', 'implement', 'abstract', 'extends', 'from',
- 'this', 'super', 'new', 'constant', 'final', 'static', 'import', 'use', 'extern',
+ 'this', 'super', 'constant', 'final', 'static', 'import', 'use', 'extern',
'inline', 'proto', 'break', 'continue', 'if', 'else', 'for',
'while', 'do', 'switch', 'case', 'as', 'in', 'version', 'return', 'true', 'false', 'null',
'__VERSION__', '__MAJOR__', '__MINOR__', '__BUILD__', '__REAL_VERSION__',
(r'0x[0-9a-fA-F]+[LlUu]*', Number.Hex),
(r'\d+[LlUu]*', Number.Integer),
(r'\b(true|false)\b', Name.Builtin),
- (r'(?i)[a-z_?][a-z_?0-9]*', Name),
+ (r'(?i)[a-z_?][\w?]*', Name),
(r'"""', String, 'tdqs'),
(r'"', String, 'dqs'),
],
'any_object', 'incref', 'register', 'watch', 'stopwatching', 'firewatchers',
'watchable', 'class_designer', 'class_fixed', 'class_no_expansion', 'isset',
'class_default_property', 'property_category', 'class_data',
- 'class_property', 'virtual', 'thisclass', 'dbtable', 'dbindex',
+ 'class_property', 'thisclass', 'dbtable', 'dbindex',
'database_open', 'dbfield'), suffix=r'\b'), Keyword),
(words(('uint', 'uint16', 'uint32', 'uint64', 'bool', 'byte',
'unichar', 'int64'), suffix=r'\b'),
tokens = {
'statements': [
- (words((
- 'input', '_Digits', '_Point', '_LastError', '_Period', '_RandomSeed',
- '_StopFlag', '_Symbol', '_UninitReason', 'Ask', 'Bars', 'Bid',
- 'Close', 'Digits', 'High', 'Low', 'Open', 'Point', 'Time',
- 'Volume'), suffix=r'\b'),
- Keyword),
- (words((
- 'void', 'char', 'uchar', 'bool', 'short', 'ushort', 'int', 'uint',
- 'color', 'long', 'ulong', 'datetime', 'float', 'double',
- 'string'), suffix=r'\b'),
- Keyword.Type),
- (words((
- 'Alert', 'CheckPointer', 'Comment', 'DebugBreak', 'ExpertRemove',
- 'GetPointer', 'GetTickCount', 'MessageBox', 'PeriodSeconds', 'PlaySound',
- 'Print', 'PrintFormat', 'ResetLastError', 'ResourceCreate', 'ResourceFree',
- 'ResourceReadImage', 'ResourceSave', 'SendFTP', 'SendMail', 'SendNotification',
- 'Sleep', 'TerminalClose', 'TesterStatistics', 'ZeroMemory',
- 'ArrayBsearch', 'ArrayCopy', 'ArrayCompare', 'ArrayFree', 'ArrayGetAsSeries',
- 'ArrayInitialize', 'ArrayFill', 'ArrayIsSeries', 'ArrayIsDynamic',
- 'ArrayMaximum', 'ArrayMinimum', 'ArrayRange', 'ArrayResize',
- 'ArraySetAsSeries', 'ArraySize', 'ArraySort', 'ArrayCopyRates',
- 'ArrayCopySeries', 'ArrayDimension',
- 'CharToString', 'DoubleToString', 'EnumToString', 'NormalizeDouble',
- 'StringToDouble', 'StringToInteger', 'StringToTime', 'TimeToString',
- 'IntegerToString', 'ShortToString', 'ShortArrayToString',
- 'StringToShortArray', 'CharArrayToString', 'StringToCharArray',
- 'ColorToARGB', 'ColorToString', 'StringToColor', 'StringFormat',
- 'CharToStr', 'DoubleToStr', 'StrToDouble', 'StrToInteger', 'StrToTime', 'TimeToStr',
- 'MathAbs', 'MathArccos', 'MathArcsin', 'MathArctan', 'MathCeil', 'MathCos', 'MathExp',
- 'MathFloor', 'MathLog', 'MathMax', 'MathMin', 'MathMod', 'MathPow', 'MathRand',
- 'MathRound', 'MathSin', 'MathSqrt', 'MathSrand', 'MathTan', 'MathIsValidNumber',
- 'StringAdd', 'StringBufferLen', 'StringCompare', 'StringConcatenate', 'StringFill',
- 'StringFind', 'StringGetCharacter', 'StringInit', 'StringLen', 'StringReplace',
- 'StringSetCharacter', 'StringSplit', 'StringSubstr', 'StringToLower', 'StringToUpper',
- 'StringTrimLeft', 'StringTrimRight', 'StringGetChar', 'StringSetChar',
- 'TimeCurrent', 'TimeTradeServer', 'TimeLocal', 'TimeGMT', 'TimeDaylightSavings',
- 'TimeGMTOffset', 'TimeToStruct', 'StructToTime', 'Day', 'DayOfWeek', 'DayOfYear',
- 'Hour', 'Minute', 'Month', 'Seconds', 'TimeDay', 'TimeDayOfWeek', 'TimeDayOfYear',
- 'TimeHour', 'TimeMinute', 'TimeMonth', 'TimeSeconds', 'TimeYear', 'Year',
- 'AccountInfoDouble', 'AccountInfoInteger', 'AccountInfoString', 'AccountBalance',
- 'AccountCredit', 'AccountCompany', 'AccountCurrency', 'AccountEquity',
- 'AccountFreeMargin', 'AccountFreeMarginCheck', 'AccountFreeMarginMode',
- 'AccountLeverage', 'AccountMargin', 'AccountName', 'AccountNumber', 'AccountProfit',
- 'AccountServer', 'AccountStopoutLevel', 'AccountStopoutMode',
- 'GetLastError', 'IsStopped', 'UninitializeReason', 'MQLInfoInteger', 'MQLInfoString',
- 'Symbol', 'Period', 'Digits', 'Point', 'IsConnected', 'IsDemo', 'IsDllsAllowed',
- 'IsExpertEnabled', 'IsLibrariesAllowed', 'IsOptimization', 'IsTesting',
- 'IsTradeAllowed',
- 'IsTradeContextBusy', 'IsVisualMode', 'TerminalCompany', 'TerminalName',
- 'TerminalPath',
- 'SymbolsTotal', 'SymbolName', 'SymbolSelect', 'SymbolIsSynchronized',
- 'SymbolInfoDouble',
- 'SymbolInfoInteger', 'SymbolInfoString', 'SymbolInfoTick',
- 'SymbolInfoSessionQuote',
- 'SymbolInfoSessionTrade', 'MarketInfo',
- 'SeriesInfoInteger', 'CopyRates', 'CopyTime', 'CopyOpen',
- 'CopyHigh', 'CopyLow', 'CopyClose',
- 'CopyTickVolume', 'CopyRealVolume', 'CopySpread', 'iBars', 'iBarShift', 'iClose',
- 'iHigh', 'iHighest', 'iLow', 'iLowest', 'iOpen', 'iTime', 'iVolume',
- 'HideTestIndicators', 'Period', 'RefreshRates', 'Symbol', 'WindowBarsPerChart',
- 'WindowExpertName', 'WindowFind', 'WindowFirstVisibleBar', 'WindowHandle',
- 'WindowIsVisible', 'WindowOnDropped', 'WindowPriceMax', 'WindowPriceMin',
- 'WindowPriceOnDropped', 'WindowRedraw', 'WindowScreenShot',
- 'WindowTimeOnDropped', 'WindowsTotal', 'WindowXOnDropped', 'WindowYOnDropped',
- 'OrderClose', 'OrderCloseBy', 'OrderClosePrice', 'OrderCloseTime', 'OrderComment',
- 'OrderCommission', 'OrderDelete', 'OrderExpiration', 'OrderLots', 'OrderMagicNumber',
- 'OrderModify', 'OrderOpenPrice', 'OrderOpenTime', 'OrderPrint', 'OrderProfit',
- 'OrderSelect', 'OrderSend', 'OrdersHistoryTotal', 'OrderStopLoss', 'OrdersTotal',
- 'OrderSwap', 'OrderSymbol', 'OrderTakeProfit', 'OrderTicket', 'OrderType',
- 'GlobalVariableCheck', 'GlobalVariableTime',
- 'GlobalVariableDel', 'GlobalVariableGet', 'GlobalVariableName',
- 'GlobalVariableSet', 'GlobalVariablesFlush', 'GlobalVariableTemp',
- 'GlobalVariableSetOnCondition', 'GlobalVariablesDeleteAll',
- 'GlobalVariablesTotal', 'GlobalVariableCheck', 'GlobalVariableTime',
- 'GlobalVariableDel', 'GlobalVariableGet',
- 'GlobalVariableName', 'GlobalVariableSet', 'GlobalVariablesFlush',
- 'GlobalVariableTemp', 'GlobalVariableSetOnCondition',
- 'GlobalVariablesDeleteAll', 'GlobalVariablesTotal',
- 'GlobalVariableCheck', 'GlobalVariableTime', 'GlobalVariableDel',
- 'GlobalVariableGet', 'GlobalVariableName', 'GlobalVariableSet',
- 'GlobalVariablesFlush', 'GlobalVariableTemp',
- 'GlobalVariableSetOnCondition', 'GlobalVariablesDeleteAll',
- 'GlobalVariablesTotal',
- 'FileFindFirst', 'FileFindNext', 'FileFindClose', 'FileOpen', 'FileDelete',
- 'FileFlush', 'FileGetInteger', 'FileIsEnding', 'FileIsLineEnding',
- 'FileClose', 'FileIsExist', 'FileCopy', 'FileMove', 'FileReadArray',
- 'FileReadBool', 'FileReadDatetime', 'FileReadDouble', 'FileReadFloat',
- 'FileReadInteger', 'FileReadLong', 'FileReadNumber', 'FileReadString',
- 'FileReadStruct', 'FileSeek', 'FileSize', 'FileTell', 'FileWrite',
- 'FileWriteArray', 'FileWriteDouble', 'FileWriteFloat', 'FileWriteInteger',
- 'FileWriteLong', 'FileWriteString', 'FileWriteStruct', 'FolderCreate',
- 'FolderDelete', 'FolderClean', 'FileOpenHistory',
- 'IndicatorSetDouble', 'IndicatorSetInteger', 'IndicatorSetString',
- 'SetIndexBuffer', 'IndicatorBuffers', 'IndicatorCounted', 'IndicatorDigits',
- 'IndicatorShortName', 'SetIndexArrow', 'SetIndexDrawBegin',
- 'SetIndexEmptyValue', 'SetIndexLabel', 'SetIndexShift',
- 'SetIndexStyle', 'SetLevelStyle', 'SetLevelValue',
- 'ObjectCreate', 'ObjectName', 'ObjectDelete', 'ObjectsDeleteAll',
- 'ObjectFind', 'ObjectGetTimeByValue', 'ObjectGetValueByTime',
- 'ObjectMove', 'ObjectsTotal', 'ObjectGetDouble', 'ObjectGetInteger',
- 'ObjectGetString', 'ObjectSetDouble', 'ObjectSetInteger',
- 'ObjectSetString', 'TextSetFont', 'TextOut', 'TextGetSize',
- 'ObjectDescription', 'ObjectGet', 'ObjectGetFiboDescription',
- 'ObjectGetShiftByValue', 'ObjectGetValueByShift', 'ObjectSet',
- 'ObjectSetFiboDescription', 'ObjectSetText', 'ObjectType',
- 'iAC', 'iAD', 'iADX', 'iAlligator', 'iAO', 'iATR', 'iBearsPower',
- 'iBands', 'iBandsOnArray', 'iBullsPower', 'iCCI', 'iCCIOnArray',
- 'iCustom', 'iDeMarker', 'iEnvelopes', 'iEnvelopesOnArray',
- 'iForce', 'iFractals', 'iGator', 'iIchimoku', 'iBWMFI', 'iMomentum',
- 'iMomentumOnArray', 'iMFI', 'iMA', 'iMAOnArray', 'iOsMA', 'iMACD',
- 'iOBV', 'iSAR', 'iRSI', 'iRSIOnArray', 'iRVI', 'iStdDev', 'iStdDevOnArray',
- 'iStochastic', 'iWPR',
- 'EventSetMillisecondTimer', 'EventSetTimer',
- 'EventKillTimer', 'EventChartCustom'), suffix=r'\b'),
- Name.Function),
- (words((
- 'CHARTEVENT_KEYDOWN', 'CHARTEVENT_MOUSE_MOVE',
- 'CHARTEVENT_OBJECT_CREATE',
- 'CHARTEVENT_OBJECT_CHANGE', 'CHARTEVENT_OBJECT_DELETE',
- 'CHARTEVENT_CLICK',
- 'CHARTEVENT_OBJECT_CLICK', 'CHARTEVENT_OBJECT_DRAG',
- 'CHARTEVENT_OBJECT_ENDEDIT',
- 'CHARTEVENT_CHART_CHANGE', 'CHARTEVENT_CUSTOM',
- 'CHARTEVENT_CUSTOM_LAST',
- 'PERIOD_CURRENT', 'PERIOD_M1', 'PERIOD_M2', 'PERIOD_M3',
- 'PERIOD_M4', 'PERIOD_M5',
- 'PERIOD_M6', 'PERIOD_M10', 'PERIOD_M12', 'PERIOD_M15',
- 'PERIOD_M20', 'PERIOD_M30',
- 'PERIOD_H1', 'PERIOD_H2', 'PERIOD_H3', 'PERIOD_H4',
- 'PERIOD_H6', 'PERIOD_H8',
- 'PERIOD_H12', 'PERIOD_D1', 'PERIOD_W1', 'PERIOD_MN1',
- 'CHART_IS_OBJECT', 'CHART_BRING_TO_TOP',
- 'CHART_MOUSE_SCROLL', 'CHART_EVENT_MOUSE_MOVE',
- 'CHART_EVENT_OBJECT_CREATE',
- 'CHART_EVENT_OBJECT_DELETE', 'CHART_MODE', 'CHART_FOREGROUND',
- 'CHART_SHIFT',
- 'CHART_AUTOSCROLL', 'CHART_SCALE', 'CHART_SCALEFIX',
- 'CHART_SCALEFIX_11',
- 'CHART_SCALE_PT_PER_BAR', 'CHART_SHOW_OHLC',
- 'CHART_SHOW_BID_LINE',
- 'CHART_SHOW_ASK_LINE', 'CHART_SHOW_LAST_LINE',
- 'CHART_SHOW_PERIOD_SEP',
- 'CHART_SHOW_GRID', 'CHART_SHOW_VOLUMES',
- 'CHART_SHOW_OBJECT_DESCR',
- 'CHART_VISIBLE_BARS', 'CHART_WINDOWS_TOTAL',
- 'CHART_WINDOW_IS_VISIBLE',
- 'CHART_WINDOW_HANDLE', 'CHART_WINDOW_YDISTANCE',
- 'CHART_FIRST_VISIBLE_BAR',
- 'CHART_WIDTH_IN_BARS', 'CHART_WIDTH_IN_PIXELS',
- 'CHART_HEIGHT_IN_PIXELS',
- 'CHART_COLOR_BACKGROUND', 'CHART_COLOR_FOREGROUND',
- 'CHART_COLOR_GRID',
- 'CHART_COLOR_VOLUME', 'CHART_COLOR_CHART_UP',
- 'CHART_COLOR_CHART_DOWN',
- 'CHART_COLOR_CHART_LINE', 'CHART_COLOR_CANDLE_BULL',
- 'CHART_COLOR_CANDLE_BEAR',
- 'CHART_COLOR_BID', 'CHART_COLOR_ASK', 'CHART_COLOR_LAST',
- 'CHART_COLOR_STOP_LEVEL',
- 'CHART_SHOW_TRADE_LEVELS', 'CHART_DRAG_TRADE_LEVELS',
- 'CHART_SHOW_DATE_SCALE',
- 'CHART_SHOW_PRICE_SCALE', 'CHART_SHIFT_SIZE',
- 'CHART_FIXED_POSITION',
- 'CHART_FIXED_MAX', 'CHART_FIXED_MIN', 'CHART_POINTS_PER_BAR',
- 'CHART_PRICE_MIN',
- 'CHART_PRICE_MAX', 'CHART_COMMENT', 'CHART_BEGIN',
- 'CHART_CURRENT_POS', 'CHART_END',
- 'CHART_BARS', 'CHART_CANDLES', 'CHART_LINE', 'CHART_VOLUME_HIDE',
- 'CHART_VOLUME_TICK', 'CHART_VOLUME_REAL',
- 'OBJ_VLINE', 'OBJ_HLINE', 'OBJ_TREND', 'OBJ_TRENDBYANGLE', 'OBJ_CYCLES',
- 'OBJ_CHANNEL', 'OBJ_STDDEVCHANNEL', 'OBJ_REGRESSION', 'OBJ_PITCHFORK',
- 'OBJ_GANNLINE', 'OBJ_GANNFAN', 'OBJ_GANNGRID', 'OBJ_FIBO',
- 'OBJ_FIBOTIMES', 'OBJ_FIBOFAN', 'OBJ_FIBOARC', 'OBJ_FIBOCHANNEL',
- 'OBJ_EXPANSION', 'OBJ_RECTANGLE', 'OBJ_TRIANGLE', 'OBJ_ELLIPSE',
- 'OBJ_ARROW_THUMB_UP', 'OBJ_ARROW_THUMB_DOWN',
- 'OBJ_ARROW_UP', 'OBJ_ARROW_DOWN',
- 'OBJ_ARROW_STOP', 'OBJ_ARROW_CHECK', 'OBJ_ARROW_LEFT_PRICE',
- 'OBJ_ARROW_RIGHT_PRICE', 'OBJ_ARROW_BUY', 'OBJ_ARROW_SELL',
- 'OBJ_ARROW',
- 'OBJ_TEXT', 'OBJ_LABEL', 'OBJ_BUTTON', 'OBJ_BITMAP',
- 'OBJ_BITMAP_LABEL',
- 'OBJ_EDIT', 'OBJ_EVENT', 'OBJ_RECTANGLE_LABEL',
- 'OBJPROP_TIME1', 'OBJPROP_PRICE1', 'OBJPROP_TIME2',
- 'OBJPROP_PRICE2', 'OBJPROP_TIME3',
- 'OBJPROP_PRICE3', 'OBJPROP_COLOR', 'OBJPROP_STYLE',
- 'OBJPROP_WIDTH',
- 'OBJPROP_BACK', 'OBJPROP_RAY', 'OBJPROP_ELLIPSE',
- 'OBJPROP_SCALE',
- 'OBJPROP_ANGLE', 'OBJPROP_ARROWCODE', 'OBJPROP_TIMEFRAMES',
- 'OBJPROP_DEVIATION', 'OBJPROP_FONTSIZE', 'OBJPROP_CORNER',
- 'OBJPROP_XDISTANCE', 'OBJPROP_YDISTANCE', 'OBJPROP_FIBOLEVELS',
- 'OBJPROP_LEVELCOLOR', 'OBJPROP_LEVELSTYLE', 'OBJPROP_LEVELWIDTH',
- 'OBJPROP_FIRSTLEVEL', 'OBJPROP_COLOR', 'OBJPROP_STYLE', 'OBJPROP_WIDTH',
- 'OBJPROP_BACK', 'OBJPROP_ZORDER', 'OBJPROP_FILL', 'OBJPROP_HIDDEN',
- 'OBJPROP_SELECTED', 'OBJPROP_READONLY', 'OBJPROP_TYPE', 'OBJPROP_TIME',
- 'OBJPROP_SELECTABLE', 'OBJPROP_CREATETIME', 'OBJPROP_LEVELS',
- 'OBJPROP_LEVELCOLOR', 'OBJPROP_LEVELSTYLE', 'OBJPROP_LEVELWIDTH',
- 'OBJPROP_ALIGN', 'OBJPROP_FONTSIZE', 'OBJPROP_RAY_RIGHT', 'OBJPROP_RAY',
- 'OBJPROP_ELLIPSE', 'OBJPROP_ARROWCODE', 'OBJPROP_TIMEFRAMES', 'OBJPROP_ANCHOR',
- 'OBJPROP_XDISTANCE', 'OBJPROP_YDISTANCE', 'OBJPROP_DRAWLINES', 'OBJPROP_STATE',
- 'OBJPROP_CHART_ID', 'OBJPROP_XSIZE', 'OBJPROP_YSIZE', 'OBJPROP_XOFFSET',
- 'OBJPROP_YOFFSET', 'OBJPROP_PERIOD', 'OBJPROP_DATE_SCALE', 'OBJPROP_PRICE_SCALE',
- 'OBJPROP_CHART_SCALE', 'OBJPROP_BGCOLOR', 'OBJPROP_CORNER', 'OBJPROP_BORDER_TYPE',
- 'OBJPROP_BORDER_COLOR', 'OBJPROP_PRICE', 'OBJPROP_LEVELVALUE', 'OBJPROP_SCALE',
- 'OBJPROP_ANGLE', 'OBJPROP_DEVIATION',
- 'OBJPROP_NAME', 'OBJPROP_TEXT', 'OBJPROP_TOOLTIP', 'OBJPROP_LEVELTEXT',
- 'OBJPROP_FONT', 'OBJPROP_BMPFILE', 'OBJPROP_SYMBOL',
- 'BORDER_FLAT', 'BORDER_RAISED', 'BORDER_SUNKEN', 'ALIGN_LEFT', 'ALIGN_CENTER',
- 'ALIGN_RIGHT', 'ANCHOR_LEFT_UPPER', 'ANCHOR_LEFT', 'ANCHOR_LEFT_LOWER',
- 'ANCHOR_LOWER', 'ANCHOR_RIGHT_LOWER', 'ANCHOR_RIGHT', 'ANCHOR_RIGHT_UPPER',
- 'ANCHOR_UPPER', 'ANCHOR_CENTER', 'ANCHOR_TOP', 'ANCHOR_BOTTOM',
- 'CORNER_LEFT_UPPER', 'CORNER_LEFT_LOWER', 'CORNER_RIGHT_LOWER',
- 'CORNER_RIGHT_UPPER',
- 'OBJ_NO_PERIODS', 'EMPTY', 'OBJ_PERIOD_M1', 'OBJ_PERIOD_M5', 'OBJ_PERIOD_M15',
- 'OBJ_PERIOD_M30', 'OBJ_PERIOD_H1', 'OBJ_PERIOD_H4', 'OBJ_PERIOD_D1',
- 'OBJ_PERIOD_W1', 'OBJ_PERIOD_MN1', 'OBJ_ALL_PERIODS',
- 'GANN_UP_TREND', 'GANN_DOWN_TREND',
- 'SYMBOL_THUMBSUP', 'SYMBOL_THUMBSDOWN',
- 'SYMBOL_ARROWUP', 'SYMBOL_ARROWDOWN',
- 'SYMBOL_STOPSIGN', 'SYMBOL_CHECKSIGN',
- 'SYMBOL_LEFTPRICE', 'SYMBOL_RIGHTPRICE',
- 'PRICE_CLOSE', 'PRICE_OPEN', 'PRICE_HIGH', 'PRICE_LOW',
- 'PRICE_MEDIAN', 'PRICE_TYPICAL', 'PRICE_WEIGHTED',
- 'VOLUME_TICK', 'VOLUME_REAL',
- 'STO_LOWHIGH', 'STO_CLOSECLOSE',
- 'MODE_OPEN', 'MODE_CLOSE', 'MODE_VOLUME',
- 'MODE_SMA', 'MODE_EMA', 'MODE_SMMA', 'MODE_LWMA',
- 'MODE_MAIN', 'MODE_SIGNAL', 'MODE_MAIN',
- 'MODE_PLUSDI', 'MODE_MINUSDI', 'MODE_UPPER',
- 'MODE_LOWER', 'MODE_GATORJAW', 'MODE_GATORTEETH',
- 'MODE_GATORLIPS', 'MODE_TENKANSEN',
- 'MODE_KIJUNSEN', 'MODE_SENKOUSPANA',
- 'MODE_SENKOUSPANB', 'MODE_CHINKOUSPAN',
- 'DRAW_LINE', 'DRAW_SECTION', 'DRAW_HISTOGRAM',
- 'DRAW_ARROW', 'DRAW_ZIGZAG', 'DRAW_NONE',
- 'STYLE_SOLID', 'STYLE_DASH', 'STYLE_DOT',
- 'STYLE_DASHDOT', 'STYLE_DASHDOTDOT',
- 'DRAW_NONE', 'DRAW_LINE', 'DRAW_SECTION', 'DRAW_HISTOGRAM',
- 'DRAW_ARROW', 'DRAW_ZIGZAG', 'DRAW_FILLING',
- 'INDICATOR_DATA', 'INDICATOR_COLOR_INDEX',
- 'INDICATOR_CALCULATIONS', 'INDICATOR_DIGITS',
- 'INDICATOR_HEIGHT', 'INDICATOR_LEVELS',
- 'INDICATOR_LEVELCOLOR', 'INDICATOR_LEVELSTYLE',
- 'INDICATOR_LEVELWIDTH', 'INDICATOR_MINIMUM',
- 'INDICATOR_MAXIMUM', 'INDICATOR_LEVELVALUE',
- 'INDICATOR_SHORTNAME', 'INDICATOR_LEVELTEXT',
- 'TERMINAL_BUILD', 'TERMINAL_CONNECTED',
- 'TERMINAL_DLLS_ALLOWED', 'TERMINAL_TRADE_ALLOWED',
- 'TERMINAL_EMAIL_ENABLED',
- 'TERMINAL_FTP_ENABLED', 'TERMINAL_MAXBARS',
- 'TERMINAL_CODEPAGE', 'TERMINAL_CPU_CORES',
- 'TERMINAL_DISK_SPACE', 'TERMINAL_MEMORY_PHYSICAL',
- 'TERMINAL_MEMORY_TOTAL',
- 'TERMINAL_MEMORY_AVAILABLE', 'TERMINAL_MEMORY_USED',
- 'TERMINAL_X64',
- 'TERMINAL_OPENCL_SUPPORT', 'TERMINAL_LANGUAGE',
- 'TERMINAL_COMPANY', 'TERMINAL_NAME',
- 'TERMINAL_PATH', 'TERMINAL_DATA_PATH',
- 'TERMINAL_COMMONDATA_PATH',
- 'MQL_PROGRAM_TYPE', 'MQL_DLLS_ALLOWED',
- 'MQL_TRADE_ALLOWED', 'MQL_DEBUG',
- 'MQL_PROFILER', 'MQL_TESTER', 'MQL_OPTIMIZATION',
- 'MQL_VISUAL_MODE',
- 'MQL_FRAME_MODE', 'MQL_LICENSE_TYPE', 'MQL_PROGRAM_NAME',
- 'MQL_PROGRAM_PATH',
- 'PROGRAM_SCRIPT', 'PROGRAM_EXPERT',
- 'PROGRAM_INDICATOR', 'LICENSE_FREE',
- 'LICENSE_DEMO', 'LICENSE_FULL', 'LICENSE_TIME',
- 'MODE_LOW', 'MODE_HIGH', 'MODE_TIME', 'MODE_BID',
- 'MODE_ASK', 'MODE_POINT',
- 'MODE_DIGITS', 'MODE_SPREAD', 'MODE_STOPLEVEL',
- 'MODE_LOTSIZE', 'MODE_TICKVALUE',
- 'MODE_TICKSIZE', 'MODE_SWAPLONG',
- 'MODE_SWAPSHORT', 'MODE_STARTING',
- 'MODE_EXPIRATION', 'MODE_TRADEALLOWED',
- 'MODE_MINLOT', 'MODE_LOTSTEP', 'MODE_MAXLOT',
- 'MODE_SWAPTYPE', 'MODE_PROFITCALCMODE',
- 'MODE_MARGINCALCMODE', 'MODE_MARGININIT',
- 'MODE_MARGINMAINTENANCE', 'MODE_MARGINHEDGED',
- 'MODE_MARGINREQUIRED', 'MODE_FREEZELEVEL',
- 'SUNDAY', 'MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY',
- 'FRIDAY', 'SATURDAY',
- 'ACCOUNT_LOGIN', 'ACCOUNT_TRADE_MODE',
- 'ACCOUNT_LEVERAGE',
- 'ACCOUNT_LIMIT_ORDERS', 'ACCOUNT_MARGIN_SO_MODE',
- 'ACCOUNT_TRADE_ALLOWED', 'ACCOUNT_TRADE_EXPERT',
- 'ACCOUNT_BALANCE',
- 'ACCOUNT_CREDIT', 'ACCOUNT_PROFIT', 'ACCOUNT_EQUITY',
- 'ACCOUNT_MARGIN',
- 'ACCOUNT_FREEMARGIN', 'ACCOUNT_MARGIN_LEVEL',
- 'ACCOUNT_MARGIN_SO_CALL',
- 'ACCOUNT_MARGIN_SO_SO', 'ACCOUNT_NAME',
- 'ACCOUNT_SERVER', 'ACCOUNT_CURRENCY',
- 'ACCOUNT_COMPANY', 'ACCOUNT_TRADE_MODE_DEMO',
- 'ACCOUNT_TRADE_MODE_CONTEST',
- 'ACCOUNT_TRADE_MODE_REAL', 'ACCOUNT_STOPOUT_MODE_PERCENT',
- 'ACCOUNT_STOPOUT_MODE_MONEY',
- 'STAT_INITIAL_DEPOSIT', 'STAT_WITHDRAWAL', 'STAT_PROFIT',
- 'STAT_GROSS_PROFIT',
- 'STAT_GROSS_LOSS', 'STAT_MAX_PROFITTRADE',
- 'STAT_MAX_LOSSTRADE', 'STAT_CONPROFITMAX',
- 'STAT_CONPROFITMAX_TRADES', 'STAT_MAX_CONWINS',
- 'STAT_MAX_CONPROFIT_TRADES',
- 'STAT_CONLOSSMAX', 'STAT_CONLOSSMAX_TRADES',
- 'STAT_MAX_CONLOSSES',
- 'STAT_MAX_CONLOSS_TRADES', 'STAT_BALANCEMIN',
- 'STAT_BALANCE_DD',
- 'STAT_BALANCEDD_PERCENT', 'STAT_BALANCE_DDREL_PERCENT',
- 'STAT_BALANCE_DD_RELATIVE', 'STAT_EQUITYMIN',
- 'STAT_EQUITY_DD',
- 'STAT_EQUITYDD_PERCENT', 'STAT_EQUITY_DDREL_PERCENT',
- 'STAT_EQUITY_DD_RELATIVE', 'STAT_EXPECTED_PAYOFF',
- 'STAT_PROFIT_FACTOR',
- 'STAT_RECOVERY_FACTOR', 'STAT_SHARPE_RATIO',
- 'STAT_MIN_MARGINLEVEL',
- 'STAT_CUSTOM_ONTESTER', 'STAT_DEALS', 'STAT_TRADES',
- 'STAT_PROFIT_TRADES',
- 'STAT_LOSS_TRADES', 'STAT_SHORT_TRADES', 'STAT_LONG_TRADES',
- 'STAT_PROFIT_SHORTTRADES', 'STAT_PROFIT_LONGTRADES',
- 'STAT_PROFITTRADES_AVGCON', 'STAT_LOSSTRADES_AVGCON',
- 'SERIES_BARS_COUNT', 'SERIES_FIRSTDATE', 'SERIES_LASTBAR_DATE',
- 'SERIES_SERVER_FIRSTDATE', 'SERIES_TERMINAL_FIRSTDATE',
- 'SERIES_SYNCHRONIZED',
- 'OP_BUY', 'OP_SELL', 'OP_BUYLIMIT', 'OP_SELLLIMIT',
- 'OP_BUYSTOP', 'OP_SELLSTOP',
- 'TRADE_ACTION_DEAL', 'TRADE_ACTION_PENDING',
- 'TRADE_ACTION_SLTP',
- 'TRADE_ACTION_MODIFY', 'TRADE_ACTION_REMOVE',
- '__DATE__', '__DATETIME__', '__LINE__', '__FILE__',
- '__PATH__', '__FUNCTION__',
- '__FUNCSIG__', '__MQLBUILD__', '__MQL4BUILD__',
- 'M_E', 'M_LOG2E', 'M_LOG10E', 'M_LN2', 'M_LN10',
- 'M_PI', 'M_PI_2', 'M_PI_4', 'M_1_PI',
- 'M_2_PI', 'M_2_SQRTPI', 'M_SQRT2', 'M_SQRT1_2',
- 'CHAR_MIN', 'CHAR_MAX', 'UCHAR_MAX',
- 'SHORT_MIN', 'SHORT_MAX', 'USHORT_MAX',
- 'INT_MIN', 'INT_MAX', 'UINT_MAX',
- 'LONG_MIN', 'LONG_MAX', 'ULONG_MAX',
- 'DBL_MIN', 'DBL_MAX', 'DBL_EPSILON', 'DBL_DIG', 'DBL_MANT_DIG',
- 'DBL_MAX_10_EXP', 'DBL_MAX_EXP', 'DBL_MIN_10_EXP', 'DBL_MIN_EXP',
- 'FLT_MIN', 'FLT_MAX', 'FLT_EPSILON',
- 'FLT_DIG', 'FLT_MANT_DIG', 'FLT_MAX_10_EXP',
- 'FLT_MAX_EXP', 'FLT_MIN_10_EXP', 'FLT_MIN_EXP', 'REASON_PROGRAM'
- 'REASON_REMOVE', 'REASON_RECOMPILE',
- 'REASON_CHARTCHANGE', 'REASON_CHARTCLOSE',
- 'REASON_PARAMETERS', 'REASON_ACCOUNT',
- 'REASON_TEMPLATE', 'REASON_INITFAILED',
- 'REASON_CLOSE', 'POINTER_INVALID'
- 'POINTER_DYNAMIC', 'POINTER_AUTOMATIC',
- 'NULL', 'EMPTY', 'EMPTY_VALUE', 'CLR_NONE', 'WHOLE_ARRAY',
- 'CHARTS_MAX', 'clrNONE', 'EMPTY_VALUE', 'INVALID_HANDLE',
- 'IS_DEBUG_MODE', 'IS_PROFILE_MODE', 'NULL', 'WHOLE_ARRAY', 'WRONG_VALUE',
- 'ERR_NO_ERROR', 'ERR_NO_RESULT', 'ERR_COMMON_ERROR',
- 'ERR_INVALID_TRADE_PARAMETERS',
- 'ERR_SERVER_BUSY', 'ERR_OLD_VERSION', 'ERR_NO_CONNECTION',
- 'ERR_NOT_ENOUGH_RIGHTS',
- 'ERR_TOO_FREQUENT_REQUESTS', 'ERR_MALFUNCTIONAL_TRADE',
- 'ERR_ACCOUNT_DISABLED',
- 'ERR_INVALID_ACCOUNT', 'ERR_TRADE_TIMEOUT',
- 'ERR_INVALID_PRICE', 'ERR_INVALID_STOPS',
- 'ERR_INVALID_TRADE_VOLUME', 'ERR_MARKET_CLOSED',
- 'ERR_TRADE_DISABLED',
- 'ERR_NOT_ENOUGH_MONEY', 'ERR_PRICE_CHANGED',
- 'ERR_OFF_QUOTES', 'ERR_BROKER_BUSY',
- 'ERR_REQUOTE', 'ERR_ORDER_LOCKED',
- 'ERR_LONG_POSITIONS_ONLY_ALLOWED', 'ERR_TOO_MANY_REQUESTS',
- 'ERR_TRADE_MODIFY_DENIED', 'ERR_TRADE_CONTEXT_BUSY',
- 'ERR_TRADE_EXPIRATION_DENIED',
- 'ERR_TRADE_TOO_MANY_ORDERS', 'ERR_TRADE_HEDGE_PROHIBITED',
- 'ERR_TRADE_PROHIBITED_BY_FIFO',
- 'FILE_READ', 'FILE_WRITE', 'FILE_BIN', 'FILE_CSV', 'FILE_TXT',
- 'FILE_ANSI', 'FILE_UNICODE',
- 'FILE_SHARE_READ', 'FILE_SHARE_WRITE', 'FILE_REWRITE',
- 'FILE_COMMON', 'FILE_EXISTS',
- 'FILE_CREATE_DATE', 'FILE_MODIFY_DATE',
- 'FILE_ACCESS_DATE', 'FILE_SIZE', 'FILE_POSITION',
- 'FILE_END', 'FILE_LINE_END', 'FILE_IS_COMMON',
- 'FILE_IS_TEXT', 'FILE_IS_BINARY',
- 'FILE_IS_CSV', 'FILE_IS_ANSI', 'FILE_IS_READABLE', 'FILE_IS_WRITABLE',
- 'SEEK_SET', 'SEEK_CUR', 'SEEK_END', 'CP_ACP',
- 'CP_OEMCP', 'CP_MACCP', 'CP_THREAD_ACP',
- 'CP_SYMBOL', 'CP_UTF7', 'CP_UTF8', 'IDOK', 'IDCANCEL', 'IDABORT',
- 'IDRETRY', 'IDIGNORE', 'IDYES', 'IDNO', 'IDTRYAGAIN', 'IDCONTINUE',
- 'MB_OK', 'MB_OKCANCEL', 'MB_ABORTRETRYIGNORE', 'MB_YESNOCANCEL',
- 'MB_YESNO', 'MB_RETRYCANCEL',
- 'MB_CANCELTRYCONTINUE', 'MB_ICONSTOP', 'MB_ICONERROR',
- 'MB_ICONHAND', 'MB_ICONQUESTION',
- 'MB_ICONEXCLAMATION', 'MB_ICONWARNING',
- 'MB_ICONINFORMATION', 'MB_ICONASTERISK',
- 'MB_DEFBUTTON1', 'MB_DEFBUTTON2', 'MB_DEFBUTTON3',
- 'MB_DEFBUTTON4'), suffix=r'\b'),
- Name.Constant),
- (words((
- 'Black', 'DarkGreen', 'DarkSlateGray', 'Olive',
- 'Green', 'Teal', 'Navy', 'Purple',
- 'Maroon', 'Indigo', 'MidnightBlue', 'DarkBlue',
- 'DarkOliveGreen', 'SaddleBrown',
- 'ForestGreen', 'OliveDrab', 'SeaGreen',
- 'DarkGoldenrod', 'DarkSlateBlue',
- 'Sienna', 'MediumBlue', 'Brown', 'DarkTurquoise',
- 'DimGray', 'LightSeaGreen',
- 'DarkViolet', 'FireBrick', 'MediumVioletRed',
- 'MediumSeaGreen', 'Chocolate',
- 'Crimson', 'SteelBlue', 'Goldenrod', 'MediumSpringGreen',
- 'LawnGreen', 'CadetBlue',
- 'DarkOrchid', 'YellowGreen', 'LimeGreen', 'OrangeRed',
- 'DarkOrange', 'Orange',
- 'Gold', 'Yellow', 'Chartreuse', 'Lime', 'SpringGreen',
- 'Aqua', 'DeepSkyBlue', 'Blue',
- 'Magenta', 'Red', 'Gray', 'SlateGray', 'Peru', 'BlueViolet',
- 'LightSlateGray', 'DeepPink',
- 'MediumTurquoise', 'DodgerBlue', 'Turquoise', 'RoyalBlue',
- 'SlateBlue', 'DarkKhaki',
- 'IndianRed', 'MediumOrchid', 'GreenYellow',
- 'MediumAquamarine', 'DarkSeaGreen',
- 'Tomato', 'RosyBrown', 'Orchid', 'MediumPurple',
- 'PaleVioletRed', 'Coral', 'CornflowerBlue',
- 'DarkGray', 'SandyBrown', 'MediumSlateBlue',
- 'Tan', 'DarkSalmon', 'BurlyWood',
- 'HotPink', 'Salmon', 'Violet', 'LightCoral', 'SkyBlue',
- 'LightSalmon', 'Plum',
- 'Khaki', 'LightGreen', 'Aquamarine', 'Silver',
- 'LightSkyBlue', 'LightSteelBlue',
- 'LightBlue', 'PaleGreen', 'Thistle', 'PowderBlue',
- 'PaleGoldenrod', 'PaleTurquoise',
- 'LightGray', 'Wheat', 'NavajoWhite', 'Moccasin',
- 'LightPink', 'Gainsboro', 'PeachPuff',
- 'Pink', 'Bisque', 'LightGoldenrod', 'BlanchedAlmond',
- 'LemonChiffon', 'Beige',
- 'AntiqueWhite', 'PapayaWhip', 'Cornsilk',
- 'LightYellow', 'LightCyan', 'Linen',
- 'Lavender', 'MistyRose', 'OldLace', 'WhiteSmoke',
- 'Seashell', 'Ivory', 'Honeydew',
- 'AliceBlue', 'LavenderBlush', 'MintCream', 'Snow',
- 'White'), prefix='(clr)?', suffix=r'\b'),
+ (words(_mql_builtins.keywords, suffix=r'\b'), Keyword),
+ (words(_mql_builtins.c_types, suffix=r'\b'), Keyword.Type),
+ (words(_mql_builtins.types, suffix=r'\b'), Name.Function),
+ (words(_mql_builtins.constants, suffix=r'\b'), Name.Constant),
+ (words(_mql_builtins.colors, prefix='(clr)?', suffix=r'\b'),
Name.Constant),
inherit,
],
# integer literals
# -- binary
- (r'0[bB][0-1]+', Number.Bin),
+ (r'0[bB][01]+', Number.Bin),
# -- hex
(r'0[xX][0-9a-fA-F]+', Number.Hex),
# -- octal
bygroups(Keyword.Reserved, Text, Operator, Text)),
(r'"', String, 'string'),
(r'(\w+)(\()', bygroups(Name.Function, Punctuation)),
- (r'([\w.!&|\(\)]+)(::)', bygroups(Name.Class, Punctuation)),
+ (r'([\w.!&|()]+)(::)', bygroups(Name.Class, Punctuation)),
(r'(\w+)(:)', bygroups(Keyword.Declaration, Punctuation)),
- (r'@[\{\(][^\)\}]+[\}\)]', Name.Variable),
+ (r'@[{(][^)}]+[})]', Name.Variable),
(r'[(){},;]', Punctuation),
(r'=>', Operator),
(r'->', Operator),
(r'\s+', Text),
],
'string': [
- (r'\$[\{\(]', String.Interpol, 'interpol'),
+ (r'\$[{(]', String.Interpol, 'interpol'),
(r'\\.', String.Escape),
(r'"', String, '#pop'),
(r'\n', String),
(r'.', String),
],
'interpol': [
- (r'\$[\{\(]', String.Interpol, '#push'),
- (r'[\}\)]', String.Interpol, '#pop'),
- (r'[^\$\{\(\)\}]+', String.Interpol),
+ (r'\$[{(]', String.Interpol, '#push'),
+ (r'[})]', String.Interpol, '#pop'),
+ (r'[^${()}]+', String.Interpol),
],
'arglist': [
(r'\)', Punctuation, '#pop'),
"netdb_ping_rate", "never_direct", "no_cache", "passthrough_proxy",
"pconn_timeout", "pid_filename", "pinger_program", "positive_dns_ttl",
"prefer_direct", "proxy_auth", "proxy_auth_realm", "query_icmp",
- "quick_abort", "quick_abort", "quick_abort_max", "quick_abort_min",
+ "quick_abort", "quick_abort_max", "quick_abort_min",
"quick_abort_pct", "range_offset_limit", "read_timeout",
"redirect_children", "redirect_program",
- "redirect_rewrites_host_header", "reference_age", "reference_age",
+ "redirect_rewrites_host_header", "reference_age",
"refresh_pattern", "reload_into_ims", "request_body_max_size",
"request_size", "request_timeout", "shutdown_lifetime",
"single_parent_bypass", "siteselect_timeout", "snmp_access",
(r'^M\s+', Generic.Inserted),
(r'^C\s+', Generic.Error),
(r'^D\s+', Generic.Deleted),
- (r'^[\?!]\s+', Comment.Preproc),
+ (r'^[?!]\s+', Comment.Preproc),
(r' >\s+.*\n', Comment.Preproc),
(r'.*\n', Text)
]
(r'\#[\w-]+', Name.Function),
(r'@[\w-]+', Keyword, 'atrule'),
(r'[\w-]+', Name.Tag),
- (r'[~\^\*!%&$\[\]\(\)<>\|+=@:;,./?-]', Operator),
+ (r'[~^*!%&$\[\]()<>|+=@:;,./?-]', Operator),
(r'"(\\\\|\\"|[^"])*"', String.Double),
(r"'(\\\\|\\'|[^'])*'", String.Single)
],
(r'\!important', Comment.Preproc),
(r'/\*(?:.|\n)*?\*/', Comment),
(r'\#[a-zA-Z0-9]{1,6}', Number),
- (r'[\.-]?[0-9]*[\.]?[0-9]+(em|px|pt|pc|in|mm|cm|ex|s)\b', Number),
+ (r'[.-]?[0-9]*[.]?[0-9]+(em|px|pt|pc|in|mm|cm|ex|s)\b', Number),
# Separate regex for percentages, as can't do word boundaries with %
- (r'[\.-]?[0-9]*[\.]?[0-9]+%', Number),
+ (r'[.-]?[0-9]*[.]?[0-9]+%', Number),
(r'-?[0-9]+', Number),
- (r'[~\^\*!%&<>\|+=@:,./?-]+', Operator),
+ (r'[~^*!%&<>|+=@:,./?-]+', Operator),
(r'[\[\]();]+', Punctuation),
(r'"(\\\\|\\"|[^"])*"', String.Double),
(r"'(\\\\|\\'|[^'])*'", String.Single),
(r'(-?\d+)(\%|[a-z]+)?', bygroups(Number.Integer, Keyword.Type)),
(r'(-?\d*\.\d+)(\%|[a-z]+)?', bygroups(Number.Float, Keyword.Type)),
(r'#\{', String.Interpol, 'interpolation'),
- (r'[~\^\*!&%<>\|+=@:,./?-]+', Operator),
+ (r'[~^*!&%<>|+=@:,./?-]+', Operator),
(r'[\[\]()]+', Punctuation),
(r'"', String.Double, 'string-double'),
(r"'", String.Single, 'string-single'),
(r'[\w-]+', Name.Tag),
(r'#\{', String.Interpol, 'interpolation'),
(r'&', Keyword),
- (r'[~\^\*!&\[\]\(\)<>\|+=@:;,./?-]', Operator),
+ (r'[~^*!&\[\]()<>|+=@:;,./?-]', Operator),
(r'"', String.Double, 'string-double'),
(r"'", String.Single, 'string-single'),
],
filenames = ['*.sass']
mimetypes = ['text/x-sass']
- flags = re.IGNORECASE
+ flags = re.IGNORECASE | re.MULTILINE
+
tokens = {
'root': [
(r'[ \t]*\n', Text),
(r'(@mixin)( [\w-]+)', bygroups(Keyword, Name.Function), 'value'),
(r'(@include)( [\w-]+)', bygroups(Keyword, Name.Decorator), 'value'),
(r'@extend', Keyword, 'selector'),
+ (r'(@media)(\s+)', bygroups(Keyword, Text), 'value'),
(r'@[\w-]+', Keyword, 'selector'),
(r'(\$[\w-]*\w)([ \t]*:)', bygroups(Name.Variable, Operator), 'value'),
(r'(?=[^;{}][;}])', Name.Attribute, 'attr'),
}
for group, common in iteritems(common_sass_tokens):
tokens[group] = copy.copy(common)
- tokens['value'].extend([(r'\n', Text), (r'[;{}]', Punctuation, 'root')])
- tokens['selector'].extend([(r'\n', Text), (r'[;{}]', Punctuation, 'root')])
+ tokens['value'].extend([(r'\n', Text), (r'[;{}]', Punctuation, '#pop')])
+ tokens['selector'].extend([(r'\n', Text), (r'[;{}]', Punctuation, '#pop')])
(r'\]', String, '#pop'),
],
'delimited_parenthesis': [
- (r'[^\(\)]+', String),
+ (r'[^()]+', String),
(r'\(', String, 'delimited_inside_parenthesis'),
(r'\)"', String, '#pop'),
],
'delimited_inside_parenthesis': [
- (r'[^\(\)]+', String),
+ (r'[^()]+', String),
(r'\(', String, '#push'),
(r'\)', String, '#pop'),
],
from pygments.lexer import RegexLexer, include, bygroups
from pygments.token import Keyword, Text, Comment, Name, String, Number, \
- Punctuation
+ Punctuation
__all__ = ['SmaliLexer']
(r'\s+', Text),
],
'instruction': [
- (r'\b[vp]\d+\b', Name.Builtin), # registers
- (r'\b[a-z][A-Za-z0-9/-]+\s+', Text), # instructions
+ (r'\b[vp]\d+\b', Name.Builtin), # registers
+ (r'\b[a-z][A-Za-z0-9/-]+\s+', Text), # instructions
],
'literal': [
(r'".*"', String),
bygroups(Punctuation, Name.Variable, Punctuation)),
],
'method': [
- (r'<(?:cl)?init>', Name.Function), # constructor
+ (r'<(?:cl)?init>', Name.Function), # constructor
(r'(\$?\b)([\w$]*)(\()',
bygroups(Punctuation, Name.Function, Punctuation)),
],
],
'punctuation': [
(r'->', Punctuation),
- (r'[{},\(\):=\.-]', Punctuation),
+ (r'[{},():=.-]', Punctuation),
],
'type': [
(r'[ZBSCIJFDV\[]+', Keyword.Type),
(r'^(?:---|\.\.\.)(?=[ ]|$)', reset_indent(Name.Namespace),
'block-line'),
# indentation spaces
- (r'[ ]*(?![ \t\n\r\f\v]|$)', save_indent(Text, start=True),
+ (r'[ ]*(?!\s|$)', save_indent(Text, start=True),
('block-line', 'indentation')),
],
# the %YAG directive
'tag-directive': [
# a tag handle and the corresponding prefix
- (r'([ ]+)(!|![0-9A-Za-z_-]*!)'
- r'([ ]+)(!|!?[0-9A-Za-z;/?:@&=+$,_.!~*\'()\[\]%-]+)',
+ (r'([ ]+)(!|![\w-]*!)'
+ r'([ ]+)(!|!?[\w;/?:@&=+$,.!~*\'()\[\]%-]+)',
bygroups(Text, Keyword.Type, Text, Keyword.Type),
'ignored-line'),
],
# flow collections and quoted scalars
include('flow-nodes'),
# a plain scalar
- (r'(?=[^ \t\n\r\f\v?:,\[\]{}#&*!|>\'"%@`-]|[?:-][^ \t\n\r\f\v])',
+ (r'(?=[^\s?:,\[\]{}#&*!|>\'"%@`-]|[?:-]\S)',
something(Name.Variable),
'plain-scalar-in-block-context'),
],
# tags, anchors, aliases
'descriptors': [
# a full-form tag
- (r'!<[0-9A-Za-z;/?:@&=+$,_.!~*\'()\[\]%-]+>', Keyword.Type),
+ (r'!<[\w;/?:@&=+$,.!~*\'()\[\]%-]+>', Keyword.Type),
# a tag in the form '!', '!suffix' or '!handle!suffix'
- (r'!(?:[0-9A-Za-z_-]+)?'
- r'(?:![0-9A-Za-z;/?:@&=+$,_.!~*\'()\[\]%-]+)?', Keyword.Type),
+ (r'!(?:[\w-]+)?'
+ r'(?:![\w;/?:@&=+$,.!~*\'()\[\]%-]+)?', Keyword.Type),
# an anchor
- (r'&[0-9A-Za-z_-]+', Name.Label),
+ (r'&[\w-]+', Name.Label),
# an alias
- (r'\*[0-9A-Za-z_-]+', Name.Variable),
+ (r'\*[\w-]+', Name.Variable),
],
# block collections and scalars
# nested collections and quoted scalars
include('flow-nodes'),
# a plain scalar
- (r'(?=[^ \t\n\r\f\v?:,\[\]{}#&*!|>\'"%@`])',
+ (r'(?=[^\s?:,\[\]{}#&*!|>\'"%@`])',
something(Name.Variable),
'plain-scalar-in-flow-context'),
],
# indentation spaces (we may leave the state here)
(r'^[ ]*', parse_block_scalar_indent(Text)),
# line content
- (r'[^\n\r\f\v]+', Name.Constant),
+ (r'[\S\t ]+', Name.Constant),
],
# the content of a literal or folded scalar
# escaping of the quote character
(r'\'\'', String.Escape),
# regular non-whitespace characters
- (r'[^ \t\n\r\f\v\']+', String),
+ (r'[^\s\']+', String),
# the closing quote
(r'\'', String, '#pop'),
],
(r'\\(?:x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})',
String.Escape),
# regular non-whitespace characters
- (r'[^ \t\n\r\f\v\"\\]+', String),
+ (r'[^\s"\\]+', String),
# the closing quote
(r'"', String, '#pop'),
],
# other whitespaces are a part of the value
(r'[ ]+', Literal.Scalar.Plain),
# regular non-whitespace characters
- (r'(?::(?![ \t\n\r\f\v])|[^ \t\n\r\f\v:])+', Literal.Scalar.Plain),
+ (r'(?::(?!\s)|[^\s:])+', Literal.Scalar.Plain),
],
# a plain scalar is the flow context
# other whitespaces are a part of the value
(r'[ ]+', Name.Variable),
# regular non-whitespace characters
- (r'[^ \t\n\r\f\v,:?\[\]{}]+', Name.Variable),
+ (r'[^\s,:?\[\]{}]+', Name.Variable),
],
}
(cs_ident, Name),
],
'class': [
- (cs_ident, Name.Class, '#pop')
+ (cs_ident, Name.Class, '#pop'),
+ default('#pop'),
],
'namespace': [
(r'(?=\()', Text, '#pop'), # using (resource)
- ('(' + cs_ident + r'|\.)+', Name.Namespace, '#pop')
+ ('(' + cs_ident + r'|\.)+', Name.Namespace, '#pop'),
]
}
(r"'(\\\\|\\'|[^']*?)'", String.Single),
(r'[a-zA-Z_]\w*', Name),
(r'(\d+\.\d*|\d*\.\d+)([fF][+-]?[0-9]+)?', Number.Float),
- (r'[0-9][0-9\.]*(ms?|d|h|s)', Number),
+ (r'[0-9][0-9.]*(ms?|d|h|s)', Number),
(r'0\d+', Number.Oct),
(r'0x[a-fA-F0-9]+', Number.Hex),
(r'\d+L', Number.Integer.Long),
filenames = ['*.vb', '*.bas']
mimetypes = ['text/x-vbnet', 'text/x-vba'] # (?)
+ uni_name = '[_' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl') + ']' + \
+ '[' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl', 'Nd', 'Pc',
+ 'Cf', 'Mn', 'Mc') + ']*'
+
flags = re.MULTILINE | re.IGNORECASE
tokens = {
'root': [
(r'\n', Text),
(r'rem\b.*?\n', Comment),
(r"'.*?\n", Comment),
- (r'#If\s.*?\sThen|#ElseIf\s.*?\sThen|#End\s+If|#Const|'
+ (r'#If\s.*?\sThen|#ElseIf\s.*?\sThen|#Else|#End\s+If|#Const|'
r'#ExternalSource.*?\n|#End\s+ExternalSource|'
r'#Region.*?\n|#End\s+Region|#ExternalChecksum',
Comment.Preproc),
- (r'[\(\){}!#,.:]', Punctuation),
+ (r'[(){}!#,.:]', Punctuation),
(r'Option\s+(Strict|Explicit|Compare)\s+'
r'(On|Off|Binary|Text)', Keyword.Declaration),
(r'(?<!\.)(AddHandler|Alias|'
r'<=|>=|<>|[-&*/\\^+=<>\[\]]',
Operator),
('"', String, 'string'),
- ('[a-z_]\w*[%&@!#$]?', Name),
+ (r'_\n', Text), # Line continuation (must be before Name)
+ (uni_name + '[%&@!#$]?', Name),
('#.*?#', Literal.Date),
- (r'(\d+\.\d*|\d*\.\d+)([fF][+-]?[0-9]+)?', Number.Float),
+ (r'(\d+\.\d*|\d*\.\d+)(F[+-]?[0-9]+)?', Number.Float),
(r'\d+([SILDFR]|US|UI|UL)?', Number.Integer),
(r'&H[0-9a-f]+([SILDFR]|US|UI|UL)?', Number.Integer),
(r'&O[0-7]+([SILDFR]|US|UI|UL)?', Number.Integer),
- (r'_\n', Text), # Line continuation
],
'string': [
(r'""', String),
(r'[^"]+', String),
],
'dim': [
- (r'[a-z_]\w*', Name.Variable, '#pop'),
+ (uni_name, Name.Variable, '#pop'),
default('#pop'), # any other syntax
],
'funcname': [
- (r'[a-z_]\w*', Name.Function, '#pop'),
+ (uni_name, Name.Function, '#pop'),
],
'classname': [
- (r'[a-z_]\w*', Name.Class, '#pop'),
+ (uni_name, Name.Class, '#pop'),
],
'namespace': [
- (r'[a-z_][\w.]*', Name.Namespace, '#pop'),
+ (uni_name, Name.Namespace),
+ (r'\.', Name.Namespace),
+ default('#pop'),
],
'end': [
(r'\s+', Text),
}
def analyse_text(text):
- if re.search(r'^\s*(#If|Module|Namespace)', text,
- re.IGNORECASE | re.MULTILINE):
+ if re.search(r'^\s*(#If|Module|Namespace)', text, re.MULTILINE):
return 0.5
tokens = {
'escape-sequence': [
- (r'\\[\\\"\'ntbrafv]', String.Escape),
+ (r'\\[\\"\'ntbrafv]', String.Escape),
(r'\\[0-9]{3}', String.Escape),
(r'\\u[0-9a-fA-F]{4}', String.Escape),
(r'\\U[0-9a-fA-F]{8}', String.Escape),
import re
-from pygments.lexer import RegexLexer, bygroups, words, include
+from pygments.lexer import RegexLexer, bygroups, words, include, default
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
Number, Punctuation, Literal
tokens = {
'root': [
(r'[ \t]+', Text),
- (r'[,;{}\[\]\(\)]', Punctuation),
+ (r'[,;{}\[\]()]', Punctuation),
(r'/(\\\n)?/(\n|(.|\n)*?[^\\]\n)', Comment.Single),
(r'/(\\\n)?\*(.|\n)*?\*(\\\n)?/', Comment.Multiline),
(words((
bygroups(Keyword.Declaration, Text), 'message'),
(r'(enum|group|service)(\s+)',
bygroups(Keyword.Declaration, Text), 'type'),
- (r'\".*\"', String),
+ (r'\".*?\"', String),
+ (r'\'.*?\'', String),
(r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*', Number.Float),
(r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float),
(r'(\-?(inf|nan))\b', Number.Float),
(r'0[0-7]+[LlUu]*', Number.Oct),
(r'\d+[LlUu]*', Number.Integer),
(r'[+-=]', Operator),
- (r'([a-zA-Z_][\w\.]*)([ \t]*)(=)',
+ (r'([a-zA-Z_][\w.]*)([ \t]*)(=)',
bygroups(Name.Attribute, Text, Operator)),
- ('[a-zA-Z_][\w\.]*', Name),
+ ('[a-zA-Z_][\w.]*', Name),
],
'package': [
- (r'[a-zA-Z_]\w*', Name.Namespace, '#pop')
+ (r'[a-zA-Z_]\w*', Name.Namespace, '#pop'),
+ default('#pop'),
],
'message': [
- (r'[a-zA-Z_]\w*', Name.Class, '#pop')
+ (r'[a-zA-Z_]\w*', Name.Class, '#pop'),
+ default('#pop'),
],
'type': [
- (r'[a-zA-Z_]\w*', Name, '#pop')
+ (r'[a-zA-Z_]\w*', Name, '#pop'),
+ default('#pop'),
],
}
aliases = ['bro']
filenames = ['*.bro']
- _hex = r'[0-9a-fA-F_]+'
+ _hex = r'[0-9a-fA-F_]'
_float = r'((\d*\.?\d+)|(\d+\.?\d*))([eE][-+]?\d+)?'
_h = r'[A-Za-z0-9][-A-Za-z0-9]*'
(r'[{}()\[\]$.,;]', Punctuation),
# Identfier
(r'([_a-zA-Z]\w*)(::)', bygroups(Name, Name.Namespace)),
- (r'[a-zA-Z_][a-zA-Z_0-9]*', Name)
+ (r'[a-zA-Z_]\w*', Name)
],
'string': [
(r'"', String, '#pop'),
tokens = {
'root': [
- (r'\{[^\}]*\}', Comment.Multiline),
+ (r'\{[^}]*\}', Comment.Multiline),
(r'declare', Keyword.Constant),
(r'(if|then|else|endif|while|do|endwhile|and|or|prompt|object'
r'|create|on|line|with|global|routine|value|endroutine|constant'
r'|delete|enable|windows|name|notprotected)(?! *[=<>.,()])',
Keyword),
(r'(true|false|null|empty|error|locked)', Keyword.Constant),
- (r'[~\^\*\#!%&\[\]\(\)<>\|+=:;,./?-]', Operator),
+ (r'[~^*#!%&\[\]()<>|+=:;,./?-]', Operator),
(r'"[^"]*"', String),
- (r'(\.)([a-z_\$][\w\$]*)', bygroups(Operator, Name.Attribute)),
+ (r'(\.)([a-z_$][\w$]*)', bygroups(Operator, Name.Attribute)),
(r'[0-9][0-9]*(\.[0-9]+(e[+\-]?[0-9]+)?)?', Number),
- (r'[a-z_\$][\w\$]*', Name),
+ (r'[a-z_$][\w$]*', Name),
(r'[\r\n]+', Text),
(r'\s+', Text)
]
flags = re.MULTILINE | re.DOTALL
- iden_rex = r'[a-zA-Z_][a-zA-Z0-9_\']*'
+ iden_rex = r'[a-zA-Z_][\w\']*'
text_tuple = (r'[^\S\n]+', Text)
tokens = {
(r'(and|or|implies|iff|in)\b', Operator.Word),
(r'(fun|pred|fact|assert)(\s+)', bygroups(Keyword, Text), 'fun'),
(r'!|#|&&|\+\+|<<|>>|>=|<=>|<=|\.|->', Operator),
- (r'[-+/*%=<>&!^|~\{\}\[\]\(\)\.]', Operator),
+ (r'[-+/*%=<>&!^|~{}\[\]().]', Operator),
(iden_rex, Name),
(r'[:,]', Punctuation),
(r'[0-9]+', Number.Integer),
'file_contents', 'format', 'index', 'length', 'match', 'matches', 'replace',
'splice', 'split', 'substr', 'to_lowercase', 'to_uppercase', 'debug', 'error',
'traceback', 'deprecated', 'base64_decode', 'base64_encode', 'digest', 'escape',
- 'unescape', 'append', 'create', 'first', 'nlist', 'key', 'length', 'list', 'merge', 'next',
- 'prepend', 'splice', 'is_boolean', 'is_defined', 'is_double', 'is_list', 'is_long',
+ 'unescape', 'append', 'create', 'first', 'nlist', 'key', 'list', 'merge', 'next',
+ 'prepend', 'is_boolean', 'is_defined', 'is_double', 'is_list', 'is_long',
'is_nlist', 'is_null', 'is_number', 'is_property', 'is_resource', 'is_string',
'to_boolean', 'to_double', 'to_long', 'to_string', 'clone', 'delete', 'exists',
'path_exists', 'if_exists', 'return', 'value'), prefix=r'\b', suffix=r'\s*\b'),
'type-error-value', 'type-for-copy', 'type-union', 'union', 'values',
'vector', 'zero?'))
- valid_name = '\\\\?[a-z0-9' + re.escape('!&*<>|^$%@_-+~?/=') + ']+'
+ valid_name = '\\\\?[\\w!&*<>|^$%@\\-+~?/=]+'
def get_tokens_unprocessed(self, text):
for index, token, value in RegexLexer.get_tokens_unprocessed(self, text):
(r"'(\\.|\\[0-7]{1,3}|\\x[a-f0-9]{1,2}|[^\\\'\n])'", String.Char),
# binary integer
- (r'#[bB][01]+', Number.Bin),
+ (r'#b[01]+', Number.Bin),
# octal integer
- (r'#[oO][0-7]+', Number.Oct),
+ (r'#o[0-7]+', Number.Oct),
# floating point
(r'[-+]?(\d*\.\d+(e[-+]?\d+)?|\d+(\.\d*)?e[-+]?\d+)', Number.Float),
(r'[-+]?\d+', Number.Integer),
# hex integer
- (r'#[xX][0-9a-f]+', Number.Hex),
+ (r'#x[0-9a-f]+', Number.Hex),
# Macro parameters
(r'(\?' + valid_name + ')(:)'
(r'\?' + valid_name, Name.Tag),
# Punctuation
- (r'(=>|::|#\(|#\[|##|\?\?|\?=|\?|[(){}\[\],\.;])', Punctuation),
+ (r'(=>|::|#\(|#\[|##|\?\?|\?=|\?|[(){}\[\],.;])', Punctuation),
# Most operators are picked up as names and then re-flagged.
# This one isn't valid in a name though, so we pick it up now.
(r'"', String, 'string'),
(r'\'', String, 'string'),
(r'(\d+\.\d*|\.\d+|\d+)e[+-]?\d+[lu]*', Number.Float),
- (r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float),
+ (r'(\d+\.\d*|\.\d+|\d+f)f?', Number.Float),
(r'0x[0-9a-f]+[lu]*', Number.Hex),
(r'0[0-7]+[lu]*', Number.Oct),
- (r'\d+[LlUu]*', Number.Integer),
+ (r'\d+[lu]*', Number.Integer),
(r'\*/', Error),
(r'[~!%^&*+=|?:<>/-]+', Operator),
(r'[{}()\[\],.;]', Punctuation),
],
'numbers': [
(r'0[xX][a-fA-F0-9]+', Number.Hex),
- (r'0[bB][0-1]+', Number.Bin),
+ (r'0[bB][01]+', Number.Bin),
(r'0[cC][0-7]+', Number.Oct),
(r'([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+)', Number.Float),
(r'[0-9]+', Number.Integer),
(r'\{', r'\}', 'cb'),
(r'\[', r'\]', 'sb'),
(r'\(', r'\)', 'pa'),
- (r'\<', r'\>', 'ab'),
+ (r'<', r'>', 'ab'),
(r'/', r'/', 'slas'),
(r'\|', r'\|', 'pipe'),
('"', '"', 'quot'),
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 = '[A-Za-z_0-9]'
- name_re = r'(?:\.\.\.|[a-z_]%s*[!\?]?)' % alnum
+ alnum = '\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)
special_atom_re = r'(?:\.\.\.|<<>>|%\{\}|%|\{\})'
tokens = {
'root': [
(r'[0-9a-f]', Number),
- (r'[\+\*/%!`-]', Operator), # Traditional math
+ (r'[+*/%!`-]', Operator), # Traditional math
(r'[<>^v?\[\]rxjk]', Name.Variable), # Move, imperatives
(r'[:\\$.,n]', Name.Builtin), # Stack ops, imperatives
(r'[|_mw]', Keyword),
# Identifiers
(r'\b(%s)\b' % '|'.join(opcodes), Name.Function),
(r'\b(%s)\b' % '|'.join(modifiers), Name.Decorator),
- (r'[A-Za-z_][A-Za-z_0-9]+', Name),
+ (r'[A-Za-z_]\w+', Name),
# Operators
(r'[-+*/%]', Operator),
(r'[#$@<>]', Operator), # mode
(r'SYNTAX:\s', Keyword),
(r'ALIEN:\s', Keyword),
(r'(STRUCT:)(\s+)(\S+)', bygroups(Keyword, Text, Name.Class)),
- (r'(FUNCTION:)(\s+\S+\s+)(\S+)(\s+\(\s+[^\)]+\)\s)',
+ (r'(FUNCTION:)(\s+\S+\s+)(\S+)(\s+\(\s+[^)]+\)\s)',
bygroups(Keyword.Namespace, Text, Name.Function, Text)),
- (r'(FUNCTION-ALIAS:)(\s+)(\S+)(\s+\S+\s+)(\S+)(\s+\(\s+[^\)]+\)\s)',
+ (r'(FUNCTION-ALIAS:)(\s+)(\S+)(\s+\S+\s+)(\S+)(\s+\(\s+[^)]+\)\s)',
bygroups(Keyword.Namespace, Text, Name.Function, Text, Name.Function, Text)),
# vocab.private
id=r'[a-zA-Z_]\w*',
# all chars which can be part of type definition. Starts with
# either letter, or [ (maps), or | (funcs)
- type=r'(?:\[|[a-zA-Z_]|\|)[:\w\[\]\|\->\?]*?',
+ type=r'(?:\[|[a-zA-Z_]|\|)[:\w\[\]|\->?]*?',
)
)
(r'\+\+|\-\-|\+|\-|\*|/|\|\||&&|<=>|<=|<|>=|>|=|!|\[|\]', Operator)
],
'inType': [
- (r'[\[\]\|\->:\?]', Punctuation),
+ (r'[\[\]|\->:?]', Punctuation),
(s(r'$id'), Name.Class),
default('#pop'),
(r'[ \t]+', Text), # consume whitespaces
(r'(\[)(\w+)(\])',
bygroups(Punctuation, Comment.Special, Punctuation)), # ffi
- (r'(\")?([\w\.]+)(\")?',
+ (r'(\")?([\w.]+)(\")?',
bygroups(Punctuation, Name.Namespace, Punctuation)), # podname
(r'::', Punctuation, 'usingClass'),
default('#pop')
(r'[ \t]+', Text), # consume whitespaces
(r'(as)(\s+)(\w+)',
bygroups(Keyword.Declaration, Text, Name.Class), '#pop:2'),
- (r'[\w\$]+', Name.Class),
+ (r'[\w$]+', Name.Class),
default('#pop:2') # jump out to root state
],
'facet': [
(r'/[*]', Comment.Multiline, 'comment2'),
],
'comment2': [
- (r'[^\/*]', Comment.Multiline),
+ (r'[^/*]', Comment.Multiline),
(r'/[*]', Comment.Multiline, '#push'),
(r'[*]/', Comment.Multiline, '#pop'),
- (r'[\/*]', Comment.Multiline),
+ (r'[/*]', Comment.Multiline),
],
'if0': [
(r'^\s*#if.*?(?<!\\)\n', Comment, '#push'),
aliases = ['fortran']
filenames = ['*.f', '*.f90', '*.F', '*.F90']
mimetypes = ['text/x-fortran']
- flags = re.IGNORECASE
+ flags = re.IGNORECASE | re.MULTILINE
# Data Types: INTEGER, REAL, COMPLEX, LOGICAL, CHARACTER and DOUBLE PRECISION
# Operators: **, *, +, -, /, <, >, <=, >=, ==, /=
tokens = {
'root': [
+ (r'^#.*\n', Comment.Preproc),
(r'!.*\n', Comment),
include('strings'),
include('core'),
- (r'[a-z]\w*', Name.Variable),
+ (r'[a-z][\w$]*', Name),
include('nums'),
(r'[\s]+', Text),
],
(r'(::)', Keyword.Declaration),
- (r'[()\[\],:&%;]', Punctuation),
+ (r'[()\[\],:&%;.]', Punctuation),
# Intrinsics
(words((
'Abort', 'Abs', 'Access', 'AChar', 'ACos', 'ACosH', 'AdjustL',
'BLT', 'Bit_Size', 'BTest', 'CAbs', 'CCos', 'Ceiling', 'CExp',
'Char', 'ChDir', 'ChMod', 'CLog', 'Cmplx', 'Command_Argument_Count',
'Complex', 'Conjg', 'Cos', 'CosH', 'Count', 'CPU_Time', 'CShift',
- 'CSin', 'CSqRt', 'CTime', 'C_Funloc', 'C_Loc', 'C_Associated',
+ 'CSin', 'CSqRt', 'CTime', 'C_Loc', 'C_Associated',
'C_Null_Ptr', 'C_Null_Funptr', 'C_F_Pointer', 'C_F_ProcPointer',
'C_Null_Char', 'C_Alert', 'C_Backspace', 'C_Form_Feed', 'C_FunLoc',
- 'C_Loc', 'C_Sizeof', 'C_New_Line', 'C_Carriage_Return',
+ 'C_Sizeof', 'C_New_Line', 'C_Carriage_Return',
'C_Horizontal_Tab', 'C_Vertical_Tab', 'DAbs', 'DACos', 'DASin',
'DATan', 'Date_and_Time', 'DbesJ', 'DbesJN', 'DbesY',
'DbesYN', 'Dble', 'DCos', 'DCosH', 'DDiM', 'DErF',
- 'DErFC', 'DExp', 'Digits', 'DiM', 'DInt', 'DLog', 'DLog', 'DMax',
+ 'DErFC', 'DExp', 'Digits', 'DiM', 'DInt', 'DLog', 'DMax',
'DMin', 'DMod', 'DNInt', 'Dot_Product', 'DProd', 'DSign', 'DSinH',
'DShiftL', 'DShiftR', 'DSin', 'DSqRt', 'DTanH', 'DTan', 'DTime',
'EOShift', 'Epsilon', 'ErF', 'ErFC', 'ErFC_Scaled', 'ETime',
(r'[.*{}]', Punctuation),
],
'strings': [
- (r'"(?:\\[tbnrf\'\"\\]|[^\\"])*"', String),
+ (r'"(?:\\[tbnrf\'"\\]|[^\\"])*"', String),
(r'`(?:``|[^`])+`', Name.Variable),
],
'whitespace': [
'sampler2DRectShadow', 'sizeof', 'cast', 'namespace', 'using'),
prefix=r'\b', suffix=r'\b'),
Keyword), # future use
- (r'[a-zA-Z_][a-zA-Z_0-9]*', Name),
+ (r'[a-zA-Z_]\w*', Name),
(r'\.', Punctuation),
(r'\s+', Text),
],
filenames = ['*.ps', '*.eps']
mimetypes = ['application/postscript']
- delimiter = r'\(\)\<\>\[\]\{\}\/\%\s'
+ delimiter = r'()<>\[\]{}/%\s'
delimiter_end = r'(?=[%s])' % delimiter
valid_name_chars = r'[^%s]' % delimiter
],
'stringliteral': [
- (r'[^\(\)\\]+', String),
+ (r'[^()\\]+', String),
(r'\\', String.Escape, 'escape'),
(r'\(', String, '#push'),
(r'\)', String, '#pop'),
(r'[\[\](){}<>;,]', Punctuation),
(r'[-+*/=]', Operator),
(r'\b(x|y|z|u|v)\b', Name.Builtin.Pseudo),
- (r'[a-zA-Z_][a-zA-Z_0-9]*', Name),
+ (r'[a-zA-Z_]\w*', Name),
(r'[0-9]+\.[0-9]*', Number.Float),
(r'\.[0-9]+', Number.Float),
(r'[0-9]+', Number.Integer),
# Whitespace:
(r'\s+', Text),
# (r'--\s*|.*$', Comment.Doc),
- (r'--(?![!#$%&*+./<=>?@\^|_~:\\]).*?$', Comment.Single),
+ (r'--(?![!#$%&*+./<=>?@^|_~:\\]).*?$', Comment.Single),
(r'\{-', Comment.Multiline, 'comment'),
# Lexemes:
# Identifiers
(r'\s+', Text),
(r'[' + uni.Lu + r']\w*', Keyword.Type),
(r'(_[\w\']+|[' + uni.Ll + r'][\w\']*)', Name.Function),
- (r'--(?![!#$%&*+./<=>?@\^|_~:\\]).*?$', Comment.Single),
+ (r'--(?![!#$%&*+./<=>?@^|_~:\\]).*?$', Comment.Single),
(r'\{-', Comment.Multiline, 'comment'),
(r',', Punctuation),
(r'[:!#$%&*+.\\/<=>?@^|~-]+', Operator),
],
'escape': [
(r'[abfnrtv"\'&\\]', String.Escape, '#pop'),
- (r'\^[][' + uni.Lu + r'@\^_]', String.Escape, '#pop'),
+ (r'\^[][' + uni.Lu + r'@^_]', String.Escape, '#pop'),
('|'.join(ascii), String.Escape, '#pop'),
(r'o[0-7]+', String.Escape, '#pop'),
(r'x[\da-fA-F]+', String.Escape, '#pop'),
# Comments
(r'^(\s*)(%%%s)' % '|'.join(directives),
bygroups(Text, Keyword.Reserved)),
- (r'(\s*)(--(?![!#$%&*+./<=>?@\^|_~:\\]).*?)$', bygroups(Text, Comment.Single)),
+ (r'(\s*)(--(?![!#$%&*+./<=>?@^|_~:\\]).*?)$', bygroups(Text, Comment.Single)),
(r'(\s*)(\|{3}.*?)$', bygroups(Text, Comment.Single)),
(r'(\s*)(\{-)', bygroups(Text, Comment.Multiline), 'comment'),
# Declaration
- (r'^(\s*)([^\s\(\)\{\}]+)(\s*)(:)(\s*)',
+ (r'^(\s*)([^\s(){}]+)(\s*)(:)(\s*)',
bygroups(Text, Name.Function, Text, Operator.Word, Text)),
# Identifiers
(r'\b(%s)(?!\')\b' % '|'.join(reserved), Keyword.Reserved),
(r'[a-z][\w\']*', Text),
# Special Symbols
(r'(<-|::|->|=>|=)', Operator.Word), # specials
- (r'([\(\)\{\}\[\]:!#$%&*+.\\/<=>?@^|~-]+)', Operator.Word), # specials
+ (r'([(){}\[\]:!#$%&*+.\\/<=>?@^|~-]+)', Operator.Word), # specials
# Numbers
(r'\d+[eE][+-]?\d+', Number.Float),
(r'\d+\.\d+([eE][+-]?\d+)?', Number.Float),
# Strings
(r"'", String.Char, 'character'),
(r'"', String, 'string'),
- (r'[^\s\(\)\{\}]+', Text),
+ (r'[^\s(){}]+', Text),
(r'\s+?', Text), # Whitespace
],
'module': [
],
'escape': [
(r'[abfnrtv"\'&\\]', String.Escape, '#pop'),
- (r'\^[][A-Z@\^_]', String.Escape, '#pop'),
+ (r'\^[][A-Z@^_]', String.Escape, '#pop'),
('|'.join(ascii), String.Escape, '#pop'),
(r'o[0-7]+', String.Escape, '#pop'),
(r'x[\da-fA-F]+', String.Escape, '#pop'),
tokens = {
'root': [
# Declaration
- (r'^(\s*)([^\s\(\)\{\}]+)(\s*)(:)(\s*)',
+ (r'^(\s*)([^\s(){}]+)(\s*)(:)(\s*)',
bygroups(Text, Name.Function, Text, Operator.Word, Text)),
# Comments
- (r'--(?![!#$%&*+./<=>?@\^|_~:\\]).*?$', Comment.Single),
+ (r'--(?![!#$%&*+./<=>?@^|_~:\\]).*?$', Comment.Single),
(r'\{-', Comment.Multiline, 'comment'),
# Holes
(r'\{!', Comment.Directive, 'hole'),
# Strings
(r"'", String.Char, 'character'),
(r'"', String, 'string'),
- (r'[^\s\(\)\{\}]+', Text),
+ (r'[^\s(){}]+', Text),
(r'\s+?', Text), # Whitespace
],
'hole': [
(r'\)', Punctuation, '#pop'),
(r'qualified\b', Keyword),
# import X as Y
- (r'([A-Z][a-zA-Z0-9_.]*)(\s+)(as)(\s+)([A-Z][a-zA-Z0-9_.]*)',
+ (r'([A-Z][\w.]*)(\s+)(as)(\s+)([A-Z][\w.]*)',
bygroups(Name.Namespace, Text, Keyword, Text, Name), '#pop'),
# import X hiding (functions)
- (r'([A-Z][a-zA-Z0-9_.]*)(\s+)(hiding)(\s+)(\()',
+ (r'([A-Z][\w.]*)(\s+)(hiding)(\s+)(\()',
bygroups(Name.Namespace, Text, Keyword, Text, Punctuation), 'funclist'),
# import X (functions)
- (r'([A-Z][a-zA-Z0-9_.]*)(\s+)(\()',
+ (r'([A-Z][\w.]*)(\s+)(\()',
bygroups(Name.Namespace, Text, Punctuation), 'funclist'),
# import X
- (r'[a-zA-Z0-9_.]+', Name.Namespace, '#pop'),
+ (r'[\w.]+', Name.Namespace, '#pop'),
],
'module': [
(r'\s+', Text),
- (r'([A-Z][a-zA-Z0-9_.]*)(\s+)(\()',
+ (r'([A-Z][\w.]*)(\s+)(\()',
bygroups(Name.Namespace, Text, Punctuation), 'funclist'),
- (r'[A-Z][a-zA-Z0-9_.]*', Name.Namespace, '#pop'),
+ (r'[A-Z][\w.]*', Name.Namespace, '#pop'),
],
'funclist': [
(r'\s+', Text),
- (r'[A-Z][a-zA-Z0-9_]*', Keyword.Type),
+ (r'[A-Z]\w*', Keyword.Type),
(r'(_[\w\']+|[a-z][\w\']*)', Name.Function),
# TODO: these don't match the comments in docs, remove.
- #(r'--(?![!#$%&*+./<=>?@\^|_~:\\]).*?$', Comment.Single),
+ #(r'--(?![!#$%&*+./<=>?@^|_~:\\]).*?$', Comment.Single),
#(r'{-', Comment.Multiline, 'comment'),
(r',', Punctuation),
(r'[:!#$%&*+.\\/<=>?@^|~-]+', Operator),
],
'comment': [
# Multiline Comments
- (r'[^/\*]+', Comment.Multiline),
+ (r'[^/*]+', Comment.Multiline),
(r'/\*', Comment.Multiline, '#push'),
(r'\*/', Comment.Multiline, '#pop'),
- (r'[\*/]', Comment.Multiline),
+ (r'[*/]', Comment.Multiline),
],
'character': [
# Allows multi-chars, incorrectly.
],
'escape': [
(r'[abfnrtv"\'&\\]', String.Escape, '#pop'),
- (r'\^[][A-Z@\^_]', String.Escape, '#pop'),
+ (r'\^[][A-Z@^_]', String.Escape, '#pop'),
('|'.join(ascii), String.Escape, '#pop'),
(r'o[0-7]+', String.Escape, '#pop'),
(r'x[\da-fA-F]+', String.Escape, '#pop'),
]
# symbols that can be in an operator
- symbols = '[\$%&\*\+@!/\\\^~=\.:\-\?\|<>]+'
+ symbols = r'[$%&*+@!/\\^~=.:\-?|<>]+'
# symbol boundary: an operator keyword should not be followed by any of these
sboundary = '(?!'+symbols+')'
(r'(%s)' % '|'.join(typekeywords) + boundary, Keyword.Type),
(r'(%s)' % '|'.join(keywords) + boundary, Keyword),
(r'(%s)' % '|'.join(builtin) + boundary, Keyword.Pseudo),
- (r'::?|:=|\->|[=\.]' + sboundary, Keyword),
+ (r'::?|:=|\->|[=.]' + sboundary, Keyword),
# names
(r'((?:[a-z]\w*/)*)([A-Z]\w*)',
(r'@"', String.Double, 'litstring'),
# operators
- (symbols + "|/(?![\*/])", Operator),
+ (symbols + "|/(?![*/])", Operator),
(r'`', Operator),
- (r'[\{\}\(\)\[\];,]', Punctuation),
+ (r'[{}()\[\];,]', Punctuation),
# literals. No check for literal characters with len > 1
- (r'[0-9]+\.[0-9]+([eE][\-\+]?[0-9]+)?', Number.Float),
+ (r'[0-9]+\.[0-9]+([eE][\-+]?[0-9]+)?', Number.Float),
(r'0[xX][0-9a-fA-F]+', Number.Hex),
(r'[0-9]+', Number.Integer),
# type started by colon
'type': [
- (r'[\(\[<]', tokenType, 'type-nested'),
+ (r'[(\[<]', tokenType, 'type-nested'),
include('type-content')
],
# type nested in brackets: can contain parameters, comma etc.
'type-nested': [
- (r'[\)\]>]', tokenType, '#pop'),
- (r'[\(\[<]', tokenType, 'type-nested'),
+ (r'[)\]>]', tokenType, '#pop'),
+ (r'[(\[<]', tokenType, 'type-nested'),
(r',', tokenType),
(r'([a-z]\w*)(\s*)(:)(?!:)',
bygroups(Name, Text, tokenType)), # parameter name
bygroups(Name.Namespace, tokenType)),
# type keyword operators
- (r'::|\->|[\.:|]', tokenType),
+ (r'::|->|[.:|]', tokenType),
# catchall
default('#pop')
(r'//.*$', Comment.Single)
],
'comment': [
- (r'[^/\*]+', Comment.Multiline),
+ (r'[^/*]+', Comment.Multiline),
(r'/\*', Comment.Multiline, '#push'),
(r'\*/', Comment.Multiline, '#pop'),
- (r'[\*/]', Comment.Multiline),
+ (r'[*/]', Comment.Multiline),
],
'litstring': [
(r'[^"]+', String.Double),
(r'[\'\n]', String.Char, '#pop'),
],
'escape-sequence': [
- (r'\\[nrt\\\"\']', String.Escape),
+ (r'\\[nrt\\"\']', String.Escape),
(r'\\x[0-9a-fA-F]{2}', String.Escape),
(r'\\u[0-9a-fA-F]{4}', String.Escape),
# Yes, \U literals are 6 hex digits.
# Float
(r'\.[0-9]+', Number.Float),
- (r'[0-9]+[eE][\+\-]?[0-9]+', Number.Float),
- (r'[0-9]+\.[0-9]*[eE][\+\-]?[0-9]+', Number.Float),
+ (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),
# Float
(r'\.[0-9]+', Number.Float, ('#pop', 'preproc-expr-chain')),
- (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]+[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')),
# Float
(r'\.[0-9]+', Number.Float, ('#pop', 'expr-chain')),
- (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]+[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')),
'type-param-type': [
# Float
(r'\.[0-9]+', Number.Float, '#pop'),
- (r'[0-9]+[eE][\+\-]?[0-9]+', Number.Float, '#pop'),
- (r'[0-9]+\.[0-9]*[eE][\+\-]?[0-9]+', Number.Float, '#pop'),
+ (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'),
"""
import re
-from pygments.lexer import RegexLexer, bygroups, include, using, this
-from pygments.token import \
- Text, Comment, Operator, Keyword, Name, String, Number, Punctuation, \
- Error
+
+from pygments.lexer import RegexLexer, bygroups, include, using, this, words
+from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
+ Number, Punctuation, Error
__all__ = ['VerilogLexer', 'SystemVerilogLexer', 'VhdlLexer']
(r'^\s*`define', Comment.Preproc, 'macro'),
(r'\n', Text),
(r'\s+', Text),
- (r'\\\n', Text), # line continuation
+ (r'\\\n', Text), # line continuation
(r'/(\\\n)?/(\n|(.|\n)*?[^\\]\n)', Comment.Single),
(r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline),
(r'[{}#@]', Punctuation),
(r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[lL]?', Number.Float),
(r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float),
(r'([0-9]+)|(\'h)[0-9a-fA-F]+', Number.Hex),
- (r'([0-9]+)|(\'b)[0-1]+', Number.Bin),
+ (r'([0-9]+)|(\'b)[01]+', Number.Bin),
(r'([0-9]+)|(\'d)[0-9]+', Number.Integer),
(r'([0-9]+)|(\'o)[0-7]+', Number.Oct),
(r'\'[01xz]', Number),
(r'^(\s*)(import)(\s+)', bygroups(Text, Keyword.Namespace, Text),
'import'),
- (r'(always|always_comb|always_ff|always_latch|and|assign|automatic|'
- r'begin|break|buf|bufif0|bufif1|case|casex|casez|cmos|const|'
- r'continue|deassign|default|defparam|disable|do|edge|else|end|endcase|'
- r'endfunction|endgenerate|endmodule|endpackage|endprimitive|endspecify|'
- r'endtable|endtask|enum|event|final|for|force|forever|fork|function|'
- r'generate|genvar|highz0|highz1|if|initial|inout|input|'
- r'integer|join|large|localparam|macromodule|medium|module|'
- r'nand|negedge|nmos|nor|not|notif0|notif1|or|output|packed|'
- r'parameter|pmos|posedge|primitive|pull0|pull1|pulldown|pullup|rcmos|'
- r'ref|release|repeat|return|rnmos|rpmos|rtran|rtranif0|'
- r'rtranif1|scalared|signed|small|specify|specparam|strength|'
- r'string|strong0|strong1|struct|table|task|'
- r'tran|tranif0|tranif1|type|typedef|'
- r'unsigned|var|vectored|void|wait|weak0|weak1|while|'
- r'xnor|xor)\b', Keyword),
-
- (r'`(accelerate|autoexpand_vectornets|celldefine|default_nettype|'
- r'else|elsif|endcelldefine|endif|endprotect|endprotected|'
- r'expand_vectornets|ifdef|ifndef|include|noaccelerate|noexpand_vectornets|'
- r'noremove_gatenames|noremove_netnames|nounconnected_drive|'
- r'protect|protected|remove_gatenames|remove_netnames|resetall|'
- r'timescale|unconnected_drive|undef)\b', Comment.Preproc),
-
- (r'\$(bits|bitstoreal|bitstoshortreal|countdrivers|display|fclose|'
- r'fdisplay|finish|floor|fmonitor|fopen|fstrobe|fwrite|'
- r'getpattern|history|incsave|input|itor|key|list|log|'
- r'monitor|monitoroff|monitoron|nokey|nolog|printtimescale|'
- r'random|readmemb|readmemh|realtime|realtobits|reset|reset_count|'
- r'reset_value|restart|rtoi|save|scale|scope|shortrealtobits|'
- r'showscopes|showvariables|showvars|sreadmemb|sreadmemh|'
- r'stime|stop|strobe|time|timeformat|write)\b', Name.Builtin),
-
- (r'(byte|shortint|int|longint|integer|time|'
- r'bit|logic|reg|'
- r'supply0|supply1|tri|triand|trior|tri0|tri1|trireg|uwire|wire|wand|wor'
- r'shortreal|real|realtime)\b', Keyword.Type),
+ (words((
+ 'always', 'always_comb', 'always_ff', 'always_latch', 'and',
+ 'assign', 'automatic', 'begin', 'break', 'buf', 'bufif0', 'bufif1',
+ 'case', 'casex', 'casez', 'cmos', 'const', 'continue', 'deassign',
+ 'default', 'defparam', 'disable', 'do', 'edge', 'else', 'end', 'endcase',
+ 'endfunction', 'endgenerate', 'endmodule', 'endpackage', 'endprimitive',
+ 'endspecify', 'endtable', 'endtask', 'enum', 'event', 'final', 'for',
+ 'force', 'forever', 'fork', 'function', 'generate', 'genvar', 'highz0',
+ 'highz1', 'if', 'initial', 'inout', 'input', 'integer', 'join', 'large',
+ 'localparam', 'macromodule', 'medium', 'module', 'nand', 'negedge',
+ 'nmos', 'nor', 'not', 'notif0', 'notif1', 'or', 'output', 'packed',
+ 'parameter', 'pmos', 'posedge', 'primitive', 'pull0', 'pull1',
+ 'pulldown', 'pullup', 'rcmos', 'ref', 'release', 'repeat', 'return',
+ 'rnmos', 'rpmos', 'rtran', 'rtranif0', 'rtranif1', 'scalared', 'signed',
+ 'small', 'specify', 'specparam', 'strength', 'string', 'strong0',
+ 'strong1', 'struct', 'table', 'task', 'tran', 'tranif0', 'tranif1',
+ 'type', 'typedef', 'unsigned', 'var', 'vectored', 'void', 'wait',
+ 'weak0', 'weak1', 'while', 'xnor', 'xor'), suffix=r'\b'),
+ Keyword),
+
+ (words((
+ 'accelerate', 'autoexpand_vectornets', 'celldefine', 'default_nettype',
+ 'else', 'elsif', 'endcelldefine', 'endif', 'endprotect', 'endprotected',
+ 'expand_vectornets', 'ifdef', 'ifndef', 'include', 'noaccelerate',
+ 'noexpand_vectornets', 'noremove_gatenames', 'noremove_netnames',
+ 'nounconnected_drive', 'protect', 'protected', 'remove_gatenames',
+ 'remove_netnames', 'resetall', 'timescale', 'unconnected_drive',
+ 'undef'), prefix=r'`', suffix=r'\b'),
+ Comment.Preproc),
+
+ (words((
+ 'bits', 'bitstoreal', 'bitstoshortreal', 'countdrivers', 'display', 'fclose',
+ 'fdisplay', 'finish', 'floor', 'fmonitor', 'fopen', 'fstrobe', 'fwrite',
+ 'getpattern', 'history', 'incsave', 'input', 'itor', 'key', 'list', 'log',
+ 'monitor', 'monitoroff', 'monitoron', 'nokey', 'nolog', 'printtimescale',
+ 'random', 'readmemb', 'readmemh', 'realtime', 'realtobits', 'reset',
+ 'reset_count', 'reset_value', 'restart', 'rtoi', 'save', 'scale', 'scope',
+ 'shortrealtobits', 'showscopes', 'showvariables', 'showvars', 'sreadmemb',
+ 'sreadmemh', 'stime', 'stop', 'strobe', 'time', 'timeformat', 'write'),
+ prefix=r'\$', suffix=r'\b'),
+ Name.Builtin),
+
+ (words((
+ 'byte', 'shortint', 'int', 'longint', 'integer', 'time',
+ 'bit', 'logic', 'reg', 'supply0', 'supply1', 'tri', 'triand',
+ 'trior', 'tri0', 'tri1', 'trireg', 'uwire', 'wire', 'wand', 'wo'
+ 'shortreal', 'real', 'realtime'), suffix=r'\b'),
+ Keyword.Type),
('[a-zA-Z_]\w*:(?!:)', Name.Label),
('[a-zA-Z_]\w*', Name),
],
'string': [
(r'"', String, '#pop'),
(r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape),
- (r'[^\\"\n]+', String), # all other characters
- (r'\\\n', String), # line continuation
- (r'\\', String), # stray backslash
+ (r'[^\\"\n]+', String), # all other characters
+ (r'\\\n', String), # line continuation
+ (r'\\', String), # stray backslash
],
'macro': [
(r'[^/\n]+', Comment.Preproc),
def get_tokens_unprocessed(self, text):
for index, token, value in \
- RegexLexer.get_tokens_unprocessed(self, text):
+ RegexLexer.get_tokens_unprocessed(self, text):
# Convention: mark all upper case names as constants
if token is Name:
if value.isupper():
(r'\n', Text),
(r'\s+', Text),
- (r'\\\n', Text), # line continuation
+ (r'\\\n', Text), # line continuation
(r'/(\\\n)?/(\n|(.|\n)*?[^\\]\n)', Comment.Single),
(r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline),
(r'[{}#@]', Punctuation),
(r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[lL]?', Number.Float),
(r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float),
(r'([0-9]+)|(\'h)[0-9a-fA-F]+', Number.Hex),
- (r'([0-9]+)|(\'b)[0-1]+', Number.Bin),
+ (r'([0-9]+)|(\'b)[01]+', Number.Bin),
(r'([0-9]+)|(\'d)[0-9]+', Number.Integer),
(r'([0-9]+)|(\'o)[0-7]+', Number.Oct),
(r'\'[01xz]', Number),
(r'[()\[\],.;\']', Punctuation),
(r'`[a-zA-Z_]\w*', Name.Constant),
- (r'(accept_on|alias|always|always_comb|always_ff|always_latch|'
- r'and|assert|assign|assume|automatic|before|begin|bind|bins|'
- r'binsof|bit|break|buf|bufif0|bufif1|byte|case|casex|casez|'
- r'cell|chandle|checker|class|clocking|cmos|config|const|constraint|'
- r'context|continue|cover|covergroup|coverpoint|cross|deassign|'
- r'default|defparam|design|disable|dist|do|edge|else|end|endcase|'
- r'endchecker|endclass|endclocking|endconfig|endfunction|endgenerate|'
- r'endgroup|endinterface|endmodule|endpackage|endprimitive|'
- r'endprogram|endproperty|endsequence|endspecify|endtable|'
- r'endtask|enum|event|eventually|expect|export|extends|extern|'
- r'final|first_match|for|force|foreach|forever|fork|forkjoin|'
- r'function|generate|genvar|global|highz0|highz1|if|iff|ifnone|'
- r'ignore_bins|illegal_bins|implies|import|incdir|include|'
- r'initial|inout|input|inside|instance|int|integer|interface|'
- r'intersect|join|join_any|join_none|large|let|liblist|library|'
- r'local|localparam|logic|longint|macromodule|matches|medium|'
- r'modport|module|nand|negedge|new|nexttime|nmos|nor|noshowcancelled|'
- r'not|notif0|notif1|null|or|output|package|packed|parameter|'
- r'pmos|posedge|primitive|priority|program|property|protected|'
- r'pull0|pull1|pulldown|pullup|pulsestyle_ondetect|pulsestyle_onevent|'
- r'pure|rand|randc|randcase|randsequence|rcmos|real|realtime|'
- r'ref|reg|reject_on|release|repeat|restrict|return|rnmos|'
- r'rpmos|rtran|rtranif0|rtranif1|s_always|s_eventually|s_nexttime|'
- r's_until|s_until_with|scalared|sequence|shortint|shortreal|'
- r'showcancelled|signed|small|solve|specify|specparam|static|'
- r'string|strong|strong0|strong1|struct|super|supply0|supply1|'
- r'sync_accept_on|sync_reject_on|table|tagged|task|this|throughout|'
- r'time|timeprecision|timeunit|tran|tranif0|tranif1|tri|tri0|'
- r'tri1|triand|trior|trireg|type|typedef|union|unique|unique0|'
- r'unsigned|until|until_with|untyped|use|uwire|var|vectored|'
- r'virtual|void|wait|wait_order|wand|weak|weak0|weak1|while|'
- r'wildcard|wire|with|within|wor|xnor|xor)\b', Keyword ),
-
- (r'(`__FILE__|`__LINE__|`begin_keywords|`celldefine|`default_nettype|'
- r'`define|`else|`elsif|`end_keywords|`endcelldefine|`endif|'
- r'`ifdef|`ifndef|`include|`line|`nounconnected_drive|`pragma|'
- r'`resetall|`timescale|`unconnected_drive|`undef|`undefineall)\b',
- Comment.Preproc ),
-
- (r'(\$display|\$displayb|\$displayh|\$displayo|\$dumpall|\$dumpfile|'
- r'\$dumpflush|\$dumplimit|\$dumpoff|\$dumpon|\$dumpports|'
- r'\$dumpportsall|\$dumpportsflush|\$dumpportslimit|\$dumpportsoff|'
- r'\$dumpportson|\$dumpvars|\$fclose|\$fdisplay|\$fdisplayb|'
- r'\$fdisplayh|\$fdisplayo|\$feof|\$ferror|\$fflush|\$fgetc|'
- r'\$fgets|\$finish|\$fmonitor|\$fmonitorb|\$fmonitorh|\$fmonitoro|'
- r'\$fopen|\$fread|\$fscanf|\$fseek|\$fstrobe|\$fstrobeb|\$fstrobeh|'
- r'\$fstrobeo|\$ftell|\$fwrite|\$fwriteb|\$fwriteh|\$fwriteo|'
- r'\$monitor|\$monitorb|\$monitorh|\$monitoro|\$monitoroff|'
- r'\$monitoron|\$plusargs|\$random\|$readmemb|\$readmemh|\$rewind|'
- r'\$sformat|\$sformatf|\$sscanf|\$strobe|\$strobeb|\$strobeh|\$strobeo|'
- r'\$swrite|\$swriteb|\$swriteh|\$swriteo|\$test|\$ungetc|'
- r'\$value\$plusargs|\$write|\$writeb|\$writeh|\$writememb|'
- r'\$writememh|\$writeo)\b' , Name.Builtin ),
+ (words((
+ 'accept_on', 'alias', 'always', 'always_comb', 'always_ff', 'always_latch',
+ 'and', 'assert', 'assign', 'assume', 'automatic', 'before', 'begin', 'bind', 'bins',
+ 'binsof', 'bit', 'break', 'buf', 'bufif0', 'bufif1', 'byte', 'case', 'casex', 'casez',
+ 'cell', 'chandle', 'checker', 'class', 'clocking', 'cmos', 'config', 'const', 'constraint',
+ 'context', 'continue', 'cover', 'covergroup', 'coverpoint', 'cross', 'deassign',
+ 'default', 'defparam', 'design', 'disable', 'dist', 'do', 'edge', 'else', 'end', 'endcase',
+ 'endchecker', 'endclass', 'endclocking', 'endconfig', 'endfunction', 'endgenerate',
+ 'endgroup', 'endinterface', 'endmodule', 'endpackage', 'endprimitive',
+ 'endprogram', 'endproperty', 'endsequence', 'endspecify', 'endtable',
+ 'endtask', 'enum', 'event', 'eventually', 'expect', 'export', 'extends', 'extern',
+ 'final', 'first_match', 'for', 'force', 'foreach', 'forever', 'fork', 'forkjoin',
+ 'function', 'generate', 'genvar', 'global', 'highz0', 'highz1', 'if', 'iff', 'ifnone',
+ 'ignore_bins', 'illegal_bins', 'implies', 'import', 'incdir', 'include',
+ 'initial', 'inout', 'input', 'inside', 'instance', 'int', 'integer', 'interface',
+ 'intersect', 'join', 'join_any', 'join_none', 'large', 'let', 'liblist', 'library',
+ 'local', 'localparam', 'logic', 'longint', 'macromodule', 'matches', 'medium',
+ 'modport', 'module', 'nand', 'negedge', 'new', 'nexttime', 'nmos', 'nor', 'noshowcancelled',
+ 'not', 'notif0', 'notif1', 'null', 'or', 'output', 'package', 'packed', 'parameter',
+ 'pmos', 'posedge', 'primitive', 'priority', 'program', 'property', 'protected',
+ 'pull0', 'pull1', 'pulldown', 'pullup', 'pulsestyle_ondetect', 'pulsestyle_onevent',
+ 'pure', 'rand', 'randc', 'randcase', 'randsequence', 'rcmos', 'real', 'realtime',
+ 'ref', 'reg', 'reject_on', 'release', 'repeat', 'restrict', 'return', 'rnmos',
+ 'rpmos', 'rtran', 'rtranif0', 'rtranif1', 's_always', 's_eventually', 's_nexttime',
+ 's_until', 's_until_with', 'scalared', 'sequence', 'shortint', 'shortreal',
+ 'showcancelled', 'signed', 'small', 'solve', 'specify', 'specparam', 'static',
+ 'string', 'strong', 'strong0', 'strong1', 'struct', 'super', 'supply0', 'supply1',
+ 'sync_accept_on', 'sync_reject_on', 'table', 'tagged', 'task', 'this', 'throughout',
+ 'time', 'timeprecision', 'timeunit', 'tran', 'tranif0', 'tranif1', 'tri', 'tri0',
+ 'tri1', 'triand', 'trior', 'trireg', 'type', 'typedef', 'union', 'unique', 'unique0',
+ 'unsigned', 'until', 'until_with', 'untyped', 'use', 'uwire', 'var', 'vectored',
+ 'virtual', 'void', 'wait', 'wait_order', 'wand', 'weak', 'weak0', 'weak1', 'while',
+ 'wildcard', 'wire', 'with', 'within', 'wor', 'xnor', 'xor'), suffix=r'\b'),
+ Keyword),
+
+ (words((
+ '`__FILE__', '`__LINE__', '`begin_keywords', '`celldefine', '`default_nettype',
+ '`define', '`else', '`elsif', '`end_keywords', '`endcelldefine', '`endif',
+ '`ifdef', '`ifndef', '`include', '`line', '`nounconnected_drive', '`pragma',
+ '`resetall', '`timescale', '`unconnected_drive', '`undef', '`undefineall'),
+ suffix=r'\b'),
+ Comment.Preproc),
+
+ (words((
+ '$display', '$displayb', '$displayh', '$displayo', '$dumpall', '$dumpfile',
+ '$dumpflush', '$dumplimit', '$dumpoff', '$dumpon', '$dumpports',
+ '$dumpportsall', '$dumpportsflush', '$dumpportslimit', '$dumpportsoff',
+ '$dumpportson', '$dumpvars', '$fclose', '$fdisplay', '$fdisplayb',
+ '$fdisplayh', '$fdisplayo', '$feof', '$ferror', '$fflush', '$fgetc',
+ '$fgets', '$finish', '$fmonitor', '$fmonitorb', '$fmonitorh', '$fmonitoro',
+ '$fopen', '$fread', '$fscanf', '$fseek', '$fstrobe', '$fstrobeb', '$fstrobeh',
+ '$fstrobeo', '$ftell', '$fwrite', '$fwriteb', '$fwriteh', '$fwriteo',
+ '$monitor', '$monitorb', '$monitorh', '$monitoro', '$monitoroff',
+ '$monitoron', '$plusargs', '$random', '$readmemb', '$readmemh', '$rewind',
+ '$sformat', '$sformatf', '$sscanf', '$strobe', '$strobeb', '$strobeh', '$strobeo',
+ '$swrite', '$swriteb', '$swriteh', '$swriteo', '$test', '$ungetc',
+ '$value$plusargs', '$write', '$writeb', '$writeh', '$writememb',
+ '$writememh', '$writeo'), suffix=r'\b'),
+ Name.Builtin),
(r'(class)(\s+)', bygroups(Keyword, Text), 'classname'),
- (r'(byte|shortint|int|longint|integer|time|'
- r'bit|logic|reg|'
- r'supply0|supply1|tri|triand|trior|tri0|tri1|trireg|uwire|wire|wand|wor'
- r'shortreal|real|realtime)\b', Keyword.Type),
+ (words((
+ 'byte', 'shortint', 'int', 'longint', 'integer', 'time',
+ 'bit', 'logic', 'reg', 'supply0', 'supply1', 'tri', 'triand',
+ 'trior', 'tri0', 'tri1', 'trireg', 'uwire', 'wire', 'wand', 'wo'
+ 'shortreal', 'real', 'realtime'), suffix=r'\b'),
+ Keyword.Type),
('[a-zA-Z_]\w*:(?!:)', Name.Label),
('[a-zA-Z_]\w*', Name),
],
'string': [
(r'"', String, '#pop'),
(r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape),
- (r'[^\\"\n]+', String), # all other characters
- (r'\\\n', String), # line continuation
- (r'\\', String), # stray backslash
+ (r'[^\\"\n]+', String), # all other characters
+ (r'\\\n', String), # line continuation
+ (r'\\', String), # stray backslash
],
'macro': [
(r'[^/\n]+', Comment.Preproc),
def get_tokens_unprocessed(self, text):
for index, token, value in \
- RegexLexer.get_tokens_unprocessed(self, text):
+ RegexLexer.get_tokens_unprocessed(self, text):
# Convention: mark all upper case names as constants
if token is Name:
if value.isupper():
token = Name.Constant
yield index, token, value
- def analyse_text(text):
- if text.startswith('//') or text.startswith('/*'):
- return 0.5
-
class VhdlLexer(RegexLexer):
"""
'root': [
(r'\n', Text),
(r'\s+', Text),
- (r'\\\n', Text), # line continuation
- (r'--(?![!#$%&*+./<=>?@\^|_~]).*?$', Comment.Single),
+ (r'\\\n', Text), # line continuation
+ (r'--.*?$', Comment.Single),
(r"'(U|X|0|1|Z|W|L|H|-)'", String.Char),
(r'[~!%^&*+=|?:<>/-]', Operator),
(r"'[a-z_]\w*", Name.Attribute),
(r'(library)(\s+)([a-z_]\w*)',
bygroups(Keyword, Text, Name.Namespace)),
(r'(use)(\s+)(entity)', bygroups(Keyword, Text, Keyword)),
- (r'(use)(\s+)([a-z_][\.\w]*)',
+ (r'(use)(\s+)([a-z_][\w.]*)',
bygroups(Keyword, Text, Name.Namespace)),
(r'(entity|component)(\s+)([a-z_]\w*)',
bygroups(Keyword, Text, Name.Class)),
(r';', Punctuation, '#pop'),
],
'types': [
- (r'(boolean|bit|character|severity_level|integer|time|delay_length|'
- r'natural|positive|string|bit_vector|file_open_kind|'
- r'file_open_status|std_ulogic|std_ulogic_vector|std_logic|'
- r'std_logic_vector)\b', Keyword.Type),
+ (words((
+ 'boolean', 'bit', 'character', 'severity_level', 'integer', 'time',
+ 'delay_length', 'natural', 'positive', 'string', 'bit_vector',
+ 'file_open_kind', 'file_open_status', 'std_ulogic', 'std_ulogic_vector',
+ 'std_logic', 'std_logic_vector'), suffix=r'\b'),
+ Keyword.Type),
],
'keywords': [
- (r'(abs|access|after|alias|all|and|'
- r'architecture|array|assert|attribute|begin|block|'
- r'body|buffer|bus|case|component|configuration|'
- r'constant|disconnect|downto|else|elsif|end|'
- r'entity|exit|file|for|function|generate|'
- r'generic|group|guarded|if|impure|in|'
- r'inertial|inout|is|label|library|linkage|'
- r'literal|loop|map|mod|nand|new|'
- r'next|nor|not|null|of|on|'
- r'open|or|others|out|package|port|'
- r'postponed|procedure|process|pure|range|record|'
- r'register|reject|return|rol|ror|select|'
- r'severity|signal|shared|sla|sli|sra|'
- r'srl|subtype|then|to|transport|type|'
- r'units|until|use|variable|wait|when|'
- r'while|with|xnor|xor)\b', Keyword),
+ (words((
+ 'abs', 'access', 'after', 'alias', 'all', 'and',
+ 'architecture', 'array', 'assert', 'attribute', 'begin', 'block',
+ 'body', 'buffer', 'bus', 'case', 'component', 'configuration',
+ 'constant', 'disconnect', 'downto', 'else', 'elsif', 'end',
+ 'entity', 'exit', 'file', 'for', 'function', 'generate',
+ 'generic', 'group', 'guarded', 'if', 'impure', 'in',
+ 'inertial', 'inout', 'is', 'label', 'library', 'linkage',
+ 'literal', 'loop', 'map', 'mod', 'nand', 'new',
+ 'next', 'nor', 'not', 'null', 'of', 'on',
+ 'open', 'or', 'others', 'out', 'package', 'port',
+ 'postponed', 'procedure', 'process', 'pure', 'range', 'record',
+ 'register', 'reject', 'return', 'rol', 'ror', 'select',
+ 'severity', 'signal', 'shared', 'sla', 'sli', 'sra',
+ 'srl', 'subtype', 'then', 'to', 'transport', 'type',
+ 'units', 'until', 'use', 'variable', 'wait', 'when',
+ 'while', 'with', 'xnor', 'xor'), suffix=r'\b'),
+ Keyword),
],
'numbers': [
(r'\d{1,2}#[0-9a-f_]+#?', Number.Integer),
(r'\d+', Number.Integer),
- (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+', Number.Float),
+ (r'(\d+\.\d*|\.\d+|\d+)E[+-]?\d+', Number.Float),
(r'X"[0-9a-f_]+"', Number.Hex),
(r'O"[0-7_]+"', Number.Oct),
- (r'B"[0-1_]+"', Number.Bin),
+ (r'B"[01_]+"', Number.Bin),
],
}
'element': [
include('common'),
(r'EMPTY|ANY|#PCDATA', Keyword.Constant),
- (r'[^>\s\|()?+*,]+', Name.Tag),
+ (r'[^>\s|()?+*,]+', Name.Tag),
(r'>', Keyword, '#pop'),
],
Keyword.Constant),
(r'#REQUIRED|#IMPLIED|#FIXED', Keyword.Constant),
(r'xml:space|xml:lang', Keyword.Reserved),
- (r'[^>\s\|()?+*,]+', Name.Attribute),
+ (r'[^>\s|()?+*,]+', Name.Attribute),
(r'>', Keyword, '#pop'),
],
'entity': [
include('common'),
(r'SYSTEM|PUBLIC|NDATA', Keyword.Constant),
- (r'[^>\s\|()?+*,]+', Name.Entity),
+ (r'[^>\s|()?+*,]+', Name.Entity),
(r'>', Keyword, '#pop'),
],
'notation': [
include('common'),
(r'SYSTEM|PUBLIC', Keyword.Constant),
- (r'[^>\s\|()?+*,]+', Name.Attribute),
+ (r'[^>\s|()?+*,]+', Name.Attribute),
(r'>', Keyword, '#pop'),
],
}
def analyse_text(text):
if looks_like_xml(text):
- return 0.5
+ return 0.45 # less than HTML
class XsltLexer(XmlLexer):
keywords = (
'override', 'ThreadSafe', 'static', 'FuncFit', 'Proc', 'Picture',
'Prompt', 'DoPrompt', 'macro', 'window', 'graph', 'function', 'end',
- 'Structure', 'EndStructure', 'EndMacro', 'Menu', 'SubMenu', 'Prompt',
- 'DoPrompt',
+ 'Structure', 'EndStructure', 'EndMacro', 'Menu', 'SubMenu',
)
operations = (
'Abort', 'AddFIFOData', 'AddFIFOVectData', 'AddMovieAudio',
tokens = {
'root': [
- (r'[;\#].*\n', Comment),
+ (r'[;#].*\n', Comment),
(r"'.*?'", String.Single),
(r'"', String.Double, 'str_double'),
(r'`', String.Backtick, 'str_backtick'),
(r'\b([_a-z]\w*)(::)([a-z][a-z0-9]*)\b',
bygroups(Keyword.Namespace, Punctuation, Name.Function)),
(r'\b([_a-z]\w*)(:)', bygroups(Name.Label, Punctuation)),
- (r'(\b[ULS]|\B)([\!\<\>=]?=|\<\>?|\>)\B', Operator),
+ (r'(\b[ULS]|\B)([!<>=]?=|\<\>?|\>)\B', Operator),
(r'[|+-]', Operator),
(r'\\', Punctuation),
(r'\b(Abort|Add(?:BrandingImage|Size)|'
(r',', Text),
(r'\|', Operator),
(r'[\s]+', Text),
- (r'[}\)]\s*$', Text, '#pop'),
+ (r'[})]\s*$', Text, '#pop'),
(r'\}', Text),
(r'[^,]$', Name.Function, '#pop'),
- (r'([\+\.a-zA-Z0-9-])(\s*)', bygroups(Name.Function, Text)),
+ (r'([+.a-zA-Z0-9-])(\s*)', bygroups(Name.Function, Text)),
(r'\[.*?\]', Name.Entity),
],
'depend_vers': [
(r'\),', Text, '#pop'),
(r'\)[^,]', Text, '#pop:2'),
- (r'([><=]+)(\s*)([^\)]+)', bygroups(Operator, Text, Number))
+ (r'([><=]+)(\s*)([^)]+)', bygroups(Operator, Text, Number))
]
}
flags = re.MULTILINE | re.DOTALL | re.UNICODE
- _name = r'[a-zA-Z_][a-zA-Z_0-9]*'
+ _name = r'[a-zA-Z_]\w*'
# Inform 7 maps these four character classes to their ASCII
# equivalents. To support Inform 6 inclusions within Inform 7,
],
# Values after hashes
'obsolete-dictionary-word': [
- (r'\S[a-zA-Z_0-9]*', String.Other, '#pop')
+ (r'\S\w*', String.Other, '#pop')
],
'system-constant': [
include('_whitespace'),
Comment.Preproc),
(r'(%s)@p( .*?)?([%s]|\Z)' % (_start, _newline),
Generic.Heading, '+p'),
- (r'(%s)@[a-zA-Z_0-9]*[ %s]' % (_start, _newline), Keyword),
+ (r'(%s)@\w*[ %s]' % (_start, _newline), Keyword),
(r'![^%s]*' % _newline, Comment.Single),
(r'(\{)([%s]endlines)(\})' % _dash,
bygroups(Punctuation, Keyword, Punctuation), '#pop'),
JS_IDENT_START = ('(?:[$_' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Lo', 'Nl') +
']|\\\\u[a-fA-F0-9]{4})')
-JS_IDENT_PART = ('(?:[$_' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Lo', 'Nl',
- 'Mn', 'Mc', 'Nd', 'Pc') +
+JS_IDENT_PART = ('(?:[$' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Lo', 'Nl',
+ 'Mn', 'Mc', 'Nd', 'Pc') +
u'\u200c\u200d]|\\\\u[a-fA-F0-9]{4})')
JS_IDENT = JS_IDENT_START + '(?:' + JS_IDENT_PART + ')*'
mimetypes = ['application/javascript', 'application/x-javascript',
'text/x-javascript', 'text/javascript', ]
- flags = re.DOTALL
+ flags = re.DOTALL | re.UNICODE | re.MULTILINE
+
tokens = {
'commentsandwhitespace': [
(r'\s+', Text),
(r'\n', Text, '#pop')
],
'root': [
+ (r'\A#! ?/.*?\n', Comment), # shebang lines are recognized by node.js
(r'^(?=\s|/|<!--)', Text, 'slashstartsregex'),
include('commentsandwhitespace'),
(r'\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|'
- r'(<<|>>>?|==?|!=?|[-<>+*%&\|\^/])=?', Operator, 'slashstartsregex'),
+ r'(<<|>>>?|==?|!=?|[-<>+*%&|^/])=?', Operator, 'slashstartsregex'),
(r'[{(\[;,]', Punctuation, 'slashstartsregex'),
(r'[})\].]', Punctuation),
(r'(for|in|while|do|break|return|continue|switch|case|default|if|else|'
(r'#(?!##[^#]).*?\n', Comment.Single),
],
'functiondef': [
- (r'[$a-zA-Z_][\w\$]*\s*', Name.Function, '#pop'),
+ (r'[$a-zA-Z_][\w$]*\s*', Name.Function, '#pop'),
include('commentsandwhitespace'),
],
'classdef': [
(r'\binherits\s+from\b', Keyword),
- (r'[$a-zA-Z_][\w\$]*\s*\n', Name.Class, '#pop'),
- (r'[$a-zA-Z_][\w\$]*\s*', Name.Class),
+ (r'[$a-zA-Z_][\w$]*\s*\n', Name.Class, '#pop'),
+ (r'[$a-zA-Z_][\w$]*\s*', Name.Class),
include('commentsandwhitespace'),
],
'listcomprehension': [
(r'(?:\([^()]+\))?\s*>', Name.Function),
(r'[{(]', Punctuation),
(r'\[', Punctuation, 'listcomprehension'),
- (r'[})\]\.\,]', Punctuation),
+ (r'[})\].,]', Punctuation),
(r'\b(function|method|task)\b', Keyword.Declaration, 'functiondef'),
(r'\bclass\b', Keyword.Declaration, 'classdef'),
(r'\b(safe\s+)?wait\s+for\b', Keyword, 'waitfor'),
- (r'\b(me|this)(\.[$a-zA-Z_][\w\.\$]*)?\b', Name.Variable.Instance),
- (r'(?<![\.\$])(for(\s+(parallel|series))?|in|of|while|until|'
+ (r'\b(me|this)(\.[$a-zA-Z_][\w.$]*)?\b', Name.Variable.Instance),
+ (r'(?<![.$])(for(\s+(parallel|series))?|in|of|while|until|'
r'break|return|continue|'
r'when|if|unless|else|otherwise|except\s+when|'
r'throw|raise|fail\s+with|try|catch|finally|new|delete|'
r'typeof|instanceof|super|run\s+in\s+parallel|'
r'inherits\s+from)\b', Keyword),
- (r'(?<![\.\$])(true|false|yes|no|on|off|null|nothing|none|'
+ (r'(?<![.$])(true|false|yes|no|on|off|null|nothing|none|'
r'NaN|Infinity|undefined)\b',
Keyword.Constant),
(r'(Array|Boolean|Date|Error|Function|Math|netscape|'
r'eval|isFinite|isNaN|parseFloat|parseInt|document|window|'
r'print)\b',
Name.Builtin),
- (r'[$a-zA-Z_][\w\.\$]*\s*(:|[\+\-\*\/]?\=)?\b', Name.Variable),
+ (r'[$a-zA-Z_][\w.$]*\s*(:|[+\-*/]?\=)?\b', Name.Variable),
(r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
(r'0x[0-9a-fA-F]+', Number.Hex),
(r'[0-9]+', Number.Integer),
include('commentsandwhitespace'),
(r'(?:\([^()]+\))?[ ]*[~-]{1,2}>|'
r'(?:\(?[^()\n]+\)?)?[ ]*<[~-]{1,2}', Name.Function),
- (r'\+\+|&&|(?<![\.\$])\b(?:and|x?or|is|isnt|not)\b|\?|:|=|'
+ (r'\+\+|&&|(?<![.$])\b(?:and|x?or|is|isnt|not)\b|\?|:|=|'
r'\|\||\\(?=\n)|(<<|>>>?|==?|!=?|'
r'~(?!\~?>)|-(?!\-?>)|<(?!\[)|(?<!\])>|'
- r'[+*`%&\|\^/])=?',
+ r'[+*`%&|^/])=?',
Operator, 'slashstartsregex'),
(r'[{(\[;,]', Punctuation, 'slashstartsregex'),
(r'[})\].]', Punctuation),
- (r'(?<![\.\$])(for|own|in|of|while|until|loop|break|'
+ (r'(?<![.$])(for|own|in|of|while|until|loop|break|'
r'return|continue|switch|when|then|if|unless|else|'
r'throw|try|catch|finally|new|delete|typeof|instanceof|super|'
r'extends|this|class|by|const|var|to|til)\b', Keyword,
'slashstartsregex'),
- (r'(?<![\.\$])(true|false|yes|no|on|off|'
+ (r'(?<![.$])(true|false|yes|no|on|off|'
r'null|NaN|Infinity|undefined|void)\b',
Keyword.Constant),
(r'(Array|Boolean|Date|Error|Function|Math|netscape|'
r'decodeURIComponent|encodeURI|encodeURIComponent|'
r'eval|isFinite|isNaN|parseFloat|parseInt|document|window)\b',
Name.Builtin),
- (r'[$a-zA-Z_][\w\.\-:\$]*\s*[:=]\s', Name.Variable,
+ (r'[$a-zA-Z_][\w.\-:$]*\s*[:=]\s', Name.Variable,
'slashstartsregex'),
- (r'@[$a-zA-Z_][\w\.\-:\$]*\s*[:=]\s', Name.Variable.Instance,
+ (r'@[$a-zA-Z_][\w.\-:$]*\s*[:=]\s', Name.Variable.Instance,
'slashstartsregex'),
(r'@', Name.Other, 'slashstartsregex'),
- (r'@?[$a-zA-Z_][\w\-]*', Name.Other, 'slashstartsregex'),
+ (r'@?[$a-zA-Z_][\w-]*', Name.Other, 'slashstartsregex'),
(r'[0-9]+\.[0-9]+([eE][0-9]+)?[fd]?(?:[a-zA-Z_]+)?', Number.Float),
(r'[0-9]+(~[0-9a-z]+)?(?:[a-zA-Z_]+)?', Number.Integer),
('"""', String, 'tdqs'),
(r"'", String.Single, 'string_single')
],
'string_common': [
- (r"\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|u\{[0-9A-Fa-f]*\}|[a-z\'\"$\\])",
+ (r"\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|u\{[0-9A-Fa-f]*\}|[a-z'\"$\\])",
String.Escape),
(r'(\$)([a-zA-Z_]\w*)', bygroups(String.Interpol, Name)),
(r'(\$\{)(.*?)(\})',
],
'string_double': [
(r'"', String.Double, '#pop'),
- (r'[^\"$\\\n]+', String.Double),
+ (r'[^"$\\\n]+', String.Double),
include('string_common'),
(r'\$+', String.Double)
],
'string_double_multiline': [
(r'"""', String.Double, '#pop'),
- (r'[^\"$\\]+', String.Double),
+ (r'[^"$\\]+', String.Double),
include('string_common'),
(r'(\$|\")+', String.Double)
],
'string_single': [
(r"'", String.Single, '#pop'),
- (r"[^\'$\\\n]+", String.Single),
+ (r"[^'$\\\n]+", String.Single),
include('string_common'),
(r'\$+', String.Single)
],
filenames = ['*.ts']
mimetypes = ['text/x-typescript']
- flags = re.DOTALL
+ flags = re.DOTALL | re.MULTILINE
+
tokens = {
'commentsandwhitespace': [
(r'\s+', Text),
(r'^(?=\s|/|<!--)', Text, 'slashstartsregex'),
include('commentsandwhitespace'),
(r'\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|'
- r'(<<|>>>?|==?|!=?|[-<>+*%&\|\^/])=?', Operator, 'slashstartsregex'),
+ r'(<<|>>>?|==?|!=?|[-<>+*%&|^/])=?', Operator, 'slashstartsregex'),
(r'[{(\[;,]', Punctuation, 'slashstartsregex'),
(r'[})\].]', Punctuation),
(r'(for|in|while|do|break|return|continue|switch|case|default|if|else|'
# Match stuff like: constructor
(r'\b(constructor|declare|interface|as|AS)\b', Keyword.Reserved),
# Match stuff like: super(argument, list)
- (r'(super)(\s*)(\([a-zA-Z0-9,_?.$\s]+\s*\))',
+ (r'(super)(\s*)(\([\w,?.$\s]+\s*\))',
bygroups(Keyword.Reserved, Text), 'slashstartsregex'),
# Match stuff like: function() {...}
(r'([a-zA-Z_?.$][\w?.$]*)\(\) \{', Name.Other, 'slashstartsregex'),
],
'escape': [
(r'\\(U[\da-f]{8}|u[\da-f]{4}|x[\da-f]{1,2}|[0-7]{1,3}|:[^:]+:|'
- r'[abefnrtv?\"\'\\]|$)', String.Escape),
+ r'[abefnrtv?"\'\\]|$)', String.Escape),
],
'signature': [
(r'=>', Operator, '#pop'),
rv = 0.0
if 'bin/lasso9' in text:
rv += 0.8
- if re.search(r'<\?(=|lasso)|\A\[', text, re.I):
+ if re.search(r'<\?lasso', text, re.I):
rv += 0.4
if re.search(r'local\(', text, re.I):
rv += 0.4
- if '?>' in text:
- rv += 0.1
return rv
include('whitespace'),
# function definition
- (r'^(' + _ws + r'[\+-]' + _ws + r')([\(a-zA-Z_].*?[^\(])(' + _ws + r'\{)',
+ (r'^(' + _ws + r'[+-]' + _ws + r')([(a-zA-Z_].*?[^(])(' + _ws + r'\{)',
bygroups(using(this), using(this, state='function_signature'),
using(this))),
(r'(\s*)(@end)(\s*)', bygroups(Text, Keyword, Text)),
include('statements'),
- ('[{\(\)}]', Punctuation),
+ ('[{()}]', Punctuation),
(';', Punctuation),
],
'whitespace': [
(r'^(?=\s|/|<!--)', Text, 'slashstartsregex'),
(r'\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|'
- r'(<<|>>>?|==?|!=?|[-<>+*%&\|\^/])=?',
+ r'(<<|>>>?|==?|!=?|[-<>+*%&|^/])=?',
Operator, 'slashstartsregex'),
(r'[{(\[;,]', Punctuation, 'slashstartsregex'),
(r'[})\].]', Punctuation),
# parameters
(r'(\(' + _ws + ')' # open paren
- r'([^\)]+)' # type
+ r'([^)]+)' # type
r'(' + _ws + r'\)' + _ws + r')' # close paren
r'([$a-zA-Z_]\w+)', # param name
bygroups(using(this), Keyword.Type, using(this), Text)),
include('commentsandwhitespace'),
(r'\+\+|~|&&|\band\b|\bor\b|\bis\b|\bisnt\b|\bnot\b|\?|:|'
r'\|\||\\(?=\n)|'
- r'(<<|>>>?|==?(?!>)|!=?|=(?!>)|-(?!>)|[<>+*`%&\|\^/])=?',
+ r'(<<|>>>?|==?(?!>)|!=?|=(?!>)|-(?!>)|[<>+*`%&|^/])=?',
Operator, 'slashstartsregex'),
(r'(?:\([^()]*\))?\s*[=-]>', Name.Function),
(r'[{(\[;,]', Punctuation, 'slashstartsregex'),
(r'[})\].]', Punctuation),
- (r'(?<![\.\$])(for|own|in|of|while|until|'
+ (r'(?<![.$])(for|own|in|of|while|until|'
r'loop|break|return|continue|'
r'switch|when|then|if|unless|else|'
r'throw|try|catch|finally|new|delete|typeof|instanceof|super|'
r'extends|this|class|by)\b', Keyword, 'slashstartsregex'),
- (r'(?<![\.\$])(true|false|yes|no|on|off|null|'
+ (r'(?<![.$])(true|false|yes|no|on|off|null|'
r'NaN|Infinity|undefined)\b',
Keyword.Constant),
(r'(Array|Boolean|Date|Error|Function|Math|netscape|'
r'decodeURIComponent|encodeURI|encodeURIComponent|'
r'eval|isFinite|isNaN|parseFloat|parseInt|document|window)\b',
Name.Builtin),
- (r'[$a-zA-Z_][\w\.:\$]*\s*[:=]\s', Name.Variable,
+ (r'[$a-zA-Z_][\w.:$]*\s*[:=]\s', Name.Variable,
'slashstartsregex'),
- (r'@[$a-zA-Z_][\w\.:\$]*\s*[:=]\s', Name.Variable.Instance,
+ (r'@[$a-zA-Z_][\w.:$]*\s*[:=]\s', Name.Variable.Instance,
'slashstartsregex'),
(r'@', Name.Other, 'slashstartsregex'),
- (r'@?[$a-zA-Z_][\w\$]*', Name.Other, 'slashstartsregex'),
+ (r'@?[$a-zA-Z_][\w$]*', Name.Other, 'slashstartsregex'),
(r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
(r'0x[0-9a-fA-F]+', Number.Hex),
(r'[0-9]+', Number.Integer),
(r'\s+', Text),
(r'//.*?\n', Comment.Single),
(r'/\*.*?\*/', Comment.Multiline),
- (r'[\{\};>]', Punctuation),
+ (r'[{};>]', Punctuation),
(r"'''", String, 'string-trpl-single'),
(r'"""', String, 'string-trpl-double'),
(r"'", String, 'string-single'),
(r'"', String, 'string-double'),
(r'([\w-]+)', Name.Tag, 'node'),
- (r'([^\.#;{>\s]+)', Name.Class, 'node'),
+ (r'([^.#;{>\s]+)', Name.Class, 'node'),
(r'(#[\w-]+)', Name.Function, 'node'),
(r'(\.[\w-]+)', Name.Variable.Class, 'node')
],
'css-double-end': [
include('css-base'),
(r'"', String.Single, '#pop:2'),
- (r"[^;\"]+", Name.Entity)
+ (r'[^;"]+', Name.Entity)
],
'string-single-pop2': [
(r"'", String.Single, '#pop:2'),
r"\\U[a-fA-F0-9]{1,6}|[^\\\'\n])'", String.Char),
# try to match trailing transpose
- (r'(?<=[.\w\)\]])\'+', Operator),
+ (r'(?<=[.\w)\]])\'+', Operator),
# strings
(r'(?:[IL])"', String, 'string'),
(r'[^\S\n]+', Text),
(r'//.*?\n', Comment.Single),
(r'/\*.*?\*/', Comment.Multiline),
- # method names
- (r'((?:(?:[^\W\d]|\$)[\w\.\[\]\$<>]*\s+)+?)' # return arguments
- r'((?:[^\W\d]|\$)[\w\$]*)' # method name
- r'(\s*)(\()', # signature start
- bygroups(using(this), Name.Function, Text, Operator)),
- (r'@[^\W\d][\w\.]*', Name.Decorator),
+ # keywords: go before method names to avoid lexing "throw new XYZ"
+ # as a method signature
(r'(assert|break|case|catch|continue|default|do|else|finally|for|'
r'if|goto|instanceof|new|return|switch|this|throw|try|while)\b',
Keyword),
+ # method names
+ (r'((?:(?:[^\W\d]|\$)[\w.\[\]$<>]*\s+)+?)' # return arguments
+ r'((?:[^\W\d]|\$)[\w$]*)' # method name
+ r'(\s*)(\()', # signature start
+ bygroups(using(this), Name.Function, Text, Operator)),
+ (r'@[^\W\d][\w.]*', Name.Decorator),
(r'(abstract|const|enum|extends|final|implements|native|private|'
r'protected|public|static|strictfp|super|synchronized|throws|'
r'transient|volatile)\b', Keyword.Declaration),
(r'(boolean|byte|char|double|float|int|long|short|void)\b',
Keyword.Type),
- (r'(package)(\s+)', bygroups(Keyword.Namespace, Text)),
+ (r'(package)(\s+)', bygroups(Keyword.Namespace, Text), 'import'),
(r'(true|false|null)\b', Keyword.Constant),
(r'(class|interface)(\s+)', bygroups(Keyword.Declaration, Text), 'class'),
(r'(import)(\s+)', bygroups(Keyword.Namespace, Text), 'import'),
(r'"(\\\\|\\"|[^"])*"', String),
(r"'\\.'|'[^\\]'|'\\u[0-9a-fA-F]{4}'", String.Char),
- (r'(\.)((?:[^\W\d]|\$)[\w\$]*)', bygroups(Operator, Name.Attribute)),
- (r'^\s*([^\W\d]|\$)[\w\$]*:', Name.Label),
- (r'([^\W\d]|\$)[\w\$]*', Name),
- (r'[~\^\*!%&\[\]\(\)\{\}<>\|+=:;,./?-]', Operator),
+ (r'(\.)((?:[^\W\d]|\$)[\w$]*)', bygroups(Operator, Name.Attribute)),
+ (r'^\s*([^\W\d]|\$)[\w$]*:', Name.Label),
+ (r'([^\W\d]|\$)[\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]+(_+[0-9]+)*L?', Number.Integer),
(r'\n', Text)
],
'class': [
- (r'([^\W\d]|\$)[\w\$]*', Name.Class, '#pop')
+ (r'([^\W\d]|\$)[\w$]*', Name.Class, '#pop')
],
'import': [
(r'[\w.]+\*?', Name.Namespace, '#pop')
(idrest, Name),
(r'`[^`]+`', Name),
(r'\[', Operator, 'typeparam'),
- (r'[\(\)\{\};,.#]', Operator),
+ (r'[(){};,.#]', Operator),
(op, Operator),
(r'([0-9][0-9]*\.[0-9]*|\.[0-9]+)([eE][+-]?[0-9]+)?[fFdD]?',
Number.Float),
],
'type': [
(r'\s+', Text),
- (u'<[%:]|>:|[#_\u21D2]|forSome|type', Keyword),
- (r'([,\);}]|=>|=)(\s*)', bygroups(Operator, Text), '#pop'),
- (r'[\(\{]', Operator, '#push'),
+ (r'<[%:]|>:|[#_]|forSome|type', Keyword),
+ (u'([,);}]|=>|=|\u21d2)(\\s*)', bygroups(Operator, Text), '#pop'),
+ (r'[({]', Operator, '#push'),
(u'((?:%s|%s|`[^`]+`)(?:\\.(?:%s|%s|`[^`]+`))*)(\\s*)(\\[)' %
(idrest, op, idrest, op),
bygroups(Keyword.Type, Text, Operator), ('#pop', 'typeparam')),
'typeparam': [
(r'[\s,]+', Text),
(u'<[%:]|=>|>:|[#_\u21D2]|forSome|type', Keyword),
- (r'([\]\)\}])', Operator, '#pop'),
- (r'[\(\[\{]', Operator, '#push'),
+ (r'([\])}])', Operator, '#pop'),
+ (r'[(\[{]', Operator, '#push'),
(u'\\.|%s|%s|`[^`]+`' % (idrest, op), Keyword.Type)
],
'comment': [
- (r'[^/\*]+', Comment.Multiline),
+ (r'[^/*]+', Comment.Multiline),
(r'/\*', Comment.Multiline, '#push'),
(r'\*/', Comment.Multiline, '#pop'),
(r'[*/]', Comment.Multiline)
tokens = {
'root': [
# method names
- (r'^(\s*(?:[a-zA-Z_][\w\.\[\]]*\s+)+?)' # modifiers etc.
+ (r'^(\s*(?:[a-zA-Z_][\w.\[\]]*\s+)+?)' # modifiers etc.
r'([a-zA-Z_]\w*)' # method name
r'(\s*)(\()', # signature start
bygroups(using(this), Name.Function, Text, Operator)),
(r'[^\S\n]+', Text),
(r'//.*?\n', Comment.Single),
(r'/\*.*?\*/', Comment.Multiline),
- (r'@[a-zA-Z_][\w\.]*', Name.Decorator),
+ (r'@[a-zA-Z_][\w.]*', Name.Decorator),
(r'(in|as|typeof|statictypeof|typeis|typeas|if|else|foreach|for|'
r'index|while|do|continue|break|return|try|catch|finally|this|'
r'throw|new|switch|case|default|eval|super|outer|classpath|'
(r'(uses)(\s+)([\w.]+\*?)',
bygroups(Keyword.Namespace, Text, Name.Namespace)),
(r'"', String, 'string'),
- (r'(\??[\.#])([a-zA-Z_]\w*)',
+ (r'(\??[.#])([a-zA-Z_]\w*)',
bygroups(Operator, Name.Attribute)),
(r'(:)([a-zA-Z_]\w*)',
bygroups(Operator, Name.Attribute)),
- (r'[a-zA-Z_\$]\w*', Name),
- (r'and|or|not|[\\~\^\*!%&\[\]\(\)\{\}<>\|+=:;,./?-]', Operator),
+ (r'[a-zA-Z_$]\w*', Name),
+ (r'and|or|not|[\\~^*!%&\[\](){}<>|+=:;,./?-]', Operator),
(r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
(r'[0-9]+', Number.Integer),
(r'\n', Text)
],
'base': [
# method names
- (r'^(\s*(?:[a-zA-Z_][\w\.\[\]]*\s+)+?)' # return arguments
- r'([a-zA-Z_]\w*)' # method name
- r'(\s*)(\()', # signature start
+ (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'@[a-zA-Z_][\w.]*', Name.Decorator),
(r'(assert|break|case|catch|continue|default|do|else|finally|for|'
r'if|goto|instanceof|new|return|switch|this|throw|try|while|in|as)\b',
Keyword),
(r'(class|interface)(\s+)', bygroups(Keyword.Declaration, Text),
'class'),
(r'(import)(\s+)', bygroups(Keyword.Namespace, Text), 'import'),
+ (r'""".*?"""', String.Double),
+ (r"'''.*?'''", String.Single),
(r'"(\\\\|\\"|[^"])*"', String.Double),
(r"'(\\\\|\\'|[^'])*'", String.Single),
(r'\$/((?!/\$).)*/\$', String),
(r"'\\.'|'[^\\]'|'\\u[0-9a-fA-F]{4}'", String.Char),
(r'(\.)([a-zA-Z_]\w*)', bygroups(Operator, Name.Attribute)),
(r'[a-zA-Z_]\w*:', Name.Label),
- (r'[a-zA-Z_\$]\w*', Name),
- (r'[~\^\*!%&\[\]\(\)\{\}<>\|+=:;,./?-]', Operator),
+ (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'#\[', String, 'squareText'),
# Mimic
- (r'\w[a-zA-Z0-9!?_:]+(?=\s*=.*mimic\s)', Name.Entity),
+ (r'\w[\w!:?]+(?=\s*=.*mimic\s)', Name.Entity),
# Assignment
(r'[a-zA-Z_][\w!:?]*(?=[\s]*[+*/-]?=[^=].*($|\.))',
# keywords
(r'(break|cond|continue|do|ensure|for|for:dict|for:set|if|let|'
r'loop|p:for|p:for:dict|p:for:set|return|unless|until|while|'
- r'with)(?![a-zA-Z0-9!:_?])', Keyword.Reserved),
+ r'with)(?![\w!:?])', Keyword.Reserved),
# Origin
- (r'(eval|mimic|print|println)(?![a-zA-Z0-9!:_?])', Keyword),
+ (r'(eval|mimic|print|println)(?![\w!:?])', Keyword),
# Base
(r'(cell\?|cellNames|cellOwner\?|cellOwner|cells|cell|'
r'documentation|hash|identity|mimic|removeCell\!|undefineCell\!)'
- r'(?![a-zA-Z0-9!:_?])', Keyword),
+ r'(?![\w!:?])', Keyword),
# Ground
- (r'(stackTraceAsText)(?![a-zA-Z0-9!:_?])', Keyword),
+ (r'(stackTraceAsText)(?![\w!:?])', Keyword),
# DefaultBehaviour Literals
- (r'(dict|list|message|set)(?![a-zA-Z0-9!:_?])', Keyword.Reserved),
+ (r'(dict|list|message|set)(?![\w!:?])', Keyword.Reserved),
# DefaultBehaviour Case
(r'(case|case:and|case:else|case:nand|case:nor|case:not|case:or|'
- r'case:otherwise|case:xor)(?![a-zA-Z0-9!:_?])', Keyword.Reserved),
+ r'case:otherwise|case:xor)(?![\w!:?])', Keyword.Reserved),
# DefaultBehaviour Reflection
(r'(asText|become\!|derive|freeze\!|frozen\?|in\?|is\?|kind\?|'
r'mimic\!|mimics|mimics\?|prependMimic\!|removeAllMimics\!|'
r'removeMimic\!|same\?|send|thaw\!|uniqueHexId)'
- r'(?![a-zA-Z0-9!:_?])', Keyword),
+ r'(?![\w!:?])', Keyword),
# DefaultBehaviour Aspects
- (r'(after|around|before)(?![a-zA-Z0-9!:_?])', Keyword.Reserved),
+ (r'(after|around|before)(?![\w!:?])', Keyword.Reserved),
# DefaultBehaviour
(r'(kind|cellDescriptionDict|cellSummary|genSym|inspect|notice)'
- r'(?![a-zA-Z0-9!:_?])', Keyword),
+ r'(?![\w!:?])', Keyword),
(r'(use|destructuring)', Keyword.Reserved),
# DefaultBehavior BaseBehavior
(r'(cell\?|cellOwner\?|cellOwner|cellNames|cells|cell|'
r'documentation|identity|removeCell!|undefineCell)'
- r'(?![a-zA-Z0-9!:_?])', Keyword),
+ r'(?![\w!:?])', Keyword),
# DefaultBehavior Internal
(r'(internal:compositeRegexp|internal:concatenateText|'
r'internal:createDecimal|internal:createNumber|'
r'internal:createRegexp|internal:createText)'
- r'(?![a-zA-Z0-9!:_?])', Keyword.Reserved),
+ r'(?![\w!:?])', Keyword.Reserved),
# DefaultBehaviour Conditions
(r'(availableRestarts|bind|error\!|findRestart|handle|'
r'invokeRestart|rescue|restart|signal\!|warn\!)'
- r'(?![a-zA-Z0-9!:_?])', Keyword.Reserved),
+ r'(?![\w!:?])', Keyword.Reserved),
# constants
- (r'(nil|false|true)(?![a-zA-Z0-9!:_?])', Name.Constant),
+ (r'(nil|false|true)(?![\w!:?])', Name.Constant),
# names
(r'(Arity|Base|Call|Condition|DateTime|Aspects|Pointcut|'
r'LexicalBlock|LexicalMacro|List|Message|Method|Mixins|'
r'NativeMethod|Number|Origin|Pair|Range|Reflector|Regexp Match|'
r'Regexp|Rescue|Restart|Runtime|Sequence|Set|Symbol|'
- r'System|Text|Tuple)(?![a-zA-Z0-9!:_?])', Name.Builtin),
+ r'System|Text|Tuple)(?![\w!:?])', Name.Builtin),
# functions
(u'(generateMatchMethod|aliasMethod|\u03bb|\u028E|fnx|fn|method|'
u'dmacro|dlecro|syntax|macro|dlecrox|lecrox|lecro|syntax)'
- u'(?![a-zA-Z0-9!:_?])', Name.Function),
+ u'(?![\w!:?])', Name.Function),
# Numbers
(r'-?0[xX][0-9a-fA-F]+', Number.Hex),
tokens = {
'root': [
# method names
- (r'^(\s*(?:[a-zA-Z_][\w\.\[\]]*\s+)+?)' # return arguments
- r'([a-zA-Z_]\w*)' # method name
- r'(\s*)(\()', # signature start
+ (r'^(\s*(?:[a-zA-Z_][\w.\[\]]*\s+)+?)' # return arguments
+ r'([a-zA-Z_]\w*)' # method name
+ r'(\s*)(\()', # signature start
bygroups(using(this), Name.Function, Text, Operator)),
(r'[^\S\n]+', Text),
(r'//.*?\n', Comment.Single),
bygroups(Operator, Name.Attribute)),
(r'[a-zA-Z_]\w*:', Name.Label),
(r'[a-zA-Z_]\w*', Name),
- (r'[~\^\*!%&\[\]\(\)\{\}<>\|+=:;,./?-]', Operator),
+ (r'[~^*!%&\[\](){}<>|+=:;,./?-]', Operator),
(r'\d{1,3}(_\d{3})+\.\d{1,3}(_\d{3})+[kMGTPmunpf]?', Number.Float),
(r'\d{1,3}(_\d{3})+\.[0-9]+([eE][+-]?[0-9]+)?[kMGTPmunpf]?',
Number.Float),
tokens = {
'root': [
# method names
- (r'^(\s*(?:[a-zA-Z_][\w\.\[\]]*\s+)+?)' # return arguments
- r'([a-zA-Z_$][\w$]*)' # method name
- r'(\s*)(\()', # signature start
+ (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'@[a-zA-Z_][\w.]*', Name.Decorator),
(r'(assert|break|case|catch|continue|default|do|else|finally|for|'
r'if|goto|instanceof|new|return|switch|this|throw|try|while|IF|'
r'ELSE|ELSEIF|ENDIF|FOR|ENDFOR|SEPARATOR|BEFORE|AFTER)\b',
(r'"(\\\\|\\"|[^"])*"', String),
(r"'(\\\\|\\'|[^'])*'", String),
(r'[a-zA-Z_]\w*:', Name.Label),
- (r'[a-zA-Z_\$]\w*', Name),
- (r'[~\^\*!%&\[\]\(\)\{\}<>\|+=:;,./?-]', Operator),
+ (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),
include('builtins'),
include('punct'),
include('operators'),
- (r'[0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
+ (r'[0-9]*\.[0-9]+(e[0-9]+)?[fd]?', Number.Float),
(r'0x[0-9a-f]+', Number.Hex),
(r'[0-9]+L?', Number.Integer),
(r'\n', Text),
(r'([a-z_]\w*)(\s*)(\()',
bygroups(Name.Function, Text, Punctuation)),
(r'[()#:]', Text),
- (r'[^(:#\'\")\s]+', Text),
+ (r'[^(:#\'")\s]+', Text),
(r'\S+\s+', Text) # TODO: make tests pass without \s+
],
'keywords': [
# valid names for identifiers
# well, names can only not consist fully of numbers
# but this should be good enough for now
- valid_name = r'[a-zA-Z0-9!$%&*+,/:<=>?@^_~|-]+'
+ valid_name = r'[\w!$%&*+,/:<=>?@^~|-]+'
tokens = {
'root': [
(r'#\'', Name.Function),
# binary rational
- (r'#[bB][+-]?[01]+(/[01]+)?', Number.Bin),
+ (r'#b[+-]?[01]+(/[01]+)?', Number.Bin),
# octal rational
- (r'#[oO][+-]?[0-7]+(/[0-7]+)?', Number.Oct),
+ (r'#o[+-]?[0-7]+(/[0-7]+)?', Number.Oct),
# hex rational
- (r'#[xX][+-]?[0-9a-f]+(/[0-9a-f]+)?', Number.Hex),
+ (r'#x[+-]?[0-9a-f]+(/[0-9a-f]+)?', Number.Hex),
# radix rational
- (r'#\d+[rR][+-]?[0-9a-z]+(/[0-9a-z]+)?', Number),
+ (r'#\d+r[+-]?[0-9a-z]+(/[0-9a-z]+)?', Number),
# complex
- (r'(#[cC])(\()', bygroups(Number, Punctuation), 'body'),
+ (r'(#c)(\()', bygroups(Number, Punctuation), 'body'),
# array
- (r'(#\d+[aA])(\()', bygroups(Literal.Other, Punctuation), 'body'),
+ (r'(#\d+a)(\()', bygroups(Literal.Other, Punctuation), 'body'),
# structure
- (r'(#[sS])(\()', bygroups(Literal.Other, Punctuation), 'body'),
+ (r'(#s)(\()', bygroups(Literal.Other, Punctuation), 'body'),
# path
- (r'#[pP]?"(\\.|[^"])*"', Literal.Other),
+ (r'#p?"(\\.|[^"])*"', Literal.Other),
# reference
(r'#\d+=', Operator),
'<', '<<', '<=', '=', '>', '>=', '>>', '|', '~', '$', '$0', '$1', '$10',
'$11', '$12', '$13', '$14', '$15', '$2', '$3', '$4', '$5', '$6', '$7',
'$8', '$9', '$args', '$idx', '$it', '$main-args', 'abort', 'abs',
- 'acos', 'acosh', 'add', 'address', 'amb', 'and', 'and', 'append-file',
+ 'acos', 'acosh', 'add', 'address', 'amb', 'and', 'append-file',
'append', 'apply', 'args', 'array-list', 'array?', 'array', 'asin',
'asinh', 'assoc', 'atan', 'atan2', 'atanh', 'atom?', 'base64-dec',
- 'base64-enc', 'bayes-query', 'bayes-train', 'begin', 'begin', 'begin',
- 'beta', 'betai', 'bind', 'binomial', 'bits', 'callback', 'case', 'case',
+ 'base64-enc', 'bayes-query', 'bayes-train', 'begin',
+ 'beta', 'betai', 'bind', 'binomial', 'bits', 'callback',
'case', 'catch', 'ceil', 'change-dir', 'char', 'chop', 'Class', 'clean',
'close', 'command-event', 'cond', 'cons', 'constant',
'context?', 'context', 'copy-file', 'copy', 'cos', 'cosh', 'count',
'cpymem', 'crc32', 'crit-chi2', 'crit-z', 'current-line', 'curry',
'date-list', 'date-parse', 'date-value', 'date', 'debug', 'dec',
- 'def-new', 'default', 'define-macro', 'define-macro', 'define',
+ 'def-new', 'default', 'define-macro', 'define',
'delete-file', 'delete-url', 'delete', 'destroy', 'det', 'device',
'difference', 'directory?', 'directory', 'div', 'do-until', 'do-while',
'doargs', 'dolist', 'dostring', 'dotimes', 'dotree', 'dump', 'dup',
'trace-highlight', 'trace', 'transpose', 'Tree', 'trim', 'true?',
'true', 'unicode', 'unify', 'unique', 'unless', 'unpack', 'until',
'upper-case', 'utf8', 'utf8len', 'uuid', 'wait-pid', 'when', 'while',
- 'write', 'write-char', 'write-file', 'write-line', 'write',
+ 'write', 'write-char', 'write-file', 'write-line',
'xfer-event', 'xml-error', 'xml-parse', 'xml-type-tags', 'zero?',
)
(r'(\$<)(.+?)(>)', bygroups(Operator, Name.Variable, Operator)),
(r'(?s)".*?"', String.Double),
(r'\\\S+', String),
- (r'[^\)$"# \t\n]+', String),
+ (r'[^)$"# \t\n]+', String),
(r'\n', Text), # explicitly legal
include('keywords'),
include('ws')
# quote can be transpose, instead of string:
# (not great, but handles common cases...)
- (r'(?<=[\w\)\].])\'+', Operator),
+ (r'(?<=[\w)\].])\'+', Operator),
(r'(\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?', Number.Float),
(r'\d+[eEf][+-]?[0-9]+', Number.Float),
(r'\d+', Number.Integer),
- (r'(?<![\w\)\].])\'', String, 'string'),
+ (r'(?<![\w)\].])\'', String, 'string'),
(r'[a-zA-Z_]\w*', Name),
(r'.', Text),
],
# punctuation:
- (r'\[|\]|\(|\)|\{|\}|:|@|\.|,', Punctuation),
+ (r'[\[\](){}:@.,]', Punctuation),
(r'=|:|;', Punctuation),
(r'"[^"]*"', String),
# quote can be transpose, instead of string:
# (not great, but handles common cases...)
- (r'(?<=[\w\)\].])\'+', Operator),
- (r'(?<![\w\)\].])\'', String, 'string'),
+ (r'(?<=[\w)\].])\'+', Operator),
+ (r'(?<![\w)\].])\'', String, 'string'),
(r'[a-zA-Z_]\w*', Name),
(r'.', Text),
# quote can be transpose, instead of string:
# (not great, but handles common cases...)
- (r'(?<=[\w\)\].])\'+', Operator),
- (r'(?<![\w\)\].])\'', String, 'string'),
+ (r'(?<=[\w)\].])\'+', Operator),
+ (r'(?<![\w)\].])\'', String, 'string'),
(r'(\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?', Number.Float),
(r'\d+[eEf][+-]?[0-9]+', Number.Float),
def stringy(whatkind):
return [
(r'[^"\\]', whatkind),
- (r'\\[\\\"abtnvfr]', String.Escape),
+ (r'\\[\\"abtnvfr]', String.Escape),
# Control-character notation is used for codes < 32,
# where \^@ == \000
(r'\\\^[\x40-\x5e]', String.Escape),
# Dealing with what comes after the 'fun' (or 'and' or '|') keyword
'fname': [
include('whitespace'),
- (r'\'[0-9a-zA-Z_\']*', Name.Decorator),
+ (r'\'[\w\']*', Name.Decorator),
(r'\(', Punctuation, 'tyvarseq'),
(r'(%s)' % alphanumid_re, Name.Function, '#pop'),
# Dealing with what comes after the 'val' (or 'and') keyword
'vname': [
include('whitespace'),
- (r'\'[0-9a-zA-Z_\']*', Name.Decorator),
+ (r'\'[\w\']*', Name.Decorator),
(r'\(', Punctuation, 'tyvarseq'),
(r'(%s)(\s*)(=(?!%s))' % (alphanumid_re, symbolicid_re),
include('whitespace'),
include('breakout'),
- (r'\'[0-9a-zA-Z_\']*', Name.Decorator),
+ (r'\'[\w\']*', Name.Decorator),
(r'\(', Punctuation, 'tyvarseq'),
(r'=(?!%s)' % symbolicid_re, Punctuation, ('#pop', 'typbind')),
include('whitespace'),
include('breakout'),
- (r'\'[0-9a-zA-Z_\']*', Name.Decorator),
+ (r'\'[\w\']*', Name.Decorator),
(r'\(', Punctuation, 'tyvarseq'),
(r'(=)(\s*)(datatype)',
bygroups(Punctuation, Text, Keyword.Reserved), '#pop'),
(r'\s', Text),
(r'\(\*', Comment.Multiline, 'comment'),
- (r'\'[0-9a-zA-Z_\']*', Name.Decorator),
+ (r'\'[\w\']*', Name.Decorator),
(alphanumid_re, Name),
(r',', Punctuation),
(r'\)', Punctuation, '#pop'),
tokens = {
'escape-sequence': [
- (r'\\[\\\"\'ntbr]', String.Escape),
+ (r'\\[\\"\'ntbr]', String.Escape),
(r'\\[0-9]{3}', String.Escape),
(r'\\x[0-9a-fA-F]{2}', String.Escape),
],
(r'[A-Z][\w\']*(?=\s*\.)', Name.Namespace),
(r'[A-Z][\w\']*', Name.Class, '#pop'),
(r'[a-z_][\w\']*', Name, '#pop'),
+ default('#pop'),
],
}
tokens = {
# copied from the caml lexer, should be adapted
'escape-sequence': [
- (r'\\[\\\"\'ntr}]', String.Escape),
+ (r'\\[\\"\'ntr}]', String.Escape),
(r'\\[0-9]{3}', String.Escape),
(r'\\x[0-9a-fA-F]{2}', String.Escape),
],
# to support it)
'type-tuple': [
include('comments-and-spaces'),
- (r'[^\(\)/*]+', Keyword.Type),
+ (r'[^()/*]+', Keyword.Type),
(r'[/*]', Keyword.Type),
(r'\(', Keyword.Type, '#push'),
(r'\)', Keyword.Type, '#pop'),
include('whitespace'),
(r'"', String.Double, 'string'),
(r'[()\[\]{},;]+', Punctuation),
- (r'\.?[\^*/+\-]|\.|<>|[<>:=]=?', Operator),
+ (r'\.?[*^/+-]|\.|<>|[<>:=]=?', Operator),
(r'\d+(\.?\d*[eE][-+]?\d+|\.\d*)', Number.Float),
(r'\d+', Number.Integer),
(r'(abs|acos|actualStream|array|asin|assert|AssertionLevel|atan|'
(r'(model)(\s+)(\{)',
bygroups(Keyword.Namespace, Text, Punctuation)),
# Reserved Words
- (r'(for|in)(?![0-9a-zA-Z\._])', Keyword.Reserved),
+ (r'(for|in)(?![\w.])', Keyword.Reserved),
# Built-in Functions
(r'(%s)(?=\s*\()'
% r'|'.join(_FUNCTIONS + _DISTRIBUTIONS),
# Block start
(r'(model|data)(\s+)(\{)',
bygroups(Keyword.Namespace, Text, Punctuation)),
- (r'var(?![0-9a-zA-Z\._])', Keyword.Declaration),
+ (r'var(?![\w.])', Keyword.Declaration),
# Reserved Words
- (r'(for|in)(?![0-9a-zA-Z\._])', Keyword.Reserved),
+ (r'(for|in)(?![\w.])', Keyword.Reserved),
# Builtins
# Need to use lookahead because . is a valid char
(r'(%s)(?=\s*\()' % r'|'.join(_FUNCTIONS
'root': [
(r'##.*$', String.Doc),
(r'#.*$', Comment),
- (r'\*|=|>|<|\+|-|/|@|\$|~|&|%|\!|\?|\||\\|\[|\]', Operator),
+ (r'[*=><+\-/@$~&%!?|\\\[\]]', Operator),
(r'\.\.|\.|,|\[\.|\.\]|\{\.|\.\}|\(\.|\.\)|\{|\}|\(|\)|:|\^|`|;',
Punctuation),
# Keywords
(r'(%s)\b' % underscorize(opWords), Operator.Word),
- (r'(p_?r_?o_?c_?\s)(?![\(\[\]])', Keyword, 'funcname'),
+ (r'(p_?r_?o_?c_?\s)(?![(\[\]])', Keyword, 'funcname'),
(r'(%s)\b' % underscorize(keywords), Keyword),
(r'(%s)\b' % underscorize(['from', 'import', 'include']),
Keyword.Namespace),
# Identifiers
(r'\b((?![_\d])\w)(((?!_)\w)|(_(?!_)\w))*', Name),
# Numbers
- (r'[0-9][0-9_]*(?=([eE.]|\'[fF](32|64)))',
+ (r'[0-9][0-9_]*(?=([e.]|\'f(32|64)))',
Number.Float, ('float-suffix', 'float-number')),
- (r'0[xX][a-f0-9][a-f0-9_]*', Number.Hex, 'int-suffix'),
- (r'0[bB][01][01_]*', Number.Bin, 'int-suffix'),
+ (r'0x[a-f0-9][a-f0-9_]*', Number.Hex, 'int-suffix'),
+ (r'0b[01][01_]*', Number.Bin, 'int-suffix'),
(r'0o[0-7][0-7_]*', Number.Oct, 'int-suffix'),
(r'[0-9][0-9_]*', Number.Integer, 'int-suffix'),
# Whitespace
],
'strings': [
(r'(?<!\$)\$(\d+|#|\w+)+', String.Interpol),
- (r'[^\\\'"\$\n]+', String),
+ (r'[^\\\'"$\n]+', String),
# quotes, dollars and backslashes must be parsed one at a time
(r'[\'"\\]', String),
# unhandled string formatting sign
],
'float-number': [
(r'\.(?!\.)[0-9_]*', Number.Float),
- (r'[eE][+-]?[0-9][0-9_]*', Number.Float),
+ (r'e[+-]?[0-9][0-9_]*', Number.Float),
default('#pop')
],
'float-suffix': [
- (r'\'[fF](32|64)', Number.Float),
+ (r'\'f(32|64)', Number.Float),
default('#pop')
],
'int-suffix': [
- (r'\'[iI](32|64)', Number.Integer.Long),
- (r'\'[iI](8|16)', Number.Integer),
+ (r'\'i(32|64)', Number.Integer.Long),
+ (r'\'i(8|16)', Number.Integer),
default('#pop')
],
}
'else', 'while', 'loop', 'for', 'in', 'and', 'or', 'not',
'implies', 'return', 'continue', 'break', 'abort', 'assert',
'new', 'is', 'once', 'super', 'self', 'true', 'false', 'nullable',
- 'null', 'as', 'isset', 'label', '__debug__'), suffix=r'(?=[\r\n\t\( ])'),
+ 'null', 'as', 'isset', 'label', '__debug__'), suffix=r'(?=[\r\n\t( ])'),
Keyword),
- (r'[A-Z][A-Za-z0-9_]*', Name.Class),
+ (r'[A-Z]\w*', Name.Class),
(r'"""(([^\'\\]|\\.)|\\r|\\n)*((\{\{?)?(""?\{\{?)*""""*)', String), # Simple long string
(r'\'\'\'(((\\.|[^\'\\])|\\r|\\n)|\'((\\.|[^\'\\])|\\r|\\n)|'
r'\'\'((\\.|[^\'\\])|\\r|\\n))*\'\'\'', String), # Simple long string alt
(r'[0-9]+', Number.Integer),
(r'[0-9]*.[0-9]+', Number.Float),
(r'0(x|X)[0-9A-Fa-f]+', Number.Hex),
- (r'[a-z][A-Za-z0-9_]*', Name),
- (r'_[A-Za-z0-9_]+', Name.Variable.Instance),
+ (r'[a-z]\w*', Name),
+ (r'_\w+', Name.Variable.Instance),
(r'==|!=|<==>|>=|>>|>|<=|<<|<|\+|-|=|/|\*|%|\+=|-=|!|@', Operator),
(r'\(|\)|\[|\]|,|\.\.\.|\.\.|\.|::|:', Punctuation),
(r'`\{[^`]*`\}', Text), # Extern blocks won't be Lexed by Nit
],
'comment': [
- (r'[^/\*]+', Comment.Multiline),
+ (r'[^/*]+', Comment.Multiline),
(r'/\*', Comment.Multiline, '#push'),
(r'\*/', Comment.Multiline, '#pop'),
- (r'[\*/]', Comment.Multiline),
+ (r'[*/]', Comment.Multiline),
],
'singlequote': [
(r"'''", String.Escape),
rv += 0.4
if re.search(r'mkDerivation\s+(\(|\{|rec)', text):
rv += 0.4
- if re.search(r'with\s+[a-zA-Z\.]+;', text):
- rv += 0.2
- if re.search(r'inherit\s+[a-zA-Z()\.];', text):
- rv += 0.2
if re.search(r'=\s+mkIf\s+', text):
rv += 0.4
if re.search(r'\{[a-zA-Z,\s]+\}:', text):
import re
-from pygments.lexer import include, bygroups, using, this, words, inherit, \
- default
+from pygments.lexer import RegexLexer, include, bygroups, using, this, words, \
+ inherit, default
from pygments.token import Text, Keyword, Name, String, Operator, \
- Number, Punctuation, Literal
+ Number, Punctuation, Literal, Comment
from pygments.lexers.c_cpp import CLexer, CppLexer
return 1.0
return 0
-
-class SwiftLexer(ObjectiveCLexer):
+class SwiftLexer(RegexLexer):
"""
For `Swift <https://developer.apple.com/swift/>`_ source.
aliases = ['swift']
mimetypes = ['text/x-swift']
- keywords_decl = set(('class', 'deinit', 'enum', 'extension', 'func', 'import',
- 'init', 'let', 'protocol', 'static', 'struct', 'subscript',
- 'typealias', 'var'))
- keywords_stmt = set(('break', 'case', 'continue', 'default', 'do', 'else',
- 'fallthrough', 'if', 'in', 'for', 'return', 'switch',
- 'where', 'while'))
- keywords_type = set(('as', 'dynamicType', 'is', 'new', 'super', 'self', 'Self',
- 'Type', '__COLUMN__', '__FILE__', '__FUNCTION__',
- '__LINE__'))
- keywords_resrv = set(('associativity', 'didSet', 'get', 'infix', 'inout', 'left',
- 'mutating', 'none', 'nonmutating', 'operator', 'override',
- 'postfix', 'precedence', 'prefix', 'right', 'set',
- 'unowned', 'unowned(safe)', 'unowned(unsafe)', 'weak',
- 'willSet'))
- operators = set(('->',))
+ tokens = {
+ 'root': [
+ # Whitespace and Comments
+ (r'\n', Text),
+ (r'\s+', Text),
+ (r'//', Comment.Single, 'comment-single'),
+ (r'/\*', Comment.Multiline, 'comment-multi'),
+ (r'#(if|elseif|else|endif)\b', Comment.Preproc, 'preproc'),
+
+ # Keywords
+ include('keywords'),
+
+ # Global Types
+ (r'(Array|AutoreleasingUnsafeMutablePointer|BidirectionalReverseView'
+ r'|Bit|Bool|CFunctionPointer|COpaquePointer|CVaListPointer'
+ r'|Character|ClosedInterval|CollectionOfOne|ContiguousArray'
+ r'|Dictionary|DictionaryGenerator|DictionaryIndex|Double'
+ r'|EmptyCollection|EmptyGenerator|EnumerateGenerator'
+ r'|EnumerateSequence|FilterCollectionView'
+ r'|FilterCollectionViewIndex|FilterGenerator|FilterSequenceView'
+ r'|Float|Float80|FloatingPointClassification|GeneratorOf'
+ r'|GeneratorOfOne|GeneratorSequence|HalfOpenInterval|HeapBuffer'
+ r'|HeapBufferStorage|ImplicitlyUnwrappedOptional|IndexingGenerator'
+ r'|Int|Int16|Int32|Int64|Int8|LazyBidirectionalCollection'
+ r'|LazyForwardCollection|LazyRandomAccessCollection'
+ r'|LazySequence|MapCollectionView|MapSequenceGenerator'
+ r'|MapSequenceView|MirrorDisposition|ObjectIdentifier|OnHeap'
+ r'|Optional|PermutationGenerator|QuickLookObject'
+ r'|RandomAccessReverseView|Range|RangeGenerator|RawByte|Repeat'
+ r'|ReverseBidirectionalIndex|ReverseRandomAccessIndex|SequenceOf'
+ r'|SinkOf|Slice|StaticString|StrideThrough|StrideThroughGenerator'
+ r'|StrideTo|StrideToGenerator|String|UInt|UInt16|UInt32|UInt64'
+ r'|UInt8|UTF16|UTF32|UTF8|UnicodeDecodingResult|UnicodeScalar'
+ r'|Unmanaged|UnsafeBufferPointer|UnsafeBufferPointerGenerator'
+ r'|UnsafeMutableBufferPointer|UnsafeMutablePointer|UnsafePointer'
+ r'|Zip2|ZipGenerator2'
+ # Protocols
+ r'|AbsoluteValuable|AnyObject|ArrayLiteralConvertible'
+ r'|BidirectionalIndexType|BitwiseOperationsType'
+ r'|BooleanLiteralConvertible|BooleanType|CVarArgType'
+ r'|CollectionType|Comparable|DebugPrintable'
+ r'|DictionaryLiteralConvertible|Equatable'
+ r'|ExtendedGraphemeClusterLiteralConvertible'
+ r'|ExtensibleCollectionType|FloatLiteralConvertible'
+ r'|FloatingPointType|ForwardIndexType|GeneratorType|Hashable'
+ r'|IntegerArithmeticType|IntegerLiteralConvertible|IntegerType'
+ r'|IntervalType|MirrorType|MutableCollectionType|MutableSliceable'
+ r'|NilLiteralConvertible|OutputStreamType|Printable'
+ r'|RandomAccessIndexType|RangeReplaceableCollectionType'
+ r'|RawOptionSetType|RawRepresentable|Reflectable|SequenceType'
+ r'|SignedIntegerType|SignedNumberType|SinkType|Sliceable'
+ r'|Streamable|Strideable|StringInterpolationConvertible'
+ r'|StringLiteralConvertible|UnicodeCodecType'
+ r'|UnicodeScalarLiteralConvertible|UnsignedIntegerType'
+ r'|_ArrayBufferType|_BidirectionalIndexType|_CocoaStringType'
+ r'|_CollectionType|_Comparable|_ExtensibleCollectionType'
+ r'|_ForwardIndexType|_Incrementable|_IntegerArithmeticType'
+ r'|_IntegerType|_ObjectiveCBridgeable|_RandomAccessIndexType'
+ r'|_RawOptionSetType|_SequenceType|_Sequence_Type'
+ r'|_SignedIntegerType|_SignedNumberType|_Sliceable|_Strideable'
+ r'|_SwiftNSArrayRequiredOverridesType|_SwiftNSArrayType'
+ r'|_SwiftNSCopyingType|_SwiftNSDictionaryRequiredOverridesType'
+ r'|_SwiftNSDictionaryType|_SwiftNSEnumeratorType'
+ r'|_SwiftNSFastEnumerationType|_SwiftNSStringRequiredOverridesType'
+ r'|_SwiftNSStringType|_UnsignedIntegerType'
+ # Variables
+ r'|C_ARGC|C_ARGV|Process'
+ # Typealiases
+ r'|Any|AnyClass|BooleanLiteralType|CBool|CChar|CChar16|CChar32'
+ r'|CDouble|CFloat|CInt|CLong|CLongLong|CShort|CSignedChar'
+ r'|CUnsignedInt|CUnsignedLong|CUnsignedShort|CWideChar'
+ r'|ExtendedGraphemeClusterType|Float32|Float64|FloatLiteralType'
+ r'|IntMax|IntegerLiteralType|StringLiteralType|UIntMax|UWord'
+ r'|UnicodeScalarType|Void|Word'
+ # Foundation/Cocoa
+ r'|NSErrorPointer|NSObjectProtocol|Selector)\b', Name.Builtin),
+ # Functions
+ (r'(abs|advance|alignof|alignofValue|assert|assertionFailure'
+ r'|contains|count|countElements|debugPrint|debugPrintln|distance'
+ r'|dropFirst|dropLast|dump|enumerate|equal|extend|fatalError'
+ r'|filter|find|first|getVaList|indices|insert|isEmpty|join|last'
+ r'|lazy|lexicographicalCompare|map|max|maxElement|min|minElement'
+ r'|numericCast|overlaps|partition|precondition|preconditionFailure'
+ r'|prefix|print|println|reduce|reflect|removeAll|removeAtIndex'
+ r'|removeLast|removeRange|reverse|sizeof|sizeofValue|sort|sorted'
+ r'|splice|split|startsWith|stride|strideof|strideofValue|suffix'
+ r'|swap|toDebugString|toString|transcode|underestimateCount'
+ r'|unsafeAddressOf|unsafeBitCast|unsafeDowncast'
+ r'|withExtendedLifetime|withUnsafeMutablePointer'
+ r'|withUnsafeMutablePointers|withUnsafePointer|withUnsafePointers'
+ r'|withVaList)\b', Name.Builtin.Pseudo),
+
+ # Implicit Block Variables
+ (r'\$\d+', Name.Variable),
+
+ # Binary Literal
+ (r'0b[01_]+', Number.Bin),
+ # Octal Literal
+ (r'0o[0-7_]+', Number.Oct),
+ # Hexadecimal Literal
+ (r'0x[0-9a-fA-F_]+', Number.Hex),
+ # Decimal Literal
+ (r'[0-9][0-9_]*(\.[0-9_]+[eE][+\-]?[0-9_]+|'
+ r'\.[0-9_]*|[eE][+\-]?[0-9_]+)', Number.Float),
+ (r'[0-9][0-9_]*', Number.Integer),
+ # String Literal
+ (r'"', String, 'string'),
+
+ # Operators and Punctuation
+ (r'[(){}\[\].,:;=@#`?]|->|[<&?](?=\w)|(?<=\w)[>!?]', Punctuation),
+ (r'[/=\-+!*%<>&|^?~]+', Operator),
+
+ # Identifier
+ (r'[a-zA-Z_]\w*', Name)
+ ],
+ 'keywords': [
+ (r'(break|case|continue|default|do|else|fallthrough|for|if|in'
+ r'|return|switch|where|while)\b', Keyword),
+ (r'@availability\([^)]+\)', Keyword.Reserved),
+ (r'(associativity|convenience|dynamic|didSet|final|get|infix|inout'
+ r'|lazy|left|mutating|none|nonmutating|optional|override|postfix'
+ r'|precedence|prefix|Protocol|required|right|set|Type|unowned|weak'
+ r'|willSet|@(availability|autoclosure|noreturn'
+ r'|NSApplicationMain|NSCopying|NSManaged|objc'
+ r'|UIApplicationMain|IBAction|IBDesignable|IBInspectable'
+ r'|IBOutlet))\b',Keyword.Reserved),
+ (r'(as|dynamicType|false|is|nil|self|Self|super|true|__COLUMN__'
+ r'|__FILE__|__FUNCTION__|__LINE__|_)\b', Keyword.Constant),
+ (r'import\b', Keyword.Declaration, 'module'),
+ (r'(class|enum|extension|struct|protocol)(\s+)([a-zA-Z_]\w*)',
+ bygroups(Keyword.Declaration, Text, Name.Class)),
+ (r'(func)(\s+)([a-zA-Z_]\w*)',
+ bygroups(Keyword.Declaration, Text, Name.Function)),
+ (r'(var|let)(\s+)([a-zA-Z_]\w*)', bygroups(Keyword.Declaration,
+ Text, Name.Variable)),
+ (r'(class|deinit|enum|extension|func|import|init|internal|let'
+ r'|operator|private|protocol|public|static|struct|subscript'
+ r'|typealias|var)\b', Keyword.Declaration)
+ ],
+ 'comment': [
+ (r':param: [a-zA-Z_]\w*|:returns?:|(FIXME|MARK|TODO):',
+ Comment.Special)
+ ],
+
+ # Nested
+ 'comment-single': [
+ (r'\n', Text, '#pop'),
+ include('comment'),
+ (r'[^\n]', Comment.Single)
+ ],
+ 'comment-multi': [
+ include('comment'),
+ (r'[^*/]', Comment.Multiline),
+ (r'/\*', Comment.Multiline, '#push'),
+ (r'\*/', Comment.Multiline, '#pop'),
+ (r'[*/]', Comment.Multiline)
+ ],
+ 'module': [
+ (r'\n', Text, '#pop'),
+ (r'[a-zA-Z_]\w*', Name.Class),
+ include('root')
+ ],
+ 'preproc': [
+ (r'\n', Text, '#pop'),
+ include('keywords'),
+ (r'[A-Za-z]\w*', Comment.Preproc),
+ include('root')
+ ],
+ 'string': [
+ (r'\\\(', String.Interpol, 'string-intp'),
+ (r'"', String, '#pop'),
+ (r"""\\['"\\nrt]|\\x[0-9a-fA-F]{2}|\\[0-7]{1,3}"""
+ r"""|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}""", String.Escape),
+ (r'[^\\"]+', String),
+ (r'\\', String)
+ ],
+ 'string-intp': [
+ (r'\(', String.Interpol, '#push'),
+ (r'\)', String.Interpol, '#pop'),
+ include('root')
+ ]
+ }
def get_tokens_unprocessed(self, text):
- for index, token, value in ObjectiveCLexer.get_tokens_unprocessed(self, text):
- if token is Name:
- if value in self.keywords_decl:
- token = Keyword
- elif value in self.keywords_stmt:
- token = Keyword
- elif value in self.keywords_type:
- token = Keyword.Type
- elif value in self.keywords_resrv:
- token = Keyword.Reserved
- elif value in self.operators:
- token = Operator
+ from pygments.lexers._cocoa_builtins import COCOA_INTERFACES, \
+ COCOA_PROTOCOLS, COCOA_PRIMITIVES
+
+ for index, token, value in \
+ RegexLexer.get_tokens_unprocessed(self, text):
+ if token is Name or token is Name.Class:
+ if value in COCOA_INTERFACES or value in COCOA_PROTOCOLS \
+ or value in COCOA_PRIMITIVES:
+ token = Name.Builtin.Pseudo
+
yield index, token, value
(r'[0-9_]\.[0-9_]*(?!\.)', Number.Float),
(r'[0-9_]+', Number.Decimal),
- (r'"(?:\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\"])*"',
+ (r'"(?:\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\"])*"',
String.Double),
(r"'(?:\\.|\\[0-9]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'",
String.Char),
(r'/(?!\*)(\\\\|\\/|[^/])*/', String.Regex), # regular expressions
],
'identifiers': [
- (r'[a-zA-Z_][a-zA-Z_0-9]*', Name.Variable),
+ (r'[a-zA-Z_]\w*', Name.Variable),
],
'operators': [
(r',', Operator), # Join
r'/(?!\*)(\\\\|\\/|[^/])*/\*',
# allow / as long as it's not followed by another / or by a *
- r'/(?=[^/\*]|$)',
+ r'/(?=[^/*]|$)',
# We want to match as many of these as we can in one block.
# Not sure if we need the + sign here,
aliases = ['antlr']
filenames = []
- _id = r'[A-Za-z][A-Za-z_0-9]*'
- _TOKEN_REF = r'[A-Z][A-Za-z_0-9]*'
- _RULE_REF = r'[a-z][A-Za-z_0-9]*'
+ _id = r'[A-Za-z]\w*'
+ _TOKEN_REF = r'[A-Z]\w*'
+ _RULE_REF = r'[a-z]\w*'
_STRING_LITERAL = r'\'(?:\\\\|\\\'|[^\']*)\''
_INT = r'[0-9]+'
(r'<<([^>]|>[^>])>>', String),
# identifiers
# Tokens start with capital letter.
- (r'\$?[A-Z_][A-Za-z_0-9]*', Name.Constant),
+ (r'\$?[A-Z_]\w*', Name.Constant),
# Rules start with small letter.
- (r'\$?[a-z_][A-Za-z_0-9]*', Name.Variable),
+ (r'\$?[a-z_]\w*', Name.Variable),
# operators
(r'(\+|\||->|=>|=|\(|\)|\.\.|\.|\?|\*|\^|!|\#|~)', Operator),
(r',', Punctuation),
(r'\}', Punctuation, '#pop'),
],
'action': [
- (r'(' + r'|'.join(( # keep host code in largest possible chunks
- r'[^\${}\'"/\\]+', # exclude unsafe characters
+ (r'(' + r'|'.join(( # keep host code in largest possible chunks
+ r'[^${}\'"/\\]+', # exclude unsafe characters
# strings and comments may safely contain unsafe characters
r'"(\\\\|\\"|[^"])*"', # double quote string
(r'\}', Punctuation, '#pop'),
],
'nested-arg-action': [
- (r'(' + r'|'.join(( # keep host code in largest possible chunks.
- r'[^\$\[\]\'"/]+', # exclude unsafe characters
+ (r'(' + r'|'.join(( # keep host code in largest possible chunks.
+ r'[^$\[\]\'"/]+', # exclude unsafe characters
# strings and comments may safely contain unsafe characters
r'"(\\\\|\\"|[^"])*"', # double quote string
include('end'),
(r'module\b', Keyword, '#push'),
(r'grammar\b', Keyword, 'grammar'),
- (r'[A-Z][A-Za-z_0-9]*(?:::[A-Z][A-Za-z_0-9]*)*', Name.Namespace),
+ (r'[A-Z]\w*(?:::[A-Z]\w*)*', Name.Namespace),
],
'grammar': [
include('space'),
include('end'),
(r'rule\b', Keyword, 'rule'),
(r'include\b', Keyword, 'include'),
- (r'[A-Z][A-Za-z_0-9]*', Name),
+ (r'[A-Z]\w*', Name),
],
'include': [
include('space'),
- (r'[A-Z][A-Za-z_0-9]*(?:::[A-Z][A-Za-z_0-9]*)*', Name.Class, '#pop'),
+ (r'[A-Z]\w*(?:::[A-Z]\w*)*', Name.Class, '#pop'),
],
'rule': [
include('space'),
include('end'),
(r'"(\\\\|\\"|[^"])*"', String.Double),
(r"'(\\\\|\\'|[^'])*'", String.Single),
- (r'([A-Za-z_][A-Za-z_0-9]*)(:)', bygroups(Name.Label, Punctuation)),
- (r'[A-Za-z_][A-Za-z_0-9]*', Name),
+ (r'([A-Za-z_]\w*)(:)', bygroups(Name.Label, Punctuation)),
+ (r'[A-Za-z_]\w*', Name),
(r'[()]', Punctuation),
(r'[?+*/&!~]', Operator),
(r'\[(?:\\.|\[:\^?[a-z]+:\]|[^\\\]])+\]', String.Regex),
(r'[*)]', Comment.Multiline),
],
'identifier': [
- (r'([a-zA-Z][a-zA-Z0-9_ \-]*)', Keyword),
+ (r'([a-zA-Z][\w \-]*)', Keyword),
],
}
(r'\s+', Text), # whitespace
],
'identifiers': [
- (r'([a-zA-Z_\$][\w\$]*)', Name),
+ (r'([a-zA-Z_$][\w$]*)', Name),
],
'numliterals': [
(r'[01]+B', Number.Bin), # binary number (ObjM2)
(r'::', Operator), # type conversion (ObjM2)
],
'punctuation': [
- (r'[\(\)\[\]{},.:;|]', Punctuation),
+ (r'[()\[\]{},.:;|]', Punctuation),
],
'comments': [
(r'//.*?\n', Comment.Single), # ObjM2
(r'/\*(.*?)\*/', Comment.Multiline), # ObjM2
- (r'\(\*([^\$].*?)\*\)', Comment.Multiline),
+ (r'\(\*([^$].*?)\*\)', Comment.Multiline),
# TO DO: nesting of (* ... *) comments
],
'pragmas': [
filenames = ['*.adb', '*.ads', '*.ada']
mimetypes = ['text/x-ada']
- flags = re.MULTILINE | re.I # Ignore case
+ flags = re.MULTILINE | re.IGNORECASE
tokens = {
'root': [
(r'--.*?\n', Comment.Single),
(r'[^\S\n]+', Text),
(r'function|procedure|entry', Keyword.Declaration, 'subprogram'),
- (r'(subtype|type)(\s+)([a-z0-9_]+)',
+ (r'(subtype|type)(\s+)(\w+)',
bygroups(Keyword.Declaration, Text, Keyword.Type), 'type_def'),
(r'task|protected', Keyword.Declaration),
(r'(subtype)(\s+)', bygroups(Keyword.Declaration, Text)),
(r'package', Keyword.Declaration, 'package'),
(r'array\b', Keyword.Reserved, 'array_def'),
(r'(with|use)(\s+)', bygroups(Keyword.Namespace, Text), 'import'),
- (r'([a-z0-9_]+)(\s*)(:)(\s*)(constant)',
+ (r'(\w+)(\s*)(:)(\s*)(constant)',
bygroups(Name.Constant, Text, Punctuation, Text,
Keyword.Reserved)),
- (r'<<[a-z0-9_]+>>', Name.Label),
- (r'([a-z0-9_]+)(\s*)(:)(\s*)(declare|begin|loop|for|while)',
+ (r'<<\w+>>', Name.Label),
+ (r'(\w+)(\s*)(:)(\s*)(declare|begin|loop|for|while)',
bygroups(Name.Label, Text, Punctuation, Text, Keyword.Reserved)),
(words((
'abort', 'abs', 'abstract', 'accept', 'access', 'aliased', 'all',
include('attribute'),
include('numbers'),
(r"'[^']'", String.Character),
- (r'([a-z0-9_]+)(\s*|[(,])', bygroups(Name, using(this))),
+ (r'(\w+)(\s*|[(,])', bygroups(Name, using(this))),
(r"(<>|=>|:=|[()|:;,.'])", Punctuation),
(r'[*<>+=/&-]', Operator),
(r'\n+', Text),
(r'\(', Punctuation, ('#pop', 'formal_part')),
(r';', Punctuation, '#pop'),
(r'is\b', Keyword.Reserved, '#pop'),
- (r'"[^"]+"|[a-z0-9_]+', Name.Function),
+ (r'"[^"]+"|\w+', Name.Function),
include('root'),
],
'end': [
],
'array_def': [
(r';', Punctuation, '#pop'),
- (r'([a-z0-9_]+)(\s+)(range)', bygroups(Keyword.Type, Text,
- Keyword.Reserved)),
+ (r'(\w+)(\s+)(range)', bygroups(Keyword.Type, Text, Keyword.Reserved)),
include('root'),
],
'record_def': [
include('root'),
],
'import': [
- (r'[a-z0-9_.]+', Name.Namespace, '#pop'),
+ (r'[\w.]+', Name.Namespace, '#pop'),
default('#pop'),
],
'formal_part': [
(r'\)', Punctuation, '#pop'),
- (r'[a-z0-9_]+', Name.Variable),
+ (r'\w+', Name.Variable),
(r',|:[^=]', Punctuation),
(r'(in|not|null|out|access)\b', Keyword.Reserved),
include('root'),
include('root'),
],
'package_instantiation': [
- (r'("[^"]+"|[a-z0-9_]+)(\s+)(=>)', bygroups(Name.Variable,
- Text, Punctuation)),
- (r'[a-z0-9._\'"]', Text),
+ (r'("[^"]+"|\w+)(\s+)(=>)', bygroups(Name.Variable, Text, Punctuation)),
+ (r'[\w.\'"]', Text),
(r'\)', Punctuation, '#pop'),
include('root'),
],
(r'\{(\\\\|\\[^\\]|[^\\}])*\}[egimosx]*', String.Regex, '#pop'),
(r'<(\\\\|\\[^\\]|[^\\>])*>[egimosx]*', String.Regex, '#pop'),
(r'\[(\\\\|\\[^\\]|[^\\\]])*\][egimosx]*', String.Regex, '#pop'),
- (r'\((\\\\|\\[^\\]|[^\\\)])*\)[egimosx]*', String.Regex, '#pop'),
- (r'@(\\\\|\\[^\\]|[^\\\@])*@[egimosx]*', String.Regex, '#pop'),
- (r'%(\\\\|\\[^\\]|[^\\\%])*%[egimosx]*', String.Regex, '#pop'),
- (r'\$(\\\\|\\[^\\]|[^\\\$])*\$[egimosx]*', String.Regex, '#pop'),
+ (r'\((\\\\|\\[^\\]|[^\\)])*\)[egimosx]*', String.Regex, '#pop'),
+ (r'@(\\\\|\\[^\\]|[^\\@])*@[egimosx]*', String.Regex, '#pop'),
+ (r'%(\\\\|\\[^\\]|[^\\%])*%[egimosx]*', String.Regex, '#pop'),
+ (r'\$(\\\\|\\[^\\]|[^\\$])*\$[egimosx]*', String.Regex, '#pop'),
],
'root': [
(r'\#.*?$', Comment.Single),
(r's<(\\\\|\\[^\\]|[^\\>])*>\s*', String.Regex, 'balanced-regex'),
(r's\[(\\\\|\\[^\\]|[^\\\]])*\]\s*', String.Regex,
'balanced-regex'),
- (r's\((\\\\|\\[^\\]|[^\\\)])*\)\s*', String.Regex,
+ (r's\((\\\\|\\[^\\]|[^\\)])*\)\s*', String.Regex,
'balanced-regex'),
(r'm?/(\\\\|\\[^\\]|[^\\/\n])*/[gcimosx]*', String.Regex),
- (r'm(?=[/!\\{<\[\(@%\$])', String.Regex, 'balanced-regex'),
+ (r'm(?=[/!\\{<\[(@%$])', String.Regex, 'balanced-regex'),
(r'((?<==~)|(?<=\())\s*/(\\\\|\\[^\\]|[^\\/])*/[gcimosx]*',
String.Regex),
(r'\s+', Text),
(r'(q|qq|qw|qr|qx)\(', String.Other, 'rb-string'),
(r'(q|qq|qw|qr|qx)\[', String.Other, 'sb-string'),
(r'(q|qq|qw|qr|qx)\<', String.Other, 'lt-string'),
- (r'(q|qq|qw|qr|qx)([^a-zA-Z0-9])(.|\n)*?\2', String.Other),
+ (r'(q|qq|qw|qr|qx)([\W_])(.|\n)*?\2', String.Other),
(r'package\s+', Keyword, 'modulename'),
(r'sub\s+', Keyword, 'funcname'),
(r'(\[\]|\*\*|::|<<|>>|>=|<=>|<=|={3}|!=|=~|'
r'!~|&&?|\|\||\.{1,3})', Operator),
(r'[-+/*%=<>&^|!\\~]=?', Operator),
- (r'[\(\)\[\]:;,<>/\?\{\}]', Punctuation), # yes, there's no shortage
- # of punctuation in Perl!
+ (r'[()\[\]:;,<>/?{}]', Punctuation), # yes, there's no shortage
+ # of punctuation in Perl!
(r'(?=\w)', Name, 'name'),
],
'format': [
(r'[a-zA-Z_]\w*', Name.Namespace, '#pop')
],
'funcname': [
- (r'[a-zA-Z_]\w*[\!\?]?', Name.Function),
+ (r'[a-zA-Z_]\w*[!?]?', Name.Function),
(r'\s+', Text),
# argument declaration
(r'(\([$@%]*\))(\s*)', bygroups(Punctuation, Text)),
- (r'.*?\{', Punctuation, '#pop'),
(r';', Punctuation, '#pop'),
+ (r'.*?\{', Punctuation, '#pop'),
],
'cb-string': [
- (r'\\[\{\}\\]', String.Other),
+ (r'\\[{}\\]', String.Other),
(r'\\', String.Other),
(r'\{', String.Other, 'cb-string'),
(r'\}', String.Other, '#pop'),
- (r'[^\{\}\\]+', String.Other)
+ (r'[^{}\\]+', String.Other)
],
'rb-string': [
- (r'\\[\(\)\\]', String.Other),
+ (r'\\[()\\]', String.Other),
(r'\\', String.Other),
(r'\(', String.Other, 'rb-string'),
(r'\)', String.Other, '#pop'),
- (r'[^\(\)]+', String.Other)
+ (r'[^()]+', String.Other)
],
'sb-string': [
(r'\\[\[\]\\]', String.Other),
(r'[^\[\]]+', String.Other)
],
'lt-string': [
- (r'\\[\<\>\\]', String.Other),
+ (r'\\[<>\\]', String.Other),
(r'\\', String.Other),
(r'\<', String.Other, 'lt-string'),
(r'\>', String.Other, '#pop'),
- (r'[^\<\>]+', String.Other)
+ (r'[^<>]+', String.Other)
],
'end-part': [
(r'.+', Comment.Preproc, '#pop')
(r'(?<=~~)\s*/(?:\\\\|\\/|.)*?/', String.Regex),
(r'(?<=[=(,])\s*/(?:\\\\|\\/|.)*?/', String.Regex),
(r'm\w+(?=\()', Name),
- (r'(?:m|ms|rx)\s*(?P<adverbs>:[\w\s:]+)?\s*(?P<delimiter>(?P<first_char>[^0-9a-zA-Z_:\s])'
+ (r'(?:m|ms|rx)\s*(?P<adverbs>:[\w\s:]+)?\s*(?P<delimiter>(?P<first_char>[^\w:\s])'
r'(?P=first_char)*)', brackets_callback(String.Regex)),
(r'(?:s|ss|tr)\s*(?::[\w\s:]+)?\s*/(?:\\\\|\\/|.)*?/(?:\\\\|\\/|.)*?/',
String.Regex),
(r'<[^\s=].*?\S>', String),
(_build_word_match(PERL6_OPERATORS), Operator),
- (r'[0-9a-zA-Z_]' + PERL6_IDENTIFIER_RANGE + '*', Name),
+ (r'\w' + PERL6_IDENTIFIER_RANGE + '*', Name),
(r"'(\\\\|\\[^\\]|[^'\\])*'", String),
(r'"(\\\\|\\[^\\]|[^"\\])*"', String),
],
(r'^(?=\s|/|<!--)', Text, 'slashstartsregex'),
include('commentsandwhitespace'),
(r'\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|'
- r'(<<|>>>?|==?|!=?|->|[-<>+*%&\|\^/])=?', Operator, 'slashstartsregex'),
+ r'(<<|>>>?|==?|!=?|->|[-<>+*%&|^/])=?', Operator, 'slashstartsregex'),
(r'[{(\[;,]', Punctuation, 'slashstartsregex'),
(r'[})\].]', Punctuation),
(r'(for|in|while|do|break|return|continue|switch|case|default|if|else|loop|'
(r'/\*.*?\*/', Comment.Multiline),
(r'(->|::)(\s*)(' + _ident_inner + ')',
bygroups(Operator, Text, Name.Attribute)),
- (r'[~!%^&*+=|:.<>/?@-]+', Operator),
+ (r'[~!%^&*+=|:.<>/@-]+', Operator),
+ (r'\?', Operator), # don't add to the charclass above!
(r'[\[\]{}();,]+', Punctuation),
(r'(class)(\s+)', bygroups(Keyword, Text), 'classname'),
(r'(function)(\s*)(?=\()', bygroups(Keyword, Text)),
(r'\$\{\$+' + _ident_inner + '\}', Name.Variable),
(r'\$+' + _ident_inner, Name.Variable),
(_ident_inner, Name.Other),
- (r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float),
- (r'\d+[eE][+-]?[0-9]+', Number.Float),
+ (r'(\d+\.\d*|\d*\.\d+)(e[+-]?[0-9]+)?', Number.Float),
+ (r'\d+e[+-]?[0-9]+', Number.Float),
(r'0[0-7]+', Number.Oct),
- (r'0[xX][a-f0-9]+', Number.Hex),
+ (r'0x[a-f0-9]+', Number.Hex),
(r'\d+', Number.Integer),
(r'0b[01]+', Number.Bin),
(r"'([^'\\]*(?:\\.[^'\\]*)*)'", String.Single),
'string': [
(r'"', String.Double, '#pop'),
(r'[^{$"\\]+', String.Double),
- (r'\\([nrt\"$\\]|[0-7]{1,3}|x[0-9a-f]{1,2})', String.Escape),
+ (r'\\([nrt"$\\]|[0-7]{1,3}|x[0-9a-f]{1,2})', String.Escape),
(r'\$' + _ident_inner + '(\[\S+?\]|->' + _ident_inner + ')?',
String.Interpol),
(r'(\{\$\{)(.*?)(\}\})',
rv = 0.0
if re.search(r'<\?(?!xml)', text):
rv += 0.3
- if '?>' in text:
- rv += 0.1
return rv
filenames = ['*.ecl', '*.prolog', '*.pro', '*.pl']
mimetypes = ['text/x-prolog']
- flags = re.UNICODE
+ flags = re.UNICODE | re.MULTILINE
tokens = {
'root': [
(r'0x[0-9a-fA-F]+', Number.Hex),
(r'\d+\.?\d*((e|E)(\+|-)?\d+)?', Number),
# Variables
- (r'([A-Z_][a-zA-Z0-9_]*)', Name.Variable),
+ (r'([A-Z_]\w*)', Name.Variable),
# Event handlers
(r'(after|before)(?=[(])', Keyword),
# Message forwarding handler
# Ponctuation
(r'[()\[\],.|]', Text),
# Atoms
- (r"[a-z][a-zA-Z0-9_]*", Text),
+ (r"[a-z]\w*", Text),
(r"'", String, 'quoted_atom'),
],
r's(et_(logtalk|prolog)_flag|ynchronized))(?=[(])', Keyword, 'root'),
(r'op(?=[(])', Keyword, 'root'),
(r'(c(alls|oinductive)|module|reexport|use(s|_module))(?=[(])', Keyword, 'root'),
- (r'[a-z][a-zA-Z0-9_]*(?=[(])', Text, 'root'),
- (r'[a-z][a-zA-Z0-9_]*[.]', Text, 'root'),
+ (r'[a-z]\w*(?=[(])', Text, 'root'),
+ (r'[a-z]\w*[.]', Text, 'root'),
],
'entityrelations': [
(r'0x[0-9a-fA-F]+', Number.Hex),
(r'\d+\.?\d*((e|E)(\+|-)?\d+)?', Number),
# Variables
- (r'([A-Z_][a-zA-Z0-9_]*)', Name.Variable),
+ (r'([A-Z_]\w*)', Name.Variable),
# Atoms
- (r"[a-z][a-zA-Z0-9_]*", Text),
+ (r"[a-z]\w*", Text),
(r"'", String, 'quoted_atom'),
# Strings
(r'"(\\\\|\\"|[^"])*"', String),
(r"(?<!\.)(Exception|GeneratorExit|KeyboardInterrupt|StopIteration|"
r"SystemExit)(?!['\w])", Name.Exception),
- (r"(?<![\.\w])(except|finally|for|if|import|not|otherwise|raise|"
+ (r"(?<![\w.])(except|finally|for|if|import|not|otherwise|raise|"
r"subclass|while|with|yield)(?!['\w])", Keyword.Reserved),
(r"[A-Z_]+'*(?!['\w])", Name),
(r'#.*$', Comment.Single),
],
'valid_name': [
- (r'[a-zA-Z][0-9a-zA-Z\._]*', Text),
+ (r'[a-zA-Z][\w.]*', Text),
# can begin with ., but not if that is followed by a digit
- (r'\.[a-zA-Z_][0-9a-zA-Z\._]*', Text),
+ (r'\.[a-zA-Z_][\w.]*', Text),
],
'punctuation': [
(r'\[{1,2}|\]{1,2}|\(|\)|;|,', Punctuation),
],
'keywords': [
- (words(builtins_base, suffix=r'(?![\w\. =])'),
+ (words(builtins_base, suffix=r'(?![\w. =])'),
Keyword.Pseudo),
(r'(if|else|for|while|repeat|in|next|break|return|switch|function)'
- r'(?![\w\.])',
+ r'(?![\w.])',
Keyword.Reserved),
(r'(array|category|character|complex|double|function|integer|list|'
r'logical|matrix|numeric|vector|data.frame|c)'
- r'(?![\w\.])',
+ r'(?![\w.])',
Keyword.Type),
(r'(library|require|attach|detach|source)'
- r'(?![\w\.])',
+ r'(?![\w.])',
Keyword.Namespace)
],
'operators': [
'builtin_symbols': [
(r'(NULL|NA(_(integer|real|complex|character)_)?|'
r'letters|LETTERS|Inf|TRUE|FALSE|NaN|pi|\.\.(\.|[0-9]+))'
- r'(?![0-9a-zA-Z\._])',
+ r'(?![\w.])',
Keyword.Constant),
(r'(T|F)\b', Name.Builtin.Pseudo),
],
r'insert\s+data|delete\s+data|delete\s+where|delete|insert|'
r'using named|using|graph|default|named|all|optional|service|'
r'silent|bind|union|not in|in|as|a)', Keyword),
- (r'(prefix|base)(\s+)([a-z][a-z\d_\-]*)(\s*)(\:)',
+ (r'(prefix|base)(\s+)([a-z][\w-]*)(\s*)(\:)',
bygroups(Keyword, Whitespace, Name.Namespace, Whitespace,
Punctuation)),
- (r'\?[a-z_][a-z\d_]*', Name.Variable),
+ (r'\?[a-z_]\w*', Name.Variable),
(r'<[^>]+>', Name.Label),
- (r'([a-z][a-z\d_\-]*)(\:)([a-z][a-z\d_\-]*)',
+ (r'([a-z][\w-]*)(\:)([a-z][\w-]*)',
bygroups(Name.Namespace, Punctuation, Name.Tag)),
(r'(str|lang|langmatches|datatype|bound|iri|uri|bnode|rand|abs|'
r'ceil|floor|round|concat|strlen|ucase|lcase|encode_for_uri|'
Name.Function),
(r'(true|false)', Literal),
(r'[+\-]?\d*\.\d+', Number.Float),
- (r'[+\-]?\d*(:?\.\d+)?[eE][+\-]?\d+', Number.Float),
+ (r'[+\-]?\d*(:?\.\d+)?E[+\-]?\d+', Number.Float),
(r'[+\-]?\d+', Number.Integer),
(r'(\|\||&&|=|\*|\-|\+|/)', Operator),
(r'[(){}.;,:^]', Punctuation),
flags = re.IGNORECASE | re.MULTILINE
- re.IGNORECASE
-
escape_re = r'(?:\^\([0-9a-f]{1,4}\)*)'
def word_callback(lexer, match):
(r';\*+.*\n', Comment.Preproc),
(r';.*\n', Comment),
(r'%"', Name.Decorator, 'stringFile'),
- (r'%[^(\^{^")\s\[\]]+', Name.Decorator),
+ (r'%[^(^{")\s\[\]]+', Name.Decorator),
(r'[+-]?([a-z]{1,3})?\$\d+(\.\d+)?', Number.Float), # money
(r'[+-]?\d+\:\d+(\:\d+)?(\.\d+)?', String.Other), # time
- (r'\d+[\-\/][0-9a-z]+[\-\/]\d+(\/\d+\:\d+((\:\d+)?'
- r'([\.\d+]?([+-]?\d+:\d+)?)?)?)?', String.Other), # date
+ (r'\d+[\-/][0-9a-z]+[\-/]\d+(\/\d+\:\d+((\:\d+)?'
+ r'([.\d+]?([+-]?\d+:\d+)?)?)?)?', String.Other), # date
(r'\d+(\.\d+)+\.\d+', Keyword.Constant), # tuple
- (r'\d+[xX]\d+', Keyword.Constant), # pair
- (r'[+-]?\d+(\'\d+)?([\.,]\d*)?[eE][+-]?\d+', Number.Float),
- (r'[+-]?\d+(\'\d+)?[\.,]\d*', Number.Float),
+ (r'\d+X\d+', Keyword.Constant), # pair
+ (r'[+-]?\d+(\'\d+)?([.,]\d*)?E[+-]?\d+', Number.Float),
+ (r'[+-]?\d+(\'\d+)?[.,]\d*', Number.Float),
(r'[+-]?\d+(\'\d+)?', Number),
- (r'[\[\]\(\)]', Generic.Strong),
- (r'[a-z]+[^(\^{"\s:)]*://[^(\^{"\s)]*', Name.Decorator), # url
- (r'mailto:[^(\^{"@\s)]+@[^(\^{"@\s)]+', Name.Decorator), # url
- (r'[^(\^{"@\s)]+@[^(\^\{"@\s)]+', Name.Decorator), # email
+ (r'[\[\]()]', Generic.Strong),
+ (r'[a-z]+[^(^{"\s:)]*://[^(^{"\s)]*', Name.Decorator), # url
+ (r'mailto:[^(^{"@\s)]+@[^(^{"@\s)]+', Name.Decorator), # url
+ (r'[^(^{"@\s)]+@[^(^{"@\s)]+', Name.Decorator), # email
(r'comment\s"', Comment, 'commentString1'),
(r'comment\s\{', Comment, 'commentString2'),
(r'comment\s\[', Comment, 'commentBlock'),
- (r'comment\s[^(\s\{\"\[]+', Comment),
- (r'/[^(\^{^")\s/[\]]*', Name.Attribute),
- (r'([^(\^{^")\s/[\]]+)(?=[:({"\s/\[\]])', word_callback),
+ (r'comment\s[^(\s{"\[]+', Comment),
+ (r'/[^(^{")\s/[\]]*', Name.Attribute),
+ (r'([^(^{")\s/[\]]+)(?=[:({"\s/\[\]])', word_callback),
(r'<[\w:.-]*>', Name.Tag),
(r'<[^(<>\s")]+', Name.Tag, 'tag'),
- (r'([^(\^{^")\s]+)', Text),
+ (r'([^(^{")\s]+)', Text),
],
'string': [
- (r'[^(\^")]+', String),
+ (r'[^(^")]+', String),
(escape_re, String.Escape),
- (r'[\(|\)]+', String),
+ (r'[(|)]+', String),
(r'\^.', String.Escape),
(r'"', String, '#pop'),
],
'string2': [
- (r'[^(\^{^})]+', String),
+ (r'[^(^{})]+', String),
(escape_re, String.Escape),
- (r'[\(|\)]+', String),
+ (r'[(|)]+', String),
(r'\^.', String.Escape),
(r'\{', String, '#push'),
(r'\}', String, '#pop'),
],
'stringFile': [
- (r'[^(\^")]+', Name.Decorator),
+ (r'[^(^")]+', Name.Decorator),
(escape_re, Name.Decorator),
(r'\^.', Name.Decorator),
(r'"', Name.Decorator, '#pop'),
(r'>', Name.Tag, '#pop'),
],
'tagString': [
- (r'[^(\^")]+', Name.Tag),
+ (r'[^(^")]+', Name.Tag),
(escape_re, Name.Tag),
- (r'[\(|\)]+', Name.Tag),
+ (r'[(|)]+', Name.Tag),
(r'\^.', Name.Tag),
(r'"', Name.Tag, '#pop'),
],
],
'bin2': [
(r'\s+', Number.Hex),
- (r'([0-1]\s*){8}', Number.Hex),
+ (r'([01]\s*){8}', Number.Hex),
(r'\}', Number.Hex, '#pop'),
],
'commentString1': [
- (r'[^(\^")]+', Comment),
+ (r'[^(^")]+', Comment),
(escape_re, Comment),
- (r'[\(|\)]+', Comment),
+ (r'[(|)]+', Comment),
(r'\^.', Comment),
(r'"', Comment, '#pop'),
],
'commentString2': [
- (r'[^(\^{^})]+', Comment),
+ (r'[^(^{})]+', Comment),
(escape_re, Comment),
- (r'[\(|\)]+', Comment),
+ (r'[(|)]+', Comment),
(r'\^.', Comment),
(r'\{', Comment, '#push'),
(r'\}', Comment, '#pop'),
(r'\]', Comment, '#pop'),
(r'"', Comment, "commentString1"),
(r'\{', Comment, "commentString2"),
- (r'[^(\[\]\"{)]+', Comment),
+ (r'[^(\[\]"{)]+', Comment),
],
}
(r'#\{[0-9a-f\s]*\}', Number.Hex),
(r'2#\{', Number.Hex, 'bin2'),
(r'64#\{[0-9a-z+/=\s]*\}', Number.Hex),
- (r'([0-9a-f]+)(h)((\s)|(?=[\[\]{}"\(\)]))',
+ (r'([0-9a-f]+)(h)((\s)|(?=[\[\]{}"()]))',
bygroups(Number.Hex, Name.Variable, Whitespace)),
(r'"', String, 'string'),
(r'\{', String, 'string2'),
(r';\*+.*\n', Comment.Preproc),
(r';.*\n', Comment),
(r'%"', Name.Decorator, 'stringFile'),
- (r'%[^(\^{^")\s\[\]]+', Name.Decorator),
+ (r'%[^(^{")\s\[\]]+', Name.Decorator),
(r'[+-]?([a-z]{1,3})?\$\d+(\.\d+)?', Number.Float), # money
(r'[+-]?\d+\:\d+(\:\d+)?(\.\d+)?', String.Other), # time
- (r'\d+[\-\/][0-9a-z]+[\-\/]\d+(\/\d+\:\d+((\:\d+)?'
+ (r'\d+[\-/][0-9a-z]+[\-/]\d+(/\d+:\d+((:\d+)?'
r'([\.\d+]?([+-]?\d+:\d+)?)?)?)?', String.Other), # date
(r'\d+(\.\d+)+\.\d+', Keyword.Constant), # tuple
- (r'\d+[xX]\d+', Keyword.Constant), # pair
- (r'[+-]?\d+(\'\d+)?([\.,]\d*)?[eE][+-]?\d+', Number.Float),
- (r'[+-]?\d+(\'\d+)?[\.,]\d*', Number.Float),
+ (r'\d+X\d+', Keyword.Constant), # pair
+ (r'[+-]?\d+(\'\d+)?([.,]\d*)?E[+-]?\d+', Number.Float),
+ (r'[+-]?\d+(\'\d+)?[.,]\d*', Number.Float),
(r'[+-]?\d+(\'\d+)?', Number),
- (r'[\[\]\(\)]', Generic.Strong),
- (r'[a-z]+[^(\^{"\s:)]*://[^(\^{"\s)]*', Name.Decorator), # url
- (r'mailto:[^(\^{"@\s)]+@[^(\^{"@\s)]+', Name.Decorator), # url
- (r'[^(\^{"@\s)]+@[^(\^{"@\s)]+', Name.Decorator), # email
+ (r'[\[\]()]', Generic.Strong),
+ (r'[a-z]+[^(^{"\s:)]*://[^(^{"\s)]*', Name.Decorator), # url
+ (r'mailto:[^(^{"@\s)]+@[^(^{"@\s)]+', Name.Decorator), # url
+ (r'[^(^{"@\s)]+@[^(^{"@\s)]+', Name.Decorator), # email
(r'comment\s"', Comment, 'commentString1'),
(r'comment\s\{', Comment, 'commentString2'),
(r'comment\s\[', Comment, 'commentBlock'),
- (r'comment\s[^(\s{\"\[]+', Comment),
- (r'/[^(\^{^")\s/[\]]*', Name.Attribute),
- (r'([^(\^{^")\s/[\]]+)(?=[:({"\s/\[\]])', word_callback),
+ (r'comment\s[^(\s{"\[]+', Comment),
+ (r'/[^(^{^")\s/[\]]*', Name.Attribute),
+ (r'([^(^{^")\s/[\]]+)(?=[:({"\s/\[\]])', word_callback),
(r'<[\w:.-]*>', Name.Tag),
(r'<[^(<>\s")]+', Name.Tag, 'tag'),
- (r'([^(\^{^")\s]+)', Text),
+ (r'([^(^{")\s]+)', Text),
],
'string': [
- (r'[^(\^")]+', String),
+ (r'[^(^")]+', String),
(escape_re, String.Escape),
- (r'[\(|\)]+', String),
+ (r'[(|)]+', String),
(r'\^.', String.Escape),
(r'"', String, '#pop'),
],
'string2': [
- (r'[^(\^{^})]+', String),
+ (r'[^(^{})]+', String),
(escape_re, String.Escape),
- (r'[\(|\)]+', String),
+ (r'[(|)]+', String),
(r'\^.', String.Escape),
(r'\{', String, '#push'),
(r'\}', String, '#pop'),
],
'stringFile': [
- (r'[^(\^")]+', Name.Decorator),
+ (r'[^(^")]+', Name.Decorator),
(escape_re, Name.Decorator),
(r'\^.', Name.Decorator),
(r'"', Name.Decorator, '#pop'),
(r'>', Name.Tag, '#pop'),
],
'tagString': [
- (r'[^(\^")]+', Name.Tag),
+ (r'[^(^")]+', Name.Tag),
(escape_re, Name.Tag),
- (r'[\(|\)]+', Name.Tag),
+ (r'[(|)]+', Name.Tag),
(r'\^.', Name.Tag),
(r'"', Name.Tag, '#pop'),
],
],
'bin2': [
(r'\s+', Number.Hex),
- (r'([0-1]\s*){8}', Number.Hex),
+ (r'([01]\s*){8}', Number.Hex),
(r'\}', Number.Hex, '#pop'),
],
'commentString1': [
- (r'[^(\^")]+', Comment),
+ (r'[^(^")]+', Comment),
(escape_re, Comment),
- (r'[\(|\)]+', Comment),
+ (r'[(|)]+', Comment),
(r'\^.', Comment),
(r'"', Comment, '#pop'),
],
'commentString2': [
- (r'[^(\^{^})]+', Comment),
+ (r'[^(^{})]+', Comment),
(escape_re, Comment),
- (r'[\(|\)]+', Comment),
+ (r'[(|)]+', Comment),
(r'\^.', Comment),
(r'\{', Comment, '#push'),
(r'\}', Comment, '#pop'),
(r'\]', Comment, '#pop'),
(r'"', Comment, "commentString1"),
(r'\{', Comment, "commentString2"),
- (r'[^(\[\]\"{)]+', Comment),
+ (r'[^(\[\]"{)]+', Comment),
],
}
import re
from pygments.lexer import RegexLexer, bygroups, words
-from pygments.token import Comment, String, Number, Operator, Text, Keyword, \
- Name, String
+from pygments.token import Comment, String, Number, Operator, Text, \
+ Keyword, Name
__all__ = ['ResourceLexer']
class ResourceLexer(RegexLexer):
+ """Lexer for `ICU Resource bundles
+ <http://userguide.icu-project.org/locale/resources>`_.
+
+ .. versionadded:: 2.0
+ """
name = 'ResourceBundle'
aliases = ['resource', 'resourcebundle']
filenames = ['*.txt']
'[]', '[]=', '<<', '>>', '<', '<>', '<=>', '>', '>=', '==', '==='
)
+
class RubyLexer(ExtendedRegexLexer):
"""
For `Ruby <http://www.ruby-lang.org>`_ source code.
states = {}
states['strings'] = [
# easy ones
- (r'\:@{0,2}[a-zA-Z_]\w*[\!\?]?', String.Symbol),
+ (r'\:@{0,2}[a-zA-Z_]\w*[!?]?', String.Symbol),
(words(RUBY_OPERATORS, prefix=r'\:@{0,2}'), String.Symbol),
(r":'(\\\\|\\'|[^'])*'", String.Symbol),
(r"'(\\\\|\\'|[^'])*'", String.Single),
]
# braced quoted strings
- for lbrace, rbrace, name in ('\\{', '\\}', 'cb'), \
- ('\\[', '\\]', 'sb'), \
- ('\\(', '\\)', 'pa'), \
- ('<', '>', 'ab'):
+ for lbrace, rbrace, bracecc, name in \
+ ('\\{', '\\}', '{}', 'cb'), \
+ ('\\[', '\\]', '\\[\\]', 'sb'), \
+ ('\\(', '\\)', '()', 'pa'), \
+ ('<', '>', '<>', 'ab'):
states[name+'-intp-string'] = [
- (r'\\[\\' + lbrace + rbrace + ']', String.Other),
+ (r'\\[\\' + bracecc + ']', String.Other),
(lbrace, String.Other, '#push'),
(rbrace, String.Other, '#pop'),
include('string-intp-escaped'),
- (r'[\\#' + lbrace + rbrace + ']', String.Other),
- (r'[^\\#' + lbrace + rbrace + ']+', String.Other),
+ (r'[\\#' + bracecc + ']', String.Other),
+ (r'[^\\#' + bracecc + ']+', String.Other),
]
states['strings'].append((r'%[QWx]?' + lbrace, String.Other,
name+'-intp-string'))
states[name+'-string'] = [
- (r'\\[\\' + lbrace + rbrace + ']', String.Other),
+ (r'\\[\\' + bracecc + ']', String.Other),
(lbrace, String.Other, '#push'),
(rbrace, String.Other, '#pop'),
- (r'[\\#' + lbrace + rbrace + ']', String.Other),
- (r'[^\\#' + lbrace + rbrace + ']+', String.Other),
+ (r'[\\#' + bracecc + ']', String.Other),
+ (r'[^\\#' + bracecc + ']+', String.Other),
]
states['strings'].append((r'%[qsw]' + lbrace, String.Other,
name+'-string'))
states[name+'-regex'] = [
- (r'\\[\\' + lbrace + rbrace + ']', String.Regex),
+ (r'\\[\\' + bracecc + ']', String.Regex),
(lbrace, String.Regex, '#push'),
(rbrace + '[mixounse]*', String.Regex, '#pop'),
include('string-intp'),
- (r'[\\#' + lbrace + rbrace + ']', String.Regex),
- (r'[^\\#' + lbrace + rbrace + ']+', String.Regex),
+ (r'[\\#' + bracecc + ']', String.Regex),
+ (r'[^\\#' + bracecc + ']+', String.Regex),
]
states['strings'].append((r'%r' + lbrace, String.Regex,
name+'-regex'))
# these must come after %<brace>!
states['strings'] += [
# %r regex
- (r'(%r([^a-zA-Z0-9]))((?:\\\2|(?!\2).)*)(\2[mixounse]*)',
+ (r'(%r([\W_]))((?:\\\2|(?!\2).)*)(\2[mixounse]*)',
intp_regex_callback),
# regular fancy strings with qsw
- (r'%[qsw]([^a-zA-Z0-9])((?:\\\1|(?!\1).)*)\1', String.Other),
- (r'(%[QWx]([^a-zA-Z0-9]))((?:\\\2|(?!\2).)*)(\2)',
+ (r'%[qsw]([\W_])((?:\\\1|(?!\1).)*)\1', String.Other),
+ (r'(%[QWx]([\W_]))((?:\\\2|(?!\2).)*)(\2)',
intp_string_callback),
# special forms of fancy strings after operators or
# in method calls with braces
(r'@@[a-zA-Z_]\w*', Name.Variable.Class),
(r'@[a-zA-Z_]\w*', Name.Variable.Instance),
(r'\$\w+', Name.Variable.Global),
- (r'\$[!@&`\'+~=/\\,;.<>_*$?:"]', Name.Variable.Global),
+ (r'\$[!@&`\'+~=/\\,;.<>_*$?:"^-]', Name.Variable.Global),
(r'\$-[0adFiIlpvw]', Name.Variable.Global),
(r'::', Operator),
include('strings'),
# like keywords (class) or like this: ` ?!?
(words(RUBY_OPERATORS, prefix=r'(\.|::)'),
bygroups(Operator, Name.Operator)),
- (r'(\.|::)([a-zA-Z_]\w*[\!\?]?|[*%&^`~+\-/\[<>=])',
+ (r'(\.|::)([a-zA-Z_]\w*[!?]?|[*%&^`~+\-/\[<>=])',
bygroups(Operator, Name)),
- (r'[a-zA-Z_]\w*[\!\?]?', Name),
+ (r'[a-zA-Z_]\w*[!?]?', Name),
(r'(\[|\]|\*\*|<<?|>>?|>=|<=|<=>|=~|={3}|'
r'!~|&&?|\|\||\.{1,3})', Operator),
(r'[-+/*%=<>&!^|~]=?', Operator),
'funcname': [
(r'\(', Punctuation, 'defexpr'),
(r'(?:([a-zA-Z_]\w*)(\.))?'
- r'([a-zA-Z_]\w*[\!\?]?|\*\*?|[-+]@?|'
+ r'([a-zA-Z_]\w*[!?]?|\*\*?|[-+]@?|'
r'[/%&|^`~]|\[\]=?|<<|>>|<=?>|>=?|===?)',
bygroups(Name.Class, Operator, Name.Function), '#pop'),
default('#pop')
(r'\{(\\\\|\\\}|[^}])*\}[egimosx]*', String.Regex, '#pop'),
(r'<(\\\\|\\>|[^>])*>[egimosx]*', String.Regex, '#pop'),
(r'\[(\\\\|\\\]|[^\]])*\][egimosx]*', String.Regex, '#pop'),
- (r'\((\\\\|\\\)|[^\)])*\)[egimosx]*', String.Regex, '#pop'),
- (r'@(\\\\|\\\@|[^\@])*@[egimosx]*', String.Regex, '#pop'),
- (r'%(\\\\|\\\%|[^\%])*%[egimosx]*', String.Regex, '#pop'),
- (r'\$(\\\\|\\\$|[^\$])*\$[egimosx]*', String.Regex, '#pop'),
+ (r'\((\\\\|\\\)|[^)])*\)[egimosx]*', String.Regex, '#pop'),
+ (r'@(\\\\|\\@|[^@])*@[egimosx]*', String.Regex, '#pop'),
+ (r'%(\\\\|\\%|[^%])*%[egimosx]*', String.Regex, '#pop'),
+ (r'\$(\\\\|\\\$|[^$])*\$[egimosx]*', String.Regex, '#pop'),
],
'root': [
(r'\s+', Text),
(r's\{(\\\\|\\\}|[^}])*\}\s*', String.Regex, 'balanced-regex'),
(r's<(\\\\|\\>|[^>])*>\s*', String.Regex, 'balanced-regex'),
(r's\[(\\\\|\\\]|[^\]])*\]\s*', String.Regex, 'balanced-regex'),
- (r's\((\\\\|\\\)|[^\)])*\)\s*', String.Regex, 'balanced-regex'),
+ (r's\((\\\\|\\\)|[^)])*\)\s*', String.Regex, 'balanced-regex'),
(r'm?/(\\\\|\\/|[^/\n])*/[gcimosx]*', String.Regex),
- (r'm(?=[/!\\{<\[\(@%\$])', String.Regex, 'balanced-regex'),
+ (r'm(?=[/!\\{<\[(@%$])', String.Regex, 'balanced-regex'),
# Comments
(r'#(.*?)\n', Comment.Single),
# Symbols
- (r'\'([^\'\s\[\]\(\)\{\}]+|\[\])', String.Symbol),
+ (r'\'([^\'\s\[\](){}]+|\[\])', String.Symbol),
# Multi-line DoubleQuotedString
(r'"""(\\\\|\\"|[^"])*"""', String),
# DoubleQuotedString
r'case|->|=>)\b', Keyword),
# constants
(r'(self|super|nil|false|true)\b', Name.Constant),
- (r'[(){};,/?\|:\\]', Punctuation),
+ (r'[(){};,/?|:\\]', Punctuation),
# names
(words((
'Object', 'Array', 'Hash', 'Directory', 'File', 'Class', 'String',
# functions
(r'[a-zA-Z](\w|[-+?!=*/^><%])*:', Name.Function),
# operators, must be below functions
- (r'[-+*/~,<>=&!?%^\[\]\.$]+', Operator),
+ (r'[-+*/~,<>=&!?%^\[\].$]+', Operator),
('[A-Z]\w*', Name.Constant),
('@[a-zA-Z_]\w*', Name.Variable.Instance),
('@@[a-zA-Z_]\w*', Name.Variable.Class),
"""
from pygments.lexer import RegexLexer, include, bygroups, words, default
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
+from pygments.token import Comment, Operator, Keyword, Name, String, \
Number, Punctuation, Whitespace
__all__ = ['RustLexer']
(r'//(.*?)\n', Comment.Single),
(r'/\*', Comment.Multiline, 'comment'),
+ # Lifetime
+ (r"""'[a-zA-Z_]\w*""", Name.Label),
+ # Macro parameters
+ (r"""\$([a-zA-Z_]\w*|\(,?|\),?|,?)""", Comment.Preproc),
# Keywords
(words((
'as', 'box', 'break', 'continue', 'do', 'else', 'enum', 'extern',
(r"""'(\\['"\\nrt]|\\x[0-9a-fA-F]{2}|\\[0-7]{1,3}"""
r"""|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}|.)'""",
String.Char),
- # Lifetime
- (r"""'[a-zA-Z_]\w*""", Name.Label),
# Binary Literal
(r'0b[01_]+', Number.Bin, 'number_lit'),
# Octal Literal
'attribute(': [
include('attribute_common'),
(r'\);?', Comment.Preproc, '#pop'),
- (r'[^"\)]+', Comment.Preproc),
+ (r'[^")]+', Comment.Preproc),
],
}
(r'(?s)\[(=*)\[.*?\]\1\]', String),
(r'(==|~=|<=|>=|\.\.\.|\.\.|[=+\-*/%^<>#])', Operator),
- (r'[\[\]\{\}\(\)\.,:;]', Punctuation),
+ (r'[\[\]{}().,:;]', Punctuation),
(r'(and|or|not)\b', Operator.Word),
('(break|do|else|elseif|end|for|if|in|repeat|return|then|until|'
(r':[a-zA-Z_]\w*', Name.Variable),
(r'(==|!=|~=|<=|>=|\.\.\.|\.\.|[=+\-*/%^<>#!.\\:])', Operator),
(r'[;,]', Punctuation),
- (r'[\[\]\{\}\(\)]', Keyword.Type),
+ (r'[\[\]{}()]', Keyword.Type),
(r'[a-zA-Z_]\w*:', Name.Variable),
(words((
'class', 'extends', 'if', 'then', 'super', 'do', 'with',
filenames = ['*.chai']
mimetypes = ['text/x-chaiscript', 'application/x-chaiscript']
- flags = re.DOTALL
+ flags = re.DOTALL | re.MULTILINE
+
tokens = {
'commentsandwhitespace': [
(r'\s+', Text),
(r'\n', Text),
(r'[^\S\n]+', Text),
(r'\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|\.\.'
- r'(<<|>>>?|==?|!=?|[-<>+*%&\|\^/])=?', Operator, 'slashstartsregex'),
+ r'(<<|>>>?|==?|!=?|[-<>+*%&|^/])=?', Operator, 'slashstartsregex'),
(r'[{(\[;,]', Punctuation, 'slashstartsregex'),
(r'[})\].]', Punctuation),
(r'[=+\-*/]', Operator),
(r'\$', String.Double),
(r'\\\\', String.Double),
(r'\\"', String.Double),
- (r'[^\\\\\\"$]+', String.Double),
+ (r'[^\\"$]+', String.Double),
(r'"', String.Double, '#pop'),
],
}
lsl_events = r'\b(?:state_(?:entry|exit)|touch(?:_(?:start|end))?|(?:land_)?collision(?:_(?:start|end))?|timer|listen|(?:no_)?sensor|control|(?:not_)?at_(?:rot_)?target|money|email|run_time_permissions|changed|attach|dataserver|moving_(?:start|end)|link_message|(?:on|object)_rez|remote_data|http_re(?:sponse|quest)|path_update|transaction_result)\b'
lsl_functions_builtin = r'\b(?:ll(?:ReturnObjectsBy(?:ID|Owner)|Json(?:2List|[GS]etValue|ValueType)|Sin|Cos|Tan|Atan2|Sqrt|Pow|Abs|Fabs|Frand|Floor|Ceil|Round|Vec(?:Mag|Norm|Dist)|Rot(?:Between|2(?:Euler|Fwd|Left|Up))|(?:Euler|Axes)2Rot|Whisper|(?:Region|Owner)?Say|Shout|Listen(?:Control|Remove)?|Sensor(?:Repeat|Remove)?|Detected(?:Name|Key|Owner|Type|Pos|Vel|Grab|Rot|Group|LinkNumber)|Die|Ground|Wind|(?:[GS]et)(?:AnimationOverride|MemoryLimit|PrimMediaParams|ParcelMusicURL|Object(?:Desc|Name)|PhysicsMaterial|Status|Scale|Color|Alpha|Texture|Pos|Rot|Force|Torque)|ResetAnimationOverride|(?:Scale|Offset|Rotate)Texture|(?:Rot)?Target(?:Remove)?|(?:Stop)?MoveToTarget|Apply(?:Rotational)?Impulse|Set(?:KeyframedMotion|ContentType|RegionPos|(?:Angular)?Velocity|Buoyancy|HoverHeight|ForceAndTorque|TimerEvent|ScriptState|Damage|TextureAnim|Sound(?:Queueing|Radius)|Vehicle(?:Type|(?:Float|Vector|Rotation)Param)|(?:Touch|Sit)?Text|Camera(?:Eye|At)Offset|PrimitiveParams|ClickAction|Link(?:Alpha|Color|PrimitiveParams(?:Fast)?|Texture(?:Anim)?|Camera|Media)|RemoteScriptAccessPin|PayPrice|LocalRot)|ScaleByFactor|Get(?:(?:Max|Min)ScaleFactor|ClosestNavPoint|StaticPath|SimStats|Env|PrimitiveParams|Link(?:PrimitiveParams|Number(?:OfSides)?|Key|Name|Media)|HTTPHeader|FreeURLs|Object(?:Details|PermMask|PrimCount)|Parcel(?:MaxPrims|Details|Prim(?:Count|Owners))|Attached|(?:SPMax|Free|Used)Memory|Region(?:Name|TimeDilation|FPS|Corner|AgentCount)|Root(?:Position|Rotation)|UnixTime|(?:Parcel|Region)Flags|(?:Wall|GMT)clock|SimulatorHostname|BoundingBox|GeometricCenter|Creator|NumberOf(?:Prims|NotecardLines|Sides)|Animation(?:List)?|(?:Camera|Local)(?:Pos|Rot)|Vel|Accel|Omega|Time(?:stamp|OfDay)|(?:Object|CenterOf)?Mass|MassMKS|Energy|Owner|(?:Owner)?Key|SunDirection|Texture(?:Offset|Scale|Rot)|Inventory(?:Number|Name|Key|Type|Creator|PermMask)|Permissions(?:Key)?|StartParameter|List(?:Length|EntryType)|Date|Agent(?:Size|Info|Language|List)|LandOwnerAt|NotecardLine|Script(?:Name|State))|(?:Get|Reset|GetAndReset)Time|PlaySound(?:Slave)?|LoopSound(?:Master|Slave)?|(?:Trigger|Stop|Preload)Sound|(?:(?:Get|Delete)Sub|Insert)String|To(?:Upper|Lower)|Give(?:InventoryList|Money)|RezObject|(?:Stop)?LookAt|Sleep|CollisionFilter|(?:Take|Release)Controls|DetachFromAvatar|AttachToAvatar(?:Temp)?|InstantMessage|(?:GetNext)?Email|StopHover|MinEventDelay|RotLookAt|String(?:Length|Trim)|(?:Start|Stop)Animation|TargetOmega|RequestPermissions|(?:Create|Break)Link|BreakAllLinks|(?:Give|Remove)Inventory|Water|PassTouches|Request(?:Agent|Inventory)Data|TeleportAgent(?:Home|GlobalCoords)?|ModifyLand|CollisionSound|ResetScript|MessageLinked|PushObject|PassCollisions|AxisAngle2Rot|Rot2(?:Axis|Angle)|A(?:cos|sin)|AngleBetween|AllowInventoryDrop|SubStringIndex|List2(?:CSV|Integer|Json|Float|String|Key|Vector|Rot|List(?:Strided)?)|DeleteSubList|List(?:Statistics|Sort|Randomize|(?:Insert|Find|Replace)List)|EdgeOfWorld|AdjustSoundVolume|Key2Name|TriggerSoundLimited|EjectFromLand|(?:CSV|ParseString)2List|OverMyLand|SameGroup|UnSit|Ground(?:Slope|Normal|Contour)|GroundRepel|(?:Set|Remove)VehicleFlags|(?:AvatarOn)?(?:Link)?SitTarget|Script(?:Danger|Profiler)|Dialog|VolumeDetect|ResetOtherScript|RemoteLoadScriptPin|(?:Open|Close)RemoteDataChannel|SendRemoteData|RemoteDataReply|(?:Integer|String)ToBase64|XorBase64|Log(?:10)?|Base64To(?:String|Integer)|ParseStringKeepNulls|RezAtRoot|RequestSimulatorData|ForceMouselook|(?:Load|Release|(?:E|Une)scape)URL|ParcelMedia(?:CommandList|Query)|ModPow|MapDestination|(?:RemoveFrom|AddTo|Reset)Land(?:Pass|Ban)List|(?:Set|Clear)CameraParams|HTTP(?:Request|Response)|TextBox|DetectedTouch(?:UV|Face|Pos|(?:N|Bin)ormal|ST)|(?:MD5|SHA1|DumpList2)String|Request(?:Secure)?URL|Clear(?:Prim|Link)Media|(?:Link)?ParticleSystem|(?:Get|Request)(?:Username|DisplayName)|RegionSayTo|CastRay|GenerateKey|TransferLindenDollars|ManageEstateAccess|(?:Create|Delete)Character|ExecCharacterCmd|Evade|FleeFrom|NavigateTo|PatrolPoints|Pursue|UpdateCharacter|WanderWithin))\b'
lsl_constants_float = r'\b(?:DEG_TO_RAD|PI(?:_BY_TWO)?|RAD_TO_DEG|SQRT2|TWO_PI)\b'
- lsl_constants_integer = r'\b(?:JSON_APPEND|STATUS_(?:PHYSICS|ROTATE_[XYZ]|PHANTOM|SANDBOX|BLOCK_GRAB(?:_OBJECT)?|(?:DIE|RETURN)_AT_EDGE|CAST_SHADOWS|OK|MALFORMED_PARAMS|TYPE_MISMATCH|BOUNDS_ERROR|NOT_(?:FOUND|SUPPORTED)|INTERNAL_ERROR|WHITELIST_FAILED)|AGENT(?:_(?:BY_(?:LEGACY_|USER)NAME|FLYING|ATTACHMENTS|SCRIPTED|MOUSELOOK|SITTING|ON_OBJECT|AWAY|WALKING|IN_AIR|TYPING|CROUCHING|BUSY|ALWAYS_RUN|AUTOPILOT|LIST_(?:PARCEL(?:_OWNER)?|REGION)))?|CAMERA_(?:PITCH|DISTANCE|BEHINDNESS_(?:ANGLE|LAG)|(?:FOCUS|POSITION)(?:_(?:THRESHOLD|LOCKED|LAG))?|FOCUS_OFFSET|ACTIVE)|ANIM_ON|LOOP|REVERSE|PING_PONG|SMOOTH|ROTATE|SCALE|ALL_SIDES|LINK_(?:ROOT|SET|ALL_(?:OTHERS|CHILDREN)|THIS)|ACTIVE|PASSIVE|SCRIPTED|CONTROL_(?:FWD|BACK|(?:ROT_)?(?:LEFT|RIGHT)|UP|DOWN|(?:ML_)?LBUTTON)|PERMISSION_(?:RETURN_OBJECTS|DEBIT|OVERRIDE_ANIMATIONS|SILENT_ESTATE_MANAGEMENT|TAKE_CONTROLS|TRIGGER_ANIMATION|ATTACH|CHANGE_LINKS|(?:CONTROL|TRACK)_CAMERA|TELEPORT)|INVENTORY_(?:TEXTURE|SOUND|OBJECT|SCRIPT|LANDMARK|CLOTHING|NOTECARD|BODYPART|ANIMATION|GESTURE|ALL|NONE)|CHANGED_(?:INVENTORY|COLOR|SHAPE|SCALE|TEXTURE|LINK|ALLOWED_DROP|OWNER|REGION(?:_START)?|TELEPORT|MEDIA)|OBJECT_(?:(?:PHYSICS|SERVER|STREAMING)_COST|UNKNOWN_DETAIL|CHARACTER_TIME|PHANTOM|PHYSICS|TEMP_ON_REZ|NAME|DESC|POS|PRIM_EQUIVALENCE|RETURN_(?:PARCEL(?:_OWNER)?|REGION)|ROO?T|VELOCITY|OWNER|GROUP|CREATOR|ATTACHED_POINT|RENDER_WEIGHT|PATHFINDING_TYPE|(?:RUNNING|TOTAL)_SCRIPT_COUNT|SCRIPT_(?:MEMORY|TIME))|TYPE_(?:INTEGER|FLOAT|STRING|KEY|VECTOR|ROTATION|INVALID)|(?:DEBUG|PUBLIC)_CHANNEL|ATTACH_(?:AVATAR_CENTER|CHEST|HEAD|BACK|PELVIS|MOUTH|CHIN|NECK|NOSE|BELLY|[LR](?:SHOULDER|HAND|FOOT|EAR|EYE|[UL](?:ARM|LEG)|HIP)|(?:LEFT|RIGHT)_PEC|HUD_(?:CENTER_[12]|TOP_(?:RIGHT|CENTER|LEFT)|BOTTOM(?:_(?:RIGHT|LEFT))?))|LAND_(?:LEVEL|RAISE|LOWER|SMOOTH|NOISE|REVERT)|DATA_(?:ONLINE|NAME|BORN|SIM_(?:POS|STATUS|RATING)|PAYINFO)|PAYMENT_INFO_(?:ON_FILE|USED)|REMOTE_DATA_(?:CHANNEL|REQUEST|REPLY)|PSYS_(?:PART_(?:BF_(?:ZERO|ONE(?:_MINUS_(?:DEST_COLOR|SOURCE_(ALPHA|COLOR)))?|DEST_COLOR|SOURCE_(ALPHA|COLOR))|BLEND_FUNC_(DEST|SOURCE)|FLAGS|(?:START|END)_(?:COLOR|ALPHA|SCALE|GLOW)|MAX_AGE|(?:RIBBON|WIND|INTERP_(?:COLOR|SCALE)|BOUNCE|FOLLOW_(?:SRC|VELOCITY)|TARGET_(?:POS|LINEAR)|EMISSIVE)_MASK)|SRC_(?:MAX_AGE|PATTERN|ANGLE_(?:BEGIN|END)|BURST_(?:RATE|PART_COUNT|RADIUS|SPEED_(?:MIN|MAX))|ACCEL|TEXTURE|TARGET_KEY|OMEGA|PATTERN_(?:DROP|EXPLODE|ANGLE(?:_CONE(?:_EMPTY)?)?)))|VEHICLE_(?:REFERENCE_FRAME|TYPE_(?:NONE|SLED|CAR|BOAT|AIRPLANE|BALLOON)|(?:LINEAR|ANGULAR)_(?:FRICTION_TIMESCALE|MOTOR_DIRECTION)|LINEAR_MOTOR_OFFSET|HOVER_(?:HEIGHT|EFFICIENCY|TIMESCALE)|BUOYANCY|(?:LINEAR|ANGULAR)_(?:DEFLECTION_(?:EFFICIENCY|TIMESCALE)|MOTOR_(?:DECAY_)?TIMESCALE)|VERTICAL_ATTRACTION_(?:EFFICIENCY|TIMESCALE)|BANKING_(?:EFFICIENCY|MIX|TIMESCALE)|FLAG_(?:NO_DEFLECTION_UP|LIMIT_(?:ROLL_ONLY|MOTOR_UP)|HOVER_(?:(?:WATER|TERRAIN|UP)_ONLY|GLOBAL_HEIGHT)|MOUSELOOK_(?:STEER|BANK)|CAMERA_DECOUPLED))|PRIM_(?:TYPE(?:_(?:BOX|CYLINDER|PRISM|SPHERE|TORUS|TUBE|RING|SCULPT))?|HOLE_(?:DEFAULT|CIRCLE|SQUARE|TRIANGLE)|MATERIAL(?:_(?:STONE|METAL|GLASS|WOOD|FLESH|PLASTIC|RUBBER))?|SHINY_(?:NONE|LOW|MEDIUM|HIGH)|BUMP_(?:NONE|BRIGHT|DARK|WOOD|BARK|BRICKS|CHECKER|CONCRETE|TILE|STONE|DISKS|GRAVEL|BLOBS|SIDING|LARGETILE|STUCCO|SUCTION|WEAVE)|TEXGEN_(?:DEFAULT|PLANAR)|SCULPT_(?:TYPE_(?:SPHERE|TORUS|PLANE|CYLINDER|MASK)|FLAG_(?:MIRROR|INVERT))|PHYSICS(?:_(?:SHAPE_(?:CONVEX|NONE|PRIM|TYPE)))?|(?:POS|ROT)_LOCAL|SLICE|TEXT|FLEXIBLE|POINT_LIGHT|TEMP_ON_REZ|PHANTOM|POSITION|SIZE|ROTATION|TEXTURE|NAME|OMEGA|DESC|LINK_TARGET|COLOR|BUMP_SHINY|FULLBRIGHT|TEXGEN|GLOW|MEDIA_(?:ALT_IMAGE_ENABLE|CONTROLS|(?:CURRENT|HOME)_URL|AUTO_(?:LOOP|PLAY|SCALE|ZOOM)|FIRST_CLICK_INTERACT|(?:WIDTH|HEIGHT)_PIXELS|WHITELIST(?:_ENABLE)?|PERMS_(?:INTERACT|CONTROL)|PARAM_MAX|CONTROLS_(?:STANDARD|MINI)|PERM_(?:NONE|OWNER|GROUP|ANYONE)|MAX_(?:URL_LENGTH|WHITELIST_(?:SIZE|COUNT)|(?:WIDTH|HEIGHT)_PIXELS)))|MASK_(?:BASE|OWNER|GROUP|EVERYONE|NEXT)|PERM_(?:TRANSFER|MODIFY|COPY|MOVE|ALL)|PARCEL_(?:MEDIA_COMMAND_(?:STOP|PAUSE|PLAY|LOOP|TEXTURE|URL|TIME|AGENT|UNLOAD|AUTO_ALIGN|TYPE|SIZE|DESC|LOOP_SET)|FLAG_(?:ALLOW_(?:FLY|(?:GROUP_)?SCRIPTS|LANDMARK|TERRAFORM|DAMAGE|CREATE_(?:GROUP_)?OBJECTS)|USE_(?:ACCESS_(?:GROUP|LIST)|BAN_LIST|LAND_PASS_LIST)|LOCAL_SOUND_ONLY|RESTRICT_PUSHOBJECT|ALLOW_(?:GROUP|ALL)_OBJECT_ENTRY)|COUNT_(?:TOTAL|OWNER|GROUP|OTHER|SELECTED|TEMP)|DETAILS_(?:NAME|DESC|OWNER|GROUP|AREA|ID|SEE_AVATARS))|LIST_STAT_(?:MAX|MIN|MEAN|MEDIAN|STD_DEV|SUM(?:_SQUARES)?|NUM_COUNT|GEOMETRIC_MEAN|RANGE)|PAY_(?:HIDE|DEFAULT)|REGION_FLAG_(?:ALLOW_DAMAGE|FIXED_SUN|BLOCK_TERRAFORM|SANDBOX|DISABLE_(?:COLLISIONS|PHYSICS)|BLOCK_FLY|ALLOW_DIRECT_TELEPORT|RESTRICT_PUSHOBJECT)|HTTP_(?:METHOD|MIMETYPE|BODY_(?:MAXLENGTH|TRUNCATED)|CUSTOM_HEADER|PRAGMA_NO_CACHE|VERBOSE_THROTTLE|VERIFY_CERT)|STRING_(?:TRIM(?:_(?:HEAD|TAIL))?)|CLICK_ACTION_(?:NONE|TOUCH|SIT|BUY|PAY|OPEN(?:_MEDIA)?|PLAY|ZOOM)|TOUCH_INVALID_FACE|PROFILE_(?:NONE|SCRIPT_MEMORY)|RC_(?:DATA_FLAGS|DETECT_PHANTOM|GET_(?:LINK_NUM|NORMAL|ROOT_KEY)|MAX_HITS|REJECT_(?:TYPES|AGENTS|(?:NON)?PHYSICAL|LAND))|RCERR_(?:CAST_TIME_EXCEEDED|SIM_PERF_LOW|UNKNOWN)|ESTATE_ACCESS_(?:ALLOWED_(?:AGENT|GROUP)_(?:ADD|REMOVE)|BANNED_AGENT_(?:ADD|REMOVE))|DENSITY|FRICTION|RESTITUTION|GRAVITY_MULTIPLIER|KFM_(?:COMMAND|CMD_(?:PLAY|STOP|PAUSE|SET_MODE)|MODE|FORWARD|LOOP|PING_PONG|REVERSE|DATA|ROTATION|TRANSLATION)|ERR_(?:GENERIC|PARCEL_PERMISSIONS|MALFORMED_PARAMS|RUNTIME_PERMISSIONS|THROTTLED)|CHARACTER_(?:CMD_(?:(?:SMOOTH_)?STOP|JUMP)|DESIRED_(?:TURN_)?SPEED|RADIUS|STAY_WITHIN_PARCEL|LENGTH|ORIENTATION|ACCOUNT_FOR_SKIPPED_FRAMES|AVOIDANCE_MODE|TYPE(?:_(?:[ABCD]|NONE))?|MAX_(?:DECEL|TURN_RADIUS|(?:ACCEL|SPEED)))|PURSUIT_(?:OFFSET|FUZZ_FACTOR|GOAL_TOLERANCE|INTERCEPT)|REQUIRE_LINE_OF_SIGHT|FORCE_DIRECT_PATH|VERTICAL|HORIZONTAL|AVOID_(?:CHARACTERS|DYNAMIC_OBSTACLES|NONE)|PU_(?:EVADE_(?:HIDDEN|SPOTTED)|FAILURE_(?:DYNAMIC_PATHFINDING_DISABLED|INVALID_(?:GOAL|START)|NO_(?:NAVMESH|VALID_DESTINATION)|OTHER|TARGET_GONE|(?:PARCEL_)?UNREACHABLE)|(?:GOAL|SLOWDOWN_DISTANCE)_REACHED)|TRAVERSAL_TYPE(?:_(?:FAST|NONE|SLOW))?|CONTENT_TYPE_(?:ATOM|FORM|HTML|JSON|LLSD|RSS|TEXT|XHTML|XML)|GCNP_(?:RADIUS|STATIC)|(?:PATROL|WANDER)_PAUSE_AT_WAYPOINTS|OPT_(?:AVATAR|CHARACTER|EXCLUSION_VOLUME|LEGACY_LINKSET|MATERIAL_VOLUME|OTHER|STATIC_OBSTACLE|WALKABLE)|SIM_STAT_PCT_CHARS_STEPPED)\b'
+ lsl_constants_integer = r'\b(?:JSON_APPEND|STATUS_(?:PHYSICS|ROTATE_[XYZ]|PHANTOM|SANDBOX|BLOCK_GRAB(?:_OBJECT)?|(?:DIE|RETURN)_AT_EDGE|CAST_SHADOWS|OK|MALFORMED_PARAMS|TYPE_MISMATCH|BOUNDS_ERROR|NOT_(?:FOUND|SUPPORTED)|INTERNAL_ERROR|WHITELIST_FAILED)|AGENT(?:_(?:BY_(?:LEGACY_|USER)NAME|FLYING|ATTACHMENTS|SCRIPTED|MOUSELOOK|SITTING|ON_OBJECT|AWAY|WALKING|IN_AIR|TYPING|CROUCHING|BUSY|ALWAYS_RUN|AUTOPILOT|LIST_(?:PARCEL(?:_OWNER)?|REGION)))?|CAMERA_(?:PITCH|DISTANCE|BEHINDNESS_(?:ANGLE|LAG)|(?:FOCUS|POSITION)(?:_(?:THRESHOLD|LOCKED|LAG))?|FOCUS_OFFSET|ACTIVE)|ANIM_ON|LOOP|REVERSE|PING_PONG|SMOOTH|ROTATE|SCALE|ALL_SIDES|LINK_(?:ROOT|SET|ALL_(?:OTHERS|CHILDREN)|THIS)|ACTIVE|PASSIVE|SCRIPTED|CONTROL_(?:FWD|BACK|(?:ROT_)?(?:LEFT|RIGHT)|UP|DOWN|(?:ML_)?LBUTTON)|PERMISSION_(?:RETURN_OBJECTS|DEBIT|OVERRIDE_ANIMATIONS|SILENT_ESTATE_MANAGEMENT|TAKE_CONTROLS|TRIGGER_ANIMATION|ATTACH|CHANGE_LINKS|(?:CONTROL|TRACK)_CAMERA|TELEPORT)|INVENTORY_(?:TEXTURE|SOUND|OBJECT|SCRIPT|LANDMARK|CLOTHING|NOTECARD|BODYPART|ANIMATION|GESTURE|ALL|NONE)|CHANGED_(?:INVENTORY|COLOR|SHAPE|SCALE|TEXTURE|LINK|ALLOWED_DROP|OWNER|REGION(?:_START)?|TELEPORT|MEDIA)|OBJECT_(?:(?:PHYSICS|SERVER|STREAMING)_COST|UNKNOWN_DETAIL|CHARACTER_TIME|PHANTOM|PHYSICS|TEMP_ON_REZ|NAME|DESC|POS|PRIM_EQUIVALENCE|RETURN_(?:PARCEL(?:_OWNER)?|REGION)|ROO?T|VELOCITY|OWNER|GROUP|CREATOR|ATTACHED_POINT|RENDER_WEIGHT|PATHFINDING_TYPE|(?:RUNNING|TOTAL)_SCRIPT_COUNT|SCRIPT_(?:MEMORY|TIME))|TYPE_(?:INTEGER|FLOAT|STRING|KEY|VECTOR|ROTATION|INVALID)|(?:DEBUG|PUBLIC)_CHANNEL|ATTACH_(?:AVATAR_CENTER|CHEST|HEAD|BACK|PELVIS|MOUTH|CHIN|NECK|NOSE|BELLY|[LR](?:SHOULDER|HAND|FOOT|EAR|EYE|[UL](?:ARM|LEG)|HIP)|(?:LEFT|RIGHT)_PEC|HUD_(?:CENTER_[12]|TOP_(?:RIGHT|CENTER|LEFT)|BOTTOM(?:_(?:RIGHT|LEFT))?))|LAND_(?:LEVEL|RAISE|LOWER|SMOOTH|NOISE|REVERT)|DATA_(?:ONLINE|NAME|BORN|SIM_(?:POS|STATUS|RATING)|PAYINFO)|PAYMENT_INFO_(?:ON_FILE|USED)|REMOTE_DATA_(?:CHANNEL|REQUEST|REPLY)|PSYS_(?:PART_(?:BF_(?:ZERO|ONE(?:_MINUS_(?:DEST_COLOR|SOURCE_(ALPHA|COLOR)))?|DEST_COLOR|SOURCE_(ALPHA|COLOR))|BLEND_FUNC_(DEST|SOURCE)|FLAGS|(?:START|END)_(?:COLOR|ALPHA|SCALE|GLOW)|MAX_AGE|(?:RIBBON|WIND|INTERP_(?:COLOR|SCALE)|BOUNCE|FOLLOW_(?:SRC|VELOCITY)|TARGET_(?:POS|LINEAR)|EMISSIVE)_MASK)|SRC_(?:MAX_AGE|PATTERN|ANGLE_(?:BEGIN|END)|BURST_(?:RATE|PART_COUNT|RADIUS|SPEED_(?:MIN|MAX))|ACCEL|TEXTURE|TARGET_KEY|OMEGA|PATTERN_(?:DROP|EXPLODE|ANGLE(?:_CONE(?:_EMPTY)?)?)))|VEHICLE_(?:REFERENCE_FRAME|TYPE_(?:NONE|SLED|CAR|BOAT|AIRPLANE|BALLOON)|(?:LINEAR|ANGULAR)_(?:FRICTION_TIMESCALE|MOTOR_DIRECTION)|LINEAR_MOTOR_OFFSET|HOVER_(?:HEIGHT|EFFICIENCY|TIMESCALE)|BUOYANCY|(?:LINEAR|ANGULAR)_(?:DEFLECTION_(?:EFFICIENCY|TIMESCALE)|MOTOR_(?:DECAY_)?TIMESCALE)|VERTICAL_ATTRACTION_(?:EFFICIENCY|TIMESCALE)|BANKING_(?:EFFICIENCY|MIX|TIMESCALE)|FLAG_(?:NO_DEFLECTION_UP|LIMIT_(?:ROLL_ONLY|MOTOR_UP)|HOVER_(?:(?:WATER|TERRAIN|UP)_ONLY|GLOBAL_HEIGHT)|MOUSELOOK_(?:STEER|BANK)|CAMERA_DECOUPLED))|PRIM_(?:TYPE(?:_(?:BOX|CYLINDER|PRISM|SPHERE|TORUS|TUBE|RING|SCULPT))?|HOLE_(?:DEFAULT|CIRCLE|SQUARE|TRIANGLE)|MATERIAL(?:_(?:STONE|METAL|GLASS|WOOD|FLESH|PLASTIC|RUBBER))?|SHINY_(?:NONE|LOW|MEDIUM|HIGH)|BUMP_(?:NONE|BRIGHT|DARK|WOOD|BARK|BRICKS|CHECKER|CONCRETE|TILE|STONE|DISKS|GRAVEL|BLOBS|SIDING|LARGETILE|STUCCO|SUCTION|WEAVE)|TEXGEN_(?:DEFAULT|PLANAR)|SCULPT_(?:TYPE_(?:SPHERE|TORUS|PLANE|CYLINDER|MASK)|FLAG_(?:MIRROR|INVERT))|PHYSICS(?:_(?:SHAPE_(?:CONVEX|NONE|PRIM|TYPE)))?|(?:POS|ROT)_LOCAL|SLICE|TEXT|FLEXIBLE|POINT_LIGHT|TEMP_ON_REZ|PHANTOM|POSITION|SIZE|ROTATION|TEXTURE|NAME|OMEGA|DESC|LINK_TARGET|COLOR|BUMP_SHINY|FULLBRIGHT|TEXGEN|GLOW|MEDIA_(?:ALT_IMAGE_ENABLE|CONTROLS|(?:CURRENT|HOME)_URL|AUTO_(?:LOOP|PLAY|SCALE|ZOOM)|FIRST_CLICK_INTERACT|(?:WIDTH|HEIGHT)_PIXELS|WHITELIST(?:_ENABLE)?|PERMS_(?:INTERACT|CONTROL)|PARAM_MAX|CONTROLS_(?:STANDARD|MINI)|PERM_(?:NONE|OWNER|GROUP|ANYONE)|MAX_(?:URL_LENGTH|WHITELIST_(?:SIZE|COUNT)|(?:WIDTH|HEIGHT)_PIXELS)))|MASK_(?:BASE|OWNER|GROUP|EVERYONE|NEXT)|PERM_(?:TRANSFER|MODIFY|COPY|MOVE|ALL)|PARCEL_(?:MEDIA_COMMAND_(?:STOP|PAUSE|PLAY|LOOP|TEXTURE|URL|TIME|AGENT|UNLOAD|AUTO_ALIGN|TYPE|SIZE|DESC|LOOP_SET)|FLAG_(?:ALLOW_(?:FLY|(?:GROUP_)?SCRIPTS|LANDMARK|TERRAFORM|DAMAGE|CREATE_(?:GROUP_)?OBJECTS)|USE_(?:ACCESS_(?:GROUP|LIST)|BAN_LIST|LAND_PASS_LIST)|LOCAL_SOUND_ONLY|RESTRICT_PUSHOBJECT|ALLOW_(?:GROUP|ALL)_OBJECT_ENTRY)|COUNT_(?:TOTAL|OWNER|GROUP|OTHER|SELECTED|TEMP)|DETAILS_(?:NAME|DESC|OWNER|GROUP|AREA|ID|SEE_AVATARS))|LIST_STAT_(?:MAX|MIN|MEAN|MEDIAN|STD_DEV|SUM(?:_SQUARES)?|NUM_COUNT|GEOMETRIC_MEAN|RANGE)|PAY_(?:HIDE|DEFAULT)|REGION_FLAG_(?:ALLOW_DAMAGE|FIXED_SUN|BLOCK_TERRAFORM|SANDBOX|DISABLE_(?:COLLISIONS|PHYSICS)|BLOCK_FLY|ALLOW_DIRECT_TELEPORT|RESTRICT_PUSHOBJECT)|HTTP_(?:METHOD|MIMETYPE|BODY_(?:MAXLENGTH|TRUNCATED)|CUSTOM_HEADER|PRAGMA_NO_CACHE|VERBOSE_THROTTLE|VERIFY_CERT)|STRING_(?:TRIM(?:_(?:HEAD|TAIL))?)|CLICK_ACTION_(?:NONE|TOUCH|SIT|BUY|PAY|OPEN(?:_MEDIA)?|PLAY|ZOOM)|TOUCH_INVALID_FACE|PROFILE_(?:NONE|SCRIPT_MEMORY)|RC_(?:DATA_FLAGS|DETECT_PHANTOM|GET_(?:LINK_NUM|NORMAL|ROOT_KEY)|MAX_HITS|REJECT_(?:TYPES|AGENTS|(?:NON)?PHYSICAL|LAND))|RCERR_(?:CAST_TIME_EXCEEDED|SIM_PERF_LOW|UNKNOWN)|ESTATE_ACCESS_(?:ALLOWED_(?:AGENT|GROUP)_(?:ADD|REMOVE)|BANNED_AGENT_(?:ADD|REMOVE))|DENSITY|FRICTION|RESTITUTION|GRAVITY_MULTIPLIER|KFM_(?:COMMAND|CMD_(?:PLAY|STOP|PAUSE|SET_MODE)|MODE|FORWARD|LOOP|PING_PONG|REVERSE|DATA|ROTATION|TRANSLATION)|ERR_(?:GENERIC|PARCEL_PERMISSIONS|MALFORMED_PARAMS|RUNTIME_PERMISSIONS|THROTTLED)|CHARACTER_(?:CMD_(?:(?:SMOOTH_)?STOP|JUMP)|DESIRED_(?:TURN_)?SPEED|RADIUS|STAY_WITHIN_PARCEL|LENGTH|ORIENTATION|ACCOUNT_FOR_SKIPPED_FRAMES|AVOIDANCE_MODE|TYPE(?:_(?:[A-D]|NONE))?|MAX_(?:DECEL|TURN_RADIUS|(?:ACCEL|SPEED)))|PURSUIT_(?:OFFSET|FUZZ_FACTOR|GOAL_TOLERANCE|INTERCEPT)|REQUIRE_LINE_OF_SIGHT|FORCE_DIRECT_PATH|VERTICAL|HORIZONTAL|AVOID_(?:CHARACTERS|DYNAMIC_OBSTACLES|NONE)|PU_(?:EVADE_(?:HIDDEN|SPOTTED)|FAILURE_(?:DYNAMIC_PATHFINDING_DISABLED|INVALID_(?:GOAL|START)|NO_(?:NAVMESH|VALID_DESTINATION)|OTHER|TARGET_GONE|(?:PARCEL_)?UNREACHABLE)|(?:GOAL|SLOWDOWN_DISTANCE)_REACHED)|TRAVERSAL_TYPE(?:_(?:FAST|NONE|SLOW))?|CONTENT_TYPE_(?:ATOM|FORM|HTML|JSON|LLSD|RSS|TEXT|XHTML|XML)|GCNP_(?:RADIUS|STATIC)|(?:PATROL|WANDER)_PAUSE_AT_WAYPOINTS|OPT_(?:AVATAR|CHARACTER|EXCLUSION_VOLUME|LEGACY_LINKSET|MATERIAL_VOLUME|OTHER|STATIC_OBSTACLE|WALKABLE)|SIM_STAT_PCT_CHARS_STEPPED)\b'
lsl_constants_integer_boolean = r'\b(?:FALSE|TRUE)\b'
lsl_constants_rotation = r'\b(?:ZERO_ROTATION)\b'
lsl_constants_string = r'\b(?:EOF|JSON_(?:ARRAY|DELETE|FALSE|INVALID|NULL|NUMBER|OBJECT|STRING|TRUE)|NULL_KEY|TEXTURE_(?:BLANK|DEFAULT|MEDIA|PLYWOOD|TRANSPARENT)|URL_REQUEST_(?:GRANTED|DENIED))\b'
lsl_invalid_unimplemented = r'\b(?:CHARACTER_(?:MAX_ANGULAR_(?:ACCEL|SPEED)|TURN_SPEED_MULTIPLIER)|PERMISSION_(?:CHANGE_(?:JOINTS|PERMISSIONS)|RELEASE_OWNERSHIP|REMAP_CONTROLS)|PRIM_PHYSICS_MATERIAL|PSYS_SRC_OBJ_REL_MASK|ll(?:CollisionSprite|(?:Stop)?PointAt|(?:(?:Refresh|Set)Prim)URL|(?:Take|Release)Camera|RemoteLoadScript))\b'
lsl_reserved_godmode = r'\b(?:ll(?:GodLikeRezObject|Set(?:Inventory|Object)PermMask))\b'
lsl_reserved_log = r'\b(?:print)\b'
- lsl_operators = r'\+\+|\-\-|<<|>>|&&?|\|\|?|\^|~|[!%<>=*+\-\/]=?'
+ lsl_operators = r'\+\+|\-\-|<<|>>|&&?|\|\|?|\^|~|[!%<>=*+\-/]=?'
tokens = {
'root':
(r'\d+', Number.Integer),
(lsl_operators, Operator),
(r':=?', Error),
- (r'[,;{}\(\)\[\]]', Punctuation),
+ (r'[,;{}()\[\]]', Punctuation),
(r'\n+', Whitespace),
(r'\s+', Whitespace)
],
(r"'s\s+", Text), # This is a possessive, consider moving
(r'(--|#).*?$', Comment),
(r'\(\*', Comment.Multiline, 'comment'),
- (r'[\(\){}!,.:]', Punctuation),
+ (r'[(){}!,.:]', Punctuation),
(u'(«)([^»]+)(»)',
bygroups(Text, Name.Builtin, Text)),
(r'\b((?:considering|ignoring)\s*)'
# exceptions
(r'(E_PERM|E_DIV)', Name.Exception),
# db-refs
- (r'((#[-0-9]+)|(\$[a-z_A-Z0-9]+))', Name.Entity),
+ (r'((#[-0-9]+)|(\$\w+))', Name.Entity),
# Keywords
(r'\b(if|else|elseif|endif|for|endfor|fork|endfork|while'
r'|endwhile|break|continue|return|try'
(r'\s+', Text),
(r'\n', Text),
# other operators
- (r'([!;=,{}&\|:\.\[\]@\(\)\<\>\?]+)', Operator),
+ (r'([!;=,{}&|:.\[\]@()<>?]+)', Operator),
# function call
- (r'([a-z_A-Z0-9]+)(\()', bygroups(Name.Function, Operator)),
+ (r'(\w+)(\()', bygroups(Name.Function, Operator)),
# variables
- (r'([a-zA-Z_0-9]+)', Text),
+ (r'(\w+)', Text),
]
}
(r'[^\S\n]+', Text),
(r'//.*?\n', Comment.Single),
(r'/\*.*?\*/', Comment.Multiline),
- (r'@[a-zA-Z_][\w\.]*', Name.Decorator),
+ (r'@[a-zA-Z_][\w.]*', Name.Decorator),
(r'(break|case|catch|next|default|do|else|finally|for|foreach|of|'
r'unless|if|new|return|switch|me|throw|try|while)\b', Keyword),
(r'(extends|private|protected|public|static|throws|function|method|'
(r'(\.)([a-zA-Z_]\w*)',
bygroups(Operator, Name.Attribute)),
(r'[a-zA-Z_]\w*:', Name.Label),
- (r'[a-zA-Z_\$]\w*', Name),
- (r'[~\^\*!%&\[\]\(\)\{\}<>\|+=:;,./?\-@]+', Operator),
+ (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-f]+', Number.Hex),
(r'[0-9]+L?', Number.Integer),
(r'[#&.]', Comment.Multiline),
],
'string': [
- (r"`[0abfnrtv'\"\$`]", String.Escape),
+ (r"`[0abfnrtv'\"$`]", String.Escape),
(r'[^$`"]+', String.Double),
(r'\$\(', Punctuation, 'child'),
(r'""', String.Double),
# as do labels
'root': [
(r'\*.*\n', Comment),
- (r'[\+\.] ', Punctuation, 'statement'),
+ (r'[+.] ', Punctuation, 'statement'),
(r'-.*\n', Comment),
(r'END\s*\n', Name.Label, 'heredoc'),
- (r'[A-Za-z\$][\w$]*', Name.Label, 'statement'),
+ (r'[A-Za-z$][\w$]*', Name.Label, 'statement'),
(r'\s+', Text, 'statement'),
],
# statement state, line after continuation or label
r'LEN|SPAN|BREAK|ANY|NOTANY|TAB|RTAB|REM|POS|RPOS|FAIL|FENCE|'
r'ABORT|ARB|ARBNO|BAL|SUCCEED|INPUT|OUTPUT|TERMINAL)(?=[^\w.])',
Name.Builtin),
- (r'[A-Za-z][\w\.]*', Name),
+ (r'[A-Za-z][\w.]*', Name),
# ASCII equivalents of original operators
# | for the EBCDIC equivalent, ! likewise
# \ for EBCDIC negation
- (r'\*\*|[\?\$\.!%\*/#+\-@\|&\\=]', Operator),
+ (r'\*\*|[?$.!%*/#+\-@|&\\=]', Operator),
(r'"[^"]*"', String),
(r"'[^']*'", String),
# Accept SPITBOL syntax for real numbers
# as well as Macro SNOBOL4
- (r'[0-9]+(?=[^\.EeDd])', Number.Integer),
+ (r'[0-9]+(?=[^.EeDd])', Number.Integer),
(r'[0-9]+(\.[0-9]*)?([EDed][-+]?[0-9]+)?', Number.Float),
# Goto
(r':', Punctuation, 'goto'),
- (r'[\(\)<>,;]', Punctuation),
+ (r'[()<>,;]', Punctuation),
],
# Goto block
'goto': [
line_re = re.compile(b'.*?\n')
+
class RawTokenLexer(Lexer):
"""
Recreate a token stream formatted with the `RawTokenFormatter`. This
try:
ttypestr, val = match.group().split(b'\t', 1)
except ValueError:
- val = match.group().decode(self.encoding)
+ val = match.group().decode('ascii', 'replace')
ttype = Error
else:
ttype = _ttype_cache.get(ttypestr)
(r'[0-9]+', Number.Integer),
(r"(E|U&)?'(''|[^'])*'", String.Single),
(r'(U&)?"(""|[^"])*"', String.Name), # quoted identifier
- (r'(?s)(\$[^\$]*\$)(.*?)(\1)', language_callback),
+ (r'(?s)(\$[^$]*\$)(.*?)(\1)', language_callback),
(r'[a-z_]\w*', Name),
# psql variable in SQL
(r""":(['"]?)[a-z]\w*\b\1""", Name.Variable),
- (r'[;:()\[\]\{\},\.]', Punctuation),
+ (r'[;:()\[\]{},.]', Punctuation),
],
'multiline-comments': [
(r'/\*', Comment.Multiline, 'multiline-comments'),
(r'\*/', Comment.Multiline, '#pop'),
- (r'[^/\*]+', Comment.Multiline),
+ (r'[^/*]+', Comment.Multiline),
(r'[/*]', Comment.Multiline)
],
}
# TODO: Backslash escapes?
(r"'(''|[^'])*'", String.Single),
(r'"(""|[^"])*"', String.Symbol), # not a real string literal in ANSI SQL
- (r'[a-z_][\w\$]*', Name), # allow $s in strings for Oracle
- (r'[;:()\[\],\.]', Punctuation)
+ (r'[a-z_][\w$]*', Name), # allow $s in strings for Oracle
+ (r'[;:()\[\],.]', Punctuation)
],
'multiline-comments': [
(r'/\*', Comment.Multiline, 'multiline-comments'),
(r'\*/', Comment.Multiline, '#pop'),
- (r'[^/\*]+', Comment.Multiline),
+ (r'[^/*]+', Comment.Multiline),
(r'[/*]', Comment.Multiline)
]
}
bygroups(Name.Function, Text, Punctuation)),
(r'[a-z_]\w*', Name),
(r'@[a-z0-9]*[._]*[a-z0-9]*', Name.Variable),
- (r'[;:()\[\],\.]', Punctuation)
+ (r'[;:()\[\],.]', Punctuation)
],
'multiline-comments': [
(r'/\*', Comment.Multiline, 'multiline-comments'),
(r'\*/', Comment.Multiline, '#pop'),
- (r'[^/\*]+', Comment.Multiline),
+ (r'[^/*]+', Comment.Multiline),
(r'[/*]', Comment.Multiline)
]
}
(r'[A-Z_]\w*\??', Name),
(r"'(''|[^'])*'", String.Single),
(r'"(""|[^"])*"', String.Single),
- (r'[;:()\[\],\.]', Punctuation)
+ (r'[;:()\[\],.]', Punctuation)
],
}
return [
(keyword_cmds_re, Keyword, 'params' + context),
(builtin_cmds_re, Name.Builtin, 'params' + context),
- (r'([\w\.\-]+)', Name.Variable, 'params' + context),
+ (r'([\w.-]+)', Name.Variable, 'params' + context),
(r'#', Comment, 'comment'),
]
(r'0[0-7]+', Number.Oct),
(r'\d+\.\d+', Number.Float),
(r'\d+', Number.Integer),
- (r'\$([\w\.\-\:]+)', Name.Variable),
- (r'([\w\.\-\:]+)', Text),
+ (r'\$([\w.:-]+)', Name.Variable),
+ (r'([\w.:-]+)', Text),
],
'params': [
(r';', Keyword, '#pop'),
default('#pop')
],
'directiveparams': [
- (r'(&&|\|\||==?|!=?|[-<>+*%&\|\^/])|\b(eq|ne|gt|lt|ge|le|not|in)\b',
+ (r'(&&|\|\||==?|!=?|[-<>+*%&|^/])|\b(eq|ne|gt|lt|ge|le|not|in)\b',
Operator),
(r'\[', Operator, 'rangeoperator'),
(r'\b' + identifier + r'\b', Name.Function),
def analyse_text(text):
rv = VelocityLexer.analyse_text(text) - 0.01
if looks_like_xml(text):
- rv += 0.5
+ rv += 0.4
return rv
(r'(\s*)(##[^\n]*)(\n|\Z)',
bygroups(Text, Comment.Preproc, Other)),
(r'(?s)<%doc>.*?</%doc>', Comment.Preproc),
- (r'(<%)([\w\.\:]+)',
+ (r'(<%)([\w.:]+)',
bygroups(Comment.Preproc, Name.Builtin), 'tag'),
- (r'(</%)([\w\.\:]+)(>)',
+ (r'(</%)([\w.:]+)(>)',
bygroups(Comment.Preproc, Name.Builtin, Comment.Preproc)),
- (r'<%(?=([\w\.\:]+))', Comment.Preproc, 'ondeftags'),
+ (r'<%(?=([\w.:]+))', Comment.Preproc, 'ondeftags'),
(r'(<%(?:!?))(.*?)(%>)(?s)',
bygroups(Comment.Preproc, using(PythonLexer), Comment.Preproc)),
(r'(\$\{)(.*?)(\})',
(bygroups(Comment.Preproc, using(CheetahPythonLexer),
Comment.Preproc))),
# TODO support other Python syntax like $foo['bar']
- (r'(\$)([a-zA-Z_][\w\.]*\w)',
+ (r'(\$)([a-zA-Z_][\w.]*\w)',
bygroups(Comment.Preproc, using(CheetahPythonLexer))),
(r'(\$\{!?)(.*?)(\})(?s)',
bygroups(Comment.Preproc, using(CheetahPythonLexer),
tokens = {
'root': [
- (r'[^#\$\s]+', Other),
+ (r'[^#$\s]+', Other),
(r'^(\s*)(##.*)$', bygroups(Text, Comment)),
(r'^(\s*)(#)', bygroups(Text, Comment.Preproc), 'directive'),
include('variable'),
- (r'[#\$\s]', Other),
+ (r'[#$\s]', Other),
],
'directive': [
(r'\n', Text, '#pop'),
'variable': [
(r'(?<!\$)(\$\{)(.+?)(\})',
bygroups(Comment.Preproc, using(PythonLexer), Comment.Preproc)),
- (r'(?<!\$)(\$)([a-zA-Z_][\w\.]*)',
+ (r'(?<!\$)(\$)([a-zA-Z_][\w.]*)',
Name.Variable),
]
}
tokens = {
'root': [
- (r'[^<\$]+', Other),
+ (r'[^<$]+', Other),
(r'(<\?python)(.*?)(\?>)',
bygroups(Comment.Preproc, using(PythonLexer), Comment.Preproc)),
# yield style and script blocks as Other
(r'<\s*py:[a-zA-Z0-9]+', Name.Tag, 'pytag'),
(r'<\s*[a-zA-Z0-9:]+', Name.Tag, 'tag'),
include('variable'),
- (r'[<\$]', Other),
+ (r'[<$]', Other),
],
'pytag': [
(r'\s+', Text),
def analyse_text(text):
rv = LassoLexer.analyse_text(text) - 0.01
- if re.search(r'<\w+>', text, re.I):
- rv += 0.2
- if html_doctype_matches(text):
+ if html_doctype_matches(text): # same as HTML lexer
rv += 0.5
return rv
(r'\}\}', Comment.Preproc, '#pop'),
# Handlebars
- (r'([\#/]*)(each|if|unless|else|with|log|in)', bygroups(Keyword,
+ (r'([#/]*)(each|if|unless|else|with|log|in)', bygroups(Keyword,
Keyword)),
# General {{#block}}
- (r'([\#/])([\w-]+)', bygroups(Name.Function, Name.Function)),
+ (r'([#/])([\w-]+)', bygroups(Name.Function, Name.Function)),
# {{opt=something}}
(r'([\w-]+)(=)', bygroups(Name.Attribute, Operator)),
include('whitespace'),
(r'\}\}', Punctuation, ('#pop', '#pop')), # end of filters and output
- (r'([^\s\|:]+)(:?)(\s*)',
+ (r'([^\s|:]+)(:?)(\s*)',
bygroups(Name.Function, Punctuation, Whitespace), 'filter-markup')
],
Punctuation)),
(r'\b!', Operator),
(r'\bnot\b', Operator.Word),
- (r'([\w\.\'"]+)(\s+)(contains)(\s+)([\w\.\'"]+)',
+ (r'([\w.\'"]+)(\s+)(contains)(\s+)([\w.\'"]+)',
bygroups(using(this, state = 'generic'), Whitespace, Operator.Word,
Whitespace, using(this, state = 'generic'))),
(r'([^\s=:]+)(\s*)(=|:)',
bygroups(Name.Attribute, Whitespace, Operator)),
# explicit variables
- (r'(\{\{)(\s*)([^\s\}])(\s*)(\}\})',
+ (r'(\{\{)(\s*)([^\s}])(\s*)(\}\})',
bygroups(Punctuation, Whitespace, using(this, state = 'variable'),
Whitespace, Punctuation)),
],
'raw': [
- (r'[^\{]+', Text),
+ (r'[^{]+', Text),
(r'(\{%)(\s*)(endraw)(\s*)(%\})',
bygroups(Punctuation, Whitespace, Name.Tag, Whitespace,
Punctuation), '#pop'),
include('comments'),
(r"\\\|", Name.Variable),
(r"\s*\|", Keyword),
- (r"[^\|]", Name.Variable),
+ (r"[^|]", Name.Variable),
],
'scenario_sections_on_stack': [
(feature_element_keywords,
(r'^(?=\s|/)', Text, 'slashstartsregex'),
include('commentsandwhitespace'),
(r'\+\+|--|\|\||&&|in\b|\$|!?~|'
- r'(\*\*|[-<>+*%\^/!=])=?', Operator, 'slashstartsregex'),
+ r'(\*\*|[-<>+*%\^/!=|])=?', Operator, 'slashstartsregex'),
(r'[{(\[;,]', Punctuation, 'slashstartsregex'),
(r'[})\].]', Punctuation),
(r'(break|continue|do|while|exit|for|if|else|'
r'length|match|split|sprintf|sub|substr|tolower|toupper|close|'
r'fflush|getline|next|nextfile|print|printf|strftime|systime|'
r'delete|system)\b', Keyword.Reserved),
- (r'(ARGC|ARGIND|ARGV|CONVFMT|ENVIRON|ERRNO|FIELDWIDTHS|FILENAME|FNR|FS|'
- r'IGNORECASE|NF|NR|OFMT|OFS|ORFS|RLENGTH|RS|RSTART|RT|'
- r'SUBSEP)\b', Name.Builtin),
+ (r'(ARGC|ARGIND|ARGV|BEGIN|CONVFMT|ENVIRON|END|ERRNO|FIELDWIDTHS|'
+ r'FILENAME|FNR|FS|IGNORECASE|NF|NR|OFMT|OFS|ORFS|RLENGTH|RS|'
+ r'RSTART|RT|SUBSEP)\b', Name.Builtin),
(r'[$a-zA-Z_]\w*', Name.Other),
(r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
(r'0x[0-9a-fA-F]+', Number.Hex),
]
}
+ def analyse_text(text):
+ return text.startswith(('GET /', 'POST /', 'PUT /', 'DELETE /', 'HEAD /',
+ 'OPTIONS /', 'TRACE /', 'PATCH /'))
+
class TodotxtLexer(RegexLexer):
"""
'free_constructors', 'functor', 'nominal_function',
'nominal_termination', 'permanent_interpretation',
'binds', 'defining', 'smt2_status', 'term_cartouche',
- 'boogie_file', 'datatype_compat', 'text_cartouche',
+ 'boogie_file', 'text_cartouche',
)
keyword_theory_script = ('inductive_cases', 'inductive_simps')
(r'[(*)]', Comment),
],
'text': [
- (r'[^\*\}]+', Comment),
+ (r'[^*}]+', Comment),
(r'\*\}', Comment, '#pop'),
(r'\*', Comment),
(r'\}', Comment),
# ur"[\u203F-\u2040]")
ncnamechar = r"(?:" + ncnamestartchar + r"|-|\.|[0-9])"
ncname = "(?:%s+%s*)" % (ncnamestartchar, ncnamechar)
- pitarget_namestartchar = r"(?:[A-KN-WY-Z]|_|:|[a-kn-wy-z])"
+ pitarget_namestartchar = r"(?:[A-KN-WYZ]|_|:|[a-kn-wyz])"
pitarget_namechar = r"(?:" + pitarget_namestartchar + r"|-|\.|[0-9])"
pitarget = "%s+%s*" % (pitarget_namestartchar, pitarget_namechar)
prefixedname = "%s:%s" % (ncname, ncname)
# FIX UNICODE LATER
# elementcontentchar = (ur'\t|\r|\n|[\u0020-\u0025]|[\u0028-\u003b]|'
# ur'[\u003d-\u007a]|\u007c|[\u007e-\u007F]')
- elementcontentchar = r'[A-Za-z]|\s|\d|[!"#$%\(\)\*\+,\-\./\:;=\?\@\[\\\]^_\'`\|~]'
+ elementcontentchar = r'[A-Za-z]|\s|\d|[!"#$%()*+,\-./:;=?@\[\\\]^_\'`|~]'
# quotattrcontentchar = (ur'\t|\r|\n|[\u0020-\u0021]|[\u0023-\u0025]|'
# ur'[\u0027-\u003b]|[\u003d-\u007a]|\u007c|[\u007e-\u007F]')
- quotattrcontentchar = r'[A-Za-z]|\s|\d|[!#$%\(\)\*\+,\-\./\:;=\?\@\[\\\]^_\'`\|~]'
+ quotattrcontentchar = r'[A-Za-z]|\s|\d|[!#$%()*+,\-./:;=?@\[\\\]^_\'`|~]'
# aposattrcontentchar = (ur'\t|\r|\n|[\u0020-\u0025]|[\u0028-\u003b]|'
# ur'[\u003d-\u007a]|\u007c|[\u007e-\u007F]')
- aposattrcontentchar = r'[A-Za-z]|\s|\d|[!"#$%\(\)\*\+,\-\./\:;=\?\@\[\\\]^_`\|~]'
+ aposattrcontentchar = r'[A-Za-z]|\s|\d|[!"#$%()*+,\-./:;=?@\[\\\]^_`|~]'
# CHAR elements - fix the above elementcontentchar, quotattrcontentchar,
# aposattrcontentchar
# handle operator state
# order on numbers matters - handle most complex first
- (r'\d+(\.\d*)?[eE][\+\-]?\d+', Number.Float, 'operator'),
- (r'(\.\d+)[eE][\+\-]?\d+', Number.Float, 'operator'),
+ (r'\d+(\.\d*)?[eE][+-]?\d+', Number.Float, 'operator'),
+ (r'(\.\d+)[eE][+-]?\d+', Number.Float, 'operator'),
(r'(\.\d+|\d+\.\d*)', Number.Float, 'operator'),
(r'(\d+)', Number.Integer, 'operator'),
(r'(\.\.|\.|\))', Punctuation, 'operator'),
mimetypes = ['application/x-qml']
# pasted from JavascriptLexer, with some additions
- flags = re.DOTALL
+ flags = re.DOTALL | re.MULTILINE
+
tokens = {
'commentsandwhitespace': [
(r'\s+', Text),
(r'^(?=\s|/|<!--)', Text, 'slashstartsregex'),
include('commentsandwhitespace'),
(r'\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|'
- r'(<<|>>>?|==?|!=?|[-<>+*%&\|\^/])=?', Operator, 'slashstartsregex'),
+ r'(<<|>>>?|==?|!=?|[-<>+*%&|^/])=?', Operator, 'slashstartsregex'),
(r'[{(\[;,]', Punctuation, 'slashstartsregex'),
(r'[})\].]', Punctuation),
# QML insertions
- (r'\bid\s*:\s*[A-Za-z][_A-Za-z.0-9]*', Keyword.Declaration,
+ (r'\bid\s*:\s*[A-Za-z][\w.]*', Keyword.Declaration,
'slashstartsregex'),
- (r'\b[A-Za-z][_A-Za-z.0-9]*\s*:', Keyword, 'slashstartsregex'),
+ (r'\b[A-Za-z][\w.]*\s*:', Keyword, 'slashstartsregex'),
# the rest from JavascriptLexer
(r'(for|in|while|do|break|return|continue|switch|case|default|if|else|'
class CirruLexer(RegexLexer):
"""
Syntax rules of Cirru can be found at:
- http://grammar.cirru.org/
+ http://cirru.org/
* using ``()`` to markup blocks, but limited in the same line
* using ``""`` to markup strings, allow ``\`` to escape
name = 'Cirru'
aliases = ['cirru']
- filenames = ['*.cirru', '*.cr']
+ filenames = ['*.cirru']
mimetypes = ['text/x-cirru']
flags = re.MULTILINE
(r'.', String.Escape, '#pop'),
],
'function': [
- (r'[\w-][^\s\(\)\"]*', Name.Function, '#pop'),
+ (r'[^\s"()]+', Name.Function, '#pop'),
(r'\)', Operator, '#pop'),
(r'(?=\n)', Text, '#pop'),
(r'\(', Operator, '#push'),
(r'"', String, ('#pop', 'string')),
- (r'\s+', Text.Whitespace),
+ (r'[ ]+', Text.Whitespace),
(r'\,', Operator, '#pop'),
],
'line': [
- (r'^\B', Text.Whitespace, 'function'),
(r'\$', Operator, 'function'),
(r'\(', Operator, 'function'),
(r'\)', Operator),
- (r'(?=\n)', Text, '#pop'),
(r'\n', Text, '#pop'),
(r'"', String, 'string'),
- (r'\s+', Text.Whitespace),
- (r'[\d\.]+', Number),
- (r'[\w-][^\"\(\)\s]*', Name.Variable),
- (r'--', Comment.Single)
+ (r'[ ]+', Text.Whitespace),
+ (r'[+-]?[\d.]+\b', Number),
+ (r'[^\s"()]+', Name.Variable)
],
'root': [
- (r'^\s*', Text.Whitespace, ('line', 'function')),
- (r'^\s+$', Text.Whitespace),
+ (r'^\n+', Text.Whitespace),
+ default(('line', 'function')),
]
}
'html-attributes': [
(r'=', Punctuation),
- (r'"[^\"]+"', using(RubyLexer), 'tag'),
+ (r'"[^"]+"', using(RubyLexer), 'tag'),
(r'\'[^\']+\'', using(RubyLexer), 'tag'),
- (r'[\w]+', Text, 'tag'),
+ (r'\w+', Text, 'tag'),
],
'slim-comment-block': [
from pygments.formatters import FORMATTERS
out = []
- for cls, data in sorted(FORMATTERS.items(),
- key=lambda x: x[0].__name__):
- self.filenames.add(sys.modules[cls.__module__].__file__)
+ for classname, data in sorted(FORMATTERS.items(), key=lambda x: x[0]):
+ module = data[0]
+ mod = __import__(module, None, None, [classname])
+ self.filenames.add(mod.__file__)
+ cls = getattr(mod, classname)
docstring = cls.__doc__
if isinstance(docstring, bytes):
docstring = docstring.decode('utf8')
doctype_lookup_re = re.compile(r'''(?smx)
(<\?.*?\?>)?\s*
<!DOCTYPE\s+(
+ [a-zA-Z_][a-zA-Z0-9]*
+ (?: \s+ # optional in HTML5
[a-zA-Z_][a-zA-Z0-9]*\s+
- [a-zA-Z_][a-zA-Z0-9]*\s+
- "[^"]*")
+ "[^"]*")?
+ )
[^>]*>
''')
tag_re = re.compile(r'<(.+?)(\s.*?)?>.*?</.+?>(?uism)')
+xml_decl_re = re.compile(r'\s*<\?xml[^>]*\?>', re.I)
class ClassNotFound(ValueError):
if m is None:
return False
doctype = m.group(2)
- return re.compile(regex).match(doctype.strip()) is not None
+ return re.compile(regex, re.I).match(doctype.strip()) is not None
def html_doctype_matches(text):
"""Check if the file looks like it has a html doctype."""
- return doctype_matches(text, r'html\s+PUBLIC\s+"-//W3C//DTD X?HTML.*')
+ return doctype_matches(text, r'html')
_looks_like_xml_cache = {}
def looks_like_xml(text):
"""Check if a doctype exists or if we have some tags."""
+ if xml_decl_re.match(text):
+ return True
key = hash(text)
try:
return _looks_like_xml_cache[key]
return '\n'.join(lines)
+def duplicates_removed(it, already_seen=()):
+ """
+ Returns a list with duplicates removed from the iterable `it`.
+
+ Order is preserved.
+ """
+ lst = []
+ seen = set()
+ for i in it:
+ if i in seen or i in already_seen:
+ continue
+ lst.append(i)
+ seen.add(i)
+ return lst
+
+
class Future(object):
"""Generic class to defer some work.
sys.path.insert(0, srcpath)
-from pygments.lexer import RegexLexer, ProfilingRegexLexer, ProfilingRegexLexerMeta
+from pygments.lexer import RegexLexer, ExtendedRegexLexer, LexerContext, \
+ ProfilingRegexLexer, ProfilingRegexLexerMeta
from pygments.lexers import get_lexer_by_name, find_lexer_class, \
find_lexer_class_for_filename
from pygments.token import Error, Text, _TokenType
from pygments.cmdline import _parse_options
-class DebuggingRegexLexer(RegexLexer):
+class DebuggingRegexLexer(ExtendedRegexLexer):
"""Make the state stack, position and current match instance attributes."""
def get_tokens_unprocessed(self, text, stack=('root',)):
``stack`` is the inital stack (default: ``['root']``)
"""
- self.pos = 0
tokendefs = self._tokens
- self.statestack = list(stack)
- statetokens = tokendefs[self.statestack[-1]]
+ self.ctx = ctx = LexerContext(text, 0)
+ ctx.stack = list(stack)
+ statetokens = tokendefs[ctx.stack[-1]]
while 1:
for rexmatch, action, new_state in statetokens:
- self.m = m = rexmatch(text, self.pos)
+ self.m = m = rexmatch(text, ctx.pos, ctx.end)
if m:
if action is not None:
if type(action) is _TokenType:
- yield self.pos, action, m.group()
+ yield ctx.pos, action, m.group()
+ ctx.pos = m.end()
else:
- for item in action(self, m):
- yield item
- self.pos = m.end()
+ if not isinstance(self, ExtendedRegexLexer):
+ for item in action(self, m):
+ yield item
+ ctx.pos = m.end()
+ else:
+ for item in action(self, m, ctx):
+ yield item
+ if not new_state:
+ # altered the state stack?
+ statetokens = tokendefs[ctx.stack[-1]]
if new_state is not None:
# state transition
if isinstance(new_state, tuple):
for state in new_state:
if state == '#pop':
- self.statestack.pop()
+ ctx.stack.pop()
elif state == '#push':
- self.statestack.append(self.statestack[-1])
+ ctx.stack.append(ctx.stack[-1])
else:
- self.statestack.append(state)
+ ctx.stack.append(state)
elif isinstance(new_state, int):
# pop
- del self.statestack[new_state:]
+ del ctx.stack[new_state:]
elif new_state == '#push':
- self.statestack.append(self.statestack[-1])
+ ctx.stack.append(ctx.stack[-1])
else:
assert False, 'wrong state def: %r' % new_state
- statetokens = tokendefs[self.statestack[-1]]
+ statetokens = tokendefs[ctx.stack[-1]]
break
else:
try:
- if text[self.pos] == '\n':
+ if ctx.pos >= ctx.end:
+ break
+ if text[ctx.pos] == '\n':
# at EOL, reset state to 'root'
- self.pos += 1
- self.statestack = ['root']
+ ctx.stack = ['root']
statetokens = tokendefs['root']
- yield self.pos, Text, u'\n'
+ yield ctx.pos, Text, u'\n'
+ ctx.pos += 1
continue
- yield self.pos, Error, text[self.pos]
- self.pos += 1
+ yield ctx.pos, Error, text[ctx.pos]
+ ctx.pos += 1
except IndexError:
break
reprs = list(map(repr, tok))
print(' ' + reprs[1] + ' ' + ' ' * (29-len(reprs[1])) + reprs[0], end=' ')
if debug_lexer:
- print(' ' + ' ' * (29-len(reprs[0])) + repr(state), end=' ')
+ print(' ' + ' ' * (29-len(reprs[0])) + ' : '.join(state), end=' ')
print()
for type, val in lx.get_tokens(text):
print('Error token:')
l = len(repr(val))
print(' ' + repr(val), end=' ')
- if debug_lexer and hasattr(lx, 'statestack'):
- print(' ' * (60-l) + repr(lx.statestack), end=' ')
+ if debug_lexer and hasattr(lx, 'ctx'):
+ print(' ' * (60-l) + ' : '.join(lx.ctx.stack), end=' ')
print()
print()
return 1
tokens.append((type, val))
if debug_lexer:
- if hasattr(lx, 'statestack'):
- states.append(lx.statestack[:])
+ if hasattr(lx, 'ctx'):
+ states.append(lx.ctx.stack[:])
else:
states.append(None)
if showall:
+++ /dev/null
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-"""
- Codetags finder
- ~~~~~~~~~~~~~~~
-
- Find code tags in specified files and/or directories
- and create a report in HTML format.
-
- :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
-
-from __future__ import print_function
-
-import os
-import re
-import sys
-import getopt
-from os.path import join, abspath, isdir, isfile
-
-
-TAGS = set(('XXX', 'TODO', 'FIXME', 'HACK'))
-
-tag_re = re.compile(
- r'(?P<tag>\b' + r'\b|\b'.join(TAGS) + r'\b)\s*'
- r'(?: \( (?P<who> .*? ) \) )?'
- r'\s*:?\s* (?P<what> .*? ) \s* $',
- re.X)
-
-binary_re = re.compile('[\x00-\x06\x0E-\x1F]')
-
-
-def escape_html(text):
- return text.replace('&', '&'). \
- replace('<', '<'). \
- replace('>', '>'). \
- replace('"', '"')
-
-def process_file(store, filename):
- try:
- fp = open(filename, 'r')
- except (IOError, OSError):
- return False
- llmatch = 0
- with fp:
- for lno, line in enumerate(fp):
- # just some random heuristics to filter out binary files
- if lno < 100 and binary_re.search(line):
- return False
- m = tag_re.search(line)
- if m:
- store.setdefault(filename, []).append({
- 'lno': lno+1,
- 'tag': m.group('tag'),
- 'who': m.group('who') or '',
- 'what': escape_html(m.group('what')),
- })
- # 'what' cannot start at column 0
- llmatch = m.start('what')
- elif llmatch:
- # continuation lines
- # XXX: this is Python centric, doesn't work for
- # JavaScript, for example.
- if line[:llmatch].replace('#', '').isspace():
- cont = line[llmatch:].strip()
- if cont:
- store[filename][-1]['what'] += ' ' + escape_html(cont)
- continue
- llmatch = 0
- return True
-
-
-def main():
- try:
- gopts, args = getopt.getopt(sys.argv[1:], "vo:i:")
- except getopt.GetoptError:
- print(("Usage: %s [-v] [-i ignoredir]* [-o reportfile.html] "
- "path ..." % sys.argv[0]))
- return 2
- opts = {}
- for opt, val in gopts:
- if opt == '-i':
- val = abspath(val)
- opts.setdefault(opt, []).append(val)
-
- if not args:
- args = ['.']
-
- if '-o' in opts:
- output = abspath(opts['-o'][-1])
- else:
- output = abspath('tags.html')
-
- verbose = '-v' in opts
-
- store = {}
- gnum = 0
- num = 0
-
- for path in args:
- print("Searching for code tags in %s, please wait." % path)
-
- if isfile(path):
- gnum += 1
- if process_file(store, path):
- if verbose:
- print(path + ": found %d tags" % \
- (path in store and len(store[path]) or 0))
- num += 1
- else:
- if verbose:
- print(path + ": binary or not readable")
- continue
- elif not isdir(path):
- continue
-
- for root, dirs, files in os.walk(path):
- if '-i' in opts and abspath(root) in opts['-i']:
- del dirs[:]
- continue
- if '.hg' in dirs:
- dirs.remove('.hg')
- if 'examplefiles' in dirs:
- dirs.remove('examplefiles')
- if 'dist' in dirs:
- dirs.remove('dist')
- for fn in files:
- gnum += 1
- if gnum % 25 == 0 and not verbose:
- sys.stdout.write('.')
- sys.stdout.flush()
-
- fn = join(root, fn)
-
- if fn.endswith('.pyc') or fn.endswith('.pyo'):
- continue
- elif '-i' in opts and abspath(fn) in opts['-i']:
- continue
- elif abspath(fn) == output:
- continue
-
- if fn[:2] == './': fn = fn[2:]
- if process_file(store, fn):
- if verbose:
- print(fn + ": found %d tags" % \
- (fn in store and len(store[fn]) or 0))
- num += 1
- else:
- if verbose:
- print(fn + ": binary or not readable")
- print()
-
- print("Processed %d of %d files. Found %d tags in %d files." % (
- num, gnum, sum(len(fitem) for fitem in store.values()), len(store)))
-
- if not store:
- return 0
-
- HTML = '''\
-<html>
-<head>
-<title>Code tags report</title>
-<style type="text/css">
-body { font-family: Trebuchet MS,Verdana,sans-serif;
- width: 80%%; margin-left: auto; margin-right: auto; }
-table { width: 100%%; border-spacing: 0;
- border: 1px solid #CCC; }
-th { font-weight: bold; background-color: #DDD }
-td { padding: 2px 5px 2px 5px;
- vertical-align: top; }
-.tr0 { background-color: #EEEEEE; }
-.tr1 { background-color: #F6F6F6; }
-.tag { text-align: center; font-weight: bold; }
-.tr0 .tag { background-color: #FFEEEE; }
-.tr1 .tag { background-color: #FFDDDD; }
-.head { padding-top: 10px; font-size: 100%%; font-weight: bold }
-.XXX { color: #500; }
-.FIXME { color: red; }
-.TODO { color: #880; }
-</style>
-</head>
-<body>
-<h1>Code tags report for %s</h1>
-<table>
-<tr><th>Line</th><th>Tag</th><th>Who</th><th>Description</th></tr>
-%s
-</table>
-</body>
-</html>
-'''
-
- TABLE = '\n<tr><td class="head" colspan="4">File: %s</td>\n'
-
- TR = ('<tr class="tr%d"><td class="lno">%%(lno)d</td>'
- '<td class="tag %%(tag)s">%%(tag)s</td>'
- '<td class="who">%%(who)s</td><td class="what">%%(what)s</td></tr>')
-
- table = '\n'.join(TABLE % fname +
- '\n'.join(TR % (no % 2,) % entry
- for no, entry in enumerate(store[fname]))
- for fname in sorted(store))
-
- with open(output, 'w') as fp:
- fp.write(HTML % (', '.join(map(abspath, args)), table))
-
- print("Report written to %s." % output)
- return 0
-
-if __name__ == '__main__':
- sys.exit(main())
setup(
name = 'Pygments',
- version = '2.0rc1',
+ version = '2.0',
url = 'http://pygments.org/',
license = 'BSD License',
author = 'Georg Brandl',
class áPreUnicode$Class
{
- public int $foo;
+ public int $foo;
public int á$foo;
_PostUnico$deClassá áPreUnicodeFunction() { return null; }
}
--- https://github.com/Cirru/cirru-gopher/blob/master/code/scope.cr
+-- demo
-set a (int 2)
+define a (read cd) $ if (> a cd)
+ print demo
+ print "not demo"
-print (self)
+say $ print a $ save $ b $ x $ c 8
-set c (child)
+print fun
-under c
- under parent
- print a
+-- test on folding
-print $ get c a
+a $
-set c x (int 3)
-print $ get c x
+b $ c
-set just-print $ code
- print a
+d $ e $ f
-print just-print
+g $ h $ i j $ k $
-eval (self) just-print
-eval just-print
+-- test on comma
-print (string "string with space")
-print (string "escapes \n \"\\")
+print (, a)
+ a
+ , b
+ , c (, d)
-brackets ((((()))))
+-- test on HTML
-"eval" $ string "eval"
+doctype
-print (add $ (int 1) (int 2))
+html
+ head
+ title $ = Cirru
+ script (:defer) $ :src build/build.js
+ link (:rel stylesheet) $ :href css/page.css
+ link (:rel icon)
+ :href http://logo.cirru.org/cirru-32x32.png?v=3
+ body
+ textarea.demo.source $ :placeholder "Source Code"
+ textarea.demo.target $ :placeholder "Compiled Data"
+ @insert ../html/ga.html
-print $ unwrap $
- map (a $ int 1) (b $ int 2)
+-- test on indentation
-print a
- int 1
- , b c
- int 2
- , d
\ No newline at end of file
+a $ b $ c
+
+e f
+ (g)
+ h
+
+-- test on parentheses
+
+3 4 (1) 4
+
+((((1))))
+
+x
+
+-- test on quotes
+
+a b c d
+
+"a b c d"
+
+"a b \" c d"
+
+"a b" "c d"
+
+-- test on unfolding
+
+set
+ add 1 $
+ , x y
+ add 5 $
+ add 2
+
+-- test on HTML attributes
+
+div
+ div
+ :class a
+ div
+ :class a b c d
+
+ div
+ :class a (@ b) (@ c) d
+
+ div
+ :class a
+ @if (@ b)
+ div b
+ div c
+ div
+ :class a
+ @if (@ b) b c
+
+-- test on helpers
+
+@if (@call a b) (div) (span)
+
+@each members
+ div (@ name)
+
+@each a
+ div (@ b)
+ @each c
+ div (@ d)
+
+-- test on HTML structure
+
+@rich more
+ #demo-more-box
+ #demo-more
+ :data-lang-text demo-more
+ #demo-more-list
+ @each room
+ .demo-more-room
+ span.demo-name
+ @ topic
+ span.demo-join
+ :data-lang-text demo-join
+ :data-id (@ id)
+
+-- text on bool
+
+print #true
+print #false
+print #yes
+print #no
+print #t
+print #f
+
+-- test on Cirru js
+
+set a 1
+set a (= "This is a string")
+set b #t
+
+-- this is comment
+
+number 1.4
+string x
+regex ^\s$
+regex "^\\s-\"$"
+sentence this is a string
+
+array 1 2 3 (= nothing) #t (= #t)
+
+set c (array 1 (= nothing))
+
+set d $ object (a (= google))
+ b (= reader)
+ c 1
+ d $ array 1 2 (= string)
+
+1 c
+-1 c
+
+:b d
+.log console a 2
+.log console
+
+set demo $ object
+ call $ \ x (.log console x) (. this call)
+. demo (.call 1) (.call 4)
+
+=.x d 3
+
+set d null
+
+new Array 1 2 3
+
+set x (:length c)
+set str (= str)
+set c (.toUpperCase str)
+
+\ x (+ x 1)
+\ (x y) (+ x y)
+\ x (set aa 1) (+ aa x)
+
+set f (\ x (+ x 1))
+
++ a 1 2
++= a 1
+
+> 1 2 3
+
+if (> 2 1) (+ a 1)
+else 2
+
+if (> a 2)
+ .log console (= "large")
+elseif (> a 1)
+ .log console (= "still good")
+else
+ .log console (= "so so")
+
+set a $ if (> 2 1) #t #f
+
+switch a
+ 1 (.log console 1)
+ 2 (.log console 2)
+ else (.log console (= "something else"))
+
+set a $ array 2 +3 -4
+for (a x i) (.log console x i)
+
+set a 0
+while (< a 10) (+= a 1) (.log console a)
var เมือง;
var a\u1234b;
+var nbsp;
--- /dev/null
+# -*- coding: utf-8 -*-
+"""
+ Tests for inheritance in RegexLexer
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+import unittest
+
+from pygments.lexer import RegexLexer, inherit
+from pygments.token import Text
+
+
+class InheritTest(unittest.TestCase):
+ def test_single_inheritance_position(self):
+ t = Two()
+ pats = [x[0].__self__.pattern for x in t._tokens['root']]
+ self.assertEqual(['x', 'a', 'b', 'y'], pats)
+ def test_multi_inheritance_beginning(self):
+ t = Beginning()
+ pats = [x[0].__self__.pattern for x in t._tokens['root']]
+ self.assertEqual(['x', 'a', 'b', 'y', 'm'], pats)
+ def test_multi_inheritance_end(self):
+ t = End()
+ pats = [x[0].__self__.pattern for x in t._tokens['root']]
+ self.assertEqual(['m', 'x', 'a', 'b', 'y'], pats)
+
+ def test_multi_inheritance_position(self):
+ t = Three()
+ pats = [x[0].__self__.pattern for x in t._tokens['root']]
+ self.assertEqual(['i', 'x', 'a', 'b', 'y', 'j'], pats)
+
+ def test_single_inheritance_with_skip(self):
+ t = Skipped()
+ pats = [x[0].__self__.pattern for x in t._tokens['root']]
+ self.assertEqual(['x', 'a', 'b', 'y'], pats)
+
+
+class One(RegexLexer):
+ tokens = {
+ 'root': [
+ ('a', Text),
+ ('b', Text),
+ ],
+ }
+
+class Two(One):
+ tokens = {
+ 'root': [
+ ('x', Text),
+ inherit,
+ ('y', Text),
+ ],
+ }
+
+class Three(Two):
+ tokens = {
+ 'root': [
+ ('i', Text),
+ inherit,
+ ('j', Text),
+ ],
+ }
+
+class Beginning(Two):
+ tokens = {
+ 'root': [
+ inherit,
+ ('m', Text),
+ ],
+ }
+
+class End(Two):
+ tokens = {
+ 'root': [
+ ('m', Text),
+ inherit,
+ ],
+ }
+
+class Empty(One):
+ tokens = {}
+
+class Skipped(Empty):
+ tokens = {
+ 'root': [
+ ('x', Text),
+ inherit,
+ ('y', Text),
+ ],
+ }
+
self.assertFalse(rex.match('a'))
self.assertTrue(rex.match('a::'))
self.assertFalse(rex.match(':::')) # fullmatch
+
+ def test_suffix_opt(self):
+ # test that detected suffixes remain sorted.
+ opt = regex_opt(('afoo', 'abfoo'))
+ print(opt)
+ rex = re.compile(opt)
+ m = rex.match('abfoo')
+ self.assertEqual(5, m.end())
exec(output, d)
self.assertTrue(isinstance(d['var'], tuple))
self.assertEqual(('cat', 'dog'), d['var'])
+
+ def test_duplicates_removed_seq_types(self):
+ # tuple
+ x = util.duplicates_removed(('a', 'a', 'b'))
+ self.assertEqual(['a', 'b'], x)
+ # list
+ x = util.duplicates_removed(['a', 'a', 'b'])
+ self.assertEqual(['a', 'b'], x)
+ # iterator
+ x = util.duplicates_removed(iter(('a', 'a', 'b')))
+ self.assertEqual(['a', 'b'], x)
+
+ def test_duplicates_removed_nonconsecutive(self):
+ # keeps first
+ x = util.duplicates_removed(('a', 'b', 'a'))
+ self.assertEqual(['a', 'b'], x)