pygments.rb 0.3.7 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. data/CHANGELOG +9 -0
  2. data/CHANGELOG.md +6 -0
  3. data/LICENSE +1 -1
  4. data/README.md +1 -1
  5. data/lexers +0 -0
  6. data/lib/pygments/version.rb +1 -1
  7. data/test/test_pygments.rb +0 -1
  8. data/vendor/pygments-main/AUTHORS +14 -1
  9. data/vendor/pygments-main/CHANGES +56 -6
  10. data/vendor/pygments-main/LICENSE +1 -1
  11. data/vendor/pygments-main/Makefile +1 -1
  12. data/vendor/pygments-main/REVISION +1 -0
  13. data/vendor/pygments-main/docs/generate.py +1 -1
  14. data/vendor/pygments-main/docs/src/api.txt +1 -1
  15. data/vendor/pygments-main/docs/src/index.txt +1 -1
  16. data/vendor/pygments-main/docs/src/integrate.txt +5 -0
  17. data/vendor/pygments-main/docs/src/java.txt +70 -0
  18. data/vendor/pygments-main/external/autopygmentize +64 -0
  19. data/vendor/pygments-main/external/markdown-processor.py +2 -2
  20. data/vendor/pygments-main/external/moin-parser.py +1 -1
  21. data/vendor/pygments-main/external/rst-directive-old.py +1 -1
  22. data/vendor/pygments-main/external/rst-directive.py +1 -1
  23. data/vendor/pygments-main/pygments/__init__.py +2 -2
  24. data/vendor/pygments-main/pygments/cmdline.py +14 -6
  25. data/vendor/pygments-main/pygments/console.py +1 -1
  26. data/vendor/pygments-main/pygments/filter.py +1 -1
  27. data/vendor/pygments-main/pygments/filters/__init__.py +1 -1
  28. data/vendor/pygments-main/pygments/formatter.py +1 -1
  29. data/vendor/pygments-main/pygments/formatters/__init__.py +1 -1
  30. data/vendor/pygments-main/pygments/formatters/_mapping.py +1 -1
  31. data/vendor/pygments-main/pygments/formatters/bbcode.py +1 -1
  32. data/vendor/pygments-main/pygments/formatters/html.py +73 -2
  33. data/vendor/pygments-main/pygments/formatters/img.py +1 -1
  34. data/vendor/pygments-main/pygments/formatters/latex.py +1 -1
  35. data/vendor/pygments-main/pygments/formatters/other.py +1 -1
  36. data/vendor/pygments-main/pygments/formatters/rtf.py +1 -1
  37. data/vendor/pygments-main/pygments/formatters/svg.py +1 -1
  38. data/vendor/pygments-main/pygments/formatters/terminal.py +1 -1
  39. data/vendor/pygments-main/pygments/formatters/terminal256.py +1 -1
  40. data/vendor/pygments-main/pygments/lexer.py +76 -12
  41. data/vendor/pygments-main/pygments/lexers/__init__.py +2 -2
  42. data/vendor/pygments-main/pygments/lexers/_asybuiltins.py +1 -1
  43. data/vendor/pygments-main/pygments/lexers/_clbuiltins.py +1 -1
  44. data/vendor/pygments-main/pygments/lexers/_lassobuiltins.py +4 -1
  45. data/vendor/pygments-main/pygments/lexers/_luabuiltins.py +1 -1
  46. data/vendor/pygments-main/pygments/lexers/_mapping.py +26 -10
  47. data/vendor/pygments-main/pygments/lexers/_openedgebuiltins.py +11 -0
  48. data/vendor/pygments-main/pygments/lexers/_phpbuiltins.py +2 -2
  49. data/vendor/pygments-main/pygments/lexers/_postgres_builtins.py +4 -2
  50. data/vendor/pygments-main/pygments/lexers/_robotframeworklexer.py +14 -3
  51. data/vendor/pygments-main/pygments/lexers/_scilab_builtins.py +11 -0
  52. data/vendor/pygments-main/pygments/lexers/_sourcemodbuiltins.py +2 -2
  53. data/vendor/pygments-main/pygments/lexers/_stan_builtins.py +6 -6
  54. data/vendor/pygments-main/pygments/lexers/agile.py +6 -4
  55. data/vendor/pygments-main/pygments/lexers/asm.py +40 -2
  56. data/vendor/pygments-main/pygments/lexers/compiled.py +751 -438
  57. data/vendor/pygments-main/pygments/lexers/dalvik.py +2 -2
  58. data/vendor/pygments-main/pygments/lexers/dotnet.py +1 -1
  59. data/vendor/pygments-main/pygments/lexers/foxpro.py +428 -0
  60. data/vendor/pygments-main/pygments/lexers/functional.py +6 -5
  61. data/vendor/pygments-main/pygments/lexers/hdl.py +3 -3
  62. data/vendor/pygments-main/pygments/lexers/jvm.py +130 -16
  63. data/vendor/pygments-main/pygments/lexers/math.py +250 -9
  64. data/vendor/pygments-main/pygments/lexers/other.py +518 -13
  65. data/vendor/pygments-main/pygments/lexers/parsers.py +3 -2
  66. data/vendor/pygments-main/pygments/lexers/shell.py +48 -2
  67. data/vendor/pygments-main/pygments/lexers/special.py +1 -1
  68. data/vendor/pygments-main/pygments/lexers/sql.py +1 -1
  69. data/vendor/pygments-main/pygments/lexers/templates.py +7 -6
  70. data/vendor/pygments-main/pygments/lexers/text.py +9 -9
  71. data/vendor/pygments-main/pygments/lexers/web.py +264 -51
  72. data/vendor/pygments-main/pygments/plugin.py +1 -1
  73. data/vendor/pygments-main/pygments/scanner.py +1 -1
  74. data/vendor/pygments-main/pygments/style.py +1 -1
  75. data/vendor/pygments-main/pygments/styles/__init__.py +1 -1
  76. data/vendor/pygments-main/pygments/styles/autumn.py +1 -1
  77. data/vendor/pygments-main/pygments/styles/borland.py +1 -1
  78. data/vendor/pygments-main/pygments/styles/bw.py +1 -1
  79. data/vendor/pygments-main/pygments/styles/colorful.py +1 -1
  80. data/vendor/pygments-main/pygments/styles/default.py +1 -1
  81. data/vendor/pygments-main/pygments/styles/emacs.py +1 -1
  82. data/vendor/pygments-main/pygments/styles/friendly.py +1 -1
  83. data/vendor/pygments-main/pygments/styles/fruity.py +1 -1
  84. data/vendor/pygments-main/pygments/styles/manni.py +1 -1
  85. data/vendor/pygments-main/pygments/styles/monokai.py +1 -1
  86. data/vendor/pygments-main/pygments/styles/murphy.py +1 -1
  87. data/vendor/pygments-main/pygments/styles/native.py +1 -1
  88. data/vendor/pygments-main/pygments/styles/pastie.py +1 -1
  89. data/vendor/pygments-main/pygments/styles/perldoc.py +1 -1
  90. data/vendor/pygments-main/pygments/styles/rrt.py +1 -1
  91. data/vendor/pygments-main/pygments/styles/tango.py +1 -1
  92. data/vendor/pygments-main/pygments/styles/trac.py +1 -1
  93. data/vendor/pygments-main/pygments/styles/vim.py +1 -1
  94. data/vendor/pygments-main/pygments/styles/vs.py +1 -1
  95. data/vendor/pygments-main/pygments/token.py +1 -1
  96. data/vendor/pygments-main/pygments/unistring.py +1 -1
  97. data/vendor/pygments-main/pygments/util.py +1 -1
  98. data/vendor/pygments-main/scripts/check_sources.py +2 -2
  99. data/vendor/pygments-main/scripts/detect_missing_analyse_text.py +2 -0
  100. data/vendor/pygments-main/scripts/find_codetags.py +1 -1
  101. data/vendor/pygments-main/scripts/find_error.py +5 -6
  102. data/vendor/pygments-main/setup.cfg +1 -0
  103. data/vendor/pygments-main/setup.py +6 -4
  104. data/vendor/pygments-main/tests/examplefiles/BOM.js +1 -0
  105. data/vendor/pygments-main/tests/examplefiles/autoit_submit.au3 +25 -0
  106. data/vendor/pygments-main/tests/examplefiles/bigtest.nsi +308 -0
  107. data/vendor/pygments-main/tests/examplefiles/ca65_example +284 -0
  108. data/vendor/pygments-main/tests/examplefiles/cbmbas_example +9 -0
  109. data/vendor/pygments-main/tests/examplefiles/classes.dylan +89 -4
  110. data/vendor/pygments-main/tests/examplefiles/example.cob +3556 -0
  111. data/vendor/pygments-main/tests/examplefiles/example.prg +161 -0
  112. data/vendor/pygments-main/tests/examplefiles/example.shell-session +45 -0
  113. data/vendor/pygments-main/tests/examplefiles/example.ts +28 -0
  114. data/vendor/pygments-main/tests/examplefiles/inet_pton6.dg +2 -2
  115. data/vendor/pygments-main/tests/examplefiles/logos_example.xm +28 -0
  116. data/vendor/pygments-main/tests/examplefiles/mg_sample.pro +73 -0
  117. data/vendor/pygments-main/tests/examplefiles/minehunt.qml +112 -0
  118. data/vendor/pygments-main/tests/examplefiles/nanomsg.intr +95 -0
  119. data/vendor/pygments-main/tests/examplefiles/phpMyAdmin.spec +163 -0
  120. data/vendor/pygments-main/tests/examplefiles/rust_example.rs +191 -701
  121. data/vendor/pygments-main/tests/examplefiles/session.dylan-console +9 -0
  122. data/vendor/pygments-main/tests/examplefiles/test.opa +10 -0
  123. data/vendor/pygments-main/tests/examplefiles/test2.pypylog +120 -0
  124. data/vendor/pygments-main/tests/examplefiles/unix-io.lid +37 -0
  125. data/vendor/pygments-main/tests/old_run.py +1 -1
  126. data/vendor/pygments-main/tests/run.py +3 -2
  127. data/vendor/pygments-main/tests/support/tags +36 -0
  128. data/vendor/pygments-main/tests/test_basic_api.py +3 -2
  129. data/vendor/pygments-main/tests/test_clexer.py +1 -1
  130. data/vendor/pygments-main/tests/test_cmdline.py +1 -1
  131. data/vendor/pygments-main/tests/test_examplefiles.py +1 -1
  132. data/vendor/pygments-main/tests/test_html_formatter.py +17 -1
  133. data/vendor/pygments-main/tests/test_latex_formatter.py +1 -1
  134. data/vendor/pygments-main/tests/test_perllexer.py +1 -1
  135. data/vendor/pygments-main/tests/test_regexlexer.py +1 -1
  136. data/vendor/pygments-main/tests/test_token.py +1 -1
  137. data/vendor/pygments-main/tests/test_using_api.py +1 -1
  138. data/vendor/pygments-main/tests/test_util.py +5 -4
  139. metadata +26 -2
