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.
- data/CHANGELOG +9 -0
- data/CHANGELOG.md +6 -0
- data/LICENSE +1 -1
- data/README.md +1 -1
- data/lexers +0 -0
- data/lib/pygments/version.rb +1 -1
- data/test/test_pygments.rb +0 -1
- data/vendor/pygments-main/AUTHORS +14 -1
- data/vendor/pygments-main/CHANGES +56 -6
- data/vendor/pygments-main/LICENSE +1 -1
- data/vendor/pygments-main/Makefile +1 -1
- data/vendor/pygments-main/REVISION +1 -0
- data/vendor/pygments-main/docs/generate.py +1 -1
- data/vendor/pygments-main/docs/src/api.txt +1 -1
- data/vendor/pygments-main/docs/src/index.txt +1 -1
- data/vendor/pygments-main/docs/src/integrate.txt +5 -0
- data/vendor/pygments-main/docs/src/java.txt +70 -0
- data/vendor/pygments-main/external/autopygmentize +64 -0
- data/vendor/pygments-main/external/markdown-processor.py +2 -2
- data/vendor/pygments-main/external/moin-parser.py +1 -1
- data/vendor/pygments-main/external/rst-directive-old.py +1 -1
- data/vendor/pygments-main/external/rst-directive.py +1 -1
- data/vendor/pygments-main/pygments/__init__.py +2 -2
- data/vendor/pygments-main/pygments/cmdline.py +14 -6
- data/vendor/pygments-main/pygments/console.py +1 -1
- data/vendor/pygments-main/pygments/filter.py +1 -1
- data/vendor/pygments-main/pygments/filters/__init__.py +1 -1
- data/vendor/pygments-main/pygments/formatter.py +1 -1
- data/vendor/pygments-main/pygments/formatters/__init__.py +1 -1
- data/vendor/pygments-main/pygments/formatters/_mapping.py +1 -1
- data/vendor/pygments-main/pygments/formatters/bbcode.py +1 -1
- data/vendor/pygments-main/pygments/formatters/html.py +73 -2
- data/vendor/pygments-main/pygments/formatters/img.py +1 -1
- data/vendor/pygments-main/pygments/formatters/latex.py +1 -1
- data/vendor/pygments-main/pygments/formatters/other.py +1 -1
- data/vendor/pygments-main/pygments/formatters/rtf.py +1 -1
- data/vendor/pygments-main/pygments/formatters/svg.py +1 -1
- data/vendor/pygments-main/pygments/formatters/terminal.py +1 -1
- data/vendor/pygments-main/pygments/formatters/terminal256.py +1 -1
- data/vendor/pygments-main/pygments/lexer.py +76 -12
- data/vendor/pygments-main/pygments/lexers/__init__.py +2 -2
- data/vendor/pygments-main/pygments/lexers/_asybuiltins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_clbuiltins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_lassobuiltins.py +4 -1
- data/vendor/pygments-main/pygments/lexers/_luabuiltins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_mapping.py +26 -10
- data/vendor/pygments-main/pygments/lexers/_openedgebuiltins.py +11 -0
- data/vendor/pygments-main/pygments/lexers/_phpbuiltins.py +2 -2
- data/vendor/pygments-main/pygments/lexers/_postgres_builtins.py +4 -2
- data/vendor/pygments-main/pygments/lexers/_robotframeworklexer.py +14 -3
- data/vendor/pygments-main/pygments/lexers/_scilab_builtins.py +11 -0
- data/vendor/pygments-main/pygments/lexers/_sourcemodbuiltins.py +2 -2
- data/vendor/pygments-main/pygments/lexers/_stan_builtins.py +6 -6
- data/vendor/pygments-main/pygments/lexers/agile.py +6 -4
- data/vendor/pygments-main/pygments/lexers/asm.py +40 -2
- data/vendor/pygments-main/pygments/lexers/compiled.py +751 -438
- data/vendor/pygments-main/pygments/lexers/dalvik.py +2 -2
- data/vendor/pygments-main/pygments/lexers/dotnet.py +1 -1
- data/vendor/pygments-main/pygments/lexers/foxpro.py +428 -0
- data/vendor/pygments-main/pygments/lexers/functional.py +6 -5
- data/vendor/pygments-main/pygments/lexers/hdl.py +3 -3
- data/vendor/pygments-main/pygments/lexers/jvm.py +130 -16
- data/vendor/pygments-main/pygments/lexers/math.py +250 -9
- data/vendor/pygments-main/pygments/lexers/other.py +518 -13
- data/vendor/pygments-main/pygments/lexers/parsers.py +3 -2
- data/vendor/pygments-main/pygments/lexers/shell.py +48 -2
- data/vendor/pygments-main/pygments/lexers/special.py +1 -1
- data/vendor/pygments-main/pygments/lexers/sql.py +1 -1
- data/vendor/pygments-main/pygments/lexers/templates.py +7 -6
- data/vendor/pygments-main/pygments/lexers/text.py +9 -9
- data/vendor/pygments-main/pygments/lexers/web.py +264 -51
- data/vendor/pygments-main/pygments/plugin.py +1 -1
- data/vendor/pygments-main/pygments/scanner.py +1 -1
- data/vendor/pygments-main/pygments/style.py +1 -1
- data/vendor/pygments-main/pygments/styles/__init__.py +1 -1
- data/vendor/pygments-main/pygments/styles/autumn.py +1 -1
- data/vendor/pygments-main/pygments/styles/borland.py +1 -1
- data/vendor/pygments-main/pygments/styles/bw.py +1 -1
- data/vendor/pygments-main/pygments/styles/colorful.py +1 -1
- data/vendor/pygments-main/pygments/styles/default.py +1 -1
- data/vendor/pygments-main/pygments/styles/emacs.py +1 -1
- data/vendor/pygments-main/pygments/styles/friendly.py +1 -1
- data/vendor/pygments-main/pygments/styles/fruity.py +1 -1
- data/vendor/pygments-main/pygments/styles/manni.py +1 -1
- data/vendor/pygments-main/pygments/styles/monokai.py +1 -1
- data/vendor/pygments-main/pygments/styles/murphy.py +1 -1
- data/vendor/pygments-main/pygments/styles/native.py +1 -1
- data/vendor/pygments-main/pygments/styles/pastie.py +1 -1
- data/vendor/pygments-main/pygments/styles/perldoc.py +1 -1
- data/vendor/pygments-main/pygments/styles/rrt.py +1 -1
- data/vendor/pygments-main/pygments/styles/tango.py +1 -1
- data/vendor/pygments-main/pygments/styles/trac.py +1 -1
- data/vendor/pygments-main/pygments/styles/vim.py +1 -1
- data/vendor/pygments-main/pygments/styles/vs.py +1 -1
- data/vendor/pygments-main/pygments/token.py +1 -1
- data/vendor/pygments-main/pygments/unistring.py +1 -1
- data/vendor/pygments-main/pygments/util.py +1 -1
- data/vendor/pygments-main/scripts/check_sources.py +2 -2
- data/vendor/pygments-main/scripts/detect_missing_analyse_text.py +2 -0
- data/vendor/pygments-main/scripts/find_codetags.py +1 -1
- data/vendor/pygments-main/scripts/find_error.py +5 -6
- data/vendor/pygments-main/setup.cfg +1 -0
- data/vendor/pygments-main/setup.py +6 -4
- data/vendor/pygments-main/tests/examplefiles/BOM.js +1 -0
- data/vendor/pygments-main/tests/examplefiles/autoit_submit.au3 +25 -0
- data/vendor/pygments-main/tests/examplefiles/bigtest.nsi +308 -0
- data/vendor/pygments-main/tests/examplefiles/ca65_example +284 -0
- data/vendor/pygments-main/tests/examplefiles/cbmbas_example +9 -0
- data/vendor/pygments-main/tests/examplefiles/classes.dylan +89 -4
- data/vendor/pygments-main/tests/examplefiles/example.cob +3556 -0
- data/vendor/pygments-main/tests/examplefiles/example.prg +161 -0
- data/vendor/pygments-main/tests/examplefiles/example.shell-session +45 -0
- data/vendor/pygments-main/tests/examplefiles/example.ts +28 -0
- data/vendor/pygments-main/tests/examplefiles/inet_pton6.dg +2 -2
- data/vendor/pygments-main/tests/examplefiles/logos_example.xm +28 -0
- data/vendor/pygments-main/tests/examplefiles/mg_sample.pro +73 -0
- data/vendor/pygments-main/tests/examplefiles/minehunt.qml +112 -0
- data/vendor/pygments-main/tests/examplefiles/nanomsg.intr +95 -0
- data/vendor/pygments-main/tests/examplefiles/phpMyAdmin.spec +163 -0
- data/vendor/pygments-main/tests/examplefiles/rust_example.rs +191 -701
- data/vendor/pygments-main/tests/examplefiles/session.dylan-console +9 -0
- data/vendor/pygments-main/tests/examplefiles/test.opa +10 -0
- data/vendor/pygments-main/tests/examplefiles/test2.pypylog +120 -0
- data/vendor/pygments-main/tests/examplefiles/unix-io.lid +37 -0
- data/vendor/pygments-main/tests/old_run.py +1 -1
- data/vendor/pygments-main/tests/run.py +3 -2
- data/vendor/pygments-main/tests/support/tags +36 -0
- data/vendor/pygments-main/tests/test_basic_api.py +3 -2
- data/vendor/pygments-main/tests/test_clexer.py +1 -1
- data/vendor/pygments-main/tests/test_cmdline.py +1 -1
- data/vendor/pygments-main/tests/test_examplefiles.py +1 -1
- data/vendor/pygments-main/tests/test_html_formatter.py +17 -1
- data/vendor/pygments-main/tests/test_latex_formatter.py +1 -1
- data/vendor/pygments-main/tests/test_perllexer.py +1 -1
- data/vendor/pygments-main/tests/test_regexlexer.py +1 -1
- data/vendor/pygments-main/tests/test_token.py +1 -1
- data/vendor/pygments-main/tests/test_using_api.py +1 -1
- data/vendor/pygments-main/tests/test_util.py +5 -4
- metadata +26 -2
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Lexers for functional languages.
|
7
7
|
|
8
|
-
:copyright: Copyright 2006-
|
8
|
+
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
|
9
9
|
:license: BSD, see LICENSE for details.
|
10
10
|
"""
|
11
11
|
|
@@ -1665,7 +1665,7 @@ class OpaLexer(RegexLexer):
|
|
1665
1665
|
keywords = [
|
1666
1666
|
'and', 'as', 'begin', 'css', 'database', 'db', 'do', 'else', 'end',
|
1667
1667
|
'external', 'forall', 'if', 'import', 'match', 'package', 'parser',
|
1668
|
-
'rec', 'server', 'then', 'type', 'val', 'with', 'xml_parser'
|
1668
|
+
'rec', 'server', 'then', 'type', 'val', 'with', 'xml_parser',
|
1669
1669
|
]
|
1670
1670
|
|
1671
1671
|
# matches both stuff and `stuff`
|
@@ -1902,7 +1902,7 @@ class OpaLexer(RegexLexer):
|
|
1902
1902
|
(r'[/*]', Comment),
|
1903
1903
|
],
|
1904
1904
|
|
1905
|
-
# the
|
1905
|
+
# the copy pasting between string and single-string
|
1906
1906
|
# is kinda sad. Is there a way to avoid that??
|
1907
1907
|
'string': [
|
1908
1908
|
(r'[^\\"{]+', String.Double),
|
@@ -1949,6 +1949,7 @@ class OpaLexer(RegexLexer):
|
|
1949
1949
|
(r'"', String.Single, ('#pop', 'string')),
|
1950
1950
|
(r'#'+ident_re, String.Single, '#pop'),
|
1951
1951
|
(r'#(?={)', String.Single, ('#pop', 'root')),
|
1952
|
+
(r'[^"\'{`=<>]+', String.Single, '#pop'),
|
1952
1953
|
(r'{', Operator, ('#pop', 'root')), # this is a tail call!
|
1953
1954
|
],
|
1954
1955
|
|
@@ -1958,7 +1959,7 @@ class OpaLexer(RegexLexer):
|
|
1958
1959
|
(r'</', String.Single, ('#pop', 'html-end-tag')),
|
1959
1960
|
(r'<', String.Single, 'html-open-tag'),
|
1960
1961
|
(r'{', Operator, 'root'),
|
1961
|
-
(r'
|
1962
|
+
(r'[^<{]+', String.Single),
|
1962
1963
|
],
|
1963
1964
|
|
1964
1965
|
'html-comment': [
|
@@ -2437,7 +2438,7 @@ class KokaLexer(RegexLexer):
|
|
2437
2438
|
# builtin names and special names
|
2438
2439
|
builtin = [
|
2439
2440
|
'for', 'while', 'repeat',
|
2440
|
-
'foreach', 'foreach-indexed',
|
2441
|
+
'foreach', 'foreach-indexed',
|
2441
2442
|
'error', 'catch', 'finally',
|
2442
2443
|
'cs', 'js', 'file', 'ref', 'assigned',
|
2443
2444
|
]
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Lexers for hardware descriptor languages.
|
7
7
|
|
8
|
-
:copyright: Copyright 2006-
|
8
|
+
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
|
9
9
|
:license: BSD, see LICENSE for details.
|
10
10
|
"""
|
11
11
|
|
@@ -25,7 +25,7 @@ class VerilogLexer(RegexLexer):
|
|
25
25
|
*New in Pygments 1.4.*
|
26
26
|
"""
|
27
27
|
name = 'verilog'
|
28
|
-
aliases = ['v']
|
28
|
+
aliases = ['verilog', 'v']
|
29
29
|
filenames = ['*.v']
|
30
30
|
mimetypes = ['text/x-verilog']
|
31
31
|
|
@@ -137,7 +137,7 @@ class SystemVerilogLexer(RegexLexer):
|
|
137
137
|
*New in Pygments 1.5.*
|
138
138
|
"""
|
139
139
|
name = 'systemverilog'
|
140
|
-
aliases = ['sv']
|
140
|
+
aliases = ['systemverilog', 'sv']
|
141
141
|
filenames = ['*.sv', '*.svh']
|
142
142
|
mimetypes = ['text/x-systemverilog']
|
143
143
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Pygments lexers for JVM languages.
|
7
7
|
|
8
|
-
:copyright: Copyright 2006-
|
8
|
+
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
|
9
9
|
:license: BSD, see LICENSE for details.
|
10
10
|
"""
|
11
11
|
|
@@ -131,11 +131,117 @@ class ScalaLexer(RegexLexer):
|
|
131
131
|
flags = re.MULTILINE | re.DOTALL
|
132
132
|
|
133
133
|
# don't use raw unicode strings!
|
134
|
-
op = u'[-~\\^\\*!%&\\\\<>\\|+=:/?@\u00a6-\u00a7\u00a9\u00ac\u00ae\u00b0-\u00b1
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
134
|
+
op = (u'[-~\\^\\*!%&\\\\<>\\|+=:/?@\u00a6-\u00a7\u00a9\u00ac\u00ae\u00b0-\u00b1'
|
135
|
+
u'\u00b6\u00d7\u00f7\u03f6\u0482\u0606-\u0608\u060e-\u060f\u06e9'
|
136
|
+
u'\u06fd-\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0cf1-\u0cf2'
|
137
|
+
u'\u0d79\u0f01-\u0f03\u0f13-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38'
|
138
|
+
u'\u0fbe-\u0fc5\u0fc7-\u0fcf\u109e-\u109f\u1360\u1390-\u1399\u1940'
|
139
|
+
u'\u19e0-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2044\u2052\u207a-\u207c'
|
140
|
+
u'\u208a-\u208c\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2118'
|
141
|
+
u'\u211e-\u2123\u2125\u2127\u2129\u212e\u213a-\u213b\u2140-\u2144'
|
142
|
+
u'\u214a-\u214d\u214f\u2190-\u2328\u232b-\u244a\u249c-\u24e9\u2500-\u2767'
|
143
|
+
u'\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb'
|
144
|
+
u'\u29fe-\u2b54\u2ce5-\u2cea\u2e80-\u2ffb\u3004\u3012-\u3013\u3020'
|
145
|
+
u'\u3036-\u3037\u303e-\u303f\u3190-\u3191\u3196-\u319f\u31c0-\u31e3'
|
146
|
+
u'\u3200-\u321e\u322a-\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff'
|
147
|
+
u'\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ufb29\ufdfd\ufe62\ufe64-\ufe66'
|
148
|
+
u'\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe4\uffe8-\uffee\ufffc-\ufffd]+')
|
149
|
+
|
150
|
+
letter = (u'[a-zA-Z\\$_\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6'
|
151
|
+
u'\u00f8-\u02af\u0370-\u0373\u0376-\u0377\u037b-\u037d\u0386'
|
152
|
+
u'\u0388-\u03f5\u03f7-\u0481\u048a-\u0556\u0561-\u0587\u05d0-\u05f2'
|
153
|
+
u'\u0621-\u063f\u0641-\u064a\u066e-\u066f\u0671-\u06d3\u06d5'
|
154
|
+
u'\u06ee-\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5'
|
155
|
+
u'\u07b1\u07ca-\u07ea\u0904-\u0939\u093d\u0950\u0958-\u0961'
|
156
|
+
u'\u0972-\u097f\u0985-\u09b9\u09bd\u09ce\u09dc-\u09e1\u09f0-\u09f1'
|
157
|
+
u'\u0a05-\u0a39\u0a59-\u0a5e\u0a72-\u0a74\u0a85-\u0ab9\u0abd'
|
158
|
+
u'\u0ad0-\u0ae1\u0b05-\u0b39\u0b3d\u0b5c-\u0b61\u0b71\u0b83-\u0bb9'
|
159
|
+
u'\u0bd0\u0c05-\u0c3d\u0c58-\u0c61\u0c85-\u0cb9\u0cbd\u0cde-\u0ce1'
|
160
|
+
u'\u0d05-\u0d3d\u0d60-\u0d61\u0d7a-\u0d7f\u0d85-\u0dc6\u0e01-\u0e30'
|
161
|
+
u'\u0e32-\u0e33\u0e40-\u0e45\u0e81-\u0eb0\u0eb2-\u0eb3\u0ebd-\u0ec4'
|
162
|
+
u'\u0edc-\u0f00\u0f40-\u0f6c\u0f88-\u0f8b\u1000-\u102a\u103f'
|
163
|
+
u'\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070'
|
164
|
+
u'\u1075-\u1081\u108e\u10a0-\u10fa\u1100-\u135a\u1380-\u138f'
|
165
|
+
u'\u13a0-\u166c\u166f-\u1676\u1681-\u169a\u16a0-\u16ea\u16ee-\u1711'
|
166
|
+
u'\u1720-\u1731\u1740-\u1751\u1760-\u1770\u1780-\u17b3\u17dc'
|
167
|
+
u'\u1820-\u1842\u1844-\u18a8\u18aa-\u191c\u1950-\u19a9\u19c1-\u19c7'
|
168
|
+
u'\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae-\u1baf'
|
169
|
+
u'\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c77\u1d00-\u1d2b\u1d62-\u1d77'
|
170
|
+
u'\u1d79-\u1d9a\u1e00-\u1fbc\u1fbe\u1fc2-\u1fcc\u1fd0-\u1fdb'
|
171
|
+
u'\u1fe0-\u1fec\u1ff2-\u1ffc\u2071\u207f\u2102\u2107\u210a-\u2113'
|
172
|
+
u'\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139'
|
173
|
+
u'\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c7c'
|
174
|
+
u'\u2c80-\u2ce4\u2d00-\u2d65\u2d80-\u2dde\u3006-\u3007\u3021-\u3029'
|
175
|
+
u'\u3038-\u303a\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff-\u318e'
|
176
|
+
u'\u31a0-\u31b7\u31f0-\u31ff\u3400-\u4db5\u4e00-\ua014\ua016-\ua48c'
|
177
|
+
u'\ua500-\ua60b\ua610-\ua61f\ua62a-\ua66e\ua680-\ua697\ua722-\ua76f'
|
178
|
+
u'\ua771-\ua787\ua78b-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822'
|
179
|
+
u'\ua840-\ua873\ua882-\ua8b3\ua90a-\ua925\ua930-\ua946\uaa00-\uaa28'
|
180
|
+
u'\uaa40-\uaa42\uaa44-\uaa4b\uac00-\ud7a3\uf900-\ufb1d\ufb1f-\ufb28'
|
181
|
+
u'\ufb2a-\ufd3d\ufd50-\ufdfb\ufe70-\ufefc\uff21-\uff3a\uff41-\uff5a'
|
182
|
+
u'\uff66-\uff6f\uff71-\uff9d\uffa0-\uffdc]')
|
183
|
+
|
184
|
+
upper = (u'[A-Z\\$_\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108'
|
185
|
+
u'\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c'
|
186
|
+
u'\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130'
|
187
|
+
u'\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145'
|
188
|
+
u'\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a'
|
189
|
+
u'\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e'
|
190
|
+
u'\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182'
|
191
|
+
u'\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194'
|
192
|
+
u'\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7'
|
193
|
+
u'\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc'
|
194
|
+
u'\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9'
|
195
|
+
u'\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee'
|
196
|
+
u'\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204'
|
197
|
+
u'\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218'
|
198
|
+
u'\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c'
|
199
|
+
u'\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246'
|
200
|
+
u'\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038f'
|
201
|
+
u'\u0391-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0'
|
202
|
+
u'\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7'
|
203
|
+
u'\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a'
|
204
|
+
u'\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e'
|
205
|
+
u'\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a'
|
206
|
+
u'\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae'
|
207
|
+
u'\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1'
|
208
|
+
u'\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6'
|
209
|
+
u'\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea'
|
210
|
+
u'\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe'
|
211
|
+
u'\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512'
|
212
|
+
u'\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0531-\u0556'
|
213
|
+
u'\u10a0-\u10c5\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e'
|
214
|
+
u'\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22'
|
215
|
+
u'\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36'
|
216
|
+
u'\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a'
|
217
|
+
u'\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e'
|
218
|
+
u'\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72'
|
219
|
+
u'\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86'
|
220
|
+
u'\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2'
|
221
|
+
u'\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6'
|
222
|
+
u'\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca'
|
223
|
+
u'\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede'
|
224
|
+
u'\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2'
|
225
|
+
u'\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d'
|
226
|
+
u'\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59-\u1f5f'
|
227
|
+
u'\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb'
|
228
|
+
u'\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112'
|
229
|
+
u'\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133'
|
230
|
+
u'\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67'
|
231
|
+
u'\u2c69\u2c6b\u2c6d-\u2c6f\u2c72\u2c75\u2c80\u2c82\u2c84\u2c86'
|
232
|
+
u'\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a'
|
233
|
+
u'\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae'
|
234
|
+
u'\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2'
|
235
|
+
u'\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6'
|
236
|
+
u'\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\ua640\ua642\ua644\ua646'
|
237
|
+
u'\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a'
|
238
|
+
u'\ua65c\ua65e\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682'
|
239
|
+
u'\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696'
|
240
|
+
u'\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736'
|
241
|
+
u'\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a'
|
242
|
+
u'\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e'
|
243
|
+
u'\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b'
|
244
|
+
u'\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\uff21-\uff3a]')
|
139
245
|
|
140
246
|
idrest = ur'%s(?:%s|[0-9])*(?:(?<=_)%s)?' % (letter, letter, op)
|
141
247
|
|
@@ -249,7 +355,7 @@ class GosuLexer(RegexLexer):
|
|
249
355
|
(r'(var|delegate|construct|function|private|internal|protected|'
|
250
356
|
r'public|abstract|override|final|static|extends|transient|'
|
251
357
|
r'implements|represents|readonly)\b', Keyword.Declaration),
|
252
|
-
(r'(property\s+)(get|set
|
358
|
+
(r'(property\s+)(get|set)?', Keyword.Declaration),
|
253
359
|
(r'(boolean|byte|char|double|float|int|long|short|void|block)\b',
|
254
360
|
Keyword.Type),
|
255
361
|
(r'(package)(\s+)', bygroups(Keyword.Namespace, Text)),
|
@@ -754,6 +860,7 @@ class TeaLangLexer(RegexLexer):
|
|
754
860
|
],
|
755
861
|
}
|
756
862
|
|
863
|
+
|
757
864
|
class CeylonLexer(RegexLexer):
|
758
865
|
"""
|
759
866
|
For `Ceylon <http://ceylon-lang.org/>`_ source code.
|
@@ -781,10 +888,11 @@ class CeylonLexer(RegexLexer):
|
|
781
888
|
(r'[^\S\n]+', Text),
|
782
889
|
(r'//.*?\n', Comment.Single),
|
783
890
|
(r'/\*.*?\*/', Comment.Multiline),
|
784
|
-
(r'(variable|shared|abstract|doc|by|formal|actual)',
|
785
|
-
|
786
|
-
|
787
|
-
|
891
|
+
(r'(variable|shared|abstract|doc|by|formal|actual)',
|
892
|
+
Name.Decorator),
|
893
|
+
(r'(break|case|catch|continue|default|else|finally|for|in|'
|
894
|
+
r'variable|if|return|switch|this|throw|try|while|is|exists|'
|
895
|
+
r'nonempty|then|outer)\b', Keyword),
|
788
896
|
(r'(abstracts|extends|satisfies|adapts|'
|
789
897
|
r'super|given|of|out|assign|'
|
790
898
|
r'transient|volatile)\b', Keyword.Declaration),
|
@@ -792,19 +900,23 @@ class CeylonLexer(RegexLexer):
|
|
792
900
|
Keyword.Type),
|
793
901
|
(r'(package)(\s+)', bygroups(Keyword.Namespace, Text)),
|
794
902
|
(r'(true|false|null)\b', Keyword.Constant),
|
795
|
-
(r'(class|interface|object)(\s+)',
|
903
|
+
(r'(class|interface|object)(\s+)',
|
904
|
+
bygroups(Keyword.Declaration, Text), 'class'),
|
796
905
|
(r'(import)(\s+)', bygroups(Keyword.Namespace, Text), 'import'),
|
797
906
|
(r'"(\\\\|\\"|[^"])*"', String),
|
798
907
|
(r"'\\.'|'[^\\]'|'\\u[0-9a-fA-F]{4}'", String.Quoted),
|
799
908
|
(r"`\\.`|`[^\\]`|`\\u[0-9a-fA-F]{4}`", String.Char),
|
800
|
-
(r'(\.)([a-zA-Z_][a-zA-Z0-9_]*)',
|
909
|
+
(r'(\.)([a-zA-Z_][a-zA-Z0-9_]*)',
|
910
|
+
bygroups(Operator, Name.Attribute)),
|
801
911
|
(r'[a-zA-Z_][a-zA-Z0-9_]*:', Name.Label),
|
802
912
|
(r'[a-zA-Z_\$][a-zA-Z0-9_]*', Name),
|
803
913
|
(r'[~\^\*!%&\[\]\(\)\{\}<>\|+=:;,./?-]', Operator),
|
804
914
|
(r'\d{1,3}(_\d{3})+\.\d{1,3}(_\d{3})+[kMGTPmunpf]?', Number.Float),
|
805
|
-
(r'\d{1,3}(_\d{3})+\.[0-9]+([eE][+-]?[0-9]+)?[kMGTPmunpf]?',
|
915
|
+
(r'\d{1,3}(_\d{3})+\.[0-9]+([eE][+-]?[0-9]+)?[kMGTPmunpf]?',
|
916
|
+
Number.Float),
|
806
917
|
(r'[0-9][0-9]*\.\d{1,3}(_\d{3})+[kMGTPmunpf]?', Number.Float),
|
807
|
-
(r'[0-9][0-9]*\.[0-9]+([eE][+-]?[0-9]+)?[kMGTPmunpf]?',
|
918
|
+
(r'[0-9][0-9]*\.[0-9]+([eE][+-]?[0-9]+)?[kMGTPmunpf]?',
|
919
|
+
Number.Float),
|
808
920
|
(r'0x[0-9a-fA-F]+', Number.Hex),
|
809
921
|
(r'\d{1,3}(_\d{3})+[kMGTP]?', Number.Integer),
|
810
922
|
(r'[0-9]+[kMGTP]?', Number.Integer),
|
@@ -814,10 +926,12 @@ class CeylonLexer(RegexLexer):
|
|
814
926
|
(r'[a-zA-Z_][a-zA-Z0-9_]*', Name.Class, '#pop')
|
815
927
|
],
|
816
928
|
'import': [
|
817
|
-
(r'[a-zA-Z0-9_.]+\w+ \{([a-zA-Z,]+|\.\.\.)\}',
|
929
|
+
(r'[a-zA-Z0-9_.]+\w+ \{([a-zA-Z,]+|\.\.\.)\}',
|
930
|
+
Name.Namespace, '#pop')
|
818
931
|
],
|
819
932
|
}
|
820
933
|
|
934
|
+
|
821
935
|
class KotlinLexer(RegexLexer):
|
822
936
|
"""
|
823
937
|
For `Kotlin <http://confluence.jetbrains.net/display/Kotlin/>`_
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Lexers for math languages.
|
7
7
|
|
8
|
-
:copyright: Copyright 2006-
|
8
|
+
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
|
9
9
|
:license: BSD, see LICENSE for details.
|
10
10
|
"""
|
11
11
|
|
@@ -24,7 +24,7 @@ from pygments.lexers import _stan_builtins
|
|
24
24
|
__all__ = ['JuliaLexer', 'JuliaConsoleLexer', 'MuPADLexer', 'MatlabLexer',
|
25
25
|
'MatlabSessionLexer', 'OctaveLexer', 'ScilabLexer', 'NumPyLexer',
|
26
26
|
'RConsoleLexer', 'SLexer', 'JagsLexer', 'BugsLexer', 'StanLexer',
|
27
|
-
'RdLexer']
|
27
|
+
'IDLLexer', 'RdLexer']
|
28
28
|
|
29
29
|
|
30
30
|
class JuliaLexer(RegexLexer):
|
@@ -58,9 +58,9 @@ class JuliaLexer(RegexLexer):
|
|
58
58
|
# keywords
|
59
59
|
(r'(begin|while|for|in|return|break|continue|'
|
60
60
|
r'macro|quote|let|if|elseif|else|try|catch|end|'
|
61
|
-
r'bitstype|ccall|do
|
61
|
+
r'bitstype|ccall|do|using|module|import|export|'
|
62
|
+
r'importall|baremodule)\b', Keyword),
|
62
63
|
(r'(local|global|const)\b', Keyword.Declaration),
|
63
|
-
(r'(module|import|export)\b', Keyword.Reserved),
|
64
64
|
(r'(Bool|Int|Int8|Int16|Int32|Int64|Uint|Uint8|Uint16|Uint32|Uint64'
|
65
65
|
r'|Float32|Float64|Complex64|Complex128|Any|Nothing|None)\b',
|
66
66
|
Keyword.Type),
|
@@ -84,7 +84,8 @@ class JuliaLexer(RegexLexer):
|
|
84
84
|
(r'`(?s).*?`', String.Backtick),
|
85
85
|
|
86
86
|
# chars
|
87
|
-
(r"'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,3}|\\u[a-fA-F0-9]{1,4}
|
87
|
+
(r"'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,3}|\\u[a-fA-F0-9]{1,4}|"
|
88
|
+
r"\\U[a-fA-F0-9]{1,6}|[^\\\'\n])'", String.Char),
|
88
89
|
|
89
90
|
# try to match trailing transpose
|
90
91
|
(r'(?<=[.\w\)\]])\'+', Operator),
|
@@ -818,8 +819,7 @@ class OctaveLexer(RegexLexer):
|
|
818
819
|
|
819
820
|
def analyse_text(text):
|
820
821
|
if re.match('^\s*[%#]', text, re.M): #Comment
|
821
|
-
return 0.
|
822
|
-
return 0.1
|
822
|
+
return 0.1
|
823
823
|
|
824
824
|
|
825
825
|
class ScilabLexer(RegexLexer):
|
@@ -1305,7 +1305,7 @@ class StanLexer(RegexLexer):
|
|
1305
1305
|
filenames = ['*.stan']
|
1306
1306
|
|
1307
1307
|
_RESERVED = ('for', 'in', 'while', 'repeat', 'until', 'if',
|
1308
|
-
'then', 'else', 'true', 'false', 'T',
|
1308
|
+
'then', 'else', 'true', 'false', 'T',
|
1309
1309
|
'lower', 'upper', 'print')
|
1310
1310
|
|
1311
1311
|
_TYPES = ('int', 'real', 'vector', 'simplex', 'ordered', 'row_vector',
|
@@ -1356,7 +1356,7 @@ class StanLexer(RegexLexer):
|
|
1356
1356
|
# Integer Literals
|
1357
1357
|
(r'-?[0-9]+', Number.Integer),
|
1358
1358
|
# Assignment operators
|
1359
|
-
# SLexer makes these tokens Operators.
|
1359
|
+
# SLexer makes these tokens Operators.
|
1360
1360
|
(r'<-|~', Operator),
|
1361
1361
|
# Infix and prefix operators (and = )
|
1362
1362
|
(r"\+|-|\.?\*|\.?/|\\|'|=", Operator),
|
@@ -1372,6 +1372,247 @@ class StanLexer(RegexLexer):
|
|
1372
1372
|
return 0.0
|
1373
1373
|
|
1374
1374
|
|
1375
|
+
class IDLLexer(RegexLexer):
|
1376
|
+
"""
|
1377
|
+
Pygments Lexer for IDL (Interactive Data Language).
|
1378
|
+
|
1379
|
+
*New in Pygments 1.6.*
|
1380
|
+
"""
|
1381
|
+
name = 'IDL'
|
1382
|
+
aliases = ['idl']
|
1383
|
+
filenames = ['*.pro']
|
1384
|
+
mimetypes = ['text/idl']
|
1385
|
+
|
1386
|
+
_RESERVED = ['and', 'begin', 'break', 'case', 'common', 'compile_opt',
|
1387
|
+
'continue', 'do', 'else', 'end', 'endcase', 'elseelse',
|
1388
|
+
'endfor', 'endforeach', 'endif', 'endrep', 'endswitch',
|
1389
|
+
'endwhile', 'eq', 'for', 'foreach', 'forward_function',
|
1390
|
+
'function', 'ge', 'goto', 'gt', 'if', 'inherits', 'le',
|
1391
|
+
'lt', 'mod', 'ne', 'not', 'of', 'on_ioerror', 'or', 'pro',
|
1392
|
+
'repeat', 'switch', 'then', 'until', 'while', 'xor']
|
1393
|
+
"""Reserved words from: http://www.exelisvis.com/docs/reswords.html"""
|
1394
|
+
|
1395
|
+
_BUILTIN_LIB = ['abs', 'acos', 'adapt_hist_equal', 'alog', 'alog10',
|
1396
|
+
'amoeba', 'annotate', 'app_user_dir', 'app_user_dir_query',
|
1397
|
+
'arg_present', 'array_equal', 'array_indices', 'arrow',
|
1398
|
+
'ascii_template', 'asin', 'assoc', 'atan', 'axis',
|
1399
|
+
'a_correlate', 'bandpass_filter', 'bandreject_filter',
|
1400
|
+
'barplot', 'bar_plot', 'beseli', 'beselj', 'beselk',
|
1401
|
+
'besely', 'beta', 'bilinear', 'binary_template', 'bindgen',
|
1402
|
+
'binomial', 'bin_date', 'bit_ffs', 'bit_population',
|
1403
|
+
'blas_axpy', 'blk_con', 'box_cursor', 'breakpoint',
|
1404
|
+
'broyden', 'butterworth', 'bytarr', 'byte', 'byteorder',
|
1405
|
+
'bytscl', 'caldat', 'calendar', 'call_external',
|
1406
|
+
'call_function', 'call_method', 'call_procedure', 'canny',
|
1407
|
+
'catch', 'cd', 'cdf_[0-9a-za-z_]*', 'ceil', 'chebyshev',
|
1408
|
+
'check_math',
|
1409
|
+
'chisqr_cvf', 'chisqr_pdf', 'choldc', 'cholsol', 'cindgen',
|
1410
|
+
'cir_3pnt', 'close', 'cluster', 'cluster_tree', 'clust_wts',
|
1411
|
+
'cmyk_convert', 'colorbar', 'colorize_sample',
|
1412
|
+
'colormap_applicable', 'colormap_gradient',
|
1413
|
+
'colormap_rotation', 'colortable', 'color_convert',
|
1414
|
+
'color_exchange', 'color_quan', 'color_range_map', 'comfit',
|
1415
|
+
'command_line_args', 'complex', 'complexarr', 'complexround',
|
1416
|
+
'compute_mesh_normals', 'cond', 'congrid', 'conj',
|
1417
|
+
'constrained_min', 'contour', 'convert_coord', 'convol',
|
1418
|
+
'convol_fft', 'coord2to3', 'copy_lun', 'correlate', 'cos',
|
1419
|
+
'cosh', 'cpu', 'cramer', 'create_cursor', 'create_struct',
|
1420
|
+
'create_view', 'crossp', 'crvlength', 'cti_test',
|
1421
|
+
'ct_luminance', 'cursor', 'curvefit', 'cvttobm', 'cv_coord',
|
1422
|
+
'cw_animate', 'cw_animate_getp', 'cw_animate_load',
|
1423
|
+
'cw_animate_run', 'cw_arcball', 'cw_bgroup', 'cw_clr_index',
|
1424
|
+
'cw_colorsel', 'cw_defroi', 'cw_field', 'cw_filesel',
|
1425
|
+
'cw_form', 'cw_fslider', 'cw_light_editor',
|
1426
|
+
'cw_light_editor_get', 'cw_light_editor_set', 'cw_orient',
|
1427
|
+
'cw_palette_editor', 'cw_palette_editor_get',
|
1428
|
+
'cw_palette_editor_set', 'cw_pdmenu', 'cw_rgbslider',
|
1429
|
+
'cw_tmpl', 'cw_zoom', 'c_correlate', 'dblarr', 'db_exists',
|
1430
|
+
'dcindgen', 'dcomplex', 'dcomplexarr', 'define_key',
|
1431
|
+
'define_msgblk', 'define_msgblk_from_file', 'defroi',
|
1432
|
+
'defsysv', 'delvar', 'dendrogram', 'dendro_plot', 'deriv',
|
1433
|
+
'derivsig', 'determ', 'device', 'dfpmin', 'diag_matrix',
|
1434
|
+
'dialog_dbconnect', 'dialog_message', 'dialog_pickfile',
|
1435
|
+
'dialog_printersetup', 'dialog_printjob',
|
1436
|
+
'dialog_read_image', 'dialog_write_image', 'digital_filter',
|
1437
|
+
'dilate', 'dindgen', 'dissolve', 'dist', 'distance_measure',
|
1438
|
+
'dlm_load', 'dlm_register', 'doc_library', 'double',
|
1439
|
+
'draw_roi', 'edge_dog', 'efont', 'eigenql', 'eigenvec',
|
1440
|
+
'ellipse', 'elmhes', 'emboss', 'empty', 'enable_sysrtn',
|
1441
|
+
'eof', 'eos_[0-9a-za-z_]*', 'erase', 'erf', 'erfc', 'erfcx',
|
1442
|
+
'erode', 'errorplot', 'errplot', 'estimator_filter',
|
1443
|
+
'execute', 'exit', 'exp', 'expand', 'expand_path', 'expint',
|
1444
|
+
'extrac', 'extract_slice', 'factorial', 'fft', 'filepath',
|
1445
|
+
'file_basename', 'file_chmod', 'file_copy', 'file_delete',
|
1446
|
+
'file_dirname', 'file_expand_path', 'file_info',
|
1447
|
+
'file_lines', 'file_link', 'file_mkdir', 'file_move',
|
1448
|
+
'file_poll_input', 'file_readlink', 'file_same',
|
1449
|
+
'file_search', 'file_test', 'file_which', 'findgen',
|
1450
|
+
'finite', 'fix', 'flick', 'float', 'floor', 'flow3',
|
1451
|
+
'fltarr', 'flush', 'format_axis_values', 'free_lun',
|
1452
|
+
'fstat', 'fulstr', 'funct', 'fv_test', 'fx_root',
|
1453
|
+
'fz_roots', 'f_cvf', 'f_pdf', 'gamma', 'gamma_ct',
|
1454
|
+
'gauss2dfit', 'gaussfit', 'gaussian_function', 'gaussint',
|
1455
|
+
'gauss_cvf', 'gauss_pdf', 'gauss_smooth', 'getenv',
|
1456
|
+
'getwindows', 'get_drive_list', 'get_dxf_objects',
|
1457
|
+
'get_kbrd', 'get_login_info', 'get_lun', 'get_screen_size',
|
1458
|
+
'greg2jul', 'grib_[0-9a-za-z_]*', 'grid3', 'griddata',
|
1459
|
+
'grid_input', 'grid_tps', 'gs_iter',
|
1460
|
+
'h5[adfgirst]_[0-9a-za-z_]*', 'h5_browser', 'h5_close',
|
1461
|
+
'h5_create', 'h5_get_libversion', 'h5_open', 'h5_parse',
|
1462
|
+
'hanning', 'hash', 'hdf_[0-9a-za-z_]*', 'heap_free',
|
1463
|
+
'heap_gc', 'heap_nosave', 'heap_refcount', 'heap_save',
|
1464
|
+
'help', 'hilbert', 'histogram', 'hist_2d', 'hist_equal',
|
1465
|
+
'hls', 'hough', 'hqr', 'hsv', 'h_eq_ct', 'h_eq_int',
|
1466
|
+
'i18n_multibytetoutf8', 'i18n_multibytetowidechar',
|
1467
|
+
'i18n_utf8tomultibyte', 'i18n_widechartomultibyte',
|
1468
|
+
'ibeta', 'icontour', 'iconvertcoord', 'idelete', 'identity',
|
1469
|
+
'idlexbr_assistant', 'idlitsys_createtool', 'idl_base64',
|
1470
|
+
'idl_validname', 'iellipse', 'igamma', 'igetcurrent',
|
1471
|
+
'igetdata', 'igetid', 'igetproperty', 'iimage', 'image',
|
1472
|
+
'image_cont', 'image_statistics', 'imaginary', 'imap',
|
1473
|
+
'indgen', 'intarr', 'interpol', 'interpolate',
|
1474
|
+
'interval_volume', 'int_2d', 'int_3d', 'int_tabulated',
|
1475
|
+
'invert', 'ioctl', 'iopen', 'iplot', 'ipolygon',
|
1476
|
+
'ipolyline', 'iputdata', 'iregister', 'ireset', 'iresolve',
|
1477
|
+
'irotate', 'ir_filter', 'isa', 'isave', 'iscale',
|
1478
|
+
'isetcurrent', 'isetproperty', 'ishft', 'isocontour',
|
1479
|
+
'isosurface', 'isurface', 'itext', 'itranslate', 'ivector',
|
1480
|
+
'ivolume', 'izoom', 'i_beta', 'journal', 'json_parse',
|
1481
|
+
'json_serialize', 'jul2greg', 'julday', 'keyword_set',
|
1482
|
+
'krig2d', 'kurtosis', 'kw_test', 'l64indgen', 'label_date',
|
1483
|
+
'label_region', 'ladfit', 'laguerre', 'laplacian',
|
1484
|
+
'la_choldc', 'la_cholmprove', 'la_cholsol', 'la_determ',
|
1485
|
+
'la_eigenproblem', 'la_eigenql', 'la_eigenvec', 'la_elmhes',
|
1486
|
+
'la_gm_linear_model', 'la_hqr', 'la_invert',
|
1487
|
+
'la_least_squares', 'la_least_square_equality',
|
1488
|
+
'la_linear_equation', 'la_ludc', 'la_lumprove', 'la_lusol',
|
1489
|
+
'la_svd', 'la_tridc', 'la_trimprove', 'la_triql',
|
1490
|
+
'la_trired', 'la_trisol', 'least_squares_filter', 'leefilt',
|
1491
|
+
'legend', 'legendre', 'linbcg', 'lindgen', 'linfit',
|
1492
|
+
'linkimage', 'list', 'll_arc_distance', 'lmfit', 'lmgr',
|
1493
|
+
'lngamma', 'lnp_test', 'loadct', 'locale_get',
|
1494
|
+
'logical_and', 'logical_or', 'logical_true', 'lon64arr',
|
1495
|
+
'lonarr', 'long', 'long64', 'lsode', 'ludc', 'lumprove',
|
1496
|
+
'lusol', 'lu_complex', 'machar', 'make_array', 'make_dll',
|
1497
|
+
'make_rt', 'map', 'mapcontinents', 'mapgrid', 'map_2points',
|
1498
|
+
'map_continents', 'map_grid', 'map_image', 'map_patch',
|
1499
|
+
'map_proj_forward', 'map_proj_image', 'map_proj_info',
|
1500
|
+
'map_proj_init', 'map_proj_inverse', 'map_set',
|
1501
|
+
'matrix_multiply', 'matrix_power', 'max', 'md_test',
|
1502
|
+
'mean', 'meanabsdev', 'mean_filter', 'median', 'memory',
|
1503
|
+
'mesh_clip', 'mesh_decimate', 'mesh_issolid', 'mesh_merge',
|
1504
|
+
'mesh_numtriangles', 'mesh_obj', 'mesh_smooth',
|
1505
|
+
'mesh_surfacearea', 'mesh_validate', 'mesh_volume',
|
1506
|
+
'message', 'min', 'min_curve_surf', 'mk_html_help',
|
1507
|
+
'modifyct', 'moment', 'morph_close', 'morph_distance',
|
1508
|
+
'morph_gradient', 'morph_hitormiss', 'morph_open',
|
1509
|
+
'morph_thin', 'morph_tophat', 'multi', 'm_correlate',
|
1510
|
+
'ncdf_[0-9a-za-z_]*', 'newton', 'noise_hurl', 'noise_pick',
|
1511
|
+
'noise_scatter', 'noise_slur', 'norm', 'n_elements',
|
1512
|
+
'n_params', 'n_tags', 'objarr', 'obj_class', 'obj_destroy',
|
1513
|
+
'obj_hasmethod', 'obj_isa', 'obj_new', 'obj_valid',
|
1514
|
+
'online_help', 'on_error', 'open', 'oplot', 'oploterr',
|
1515
|
+
'parse_url', 'particle_trace', 'path_cache', 'path_sep',
|
1516
|
+
'pcomp', 'plot', 'plot3d', 'ploterr', 'plots', 'plot_3dbox',
|
1517
|
+
'plot_field', 'pnt_line', 'point_lun', 'polarplot',
|
1518
|
+
'polar_contour', 'polar_surface', 'poly', 'polyfill',
|
1519
|
+
'polyfillv', 'polygon', 'polyline', 'polyshade', 'polywarp',
|
1520
|
+
'poly_2d', 'poly_area', 'poly_fit', 'popd', 'powell',
|
1521
|
+
'pref_commit', 'pref_get', 'pref_set', 'prewitt', 'primes',
|
1522
|
+
'print', 'printd', 'product', 'profile', 'profiler',
|
1523
|
+
'profiles', 'project_vol', 'psafm', 'pseudo',
|
1524
|
+
'ps_show_fonts', 'ptrarr', 'ptr_free', 'ptr_new',
|
1525
|
+
'ptr_valid', 'pushd', 'p_correlate', 'qgrid3', 'qhull',
|
1526
|
+
'qromb', 'qromo', 'qsimp', 'query_ascii', 'query_bmp',
|
1527
|
+
'query_csv', 'query_dicom', 'query_gif', 'query_image',
|
1528
|
+
'query_jpeg', 'query_jpeg2000', 'query_mrsid', 'query_pict',
|
1529
|
+
'query_png', 'query_ppm', 'query_srf', 'query_tiff',
|
1530
|
+
'query_wav', 'radon', 'randomn', 'randomu', 'ranks',
|
1531
|
+
'rdpix', 'read', 'reads', 'readu', 'read_ascii',
|
1532
|
+
'read_binary', 'read_bmp', 'read_csv', 'read_dicom',
|
1533
|
+
'read_gif', 'read_image', 'read_interfile', 'read_jpeg',
|
1534
|
+
'read_jpeg2000', 'read_mrsid', 'read_pict', 'read_png',
|
1535
|
+
'read_ppm', 'read_spr', 'read_srf', 'read_sylk',
|
1536
|
+
'read_tiff', 'read_wav', 'read_wave', 'read_x11_bitmap',
|
1537
|
+
'read_xwd', 'real_part', 'rebin', 'recall_commands',
|
1538
|
+
'recon3', 'reduce_colors', 'reform', 'region_grow',
|
1539
|
+
'register_cursor', 'regress', 'replicate',
|
1540
|
+
'replicate_inplace', 'resolve_all', 'resolve_routine',
|
1541
|
+
'restore', 'retall', 'return', 'reverse', 'rk4', 'roberts',
|
1542
|
+
'rot', 'rotate', 'round', 'routine_filepath',
|
1543
|
+
'routine_info', 'rs_test', 'r_correlate', 'r_test',
|
1544
|
+
'save', 'savgol', 'scale3', 'scale3d', 'scope_level',
|
1545
|
+
'scope_traceback', 'scope_varfetch', 'scope_varname',
|
1546
|
+
'search2d', 'search3d', 'sem_create', 'sem_delete',
|
1547
|
+
'sem_lock', 'sem_release', 'setenv', 'set_plot',
|
1548
|
+
'set_shading', 'sfit', 'shade_surf', 'shade_surf_irr',
|
1549
|
+
'shade_volume', 'shift', 'shift_diff', 'shmdebug', 'shmmap',
|
1550
|
+
'shmunmap', 'shmvar', 'show3', 'showfont', 'simplex', 'sin',
|
1551
|
+
'sindgen', 'sinh', 'size', 'skewness', 'skip_lun',
|
1552
|
+
'slicer3', 'slide_image', 'smooth', 'sobel', 'socket',
|
1553
|
+
'sort', 'spawn', 'spher_harm', 'sph_4pnt', 'sph_scat',
|
1554
|
+
'spline', 'spline_p', 'spl_init', 'spl_interp', 'sprsab',
|
1555
|
+
'sprsax', 'sprsin', 'sprstp', 'sqrt', 'standardize',
|
1556
|
+
'stddev', 'stop', 'strarr', 'strcmp', 'strcompress',
|
1557
|
+
'streamline', 'stregex', 'stretch', 'string', 'strjoin',
|
1558
|
+
'strlen', 'strlowcase', 'strmatch', 'strmessage', 'strmid',
|
1559
|
+
'strpos', 'strput', 'strsplit', 'strtrim', 'struct_assign',
|
1560
|
+
'struct_hide', 'strupcase', 'surface', 'surfr', 'svdc',
|
1561
|
+
'svdfit', 'svsol', 'swap_endian', 'swap_endian_inplace',
|
1562
|
+
'symbol', 'systime', 's_test', 't3d', 'tag_names', 'tan',
|
1563
|
+
'tanh', 'tek_color', 'temporary', 'tetra_clip',
|
1564
|
+
'tetra_surface', 'tetra_volume', 'text', 'thin', 'threed',
|
1565
|
+
'timegen', 'time_test2', 'tm_test', 'total', 'trace',
|
1566
|
+
'transpose', 'triangulate', 'trigrid', 'triql', 'trired',
|
1567
|
+
'trisol', 'tri_surf', 'truncate_lun', 'ts_coef', 'ts_diff',
|
1568
|
+
'ts_fcast', 'ts_smooth', 'tv', 'tvcrs', 'tvlct', 'tvrd',
|
1569
|
+
'tvscl', 'typename', 't_cvt', 't_pdf', 'uindgen', 'uint',
|
1570
|
+
'uintarr', 'ul64indgen', 'ulindgen', 'ulon64arr', 'ulonarr',
|
1571
|
+
'ulong', 'ulong64', 'uniq', 'unsharp_mask', 'usersym',
|
1572
|
+
'value_locate', 'variance', 'vector', 'vector_field', 'vel',
|
1573
|
+
'velovect', 'vert_t3d', 'voigt', 'voronoi', 'voxel_proj',
|
1574
|
+
'wait', 'warp_tri', 'watershed', 'wdelete', 'wf_draw',
|
1575
|
+
'where', 'widget_base', 'widget_button', 'widget_combobox',
|
1576
|
+
'widget_control', 'widget_displaycontextmen', 'widget_draw',
|
1577
|
+
'widget_droplist', 'widget_event', 'widget_info',
|
1578
|
+
'widget_label', 'widget_list', 'widget_propertysheet',
|
1579
|
+
'widget_slider', 'widget_tab', 'widget_table',
|
1580
|
+
'widget_text', 'widget_tree', 'widget_tree_move',
|
1581
|
+
'widget_window', 'wiener_filter', 'window', 'writeu',
|
1582
|
+
'write_bmp', 'write_csv', 'write_gif', 'write_image',
|
1583
|
+
'write_jpeg', 'write_jpeg2000', 'write_nrif', 'write_pict',
|
1584
|
+
'write_png', 'write_ppm', 'write_spr', 'write_srf',
|
1585
|
+
'write_sylk', 'write_tiff', 'write_wav', 'write_wave',
|
1586
|
+
'wset', 'wshow', 'wtn', 'wv_applet', 'wv_cwt',
|
1587
|
+
'wv_cw_wavelet', 'wv_denoise', 'wv_dwt', 'wv_fn_coiflet',
|
1588
|
+
'wv_fn_daubechies', 'wv_fn_gaussian', 'wv_fn_haar',
|
1589
|
+
'wv_fn_morlet', 'wv_fn_paul', 'wv_fn_symlet',
|
1590
|
+
'wv_import_data', 'wv_import_wavelet', 'wv_plot3d_wps',
|
1591
|
+
'wv_plot_multires', 'wv_pwt', 'wv_tool_denoise',
|
1592
|
+
'xbm_edit', 'xdisplayfile', 'xdxf', 'xfont',
|
1593
|
+
'xinteranimate', 'xloadct', 'xmanager', 'xmng_tmpl',
|
1594
|
+
'xmtool', 'xobjview', 'xobjview_rotate',
|
1595
|
+
'xobjview_write_image', 'xpalette', 'xpcolor', 'xplot3d',
|
1596
|
+
'xregistered', 'xroi', 'xsq_test', 'xsurface', 'xvaredit',
|
1597
|
+
'xvolume', 'xvolume_rotate', 'xvolume_write_image',
|
1598
|
+
'xyouts', 'zoom', 'zoom_24']
|
1599
|
+
"""Functions from: http://www.exelisvis.com/docs/routines-1.html"""
|
1600
|
+
|
1601
|
+
tokens = {
|
1602
|
+
'root': [
|
1603
|
+
(r'^\s*;.*?\n', Comment.Singleline),
|
1604
|
+
(r'\b(' + '|'.join(_RESERVED) + r')\b', Keyword),
|
1605
|
+
(r'\b(' + '|'.join(_BUILTIN_LIB) + r')\b', Name.Builtin),
|
1606
|
+
(r'\+=|-=|\^=|\*=|/=|#=|##=|<=|>=|=', Operator),
|
1607
|
+
(r'\+\+|--|->|\+|-|##|#|\*|/|<|>|&&|\^|~|\|\|\?|:', Operator),
|
1608
|
+
(r'\b(mod=|lt=|le=|eq=|ne=|ge=|gt=|not=|and=|or=|xor=)', Operator),
|
1609
|
+
(r'\b(mod|lt|le|eq|ne|ge|gt|not|and|or|xor)\b', Operator),
|
1610
|
+
(r'\b[0-9](L|B|S|UL|ULL|LL)?\b', Number),
|
1611
|
+
(r'.', Text),
|
1612
|
+
]
|
1613
|
+
}
|
1614
|
+
|
1615
|
+
|
1375
1616
|
class RdLexer(RegexLexer):
|
1376
1617
|
"""
|
1377
1618
|
Pygments Lexer for R documentation (Rd) files
|