PageRenderTime 29ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/crunchy/pygments3/lexers/_mapping.py

http://crunchy.googlecode.com/
Python | 217 lines | 199 code | 3 blank | 15 comment | 4 complexity | 9fdb0f19a040ed8790dbfdafa0887d17 MD5 | raw file
Possible License(s): BSD-3-Clause
  1. # -*- coding: utf-8 -*-
  2. """
  3. pygments3.lexers._mapping
  4. ~~~~~~~~~~~~~~~~~~~~~~~~
  5. Lexer mapping defintions. This file is generated by itself. Everytime
  6. you change something on a builtin lexer defintion, run this script from
  7. the lexers folder to update it.
  8. Do not alter the LEXERS dictionary by hand.
  9. :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
  10. :license: BSD, see LICENSE for details.
  11. """
  12. LEXERS = {
  13. 'ABAPLexer': ('pygments3.lexers.other', 'ABAP', ('abap',), ('*.abap',), ('text/x-abap',)),
  14. 'ActionScript3Lexer': ('pygments3.lexers.web', 'ActionScript 3', ('as3', 'actionscript3'), ('*.as',), ('application/x-actionscript', 'text/x-actionscript', 'text/actionscript')),
  15. 'ActionScriptLexer': ('pygments3.lexers.web', 'ActionScript', ('as', 'actionscript'), ('*.as',), ('application/x-actionscript', 'text/x-actionscript', 'text/actionscript')),
  16. 'AntlrActionScriptLexer': ('pygments3.lexers.parsers', 'ANTLR With ActionScript Target', ('antlr-as', 'antlr-actionscript'), ('*.G', '*.g'), ()),
  17. 'AntlrCSharpLexer': ('pygments3.lexers.parsers', 'ANTLR With C# Target', ('antlr-csharp', 'antlr-c#'), ('*.G', '*.g'), ()),
  18. 'AntlrCppLexer': ('pygments3.lexers.parsers', 'ANTLR With CPP Target', ('antlr-cpp',), ('*.G', '*.g'), ()),
  19. 'AntlrJavaLexer': ('pygments3.lexers.parsers', 'ANTLR With Java Target', ('antlr-java',), ('*.G', '*.g'), ()),
  20. 'AntlrLexer': ('pygments3.lexers.parsers', 'ANTLR', ('antlr',), (), ()),
  21. 'AntlrObjectiveCLexer': ('pygments3.lexers.parsers', 'ANTLR With ObjectiveC Target', ('antlr-objc',), ('*.G', '*.g'), ()),
  22. 'AntlrPerlLexer': ('pygments3.lexers.parsers', 'ANTLR With Perl Target', ('antlr-perl',), ('*.G', '*.g'), ()),
  23. 'AntlrPythonLexer': ('pygments3.lexers.parsers', 'ANTLR With Python Target', ('antlr-python',), ('*.G', '*.g'), ()),
  24. 'AntlrRubyLexer': ('pygments3.lexers.parsers', 'ANTLR With Ruby Target', ('antlr-ruby', 'antlr-rb'), ('*.G', '*.g'), ()),
  25. 'ApacheConfLexer': ('pygments3.lexers.text', 'ApacheConf', ('apacheconf', 'aconf', 'apache'), ('.htaccess', 'apache.conf', 'apache2.conf'), ('text/x-apacheconf',)),
  26. 'AppleScriptLexer': ('pygments3.lexers.other', 'AppleScript', ('applescript',), ('*.applescript',), ()),
  27. 'BBCodeLexer': ('pygments3.lexers.text', 'BBCode', ('bbcode',), (), ('text/x-bbcode',)),
  28. 'BaseMakefileLexer': ('pygments3.lexers.text', 'Makefile', ('basemake',), (), ()),
  29. 'BashLexer': ('pygments3.lexers.other', 'Bash', ('bash', 'sh'), ('*.sh',), ('application/x-sh', 'application/x-shellscript')),
  30. 'BashSessionLexer': ('pygments3.lexers.other', 'Bash Session', ('console',), ('*.sh-session',), ('application/x-shell-session',)),
  31. 'BatchLexer': ('pygments3.lexers.other', 'Batchfile', ('bat',), ('*.bat', '*.cmd'), ('application/x-dos-batch',)),
  32. 'BefungeLexer': ('pygments3.lexers.other', 'Befunge', ('befunge',), ('*.befunge',), ('application/x-befunge',)),
  33. 'BooLexer': ('pygments3.lexers.dotnet', 'Boo', ('boo',), ('*.boo',), ('text/x-boo',)),
  34. 'BrainfuckLexer': ('pygments3.lexers.other', 'Brainfuck', ('brainfuck', 'bf'), ('*.bf', '*.b'), ('application/x-brainfuck',)),
  35. 'CLexer': ('pygments3.lexers.compiled', 'C', ('c',), ('*.c', '*.h'), ('text/x-chdr', 'text/x-csrc')),
  36. 'CObjdumpLexer': ('pygments3.lexers.asm', 'c-objdump', ('c-objdump',), ('*.c-objdump',), ('text/x-c-objdump',)),
  37. 'CSharpAspxLexer': ('pygments3.lexers.dotnet', 'aspx-cs', ('aspx-cs',), ('*.aspx', '*.asax', '*.ascx', '*.ashx', '*.asmx', '*.axd'), ()),
  38. 'CSharpLexer': ('pygments3.lexers.dotnet', 'C#', ('csharp', 'c#'), ('*.cs',), ('text/x-csharp',)),
  39. 'CheetahHtmlLexer': ('pygments3.lexers.templates', 'HTML+Cheetah', ('html+cheetah', 'html+spitfire'), (), ('text/html+cheetah', 'text/html+spitfire')),
  40. 'CheetahJavascriptLexer': ('pygments3.lexers.templates', 'JavaScript+Cheetah', ('js+cheetah', 'javascript+cheetah', 'js+spitfire', 'javascript+spitfire'), (), ('application/x-javascript+cheetah', 'text/x-javascript+cheetah', 'text/javascript+cheetah', 'application/x-javascript+spitfire', 'text/x-javascript+spitfire', 'text/javascript+spitfire')),
  41. 'CheetahLexer': ('pygments3.lexers.templates', 'Cheetah', ('cheetah', 'spitfire'), ('*.tmpl', '*.spt'), ('application/x-cheetah', 'application/x-spitfire')),
  42. 'CheetahXmlLexer': ('pygments3.lexers.templates', 'XML+Cheetah', ('xml+cheetah', 'xml+spitfire'), (), ('application/xml+cheetah', 'application/xml+spitfire')),
  43. 'ClojureLexer': ('pygments3.lexers.agile', 'Clojure', ('clojure', 'clj'), ('*.clj',), ('text/x-clojure', 'application/x-clojure')),
  44. 'CommonLispLexer': ('pygments3.lexers.functional', 'Common Lisp', ('common-lisp', 'cl'), ('*.cl', '*.lisp', '*.el'), ('text/x-common-lisp',)),
  45. 'CppLexer': ('pygments3.lexers.compiled', 'C++', ('cpp', 'c++'), ('*.cpp', '*.hpp', '*.c++', '*.h++', '*.cc', '*.hh', '*.cxx', '*.hxx'), ('text/x-c++hdr', 'text/x-c++src')),
  46. 'CppObjdumpLexer': ('pygments3.lexers.asm', 'cpp-objdump', ('cpp-objdump', 'c++-objdumb', 'cxx-objdump'), ('*.cpp-objdump', '*.c++-objdump', '*.cxx-objdump'), ('text/x-cpp-objdump',)),
  47. 'CssDjangoLexer': ('pygments3.lexers.templates', 'CSS+Django/Jinja', ('css+django', 'css+jinja'), (), ('text/css+django', 'text/css+jinja')),
  48. 'CssErbLexer': ('pygments3.lexers.templates', 'CSS+Ruby', ('css+erb', 'css+ruby'), (), ('text/css+ruby',)),
  49. 'CssGenshiLexer': ('pygments3.lexers.templates', 'CSS+Genshi Text', ('css+genshitext', 'css+genshi'), (), ('text/css+genshi',)),
  50. 'CssLexer': ('pygments3.lexers.web', 'CSS', ('css',), ('*.css',), ('text/css',)),
  51. 'CssPhpLexer': ('pygments3.lexers.templates', 'CSS+PHP', ('css+php',), (), ('text/css+php',)),
  52. 'CssSmartyLexer': ('pygments3.lexers.templates', 'CSS+Smarty', ('css+smarty',), (), ('text/css+smarty',)),
  53. 'CythonLexer': ('pygments3.lexers.compiled', 'Cython', ('cython', 'pyx'), ('*.pyx', '*.pxd', '*.pxi'), ('text/x-cython', 'application/x-cython')),
  54. 'DLexer': ('pygments3.lexers.compiled', 'D', ('d',), ('*.d', '*.di'), ('text/x-dsrc',)),
  55. 'DObjdumpLexer': ('pygments3.lexers.asm', 'd-objdump', ('d-objdump',), ('*.d-objdump',), ('text/x-d-objdump',)),
  56. 'DarcsPatchLexer': ('pygments3.lexers.text', 'Darcs Patch', ('dpatch',), ('*.dpatch', '*.darcspatch'), ()),
  57. 'DebianControlLexer': ('pygments3.lexers.text', 'Debian Control file', ('control',), ('control',), ()),
  58. 'DelphiLexer': ('pygments3.lexers.compiled', 'Delphi', ('delphi', 'pas', 'pascal', 'objectpascal'), ('*.pas',), ('text/x-pascal',)),
  59. 'DiffLexer': ('pygments3.lexers.text', 'Diff', ('diff', 'udiff'), ('*.diff', '*.patch'), ('text/x-diff', 'text/x-patch')),
  60. 'DjangoLexer': ('pygments3.lexers.templates', 'Django/Jinja', ('django', 'jinja'), (), ('application/x-django-templating', 'application/x-jinja')),
  61. 'DylanLexer': ('pygments3.lexers.compiled', 'Dylan', ('dylan',), ('*.dylan',), ('text/x-dylan',)),
  62. 'ErbLexer': ('pygments3.lexers.templates', 'ERB', ('erb',), (), ('application/x-ruby-templating',)),
  63. 'ErlangLexer': ('pygments3.lexers.functional', 'Erlang', ('erlang',), ('*.erl', '*.hrl'), ('text/x-erlang',)),
  64. 'ErlangShellLexer': ('pygments3.lexers.functional', 'Erlang erl session', ('erl',), ('*.erl-sh',), ('text/x-erl-shellsession',)),
  65. 'EvoqueHtmlLexer': ('pygments3.lexers.templates', 'HTML+Evoque', ('html+evoque',), ('*.html',), ('text/html+evoque',)),
  66. 'EvoqueLexer': ('pygments3.lexers.templates', 'Evoque', ('evoque',), ('*.evoque',), ('application/x-evoque',)),
  67. 'EvoqueXmlLexer': ('pygments3.lexers.templates', 'XML+Evoque', ('xml+evoque',), ('*.xml',), ('application/xml+evoque',)),
  68. 'FortranLexer': ('pygments3.lexers.compiled', 'Fortran', ('fortran',), ('*.f', '*.f90'), ('text/x-fortran',)),
  69. 'GLShaderLexer': ('pygments3.lexers.compiled', 'GLSL', ('glsl',), ('*.vert', '*.frag', '*.geo'), ('text/x-glslsrc',)),
  70. 'GasLexer': ('pygments3.lexers.asm', 'GAS', ('gas',), ('*.s', '*.S'), ('text/x-gas',)),
  71. 'GenshiLexer': ('pygments3.lexers.templates', 'Genshi', ('genshi', 'kid', 'xml+genshi', 'xml+kid'), ('*.kid',), ('application/x-genshi', 'application/x-kid')),
  72. 'GenshiTextLexer': ('pygments3.lexers.templates', 'Genshi Text', ('genshitext',), (), ('application/x-genshi-text', 'text/x-genshi')),
  73. 'GettextLexer': ('pygments3.lexers.text', 'Gettext Catalog', ('pot', 'po'), ('*.pot', '*.po'), ('application/x-gettext', 'text/x-gettext', 'text/gettext')),
  74. 'GnuplotLexer': ('pygments3.lexers.other', 'Gnuplot', ('gnuplot',), ('*.plot', '*.plt'), ('text/x-gnuplot',)),
  75. 'GroffLexer': ('pygments3.lexers.text', 'Groff', ('groff', 'nroff', 'man'), ('*.[1234567]', '*.man'), ('application/x-troff', 'text/troff')),
  76. 'HaskellLexer': ('pygments3.lexers.functional', 'Haskell', ('haskell', 'hs'), ('*.hs',), ('text/x-haskell',)),
  77. 'HtmlDjangoLexer': ('pygments3.lexers.templates', 'HTML+Django/Jinja', ('html+django', 'html+jinja'), (), ('text/html+django', 'text/html+jinja')),
  78. 'HtmlGenshiLexer': ('pygments3.lexers.templates', 'HTML+Genshi', ('html+genshi', 'html+kid'), (), ('text/html+genshi',)),
  79. 'HtmlLexer': ('pygments3.lexers.web', 'HTML', ('html',), ('*.html', '*.htm', '*.xhtml', '*.xslt'), ('text/html', 'application/xhtml+xml')),
  80. 'HtmlPhpLexer': ('pygments3.lexers.templates', 'HTML+PHP', ('html+php',), ('*.phtml',), ('application/x-php', 'application/x-httpd-php', 'application/x-httpd-php3', 'application/x-httpd-php4', 'application/x-httpd-php5')),
  81. 'HtmlSmartyLexer': ('pygments3.lexers.templates', 'HTML+Smarty', ('html+smarty',), (), ('text/html+smarty',)),
  82. 'IniLexer': ('pygments3.lexers.text', 'INI', ('ini', 'cfg'), ('*.ini', '*.cfg', '*.properties'), ('text/x-ini',)),
  83. 'IoLexer': ('pygments3.lexers.agile', 'Io', ('io',), ('*.io',), ('text/x-iosrc',)),
  84. 'IrcLogsLexer': ('pygments3.lexers.text', 'IRC logs', ('irc',), ('*.weechatlog',), ('text/x-irclog',)),
  85. 'JavaLexer': ('pygments3.lexers.compiled', 'Java', ('java',), ('*.java',), ('text/x-java',)),
  86. 'JavascriptDjangoLexer': ('pygments3.lexers.templates', 'JavaScript+Django/Jinja', ('js+django', 'javascript+django', 'js+jinja', 'javascript+jinja'), (), ('application/x-javascript+django', 'application/x-javascript+jinja', 'text/x-javascript+django', 'text/x-javascript+jinja', 'text/javascript+django', 'text/javascript+jinja')),
  87. 'JavascriptErbLexer': ('pygments3.lexers.templates', 'JavaScript+Ruby', ('js+erb', 'javascript+erb', 'js+ruby', 'javascript+ruby'), (), ('application/x-javascript+ruby', 'text/x-javascript+ruby', 'text/javascript+ruby')),
  88. 'JavascriptGenshiLexer': ('pygments3.lexers.templates', 'JavaScript+Genshi Text', ('js+genshitext', 'js+genshi', 'javascript+genshitext', 'javascript+genshi'), (), ('application/x-javascript+genshi', 'text/x-javascript+genshi', 'text/javascript+genshi')),
  89. 'JavascriptLexer': ('pygments3.lexers.web', 'JavaScript', ('js', 'javascript'), ('*.js',), ('application/x-javascript', 'text/x-javascript', 'text/javascript')),
  90. 'JavascriptPhpLexer': ('pygments3.lexers.templates', 'JavaScript+PHP', ('js+php', 'javascript+php'), (), ('application/x-javascript+php', 'text/x-javascript+php', 'text/javascript+php')),
  91. 'JavascriptSmartyLexer': ('pygments3.lexers.templates', 'JavaScript+Smarty', ('js+smarty', 'javascript+smarty'), (), ('application/x-javascript+smarty', 'text/x-javascript+smarty', 'text/javascript+smarty')),
  92. 'JspLexer': ('pygments3.lexers.templates', 'Java Server Page', ('jsp',), ('*.jsp',), ('application/x-jsp',)),
  93. 'LighttpdConfLexer': ('pygments3.lexers.text', 'Lighttpd configuration file', ('lighty', 'lighttpd'), (), ('text/x-lighttpd-conf',)),
  94. 'LiterateHaskellLexer': ('pygments3.lexers.functional', 'Literate Haskell', ('lhs', 'literate-haskell'), ('*.lhs',), ('text/x-literate-haskell',)),
  95. 'LlvmLexer': ('pygments3.lexers.asm', 'LLVM', ('llvm',), ('*.ll',), ('text/x-llvm',)),
  96. 'LogtalkLexer': ('pygments3.lexers.other', 'Logtalk', ('logtalk',), ('*.lgt',), ('text/x-logtalk',)),
  97. 'LuaLexer': ('pygments3.lexers.agile', 'Lua', ('lua',), ('*.lua',), ('text/x-lua', 'application/x-lua')),
  98. 'MOOCodeLexer': ('pygments3.lexers.other', 'MOOCode', ('moocode',), ('*.moo',), ('text/x-moocode',)),
  99. 'MakefileLexer': ('pygments3.lexers.text', 'Makefile', ('make', 'makefile', 'mf', 'bsdmake'), ('*.mak', 'Makefile', 'makefile', 'Makefile.*', 'GNUmakefile'), ('text/x-makefile',)),
  100. 'MakoCssLexer': ('pygments3.lexers.templates', 'CSS+Mako', ('css+mako',), (), ('text/css+mako',)),
  101. 'MakoHtmlLexer': ('pygments3.lexers.templates', 'HTML+Mako', ('html+mako',), (), ('text/html+mako',)),
  102. 'MakoJavascriptLexer': ('pygments3.lexers.templates', 'JavaScript+Mako', ('js+mako', 'javascript+mako'), (), ('application/x-javascript+mako', 'text/x-javascript+mako', 'text/javascript+mako')),
  103. 'MakoLexer': ('pygments3.lexers.templates', 'Mako', ('mako',), ('*.mao',), ('application/x-mako',)),
  104. 'MakoXmlLexer': ('pygments3.lexers.templates', 'XML+Mako', ('xml+mako',), (), ('application/xml+mako',)),
  105. 'MatlabLexer': ('pygments3.lexers.math', 'Matlab', ('matlab', 'octave'), ('*.m',), ('text/matlab',)),
  106. 'MatlabSessionLexer': ('pygments3.lexers.math', 'Matlab session', ('matlabsession',), (), ()),
  107. 'MiniDLexer': ('pygments3.lexers.agile', 'MiniD', ('minid',), ('*.md',), ('text/x-minidsrc',)),
  108. 'ModelicaLexer': ('pygments3.lexers.other', 'Modelica', ('modelica',), ('*.mo',), ('text/x-modelica',)),
  109. 'MoinWikiLexer': ('pygments3.lexers.text', 'MoinMoin/Trac Wiki markup', ('trac-wiki', 'moin'), (), ('text/x-trac-wiki',)),
  110. 'MuPADLexer': ('pygments3.lexers.math', 'MuPAD', ('mupad',), ('*.mu',), ()),
  111. 'MxmlLexer': ('pygments3.lexers.web', 'MXML', ('mxml',), ('*.mxml',), ()),
  112. 'MySqlLexer': ('pygments3.lexers.other', 'MySQL', ('mysql',), (), ('text/x-mysql',)),
  113. 'MyghtyCssLexer': ('pygments3.lexers.templates', 'CSS+Myghty', ('css+myghty',), (), ('text/css+myghty',)),
  114. 'MyghtyHtmlLexer': ('pygments3.lexers.templates', 'HTML+Myghty', ('html+myghty',), (), ('text/html+myghty',)),
  115. 'MyghtyJavascriptLexer': ('pygments3.lexers.templates', 'JavaScript+Myghty', ('js+myghty', 'javascript+myghty'), (), ('application/x-javascript+myghty', 'text/x-javascript+myghty', 'text/javascript+mygthy')),
  116. 'MyghtyLexer': ('pygments3.lexers.templates', 'Myghty', ('myghty',), ('*.myt', 'autodelegate'), ('application/x-myghty',)),
  117. 'MyghtyXmlLexer': ('pygments3.lexers.templates', 'XML+Myghty', ('xml+myghty',), (), ('application/xml+myghty',)),
  118. 'NasmLexer': ('pygments3.lexers.asm', 'NASM', ('nasm',), ('*.asm', '*.ASM'), ('text/x-nasm',)),
  119. 'NginxConfLexer': ('pygments3.lexers.text', 'Nginx configuration file', ('nginx',), (), ('text/x-nginx-conf',)),
  120. 'NumPyLexer': ('pygments3.lexers.math', 'NumPy', ('numpy',), (), ()),
  121. 'ObjdumpLexer': ('pygments3.lexers.asm', 'objdump', ('objdump',), ('*.objdump',), ('text/x-objdump',)),
  122. 'ObjectiveCLexer': ('pygments3.lexers.compiled', 'Objective-C', ('objective-c', 'objectivec', 'obj-c', 'objc'), ('*.m',), ('text/x-objective-c',)),
  123. 'OcamlLexer': ('pygments3.lexers.compiled', 'OCaml', ('ocaml',), ('*.ml', '*.mli', '*.mll', '*.mly'), ('text/x-ocaml',)),
  124. 'OcamlLexer': ('pygments3.lexers.functional', 'OCaml', ('ocaml',), ('*.ml', '*.mli', '*.mll', '*.mly'), ('text/x-ocaml',)),
  125. 'PerlLexer': ('pygments3.lexers.agile', 'Perl', ('perl', 'pl'), ('*.pl', '*.pm'), ('text/x-perl', 'application/x-perl')),
  126. 'PhpLexer': ('pygments3.lexers.web', 'PHP', ('php', 'php3', 'php4', 'php5'), ('*.php', '*.php[345]'), ('text/x-php',)),
  127. 'PovrayLexer': ('pygments3.lexers.other', 'POVRay', ('pov',), ('*.pov', '*.inc'), ('text/x-povray',)),
  128. 'PrologLexer': ('pygments3.lexers.compiled', 'Prolog', ('prolog',), ('*.prolog', '*.pro', '*.pl'), ('text/x-prolog',)),
  129. 'Python3Lexer': ('pygments3.lexers.agile', 'Python 3', ('python3', 'py3'), (), ('text/x-python3', 'application/x-python3')),
  130. 'Python3TracebackLexer': ('pygments3.lexers.agile', 'Python 3.0 Traceback', ('py3tb',), ('*.py3tb',), ('text/x-python3-traceback',)),
  131. 'PythonConsoleLexer': ('pygments3.lexers.agile', 'Python console session', ('pycon',), (), ('text/x-python-doctest',)),
  132. 'PythonLexer': ('pygments3.lexers.agile', 'Python', ('python', 'py'), ('*.py', '*.pyw', '*.sc', 'SConstruct', 'SConscript'), ('text/x-python', 'application/x-python')),
  133. 'PythonTracebackLexer': ('pygments3.lexers.agile', 'Python Traceback', ('pytb',), ('*.pytb',), ('text/x-python-traceback',)),
  134. 'RagelCLexer': ('pygments3.lexers.parsers', 'Ragel in C Host', ('ragel-c',), ('*.rl',), ()),
  135. 'RagelCppLexer': ('pygments3.lexers.parsers', 'Ragel in CPP Host', ('ragel-cpp',), ('*.rl',), ()),
  136. 'RagelDLexer': ('pygments3.lexers.parsers', 'Ragel in D Host', ('ragel-d',), ('*.rl',), ()),
  137. 'RagelEmbeddedLexer': ('pygments3.lexers.parsers', 'Embedded Ragel', ('ragel-em',), ('*.rl',), ()),
  138. 'RagelJavaLexer': ('pygments3.lexers.parsers', 'Ragel in Java Host', ('ragel-java',), ('*.rl',), ()),
  139. 'RagelLexer': ('pygments3.lexers.parsers', 'Ragel', ('ragel',), (), ()),
  140. 'RagelObjectiveCLexer': ('pygments3.lexers.parsers', 'Ragel in Objective C Host', ('ragel-objc',), ('*.rl',), ()),
  141. 'RagelRubyLexer': ('pygments3.lexers.parsers', 'Ragel in Ruby Host', ('ragel-ruby', 'ragel-rb'), ('*.rl',), ()),
  142. 'RawTokenLexer': ('pygments3.lexers.special', 'Raw token data', ('raw',), (), ('application/x-pygments3-tokens',)),
  143. 'RebolLexer': ('pygments3.lexers.other', 'REBOL', ('rebol',), ('*.r', '*.r3'), ('text/x-rebol',)),
  144. 'RedcodeLexer': ('pygments3.lexers.other', 'Redcode', ('redcode',), ('*.cw',), ()),
  145. 'RhtmlLexer': ('pygments3.lexers.templates', 'RHTML', ('rhtml', 'html+erb', 'html+ruby'), ('*.rhtml',), ('text/html+ruby',)),
  146. 'RstLexer': ('pygments3.lexers.text', 'reStructuredText', ('rst', 'rest', 'restructuredtext'), ('*.rst', '*.rest'), ('text/x-rst', 'text/prs.fallenstein.rst')),
  147. 'RubyConsoleLexer': ('pygments3.lexers.agile', 'Ruby irb session', ('rbcon', 'irb'), (), ('text/x-ruby-shellsession',)),
  148. 'RubyLexer': ('pygments3.lexers.agile', 'Ruby', ('rb', 'ruby'), ('*.rb', '*.rbw', 'Rakefile', '*.rake', '*.gemspec', '*.rbx'), ('text/x-ruby', 'application/x-ruby')),
  149. 'SLexer': ('pygments3.lexers.math', 'S', ('splus', 's', 'r'), ('*.S', '*.R'), ('text/S-plus', 'text/S', 'text/R')),
  150. 'ScalaLexer': ('pygments3.lexers.compiled', 'Scala', ('scala',), ('*.scala',), ('text/x-scala',)),
  151. 'SchemeLexer': ('pygments3.lexers.functional', 'Scheme', ('scheme', 'scm'), ('*.scm',), ('text/x-scheme', 'application/x-scheme')),
  152. 'SmalltalkLexer': ('pygments3.lexers.other', 'Smalltalk', ('smalltalk', 'squeak'), ('*.st',), ('text/x-smalltalk',)),
  153. 'SmartyLexer': ('pygments3.lexers.templates', 'Smarty', ('smarty',), ('*.tpl',), ('application/x-smarty',)),
  154. 'SourcesListLexer': ('pygments3.lexers.text', 'Debian Sourcelist', ('sourceslist', 'sources.list'), ('sources.list',), ()),
  155. 'SqlLexer': ('pygments3.lexers.other', 'SQL', ('sql',), ('*.sql',), ('text/x-sql',)),
  156. 'SqliteConsoleLexer': ('pygments3.lexers.other', 'sqlite3con', ('sqlite3',), ('*.sqlite3-console',), ('text/x-sqlite3-console',)),
  157. 'SquidConfLexer': ('pygments3.lexers.text', 'SquidConf', ('squidconf', 'squid.conf', 'squid'), ('squid.conf',), ('text/x-squidconf',)),
  158. 'TclLexer': ('pygments3.lexers.agile', 'Tcl', ('tcl',), ('*.tcl',), ('text/x-tcl', 'text/x-script.tcl', 'application/x-tcl')),
  159. 'TcshLexer': ('pygments3.lexers.other', 'Tcsh', ('tcsh', 'csh'), ('*.tcsh', '*.csh'), ('application/x-csh',)),
  160. 'TexLexer': ('pygments3.lexers.text', 'TeX', ('tex', 'latex'), ('*.tex', '*.aux', '*.toc'), ('text/x-tex', 'text/x-latex')),
  161. 'TextLexer': ('pygments3.lexers.special', 'Text only', ('text',), ('*.txt',), ('text/plain',)),
  162. 'ValaLexer': ('pygments3.lexers.compiled', 'Vala', ('vala', 'vapi'), ('*.vala', '*.vapi'), ('text/x-vala',)),
  163. 'VbNetAspxLexer': ('pygments3.lexers.dotnet', 'aspx-vb', ('aspx-vb',), ('*.aspx', '*.asax', '*.ascx', '*.ashx', '*.asmx', '*.axd'), ()),
  164. 'VbNetLexer': ('pygments3.lexers.dotnet', 'VB.net', ('vb.net', 'vbnet'), ('*.vb', '*.bas'), ('text/x-vbnet', 'text/x-vba')),
  165. 'VimLexer': ('pygments3.lexers.text', 'VimL', ('vim',), ('*.vim', '.vimrc'), ('text/x-vim',)),
  166. 'XmlDjangoLexer': ('pygments3.lexers.templates', 'XML+Django/Jinja', ('xml+django', 'xml+jinja'), (), ('application/xml+django', 'application/xml+jinja')),
  167. 'XmlErbLexer': ('pygments3.lexers.templates', 'XML+Ruby', ('xml+erb', 'xml+ruby'), (), ('application/xml+ruby',)),
  168. 'XmlLexer': ('pygments3.lexers.web', 'XML', ('xml',), ('*.xml', '*.xsl', '*.rss', '*.xslt', '*.xsd', '*.wsdl'), ('text/xml', 'application/xml', 'image/svg+xml', 'application/rss+xml', 'application/atom+xml', 'application/xsl+xml', 'application/xslt+xml')),
  169. 'XmlPhpLexer': ('pygments3.lexers.templates', 'XML+PHP', ('xml+php',), (), ('application/xml+php',)),
  170. 'XmlSmartyLexer': ('pygments3.lexers.templates', 'XML+Smarty', ('xml+smarty',), (), ('application/xml+smarty',)),
  171. 'XsltLexer': ('pygments3.lexers.web', 'XSLT', ('xslt',), ('*.xsl', '*.xslt'), ('text/xml', 'application/xml', 'image/svg+xml', 'application/rss+xml', 'application/atom+xml', 'application/xsl+xml', 'application/xslt+xml')),
  172. 'YamlLexer': ('pygments3.lexers.text', 'YAML', ('yaml',), ('*.yaml', '*.yml'), ('text/x-yaml',))
  173. }
  174. if __name__ == '__main__':
  175. import sys
  176. import os
  177. # lookup lexers
  178. found_lexers = []
  179. sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..'))
  180. for filename in os.listdir('.'):
  181. if filename.endswith('.py') and not filename.startswith('_'):
  182. module_name = 'pygments3.lexers.%s' % filename[:-3]
  183. print(module_name)
  184. module = __import__(module_name, None, None, [''])
  185. for lexer_name in module.__all__:
  186. lexer = getattr(module, lexer_name)
  187. found_lexers.append(
  188. '%r: %r' % (lexer_name,
  189. (module_name,
  190. lexer.name,
  191. tuple(lexer.aliases),
  192. tuple(lexer.filenames),
  193. tuple(lexer.mimetypes))))
  194. # sort them, that should make the diff files for svn smaller
  195. found_lexers.sort()
  196. # extract useful sourcecode from this file
  197. f = open(__file__)
  198. try:
  199. content = f.read()
  200. finally:
  201. f.close()
  202. header = content[:content.find('LEXERS = {')]
  203. footer = content[content.find("if __name__ == '__main__':"):]
  204. # write new file
  205. f = open(__file__, 'w')
  206. f.write(header)
  207. f.write('LEXERS = {\n %s\n}\n\n' % ',\n '.join(found_lexers))
  208. f.write(footer)
  209. f.close()