@@ -5,7 +5,7 @@
5
5
 
6
6
  Pygments lexers.
7
7
 
8
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
9
  :license: BSD, see LICENSE for details.
10
10
  """
11
11
 
@@ -113,7 +113,7 @@ def get_lexer_for_filename(_fn, code=None, **options):
113
113
  # to find lexers which need it overridden.
114
114
  if code:
115
115
  return cls.analyse_text(code) + bonus
116
- return bonus
116
+ return cls.priority + bonus
117
117
 
118
118
  if matches:
119
119
  matches.sort(key=get_rating)
@@ -10,7 +10,7 @@
10
10
  TODO: perl/python script in Asymptote SVN similar to asy-list.pl but only
11
11
  for function and variable names.
12
12
 
13
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
13
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
14
14
  :license: BSD, see LICENSE for details.
15
15
  """
16
16
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  ANSI Common Lisp builtins.
7
7
 
8
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
9
  :license: BSD, see LICENSE for details.
10
10
  """
11
11
 
@@ -1,9 +1,12 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  """
3
3
  pygments.lexers._lassobuiltins
4
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5
5
 
6
6
  Built-in Lasso types, traits, and methods.
7
+
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
+ :license: BSD, see LICENSE for details.
7
10
  """
8
11
 
9
12
  BUILTINS = {
@@ -9,7 +9,7 @@
9
9
 
10
10
  Do not edit the MODULES dict by hand.
11
11
 
12
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
12
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
13
13
  :license: BSD, see LICENSE for details.
14
14
  """
