<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Available lexers — Pygments</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <style type="text/css"> body { background-color: #f2f2f2; margin: 0; padding: 0; font-family: 'Georgia', serif; color: #111; } #content { background-color: white; padding: 20px; margin: 20px auto 20px auto; max-width: 800px; border: 4px solid #ddd; } h1 { font-weight: normal; font-size: 40px; color: #09839A; } h2 { font-weight: normal; font-size: 30px; color: #C73F00; } h1.heading { margin: 0 0 30px 0; } h2.subheading { margin: -30px 0 0 45px; } h3 { margin-top: 30px; } table.docutils { border-collapse: collapse; border: 2px solid #aaa; margin: 0.5em 1.5em 0.5em 1.5em; } table.docutils td { padding: 2px; border: 1px solid #ddd; } p, li, dd, dt, blockquote { font-size: 15px; color: #333; } p { line-height: 150%; margin-bottom: 0; margin-top: 10px; } hr { border-top: 1px solid #ccc; border-bottom: 0; border-right: 0; border-left: 0; margin-bottom: 10px; margin-top: 20px; } dl { margin-left: 10px; } li, dt { margin-top: 5px; } dt { font-weight: bold; } th { text-align: left; } a { color: #990000; } a:hover { color: #c73f00; } pre { background-color: #f9f9f9; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; padding: 5px; font-size: 13px; font-family: Bitstream Vera Sans Mono,monospace; } tt { font-size: 13px; font-family: Bitstream Vera Sans Mono,monospace; color: black; padding: 1px 2px 1px 2px; background-color: #f0f0f0; } cite { /* abusing <cite>, it's generated by ReST for `x` */ font-size: 13px; font-family: Bitstream Vera Sans Mono,monospace; font-weight: bold; font-style: normal; } #backlink { float: right; font-size: 11px; color: #888; } div.toc { margin: 0 0 10px 0; } div.toc h2 { font-size: 20px; } .syntax .hll { background-color: #ffffcc } .syntax { background: #ffffff; } .syntax .c { color: #888888 } /* Comment */ .syntax .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .syntax .k { color: #008800; font-weight: bold } /* Keyword */ .syntax .cm { color: #888888 } /* Comment.Multiline */ .syntax .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .syntax .c1 { color: #888888 } /* Comment.Single */ .syntax .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .syntax .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .syntax .ge { font-style: italic } /* Generic.Emph */ .syntax .gr { color: #aa0000 } /* Generic.Error */ .syntax .gh { color: #303030 } /* Generic.Heading */ .syntax .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .syntax .go { color: #888888 } /* Generic.Output */ .syntax .gp { color: #555555 } /* Generic.Prompt */ .syntax .gs { font-weight: bold } /* Generic.Strong */ .syntax .gu { color: #606060 } /* Generic.Subheading */ .syntax .gt { color: #aa0000 } /* Generic.Traceback */ .syntax .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .syntax .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .syntax .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .syntax .kp { color: #008800 } /* Keyword.Pseudo */ .syntax .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .syntax .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .syntax .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .syntax .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .syntax .na { color: #336699 } /* Name.Attribute */ .syntax .nb { color: #003388 } /* Name.Builtin */ .syntax .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .syntax .no { color: #003366; font-weight: bold } /* Name.Constant */ .syntax .nd { color: #555555 } /* Name.Decorator */ .syntax .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .syntax .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .syntax .nl { color: #336699; font-style: italic } /* Name.Label */ .syntax .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .syntax .py { color: #336699; font-weight: bold } /* Name.Property */ .syntax .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .syntax .nv { color: #336699 } /* Name.Variable */ .syntax .ow { color: #008800 } /* Operator.Word */ .syntax .w { color: #bbbbbb } /* Text.Whitespace */ .syntax .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .syntax .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .syntax .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .syntax .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .syntax .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .syntax .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .syntax .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .syntax .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .syntax .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .syntax .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .syntax .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .syntax .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .syntax .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .syntax .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .syntax .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .syntax .bp { color: #003388 } /* Name.Builtin.Pseudo */ .syntax .vc { color: #336699 } /* Name.Variable.Class */ .syntax .vg { color: #dd7700 } /* Name.Variable.Global */ .syntax .vi { color: #3333bb } /* Name.Variable.Instance */ .syntax .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ </style> </head> <body> <div id="content"> <h1 class="heading">Pygments</h1> <h2 class="subheading">Available lexers</h2> <a id="backlink" href="index.html">« Back To Index</a> <div class="toc"> <h2>Contents</h2> <ul class="contents"> <li><a href="#lexers-for-agile-languages">Lexers for agile languages</a></li> <li><a href="#lexers-for-assembly-languages">Lexers for assembly languages</a></li> <li><a href="#lexers-for-compiled-languages">Lexers for compiled languages</a></li> <li><a href="#lexers-for-net-languages">Lexers for .net languages</a></li> <li><a href="#lexers-for-functional-languages">Lexers for functional languages</a></li> <li><a href="#lexers-for-math-languages">Lexers for math languages</a></li> <li><a href="#lexers-for-other-languages">Lexers for other languages</a></li> <li><a href="#lexers-for-parser-generators">Lexers for parser generators</a></li> <li><a href="#special-lexers">Special lexers</a></li> <li><a href="#lexers-for-various-template-engines-markup">Lexers for various template engines' markup</a></li> <li><a href="#lexers-for-non-source-code-file-types">Lexers for non-source code file types</a></li> <li><a href="#lexers-for-web-related-languages-and-markup">Lexers for web-related languages and markup</a></li> <li><a href="#iterating-over-all-lexers">Iterating over all lexers</a></li> </ul> </div> <!-- -*- mode: rst -*- --> <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: <tt class="docutils literal">True</tt>)</dd> <dt><cite>stripall</cite></dt> <dd>Strip all leading and trailing whitespace from the input (default: <tt class="docutils literal">False</tt>).</dd> <dt><cite>tabsize</cite></dt> <dd>If given and greater than 0, expand tabs in the input (default: <tt class="docutils literal">0</tt>).</dd> <dt><cite>encoding</cite></dt> <dd><p class="first"><em>New in Pygments 0.6.</em></p> <p>If given, must be an encoding name (such as <tt class="docutils literal"><span class="pre">"utf-8"</span></tt>). This encoding will be used to convert the input string to Unicode (if it is not already a Unicode string). The default is <tt class="docutils literal">"latin1"</tt>.</p> <p class="last">If this option is set to <tt class="docutils literal">"guess"</tt>, a simple UTF-8 vs. Latin-1 detection is used, if it is set to <tt class="docutils literal">"chardet"</tt>, the <a class="reference external" href="http://chardet.feedparser.org/">chardet library</a> is used to guess the encoding of the input.</p> </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> <div class="section" id="lexers-for-agile-languages"> <h3>Lexers for agile languages</h3> <p><cite>ClojureLexer</cite></p> <blockquote> <p>Lexer for <a class="reference external" href="http://clojure.org/">Clojure</a> source code.</p> <p><em>New in Pygments 0.11.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">clojure, clj</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.clj</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-clojure, application/x-clojure</td> </tr> </tbody> </table> </blockquote> <p><cite>IoLexer</cite></p> <blockquote> <p>For <a class="reference external" href="http://iolanguage.com/">Io</a> (a small, prototype-based programming language) source.</p> <p><em>New in Pygments 0.10.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">io</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.io</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-iosrc</td> </tr> </tbody> </table> </blockquote> <p><cite>LuaLexer</cite></p> <blockquote> <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 <tt class="docutils literal">True</tt>, highlight builtin function names (default: <tt class="docutils literal">True</tt>).</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"><div class="syntax"><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> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">lua</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.lua</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-lua, application/x-lua</td> </tr> </tbody> </table> </blockquote> <p><cite>MiniDLexer</cite></p> <blockquote> <p>For <a class="reference external" href="http://www.dsource.org/projects/minid">MiniD</a> (a D-like scripting language) source.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">minid</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.md</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-minidsrc</td> </tr> </tbody> </table> </blockquote> <p><cite>PerlLexer</cite></p> <blockquote> <p>For <a class="reference external" href="http://www.perl.org">Perl</a> source code.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">perl, pl</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.pl, *.pm</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-perl, application/x-perl</td> </tr> </tbody> </table> </blockquote> <p><cite>Python3Lexer</cite></p> <blockquote> <p>For <a class="reference external" href="http://www.python.org">Python</a> source code (version 3.0).</p> <p><em>New in Pygments 0.10.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">python3, py3</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-python3, application/x-python3</td> </tr> </tbody> </table> </blockquote> <p><cite>Python3TracebackLexer</cite></p> <blockquote> <p>For Python 3.0 tracebacks, with support for chained exceptions.</p> <p><em>New in Pygments 1.0.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">py3tb</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.py3tb</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-python3-traceback</td> </tr> </tbody> </table> </blockquote> <p><cite>PythonConsoleLexer</cite></p> <blockquote> <p>For Python console output or doctests, such as:</p> <div class="syntax"><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-Identifier"><module></span> <span class="nc">ZeroDivisionError</span>: <span class="n-Identifier">integer division or modulo by zero</span> </pre></div> <p>Additional options:</p> <dl class="docutils"> <dt><cite>python3</cite></dt> <dd>Use Python 3 lexer for code. Default is <tt class="docutils literal">False</tt>. <em>New in Pygments 1.0.</em></dd> </dl> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">pycon</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-python-doctest</td> </tr> </tbody> </table> </blockquote> <p><cite>PythonLexer</cite></p> <blockquote> <p>For <a class="reference external" href="http://www.python.org">Python</a> source code.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">python, py</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.py, *.pyw, *.sc, SConstruct, SConscript, *.tac</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-python, application/x-python</td> </tr> </tbody> </table> </blockquote> <p><cite>PythonTracebackLexer</cite></p> <blockquote> <p>For Python tracebacks.</p> <p><em>New in Pygments 0.7.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">pytb</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.pytb</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-python-traceback</td> </tr> </tbody> </table> </blockquote> <p><cite>RubyConsoleLexer</cite></p> <blockquote> <p>For Ruby interactive console (<strong>irb</strong>) output like:</p> <div class="syntax"><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> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">rbcon, irb</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-ruby-shellsession</td> </tr> </tbody> </table> </blockquote> <p><cite>RubyLexer</cite></p> <blockquote> <p>For <a class="reference external" href="http://www.ruby-lang.org">Ruby</a> source code.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">rb, ruby</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.rb, *.rbw, Rakefile, *.rake, *.gemspec, *.rbx</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-ruby, application/x-ruby</td> </tr> </tbody> </table> </blockquote> <p><cite>TclLexer</cite></p> <blockquote> <p>For Tcl source code.</p> <p><em>New in Pygments 0.10.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">tcl</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.tcl</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-tcl, text/x-script.tcl, application/x-tcl</td> </tr> </tbody> </table> </blockquote> </div> <div class="section" id="lexers-for-assembly-languages"> <h3>Lexers for assembly languages</h3> <p><cite>CObjdumpLexer</cite></p> <blockquote> <p>For the output of 'objdump -Sr on compiled C files'</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">c-objdump</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.c-objdump</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-c-objdump</td> </tr> </tbody> </table> </blockquote> <p><cite>CppObjdumpLexer</cite></p> <blockquote> <p>For the output of 'objdump -Sr on compiled C++ files'</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">cpp-objdump, c++-objdumb, cxx-objdump</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.cpp-objdump, *.c++-objdump, *.cxx-objdump</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-cpp-objdump</td> </tr> </tbody> </table> </blockquote> <p><cite>DObjdumpLexer</cite></p> <blockquote> <p>For the output of 'objdump -Sr on compiled D files'</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">d-objdump</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.d-objdump</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-d-objdump</td> </tr> </tbody> </table> </blockquote> <p><cite>GasLexer</cite></p> <blockquote> <p>For Gas (AT&T) assembly code.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">gas</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.s, *.S</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-gas</td> </tr> </tbody> </table> </blockquote> <p><cite>LlvmLexer</cite></p> <blockquote> <p>For LLVM assembly code.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">llvm</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.ll</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-llvm</td> </tr> </tbody> </table> </blockquote> <p><cite>NasmLexer</cite></p> <blockquote> <p>For Nasm (Intel) assembly code.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">nasm</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.asm, *.ASM</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-nasm</td> </tr> </tbody> </table> </blockquote> <p><cite>ObjdumpLexer</cite></p> <blockquote> <p>For the output of 'objdump -dr'</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">objdump</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.objdump</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-objdump</td> </tr> </tbody> </table> </blockquote> </div> <div class="section" id="lexers-for-compiled-languages"> <h3>Lexers for compiled languages</h3> <p><cite>AdaLexer</cite></p> <blockquote> <p>For Ada source code.</p> <p><em>New in Pygments 1.3.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">ada, ada95ada2005</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.adb, *.ads, *.ada</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-ada</td> </tr> </tbody> </table> </blockquote> <p><cite>CLexer</cite></p> <blockquote> <p>For C source code with preprocessor directives.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">c</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.c, *.h</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-chdr, text/x-csrc</td> </tr> </tbody> </table> </blockquote> <p><cite>CppLexer</cite></p> <blockquote> <p>For C++ source code with preprocessor directives.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">cpp, c++</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.cpp, *.hpp, *.c++, *.h++, *.cc, *.hh, *.cxx, *.hxx</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-c++hdr, text/x-c++src</td> </tr> </tbody> </table> </blockquote> <p><cite>CythonLexer</cite></p> <blockquote> <p>For Pyrex and <a class="reference external" href="http://cython.org">Cython</a> source code.</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">cython, pyx</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.pyx, *.pxd, *.pxi</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-cython, application/x-cython</td> </tr> </tbody> </table> </blockquote> <p><cite>DLexer</cite></p> <blockquote> <p>For D source.</p> <p><em>New in Pygments 1.2.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">d</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.d, *.di</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-dsrc</td> </tr> </tbody> </table> </blockquote> <p><cite>DelphiLexer</cite></p> <blockquote> <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: <tt class="docutils literal">True</tt>).</dd> <dt><cite>delphi</cite></dt> <dd>Highlight Borland Delphi specific keywords (default: <tt class="docutils literal">True</tt>).</dd> <dt><cite>freepascal</cite></dt> <dd>Highlight Free Pascal specific keywords (default: <tt class="docutils literal">True</tt>).</dd> <dt><cite>units</cite></dt> <dd>A list of units that should be considered builtin, supported are <tt class="docutils literal">System</tt>, <tt class="docutils literal">SysUtils</tt>, <tt class="docutils literal">Classes</tt> and <tt class="docutils literal">Math</tt>. Default is to consider all of them builtin.</dd> </dl> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">delphi, pas, pascal, objectpascal</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.pas</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-pascal</td> </tr> </tbody> </table> </blockquote> <p><cite>DylanLexer</cite></p> <blockquote> <p>For the <a class="reference external" href="http://www.opendylan.org/">Dylan</a> language.</p> <p><em>New in Pygments 0.7.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">dylan</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.dylan</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-dylan</td> </tr> </tbody> </table> </blockquote> <p><cite>FelixLexer</cite></p> <blockquote> <p>For <a class="reference external" href="http://www.felix-lang.org">Felix</a> source code.</p> <p><em>New in Pygments 1.2.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">felix, flx</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.flx, *.flxh</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-felix</td> </tr> </tbody> </table> </blockquote> <p><cite>FortranLexer</cite></p> <blockquote> <p>Lexer for FORTRAN 90 code.</p> <p><em>New in Pygments 0.10.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">fortran</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.f, *.f90</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-fortran</td> </tr> </tbody> </table> </blockquote> <p><cite>GLShaderLexer</cite></p> <blockquote> <p>GLSL (OpenGL Shader) lexer.</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">glsl</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.vert, *.frag, *.geo</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-glslsrc</td> </tr> </tbody> </table> </blockquote> <p><cite>GoLexer</cite></p> <blockquote> <p>For <a class="reference external" href="http://golang.org">Go</a> source.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">go</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.go</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-gosrc</td> </tr> </tbody> </table> </blockquote> <p><cite>JavaLexer</cite></p> <blockquote> <p>For <a class="reference external" href="http://www.sun.com/java/">Java</a> source code.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">java</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.java</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-java</td> </tr> </tbody> </table> </blockquote> <p><cite>Modula2Lexer</cite></p> <blockquote> <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> <p><em>New in Pygments 1.3.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">modula2, m2</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.def, *.mod</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-modula2</td> </tr> </tbody> </table> </blockquote> <p><cite>ObjectiveCLexer</cite></p> <blockquote> <p>For Objective-C source code with preprocessor directives.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">objective-c, objectivec, obj-c, objc</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.m</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-objective-c</td> </tr> </tbody> </table> </blockquote> <p><cite>OocLexer</cite></p> <blockquote> <p>For <a class="reference external" href="http://ooc-lang.org/">Ooc</a> source code</p> <p><em>New in Pygments 1.2.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">ooc</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.ooc</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-ooc</td> </tr> </tbody> </table> </blockquote> <p><cite>PrologLexer</cite></p> <blockquote> <p>Lexer for Prolog files.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">prolog</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.prolog, *.pro, *.pl</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-prolog</td> </tr> </tbody> </table> </blockquote> <p><cite>ScalaLexer</cite></p> <blockquote> <p>For <a class="reference external" href="http://www.scala-lang.org">Scala</a> source code.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">scala</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.scala</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-scala</td> </tr> </tbody> </table> </blockquote> <p><cite>ValaLexer</cite></p> <blockquote> <p>For Vala source code with preprocessor directives.</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">vala, vapi</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.vala, *.vapi</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-vala</td> </tr> </tbody> </table> </blockquote> </div> <div class="section" id="lexers-for-net-languages"> <h3>Lexers for .net languages</h3> <p><cite>BooLexer</cite></p> <blockquote> <p>For <a class="reference external" href="http://boo.codehaus.org/">Boo</a> source code.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">boo</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.boo</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-boo</td> </tr> </tbody> </table> </blockquote> <p><cite>CSharpAspxLexer</cite></p> <blockquote> <p>Lexer for highligting C# within ASP.NET pages.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">aspx-cs</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.aspx, *.asax, *.ascx, *.ashx, *.asmx, *.axd</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>CSharpLexer</cite></p> <blockquote> <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><tt class="docutils literal">none</tt> -- only the ASCII letters and numbers are allowed. This is the fastest selection.</li> <li><tt class="docutils literal">basic</tt> -- all Unicode characters from the specification except category <tt class="docutils literal">Lo</tt> are allowed.</li> <li><tt class="docutils literal">full</tt> -- all Unicode characters as specified in the C# specs are allowed. Note that this means a considerable slowdown since the <tt class="docutils literal">Lo</tt> category has more than 40,000 characters in it!</li> </ul> <p>The default value is <tt class="docutils literal">basic</tt>.</p> <p class="last"><em>New in Pygments 0.8.</em></p> </dd> </dl> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">csharp, c#</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.cs</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-csharp</td> </tr> </tbody> </table> </blockquote> <p><cite>VbNetAspxLexer</cite></p> <blockquote> <p>Lexer for highligting Visual Basic.net within ASP.NET pages.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">aspx-vb</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.aspx, *.asax, *.ascx, *.ashx, *.asmx, *.axd</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>VbNetLexer</cite></p> <blockquote> <p>For <a class="reference external" href="http://msdn2.microsoft.com/en-us/vbasic/default.aspx">Visual Basic.NET</a> source code.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">vb.net, vbnet</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.vb, *.bas</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-vbnet, text/x-vba</td> </tr> </tbody> </table> </blockquote> </div> <div class="section" id="lexers-for-functional-languages"> <h3>Lexers for functional languages</h3> <p><cite>CommonLispLexer</cite></p> <blockquote> <p>A Common Lisp lexer.</p> <p><em>New in Pygments 0.9.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">common-lisp, cl</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.cl, *.lisp, *.el</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-common-lisp</td> </tr> </tbody> </table> </blockquote> <p><cite>ErlangLexer</cite></p> <blockquote> <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> <p><em>New in Pygments 0.9.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">erlang</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.erl, *.hrl</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-erlang</td> </tr> </tbody> </table> </blockquote> <p><cite>ErlangShellLexer</cite></p> <blockquote> <p>Shell sessions in erl (for Erlang code).</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">erl</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.erl-sh</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-erl-shellsession</td> </tr> </tbody> </table> </blockquote> <p><cite>HaskellLexer</cite></p> <blockquote> <p>A Haskell lexer based on the lexemes defined in the Haskell 98 Report.</p> <p><em>New in Pygments 0.8.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">haskell, hs</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.hs</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-haskell</td> </tr> </tbody> </table> </blockquote> <p><cite>LiterateHaskellLexer</cite></p> <blockquote> <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 <tt class="docutils literal">"bird"</tt> or <tt class="docutils literal">"latex"</tt>. 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> <p><em>New in Pygments 0.9.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">lhs, literate-haskell</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.lhs</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-literate-haskell</td> </tr> </tbody> </table> </blockquote> <p><cite>OcamlLexer</cite></p> <blockquote> <p>For the OCaml language.</p> <p><em>New in Pygments 0.7.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">ocaml</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.ml, *.mli, *.mll, *.mly</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-ocaml</td> </tr> </tbody> </table> </blockquote> <p><cite>SchemeLexer</cite></p> <blockquote> <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> <p><em>New in Pygments 0.6.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">scheme, scm</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.scm</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-scheme, application/x-scheme</td> </tr> </tbody> </table> </blockquote> </div> <div class="section" id="lexers-for-math-languages"> <h3>Lexers for math languages</h3> <p><cite>MatlabLexer</cite></p> <blockquote> <p>For Matlab (or GNU Octave) source code. Contributed by Ken Schutte <<a class="reference external" href="mailto:kschutte@csail.mit.edu">kschutte@csail.mit.edu</a>>.</p> <p><em>New in Pygments 0.10.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">matlab, octave</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.m</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/matlab</td> </tr> </tbody> </table> </blockquote> <p><cite>MatlabSessionLexer</cite></p> <blockquote> <p>For Matlab (or GNU Octave) sessions. Modeled after PythonConsoleLexer. Contributed by Ken Schutte <<a class="reference external" href="mailto:kschutte@csail.mit.edu">kschutte@csail.mit.edu</a>>.</p> <p><em>New in Pygments 0.10.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">matlabsession</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>MuPADLexer</cite></p> <blockquote> <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@creutzig.de">christopher@creutzig.de</a>>.</p> <p><em>New in Pygments 0.8.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">mupad</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.mu</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>NumPyLexer</cite></p> <blockquote> <p>A Python lexer recognizing Numerical Python builtins.</p> <p><em>New in Pygments 0.10.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">numpy</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>RConsoleLexer</cite></p> <blockquote> <p>For R console transcripts or R CMD BATCH output files.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">rconsole, rout</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.Rout</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>SLexer</cite></p> <blockquote> <p>For S, S-plus, and R source code.</p> <p><em>New in Pygments 0.10.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">splus, s, r</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.S, *.R</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/S-plus, text/S, text/R</td> </tr> </tbody> </table> </blockquote> </div> <div class="section" id="lexers-for-other-languages"> <h3>Lexers for other languages</h3> <p><cite>ABAPLexer</cite></p> <blockquote> <p>Lexer for ABAP, SAP's integrated language.</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">abap</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.abap</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-abap</td> </tr> </tbody> </table> </blockquote> <p><cite>AppleScriptLexer</cite></p> <blockquote> <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@mac.com">aamann@mac.com</a>>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">applescript</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.applescript</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>AsymptoteLexer</cite></p> <blockquote> <p>For <a class="reference external" href="http://asymptote.sf.net/">Asymptote</a> source code.</p> <p><em>New in Pygments 1.2.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">asy, asymptote</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.asy</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-asymptote</td> </tr> </tbody> </table> </blockquote> <p><cite>BashLexer</cite></p> <blockquote> <p>Lexer for (ba|k|)sh shell scripts.</p> <p><em>New in Pygments 0.6.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">bash, sh, ksh</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.sh, *.ksh, *.bash, *.ebuild, *.eclass</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-sh, application/x-shellscript</td> </tr> </tbody> </table> </blockquote> <p><cite>BashSessionLexer</cite></p> <blockquote> <p>Lexer for simplistic shell sessions.</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">console</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.sh-session</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-shell-session</td> </tr> </tbody> </table> </blockquote> <p><cite>BatchLexer</cite></p> <blockquote> <p>Lexer for the DOS/Windows Batch file format.</p> <p><em>New in Pygments 0.7.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">bat</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.bat, *.cmd</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-dos-batch</td> </tr> </tbody> </table> </blockquote> <p><cite>BefungeLexer</cite></p> <blockquote> <p>Lexer for the esoteric <a class="reference external" href="http://en.wikipedia.org/wiki/Befunge">Befunge</a> language.</p> <p><em>New in Pygments 0.7.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">befunge</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.befunge</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-befunge</td> </tr> </tbody> </table> </blockquote> <p><cite>BrainfuckLexer</cite></p> <blockquote> <p>Lexer for the esoteric <a class="reference external" href="http://www.muppetlabs.com/~breadbox/bf/">BrainFuck</a> language.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">brainfuck, bf</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.bf, *.b</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-brainfuck</td> </tr> </tbody> </table> </blockquote> <p><cite>GherkinLexer</cite></p> <blockquote> <p>For <cite>Gherkin <http://cukes.info/></cite> syntax.</p> <p><em>New in Pygments 1.2.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">Cucumber, cucumber, Gherkin, gherkin</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.feature</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-gherkin</td> </tr> </tbody> </table> </blockquote> <p><cite>GnuplotLexer</cite></p> <blockquote> <p>For <a class="reference external" href="http://gnuplot.info/">Gnuplot</a> plotting scripts.</p> <p><em>New in Pygments 0.11.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">gnuplot</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.plot, *.plt</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-gnuplot</td> </tr> </tbody> </table> </blockquote> <p><cite>LogtalkLexer</cite></p> <blockquote> <p>For <a class="reference external" href="http://logtalk.org/">Logtalk</a> source code.</p> <p><em>New in Pygments 0.10.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">logtalk</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.lgt</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-logtalk</td> </tr> </tbody> </table> </blockquote> <p><cite>MOOCodeLexer</cite></p> <blockquote> <p>For <a class="reference external" href="http://www.moo.mud.org/">MOOCode</a> (the MOO scripting language).</p> <p><em>New in Pygments 0.9.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">moocode</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.moo</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-moocode</td> </tr> </tbody> </table> </blockquote> <p><cite>ModelicaLexer</cite></p> <blockquote> <p>For <a class="reference external" href="http://www.modelica.org/">Modelica</a> source code.</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">modelica</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.mo</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-modelica</td> </tr> </tbody> </table> </blockquote> <p><cite>MySqlLexer</cite></p> <blockquote> <p>Special lexer for MySQL.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">mysql</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-mysql</td> </tr> </tbody> </table> </blockquote> <p><cite>NewspeakLexer</cite></p> <blockquote> <p>For <cite>Newspeak <http://newspeaklanguage.org/></cite> syntax.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">newspeak</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.ns2</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-newspeak</td> </tr> </tbody> </table> </blockquote> <p><cite>PovrayLexer</cite></p> <blockquote> <p>For <a class="reference external" href="http://www.povray.org/">Persistence of Vision Raytracer</a> files.</p> <p><em>New in Pygments 0.11.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">pov</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.pov, *.inc</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-povray</td> </tr> </tbody> </table> </blockquote> <p><cite>RebolLexer</cite></p> <blockquote> <p>A <a class="reference external" href="http://www.rebol.com/">REBOL</a> lexer.</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">rebol</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.r, *.r3</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-rebol</td> </tr> </tbody> </table> </blockquote> <p><cite>RedcodeLexer</cite></p> <blockquote> <p>A simple Redcode lexer based on ICWS'94. Contributed by Adam Blinkinsop <<a class="reference external" href="mailto:blinks@acm.org">blinks@acm.org</a>>.</p> <p><em>New in Pygments 0.8.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">redcode</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.cw</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>SmalltalkLexer</cite></p> <blockquote> <p>For <a class="reference external" href="http://www.smalltalk.org/">Smalltalk</a> syntax. Contributed by Stefan Matthias Aust. Rewritten by Nils Winter.</p> <p><em>New in Pygments 0.10.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">smalltalk, squeak</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.st</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-smalltalk</td> </tr> </tbody> </table> </blockquote> <p><cite>SqlLexer</cite></p> <blockquote> <p>Lexer for Structured Query Language. Currently, this lexer does not recognize any special syntax except ANSI SQL.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">sql</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.sql</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-sql</td> </tr> </tbody> </table> </blockquote> <p><cite>SqliteConsoleLexer</cite></p> <blockquote> <p>Lexer for example sessions using sqlite3.</p> <p><em>New in Pygments 0.11.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">sqlite3</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.sqlite3-console</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-sqlite3-console</td> </tr> </tbody> </table> </blockquote> <p><cite>TcshLexer</cite></p> <blockquote> <p>Lexer for tcsh scripts.</p> <p><em>New in Pygments 0.10.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">tcsh, csh</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.tcsh, *.csh</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-csh</td> </tr> </tbody> </table> </blockquote> </div> <div class="section" id="lexers-for-parser-generators"> <h3>Lexers for parser generators</h3> <p><cite>AntlrActionScriptLexer</cite></p> <blockquote> <p><a class="reference external" href="http://www.antlr.org/">ANTLR</a> with ActionScript Target</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">antlr-as, antlr-actionscript</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.G, *.g</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>AntlrCSharpLexer</cite></p> <blockquote> <p><a class="reference external" href="http://www.antlr.org/">ANTLR</a> with C# Target</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">antlr-csharp, antlr-c#</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.G, *.g</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>AntlrCppLexer</cite></p> <blockquote> <p><a class="reference external" href="http://www.antlr.org/">ANTLR</a> with CPP Target</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">antlr-cpp</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.G, *.g</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>AntlrJavaLexer</cite></p> <blockquote> <p><a class="reference external" href="http://www.antlr.org/">ANTLR</a> with Java Target</p> <p><em>New in Pygments 1.1</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">antlr-java</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.G, *.g</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>AntlrLexer</cite></p> <blockquote> <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> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">antlr</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>AntlrObjectiveCLexer</cite></p> <blockquote> <p><a class="reference external" href="http://www.antlr.org/">ANTLR</a> with Objective-C Target</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">antlr-objc</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.G, *.g</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>AntlrPerlLexer</cite></p> <blockquote> <p><a class="reference external" href="http://www.antlr.org/">ANTLR</a> with Perl Target</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">antlr-perl</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.G, *.g</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>AntlrPythonLexer</cite></p> <blockquote> <p><a class="reference external" href="http://www.antlr.org/">ANTLR</a> with Python Target</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">antlr-python</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.G, *.g</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>AntlrRubyLexer</cite></p> <blockquote> <p><a class="reference external" href="http://www.antlr.org/">ANTLR</a> with Ruby Target</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">antlr-ruby, antlr-rb</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.G, *.g</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>RagelCLexer</cite></p> <blockquote> <p>A lexer for <a class="reference external" href="http://www.complang.org/ragel/">Ragel</a> in a C host file.</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">ragel-c</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.rl</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>RagelCppLexer</cite></p> <blockquote> <p>A lexer for <a class="reference external" href="http://www.complang.org/ragel/">Ragel</a> in a CPP host file.</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">ragel-cpp</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.rl</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>RagelDLexer</cite></p> <blockquote> <p>A lexer for <a class="reference external" href="http://www.complang.org/ragel/">Ragel</a> in a D host file.</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">ragel-d</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.rl</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>RagelEmbeddedLexer</cite></p> <blockquote> <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> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">ragel-em</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.rl</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>RagelJavaLexer</cite></p> <blockquote> <p>A lexer for <a class="reference external" href="http://www.complang.org/ragel/">Ragel</a> in a Java host file.</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">ragel-java</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.rl</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>RagelLexer</cite></p> <blockquote> <p>A pure <a class="reference external" href="http://www.complang.org/ragel/">Ragel</a> lexer. Use this for fragments of Ragel. For <tt class="docutils literal">.rl</tt> files, use RagelEmbeddedLexer instead (or one of the language-specific subclasses).</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">ragel</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>RagelObjectiveCLexer</cite></p> <blockquote> <p>A lexer for <a class="reference external" href="http://www.complang.org/ragel/">Ragel</a> in an Objective C host file.</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">ragel-objc</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.rl</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>RagelRubyLexer</cite></p> <blockquote> <p>A lexer for <a class="reference external" href="http://www.complang.org/ragel/">Ragel</a> in a Ruby host file.</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">ragel-ruby, ragel-rb</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.rl</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> </div> <div class="section" id="special-lexers"> <h3>Special lexers</h3> <p><cite>RawTokenLexer</cite></p> <blockquote> <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 <tt class="docutils literal">"gz"</tt> or <tt class="docutils literal">"bz2"</tt>, decompress the token stream with the given compression algorithm before lexing (default: <tt class="docutils literal">""</tt>).</dd> </dl> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">raw</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-pygments-tokens</td> </tr> </tbody> </table> </blockquote> <p><cite>TextLexer</cite></p> <blockquote> <p>"Null" lexer, doesn't highlight anything.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">text</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.txt</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/plain</td> </tr> </tbody> </table> </blockquote> </div> <div class="section" id="lexers-for-various-template-engines-markup"> <h3>Lexers for various template engines' markup</h3> <p><cite>CheetahHtmlLexer</cite></p> <blockquote> <p>Subclass of the <cite>CheetahLexer</cite> that highlights unlexer data with the <cite>HtmlLexer</cite>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">html+cheetah, html+spitfire</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/html+cheetah, text/html+spitfire</td> </tr> </tbody> </table> </blockquote> <p><cite>CheetahJavascriptLexer</cite></p> <blockquote> <p>Subclass of the <cite>CheetahLexer</cite> that highlights unlexer data with the <cite>JavascriptLexer</cite>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="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"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</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> </blockquote> <p><cite>CheetahLexer</cite></p> <blockquote> <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> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">cheetah, spitfire</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.tmpl, *.spt</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-cheetah, application/x-spitfire</td> </tr> </tbody> </table> </blockquote> <p><cite>CheetahXmlLexer</cite></p> <blockquote> <p>Subclass of the <cite>CheetahLexer</cite> that highlights unlexer data with the <cite>XmlLexer</cite>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">xml+cheetah, xml+spitfire</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/xml+cheetah, application/xml+spitfire</td> </tr> </tbody> </table> </blockquote> <p><cite>ColdfusionHtmlLexer</cite></p> <blockquote> <p>Coldfusion markup in html</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">cfm</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.cfm, *.cfml, *.cfc</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-coldfusion</td> </tr> </tbody> </table> </blockquote> <p><cite>ColdfusionLexer</cite></p> <blockquote> <p>Coldfusion statements</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">cfs</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>CssDjangoLexer</cite></p> <blockquote> <p>Subclass of the <cite>DjangoLexer</cite> that highlights unlexed data with the <cite>CssLexer</cite>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">css+django, css+jinja</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/css+django, text/css+jinja</td> </tr> </tbody> </table> </blockquote> <p><cite>CssErbLexer</cite></p> <blockquote> <p>Subclass of <cite>ErbLexer</cite> which highlights unlexed data with the <cite>CssLexer</cite>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">css+erb, css+ruby</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/css+ruby</td> </tr> </tbody> </table> </blockquote> <p><cite>CssGenshiLexer</cite></p> <blockquote> <p>A lexer that highlights CSS definitions in genshi text templates.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">css+genshitext, css+genshi</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/css+genshi</td> </tr> </tbody> </table> </blockquote> <p><cite>CssPhpLexer</cite></p> <blockquote> <p>Subclass of <cite>PhpLexer</cite> which highlights unmatched data with the <cite>CssLexer</cite>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">css+php</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/css+php</td> </tr> </tbody> </table> </blockquote> <p><cite>CssSmartyLexer</cite></p> <blockquote> <p>Subclass of the <cite>SmartyLexer</cite> that highlights unlexed data with the <cite>CssLexer</cite>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">css+smarty</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/css+smarty</td> </tr> </tbody> </table> </blockquote> <p><cite>DjangoLexer</cite></p> <blockquote> <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> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">django, jinja</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-django-templating, application/x-jinja</td> </tr> </tbody> </table> </blockquote> <p><cite>ErbLexer</cite></p> <blockquote> <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> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">erb</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-ruby-templating</td> </tr> </tbody> </table> </blockquote> <p><cite>EvoqueHtmlLexer</cite></p> <blockquote> <p>Subclass of the <cite>EvoqueLexer</cite> that highlights unlexed data with the <cite>HtmlLexer</cite>.</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">html+evoque</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.html</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/html+evoque</td> </tr> </tbody> </table> </blockquote> <p><cite>EvoqueLexer</cite></p> <blockquote> <p>For files using the Evoque templating system.</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">evoque</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.evoque</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-evoque</td> </tr> </tbody> </table> </blockquote> <p><cite>EvoqueXmlLexer</cite></p> <blockquote> <p>Subclass of the <cite>EvoqueLexer</cite> that highlights unlexed data with the <cite>XmlLexer</cite>.</p> <p><em>New in Pygments 1.1.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">xml+evoque</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.xml</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/xml+evoque</td> </tr> </tbody> </table> </blockquote> <p><cite>GenshiLexer</cite></p> <blockquote> <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> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">genshi, kid, xml+genshi, xml+kid</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.kid</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-genshi, application/x-kid</td> </tr> </tbody> </table> </blockquote> <p><cite>GenshiTextLexer</cite></p> <blockquote> <p>A lexer that highlights <a class="reference external" href="http://genshi.edgewall.org/">genshi</a> text templates.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">genshitext</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-genshi-text, text/x-genshi</td> </tr> </tbody> </table> </blockquote> <p><cite>HtmlDjangoLexer</cite></p> <blockquote> <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> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">html+django, html+jinja</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/html+django, text/html+jinja</td> </tr> </tbody> </table> </blockquote> <p><cite>HtmlGenshiLexer</cite></p> <blockquote> <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> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">html+genshi, html+kid</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/html+genshi</td> </tr> </tbody> </table> </blockquote> <p><cite>HtmlPhpLexer</cite></p> <blockquote> <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> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">html+php</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.phtml</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</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> </blockquote> <p><cite>HtmlSmartyLexer</cite></p> <blockquote> <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> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">html+smarty</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/html+smarty</td> </tr> </tbody> </table> </blockquote> <p><cite>JavascriptDjangoLexer</cite></p> <blockquote> <p>Subclass of the <cite>DjangoLexer</cite> that highlights unlexed data with the <cite>JavascriptLexer</cite>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="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"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</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> </blockquote> <p><cite>JavascriptErbLexer</cite></p> <blockquote> <p>Subclass of <cite>ErbLexer</cite> which highlights unlexed data with the <cite>JavascriptLexer</cite>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="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"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-javascript+ruby, text/x-javascript+ruby, text/javascript+ruby</td> </tr> </tbody> </table> </blockquote> <p><cite>JavascriptGenshiLexer</cite></p> <blockquote> <p>A lexer that highlights javascript code in genshi text templates.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="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"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-javascript+genshi, text/x-javascript+genshi, text/javascript+genshi</td> </tr> </tbody> </table> </blockquote> <p><cite>JavascriptPhpLexer</cite></p> <blockquote> <p>Subclass of <cite>PhpLexer</cite> which highlights unmatched data with the <cite>JavascriptLexer</cite>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">js+php, javascript+php</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-javascript+php, text/x-javascript+php, text/javascript+php</td> </tr> </tbody> </table> </blockquote> <p><cite>JavascriptSmartyLexer</cite></p> <blockquote> <p>Subclass of the <cite>SmartyLexer</cite> that highlights unlexed data with the <cite>JavascriptLexer</cite>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">js+smarty, javascript+smarty</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-javascript+smarty, text/x-javascript+smarty, text/javascript+smarty</td> </tr> </tbody> </table> </blockquote> <p><cite>JspLexer</cite></p> <blockquote> <p>Lexer for Java Server Pages.</p> <p><em>New in Pygments 0.7.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">jsp</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.jsp</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-jsp</td> </tr> </tbody> </table> </blockquote> <p><cite>MakoCssLexer</cite></p> <blockquote> <p>Subclass of the <cite>MakoLexer</cite> that highlights unlexer data with the <cite>CssLexer</cite>.</p> <p><em>New in Pygments 0.7.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">css+mako</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/css+mako</td> </tr> </tbody> </table> </blockquote> <p><cite>MakoHtmlLexer</cite></p> <blockquote> <p>Subclass of the <cite>MakoLexer</cite> that highlights unlexed data with the <cite>HtmlLexer</cite>.</p> <p><em>New in Pygments 0.7.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">html+mako</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/html+mako</td> </tr> </tbody> </table> </blockquote> <p><cite>MakoJavascriptLexer</cite></p> <blockquote> <p>Subclass of the <cite>MakoLexer</cite> that highlights unlexer data with the <cite>JavascriptLexer</cite>.</p> <p><em>New in Pygments 0.7.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">js+mako, javascript+mako</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-javascript+mako, text/x-javascript+mako, text/javascript+mako</td> </tr> </tbody> </table> </blockquote> <p><cite>MakoLexer</cite></p> <blockquote> <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> <p><em>New in Pygments 0.7.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">mako</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.mao</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-mako</td> </tr> </tbody> </table> </blockquote> <p><cite>MakoXmlLexer</cite></p> <blockquote> <p>Subclass of the <cite>MakoLexer</cite> that highlights unlexer data with the <cite>XmlLexer</cite>.</p> <p><em>New in Pygments 0.7.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">xml+mako</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/xml+mako</td> </tr> </tbody> </table> </blockquote> <p><cite>MyghtyCssLexer</cite></p> <blockquote> <p>Subclass of the <cite>MyghtyLexer</cite> that highlights unlexer data with the <cite>CssLexer</cite>.</p> <p><em>New in Pygments 0.6.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">css+myghty</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/css+myghty</td> </tr> </tbody> </table> </blockquote> <p><cite>MyghtyHtmlLexer</cite></p> <blockquote> <p>Subclass of the <cite>MyghtyLexer</cite> that highlights unlexer data with the <cite>HtmlLexer</cite>.</p> <p><em>New in Pygments 0.6.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">html+myghty</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/html+myghty</td> </tr> </tbody> </table> </blockquote> <p><cite>MyghtyJavascriptLexer</cite></p> <blockquote> <p>Subclass of the <cite>MyghtyLexer</cite> that highlights unlexer data with the <cite>JavascriptLexer</cite>.</p> <p><em>New in Pygments 0.6.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">js+myghty, javascript+myghty</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-javascript+myghty, text/x-javascript+myghty, text/javascript+mygthy</td> </tr> </tbody> </table> </blockquote> <p><cite>MyghtyLexer</cite></p> <blockquote> <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> <p><em>New in Pygments 0.6.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">myghty</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.myt, autodelegate</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-myghty</td> </tr> </tbody> </table> </blockquote> <p><cite>MyghtyXmlLexer</cite></p> <blockquote> <p>Subclass of the <cite>MyghtyLexer</cite> that highlights unlexer data with the <cite>XmlLexer</cite>.</p> <p><em>New in Pygments 0.6.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">xml+myghty</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/xml+myghty</td> </tr> </tbody> </table> </blockquote> <p><cite>RhtmlLexer</cite></p> <blockquote> <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> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">rhtml, html+erb, html+ruby</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.rhtml</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/html+ruby</td> </tr> </tbody> </table> </blockquote> <p><cite>SmartyLexer</cite></p> <blockquote> <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> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">smarty</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.tpl</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-smarty</td> </tr> </tbody> </table> </blockquote> <p><cite>XmlDjangoLexer</cite></p> <blockquote> <p>Subclass of the <cite>DjangoLexer</cite> that highlights unlexed data with the <cite>XmlLexer</cite>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">xml+django, xml+jinja</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/xml+django, application/xml+jinja</td> </tr> </tbody> </table> </blockquote> <p><cite>XmlErbLexer</cite></p> <blockquote> <p>Subclass of <cite>ErbLexer</cite> which highlights data outside preprocessor directives with the <cite>XmlLexer</cite>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">xml+erb, xml+ruby</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/xml+ruby</td> </tr> </tbody> </table> </blockquote> <p><cite>XmlPhpLexer</cite></p> <blockquote> <p>Subclass of <cite>PhpLexer</cite> that higlights unhandled data with the <cite>XmlLexer</cite>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">xml+php</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/xml+php</td> </tr> </tbody> </table> </blockquote> <p><cite>XmlSmartyLexer</cite></p> <blockquote> <p>Subclass of the <cite>SmartyLexer</cite> that highlights unlexed data with the <cite>XmlLexer</cite>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">xml+smarty</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/xml+smarty</td> </tr> </tbody> </table> </blockquote> </div> <div class="section" id="lexers-for-non-source-code-file-types"> <h3>Lexers for non-source code file types</h3> <p><cite>ApacheConfLexer</cite></p> <blockquote> <p>Lexer for configuration files following the Apache config file format.</p> <p><em>New in Pygments 0.6.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">apacheconf, aconf, apache</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">.htaccess, apache.conf, apache2.conf</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-apacheconf</td> </tr> </tbody> </table> </blockquote> <p><cite>BBCodeLexer</cite></p> <blockquote> <p>A lexer that highlights BBCode(-like) syntax.</p> <p><em>New in Pygments 0.6.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">bbcode</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-bbcode</td> </tr> </tbody> </table> </blockquote> <p><cite>BaseMakefileLexer</cite></p> <blockquote> <p>Lexer for simple Makefiles (no preprocessing).</p> <p><em>New in Pygments 0.10.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">basemake</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>CMakeLexer</cite></p> <blockquote> <p>Lexer for <a class="reference external" href="http://cmake.org/Wiki/CMake">CMake</a> files.</p> <p><em>New in Pygments 1.2.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">cmake</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.cmake</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-cmake</td> </tr> </tbody> </table> </blockquote> <p><cite>DarcsPatchLexer</cite></p> <blockquote> <p>DarcsPatchLexer is a lexer for the various versions of the darcs patch format. Examples of this format are derived by commands such as <tt class="docutils literal">darcs annotate <span class="pre">--patch</span></tt> and <tt class="docutils literal">darcs send</tt>.</p> <p><em>New in Pygments 0.10.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">dpatch</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.dpatch, *.darcspatch</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>DebianControlLexer</cite></p> <blockquote> <p>Lexer for Debian <tt class="docutils literal">control</tt> files and <tt class="docutils literal"><span class="pre">apt-cache</span> show <pkg></tt> outputs.</p> <p><em>New in Pygments 0.9.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">control</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">control</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>DiffLexer</cite></p> <blockquote> <p>Lexer for unified or context-style diffs or patches.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">diff, udiff</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.diff, *.patch</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-diff, text/x-patch</td> </tr> </tbody> </table> </blockquote> <p><cite>GettextLexer</cite></p> <blockquote> <p>Lexer for Gettext catalog files.</p> <p><em>New in Pygments 0.9.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">pot, po</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.pot, *.po</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-gettext, text/x-gettext, text/gettext</td> </tr> </tbody> </table> </blockquote> <p><cite>GroffLexer</cite></p> <blockquote> <p>Lexer for the (g)roff typesetting language, supporting groff extensions. Mainly useful for highlighting manpage sources.</p> <p><em>New in Pygments 0.6.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">groff, nroff, man</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.[1234567], *.man</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-troff, text/troff</td> </tr> </tbody> </table> </blockquote> <p><cite>IniLexer</cite></p> <blockquote> <p>Lexer for configuration files in INI style.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">ini, cfg</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.ini, *.cfg, *.properties</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-ini</td> </tr> </tbody> </table> </blockquote> <p><cite>IrcLogsLexer</cite></p> <blockquote> <p>Lexer for IRC logs in <em>irssi</em>, <em>xchat</em> or <em>weechat</em> style.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">irc</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.weechatlog</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-irclog</td> </tr> </tbody> </table> </blockquote> <p><cite>LighttpdConfLexer</cite></p> <blockquote> <p>Lexer for <a class="reference external" href="http://lighttpd.net/">Lighttpd</a> configuration files.</p> <p><em>New in Pygments 0.11.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">lighty, lighttpd</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-lighttpd-conf</td> </tr> </tbody> </table> </blockquote> <p><cite>MakefileLexer</cite></p> <blockquote> <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> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">make, makefile, mf, bsdmake</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.mak, Makefile, makefile, Makefile.*, GNUmakefile</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-makefile</td> </tr> </tbody> </table> </blockquote> <p><cite>MoinWikiLexer</cite></p> <blockquote> <p>For MoinMoin (and Trac) Wiki markup.</p> <p><em>New in Pygments 0.7.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">trac-wiki, moin</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-trac-wiki</td> </tr> </tbody> </table> </blockquote> <p><cite>NginxConfLexer</cite></p> <blockquote> <p>Lexer for <a class="reference external" href="http://nginx.net/">Nginx</a> configuration files.</p> <p><em>New in Pygments 0.11.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">nginx</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">None</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-nginx-conf</td> </tr> </tbody> </table> </blockquote> <p><cite>RstLexer</cite></p> <blockquote> <p>For <a class="reference external" href="http://docutils.sf.net/rst.html">reStructuredText</a> markup.</p> <p><em>New in Pygments 0.7.</em></p> <p>Additional options accepted:</p> <dl class="docutils"> <dt><cite>handlecodeblocks</cite></dt> <dd>Highlight the contents of <tt class="docutils literal">.. sourcecode:: langauge</tt> and <tt class="docutils literal">.. code:: language</tt> directives with a lexer for the given language (default: <tt class="docutils literal">True</tt>). <em>New in Pygments 0.8.</em></dd> </dl> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">rst, rest, restructuredtext</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.rst, *.rest</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-rst, text/prs.fallenstein.rst</td> </tr> </tbody> </table> </blockquote> <p><cite>SourcesListLexer</cite></p> <blockquote> <p>Lexer that highlights debian sources.list files.</p> <p><em>New in Pygments 0.7.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">sourceslist, sources.list</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">sources.list</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>SquidConfLexer</cite></p> <blockquote> <p>Lexer for <a class="reference external" href="http://www.squid-cache.org/">squid</a> configuration files.</p> <p><em>New in Pygments 0.9.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">squidconf, squid.conf, squid</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">squid.conf</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-squidconf</td> </tr> </tbody> </table> </blockquote> <p><cite>TexLexer</cite></p> <blockquote> <p>Lexer for the TeX and LaTeX typesetting languages.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">tex, latex</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.tex, *.aux, *.toc</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-tex, text/x-latex</td> </tr> </tbody> </table> </blockquote> <p><cite>VimLexer</cite></p> <blockquote> <p>Lexer for VimL script files.</p> <p><em>New in Pygments 0.8.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">vim</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.vim, .vimrc</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-vim</td> </tr> </tbody> </table> </blockquote> <p><cite>YamlLexer</cite></p> <blockquote> <p>Lexer for <a class="reference external" href="http://yaml.org/">YAML</a>, a human-friendly data serialization language.</p> <p><em>New in Pygments 0.11.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">yaml</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.yaml, *.yml</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-yaml</td> </tr> </tbody> </table> </blockquote> </div> <div class="section" id="lexers-for-web-related-languages-and-markup"> <h3>Lexers for web-related languages and markup</h3> <p><cite>ActionScript3Lexer</cite></p> <blockquote> <p>For ActionScript 3 source code.</p> <p><em>New in Pygments 0.11.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">as3, actionscript3</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.as</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-actionscript, text/x-actionscript, text/actionscript</td> </tr> </tbody> </table> </blockquote> <p><cite>ActionScriptLexer</cite></p> <blockquote> <p>For ActionScript source code.</p> <p><em>New in Pygments 0.9.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">as, actionscript</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.as</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-actionscript, text/x-actionscript, text/actionscript</td> </tr> </tbody> </table> </blockquote> <p><cite>CoffeeScriptLexer</cite></p> <blockquote> <p>For <a class="reference external" href="http://jashkenas.github.com/coffee-script/">CoffeeScript</a> source code.</p> <p><em>New in Pygments 1.3.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">coffee-script, coffeescript</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.coffee</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/coffeescript</td> </tr> </tbody> </table> </blockquote> <p><cite>CssLexer</cite></p> <blockquote> <p>For CSS (Cascading Style Sheets).</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">css</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.css</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/css</td> </tr> </tbody> </table> </blockquote> <p><cite>HamlLexer</cite></p> <blockquote> <p>For Haml markup.</p> <p><em>New in Pygments 1.3.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">haml, HAML</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.haml</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-haml</td> </tr> </tbody> </table> </blockquote> <p><cite>HaxeLexer</cite></p> <blockquote> <p>For haXe source code (<a class="reference external" href="http://haxe.org/">http://haxe.org/</a>).</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">hx, haXe</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.hx</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/haxe</td> </tr> </tbody> </table> </blockquote> <p><cite>HtmlLexer</cite></p> <blockquote> <p>For HTML 4 and XHTML 1 markup. Nested JavaScript and CSS is highlighted by the appropriate lexer.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">html</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.html, *.htm, *.xhtml, *.xslt</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/html, application/xhtml+xml</td> </tr> </tbody> </table> </blockquote> <p><cite>JavascriptLexer</cite></p> <blockquote> <p>For JavaScript source code.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">js, javascript</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.js</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">application/x-javascript, text/x-javascript, text/javascript</td> </tr> </tbody> </table> </blockquote> <p><cite>MxmlLexer</cite></p> <blockquote> <p>For MXML markup. Nested AS3 in <script> tags is highlighted by the appropriate lexer.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">mxml</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.mxml</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">None</td> </tr> </tbody> </table> </blockquote> <p><cite>ObjectiveJLexer</cite></p> <blockquote> <p>For Objective-J source code with preprocessor directives.</p> <p><em>New in Pygments 1.3.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">objective-j, objectivej, obj-j, objj</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.j</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-objective-j</td> </tr> </tbody> </table> </blockquote> <p><cite>PhpLexer</cite></p> <blockquote> <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 <tt class="docutils literal">True</tt> the lexer starts highlighting with php code (i.e.: no starting <tt class="docutils literal"><span class="pre"><?php</span></tt> required). The default is <tt class="docutils literal">False</tt>.</dd> <dt><cite>funcnamehighlighting</cite></dt> <dd>If given and <tt class="docutils literal">True</tt>, highlight builtin function names (default: <tt class="docutils literal">True</tt>).</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 <tt class="docutils literal">'unknown'</tt> 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="syntax"><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> <p class="last">In fact the names of those modules match the module names from the php documentation.</p> </dd> </dl> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">php, php3, php4, php5</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.php, *.php[345]</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-php</td> </tr> </tbody> </table> </blockquote> <p><cite>SassLexer</cite></p> <blockquote> <p>For Sass stylesheets.</p> <p><em>New in Pygments 1.3.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">sass, SASS</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.sass</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/x-sass</td> </tr> </tbody> </table> </blockquote> <p><cite>XmlLexer</cite></p> <blockquote> <p>Generic lexer for XML (eXtensible Markup Language).</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">xml</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.xml, *.xsl, *.rss, *.xslt, *.xsd, *.wsdl</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/xml, application/xml, image/svg+xml, application/rss+xml, application/atom+xml, application/xsl+xml, application/xslt+xml</td> </tr> </tbody> </table> </blockquote> <p><cite>XsltLexer</cite></p> <blockquote> <p>A lexer for XSLT.</p> <p><em>New in Pygments 0.10.</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Short names:</th><td class="field-body">xslt</td> </tr> <tr class="field"><th class="field-name">Filename patterns:</th><td class="field-body">*.xsl, *.xslt</td> </tr> <tr class="field"><th class="field-name">Mimetypes:</th><td class="field-body">text/xml, application/xml, image/svg+xml, application/rss+xml, application/atom+xml, application/xsl+xml, application/xslt+xml</td> </tr> </tbody> </table> </blockquote> </div> <div class="section" id="iterating-over-all-lexers"> <h3>Iterating over all lexers</h3> <p><em>New in Pygments 0.6.</em></p> <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="syntax"><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> <p>As you can see, the return value is an iterator which yields tuples in the form <tt class="docutils literal">(name, aliases, filetypes, mimetypes)</tt>.</p> </div> </div> </body> <!-- generated on: 2010-03-01 21:18:17.323492 file id: lexers --> </html>