summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2013-01-09 14:04:54 +0100
committerGeorg Brandl <georg@python.org>2013-01-09 14:04:54 +0100
commit9cc134d20b8505b6d472cca6872406dbecf5fda3 (patch)
tree773193024f85183f92d1ee4e32fe7a2b5ea70349
parent2867cf9479652aebd216e0c081e14bdc9aa4897b (diff)
parent0b03ce73a68bc794d4891b3cbbc581c7ccf3e03a (diff)
downloadpygments-9cc134d20b8505b6d472cca6872406dbecf5fda3.tar.gz
Merged in blackjack/pygments-main (pull request #88: CBM BASIC V2 and ca65 assembler)
-rw-r--r--AUTHORS13
-rw-r--r--CHANGES51
-rw-r--r--LICENSE2
-rw-r--r--Makefile2
-rwxr-xr-xdocs/generate.py2
-rw-r--r--docs/src/api.txt2
-rw-r--r--docs/src/index.txt2
-rw-r--r--docs/src/integrate.txt5
-rw-r--r--docs/src/java.txt70
-rw-r--r--external/markdown-processor.py4
-rw-r--r--external/moin-parser.py2
-rw-r--r--external/rst-directive-old.py2
-rw-r--r--external/rst-directive.py2
-rw-r--r--pygments/__init__.py2
-rw-r--r--pygments/cmdline.py12
-rw-r--r--pygments/console.py2
-rw-r--r--pygments/filter.py2
-rw-r--r--pygments/filters/__init__.py3
-rw-r--r--pygments/formatter.py2
-rw-r--r--pygments/formatters/__init__.py2
-rwxr-xr-xpygments/formatters/_mapping.py2
-rw-r--r--pygments/formatters/bbcode.py2
-rw-r--r--pygments/formatters/html.py5
-rw-r--r--pygments/formatters/img.py2
-rw-r--r--pygments/formatters/latex.py2
-rw-r--r--pygments/formatters/other.py4
-rw-r--r--pygments/formatters/rtf.py2
-rw-r--r--pygments/formatters/svg.py2
-rw-r--r--pygments/formatters/terminal.py2
-rw-r--r--pygments/formatters/terminal256.py2
-rw-r--r--pygments/lexer.py86
-rw-r--r--pygments/lexers/__init__.py4
-rw-r--r--pygments/lexers/_asybuiltins.py2
-rw-r--r--pygments/lexers/_clbuiltins.py2
-rw-r--r--pygments/lexers/_lassobuiltins.py5
-rw-r--r--pygments/lexers/_luabuiltins.py2
-rw-r--r--pygments/lexers/_mapping.py31
-rw-r--r--pygments/lexers/_openedgebuiltins.py562
-rw-r--r--pygments/lexers/_phpbuiltins.py4
-rw-r--r--pygments/lexers/_postgres_builtins.py7
-rw-r--r--pygments/lexers/_robotframeworklexer.py557
-rw-r--r--pygments/lexers/_scilab_builtins.py11
-rw-r--r--pygments/lexers/_sourcemodbuiltins.py1072
-rw-r--r--pygments/lexers/_stan_builtins.py174
-rw-r--r--pygments/lexers/_vimbuiltins.py16
-rw-r--r--pygments/lexers/agile.py117
-rw-r--r--pygments/lexers/asm.py18
-rw-r--r--pygments/lexers/compiled.py1135
-rw-r--r--pygments/lexers/dalvik.py104
-rw-r--r--pygments/lexers/dotnet.py2
-rw-r--r--pygments/lexers/functional.py208
-rw-r--r--pygments/lexers/hdl.py2
-rw-r--r--pygments/lexers/jvm.py85
-rw-r--r--pygments/lexers/math.py137
-rw-r--r--pygments/lexers/other.py922
-rw-r--r--pygments/lexers/parsers.py87
-rw-r--r--pygments/lexers/shell.py2
-rw-r--r--pygments/lexers/special.py2
-rw-r--r--pygments/lexers/sql.py2
-rw-r--r--pygments/lexers/templates.py12
-rw-r--r--pygments/lexers/text.py94
-rw-r--r--pygments/lexers/web.py165
-rw-r--r--pygments/plugin.py2
-rw-r--r--pygments/scanner.py2
-rw-r--r--pygments/style.py2
-rw-r--r--pygments/styles/__init__.py2
-rw-r--r--pygments/styles/autumn.py2
-rw-r--r--pygments/styles/borland.py2
-rw-r--r--pygments/styles/bw.py2
-rw-r--r--pygments/styles/colorful.py2
-rw-r--r--pygments/styles/default.py2
-rw-r--r--pygments/styles/emacs.py2
-rw-r--r--pygments/styles/friendly.py2
-rw-r--r--pygments/styles/fruity.py2
-rw-r--r--pygments/styles/manni.py2
-rw-r--r--pygments/styles/monokai.py2
-rw-r--r--pygments/styles/murphy.py2
-rw-r--r--pygments/styles/native.py2
-rw-r--r--pygments/styles/pastie.py2
-rw-r--r--pygments/styles/perldoc.py2
-rw-r--r--pygments/styles/rrt.py2
-rw-r--r--pygments/styles/tango.py2
-rw-r--r--pygments/styles/trac.py2
-rw-r--r--pygments/styles/vim.py2
-rw-r--r--pygments/styles/vs.py2
-rw-r--r--pygments/token.py2
-rw-r--r--pygments/unistring.py2
-rw-r--r--pygments/util.py2
-rwxr-xr-xscripts/check_sources.py4
-rwxr-xr-xscripts/find_codetags.py2
-rwxr-xr-xscripts/find_error.py2
-rwxr-xr-xsetup.py2
-rw-r--r--tests/examplefiles/BOM.js1
-rw-r--r--tests/examplefiles/bigtest.nsi308
-rw-r--r--tests/examplefiles/ca65_example (renamed from tests/examplefiles/ca65_example.s)0
-rw-r--r--tests/examplefiles/cbmbas_example (renamed from tests/examplefiles/cbmbas_example.bas)0
-rw-r--r--tests/examplefiles/classes.dylan91
-rw-r--r--tests/examplefiles/example.Rd78
-rw-r--r--tests/examplefiles/example.ceylon33
-rw-r--r--tests/examplefiles/example.cob3556
-rw-r--r--tests/examplefiles/example.monkey152
-rw-r--r--tests/examplefiles/example.reg19
-rw-r--r--tests/examplefiles/example.rpf4
-rw-r--r--tests/examplefiles/example.stan6
-rw-r--r--tests/examplefiles/garcia-wachs.kk123
-rw-r--r--tests/examplefiles/hello.smali40
-rw-r--r--tests/examplefiles/hello.sp9
-rw-r--r--tests/examplefiles/inet_pton6.dg71
-rw-r--r--tests/examplefiles/metagrammar.treetop455
-rw-r--r--tests/examplefiles/minehunt.qml112
-rw-r--r--tests/examplefiles/nanomsg.intr95
-rw-r--r--tests/examplefiles/phpMyAdmin.spec163
-rw-r--r--tests/examplefiles/pytb_test3.pytb4
-rw-r--r--tests/examplefiles/robotframework.txt39
-rw-r--r--tests/examplefiles/rust_example.rs892
-rw-r--r--tests/examplefiles/test2.pypylog120
-rw-r--r--tests/examplefiles/unix-io.lid37
-rw-r--r--tests/old_run.py2
-rw-r--r--tests/run.py2
-rw-r--r--tests/test_basic_api.py4
-rw-r--r--tests/test_clexer.py2
-rw-r--r--tests/test_cmdline.py2
-rw-r--r--tests/test_examplefiles.py4
-rw-r--r--tests/test_html_formatter.py2
-rw-r--r--tests/test_latex_formatter.py2
-rw-r--r--tests/test_perllexer.py2
-rw-r--r--tests/test_regexlexer.py2
-rw-r--r--tests/test_token.py2
-rw-r--r--tests/test_using_api.py2
-rw-r--r--tests/test_util.py9
130 files changed, 10498 insertions, 1847 deletions
diff --git a/AUTHORS b/AUTHORS
index 7aab1883..ba8a8eac 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -9,7 +9,7 @@ Other contributors, listed alphabetically, are:
* Kumar Appaiah -- Debian control lexer
* Ali Afshar -- image formatter
* Andreas Amann -- AppleScript lexer
-* Jeffrey Arnold -- R/S lexer, BUGS lexers
+* Jeffrey Arnold -- R/S, Rd, BUGS, Jags, and Stan lexers
* Jeremy Ashkenas -- CoffeeScript lexer
* Stefan Matthias Aust -- Smalltalk lexer
* Ben Bangert -- Mako lexers
@@ -23,6 +23,7 @@ Other contributors, listed alphabetically, are:
* Frits van Bommel -- assembler lexers
* Pierre Bourdon -- bugfixes
* Hiram Chirino -- Scaml and Jade lexers
+* Ian Cooper -- VGL lexer
* Leaf Corcoran -- MoonScript lexer
* Christopher Creutzig -- MuPAD lexer
* Pete Curry -- bugfixes
@@ -50,11 +51,13 @@ Other contributors, listed alphabetically, are:
* Varun Hiremath -- Debian control lexer
* Doug Hogan -- Mscgen lexer
* Ben Hollis -- Mason lexer
+* Alastair Houghton -- Lexer inheritance facility
* Tim Howard -- BlitzMax lexer
* Ivan Inozemtsev -- Fantom lexer
* Brian R. Jackson -- Tea lexer
* Dennis Kaarsemaker -- sources.list lexer
* Igor Kalnitsky -- vhdl lexer
+* Pekka Klärck -- Robot Framework lexer
* Eric Knibbe -- Lasso lexer
* Adam Koprowski -- Opa lexer
* Benjamin Kowarsch -- Modula-2 lexer
@@ -62,19 +65,24 @@ Other contributors, listed alphabetically, are:
* Marek Kubica -- Scheme lexer
* Jochen Kupperschmidt -- Markdown processor
* Gerd Kurzbach -- Modelica lexer
+* Jon Larimer, Google Inc. -- Smali lexer
* Olov Lassus -- Dart lexer
* Sylvestre Ledru -- Scilab lexer
* Mark Lee -- Vala lexer
* Ben Mabey -- Gherkin lexer
+* Angus MacArthur -- QML lexer
* Simone Margaritelli -- Hybris lexer
* Kirk McDonald -- D lexer
* Gordon McGregor -- SystemVerilog lexer
* Stephen McKamey -- Duel/JBST lexer
* Brian McKenna -- F# lexer
+* Charles McLaughlin -- Puppet lexer
* Lukas Meuser -- BBCode formatter, Lua lexer
* Paul Miller -- LiveScript lexer
* Hong Minhee -- HTTP lexer
* Michael Mior -- Awk lexer
+* Bruce Mitchener -- Dylan lexer rewrite
+* Reuben Morais -- SourcePawn lexer
* Jon Morton -- Rust lexer
* Paulo Moura -- Logtalk lexer
* Mher Movsisyan -- DTD lexer
@@ -107,8 +115,10 @@ Other contributors, listed alphabetically, are:
* Steve Spigarelli -- XQuery lexer
* Jerome St-Louis -- eC lexer
* James Strachan -- Kotlin lexer
+* Tom Stuart -- Treetop lexer
* Tiberius Teng -- default style overhaul
* Jeremy Thurgood -- Erlang, Squid config lexers
+* Brian Tiffin -- OpenCOBOL lexer
* Erick Tryzelaar -- Felix lexer
* Daniele Varrazzo -- PostgreSQL lexers
* Abe Voelker -- OpenEdge ABL lexer
@@ -119,6 +129,7 @@ Other contributors, listed alphabetically, are:
* Nils Winter -- Smalltalk lexer
* Davy Wybiral -- Clojure lexer
* Diego Zamboni -- CFengine3 lexer
+* Enrique Zamudio -- Ceylon lexer
* Alex Zimin -- Nemerle lexer
Many thanks for all contributions!
diff --git a/CHANGES b/CHANGES
index 1bf586e6..117c9d13 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,27 +6,60 @@ http://bitbucket.org/birkenfeld/pygments-main/issues.
Version 1.6
-----------
-(in development)
+(in development, to be released xx January 2013)
- Lexers added:
- * Julia (PR#61)
- * Croc (new name for MiniD)
- * LiveScript (PR#84)
- * Lasso (PR#95)
+ * AspectJ (PR#90)
* BUGS-like languages (PR#89)
- * Rust (PR#67)
+ * Ceylon (PR#86)
+ * Croc (new name for MiniD)
* CUDA (PR#75)
- * Xtend (PR#68)
- * Mscgen (PR#80)
+ * Dg (PR#116)
+ * Jags (PR#89)
+ * Julia (PR#61)
* Kconfig (#711)
- * AspectJ (PR#90)
+ * Lasso (PR#95, PR#113)
+ * LiveScript (PR#84)
+ * Monkey (PR#117)
+ * Mscgen (PR#80)
+ * NSIS scripts (PR#136)
+ * OpenCOBOL (PR#72)
+ * QML (PR#123)
+ * Puppet (PR#133)
* Racket (PR#94)
+ * Rdoc (PR#99)
+ * Robot Framework (PR#137)
+ * RPM spec files (PR#124)
+ * Rust (PR#67)
+ * Smali (Dalvik assembly)
+ * SourcePawn (PR#39)
+ * Stan (PR#89)
+ * Treetop (PR#125)
+ * VGL (PR#12)
+ * Windows Registry (#819)
+ * Xtend (PR#68)
+
+- When deriving a lexer from another lexer with token definitions, definitions
+ for states not in the child lexer are now inherited. If you override a state
+ in the child lexer, an "inherit" keyword has been added to insert the base
+ state at that position (PR#141)
+
+- The C family lexers now inherit token definitions from a common base class,
+ removing code duplication (PR#141)
+
+- Use "colorama" on Windows for console color output (PR#142)
- Fix Template Haskell highlighting (PR#63)
- Fix some S/R lexer errors (PR#91)
+- Fix a bug in the Prolog lexer with names that start with 'is' (#810)
+
+- Rewrite Dylan lexer, add Dylan LID lexer (PR#147)
+
+- Add a Java quickstart document (PR#146)
+
Version 1.5
-----------
diff --git a/LICENSE b/LICENSE
index ca0a3ad3..1e091194 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2006-2012 by the respective authors (see AUTHORS file).
+Copyright (c) 2006-2013 by the respective authors (see AUTHORS file).
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/Makefile b/Makefile
index c8940125..f24dd084 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@
#
# Combines scripts for common tasks.
#
-# :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+# :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
# :license: BSD, see LICENSE for details.
#
diff --git a/docs/generate.py b/docs/generate.py
index 0ceeb58d..f5405074 100755
--- a/docs/generate.py
+++ b/docs/generate.py
@@ -6,7 +6,7 @@
Generates a bunch of html files containing the documentation.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/docs/src/api.txt b/docs/src/api.txt
index b8159379..4276eea2 100644
--- a/docs/src/api.txt
+++ b/docs/src/api.txt
@@ -64,7 +64,7 @@ def `guess_lexer(text, **options):`
def `guess_lexer_for_filename(filename, text, **options):`
As `guess_lexer()`, but only lexers which have a pattern in `filenames`
or `alias_filenames` that matches `filename` are taken into consideration.
-
+
`pygments.util.ClassNotFound` is raised if no lexer thinks it can handle the
content.
diff --git a/docs/src/index.txt b/docs/src/index.txt
index 1fad0f03..b1e099c7 100644
--- a/docs/src/index.txt
+++ b/docs/src/index.txt
@@ -37,7 +37,7 @@ Welcome to the Pygments documentation.
- `Write your own lexer <lexerdevelopment.txt>`_
- `Write your own formatter <formatterdevelopment.txt>`_
-
+
- `Write your own filter <filterdevelopment.txt>`_
- `Register plugins <plugins.txt>`_
diff --git a/docs/src/integrate.txt b/docs/src/integrate.txt
index 51a3dac4..6f8c1253 100644
--- a/docs/src/integrate.txt
+++ b/docs/src/integrate.txt
@@ -41,3 +41,8 @@ Bash completion
The source distribution contains a file ``external/pygments.bashcomp`` that
sets up completion for the ``pygmentize`` command in bash.
+
+Java
+----
+
+See the `Java quickstart <java.txt>`_ document.
diff --git a/docs/src/java.txt b/docs/src/java.txt
new file mode 100644
index 00000000..f40a52d2
--- /dev/null
+++ b/docs/src/java.txt
@@ -0,0 +1,70 @@
+=====================
+Use Pygments in Java
+=====================
+
+Thanks to `Jython <http://www.jython.org>`__ it is possible to use Pygments in
+Java.
+
+This page is a simple tutorial to get an idea of how this is working. You can
+then look at the `Jython documentation <http://www.jython.org/docs/>`__ for more
+advanced use.
+
+Since version 1.5, Pygments is deployed on `Maven Central
+<http://repo1.maven.org/maven2/org/pygments/pygments/>`__ as a JAR so is Jython
+which make it a lot easier to create the Java project.
+
+Here is an example of a `Maven <http://www.maven.org>`__ ``pom.xml`` file for a
+project running Pygments:
+
+.. sourcecode:: xml
+
+ <?xml version="1.0" encoding="UTF-8"?>
+
+ <project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>example</groupId>
+ <artifactId>example</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.python</groupId>
+ <artifactId>jython-standalone</artifactId>
+ <version>2.5.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.pygments</groupId>
+ <artifactId>pygments</artifactId>
+ <version>1.5</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </project>
+
+The following Java example:
+
+.. sourcecode:: java
+
+ PythonInterpreter interpreter = new PythonInterpreter();
+
+ // Set a variable with the content you want to work with
+ interpreter.set("code", code);
+
+ // Simple use Pygments as you would in Python
+ interpreter.exec("from pygments import highlight\n"
+ + "from pygments.lexers import PythonLexer\n"
+ + "from pygments.formatters import HtmlFormatter\n"
+ + "\nresult = highlight(code, PythonLexer(), HtmlFormatter())");
+
+ // Get the result that has been set in a variable
+ System.out.println(interpreter.get("result", String.class));
+
+will print something like:
+
+.. sourcecode:: html
+
+ <div class="highlight">
+ <pre><span class="k">print</span> <span class="s">&quot;Hello World&quot;</span></pre>
+ </div>
diff --git a/external/markdown-processor.py b/external/markdown-processor.py
index 0d939b67..12e64680 100644
--- a/external/markdown-processor.py
+++ b/external/markdown-processor.py
@@ -27,7 +27,7 @@
.. _Markdown: http://www.freewisdom.org/projects/python-markdown/
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -64,4 +64,4 @@ class CodeBlockPreprocessor(TextPreprocessor):
code = code.replace('\n\n', '\n&nbsp;\n').replace('\n', '<br />')
return '\n\n<div class="code">%s</div>\n\n' % code
return self.pattern.sub(
- repl, lines) \ No newline at end of file
+ repl, lines)
diff --git a/external/moin-parser.py b/external/moin-parser.py
index 0bb9791c..6544da1b 100644
--- a/external/moin-parser.py
+++ b/external/moin-parser.py
@@ -31,7 +31,7 @@
If you do not want to do that and are willing to accept larger HTML
output, you can set the INLINESTYLES option below to True.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/external/rst-directive-old.py b/external/rst-directive-old.py
index 8e703faa..a074536f 100644
--- a/external/rst-directive-old.py
+++ b/external/rst-directive-old.py
@@ -31,7 +31,7 @@
.. _directive documentation:
http://docutils.sourceforge.net/docs/howto/rst-directives.html
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/external/rst-directive.py b/external/rst-directive.py
index b54b03ef..5c04038d 100644
--- a/external/rst-directive.py
+++ b/external/rst-directive.py
@@ -31,7 +31,7 @@
.. _directive documentation:
http://docutils.sourceforge.net/docs/howto/rst-directives.html
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/__init__.py b/pygments/__init__.py
index 0ecc167d..cd7bea3a 100644
--- a/pygments/__init__.py
+++ b/pygments/__init__.py
@@ -22,7 +22,7 @@
.. _Pygments tip:
http://bitbucket.org/birkenfeld/pygments-main/get/tip.zip#egg=Pygments-dev
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/cmdline.py b/pygments/cmdline.py
index 1f14cf5d..3bf081d4 100644
--- a/pygments/cmdline.py
+++ b/pygments/cmdline.py
@@ -5,7 +5,7 @@
Command line interface.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import sys
@@ -192,6 +192,14 @@ def main(args=sys.argv):
usage = USAGE % ((args[0],) * 6)
+ if sys.platform in ['win32', 'cygwin']:
+ try:
+ # Provide coloring under Windows, if possible
+ import colorama
+ colorama.init()
+ except ImportError:
+ pass
+
try:
popts, args = getopt.getopt(args[1:], "l:f:F:o:O:P:LS:a:N:hVHg")
except getopt.GetoptError, err:
@@ -219,7 +227,7 @@ def main(args=sys.argv):
return 0
if opts.pop('-V', None) is not None:
- print 'Pygments version %s, (c) 2006-2012 by Georg Brandl.' % __version__
+ print 'Pygments version %s, (c) 2006-2013 by Georg Brandl.' % __version__
return 0
# handle ``pygmentize -L``
diff --git a/pygments/console.py b/pygments/console.py
index 3901bd18..c8dfbd1f 100644
--- a/pygments/console.py
+++ b/pygments/console.py
@@ -5,7 +5,7 @@
Format colored console output.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/filter.py b/pygments/filter.py
index de1bf79c..0b9224f2 100644
--- a/pygments/filter.py
+++ b/pygments/filter.py
@@ -5,7 +5,7 @@
Module that implements the default filter.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/filters/__init__.py b/pygments/filters/__init__.py
index b816c58c..f12d025c 100644
--- a/pygments/filters/__init__.py
+++ b/pygments/filters/__init__.py
@@ -6,7 +6,7 @@
Module containing filter lookup functions and default
filters.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -331,7 +331,6 @@ class TokenMergeFilter(Filter):
Filter.__init__(self, **options)
def filter(self, lexer, stream):
- output = []
current_type = None
current_value = None
for ttype, value in stream:
diff --git a/pygments/formatter.py b/pygments/formatter.py
index 73124846..4b69f2a4 100644
--- a/pygments/formatter.py
+++ b/pygments/formatter.py
@@ -5,7 +5,7 @@
Base formatter class.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/formatters/__init__.py b/pygments/formatters/__init__.py
index da0fd51e..d842b96b 100644
--- a/pygments/formatters/__init__.py
+++ b/pygments/formatters/__init__.py
@@ -5,7 +5,7 @@
Pygments formatters.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import os.path
diff --git a/pygments/formatters/_mapping.py b/pygments/formatters/_mapping.py
index 9d3d7823..a423ba50 100755
--- a/pygments/formatters/_mapping.py
+++ b/pygments/formatters/_mapping.py
@@ -9,7 +9,7 @@
Do not alter the FORMATTERS dictionary by hand.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/formatters/bbcode.py b/pygments/formatters/bbcode.py
index a0d50553..15faff6c 100644
--- a/pygments/formatters/bbcode.py
+++ b/pygments/formatters/bbcode.py
@@ -5,7 +5,7 @@
BBcode formatter.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/formatters/html.py b/pygments/formatters/html.py
index 85a16ff8..075ad022 100644
--- a/pygments/formatters/html.py
+++ b/pygments/formatters/html.py
@@ -5,7 +5,7 @@
Formatter for HTML output.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -596,7 +596,8 @@ class HtmlFormatter(Formatter):
def _wrap_lineanchors(self, inner):
s = self.lineanchors
- i = self.linenostart - 1 # subtract 1 since we have to increment i *before* yielding
+ i = self.linenostart - 1 # subtract 1 since we have to increment i
+ # *before* yielding
for t, line in inner:
if t:
i += 1
diff --git a/pygments/formatters/img.py b/pygments/formatters/img.py
index 609aa54c..394c3b6a 100644
--- a/pygments/formatters/img.py
+++ b/pygments/formatters/img.py
@@ -5,7 +5,7 @@
Formatter for Pixmap output.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/formatters/latex.py b/pygments/formatters/latex.py
index fcd5f379..47fd1239 100644
--- a/pygments/formatters/latex.py
+++ b/pygments/formatters/latex.py
@@ -5,7 +5,7 @@
Formatter for LaTeX fancyvrb output.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/formatters/other.py b/pygments/formatters/other.py
index a19e4ce0..1029a7a7 100644
--- a/pygments/formatters/other.py
+++ b/pygments/formatters/other.py
@@ -5,7 +5,7 @@
Other formatters: NullFormatter, RawTokenFormatter.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -102,8 +102,6 @@ class RawTokenFormatter(Formatter):
outfile.write(text.encode())
flush = outfile.flush
- lasttype = None
- lastval = u''
if self.error_color:
for ttype, value in tokensource:
line = "%s\t%r\n" % (ttype, value)
diff --git a/pygments/formatters/rtf.py b/pygments/formatters/rtf.py
index 5627d070..3efda284 100644
--- a/pygments/formatters/rtf.py
+++ b/pygments/formatters/rtf.py
@@ -5,7 +5,7 @@
A formatter that generates RTF files.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/formatters/svg.py b/pygments/formatters/svg.py
index f08e6570..271f22a7 100644
--- a/pygments/formatters/svg.py
+++ b/pygments/formatters/svg.py
@@ -5,7 +5,7 @@
Formatter for SVG output.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/formatters/terminal.py b/pygments/formatters/terminal.py
index dae00157..94e078f2 100644
--- a/pygments/formatters/terminal.py
+++ b/pygments/formatters/terminal.py
@@ -5,7 +5,7 @@
Formatter for terminal output with ANSI sequences.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/formatters/terminal256.py b/pygments/formatters/terminal256.py
index cbd30be1..772ed423 100644
--- a/pygments/formatters/terminal256.py
+++ b/pygments/formatters/terminal256.py
@@ -11,7 +11,7 @@
Formatter version 1.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/lexer.py b/pygments/lexer.py
index ad2c72d1..b2af789b 100644
--- a/pygments/lexer.py
+++ b/pygments/lexer.py
@@ -5,10 +5,10 @@
Base lexer classes.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
-import re
+import re, itertools
from pygments.filter import apply_filters, Filter
from pygments.filters import get_filter_by_name
@@ -18,7 +18,7 @@ from pygments.util import get_bool_opt, get_int_opt, get_list_opt, \
__all__ = ['Lexer', 'RegexLexer', 'ExtendedRegexLexer', 'DelegatingLexer',
- 'LexerContext', 'include', 'bygroups', 'using', 'this']
+ 'LexerContext', 'include', 'inherit', 'bygroups', 'using', 'this']
_encoding_map = [('\xef\xbb\xbf', 'utf-8'),
@@ -72,15 +72,18 @@ class Lexer(object):
#: Shortcuts for the lexer
aliases = []
- #: fn match rules
+ #: File name globs
filenames = []
- #: fn alias filenames
+ #: Secondary file name globs
alias_filenames = []
- #: mime types
+ #: MIME types
mimetypes = []
+ #: Priority, should multiple lexers match and no content is provided
+ priority = 0
+
__metaclass__ = LexerMeta
def __init__(self, **options):
@@ -163,6 +166,10 @@ class Lexer(object):
text = decoded
else:
text = text.decode(self.encoding)
+ else:
+ if text.startswith(u'\ufeff'):
+ text = text[len(u'\ufeff'):]
+
# text now *is* a unicode string
text = text.replace('\r\n', '\n')
text = text.replace('\r', '\n')
@@ -238,6 +245,16 @@ class include(str):
pass
+class _inherit(object):
+ """
+ Indicates the a state should inherit from its superclass.
+ """
+ def __repr__(self):
+ return 'inherit'
+
+inherit = _inherit()
+
+
class combined(tuple):
"""
Indicates a state combined from multiple states.
@@ -428,6 +445,9 @@ class RegexLexerMeta(LexerMeta):
tokens.extend(cls._process_state(unprocessed, processed,
str(tdef)))
continue
+ if isinstance(tdef, _inherit):
+ # processed already
+ continue
assert type(tdef) is tuple, "wrong rule def %r" % tdef
@@ -456,6 +476,49 @@ class RegexLexerMeta(LexerMeta):
cls._process_state(tokendefs, processed, state)
return processed
+ def get_tokendefs(cls):
+ """
+ Merge tokens from superclasses in MRO order, returning a single tokendef
+ dictionary.
+
+ Any state that is not defined by a subclass will be inherited
+ automatically. States that *are* defined by subclasses will, by
+ default, override that state in the superclass. If a subclass wishes to
+ inherit definitions from a superclass, it can use the special value
+ "inherit", which will cause the superclass' state definition to be
+ included at that point in the state.
+ """
+ tokens = {}
+ inheritable = {}
+ for c in itertools.chain((cls,), cls.__mro__):
+ toks = c.__dict__.get('tokens', {})
+
+ for state, items in toks.iteritems():
+ curitems = tokens.get(state)
+ if curitems is None:
+ tokens[state] = items
+ try:
+ inherit_ndx = items.index(inherit)
+ except ValueError:
+ continue
+ inheritable[state] = inherit_ndx
+ continue
+
+ inherit_ndx = inheritable.pop(state, None)
+ if inherit_ndx is None:
+ continue
+
+ # Replace the "inherit" value with the items
+ curitems[inherit_ndx:inherit_ndx+1] = items
+ try:
+ new_inh_ndx = items.index(inherit)
+ except ValueError:
+ pass
+ else:
+ inheritable[state] = inherit_ndx + new_inh_ndx
+
+ return tokens
+
def __call__(cls, *args, **kwds):
"""Instantiate cls after preprocessing its token definitions."""
if '_tokens' not in cls.__dict__:
@@ -465,7 +528,7 @@ class RegexLexerMeta(LexerMeta):
# don't process yet
pass
else:
- cls._tokens = cls.process_tokendef('', cls.tokens)
+ cls._tokens = cls.process_tokendef('', cls.get_tokendefs())
return type.__call__(cls, *args, **kwds)
@@ -606,7 +669,13 @@ class ExtendedRegexLexer(RegexLexer):
if new_state is not None:
# state transition
if isinstance(new_state, tuple):
- ctx.stack.extend(new_state)
+ for state in new_state:
+ if state == '#pop':
+ ctx.stack.pop()
+ elif state == '#push':
+ ctx.stack.append(statestack[-1])
+ else:
+ ctx.stack.append(state)
elif isinstance(new_state, int):
# pop
del ctx.stack[new_state:]
@@ -694,4 +763,3 @@ def do_insertions(insertions, tokens):
except StopIteration:
insleft = False
break # not strictly necessary
-
diff --git a/pygments/lexers/__init__.py b/pygments/lexers/__init__.py
index eb8609d4..9af6ce68 100644
--- a/pygments/lexers/__init__.py
+++ b/pygments/lexers/__init__.py
@@ -5,7 +5,7 @@
Pygments lexers.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -113,7 +113,7 @@ def get_lexer_for_filename(_fn, code=None, **options):
# to find lexers which need it overridden.
if code:
return cls.analyse_text(code) + bonus
- return bonus
+ return cls.priority + bonus
if matches:
matches.sort(key=get_rating)
diff --git a/pygments/lexers/_asybuiltins.py b/pygments/lexers/_asybuiltins.py
index d2edace6..108fa199 100644
--- a/pygments/lexers/_asybuiltins.py
+++ b/pygments/lexers/_asybuiltins.py
@@ -10,7 +10,7 @@
TODO: perl/python script in Asymptote SVN similar to asy-list.pl but only
for function and variable names.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/lexers/_clbuiltins.py b/pygments/lexers/_clbuiltins.py
index 3a3b3dfc..59f948ba 100644
--- a/pygments/lexers/_clbuiltins.py
+++ b/pygments/lexers/_clbuiltins.py
@@ -5,7 +5,7 @@
ANSI Common Lisp builtins.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/lexers/_lassobuiltins.py b/pygments/lexers/_lassobuiltins.py
index e609daf7..08b65f37 100644
--- a/pygments/lexers/_lassobuiltins.py
+++ b/pygments/lexers/_lassobuiltins.py
@@ -1,9 +1,12 @@
# -*- coding: utf-8 -*-
"""
pygments.lexers._lassobuiltins
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Built-in Lasso types, traits, and methods.
+
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
"""
BUILTINS = {
diff --git a/pygments/lexers/_luabuiltins.py b/pygments/lexers/_luabuiltins.py
index 27b39822..069c44fd 100644
--- a/pygments/lexers/_luabuiltins.py
+++ b/pygments/lexers/_luabuiltins.py
@@ -9,7 +9,7 @@
Do not edit the MODULES dict by hand.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/lexers/_mapping.py b/pygments/lexers/_mapping.py
index 1e69add0..2ea351b3 100644
--- a/pygments/lexers/_mapping.py
+++ b/pygments/lexers/_mapping.py
@@ -9,7 +9,7 @@
Do not alter the LEXERS dictionary by hand.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -50,20 +50,22 @@ LEXERS = {
'CSharpAspxLexer': ('pygments.lexers.dotnet', 'aspx-cs', ('aspx-cs',), ('*.aspx', '*.asax', '*.ascx', '*.ashx', '*.asmx', '*.axd'), ()),
'CSharpLexer': ('pygments.lexers.dotnet', 'C#', ('csharp', 'c#'), ('*.cs',), ('text/x-csharp',)),
'Ca65Lexer': ('pygments.lexers.asm', 'ca65', ('ca65',), ('*.s',), ()),
- 'CUDALexer': ('pygments.lexers.compiled', 'CUDA', ('cuda', 'cu'), ('*.cu', '*.cuh'), ('text/x-cuda',)),
'CbmBasicV2Lexer': ('pygments.lexers.other', 'CBM BASIC V2', ('cbmbas',), ('*.bas',), ()),
+ 'CeylonLexer': ('pygments.lexers.jvm', 'Ceylon', ('ceylon',), ('*.ceylon',), ('text/x-ceylon',)),
'Cfengine3Lexer': ('pygments.lexers.other', 'CFEngine3', ('cfengine3', 'cf3'), ('*.cf',), ()),
'CheetahHtmlLexer': ('pygments.lexers.templates', 'HTML+Cheetah', ('html+cheetah', 'html+spitfire'), (), ('text/html+cheetah', 'text/html+spitfire')),
'CheetahJavascriptLexer': ('pygments.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')),
'CheetahLexer': ('pygments.lexers.templates', 'Cheetah', ('cheetah', 'spitfire'), ('*.tmpl', '*.spt'), ('application/x-cheetah', 'application/x-spitfire')),
'CheetahXmlLexer': ('pygments.lexers.templates', 'XML+Cheetah', ('xml+cheetah', 'xml+spitfire'), (), ('application/xml+cheetah', 'application/xml+spitfire')),
'ClojureLexer': ('pygments.lexers.jvm', 'Clojure', ('clojure', 'clj'), ('*.clj',), ('text/x-clojure', 'application/x-clojure')),
+ 'CobolFreeformatLexer': ('pygments.lexers.compiled', 'COBOLFree', ('cobolfree',), ('*.cbl', '*.CBL'), ()),
+ 'CobolLexer': ('pygments.lexers.compiled', 'COBOL', ('cobol',), ('*.cob', '*.COB', '*.cpy', '*.CPY'), ('text/x-cobol',)),
'CoffeeScriptLexer': ('pygments.lexers.web', 'CoffeeScript', ('coffee-script', 'coffeescript'), ('*.coffee',), ('text/coffeescript',)),
'ColdfusionHtmlLexer': ('pygments.lexers.templates', 'Coldfusion HTML', ('cfm',), ('*.cfm', '*.cfml', '*.cfc'), ('application/x-coldfusion',)),
'ColdfusionLexer': ('pygments.lexers.templates', 'cfstatement', ('cfs',), (), ()),
'CommonLispLexer': ('pygments.lexers.functional', 'Common Lisp', ('common-lisp', 'cl'), ('*.cl', '*.lisp', '*.el'), ('text/x-common-lisp',)),
'CoqLexer': ('pygments.lexers.functional', 'Coq', ('coq',), ('*.v',), ('text/x-coq',)),
- 'CppLexer': ('pygments.lexers.compiled', 'C++', ('cpp', 'c++'), ('*.cpp', '*.hpp', '*.c++', '*.h++', '*.cc', '*.hh', '*.cxx', '*.hxx'), ('text/x-c++hdr', 'text/x-c++src')),
+ 'CppLexer': ('pygments.lexers.compiled', 'C++', ('cpp', 'c++'), ('*.cpp', '*.hpp', '*.c++', '*.h++', '*.cc', '*.hh', '*.cxx', '*.hxx', '*.C', '*.H', '*.cp', '*.CPP'), ('text/x-c++hdr', 'text/x-c++src')),
'CppObjdumpLexer': ('pygments.lexers.asm', 'cpp-objdump', ('cpp-objdump', 'c++-objdumb', 'cxx-objdump'), ('*.cpp-objdump', '*.c++-objdump', '*.cxx-objdump'), ('text/x-cpp-objdump',)),
'CrocLexer': ('pygments.lexers.agile', 'Croc', ('croc',), ('*.croc',), ('text/x-crocsrc',)),
'CssDjangoLexer': ('pygments.lexers.templates', 'CSS+Django/Jinja', ('css+django', 'css+jinja'), (), ('text/css+django', 'text/css+jinja')),
@@ -72,6 +74,7 @@ LEXERS = {
'CssLexer': ('pygments.lexers.web', 'CSS', ('css',), ('*.css',), ('text/css',)),
'CssPhpLexer': ('pygments.lexers.templates', 'CSS+PHP', ('css+php',), (), ('text/css+php',)),
'CssSmartyLexer': ('pygments.lexers.templates', 'CSS+Smarty', ('css+smarty',), (), ('text/css+smarty',)),
+ 'CudaLexer': ('pygments.lexers.compiled', 'CUDA', ('cuda', 'cu'), ('*.cu', '*.cuh'), ('text/x-cuda',)),
'CythonLexer': ('pygments.lexers.compiled', 'Cython', ('cython', 'pyx'), ('*.pyx', '*.pxd', '*.pxi'), ('text/x-cython', 'application/x-cython')),
'DLexer': ('pygments.lexers.compiled', 'D', ('d',), ('*.d', '*.di'), ('text/x-dsrc',)),
'DObjdumpLexer': ('pygments.lexers.asm', 'd-objdump', ('d-objdump',), ('*.d-objdump',), ('text/x-d-objdump',)),
@@ -79,11 +82,13 @@ LEXERS = {
'DartLexer': ('pygments.lexers.web', 'Dart', ('dart',), ('*.dart',), ('text/x-dart',)),
'DebianControlLexer': ('pygments.lexers.text', 'Debian Control file', ('control',), ('control',), ()),
'DelphiLexer': ('pygments.lexers.compiled', 'Delphi', ('delphi', 'pas', 'pascal', 'objectpascal'), ('*.pas',), ('text/x-pascal',)),
+ 'DgLexer': ('pygments.lexers.agile', 'dg', ('dg',), ('*.dg',), ('text/x-dg',)),
'DiffLexer': ('pygments.lexers.text', 'Diff', ('diff', 'udiff'), ('*.diff', '*.patch'), ('text/x-diff', 'text/x-patch')),
'DjangoLexer': ('pygments.lexers.templates', 'Django/Jinja', ('django', 'jinja'), (), ('application/x-django-templating', 'application/x-jinja')),
'DtdLexer': ('pygments.lexers.web', 'DTD', ('dtd',), ('*.dtd',), ('application/xml-dtd',)),
'DuelLexer': ('pygments.lexers.web', 'Duel', ('duel', 'Duel Engine', 'Duel View', 'JBST', 'jbst', 'JsonML+BST'), ('*.duel', '*.jbst'), ('text/x-duel', 'text/x-jbst')),
- 'DylanLexer': ('pygments.lexers.compiled', 'Dylan', ('dylan',), ('*.dylan', '*.dyl'), ('text/x-dylan',)),
+ 'DylanLexer': ('pygments.lexers.compiled', 'Dylan', ('dylan',), ('*.dylan', '*.dyl', '*.intr'), ('text/x-dylan',)),
+ 'DylanLidLexer': ('pygments.lexers.compiled', 'DylanLID', ('dylan-lid', 'lid'), ('*.lid', '*.hdp'), ('text/x-dylan-lid',)),
'ECLLexer': ('pygments.lexers.other', 'ECL', ('ecl',), ('*.ecl',), ('application/x-ecl',)),
'ECLexer': ('pygments.lexers.compiled', 'eC', ('ec',), ('*.ec', '*.eh'), ('text/x-echdr', 'text/x-ecsrc')),
'ElixirConsoleLexer': ('pygments.lexers.functional', 'Elixir iex session', ('iex',), (), ('text/x-elixir-shellsession',)),
@@ -122,6 +127,7 @@ LEXERS = {
'HtmlPhpLexer': ('pygments.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')),
'HtmlSmartyLexer': ('pygments.lexers.templates', 'HTML+Smarty', ('html+smarty',), (), ('text/html+smarty',)),
'HttpLexer': ('pygments.lexers.text', 'HTTP', ('http',), (), ()),
+ 'HxmlLexer': ('pygments.lexers.text', 'Hxml', ('haxeml', 'hxml'), ('*.hxml',), ()),
'HybrisLexer': ('pygments.lexers.other', 'Hybris', ('hybris', 'hy'), ('*.hy', '*.hyb'), ('text/x-hybris', 'application/x-hybris')),
'IniLexer': ('pygments.lexers.text', 'INI', ('ini', 'cfg'), ('*.ini', '*.cfg'), ('text/x-ini',)),
'IoLexer': ('pygments.lexers.agile', 'Io', ('io',), ('*.io',), ('text/x-iosrc',)),
@@ -141,6 +147,7 @@ LEXERS = {
'JuliaConsoleLexer': ('pygments.lexers.math', 'Julia console', ('jlcon',), (), ()),
'JuliaLexer': ('pygments.lexers.math', 'Julia', ('julia', 'jl'), ('*.jl',), ('text/x-julia', 'application/x-julia')),
'KconfigLexer': ('pygments.lexers.other', 'Kconfig', ('kconfig', 'menuconfig', 'linux-config', 'kernel-config'), ('Kconfig', '*Config.in*', 'external.in*', 'standard-modules.in'), ('text/x-kconfig',)),
+ 'KokaLexer': ('pygments.lexers.functional', 'Koka', ('koka',), ('*.kk', '*.kki'), ('text/x-koka',)),
'KotlinLexer': ('pygments.lexers.jvm', 'Kotlin', ('kotlin',), ('*.kt',), ('text/x-kotlin',)),
'LassoCssLexer': ('pygments.lexers.templates', 'CSS+Lasso', ('css+lasso',), (), ('text/css+lasso',)),
'LassoHtmlLexer': ('pygments.lexers.templates', 'HTML+Lasso', ('html+lasso',), (), ('text/html+lasso', 'application/x-httpd-lasso', 'application/x-httpd-lasso[89]')),
@@ -168,6 +175,7 @@ LEXERS = {
'ModelicaLexer': ('pygments.lexers.other', 'Modelica', ('modelica',), ('*.mo',), ('text/x-modelica',)),
'Modula2Lexer': ('pygments.lexers.compiled', 'Modula-2', ('modula2', 'm2'), ('*.def', '*.mod'), ('text/x-modula2',)),
'MoinWikiLexer': ('pygments.lexers.text', 'MoinMoin/Trac Wiki markup', ('trac-wiki', 'moin'), (), ('text/x-trac-wiki',)),
+ 'MonkeyLexer': ('pygments.lexers.compiled', 'Monkey', ('monkey',), ('*.monkey',), ('text/x-monkey',)),
'MoonScriptLexer': ('pygments.lexers.agile', 'MoonScript', ('moon', 'moonscript'), ('*.moon',), ('text/x-moonscript', 'application/x-moonscript')),
'MscgenLexer': ('pygments.lexers.other', 'Mscgen', ('mscgen', 'msc'), ('*.msc',), ()),
'MuPADLexer': ('pygments.lexers.math', 'MuPAD', ('mupad',), ('*.mu',), ()),
@@ -178,6 +186,7 @@ LEXERS = {
'MyghtyJavascriptLexer': ('pygments.lexers.templates', 'JavaScript+Myghty', ('js+myghty', 'javascript+myghty'), (), ('application/x-javascript+myghty', 'text/x-javascript+myghty', 'text/javascript+mygthy')),
'MyghtyLexer': ('pygments.lexers.templates', 'Myghty', ('myghty',), ('*.myt', 'autodelegate'), ('application/x-myghty',)),
'MyghtyXmlLexer': ('pygments.lexers.templates', 'XML+Myghty', ('xml+myghty',), (), ('application/xml+myghty',)),
+ 'NSISLexer': ('pygments.lexers.other', 'NSIS', ('nsis', 'nsi', 'nsh'), ('*.nsi', '*.nsh'), ('text/x-nsis',)),
'NasmLexer': ('pygments.lexers.asm', 'NASM', ('nasm',), ('*.asm', '*.ASM'), ('text/x-nasm',)),
'NemerleLexer': ('pygments.lexers.dotnet', 'Nemerle', ('nemerle',), ('*.n',), ('text/x-nemerle',)),
'NewLispLexer': ('pygments.lexers.functional', 'NewLisp', ('newlisp',), ('*.lsp', '*.nl'), ('text/x-newlisp', 'application/x-newlisp')),
@@ -186,7 +195,8 @@ LEXERS = {
'NimrodLexer': ('pygments.lexers.compiled', 'Nimrod', ('nimrod', 'nim'), ('*.nim', '*.nimrod'), ('text/x-nimrod',)),
'NumPyLexer': ('pygments.lexers.math', 'NumPy', ('numpy',), (), ()),
'ObjdumpLexer': ('pygments.lexers.asm', 'objdump', ('objdump',), ('*.objdump',), ('text/x-objdump',)),
- 'ObjectiveCLexer': ('pygments.lexers.compiled', 'Objective-C', ('objective-c', 'objectivec', 'obj-c', 'objc'), ('*.m',), ('text/x-objective-c',)),
+ 'ObjectiveCLexer': ('pygments.lexers.compiled', 'Objective-C', ('objective-c', 'objectivec', 'obj-c', 'objc'), ('*.m', '*.h'), ('text/x-objective-c',)),
+ 'ObjectiveCppLexer': ('pygments.lexers.compiled', 'Objective-C++', ('objective-c++', 'objectivec++', 'obj-c++', 'objc++'), ('*.mm', '*.hh'), ('text/x-objective-c++',)),
'ObjectiveJLexer': ('pygments.lexers.web', 'Objective-J', ('objective-j', 'objectivej', 'obj-j', 'objj'), ('*.j',), ('text/x-objective-j',)),
'OcamlLexer': ('pygments.lexers.functional', 'OCaml', ('ocaml',), ('*.ml', '*.mli', '*.mll', '*.mly'), ('text/x-ocaml',)),
'OctaveLexer': ('pygments.lexers.math', 'Octave', ('octave',), ('*.m',), ('text/octave',)),
@@ -204,13 +214,16 @@ LEXERS = {
'PrologLexer': ('pygments.lexers.compiled', 'Prolog', ('prolog',), ('*.prolog', '*.pro', '*.pl'), ('text/x-prolog',)),
'PropertiesLexer': ('pygments.lexers.text', 'Properties', ('properties',), ('*.properties',), ('text/x-java-properties',)),
'ProtoBufLexer': ('pygments.lexers.other', 'Protocol Buffer', ('protobuf',), ('*.proto',), ()),
+ 'PuppetLexer': ('pygments.lexers.other', 'Puppet', ('puppet',), ('*.pp',), ()),
'PyPyLogLexer': ('pygments.lexers.text', 'PyPy Log', ('pypylog', 'pypy'), ('*.pypylog',), ('application/x-pypylog',)),
'Python3Lexer': ('pygments.lexers.agile', 'Python 3', ('python3', 'py3'), (), ('text/x-python3', 'application/x-python3')),
'Python3TracebackLexer': ('pygments.lexers.agile', 'Python 3.0 Traceback', ('py3tb',), ('*.py3tb',), ('text/x-python3-traceback',)),
'PythonConsoleLexer': ('pygments.lexers.agile', 'Python console session', ('pycon',), (), ('text/x-python-doctest',)),
'PythonLexer': ('pygments.lexers.agile', 'Python', ('python', 'py', 'sage'), ('*.py', '*.pyw', '*.sc', 'SConstruct', 'SConscript', '*.tac', '*.sage'), ('text/x-python', 'application/x-python')),
'PythonTracebackLexer': ('pygments.lexers.agile', 'Python Traceback', ('pytb',), ('*.pytb',), ('text/x-python-traceback',)),
+ 'QmlLexer': ('pygments.lexers.web', 'QML', ('qml', 'Qt Meta Language', 'Qt modeling Language'), ('*.qml',), ('application/x-qml',)),
'RConsoleLexer': ('pygments.lexers.math', 'RConsole', ('rconsole', 'rout'), ('*.Rout',), ()),
+ 'RPMSpecLexer': ('pygments.lexers.other', 'RPMSpec', ('spec',), ('*.spec',), ('text/x-rpm-spec',)),
'RacketLexer': ('pygments.lexers.functional', 'Racket', ('racket', 'rkt'), ('*.rkt', '*.rktl'), ('text/x-racket', 'application/x-racket')),
'RagelCLexer': ('pygments.lexers.parsers', 'Ragel in C Host', ('ragel-c',), ('*.rl',), ()),
'RagelCppLexer': ('pygments.lexers.parsers', 'Ragel in CPP Host', ('ragel-cpp',), ('*.rl',), ()),
@@ -221,9 +234,12 @@ LEXERS = {
'RagelObjectiveCLexer': ('pygments.lexers.parsers', 'Ragel in Objective C Host', ('ragel-objc',), ('*.rl',), ()),
'RagelRubyLexer': ('pygments.lexers.parsers', 'Ragel in Ruby Host', ('ragel-ruby', 'ragel-rb'), ('*.rl',), ()),
'RawTokenLexer': ('pygments.lexers.special', 'Raw token data', ('raw',), (), ('application/x-pygments-tokens',)),
+ 'RdLexer': ('pygments.lexers.math', 'Rd', ('rd',), ('*.Rd',), ('text/x-r-doc',)),
'RebolLexer': ('pygments.lexers.other', 'REBOL', ('rebol',), ('*.r', '*.r3'), ('text/x-rebol',)),
'RedcodeLexer': ('pygments.lexers.other', 'Redcode', ('redcode',), ('*.cw',), ()),
+ 'RegeditLexer': ('pygments.lexers.text', 'reg', (), ('*.reg',), ('text/x-windows-registry',)),
'RhtmlLexer': ('pygments.lexers.templates', 'RHTML', ('rhtml', 'html+erb', 'html+ruby'), ('*.rhtml',), ('text/html+ruby',)),
+ 'RobotFrameworkLexer': ('pygments.lexers.other', 'RobotFramework', ('RobotFramework', 'robotframework'), ('*.txt',), ('text/x-robotframework',)),
'RstLexer': ('pygments.lexers.text', 'reStructuredText', ('rst', 'rest', 'restructuredtext'), ('*.rst', '*.rest'), ('text/x-rst', 'text/prs.fallenstein.rst')),
'RubyConsoleLexer': ('pygments.lexers.agile', 'Ruby irb session', ('rbcon', 'irb'), (), ('text/x-ruby-shellsession',)),
'RubyLexer': ('pygments.lexers.agile', 'Ruby', ('rb', 'ruby', 'duby'), ('*.rb', '*.rbw', 'Rakefile', '*.rake', '*.gemspec', '*.rbx', '*.duby'), ('text/x-ruby', 'application/x-ruby')),
@@ -236,9 +252,11 @@ LEXERS = {
'SchemeLexer': ('pygments.lexers.functional', 'Scheme', ('scheme', 'scm'), ('*.scm', '*.ss'), ('text/x-scheme', 'application/x-scheme')),
'ScilabLexer': ('pygments.lexers.math', 'Scilab', ('scilab',), ('*.sci', '*.sce', '*.tst'), ('text/scilab',)),
'ScssLexer': ('pygments.lexers.web', 'SCSS', ('scss',), ('*.scss',), ('text/x-scss',)),
+ 'SmaliLexer': ('pygments.lexers.dalvik', 'Smali', ('smali',), ('*.smali',), ('text/smali',)),
'SmalltalkLexer': ('pygments.lexers.other', 'Smalltalk', ('smalltalk', 'squeak'), ('*.st',), ('text/x-smalltalk',)),
'SmartyLexer': ('pygments.lexers.templates', 'Smarty', ('smarty',), ('*.tpl',), ('application/x-smarty',)),
'SnobolLexer': ('pygments.lexers.other', 'Snobol', ('snobol',), ('*.snobol',), ('text/x-snobol',)),
+ 'SourcePawnLexer': ('pygments.lexers.other', 'SourcePawn', ('sp',), ('*.sp',), ('text/x-sourcepawn',)),
'SourcesListLexer': ('pygments.lexers.text', 'Debian Sourcelist', ('sourceslist', 'sources.list'), ('sources.list',), ()),
'SqlLexer': ('pygments.lexers.sql', 'SQL', ('sql',), ('*.sql',), ('text/x-sql',)),
'SqliteConsoleLexer': ('pygments.lexers.sql', 'sqlite3con', ('sqlite3',), ('*.sqlite3-console',), ('text/x-sqlite3-console',)),
@@ -251,7 +269,9 @@ LEXERS = {
'TeaTemplateLexer': ('pygments.lexers.templates', 'Tea', ('tea',), ('*.tea',), ('text/x-tea',)),
'TexLexer': ('pygments.lexers.text', 'TeX', ('tex', 'latex'), ('*.tex', '*.aux', '*.toc'), ('text/x-tex', 'text/x-latex')),
'TextLexer': ('pygments.lexers.special', 'Text only', ('text',), ('*.txt',), ('text/plain',)),
+ 'TreetopLexer': ('pygments.lexers.parsers', 'Treetop', ('treetop',), ('*.treetop', '*.tt'), ()),
'UrbiscriptLexer': ('pygments.lexers.other', 'UrbiScript', ('urbiscript',), ('*.u',), ('application/x-urbiscript',)),
+ 'VGLLexer': ('pygments.lexers.other', 'VGL', ('vgl',), ('*.rpf',), ()),
'ValaLexer': ('pygments.lexers.compiled', 'Vala', ('vala', 'vapi'), ('*.vala', '*.vapi'), ('text/x-vala',)),
'VbNetAspxLexer': ('pygments.lexers.dotnet', 'aspx-vb', ('aspx-vb',), ('*.aspx', '*.asax', '*.ascx', '*.ashx', '*.asmx', '*.axd'), ()),
'VbNetLexer': ('pygments.lexers.dotnet', 'VB.net', ('vb.net', 'vbnet'), ('*.vb', '*.bas'), ('text/x-vbnet', 'text/x-vba')),
@@ -311,4 +331,3 @@ if __name__ == '__main__':
f.write('LEXERS = {\n %s,\n}\n\n' % ',\n '.join(found_lexers))
f.write(footer)
f.close()
-
diff --git a/pygments/lexers/_openedgebuiltins.py b/pygments/lexers/_openedgebuiltins.py
new file mode 100644
index 00000000..4561b07b
--- /dev/null
+++ b/pygments/lexers/_openedgebuiltins.py
@@ -0,0 +1,562 @@
+# -*- coding: utf-8 -*-
+"""
+ pygments.lexers._openedgebuiltins
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Builtin list for the OpenEdgeLexer.
+
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+OPENEDGEKEYWORDS = [
+ 'ABSOLUTE', 'ABS', 'ABSO', 'ABSOL', 'ABSOLU', 'ABSOLUT', 'ACCELERATOR',
+ 'ACCUM', 'ACCUMULATE', 'ACCUM', 'ACCUMU', 'ACCUMUL', 'ACCUMULA',
+ 'ACCUMULAT', 'ACTIVE-FORM', 'ACTIVE-WINDOW', 'ADD', 'ADD-BUFFER',
+ 'ADD-CALC-COLUMN', 'ADD-COLUMNS-FROM', 'ADD-EVENTS-PROCEDURE',
+ 'ADD-FIELDS-FROM', 'ADD-FIRST', 'ADD-INDEX-FIELD', 'ADD-LAST',
+ 'ADD-LIKE-COLUMN', 'ADD-LIKE-FIELD', 'ADD-LIKE-INDEX', 'ADD-NEW-FIELD',
+ 'ADD-NEW-INDEX', 'ADD-SCHEMA-LOCATION', 'ADD-SUPER-PROCEDURE', 'ADM-DATA',
+ 'ADVISE', 'ALERT-BOX', 'ALIAS', 'ALL', 'ALLOW-COLUMN-SEARCHING',
+ 'ALLOW-REPLICATION', 'ALTER', 'ALWAYS-ON-TOP', 'AMBIGUOUS', 'AMBIG',
+ 'AMBIGU', 'AMBIGUO', 'AMBIGUOU', 'ANALYZE', 'ANALYZ', 'AND', 'ANSI-ONLY',
+ 'ANY', 'ANYWHERE', 'APPEND', 'APPL-ALERT-BOXES', 'APPL-ALERT',
+ 'APPL-ALERT-', 'APPL-ALERT-B', 'APPL-ALERT-BO', 'APPL-ALERT-BOX',
+ 'APPL-ALERT-BOXE', 'APPL-CONTEXT-ID', 'APPLICATION', 'APPLY',
+ 'APPSERVER-INFO', 'APPSERVER-PASSWORD', 'APPSERVER-USERID', 'ARRAY-MESSAGE',
+ 'AS', 'ASC', 'ASCENDING', 'ASCE', 'ASCEN', 'ASCEND', 'ASCENDI', 'ASCENDIN',
+ 'ASK-OVERWRITE', 'ASSEMBLY', 'ASSIGN', 'ASYNCHRONOUS',
+ 'ASYNC-REQUEST-COUNT', 'ASYNC-REQUEST-HANDLE', 'AT', 'ATTACHED-PAIRLIST',
+ 'ATTR-SPACE', 'ATTR', 'ATTRI', 'ATTRIB', 'ATTRIBU', 'ATTRIBUT',
+ 'AUDIT-CONTROL', 'AUDIT-ENABLED', 'AUDIT-EVENT-CONTEXT', 'AUDIT-POLICY',
+ 'AUTHENTICATION-FAILED', 'AUTHORIZATION', 'AUTO-COMPLETION', 'AUTO-COMP',
+ 'AUTO-COMPL', 'AUTO-COMPLE', 'AUTO-COMPLET', 'AUTO-COMPLETI',
+ 'AUTO-COMPLETIO', 'AUTO-ENDKEY', 'AUTO-END-KEY', 'AUTO-GO', 'AUTO-INDENT',
+ 'AUTO-IND', 'AUTO-INDE', 'AUTO-INDEN', 'AUTOMATIC', 'AUTO-RESIZE',
+ 'AUTO-RETURN', 'AUTO-RET', 'AUTO-RETU', 'AUTO-RETUR', 'AUTO-SYNCHRONIZE',
+ 'AUTO-ZAP', 'AUTO-Z', 'AUTO-ZA', 'AVAILABLE', 'AVAIL', 'AVAILA', 'AVAILAB',
+ 'AVAILABL', 'AVAILABLE-FORMATS', 'AVERAGE', 'AVE', 'AVER', 'AVERA',
+ 'AVERAG', 'AVG', 'BACKGROUND', 'BACK', 'BACKG', 'BACKGR', 'BACKGRO',
+ 'BACKGROU', 'BACKGROUN', 'BACKWARDS', 'BACKWARD', 'BASE64-DECODE',
+ 'BASE64-ENCODE', 'BASE-ADE', 'BASE-KEY', 'BATCH-MODE', 'BATCH', 'BATCH-',
+ 'BATCH-M', 'BATCH-MO', 'BATCH-MOD', 'BATCH-SIZE', 'BEFORE-HIDE', 'BEFORE-H',
+ 'BEFORE-HI', 'BEFORE-HID', 'BEGIN-EVENT-GROUP', 'BEGINS', 'BELL', 'BETWEEN',
+ 'BGCOLOR', 'BGC', 'BGCO', 'BGCOL', 'BGCOLO', 'BIG-ENDIAN', 'BINARY', 'BIND',
+ 'BIND-WHERE', 'BLANK', 'BLOCK-ITERATION-DISPLAY', 'BORDER-BOTTOM-CHARS',
+ 'BORDER-B', 'BORDER-BO', 'BORDER-BOT', 'BORDER-BOTT', 'BORDER-BOTTO',
+ 'BORDER-BOTTOM-PIXELS', 'BORDER-BOTTOM-P', 'BORDER-BOTTOM-PI',
+ 'BORDER-BOTTOM-PIX', 'BORDER-BOTTOM-PIXE', 'BORDER-BOTTOM-PIXEL',
+ 'BORDER-LEFT-CHARS', 'BORDER-L', 'BORDER-LE', 'BORDER-LEF', 'BORDER-LEFT',
+ 'BORDER-LEFT-', 'BORDER-LEFT-C', 'BORDER-LEFT-CH', 'BORDER-LEFT-CHA',
+ 'BORDER-LEFT-CHAR', 'BORDER-LEFT-PIXELS', 'BORDER-LEFT-P', 'BORDER-LEFT-PI',
+ 'BORDER-LEFT-PIX', 'BORDER-LEFT-PIXE', 'BORDER-LEFT-PIXEL',
+ 'BORDER-RIGHT-CHARS', 'BORDER-R', 'BORDER-RI', 'BORDER-RIG', 'BORDER-RIGH',
+ 'BORDER-RIGHT', 'BORDER-RIGHT-', 'BORDER-RIGHT-C', 'BORDER-RIGHT-CH',
+ 'BORDER-RIGHT-CHA', 'BORDER-RIGHT-CHAR', 'BORDER-RIGHT-PIXELS',
+ 'BORDER-RIGHT-P', 'BORDER-RIGHT-PI', 'BORDER-RIGHT-PIX',
+ 'BORDER-RIGHT-PIXE', 'BORDER-RIGHT-PIXEL', 'BORDER-TOP-CHARS', 'BORDER-T',
+ 'BORDER-TO', 'BORDER-TOP', 'BORDER-TOP-', 'BORDER-TOP-C', 'BORDER-TOP-CH',
+ 'BORDER-TOP-CHA', 'BORDER-TOP-CHAR', 'BORDER-TOP-PIXELS', 'BORDER-TOP-P',
+ 'BORDER-TOP-PI', 'BORDER-TOP-PIX', 'BORDER-TOP-PIXE', 'BORDER-TOP-PIXEL',
+ 'BOX', 'BOX-SELECTABLE', 'BOX-SELECT', 'BOX-SELECTA', 'BOX-SELECTAB',
+ 'BOX-SELECTABL', 'BREAK', 'BROWSE', 'BUFFER', 'BUFFER-CHARS',
+ 'BUFFER-COMPARE', 'BUFFER-COPY', 'BUFFER-CREATE', 'BUFFER-DELETE',
+ 'BUFFER-FIELD', 'BUFFER-HANDLE', 'BUFFER-LINES', 'BUFFER-NAME',
+ 'BUFFER-RELEASE', 'BUFFER-VALUE', 'BUTTON', 'BUTTONS', 'BUTTON', 'BY',
+ 'BY-POINTER', 'BY-VARIANT-POINTER', 'CACHE', 'CACHE-SIZE', 'CALL',
+ 'CALL-NAME', 'CALL-TYPE', 'CANCEL-BREAK', 'CANCEL-BUTTON', 'CAN-CREATE',
+ 'CAN-DELETE', 'CAN-DO', 'CAN-FIND', 'CAN-QUERY', 'CAN-READ', 'CAN-SET',
+ 'CAN-WRITE', 'CAPS', 'CAREFUL-PAINT', 'CASE', 'CASE-SENSITIVE', 'CASE-SEN',
+ 'CASE-SENS', 'CASE-SENSI', 'CASE-SENSIT', 'CASE-SENSITI', 'CASE-SENSITIV',
+ 'CAST', 'CATCH', 'CDECL', 'CENTERED', 'CENTER', 'CENTERE', 'CHAINED',
+ 'CHARACTER_LENGTH', 'CHARSET', 'CHECK', 'CHECKED', 'CHOOSE', 'CHR', 'CLASS',
+ 'CLASS-TYPE', 'CLEAR', 'CLEAR-APPL-CONTEXT', 'CLEAR-LOG', 'CLEAR-SELECTION',
+ 'CLEAR-SELECT', 'CLEAR-SELECTI', 'CLEAR-SELECTIO', 'CLEAR-SORT-ARROWS',
+ 'CLEAR-SORT-ARROW', 'CLIENT-CONNECTION-ID', 'CLIENT-PRINCIPAL',
+ 'CLIENT-TTY', 'CLIENT-TYPE', 'CLIENT-WORKSTATION', 'CLIPBOARD', 'CLOSE',
+ 'CLOSE-LOG', 'CODE', 'CODEBASE-LOCATOR', 'CODEPAGE', 'CODEPAGE-CONVERT',
+ 'COLLATE', 'COL-OF', 'COLON', 'COLON-ALIGNED', 'COLON-ALIGN',
+ 'COLON-ALIGNE', 'COLOR', 'COLOR-TABLE', 'COLUMN', 'COL', 'COLU', 'COLUM',
+ 'COLUMN-BGCOLOR', 'COLUMN-DCOLOR', 'COLUMN-FGCOLOR', 'COLUMN-FONT',
+ 'COLUMN-LABEL', 'COLUMN-LAB', 'COLUMN-LABE', 'COLUMN-MOVABLE', 'COLUMN-OF',
+ 'COLUMN-PFCOLOR', 'COLUMN-READ-ONLY', 'COLUMN-RESIZABLE', 'COLUMNS',
+ 'COLUMN-SCROLLING', 'COMBO-BOX', 'COMMAND', 'COMPARES', 'COMPILE',
+ 'COMPILER', 'COMPLETE', 'COM-SELF', 'CONFIG-NAME', 'CONNECT', 'CONNECTED',
+ 'CONSTRUCTOR', 'CONTAINS', 'CONTENTS', 'CONTEXT', 'CONTEXT-HELP',
+ 'CONTEXT-HELP-FILE', 'CONTEXT-HELP-ID', 'CONTEXT-POPUP', 'CONTROL',
+ 'CONTROL-BOX', 'CONTROL-FRAME', 'CONVERT', 'CONVERT-3D-COLORS',
+ 'CONVERT-TO-OFFSET', 'CONVERT-TO-OFFS', 'CONVERT-TO-OFFSE', 'COPY-DATASET',
+ 'COPY-LOB', 'COPY-SAX-ATTRIBUTES', 'COPY-TEMP-TABLE', 'COUNT', 'COUNT-OF',
+ 'CPCASE', 'CPCOLL', 'CPINTERNAL', 'CPLOG', 'CPPRINT', 'CPRCODEIN',
+ 'CPRCODEOUT', 'CPSTREAM', 'CPTERM', 'CRC-VALUE', 'CREATE', 'CREATE-LIKE',
+ 'CREATE-LIKE-SEQUENTIAL', 'CREATE-NODE-NAMESPACE',
+ 'CREATE-RESULT-LIST-ENTRY', 'CREATE-TEST-FILE', 'CURRENT', 'CURRENT_DATE',
+ 'CURRENT_DATE', 'CURRENT-CHANGED', 'CURRENT-COLUMN', 'CURRENT-ENVIRONMENT',
+ 'CURRENT-ENV', 'CURRENT-ENVI', 'CURRENT-ENVIR', 'CURRENT-ENVIRO',
+ 'CURRENT-ENVIRON', 'CURRENT-ENVIRONM', 'CURRENT-ENVIRONME',
+ 'CURRENT-ENVIRONMEN', 'CURRENT-ITERATION', 'CURRENT-LANGUAGE',
+ 'CURRENT-LANG', 'CURRENT-LANGU', 'CURRENT-LANGUA', 'CURRENT-LANGUAG',
+ 'CURRENT-QUERY', 'CURRENT-RESULT-ROW', 'CURRENT-ROW-MODIFIED',
+ 'CURRENT-VALUE', 'CURRENT-WINDOW', 'CURSOR', 'CURS', 'CURSO', 'CURSOR-CHAR',
+ 'CURSOR-LINE', 'CURSOR-OFFSET', 'DATABASE', 'DATA-BIND',
+ 'DATA-ENTRY-RETURN', 'DATA-ENTRY-RET', 'DATA-ENTRY-RETU',
+ 'DATA-ENTRY-RETUR', 'DATA-RELATION', 'DATA-REL', 'DATA-RELA', 'DATA-RELAT',
+ 'DATA-RELATI', 'DATA-RELATIO', 'DATASERVERS', 'DATASET', 'DATASET-HANDLE',
+ 'DATA-SOURCE', 'DATA-SOURCE-COMPLETE-MAP', 'DATA-SOURCE-MODIFIED',
+ 'DATA-SOURCE-ROWID', 'DATA-TYPE', 'DATA-T', 'DATA-TY', 'DATA-TYP',
+ 'DATE-FORMAT', 'DATE-F', 'DATE-FO', 'DATE-FOR', 'DATE-FORM', 'DATE-FORMA',
+ 'DAY', 'DBCODEPAGE', 'DBCOLLATION', 'DBNAME', 'DBPARAM', 'DB-REFERENCES',
+ 'DBRESTRICTIONS', 'DBREST', 'DBRESTR', 'DBRESTRI', 'DBRESTRIC',
+ 'DBRESTRICT', 'DBRESTRICTI', 'DBRESTRICTIO', 'DBRESTRICTION', 'DBTASKID',
+ 'DBTYPE', 'DBVERSION', 'DBVERS', 'DBVERSI', 'DBVERSIO', 'DCOLOR', 'DDE',
+ 'DDE-ERROR', 'DDE-ID', 'DDE-I', 'DDE-ITEM', 'DDE-NAME', 'DDE-TOPIC',
+ 'DEBLANK', 'DEBUG', 'DEBU', 'DEBUG-ALERT', 'DEBUGGER', 'DEBUG-LIST',
+ 'DECIMALS', 'DECLARE', 'DECLARE-NAMESPACE', 'DECRYPT', 'DEFAULT',
+ 'DEFAULT-BUFFER-HANDLE', 'DEFAULT-BUTTON', 'DEFAUT-B', 'DEFAUT-BU',
+ 'DEFAUT-BUT', 'DEFAUT-BUTT', 'DEFAUT-BUTTO', 'DEFAULT-COMMIT',
+ 'DEFAULT-EXTENSION', 'DEFAULT-EX', 'DEFAULT-EXT', 'DEFAULT-EXTE',
+ 'DEFAULT-EXTEN', 'DEFAULT-EXTENS', 'DEFAULT-EXTENSI', 'DEFAULT-EXTENSIO',
+ 'DEFAULT-NOXLATE', 'DEFAULT-NOXL', 'DEFAULT-NOXLA', 'DEFAULT-NOXLAT',
+ 'DEFAULT-VALUE', 'DEFAULT-WINDOW', 'DEFINED', 'DEFINE-USER-EVENT-MANAGER',
+ 'DELETE', 'DEL', 'DELE', 'DELET', 'DELETE-CHARACTER', 'DELETE-CHAR',
+ 'DELETE-CHARA', 'DELETE-CHARAC', 'DELETE-CHARACT', 'DELETE-CHARACTE',
+ 'DELETE-CURRENT-ROW', 'DELETE-LINE', 'DELETE-RESULT-LIST-ENTRY',
+ 'DELETE-SELECTED-ROW', 'DELETE-SELECTED-ROWS', 'DELIMITER', 'DESC',
+ 'DESCENDING', 'DESC', 'DESCE', 'DESCEN', 'DESCEND', 'DESCENDI', 'DESCENDIN',
+ 'DESELECT-FOCUSED-ROW', 'DESELECTION', 'DESELECT-ROWS',
+ 'DESELECT-SELECTED-ROW', 'DESTRUCTOR', 'DIALOG-BOX', 'DICTIONARY', 'DICT',
+ 'DICTI', 'DICTIO', 'DICTION', 'DICTIONA', 'DICTIONAR', 'DIR', 'DISABLE',
+ 'DISABLE-AUTO-ZAP', 'DISABLED', 'DISABLE-DUMP-TRIGGERS',
+ 'DISABLE-LOAD-TRIGGERS', 'DISCONNECT', 'DISCON', 'DISCONN', 'DISCONNE',
+ 'DISCONNEC', 'DISP', 'DISPLAY', 'DISP', 'DISPL', 'DISPLA',
+ 'DISPLAY-MESSAGE', 'DISPLAY-TYPE', 'DISPLAY-T', 'DISPLAY-TY', 'DISPLAY-TYP',
+ 'DISTINCT', 'DO', 'DOMAIN-DESCRIPTION', 'DOMAIN-NAME', 'DOMAIN-TYPE', 'DOS',
+ 'DOUBLE', 'DOWN', 'DRAG-ENABLED', 'DROP', 'DROP-DOWN', 'DROP-DOWN-LIST',
+ 'DROP-FILE-NOTIFY', 'DROP-TARGET', 'DUMP', 'DYNAMIC', 'DYNAMIC-FUNCTION',
+ 'EACH', 'ECHO', 'EDGE-CHARS', 'EDGE', 'EDGE-', 'EDGE-C', 'EDGE-CH',
+ 'EDGE-CHA', 'EDGE-CHAR', 'EDGE-PIXELS', 'EDGE-P', 'EDGE-PI', 'EDGE-PIX',
+ 'EDGE-PIXE', 'EDGE-PIXEL', 'EDIT-CAN-PASTE', 'EDIT-CAN-UNDO', 'EDIT-CLEAR',
+ 'EDIT-COPY', 'EDIT-CUT', 'EDITING', 'EDITOR', 'EDIT-PASTE', 'EDIT-UNDO',
+ 'ELSE', 'EMPTY', 'EMPTY-TEMP-TABLE', 'ENABLE', 'ENABLED-FIELDS', 'ENCODE',
+ 'ENCRYPT', 'ENCRYPT-AUDIT-MAC-KEY', 'ENCRYPTION-SALT', 'END',
+ 'END-DOCUMENT', 'END-ELEMENT', 'END-EVENT-GROUP', 'END-FILE-DROP', 'ENDKEY',
+ 'END-KEY', 'END-MOVE', 'END-RESIZE', 'END-ROW-RESIZE', 'END-USER-PROMPT',
+ 'ENTERED', 'ENTRY', 'EQ', 'ERROR', 'ERROR-COLUMN', 'ERROR-COL',
+ 'ERROR-COLU', 'ERROR-COLUM', 'ERROR-ROW', 'ERROR-STACK-TRACE',
+ 'ERROR-STATUS', 'ERROR-STAT', 'ERROR-STATU', 'ESCAPE', 'ETIME',
+ 'EVENT-GROUP-ID', 'EVENT-PROCEDURE', 'EVENT-PROCEDURE-CONTEXT', 'EVENTS',
+ 'EVENT', 'EVENT-TYPE', 'EVENT-T', 'EVENT-TY', 'EVENT-TYP', 'EXCEPT',
+ 'EXCLUSIVE-ID', 'EXCLUSIVE-LOCK', 'EXCLUSIVE', 'EXCLUSIVE-', 'EXCLUSIVE-L',
+ 'EXCLUSIVE-LO', 'EXCLUSIVE-LOC', 'EXCLUSIVE-WEB-USER', 'EXECUTE', 'EXISTS',
+ 'EXP', 'EXPAND', 'EXPANDABLE', 'EXPLICIT', 'EXPORT', 'EXPORT-PRINCIPAL',
+ 'EXTENDED', 'EXTENT', 'EXTERNAL', 'FALSE', 'FETCH', 'FETCH-SELECTED-ROW',
+ 'FGCOLOR', 'FGC', 'FGCO', 'FGCOL', 'FGCOLO', 'FIELD', 'FIELDS', 'FIELD',
+ 'FILE', 'FILE-CREATE-DATE', 'FILE-CREATE-TIME', 'FILE-INFORMATION',
+ 'FILE-INFO', 'FILE-INFOR', 'FILE-INFORM', 'FILE-INFORMA', 'FILE-INFORMAT',
+ 'FILE-INFORMATI', 'FILE-INFORMATIO', 'FILE-MOD-DATE', 'FILE-MOD-TIME',
+ 'FILENAME', 'FILE-NAME', 'FILE-OFFSET', 'FILE-OFF', 'FILE-OFFS',
+ 'FILE-OFFSE', 'FILE-SIZE', 'FILE-TYPE', 'FILL', 'FILLED', 'FILL-IN',
+ 'FILTERS', 'FINAL', 'FINALLY', 'FIND', 'FIND-BY-ROWID',
+ 'FIND-CASE-SENSITIVE', 'FIND-CURRENT', 'FINDER', 'FIND-FIRST',
+ 'FIND-GLOBAL', 'FIND-LAST', 'FIND-NEXT-OCCURRENCE', 'FIND-PREV-OCCURRENCE',
+ 'FIND-SELECT', 'FIND-UNIQUE', 'FIND-WRAP-AROUND', 'FIRST',
+ 'FIRST-ASYNCH-REQUEST', 'FIRST-CHILD', 'FIRST-COLUMN', 'FIRST-FORM',
+ 'FIRST-OBJECT', 'FIRST-OF', 'FIRST-PROCEDURE', 'FIRST-PROC', 'FIRST-PROCE',
+ 'FIRST-PROCED', 'FIRST-PROCEDU', 'FIRST-PROCEDUR', 'FIRST-SERVER',
+ 'FIRST-TAB-ITEM', 'FIRST-TAB-I', 'FIRST-TAB-IT', 'FIRST-TAB-ITE',
+ 'FIT-LAST-COLUMN', 'FIXED-ONLY', 'FLAT-BUTTON', 'FLOAT', 'FOCUS',
+ 'FOCUSED-ROW', 'FOCUSED-ROW-SELECTED', 'FONT', 'FONT-TABLE', 'FOR',
+ 'FORCE-FILE', 'FOREGROUND', 'FORE', 'FOREG', 'FOREGR', 'FOREGRO',
+ 'FOREGROU', 'FOREGROUN', 'FORM', 'FORMAT', 'FORM', 'FORMA', 'FORMATTED',
+ 'FORMATTE', 'FORM-LONG-INPUT', 'FORWARD', 'FORWARDS', 'FORWARD', 'FRAGMENT',
+ 'FRAGMEN', 'FRAME', 'FRAM', 'FRAME-COL', 'FRAME-DB', 'FRAME-DOWN',
+ 'FRAME-FIELD', 'FRAME-FILE', 'FRAME-INDEX', 'FRAME-INDE', 'FRAME-LINE',
+ 'FRAME-NAME', 'FRAME-ROW', 'FRAME-SPACING', 'FRAME-SPA', 'FRAME-SPAC',
+ 'FRAME-SPACI', 'FRAME-SPACIN', 'FRAME-VALUE', 'FRAME-VAL', 'FRAME-VALU',
+ 'FRAME-X', 'FRAME-Y', 'FREQUENCY', 'FROM', 'FROM-CHARS', 'FROM-C',
+ 'FROM-CH', 'FROM-CHA', 'FROM-CHAR', 'FROM-CURRENT', 'FROM-CUR', 'FROM-CURR',
+ 'FROM-CURRE', 'FROM-CURREN', 'FROM-PIXELS', 'FROM-P', 'FROM-PI', 'FROM-PIX',
+ 'FROM-PIXE', 'FROM-PIXEL', 'FULL-HEIGHT-CHARS', 'FULL-HEIGHT',
+ 'FULL-HEIGHT-', 'FULL-HEIGHT-C', 'FULL-HEIGHT-CH', 'FULL-HEIGHT-CHA',
+ 'FULL-HEIGHT-CHAR', 'FULL-HEIGHT-PIXELS', 'FULL-HEIGHT-P', 'FULL-HEIGHT-PI',
+ 'FULL-HEIGHT-PIX', 'FULL-HEIGHT-PIXE', 'FULL-HEIGHT-PIXEL', 'FULL-PATHNAME',
+ 'FULL-PATHN', 'FULL-PATHNA', 'FULL-PATHNAM', 'FULL-WIDTH-CHARS',
+ 'FULL-WIDTH', 'FULL-WIDTH-', 'FULL-WIDTH-C', 'FULL-WIDTH-CH',
+ 'FULL-WIDTH-CHA', 'FULL-WIDTH-CHAR', 'FULL-WIDTH-PIXELS', 'FULL-WIDTH-P',
+ 'FULL-WIDTH-PI', 'FULL-WIDTH-PIX', 'FULL-WIDTH-PIXE', 'FULL-WIDTH-PIXEL',
+ 'FUNCTION', 'FUNCTION-CALL-TYPE', 'GATEWAYS', 'GATEWAY', 'GE',
+ 'GENERATE-MD5', 'GENERATE-PBE-KEY', 'GENERATE-PBE-SALT',
+ 'GENERATE-RANDOM-KEY', 'GENERATE-UUID', 'GET', 'GET-ATTR-CALL-TYPE',
+ 'GET-ATTRIBUTE-NODE', 'GET-BINARY-DATA', 'GET-BLUE-VALUE', 'GET-BLUE',
+ 'GET-BLUE-', 'GET-BLUE-V', 'GET-BLUE-VA', 'GET-BLUE-VAL', 'GET-BLUE-VALU',
+ 'GET-BROWSE-COLUMN', 'GET-BUFFER-HANDLEGETBYTE', 'GET-BYTE',
+ 'GET-CALLBACK-PROC-CONTEXT', 'GET-CALLBACK-PROC-NAME', 'GET-CGI-LIST',
+ 'GET-CGI-LONG-VALUE', 'GET-CGI-VALUE', 'GET-CODEPAGES', 'GET-COLLATIONS',
+ 'GET-CONFIG-VALUE', 'GET-CURRENT', 'GET-DOUBLE', 'GET-DROPPED-FILE',
+ 'GET-DYNAMIC', 'GET-ERROR-COLUMN', 'GET-ERROR-ROW', 'GET-FILE',
+ 'GET-FILE-NAME', 'GET-FILE-OFFSET', 'GET-FILE-OFFSE', 'GET-FIRST',
+ 'GET-FLOAT', 'GET-GREEN-VALUE', 'GET-GREEN', 'GET-GREEN-', 'GET-GREEN-V',
+ 'GET-GREEN-VA', 'GET-GREEN-VAL', 'GET-GREEN-VALU',
+ 'GET-INDEX-BY-NAMESPACE-NAME', 'GET-INDEX-BY-QNAME', 'GET-INT64',
+ 'GET-ITERATION', 'GET-KEY-VALUE', 'GET-KEY-VAL', 'GET-KEY-VALU', 'GET-LAST',
+ 'GET-LOCALNAME-BY-INDEX', 'GET-LONG', 'GET-MESSAGE', 'GET-NEXT',
+ 'GET-NUMBER', 'GET-POINTER-VALUE', 'GET-PREV', 'GET-PRINTERS',
+ 'GET-PROPERTY', 'GET-QNAME-BY-INDEX', 'GET-RED-VALUE', 'GET-RED',
+ 'GET-RED-', 'GET-RED-V', 'GET-RED-VA', 'GET-RED-VAL', 'GET-RED-VALU',
+ 'GET-REPOSITIONED-ROW', 'GET-RGB-VALUE', 'GET-SELECTED-WIDGET',
+ 'GET-SELECTED', 'GET-SELECTED-', 'GET-SELECTED-W', 'GET-SELECTED-WI',
+ 'GET-SELECTED-WID', 'GET-SELECTED-WIDG', 'GET-SELECTED-WIDGE', 'GET-SHORT',
+ 'GET-SIGNATURE', 'GET-SIZE', 'GET-STRING', 'GET-TAB-ITEM',
+ 'GET-TEXT-HEIGHT-CHARS', 'GET-TEXT-HEIGHT', 'GET-TEXT-HEIGHT-',
+ 'GET-TEXT-HEIGHT-C', 'GET-TEXT-HEIGHT-CH', 'GET-TEXT-HEIGHT-CHA',
+ 'GET-TEXT-HEIGHT-CHAR', 'GET-TEXT-HEIGHT-PIXELS', 'GET-TEXT-HEIGHT-P',
+ 'GET-TEXT-HEIGHT-PI', 'GET-TEXT-HEIGHT-PIX', 'GET-TEXT-HEIGHT-PIXE',
+ 'GET-TEXT-HEIGHT-PIXEL', 'GET-TEXT-WIDTH-CHARS', 'GET-TEXT-WIDTH',
+ 'GET-TEXT-WIDTH-', 'GET-TEXT-WIDTH-C', 'GET-TEXT-WIDTH-CH',
+ 'GET-TEXT-WIDTH-CHA', 'GET-TEXT-WIDTH-CHAR', 'GET-TEXT-WIDTH-PIXELS',
+ 'GET-TEXT-WIDTH-P', 'GET-TEXT-WIDTH-PI', 'GET-TEXT-WIDTH-PIX',
+ 'GET-TEXT-WIDTH-PIXE', 'GET-TEXT-WIDTH-PIXEL', 'GET-TYPE-BY-INDEX',
+ 'GET-TYPE-BY-NAMESPACE-NAME', 'GET-TYPE-BY-QNAME', 'GET-UNSIGNED-LONG',
+ 'GET-UNSIGNED-SHORT', 'GET-URI-BY-INDEX', 'GET-VALUE-BY-INDEX',
+ 'GET-VALUE-BY-NAMESPACE-NAME', 'GET-VALUE-BY-QNAME', 'GET-WAIT-STATE',
+ 'GLOBAL', 'GO-ON', 'GO-PENDING', 'GO-PEND', 'GO-PENDI', 'GO-PENDIN',
+ 'GRANT', 'GRAPHIC-EDGE', 'GRAPHIC-E', 'GRAPHIC-ED', 'GRAPHIC-EDG',
+ 'GRID-FACTOR-HORIZONTAL', 'GRID-FACTOR-H', 'GRID-FACTOR-HO',
+ 'GRID-FACTOR-HOR', 'GRID-FACTOR-HORI', 'GRID-FACTOR-HORIZ',
+ 'GRID-FACTOR-HORIZO', 'GRID-FACTOR-HORIZON', 'GRID-FACTOR-HORIZONT',
+ 'GRID-FACTOR-HORIZONTA', 'GRID-FACTOR-VERTICAL', 'GRID-FACTOR-V',
+ 'GRID-FACTOR-VE', 'GRID-FACTOR-VER', 'GRID-FACTOR-VERT', 'GRID-FACTOR-VERT',
+ 'GRID-FACTOR-VERTI', 'GRID-FACTOR-VERTIC', 'GRID-FACTOR-VERTICA',
+ 'GRID-SNAP', 'GRID-UNIT-HEIGHT-CHARS', 'GRID-UNIT-HEIGHT',
+ 'GRID-UNIT-HEIGHT-', 'GRID-UNIT-HEIGHT-C', 'GRID-UNIT-HEIGHT-CH',
+ 'GRID-UNIT-HEIGHT-CHA', 'GRID-UNIT-HEIGHT-PIXELS', 'GRID-UNIT-HEIGHT-P',
+ 'GRID-UNIT-HEIGHT-PI', 'GRID-UNIT-HEIGHT-PIX', 'GRID-UNIT-HEIGHT-PIXE',
+ 'GRID-UNIT-HEIGHT-PIXEL', 'GRID-UNIT-WIDTH-CHARS', 'GRID-UNIT-WIDTH',
+ 'GRID-UNIT-WIDTH-', 'GRID-UNIT-WIDTH-C', 'GRID-UNIT-WIDTH-CH',
+ 'GRID-UNIT-WIDTH-CHA', 'GRID-UNIT-WIDTH-CHAR', 'GRID-UNIT-WIDTH-PIXELS',
+ 'GRID-UNIT-WIDTH-P', 'GRID-UNIT-WIDTH-PI', 'GRID-UNIT-WIDTH-PIX',
+ 'GRID-UNIT-WIDTH-PIXE', 'GRID-UNIT-WIDTH-PIXEL', 'GRID-VISIBLE', 'GROUP',
+ 'GT', 'GUID', 'HANDLER', 'HAS-RECORDS', 'HAVING', 'HEADER', 'HEIGHT-CHARS',
+ 'HEIGHT', 'HEIGHT-', 'HEIGHT-C', 'HEIGHT-CH', 'HEIGHT-CHA', 'HEIGHT-CHAR',
+ 'HEIGHT-PIXELS', 'HEIGHT-P', 'HEIGHT-PI', 'HEIGHT-PIX', 'HEIGHT-PIXE',
+ 'HEIGHT-PIXEL', 'HELP', 'HEX-DECODE', 'HEX-ENCODE', 'HIDDEN', 'HIDE',
+ 'HORIZONTAL', 'HORI', 'HORIZ', 'HORIZO', 'HORIZON', 'HORIZONT', 'HORIZONTA',
+ 'HOST-BYTE-ORDER', 'HTML-CHARSET', 'HTML-END-OF-LINE', 'HTML-END-OF-PAGE',
+ 'HTML-FRAME-BEGIN', 'HTML-FRAME-END', 'HTML-HEADER-BEGIN',
+ 'HTML-HEADER-END', 'HTML-TITLE-BEGIN', 'HTML-TITLE-END', 'HWND', 'ICON',
+ 'IF', 'IMAGE', 'IMAGE-DOWN', 'IMAGE-INSENSITIVE', 'IMAGE-SIZE',
+ 'IMAGE-SIZE-CHARS', 'IMAGE-SIZE-C', 'IMAGE-SIZE-CH', 'IMAGE-SIZE-CHA',
+ 'IMAGE-SIZE-CHAR', 'IMAGE-SIZE-PIXELS', 'IMAGE-SIZE-P', 'IMAGE-SIZE-PI',
+ 'IMAGE-SIZE-PIX', 'IMAGE-SIZE-PIXE', 'IMAGE-SIZE-PIXEL', 'IMAGE-UP',
+ 'IMMEDIATE-DISPLAY', 'IMPLEMENTS', 'IMPORT', 'IMPORT-PRINCIPAL', 'IN',
+ 'INCREMENT-EXCLUSIVE-ID', 'INDEX', 'INDEXED-REPOSITION', 'INDEX-HINT',
+ 'INDEX-INFORMATION', 'INDICATOR', 'INFORMATION', 'INFO', 'INFOR', 'INFORM',
+ 'INFORMA', 'INFORMAT', 'INFORMATI', 'INFORMATIO', 'IN-HANDLE',
+ 'INHERIT-BGCOLOR', 'INHERIT-BGC', 'INHERIT-BGCO', 'INHERIT-BGCOL',
+ 'INHERIT-BGCOLO', 'INHERIT-FGCOLOR', 'INHERIT-FGC', 'INHERIT-FGCO',
+ 'INHERIT-FGCOL', 'INHERIT-FGCOLO', 'INHERITS', 'INITIAL', 'INIT', 'INITI',
+ 'INITIA', 'INITIAL-DIR', 'INITIAL-FILTER', 'INITIALIZE-DOCUMENT-TYPE',
+ 'INITIATE', 'INNER-CHARS', 'INNER-LINES', 'INPUT', 'INPUT-OUTPUT',
+ 'INPUT-O', 'INPUT-OU', 'INPUT-OUT', 'INPUT-OUTP', 'INPUT-OUTPU',
+ 'INPUT-VALUE', 'INSERT', 'INSERT-ATTRIBUTE', 'INSERT-BACKTAB', 'INSERT-B',
+ 'INSERT-BA', 'INSERT-BAC', 'INSERT-BACK', 'INSERT-BACKT', 'INSERT-BACKTA',
+ 'INSERT-FILE', 'INSERT-ROW', 'INSERT-STRING', 'INSERT-TAB', 'INSERT-T',
+ 'INSERT-TA', 'INTERFACE', 'INTERNAL-ENTRIES', 'INTO', 'INVOKE', 'IS',
+ 'IS-ATTR-SPACE', 'IS-ATTR', 'IS-ATTR-', 'IS-ATTR-S', 'IS-ATTR-SP',
+ 'IS-ATTR-SPA', 'IS-ATTR-SPAC', 'IS-CLASS', 'IS-CLAS', 'IS-LEAD-BYTE',
+ 'IS-ATTR', 'IS-OPEN', 'IS-PARAMETER-SET', 'IS-ROW-SELECTED', 'IS-SELECTED',
+ 'ITEM', 'ITEMS-PER-ROW', 'JOIN', 'JOIN-BY-SQLDB', 'KBLABEL',
+ 'KEEP-CONNECTION-OPEN', 'KEEP-FRAME-Z-ORDER', 'KEEP-FRAME-Z',
+ 'KEEP-FRAME-Z-', 'KEEP-FRAME-Z-O', 'KEEP-FRAME-Z-OR', 'KEEP-FRAME-Z-ORD',
+ 'KEEP-FRAME-Z-ORDE', 'KEEP-MESSAGES', 'KEEP-SECURITY-CACHE',
+ 'KEEP-TAB-ORDER', 'KEY', 'KEYCODE', 'KEY-CODE', 'KEYFUNCTION', 'KEYFUNC',
+ 'KEYFUNCT', 'KEYFUNCTI', 'KEYFUNCTIO', 'KEY-FUNCTION', 'KEY-FUNC',
+ 'KEY-FUNCT', 'KEY-FUNCTI', 'KEY-FUNCTIO', 'KEYLABEL', 'KEY-LABEL', 'KEYS',
+ 'KEYWORD', 'KEYWORD-ALL', 'LABEL', 'LABEL-BGCOLOR', 'LABEL-BGC',
+ 'LABEL-BGCO', 'LABEL-BGCOL', 'LABEL-BGCOLO', 'LABEL-DCOLOR', 'LABEL-DC',
+ 'LABEL-DCO', 'LABEL-DCOL', 'LABEL-DCOLO', 'LABEL-FGCOLOR', 'LABEL-FGC',
+ 'LABEL-FGCO', 'LABEL-FGCOL', 'LABEL-FGCOLO', 'LABEL-FONT', 'LABEL-PFCOLOR',
+ 'LABEL-PFC', 'LABEL-PFCO', 'LABEL-PFCOL', 'LABEL-PFCOLO', 'LABELS',
+ 'LANDSCAPE', 'LANGUAGES', 'LANGUAGE', 'LARGE', 'LARGE-TO-SMALL', 'LAST',
+ 'LAST-ASYNCH-REQUEST', 'LAST-BATCH', 'LAST-CHILD', 'LAST-EVENT',
+ 'LAST-EVEN', 'LAST-FORM', 'LASTKEY', 'LAST-KEY', 'LAST-OBJECT', 'LAST-OF',
+ 'LAST-PROCEDURE', 'LAST-PROCE', 'LAST-PROCED', 'LAST-PROCEDU',
+ 'LAST-PROCEDUR', 'LAST-SERVER', 'LAST-TAB-ITEM', 'LAST-TAB-I',
+ 'LAST-TAB-IT', 'LAST-TAB-ITE', 'LC', 'LDBNAME', 'LE', 'LEAVE',
+ 'LEFT-ALIGNED', 'LEFT-ALIGN', 'LEFT-ALIGNE', 'LEFT-TRIM', 'LENGTH',
+ 'LIBRARY', 'LIKE', 'LIKE-SEQUENTIAL', 'LINE', 'LINE-COUNTER', 'LINE-COUNT',
+ 'LINE-COUNTE', 'LIST-EVENTS', 'LISTING', 'LISTI', 'LISTIN',
+ 'LIST-ITEM-PAIRS', 'LIST-ITEMS', 'LIST-PROPERTY-NAMES', 'LIST-QUERY-ATTRS',
+ 'LIST-SET-ATTRS', 'LIST-WIDGETS', 'LITERAL-QUESTION', 'LITTLE-ENDIAN',
+ 'LOAD', 'LOAD-DOMAINS', 'LOAD-ICON', 'LOAD-IMAGE', 'LOAD-IMAGE-DOWN',
+ 'LOAD-IMAGE-INSENSITIVE', 'LOAD-IMAGE-UP', 'LOAD-MOUSE-POINTER',
+ 'LOAD-MOUSE-P', 'LOAD-MOUSE-PO', 'LOAD-MOUSE-POI', 'LOAD-MOUSE-POIN',
+ 'LOAD-MOUSE-POINT', 'LOAD-MOUSE-POINTE', 'LOAD-PICTURE', 'LOAD-SMALL-ICON',
+ 'LOCAL-NAME', 'LOCATOR-COLUMN-NUMBER', 'LOCATOR-LINE-NUMBER',
+ 'LOCATOR-PUBLIC-ID', 'LOCATOR-SYSTEM-ID', 'LOCATOR-TYPE', 'LOCKED',
+ 'LOCK-REGISTRATION', 'LOG', 'LOG-AUDIT-EVENT', 'LOGIN-EXPIRATION-TIMESTAMP',
+ 'LOGIN-HOST', 'LOGIN-STATE', 'LOG-MANAGER', 'LOGOUT', 'LOOKAHEAD', 'LOOKUP',
+ 'LT', 'MACHINE-CLASS', 'MANDATORY', 'MANUAL-HIGHLIGHT', 'MAP',
+ 'MARGIN-EXTRA', 'MARGIN-HEIGHT-CHARS', 'MARGIN-HEIGHT', 'MARGIN-HEIGHT-',
+ 'MARGIN-HEIGHT-C', 'MARGIN-HEIGHT-CH', 'MARGIN-HEIGHT-CHA',
+ 'MARGIN-HEIGHT-CHAR', 'MARGIN-HEIGHT-PIXELS', 'MARGIN-HEIGHT-P',
+ 'MARGIN-HEIGHT-PI', 'MARGIN-HEIGHT-PIX', 'MARGIN-HEIGHT-PIXE',
+ 'MARGIN-HEIGHT-PIXEL', 'MARGIN-WIDTH-CHARS', 'MARGIN-WIDTH',
+ 'MARGIN-WIDTH-', 'MARGIN-WIDTH-C', 'MARGIN-WIDTH-CH', 'MARGIN-WIDTH-CHA',
+ 'MARGIN-WIDTH-CHAR', 'MARGIN-WIDTH-PIXELS', 'MARGIN-WIDTH-P',
+ 'MARGIN-WIDTH-PI', 'MARGIN-WIDTH-PIX', 'MARGIN-WIDTH-PIXE',
+ 'MARGIN-WIDTH-PIXEL', 'MARK-NEW', 'MARK-ROW-STATE', 'MATCHES', 'MAX',
+ 'MAX-BUTTON', 'MAX-CHARS', 'MAX-DATA-GUESS', 'MAX-HEIGHT',
+ 'MAX-HEIGHT-CHARS', 'MAX-HEIGHT-C', 'MAX-HEIGHT-CH', 'MAX-HEIGHT-CHA',
+ 'MAX-HEIGHT-CHAR', 'MAX-HEIGHT-PIXELS', 'MAX-HEIGHT-P', 'MAX-HEIGHT-PI',
+ 'MAX-HEIGHT-PIX', 'MAX-HEIGHT-PIXE', 'MAX-HEIGHT-PIXEL', 'MAXIMIZE',
+ 'MAXIMUM', 'MAX', 'MAXI', 'MAXIM', 'MAXIMU', 'MAXIMUM-LEVEL', 'MAX-ROWS',
+ 'MAX-SIZE', 'MAX-VALUE', 'MAX-VAL', 'MAX-VALU', 'MAX-WIDTH',
+ 'MAX-WIDTH-CHARS', 'MAX-WIDTH', 'MAX-WIDTH-', 'MAX-WIDTH-C', 'MAX-WIDTH-CH',
+ 'MAX-WIDTH-CHA', 'MAX-WIDTH-CHAR', 'MAX-WIDTH-PIXELS', 'MAX-WIDTH-P',
+ 'MAX-WIDTH-PI', 'MAX-WIDTH-PIX', 'MAX-WIDTH-PIXE', 'MAX-WIDTH-PIXEL',
+ 'MD5-DIGEST', 'MEMBER', 'MEMPTR-TO-NODE-VALUE', 'MENU', 'MENUBAR',
+ 'MENU-BAR', 'MENU-ITEM', 'MENU-KEY', 'MENU-K', 'MENU-KE', 'MENU-MOUSE',
+ 'MENU-M', 'MENU-MO', 'MENU-MOU', 'MENU-MOUS', 'MERGE-BY-FIELD', 'MESSAGE',
+ 'MESSAGE-AREA', 'MESSAGE-AREA-FONT', 'MESSAGE-LINES', 'METHOD', 'MIN',
+ 'MIN-BUTTON', 'MIN-COLUMN-WIDTH-CHARS', 'MIN-COLUMN-WIDTH-C',
+ 'MIN-COLUMN-WIDTH-CH', 'MIN-COLUMN-WIDTH-CHA', 'MIN-COLUMN-WIDTH-CHAR',
+ 'MIN-COLUMN-WIDTH-PIXELS', 'MIN-COLUMN-WIDTH-P', 'MIN-COLUMN-WIDTH-PI',
+ 'MIN-COLUMN-WIDTH-PIX', 'MIN-COLUMN-WIDTH-PIXE', 'MIN-COLUMN-WIDTH-PIXEL',
+ 'MIN-HEIGHT-CHARS', 'MIN-HEIGHT', 'MIN-HEIGHT-', 'MIN-HEIGHT-C',
+ 'MIN-HEIGHT-CH', 'MIN-HEIGHT-CHA', 'MIN-HEIGHT-CHAR', 'MIN-HEIGHT-PIXELS',
+ 'MIN-HEIGHT-P', 'MIN-HEIGHT-PI', 'MIN-HEIGHT-PIX', 'MIN-HEIGHT-PIXE',
+ 'MIN-HEIGHT-PIXEL', 'MINIMUM', 'MIN', 'MINI', 'MINIM', 'MINIMU', 'MIN-SIZE',
+ 'MIN-VALUE', 'MIN-VAL', 'MIN-VALU', 'MIN-WIDTH-CHARS', 'MIN-WIDTH',
+ 'MIN-WIDTH-', 'MIN-WIDTH-C', 'MIN-WIDTH-CH', 'MIN-WIDTH-CHA',
+ 'MIN-WIDTH-CHAR', 'MIN-WIDTH-PIXELS', 'MIN-WIDTH-P', 'MIN-WIDTH-PI',
+ 'MIN-WIDTH-PIX', 'MIN-WIDTH-PIXE', 'MIN-WIDTH-PIXEL', 'MODIFIED', 'MODULO',
+ 'MOD', 'MODU', 'MODUL', 'MONTH', 'MOUSE', 'MOUSE-POINTER', 'MOUSE-P',
+ 'MOUSE-PO', 'MOUSE-POI', 'MOUSE-POIN', 'MOUSE-POINT', 'MOUSE-POINTE',
+ 'MOVABLE', 'MOVE-AFTER-TAB-ITEM', 'MOVE-AFTER', 'MOVE-AFTER-',
+ 'MOVE-AFTER-T', 'MOVE-AFTER-TA', 'MOVE-AFTER-TAB', 'MOVE-AFTER-TAB-',
+ 'MOVE-AFTER-TAB-I', 'MOVE-AFTER-TAB-IT', 'MOVE-AFTER-TAB-ITE',
+ 'MOVE-BEFORE-TAB-ITEM', 'MOVE-BEFOR', 'MOVE-BEFORE', 'MOVE-BEFORE-',
+ 'MOVE-BEFORE-T', 'MOVE-BEFORE-TA', 'MOVE-BEFORE-TAB', 'MOVE-BEFORE-TAB-',
+ 'MOVE-BEFORE-TAB-I', 'MOVE-BEFORE-TAB-IT', 'MOVE-BEFORE-TAB-ITE',
+ 'MOVE-COLUMN', 'MOVE-COL', 'MOVE-COLU', 'MOVE-COLUM', 'MOVE-TO-BOTTOM',
+ 'MOVE-TO-B', 'MOVE-TO-BO', 'MOVE-TO-BOT', 'MOVE-TO-BOTT', 'MOVE-TO-BOTTO',
+ 'MOVE-TO-EOF', 'MOVE-TO-TOP', 'MOVE-TO-T', 'MOVE-TO-TO', 'MPE',
+ 'MULTI-COMPILE', 'MULTIPLE', 'MULTIPLE-KEY', 'MULTITASKING-INTERVAL',
+ 'MUST-EXIST', 'NAME', 'NAMESPACE-PREFIX', 'NAMESPACE-URI', 'NATIVE', 'NE',
+ 'NEEDS-APPSERVER-PROMPT', 'NEEDS-PROMPT', 'NEW', 'NEW-INSTANCE', 'NEW-ROW',
+ 'NEXT', 'NEXT-COLUMN', 'NEXT-PROMPT', 'NEXT-ROWID', 'NEXT-SIBLING',
+ 'NEXT-TAB-ITEM', 'NEXT-TAB-I', 'NEXT-TAB-IT', 'NEXT-TAB-ITE', 'NEXT-VALUE',
+ 'NO', 'NO-APPLY', 'NO-ARRAY-MESSAGE', 'NO-ASSIGN', 'NO-ATTR-LIST',
+ 'NO-ATTR', 'NO-ATTR-', 'NO-ATTR-L', 'NO-ATTR-LI', 'NO-ATTR-LIS',
+ 'NO-ATTR-SPACE', 'NO-ATTR', 'NO-ATTR-', 'NO-ATTR-S', 'NO-ATTR-SP',
+ 'NO-ATTR-SPA', 'NO-ATTR-SPAC', 'NO-AUTO-VALIDATE', 'NO-BIND-WHERE',
+ 'NO-BOX', 'NO-CONSOLE', 'NO-CONVERT', 'NO-CONVERT-3D-COLORS',
+ 'NO-CURRENT-VALUE', 'NO-DEBUG', 'NODE-VALUE-TO-MEMPTR', 'NO-DRAG',
+ 'NO-ECHO', 'NO-EMPTY-SPACE', 'NO-ERROR', 'NO-FILL', 'NO-F', 'NO-FI',
+ 'NO-FIL', 'NO-FOCUS', 'NO-HELP', 'NO-HIDE', 'NO-INDEX-HINT',
+ 'NO-INHERIT-BGCOLOR', 'NO-INHERIT-BGC', 'NO-INHERIT-BGCO', 'LABEL-BGCOL',
+ 'LABEL-BGCOLO', 'NO-INHERIT-FGCOLOR', 'NO-INHERIT-FGC', 'NO-INHERIT-FGCO',
+ 'NO-INHERIT-FGCOL', 'NO-INHERIT-FGCOLO', 'NO-JOIN-BY-SQLDB', 'NO-LABELS',
+ 'NO-LABE', 'NO-LOBS', 'NO-LOCK', 'NO-LOOKAHEAD', 'NO-MAP', 'NO-MESSAGE',
+ 'NO-MES', 'NO-MESS', 'NO-MESSA', 'NO-MESSAG', 'NONAMESPACE-SCHEMA-LOCATION',
+ 'NONE', 'NO-PAUSE', 'NO-PREFETCH', 'NO-PREFE', 'NO-PREFET', 'NO-PREFETC',
+ 'NORMALIZE', 'NO-ROW-MARKERS', 'NO-SCROLLBAR-VERTICAL',
+ 'NO-SEPARATE-CONNECTION', 'NO-SEPARATORS', 'NOT', 'NO-TAB-STOP',
+ 'NOT-ACTIVE', 'NO-UNDERLINE', 'NO-UND', 'NO-UNDE', 'NO-UNDER', 'NO-UNDERL',
+ 'NO-UNDERLI', 'NO-UNDERLIN', 'NO-UNDO', 'NO-VALIDATE', 'NO-VAL', 'NO-VALI',
+ 'NO-VALID', 'NO-VALIDA', 'NO-VALIDAT', 'NOW', 'NO-WAIT', 'NO-WORD-WRAP',
+ 'NULL', 'NUM-ALIASES', 'NUM-ALI', 'NUM-ALIA', 'NUM-ALIAS', 'NUM-ALIASE',
+ 'NUM-BUFFERS', 'NUM-BUTTONS', 'NUM-BUT', 'NUM-BUTT', 'NUM-BUTTO',
+ 'NUM-BUTTON', 'NUM-COLUMNS', 'NUM-COL', 'NUM-COLU', 'NUM-COLUM',
+ 'NUM-COLUMN', 'NUM-COPIES', 'NUM-DBS', 'NUM-DROPPED-FILES', 'NUM-ENTRIES',
+ 'NUMERIC', 'NUMERIC-FORMAT', 'NUMERIC-F', 'NUMERIC-FO', 'NUMERIC-FOR',
+ 'NUMERIC-FORM', 'NUMERIC-FORMA', 'NUM-FIELDS', 'NUM-FORMATS', 'NUM-ITEMS',
+ 'NUM-ITERATIONS', 'NUM-LINES', 'NUM-LOCKED-COLUMNS', 'NUM-LOCKED-COL',
+ 'NUM-LOCKED-COLU', 'NUM-LOCKED-COLUM', 'NUM-LOCKED-COLUMN', 'NUM-MESSAGES',
+ 'NUM-PARAMETERS', 'NUM-REFERENCES', 'NUM-REPLACED', 'NUM-RESULTS',
+ 'NUM-SELECTED-ROWS', 'NUM-SELECTED-WIDGETS', 'NUM-SELECTED',
+ 'NUM-SELECTED-', 'NUM-SELECTED-W', 'NUM-SELECTED-WI', 'NUM-SELECTED-WID',
+ 'NUM-SELECTED-WIDG', 'NUM-SELECTED-WIDGE', 'NUM-SELECTED-WIDGET',
+ 'NUM-TABS', 'NUM-TO-RETAIN', 'NUM-VISIBLE-COLUMNS', 'OCTET-LENGTH', 'OF',
+ 'OFF', 'OK', 'OK-CANCEL', 'OLD', 'ON', 'ON-FRAME-BORDER', 'ON-FRAME',
+ 'ON-FRAME-', 'ON-FRAME-B', 'ON-FRAME-BO', 'ON-FRAME-BOR', 'ON-FRAME-BORD',
+ 'ON-FRAME-BORDE', 'OPEN', 'OPSYS', 'OPTION', 'OR', 'ORDERED-JOIN',
+ 'ORDINAL', 'OS-APPEND', 'OS-COMMAND', 'OS-COPY', 'OS-CREATE-DIR',
+ 'OS-DELETE', 'OS-DIR', 'OS-DRIVES', 'OS-DRIVE', 'OS-ERROR', 'OS-GETENV',
+ 'OS-RENAME', 'OTHERWISE', 'OUTPUT', 'OVERLAY', 'OVERRIDE', 'OWNER', 'PAGE',
+ 'PAGE-BOTTOM', 'PAGE-BOT', 'PAGE-BOTT', 'PAGE-BOTTO', 'PAGED',
+ 'PAGE-NUMBER', 'PAGE-NUM', 'PAGE-NUMB', 'PAGE-NUMBE', 'PAGE-SIZE',
+ 'PAGE-TOP', 'PAGE-WIDTH', 'PAGE-WID', 'PAGE-WIDT', 'PARAMETER', 'PARAM',
+ 'PARAME', 'PARAMET', 'PARAMETE', 'PARENT', 'PARSE-STATUS', 'PARTIAL-KEY',
+ 'PASCAL', 'PASSWORD-FIELD', 'PATHNAME', 'PAUSE', 'PBE-HASH-ALGORITHM',
+ 'PBE-HASH-ALG', 'PBE-HASH-ALGO', 'PBE-HASH-ALGOR', 'PBE-HASH-ALGORI',
+ 'PBE-HASH-ALGORIT', 'PBE-HASH-ALGORITH', 'PBE-KEY-ROUNDS', 'PDBNAME',
+ 'PERSISTENT', 'PERSIST', 'PERSISTE', 'PERSISTEN',
+ 'PERSISTENT-CACHE-DISABLED', 'PFCOLOR', 'PFC', 'PFCO', 'PFCOL', 'PFCOLO',
+ 'PIXELS', 'PIXELS-PER-COLUMN', 'PIXELS-PER-COL', 'PIXELS-PER-COLU',
+ 'PIXELS-PER-COLUM', 'PIXELS-PER-ROW', 'POPUP-MENU', 'POPUP-M', 'POPUP-ME',
+ 'POPUP-MEN', 'POPUP-ONLY', 'POPUP-O', 'POPUP-ON', 'POPUP-ONL', 'PORTRAIT',
+ 'POSITION', 'PRECISION', 'PREFER-DATASET', 'PREPARED', 'PREPARE-STRING',
+ 'PREPROCESS', 'PREPROC', 'PREPROCE', 'PREPROCES', 'PRESELECT', 'PRESEL',
+ 'PRESELE', 'PRESELEC', 'PREV', 'PREV-COLUMN', 'PREV-SIBLING',
+ 'PREV-TAB-ITEM', 'PREV-TAB-I', 'PREV-TAB-IT', 'PREV-TAB-ITE', 'PRIMARY',
+ 'PRINTER', 'PRINTER-CONTROL-HANDLE', 'PRINTER-HDC', 'PRINTER-NAME',
+ 'PRINTER-PORT', 'PRINTER-SETUP', 'PRIVATE', 'PRIVATE-DATA', 'PRIVATE-D',
+ 'PRIVATE-DA', 'PRIVATE-DAT', 'PRIVILEGES', 'PROCEDURE', 'PROCE', 'PROCED',
+ 'PROCEDU', 'PROCEDUR', 'PROCEDURE-CALL-TYPE', 'PROCESS', 'PROC-HANDLE',
+ 'PROC-HA', 'PROC-HAN', 'PROC-HAND', 'PROC-HANDL', 'PROC-STATUS', 'PROC-ST',
+ 'PROC-STA', 'PROC-STAT', 'PROC-STATU', 'proc-text', 'proc-text-buffe',
+ 'PROFILER', 'PROGRAM-NAME', 'PROGRESS', 'PROGRESS-SOURCE', 'PROGRESS-S',
+ 'PROGRESS-SO', 'PROGRESS-SOU', 'PROGRESS-SOUR', 'PROGRESS-SOURC', 'PROMPT',
+ 'PROMPT-FOR', 'PROMPT-F', 'PROMPT-FO', 'PROMSGS', 'PROPATH', 'PROPERTY',
+ 'PROTECTED', 'PROVERSION', 'PROVERS', 'PROVERSI', 'PROVERSIO', 'PROXY',
+ 'PROXY-PASSWORD', 'PROXY-USERID', 'PUBLIC', 'PUBLIC-ID', 'PUBLISH',
+ 'PUBLISHED-EVENTS', 'PUT', 'PUTBYTE', 'PUT-BYTE', 'PUT-DOUBLE', 'PUT-FLOAT',
+ 'PUT-INT64', 'PUT-KEY-VALUE', 'PUT-KEY-VAL', 'PUT-KEY-VALU', 'PUT-LONG',
+ 'PUT-SHORT', 'PUT-STRING', 'PUT-UNSIGNED-LONG', 'QUERY', 'QUERY-CLOSE',
+ 'QUERY-OFF-END', 'QUERY-OPEN', 'QUERY-PREPARE', 'QUERY-TUNING', 'QUESTION',
+ 'QUIT', 'QUOTER', 'RADIO-BUTTONS', 'RADIO-SET', 'RANDOM', 'RAW-TRANSFER',
+ 'RCODE-INFORMATION', 'RCODE-INFO', 'RCODE-INFOR', 'RCODE-INFORM',
+ 'RCODE-INFORMA', 'RCODE-INFORMAT', 'RCODE-INFORMATI', 'RCODE-INFORMATIO',
+ 'READ-AVAILABLE', 'READ-EXACT-NUM', 'READ-FILE', 'READKEY', 'READ-ONLY',
+ 'READ-XML', 'READ-XMLSCHEMA', 'REAL', 'RECORD-LENGTH', 'RECTANGLE', 'RECT',
+ 'RECTA', 'RECTAN', 'RECTANG', 'RECTANGL', 'RECURSIVE', 'REFERENCE-ONLY',
+ 'REFRESH', 'REFRESHABLE', 'REFRESH-AUDIT-POLICY', 'REGISTER-DOMAIN',
+ 'RELEASE', 'REMOTE', 'REMOVE-EVENTS-PROCEDURE', 'REMOVE-SUPER-PROCEDURE',
+ 'REPEAT', 'REPLACE', 'REPLACE-SELECTION-TEXT', 'REPOSITION',
+ 'REPOSITION-BACKWARD', 'REPOSITION-FORWARD', 'REPOSITION-MODE',
+ 'REPOSITION-TO-ROW', 'REPOSITION-TO-ROWID', 'REQUEST', 'RESET', 'RESIZABLE',
+ 'RESIZA', 'RESIZAB', 'RESIZABL', 'RESIZE', 'RESTART-ROW', 'RESTART-ROWID',
+ 'RETAIN', 'RETAIN-SHAPE', 'RETRY', 'RETRY-CANCEL', 'RETURN',
+ 'RETURN-INSERTED', 'RETURN-INS', 'RETURN-INSE', 'RETURN-INSER',
+ 'RETURN-INSERT', 'RETURN-INSERTE', 'RETURNS', 'RETURN-TO-START-DIR',
+ 'RETURN-TO-START-DI', 'RETURN-VALUE', 'RETURN-VAL', 'RETURN-VALU',
+ 'RETURN-VALUE-DATA-TYPE', 'REVERSE-FROM', 'REVERT', 'REVOKE', 'RGB-VALUE',
+ 'RIGHT-ALIGNED', 'RETURN-ALIGN', 'RETURN-ALIGNE', 'RIGHT-TRIM', 'R-INDEX',
+ 'ROLES', 'ROUND', 'ROUTINE-LEVEL', 'ROW', 'ROW-HEIGHT-CHARS', 'HEIGHT',
+ 'ROW-HEIGHT-PIXELS', 'HEIGHT-P', 'ROW-MARKERS', 'ROW-OF', 'ROW-RESIZABLE',
+ 'RULE', 'RUN', 'RUN-PROCEDURE', 'SAVE', 'SAVE-AS', 'SAVE-FILE',
+ 'SAX-COMPLETE', 'SAX-COMPLE', 'SAX-COMPLET', 'SAX-PARSE', 'SAX-PARSE-FIRST',
+ 'SAX-PARSE-NEXT', 'SAX-PARSER-ERROR', 'SAX-RUNNING', 'SAX-UNINITIALIZED',
+ 'SAX-WRITE-BEGIN', 'SAX-WRITE-COMPLETE', 'SAX-WRITE-CONTENT',
+ 'SAX-WRITE-ELEMENT', 'SAX-WRITE-ERROR', 'SAX-WRITE-IDLE', 'SAX-WRITER',
+ 'SAX-WRITE-TAG', 'SCHEMA', 'SCHEMA-LOCATION', 'SCHEMA-MARSHAL',
+ 'SCHEMA-PATH', 'SCREEN', 'SCREEN-IO', 'SCREEN-LINES', 'SCREEN-VALUE',
+ 'SCREEN-VAL', 'SCREEN-VALU', 'SCROLL', 'SCROLLABLE', 'SCROLLBAR-HORIZONTAL',
+ 'SCROLLBAR-H', 'SCROLLBAR-HO', 'SCROLLBAR-HOR', 'SCROLLBAR-HORI',
+ 'SCROLLBAR-HORIZ', 'SCROLLBAR-HORIZO', 'SCROLLBAR-HORIZON',
+ 'SCROLLBAR-HORIZONT', 'SCROLLBAR-HORIZONTA', 'SCROLL-BARS',
+ 'SCROLLBAR-VERTICAL', 'SCROLLBAR-V', 'SCROLLBAR-VE', 'SCROLLBAR-VER',
+ 'SCROLLBAR-VERT', 'SCROLLBAR-VERTI', 'SCROLLBAR-VERTIC',
+ 'SCROLLBAR-VERTICA', 'SCROLL-DELTA', 'SCROLLED-ROW-POSITION',
+ 'SCROLLED-ROW-POS', 'SCROLLED-ROW-POSI', 'SCROLLED-ROW-POSIT',
+ 'SCROLLED-ROW-POSITI', 'SCROLLED-ROW-POSITIO', 'SCROLLING', 'SCROLL-OFFSET',
+ 'SCROLL-TO-CURRENT-ROW', 'SCROLL-TO-ITEM', 'SCROLL-TO-I', 'SCROLL-TO-IT',
+ 'SCROLL-TO-ITE', 'SCROLL-TO-SELECTED-ROW', 'SDBNAME', 'SEAL',
+ 'SEAL-TIMESTAMP', 'SEARCH', 'SEARCH-SELF', 'SEARCH-TARGET', 'SECTION',
+ 'SECURITY-POLICY', 'SEEK', 'SELECT', 'SELECTABLE', 'SELECT-ALL', 'SELECTED',
+ 'SELECT-FOCUSED-ROW', 'SELECTION', 'SELECTION-END', 'SELECTION-LIST',
+ 'SELECTION-START', 'SELECTION-TEXT', 'SELECT-NEXT-ROW', 'SELECT-PREV-ROW',
+ 'SELECT-ROW', 'SELF', 'SEND', 'send-sql-statement', 'send-sql', 'SENSITIVE',
+ 'SEPARATE-CONNECTION', 'SEPARATOR-FGCOLOR', 'SEPARATORS', 'SERVER',
+ 'SERVER-CONNECTION-BOUND', 'SERVER-CONNECTION-BOUND-REQUEST',
+ 'SERVER-CONNECTION-CONTEXT', 'SERVER-CONNECTION-ID',
+ 'SERVER-OPERATING-MODE', 'SESSION', 'SESSION-ID', 'SET', 'SET-APPL-CONTEXT',
+ 'SET-ATTR-CALL-TYPE', 'SET-ATTRIBUTE-NODE', 'SET-BLUE-VALUE', 'SET-BLUE',
+ 'SET-BLUE-', 'SET-BLUE-V', 'SET-BLUE-VA', 'SET-BLUE-VAL', 'SET-BLUE-VALU',
+ 'SET-BREAK', 'SET-BUFFERS', 'SET-CALLBACK', 'SET-CLIENT', 'SET-COMMIT',
+ 'SET-CONTENTS', 'SET-CURRENT-VALUE', 'SET-DB-CLIENT', 'SET-DYNAMIC',
+ 'SET-EVENT-MANAGER-OPTION', 'SET-GREEN-VALUE', 'SET-GREEN', 'SET-GREEN-',
+ 'SET-GREEN-V', 'SET-GREEN-VA', 'SET-GREEN-VAL', 'SET-GREEN-VALU',
+ 'SET-INPUT-SOURCE', 'SET-OPTION', 'SET-OUTPUT-DESTINATION', 'SET-PARAMETER',
+ 'SET-POINTER-VALUE', 'SET-PROPERTY', 'SET-RED-VALUE', 'SET-RED', 'SET-RED-',
+ 'SET-RED-V', 'SET-RED-VA', 'SET-RED-VAL', 'SET-RED-VALU',
+ 'SET-REPOSITIONED-ROW', 'SET-RGB-VALUE', 'SET-ROLLBACK', 'SET-SELECTION',
+ 'SET-SIZE', 'SET-SORT-ARROW', 'SETUSERID', 'SETUSER', 'SETUSERI',
+ 'SET-WAIT-STATE', 'SHA1-DIGEST', 'SHARED', 'SHARE-LOCK', 'SHARE', 'SHARE-',
+ 'SHARE-L', 'SHARE-LO', 'SHARE-LOC', 'SHOW-IN-TASKBAR', 'SHOW-STATS',
+ 'SHOW-STAT', 'SIDE-LABEL-HANDLE', 'SIDE-LABEL-H', 'SIDE-LABEL-HA',
+ 'SIDE-LABEL-HAN', 'SIDE-LABEL-HAND', 'SIDE-LABEL-HANDL', 'SIDE-LABELS',
+ 'SIDE-LAB', 'SIDE-LABE', 'SIDE-LABEL', 'SILENT', 'SIMPLE', 'SINGLE', 'SIZE',
+ 'SIZE-CHARS', 'SIZE-C', 'SIZE-CH', 'SIZE-CHA', 'SIZE-CHAR', 'SIZE-PIXELS',
+ 'SIZE-P', 'SIZE-PI', 'SIZE-PIX', 'SIZE-PIXE', 'SIZE-PIXEL', 'SKIP',
+ 'SKIP-DELETED-RECORD', 'SLIDER', 'SMALL-ICON', 'SMALLINT', 'SMALL-TITLE',
+ 'SOME', 'SORT', 'SORT-ASCENDING', 'SORT-NUMBER', 'SOURCE',
+ 'SOURCE-PROCEDURE', 'SPACE', 'SQL', 'SQRT', 'SSL-SERVER-NAME', 'STANDALONE',
+ 'START', 'START-DOCUMENT', 'START-ELEMENT', 'START-MOVE', 'START-RESIZE',
+ 'START-ROW-RESIZE', 'STATE-DETAIL', 'STATIC', 'STATUS', 'STATUS-AREA',
+ 'STATUS-AREA-FONT', 'STDCALL', 'STOP', 'STOP-PARSING', 'STOPPED', 'STOPPE',
+ 'STORED-PROCEDURE', 'STORED-PROC', 'STORED-PROCE', 'STORED-PROCED',
+ 'STORED-PROCEDU', 'STORED-PROCEDUR', 'STREAM', 'STREAM-HANDLE', 'STREAM-IO',
+ 'STRETCH-TO-FIT', 'STRICT', 'STRING', 'STRING-VALUE', 'STRING-XREF',
+ 'SUB-AVERAGE', 'SUB-AVE', 'SUB-AVER', 'SUB-AVERA', 'SUB-AVERAG',
+ 'SUB-COUNT', 'SUB-MAXIMUM', 'SUM-MAX', 'SUM-MAXI', 'SUM-MAXIM',
+ 'SUM-MAXIMU', 'SUB-MENU', 'SUBSUB-', 'MINIMUM', 'SUB-MIN', 'SUBSCRIBE',
+ 'SUBSTITUTE', 'SUBST', 'SUBSTI', 'SUBSTIT', 'SUBSTITU', 'SUBSTITUT',
+ 'SUBSTRING', 'SUBSTR', 'SUBSTRI', 'SUBSTRIN', 'SUB-TOTAL', 'SUBTYPE', 'SUM',
+ 'SUPER', 'SUPER-PROCEDURES', 'SUPPRESS-NAMESPACE-PROCESSING',
+ 'SUPPRESS-WARNINGS', 'SUPPRESS-W', 'SUPPRESS-WA', 'SUPPRESS-WAR',
+ 'SUPPRESS-WARN', 'SUPPRESS-WARNI', 'SUPPRESS-WARNIN', 'SUPPRESS-WARNING',
+ 'SYMMETRIC-ENCRYPTION-ALGORITHM', 'SYMMETRIC-ENCRYPTION-IV',
+ 'SYMMETRIC-ENCRYPTION-KEY', 'SYMMETRIC-SUPPORT', 'SYSTEM-ALERT-BOXES',
+ 'SYSTEM-ALERT', 'SYSTEM-ALERT-', 'SYSTEM-ALERT-B', 'SYSTEM-ALERT-BO',
+ 'SYSTEM-ALERT-BOX', 'SYSTEM-ALERT-BOXE', 'SYSTEM-DIALOG', 'SYSTEM-HELP',
+ 'SYSTEM-ID', 'TABLE', 'TABLE-HANDLE', 'TABLE-NUMBER', 'TAB-POSITION',
+ 'TAB-STOP', 'TARGET', 'TARGET-PROCEDURE', 'TEMP-DIRECTORY', 'TEMP-DIR',
+ 'TEMP-DIRE', 'TEMP-DIREC', 'TEMP-DIRECT', 'TEMP-DIRECTO', 'TEMP-DIRECTOR',
+ 'TEMP-TABLE', 'TEMP-TABLE-PREPARE', 'TERM', 'TERMINAL', 'TERM', 'TERMI',
+ 'TERMIN', 'TERMINA', 'TERMINATE', 'TEXT', 'TEXT-CURSOR', 'TEXT-SEG-GROW',
+ 'TEXT-SELECTED', 'THEN', 'THIS-OBJECT', 'THIS-PROCEDURE', 'THREE-D',
+ 'THROW', 'THROUGH', 'THRU', 'TIC-MARKS', 'TIME', 'TIME-SOURCE', 'TITLE',
+ 'TITLE-BGCOLOR', 'TITLE-BGC', 'TITLE-BGCO', 'TITLE-BGCOL', 'TITLE-BGCOLO',
+ 'TITLE-DCOLOR', 'TITLE-DC', 'TITLE-DCO', 'TITLE-DCOL', 'TITLE-DCOLO',
+ 'TITLE-FGCOLOR', 'TITLE-FGC', 'TITLE-FGCO', 'TITLE-FGCOL', 'TITLE-FGCOLO',
+ 'TITLE-FONT', 'TITLE-FO', 'TITLE-FON', 'TO', 'TODAY', 'TOGGLE-BOX',
+ 'TOOLTIP', 'TOOLTIPS', 'TOPIC', 'TOP-NAV-QUERY', 'TOP-ONLY', 'TO-ROWID',
+ 'TOTAL', 'TRAILING', 'TRANS', 'TRANSACTION', 'TRANSACTION-MODE',
+ 'TRANS-INIT-PROCEDURE', 'TRANSPARENT', 'TRIGGER', 'TRIGGERS', 'TRIM',
+ 'TRUE', 'TRUNCATE', 'TRUNC', 'TRUNCA', 'TRUNCAT', 'TYPE', 'TYPE-OF',
+ 'UNBOX', 'UNBUFFERED', 'UNBUFF', 'UNBUFFE', 'UNBUFFER', 'UNBUFFERE',
+ 'UNDERLINE', 'UNDERL', 'UNDERLI', 'UNDERLIN', 'UNDO', 'UNFORMATTED',
+ 'UNFORM', 'UNFORMA', 'UNFORMAT', 'UNFORMATT', 'UNFORMATTE', 'UNION',
+ 'UNIQUE', 'UNIQUE-ID', 'UNIQUE-MATCH', 'UNIX', 'UNLESS-HIDDEN', 'UNLOAD',
+ 'UNSIGNED-LONG', 'UNSUBSCRIBE', 'UP', 'UPDATE', 'UPDATE-ATTRIBUTE', 'URL',
+ 'URL-DECODE', 'URL-ENCODE', 'URL-PASSWORD', 'URL-USERID', 'USE',
+ 'USE-DICT-EXPS', 'USE-FILENAME', 'USE-INDEX', 'USER', 'USE-REVVIDEO',
+ 'USERID', 'USER-ID', 'USE-TEXT', 'USE-UNDERLINE', 'USE-WIDGET-POOL',
+ 'USING', 'V6DISPLAY', 'V6FRAME', 'VALIDATE', 'VALIDATE-EXPRESSION',
+ 'VALIDATE-MESSAGE', 'VALIDATE-SEAL', 'VALIDATION-ENABLED', 'VALID-EVENT',
+ 'VALID-HANDLE', 'VALID-OBJECT', 'VALUE', 'VALUE-CHANGED', 'VALUES',
+ 'VARIABLE', 'VAR', 'VARI', 'VARIA', 'VARIAB', 'VARIABL', 'VERBOSE',
+ 'VERSION', 'VERTICAL', 'VERT', 'VERTI', 'VERTIC', 'VERTICA', 'VIEW',
+ 'VIEW-AS', 'VIEW-FIRST-COLUMN-ON-REOPEN', 'VIRTUAL-HEIGHT-CHARS',
+ 'VIRTUAL-HEIGHT', 'VIRTUAL-HEIGHT-', 'VIRTUAL-HEIGHT-C',
+ 'VIRTUAL-HEIGHT-CH', 'VIRTUAL-HEIGHT-CHA', 'VIRTUAL-HEIGHT-CHAR',
+ 'VIRTUAL-HEIGHT-PIXELS', 'VIRTUAL-HEIGHT-P', 'VIRTUAL-HEIGHT-PI',
+ 'VIRTUAL-HEIGHT-PIX', 'VIRTUAL-HEIGHT-PIXE', 'VIRTUAL-HEIGHT-PIXEL',
+ 'VIRTUAL-WIDTH-CHARS', 'VIRTUAL-WIDTH', 'VIRTUAL-WIDTH-', 'VIRTUAL-WIDTH-C',
+ 'VIRTUAL-WIDTH-CH', 'VIRTUAL-WIDTH-CHA', 'VIRTUAL-WIDTH-CHAR',
+ 'VIRTUAL-WIDTH-PIXELS', 'VIRTUAL-WIDTH-P', 'VIRTUAL-WIDTH-PI',
+ 'VIRTUAL-WIDTH-PIX', 'VIRTUAL-WIDTH-PIXE', 'VIRTUAL-WIDTH-PIXEL', 'VISIBLE',
+ 'VOID', 'WAIT', 'WAIT-FOR', 'WARNING', 'WEB-CONTEXT', 'WEEKDAY', 'WHEN',
+ 'WHERE', 'WHILE', 'WIDGET', 'WIDGET-ENTER', 'WIDGET-E', 'WIDGET-EN',
+ 'WIDGET-ENT', 'WIDGET-ENTE', 'WIDGET-ID', 'WIDGET-LEAVE', 'WIDGET-L',
+ 'WIDGET-LE', 'WIDGET-LEA', 'WIDGET-LEAV', 'WIDGET-POOL', 'WIDTH',
+ 'WIDTH-CHARS', 'WIDTH', 'WIDTH-', 'WIDTH-C', 'WIDTH-CH', 'WIDTH-CHA',
+ 'WIDTH-CHAR', 'WIDTH-PIXELS', 'WIDTH-P', 'WIDTH-PI', 'WIDTH-PIX',
+ 'WIDTH-PIXE', 'WIDTH-PIXEL', 'WINDOW', 'WINDOW-MAXIMIZED', 'WINDOW-MAXIM',
+ 'WINDOW-MAXIMI', 'WINDOW-MAXIMIZ', 'WINDOW-MAXIMIZE', 'WINDOW-MINIMIZED',
+ 'WINDOW-MINIM', 'WINDOW-MINIMI', 'WINDOW-MINIMIZ', 'WINDOW-MINIMIZE',
+ 'WINDOW-NAME', 'WINDOW-NORMAL', 'WINDOW-STATE', 'WINDOW-STA', 'WINDOW-STAT',
+ 'WINDOW-SYSTEM', 'WITH', 'WORD-INDEX', 'WORD-WRAP',
+ 'WORK-AREA-HEIGHT-PIXELS', 'WORK-AREA-WIDTH-PIXELS', 'WORK-AREA-X',
+ 'WORK-AREA-Y', 'WORKFILE', 'WORK-TABLE', 'WORK-TAB', 'WORK-TABL', 'WRITE',
+ 'WRITE-CDATA', 'WRITE-CHARACTERS', 'WRITE-COMMENT', 'WRITE-DATA-ELEMENT',
+ 'WRITE-EMPTY-ELEMENT', 'WRITE-ENTITY-REF', 'WRITE-EXTERNAL-DTD',
+ 'WRITE-FRAGMENT', 'WRITE-MESSAGE', 'WRITE-PROCESSING-INSTRUCTION',
+ 'WRITE-STATUS', 'WRITE-XML', 'WRITE-XMLSCHEMA', 'X', 'XCODE',
+ 'XML-DATA-TYPE', 'XML-NODE-TYPE', 'XML-SCHEMA-PATH',
+ 'XML-SUPPRESS-NAMESPACE-PROCESSING', 'X-OF', 'XREF', 'XREF-XML', 'Y',
+ 'YEAR', 'YEAR-OFFSET', 'YES', 'YES-NO', 'YES-NO-CANCEL', 'Y-OF'
+]
diff --git a/pygments/lexers/_phpbuiltins.py b/pygments/lexers/_phpbuiltins.py
index cd1608f1..08eaaf2e 100644
--- a/pygments/lexers/_phpbuiltins.py
+++ b/pygments/lexers/_phpbuiltins.py
@@ -12,7 +12,7 @@
internet connection. don't run that at home, use
a server ;-)
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -3784,4 +3784,4 @@ if __name__ == '__main__':
regenerate(__file__, modules)
shutil.rmtree(PHP_MANUAL_DIR)
- run() \ No newline at end of file
+ run()
diff --git a/pygments/lexers/_postgres_builtins.py b/pygments/lexers/_postgres_builtins.py
index 45b3f22d..b2322137 100644
--- a/pygments/lexers/_postgres_builtins.py
+++ b/pygments/lexers/_postgres_builtins.py
@@ -1,10 +1,11 @@
+# -*- coding: utf-8 -*-
"""
pygments.lexers._postgres_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Self-updating data files for PostgreSQL lexer.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -41,7 +42,6 @@ def parse_keywords(f):
def parse_datatypes(f):
dt = set()
- re_entry = re.compile('\s*<entry><type>([^<]+)</type></entry>')
for line in f:
if '<sect1' in line:
break
@@ -57,7 +57,8 @@ def parse_datatypes(f):
line = re.sub("<[^>]+>", "", line)
# Drop the parts containing braces
- for tmp in [ t for tmp in line.split('[') for t in tmp.split(']') if "(" not in t ]:
+ for tmp in [t for tmp in line.split('[')
+ for t in tmp.split(']') if "(" not in t]:
for t in tmp.split(','):
t = t.strip()
if not t: continue
diff --git a/pygments/lexers/_robotframeworklexer.py b/pygments/lexers/_robotframeworklexer.py
new file mode 100644
index 00000000..64d832f3
--- /dev/null
+++ b/pygments/lexers/_robotframeworklexer.py
@@ -0,0 +1,557 @@
+# -*- coding: utf-8 -*-
+"""
+ pygments.lexers._robotframeworklexer
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Lexer for Robot Framework.
+
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+# Copyright 2012 Nokia Siemens Networks Oyj
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import re
+
+from pygments.lexer import Lexer
+from pygments.token import Token
+
+
+HEADING = Token.Generic.Heading
+SETTING = Token.Keyword.Namespace
+IMPORT = Token.Name.Namespace
+TC_KW_NAME = Token.Generic.Subheading
+KEYWORD = Token.Name.Function
+ARGUMENT = Token.String
+VARIABLE = Token.Name.Variable
+COMMENT = Token.Comment
+SEPARATOR = Token.Punctuation
+SYNTAX = Token.Punctuation
+GHERKIN = Token.Generic.Emph
+ERROR = Token.Error
+
+
+def normalize(string, remove=''):
+ string = string.lower()
+ for char in remove + ' ':
+ if char in string:
+ string = string.replace(char, '')
+ return string
+
+
+class RobotFrameworkLexer(Lexer):
+ """
+ For `Robot Framework <http://robotframework.org>`_ test data.
+
+ Supports both space and pipe separated plain text formats.
+
+ *New in Pygments 1.6.*
+ """
+ name = 'RobotFramework'
+ aliases = ['RobotFramework', 'robotframework']
+ filenames = ['*.txt']
+ mimetypes = ['text/x-robotframework']
+
+ def __init__(self, **options):
+ options['tabsize'] = 2
+ options['encoding'] = 'UTF-8'
+ Lexer.__init__(self, **options)
+
+ def get_tokens_unprocessed(self, text):
+ row_tokenizer = RowTokenizer()
+ var_tokenizer = VariableTokenizer()
+ index = 0
+ for row in text.splitlines():
+ for value, token in row_tokenizer.tokenize(row):
+ for value, token in var_tokenizer.tokenize(value, token):
+ if value:
+ yield index, token, unicode(value)
+ index += len(value)
+
+
+class VariableTokenizer(object):
+
+ def tokenize(self, string, token):
+ var = VariableSplitter(string, identifiers='$@%')
+ if var.start < 0 or token in (COMMENT, ERROR):
+ yield string, token
+ return
+ for value, token in self._tokenize(var, string, token):
+ if value:
+ yield value, token
+
+ def _tokenize(self, var, string, orig_token):
+ before = string[:var.start]
+ yield before, orig_token
+ yield var.identifier + '{', SYNTAX
+ for value, token in self.tokenize(var.base, VARIABLE):
+ yield value, token
+ yield '}', SYNTAX
+ if var.index:
+ yield '[', SYNTAX
+ for value, token in self.tokenize(var.index, VARIABLE):
+ yield value, token
+ yield ']', SYNTAX
+ for value, token in self.tokenize(string[var.end:], orig_token):
+ yield value, token
+
+
+class RowTokenizer(object):
+
+ def __init__(self):
+ self._table = UnknownTable()
+ self._splitter = RowSplitter()
+ testcases = TestCaseTable()
+ settings = SettingTable(testcases.set_default_template)
+ variables = VariableTable()
+ keywords = KeywordTable()
+ self._tables = {'settings': settings, 'setting': settings,
+ 'metadata': settings,
+ 'variables': variables, 'variable': variables,
+ 'testcases': testcases, 'testcase': testcases,
+ 'keywords': keywords, 'keyword': keywords,
+ 'userkeywords': keywords, 'userkeyword': keywords}
+
+ def tokenize(self, row):
+ commented = False
+ heading = False
+ for index, value in enumerate(self._splitter.split(row)):
+ # First value, and every second after that, is a separator.
+ index, separator = divmod(index-1, 2)
+ if value.startswith('#'):
+ commented = True
+ elif index == 0 and value.startswith('*'):
+ self._table = self._start_table(value)
+ heading = True
+ for value, token in self._tokenize(value, index, commented,
+ separator, heading):
+ yield value, token
+ self._table.end_row()
+
+ def _start_table(self, header):
+ name = normalize(header, remove='*')
+ return self._tables.get(name, UnknownTable())
+
+ def _tokenize(self, value, index, commented, separator, heading):
+ if commented:
+ yield value, COMMENT
+ elif separator:
+ yield value, SEPARATOR
+ elif heading:
+ yield value, HEADING
+ else:
+ for value, token in self._table.tokenize(value, index):
+ yield value, token
+
+
+class RowSplitter(object):
+ _space_splitter = re.compile('( {2,})')
+ _pipe_splitter = re.compile('((?:^| +)\|(?: +|$))')
+
+ def split(self, row):
+ splitter = (row.startswith('| ') and self._split_from_pipes
+ or self._split_from_spaces)
+ for value in splitter(row.rstrip()):
+ yield value
+ yield '\n'
+
+ def _split_from_spaces(self, row):
+ yield '' # Start with (pseudo)separator similarly as with pipes
+ for value in self._space_splitter.split(row):
+ yield value
+
+ def _split_from_pipes(self, row):
+ _, separator, rest = self._pipe_splitter.split(row, 1)
+ yield separator
+ while self._pipe_splitter.search(rest):
+ cell, separator, rest = self._pipe_splitter.split(rest, 1)
+ yield cell
+ yield separator
+ yield rest
+
+
+class Tokenizer(object):
+ _tokens = None
+
+ def __init__(self):
+ self._index = 0
+
+ def tokenize(self, value):
+ values_and_tokens = self._tokenize(value, self._index)
+ self._index += 1
+ if isinstance(values_and_tokens, type(Token)):
+ values_and_tokens = [(value, values_and_tokens)]
+ return values_and_tokens
+
+ def _tokenize(self, value, index):
+ index = min(index, len(self._tokens) - 1)
+ return self._tokens[index]
+
+ def _is_assign(self, value):
+ if value.endswith('='):
+ value = value[:-1].strip()
+ var = VariableSplitter(value, identifiers='$@')
+ return var.start == 0 and var.end == len(value)
+
+
+class Comment(Tokenizer):
+ _tokens = (COMMENT,)
+
+
+class Setting(Tokenizer):
+ _tokens = (SETTING, ARGUMENT)
+ _keyword_settings = ('suitesetup', 'suiteprecondition', 'suiteteardown',
+ 'suitepostcondition', 'testsetup', 'testprecondition',
+ 'testteardown', 'testpostcondition', 'testtemplate')
+ _import_settings = ('library', 'resource', 'variables')
+ _other_settings = ('documentation', 'metadata', 'forcetags', 'defaulttags',
+ 'testtimeout')
+ _custom_tokenizer = None
+
+ def __init__(self, template_setter=None):
+ Tokenizer.__init__(self)
+ self._template_setter = template_setter
+
+ def _tokenize(self, value, index):
+ if index == 1 and self._template_setter:
+ self._template_setter(value)
+ if index == 0:
+ normalized = normalize(value)
+ if normalized in self._keyword_settings:
+ self._custom_tokenizer = KeywordCall(support_assign=False)
+ elif normalized in self._import_settings:
+ self._custom_tokenizer = ImportSetting()
+ elif normalized not in self._other_settings:
+ return ERROR
+ elif self._custom_tokenizer:
+ return self._custom_tokenizer.tokenize(value)
+ return Tokenizer._tokenize(self, value, index)
+
+
+class ImportSetting(Tokenizer):
+ _tokens = (IMPORT, ARGUMENT)
+
+
+class TestCaseSetting(Setting):
+ _keyword_settings = ('setup', 'precondition', 'teardown', 'postcondition',
+ 'template')
+ _import_settings = ()
+ _other_settings = ('documentation', 'tags', 'timeout')
+
+ def _tokenize(self, value, index):
+ if index == 0:
+ type = Setting._tokenize(self, value[1:-1], index)
+ return [('[', SYNTAX), (value[1:-1], type), (']', SYNTAX)]
+ return Setting._tokenize(self, value, index)
+
+
+class KeywordSetting(TestCaseSetting):
+ _keyword_settings = ('teardown',)
+ _other_settings = ('documentation', 'arguments', 'return', 'timeout')
+
+
+class Variable(Tokenizer):
+ _tokens = (SYNTAX, ARGUMENT)
+
+ def _tokenize(self, value, index):
+ if index == 0 and not self._is_assign(value):
+ return ERROR
+ return Tokenizer._tokenize(self, value, index)
+
+
+class KeywordCall(Tokenizer):
+ _tokens = (KEYWORD, ARGUMENT)
+
+ def __init__(self, support_assign=True):
+ Tokenizer.__init__(self)
+ self._keyword_found = not support_assign
+ self._assigns = 0
+
+ def _tokenize(self, value, index):
+ if not self._keyword_found and self._is_assign(value):
+ self._assigns += 1
+ return SYNTAX # VariableTokenizer tokenizes this later.
+ if self._keyword_found:
+ return Tokenizer._tokenize(self, value, index - self._assigns)
+ self._keyword_found = True
+ return GherkinTokenizer().tokenize(value, KEYWORD)
+
+
+class GherkinTokenizer(object):
+ _gherkin_prefix = re.compile('^(Given|When|Then|And) ', re.IGNORECASE)
+
+ def tokenize(self, value, token):
+ match = self._gherkin_prefix.match(value)
+ if not match:
+ return [(value, token)]
+ end = match.end()
+ return [(value[:end], GHERKIN), (value[end:], token)]
+
+
+class TemplatedKeywordCall(Tokenizer):
+ _tokens = (ARGUMENT,)
+
+
+class ForLoop(Tokenizer):
+
+ def __init__(self):
+ Tokenizer.__init__(self)
+ self._in_arguments = False
+
+ def _tokenize(self, value, index):
+ token = self._in_arguments and ARGUMENT or SYNTAX
+ if value.upper() in ('IN', 'IN RANGE'):
+ self._in_arguments = True
+ return token
+
+
+class _Table(object):
+ _tokenizer_class = None
+
+ def __init__(self, prev_tokenizer=None):
+ self._tokenizer = self._tokenizer_class()
+ self._prev_tokenizer = prev_tokenizer
+ self._prev_values_on_row = []
+
+ def tokenize(self, value, index):
+ if self._continues(value, index):
+ self._tokenizer = self._prev_tokenizer
+ yield value, SYNTAX
+ else:
+ for value_and_token in self._tokenize(value, index):
+ yield value_and_token
+ self._prev_values_on_row.append(value)
+
+ def _continues(self, value, index):
+ return value == '...' and all(self._is_empty(t)
+ for t in self._prev_values_on_row)
+
+ def _is_empty(self, value):
+ return value in ('', '\\')
+
+ def _tokenize(self, value, index):
+ return self._tokenizer.tokenize(value)
+
+ def end_row(self):
+ self.__init__(prev_tokenizer=self._tokenizer)
+
+
+class UnknownTable(_Table):
+ _tokenizer_class = Comment
+
+ def _continues(self, value, index):
+ return False
+
+
+class VariableTable(_Table):
+ _tokenizer_class = Variable
+
+
+class SettingTable(_Table):
+ _tokenizer_class = Setting
+
+ def __init__(self, template_setter, prev_tokenizer=None):
+ _Table.__init__(self, prev_tokenizer)
+ self._template_setter = template_setter
+
+ def _tokenize(self, value, index):
+ if index == 0 and normalize(value) == 'testtemplate':
+ self._tokenizer = Setting(self._template_setter)
+ return _Table._tokenize(self, value, index)
+
+ def end_row(self):
+ self.__init__(self._template_setter, prev_tokenizer=self._tokenizer)
+
+
+class TestCaseTable(_Table):
+ _setting_class = TestCaseSetting
+ _test_template = None
+ _default_template = None
+
+ @property
+ def _tokenizer_class(self):
+ if self._test_template or (self._default_template and
+ self._test_template is not False):
+ return TemplatedKeywordCall
+ return KeywordCall
+
+ def _continues(self, value, index):
+ return index > 0 and _Table._continues(self, value, index)
+
+ def _tokenize(self, value, index):
+ if index == 0:
+ if value:
+ self._test_template = None
+ return GherkinTokenizer().tokenize(value, TC_KW_NAME)
+ if index == 1 and self._is_setting(value):
+ if self._is_template(value):
+ self._test_template = False
+ self._tokenizer = self._setting_class(self.set_test_template)
+ else:
+ self._tokenizer = self._setting_class()
+ if index == 1 and self._is_for_loop(value):
+ self._tokenizer = ForLoop()
+ if index == 1 and self._is_empty(value):
+ return [(value, SYNTAX)]
+ return _Table._tokenize(self, value, index)
+
+ def _is_setting(self, value):
+ return value.startswith('[') and value.endswith(']')
+
+ def _is_template(self, value):
+ return normalize(value) == '[template]'
+
+ def _is_for_loop(self, value):
+ return value.startswith(':') and normalize(value, remove=':') == 'for'
+
+ def set_test_template(self, template):
+ self._test_template = self._is_template_set(template)
+
+ def set_default_template(self, template):
+ self._default_template = self._is_template_set(template)
+
+ def _is_template_set(self, template):
+ return normalize(template) not in ('', '\\', 'none', '${empty}')
+
+
+class KeywordTable(TestCaseTable):
+ _tokenizer_class = KeywordCall
+ _setting_class = KeywordSetting
+
+ def _is_template(self, value):
+ return False
+
+
+# Following code copied directly from Robot Framework 2.7.5.
+
+class VariableSplitter:
+
+ def __init__(self, string, identifiers):
+ self.identifier = None
+ self.base = None
+ self.index = None
+ self.start = -1
+ self.end = -1
+ self._identifiers = identifiers
+ self._may_have_internal_variables = False
+ try:
+ self._split(string)
+ except ValueError:
+ pass
+ else:
+ self._finalize()
+
+ def get_replaced_base(self, variables):
+ if self._may_have_internal_variables:
+ return variables.replace_string(self.base)
+ return self.base
+
+ def _finalize(self):
+ self.identifier = self._variable_chars[0]
+ self.base = ''.join(self._variable_chars[2:-1])
+ self.end = self.start + len(self._variable_chars)
+ if self._has_list_variable_index():
+ self.index = ''.join(self._list_variable_index_chars[1:-1])
+ self.end += len(self._list_variable_index_chars)
+
+ def _has_list_variable_index(self):
+ return self._list_variable_index_chars\
+ and self._list_variable_index_chars[-1] == ']'
+
+ def _split(self, string):
+ start_index, max_index = self._find_variable(string)
+ self.start = start_index
+ self._open_curly = 1
+ self._state = self._variable_state
+ self._variable_chars = [string[start_index], '{']
+ self._list_variable_index_chars = []
+ self._string = string
+ start_index += 2
+ for index, char in enumerate(string[start_index:]):
+ index += start_index # Giving start to enumerate only in Py 2.6+
+ try:
+ self._state(char, index)
+ except StopIteration:
+ return
+ if index == max_index and not self._scanning_list_variable_index():
+ return
+
+ def _scanning_list_variable_index(self):
+ return self._state in [self._waiting_list_variable_index_state,
+ self._list_variable_index_state]
+
+ def _find_variable(self, string):
+ max_end_index = string.rfind('}')
+ if max_end_index == -1:
+ return ValueError('No variable end found')
+ if self._is_escaped(string, max_end_index):
+ return self._find_variable(string[:max_end_index])
+ start_index = self._find_start_index(string, 1, max_end_index)
+ if start_index == -1:
+ return ValueError('No variable start found')
+ return start_index, max_end_index
+
+ def _find_start_index(self, string, start, end):
+ index = string.find('{', start, end) - 1
+ if index < 0:
+ return -1
+ if self._start_index_is_ok(string, index):
+ return index
+ return self._find_start_index(string, index+2, end)
+
+ def _start_index_is_ok(self, string, index):
+ return string[index] in self._identifiers\
+ and not self._is_escaped(string, index)
+
+ def _is_escaped(self, string, index):
+ escaped = False
+ while index > 0 and string[index-1] == '\\':
+ index -= 1
+ escaped = not escaped
+ return escaped
+
+ def _variable_state(self, char, index):
+ self._variable_chars.append(char)
+ if char == '}' and not self._is_escaped(self._string, index):
+ self._open_curly -= 1
+ if self._open_curly == 0:
+ if not self._is_list_variable():
+ raise StopIteration
+ self._state = self._waiting_list_variable_index_state
+ elif char in self._identifiers:
+ self._state = self._internal_variable_start_state
+
+ def _is_list_variable(self):
+ return self._variable_chars[0] == '@'
+
+ def _internal_variable_start_state(self, char, index):
+ self._state = self._variable_state
+ if char == '{':
+ self._variable_chars.append(char)
+ self._open_curly += 1
+ self._may_have_internal_variables = True
+ else:
+ self._variable_state(char, index)
+
+ def _waiting_list_variable_index_state(self, char, index):
+ if char != '[':
+ raise StopIteration
+ self._list_variable_index_chars.append(char)
+ self._state = self._list_variable_index_state
+
+ def _list_variable_index_state(self, char, index):
+ self._list_variable_index_chars.append(char)
+ if char == ']':
+ raise StopIteration
diff --git a/pygments/lexers/_scilab_builtins.py b/pygments/lexers/_scilab_builtins.py
index 7e5530d2..ed0dc819 100644
--- a/pygments/lexers/_scilab_builtins.py
+++ b/pygments/lexers/_scilab_builtins.py
@@ -1,3 +1,14 @@
+# -*- coding: utf-8 -*-
+"""
+ pygments.lexers._scilab_builtins
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Builtin list for the ScilabLexer.
+
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
# These lists are generated automatically.
# Run the following in a Scilab script:
#
diff --git a/pygments/lexers/_sourcemodbuiltins.py b/pygments/lexers/_sourcemodbuiltins.py
new file mode 100644
index 00000000..0f6b4770
--- /dev/null
+++ b/pygments/lexers/_sourcemodbuiltins.py
@@ -0,0 +1,1072 @@
+# -*- coding: utf-8 -*-
+"""
+ pygments.lexers._sourcemodbuiltins
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ This file contains the names of SourceMod functions.
+ It is able to re-generate itself.
+
+ Do not edit the FUNCTIONS list by hand.
+
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+FUNCTIONS = ['TopMenuHandler',
+ 'CreateTopMenu',
+ 'LoadTopMenuConfig',
+ 'AddToTopMenu',
+ 'GetTopMenuInfoString',
+ 'GetTopMenuObjName',
+ 'RemoveFromTopMenu',
+ 'DisplayTopMenu',
+ 'FindTopMenuCategory',
+ 'OnAdminMenuCreated',
+ 'OnAdminMenuReady',
+ 'GetAdminTopMenu',
+ 'AddTargetsToMenu',
+ 'AddTargetsToMenu2',
+ 'RedisplayAdminMenu',
+ 'TEHook',
+ 'AddTempEntHook',
+ 'RemoveTempEntHook',
+ 'TE_Start',
+ 'TE_IsValidProp',
+ 'TE_WriteNum',
+ 'TE_ReadNum',
+ 'TE_WriteFloat',
+ 'TE_ReadFloat',
+ 'TE_WriteVector',
+ 'TE_ReadVector',
+ 'TE_WriteAngles',
+ 'TE_WriteFloatArray',
+ 'TE_Send',
+ 'TE_WriteEncodedEnt',
+ 'TE_SendToAll',
+ 'TE_SendToClient',
+ 'CreateKeyValues',
+ 'KvSetString',
+ 'KvSetNum',
+ 'KvSetUInt64',
+ 'KvSetFloat',
+ 'KvSetColor',
+ 'KvSetVector',
+ 'KvGetString',
+ 'KvGetNum',
+ 'KvGetFloat',
+ 'KvGetColor',
+ 'KvGetUInt64',
+ 'KvGetVector',
+ 'KvJumpToKey',
+ 'KvJumpToKeySymbol',
+ 'KvGotoFirstSubKey',
+ 'KvGotoNextKey',
+ 'KvSavePosition',
+ 'KvDeleteKey',
+ 'KvDeleteThis',
+ 'KvGoBack',
+ 'KvRewind',
+ 'KvGetSectionName',
+ 'KvSetSectionName',
+ 'KvGetDataType',
+ 'KeyValuesToFile',
+ 'FileToKeyValues',
+ 'KvSetEscapeSequences',
+ 'KvNodesInStack',
+ 'KvCopySubkeys',
+ 'KvFindKeyById',
+ 'KvGetNameSymbol',
+ 'KvGetSectionSymbol',
+ 'TE_SetupSparks',
+ 'TE_SetupSmoke',
+ 'TE_SetupDust',
+ 'TE_SetupMuzzleFlash',
+ 'TE_SetupMetalSparks',
+ 'TE_SetupEnergySplash',
+ 'TE_SetupArmorRicochet',
+ 'TE_SetupGlowSprite',
+ 'TE_SetupExplosion',
+ 'TE_SetupBloodSprite',
+ 'TE_SetupBeamRingPoint',
+ 'TE_SetupBeamPoints',
+ 'TE_SetupBeamLaser',
+ 'TE_SetupBeamRing',
+ 'TE_SetupBeamFollow',
+ 'HookEvent',
+ 'HookEventEx',
+ 'UnhookEvent',
+ 'CreateEvent',
+ 'FireEvent',
+ 'CancelCreatedEvent',
+ 'GetEventBool',
+ 'SetEventBool',
+ 'GetEventInt',
+ 'SetEventInt',
+ 'GetEventFloat',
+ 'SetEventFloat',
+ 'GetEventString',
+ 'SetEventString',
+ 'GetEventName',
+ 'SetEventBroadcast',
+ 'GetUserMessageId',
+ 'GetUserMessageName',
+ 'StartMessage',
+ 'StartMessageEx',
+ 'EndMessage',
+ 'MsgHook',
+ 'MsgPostHook',
+ 'HookUserMessage',
+ 'UnhookUserMessage',
+ 'StartMessageAll',
+ 'StartMessageOne',
+ 'InactivateClient',
+ 'ReconnectClient',
+ 'GetMaxEntities',
+ 'GetEntityCount',
+ 'IsValidEntity',
+ 'IsValidEdict',
+ 'IsEntNetworkable',
+ 'CreateEdict',
+ 'RemoveEdict',
+ 'GetEdictFlags',
+ 'SetEdictFlags',
+ 'GetEdictClassname',
+ 'GetEntityNetClass',
+ 'ChangeEdictState',
+ 'GetEntData',
+ 'SetEntData',
+ 'GetEntDataFloat',
+ 'SetEntDataFloat',
+ 'GetEntDataEnt2',
+ 'SetEntDataEnt2',
+ 'GetEntDataVector',
+ 'SetEntDataVector',
+ 'GetEntDataString',
+ 'SetEntDataString',
+ 'FindSendPropOffs',
+ 'FindSendPropInfo',
+ 'FindDataMapOffs',
+ 'GetEntSendPropOffs',
+ 'GetEntProp',
+ 'SetEntProp',
+ 'GetEntPropFloat',
+ 'SetEntPropFloat',
+ 'GetEntPropEnt',
+ 'SetEntPropEnt',
+ 'GetEntPropVector',
+ 'SetEntPropVector',
+ 'GetEntPropString',
+ 'SetEntPropString',
+ 'GetEntPropArraySize',
+ 'GetEntDataArray',
+ 'SetEntDataArray',
+ 'GetEntityClassname',
+ 'float',
+ 'FloatMul',
+ 'FloatDiv',
+ 'FloatAdd',
+ 'FloatSub',
+ 'FloatFraction',
+ 'RoundToZero',
+ 'RoundToCeil',
+ 'RoundToFloor',
+ 'RoundToNearest',
+ 'FloatCompare',
+ 'SquareRoot',
+ 'Pow',
+ 'Exponential',
+ 'Logarithm',
+ 'Sine',
+ 'Cosine',
+ 'Tangent',
+ 'FloatAbs',
+ 'ArcTangent',
+ 'ArcCosine',
+ 'ArcSine',
+ 'ArcTangent2',
+ 'RoundFloat',
+ 'operator%',
+ 'DegToRad',
+ 'RadToDeg',
+ 'GetURandomInt',
+ 'GetURandomFloat',
+ 'SetURandomSeed',
+ 'SetURandomSeedSimple',
+ 'RemovePlayerItem',
+ 'GivePlayerItem',
+ 'GetPlayerWeaponSlot',
+ 'IgniteEntity',
+ 'ExtinguishEntity',
+ 'TeleportEntity',
+ 'ForcePlayerSuicide',
+ 'SlapPlayer',
+ 'FindEntityByClassname',
+ 'GetClientEyeAngles',
+ 'CreateEntityByName',
+ 'DispatchSpawn',
+ 'DispatchKeyValue',
+ 'DispatchKeyValueFloat',
+ 'DispatchKeyValueVector',
+ 'GetClientAimTarget',
+ 'GetTeamCount',
+ 'GetTeamName',
+ 'GetTeamScore',
+ 'SetTeamScore',
+ 'GetTeamClientCount',
+ 'SetEntityModel',
+ 'GetPlayerDecalFile',
+ 'GetServerNetStats',
+ 'EquipPlayerWeapon',
+ 'ActivateEntity',
+ 'SetClientInfo',
+ 'SetClientListeningFlags',
+ 'GetClientListeningFlags',
+ 'SetListenOverride',
+ 'GetListenOverride',
+ 'IsClientMuted',
+ 'TR_GetPointContents',
+ 'TR_GetPointContentsEnt',
+ 'TR_TraceRay',
+ 'TR_TraceHull',
+ 'TR_TraceRayFilter',
+ 'TR_TraceHullFilter',
+ 'TR_TraceRayEx',
+ 'TR_TraceHullEx',
+ 'TR_TraceRayFilterEx',
+ 'TR_TraceHullFilterEx',
+ 'TR_GetFraction',
+ 'TR_GetEndPosition',
+ 'TR_GetEntityIndex',
+ 'TR_DidHit',
+ 'TR_GetHitGroup',
+ 'TR_GetPlaneNormal',
+ 'TR_PointOutsideWorld',
+ 'SortIntegers',
+ 'SortFloats',
+ 'SortStrings',
+ 'SortFunc1D',
+ 'SortCustom1D',
+ 'SortCustom2D',
+ 'SortADTArray',
+ 'SortFuncADTArray',
+ 'SortADTArrayCustom',
+ 'CompileRegex',
+ 'MatchRegex',
+ 'GetRegexSubString',
+ 'SimpleRegexMatch',
+ 'TF2_GetPlayerClass',
+ 'TF2_SetPlayerClass',
+ 'TF2_GetPlayerResourceData',
+ 'TF2_SetPlayerResourceData',
+ 'TF2_RemoveWeaponSlot',
+ 'TF2_RemoveAllWeapons',
+ 'TF2_IsPlayerInCondition',
+ 'TF2_GetObjectType',
+ 'TF2_GetObjectMode',
+ 'NominateMap',
+ 'RemoveNominationByMap',
+ 'RemoveNominationByOwner',
+ 'GetExcludeMapList',
+ 'GetNominatedMapList',
+ 'CanMapChooserStartVote',
+ 'InitiateMapChooserVote',
+ 'HasEndOfMapVoteFinished',
+ 'EndOfMapVoteEnabled',
+ 'OnNominationRemoved',
+ 'OnMapVoteStarted',
+ 'CreateTimer',
+ 'KillTimer',
+ 'TriggerTimer',
+ 'GetTickedTime',
+ 'GetMapTimeLeft',
+ 'GetMapTimeLimit',
+ 'ExtendMapTimeLimit',
+ 'GetTickInterval',
+ 'OnMapTimeLeftChanged',
+ 'IsServerProcessing',
+ 'CreateDataTimer',
+ 'ByteCountToCells',
+ 'CreateArray',
+ 'ClearArray',
+ 'CloneArray',
+ 'ResizeArray',
+ 'GetArraySize',
+ 'PushArrayCell',
+ 'PushArrayString',
+ 'PushArrayArray',
+ 'GetArrayCell',
+ 'GetArrayString',
+ 'GetArrayArray',
+ 'SetArrayCell',
+ 'SetArrayString',
+ 'SetArrayArray',
+ 'ShiftArrayUp',
+ 'RemoveFromArray',
+ 'SwapArrayItems',
+ 'FindStringInArray',
+ 'FindValueInArray',
+ 'ProcessTargetString',
+ 'ReplyToTargetError',
+ 'MultiTargetFilter',
+ 'AddMultiTargetFilter',
+ 'RemoveMultiTargetFilter',
+ 'OnBanClient',
+ 'OnBanIdentity',
+ 'OnRemoveBan',
+ 'BanClient',
+ 'BanIdentity',
+ 'RemoveBan',
+ 'CreateTrie',
+ 'SetTrieValue',
+ 'SetTrieArray',
+ 'SetTrieString',
+ 'GetTrieValue',
+ 'GetTrieArray',
+ 'GetTrieString',
+ 'RemoveFromTrie',
+ 'ClearTrie',
+ 'GetTrieSize',
+ 'GetFunctionByName',
+ 'CreateGlobalForward',
+ 'CreateForward',
+ 'GetForwardFunctionCount',
+ 'AddToForward',
+ 'RemoveFromForward',
+ 'RemoveAllFromForward',
+ 'Call_StartForward',
+ 'Call_StartFunction',
+ 'Call_PushCell',
+ 'Call_PushCellRef',
+ 'Call_PushFloat',
+ 'Call_PushFloatRef',
+ 'Call_PushArray',
+ 'Call_PushArrayEx',
+ 'Call_PushString',
+ 'Call_PushStringEx',
+ 'Call_Finish',
+ 'Call_Cancel',
+ 'NativeCall',
+ 'CreateNative',
+ 'ThrowNativeError',
+ 'GetNativeStringLength',
+ 'GetNativeString',
+ 'SetNativeString',
+ 'GetNativeCell',
+ 'GetNativeCellRef',
+ 'SetNativeCellRef',
+ 'GetNativeArray',
+ 'SetNativeArray',
+ 'FormatNativeString',
+ 'OnRebuildAdminCache',
+ 'DumpAdminCache',
+ 'AddCommandOverride',
+ 'GetCommandOverride',
+ 'UnsetCommandOverride',
+ 'CreateAdmGroup',
+ 'FindAdmGroup',
+ 'SetAdmGroupAddFlag',
+ 'GetAdmGroupAddFlag',
+ 'GetAdmGroupAddFlags',
+ 'SetAdmGroupImmuneFrom',
+ 'GetAdmGroupImmuneCount',
+ 'GetAdmGroupImmuneFrom',
+ 'AddAdmGroupCmdOverride',
+ 'GetAdmGroupCmdOverride',
+ 'RegisterAuthIdentType',
+ 'CreateAdmin',
+ 'GetAdminUsername',
+ 'BindAdminIdentity',
+ 'SetAdminFlag',
+ 'GetAdminFlag',
+ 'GetAdminFlags',
+ 'AdminInheritGroup',
+ 'GetAdminGroupCount',
+ 'GetAdminGroup',
+ 'SetAdminPassword',
+ 'GetAdminPassword',
+ 'FindAdminByIdentity',
+ 'RemoveAdmin',
+ 'FlagBitsToBitArray',
+ 'FlagBitArrayToBits',
+ 'FlagArrayToBits',
+ 'FlagBitsToArray',
+ 'FindFlagByName',
+ 'FindFlagByChar',
+ 'FindFlagChar',
+ 'ReadFlagString',
+ 'CanAdminTarget',
+ 'CreateAuthMethod',
+ 'SetAdmGroupImmunityLevel',
+ 'GetAdmGroupImmunityLevel',
+ 'SetAdminImmunityLevel',
+ 'GetAdminImmunityLevel',
+ 'FlagToBit',
+ 'BitToFlag',
+ 'ServerCommand',
+ 'ServerCommandEx',
+ 'InsertServerCommand',
+ 'ServerExecute',
+ 'ClientCommand',
+ 'FakeClientCommand',
+ 'FakeClientCommandEx',
+ 'PrintToServer',
+ 'PrintToConsole',
+ 'ReplyToCommand',
+ 'GetCmdReplySource',
+ 'SetCmdReplySource',
+ 'IsChatTrigger',
+ 'ShowActivity2',
+ 'ShowActivity',
+ 'ShowActivityEx',
+ 'FormatActivitySource',
+ 'SrvCmd',
+ 'RegServerCmd',
+ 'ConCmd',
+ 'RegConsoleCmd',
+ 'RegAdminCmd',
+ 'GetCmdArgs',
+ 'GetCmdArg',
+ 'GetCmdArgString',
+ 'CreateConVar',
+ 'FindConVar',
+ 'ConVarChanged',
+ 'HookConVarChange',
+ 'UnhookConVarChange',
+ 'GetConVarBool',
+ 'SetConVarBool',
+ 'GetConVarInt',
+ 'SetConVarInt',
+ 'GetConVarFloat',
+ 'SetConVarFloat',
+ 'GetConVarString',
+ 'SetConVarString',
+ 'ResetConVar',
+ 'GetConVarDefault',
+ 'GetConVarFlags',
+ 'SetConVarFlags',
+ 'GetConVarBounds',
+ 'SetConVarBounds',
+ 'GetConVarName',
+ 'QueryClientConVar',
+ 'GetCommandIterator',
+ 'ReadCommandIterator',
+ 'CheckCommandAccess',
+ 'CheckAccess',
+ 'IsValidConVarChar',
+ 'GetCommandFlags',
+ 'SetCommandFlags',
+ 'FindFirstConCommand',
+ 'FindNextConCommand',
+ 'SendConVarValue',
+ 'AddServerTag',
+ 'RemoveServerTag',
+ 'CommandListener',
+ 'AddCommandListener',
+ 'RemoveCommandListener',
+ 'TF2_IgnitePlayer',
+ 'TF2_RespawnPlayer',
+ 'TF2_RegeneratePlayer',
+ 'TF2_AddCondition',
+ 'TF2_RemoveCondition',
+ 'TF2_SetPlayerPowerPlay',
+ 'TF2_DisguisePlayer',
+ 'TF2_RemovePlayerDisguise',
+ 'TF2_StunPlayer',
+ 'TF2_MakeBleed',
+ 'TF2_GetResourceEntity',
+ 'TF2_GetClass',
+ 'TF2_CalcIsAttackCritical',
+ 'TF2_OnIsHolidayActive',
+ 'TF2_IsPlayerInDuel',
+ 'TF2_OnConditionAdded',
+ 'TF2_OnConditionRemoved',
+ 'TF2_OnWaitingForPlayersStart',
+ 'TF2_OnWaitingForPlayersEnd',
+ 'SQL_Connect',
+ 'SQL_DefConnect',
+ 'SQL_ConnectCustom',
+ 'SQLite_UseDatabase',
+ 'SQL_CheckConfig',
+ 'SQL_GetDriver',
+ 'SQL_ReadDriver',
+ 'SQL_GetDriverIdent',
+ 'SQL_GetDriverProduct',
+ 'SQL_GetAffectedRows',
+ 'SQL_GetInsertId',
+ 'SQL_GetError',
+ 'SQL_EscapeString',
+ 'SQL_QuoteString',
+ 'SQL_FastQuery',
+ 'SQL_Query',
+ 'SQL_PrepareQuery',
+ 'SQL_FetchMoreResults',
+ 'SQL_HasResultSet',
+ 'SQL_GetRowCount',
+ 'SQL_GetFieldCount',
+ 'SQL_FieldNumToName',
+ 'SQL_FieldNameToNum',
+ 'SQL_FetchRow',
+ 'SQL_MoreRows',
+ 'SQL_Rewind',
+ 'SQL_FetchString',
+ 'SQL_FetchFloat',
+ 'SQL_FetchInt',
+ 'SQL_IsFieldNull',
+ 'SQL_FetchSize',
+ 'SQL_BindParamInt',
+ 'SQL_BindParamFloat',
+ 'SQL_BindParamString',
+ 'SQL_Execute',
+ 'SQL_LockDatabase',
+ 'SQL_UnlockDatabase',
+ 'SQLTCallback',
+ 'SQL_IsSameConnection',
+ 'SQL_TConnect',
+ 'SQL_TQuery',
+ 'CloseHandle',
+ 'CloneHandle',
+ 'MenuHandler',
+ 'CreateMenu',
+ 'DisplayMenu',
+ 'DisplayMenuAtItem',
+ 'AddMenuItem',
+ 'InsertMenuItem',
+ 'RemoveMenuItem',
+ 'RemoveAllMenuItems',
+ 'GetMenuItem',
+ 'GetMenuSelectionPosition',
+ 'GetMenuItemCount',
+ 'SetMenuPagination',
+ 'GetMenuPagination',
+ 'GetMenuStyle',
+ 'SetMenuTitle',
+ 'GetMenuTitle',
+ 'CreatePanelFromMenu',
+ 'GetMenuExitButton',
+ 'SetMenuExitButton',
+ 'GetMenuExitBackButton',
+ 'SetMenuExitBackButton',
+ 'SetMenuNoVoteButton',
+ 'CancelMenu',
+ 'GetMenuOptionFlags',
+ 'SetMenuOptionFlags',
+ 'IsVoteInProgress',
+ 'CancelVote',
+ 'VoteMenu',
+ 'VoteMenuToAll',
+ 'VoteHandler',
+ 'SetVoteResultCallback',
+ 'CheckVoteDelay',
+ 'IsClientInVotePool',
+ 'RedrawClientVoteMenu',
+ 'GetMenuStyleHandle',
+ 'CreatePanel',
+ 'CreateMenuEx',
+ 'GetClientMenu',
+ 'CancelClientMenu',
+ 'GetMaxPageItems',
+ 'GetPanelStyle',
+ 'SetPanelTitle',
+ 'DrawPanelItem',
+ 'DrawPanelText',
+ 'CanPanelDrawFlags',
+ 'SetPanelKeys',
+ 'SendPanelToClient',
+ 'GetPanelTextRemaining',
+ 'GetPanelCurrentKey',
+ 'SetPanelCurrentKey',
+ 'RedrawMenuItem',
+ 'InternalShowMenu',
+ 'GetMenuVoteInfo',
+ 'IsNewVoteAllowed',
+ 'PrefetchSound',
+ 'EmitAmbientSound',
+ 'FadeClientVolume',
+ 'StopSound',
+ 'EmitSound',
+ 'EmitSentence',
+ 'GetDistGainFromSoundLevel',
+ 'AmbientSHook',
+ 'NormalSHook',
+ 'AddAmbientSoundHook',
+ 'AddNormalSoundHook',
+ 'RemoveAmbientSoundHook',
+ 'RemoveNormalSoundHook',
+ 'EmitSoundToClient',
+ 'EmitSoundToAll',
+ 'ATTN_TO_SNDLEVEL',
+ 'strlen',
+ 'StrContains',
+ 'strcmp',
+ 'strncmp',
+ 'StrEqual',
+ 'strcopy',
+ 'Format',
+ 'FormatEx',
+ 'VFormat',
+ 'StringToInt',
+ 'StringToIntEx',
+ 'IntToString',
+ 'StringToFloat',
+ 'StringToFloatEx',
+ 'FloatToString',
+ 'BreakString',
+ 'TrimString',
+ 'SplitString',
+ 'ReplaceString',
+ 'ReplaceStringEx',
+ 'GetCharBytes',
+ 'IsCharAlpha',
+ 'IsCharNumeric',
+ 'IsCharSpace',
+ 'IsCharMB',
+ 'IsCharUpper',
+ 'IsCharLower',
+ 'StripQuotes',
+ 'CharToUpper',
+ 'CharToLower',
+ 'FindCharInString',
+ 'StrCat',
+ 'ExplodeString',
+ 'ImplodeStrings',
+ 'GetVectorLength',
+ 'GetVectorDistance',
+ 'GetVectorDotProduct',
+ 'GetVectorCrossProduct',
+ 'NormalizeVector',
+ 'GetAngleVectors',
+ 'GetVectorAngles',
+ 'GetVectorVectors',
+ 'AddVectors',
+ 'SubtractVectors',
+ 'ScaleVector',
+ 'NegateVector',
+ 'MakeVectorFromPoints',
+ 'BaseComm_IsClientGagged',
+ 'BaseComm_IsClientMuted',
+ 'BaseComm_SetClientGag',
+ 'BaseComm_SetClientMute',
+ 'FormatUserLogText',
+ 'FindPluginByFile',
+ 'FindTarget',
+ 'AcceptEntityInput',
+ 'SetVariantBool',
+ 'SetVariantString',
+ 'SetVariantInt',
+ 'SetVariantFloat',
+ 'SetVariantVector3D',
+ 'SetVariantPosVector3D',
+ 'SetVariantColor',
+ 'SetVariantEntity',
+ 'GameRules_GetProp',
+ 'GameRules_SetProp',
+ 'GameRules_GetPropFloat',
+ 'GameRules_SetPropFloat',
+ 'GameRules_GetPropEnt',
+ 'GameRules_SetPropEnt',
+ 'GameRules_GetPropVector',
+ 'GameRules_SetPropVector',
+ 'GameRules_GetPropString',
+ 'GameRules_SetPropString',
+ 'GameRules_GetRoundState',
+ 'OnClientConnect',
+ 'OnClientConnected',
+ 'OnClientPutInServer',
+ 'OnClientDisconnect',
+ 'OnClientDisconnect_Post',
+ 'OnClientCommand',
+ 'OnClientSettingsChanged',
+ 'OnClientAuthorized',
+ 'OnClientPreAdminCheck',
+ 'OnClientPostAdminFilter',
+ 'OnClientPostAdminCheck',
+ 'GetMaxClients',
+ 'GetClientCount',
+ 'GetClientName',
+ 'GetClientIP',
+ 'GetClientAuthString',
+ 'GetClientUserId',
+ 'IsClientConnected',
+ 'IsClientInGame',
+ 'IsClientInKickQueue',
+ 'IsClientAuthorized',
+ 'IsFakeClient',
+ 'IsClientSourceTV',
+ 'IsClientReplay',
+ 'IsClientObserver',
+ 'IsPlayerAlive',
+ 'GetClientInfo',
+ 'GetClientTeam',
+ 'SetUserAdmin',
+ 'GetUserAdmin',
+ 'AddUserFlags',
+ 'RemoveUserFlags',
+ 'SetUserFlagBits',
+ 'GetUserFlagBits',
+ 'CanUserTarget',
+ 'RunAdminCacheChecks',
+ 'NotifyPostAdminCheck',
+ 'CreateFakeClient',
+ 'SetFakeClientConVar',
+ 'GetClientHealth',
+ 'GetClientModel',
+ 'GetClientWeapon',
+ 'GetClientMaxs',
+ 'GetClientMins',
+ 'GetClientAbsAngles',
+ 'GetClientAbsOrigin',
+ 'GetClientArmor',
+ 'GetClientDeaths',
+ 'GetClientFrags',
+ 'GetClientDataRate',
+ 'IsClientTimingOut',
+ 'GetClientTime',
+ 'GetClientLatency',
+ 'GetClientAvgLatency',
+ 'GetClientAvgLoss',
+ 'GetClientAvgChoke',
+ 'GetClientAvgData',
+ 'GetClientAvgPackets',
+ 'GetClientOfUserId',
+ 'KickClient',
+ 'KickClientEx',
+ 'ChangeClientTeam',
+ 'GetClientSerial',
+ 'GetClientFromSerial',
+ 'FindStringTable',
+ 'GetNumStringTables',
+ 'GetStringTableNumStrings',
+ 'GetStringTableMaxStrings',
+ 'GetStringTableName',
+ 'FindStringIndex',
+ 'ReadStringTable',
+ 'GetStringTableDataLength',
+ 'GetStringTableData',
+ 'SetStringTableData',
+ 'AddToStringTable',
+ 'LockStringTables',
+ 'AddFileToDownloadsTable',
+ 'GetEntityFlags',
+ 'SetEntityFlags',
+ 'GetEntityMoveType',
+ 'SetEntityMoveType',
+ 'GetEntityRenderMode',
+ 'SetEntityRenderMode',
+ 'GetEntityRenderFx',
+ 'SetEntityRenderFx',
+ 'SetEntityRenderColor',
+ 'GetEntityGravity',
+ 'SetEntityGravity',
+ 'SetEntityHealth',
+ 'GetClientButtons',
+ 'EntityOutput',
+ 'HookEntityOutput',
+ 'UnhookEntityOutput',
+ 'HookSingleEntityOutput',
+ 'UnhookSingleEntityOutput',
+ 'SMC_CreateParser',
+ 'SMC_ParseFile',
+ 'SMC_GetErrorString',
+ 'SMC_ParseStart',
+ 'SMC_SetParseStart',
+ 'SMC_ParseEnd',
+ 'SMC_SetParseEnd',
+ 'SMC_NewSection',
+ 'SMC_KeyValue',
+ 'SMC_EndSection',
+ 'SMC_SetReaders',
+ 'SMC_RawLine',
+ 'SMC_SetRawLine',
+ 'BfWriteBool',
+ 'BfWriteByte',
+ 'BfWriteChar',
+ 'BfWriteShort',
+ 'BfWriteWord',
+ 'BfWriteNum',
+ 'BfWriteFloat',
+ 'BfWriteString',
+ 'BfWriteEntity',
+ 'BfWriteAngle',
+ 'BfWriteCoord',
+ 'BfWriteVecCoord',
+ 'BfWriteVecNormal',
+ 'BfWriteAngles',
+ 'BfReadBool',
+ 'BfReadByte',
+ 'BfReadChar',
+ 'BfReadShort',
+ 'BfReadWord',
+ 'BfReadNum',
+ 'BfReadFloat',
+ 'BfReadString',
+ 'BfReadEntity',
+ 'BfReadAngle',
+ 'BfReadCoord',
+ 'BfReadVecCoord',
+ 'BfReadVecNormal',
+ 'BfReadAngles',
+ 'BfGetNumBytesLeft',
+ 'CreateProfiler',
+ 'StartProfiling',
+ 'StopProfiling',
+ 'GetProfilerTime',
+ 'OnPluginStart',
+ 'AskPluginLoad2',
+ 'OnPluginEnd',
+ 'OnPluginPauseChange',
+ 'OnGameFrame',
+ 'OnMapStart',
+ 'OnMapEnd',
+ 'OnConfigsExecuted',
+ 'OnAutoConfigsBuffered',
+ 'OnAllPluginsLoaded',
+ 'GetMyHandle',
+ 'GetPluginIterator',
+ 'MorePlugins',
+ 'ReadPlugin',
+ 'GetPluginStatus',
+ 'GetPluginFilename',
+ 'IsPluginDebugging',
+ 'GetPluginInfo',
+ 'FindPluginByNumber',
+ 'SetFailState',
+ 'ThrowError',
+ 'GetTime',
+ 'FormatTime',
+ 'LoadGameConfigFile',
+ 'GameConfGetOffset',
+ 'GameConfGetKeyValue',
+ 'GetSysTickCount',
+ 'AutoExecConfig',
+ 'RegPluginLibrary',
+ 'LibraryExists',
+ 'GetExtensionFileStatus',
+ 'OnLibraryAdded',
+ 'OnLibraryRemoved',
+ 'ReadMapList',
+ 'SetMapListCompatBind',
+ 'OnClientFloodCheck',
+ 'OnClientFloodResult',
+ 'CanTestFeatures',
+ 'GetFeatureStatus',
+ 'RequireFeature',
+ 'LoadFromAddress',
+ 'StoreToAddress',
+ 'CreateStack',
+ 'PushStackCell',
+ 'PushStackString',
+ 'PushStackArray',
+ 'PopStackCell',
+ 'PopStackString',
+ 'PopStackArray',
+ 'IsStackEmpty',
+ 'PopStack',
+ 'OnPlayerRunCmd',
+ 'BuildPath',
+ 'OpenDirectory',
+ 'ReadDirEntry',
+ 'OpenFile',
+ 'DeleteFile',
+ 'ReadFileLine',
+ 'ReadFile',
+ 'ReadFileString',
+ 'WriteFile',
+ 'WriteFileString',
+ 'WriteFileLine',
+ 'ReadFileCell',
+ 'WriteFileCell',
+ 'IsEndOfFile',
+ 'FileSeek',
+ 'FilePosition',
+ 'FileExists',
+ 'RenameFile',
+ 'DirExists',
+ 'FileSize',
+ 'FlushFile',
+ 'RemoveDir',
+ 'CreateDirectory',
+ 'GetFileTime',
+ 'LogToOpenFile',
+ 'LogToOpenFileEx',
+ 'SetNextMap',
+ 'GetNextMap',
+ 'ForceChangeLevel',
+ 'GetMapHistorySize',
+ 'GetMapHistory',
+ 'GeoipCode2',
+ 'GeoipCode3',
+ 'GeoipCountry',
+ 'MarkNativeAsOptional',
+ 'RegClientCookie',
+ 'FindClientCookie',
+ 'SetClientCookie',
+ 'GetClientCookie',
+ 'SetAuthIdCookie',
+ 'AreClientCookiesCached',
+ 'OnClientCookiesCached',
+ 'CookieMenuHandler',
+ 'SetCookiePrefabMenu',
+ 'SetCookieMenuItem',
+ 'ShowCookieMenu',
+ 'GetCookieIterator',
+ 'ReadCookieIterator',
+ 'GetCookieAccess',
+ 'GetClientCookieTime',
+ 'LoadTranslations',
+ 'SetGlobalTransTarget',
+ 'GetClientLanguage',
+ 'GetServerLanguage',
+ 'GetLanguageCount',
+ 'GetLanguageInfo',
+ 'SetClientLanguage',
+ 'GetLanguageByCode',
+ 'GetLanguageByName',
+ 'CS_OnBuyCommand',
+ 'CS_OnCSWeaponDrop',
+ 'CS_OnGetWeaponPrice',
+ 'CS_OnTerminateRound',
+ 'CS_RespawnPlayer',
+ 'CS_SwitchTeam',
+ 'CS_DropWeapon',
+ 'CS_TerminateRound',
+ 'CS_GetTranslatedWeaponAlias',
+ 'CS_GetWeaponPrice',
+ 'CS_GetClientClanTag',
+ 'CS_SetClientClanTag',
+ 'LogToGame',
+ 'SetRandomSeed',
+ 'GetRandomFloat',
+ 'GetRandomInt',
+ 'IsMapValid',
+ 'IsDedicatedServer',
+ 'GetEngineTime',
+ 'GetGameTime',
+ 'GetGameTickCount',
+ 'GetGameDescription',
+ 'GetGameFolderName',
+ 'GetCurrentMap',
+ 'PrecacheModel',
+ 'PrecacheSentenceFile',
+ 'PrecacheDecal',
+ 'PrecacheGeneric',
+ 'IsModelPrecached',
+ 'IsDecalPrecached',
+ 'IsGenericPrecached',
+ 'PrecacheSound',
+ 'IsSoundPrecached',
+ 'CreateDialog',
+ 'GuessSDKVersion',
+ 'PrintToChat',
+ 'PrintToChatAll',
+ 'PrintCenterText',
+ 'PrintCenterTextAll',
+ 'PrintHintText',
+ 'PrintHintTextToAll',
+ 'ShowVGUIPanel',
+ 'CreateHudSynchronizer',
+ 'SetHudTextParams',
+ 'SetHudTextParamsEx',
+ 'ShowSyncHudText',
+ 'ClearSyncHud',
+ 'ShowHudText',
+ 'ShowMOTDPanel',
+ 'DisplayAskConnectBox',
+ 'EntIndexToEntRef',
+ 'EntRefToEntIndex',
+ 'MakeCompatEntRef',
+ 'SetClientViewEntity',
+ 'SetLightStyle',
+ 'GetClientEyePosition',
+ 'CreateDataPack',
+ 'WritePackCell',
+ 'WritePackFloat',
+ 'WritePackString',
+ 'ReadPackCell',
+ 'ReadPackFloat',
+ 'ReadPackString',
+ 'ResetPack',
+ 'GetPackPosition',
+ 'SetPackPosition',
+ 'IsPackReadable',
+ 'LogMessage',
+ 'LogMessageEx',
+ 'LogToFile',
+ 'LogToFileEx',
+ 'LogAction',
+ 'LogError',
+ 'OnLogAction',
+ 'GameLogHook',
+ 'AddGameLogHook',
+ 'RemoveGameLogHook',
+ 'FindTeamByName',
+ 'StartPrepSDKCall',
+ 'PrepSDKCall_SetVirtual',
+ 'PrepSDKCall_SetSignature',
+ 'PrepSDKCall_SetFromConf',
+ 'PrepSDKCall_SetReturnInfo',
+ 'PrepSDKCall_AddParameter',
+ 'EndPrepSDKCall',
+ 'SDKCall']
+
+if __name__ == '__main__':
+ import pprint
+ import re
+ import sys
+ import urllib
+
+ # urllib ends up wanting to import a module called 'math' -- if
+ # pygments/lexers is in the path, this ends badly.
+ for i in range(len(sys.path)-1, -1, -1):
+ if sys.path[i].endswith('/lexers'):
+ del sys.path[i]
+
+ def get_version():
+ f = urllib.urlopen('http://docs.sourcemod.net/api/index.php')
+ r = re.compile(r'SourceMod v\.<b>([\d\.]+)</td>')
+ for line in f:
+ m = r.search(line)
+ if m is not None:
+ return m.groups()[0]
+
+ def get_sm_functions():
+ f = urllib.urlopen('http://docs.sourcemod.net/api/SMfuncs.js')
+ r = re.compile(r'SMfunctions\[\d+\] = Array \("(?:public )?([^,]+)",".+"\);')
+ functions = []
+ for line in f:
+ m = r.match(line)
+ if m is not None:
+ functions.append(m.groups()[0])
+ return functions
+
+ def regenerate(filename, natives):
+ f = open(filename)
+ try:
+ content = f.read()
+ finally:
+ f.close()
+
+ header = content[:content.find('FUNCTIONS = [')]
+ footer = content[content.find("if __name__ == '__main__':"):]
+
+
+ f = open(filename, 'w')
+ f.write(header)
+ f.write('FUNCTIONS = %s\n\n' % pprint.pformat(natives))
+ f.write(footer)
+ f.close()
+
+ def run():
+ version = get_version()
+ print '> Downloading function index for SourceMod %s' % version
+ functions = get_sm_functions()
+ print '> %d functions found:' % len(functions)
+
+ functionlist = []
+ for full_function_name in functions:
+ print '>> %s' % full_function_name
+ functionlist.append(full_function_name)
+
+ regenerate(__file__, functionlist)
+
+
+ run()
diff --git a/pygments/lexers/_stan_builtins.py b/pygments/lexers/_stan_builtins.py
new file mode 100644
index 00000000..69d8ce75
--- /dev/null
+++ b/pygments/lexers/_stan_builtins.py
@@ -0,0 +1,174 @@
+# -*- coding: utf-8 -*-
+"""
+ pygments.lexers._stan_builtins
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ This file contains the names of functions for Stan used by
+ ``pygments.lexers.math.StanLexer.
+
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+CONSTANTS=[ 'e',
+ 'epsilon',
+ 'log10',
+ 'log2',
+ 'negative_epsilon',
+ 'negative_infinity',
+ 'not_a_number',
+ 'pi',
+ 'positive_infinity',
+ 'sqrt2']
+
+FUNCTIONS=[ 'Phi',
+ 'abs',
+ 'acos',
+ 'acosh',
+ 'asin',
+ 'asinh',
+ 'atan',
+ 'atan2',
+ 'atanh',
+ 'bernoulli_log',
+ 'beta_binomial_log',
+ 'beta_log',
+ 'binary_log_loss',
+ 'binomial_coefficient_log',
+ 'categorical_log',
+ 'cauchy_log',
+ 'cbrt',
+ 'ceil',
+ 'chi_square_log',
+ 'cholesky_decompose',
+ 'col',
+ 'cols',
+ 'cos',
+ 'cosh',
+ 'determinant',
+ 'diag_matrix',
+ 'diagonal',
+ 'dirichlet_log',
+ 'dot_product',
+ 'dot_self',
+ 'double_exponential_log',
+ 'eigenvalues',
+ 'eigenvalues_sym',
+ 'erf',
+ 'erfc',
+ 'exp',
+ 'exp2',
+ 'expm1',
+ 'exponential_cdf',
+ 'exponential_log',
+ 'fabs',
+ 'fdim',
+ 'floor',
+ 'fma',
+ 'fmax',
+ 'fmin',
+ 'fmod',
+ 'gamma_log',
+ 'hypergeometric_log',
+ 'hypot',
+ 'if_else',
+ 'int_step',
+ 'inv_chi_square_log',
+ 'inv_cloglog',
+ 'inv_gamma_log',
+ 'inv_logit',
+ 'inv_wishart_log',
+ 'inverse',
+ 'lbeta',
+ 'lgamma',
+ 'lkj_corr_cholesky_log',
+ 'lkj_corr_log',
+ 'lkj_cov_log',
+ 'lmgamma',
+ 'log',
+ 'log10',
+ 'log1m',
+ 'log1p',
+ 'log1p_exp',
+ 'log2',
+ 'log_sum_exp',
+ 'logistic_log',
+ 'logit',
+ 'lognormal_cdf',
+ 'lognormal_log',
+ 'max',
+ 'mean',
+ 'min',
+ 'multi_normal_cholesky_log',
+ 'multi_normal_log',
+ 'multi_student_t_log',
+ 'multinomial_log',
+ 'multiply_log',
+ 'multiply_lower_tri_self_transpose',
+ 'neg_binomial_log',
+ 'normal_cdf',
+ 'normal_log',
+ 'ordered_logistic_log',
+ 'pareto_log',
+ 'poisson_log',
+ 'pow',
+ 'prod',
+ 'round',
+ 'row',
+ 'rows',
+ 'scaled_inv_chi_square_log',
+ 'sd',
+ 'sin',
+ 'singular_values',
+ 'sinh',
+ 'softmax',
+ 'sqrt',
+ 'square',
+ 'step',
+ 'student_t_log',
+ 'sum',
+ 'tan',
+ 'tanh',
+ 'tgamma',
+ 'trace',
+ 'trunc',
+ 'uniform_log',
+ 'variance',
+ 'weibull_cdf',
+ 'weibull_log',
+ 'wishart_log']
+
+DISTRIBUTIONS=[ 'bernoulli',
+ 'beta',
+ 'beta_binomial',
+ 'categorical',
+ 'cauchy',
+ 'chi_square',
+ 'dirichlet',
+ 'double_exponential',
+ 'exponential',
+ 'gamma',
+ 'hypergeometric',
+ 'inv_chi_square',
+ 'inv_gamma',
+ 'inv_wishart',
+ 'lkj_corr',
+ 'lkj_corr_cholesky',
+ 'lkj_cov',
+ 'logistic',
+ 'lognormal',
+ 'multi_normal',
+ 'multi_normal_cholesky',
+ 'multi_student_t',
+ 'multinomial',
+ 'neg_binomial',
+ 'normal',
+ 'ordered_logistic',
+ 'pareto',
+ 'poisson',
+ 'scaled_inv_chi_square',
+ 'student_t',
+ 'uniform',
+ 'weibull',
+ 'wishart']
+
diff --git a/pygments/lexers/_vimbuiltins.py b/pygments/lexers/_vimbuiltins.py
index 1ba5245a..9fc1b15e 100644
--- a/pygments/lexers/_vimbuiltins.py
+++ b/pygments/lexers/_vimbuiltins.py
@@ -1,3 +1,13 @@
-auto=[('BufAdd','BufAdd'),('BufCreate','BufCreate'),('BufDelete','BufDelete'),('BufEnter','BufEnter'),('BufFilePost','BufFilePost'),('BufFilePre','BufFilePre'),('BufHidden','BufHidden'),('BufLeave','BufLeave'),('BufNew','BufNew'),('BufNewFile','BufNewFile'),('BufRead','BufRead'),('BufReadCmd','BufReadCmd'),('BufReadPost','BufReadPost'),('BufReadPre','BufReadPre'),('BufUnload','BufUnload'),('BufWinEnter','BufWinEnter'),('BufWinLeave','BufWinLeave'),('BufWipeout','BufWipeout'),('BufWrite','BufWrite'),('BufWriteCmd','BufWriteCmd'),('BufWritePost','BufWritePost'),('BufWritePre','BufWritePre'),('Cmd','Cmd'),('CmdwinEnter','CmdwinEnter'),('CmdwinLeave','CmdwinLeave'),('ColorScheme','ColorScheme'),('CursorHold','CursorHold'),('CursorHoldI','CursorHoldI'),('CursorMoved','CursorMoved'),('CursorMovedI','CursorMovedI'),('EncodingChanged','EncodingChanged'),('FileAppendCmd','FileAppendCmd'),('FileAppendPost','FileAppendPost'),('FileAppendPre','FileAppendPre'),('FileChangedRO','FileChangedRO'),('FileChangedShell','FileChangedShell'),('FileChangedShellPost','FileChangedShellPost'),('FileEncoding','FileEncoding'),('FileReadCmd','FileReadCmd'),('FileReadPost','FileReadPost'),('FileReadPre','FileReadPre'),('FileType','FileType'),('FileWriteCmd','FileWriteCmd'),('FileWritePost','FileWritePost'),('FileWritePre','FileWritePre'),('FilterReadPost','FilterReadPost'),('FilterReadPre','FilterReadPre'),('FilterWritePost','FilterWritePost'),('FilterWritePre','FilterWritePre'),('FocusGained','FocusGained'),('FocusLost','FocusLost'),('FuncUndefined','FuncUndefined'),('GUIEnter','GUIEnter'),('GUIFailed','GUIFailed'),('InsertChange','InsertChange'),('InsertCharPre','InsertCharPre'),('InsertEnter','InsertEnter'),('InsertLeave','InsertLeave'),('MenuPopup','MenuPopup'),('QuickFixCmdPost','QuickFixCmdPost'),('QuickFixCmdPre','QuickFixCmdPre'),('RemoteReply','RemoteReply'),('SessionLoadPost','SessionLoadPost'),('ShellCmdPost','ShellCmdPost'),('ShellFilterPost','ShellFilterPost'),('SourceCmd','SourceCmd'),('SourcePre','SourcePre'),('SpellFileMissing','SpellFileMissing'),('StdinReadPost','StdinReadPost'),('StdinReadPre','StdinReadPre'),('SwapExists','SwapExists'),('Syntax','Syntax'),('TabEnter','TabEnter'),('TabLeave','TabLeave'),('TermChanged','TermChanged'),('TermResponse','TermResponse'),('User','User'),('UserGettingBored','UserGettingBored'),('VimEnter','VimEnter'),('VimLeave','VimLeave'),('VimLeavePre','VimLeavePre'),('VimResized','VimResized'),('WinEnter','WinEnter'),('WinLeave','WinLeave'),('event','event')]
-command=[('Allargs','Allargs'),('DiffOrig','DiffOrig'),('Error','Error'),('Man','Man'),('MyCommand','MyCommand'),('Mycmd','Mycmd'),('N','N'),('N','Next'),('P','P'),('P','Print'),('Ren','Ren'),('Rena','Rena'),('Renu','Renu'),('TOhtml','TOhtml'),('X','X'),('XMLent','XMLent'),('XMLns','XMLns'),('a','a'),('ab','ab'),('abc','abclear'),('abo','aboveleft'),('al','all'),('ar','ar'),('ar','args'),('arga','argadd'),('argd','argdelete'),('argdo','argdo'),('arge','argedit'),('argg','argglobal'),('argl','arglocal'),('argu','argument'),('as','ascii'),('au','au'),('b','buffer'),('bN','bNext'),('ba','ball'),('bad','badd'),('bar','bar'),('bd','bdelete'),('bel','belowright'),('bf','bfirst'),('bl','blast'),('bm','bmodified'),('bn','bnext'),('bo','botright'),('bp','bprevious'),('br','br'),('br','brewind'),('brea','break'),('breaka','breakadd'),('breakd','breakdel'),('breakl','breaklist'),('bro','browse'),('browseset','browseset'),('bu','bu'),('buf','buf'),('bufdo','bufdo'),('buffers','buffers'),('bun','bunload'),('bw','bwipeout'),('c','c'),('c','change'),('cN','cN'),('cN','cNext'),('cNf','cNf'),('cNf','cNfile'),('cabc','cabclear'),('cad','cad'),('cad','caddexpr'),('caddb','caddbuffer'),('caddf','caddfile'),('cal','call'),('cat','catch'),('cb','cbuffer'),('cc','cc'),('ccl','cclose'),('cd','cd'),('ce','center'),('cex','cexpr'),('cf','cfile'),('cfir','cfirst'),('cg','cgetfile'),('cgetb','cgetbuffer'),('cgete','cgetexpr'),('changes','changes'),('chd','chdir'),('che','checkpath'),('checkt','checktime'),('cl','cl'),('cl','clist'),('cla','clast'),('clo','close'),('cmapc','cmapclear'),('cmdname','cmdname'),('cn','cn'),('cn','cnext'),('cnew','cnewer'),('cnf','cnf'),('cnf','cnfile'),('co','copy'),('col','colder'),('colo','colorscheme'),('com','com'),('comc','comclear'),('comment','comment'),('comp','compiler'),('con','con'),('con','continue'),('conf','confirm'),('cope','copen'),('count','count'),('cp','cprevious'),('cpf','cpfile'),('cq','cquit'),('cr','crewind'),('cs','cs'),('cscope','cscope'),('cstag','cstag'),('cuna','cunabbrev'),('cw','cwindow'),('d','d'),('d','delete'),('de','de'),('debug','debug'),('debugg','debuggreedy'),('del','del'),('delc','delcommand'),('delf','delf'),('delf','delfunction'),('delm','delmarks'),('di','di'),('di','display'),('diffg','diffget'),('diffo','diffo'),('diffoff','diffoff'),('diffp','diffp'),('diffpatch','diffpatch'),('diffpu','diffput'),('diffsplit','diffsplit'),('difft','difft'),('diffthis','diffthis'),('diffu','diffupdate'),('dig','dig'),('dig','digraphs'),('dj','djump'),('dl','dlist'),('do','do'),('doau','doau'),('dr','drop'),('ds','dsearch'),('dsp','dsplit'),('dwim','dwim'),('e','e'),('e','e'),('e','e'),('e','e'),('e','e'),('e','e'),('e','e'),('e','e'),('e','e'),('e','edit'),('ea','ea'),('earlier','earlier'),('ec','ec'),('echoe','echoerr'),('echom','echomsg'),('echon','echon'),('el','else'),('elsei','elseif'),('em','emenu'),('emenu','emenu'),('en','en'),('en','endif'),('endf','endf'),('endf','endfunction'),('endfo','endfor'),('endfun','endfun'),('endt','endtry'),('endw','endwhile'),('ene','enew'),('ex','ex'),('exi','exit'),('exu','exusage'),('f','f'),('f','file'),('filename','filename'),('files','files'),('filet','filet'),('filetype','filetype'),('fin','fin'),('fin','find'),('fina','finally'),('fini','finish'),('fir','first'),('fix','fixdel'),('fo','fold'),('foldc','foldclose'),('foldd','folddoopen'),('folddoc','folddoclosed'),('foldo','foldopen'),('for','for'),('fu','fu'),('fu','function'),('fun','fun'),('g','g'),('get','get'),('go','goto'),('gr','grep'),('grepa','grepadd'),('gs','gs'),('gs','gs'),('gui','gui'),('gvim','gvim'),('h','h'),('h','h'),('h','h'),('h','h'),('h','help'),('ha','hardcopy'),('helpf','helpfind'),('helpg','helpgrep'),('helpt','helptags'),('hi','hi'),('hid','hide'),('his','history'),('i','i'),('ia','ia'),('iabc','iabclear'),('if','if'),('ij','ijump'),('il','ilist'),('imapc','imapclear'),('in','in'),('index','index'),('intro','intro'),('is','isearch'),('isp','isplit'),('iuna','iunabbrev'),('j','join'),('ju','jumps'),('k','k'),('kee','keepmarks'),('keepa','keepa'),('keepalt','keepalt'),('keepj','keepjumps'),('l','l'),('l','list'),('lN','lN'),('lN','lNext'),('lNf','lNf'),('lNf','lNfile'),('la','la'),('la','last'),('lad','lad'),('lad','laddexpr'),('laddb','laddbuffer'),('laddf','laddfile'),('lan','lan'),('lan','language'),('lat','lat'),('later','later'),('lb','lbuffer'),('lc','lcd'),('lch','lchdir'),('lcl','lclose'),('lcs','lcs'),('lcscope','lcscope'),('le','left'),('lefta','leftabove'),('let','let'),('lex','lexpr'),('lf','lfile'),('lfir','lfirst'),('lg','lgetfile'),('lgetb','lgetbuffer'),('lgete','lgetexpr'),('lgr','lgrep'),('lgrepa','lgrepadd'),('lh','lhelpgrep'),('ll','ll'),('lla','llast'),('lli','llist'),('lmak','lmake'),('lmapc','lmapclear'),('lne','lne'),('lne','lnext'),('lnew','lnewer'),('lnf','lnf'),('lnf','lnfile'),('lo','lo'),('lo','loadview'),('loadk','loadk'),('loadkeymap','loadkeymap'),('loc','lockmarks'),('locale','locale'),('lockv','lockvar'),('lol','lolder'),('lop','lopen'),('lp','lprevious'),('lpf','lpfile'),('lr','lrewind'),('ls','ls'),('lt','ltag'),('lua','lua'),('luado','luado'),('luafile','luafile'),('lv','lvimgrep'),('lvimgrepa','lvimgrepadd'),('lw','lwindow'),('m','move'),('ma','ma'),('ma','mark'),('main','main'),('main','main'),('mak','make'),('marks','marks'),('mat','match'),('menut','menut'),('menut','menutranslate'),('mes','mes'),('messages','messages'),('mk','mk'),('mk','mkexrc'),('mkdir','mkdir'),('mks','mksession'),('mksp','mkspell'),('mkv','mkv'),('mkv','mkvimrc'),('mkvie','mkview'),('mo','mo'),('mod','mode'),('mv','mv'),('mz','mz'),('mz','mzscheme'),('mzf','mzfile'),('n','n'),('n','n'),('n','next'),('nb','nbkey'),('nbc','nbclose'),('nbs','nbstart'),('ne','ne'),('new','new'),('nkf','nkf'),('nmapc','nmapclear'),('noa','noa'),('noautocmd','noautocmd'),('noh','nohlsearch'),('nu','number'),('o','o'),('o','open'),('ol','oldfiles'),('omapc','omapclear'),('on','only'),('opt','options'),('ownsyntax','ownsyntax'),('p','p'),('p','p'),('p','p'),('p','p'),('p','p'),('p','p'),('p','p'),('p','p'),('p','p'),('p','print'),('pat','pat'),('pat','pat'),('pc','pclose'),('pe','pe'),('pe','perl'),('ped','pedit'),('perld','perldo'),('po','pop'),('popu','popu'),('popu','popup'),('pp','ppop'),('pr','pr'),('pre','preserve'),('prev','previous'),('pro','pro'),('prof','profile'),('profd','profdel'),('promptf','promptfind'),('promptr','promptrepl'),('ps','psearch'),('ptN','ptN'),('ptN','ptNext'),('pta','ptag'),('ptf','ptfirst'),('ptj','ptjump'),('ptl','ptlast'),('ptn','ptn'),('ptn','ptnext'),('ptp','ptprevious'),('ptr','ptrewind'),('pts','ptselect'),('pu','put'),('pw','pwd'),('py','py'),('py','python'),('py3','py3'),('py3','py3'),('py3file','py3file'),('pyf','pyfile'),('python3','python3'),('q','q'),('q','quit'),('qa','qall'),('quita','quitall'),('quote','quote'),('r','r'),('r','r'),('r','r'),('r','r'),('r','r'),('r','r'),('r','r'),('r','r'),('r','r'),('r','r'),('r','r'),('r','read'),('re','re'),('rec','recover'),('red','red'),('red','redo'),('redi','redir'),('redr','redraw'),('redraws','redrawstatus'),('reg','registers'),('res','resize'),('ret','retab'),('retu','return'),('rew','rewind'),('ri','right'),('rightb','rightbelow'),('ru','ru'),('ru','runtime'),('rub','ruby'),('rubyd','rubydo'),('rubyf','rubyfile'),('rundo','rundo'),('rv','rviminfo'),('s','s'),('s','s'),('s','s'),('s','s'),('sN','sNext'),('sa','sargument'),('sal','sall'),('san','sandbox'),('sav','saveas'),('sb','sbuffer'),('sbN','sbNext'),('sba','sball'),('sbf','sbfirst'),('sbl','sblast'),('sbm','sbmodified'),('sbn','sbnext'),('sbp','sbprevious'),('sbr','sbrewind'),('scrip','scrip'),('scrip','scriptnames'),('scripte','scriptencoding'),('scs','scs'),('scscope','scscope'),('se','set'),('setf','setfiletype'),('setg','setglobal'),('setl','setlocal'),('sf','sfind'),('sfir','sfirst'),('sh','shell'),('si','si'),('sig','sig'),('sign','sign'),('sil','silent'),('sim','simalt'),('sl','sl'),('sl','sleep'),('sla','slast'),('sm','smagic'),('sm','smap'),('sme','sme'),('smenu','smenu'),('sn','snext'),('sni','sniff'),('sno','snomagic'),('snoreme','snoreme'),('snoremenu','snoremenu'),('so','so'),('so','source'),('sor','sort'),('sp','split'),('spe','spe'),('spe','spellgood'),('spelld','spelldump'),('spelli','spellinfo'),('spellr','spellrepall'),('spellu','spellundo'),('spellw','spellwrong'),('spr','sprevious'),('sre','srewind'),('st','st'),('st','stop'),('sta','stag'),('star','star'),('star','startinsert'),('start','start'),('startg','startgreplace'),('startr','startreplace'),('stj','stjump'),('stopi','stopinsert'),('sts','stselect'),('sub','sub'),('sub','sub'),('sun','sunhide'),('sunme','sunme'),('sunmenu','sunmenu'),('sus','suspend'),('sv','sview'),('sw','swapname'),('sy','sy'),('syn','syn'),('sync','sync'),('syncbind','syncbind'),('synlist','synlist'),('t','t'),('t','t'),('t','t'),('tN','tN'),('tN','tNext'),('ta','ta'),('ta','tag'),('tab','tab'),('tabN','tabN'),('tabN','tabNext'),('tabc','tabclose'),('tabd','tabdo'),('tabe','tabedit'),('tabf','tabfind'),('tabfir','tabfirst'),('tabl','tablast'),('tabm','tabmove'),('tabn','tabnext'),('tabnew','tabnew'),('tabo','tabonly'),('tabp','tabprevious'),('tabr','tabrewind'),('tabs','tabs'),('tags','tags'),('tc','tcl'),('tcld','tcldo'),('tclf','tclfile'),('te','tearoff'),('tf','tfirst'),('th','throw'),('tj','tjump'),('tl','tlast'),('tm','tm'),('tm','tmenu'),('tn','tn'),('tn','tnext'),('to','topleft'),('tp','tprevious'),('tr','tr'),('tr','trewind'),('try','try'),('ts','tselect'),('tu','tu'),('tu','tunmenu'),('u','u'),('u','undo'),('un','un'),('una','unabbreviate'),('undoj','undojoin'),('undol','undolist'),('unh','unhide'),('unl','unl'),('unlo','unlockvar'),('uns','unsilent'),('up','update'),('v','v'),('ve','ve'),('ve','version'),('verb','verbose'),('version','version'),('version','version'),('vert','vertical'),('vi','vi'),('vi','visual'),('vie','view'),('vim','vimgrep'),('vimgrepa','vimgrepadd'),('viu','viusage'),('vmapc','vmapclear'),('vne','vnew'),('vs','vsplit'),('w','w'),('w','write'),('wN','wNext'),('wa','wall'),('wh','while'),('win','win'),('win','winsize'),('winc','wincmd'),('windo','windo'),('winp','winpos'),('wn','wnext'),('wp','wprevious'),('wq','wq'),('wqa','wqall'),('ws','wsverb'),('wundo','wundo'),('wv','wviminfo'),('x','x'),('x','xit'),('xa','xall'),('xmapc','xmapclear'),('xme','xme'),('xmenu','xmenu'),('xnoreme','xnoreme'),('xnoremenu','xnoremenu'),('xterm','xterm'),('xunme','xunme'),('xunmenu','xunmenu'),('xwininfo','xwininfo'),('y','yank')]
-option=[('acd','acd'),('ai','ai'),('akm','akm'),('al','al'),('aleph','aleph'),('allowrevins','allowrevins'),('altkeymap','altkeymap'),('ambiwidth','ambiwidth'),('ambw','ambw'),('anti','anti'),('antialias','antialias'),('ar','ar'),('arab','arab'),('arabic','arabic'),('arabicshape','arabicshape'),('ari','ari'),('arshape','arshape'),('autochdir','autochdir'),('autoindent','autoindent'),('autoread','autoread'),('autowrite','autowrite'),('autowriteall','autowriteall'),('aw','aw'),('awa','awa'),('background','background'),('backspace','backspace'),('backup','backup'),('backupcopy','backupcopy'),('backupdir','backupdir'),('backupext','backupext'),('backupskip','backupskip'),('balloondelay','balloondelay'),('ballooneval','ballooneval'),('balloonexpr','balloonexpr'),('bdir','bdir'),('bdlay','bdlay'),('beval','beval'),('bex','bex'),('bexpr','bexpr'),('bg','bg'),('bh','bh'),('bin','bin'),('binary','binary'),('biosk','biosk'),('bioskey','bioskey'),('bk','bk'),('bkc','bkc'),('bl','bl'),('bomb','bomb'),('breakat','breakat'),('brk','brk'),('browsedir','browsedir'),('bs','bs'),('bsdir','bsdir'),('bsk','bsk'),('bt','bt'),('bufhidden','bufhidden'),('buflisted','buflisted'),('buftype','buftype'),('casemap','casemap'),('cb','cb'),('cc','cc'),('ccv','ccv'),('cd','cd'),('cdpath','cdpath'),('cedit','cedit'),('cf','cf'),('cfu','cfu'),('ch','ch'),('charconvert','charconvert'),('ci','ci'),('cin','cin'),('cindent','cindent'),('cink','cink'),('cinkeys','cinkeys'),('cino','cino'),('cinoptions','cinoptions'),('cinw','cinw'),('cinwords','cinwords'),('clipboard','clipboard'),('cmdheight','cmdheight'),('cmdwinheight','cmdwinheight'),('cmp','cmp'),('cms','cms'),('co','co'),('cocu','cocu'),('cole','cole'),('colorcolumn','colorcolumn'),('columns','columns'),('com','com'),('comments','comments'),('commentstring','commentstring'),('compatible','compatible'),('complete','complete'),('completefunc','completefunc'),('completeopt','completeopt'),('concealcursor','concealcursor'),('conceallevel','conceallevel'),('confirm','confirm'),('consk','consk'),('conskey','conskey'),('copyindent','copyindent'),('cot','cot'),('cp','cp'),('cpo','cpo'),('cpoptions','cpoptions'),('cpt','cpt'),('crb','crb'),('cryptmethod','cryptmethod'),('cscopepathcomp','cscopepathcomp'),('cscopeprg','cscopeprg'),('cscopequickfix','cscopequickfix'),('cscoperelative','cscoperelative'),('cscopetag','cscopetag'),('cscopetagorder','cscopetagorder'),('cscopeverbose','cscopeverbose'),('cspc','cspc'),('csprg','csprg'),('csqf','csqf'),('csre','csre'),('cst','cst'),('csto','csto'),('csverb','csverb'),('cuc','cuc'),('cul','cul'),('cursorbind','cursorbind'),('cursorcolumn','cursorcolumn'),('cursorline','cursorline'),('cwh','cwh'),('debug','debug'),('deco','deco'),('def','def'),('define','define'),('delcombine','delcombine'),('dex','dex'),('dg','dg'),('dict','dict'),('dictionary','dictionary'),('diff','diff'),('diffexpr','diffexpr'),('diffopt','diffopt'),('digraph','digraph'),('dip','dip'),('dir','dir'),('directory','directory'),('display','display'),('dy','dy'),('ea','ea'),('ead','ead'),('eadirection','eadirection'),('eb','eb'),('ed','ed'),('edcompatible','edcompatible'),('ef','ef'),('efm','efm'),('ei','ei'),('ek','ek'),('enc','enc'),('encoding','encoding'),('endofline','endofline'),('eol','eol'),('ep','ep'),('equalalways','equalalways'),('equalprg','equalprg'),('errorbells','errorbells'),('errorfile','errorfile'),('errorformat','errorformat'),('esckeys','esckeys'),('et','et'),('eventignore','eventignore'),('ex','ex'),('expandtab','expandtab'),('exrc','exrc'),('fcl','fcl'),('fcs','fcs'),('fdc','fdc'),('fde','fde'),('fdi','fdi'),('fdl','fdl'),('fdls','fdls'),('fdm','fdm'),('fdn','fdn'),('fdo','fdo'),('fdt','fdt'),('fen','fen'),('fenc','fenc'),('fencs','fencs'),('fex','fex'),('ff','ff'),('ffs','ffs'),('fileencoding','fileencoding'),('fileencodings','fileencodings'),('fileformat','fileformat'),('fileformats','fileformats'),('filetype','filetype'),('fillchars','fillchars'),('fk','fk'),('fkmap','fkmap'),('flp','flp'),('fml','fml'),('fmr','fmr'),('fo','fo'),('foldclose','foldclose'),('foldcolumn','foldcolumn'),('foldenable','foldenable'),('foldexpr','foldexpr'),('foldignore','foldignore'),('foldlevel','foldlevel'),('foldlevelstart','foldlevelstart'),('foldmarker','foldmarker'),('foldmethod','foldmethod'),('foldminlines','foldminlines'),('foldnestmax','foldnestmax'),('foldopen','foldopen'),('foldtext','foldtext'),('formatexpr','formatexpr'),('formatlistpat','formatlistpat'),('formatoptions','formatoptions'),('formatprg','formatprg'),('fp','fp'),('fs','fs'),('fsync','fsync'),('ft','ft'),('gcr','gcr'),('gd','gd'),('gdefault','gdefault'),('gfm','gfm'),('gfn','gfn'),('gfs','gfs'),('gfw','gfw'),('ghr','ghr'),('go','go'),('gp','gp'),('grepformat','grepformat'),('grepprg','grepprg'),('gtl','gtl'),('gtt','gtt'),('guicursor','guicursor'),('guifont','guifont'),('guifontset','guifontset'),('guifontwide','guifontwide'),('guiheadroom','guiheadroom'),('guioptions','guioptions'),('guipty','guipty'),('guitablabel','guitablabel'),('guitabtooltip','guitabtooltip'),('helpfile','helpfile'),('helpheight','helpheight'),('helplang','helplang'),('hf','hf'),('hh','hh'),('hi','hi'),('hid','hid'),('hidden','hidden'),('highlight','highlight'),('history','history'),('hk','hk'),('hkmap','hkmap'),('hkmapp','hkmapp'),('hkp','hkp'),('hl','hl'),('hlg','hlg'),('hls','hls'),('hlsearch','hlsearch'),('ic','ic'),('icon','icon'),('iconstring','iconstring'),('ignorecase','ignorecase'),('im','im'),('imactivatekey','imactivatekey'),('imak','imak'),('imc','imc'),('imcmdline','imcmdline'),('imd','imd'),('imdisable','imdisable'),('imi','imi'),('iminsert','iminsert'),('ims','ims'),('imsearch','imsearch'),('inc','inc'),('include','include'),('includeexpr','includeexpr'),('incsearch','incsearch'),('inde','inde'),('indentexpr','indentexpr'),('indentkeys','indentkeys'),('indk','indk'),('inex','inex'),('inf','inf'),('infercase','infercase'),('inoremap','inoremap'),('insertmode','insertmode'),('invacd','invacd'),('invai','invai'),('invakm','invakm'),('invallowrevins','invallowrevins'),('invaltkeymap','invaltkeymap'),('invanti','invanti'),('invantialias','invantialias'),('invar','invar'),('invarab','invarab'),('invarabic','invarabic'),('invarabicshape','invarabicshape'),('invari','invari'),('invarshape','invarshape'),('invautochdir','invautochdir'),('invautoindent','invautoindent'),('invautoread','invautoread'),('invautowrite','invautowrite'),('invautowriteall','invautowriteall'),('invaw','invaw'),('invawa','invawa'),('invbackup','invbackup'),('invballooneval','invballooneval'),('invbeval','invbeval'),('invbin','invbin'),('invbinary','invbinary'),('invbiosk','invbiosk'),('invbioskey','invbioskey'),('invbk','invbk'),('invbl','invbl'),('invbomb','invbomb'),('invbuflisted','invbuflisted'),('invcf','invcf'),('invci','invci'),('invcin','invcin'),('invcindent','invcindent'),('invcompatible','invcompatible'),('invconfirm','invconfirm'),('invconsk','invconsk'),('invconskey','invconskey'),('invcopyindent','invcopyindent'),('invcp','invcp'),('invcrb','invcrb'),('invcscopetag','invcscopetag'),('invcscopeverbose','invcscopeverbose'),('invcst','invcst'),('invcsverb','invcsverb'),('invcuc','invcuc'),('invcul','invcul'),('invcursorbind','invcursorbind'),('invcursorcolumn','invcursorcolumn'),('invcursorline','invcursorline'),('invdeco','invdeco'),('invdelcombine','invdelcombine'),('invdg','invdg'),('invdiff','invdiff'),('invdigraph','invdigraph'),('invea','invea'),('inveb','inveb'),('inved','inved'),('invedcompatible','invedcompatible'),('invek','invek'),('invendofline','invendofline'),('inveol','inveol'),('invequalalways','invequalalways'),('inverrorbells','inverrorbells'),('invesckeys','invesckeys'),('invet','invet'),('invex','invex'),('invexpandtab','invexpandtab'),('invexrc','invexrc'),('invfen','invfen'),('invfk','invfk'),('invfkmap','invfkmap'),('invfoldenable','invfoldenable'),('invgd','invgd'),('invgdefault','invgdefault'),('invguipty','invguipty'),('invhid','invhid'),('invhidden','invhidden'),('invhk','invhk'),('invhkmap','invhkmap'),('invhkmapp','invhkmapp'),('invhkp','invhkp'),('invhls','invhls'),('invhlsearch','invhlsearch'),('invic','invic'),('invicon','invicon'),('invignorecase','invignorecase'),('invim','invim'),('invimc','invimc'),('invimcmdline','invimcmdline'),('invimd','invimd'),('invimdisable','invimdisable'),('invincsearch','invincsearch'),('invinf','invinf'),('invinfercase','invinfercase'),('invinsertmode','invinsertmode'),('invis','invis'),('invjoinspaces','invjoinspaces'),('invjs','invjs'),('invlazyredraw','invlazyredraw'),('invlbr','invlbr'),('invlinebreak','invlinebreak'),('invlisp','invlisp'),('invlist','invlist'),('invloadplugins','invloadplugins'),('invlpl','invlpl'),('invlz','invlz'),('invma','invma'),('invmacatsui','invmacatsui'),('invmagic','invmagic'),('invmh','invmh'),('invml','invml'),('invmod','invmod'),('invmodeline','invmodeline'),('invmodifiable','invmodifiable'),('invmodified','invmodified'),('invmore','invmore'),('invmousef','invmousef'),('invmousefocus','invmousefocus'),('invmousehide','invmousehide'),('invnu','invnu'),('invnumber','invnumber'),('invodev','invodev'),('invopendevice','invopendevice'),('invpaste','invpaste'),('invpi','invpi'),('invpreserveindent','invpreserveindent'),('invpreviewwindow','invpreviewwindow'),('invprompt','invprompt'),('invpvw','invpvw'),('invreadonly','invreadonly'),('invrelativenumber','invrelativenumber'),('invremap','invremap'),('invrestorescreen','invrestorescreen'),('invrevins','invrevins'),('invri','invri'),('invrightleft','invrightleft'),('invrl','invrl'),('invrnu','invrnu'),('invro','invro'),('invrs','invrs'),('invru','invru'),('invruler','invruler'),('invsb','invsb'),('invsc','invsc'),('invscb','invscb'),('invscrollbind','invscrollbind'),('invscs','invscs'),('invsecure','invsecure'),('invsft','invsft'),('invshellslash','invshellslash'),('invshelltemp','invshelltemp'),('invshiftround','invshiftround'),('invshortname','invshortname'),('invshowcmd','invshowcmd'),('invshowfulltag','invshowfulltag'),('invshowmatch','invshowmatch'),('invshowmode','invshowmode'),('invsi','invsi'),('invsm','invsm'),('invsmartcase','invsmartcase'),('invsmartindent','invsmartindent'),('invsmarttab','invsmarttab'),('invsmd','invsmd'),('invsn','invsn'),('invsol','invsol'),('invspell','invspell'),('invsplitbelow','invsplitbelow'),('invsplitright','invsplitright'),('invspr','invspr'),('invsr','invsr'),('invssl','invssl'),('invsta','invsta'),('invstartofline','invstartofline'),('invstmp','invstmp'),('invswapfile','invswapfile'),('invswf','invswf'),('invta','invta'),('invtagbsearch','invtagbsearch'),('invtagrelative','invtagrelative'),('invtagstack','invtagstack'),('invtbi','invtbi'),('invtbidi','invtbidi'),('invtbs','invtbs'),('invtermbidi','invtermbidi'),('invterse','invterse'),('invtextauto','invtextauto'),('invtextmode','invtextmode'),('invtf','invtf'),('invtgst','invtgst'),('invtildeop','invtildeop'),('invtimeout','invtimeout'),('invtitle','invtitle'),('invto','invto'),('invtop','invtop'),('invtr','invtr'),('invttimeout','invttimeout'),('invttybuiltin','invttybuiltin'),('invttyfast','invttyfast'),('invtx','invtx'),('invvb','invvb'),('invvisualbell','invvisualbell'),('invwa','invwa'),('invwarn','invwarn'),('invwb','invwb'),('invweirdinvert','invweirdinvert'),('invwfh','invwfh'),('invwfw','invwfw'),('invwildignorecase','invwildignorecase'),('invwildmenu','invwildmenu'),('invwinfixheight','invwinfixheight'),('invwinfixwidth','invwinfixwidth'),('invwiv','invwiv'),('invwmnu','invwmnu'),('invwrap','invwrap'),('invwrapscan','invwrapscan'),('invwrite','invwrite'),('invwriteany','invwriteany'),('invwritebackup','invwritebackup'),('invws','invws'),('is','is'),('isf','isf'),('isfname','isfname'),('isi','isi'),('isident','isident'),('isk','isk'),('iskeyword','iskeyword'),('isp','isp'),('isprint','isprint'),('joinspaces','joinspaces'),('js','js'),('key','key'),('keymap','keymap'),('keymodel','keymodel'),('keywordprg','keywordprg'),('km','km'),('kmp','kmp'),('kp','kp'),('langmap','langmap'),('langmenu','langmenu'),('laststatus','laststatus'),('lazyredraw','lazyredraw'),('lbr','lbr'),('lcs','lcs'),('linebreak','linebreak'),('lines','lines'),('linespace','linespace'),('lisp','lisp'),('lispwords','lispwords'),('list','list'),('listchars','listchars'),('lm','lm'),('lmap','lmap'),('loadplugins','loadplugins'),('lpl','lpl'),('ls','ls'),('lsp','lsp'),('lw','lw'),('lz','lz'),('ma','ma'),('macatsui','macatsui'),('magic','magic'),('makeef','makeef'),('makeprg','makeprg'),('mat','mat'),('matchpairs','matchpairs'),('matchtime','matchtime'),('maxcombine','maxcombine'),('maxfuncdepth','maxfuncdepth'),('maxmapdepth','maxmapdepth'),('maxmem','maxmem'),('maxmempattern','maxmempattern'),('maxmemtot','maxmemtot'),('mco','mco'),('mef','mef'),('menuitems','menuitems'),('mfd','mfd'),('mh','mh'),('mis','mis'),('mkspellmem','mkspellmem'),('ml','ml'),('mls','mls'),('mm','mm'),('mmd','mmd'),('mmp','mmp'),('mmt','mmt'),('mod','mod'),('modeline','modeline'),('modelines','modelines'),('modifiable','modifiable'),('modified','modified'),('more','more'),('mouse','mouse'),('mousef','mousef'),('mousefocus','mousefocus'),('mousehide','mousehide'),('mousem','mousem'),('mousemodel','mousemodel'),('mouses','mouses'),('mouseshape','mouseshape'),('mouset','mouset'),('mousetime','mousetime'),('mp','mp'),('mps','mps'),('msm','msm'),('mzq','mzq'),('mzquantum','mzquantum'),('nf','nf'),('nnoremap','nnoremap'),('noacd','noacd'),('noai','noai'),('noakm','noakm'),('noallowrevins','noallowrevins'),('noaltkeymap','noaltkeymap'),('noanti','noanti'),('noantialias','noantialias'),('noar','noar'),('noarab','noarab'),('noarabic','noarabic'),('noarabicshape','noarabicshape'),('noari','noari'),('noarshape','noarshape'),('noautochdir','noautochdir'),('noautoindent','noautoindent'),('noautoread','noautoread'),('noautowrite','noautowrite'),('noautowriteall','noautowriteall'),('noaw','noaw'),('noawa','noawa'),('nobackup','nobackup'),('noballooneval','noballooneval'),('nobeval','nobeval'),('nobin','nobin'),('nobinary','nobinary'),('nobiosk','nobiosk'),('nobioskey','nobioskey'),('nobk','nobk'),('nobl','nobl'),('nobomb','nobomb'),('nobuflisted','nobuflisted'),('nocf','nocf'),('noci','noci'),('nocin','nocin'),('nocindent','nocindent'),('nocompatible','nocompatible'),('noconfirm','noconfirm'),('noconsk','noconsk'),('noconskey','noconskey'),('nocopyindent','nocopyindent'),('nocp','nocp'),('nocrb','nocrb'),('nocscopetag','nocscopetag'),('nocscopeverbose','nocscopeverbose'),('nocst','nocst'),('nocsverb','nocsverb'),('nocuc','nocuc'),('nocul','nocul'),('nocursorbind','nocursorbind'),('nocursorcolumn','nocursorcolumn'),('nocursorline','nocursorline'),('nodeco','nodeco'),('nodelcombine','nodelcombine'),('nodg','nodg'),('nodiff','nodiff'),('nodigraph','nodigraph'),('noea','noea'),('noeb','noeb'),('noed','noed'),('noedcompatible','noedcompatible'),('noek','noek'),('noendofline','noendofline'),('noeol','noeol'),('noequalalways','noequalalways'),('noerrorbells','noerrorbells'),('noesckeys','noesckeys'),('noet','noet'),('noex','noex'),('noexpandtab','noexpandtab'),('noexrc','noexrc'),('nofen','nofen'),('nofk','nofk'),('nofkmap','nofkmap'),('nofoldenable','nofoldenable'),('nogd','nogd'),('nogdefault','nogdefault'),('noguipty','noguipty'),('nohid','nohid'),('nohidden','nohidden'),('nohk','nohk'),('nohkmap','nohkmap'),('nohkmapp','nohkmapp'),('nohkp','nohkp'),('nohls','nohls'),('nohlsearch','nohlsearch'),('noic','noic'),('noicon','noicon'),('noignorecase','noignorecase'),('noim','noim'),('noimc','noimc'),('noimcmdline','noimcmdline'),('noimd','noimd'),('noimdisable','noimdisable'),('noincsearch','noincsearch'),('noinf','noinf'),('noinfercase','noinfercase'),('noinsertmode','noinsertmode'),('nois','nois'),('nojoinspaces','nojoinspaces'),('nojs','nojs'),('nolazyredraw','nolazyredraw'),('nolbr','nolbr'),('nolinebreak','nolinebreak'),('nolisp','nolisp'),('nolist','nolist'),('noloadplugins','noloadplugins'),('nolpl','nolpl'),('nolz','nolz'),('noma','noma'),('nomacatsui','nomacatsui'),('nomagic','nomagic'),('nomh','nomh'),('noml','noml'),('nomod','nomod'),('nomodeline','nomodeline'),('nomodifiable','nomodifiable'),('nomodified','nomodified'),('nomore','nomore'),('nomousef','nomousef'),('nomousefocus','nomousefocus'),('nomousehide','nomousehide'),('nonu','nonu'),('nonumber','nonumber'),('noodev','noodev'),('noopendevice','noopendevice'),('nopaste','nopaste'),('nopi','nopi'),('nopreserveindent','nopreserveindent'),('nopreviewwindow','nopreviewwindow'),('noprompt','noprompt'),('nopvw','nopvw'),('noreadonly','noreadonly'),('norelativenumber','norelativenumber'),('noremap','noremap'),('norestorescreen','norestorescreen'),('norevins','norevins'),('nori','nori'),('norightleft','norightleft'),('norl','norl'),('nornu','nornu'),('noro','noro'),('nors','nors'),('noru','noru'),('noruler','noruler'),('nosb','nosb'),('nosc','nosc'),('noscb','noscb'),('noscrollbind','noscrollbind'),('noscs','noscs'),('nosecure','nosecure'),('nosft','nosft'),('noshellslash','noshellslash'),('noshelltemp','noshelltemp'),('noshiftround','noshiftround'),('noshortname','noshortname'),('noshowcmd','noshowcmd'),('noshowfulltag','noshowfulltag'),('noshowmatch','noshowmatch'),('noshowmode','noshowmode'),('nosi','nosi'),('nosm','nosm'),('nosmartcase','nosmartcase'),('nosmartindent','nosmartindent'),('nosmarttab','nosmarttab'),('nosmd','nosmd'),('nosn','nosn'),('nosol','nosol'),('nospell','nospell'),('nosplitbelow','nosplitbelow'),('nosplitright','nosplitright'),('nospr','nospr'),('nosr','nosr'),('nossl','nossl'),('nosta','nosta'),('nostartofline','nostartofline'),('nostmp','nostmp'),('noswapfile','noswapfile'),('noswf','noswf'),('nota','nota'),('notagbsearch','notagbsearch'),('notagrelative','notagrelative'),('notagstack','notagstack'),('notbi','notbi'),('notbidi','notbidi'),('notbs','notbs'),('notermbidi','notermbidi'),('noterse','noterse'),('notextauto','notextauto'),('notextmode','notextmode'),('notf','notf'),('notgst','notgst'),('notildeop','notildeop'),('notimeout','notimeout'),('notitle','notitle'),('noto','noto'),('notop','notop'),('notr','notr'),('nottimeout','nottimeout'),('nottybuiltin','nottybuiltin'),('nottyfast','nottyfast'),('notx','notx'),('novb','novb'),('novisualbell','novisualbell'),('nowa','nowa'),('nowarn','nowarn'),('nowb','nowb'),('noweirdinvert','noweirdinvert'),('nowfh','nowfh'),('nowfw','nowfw'),('nowildignorecase','nowildignorecase'),('nowildmenu','nowildmenu'),('nowinfixheight','nowinfixheight'),('nowinfixwidth','nowinfixwidth'),('nowiv','nowiv'),('nowmnu','nowmnu'),('nowrap','nowrap'),('nowrapscan','nowrapscan'),('nowrite','nowrite'),('nowriteany','nowriteany'),('nowritebackup','nowritebackup'),('nows','nows'),('nrformats','nrformats'),('nu','nu'),('number','number'),('numberwidth','numberwidth'),('nuw','nuw'),('odev','odev'),('oft','oft'),('ofu','ofu'),('omnifunc','omnifunc'),('opendevice','opendevice'),('operatorfunc','operatorfunc'),('opfunc','opfunc'),('osfiletype','osfiletype'),('pa','pa'),('para','para'),('paragraphs','paragraphs'),('paste','paste'),('pastetoggle','pastetoggle'),('patchexpr','patchexpr'),('patchmode','patchmode'),('path','path'),('pdev','pdev'),('penc','penc'),('pex','pex'),('pexpr','pexpr'),('pfn','pfn'),('ph','ph'),('pheader','pheader'),('pi','pi'),('pm','pm'),('pmbcs','pmbcs'),('pmbfn','pmbfn'),('popt','popt'),('preserveindent','preserveindent'),('previewheight','previewheight'),('previewwindow','previewwindow'),('printdevice','printdevice'),('printencoding','printencoding'),('printexpr','printexpr'),('printfont','printfont'),('printheader','printheader'),('printmbcharset','printmbcharset'),('printmbfont','printmbfont'),('printoptions','printoptions'),('prompt','prompt'),('pt','pt'),('pumheight','pumheight'),('pvh','pvh'),('pvw','pvw'),('qe','qe'),('quoteescape','quoteescape'),('rdt','rdt'),('readonly','readonly'),('redrawtime','redrawtime'),('relativenumber','relativenumber'),('remap','remap'),('report','report'),('restorescreen','restorescreen'),('revins','revins'),('ri','ri'),('rightleft','rightleft'),('rightleftcmd','rightleftcmd'),('rl','rl'),('rlc','rlc'),('rnu','rnu'),('ro','ro'),('rs','rs'),('rtp','rtp'),('ru','ru'),('ruf','ruf'),('ruler','ruler'),('rulerformat','rulerformat'),('runtimepath','runtimepath'),('sb','sb'),('sbo','sbo'),('sbr','sbr'),('sc','sc'),('scb','scb'),('scr','scr'),('scroll','scroll'),('scrollbind','scrollbind'),('scrolljump','scrolljump'),('scrolloff','scrolloff'),('scrollopt','scrollopt'),('scs','scs'),('sect','sect'),('sections','sections'),('secure','secure'),('sel','sel'),('selection','selection'),('selectmode','selectmode'),('sessionoptions','sessionoptions'),('sft','sft'),('sh','sh'),('shcf','shcf'),('shell','shell'),('shellcmdflag','shellcmdflag'),('shellpipe','shellpipe'),('shellquote','shellquote'),('shellredir','shellredir'),('shellslash','shellslash'),('shelltemp','shelltemp'),('shelltype','shelltype'),('shellxquote','shellxquote'),('shiftround','shiftround'),('shiftwidth','shiftwidth'),('shm','shm'),('shortmess','shortmess'),('shortname','shortname'),('showbreak','showbreak'),('showcmd','showcmd'),('showfulltag','showfulltag'),('showmatch','showmatch'),('showmode','showmode'),('showtabline','showtabline'),('shq','shq'),('si','si'),('sidescroll','sidescroll'),('sidescrolloff','sidescrolloff'),('siso','siso'),('sj','sj'),('slm','slm'),('sm','sm'),('smartcase','smartcase'),('smartindent','smartindent'),('smarttab','smarttab'),('smc','smc'),('smd','smd'),('sn','sn'),('so','so'),('softtabstop','softtabstop'),('sol','sol'),('sp','sp'),('spc','spc'),('spell','spell'),('spellcapcheck','spellcapcheck'),('spellfile','spellfile'),('spelllang','spelllang'),('spellsuggest','spellsuggest'),('spf','spf'),('spl','spl'),('splitbelow','splitbelow'),('splitright','splitright'),('spr','spr'),('sps','sps'),('sr','sr'),('srr','srr'),('ss','ss'),('ssl','ssl'),('ssop','ssop'),('st','st'),('sta','sta'),('stal','stal'),('startofline','startofline'),('statusline','statusline'),('stl','stl'),('stmp','stmp'),('sts','sts'),('su','su'),('sua','sua'),('suffixes','suffixes'),('suffixesadd','suffixesadd'),('sw','sw'),('swapfile','swapfile'),('swapsync','swapsync'),('swb','swb'),('swf','swf'),('switchbuf','switchbuf'),('sws','sws'),('sxq','sxq'),('syn','syn'),('synmaxcol','synmaxcol'),('syntax','syntax'),('t_AB','t_AB'),('t_AF','t_AF'),('t_AL','t_AL'),('t_CS','t_CS'),('t_CV','t_CV'),('t_Ce','t_Ce'),('t_Co','t_Co'),('t_Cs','t_Cs'),('t_DL','t_DL'),('t_EI','t_EI'),('t_F1','t_F1'),('t_F2','t_F2'),('t_F3','t_F3'),('t_F4','t_F4'),('t_F5','t_F5'),('t_F6','t_F6'),('t_F7','t_F7'),('t_F8','t_F8'),('t_F9','t_F9'),('t_IE','t_IE'),('t_IS','t_IS'),('t_K1','t_K1'),('t_K3','t_K3'),('t_K4','t_K4'),('t_K5','t_K5'),('t_K6','t_K6'),('t_K7','t_K7'),('t_K8','t_K8'),('t_K9','t_K9'),('t_KA','t_KA'),('t_KB','t_KB'),('t_KC','t_KC'),('t_KD','t_KD'),('t_KE','t_KE'),('t_KF','t_KF'),('t_KG','t_KG'),('t_KH','t_KH'),('t_KI','t_KI'),('t_KJ','t_KJ'),('t_KK','t_KK'),('t_KL','t_KL'),('t_RI','t_RI'),('t_RV','t_RV'),('t_SI','t_SI'),('t_Sb','t_Sb'),('t_Sf','t_Sf'),('t_WP','t_WP'),('t_WS','t_WS'),('t_ZH','t_ZH'),('t_ZR','t_ZR'),('t_al','t_al'),('t_bc','t_bc'),('t_cd','t_cd'),('t_ce','t_ce'),('t_cl','t_cl'),('t_cm','t_cm'),('t_cs','t_cs'),('t_da','t_da'),('t_db','t_db'),('t_dl','t_dl'),('t_fs','t_fs'),('t_k1','t_k1'),('t_k2','t_k2'),('t_k3','t_k3'),('t_k4','t_k4'),('t_k5','t_k5'),('t_k6','t_k6'),('t_k7','t_k7'),('t_k8','t_k8'),('t_k9','t_k9'),('t_kB','t_kB'),('t_kD','t_kD'),('t_kI','t_kI'),('t_kN','t_kN'),('t_kP','t_kP'),('t_kb','t_kb'),('t_kd','t_kd'),('t_ke','t_ke'),('t_kh','t_kh'),('t_kl','t_kl'),('t_kr','t_kr'),('t_ks','t_ks'),('t_ku','t_ku'),('t_le','t_le'),('t_mb','t_mb'),('t_md','t_md'),('t_me','t_me'),('t_mr','t_mr'),('t_ms','t_ms'),('t_nd','t_nd'),('t_op','t_op'),('t_se','t_se'),('t_so','t_so'),('t_sr','t_sr'),('t_te','t_te'),('t_ti','t_ti'),('t_ts','t_ts'),('t_ue','t_ue'),('t_us','t_us'),('t_ut','t_ut'),('t_vb','t_vb'),('t_ve','t_ve'),('t_vi','t_vi'),('t_vs','t_vs'),('t_xs','t_xs'),('ta','ta'),('tabline','tabline'),('tabpagemax','tabpagemax'),('tabstop','tabstop'),('tag','tag'),('tagbsearch','tagbsearch'),('taglength','taglength'),('tagrelative','tagrelative'),('tags','tags'),('tagstack','tagstack'),('tal','tal'),('tb','tb'),('tbi','tbi'),('tbidi','tbidi'),('tbis','tbis'),('tbs','tbs'),('tenc','tenc'),('term','term'),('termbidi','termbidi'),('termencoding','termencoding'),('terse','terse'),('textauto','textauto'),('textmode','textmode'),('textwidth','textwidth'),('tf','tf'),('tgst','tgst'),('thesaurus','thesaurus'),('tildeop','tildeop'),('timeout','timeout'),('timeoutlen','timeoutlen'),('title','title'),('titlelen','titlelen'),('titleold','titleold'),('titlestring','titlestring'),('tl','tl'),('tm','tm'),('to','to'),('toolbar','toolbar'),('toolbariconsize','toolbariconsize'),('top','top'),('tpm','tpm'),('tr','tr'),('ts','ts'),('tsl','tsl'),('tsr','tsr'),('ttimeout','ttimeout'),('ttimeoutlen','ttimeoutlen'),('ttm','ttm'),('tty','tty'),('ttybuiltin','ttybuiltin'),('ttyfast','ttyfast'),('ttym','ttym'),('ttymouse','ttymouse'),('ttyscroll','ttyscroll'),('ttytype','ttytype'),('tw','tw'),('tx','tx'),('uc','uc'),('udf','udf'),('udir','udir'),('ul','ul'),('undodir','undodir'),('undofile','undofile'),('undolevels','undolevels'),('undoreload','undoreload'),('updatecount','updatecount'),('updatetime','updatetime'),('ur','ur'),('ut','ut'),('vb','vb'),('vbs','vbs'),('vdir','vdir'),('ve','ve'),('verbose','verbose'),('verbosefile','verbosefile'),('vfile','vfile'),('vi','vi'),('viewdir','viewdir'),('viewoptions','viewoptions'),('viminfo','viminfo'),('virtualedit','virtualedit'),('visualbell','visualbell'),('vnoremap','vnoremap'),('vop','vop'),('wa','wa'),('wak','wak'),('warn','warn'),('wb','wb'),('wc','wc'),('wcm','wcm'),('wd','wd'),('weirdinvert','weirdinvert'),('wfh','wfh'),('wfw','wfw'),('wh','wh'),('whichwrap','whichwrap'),('wi','wi'),('wic','wic'),('wig','wig'),('wildchar','wildchar'),('wildcharm','wildcharm'),('wildignore','wildignore'),('wildignorecase','wildignorecase'),('wildmenu','wildmenu'),('wildmode','wildmode'),('wildoptions','wildoptions'),('wim','wim'),('winaltkeys','winaltkeys'),('window','window'),('winfixheight','winfixheight'),('winfixwidth','winfixwidth'),('winheight','winheight'),('winminheight','winminheight'),('winminwidth','winminwidth'),('winwidth','winwidth'),('wiv','wiv'),('wiw','wiw'),('wm','wm'),('wmh','wmh'),('wmnu','wmnu'),('wmw','wmw'),('wop','wop'),('wrap','wrap'),('wrapmargin','wrapmargin'),('wrapscan','wrapscan'),('write','write'),('writeany','writeany'),('writebackup','writebackup'),('writedelay','writedelay'),('ws','ws'),('ww','ww')]
+# Split up in multiple functions so it's importable by jython, which has a
+# per-method size limit.
+
+def _getauto():
+ return [('BufAdd','BufAdd'),('BufCreate','BufCreate'),('BufDelete','BufDelete'),('BufEnter','BufEnter'),('BufFilePost','BufFilePost'),('BufFilePre','BufFilePre'),('BufHidden','BufHidden'),('BufLeave','BufLeave'),('BufNew','BufNew'),('BufNewFile','BufNewFile'),('BufRead','BufRead'),('BufReadCmd','BufReadCmd'),('BufReadPost','BufReadPost'),('BufReadPre','BufReadPre'),('BufUnload','BufUnload'),('BufWinEnter','BufWinEnter'),('BufWinLeave','BufWinLeave'),('BufWipeout','BufWipeout'),('BufWrite','BufWrite'),('BufWriteCmd','BufWriteCmd'),('BufWritePost','BufWritePost'),('BufWritePre','BufWritePre'),('Cmd','Cmd'),('CmdwinEnter','CmdwinEnter'),('CmdwinLeave','CmdwinLeave'),('ColorScheme','ColorScheme'),('CursorHold','CursorHold'),('CursorHoldI','CursorHoldI'),('CursorMoved','CursorMoved'),('CursorMovedI','CursorMovedI'),('EncodingChanged','EncodingChanged'),('FileAppendCmd','FileAppendCmd'),('FileAppendPost','FileAppendPost'),('FileAppendPre','FileAppendPre'),('FileChangedRO','FileChangedRO'),('FileChangedShell','FileChangedShell'),('FileChangedShellPost','FileChangedShellPost'),('FileEncoding','FileEncoding'),('FileReadCmd','FileReadCmd'),('FileReadPost','FileReadPost'),('FileReadPre','FileReadPre'),('FileType','FileType'),('FileWriteCmd','FileWriteCmd'),('FileWritePost','FileWritePost'),('FileWritePre','FileWritePre'),('FilterReadPost','FilterReadPost'),('FilterReadPre','FilterReadPre'),('FilterWritePost','FilterWritePost'),('FilterWritePre','FilterWritePre'),('FocusGained','FocusGained'),('FocusLost','FocusLost'),('FuncUndefined','FuncUndefined'),('GUIEnter','GUIEnter'),('GUIFailed','GUIFailed'),('InsertChange','InsertChange'),('InsertCharPre','InsertCharPre'),('InsertEnter','InsertEnter'),('InsertLeave','InsertLeave'),('MenuPopup','MenuPopup'),('QuickFixCmdPost','QuickFixCmdPost'),('QuickFixCmdPre','QuickFixCmdPre'),('RemoteReply','RemoteReply'),('SessionLoadPost','SessionLoadPost'),('ShellCmdPost','ShellCmdPost'),('ShellFilterPost','ShellFilterPost'),('SourceCmd','SourceCmd'),('SourcePre','SourcePre'),('SpellFileMissing','SpellFileMissing'),('StdinReadPost','StdinReadPost'),('StdinReadPre','StdinReadPre'),('SwapExists','SwapExists'),('Syntax','Syntax'),('TabEnter','TabEnter'),('TabLeave','TabLeave'),('TermChanged','TermChanged'),('TermResponse','TermResponse'),('User','User'),('UserGettingBored','UserGettingBored'),('VimEnter','VimEnter'),('VimLeave','VimLeave'),('VimLeavePre','VimLeavePre'),('VimResized','VimResized'),('WinEnter','WinEnter'),('WinLeave','WinLeave'),('event','event')]
+def _getcommand():
+ return [('Allargs','Allargs'),('DiffOrig','DiffOrig'),('Error','Error'),('Man','Man'),('MyCommand','MyCommand'),('Mycmd','Mycmd'),('N','N'),('N','Next'),('P','P'),('P','Print'),('Ren','Ren'),('Rena','Rena'),('Renu','Renu'),('TOhtml','TOhtml'),('X','X'),('XMLent','XMLent'),('XMLns','XMLns'),('a','a'),('ab','ab'),('abc','abclear'),('abo','aboveleft'),('al','all'),('ar','ar'),('ar','args'),('arga','argadd'),('argd','argdelete'),('argdo','argdo'),('arge','argedit'),('argg','argglobal'),('argl','arglocal'),('argu','argument'),('as','ascii'),('au','au'),('b','buffer'),('bN','bNext'),('ba','ball'),('bad','badd'),('bar','bar'),('bd','bdelete'),('bel','belowright'),('bf','bfirst'),('bl','blast'),('bm','bmodified'),('bn','bnext'),('bo','botright'),('bp','bprevious'),('br','br'),('br','brewind'),('brea','break'),('breaka','breakadd'),('breakd','breakdel'),('breakl','breaklist'),('bro','browse'),('browseset','browseset'),('bu','bu'),('buf','buf'),('bufdo','bufdo'),('buffers','buffers'),('bun','bunload'),('bw','bwipeout'),('c','c'),('c','change'),('cN','cN'),('cN','cNext'),('cNf','cNf'),('cNf','cNfile'),('cabc','cabclear'),('cad','cad'),('cad','caddexpr'),('caddb','caddbuffer'),('caddf','caddfile'),('cal','call'),('cat','catch'),('cb','cbuffer'),('cc','cc'),('ccl','cclose'),('cd','cd'),('ce','center'),('cex','cexpr'),('cf','cfile'),('cfir','cfirst'),('cg','cgetfile'),('cgetb','cgetbuffer'),('cgete','cgetexpr'),('changes','changes'),('chd','chdir'),('che','checkpath'),('checkt','checktime'),('cl','cl'),('cl','clist'),('cla','clast'),('clo','close'),('cmapc','cmapclear'),('cmdname','cmdname'),('cn','cn'),('cn','cnext'),('cnew','cnewer'),('cnf','cnf'),('cnf','cnfile'),('co','copy'),('col','colder'),('colo','colorscheme'),('com','com'),('comc','comclear'),('comment','comment'),('comp','compiler'),('con','con'),('con','continue'),('conf','confirm'),('cope','copen'),('count','count'),('cp','cprevious'),('cpf','cpfile'),('cq','cquit'),('cr','crewind'),('cs','cs'),('cscope','cscope'),('cstag','cstag'),('cuna','cunabbrev'),('cw','cwindow'),('d','d'),('d','delete'),('de','de'),('debug','debug'),('debugg','debuggreedy'),('del','del'),('delc','delcommand'),('delf','delf'),('delf','delfunction'),('delm','delmarks'),('di','di'),('di','display'),('diffg','diffget'),('diffo','diffo'),('diffoff','diffoff'),('diffp','diffp'),('diffpatch','diffpatch'),('diffpu','diffput'),('diffsplit','diffsplit'),('difft','difft'),('diffthis','diffthis'),('diffu','diffupdate'),('dig','dig'),('dig','digraphs'),('dj','djump'),('dl','dlist'),('do','do'),('doau','doau'),('dr','drop'),('ds','dsearch'),('dsp','dsplit'),('dwim','dwim'),('e','e'),('e','e'),('e','e'),('e','e'),('e','e'),('e','e'),('e','e'),('e','e'),('e','e'),('e','edit'),('ea','ea'),('earlier','earlier'),('ec','ec'),('echoe','echoerr'),('echom','echomsg'),('echon','echon'),('el','else'),('elsei','elseif'),('em','emenu'),('emenu','emenu'),('en','en'),('en','endif'),('endf','endf'),('endf','endfunction'),('endfo','endfor'),('endfun','endfun'),('endt','endtry'),('endw','endwhile'),('ene','enew'),('ex','ex'),('exi','exit'),('exu','exusage'),('f','f'),('f','file'),('filename','filename'),('files','files'),('filet','filet'),('filetype','filetype'),('fin','fin'),('fin','find'),('fina','finally'),('fini','finish'),('fir','first'),('fix','fixdel'),('fo','fold'),('foldc','foldclose'),('foldd','folddoopen'),('folddoc','folddoclosed'),('foldo','foldopen'),('for','for'),('fu','fu'),('fu','function'),('fun','fun'),('g','g'),('get','get'),('go','goto'),('gr','grep'),('grepa','grepadd'),('gs','gs'),('gs','gs'),('gui','gui'),('gvim','gvim'),('h','h'),('h','h'),('h','h'),('h','h'),('h','help'),('ha','hardcopy'),('helpf','helpfind'),('helpg','helpgrep'),('helpt','helptags'),('hi','hi'),('hid','hide'),('his','history'),('i','i'),('ia','ia'),('iabc','iabclear'),('if','if'),('ij','ijump'),('il','ilist'),('imapc','imapclear'),('in','in'),('index','index'),('intro','intro'),('is','isearch'),('isp','isplit'),('iuna','iunabbrev'),('j','join'),('ju','jumps'),('k','k'),('kee','keepmarks'),('keepa','keepa'),('keepalt','keepalt'),('keepj','keepjumps'),('l','l'),('l','list'),('lN','lN'),('lN','lNext'),('lNf','lNf'),('lNf','lNfile'),('la','la'),('la','last'),('lad','lad'),('lad','laddexpr'),('laddb','laddbuffer'),('laddf','laddfile'),('lan','lan'),('lan','language'),('lat','lat'),('later','later'),('lb','lbuffer'),('lc','lcd'),('lch','lchdir'),('lcl','lclose'),('lcs','lcs'),('lcscope','lcscope'),('le','left'),('lefta','leftabove'),('let','let'),('lex','lexpr'),('lf','lfile'),('lfir','lfirst'),('lg','lgetfile'),('lgetb','lgetbuffer'),('lgete','lgetexpr'),('lgr','lgrep'),('lgrepa','lgrepadd'),('lh','lhelpgrep'),('ll','ll'),('lla','llast'),('lli','llist'),('lmak','lmake'),('lmapc','lmapclear'),('lne','lne'),('lne','lnext'),('lnew','lnewer'),('lnf','lnf'),('lnf','lnfile'),('lo','lo'),('lo','loadview'),('loadk','loadk'),('loadkeymap','loadkeymap'),('loc','lockmarks'),('locale','locale'),('lockv','lockvar'),('lol','lolder'),('lop','lopen'),('lp','lprevious'),('lpf','lpfile'),('lr','lrewind'),('ls','ls'),('lt','ltag'),('lua','lua'),('luado','luado'),('luafile','luafile'),('lv','lvimgrep'),('lvimgrepa','lvimgrepadd'),('lw','lwindow'),('m','move'),('ma','ma'),('ma','mark'),('main','main'),('main','main'),('mak','make'),('marks','marks'),('mat','match'),('menut','menut'),('menut','menutranslate'),('mes','mes'),('messages','messages'),('mk','mk'),('mk','mkexrc'),('mkdir','mkdir'),('mks','mksession'),('mksp','mkspell'),('mkv','mkv'),('mkv','mkvimrc'),('mkvie','mkview'),('mo','mo'),('mod','mode'),('mv','mv'),('mz','mz'),('mz','mzscheme'),('mzf','mzfile'),('n','n'),('n','n'),('n','next'),('nb','nbkey'),('nbc','nbclose'),('nbs','nbstart'),('ne','ne'),('new','new'),('nkf','nkf'),('nmapc','nmapclear'),('noa','noa'),('noautocmd','noautocmd'),('noh','nohlsearch'),('nu','number'),('o','o'),('o','open'),('ol','oldfiles'),('omapc','omapclear'),('on','only'),('opt','options'),('ownsyntax','ownsyntax'),('p','p'),('p','p'),('p','p'),('p','p'),('p','p'),('p','p'),('p','p'),('p','p'),('p','p'),('p','print'),('pat','pat'),('pat','pat'),('pc','pclose'),('pe','pe'),('pe','perl'),('ped','pedit'),('perld','perldo'),('po','pop'),('popu','popu'),('popu','popup'),('pp','ppop'),('pr','pr'),('pre','preserve'),('prev','previous'),('pro','pro'),('prof','profile'),('profd','profdel'),('promptf','promptfind'),('promptr','promptrepl'),('ps','psearch'),('ptN','ptN'),('ptN','ptNext'),('pta','ptag'),('ptf','ptfirst'),('ptj','ptjump'),('ptl','ptlast'),('ptn','ptn'),('ptn','ptnext'),('ptp','ptprevious'),('ptr','ptrewind'),('pts','ptselect'),('pu','put'),('pw','pwd'),('py','py'),('py','python'),('py3','py3'),('py3','py3'),('py3file','py3file'),('pyf','pyfile'),('python3','python3'),('q','q'),('q','quit'),('qa','qall'),('quita','quitall'),('quote','quote'),('r','r'),('r','r'),('r','r'),('r','r'),('r','r'),('r','r'),('r','r'),('r','r'),('r','r'),('r','r'),('r','r'),('r','read'),('re','re'),('rec','recover'),('red','red'),('red','redo'),('redi','redir'),('redr','redraw'),('redraws','redrawstatus'),('reg','registers'),('res','resize'),('ret','retab'),('retu','return'),('rew','rewind'),('ri','right'),('rightb','rightbelow'),('ru','ru'),('ru','runtime'),('rub','ruby'),('rubyd','rubydo'),('rubyf','rubyfile'),('rundo','rundo'),('rv','rviminfo'),('s','s'),('s','s'),('s','s'),('s','s'),('sN','sNext'),('sa','sargument'),('sal','sall'),('san','sandbox'),('sav','saveas'),('sb','sbuffer'),('sbN','sbNext'),('sba','sball'),('sbf','sbfirst'),('sbl','sblast'),('sbm','sbmodified'),('sbn','sbnext'),('sbp','sbprevious'),('sbr','sbrewind'),('scrip','scrip'),('scrip','scriptnames'),('scripte','scriptencoding'),('scs','scs'),('scscope','scscope'),('se','set'),('setf','setfiletype'),('setg','setglobal'),('setl','setlocal'),('sf','sfind'),('sfir','sfirst'),('sh','shell'),('si','si'),('sig','sig'),('sign','sign'),('sil','silent'),('sim','simalt'),('sl','sl'),('sl','sleep'),('sla','slast'),('sm','smagic'),('sm','smap'),('sme','sme'),('smenu','smenu'),('sn','snext'),('sni','sniff'),('sno','snomagic'),('snoreme','snoreme'),('snoremenu','snoremenu'),('so','so'),('so','source'),('sor','sort'),('sp','split'),('spe','spe'),('spe','spellgood'),('spelld','spelldump'),('spelli','spellinfo'),('spellr','spellrepall'),('spellu','spellundo'),('spellw','spellwrong'),('spr','sprevious'),('sre','srewind'),('st','st'),('st','stop'),('sta','stag'),('star','star'),('star','startinsert'),('start','start'),('startg','startgreplace'),('startr','startreplace'),('stj','stjump'),('stopi','stopinsert'),('sts','stselect'),('sub','sub'),('sub','sub'),('sun','sunhide'),('sunme','sunme'),('sunmenu','sunmenu'),('sus','suspend'),('sv','sview'),('sw','swapname'),('sy','sy'),('syn','syn'),('sync','sync'),('syncbind','syncbind'),('synlist','synlist'),('t','t'),('t','t'),('t','t'),('tN','tN'),('tN','tNext'),('ta','ta'),('ta','tag'),('tab','tab'),('tabN','tabN'),('tabN','tabNext'),('tabc','tabclose'),('tabd','tabdo'),('tabe','tabedit'),('tabf','tabfind'),('tabfir','tabfirst'),('tabl','tablast'),('tabm','tabmove'),('tabn','tabnext'),('tabnew','tabnew'),('tabo','tabonly'),('tabp','tabprevious'),('tabr','tabrewind'),('tabs','tabs'),('tags','tags'),('tc','tcl'),('tcld','tcldo'),('tclf','tclfile'),('te','tearoff'),('tf','tfirst'),('th','throw'),('tj','tjump'),('tl','tlast'),('tm','tm'),('tm','tmenu'),('tn','tn'),('tn','tnext'),('to','topleft'),('tp','tprevious'),('tr','tr'),('tr','trewind'),('try','try'),('ts','tselect'),('tu','tu'),('tu','tunmenu'),('u','u'),('u','undo'),('un','un'),('una','unabbreviate'),('undoj','undojoin'),('undol','undolist'),('unh','unhide'),('unl','unl'),('unlo','unlockvar'),('uns','unsilent'),('up','update'),('v','v'),('ve','ve'),('ve','version'),('verb','verbose'),('version','version'),('version','version'),('vert','vertical'),('vi','vi'),('vi','visual'),('vie','view'),('vim','vimgrep'),('vimgrepa','vimgrepadd'),('viu','viusage'),('vmapc','vmapclear'),('vne','vnew'),('vs','vsplit'),('w','w'),('w','write'),('wN','wNext'),('wa','wall'),('wh','while'),('win','win'),('win','winsize'),('winc','wincmd'),('windo','windo'),('winp','winpos'),('wn','wnext'),('wp','wprevious'),('wq','wq'),('wqa','wqall'),('ws','wsverb'),('wundo','wundo'),('wv','wviminfo'),('x','x'),('x','xit'),('xa','xall'),('xmapc','xmapclear'),('xme','xme'),('xmenu','xmenu'),('xnoreme','xnoreme'),('xnoremenu','xnoremenu'),('xterm','xterm'),('xunme','xunme'),('xunmenu','xunmenu'),('xwininfo','xwininfo'),('y','yank')]
+def _getoption():
+ return [('acd','acd'),('ai','ai'),('akm','akm'),('al','al'),('aleph','aleph'),('allowrevins','allowrevins'),('altkeymap','altkeymap'),('ambiwidth','ambiwidth'),('ambw','ambw'),('anti','anti'),('antialias','antialias'),('ar','ar'),('arab','arab'),('arabic','arabic'),('arabicshape','arabicshape'),('ari','ari'),('arshape','arshape'),('autochdir','autochdir'),('autoindent','autoindent'),('autoread','autoread'),('autowrite','autowrite'),('autowriteall','autowriteall'),('aw','aw'),('awa','awa'),('background','background'),('backspace','backspace'),('backup','backup'),('backupcopy','backupcopy'),('backupdir','backupdir'),('backupext','backupext'),('backupskip','backupskip'),('balloondelay','balloondelay'),('ballooneval','ballooneval'),('balloonexpr','balloonexpr'),('bdir','bdir'),('bdlay','bdlay'),('beval','beval'),('bex','bex'),('bexpr','bexpr'),('bg','bg'),('bh','bh'),('bin','bin'),('binary','binary'),('biosk','biosk'),('bioskey','bioskey'),('bk','bk'),('bkc','bkc'),('bl','bl'),('bomb','bomb'),('breakat','breakat'),('brk','brk'),('browsedir','browsedir'),('bs','bs'),('bsdir','bsdir'),('bsk','bsk'),('bt','bt'),('bufhidden','bufhidden'),('buflisted','buflisted'),('buftype','buftype'),('casemap','casemap'),('cb','cb'),('cc','cc'),('ccv','ccv'),('cd','cd'),('cdpath','cdpath'),('cedit','cedit'),('cf','cf'),('cfu','cfu'),('ch','ch'),('charconvert','charconvert'),('ci','ci'),('cin','cin'),('cindent','cindent'),('cink','cink'),('cinkeys','cinkeys'),('cino','cino'),('cinoptions','cinoptions'),('cinw','cinw'),('cinwords','cinwords'),('clipboard','clipboard'),('cmdheight','cmdheight'),('cmdwinheight','cmdwinheight'),('cmp','cmp'),('cms','cms'),('co','co'),('cocu','cocu'),('cole','cole'),('colorcolumn','colorcolumn'),('columns','columns'),('com','com'),('comments','comments'),('commentstring','commentstring'),('compatible','compatible'),('complete','complete'),('completefunc','completefunc'),('completeopt','completeopt'),('concealcursor','concealcursor'),('conceallevel','conceallevel'),('confirm','confirm'),('consk','consk'),('conskey','conskey'),('copyindent','copyindent'),('cot','cot'),('cp','cp'),('cpo','cpo'),('cpoptions','cpoptions'),('cpt','cpt'),('crb','crb'),('cryptmethod','cryptmethod'),('cscopepathcomp','cscopepathcomp'),('cscopeprg','cscopeprg'),('cscopequickfix','cscopequickfix'),('cscoperelative','cscoperelative'),('cscopetag','cscopetag'),('cscopetagorder','cscopetagorder'),('cscopeverbose','cscopeverbose'),('cspc','cspc'),('csprg','csprg'),('csqf','csqf'),('csre','csre'),('cst','cst'),('csto','csto'),('csverb','csverb'),('cuc','cuc'),('cul','cul'),('cursorbind','cursorbind'),('cursorcolumn','cursorcolumn'),('cursorline','cursorline'),('cwh','cwh'),('debug','debug'),('deco','deco'),('def','def'),('define','define'),('delcombine','delcombine'),('dex','dex'),('dg','dg'),('dict','dict'),('dictionary','dictionary'),('diff','diff'),('diffexpr','diffexpr'),('diffopt','diffopt'),('digraph','digraph'),('dip','dip'),('dir','dir'),('directory','directory'),('display','display'),('dy','dy'),('ea','ea'),('ead','ead'),('eadirection','eadirection'),('eb','eb'),('ed','ed'),('edcompatible','edcompatible'),('ef','ef'),('efm','efm'),('ei','ei'),('ek','ek'),('enc','enc'),('encoding','encoding'),('endofline','endofline'),('eol','eol'),('ep','ep'),('equalalways','equalalways'),('equalprg','equalprg'),('errorbells','errorbells'),('errorfile','errorfile'),('errorformat','errorformat'),('esckeys','esckeys'),('et','et'),('eventignore','eventignore'),('ex','ex'),('expandtab','expandtab'),('exrc','exrc'),('fcl','fcl'),('fcs','fcs'),('fdc','fdc'),('fde','fde'),('fdi','fdi'),('fdl','fdl'),('fdls','fdls'),('fdm','fdm'),('fdn','fdn'),('fdo','fdo'),('fdt','fdt'),('fen','fen'),('fenc','fenc'),('fencs','fencs'),('fex','fex'),('ff','ff'),('ffs','ffs'),('fileencoding','fileencoding'),('fileencodings','fileencodings'),('fileformat','fileformat'),('fileformats','fileformats'),('filetype','filetype'),('fillchars','fillchars'),('fk','fk'),('fkmap','fkmap'),('flp','flp'),('fml','fml'),('fmr','fmr'),('fo','fo'),('foldclose','foldclose'),('foldcolumn','foldcolumn'),('foldenable','foldenable'),('foldexpr','foldexpr'),('foldignore','foldignore'),('foldlevel','foldlevel'),('foldlevelstart','foldlevelstart'),('foldmarker','foldmarker'),('foldmethod','foldmethod'),('foldminlines','foldminlines'),('foldnestmax','foldnestmax'),('foldopen','foldopen'),('foldtext','foldtext'),('formatexpr','formatexpr'),('formatlistpat','formatlistpat'),('formatoptions','formatoptions'),('formatprg','formatprg'),('fp','fp'),('fs','fs'),('fsync','fsync'),('ft','ft'),('gcr','gcr'),('gd','gd'),('gdefault','gdefault'),('gfm','gfm'),('gfn','gfn'),('gfs','gfs'),('gfw','gfw'),('ghr','ghr'),('go','go'),('gp','gp'),('grepformat','grepformat'),('grepprg','grepprg'),('gtl','gtl'),('gtt','gtt'),('guicursor','guicursor'),('guifont','guifont'),('guifontset','guifontset'),('guifontwide','guifontwide'),('guiheadroom','guiheadroom'),('guioptions','guioptions'),('guipty','guipty'),('guitablabel','guitablabel'),('guitabtooltip','guitabtooltip'),('helpfile','helpfile'),('helpheight','helpheight'),('helplang','helplang'),('hf','hf'),('hh','hh'),('hi','hi'),('hid','hid'),('hidden','hidden'),('highlight','highlight'),('history','history'),('hk','hk'),('hkmap','hkmap'),('hkmapp','hkmapp'),('hkp','hkp'),('hl','hl'),('hlg','hlg'),('hls','hls'),('hlsearch','hlsearch'),('ic','ic'),('icon','icon'),('iconstring','iconstring'),('ignorecase','ignorecase'),('im','im'),('imactivatekey','imactivatekey'),('imak','imak'),('imc','imc'),('imcmdline','imcmdline'),('imd','imd'),('imdisable','imdisable'),('imi','imi'),('iminsert','iminsert'),('ims','ims'),('imsearch','imsearch'),('inc','inc'),('include','include'),('includeexpr','includeexpr'),('incsearch','incsearch'),('inde','inde'),('indentexpr','indentexpr'),('indentkeys','indentkeys'),('indk','indk'),('inex','inex'),('inf','inf'),('infercase','infercase'),('inoremap','inoremap'),('insertmode','insertmode'),('invacd','invacd'),('invai','invai'),('invakm','invakm'),('invallowrevins','invallowrevins'),('invaltkeymap','invaltkeymap'),('invanti','invanti'),('invantialias','invantialias'),('invar','invar'),('invarab','invarab'),('invarabic','invarabic'),('invarabicshape','invarabicshape'),('invari','invari'),('invarshape','invarshape'),('invautochdir','invautochdir'),('invautoindent','invautoindent'),('invautoread','invautoread'),('invautowrite','invautowrite'),('invautowriteall','invautowriteall'),('invaw','invaw'),('invawa','invawa'),('invbackup','invbackup'),('invballooneval','invballooneval'),('invbeval','invbeval'),('invbin','invbin'),('invbinary','invbinary'),('invbiosk','invbiosk'),('invbioskey','invbioskey'),('invbk','invbk'),('invbl','invbl'),('invbomb','invbomb'),('invbuflisted','invbuflisted'),('invcf','invcf'),('invci','invci'),('invcin','invcin'),('invcindent','invcindent'),('invcompatible','invcompatible'),('invconfirm','invconfirm'),('invconsk','invconsk'),('invconskey','invconskey'),('invcopyindent','invcopyindent'),('invcp','invcp'),('invcrb','invcrb'),('invcscopetag','invcscopetag'),('invcscopeverbose','invcscopeverbose'),('invcst','invcst'),('invcsverb','invcsverb'),('invcuc','invcuc'),('invcul','invcul'),('invcursorbind','invcursorbind'),('invcursorcolumn','invcursorcolumn'),('invcursorline','invcursorline'),('invdeco','invdeco'),('invdelcombine','invdelcombine'),('invdg','invdg'),('invdiff','invdiff'),('invdigraph','invdigraph'),('invea','invea'),('inveb','inveb'),('inved','inved'),('invedcompatible','invedcompatible'),('invek','invek'),('invendofline','invendofline'),('inveol','inveol'),('invequalalways','invequalalways'),('inverrorbells','inverrorbells'),('invesckeys','invesckeys'),('invet','invet'),('invex','invex'),('invexpandtab','invexpandtab'),('invexrc','invexrc'),('invfen','invfen'),('invfk','invfk'),('invfkmap','invfkmap'),('invfoldenable','invfoldenable'),('invgd','invgd'),('invgdefault','invgdefault'),('invguipty','invguipty'),('invhid','invhid'),('invhidden','invhidden'),('invhk','invhk'),('invhkmap','invhkmap'),('invhkmapp','invhkmapp'),('invhkp','invhkp'),('invhls','invhls'),('invhlsearch','invhlsearch'),('invic','invic'),('invicon','invicon'),('invignorecase','invignorecase'),('invim','invim'),('invimc','invimc'),('invimcmdline','invimcmdline'),('invimd','invimd'),('invimdisable','invimdisable'),('invincsearch','invincsearch'),('invinf','invinf'),('invinfercase','invinfercase'),('invinsertmode','invinsertmode'),('invis','invis'),('invjoinspaces','invjoinspaces'),('invjs','invjs'),('invlazyredraw','invlazyredraw'),('invlbr','invlbr'),('invlinebreak','invlinebreak'),('invlisp','invlisp'),('invlist','invlist'),('invloadplugins','invloadplugins'),('invlpl','invlpl'),('invlz','invlz'),('invma','invma'),('invmacatsui','invmacatsui'),('invmagic','invmagic'),('invmh','invmh'),('invml','invml'),('invmod','invmod'),('invmodeline','invmodeline'),('invmodifiable','invmodifiable'),('invmodified','invmodified'),('invmore','invmore'),('invmousef','invmousef'),('invmousefocus','invmousefocus'),('invmousehide','invmousehide'),('invnu','invnu'),('invnumber','invnumber'),('invodev','invodev'),('invopendevice','invopendevice'),('invpaste','invpaste'),('invpi','invpi'),('invpreserveindent','invpreserveindent'),('invpreviewwindow','invpreviewwindow'),('invprompt','invprompt'),('invpvw','invpvw'),('invreadonly','invreadonly'),('invrelativenumber','invrelativenumber'),('invremap','invremap'),('invrestorescreen','invrestorescreen'),('invrevins','invrevins'),('invri','invri'),('invrightleft','invrightleft'),('invrl','invrl'),('invrnu','invrnu'),('invro','invro'),('invrs','invrs'),('invru','invru'),('invruler','invruler'),('invsb','invsb'),('invsc','invsc'),('invscb','invscb'),('invscrollbind','invscrollbind'),('invscs','invscs'),('invsecure','invsecure'),('invsft','invsft'),('invshellslash','invshellslash'),('invshelltemp','invshelltemp'),('invshiftround','invshiftround'),('invshortname','invshortname'),('invshowcmd','invshowcmd'),('invshowfulltag','invshowfulltag'),('invshowmatch','invshowmatch'),('invshowmode','invshowmode'),('invsi','invsi'),('invsm','invsm'),('invsmartcase','invsmartcase'),('invsmartindent','invsmartindent'),('invsmarttab','invsmarttab'),('invsmd','invsmd'),('invsn','invsn'),('invsol','invsol'),('invspell','invspell'),('invsplitbelow','invsplitbelow'),('invsplitright','invsplitright'),('invspr','invspr'),('invsr','invsr'),('invssl','invssl'),('invsta','invsta'),('invstartofline','invstartofline'),('invstmp','invstmp'),('invswapfile','invswapfile'),('invswf','invswf'),('invta','invta'),('invtagbsearch','invtagbsearch'),('invtagrelative','invtagrelative'),('invtagstack','invtagstack'),('invtbi','invtbi'),('invtbidi','invtbidi'),('invtbs','invtbs'),('invtermbidi','invtermbidi'),('invterse','invterse'),('invtextauto','invtextauto'),('invtextmode','invtextmode'),('invtf','invtf'),('invtgst','invtgst'),('invtildeop','invtildeop'),('invtimeout','invtimeout'),('invtitle','invtitle'),('invto','invto'),('invtop','invtop'),('invtr','invtr'),('invttimeout','invttimeout'),('invttybuiltin','invttybuiltin'),('invttyfast','invttyfast'),('invtx','invtx'),('invvb','invvb'),('invvisualbell','invvisualbell'),('invwa','invwa'),('invwarn','invwarn'),('invwb','invwb'),('invweirdinvert','invweirdinvert'),('invwfh','invwfh'),('invwfw','invwfw'),('invwildignorecase','invwildignorecase'),('invwildmenu','invwildmenu'),('invwinfixheight','invwinfixheight'),('invwinfixwidth','invwinfixwidth'),('invwiv','invwiv'),('invwmnu','invwmnu'),('invwrap','invwrap'),('invwrapscan','invwrapscan'),('invwrite','invwrite'),('invwriteany','invwriteany'),('invwritebackup','invwritebackup'),('invws','invws'),('is','is'),('isf','isf'),('isfname','isfname'),('isi','isi'),('isident','isident'),('isk','isk'),('iskeyword','iskeyword'),('isp','isp'),('isprint','isprint'),('joinspaces','joinspaces'),('js','js'),('key','key'),('keymap','keymap'),('keymodel','keymodel'),('keywordprg','keywordprg'),('km','km'),('kmp','kmp'),('kp','kp'),('langmap','langmap'),('langmenu','langmenu'),('laststatus','laststatus'),('lazyredraw','lazyredraw'),('lbr','lbr'),('lcs','lcs'),('linebreak','linebreak'),('lines','lines'),('linespace','linespace'),('lisp','lisp'),('lispwords','lispwords'),('list','list'),('listchars','listchars'),('lm','lm'),('lmap','lmap'),('loadplugins','loadplugins'),('lpl','lpl'),('ls','ls'),('lsp','lsp'),('lw','lw'),('lz','lz'),('ma','ma'),('macatsui','macatsui'),('magic','magic'),('makeef','makeef'),('makeprg','makeprg'),('mat','mat'),('matchpairs','matchpairs'),('matchtime','matchtime'),('maxcombine','maxcombine'),('maxfuncdepth','maxfuncdepth'),('maxmapdepth','maxmapdepth'),('maxmem','maxmem'),('maxmempattern','maxmempattern'),('maxmemtot','maxmemtot'),('mco','mco'),('mef','mef'),('menuitems','menuitems'),('mfd','mfd'),('mh','mh'),('mis','mis'),('mkspellmem','mkspellmem'),('ml','ml'),('mls','mls'),('mm','mm'),('mmd','mmd'),('mmp','mmp'),('mmt','mmt'),('mod','mod'),('modeline','modeline'),('modelines','modelines'),('modifiable','modifiable'),('modified','modified'),('more','more'),('mouse','mouse'),('mousef','mousef'),('mousefocus','mousefocus'),('mousehide','mousehide'),('mousem','mousem'),('mousemodel','mousemodel'),('mouses','mouses'),('mouseshape','mouseshape'),('mouset','mouset'),('mousetime','mousetime'),('mp','mp'),('mps','mps'),('msm','msm'),('mzq','mzq'),('mzquantum','mzquantum'),('nf','nf'),('nnoremap','nnoremap'),('noacd','noacd'),('noai','noai'),('noakm','noakm'),('noallowrevins','noallowrevins'),('noaltkeymap','noaltkeymap'),('noanti','noanti'),('noantialias','noantialias'),('noar','noar'),('noarab','noarab'),('noarabic','noarabic'),('noarabicshape','noarabicshape'),('noari','noari'),('noarshape','noarshape'),('noautochdir','noautochdir'),('noautoindent','noautoindent'),('noautoread','noautoread'),('noautowrite','noautowrite'),('noautowriteall','noautowriteall'),('noaw','noaw'),('noawa','noawa'),('nobackup','nobackup'),('noballooneval','noballooneval'),('nobeval','nobeval'),('nobin','nobin'),('nobinary','nobinary'),('nobiosk','nobiosk'),('nobioskey','nobioskey'),('nobk','nobk'),('nobl','nobl'),('nobomb','nobomb'),('nobuflisted','nobuflisted'),('nocf','nocf'),('noci','noci'),('nocin','nocin'),('nocindent','nocindent'),('nocompatible','nocompatible'),('noconfirm','noconfirm'),('noconsk','noconsk'),('noconskey','noconskey'),('nocopyindent','nocopyindent'),('nocp','nocp'),('nocrb','nocrb'),('nocscopetag','nocscopetag'),('nocscopeverbose','nocscopeverbose'),('nocst','nocst'),('nocsverb','nocsverb'),('nocuc','nocuc'),('nocul','nocul'),('nocursorbind','nocursorbind'),('nocursorcolumn','nocursorcolumn'),('nocursorline','nocursorline'),('nodeco','nodeco'),('nodelcombine','nodelcombine'),('nodg','nodg'),('nodiff','nodiff'),('nodigraph','nodigraph'),('noea','noea'),('noeb','noeb'),('noed','noed'),('noedcompatible','noedcompatible'),('noek','noek'),('noendofline','noendofline'),('noeol','noeol'),('noequalalways','noequalalways'),('noerrorbells','noerrorbells'),('noesckeys','noesckeys'),('noet','noet'),('noex','noex'),('noexpandtab','noexpandtab'),('noexrc','noexrc'),('nofen','nofen'),('nofk','nofk'),('nofkmap','nofkmap'),('nofoldenable','nofoldenable'),('nogd','nogd'),('nogdefault','nogdefault'),('noguipty','noguipty'),('nohid','nohid'),('nohidden','nohidden'),('nohk','nohk'),('nohkmap','nohkmap'),('nohkmapp','nohkmapp'),('nohkp','nohkp'),('nohls','nohls'),('nohlsearch','nohlsearch'),('noic','noic'),('noicon','noicon'),('noignorecase','noignorecase'),('noim','noim'),('noimc','noimc'),('noimcmdline','noimcmdline'),('noimd','noimd'),('noimdisable','noimdisable'),('noincsearch','noincsearch'),('noinf','noinf'),('noinfercase','noinfercase'),('noinsertmode','noinsertmode'),('nois','nois'),('nojoinspaces','nojoinspaces'),('nojs','nojs'),('nolazyredraw','nolazyredraw'),('nolbr','nolbr'),('nolinebreak','nolinebreak'),('nolisp','nolisp'),('nolist','nolist'),('noloadplugins','noloadplugins'),('nolpl','nolpl'),('nolz','nolz'),('noma','noma'),('nomacatsui','nomacatsui'),('nomagic','nomagic'),('nomh','nomh'),('noml','noml'),('nomod','nomod'),('nomodeline','nomodeline'),('nomodifiable','nomodifiable'),('nomodified','nomodified'),('nomore','nomore'),('nomousef','nomousef'),('nomousefocus','nomousefocus'),('nomousehide','nomousehide'),('nonu','nonu'),('nonumber','nonumber'),('noodev','noodev'),('noopendevice','noopendevice'),('nopaste','nopaste'),('nopi','nopi'),('nopreserveindent','nopreserveindent'),('nopreviewwindow','nopreviewwindow'),('noprompt','noprompt'),('nopvw','nopvw'),('noreadonly','noreadonly'),('norelativenumber','norelativenumber'),('noremap','noremap'),('norestorescreen','norestorescreen'),('norevins','norevins'),('nori','nori'),('norightleft','norightleft'),('norl','norl'),('nornu','nornu'),('noro','noro'),('nors','nors'),('noru','noru'),('noruler','noruler'),('nosb','nosb'),('nosc','nosc'),('noscb','noscb'),('noscrollbind','noscrollbind'),('noscs','noscs'),('nosecure','nosecure'),('nosft','nosft'),('noshellslash','noshellslash'),('noshelltemp','noshelltemp'),('noshiftround','noshiftround'),('noshortname','noshortname'),('noshowcmd','noshowcmd'),('noshowfulltag','noshowfulltag'),('noshowmatch','noshowmatch'),('noshowmode','noshowmode'),('nosi','nosi'),('nosm','nosm'),('nosmartcase','nosmartcase'),('nosmartindent','nosmartindent'),('nosmarttab','nosmarttab'),('nosmd','nosmd'),('nosn','nosn'),('nosol','nosol'),('nospell','nospell'),('nosplitbelow','nosplitbelow'),('nosplitright','nosplitright'),('nospr','nospr'),('nosr','nosr'),('nossl','nossl'),('nosta','nosta'),('nostartofline','nostartofline'),('nostmp','nostmp'),('noswapfile','noswapfile'),('noswf','noswf'),('nota','nota'),('notagbsearch','notagbsearch'),('notagrelative','notagrelative'),('notagstack','notagstack'),('notbi','notbi'),('notbidi','notbidi'),('notbs','notbs'),('notermbidi','notermbidi'),('noterse','noterse'),('notextauto','notextauto'),('notextmode','notextmode'),('notf','notf'),('notgst','notgst'),('notildeop','notildeop'),('notimeout','notimeout'),('notitle','notitle'),('noto','noto'),('notop','notop'),('notr','notr'),('nottimeout','nottimeout'),('nottybuiltin','nottybuiltin'),('nottyfast','nottyfast'),('notx','notx'),('novb','novb'),('novisualbell','novisualbell'),('nowa','nowa'),('nowarn','nowarn'),('nowb','nowb'),('noweirdinvert','noweirdinvert'),('nowfh','nowfh'),('nowfw','nowfw'),('nowildignorecase','nowildignorecase'),('nowildmenu','nowildmenu'),('nowinfixheight','nowinfixheight'),('nowinfixwidth','nowinfixwidth'),('nowiv','nowiv'),('nowmnu','nowmnu'),('nowrap','nowrap'),('nowrapscan','nowrapscan'),('nowrite','nowrite'),('nowriteany','nowriteany'),('nowritebackup','nowritebackup'),('nows','nows'),('nrformats','nrformats'),('nu','nu'),('number','number'),('numberwidth','numberwidth'),('nuw','nuw'),('odev','odev'),('oft','oft'),('ofu','ofu'),('omnifunc','omnifunc'),('opendevice','opendevice'),('operatorfunc','operatorfunc'),('opfunc','opfunc'),('osfiletype','osfiletype'),('pa','pa'),('para','para'),('paragraphs','paragraphs'),('paste','paste'),('pastetoggle','pastetoggle'),('patchexpr','patchexpr'),('patchmode','patchmode'),('path','path'),('pdev','pdev'),('penc','penc'),('pex','pex'),('pexpr','pexpr'),('pfn','pfn'),('ph','ph'),('pheader','pheader'),('pi','pi'),('pm','pm'),('pmbcs','pmbcs'),('pmbfn','pmbfn'),('popt','popt'),('preserveindent','preserveindent'),('previewheight','previewheight'),('previewwindow','previewwindow'),('printdevice','printdevice'),('printencoding','printencoding'),('printexpr','printexpr'),('printfont','printfont'),('printheader','printheader'),('printmbcharset','printmbcharset'),('printmbfont','printmbfont'),('printoptions','printoptions'),('prompt','prompt'),('pt','pt'),('pumheight','pumheight'),('pvh','pvh'),('pvw','pvw'),('qe','qe'),('quoteescape','quoteescape'),('rdt','rdt'),('readonly','readonly'),('redrawtime','redrawtime'),('relativenumber','relativenumber'),('remap','remap'),('report','report'),('restorescreen','restorescreen'),('revins','revins'),('ri','ri'),('rightleft','rightleft'),('rightleftcmd','rightleftcmd'),('rl','rl'),('rlc','rlc'),('rnu','rnu'),('ro','ro'),('rs','rs'),('rtp','rtp'),('ru','ru'),('ruf','ruf'),('ruler','ruler'),('rulerformat','rulerformat'),('runtimepath','runtimepath'),('sb','sb'),('sbo','sbo'),('sbr','sbr'),('sc','sc'),('scb','scb'),('scr','scr'),('scroll','scroll'),('scrollbind','scrollbind'),('scrolljump','scrolljump'),('scrolloff','scrolloff'),('scrollopt','scrollopt'),('scs','scs'),('sect','sect'),('sections','sections'),('secure','secure'),('sel','sel'),('selection','selection'),('selectmode','selectmode'),('sessionoptions','sessionoptions'),('sft','sft'),('sh','sh'),('shcf','shcf'),('shell','shell'),('shellcmdflag','shellcmdflag'),('shellpipe','shellpipe'),('shellquote','shellquote'),('shellredir','shellredir'),('shellslash','shellslash'),('shelltemp','shelltemp'),('shelltype','shelltype'),('shellxquote','shellxquote'),('shiftround','shiftround'),('shiftwidth','shiftwidth'),('shm','shm'),('shortmess','shortmess'),('shortname','shortname'),('showbreak','showbreak'),('showcmd','showcmd'),('showfulltag','showfulltag'),('showmatch','showmatch'),('showmode','showmode'),('showtabline','showtabline'),('shq','shq'),('si','si'),('sidescroll','sidescroll'),('sidescrolloff','sidescrolloff'),('siso','siso'),('sj','sj'),('slm','slm'),('sm','sm'),('smartcase','smartcase'),('smartindent','smartindent'),('smarttab','smarttab'),('smc','smc'),('smd','smd'),('sn','sn'),('so','so'),('softtabstop','softtabstop'),('sol','sol'),('sp','sp'),('spc','spc'),('spell','spell'),('spellcapcheck','spellcapcheck'),('spellfile','spellfile'),('spelllang','spelllang'),('spellsuggest','spellsuggest'),('spf','spf'),('spl','spl'),('splitbelow','splitbelow'),('splitright','splitright'),('spr','spr'),('sps','sps'),('sr','sr'),('srr','srr'),('ss','ss'),('ssl','ssl'),('ssop','ssop'),('st','st'),('sta','sta'),('stal','stal'),('startofline','startofline'),('statusline','statusline'),('stl','stl'),('stmp','stmp'),('sts','sts'),('su','su'),('sua','sua'),('suffixes','suffixes'),('suffixesadd','suffixesadd'),('sw','sw'),('swapfile','swapfile'),('swapsync','swapsync'),('swb','swb'),('swf','swf'),('switchbuf','switchbuf'),('sws','sws'),('sxq','sxq'),('syn','syn'),('synmaxcol','synmaxcol'),('syntax','syntax'),('t_AB','t_AB'),('t_AF','t_AF'),('t_AL','t_AL'),('t_CS','t_CS'),('t_CV','t_CV'),('t_Ce','t_Ce'),('t_Co','t_Co'),('t_Cs','t_Cs'),('t_DL','t_DL'),('t_EI','t_EI'),('t_F1','t_F1'),('t_F2','t_F2'),('t_F3','t_F3'),('t_F4','t_F4'),('t_F5','t_F5'),('t_F6','t_F6'),('t_F7','t_F7'),('t_F8','t_F8'),('t_F9','t_F9'),('t_IE','t_IE'),('t_IS','t_IS'),('t_K1','t_K1'),('t_K3','t_K3'),('t_K4','t_K4'),('t_K5','t_K5'),('t_K6','t_K6'),('t_K7','t_K7'),('t_K8','t_K8'),('t_K9','t_K9'),('t_KA','t_KA'),('t_KB','t_KB'),('t_KC','t_KC'),('t_KD','t_KD'),('t_KE','t_KE'),('t_KF','t_KF'),('t_KG','t_KG'),('t_KH','t_KH'),('t_KI','t_KI'),('t_KJ','t_KJ'),('t_KK','t_KK'),('t_KL','t_KL'),('t_RI','t_RI'),('t_RV','t_RV'),('t_SI','t_SI'),('t_Sb','t_Sb'),('t_Sf','t_Sf'),('t_WP','t_WP'),('t_WS','t_WS'),('t_ZH','t_ZH'),('t_ZR','t_ZR'),('t_al','t_al'),('t_bc','t_bc'),('t_cd','t_cd'),('t_ce','t_ce'),('t_cl','t_cl'),('t_cm','t_cm'),('t_cs','t_cs'),('t_da','t_da'),('t_db','t_db'),('t_dl','t_dl'),('t_fs','t_fs'),('t_k1','t_k1'),('t_k2','t_k2'),('t_k3','t_k3'),('t_k4','t_k4'),('t_k5','t_k5'),('t_k6','t_k6'),('t_k7','t_k7'),('t_k8','t_k8'),('t_k9','t_k9'),('t_kB','t_kB'),('t_kD','t_kD'),('t_kI','t_kI'),('t_kN','t_kN'),('t_kP','t_kP'),('t_kb','t_kb'),('t_kd','t_kd'),('t_ke','t_ke'),('t_kh','t_kh'),('t_kl','t_kl'),('t_kr','t_kr'),('t_ks','t_ks'),('t_ku','t_ku'),('t_le','t_le'),('t_mb','t_mb'),('t_md','t_md'),('t_me','t_me'),('t_mr','t_mr'),('t_ms','t_ms'),('t_nd','t_nd'),('t_op','t_op'),('t_se','t_se'),('t_so','t_so'),('t_sr','t_sr'),('t_te','t_te'),('t_ti','t_ti'),('t_ts','t_ts'),('t_ue','t_ue'),('t_us','t_us'),('t_ut','t_ut'),('t_vb','t_vb'),('t_ve','t_ve'),('t_vi','t_vi'),('t_vs','t_vs'),('t_xs','t_xs'),('ta','ta'),('tabline','tabline'),('tabpagemax','tabpagemax'),('tabstop','tabstop'),('tag','tag'),('tagbsearch','tagbsearch'),('taglength','taglength'),('tagrelative','tagrelative'),('tags','tags'),('tagstack','tagstack'),('tal','tal'),('tb','tb'),('tbi','tbi'),('tbidi','tbidi'),('tbis','tbis'),('tbs','tbs'),('tenc','tenc'),('term','term'),('termbidi','termbidi'),('termencoding','termencoding'),('terse','terse'),('textauto','textauto'),('textmode','textmode'),('textwidth','textwidth'),('tf','tf'),('tgst','tgst'),('thesaurus','thesaurus'),('tildeop','tildeop'),('timeout','timeout'),('timeoutlen','timeoutlen'),('title','title'),('titlelen','titlelen'),('titleold','titleold'),('titlestring','titlestring'),('tl','tl'),('tm','tm'),('to','to'),('toolbar','toolbar'),('toolbariconsize','toolbariconsize'),('top','top'),('tpm','tpm'),('tr','tr'),('ts','ts'),('tsl','tsl'),('tsr','tsr'),('ttimeout','ttimeout'),('ttimeoutlen','ttimeoutlen'),('ttm','ttm'),('tty','tty'),('ttybuiltin','ttybuiltin'),('ttyfast','ttyfast'),('ttym','ttym'),('ttymouse','ttymouse'),('ttyscroll','ttyscroll'),('ttytype','ttytype'),('tw','tw'),('tx','tx'),('uc','uc'),('udf','udf'),('udir','udir'),('ul','ul'),('undodir','undodir'),('undofile','undofile'),('undolevels','undolevels'),('undoreload','undoreload'),('updatecount','updatecount'),('updatetime','updatetime'),('ur','ur'),('ut','ut'),('vb','vb'),('vbs','vbs'),('vdir','vdir'),('ve','ve'),('verbose','verbose'),('verbosefile','verbosefile'),('vfile','vfile'),('vi','vi'),('viewdir','viewdir'),('viewoptions','viewoptions'),('viminfo','viminfo'),('virtualedit','virtualedit'),('visualbell','visualbell'),('vnoremap','vnoremap'),('vop','vop'),('wa','wa'),('wak','wak'),('warn','warn'),('wb','wb'),('wc','wc'),('wcm','wcm'),('wd','wd'),('weirdinvert','weirdinvert'),('wfh','wfh'),('wfw','wfw'),('wh','wh'),('whichwrap','whichwrap'),('wi','wi'),('wic','wic'),('wig','wig'),('wildchar','wildchar'),('wildcharm','wildcharm'),('wildignore','wildignore'),('wildignorecase','wildignorecase'),('wildmenu','wildmenu'),('wildmode','wildmode'),('wildoptions','wildoptions'),('wim','wim'),('winaltkeys','winaltkeys'),('window','window'),('winfixheight','winfixheight'),('winfixwidth','winfixwidth'),('winheight','winheight'),('winminheight','winminheight'),('winminwidth','winminwidth'),('winwidth','winwidth'),('wiv','wiv'),('wiw','wiw'),('wm','wm'),('wmh','wmh'),('wmnu','wmnu'),('wmw','wmw'),('wop','wop'),('wrap','wrap'),('wrapmargin','wrapmargin'),('wrapscan','wrapscan'),('write','write'),('writeany','writeany'),('writebackup','writebackup'),('writedelay','writedelay'),('ws','ws'),('ww','ww')]
+
+option = _getoption()
+command = _getcommand()
+auto = _getauto()
diff --git a/pygments/lexers/agile.py b/pygments/lexers/agile.py
index ae2456ff..90f9ecd3 100644
--- a/pygments/lexers/agile.py
+++ b/pygments/lexers/agile.py
@@ -5,7 +5,7 @@
Lexers for agile languages.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -22,7 +22,8 @@ from pygments import unistring as uni
__all__ = ['PythonLexer', 'PythonConsoleLexer', 'PythonTracebackLexer',
'Python3Lexer', 'Python3TracebackLexer', 'RubyLexer',
'RubyConsoleLexer', 'PerlLexer', 'LuaLexer', 'MoonScriptLexer',
- 'CrocLexer', 'MiniDLexer', 'IoLexer', 'TclLexer', 'FactorLexer', 'FancyLexer']
+ 'CrocLexer', 'MiniDLexer', 'IoLexer', 'TclLexer', 'FactorLexer',
+ 'FancyLexer', 'DgLexer']
# b/w compatibility
from pygments.lexers.functional import SchemeLexer
@@ -76,7 +77,7 @@ class PythonLexer(RegexLexer):
'keywords': [
(r'(assert|break|continue|del|elif|else|except|exec|'
r'finally|for|global|if|lambda|pass|print|raise|'
- r'return|try|while|yield|as|with)\b', Keyword),
+ r'return|try|while|yield(\s+from)?|as|with)\b', Keyword),
],
'builtins': [
(r'(?<!\.)(__import__|abs|all|any|apply|basestring|bin|bool|buffer|'
@@ -207,7 +208,8 @@ class Python3Lexer(RegexLexer):
tokens['keywords'] = [
(r'(assert|break|continue|del|elif|else|except|'
r'finally|for|global|if|lambda|pass|raise|nonlocal|'
- r'return|try|while|yield|as|with|True|False|None)\b', Keyword),
+ r'return|try|while|yield(\s+from)?|as|with|True|False|None)\b',
+ Keyword),
]
tokens['builtins'] = [
(r'(?<!\.)(__import__|abs|all|any|bin|bool|bytearray|bytes|'
@@ -263,6 +265,7 @@ class Python3Lexer(RegexLexer):
(r'(\s+)(import)\b', bygroups(Text, Keyword), '#pop'),
(r'\.', Name.Namespace),
(uni_name, Name.Namespace),
+ (r'', Text, '#pop'),
]
# don't highlight "%s" substitutions
tokens['strings'] = [
@@ -390,7 +393,7 @@ class PythonTracebackLexer(RegexLexer):
bygroups(Text, using(PythonLexer), Text)),
(r'^([ \t]*)(\.\.\.)(\n)',
bygroups(Text, Comment, Text)), # for doctests...
- (r'^(.+)(: )(.+)(\n)',
+ (r'^([^:]+)(: )(.+)(\n)',
bygroups(Generic.Error, Text, Name, Text), '#pop'),
(r'^([a-zA-Z_][a-zA-Z0-9_]*)(:?\n)',
bygroups(Generic.Error, Text), '#pop')
@@ -426,7 +429,7 @@ class Python3TracebackLexer(RegexLexer):
bygroups(Text, using(Python3Lexer), Text)),
(r'^([ \t]*)(\.\.\.)(\n)',
bygroups(Text, Comment, Text)), # for doctests...
- (r'^(.+)(: )(.+)(\n)',
+ (r'^([^:]+)(: )(.+)(\n)',
bygroups(Generic.Error, Text, Name, Text), '#pop'),
(r'^([a-zA-Z_][a-zA-Z0-9_]*)(:?\n)',
bygroups(Generic.Error, Text), '#pop')
@@ -518,6 +521,8 @@ class RubyLexer(ExtendedRegexLexer):
(r":'(\\\\|\\'|[^'])*'", String.Symbol),
(r"'(\\\\|\\'|[^'])*'", String.Single),
(r':"', String.Symbol, 'simple-sym'),
+ (r'([a-zA-Z_][a-zA-Z0-9]*)(:)',
+ bygroups(String.Symbol, Punctuation)), # Since Ruby 1.9
(r'"', String.Double, 'simple-string'),
(r'(?<!\.)`', String.Backtick, 'simple-backtick'),
]
@@ -647,7 +652,7 @@ class RubyLexer(ExtendedRegexLexer):
(r'(<<-?)("|\')()(\2)(.*?\n)', heredoc_callback),
(r'__END__', Comment.Preproc, 'end-part'),
# multiline regex (after keywords or assignments)
- (r'(?:^|(?<=[=<>~!])|'
+ (r'(?:^|(?<=[=<>~!:])|'
r'(?<=(?:\s|;)when\s)|'
r'(?<=(?:\s|;)or\s)|'
r'(?<=(?:\s|;)and\s)|'
@@ -1219,7 +1224,8 @@ class CrocLexer(RegexLexer):
r'|this|throw|try|vararg|while|with|yield)\b', Keyword),
(r'(false|true|null)\b', Keyword.Constant),
# FloatLiteral
- (r'([0-9][0-9_]*)(?=[.eE])(\.[0-9][0-9_]*)?([eE][+\-]?[0-9_]+)?', Number.Float),
+ (r'([0-9][0-9_]*)(?=[.eE])(\.[0-9][0-9_]*)?([eE][+\-]?[0-9_]+)?',
+ Number.Float),
# IntegerLiteral
# -- Binary
(r'0[bB][01][01_]*', Number),
@@ -1813,3 +1819,98 @@ class FancyLexer(RegexLexer):
(r'\d+', Number.Integer)
]
}
+
+
+class DgLexer(RegexLexer):
+ """
+ Lexer for `dg <http://pyos.github.com/dg>`_,
+ a functional and object-oriented programming language
+ running on the CPython 3 VM.
+
+ *New in Pygments 1.6.*
+ """
+ name = 'dg'
+ aliases = ['dg']
+ filenames = ['*.dg']
+ mimetypes = ['text/x-dg']
+
+ tokens = {
+ 'root': [
+ # Whitespace:
+ (r'\s+', Text),
+ (r'#.*?$', Comment.Single),
+ # Lexemes:
+ # Numbers
+ (r'0[bB][01]+', Number.Bin),
+ (r'0[oO][0-7]+', Number.Oct),
+ (r'0[xX][\da-fA-F]+', Number.Hex),
+ (r'[+-]?\d+\.\d+([eE][+-]?\d+)?[jJ]?', Number.Float),
+ (r'[+-]?\d+[eE][+-]?\d+[jJ]?', Number.Float),
+ (r'[+-]?\d+[jJ]?', Number.Integer),
+ # Character/String Literals
+ (r"[br]*'''", String, combined('stringescape', 'tsqs', 'string')),
+ (r'[br]*"""', String, combined('stringescape', 'tdqs', 'string')),
+ (r"[br]*'", String, combined('stringescape', 'sqs', 'string')),
+ (r'[br]*"', String, combined('stringescape', 'dqs', 'string')),
+ # Operators
+ (r"`\w+'*`", Operator), # Infix links
+ # Reserved infix links
+ (r'\b(or|and|if|else|where|is|in)\b', Operator.Word),
+ (r'[!$%&*+\-./:<-@\\^|~;,]+', Operator),
+ # Identifiers
+ # Python 3 types
+ (r"(?<!\.)(bool|bytearray|bytes|classmethod|complex|dict'?|"
+ r"float|frozenset|int|list'?|memoryview|object|property|range|"
+ r"set'?|slice|staticmethod|str|super|tuple'?|type)"
+ r"(?!['\w])", Name.Builtin),
+ # Python 3 builtins + some more
+ (r'(?<!\.)(__import__|abs|all|any|bin|bind|chr|cmp|compile|complex|'
+ r'delattr|dir|divmod|drop|dropwhile|enumerate|eval|filter|flip|'
+ r'foldl1?|format|fst|getattr|globals|hasattr|hash|head|hex|id|'
+ r'init|input|isinstance|issubclass|iter|iterate|last|len|locals|'
+ r'map|max|min|next|oct|open|ord|pow|print|repr|reversed|round|'
+ r'setattr|scanl1?|snd|sorted|sum|tail|take|takewhile|vars|zip)'
+ r"(?!['\w])", Name.Builtin),
+ (r"(?<!\.)(self|Ellipsis|NotImplemented|None|True|False)(?!['\w])",
+ Name.Builtin.Pseudo),
+ (r"(?<!\.)[A-Z]\w*(Error|Exception|Warning)'*(?!['\w])",
+ Name.Exception),
+ (r"(?<!\.)(KeyboardInterrupt|SystemExit|StopIteration|"
+ r"GeneratorExit)(?!['\w])", Name.Exception),
+ # Compiler-defined identifiers
+ (r"(?<![\.\w])(import|inherit|for|while|switch|not|raise|unsafe|"
+ r"yield|with)(?!['\w])", Keyword.Reserved),
+ # Other links
+ (r"[A-Z_']+\b", Name),
+ (r"[A-Z][\w']*\b", Keyword.Type),
+ (r"\w+'*", Name),
+ # Blocks
+ (r'[()]', Punctuation),
+ ],
+ 'stringescape': [
+ (r'\\([\\abfnrtv"\']|\n|N{.*?}|u[a-fA-F0-9]{4}|'
+ r'U[a-fA-F0-9]{8}|x[a-fA-F0-9]{2}|[0-7]{1,3})', String.Escape)
+ ],
+ 'string': [
+ (r'%(\([a-zA-Z0-9_]+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?'
+ '[hlL]?[diouxXeEfFgGcrs%]', String.Interpol),
+ (r'[^\\\'"%\n]+', String),
+ # quotes, percents and backslashes must be parsed one at a time
+ (r'[\'"\\]', String),
+ # unhandled string formatting sign
+ (r'%', String),
+ (r'\n', String)
+ ],
+ 'dqs': [
+ (r'"', String, '#pop')
+ ],
+ 'sqs': [
+ (r"'", String, '#pop')
+ ],
+ 'tdqs': [
+ (r'"""', String, '#pop')
+ ],
+ 'tsqs': [
+ (r"'''", String, '#pop')
+ ],
+ }
diff --git a/pygments/lexers/asm.py b/pygments/lexers/asm.py
index aebe74f5..5f1d808a 100644
--- a/pygments/lexers/asm.py
+++ b/pygments/lexers/asm.py
@@ -5,7 +5,7 @@
Lexers for assembly languages.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -240,8 +240,8 @@ class LlvmLexer(RegexLexer):
r'|linkonce_odr|weak|weak_odr|appending|dllimport|dllexport'
r'|common|default|hidden|protected|extern_weak|external'
r'|thread_local|zeroinitializer|undef|null|to|tail|target|triple'
- r'|deplibs|datalayout|volatile|nuw|nsw|exact|inbounds|align'
- r'|addrspace|section|alias|module|asm|sideeffect|gc|dbg'
+ r'|datalayout|volatile|nuw|nsw|nnan|ninf|nsz|arcp|fast|exact|inbounds'
+ r'|align|addrspace|section|alias|module|asm|sideeffect|gc|dbg'
r'|ccc|fastcc|coldcc|x86_stdcallcc|x86_fastcallcc|arm_apcscc'
r'|arm_aapcscc|arm_aapcs_vfpcc'
@@ -359,16 +359,19 @@ class NasmLexer(RegexLexer):
],
}
+
class Ca65Lexer(RegexLexer):
"""
For ca65 assembler sources.
+
+ *New in Pygments 1.6.*
"""
name = 'ca65'
aliases = ['ca65']
filenames = ['*.s']
-
+
flags = re.IGNORECASE
-
+
tokens = {
'root': [
(r';.*', Comment.Single),
@@ -388,3 +391,8 @@ class Ca65Lexer(RegexLexer):
(r'[\w.@$][\w.@$\d]*', Name),
]
}
+
+ def analyse_text(self, text):
+ # comments in GAS start with "#"
+ if re.match(r'^\s*;', text, re.MULTILINE):
+ return 0.9
diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py
index 450a9c4d..29382f94 100644
--- a/pygments/lexers/compiled.py
+++ b/pygments/lexers/compiled.py
@@ -5,7 +5,7 @@
Lexers for compiled languages.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -13,7 +13,7 @@ import re
from string import Template
from pygments.lexer import Lexer, RegexLexer, include, bygroups, using, \
- this, combined
+ this, combined, inherit
from pygments.util import get_bool_opt, get_list_opt
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
Number, Punctuation, Error, Literal
@@ -23,21 +23,19 @@ from pygments.scanner import Scanner
from pygments.lexers.functional import OcamlLexer
from pygments.lexers.jvm import JavaLexer, ScalaLexer
-__all__ = ['CLexer', 'CppLexer', 'DLexer', 'DelphiLexer', 'ECLexer',
- 'DylanLexer', 'ObjectiveCLexer', 'FortranLexer', 'GLShaderLexer',
+__all__ = ['CLexer', 'CppLexer', 'DLexer', 'DelphiLexer', 'ECLexer', 'DylanLexer',
+ 'ObjectiveCLexer', 'ObjectiveCppLexer', 'FortranLexer', 'GLShaderLexer',
'PrologLexer', 'CythonLexer', 'ValaLexer', 'OocLexer', 'GoLexer',
'FelixLexer', 'AdaLexer', 'Modula2Lexer', 'BlitzMaxLexer',
- 'NimrodLexer', 'FantomLexer', 'RustLexer', 'CUDALexer']
+ 'NimrodLexer', 'FantomLexer', 'RustLexer', 'CudaLexer', 'MonkeyLexer',
+ 'DylanLidLexer', 'CobolLexer', 'CobolFreeformatLexer']
-class CLexer(RegexLexer):
+class CFamilyLexer(RegexLexer):
"""
- For C source code with preprocessor directives.
+ For C family source code. This is used as a base class to avoid repetitious
+ definitions.
"""
- name = 'C'
- aliases = ['c']
- filenames = ['*.c', '*.h', '*.idc']
- mimetypes = ['text/x-chdr', 'text/x-csrc']
#: optional Comment or Whitespace
_ws = r'(?:\s|//.*?\n|/[*].*?[*]/)+'
@@ -76,12 +74,17 @@ class CLexer(RegexLexer):
(r'\b(case)(.+?)(:)', bygroups(Keyword, using(this), Text)),
(r'(auto|break|case|const|continue|default|do|else|enum|extern|'
r'for|goto|if|register|restricted|return|sizeof|static|struct|'
- r'switch|typedef|union|volatile|virtual|while)\b', Keyword),
- (r'(int|long|float|short|double|char|unsigned|signed|void)\b',
+ r'switch|typedef|union|volatile|while)\b', Keyword),
+ (r'(bool|int|long|float|short|double|char|unsigned|signed|void|'
+ r'[a-z_][a-z0-9_]*_t)\b',
Keyword.Type),
(r'(_{0,2}inline|naked|restrict|thread|typename)\b', Keyword.Reserved),
+ # Vector intrinsics
+ (r'(__(m128i|m128d|m128|m64))\b', Keyword.Reserved),
+ # Microsoft-isms
(r'__(asm|int8|based|except|int16|stdcall|cdecl|fastcall|int32|'
- r'declspec|finally|int64|try|leave)\b', Keyword.Reserved),
+ r'declspec|finally|int64|try|leave|wchar_t|w64|unaligned|'
+ r'raise|noop|identifier|forceinline|assume)\b', Keyword.Reserved),
(r'(true|false|NULL)\b', Name.Builtin),
('[a-zA-Z_][a-zA-Z0-9_]*', Name),
],
@@ -119,7 +122,8 @@ class CLexer(RegexLexer):
],
'string': [
(r'"', String, '#pop'),
- (r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape),
+ (r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|'
+ r'u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}|[0-7]{1,3})', String.Escape),
(r'[^\\"\n]+', String), # all other characters
(r'\\\n', String), # line continuation
(r'\\', String), # stray backslash
@@ -141,16 +145,17 @@ class CLexer(RegexLexer):
}
stdlib_types = ['size_t', 'ssize_t', 'off_t', 'wchar_t', 'ptrdiff_t',
- 'sig_atomic_t', 'fpos_t', 'clock_t', 'time_t', 'va_list',
- 'jmp_buf', 'FILE', 'DIR', 'div_t', 'ldiv_t', 'mbstate_t',
- 'wctrans_t', 'wint_t', 'wctype_t']
+ 'sig_atomic_t', 'fpos_t', 'clock_t', 'time_t', 'va_list',
+ 'jmp_buf', 'FILE', 'DIR', 'div_t', 'ldiv_t', 'mbstate_t',
+ 'wctrans_t', 'wint_t', 'wctype_t']
c99_types = ['_Bool', '_Complex', 'int8_t', 'int16_t', 'int32_t', 'int64_t',
- 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', 'int_least8_t',
- 'int_least16_t', 'int_least32_t', 'int_least64_t',
- 'uint_least8_t', 'uint_least16_t', 'uint_least32_t',
- 'uint_least64_t', 'int_fast8_t', 'int_fast16_t', 'int_fast32_t',
- 'int_fast64_t', 'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t',
- 'uint_fast64_t', 'intptr_t', 'uintptr_t', 'intmax_t', 'uintmax_t']
+ 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', 'int_least8_t',
+ 'int_least16_t', 'int_least32_t', 'int_least64_t',
+ 'uint_least8_t', 'uint_least16_t', 'uint_least32_t',
+ 'uint_least64_t', 'int_fast8_t', 'int_fast16_t', 'int_fast32_t',
+ 'int_fast64_t', 'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t',
+ 'uint_fast64_t', 'intptr_t', 'uintptr_t', 'intmax_t',
+ 'uintmax_t']
def __init__(self, **options):
self.stdlibhighlighting = get_bool_opt(options,
@@ -169,99 +174,63 @@ class CLexer(RegexLexer):
token = Keyword.Type
yield index, token, value
-class CppLexer(RegexLexer):
+
+class CLexer(CFamilyLexer):
+ """
+ For C source code with preprocessor directives.
+ """
+ name = 'C'
+ aliases = ['c']
+ filenames = ['*.c', '*.h', '*.idc']
+ mimetypes = ['text/x-chdr', 'text/x-csrc']
+ priority = 0.1
+
+ def analyse_text(text):
+ return 0.1
+
+
+class CppLexer(CFamilyLexer):
"""
For C++ source code with preprocessor directives.
"""
name = 'C++'
aliases = ['cpp', 'c++']
filenames = ['*.cpp', '*.hpp', '*.c++', '*.h++',
- '*.cc', '*.hh', '*.cxx', '*.hxx']
+ '*.cc', '*.hh', '*.cxx', '*.hxx',
+ '*.C', '*.H', '*.cp', '*.CPP']
mimetypes = ['text/x-c++hdr', 'text/x-c++src']
-
- #: optional Comment or Whitespace
- _ws = r'(?:\s|//.*?\n|/[*].*?[*]/)+'
- #: only one /* */ style comment
- _ws1 = r':\s*/[*].*?[*]/\s*'
+ priority = 0.1
tokens = {
- 'root': [
- # preprocessor directives: without whitespace
- ('^#if\s+0', Comment.Preproc, 'if0'),
- ('^#', Comment.Preproc, 'macro'),
- # or with whitespace
- ('^(' + _ws1 + r')(#if\s+0)',
- bygroups(using(this), Comment.Preproc), 'if0'),
- ('^(' + _ws1 + ')(#)',
- bygroups(using(this), Comment.Preproc), 'macro'),
- (r'\n', Text),
- (r'\s+', Text),
- (r'\\\n', Text), # line continuation
- (r'/(\\\n)?/(\n|(.|\n)*?[^\\]\n)', Comment.Single),
- (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline),
- (r'[{}]', Punctuation),
- (r'L?"', String, 'string'),
- (r"L?'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'", String.Char),
- (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*', Number.Float),
- (r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float),
- (r'0x[0-9a-fA-F]+[LlUu]*', Number.Hex),
- (r'0[0-7]+[LlUu]*', Number.Oct),
- (r'\d+[LlUu]*', Number.Integer),
- (r'\*/', Error),
- (r'[~!%^&*+=|?:<>/-]', Operator),
- (r'[()\[\],.;]', Punctuation),
- (r'(asm|auto|break|case|catch|const|const_cast|continue|'
- r'default|delete|do|dynamic_cast|else|enum|explicit|export|'
- r'extern|for|friend|goto|if|mutable|namespace|new|operator|'
- r'private|protected|public|register|reinterpret_cast|return|'
- r'restrict|sizeof|static|static_cast|struct|switch|template|'
- r'this|throw|throws|try|typedef|typeid|typename|union|using|'
- r'volatile|virtual|while)\b', Keyword),
+ 'statements': [
+ (r'(asm|catch|const_cast|delete|dynamic_cast|explicit|'
+ r'export|friend|mutable|namespace|new|operator|'
+ r'private|protected|public|reinterpret_cast|'
+ r'restrict|static_cast|template|this|throw|throws|'
+ r'typeid|typename|using|virtual)\b', Keyword),
(r'(class)(\s+)', bygroups(Keyword, Text), 'classname'),
- (r'(bool|int|long|float|short|double|char|unsigned|signed|'
- r'void|wchar_t)\b', Keyword.Type),
- (r'(_{0,2}inline|naked|thread)\b', Keyword.Reserved),
- (r'__(asm|int8|based|except|int16|stdcall|cdecl|fastcall|int32|'
- r'declspec|finally|int64|try|leave|wchar_t|w64|virtual_inheritance|'
- r'uuidof|unaligned|super|single_inheritance|raise|noop|'
- r'multiple_inheritance|m128i|m128d|m128|m64|interface|'
- r'identifier|forceinline|event|assume)\b', Keyword.Reserved),
+ inherit,
+ ],
+ 'root': [
+ inherit,
+ # C++ Microsoft-isms
+ (r'__(virtual_inheritance|uuidof|super|single_inheritance|'
+ r'multiple_inheritance|interface|event)\b', Keyword.Reserved),
# Offload C++ extensions, http://offload.codeplay.com/
(r'(__offload|__blockingoffload|__outer)\b', Keyword.Pseudo),
- (r'(true|false)\b', Keyword.Constant),
- (r'NULL\b', Name.Builtin),
- ('[a-zA-Z_][a-zA-Z0-9_]*:(?!:)', Name.Label),
- ('[a-zA-Z_][a-zA-Z0-9_]*', Name),
],
'classname': [
(r'[a-zA-Z_][a-zA-Z0-9_]*', Name.Class, '#pop'),
# template specification
(r'\s*(?=>)', Text, '#pop'),
],
- 'string': [
- (r'"', String, '#pop'),
- (r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape),
- (r'[^\\"\n]+', String), # all other characters
- (r'\\\n', String), # line continuation
- (r'\\', String), # stray backslash
- ],
- 'macro': [
- (r'[^/\n]+', Comment.Preproc),
- (r'/[*](.|\n)*?[*]/', Comment.Multiline),
- (r'//.*?\n', Comment.Single, '#pop'),
- (r'/', Comment.Preproc),
- (r'(?<=\\)\n', Comment.Preproc),
- (r'\n', Comment.Preproc, '#pop'),
- ],
- 'if0': [
- (r'^\s*#if.*?(?<!\\)\n', Comment.Preproc, '#push'),
- (r'^\s*#endif.*?(?<!\\)\n', Comment.Preproc, '#pop'),
- (r'.*?\n', Comment),
- ]
}
+ def analyse_text(text):
+ return 0.1
-class ECLexer(RegexLexer):
+
+class ECLexer(CLexer):
"""
For eC source code with preprocessor directives.
@@ -272,146 +241,29 @@ class ECLexer(RegexLexer):
filenames = ['*.ec', '*.eh']
mimetypes = ['text/x-echdr', 'text/x-ecsrc']
- #: optional Comment or Whitespace
- _ws = r'(?:\s|//.*?\n|/[*].*?[*]/)+'
- #: only one /* */ style comment
- _ws1 = r':\s*/[*].*?[*]/\s*'
-
tokens = {
- 'whitespace': [
- # preprocessor directives: without whitespace
- ('^#if\s+0', Comment.Preproc, 'if0'),
- ('^#', Comment.Preproc, 'macro'),
- # or with whitespace
- ('^' + _ws1 + r'#if\s+0', Comment.Preproc, 'if0'),
- ('^' + _ws1 + '#', Comment.Preproc, 'macro'),
- (r'^(\s*)([a-zA-Z_][a-zA-Z0-9_]*:(?!:))', bygroups(Text, Name.Label)),
- (r'\n', Text),
- (r'\s+', Text),
- (r'\\\n', Text), # line continuation
- (r'//(\n|(.|\n)*?[^\\]\n)', Comment.Single),
- (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline),
- ],
'statements': [
- (r'L?"', String, 'string'),
- (r"L?'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'", String.Char),
- (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*', Number.Float),
- (r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float),
- (r'0x[0-9a-fA-F]+[LlUu]*', Number.Hex),
- (r'0[0-7]+[LlUu]*', Number.Oct),
- (r'\d+[LlUu]*', Number.Integer),
- (r'\*/', Error),
- (r'[~!%^&*+=|?:<>/-]', Operator),
- (r'[()\[\],.]', Punctuation),
- (r'\b(case)(.+?)(:)', bygroups(Keyword, using(this), Text)),
- (r'(auto|break|case|const|continue|default|do|else|enum|extern|'
- r'for|goto|if|register|restricted|return|sizeof|static|struct|'
- r'switch|typedef|union|volatile|virtual|while|class|private|public|'
- r'property|import|delete|new|new0|renew|renew0|define|get|set|remote|dllexport|dllimport|stdcall|'
- r'subclass|__on_register_module|namespace|using|typed_object|any_object|incref|register|watch|'
- r'stopwatching|firewatchers|watchable|class_designer|class_fixed|class_no_expansion|isset|'
- r'class_default_property|property_category|class_data|class_property|virtual|thisclass|'
+ (r'(virtual|class|private|public|property|import|delete|new|new0|'
+ r'renew|renew0|define|get|set|remote|dllexport|dllimport|stdcall|'
+ r'subclass|__on_register_module|namespace|using|typed_object|'
+ r'any_object|incref|register|watch|stopwatching|firewatchers|'
+ r'watchable|class_designer|class_fixed|class_no_expansion|isset|'
+ r'class_default_property|property_category|class_data|'
+ r'class_property|virtual|thisclass|'
r'dbtable|dbindex|database_open|dbfield)\b', Keyword),
- (r'(int|long|float|short|double|char|unsigned|signed|void)\b',
- Keyword.Type),
(r'(uint|uint16|uint32|uint64|bool|byte|unichar|int64)\b',
Keyword.Type),
(r'(class)(\s+)', bygroups(Keyword, Text), 'classname'),
- (r'(_{0,2}inline|naked|restrict|thread|typename)\b', Keyword.Reserved),
- (r'__(asm|int8|based|except|int16|stdcall|cdecl|fastcall|int32|'
- r'declspec|finally|int64|try|leave)\b', Keyword.Reserved),
- (r'(true|false|null|value|this|NULL)\b', Name.Builtin),
- ('[a-zA-Z_][a-zA-Z0-9_]*', Name),
- ],
- 'root': [
- include('whitespace'),
- # functions
- (r'((?:[a-zA-Z0-9_*\s])+?(?:\s|[*]))' # return arguments
- r'([a-zA-Z_][a-zA-Z0-9_]*)' # method name
- r'(\s*\([^;]*?\))' # signature
- r'(' + _ws + r')?({)',
- bygroups(using(this), Name.Function, using(this), using(this),
- Punctuation),
- 'function'),
- # function declarations
- (r'((?:[a-zA-Z0-9_*\s])+?(?:\s|[*]))' # return arguments
- r'([a-zA-Z_][a-zA-Z0-9_]*)' # method name
- r'(\s*\([^;]*?\))' # signature
- r'(' + _ws + r')?(;)',
- bygroups(using(this), Name.Function, using(this), using(this),
- Punctuation)),
- ('', Text, 'statement'),
+ (r'(null|value|this)\b', Name.Builtin),
+ inherit,
],
'classname': [
(r'[a-zA-Z_][a-zA-Z0-9_]*', Name.Class, '#pop'),
# template specification
(r'\s*(?=>)', Text, '#pop'),
],
- 'statement' : [
- include('whitespace'),
- include('statements'),
- ('[{}]', Punctuation),
- (';', Punctuation, '#pop'),
- ],
- 'function': [
- include('whitespace'),
- include('statements'),
- (';', Punctuation),
- ('{', Punctuation, '#push'),
- ('}', Punctuation, '#pop'),
- ],
- 'string': [
- (r'"', String, '#pop'),
- (r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape),
- (r'[^\\"\n]+', String), # all other characters
- (r'\\\n', String), # line continuation
- (r'\\', String), # stray backslash
- ],
- 'macro': [
- (r'[^/\n]+', Comment.Preproc),
- (r'/[*](.|\n)*?[*]/', Comment.Multiline),
- (r'//.*?\n', Comment.Single, '#pop'),
- (r'/', Comment.Preproc),
- (r'(?<=\\)\n', Comment.Preproc),
- (r'\n', Comment.Preproc, '#pop'),
- ],
- 'if0': [
- (r'^\s*#if.*?(?<!\\)\n', Comment.Preproc, '#push'),
- (r'^\s*#el(?:se|if).*\n', Comment.Preproc, '#pop'),
- (r'^\s*#endif.*?(?<!\\)\n', Comment.Preproc, '#pop'),
- (r'.*?\n', Comment),
- ]
}
- stdlib_types = ['size_t', 'ssize_t', 'off_t', 'wchar_t', 'ptrdiff_t',
- 'sig_atomic_t', 'fpos_t', 'clock_t', 'time_t', 'va_list',
- 'jmp_buf', 'FILE', 'DIR', 'div_t', 'ldiv_t', 'mbstate_t',
- 'wctrans_t', 'wint_t', 'wctype_t']
- c99_types = ['_Bool', '_Complex', 'int8_t', 'int16_t', 'int32_t', 'int64_t',
- 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', 'int_least8_t',
- 'int_least16_t', 'int_least32_t', 'int_least64_t',
- 'uint_least8_t', 'uint_least16_t', 'uint_least32_t',
- 'uint_least64_t', 'int_fast8_t', 'int_fast16_t', 'int_fast32_t',
- 'int_fast64_t', 'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t',
- 'uint_fast64_t', 'intptr_t', 'uintptr_t', 'intmax_t', 'uintmax_t']
-
- def __init__(self, **options):
- self.stdlibhighlighting = get_bool_opt(options,
- 'stdlibhighlighting', True)
- self.c99highlighting = get_bool_opt(options,
- 'c99highlighting', True)
- RegexLexer.__init__(self, **options)
-
- def get_tokens_unprocessed(self, text):
- for index, token, value in \
- RegexLexer.get_tokens_unprocessed(self, text):
- if token is Name:
- if self.stdlibhighlighting and value in self.stdlib_types:
- token = Keyword.Type
- elif self.c99highlighting and value in self.c99_types:
- token = Keyword.Type
- yield index, token, value
-
class DLexer(RegexLexer):
"""
@@ -1056,40 +908,176 @@ class DylanLexer(RegexLexer):
name = 'Dylan'
aliases = ['dylan']
- filenames = ['*.dylan', '*.dyl']
+ filenames = ['*.dylan', '*.dyl', '*.intr']
mimetypes = ['text/x-dylan']
- flags = re.DOTALL
+ flags = re.IGNORECASE
+
+ builtins = set([
+ 'subclass', 'abstract', 'block', 'concrete', 'constant', 'class',
+ 'compiler-open', 'compiler-sideways', 'domain', 'dynamic',
+ 'each-subclass', 'exception', 'exclude', 'function', 'generic',
+ 'handler', 'inherited', 'inline', 'inline-only', 'instance',
+ 'interface', 'import', 'keyword', 'library', 'macro', 'method',
+ 'module', 'open', 'primary', 'required', 'sealed', 'sideways',
+ 'singleton', 'slot', 'thread', 'variable', 'virtual'])
+
+ keywords = set([
+ 'above', 'afterwards', 'begin', 'below', 'by', 'case', 'cleanup',
+ 'create', 'define', 'else', 'elseif', 'end', 'export', 'finally',
+ 'for', 'from', 'if', 'in', 'let', 'local', 'otherwise', 'rename',
+ 'select', 'signal', 'then', 'to', 'unless', 'until', 'use', 'when',
+ 'while'])
+
+ operators = set([
+ '~', '+', '-', '*', '|', '^', '=', '==', '~=', '~==', '<', '<=',
+ '>', '>=', '&', '|'])
+
+ functions = set([
+ 'abort', 'abs', 'add', 'add!', 'add-method', 'add-new', 'add-new!',
+ 'all-superclasses', 'always', 'any?', 'applicable-method?', 'apply',
+ 'aref', 'aref-setter', 'as', 'as-lowercase', 'as-lowercase!',
+ 'as-uppercase', 'as-uppercase!', 'ash', 'backward-iteration-protocol',
+ 'break', 'ceiling', 'ceiling/', 'cerror', 'check-type', 'choose',
+ 'choose-by', 'complement', 'compose', 'concatenate', 'concatenate-as',
+ 'condition-format-arguments', 'condition-format-string', 'conjoin',
+ 'copy-sequence', 'curry', 'default-handler', 'dimension', 'dimensions',
+ 'direct-subclasses', 'direct-superclasses', 'disjoin', 'do',
+ 'do-handlers', 'element', 'element-setter', 'empty?', 'error', 'even?',
+ 'every?', 'false-or', 'fill!', 'find-key', 'find-method', 'first',
+ 'first-setter', 'floor', 'floor/', 'forward-iteration-protocol',
+ 'function-arguments', 'function-return-values',
+ 'function-specializers', 'gcd', 'generic-function-mandatory-keywords',
+ 'generic-function-methods', 'head', 'head-setter', 'identity',
+ 'initialize', 'instance?', 'integral?', 'intersection',
+ 'key-sequence', 'key-test', 'last', 'last-setter', 'lcm', 'limited',
+ 'list', 'logand', 'logbit?', 'logior', 'lognot', 'logxor', 'make',
+ 'map', 'map-as', 'map-into', 'max', 'member?', 'merge-hash-codes',
+ 'min', 'modulo', 'negative', 'negative?', 'next-method',
+ 'object-class', 'object-hash', 'odd?', 'one-of', 'pair', 'pop',
+ 'pop-last', 'positive?', 'push', 'push-last', 'range', 'rank',
+ 'rcurry', 'reduce', 'reduce1', 'remainder', 'remove', 'remove!',
+ 'remove-duplicates', 'remove-duplicates!', 'remove-key!',
+ 'remove-method', 'replace-elements!', 'replace-subsequence!',
+ 'restart-query', 'return-allowed?', 'return-description',
+ 'return-query', 'reverse', 'reverse!', 'round', 'round/',
+ 'row-major-index', 'second', 'second-setter', 'shallow-copy',
+ 'signal', 'singleton', 'size', 'size-setter', 'slot-initialized?',
+ 'sort', 'sort!', 'sorted-applicable-methods', 'subsequence-position',
+ 'subtype?', 'table-protocol', 'tail', 'tail-setter', 'third',
+ 'third-setter', 'truncate', 'truncate/', 'type-error-expected-type',
+ 'type-error-value', 'type-for-copy', 'type-union', 'union', 'values',
+ 'vector', 'zero?'])
+
+ valid_name = '\\\\?[a-zA-Z0-9' + re.escape('!&*<>|^$%@_-+~?/=') + ']+'
+
+ def get_tokens_unprocessed(self, text):
+ for index, token, value in RegexLexer.get_tokens_unprocessed(self, text):
+ if token is Name:
+ if value in self.builtins:
+ yield index, Name.Builtin, value
+ continue
+ if value in self.keywords:
+ yield index, Keyword, value
+ continue
+ if value in self.functions:
+ yield index, Name.Builtin, value
+ continue
+ if value in self.operators:
+ yield index, Operator, value
+ continue
+ yield index, token, value
tokens = {
'root': [
- (r'\b(subclass|abstract|block|c(on(crete|stant)|lass)|domain'
- r'|ex(c(eption|lude)|port)|f(unction(al)?)|generic|handler'
- r'|i(n(herited|line|stance|terface)|mport)|library|m(acro|ethod)'
- r'|open|primary|sealed|si(deways|ngleton)|slot'
- r'|v(ariable|irtual))\b', Name.Builtin),
- (r'<\w+>', Keyword.Type),
+ # Whitespace
+ (r'\s+', Text),
+
+ # single line comment
(r'//.*?\n', Comment.Single),
- (r'/\*[\w\W]*?\*/', Comment.Multiline),
+
+ # lid header
+ (r'([A-Za-z0-9-]+)(:)([ \t]*)(.*(?:\n[ \t].+)*)',
+ bygroups(Name.Attribute, Operator, Text, String)),
+
+ ('', Text, 'code') # no header match, switch to code
+ ],
+ 'code': [
+ # Whitespace
+ (r'\s+', Text),
+
+ # single line comment
+ (r'//.*?\n', Comment.Single),
+
+ # multi-line comment
+ (r'/\*', Comment.Multiline, 'comment'),
+
+ # strings and characters
(r'"', String, 'string'),
(r"'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'", String.Char),
- (r'=>|\b(a(bove|fterwards)|b(e(gin|low)|y)|c(ase|leanup|reate)'
- r'|define|else(if)?|end|f(inally|or|rom)|i[fn]|l(et|ocal)|otherwise'
- r'|rename|s(elect|ignal)|t(hen|o)|u(n(less|til)|se)|wh(en|ile))\b',
- Keyword),
- (r'([ \t])([!\$%&\*\/:<=>\?~_^a-zA-Z0-9.+\-]*:)',
- bygroups(Text, Name.Variable)),
- (r'([ \t]*)(\S+[^:])([ \t]*)(\()([ \t]*)',
- bygroups(Text, Name.Function, Text, Punctuation, Text)),
- (r'-?[0-9.]+', Number),
- (r'[(),;]', Punctuation),
- (r'\$[a-zA-Z0-9-]+', Name.Constant),
- (r'[!$%&*/:<>=?~^.+\[\]{}-]+', Operator),
- (r'\s+', Text),
- (r'#"[a-zA-Z0-9-]+"', Keyword),
+
+ # binary integer
+ (r'#[bB][01]+', Number),
+
+ # octal integer
+ (r'#[oO][0-7]+', Number.Oct),
+
+ # floating point
+ (r'[-+]?(\d*\.\d+(e[-+]?\d+)?|\d+(\.\d*)?e[-+]?\d+)', Number.Float),
+
+ # decimal integer
+ (r'[-+]?\d+', Number.Integer),
+
+ # hex integer
+ (r'#[xX][0-9a-fA-F]+', Number.Hex),
+
+ # Macro parameters
+ (r'(\?' + valid_name + ')(:)(token|name|variable|expression|body|case-body|\*)',
+ bygroups(Name.Tag, Operator, Name.Builtin)),
+ (r'(\?)(:)(token|name|variable|expression|body|case-body|\*)',
+ bygroups(Name.Tag, Operator, Name.Builtin)),
+ (r'\?' + valid_name, Name.Tag),
+
+ # Punctuation
+ (r'(=>|::|#\(|#\[|##|\?|\?\?|\?=|[(){}\[\],\.;])', Punctuation),
+
+ # Most operators are picked up as names and then re-flagged.
+ # This one isn't valid in a name though, so we pick it up now.
+ (r':=', Operator),
+
+ # Pick up #t / #f before we match other stuff with #.
+ (r'#[tf]', Literal),
+
+ # #"foo" style keywords
+ (r'#"', String.Symbol, 'keyword'),
+
+ # #rest, #key, #all-keys, etc.
(r'#[a-zA-Z0-9-]+', Keyword),
- (r'#(\(|\[)', Punctuation),
- (r'[a-zA-Z0-9-_]+', Name.Variable),
+
+ # required-init-keyword: style keywords.
+ (valid_name + ':', Keyword),
+
+ # class names
+ (r'<' + valid_name + '>', Name.Class),
+
+ # define variable forms.
+ (r'\*' + valid_name + '\*', Name.Variable.Global),
+
+ # define constant forms.
+ (r'\$' + valid_name, Name.Constant),
+
+ # everything else. We re-flag some of these in the method above.
+ (valid_name, Name),
+ ],
+ 'comment': [
+ (r'[^*/]', Comment.Multiline),
+ (r'/\*', Comment.Multiline, '#push'),
+ (r'\*/', Comment.Multiline, '#pop'),
+ (r'[*/]', Comment.Multiline)
+ ],
+ 'keyword': [
+ (r'"', String.Symbol, '#pop'),
+ (r'[^\\"]+', String.Symbol), # all other characters
],
'string': [
(r'"', String, '#pop'),
@@ -1097,173 +1085,160 @@ class DylanLexer(RegexLexer):
(r'[^\\"\n]+', String), # all other characters
(r'\\\n', String), # line continuation
(r'\\', String), # stray backslash
- ],
+ ]
}
-class ObjectiveCLexer(RegexLexer):
+class DylanLidLexer(RegexLexer):
"""
- For Objective-C source code with preprocessor directives.
+ For Dylan LID (Library Interchange Definition) files.
+
+ *New in Pygments 1.6.*
"""
- name = 'Objective-C'
- aliases = ['objective-c', 'objectivec', 'obj-c', 'objc']
- # XXX: objc has .h files too :-/
- filenames = ['*.m']
- mimetypes = ['text/x-objective-c']
+ name = 'DylanLID'
+ aliases = ['dylan-lid', 'lid']
+ filenames = ['*.lid', '*.hdp']
+ mimetypes = ['text/x-dylan-lid']
- #: optional Comment or Whitespace
- _ws = r'(?:\s|//.*?\n|/[*].*?[*]/)+'
- #: only one /* */ style comment
- _ws1 = r':\s*/[*].*?[*]/\s*'
+ flags = re.IGNORECASE
tokens = {
- 'whitespace': [
- # preprocessor directives: without whitespace
- ('^#if\s+0', Comment.Preproc, 'if0'),
- ('^#', Comment.Preproc, 'macro'),
- # or with whitespace
- ('^(' + _ws1 + r')(#if\s+0)',
- bygroups(using(this), Comment.Preproc), 'if0'),
- ('^(' + _ws1 + ')(#)',
- bygroups(using(this), Comment.Preproc), 'macro'),
- (r'\n', Text),
- (r'\s+', Text),
- (r'\\\n', Text), # line continuation
- (r'//(\n|(.|\n)*?[^\\]\n)', Comment.Single),
- (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline),
- ],
- 'statements': [
- (r'(L|@)?"', String, 'string'),
- (r"(L|@)?'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'",
- String.Char),
- (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[lL]?', Number.Float),
- (r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float),
- (r'0x[0-9a-fA-F]+[Ll]?', Number.Hex),
- (r'0[0-7]+[Ll]?', Number.Oct),
- (r'\d+[Ll]?', Number.Integer),
- (r'[~!%^&*+=|?:<>/-]', Operator),
- (r'[()\[\],.]', Punctuation),
- (r'(auto|break|case|const|continue|default|do|else|enum|extern|'
- r'for|goto|if|register|restricted|return|sizeof|static|struct|'
- r'switch|typedef|union|volatile|virtual|while|in|@selector|'
- r'@private|@protected|@public|@encode|'
- r'@synchronized|@try|@throw|@catch|@finally|@end|@property|'
- r'@synthesize|@dynamic|@optional)\b', Keyword),
- (r'(int|long|float|short|double|char|unsigned|signed|void|'
- r'id|BOOL|IBOutlet|IBAction|SEL)\b', Keyword.Type),
- (r'(_{0,2}inline|naked|restrict|thread|typename)\b',
- Keyword.Reserved),
- (r'__(asm|int8|based|except|int16|stdcall|cdecl|fastcall|int32|'
- r'declspec|finally|int64|try|leave)\b', Keyword.Reserved),
- (r'(TRUE|FALSE|nil|NULL)\b', Name.Builtin),
- ('[a-zA-Z$_][a-zA-Z0-9$_]*:(?!:)', Name.Label),
- ('[a-zA-Z$_][a-zA-Z0-9$_]*', Name),
- (r'(@interface|@implementation)(\s+)', bygroups(Keyword, Text),
- ('#pop', 'classname')),
- (r'(@class|@protocol)(\s+)', bygroups(Keyword, Text),
- ('#pop', 'forward_classname')),
- ],
'root': [
- include('whitespace'),
- # functions
- (r'((?:[a-zA-Z0-9_*\s])+?(?:\s|[*]))' # return arguments
- r'([a-zA-Z$_][a-zA-Z0-9$_]*)' # method name
- r'(\s*\([^;]*?\))' # signature
- r'(' + _ws + r')?({)',
- bygroups(using(this), Name.Function,
- using(this), Text, Punctuation),
- 'function'),
- # methods
- (r'^([-+])(\s*)' # method marker
- r'(\(.*?\))?(\s*)' # return type
- r'([a-zA-Z$_][a-zA-Z0-9$_]*:?)', # begin of method name
- bygroups(Keyword, Text, using(this),
- Text, Name.Function),
- 'method'),
- # function declarations
- (r'((?:[a-zA-Z0-9_*\s])+?(?:\s|[*]))' # return arguments
- r'([a-zA-Z$_][a-zA-Z0-9$_]*)' # method name
- r'(\s*\([^;]*?\))' # signature
- r'(' + _ws + r')?(;)',
- bygroups(using(this), Name.Function,
- using(this), Text, Punctuation)),
- (r'(@interface|@implementation)(\s+)', bygroups(Keyword, Text),
- 'classname'),
- (r'(@class|@protocol)(\s+)', bygroups(Keyword, Text),
- 'forward_classname'),
- (r'(\s*)(@end)(\s*)', bygroups(Text, Keyword, Text)),
- ('', Text, 'statement'),
- ],
- 'classname' : [
- # interface definition that inherits
- ('([a-zA-Z$_][a-zA-Z0-9$_]*)(\s*:\s*)([a-zA-Z$_][a-zA-Z0-9$_]*)?',
- bygroups(Name.Class, Text, Name.Class), '#pop'),
- # interface definition for a category
- ('([a-zA-Z$_][a-zA-Z0-9$_]*)(\s*)(\([a-zA-Z$_][a-zA-Z0-9$_]*\))',
- bygroups(Name.Class, Text, Name.Label), '#pop'),
- # simple interface / implementation
- ('([a-zA-Z$_][a-zA-Z0-9$_]*)', Name.Class, '#pop')
- ],
- 'forward_classname' : [
- ('([a-zA-Z$_][a-zA-Z0-9$_]*)(\s*,\s*)',
- bygroups(Name.Class, Text), 'forward_classname'),
- ('([a-zA-Z$_][a-zA-Z0-9$_]*)(\s*;?)',
- bygroups(Name.Class, Text), '#pop')
- ],
- 'statement' : [
- include('whitespace'),
- include('statements'),
- ('[{}]', Punctuation),
- (';', Punctuation, '#pop'),
- ],
- 'function': [
- include('whitespace'),
- include('statements'),
- (';', Punctuation),
- ('{', Punctuation, '#push'),
- ('}', Punctuation, '#pop'),
- ],
- 'method': [
- include('whitespace'),
- (r'(\(.*?\))([a-zA-Z$_][a-zA-Z0-9$_]*)', bygroups(using(this),
- Name.Variable)),
- (r'[a-zA-Z$_][a-zA-Z0-9$_]*:', Name.Function),
- (';', Punctuation, '#pop'),
- ('{', Punctuation, 'function'),
- ('', Text, '#pop'),
- ],
- 'string': [
- (r'"', String, '#pop'),
- (r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape),
- (r'[^\\"\n]+', String), # all other characters
- (r'\\\n', String), # line continuation
- (r'\\', String), # stray backslash
- ],
- 'macro': [
- (r'[^/\n]+', Comment.Preproc),
- (r'/[*](.|\n)*?[*]/', Comment.Multiline),
- (r'//.*?\n', Comment.Single, '#pop'),
- (r'/', Comment.Preproc),
- (r'(?<=\\)\n', Comment.Preproc),
- (r'\n', Comment.Preproc, '#pop'),
- ],
- 'if0': [
- (r'^\s*#if.*?(?<!\\)\n', Comment.Preproc, '#push'),
- (r'^\s*#endif.*?(?<!\\)\n', Comment.Preproc, '#pop'),
- (r'.*?\n', Comment),
+ # Whitespace
+ (r'\s+', Text),
+
+ # single line comment
+ (r'//.*?\n', Comment.Single),
+
+ # lid header
+ (r'(.*?)(:)([ \t]*)(.*(?:\n[ \t].+)*)',
+ bygroups(Name.Attribute, Operator, Text, String)),
]
}
- def analyse_text(text):
- if '@import' in text or '@interface' in text or \
- '@implementation' in text:
- return True
- elif '@"' in text: # strings
- return True
- elif re.match(r'\[[a-zA-Z0-9.]:', text): # message
- return True
- return False
+def objective(baselexer):
+ """
+ Generate a subclass of baselexer that accepts the Objective-C syntax
+ extensions.
+ """
+
+ # Have to be careful not to accidentally match JavaDoc/Doxygen syntax here,
+ # since that's quite common in ordinary C/C++ files. It's OK to match
+ # JavaDoc/Doxygen keywords that only apply to Objective-C, mind.
+ #
+ # The upshot of this is that we CANNOT match @class or @interface
+ _oc_keywords = re.compile(r'@(?:end|implementation|protocol)')
+
+ # Matches [ <ws>? identifier <ws> ( identifier <ws>? ] | identifier? : )
+ # (note the identifier is *optional* when there is a ':'!)
+ _oc_message = re.compile(r'\[\s*[a-zA-Z_][a-zA-Z0-9_]*\s+'
+ r'(?:[a-zA-Z_][a-zA-Z0-9_]*\s*\]|'
+ r'(?:[a-zA-Z_][a-zA-Z0-9_]*)?:)')
+
+ class GeneratedObjectiveCVariant(baselexer):
+ """
+ Implements Objective-C syntax on top of an existing C family lexer.
+ """
+
+ tokens = {
+ 'statements': [
+ (r'@"', String, 'string'),
+ (r"@'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'",
+ String.Char),
+ (r'@(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[lL]?', Number.Float),
+ (r'@(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float),
+ (r'@0x[0-9a-fA-F]+[Ll]?', Number.Hex),
+ (r'@0[0-7]+[Ll]?', Number.Oct),
+ (r'@\d+[Ll]?', Number.Integer),
+ (r'(in|@selector|@private|@protected|@public|@encode|'
+ r'@synchronized|@try|@throw|@catch|@finally|@end|@property|'
+ r'@synthesize|@dynamic|@optional)\b', Keyword),
+ (r'(id|Class|IMP|SEL|BOOL|IBOutlet|IBAction|unichar)\b',
+ Keyword.Type),
+ (r'@(true|false|YES|NO)\n', Name.Builtin),
+ (r'(YES|NO|nil)\b', Name.Builtin),
+ (r'(@interface|@implementation)(\s+)', bygroups(Keyword, Text),
+ ('#pop', 'oc_classname')),
+ (r'(@class|@protocol)(\s+)', bygroups(Keyword, Text),
+ ('#pop', 'oc_forward_classname')),
+ inherit,
+ ],
+ 'oc_classname' : [
+ # interface definition that inherits
+ ('([a-zA-Z$_][a-zA-Z0-9$_]*)(\s*:\s*)([a-zA-Z$_][a-zA-Z0-9$_]*)?',
+ bygroups(Name.Class, Text, Name.Class), '#pop'),
+ # interface definition for a category
+ ('([a-zA-Z$_][a-zA-Z0-9$_]*)(\s*)(\([a-zA-Z$_][a-zA-Z0-9$_]*\))',
+ bygroups(Name.Class, Text, Name.Label), '#pop'),
+ # simple interface / implementation
+ ('([a-zA-Z$_][a-zA-Z0-9$_]*)', Name.Class, '#pop')
+ ],
+ 'oc_forward_classname' : [
+ ('([a-zA-Z$_][a-zA-Z0-9$_]*)(\s*,\s*)',
+ bygroups(Name.Class, Text), 'oc_forward_classname'),
+ ('([a-zA-Z$_][a-zA-Z0-9$_]*)(\s*;?)',
+ bygroups(Name.Class, Text), '#pop')
+ ],
+ 'root': [
+ # methods
+ (r'^([-+])(\s*)' # method marker
+ r'(\(.*?\))?(\s*)' # return type
+ r'([a-zA-Z$_][a-zA-Z0-9$_]*:?)', # begin of method name
+ bygroups(Keyword, Text, using(this),
+ Text, Name.Function),
+ 'method'),
+ inherit,
+ ],
+ 'method': [
+ include('whitespace'),
+ # TODO unsure if ellipses are allowed elsewhere, see
+ # discussion in Issue 789
+ (r',', Punctuation),
+ (r'\.\.\.', Punctuation),
+ (r'(\(.*?\))([a-zA-Z$_][a-zA-Z0-9$_]*)', bygroups(using(this),
+ Name.Variable)),
+ (r'[a-zA-Z$_][a-zA-Z0-9$_]*:', Name.Function),
+ (';', Punctuation, '#pop'),
+ ('{', Punctuation, 'function'),
+ ('', Text, '#pop'),
+ ],
+ }
+
+ def analyse_text(text):
+ if _oc_keywords.search(text):
+ return 1.0
+ elif '@"' in text: # strings
+ return 0.8
+ elif _oc_message.search(text):
+ return 0.8
+ return 0
+
+ return GeneratedObjectiveCVariant
+
+
+class ObjectiveCLexer(objective(CLexer)):
+ """
+ For Objective-C source code with preprocessor directives.
+ """
+
+ name = 'Objective-C'
+ aliases = ['objective-c', 'objectivec', 'obj-c', 'objc']
+ filenames = ['*.m', '*.h']
+ mimetypes = ['text/x-objective-c']
+ priority = 0.05 # Lower than C
+
+
+class ObjectiveCppLexer(objective(CppLexer)):
+ """
+ For Objective-C++ source code with preprocessor directives.
+ """
+
+ name = 'Objective-C++'
+ aliases = ['objective-c++', 'objectivec++', 'obj-c++', 'objc++']
+ filenames = ['*.mm', '*.hh']
+ mimetypes = ['text/x-objective-c++']
+ priority = 0.05 # Lower than C++
class FortranLexer(RegexLexer):
@@ -1450,7 +1425,8 @@ class PrologLexer(RegexLexer):
(r"'(?:''|[^'])*'", String.Atom), # quoted atom
# Needs to not be followed by an atom.
#(r'=(?=\s|[a-zA-Z\[])', Operator),
- (r'(is|<|>|=<|>=|==|=:=|=|/|//|\*|\+|-)(?=\s|[a-zA-Z0-9\[])',
+ (r'is\b', Operator),
+ (r'(<|>|=<|>=|==|=:=|=|/|//|\*|\+|-)(?=\s|[a-zA-Z0-9\[])',
Operator),
(r'(mod|div|not)\b', Operator),
(r'_', Keyword), # The don't-care variable
@@ -2937,13 +2913,13 @@ class RustLexer(RegexLexer):
(r'/[*](.|\n)*?[*]/', Comment.Multiline),
# Keywords
- (r'(alt|as|assert|be|break|check|claim|class|const'
- r'|cont|copy|crust|do|else|enum|export|fail'
- r'|false|fn|for|if|iface|impl|import|let|log'
- r'|loop|mod|mut|native|pure|resource|ret|true'
- r'|type|unsafe|use|white|note|bind|prove|unchecked'
- r'|with|syntax|u8|u16|u32|u64|i8|i16|i32|i64|uint'
- r'|int|f32|f64)\b', Keyword),
+ (r'(as|assert|break|const'
+ r'|copy|do|else|enum|extern|fail'
+ r'|false|fn|for|if|impl|let|log'
+ r'|loop|match|mod|move|mut|once|priv|pub|pure'
+ r'|ref|return|static|struct|trait|true|type|unsafe|use|while'
+ r'|u8|u16|u32|u64|i8|i16|i32|i64|uint'
+ r'|int|float|f32|f64|str)\b', Keyword),
# Character Literal
(r"""'(\\['"\\nrt]|\\x[0-9a-fA-F]{2}|\\[0-7]{1,3}"""
@@ -2972,8 +2948,8 @@ class RustLexer(RegexLexer):
(r'#\[', Comment.Preproc, 'attribute['),
(r'#\(', Comment.Preproc, 'attribute('),
# Macros
- (r'#[A-Za-z_][A-Za-z0-9_]*\[', Comment.Preproc, 'attribute['),
- (r'#[A-Za-z_][A-Za-z0-9_]*\(', Comment.Preproc, 'attribute('),
+ (r'[A-Za-z_][A-Za-z0-9_]*!\[', Comment.Preproc, 'attribute['),
+ (r'[A-Za-z_][A-Za-z0-9_]*!\(', Comment.Preproc, 'attribute('),
],
'number_lit': [
(r'(([ui](8|16|32|64)?)|(f(32|64)?))?', Keyword, '#pop'),
@@ -3003,7 +2979,7 @@ class RustLexer(RegexLexer):
}
-class CUDALexer(CLexer):
+class CudaLexer(CLexer):
"""
For NVIDIA `CUDAâ„¢ <http://developer.nvidia.com/category/zone/cuda-zone>`_
source.
@@ -3050,3 +3026,338 @@ class CUDALexer(CLexer):
elif value in self.functions:
token = Name.Function
yield index, token, value
+
+
+class MonkeyLexer(RegexLexer):
+ """
+ For
+ `Monkey <https://en.wikipedia.org/wiki/Monkey_(programming_language)>`_
+ source code.
+
+ *New in Pygments 1.6.*
+ """
+
+ name = 'Monkey'
+ aliases = ['monkey']
+ filenames = ['*.monkey']
+ mimetypes = ['text/x-monkey']
+
+ name_variable = r'[a-z_][a-zA-Z0-9_]*'
+ name_function = r'[A-Z][a-zA-Z0-9_]*'
+ name_constant = r'[A-Z_][A-Z0-9_]*'
+ name_class = r'[A-Z][a-zA-Z0-9_]*'
+ name_module = r'[a-z0-9_]*'
+
+ keyword_type = r'(?:Int|Float|String|Bool|Object|Array|Void)'
+ # ? == Bool // % == Int // # == Float // $ == String
+ keyword_type_special = r'[?%#$]'
+
+ flags = re.MULTILINE
+
+ tokens = {
+ 'root': [
+ #Text
+ (r'\s+', Text),
+ # Comments
+ (r"'.*", Comment),
+ (r'(?i)^#rem\b', Comment.Multiline, 'comment'),
+ # preprocessor directives
+ (r'(?i)^(?:#If|#ElseIf|#Else|#EndIf|#End|#Print|#Error)\b', Comment.Preproc),
+ # preprocessor variable (any line starting with '#' that is not a directive)
+ (r'^#', Comment.Preproc, 'variables'),
+ # String
+ ('"', String.Double, 'string'),
+ # Numbers
+ (r'[0-9]+\.[0-9]*(?!\.)', Number.Float),
+ (r'\.[0-9]+(?!\.)', Number.Float),
+ (r'[0-9]+', Number.Integer),
+ (r'\$[0-9a-fA-Z]+', Number.Hex),
+ (r'\%[10]+', Number), # Binary
+ # Native data types
+ (r'\b%s\b' % keyword_type, Keyword.Type),
+ # Exception handling
+ (r'(?i)\b(?:Try|Catch|Throw)\b', Keyword.Reserved),
+ (r'Throwable', Name.Exception),
+ # Builtins
+ (r'(?i)\b(?:Null|True|False)\b', Name.Builtin),
+ (r'(?i)\b(?:Self|Super)\b', Name.Builtin.Pseudo),
+ (r'\b(?:HOST|LANG|TARGET|CONFIG)\b', Name.Constant),
+ # Keywords
+ (r'(?i)^(Import)(\s+)(.*)(\n)', bygroups(Keyword.Namespace, Text, Name.Namespace, Text)),
+ (r'(?i)^Strict\b.*\n', Keyword.Reserved),
+ (r'(?i)(Const|Local|Global|Field)(\s+)', bygroups(Keyword.Declaration, Text), 'variables'),
+ (r'(?i)(New|Class|Interface|Extends|Implements)(\s+)', bygroups(Keyword.Reserved, Text), 'classname'),
+ (r'(?i)(Function|Method)(\s+)', bygroups(Keyword.Reserved, Text), 'funcname'),
+ (r'(?i)(?:End|Return|Public|Private|Extern|Property|Final|Abstract)\b', Keyword.Reserved),
+ # Flow Control stuff
+ (r'(?i)(?:If|Then|Else|ElseIf|EndIf|'
+ r'Select|Case|Default|'
+ r'While|Wend|'
+ r'Repeat|Until|Forever|'
+ r'For|To|Until|Step|EachIn|Next|'
+ r'Exit|Continue)\s+', Keyword.Reserved),
+ # not used yet
+ (r'(?i)\b(?:Module|Inline)\b', Keyword.Reserved),
+ # Array
+ (r'[\[\]]', Punctuation),
+ # Other
+ (r'<=|>=|<>|\*=|/=|\+=|-=|&=|~=|\|=|[-&*/^+=<>|~]', Operator),
+ (r'(?i)(?:Not|Mod|Shl|Shr|And|Or)', Operator.Word),
+ (r'[\(\){}!#,.:]', Punctuation),
+ # catch the rest
+ (r'%s\b' % name_constant, Name.Constant),
+ (r'%s\b' % name_function, Name.Function),
+ (r'%s\b' % name_variable, Name.Variable),
+ ],
+ 'funcname': [
+ (r'(?i)%s\b' % name_function, Name.Function),
+ (r':', Punctuation, 'classname'),
+ (r'\s+', Text),
+ (r'\(', Punctuation, 'variables'),
+ (r'\)', Punctuation, '#pop')
+ ],
+ 'classname': [
+ (r'%s\.' % name_module, Name.Namespace),
+ (r'%s\b' % keyword_type, Keyword.Type),
+ (r'%s\b' % name_class, Name.Class),
+ # array (of given size)
+ (r'(\[)(\s*)(\d*)(\s*)(\])',
+ bygroups(Punctuation, Text, Number.Integer, Text, Punctuation)),
+ # generics
+ (r'\s+(?!<)', Text, '#pop'),
+ (r'<', Punctuation, '#push'),
+ (r'>', Punctuation, '#pop'),
+ (r'\n', Text, '#pop'),
+ (r'', Text, '#pop')
+ ],
+ 'variables': [
+ (r'%s\b' % name_constant, Name.Constant),
+ (r'%s\b' % name_variable, Name.Variable),
+ (r'%s' % keyword_type_special, Keyword.Type),
+ (r'\s+', Text),
+ (r':', Punctuation, 'classname'),
+ (r',', Punctuation, '#push'),
+ (r'', Text, '#pop')
+ ],
+ 'string': [
+ (r'[^"~]+', String.Double),
+ (r'~q|~n|~r|~t|~z|~~', String.Escape),
+ (r'"', String.Double, '#pop'),
+ ],
+ 'comment' : [
+ (r'(?i)^#rem.*?', Comment.Multiline, "#push"),
+ (r'(?i)^#end.*?', Comment.Multiline, "#pop"),
+ (r'\n', Comment.Multiline),
+ (r'.+', Comment.Multiline),
+ ],
+ }
+
+
+class CobolLexer(RegexLexer):
+ """
+ Lexer for OpenCOBOL code.
+
+ *New in Pygments 1.6.*
+ """
+ name = 'COBOL'
+ aliases = ['cobol']
+ filenames = ['*.cob', '*.COB', '*.cpy', '*.CPY']
+ mimetypes = ['text/x-cobol']
+ flags = re.IGNORECASE | re.MULTILINE
+
+ # Data Types: by PICTURE and USAGE
+ # Operators: **, *, +, -, /, <, >, <=, >=, =, <>
+ # Logical (?): NOT, AND, OR
+
+ # Reserved words:
+ # http://opencobol.add1tocobol.com/#reserved-words
+ # Intrinsics:
+ # http://opencobol.add1tocobol.com/#does-opencobol-implement-any-intrinsic-functions
+
+ tokens = {
+ 'root': [
+ include('comment'),
+ include('strings'),
+ include('core'),
+ include('nums'),
+ (r'[a-z0-9]([_a-z0-9\-]*[a-z0-9]+)?', Name.Variable),
+ # (r'[\s]+', Text),
+ (r'[ \t]+', Text),
+ ],
+ 'comment': [
+ (r'(^.{6}[*/].*\n|^.{6}|\*>.*\n)', Comment),
+ ],
+ 'core': [
+ # Figurative constants
+ (r'(^|(?<=[^0-9a-z_\-]))(ALL\s+)?'
+ r'((ZEROES)|(HIGH-VALUE|LOW-VALUE|QUOTE|SPACE|ZERO)(S)?)'
+ r'\s*($|(?=[^0-9a-z_\-]))',
+ Name.Constant),
+
+ # Reserved words STATEMENTS and other bolds
+ (r'(^|(?<=[^0-9a-z_\-]))'
+ r'(ACCEPT|ADD|ALLOCATE|CALL|CANCEL|CLOSE|COMPUTE|'
+ r'CONFIGURATION|CONTINUE|'
+ r'DATA|DELETE|DISPLAY|DIVIDE|DIVISION|ELSE|END|END-ACCEPT|'
+ r'END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DISPLAY|'
+ r'END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|'
+ r'END-PERFORM|END-READ|END-RETURN|END-REWRITE|END-SEARCH|'
+ r'END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|'
+ r'ENVIRONMENT|EVALUATE|EXIT|FD|FILE|FILE-CONTROL|FOREVER|'
+ r'FREE|GENERATE|GO|GOBACK|'
+ r'IDENTIFICATION|IF|INITIALIZE|'
+ r'INITIATE|INPUT-OUTPUT|INSPECT|INVOKE|I-O-CONTROL|LINKAGE|'
+ r'LOCAL-STORAGE|MERGE|MOVE|MULTIPLY|OPEN|'
+ r'PERFORM|PROCEDURE|PROGRAM-ID|RAISE|READ|RELEASE|RESUME|'
+ r'RETURN|REWRITE|SCREEN|'
+ r'SD|SEARCH|SECTION|SET|SORT|START|STOP|STRING|SUBTRACT|'
+ r'SUPPRESS|TERMINATE|THEN|UNLOCK|UNSTRING|USE|VALIDATE|'
+ r'WORKING-STORAGE|WRITE)'
+ r'\s*($|(?=[^0-9a-z_\-]))', Keyword.Reserved),
+
+ # Reserved words
+ (r'(^|(?<=[^0-9a-z_\-]))'
+ r'(ACCESS|ADDRESS|ADVANCING|AFTER|ALL|'
+ r'ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|'
+ r'ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE'
+ r'ANY|ARE|AREA|AREAS|ARGUMENT-NUMBER|ARGUMENT-VALUE|AS|'
+ r'ASCENDING|ASSIGN|AT|AUTO|AUTO-SKIP|AUTOMATIC|AUTOTERMINATE|'
+ r'BACKGROUND-COLOR|BASED|BEEP|BEFORE|BELL|'
+ r'BLANK|'
+ r'BLINK|BLOCK|BOTTOM|BY|BYTE-LENGTH|CHAINING|'
+ r'CHARACTER|CHARACTERS|CLASS|CODE|CODE-SET|COL|COLLATING|'
+ r'COLS|COLUMN|COLUMNS|COMMA|COMMAND-LINE|COMMIT|COMMON|'
+ r'CONSTANT|CONTAINS|CONTENT|CONTROL|'
+ r'CONTROLS|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRT|'
+ r'CURRENCY|CURSOR|CYCLE|DATE|DAY|DAY-OF-WEEK|DE|DEBUGGING|'
+ r'DECIMAL-POINT|DECLARATIVES|DEFAULT|DELIMITED|'
+ r'DELIMITER|DEPENDING|DESCENDING|DETAIL|DISK|'
+ r'DOWN|DUPLICATES|DYNAMIC|EBCDIC|'
+ r'ENTRY|ENVIRONMENT-NAME|ENVIRONMENT-VALUE|EOL|EOP|'
+ r'EOS|ERASE|ERROR|ESCAPE|EXCEPTION|'
+ r'EXCLUSIVE|EXTEND|EXTERNAL|'
+ r'FILE-ID|FILLER|FINAL|FIRST|FIXED|FLOAT-LONG|FLOAT-SHORT|'
+ r'FOOTING|FOR|FOREGROUND-COLOR|FORMAT|FROM|FULL|FUNCTION|'
+ r'FUNCTION-ID|GIVING|GLOBAL|GROUP|'
+ r'HEADING|HIGHLIGHT|I-O|ID|'
+ r'IGNORE|IGNORING|IN|INDEX|INDEXED|INDICATE|'
+ r'INITIAL|INITIALIZED|INPUT|'
+ r'INTO|INTRINSIC|INVALID|IS|JUST|JUSTIFIED|KEY|LABEL|'
+ r'LAST|LEADING|LEFT|LENGTH|LIMIT|LIMITS|LINAGE|'
+ r'LINAGE-COUNTER|LINE|LINES|LOCALE|LOCK|'
+ r'LOWLIGHT|MANUAL|MEMORY|MINUS|MODE|'
+ r'MULTIPLE|NATIONAL|NATIONAL-EDITED|NATIVE|'
+ r'NEGATIVE|NEXT|NO|NULL|NULLS|NUMBER|NUMBERS|NUMERIC|'
+ r'NUMERIC-EDITED|OBJECT-COMPUTER|OCCURS|OF|OFF|OMITTED|ON|ONLY|'
+ r'OPTIONAL|ORDER|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|'
+ r'OVERLINE|PACKED-DECIMAL|PADDING|PAGE|PARAGRAPH|'
+ r'PLUS|POINTER|POSITION|POSITIVE|PRESENT|PREVIOUS|'
+ r'PRINTER|PRINTING|PROCEDURE-POINTER|PROCEDURES|'
+ r'PROCEED|PROGRAM|PROGRAM-POINTER|PROMPT|QUOTE|'
+ r'QUOTES|RANDOM|RD|RECORD|RECORDING|RECORDS|RECURSIVE|'
+ r'REDEFINES|REEL|REFERENCE|RELATIVE|REMAINDER|REMOVAL|'
+ r'RENAMES|REPLACING|REPORT|REPORTING|REPORTS|REPOSITORY|'
+ r'REQUIRED|RESERVE|RETURNING|REVERSE-VIDEO|REWIND|'
+ r'RIGHT|ROLLBACK|ROUNDED|RUN|SAME|SCROLL|'
+ r'SECURE|SEGMENT-LIMIT|SELECT|SENTENCE|SEPARATE|'
+ r'SEQUENCE|SEQUENTIAL|SHARING|SIGN|SIGNED|SIGNED-INT|'
+ r'SIGNED-LONG|SIGNED-SHORT|SIZE|SORT-MERGE|SOURCE|'
+ r'SOURCE-COMPUTER|SPECIAL-NAMES|STANDARD|'
+ r'STANDARD-1|STANDARD-2|STATUS|SUM|'
+ r'SYMBOLIC|SYNC|SYNCHRONIZED|TALLYING|TAPE|'
+ r'TEST|THROUGH|THRU|TIME|TIMES|TO|TOP|TRAILING|'
+ r'TRANSFORM|TYPE|UNDERLINE|UNIT|UNSIGNED|'
+ r'UNSIGNED-INT|UNSIGNED-LONG|UNSIGNED-SHORT|UNTIL|UP|'
+ r'UPDATE|UPON|USAGE|USING|VALUE|VALUES|VARYING|WAIT|WHEN|'
+ r'WITH|WORDS|YYYYDDD|YYYYMMDD)'
+ r'\s*($|(?=[^0-9a-z_\-]))', Keyword.Pseudo),
+
+ # inactive reserved words
+ (r'(^|(?<=[^0-9a-z_\-]))'
+ r'(ACTIVE-CLASS|ALIGNED|ANYCASE|ARITHMETIC|ATTRIBUTE|B-AND|'
+ r'B-NOT|B-OR|B-XOR|BIT|BOOLEAN|CD|CENTER|CF|CH|CHAIN|CLASS-ID|'
+ r'CLASSIFICATION|COMMUNICATION|CONDITION|DATA-POINTER|'
+ r'DESTINATION|DISABLE|EC|EGI|EMI|ENABLE|END-RECEIVE|'
+ r'ENTRY-CONVENTION|EO|ESI|EXCEPTION-OBJECT|EXPANDS|FACTORY|'
+ r'FLOAT-BINARY-16|FLOAT-BINARY-34|FLOAT-BINARY-7|'
+ r'FLOAT-DECIMAL-16|FLOAT-DECIMAL-34|FLOAT-EXTENDED|FORMAT|'
+ r'FUNCTION-POINTER|GET|GROUP-USAGE|IMPLEMENTS|INFINITY|'
+ r'INHERITS|INTERFACE|INTERFACE-ID|INVOKE|LC_ALL|LC_COLLATE|'
+ r'LC_CTYPE|LC_MESSAGES|LC_MONETARY|LC_NUMERIC|LC_TIME|'
+ r'LINE-COUNTER|MESSAGE|METHOD|METHOD-ID|NESTED|NONE|NORMAL|'
+ r'OBJECT|OBJECT-REFERENCE|OPTIONS|OVERRIDE|PAGE-COUNTER|PF|PH|'
+ r'PROPERTY|PROTOTYPE|PURGE|QUEUE|RAISE|RAISING|RECEIVE|'
+ r'RELATION|REPLACE|REPRESENTS-NOT-A-NUMBER|RESET|RESUME|RETRY|'
+ r'RF|RH|SECONDS|SEGMENT|SELF|SEND|SOURCES|STATEMENT|STEP|'
+ r'STRONG|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUPER|SYMBOL|'
+ r'SYSTEM-DEFAULT|TABLE|TERMINAL|TEXT|TYPEDEF|UCS-4|UNIVERSAL|'
+ r'USER-DEFAULT|UTF-16|UTF-8|VAL-STATUS|VALID|VALIDATE|'
+ r'VALIDATE-STATUS)\s*($|(?=[^0-9a-z_\-]))', Error),
+
+ # Data Types
+ (r'(^|(?<=[^0-9a-z_\-]))'
+ r'(PIC\s+.+?(?=(\s|\.\s))|PICTURE\s+.+?(?=(\s|\.\s))|'
+ r'(COMPUTATIONAL)([-][1-5X])?|(COMP)([-][1-5X])?|'
+ r'BINARY-C-LONG|'
+ r'BINARY-CHAR|BINARY-DOUBLE|BINARY-LONG|BINARY-SHORT|'
+ r'BINARY)\s*($|(?=[^0-9a-z_\-]))', Keyword.Type),
+
+ # Operators
+ (r'(\*\*|\*|\+|-|/|<=|>=|<|>|==|/=|=)', Operator),
+
+ # (r'(::)', Keyword.Declaration),
+
+ (r'([(),;:&%.])', Punctuation),
+
+ # Intrinsics
+ (r'(^|(?<=[^0-9a-z_\-]))(ABS|ACOS|ANNUITY|ASIN|ATAN|BYTE-LENGTH|CHAR|COMBINED-DATETIME|CONCATENATE|COS|'
+ r'CURRENT-DATE|DATE-OF-INTEGER|DATE-TO-YYYYMMDD|DAY-OF-INTEGER|DAY-TO-YYYYDDD|E|'
+ r'EXCEPTION-FILE|EXCEPTION-LOCATION|EXCEPTION-STATEMENT|EXCEPTION-STATUS|EXP|'
+ r'EXP10|FACTORIAL|FRACTION-PART|INTEGER|INTEGER-OF-DATE|INTEGER-OF-DAY|'
+ r'INTEGER-PART|LENGTH|LOCALE-DATE|LOCALE-TIME|LOCALE-TIME-FROM-SECONDS|LOG|LOG10|'
+ r'LOWER-CASE|MAX|MEAN|MEDIAN|MIDRANGE|MIN|MOD|NUMVAL|NUMVAL-C|ORD|ORD-MAX|ORD-MIN|'
+ r'PI|PRESENT-VALUE|RANDOM|RANGE|REM|REVERSE|SECONDS-FROM-FORMATTED-TIME|'
+ r'SECONDS-PAST-MIDNIGHT|SIGN|SIN|SQRT|STANDARD-DEVIATION|STORED-CHAR-LENGTH|'
+ r'SUBSTITUTE|SUBSTITUTE-CASE|SUM|TAN|TEST-DATE-YYYYMMDD|TEST-DAY-YYYYDDD|TRIM|'
+ r'UPPER-CASE|VARIANCE|WHEN-COMPILED|YEAR-TO-YYYY)\s*($|(?=[^0-9a-z_\-]))', Name.Function),
+
+ # Booleans
+ (r'(^|(?<=[^0-9a-z_\-]))(true|false)\s*($|(?=[^0-9a-z_\-]))', Name.Builtin),
+ # Comparing Operators
+ (r'(^|(?<=[^0-9a-z_\-]))(equal|equals|ne|lt|le|gt|ge|'
+ r'greater|less|than|not|and|or)\s*($|(?=[^0-9a-z_\-]))', Operator.Word),
+ ],
+
+ # \"[^\"\n]*\"|\'[^\'\n]*\'
+ 'strings': [
+ # apparently strings can be delimited by EOL if they are continued
+ # in the next line
+ (r'"[^"\n]*("|\n)', String.Double),
+ (r"'[^'\n]*('|\n)", String.Single),
+ ],
+
+ 'nums': [
+ (r'\d+(\s*|\.$|$)', Number.Integer),
+ (r'[+-]?\d*\.\d+([eE][-+]?\d+)?', Number.Float),
+ (r'[+-]?\d+\.\d*([eE][-+]?\d+)?', Number.Float),
+ ],
+ }
+
+
+class CobolFreeformatLexer(CobolLexer):
+ """
+ Lexer for Free format OpenCOBOL code.
+
+ *New in Pygments 1.6.*
+ """
+ name = 'COBOLFree'
+ aliases = ['cobolfree']
+ filenames = ['*.cbl', '*.CBL']
+ mimetypes = []
+ flags = re.IGNORECASE | re.MULTILINE
+
+ tokens = {
+ 'comment': [
+ (r'(\*>.*\n|^\w*\*.*$)', Comment),
+ ],
+ }
diff --git a/pygments/lexers/dalvik.py b/pygments/lexers/dalvik.py
new file mode 100644
index 00000000..de9b11fa
--- /dev/null
+++ b/pygments/lexers/dalvik.py
@@ -0,0 +1,104 @@
+# -*- coding: utf-8 -*-
+"""
+ pygments.lexers.dalvik
+ ~~~~~~~~~~~~~~~~~~~~~~
+
+ Pygments lexers for Dalvik VM-related languages.
+
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+from pygments.lexer import RegexLexer, include, bygroups
+from pygments.token import Keyword, Text, Comment, Name, String, Number, \
+ Punctuation
+
+__all__ = ['SmaliLexer']
+
+
+class SmaliLexer(RegexLexer):
+ """
+ For `Smali <http://code.google.com/p/smali/>`_ (Android/Dalvik) assembly
+ code.
+
+ *New in Pygments 1.6.*
+ """
+ name = 'Smali'
+ aliases = ['smali']
+ filenames = ['*.smali']
+ mimetypes = ['text/smali']
+
+ tokens = {
+ 'root': [
+ include('comment'),
+ include('label'),
+ include('field'),
+ include('method'),
+ include('class'),
+ include('directive'),
+ include('access-modifier'),
+ include('instruction'),
+ include('literal'),
+ include('punctuation'),
+ include('type'),
+ include('whitespace')
+ ],
+ 'directive': [
+ (r'^[ \t]*\.(class|super|implements|field|subannotation|annotation|'
+ r'enum|method|registers|locals|array-data|packed-switch|'
+ r'sparse-switch|catchall|catch|line|parameter|local|prologue|'
+ r'epilogue|source)', Keyword),
+ (r'^[ \t]*\.end (field|subannotation|annotation|method|array-data|'
+ 'packed-switch|sparse-switch|parameter|local)', Keyword),
+ (r'^[ \t]*\.restart local', Keyword),
+ ],
+ 'access-modifier': [
+ (r'(public|private|protected|static|final|synchronized|bridge|'
+ r'varargs|native|abstract|strictfp|synthetic|constructor|'
+ r'declared-synchronized|interface|enum|annotation|volatile|'
+ r'transient)', Keyword),
+ ],
+ 'whitespace': [
+ (r'\n', Text),
+ (r'\s+', Text),
+ ],
+ 'instruction': [
+ (r'\b[vp]\d+\b', Name.Builtin), # registers
+ (r'\b[a-z][A-Za-z0-9/-]+\s+', Text), # instructions
+ ],
+ 'literal': [
+ (r'".*"', String),
+ (r'0x[0-9A-Fa-f]+t?', Number.Hex),
+ (r'[0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
+ (r'[0-9]+L?', Number.Integer),
+ ],
+ 'field': [
+ (r'(\$?\b)([A-Za-z0-9_$]*)(:)',
+ bygroups(Punctuation, Name.Variable, Punctuation)),
+ ],
+ 'method': [
+ (r'<(?:cl)?init>', Name.Function), # constructor
+ (r'(\$?\b)([A-Za-z0-9_$]*)(\()',
+ bygroups(Punctuation, Name.Function, Punctuation)),
+ ],
+ 'label': [
+ (r':[A-Za-z0-9_]+', Name.Label),
+ ],
+ 'class': [
+ # class names in the form Lcom/namespace/ClassName;
+ # I only want to color the ClassName part, so the namespace part is
+ # treated as 'Text'
+ (r'(L)((?:[A-Za-z0-9_$]+/)*)([A-Za-z0-9_$]+)(;)',
+ bygroups(Keyword.Type, Text, Name.Class, Text)),
+ ],
+ 'punctuation': [
+ (r'->', Punctuation),
+ (r'[{},\(\):=\.-]', Punctuation),
+ ],
+ 'type': [
+ (r'[ZBSCIJFDV\[]+', Keyword.Type),
+ ],
+ 'comment': [
+ (r'#.*?\n', Comment),
+ ],
+ }
diff --git a/pygments/lexers/dotnet.py b/pygments/lexers/dotnet.py
index 17edddc0..bdd9edc1 100644
--- a/pygments/lexers/dotnet.py
+++ b/pygments/lexers/dotnet.py
@@ -5,7 +5,7 @@
Lexers for .net languages.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
diff --git a/pygments/lexers/functional.py b/pygments/lexers/functional.py
index f77b918c..4947bf7d 100644
--- a/pygments/lexers/functional.py
+++ b/pygments/lexers/functional.py
@@ -5,7 +5,7 @@
Lexers for functional languages.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -18,12 +18,13 @@ from pygments.token import Text, Comment, Operator, Keyword, Name, \
__all__ = ['RacketLexer', 'SchemeLexer', 'CommonLispLexer', 'HaskellLexer',
'LiterateHaskellLexer', 'SMLLexer', 'OcamlLexer', 'ErlangLexer',
'ErlangShellLexer', 'OpaLexer', 'CoqLexer', 'NewLispLexer',
- 'ElixirLexer', 'ElixirConsoleLexer']
+ 'ElixirLexer', 'ElixirConsoleLexer', 'KokaLexer']
class RacketLexer(RegexLexer):
"""
- Lexer for Racket source code.
+ Lexer for `Racket <http://racket-lang.org/>`_ source code (formerly known as
+ PLT Scheme).
*New in Pygments 1.6.*
"""
@@ -2393,3 +2394,204 @@ class ElixirConsoleLexer(Lexer):
for item in do_insertions(insertions,
exlexer.get_tokens_unprocessed(curcode)):
yield item
+
+
+class KokaLexer(RegexLexer):
+ """
+ Lexer for the `Koka <http://research.microsoft.com/en-us/projects/koka/>`_
+ language.
+
+ *New in Pygments 1.6.*
+ """
+
+ name = 'Koka'
+ aliases = ['koka']
+ filenames = ['*.kk', '*.kki']
+ mimetypes = ['text/x-koka']
+
+ keywords = [
+ 'infix', 'infixr', 'infixl', 'prefix', 'postfix',
+ 'type', 'cotype', 'rectype', 'alias',
+ 'struct', 'con',
+ 'fun', 'function', 'val', 'var',
+ 'external',
+ 'if', 'then', 'else', 'elif', 'return', 'match',
+ 'private', 'public', 'private',
+ 'module', 'import', 'as',
+ 'include', 'inline',
+ 'rec',
+ 'try', 'yield', 'enum',
+ 'interface', 'instance',
+ ]
+
+ # keywords that are followed by a type
+ typeStartKeywords = [
+ 'type', 'cotype', 'rectype', 'alias', 'struct', 'enum',
+ ]
+
+ # keywords valid in a type
+ typekeywords = [
+ 'forall', 'exists', 'some', 'with',
+ ]
+
+ # builtin names and special names
+ builtin = [
+ 'for', 'while', 'repeat',
+ 'foreach', 'foreach-indexed',
+ 'error', 'catch', 'finally',
+ 'cs', 'js', 'file', 'ref', 'assigned',
+ ]
+
+ # symbols that can be in an operator
+ symbols = '[\$%&\*\+@!/\\\^~=\.:\-\?\|<>]+'
+
+ # symbol boundary: an operator keyword should not be followed by any of these
+ sboundary = '(?!'+symbols+')'
+
+ # name boundary: a keyword should not be followed by any of these
+ boundary = '(?![a-zA-Z0-9_\\-])'
+
+ # main lexer
+ tokens = {
+ 'root': [
+ include('whitespace'),
+
+ # go into type mode
+ (r'::?' + sboundary, Keyword.Type, 'type'),
+ (r'alias' + boundary, Keyword, 'alias-type'),
+ (r'struct' + boundary, Keyword, 'struct-type'),
+ (r'(%s)' % '|'.join(typeStartKeywords) + boundary, Keyword, 'type'),
+
+ # special sequences of tokens (we use ?: for non-capturing group as
+ # required by 'bygroups')
+ (r'(module)(\s*)((?:interface)?)(\s*)'
+ r'((?:[a-z](?:[a-zA-Z0-9_]|\-[a-zA-Z])*\.)*'
+ r'[a-z](?:[a-zA-Z0-9_]|\-[a-zA-Z])*)',
+ bygroups(Keyword, Text, Keyword, Text, Name.Namespace)),
+ (r'(import)(\s+)((?:[a-z](?:[a-zA-Z0-9_]|\-[a-zA-Z])*\.)*[a-z]'
+ r'(?:[a-zA-Z0-9_]|\-[a-zA-Z])*)(\s*)((?:as)?)'
+ r'((?:[A-Z](?:[a-zA-Z0-9_]|\-[a-zA-Z])*)?)',
+ bygroups(Keyword, Text, Name.Namespace, Text, Keyword,
+ Name.Namespace)),
+
+ # keywords
+ (r'(%s)' % '|'.join(typekeywords) + boundary, Keyword.Type),
+ (r'(%s)' % '|'.join(keywords) + boundary, Keyword),
+ (r'(%s)' % '|'.join(builtin) + boundary, Keyword.Pseudo),
+ (r'::|:=|\->|[=\.:]' + sboundary, Keyword),
+ (r'\-' + sboundary, Generic.Strong),
+
+ # names
+ (r'[A-Z]([a-zA-Z0-9_]|\-[a-zA-Z])*(?=\.)', Name.Namespace),
+ (r'[A-Z]([a-zA-Z0-9_]|\-[a-zA-Z])*(?!\.)', Name.Class),
+ (r'[a-z]([a-zA-Z0-9_]|\-[a-zA-Z])*', Name),
+ (r'_([a-zA-Z0-9_]|\-[a-zA-Z])*', Name.Variable),
+
+ # literal string
+ (r'@"', String.Double, 'litstring'),
+
+ # operators
+ (symbols, Operator),
+ (r'`', Operator),
+ (r'[\{\}\(\)\[\];,]', Punctuation),
+
+ # literals. No check for literal characters with len > 1
+ (r'[0-9]+\.[0-9]+([eE][\-\+]?[0-9]+)?', Number.Float),
+ (r'0[xX][0-9a-fA-F]+', Number.Hex),
+ (r'[0-9]+', Number.Integer),
+
+ (r"'", String.Char, 'char'),
+ (r'"', String.Double, 'string'),
+ ],
+
+ # type started by alias
+ 'alias-type': [
+ (r'=',Keyword),
+ include('type')
+ ],
+
+ # type started by struct
+ 'struct-type': [
+ (r'(?=\((?!,*\)))',Punctuation, '#pop'),
+ include('type')
+ ],
+
+ # type started by colon
+ 'type': [
+ (r'[\(\[<]', Keyword.Type, 'type-nested'),
+ include('type-content')
+ ],
+
+ # type nested in brackets: can contain parameters, comma etc.
+ 'type-nested': [
+ (r'[\)\]>]', Keyword.Type, '#pop'),
+ (r'[\(\[<]', Keyword.Type, 'type-nested'),
+ (r',', Keyword.Type),
+ (r'([a-z](?:[a-zA-Z0-9_]|\-[a-zA-Z])*)(\s*)(:)(?!:)',
+ bygroups(Name.Variable,Text,Keyword.Type)), # parameter name
+ include('type-content')
+ ],
+
+ # shared contents of a type
+ 'type-content': [
+ include('whitespace'),
+
+ # keywords
+ (r'(%s)' % '|'.join(typekeywords) + boundary, Keyword.Type),
+ (r'(?=((%s)' % '|'.join(keywords) + boundary + '))',
+ Keyword, '#pop'), # need to match because names overlap...
+
+ # kinds
+ (r'[EPH]' + boundary, Keyword.Type),
+ (r'[*!]', Keyword.Type),
+
+ # type names
+ (r'[A-Z]([a-zA-Z0-9_]|\-[a-zA-Z])*(?=\.)', Name.Namespace),
+ (r'[A-Z]([a-zA-Z0-9_]|\-[a-zA-Z])*(?!\.)', Name.Class),
+ (r'[a-z][0-9]*(?![a-zA-Z_\-])', Keyword.Type), # Generic.Emph
+ (r'_([a-zA-Z0-9_]|\-[a-zA-Z])*', Keyword.Type), # Generic.Emph
+ (r'[a-z]([a-zA-Z0-9_]|\-[a-zA-Z])*', Keyword.Type),
+
+ # type keyword operators
+ (r'::|\->|[\.:|]', Keyword.Type),
+
+ #catchall
+ (r'', Text, '#pop')
+ ],
+
+ # comments and literals
+ 'whitespace': [
+ (r'\s+', Text),
+ (r'/\*', Comment.Multiline, 'comment'),
+ (r'//.*$', Comment.Single)
+ ],
+ 'comment': [
+ (r'[^/\*]+', Comment.Multiline),
+ (r'/\*', Comment.Multiline, '#push'),
+ (r'\*/', Comment.Multiline, '#pop'),
+ (r'[\*/]', Comment.Multiline),
+ ],
+ 'litstring': [
+ (r'[^"]+', String.Double),
+ (r'""', String.Escape),
+ (r'"', String.Double, '#pop'),
+ ],
+ 'string': [
+ (r'[^\\"\n]+', String.Double),
+ include('escape-sequence'),
+ (r'["\n]', String.Double, '#pop'),
+ ],
+ 'char': [
+ (r'[^\\\'\n]+', String.Char),
+ include('escape-sequence'),
+ (r'[\'\n]', String.Char, '#pop'),
+ ],
+ 'escape-sequence': [
+ (r'\\[abfnrtv0\\\"\'\?]', String.Escape),
+ (r'\\x[0-9a-fA-F]{2}', String.Escape),
+ (r'\\u[0-9a-fA-F]{4}', String.Escape),
+ # Yes, \U literals are 6 hex digits.
+ (r'\\U[0-9a-fA-F]{6}', String.Escape)
+ ]
+ }
+
diff --git a/pygments/lexers/hdl.py b/pygments/lexers/hdl.py
index 0db35e74..647f8396 100644
--- a/pygments/lexers/hdl.py
+++ b/pygments/lexers/hdl.py
@@ -5,7 +5,7 @@
Lexers for hardware descriptor languages.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/lexers/jvm.py b/pygments/lexers/jvm.py
index 008fb4f4..16066cc7 100644
--- a/pygments/lexers/jvm.py
+++ b/pygments/lexers/jvm.py
@@ -5,7 +5,7 @@
Pygments lexers for JVM languages.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -21,7 +21,7 @@ from pygments import unistring as uni
__all__ = ['JavaLexer', 'ScalaLexer', 'GosuLexer', 'GosuTemplateLexer',
'GroovyLexer', 'IokeLexer', 'ClojureLexer', 'KotlinLexer',
- 'XtendLexer', 'AspectJLexer']
+ 'XtendLexer', 'AspectJLexer', 'CeylonLexer']
class JavaLexer(RegexLexer):
@@ -60,13 +60,13 @@ class JavaLexer(RegexLexer):
(r'(class|interface)(\s+)', bygroups(Keyword.Declaration, Text), 'class'),
(r'(import)(\s+)', bygroups(Keyword.Namespace, Text), 'import'),
(r'"(\\\\|\\"|[^"])*"', String),
- (r"'\\.'|'[^\\]'|'\\u[0-9a-f]{4}'", String.Char),
+ (r"'\\.'|'[^\\]'|'\\u[0-9a-fA-F]{4}'", String.Char),
(r'(\.)([a-zA-Z_][a-zA-Z0-9_]*)', bygroups(Operator, Name.Attribute)),
(r'[a-zA-Z_][a-zA-Z0-9_]*:', Name.Label),
(r'[a-zA-Z_\$][a-zA-Z0-9_]*', Name),
(r'[~\^\*!%&\[\]\(\)\{\}<>\|+=:;,./?-]', Operator),
(r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
- (r'0x[0-9a-f]+', Number.Hex),
+ (r'0x[0-9a-fA-F]+', Number.Hex),
(r'[0-9]+L?', Number.Integer),
(r'\n', Text)
],
@@ -161,7 +161,7 @@ class ScalaLexer(RegexLexer):
(r'(type)(\s+)', bygroups(Keyword, Text), 'type'),
(r'""".*?"""(?!")', String),
(r'"(\\\\|\\"|[^"])*"', String),
- (r"'\\.'|'[^\\]'|'\\u[0-9a-f]{4}'", String.Char),
+ (r"'\\.'|'[^\\]'|'\\u[0-9a-fA-F]{4}'", String.Char),
# (ur'(\.)(%s|%s|`[^`]+`)' % (idrest, op), bygroups(Operator,
# Name.Attribute)),
(idrest, Name),
@@ -171,7 +171,7 @@ class ScalaLexer(RegexLexer):
(op, Operator),
(r'([0-9][0-9]*\.[0-9]*|\.[0-9]+)([eE][+-]?[0-9]+)?[fFdD]?',
Number.Float),
- (r'0x[0-9a-f]+', Number.Hex),
+ (r'0x[0-9a-fA-F]+', Number.Hex),
(r'[0-9]+L?', Number.Integer),
(r'\n', Text)
],
@@ -357,13 +357,13 @@ class GroovyLexer(RegexLexer):
(r"'(\\\\|\\'|[^'])*'", String.Single),
(r'\$/((?!/\$).)*/\$', String),
(r'/(\\\\|\\"|[^/])*/', String),
- (r"'\\.'|'[^\\]'|'\\u[0-9a-f]{4}'", String.Char),
+ (r"'\\.'|'[^\\]'|'\\u[0-9a-fA-F]{4}'", String.Char),
(r'(\.)([a-zA-Z_][a-zA-Z0-9_]*)', bygroups(Operator, Name.Attribute)),
(r'[a-zA-Z_][a-zA-Z0-9_]*:', Name.Label),
(r'[a-zA-Z_\$][a-zA-Z0-9_]*', Name),
(r'[~\^\*!%&\[\]\(\)\{\}<>\|+=:;,./?-]', Operator),
(r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
- (r'0x[0-9a-f]+', Number.Hex),
+ (r'0x[0-9a-fA-F]+', Number.Hex),
(r'[0-9]+L?', Number.Integer),
(r'\n', Text)
],
@@ -675,7 +675,7 @@ class ClojureLexer(RegexLexer):
(r'::?' + valid_name, String.Symbol),
# special operators
- (r'~@|[`\'#^~&]', Operator),
+ (r'~@|[`\'#^~&@]', Operator),
# highlight the special forms
(_multi_escape(special_forms), Keyword),
@@ -742,7 +742,7 @@ class TeaLangLexer(RegexLexer):
(r'[a-zA-Z_\$][a-zA-Z0-9_]*', Name),
(r'(isa|[.]{3}|[.]{2}|[=#!<>+-/%&;,.\*\\\(\)\[\]\{\}])', Operator),
(r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
- (r'0x[0-9a-f]+', Number.Hex),
+ (r'0x[0-9a-fA-F]+', Number.Hex),
(r'[0-9]+L?', Number.Integer),
(r'\n', Text)
],
@@ -754,6 +754,69 @@ class TeaLangLexer(RegexLexer):
],
}
+class CeylonLexer(RegexLexer):
+ """
+ For `Ceylon <http://ceylon-lang.org/>`_ source code.
+
+ *New in Pygments 1.6.*
+ """
+
+ name = 'Ceylon'
+ aliases = ['ceylon']
+ filenames = ['*.ceylon']
+ mimetypes = ['text/x-ceylon']
+
+ flags = re.MULTILINE | re.DOTALL
+
+ #: optional Comment or Whitespace
+ _ws = r'(?:\s|//.*?\n|/[*].*?[*]/)+'
+
+ tokens = {
+ 'root': [
+ # method names
+ (r'^(\s*(?:[a-zA-Z_][a-zA-Z0-9_\.\[\]]*\s+)+?)' # return arguments
+ r'([a-zA-Z_][a-zA-Z0-9_]*)' # method name
+ r'(\s*)(\()', # signature start
+ bygroups(using(this), Name.Function, Text, Operator)),
+ (r'[^\S\n]+', Text),
+ (r'//.*?\n', Comment.Single),
+ (r'/\*.*?\*/', Comment.Multiline),
+ (r'(variable|shared|abstract|doc|by|formal|actual)', Name.Decorator),
+ (r'(break|case|catch|continue|default|else|finally|for|in|variable|'
+ r'if|return|switch|this|throw|try|while|is|exists|nonempty|then|outer)\b',
+ Keyword),
+ (r'(abstracts|extends|satisfies|adapts|'
+ r'super|given|of|out|assign|'
+ r'transient|volatile)\b', Keyword.Declaration),
+ (r'(function|value|void)\b',
+ Keyword.Type),
+ (r'(package)(\s+)', bygroups(Keyword.Namespace, Text)),
+ (r'(true|false|null)\b', Keyword.Constant),
+ (r'(class|interface|object)(\s+)', bygroups(Keyword.Declaration, Text), 'class'),
+ (r'(import)(\s+)', bygroups(Keyword.Namespace, Text), 'import'),
+ (r'"(\\\\|\\"|[^"])*"', String),
+ (r"'\\.'|'[^\\]'|'\\u[0-9a-fA-F]{4}'", String.Quoted),
+ (r"`\\.`|`[^\\]`|`\\u[0-9a-fA-F]{4}`", String.Char),
+ (r'(\.)([a-zA-Z_][a-zA-Z0-9_]*)', bygroups(Operator, Name.Attribute)),
+ (r'[a-zA-Z_][a-zA-Z0-9_]*:', Name.Label),
+ (r'[a-zA-Z_\$][a-zA-Z0-9_]*', Name),
+ (r'[~\^\*!%&\[\]\(\)\{\}<>\|+=:;,./?-]', Operator),
+ (r'\d{1,3}(_\d{3})+\.\d{1,3}(_\d{3})+[kMGTPmunpf]?', Number.Float),
+ (r'\d{1,3}(_\d{3})+\.[0-9]+([eE][+-]?[0-9]+)?[kMGTPmunpf]?', Number.Float),
+ (r'[0-9][0-9]*\.\d{1,3}(_\d{3})+[kMGTPmunpf]?', Number.Float),
+ (r'[0-9][0-9]*\.[0-9]+([eE][+-]?[0-9]+)?[kMGTPmunpf]?', Number.Float),
+ (r'0x[0-9a-fA-F]+', Number.Hex),
+ (r'\d{1,3}(_\d{3})+[kMGTP]?', Number.Integer),
+ (r'[0-9]+[kMGTP]?', Number.Integer),
+ (r'\n', Text)
+ ],
+ 'class': [
+ (r'[a-zA-Z_][a-zA-Z0-9_]*', Name.Class, '#pop')
+ ],
+ 'import': [
+ (r'[a-zA-Z0-9_.]+\w+ \{([a-zA-Z,]+|\.\.\.)\}', Name.Namespace, '#pop')
+ ],
+ }
class KotlinLexer(RegexLexer):
"""
@@ -914,7 +977,7 @@ class XtendLexer(RegexLexer):
(r'[a-zA-Z_\$][a-zA-Z0-9_]*', Name),
(r'[~\^\*!%&\[\]\(\)\{\}<>\|+=:;,./?-]', Operator),
(r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
- (r'0x[0-9a-f]+', Number.Hex),
+ (r'0x[0-9a-fA-F]+', Number.Hex),
(r'[0-9]+L?', Number.Integer),
(r'\n', Text)
],
diff --git a/pygments/lexers/math.py b/pygments/lexers/math.py
index fb39abaf..a4e241d6 100644
--- a/pygments/lexers/math.py
+++ b/pygments/lexers/math.py
@@ -5,12 +5,13 @@
Lexers for math languages.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
+from pygments.util import shebang_matches
from pygments.lexer import Lexer, RegexLexer, bygroups, include, \
combined, do_insertions
from pygments.token import Comment, String, Punctuation, Keyword, Name, \
@@ -18,13 +19,20 @@ from pygments.token import Comment, String, Punctuation, Keyword, Name, \
from pygments.lexers.agile import PythonLexer
from pygments.lexers import _scilab_builtins
+from pygments.lexers import _stan_builtins
__all__ = ['JuliaLexer', 'JuliaConsoleLexer', 'MuPADLexer', 'MatlabLexer',
'MatlabSessionLexer', 'OctaveLexer', 'ScilabLexer', 'NumPyLexer',
- 'RConsoleLexer', 'SLexer', 'JagsLexer', 'BugsLexer', 'StanLexer']
+ 'RConsoleLexer', 'SLexer', 'JagsLexer', 'BugsLexer', 'StanLexer',
+ 'RdLexer']
class JuliaLexer(RegexLexer):
+ """
+ For `Julia <http://julialang.org/>`_ source code.
+
+ *New in Pygments 1.6.*
+ """
name = 'Julia'
aliases = ['julia','jl']
filenames = ['*.jl']
@@ -76,7 +84,8 @@ class JuliaLexer(RegexLexer):
(r'`(?s).*?`', String.Backtick),
# chars
- (r"'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,3}|\\u[a-fA-F0-9]{1,4}|\\U[a-fA-F0-9]{1,6}|[^\\\'\n])'", String.Char),
+ (r"'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,3}|\\u[a-fA-F0-9]{1,4}|"
+ r"\\U[a-fA-F0-9]{1,6}|[^\\\'\n])'", String.Char),
# try to match trailing transpose
(r'(?<=[.\w\)\]])\'+', Operator),
@@ -90,9 +99,10 @@ class JuliaLexer(RegexLexer):
(r'[a-zA-Z_][a-zA-Z0-9_]*', Name),
# numbers
- (r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float),
- (r'\d+[eE][+-]?[0-9]+', Number.Float),
+ (r'(\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?', Number.Float),
+ (r'\d+[eEf][+-]?[0-9]+', Number.Float),
(r'0b[01]+', Number.Binary),
+ (r'0o[0-7]+', Number.Oct),
(r'0x[a-fA-F0-9]+', Number.Hex),
(r'\d+', Number.Integer)
],
@@ -134,6 +144,8 @@ line_re = re.compile('.*?\n')
class JuliaConsoleLexer(Lexer):
"""
For Julia console sessions. Modeled after MatlabSessionLexer.
+
+ *New in Pygments 1.6.*
"""
name = 'Julia console'
aliases = ['jlcon']
@@ -332,6 +344,10 @@ class MatlabLexer(RegexLexer):
# (not great, but handles common cases...)
(r'(?<=[\w\)\]])\'', Operator),
+ (r'(\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?', Number.Float),
+ (r'\d+[eEf][+-]?[0-9]+', Number.Float),
+ (r'\d+', Number.Integer),
+
(r'(?<![\w\)\]])\'', String, 'string'),
('[a-zA-Z_][a-zA-Z0-9_]*', Name),
(r'.', Text),
@@ -778,6 +794,10 @@ class OctaveLexer(RegexLexer):
(r'"[^"]*"', String),
+ (r'(\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?', Number.Float),
+ (r'\d+[eEf][+-]?[0-9]+', Number.Float),
+ (r'\d+', Number.Integer),
+
# quote can be transpose, instead of string:
# (not great, but handles common cases...)
(r'(?<=[\w\)\]])\'', Operator),
@@ -849,6 +869,10 @@ class ScilabLexer(RegexLexer):
(r'(?<=[\w\)\]])\'', Operator),
(r'(?<![\w\)\]])\'', String, 'string'),
+ (r'(\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?', Number.Float),
+ (r'\d+[eEf][+-]?[0-9]+', Number.Float),
+ (r'\d+', Number.Integer),
+
('[a-zA-Z_][a-zA-Z0-9_]*', Name),
(r'.', Text),
],
@@ -1089,7 +1113,8 @@ class SLexer(RegexLexer):
class BugsLexer(RegexLexer):
"""
- Pygments Lexer for OpenBugs and WinBugs models.
+ Pygments Lexer for `OpenBugs <http://www.openbugs.info/w/>`_ and WinBugs
+ models.
*New in Pygments 1.6.*
"""
@@ -1152,7 +1177,7 @@ class BugsLexer(RegexLexer):
include('comments'),
include('whitespace'),
# Block start
- (r'(?s)(model)(\s+)({)',
+ (r'(model)(\s+)({)',
bygroups(Keyword.Namespace, Text, Punctuation)),
# Reserved Words
(r'(for|in)(?![0-9a-zA-Z\._])', Keyword.Reserved),
@@ -1234,7 +1259,7 @@ class JagsLexer(RegexLexer):
include('comments'),
include('whitespace'),
# Block start
- (r'(?s)(model|data)(\s+)({)',
+ (r'(model|data)(\s+)({)',
bygroups(Keyword.Namespace, Text, Punctuation)),
(r'var(?![0-9a-zA-Z\._])', Keyword.Declaration),
# Reserved Words
@@ -1281,47 +1306,11 @@ class StanLexer(RegexLexer):
filenames = ['*.stan']
_RESERVED = ('for', 'in', 'while', 'repeat', 'until', 'if',
- 'then', 'else', 'true', 'false', 'T')
+ 'then', 'else', 'true', 'false', 'T',
+ 'lower', 'upper', 'print')
_TYPES = ('int', 'real', 'vector', 'simplex', 'ordered', 'row_vector',
- 'matrix', 'corr_matrix', 'cov_matrix')
-
- # STAN 1.0 Manual, Chapter 20
- _CONSTANTS = ['pi', 'e', 'sqrt2', 'log2', 'log10', 'nan', 'infinity',
- 'epsilon', 'negative_epsilon']
- _FUNCTIONS = ['abs', 'int_step', 'min', 'max',
- 'if_else', 'step',
- 'fabs', 'fdim',
- 'fmin', 'fmax',
- 'fmod',
- 'floor', 'ceil', 'round', 'trunc',
- 'sqrt', 'cbrt', 'square', 'exp', 'exp2', 'expm1',
- 'log', 'log2', 'log10', 'pow', 'logit', 'inv_logit',
- 'inv_cloglog', 'hypot', 'cos', 'sin', 'tan', 'acos',
- 'asin', 'atan', 'atan2', 'cosh', 'sinh', 'tanh',
- 'acosh', 'asinh', 'atanh', 'erf', 'erfc', 'Phi',
- 'log_loss', 'tgamma', 'lgamma', 'lmgamma', 'lbeta',
- 'binomial_coefficient_log',
- 'fma', 'multiply_log', 'log1p', 'log1m', 'log1p_exp',
- 'log_sum_exp',
- 'rows', 'cols',
- 'dot_product', 'prod', 'mean', 'variance', 'sd',
- 'diagonal', 'diag_matrix', 'col', 'row',
- 'softmax', 'trace', 'determinant', 'inverse', 'eigenvalue',
- 'eigenvalues_sym', 'cholesky', 'singular_values',
- '(log)?normal_p', 'exponential_p', 'gamma_p', 'weibull_p']
- _DISTRIBUTIONS = ['bernoulli', 'bernoulli_logit', 'binomial',
- 'beta_binomial', 'hypergeometric', 'categorical',
- 'ordered_logistic', 'neg_binomial', 'poisson',
- 'multinomial', 'normal', 'student_t',
- 'cauchy', 'double_exponential', 'logistic',
- 'lognormal', 'chi_square', 'inv_chi_square',
- 'scaled_inv_chi_square', 'exponential',
- 'gamma', 'inv_gamma', 'weibull', 'pareto',
- 'beta', 'uniform', 'dirichlet', 'multi_normal',
- 'multi_normal_cholesky', 'multi_student_t',
- 'wishart', 'inv_wishart', 'lkj_cov',
- 'lkj_corr_cholesky']
+ 'matrix', 'corr_matrix', 'cov_matrix', 'positive_ordered')
tokens = {
'whitespace' : [
@@ -1333,12 +1322,14 @@ class StanLexer(RegexLexer):
(r'(//|#).*$', Comment.Single),
],
'root': [
+ # Stan is more restrictive on strings than this regex
+ (r'"[^"]*"', String),
# Comments
include('comments'),
# block start
include('whitespace'),
# Block start
- (r'(?s)(%s)(\s*)({)' %
+ (r'(%s)(\s*)({)' %
r'|'.join(('data', r'transformed\s+?data',
'parameters', r'transformed\s+parameters',
'model', r'generated\s+quantities')),
@@ -1351,13 +1342,11 @@ class StanLexer(RegexLexer):
(r"[;:,\[\]()<>]", Punctuation),
# Builtin
(r'(%s)(?=\s*\()'
- % r'|'.join(_FUNCTIONS
- + _DISTRIBUTIONS
- + ['%s_log' % x for x in _DISTRIBUTIONS]),
+ % r'|'.join(_stan_builtins.FUNCTIONS
+ + _stan_builtins.DISTRIBUTIONS),
Name.Builtin),
(r'(%s)(?=\s*\()'
- % r'|'.join(_CONSTANTS),
- Keyword.Constant),
+ % r'|'.join(_stan_builtins.CONSTANTS), Keyword.Constant),
# Special names ending in __, like lp__
(r'[A-Za-z][A-Za-z0-9_]*__\b', Name.Builtin.Pseudo),
# Regular variable names
@@ -1368,7 +1357,7 @@ class StanLexer(RegexLexer):
# Integer Literals
(r'-?[0-9]+', Number.Integer),
# Assignment operators
- # SLexer makes these tokens Operators.
+ # SLexer makes these tokens Operators.
(r'<-|~', Operator),
# Infix and prefix operators (and = )
(r"\+|-|\.?\*|\.?/|\\|'|=", Operator),
@@ -1382,4 +1371,42 @@ class StanLexer(RegexLexer):
return 1.0
else:
return 0.0
-
+
+
+class RdLexer(RegexLexer):
+ """
+ Pygments Lexer for R documentation (Rd) files
+
+ This is a very minimal implementation, highlighting little more
+ than the macros. A description of Rd syntax is found in `Writing R
+ Extensions <http://cran.r-project.org/doc/manuals/R-exts.html>`_
+ and `Parsing Rd files <developer.r-project.org/parseRd.pdf>`_.
+
+ *New in Pygments 1.6.*
+ """
+ name = 'Rd'
+ aliases = ['rd']
+ filenames = ['*.Rd']
+ mimetypes = ['text/x-r-doc']
+
+ # To account for verbatim / LaTeX-like / and R-like areas
+ # would require parsing.
+ tokens = {
+ 'root' : [
+ # catch escaped brackets and percent sign
+ (r'\\[\\{}%]', String.Escape),
+ # comments
+ (r'%.*$', Comment),
+ # special macros with no arguments
+ (r'\\(?:cr|l?dots|R|tab)\b', Keyword.Constant),
+ # macros
+ (r'\\[a-zA-Z]+\b', Keyword),
+ # special preprocessor macros
+ (r'^\s*#(?:ifn?def|endif).*\b', Comment.Preproc),
+ # non-escaped brackets
+ (r'[{}]', Name.Builtin),
+ # everything else
+ (r'[^\\%\n{}]+', Text),
+ (r'.', Text),
+ ]
+ }
diff --git a/pygments/lexers/other.py b/pygments/lexers/other.py
index b3bf92fc..0d10d794 100644
--- a/pygments/lexers/other.py
+++ b/pygments/lexers/other.py
@@ -5,7 +5,7 @@
Lexers for other languages.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -15,8 +15,11 @@ from pygments.lexer import RegexLexer, include, bygroups, using, \
this, combined, ExtendedRegexLexer
from pygments.token import Error, Punctuation, Literal, Token, \
Text, Comment, Operator, Keyword, Name, String, Number, Generic
+from pygments.util import get_bool_opt
from pygments.lexers.web import HtmlLexer
+from pygments.lexers._openedgebuiltins import OPENEDGEKEYWORDS
+from pygments.lexers._robotframeworklexer import RobotFrameworkLexer
# backwards compatibility
from pygments.lexers.sql import SqlLexer, MySqlLexer, SqliteConsoleLexer
@@ -30,7 +33,9 @@ __all__ = ['BrainfuckLexer', 'BefungeLexer', 'RedcodeLexer', 'MOOCodeLexer',
'AutohotkeyLexer', 'GoodDataCLLexer', 'MaqlLexer', 'ProtoBufLexer',
'HybrisLexer', 'AwkLexer', 'Cfengine3Lexer', 'SnobolLexer',
'ECLLexer', 'UrbiscriptLexer', 'OpenEdgeLexer', 'BroLexer',
- 'MscgenLexer', 'KconfigLexer', 'CbmBasicV2Lexer']
+ 'MscgenLexer', 'KconfigLexer', 'VGLLexer', 'SourcePawnLexer',
+ 'RobotFrameworkLexer', 'PuppetLexer', 'NSISLexer', 'RPMSpecLexer',
+ 'CbmBasicV2Lexer']
class ECLLexer(RegexLexer):
@@ -57,7 +62,7 @@ class ECLLexer(RegexLexer):
'whitespace': [
(r'\s+', Text),
(r'\/\/.*', Comment.Single),
- (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline),
+ (r'/(\\\n)?\*(.|\n)*?\*(\\\n)?/', Comment.Multiline),
],
'statements': [
include('types'),
@@ -1207,7 +1212,7 @@ class ModelicaLexer(RegexLexer):
(r'\s+', Text),
(r'\\\n', Text), # line continuation
(r'//(\n|(.|\n)*?[^\\]\n)', Comment),
- (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment),
+ (r'/(\\\n)?\*(.|\n)*?\*(\\\n)?/', Comment),
],
'statements': [
(r'"', String, 'string'),
@@ -1253,7 +1258,8 @@ class ModelicaLexer(RegexLexer):
],
'classes': [
(r'(block|class|connector|function|model|package|'
- r'record|type)\b', Name.Class),
+ r'record|type)(\s+)([A-Za-z_]+)',
+ bygroups(Keyword, Text, Name.Class))
],
'string': [
(r'"', String, '#pop'),
@@ -1850,7 +1856,7 @@ class AsymptoteLexer(RegexLexer):
mimetypes = ['text/x-asymptote']
#: optional Comment or Whitespace
- _ws = r'(?:\s|//.*?\n|/[*].*?[*]/)+'
+ _ws = r'(?:\s|//.*?\n|/\*.*?\*/)+'
tokens = {
'whitespace': [
@@ -1858,7 +1864,7 @@ class AsymptoteLexer(RegexLexer):
(r'\s+', Text),
(r'\\\n', Text), # line continuation
(r'//(\n|(.|\n)*?[^\\]\n)', Comment),
- (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment),
+ (r'/(\\\n)?\*(.|\n)*?\*(\\\n)?/', Comment),
],
'statements': [
# simple string (TeX friendly)
@@ -1904,7 +1910,7 @@ class AsymptoteLexer(RegexLexer):
'root': [
include('whitespace'),
# functions
- (r'((?:[a-zA-Z0-9_*\s])+?(?:\s|[*]))' # return arguments
+ (r'((?:[a-zA-Z0-9_*\s])+?(?:\s|\*))' # return arguments
r'([a-zA-Z_][a-zA-Z0-9_]*)' # method name
r'(\s*\([^;]*?\))' # signature
r'(' + _ws + r')({)',
@@ -1912,7 +1918,7 @@ class AsymptoteLexer(RegexLexer):
Punctuation),
'function'),
# function declarations
- (r'((?:[a-zA-Z0-9_*\s])+?(?:\s|[*]))' # return arguments
+ (r'((?:[a-zA-Z0-9_*\s])+?(?:\s|\*))' # return arguments
r'([a-zA-Z_][a-zA-Z0-9_]*)' # method name
r'(\s*\([^;]*?\))' # signature
r'(' + _ws + r')(;)',
@@ -2347,7 +2353,7 @@ class ProtoBufLexer(RegexLexer):
(r'[ \t]+', Text),
(r'[,;{}\[\]\(\)]', Punctuation),
(r'/(\\\n)?/(\n|(.|\n)*?[^\\]\n)', Comment.Single),
- (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline),
+ (r'/(\\\n)?\*(.|\n)*?\*(\\\n)?/', Comment.Multiline),
(r'\b(import|option|optional|required|repeated|default|packed|'
r'ctype|extensions|to|max|rpc|returns)\b', Keyword),
(r'(int32|int64|uint32|uint64|sint32|sint64|'
@@ -2767,477 +2773,9 @@ class OpenEdgeLexer(RegexLexer):
r'INT64|INTEGER|INT|INTE|INTEG|INTEGE|'
r'LOGICAL|LONGCHAR|MEMPTR|RAW|RECID|ROWID)\s*($|(?=[^0-9a-z_\-]))')
- keywords = (r'(?i)(^|(?<=[^0-9a-z_\-]))(ABSOLUTE|ABS|ABSO|ABSOL|ABSOLU|ABSOLUT|ACCELERATOR|'
- r'ACCUM|ACCUMULATE|ACCUM|ACCUMU|ACCUMUL|ACCUMULA|ACCUMULAT|'
- r'ACTIVE-FORM|ACTIVE-WINDOW|ADD|ADD-BUFFER|'
- r'ADD-CALC-COLUMN|ADD-COLUMNS-FROM|ADD-EVENTS-PROCEDURE|'
- r'ADD-FIELDS-FROM|ADD-FIRST|ADD-INDEX-FIELD|ADD-LAST|'
- r'ADD-LIKE-COLUMN|ADD-LIKE-FIELD|ADD-LIKE-INDEX|'
- r'ADD-NEW-FIELD|ADD-NEW-INDEX|ADD-SCHEMA-LOCATION|ADD-SUPER-PROCEDURE|'
- r'ADM-DATA|ADVISE|ALERT-BOX|ALIAS|ALL|ALLOW-COLUMN-SEARCHING|'
- r'ALLOW-REPLICATION|ALTER|ALWAYS-ON-TOP|AMBIGUOUS|AMBIG|AMBIGU|AMBIGUO|AMBIGUOU|'
- r'ANALYZE|ANALYZ|AND|ANSI-ONLY|ANY|ANYWHERE|APPEND|APPL-ALERT-BOXES|'
- r'APPL-ALERT|APPL-ALERT-|APPL-ALERT-B|APPL-ALERT-BO|APPL-ALERT-BOX|APPL-ALERT-BOXE|'
- r'APPL-CONTEXT-ID|APPLICATION|APPLY|APPSERVER-INFO|APPSERVER-PASSWORD|'
- r'APPSERVER-USERID|ARRAY-MESSAGE|AS|ASC|ASCENDING|ASCE|ASCEN|'
- r'ASCEND|ASCENDI|ASCENDIN|ASK-OVERWRITE|ASSEMBLY|ASSIGN|'
- r'ASYNCHRONOUS|ASYNC-REQUEST-COUNT|ASYNC-REQUEST-HANDLE|AT|'
- r'ATTACHED-PAIRLIST|ATTR-SPACE|ATTR|ATTRI|ATTRIB|ATTRIBU|ATTRIBUT|'
- r'AUDIT-CONTROL|AUDIT-ENABLED|AUDIT-EVENT-CONTEXT|AUDIT-POLICY|'
- r'AUTHENTICATION-FAILED|AUTHORIZATION|AUTO-COMPLETION|AUTO-COMP|'
- r'AUTO-COMPL|AUTO-COMPLE|AUTO-COMPLET|AUTO-COMPLETI|AUTO-COMPLETIO|'
- r'AUTO-ENDKEY|AUTO-END-KEY|AUTO-GO|AUTO-INDENT|AUTO-IND|'
- r'AUTO-INDE|AUTO-INDEN|AUTOMATIC|AUTO-RESIZE|AUTO-RETURN|AUTO-RET|'
- r'AUTO-RETU|AUTO-RETUR|AUTO-SYNCHRONIZE|AUTO-ZAP|AUTO-Z|AUTO-ZA|'
- r'AVAILABLE|AVAIL|AVAILA|AVAILAB|AVAILABL|AVAILABLE-FORMATS|'
- r'AVERAGE|AVE|AVER|AVERA|AVERAG|AVG|BACKGROUND|BACK|BACKG|'
- r'BACKGR|BACKGRO|BACKGROU|BACKGROUN|BACKWARDS|BACKWARD|'
- r'BASE64-DECODE|BASE64-ENCODE|BASE-ADE|BASE-KEY|BATCH-MODE|BATCH|'
- r'BATCH-|BATCH-M|BATCH-MO|BATCH-MOD|BATCH-SIZE|BEFORE-HIDE|BEFORE-H|'
- r'BEFORE-HI|BEFORE-HID|BEGIN-EVENT-GROUP|BEGINS|BELL|BETWEEN|'
- r'BGCOLOR|BGC|BGCO|BGCOL|BGCOLO|BIG-ENDIAN|BINARY|BIND|BIND-WHERE|'
- r'BLANK|BLOCK-ITERATION-DISPLAY|BORDER-BOTTOM-CHARS|BORDER-B|'
- r'BORDER-BO|BORDER-BOT|BORDER-BOTT|BORDER-BOTTO|BORDER-BOTTOM-PIXELS|'
- r'BORDER-BOTTOM-P|BORDER-BOTTOM-PI|BORDER-BOTTOM-PIX|'
- r'BORDER-BOTTOM-PIXE|BORDER-BOTTOM-PIXEL|BORDER-LEFT-CHARS|BORDER-L|'
- r'BORDER-LE|BORDER-LEF|BORDER-LEFT|BORDER-LEFT-|BORDER-LEFT-C|'
- r'BORDER-LEFT-CH|BORDER-LEFT-CHA|BORDER-LEFT-CHAR|BORDER-LEFT-PIXELS|'
- r'BORDER-LEFT-P|BORDER-LEFT-PI|BORDER-LEFT-PIX|BORDER-LEFT-PIXE|'
- r'BORDER-LEFT-PIXEL|BORDER-RIGHT-CHARS|BORDER-R|BORDER-RI|BORDER-RIG|'
- r'BORDER-RIGH|BORDER-RIGHT|BORDER-RIGHT-|BORDER-RIGHT-C|BORDER-RIGHT-CH|'
- r'BORDER-RIGHT-CHA|BORDER-RIGHT-CHAR|BORDER-RIGHT-PIXELS|BORDER-RIGHT-P|'
- r'BORDER-RIGHT-PI|BORDER-RIGHT-PIX|BORDER-RIGHT-PIXE|BORDER-RIGHT-PIXEL|'
- r'BORDER-TOP-CHARS|BORDER-T|BORDER-TO|BORDER-TOP|BORDER-TOP-|BORDER-TOP-C|'
- r'BORDER-TOP-CH|BORDER-TOP-CHA|BORDER-TOP-CHAR|BORDER-TOP-PIXELS|'
- r'BORDER-TOP-P|BORDER-TOP-PI|BORDER-TOP-PIX|BORDER-TOP-PIXE|BORDER-TOP-PIXEL|'
- r'BOX|BOX-SELECTABLE|BOX-SELECT|BOX-SELECTA|BOX-SELECTAB|BOX-SELECTABL|'
- r'BREAK|BROWSE|BUFFER|BUFFER-CHARS|BUFFER-COMPARE|BUFFER-COPY|BUFFER-CREATE|'
- r'BUFFER-DELETE|BUFFER-FIELD|BUFFER-HANDLE|BUFFER-LINES|BUFFER-NAME|'
- r'BUFFER-RELEASE|BUFFER-VALUE|BUTTON|BUTTONS|BUTTON|BY|BY-POINTER|'
- r'BY-VARIANT-POINTER|CACHE|CACHE-SIZE|CALL|CALL-NAME|CALL-TYPE|CANCEL-BREAK|'
- r'CANCEL-BUTTON|CAN-CREATE|CAN-DELETE|CAN-DO|CAN-FIND|CAN-QUERY|CAN-READ|'
- r'CAN-SET|CAN-WRITE|CAPS|CAREFUL-PAINT|CASE|CASE-SENSITIVE|CASE-SEN|'
- r'CASE-SENS|CASE-SENSI|CASE-SENSIT|CASE-SENSITI|CASE-SENSITIV|'
- r'CAST|CATCH|CDECL|CENTERED|CENTER|CENTERE|CHAINED|CHARACTER_LENGTH|'
- r'CHARSET|CHECK|CHECKED|CHOOSE|CHR|CLASS|CLASS-TYPE|CLEAR|'
- r'CLEAR-APPL-CONTEXT|CLEAR-LOG|CLEAR-SELECTION|CLEAR-SELECT|'
- r'CLEAR-SELECTI|CLEAR-SELECTIO|CLEAR-SORT-ARROWS|CLEAR-SORT-ARROW|'
- r'CLIENT-CONNECTION-ID|CLIENT-PRINCIPAL|CLIENT-TTY|CLIENT-TYPE|'
- r'CLIENT-WORKSTATION|CLIPBOARD|CLOSE|CLOSE-LOG|CODE|CODEBASE-LOCATOR|'
- r'CODEPAGE|CODEPAGE-CONVERT|COLLATE|COL-OF|COLON|COLON-ALIGNED|'
- r'COLON-ALIGN|COLON-ALIGNE|COLOR|COLOR-TABLE|COLUMN|COL|COLU|COLUM|'
- r'COLUMN-BGCOLOR|COLUMN-DCOLOR|COLUMN-FGCOLOR|COLUMN-FONT|COLUMN-LABEL|'
- r'COLUMN-LAB|COLUMN-LABE|COLUMN-MOVABLE|COLUMN-OF|COLUMN-PFCOLOR|'
- r'COLUMN-READ-ONLY|COLUMN-RESIZABLE|COLUMNS|COLUMN-SCROLLING|'
- r'COMBO-BOX|COMMAND|COMPARES|COMPILE|COMPILER|COMPLETE|COM-SELF|'
- r'CONFIG-NAME|CONNECT|CONNECTED|CONSTRUCTOR|CONTAINS|CONTENTS|CONTEXT|'
- r'CONTEXT-HELP|CONTEXT-HELP-FILE|CONTEXT-HELP-ID|CONTEXT-POPUP|'
- r'CONTROL|CONTROL-BOX|CONTROL-FRAME|CONVERT|CONVERT-3D-COLORS|'
- r'CONVERT-TO-OFFSET|CONVERT-TO-OFFS|CONVERT-TO-OFFSE|COPY-DATASET|'
- r'COPY-LOB|COPY-SAX-ATTRIBUTES|COPY-TEMP-TABLE|COUNT|COUNT-OF|'
- r'CPCASE|CPCOLL|CPINTERNAL|CPLOG|CPPRINT|CPRCODEIN|CPRCODEOUT|'
- r'CPSTREAM|CPTERM|CRC-VALUE|CREATE|CREATE-LIKE|CREATE-LIKE-SEQUENTIAL|'
- r'CREATE-NODE-NAMESPACE|CREATE-RESULT-LIST-ENTRY|CREATE-TEST-FILE|'
- r'CURRENT|CURRENT_DATE|CURRENT_DATE|CURRENT-CHANGED|CURRENT-COLUMN|'
- r'CURRENT-ENVIRONMENT|CURRENT-ENV|CURRENT-ENVI|CURRENT-ENVIR|'
- r'CURRENT-ENVIRO|CURRENT-ENVIRON|CURRENT-ENVIRONM|CURRENT-ENVIRONME|'
- r'CURRENT-ENVIRONMEN|CURRENT-ITERATION|CURRENT-LANGUAGE|CURRENT-LANG|'
- r'CURRENT-LANGU|CURRENT-LANGUA|CURRENT-LANGUAG|CURRENT-QUERY|'
- r'CURRENT-RESULT-ROW|CURRENT-ROW-MODIFIED|CURRENT-VALUE|CURRENT-WINDOW|'
- r'CURSOR|CURS|CURSO|CURSOR-CHAR|CURSOR-LINE|CURSOR-OFFSET|DATABASE|'
- r'DATA-BIND|DATA-ENTRY-RETURN|DATA-ENTRY-RET|DATA-ENTRY-RETU|'
- r'DATA-ENTRY-RETUR|DATA-RELATION|DATA-REL|DATA-RELA|DATA-RELAT|'
- r'DATA-RELATI|DATA-RELATIO|DATASERVERS|DATASET|DATASET-HANDLE|DATA-SOURCE|'
- r'DATA-SOURCE-COMPLETE-MAP|DATA-SOURCE-MODIFIED|DATA-SOURCE-ROWID|'
- r'DATA-TYPE|DATA-T|DATA-TY|DATA-TYP|DATE-FORMAT|DATE-F|DATE-FO|'
- r'DATE-FOR|DATE-FORM|DATE-FORMA|DAY|DBCODEPAGE|DBCOLLATION|DBNAME|'
- r'DBPARAM|DB-REFERENCES|DBRESTRICTIONS|DBREST|DBRESTR|DBRESTRI|'
- r'DBRESTRIC|DBRESTRICT|DBRESTRICTI|DBRESTRICTIO|DBRESTRICTION|'
- r'DBTASKID|DBTYPE|DBVERSION|DBVERS|DBVERSI|DBVERSIO|DCOLOR|'
- r'DDE|DDE-ERROR|DDE-ID|DDE-I|DDE-ITEM|DDE-NAME|DDE-TOPIC|DEBLANK|'
- r'DEBUG|DEBU|DEBUG-ALERT|DEBUGGER|DEBUG-LIST|DECIMALS|DECLARE|'
- r'DECLARE-NAMESPACE|DECRYPT|DEFAULT|DEFAULT-BUFFER-HANDLE|'
- r'DEFAULT-BUTTON|DEFAUT-B|DEFAUT-BU|DEFAUT-BUT|DEFAUT-BUTT|DEFAUT-BUTTO|'
- r'DEFAULT-COMMIT|DEFAULT-EXTENSION|DEFAULT-EX|DEFAULT-EXT|DEFAULT-EXTE|'
- r'DEFAULT-EXTEN|DEFAULT-EXTENS|DEFAULT-EXTENSI|DEFAULT-EXTENSIO|'
- r'DEFAULT-NOXLATE|DEFAULT-NOXL|DEFAULT-NOXLA|DEFAULT-NOXLAT|'
- r'DEFAULT-VALUE|DEFAULT-WINDOW|DEFINED|'
- r'DEFINE-USER-EVENT-MANAGER|DELETE|DEL|DELE|DELET|DELETE-CHARACTER|'
- r'DELETE-CHAR|DELETE-CHARA|DELETE-CHARAC|DELETE-CHARACT|DELETE-CHARACTE|'
- r'DELETE-CURRENT-ROW|DELETE-LINE|DELETE-RESULT-LIST-ENTRY|DELETE-SELECTED-ROW|'
- r'DELETE-SELECTED-ROWS|DELIMITER|DESC|DESCENDING|DESC|DESCE|DESCEN|'
- r'DESCEND|DESCENDI|DESCENDIN|DESELECT-FOCUSED-ROW|DESELECTION|'
- r'DESELECT-ROWS|DESELECT-SELECTED-ROW|DESTRUCTOR|DIALOG-BOX|'
- r'DICTIONARY|DICT|DICTI|DICTIO|DICTION|DICTIONA|DICTIONAR|'
- r'DIR|DISABLE|DISABLE-AUTO-ZAP|DISABLED|DISABLE-DUMP-TRIGGERS|'
- r'DISABLE-LOAD-TRIGGERS|DISCONNECT|DISCON|DISCONN|DISCONNE|DISCONNEC|'
- r'DISP|DISPLAY|DISP|DISPL|DISPLA|DISPLAY-MESSAGE|DISPLAY-TYPE|'
- r'DISPLAY-T|DISPLAY-TY|DISPLAY-TYP|DISTINCT|DO|DOMAIN-DESCRIPTION|'
- r'DOMAIN-NAME|DOMAIN-TYPE|DOS|DOUBLE|DOWN|DRAG-ENABLED|DROP|DROP-DOWN|'
- r'DROP-DOWN-LIST|DROP-FILE-NOTIFY|DROP-TARGET|DUMP|DYNAMIC|'
- r'DYNAMIC-FUNCTION|EACH|ECHO|EDGE-CHARS|EDGE|EDGE-|EDGE-C|'
- r'EDGE-CH|EDGE-CHA|EDGE-CHAR|EDGE-PIXELS|EDGE-P|EDGE-PI|EDGE-PIX|'
- r'EDGE-PIXE|EDGE-PIXEL|EDIT-CAN-PASTE|EDIT-CAN-UNDO|EDIT-CLEAR|'
- r'EDIT-COPY|EDIT-CUT|EDITING|EDITOR|EDIT-PASTE|EDIT-UNDO|ELSE|'
- r'EMPTY|EMPTY-TEMP-TABLE|ENABLE|ENABLED-FIELDS|ENCODE|ENCRYPT|'
- r'ENCRYPT-AUDIT-MAC-KEY|ENCRYPTION-SALT|END|END-DOCUMENT|'
- r'END-ELEMENT|END-EVENT-GROUP|END-FILE-DROP|ENDKEY|END-KEY|'
- r'END-MOVE|END-RESIZE|END-ROW-RESIZE|END-USER-PROMPT|ENTERED|'
- r'ENTRY|EQ|ERROR|ERROR-COLUMN|ERROR-COL|ERROR-COLU|ERROR-COLUM|'
- r'ERROR-ROW|ERROR-STACK-TRACE|ERROR-STATUS|ERROR-STAT|ERROR-STATU|'
- r'ESCAPE|ETIME|EVENT-GROUP-ID|EVENT-PROCEDURE|EVENT-PROCEDURE-CONTEXT|'
- r'EVENTS|EVENT|EVENT-TYPE|EVENT-T|EVENT-TY|EVENT-TYP|EXCEPT|'
- r'EXCLUSIVE-ID|EXCLUSIVE-LOCK|EXCLUSIVE|EXCLUSIVE-|EXCLUSIVE-L|'
- r'EXCLUSIVE-LO|EXCLUSIVE-LOC|EXCLUSIVE-WEB-USER|EXECUTE|EXISTS|'
- r'EXP|EXPAND|EXPANDABLE|EXPLICIT|EXPORT|EXPORT-PRINCIPAL|EXTENDED|'
- r'EXTENT|EXTERNAL|FALSE|FETCH|FETCH-SELECTED-ROW|FGCOLOR|FGC|FGCO|'
- r'FGCOL|FGCOLO|FIELD|FIELDS|FIELD|FILE|FILE-CREATE-DATE|'
- r'FILE-CREATE-TIME|FILE-INFORMATION|FILE-INFO|FILE-INFOR|FILE-INFORM|'
- r'FILE-INFORMA|FILE-INFORMAT|FILE-INFORMATI|FILE-INFORMATIO|FILE-MOD-DATE|'
- r'FILE-MOD-TIME|FILENAME|FILE-NAME|FILE-OFFSET|FILE-OFF|FILE-OFFS|FILE-OFFSE|'
- r'FILE-SIZE|FILE-TYPE|FILL|FILLED|FILL-IN|FILTERS|FINAL|FINALLY|FIND|'
- r'FIND-BY-ROWID|FIND-CASE-SENSITIVE|FIND-CURRENT|FINDER|FIND-FIRST|'
- r'FIND-GLOBAL|FIND-LAST|FIND-NEXT-OCCURRENCE|FIND-PREV-OCCURRENCE|'
- r'FIND-SELECT|FIND-UNIQUE|FIND-WRAP-AROUND|FIRST|FIRST-ASYNCH-REQUEST|'
- r'FIRST-CHILD|FIRST-COLUMN|FIRST-FORM|FIRST-OBJECT|FIRST-OF|'
- r'FIRST-PROCEDURE|FIRST-PROC|FIRST-PROCE|FIRST-PROCED|FIRST-PROCEDU|FIRST-PROCEDUR|'
- r'FIRST-SERVER|FIRST-TAB-ITEM|FIRST-TAB-I|FIRST-TAB-IT|FIRST-TAB-ITE|'
- r'FIT-LAST-COLUMN|FIXED-ONLY|FLAT-BUTTON|FLOAT|FOCUS|FOCUSED-ROW|'
- r'FOCUSED-ROW-SELECTED|FONT|FONT-TABLE|FOR|FORCE-FILE|'
- r'FOREGROUND|FORE|FOREG|FOREGR|FOREGRO|FOREGROU|FOREGROUN|'
- r'FORM|FORMAT|FORM|FORMA|FORMATTED|FORMATTE|FORM-LONG-INPUT|'
- r'FORWARD|FORWARDS|FORWARD|FRAGMENT|FRAGMEN|FRAME|FRAM|'
- r'FRAME-COL|FRAME-DB|FRAME-DOWN|FRAME-FIELD|FRAME-FILE|'
- r'FRAME-INDEX|FRAME-INDE|FRAME-LINE|FRAME-NAME|FRAME-ROW|'
- r'FRAME-SPACING|FRAME-SPA|FRAME-SPAC|FRAME-SPACI|FRAME-SPACIN|'
- r'FRAME-VALUE|FRAME-VAL|FRAME-VALU|FRAME-X|FRAME-Y|FREQUENCY|FROM|'
- r'FROM-CHARS|FROM-C|FROM-CH|FROM-CHA|FROM-CHAR|'
- r'FROM-CURRENT|FROM-CUR|FROM-CURR|FROM-CURRE|FROM-CURREN|'
- r'FROM-PIXELS|FROM-P|FROM-PI|FROM-PIX|FROM-PIXE|FROM-PIXEL|'
- r'FULL-HEIGHT-CHARS|FULL-HEIGHT|FULL-HEIGHT-|FULL-HEIGHT-C|FULL-HEIGHT-CH|FULL-HEIGHT-CHA|FULL-HEIGHT-CHAR|'
- r'FULL-HEIGHT-PIXELS|FULL-HEIGHT-P|FULL-HEIGHT-PI|FULL-HEIGHT-PIX|FULL-HEIGHT-PIXE|FULL-HEIGHT-PIXEL|'
- r'FULL-PATHNAME|FULL-PATHN|FULL-PATHNA|FULL-PATHNAM|'
- r'FULL-WIDTH-CHARS|FULL-WIDTH|FULL-WIDTH-|FULL-WIDTH-C|FULL-WIDTH-CH|FULL-WIDTH-CHA|FULL-WIDTH-CHAR|'
- r'FULL-WIDTH-PIXELS|FULL-WIDTH-P|FULL-WIDTH-PI|FULL-WIDTH-PIX|FULL-WIDTH-PIXE|FULL-WIDTH-PIXEL|'
- r'FUNCTION|FUNCTION-CALL-TYPE|GATEWAYS|GATEWAY|GE|GENERATE-MD5|'
- r'GENERATE-PBE-KEY|GENERATE-PBE-SALT|GENERATE-RANDOM-KEY|GENERATE-UUID|GET|'
- r'GET-ATTR-CALL-TYPE|GET-ATTRIBUTE-NODE|GET-BINARY-DATA|'
- r'GET-BLUE-VALUE|GET-BLUE|GET-BLUE-|GET-BLUE-V|GET-BLUE-VA|GET-BLUE-VAL|GET-BLUE-VALU|'
- r'GET-BROWSE-COLUMN|GET-BUFFER-HANDLEGETBYTE|GET-BYTE|GET-CALLBACK-PROC-CONTEXT|'
- r'GET-CALLBACK-PROC-NAME|GET-CGI-LIST|GET-CGI-LONG-VALUE|GET-CGI-VALUE|'
- r'GET-CODEPAGES|GET-COLLATIONS|GET-CONFIG-VALUE|GET-CURRENT|GET-DOUBLE|'
- r'GET-DROPPED-FILE|GET-DYNAMIC|GET-ERROR-COLUMN|GET-ERROR-ROW|GET-FILE|'
- r'GET-FILE-NAME|GET-FILE-OFFSET|GET-FILE-OFFSE|GET-FIRST|GET-FLOAT|'
- r'GET-GREEN-VALUE|GET-GREEN|GET-GREEN-|GET-GREEN-V|GET-GREEN-VA|GET-GREEN-VAL|GET-GREEN-VALU|'
- r'GET-INDEX-BY-NAMESPACE-NAME|GET-INDEX-BY-QNAME|GET-INT64|GET-ITERATION|'
- r'GET-KEY-VALUE|GET-KEY-VAL|GET-KEY-VALU|GET-LAST|GET-LOCALNAME-BY-INDEX|'
- r'GET-LONG|GET-MESSAGE|GET-NEXT|GET-NUMBER|GET-POINTER-VALUE|'
- r'GET-PREV|GET-PRINTERS|GET-PROPERTY|GET-QNAME-BY-INDEX|'
- r'GET-RED-VALUE|GET-RED|GET-RED-|GET-RED-V|GET-RED-VA|GET-RED-VAL|GET-RED-VALU|'
- r'GET-REPOSITIONED-ROW|GET-RGB-VALUE|'
- r'GET-SELECTED-WIDGET|GET-SELECTED|GET-SELECTED-|GET-SELECTED-W|GET-SELECTED-WI|GET-SELECTED-WID|GET-SELECTED-WIDG|GET-SELECTED-WIDGE|'
- r'GET-SHORT|GET-SIGNATURE|GET-SIZE|GET-STRING|GET-TAB-ITEM|'
- r'GET-TEXT-HEIGHT-CHARS|GET-TEXT-HEIGHT|GET-TEXT-HEIGHT-|GET-TEXT-HEIGHT-C|GET-TEXT-HEIGHT-CH|GET-TEXT-HEIGHT-CHA|GET-TEXT-HEIGHT-CHAR|'
- r'GET-TEXT-HEIGHT-PIXELS|GET-TEXT-HEIGHT-P|GET-TEXT-HEIGHT-PI|GET-TEXT-HEIGHT-PIX|GET-TEXT-HEIGHT-PIXE|GET-TEXT-HEIGHT-PIXEL|'
- r'GET-TEXT-WIDTH-CHARS|GET-TEXT-WIDTH|GET-TEXT-WIDTH-|GET-TEXT-WIDTH-C|GET-TEXT-WIDTH-CH|GET-TEXT-WIDTH-CHA|GET-TEXT-WIDTH-CHAR|'
- r'GET-TEXT-WIDTH-PIXELS|GET-TEXT-WIDTH-P|GET-TEXT-WIDTH-PI|GET-TEXT-WIDTH-PIX|GET-TEXT-WIDTH-PIXE|GET-TEXT-WIDTH-PIXEL|'
- r'GET-TYPE-BY-INDEX|GET-TYPE-BY-NAMESPACE-NAME|GET-TYPE-BY-QNAME|GET-UNSIGNED-LONG|'
- r'GET-UNSIGNED-SHORT|GET-URI-BY-INDEX|GET-VALUE-BY-INDEX|GET-VALUE-BY-NAMESPACE-NAME|'
- r'GET-VALUE-BY-QNAME|GET-WAIT-STATE|GLOBAL|GO-ON|'
- r'GO-PENDING|GO-PEND|GO-PENDI|GO-PENDIN|GRANT|'
- r'GRAPHIC-EDGE|GRAPHIC-E|GRAPHIC-ED|GRAPHIC-EDG|'
- r'GRID-FACTOR-HORIZONTAL|GRID-FACTOR-H|GRID-FACTOR-HO|GRID-FACTOR-HOR|GRID-FACTOR-HORI|GRID-FACTOR-HORIZ|GRID-FACTOR-HORIZO|GRID-FACTOR-HORIZON|GRID-FACTOR-HORIZONT|GRID-FACTOR-HORIZONTA|'
- r'GRID-FACTOR-VERTICAL|GRID-FACTOR-V|GRID-FACTOR-VE|GRID-FACTOR-VER|GRID-FACTOR-VERT|GRID-FACTOR-VERT|GRID-FACTOR-VERTI|GRID-FACTOR-VERTIC|GRID-FACTOR-VERTICA|'
- r'GRID-SNAP|'
- r'GRID-UNIT-HEIGHT-CHARS|GRID-UNIT-HEIGHT|GRID-UNIT-HEIGHT-|GRID-UNIT-HEIGHT-C|GRID-UNIT-HEIGHT-CH|GRID-UNIT-HEIGHT-CHA|'
- r'GRID-UNIT-HEIGHT-PIXELS|GRID-UNIT-HEIGHT-P|GRID-UNIT-HEIGHT-PI|GRID-UNIT-HEIGHT-PIX|GRID-UNIT-HEIGHT-PIXE|GRID-UNIT-HEIGHT-PIXEL|'
- r'GRID-UNIT-WIDTH-CHARS|GRID-UNIT-WIDTH|GRID-UNIT-WIDTH-|GRID-UNIT-WIDTH-C|GRID-UNIT-WIDTH-CH|GRID-UNIT-WIDTH-CHA|GRID-UNIT-WIDTH-CHAR|'
- r'GRID-UNIT-WIDTH-PIXELS|GRID-UNIT-WIDTH-P|GRID-UNIT-WIDTH-PI|GRID-UNIT-WIDTH-PIX|GRID-UNIT-WIDTH-PIXE|GRID-UNIT-WIDTH-PIXEL|'
- r'GRID-VISIBLE|GROUP|GT|GUID|HANDLER|HAS-RECORDS|HAVING|HEADER|'
- r'HEIGHT-CHARS|HEIGHT|HEIGHT-|HEIGHT-C|HEIGHT-CH|HEIGHT-CHA|HEIGHT-CHAR|'
- r'HEIGHT-PIXELS|HEIGHT-P|HEIGHT-PI|HEIGHT-PIX|HEIGHT-PIXE|HEIGHT-PIXEL|'
- r'HELP|HEX-DECODE|HEX-ENCODE|HIDDEN|HIDE|'
- r'HORIZONTAL|HORI|HORIZ|HORIZO|HORIZON|HORIZONT|HORIZONTA|'
- r'HOST-BYTE-ORDER|HTML-CHARSET|HTML-END-OF-LINE|HTML-END-OF-PAGE|'
- r'HTML-FRAME-BEGIN|HTML-FRAME-END|HTML-HEADER-BEGIN|HTML-HEADER-END|'
- r'HTML-TITLE-BEGIN|HTML-TITLE-END|HWND|ICON|IF|'
- r'IMAGE|IMAGE-DOWN|IMAGE-INSENSITIVE|IMAGE-SIZE|'
- r'IMAGE-SIZE-CHARS|IMAGE-SIZE-C|IMAGE-SIZE-CH|IMAGE-SIZE-CHA|IMAGE-SIZE-CHAR|'
- r'IMAGE-SIZE-PIXELS|IMAGE-SIZE-P|IMAGE-SIZE-PI|IMAGE-SIZE-PIX|IMAGE-SIZE-PIXE|IMAGE-SIZE-PIXEL|'
- r'IMAGE-UP|IMMEDIATE-DISPLAY|IMPLEMENTS|IMPORT|IMPORT-PRINCIPAL|'
- r'IN|INCREMENT-EXCLUSIVE-ID|INDEX|INDEXED-REPOSITION|INDEX-HINT|'
- r'INDEX-INFORMATION|INDICATOR|'
- r'INFORMATION|INFO|INFOR|INFORM|INFORMA|INFORMAT|INFORMATI|INFORMATIO|'
- r'IN-HANDLE|'
- r'INHERIT-BGCOLOR|INHERIT-BGC|INHERIT-BGCO|INHERIT-BGCOL|INHERIT-BGCOLO|'
- r'INHERIT-FGCOLOR|INHERIT-FGC|INHERIT-FGCO|INHERIT-FGCOL|INHERIT-FGCOLO|'
- r'INHERITS|INITIAL|INIT|INITI|INITIA|INITIAL-DIR|INITIAL-FILTER|'
- r'INITIALIZE-DOCUMENT-TYPE|INITIATE|INNER-CHARS|INNER-LINES|INPUT|'
- r'INPUT-OUTPUT|INPUT-O|INPUT-OU|INPUT-OUT|INPUT-OUTP|INPUT-OUTPU|'
- r'INPUT-VALUE|INSERT|INSERT-ATTRIBUTE|'
- r'INSERT-BACKTAB|INSERT-B|INSERT-BA|INSERT-BAC|INSERT-BACK|INSERT-BACKT|INSERT-BACKTA|'
- r'INSERT-FILE|INSERT-ROW|INSERT-STRING|INSERT-TAB|INSERT-T|INSERT-TA|'
- r'INTERFACE|INTERNAL-ENTRIES|INTO|INVOKE|IS|'
- r'IS-ATTR-SPACE|IS-ATTR|IS-ATTR-|IS-ATTR-S|IS-ATTR-SP|IS-ATTR-SPA|IS-ATTR-SPAC|'
- r'IS-CLASS|IS-CLAS|IS-LEAD-BYTE|IS-ATTR|IS-OPEN|IS-PARAMETER-SET|IS-ROW-SELECTED|'
- r'IS-SELECTED|ITEM|ITEMS-PER-ROW|JOIN|JOIN-BY-SQLDB|KBLABEL|KEEP-CONNECTION-OPEN|'
- r'KEEP-FRAME-Z-ORDER|KEEP-FRAME-Z|KEEP-FRAME-Z-|KEEP-FRAME-Z-O|KEEP-FRAME-Z-OR|KEEP-FRAME-Z-ORD|KEEP-FRAME-Z-ORDE|'
- r'KEEP-MESSAGES|KEEP-SECURITY-CACHE|KEEP-TAB-ORDER|KEY|KEYCODE|KEY-CODE|'
- r'KEYFUNCTION|KEYFUNC|KEYFUNCT|KEYFUNCTI|KEYFUNCTIO|'
- r'KEY-FUNCTION|KEY-FUNC|KEY-FUNCT|KEY-FUNCTI|KEY-FUNCTIO|'
- r'KEYLABEL|KEY-LABEL|KEYS|KEYWORD|KEYWORD-ALL|LABEL|'
- r'LABEL-BGCOLOR|LABEL-BGC|LABEL-BGCO|LABEL-BGCOL|LABEL-BGCOLO|'
- r'LABEL-DCOLOR|LABEL-DC|LABEL-DCO|LABEL-DCOL|LABEL-DCOLO|'
- r'LABEL-FGCOLOR|LABEL-FGC|LABEL-FGCO|LABEL-FGCOL|LABEL-FGCOLO|'
- r'LABEL-FONT|'
- r'LABEL-PFCOLOR|LABEL-PFC|LABEL-PFCO|LABEL-PFCOL|LABEL-PFCOLO|'
- r'LABELS|LANDSCAPE|LANGUAGES|LANGUAGE|LARGE|LARGE-TO-SMALL|LAST|'
- r'LAST-ASYNCH-REQUEST|LAST-BATCH|LAST-CHILD|LAST-EVENT|LAST-EVEN|LAST-FORM|'
- r'LASTKEY|LAST-KEY|LAST-OBJECT|LAST-OF|'
- r'LAST-PROCEDURE|LAST-PROCE|LAST-PROCED|LAST-PROCEDU|LAST-PROCEDUR|'
- r'LAST-SERVER|LAST-TAB-ITEM|LAST-TAB-I|LAST-TAB-IT|LAST-TAB-ITE|'
- r'LC|LDBNAME|LE|LEAVE|LEFT-ALIGNED|LEFT-ALIGN|LEFT-ALIGNE|LEFT-TRIM|'
- r'LENGTH|LIBRARY|LIKE|LIKE-SEQUENTIAL|LINE|LINE-COUNTER|LINE-COUNT|LINE-COUNTE|'
- r'LIST-EVENTS|LISTING|LISTI|LISTIN|LIST-ITEM-PAIRS|LIST-ITEMS|'
- r'LIST-PROPERTY-NAMES|LIST-QUERY-ATTRS|LIST-SET-ATTRS|LIST-WIDGETS|'
- r'LITERAL-QUESTION|LITTLE-ENDIAN|LOAD|LOAD-DOMAINS|LOAD-ICON|'
- r'LOAD-IMAGE|LOAD-IMAGE-DOWN|LOAD-IMAGE-INSENSITIVE|LOAD-IMAGE-UP|'
- r'LOAD-MOUSE-POINTER|LOAD-MOUSE-P|LOAD-MOUSE-PO|LOAD-MOUSE-POI|LOAD-MOUSE-POIN|LOAD-MOUSE-POINT|LOAD-MOUSE-POINTE|'
- r'LOAD-PICTURE|LOAD-SMALL-ICON|LOCAL-NAME|LOCATOR-COLUMN-NUMBER|'
- r'LOCATOR-LINE-NUMBER|LOCATOR-PUBLIC-ID|LOCATOR-SYSTEM-ID|LOCATOR-TYPE|'
- r'LOCKED|LOCK-REGISTRATION|LOG|LOG-AUDIT-EVENT|LOGIN-EXPIRATION-TIMESTAMP|'
- r'LOGIN-HOST|LOGIN-STATE|LOG-MANAGER|LOGOUT|LOOKAHEAD|LOOKUP|LT|'
- r'MACHINE-CLASS|MANDATORY|MANUAL-HIGHLIGHT|MAP|MARGIN-EXTRA|'
- r'MARGIN-HEIGHT-CHARS|MARGIN-HEIGHT|MARGIN-HEIGHT-|MARGIN-HEIGHT-C|MARGIN-HEIGHT-CH|MARGIN-HEIGHT-CHA|MARGIN-HEIGHT-CHAR|'
- r'MARGIN-HEIGHT-PIXELS|MARGIN-HEIGHT-P|MARGIN-HEIGHT-PI|MARGIN-HEIGHT-PIX|MARGIN-HEIGHT-PIXE|MARGIN-HEIGHT-PIXEL|'
- r'MARGIN-WIDTH-CHARS|MARGIN-WIDTH|MARGIN-WIDTH-|MARGIN-WIDTH-C|MARGIN-WIDTH-CH|MARGIN-WIDTH-CHA|MARGIN-WIDTH-CHAR|'
- r'MARGIN-WIDTH-PIXELS|MARGIN-WIDTH-P|MARGIN-WIDTH-PI|MARGIN-WIDTH-PIX|MARGIN-WIDTH-PIXE|MARGIN-WIDTH-PIXEL|'
- r'MARK-NEW|MARK-ROW-STATE|MATCHES|MAX|MAX-BUTTON|'
- r'MAX-CHARS|MAX-DATA-GUESS|MAX-HEIGHT|'
- r'MAX-HEIGHT-CHARS|MAX-HEIGHT-C|MAX-HEIGHT-CH|MAX-HEIGHT-CHA|MAX-HEIGHT-CHAR|'
- r'MAX-HEIGHT-PIXELS|MAX-HEIGHT-P|MAX-HEIGHT-PI|MAX-HEIGHT-PIX|MAX-HEIGHT-PIXE|MAX-HEIGHT-PIXEL|'
- r'MAXIMIZE|MAXIMUM|MAX|MAXI|MAXIM|MAXIMU|MAXIMUM-LEVEL|MAX-ROWS|'
- r'MAX-SIZE|MAX-VALUE|MAX-VAL|MAX-VALU|MAX-WIDTH|'
- r'MAX-WIDTH-CHARS|MAX-WIDTH|MAX-WIDTH-|MAX-WIDTH-C|MAX-WIDTH-CH|MAX-WIDTH-CHA|MAX-WIDTH-CHAR|'
- r'MAX-WIDTH-PIXELS|MAX-WIDTH-P|MAX-WIDTH-PI|MAX-WIDTH-PIX|MAX-WIDTH-PIXE|MAX-WIDTH-PIXEL|'
- r'MD5-DIGEST|MEMBER|MEMPTR-TO-NODE-VALUE|MENU|MENUBAR|MENU-BAR|MENU-ITEM|'
- r'MENU-KEY|MENU-K|MENU-KE|MENU-MOUSE|MENU-M|MENU-MO|MENU-MOU|MENU-MOUS|'
- r'MERGE-BY-FIELD|MESSAGE|MESSAGE-AREA|MESSAGE-AREA-FONT|MESSAGE-LINES|'
- r'METHOD|MIN|MIN-BUTTON|'
- r'MIN-COLUMN-WIDTH-CHARS|MIN-COLUMN-WIDTH-C|MIN-COLUMN-WIDTH-CH|MIN-COLUMN-WIDTH-CHA|MIN-COLUMN-WIDTH-CHAR|'
- r'MIN-COLUMN-WIDTH-PIXELS|MIN-COLUMN-WIDTH-P|MIN-COLUMN-WIDTH-PI|MIN-COLUMN-WIDTH-PIX|MIN-COLUMN-WIDTH-PIXE|MIN-COLUMN-WIDTH-PIXEL|'
- r'MIN-HEIGHT-CHARS|MIN-HEIGHT|MIN-HEIGHT-|MIN-HEIGHT-C|MIN-HEIGHT-CH|MIN-HEIGHT-CHA|MIN-HEIGHT-CHAR|'
- r'MIN-HEIGHT-PIXELS|MIN-HEIGHT-P|MIN-HEIGHT-PI|MIN-HEIGHT-PIX|MIN-HEIGHT-PIXE|MIN-HEIGHT-PIXEL|'
- r'MINIMUM|MIN|MINI|MINIM|MINIMU|MIN-SIZE|'
- r'MIN-VALUE|MIN-VAL|MIN-VALU|'
- r'MIN-WIDTH-CHARS|MIN-WIDTH|MIN-WIDTH-|MIN-WIDTH-C|MIN-WIDTH-CH|MIN-WIDTH-CHA|MIN-WIDTH-CHAR|'
- r'MIN-WIDTH-PIXELS|MIN-WIDTH-P|MIN-WIDTH-PI|MIN-WIDTH-PIX|MIN-WIDTH-PIXE|MIN-WIDTH-PIXEL|'
- r'MODIFIED|MODULO|MOD|MODU|MODUL|MONTH|MOUSE|'
- r'MOUSE-POINTER|MOUSE-P|MOUSE-PO|MOUSE-POI|MOUSE-POIN|MOUSE-POINT|MOUSE-POINTE|'
- r'MOVABLE|'
- r'MOVE-AFTER-TAB-ITEM|MOVE-AFTER|MOVE-AFTER-|MOVE-AFTER-T|MOVE-AFTER-TA|MOVE-AFTER-TAB|MOVE-AFTER-TAB-|MOVE-AFTER-TAB-I|MOVE-AFTER-TAB-IT|MOVE-AFTER-TAB-ITE|'
- r'MOVE-BEFORE-TAB-ITEM|MOVE-BEFOR|MOVE-BEFORE|MOVE-BEFORE-|MOVE-BEFORE-T|MOVE-BEFORE-TA|MOVE-BEFORE-TAB|MOVE-BEFORE-TAB-|MOVE-BEFORE-TAB-I|MOVE-BEFORE-TAB-IT|MOVE-BEFORE-TAB-ITE|'
- r'MOVE-COLUMN|MOVE-COL|MOVE-COLU|MOVE-COLUM|'
- r'MOVE-TO-BOTTOM|MOVE-TO-B|MOVE-TO-BO|MOVE-TO-BOT|MOVE-TO-BOTT|MOVE-TO-BOTTO|'
- r'MOVE-TO-EOF|MOVE-TO-TOP|MOVE-TO-T|MOVE-TO-TO|MPE|MULTI-COMPILE|MULTIPLE|'
- r'MULTIPLE-KEY|MULTITASKING-INTERVAL|MUST-EXIST|NAME|NAMESPACE-PREFIX|'
- r'NAMESPACE-URI|NATIVE|NE|NEEDS-APPSERVER-PROMPT|NEEDS-PROMPT|NEW|'
- r'NEW-INSTANCE|NEW-ROW|NEXT|NEXT-COLUMN|NEXT-PROMPT|NEXT-ROWID|'
- r'NEXT-SIBLING|NEXT-TAB-ITEM|NEXT-TAB-I|NEXT-TAB-IT|NEXT-TAB-ITE|'
- r'NEXT-VALUE|NO|NO-APPLY|NO-ARRAY-MESSAGE|NO-ASSIGN|'
- r'NO-ATTR-LIST|NO-ATTR|NO-ATTR-|NO-ATTR-L|NO-ATTR-LI|NO-ATTR-LIS|'
- r'NO-ATTR-SPACE|NO-ATTR|NO-ATTR-|NO-ATTR-S|NO-ATTR-SP|NO-ATTR-SPA|NO-ATTR-SPAC|'
- r'NO-AUTO-VALIDATE|NO-BIND-WHERE|NO-BOX|NO-CONSOLE|NO-CONVERT|'
- r'NO-CONVERT-3D-COLORS|NO-CURRENT-VALUE|NO-DEBUG|NODE-VALUE-TO-MEMPTR|'
- r'NO-DRAG|NO-ECHO|NO-EMPTY-SPACE|NO-ERROR|NO-FILL|NO-F|NO-FI|'
- r'NO-FIL|NO-FOCUS|NO-HELP|NO-HIDE|NO-INDEX-HINT|'
- r'NO-INHERIT-BGCOLOR|NO-INHERIT-BGC|NO-INHERIT-BGCO|LABEL-BGCOL|LABEL-BGCOLO|'
- r'NO-INHERIT-FGCOLOR|NO-INHERIT-FGC|NO-INHERIT-FGCO|NO-INHERIT-FGCOL|NO-INHERIT-FGCOLO|'
- r'NO-JOIN-BY-SQLDB|NO-LABELS|NO-LABE|NO-LOBS|NO-LOCK|'
- r'NO-LOOKAHEAD|NO-MAP|'
- r'NO-MESSAGE|NO-MES|NO-MESS|NO-MESSA|NO-MESSAG|'
- r'NONAMESPACE-SCHEMA-LOCATION|NONE|NO-PAUSE|'
- r'NO-PREFETCH|NO-PREFE|NO-PREFET|NO-PREFETC|NORMALIZE|'
- r'NO-ROW-MARKERS|NO-SCROLLBAR-VERTICAL|NO-SEPARATE-CONNECTION|'
- r'NO-SEPARATORS|NOT|NO-TAB-STOP|NOT-ACTIVE|'
- r'NO-UNDERLINE|NO-UND|NO-UNDE|NO-UNDER|NO-UNDERL|NO-UNDERLI|NO-UNDERLIN|'
- r'NO-UNDO|'
- r'NO-VALIDATE|NO-VAL|NO-VALI|NO-VALID|NO-VALIDA|NO-VALIDAT|NOW|'
- r'NO-WAIT|NO-WORD-WRAP|NULL|NUM-ALIASES|NUM-ALI|NUM-ALIA|NUM-ALIAS|NUM-ALIASE|'
- r'NUM-BUFFERS|NUM-BUTTONS|NUM-BUT|NUM-BUTT|NUM-BUTTO|NUM-BUTTON|'
- r'NUM-COLUMNS|NUM-COL|NUM-COLU|NUM-COLUM|NUM-COLUMN|NUM-COPIES|'
- r'NUM-DBS|NUM-DROPPED-FILES|NUM-ENTRIES|NUMERIC|'
- r'NUMERIC-FORMAT|NUMERIC-F|NUMERIC-FO|NUMERIC-FOR|NUMERIC-FORM|NUMERIC-FORMA|'
- r'NUM-FIELDS|NUM-FORMATS|NUM-ITEMS|NUM-ITERATIONS|NUM-LINES|'
- r'NUM-LOCKED-COLUMNS|NUM-LOCKED-COL|NUM-LOCKED-COLU|NUM-LOCKED-COLUM|NUM-LOCKED-COLUMN|'
- r'NUM-MESSAGES|NUM-PARAMETERS|NUM-REFERENCES|NUM-REPLACED|NUM-RESULTS|NUM-SELECTED-ROWS|'
- r'NUM-SELECTED-WIDGETS|NUM-SELECTED|NUM-SELECTED-|NUM-SELECTED-W|NUM-SELECTED-WI|NUM-SELECTED-WID|NUM-SELECTED-WIDG|NUM-SELECTED-WIDGE|NUM-SELECTED-WIDGET|'
- r'NUM-TABS|NUM-TO-RETAIN|NUM-VISIBLE-COLUMNS|OCTET-LENGTH|OF|'
- r'OFF|OK|OK-CANCEL|OLD|ON|'
- r'ON-FRAME-BORDER|ON-FRAME|ON-FRAME-|ON-FRAME-B|ON-FRAME-BO|ON-FRAME-BOR|ON-FRAME-BORD|ON-FRAME-BORDE|'
- r'OPEN|OPSYS|OPTION|OR|ORDERED-JOIN|ORDINAL|'
- r'OS-APPEND|OS-COMMAND|OS-COPY|OS-CREATE-DIR|OS-DELETE|OS-DIR|'
- r'OS-DRIVES|OS-DRIVE|OS-ERROR|OS-GETENV|OS-RENAME|OTHERWISE|'
- r'OUTPUT|OVERLAY|OVERRIDE|OWNER|PAGE|'
- r'PAGE-BOTTOM|PAGE-BOT|PAGE-BOTT|PAGE-BOTTO|PAGED|'
- r'PAGE-NUMBER|PAGE-NUM|PAGE-NUMB|PAGE-NUMBE|PAGE-SIZE|'
- r'PAGE-TOP|PAGE-WIDTH|PAGE-WID|PAGE-WIDT|'
- r'PARAMETER|PARAM|PARAME|PARAMET|PARAMETE|'
- r'PARENT|PARSE-STATUS|PARTIAL-KEY|PASCAL|PASSWORD-FIELD|PATHNAME|PAUSE|'
- r'PBE-HASH-ALGORITHM|PBE-HASH-ALG|PBE-HASH-ALGO|PBE-HASH-ALGOR|PBE-HASH-ALGORI|PBE-HASH-ALGORIT|PBE-HASH-ALGORITH|'
- r'PBE-KEY-ROUNDS|PDBNAME|PERSISTENT|PERSIST|PERSISTE|PERSISTEN|'
- r'PERSISTENT-CACHE-DISABLED|PFCOLOR|PFC|PFCO|PFCOL|PFCOLO|PIXELS|'
- r'PIXELS-PER-COLUMN|PIXELS-PER-COL|PIXELS-PER-COLU|PIXELS-PER-COLUM|'
- r'PIXELS-PER-ROW|POPUP-MENU|POPUP-M|POPUP-ME|POPUP-MEN|'
- r'POPUP-ONLY|POPUP-O|POPUP-ON|POPUP-ONL|PORTRAIT|POSITION|'
- r'PRECISION|PREFER-DATASET|PREPARED|PREPARE-STRING|'
- r'PREPROCESS|PREPROC|PREPROCE|PREPROCES|'
- r'PRESELECT|PRESEL|PRESELE|PRESELEC|PREV|PREV-COLUMN|'
- r'PREV-SIBLING|'
- r'PREV-TAB-ITEM|PREV-TAB-I|PREV-TAB-IT|PREV-TAB-ITE|'
- r'PRIMARY|PRINTER|PRINTER-CONTROL-HANDLE|PRINTER-HDC|'
- r'PRINTER-NAME|PRINTER-PORT|PRINTER-SETUP|PRIVATE|'
- r'PRIVATE-DATA|PRIVATE-D|PRIVATE-DA|PRIVATE-DAT|'
- r'PRIVILEGES|'
- r'PROCEDURE|PROCE|PROCED|PROCEDU|PROCEDUR|'
- r'PROCEDURE-CALL-TYPE|'
- r'PROCESS|'
- r'PROC-HANDLE|PROC-HA|PROC-HAN|PROC-HAND|PROC-HANDL|'
- r'PROC-STATUS|PROC-ST|PROC-STA|PROC-STAT|PROC-STATU|'
- r'proc-text|proc-text-buffer|'
- r'PROFILER|PROGRAM-NAME|PROGRESS|'
- r'PROGRESS-SOURCE|PROGRESS-S|PROGRESS-SO|PROGRESS-SOU|PROGRESS-SOUR|PROGRESS-SOURC|'
- r'PROMPT|PROMPT-FOR|PROMPT-F|PROMPT-FO|PROMSGS|PROPATH|'
- r'PROPERTY|PROTECTED|PROVERSION|PROVERS|PROVERSI|PROVERSIO|'
- r'PROXY|PROXY-PASSWORD|PROXY-USERID|PUBLIC|PUBLIC-ID|'
- r'PUBLISH|PUBLISHED-EVENTS|PUT|PUTBYTE|PUT-BYTE|PUT-DOUBLE|'
- r'PUT-FLOAT|PUT-INT64|PUT-KEY-VALUE|PUT-KEY-VAL|PUT-KEY-VALU|PUT-LONG|'
- r'PUT-SHORT|PUT-STRING|PUT-UNSIGNED-LONG|QUERY|QUERY-CLOSE|QUERY-OFF-END|'
- r'QUERY-OPEN|QUERY-PREPARE|QUERY-TUNING|QUESTION|QUIT|QUOTER|'
- r'RADIO-BUTTONS|RADIO-SET|RANDOM|RAW-TRANSFER|'
- r'RCODE-INFORMATION|RCODE-INFO|RCODE-INFOR|RCODE-INFORM|RCODE-INFORMA|RCODE-INFORMAT|RCODE-INFORMATI|RCODE-INFORMATIO|'
- r'READ-AVAILABLE|READ-EXACT-NUM|READ-FILE|READKEY|READ-ONLY|READ-XML|READ-XMLSCHEMA|'
- r'REAL|RECORD-LENGTH|RECTANGLE|RECT|RECTA|RECTAN|RECTANG|RECTANGL|'
- r'RECURSIVE|REFERENCE-ONLY|REFRESH|REFRESHABLE|REFRESH-AUDIT-POLICY|'
- r'REGISTER-DOMAIN|RELEASE|REMOTE|REMOVE-EVENTS-PROCEDURE|REMOVE-SUPER-PROCEDURE|'
- r'REPEAT|REPLACE|REPLACE-SELECTION-TEXT|REPOSITION|REPOSITION-BACKWARD|'
- r'REPOSITION-FORWARD|REPOSITION-MODE|REPOSITION-TO-ROW|REPOSITION-TO-ROWID|'
- r'REQUEST|RESET|RESIZABLE|RESIZA|RESIZAB|RESIZABL|RESIZE|RESTART-ROW|'
- r'RESTART-ROWID|RETAIN|RETAIN-SHAPE|RETRY|RETRY-CANCEL|RETURN|'
- r'RETURN-INSERTED|RETURN-INS|RETURN-INSE|RETURN-INSER|RETURN-INSERT|RETURN-INSERTE|'
- r'RETURNS|RETURN-TO-START-DIR|RETURN-TO-START-DI|'
- r'RETURN-VALUE|RETURN-VAL|RETURN-VALU|'
- r'RETURN-VALUE-DATA-TYPE|REVERSE-FROM|REVERT|'
- r'REVOKE|RGB-VALUE|RIGHT-ALIGNED|RETURN-ALIGN|RETURN-ALIGNE|'
- r'RIGHT-TRIM|R-INDEX|ROLES|ROUND|ROUTINE-LEVEL|ROW|'
- r'ROW-HEIGHT-CHARS|HEIGHT|ROW-HEIGHT-PIXELS|HEIGHT-P|ROW-MARKERS|'
- r'ROW-OF|ROW-RESIZABLE|RULE|RUN|RUN-PROCEDURE|SAVE|SAVE-AS|'
- r'SAVE-FILE|SAX-COMPLETE|SAX-COMPLE|SAX-COMPLET|SAX-PARSE|SAX-PARSE-FIRST|'
- r'SAX-PARSE-NEXT|SAX-PARSER-ERROR|SAX-RUNNING|SAX-UNINITIALIZED|'
- r'SAX-WRITE-BEGIN|SAX-WRITE-COMPLETE|SAX-WRITE-CONTENT|SAX-WRITE-ELEMENT|'
- r'SAX-WRITE-ERROR|SAX-WRITE-IDLE|SAX-WRITER|SAX-WRITE-TAG|SCHEMA|'
- r'SCHEMA-LOCATION|SCHEMA-MARSHAL|SCHEMA-PATH|SCREEN|SCREEN-IO|'
- r'SCREEN-LINES|SCREEN-VALUE|SCREEN-VAL|SCREEN-VALU|SCROLL|SCROLLABLE|'
- r'SCROLLBAR-HORIZONTAL|SCROLLBAR-H|SCROLLBAR-HO|SCROLLBAR-HOR|SCROLLBAR-HORI|SCROLLBAR-HORIZ|SCROLLBAR-HORIZO|SCROLLBAR-HORIZON|SCROLLBAR-HORIZONT|SCROLLBAR-HORIZONTA|'
- r'SCROLL-BARS|'
- r'SCROLLBAR-VERTICAL|SCROLLBAR-V|SCROLLBAR-VE|SCROLLBAR-VER|SCROLLBAR-VERT|SCROLLBAR-VERTI|SCROLLBAR-VERTIC|SCROLLBAR-VERTICA|'
- r'SCROLL-DELTA|'
- r'SCROLLED-ROW-POSITION|SCROLLED-ROW-POS|SCROLLED-ROW-POSI|SCROLLED-ROW-POSIT|SCROLLED-ROW-POSITI|SCROLLED-ROW-POSITIO|'
- r'SCROLLING|SCROLL-OFFSET|SCROLL-TO-CURRENT-ROW|SCROLL-TO-ITEM|SCROLL-TO-I|SCROLL-TO-IT|SCROLL-TO-ITE|'
- r'SCROLL-TO-SELECTED-ROW|SDBNAME|SEAL|SEAL-TIMESTAMP|SEARCH|SEARCH-SELF|SEARCH-TARGET|'
- r'SECTION|SECURITY-POLICY|SEEK|SELECT|SELECTABLE|SELECT-ALL|'
- r'SELECTED|SELECT-FOCUSED-ROW|SELECTION|SELECTION-END|SELECTION-LIST|'
- r'SELECTION-START|SELECTION-TEXT|SELECT-NEXT-ROW|SELECT-PREV-ROW|'
- r'SELECT-ROW|SELF|SEND|send-sql-statement|send-sql|SENSITIVE|'
- r'SEPARATE-CONNECTION|SEPARATOR-FGCOLOR|SEPARATORS|SERVER|'
- r'SERVER-CONNECTION-BOUND|SERVER-CONNECTION-BOUND-REQUEST|'
- r'SERVER-CONNECTION-CONTEXT|SERVER-CONNECTION-ID|SERVER-OPERATING-MODE|'
- r'SESSION|SESSION-ID|SET|SET-APPL-CONTEXT|SET-ATTR-CALL-TYPE|SET-ATTRIBUTE-NODE|'
- r'SET-BLUE-VALUE|SET-BLUE|SET-BLUE-|SET-BLUE-V|SET-BLUE-VA|SET-BLUE-VAL|SET-BLUE-VALU|'
- r'SET-BREAK|SET-BUFFERS|SET-CALLBACK|SET-CLIENT|SET-COMMIT|SET-CONTENTS|'
- r'SET-CURRENT-VALUE|SET-DB-CLIENT|SET-DYNAMIC|SET-EVENT-MANAGER-OPTION|'
- r'SET-GREEN-VALUE|SET-GREEN|SET-GREEN-|SET-GREEN-V|SET-GREEN-VA|SET-GREEN-VAL|SET-GREEN-VALU|'
- r'SET-INPUT-SOURCE|SET-OPTION|SET-OUTPUT-DESTINATION|SET-PARAMETER|SET-POINTER-VALUE|'
- r'SET-PROPERTY|SET-RED-VALUE|SET-RED|SET-RED-|SET-RED-V|SET-RED-VA|SET-RED-VAL|SET-RED-VALU|'
- r'SET-REPOSITIONED-ROW|SET-RGB-VALUE|SET-ROLLBACK|SET-SELECTION|SET-SIZE|'
- r'SET-SORT-ARROW|SETUSERID|SETUSER|SETUSERI|SET-WAIT-STATE|SHA1-DIGEST|SHARED|'
- r'SHARE-LOCK|SHARE|SHARE-|SHARE-L|SHARE-LO|SHARE-LOC|SHOW-IN-TASKBAR|SHOW-STATS|SHOW-STAT|'
- r'SIDE-LABEL-HANDLE|SIDE-LABEL-H|SIDE-LABEL-HA|SIDE-LABEL-HAN|SIDE-LABEL-HAND|SIDE-LABEL-HANDL|'
- r'SIDE-LABELS|SIDE-LAB|SIDE-LABE|SIDE-LABEL|'
- r'SILENT|SIMPLE|SINGLE|SIZE|'
- r'SIZE-CHARS|SIZE-C|SIZE-CH|SIZE-CHA|SIZE-CHAR|'
- r'SIZE-PIXELS|SIZE-P|SIZE-PI|SIZE-PIX|SIZE-PIXE|SIZE-PIXEL|SKIP|'
- r'SKIP-DELETED-RECORD|SLIDER|SMALL-ICON|SMALLINT|SMALL-TITLE|SOME|SORT|'
- r'SORT-ASCENDING|SORT-NUMBER|SOURCE|SOURCE-PROCEDURE|SPACE|SQL|SQRT|'
- r'SSL-SERVER-NAME|STANDALONE|START|START-DOCUMENT|START-ELEMENT|START-MOVE|'
- r'START-RESIZE|START-ROW-RESIZE|STATE-DETAIL|STATIC|STATUS|STATUS-AREA|STATUS-AREA-FONT|'
- r'STDCALL|STOP|STOP-PARSING|STOPPED|STOPPE|'
- r'STORED-PROCEDURE|STORED-PROC|STORED-PROCE|STORED-PROCED|STORED-PROCEDU|STORED-PROCEDUR|'
- r'STREAM|STREAM-HANDLE|STREAM-IO|STRETCH-TO-FIT|STRICT|STRING|STRING-VALUE|STRING-XREF|'
- r'SUB-AVERAGE|SUB-AVE|SUB-AVER|SUB-AVERA|SUB-AVERAG|'
- r'SUB-COUNT|SUB-MAXIMUM|SUM-MAX|SUM-MAXI|SUM-MAXIM|SUM-MAXIMU|SUB-MENU|SUBSUB-|'
- r'MINIMUM|SUB-MIN|SUBSCRIBE|SUBSTITUTE|SUBST|SUBSTI|SUBSTIT|SUBSTITU|SUBSTITUT|'
- r'SUBSTRING|SUBSTR|SUBSTRI|SUBSTRIN|SUB-TOTAL|SUBTYPE|SUM|SUPER|SUPER-PROCEDURES|'
- r'SUPPRESS-NAMESPACE-PROCESSING|'
- r'SUPPRESS-WARNINGS|SUPPRESS-W|SUPPRESS-WA|SUPPRESS-WAR|SUPPRESS-WARN|SUPPRESS-WARNI|SUPPRESS-WARNIN|SUPPRESS-WARNING|'
- r'SYMMETRIC-ENCRYPTION-ALGORITHM|SYMMETRIC-ENCRYPTION-IV|SYMMETRIC-ENCRYPTION-KEY|SYMMETRIC-SUPPORT|'
- r'SYSTEM-ALERT-BOXES|SYSTEM-ALERT|SYSTEM-ALERT-|SYSTEM-ALERT-B|SYSTEM-ALERT-BO|SYSTEM-ALERT-BOX|SYSTEM-ALERT-BOXE|'
- r'SYSTEM-DIALOG|SYSTEM-HELP|SYSTEM-ID|TABLE|TABLE-HANDLE|TABLE-NUMBER|TAB-POSITION|'
- r'TAB-STOP|TARGET|TARGET-PROCEDURE|'
- r'TEMP-DIRECTORY|TEMP-DIR|TEMP-DIRE|TEMP-DIREC|TEMP-DIRECT|TEMP-DIRECTO|TEMP-DIRECTOR|'
- r'TEMP-TABLE|TEMP-TABLE-PREPARE|TERM|TERMINAL|TERM|TERMI|TERMIN|TERMINA|'
- r'TERMINATE|TEXT|TEXT-CURSOR|TEXT-SEG-GROW|TEXT-SELECTED|THEN|'
- r'THIS-OBJECT|THIS-PROCEDURE|THREE-D|THROW|THROUGH|THRU|TIC-MARKS|TIME|'
- r'TIME-SOURCE|TITLE|'
- r'TITLE-BGCOLOR|TITLE-BGC|TITLE-BGCO|TITLE-BGCOL|TITLE-BGCOLO|'
- r'TITLE-DCOLOR|TITLE-DC|TITLE-DCO|TITLE-DCOL|TITLE-DCOLO|'
- r'TITLE-FGCOLOR|TITLE-FGC|TITLE-FGCO|TITLE-FGCOL|TITLE-FGCOLO|'
- r'TITLE-FONT|TITLE-FO|TITLE-FON|'
- r'TO|TODAY|TOGGLE-BOX|TOOLTIP|TOOLTIPS|TOPIC|TOP-NAV-QUERY|TOP-ONLY|'
- r'TO-ROWID|TOTAL|TRAILING|TRANS|TRANSACTION|TRANSACTION-MODE|'
- r'TRANS-INIT-PROCEDURE|TRANSPARENT|TRIGGER|TRIGGERS|TRIM|'
- r'TRUE|TRUNCATE|TRUNC|TRUNCA|TRUNCAT|TYPE|TYPE-OF|'
- r'UNBOX|UNBUFFERED|UNBUFF|UNBUFFE|UNBUFFER|UNBUFFERE|'
- r'UNDERLINE|UNDERL|UNDERLI|UNDERLIN|UNDO|'
- r'UNFORMATTED|UNFORM|UNFORMA|UNFORMAT|UNFORMATT|UNFORMATTE|UNION|'
- r'UNIQUE|UNIQUE-ID|UNIQUE-MATCH|UNIX|UNLESS-HIDDEN|UNLOAD|'
- r'UNSIGNED-LONG|UNSUBSCRIBE|UP|UPDATE|UPDATE-ATTRIBUTE|'
- r'URL|URL-DECODE|URL-ENCODE|URL-PASSWORD|URL-USERID|USE|'
- r'USE-DICT-EXPS|USE-FILENAME|USE-INDEX|USER|USE-REVVIDEO|'
- r'USERID|USER-ID|USE-TEXT|USE-UNDERLINE|USE-WIDGET-POOL|'
- r'USING|V6DISPLAY|V6FRAME|VALIDATE|VALIDATE-EXPRESSION|'
- r'VALIDATE-MESSAGE|VALIDATE-SEAL|VALIDATION-ENABLED|VALID-EVENT|'
- r'VALID-HANDLE|VALID-OBJECT|VALUE|VALUE-CHANGED|VALUES|'
- r'VARIABLE|VAR|VARI|VARIA|VARIAB|VARIABL|VERBOSE|'
- r'VERSION|VERTICAL|VERT|VERTI|VERTIC|VERTICA|'
- r'VIEW|VIEW-AS|VIEW-FIRST-COLUMN-ON-REOPEN|'
- r'VIRTUAL-HEIGHT-CHARS|VIRTUAL-HEIGHT|VIRTUAL-HEIGHT-|VIRTUAL-HEIGHT-C|VIRTUAL-HEIGHT-CH|VIRTUAL-HEIGHT-CHA|VIRTUAL-HEIGHT-CHAR|'
- r'VIRTUAL-HEIGHT-PIXELS|VIRTUAL-HEIGHT-P|VIRTUAL-HEIGHT-PI|VIRTUAL-HEIGHT-PIX|VIRTUAL-HEIGHT-PIXE|VIRTUAL-HEIGHT-PIXEL|'
- r'VIRTUAL-WIDTH-CHARS|VIRTUAL-WIDTH|VIRTUAL-WIDTH-|VIRTUAL-WIDTH-C|VIRTUAL-WIDTH-CH|VIRTUAL-WIDTH-CHA|VIRTUAL-WIDTH-CHAR|'
- r'VIRTUAL-WIDTH-PIXELS|VIRTUAL-WIDTH-P|VIRTUAL-WIDTH-PI|VIRTUAL-WIDTH-PIX|VIRTUAL-WIDTH-PIXE|VIRTUAL-WIDTH-PIXEL|'
- r'VISIBLE|VOID|WAIT|WAIT-FOR|WARNING|WEB-CONTEXT|WEEKDAY|WHEN|'
- r'WHERE|WHILE|WIDGET|'
- r'WIDGET-ENTER|WIDGET-E|WIDGET-EN|WIDGET-ENT|WIDGET-ENTE|'
- r'WIDGET-ID|'
- r'WIDGET-LEAVE|WIDGET-L|WIDGET-LE|WIDGET-LEA|WIDGET-LEAV|'
- r'WIDGET-POOL|WIDTH|'
- r'WIDTH-CHARS|WIDTH|WIDTH-|WIDTH-C|WIDTH-CH|WIDTH-CHA|WIDTH-CHAR|'
- r'WIDTH-PIXELS|WIDTH-P|WIDTH-PI|WIDTH-PIX|WIDTH-PIXE|WIDTH-PIXEL|'
- r'WINDOW|'
- r'WINDOW-MAXIMIZED|WINDOW-MAXIM|WINDOW-MAXIMI|WINDOW-MAXIMIZ|WINDOW-MAXIMIZE|'
- r'WINDOW-MINIMIZED|WINDOW-MINIM|WINDOW-MINIMI|WINDOW-MINIMIZ|WINDOW-MINIMIZE|'
- r'WINDOW-NAME|WINDOW-NORMAL|WINDOW-STATE|WINDOW-STA|WINDOW-STAT|'
- r'WINDOW-SYSTEM|WITH|WORD-INDEX|WORD-WRAP|WORK-AREA-HEIGHT-PIXELS|'
- r'WORK-AREA-WIDTH-PIXELS|WORK-AREA-X|WORK-AREA-Y|WORKFILE|'
- r'WORK-TABLE|WORK-TAB|WORK-TABL|WRITE|WRITE-CDATA|WRITE-CHARACTERS|'
- r'WRITE-COMMENT|WRITE-DATA-ELEMENT|WRITE-EMPTY-ELEMENT|WRITE-ENTITY-REF|'
- r'WRITE-EXTERNAL-DTD|WRITE-FRAGMENT|WRITE-MESSAGE|'
- r'WRITE-PROCESSING-INSTRUCTION|WRITE-STATUS|WRITE-XML|WRITE-XMLSCHEMA|'
- r'X|XCODE|XML-DATA-TYPE|XML-NODE-TYPE|XML-SCHEMA-PATH|'
- r'XML-SUPPRESS-NAMESPACE-PROCESSING|X-OF|XREF|'
- r'XREF-XML|Y|YEAR|YEAR-OFFSET|YES|YES-NO|'
- r'YES-NO-CANCEL|Y-OF)\s*($|(?=[^0-9a-z_\-]))')
-
+ keywords = (r'(?i)(^|(?<=[^0-9a-z_\-]))(' +
+ r'|'.join(OPENEDGEKEYWORDS) +
+ r')\s*($|(?=[^0-9a-z_\-]))')
tokens = {
'root': [
(r'/\*', Comment.Multiline, 'comment'),
@@ -3351,13 +2889,15 @@ class BroLexer(RegexLexer):
class CbmBasicV2Lexer(RegexLexer):
"""
For CBM BASIC V2 sources.
+
+ *New in Pygments 1.6.*
"""
name = 'CBM BASIC V2'
aliases = ['cbmbas']
filenames = ['*.bas']
-
+
flags = re.IGNORECASE
-
+
tokens = {
'root': [
(r'rem.*\n', Comment.Single),
@@ -3377,6 +2917,12 @@ class CbmBasicV2Lexer(RegexLexer):
]
}
+ def analyse_text(self, text):
+ # if it starts with a line number, it shouldn't be a "modern" Basic
+ # like VB.net
+ if re.match(r'\d+', text):
+ return True
+
class MscgenLexer(RegexLexer):
"""
@@ -3511,3 +3057,413 @@ class KconfigLexer(RegexLexer):
'indent2': do_indent(2),
'indent1': do_indent(1),
}
+
+
+class VGLLexer(RegexLexer):
+ """
+ For `SampleManager VGL <http://www.thermoscientific.com/samplemanager>`_
+ source code.
+
+ *New in Pygments 1.6.*
+ """
+ name = 'VGL'
+ aliases = ['vgl']
+ filenames = ['*.rpf']
+
+ flags = re.MULTILINE | re.DOTALL | re.IGNORECASE
+
+ tokens = {
+ 'root': [
+ (r'\{[^\}]*\}', Comment.Multiline),
+ (r'declare', Keyword.Constant),
+ (r'(if|then|else|endif|while|do|endwhile|and|or|prompt|object'
+ r'|create|on|line|with|global|routine|value|endroutine|constant'
+ r'|global|set|join|library|compile_option|file|exists|create|copy'
+ r'|delete|enable|windows|name|notprotected)(?! *[=<>.,()])',
+ Keyword),
+ (r'(true|false|null|empty|error|locked)', Keyword.Constant),
+ (r'[~\^\*\#!%&\[\]\(\)<>\|+=:;,./?-]', Operator),
+ (r'"[^"]*"', String),
+ (r'(\.)([a-z_\$][a-z0-9_\$]*)', bygroups(Operator, Name.Attribute)),
+ (r'[0-9][0-9]*(\.[0-9]+(e[+\-]?[0-9]+)?)?', Number),
+ (r'[a-z_\$][a-z0-9_\$]*', Name),
+ (r'[\r\n]+', Text),
+ (r'\s+', Text)
+ ]
+ }
+
+
+class SourcePawnLexer(RegexLexer):
+ """
+ For SourcePawn source code with preprocessor directives.
+
+ *New in Pygments 1.6.*
+ """
+ name = 'SourcePawn'
+ aliases = ['sp']
+ filenames = ['*.sp']
+ mimetypes = ['text/x-sourcepawn']
+
+ #: optional Comment or Whitespace
+ _ws = r'(?:\s|//.*?\n|/\*.*?\*/)+'
+
+ tokens = {
+ 'root': [
+ # preprocessor directives: without whitespace
+ ('^#if\s+0', Comment.Preproc, 'if0'),
+ ('^#', Comment.Preproc, 'macro'),
+ # or with whitespace
+ ('^' + _ws + r'#if\s+0', Comment.Preproc, 'if0'),
+ ('^' + _ws + '#', Comment.Preproc, 'macro'),
+ (r'\n', Text),
+ (r'\s+', Text),
+ (r'\\\n', Text), # line continuation
+ (r'/(\\\n)?/(\n|(.|\n)*?[^\\]\n)', Comment.Single),
+ (r'/(\\\n)?\*(.|\n)*?\*(\\\n)?/', Comment.Multiline),
+ (r'[{}]', Punctuation),
+ (r'L?"', String, 'string'),
+ (r"L?'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'", String.Char),
+ (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*', Number.Float),
+ (r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float),
+ (r'0x[0-9a-fA-F]+[LlUu]*', Number.Hex),
+ (r'0[0-7]+[LlUu]*', Number.Oct),
+ (r'\d+[LlUu]*', Number.Integer),
+ (r'\*/', Error),
+ (r'[~!%^&*+=|?:<>/-]', Operator),
+ (r'[()\[\],.;]', Punctuation),
+ (r'(case|const|continue|native|'
+ r'default|else|enum|for|if|new|operator|'
+ r'public|return|sizeof|static|decl|struct|switch)\b', Keyword),
+ (r'(bool|Float)\b', Keyword.Type),
+ (r'(true|false)\b', Keyword.Constant),
+ ('[a-zA-Z_][a-zA-Z0-9_]*', Name),
+ ],
+ 'string': [
+ (r'"', String, '#pop'),
+ (r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape),
+ (r'[^\\"\n]+', String), # all other characters
+ (r'\\\n', String), # line continuation
+ (r'\\', String), # stray backslash
+ ],
+ 'macro': [
+ (r'[^/\n]+', Comment.Preproc),
+ (r'/\*(.|\n)*?\*/', Comment.Multiline),
+ (r'//.*?\n', Comment.Single, '#pop'),
+ (r'/', Comment.Preproc),
+ (r'(?<=\\)\n', Comment.Preproc),
+ (r'\n', Comment.Preproc, '#pop'),
+ ],
+ 'if0': [
+ (r'^\s*#if.*?(?<!\\)\n', Comment.Preproc, '#push'),
+ (r'^\s*#endif.*?(?<!\\)\n', Comment.Preproc, '#pop'),
+ (r'.*?\n', Comment),
+ ]
+ }
+
+ SM_TYPES = ['Action', 'bool', 'Float', 'Plugin', 'String', 'any',
+ 'AdminFlag', 'OverrideType', 'OverrideRule', 'ImmunityType',
+ 'GroupId', 'AdminId', 'AdmAccessMode', 'AdminCachePart',
+ 'CookieAccess', 'CookieMenu', 'CookieMenuAction', 'NetFlow',
+ 'ConVarBounds', 'QueryCookie', 'ReplySource',
+ 'ConVarQueryResult', 'ConVarQueryFinished', 'Function',
+ 'Action', 'Identity', 'PluginStatus', 'PluginInfo', 'DBResult',
+ 'DBBindType', 'DBPriority', 'PropType', 'PropFieldType',
+ 'MoveType', 'RenderMode', 'RenderFx', 'EventHookMode',
+ 'EventHook', 'FileType', 'FileTimeMode', 'PathType',
+ 'ParamType', 'ExecType', 'DialogType', 'Handle', 'KvDataTypes',
+ 'NominateResult', 'MapChange', 'MenuStyle', 'MenuAction',
+ 'MenuSource', 'RegexError', 'SDKCallType', 'SDKLibrary',
+ 'SDKFuncConfSource', 'SDKType', 'SDKPassMethod', 'RayType',
+ 'TraceEntityFilter', 'ListenOverride', 'SortOrder', 'SortType',
+ 'SortFunc2D', 'APLRes', 'FeatureType', 'FeatureStatus',
+ 'SMCResult', 'SMCError', 'TFClassType', 'TFTeam', 'TFCond',
+ 'TFResourceType', 'Timer', 'TopMenuAction', 'TopMenuObjectType',
+ 'TopMenuPosition', 'TopMenuObject', 'UserMsg']
+
+ def __init__(self, **options):
+ self.smhighlighting = get_bool_opt(options,
+ 'sourcemod', True)
+
+ self._functions = []
+ if self.smhighlighting:
+ from pygments.lexers._sourcemodbuiltins import FUNCTIONS
+ self._functions.extend(FUNCTIONS)
+ RegexLexer.__init__(self, **options)
+
+ def get_tokens_unprocessed(self, text):
+ for index, token, value in \
+ RegexLexer.get_tokens_unprocessed(self, text):
+ if token is Name:
+ if self.smhighlighting:
+ if value in self.SM_TYPES:
+ token = Keyword.Type
+ elif value in self._functions:
+ token = Name.Builtin
+ yield index, token, value
+
+
+class PuppetLexer(RegexLexer):
+ """
+ For `Puppet <http://puppetlabs.com/>`__ configuration DSL.
+
+ *New in Pygments 1.6.*
+ """
+ name = 'Puppet'
+ aliases = ['puppet']
+ filenames = ['*.pp']
+
+ tokens = {
+ 'root': [
+ include('comments'),
+ include('keywords'),
+ include('names'),
+ include('numbers'),
+ include('operators'),
+ include('strings'),
+
+ (r'[]{}:(),;[]', Punctuation),
+ (r'[^\S\n]+', Text),
+ ],
+
+ 'comments': [
+ (r'\s*#.*$', Comment),
+ (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline),
+ ],
+
+ 'operators': [
+ (r'(=>|\?|<|>|=|\+|-|/|\*|~|!|\|)', Operator),
+ (r'(in|and|or|not)\b', Operator.Word),
+ ],
+
+ 'names': [
+ ('[a-zA-Z_][a-zA-Z0-9_]*', Name.Attribute),
+ (r'(\$\S+)(\[)(\S+)(\])', bygroups(Name.Variable, Punctuation,
+ String, Punctuation)),
+ (r'\$\S+', Name.Variable),
+ ],
+
+ 'numbers': [
+ # Copypasta from the Python lexer
+ (r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?j?', Number.Float),
+ (r'\d+[eE][+-]?[0-9]+j?', Number.Float),
+ (r'0[0-7]+j?', Number.Oct),
+ (r'0[xX][a-fA-F0-9]+', Number.Hex),
+ (r'\d+L', Number.Integer.Long),
+ (r'\d+j?', Number.Integer)
+ ],
+
+ 'keywords': [
+ # Left out 'group' and 'require'
+ # Since they're often used as attributes
+ (r'(?i)(absent|alert|alias|audit|augeas|before|case|check|class|'
+ r'computer|configured|contained|create_resources|crit|cron|debug|'
+ r'default|define|defined|directory|else|elsif|emerg|err|exec|'
+ r'extlookup|fail|false|file|filebucket|fqdn_rand|generate|host|if|'
+ r'import|include|info|inherits|inline_template|installed|'
+ r'interface|k5login|latest|link|loglevel|macauthorization|'
+ r'mailalias|maillist|mcx|md5|mount|mounted|nagios_command|'
+ r'nagios_contact|nagios_contactgroup|nagios_host|'
+ r'nagios_hostdependency|nagios_hostescalation|nagios_hostextinfo|'
+ r'nagios_hostgroup|nagios_service|nagios_servicedependency|'
+ r'nagios_serviceescalation|nagios_serviceextinfo|'
+ r'nagios_servicegroup|nagios_timeperiod|node|noop|notice|notify|'
+ r'package|present|purged|realize|regsubst|resources|role|router|'
+ r'running|schedule|scheduled_task|search|selboolean|selmodule|'
+ r'service|sha1|shellquote|split|sprintf|ssh_authorized_key|sshkey|'
+ r'stage|stopped|subscribe|tag|tagged|template|tidy|true|undef|'
+ r'unmounted|user|versioncmp|vlan|warning|yumrepo|zfs|zone|'
+ r'zpool)\b', Keyword),
+ ],
+
+ 'strings': [
+ (r'"([^"])*"', String),
+ (r'\'([^\'])*\'', String),
+ ],
+
+ }
+
+
+class NSISLexer(RegexLexer):
+ """
+ For `NSIS <http://nsis.sourceforge.net/>`_ scripts.
+
+ *New in Pygments 1.6.*
+ """
+ name = 'NSIS'
+ aliases = ['nsis', 'nsi', 'nsh']
+ filenames = ['*.nsi', '*.nsh']
+ mimetypes = ['text/x-nsis']
+
+ flags = re.IGNORECASE
+
+ tokens = {
+ 'root': [
+ (r'[;\#].*\n', Comment),
+ (r"'.*'", String.Single),
+ (r'"', String.Double, 'str_double'),
+ (r'`', String.Backtick, 'str_backtick'),
+ include('macro'),
+ include('interpol'),
+ include('basic'),
+ (r'\$\{[a-zA-Z_\|][a-zA-Z0-9_\|]*\}', Keyword.Pseudo),
+ (r'\/[a-zA-Z_][a-zA-Z0-9_]*', Name.Attribute),
+ ('.', Text),
+ ],
+ 'basic': [
+ (r'(\n)(Function)(\s+)([\.\_a-zA-Z][\.\_a-zA-Z0-9]*)\b',
+ bygroups(Text, Keyword, Text, Name.Function)),
+ (r'\b([_a-zA-Z][_a-zA-Z0-9]*)(::)([a-zA-Z][a-zA-Z0-9]*)\b',
+ bygroups(Keyword.Namespace, Punctuation, Name.Function)),
+ (r'\b([_a-zA-Z][_a-zA-Z0-9]*)(:)', bygroups(Name.Label, Punctuation)),
+ (r'(\b[ULS]|\B)([\!\<\>=]?=|\<\>?|\>)\B', Operator),
+ (r'[\+\-\|]', Operator),
+ (r'[\\]', Punctuation),
+ (r'\b(Abort|Add(?:BrandingImage|Size)|Allow(?:RootDirInstall|SkipFiles)|'
+ r'AutoCloseWindow|BG(?:Font|Gradient)|BrandingText|BringToFront|'
+ r'Call(?:InstDLL)?|(?:Sub)?Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|'
+ r'ComponentText|CopyFiles|CRCCheck|Create(?:Directory|Font|Shortcut)|'
+ r'Delete(?:INI(?:Sec|Str)|Reg(?:Key|Value))?|DetailPrint|DetailsButtonText|'
+ r'Dir(?:Show|Text|Var|Verify)|(?:Disabled|Enabled)Bitmap|EnableWindow|'
+ r'EnumReg(?:Key|Value)|Exch|Exec(?:Shell|Wait)?|ExpandEnvStrings|'
+ r'File(?:BufSize|Close|ErrorText|Open|Read(?:Byte)?|Seek|Write(?:Byte)?)?|'
+ r'Find(?:Close|First|Next|Window)|FlushINI|Function(?:End)?|'
+ r'Get(?:CurInstType|CurrentAddress|DlgItem|DLLVersion(?:Local)?|ErrorLevel|'
+ r'FileTime(?:Local)?|FullPathName|FunctionAddress|InstDirError|LabelAddress|TempFileName)|'
+ r'Goto|HideWindow|Icon|If(?:Abort|Errors|FileExists|RebootFlag|Silent)|'
+ r'InitPluginsDir|Install(?:ButtonText|Colors|Dir(?:RegKey)?)|'
+ r'Inst(?:ProgressFlags|Type(?:[GS]etText)?)|Int(?:CmpU?|Fmt|Op)|IsWindow|'
+ r'LangString(?:UP)?|License(?:BkColor|Data|ForceSelection|LangString|Text)|'
+ r'LoadLanguageFile|LockWindow|Log(?:Set|Text)|MessageBox|MiscButtonText|'
+ r'Name|Nop|OutFile|(?:Uninst)?Page(?:Ex(?:End)?)?|PluginDir|Pop|Push|Quit|'
+ r'Read(?:(?:Env|INI|Reg)Str|RegDWORD)|Reboot|(?:Un)?RegDLL|Rename|RequestExecutionLevel|'
+ r'ReserveFile|Return|RMDir|SearchPath|'
+ r'Section(?:Divider|End|(?:(?:Get|Set)(?:Flags|InstTypes|Size|Text))|Group(?:End)?|In)?|'
+ r'SendMessage|'
+ r'Set(?:AutoClose|BrandingImage|Compress(?:ionLevel|or(?:DictSize)?)?|CtlColors|'
+ r'CurInstType|DatablockOptimize|DateSave|Details(?:Print|View)|Error(?:s|Level)|'
+ r'FileAttributes|Font|OutPath|Overwrite|PluginUnload|RebootFlag|ShellVarContext|'
+ r'Silent|StaticBkColor)|'
+ r'Show(?:(?:I|Uni)nstDetails|Window)|Silent(?:Un)?Install|Sleep|SpaceTexts|'
+ r'Str(?:CmpS?|Cpy|Len)|SubSection(?:End)?|'
+ r'Uninstall(?:ButtonText|(?:Sub)?Caption|EXEName|Icon|Text)|UninstPage|'
+ r'Var|VI(?:AddVersionKey|ProductVersion)|WindowIcon|'
+ r'Write(?:INIStr|Reg(:?Bin|DWORD|(?:Expand)?Str)|Uninstaller)|XPStyle)\b',
+ Keyword),
+ (r'\b(CUR|END|(?:FILE_ATTRIBUTE_)?(?:ARCHIVE|HIDDEN|NORMAL|OFFLINE|READONLY|SYSTEM|TEMPORARY)|'
+ r'HK(CC|CR|CU|DD|LM|PD|U)|'
+ r'HKEY_(?:CLASSES_ROOT|CURRENT_(?:CONFIG|USER)|DYN_DATA|LOCAL_MACHINE|PERFORMANCE_DATA|USERS)|'
+ r'ID(?:ABORT|CANCEL|IGNORE|NO|OK|RETRY|YES)|'
+ r'MB_(?:ABORTRETRYIGNORE|DEFBUTTON[1-4]|ICON(?:EXCLAMATION|INFORMATION|QUESTION|STOP)|'
+ r'OK(?:CANCEL)?|RETRYCANCEL|RIGHT|SETFOREGROUND|TOPMOST|USERICON|YESNO(?:CANCEL)?)|'
+ r'SET|SHCTX|SW_(?:HIDE|SHOW(?:MAXIMIZED|MINIMIZED|NORMAL))|'
+ r'admin|all|auto|both|bottom|bzip2|checkbox|colored|current|false|force|'
+ r'hide|highest|if(?:diff|newer)|lastused|leave|left|listonly|lzma|nevershow|'
+ r'none|normal|off|on|pop|push|radiobuttons|right|show|silent|silentlog|'
+ r'smooth|textonly|top|true|try|user|zlib)\b',
+ Name.Constant),
+ ],
+ 'macro': [
+ (r'\!(addincludedir(?:dir)?|addplugindir|appendfile|cd|define|'
+ r'delfilefile|echo(?:message)?|else|endif|error|execute|'
+ r'if(?:macro)?n?(?:def)?|include|insertmacro|macro(?:end)?|packhdr|'
+ r'search(?:parse|replace)|system|tempfilesymbol|undef|verbose|warning)\b',
+ Comment.Preproc),
+ ],
+ 'interpol': [
+ (r'\$(R?[0-9])', Name.Builtin.Pseudo), # registers
+ (r'\$(ADMINTOOLS|APPDATA|CDBURN_AREA|COOKIES|COMMONFILES(?:32|64)|'
+ r'DESKTOP|DOCUMENTS|EXE(?:DIR|FILE|PATH)|FAVORITES|FONTS|HISTORY|'
+ r'HWNDPARENT|INTERNET_CACHE|LOCALAPPDATA|MUSIC|NETHOOD|PICTURES|'
+ r'PLUGINSDIR|PRINTHOOD|PROFILE|PROGRAMFILES(?:32|64)|QUICKLAUNCH|'
+ r'RECENT|RESOURCES(?:_LOCALIZED)?|SENDTO|SM(?:PROGRAMS|STARTUP)|'
+ r'STARTMENU|SYSDIR|TEMP(?:LATES)?|VIDEOS|WINDIR|\{NSISDIR\})',
+ Name.Builtin),
+ (r'\$(CMDLINE|INSTDIR|OUTDIR|LANGUAGE)', Name.Variable.Global),
+ (r'\$[a-zA-Z_][a-zA-Z0-9_]*', Name.Variable),
+ ],
+ 'str_double': [
+ (r'"', String, '#pop'),
+ (r'\$(\\[nrt"]|\$)', String.Escape),
+ include('interpol'),
+ (r'.', String.Double),
+ ],
+ 'str_backtick': [
+ (r'`', String, '#pop'),
+ (r'\$(\\[nrt"]|\$)', String.Escape),
+ include('interpol'),
+ (r'.', String.Double),
+ ],
+ }
+
+
+class RPMSpecLexer(RegexLexer):
+ """
+ For RPM *.spec files
+
+ *New in Pygments 1.6.*
+ """
+
+ name = 'RPMSpec'
+ aliases = ['spec']
+ filenames = ['*.spec']
+ mimetypes = ['text/x-rpm-spec']
+
+ _directives = ('(?:package|prep|build|install|clean|check|pre[a-z]*|'
+ 'post[a-z]*|trigger[a-z]*|files)')
+
+ tokens = {
+ 'root': [
+ (r'#.*\n', Comment),
+ include('basic'),
+ ],
+ 'description': [
+ (r'^(%' + _directives + ')(.*)$',
+ bygroups(Name.Decorator, Text), '#pop'),
+ (r'\n', Text),
+ (r'.', Text),
+ ],
+ 'changelog': [
+ (r'\*.*\n', Generic.Subheading),
+ (r'^(%' + _directives + ')(.*)$',
+ bygroups(Name.Decorator, Text), '#pop'),
+ (r'\n', Text),
+ (r'.', Text),
+ ],
+ 'string': [
+ (r'"', String.Double, '#pop'),
+ (r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape),
+ include('interpol'),
+ (r'.', String.Double),
+ ],
+ 'basic': [
+ include('macro'),
+ (r'(?i)^(Name|Version|Release|Epoch|Summary|Group|License|Packager|'
+ r'Vendor|Icon|URL|Distribution|Prefix|Patch[0-9]*|Source[0-9]*|'
+ r'Requires\(?[a-z]*\)?|[A-Za-z]+Req|Obsoletes|Provides|Conflicts|'
+ r'Build[A-Za-z]+|[A-Za-z]+Arch|Auto[A-Za-z]+)(:)(.*)$',
+ bygroups(Generic.Heading, Punctuation, using(this))),
+ (r'^%description', Name.Decorator, 'description'),
+ (r'^%changelog', Name.Decorator, 'changelog'),
+ (r'^(%' + _directives + ')(.*)$', bygroups(Name.Decorator, Text)),
+ (r'%(attr|defattr|dir|doc(?:dir)?|setup|config(?:ure)?|'
+ r'make(?:install)|ghost|patch[0-9]+|find_lang|exclude|verify)',
+ Keyword),
+ include('interpol'),
+ (r"'.*'", String.Single),
+ (r'"', String.Double, 'string'),
+ (r'.', Text),
+ ],
+ 'macro': [
+ (r'%define.*\n', Comment.Preproc),
+ (r'%\{\!\?.*%define.*\}', Comment.Preproc),
+ (r'(%(?:if(?:n?arch)?|else(?:if)?|endif))(.*)$',
+ bygroups(Comment.Preproc, Text)),
+ ],
+ 'interpol': [
+ (r'%\{?__[a-z_]+\}?', Name.Function),
+ (r'%\{?_([a-z_]+dir|[a-z_]+path|prefix)\}?', Keyword.Pseudo),
+ (r'%\{\?[A-Za-z0-9_]+\}', Name.Variable),
+ (r'\$\{?RPM_[A-Z0-9_]+\}?', Name.Variable.Global),
+ (r'%\{[a-zA-Z][a-zA-Z0-9_]+\}', Keyword.Constant),
+ ]
+ }
diff --git a/pygments/lexers/parsers.py b/pygments/lexers/parsers.py
index 2b5f954f..c1ad710f 100644
--- a/pygments/lexers/parsers.py
+++ b/pygments/lexers/parsers.py
@@ -5,7 +5,7 @@
Lexers for parser generators.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -28,7 +28,8 @@ __all__ = ['RagelLexer', 'RagelEmbeddedLexer', 'RagelCLexer', 'RagelDLexer',
'AntlrPerlLexer', 'AntlrRubyLexer', 'AntlrCppLexer',
#'AntlrCLexer',
'AntlrCSharpLexer', 'AntlrObjectiveCLexer',
- 'AntlrJavaLexer', "AntlrActionScriptLexer"]
+ 'AntlrJavaLexer', "AntlrActionScriptLexer",
+ 'TreetopLexer']
class RagelLexer(RegexLexer):
@@ -693,3 +694,85 @@ class AntlrActionScriptLexer(DelegatingLexer):
def analyse_text(text):
return AntlrLexer.analyse_text(text) and \
re.search(r'^\s*language\s*=\s*ActionScript\s*;', text, re.M)
+
+class TreetopBaseLexer(RegexLexer):
+ """
+ A base lexer for `Treetop <http://treetop.rubyforge.org/>`_ grammars.
+ Not for direct use; use TreetopLexer instead.
+
+ *New in Pygments 1.6.*
+ """
+
+ tokens = {
+ 'root': [
+ include('space'),
+ (r'require[ \t]+[^\n\r]+[\n\r]', Other),
+ (r'module\b', Keyword.Namespace, 'module'),
+ (r'grammar\b', Keyword, 'grammar'),
+ ],
+ 'module': [
+ include('space'),
+ include('end'),
+ (r'module\b', Keyword, '#push'),
+ (r'grammar\b', Keyword, 'grammar'),
+ (r'[A-Z][A-Za-z_0-9]*(?:::[A-Z][A-Za-z_0-9]*)*', Name.Namespace),
+ ],
+ 'grammar': [
+ include('space'),
+ include('end'),
+ (r'rule\b', Keyword, 'rule'),
+ (r'include\b', Keyword, 'include'),
+ (r'[A-Z][A-Za-z_0-9]*', Name),
+ ],
+ 'include': [
+ include('space'),
+ (r'[A-Z][A-Za-z_0-9]*(?:::[A-Z][A-Za-z_0-9]*)*', Name.Class, '#pop'),
+ ],
+ 'rule': [
+ include('space'),
+ include('end'),
+ (r'"(\\\\|\\"|[^"])*"', String.Double),
+ (r"'(\\\\|\\'|[^'])*'", String.Single),
+ (r'([A-Za-z_][A-Za-z_0-9]*)(:)', bygroups(Name.Label, Punctuation)),
+ (r'[A-Za-z_][A-Za-z_0-9]*', Name),
+ (r'[()]', Punctuation),
+ (r'[?+*/&!~]', Operator),
+ (r'\[(?:\\.|\[:\^?[a-z]+:\]|[^\\\]])+\]', String.Regex),
+ (r'([0-9]*)(\.\.)([0-9]*)',
+ bygroups(Number.Integer, Operator, Number.Integer)),
+ (r'(<)([^>]+)(>)', bygroups(Punctuation, Name.Class, Punctuation)),
+ (r'{', Punctuation, 'inline_module'),
+ (r'\.', String.Regex),
+ ],
+ 'inline_module': [
+ (r'{', Other, 'ruby'),
+ (r'}', Punctuation, '#pop'),
+ (r'[^{}]+', Other),
+ ],
+ 'ruby': [
+ (r'{', Other, '#push'),
+ (r'}', Other, '#pop'),
+ (r'[^{}]+', Other),
+ ],
+ 'space': [
+ (r'[ \t\n\r]+', Whitespace),
+ (r'#[^\n]*', Comment.Single),
+ ],
+ 'end': [
+ (r'end\b', Keyword, '#pop'),
+ ],
+ }
+
+class TreetopLexer(DelegatingLexer):
+ """
+ A lexer for `Treetop <http://treetop.rubyforge.org/>`_ grammars.
+
+ *New in Pygments 1.6.*
+ """
+
+ name = 'Treetop'
+ aliases = ['treetop']
+ filenames = ['*.treetop', '*.tt']
+
+ def __init__(self, **options):
+ super(TreetopLexer, self).__init__(RubyLexer, TreetopBaseLexer, **options)
diff --git a/pygments/lexers/shell.py b/pygments/lexers/shell.py
index 52df5f00..803005f3 100644
--- a/pygments/lexers/shell.py
+++ b/pygments/lexers/shell.py
@@ -5,7 +5,7 @@
Lexers for various shells.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/lexers/special.py b/pygments/lexers/special.py
index 785ab73c..9b3cd508 100644
--- a/pygments/lexers/special.py
+++ b/pygments/lexers/special.py
@@ -5,7 +5,7 @@
Special lexers.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/lexers/sql.py b/pygments/lexers/sql.py
index e7e02fce..dcfd8fa8 100644
--- a/pygments/lexers/sql.py
+++ b/pygments/lexers/sql.py
@@ -34,7 +34,7 @@
The ``tests/examplefiles`` contains a few test files with data to be
parsed by these lexers.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/lexers/templates.py b/pygments/lexers/templates.py
index 6c55edbf..65627b0d 100644
--- a/pygments/lexers/templates.py
+++ b/pygments/lexers/templates.py
@@ -5,7 +5,7 @@
Lexers for various template engines' markup.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -1638,6 +1638,8 @@ class LassoHtmlLexer(DelegatingLexer):
`HtmlLexer`.
Nested JavaScript and CSS is also highlighted.
+
+ *New in Pygments 1.6.*
"""
name = 'HTML+Lasso'
@@ -1649,7 +1651,6 @@ class LassoHtmlLexer(DelegatingLexer):
'application/x-httpd-lasso[89]']
def __init__(self, **options):
- options['requiredelimiters'] = True
super(LassoHtmlLexer, self).__init__(HtmlLexer, LassoLexer, **options)
def analyse_text(text):
@@ -1665,6 +1666,8 @@ class LassoXmlLexer(DelegatingLexer):
"""
Subclass of the `LassoLexer` which highlights unhandled data with the
`XmlLexer`.
+
+ *New in Pygments 1.6.*
"""
name = 'XML+Lasso'
@@ -1674,7 +1677,6 @@ class LassoXmlLexer(DelegatingLexer):
mimetypes = ['application/xml+lasso']
def __init__(self, **options):
- options['requiredelimiters'] = True
super(LassoXmlLexer, self).__init__(XmlLexer, LassoLexer, **options)
def analyse_text(text):
@@ -1688,6 +1690,8 @@ class LassoCssLexer(DelegatingLexer):
"""
Subclass of the `LassoLexer` which highlights unhandled data with the
`CssLexer`.
+
+ *New in Pygments 1.6.*
"""
name = 'CSS+Lasso'
@@ -1712,6 +1716,8 @@ class LassoJavascriptLexer(DelegatingLexer):
"""
Subclass of the `LassoLexer` which highlights unhandled data with the
`JavascriptLexer`.
+
+ *New in Pygments 1.6.*
"""
name = 'JavaScript+Lasso'
diff --git a/pygments/lexers/text.py b/pygments/lexers/text.py
index cff4ddd0..8709e43a 100644
--- a/pygments/lexers/text.py
+++ b/pygments/lexers/text.py
@@ -5,7 +5,7 @@
Lexers for non-source code file types.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -25,7 +25,7 @@ __all__ = ['IniLexer', 'PropertiesLexer', 'SourcesListLexer', 'BaseMakefileLexer
'RstLexer', 'VimLexer', 'GettextLexer', 'SquidConfLexer',
'DebianControlLexer', 'DarcsPatchLexer', 'YamlLexer',
'LighttpdConfLexer', 'NginxConfLexer', 'CMakeLexer', 'HttpLexer',
- 'PyPyLogLexer']
+ 'PyPyLogLexer', 'RegeditLexer', 'HxmlLexer']
class IniLexer(RegexLexer):
@@ -41,7 +41,7 @@ class IniLexer(RegexLexer):
tokens = {
'root': [
(r'\s+', Text),
- (r'[;#].*?$', Comment),
+ (r'[;#].*', Comment.Single),
(r'\[.*?\]$', Keyword),
(r'(.*?)([ \t]*)(=)([ \t]*)(.*(?:\n[ \t].+)*)',
bygroups(Name.Attribute, Text, Operator, Text, String))
@@ -55,6 +55,49 @@ class IniLexer(RegexLexer):
return text[0] == '[' and text[npos-1] == ']'
+class RegeditLexer(RegexLexer):
+ """
+ Lexer for `Windows Registry
+ <http://en.wikipedia.org/wiki/Windows_Registry#.REG_files>`_ files produced
+ by regedit.
+
+ *New in Pygments 1.6.*
+ """
+
+ name = 'reg'
+ aliases = []
+ filenames = ['*.reg']
+ mimetypes = ['text/x-windows-registry']
+
+ tokens = {
+ 'root': [
+ (r'Windows Registry Editor.*', Text),
+ (r'\s+', Text),
+ (r'[;#].*', Comment.Single),
+ (r'(\[)(-?)(HKEY_[A-Z_]+)(.*?\])$',
+ bygroups(Keyword, Operator, Name.Builtin, Keyword)),
+ # String keys, which obey somewhat normal escaping
+ (r'("(?:\\"|\\\\|[^"])+")([ \t]*)(=)([ \t]*)',
+ bygroups(Name.Attribute, Text, Operator, Text),
+ 'value'),
+ # Bare keys (includes @)
+ (r'(.*?)([ \t]*)(=)([ \t]*)',
+ bygroups(Name.Attribute, Text, Operator, Text),
+ 'value'),
+ ],
+ 'value': [
+ (r'-', Operator, '#pop'), # delete value
+ (r'(dword|hex(?:\([0-9a-fA-F]\))?)(:)([0-9a-fA-F,]+)',
+ bygroups(Name.Variable, Punctuation, Number), '#pop'),
+ # As far as I know, .reg files do not support line continuation.
+ (r'.*', String, '#pop'),
+ ]
+ }
+
+ def analyse_text(text):
+ return text.startswith('Windows Registry Editor')
+
+
class PropertiesLexer(RegexLexer):
"""
Lexer for configuration files in Java's properties format.
@@ -1706,8 +1749,8 @@ class PyPyLogLexer(RegexLexer):
],
"jit-log": [
(r"\[\w+\] jit-log-.*?}$", Keyword, "#pop"),
-
(r"^\+\d+: ", Comment),
+ (r"--end of the loop--", Comment),
(r"[ifp]\d+", Name),
(r"ptr\d+", Name),
(r"(\()(\w+(?:\.\w+)?)(\))",
@@ -1717,7 +1760,7 @@ class PyPyLogLexer(RegexLexer):
(r"-?\d+", Number.Integer),
(r"'.*'", String),
(r"(None|descr|ConstClass|ConstPtr|TargetToken)", Name),
- (r"<.*?>", Name.Builtin),
+ (r"<.*?>+", Name.Builtin),
(r"(label|debug_merge_point|jump|finish)", Name.Class),
(r"(int_add_ovf|int_add|int_sub_ovf|int_sub|int_mul_ovf|int_mul|"
r"int_floordiv|int_mod|int_lshift|int_rshift|int_and|int_or|"
@@ -1757,3 +1800,44 @@ class PyPyLogLexer(RegexLexer):
(r"#.*?$", Comment),
],
}
+
+
+class HxmlLexer(RegexLexer):
+ """
+ Lexer for `haXe build <http://haxe.org/doc/compiler>`_ files.
+
+ *New in Pygments 1.6.*
+ """
+ name = 'Hxml'
+ aliases = ['haxeml', 'hxml']
+ filenames = ['*.hxml']
+
+ tokens = {
+ 'root': [
+ # Seperator
+ (r'(--)(next)', bygroups(Punctuation, Generic.Heading)),
+ # Compiler switches with one dash
+ (r'(-)(prompt|debug|v)', bygroups(Punctuation, Keyword.Keyword)),
+ # Compilerswitches with two dashes
+ (r'(--)(neko-source|flash-strict|flash-use-stage|no-opt|no-traces|'
+ r'no-inline|times|no-output)', bygroups(Punctuation, Keyword)),
+ # Targets and other options that take an argument
+ (r'(-)(cpp|js|neko|x|as3|swf9?|swf-lib|php|xml|main|lib|D|resource|'
+ r'cp|cmd)( +)(.+)',
+ bygroups(Punctuation, Keyword, Whitespace, String)),
+ # Options that take only numerical arguments
+ (r'(-)(swf-version)( +)(\d+)',
+ bygroups(Punctuation, Keyword, Number.Integer)),
+ # An Option that defines the size, the fps and the background
+ # color of an flash movie
+ (r'(-)(swf-header)( +)(\d+)(:)(\d+)(:)(\d+)(:)([A-Fa-f0-9]{6})',
+ bygroups(Punctuation, Keyword, Whitespace, Number.Integer,
+ Punctuation, Number.Integer, Punctuation, Number.Integer,
+ Punctuation, Number.Hex)),
+ # options with two dashes that takes arguments
+ (r'(--)(js-namespace|php-front|php-lib|remap|gen-hx-classes)( +)'
+ r'(.+)', bygroups(Punctuation, Keyword, Whitespace, String)),
+ # Single line comment, multiline ones are not allowed.
+ (r'#.*', Comment.Single)
+ ]
+ }
diff --git a/pygments/lexers/web.py b/pygments/lexers/web.py
index 79245d34..6df65131 100644
--- a/pygments/lexers/web.py
+++ b/pygments/lexers/web.py
@@ -5,7 +5,7 @@
Lexers for web-related languages and markup.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -27,7 +27,7 @@ __all__ = ['HtmlLexer', 'XmlLexer', 'JavascriptLexer', 'JsonLexer', 'CssLexer',
'MxmlLexer', 'HaxeLexer', 'HamlLexer', 'SassLexer', 'ScssLexer',
'ObjectiveJLexer', 'CoffeeScriptLexer', 'LiveScriptLexer',
'DuelLexer', 'ScamlLexer', 'JadeLexer', 'XQueryLexer',
- 'DtdLexer', 'DartLexer', 'LassoLexer']
+ 'DtdLexer', 'DartLexer', 'LassoLexer', 'QmlLexer']
class JavascriptLexer(RegexLexer):
@@ -969,7 +969,8 @@ class DtdLexer(RegexLexer):
'attlist': [
include('common'),
- (r'CDATA|IDREFS|IDREF|ID|NMTOKENS|NMTOKEN|ENTITIES|ENTITY|NOTATION', Keyword.Constant),
+ (r'CDATA|IDREFS|IDREF|ID|NMTOKENS|NMTOKEN|ENTITIES|ENTITY|NOTATION',
+ Keyword.Constant),
(r'#REQUIRED|#IMPLIED|#FIXED', Keyword.Constant),
(r'xml:space|xml:lang', Keyword.Reserved),
(r'[^>\s\|()?+*,]+', Name.Attribute),
@@ -1762,7 +1763,7 @@ class ScssLexer(RegexLexer):
(r'(@include)( [\w-]+)', bygroups(Keyword, Name.Decorator), 'value'),
(r'@extend', Keyword, 'selector'),
(r'@[a-z0-9_-]+', Keyword, 'selector'),
- (r'(\$[\w-]\w*)([ \t]*:)', bygroups(Name.Variable, Operator), 'value'),
+ (r'(\$[\w-]*\w)([ \t]*:)', bygroups(Name.Variable, Operator), 'value'),
(r'(?=[^;{}][;}])', Name.Attribute, 'attr'),
(r'(?=[^;{}:]+:[^a-z])', Name.Attribute, 'attr'),
(r'', Text, 'selector'),
@@ -3015,19 +3016,14 @@ class LassoLexer(RegexLexer):
tokens = {
'root': [
(r'^#!.+lasso9\b', Comment.Preproc, 'lasso'),
- (r'\s+', Other),
(r'\[no_square_brackets\]', Comment.Preproc, 'nosquarebrackets'),
(r'\[noprocess\]', Comment.Preproc, ('delimiters', 'noprocess')),
(r'\[', Comment.Preproc, ('delimiters', 'squarebrackets')),
(r'<\?(LassoScript|lasso|=)', Comment.Preproc,
('delimiters', 'anglebrackets')),
(r'<', Other, 'delimiters'),
- include('lasso'),
- ],
- 'nosquarebrackets': [
- (r'<\?(LassoScript|lasso|=)', Comment.Preproc, 'anglebrackets'),
- (r'<', Other),
- (r'[^<]+', Other),
+ (r'\s+', Other),
+ (r'', Other, ('delimiters', 'lassofile')),
],
'delimiters': [
(r'\[no_square_brackets\]', Comment.Preproc, 'nosquarebrackets'),
@@ -3037,6 +3033,11 @@ class LassoLexer(RegexLexer):
(r'<', Other),
(r'[^[<]+', Other),
],
+ 'nosquarebrackets': [
+ (r'<\?(LassoScript|lasso|=)', Comment.Preproc, 'anglebrackets'),
+ (r'<', Other),
+ (r'[^<]+', Other),
+ ],
'noprocess': [
(r'\[/noprocess\]', Comment.Preproc, '#pop'),
(r'\[', Other),
@@ -3050,12 +3051,20 @@ class LassoLexer(RegexLexer):
(r'\?>', Comment.Preproc, '#pop'),
include('lasso'),
],
- 'lasso': [
- # whitespace/comments
+ 'lassofile': [
+ (r'\]', Comment.Preproc, '#pop'),
+ (r'\?>', Comment.Preproc, '#pop'),
+ include('lasso'),
+ ],
+ 'whitespacecomments': [
(r'\s+', Text),
(r'//.*?\n', Comment.Single),
(r'/\*\*!.*?\*/', String.Doc),
(r'/\*.*?\*/', Comment.Multiline),
+ ],
+ 'lasso': [
+ # whitespace/comments
+ include('whitespacecomments'),
# literals
(r'\d*\.\d+(e[+-]?\d+)?', Number.Float),
@@ -3098,10 +3107,9 @@ class LassoLexer(RegexLexer):
(r'(define)(\s+)([a-z_][\w.]*)',
bygroups(Keyword.Declaration, Text, Name.Function),
'signature'),
- (r'(public|protected|private|provide)(\s+)([a-z_][\w.]*=?|'
- r'[-+*/%<>]|==)(\s*)(\()',
- bygroups(Keyword, Text, Name.Function, Text, Punctuation),
- ('signature', 'parameter')),
+ (r'(public|protected|private|provide)(\s+)(([a-z_][\w.]*=?|'
+ r'[-+*/%<>]|==)(?=\s*\())', bygroups(Keyword, Text, Name.Function),
+ 'signature'),
(r'(public|protected|private)(\s+)([a-z_][\w.]*)',
bygroups(Keyword, Text, Name.Function)),
@@ -3112,6 +3120,9 @@ class LassoLexer(RegexLexer):
r'null)\b', Keyword.Type),
(r'([a-z_][\w.]*)(\s+)(in)\b', bygroups(Name, Text, Keyword)),
(r'(let|into)(\s+)([a-z_][\w.]*)', bygroups(Keyword, Text, Name)),
+ (r'require\b', Keyword, 'requiresection'),
+ (r'(/?)(Namespace_Using)\b',
+ bygroups(Punctuation, Keyword.Namespace)),
(r'(/?)(Cache|Database_Names|Database_SchemaNames|'
r'Database_TableNames|Define_Tag|Define_Type|Email_Batch|'
r'Encode_Set|HTML_Comment|Handle|Handle_Error|Header|If|Inline|'
@@ -3119,19 +3130,21 @@ class LassoLexer(RegexLexer):
r'Link_CurrentRecord|Link_Detail|Link_FirstGroup|'
r'Link_FirstRecord|Link_LastGroup|Link_LastRecord|Link_NextGroup|'
r'Link_NextRecord|Link_PrevGroup|Link_PrevRecord|Log|Loop|'
- r'Namespace_Using|NoProcess|Output_None|Portal|Private|Protect|'
- r'Records|Referer|Referrer|Repeating|ResultSet|Rows|Search_Args|'
- r'Search_Arguments|Select|Sort_Args|Sort_Arguments|Thread_Atomic|'
- r'Value_List|While|Abort|Case|Else|If_Empty|If_False|If_Null|'
- r'If_True|Loop_Abort|Loop_Continue|Loop_Count|Params|Params_Up|'
- r'Return|Return_Value|Run_Children|SOAP_DefineTag|'
- r'SOAP_LastRequest|SOAP_LastResponse|Tag_Name|ascending|average|'
- r'by|define|descending|do|equals|frozen|group|handle_failure|'
- r'import|in|into|join|let|match|max|min|on|order|parent|protected|'
- r'provide|public|require|skip|split_thread|sum|take|thread|to|'
- r'trait|type|where|with|yield)\b', bygroups(Punctuation, Keyword)),
+ r'NoProcess|Output_None|Portal|Private|Protect|Records|Referer|'
+ r'Referrer|Repeating|ResultSet|Rows|Search_Args|Search_Arguments|'
+ r'Select|Sort_Args|Sort_Arguments|Thread_Atomic|Value_List|While|'
+ r'Abort|Case|Else|If_Empty|If_False|If_Null|If_True|Loop_Abort|'
+ r'Loop_Continue|Loop_Count|Params|Params_Up|Return|Return_Value|'
+ r'Run_Children|SOAP_DefineTag|SOAP_LastRequest|SOAP_LastResponse|'
+ r'Tag_Name|ascending|average|by|define|descending|do|equals|'
+ r'frozen|group|handle_failure|import|in|into|join|let|match|max|'
+ r'min|on|order|parent|protected|provide|public|require|skip|'
+ r'split_thread|sum|take|thread|to|trait|type|where|with|yield)\b',
+ bygroups(Punctuation, Keyword)),
# other
+ (r'(([a-z_][\w.]*=?|[-+*/%<>]|==)(?=\s*\([^)]*\)\s*=>))',
+ Name.Function, 'signature'),
(r'(and|or|not)\b', Operator.Word),
(r'([a-z_][\w.]*)(\s*)(::\s*)([a-z_][\w.]*)(\s*)(=)',
bygroups(Name, Text, Punctuation, Name.Label, Text, Operator)),
@@ -3160,16 +3173,34 @@ class LassoLexer(RegexLexer):
r'[abefnrtv?\"\'\\]|$)', String.Escape),
],
'signature': [
- (r'[(,]', Punctuation, 'parameter'),
(r'=>', Operator, '#pop'),
+ (r'\)', Punctuation, '#pop'),
+ (r'[(,]', Punctuation, 'parameter'),
include('lasso'),
],
'parameter': [
- (r'\.\.\.', Name.Builtin.Pseudo),
- (r'-?[a-z_][\w.]*', Name.Attribute, '#pop'),
(r'\)', Punctuation, '#pop'),
+ (r'-?[a-z_][\w.]*', Name.Attribute, '#pop'),
+ (r'\.\.\.', Name.Builtin.Pseudo),
include('lasso'),
],
+ 'requiresection': [
+ (r'(([a-z_][\w.]*=?|[-+*/%<>]|==)(?=\s*\())', Name, 'requiresignature'),
+ (r'(([a-z_][\w.]*=?|[-+*/%<>]|==)(?=(\s*::\s*[\w.]+)?\s*,))', Name),
+ (r'[a-z_][\w.]*=?|[-+*/%<>]|==', Name, '#pop'),
+ (r'(::\s*)([a-z_][\w.]*)', bygroups(Punctuation, Name.Label)),
+ (r',', Punctuation),
+ include('whitespacecomments'),
+ ],
+ 'requiresignature': [
+ (r'(\)(?=(\s*::\s*[\w.]+)?\s*,))', Punctuation, '#pop'),
+ (r'\)', Punctuation, '#pop:2'),
+ (r'-?[a-z_][\w.]*', Name.Attribute),
+ (r'(::\s*)([a-z_][\w.]*)', bygroups(Punctuation, Name.Label)),
+ (r'\.\.\.', Name.Builtin.Pseudo),
+ (r'[(,]', Punctuation),
+ include('whitespacecomments'),
+ ],
}
def __init__(self, **options):
@@ -3208,3 +3239,75 @@ class LassoLexer(RegexLexer):
if re.search(r'\[\n|\?>', text):
rv += 0.4
return rv
+
+
+class QmlLexer(RegexLexer):
+ """
+ For QML files. See http://doc.qt.digia.com/4.7/qdeclarativeintroduction.html.
+
+ *New in Pygments 1.6.*
+ """
+
+ # QML is based on javascript, so much of this is taken from the
+ # JavascriptLexer above.
+
+ name = 'QML'
+ aliases = ['qml', 'Qt Meta Language', 'Qt modeling Language']
+ filenames = ['*.qml',]
+ mimetypes = [ 'application/x-qml',]
+
+
+ # pasted from JavascriptLexer, with some additions
+ flags = re.DOTALL
+ tokens = {
+ 'commentsandwhitespace': [
+ (r'\s+', Text),
+ (r'<!--', Comment),
+ (r'//.*?\n', Comment.Single),
+ (r'/\*.*?\*/', Comment.Multiline)
+ ],
+ 'slashstartsregex': [
+ include('commentsandwhitespace'),
+ (r'/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/'
+ r'([gim]+\b|\B)', String.Regex, '#pop'),
+ (r'(?=/)', Text, ('#pop', 'badregex')),
+ (r'', Text, '#pop')
+ ],
+ 'badregex': [
+ (r'\n', Text, '#pop')
+ ],
+ 'root' : [
+ (r'^(?=\s|/|<!--)', Text, 'slashstartsregex'),
+ include('commentsandwhitespace'),
+ (r'\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|'
+ r'(<<|>>>?|==?|!=?|[-<>+*%&\|\^/])=?', Operator, 'slashstartsregex'),
+ (r'[{(\[;,]', Punctuation, 'slashstartsregex'),
+ (r'[})\].]', Punctuation),
+
+ #QML insertions
+ (r'\bid\s*:\s*[A-Za-z][_A-Za-z.0-9]*',Keyword.Declaration, 'slashstartsregex'),
+ (r'\b[A-Za-z][_A-Za-z.0-9]*\s*:',Keyword, 'slashstartsregex'),
+
+ #the rest from JavascriptLexer
+ (r'(for|in|while|do|break|return|continue|switch|case|default|if|else|'
+ r'throw|try|catch|finally|new|delete|typeof|instanceof|void|'
+ r'this)\b', Keyword, 'slashstartsregex'),
+ (r'(var|let|with|function)\b', Keyword.Declaration, 'slashstartsregex'),
+ (r'(abstract|boolean|byte|char|class|const|debugger|double|enum|export|'
+ r'extends|final|float|goto|implements|import|int|interface|long|native|'
+ r'package|private|protected|public|short|static|super|synchronized|throws|'
+ r'transient|volatile)\b', Keyword.Reserved),
+ (r'(true|false|null|NaN|Infinity|undefined)\b', Keyword.Constant),
+ (r'(Array|Boolean|Date|Error|Function|Math|netscape|'
+ r'Number|Object|Packages|RegExp|String|sun|decodeURI|'
+ r'decodeURIComponent|encodeURI|encodeURIComponent|'
+ r'Error|eval|isFinite|isNaN|parseFloat|parseInt|document|this|'
+ r'window)\b', Name.Builtin),
+ (r'[$a-zA-Z_][a-zA-Z0-9_]*', Name.Other),
+ (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
+ (r'0x[0-9a-fA-F]+', Number.Hex),
+ (r'[0-9]+', Number.Integer),
+ (r'"(\\\\|\\"|[^"])*"', String.Double),
+ (r"'(\\\\|\\'|[^'])*'", String.Single),
+ ]
+ }
diff --git a/pygments/plugin.py b/pygments/plugin.py
index ea606b9c..58662e96 100644
--- a/pygments/plugin.py
+++ b/pygments/plugin.py
@@ -32,7 +32,7 @@
yourfilter = yourfilter:YourFilter
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
try:
diff --git a/pygments/scanner.py b/pygments/scanner.py
index 2acd6e6b..f469e694 100644
--- a/pygments/scanner.py
+++ b/pygments/scanner.py
@@ -12,7 +12,7 @@
Have a look at the `DelphiLexer` to get an idea of how to use
this scanner.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
diff --git a/pygments/style.py b/pygments/style.py
index 0d9e6eb6..0fc01b40 100644
--- a/pygments/style.py
+++ b/pygments/style.py
@@ -5,7 +5,7 @@
Basic style object.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/styles/__init__.py b/pygments/styles/__init__.py
index 2be93da4..3d6ef73c 100644
--- a/pygments/styles/__init__.py
+++ b/pygments/styles/__init__.py
@@ -5,7 +5,7 @@
Contains built-in styles.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/styles/autumn.py b/pygments/styles/autumn.py
index a311487c..3960536b 100644
--- a/pygments/styles/autumn.py
+++ b/pygments/styles/autumn.py
@@ -5,7 +5,7 @@
A colorful style, inspired by the terminal highlighting style.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/styles/borland.py b/pygments/styles/borland.py
index ce6120b5..9858034e 100644
--- a/pygments/styles/borland.py
+++ b/pygments/styles/borland.py
@@ -5,7 +5,7 @@
Style similar to the style used in the Borland IDEs.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/styles/bw.py b/pygments/styles/bw.py
index fdec8a2f..170442ad 100644
--- a/pygments/styles/bw.py
+++ b/pygments/styles/bw.py
@@ -5,7 +5,7 @@
Simple black/white only style.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/styles/colorful.py b/pygments/styles/colorful.py
index 819e81ba..eb595467 100644
--- a/pygments/styles/colorful.py
+++ b/pygments/styles/colorful.py
@@ -5,7 +5,7 @@
A colorful style, inspired by CodeRay.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/styles/default.py b/pygments/styles/default.py
index d90f08d8..77bdac0d 100644
--- a/pygments/styles/default.py
+++ b/pygments/styles/default.py
@@ -5,7 +5,7 @@
The default highlighting style.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/styles/emacs.py b/pygments/styles/emacs.py
index 96640f87..9f8b4074 100644
--- a/pygments/styles/emacs.py
+++ b/pygments/styles/emacs.py
@@ -5,7 +5,7 @@
A highlighting style for Pygments, inspired by Emacs.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/styles/friendly.py b/pygments/styles/friendly.py
index 25dda6ca..732a1252 100644
--- a/pygments/styles/friendly.py
+++ b/pygments/styles/friendly.py
@@ -5,7 +5,7 @@
A modern style based on the VIM pyte theme.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/styles/fruity.py b/pygments/styles/fruity.py
index 6f6f2864..45334159 100644
--- a/pygments/styles/fruity.py
+++ b/pygments/styles/fruity.py
@@ -5,7 +5,7 @@
pygments version of my "fruity" vim theme.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/styles/manni.py b/pygments/styles/manni.py
index 2f689419..036a2120 100644
--- a/pygments/styles/manni.py
+++ b/pygments/styles/manni.py
@@ -8,7 +8,7 @@
This is a port of the style used in the `php port`_ of pygments
by Manni. The style is called 'default' there.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/styles/monokai.py b/pygments/styles/monokai.py
index b5338122..31dc83b2 100644
--- a/pygments/styles/monokai.py
+++ b/pygments/styles/monokai.py
@@ -7,7 +7,7 @@
http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/styles/murphy.py b/pygments/styles/murphy.py
index 03494fb6..dbf4eba9 100644
--- a/pygments/styles/murphy.py
+++ b/pygments/styles/murphy.py
@@ -5,7 +5,7 @@
Murphy's style from CodeRay.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/styles/native.py b/pygments/styles/native.py
index 53749e64..0de84386 100644
--- a/pygments/styles/native.py
+++ b/pygments/styles/native.py
@@ -5,7 +5,7 @@
pygments version of my "native" vim theme.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/styles/pastie.py b/pygments/styles/pastie.py
index ca8f6206..2a2f386f 100644
--- a/pygments/styles/pastie.py
+++ b/pygments/styles/pastie.py
@@ -7,7 +7,7 @@
.. _pastie: http://pastie.caboo.se/
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/styles/perldoc.py b/pygments/styles/perldoc.py
index 73f9bd3c..b8b67b29 100644
--- a/pygments/styles/perldoc.py
+++ b/pygments/styles/perldoc.py
@@ -7,7 +7,7 @@
.. _perldoc: http://perldoc.perl.org/
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/styles/rrt.py b/pygments/styles/rrt.py
index 1c363858..1a2fc6a4 100644
--- a/pygments/styles/rrt.py
+++ b/pygments/styles/rrt.py
@@ -5,7 +5,7 @@
pygments "rrt" theme, based on Zap and Emacs defaults.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/styles/tango.py b/pygments/styles/tango.py
index fea7ae5d..7b1c4f3c 100644
--- a/pygments/styles/tango.py
+++ b/pygments/styles/tango.py
@@ -33,7 +33,7 @@
have been chosen to have the same style. Similarly, keywords (Keyword.*),
and Operator.Word (and, or, in) have been assigned the same style.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/styles/trac.py b/pygments/styles/trac.py
index 468a5822..714e36cc 100644
--- a/pygments/styles/trac.py
+++ b/pygments/styles/trac.py
@@ -5,7 +5,7 @@
Port of the default trac highlighter design.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/styles/vim.py b/pygments/styles/vim.py
index 0aab8bcd..a5462db3 100644
--- a/pygments/styles/vim.py
+++ b/pygments/styles/vim.py
@@ -5,7 +5,7 @@
A highlighting style for Pygments, inspired by vim.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/styles/vs.py b/pygments/styles/vs.py
index 5cdda4ae..14a56faa 100644
--- a/pygments/styles/vs.py
+++ b/pygments/styles/vs.py
@@ -5,7 +5,7 @@
Simple style with MS Visual Studio colors.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/token.py b/pygments/token.py
index cf78cca2..19a83f2e 100644
--- a/pygments/token.py
+++ b/pygments/token.py
@@ -5,7 +5,7 @@
Basic token types and the standard tokens.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/pygments/unistring.py b/pygments/unistring.py
index b6f53e89..4b07028e 100644
--- a/pygments/unistring.py
+++ b/pygments/unistring.py
@@ -8,7 +8,7 @@
Inspired by chartypes_create.py from the MoinMoin project.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.util import u_prefix
diff --git a/pygments/util.py b/pygments/util.py
index 127f6e87..caac1144 100644
--- a/pygments/util.py
+++ b/pygments/util.py
@@ -5,7 +5,7 @@
Utility functions.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/scripts/check_sources.py b/scripts/check_sources.py
index e1c7544d..d9e5c2ae 100755
--- a/scripts/check_sources.py
+++ b/scripts/check_sources.py
@@ -7,7 +7,7 @@
Make sure each Python file has a correct file header
including copyright and license information.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -30,7 +30,7 @@ def checker(*suffixes, **kwds):
name_mail_re = r'[\w ]+(<.*?>)?'
-copyright_re = re.compile(r'^ :copyright: Copyright 2006-2012 by '
+copyright_re = re.compile(r'^ :copyright: Copyright 2006-2013 by '
r'the Pygments team, see AUTHORS\.$', re.UNICODE)
copyright_2_re = re.compile(r'^ %s(, %s)*[,.]$' %
(name_mail_re, name_mail_re), re.UNICODE)
diff --git a/scripts/find_codetags.py b/scripts/find_codetags.py
index 35db143f..2fb18333 100755
--- a/scripts/find_codetags.py
+++ b/scripts/find_codetags.py
@@ -7,7 +7,7 @@
Find code tags in specified files and/or directories
and create a report in HTML format.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/scripts/find_error.py b/scripts/find_error.py
index 453f16ed..8e4c79db 100755
--- a/scripts/find_error.py
+++ b/scripts/find_error.py
@@ -8,7 +8,7 @@
the text where Error tokens are being generated, along
with some context.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/setup.py b/setup.py
index caee9a80..4e7c5070 100755
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@
.. _Pygments tip:
http://bitbucket.org/birkenfeld/pygments-main/get/tip.zip#egg=Pygments-dev
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/tests/examplefiles/BOM.js b/tests/examplefiles/BOM.js
new file mode 100644
index 00000000..930599c1
--- /dev/null
+++ b/tests/examplefiles/BOM.js
@@ -0,0 +1 @@
+/* There is a BOM at the beginning of this file. */ \ No newline at end of file
diff --git a/tests/examplefiles/bigtest.nsi b/tests/examplefiles/bigtest.nsi
new file mode 100644
index 00000000..62f5211c
--- /dev/null
+++ b/tests/examplefiles/bigtest.nsi
@@ -0,0 +1,308 @@
+; bigtest.nsi
+;
+; This script attempts to test most of the functionality of the NSIS exehead.
+
+;--------------------------------
+
+!ifdef HAVE_UPX
+!packhdr tmp.dat "upx\upx -9 tmp.dat"
+!endif
+
+!ifdef NOCOMPRESS
+SetCompress off
+!endif
+
+;--------------------------------
+
+Name "BigNSISTest"
+Caption "NSIS Big Test"
+Icon "${NSISDIR}\Contrib\Graphics\Icons\nsis1-install.ico"
+OutFile "bigtest.exe"
+
+SetDateSave on
+SetDatablockOptimize on
+CRCCheck on
+SilentInstall normal
+BGGradient 000000 800000 FFFFFF
+InstallColors FF8080 000030
+XPStyle on
+
+InstallDir "$PROGRAMFILES\NSISTest\BigNSISTest"
+InstallDirRegKey HKLM "Software\NSISTest\BigNSISTest" "Install_Dir"
+
+CheckBitmap "${NSISDIR}\Contrib\Graphics\Checks\classic-cross.bmp"
+
+LicenseText "A test text, make sure it's all there"
+LicenseData "bigtest.nsi"
+
+RequestExecutionLevel admin
+
+;--------------------------------
+
+Page license
+Page components
+Page directory
+Page instfiles
+
+UninstPage uninstConfirm
+UninstPage instfiles
+
+;--------------------------------
+
+!ifndef NOINSTTYPES ; only if not defined
+ InstType "Most"
+ InstType "Full"
+ InstType "More"
+ InstType "Base"
+ ;InstType /NOCUSTOM
+ ;InstType /COMPONENTSONLYONCUSTOM
+!endif
+
+AutoCloseWindow false
+ShowInstDetails show
+
+;--------------------------------
+
+Section "" ; empty string makes it hidden, so would starting with -
+
+ ; write reg info
+ StrCpy $1 "POOOOOOOOOOOP"
+ DetailPrint "I like to be able to see what is going on (debug) $1"
+ WriteRegStr HKLM SOFTWARE\NSISTest\BigNSISTest "Install_Dir" "$INSTDIR"
+
+ ; write uninstall strings
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BigNSISTest" "DisplayName" "BigNSISTest (remove only)"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BigNSISTest" "UninstallString" '"$INSTDIR\bt-uninst.exe"'
+
+ SetOutPath $INSTDIR
+ File /a "silent.nsi"
+ CreateDirectory "$INSTDIR\MyProjectFamily\MyProject" ; 2 recursively create a directory for fun.
+ WriteUninstaller "bt-uninst.exe"
+
+ Nop ; for fun
+
+SectionEnd
+
+Section "TempTest"
+
+SectionIn 1 2 3
+ Start: MessageBox MB_OK "Start:"
+
+ MessageBox MB_YESNO "Goto MyLabel" IDYES MyLabel
+
+ MessageBox MB_OK "Right before MyLabel:"
+
+ MyLabel: MessageBox MB_OK "MyLabel:"
+
+ MessageBox MB_OK "Right after MyLabel:"
+
+ MessageBox MB_YESNO "Goto Start:?" IDYES Start
+
+SectionEnd
+
+SectionGroup /e SectionGroup1
+
+Section "Test Registry/INI functions"
+
+SectionIn 1 4 3
+
+ WriteRegStr HKLM SOFTWARE\NSISTest\BigNSISTest "StrTest_INSTDIR" "$INSTDIR"
+ WriteRegDword HKLM SOFTWARE\NSISTest\BigNSISTest "DwordTest_0xDEADBEEF" 0xdeadbeef
+ WriteRegDword HKLM SOFTWARE\NSISTest\BigNSISTest "DwordTest_123456" 123456
+ WriteRegDword HKLM SOFTWARE\NSISTest\BigNSISTest "DwordTest_0123" 0123
+ WriteRegBin HKLM SOFTWARE\NSISTest\BigNSISTest "BinTest_deadbeef01f00dbeef" "DEADBEEF01F00DBEEF"
+ StrCpy $8 "$SYSDIR\IniTest"
+ WriteINIStr "$INSTDIR\test.ini" "MySection" "Value1" $8
+ WriteINIStr "$INSTDIR\test.ini" "MySectionIni" "Value1" $8
+ WriteINIStr "$INSTDIR\test.ini" "MySectionIni" "Value2" $8
+ WriteINIStr "$INSTDIR\test.ini" "IniOn" "Value1" $8
+
+ Call MyFunctionTest
+
+ DeleteINIStr "$INSTDIR\test.ini" "IniOn" "Value1"
+ DeleteINISec "$INSTDIR\test.ini" "MySectionIni"
+
+ ReadINIStr $1 "$INSTDIR\test.ini" "MySectionIni" "Value1"
+ StrCmp $1 "" INIDelSuccess
+ MessageBox MB_OK "DeleteINISec failed"
+ INIDelSuccess:
+
+ ClearErrors
+ ReadRegStr $1 HKCR "software\microsoft" xyz_cc_does_not_exist
+ IfErrors 0 NoError
+ MessageBox MB_OK "could not read from HKCR\software\microsoft\xyz_cc_does_not_exist"
+ Goto ErrorYay
+ NoError:
+ MessageBox MB_OK "read '$1' from HKCR\software\microsoft\xyz_cc_does_not_exist"
+ ErrorYay:
+
+SectionEnd
+
+Section "Test CreateShortCut"
+
+ SectionIn 1 2 3
+
+ Call CSCTest
+
+SectionEnd
+
+SectionGroup Group2
+
+Section "Test Branching"
+
+ BeginTestSection:
+ SectionIn 1 2 3
+
+ SetOutPath $INSTDIR
+
+ IfFileExists "$INSTDIR\LogicLib.nsi" 0 BranchTest69
+
+ MessageBox MB_YESNO|MB_ICONQUESTION "Would you like to overwrite $INSTDIR\LogicLib.nsi?" IDNO NoOverwrite ; skipped if file doesn't exist
+
+ BranchTest69:
+
+ SetOverwrite ifnewer ; NOT AN INSTRUCTION, NOT COUNTED IN SKIPPINGS
+
+ NoOverwrite:
+
+ File "LogicLib.nsi" ; skipped if answered no
+ SetOverwrite try ; NOT AN INSTRUCTION, NOT COUNTED IN SKIPPINGS
+
+ MessageBox MB_YESNO|MB_ICONQUESTION "Would you like to skip the rest of this section?" IDYES EndTestBranch
+ MessageBox MB_YESNO|MB_ICONQUESTION "Would you like to go back to the beginning of this section?" IDYES BeginTestSection
+ MessageBox MB_YESNO|MB_ICONQUESTION "Would you like to hide the installer and wait five seconds?" IDNO NoHide
+
+ HideWindow
+ Sleep 5000
+ BringToFront
+
+ NoHide:
+
+ MessageBox MB_YESNO|MB_ICONQUESTION "Would you like to call the function 5 times?" IDNO NoRecurse
+
+ StrCpy $1 "x"
+
+ LoopTest:
+
+ Call myfunc
+ StrCpy $1 "x$1"
+ StrCmp $1 "xxxxxx" 0 LoopTest
+
+ NoRecurse:
+
+ EndTestBranch:
+
+SectionEnd
+
+SectionGroupEnd
+
+Section "Test CopyFiles"
+
+ SectionIn 1 2 3
+
+ SetOutPath $INSTDIR\cpdest
+ CopyFiles "$WINDIR\*.ini" "$INSTDIR\cpdest" 0
+
+SectionEnd
+
+SectionGroupEnd
+
+Section "Test Exec functions" TESTIDX
+
+ SectionIn 1 2 3
+
+ SearchPath $1 notepad.exe
+
+ MessageBox MB_OK "notepad.exe=$1"
+ Exec '"$1"'
+ ExecShell "open" '"$INSTDIR"'
+ Sleep 500
+ BringToFront
+
+SectionEnd
+
+Section "Test ActiveX control registration"
+
+ SectionIn 2
+
+ UnRegDLL "$SYSDIR\spin32.ocx"
+ Sleep 1000
+ RegDLL "$SYSDIR\spin32.ocx"
+ Sleep 1000
+
+SectionEnd
+
+;--------------------------------
+
+Function "CSCTest"
+
+ CreateDirectory "$SMPROGRAMS\Big NSIS Test"
+ SetOutPath $INSTDIR ; for working directory
+ CreateShortCut "$SMPROGRAMS\Big NSIS Test\Uninstall BIG NSIS Test.lnk" "$INSTDIR\bt-uninst.exe" ; use defaults for parameters, icon, etc.
+ ; this one will use notepad's icon, start it minimized, and give it a hotkey (of Ctrl+Shift+Q)
+ CreateShortCut "$SMPROGRAMS\Big NSIS Test\silent.nsi.lnk" "$INSTDIR\silent.nsi" "" "$WINDIR\notepad.exe" 0 SW_SHOWMINIMIZED CONTROL|SHIFT|Q
+ CreateShortCut "$SMPROGRAMS\Big NSIS Test\TheDir.lnk" "$INSTDIR\" "" "" 0 SW_SHOWMAXIMIZED CONTROL|SHIFT|Z
+
+FunctionEnd
+
+Function myfunc
+
+ StrCpy $2 "MyTestVar=$1"
+ MessageBox MB_OK "myfunc: $2"
+
+FunctionEnd
+
+Function MyFunctionTest
+
+ ReadINIStr $1 "$INSTDIR\test.ini" "MySectionIni" "Value1"
+ StrCmp $1 $8 NoFailedMsg
+ MessageBox MB_OK "WriteINIStr failed"
+
+ NoFailedMsg:
+
+FunctionEnd
+
+Function .onSelChange
+
+ SectionGetText ${TESTIDX} $0
+ StrCmp $0 "" e
+ SectionSetText ${TESTIDX} ""
+ Goto e2
+e:
+ SectionSetText ${TESTIDX} "TextInSection"
+e2:
+
+FunctionEnd
+
+;--------------------------------
+
+; Uninstaller
+
+UninstallText "This will uninstall example2. Hit next to continue."
+UninstallIcon "${NSISDIR}\Contrib\Graphics\Icons\nsis1-uninstall.ico"
+
+Section "Uninstall"
+
+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BigNSISTest"
+ DeleteRegKey HKLM "SOFTWARE\NSISTest\BigNSISTest"
+ Delete "$INSTDIR\silent.nsi"
+ Delete "$INSTDIR\LogicLib.nsi"
+ Delete "$INSTDIR\bt-uninst.exe"
+ Delete "$INSTDIR\test.ini"
+ Delete "$SMPROGRAMS\Big NSIS Test\*.*"
+ RMDir "$SMPROGRAMS\BiG NSIS Test"
+
+ MessageBox MB_YESNO|MB_ICONQUESTION "Would you like to remove the directory $INSTDIR\cpdest?" IDNO NoDelete
+ Delete "$INSTDIR\cpdest\*.*"
+ RMDir "$INSTDIR\cpdest" ; skipped if no
+ NoDelete:
+
+ RMDir "$INSTDIR\MyProjectFamily\MyProject"
+ RMDir "$INSTDIR\MyProjectFamily"
+ RMDir "$INSTDIR"
+
+ IfFileExists "$INSTDIR" 0 NoErrorMsg
+ MessageBox MB_OK "Note: $INSTDIR could not be removed!" IDOK 0 ; skipped if file doesn't exist
+ NoErrorMsg:
+
+SectionEnd
diff --git a/tests/examplefiles/ca65_example.s b/tests/examplefiles/ca65_example
index 67c6313e..67c6313e 100644
--- a/tests/examplefiles/ca65_example.s
+++ b/tests/examplefiles/ca65_example
diff --git a/tests/examplefiles/cbmbas_example.bas b/tests/examplefiles/cbmbas_example
index 8d8ded9e..8d8ded9e 100644
--- a/tests/examplefiles/cbmbas_example.bas
+++ b/tests/examplefiles/cbmbas_example
diff --git a/tests/examplefiles/classes.dylan b/tests/examplefiles/classes.dylan
index 6dd55ff2..7bb88faa 100644
--- a/tests/examplefiles/classes.dylan
+++ b/tests/examplefiles/classes.dylan
@@ -1,12 +1,26 @@
+module: sample
+comment: for make sure that does not highlight per word.
+ and it continues on to the next line.
+
define class <car> (<object>)
slot serial-number :: <integer> = unique-serial-number();
- slot model-name :: <string>,
+ constant slot model-name :: <string>,
required-init-keyword: model:;
- slot has-sunroof? :: <boolean>,
+ each-subclass slot has-sunroof? :: <boolean>,
init-keyword: sunroof?:,
init-value: #f;
+ keyword foo:;
+ required keyword bar:;
end class <car>;
+define class <flying-car> (<car>)
+end class <flying-car>;
+
+let flying-car = make(<flying-car>);
+let car? :: <car?> = #f;
+let prefixed-car :: <vehicles/car> = #f;
+let model :: <car-911> = #f;
+
define constant $empty-string = "";
define constant $escaped-backslash = '\\';
define constant $escaped-single-quote = '\'';
@@ -31,10 +45,79 @@ define method foo() => _ :: <boolean>;
#t
end method;
-define method \+()
-end;
+define method \+
+ (offset1 :: <time-offset>, offset2 :: <time-offset>)
+ => (sum :: <time-offset>)
+ let sum = offset1.total-seconds + offset2.total-seconds;
+ make(<time-offset>, total-seconds: sum);
+end method \+;
+
+define method bar ()
+ 1 | 2 & 3
+end
+
+if (bar)
+ 1
+elseif (foo)
+ 2
+else
+ 3
+end if;
+
+select (foo by instance?)
+ <integer> => 1
+ otherwise => 3
+end select;
+
+/* multi
+ line
+ comment
+*/
+
+/* multi line comments
+ /* can be */
+ nested */
define constant $symbol = #"hello";
define variable *vector* = #[3.5, 5]
define constant $list = #(1, 2);
define constant $pair = #(1 . "foo")
+
+let octal-number = #o238;
+let hex-number = #x3890ADEF;
+let binary-number = #b1010;
+let float-exponent = 3.5e10;
+
+block (return)
+ with-lock (lock)
+ return();
+ end;
+exception (e :: <error>)
+ format-out("Oh no");
+cleanup
+ return();
+afterwards
+ format-out("Hello");
+end;
+
+define macro repeat
+ { repeat ?:body end }
+ => { block (?=stop!)
+ local method again() ?body; again() end;
+ again();
+ end }
+end macro repeat;
+
+define macro with-decoded-seconds
+ {
+ with-decoded-seconds
+ (?max:variable, ?min:variable, ?sec:variable = ?time:expression)
+ ?:body
+ end
+ }
+ => {
+ let (?max, ?min, ?sec) = decode-total-seconds(?time);
+ ?body
+ }
+end macro;
+
diff --git a/tests/examplefiles/example.Rd b/tests/examplefiles/example.Rd
new file mode 100644
index 00000000..2b8de0b8
--- /dev/null
+++ b/tests/examplefiles/example.Rd
@@ -0,0 +1,78 @@
+\name{foo}
+\alias{foo}
+% I'm a comment
+\title{The foo function}
+
+\description{It doesn't do much}
+
+\usage{
+foo(x, y)
+}
+
+\arguments{
+ \item{x}{A number}
+ \item{y}{Another number}
+}
+\details{
+ I just adds \code{x} and \code{y},
+}
+\value{\code{numeric}. The sum of \code{x} and \code{y}.}
+\references{
+ \href{http://en.wikipedia.org/wiki/Sum}{Sum}
+}
+\author{
+ Anonymous
+}
+\note{
+ Lorem ipsum \dots \R \emph{emp}, \strong{strong}, \bold{bold},
+ \sQuote{single quotes}, \dQuote{double quotes}, \code{code},
+ \preformatted{x <- 2 + 2}, \kbd{type this}, \samp{literal seq},
+ \pkg{base}, \file{foo.txt}, \email{email@hostname},
+ \url{http://cran.r-project.org/}, \var{foo}, \env{HOME},
+ \option{-d}, \dfn{something new}, \acronym{GNU}.
+
+ Escaped symbols: \\ \{ \} \% not comment. \\NotAMacro.
+
+ \tabular{rlll}{
+ [,1] \tab alpha \tab numeric \tab A (ppb)\cr
+ [,2] \tab bravo \tab integer \tab B \cr
+ [,3] \tab charlie \tab character \tab C \cr
+ }
+ \enumerate{
+ \item delta
+ \item echo
+ }
+ \itemize{
+ \item foxtrot
+ \item golf
+ }
+
+ \deqn{p(x; \mu, \sigma^2) = \frac{1}{\sigma \sqrt{2 \pi}} \exp \frac{-(x - \mu)^2}{2 \sigma}{%
+ p(\mu; x) = 1/\sigma (2 \pi)^(-1/2) exp( -(x - \mu)^2 / (2 \sigma)) }
+ for \eqn{x = 0, 1, 2, \ldots}.
+
+ \if{latex}{\out{\beta}}\ifelse{html}{\out{&beta;}}{beta}
+
+#ifdef unix
+Now windows
+#endif
+#ifndef windows
+Using windows
+#endif
+
+}
+\section{Misc}{
+ Stuff.
+}
+
+\seealso{
+ \code{\link{sum}}
+}
+\examples{
+x <- 1
+y <- 2
+z <- foo(x, y)
+\dontrun{plot(z)}
+\dontshow{log(x)}
+}
+\keyword{arith}
diff --git a/tests/examplefiles/example.ceylon b/tests/examplefiles/example.ceylon
new file mode 100644
index 00000000..b136b995
--- /dev/null
+++ b/tests/examplefiles/example.ceylon
@@ -0,0 +1,33 @@
+doc "A top-level function,
+ with multi-line documentation."
+void topLevel(String? a, Integer b=5, String... seqs) {
+ function nested(String s) {
+ print(s[1..2]);
+ return true;
+ }
+ for (s in seqs.filter((String x) x.size > 2)) {
+ nested(s);
+ }
+ value uppers = seqs.sequence[].uppercased;
+ String|Nothing z = a;
+ Sequence<Integer> ints = { 1, 2, 3, 4, 5 };
+}
+
+shared class Example<Element>(name, element) satisfies Comparable<Example<Element>>
+ given Element satisfies Comparable<Element> {
+ shared String name;
+ shared Element element;
+
+ shared actual Comparison compare(Example<Element> other) {
+ return element <=> other.element;
+ }
+
+ shared actual String string {
+ return "Example with " + element.string;
+ }
+}
+
+Example<Integer> instance = Example {
+ name = "Named args call";
+ element = 5;
+};
diff --git a/tests/examplefiles/example.cob b/tests/examplefiles/example.cob
new file mode 100644
index 00000000..3f65e498
--- /dev/null
+++ b/tests/examplefiles/example.cob
@@ -0,0 +1,3556 @@
+ IDENTIFICATION DIVISION.
+ PROGRAM-ID. OCic.
+ *****************************************************************
+ ** This program provides a Textual User Interface (TUI) to the **
+ ** process of compiling and (optionally) executing an OpenCOBOL**
+ ** program. **
+ ** **
+ ** This programs execution syntax is as follows: **
+ ** **
+ ** ocic <program-path-and-filename> [ <switch>... ] **
+ ** **
+ ** Once executed, a display screen will be presented showing **
+ ** the compilation options that will be used. The user will **
+ ** have the opportunity to change options, specify new ones **
+ ** and specify any program execution arguments to be used if **
+ ** you select the "Execute" option. When you press the Enter **
+ ** key the program will be compiled. **
+ ** **
+ ** The SCREEN SECTION contains an image of the screen. **
+ ** **
+ ** The "010-Parse-Args" section in the PROCEDURE DIVISION has **
+ ** documentation on switches and their function. **
+ *****************************************************************
+ ** **
+ ** AUTHOR: GARY L. CUTLER **
+ ** CutlerGL@gmail.com **
+ ** Copyright (C) 2009-2010, Gary L. Cutler, GPL **
+ ** **
+ ** DATE-WRITTEN: June 14, 2009 **
+ ** **
+ *****************************************************************
+ ** Note: Depending on which extended DISPLAY handler you're **
+ ** using (PDCurses, Curses, ...), you may need to un- **
+ ** comment any source lines tagged with "SCROLL" in cols **
+ ** 1-6 in order to have error messages scroll properly **
+ ** in the OCic shell window. **
+ *****************************************************************
+ ** DATE CHANGE DESCRIPTION **
+ ** ====== ==================================================== **
+ ** GC0609 Don't display compiler messages file if compilation **
+ ** Is successful. Also don't display messages if the **
+ ** output file is busy (just put a message on the **
+ ** screen, leave the OC screen up & let the user fix **
+ ** the problem & resubmit. **
+ ** GC0709 When 'EXECUTE' is selected, a 'FILE BUSY' error will **
+ ** still cause the (old) executable to be launched. **
+ ** Also, the 'EXTRA SWITCHES' field is being ignored. **
+ ** Changed the title bar to lowlighted reverse video & **
+ ** the message area to highlighted reverse-video. **
+ ** GC0809 Add a SPACE in from of command-line args when **
+ ** executing users program. Add a SPACE after the **
+ ** -ftraceall switch when building cobc command. **
+ ** GC0909 Convert to work on Cygwin/Linux as well as MinGW **
+ ** GC0310 Virtualized the key codes for S-F1 thru S-F7 as they **
+ ** differ depending upon whether PDCurses or NCurses is **
+ ** being used. **
+ ** GC0410 Introduced the cross-reference and source listing **
+ ** features. Also fixed a bug in @EXTRA switch proces- **
+ ** sing where garbage will result if more than the **
+ ** @EXTRA switch is specified. **
+ *****************************************************************
+ ENVIRONMENT DIVISION.
+ CONFIGURATION SECTION.
+ REPOSITORY.
+ FUNCTION ALL INTRINSIC.
+ INPUT-OUTPUT SECTION.
+ FILE-CONTROL.
+ SELECT Bat-File ASSIGN TO Bat-File-Name
+ ORGANIZATION IS LINE SEQUENTIAL.
+
+ SELECT Cobc-Output ASSIGN TO Cobc-Output-File
+ ORGANIZATION IS LINE SEQUENTIAL.
+
+ SELECT Source-Code ASSIGN TO File-Name
+ ORGANIZATION IS LINE SEQUENTIAL
+ FILE STATUS IS FSM-Status.
+ DATA DIVISION.
+ FILE SECTION.
+ FD Bat-File.
+ 01 Bat-File-Rec PIC X(2048).
+
+ FD Cobc-Output.
+ 01 Cobc-Output-Rec PIC X(256).
+
+ FD Source-Code.
+ 01 Source-Code-Record PIC X(80).
+
+ WORKING-STORAGE SECTION.
+ COPY screenio.
+
+ 01 Bat-File-Name PIC X(256).
+
+GC0909 01 Cmd PIC X(512).
+
+ 01 Cobc-Cmd PIC X(256).
+
+ 01 Cobc-Output-File PIC X(256).
+
+ 01 Command-Line-Args PIC X(256).
+
+ 01 Config-File PIC X(12).
+
+GC0310 01 Config-Keys.
+GC0310 05 CK-S-F1 PIC 9(4).
+GC0310 05 CK-S-F2 PIC 9(4).
+GC0310 05 CK-S-F3 PIC 9(4).
+GC0310 05 CK-S-F4 PIC 9(4).
+GC0310 05 CK-S-F5 PIC 9(4).
+GC0310 05 CK-S-F6 PIC 9(4).
+GC0310 05 CK-S-F7 PIC 9(4).
+
+GC0909 01 Dir-Char PIC X(1).
+
+ 01 Dummy PIC X(1).
+
+ 01 Env-TEMP PIC X(256).
+
+ 01 File-Name.
+ 05 FN-Char OCCURS 256 TIMES PIC X(1).
+
+ 01 File-Status-Message.
+ 05 FILLER PIC X(13) VALUE 'Status Code: '.
+ 05 FSM-Status PIC 9(2).
+ 05 FILLER PIC X(11) VALUE ', Meaning: '.
+ 05 FSM-Msg PIC X(25).
+
+ 01 Flags.
+ 05 F-Compilation-Succeeded PIC X(1).
+ 88 88-Compile-OK VALUE 'Y'.
+GC0909 88 88-Compile-OK-Warn VALUE 'W'.
+ 88 88-Compile-Failed VALUE 'N'.
+GC0609 05 F-Complete PIC X(1).
+GC0609 88 88-Complete VALUE 'Y'.
+GC0609 88 88-Not-Complete VALUE 'N'.
+GC0809 05 F-IDENT-DIVISION PIC X(1).
+GC0809 88 88-1st-Prog-Complete VALUE 'Y'.
+GC0809 88 88-More-To-1st-Prog VALUE 'N'.
+ 05 F-LINKAGE-SECTION PIC X(1).
+ 88 88-Compile-As-Subpgm VALUE 'Y'.
+ 88 88-Compile-As-Mainpgm VALUE 'N'.
+ 05 F-No-Switch-Changes PIC X(1).
+ 88 88-No-Switch-Changes VALUE 'Y'.
+ 88 88-Switch-Changes VALUE 'N'.
+GC0709 05 F-Output-File-Busy PIC X(1).
+GC0709 88 88-Output-File-Busy VALUE 'Y'.
+GC0709 88 88-Output-File-Avail VALUE 'N'.
+GC0809 05 F-Source-Record-Type PIC X(1).
+GC0809 88 88-Source-Rec-Linkage VALUE 'L'.
+GC0809 88 88-Source-Rec-Ident VALUE 'I'.
+GC0809 88 88-Source-Rec-IgnoCOB-COLOR-RED VALUE ' '.
+ 05 F-Switch-Error PIC X(1).
+ 88 88-Switch-Is-Bad VALUE 'Y'.
+ 88 88-Switch-Is-Good VALUE 'N'.
+
+GC0909 01 Horizontal-Line PIC X(80).
+GC0909
+ 01 I USAGE BINARY-LONG.
+
+ 01 J USAGE BINARY-LONG.
+
+GC0909 01 MS USAGE BINARY-LONG.
+
+GC0909 01 ML USAGE BINARY-LONG.
+
+ 01 OC-Compiled PIC XXXX/XX/XXBXX/XX.
+
+GC0909 01 OS-Type USAGE BINARY-LONG.
+GC0909 88 OS-Unknown VALUE 0.
+GC0909 88 OS-Windows VALUE 1.
+GC0909 88 OS-Cygwin VALUE 2.
+GC0909 88 OS-UNIX VALUE 3.
+
+GC0909 01 OS-Type-Literal PIC X(7).
+
+ 01 Output-Message PIC X(80).
+
+ 01 Path-Delimiter PIC X(1).
+
+ 01 Prog-Folder PIC X(256).
+
+ 01 Prog-Extension PIC X(30).
+
+ 01 Prog-File-Name PIC X(40).
+
+ 01 Prog-Name PIC X(31).
+
+ 78 Selection-Char VALUE '>'.
+
+ 01 Switch-Display.
+ 05 SD-Switch-And-Value PIC X(19).
+ 05 FILLER PIC X(1).
+ 05 SD-Description PIC X(60).
+
+ 01 Switch-Keyword PIC X(12).
+GC0410 88 Switch-Is-CONFIG VALUE '@CONFIG', '@C'.
+GC0410 88 Switch-Is-DEBUG VALUE '@DEBUG', '@D'.
+GC0410 88 Switch-Is-DLL VALUE '@DLL'.
+GC0410 88 Switch-Is-EXECUTE VALUE '@EXECUTE', '@E'.
+GC0410 88 Switch-Is-EXTRA VALUE '@EXTRA', '@EX'.
+GC0410 88 Switch-Is-NOTRUNC VALUE '@NOTRUNC', '@N'.
+GC0410 88 Switch-Is-TRACE VALUE '@TRACE', '@T'.
+GC0410 88 Switch-Is-SOURCE VALUE '@SOURCE', '@S'.
+GC0410 88 Switch-Is-XREF VALUE '@XREF', '@X'.
+
+ 01 Switch-Keyword-And-Value PIC X(256).
+
+ 01 Switch-Value.
+ 05 SV-1 PIC X(1).
+ 05 FILLER PIC X(255).
+ 01 Switch-Value-Alt REDEFINES Switch-Value
+ PIC X(256).
+ 88 Valid-Config-Filename
+ VALUE 'BS2000', 'COBOL85', 'COBOL2002', 'DEFAULT',
+ 'IBM', 'MF', 'MVS'.
+
+ 01 Switches.
+ 05 S-ARGS PIC X(75) VALUE SPACES.
+ 05 S-CfgS.
+ 10 S-Cfg-BS2000 PIC X(1) VALUE ' '.
+ 10 S-Cfg-COBOL85 PIC X(1) VALUE ' '.
+ 10 S-Cfg-COBOL2002 PIC X(1) VALUE ' '.
+ 10 S-Cfg-DEFAULT PIC X(1) VALUE Selection-Char.
+ 10 S-Cfg-IBM PIC X(1) VALUE ' '.
+ 10 S-Cfg-MF PIC X(1) VALUE ' '.
+ 10 S-Cfg-MVS PIC X(1) VALUE ' '.
+ 05 S-EXTRA PIC X(75) VALUE SPACES.
+ 05 S-Yes-No-Switches.
+ 10 S-DEBUG PIC X(1) VALUE 'N'.
+ 10 S-DLL PIC X(1) VALUE 'N'.
+GC0410 10 S-XREF PIC X(1) VALUE 'N'.
+GC0410 10 S-SOURCE PIC X(1) VALUE 'N'.
+ 10 S-EXECUTE PIC X(1) VALUE 'N'.
+ 10 S-NOTRUNC PIC X(1) VALUE 'Y'.
+ 10 S-SUBROUTINE PIC X(1) VALUE 'A'.
+ 10 S-TRACE PIC X(1) VALUE 'N'.
+ 10 S-TRACEALL PIC X(1) VALUE 'N'.
+
+ 01 Tally USAGE BINARY-LONG.
+
+ SCREEN SECTION.
+ *>
+ *> Here is the layout of the OCic screen.
+ *>
+ *> Note that this program can utilize the traditional PC line-drawing characters,
+ *> if they are available.
+ *>
+ *> If this program is run on Windows, it must run with codepage 437 activated to
+ *> display the line-drawing characters. With a native Windows build or a
+ *> Windows/MinGW build, one could use the command "chcp 437" to set that codepage
+ *> for display within a Windows console window (that should be the default, though).
+ *> With a Windows/Cygwin build, set the environment variable CYGWIN to a value of
+ *> "codepage:oem" (this cannot be done from within the program though - you will
+ *> have to use the "Computer/Advanced System Settings/Environment Variables" (Vista or
+ *> Windows 7) function to define the variable. XP Users: use "My Computer/Properties/
+ *> Advanced/Environment Variables".
+ *>
+ *> To use OCic without the line-drawing characters, comment-out the first set of
+ *> 78 "LD" items and uncomment the second.
+ *>
+ *> The following sample screen layout shows how the screen looks with line-drawing
+ *> characters disabled.
+ *>
+ *>===================================================================================
+ *> OCic (2010/04/02 11:36) - OpenCOBOL V1.1 Interactive Compilation Windows 01
+ *> +-----------------------------------------------------------------------------+ 02
+ *> | Program: OCic F-Key: Select Opt | 03
+ *> | Folder: E:\OpenCOBOL\Samples Enter: Compile | 04
+ *> | Filename: OCic.cbl Esc: Quit | 05
+ *> +-----------------------------------------------------------------------------+ 06
+ *> On/Off Switches: Configuration: 07
+ *> +---------------------------------------------------------+-------------------+ 08
+ *> | F1 Compile debug lines F8 Produce source listing | S-F1 BS2000 | 09
+ *> | F2 Always make DLLs F9 Produce xref listing | S-F2 COBOL85 | 10
+ *> | F3 Pgm is a SUBROUTINE | S-F3 COBOL2002 | 11
+ *> | F4 Execute if compile OK | S-F4 > Default | 12
+ *> | F5 > No COMP/BINARY trunc | S-F5 IBM | 13
+ *> | F6 Trace procedures | S-F6 MicroFocus | 14
+ *> | F7 Trace proc + stmnts | S-F7 MVS | 15
+ *> +---------------------------------------------------------+-------------------+ 16
+ *> Additional "cobc" Switches (if any): 17
+ *> +-----------------------------------------------------------------------------+ 18
+ *> | -O2________________________________________________________________________ | 19
+ *> +-----------------------------------------------------------------------------+ 20
+ *> Program Execution Arguments (if any): 21
+ *> +-----------------------------------------------------------------------------+ 22
+ *> | ___________________________________________________________________________ | 23
+ *> +-----------------------------------------------------------------------------+ 24
+ *> OCic Copyright (C) 2009-2010, Gary L. Cutler, GPL 25
+ *>===================================================================================
+ *>12345678901234567890123456789012345678901234567890123456789012345678901234567890
+ *> 1 2 3 4 5 6 7 8
+ *>
+ *> USE THESE CHARS FOR LINE-DRAWING IF YOU HAVE ACCESS TO PC-DOS CODEPAGE 437:
+ *>
+ 78 LD-UL-Corner VALUE X"DA".
+ 78 LD-LL-Corner VALUE X"C0".
+ 78 LD-UR-Corner VALUE X"BF".
+ 78 LD-LR-Corner VALUE X"D9".
+ 78 LD-Upper-T VALUE X"C2".
+ 78 LD-Lower-T VALUE X"C1".
+ 78 LD-Horiz-Line VALUE X"C4".
+ 78 LD-Vert-Line VALUE X"B3".
+ *>
+ *> USE THESE CHARS FOR LINE-DRAWING IF YOU DO NOT HAVE ACCESS TO PC-DOS CODEPAGE 437:
+ *>
+ *> 78 LD-UL-Corner VALUE '+'.
+ *> 78 LD-LL-Corner VALUE '+'.
+ *> 78 LD-UR-Corner VALUE '+'.
+ *> 78 LD-LR-Corner VALUE '+'.
+ *> 78 LD-Upper-T VALUE '+'.
+ *> 78 LD-Lower-T VALUE '+'.
+ *> 78 LD-Horiz-Line VALUE '-'.
+ *> 78 LD-Vert-Line VALUE '|'.
+ *>
+ 01 Blank-Screen LINE 1 COLUMN 1 BLANK SCREEN.
+
+ 01 Switches-Screen BACKGROUND-COLOR COB-COLOR-BLACK
+ FOREGROUND-COLOR COB-COLOR-WHITE AUTO.
+ *>
+ *> GENERAL SCREEN FRAMEWORK
+ *>
+ 03 BACKGROUND-COLOR COB-COLOR-BLACK
+ FOREGROUND-COLOR COB-COLOR-BLUE HIGHLIGHT.
+ 05 LINE 02 COL 02 VALUE LD-UL-Corner.
+ 05 PIC X(77) FROM Horizontal-Line.
+ 05 COL 80 VALUE LD-UR-Corner.
+
+ 05 LINE 03 COL 02 VALUE LD-Vert-Line.
+ 05 COL 80 VALUE LD-Vert-Line.
+
+ 05 LINE 04 COL 02 VALUE LD-Vert-Line.
+ 05 COL 80 VALUE LD-Vert-Line.
+
+ 05 LINE 05 COL 02 VALUE LD-Vert-Line.
+ 05 COL 80 VALUE LD-Vert-Line.
+
+ 05 LINE 06 COL 02 VALUE LD-LL-Corner.
+ 05 PIC X(77) FROM Horizontal-Line.
+ 05 COL 80 VALUE LD-LR-Corner.
+
+ 05 LINE 08 COL 02 VALUE LD-UL-Corner.
+ 05 PIC X(57) FROM Horizontal-Line.
+ 05 COL 60 VALUE LD-Upper-T.
+ 05 PIC X(19) FROM Horizontal-Line.
+ 05 COL 80 VALUE LD-UR-Corner.
+
+ 05 LINE 09 COL 02 VALUE LD-Vert-Line.
+ 05 COL 60 VALUE LD-Vert-Line.
+ 05 COL 80 VALUE LD-Vert-Line.
+
+ 05 LINE 10 COL 02 VALUE LD-Vert-Line.
+ 05 COL 60 VALUE LD-Vert-Line.
+ 05 COL 80 VALUE LD-Vert-Line.
+
+ 05 LINE 11 COL 02 VALUE LD-Vert-Line.
+ 05 COL 60 VALUE LD-Vert-Line.
+ 05 COL 80 VALUE LD-Vert-Line.
+
+ 05 LINE 12 COL 02 VALUE LD-Vert-Line.
+ 05 COL 60 VALUE LD-Vert-Line.
+ 05 COL 80 VALUE LD-Vert-Line.
+
+ 05 LINE 13 COL 02 VALUE LD-Vert-Line.
+ 05 COL 60 VALUE LD-Vert-Line.
+ 05 COL 80 VALUE LD-Vert-Line.
+
+ 05 LINE 14 COL 02 VALUE LD-Vert-Line.
+ 05 COL 60 VALUE LD-Vert-Line.
+ 05 COL 80 VALUE LD-Vert-Line.
+
+ 05 LINE 15 COL 02 VALUE LD-Vert-Line.
+ 05 COL 60 VALUE LD-Vert-Line.
+ 05 COL 80 VALUE LD-Vert-Line.
+
+ 05 LINE 16 COL 02 VALUE LD-LL-Corner.
+ 05 PIC X(57) FROM Horizontal-Line.
+ 05 COL 60 VALUE LD-Lower-T.
+ 05 PIC X(19) FROM Horizontal-Line.
+ 05 COL 80 VALUE LD-LR-Corner.
+
+ 05 LINE 18 COL 02 VALUE LD-UL-Corner.
+ 05 PIC X(77) FROM Horizontal-Line.
+ 05 COL 80 VALUE LD-UR-Corner.
+
+ 05 LINE 19 COL 02 VALUE LD-Vert-Line.
+ 05 COL 80 VALUE LD-Vert-Line.
+
+ 05 LINE 20 COL 02 VALUE LD-LL-Corner.
+ 05 PIC X(77) FROM Horizontal-Line.
+ 05 COL 80 VALUE LD-LR-Corner.
+
+ 05 LINE 22 COL 02 VALUE LD-UL-Corner.
+ 05 PIC X(77) FROM Horizontal-Line.
+ 05 COL 80 VALUE LD-UR-Corner.
+
+ 05 LINE 23 COL 02 VALUE LD-Vert-Line.
+ 05 COL 80 VALUE LD-Vert-Line.
+
+ 05 LINE 24 COL 02 VALUE LD-LL-Corner.
+ 05 PIC X(77) FROM Horizontal-Line.
+ 05 COL 80 VALUE LD-LR-Corner.
+ *>
+ *> TOP AND BOTTOM LINES
+ *>
+ 03 BACKGROUND-COLOR COB-COLOR-BLUE BLINK
+ FOREGROUND-COLOR COB-COLOR-WHITE HIGHLIGHT.
+GC0410 05 LINE 01 COL 01 VALUE ' OCic ('.
+GC0410 05 PIC X(16) FROM OC-Compiled.
+GC0410 05 VALUE ') OpenCOBOL V1.1 06FEB2009 ' &
+GC0410 'Interactive Compilation '.
+GC0410 05 LINE 25 COL 01 PIC X(81) FROM Output-Message.
+ *>
+ *> LABELS
+ *>
+ 03 BACKGROUND-COLOR COB-COLOR-BLACK
+ FOREGROUND-COLOR COB-COLOR-CYAN HIGHLIGHT.
+ 05 LINE 07 COL 04 VALUE 'On/Off Switches:'.
+ 05 COL 62 VALUE 'Configuration:'.
+ 05 LINE 17 COL 04 VALUE 'Additional "cobc" Switches (if any
+ - '):'.
+ 05 LINE 21 COL 04 VALUE 'Program Execution Arguments (if an
+ - 'y):'.
+ *>
+ *> TOP SECTION BACKGROUND
+ *>
+ 03 BACKGROUND-COLOR COB-COLOR-BLACK
+ FOREGROUND-COLOR COB-COLOR-CYAN LOWLIGHT.
+ 05 LINE 03 COL 04 VALUE 'Program: '.
+ 05 LINE 04 COL 04 VALUE 'Folder: '.
+ 05 LINE 05 COL 04 VALUE 'Filename: '.
+
+ 05 LINE 03 COL 62 VALUE 'F-Key: Select Opt'.
+ 05 LINE 04 COL 62 VALUE 'Enter: Compile '.
+ 05 LINE 05 COL 62 VALUE 'Esc: Quit '.
+ *>
+ *> TOP SECTION PROGRAM INFO
+ *>
+ 03 BACKGROUND-COLOR COB-COLOR-BLACK
+ FOREGROUND-COLOR COB-COLOR-WHITE HIGHLIGHT.
+ 05 LINE 03 COL 14 PIC X(47) FROM Prog-Name.
+ 05 LINE 04 COL 14 PIC X(47) FROM Prog-Folder.
+ 05 LINE 05 COL 14 PIC X(47) FROM Prog-File-Name.
+ *>
+ *> MIDDLE LEFT SECTION F-KEYS
+ *>
+ 03 BACKGROUND-COLOR COB-COLOR-BLACK
+ FOREGROUND-COLOR COB-COLOR-WHITE HIGHLIGHT.
+ 05 LINE 09 COL 04 VALUE 'F1'.
+ 05 LINE 10 COL 04 VALUE 'F2'.
+ 05 LINE 11 COL 04 VALUE 'F3'.
+ 05 LINE 12 COL 04 VALUE 'F4'.
+ 05 LINE 13 COL 04 VALUE 'F5'.
+ 05 LINE 14 COL 04 VALUE 'F6'.
+ 05 LINE 15 COL 04 VALUE 'F7'.
+ 05 LINE 09 COL 32 VALUE 'F8'.
+ 05 LINE 10 COL 32 VALUE 'F9'.
+ *>
+ *> MIDDLE LEFT SECTION SWITCHES
+ *>
+ 03 BACKGROUND-COLOR COB-COLOR-BLACK
+ FOREGROUND-COLOR COB-COLOR-RED HIGHLIGHT.
+ 05 LINE 09 COL 07 PIC X(1) FROM S-DEBUG.
+ 05 LINE 10 COL 07 PIC X(1) FROM S-DLL.
+ 05 LINE 11 COL 07 PIC X(1) FROM S-SUBROUTINE.
+ 05 LINE 12 COL 07 PIC X(1) FROM S-EXECUTE.
+ 05 LINE 13 COL 07 PIC X(1) FROM S-NOTRUNC.
+ 05 LINE 14 COL 07 PIC X(1) FROM S-TRACE.
+ 05 LINE 15 COL 07 PIC X(1) FROM S-TRACEALL.
+ 05 LINE 09 COL 35 PIC X(1) FROM S-SOURCE.
+ 05 LINE 10 COL 35 PIC X(1) FROM S-XREF.
+ *>
+ *> MIDDLE LEFT SECTION BACKGROUND
+ *>
+ 03 BACKGROUND-COLOR COB-COLOR-BLACK
+ FOREGROUND-COLOR COB-COLOR-CYAN LOWLIGHT.
+ 05 LINE 09 COL 09 VALUE 'Compile debug lines '.
+ 05 LINE 10 COL 09 VALUE 'Always make DLLs '.
+ 05 LINE 11 COL 09 VALUE 'Pgm is a SUBROUTINE '.
+ 05 LINE 12 COL 09 VALUE 'Execute if compile OK '.
+ 05 LINE 13 COL 09 VALUE 'No COMP/BINARY trunc '.
+ 05 LINE 14 COL 09 VALUE 'Trace procedures '.
+ 05 LINE 15 COL 09 VALUE 'Trace proc + stmnts '.
+ 05 LINE 09 COL 37 VALUE 'Produce source listing'.
+ 05 LINE 10 COL 37 VALUE 'Produce xref listing '.
+ *>
+ *> MIDDLE RIGHT SECTION F-KEYS
+ *>
+ 03 BACKGROUND-COLOR COB-COLOR-BLACK
+ FOREGROUND-COLOR COB-COLOR-WHITE HIGHLIGHT.
+ 05 LINE 09 COL 62 VALUE 'S-F1'.
+ 05 LINE 10 COL 62 VALUE 'S-F2'.
+ 05 LINE 11 COL 62 VALUE 'S-F3'.
+ 05 LINE 12 COL 62 VALUE 'S-F4'.
+ 05 LINE 13 COL 62 VALUE 'S-F5'.
+ 05 LINE 14 COL 62 VALUE 'S-F6'.
+ 05 LINE 15 COL 62 VALUE 'S-F7'.
+ *>
+ *> MIDDLE RIGHT SECTION SWITCHES
+ *>
+ 03 BACKGROUND-COLOR COB-COLOR-BLACK
+ FOREGROUND-COLOR COB-COLOR-RED HIGHLIGHT.
+ 05 LINE 09 COL 67 PIC X(1) FROM S-Cfg-BS2000.
+ 05 LINE 10 COL 67 PIC X(1) FROM S-Cfg-COBOL85.
+ 05 LINE 11 COL 67 PIC X(1) FROM S-Cfg-COBOL2002.
+ 05 LINE 12 COL 67 PIC X(1) FROM S-Cfg-DEFAULT.
+ 05 LINE 13 COL 67 PIC X(1) FROM S-Cfg-IBM.
+ 05 LINE 14 COL 67 PIC X(1) FROM S-Cfg-MF.
+ 05 LINE 15 COL 67 PIC X(1) FROM S-Cfg-MVS.
+ *>
+ *> MIDDLE RIGHT SECTION BACKGROUND
+ *>
+ 03 BACKGROUND-COLOR COB-COLOR-BLACK
+ FOREGROUND-COLOR COB-COLOR-CYAN LOWLIGHT.
+ 05 LINE 09 COL 69 VALUE 'BS2000 '.
+ 05 LINE 10 COL 69 VALUE 'COBOL85 '.
+ 05 LINE 11 COL 69 VALUE 'COBOL2002 '.
+ 05 LINE 12 COL 69 VALUE 'Default '.
+ 05 LINE 13 COL 69 VALUE 'IBM '.
+ 05 LINE 14 COL 69 VALUE 'MicroFocus'.
+ 05 LINE 15 COL 69 VALUE 'MVS '.
+ *>
+ *> FREE-FORM OPTIONS FIELDS
+ *>
+ 03 BACKGROUND-COLOR COB-COLOR-BLACK
+ FOREGROUND-COLOR COB-COLOR-WHITE HIGHLIGHT.
+ 05 LINE 19 COL 04 PIC X(75) USING S-EXTRA.
+ 05 LINE 23 COL 04 PIC X(75) USING S-ARGS.
+ /
+ PROCEDURE DIVISION.
+ *****************************************************************
+ ** Legend to procedure names: **
+ ** **
+ ** 00x-xxx All MAIN driver procedures **
+ ** 0xx-xxx All GLOBAL UTILITY procedures **
+ ** 1xx-xxx All INITIALIZATION procedures **
+ ** 2xx-xxx All CORE PROCESSING procedures **
+ ** 9xx-xxx All TERMINATION procedures **
+ *****************************************************************
+ DECLARATIVES.
+ 000-File-Error SECTION.
+ USE AFTER STANDARD ERROR PROCEDURE ON Source-Code.
+ 000-Handle-Error.
+ COPY FileStat-Msgs
+ REPLACING STATUS BY FSM-Status
+ MSG BY FSM-Msg.
+ MOVE SPACES TO Output-Message
+ IF FSM-Status = 35
+ DISPLAY
+ 'File not found: "'
+ TRIM(File-Name,TRAILING)
+ '"'
+ END-DISPLAY
+ ELSE
+ DISPLAY
+ 'Error accessing file: "'
+ TRIM(File-Name,TRAILING)
+ '"'
+ END-DISPLAY
+ END-IF
+ GOBACK
+ .
+ END DECLARATIVES.
+ /
+ 000-Main SECTION.
+
+ PERFORM 100-Initialization
+GC0609 SET 88-Not-Complete TO TRUE
+GC0609 PERFORM UNTIL 88-Complete
+GC0609 PERFORM 200-Let-User-Set-Switches
+GC0609 PERFORM 210-Run-Compiler
+GC0410 IF (88-Compile-OK OR 88-Compile-OK-Warn)
+GC0410 AND (S-XREF NOT = SPACE OR S-SOURCE NOT = SPACE)
+GC0410 PERFORM 220-Make-Listing
+GC0410 END-IF
+GC0709 IF (S-EXECUTE NOT = SPACES)
+GC0709 AND (88-Output-File-Avail)
+GC0609 PERFORM 230-Run-Program
+GC0609 END-IF
+GC0609 END-PERFORM
+ .
+
+ 009-Done.
+ PERFORM 900-Terminate
+ .
+ * -- Control will NOT return
+ /
+ 010-Parse-Args SECTION.
+ *****************************************************************
+ ** Process a sequence of KEYWORD=VALUE items. These are items **
+ ** specified on the command-line to provide the initial **
+ ** options shown selected on the screen. When integrating **
+ ** OCic into an edirot or framework, include these switches on **
+ ** the ocic.exe command the editor/framework executes. Any **
+ ** underlined choice is the default value for that switch. **
+ ** **
+ ** @CONFIG=BS2000|COBOL85|COBOL2002|DEFAULT|IBM|MF|MVS **
+ ** ======= **
+ ** This switch specifies the default cobc compiler configura- **
+ ** tion file to be used **
+ ** **
+ ** @DEBUG=YES|NO **
+ ** == **
+ ** This switch specifies whether (YES) or not (NO) debugging **
+ ** lines (those with a "D" in column 7) will be compiled. **
+ ** **
+ ** @DLL=YES|NO **
+ ** == **
+ ** Use this switch to force ALL compiled programs to be built **
+ ** as DLLs ("@DLL=YES"). When main programs are built as DLLs **
+ ** they must be executed using the cobcrun utility. When **
+ ** "@DLL=NO" is in effect, main programs are generated as **
+ ** actual "exe" files and only subprograms will be generated **
+ ** as DLLs. **
+ ** **
+ ** @EXECUTE=YES|NO **
+ ** == **
+ ** This switch specifies whether ("@EXECUTE=YES") or not **
+ ** ("@EXECUTE=NO") the program will be executed after it is **
+ ** successfully compiled. **
+ ** **
+ ** @EXTRA=extra cobc argument(s) **
+ ** **
+ ** This switch allows you to specify additional cobc arguments **
+ ** that aren't managed by the other OC switches. If used, **
+ ** this must be the last switch specified on the command line, **
+ ** as everything that follows the "=" will be placed on the **
+ ** cobc command generated by OC. **
+ ** **
+ ** @NOTRUNC=YES|NO **
+ ** === **
+ ** This switch specifies whether (YES) or not (NO) the sup- **
+ ** pression of binary field truncation will occur. If a PIC **
+ ** 99 COMP field (one byte of storage), for example, is given **
+ ** the value 123, it may have its value truncated to 23 when **
+ ** DISPLAYed. Regardless of the NOTRUNC setting, internally **
+ ** the full precision of the field (allowing a maximum value **
+ ** of 255) will be preserved. Even though truncation - if it **
+ ** does occur - would appear to have a minimal disruption on **
+ ** program operation, it has a significant effect on program **
+ ** run-time speed. **
+ ** **
+ ** @TRACE=YES|NO|ALL **
+ ** == **
+ ** This switch controls whether or not code will be added to **
+ ** the object program to produce execution-time logic traces. **
+ ** A specification of "@TRACE=NO" means no such code will be **
+ ** produced. By specifying "@TRACE=YES", code will be genera- **
+ ** ted to display procedure names as they are entered. A **
+ ** "@TRACE=ALL" specification will generate not only procedure **
+ ** traces (as "@TRACE=YES" would) but also statement-level **
+ ** traces too! All trace output is written to STDERR, so **
+ ** adding a "2>file" to the execution of the program will pipe **
+ ** the trace output to a file. You may find it valuable to **
+ ** add your own DISPLAY statements to the debugging output via **
+ ** "DISPLAY xx UPON SYSERR" The SYSERR device corresponds to **
+ ** the Windows or UNIX STDERR device and will therefore honor **
+ ** any "2>file" placed at the end of your program's execution. **
+ ** Add a "D" in column 7 and you can control the generation or **
+ ** ignoring of these DISPLAY statements via the "@DEBUG" **
+ ** switch. **
+ ** **
+GC0410** @SOURCE=YES|NO **
+GC0410** == **
+GC0410** Use this switch to produce a source listing of the program, **
+GC0410** PROVIDED it compiles without errors. **
+ ** **
+GC0410** @XREF=YES|NO **
+GC0410** == **
+GC0410** Use this switch to produce a cross-reference listing of the **
+GC0410** program, PROVIDED it compiles without errors. **
+ *****************************************************************
+
+ 011-Init.
+ MOVE 1 TO I
+ .
+
+ 012-Extract-Kwd-And-Value.
+ PERFORM UNTIL I NOT < LENGTH(Command-Line-Args)
+ MOVE I TO J
+ UNSTRING Command-Line-Args
+ DELIMITED BY ALL SPACES
+ INTO Switch-Keyword-And-Value
+ WITH POINTER I
+ END-UNSTRING
+ IF Switch-Keyword-And-Value NOT = SPACES
+ UNSTRING Switch-Keyword-And-Value
+ DELIMITED BY '='
+ INTO Switch-Keyword, Switch-Value
+ END-UNSTRING
+ PERFORM 030-Process-Keyword
+ END-IF
+ END-PERFORM
+ .
+
+ 019-Done.
+ EXIT.
+
+ *****************************************************************
+ ** Since this program uses the SCREEN SECTION, it cannot do **
+ ** conventional console DISPLAY operations. This routine **
+ ** (which, I admit, is like using an H-bomb to hunt rabbits) **
+ ** will submit an "ECHO" command to the system to simulate a **
+ ** DISPLAY. **
+ *****************************************************************
+ 021-Build-And-Issue-Command.
+ DISPLAY
+ Output-Message
+ END-DISPLAY
+ .
+
+ 029-Done.
+ EXIT.
+ /
+ 030-Process-Keyword SECTION.
+ *****************************************************************
+ ** Process a single KEYWORD=VALUE item. **
+ *****************************************************************
+
+ 031-Init.
+ MOVE UPPER-CASE(Switch-Keyword) TO Switch-Keyword
+ SET 88-Switch-Is-Good TO TRUE
+ .
+
+ 032-Process.
+ EVALUATE TRUE
+ WHEN Switch-Is-EXTRA
+GC0410 MOVE J TO I
+ UNSTRING Command-Line-Args DELIMITED BY '='
+ INTO Dummy, S-EXTRA
+GC0410 WITH POINTER I
+GC0410 END-UNSTRING
+ MOVE LENGTH(Command-Line-Args) TO I
+ WHEN Switch-Is-CONFIG
+ MOVE 'CONFIG' TO Switch-Keyword
+ MOVE UPPER-CASE(Switch-Value)
+ TO Switch-Value
+ EVALUATE Switch-Value
+ WHEN 'BS2000'
+ MOVE SPACES TO S-CfgS
+ MOVE Selection-Char TO S-Cfg-BS2000
+ WHEN 'COBOL85'
+ MOVE SPACES TO S-CfgS
+ MOVE Selection-Char TO S-Cfg-COBOL85
+ WHEN 'COBOL2002'
+ MOVE SPACES TO S-CfgS
+ MOVE Selection-Char TO S-Cfg-COBOL2002
+ WHEN 'DEFAULT'
+ MOVE SPACES TO S-CfgS
+ MOVE Selection-Char TO S-Cfg-DEFAULT
+ WHEN 'IBM'
+ MOVE SPACES TO S-CfgS
+ MOVE Selection-Char TO S-Cfg-IBM
+ WHEN 'MF'
+ MOVE SPACES TO S-CfgS
+ MOVE Selection-Char TO S-Cfg-MF
+ WHEN 'MVS'
+ MOVE SPACES TO S-CfgS
+ MOVE Selection-Char TO S-Cfg-MVS
+ WHEN OTHER
+ MOVE 'An invalid /CONFIG switch value ' &
+ 'was specified on the command line ' &
+ '- ignored'
+ TO Output-Message
+ END-EVALUATE
+ WHEN Switch-Is-DEBUG
+ MOVE 'DEBUG' TO Switch-Keyword
+ MOVE UPPER-CASE(Switch-Value)
+ TO Switch-Value
+ PERFORM 040-Process-Yes-No-Value
+ IF 88-Switch-Is-Good
+ MOVE SV-1 TO S-DEBUG
+ END-IF
+GC0410 WHEN Switch-Is-DLL
+GC0410 MOVE 'DLL' TO Switch-Keyword
+GC0410 MOVE UPPER-CASE(Switch-Value)
+GC0410 TO Switch-Value
+GC0410 PERFORM 040-Process-Yes-No-Value
+GC0410 IF 88-Switch-Is-Good
+GC0410 MOVE SV-1 TO S-DLL
+GC0410 END-IF
+ WHEN Switch-Is-EXECUTE
+ MOVE 'EXECUTE' TO Switch-Keyword
+ MOVE UPPER-CASE(Switch-Value)
+ TO Switch-Value
+ PERFORM 040-Process-Yes-No-Value
+ IF 88-Switch-Is-Good
+ MOVE SV-1 TO S-EXECUTE
+ END-IF
+ WHEN Switch-Is-NOTRUNC
+ MOVE 'NOTRUNC' TO Switch-Keyword
+ MOVE UPPER-CASE(Switch-Value)
+ TO Switch-Value
+ PERFORM 040-Process-Yes-No-Value
+ IF 88-Switch-Is-Good
+ MOVE SV-1 TO S-NOTRUNC
+ END-IF
+GC0410 WHEN Switch-Is-SOURCE
+GC0410 MOVE 'SOURCE' TO Switch-Keyword
+GC0410 MOVE UPPER-CASE(Switch-Value)
+GC0410 TO Switch-Value
+GC0410 PERFORM 050-Process-Yes-No-All
+GC0410 IF 88-Switch-Is-Good
+GC0410 MOVE SV-1 TO S-SOURCE
+GC0410 END-IF
+ WHEN Switch-Is-TRACE
+ MOVE 'TRACE' TO Switch-Keyword
+ MOVE UPPER-CASE(Switch-Value)
+ TO Switch-Value
+ PERFORM 050-Process-Yes-No-All
+ IF 88-Switch-Is-Good
+ MOVE SV-1 TO S-TRACE
+ END-IF
+GC0410 WHEN Switch-Is-XREF
+GC0410 MOVE 'XREF' TO Switch-Keyword
+GC0410 MOVE UPPER-CASE(Switch-Value)
+GC0410 TO Switch-Value
+GC0410 PERFORM 050-Process-Yes-No-All
+GC0410 IF 88-Switch-Is-Good
+GC0410 MOVE SV-1 TO S-XREF
+GC0410 END-IF
+ WHEN OTHER
+ MOVE SPACES TO Output-Message
+ STRING '"'
+ TRIM(Switch-Keyword)
+ '" is not a valid switch ' &
+ '- ignored'
+ DELIMITED SIZE
+ INTO Output-Message
+ END-STRING
+ SET 88-Switch-Is-Bad TO TRUE
+ END-EVALUATE
+ .
+
+ 039-Done.
+ EXIT.
+ /
+ 040-Process-Yes-No-Value SECTION.
+ *****************************************************************
+ ** Process a switch value of YES or NO **
+ *****************************************************************
+
+ 042-Process.
+ EVALUATE SV-1
+ WHEN 'Y'
+ MOVE 'YES' TO Switch-Value
+ WHEN 'N'
+ MOVE 'NO' To Switch-Value
+ WHEN OTHER
+ MOVE SPACES TO Output-Message
+ STRING '*ERROR: "' TRIM(Switch-Value)
+ '" is not a valid value for the "'
+ TRIM(Switch-Keyword) '" switch'
+ DELIMITED SPACES
+ INTO Output-Message
+ END-STRING
+ SET 88-Switch-Is-Bad TO TRUE
+ END-EVALUATE
+ .
+
+ 049-Done.
+ EXIT.
+ /
+ 050-Process-Yes-No-All SECTION.
+ *****************************************************************
+ ** Process a switch value of YES, NO or ALL **
+ *****************************************************************
+
+ 052-Process.
+ IF SV-1 = 'A'
+ MOVE 'ALL' TO Switch-Value
+ ELSE
+ PERFORM 040-Process-Yes-No-Value
+ END-IF
+ .
+
+ 059-Done.
+ EXIT.
+ /
+ 060-Process-Yes-No-Auto SECTION.
+ *****************************************************************
+ ** Process a switch value of YES, NO or AUTO **
+ *****************************************************************
+
+ 061-Init.
+ IF SV-1 = 'A'
+ PERFORM 070-Find-LINKAGE-SECTION
+ IF 88-Compile-As-Subpgm
+ MOVE 'Y' TO Switch-Value
+ ELSE
+ MOVE 'N' TO Switch-Value
+ END-IF
+ ELSE
+ PERFORM 040-Process-Yes-No-Value
+ END-IF
+ .
+ /
+ 070-Find-LINKAGE-SECTION SECTION.
+ *****************************************************************
+ ** Determine if the program being compiled is a MAIN program **
+ *****************************************************************
+
+ 071-Init.
+ OPEN INPUT Source-Code
+ SET 88-Compile-As-Mainpgm TO TRUE
+ SET 88-More-To-1st-Prog TO TRUE
+ PERFORM UNTIL 88-1st-Prog-Complete
+ READ Source-Code AT END
+ CLOSE Source-Code
+ EXIT SECTION
+ END-READ
+ CALL 'CHECKSOURCE' USING Source-Code-Record
+ F-Source-Record-Type
+ END-CALL
+ IF 88-Source-Rec-Ident
+ SET 88-1st-Prog-Complete TO TRUE
+ END-IF
+ END-PERFORM
+ .
+
+ 072-Process-Source.
+ SET 88-Source-Rec-IgnoCOB-COLOR-RED TO TRUE
+ PERFORM UNTIL 88-Source-Rec-Linkage
+ OR 88-Source-Rec-Ident
+ READ Source-Code AT END
+ CLOSE Source-Code
+ EXIT SECTION
+ END-READ
+ CALL 'CHECKSOURCE' USING Source-Code-Record
+ F-Source-Record-Type
+ END-CALL
+ END-PERFORM
+ CLOSE Source-Code
+ IF 88-Source-Rec-Linkage
+ SET 88-Compile-As-Subpgm TO TRUE
+ END-IF
+ .
+
+ 079-Done.
+ EXIT.
+ /
+ 100-Initialization SECTION.
+ *****************************************************************
+ ** Perform all program-wide initialization operations **
+ *****************************************************************
+
+
+GC0909 101-Determine-OS-Type.
+GC0909 CALL 'GETOSTYPE'
+GC0909 END-CALL
+GC0909 MOVE RETURN-CODE TO OS-Type
+GC0909 EVALUATE TRUE
+GC0909 WHEN OS-Unknown
+GC0909 MOVE '\' TO Dir-Char
+GC0909 MOVE 'Unknown' TO OS-Type-Literal
+GC0310 MOVE COB-SCR-F11 TO CK-S-F1
+GC0310 MOVE COB-SCR-F12 TO CK-S-F2
+GC0310 MOVE COB-SCR-F13 TO CK-S-F3
+GC0310 MOVE COB-SCR-F14 TO CK-S-F4
+GC0310 MOVE COB-SCR-F15 TO CK-S-F5
+GC0310 MOVE COB-SCR-F16 TO CK-S-F6
+GC0310 MOVE COB-SCR-F17 TO CK-S-F7
+GC0909 WHEN OS-Windows
+GC0909 MOVE '\' TO Dir-Char
+GC0909 MOVE 'Windows' TO OS-Type-Literal
+GC0310 MOVE COB-SCR-F13 TO CK-S-F1
+GC0310 MOVE COB-SCR-F14 TO CK-S-F2
+GC0310 MOVE COB-SCR-F15 TO CK-S-F3
+GC0310 MOVE COB-SCR-F16 TO CK-S-F4
+GC0310 MOVE COB-SCR-F17 TO CK-S-F5
+GC0310 MOVE COB-SCR-F18 TO CK-S-F6
+GC0310 MOVE COB-SCR-F19 TO CK-S-F7
+GC0909 WHEN OS-Cygwin
+GC0909 MOVE '/' TO Dir-Char
+GC0410 MOVE 'Cygwin' TO OS-Type-Literal
+GC0310 MOVE COB-SCR-F11 TO CK-S-F1
+GC0310 MOVE COB-SCR-F12 TO CK-S-F2
+GC0310 MOVE COB-SCR-F13 TO CK-S-F3
+GC0310 MOVE COB-SCR-F14 TO CK-S-F4
+GC0310 MOVE COB-SCR-F15 TO CK-S-F5
+GC0310 MOVE COB-SCR-F16 TO CK-S-F6
+GC0310 MOVE COB-SCR-F17 TO CK-S-F7
+GC0909 WHEN OS-UNIX
+GC0909 MOVE '/' TO Dir-Char
+GC0410 MOVE 'UNIX ' TO OS-Type-Literal
+GC0310 MOVE COB-SCR-F11 TO CK-S-F1
+GC0310 MOVE COB-SCR-F12 TO CK-S-F2
+GC0310 MOVE COB-SCR-F13 TO CK-S-F3
+GC0310 MOVE COB-SCR-F14 TO CK-S-F4
+GC0310 MOVE COB-SCR-F15 TO CK-S-F5
+GC0310 MOVE COB-SCR-F16 TO CK-S-F6
+GC0310 MOVE COB-SCR-F17 TO CK-S-F7
+GC0909 END-EVALUATE
+GC0909 .
+
+ 102-Set-Environment-Vars.
+ SET ENVIRONMENT 'COB_SCREEN_EXCEPTIONS' TO 'Y'
+ SET ENVIRONMENT 'COB_SCREEN_ESC' TO 'Y'
+ .
+
+ 103-Generate-Cobc-Output-Fn.
+ ACCEPT Env-TEMP
+ FROM ENVIRONMENT "TEMP"
+ END-ACCEPT
+ MOVE SPACES TO Cobc-Output-File
+ STRING TRIM(Env-TEMP,TRAILING)
+GC0909 Dir-Char
+GC0909 'OC-Messages.TXT'
+ DELIMITED SIZE
+ INTO Cobc-Output-File
+ END-STRING
+ .
+
+ 104-Generate-Banner-Line-Info.
+ MOVE WHEN-COMPILED (1:12) TO OC-Compiled
+ INSPECT OC-Compiled
+ REPLACING ALL '/' BY ':'
+ AFTER INITIAL SPACE
+ .
+
+ 105-Establish-Switch-Settings.
+ ACCEPT Command-Line-Args
+ FROM COMMAND-LINE
+ END-ACCEPT
+ MOVE TRIM(Command-Line-Args, Leading)
+ TO Command-Line-Args
+ MOVE 0 TO Tally
+GC0410 INSPECT Command-Line-Args TALLYING Tally FOR ALL '@'
+ IF Tally = 0
+ MOVE Command-Line-Args TO File-Name
+ MOVE SPACES TO Command-Line-Args
+ ELSE
+GC0410 UNSTRING Command-Line-Args DELIMITED BY '@'
+ INTO File-Name, Dummy
+ END-UNSTRING
+ INSPECT Command-Line-Args
+GC0410 REPLACING FIRST '@' BY LOW-VALUES
+ UNSTRING Command-Line-Args
+ DELIMITED BY LOW-VALUES
+ INTO Dummy, Cmd
+ END-UNSTRING
+ MOVE SPACES TO Command-Line-Args
+GC0410 STRING '@' Cmd DELIMITED SIZE
+ INTO Command-Line-Args
+ END-STRING
+ END-IF
+ IF File-Name = SPACES
+ DISPLAY
+ 'No program filename was specified'
+ END-DISPLAY
+ PERFORM 900-Terminate
+ END-IF
+ PERFORM 010-Parse-Args
+ IF S-SUBROUTINE = 'A'
+ MOVE 'S' TO Switch-Keyword
+ MOVE 'A' TO Switch-Value
+ PERFORM 070-Find-LINKAGE-SECTION
+ IF 88-Compile-As-Subpgm
+ MOVE 'Y' TO S-SUBROUTINE
+ ELSE
+ MOVE 'N' TO S-SUBROUTINE
+ END-IF
+ END-IF
+ INSPECT S-Yes-No-Switches REPLACING ALL 'Y' BY Selection-Char
+ INSPECT S-Yes-No-Switches REPLACING ALL 'N' BY ' '
+ .
+
+ 106-Determine-Folder-Path.
+ Move 256 TO I
+GC0909 IF OS-Cygwin AND File-Name (2:1) = ':'
+GC0909 MOVE '\' TO Dir-Char
+GC0909 END-IF
+ PERFORM UNTIL I = 0 OR FN-Char (I) = Dir-Char
+ SUBTRACT 1 FROM I
+ END-PERFORM
+ IF I = 0
+ MOVE SPACES TO Prog-Folder
+ MOVE File-Name TO Prog-File-Name
+ ELSE
+ MOVE '*' TO FN-Char (I)
+ UNSTRING File-Name DELIMITED BY '*'
+ INTO Prog-Folder
+ Prog-File-Name
+ END-UNSTRING
+ MOVE Dir-Char TO FN-Char (I)
+ END-IF
+ UNSTRING Prog-File-Name DELIMITED BY '.'
+ INTO Prog-Name, Prog-Extension
+ END-UNSTRING
+ IF Prog-Folder = SPACES
+ ACCEPT Prog-Folder
+ FROM ENVIRONMENT 'CD'
+ END-ACCEPT
+GC0909 ELSE
+GC0909 CALL "CBL_CHANGE_DIR"
+GC0909 USING TRIM(Prog-Folder,TRAILING)
+GC0909 END-CALL
+ END-IF
+GC0909 IF OS-Cygwin AND File-Name (2:1) = ':'
+GC0909 MOVE '/' TO Dir-Char
+GC0909 END-IF
+ .
+
+GC0909 107-Other.
+GC0909 MOVE ALL LD-Horiz-Line TO Horizontal-Line.
+GC0410 MOVE CONCATENATE(' OCic for ',
+GC0410 TRIM(OS-Type-Literal,Trailing),
+GC0410 ' Copyright (C) 2009-2010, Gary L. Cutler,',
+GC0410 ' GPL')
+GC0410 TO Output-Message.
+GC0909 .
+GC0909
+ 109-Done.
+ EXIT.
+ /
+ 200-Let-User-Set-Switches SECTION.
+ *****************************************************************
+ ** Show the user the current switch settings and allow them to **
+ ** be changed. **
+ *****************************************************************
+
+ 201-Init.
+ SET 88-Switch-Changes TO TRUE
+ .
+
+ 202-Show-And-Change-Switches.
+ PERFORM UNTIL 88-No-Switch-Changes
+ ACCEPT
+ Switches-Screen
+ END-ACCEPT
+ IF COB-CRT-STATUS > 0
+ EVALUATE COB-CRT-STATUS
+ WHEN COB-SCR-F1
+ IF S-DEBUG = SPACE
+ MOVE Selection-Char TO S-DEBUG
+ ELSE
+ MOVE ' ' TO S-DEBUG
+ END-IF
+ WHEN COB-SCR-F2
+ IF S-DLL = SPACE
+ MOVE Selection-Char TO S-DLL
+ ELSE
+ MOVE ' ' TO S-DLL
+ END-IF
+ WHEN COB-SCR-F3
+ IF S-SUBROUTINE = SPACE
+ MOVE Selection-Char TO S-SUBROUTINE
+ MOVE ' ' TO S-EXECUTE
+ ELSE
+ MOVE ' ' TO S-SUBROUTINE
+ END-IF
+ WHEN COB-SCR-F4
+ IF S-EXECUTE = SPACE
+ AND S-SUBROUTINE = SPACE
+ MOVE Selection-Char TO S-EXECUTE
+ ELSE
+ MOVE ' ' TO S-EXECUTE
+ END-IF
+ WHEN COB-SCR-F5
+ IF S-NOTRUNC = SPACE
+ MOVE Selection-Char TO S-NOTRUNC
+ ELSE
+ MOVE ' ' TO S-NOTRUNC
+ END-IF
+ WHEN COB-SCR-F6
+ IF S-TRACE = SPACE
+ MOVE Selection-Char TO S-TRACE
+ MOVE ' ' TO S-TRACEALL
+ ELSE
+ MOVE ' ' TO S-TRACE
+ END-IF
+ WHEN COB-SCR-F7
+ IF S-TRACEALL = SPACE
+ MOVE Selection-Char TO S-TRACEALL
+ MOVE ' ' TO S-TRACE
+ ELSE
+ MOVE ' ' TO S-TRACEALL
+ END-IF
+GC0410 WHEN COB-SCR-F8
+GC0410 IF S-SOURCE = SPACE
+GC0410 MOVE Selection-Char TO S-SOURCE
+GC0410 ELSE
+GC0410 MOVE ' ' TO S-SOURCE
+GC0410 END-IF
+GC0410 WHEN COB-SCR-F9
+GC0410 IF S-XREF = SPACE
+GC0410 MOVE Selection-Char TO S-XREF
+GC0410 ELSE
+GC0410 MOVE ' ' TO S-XREF
+GC0410 END-IF
+ WHEN COB-SCR-ESC
+ PERFORM 900-Terminate
+GC0310 WHEN CK-S-F1
+ MOVE SPACES TO S-CfgS
+ MOVE Selection-Char TO S-Cfg-BS2000
+GC0310 WHEN CK-S-F2
+ MOVE SPACES TO S-CfgS
+ MOVE Selection-Char TO S-Cfg-COBOL85
+GC0310 WHEN CK-S-F3
+ MOVE SPACES TO S-CfgS
+ MOVE Selection-Char TO S-Cfg-COBOL2002
+GC0310 WHEN CK-S-F4
+ MOVE SPACES TO S-CfgS
+ MOVE Selection-Char TO S-Cfg-DEFAULT
+GC0310 WHEN CK-S-F5
+ MOVE SPACES TO S-CfgS
+ MOVE Selection-Char TO S-Cfg-IBM
+GC0310 WHEN CK-S-F6
+ MOVE SPACES TO S-CfgS
+ MOVE Selection-Char TO S-Cfg-MF
+GC0310 WHEN CK-S-F7
+ MOVE SPACES TO S-CfgS
+ MOVE Selection-Char TO S-Cfg-MVS
+ WHEN OTHER
+ MOVE 'An unsupported key was pressed'
+ TO Output-Message
+ END-EVALUATE
+ ELSE
+ SET 88-No-Switch-Changes TO TRUE
+ END-IF
+ END-PERFORM
+ .
+
+ 209-Done.
+ EXIT.
+ /
+ 210-Run-Compiler SECTION.
+ *****************************************************************
+ ** Run the compiler using the switch settings we've prepared. **
+ *****************************************************************
+
+ 211-Init.
+ MOVE SPACES TO Cmd
+ Cobc-Cmd
+ Output-Message
+ DISPLAY
+ Switches-Screen
+ END-DISPLAY
+ MOVE 1 TO I
+ EVALUATE TRUE
+ WHEN S-Cfg-BS2000 NOT = SPACES
+ MOVE 'bs2000' TO Config-File
+ WHEN S-Cfg-COBOL85 NOT = SPACES
+ MOVE 'cobol85' TO Config-File
+ WHEN S-Cfg-COBOL2002 NOT = SPACES
+ MOVE 'cobol2002' TO Config-File
+ WHEN S-Cfg-IBM NOT = SPACES
+ MOVE 'ibm' TO Config-File
+ WHEN S-Cfg-MF NOT = SPACES
+ MOVE 'mf' TO Config-File
+ WHEN S-Cfg-MVS NOT = SPACES
+ MOVE 'mvs' TO Config-File
+ WHEN OTHER
+ MOVE 'default' TO Config-File
+ END-EVALUATE
+ .
+
+ 212-Build-Compile-Command.
+GC0909 MOVE SPACES TO Cobc-Cmd
+GC0909 STRING 'cobc -std='
+GC0909 TRIM(Config-File,TRAILING)
+GC0909 ' '
+GC0909 INTO Cobc-Cmd
+GC0909 WITH POINTER I
+GC0909 END-STRING
+ IF S-SUBROUTINE NOT = ' '
+ STRING '-m '
+ DELIMITED SIZE INTO Cobc-Cmd
+ WITH POINTER I
+ END-STRING
+ ELSE
+ STRING '-x '
+ DELIMITED SIZE INTO Cobc-Cmd
+ WITH POINTER I
+ END-STRING
+ END-IF
+ IF S-DEBUG NOT = ' '
+ STRING '-fdebugging-line '
+ DELIMITED SIZE INTO Cobc-Cmd
+ WITH POINTER I
+ END-STRING
+ END-IF
+ IF S-NOTRUNC NOT = ' '
+ STRING '-fnotrunc '
+ DELIMITED SIZE INTO Cobc-Cmd
+ WITH POINTER I
+ END-STRING
+ END-IF
+ IF S-TRACEALL NOT = ' '
+GC0809 STRING '-ftraceall '
+ DELIMITED SIZE INTO Cobc-Cmd
+ WITH POINTER I
+ END-STRING
+ END-IF
+ IF S-TRACE NOT = ' '
+ STRING '-ftrace '
+ DELIMITED SIZE INTO Cobc-Cmd
+ WITH POINTER I
+ END-STRING
+ END-IF
+
+GC0709 IF S-EXTRA > SPACES
+GC0709 STRING ' '
+GC0709 TRIM(S-Extra,TRAILING)
+GC0709 ' '
+GC0709 DELIMITED SIZE INTO Cobc-Cmd
+GC0709 WITH POINTER I
+GC0709 END-STRING
+GC0709 END-IF
+GC0909 STRING TRIM(Prog-File-Name,TRAILING)
+GC0909 DELIMITED SIZE INTO Cobc-Cmd
+GC0909 WITH POINTER I
+GC0909 END-STRING
+ .
+
+ 213-Run-Compiler.
+GC0410 MOVE ' Compiling...' TO Output-Message
+GC0410 DISPLAY
+GC0410 Switches-Screen
+GC0410 END-DISPLAY
+GC0609 SET 88-Output-File-Avail TO TRUE
+ MOVE SPACES TO Cmd
+ STRING TRIM(Cobc-Cmd,TRAILING)
+ ' 2>'
+ TRIM(Cobc-Output-File,TRAILING)
+ DELIMITED SIZE
+ INTO Cmd
+ END-STRING
+ CALL 'SYSTEM'
+ USING TRIM(Cmd,TRAILING)
+ END-CALL
+GC0909 IF RETURN-CODE = 0
+GC0909 SET 88-Compile-OK TO TRUE
+GC0909 ELSE
+GC0909 SET 88-Compile-Failed TO TRUE
+GC0909 END-IF
+GC0909 IF 88-Compile-OK
+GC0909 OPEN INPUT Cobc-Output
+GC0909 READ Cobc-Output
+GC0909 AT END
+GC0909 CONTINUE
+GC0909 NOT AT END
+GC0909 SET 88-Compile-OK-Warn TO TRUE
+GC0909 END-READ
+GC0909 CLOSE Cobc-Output
+GC0909 END-IF
+GC0909 MOVE SPACES TO Output-Message
+ IF 88-Compile-OK
+GC0909 MOVE ' Compilation Was Successful' TO Output-Message
+GC0909 DISPLAY
+GC0909 Switches-Screen
+GC0909 END-DISPLAY
+GC0909 CALL 'C$SLEEP'
+GC0909 USING 2
+GC0909 END-CALL
+GC0909 MOVE SPACES TO Output-Message
+GC0609 SET 88-Complete TO TRUE
+ ELSE
+GC0909 DISPLAY
+GC0909 Blank-Screen
+GC0909 END-DISPLAY
+GC0909 IF 88-Compile-OK-Warn
+GC0909 DISPLAY ' Compilation was successful, but ' &
+GC0909 'warnings were generated:'
+SCROLL* AT LINE 24 COLUMN 1
+SCROLL* WITH SCROLL UP 1 LINE
+GC0909 END-DISPLAY
+GC0909 ELSE
+GC0909 DISPLAY 'Compilation Failed:'
+SCROLL* AT LINE 24 COLUMN 1
+SCROLL* WITH SCROLL UP 1 LINE
+GC0909 END-DISPLAY
+GC0909 END-IF
+GC0609 SET 88-Compile-Failed TO TRUE
+GC0609 SET 88-Complete TO TRUE
+GC0909 DISPLAY ' '
+SCROLL* AT LINE 24 COLUMN 1
+SCROLL* WITH SCROLL UP 1 LINE
+GC0909 END-DISPLAY
+GC0909 OPEN INPUT Cobc-Output
+GC0909 PERFORM FOREVER
+GC0909 READ Cobc-Output AT END
+GC0909 EXIT PERFORM
+GC0909 END-READ
+GC0909 DISPLAY TRIM(Cobc-Output-Rec,TRAILING)
+SCROLL* AT LINE 24 COLUMN 1
+SCROLL* WITH SCROLL UP 1 LINE
+GC0909 END-DISPLAY
+GC0909 END-PERFORM
+GC0909 CLOSE Cobc-Output
+GC0909 DISPLAY ' '
+SCROLL* AT LINE 24 COLUMN 1
+SCROLL* WITH SCROLL UP 2 LINES
+GC0909 END-DISPLAY
+GC0909 DISPLAY 'Press ENTER to close:'
+SCROLL* AT LINE 24 COLUMN 1
+SCROLL* WITH SCROLL UP 1 LINE
+GC0909 END-DISPLAY
+GC0909 ACCEPT Dummy
+GC0909 FROM CONSOLE
+GC0909 END-ACCEPT
+GC0909 DISPLAY
+GC0909 Blank-Screen
+GC0909 END-DISPLAY
+ END-IF
+ .
+
+ 219-Done.
+ IF 88-Compile-Failed
+ PERFORM 900-Terminate
+ END-IF
+ .
+ /
+GC0410 220-Make-Listing SECTION.
+GC0410*****************************************************************
+GC0410** Generate a source and/or xref listing using XREF **
+GC0410*****************************************************************
+GC0410
+GC0410 221-Init.
+GC0410 MOVE ' Generating cross-reference listing...'
+GC0410 TO Output-Message
+GC0410 DISPLAY
+GC0410 Switches-Screen
+GC0410 END-DISPLAY
+GC0410 CALL "CBL_DELETE_FILE"
+GC0410 USING CONCATENATE(TRIM(Prog-Name,Trailing),".lst")
+GC0410 END-CALL
+GC0410 MOVE 0 TO RETURN-CODE
+GC0410 .
+GC0410
+GC0410 213-Run-OCXref.
+GC0410 MOVE SPACES TO Output-Message
+GC0410 CALL 'LISTING'
+GC0410 USING S-SOURCE
+GC0410 S-XREF
+GC0410 File-Name
+GC0410 ON EXCEPTION
+GC0410 MOVE ' LISTING module is not available'
+GC0410 TO Output-Message
+GC0410 MOVE 1 TO RETURN-CODE
+GC0410 END-CALL
+GC0410 IF RETURN-CODE = 0
+GC0410 MOVE ' Listing generated'
+GC0410 TO Output-Message
+GC0410 IF OS-Windows OR OS-Cygwin
+GC0410 MOVE SPACES TO Cmd
+GC0410 STRING
+GC0410 'cmd /c '
+GC0410 TRIM(Prog-Name,TRAILING)
+GC0410 '.lst'
+GC0410 DELIMITED SIZE INTO Cmd
+GC0410 END-STRING
+GC0410 CALL 'SYSTEM'
+GC0410 USING TRIM(Cmd,TRAILING)
+GC0410 END-CALL
+GC0410 END-IF
+GC0410 ELSE
+GC0410 IF Output-Message = SPACES
+GC0410 MOVE ' Listing generation failed'
+GC0410 TO Output-Message
+GC0410 END-IF
+GC0410 END-IF
+GC0410 DISPLAY
+GC0410 Switches-Screen
+GC0410 END-DISPLAY
+GC0410 CALL 'C$SLEEP'
+GC0410 USING 2
+GC0410 END-CALL
+GC0410 .
+ /
+ 230-Run-Program SECTION.
+ *****************************************************************
+ ** Run the compiled program **
+ *****************************************************************
+
+ 232-Build-Command.
+GC0909 MOVE SPACES TO Cmd
+GC0909 MOVE 1 TO I
+ IF S-SUBROUTINE NOT = ' '
+ OR S-DLL NOT = ' '
+ STRING 'cobcrun ' DELIMITED SIZE
+ INTO Cmd
+ WITH POINTER I
+ END-STRING
+ END-IF
+ IF Prog-Folder NOT = SPACES
+GC0909 IF OS-Cygwin AND Prog-Folder (2:1) = ':'
+GC0909 STRING '/cygdrive/'
+GC0909 INTO Cmd
+GC0909 WITH POINTER I
+GC0909 END-STRING
+GC0909 STRING LOWER-CASE(Prog-Folder (1:1))
+GC0909 INTO Cmd
+GC0909 WITH POINTER I
+GC0909 END-STRING
+GC0909 PERFORM VARYING J FROM 3 BY 1
+GC0909 UNTIL J > LENGTH(TRIM(Prog-Folder))
+GC0909 IF Prog-Folder (J:1) = '\'
+GC0909 STRING '/'
+GC0909 INTO Cmd
+GC0909 WITH POINTER I
+GC0909 END-STRING
+GC0909 ELSE
+GC0909 STRING Prog-Folder (J:1)
+GC0909 INTO Cmd
+GC0909 WITH POINTER I
+GC0909 END-STRING
+GC0909 END-IF
+GC0909 END-PERFORM
+GC0909 ELSE
+GC0410 STRING '"' TRIM(Prog-Folder,TRAILING)
+GC0909 INTO Cmd
+GC0909 WITH POINTER I
+GC0909 END-STRING
+GC0909 END-IF
+GC0909 STRING Dir-Char
+GC0909 INTO Cmd
+GC0909 WITH POINTER I
+GC0909 END-STRING
+GC0909 ELSE
+GC0909 IF OS-Cygwin OR OS-UNIX
+GC0909 STRING './'
+GC0909 INTO Cmd
+GC0909 WITH POINTER I
+GC0909 END-STRING
+GC0909 END-IF
+ END-IF
+GC0909 STRING TRIM(Prog-Name,TRAILING)
+GC0909 INTO Cmd
+GC0909 WITH POINTER I
+GC0909 END-STRING
+GC0909 IF S-SUBROUTINE = ' '
+GC0909 AND S-DLL NOT = ' '
+GC0909 STRING '.exe' DELIMITED SIZE
+ INTO Cmd
+ WITH POINTER I
+ END-STRING
+ END-IF
+ IF S-ARGS NOT = SPACES
+GC0809 STRING ' ' TRIM(S-ARGS,TRAILING)
+ INTO Cmd
+ WITH POINTER I
+ END-STRING
+ END-IF
+ IF OS-Unknown OR OS-Windows
+GC0410 STRING '"&&pause'
+ INTO Cmd
+ WITH POINTER I
+ END-STRING
+ ELSE
+ STRING ';echo "Press ENTER to close...";read'
+ INTO Cmd
+ WITH POINTER I
+ END-STRING
+ END-IF
+ .
+
+ 233-Run-Program.
+GC0909 DISPLAY
+GC0909 Blank-Screen
+GC0909 END-DISPLAY
+
+ CALL 'SYSTEM'
+ USING TRIM(Cmd,TRAILING)
+ END-CALL
+ PERFORM 900-Terminate
+ .
+
+ 239-Done.
+ EXIT.
+ /
+ 900-Terminate SECTION.
+ *****************************************************************
+ ** Display a message and halt the program **
+ *****************************************************************
+
+ 901-Display-Message.
+GC0909 IF Output-Message > SPACES
+GC0909 DISPLAY
+GC0909 Switches-Screen
+GC0909 END-DISPLAY
+GC0909 CALL 'C$SLEEP'
+GC0909 USING 2
+GC0909 END-CALL
+GC0909 END-IF
+ DISPLAY
+ Blank-Screen
+ END-DISPLAY
+ .
+
+ 909-Done.
+ GOBACK
+ .
+
+ END PROGRAM OCic.
+
+ IDENTIFICATION DIVISION.
+ PROGRAM-ID. GETOSTYPE.
+ *****************************************************************
+ ** This subprogram determine the OS type the program is run- **
+ ** ning under, passing that result back in RETURN-CODE as fol- **
+ ** lows: **
+ ** **
+ ** 0: Cannot be determined **
+ ** 1: Native Windows or Windows/MinGW **
+ ** 2: Cygwin **
+ ** 3: UNIX/Linux/MacOS **
+ *****************************************************************
+ ** DATE CHANGE DESCRIPTION **
+ ** ====== ==================================================== **
+ ** GC0909 Initial coding. **
+ *****************************************************************
+ ENVIRONMENT DIVISION.
+ CONFIGURATION SECTION.
+ REPOSITORY.
+ FUNCTION ALL INTRINSIC.
+ DATA DIVISION.
+ WORKING-STORAGE SECTION.
+ 01 Env-Path PIC X(1024).
+ 01 Tally USAGE BINARY-LONG.
+ PROCEDURE DIVISION.
+ 000-Main SECTION.
+ 010-Get-TEMP-Var.
+ MOVE SPACES TO Env-Path
+ ACCEPT Env-Path
+ FROM ENVIRONMENT "PATH"
+ ON EXCEPTION
+ MOVE 0 TO RETURN-CODE
+ GOBACK
+ END-ACCEPT
+ IF Env-Path = SPACES
+ MOVE 0 TO RETURN-CODE
+ ELSE
+ MOVE 0 TO Tally
+ INSPECT Env-Path
+ TALLYING Tally FOR ALL ";"
+ IF Tally = 0 *> Must be some form of UNIX
+ MOVE 0 TO Tally
+ INSPECT Env-Path
+ TALLYING TALLY FOR ALL "/cygdrive/"
+ IF Tally = 0 *> UNIX/MacOS
+ MOVE 3 TO RETURN-CODE
+ ELSE *> Cygwin
+ MOVE 2 TO RETURN-CODE
+ END-IF
+ ELSE *> Assume Windows[/MinGW]
+ MOVE 1 TO RETURN-CODE
+ END-IF
+ END-IF
+ GOBACK
+ .
+ END PROGRAM GETOSTYPE.
+
+ IDENTIFICATION DIVISION.
+ PROGRAM-ID. CHECKSOURCE.
+ *****************************************************************
+ ** This subprogram will scan a line of source code it is given **
+ ** looking for "LINKAGE SECTION" or "IDENTIFICATION DIVISION". **
+ ** **
+ ** ****NOTE**** ****NOTE**** ****NOTE**** ****NOTE*** **
+ ** **
+ ** These two strings must be found IN THEIR ENTIRETY within **
+ ** the 1st 80 columns of program source records, and cannot **
+ ** follow either a "*>" sequence OR a "*" in col 7. **
+ *****************************************************************
+ ** DATE CHANGE DESCRIPTION **
+ ** ====== ==================================================== **
+ ** GC0809 Initial coding. **
+ *****************************************************************
+ ENVIRONMENT DIVISION.
+ CONFIGURATION SECTION.
+ REPOSITORY.
+ FUNCTION ALL INTRINSIC.
+ DATA DIVISION.
+ WORKING-STORAGE SECTION.
+ 01 Compressed-Src.
+ 05 CS-Char OCCURS 80 TIMES PIC X(1).
+
+ 01 Flags.
+ 05 F-Found-SPACE PIC X(1).
+ 88 88-Skipping-SPACE VALUE 'Y'.
+ 88 88-Not-Skipping-SPACE VALUE 'N'.
+
+ 01 I USAGE BINARY-CHAR.
+
+ 01 J USAGE BINARY-CHAR.
+ LINKAGE SECTION.
+ 01 Argument-1.
+ 02 A1-Char OCCURS 80 TIMES PIC X(1).
+
+ 01 Argument-2 PIC X(1).
+ 88 88-A2-LINKAGE-SECTION VALUE 'L'.
+ 88 88-A2-IDENTIFICATION-DIVISION VALUE 'I'.
+ 88 88-A2-Nothing-Special VALUE ' '.
+ PROCEDURE DIVISION USING Argument-1, Argument-2.
+ 000-Main SECTION.
+
+ 010-Initialize.
+ SET 88-A2-Nothing-Special TO TRUE
+ IF A1-Char (7) = '*'
+ GOBACK
+ END-IF
+ .
+
+ 020-Compress-Multiple-SPACES.
+ SET 88-Not-Skipping-SPACE TO TRUE
+ MOVE 0 TO J
+ MOVE SPACES TO Compressed-Src
+ PERFORM VARYING I FROM 1 BY 1
+ UNTIL I > 80
+ IF A1-Char (I) = SPACE
+ IF 88-Not-Skipping-SPACE
+ ADD 1 TO J
+ MOVE UPPER-CASE(A1-Char (I)) TO CS-Char (J)
+ SET 88-Skipping-SPACE TO TRUE
+ END-IF
+ ELSE
+ SET 88-Not-Skipping-SPACE TO TRUE
+ ADD 1 TO J
+ MOVE A1-Char (I) TO CS-Char (J)
+ END-IF
+ END-PERFORM
+ .
+
+ 030-Scan-Compressed-Src.
+ PERFORM VARYING I FROM 1 BY 1
+ UNTIL I > 66
+ EVALUATE TRUE
+ WHEN CS-Char (I) = '*'
+ IF Compressed-Src (I : 2) = '*>'
+ GOBACK
+ END-IF
+ WHEN (CS-Char (I) = 'L') AND (I < 66)
+ IF Compressed-Src (I : 15) = 'LINKAGE SECTION'
+ SET 88-A2-LINKAGE-SECTION TO TRUE
+ GOBACK
+ END-IF
+ WHEN (CS-Char (I) = 'I') AND (I < 58)
+ IF Compressed-Src (I : 23) = 'IDENTIFICATION ' &
+ 'DIVISION'
+ SET 88-A2-IDENTIFICATION-DIVISION TO TRUE
+ GOBACK
+ END-IF
+ END-EVALUATE
+ END-PERFORM
+ .
+
+ 099-Never-Found-Either-One.
+ GOBACK
+ .
+ END PROGRAM CHECKSOURCE.
+
+ IDENTIFICATION DIVISION.
+ PROGRAM-ID. LISTING.
+ *****************************************************************
+ ** This subprogram generates a cross-reference listing of an **
+ ** OpenCOBOL program. **
+ ** **
+ ** Linkage: CALL "LISTING" USING <source> **
+ ** <xref> **
+ ** <filename> **
+ ** **
+ ** Where: **
+ ** <source> is a PIC X(1) flag indicating **
+ ** whether or not a source listing **
+ ** should be produced (space=NO, **
+ ** non-space=yes) **
+ ** <xref> is a PIC X(1) flag indicating **
+ ** whether or not an xref listing **
+ ** should be produced (space=NO, **
+ ** non-space=yes) **
+ ** <filename> is the [path]filename of the **
+ ** program being listed and/or **
+ ** xreffed in a PIC X(256) form. **
+ *****************************************************************
+ ** **
+ ** AUTHOR: GARY L. CUTLER **
+ ** CutlerGL@gmail.com **
+ ** Copyright (C) 2010, Gary L. Cutler, GPL **
+ ** **
+ ** DATE-WRITTEN: April 1, 2010 **
+ ** **
+ *****************************************************************
+ ** DATE CHANGE DESCRIPTION **
+ ** ====== ==================================================== **
+ ** GC0410 Initial coding **
+ ** GC0710 Handle duplicate data names (i.e. "CORRESPONDING" or **
+ ** qualified items) better; ignore "END PROGRAM" recs **
+ ** so program name doesn't appear in listing. **
+ *****************************************************************
+ ENVIRONMENT DIVISION.
+ CONFIGURATION SECTION.
+ REPOSITORY.
+ FUNCTION ALL INTRINSIC.
+ INPUT-OUTPUT SECTION.
+ FILE-CONTROL.
+ SELECT Expand-Code ASSIGN TO Expanded-Src-Filename
+ ORGANIZATION IS LINE SEQUENTIAL.
+ SELECT Report-File ASSIGN TO Report-Filename
+ ORGANIZATION IS LINE SEQUENTIAL.
+ SELECT Sort-File ASSIGN TO DISK.
+ SELECT Source-Code ASSIGN TO Src-Filename
+ ORGANIZATION IS LINE SEQUENTIAL.
+ DATA DIVISION.
+ FILE SECTION.
+ FD Expand-Code.
+ 01 Expand-Code-Rec.
+ 05 ECR-1 PIC X.
+ 05 ECR-2-256 PIC X(256).
+ 01 Expand-Code-Rec-Alt.
+ 05 ECR-1-128 PIC X(128).
+ 05 ECR-129-256 PIC X(128).
+
+ FD Report-File.
+ 01 Report-Rec PIC X(135).
+
+ SD Sort-File.
+ 01 Sort-Rec.
+ 05 SR-Prog-ID PIC X(15).
+ 05 SR-Token-UC PIC X(32).
+ 05 SR-Token PIC X(32).
+ 05 SR-Section PIC X(15).
+ 05 SR-Line-No-Def PIC 9(6).
+ 05 SR-Reference.
+ 10 SR-Line-No-Ref PIC 9(6).
+ 10 SR-Ref-Flag PIC X(1).
+
+ FD Source-Code.
+ 01 Source-Code-Rec.
+GC0410 05 SCR-1-128.
+GC0410 10 FILLER PIC X(6).
+GC0410 10 SCR-7 PIC X(1).
+GC0410 10 FILLER PIC X(121).
+ 05 SCR-129-256 PIC X(128).
+
+ WORKING-STORAGE SECTION.
+ 78 Line-Nos-Per-Rec VALUE 8.
+
+ 01 Cmd PIC X(256).
+
+ 01 Delim PIC X(2).
+
+ 01 Detail-Line-S.
+ 05 DLS-Line-No PIC ZZZZZ9.
+ 05 FILLER PIC X(1).
+ 05 DLS-Statement PIC X(128).
+
+ 01 Detail-Line-X.
+ 05 DLX-Prog-ID PIC X(15).
+ 05 FILLER PIC X(1).
+ 05 DLX-Token PIC X(32).
+ 05 FILLER PIC X(1).
+ 05 DLX-Line-No-Def PIC ZZZZZ9.
+ 05 FILLER PIC X(1).
+ 05 DLX-Section PIC X(15).
+ 05 FILLER PIC X(1).
+ 05 DLX-Reference OCCURS Line-Nos-Per-Rec TIMES.
+ 10 DLX-Line-No-Ref PIC ZZZZZ9.
+ 10 DLX-Ref-Flag PIC X(1).
+ 10 FILLER PIC X(1).
+
+ 01 Dummy PIC X(1).
+
+ 01 Env-TEMP PIC X(256).
+
+ 01 Expanded-Src-Filename PIC X(256).
+
+ 01 Filename PIC X(256).
+
+ 01 Flags.
+GC0710 05 F-Duplicate PIC X(1).
+ 05 F-First-Record PIC X(1).
+ 05 F-In-Which-Pgm PIC X(1).
+ 88 In-Main-Module VALUE 'M'.
+ 88 In-Copybook VALUE 'C'.
+ 05 F-Last-Token-Ended-Sent PIC X(1).
+ 05 F-Processing-PICTURE PIC X(1).
+ 05 F-Token-Ended-Sentence PIC X(1).
+GC0710 05 F-Verb-Has-Been-Found PIC X(1).
+
+ 01 Group-Indicators.
+ 05 GI-Prog-ID PIC X(15).
+ 05 GI-Token PIC X(32).
+
+ 01 Heading-1S.
+ 05 FILLER PIC X(125) VALUE
+ "OpenCOBOL 1.1 06FEB2009 Source Listing - " &
+ "OCic Copyright (C) 2009-2010, Gary L. Cutler, GPL".
+ 05 H1S-Date PIC 9999/99/99.
+
+ 01 Heading-1X.
+ 05 FILLER PIC X(125) VALUE
+ "OpenCOBOL 1.1 06FEB2009 Cross-Reference Listing - " &
+ "OCic Copyright (C) 2009-2010, Gary L. Cutler, GPL".
+ 05 H1X-Date PIC 9999/99/99.
+
+ 01 Heading-2 PIC X(135).
+
+ 01 Heading-4S PIC X(16) VALUE
+ "Line Statement".
+
+ 01 Heading-4X PIC X(96) VALUE
+ "PROGRAM-ID Identifier/Register/Function Defn Wher
+ - "e Defined References (* = Updated)".
+
+ 01 Heading-5S PIC X(135) VALUE
+ "====== =====================================================
+ - "============================================================
+ - "===============".
+
+ 01 Heading-5X PIC X(135) VALUE
+ "=============== ================================ ====== ====
+ - "=========== ================================================
+ - "===============".
+
+ 01 Held-Reference PIC X(100).
+
+ 01 I USAGE BINARY-LONG.
+
+ 01 J USAGE BINARY-LONG.
+
+ 01 Lines-Left USAGE BINARY-LONG.
+
+ 01 Lines-Per-Page USAGE BINARY-LONG.
+
+ 01 Lines-Per-Page-ENV PIC X(256).
+
+ 01 Num-UserNames USAGE BINARY-LONG.
+
+ 01 PIC-X10 PIC X(10).
+
+ 01 PIC-X32 PIC X(32).
+
+ 01 PIC-X256 PIC X(256).
+
+ 01 Program-Path PIC X(256).
+
+ 01 Report-Filename PIC X(256).
+
+ 01 Reserved-Words.
+ 05 FILLER PIC X(33) VALUE "IABS".
+ 05 FILLER PIC X(33) VALUE "VACCEPT".
+ 05 FILLER PIC X(33) VALUE " ACCESS".
+ 05 FILLER PIC X(33) VALUE "IACOS".
+ 05 FILLER PIC X(33) VALUE " ACTIVE-CLASS".
+ 05 FILLER PIC X(33) VALUE "VADD".
+ 05 FILLER PIC X(33) VALUE " ADDRESS".
+ 05 FILLER PIC X(33) VALUE " ADVANCING".
+ 05 FILLER PIC X(33) VALUE "KAFTER".
+ 05 FILLER PIC X(33) VALUE " ALIGNED".
+ 05 FILLER PIC X(33) VALUE " ALL".
+ 05 FILLER PIC X(33) VALUE "VALLOCATE".
+ 05 FILLER PIC X(33) VALUE " ALPHABET".
+ 05 FILLER PIC X(33) VALUE " ALPHABETIC".
+ 05 FILLER PIC X(33) VALUE " ALPHABETIC-LOWER".
+ 05 FILLER PIC X(33) VALUE " ALPHABETIC-UPPER".
+ 05 FILLER PIC X(33) VALUE " ALPHANUMERIC".
+ 05 FILLER PIC X(33) VALUE " ALPHANUMERIC-EDITED".
+ 05 FILLER PIC X(33) VALUE " ALSO".
+ 05 FILLER PIC X(33) VALUE "VALTER".
+ 05 FILLER PIC X(33) VALUE " ALTERNATE".
+ 05 FILLER PIC X(33) VALUE " AND".
+ 05 FILLER PIC X(33) VALUE "IANNUITY".
+ 05 FILLER PIC X(33) VALUE " ANY".
+ 05 FILLER PIC X(33) VALUE " ANYCASE".
+ 05 FILLER PIC X(33) VALUE " ARE".
+ 05 FILLER PIC X(33) VALUE " AREA".
+ 05 FILLER PIC X(33) VALUE " AREAS".
+ 05 FILLER PIC X(33) VALUE " ARGUMENT-NUMBER".
+ 05 FILLER PIC X(33) VALUE " ARGUMENT-VALUE".
+ 05 FILLER PIC X(33) VALUE " AS".
+ 05 FILLER PIC X(33) VALUE " ASCENDING".
+ 05 FILLER PIC X(33) VALUE "IASIN".
+ 05 FILLER PIC X(33) VALUE " ASSIGN".
+ 05 FILLER PIC X(33) VALUE " AT".
+ 05 FILLER PIC X(33) VALUE "IATAN".
+ 05 FILLER PIC X(33) VALUE " AUTHOR".
+ 05 FILLER PIC X(33) VALUE " AUTO".
+ 05 FILLER PIC X(33) VALUE " AUTO-SKIP".
+ 05 FILLER PIC X(33) VALUE " AUTOMATIC".
+ 05 FILLER PIC X(33) VALUE " AUTOTERMINATE".
+ 05 FILLER PIC X(33) VALUE " BACKGROUND-COLOR".
+ 05 FILLER PIC X(33) VALUE " BASED".
+ 05 FILLER PIC X(33) VALUE " BEEP".
+ 05 FILLER PIC X(33) VALUE " BEFORE".
+ 05 FILLER PIC X(33) VALUE " BELL".
+ 05 FILLER PIC X(33) VALUE " BINARY".
+ 05 FILLER PIC X(33) VALUE " BINARY-C-LONG".
+ 05 FILLER PIC X(33) VALUE " BINARY-CHAR".
+ 05 FILLER PIC X(33) VALUE " BINARY-DOUBLE".
+ 05 FILLER PIC X(33) VALUE " BINARY-LONG".
+ 05 FILLER PIC X(33) VALUE " BINARY-SHORT".
+ 05 FILLER PIC X(33) VALUE " BIT".
+ 05 FILLER PIC X(33) VALUE " BLANK".
+ 05 FILLER PIC X(33) VALUE " BLINK".
+ 05 FILLER PIC X(33) VALUE " BLOCK".
+ 05 FILLER PIC X(33) VALUE " BOOLEAN".
+ 05 FILLER PIC X(33) VALUE " BOTTOM".
+ 05 FILLER PIC X(33) VALUE "YBY".
+ 05 FILLER PIC X(33) VALUE "IBYTE-LENGTH".
+ 05 FILLER PIC X(33) VALUE "MC01".
+ 05 FILLER PIC X(33) VALUE "MC02".
+ 05 FILLER PIC X(33) VALUE "MC03".
+ 05 FILLER PIC X(33) VALUE "MC04".
+ 05 FILLER PIC X(33) VALUE "MC05".
+ 05 FILLER PIC X(33) VALUE "MC06".
+ 05 FILLER PIC X(33) VALUE "MC07".
+ 05 FILLER PIC X(33) VALUE "MC08".
+ 05 FILLER PIC X(33) VALUE "MC09".
+ 05 FILLER PIC X(33) VALUE "MC10".
+ 05 FILLER PIC X(33) VALUE "MC11".
+ 05 FILLER PIC X(33) VALUE "MC12".
+ 05 FILLER PIC X(33) VALUE "VCALL".
+ 05 FILLER PIC X(33) VALUE "VCANCEL".
+ 05 FILLER PIC X(33) VALUE " CF".
+ 05 FILLER PIC X(33) VALUE " CH".
+ 05 FILLER PIC X(33) VALUE " CHAINING".
+ 05 FILLER PIC X(33) VALUE "ICHAR".
+ 05 FILLER PIC X(33) VALUE " CHARACTER".
+ 05 FILLER PIC X(33) VALUE " CHARACTERS".
+ 05 FILLER PIC X(33) VALUE " CLASS".
+ 05 FILLER PIC X(33) VALUE " CLASS-ID".
+ 05 FILLER PIC X(33) VALUE "VCLOSE".
+ 05 FILLER PIC X(33) VALUE "ICOB-CRT-STATUS".
+ 05 FILLER PIC X(33) VALUE " CODE".
+ 05 FILLER PIC X(33) VALUE " CODE-SET".
+ 05 FILLER PIC X(33) VALUE " COL".
+ 05 FILLER PIC X(33) VALUE " COLLATING".
+ 05 FILLER PIC X(33) VALUE " COLS".
+ 05 FILLER PIC X(33) VALUE " COLUMN".
+ 05 FILLER PIC X(33) VALUE " COLUMNS".
+ 05 FILLER PIC X(33) VALUE "ICOMBINED-DATETIME".
+ 05 FILLER PIC X(33) VALUE " COMMA".
+ 05 FILLER PIC X(33) VALUE " COMMAND-LINE".
+ 05 FILLER PIC X(33) VALUE "VCOMMIT".
+ 05 FILLER PIC X(33) VALUE " COMMON".
+ 05 FILLER PIC X(33) VALUE " COMP".
+ 05 FILLER PIC X(33) VALUE " COMP-1".
+ 05 FILLER PIC X(33) VALUE " COMP-2".
+ 05 FILLER PIC X(33) VALUE " COMP-3".
+ 05 FILLER PIC X(33) VALUE " COMP-4".
+ 05 FILLER PIC X(33) VALUE " COMP-5".
+ 05 FILLER PIC X(33) VALUE " COMP-X".
+ 05 FILLER PIC X(33) VALUE " COMPUTATIONAL".
+ 05 FILLER PIC X(33) VALUE " COMPUTATIONAL-1".
+ 05 FILLER PIC X(33) VALUE " COMPUTATIONAL-2".
+ 05 FILLER PIC X(33) VALUE " COMPUTATIONAL-3".
+ 05 FILLER PIC X(33) VALUE " COMPUTATIONAL-4".
+ 05 FILLER PIC X(33) VALUE " COMPUTATIONAL-5".
+ 05 FILLER PIC X(33) VALUE " COMPUTATIONAL-X".
+ 05 FILLER PIC X(33) VALUE "VCOMPUTE".
+ 05 FILLER PIC X(33) VALUE "ICONCATENATE".
+ 05 FILLER PIC X(33) VALUE " CONDITION".
+ 05 FILLER PIC X(33) VALUE "KCONFIGURATION".
+ 05 FILLER PIC X(33) VALUE "MCONSOLE".
+ 05 FILLER PIC X(33) VALUE " CONSTANT".
+ 05 FILLER PIC X(33) VALUE " CONTAINS".
+ 05 FILLER PIC X(33) VALUE " CONTENT".
+ 05 FILLER PIC X(33) VALUE "VCONTINUE".
+ 05 FILLER PIC X(33) VALUE " CONTROL".
+ 05 FILLER PIC X(33) VALUE " CONTROLS".
+ 05 FILLER PIC X(33) VALUE "KCONVERTING".
+ 05 FILLER PIC X(33) VALUE " COPY".
+ 05 FILLER PIC X(33) VALUE " CORR".
+ 05 FILLER PIC X(33) VALUE " CORRESPONDING".
+ 05 FILLER PIC X(33) VALUE "ICOS".
+ 05 FILLER PIC X(33) VALUE "KCOUNT".
+ 05 FILLER PIC X(33) VALUE " CRT".
+ 05 FILLER PIC X(33) VALUE " CURRENCY".
+ 05 FILLER PIC X(33) VALUE "ICURRENT-DATE".
+ 05 FILLER PIC X(33) VALUE " CURSOR".
+ 05 FILLER PIC X(33) VALUE " CYCLE".
+ 05 FILLER PIC X(33) VALUE "KDATA".
+ 05 FILLER PIC X(33) VALUE " DATA-POINTER".
+ 05 FILLER PIC X(33) VALUE " DATE".
+ 05 FILLER PIC X(33) VALUE " DATE-COMPILED".
+ 05 FILLER PIC X(33) VALUE " DATE-MODIFIED".
+ 05 FILLER PIC X(33) VALUE "IDATE-OF-INTEGER".
+ 05 FILLER PIC X(33) VALUE "IDATE-TO-YYYYMMDD".
+ 05 FILLER PIC X(33) VALUE " DATE-WRITTEN".
+ 05 FILLER PIC X(33) VALUE " DAY".
+ 05 FILLER PIC X(33) VALUE "IDAY-OF-INTEGER".
+ 05 FILLER PIC X(33) VALUE " DAY-OF-WEEK".
+ 05 FILLER PIC X(33) VALUE "IDAY-TO-YYYYDDD".
+ 05 FILLER PIC X(33) VALUE " DE".
+ 05 FILLER PIC X(33) VALUE " DEBUGGING".
+ 05 FILLER PIC X(33) VALUE " DECIMAL-POINT".
+ 05 FILLER PIC X(33) VALUE " DECLARATIVES".
+ 05 FILLER PIC X(33) VALUE " DEFAULT".
+ 05 FILLER PIC X(33) VALUE "VDELETE".
+ 05 FILLER PIC X(33) VALUE " DELIMITED".
+ 05 FILLER PIC X(33) VALUE "KDELIMITER".
+ 05 FILLER PIC X(33) VALUE " DEPENDING".
+ 05 FILLER PIC X(33) VALUE " DESCENDING".
+ 05 FILLER PIC X(33) VALUE " DESTINATION".
+ 05 FILLER PIC X(33) VALUE " DETAIL".
+ 05 FILLER PIC X(33) VALUE " DISABLE".
+ 05 FILLER PIC X(33) VALUE " DISK".
+ 05 FILLER PIC X(33) VALUE "VDISPLAY".
+ 05 FILLER PIC X(33) VALUE "VDIVIDE".
+ 05 FILLER PIC X(33) VALUE "KDIVISION".
+ 05 FILLER PIC X(33) VALUE "KDOWN".
+ 05 FILLER PIC X(33) VALUE " DUPLICATES".
+ 05 FILLER PIC X(33) VALUE " DYNAMIC".
+ 05 FILLER PIC X(33) VALUE "IE".
+ 05 FILLER PIC X(33) VALUE " EBCDIC".
+ 05 FILLER PIC X(33) VALUE " EC".
+ 05 FILLER PIC X(33) VALUE "VELSE".
+GC0710 05 FILLER PIC X(33) VALUE "KEND".
+ 05 FILLER PIC X(33) VALUE " END-ACCEPT".
+ 05 FILLER PIC X(33) VALUE " END-ADD".
+ 05 FILLER PIC X(33) VALUE " END-CALL".
+ 05 FILLER PIC X(33) VALUE " END-COMPUTE".
+ 05 FILLER PIC X(33) VALUE " END-DELETE".
+ 05 FILLER PIC X(33) VALUE " END-DISPLAY".
+ 05 FILLER PIC X(33) VALUE " END-DIVIDE".
+ 05 FILLER PIC X(33) VALUE " END-EVALUATE".
+ 05 FILLER PIC X(33) VALUE " END-IF".
+ 05 FILLER PIC X(33) VALUE " END-MULTIPLY".
+ 05 FILLER PIC X(33) VALUE " END-OF-PAGE".
+ 05 FILLER PIC X(33) VALUE " END-PERFORM".
+ 05 FILLER PIC X(33) VALUE " END-READ".
+ 05 FILLER PIC X(33) VALUE " END-RETURN".
+ 05 FILLER PIC X(33) VALUE " END-REWRITE".
+ 05 FILLER PIC X(33) VALUE " END-SEARCH".
+ 05 FILLER PIC X(33) VALUE " END-START".
+ 05 FILLER PIC X(33) VALUE " END-STRING".
+ 05 FILLER PIC X(33) VALUE " END-SUBTRACT".
+ 05 FILLER PIC X(33) VALUE " END-UNSTRING".
+ 05 FILLER PIC X(33) VALUE " END-WRITE".
+ 05 FILLER PIC X(33) VALUE "VENTRY".
+ 05 FILLER PIC X(33) VALUE "KENVIRONMENT".
+ 05 FILLER PIC X(33) VALUE " ENVIRONMENT-NAME".
+ 05 FILLER PIC X(33) VALUE " ENVIRONMENT-VALUE".
+ 05 FILLER PIC X(33) VALUE " EO".
+ 05 FILLER PIC X(33) VALUE " EOL".
+ 05 FILLER PIC X(33) VALUE " EOP".
+ 05 FILLER PIC X(33) VALUE " EOS".
+ 05 FILLER PIC X(33) VALUE " EQUAL".
+ 05 FILLER PIC X(33) VALUE "KEQUALS".
+ 05 FILLER PIC X(33) VALUE " ERASE".
+ 05 FILLER PIC X(33) VALUE " ERROR".
+ 05 FILLER PIC X(33) VALUE " ESCAPE".
+ 05 FILLER PIC X(33) VALUE "VEVALUATE".
+ 05 FILLER PIC X(33) VALUE " EXCEPTION".
+ 05 FILLER PIC X(33) VALUE "IEXCEPTION-FILE".
+ 05 FILLER PIC X(33) VALUE "IEXCEPTION-LOCATION".
+ 05 FILLER PIC X(33) VALUE " EXCEPTION-OBJECT".
+ 05 FILLER PIC X(33) VALUE "IEXCEPTION-STATEMENT".
+ 05 FILLER PIC X(33) VALUE "IEXCEPTION-STATUS".
+ 05 FILLER PIC X(33) VALUE " EXCLUSIVE".
+ 05 FILLER PIC X(33) VALUE "VEXIT".
+ 05 FILLER PIC X(33) VALUE "IEXP".
+ 05 FILLER PIC X(33) VALUE "IEXP10".
+ 05 FILLER PIC X(33) VALUE " EXTEND".
+ 05 FILLER PIC X(33) VALUE " EXTERNAL".
+ 05 FILLER PIC X(33) VALUE "IFACTORIAL".
+ 05 FILLER PIC X(33) VALUE " FACTORY".
+ 05 FILLER PIC X(33) VALUE " FALSE".
+ 05 FILLER PIC X(33) VALUE "KFD".
+ 05 FILLER PIC X(33) VALUE "KFILE".
+ 05 FILLER PIC X(33) VALUE " FILE-CONTROL".
+ 05 FILLER PIC X(33) VALUE " FILE-ID".
+ 05 FILLER PIC X(33) VALUE " FILLER".
+ 05 FILLER PIC X(33) VALUE " FINAL".
+ 05 FILLER PIC X(33) VALUE " FIRST".
+ 05 FILLER PIC X(33) VALUE " FLOAT-BINARY-16".
+ 05 FILLER PIC X(33) VALUE " FLOAT-BINARY-34".
+ 05 FILLER PIC X(33) VALUE " FLOAT-BINARY-7".
+ 05 FILLER PIC X(33) VALUE " FLOAT-DECIMAL-16".
+ 05 FILLER PIC X(33) VALUE " FLOAT-DECIMAL-34".
+ 05 FILLER PIC X(33) VALUE " FLOAT-EXTENDED".
+ 05 FILLER PIC X(33) VALUE " FLOAT-LONG".
+ 05 FILLER PIC X(33) VALUE " FLOAT-SHORT".
+ 05 FILLER PIC X(33) VALUE " FOOTING".
+ 05 FILLER PIC X(33) VALUE " FOR".
+ 05 FILLER PIC X(33) VALUE " FOREGROUND-COLOR".
+ 05 FILLER PIC X(33) VALUE " FOREVER".
+ 05 FILLER PIC X(33) VALUE " FORMAT".
+ 05 FILLER PIC X(33) VALUE "MFORMFEED".
+ 05 FILLER PIC X(33) VALUE "IFRACTION-PART".
+ 05 FILLER PIC X(33) VALUE "VFREE".
+ 05 FILLER PIC X(33) VALUE " FROM".
+ 05 FILLER PIC X(33) VALUE " FULL".
+ 05 FILLER PIC X(33) VALUE " FUNCTION".
+ 05 FILLER PIC X(33) VALUE " FUNCTION-ID".
+ 05 FILLER PIC X(33) VALUE " FUNCTION-POINTER".
+ 05 FILLER PIC X(33) VALUE "VGENERATE".
+ 05 FILLER PIC X(33) VALUE " GET".
+ 05 FILLER PIC X(33) VALUE "KGIVING".
+ 05 FILLER PIC X(33) VALUE " GLOBAL".
+ 05 FILLER PIC X(33) VALUE "VGO".
+ 05 FILLER PIC X(33) VALUE "VGOBACK".
+ 05 FILLER PIC X(33) VALUE " GREATER".
+ 05 FILLER PIC X(33) VALUE " GROUP".
+ 05 FILLER PIC X(33) VALUE " GROUP-USAGE".
+ 05 FILLER PIC X(33) VALUE " HEADING".
+ 05 FILLER PIC X(33) VALUE " HIGH-VALUE".
+ 05 FILLER PIC X(33) VALUE " HIGH-VALUES".
+ 05 FILLER PIC X(33) VALUE " HIGHLIGHT".
+ 05 FILLER PIC X(33) VALUE " I-O".
+ 05 FILLER PIC X(33) VALUE " I-O-CONTROL".
+ 05 FILLER PIC X(33) VALUE "KID".
+ 05 FILLER PIC X(33) VALUE "KIDENTIFICATION".
+ 05 FILLER PIC X(33) VALUE "VIF".
+ 05 FILLER PIC X(33) VALUE " IGNORE".
+ 05 FILLER PIC X(33) VALUE " IGNORING".
+ 05 FILLER PIC X(33) VALUE " IN".
+ 05 FILLER PIC X(33) VALUE " INDEX".
+ 05 FILLER PIC X(33) VALUE "KINDEXED".
+ 05 FILLER PIC X(33) VALUE " INDICATE".
+ 05 FILLER PIC X(33) VALUE " INFINITY".
+ 05 FILLER PIC X(33) VALUE " INHERITS".
+ 05 FILLER PIC X(33) VALUE " INITIAL".
+ 05 FILLER PIC X(33) VALUE " INITIALISED".
+ 05 FILLER PIC X(33) VALUE "VINITIALIZE".
+ 05 FILLER PIC X(33) VALUE " INITIALIZED".
+ 05 FILLER PIC X(33) VALUE "VINITIATE".
+ 05 FILLER PIC X(33) VALUE " INPUT".
+ 05 FILLER PIC X(33) VALUE "KINPUT-OUTPUT".
+ 05 FILLER PIC X(33) VALUE "VINSPECT".
+ 05 FILLER PIC X(33) VALUE " INSTALLATION".
+ 05 FILLER PIC X(33) VALUE "IINTEGER".
+ 05 FILLER PIC X(33) VALUE "IINTEGER-OF-DATE".
+ 05 FILLER PIC X(33) VALUE "IINTEGER-OF-DAY".
+ 05 FILLER PIC X(33) VALUE "IINTEGER-PART".
+ 05 FILLER PIC X(33) VALUE " INTERFACE".
+ 05 FILLER PIC X(33) VALUE " INTERFACE-ID".
+ 05 FILLER PIC X(33) VALUE "KINTO".
+ 05 FILLER PIC X(33) VALUE " INTRINSIC".
+ 05 FILLER PIC X(33) VALUE " INVALID".
+ 05 FILLER PIC X(33) VALUE " INVOKE".
+ 05 FILLER PIC X(33) VALUE " IS".
+ 05 FILLER PIC X(33) VALUE " JUST".
+ 05 FILLER PIC X(33) VALUE " JUSTIFIED".
+ 05 FILLER PIC X(33) VALUE " KEY".
+ 05 FILLER PIC X(33) VALUE " LABEL".
+ 05 FILLER PIC X(33) VALUE " LAST".
+ 05 FILLER PIC X(33) VALUE " LEADING".
+ 05 FILLER PIC X(33) VALUE " LEFT".
+ 05 FILLER PIC X(33) VALUE " LEFT-JUSTIFY".
+ 05 FILLER PIC X(33) VALUE "ILENGTH".
+ 05 FILLER PIC X(33) VALUE " LESS".
+ 05 FILLER PIC X(33) VALUE " LIMIT".
+ 05 FILLER PIC X(33) VALUE " LIMITS".
+ 05 FILLER PIC X(33) VALUE " LINAGE".
+ 05 FILLER PIC X(33) VALUE "ILINAGE-COUNTER".
+ 05 FILLER PIC X(33) VALUE " LINE".
+ 05 FILLER PIC X(33) VALUE " LINE-COUNTER".
+ 05 FILLER PIC X(33) VALUE " LINES".
+ 05 FILLER PIC X(33) VALUE "KLINKAGE".
+ 05 FILLER PIC X(33) VALUE "KLOCAL-STORAGE".
+ 05 FILLER PIC X(33) VALUE " LOCALE".
+ 05 FILLER PIC X(33) VALUE "ILOCALE-DATE".
+ 05 FILLER PIC X(33) VALUE "ILOCALE-TIME".
+ 05 FILLER PIC X(33) VALUE "ILOCALE-TIME-FROM-SECONDS".
+ 05 FILLER PIC X(33) VALUE " LOCK".
+ 05 FILLER PIC X(33) VALUE "ILOG".
+ 05 FILLER PIC X(33) VALUE "ILOG10".
+ 05 FILLER PIC X(33) VALUE " LOW-VALUE".
+ 05 FILLER PIC X(33) VALUE " LOW-VALUES".
+ 05 FILLER PIC X(33) VALUE " LOWER".
+ 05 FILLER PIC X(33) VALUE "ILOWER-CASE".
+ 05 FILLER PIC X(33) VALUE " LOWLIGHT".
+ 05 FILLER PIC X(33) VALUE " MANUAL".
+ 05 FILLER PIC X(33) VALUE "IMAX".
+ 05 FILLER PIC X(33) VALUE "IMEAN".
+ 05 FILLER PIC X(33) VALUE "IMEDIAN".
+ 05 FILLER PIC X(33) VALUE " MEMORY".
+ 05 FILLER PIC X(33) VALUE "VMERGE".
+ 05 FILLER PIC X(33) VALUE " METHOD".
+ 05 FILLER PIC X(33) VALUE " METHOD-ID".
+ 05 FILLER PIC X(33) VALUE "IMIDRANGE".
+ 05 FILLER PIC X(33) VALUE "IMIN".
+ 05 FILLER PIC X(33) VALUE " MINUS".
+ 05 FILLER PIC X(33) VALUE "IMOD".
+ 05 FILLER PIC X(33) VALUE " MODE".
+ 05 FILLER PIC X(33) VALUE "VMOVE".
+ 05 FILLER PIC X(33) VALUE " MULTIPLE".
+ 05 FILLER PIC X(33) VALUE "VMULTIPLY".
+ 05 FILLER PIC X(33) VALUE " NATIONAL".
+ 05 FILLER PIC X(33) VALUE " NATIONAL-EDITED".
+ 05 FILLER PIC X(33) VALUE " NATIVE".
+ 05 FILLER PIC X(33) VALUE " NEGATIVE".
+ 05 FILLER PIC X(33) VALUE " NESTED".
+ 05 FILLER PIC X(33) VALUE "VNEXT".
+ 05 FILLER PIC X(33) VALUE " NO".
+ 05 FILLER PIC X(33) VALUE " NOT".
+ 05 FILLER PIC X(33) VALUE " NULL".
+ 05 FILLER PIC X(33) VALUE " NULLS".
+ 05 FILLER PIC X(33) VALUE " NUMBER".
+ 05 FILLER PIC X(33) VALUE "INUMBER-OF-CALL-PARAMETERS".
+ 05 FILLER PIC X(33) VALUE " NUMBERS".
+ 05 FILLER PIC X(33) VALUE " NUMERIC".
+ 05 FILLER PIC X(33) VALUE " NUMERIC-EDITED".
+ 05 FILLER PIC X(33) VALUE "INUMVAL".
+ 05 FILLER PIC X(33) VALUE "INUMVAL-C".
+ 05 FILLER PIC X(33) VALUE " OBJECT".
+ 05 FILLER PIC X(33) VALUE " OBJECT-COMPUTER".
+ 05 FILLER PIC X(33) VALUE " OBJECT-REFERENCE".
+ 05 FILLER PIC X(33) VALUE " OCCURS".
+ 05 FILLER PIC X(33) VALUE " OF".
+ 05 FILLER PIC X(33) VALUE " OFF".
+ 05 FILLER PIC X(33) VALUE " OMITTED".
+ 05 FILLER PIC X(33) VALUE " ON".
+ 05 FILLER PIC X(33) VALUE " ONLY".
+ 05 FILLER PIC X(33) VALUE "VOPEN".
+ 05 FILLER PIC X(33) VALUE " OPTIONAL".
+ 05 FILLER PIC X(33) VALUE " OPTIONS".
+ 05 FILLER PIC X(33) VALUE " OR".
+ 05 FILLER PIC X(33) VALUE "IORD".
+ 05 FILLER PIC X(33) VALUE "IORD-MAX".
+ 05 FILLER PIC X(33) VALUE "IORD-MIN".
+ 05 FILLER PIC X(33) VALUE " ORDER".
+ 05 FILLER PIC X(33) VALUE " ORGANIZATION".
+ 05 FILLER PIC X(33) VALUE " OTHER".
+ 05 FILLER PIC X(33) VALUE " OUTPUT".
+ 05 FILLER PIC X(33) VALUE " OVERFLOW".
+ 05 FILLER PIC X(33) VALUE " OVERLINE".
+ 05 FILLER PIC X(33) VALUE " OVERRIDE".
+ 05 FILLER PIC X(33) VALUE " PACKED-DECIMAL".
+ 05 FILLER PIC X(33) VALUE " PADDING".
+ 05 FILLER PIC X(33) VALUE " PAGE".
+ 05 FILLER PIC X(33) VALUE " PAGE-COUNTER".
+ 05 FILLER PIC X(33) VALUE " PARAGRAPH".
+ 05 FILLER PIC X(33) VALUE "VPERFORM".
+ 05 FILLER PIC X(33) VALUE " PF".
+ 05 FILLER PIC X(33) VALUE " PH".
+ 05 FILLER PIC X(33) VALUE "IPI".
+ 05 FILLER PIC X(33) VALUE "KPIC".
+ 05 FILLER PIC X(33) VALUE "KPICTURE".
+ 05 FILLER PIC X(33) VALUE " PLUS".
+ 05 FILLER PIC X(33) VALUE "KPOINTER".
+ 05 FILLER PIC X(33) VALUE " POSITION".
+ 05 FILLER PIC X(33) VALUE " POSITIVE".
+ 05 FILLER PIC X(33) VALUE " PRESENT".
+ 05 FILLER PIC X(33) VALUE "IPRESENT-VALUE".
+ 05 FILLER PIC X(33) VALUE " PREVIOUS".
+ 05 FILLER PIC X(33) VALUE "MPRINTER".
+ 05 FILLER PIC X(33) VALUE " PRINTING".
+ 05 FILLER PIC X(33) VALUE "KPROCEDURE".
+ 05 FILLER PIC X(33) VALUE " PROCEDURE-POINTER".
+ 05 FILLER PIC X(33) VALUE " PROCEDURES".
+ 05 FILLER PIC X(33) VALUE " PROCEED".
+ 05 FILLER PIC X(33) VALUE " PROGRAM".
+ 05 FILLER PIC X(33) VALUE "KPROGRAM-ID".
+ 05 FILLER PIC X(33) VALUE " PROGRAM-POINTER".
+ 05 FILLER PIC X(33) VALUE " PROMPT".
+ 05 FILLER PIC X(33) VALUE " PROPERTY".
+ 05 FILLER PIC X(33) VALUE " PROTOTYPE".
+ 05 FILLER PIC X(33) VALUE " QUOTE".
+ 05 FILLER PIC X(33) VALUE " QUOTES".
+ 05 FILLER PIC X(33) VALUE " RAISE".
+ 05 FILLER PIC X(33) VALUE " RAISING".
+ 05 FILLER PIC X(33) VALUE "IRANDOM".
+ 05 FILLER PIC X(33) VALUE "IRANGE".
+ 05 FILLER PIC X(33) VALUE " RD".
+ 05 FILLER PIC X(33) VALUE "VREAD".
+ 05 FILLER PIC X(33) VALUE "VREADY".
+ 05 FILLER PIC X(33) VALUE " RECORD".
+ 05 FILLER PIC X(33) VALUE " RECORDING".
+ 05 FILLER PIC X(33) VALUE " RECORDS".
+ 05 FILLER PIC X(33) VALUE " RECURSIVE".
+ 05 FILLER PIC X(33) VALUE "KREDEFINES".
+ 05 FILLER PIC X(33) VALUE " REEL".
+ 05 FILLER PIC X(33) VALUE " REFERENCE".
+ 05 FILLER PIC X(33) VALUE " RELATIVE".
+ 05 FILLER PIC X(33) VALUE "VRELEASE".
+ 05 FILLER PIC X(33) VALUE "IREM".
+ 05 FILLER PIC X(33) VALUE " REMAINDER".
+ 05 FILLER PIC X(33) VALUE " REMARKS".
+ 05 FILLER PIC X(33) VALUE " REMOVAL".
+ 05 FILLER PIC X(33) VALUE "KRENAMES".
+ 05 FILLER PIC X(33) VALUE "KREPLACING".
+ 05 FILLER PIC X(33) VALUE "KREPORT".
+ 05 FILLER PIC X(33) VALUE " REPORTING".
+ 05 FILLER PIC X(33) VALUE " REPORTS".
+ 05 FILLER PIC X(33) VALUE " REPOSITORY".
+ 05 FILLER PIC X(33) VALUE " REPRESENTS-NOT-A-NUMBER".
+ 05 FILLER PIC X(33) VALUE " REQUIRED".
+ 05 FILLER PIC X(33) VALUE " RESERVE".
+ 05 FILLER PIC X(33) VALUE " RESUME".
+ 05 FILLER PIC X(33) VALUE " RETRY".
+ 05 FILLER PIC X(33) VALUE "VRETURN".
+ 05 FILLER PIC X(33) VALUE "IRETURN-CODE".
+ 05 FILLER PIC X(33) VALUE "KRETURNING".
+ 05 FILLER PIC X(33) VALUE "IREVERSE".
+ 05 FILLER PIC X(33) VALUE " REVERSE-VIDEO".
+ 05 FILLER PIC X(33) VALUE " REWIND".
+ 05 FILLER PIC X(33) VALUE "VREWRITE".
+ 05 FILLER PIC X(33) VALUE " RF".
+ 05 FILLER PIC X(33) VALUE " RH".
+ 05 FILLER PIC X(33) VALUE " RIGHT".
+ 05 FILLER PIC X(33) VALUE " RIGHT-JUSTIFY".
+ 05 FILLER PIC X(33) VALUE "VROLLBACK".
+ 05 FILLER PIC X(33) VALUE " ROUNDED".
+ 05 FILLER PIC X(33) VALUE " RUN".
+ 05 FILLER PIC X(33) VALUE " SAME".
+ 05 FILLER PIC X(33) VALUE "KSCREEN".
+ 05 FILLER PIC X(33) VALUE " SCROLL".
+ 05 FILLER PIC X(33) VALUE "KSD".
+ 05 FILLER PIC X(33) VALUE "VSEARCH".
+ 05 FILLER PIC X(33) VALUE "ISECONDS-FROM-FORMATTED-TIME".
+ 05 FILLER PIC X(33) VALUE "ISECONDS-PAST-MIDNIGHT".
+ 05 FILLER PIC X(33) VALUE "KSECTION".
+ 05 FILLER PIC X(33) VALUE " SECURE".
+ 05 FILLER PIC X(33) VALUE " SECURITY".
+ 05 FILLER PIC X(33) VALUE " SEGMENT-LIMIT".
+ 05 FILLER PIC X(33) VALUE " SELECT".
+ 05 FILLER PIC X(33) VALUE " SELF".
+ 05 FILLER PIC X(33) VALUE " SENTENCE".
+ 05 FILLER PIC X(33) VALUE " SEPARATE".
+ 05 FILLER PIC X(33) VALUE " SEQUENCE".
+ 05 FILLER PIC X(33) VALUE " SEQUENTIAL".
+ 05 FILLER PIC X(33) VALUE "VSET".
+ 05 FILLER PIC X(33) VALUE " SHARING".
+ 05 FILLER PIC X(33) VALUE "ISIGN".
+ 05 FILLER PIC X(33) VALUE " SIGNED".
+ 05 FILLER PIC X(33) VALUE " SIGNED-INT".
+ 05 FILLER PIC X(33) VALUE " SIGNED-LONG".
+ 05 FILLER PIC X(33) VALUE " SIGNED-SHORT".
+ 05 FILLER PIC X(33) VALUE "ISIN".
+ 05 FILLER PIC X(33) VALUE " SIZE".
+ 05 FILLER PIC X(33) VALUE "VSORT".
+ 05 FILLER PIC X(33) VALUE " SORT-MERGE".
+ 05 FILLER PIC X(33) VALUE "ISORT-RETURN".
+ 05 FILLER PIC X(33) VALUE " SOURCE".
+ 05 FILLER PIC X(33) VALUE " SOURCE-COMPUTER".
+ 05 FILLER PIC X(33) VALUE " SOURCES".
+ 05 FILLER PIC X(33) VALUE " SPACE".
+ 05 FILLER PIC X(33) VALUE " SPACE-FILL".
+ 05 FILLER PIC X(33) VALUE " SPACES".
+ 05 FILLER PIC X(33) VALUE " SPECIAL-NAMES".
+ 05 FILLER PIC X(33) VALUE "ISQRT".
+ 05 FILLER PIC X(33) VALUE " STANDARD".
+ 05 FILLER PIC X(33) VALUE " STANDARD-1".
+ 05 FILLER PIC X(33) VALUE " STANDARD-2".
+ 05 FILLER PIC X(33) VALUE "ISTANDARD-DEVIATION".
+ 05 FILLER PIC X(33) VALUE "VSTART".
+ 05 FILLER PIC X(33) VALUE " STATUS".
+ 05 FILLER PIC X(33) VALUE "VSTOP".
+ 05 FILLER PIC X(33) VALUE "ISTORED-CHAR-LENGTH".
+ 05 FILLER PIC X(33) VALUE "VSTRING".
+ 05 FILLER PIC X(33) VALUE "ISUBSTITUTE".
+ 05 FILLER PIC X(33) VALUE "ISUBSTITUTE-CASE".
+ 05 FILLER PIC X(33) VALUE "VSUBTRACT".
+ 05 FILLER PIC X(33) VALUE "ISUM".
+ 05 FILLER PIC X(33) VALUE " SUPER".
+ 05 FILLER PIC X(33) VALUE "VSUPPRESS".
+ 05 FILLER PIC X(33) VALUE "MSWITCH-1".
+ 05 FILLER PIC X(33) VALUE "MSWITCH-2".
+ 05 FILLER PIC X(33) VALUE "MSWITCH-3".
+ 05 FILLER PIC X(33) VALUE "MSWITCH-4".
+ 05 FILLER PIC X(33) VALUE "MSWITCH-5".
+ 05 FILLER PIC X(33) VALUE "MSWITCH-6".
+ 05 FILLER PIC X(33) VALUE "MSWITCH-7".
+ 05 FILLER PIC X(33) VALUE "MSWITCH-8".
+ 05 FILLER PIC X(33) VALUE " SYMBOLIC".
+ 05 FILLER PIC X(33) VALUE " SYNC".
+ 05 FILLER PIC X(33) VALUE " SYNCHRONIZED".
+ 05 FILLER PIC X(33) VALUE "MSYSERR".
+ 05 FILLER PIC X(33) VALUE "MSYSIN".
+ 05 FILLER PIC X(33) VALUE "MSYSIPT".
+ 05 FILLER PIC X(33) VALUE "MSYSLIST".
+ 05 FILLER PIC X(33) VALUE "MSYSLST".
+ 05 FILLER PIC X(33) VALUE "MSYSOUT".
+ 05 FILLER PIC X(33) VALUE " SYSTEM-DEFAULT".
+ 05 FILLER PIC X(33) VALUE " TABLE".
+ 05 FILLER PIC X(33) VALUE "KTALLYING".
+ 05 FILLER PIC X(33) VALUE "ITAN".
+ 05 FILLER PIC X(33) VALUE " TAPE".
+ 05 FILLER PIC X(33) VALUE "VTERMINATE".
+ 05 FILLER PIC X(33) VALUE " TEST".
+ 05 FILLER PIC X(33) VALUE "ITEST-DATE-YYYYMMDD".
+ 05 FILLER PIC X(33) VALUE "ITEST-DAY-YYYYDDD".
+ 05 FILLER PIC X(33) VALUE " THAN".
+ 05 FILLER PIC X(33) VALUE " THEN".
+ 05 FILLER PIC X(33) VALUE " THROUGH".
+ 05 FILLER PIC X(33) VALUE " THRU".
+ 05 FILLER PIC X(33) VALUE " TIME".
+ 05 FILLER PIC X(33) VALUE " TIMES".
+ 05 FILLER PIC X(33) VALUE "KTO".
+ 05 FILLER PIC X(33) VALUE " TOP".
+ 05 FILLER PIC X(33) VALUE " TRAILING".
+ 05 FILLER PIC X(33) VALUE " TRAILING-SIGN".
+ 05 FILLER PIC X(33) VALUE "VTRANSFORM".
+ 05 FILLER PIC X(33) VALUE "ITRIM".
+ 05 FILLER PIC X(33) VALUE " TRUE".
+ 05 FILLER PIC X(33) VALUE " TYPE".
+ 05 FILLER PIC X(33) VALUE " TYPEDEF".
+ 05 FILLER PIC X(33) VALUE " UNDERLINE".
+ 05 FILLER PIC X(33) VALUE " UNIT".
+ 05 FILLER PIC X(33) VALUE " UNIVERSAL".
+ 05 FILLER PIC X(33) VALUE "VUNLOCK".
+ 05 FILLER PIC X(33) VALUE " UNSIGNED".
+ 05 FILLER PIC X(33) VALUE " UNSIGNED-INT".
+ 05 FILLER PIC X(33) VALUE " UNSIGNED-LONG".
+ 05 FILLER PIC X(33) VALUE " UNSIGNED-SHORT".
+ 05 FILLER PIC X(33) VALUE "VUNSTRING".
+ 05 FILLER PIC X(33) VALUE " UNTIL".
+ 05 FILLER PIC X(33) VALUE "KUP".
+ 05 FILLER PIC X(33) VALUE " UPDATE".
+ 05 FILLER PIC X(33) VALUE " UPON".
+ 05 FILLER PIC X(33) VALUE " UPPER".
+ 05 FILLER PIC X(33) VALUE "IUPPER-CASE".
+ 05 FILLER PIC X(33) VALUE " USAGE".
+ 05 FILLER PIC X(33) VALUE "VUSE".
+ 05 FILLER PIC X(33) VALUE " USER-DEFAULT".
+ 05 FILLER PIC X(33) VALUE "KUSING".
+ 05 FILLER PIC X(33) VALUE " VAL-STATUS".
+ 05 FILLER PIC X(33) VALUE " VALID".
+ 05 FILLER PIC X(33) VALUE " VALIDATE".
+ 05 FILLER PIC X(33) VALUE " VALIDATE-STATUS".
+ 05 FILLER PIC X(33) VALUE " VALUE".
+ 05 FILLER PIC X(33) VALUE " VALUES".
+ 05 FILLER PIC X(33) VALUE "IVARIANCE".
+ 05 FILLER PIC X(33) VALUE "KVARYING".
+ 05 FILLER PIC X(33) VALUE " WAIT".
+ 05 FILLER PIC X(33) VALUE "VWHEN".
+ 05 FILLER PIC X(33) VALUE "IWHEN-COMPILED".
+ 05 FILLER PIC X(33) VALUE " WITH".
+ 05 FILLER PIC X(33) VALUE " WORDS".
+ 05 FILLER PIC X(33) VALUE "KWORKING-STORAGE".
+ 05 FILLER PIC X(33) VALUE "VWRITE".
+ 05 FILLER PIC X(33) VALUE "IYEAR-TO-YYYY".
+ 05 FILLER PIC X(33) VALUE " YYYYDDD".
+ 05 FILLER PIC X(33) VALUE " YYYYMMDD".
+ 05 FILLER PIC X(33) VALUE " ZERO".
+ 05 FILLER PIC X(33) VALUE " ZERO-FILL".
+ 05 FILLER PIC X(33) VALUE " ZEROES".
+ 05 FILLER PIC X(33) VALUE " ZEROS".
+ 01 Reserved-Word-Table REDEFINES Reserved-Words.
+ 05 Reserved-Word OCCURS 591 TIMES
+ ASCENDING KEY RW-Word
+ INDEXED RW-Idx.
+ 10 RW-Type PIC X(1).
+ 10 RW-Word PIC X(32).
+
+ 01 Saved-Section PIC X(15).
+
+ 01 Search-Token PIC X(32).
+
+ 01 Source-Line-No PIC 9(6).
+
+ 01 Src-Ptr USAGE BINARY-LONG.
+
+ 01 Syntax-Parsing-Items.
+ 05 SPI-Current-Char PIC X(1).
+ 88 Current-Char-Is-Punct VALUE "=", "(", ")", "*", "/",
+ "&", ";", ",", "<", ">",
+ ":".
+ 88 Current-Char-Is-Quote VALUE '"', "'".
+ 88 Current-Char-Is-X VALUE "x", "X".
+ 88 Current-Char-Is-Z VALUE "z", "Z".
+ 05 SPI-Current-Division PIC X(1).
+ 88 In-IDENTIFICATION-DIVISION VALUE "I", "?".
+ 88 In-ENVIRONMENT-DIVISION VALUE "E".
+ 88 In-DATA-DIVISION VALUE "D".
+ 88 In-PROCEDURE-DIVISION VALUE "P".
+ 05 SPI-Current-Line-No PIC 9(6).
+ 05 SPI-Current-Program-ID.
+ 10 FILLER PIC X(12).
+ 10 SPI-CP-13-15 PIC X(3).
+ 05 SPI-Current-Section.
+ 10 SPI-CS-1 PIC X(1).
+ 10 SPI-CS-2-14.
+ 15 FILLER PIC X(10).
+ 15 SPI-CS-11-14 PIC X(3).
+ 10 SPI-CS-15 PIC X(1).
+ 05 SPI-Current-Token PIC X(32).
+ 05 SPI-Current-Token-UC PIC X(32).
+ 05 SPI-Current-Verb PIC X(12).
+ 05 SPI-Next-Char PIC X(1).
+ 88 Next-Char-Is-Quote VALUE '"', "'".
+ 05 SPI-Prior-Token PIC X(32).
+ 05 SPI-Token-Type PIC X(1).
+ 88 Token-Is-EOF VALUE HIGH-VALUES.
+ 88 Token-Is-Identifier VALUE "I".
+ 88 Token-Is-Key-Word VALUE "K", "V".
+ 88 Token-Is-Literal-Alpha VALUE "L".
+ 88 Token-Is-Literal-Number VALUE "N".
+ 88 Token-Is-Verb VALUE "V".
+GC0710 88 Token-Is-Reserved-Word VALUE " ".
+
+ 01 Tally USAGE BINARY-LONG.
+
+ 01 Todays-Date PIC 9(8).
+
+ LINKAGE SECTION.
+ 01 Produce-Source-Listing PIC X(1).
+ 01 Produce-Xref-Listing PIC X(1).
+ 01 Src-Filename PIC X(256).
+ /
+ PROCEDURE DIVISION USING Produce-Source-Listing
+ Produce-Xref-Listing
+ Src-Filename.
+ 000-Main SECTION.
+ 001-Init.
+ PERFORM 100-Initialization
+ PERFORM 200-Execute-cobc
+ OPEN OUTPUT Report-File
+ IF Produce-Source-Listing NOT = SPACE
+ PERFORM 500-Produce-Source-Listing
+ END-IF
+ IF Produce-Xref-Listing NOT = SPACE
+ SORT Sort-File
+ ASCENDING KEY SR-Prog-ID
+ SR-Token-UC
+ SR-Line-No-Ref
+ INPUT PROCEDURE 300-Tokenize-Source
+ OUTPUT PROCEDURE 400-Produce-Xref-Listing
+ END-IF
+ CLOSE Report-File
+ GOBACK
+ .
+ /
+ 100-Initialization SECTION.
+ *****************************************************************
+ ** Perform all program-wide initialization operations **
+ *****************************************************************
+ 101-Establish-Working-Env.
+ MOVE TRIM(Src-Filename,Leading) TO Src-Filename
+ ACCEPT Env-TEMP
+ FROM ENVIRONMENT "TEMP"
+ END-ACCEPT
+ ACCEPT Lines-Per-Page-ENV
+ FROM ENVIRONMENT "OCXREF_LINES"
+ END-ACCEPT
+ INSPECT Src-Filename REPLACING ALL "\" BY "/"
+ INSPECT Env-TEMP REPLACING ALL "\" BY "/"
+ MOVE Src-Filename TO Program-Path
+ MOVE Program-Path TO Heading-2
+ CALL "C$JUSTIFY"
+ USING Heading-2, "Right"
+ END-CALL
+ MOVE LENGTH(TRIM(Src-Filename,Trailing)) TO I
+ MOVE 0 TO J
+ PERFORM UNTIL Src-Filename(I:1) = '/'
+ OR I = 0
+ SUBTRACT 1 FROM I
+ ADD 1 TO J
+ END-PERFORM
+ UNSTRING Src-Filename((I + 1):J) DELIMITED BY "."
+ INTO Filename, Dummy
+ END-UNSTRING
+ STRING TRIM(Env-TEMP,Trailing)
+ "/"
+ TRIM(Filename,Trailing)
+ ".i"
+ DELIMITED SIZE
+ INTO Expanded-Src-Filename
+ END-STRING
+ STRING Program-Path(1:I)
+ TRIM(Filename,Trailing)
+ ".lst"
+ DELIMITED SIZE
+ INTO Report-Filename
+ END-STRING
+ IF Lines-Per-Page-ENV NOT = SPACES
+ MOVE NUMVAL(Lines-Per-Page-ENV) TO Lines-Per-Page
+ ELSE
+ MOVE 60 TO Lines-Per-Page
+ END-IF
+ ACCEPT Todays-Date
+ FROM DATE YYYYMMDD
+ END-ACCEPT
+ MOVE Todays-Date TO H1X-Date
+ H1S-Date
+ MOVE "????????????..." TO SPI-Current-Program-ID
+ MOVE SPACES TO SPI-Current-Verb
+ Held-Reference
+ MOVE "Y" TO F-First-Record
+ .
+ /
+ 200-Execute-cobc SECTION.
+ 201-Build-Cmd.
+ STRING "cobc -E "
+ TRIM(Program-Path, Trailing)
+ " > "
+ TRIM(Expanded-Src-Filename,Trailing)
+ DELIMITED SIZE
+ INTO Cmd
+ END-STRING
+ CALL "SYSTEM"
+ USING Cmd
+ END-CALL
+ IF RETURN-CODE NOT = 0
+ DISPLAY
+ "Cross-reference terminated by previous errors"
+ UPON SYSERR
+ END-DISPLAY
+ GOBACK
+ END-IF
+ .
+
+ 209-Exit.
+ EXIT
+ .
+ /
+ 300-Tokenize-Source SECTION.
+ 301-Driver.
+ OPEN INPUT Expand-Code
+ MOVE SPACES TO Expand-Code-Rec
+ MOVE 256 TO Src-Ptr
+ MOVE 0 TO Num-UserNames
+ SPI-Current-Line-No
+ MOVE "?" TO SPI-Current-Division
+GC0710 MOVE "N" TO F-Verb-Has-Been-Found.
+ PERFORM FOREVER
+ PERFORM 310-Get-Token
+ IF Token-Is-EOF
+ EXIT PERFORM
+ END-IF
+ MOVE UPPER-CASE(SPI-Current-Token)
+ TO SPI-Current-Token-UC
+ IF Token-Is-Verb
+ MOVE SPI-Current-Token-UC TO SPI-Current-Verb
+ SPI-Prior-Token
+ IF Held-Reference NOT = SPACES
+ MOVE Held-Reference TO Sort-Rec
+ MOVE SPACES TO Held-Reference
+ RELEASE Sort-Rec
+ END-IF
+ END-IF
+ EVALUATE TRUE
+ WHEN In-IDENTIFICATION-DIVISION
+ PERFORM 320-IDENTIFICATION-DIVISION
+ WHEN In-ENVIRONMENT-DIVISION
+ PERFORM 330-ENVIRONMENT-DIVISION
+ WHEN In-DATA-DIVISION
+ PERFORM 340-DATA-DIVISION
+ WHEN In-PROCEDURE-DIVISION
+ PERFORM 350-PROCEDURE-DIVISION
+ END-EVALUATE
+ IF Token-Is-Key-Word
+ MOVE SPI-Current-Token-UC TO SPI-Prior-Token
+ END-IF
+ IF F-Token-Ended-Sentence = "Y"
+ AND SPI-Current-Division NOT = "I"
+ MOVE SPACES TO SPI-Prior-Token
+ SPI-Current-Verb
+ END-IF
+
+ END-PERFORM
+ CLOSE Expand-Code
+ EXIT SECTION
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 310-Get-Token.
+ *>-- Position to 1st non-blank character
+ MOVE F-Token-Ended-Sentence TO F-Last-Token-Ended-Sent
+ MOVE "N" TO F-Token-Ended-Sentence
+ PERFORM UNTIL Expand-Code-Rec(Src-Ptr : 1) NOT = SPACE
+ IF Src-Ptr > 255
+ READ Expand-Code AT END
+ IF Held-Reference NOT = SPACES
+ MOVE Held-Reference TO Sort-Rec
+ MOVE SPACES TO Held-Reference
+ RELEASE Sort-Rec
+ END-IF
+ SET Token-Is-EOF TO TRUE
+ MOVE 0 TO SPI-Current-Line-No
+ EXIT PARAGRAPH
+ END-READ
+ IF ECR-1 = "#"
+ PERFORM 311-Control-Record
+ ELSE
+ PERFORM 312-Expand-Code-Record
+ END-IF
+ ELSE
+ ADD 1 TO Src-Ptr
+ END-IF
+ END-PERFORM
+ *>-- Extract token string
+ MOVE Expand-Code-Rec(Src-Ptr : 1) TO SPI-Current-Char
+ MOVE Expand-Code-Rec(Src-Ptr + 1: 1) TO SPI-Next-Char
+ IF SPI-Current-Char = "."
+ ADD 1 TO Src-Ptr
+ MOVE SPI-Current-Char TO SPI-Current-Token
+ MOVE SPACE TO SPI-Token-Type
+ MOVE "Y" TO F-Token-Ended-Sentence
+ EXIT PARAGRAPH
+ END-IF
+ IF Current-Char-Is-Punct
+ AND SPI-Current-Char = "="
+ AND SPI-Current-Division = "P"
+ ADD 1 TO Src-Ptr
+ MOVE "EQUALS" TO SPI-Current-Token
+ MOVE "K" TO SPI-Token-Type
+ EXIT PARAGRAPH
+ END-IF
+ IF Current-Char-Is-Punct *> So subscripts don't get flagged w/ "*"
+ AND SPI-Current-Char = "("
+ AND SPI-Current-Division = "P"
+ MOVE SPACES TO SPI-Prior-Token
+ END-IF
+ IF Current-Char-Is-Punct
+ ADD 1 TO Src-Ptr
+ MOVE SPI-Current-Char TO SPI-Current-Token
+ MOVE SPACE TO SPI-Token-Type
+ EXIT PARAGRAPH
+ END-IF
+ IF Current-Char-Is-Quote
+ ADD 1 TO Src-Ptr
+ UNSTRING Expand-Code-Rec
+ DELIMITED BY SPI-Current-Char
+ INTO SPI-Current-Token
+ WITH POINTER Src-Ptr
+ END-UNSTRING
+ IF Expand-Code-Rec(Src-Ptr : 1) = "."
+ MOVE "Y" TO F-Token-Ended-Sentence
+ ADD 1 TO Src-Ptr
+ END-IF
+ SET Token-Is-Literal-Alpha TO TRUE
+ EXIT PARAGRAPH
+ END-IF
+ IF Current-Char-Is-X AND Next-Char-Is-Quote
+ ADD 2 TO Src-Ptr
+ UNSTRING Expand-Code-Rec
+ DELIMITED BY SPI-Next-Char
+ INTO SPI-Current-Token
+ WITH POINTER Src-Ptr
+ END-UNSTRING
+ IF Expand-Code-Rec(Src-Ptr : 1) = "."
+ MOVE "Y" TO F-Token-Ended-Sentence
+ ADD 1 TO Src-Ptr
+ END-IF
+ SET Token-Is-Literal-Number TO TRUE
+ EXIT PARAGRAPH
+ END-IF
+ IF Current-Char-Is-Z AND Next-Char-Is-Quote
+ ADD 2 TO Src-Ptr
+ UNSTRING Expand-Code-Rec
+ DELIMITED BY SPI-Next-Char
+ INTO SPI-Current-Token
+ WITH POINTER Src-Ptr
+ END-UNSTRING
+ IF Expand-Code-Rec(Src-Ptr : 1) = "."
+ MOVE "Y" TO F-Token-Ended-Sentence
+ ADD 1 TO Src-Ptr
+ END-IF
+ SET Token-Is-Literal-Alpha TO TRUE
+ EXIT PARAGRAPH
+ END-IF
+ IF F-Processing-PICTURE = "Y"
+ UNSTRING Expand-Code-Rec
+ DELIMITED BY ". " OR " "
+ INTO SPI-Current-Token
+ DELIMITER IN Delim
+ WITH POINTER Src-Ptr
+ END-UNSTRING
+ IF Delim = ". "
+ MOVE "Y" TO F-Token-Ended-Sentence
+ ADD 1 TO Src-Ptr
+ END-IF
+ IF UPPER-CASE(SPI-Current-Token) = "IS"
+ MOVE SPACE TO SPI-Token-Type
+ EXIT PARAGRAPH
+ ELSE
+ MOVE "N" TO F-Processing-PICTURE
+ MOVE SPACE TO SPI-Token-Type
+ EXIT PARAGRAPH
+ END-IF
+ END-IF
+ UNSTRING Expand-Code-Rec
+ DELIMITED BY ". " OR " " OR "=" OR "(" OR ")" OR "*"
+ OR "/" OR "&" OR ";" OR "," OR "<"
+ OR ">" OR ":"
+ INTO SPI-Current-Token
+ DELIMITER IN Delim
+ WITH POINTER Src-Ptr
+ END-UNSTRING
+ IF Delim = ". "
+ MOVE "Y" TO F-Token-Ended-Sentence
+ END-IF
+ IF Delim NOT = ". " AND " "
+ SUBTRACT 1 FROM Src-Ptr
+ END-IF
+ *>-- Classify Token
+ MOVE UPPER-CASE(SPI-Current-Token) TO Search-Token
+ IF Search-Token = "EQUAL" OR "EQUALS"
+ MOVE "EQUALS" TO SPI-Current-Token
+ MOVE "K" TO SPI-Token-Type
+ EXIT PARAGRAPH
+ END-IF
+ SEARCH ALL Reserved-Word
+ WHEN RW-Word (RW-Idx) = Search-Token
+ MOVE RW-Type (RW-Idx) TO SPI-Token-Type
+GC0710 IF Token-Is-Verb
+GC0710 MOVE "Y" TO F-Verb-Has-Been-Found
+GC0710 END-IF
+ EXIT PARAGRAPH
+ END-SEARCH
+ *>-- Not a reserved word, must be a user name
+ SET Token-Is-Identifier TO TRUE *> NEEDS EXPANSION!!!!
+ PERFORM 313-Check-For-Numeric-Token
+ IF Token-Is-Literal-Number
+ IF (F-Last-Token-Ended-Sent = "Y")
+ AND (SPI-Current-Division = "D")
+ MOVE "LEVEL #" TO SPI-Current-Token
+ MOVE "K" TO SPI-Token-Type
+ EXIT PARAGRAPH
+ ELSE
+ EXIT PARAGRAPH
+ END-IF
+ END-IF
+ EXIT PARAGRAPH
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 311-Control-Record.
+ UNSTRING ECR-2-256
+ DELIMITED BY '"'
+ INTO PIC-X10, PIC-X256, Dummy
+ END-UNSTRING
+ INSPECT PIC-X10 REPLACING ALL '"' BY SPACE
+ COMPUTE I = NUMVAL(PIC-X10) - 1
+ IF TRIM(PIC-X256,Trailing) = TRIM(Program-Path,Trailing)
+ MOVE I TO SPI-Current-Line-No
+ SET In-Main-Module TO TRUE
+ IF Saved-Section NOT = SPACES
+ MOVE Saved-Section TO SPI-Current-Section
+ END-IF
+ ELSE
+ SET In-Copybook TO TRUE
+ IF Saved-Section = SPACES
+ MOVE SPI-Current-Section TO Saved-Section
+ END-IF
+ MOVE LENGTH(TRIM(PIC-X256,Trailing)) TO I
+ MOVE 0 TO J
+ PERFORM UNTIL PIC-X256(I:1) = '/'
+ OR I = 0
+ SUBTRACT 1 FROM I
+ ADD 1 TO J
+ END-PERFORM
+ UNSTRING PIC-X256((I + 1):J) DELIMITED BY "."
+ INTO Filename, Dummy
+ END-UNSTRING
+ MOVE "[" TO SPI-CS-1
+ MOVE Filename TO SPI-CS-2-14
+ IF SPI-CS-11-14 NOT = SPACES
+ MOVE "..." TO SPI-CS-11-14
+ END-IF
+ MOVE "]" TO SPI-CS-15
+ END-IF
+ MOVE SPACES TO Expand-Code-Rec *> Force another READ
+ MOVE 256 TO Src-Ptr
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 312-Expand-Code-Record.
+ MOVE 1 TO Src-Ptr
+ IF In-Main-Module
+ ADD 1 To SPI-Current-Line-No
+ END-IF
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 313-Check-For-Numeric-Token.
+ MOVE SPI-Current-Token TO PIC-X32
+ INSPECT PIC-X32
+ REPLACING TRAILING SPACES BY "0"
+ IF PIC-X32 IS NUMERIC *> Simple Unsigned Integer
+ SET Token-Is-Literal-Number TO TRUE
+ EXIT PARAGRAPH
+ END-IF
+ IF PIC-X32(1:1) = "+" OR "-"
+ MOVE "0" TO PIC-X32(1:1)
+ END-IF
+ MOVE 0 TO Tally
+ INSPECT PIC-X32
+ TALLYING Tally FOR ALL "."
+ IF Tally = 1
+ INSPECT PIC-X32 REPLACING ALL "." BY "0"
+ END-IF
+ IF PIC-X32 IS NUMERIC
+ SET Token-Is-Literal-Number TO TRUE
+ EXIT PARAGRAPH
+ END-IF
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 320-IDENTIFICATION-DIVISION.
+GC0710 MOVE "N" TO F-Verb-Has-Been-Found
+ IF Token-Is-Key-Word AND SPI-Current-Token = "DIVISION"
+ MOVE SPI-Prior-Token TO SPI-Current-Division
+ EXIT PARAGRAPH
+ END-IF
+ IF SPI-Prior-Token = "PROGRAM-ID"
+ MOVE SPACES TO SPI-Prior-Token
+ MOVE SPI-Current-Token TO SPI-Current-Program-ID
+ IF SPI-CP-13-15 NOT = SPACES
+ MOVE "..." TO SPI-CP-13-15
+ END-IF
+ EXIT PARAGRAPH
+ END-IF
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 330-ENVIRONMENT-DIVISION.
+ IF Token-Is-Key-Word AND SPI-Current-Token = "DIVISION"
+ MOVE SPI-Prior-Token TO SPI-Current-Division
+ EXIT PARAGRAPH
+ END-IF
+ IF Token-Is-Key-Word AND SPI-Current-Token = "SECTION"
+ MOVE SPI-Prior-Token TO SPI-Current-Section
+ EXIT PARAGRAPH
+ END-IF
+ IF Token-Is-Identifier
+ PERFORM 361-Release-Ref
+ END-IF
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 340-DATA-DIVISION.
+ IF Token-Is-Key-Word AND SPI-Current-Token = "DIVISION"
+ MOVE SPI-Prior-Token TO SPI-Current-Division
+ EXIT PARAGRAPH
+ END-IF
+ IF Token-Is-Key-Word AND SPI-Current-Token = "SECTION"
+ MOVE SPI-Prior-Token TO SPI-Current-Section
+ EXIT PARAGRAPH
+ END-IF
+ IF (SPI-Current-Token = "PIC" OR "PICTURE")
+ AND (Token-Is-Key-Word)
+ MOVE "Y" TO F-Processing-PICTURE
+ EXIT PARAGRAPH
+ END-IF
+GC0710 IF Token-Is-Reserved-Word
+GC0710 AND SPI-Prior-Token = "LEVEL #"
+GC0710 MOVE SPACES TO SPI-Prior-Token
+GC0710 EXIT PARAGRAPH
+GC0710 END-IF
+ IF Token-Is-Identifier
+ EVALUATE SPI-Prior-Token
+ WHEN "FD"
+ PERFORM 360-Release-Def
+ MOVE SPACES TO SPI-Prior-Token
+ WHEN "SD"
+ PERFORM 360-Release-Def
+ MOVE SPACES TO SPI-Prior-Token
+ WHEN "LEVEL #"
+ PERFORM 360-Release-Def
+ MOVE SPACES TO SPI-Prior-Token
+ WHEN "INDEXED"
+ PERFORM 360-Release-Def
+ MOVE SPACES TO SPI-Prior-Token
+ WHEN "USING"
+ PERFORM 362-Release-Upd
+ MOVE SPACES TO SPI-Prior-Token
+ WHEN "INTO"
+ PERFORM 362-Release-Upd
+ MOVE SPACES TO SPI-Prior-Token
+ WHEN OTHER
+ PERFORM 361-Release-Ref
+ END-EVALUATE
+ EXIT PARAGRAPH
+ END-IF
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 350-PROCEDURE-DIVISION.
+ IF SPI-Current-Section NOT = "PROCEDURE"
+ MOVE "PROCEDURE" TO SPI-Current-Section
+ END-IF
+GC0710 IF SPI-Current-Token-UC = "PROGRAM"
+GC0710 AND SPI-Prior-Token = "END"
+GC0710 MOVE "?" TO SPI-Current-Division
+GC0710 EXIT PARAGRAPH
+GC0710 END-IF
+ IF Token-Is-Key-Word AND SPI-Current-Token = "DIVISION"
+ MOVE SPI-Prior-Token TO SPI-Current-Division
+ EXIT PARAGRAPH
+ END-IF
+ IF SPI-Current-Verb = SPACES
+GC0710 AND F-Verb-Has-Been-Found = "Y"
+ IF Token-Is-Identifier
+ PERFORM 360-Release-Def
+ MOVE SPACES TO SPI-Prior-Token
+ END-IF
+ EXIT PARAGRAPH
+ END-IF
+ IF NOT Token-Is-Identifier
+ EXIT PARAGRAPH
+ END-IF
+ EVALUATE SPI-Current-Verb
+ WHEN "ACCEPT"
+ PERFORM 351-ACCEPT
+ WHEN "ADD"
+ PERFORM 351-ADD
+ WHEN "ALLOCATE"
+ PERFORM 351-ALLOCATE
+ WHEN "CALL"
+ PERFORM 351-CALL
+ WHEN "COMPUTE"
+ PERFORM 351-COMPUTE
+ WHEN "DIVIDE"
+ PERFORM 351-DIVIDE
+ WHEN "FREE"
+ PERFORM 351-FREE
+ WHEN "INITIALIZE"
+ PERFORM 351-INITIALIZE
+ WHEN "INSPECT"
+ PERFORM 351-INSPECT
+ WHEN "MOVE"
+ PERFORM 351-MOVE
+ WHEN "MULTIPLY"
+ PERFORM 351-MULTIPLY
+ WHEN "PERFORM"
+ PERFORM 351-PERFORM
+ WHEN "SET"
+ PERFORM 351-SET
+ WHEN "STRING"
+ PERFORM 351-STRING
+ WHEN "SUBTRACT"
+ PERFORM 351-SUBTRACT
+ WHEN "TRANSFORM"
+ PERFORM 351-TRANSFORM
+ WHEN "UNSTRING"
+ PERFORM 351-UNSTRING
+ WHEN OTHER
+ PERFORM 361-Release-Ref
+ END-EVALUATE
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 351-ACCEPT.
+ EVALUATE SPI-Prior-Token
+ WHEN "ACCEPT"
+ PERFORM 362-Release-Upd
+ MOVE SPACES TO SPI-Prior-Token
+ WHEN OTHER
+ PERFORM 361-Release-Ref
+ END-EVALUATE
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 351-ADD.
+ EVALUATE SPI-Prior-Token
+ WHEN "GIVING"
+ PERFORM 362-Release-Upd
+ WHEN "TO"
+ PERFORM 362-Release-Upd
+ WHEN OTHER
+ PERFORM 361-Release-Ref
+ END-EVALUATE
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 351-ALLOCATE.
+ EVALUATE SPI-Prior-Token
+ WHEN "ALLOCATE"
+ PERFORM 362-Release-Upd
+ MOVE SPACES TO SPI-Prior-Token
+ WHEN "RETURNING"
+ PERFORM 362-Release-Upd
+ WHEN OTHER
+ PERFORM 361-Release-Ref
+ END-EVALUATE
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 351-CALL.
+ EVALUATE SPI-Prior-Token
+ WHEN "RETURNING"
+ PERFORM 362-Release-Upd
+ WHEN "GIVING"
+ PERFORM 362-Release-Upd
+ WHEN OTHER
+ PERFORM 361-Release-Ref
+ END-EVALUATE
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 351-COMPUTE.
+ EVALUATE SPI-Prior-Token
+ WHEN "COMPUTE"
+ PERFORM 362-Release-Upd
+ WHEN OTHER
+ PERFORM 361-Release-Ref
+ END-EVALUATE
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 351-DIVIDE.
+ EVALUATE SPI-Prior-Token
+ WHEN "INTO"
+ PERFORM 363-Set-Upd
+ MOVE Sort-Rec TO Held-Reference
+ WHEN "GIVING"
+ IF Held-Reference NOT = SPACES
+ MOVE Held-Reference To Sort-Rec
+ MOVE SPACES To Held-Reference
+ SR-Ref-Flag
+ RELEASE Sort-Rec
+ END-IF
+ PERFORM 362-Release-Upd
+ WHEN "REMAINDER"
+ PERFORM 362-Release-Upd
+ WHEN OTHER
+ PERFORM 361-Release-Ref
+ END-EVALUATE
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 351-FREE.
+ PERFORM 362-Release-Upd
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 351-INITIALIZE.
+ EVALUATE SPI-Prior-Token
+ WHEN "INITIALIZE"
+ PERFORM 362-Release-Upd
+ WHEN "REPLACING"
+ PERFORM 361-Release-Ref
+ END-EVALUATE
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 351-INSPECT.
+ EVALUATE SPI-Prior-Token
+ WHEN "INSPECT"
+ PERFORM 364-Set-Ref
+ MOVE SPACES TO Held-Reference
+ MOVE SPACES TO SPI-Prior-Token
+ WHEN "TALLYING"
+ PERFORM 362-Release-Upd
+ MOVE SPACES TO SPI-Prior-Token
+ WHEN "REPLACING"
+ IF Held-Reference NOT = SPACES
+ MOVE Held-Reference TO Sort-Rec
+ MOVE SPACES TO Held-Reference
+ MOVE "*" TO SR-Ref-Flag
+ RELEASE Sort-Rec
+ END-IF
+ MOVE SPACES TO SPI-Prior-Token
+ WHEN "CONVERTING"
+ IF Held-Reference NOT = SPACES
+ MOVE Held-Reference TO Sort-Rec
+ MOVE SPACES TO Held-Reference
+ MOVE "*" TO SR-Ref-Flag
+ RELEASE Sort-Rec
+ END-IF
+ MOVE SPACES TO SPI-Prior-Token
+ WHEN OTHER
+ PERFORM 361-Release-Ref
+ END-EVALUATE
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 351-MOVE.
+ EVALUATE SPI-Prior-Token
+ WHEN "TO"
+ PERFORM 362-Release-Upd
+ WHEN OTHER
+ PERFORM 361-Release-Ref
+ END-EVALUATE
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 351-MULTIPLY.
+ EVALUATE SPI-Prior-Token
+ WHEN "BY"
+ PERFORM 363-Set-Upd
+ MOVE Sort-Rec TO Held-Reference
+ WHEN "GIVING"
+ MOVE Held-Reference TO Sort-Rec
+ MOVE SPACES TO Held-Reference
+ SR-Ref-Flag
+ RELEASE Sort-Rec
+ PERFORM 362-Release-Upd
+ WHEN OTHER
+ PERFORM 361-Release-Ref
+ END-EVALUATE
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 351-PERFORM.
+ EVALUATE SPI-Prior-Token
+ WHEN "VARYING"
+ PERFORM 362-Release-Upd
+ MOVE SPACES TO SPI-Prior-Token
+ WHEN "AFTER"
+ PERFORM 362-Release-Upd
+ MOVE SPACES TO SPI-Prior-Token
+ WHEN OTHER
+ PERFORM 361-Release-Ref
+ END-EVALUATE
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 351-SET.
+ EVALUATE SPI-Prior-Token
+ WHEN "SET"
+ PERFORM 362-Release-Upd
+ WHEN OTHER
+ PERFORM 361-Release-Ref
+ END-EVALUATE
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 351-STRING.
+ EVALUATE SPI-Prior-Token
+ WHEN "INTO"
+ PERFORM 362-Release-Upd
+ WHEN "POINTER"
+ PERFORM 362-Release-Upd
+ WHEN OTHER
+ PERFORM 361-Release-Ref
+ END-EVALUATE
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 351-SUBTRACT.
+ EVALUATE SPI-Prior-Token
+ WHEN "GIVING"
+ PERFORM 362-Release-Upd
+ WHEN "FROM"
+ PERFORM 362-Release-Upd
+ WHEN OTHER
+ PERFORM 361-Release-Ref
+ END-EVALUATE
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 351-TRANSFORM.
+ EVALUATE SPI-Prior-Token
+ WHEN "TRANSFORM"
+ PERFORM 362-Release-Upd
+ MOVE SPACES TO SPI-Prior-Token
+ WHEN OTHER
+ PERFORM 361-Release-Ref
+ END-EVALUATE
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 351-UNSTRING.
+ EVALUATE SPI-Prior-Token
+ WHEN "INTO"
+ PERFORM 362-Release-Upd
+ WHEN "DELIMITER"
+ PERFORM 362-Release-Upd
+ WHEN "COUNT"
+ PERFORM 362-Release-Upd
+ WHEN "POINTER"
+ PERFORM 362-Release-Upd
+ WHEN "TALLYING"
+ PERFORM 362-Release-Upd
+ WHEN OTHER
+ PERFORM 361-Release-Ref
+ END-EVALUATE
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 360-Release-Def.
+ MOVE SPACES TO Sort-Rec
+ MOVE SPI-Current-Program-ID TO SR-Prog-ID
+ MOVE SPI-Current-Token-UC TO SR-Token-UC
+ MOVE SPI-Current-Token TO SR-Token
+ MOVE SPI-Current-Section TO SR-Section
+ MOVE SPI-Current-Line-No TO SR-Line-No-Def
+ MOVE 0 TO SR-Line-No-Ref
+ RELEASE Sort-Rec
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 361-Release-Ref.
+ PERFORM 364-Set-Ref
+ RELEASE Sort-Rec
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 362-Release-Upd.
+ PERFORM 363-Set-Upd
+ RELEASE Sort-Rec
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 363-Set-Upd.
+ MOVE SPACES TO Sort-Rec
+ MOVE SPI-Current-Program-ID TO SR-Prog-ID
+ MOVE SPI-Current-Token-UC TO SR-Token-UC
+ MOVE SPI-Current-Token TO SR-Token
+ MOVE SPI-Current-Section TO SR-Section
+ MOVE SPI-Current-Line-No TO SR-Line-No-Ref
+ MOVE "*" TO SR-Ref-Flag
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 364-Set-Ref.
+ MOVE SPACES TO Sort-Rec
+ MOVE SPI-Current-Program-ID TO SR-Prog-ID
+ MOVE SPI-Current-Token-UC TO SR-Token-UC
+ MOVE SPI-Current-Token TO SR-Token
+ MOVE SPI-Current-Section TO SR-Section
+ MOVE SPI-Current-Line-No TO SR-Line-No-Ref
+ .
+ /
+ 400-Produce-Xref-Listing SECTION.
+ 401-Init.
+ MOVE SPACES TO Detail-Line-X
+ Group-Indicators
+ MOVE 0 TO I
+ Lines-Left
+GC0710 MOVE 'N' TO F-Duplicate
+ .
+
+ 402-Process-Sorted-Recs.
+ PERFORM FOREVER
+ RETURN Sort-File AT END
+ EXIT PERFORM
+ END-RETURN
+ IF SR-Prog-ID NOT = GI-Prog-ID
+ OR SR-Token-UC NOT = GI-Token
+GC0710 MOVE 'N' TO F-Duplicate
+ IF Detail-Line-X NOT = SPACES
+ PERFORM 410-Generate-Report-Line
+ END-IF
+ IF SR-Prog-ID NOT = GI-Prog-ID
+ MOVE 0 TO Lines-Left
+ END-IF
+ MOVE SR-Prog-ID TO GI-Prog-ID
+ MOVE SR-Token-UC TO GI-Token
+ END-IF
+GC0710 IF SR-Token-UC = GI-Token
+GC0710 AND SR-Line-No-Def NOT = SPACES
+GC0710 AND Detail-Line-X NOT = SPACES
+GC0710 MOVE 'Y' TO F-Duplicate
+GC0710 PERFORM 410-Generate-Report-Line
+GC0710 MOVE 0 TO I
+GC0710 MOVE SR-Prog-ID TO DLX-Prog-ID
+GC0710 MOVE ' (Duplicate Definition)' TO DLX-Token
+GC0710 MOVE SR-Section TO DLX-Section
+GC0710 MOVE SR-Line-No-Def TO DLX-Line-No-Def
+GC0710 EXIT PERFORM CYCLE
+GC0710 END-IF
+GC0710 IF SR-Token-UC = GI-Token
+GC0710 AND SR-Line-No-Def = SPACES
+GC0710 AND F-Duplicate = 'Y'
+GC0710 MOVE 'N' TO F-Duplicate
+GC0710 PERFORM 410-Generate-Report-Line
+GC0710 MOVE 0 TO I
+GC0710 MOVE SR-Prog-ID TO DLX-Prog-ID
+GC0710 MOVE ' (Duplicate References)' TO DLX-Token
+GC0710 END-IF
+ IF Detail-Line-X = SPACES
+ MOVE SR-Prog-ID TO DLX-Prog-ID
+ MOVE SR-Token TO DLX-Token
+ MOVE SR-Section TO DLX-Section
+ IF SR-Line-No-Def NOT = SPACES
+ MOVE SR-Line-No-Def TO DLX-Line-No-Def
+ END-IF
+ END-IF
+ IF SR-Reference > '000000'
+ ADD 1 TO I
+ IF I > Line-Nos-Per-Rec
+ PERFORM 410-Generate-Report-Line
+ MOVE 1 TO I
+ END-IF
+ MOVE SR-Line-No-Ref TO DLX-Line-No-Ref (I)
+ MOVE SR-Ref-Flag TO DLX-Ref-Flag (I)
+ END-IF
+ END-PERFORM
+ IF Detail-Line-X NOT = SPACES
+ PERFORM 410-Generate-Report-Line
+ END-IF
+ EXIT SECTION
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 410-Generate-Report-Line.
+ IF Lines-Left < 1
+ IF F-First-Record = "Y"
+ MOVE "N" TO F-First-Record
+ WRITE Report-Rec FROM Heading-1X BEFORE 1
+ ELSE
+ MOVE SPACES TO Report-Rec
+ WRITE Report-Rec BEFORE PAGE
+ MOVE SPACES TO Report-Rec
+ WRITE Report-Rec BEFORE 1
+ WRITE Report-Rec FROM Heading-1X BEFORE 1
+ END-IF
+ WRITE Report-Rec FROM Heading-2 BEFORE 1
+ WRITE Report-Rec FROM Heading-4X BEFORE 1
+ WRITE Report-Rec FROM Heading-5X BEFORE 1
+ COMPUTE
+ Lines-Left = Lines-Per-Page - 4
+ END-COMPUTE
+ END-IF
+ WRITE Report-Rec FROM Detail-Line-X BEFORE 1
+ MOVE SPACES TO Detail-Line-X
+ MOVE 0 TO I
+ SUBTRACT 1 FROM Lines-Left
+ .
+ /
+ 500-Produce-Source-Listing SECTION.
+ 501-Generate-Source-Listing.
+ OPEN INPUT Source-Code
+ Expand-Code
+ MOVE 0 TO Source-Line-No
+ PERFORM FOREVER
+ READ Expand-Code AT END
+ EXIT PERFORM
+ END-READ
+ IF ECR-1 = "#"
+ PERFORM 510-Control-Record
+ ELSE
+ PERFORM 520-Expand-Code-Record
+ END-IF
+ END-PERFORM
+ CLOSE Source-Code
+ Expand-Code
+ EXIT SECTION
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 510-Control-Record.
+ UNSTRING ECR-2-256
+ DELIMITED BY '"'
+ INTO PIC-X10, PIC-X256, Dummy
+ END-UNSTRING
+ IF TRIM(PIC-X256,Trailing) = TRIM(Program-Path,Trailing) *> Main Pgm
+ SET In-Main-Module TO TRUE
+ IF Source-Line-No > 0
+ READ Expand-Code END-READ
+ END-IF
+ ELSE *> COPY
+ SET In-Copybook TO TRUE
+ END-IF
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 520-Expand-Code-Record.
+ IF In-Main-Module
+ ADD 1 To SPI-Current-Line-No
+ READ Source-Code AT END NEXT SENTENCE END-READ
+ ADD 1 TO Source-Line-No
+ MOVE SPACES TO Detail-Line-S
+ MOVE Source-Line-No TO DLS-Line-No
+ MOVE SCR-1-128 TO DLS-Statement
+GC0410 IF SCR-7 = "/"
+GC0410 MOVE 0 TO Lines-Left
+GC0410 END-IF
+ PERFORM 530-Generate-Source-Line
+ IF SCR-129-256 NOT = SPACES
+ MOVE SPACES TO Detail-Line-S
+ MOVE SCR-129-256 TO DLS-Statement
+ PERFORM 530-Generate-Source-Line
+ END-IF
+ ELSE
+ IF Expand-Code-Rec NOT = SPACES
+ MOVE SPACES TO Detail-Line-S
+ MOVE ECR-1-128 TO DLS-Statement
+ PERFORM 530-Generate-Source-Line
+ IF ECR-129-256 NOT = SPACES
+ MOVE SPACES TO Detail-Line-S
+ MOVE ECR-129-256 TO DLS-Statement
+ PERFORM 530-Generate-Source-Line
+ END-IF
+ END-IF
+ END-IF
+ .
+ *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+ 530-Generate-Source-Line.
+ IF Lines-Left < 1
+ IF F-First-Record = "Y"
+ MOVE "N" TO F-First-Record
+ WRITE Report-Rec FROM Heading-1S BEFORE 1
+ ELSE
+ MOVE SPACES TO Report-Rec
+ WRITE Report-Rec BEFORE PAGE
+ MOVE SPACES TO Report-Rec
+ WRITE Report-Rec BEFORE 1
+ WRITE Report-Rec FROM Heading-1S BEFORE 1
+ END-IF
+ WRITE Report-Rec FROM Heading-2 BEFORE 1
+ WRITE Report-Rec FROM Heading-4S BEFORE 1
+ WRITE Report-Rec FROM Heading-5S BEFORE 1
+ COMPUTE
+ Lines-Left = Lines-Per-Page - 4
+ END-COMPUTE
+ END-IF
+ WRITE Report-Rec FROM Detail-Line-S BEFORE 1
+ MOVE SPACES TO Detail-Line-S
+ SUBTRACT 1 FROM Lines-Left
+ .
+
+ END PROGRAM LISTING.
diff --git a/tests/examplefiles/example.monkey b/tests/examplefiles/example.monkey
new file mode 100644
index 00000000..facd3a73
--- /dev/null
+++ b/tests/examplefiles/example.monkey
@@ -0,0 +1,152 @@
+Strict
+
+' single line comment
+
+#rem
+multi
+line
+comment
+#end
+
+#rem
+nested
+#rem
+multi
+line
+#end
+comment
+#end
+
+Import mojo
+
+Const ONECONST:Int = 1
+Const TWOCONST := 2
+Const THREECONST := 3, FOURCONST:Int = 4
+
+Global someVariable:Int = 4
+
+' sample class from the documentation
+Class Game Extends App
+
+ Function New()
+ End
+
+ Function DrawSpiral(clock)
+ Local w=DeviceWidth/2
+ For Local i#=0 Until w*1.5 Step .2
+ Local x#,y#
+ x=w+i*Sin(i*3+clock)
+ y=w+i*Cos(i*2+clock)
+ DrawRect x,y,1,1
+ Next
+ hitbox.Collide(event.pos)
+ End
+
+ Field updateCount
+
+ Method OnCreate()
+ Print "spiral"
+
+ SetUpdateRate 60
+ End
+
+ Method OnUpdate()
+ updateCount+=1
+ End
+
+ Method OnRender()
+ Cls
+ DrawSpiral updateCount
+ DrawSpiral updateCount*1.1
+ End
+
+End
+
+Class Enemy
+ Method Die () Abstract
+End
+
+' extending
+Class Hoodlum Extends Enemy
+ ' field
+ Field testField:Bool = True
+
+ ' naming class with modulepath
+ Local currentNode:list.Node<Vector2D>
+
+ Method Die ()
+ Print "B'oss, he-- he killed me, b'oss!"
+ End
+End
+
+' extending with generics
+Class VectorNode Extends Node<Vector2D>
+End
+
+' interfaces
+Interface Computer
+ Method Boot ()
+ Method Process ()
+ Method Display ()
+End
+
+Class PC Implements Computer
+End
+
+' array syntax
+Global listOfStuff:String[42]
+Global lessStuff:String[5] = listOfStuff[4..8]
+Global oneStuff:String = listOfStuff[23]
+
+'a comma separated sequence
+Global scores:Int[]=[10,20,30]
+'a comma separated sequence
+Global text:String[]=["Hello","There","World"]
+Global worstCase:worst.List<String[]>
+
+' string type
+Global string1:String = "Hello world"
+Global string2$ = "Hello world"
+
+' escape characers in strings
+Global string3 := "Hello~zWorld"
+Global string4 := "~qHello World~q"
+Global string5 := "~tIndented~n"
+Global string6 := "tilda is wavey... ~~"
+
+' string pseudofunctions
+Print " Hello World ~n".Trim() ' prints "Hello World"
+Print "Hello World".ToUpper() ' prints "HELLO WORLD"
+
+' Boolean shorttype
+Global boolVariable1:Bool = True
+Global boolVariable2? = False
+
+' number formats
+Global hexNum1:Int = $3d0dead
+Global hexNum2% = $CAFEBABE
+
+Global floatNum1:Float = 3.141516
+Global floatNum2# = 3.141516
+Global floatNum3 := .141516
+
+' preprocessor keywords
+#If TARGET = "android"
+DoStuff()
+#ElseIf TARGET = "ios"
+DoOtherStuff()
+#End
+
+' preprocessor variable
+#SOMETHING = True
+#Print SOMETHING
+#If SOMETHING
+#End
+
+' operators
+Global a = 32
+Global b = 32 ~ 0
+b ~= 16
+b |= 16
+b &= 16
+Global c = a | b
diff --git a/tests/examplefiles/example.reg b/tests/examplefiles/example.reg
new file mode 100644
index 00000000..bc4e9df4
--- /dev/null
+++ b/tests/examplefiles/example.reg
@@ -0,0 +1,19 @@
+Windows Registry Editor Version 5.00
+; comment
+
+[HKEY_CURRENT_USER\SOFTWARE\Pygments]
+@="Hello"
+"Key With Spaces"="Something"
+"Key With ="="With Quotes"
+"Key With = 2"=dword:123
+"Key" = "Value"
+"Hex"=hex(0):1,2,3,a,b,f
+"Hex 2"=hex(5):80,00,00,ff
+
+[-HKEY_CURRENT_USER\SOFTWARE\Pygments\Subkey]
+
+[HKEY_CURRENT_USER\SOFTWARE\Pygments\Subkey2]
+; comment
+@=-
+"Foo"=-
+"Foo"="Value"
diff --git a/tests/examplefiles/example.rpf b/tests/examplefiles/example.rpf
new file mode 100644
index 00000000..162b5ed3
--- /dev/null
+++ b/tests/examplefiles/example.rpf
@@ -0,0 +1,4 @@
+declare xyz true
+declare s "some string"
+i = 2
+f = 0.2
diff --git a/tests/examplefiles/example.stan b/tests/examplefiles/example.stan
index e86ae42f..5723403c 100644
--- a/tests/examplefiles/example.stan
+++ b/tests/examplefiles/example.stan
@@ -16,6 +16,7 @@ data {
matrix[3,3] qux;
simplex[3] quux;
ordered[3] corge;
+ positive_ordered[3] wibble;
corr_matrix[3] grault;
cov_matrix[3] garply;
@@ -73,6 +74,11 @@ model {
// normal_log as a function
lp__ <- lp__ + normal_log(plugh, 0, 1);
+ // print statement and string literal
+ print("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_~@#$%^&*`'-+={}[].,;: ");
+ print("Hello, world!");
+ print("");
+
}
generated quantities {
real bar1;
diff --git a/tests/examplefiles/garcia-wachs.kk b/tests/examplefiles/garcia-wachs.kk
new file mode 100644
index 00000000..f766e051
--- /dev/null
+++ b/tests/examplefiles/garcia-wachs.kk
@@ -0,0 +1,123 @@
+/* This is an example in the Koka Language of the Garcia-Wachs algorithm */
+module garcia-wachs
+
+public fun main()
+{
+ test().print
+}
+
+//----------------------------------------------------
+// Trees
+//----------------------------------------------------
+public type tree<a> {
+ con Leaf(value :a)
+ con Node(left :tree<a>, right :tree<a>)
+}
+
+fun show( t : tree<char> ) : string
+{
+ match(t) {
+ Leaf(c) -> Core.show(c)
+ Node(l,r) -> "Node(" + show(l) + "," + show(r) + ")"
+ }
+}
+
+
+//----------------------------------------------------
+// Non empty lists
+//----------------------------------------------------
+public type list1<a> {
+ Cons1( head : a, tail : list<a> )
+}
+
+
+fun map( xs, f ) {
+ val Cons1(y,ys) = xs
+ return Cons1(f(y), Core.map(ys,f))
+}
+
+fun zip( xs :list1<a>, ys :list1<b> ) : list1<(a,b)> {
+ Cons1( (xs.head, ys.head), zip(xs.tail, ys.tail))
+}
+
+
+
+//----------------------------------------------------
+// Phase 1
+//----------------------------------------------------
+
+fun insert( after : list<(tree<a>,int)>, t : (tree<a>,int), before : list<(tree<a>,int)> ) : div tree<a>
+{
+ match(before) {
+ Nil -> extract( [], Cons1(t,after) )
+ Cons(x,xs) -> {
+ if (x.snd < t.snd) then return insert( Cons(x,after), t, xs )
+ match(xs) {
+ Nil -> extract( [], Cons1(x,Cons(t,after)) )
+ Cons(y,ys) -> extract( ys, Cons1(y,Cons(x,Cons(t,after))) )
+ }
+ }
+ }
+}
+
+fun extract( before : list<(tree<a>,int)>, after : list1<(tree<a>,int)> ) : div tree<a>
+{
+ val Cons1((t1,w1) as x, xs ) = after
+ match(xs) {
+ Nil -> t1
+ Cons((t2,w2) as y, ys) -> match(ys) {
+ Nil -> insert( [], (Node(t1,t2), w1+w2), before )
+ Cons((_,w3),_zs) ->
+ if (w1 <= w3)
+ then insert(ys, (Node(t1,t2), w1+w2), before)
+ else extract(Cons(x,before), Cons1(y,ys))
+ }
+ }
+}
+
+
+
+fun balance( xs : list1<(tree<a>,int)> ) : div tree<a>
+{
+ extract( [], xs )
+}
+
+fun mark( depth :int, t :tree<(a,ref<h,int>)> ) : <write<h>> ()
+{
+ match(t) {
+ Leaf((_,d)) -> d := depth
+ Node(l,r) -> { mark(depth+1,l); mark(depth+1,r) }
+ }
+}
+
+
+fun build( depth :int, xs :list1<(a,ref<h,int>)> ) : <read<h>,div> (tree<a>,list<(a,ref<h,int>)>)
+{
+ if (!xs.head.snd == depth) return (Leaf(xs.head.fst), xs.tail)
+
+ l = build(depth+1, xs)
+ match(l.snd) {
+ Nil -> (l.fst, Nil)
+ Cons(y,ys) -> {
+ r = build(depth+1, Cons1(y,ys))
+ (Node(l.fst,r.fst), r.snd)
+ }
+ }
+}
+
+public fun test() {
+ wlist = Cons1(('a',3), [('b',2),('c',1),('d',4),('e',5)])
+ tree = wlist.garciawachs()
+ tree.show()
+}
+
+public fun garciawachs( xs : list1<(a,int)> ) : div tree<a>
+{
+ refs = xs.map(fst).map( fun(x) { (x, ref(0)) } )
+ wleafs = zip( refs.map(Leaf), xs.map(snd) )
+
+ tree = balance(wleafs)
+ mark(0,tree)
+ build(0,refs).fst
+}
+
diff --git a/tests/examplefiles/hello.smali b/tests/examplefiles/hello.smali
new file mode 100644
index 00000000..e539f00e
--- /dev/null
+++ b/tests/examplefiles/hello.smali
@@ -0,0 +1,40 @@
+# To Recreate:
+#
+# echo -e 'class hello {\n public static void main(String[] args) {\n
+# System.out.println("hi");\n }\n}\n' > hello.java
+# javac -target 1.4 -source 1.4 hello.java
+# dx --dex --output=hello.dex hello.class
+# baksmali hello.dex
+# cat out/hello.smali
+
+.class Lhello;
+.super Ljava/lang/Object;
+.source "hello.java"
+
+
+# direct methods
+.method constructor <init>()V
+ .registers 1
+
+ .prologue
+ .line 1
+ invoke-direct {p0}, Ljava/lang/Object;-><init>()V
+
+ return-void
+.end method
+
+.method public static main([Ljava/lang/String;)V
+ .registers 3
+ .parameter
+
+ .prologue
+ .line 3
+ sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;
+
+ const-string v1, "hi"
+
+ invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
+
+ .line 4
+ return-void
+.end method
diff --git a/tests/examplefiles/hello.sp b/tests/examplefiles/hello.sp
new file mode 100644
index 00000000..7102d273
--- /dev/null
+++ b/tests/examplefiles/hello.sp
@@ -0,0 +1,9 @@
+#include <sourcemod>
+
+// Single line comment
+/* Multi line
+ comment */
+
+public OnPluginStart() {
+ PrintToServer("Hello.");
+}
diff --git a/tests/examplefiles/inet_pton6.dg b/tests/examplefiles/inet_pton6.dg
new file mode 100644
index 00000000..4104b3e7
--- /dev/null
+++ b/tests/examplefiles/inet_pton6.dg
@@ -0,0 +1,71 @@
+re = import!
+sys = import!
+
+
+# IPv6address = hexpart [ ":" IPv4address ]
+# IPv4address = 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT
+# hexpart = [ hexseq ] [ "::" [ hexseq ] ]
+# hexseq = hex4 *( ":" hex4)
+# hex4 = 1*4HEXDIG
+hexpart = r'({0}|)(?:::({0}|)|)'.format r'(?:[\da-f]{1,4})(?::[\da-f]{1,4})*'
+addrv4 = r'(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})'
+addrv6 = re.compile $ r'(?i)(?:{})(?::{})?$'.format hexpart addrv4
+
+
+# Parse a base-N number given a list of its digits.
+#
+# :param q: the number of digits in that numeral system
+#
+# :param digits: an iterable of integers in range [0..q]
+#
+# :return: a decimal integer
+#
+base_n = (q digits) -> foldl (x y) -> (x * q + y) 0 digits
+
+
+# Parse a sequence of hexadecimal numbers
+#
+# :param q: a string of colon-separated base-16 integers
+#
+# :return: an iterable of Python ints
+#
+unhex = q -> q and map p -> (int p 16) (q.split ':')
+
+
+# Parse an IPv6 address as specified in RFC 4291.
+#
+# :param address: a string, obviously.
+#
+# :return: an integer which, written in binary form, points to the same node.
+#
+inet_pton6 = address ->
+ raise $ ValueError 'not a valid IPv6 address' if not (match = addrv6.match address)
+ start, end, *ipv4 = match.groups!
+
+ is_ipv4 = not $ None in ipv4
+ shift = (7 - start.count ':' - 2 * is_ipv4) * 16
+
+ raise $ ValueError 'not a valid IPv6 address' if (end is None and shift) or shift < 0
+ hexaddr = (base_n 0x10000 (unhex start) << shift) + base_n 0x10000 (unhex $ end or '')
+ (hexaddr << 32) + base_n 0x100 (map int ipv4) if is_ipv4 else hexaddr
+
+
+inet6_type = q -> switch
+ not q = 'unspecified'
+ q == 1 = 'loopback'
+ (q >> 32) == 0x000000000000ffff = 'IPv4-mapped'
+ (q >> 64) == 0xfe80000000000000 = 'link-local'
+ (q >> 120) != 0x00000000000000ff = 'general unicast'
+ (q >> 112) % (1 << 4) == 0x0000000000000000 = 'multicast w/ reserved scope value'
+ (q >> 112) % (1 << 4) == 0x000000000000000f = 'multicast w/ reserved scope value'
+ (q >> 112) % (1 << 4) == 0x0000000000000001 = 'interface-local multicast'
+ (q >> 112) % (1 << 4) == 0x0000000000000004 = 'admin-local multicast'
+ (q >> 112) % (1 << 4) == 0x0000000000000005 = 'site-local multicast'
+ (q >> 112) % (1 << 4) == 0x0000000000000008 = 'organization-local multicast'
+ (q >> 112) % (1 << 4) == 0x000000000000000e = 'global multicast'
+ (q >> 112) % (1 << 4) != 0x0000000000000002 = 'multicast w/ unknown scope value'
+ (q >> 24) % (1 << 112) == 0x00000000000001ff = 'solicited-node multicast'
+ True = 'link-local multicast'
+
+
+print $ (x -> (inet6_type x, hex x)) $ inet_pton6 $ sys.stdin.read!.strip!
diff --git a/tests/examplefiles/metagrammar.treetop b/tests/examplefiles/metagrammar.treetop
new file mode 100644
index 00000000..acd6af63
--- /dev/null
+++ b/tests/examplefiles/metagrammar.treetop
@@ -0,0 +1,455 @@
+module Treetop
+ module Compiler
+ grammar Metagrammar
+ rule treetop_file
+ requires:(space? require_statement)* prefix:space? module_or_grammar suffix:space? {
+ def compile
+ requires.text_value + prefix.text_value + module_or_grammar.compile + suffix.text_value
+ end
+ }
+ end
+
+ rule require_statement
+ prefix:space? "require" [ \t]+ [^\n\r]+ [\n\r]
+ end
+
+ rule module_or_grammar
+ module_declaration / grammar
+ end
+
+ rule module_declaration
+ prefix:('module' space name:([A-Z] alphanumeric_char* ('::' [A-Z] alphanumeric_char*)*) space) module_contents:(module_declaration / grammar) suffix:(space 'end') {
+ def compile
+ prefix.text_value + module_contents.compile + suffix.text_value
+ end
+
+ def parser_name
+ prefix.name.text_value+'::'+module_contents.parser_name
+ end
+ }
+ end
+
+ rule grammar
+ 'grammar' space grammar_name space ('do' space)? declaration_sequence space? 'end' <Grammar>
+ end
+
+ rule grammar_name
+ ([A-Z] alphanumeric_char*)
+ end
+
+ rule declaration_sequence
+ head:declaration tail:(space declaration)* <DeclarationSequence> {
+ def declarations
+ [head] + tail
+ end
+
+ def tail
+ super.elements.map { |elt| elt.declaration }
+ end
+ }
+ /
+ '' {
+ def compile(builder)
+ end
+ }
+ end
+
+ rule declaration
+ parsing_rule / include_declaration
+ end
+
+ rule include_declaration
+ 'include' space [A-Z] (alphanumeric_char / '::')* {
+ def compile(builder)
+ builder << text_value
+ end
+ }
+ end
+
+ rule parsing_rule
+ 'rule' space nonterminal space ('do' space)? parsing_expression space 'end' <ParsingRule>
+ end
+
+ rule parsing_expression
+ choice / sequence / primary
+ end
+
+ rule choice
+ head:alternative tail:(space? '/' space? alternative)+ <Choice> {
+ def alternatives
+ [head] + tail
+ end
+
+ def tail
+ super.elements.map {|elt| elt.alternative}
+ end
+
+ def inline_modules
+ (alternatives.map {|alt| alt.inline_modules }).flatten
+ end
+ }
+ end
+
+ rule sequence
+ head:labeled_sequence_primary tail:(space labeled_sequence_primary)+ node_class_declarations <Sequence> {
+ def sequence_elements
+ [head] + tail
+ end
+
+ def tail
+ super.elements.map {|elt| elt.labeled_sequence_primary }
+ end
+
+ def inline_modules
+ (sequence_elements.map {|elt| elt.inline_modules}).flatten +
+ [sequence_element_accessor_module] +
+ node_class_declarations.inline_modules
+ end
+
+ def inline_module_name
+ node_class_declarations.inline_module_name
+ end
+ }
+ end
+
+ rule alternative
+ sequence / primary
+ end
+
+ rule primary
+ prefix atomic {
+ def compile(address, builder, parent_expression=nil)
+ prefix.compile(address, builder, self)
+ end
+
+ def prefixed_expression
+ atomic
+ end
+
+ def inline_modules
+ atomic.inline_modules
+ end
+
+ def inline_module_name
+ nil
+ end
+ }
+ /
+ prefix space? predicate_block {
+ def compile(address, builder, parent_expression=nil)
+ prefix.compile(address, builder, self)
+ end
+ def prefixed_expression
+ predicate_block
+ end
+ def inline_modules
+ []
+ end
+ }
+ /
+ atomic suffix node_class_declarations {
+ def compile(address, builder, parent_expression=nil)
+ suffix.compile(address, builder, self)
+ end
+
+ def optional_expression
+ atomic
+ end
+
+ def node_class_name
+ node_class_declarations.node_class_name
+ end
+
+ def inline_modules
+ atomic.inline_modules + node_class_declarations.inline_modules
+ end
+
+ def inline_module_name
+ node_class_declarations.inline_module_name
+ end
+ }
+ /
+ atomic node_class_declarations {
+ def compile(address, builder, parent_expression=nil)
+ atomic.compile(address, builder, self)
+ end
+
+ def node_class_name
+ node_class_declarations.node_class_name
+ end
+
+ def inline_modules
+ atomic.inline_modules + node_class_declarations.inline_modules
+ end
+
+ def inline_module_name
+ node_class_declarations.inline_module_name
+ end
+ }
+ end
+
+ rule labeled_sequence_primary
+ label sequence_primary {
+ def compile(lexical_address, builder)
+ sequence_primary.compile(lexical_address, builder)
+ end
+
+ def inline_modules
+ sequence_primary.inline_modules
+ end
+
+ def label_name
+ if label.name
+ label.name
+ elsif sequence_primary.instance_of?(Nonterminal)
+ sequence_primary.text_value
+ else
+ nil
+ end
+ end
+ }
+ end
+
+ rule label
+ (alpha_char alphanumeric_char*) ':' {
+ def name
+ elements[0].text_value
+ end
+ }
+ /
+ '' {
+ def name
+ nil
+ end
+ }
+ end
+
+ rule sequence_primary
+ prefix atomic {
+ def compile(lexical_address, builder)
+ prefix.compile(lexical_address, builder, self)
+ end
+
+ def prefixed_expression
+ elements[1]
+ end
+
+ def inline_modules
+ atomic.inline_modules
+ end
+
+ def inline_module_name
+ nil
+ end
+ }
+ /
+ prefix space? predicate_block {
+ def compile(address, builder, parent_expression=nil)
+ prefix.compile(address, builder, self)
+ end
+ def prefixed_expression
+ predicate_block
+ end
+ def inline_modules
+ []
+ end
+ }
+ /
+ atomic suffix {
+ def compile(lexical_address, builder)
+ suffix.compile(lexical_address, builder, self)
+ end
+
+ def node_class_name
+ nil
+ end
+
+ def inline_modules
+ atomic.inline_modules
+ end
+
+ def inline_module_name
+ nil
+ end
+ }
+ /
+ atomic
+ end
+
+ rule suffix
+ repetition_suffix / optional_suffix
+ end
+
+ rule optional_suffix
+ '?' <Optional>
+ end
+
+ rule node_class_declarations
+ node_class_expression trailing_inline_module {
+ def node_class_name
+ node_class_expression.node_class_name
+ end
+
+ def inline_modules
+ trailing_inline_module.inline_modules
+ end
+
+ def inline_module
+ trailing_inline_module.inline_module
+ end
+
+ def inline_module_name
+ inline_module.module_name if inline_module
+ end
+ }
+ end
+
+ rule repetition_suffix
+ '+' <OneOrMore> / '*' <ZeroOrMore> / occurrence_range
+ end
+
+ rule occurrence_range
+ space? min:([0-9])* '..' max:([0-9])* <OccurrenceRange>
+ end
+
+ rule prefix
+ '&' <AndPredicate> / '!' <NotPredicate> / '~' <TransientPrefix>
+ end
+
+ rule atomic
+ terminal
+ /
+ nonterminal
+ /
+ parenthesized_expression
+ end
+
+ rule parenthesized_expression
+ '(' space? parsing_expression space? ')' <ParenthesizedExpression> {
+ def inline_modules
+ parsing_expression.inline_modules
+ end
+ }
+ end
+
+ rule nonterminal
+ !keyword_inside_grammar (alpha_char alphanumeric_char*) <Nonterminal>
+ end
+
+ rule terminal
+ quoted_string / character_class / anything_symbol
+ end
+
+ rule quoted_string
+ (single_quoted_string / double_quoted_string) {
+ def string
+ super.text_value
+ end
+ }
+ end
+
+ rule double_quoted_string
+ '"' string:(!'"' ("\\\\" / '\"' / .))* '"' <Terminal>
+ end
+
+ rule single_quoted_string
+ "'" string:(!"'" ("\\\\" / "\\'" / .))* "'" <Terminal>
+ end
+
+ rule character_class
+ '[' characters:(!']' ('\\' . / bracket_expression / !'\\' .))+ ']' <CharacterClass> {
+ def characters
+ super.text_value
+ end
+ }
+ end
+
+ rule bracket_expression
+ '[:' '^'? (
+ 'alnum' / 'alpha' / 'blank' / 'cntrl' / 'digit' / 'graph' / 'lower' /
+ 'print' / 'punct' / 'space' / 'upper' / 'xdigit' / 'word'
+ ) ':]'
+ end
+
+ rule anything_symbol
+ '.' <AnythingSymbol>
+ end
+
+ rule node_class_expression
+ space '<' (!'>' .)+ '>' {
+ def node_class_name
+ elements[2].text_value
+ end
+ }
+ /
+ '' {
+ def node_class_name
+ nil
+ end
+ }
+ end
+
+ rule trailing_inline_module
+ space inline_module {
+ def inline_modules
+ [inline_module]
+ end
+
+ def inline_module_name
+ inline_module.module_name
+ end
+ }
+ /
+ '' {
+ def inline_modules
+ []
+ end
+
+ def inline_module
+ nil
+ end
+
+ def inline_module_name
+ nil
+ end
+ }
+ end
+
+ rule predicate_block
+ '' inline_module <PredicateBlock>
+ end
+
+ rule inline_module
+ '{' (inline_module / ![{}] .)* '}' <InlineModule>
+ end
+
+ rule keyword_inside_grammar
+ ('rule' / 'end') !non_space_char
+ end
+
+ rule non_space_char
+ !space .
+ end
+
+ rule alpha_char
+ [A-Za-z_]
+ end
+
+ rule alphanumeric_char
+ alpha_char / [0-9]
+ end
+
+ rule space
+ (white / comment_to_eol)+
+ end
+
+ rule comment_to_eol
+ '#' (!"\n" .)*
+ end
+
+ rule white
+ [ \t\n\r]
+ end
+ end
+ end
+end
diff --git a/tests/examplefiles/minehunt.qml b/tests/examplefiles/minehunt.qml
new file mode 100644
index 00000000..548e7e89
--- /dev/null
+++ b/tests/examplefiles/minehunt.qml
@@ -0,0 +1,112 @@
+ /****************************************************************************
+ **
+ ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ ** All rights reserved.
+ ** Contact: Nokia Corporation (qt-info@nokia.com)
+ **
+ ** This file is part of the QtDeclarative module of the Qt Toolkit.
+ **
+ ** $QT_BEGIN_LICENSE:LGPL$
+ ** GNU Lesser General Public License Usage
+ ** This file may be used under the terms of the GNU Lesser General Public
+ ** License version 2.1 as published by the Free Software Foundation and
+ ** appearing in the file LICENSE.LGPL included in the packaging of this
+ ** file. Please review the following information to ensure the GNU Lesser
+ ** General Public License version 2.1 requirements will be met:
+ ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+ **
+ ** In addition, as a special exception, Nokia gives you certain additional
+ ** rights. These rights are described in the Nokia Qt LGPL Exception
+ ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+ **
+ ** GNU General Public License Usage
+ ** Alternatively, this file may be used under the terms of the GNU General
+ ** Public License version 3.0 as published by the Free Software Foundation
+ ** and appearing in the file LICENSE.GPL included in the packaging of this
+ ** file. Please review the following information to ensure the GNU General
+ ** Public License version 3.0 requirements will be met:
+ ** http://www.gnu.org/copyleft/gpl.html.
+ **
+ ** Other Usage
+ ** Alternatively, this file may be used in accordance with the terms and
+ ** conditions contained in a signed written agreement between you and Nokia.
+ **
+ **
+ **
+ **
+ **
+ ** $QT_END_LICENSE$
+ **
+ ****************************************************************************/
+
+ import QtQuick 1.0
+ import "MinehuntCore" 1.0
+
+ Item {
+ id: field
+ property int clickx: 0
+ property int clicky: 0
+
+ width: 450; height: 450
+
+ Image { source: "MinehuntCore/pics/background.png"; anchors.fill: parent; fillMode: Image.Tile }
+
+ Grid {
+ anchors.horizontalCenter: parent.horizontalCenter
+ columns: 9; spacing: 1
+
+ Repeater {
+ id: repeater
+ model: tiles
+ delegate: Tile {}
+ }
+ }
+
+ Row {
+ id: gamedata
+ x: 20; spacing: 20
+ anchors.bottom: field.bottom; anchors.bottomMargin: 15
+
+ Image {
+ source: "MinehuntCore/pics/quit.png"
+ scale: quitMouse.pressed ? 0.8 : 1.0
+ smooth: quitMouse.pressed
+ y: 10
+ MouseArea {
+ id: quitMouse
+ anchors.fill: parent
+ anchors.margins: -20
+ onClicked: Qt.quit()
+ }
+ }
+ Column {
+ spacing: 2
+ Image { source: "MinehuntCore/pics/bomb-color.png" }
+ Text { anchors.horizontalCenter: parent.horizontalCenter; color: "white"; text: numMines }
+ }
+
+ Column {
+ spacing: 2
+ Image { source: "MinehuntCore/pics/flag-color.png" }
+ Text { anchors.horizontalCenter: parent.horizontalCenter; color: "white"; text: numFlags }
+ }
+ }
+
+ Image {
+ anchors.bottom: field.bottom; anchors.bottomMargin: 15
+ anchors.right: field.right; anchors.rightMargin: 20
+ source: isPlaying ? 'MinehuntCore/pics/face-smile.png' :
+ hasWon ? 'MinehuntCore/pics/face-smile-big.png': 'MinehuntCore/pics/face-sad.png'
+
+ MouseArea { anchors.fill: parent; onPressed: reset() }
+ }
+ Text {
+ anchors.centerIn: parent; width: parent.width - 20
+ horizontalAlignment: Text.AlignHCenter
+ wrapMode: Text.WordWrap
+ text: "Minehunt demo has to be compiled to run.\n\nPlease see README."
+ color: "white"; font.bold: true; font.pixelSize: 14
+ visible: tiles == undefined
+ }
+
+ }
diff --git a/tests/examplefiles/nanomsg.intr b/tests/examplefiles/nanomsg.intr
new file mode 100644
index 00000000..d21f62cc
--- /dev/null
+++ b/tests/examplefiles/nanomsg.intr
@@ -0,0 +1,95 @@
+module: nanomsg
+synopsis: generated bindings for the nanomsg library
+author: Bruce Mitchener, Jr.
+copyright: See LICENSE file in this distribution.
+
+define simple-C-mapped-subtype <C-buffer-offset> (<C-char*>)
+ export-map <machine-word>, export-function: identity;
+end;
+
+define interface
+ #include {
+ "sp/sp.h",
+ "sp/fanin.h",
+ "sp/inproc.h",
+ "sp/pair.h",
+ "sp/reqrep.h",
+ "sp/survey.h",
+ "sp/fanout.h",
+ "sp/ipc.h",
+ "sp/pubsub.h",
+ "sp/tcp.h"
+ },
+
+ exclude: {
+ "SP_HAUSNUMERO",
+ "SP_PAIR_ID",
+ "SP_PUBSUB_ID",
+ "SP_REQREP_ID",
+ "SP_FANIN_ID",
+ "SP_FANOUT_ID",
+ "SP_SURVEY_ID"
+ },
+
+ equate: {"char *" => <c-string>},
+
+ rename: {
+ "sp_recv" => %sp-recv,
+ "sp_send" => %sp-send,
+ "sp_setsockopt" => %sp-setsockopt
+ };
+
+ function "sp_version",
+ output-argument: 1,
+ output-argument: 2,
+ output-argument: 3;
+
+ function "sp_send",
+ map-argument: { 2 => <C-buffer-offset> };
+
+ function "sp_recv",
+ map-argument: { 2 => <C-buffer-offset> };
+
+end interface;
+
+// Function for adding the base address of the repeated slots of a <buffer>
+// to an offset and returning the result as a <machine-word>. This is
+// necessary for passing <buffer> contents across the FFI.
+
+define function buffer-offset
+ (the-buffer :: <buffer>, data-offset :: <integer>)
+ => (result-offset :: <machine-word>)
+ u%+(data-offset,
+ primitive-wrap-machine-word
+ (primitive-repeated-slot-as-raw
+ (the-buffer, primitive-repeated-slot-offset(the-buffer))))
+end function;
+
+define inline function sp-send (socket :: <integer>, data :: <buffer>, flags :: <integer>) => (res :: <integer>)
+ %sp-send(socket, buffer-offset(data, 0), data.size, flags)
+end;
+
+define inline function sp-recv (socket :: <integer>, data :: <buffer>, flags :: <integer>) => (res :: <integer>)
+ %sp-recv(socket, buffer-offset(data, 0), data.size, flags);
+end;
+
+define inline method sp-setsockopt (socket :: <integer>, level :: <integer>, option :: <integer>, value :: <integer>)
+ with-stack-structure (int :: <C-int*>)
+ pointer-value(int) := value;
+ let setsockopt-result =
+ %sp-setsockopt(socket, level, option, int, size-of(<C-int*>));
+ if (setsockopt-result < 0)
+ // Check error!
+ end;
+ setsockopt-result
+ end;
+end;
+
+define inline method sp-setsockopt (socket :: <integer>, level :: <integer>, option :: <integer>, data :: <byte-string>)
+ let setsockopt-result =
+ %sp-setsockopt(socket, level, option, as(<c-string>, data), data.size);
+ if (setsockopt-result < 0)
+ // Check error!
+ end;
+ setsockopt-result
+end;
diff --git a/tests/examplefiles/phpMyAdmin.spec b/tests/examplefiles/phpMyAdmin.spec
new file mode 100644
index 00000000..120fbc92
--- /dev/null
+++ b/tests/examplefiles/phpMyAdmin.spec
@@ -0,0 +1,163 @@
+%define _myadminpath /var/www/myadmin
+%define pkgrelease rc1
+%define microrelease 1
+
+Name: phpMyAdmin
+Version: 3.1.1
+Release: %{pkgrelease}.%{microrelease}
+License: GPL
+Group: Applications/Databases/Interfaces
+Source0: http://prdownloads.sourceforge.net/phpmyadmin/%{name}-%{version}-%{pkgrelease}.tar.bz2
+Source1: phpMyAdmin-http.conf
+URL: http://sourceforge.net/projects/phpmyadmin/
+Requires: mysql
+Requires: php-mysql
+Buildarch: noarch
+#BuildRoot: %{_tmppath}/%{name}-root
+
+Summary: phpMyAdmin - web-based MySQL administration
+
+%description
+phpMyAdmin can manage a whole MySQL-server (needs a super-user) but
+also a single database. To accomplish the latter you'll need a
+properly set up MySQL-user which can read/write only the desired
+database. It's up to you to look up the appropiate part in the MySQL
+manual. Currently phpMyAdmin can:
+ - create and drop databases
+ - create, copy, drop and alter tables
+ - delete, edit and add fields
+ - execute any SQL-statement, even batch-queries
+ - manage keys on fields
+ - load text files into tables
+ - create (*) and read dumps of tables
+ - export (*) and import data to CSV values
+ - administer multiple servers and single databases
+ - check referencial integrity
+ - create complex queries automatically connecting required tables
+ - create PDF graphics of your database layout
+ - communicate in more than 38 different languages
+
+
+%prep
+%setup -q -n %{name}-%{version}-%{pkgrelease}
+
+
+%build
+
+
+%install
+[ "${RPM_BUILD_ROOT}" != "/" ] && [ -d "${RPM_BUILD_ROOT}" ] && \
+ rm -rf "${RPM_BUILD_ROOT}"
+
+# Create directories.
+
+install -d "${RPM_BUILD_ROOT}%{_myadminpath}"/{css,js,lang,libraries,themes}
+install -d "${RPM_BUILD_ROOT}%{_myadminpath}"/libraries/{auth,dbg,dbi,engines}
+install -d "${RPM_BUILD_ROOT}%{_myadminpath}"/libraries/{export,tcpdf,import}
+install -d "${RPM_BUILD_ROOT}%{_myadminpath}"/libraries/transformations
+install -d "${RPM_BUILD_ROOT}%{_myadminpath}"/libraries/tcpdf/font
+install -d "${RPM_BUILD_ROOT}%{_myadminpath}"/themes/{darkblue_orange,original}
+install -d "${RPM_BUILD_ROOT}%{_myadminpath}"/themes/darkblue_orange/{css,img}
+install -d "${RPM_BUILD_ROOT}%{_myadminpath}"/themes/original/{css,img}
+
+# Install files.
+
+install libraries/config.default.php \
+ "${RPM_BUILD_ROOT}%{_myadminpath}"/config.inc.php
+install *.{php,ico} "${RPM_BUILD_ROOT}%{_myadminpath}"/
+install ChangeLog LICENSE README "${RPM_BUILD_ROOT}%{_myadminpath}"/
+install Documentation.html docs.css "${RPM_BUILD_ROOT}%{_myadminpath}"/
+install css/* "${RPM_BUILD_ROOT}%{_myadminpath}/css"/
+install js/* "${RPM_BUILD_ROOT}%{_myadminpath}/js"/
+install lang/*.php "${RPM_BUILD_ROOT}%{_myadminpath}/lang"/
+install libraries/*.php "${RPM_BUILD_ROOT}%{_myadminpath}/libraries"/
+install libraries/auth/*.php "${RPM_BUILD_ROOT}%{_myadminpath}/libraries/auth"/
+install libraries/dbg/*.php "${RPM_BUILD_ROOT}%{_myadminpath}/libraries/dbg"/
+install libraries/dbi/*.php "${RPM_BUILD_ROOT}%{_myadminpath}/libraries/dbi"/
+install libraries/engines/*.php \
+ "${RPM_BUILD_ROOT}%{_myadminpath}/libraries/engines"/
+install libraries/export/*.php \
+ "${RPM_BUILD_ROOT}%{_myadminpath}/libraries/export"/
+install libraries/tcpdf/*.php "${RPM_BUILD_ROOT}%{_myadminpath}/libraries/tcpdf"/
+install libraries/tcpdf/font/*.{php,z} \
+ "${RPM_BUILD_ROOT}%{_myadminpath}/libraries/tcpdf/font"/
+install libraries/import/*.php \
+ "${RPM_BUILD_ROOT}%{_myadminpath}/libraries/import"/
+install libraries/transformations/*.php \
+ "${RPM_BUILD_ROOT}%{_myadminpath}/libraries/transformations"/
+install themes/darkblue_orange/*.{php,png} \
+ "${RPM_BUILD_ROOT}%{_myadminpath}/themes/darkblue_orange"/
+install themes/darkblue_orange/css/*.php \
+ "${RPM_BUILD_ROOT}%{_myadminpath}/themes/darkblue_orange/css"/
+install themes/darkblue_orange/img/*.{png,ico} \
+ "${RPM_BUILD_ROOT}%{_myadminpath}/themes/darkblue_orange/img"/
+install themes/original/*.{php,png} \
+ "${RPM_BUILD_ROOT}%{_myadminpath}/themes/original"/
+install themes/original/css/*.php \
+ "${RPM_BUILD_ROOT}%{_myadminpath}/themes/original/css"/
+install themes/original/img/*.{png,ico} \
+ "${RPM_BUILD_ROOT}%{_myadminpath}/themes/original/img"/
+
+# Create documentation directories.
+
+DOCROOT="${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}"
+install -d "${DOCROOT}"
+install -d "${DOCROOT}"/{lang,scripts,transformations}
+
+# Install documentation files.
+
+install RELEASE-DATE-* "${DOCROOT}"/
+install CREDITS ChangeLog INSTALL LICENSE "${DOCROOT}"/
+install README TODO "${DOCROOT}"/
+install Documentation.* docs.css "${DOCROOT}"/
+install translators.html "${DOCROOT}"/
+install lang/*.sh "${DOCROOT}"/lang/
+install scripts/* "${DOCROOT}"/scripts/
+install libraries/tcpdf/README "${DOCROOT}"/README.tcpdf
+install libraries/import/README "${DOCROOT}"/README.import
+install libraries/transformations/README "${DOCROOT}"/transformations/
+install libraries/transformations/TEMPLATE* "${DOCROOT}"/transformations/
+install libraries/transformations/*.sh "${DOCROOT}"/transformations/
+
+# Install configuration file for Apache.
+
+install -d "${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d"
+install "%{SOURCE1}" \
+ "${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d/phpMyAdmin.conf"
+
+# Generate non-configuration file list.
+
+(cd "${RPM_BUILD_ROOT}"; ls -d ."%{_myadminpath}"/*) |
+ sed -e '/\/config\.inc\.php$/d' -e 's/^.//' > files.list
+
+
+
+%clean
+[ "${RPM_BUILD_ROOT}" != "/" ] && [ -d "${RPM_BUILD_ROOT}" ] && \
+ rm -rf "${RPM_BUILD_ROOT}"
+
+
+%files -f files.list
+%defattr(644, root, root, 755)
+%doc %{_docdir}/%{name}-%{version}
+%dir %{_myadminpath}
+%attr(640,root,apache) %config(noreplace) %verify(not size mtime md5) %{_myadminpath}/config.inc.php
+%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/conf.d/*
+
+
+%changelog
+* Thu Feb 23 2006 Patrick Monnerat <pm@datasphere.ch>
+- Version 2.8.0-rc1.1.
+
+* Thu Dec 22 2005 Patrick Monnerat <patrick.monnerat@econophone.ch>
+- Path "nullpw" to allow trying connection with null password after failure.
+- Version 2.7.0-pl1.1.
+
+* Mon Aug 22 2005 Patrick Monnerat <patrick.monnerat@econophone.ch>
+- Version 2.6.3-pl1.
+
+* Wed Jul 21 2004 Patrick Monnerat <patrick.monnerat@econophone.ch>
+- Version 2.5.7-pl1.
+
+* Fri Nov 22 2002 Patrick Monnerat <patrick.monnerat@econophone.ch>
+- Version 2.3.0-rc1.
diff --git a/tests/examplefiles/pytb_test3.pytb b/tests/examplefiles/pytb_test3.pytb
new file mode 100644
index 00000000..6947c1ef
--- /dev/null
+++ b/tests/examplefiles/pytb_test3.pytb
@@ -0,0 +1,4 @@
+>>> 3/"3"
+Traceback (most recent call last):
+ File "<stdin>", line 1, in <module>
+TypeError: unsupported operand type(s) for /: 'int' and 'str'
diff --git a/tests/examplefiles/robotframework.txt b/tests/examplefiles/robotframework.txt
new file mode 100644
index 00000000..63ba63e6
--- /dev/null
+++ b/tests/examplefiles/robotframework.txt
@@ -0,0 +1,39 @@
+*** Settings ***
+Documentation Simple example demonstrating syntax highlighting.
+Library ExampleLibrary
+Test Setup Keyword argument argument with ${VARIABLE}
+
+*** Variables ***
+${VARIABLE} Variable value
+@{LIST} List variable here
+
+*** Test Cases ***
+Keyword-driven example
+ Initialize System
+ Do Something
+ Result Should Be 42
+ [Teardown] Cleanup System
+
+Data-driven example
+ [Template] Keyword
+ argument1 argument2
+ argument ${VARIABLE}
+ @{LIST}
+
+Gherkin
+ Given system is initialized
+ When something is done
+ Then result should be "42"
+
+| Pipes |
+| | [Documentation] | Also pipe separated format is supported. |
+| | Log | As this example demonstrates. |
+
+*** Keywords ***
+Result Should Be
+ [Arguments] ${expected}
+ ${actual} = Get Value
+ Should be Equal ${actual} ${expected}
+
+Then result should be "${expected}"
+ Result Should Be ${expected}
diff --git a/tests/examplefiles/rust_example.rs b/tests/examplefiles/rust_example.rs
index af791fbc..1c0a70c3 100644
--- a/tests/examplefiles/rust_example.rs
+++ b/tests/examplefiles/rust_example.rs
@@ -1,743 +1,233 @@
-
-#[doc = "json serialization"];
-
-import result::{result, ok, err};
-import io;
-import io::{reader_util, writer_util};
-import map;
-import map::hashmap;
-
-export json;
-export error;
-export to_writer;
-export to_str;
-export from_reader;
-export from_str;
-export eq;
-
-export num;
-export string;
-export boolean;
-export list;
-export dict;
-export null;
-
-#[doc = "Represents a json value"]
-enum json {
- num(float),
- string(str),
- boolean(bool),
- list([json]),
- dict(map::hashmap<str,json>),
- null,
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// based on:
+// http://shootout.alioth.debian.org/u32/benchmark.php?test=nbody&lang=java
+
+extern mod std;
+
+use core::os;
+
+// Using sqrt from the standard library is way slower than using libc
+// directly even though std just calls libc, I guess it must be
+// because the the indirection through another dynamic linker
+// stub. Kind of shocking. Might be able to make it faster still with
+// an llvm intrinsic.
+#[nolink]
+extern mod libc {
+ #[legacy_exports];
+ fn sqrt(n: float) -> float;
}
-type error = {
- line: uint,
- col: uint,
- msg: str,
-};
-
-#[doc = "Serializes a json value into a io::writer"]
-fn to_writer(wr: io::writer, j: json) {
- alt j {
- num(n) { wr.write_str(float::to_str(n, 6u)); }
- string(s) {
- wr.write_char('"');
- let mut escaped = "";
- str::chars_iter(s) { |c|
- alt c {
- '"' { escaped += "\\\""; }
- '\\' { escaped += "\\\\"; }
- '\x08' { escaped += "\\b"; }
- '\x0c' { escaped += "\\f"; }
- '\n' { escaped += "\\n"; }
- '\r' { escaped += "\\r"; }
- '\t' { escaped += "\\t"; }
- _ { escaped += str::from_char(c); }
- }
- };
- wr.write_str(escaped);
- wr.write_char('"');
- }
- boolean(b) {
- wr.write_str(if b { "true" } else { "false" });
- }
- list(v) {
- wr.write_char('[');
- let mut first = true;
- vec::iter(v) { |item|
- if !first {
- wr.write_str(", ");
- }
- first = false;
- to_writer(wr, item);
- };
- wr.write_char(']');
- }
- dict(d) {
- if d.size() == 0u {
- wr.write_str("{}");
- ret;
- }
-
- wr.write_str("{ ");
- let mut first = true;
- d.items { |key, value|
- if !first {
- wr.write_str(", ");
- }
- first = false;
- to_writer(wr, string(key));
- wr.write_str(": ");
- to_writer(wr, value);
- };
- wr.write_str(" }");
- }
- null {
- wr.write_str("null");
- }
- }
+fn main() {
+ let args = os::args();
+ let args = if os::getenv(~"RUST_BENCH").is_some() {
+ ~[~"", ~"4000000"]
+ } else if args.len() <= 1u {
+ ~[~"", ~"100000"]
+ } else {
+ args
+ };
+ let n = int::from_str(args[1]).get();
+ let mut bodies: ~[Body::props] = NBodySystem::make();
+ io::println(fmt!("%f", NBodySystem::energy(bodies)));
+ let mut i = 0;
+ while i < n {
+ NBodySystem::advance(bodies, 0.01);
+ i += 1;
+ }
+ io::println(fmt!("%f", NBodySystem::energy(bodies)));
}
-#[doc = "Serializes a json value into a string"]
-fn to_str(j: json) -> str {
- io::with_str_writer { |wr| to_writer(wr, j) }
-}
+mod NBodySystem {
+ use Body;
-type parser = {
- rdr: io::reader,
- mut ch: char,
- mut line: uint,
- mut col: uint,
-};
+ pub fn make() -> ~[Body::props] {
+ let mut bodies: ~[Body::props] =
+ ~[Body::sun(),
+ Body::jupiter(),
+ Body::saturn(),
+ Body::uranus(),
+ Body::neptune()];
-impl parser for parser {
- fn eof() -> bool { self.ch == -1 as char }
+ let mut px = 0.0;
+ let mut py = 0.0;
+ let mut pz = 0.0;
- fn bump() {
- self.ch = self.rdr.read_char();
+ let mut i = 0;
+ while i < 5 {
+ px += bodies[i].vx * bodies[i].mass;
+ py += bodies[i].vy * bodies[i].mass;
+ pz += bodies[i].vz * bodies[i].mass;
- if self.ch == '\n' {
- self.line += 1u;
- self.col = 1u;
- } else {
- self.col += 1u;
+ i += 1;
}
- }
- fn next_char() -> char {
- self.bump();
- self.ch
- }
+ // side-effecting
+ Body::offset_momentum(&mut bodies[0], px, py, pz);
- fn error<T>(msg: str) -> result<T, error> {
- err({ line: self.line, col: self.col, msg: msg })
+ return bodies;
}
- fn parse() -> result<json, error> {
- alt self.parse_value() {
- ok(value) {
- // Skip trailing whitespaces.
- self.parse_whitespace();
- // Make sure there is no trailing characters.
- if self.eof() {
- ok(value)
- } else {
- self.error("trailing characters")
+ pub fn advance(bodies: &mut [Body::props], dt: float) {
+ let mut i = 0;
+ while i < 5 {
+ let mut j = i + 1;
+ while j < 5 {
+ advance_one(&mut bodies[i],
+ &mut bodies[j], dt);
+ j += 1;
}
- }
- e { e }
- }
- }
- fn parse_value() -> result<json, error> {
- self.parse_whitespace();
-
- if self.eof() { ret self.error("EOF while parsing value"); }
-
- alt self.ch {
- 'n' { self.parse_ident("ull", null) }
- 't' { self.parse_ident("rue", boolean(true)) }
- 'f' { self.parse_ident("alse", boolean(false)) }
- '0' to '9' | '-' { self.parse_number() }
- '"' {
- alt self.parse_str() {
- ok(s) { ok(string(s)) }
- err(e) { err(e) }
- }
- }
- '[' { self.parse_list() }
- '{' { self.parse_object() }
- _ { self.error("invalid syntax") }
+ i += 1;
}
- }
- fn parse_whitespace() {
- while char::is_whitespace(self.ch) { self.bump(); }
- }
-
- fn parse_ident(ident: str, value: json) -> result<json, error> {
- if str::all(ident, { |c| c == self.next_char() }) {
- self.bump();
- ok(value)
- } else {
- self.error("invalid syntax")
+ i = 0;
+ while i < 5 {
+ move_(&mut bodies[i], dt);
+ i += 1;
}
}
- fn parse_number() -> result<json, error> {
- let mut neg = 1f;
+ pub fn advance_one(bi: &mut Body::props,
+ bj: &mut Body::props,
+ dt: float) unsafe {
+ let dx = bi.x - bj.x;
+ let dy = bi.y - bj.y;
+ let dz = bi.z - bj.z;
- if self.ch == '-' {
- self.bump();
- neg = -1f;
- }
+ let dSquared = dx * dx + dy * dy + dz * dz;
- let mut res = alt self.parse_integer() {
- ok(res) { res }
- err(e) { ret err(e); }
- };
+ let distance = ::libc::sqrt(dSquared);
+ let mag = dt / (dSquared * distance);
- if self.ch == '.' {
- alt self.parse_decimal(res) {
- ok(r) { res = r; }
- err(e) { ret err(e); }
- }
- }
-
- if self.ch == 'e' || self.ch == 'E' {
- alt self.parse_exponent(res) {
- ok(r) { res = r; }
- err(e) { ret err(e); }
- }
- }
+ bi.vx -= dx * bj.mass * mag;
+ bi.vy -= dy * bj.mass * mag;
+ bi.vz -= dz * bj.mass * mag;
- ok(num(neg * res))
+ bj.vx += dx * bi.mass * mag;
+ bj.vy += dy * bi.mass * mag;
+ bj.vz += dz * bi.mass * mag;
}
- fn parse_integer() -> result<float, error> {
- let mut res = 0f;
-
- alt self.ch {
- '0' {
- self.bump();
-
- // There can be only one leading '0'.
- alt self.ch {
- '0' to '9' { ret self.error("invalid number"); }
- _ {}
- }
- }
- '1' to '9' {
- while !self.eof() {
- alt self.ch {
- '0' to '9' {
- res *= 10f;
- res += ((self.ch as int) - ('0' as int)) as float;
-
- self.bump();
- }
- _ { break; }
- }
- }
- }
- _ { ret self.error("invalid number"); }
- }
-
- ok(res)
+ pub fn move_(b: &mut Body::props, dt: float) {
+ b.x += dt * b.vx;
+ b.y += dt * b.vy;
+ b.z += dt * b.vz;
}
- fn parse_decimal(res: float) -> result<float, error> {
- self.bump();
+ pub fn energy(bodies: &[Body::props]) -> float unsafe {
+ let mut dx;
+ let mut dy;
+ let mut dz;
+ let mut distance;
+ let mut e = 0.0;
- // Make sure a digit follows the decimal place.
- alt self.ch {
- '0' to '9' {}
- _ { ret self.error("invalid number"); }
- }
-
- let mut res = res;
- let mut dec = 1f;
- while !self.eof() {
- alt self.ch {
- '0' to '9' {
- dec /= 10f;
- res += (((self.ch as int) - ('0' as int)) as float) * dec;
-
- self.bump();
- }
- _ { break; }
- }
- }
-
- ok(res)
- }
-
- fn parse_exponent(res: float) -> result<float, error> {
- self.bump();
+ let mut i = 0;
+ while i < 5 {
+ e +=
+ 0.5 * bodies[i].mass *
+ (bodies[i].vx * bodies[i].vx + bodies[i].vy * bodies[i].vy
+ + bodies[i].vz * bodies[i].vz);
- let mut res = res;
- let mut exp = 0u;
- let mut neg_exp = false;
+ let mut j = i + 1;
+ while j < 5 {
+ dx = bodies[i].x - bodies[j].x;
+ dy = bodies[i].y - bodies[j].y;
+ dz = bodies[i].z - bodies[j].z;
- alt self.ch {
- '+' { self.bump(); }
- '-' { self.bump(); neg_exp = true; }
- _ {}
- }
-
- // Make sure a digit follows the exponent place.
- alt self.ch {
- '0' to '9' {}
- _ { ret self.error("invalid number"); }
- }
-
- while !self.eof() {
- alt self.ch {
- '0' to '9' {
- exp *= 10u;
- exp += (self.ch as uint) - ('0' as uint);
+ distance = ::libc::sqrt(dx * dx + dy * dy + dz * dz);
+ e -= bodies[i].mass * bodies[j].mass / distance;
- self.bump();
- }
- _ { break; }
+ j += 1;
}
- }
- let exp = float::pow_with_uint(10u, exp);
- if neg_exp {
- res /= exp;
- } else {
- res *= exp;
+ i += 1;
}
+ return e;
- ok(res)
- }
-
- fn parse_str() -> result<str, error> {
- let mut escape = false;
- let mut res = "";
-
- while !self.eof() {
- self.bump();
-
- if (escape) {
- alt self.ch {
- '"' { str::push_char(res, '"'); }
- '\\' { str::push_char(res, '\\'); }
- '/' { str::push_char(res, '/'); }
- 'b' { str::push_char(res, '\x08'); }
- 'f' { str::push_char(res, '\x0c'); }
- 'n' { str::push_char(res, '\n'); }
- 'r' { str::push_char(res, '\r'); }
- 't' { str::push_char(res, '\t'); }
- 'u' {
- // Parse \u1234.
- let mut i = 0u;
- let mut n = 0u;
- while i < 4u {
- alt self.next_char() {
- '0' to '9' {
- n = n * 10u +
- (self.ch as uint) - ('0' as uint);
- }
- _ { ret self.error("invalid \\u escape"); }
- }
- i += 1u;
- }
-
- // Error out if we didn't parse 4 digits.
- if i != 4u {
- ret self.error("invalid \\u escape");
- }
-
- str::push_char(res, n as char);
- }
- _ { ret self.error("invalid escape"); }
- }
- escape = false;
- } else if self.ch == '\\' {
- escape = true;
- } else {
- if self.ch == '"' {
- self.bump();
- ret ok(res);
- }
- str::push_char(res, self.ch);
- }
- }
-
- self.error("EOF while parsing string")
- }
-
- fn parse_list() -> result<json, error> {
- self.bump();
- self.parse_whitespace();
-
- let mut values = [];
-
- if self.ch == ']' {
- self.bump();
- ret ok(list(values));
- }
-
- loop {
- alt self.parse_value() {
- ok(v) { vec::push(values, v); }
- e { ret e; }
- }
-
- self.parse_whitespace();
- if self.eof() {
- ret self.error("EOF while parsing list");
- }
-
- alt self.ch {
- ',' { self.bump(); }
- ']' { self.bump(); ret ok(list(values)); }
- _ { ret self.error("expecting ',' or ']'"); }
- }
- };
- }
-
- fn parse_object() -> result<json, error> {
- self.bump();
- self.parse_whitespace();
-
- let values = map::str_hash();
-
- if self.ch == '}' {
- self.bump();
- ret ok(dict(values));
- }
-
- while !self.eof() {
- self.parse_whitespace();
-
- if self.ch != '"' {
- ret self.error("key must be a string");
- }
-
- let key = alt self.parse_str() {
- ok(key) { key }
- err(e) { ret err(e); }
- };
-
- self.parse_whitespace();
-
- if self.ch != ':' {
- if self.eof() { break; }
- ret self.error("expecting ':'");
- }
- self.bump();
-
- alt self.parse_value() {
- ok(value) { values.insert(key, value); }
- e { ret e; }
- }
- self.parse_whitespace();
-
- alt self.ch {
- ',' { self.bump(); }
- '}' { self.bump(); ret ok(dict(values)); }
- _ {
- if self.eof() { break; }
- ret self.error("expecting ',' or '}'");
- }
- }
- }
-
- ret self.error("EOF while parsing object");
- }
-}
-
-#[doc = "Deserializes a json value from an io::reader"]
-fn from_reader(rdr: io::reader) -> result<json, error> {
- let parser = {
- rdr: rdr,
- mut ch: rdr.read_char(),
- mut line: 1u,
- mut col: 1u,
- };
-
- parser.parse()
-}
-
-#[doc = "Deserializes a json value from a string"]
-fn from_str(s: str) -> result<json, error> {
- io::with_str_reader(s, from_reader)
-}
-
-#[doc = "Test if two json values are equal"]
-fn eq(value0: json, value1: json) -> bool {
- alt (value0, value1) {
- (num(f0), num(f1)) { f0 == f1 }
- (string(s0), string(s1)) { s0 == s1 }
- (boolean(b0), boolean(b1)) { b0 == b1 }
- (list(l0), list(l1)) { vec::all2(l0, l1, eq) }
- (dict(d0), dict(d1)) {
- if d0.size() == d1.size() {
- let mut equal = true;
- d0.items { |k, v0|
- alt d1.find(k) {
- some(v1) {
- if !eq(v0, v1) { equal = false; } }
- none { equal = false; }
- }
- };
- equal
- } else {
- false
- }
- }
- (null, null) { true }
- _ { false }
}
}
-#[cfg(test)]
-mod tests {
- fn mk_dict(items: [(str, json)]) -> json {
- let d = map::str_hash();
-
- vec::iter(items) { |item|
- let (key, value) = item;
- d.insert(key, value);
- };
-
- dict(d)
- }
-
- #[test]
- fn test_write_null() {
- assert to_str(null) == "null";
- }
-
- #[test]
- fn test_write_num() {
- assert to_str(num(3f)) == "3";
- assert to_str(num(3.1f)) == "3.1";
- assert to_str(num(-1.5f)) == "-1.5";
- assert to_str(num(0.5f)) == "0.5";
- }
-
- #[test]
- fn test_write_str() {
- assert to_str(string("")) == "\"\"";
- assert to_str(string("foo")) == "\"foo\"";
- }
-
- #[test]
- fn test_write_bool() {
- assert to_str(boolean(true)) == "true";
- assert to_str(boolean(false)) == "false";
- }
-
- #[test]
- fn test_write_list() {
- assert to_str(list([])) == "[]";
- assert to_str(list([boolean(true)])) == "[true]";
- assert to_str(list([
- boolean(false),
- null,
- list([string("foo\nbar"), num(3.5f)])
- ])) == "[false, null, [\"foo\\nbar\", 3.5]]";
- }
-
- #[test]
- fn test_write_dict() {
- assert to_str(mk_dict([])) == "{}";
- assert to_str(mk_dict([("a", boolean(true))])) == "{ \"a\": true }";
- assert to_str(mk_dict([
- ("a", boolean(true)),
- ("b", list([
- mk_dict([("c", string("\x0c\r"))]),
- mk_dict([("d", string(""))])
- ]))
- ])) ==
- "{ " +
- "\"a\": true, " +
- "\"b\": [" +
- "{ \"c\": \"\\f\\r\" }, " +
- "{ \"d\": \"\" }" +
- "]" +
- " }";
+mod Body {
+ use Body;
+
+ pub const PI: float = 3.141592653589793;
+ pub const SOLAR_MASS: float = 39.478417604357432;
+ // was 4 * PI * PI originally
+ pub const DAYS_PER_YEAR: float = 365.24;
+
+ pub type props =
+ {mut x: float,
+ mut y: float,
+ mut z: float,
+ mut vx: float,
+ mut vy: float,
+ mut vz: float,
+ mass: float};
+
+ pub fn jupiter() -> Body::props {
+ return {mut x: 4.84143144246472090e+00,
+ mut y: -1.16032004402742839e+00,
+ mut z: -1.03622044471123109e-01,
+ mut vx: 1.66007664274403694e-03 * DAYS_PER_YEAR,
+ mut vy: 7.69901118419740425e-03 * DAYS_PER_YEAR,
+ mut vz: -6.90460016972063023e-05 * DAYS_PER_YEAR,
+ mass: 9.54791938424326609e-04 * SOLAR_MASS};
+ }
+
+ pub fn saturn() -> Body::props {
+ return {mut x: 8.34336671824457987e+00,
+ mut y: 4.12479856412430479e+00,
+ mut z: -4.03523417114321381e-01,
+ mut vx: -2.76742510726862411e-03 * DAYS_PER_YEAR,
+ mut vy: 4.99852801234917238e-03 * DAYS_PER_YEAR,
+ mut vz: 2.30417297573763929e-05 * DAYS_PER_YEAR,
+ mass: 2.85885980666130812e-04 * SOLAR_MASS};
+ }
+
+ pub fn uranus() -> Body::props {
+ return {mut x: 1.28943695621391310e+01,
+ mut y: -1.51111514016986312e+01,
+ mut z: -2.23307578892655734e-01,
+ mut vx: 2.96460137564761618e-03 * DAYS_PER_YEAR,
+ mut vy: 2.37847173959480950e-03 * DAYS_PER_YEAR,
+ mut vz: -2.96589568540237556e-05 * DAYS_PER_YEAR,
+ mass: 4.36624404335156298e-05 * SOLAR_MASS};
+ }
+
+ pub fn neptune() -> Body::props {
+ return {mut x: 1.53796971148509165e+01,
+ mut y: -2.59193146099879641e+01,
+ mut z: 1.79258772950371181e-01,
+ mut vx: 2.68067772490389322e-03 * DAYS_PER_YEAR,
+ mut vy: 1.62824170038242295e-03 * DAYS_PER_YEAR,
+ mut vz: -9.51592254519715870e-05 * DAYS_PER_YEAR,
+ mass: 5.15138902046611451e-05 * SOLAR_MASS};
+ }
+
+ pub fn sun() -> Body::props {
+ return {mut x: 0.0,
+ mut y: 0.0,
+ mut z: 0.0,
+ mut vx: 0.0,
+ mut vy: 0.0,
+ mut vz: 0.0,
+ mass: SOLAR_MASS};
+ }
+
+ pub fn offset_momentum(props: &mut Body::props,
+ px: float, py: float, pz: float) {
+ props.vx = -px / SOLAR_MASS;
+ props.vy = -py / SOLAR_MASS;
+ props.vz = -pz / SOLAR_MASS;
}
- #[test]
- fn test_trailing_characters() {
- assert from_str("nulla") ==
- err({line: 1u, col: 5u, msg: "trailing characters"});
- assert from_str("truea") ==
- err({line: 1u, col: 5u, msg: "trailing characters"});
- assert from_str("falsea") ==
- err({line: 1u, col: 6u, msg: "trailing characters"});
- assert from_str("1a") ==
- err({line: 1u, col: 2u, msg: "trailing characters"});
- assert from_str("[]a") ==
- err({line: 1u, col: 3u, msg: "trailing characters"});
- assert from_str("{}a") ==
- err({line: 1u, col: 3u, msg: "trailing characters"});
- }
-
- #[test]
- fn test_read_identifiers() {
- assert from_str("n") ==
- err({line: 1u, col: 2u, msg: "invalid syntax"});
- assert from_str("nul") ==
- err({line: 1u, col: 4u, msg: "invalid syntax"});
-
- assert from_str("t") ==
- err({line: 1u, col: 2u, msg: "invalid syntax"});
- assert from_str("truz") ==
- err({line: 1u, col: 4u, msg: "invalid syntax"});
-
- assert from_str("f") ==
- err({line: 1u, col: 2u, msg: "invalid syntax"});
- assert from_str("faz") ==
- err({line: 1u, col: 3u, msg: "invalid syntax"});
-
- assert from_str("null") == ok(null);
- assert from_str("true") == ok(boolean(true));
- assert from_str("false") == ok(boolean(false));
- assert from_str(" null ") == ok(null);
- assert from_str(" true ") == ok(boolean(true));
- assert from_str(" false ") == ok(boolean(false));
- }
-
- #[test]
- fn test_read_num() {
- assert from_str("+") ==
- err({line: 1u, col: 1u, msg: "invalid syntax"});
- assert from_str(".") ==
- err({line: 1u, col: 1u, msg: "invalid syntax"});
-
- assert from_str("-") ==
- err({line: 1u, col: 2u, msg: "invalid number"});
- assert from_str("00") ==
- err({line: 1u, col: 2u, msg: "invalid number"});
- assert from_str("1.") ==
- err({line: 1u, col: 3u, msg: "invalid number"});
- assert from_str("1e") ==
- err({line: 1u, col: 3u, msg: "invalid number"});
- assert from_str("1e+") ==
- err({line: 1u, col: 4u, msg: "invalid number"});
-
- assert from_str("3") == ok(num(3f));
- assert from_str("3.1") == ok(num(3.1f));
- assert from_str("-1.2") == ok(num(-1.2f));
- assert from_str("0.4") == ok(num(0.4f));
- assert from_str("0.4e5") == ok(num(0.4e5f));
- assert from_str("0.4e+15") == ok(num(0.4e15f));
- assert from_str("0.4e-01") == ok(num(0.4e-01f));
- assert from_str(" 3 ") == ok(num(3f));
- }
-
- #[test]
- fn test_read_str() {
- assert from_str("\"") ==
- err({line: 1u, col: 2u, msg: "EOF while parsing string"});
- assert from_str("\"lol") ==
- err({line: 1u, col: 5u, msg: "EOF while parsing string"});
-
- assert from_str("\"\"") == ok(string(""));
- assert from_str("\"foo\"") == ok(string("foo"));
- assert from_str("\"\\\"\"") == ok(string("\""));
- assert from_str("\"\\b\"") == ok(string("\x08"));
- assert from_str("\"\\n\"") == ok(string("\n"));
- assert from_str("\"\\r\"") == ok(string("\r"));
- assert from_str("\"\\t\"") == ok(string("\t"));
- assert from_str(" \"foo\" ") == ok(string("foo"));
- }
-
- #[test]
- fn test_read_list() {
- assert from_str("[") ==
- err({line: 1u, col: 2u, msg: "EOF while parsing value"});
- assert from_str("[1") ==
- err({line: 1u, col: 3u, msg: "EOF while parsing list"});
- assert from_str("[1,") ==
- err({line: 1u, col: 4u, msg: "EOF while parsing value"});
- assert from_str("[1,]") ==
- err({line: 1u, col: 4u, msg: "invalid syntax"});
- assert from_str("[6 7]") ==
- err({line: 1u, col: 4u, msg: "expecting ',' or ']'"});
-
- assert from_str("[]") == ok(list([]));
- assert from_str("[ ]") == ok(list([]));
- assert from_str("[true]") == ok(list([boolean(true)]));
- assert from_str("[ false ]") == ok(list([boolean(false)]));
- assert from_str("[null]") == ok(list([null]));
- assert from_str("[3, 1]") == ok(list([num(3f), num(1f)]));
- assert from_str("\n[3, 2]\n") == ok(list([num(3f), num(2f)]));
- assert from_str("[2, [4, 1]]") ==
- ok(list([num(2f), list([num(4f), num(1f)])]));
- }
-
- #[test]
- fn test_read_dict() {
- assert from_str("{") ==
- err({line: 1u, col: 2u, msg: "EOF while parsing object"});
- assert from_str("{ ") ==
- err({line: 1u, col: 3u, msg: "EOF while parsing object"});
- assert from_str("{1") ==
- err({line: 1u, col: 2u, msg: "key must be a string"});
- assert from_str("{ \"a\"") ==
- err({line: 1u, col: 6u, msg: "EOF while parsing object"});
- assert from_str("{\"a\"") ==
- err({line: 1u, col: 5u, msg: "EOF while parsing object"});
- assert from_str("{\"a\" ") ==
- err({line: 1u, col: 6u, msg: "EOF while parsing object"});
-
- assert from_str("{\"a\" 1") ==
- err({line: 1u, col: 6u, msg: "expecting ':'"});
- assert from_str("{\"a\":") ==
- err({line: 1u, col: 6u, msg: "EOF while parsing value"});
- assert from_str("{\"a\":1") ==
- err({line: 1u, col: 7u, msg: "EOF while parsing object"});
- assert from_str("{\"a\":1 1") ==
- err({line: 1u, col: 8u, msg: "expecting ',' or '}'"});
- assert from_str("{\"a\":1,") ==
- err({line: 1u, col: 8u, msg: "EOF while parsing object"});
-
- assert eq(result::get(from_str("{}")), mk_dict([]));
- assert eq(result::get(from_str("{\"a\": 3}")),
- mk_dict([("a", num(3.0f))]));
-
- assert eq(result::get(from_str("{ \"a\": null, \"b\" : true }")),
- mk_dict([("a", null), ("b", boolean(true))]));
- assert eq(result::get(from_str("\n{ \"a\": null, \"b\" : true }\n")),
- mk_dict([("a", null), ("b", boolean(true))]));
- assert eq(result::get(from_str("{\"a\" : 1.0 ,\"b\": [ true ]}")),
- mk_dict([
- ("a", num(1.0)),
- ("b", list([boolean(true)]))
- ]));
- assert eq(result::get(from_str(
- "{" +
- "\"a\": 1.0, " +
- "\"b\": [" +
- "true," +
- "\"foo\\nbar\", " +
- "{ \"c\": {\"d\": null} } " +
- "]" +
- "}")),
- mk_dict([
- ("a", num(1.0f)),
- ("b", list([
- boolean(true),
- string("foo\nbar"),
- mk_dict([
- ("c", mk_dict([("d", null)]))
- ])
- ]))
- ]));
- }
-
- #[test]
- fn test_multiline_errors() {
- assert from_str("{\n \"foo\":\n \"bar\"") ==
- err({line: 3u, col: 8u, msg: "EOF while parsing object"});
- }
}
diff --git a/tests/examplefiles/test2.pypylog b/tests/examplefiles/test2.pypylog
new file mode 100644
index 00000000..543e21dd
--- /dev/null
+++ b/tests/examplefiles/test2.pypylog
@@ -0,0 +1,120 @@
+[2f1dd6c3b8b7] {jit-log-opt-loop
+# Loop 0 (<Function object at 0xb720e550> ds1dr4 dsdr3 ds1dr4) : loop with 115 ops
+[p0, p1]
++33: label(p0, p1, descr=TargetToken(-1223434224))
+debug_merge_point(0, 0, '<Function object at 0xb710b120> ds1dr4 dsdr3 ds1dr4')
++33: guard_nonnull_class(p1, 138371488, descr=<Guard2>) [p1, p0]
++54: p3 = getfield_gc_pure(p1, descr=<FieldP pyhaskell.interpreter.haskell.Substitution.inst_rhs 8>)
++57: guard_value(p3, ConstPtr(ptr4), descr=<Guard3>) [p1, p0, p3]
++69: p5 = getfield_gc_pure(p1, descr=<FieldP pyhaskell.interpreter.haskell.Substitution.inst_subst 12>)
++72: p7 = getarrayitem_gc(p5, 0, descr=<ArrayP 4>)
++75: guard_class(p7, 138371552, descr=<Guard4>) [p0, p5, p7]
++88: p9 = getfield_gc(p7, descr=<FieldP pyhaskell.interpreter.haskell.Thunk.inst_application 8>)
++91: guard_nonnull_class(p9, 138373024, descr=<Guard5>) [p0, p5, p7, p9]
++109: p12 = getarrayitem_gc(p5, 1, descr=<ArrayP 4>)
++112: guard_class(p12, 138371552, descr=<Guard6>) [p0, p5, p12, p7]
++125: p14 = getfield_gc(p12, descr=<FieldP pyhaskell.interpreter.haskell.Thunk.inst_application 8>)
++128: guard_nonnull_class(p14, 138373024, descr=<Guard7>) [p0, p5, p12, p14, p7]
+debug_merge_point(0, 0, 'None')
+debug_merge_point(0, 0, 'None')
++146: p16 = getfield_gc_pure(p9, descr=<FieldP pyhaskell.interpreter.haskell.Application.inst_function 8>)
++149: guard_value(p16, ConstPtr(ptr17), descr=<Guard8>) [p16, p9, p0, p12, p7]
++161: p18 = getfield_gc_pure(p9, descr=<FieldP pyhaskell.interpreter.haskell.Application3.inst_arg0 12>)
++164: guard_class(p18, 138371648, descr=<Guard9>) [p18, p9, p0, p12, p7]
++177: p20 = getfield_gc_pure(p9, descr=<FieldP pyhaskell.interpreter.haskell.Application3.inst_arg1 16>)
++180: guard_class(p20, 138371648, descr=<Guard10>) [p20, p9, p18, p0, p12, p7]
++193: p22 = getfield_gc_pure(p9, descr=<FieldP pyhaskell.interpreter.haskell.Application3.inst_arg2 20>)
++196: guard_class(p22, 138371936, descr=<Guard11>) [p22, p9, p20, p18, p0, p12, p7]
+debug_merge_point(0, 0, 'None')
++209: p24 = getfield_gc_pure(p22, descr=<FieldP pyhaskell.interpreter.haskell.Application.inst_function 8>)
++215: guard_value(p24, ConstPtr(ptr25), descr=<Guard12>) [p24, p22, p9, None, None, p0, p12, p7]
++227: p27 = getfield_gc_pure(p22, descr=<FieldP pyhaskell.interpreter.haskell.Application1.inst_arg0 12>)
++230: guard_class(p27, 138371648, descr=<Guard13>) [p22, p27, p9, None, None, p0, p12, p7]
+debug_merge_point(0, 0, '_')
+debug_merge_point(0, 0, 'None')
++243: p30 = getfield_gc(ConstPtr(ptr29), descr=<FieldP pyhaskell.interpreter.module.CoreMod.inst_qvars 24>)
++249: i34 = call(ConstClass(ll_dict_lookup_trampoline__v64___simple_call__function_ll), p30, ConstPtr(ptr32), 360200661, descr=<Calli 4 rri EF=4>)
++281: guard_no_exception(, descr=<Guard14>) [p27, p20, p18, i34, p30, None, None, None, p0, p12, p7]
++294: i36 = int_and(i34, -2147483648)
++302: i37 = int_is_true(i36)
+guard_false(i37, descr=<Guard15>) [p27, p20, p18, i34, p30, None, None, None, p0, p12, p7]
++311: p38 = getfield_gc(p30, descr=<FieldP dicttable.entries 12>)
++314: p39 = getinteriorfield_gc(p38, i34, descr=<InteriorFieldDescr <FieldP dictentry.value 4>>)
++318: i40 = instance_ptr_eq(p18, p39)
+guard_true(i40, descr=<Guard16>) [p27, p20, None, None, None, p0, p12, p7]
+debug_merge_point(0, 0, 'None')
++327: i41 = getfield_gc_pure(p20, descr=<FieldS pyhaskell.interpreter.primtype.Int.inst_value 8>)
++330: i42 = getfield_gc_pure(p27, descr=<FieldS pyhaskell.interpreter.primtype.Int.inst_value 8>)
++333: i43 = int_sub(i41, i42)
+debug_merge_point(0, 0, 'None')
+debug_merge_point(0, 0, 'None')
+debug_merge_point(0, 0, 'None')
++335: i45 = int_eq(0, i43)
+guard_false(i45, descr=<Guard17>) [p0, i43, None, None, None, None, p12, p7]
+p47 = new_with_vtable(138371648)
++393: setfield_gc(p47, i43, descr=<FieldS pyhaskell.interpreter.primtype.Int.inst_value 8>)
+setfield_gc(p7, p47, descr=<FieldP pyhaskell.interpreter.haskell.Thunk.inst_application 8>)
++414: p48 = getfield_gc(p12, descr=<FieldP pyhaskell.interpreter.haskell.Thunk.inst_application 8>)
++420: guard_nonnull_class(p48, 138371648, descr=<Guard18>) [p0, p48, p12, p47, p7]
+debug_merge_point(0, 0, '<PrimFunction object at 0x83f3f6c> 1 <Function object at 0xb710b3b0> 1 <Function object at 0xb710b3c0> <PrimFunction object at 0x83f3f3c> 1 dsdr3 <Function object at 0xb710b210> 1')
+debug_merge_point(0, 0, 'None')
+debug_merge_point(0, 0, '_')
+debug_merge_point(0, 0, 'None')
+debug_merge_point(0, 0, 'None')
+debug_merge_point(0, 0, '<Function object at 0xb710b3d0> dsdr3 dsdr3')
+debug_merge_point(0, 0, '<Function object at 0xb710b120> ds1dr4 dsdr3 ds1dr4')
++438: label(p0, p48, p30, p38, descr=TargetToken(-1223434176))
+debug_merge_point(0, 0, '<Function object at 0xb710b120> ds1dr4 dsdr3 ds1dr4')
+debug_merge_point(0, 0, 'None')
+debug_merge_point(0, 0, 'None')
+debug_merge_point(0, 0, 'None')
+debug_merge_point(0, 0, '_')
+debug_merge_point(0, 0, 'None')
++438: i50 = call(ConstClass(ll_dict_lookup_trampoline__v64___simple_call__function_ll), p30, ConstPtr(ptr32), 360200661, descr=<Calli 4 rri EF=4>)
++464: guard_no_exception(, descr=<Guard19>) [p48, i50, p30, p0]
++477: i51 = int_and(i50, -2147483648)
++485: i52 = int_is_true(i51)
+guard_false(i52, descr=<Guard20>) [p48, i50, p30, p0]
++494: p53 = getinteriorfield_gc(p38, i50, descr=<InteriorFieldDescr <FieldP dictentry.value 4>>)
++501: i55 = instance_ptr_eq(ConstPtr(ptr54), p53)
+guard_true(i55, descr=<Guard21>) [p48, p0]
+debug_merge_point(0, 0, 'None')
++513: i56 = getfield_gc_pure(p48, descr=<FieldS pyhaskell.interpreter.primtype.Int.inst_value 8>)
++516: i58 = int_sub(i56, 1)
+debug_merge_point(0, 0, 'None')
+debug_merge_point(0, 0, 'None')
+debug_merge_point(0, 0, 'None')
++519: i59 = int_eq(0, i58)
+guard_false(i59, descr=<Guard22>) [i58, p48, p0]
+debug_merge_point(0, 0, '<PrimFunction object at 0x83f3f6c> 1 <Function object at 0xb710b3b0> 1 <Function object at 0xb710b3c0> <PrimFunction object at 0x83f3f3c> 1 dsdr3 <Function object at 0xb710b210> 1')
+debug_merge_point(0, 0, 'None')
+debug_merge_point(0, 0, '_')
+debug_merge_point(0, 0, 'None')
+debug_merge_point(0, 0, 'None')
+debug_merge_point(0, 0, '<Function object at 0xb710b3d0> dsdr3 dsdr3')
+debug_merge_point(0, 0, '<Function object at 0xb710b120> ds1dr4 dsdr3 ds1dr4')
+p61 = new_with_vtable(138371700)
+p63 = new_with_vtable(138373024)
+p65 = new_with_vtable(138371936)
++606: setfield_gc(p63, ConstPtr(ptr66), descr=<FieldP pyhaskell.interpreter.haskell.Application.inst_function 8>)
+p68 = new_with_vtable(138373024)
++632: setfield_gc(p65, ConstPtr(ptr69), descr=<FieldP pyhaskell.interpreter.haskell.Application.inst_function 8>)
+p71 = new_with_vtable(138371936)
++658: setfield_gc(p68, ConstPtr(ptr17), descr=<FieldP pyhaskell.interpreter.haskell.Application.inst_function 8>)
++665: setfield_gc(p71, ConstPtr(ptr72), descr=<FieldP pyhaskell.interpreter.haskell.Application1.inst_arg0 12>)
++672: setfield_gc(p68, p71, descr=<FieldP pyhaskell.interpreter.haskell.Application3.inst_arg2 20>)
++675: setfield_gc(p68, p48, descr=<FieldP pyhaskell.interpreter.haskell.Application3.inst_arg1 16>)
++678: setfield_gc(p68, ConstPtr(ptr54), descr=<FieldP pyhaskell.interpreter.haskell.Application3.inst_arg0 12>)
+p73 = new_with_vtable(138371648)
++701: setfield_gc(p61, p0, descr=<FieldP pyhaskell.interpreter.haskell.StackElement.inst_next 8>)
++716: setfield_gc(p61, 2, descr=<FieldS pyhaskell.interpreter.haskell.CopyStackElement.inst_index 16>)
++723: setfield_gc(p71, ConstPtr(ptr25), descr=<FieldP pyhaskell.interpreter.haskell.Application.inst_function 8>)
++730: setfield_gc(p65, p68, descr=<FieldP pyhaskell.interpreter.haskell.Application1.inst_arg0 12>)
++733: setfield_gc(p63, p65, descr=<FieldP pyhaskell.interpreter.haskell.Application3.inst_arg2 20>)
++736: setfield_gc(p63, ConstPtr(ptr75), descr=<FieldP pyhaskell.interpreter.haskell.Application3.inst_arg1 16>)
++743: setfield_gc(p63, ConstPtr(ptr54), descr=<FieldP pyhaskell.interpreter.haskell.Application3.inst_arg0 12>)
++750: setfield_gc(p61, p63, descr=<FieldP pyhaskell.interpreter.haskell.CopyStackElement.inst_application 12>)
++753: setfield_gc(p73, i58, descr=<FieldS pyhaskell.interpreter.primtype.Int.inst_value 8>)
++762: jump(p61, p73, p30, p38, descr=TargetToken(-1223434176))
++775: --end of the loop--
+[2f1dd6da3b99] jit-log-opt-loop}
diff --git a/tests/examplefiles/unix-io.lid b/tests/examplefiles/unix-io.lid
new file mode 100644
index 00000000..617fcaa4
--- /dev/null
+++ b/tests/examplefiles/unix-io.lid
@@ -0,0 +1,37 @@
+Library: io
+Synopsis: A portable IO library
+Author: Gail Zacharias
+Files: library
+ streams/defs
+ streams/stream
+ streams/sequence-stream
+ streams/native-buffer
+ streams/buffer
+ streams/typed-stream
+ streams/external-stream
+ streams/buffered-stream
+ streams/convenience
+ streams/wrapper-stream
+ streams/cleanup-streams
+ streams/native-speed
+ streams/async-writes
+ streams/file-stream
+ streams/multi-buffered-streams
+ pprint
+ print
+ print-double-integer-kludge
+ format
+ buffered-format
+ format-condition
+ unix-file-accessor
+ unix-standard-io
+ unix-interface
+ format-out
+C-Source-Files: unix-portability.c
+Major-Version: 2
+Minor-Version: 1
+Target-Type: dll
+Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc.
+ All rights reserved.
+License: See License.txt in this distribution for details.
+Warranty: Distributed WITHOUT WARRANTY OF ANY KIND
diff --git a/tests/old_run.py b/tests/old_run.py
index 7929d743..4f7cef16 100644
--- a/tests/old_run.py
+++ b/tests/old_run.py
@@ -8,7 +8,7 @@
python run.py [testfile ...]
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/tests/run.py b/tests/run.py
index ef92fe09..b7308a31 100644
--- a/tests/run.py
+++ b/tests/run.py
@@ -8,7 +8,7 @@
python run.py [testfile ...]
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/tests/test_basic_api.py b/tests/test_basic_api.py
index bc4eb771..f6643308 100644
--- a/tests/test_basic_api.py
+++ b/tests/test_basic_api.py
@@ -3,7 +3,7 @@
Pygments basic API tests
~~~~~~~~~~~~~~~~~~~~~~~~
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -93,7 +93,7 @@ def test_lexer_options():
'PythonConsoleLexer', 'RConsoleLexer', 'RubyConsoleLexer',
'SqliteConsoleLexer', 'MatlabSessionLexer', 'ErlangShellLexer',
'BashSessionLexer', 'LiterateHaskellLexer', 'PostgresConsoleLexer',
- 'ElixirConsoleLexer', 'JuliaConsoleLexer'):
+ 'ElixirConsoleLexer', 'JuliaConsoleLexer', 'RobotFrameworkLexer'):
inst = cls(ensurenl=False)
ensure(inst.get_tokens('a\nb'), 'a\nb')
inst = cls(ensurenl=False, stripall=True)
diff --git a/tests/test_clexer.py b/tests/test_clexer.py
index 08fb42cf..8b37bf57 100644
--- a/tests/test_clexer.py
+++ b/tests/test_clexer.py
@@ -3,7 +3,7 @@
Basic CLexer Test
~~~~~~~~~~~~~~~~~
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py
index 56036183..5ad815c0 100644
--- a/tests/test_cmdline.py
+++ b/tests/test_cmdline.py
@@ -3,7 +3,7 @@
Command line test
~~~~~~~~~~~~~~~~~
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/tests/test_examplefiles.py b/tests/test_examplefiles.py
index 41acf4ef..d785cf3b 100644
--- a/tests/test_examplefiles.py
+++ b/tests/test_examplefiles.py
@@ -3,7 +3,7 @@
Pygments tests with example files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -58,6 +58,8 @@ def check_lexer(lx, absfn, outfn):
text = text.strip(b('\n')) + b('\n')
try:
text = text.decode('utf-8')
+ if text.startswith(u'\ufeff'):
+ text = text[len(u'\ufeff'):]
except UnicodeError:
text = text.decode('latin1')
ntext = []
diff --git a/tests/test_html_formatter.py b/tests/test_html_formatter.py
index 284a6c75..96273638 100644
--- a/tests/test_html_formatter.py
+++ b/tests/test_html_formatter.py
@@ -3,7 +3,7 @@
Pygments HTML formatter tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/tests/test_latex_formatter.py b/tests/test_latex_formatter.py
index 8412ec41..06a74c3d 100644
--- a/tests/test_latex_formatter.py
+++ b/tests/test_latex_formatter.py
@@ -3,7 +3,7 @@
Pygments LaTeX formatter tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/tests/test_perllexer.py b/tests/test_perllexer.py
index b9c3cb74..315b20e3 100644
--- a/tests/test_perllexer.py
+++ b/tests/test_perllexer.py
@@ -3,7 +3,7 @@
Pygments regex lexer tests
~~~~~~~~~~~~~~~~~~~~~~~~~~
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/tests/test_regexlexer.py b/tests/test_regexlexer.py
index b1392d3a..28d9689b 100644
--- a/tests/test_regexlexer.py
+++ b/tests/test_regexlexer.py
@@ -3,7 +3,7 @@
Pygments regex lexer tests
~~~~~~~~~~~~~~~~~~~~~~~~~~
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/tests/test_token.py b/tests/test_token.py
index a9d1edeb..6a5b00b7 100644
--- a/tests/test_token.py
+++ b/tests/test_token.py
@@ -3,7 +3,7 @@
Test suite for the token module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/tests/test_using_api.py b/tests/test_using_api.py
index 83d3f18e..bb89d1e2 100644
--- a/tests/test_using_api.py
+++ b/tests/test_using_api.py
@@ -3,7 +3,7 @@
Pygments tests for using()
~~~~~~~~~~~~~~~~~~~~~~~~~~
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
diff --git a/tests/test_util.py b/tests/test_util.py
index be1662f9..dbbc66ce 100644
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -3,7 +3,7 @@
Test suite for the util module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -98,8 +98,10 @@ class UtilTest(unittest.TestCase):
self.assertTrue(util.shebang_matches('#!C:\\Python2.4\\Python.exe',
r'python(2\.\d)?'))
- self.assertFalse(util.shebang_matches('#!/usr/bin/python-ruby', r'python(2\.\d)?'))
- self.assertFalse(util.shebang_matches('#!/usr/bin/python/ruby', r'python(2\.\d)?'))
+ self.assertFalse(util.shebang_matches('#!/usr/bin/python-ruby',
+ r'python(2\.\d)?'))
+ self.assertFalse(util.shebang_matches('#!/usr/bin/python/ruby',
+ r'python(2\.\d)?'))
self.assertFalse(util.shebang_matches('#!', r'python'))
def test_doctype_matches(self):
@@ -131,4 +133,3 @@ class UtilTest(unittest.TestCase):
m = r.match(first_non_bmp * 2)
self.assertTrue(m)
self.assertEquals(m.end(), len(first_non_bmp) * 2)
-