15
15
 
@@ -9,7 +9,7 @@
9
9
 
10
10
  Do not alter the LEXERS dictionary by hand.
11
11
 
12
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
12
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
13
13
  :license: BSD, see LICENSE for details.
14
14
  """
15
15
 
@@ -32,6 +32,7 @@ LEXERS = {
32
32
  'AspectJLexer': ('pygments.lexers.jvm', 'AspectJ', ('aspectj',), ('*.aj',), ('text/x-aspectj',)),
33
33
  'AsymptoteLexer': ('pygments.lexers.other', 'Asymptote', ('asy', 'asymptote'), ('*.asy',), ('text/x-asymptote',)),
34
34
  'AugeasLexer': ('pygments.lexers.github', 'Augeas', ('augeas',), ('*.aug',), ()),
35
+ 'AutoItLexer': ('pygments.lexers.other', 'AutoIt', ('autoit', 'Autoit'), ('*.au3',), ('text/x-autoit',)),
35
36
  'AutohotkeyLexer': ('pygments.lexers.other', 'autohotkey', ('ahk',), ('*.ahk', '*.ahkl'), ('text/x-autohotkey',)),
36
37
  'AwkLexer': ('pygments.lexers.other', 'Awk', ('awk', 'gawk', 'mawk', 'nawk'), ('*.awk',), ('application/x-awk',)),
37
38
  'BBCodeLexer': ('pygments.lexers.text', 'BBCode', ('bbcode',), (), ('text/x-bbcode',)),
@@ -50,6 +51,8 @@ LEXERS = {
50
51
  'CObjdumpLexer': ('pygments.lexers.asm', 'c-objdump', ('c-objdump',), ('*.c-objdump',), ('text/x-c-objdump',)),
51
52
  'CSharpAspxLexer': ('pygments.lexers.dotnet', 'aspx-cs', ('aspx-cs',), ('*.aspx', '*.asax', '*.ascx', '*.ashx', '*.asmx', '*.axd'), ()),
52
53
  'CSharpLexer': ('pygments.lexers.dotnet', 'C#', ('csharp', 'c#'), ('*.cs',), ('text/x-csharp',)),
54
+ 'Ca65Lexer': ('pygments.lexers.asm', 'ca65', ('ca65',), ('*.s',), ()),
55
+ 'CbmBasicV2Lexer': ('pygments.lexers.other', 'CBM BASIC V2', ('cbmbas',), ('*.bas',), ()),
53
56
  'CeylonLexer': ('pygments.lexers.jvm', 'Ceylon', ('ceylon',), ('*.ceylon',), ('text/x-ceylon',)),
54
57
  'Cfengine3Lexer': ('pygments.lexers.other', 'CFEngine3', ('cfengine3', 'cf3'), ('*.cf',), ()),
55
58
  'CheetahHtmlLexer': ('pygments.lexers.templates', 'HTML+Cheetah', ('html+cheetah', 'html+spitfire'), (), ('text/html+cheetah', 'text/html+spitfire')),
@@ -57,6 +60,8 @@ LEXERS = {
57
60
  'CheetahLexer': ('pygments.lexers.templates', 'Cheetah', ('cheetah', 'spitfire'), ('*.tmpl', '*.spt'), ('application/x-cheetah', 'application/x-spitfire')),
58
61
  'CheetahXmlLexer': ('pygments.lexers.templates', 'XML+Cheetah', ('xml+cheetah', 'xml+spitfire'), (), ('application/xml+cheetah', 'application/xml+spitfire')),
59
62
  'ClojureLexer': ('pygments.lexers.jvm', 'Clojure', ('clojure', 'clj'), ('*.clj',), ('text/x-clojure', 'application/x-clojure')),
63
+ 'CobolFreeformatLexer': ('pygments.lexers.compiled', 'COBOLFree', ('cobolfree',), ('*.cbl', '*.CBL'), ()),
64
+ 'CobolLexer': ('pygments.lexers.compiled', 'COBOL', ('cobol',), ('*.cob', '*.COB', '*.cpy', '*.CPY'), ('text/x-cobol',)),
60
65
  'CoffeeScriptLexer': ('pygments.lexers.web', 'CoffeeScript', ('coffee-script', 'coffeescript'), ('*.coffee',), ('text/coffeescript',)),
61
66
  'ColdfusionHtmlLexer': ('pygments.lexers.templates', 'Coldfusion HTML', ('cfm',), ('*.cfm', '*.cfml', '*.cfc'), ('application/x-coldfusion',)),
62
67
  'ColdfusionLexer': ('pygments.lexers.templates', 'cfstatement', ('cfs',), (), ()),
@@ -85,7 +90,9 @@ LEXERS = {
85
90
  'DjangoLexer': ('pygments.lexers.templates', 'Django/Jinja', ('django', 'jinja'), (), ('application/x-django-templating', 'application/x-jinja')),
86
91
  'DtdLexer': ('pygments.lexers.web', 'DTD', ('dtd',), ('*.dtd',), ('application/xml-dtd',)),
87
92
  'DuelLexer': ('pygments.lexers.web', 'Duel', ('duel', 'Duel Engine', 'Duel View', 'JBST', 'jbst', 'JsonML+BST'), ('*.duel', '*.jbst'), ('text/x-duel', 'text/x-jbst')),
88
- 'DylanLexer': ('pygments.lexers.compiled', 'Dylan', ('dylan',), ('*.dylan', '*.dyl'), ('text/x-dylan',)),
93
+ 'DylanConsoleLexer': ('pygments.lexers.compiled', 'Dylan session', ('dylan-console', 'dylan-repl'), ('*.dylan-console',), ('text/x-dylan-console',)),
94
+ 'DylanLexer': ('pygments.lexers.compiled', 'Dylan', ('dylan',), ('*.dylan', '*.dyl', '*.intr'), ('text/x-dylan',)),
95
+ 'DylanLidLexer': ('pygments.lexers.compiled', 'DylanLID', ('dylan-lid', 'lid'), ('*.lid', '*.hdp'), ('text/x-dylan-lid',)),
89
96
  'ECLLexer': ('pygments.lexers.other', 'ECL', ('ecl',), ('*.ecl',), ('application/x-ecl',)),
90
97
  'ECLexer': ('pygments.lexers.compiled', 'eC', ('ec',), ('*.ec', '*.eh'), ('text/x-echdr', 'text/x-ecsrc')),
91
98
  'ElixirConsoleLexer': ('pygments.lexers.functional', 'Elixir iex session', ('iex',), (), ('text/x-elixir-shellsession',)),
@@ -102,6 +109,7 @@ LEXERS = {
102
109
  'FantomLexer': ('pygments.lexers.compiled', 'Fantom', ('fan',), ('*.fan',), ('application/x-fantom',)),
103
110
  'FelixLexer': ('pygments.lexers.compiled', 'Felix', ('felix', 'flx'), ('*.flx', '*.flxh'), ('text/x-felix',)),
104
111
  'FortranLexer': ('pygments.lexers.compiled', 'Fortran', ('fortran',), ('*.f', '*.f90', '*.F', '*.F90'), ('text/x-fortran',)),
112
+ 'FoxProLexer': ('pygments.lexers.foxpro', 'FoxPro', ('Clipper', 'XBase'), ('*.PRG', '*.prg'), ()),
105
113
  'GLShaderLexer': ('pygments.lexers.compiled', 'GLSL', ('glsl',), ('*.vert', '*.frag', '*.geo'), ('text/x-glslsrc',)),
106
114
  'GasLexer': ('pygments.lexers.asm', 'GAS', ('gas',), ('*.s', '*.S'), ('text/x-gas',)),
107
115
  'GenshiLexer': ('pygments.lexers.templates', 'Genshi', ('genshi', 'kid', 'xml+genshi', 'xml+kid'), ('*.kid',), ('application/x-genshi', 'application/x-kid')),
@@ -126,6 +134,7 @@ LEXERS = {
126
134
  'HttpLexer': ('pygments.lexers.text', 'HTTP', ('http',), (), ()),
127
135
  'HxmlLexer': ('pygments.lexers.text', 'Hxml', ('haxeml', 'hxml'), ('*.hxml',), ()),
128
136
  'HybrisLexer': ('pygments.lexers.other', 'Hybris', ('hybris', 'hy'), ('*.hy', '*.hyb'), ('text/x-hybris', 'application/x-hybris')),
137
+ 'IDLLexer': ('pygments.lexers.math', 'IDL', ('idl',), ('*.pro',), ('text/idl',)),
129
138
  'IniLexer': ('pygments.lexers.text', 'INI', ('ini', 'cfg'), ('*.ini', '*.cfg'), ('text/x-ini',)),
130
139
  'IoLexer': ('pygments.lexers.agile', 'Io', ('io',), ('*.io',), ('text/x-iosrc',)),
131
140
  'IokeLexer': ('pygments.lexers.jvm', 'Ioke', ('ioke', 'ik'), ('*.ik',), ('text/x-iokesrc',)),
@@ -155,6 +164,7 @@ LEXERS = {
155
164
  'LiterateHaskellLexer': ('pygments.lexers.functional', 'Literate Haskell', ('lhs', 'literate-haskell'), ('*.lhs',), ('text/x-literate-haskell',)),
156
165
  'LiveScriptLexer': ('pygments.lexers.web', 'LiveScript', ('live-script', 'livescript'), ('*.ls',), ('text/livescript',)),
157
166
  'LlvmLexer': ('pygments.lexers.asm', 'LLVM', ('llvm',), ('*.ll',), ('text/x-llvm',)),
167
+ 'LogosLexer': ('pygments.lexers.compiled', 'Logos', ('logos',), ('*.x', '*.xi', '*.xm', '*.xmi'), ('text/x-logos',)),
158
168
  'LogtalkLexer': ('pygments.lexers.other', 'Logtalk', ('logtalk',), ('*.lgt',), ('text/x-logtalk',)),
159
169
  'LuaLexer': ('pygments.lexers.agile', 'Lua', ('lua',), ('*.lua', '*.wlua'), ('text/x-lua', 'application/x-lua')),
160
170
  'MOOCodeLexer': ('pygments.lexers.other', 'MOOCode', ('moocode',), ('*.moo',), ('text/x-moocode',)),
@@ -183,6 +193,7 @@ LEXERS = {
183
193
  'MyghtyJavascriptLexer': ('pygments.lexers.templates', 'JavaScript+Myghty', ('js+myghty', 'javascript+myghty'), (), ('application/x-javascript+myghty', 'text/x-javascript+myghty', 'text/javascript+mygthy')),
184
194
  'MyghtyLexer': ('pygments.lexers.templates', 'Myghty', ('myghty',), ('*.myt', 'autodelegate'), ('application/x-myghty',)),
185
195
  'MyghtyXmlLexer': ('pygments.lexers.templates', 'XML+Myghty', ('xml+myghty',), (), ('application/xml+myghty',)),
196
+ 'NSISLexer': ('pygments.lexers.other', 'NSIS', ('nsis', 'nsi', 'nsh'), ('*.nsi', '*.nsh'), ('text/x-nsis',)),
186
197
  'NasmLexer': ('pygments.lexers.asm', 'NASM', ('nasm',), ('*.asm', '*.ASM'), ('text/x-nasm',)),
187
198
  'NemerleLexer': ('pygments.lexers.dotnet', 'Nemerle', ('nemerle',), ('*.n',), ('text/x-nemerle',)),
188
199
  'NewLispLexer': ('pygments.lexers.functional', 'NewLisp', ('newlisp',), ('*.lsp', '*.nl'), ('text/x-newlisp', 'application/x-newlisp')),
@@ -191,7 +202,8 @@ LEXERS = {
191
202
  'NimrodLexer': ('pygments.lexers.compiled', 'Nimrod', ('nimrod', 'nim'), ('*.nim', '*.nimrod'), ('text/x-nimrod',)),
192
203
  'NumPyLexer': ('pygments.lexers.math', 'NumPy', ('numpy',), (), ()),
193
204
  'ObjdumpLexer': ('pygments.lexers.asm', 'objdump', ('objdump',), ('*.objdump',), ('text/x-objdump',)),
194
- 'ObjectiveCLexer': ('pygments.lexers.compiled', 'Objective-C', ('objective-c', 'objectivec', 'obj-c', 'objc'), ('*.m',), ('text/x-objective-c',)),
205
+ 'ObjectiveCLexer': ('pygments.lexers.compiled', 'Objective-C', ('objective-c', 'objectivec', 'obj-c', 'objc'), ('*.m', '*.h'), ('text/x-objective-c',)),
206
+ 'ObjectiveCppLexer': ('pygments.lexers.compiled', 'Objective-C++', ('objective-c++', 'objectivec++', 'obj-c++', 'objc++'), ('*.mm', '*.hh'), ('text/x-objective-c++',)),
195
207
  'ObjectiveJLexer': ('pygments.lexers.web', 'Objective-J', ('objective-j', 'objectivej', 'obj-j', 'objj'), ('*.j',), ('text/x-objective-j',)),
196
208
  'OcamlLexer': ('pygments.lexers.functional', 'OCaml', ('ocaml',), ('*.ml', '*.mli', '*.mll', '*.mly'), ('text/x-ocaml',)),
197
209
  'OctaveLexer': ('pygments.lexers.math', 'Octave', ('octave',), ('*.m',), ('text/octave',)),
@@ -199,7 +211,7 @@ LEXERS = {
199
211
  'OpaLexer': ('pygments.lexers.functional', 'Opa', ('opa',), ('*.opa',), ('text/x-opa',)),
200
212
  'OpenEdgeLexer': ('pygments.lexers.other', 'OpenEdge ABL', ('openedge', 'abl', 'progress'), ('*.p', '*.cls'), ('text/x-openedge', 'application/x-openedge')),
201
213
  'PerlLexer': ('pygments.lexers.agile', 'Perl', ('perl', 'pl'), ('*.pl', '*.pm'), ('text/x-perl', 'application/x-perl')),
202
- 'PhpLexer': ('pygments.lexers.web', 'PHP', ('php', 'php3', 'php4', 'php5'), ('*.php', '*.php[345]'), ('text/x-php',)),
214
+ 'PhpLexer': ('pygments.lexers.web', 'PHP', ('php', 'php3', 'php4', 'php5'), ('*.php', '*.php[345]', '*.inc'), ('text/x-php',)),
203
215
  'PlPgsqlLexer': ('pygments.lexers.sql', 'PL/pgSQL', ('plpgsql',), (), ('text/x-plpgsql',)),
204
216
  'PostScriptLexer': ('pygments.lexers.other', 'PostScript', ('postscript',), ('*.ps', '*.eps'), ('application/postscript',)),
205
217
  'PostgresConsoleLexer': ('pygments.lexers.sql', 'PostgreSQL console (psql)', ('psql', 'postgresql-console', 'postgres-console'), (), ('text/x-postgresql-psql',)),
@@ -210,13 +222,16 @@ LEXERS = {
210
222
  'PropertiesLexer': ('pygments.lexers.text', 'Properties', ('properties',), ('*.properties',), ('text/x-java-properties',)),
211
223
  'ProtoBufLexer': ('pygments.lexers.other', 'Protocol Buffer', ('protobuf',), ('*.proto',), ()),
212
224
  'PuppetLexer': ('pygments.lexers.github', 'Puppet', ('puppet',), ('*.pp',), ()),
225
+ 'PuppetLexer': ('pygments.lexers.other', 'Puppet', ('puppet',), ('*.pp',), ()),
213
226
  'PyPyLogLexer': ('pygments.lexers.text', 'PyPy Log', ('pypylog', 'pypy'), ('*.pypylog',), ('application/x-pypylog',)),
214
227
  'Python3Lexer': ('pygments.lexers.agile', 'Python 3', ('python3', 'py3'), (), ('text/x-python3', 'application/x-python3')),
215
228
  'Python3TracebackLexer': ('pygments.lexers.agile', 'Python 3.0 Traceback', ('py3tb',), ('*.py3tb',), ('text/x-python3-traceback',)),
216
229
  'PythonConsoleLexer': ('pygments.lexers.agile', 'Python console session', ('pycon',), (), ('text/x-python-doctest',)),
217
230
  'PythonLexer': ('pygments.lexers.agile', 'Python', ('python', 'py', 'sage'), ('*.py', '*.pyw', '*.sc', 'SConstruct', 'SConscript', '*.tac', '*.sage'), ('text/x-python', 'application/x-python')),
218
231
  'PythonTracebackLexer': ('pygments.lexers.agile', 'Python Traceback', ('pytb',), ('*.pytb',), ('text/x-python-traceback',)),
232
+ 'QmlLexer': ('pygments.lexers.web', 'QML', ('qml', 'Qt Meta Language', 'Qt modeling Language'), ('*.qml',), ('application/x-qml',)),
219
233
  'RConsoleLexer': ('pygments.lexers.math', 'RConsole', ('rconsole', 'rout'), ('*.Rout',), ()),
234
+ 'RPMSpecLexer': ('pygments.lexers.other', 'RPMSpec', ('spec',), ('*.spec',), ('text/x-rpm-spec',)),
220
235
  'RacketLexer': ('pygments.lexers.functional', 'Racket', ('racket', 'rkt'), ('*.rkt', '*.rktl'), ('text/x-racket', 'application/x-racket')),
221
236
  'RagelCLexer': ('pygments.lexers.parsers', 'Ragel in C Host', ('ragel-c',), ('*.rl',), ()),
222
237
  'RagelCppLexer': ('pygments.lexers.parsers', 'Ragel in CPP Host', ('ragel-cpp',), ('*.rl',), ()),
@@ -230,9 +245,9 @@ LEXERS = {
230
245
  'RdLexer': ('pygments.lexers.math', 'Rd', ('rd',), ('*.Rd',), ('text/x-r-doc',)),
231
246
  'RebolLexer': ('pygments.lexers.other', 'REBOL', ('rebol',), ('*.r', '*.r3'), ('text/x-rebol',)),
232
247
  'RedcodeLexer': ('pygments.lexers.other', 'Redcode', ('redcode',), ('*.cw',), ()),
233
- 'RegeditLexer': ('pygments.lexers.text', 'reg', (), ('*.reg',), ('text/x-windows-registry',)),
248
+ 'RegeditLexer': ('pygments.lexers.text', 'reg', ('registry',), ('*.reg',), ('text/x-windows-registry',)),
234
249
  'RhtmlLexer': ('pygments.lexers.templates', 'RHTML', ('rhtml', 'html+erb', 'html+ruby'), ('*.rhtml',), ('text/html+ruby',)),
235
- 'RobotFrameworkLexer': ('pygments.lexers.other', 'RobotFramework', ('RobotFramework', 'robotframework'), ('*.txt',), ('text/x-robotframework',)),
250
+ 'RobotFrameworkLexer': ('pygments.lexers.other', 'RobotFramework', ('RobotFramework', 'robotframework'), ('*.txt', '*.robot'), ('text/x-robotframework',)),
236
251
  'RstLexer': ('pygments.lexers.text', 'reStructuredText', ('rst', 'rest', 'restructuredtext'), ('*.rst', '*.rest'), ('text/x-rst', 'text/prs.fallenstein.rst')),
237
252
  'RubyConsoleLexer': ('pygments.lexers.agile', 'Ruby irb session', ('rbcon', 'irb'), (), ('text/x-ruby-shellsession',)),
238
253
  'RubyLexer': ('pygments.lexers.agile', 'Ruby', ('rb', 'ruby', 'duby'), ('*.rb', '*.rbw', 'Rakefile', '*.rake', '*.gemspec', '*.rbx', '*.duby'), ('text/x-ruby', 'application/x-ruby')),
@@ -245,6 +260,7 @@ LEXERS = {
245
260
  'SchemeLexer': ('pygments.lexers.functional', 'Scheme', ('scheme', 'scm'), ('*.scm', '*.ss'), ('text/x-scheme', 'application/x-scheme')),
246
261
  'ScilabLexer': ('pygments.lexers.math', 'Scilab', ('scilab',), ('*.sci', '*.sce', '*.tst'), ('text/scilab',)),
247
262
  'ScssLexer': ('pygments.lexers.web', 'SCSS', ('scss',), ('*.scss',), ('text/x-scss',)),
263
+ 'ShellSessionLexer': ('pygments.lexers.shell', 'Shell Session', ('shell-session',), ('*.shell-session',), ('application/x-sh-session',)),
248
264
  'SmaliLexer': ('pygments.lexers.dalvik', 'Smali', ('smali',), ('*.smali',), ('text/smali',)),
249
265
  'SmalltalkLexer': ('pygments.lexers.other', 'Smalltalk', ('smalltalk', 'squeak'), ('*.st',), ('text/x-smalltalk',)),
250
266
  'SmartyLexer': ('pygments.lexers.templates', 'Smarty', ('smarty',), ('*.tpl',), ('application/x-smarty',)),
@@ -256,13 +272,14 @@ LEXERS = {
256
272
  'SquidConfLexer': ('pygments.lexers.text', 'SquidConf', ('squidconf', 'squid.conf', 'squid'), ('squid.conf',), ('text/x-squidconf',)),
257
273
  'SspLexer': ('pygments.lexers.templates', 'Scalate Server Page', ('ssp',), ('*.ssp',), ('application/x-ssp',)),
258
274
  'StanLexer': ('pygments.lexers.math', 'Stan', ('stan',), ('*.stan',), ()),
259
- 'SystemVerilogLexer': ('pygments.lexers.hdl', 'systemverilog', ('sv',), ('*.sv', '*.svh'), ('text/x-systemverilog',)),
275
+ 'SystemVerilogLexer': ('pygments.lexers.hdl', 'systemverilog', ('systemverilog', 'sv'), ('*.sv', '*.svh'), ('text/x-systemverilog',)),
260
276
  'TclLexer': ('pygments.lexers.agile', 'Tcl', ('tcl',), ('*.tcl',), ('text/x-tcl', 'text/x-script.tcl', 'application/x-tcl')),
261
277
  'TcshLexer': ('pygments.lexers.shell', 'Tcsh', ('tcsh', 'csh'), ('*.tcsh', '*.csh'), ('application/x-csh',)),
262
278
  'TeaTemplateLexer': ('pygments.lexers.templates', 'Tea', ('tea',), ('*.tea',), ('text/x-tea',)),
263
279
  'TexLexer': ('pygments.lexers.text', 'TeX', ('tex', 'latex'), ('*.tex', '*.aux', '*.toc'), ('text/x-tex', 'text/x-latex')),
264
280
  'TextLexer': ('pygments.lexers.special', 'Text only', ('text',), ('*.txt',), ('text/plain',)),
265
281
  'TreetopLexer': ('pygments.lexers.parsers', 'Treetop', ('treetop',), ('*.treetop', '*.tt'), ()),
282
+ 'TypeScriptLexer': ('pygments.lexers.web', 'TypeScript', ('ts',), ('*.ts',), ('text/x-typescript',)),
266
283
  'UrbiscriptLexer': ('pygments.lexers.other', 'UrbiScript', ('urbiscript',), ('*.u',), ('application/x-urbiscript',)),
267
284
  'VGLLexer': ('pygments.lexers.other', 'VGL', ('vgl',), ('*.rpf',), ()),
268
285
  'ValaLexer': ('pygments.lexers.compiled', 'Vala', ('vala', 'vapi'), ('*.vala', '*.vapi'), ('text/x-vala',)),
@@ -271,7 +288,7 @@ LEXERS = {
271
288
  'VelocityHtmlLexer': ('pygments.lexers.templates', 'HTML+Velocity', ('html+velocity',), (), ('text/html+velocity',)),
272
289
  'VelocityLexer': ('pygments.lexers.templates', 'Velocity', ('velocity',), ('*.vm', '*.fhtml'), ()),
273
290
  'VelocityXmlLexer': ('pygments.lexers.templates', 'XML+Velocity', ('xml+velocity',), (), ('application/xml+velocity',)),
274
- 'VerilogLexer': ('pygments.lexers.hdl', 'verilog', ('v',), ('*.v',), ('text/x-verilog',)),
291
+ 'VerilogLexer': ('pygments.lexers.hdl', 'verilog', ('verilog', 'v'), ('*.v',), ('text/x-verilog',)),
275
292
  'VhdlLexer': ('pygments.lexers.hdl', 'vhdl', ('vhdl',), ('*.vhdl', '*.vhd'), ('text/x-vhdl',)),
276
293
  'VimLexer': ('pygments.lexers.text', 'VimL', ('vim',), ('*.vim', '.vimrc', '.exrc', '.gvimrc', '_vimrc', '_exrc', '_gvimrc', 'vimrc', 'gvimrc'), ('text/x-vim',)),
277
294
  'XQueryLexer': ('pygments.lexers.web', 'XQuery', ('xquery', 'xqy', 'xq', 'xql', 'xqm'), ('*.xqy', '*.xquery', '*.xq', '*.xql', '*.xqm'), ('text/xquery', 'application/xquery')),
@@ -319,9 +336,8 @@ if __name__ == '__main__':
319
336
  footer = content[content.find("if __name__ == '__main__':"):]
320
337
 
321
338
  # write new file
322
- f = open(__file__, 'w')
339
+ f = open(__file__, 'wb')
323
340
  f.write(header)
324
341
  f.write('LEXERS = {\n %s,\n}\n\n' % ',\n '.join(found_lexers))
325
342
  f.write(footer)
326
343
  f.close()
327
-
@@ -1,3 +1,14 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ pygments.lexers._openedgebuiltins
4
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5
+
6
+ Builtin list for the OpenEdgeLexer.
7
+
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
+ :license: BSD, see LICENSE for details.
10
+ """
11
+
1
12
  OPENEDGEKEYWORDS = [
2
13
  'ABSOLUTE', 'ABS', 'ABSO', 'ABSOL', 'ABSOLU', 'ABSOLUT', 'ACCELERATOR',
3
14
  'ACCUM', 'ACCUMULATE', 'ACCUM', 'ACCUMU', 'ACCUMUL', 'ACCUMULA',
@@ -12,7 +12,7 @@
12
12
  internet connection. don't run that at home, use
13
13
  a server ;-)
14
14
 
15
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
15
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
16
16
  :license: BSD, see LICENSE for details.
17
17
  """
18
18
 
@@ -3784,4 +3784,4 @@ if __name__ == '__main__':
3784
3784
  regenerate(__file__, modules)
3785
3785
  shutil.rmtree(PHP_MANUAL_DIR)
3786
3786
 
3787
- run()
3787
+ run()
@@ -1,10 +1,11 @@
1
+ # -*- coding: utf-8 -*-
1
2
  """
2
3
  pygments.lexers._postgres_builtins
3
4
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4
5
 
5
6
  Self-updating data files for PostgreSQL lexer.
6
7
 
7
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
8
9
  :license: BSD, see LICENSE for details.
9
10
  """
10
11
 
@@ -56,7 +57,8 @@ def parse_datatypes(f):
56
57
  line = re.sub("<[^>]+>", "", line)
57
58
 
58
59
  # Drop the parts containing braces
59
- for tmp in [ t for tmp in line.split('[') for t in tmp.split(']') if "(" not in t ]:
60
+ for tmp in [t for tmp in line.split('[')
61
+ for t in tmp.split(']') if "(" not in t]:
60
62
  for t in tmp.split(','):
61
63
  t = t.strip()
62
64
  if not t: continue
@@ -1,3 +1,14 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ pygments.lexers._robotframeworklexer
4
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5
+
6
+ Lexer for Robot Framework.
7
+
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
+ :license: BSD, see LICENSE for details.
10
+ """
11
+
1
12
  # Copyright 2012 Nokia Siemens Networks Oyj
2
13
  #
3
14
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -50,7 +61,7 @@ class RobotFrameworkLexer(Lexer):
50
61
  """
51
62
  name = 'RobotFramework'
52
63
  aliases = ['RobotFramework', 'robotframework']
53
- filenames = ['*.txt']
64
+ filenames = ['*.txt', '*.robot']
54
65
  mimetypes = ['text/x-robotframework']
55
66
 
56
67
  def __init__(self, **options):
@@ -484,12 +495,12 @@ class VariableSplitter:
484
495
  def _find_variable(self, string):
485
496
  max_end_index = string.rfind('}')
486
497
  if max_end_index == -1:
487
- return ValueError('No variable end found')
498
+ raise ValueError('No variable end found')
488
499
  if self._is_escaped(string, max_end_index):
489
500
  return self._find_variable(string[:max_end_index])
490
501
  start_index = self._find_start_index(string, 1, max_end_index)
491
502
  if start_index == -1:
492
- return ValueError('No variable start found')
503
+ raise ValueError('No variable start found')
493
504
  return start_index, max_end_index
494
505
 
495
506
  def _find_start_index(self, string, start, end):
@@ -1,3 +1,14 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ pygments.lexers._scilab_builtins
4
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5
+
6
+ Builtin list for the ScilabLexer.
7
+
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
+ :license: BSD, see LICENSE for details.
10
+ """
11
+
1
12
  # These lists are generated automatically.
2
13
  # Run the following in a Scilab script:
3
14
  #
@@ -1,14 +1,14 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  """
3
3
  pygments.lexers._sourcemodbuiltins
4
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5
5
 
6
6
  This file contains the names of SourceMod functions.
7
7
  It is able to re-generate itself.
8
8
 
9
9
  Do not edit the FUNCTIONS list by hand.
10
10
 
11
- :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS.
11
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
12
12
  :license: BSD, see LICENSE for details.
13
13
  """
14
14
 
@@ -1,13 +1,13 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  """
3
- pygments.lexers._stan_builtins
4
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3
+ pygments.lexers._stan_builtins
4
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5
5
 
6
- This file contains the names of functions for Stan used by
7
- ``pygments.lexers.math.StanLexer.
6
+ This file contains the names of functions for Stan used by
7
+ ``pygments.lexers.math.StanLexer.
8
8
 
9
- :copyright: Copyright 2012 by the Pygments team, see AUTHORS.
10
- :license: BSD, see LICENSE for details.
9
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
10
+ :license: BSD, see LICENSE for details.
11
11
  """
12
12
 
13
13
  CONSTANTS=[ 'e',
@@ -5,7 +5,7 @@
5
5
 
6
6
  Lexers for agile languages.
7
7
 
8
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
9
  :license: BSD, see LICENSE for details.
10
10
  """
11
11
 
@@ -607,7 +607,8 @@ class RubyLexer(ExtendedRegexLexer):
607
607
  r'rescue|raise|retry|return|super|then|undef|unless|until|when|'
608
608
  r'while|yield)\b', Keyword),
609
609
  # start of function, class and module names
610
- (r'(module)(\s+)([a-zA-Z_][a-zA-Z0-9_]*(::[a-zA-Z_][a-zA-Z0-9_]*)*)',
610
+ (r'(module)(\s+)([a-zA-Z_][a-zA-Z0-9_]*'
611
+ r'(?:::[a-zA-Z_][a-zA-Z0-9_]*)*)',
611
612
  bygroups(Keyword, Text, Name.Namespace)),
612
613
  (r'(def)(\s+)', bygroups(Keyword, Text), 'funcname'),
613
614
  (r'def(?=[*%&^`~+-/\[<>=])', Keyword, 'funcname'),
@@ -1224,7 +1225,8 @@ class CrocLexer(RegexLexer):
1224
1225
  r'|this|throw|try|vararg|while|with|yield)\b', Keyword),
1225
1226
  (r'(false|true|null)\b', Keyword.Constant),
1226
1227
  # FloatLiteral
1227
- (r'([0-9][0-9_]*)(?=[.eE])(\.[0-9][0-9_]*)?([eE][+\-]?[0-9_]+)?', Number.Float),
1228
+ (r'([0-9][0-9_]*)(?=[.eE])(\.[0-9][0-9_]*)?([eE][+\-]?[0-9_]+)?',
1229
+ Number.Float),
1228
1230
  # IntegerLiteral
1229
1231
  # -- Binary
1230
1232
  (r'0[bB][01][01_]*', Number),
@@ -1854,7 +1856,7 @@ class DgLexer(RegexLexer):
1854
1856
  # Operators
1855
1857
  (r"`\w+'*`", Operator), # Infix links
1856
1858
  # Reserved infix links
1857
- (r'\b(or|and|if|unless|else|where|is|in)\b', Operator.Word),
1859
+ (r'\b(or|and|if|else|where|is|in)\b', Operator.Word),
1858
1860
  (r'[!$%&*+\-./:<-@\\^|~;,]+', Operator),
1859
1861
  # Identifiers
1860
1862
  # Python 3 types
@@ -5,7 +5,7 @@
5
5
 
6
6
  Lexers for assembly languages.
7
7
 
8
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
9
  :license: BSD, see LICENSE for details.
10
10
  """
11
11
 
@@ -17,7 +17,7 @@ from pygments.token import Text, Name, Number, String, Comment, Punctuation, \
17
17
  Other, Keyword, Operator
18
18
 
19
19
  __all__ = ['GasLexer', 'ObjdumpLexer','DObjdumpLexer', 'CppObjdumpLexer',
20
- 'CObjdumpLexer', 'LlvmLexer', 'NasmLexer']
20
+ 'CObjdumpLexer', 'LlvmLexer', 'NasmLexer', 'Ca65Lexer']
21
21
 
22
22
 
23
23
  class GasLexer(RegexLexer):
@@ -358,3 +358,41 @@ class NasmLexer(RegexLexer):
358
358
  (type, Keyword.Type)
359
359
  ],
360
360
  }
361
+
362
+
363
+ class Ca65Lexer(RegexLexer):
364
+ """
365
+ For ca65 assembler sources.
366
+
367
+ *New in Pygments 1.6.*
368
+ """
369
+ name = 'ca65'
370
+ aliases = ['ca65']
371
+ filenames = ['*.s']
372
+
373
+ flags = re.IGNORECASE
374
+
375
+ tokens = {
376
+ 'root': [
377
+ (r';.*', Comment.Single),
378
+ (r'\s+', Text),
379
+ (r'[a-z_.@$][\w.@$]*:', Name.Label),
380
+ (r'((ld|st)[axy]|(in|de)[cxy]|asl|lsr|ro[lr]|adc|sbc|cmp|cp[xy]'
381
+ r'|cl[cvdi]|se[cdi]|jmp|jsr|bne|beq|bpl|bmi|bvc|bvs|bcc|bcs'
382
+ r'|p[lh][ap]|rt[is]|brk|nop|ta[xy]|t[xy]a|txs|tsx|and|ora|eor'
383
+ r'|bit)\b', Keyword),
384
+ (r'\.[a-z0-9_]+', Keyword.Pseudo),
385
+ (r'[-+~*/^&|!<>=]', Operator),
386
+ (r'"[^"\n]*.', String),
387
+ (r"'[^'\n]*.", String.Char),
388
+ (r'\$[0-9a-f]+|[0-9a-f]+h\b', Number.Hex),
389
+ (r'\d+|%[01]+', Number.Integer),
390
+ (r'[#,.:()=]', Punctuation),
391
+ (r'[a-z_.@$][\w.@$]*', Name),
392
+ ]
393
+ }
394
+
395
+ def analyse_text(self, text):
396
+ # comments in GAS start with "#"
397
+ if re.match(r'^\s*;', text, re.MULTILINE):
398
+ return 0.9