Merge pie-platform-release to aosp-master - DO NOT MERGE

Change-Id: I8aed6ae19ef7a6a5b744aa6f5a4e6ca9de2e8eb4
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..cceb80d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,30 @@
+# Maven build folders
+target/
+
+# IntelliJ project files
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# Eclipse project files
+.project
+.classpath
+.settings/
+
+# NetBeans user configuration
+nbactions.xml
+nb-configuration.xml
+
+# Python runtime files
+*.py[co]
+
+# ANTLR C# target build folders
+/runtime/CSharp3/Sources/Antlr3.Runtime/bin/
+/runtime/CSharp3/Sources/Antlr3.Runtime/obj/
+/runtime/CSharp3/Sources/Antlr3.Runtime.Debug/bin/
+/runtime/CSharp3/Sources/Antlr3.Runtime.Debug/obj/
+/runtime/CSharp3/Sources/Antlr3.Runtime.JavaExtensions/bin/
+/runtime/CSharp3/Sources/Antlr3.Runtime.JavaExtensions/obj/
+/runtime/CSharp3/Sources/Antlr3.Runtime.Test/bin/
+/runtime/CSharp3/Sources/Antlr3.Runtime.Test/obj/
diff --git a/Android.bp b/Android.bp
index 104331d..c51b357 100644
--- a/Android.bp
+++ b/Android.bp
@@ -14,7 +14,10 @@
 
 java_library_host {
     name: "antlr-runtime",
-    srcs: ["antlr-3.4/runtime/Java/src/main/java/**/*.java"],
+    srcs: ["runtime/Java/src/main/java/**/*.java"],
     //Remove DOTTreeGenerator.java, so that we don't have the StringTemplate library as a dependency
-    exclude_srcs: ["antlr-3.4/runtime/Java/src/main/java/org/antlr/runtime/tree/DOTTreeGenerator.java"],
+    exclude_srcs: ["runtime/Java/src/main/java/org/antlr/runtime/tree/DOTTreeGenerator.java"],
+    errorprone: {
+        javacflags: ["-Xep:MissingOverride:OFF"],  // b/73499927
+    },
 }
diff --git a/BUILD.txt b/BUILD.txt
new file mode 100644
index 0000000..d0d1b16
--- /dev/null
+++ b/BUILD.txt
@@ -0,0 +1,6 @@
+We have moved instructions for building ANTLR with the maven build system to:
+
+http://www.antlr.org/wiki/display/ANTLR3/Building+ANTLR+with+Maven
+
+The notes are by Jim Idle (and are a bit out of date but we hope to
+update them).
diff --git a/METADATA b/METADATA
new file mode 100644
index 0000000..a19780f
--- /dev/null
+++ b/METADATA
@@ -0,0 +1,18 @@
+name: "antlr3"
+description: "ANTLR (ANother Tool for Language Recognition) is a language tool that provides a framework for constructing recognizers, interpreters, compilers, and translators from grammatical descriptions containing actions in a variety of target languages."
+third_party {
+  url {
+    type: HOMEPAGE
+    value: "https://github.com/antlr/antlr3"
+  }
+  url {
+    type: ARCHIVE
+    value: "https://github.com/antlr/antlr3/archive/3.5.2.zip"
+  }
+  version: "3.5.2"
+  last_upgrade_date {
+    year: 2018
+    month: 8
+    day: 28
+  }
+}
diff --git a/README.txt b/README.txt
new file mode 100644
index 0000000..c2fa6c4
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,142 @@
+ANTLR v3.5
+January 4, 2013
+
+Terence Parr, parrt at cs usfca edu
+ANTLR project lead and supreme dictator for life
+University of San Francisco
+
+INTRODUCTION
+
+Welcome to ANTLR v3!  ANTLR (ANother Tool for Language Recognition) is
+a language tool that provides a framework for constructing
+recognizers, interpreters, compilers, and translators from grammatical
+descriptions containing actions in a variety of target
+languages. ANTLR provides excellent support for tree construction,
+tree walking, translation, error recovery, and error reporting. I've
+been working on parser generators for 25 years and on this particular
+version of ANTLR for 9 years.
+
+You should use v3 in conjunction with ANTLRWorks:
+
+    http://www.antlr.org/works/index.html
+
+and gUnit (grammar unit testing tool included in distribution):
+
+    http://www.antlr.org/wiki/display/ANTLR3/gUnit+-+Grammar+Unit+Testing
+
+The book will also help you a great deal (printed May 15, 2007); you
+can also buy the PDF:
+
+    http://www.pragmaticprogrammer.com/titles/tpantlr/index.html
+
+2nd book, Language Implementation Patterns:
+
+    http://pragprog.com/titles/tpdsl/language-implementation-patterns
+
+See the getting started document:
+
+    http://www.antlr.org/wiki/display/ANTLR3/FAQ+-+Getting+Started
+
+You also have the examples plus the source to guide you.
+
+See the wiki FAQ:
+
+    http://www.antlr.org/wiki/display/ANTLR3/ANTLR+v3+FAQ
+
+and general doc root:
+
+    http://www.antlr.org/wiki/display/ANTLR3/ANTLR+3+Wiki+Home
+
+Please help add/update FAQ entries.
+
+If all else fails, you can buy support or ask the antlr-interest list:
+
+    http://www.antlr.org/support.html
+
+Per the license in LICENSE.txt, this software is not guaranteed to
+work and might even destroy all life on this planet:
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+
+EXAMPLES
+
+ANTLR v3 sample grammars:
+
+    https://github.com/antlr/examples-v3
+
+Examples from Language Implementation Patterns:
+
+    http://www.pragprog.com/titles/tpdsl/source_code
+
+----------------------------------------------------------------------
+
+What is ANTLR?
+
+ANTLR stands for (AN)other (T)ool for (L)anguage (R)ecognition
+and generates LL(*) recursive-descent parsers. ANTLR is a language tool
+that provides a framework for constructing recognizers, compilers, and
+translators from grammatical descriptions containing actions.
+Target language list:
+
+http://www.antlr.org/wiki/display/ANTLR3/Code+Generation+Targets
+
+----------------------------------------------------------------------
+
+How is ANTLR v3 different than ANTLR v2?
+
+See "What is the difference between ANTLR v2 and v3?"
+
+    http://www.antlr.org/wiki/pages/viewpage.action?pageId=719
+
+See migration guide:
+
+    http://www.antlr.org/wiki/display/ANTLR3/Migrating+from+ANTLR+2+to+ANTLR+3
+
+----------------------------------------------------------------------
+
+How do I install this damn thing?
+
+You will have grabbed either of these:
+
+	http://antlr.org/download/antlr-3.5-complete-no-st3.jar
+	http://antlr.org/download/antlr-3.5-complete.jar
+
+It has all of the jars you need combined into one. Then you need to
+add antlr-3.5-complete.jar to your CLASSPATH or add to arg list; e.g., on unix:
+
+$ java -cp "/usr/local/lib/antlr-3.5-complete.jar:$CLASSPATH" org.antlr.Tool Test.g
+
+Source + java binaries: Just untar antlr-3.5.tar.gz and you'll get:
+
+antlr-3.5/BUILD.txt
+antlr-3.5/antlr3-maven-plugin
+antlr-3.5/antlrjar.xml
+antlr-3.5/antlrsources.xml
+antlr-3.5/gunit
+antlr-3.5/gunit-maven-plugin
+antlr-3.5/pom.xml
+antlr-3.5/runtime
+antlr-3.5/tool
+antlr-3.5/lib
+
+Please see the FAQ
+
+    http://www.antlr.org/wiki/display/ANTLR3/ANTLR+v3+FAQ
+
+-------------------------
+
+How can I contribute to ANTLR v3?
+
+http://www.antlr.org/wiki/pages/viewpage.action?pageId=33947666
diff --git a/README.version b/README.version
deleted file mode 100644
index 7270f7b..0000000
--- a/README.version
+++ /dev/null
@@ -1,3 +0,0 @@
-URL: https://github.com/antlr/website-antlr3/raw/gh-pages/download/antlr-3.4.tar.gz
-Version: 3.4
-BugComponent: 99142
diff --git a/antlr-3.4/BUILD.txt b/antlr-3.4/BUILD.txt
deleted file mode 100644
index f6e41c3..0000000
--- a/antlr-3.4/BUILD.txt
+++ /dev/null
@@ -1,493 +0,0 @@
- [The "BSD license"]
- Copyright (c) 2010 Terence Parr
- Maven Plugin - Copyright (c) 2009      Jim Idle
-
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
-    derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-============================================================================
-
-This file contains the build instructions for the ANTLR toolset as
-of version 3.1.3 and beyond.
-
-The ANTLR toolset must be built using the Maven build system as
-this build system updates the version numbers and controls the
-whole build process. However, if you just want the latest build
-and do not care to learn anything about Maven, then visit the 'target'
-directories (for jars) under the depot mirror root here:
-
-   http://antlr.org/depot
-
-If you are looking for the latest released version of ANTLR, then
-visit the downloads page on the main antlr.org website.
-
-These instructions are mainly for the ANTLR development team,
-though you are free to build ANTLR yourself of course.
-
-Source code Structure
------------------------
-
-The main development branch of ANTLR is stored within the Perforce SCM at:
-
-   //depot/code/antlr/main/...
-
-release branches are stored in Perforce like so:
-
-   //depot/code/antlr/release-3.1.3/...
-
-In this top level directory, you will find a master build file for
-Maven called pom.xml and you will also note that there are a number of
-subdirectories:
-
- tool                  - The ANTLR tool itself
- runtime/Java          - The ANTLR Java runtime
- runtime/X             - The runtime for language target X
- gunit                 - The grammar test tool
- antlr3-maven-plugin   - The plugin tool for Maven allowing Maven
- 		          projects to process ANTLR grammars.
-
-Each of these sub-directories also contains a file pom.xml that
-controls the build of each sub-component (or module in Maven
-parlance).
-
-Build Parameters
------------------
-
-Alongside each pom.xml (other than for the antlr3-maven-plugin), you
-will see that there is a file called antlr.config. This file is called
-a filter and should contain a set of key/value pairs in the same
-manner as Java properties files:
-
-antlr.something="Some config thang!"
-
-When the build of any component happens, any values in the
-antlr.config for the master build file and any values in the
-antlr.config file for each component are made available to the
-build. This is mainly used by the resource processor, which will
-filter any file it finds under: src/main/resources/** and replace any
-references such as ${antlr.something} with the actual value at the
-time of the build.
-
-Building
---------
-
-Building ANTLR is trivial, assuming that you have loaded Maven version
-3.0.3 or better on to your build system and installed it as explained
-here:
-
-http://maven.apache.org/download.html
-
-Note that the ANTLR toolset will ONLY build with version 3.0.3 of Maven
-as of release 3.4.
-
-If you are unfamiliar with Maven (and even if you are), the best
-resource for learning about it is The Definitive Guide:
-
-http://www.sonatype.com/books/maven-book/reference/public-book.html
-
-The instructions here assume that Maven is installed and working correctly.
-
-If this is the first time you have built the ANTLR toolset, you will
-possibly need to install the master pom in your local repository
-(however the build may be able to locate this in the ANTLR snapshot or
-release repository). If you try to build sub-modules on their own (as
-in run the mvn command in the sub directory for that tool, such as
-runtime/Java), and you receive a message that maven cannot find the
-master pom, then execute this in the main (or release) directory:
-
-mvn -N install
-
-This command will install the master build pom in your local maven
-repository (it's ~/.m2 on UNIX) and individual builds of sub-modules
-will now work correctly.
-
-To build then, simply cd into the master build directory
-(e.g. $P4ROOT//code/antlr/main) and type:
-
-mvn -Dmaven.test.skip=true
-
-Assuming that everything is correctly installed and synchronized, then
-ANTLR will build and skip any unit tests in the modules (the ANTLR
-tool tests can take a long time).
-
-This command will build each of the tools in the correct order and
-will create the jar artifacts of all the components in your local
-development Maven repository (which takes precedence over remote
-repositories by default). At the end of the build you should see:
-
-[INFO] ------------------------------------------------------------------------
-[INFO] Reactor Summary:
-[INFO] ------------------------------------------------------------------------
-[INFO] ANTLR Master build control POM ........................ SUCCESS [1.373s]
-[INFO] Antlr 3 Runtime ....................................... SUCCESS [0.879s]
-[INFO] ANTLR Grammar Tool .................................... SUCCESS [5.431s]
-[INFO] Maven plugin for ANTLR V3 ............................. SUCCESS [1.277s]
-[INFO] ANTLR gUnit ........................................... SUCCESS [1.566s]
-[INFO] Maven plugin for gUnit ANTLR V3 ....................... SUCCESS [0.079s]
-[INFO] ------------------------------------------------------------------------
-[INFO] ------------------------------------------------------------------------
-[INFO] BUILD SUCCESSFUL
-[INFO] ------------------------------------------------------------------------
-[INFO] Total time: 11 seconds
-
-However, unless you are using Maven exclusively in your projects, you
-will most likely want to build the ANTLR Uber Jar, which is an
-executable jar containing all the components that ANTLR needs to build
-and run parsers (note that at runtime, you need only the runtime
-components you use, such as the Java runtime and say stringtemplate).
-
-Because the Uber jar is not something we want to deploy to Maven
-repositories it is built with a special invocation of Maven:
-
-mvn -Dmaven.test.skip=true package assembly:assembly
-
-Note that Maven will appear to build everything twice, which is a
-quirk of how it calculates the dependencies and makes sure it has
-everything packaged up so it can build the uber-jar assembly.
-
-Somewhere in the build output (towards the end), you will find a line
-like this:
-
-[INFO] Building jar: /home/jimi/antlrsrc/code/antlr/main/target/antlr-master-3.4-SNAPSHOT-completejar.jar
-
-This is the executable jar that you need and you can either copy it
-somewhere or, like me, you can create this script (assuming UNIX)
-somewhere in your PATH:
-
-#! /bin/bash
-java -jar ~/antlrsrc/code/antlr/main/target/antlr-master-3.4-SNAPSHOT-completejar.jar $*
-
-Version Numbering
--------------------
-
-The first and Golden rule is that any pom files stored under the main
-branch of the toolset should never be modified to contain a release
-version number. They should always contain a.b.c-SNAPSHOT
-(e.g. 3.1.3-SNAPSHOT). Only release branches should have their pom
-version numbers set to a release version. You can release as many
-SNAPSHOTS as you like, but only one release version. However, release
-versions may be updated with a patch level: 3.1.3-1, 3.1.3-2 and so
-on.
-
-Fortunately, Maven helps us with the version numbering in a number of
-ways. Firstly, the pom.xml files for the various modules do not
-specify a version of the artifacts themselves. They pick up their
-version number from the master build pom.  However, there is a catch,
-because they need to know what version of the parent pom they inherit
-from and so they DO mention the version number. However, this does
-prevent accidentally releasing different versions of sub-modules than
-the master pom describes.
-
-Fortunately once again, Maven has a neat way of helping us change the
-version.  All you need do is check out all the pom.xml files from
-perforce, then modify the <version>a.b.c-SNAPSHOT</version> in the
-master pom. When the version number is correct in the master pom, you
-make sure your working directory is the location of the master pom and
-type:
-
-mvn versions:update-child-modules
-
-This command will then update the child pom.xml files to reflect the
-version number defined in the master pom.xml.
-
-There is unfortunately one last catch here though and that is that the
-antlr3-maven-plugin and the gunit-maven-plugin are not able to use the
-parent pom. The reason for this is subtle but makes sense as doing so
-would create a circular dependency between the ANTLR tool (which uses
-the plugin to build its own grammar files), and the plugins (which
-uses the tool to build grammar files and gunit to test).
-
-This catch-22 situation means that the pom.xml file in the
-antlr3-maven-plugin directory and the one in the gunit-maven-plugin
-directory MUST be updated manually (or we must write a script to do
-this).
-
-Finally, we need to remember that because the tool is dependent on the
-antlr3-maven-plugin and the plugin is itself dependent on the
-tool, that we must manually update the versions of each that they
-reference. So, when we bump the version of the toolset to say
-3.1.4-SNAPSHOT, we need to change the antlr3-maven-plugin pom.xml and
-the gunit-maven-plugin pom.xml to reference that version of the antlr
-tool. The tool itself is always built with the prior released version
-of the plugin, so when we release we must change the main branch of
-the plugin to use the newly released version of the plugin. This is
-covered in the release checklist.
-
-Deploying
-----------
-
-Deploying the tools at the current version is relatively easy, but to
-deploy to the ANTLR repositories (snapshot or release) you must have
-been granted access to the Sonatype OSS repositories' ANTLR login. 
-Few people will have this access of course.
-
-Next, because we do not publish access information for antlr.org, you
-will need to configure the repository server names locally. You do
-this by creating (or adding to) the file:
-
-~/.m2/settings.xml
-
-Which should look like this:
-
-<?xml version="1.0" encoding="UTF-8"?>
-<settings>
-  <servers>
-    <server>
-      <id>sonatype-nexus-snapshots</id>
-      <username>xxxxxxx</username>
-      <password>xxxxxxx</password>
-    </server>
-    <server>
-      <id>sonatype-nexus-staging</id>
-      <username>xxxxxxx</username>
-      <password>xxxxxxx</password>
-    </server>
-  </servers>
-</settings>
-
-When this configuration is in place, you will be able to deploy the components,
-either individually or from the master directory:
-
-mvn -Dmaven.test.skip=true -Ddeplot deploy
-
-You will then see lots of information about checking existing version
-information and so on, and the components will be deployed once you
-supply the ANTLR public key passphrase to sign the jars.
-
-Note that so long as the artifacts are versioned with a.b.c-SNAPSHOT
-then deployment will always be to the development snapshot
-directory. When the artifacts are versioned with a release version
-then deployment will be to the release stahinh repository, which
-will then be mirrored around the world if closed and release.
-The sonatype documentation should be consulted.
-
-Release Checklist
-------------------
-
-Here is the procedure to use to make a release of ANTLR. Note that we
-should really use the mvn release:release command, but the perforce
-plugin for Maven is not commercial quality and I want to rewrite it.
-
-For this checklist, let's assume that the current development version
-of ANTLR is 3.1.3-SNAPSHOT. This means that it will probably (but not
-necessarily) become release version 3.1.3 and that the development
-version will bump to 3.1.4-SNAPSHOT.
-
-0) Run a build of the main branch and check that it is builds and
-   passes as many tests as you want it to.
-
-1) First make a branch from main into the target release
-   directory. Then submit this to perforce. You could change versions
-   numbers before submitting, but doing that in separate stages will
-   keep things sane;
-
---- Use main development branch from here ---
-
-2) Before we deploy the release, we want to update the versions of the
-   development branch, so we don't deploy what is now the new release
-   as an older snapshot (this is not super important, but procedure is
-   good right?).
-
-   Check out all the pom.xml files (and if you are using any
-   antlr.config parameters that must change, then do that too).
-
-3) Edit the master pom.xml in the main directory and change the version from
-   3.1.3-SNAPSHOT to 3.1.4-SNAPSHOT.
-
-4) Edit the pom.xml file for antlr3-maven-plugin under the main
-   directory and change the version from 3.1.3-SNAPSHOT to
-   3.1.4-SNAPSHOT. Do the same for the pom.xml in the
-   gunit-maven-plugin directory.
-
-   Update the pom.xml for the archetype manually too.
-
-5) Now (from the main directory), run the command:
-
-         mvn versions:update-child-modules
-
-      You should see:
-
-         [INFO] [versions:update-child-modules]
-         [INFO] Module: gunit
-         [INFO]   Parent is org.antlr:antlr-master:3.1.4-SNAPSHOT
-         [INFO] Module: runtime/Java
-         [INFO]   Parent is org.antlr:antlr-master:3.1.4-SNAPSHOT
-         [INFO] Module: tool
-         [INFO]   Parent is org.antlr:antlr-master:3.1.4-SNAPSHOT
-
-6) Run a build of the main branch:
-
-         mvn -Dmaven.test.skip=true
-
-       All should be good.
-
-7) Submit the pom changes of the main branch to perforce.
-
-8) Deploy the new snapshot as a placeholder for the next release. It
-   will go to the snapshot repository of course:
-
-	  mvn -N deploy
-          mvn -Dmaven.test.skip=true deploy
-
-9) You are now finished with the main development branch and should change
-   working directories to the release branch you made earlier.
-
---- Use release branch from here ---
-
-10) Check out all the pom.xml files in the release branch (and if you are
-    using any antlr.config parameters that must change, then do that too).
-
-11) Edit the master pom.xml in the release-3.1.3 directory and change
-    the version from 3.1.3-SNAPSHOT to 3.1.3.
-
-12) Edit the pom.xml file for antlr3-maven-plugin under the
-    release-3.1.3 directory and change the version from 3.1.3-SNAPSHOT
-    to 3.1.3. Also change the version of the tool that the this
-    pom.xml references from 3.1.3-SNAPSHOT to 3.1.3 as we are now
-    releasing the plugin of course and it needs to reference the
-    version we are about to release. You will find this reference in
-    the dependencies section of the antlr3-maven-plugin pom.xml. Also
-    change the version references in the pom for gunit-maven-plugin.
-
-13)  Now (from the release-3.1.3 directory), run the command:
-
-           mvn versions:update-child-modules
-
-        You should see:
-
-	[INFO] [versions:update-child-modules]
-	[INFO] Module: gunit
-	[INFO]   Parent was org.antlr:antlr-master:3.1.3-SNAPSHOT,
-	       now org.antlr:antlr-master:3.1.3
-	[INFO] Module: runtime/Java
-	[INFO]   Parent was org.antlr:antlr-master:3.1.3-SNAPSHOT,
-	       now org.antlr:antlr-master:3.1.3
-	[INFO] Module: tool
-	[INFO]   Parent was org.antlr:antlr-master:3.1.3-SNAPSHOT,
-	       now org.antlr:antlr-master:3.1.3
-
-14)  Run a build of the release-3.1.3 branch:
-
-           mvn   # Note I am letting unit tests run here!
-
-        All should be good, or as good as it gets ;-)
-
-15)  Submit the pom changes of the release-3.1.3 branch to perforce.
-
-16)  Deploy the new release (this is it guys, make sure you are happy):
-
-	  mvn -N deploy
-          mvn -Dmaven.test.skip=true deploy
-
-        Note that we must skip the tests as Maven will not let you
-        deploy releases that fail any junit tests.
-
-17) The final step is that we must update the main branch pom.xml for
-     the tool to reference the newly release version of the
-     antlr3-maven-plugin. This is because each release of ANTLR is
-     built with the prior release of ANTLR, and we have just released
-     a new version. Edit the pom.xml for the tool (main/tool/pom.xml)
-     under the main (that's the MAIN branch, not the release branch)
-     and find the dependency reference to the antlr plugin. If you
-     just released say 3.1.3, then the tool should now reference
-     version 3.1.3 of the plugin. Having done this, you should
-     probably rebuild the main branch and let it run the junit
-     tests. Later, I will automate this dependency update as mvn can
-     do this for us.
-
-18)  Having deployed the release to maven, you will want to create the
-     uber jar for the new release, to make it downloadable from the
-     antlr.org website. This is a repeat of the earlier described step
-     to build the uber jar:
-
-       mvn -Dmaven.test.skip=true package assembly:assembly
-
-     MAven will produce the uber jar in the target directory:
-
-	antlr-master-3.1.3-completejar.jar
-
-     And this is the complete jar that can be downloaded from the web site. You
-     may wish to produce an md5 checksum to go with the jar:
-
-     md5sum target/antlr-master-3.1.3-completejar.jar
-     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  target/antlr-master-3.1.4-SNAPSHOT-completejar.jar
-
-     The command you just ran will also produce a second jar:
-
-        antlr-master-3.1.3-src.jar
-
-     This is the source code for everythign you just deployed and can
-     be unjarred and built from scratch using the very procedures
-     described here, which means you will now be reading this
-     BUILD.txt file for ever.
-
-19)  Reward anyone around you with good beer.
-
-
-Miscellany
------------
-
-It was a little tricky to get all the interdependencies correct
-because ANTLR builds itself using itself and the maven plugin
-references the ANTLR Tool as well. Hence the maven tool is not a child
-project of the master pom.xml file, even though it is built by it.
-
-An observant person will not that when the assembly:assembly phase is
-run, that it invokes the build of the ANTLR tool using the version of
-the Maven plugin that it has just built, and this results in the
-plugin using the version of ANTLR tool that it has just built. This is
-safe because everything will already be up to date and so we package
-up the version of the tool that we expect, but the Maven plugin we
-deploy will use the correct version of ANTLR, even though there is
-technically a circular dependency.
-
-The master pom.xml does give us a way to cause the build of the ANTLR
-tool to use itself to build itself. This is because in
-dependencyManagement in the master pom.xml, we can reference the
-current version of the Tool and the Maven plugin, even though in the
-pom.xml for the tool itself refers to the previous version of the
-plugin.
-
-What happens is that if we first cd into the tool and maven
-directories and build ANTLR, it will build itself with the prior
-version and this will deploy locally (.m2). We can then clean build
-from the master pom and when ANTLR asks for the prior version of the
-tool, the master pom.xml will override it and build with the interim
-versions we just built manually.
-
-However, strictly speaking, we need a third build where we rebuild the
-tool again with the version of the tool that was built with itself and
-not deploy the version that was built by the version of itself that
-was built by a prior version of itself. I decided that this was not
-particularly useful and complicates things too much. Building with a
-prior version of the tool is fine and if there was ever a need to, we
-could release twice in quick succession.
-
-I have occasionally seen the MAven reactor screw up (or perhaps it is
-the ANTLR tool) when building. If this happens you will see an ANTLR
-Panic - cannot find en.stg message. If this happens to you, then just
-rerun the build and it will eventually work.
-
-Jim Idle - March 2009
-
diff --git a/antlr-3.4/antlr.config b/antlr-3.4/antlr.config
deleted file mode 100644
index 00ac54e..0000000
--- a/antlr-3.4/antlr.config
+++ /dev/null
@@ -1 +0,0 @@
-fred=99
diff --git a/antlr-3.4/antlr3-maven-archetype/pom.xml b/antlr-3.4/antlr3-maven-archetype/pom.xml
deleted file mode 100644
index 6de349c..0000000
--- a/antlr-3.4/antlr3-maven-archetype/pom.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
-    
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>org.antlr</groupId>
-    <artifactId>antlr3-maven-archetype</artifactId>
-    <version>3.4</version>
-    <packaging>maven-archetype</packaging>
-    <name>ANTLR3 Maven Archetype 3.4</name>
-    
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    </properties>
-    
-    <!--
-
-    Inherit from the ANTLR master pom, which tells us what
-    version we are and allows us to inherit dependencies
-    and so on.
-
-    Unfortunately, because of a bug in the archetype plugin
-    we cannot use the parent pom because it causes the
-    artifactId in the generated pom to be set to antlr3-maven-archetype
-    We will reinstate this parent usage when that is fixed.
-    
-    <parent>
-        <groupId>org.antlr</groupId>
-        <artifactId>antlr-master</artifactId>
-        <version>3.4</version>
-    </parent>
-    -->
-    <!--
-        The ANTLR Maven artifacts are now released via the Sonotype OSS
-        repository, which means that they are synced to Maven central 
-        within a few minutes of hitting the release repo for Sonotype.
-        To enable this, we inherit from the Sonotype provided parent
-        pom. However, we must also configure our .m2/settings.xml to include
-        the snapshot and staging server and the sonotype password. This 
-        means that only ANTLR developers can released the artifacts, but
-        anyone can build locally.
-      -->
-    <parent>
-        <groupId>org.sonatype.oss</groupId>
-        <artifactId>oss-parent</artifactId>
-        <version>7</version>
-    </parent> 
-    
-    <profiles>
-        <profile>
-            <id>release-sign-artifacts</id>
-            <activation>
-                <property>
-                    <name>deploy</name>
-                    <value>true</value>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-gpg-plugin</artifactId>
-                        <version>1.3</version>
-                        <executions>
-                            <execution>
-                                <id>sign-artifacts</id>
-                                <phase>verify</phase>
-                                <goals>
-                                   <goal>sign</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
-    
-  <build>
-
-    <extensions>
-
-      <extension>
-        <groupId>org.apache.maven.archetype</groupId>
-        <artifactId>archetype-packaging</artifactId>
-        <version>2.0</version>
-      </extension>
-
-    </extensions>
-
-        <plugins>
-
-            <plugin>
-                <artifactId>maven-archetype-plugin</artifactId>
-                <version>2.0</version>
-                <extensions>true</extensions>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-                <version>2.1.2</version>
-                <executions>
-                    <execution>
-                        <id>attach-sources</id>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-			
-            <plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-javadoc-plugin</artifactId>
-                <version>2.8</version>
-				<executions>
-					<execution>
-						<id>attach-javadocs</id>
-						<goals>
-							<goal>jar</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-            
-        </plugins>
-
-  </build>
-
-</project>
diff --git a/antlr-3.4/antlr3-maven-archetype/src/main/resources/archetype-resources/pom.xml b/antlr-3.4/antlr3-maven-archetype/src/main/resources/archetype-resources/pom.xml
deleted file mode 100644
index e8db114..0000000
--- a/antlr-3.4/antlr3-maven-archetype/src/main/resources/archetype-resources/pom.xml
+++ /dev/null
@@ -1,182 +0,0 @@
-<?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>
-
-    <!-- =======================================================================
-         A quickstart pom.xml that creates a sample project that uses ANTLR 3.x
-         grammars. You should replace the sample grammars in src/main/antlr3
-         with your own grammar files and use packages.
-
-         A .g file in
-          
-            src/main/antlr3/com/temporalwave
-
-          belongs in the package
-          
-            com.temporalwave
-
-         See http://antlr.org/antlr3-maven-plugin for more details.
-
-         This project produces both a jar file of the project and an executeable
-         jar file that contains all the dependencies so you can run it standalone.
-         See below for more details.
-         
-         Archetype by Jim Idle (jimi@temporal-wave.com) - Oct 2009
-         Report bugs to the ANTLR interest list at http://www.antlr.org
-
-         Generated by antlr3-maven-archetype version 3.4
-         =======================================================================
-      -->
-
-    <!-- This is your organizations normal group name
-         such as org.antlr
-         All the artifacts you create will be under this
-         group id.
-      -->
-    <groupId>${groupId}</groupId>
-
-    <!-- This is how maven knows your artifact
-      -->
-    <artifactId>${artifactId}</artifactId>
-
-    <!-- This is the human oriented name for the package
-         so you can call it anything you like
-      -->
-    <name>ANTLR3 project: ${package}</name>
-
-    <!-- This is the version of YOUR project -->
-    <version>${version}</version>
-
-    <packaging>jar</packaging>
-    <url>http://antlr.org</url>
-
-    <dependencies>
-
-        <!--
-          We need to have the ANTLR runtime jar when running and compiling.
-        -->
-        <dependency>
-            <groupId>org.antlr</groupId>
-            <artifactId>antlr-runtime</artifactId>
-            <version>3.4</version>
-            <scope>compile</scope>
-        </dependency>
-
-    </dependencies>
-
-  <!--
-
-    Tell Maven which other artifacts we need in order to
-    build with the ANTLR Tool. Here we also make the default
-    goal be install so that you can just type mvn at the command
-    line instead of mvn install. And we add the java compiler plugin
-    for convenience to show how you can use 1.6 source files but
-    generate 1.4 compatible .class files (as few people seem to
-    know about the jsr14 target).
-    -->
-    <build>
-
-        <defaultGoal>install</defaultGoal>
-
-        <plugins>
-
-            <plugin>
-
-                <groupId>org.antlr</groupId>
-                <artifactId>antlr3-maven-plugin</artifactId>
-                <version>3.4</version>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>antlr</goal>
-                        </goals>
-                    </execution>
-                </executions>
-
-            </plugin>
-
-            <!--
-              Strictly speaking, we did not need to generate this for you from
-              the prototype, but we use it to illustrate how you can get
-              the JDK 6 Java compiler to accept 1.5 or 1.6 targeted source code
-              but produce class files that are compatible with JRE 1.4. As
-              Michael Caine might not say, "Not a lot of people know that!"
-              -->
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>2.0.2</version>
-                <configuration>
-                    <source>1.6</source>
-                    <target>jsr14</target>
-                    <sourceDirectory>src</sourceDirectory>
-                </configuration>
-            </plugin>
-
-            <plugin>
-                
-                <!--
-
-                    Build an uber-jar that is packaged with all the other dependencies,
-                    such as the antlr-runtime and so on. This will be useful
-                    for developers, who then do not need to download anything else or
-                    remember that they need antlr.jar in their CLASSPATH and so
-                    on.
-
-                    You can delete this plugin of course and you will then
-                    get a jar file with only the code generated and included
-                    directly in this project. With this plugin though you will
-                    find that when you build with:
-
-                       mvn install
-
-                    There will be an executable jar generated. You can run this
-                    as:
-
-                      java -jar ${artifactId}-${version}-jar-with-dependencies.jar demosource.dmo
-
-                    assuming you have a file called demosource.dmo to attempt a parse.
-
-                  -->
-                <artifactId>maven-assembly-plugin</artifactId>
-
-                <configuration>
-                    <descriptorRefs>
-                        <descriptorRef>jar-with-dependencies</descriptorRef>
-                    </descriptorRefs>
-                    <!--
-
-                        Specify that we want the resulting jar to be executable
-                        via java -jar, which we do by modifying the manifest
-                        of course.
-                      -->
-                    <archive>
-
-                        <manifest>
-                            <mainClass>${package}.Main</mainClass>
-                        </manifest>
-                    </archive>
-
-                </configuration>
-
-                <!--
-
-                    We don't want to have to specifically ask for the uber jar, so we attach the
-                    running of this plugin to the execution of the package life-cycle
-                    phase.
-                  -->
-                <executions>
-                    <execution>
-                        <id>make-assembly</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>attached</goal>
-                        </goals>
-                    </execution>
-                </executions>
-
-            </plugin>
-
-        </plugins>
-    </build>
-
-</project>
diff --git a/antlr-3.4/antlr3-maven-plugin/pom.xml b/antlr-3.4/antlr3-maven-plugin/pom.xml
deleted file mode 100644
index 58dc982..0000000
--- a/antlr-3.4/antlr3-maven-plugin/pom.xml
+++ /dev/null
@@ -1,361 +0,0 @@
-<!--
-
- [The "BSD license"]
-
- ANTLR        - Copyright (c) 2005-2010 Terence Parr
- Maven Plugin - Copyright (c) 2009      Jim Idle
-
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
-    derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-  -->
-
-
-
-<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">
-
-
-    <!--
-        The ANTLR Maven artifacts are now released via the Sonotype OSS
-        repository, which means that they are synced to Maven central 
-        within a few minutes of hitting the release repo for Sonotype.
-        To enable this, we inherit from the Sonotype provided parent
-        pom. However, we must also configure our .m2/settings.xml to include
-        the snapshot and staging server and the sonotype password. This 
-        means that only ANTLR developers can released the artifacts, but
-        anyone can build locally.
-      -->
-    <parent>
-        <groupId>org.sonatype.oss</groupId>
-        <artifactId>oss-parent</artifactId>
-        <version>7</version>
-    </parent>  
-    
-    <!-- Maven model we are inheriting from
-      -->
-    <modelVersion>4.0.0</modelVersion>
-
-    <!--
-
-     Now that the ANTLR project has adopted Maven with a vengence,
-     all ANTLR tools will be grouped under org.antlr and will be
-     controlled by a project member.
-     -->
-    <groupId>org.antlr</groupId>
-
-
-    <!--
-
-     This is the ANTLR plugin for ANTLR version 3.1.3 and above. It might
-     have been best to change the name of the plugin as the 3.1.2 plugins
-     behave a little differently, however for the sake of one transitional
-     phase to a much better plugin, it was decided that the name should
-     remain the same.
-      -->
-    <artifactId>antlr3-maven-plugin</artifactId>
-    <packaging>maven-plugin</packaging>
-
-    <!-- Note that as this plugin depends on the ANTLR tool itself
-         we cannot use the paren pom to control the version number
-         and MUST update <version> in this pom manually!
-         -->
-    <version>3.4</version>
-    <name>Maven plugin for ANTLR V3.4</name>
-    <prerequisites>
-        <maven>2.0</maven>
-    </prerequisites>
-
-    <!--
-     Where does our actual project live on the interwebs.
-      -->
-    <url>http://antlr.org</url>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    </properties>
-
-    <description>
-
-This is the brand new, re-written from scratch plugin for ANTLR v3.
-
-Previous valiant efforts all suffered from being unable to modify the ANTLR Tool
-itself to provide support not just for Maven oriented things but any other tool
-that might wish to invoke ANTLR without resorting to the command line interface.
-
-Rather than try to shoe-horn new code into the existing Mojo (in fact I think that
-by incorporating a patch supplied by someone I ended up with tow versions of the
-Mojo, I elected to rewrite everything from scratch, including the documentation, so
-that we might end up with a perfect Mojo that can do everything that ANTLR v3 supports
-such as imported grammar processing, proper support for library directories and
-locating token files from generated sources, and so on.
-
-In the end I decided to also change the the ANTLR Tool.java code so that it
-would be the provider of all the things that a build tool needs, rather than
-delegating things to 5 different tools. So, things like dependencies, dependency
-sorting, option tracking, generating sources and so on are all folded back
-in to ANTLR's Tool.java code, where they belong, and they now provide a
-public interface to anyone that might want to interface with them.
-
-One other goal of this rewrite was to completely document the whole thing
-to death. Hence even this pom has more comments than funcitonal elements,
-in case I get run over by a bus or fall off a cliff while skiing.
-
-Jim Idle - March 2009
-
-    </description>
-
-    <profiles>
-        <profile>
-            <id>release-sign-artifacts</id>
-            <activation>
-                <property>
-                    <name>deploy</name>
-                    <value>true</value>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-gpg-plugin</artifactId>
-                        <version>1.3</version>
-                        <executions>
-                            <execution>
-                                <id>sign-artifacts</id>
-                                <phase>verify</phase>
-                                <goals>
-                                   <goal>sign</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
-
-
-    <developers>
-
-        <developer>
-            <name>Jim Idle</name>
-            <url>http://www.temporal-wave.com</url>
-            <roles>
-                <role>Originator, version 3.1.3+</role>
-            </roles>
-        </developer>
-
-        <developer>
-            <name>Terence Parr</name>
-            <url>http://antlr.org/wiki/display/~admin/Home</url>
-            <roles>
-                <role>Project lead - ANTLR</role>
-            </roles>
-        </developer>
-
-        <developer>
-            <name>David Holroyd</name>
-            <url>http://david.holroyd.me.uk/</url>
-            <roles>
-                <role>Originator - prior version</role>
-            </roles>
-        </developer>
-
-        <developer>
-            <name>Kenny MacDermid</name>
-            <url>mailto:kenny "at" kmdconsulting.ca</url>
-            <roles>
-                <role>Contributor - prior versions</role>
-            </roles>
-        </developer>
-
-    </developers>
-
-    <!-- Where do we track bugs for this project?
-      -->
-    <issueManagement>
-        <system>JIRA</system>
-        <url>http://antlr.org/jira/browse/ANTLR</url>
-    </issueManagement>
-
-    <!-- Location of the license description for this project
-      -->
-    <licenses>
-        <license>
-            <distribution>repo</distribution>
-            <name>The BSD License</name>
-            <url>http://www.antlr.org/LICENSE.txt </url>
-        </license>
-    </licenses>
-    
-    <!-- Ancilliary information for completeness
-      -->
-    <inceptionYear>2009</inceptionYear>
-
-    <mailingLists>
-        <mailingList>
-            <archive>http://antlr.markmail.org/</archive>
-            <otherArchives>
-                <otherArchive>http://www.antlr.org/pipermail/antlr-interest/</otherArchive>
-            </otherArchives>
-            <name>ANTLR Users</name>
-            <subscribe>http://www.antlr.org/mailman/listinfo/antlr-interest/</subscribe>
-            <unsubscribe>http://www.antlr.org/mailman/options/antlr-interest/</unsubscribe>
-            <post>antlr-interest@antlr.org</post>
-        </mailingList>
-    </mailingLists>
-
-    <organization>
-        <name>ANTLR.org</name>
-        <url>http://www.antlr.org</url>
-    </organization>
-    <!-- ============================================================================= -->
-
-    <!--
-
-     What are we depedent on for the Mojos to execute? We need the
-     plugin API itself and of course we need the ANTLR Tool and runtime
-     and any of their dependencies, which we inherit. The Tool itself provides
-     us with all the dependencies, so we need only name it here.
-      -->
-    <dependencies>
-
-        <!--
-          The things we need to build the target language recognizer
-          -->
-        <dependency>
-            <groupId>org.apache.maven</groupId>
-            <artifactId>maven-plugin-api</artifactId>
-            <version>2.0</version>
-            <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.maven</groupId>
-            <artifactId>maven-project</artifactId>
-            <version>2.0</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.codehaus.plexus</groupId>
-            <artifactId>plexus-compiler-api</artifactId>
-            <version>1.5.3</version>
-        </dependency>
-
-        <!--
-         The version of ANTLR tool that this version of the plugin controls.
-         We have decided that this should be in lockstep with ANTLR itself, other
-         than -1 -2 -3 etc patch releases.
-          -->
-        <dependency>
-            <groupId>org.antlr</groupId>
-            <artifactId>antlr</artifactId>
-            <version>3.4</version>
-        </dependency>
-
-        <!--
-          Testing requirements...
-          -->
-        <dependency>
-
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.8.2</version>
-            <scope>test</scope>
-
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.maven.shared</groupId>
-            <artifactId>maven-plugin-testing-harness</artifactId>
-            <version>1.0</version>
-            <scope>test</scope>
-        </dependency>
-        
-    </dependencies>
-    
-    <build>
-
-        <defaultGoal>install</defaultGoal>
-
-        <plugins>
-
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>2.0.2</version>
-                <configuration>
-                    <source>1.6</source>
-                    <target>jsr14</target>
-                </configuration>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-site-plugin</artifactId>
-                <version>2.0</version>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-project-info-reports-plugin</artifactId>
-                <version>2.1.1</version>
-                <configuration>
-                    <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
-                </configuration>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-                <version>2.1.2</version>
-                <executions>
-                    <execution>
-                        <id>attach-sources</id>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-javadoc-plugin</artifactId>
-                <version>2.8</version>
-				<executions>
-					<execution>
-						<id>attach-javadocs</id>
-						<goals>
-							<goal>jar</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-            
-        </plugins>
-
-    </build>
-
-</project>
diff --git a/antlr-3.4/antlr3-maven-plugin/src/main/java/org/antlr/mojo/antlr3/Antlr3ErrorLog.java b/antlr-3.4/antlr3-maven-plugin/src/main/java/org/antlr/mojo/antlr3/Antlr3ErrorLog.java
deleted file mode 100644
index bf2c3c6..0000000
--- a/antlr-3.4/antlr3-maven-plugin/src/main/java/org/antlr/mojo/antlr3/Antlr3ErrorLog.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- [The "BSD licence"]
-
- ANTLR        - Copyright (c) 2005-2008 Terence Parr
- Maven Plugin - Copyright (c) 2009      Jim Idle
-
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
-    derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-package org.antlr.mojo.antlr3;
-
-import org.antlr.tool.ANTLRErrorListener;
-import org.antlr.tool.Message;
-import org.antlr.tool.ToolMessage;
-import org.apache.maven.plugin.logging.Log;
-
-/**
- * The Maven plexus container gives us a Log logging provider
- * which we can use to install an error listener for the ANTLR
- * tool to report errors by.
- */
-public class Antlr3ErrorLog implements ANTLRErrorListener {
-
-    private Log log;
-
-    /**
-     * Instantiate an ANTLR ErrorListner that communicates any messages
-     * it receives to the Maven error sink.
-     *
-     * @param log The Maven Error Log
-     */
-    public Antlr3ErrorLog(Log log) {
-        this.log = log;
-    }
-
-    /**
-     * Sends an informational message to the Maven log sink.
-     * @param s The message to send to Maven
-     */
-    public void info(String message) {
-        log.info(message);
-    }
-
-    /**
-     * Sends an error message from ANTLR analysis to the Maven Log sink.
-     *
-     * @param message The message to send to Maven.
-     */
-    public void error(Message message) {
-        log.error(message.toString());
-    }
-
-    /**
-     * Sends a warning message to the Maven log sink.
-     *
-     * @param message
-     */
-    public void warning(Message message) {
-        log.warn(message.toString());
-    }
-
-    /**
-     * Sends an error message from the ANTLR tool to the Maven Log sink.
-     * @param toolMessage
-     */
-    public void error(ToolMessage toolMessage) {
-        log.error(toolMessage.toString());
-    }
-}
diff --git a/antlr-3.4/antlr3-maven-plugin/src/main/java/org/antlr/mojo/antlr3/Antlr3Mojo.java b/antlr-3.4/antlr3-maven-plugin/src/main/java/org/antlr/mojo/antlr3/Antlr3Mojo.java
deleted file mode 100644
index e7225d3..0000000
--- a/antlr-3.4/antlr3-maven-plugin/src/main/java/org/antlr/mojo/antlr3/Antlr3Mojo.java
+++ /dev/null
@@ -1,493 +0,0 @@
-/**
-[The "BSD licence"]
-
-ANTLR        - Copyright (c) 2005-2008 Terence Parr
-Maven Plugin - Copyright (c) 2009      Jim Idle
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-1. Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-3. The name of the author may not be used to endorse or promote products
-derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/* ========================================================================
- * This is the definitive ANTLR3 Mojo set. All other sets are belong to us.
- */
-package org.antlr.mojo.antlr3;
-
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.project.MavenProject;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-import org.antlr.Tool;
-import org.antlr.runtime.RecognitionException;
-import org.apache.maven.plugin.logging.Log;
-import org.codehaus.plexus.compiler.util.scan.InclusionScanException;
-import org.codehaus.plexus.compiler.util.scan.SimpleSourceInclusionScanner;
-import org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner;
-import org.codehaus.plexus.compiler.util.scan.mapping.SourceMapping;
-import org.codehaus.plexus.compiler.util.scan.mapping.SuffixMapping;
-
-/**
- * Goal that picks up all the ANTLR grammars in a project and moves those that
- * are required for generation of the compilable sources into the location
- * that we use to compile them, such as target/generated-sources/antlr3 ...
- *
- * @goal antlr
- * 
- * @phase process-sources
- * @requiresDependencyResolution compile
- * @requiresProject true
- * 
- * @author <a href="mailto:jimi@temporal-wave.com">Jim Idle</a>
- */
-public class Antlr3Mojo
-        extends AbstractMojo {
-
-    // First, let's deal with the options that the ANTLR tool itself
-    // can be configured by.
-    //
-    /**
-     * If set to true, then after the tool has processed an input grammar file
-     * it will report various statistics about the parser, such as information
-     * on cyclic DFAs, which rules may use backtracking, and so on.
-     *
-     * @parameter default-value="false"
-     */
-    protected boolean report;
-    /**
-     * If set to true, then the ANTLR tool will print a version of the input
-     * grammar which is devoid of any actions that may be present in the input file.
-     *
-     * @parameter default-value="false"
-     */
-    protected boolean printGrammar;
-    /**
-     * If set to true, then the code generated by the ANTLR code generator will
-     * be set to debug mode. This means that when run, the code will 'hang' and
-     * wait for a debug connection on a TCP port (49100 by default).
-     *
-     * @parameter default-value="false"
-     */
-    protected boolean debug;
-    /**
-     * If set to true, then then the generated parser will compute and report on
-     * profile information at runtime.
-     *
-     * @parameter default-value="false"
-     */
-    protected boolean profile;
-    /**
-     * If set to true then the ANTLR tool will generate a description of the nfa
-     * for each rule in <a href="http://www.graphviz.org">Dot format</a>
-     * 
-     * @parameter default-value="false"
-     */
-    protected boolean nfa;
-    /**
-     * If set to true then the ANTLR tool will generate a description of the DFA
-     * for each decision in the grammar in <a href="http://www.graphviz.org">Dot format</a>
-     * 
-     * @parameter default-value="false"
-     */
-    protected boolean dfa;
-    /**
-     * If set to true, the generated parser code will log rule entry and exit points
-     * to stdout as an aid to debugging.
-     *
-     * @parameter default-value="false"
-     */
-    protected boolean trace;
-    /**
-     * If this parameter is set, it indicates that any warning or error messages returned
-     * by ANLTR, should be formatted in the specified way. Currently, ANTLR supports the
-     * built-in formats of antlr, gnu and vs2005.
-     *
-     * @parameter default-value="antlr"
-     */
-    protected String messageFormat;
-    /**
-     * If this parameter is set to true, then ANTLR will report all sorts of things
-     * about what it is doing such as the names of files and the version of ANTLR and so on.
-     *
-     * @parameter default-value="true"
-     */
-    protected boolean verbose;
-
-    /**
-     * The number of alts, beyond which ANTLR will not generate a switch statement
-     * for the DFA.
-     *
-     * @parameter default-value="300"
-     */
-    private int maxSwitchCaseLabels;
-
-    /**
-     * The number of alts, below which ANTLR will not choose to generate a switch
-     * statement over an if statement.
-     */
-    private int minSwitchAlts;
-
-    /* --------------------------------------------------------------------
-     * The following are Maven specific parameters, rather than specificlly
-     * options that the ANTLR tool can use.
-     */
-    /**
-     * Provides an explicit list of all the grammars that should
-     * be included in the generate phase of the plugin. Note that the plugin
-     * is smart enough to realize that imported grammars should be included but
-     * not acted upon directly by the ANTLR Tool.
-     *
-     * Unless otherwise specified, the include list scans for and includes all
-     * files that end in ".g" in any directory beneath src/main/antlr3. Note that
-     * this version of the plugin looks for the directory antlr3 and not the directory
-     * antlr, so as to avoid clashes and confusion for projects that use both v2 and v3 grammars
-     * such as ANTLR itself.
-     *
-     * @parameter
-     */
-    protected Set includes = new HashSet();
-    /**
-     * Provides an explicit list of any grammars that should be excluded from
-     * the generate phase of the plugin. Files listed here will not be sent for
-     * processing by the ANTLR tool.
-     *
-     * @parameter 
-     */
-    protected Set excludes = new HashSet();
-    /**
-     * @parameter expression="${project}"
-     * @required
-     * @readonly
-     */
-    protected MavenProject project;
-    /**
-     * Specifies the Antlr directory containing grammar files. For
-     * antlr version 3.x we default this to a directory in the tree
-     * called antlr3 because the antlr directory is occupied by version
-     * 2.x grammars.
-     *
-     * @parameter default-value="${basedir}/src/main/antlr3"
-     * @required
-     */
-    private File sourceDirectory;
-    /**
-     * Location for generated Java files. For antlr version 3.x we default
-     * this to a directory in the tree called antlr3 because the antlr
-     * directory is occupied by version 2.x grammars.
-     *
-     * @parameter default-value="${project.build.directory}/generated-sources/antlr3"
-     * @required
-     */
-    private File outputDirectory;
-    /**
-     * Location for imported token files, e.g. <code>.tokens</code> and imported grammars.
-     * Note that ANTLR will not try to process grammars that it finds to be imported
-     * into other grammars (in the same processing session).
-     *
-     * @parameter default-value="${basedir}/src/main/antlr3/imports"
-     */
-    private File libDirectory;
-
-    public File getSourceDirectory() {
-        return sourceDirectory;
-    }
-
-    public File getOutputDirectory() {
-        return outputDirectory;
-    }
-
-    public File getLibDirectory() {
-        return libDirectory;
-    }
-
-    void addSourceRoot(File outputDir) {
-        project.addCompileSourceRoot(outputDir.getPath());
-    }
-    /**
-     * An instance of the ANTLR tool build
-     */
-    protected Tool tool;
-
-    /**
-     * The main entry point for this Mojo, it is responsible for converting
-     * ANTLR 3.x grammars into the target language specified by the grammar.
-     * 
-     * @throws org.apache.maven.plugin.MojoExecutionException When something is discovered such as a missing source
-     * @throws org.apache.maven.plugin.MojoFailureException When something really bad happens such as not being able to create the ANTLR Tool
-     */
-    public void execute()
-            throws MojoExecutionException, MojoFailureException {
-
-        Log log = getLog();
-
-        // Check to see if the user asked for debug information, then dump all the
-        // parameters we have picked up if they did.
-        //
-        if (log.isDebugEnabled()) {
-
-            // Excludes
-            //
-            for (String e : (Set<String>) excludes) {
-
-                log.debug("ANTLR: Exclude: " + e);
-            }
-
-            // Includes
-            //
-            for (String e : (Set<String>) includes) {
-
-                log.debug("ANTLR: Include: " + e);
-            }
-
-            // Output location
-            //
-            log.debug("ANTLR: Output: " + outputDirectory);
-
-            // Library directory
-            //
-            log.debug("ANTLR: Library: " + libDirectory);
-
-            // Flags
-            //
-            log.debug("ANTLR: report              : " + report);
-            log.debug("ANTLR: printGrammar        : " + printGrammar);
-            log.debug("ANTLR: debug               : " + debug);
-            log.debug("ANTLR: profile             : " + profile);
-            log.debug("ANTLR: nfa                 : " + nfa);
-            log.debug("ANTLR: dfa                 : " + dfa);
-            log.debug("ANTLR: trace               : " + trace);
-            log.debug("ANTLR: messageFormat       : " + messageFormat);
-            log.debug("ANTLR: maxSwitchCaseLabels : " + maxSwitchCaseLabels);
-            log.debug("ANTLR: minSwitchAlts       : " + minSwitchAlts);
-            log.debug("ANTLR: verbose             : " + verbose);
-        }
-
-        // Ensure that the output directory path is all in tact so that
-        // ANTLR can just write into it.
-        //
-        File outputDir = getOutputDirectory();
-
-        if (!outputDir.exists()) {
-            outputDir.mkdirs();
-        }
-
-        // First thing we need is an instance of the ANTLR 3.1 build tool
-        //
-        try {
-            // ANTLR Tool buld interface
-            //
-            tool = new Tool();
-        } catch (Exception e) {
-            log.error("The attempt to create the ANTLR build tool failed, see exception report for details");
-
-            throw new MojoFailureException("Jim failed you!");
-        }
-
-        // Next we need to set the options given to us in the pom into the
-        // tool instance we have created.
-        //
-        tool.setDebug(debug);
-        tool.setGenerate_DFA_dot(dfa);
-        tool.setGenerate_NFA_dot(nfa);
-        tool.setProfile(profile);
-        tool.setReport(report);
-        tool.setPrintGrammar(printGrammar);
-        tool.setTrace(trace);
-        tool.setVerbose(verbose);
-        tool.setMessageFormat(messageFormat);
-        tool.setMaxSwitchCaseLabels(maxSwitchCaseLabels);
-        tool.setMinSwitchAlts(minSwitchAlts);
-
-        // Where do we want ANTLR to produce its output? (Base directory)
-        //
-        if (log.isDebugEnabled())
-        {
-            log.debug("Output directory base will be " + outputDirectory.getAbsolutePath());
-        }
-        tool.setOutputDirectory(outputDirectory.getAbsolutePath());
-
-        // Tell ANTLR that we always want the output files to be produced in the output directory
-        // using the same relative path as the input file was to the input directory.
-        //
-        tool.setForceRelativeOutput(true);
-
-        // Where do we want ANTLR to look for .tokens and import grammars?
-        //
-        tool.setLibDirectory(libDirectory.getAbsolutePath());
-
-        if (!sourceDirectory.exists()) {
-            if (log.isInfoEnabled()) {
-                log.info("No ANTLR grammars to compile in " + sourceDirectory.getAbsolutePath());
-            }
-            return;
-        } else {
-            if (log.isInfoEnabled()) {
-                log.info("ANTLR: Processing source directory " + sourceDirectory.getAbsolutePath());
-            }
-        }
-
-        // Set working directory for ANTLR to be the base source directory
-        //
-        tool.setInputDirectory(sourceDirectory.getAbsolutePath());
-
-        try {
-
-            // Now pick up all the files and process them with the Tool
-            //
-            processGrammarFiles(sourceDirectory, outputDirectory);
-
-        } catch (InclusionScanException ie) {
-
-            log.error(ie);
-            throw new MojoExecutionException("Fatal error occured while evaluating the names of the grammar files to analyze");
-
-        } catch (Exception e) {
-
-            getLog().error(e);
-            throw new MojoExecutionException(e.getMessage());
-        }
-
-
-
-        tool.process();
-
-        // If any of the grammar files caused errors but did nto throw exceptions
-        // then we should have accumulated errors in the counts
-        //
-        if (tool.getNumErrors() > 0) {
-            throw new MojoExecutionException("ANTLR caught " + tool.getNumErrors() + " build errors.");
-        }
-
-        // All looks good, so we need to tel Maven about the sources that
-        // we just created.
-        //
-        if (project != null) {
-            // Tell Maven that there are some new source files underneath
-            // the output directory.
-            //
-            addSourceRoot(this.getOutputDirectory());
-        }
-
-    }
-
-
-    /**
-     *
-     * @param sourceDirectory
-     * @param outputDirectory
-     * @throws antlr.TokenStreamException
-     * @throws antlr.RecognitionException
-     * @throws java.io.IOException
-     * @throws org.codehaus.plexus.compiler.util.scan.InclusionScanException
-     */
-    private void processGrammarFiles(File sourceDirectory, File outputDirectory)
-            throws RecognitionException, IOException, InclusionScanException {
-        // Which files under the source set should we be looking for as grammar files
-        //
-        SourceMapping mapping = new SuffixMapping("g", Collections.EMPTY_SET);
-
-        // What are the sets of includes (defaulted or otherwise).
-        //
-        Set includes = getIncludesPatterns();
-
-        // Now, to the excludes, we need to add the imports directory
-        // as this is autoscanned for importd grammars and so is auto-excluded from the
-        // set of gramamr fiels we shuold be analyzing.
-        //
-        excludes.add("imports/**");
-
-        SourceInclusionScanner scan = new SimpleSourceInclusionScanner(includes, excludes);
-
-        scan.addSourceMapping(mapping);
-        Set grammarFiles = scan.getIncludedSources(sourceDirectory, null);
-
-        if (grammarFiles.isEmpty()) {
-            if (getLog().isInfoEnabled()) {
-                getLog().info("No grammars to process");
-            }
-        } else {
-
-            // Tell the ANTLR tool that we want sorted build mode
-            //
-            tool.setMake(true);
-            
-            // Iterate each grammar file we were given and add it into the tool's list of
-            // grammars to process.
-            //
-            for (File grammar : (Set<File>) grammarFiles) {
-
-                if (getLog().isDebugEnabled()) {
-                    getLog().debug("Grammar file '" + grammar.getPath() + "' detected.");
-                }
-
-
-                String relPath = findSourceSubdir(sourceDirectory, grammar.getPath()) + grammar.getName();
-
-                if (getLog().isDebugEnabled()) {
-                    getLog().debug("  ... relative path is: " + relPath);
-                }
-                tool.addGrammarFile(relPath);
-
-            }
-
-        }
-
-
-    }
-
-    public Set getIncludesPatterns() {
-        if (includes == null || includes.isEmpty()) {
-            return Collections.singleton("**/*.g");
-        }
-        return includes;
-    }
-
-    /**
-     * Given the source directory File object and the full PATH to a
-     * grammar, produce the path to the named grammar file in relative
-     * terms to the sourceDirectory. This will then allow ANTLR to
-     * produce output relative to the base of the output directory and
-     * reflect the input organization of the grammar files.
-     *
-     * @param sourceDirectory The source directory File object
-     * @param grammarFileName The full path to the input grammar file
-     * @return The path to the grammar file relative to the source directory
-     */
-    private String findSourceSubdir(File sourceDirectory, String grammarFileName) {
-        String srcPath = sourceDirectory.getPath() + File.separator;
-
-        if (!grammarFileName.startsWith(srcPath)) {
-            throw new IllegalArgumentException("expected " + grammarFileName + " to be prefixed with " + sourceDirectory);
-        }
-
-        File unprefixedGrammarFileName = new File(grammarFileName.substring(srcPath.length()));
-
-        return unprefixedGrammarFileName.getParent() + File.separator;
-    }
-}
diff --git a/antlr-3.4/antlr3-maven-plugin/src/site/apt/examples/import.apt b/antlr-3.4/antlr3-maven-plugin/src/site/apt/examples/import.apt
deleted file mode 100644
index 06a49f1..0000000
--- a/antlr-3.4/antlr3-maven-plugin/src/site/apt/examples/import.apt
+++ /dev/null
@@ -1,8 +0,0 @@
-Imported Grammar Files
-
- In order to have the ANTLR plugin automatically locate and use grammars used
- as imports in your main .g files, you need to place the imported grammar
- files in the imports directory beneath the root directory of your grammar
- files (which is <<<src/main/antlr3>>> by default of course).
-
- For a default layout, place your import grammars in the directory: <<<src/main/antlr3/imports>>>
diff --git a/antlr-3.4/antlr3-maven-plugin/src/site/apt/examples/libraries.apt b/antlr-3.4/antlr3-maven-plugin/src/site/apt/examples/libraries.apt
deleted file mode 100644
index 73ce796..0000000
--- a/antlr-3.4/antlr3-maven-plugin/src/site/apt/examples/libraries.apt
+++ /dev/null
@@ -1,47 +0,0 @@
-Libraries
-
- The introduction of the import directive in a grammar allows reuse of common grammar files
- as well as the ability to divide up functional components of large grammars. However it has
- caused some confusion in regard to the fact that generated vocab files (<<<xxx.tokens>>>) can also
- be searched for with the <<<<libDirectory>>>> directive.
-
- This has confused two separate functions and imposes a structure upon the layout of
- your grammar files in certain cases. If you have grammars that both use the import
- directive and also require the use of a vocab file then you will need to locate
- the grammar that generates the .tokens file alongside the grammar that uses it. This
- is because you will need to use the <<<<libDirectory>>>> directive to specify the
- location of your imported grammars and ANTLR will not find any vocab files in
- this directory.
-
- The .tokens files for any grammars are generated within the same output directory structure
- as the .java files. So, whereever the .java files are generated, you will also find the .tokens
- files. ANTLR looks for .tokens files in both the <<<<libDirectory>>>> and the output directory
- where it is placing the geenrated .java files. Hence when you locate the grammars that generate
- .tokens files in the same source directory as the ones that use the .tokens files, then
- the Maven plugin will find the expected .tokens files.
-
- The <<<<libDirectory>>>> is specified like any other directory parameter in Maven. Here is an
- example:
-
-+--
-<plugin>
-    <groupId>org.antlr</groupId>
-    <artifactId>antlr3-maven-plugin</artifactId>
-    <version>3.1.3-1</version>
-
-    <executions>
-
-        <execution>
-            <configuration>
-                <goals>
-                    <goal>antlr</goal>
-                </goals>
-                <libDirectory>src/main/antlr_imports</libDirectory>
-            </configuration>
-        </execution>
-    </executions>
-</plugin>
-+--
-
-
-
diff --git a/antlr-3.4/antlr3-maven-plugin/src/site/apt/examples/simple.apt b/antlr-3.4/antlr3-maven-plugin/src/site/apt/examples/simple.apt
deleted file mode 100644
index 3e36e84..0000000
--- a/antlr-3.4/antlr3-maven-plugin/src/site/apt/examples/simple.apt
+++ /dev/null
@@ -1,40 +0,0 @@
-Simple configuration
-
- If your grammar files are organized into the default locations as described in the {{{../index.html}introduction}},
- then configuring the pom.xml file for your project is as simple as adding this to it
-
-+--
-<plugins>
-<plugin>
-    <groupId>org.antlr</groupId>
-    <artifactId>antlr3-maven-plugin</artifactId>
-    <version>3.1.3-1</version>
-    <executions>
-        <execution>
-            <goals>
-                <goal>antlr</goal>
-            </goals>
-        </execution>
-    </executions>
-</plugin>
-...
-</plugins>
-+--
-
- When the mvn command is executed all grammar files under <<<src/main/antlr3>>>, except any
- import grammars under <<<src/main/antlr3/imports>>> will be analyzed and converted to
- java source code in the output directory <<<target/generated-sources/antlr3>>>.
-
- Your input files under <<<antlr3>>> should be stored in sub directories that
- reflect the package structure of your java parsers. If your grammar file parser.g contains:
-
-+---
-@header {
-package org.jimi.themuss;
-}
-+---
-
- Then the .g file should be stored in: <<<src/main/antlr3/org/jimi/themuss/parser.g>>>. THis way
- the generated .java files will correctly reflect the package structure in which they will
- finally rest as classes.
-
diff --git a/antlr-3.4/antlr3-maven-plugin/src/site/apt/index.apt b/antlr-3.4/antlr3-maven-plugin/src/site/apt/index.apt
deleted file mode 100644
index 2b2495a..0000000
--- a/antlr-3.4/antlr3-maven-plugin/src/site/apt/index.apt
+++ /dev/null
@@ -1,63 +0,0 @@
-         -------------
-         ANTLR v3 Maven Plugin
-         -------------
-         Jim Idle
-         -------------
-         March 2009
-         -------------
-
-ANTLR v3 Maven plugin
-
- The ANTLR v3 Maven plugin is completely re-written as of version 3.1.3; if you are familiar
- with prior versions, you should note that there are some behavioral differences that make
- it worthwhile reading this documentation. 
-
- The job of the plugin is essentially to tell the standard ANTLR parser generator where the
- input grammar files are and where the output files should be generated. As with all Maven
- plugins, there are defaults, which you are advised to comply to, but are not forced to
- comply to.
-
- This version of the plugin allows full control over ANTLR and allows configuration of all
- options that are useful for a build system. The code required to calculate dependencies,
- check the build order, and otherwise work with your grammar files is built into the ANTLR
- tool as of version 3.1.3 of ANTLR and this plugin.
-
-* Plugin Versioning
-
- The plugin version tracks the version of the ANTLR tool that it controls. Hence if you
- use version 3.1.3 of the plugin, you will build your grammars using version 3.1.3 of the
- ANTLR tool, version 3.2 of the plugin will use version 3.2 of the ANTLR tool and so on.
-
- You may also find that there are patch versions of the plugin suchas 3.1.3-1 3.1.3-2 and
- so on. Use the latest patch release of the plugin.
-
- The current version of the plugin is shown at the top of this page after the <<Last Deployed>> date.
- 
-
-* Default directories
-
- As with all Maven plugins, this plugin will automatically default to standard locations
- for your grammar and import files. Organizing your source code to reflect this standard
- layout will greatly reduce the configuration effort required. The standard layout lookd
- like this:
-
-+--
- src/main/
-      |
-      +--- antlr3/... .g files organized in the required package structure
-             |
-             +--- imports/  .g files that are imported by other grammars.
-+--
-
- If your grammar is intended to be part of a package called org.foo.bar then you would
- place it in the directory <<<src/main/antlr3/org/foo/bar>>>. The plugin will then produce
- .java and .tokens files in the output directory <<<target/generated-sources/antlr3/org/foo/bar>>>
- When the Java files are compiled they will be in the correct location for the javac
- compiler without any special configuration. The generated java files are automatically
- submitted for compilation by the plugin.
-
- The <<<src/main/antlr3/imports>>> directory is treated in a special way. It should contain
- any grammar files that are imported by other grammar files (do not make subdirectories here.)
- Such files are never built on their own, but the plugin will automatically tell the ANTLR
- tool to look in this directory for library files.
-
diff --git a/antlr-3.4/antlr3-maven-plugin/src/site/apt/usage.apt.vm b/antlr-3.4/antlr3-maven-plugin/src/site/apt/usage.apt.vm
deleted file mode 100644
index 9b7ad0f..0000000
--- a/antlr-3.4/antlr3-maven-plugin/src/site/apt/usage.apt.vm
+++ /dev/null
@@ -1,193 +0,0 @@
-Usage
-
- The Maven plugin for antlr is simple to use but is at its simplest when you use the default
- layouts for your grammars, as so:
-
-+--
- src/main/
-      |
-      +--- antlr3/... .g files organized in the required package structure
-             |
-             +--- imports/  .g files that are imported by other grammars.
-+--
-
- However, if you are not able to use this structure for whatever reason, you
- can configure the locations of the grammar files, where library/import files
- are located and where the output files should be generated.
-
-* Plugin Descriptor
-
- The current version of the plugin is shown at the top of this page after the <<Last Deployed>> date.
-
- The full layout of the descriptor (at least, those parts that are not standard Maven things),
- showing the default values of the configuration options, is as follows:
-
-+--
-<plugin>
-    <groupId>org.antlr</groupId>
-    <artifactId>antlr3-maven-plugin</artifactId>
-    <version>3.1.3-1</version>
-
-    <executions>
-        
-        <execution>
-            <configuration>
-                <goals>
-                    <goal>antlr</goal>
-                </goals>
-                <conversionTimeout>10000</conversionTimeout>
-                <debug>false</debug>
-                <dfa>false</dfa>
-                <nfa>false</nfa>
-                <excludes><exclude/></excludes>
-                <includes><include/></includes>
-                <libDirectory>src/main/antlr3/imports</libDirectory>
-                <messageFormat>antlr</messageFormat>
-                <outputDirectory>target/generated-sources/antlr3</outputDirectory>
-                <printGrammar>false</printGrammar>
-                <profile>false</profile>
-                <report>false</report>
-                <sourceDirectory>src/main/antlr3</sourceDirectory>
-                <trace>false</trace>
-                <verbose>true</verbose>
-            </configuration>
-        </execution>
-    </executions>
-
-</plugin>
-+--
-
- Note that you can create multiple executions, and thus build some grammars with different
- options to others (such as setting the debug option for instance).
-
-** Configuration parameters
-
-*** report
-
-    If set to true, then after the tool has processed an input grammar file
-    it will report variaous statistics about the parser, such as information
-    on cyclic DFAs, which rules may use backtracking, and so on.
-
-    default-value="false"
-
-*** printGrammar
-
-    If set to true, then the ANTLR tool will print a version of the input
-    grammar which is devoid of any actions that may be present in the input file.
-
-    default-value = "false"
-
-*** debug
-
-     If set to true, then the code generated by the ANTLR code generator will
-     be set to debug mode. This means that when run, the code will 'hang' and
-     wait for a debug connection on a TCP port (49100 by default).
-     
-     default-value="false"
-     
-*** profile
-
-     If set to true, then then the generated parser will compute and report on
-     profile information at runtime.
-     
-     default-value="false"
-     
-*** nfa
-
-     If set to true then the ANTLR tool will generate a description of the nfa
-     for each rule in <a href="http://www.graphviz.org">Dot format</a>
-     
-     default-value="false"
-     
-    protected boolean nfa;
-    
-*** dfa
-
-     If set to true then the ANTLR tool will generate a description of the DFA
-     for each decision in the grammar in <a href="http://www.graphviz.org">Dot format</a>
-     
-     default-value="false"
-     
-*** trace
-
-     If set to true, the generated parser code will log rule entry and exit points
-     to stdout as an aid to debugging.
-     
-     default-value="false"
-     
-*** messageFormat
-
-     If this parameter is set, it indicates that any warning or error messages returned
-     by ANLTR, shoould be formatted in the specified way. Currently, ANTLR supports the
-     built-in formats of antlr, gnu and vs2005.
-
-     default-value="antlr"
-     
-*** verbose
-
-     If this parameter is set to true, then ANTLR will report all sorts of things
-     about what it is doing such as the names of files and the version of ANTLR and so on.
-     
-     default-value="true"
-     
-*** conversionTimeout
-
-     The number of milliseconds ANTLR will wait for analysis of each
-     alternative in the grammar to complete before giving up. You may raise
-     this value if ANTLR gives up on a complicated alt and tells you that
-     there are lots of ambiguties, but you know that it just needed to spend
-     more time on it. Note that this is an absolute time and not CPU time.
-     
-     default-value="10000"
-     
-*** includes
-
-     Provides an explicit list of all the grammars that should
-     be included in the generate phase of the plugin. Note that the plugin
-     is smart enough to realize that imported grammars should be included but
-     not acted upon directly by the ANTLR Tool.
-     
-     Unless otherwise specified, the include list scans for and includes all
-     files that end in ".g" in any directory beneath src/main/antlr3. Note that
-     this version of the plugin looks for the directory antlr3 and not the directory
-     antlr, so as to avoid clashes and confusion for projects that use both v2 and v3 grammars
-     such as ANTLR itself.
-     
-*** excludes
-
-     Provides an explicit list of any grammars that should be excluded from
-     the generate phase of the plugin. Files listed here will not be sent for
-     processing by the ANTLR tool.
-     
-*** sourceDirectory
-
-     Specifies the Antlr directory containing grammar files. For
-     antlr version 3.x we default this to a directory in the tree
-     called antlr3 because the antlr directory is occupied by version
-     2.x grammars.
-
-     <<NB>> Take careful note that the default location for antlr grammars
-     is now <<antlr3>> and NOT <<antlr>>
-
-     default-value="<<<${basedir}/src/main/antlr3>>>"
-     
-*** outputDirectory
-
-     Location for generated Java files. For antlr version 3.x we default
-     this to a directory in the tree called antlr3 because the antlr
-     directory is occupied by version 2.x grammars.
-     
-     default-value="<<<${project.build.directory}/generated-sources/antlr3>>>"
-     
-*** libDirectory
-
-     Location for imported token files, e.g. <code>.tokens</code> and imported grammars.
-     Note that ANTLR will not try to process grammars that it finds in this directory, but
-     will include this directory in the search for .tokens files and import grammars.
-
-     <<NB>> If you change the lib directory from the default but the directory is
-     still under<<<${basedir}/src/main/antlr3>>>, then you will need to exclude
-     the grammars from processing specifically, using the <<<<excludes>>>> option.
-
-     default-value="<<<${basedir}/src/main/antlr3/imports>>>"
-
diff --git a/antlr-3.4/antlr3-maven-plugin/src/site/site.xml b/antlr-3.4/antlr3-maven-plugin/src/site/site.xml
deleted file mode 100644
index 7d0c52b..0000000
--- a/antlr-3.4/antlr3-maven-plugin/src/site/site.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project name="ANTLR v3 Maven plugin">
-
-  <publishDate position="left"/>
-  <version position="left"/>
-
-  <poweredBy>
-    <logo name="ANTLR Web Site" href="http://antlr.org/"
-          img="http://www.antlr.org/wiki/download/attachments/292/ANTLR3"/>
-  </poweredBy>
-
-  <body>
-    <links>
-      <item name="Antlr Web Site" href="http://www.antlr.org/"/>
-    </links>
-
-    <menu name="Overview">
-      <item name="Introduction" href="index.html"/>
-      <item name="Usage" href="usage.html"/>
-    </menu>
-
-    <menu name="Examples">
-      <item name="Simple configurations" href="examples/simple.html"/>
-      <item name="Using library directories" href="examples/libraries.html"/>
-      <item name="Using imported grammars" href="examples/import.html"/>
-    </menu>
-
-    <menu ref="reports" />
-    <menu ref="modules" />
-
-  </body>
-</project>
diff --git a/antlr-3.4/antlrjar.xml b/antlr-3.4/antlrjar.xml
deleted file mode 100644
index 6988f98..0000000
--- a/antlr-3.4/antlrjar.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-    This file defines what goes in to ANTLR Uber jar, which includes
-    all of the classes we need to run an executable jar in standalone
-    mode.
-  -->
-<assembly>
-
-    <!--
-        This is the suffix that will be used to name the uber jar
-        once it is jared up.
-      -->
-    <id>completejar</id>
-
-    <!--
-        The only output format we need is the executable jar file
-      -->
-    <formats>
-        <format>jar</format>
-    </formats>
-
-    <!--
-        Make all jars unpack at the same level and don't include
-        any extraneous directories.
-      -->
-    <includeBaseDirectory>false</includeBaseDirectory>
-
-    <!--
-        Which of the modules that the master pom builds do we
-        wish to include in the uber jar. We are including
-        dependencies, so we only need to name the Tool module
-        and the gunit module.
-      -->
-    <moduleSets>
-
-        <moduleSet>
-            
-            <includes>
-                
-                <include>org.antlr:antlr</include>
-          
-            </includes>
-            <!--
-                Of the binaries, such as the dependencies that the
-                above modules need, which do we want and which do we not.
-                Currently we want all the dependencies in the Tool jar.
-              -->
-            <binaries>
-
-                <dependencySets>
-                    <dependencySet>
-                        <!--
-                            Exclude the antlr-master pom from the jar - we don't need it
-                            and it causes silly things to happen.
-                          -->
-                        <useProjectArtifact>false</useProjectArtifact>
-                    
-                        <!--
-                            Unpack the binary dependencies so we have a nice
-                            uber jar that can run with java -jar and need not have
-                            CLASSPATH configured and so on.
-                          -->
-                        <unpack>true</unpack>
-                    </dependencySet>
-                </dependencySets>
-
-
-            </binaries>
-
-        </moduleSet>
-       
-    </moduleSets>
-
-    <!--
-        What do we want to include in the jar from each project
-      -->
-    <fileSets>
-        <fileSet>
-
-            <!--
-                We need the output classes and resources etc.
-              -->
-            <directory>${project.build.outputDirectory}</directory>
-        </fileSet>
-    </fileSets>
-
-</assembly>
diff --git a/antlr-3.4/antlrsources.xml b/antlr-3.4/antlrsources.xml
deleted file mode 100644
index 953c7fc..0000000
--- a/antlr-3.4/antlrsources.xml
+++ /dev/null
@@ -1,172 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-
-    This is the assembly descriptor for building a full source code
-    distribution of ANTLR and all its related components. This assembly
-    only includes the Java oriented source code, hence only the Java runtime
-    is included in the resulting jar.
-
-    The resulting jar is distribution that can be expanded with:
-
-      jar xvf antlr-master-3.x.x-src.jar
-
-    The output directory will be antlr-master-3.x.x and in here will be
-    the BUILD.txt fie, which explains how to build ANTLR.
-
-    Jim Idle - May, 2009
- -->
-<assembly>
-
-    <!-- The name of this assembly descriptor, which is referenced in
-         the master pom.xml using <assemblyRef> (although in fact we
-         reference the file name that contains it to avoid cluttering
-         the pom.
-      -->
-    <id>src</id>
-
-    <!-- We have elected to produce only a jar output and to use the line
-         endings of whatever platform we are running on. More formats
-         can be added for simultaneous production, such as <format>zip</format>
-      -->
-    <formats>
-        <format>jar</format>
-    </formats>
-
-    <!--
-        The resulting archives will have a base directory named after the master
-        artifact, rather than just extract into the current directory.
-      -->
-    <includeBaseDirectory>true</includeBaseDirectory>
-
-    <!-- We need to described the source code of each of the modules we want
-         including in the archive. In the main this is because we did not store
-         the modules in perforce using directory names that match the module
-         names. This was for historic reasons as we already moved everything
-         about massively, just to move to Maven in the first place.
-      -->
-    <moduleSets>
-
-        <!-- Describe the gUnit source code.
-          -->
-        <moduleSet>
-
-            <!-- The Maven artifact name tells the assembly artifact a bunch
-                 of information to start with, such as its location in the current
-                 tree and so on.
-              -->
-            <includes>
-                <include>org.antlr:antlr-runtime</include>
-            </includes>
-
-            <!-- What sources do we wish to include from this module?
-              -->
-            <sources>
-
-                <!-- Because the Java runtime source is not in a directory
-                     called antlr-runtime, directly underneath the master
-                     directory, we need to map the output directory so that
-                     instead of starting with the name of the artifact, it
-                     is in the place where the build expects it.
-                  -->
-                <outputDirectoryMapping>runtime/Java</outputDirectoryMapping>
-
-                <fileSets>
-                     <!-- We have one file set, being the src sub-directory, which in
-                          the output archive, we also want to be called src/
-                       -->
-                    <fileSet>
-                        <directory>src</directory>
-                        <outputDirectory>src</outputDirectory>
-                    </fileSet>
-
-                    <!-- In the base runtime/Java directory, we need to include a number
-                         of files that either document the module or control the
-                         build. These are not underneath the src directory of course
-                         so they need to be named here (which nicely documents what
-                         is included.
-                      -->
-                    <fileSet>
-                        <includes>
-                            <include>pom.xml</include>
-                            <include>doxyfile</include>
-                            <include>antlr.config</include>
-                        </includes>
-                    </fileSet>
-                </fileSets>
-            </sources>
-
-        </moduleSet>
-
-        <!-- Describe the ANTLR tool source code.
-          -->
-        <moduleSet>
-            <includes>
-                <include>org.antlr:antlr</include>
-            </includes>
-
-            <!-- What sources do we wish to include from this module?
-              -->
-            <sources>
-
-                <!-- Because the tool source code is not in a directory
-                     called antlr, nor directly underneath the master
-                     directory, we need to map the output directory so that
-                     instead of starting with the name of the artifact, it
-                     is in the place where the build expects it.
-                  -->
-                <outputDirectoryMapping>tool</outputDirectoryMapping>
-
-
-                <fileSets>
-
-                    <!-- We have one file set, being the src sub-directory, which in
-                         the output archive, we also want to be called src/
-                      -->
-                    <fileSet>
-                        <directory>src</directory>
-                        <outputDirectory>src</outputDirectory>
-                    </fileSet>
-
-                    <!-- In the base tool directory, we need to include a number
-                         of files that either document the module or control the
-                         build. These are not underneath the src directory of course
-                         so they need to be named here (which nicely documents what
-                         is included.
-                      -->
-                    <fileSet>
-                        <includes>
-                            <include>pom.xml</include>
-                            <include>CHANGES.txt</include>
-                            <include>LICENSE.txt</include>
-                            <include>README.txt</include>
-                            <include>antlr.config</include>
-                        </includes>
-                    </fileSet>
-
-                </fileSets>
-
-            </sources>
-
-        </moduleSet>
-
-    </moduleSets>
-
-    <!-- In the base directory of the master build directory (the root of all
-         the other sources), there are a number of files that describe or control
-         the build (such as the master pom.xml and the BUILD.txt files). Hence
-         we need to describe them in their own fileset. No output mapping is required here
-         of course.
-      -->
-    <fileSets>
-        <fileSet>
-            <includes>
-                <include>pom.xml</include>
-                <include>antlrjar.xml</include>
-                <include>antlrsources.xml</include>
-                <include>BUILD.txt</include>
-            </includes>
-        </fileSet>
-    </fileSets>
-
-</assembly>
diff --git a/antlr-3.4/gunit-maven-plugin/pom.xml b/antlr-3.4/gunit-maven-plugin/pom.xml
deleted file mode 100644
index a11a50e..0000000
--- a/antlr-3.4/gunit-maven-plugin/pom.xml
+++ /dev/null
@@ -1,269 +0,0 @@
-<!--
-
- [The "BSD license"]
-
- ANTLR        - Copyright (c) 2005-2010 Terence Parr
- Maven Plugin - Copyright (c) 2009      Jim Idle
-
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
-    derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-  -->
-
-<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">
-
-    <!--
-        The ANTLR Maven artifacts are now released via the Sonotype OSS
-        repository, which means that they are synced to Maven central 
-        within a few minutes of hitting the release repo for Sonotype.
-        To enable this, we inherit from the Sonotype provided parent
-        pom. However, we must also configure our .m2/settings.xml to include
-        the snapshot and staging server and the sonotype password. This 
-        means that only ANTLR developers can released the artifacts, but
-        anyone can build locally.
-      -->
-    <parent>
-        <groupId>org.sonatype.oss</groupId>
-        <artifactId>oss-parent</artifactId>
-        <version>7</version>
-    </parent> 
-    
-    <modelVersion>4.0.0</modelVersion>
-
-    <prerequisites>
-        <maven>2.0</maven>
-    </prerequisites>
-
-    <groupId>org.antlr</groupId>
-    <artifactId>maven-gunit-plugin</artifactId>
-    <packaging>maven-plugin</packaging>
-    <version>3.4</version>
-
-    <name>Maven plugin for gUnit ANTLR V3.4</name>
-	<description>A Maven plugin for incorporating gUnit testing of grammars</description>
-    <url>http://antlr.org</url>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    </properties>
-
-    <!-- Where do we track bugs for this project?
-      -->
-    <issueManagement>
-        <system>JIRA</system>
-        <url>http://antlr.org/jira/browse/ANTLR</url>
-    </issueManagement>
-
-    <!-- Location of the license description for this project
-      -->
-    <licenses>
-        <license>
-            <distribution>repo</distribution>
-            <name>The BSD License</name>
-            <url>http://www.antlr.org/LICENSE.txt </url>
-        </license>
-    </licenses>
-
-    <profiles>
-        <profile>
-            <id>release-sign-artifacts</id>
-            <activation>
-                <property>
-                    <name>deploy</name>
-                    <value>true</value>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-gpg-plugin</artifactId>
-                        <version>1.3</version>
-                        <executions>
-                            <execution>
-                                <id>sign-artifacts</id>
-                                <phase>verify</phase>
-                                <goals>
-                                   <goal>sign</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
-    
-    <!-- Ancilliary information for completeness
-      -->
-    <inceptionYear>2009</inceptionYear>
-
-    <mailingLists>
-        <mailingList>
-            <archive>http://antlr.markmail.org/</archive>
-            <otherArchives>
-                <otherArchive>http://www.antlr.org/pipermail/antlr-interest/</otherArchive>
-            </otherArchives>
-            <name>ANTLR Users</name>
-            <subscribe>http://www.antlr.org/mailman/listinfo/antlr-interest/</subscribe>
-            <unsubscribe>http://www.antlr.org/mailman/options/antlr-interest/</unsubscribe>
-            <post>antlr-interest@antlr.org</post>
-        </mailingList>
-    </mailingLists>
-
-    <organization>
-        <name>ANTLR.org</name>
-        <url>http://www.antlr.org</url>
-    </organization>
-    <!-- ============================================================================= -->
-
-    <!--
-
-     What are we depedent on for the Mojos to execute? We need the
-     plugin API itself and of course we need the ANTLR Tool and runtime
-     and any of their dependencies, which we inherit. The Tool itself provides
-     us with all the dependencies, so we need only name it here.
-      -->
-    <dependencies>
-
-        <!--
-          The things we need to build the target language recognizer
-          -->
-        <dependency>
-            <groupId>org.apache.maven</groupId>
-            <artifactId>maven-plugin-api</artifactId>
-            <version>2.0</version>
-            <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.maven</groupId>
-            <artifactId>maven-project</artifactId>
-            <version>2.0</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.codehaus.plexus</groupId>
-            <artifactId>plexus-compiler-api</artifactId>
-            <version>1.5.3</version>
-        </dependency>
-
-        <!--
-         The version of ANTLR tool that this version of the plugin controls.
-         We have decided that this should be in lockstep with ANTLR itself, other
-         than -1 -2 -3 etc patch releases.
-          -->
-        <dependency>
-            <groupId>org.antlr</groupId>
-            <artifactId>antlr</artifactId>
-            <version>3.4</version>
-        </dependency>
-
-        <!--
-         Dependency on the gUnit artifact.
-        -->
-        <dependency>
-            <groupId>${groupId}</groupId>
-            <artifactId>gunit</artifactId>
-            <version>3.4</version>
-        </dependency>
-
-        <!--
-          Testing requirements...
-          -->
-        <dependency>
-
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.8.2</version>
-            <scope>test</scope>
-
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.maven.shared</groupId>
-            <artifactId>maven-plugin-testing-harness</artifactId>
-            <version>1.0</version>
-            <scope>test</scope>
-        </dependency>
-        
-    </dependencies>
-    
-    <build>
-
-        <defaultGoal>install</defaultGoal>
-        <plugins>
-            
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>2.0.2</version>
-                <configuration>
-                    <source>1.6</source>
-                    <target>jsr14</target>
-                </configuration>
-            </plugin>
-            
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-project-info-reports-plugin</artifactId>
-                <version>2.4</version>
-                <configuration>
-                    <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
-                </configuration>
-            </plugin>
-
-            <plugin>  
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-                <version>2.1.2</version>
-                <executions>
-                    <execution>
-                        <id>attach-sources</id>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-			
-            <plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-javadoc-plugin</artifactId>
-                <version>2.8</version>
-				<executions>
-					<execution>
-						<id>attach-javadocs</id>
-						<goals>
-							<goal>jar</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-            
-        </plugins>
-
-    </build>
-
-</project>
diff --git a/antlr-3.4/gunit-maven-plugin/src/main/java/org/antlr/mojo/antlr3/GUnitExecuteMojo.java b/antlr-3.4/gunit-maven-plugin/src/main/java/org/antlr/mojo/antlr3/GUnitExecuteMojo.java
deleted file mode 100644
index db3f569..0000000
--- a/antlr-3.4/gunit-maven-plugin/src/main/java/org/antlr/mojo/antlr3/GUnitExecuteMojo.java
+++ /dev/null
@@ -1,410 +0,0 @@
-package org.antlr.mojo.antlr3;
-
-import java.util.List;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.io.File;
-import java.io.IOException;
-import java.io.Writer;
-import java.io.FileWriter;
-import java.io.BufferedWriter;
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.net.URLClassLoader;
-
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.project.MavenProject;
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.DependencyResolutionRequiredException;
-import org.apache.maven.artifact.versioning.ArtifactVersion;
-import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
-import org.apache.maven.artifact.versioning.OverConstrainedVersionException;
-import org.codehaus.plexus.util.StringUtils;
-import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.compiler.util.scan.mapping.SourceMapping;
-import org.codehaus.plexus.compiler.util.scan.mapping.SuffixMapping;
-import org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner;
-import org.codehaus.plexus.compiler.util.scan.SimpleSourceInclusionScanner;
-import org.codehaus.plexus.compiler.util.scan.InclusionScanException;
-import org.antlr.runtime.ANTLRFileStream;
-import org.antlr.runtime.RecognitionException;
-import org.antlr.gunit.GrammarInfo;
-import org.antlr.gunit.gUnitExecutor;
-import org.antlr.gunit.AbstractTest;
-import org.antlr.gunit.Interp;
-
-/**
- * Takes gUnit scripts and directly performs testing.
- *
- * @goal gunit
- *
- * @phase test
- * @requiresDependencyResolution test
- * @requiresProject true
- *
- * @author Steve Ebersole
- */
-public class GUnitExecuteMojo extends AbstractMojo {
-	public static final String ANTLR_GROUP_ID = "org.antlr";
-	public static final String ANTLR_ARTIFACT_NAME = "antlr";
-	public static final String ANTLR_RUNTIME_ARTIFACT_NAME = "antlr-runtime";
-
-	/**
-     * INTERNAL : The Maven Project to which we are attached
-     *
-     * @parameter expression="${project}"
-     * @required
-     */
-    private MavenProject project;
-
-	/**
-	 * INTERNAL : The artifacts associated to the dependencies defined as part
-	 * of our configuration within the project to which we are being attached.
-	 *
-	 * @parameter expression="${plugin.artifacts}"
-     * @required
-     * @readonly
-	 */
-	private List<Artifact> pluginArtifacts;
-
-	/**
-     * Specifies the directory containing the gUnit testing files.
-     *
-     * @parameter expression="${basedir}/src/test/gunit"
-     * @required
-     */
-    private File sourceDirectory;
-
-    /**
-     * A set of patterns for matching files from the sourceDirectory that
-     * should be included as gUnit source files.
-     *
-     * @parameter
-     */
-    private Set includes;
-
-    /**
-     * A set of exclude patterns.
-     *
-     * @parameter
-     */
-    private Set excludes;
-
-	/**
-     * Specifies directory to which gUnit reports should get written.
-     *
-     * @parameter expression="${basedir}/target/gunit-report"
-     * @required
-     */
-    private File reportDirectory;
-
-	/**
-	 * Should gUnit functionality be completely by-passed?
-	 * <p/>
-	 * By default we skip gUnit tests if the user requested that all testing be skipped using 'maven.test.skip'
-	 *
-	 * @parameter expression="${maven.test.skip}"
-	 */
-	private boolean skip;
-
-	public Set getIncludePatterns() {
-		return includes == null || includes.isEmpty()
-				? Collections.singleton( "**/*.testsuite" )
-				: includes;
-	}
-
-	public Set getExcludePatterns() {
-		return excludes == null
-				? Collections.emptySet()
-				: excludes;
-	}
-
-
-	public final void execute() throws MojoExecutionException, MojoFailureException {
-		if ( skip ) {
-			getLog().info( "Skipping gUnit processing" );
-			return;
-		}
-		Artifact pluginAntlrArtifact = determinePluginAntlrArtifact();
-
-		validateProjectsAntlrVersion( determineArtifactVersion( pluginAntlrArtifact ) );
-
-		performExecution( determineProjectCompileScopeClassLoader( pluginAntlrArtifact ) );
-	}
-
-	private Artifact determinePluginAntlrArtifact() throws MojoExecutionException {
-		for ( Artifact artifact : pluginArtifacts ) {
-			boolean match = ANTLR_GROUP_ID.equals( artifact.getGroupId() )
-					&& ANTLR_ARTIFACT_NAME.equals( artifact.getArtifactId() );
-			if ( match ) {
-				return artifact;
-			}
-		}
-		throw new MojoExecutionException(
-				"Unexpected state : could not locate " + ANTLR_GROUP_ID + ':' + ANTLR_ARTIFACT_NAME +
-						" in plugin dependencies"
-		);
-	}
-
-	private ArtifactVersion determineArtifactVersion(Artifact artifact) throws MojoExecutionException {
-		try {
-			return artifact.getVersion() != null
-					? new DefaultArtifactVersion( artifact.getVersion() )
-					: artifact.getSelectedVersion();
-		}
-		catch ( OverConstrainedVersionException e ) {
-			throw new MojoExecutionException( "artifact [" + artifact.getId() + "] defined an overly constrained version range" );
-		}
-	}
-
-	private void validateProjectsAntlrVersion(ArtifactVersion pluginAntlrVersion) throws MojoExecutionException {
-		Artifact antlrArtifact = null;
-		Artifact antlrRuntimeArtifact = null;
-
-		if ( project.getCompileArtifacts() != null ) {
-			for ( Object o : project.getCompileArtifacts() ) {
-				final Artifact artifact = ( Artifact ) o;
-				if ( ANTLR_GROUP_ID.equals( artifact.getGroupId() ) ) {
-					if ( ANTLR_ARTIFACT_NAME.equals( artifact.getArtifactId() ) ) {
-						antlrArtifact = artifact;
-						break;
-					}
-					if ( ANTLR_RUNTIME_ARTIFACT_NAME.equals( artifact.getArtifactId() ) ) {
-						antlrRuntimeArtifact = artifact;
-					}
-				}
-			}
-		}
-
-		validateBuildTimeArtifact( antlrArtifact, pluginAntlrVersion );
-		validateRunTimeArtifact( antlrRuntimeArtifact, pluginAntlrVersion );
-	}
-
-	@SuppressWarnings(value = "unchecked")
-	protected void validateBuildTimeArtifact(Artifact antlrArtifact, ArtifactVersion pluginAntlrVersion)
-			throws MojoExecutionException {
-		if ( antlrArtifact == null ) {
-			validateMissingBuildtimeArtifact();
-			return;
-		}
-
-		// otherwise, lets make sure they match...
-		ArtifactVersion projectAntlrVersion = determineArtifactVersion( antlrArtifact );
-		if ( pluginAntlrVersion.compareTo( projectAntlrVersion ) != 0 ) {
-			getLog().warn(
-					"Encountered " + ANTLR_GROUP_ID + ':' + ANTLR_ARTIFACT_NAME + ':' + projectAntlrVersion.toString() +
-							" which did not match Antlr version used by plugin [" + pluginAntlrVersion.toString() + "]"
-			);
-		}
-	}
-
-	protected void validateMissingBuildtimeArtifact() {
-		// generally speaking, its ok for the project to not define a dep on the build-time artifact...
-	}
-
-	@SuppressWarnings(value = "unchecked")
-	protected void validateRunTimeArtifact(Artifact antlrRuntimeArtifact, ArtifactVersion pluginAntlrVersion)
-			throws MojoExecutionException {
-		if ( antlrRuntimeArtifact == null ) {
-			// its possible, if the project instead depends on the build-time (or full) artifact.
-			return;
-		}
-
-		ArtifactVersion projectAntlrVersion = determineArtifactVersion( antlrRuntimeArtifact );
-		if ( pluginAntlrVersion.compareTo( projectAntlrVersion ) != 0 ) {
-			getLog().warn(
-					"Encountered " + ANTLR_GROUP_ID + ':' + ANTLR_RUNTIME_ARTIFACT_NAME + ':' + projectAntlrVersion.toString() +
-							" which did not match Antlr version used by plugin [" + pluginAntlrVersion.toString() + "]"
-			);
-		}
-	}
-
-	/**
-	 * Builds the classloader to pass to gUnit.
-	 *
-	 * @param antlrArtifact The plugin's (our) Antlr dependency artifact.
-	 *
-	 * @return The classloader for gUnit to use
-	 *
-	 * @throws MojoExecutionException Problem resolving artifacts to {@link java.net.URL urls}.
-	 */
-	private ClassLoader determineProjectCompileScopeClassLoader(Artifact antlrArtifact)
-			throws MojoExecutionException {
-		ArrayList<URL> classPathUrls = new ArrayList<URL>();
-		getLog().info( "Adding Antlr artifact : " + antlrArtifact.getId() );
-		classPathUrls.add( resolveLocalURL( antlrArtifact ) );
-
-		for ( String path : classpathElements() ) {
-			try {
-				getLog().info( "Adding project compile classpath element : " + path );
-				classPathUrls.add( new File( path ).toURI().toURL() );
-			}
-			catch ( MalformedURLException e ) {
-				throw new MojoExecutionException( "Unable to build path URL [" + path + "]" );
-			}
-		}
-
-		return new URLClassLoader( classPathUrls.toArray( new URL[classPathUrls.size()] ), getClass().getClassLoader() );
-	}
-
-	protected static URL resolveLocalURL(Artifact artifact) throws MojoExecutionException {
-		try {
-			return artifact.getFile().toURI().toURL();
-		}
-		catch ( MalformedURLException e ) {
-			throw new MojoExecutionException( "Unable to resolve artifact url : " + artifact.getId(), e );
-		}
-	}
-
-	@SuppressWarnings( "unchecked" )
-	private List<String> classpathElements() throws MojoExecutionException {
-		try {
-			// todo : should we combine both compile and test scoped elements?
-			return ( List<String> ) project.getTestClasspathElements();
-		}
-		catch ( DependencyResolutionRequiredException e ) {
-			throw new MojoExecutionException( "Call to Project#getCompileClasspathElements required dependency resolution" );
-		}
-	}
-
-	private void performExecution(ClassLoader projectCompileScopeClassLoader) throws MojoExecutionException {
-		getLog().info( "gUnit report directory : " + reportDirectory.getAbsolutePath() );
-		if ( !reportDirectory.exists() ) {
-			boolean directoryCreated = reportDirectory.mkdirs();
-			if ( !directoryCreated ) {
-				getLog().warn( "mkdirs() reported problem creating report directory" );
-			}
-		}
-
-		Result runningResults = new Result();
-		ArrayList<String> failureNames = new ArrayList<String>();
-
-		System.out.println();
-		System.out.println( "-----------------------------------------------------------" );
-		System.out.println( " G U N I T   R E S U L T S" );
-		System.out.println( "-----------------------------------------------------------" );
-
-		for ( File script : collectIncludedSourceGrammars() ) {
-			final String scriptPath = script.getAbsolutePath();
-			System.out.println( "Executing script " + scriptPath );
-			try {
-				String scriptBaseName = StringUtils.chompLast( FileUtils.basename( script.getName() ), "." );
-
-				ANTLRFileStream antlrStream = new ANTLRFileStream( scriptPath );
-				GrammarInfo grammarInfo = Interp.parse( antlrStream );
-				gUnitExecutor executor = new gUnitExecutor(
-						grammarInfo,
-						projectCompileScopeClassLoader,
-						script.getParentFile().getAbsolutePath()
-				);
-
-				String report = executor.execTest();
-				writeReportFile( new File( reportDirectory, scriptBaseName + ".txt" ), report );
-
-				Result testResult = new Result();
-				testResult.tests = executor.numOfTest;
-				testResult.failures = executor.numOfFailure;
-				testResult.invalids = executor.numOfInvalidInput;
-
-				System.out.println( testResult.render() );
-
-				runningResults.add( testResult );
-				for ( AbstractTest test : executor.failures ) {
-					failureNames.add( scriptBaseName + "#" + test.getHeader() );
-				}
-			}
-			catch ( IOException e ) {
-				throw new MojoExecutionException( "Could not open specified script file", e );
-			}
-			catch ( RecognitionException e ) {
-				throw new MojoExecutionException( "Could not parse gUnit script", e );
-			}
-		}
-
-		System.out.println();
-		System.out.println( "Summary :" );
-		if ( ! failureNames.isEmpty() ) {
-			System.out.println( "  Found " + failureNames.size() + " failures" );
-			for ( String name : failureNames ) {
-				System.out.println( "    - " + name );
-			}
-		}
-		System.out.println( runningResults.render() );
-		System.out.println();
-
-		if ( runningResults.failures > 0 ) {
-			throw new MojoExecutionException( "Found gUnit test failures" );
-		}
-
-		if ( runningResults.invalids > 0 ) {
-			throw new MojoExecutionException( "Found invalid gUnit tests" );
-		}
-	}
-
-	private Set<File> collectIncludedSourceGrammars() throws MojoExecutionException {
-		SourceMapping mapping = new SuffixMapping( "g", Collections.EMPTY_SET );
-        SourceInclusionScanner scan = new SimpleSourceInclusionScanner( getIncludePatterns(), getExcludePatterns() );
-        scan.addSourceMapping( mapping );
-		try {
-			Set scanResults = scan.getIncludedSources( sourceDirectory, null );
-			Set<File> results = new HashSet<File>();
-			for ( Object result : scanResults ) {
-				if ( result instanceof File ) {
-					results.add( ( File ) result );
-				}
-				else if ( result instanceof String ) {
-					results.add( new File( ( String ) result ) );
-				}
-				else {
-					throw new MojoExecutionException( "Unexpected result type from scanning [" + result.getClass().getName() + "]" );
-				}
-			}
-			return results;
-		}
-		catch ( InclusionScanException e ) {
-			throw new MojoExecutionException( "Error determining gUnit sources", e );
-		}
-	}
-
-	private void writeReportFile(File reportFile, String results) {
-		try {
-			Writer writer = new FileWriter( reportFile );
-			writer = new BufferedWriter( writer );
-			try {
-				writer.write( results );
-				writer.flush();
-			}
-			finally {
-				try {
-					writer.close();
-				}
-				catch ( IOException ignore ) {
-				}
-			}
-		}
-		catch ( IOException e ) {
-			getLog().warn(  "Error writing gUnit report file", e );
-		}
-	}
-
-	private static class Result {
-		private int tests = 0;
-		private int failures = 0;
-		private int invalids = 0;
-
-		public String render() {
-			return String.format( "Tests run: %d,  Failures: %d,  Invalid: %d", tests, failures, invalids );
-		}
-
-		public void add(Result result) {
-			this.tests += result.tests;
-			this.failures += result.failures;
-			this.invalids += result.invalids;
-		}
-	}
-
-}
diff --git a/antlr-3.4/gunit/pom.xml b/antlr-3.4/gunit/pom.xml
deleted file mode 100644
index cb35b6b..0000000
--- a/antlr-3.4/gunit/pom.xml
+++ /dev/null
@@ -1,126 +0,0 @@
-<?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>org.antlr</groupId>
-    <artifactId>gunit</artifactId>
-    <packaging>jar</packaging>
-  
-    <name>ANTLR gUnit v3.4</name>
-  <!--
-
-    Inherit from the ANTLR master pom, which tells us what
-    version we are and allows us to inherit dependencies
-    and so on.
-
-    -->
-    <parent>
-        <groupId>org.antlr</groupId>
-        <artifactId>antlr-master</artifactId>
-        <version>3.4</version>
-    </parent>
-
-    <url>http://www.antlr.org/wiki/display/ANTLR3/gUnit+-+Grammar+Unit+Testing</url>
-  
-  <!--
-
-    Tell Maven which other artifacts we need in order to
-    build, run and test the ANTLR Tool. The ANTLR Tool uses earlier versions
-    of ANTLR at runtime (for the moment), uses the current
-    released version of ANTLR String template, but obviously is
-    reliant on the latest snapshot of the runtime, which will either be
-    taken from the antlr-snapshot repository, or your local .m2
-    repository if you built and installed that locally.
-
-    -->
-    <dependencies>
-
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.8.2</version>
-            <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.antlr</groupId>
-            <artifactId>antlr</artifactId>
-            <version>${project.version}</version>
-            <scope>compile</scope>
-            
-        </dependency>
-
-        <dependency>
-            <groupId>org.antlr</groupId>
-            <artifactId>ST4</artifactId>
-            <version>4.0.4</version>
-            <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.antlr</groupId>
-            <artifactId>stringtemplate</artifactId>
-            <version>3.2.1</version>
-            <scope>compile</scope>
-        </dependency>
-        
-    </dependencies>
-
-    <build>
-
-        <defaultGoal>install</defaultGoal>
-
-        <plugins>
-
-            <plugin>
-                <groupId>org.antlr</groupId>
-                <artifactId>antlr3-maven-plugin</artifactId>
-                <version>${project.version}</version>
-                <configuration></configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>antlr</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.6</source>
-                    <target>jsr14</target>
-                    <sourceDirectory>src</sourceDirectory>
-                </configuration>
-            </plugin>
-
-            <plugin>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <version>2.9</version>
-            </plugin>
-
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>findbugs-maven-plugin</artifactId>
-                <version>2.3.2</version>
-                <configuration>
-                    <findbugsXmlOutput>true</findbugsXmlOutput>
-                    <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
-                    <xmlOutput>true</xmlOutput>
-                </configuration>
-            </plugin>
-
-        </plugins>
-
-        <extensions>
-            <extension>
-                <groupId>org.apache.maven.wagon</groupId>
-                <artifactId>wagon-ssh-external</artifactId>
-                <version>1.0-beta-2</version>
-            </extension>
-        </extensions>
-
-    
-    </build>
-
-</project>
diff --git a/antlr-3.4/gunit/src/main/antlr3/org/antlr/gunit/swingui/parsers/StGUnit.g b/antlr-3.4/gunit/src/main/antlr3/org/antlr/gunit/swingui/parsers/StGUnit.g
deleted file mode 100644
index 1701214..0000000
--- a/antlr-3.4/gunit/src/main/antlr3/org/antlr/gunit/swingui/parsers/StGUnit.g
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
-[The "BSD licence"]
-Copyright (c) 2007-2008 Leon Jen-Yuan Su
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
-    derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-grammar StGUnit;
-
-options {language=Java;}
-
-tokens {
-	OK = 'OK';
-	FAIL = 'FAIL';
-	DOC_COMMENT;
-}
-
-@header {
-package org.antlr.gunit.swingui.parsers;
-import org.antlr.gunit.swingui.model.*;
-import org.antlr.gunit.swingui.runner.*;
-}
-
-@lexer::header {package org.antlr.gunit.swingui.parsers;}
-
-@members {
-public TestSuiteAdapter adapter ;;
-}
-
-gUnitDef
-	:	'gunit' name=id {adapter.setGrammarName($name.text);}
-	    ('walks' id)? ';' 
-		header? suite*
-	;
-
-header
-	:	'@header' ACTION
-	;
-		
-suite
-	:	(	parserRule=RULE_REF ('walks' RULE_REF)? 
-	        {adapter.startRule($parserRule.text);}
-		|	lexerRule=TOKEN_REF 
-			{adapter.startRule($lexerRule.text);}
-		)
-		':'
-		test+
-		{adapter.endRule();}
-	;
-
-test
-	:	input expect
-		{adapter.addTestCase($input.in, $expect.out);}
-	;
-	
-expect returns [ITestCaseOutput out]
-	:	OK			{$out = adapter.createBoolOutput(true);}
-	|	FAIL		{$out = adapter.createBoolOutput(false);}
-	|	'returns' RETVAL {$out = adapter.createReturnOutput($RETVAL.text);}
-	|	'->' output {$out = adapter.createStdOutput($output.text);}
-	|	'->' AST	{$out = adapter.createAstOutput($AST.text);}
-	;
-
-input returns [ITestCaseInput in]
-	:	STRING 		{$in = adapter.createStringInput($STRING.text);}
-	|	ML_STRING	{$in = adapter.createMultiInput($ML_STRING.text);}
-	|	fileInput	{$in = adapter.createFileInput($fileInput.path);}
-	;
-
-output
-	:	STRING
-	|	ML_STRING
-	|	ACTION
-	;
-	
-fileInput returns [String path]
-	:	id {$path = $id.text;} (EXT {$path += $EXT.text;})? 
-	;
-
-id 	:	TOKEN_REF
-	|	RULE_REF
-	;
-
-// L E X I C A L   R U L E S
-
-SL_COMMENT
- 	:	'//' ~('\r'|'\n')* '\r'? '\n' {$channel=HIDDEN;}
-	;
-
-ML_COMMENT
-	:	'/*' {$channel=HIDDEN;} .* '*/'
-	;
-
-STRING
-	:	'"' ( ESC | ~('\\'|'"') )* '"'
-	;
-
-ML_STRING
-	:	'<<' .* '>>' 
-	;
-
-TOKEN_REF
-	:	'A'..'Z' ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*
-	;
-
-RULE_REF
-	:	'a'..'z' ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*
-	;
-
-EXT	:	'.'('a'..'z'|'A'..'Z'|'0'..'9')+;
-
-RETVAL	:	NESTED_RETVAL
-	;
-
-fragment
-NESTED_RETVAL :
-	'['
-	(	options {greedy=false;}
-	:	NESTED_RETVAL
-	|	.
-	)*
-	']'
-	;
-
-AST	:	NESTED_AST (' '? NESTED_AST)*;
-
-fragment
-NESTED_AST :
-	'('
-	(	options {greedy=false;}
-	:	NESTED_AST
-	|	.
-	)*
-	')'
-	;
-
-ACTION
-	:	NESTED_ACTION
-	;
-
-fragment
-NESTED_ACTION :
-	'{'
-	(	options {greedy=false; k=3;}
-	:	NESTED_ACTION
-	|	STRING_LITERAL
-	|	CHAR_LITERAL
-	|	.
-	)*
-	'}'
-	;
-
-fragment
-CHAR_LITERAL
-	:	'\'' ( ESC | ~('\''|'\\') ) '\''
-	;
-
-fragment
-STRING_LITERAL
-	:	'"' ( ESC | ~('\\'|'"') )* '"'
-	;
-
-fragment
-ESC	:	'\\'
-		(	'n'
-		|	'r'
-		|	't'
-		|	'b'
-		|	'f'
-		|	'"'
-		|	'\''
-		|	'\\'
-		|	'>'
-		|	'u' XDIGIT XDIGIT XDIGIT XDIGIT
-		|	. // unknown, leave as it is
-		)
-	;
-	
-fragment
-XDIGIT :
-		'0' .. '9'
-	|	'a' .. 'f'
-	|	'A' .. 'F'
-	;
-
-WS	:	(	' '
-		|	'\t'
-		|	'\r'? '\n'
-		)+
-		{$channel=HIDDEN;}
-	;
diff --git a/antlr-3.4/gunit/src/main/java/org/antlr/gunit/AbstractTest.java b/antlr-3.4/gunit/src/main/java/org/antlr/gunit/AbstractTest.java
deleted file mode 100644
index 158bf04..0000000
--- a/antlr-3.4/gunit/src/main/java/org/antlr/gunit/AbstractTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- [The "BSD license"]
- Copyright (c) 2007 Kenny MacDermid
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
-    derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-package org.antlr.gunit;
-
-public abstract class AbstractTest implements ITestCase {
-	// store essential individual test result for string template
-	protected String header;
-	protected String actual;
-	
-	protected boolean hasErrorMsg;
-	
-	private String testedRuleName;
-	private int testCaseIndex;
-	
-	// TODO: remove these. They're only used as part of a refactor to keep the
-	//       code cleaner. It is a mock-instanceOf() replacement.
-	public abstract int getType();
-	public abstract String getText();
-	
-	public abstract String getExpected();
-	// return an escaped string of the expected result
-	public String getExpectedResult() {
-		String expected = getExpected();
-		if ( expected!=null ) expected = JUnitCodeGen.escapeForJava(expected);
-		return expected;
-	}
-	public abstract String getResult(gUnitTestResult testResult);
-	public String getHeader() { return this.header; }
-	public String getActual() { return this.actual; }
-	// return an escaped string of the actual result
-	public String getActualResult() {
-		String actual = getActual();
-		// there is no need to escape the error message from ANTLR 
-		if ( actual!=null && !hasErrorMsg ) actual = JUnitCodeGen.escapeForJava(actual);
-		return actual;
-	}
-	
-	public String getTestedRuleName() { return this.testedRuleName; }
-	public int getTestCaseIndex() { return this.testCaseIndex; }
-	
-	public void setHeader(String rule, String lexicalRule, String treeRule, int numOfTest, int line) {
-		StringBuffer buf = new StringBuffer();
-		buf.append("test" + numOfTest + " (");
-		if ( treeRule!=null ) {
-			buf.append(treeRule+" walks ");
-		}
-		if ( lexicalRule!=null ) {
-			buf.append(lexicalRule + ", line"+line+")" + " - ");
-		}
-		else buf.append(rule + ", line"+line+")" + " - ");
-		this.header = buf.toString();
-	}
-	public void setActual(String actual) { this.actual = actual; }
-	
-	public void setTestedRuleName(String testedRuleName) { this.testedRuleName = testedRuleName; }
-	public void setTestCaseIndex(int testCaseIndex) { this.testCaseIndex = testCaseIndex; }
-	
-}
diff --git a/antlr-3.4/gunit/src/main/java/org/antlr/gunit/JUnitCodeGen.java b/antlr-3.4/gunit/src/main/java/org/antlr/gunit/JUnitCodeGen.java
deleted file mode 100644
index 4713cf7..0000000
--- a/antlr-3.4/gunit/src/main/java/org/antlr/gunit/JUnitCodeGen.java
+++ /dev/null
@@ -1,405 +0,0 @@
-/*
- [The "BSD licence"]
- Copyright (c) 2007-2008 Leon Jen-Yuan Su
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
-    derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-package org.antlr.gunit;
-
-import org.antlr.stringtemplate.StringTemplate;
-import org.antlr.stringtemplate.StringTemplateGroup;
-import org.antlr.stringtemplate.StringTemplateGroupLoader;
-import org.antlr.stringtemplate.CommonGroupLoader;
-import org.antlr.stringtemplate.language.AngleBracketTemplateLexer;
-
-import java.io.*;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.logging.ConsoleHandler;
-import java.util.logging.Handler;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-public class JUnitCodeGen {
-    public GrammarInfo grammarInfo;
-    public Map<String, String> ruleWithReturn;
-    private final String testsuiteDir;
-    private String outputDirectoryPath = ".";
-
-    private final static Handler console = new ConsoleHandler();
-    private static final Logger logger = Logger.getLogger(JUnitCodeGen.class.getName());
-    static {
-        logger.addHandler(console);
-    }
-
-    public JUnitCodeGen(GrammarInfo grammarInfo, String testsuiteDir) throws ClassNotFoundException {
-        this( grammarInfo, determineClassLoader(), testsuiteDir);
-    }
-
-    private static ClassLoader determineClassLoader() {
-        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-        if ( classLoader == null ) {
-            classLoader = JUnitCodeGen.class.getClassLoader();
-        }
-        return classLoader;
-    }
-
-    public JUnitCodeGen(GrammarInfo grammarInfo, ClassLoader classLoader, String testsuiteDir) throws ClassNotFoundException {
-        this.grammarInfo = grammarInfo;
-        this.testsuiteDir = testsuiteDir;
-        /** Map the name of rules having return value to its return type */
-        ruleWithReturn = new HashMap<String, String>();
-        Class parserClass = locateParserClass( grammarInfo, classLoader );
-        Method[] methods = parserClass.getDeclaredMethods();
-        for(Method method : methods) {
-            if ( !method.getReturnType().getName().equals("void") ) {
-                ruleWithReturn.put(method.getName(), method.getReturnType().getName().replace('$', '.'));
-            }
-        }
-    }
-
-    private Class locateParserClass(GrammarInfo grammarInfo, ClassLoader classLoader) throws ClassNotFoundException {
-        String parserClassName = grammarInfo.getGrammarName() + "Parser";
-        if ( grammarInfo.getGrammarPackage() != null ) {
-            parserClassName = grammarInfo.getGrammarPackage()+ "." + parserClassName;
-        }
-        return classLoader.loadClass( parserClassName );
-    }
-
-    public String getOutputDirectoryPath() {
-        return outputDirectoryPath;
-    }
-
-    public void setOutputDirectoryPath(String outputDirectoryPath) {
-        this.outputDirectoryPath = outputDirectoryPath;
-    }
-
-    public void compile() throws IOException{
-        String junitFileName;
-        if ( grammarInfo.getTreeGrammarName()!=null ) {
-            junitFileName = "Test"+grammarInfo.getTreeGrammarName();
-        }
-        else {
-            junitFileName = "Test"+grammarInfo.getGrammarName();
-        }
-        String lexerName = grammarInfo.getGrammarName()+"Lexer";
-        String parserName = grammarInfo.getGrammarName()+"Parser";
-
-        StringTemplateGroupLoader loader = new CommonGroupLoader("org/antlr/gunit", null);
-        StringTemplateGroup.registerGroupLoader(loader);
-        StringTemplateGroup.registerDefaultLexer(AngleBracketTemplateLexer.class);
-        StringBuffer buf = compileToBuffer(junitFileName, lexerName, parserName);
-        writeTestFile(".", junitFileName+".java", buf.toString());
-    }
-
-    public StringBuffer compileToBuffer(String className, String lexerName, String parserName) {
-        StringTemplateGroup group = StringTemplateGroup.loadGroup("junit");
-        StringBuffer buf = new StringBuffer();
-        buf.append(genClassHeader(group, className, lexerName, parserName));
-        buf.append(genTestRuleMethods(group));
-        buf.append("\n\n}");
-        return buf;
-    }
-
-    protected String genClassHeader(StringTemplateGroup group, String junitFileName, String lexerName, String parserName) {
-        StringTemplate classHeaderST = group.getInstanceOf("classHeader");
-        if ( grammarInfo.getTestPackage()!=null ) {	// Set up class package if there is
-            classHeaderST.setAttribute("header", "package "+grammarInfo.getTestPackage()+";");
-        }
-        classHeaderST.setAttribute("junitFileName", junitFileName);
-
-        String lexerPath = null;
-        String parserPath = null;
-        String treeParserPath = null;
-        String packagePath = null;
-        boolean isTreeGrammar = false;
-        boolean hasPackage = false;
-        /** Set up appropriate class path for parser/tree parser if using package */
-        if ( grammarInfo.getGrammarPackage()!=null ) {
-            hasPackage = true;
-            packagePath = "./"+grammarInfo.getGrammarPackage().replace('.', '/');
-            lexerPath = grammarInfo.getGrammarPackage()+"."+lexerName;
-            parserPath = grammarInfo.getGrammarPackage()+"."+parserName;
-            if ( grammarInfo.getTreeGrammarName()!=null ) {
-                treeParserPath = grammarInfo.getGrammarPackage()+"."+grammarInfo.getTreeGrammarName();
-                isTreeGrammar = true;
-            }
-        }
-        else {
-            lexerPath = lexerName;
-            parserPath = parserName;
-            if ( grammarInfo.getTreeGrammarName()!=null ) {
-                treeParserPath = grammarInfo.getTreeGrammarName();
-                isTreeGrammar = true;
-            }
-        }
-        // also set up custom tree adaptor if necessary
-        String treeAdaptorPath = null;
-        boolean hasTreeAdaptor = false;
-        if ( grammarInfo.getAdaptor()!=null ) {
-            hasTreeAdaptor = true;
-            treeAdaptorPath = grammarInfo.getAdaptor();
-        }
-        classHeaderST.setAttribute("hasTreeAdaptor", hasTreeAdaptor);
-        classHeaderST.setAttribute("treeAdaptorPath", treeAdaptorPath);
-        classHeaderST.setAttribute("hasPackage", hasPackage);
-        classHeaderST.setAttribute("packagePath", packagePath);
-        classHeaderST.setAttribute("lexerPath", lexerPath);
-        classHeaderST.setAttribute("parserPath", parserPath);
-        classHeaderST.setAttribute("treeParserPath", treeParserPath);
-        classHeaderST.setAttribute("isTreeGrammar", isTreeGrammar);
-        return classHeaderST.toString();
-    }
-
-    protected String genTestRuleMethods(StringTemplateGroup group) {
-        StringBuffer buf = new StringBuffer();
-        if ( grammarInfo.getTreeGrammarName()!=null ) {	// Generate junit codes of for tree grammar rule
-            genTreeMethods(group, buf);
-        }
-        else {	// Generate junit codes of for grammar rule
-            genParserMethods(group, buf);
-        }
-        return buf.toString();
-    }
-
-    private void genParserMethods(StringTemplateGroup group, StringBuffer buf) {
-        for ( gUnitTestSuite ts: grammarInfo.getRuleTestSuites() ) {
-            int i = 0;
-            for ( gUnitTestInput input: ts.testSuites.keySet() ) {	// each rule may contain multiple tests
-                i++;
-                StringTemplate testRuleMethodST;
-                /** If rule has multiple return values or ast*/
-                if ( ts.testSuites.get(input).getType()== gUnitParser.ACTION && ruleWithReturn.containsKey(ts.getRuleName()) ) {
-                    testRuleMethodST = group.getInstanceOf("testRuleMethod2");
-                    String outputString = ts.testSuites.get(input).getText();
-                    testRuleMethodST.setAttribute("methodName", "test"+changeFirstCapital(ts.getRuleName())+i);
-                    testRuleMethodST.setAttribute("testRuleName", '"'+ts.getRuleName()+'"');
-                    testRuleMethodST.setAttribute("test", input);
-                    testRuleMethodST.setAttribute("returnType", ruleWithReturn.get(ts.getRuleName()));
-                    testRuleMethodST.setAttribute("expecting", outputString);
-                }
-                else {
-                    String testRuleName;
-                    // need to determine whether it's a test for parser rule or lexer rule
-                    if ( ts.isLexicalRule() ) testRuleName = ts.getLexicalRuleName();
-                    else testRuleName = ts.getRuleName();
-                    testRuleMethodST = group.getInstanceOf("testRuleMethod");
-                    String outputString = ts.testSuites.get(input).getText();
-                    testRuleMethodST.setAttribute("isLexicalRule", ts.isLexicalRule());
-                    testRuleMethodST.setAttribute("methodName", "test"+changeFirstCapital(testRuleName)+i);
-                    testRuleMethodST.setAttribute("testRuleName", '"'+testRuleName+'"');
-                    testRuleMethodST.setAttribute("test", input);
-                    testRuleMethodST.setAttribute("tokenType", getTypeString(ts.testSuites.get(input).getType()));
-
-                    // normalize whitespace
-                    outputString = normalizeTreeSpec(outputString);
-
-                    if ( ts.testSuites.get(input).getType()==gUnitParser.ACTION ) {	// trim ';' at the end of ACTION if there is...
-                        //testRuleMethodST.setAttribute("expecting", outputString.substring(0, outputString.length()-1));
-                        testRuleMethodST.setAttribute("expecting", outputString);
-                    }
-                    else if ( ts.testSuites.get(input).getType()==gUnitParser.RETVAL ) {	// Expected: RETVAL
-                        testRuleMethodST.setAttribute("expecting", outputString);
-                    }
-                    else {	// Attach "" to expected STRING or AST
-                        // strip newlines for (...) tree stuff
-                        outputString = outputString.replaceAll("\n", "");
-                        testRuleMethodST.setAttribute("expecting", '"'+escapeForJava(outputString)+'"');
-                    }
-                }
-                buf.append(testRuleMethodST.toString());
-            }
-        }
-    }
-
-    private void genTreeMethods(StringTemplateGroup group, StringBuffer buf) {
-        for ( gUnitTestSuite ts: grammarInfo.getRuleTestSuites() ) {
-            int i = 0;
-            for ( gUnitTestInput input: ts.testSuites.keySet() ) {	// each rule may contain multiple tests
-                i++;
-                StringTemplate testRuleMethodST;
-                /** If rule has multiple return values or ast*/
-                if ( ts.testSuites.get(input).getType()== gUnitParser.ACTION && ruleWithReturn.containsKey(ts.getTreeRuleName()) ) {
-                    testRuleMethodST = group.getInstanceOf("testTreeRuleMethod2");
-                    String outputString = ts.testSuites.get(input).getText();
-                    testRuleMethodST.setAttribute("methodName", "test"+changeFirstCapital(ts.getTreeRuleName())+"_walks_"+
-                                                                changeFirstCapital(ts.getRuleName())+i);
-                    testRuleMethodST.setAttribute("testTreeRuleName", '"'+ts.getTreeRuleName()+'"');
-                    testRuleMethodST.setAttribute("testRuleName", '"'+ts.getRuleName()+'"');
-                    testRuleMethodST.setAttribute("test", input);
-                    testRuleMethodST.setAttribute("returnType", ruleWithReturn.get(ts.getTreeRuleName()));
-                    testRuleMethodST.setAttribute("expecting", outputString);
-                }
-                else {
-                    testRuleMethodST = group.getInstanceOf("testTreeRuleMethod");
-                    String outputString = ts.testSuites.get(input).getText();
-                    testRuleMethodST.setAttribute("methodName", "test"+changeFirstCapital(ts.getTreeRuleName())+"_walks_"+
-                                                                changeFirstCapital(ts.getRuleName())+i);
-                    testRuleMethodST.setAttribute("testTreeRuleName", '"'+ts.getTreeRuleName()+'"');
-                    testRuleMethodST.setAttribute("testRuleName", '"'+ts.getRuleName()+'"');
-                    testRuleMethodST.setAttribute("test", input);
-                    testRuleMethodST.setAttribute("tokenType", getTypeString(ts.testSuites.get(input).getType()));
-
-                    if ( ts.testSuites.get(input).getType()==gUnitParser.ACTION ) {	// trim ';' at the end of ACTION if there is...
-                        //testRuleMethodST.setAttribute("expecting", outputString.substring(0, outputString.length()-1));
-                        testRuleMethodST.setAttribute("expecting", outputString);
-                    }
-                    else if ( ts.testSuites.get(input).getType()==gUnitParser.RETVAL ) {	// Expected: RETVAL
-                        testRuleMethodST.setAttribute("expecting", outputString);
-                    }
-                    else {	// Attach "" to expected STRING or AST
-                        testRuleMethodST.setAttribute("expecting", '"'+escapeForJava(outputString)+'"');
-                    }
-                }
-                buf.append(testRuleMethodST.toString());
-            }
-        }
-    }
-
-    // return a meaningful gUnit token type name instead of using the magic number
-    public String getTypeString(int type) {
-        String typeText;
-        switch (type) {
-            case gUnitParser.OK :
-                typeText = "org.antlr.gunit.gUnitParser.OK";
-                break;
-            case gUnitParser.FAIL :
-                typeText = "org.antlr.gunit.gUnitParser.FAIL";
-                break;
-            case gUnitParser.STRING :
-                typeText = "org.antlr.gunit.gUnitParser.STRING";
-                break;
-            case gUnitParser.ML_STRING :
-                typeText = "org.antlr.gunit.gUnitParser.ML_STRING";
-                break;
-            case gUnitParser.RETVAL :
-                typeText = "org.antlr.gunit.gUnitParser.RETVAL";
-                break;
-            case gUnitParser.AST :
-                typeText = "org.antlr.gunit.gUnitParser.AST";
-                break;
-            default :
-                typeText = "org.antlr.gunit.gUnitParser.EOF";
-                break;
-        }
-        return typeText;
-    }
-
-    protected void writeTestFile(String dir, String fileName, String content) {
-        try {
-            File f = new File(dir, fileName);
-            FileWriter w = new FileWriter(f);
-            BufferedWriter bw = new BufferedWriter(w);
-            bw.write(content);
-            bw.close();
-            w.close();
-        }
-        catch (IOException ioe) {
-            logger.log(Level.SEVERE, "can't write file", ioe);
-        }
-    }
-
-    public static String escapeForJava(String inputString) {
-        // Gotta escape literal backslash before putting in specials that use escape.
-        inputString = inputString.replace("\\", "\\\\");
-        // Then double quotes need escaping (singles are OK of course).
-        inputString = inputString.replace("\"", "\\\"");
-        // note: replace newline to String ".\n", replace tab to String ".\t"
-        inputString = inputString.replace("\n", "\\n").replace("\t", "\\t").replace("\r", "\\r").replace("\b", "\\b").replace("\f", "\\f");
-
-        return inputString;
-    }
-
-    protected String changeFirstCapital(String ruleName) {
-        String firstChar = String.valueOf(ruleName.charAt(0));
-        return firstChar.toUpperCase()+ruleName.substring(1);
-    }
-
-    public static String normalizeTreeSpec(String t) {
-        List<String> words = new ArrayList<String>();
-        int i = 0;
-        StringBuilder word = new StringBuilder();
-        while ( i<t.length() ) {
-            if ( t.charAt(i)=='(' || t.charAt(i)==')' ) {
-                if ( word.length()>0 ) {
-                    words.add(word.toString());
-                    word.setLength(0);
-                }
-                words.add(String.valueOf(t.charAt(i)));
-                i++;
-                continue;
-            }
-            if ( Character.isWhitespace(t.charAt(i)) ) {
-                // upon WS, save word
-                if ( word.length()>0 ) {
-                    words.add(word.toString());
-                    word.setLength(0);
-                }
-                i++;
-                continue;
-            }
-
-            // ... "x" or ...("x"
-            if ( t.charAt(i)=='"' && (i-1)>=0 &&
-                 (t.charAt(i-1)=='(' || Character.isWhitespace(t.charAt(i-1))) )
-            {
-                i++;
-                while ( i<t.length() && t.charAt(i)!='"' ) {
-                    if ( t.charAt(i)=='\\' &&
-                         (i+1)<t.length() && t.charAt(i+1)=='"' ) // handle \"
-                    {
-                        word.append('"');
-                        i+=2;
-                        continue;
-                    }
-                    word.append(t.charAt(i));
-                    i++;
-                }
-                i++; // skip final "
-                words.add(word.toString());
-                word.setLength(0);
-                continue;
-            }
-            word.append(t.charAt(i));
-            i++;
-        }
-        if ( word.length()>0 ) {
-            words.add(word.toString());
-        }
-        //System.out.println("words="+words);
-        StringBuilder buf = new StringBuilder();
-        for (int j=0; j<words.size(); j++) {
-            if ( j>0 && !words.get(j).equals(")") &&
-                 !words.get(j-1).equals("(") ) {
-                buf.append(' ');
-            }
-            buf.append(words.get(j));
-        }
-        return buf.toString();
-    }
-
-}
diff --git a/antlr-3.4/gunit/src/main/java/org/antlr/gunit/gUnitBaseTest.java b/antlr-3.4/gunit/src/main/java/org/antlr/gunit/gUnitBaseTest.java
deleted file mode 100644
index bf089c3..0000000
--- a/antlr-3.4/gunit/src/main/java/org/antlr/gunit/gUnitBaseTest.java
+++ /dev/null
@@ -1,489 +0,0 @@
-/*
- [The "BSD licence"]
- Copyright (c) 2007-2008 Leon, Jen-Yuan Su
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
-    derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-package org.antlr.gunit;
-
-import junit.framework.TestCase;
-import org.antlr.runtime.*;
-import org.antlr.runtime.tree.CommonTree;
-import org.antlr.runtime.tree.CommonTreeNodeStream;
-import org.antlr.runtime.tree.TreeAdaptor;
-import org.antlr.runtime.tree.TreeNodeStream;
-import org.antlr.stringtemplate.StringTemplate;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.PrintStream;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-/** All gUnit-generated JUnit class should extend this class 
- *  which implements the essential methods for triggering
- *  ANTLR parser/tree walker
- */
-public abstract class gUnitBaseTest extends TestCase {
-	
-	public String treeAdaptorPath;
-	public String packagePath;
-	public String lexerPath;
-	public String parserPath;
-	public String treeParserPath;
-	
-	protected String stdout;
-	protected String stderr;
-	
-	private PrintStream console = System.out;
-	private PrintStream consoleErr = System.err;
-	
-	// Invoke target lexer.rule
-	public String execLexer(String testRuleName, int line, String testInput, boolean isFile) throws Exception {
-		CharStream input;
-		/** Set up ANTLR input stream based on input source, file or String */
-		if ( isFile ) {
-			String filePath = testInput;
-			File testInputFile = new File(filePath);
-			// if input test file is not found under the current dir, also try to look for it under the package dir
-			if ( !testInputFile.exists() && packagePath!=null ) {
-				testInputFile = new File(packagePath, filePath);
-				if ( testInputFile.exists() ) filePath = testInputFile.getCanonicalPath();
-			}
-			input = new ANTLRFileStream(filePath);
-		}
-		else {
-			input = new ANTLRStringStream(testInput);
-		}
-		Class lexer = null;
-		PrintStream ps = null;		// for redirecting stdout later
-		PrintStream ps2 = null;		// for redirecting stderr later
-        try {
-            /** Use Reflection to create instances of lexer and parser */
-        	lexer = Class.forName(lexerPath);
-            Class[] lexArgTypes = new Class[]{CharStream.class};				// assign type to lexer's args
-            Constructor lexConstructor = lexer.getConstructor(lexArgTypes);        
-            Object[] lexArgs = new Object[]{input};								// assign value to lexer's args   
-            Lexer lexObj = (Lexer)lexConstructor.newInstance(lexArgs);				// makes new instance of lexer    
-            input.setLine(line);
-
-            Method ruleName = lexer.getMethod("m"+testRuleName, new Class[0]);
-            
-            /** Start of I/O Redirecting */
-            ByteArrayOutputStream out = new ByteArrayOutputStream();
-            ByteArrayOutputStream err = new ByteArrayOutputStream();
-            ps = new PrintStream(out);
-            ps2 = new PrintStream(err);
-            System.setOut(ps);
-            System.setErr(ps2);
-            /** End of redirecting */
-
-            /** Invoke lexer rule, and get the current index in CharStream */
-            ruleName.invoke(lexObj, new Object[0]);
-            Method ruleName2 = lexer.getMethod("getCharIndex", new Class[0]);
-            int currentIndex = (Integer) ruleName2.invoke(lexObj, new Object[0]);
-            if ( currentIndex!=input.size() ) {
-            	ps2.println("extra text found, '"+input.substring(currentIndex, input.size()-1)+"'");
-            }
-			
-            this.stdout = null;
-			this.stderr = null;
-            
-			if ( err.toString().length()>0 ) {
-				this.stderr = err.toString();
-				return this.stderr;
-			}
-			if ( out.toString().length()>0 ) {
-				this.stdout = out.toString();
-			}
-			if ( err.toString().length()==0 && out.toString().length()==0 ) {
-				return null;
-			}
-        } catch (ClassNotFoundException e) {
-        	e.printStackTrace(); System.exit(1);
-        } catch (SecurityException e) {
-        	e.printStackTrace(); System.exit(1);
-        } catch (NoSuchMethodException e) {
-        	e.printStackTrace(); System.exit(1);
-        } catch (IllegalArgumentException e) {
-        	e.printStackTrace(); System.exit(1);
-        } catch (InstantiationException e) {
-        	e.printStackTrace(); System.exit(1);
-        } catch (IllegalAccessException e) {
-        	e.printStackTrace(); System.exit(1);
-        } catch (InvocationTargetException e) {	// This exception could be caused from ANTLR Runtime Exception, e.g. MismatchedTokenException
-        	if ( e.getCause()!=null ) this.stderr = e.getCause().toString();
-			else this.stderr = e.toString();
-        	return this.stderr;
-        } finally {
-        	try {
-        		if ( ps!=null ) ps.close();
-    			if ( ps2!=null ) ps2.close();
-    			System.setOut(console);			// Reset standard output
-    			System.setErr(consoleErr);		// Reset standard err out
-        	} catch (Exception e) {
-        		e.printStackTrace();
-        	}
-        }
-        return this.stdout;
-	}
-	
-	// Invoke target parser.rule
-	
-	public Object execParser(String testRuleName, int line, String testInput, boolean isFile) throws Exception {
-		CharStream input;
-		/** Set up ANTLR input stream based on input source, file or String */
-		if ( isFile ) {
-			String filePath = testInput;
-			File testInputFile = new File(filePath);
-			// if input test file is not found under the current dir, also try to look for it under the package dir
-			if ( !testInputFile.exists() && packagePath!=null ) {
-				testInputFile = new File(packagePath, filePath);
-				if ( testInputFile.exists() ) filePath = testInputFile.getCanonicalPath();
-			}
-			input = new ANTLRFileStream(filePath);
-		}
-		else {
-			input = new ANTLRStringStream(testInput);
-		}
-		Class lexer = null;
-		Class parser = null;
-		PrintStream ps = null;		// for redirecting stdout later
-		PrintStream ps2 = null;		// for redirecting stderr later
-        ByteArrayOutputStream out = null;
-        ByteArrayOutputStream err = null;
-		try {
-			/** Use Reflection to create instances of lexer and parser */
-			lexer = Class.forName(lexerPath);
-            Class[] lexArgTypes = new Class[]{CharStream.class};				// assign type to lexer's args
-            Constructor lexConstructor = lexer.getConstructor(lexArgTypes);
-            Object[] lexArgs = new Object[]{input};								// assign value to lexer's args   
-            Lexer lexObj = (Lexer)lexConstructor.newInstance(lexArgs);				// makes new instance of lexer
-            input.setLine(line);
-
-            CommonTokenStream tokens = new CommonTokenStream(lexObj);
-            parser = Class.forName(parserPath);
-            Class[] parArgTypes = new Class[]{TokenStream.class};				// assign type to parser's args
-            Constructor parConstructor = parser.getConstructor(parArgTypes);
-            Object[] parArgs = new Object[]{tokens};							// assign value to parser's args  
-            Parser parObj = (Parser)parConstructor.newInstance(parArgs);				// makes new instance of parser
-            
-            // set up customized tree adaptor if necessary
-            if ( treeAdaptorPath!=null ) {
-            	parArgTypes = new Class[]{TreeAdaptor.class};
-            	Method _setTreeAdaptor = parser.getMethod("setTreeAdaptor", parArgTypes);
-            	Class _treeAdaptor = Class.forName(treeAdaptorPath);
-            	_setTreeAdaptor.invoke(parObj, _treeAdaptor.newInstance());
-            }
-
-            Method ruleName = parser.getMethod(testRuleName);
-
-            /** Start of I/O Redirecting */
-            out = new ByteArrayOutputStream();
-            err = new ByteArrayOutputStream();
-            ps = new PrintStream(out);
-            ps2 = new PrintStream(err);
-            System.setOut(ps);
-            System.setErr(ps2);
-            /** End of redirecting */
-
-			/** Invoke grammar rule, and store if there is a return value */
-            Object ruleReturn = ruleName.invoke(parObj);
-            String astString = null;
-            String stString = null;
-            /** If rule has return value, determine if it contains an AST or a ST */
-            if ( ruleReturn!=null ) {
-                if ( ruleReturn.getClass().toString().indexOf(testRuleName+"_return")>0 ) {
-                	try {	// NullPointerException may happen here...
-                		Class _return = Class.forName(parserPath+"$"+testRuleName+"_return");
-                		Method[] methods = _return.getDeclaredMethods();
-                		for(Method method : methods) {
-			                if ( method.getName().equals("getTree") ) {
-			                	Method returnName = _return.getMethod("getTree");
-		                    	CommonTree tree = (CommonTree) returnName.invoke(ruleReturn);
-		                    	astString = tree.toStringTree();
-			                }
-			                else if ( method.getName().equals("getTemplate") ) {
-			                	Method returnName = _return.getMethod("getTemplate");
-			                	StringTemplate st = (StringTemplate) returnName.invoke(ruleReturn);
-			                	stString = st.toString();
-			                }
-			            }
-                	}
-                	catch(Exception e) {
-                		System.err.println(e);	// Note: If any exception occurs, the test is viewed as failed.
-                	}
-                }
-            }
-
-			this.stdout = "";
-			this.stderr = "";
-			
-			/** Invalid input */
-            if ( tokens.index()!=tokens.size()-1 ) {
-            	//throw new InvalidInputException();
-            	this.stderr += "Stopped parsing at token index "+tokens.index()+": ";
-            }
-            
-			// retVal could be actual return object from rule, stderr or stdout
-            this.stdout += out.toString();
-            this.stderr += err.toString();
-
-			if ( err.toString().length()>0 ) return this.stderr;
-			if ( out.toString().length()>0 ) return this.stdout;
-			if ( astString!=null ) {	// Return toStringTree of AST
-				return astString;
-			}
-			else if ( stString!=null ) {// Return toString of ST
-				return stString;
-			}
-			if ( ruleReturn!=null ) {
-				return ruleReturn;
-			}
-			if ( err.toString().length()==0 && out.toString().length()==0 ) {
-				return null;
-			}
-		}
-        catch (ClassNotFoundException e) {
-			e.printStackTrace(); System.exit(1);
-		}
-        catch (SecurityException e) {
-			e.printStackTrace(); System.exit(1);
-		}
-        catch (NoSuchMethodException e) {
-			e.printStackTrace(); System.exit(1);
-		}
-        catch (IllegalAccessException e) {
-			e.printStackTrace(); System.exit(1);
-		}
-        catch (InvocationTargetException e) {
-            this.stdout = out.toString();
-            this.stderr = err.toString();
-
-			if ( e.getCause()!=null ) this.stderr += e.getCause().toString();
-			else this.stderr += e.toString();
-        	return this.stderr;
-		} finally {
-        	try {
-        		if ( ps!=null ) ps.close();
-    			if ( ps2!=null ) ps2.close();
-    			System.setOut(console);			// Reset standard output
-    			System.setErr(consoleErr);		// Reset standard err out
-        	} catch (Exception e) {
-        		e.printStackTrace();
-        	}
-        }
-		return this.stdout;
-	}
-	
-	// Invoke target parser.rule
-	public Object execTreeParser(String testTreeRuleName, String testRuleName, String testInput, boolean isFile) throws Exception {
-		CharStream input;
-		if ( isFile ) {
-			String filePath = testInput;
-			File testInputFile = new File(filePath);
-			// if input test file is not found under the current dir, also try to look for it under the package dir
-			if ( !testInputFile.exists() && packagePath!=null ) {
-				testInputFile = new File(packagePath, filePath);
-				if ( testInputFile.exists() ) filePath = testInputFile.getCanonicalPath();
-			}
-			input = new ANTLRFileStream(filePath);
-		}
-		else {
-			input = new ANTLRStringStream(testInput);
-		}
-		Class lexer = null;
-		Class parser = null;
-		Class treeParser = null;
-		PrintStream ps = null;		// for redirecting stdout later
-		PrintStream ps2 = null;		// for redirecting stderr later
-		try {
-			/** Use Reflection to create instances of lexer and parser */
-        	lexer = Class.forName(lexerPath);
-            Class[] lexArgTypes = new Class[]{CharStream.class};				// assign type to lexer's args
-            Constructor lexConstructor = lexer.getConstructor(lexArgTypes);        
-            Object[] lexArgs = new Object[]{input};								// assign value to lexer's args   
-            Object lexObj = lexConstructor.newInstance(lexArgs);				// makes new instance of lexer    
-            
-            CommonTokenStream tokens = new CommonTokenStream((Lexer) lexObj);
-            
-            parser = Class.forName(parserPath);
-            Class[] parArgTypes = new Class[]{TokenStream.class};				// assign type to parser's args
-            Constructor parConstructor = parser.getConstructor(parArgTypes);
-            Object[] parArgs = new Object[]{tokens};							// assign value to parser's args  
-            Object parObj = parConstructor.newInstance(parArgs);				// makes new instance of parser      
-            
-            // set up customized tree adaptor if necessary
-            TreeAdaptor customTreeAdaptor = null; 
-            if ( treeAdaptorPath!=null ) {
-            	parArgTypes = new Class[]{TreeAdaptor.class};
-            	Method _setTreeAdaptor = parser.getMethod("setTreeAdaptor", parArgTypes);
-            	Class _treeAdaptor = Class.forName(treeAdaptorPath);
-            	customTreeAdaptor = (TreeAdaptor) _treeAdaptor.newInstance();
-            	_setTreeAdaptor.invoke(parObj, customTreeAdaptor);
-            }
-            
-            Method ruleName = parser.getMethod(testRuleName);
-
-            /** Start of I/O Redirecting */
-            ByteArrayOutputStream out = new ByteArrayOutputStream();
-            ByteArrayOutputStream err = new ByteArrayOutputStream();
-            ps = new PrintStream(out);
-            ps2 = new PrintStream(err);
-            System.setOut(ps);
-            System.setErr(ps2);
-            /** End of redirecting */
-
-            /** Invoke grammar rule, and get the return value */
-            Object ruleReturn = ruleName.invoke(parObj);
-            
-            Class _return = Class.forName(parserPath+"$"+testRuleName+"_return");            	
-        	Method returnName = _return.getMethod("getTree");
-        	CommonTree tree = (CommonTree) returnName.invoke(ruleReturn);
-
-        	// Walk resulting tree; create tree nodes stream first
-        	CommonTreeNodeStream nodes;
-        	if ( customTreeAdaptor!=null ) {
-        		nodes = new CommonTreeNodeStream(customTreeAdaptor, tree);
-        	}
-        	else {
-        		nodes = new CommonTreeNodeStream(tree);
-        	}
-        	// AST nodes have payload that point into token stream
-        	nodes.setTokenStream(tokens);
-        	// Create a tree walker attached to the nodes stream
-        	treeParser = Class.forName(treeParserPath);
-            Class[] treeParArgTypes = new Class[]{TreeNodeStream.class};		// assign type to tree parser's args
-            Constructor treeParConstructor = treeParser.getConstructor(treeParArgTypes);
-            Object[] treeParArgs = new Object[]{nodes};							// assign value to tree parser's args  
-            Object treeParObj = treeParConstructor.newInstance(treeParArgs);	// makes new instance of tree parser      
-        	// Invoke the tree rule, and store the return value if there is
-            Method treeRuleName = treeParser.getMethod(testTreeRuleName);
-            Object treeRuleReturn = treeRuleName.invoke(treeParObj);
-            
-            String astString = null;
-            String stString = null;
-            /** If tree rule has return value, determine if it contains an AST or a ST */
-            if ( treeRuleReturn!=null ) {
-                if ( treeRuleReturn.getClass().toString().indexOf(testTreeRuleName+"_return")>0 ) {
-                	try {	// NullPointerException may happen here...
-                		Class _treeReturn = Class.forName(treeParserPath+"$"+testTreeRuleName+"_return");
-                		Method[] methods = _treeReturn.getDeclaredMethods();
-			            for(Method method : methods) {
-			                if ( method.getName().equals("getTree") ) {
-			                	Method treeReturnName = _treeReturn.getMethod("getTree");
-		                    	CommonTree returnTree = (CommonTree) treeReturnName.invoke(treeRuleReturn);
-		                        astString = returnTree.toStringTree();
-			                }
-			                else if ( method.getName().equals("getTemplate") ) {
-			                	Method treeReturnName = _return.getMethod("getTemplate");
-			                	StringTemplate st = (StringTemplate) treeReturnName.invoke(treeRuleReturn);
-			                	stString = st.toString();
-			                }
-			            }
-                	}
-                	catch(Exception e) {
-                		System.err.println(e);	// Note: If any exception occurs, the test is viewed as failed.
-                	}
-                }
-            }
-
-			this.stdout = null;
-			this.stderr = null;
-			
-			/** Invalid input */
-            if ( tokens.index()!=tokens.size()-1 ) {
-            	throw new InvalidInputException();
-            }
-			
-			// retVal could be actual return object from rule, stderr or stdout
-			if ( err.toString().length()>0 ) {
-				this.stderr = err.toString();
-				return this.stderr;
-			}
-			if ( out.toString().length()>0 ) {
-				this.stdout = out.toString();
-			}
-			if ( astString!=null ) {	// Return toStringTree of AST
-				return astString;
-			}
-			else if ( stString!=null ) {// Return toString of ST
-				return stString;
-			}
-			if ( treeRuleReturn!=null ) {
-				return treeRuleReturn;
-			}
-			if ( err.toString().length()==0 && out.toString().length()==0 ) {
-				return null;
-			}
-		} catch (ClassNotFoundException e) {
-			e.printStackTrace(); System.exit(1);
-		} catch (SecurityException e) {
-			e.printStackTrace(); System.exit(1);
-		} catch (NoSuchMethodException e) {
-			e.printStackTrace(); System.exit(1);
-		} catch (IllegalAccessException e) {
-			e.printStackTrace(); System.exit(1);
-		} catch (InvocationTargetException e) {
-			if ( e.getCause()!=null ) this.stderr = e.getCause().toString();
-			else this.stderr = e.toString();
-        	return this.stderr;
-		} finally {
-        	try {
-        		if ( ps!=null ) ps.close();
-    			if ( ps2!=null ) ps2.close();
-    			System.setOut(console);			// Reset standard output
-    			System.setErr(consoleErr);		// Reset standard err out
-        	} catch (Exception e) {
-        		e.printStackTrace();
-        	}
-        }
-		return stdout;
-	}
-	
-	// Modify the return value if the expected token type is OK or FAIL
-	public Object examineExecResult(int tokenType, Object retVal) {	
-		if ( tokenType==gUnitParser.OK ) {	// expected Token: OK
-			if ( this.stderr==null ) {
-				return "OK";
-			}
-			else {
-				return "FAIL, "+this.stderr;
-			}
-		}
-		else if ( tokenType==gUnitParser.FAIL ) {	// expected Token: FAIL
-			if ( this.stderr!=null ) {
-				return "FAIL";
-			}
-			else {
-				return "OK";
-			}
-		}
-		else {	// return the same object for the other token types
-			return retVal;
-		}		
-	}
-	
-}
diff --git a/antlr-3.4/gunit/src/main/java/org/antlr/gunit/gUnitExecutor.java b/antlr-3.4/gunit/src/main/java/org/antlr/gunit/gUnitExecutor.java
deleted file mode 100644
index 8498c65..0000000
--- a/antlr-3.4/gunit/src/main/java/org/antlr/gunit/gUnitExecutor.java
+++ /dev/null
@@ -1,653 +0,0 @@
-/*
- [The "BSD licence"]
- Copyright (c) 2007-2008 Leon Jen-Yuan Su
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
-    derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-package org.antlr.gunit;
-
-import org.antlr.runtime.*;
-import org.antlr.runtime.tree.CommonTree;
-import org.antlr.runtime.tree.CommonTreeNodeStream;
-import org.antlr.runtime.tree.TreeAdaptor;
-import org.antlr.runtime.tree.TreeNodeStream;
-import org.antlr.stringtemplate.CommonGroupLoader;
-import org.antlr.stringtemplate.StringTemplate;
-import org.antlr.stringtemplate.StringTemplateGroup;
-import org.antlr.stringtemplate.StringTemplateGroupLoader;
-import org.antlr.stringtemplate.language.AngleBracketTemplateLexer;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-
-public class gUnitExecutor implements ITestSuite {
-	public GrammarInfo grammarInfo;
-
-	private final ClassLoader grammarClassLoader;
-
-	private final String testsuiteDir;
-
-	public int numOfTest;
-
-	public int numOfSuccess;
-
-	public int numOfFailure;
-
-	private String title;
-
-	public int numOfInvalidInput;
-
-	private String parserName;
-
-	private String lexerName;
-
-	public List<AbstractTest> failures;
-	public List<AbstractTest> invalids;
-
-	private PrintStream console = System.out;
-    private PrintStream consoleErr = System.err;
-
-    public gUnitExecutor(GrammarInfo grammarInfo, String testsuiteDir) {
-    	this( grammarInfo, determineClassLoader(), testsuiteDir);
-    }
-
-    private static ClassLoader determineClassLoader() {
-    	ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-    	if ( classLoader == null ) {
-    		classLoader = gUnitExecutor.class.getClassLoader();
-    	}
-    	return classLoader;
-    }
-
-	public gUnitExecutor(GrammarInfo grammarInfo, ClassLoader grammarClassLoader, String testsuiteDir) {
-		this.grammarInfo = grammarInfo;
-		this.grammarClassLoader = grammarClassLoader;
-		this.testsuiteDir = testsuiteDir;
-		numOfTest = 0;
-		numOfSuccess = 0;
-		numOfFailure = 0;
-		numOfInvalidInput = 0;
-		failures = new ArrayList<AbstractTest>();
-		invalids = new ArrayList<AbstractTest>();
-	}
-
-	protected ClassLoader getGrammarClassLoader() {
-		return grammarClassLoader;
-	}
-
-	protected final Class classForName(String name) throws ClassNotFoundException {
-		return getGrammarClassLoader().loadClass( name );
-	}
-
-	public String execTest() throws IOException{
-		// Set up string template for testing result
-		StringTemplate testResultST = getTemplateGroup().getInstanceOf("testResult");
-		try {
-			/** Set up appropriate path for parser/lexer if using package */
-			if (grammarInfo.getGrammarPackage()!=null ) {
-				parserName = grammarInfo.getGrammarPackage()+"."+grammarInfo.getGrammarName()+"Parser";
-				lexerName = grammarInfo.getGrammarPackage()+"."+grammarInfo.getGrammarName()+"Lexer";
-			}
-			else {
-				parserName = grammarInfo.getGrammarName()+"Parser";
-				lexerName = grammarInfo.getGrammarName()+"Lexer";
-			}
-
-			/*** Start Unit/Functional Testing ***/
-			// Execute unit test of for parser, lexer and tree grammar
-			if ( grammarInfo.getTreeGrammarName()!=null ) {
-				title = "executing testsuite for tree grammar:"+grammarInfo.getTreeGrammarName()+" walks "+parserName;
-			}
-			else {
-				title = "executing testsuite for grammar:"+grammarInfo.getGrammarName();
-			}
-			executeTests();
-			// End of exection of unit testing
-
-			// Fill in the template holes with the test results
-			testResultST.setAttribute("title", title);
-			testResultST.setAttribute("num_of_test", numOfTest);
-			testResultST.setAttribute("num_of_failure", numOfFailure);
-			if ( numOfFailure>0 ) {
-				testResultST.setAttribute("failure", failures);
-			}
-			if ( numOfInvalidInput>0 ) {
-				testResultST.setAttribute("has_invalid", true);
-				testResultST.setAttribute("num_of_invalid", numOfInvalidInput);
-				testResultST.setAttribute("invalid", invalids);
-			}
-		}
-		catch (Exception e) {
-            e.printStackTrace();
-            System.exit(1);
-        }
-		return testResultST.toString();
-	}
-
-	private StringTemplateGroup getTemplateGroup() {
-		StringTemplateGroupLoader loader = new CommonGroupLoader("org/antlr/gunit", null);
-		StringTemplateGroup.registerGroupLoader(loader);
-		StringTemplateGroup.registerDefaultLexer(AngleBracketTemplateLexer.class);
-		StringTemplateGroup group = StringTemplateGroup.loadGroup("gUnitTestResult");
-		return group;
-	}
-
-	// TODO: throw more specific exceptions
-	private gUnitTestResult runCorrectParser(String parserName, String lexerName, String rule, String lexicalRule, String treeRule, gUnitTestInput input) throws Exception
-	{
-		if ( lexicalRule!=null ) return runLexer(lexerName, lexicalRule, input);
-		else if ( treeRule!=null ) return runTreeParser(parserName, lexerName, rule, treeRule, input);
-		else return runParser(parserName, lexerName, rule, input);
-	}
-
-	private void executeTests() throws Exception {
-		for ( gUnitTestSuite ts: grammarInfo.getRuleTestSuites() ) {
-			String rule = ts.getRuleName();
-			String lexicalRule = ts.getLexicalRuleName();
-			String treeRule = ts.getTreeRuleName();
-			for ( gUnitTestInput input: ts.testSuites.keySet() ) {	// each rule may contain multiple tests
-				numOfTest++;
-				// Run parser, and get the return value or stdout or stderr if there is
-				gUnitTestResult result = null;
-				AbstractTest test = ts.testSuites.get(input);
-				try {
-					// TODO: create a -debug option to turn on logging, which shows progress of running tests
-					//System.out.print(numOfTest + ". Running rule: " + rule + "; input: '" + input.testInput + "'");
-					result = runCorrectParser(parserName, lexerName, rule, lexicalRule, treeRule, input);
-					// TODO: create a -debug option to turn on logging, which shows progress of running tests
-					//System.out.println("; Expecting " + test.getExpected() + "; Success?: " + test.getExpected().equals(test.getResult(result)));
-				} catch ( InvalidInputException e) {
-					numOfInvalidInput++;
-                    test.setHeader(rule, lexicalRule, treeRule, numOfTest, input.line);
-					test.setActual(input.input);
-					invalids.add(test);
-					continue;
-				}	// TODO: ensure there's no other exceptions required to be handled here...
-
-				String expected = test.getExpected();
-				String actual = test.getResult(result);
-				test.setActual(actual);
-
-				if (actual == null) {
-					numOfFailure++;
-                    test.setHeader(rule, lexicalRule, treeRule, numOfTest, input.line);
-					test.setActual("null");
-					failures.add(test);
-					onFail(test);
-				}
-				// the 2nd condition is used for the assertFAIL test of lexer rule because BooleanTest return err msg instead of 'FAIL' if isLexerTest
-				else if ( expected.equals(actual) || (expected.equals("FAIL")&&!actual.equals("OK") ) ) {
-					numOfSuccess++;
-					onPass(test);
-				}
-				// TODO: something with ACTIONS - at least create action test type and throw exception.
-				else if ( ts.testSuites.get(input).getType()==gUnitParser.ACTION ) {	// expected Token: ACTION
-					numOfFailure++;
-                    test.setHeader(rule, lexicalRule, treeRule, numOfTest, input.line);
-					test.setActual("\t"+"{ACTION} is not supported in the grammarInfo yet...");
-					failures.add(test);
-					onFail(test);
-				}
-				else {
-					numOfFailure++;
-                    test.setHeader(rule, lexicalRule, treeRule, numOfTest, input.line);
-					failures.add(test);
-					onFail(test);
-				}
-			}	// end of 2nd for-loop: tests for individual rule
-		}	// end of 1st for-loop: testsuites for grammar
-	}
-
-	// TODO: throw proper exceptions
-	protected gUnitTestResult runLexer(String lexerName, String testRuleName, gUnitTestInput testInput) throws Exception {
-		CharStream input;
-		Class lexer = null;
-		PrintStream ps = null;		// for redirecting stdout later
-		PrintStream ps2 = null;		// for redirecting stderr later
-		try {
-			/** Set up ANTLR input stream based on input source, file or String */
-			input = getANTLRInputStream(testInput);
-
-            /** Use Reflection to create instances of lexer and parser */
-        	lexer = classForName(lexerName);
-            Class[] lexArgTypes = new Class[]{CharStream.class};				// assign type to lexer's args
-            Constructor lexConstructor = lexer.getConstructor(lexArgTypes);
-            Object[] lexArgs = new Object[]{input};								// assign value to lexer's args
-            Object lexObj = lexConstructor.newInstance(lexArgs);				// makes new instance of lexer
-
-            Method ruleName = lexer.getMethod("m"+testRuleName, new Class[0]);
-
-            /** Start of I/O Redirecting */
-            ByteArrayOutputStream out = new ByteArrayOutputStream();
-            ByteArrayOutputStream err = new ByteArrayOutputStream();
-            ps = new PrintStream(out);
-            ps2 = new PrintStream(err);
-            System.setOut(ps);
-            System.setErr(ps2);
-            /** End of redirecting */
-
-            /** Invoke lexer rule, and get the current index in CharStream */
-            ruleName.invoke(lexObj, new Object[0]);
-            Method ruleName2 = lexer.getMethod("getCharIndex", new Class[0]);
-            int currentIndex = (Integer) ruleName2.invoke(lexObj, new Object[0]);
-            if ( currentIndex!=input.size() ) {
-            	ps2.print("extra text found, '"+input.substring(currentIndex, input.size()-1)+"'");
-            }
-
-			if ( err.toString().length()>0 ) {
-				gUnitTestResult testResult = new gUnitTestResult(false, err.toString(), true);
-				testResult.setError(err.toString());
-				return testResult;
-			}
-			String stdout = null;
-			if ( out.toString().length()>0 ) {
-				stdout = out.toString();
-			}
-			return new gUnitTestResult(true, stdout, true);
-		} catch (IOException e) {
-			return getTestExceptionResult(e);
-        } catch (ClassNotFoundException e) {
-        	e.printStackTrace(); System.exit(1);
-        } catch (SecurityException e) {
-        	e.printStackTrace(); System.exit(1);
-        } catch (NoSuchMethodException e) {
-        	e.printStackTrace(); System.exit(1);
-        } catch (IllegalArgumentException e) {
-        	e.printStackTrace(); System.exit(1);
-        } catch (InstantiationException e) {
-        	e.printStackTrace(); System.exit(1);
-        } catch (IllegalAccessException e) {
-        	e.printStackTrace(); System.exit(1);
-        } catch (InvocationTargetException e) {	// This exception could be caused from ANTLR Runtime Exception, e.g. MismatchedTokenException
-        	return getTestExceptionResult(e);
-        } finally {
-        	try {
-        		if ( ps!=null ) ps.close();
-    			if ( ps2!=null ) ps2.close();
-    			System.setOut(console);			// Reset standard output
-    			System.setErr(consoleErr);		// Reset standard err out
-        	} catch (Exception e) {
-        		e.printStackTrace();
-        	}
-        }
-        // TODO: verify this:
-        throw new Exception("This should be unreachable?");
-	}
-
-	// TODO: throw proper exceptions
-	protected gUnitTestResult runParser(String parserName, String lexerName, String testRuleName, gUnitTestInput testInput) throws Exception {
-		CharStream input;
-		Class lexer = null;
-		Class parser = null;
-		PrintStream ps = null;		// for redirecting stdout later
-		PrintStream ps2 = null;		// for redirecting stderr later
-		try {
-			/** Set up ANTLR input stream based on input source, file or String */
-			input = getANTLRInputStream(testInput);
-
-            /** Use Reflection to create instances of lexer and parser */
-        	lexer = classForName(lexerName);
-            Class[] lexArgTypes = new Class[]{CharStream.class};				// assign type to lexer's args
-            Constructor lexConstructor = lexer.getConstructor(lexArgTypes);
-            Object[] lexArgs = new Object[]{input};								// assign value to lexer's args
-            Object lexObj = lexConstructor.newInstance(lexArgs);				// makes new instance of lexer
-
-            CommonTokenStream tokens = new CommonTokenStream((Lexer) lexObj);
-
-            parser = classForName(parserName);
-            Class[] parArgTypes = new Class[]{TokenStream.class};				// assign type to parser's args
-            Constructor parConstructor = parser.getConstructor(parArgTypes);
-            Object[] parArgs = new Object[]{tokens};							// assign value to parser's args
-            Object parObj = parConstructor.newInstance(parArgs);				// makes new instance of parser
-
-            // set up customized tree adaptor if necessary
-            if ( grammarInfo.getAdaptor()!=null ) {
-            	parArgTypes = new Class[]{TreeAdaptor.class};
-            	Method _setTreeAdaptor = parser.getMethod("setTreeAdaptor", parArgTypes);
-            	Class _treeAdaptor = classForName(grammarInfo.getAdaptor());
-            	_setTreeAdaptor.invoke(parObj, _treeAdaptor.newInstance());
-            }
-
-            Method ruleName = parser.getMethod(testRuleName);
-
-            /** Start of I/O Redirecting */
-            ByteArrayOutputStream out = new ByteArrayOutputStream();
-            ByteArrayOutputStream err = new ByteArrayOutputStream();
-            ps = new PrintStream(out);
-            ps2 = new PrintStream(err);
-            System.setOut(ps);
-            System.setErr(ps2);
-            /** End of redirecting */
-
-            /** Invoke grammar rule, and store if there is a return value */
-            Object ruleReturn = ruleName.invoke(parObj);
-            String astString = null;
-            String stString = null;
-            /** If rule has return value, determine if it contains an AST or a ST */
-            if ( ruleReturn!=null ) {
-                if ( ruleReturn.getClass().toString().indexOf(testRuleName+"_return")>0 ) {
-                	try {	// NullPointerException may happen here...
-                		Class _return = classForName(parserName+"$"+testRuleName+"_return");
-                		Method[] methods = _return.getDeclaredMethods();
-                		for(Method method : methods) {
-			                if ( method.getName().equals("getTree") ) {
-			                	Method returnName = _return.getMethod("getTree");
-		                    	CommonTree tree = (CommonTree) returnName.invoke(ruleReturn);
-		                    	astString = tree.toStringTree();
-			                }
-			                else if ( method.getName().equals("getTemplate") ) {
-			                	Method returnName = _return.getMethod("getTemplate");
-			                	StringTemplate st = (StringTemplate) returnName.invoke(ruleReturn);
-			                	stString = st.toString();
-			                }
-			            }
-                	}
-                	catch(Exception e) {
-                		System.err.println(e);	// Note: If any exception occurs, the test is viewed as failed.
-                	}
-                }
-            }
-
-            /** Invalid input */
-            if ( tokens.index()!=tokens.size()-1 ) {
-            	//throw new InvalidInputException();
-            	ps2.print("Invalid input");
-            }
-
-			if ( err.toString().length()>0 ) {
-				gUnitTestResult testResult = new gUnitTestResult(false, err.toString());
-				testResult.setError(err.toString());
-				return testResult;
-			}
-			String stdout = null;
-			// TODO: need to deal with the case which has both ST return value and stdout
-			if ( out.toString().length()>0 ) {
-				stdout = out.toString();
-			}
-			if ( astString!=null ) {	// Return toStringTree of AST
-				return new gUnitTestResult(true, stdout, astString);
-			}
-			else if ( stString!=null ) {// Return toString of ST
-				return new gUnitTestResult(true, stdout, stString);
-			}
-
-			if ( ruleReturn!=null ) {
-				// TODO: currently only works for a single return with int or String value
-				return new gUnitTestResult(true, stdout, String.valueOf(ruleReturn));
-			}
-			return new gUnitTestResult(true, stdout, stdout);
-		} catch (IOException e) {
-			return getTestExceptionResult(e);
-		} catch (ClassNotFoundException e) {
-        	e.printStackTrace(); System.exit(1);
-        } catch (SecurityException e) {
-        	e.printStackTrace(); System.exit(1);
-        } catch (NoSuchMethodException e) {
-        	e.printStackTrace(); System.exit(1);
-        } catch (IllegalArgumentException e) {
-        	e.printStackTrace(); System.exit(1);
-        } catch (InstantiationException e) {
-        	e.printStackTrace(); System.exit(1);
-        } catch (IllegalAccessException e) {
-        	e.printStackTrace(); System.exit(1);
-        } catch (InvocationTargetException e) {	// This exception could be caused from ANTLR Runtime Exception, e.g. MismatchedTokenException
-        	return getTestExceptionResult(e);
-        } finally {
-        	try {
-        		if ( ps!=null ) ps.close();
-    			if ( ps2!=null ) ps2.close();
-    			System.setOut(console);			// Reset standard output
-    			System.setErr(consoleErr);		// Reset standard err out
-        	} catch (Exception e) {
-        		e.printStackTrace();
-        	}
-        }
-        // TODO: verify this:
-        throw new Exception("This should be unreachable?");
-	}
-
-	protected gUnitTestResult runTreeParser(String parserName, String lexerName, String testRuleName, String testTreeRuleName, gUnitTestInput testInput) throws Exception {
-		CharStream input;
-		String treeParserPath;
-		Class lexer = null;
-		Class parser = null;
-		Class treeParser = null;
-		PrintStream ps = null;		// for redirecting stdout later
-		PrintStream ps2 = null;		// for redirecting stderr later
-		try {
-			/** Set up ANTLR input stream based on input source, file or String */
-			input = getANTLRInputStream(testInput);
-
-			/** Set up appropriate path for tree parser if using package */
-			if ( grammarInfo.getGrammarPackage()!=null ) {
-				treeParserPath = grammarInfo.getGrammarPackage()+"."+grammarInfo.getTreeGrammarName();
-			}
-			else {
-				treeParserPath = grammarInfo.getTreeGrammarName();
-			}
-
-            /** Use Reflection to create instances of lexer and parser */
-        	lexer = classForName(lexerName);
-            Class[] lexArgTypes = new Class[]{CharStream.class};				// assign type to lexer's args
-            Constructor lexConstructor = lexer.getConstructor(lexArgTypes);
-            Object[] lexArgs = new Object[]{input};								// assign value to lexer's args
-            Object lexObj = lexConstructor.newInstance(lexArgs);				// makes new instance of lexer
-
-            CommonTokenStream tokens = new CommonTokenStream((Lexer) lexObj);
-
-            parser = classForName(parserName);
-            Class[] parArgTypes = new Class[]{TokenStream.class};				// assign type to parser's args
-            Constructor parConstructor = parser.getConstructor(parArgTypes);
-            Object[] parArgs = new Object[]{tokens};							// assign value to parser's args
-            Object parObj = parConstructor.newInstance(parArgs);				// makes new instance of parser
-
-            // set up customized tree adaptor if necessary
-            TreeAdaptor customTreeAdaptor = null;
-            if ( grammarInfo.getAdaptor()!=null ) {
-            	parArgTypes = new Class[]{TreeAdaptor.class};
-            	Method _setTreeAdaptor = parser.getMethod("setTreeAdaptor", parArgTypes);
-            	Class _treeAdaptor = classForName(grammarInfo.getAdaptor());
-            	customTreeAdaptor = (TreeAdaptor) _treeAdaptor.newInstance();
-            	_setTreeAdaptor.invoke(parObj, customTreeAdaptor);
-            }
-
-            Method ruleName = parser.getMethod(testRuleName);
-
-            /** Start of I/O Redirecting */
-            ByteArrayOutputStream out = new ByteArrayOutputStream();
-            ByteArrayOutputStream err = new ByteArrayOutputStream();
-            ps = new PrintStream(out);
-            ps2 = new PrintStream(err);
-            System.setOut(ps);
-            System.setErr(ps2);
-            /** End of redirecting */
-
-            /** Invoke grammar rule, and get the return value */
-            Object ruleReturn = ruleName.invoke(parObj);
-
-            Class _return = classForName(parserName+"$"+testRuleName+"_return");
-        	Method returnName = _return.getMethod("getTree");
-        	CommonTree tree = (CommonTree) returnName.invoke(ruleReturn);
-
-        	// Walk resulting tree; create tree nodes stream first
-        	CommonTreeNodeStream nodes;
-        	if ( customTreeAdaptor!=null ) {
-        		nodes = new CommonTreeNodeStream(customTreeAdaptor, tree);
-        	}
-        	else {
-        		nodes = new CommonTreeNodeStream(tree);
-        	}
-        	// AST nodes have payload that point into token stream
-        	nodes.setTokenStream(tokens);
-        	// Create a tree walker attached to the nodes stream
-        	treeParser = classForName(treeParserPath);
-            Class[] treeParArgTypes = new Class[]{TreeNodeStream.class};		// assign type to tree parser's args
-            Constructor treeParConstructor = treeParser.getConstructor(treeParArgTypes);
-            Object[] treeParArgs = new Object[]{nodes};							// assign value to tree parser's args
-            Object treeParObj = treeParConstructor.newInstance(treeParArgs);	// makes new instance of tree parser
-        	// Invoke the tree rule, and store the return value if there is
-            Method treeRuleName = treeParser.getMethod(testTreeRuleName);
-            Object treeRuleReturn = treeRuleName.invoke(treeParObj);
-
-            String astString = null;
-            String stString = null;
-            /** If tree rule has return value, determine if it contains an AST or a ST */
-            if ( treeRuleReturn!=null ) {
-                if ( treeRuleReturn.getClass().toString().indexOf(testTreeRuleName+"_return")>0 ) {
-                	try {	// NullPointerException may happen here...
-                		Class _treeReturn = classForName(treeParserPath+"$"+testTreeRuleName+"_return");
-                		Method[] methods = _treeReturn.getDeclaredMethods();
-			            for(Method method : methods) {
-			                if ( method.getName().equals("getTree") ) {
-			                	Method treeReturnName = _treeReturn.getMethod("getTree");
-		                    	CommonTree returnTree = (CommonTree) treeReturnName.invoke(treeRuleReturn);
-		                        astString = returnTree.toStringTree();
-			                }
-			                else if ( method.getName().equals("getTemplate") ) {
-			                	Method treeReturnName = _return.getMethod("getTemplate");
-			                	StringTemplate st = (StringTemplate) treeReturnName.invoke(treeRuleReturn);
-			                	stString = st.toString();
-			                }
-			            }
-                	}
-                	catch(Exception e) {
-                		System.err.println(e);	// Note: If any exception occurs, the test is viewed as failed.
-                	}
-                }
-            }
-
-            /** Invalid input */
-            if ( tokens.index()!=tokens.size()-1 ) {
-            	//throw new InvalidInputException();
-            	ps2.print("Invalid input");
-            }
-
-			if ( err.toString().length()>0 ) {
-				gUnitTestResult testResult = new gUnitTestResult(false, err.toString());
-				testResult.setError(err.toString());
-				return testResult;
-			}
-
-			String stdout = null;
-			// TODO: need to deal with the case which has both ST return value and stdout
-			if ( out.toString().length()>0 ) {
-				stdout = out.toString();
-			}
-			if ( astString!=null ) {	// Return toStringTree of AST
-				return new gUnitTestResult(true, stdout, astString);
-			}
-			else if ( stString!=null ) {// Return toString of ST
-				return new gUnitTestResult(true, stdout, stString);
-			}
-
-			if ( treeRuleReturn!=null ) {
-				// TODO: again, currently only works for a single return with int or String value
-				return new gUnitTestResult(true, stdout, String.valueOf(treeRuleReturn));
-			}
-			return new gUnitTestResult(true, stdout, stdout);
-		} catch (IOException e) {
-			return getTestExceptionResult(e);
-		} catch (ClassNotFoundException e) {
-        	e.printStackTrace(); System.exit(1);
-        } catch (SecurityException e) {
-        	e.printStackTrace(); System.exit(1);
-        } catch (NoSuchMethodException e) {
-        	e.printStackTrace(); System.exit(1);
-        } catch (IllegalArgumentException e) {
-        	e.printStackTrace(); System.exit(1);
-        } catch (InstantiationException e) {
-        	e.printStackTrace(); System.exit(1);
-        } catch (IllegalAccessException e) {
-        	e.printStackTrace(); System.exit(1);
-        } catch (InvocationTargetException e) {	// note: This exception could be caused from ANTLR Runtime Exception...
-        	return getTestExceptionResult(e);
-        } finally {
-        	try {
-        		if ( ps!=null ) ps.close();
-    			if ( ps2!=null ) ps2.close();
-    			System.setOut(console);			// Reset standard output
-    			System.setErr(consoleErr);		// Reset standard err out
-        	} catch (Exception e) {
-        		e.printStackTrace();
-        	}
-        }
-        // TODO: verify this:
-        throw new Exception("Should not be reachable?");
-	}
-
-	// Create ANTLR input stream based on input source, file or String
-	private CharStream getANTLRInputStream(gUnitTestInput testInput) throws IOException {
-		CharStream input;
-		if ( testInput.isFile) {
-			String filePath = testInput.input;
-			File testInputFile = new File(filePath);
-			// if input test file is not found under the current dir, try to look for it from dir where the testsuite file locates
-			if ( !testInputFile.exists() ) {
-				testInputFile = new File(this.testsuiteDir, filePath);
-				if ( testInputFile.exists() ) filePath = testInputFile.getCanonicalPath();
-				// if still not found, also try to look for it under the package dir
-				else if ( grammarInfo.getGrammarPackage()!=null ) {
-					testInputFile = new File("."+File.separator+grammarInfo.getGrammarPackage().replace(".", File.separator), filePath);
-					if ( testInputFile.exists() ) filePath = testInputFile.getCanonicalPath();
-				}
-			}
-			input = new ANTLRFileStream(filePath);
-		}
-		else {
-			input = new ANTLRStringStream(testInput.input);
-		}
-		return input;
-	}
-
-	// set up the cause of exception or the exception name into a gUnitTestResult instance
-	private gUnitTestResult getTestExceptionResult(Exception e) {
-		gUnitTestResult testResult;
-    	if ( e.getCause()!=null ) {
-    		testResult = new gUnitTestResult(false, e.getCause().toString(), true);
-    		testResult.setError(e.getCause().toString());
-    	}
-    	else {
-    		testResult = new gUnitTestResult(false, e.toString(), true);
-    		testResult.setError(e.toString());
-    	}
-    	return testResult;
-	}
-
-
-    public void onPass(ITestCase passTest) {
-
-    }
-
-    public void onFail(ITestCase failTest) {
-
-    }
-
-}
diff --git a/antlr-3.4/gunit/src/main/java/org/antlr/gunit/swingui/TestCaseEditController.java b/antlr-3.4/gunit/src/main/java/org/antlr/gunit/swingui/TestCaseEditController.java
deleted file mode 100644
index 30cf0ae..0000000
--- a/antlr-3.4/gunit/src/main/java/org/antlr/gunit/swingui/TestCaseEditController.java
+++ /dev/null
@@ -1,633 +0,0 @@
-/*
- [The "BSD licence"]
- Copyright (c) 2009 Shaoting Cai
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
-    derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-package org.antlr.gunit.swingui;
-
-import org.antlr.gunit.swingui.model.*;
-import org.antlr.gunit.swingui.ImageFactory;
-import java.awt.*;
-import java.awt.event.*;
-import java.util.HashMap;
-import javax.swing.*;
-import javax.swing.event.*;
-
-/**
- *
- * @author scai
- */
-public class TestCaseEditController implements IController {
-
-    private JPanel view = new JPanel();
-
-    private JScrollPane scroll;
-    private JPanel paneDetail;
-    private AbstractEditorPane paneDetailInput, paneDetailOutput;
-    private JToolBar toolbar;
-    private JList listCases;
-    private ListModel listModel ;
-
-    public ActionListener onTestCaseNumberChange;
-
-    /* EDITORS */
-    private InputFileEditor editInputFile;
-    private InputStringEditor editInputString;
-    private InputMultiEditor editInputMulti;
-    private OutputResultEditor editOutputResult;
-    private OutputAstEditor editOutputAST;
-    private OutputStdEditor editOutputStd;
-    private OutputReturnEditor editOutputReturn;
-    
-    private JComboBox comboInputType, comboOutputType;
-
-    /* TYPE NAME */
-    private static final String IN_TYPE_STRING = "Single-line Text";
-    private static final String IN_TYPE_MULTI = "Multi-line Text";
-    private static final String IN_TYPE_FILE = "Disk File";
-    private static final String OUT_TYPE_BOOL = "OK or Fail";
-    private static final String OUT_TYPE_AST = "AST";
-    private static final String OUT_TYPE_STD = "Standard Output";
-    private static final String OUT_TYPE_RET = "Return Value";
-
-    private static final String DEFAULT_IN_SCRIPT = "";
-    private static final String DEFAULT_OUT_SCRIPT = "";
-
-    private static final Object[] INPUT_TYPE =  {
-        IN_TYPE_STRING, IN_TYPE_MULTI, IN_TYPE_FILE
-    };
-
-    private static final Object[] OUTPUT_TYPE = {
-        OUT_TYPE_BOOL, OUT_TYPE_AST, OUT_TYPE_STD, OUT_TYPE_RET
-    };
-
-    /* SIZE */
-    private static final int TEST_CASE_DETAIL_WIDTH = 300;
-    private static final int TEST_EDITOR_WIDTH = 280;
-    private static final int TEST_CASE_DETAIL_HEIGHT = 250;
-    private static final int TEST_EDITOR_HEIGHT = 120;
-
-    /* MODEL */
-    private Rule currentRule = null;
-    private TestCase currentTestCase = null;
-
-    /* END OF MODEL*/
-
-    private static final HashMap<Class, String> TypeNameTable;
-    static {
-        TypeNameTable = new HashMap<Class, String> ();
-        TypeNameTable.put(TestCaseInputString.class, IN_TYPE_STRING);
-        TypeNameTable.put(TestCaseInputMultiString.class, IN_TYPE_MULTI);
-        TypeNameTable.put(TestCaseInputFile.class, IN_TYPE_FILE);
-
-        TypeNameTable.put(TestCaseOutputResult.class, OUT_TYPE_BOOL);
-        TypeNameTable.put(TestCaseOutputAST.class, OUT_TYPE_AST);
-        TypeNameTable.put(TestCaseOutputStdOut.class, OUT_TYPE_STD);
-        TypeNameTable.put(TestCaseOutputReturn.class, OUT_TYPE_RET);
-    }
-
-    //private WorkSpaceView owner;
-
-    public TestCaseEditController(WorkSpaceView workspace) {
-        //this.owner = workspace;
-        initComponents();
-    }
-
-    public TestCaseEditController() {
-        initComponents();
-    }
-
-    public void OnLoadRule(Rule rule) {
-        if(rule == null) throw new IllegalArgumentException("Null");
-        this.currentRule = rule;
-        this.currentTestCase = null;
-        this.listModel = rule;
-        this.listCases.setModel(this.listModel);      
-    }
-
-    public void setCurrentTestCase(TestCase testCase) {
-        if(testCase == null) throw new IllegalArgumentException("Null");
-        this.listCases.setSelectedValue(testCase, true);
-        this.currentTestCase = testCase;
-    }
-
-    public Rule getCurrentRule() {
-        return this.currentRule;
-    }
-    
-    private void initComponents() {
-
-        /* CASE LIST */
-        listCases = new JList();
-        listCases.addListSelectionListener(new TestCaseListSelectionListener());
-        listCases.setCellRenderer(listRenderer);
-        listCases.setOpaque(false);
-        
-        scroll = new JScrollPane(listCases);
-        scroll.setBorder(BorderFactory.createTitledBorder(
-                BorderFactory.createEmptyBorder(), "Test Cases"));
-        scroll.setOpaque(false);
-        scroll.setViewportBorder(BorderFactory.createEtchedBorder());
-
-        /* CASE DETAIL */
-
-        editInputString = new InputStringEditor();
-        editInputMulti = new InputMultiEditor();
-        editInputFile = new InputFileEditor();
-
-        editOutputResult = new OutputResultEditor();
-        editOutputAST = new OutputAstEditor();
-        editOutputStd = new OutputStdEditor();
-        editOutputReturn = new OutputReturnEditor();
-        
-        paneDetail = new JPanel();
-        paneDetail.setBorder(BorderFactory.createEmptyBorder());
-        paneDetail.setOpaque(false);
-
-        comboInputType = new JComboBox(INPUT_TYPE);
-        comboInputType.addActionListener(new ActionListener() {
-            public void actionPerformed(ActionEvent event) {
-                OnInputTestCaseTypeChanged(comboInputType.getSelectedItem());
-            }
-        });
-        comboOutputType = new JComboBox(OUTPUT_TYPE);
-        comboOutputType.addActionListener(new ActionListener() {
-            public void actionPerformed(ActionEvent event) {
-                OnOutputTestCaseTypeChanged(comboOutputType.getSelectedItem());
-            }
-        });
-        paneDetailInput = new InputEditorPane(comboInputType);
-        paneDetailOutput = new OutputEditorPane(comboOutputType);
-
-        BoxLayout layout = new BoxLayout(paneDetail, BoxLayout.PAGE_AXIS);
-        paneDetail.setLayout(layout);
-        
-        paneDetail.add(this.paneDetailInput);
-        paneDetail.add(this.paneDetailOutput);
-
-        /* TOOLBAR */
-        toolbar = new JToolBar("Edit TestCases", JToolBar.VERTICAL);
-        toolbar.setFloatable(false);
-        toolbar.add(new AddTestCaseAction());
-        toolbar.add(new RemoveTestCaseAction());
-
-        /* COMPOSITE */
-        view.setLayout(new BorderLayout());
-        view.setBorder(BorderFactory.createEmptyBorder());
-        view.setOpaque(false);
-        view.add(toolbar, BorderLayout.WEST);
-        view.add(scroll, BorderLayout.CENTER);
-        view.add(paneDetail, BorderLayout.EAST);
-    }
-
-    private void updateInputEditor() {
-        JComponent editor = null;
-
-        if(currentTestCase != null ) {
-            ITestCaseInput input = this.currentTestCase.getInput();
-            if(input instanceof TestCaseInputString) {
-                this.editInputString.setText(input.getScript());
-                editor = this.editInputString;
-                comboInputType.setSelectedItem(IN_TYPE_STRING);
-            } else if(input instanceof TestCaseInputMultiString) {
-                this.editInputMulti.setText(input.getScript());
-                editor = this.editInputMulti.getView();
-                comboInputType.setSelectedItem(IN_TYPE_MULTI);
-            } else if(input instanceof TestCaseInputFile) {
-                this.editInputFile.setText(input.getScript());
-                editor = this.editInputFile;
-                comboInputType.setSelectedItem(IN_TYPE_FILE);
-            } else {
-                throw new Error("Wrong type");
-            }
-        }
-        
-        paneDetailInput.setEditor(editor);
-    }
-
-    private void updateOutputEditor() {
-        JComponent editor = null;
-        
-        if(currentTestCase != null) {
-            
-            ITestCaseOutput output = this.currentTestCase.getOutput();
-
-            if(output instanceof TestCaseOutputAST) {
-
-                this.editOutputAST.setText(output.getScript());
-                editor = this.editOutputAST.getView();
-                comboOutputType.setSelectedItem(OUT_TYPE_AST);
-
-            } else if(output instanceof TestCaseOutputResult) {
-
-                this.editOutputResult.setValue(output.getScript());
-                editor = this.editOutputResult;
-                comboOutputType.setSelectedItem(OUT_TYPE_BOOL);
-
-            } else if(output instanceof TestCaseOutputStdOut) {
-
-                this.editOutputStd.setText(output.getScript());
-                editor = this.editOutputStd.getView();
-                comboOutputType.setSelectedItem(OUT_TYPE_STD);
-
-            } else if(output instanceof TestCaseOutputReturn) {
-
-                this.editOutputReturn.setText(output.getScript());
-                editor = this.editOutputReturn.getView();
-                comboOutputType.setSelectedItem(OUT_TYPE_RET);
-
-            } else {
-
-                throw new Error("Wrong type");
-                
-            }
-
-        }
-        this.paneDetailOutput.setEditor(editor);
-    }
-
-    private void OnInputTestCaseTypeChanged(Object inputTypeStr) {
-        if(this.currentTestCase != null) {
-            ITestCaseInput input ;
-            if(inputTypeStr == IN_TYPE_STRING) {
-                input = new TestCaseInputString(DEFAULT_IN_SCRIPT);
-            } else if(inputTypeStr == IN_TYPE_MULTI) {
-                input = new TestCaseInputMultiString(DEFAULT_IN_SCRIPT);
-            } else if(inputTypeStr == IN_TYPE_FILE) {
-                input = new TestCaseInputFile(DEFAULT_IN_SCRIPT);
-            } else {
-                throw new Error("Wrong Type");
-            }
-
-            if(input.getClass().equals(this.currentTestCase.getInput().getClass()))
-                return ;
-
-            this.currentTestCase.setInput(input);
-        }
-        this.updateInputEditor();
-    }
-
-    private void OnOutputTestCaseTypeChanged(Object outputTypeStr) {
-        if(this.currentTestCase != null) {
-
-            ITestCaseOutput output ;
-            if(outputTypeStr == OUT_TYPE_AST) {
-                output = new TestCaseOutputAST(DEFAULT_OUT_SCRIPT);
-            } else if(outputTypeStr == OUT_TYPE_BOOL) {
-                output = new TestCaseOutputResult(false);
-            } else if(outputTypeStr == OUT_TYPE_STD) {
-                output = new TestCaseOutputStdOut(DEFAULT_OUT_SCRIPT);
-            } else if(outputTypeStr == OUT_TYPE_RET) {
-                output = new TestCaseOutputReturn(DEFAULT_OUT_SCRIPT);
-            } else {
-                throw new Error("Wrong Type");
-            }
-
-            if(output.getClass().equals(this.currentTestCase.getOutput().getClass()))
-                return ;
-
-            this.currentTestCase.setOutput(output);
-        }
-        this.updateOutputEditor();
-    }
-
-
-    private void OnTestCaseSelected(TestCase testCase) {
-        //if(testCase == null) throw new RuntimeException("Null TestCase");
-        this.currentTestCase = testCase;
-        updateInputEditor();
-        updateOutputEditor();
-
-    }
-
-    private void OnAddTestCase() {
-        if(currentRule == null) return;
-        
-        final TestCase newCase = new TestCase(
-                new TestCaseInputString(""),
-                new TestCaseOutputResult(true));
-        this.currentRule.addTestCase(newCase);
-        setCurrentTestCase(newCase);
-
-        this.listCases.setSelectedValue(newCase, true);
-        this.listCases.updateUI();
-        this.OnTestCaseSelected(newCase);
-        this.onTestCaseNumberChange.actionPerformed(null);
-    }
-
-    private void OnRemoveTestCase() {
-        if(currentTestCase == null) return;
-        currentRule.removeElement(currentTestCase);
-        listCases.updateUI();
-
-        final TestCase nextActiveCase = listCases.isSelectionEmpty() ?
-            null : (TestCase) listCases.getSelectedValue() ;
-        OnTestCaseSelected(nextActiveCase);
-        this.onTestCaseNumberChange.actionPerformed(null);
-    }
-
-    public Object getModel() {
-        return currentRule;
-    }
-
-    public Component getView() {
-        return view;
-    }
-
-    /* EDITOR CONTAINER */
-
-    abstract public class AbstractEditorPane extends JPanel {
-
-        private JComboBox combo;
-        private JComponent editor;
-        private String title;
-        private JLabel placeHolder = new JLabel();
-
-        public AbstractEditorPane(JComboBox comboBox, String title) {
-            this.combo = comboBox;
-            this.editor = placeHolder;
-            this.title = title;
-            this.initComponents();
-        }
-
-        private void initComponents() {
-            placeHolder.setPreferredSize(new Dimension(
-                    TEST_CASE_DETAIL_WIDTH, TEST_CASE_DETAIL_HEIGHT));
-            this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
-            this.add(combo, BorderLayout.NORTH);
-            this.add(editor, BorderLayout.CENTER);
-            this.setOpaque(false);
-            this.setBorder(BorderFactory.createTitledBorder(title));
-            this.setPreferredSize(new Dimension(
-                    TEST_CASE_DETAIL_WIDTH, TEST_CASE_DETAIL_HEIGHT));
-        }
-
-        public void setEditor(JComponent newEditor) {
-            if(newEditor == null) newEditor = placeHolder;
-            this.remove(editor);
-            this.add(newEditor);
-            this.editor = newEditor;
-            this.updateUI();
-        }
-    }
-
-    public class InputEditorPane extends AbstractEditorPane {
-        public InputEditorPane(JComboBox comboBox) {
-            super(comboBox, "Input");
-        }
-    }
-
-    public class OutputEditorPane extends AbstractEditorPane {
-        public OutputEditorPane(JComboBox comboBox) {
-            super(comboBox, "Output");
-        }
-    }
-
-    /* INPUT EDITORS */
-
-    public class InputStringEditor extends JTextField implements CaretListener {
-        public InputStringEditor() {
-            super();
-
-            this.setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY));
-            this.addCaretListener(this);
-        }
-
-        public void caretUpdate(CaretEvent arg0) {
-            currentTestCase.getInput().setScript(getText());
-            listCases.updateUI();
-        }
-    }
-
-    public class InputMultiEditor implements CaretListener {
-        private JTextArea textArea = new JTextArea(20, 30);
-        private JScrollPane scroll = new JScrollPane(textArea,
-                JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
-                JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
-
-        public InputMultiEditor() {
-            super();
-            scroll.setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY));
-            textArea.addCaretListener(this);
-        }
-
-        public void caretUpdate(CaretEvent arg0) {
-            currentTestCase.getInput().setScript(getText());
-            listCases.updateUI();
-        }
-
-        public String getText() {
-            return textArea.getText();
-        }
-
-        public void setText(String text) {
-            textArea.setText(text);
-        }
-
-        public JComponent getView() {
-            return scroll;
-        }
-    }
-
-    public class InputFileEditor extends InputStringEditor {};
-
-    public class OutputResultEditor extends JPanel implements ActionListener {
-        
-        private JToggleButton tbFail, tbOk;
-
-        public OutputResultEditor() {
-            super();
-
-            tbFail = new JToggleButton("Fail");
-            tbOk = new JToggleButton("OK");
-            ButtonGroup group = new ButtonGroup();
-            group.add(tbFail);
-            group.add(tbOk);
-
-            this.add(tbFail);
-            this.add(tbOk);
-
-            this.tbFail.addActionListener(this);
-            this.tbOk.addActionListener(this);
-
-            this.setPreferredSize(
-                    new Dimension(TEST_EDITOR_WIDTH, 100));
-        }
-
-        public void actionPerformed(ActionEvent e) {
-            TestCaseOutputResult output =
-                    (TestCaseOutputResult) currentTestCase.getOutput();
-
-            if(e.getSource() == tbFail) {
-                output.setScript(false);
-            } else {
-                output.setScript(true);
-            }
-
-            listCases.updateUI();
-        }
-
-        public void setValue(String value) {
-            if(TestCaseOutputResult.OK.equals(value)) {
-                this.tbOk.setSelected(true);
-            } else {
-                this.tbFail.setSelected(true);
-            }
-        }
-    }
-    
-
-    public class OutputAstEditor implements CaretListener {
-        private JTextArea textArea = new JTextArea(20, 30);
-        private JScrollPane scroll = new JScrollPane(textArea,
-                JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
-                JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
-
-        public OutputAstEditor() {
-            super();
-            scroll.setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY));
-            textArea.addCaretListener(this);
-        }
-
-        public void caretUpdate(CaretEvent arg0) {
-            currentTestCase.getOutput().setScript(getText());
-            listCases.updateUI();
-        }
-
-        public void setText(String text) {
-            this.textArea.setText(text);
-        }
-
-        public String getText() {
-            return this.textArea.getText();
-        }
-
-        public JScrollPane getView() {
-            return this.scroll;
-        }
-    }
-
-
-    public class OutputStdEditor extends OutputAstEditor {}
-    public class OutputReturnEditor extends OutputAstEditor {}
-
-    /* EVENT HANDLERS */
-
-    private class TestCaseListSelectionListener implements ListSelectionListener {
-
-        public void valueChanged(ListSelectionEvent e) {
-            
-            if(e.getValueIsAdjusting()) return;
-            final JList list = (JList) e.getSource();
-            final TestCase value = (TestCase) list.getSelectedValue();
-            if(value != null) OnTestCaseSelected(value);
-            
-        }
-
-    }
-
-    /* ACTIONS */
-
-    private class AddTestCaseAction extends AbstractAction {
-        public AddTestCaseAction() {
-            super("Add", ImageFactory.getSingleton().ADD);
-            putValue(SHORT_DESCRIPTION, "Add a gUnit test case.");
-        }
-        public void actionPerformed(ActionEvent e) {
-            OnAddTestCase();
-        }
-    }
-
-    private class RemoveTestCaseAction extends AbstractAction {
-        public RemoveTestCaseAction() {
-            super("Remove", ImageFactory.getSingleton().DELETE);
-            putValue(SHORT_DESCRIPTION, "Remove a gUnit test case.");
-        }
-        public void actionPerformed(ActionEvent e) {
-            OnRemoveTestCase();
-        }
-    }
-
-    /* CELL RENDERERS */
-
-    private static TestCaseListRenderer listRenderer
-            = new TestCaseListRenderer();
-
-    private static class TestCaseListRenderer implements ListCellRenderer {
-
-        private static Font IN_FONT = new Font("mono", Font.PLAIN, 12);
-        private static Font OUT_FONT = new Font("default", Font.BOLD, 12);
-
-        public static String clamp(String text, int len) {
-            if(text.length() > len) {
-                return text.substring(0, len - 3).concat("...");
-            } else {
-                return text;
-            }
-        }
-
-        public static String clampAtNewLine(String text) {
-            int pos = text.indexOf('\n');
-            if(pos >= 0) {
-                return text.substring(0, pos).concat("...");
-            } else {
-                return text;
-            }
-        }
-
-        public Component getListCellRendererComponent(
-                JList list, Object value, int index,
-                boolean isSelected, boolean hasFocus) {
-
-            final JPanel pane = new JPanel();
-            
-            if (value instanceof TestCase) {
-                final TestCase item = (TestCase) value;
-
-                // create components
-                final JLabel labIn = new JLabel(
-                        clamp(clampAtNewLine(item.getInput().getScript()), 18));
-                final JLabel labOut = new JLabel(
-                        clamp(clampAtNewLine(item.getOutput().getScript()), 18));
-                labOut.setFont(OUT_FONT);
-                labIn.setFont(IN_FONT);
-
-                labIn.setIcon(item.getInput() instanceof TestCaseInputFile ?
-                    ImageFactory.getSingleton().FILE16 :
-                    ImageFactory.getSingleton().EDIT16);
-
-                pane.setBorder(BorderFactory.createEtchedBorder());
-                pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
-                pane.add(labIn);
-                pane.add(labOut);
-                pane.setBackground(isSelected ? Color.LIGHT_GRAY : Color.WHITE);
-            } 
-
-            return pane;
-        }
-    }
-
-}
diff --git a/antlr-3.4/gunit/src/main/java/org/antlr/gunit/swingui/model/TestSuite.java b/antlr-3.4/gunit/src/main/java/org/antlr/gunit/swingui/model/TestSuite.java
deleted file mode 100644
index 06e5227..0000000
--- a/antlr-3.4/gunit/src/main/java/org/antlr/gunit/swingui/model/TestSuite.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- [The "BSD licence"]
- Copyright (c) 2009 Shaoting Cai
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
-    derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-package org.antlr.gunit.swingui.model;
-
-import java.io.*;
-import java.util.*;
-import org.antlr.runtime.*;
-
-public class TestSuite {
-
-    protected List<Rule> rules ;
-    protected String grammarName ;
-    protected CommonTokenStream tokens;
-    protected File testSuiteFile;      
-
-    protected TestSuite(String gname, File testFile) {
-        grammarName = gname;
-        testSuiteFile = testFile;
-        rules = new ArrayList<Rule>();
-    }
-    
-    /* Get the gUnit test suite file name. */
-    public File getTestSuiteFile() {
-        return testSuiteFile;
-    }       
-
-    public void addRule(Rule currentRule) {
-        if(currentRule == null) throw new IllegalArgumentException("Null rule");
-        rules.add(currentRule);
-    }
-
-    // test rule name
-    public boolean hasRule(Rule rule) {
-        for(Rule r: rules) {
-            if(r.getName().equals(rule.getName())) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    public int getRuleCount() {
-        return rules.size();
-    }
-    
-    public void setRules(List<Rule> newRules) {
-        rules.clear();
-        rules.addAll(newRules);
-    }
-
-    /* GETTERS AND SETTERS */
-
-    public void setGrammarName(String name) { grammarName = name;}
-
-    public String getGrammarName() { return grammarName; }
-
-    public Rule getRule(int index) { return rules.get(index); }
-
-    public CommonTokenStream getTokens() { return tokens; }
-    
-    public void setTokens(CommonTokenStream ts) { tokens = ts; }
-
-    public Rule getRule(String name) {
-        for(Rule rule: rules) {
-            if(rule.getName().equals(name)) {
-                return rule;
-            }
-        }
-        return null;
-    }
-    
-    // only for stringtemplate use
-    public List getRulesForStringTemplate() {return rules;}
-    
-}
diff --git a/antlr-3.4/gunit/src/main/java/org/antlr/gunit/swingui/runner/ParserLoader.java b/antlr-3.4/gunit/src/main/java/org/antlr/gunit/swingui/runner/ParserLoader.java
deleted file mode 100644
index 23f5aa0..0000000
--- a/antlr-3.4/gunit/src/main/java/org/antlr/gunit/swingui/runner/ParserLoader.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- [The "BSD licence"]
- Copyright (c) 2009 Shaoting Cai
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
-    derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-package org.antlr.gunit.swingui.runner;
-
-import java.io.*;
-import java.util.HashMap;
-
-/**
- * Class loader for parser & lexer generated by antlr.
- * @author Shaoting
- */
-public class ParserLoader extends ClassLoader {
-
-    private HashMap<String, Class> classList;
-    private String grammar;
-
-    /**
-     * Create a class loader for antlr parser/lexer.
-     * @param grammarName
-     * @param classDir
-     */
-    public ParserLoader(String grammarName, String classDir) throws IOException, ClassNotFoundException {
-
-        final String lexerName = grammarName + "Lexer";
-
-        // load all the class files in the "classDir" related to the grammarName
-        File dir = new File(classDir);
-        if(dir.isDirectory()) {
-            classList = new HashMap<String, Class>();
-            grammar = grammarName;
-            File[] files = dir.listFiles(new ClassFilenameFilter(grammarName));
-            for(File f : files) {
-
-                // load class data
-                final InputStream in = new BufferedInputStream(new FileInputStream(f));
-                final byte[] classData = new byte[in.available()];
-                in.read(classData);
-                in.close();
-
-                // define class
-                final Class newClass = defineClass(null, classData, 0, classData.length);
-                assert(newClass != null);
-                resolveClass(newClass);
-
-                // save to hashtable
-                final String fileName = f.getName();
-                final String className = fileName.substring(0, fileName.lastIndexOf("."));
-                classList.put(className, newClass);
-                //System.out.println("adding: " + className);
-            }
-        } else {
-            throw new IOException(classDir + " is not a directory.");
-        }
-
-        if(classList.isEmpty() || !classList.containsKey(lexerName)) {
-            throw new ClassNotFoundException(lexerName + " not found.");
-        }
-
-    }
-
-
-
-    @Override
-    public synchronized Class loadClass(String name, boolean resolve) throws ClassNotFoundException {
-        //System.out.print("loading: " + name);
-        if(name.startsWith(grammar)) {
-            if(classList.containsKey(name)) {
-                //System.out.println(" .... found");
-                return classList.get(name);
-            } else {
-                //System.out.println(" .... not found");
-                throw new ClassNotFoundException(name);
-            }
-            
-        } else {
-            final Class c = findSystemClass(name);
-            //System.out.println(" .... system found " + c.getName());
-            return c;
-        }
-    }
-
-    /**
-     * Accepts grammarname...($...)?.class
-     */
-    protected static class ClassFilenameFilter implements FilenameFilter {
-
-        private String grammarName;
-
-        protected ClassFilenameFilter(String name) {
-            grammarName = name;
-        }
-
-        public boolean accept(File dir, String name) {
-            return name.startsWith(grammarName) && name.endsWith(".class");
-        }
-
-    }
-
-}
diff --git a/antlr-3.4/lib/antlr-3.4-complete.jar b/antlr-3.4/lib/antlr-3.4-complete.jar
deleted file mode 100644
index 9c985c7..0000000
--- a/antlr-3.4/lib/antlr-3.4-complete.jar
+++ /dev/null
Binary files differ
diff --git a/antlr-3.4/pom.xml b/antlr-3.4/pom.xml
deleted file mode 100644
index c2f9cc7..0000000
--- a/antlr-3.4/pom.xml
+++ /dev/null
@@ -1,311 +0,0 @@
-<?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">
-
-
-    <!--
-        The ANTLR Maven artifacts are now released via the Sonotype OSS
-        repository, which means that they are synced to Maven central 
-        within a few minutes of hitting the release repo for Sonotype.
-        To enable this, we inherit from the Sonotype provided parent
-        pom. However, we must also configure our .m2/settings.xml to include
-        the snapshot and staging server and the sonotype password. This 
-        means that only ANTLR developers can released the artifacts, but
-        anyone can build locally.
-      -->
-    <parent>
-        <groupId>org.sonatype.oss</groupId>
-        <artifactId>oss-parent</artifactId>
-        <version>7</version>
-    </parent>    
-    
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>org.antlr</groupId>
-    <artifactId>antlr-master</artifactId>
-    <packaging>pom</packaging>
-    <version>3.4</version>
-    <name>ANTLR Master build control POM 3.4</name>
-    <url>http://maven.apache.org</url>
-
-
-
-  <!--
-    What version of ANTLR are we building? This sets the
-    the version number for all other things that are built
-    as part of an ANTLR release, unless they override or
-    ignore it. We do this via a properites file for this
-    pom.
-    -->
-
-  <!--
-     This is the master pom for building the ANTLR
-     toolset and runtime (Java) at the specific level
-     defined above. Hence we specify here the modules that
-     this pom will build when we build this pom in certain profiles.
-    -->
-
-  <!--
-    Make sure that the build is not platform dependent (I.E show that
-    all the files in the source tree are in UTF-8 format.
-    -->
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    </properties>
-
-        <profiles>
-            <profile>
-                <id>standard</id>
-                <activation>
-                    <activeByDefault>true</activeByDefault>
-                </activation>
-                <modules>
-                    <module>runtime/Java</module>
-                    <module>tool</module>
-                    <module>antlr3-maven-plugin</module>
-                    <module>gunit</module>
-                    <module>gunit-maven-plugin</module>
-                    <module>antlr3-maven-archetype</module>
-                </modules>
-            </profile>
-
-            <!--
-                Activate this profile to build ONLY the Uber jar, which is the
-                ANTLR tool and its dependencies (no plugins etc).
-                
-                mvn -Duber -DskipTests package assembly:assembly
-                
-              -->
-            <profile>
-                <id>uber</id>
-                <activation>
-                    <property>
-                        <name>uber</name>
-                        <value>true</value>
-                    </property>
-                </activation>
-                <modules>
-                    <module>runtime/Java</module>
-                    <module>tool</module>
-                </modules>
-                <build>
-                    <plugins>
-                        <plugin>
-
-                        <!--
-
-                            Build an uber-jar for the ANTLR Tool that is packaged with all the other dependencies,
-                            such as the antlr-runtime and stringtemplate etc. This will be useful
-                            for developers, who then do not need to download anything else or
-                            remember that they need stringtemplate.jar in their CLASSPATH and so
-                            on.
-
-                            This does not preclude any of the module generated jars from
-                            being used on their own of course.
-
-                            Here, we also build a master source jar as I was unable to pursuade
-                            this plugin to use multiple configurations and not have the thing
-                            screw up because of multiple modules :-(
-
-                          -->
-
-                            <artifactId>maven-assembly-plugin</artifactId>
-                            <version>2.2.1</version>
-                            <!--
-                                Do not make the child modules build an assembly
-                              -->
-                            <inherited>false</inherited>
-
-                            <configuration>
-                                <descriptors>
-                                    <descriptor>antlrjar.xml</descriptor>
-                                    <descriptor>antlrsources.xml</descriptor>
-                                </descriptors>
-                                    <!--
-
-                                        Specify that we want the resulting jar to be executable
-                                        via java -jar, which we do by modifying the manifest
-                                        of course.
-                                      -->
-                                <archive>
-                                    <manifest>
-                                        <mainClass>org.antlr.Tool</mainClass>
-                                    </manifest>
-                                </archive>
-                            </configuration>
-
-                        </plugin>
-                    </plugins>
-                </build>
-            </profile>
-            
-            <profile>
-                <id>release-sign-artifacts</id>
-                <activation>
-                    <property>
-                        <name>deploy</name>
-                        <value>true</value>
-                    </property>
-                </activation>
-                <modules>
-                    <module>runtime/Java</module>
-                    <module>tool</module>
-                    <module>antlr3-maven-plugin</module>
-                    <module>gunit</module>
-                    <module>gunit-maven-plugin</module>
-                    <module>antlr3-maven-archetype</module>
-                </modules>
-                <build>
-                    <plugins>
-                        
-                        <plugin>
-                            <groupId>org.apache.maven.plugins</groupId>
-                            <artifactId>maven-gpg-plugin</artifactId>
-                            <version>1.3</version>
-                            <executions>
-                                <execution>
-                                    <id>sign-artifacts</id>
-                                    <phase>verify</phase>
-                                    <goals>
-                                       <goal>sign</goal>
-                                    </goals>
-                                </execution>
-                            </executions>
-                        </plugin>
-                        
-                        <plugin>
-                            <groupId>org.apache.maven.plugins</groupId>
-                            <artifactId>maven-javadoc-plugin</artifactId>
-                            <version>2.8</version>
-                            <executions>
-                                <execution>
-                                    <id>attach-javadocs</id>
-                                    <goals>
-                                        <goal>jar</goal>
-                                    </goals>
-                                </execution>
-                            </executions>
-                        </plugin>
-                        
-                        <plugin>
-                            <groupId>org.apache.maven.plugins</groupId>
-                            <artifactId>maven-source-plugin</artifactId>
-                            <version>2.1.2</version>
-                            <executions>
-                                <execution>
-                                    <id>attach-sources</id>
-                                    <goals>
-                                       <goal>jar</goal>
-                                    </goals>
-                                </execution>
-                            </executions>
-                        </plugin>
-                        
-                    </plugins>
-                </build>
-            </profile>
-            
-    </profiles>
-
-  <!--
-
-    Tell Maven which other artifacts we need in order to
-    build, run and test the ANTLR jars.
-    This is the master pom, and so it only contains those
-    dependencies that are common to all the modules below
-    or are just included for test
-    -->
-    <dependencyManagement>
-
-        <dependencies>
-
-            <dependency>
-                <groupId>junit</groupId>
-                <artifactId>junit</artifactId>
-                <version>4.8.2</version>
-                <scope>test</scope>
-            </dependency>
-
-
-        </dependencies>
-
-    </dependencyManagement>
-
-    <build>
-
-        <defaultGoal>install</defaultGoal>
-
-        <!--
-            The following filter definition means that both the master
-            project and the sub projects will read in a file in the same
-            directory as the pom.xml is located and set any properties
-            that are defined there in the standard x=y format. These
-            properties can then be referenced via ${x} in any resource
-            file specified in any pom. So, there is a master antlr.config
-            file in the same location as this pom.xml file and here you can
-            define anything that is relevant to all the modules that we
-            build here. However each module also has an antlr.config file
-            where you can override property values from the master file or
-            define things that are only relevant to that module.
-          -->
-        <filters>
-            <filter>antlr.config</filter>
-        </filters>
-
-        <resources>
-            <resource>
-                <directory>src/main/resources</directory>
-                <filtering>true</filtering>
-            </resource>
-        </resources>
-
-        <plugins>
-
-             <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>buildnumber-maven-plugin</artifactId>
-                <version>1.0-beta-2</version>
-                <configuration>
-                  <format>{0,date,MMM dd, yyyy} {0,time,kk:mm:ss}</format>
-                  <items>
-                    <item>timestamp</item>
-                  </items>
-                </configuration>
-                <executions>
-                  <execution>
-                    <phase>validate</phase>
-                    <goals>
-                      <goal>create</goal>
-                    </goals>
-                  </execution>
-                </executions>
-             </plugin>
-
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>2.3.2</version>
-                <configuration>
-                    <source>1.6</source>
-                    <target>jsr14</target>
-                    <sourceDirectory>src</sourceDirectory>
-                </configuration>
-            </plugin>
-
-            <plugin>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <version>2.9</version>
-            </plugin>
-
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>findbugs-maven-plugin</artifactId>
-                <version>2.3.2</version>
-                <configuration>
-                    <findbugsXmlOutput>true</findbugsXmlOutput>
-                    <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
-                    <xmlOutput>true</xmlOutput>
-                </configuration>
-            </plugin>
-            
-        </plugins>
-
-    </build>
-</project>
diff --git a/antlr-3.4/runtime/C/C.sln b/antlr-3.4/runtime/C/C.sln
deleted file mode 100644
index f841177..0000000
--- a/antlr-3.4/runtime/C/C.sln
+++ /dev/null
@@ -1,53 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "C", "C.vcproj", "{0F0FE03A-78F3-4B34-9DCE-0CDFF1FB5C40}"
-EndProject
-Global
-	GlobalSection(SourceCodeControl) = preSolution
-		SccNumberOfProjects = 2
-		SccProjectName0 = Perforce\u0020Project
-		SccLocalPath0 = ..\\..
-		SccProvider0 = MSSCCI:Perforce\u0020SCM
-		SccProjectFilePathRelativizedFromConnection0 = runtime\\C\\
-		SccProjectUniqueName1 = C.vcproj
-		SccLocalPath1 = ..\\..
-		SccProjectFilePathRelativizedFromConnection1 = runtime\\C\\
-	EndGlobalSection
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Win32 = Debug|Win32
-		Debug|x64 = Debug|x64
-		DebugDLL|Win32 = DebugDLL|Win32
-		DebugDLL|x64 = DebugDLL|x64
-		Deployment|Win32 = Deployment|Win32
-		Deployment|x64 = Deployment|x64
-		Release|Win32 = Release|Win32
-		Release|x64 = Release|x64
-		ReleaseDLL|Win32 = ReleaseDLL|Win32
-		ReleaseDLL|x64 = ReleaseDLL|x64
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{0F0FE03A-78F3-4B34-9DCE-0CDFF1FB5C40}.Debug|Win32.ActiveCfg = Debug|Win32
-		{0F0FE03A-78F3-4B34-9DCE-0CDFF1FB5C40}.Debug|Win32.Build.0 = Debug|Win32
-		{0F0FE03A-78F3-4B34-9DCE-0CDFF1FB5C40}.Debug|x64.ActiveCfg = Debug|x64
-		{0F0FE03A-78F3-4B34-9DCE-0CDFF1FB5C40}.Debug|x64.Build.0 = Debug|x64
-		{0F0FE03A-78F3-4B34-9DCE-0CDFF1FB5C40}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
-		{0F0FE03A-78F3-4B34-9DCE-0CDFF1FB5C40}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
-		{0F0FE03A-78F3-4B34-9DCE-0CDFF1FB5C40}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
-		{0F0FE03A-78F3-4B34-9DCE-0CDFF1FB5C40}.DebugDLL|x64.Build.0 = DebugDLL|x64
-		{0F0FE03A-78F3-4B34-9DCE-0CDFF1FB5C40}.Deployment|Win32.ActiveCfg = DebugDLL|Win32
-		{0F0FE03A-78F3-4B34-9DCE-0CDFF1FB5C40}.Deployment|Win32.Build.0 = DebugDLL|Win32
-		{0F0FE03A-78F3-4B34-9DCE-0CDFF1FB5C40}.Deployment|x64.ActiveCfg = DebugDLL|x64
-		{0F0FE03A-78F3-4B34-9DCE-0CDFF1FB5C40}.Deployment|x64.Build.0 = DebugDLL|x64
-		{0F0FE03A-78F3-4B34-9DCE-0CDFF1FB5C40}.Release|Win32.ActiveCfg = Release|Win32
-		{0F0FE03A-78F3-4B34-9DCE-0CDFF1FB5C40}.Release|Win32.Build.0 = Release|Win32
-		{0F0FE03A-78F3-4B34-9DCE-0CDFF1FB5C40}.Release|x64.ActiveCfg = Release|x64
-		{0F0FE03A-78F3-4B34-9DCE-0CDFF1FB5C40}.Release|x64.Build.0 = Release|x64
-		{0F0FE03A-78F3-4B34-9DCE-0CDFF1FB5C40}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
-		{0F0FE03A-78F3-4B34-9DCE-0CDFF1FB5C40}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
-		{0F0FE03A-78F3-4B34-9DCE-0CDFF1FB5C40}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
-		{0F0FE03A-78F3-4B34-9DCE-0CDFF1FB5C40}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal
diff --git a/antlr-3.4/runtime/C/C.vcproj b/antlr-3.4/runtime/C/C.vcproj
deleted file mode 100644
index 16d9c2b..0000000
--- a/antlr-3.4/runtime/C/C.vcproj
+++ /dev/null
@@ -1,1043 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="C"
-	ProjectGUID="{0F0FE03A-78F3-4B34-9DCE-0CDFF1FB5C40}"
-	RootNamespace="C"
-	SccProjectName="Perforce Project"
-	SccLocalPath="..\.."
-	SccProvider="MSSCCI:Perforce SCM"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\..\..\include&quot;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				StringPooling="true"
-				MinimalRebuild="false"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				StructMemberAlignment="0"
-				EnableFunctionLevelLinking="true"
-				EnableEnhancedInstructionSet="0"
-				FloatingPointModel="0"
-				FloatingPointExceptions="true"
-				DisableLanguageExtensions="false"
-				UsePrecompiledHeader="0"
-				ExpandAttributedSource="true"
-				AssemblerOutput="2"
-				BrowseInformation="1"
-				WarningLevel="4"
-				WarnAsError="false"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="3"
-				CallingConvention="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalDependencies="Ws2_32.lib"
-				OutputFile="$(OutDir)/antlr3cd.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
-			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\..\..\include&quot;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				StringPooling="true"
-				MinimalRebuild="false"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				StructMemberAlignment="0"
-				EnableFunctionLevelLinking="true"
-				EnableEnhancedInstructionSet="0"
-				FloatingPointModel="0"
-				FloatingPointExceptions="true"
-				DisableLanguageExtensions="false"
-				UsePrecompiledHeader="0"
-				ExpandAttributedSource="true"
-				AssemblerOutput="2"
-				BrowseInformation="1"
-				WarningLevel="4"
-				WarnAsError="false"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="3"
-				CallingConvention="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalDependencies="Ws2_32.lib"
-				OutputFile="$(OutDir)/antlr3cd.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				InlineFunctionExpansion="2"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="true"
-				EnableFiberSafeOptimizations="true"
-				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				StringPooling="true"
-				ExceptionHandling="1"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableEnhancedInstructionSet="2"
-				FloatingPointModel="2"
-				DisableLanguageExtensions="false"
-				RuntimeTypeInfo="false"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation=".\asm\release"
-				WarningLevel="4"
-				WarnAsError="true"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="3"
-				CallingConvention="0"
-				CompileAs="1"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/LTCG"
-				AdditionalDependencies="Ws2_32.lib"
-				OutputFile="$(OutDir)/antlr3c.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-				ValidateIntelliSense="true"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
-			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				InlineFunctionExpansion="2"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="true"
-				EnableFiberSafeOptimizations="true"
-				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				StringPooling="true"
-				ExceptionHandling="1"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableEnhancedInstructionSet="0"
-				FloatingPointModel="2"
-				RuntimeTypeInfo="false"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation=".\asm\release"
-				WarningLevel="4"
-				WarnAsError="true"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="3"
-				CallingConvention="0"
-				CompileAs="1"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/LTCG"
-				AdditionalDependencies="Ws2_32.lib"
-				OutputFile="$(OutDir)/antlr3c.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-				ValidateIntelliSense="true"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseDLL|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				InlineFunctionExpansion="2"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="true"
-				EnableFiberSafeOptimizations="true"
-				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				StringPooling="true"
-				ExceptionHandling="1"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableEnhancedInstructionSet="2"
-				FloatingPointModel="2"
-				DisableLanguageExtensions="false"
-				RuntimeTypeInfo="false"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation=".\asm\release"
-				WarningLevel="4"
-				WarnAsError="true"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="3"
-				CallingConvention="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib"
-				OutputFile="$(OutDir)\antlr3c.dll"
-				Version="3.1.1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(TargetDir)$(TargetName)_dll.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-				ValidateIntelliSense="true"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseDLL|x64"
-			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
-			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				InlineFunctionExpansion="2"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="true"
-				EnableFiberSafeOptimizations="true"
-				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				StringPooling="true"
-				ExceptionHandling="1"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableEnhancedInstructionSet="0"
-				FloatingPointModel="2"
-				DisableLanguageExtensions="false"
-				RuntimeTypeInfo="false"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation=".\asm\release"
-				WarningLevel="4"
-				WarnAsError="true"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="3"
-				CallingConvention="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib"
-				OutputFile="$(OutDir)\antlr3c64.dll"
-				Version="3.1.1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(TargetDir)$(TargetName)_dll.lib"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-				ValidateIntelliSense="true"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="DebugDLL|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-				Outputs="$(TargetDir)$(TargetName)_dll.lib"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				StringPooling="true"
-				MinimalRebuild="false"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				StructMemberAlignment="0"
-				EnableFunctionLevelLinking="true"
-				EnableEnhancedInstructionSet="0"
-				FloatingPointModel="0"
-				FloatingPointExceptions="true"
-				DisableLanguageExtensions="false"
-				UsePrecompiledHeader="0"
-				ExpandAttributedSource="true"
-				AssemblerOutput="2"
-				BrowseInformation="1"
-				WarningLevel="4"
-				WarnAsError="false"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="3"
-				CallingConvention="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib"
-				OutputFile="$(OutDir)\antlr3cd.dll"
-				Version="3.1.1"
-				GenerateDebugInformation="true"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(TargetDir)$(TargetName)_dll.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="DebugDLL|x64"
-			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
-			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-				Outputs="$(TargetDir)$(TargetName)_dll.lib"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				StringPooling="true"
-				MinimalRebuild="false"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				StructMemberAlignment="0"
-				EnableFunctionLevelLinking="true"
-				EnableEnhancedInstructionSet="0"
-				FloatingPointModel="0"
-				FloatingPointExceptions="true"
-				DisableLanguageExtensions="false"
-				UsePrecompiledHeader="0"
-				ExpandAttributedSource="true"
-				AssemblerOutput="2"
-				BrowseInformation="1"
-				WarningLevel="4"
-				WarnAsError="false"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="3"
-				CallingConvention="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib"
-				OutputFile="$(OutDir)\antlr3c64d.dll"
-				Version="3.1.1"
-				GenerateDebugInformation="true"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(TargetDir)$(TargetName)_dll.lib"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<File
-				RelativePath=".\src\antlr3baserecognizer.c"
-				>
-			</File>
-			<File
-				RelativePath=".\src\antlr3basetree.c"
-				>
-			</File>
-			<File
-				RelativePath=".\src\antlr3basetreeadaptor.c"
-				>
-			</File>
-			<File
-				RelativePath=".\src\antlr3bitset.c"
-				>
-			</File>
-			<File
-				RelativePath=".\src\antlr3collections.c"
-				>
-			</File>
-			<File
-				RelativePath=".\src\antlr3commontoken.c"
-				>
-			</File>
-			<File
-				RelativePath=".\src\antlr3commontree.c"
-				>
-			</File>
-			<File
-				RelativePath=".\src\antlr3commontreeadaptor.c"
-				>
-			</File>
-			<File
-				RelativePath=".\src\antlr3commontreenodestream.c"
-				>
-			</File>
-			<File
-				RelativePath=".\src\antlr3convertutf.c"
-				>
-			</File>
-			<File
-				RelativePath=".\src\antlr3cyclicdfa.c"
-				>
-			</File>
-			<File
-				RelativePath=".\src\antlr3debughandlers.c"
-				>
-			</File>
-			<File
-				RelativePath=".\src\antlr3encodings.c"
-				>
-			</File>
-			<File
-				RelativePath=".\src\antlr3exception.c"
-				>
-			</File>
-			<File
-				RelativePath=".\src\antlr3filestream.c"
-				>
-			</File>
-			<File
-				RelativePath=".\src\antlr3inputstream.c"
-				>
-			</File>
-			<File
-				RelativePath=".\src\antlr3intstream.c"
-				>
-			</File>
-			<File
-				RelativePath=".\src\antlr3lexer.c"
-				>
-			</File>
-			<File
-				RelativePath=".\src\antlr3parser.c"
-				>
-			</File>
-			<File
-				RelativePath=".\src\antlr3rewritestreams.c"
-				>
-			</File>
-			<File
-				RelativePath=".\src\antlr3string.c"
-				>
-			</File>
-			<File
-				RelativePath=".\src\antlr3tokenstream.c"
-				>
-			</File>
-			<File
-				RelativePath=".\src\antlr3treeparser.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-			<File
-				RelativePath=".\include\antlr3.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3baserecognizer.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3basetree.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3basetreeadaptor.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3bitset.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3collections.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3commontoken.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3commontree.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3commontreeadaptor.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3commontreenodestream.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3convertutf.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3cyclicdfa.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3debugeventlistener.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3defs.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3encodings.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3errors.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3exception.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3filestream.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3input.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3interfaces.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3intstream.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3lexer.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3memory.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3parser.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3parsetree.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3recognizersharedstate.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3rewritestreams.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3string.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3tokenstream.h"
-				>
-			</File>
-			<File
-				RelativePath=".\include\antlr3treeparser.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Templates"
-			Filter=".stg"
-			>
-			<File
-				RelativePath="..\..\tool\src\main\resources\org\antlr\codegen\templates\C\AST.stg"
-				>
-			</File>
-			<File
-				RelativePath="..\..\tool\src\main\resources\org\antlr\codegen\templates\C\ASTDbg.stg"
-				>
-			</File>
-			<File
-				RelativePath="..\..\tool\src\main\resources\org\antlr\codegen\templates\C\ASTParser.stg"
-				>
-			</File>
-			<File
-				RelativePath="..\..\tool\src\main\resources\org\antlr\codegen\templates\C\ASTTreeParser.stg"
-				>
-			</File>
-			<File
-				RelativePath="..\..\tool\src\main\resources\org\antlr\codegen\templates\C\C.stg"
-				>
-			</File>
-			<File
-				RelativePath="..\..\tool\src\main\resources\org\antlr\codegen\templates\C\Dbg.stg"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Java"
-			Filter="*.java"
-			>
-			<File
-				RelativePath="..\..\tool\src\main\java\org\antlr\codegen\CTarget.java"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Doxygen"
-			>
-			<File
-				RelativePath=".\doxygen\atsections.dox"
-				>
-			</File>
-			<File
-				RelativePath=".\doxygen\build.dox"
-				>
-			</File>
-			<File
-				RelativePath=".\doxygen\buildrec.dox"
-				>
-			</File>
-			<File
-				RelativePath=".\doxygen\changes31.dox"
-				>
-			</File>
-			<File
-				RelativePath=".\doxygen\doxygengroups.dox"
-				>
-			</File>
-			<File
-				RelativePath=".\doxygen\generate.dox"
-				>
-			</File>
-			<File
-				RelativePath=".\doxygen\interop.dox"
-				>
-			</File>
-			<File
-				RelativePath=".\doxygen\mainpage.dox"
-				>
-			</File>
-			<File
-				RelativePath=".\doxygen\runtime.dox"
-				>
-			</File>
-			<File
-				RelativePath=".\doxygen\using.dox"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-		<Global
-			Name="DevPartner_IsInstrumented"
-			Value="0"
-		/>
-	</Globals>
-</VisualStudioProject>
diff --git a/antlr-3.4/runtime/C/dist/libantlr3c-3.4.tar.gz b/antlr-3.4/runtime/C/dist/libantlr3c-3.4.tar.gz
deleted file mode 100644
index daeb313..0000000
--- a/antlr-3.4/runtime/C/dist/libantlr3c-3.4.tar.gz
+++ /dev/null
Binary files differ
diff --git a/antlr-3.4/runtime/C/include/antlr3convertutf.h b/antlr-3.4/runtime/C/include/antlr3convertutf.h
deleted file mode 100644
index 79cc82c..0000000
--- a/antlr-3.4/runtime/C/include/antlr3convertutf.h
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Copyright 2001-2004 Unicode, Inc.
- * 
- * Disclaimer
- * 
- * This source code is provided as is by Unicode, Inc. No claims are
- * made as to fitness for any particular purpose. No warranties of any
- * kind are expressed or implied. The recipient agrees to determine
- * applicability of information provided. If this file has been
- * purchased on magnetic or optical media from Unicode, Inc., the
- * sole remedy for any claim will be exchange of defective media
- * within 90 days of receipt.
- * 
- * Limitations on Rights to Redistribute This Code
- * 
- * Unicode, Inc. hereby grants the right to freely use the information
- * supplied in this file in the creation of products supporting the
- * Unicode Standard, and to make copies of this file in any form
- * for internal or external distribution as long as this notice
- * remains attached.
- */
-
-/* ---------------------------------------------------------------------
-
-    Conversions between UTF32, UTF-16, and UTF-8.  Header file.
-
-    Several functions are included here, forming a complete set of
-    conversions between the three formats.  UTF-7 is not included
-    here, but is handled in a separate source file.
-
-    Each of these routines takes pointers to input buffers and output
-    buffers.  The input buffers are const.
-
-    Each routine converts the text between *sourceStart and sourceEnd,
-    putting the result into the buffer between *targetStart and
-    targetEnd. Note: the end pointers are *after* the last item: e.g. 
-    *(sourceEnd - 1) is the last item.
-
-    The return result indicates whether the conversion was successful,
-    and if not, whether the problem was in the source or target buffers.
-    (Only the first encountered problem is indicated.)
-
-    After the conversion, *sourceStart and *targetStart are both
-    updated to point to the end of last text successfully converted in
-    the respective buffers.
-
-    Input parameters:
-	sourceStart - pointer to a pointer to the source buffer.
-		The contents of this are modified on return so that
-		it points at the next thing to be converted.
-	targetStart - similarly, pointer to pointer to the target buffer.
-	sourceEnd, targetEnd - respectively pointers to the ends of the
-		two buffers, for overflow checking only.
-
-    These conversion functions take a ConversionFlags argument. When this
-    flag is set to strict, both irregular sequences and isolated surrogates
-    will cause an error.  When the flag is set to lenient, both irregular
-    sequences and isolated surrogates are converted.
-
-    Whether the flag is strict or lenient, all illegal sequences will cause
-    an error return. This includes sequences such as: <F4 90 80 80>, <C0 80>,
-    or <A0> in UTF-8, and values above 0x10FFFF in UTF-32. Conformant code
-    must check for illegal sequences.
-
-    When the flag is set to lenient, characters over 0x10FFFF are converted
-    to the replacement character; otherwise (when the flag is set to strict)
-    they constitute an error.
-
-    Output parameters:
-	The value "sourceIllegal" is returned from some routines if the input
-	sequence is malformed.  When "sourceIllegal" is returned, the source
-	value will point to the illegal value that caused the problem. E.g.,
-	in UTF-8 when a sequence is malformed, it points to the start of the
-	malformed sequence.  
-
-    Author: Mark E. Davis, 1994.
-    Rev History: Rick McGowan, fixes & updates May 2001.
-		 Fixes & updates, Sept 2001.
-
------------------------------------------------------------------------- */
-
-/* ---------------------------------------------------------------------
-    The following 4 definitions are compiler-specific.
-    The C standard does not guarantee that wchar_t has at least
-    16 bits, so wchar_t is no less portable than unsigned short!
-    All should be unsigned values to avoid sign extension during
-    bit mask & shift operations.
------------------------------------------------------------------------- */
-
-
-// Changes for ANTLR3 - Jim Idle, January 2008.
-// builtin types defined for Unicode types changed to
-// aliases for the types that are system determined by
-// ANTLR at compile time.
-//
-// typedef unsigned long	UTF32;	/* at least 32 bits */
-// typedef unsigned short	UTF16;	/* at least 16 bits */
-// typedef unsigned char	UTF8;	/* typically 8 bits */
-// typedef unsigned char	Boolean; /* 0 or 1 */
-
-#ifndef	_ANTLR3_CONVERTUTF_H
-#define	_ANTLR3_CONVERTUTF_H
-
-#include	<antlr3defs.h>
-
-typedef ANTLR3_UINT32	UTF32;	/* at least 32 bits */
-typedef ANTLR3_UINT16	UTF16;	/* at least 16 bits */
-typedef ANTLR3_UINT8	UTF8;	/* typically 8 bits */
-
-/* Some fundamental constants */
-#define UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD
-#define UNI_MAX_BMP (UTF32)0x0000FFFF
-#define UNI_MAX_UTF16 (UTF32)0x0010FFFF
-#define UNI_MAX_UTF32 (UTF32)0x7FFFFFFF
-#define UNI_MAX_LEGAL_UTF32 (UTF32)0x0010FFFF
-
-#define UNI_SUR_HIGH_START  (UTF32)0xD800
-#define UNI_SUR_HIGH_END    (UTF32)0xDBFF
-#define UNI_SUR_LOW_START   (UTF32)0xDC00
-#define UNI_SUR_LOW_END     (UTF32)0xDFFF
-#define false	            ANTLR3_FALSE
-#define true	            ANTLR3_TRUE
-#define halfShift           ((UTF32)10)
-#define halfBase            ((UTF32)0x0010000UL)
-#define halfMask            ((UTF32)0x3FFUL)
-
-typedef enum {
-	conversionOK, 		/* conversion successful */
-	sourceExhausted,	/* partial character in source, but hit end */
-	targetExhausted,	/* insuff. room in target for conversion */
-	sourceIllegal		/* source sequence is illegal/malformed */
-} ConversionResult;
-
-typedef enum {
-	strictConversion = 0,
-	lenientConversion
-} ConversionFlags;
-
-/* This is for C++ and does no harm in C */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-ConversionResult ConvertUTF8toUTF16 (
-		const UTF8** sourceStart, const UTF8* sourceEnd, 
-		UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags);
-
-ConversionResult ConvertUTF16toUTF8 (
-		const UTF16** sourceStart, const UTF16* sourceEnd, 
-		UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags);
-		
-ConversionResult ConvertUTF8toUTF32 (
-		const UTF8** sourceStart, const UTF8* sourceEnd, 
-		UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags);
-
-ConversionResult ConvertUTF32toUTF8 (
-		const UTF32** sourceStart, const UTF32* sourceEnd, 
-		UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags);
-		
-ConversionResult ConvertUTF16toUTF32 (
-		const UTF16** sourceStart, const UTF16* sourceEnd, 
-		UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags);
-
-ConversionResult ConvertUTF32toUTF16 (
-		const UTF32** sourceStart, const UTF32* sourceEnd, 
-		UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags);
-
-ANTLR3_BOOLEAN isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-/* --------------------------------------------------------------------- */
diff --git a/antlr-3.4/runtime/C/include/antlr3debugeventlistener.h b/antlr-3.4/runtime/C/include/antlr3debugeventlistener.h
deleted file mode 100644
index c9cd6ce..0000000
--- a/antlr-3.4/runtime/C/include/antlr3debugeventlistener.h
+++ /dev/null
@@ -1,398 +0,0 @@
-/**
- * \file
- * The definition of all debugging events that a recognizer can trigger.
- *
- * \remark
- *  From the java implementation by Terence Parr...
- *  I did not create a separate AST debugging interface as it would create
- *  lots of extra classes and DebugParser has a dbg var defined, which makes
- *  it hard to change to ASTDebugEventListener.  I looked hard at this issue
- *  and it is easier to understand as one monolithic event interface for all
- *  possible events.  Hopefully, adding ST debugging stuff won't be bad.  Leave
- *  for future. 4/26/2006.
- */
-
-#ifndef	ANTLR3_DEBUG_EVENT_LISTENER_H
-#define	ANTLR3_DEBUG_EVENT_LISTENER_H
-
-// [The "BSD licence"]
-// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC
-// http://www.temporal-wave.com
-// http://www.linkedin.com/in/jimidle
-//
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// 1. Redistributions of source code must retain the above copyright
-//    notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-//    notice, this list of conditions and the following disclaimer in the
-//    documentation and/or other materials provided with the distribution.
-// 3. The name of the author may not be used to endorse or promote products
-//    derived from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#include    <antlr3defs.h>
-#include    <antlr3basetree.h>
-#include    <antlr3commontoken.h>
-
-
-/// Default debugging port
-///
-#define DEFAULT_DEBUGGER_PORT		0xBFCC;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** The ANTLR3 debugging interface for communicating with ANLTR Works. Function comments
- *  mostly taken from the Java version.
- */
-typedef struct ANTLR3_DEBUG_EVENT_LISTENER_struct
-{
-	/// The port number which the debug listener should listen on for a connection
-	///
-	ANTLR3_UINT32		port;
-
-	/// The socket structure we receive after a successful accept on the serverSocket
-	///
-	SOCKET				socket;
-
-	/** The version of the debugging protocol supported by the providing
-	 *  instance of the debug event listener.
-	 */
-	int					PROTOCOL_VERSION;
-
-	/// The name of the grammar file that we are debugging
-	///
-	pANTLR3_STRING		grammarFileName;
-
-	/// Indicates whether we have already connected or not
-	///
-	ANTLR3_BOOLEAN		initialized;
-
-	/// Used to serialize the values of any particular token we need to
-	/// send back to the debugger.
-	///
-	pANTLR3_STRING		tokenString;
-
-
-	/// Allows the debug event system to access the adapter in use
-	/// by the recognizer, if this is a tree parser of some sort.
-	///
-	pANTLR3_BASE_TREE_ADAPTOR	adaptor;
-
-	/// Wait for a connection from the debugger and initiate the
-	/// debugging session.
-	///
-	ANTLR3_BOOLEAN	(*handshake)		(pANTLR3_DEBUG_EVENT_LISTENER delboy);
-
-	/** The parser has just entered a rule.  No decision has been made about
-	 *  which alt is predicted.  This is fired AFTER init actions have been
-	 *  executed.  Attributes are defined and available etc...
-	 */
-	void			(*enterRule)		(pANTLR3_DEBUG_EVENT_LISTENER delboy, const char * grammarFileName, const char * ruleName);
-
-	/** Because rules can have lots of alternatives, it is very useful to
-	 *  know which alt you are entering.  This is 1..n for n alts.
-	 */
-	void			(*enterAlt)			(pANTLR3_DEBUG_EVENT_LISTENER delboy, int alt);
-
-	/** This is the last thing executed before leaving a rule.  It is
-	 *  executed even if an exception is thrown.  This is triggered after
-	 *  error reporting and recovery have occurred (unless the exception is
-	 *  not caught in this rule).  This implies an "exitAlt" event.
-	 */
-	void			(*exitRule)			(pANTLR3_DEBUG_EVENT_LISTENER delboy, const char * grammarFileName, const char * ruleName);
-
-	/** Track entry into any (...) subrule other EBNF construct 
-	 */
-	void			(*enterSubRule)		(pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber);
-	
-	void			(*exitSubRule)		(pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber);
-
-	/** Every decision, fixed k or arbitrary, has an enter/exit event
-	 *  so that a GUI can easily track what LT/consume events are
-	 *  associated with prediction.  You will see a single enter/exit
-	 *  subrule but multiple enter/exit decision events, one for each
-	 *  loop iteration.
-	 */
-	void			(*enterDecision)	(pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber);
-
-	void			(*exitDecision)		(pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber);
-
-	/** An input token was consumed; matched by any kind of element.
-	 *  Trigger after the token was matched by things like match(), matchAny().
-	 */
-	void			(*consumeToken)		(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t);
-
-	/** An off-channel input token was consumed.
-	 *  Trigger after the token was matched by things like match(), matchAny().
-	 *  (unless of course the hidden token is first stuff in the input stream).
-	 */
-	void			(*consumeHiddenToken)	(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t);
-
-	/** Somebody (anybody) looked ahead.  Note that this actually gets
-	 *  triggered by both LA and LT calls.  The debugger will want to know
-	 *  which Token object was examined.  Like consumeToken, this indicates
-	 *  what token was seen at that depth.  A remote debugger cannot look
-	 *  ahead into a file it doesn't have so LT events must pass the token
-	 *  even if the info is redundant.
-	 */
-	void			(*LT)				(pANTLR3_DEBUG_EVENT_LISTENER delboy, int i, pANTLR3_COMMON_TOKEN t);
-
-	/** The parser is going to look arbitrarily ahead; mark this location,
-	 *  the token stream's marker is sent in case you need it.
-	 */
-	void			(*mark)				(pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_MARKER marker);
-
-	/** After an arbitrarily long lookahead as with a cyclic DFA (or with
-	 *  any backtrack), this informs the debugger that stream should be
-	 *  rewound to the position associated with marker.
-	 */
-	void			(*rewind)			(pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_MARKER marker);
-
-	/** Rewind to the input position of the last marker.
-	 *  Used currently only after a cyclic DFA and just
-	 *  before starting a sem/syn predicate to get the
-	 *  input position back to the start of the decision.
-	 *  Do not "pop" the marker off the state.  mark(i)
-	 *  and rewind(i) should balance still.
-	 */
-	void			(*rewindLast)		(pANTLR3_DEBUG_EVENT_LISTENER delboy);
-
-	void			(*beginBacktrack)	(pANTLR3_DEBUG_EVENT_LISTENER delboy, int level);
-
-	void			(*endBacktrack)		(pANTLR3_DEBUG_EVENT_LISTENER delboy, int level, ANTLR3_BOOLEAN successful);
-
-	/** To watch a parser move through the grammar, the parser needs to
-	 *  inform the debugger what line/charPos it is passing in the grammar.
-	 *  For now, this does not know how to switch from one grammar to the
-	 *  other and back for island grammars etc...
-	 *
-	 *  This should also allow breakpoints because the debugger can stop
-	 *  the parser whenever it hits this line/pos.
-	 */
-	void			(*location)			(pANTLR3_DEBUG_EVENT_LISTENER delboy, int line, int pos);
-
-	/** A recognition exception occurred such as NoViableAltException.  I made
-	 *  this a generic event so that I can alter the exception hierarchy later
-	 *  without having to alter all the debug objects.
-	 *
-	 *  Upon error, the stack of enter rule/subrule must be properly unwound.
-	 *  If no viable alt occurs it is within an enter/exit decision, which
-	 *  also must be rewound.  Even the rewind for each mark must be unwound.
-	 *  In the Java target this is pretty easy using try/finally, if a bit
-	 *  ugly in the generated code.  The rewind is generated in DFA.predict()
-	 *  actually so no code needs to be generated for that.  For languages
-	 *  w/o this "finally" feature (C++?), the target implementor will have
-	 *  to build an event stack or something.
-	 *
-	 *  Across a socket for remote debugging, only the RecognitionException
-	 *  data fields are transmitted.  The token object or whatever that
-	 *  caused the problem was the last object referenced by LT.  The
-	 *  immediately preceding LT event should hold the unexpected Token or
-	 *  char.
-	 *
-	 *  Here is a sample event trace for grammar:
-	 *
-	 *  b : C ({;}A|B) // {;} is there to prevent A|B becoming a set
-     *    | D
-     *    ;
-     *
-	 *  The sequence for this rule (with no viable alt in the subrule) for
-	 *  input 'c c' (there are 3 tokens) is:
-	 *
-	 *		commence
-	 *		LT(1)
-	 *		enterRule b
-	 *		location 7 1
-	 *		enter decision 3
-	 *		LT(1)
-	 *		exit decision 3
-	 *		enterAlt1
-	 *		location 7 5
-	 *		LT(1)
-	 *		consumeToken [c/<4>,1:0]
-	 *		location 7 7
-	 *		enterSubRule 2
-	 *		enter decision 2
-	 *		LT(1)
-	 *		LT(1)
-	 *		recognitionException NoViableAltException 2 1 2
-	 *		exit decision 2
-	 *		exitSubRule 2
-	 *		beginResync
-	 *		LT(1)
-	 *		consumeToken [c/<4>,1:1]
-	 *		LT(1)
-	 *		endResync
-	 *		LT(-1)
-	 *		exitRule b
-	 *		terminate
-	 */
-	void			(*recognitionException)	(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_EXCEPTION e);
-
-	/** Indicates the recognizer is about to consume tokens to resynchronize
-	 *  the parser.  Any consume events from here until the recovered event
-	 *  are not part of the parse--they are dead tokens.
-	 */
-	void			(*beginResync)			(pANTLR3_DEBUG_EVENT_LISTENER delboy);
-
-	/** Indicates that the recognizer has finished consuming tokens in order
-	 *  to resynchronize.  There may be multiple beginResync/endResync pairs
-	 *  before the recognizer comes out of errorRecovery mode (in which
-	 *  multiple errors are suppressed).  This will be useful
-	 *  in a gui where you want to probably grey out tokens that are consumed
-	 *  but not matched to anything in grammar.  Anything between
-	 *  a beginResync/endResync pair was tossed out by the parser.
-	 */
-	void			(*endResync)			(pANTLR3_DEBUG_EVENT_LISTENER delboy);
-
-	/** A semantic predicate was evaluate with this result and action text 
-	*/
-	void			(*semanticPredicate)	(pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_BOOLEAN result, const char * predicate);
-
-	/** Announce that parsing has begun.  Not technically useful except for
-	 *  sending events over a socket.  A GUI for example will launch a thread
-	 *  to connect and communicate with a remote parser.  The thread will want
-	 *  to notify the GUI when a connection is made.  ANTLR parsers
-	 *  trigger this upon entry to the first rule (the ruleLevel is used to
-	 *  figure this out).
-	 */
-	void			(*commence)				(pANTLR3_DEBUG_EVENT_LISTENER delboy);
-
-	/** Parsing is over; successfully or not.  Mostly useful for telling
-	 *  remote debugging listeners that it's time to quit.  When the rule
-	 *  invocation level goes to zero at the end of a rule, we are done
-	 *  parsing.
-	 */
-	void			(*terminate)			(pANTLR3_DEBUG_EVENT_LISTENER delboy);
-
-	/// Retrieve acknowledge response from the debugger. in fact this
-	/// response is never used at the moment. So we just read whatever
-	/// is in the socket buffer and throw it away.
-	///
-	void			(*ack)					(pANTLR3_DEBUG_EVENT_LISTENER delboy);
-
-	// T r e e  P a r s i n g
-
-	/** Input for a tree parser is an AST, but we know nothing for sure
-	 *  about a node except its type and text (obtained from the adaptor).
-	 *  This is the analog of the consumeToken method.  The ID is usually 
-	 *  the memory address of the node.
-	 *  If the type is UP or DOWN, then
-	 *  the ID is not really meaningful as it's fixed--there is
-	 *  just one UP node and one DOWN navigation node.
-	 *
-	 *  Note that unlike the Java version, the node type of the C parsers
-	 *  is always fixed as pANTLR3_BASE_TREE because all such structures
-	 *  contain a super pointer to their parent, which is generally COMMON_TREE and within
-	 *  that there is a super pointer that can point to a user type that encapsulates it.
-	 *  Almost akin to saying that it is an interface pointer except we don't need to
-	 *  know what the interface is in full, just those bits that are the base.
-	 * @param t
-	 */
-	void			(*consumeNode)			(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t);
-
-	/** The tree parser looked ahead.  If the type is UP or DOWN,
-	 *  then the ID is not really meaningful as it's fixed--there is
-	 *  just one UP node and one DOWN navigation node.
-	 */
-	void			(*LTT)					(pANTLR3_DEBUG_EVENT_LISTENER delboy, int i, pANTLR3_BASE_TREE t);
-
-
-	// A S T  E v e n t s
-
-	/** A nil was created (even nil nodes have a unique ID...
-	 *  they are not "null" per se).  As of 4/28/2006, this
-	 *  seems to be uniquely triggered when starting a new subtree
-	 *  such as when entering a subrule in automatic mode and when
-	 *  building a tree in rewrite mode.
-     *
- 	 *  If you are receiving this event over a socket via
-	 *  RemoteDebugEventSocketListener then only t.ID is set.
-	 */
-	void			(*nilNode)				(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t);
-
-	/** If a syntax error occurs, recognizers bracket the error
-	 *  with an error node if they are building ASTs. This event
-	 *  notifies the listener that this is the case
-	 */
-	void			(*errorNode)			(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t);
-
-	/** Announce a new node built from token elements such as type etc...
-	 * 
-	 *  If you are receiving this event over a socket via
-	 *  RemoteDebugEventSocketListener then only t.ID, type, text are
-	 *  set.
-	 */
-	void			(*createNode)			(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t);
-
-	/** Announce a new node built from an existing token.
-	 *
-	 *  If you are receiving this event over a socket via
-	 *  RemoteDebugEventSocketListener then only node.ID and token.tokenIndex
-	 *  are set.
-	 */
-	void			(*createNodeTok)		(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE node, pANTLR3_COMMON_TOKEN token);
-
-	/** Make a node the new root of an existing root.  See
-	 *
-	 *  Note: the newRootID parameter is possibly different
-	 *  than the TreeAdaptor.becomeRoot() newRoot parameter.
-	 *  In our case, it will always be the result of calling
-	 *  TreeAdaptor.becomeRoot() and not root_n or whatever.
-	 *
-	 *  The listener should assume that this event occurs
-	 *  only when the current subrule (or rule) subtree is
-	 *  being reset to newRootID.
-	 * 
-	 *  If you are receiving this event over a socket via
-	 *  RemoteDebugEventSocketListener then only IDs are set.
-	 *
-	 *  @see org.antlr.runtime.tree.TreeAdaptor.becomeRoot()
-	 */
-	void			(*becomeRoot)			(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE newRoot, pANTLR3_BASE_TREE oldRoot);
-
-	/** Make childID a child of rootID.
-	 *
-	 *  If you are receiving this event over a socket via
-	 *  RemoteDebugEventSocketListener then only IDs are set.
-	 * 
-	 *  @see org.antlr.runtime.tree.TreeAdaptor.addChild()
-	 */
-	void			(*addChild)				(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE root, pANTLR3_BASE_TREE child);
-
-	/** Set the token start/stop token index for a subtree root or node.
-	 *
-	 *  If you are receiving this event over a socket via
-	 *  RemoteDebugEventSocketListener then only t.ID is set.
-	 */
-	void			(*setTokenBoundaries)	(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t, ANTLR3_MARKER tokenStartIndex, ANTLR3_MARKER tokenStopIndex);
-
-	/// Free up the resources allocated to this structure
-	///
-	void			(*free)					(pANTLR3_DEBUG_EVENT_LISTENER delboy);
-
-}
-	ANTLR3_DEBUG_EVENT_LISTENER;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
diff --git a/antlr-3.4/runtime/C/include/antlr3defs.h b/antlr-3.4/runtime/C/include/antlr3defs.h
deleted file mode 100644
index 2435b02..0000000
--- a/antlr-3.4/runtime/C/include/antlr3defs.h
+++ /dev/null
@@ -1,632 +0,0 @@
-/** \file
- * Basic type and constant definitions for ANTLR3 Runtime.
- */
-#ifndef	_ANTLR3DEFS_H
-#define	_ANTLR3DEFS_H
-
-// [The "BSD licence"]
-// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC
-// http://www.temporal-wave.com
-// http://www.linkedin.com/in/jimidle
-//
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// 1. Redistributions of source code must retain the above copyright
-//    notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-//    notice, this list of conditions and the following disclaimer in the
-//    documentation and/or other materials provided with the distribution.
-// 3. The name of the author may not be used to endorse or promote products
-//    derived from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-/* Following are for generated code, they are not referenced internally!!!
- */
-#if !defined(ANTLR3_HUGE) && !defined(ANTLR3_AVERAGE) && !defined(ANTLR3_SMALL)
-#define	ANTLR3_AVERAGE
-#endif
-
-#ifdef	ANTLR3_HUGE
-#ifndef	ANTLR3_SIZE_HINT
-#define	ANTLR3_SIZE_HINT        2049
-#endif
-#ifndef	ANTLR3_LIST_SIZE_HINT
-#define	ANTLR3_LIST_SIZE_HINT   127
-#endif
-#endif
-
-#ifdef	ANTLR3_AVERAGE
-#ifndef	ANTLR3_SIZE_HINT
-#define	ANTLR3_SIZE_HINT        1025
-#define	ANTLR3_LIST_SIZE_HINT   63
-#endif
-#endif
-
-#ifdef	ANTLR3_SMALL
-#ifndef	ANTLR3_SIZE_HINT
-#define	ANTLR3_SIZE_HINT        211
-#define	ANTLR3_LIST_SIZE_HINT   31
-#endif
-#endif
-
-// Definitions that indicate the encoding scheme character streams and strings etc
-//
-/// Indicates Big Endian for encodings where this makes sense
-///
-#define ANTLR3_BE           1
-
-/// Indicates Little Endian for encoidngs where this makes sense
-///
-#define ANTLR3_LE           2
-
-/// General latin-1 or other 8 bit encoding scheme such as straight ASCII
-///
-#define ANTLR3_ENC_8BIT     4
-
-/// UTF-8 encoding scheme
-///
-#define ANTLR3_ENC_UTF8     8
-
-/// UTF-16 encoding scheme (which also covers UCS2 as that does not have surrogates)
-///
-#define ANTLR3_ENC_UTF16        16
-#define ANTLR3_ENC_UTF16BE      16 + ANTLR3_BE
-#define ANTLR3_ENC_UTF16LE      16 + ANTLR3_LE
-
-/// UTF-32 encoding scheme (basically straight 32 bit)
-///
-#define ANTLR3_ENC_UTF32        32
-#define ANTLR3_ENC_UTF32BE      32 + ANTLR3_BE
-#define ANTLR3_ENC_UTF32LE      32 + ANTLR3_LE
-
-/// Input is 8 bit EBCDIC (which we convert to 8 bit ASCII on the fly
-///
-#define ANTLR3_ENC_EBCDIC       64
-
-/* Common definitions come first
- */
-#include    <antlr3errors.h>
-
-/* Work out what operating system/compiler this is. We just do this once
- * here and use an internal symbol after this.
- */
-#ifdef	_WIN64
-
-# ifndef	ANTLR3_WINDOWS
-#   define	ANTLR3_WINDOWS
-# endif
-# define	ANTLR3_WIN64
-# define	ANTLR3_USE_64BIT
-
-#else
-
-#ifdef	_WIN32
-# ifndef	ANTLR3_WINDOWS
-#  define	ANTLR3_WINDOWS
-# endif
-
-#define	ANTLR3_WIN32
-#endif
-
-#endif
-
-#ifdef	ANTLR3_WINDOWS 
-
-#ifndef WIN32_LEAN_AND_MEAN
-#define	WIN32_LEAN_AND_MEAN
-#endif
-
-/* Allow VC 8 (vs2005) and above to use 'secure' versions of various functions such as sprintf
- */
-#ifndef	_CRT_SECURE_NO_DEPRECATE 
-#define	_CRT_SECURE_NO_DEPRECATE 
-#endif
-
-#include    <windows.h>
-#include    <stdlib.h>
-#include    <winsock.h>
-#include    <stdio.h>
-#include    <sys/types.h>
-#include    <sys/stat.h>
-#include    <stdarg.h>
-
-#define	ANTLR3_API      __declspec(dllexport)
-#define	ANTLR3_CDECL    __cdecl
-#define ANTLR3_FASTCALL __fastcall
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef __MINGW32__
-// Standard Windows types
-//
-typedef	INT32	ANTLR3_CHAR,	*pANTLR3_CHAR;
-typedef	UINT32	ANTLR3_UCHAR,	*pANTLR3_UCHAR;
-
-typedef	INT8	ANTLR3_INT8,	*pANTLR3_INT8;
-typedef	INT16	ANTLR3_INT16,	*pANTLR3_INT16;
-typedef	INT32	ANTLR3_INT32,	*pANTLR3_INT32;
-typedef	INT64	ANTLR3_INT64,	*pANTLR3_INT64;
-typedef	UINT8	ANTLR3_UINT8,	*pANTLR3_UINT8;
-typedef	UINT16	ANTLR3_UINT16,	*pANTLR3_UINT16;
-typedef	UINT32	ANTLR3_UINT32,	*pANTLR3_UINT32;
-typedef	UINT64	ANTLR3_UINT64,	*pANTLR3_UINT64;
-typedef UINT64  ANTLR3_BITWORD, *pANTLR3_BITWORD;
-typedef	UINT8	ANTLR3_BOOLEAN, *pANTLR3_BOOLEAN;
-
-#else
-// Mingw uses stdint.h and fails to define standard Microsoft typedefs
-// such as UINT16, hence we must use stdint.h for Mingw.
-//
-#include <stdint.h>
-typedef int32_t     ANTLR3_CHAR,    *pANTLR3_CHAR;
-typedef uint32_t    ANTLR3_UCHAR,   *pANTLR3_UCHAR;
-
-typedef int8_t	    ANTLR3_INT8,    *pANTLR3_INT8;
-typedef int16_t	    ANTLR3_INT16,   *pANTLR3_INT16;
-typedef int32_t	    ANTLR3_INT32,   *pANTLR3_INT32;
-typedef int64_t	    ANTLR3_INT64,   *pANTLR3_INT64;
-
-typedef uint8_t	    ANTLR3_UINT8,   *pANTLR3_UINT8;
-typedef uint16_t    ANTLR3_UINT16,  *pANTLR3_UINT16;
-typedef uint32_t    ANTLR3_UINT32,  *pANTLR3_UINT32;
-typedef uint64_t    ANTLR3_UINT64,  *pANTLR3_UINT64;
-typedef uint64_t    ANTLR3_BITWORD, *pANTLR3_BITWORD;
-
-typedef	uint8_t	    ANTLR3_BOOLEAN, *pANTLR3_BOOLEAN;
-
-#endif
-
-
-
-#define	ANTLR3_UINT64_LIT(lit)  lit##ULL
-
-#define	ANTLR3_INLINE	        __inline
-
-typedef FILE *	    ANTLR3_FDSC;
-typedef	struct stat ANTLR3_FSTAT_STRUCT;
-
-#ifdef	ANTLR3_USE_64BIT
-#define	ANTLR3_FUNC_PTR(ptr)	(void *)((ANTLR3_UINT64)(ptr))
-#define ANTLR3_UINT64_CAST(ptr) (ANTLR3_UINT64)(ptr))
-#define	ANTLR3_UINT32_CAST(ptr)	(ANTLR3_UINT32)((ANTLR3_UINT64)(ptr))
-typedef ANTLR3_INT64		ANTLR3_MARKER;			
-typedef ANTLR3_UINT64		ANTLR3_INTKEY;
-#else
-#define	ANTLR3_FUNC_PTR(ptr)	(void *)((ANTLR3_UINT32)(ptr))
-#define ANTLR3_UINT64_CAST(ptr) (ANTLR3_UINT64)((ANTLR3_UINT32)(ptr))
-#define	ANTLR3_UINT32_CAST(ptr)	(ANTLR3_UINT32)(ptr)
-typedef	ANTLR3_INT32		ANTLR3_MARKER;
-typedef ANTLR3_UINT32		ANTLR3_INTKEY;
-#endif
-
-#ifdef	ANTLR3_WIN32
-#endif
-
-#ifdef	ANTLR3_WIN64
-#endif
-
-
-typedef	int			ANTLR3_SALENT;								// Type used for size of accept structure
-typedef struct sockaddr_in	ANTLR3_SOCKADDRT, * pANTLR3_SOCKADDRT;	// Type used for socket address declaration
-typedef struct sockaddr		ANTLR3_SOCKADDRC, * pANTLR3_SOCKADDRC;	// Type used for cast on accept()
-
-#define	ANTLR3_CLOSESOCKET	closesocket
-
-#ifdef __cplusplus
-}
-#endif
-
-/* Warnings that are over-zealous such as complaining about strdup, we
- * can turn off.
- */
-
-/* Don't complain about "deprecated" functions such as strdup
- */
-#pragma warning( disable : 4996 )
-
-#else
-
-/* Include configure generated header file
- */
-#include	<antlr3config.h>
-
-#include <stdio.h>
-
-#if HAVE_STDINT_H
-# include <stdint.h>
-#endif
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if STDC_HEADERS
-# include   <stdlib.h>
-# include   <stddef.h>
-# include   <stdarg.h>
-#else
-# if HAVE_STDLIB_H
-#  include  <stdlib.h>
-# endif
-# if HAVE_STDARG_H
-#  include  <stdarg.h>
-# endif
-#endif
-
-#if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
-#  include <memory.h>
-# endif
-# include <string.h>
-#endif
-
-#if HAVE_STRINGS_H
-# include <strings.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include	<netinet/in.h>
-#endif
-
-#ifdef HAVE_SOCKET_H
-# include	<socket.h>
-#else
-# if HAVE_SYS_SOCKET_H
-#  include	<sys/socket.h>
-# endif
-#endif
-
-#ifdef HAVE_NETINET_TCP_H
-#include	<netinet/tcp.h>
-#endif
-
-#ifdef HAVE_ARPA_NAMESER_H
-#include <arpa/nameser.h> /* DNS HEADER struct */
-#endif
-
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-
-
-#ifdef HAVE_SYS_RESOLVE_H
-#include	<sys/resolv.h>
-#endif
-
-#ifdef HAVE_RESOLVE_H
-#include	<resolv.h>
-#endif
-
-
-#ifdef	HAVE_MALLOC_H
-# include    <malloc.h>
-#else
-# ifdef	HAVE_SYS_MALLOC_H
-#  include    <sys/malloc.h>
-# endif
-#endif
-
-#ifdef  HAVE_CTYPE_H
-# include   <ctype.h>
-#endif
-
-/* Some platforms define a macro, index() in string.h. AIX is
- * one of these for instance. We must get rid of that definition
- * as we use ->index all over the place. defining macros like this in system header
- * files is a really bad idea, but I doubt that IBM will listen to me ;-)
- */
-#ifdef	index
-#undef	index
-#endif
-
-#define _stat   stat
-
-// SOCKET not defined on Unix
-// 
-typedef	int	SOCKET;
-
-#define ANTLR3_API
-#define	ANTLR3_CDECL
-#define ANTLR3_FASTCALL
-
-#ifdef	__hpux
-
- // HPUX is always different usually for no good reason. Tru64 should have kicked it
- // into touch and everyone knows it ;-)
- //
- typedef struct sockaddr_in ANTLR3_SOCKADDRT, * pANTLR3_SOCKADDRT;	// Type used for socket address declaration
- typedef void *		    pANTLR3_SOCKADDRC;				// Type used for cast on accept()
- typedef int		    ANTLR3_SALENT;
-
-#else
-
-# if defined(_AIX) || __GNUC__ > 3 
-
-   typedef  socklen_t   ANTLR3_SALENT;
-
-# else
-
-   typedef  size_t	ANTLR3_SALENT;
-
-# endif
-
-   typedef struct sockaddr_in   ANTLR3_SOCKADDRT, * pANTLR3_SOCKADDRT;	// Type used for socket address declaration
-   typedef struct sockaddr	* pANTLR3_SOCKADDRC;                    // Type used for cast on accept()
-
-#endif
-
-#define INVALID_SOCKET      ((SOCKET)-1)
-#define	ANTLR3_CLOSESOCKET  close
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Inherit type definitions for autoconf
- */
-typedef int32_t	    ANTLR3_CHAR,    *pANTLR3_CHAR;
-typedef uint32_t    ANTLR3_UCHAR,   *pANTLR3_UCHAR;
-
-typedef int8_t	    ANTLR3_INT8,    *pANTLR3_INT8;
-typedef int16_t	    ANTLR3_INT16,   *pANTLR3_INT16;
-typedef int32_t	    ANTLR3_INT32,   *pANTLR3_INT32;
-typedef int64_t	    ANTLR3_INT64,   *pANTLR3_INT64;
-
-typedef uint8_t	    ANTLR3_UINT8,   *pANTLR3_UINT8;
-typedef uint16_t    ANTLR3_UINT16,  *pANTLR3_UINT16;
-typedef uint32_t    ANTLR3_UINT32,  *pANTLR3_UINT32;
-typedef uint64_t    ANTLR3_UINT64,  *pANTLR3_UINT64;
-typedef uint64_t    ANTLR3_BITWORD, *pANTLR3_BITWORD;
-
-typedef uint32_t    ANTLR3_BOOLEAN, *pANTLR3_BOOLEAN;
-
-#define ANTLR3_INLINE   inline
-#define	ANTLR3_API
-
-typedef FILE *	    ANTLR3_FDSC;
-typedef	struct stat ANTLR3_FSTAT_STRUCT;
-
-#ifdef	ANTLR3_USE_64BIT
-#define	ANTLR3_FUNC_PTR(ptr)    (void *)((ANTLR3_UINT64)(ptr))
-#define ANTLR3_UINT64_CAST(ptr)	(ANTLR3_UINT64)(ptr))
-#define	ANTLR3_UINT32_CAST(ptr) (ANTLR3_UINT32)((ANTLR3_UINT64)(ptr))
-typedef ANTLR3_INT64		ANTLR3_MARKER;
-typedef ANTLR3_UINT64		ANTLR3_INTKEY;
-#else
-#define	ANTLR3_FUNC_PTR(ptr)	(void *)((ANTLR3_UINT32)(ptr))
-#define ANTLR3_UINT64_CAST(ptr) (ANTLR3_UINT64)((ANTLR3_UINT32)(ptr))
-#define	ANTLR3_UINT32_CAST(ptr)	(ANTLR3_UINT32)(ptr)
-typedef	ANTLR3_INT32		ANTLR3_MARKER;
-typedef ANTLR3_UINT32		ANTLR3_INTKEY;
-#endif
-#define	ANTLR3_UINT64_LIT(lit)	lit##ULL
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-#ifdef ANTLR3_USE_64BIT
-#define ANTLR3_TRIE_DEPTH 63
-#else
-#define ANTLR3_TRIE_DEPTH 31
-#endif
-/* Pre declare the typedefs for all the interfaces, then 
- * they can be inter-dependant and we will let the linker
- * sort it out for us.
- */
-#include    <antlr3interfaces.h>
-
-// Include the unicode.org conversion library header.
-//
-#include    <antlr3convertutf.h>
-
-/* Prototypes
- */
-#ifndef ANTLR3_MALLOC
-/// Default definition of ANTLR3_MALLOC. You can override this before including
-/// antlr3.h if you wish to use your own implementation.
-///
-#define	ANTLR3_MALLOC(request)          malloc  ((size_t)(request))
-#endif
-
-#ifndef ANTLR3_CALLOC
-/// Default definition of ANTLR3_CALLOC. You can override this before including
-/// antlr3.h if you wish to use your own implementation.
-///
-#define	ANTLR3_CALLOC(numEl, elSize)    calloc  (numEl, (size_t)(elSize))
-#endif
-
-#ifndef ANTLR3_REALLOC
-/// Default definition of ANTLR3_REALLOC. You can override this before including
-/// antlr3.h if you wish to use your own implementation.
-///
-#define ANTLR3_REALLOC(current, request)    realloc ((void *)(current), (size_t)(request))
-#endif
-#ifndef ANTLR3_FREE
-/// Default definition of ANTLR3_FREE. You can override this before including
-/// antlr3.h if you wish to use your own implementation.
-///
-#define	ANTLR3_FREE(ptr)		free    ((void *)(ptr))
-#endif
-#ifndef ANTLR3_FREE_FUNC						
-/// Default definition of ANTLR3_FREE_FUNC. You can override this before including
-/// antlr3.h if you wish to use your own implementation.
-///
-#define	ANTLR3_FREE_FUNC		free
-#endif
-#ifndef ANTLR3_STRDUP
-/// Default definition of ANTLR3_STRDUP. You can override this before including
-/// antlr3.h if you wish to use your own implementation.
-///
-#define	ANTLR3_STRDUP(instr)		(pANTLR3_UINT8)(strdup  ((const char *)(instr)))
-#endif
-#ifndef ANTLR3_MEMCPY
-/// Default definition of ANTLR3_MEMCPY. You can override this before including
-/// antlr3.h if you wish to use your own implementation.
-///
-#define	ANTLR3_MEMCPY(target, source, size) memcpy((void *)(target), (const void *)(source), (size_t)(size))
-#endif
-#ifndef ANTLR3_MEMMOVE
-/// Default definition of ANTLR3_MEMMOVE. You can override this before including
-/// antlr3.h if you wish to use your own implementation.
-///
-#define	ANTLR3_MEMMOVE(target, source, size)    memmove((void *)(target), (const void *)(source), (size_t)(size))
-#endif
-#ifndef ANTLR3_MEMSET
-/// Default definition of ANTLR3_MEMSET. You can override this before including
-/// antlr3.h if you wish to use your own implementation.
-///
-#define	ANTLR3_MEMSET(target, byte, size)   memset((void *)(target), (int)(byte), (size_t)(size))
-#endif
-
-#ifndef	ANTLR3_PRINTF
-/// Default definition of printf, set this to something other than printf before including antlr3.h
-/// if your system does not have a printf. Note that you can define this to be <code>//</code>
-/// without harming the runtime.
-///
-#define	ANTLR3_PRINTF   printf
-#endif
-
-#ifndef	ANTLR3_FPRINTF
-/// Default definition of fprintf, set this to something other than fprintf before including antlr3.h
-/// if your system does not have a fprintf. Note that you can define this to be <code>//</code>
-/// without harming the runtime. 
-///
-#define	ANTLR3_FPRINTF	fprintf
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-ANTLR3_API pANTLR3_INT_TRIE antlr3IntTrieNew    (ANTLR3_UINT32 depth);
-
-ANTLR3_API pANTLR3_BITSET   antlr3BitsetNew	(ANTLR3_UINT32 numBits);
-ANTLR3_API pANTLR3_BITSET   antlr3BitsetOf	(ANTLR3_INT32 bit, ...);
-ANTLR3_API pANTLR3_BITSET   antlr3BitsetList	(pANTLR3_HASH_TABLE list);
-ANTLR3_API pANTLR3_BITSET   antlr3BitsetCopy	(pANTLR3_BITSET_LIST blist);
-ANTLR3_API pANTLR3_BITSET   antlr3BitsetLoad    (pANTLR3_BITSET_LIST blist);
-ANTLR3_API void             antlr3BitsetSetAPI  (pANTLR3_BITSET bitset);
-
-
-ANTLR3_API pANTLR3_BASE_RECOGNIZER  antlr3BaseRecognizerNew                     (ANTLR3_UINT32 type, ANTLR3_UINT32 sizeHint, pANTLR3_RECOGNIZER_SHARED_STATE state);
-ANTLR3_API void			    antlr3RecognitionExceptionNew               (pANTLR3_BASE_RECOGNIZER recognizer);
-ANTLR3_API void			    antlr3MTExceptionNew                        (pANTLR3_BASE_RECOGNIZER recognizer);
-ANTLR3_API void			    antlr3MTNExceptionNew                       (pANTLR3_BASE_RECOGNIZER recognizer);
-ANTLR3_API pANTLR3_HASH_TABLE	    antlr3HashTableNew                          (ANTLR3_UINT32 sizeHint);
-ANTLR3_API ANTLR3_UINT32	    antlr3Hash                                  (void * key, ANTLR3_UINT32 keylen);
-ANTLR3_API pANTLR3_HASH_ENUM	    antlr3EnumNew                               (pANTLR3_HASH_TABLE table);
-ANTLR3_API pANTLR3_LIST		    antlr3ListNew                               (ANTLR3_UINT32 sizeHint);
-ANTLR3_API pANTLR3_VECTOR_FACTORY   antlr3VectorFactoryNew                      (ANTLR3_UINT32 sizeHint);
-ANTLR3_API pANTLR3_VECTOR	    antlr3VectorNew                             (ANTLR3_UINT32 sizeHint);
-ANTLR3_API pANTLR3_STACK	    antlr3StackNew                              (ANTLR3_UINT32 sizeHint);
-ANTLR3_API void                     antlr3SetVectorApi                          (pANTLR3_VECTOR vector, ANTLR3_UINT32 sizeHint);
-ANTLR3_API ANTLR3_UCHAR		    antlr3c8toAntlrc                            (ANTLR3_INT8 inc);
-ANTLR3_API pANTLR3_TOPO             antlr3TopoNew();
-
-ANTLR3_API pANTLR3_EXCEPTION	    antlr3ExceptionNew                          (ANTLR3_UINT32 exception, void * name, void * message, ANTLR3_BOOLEAN freeMessage);
-
-
-ANTLR3_API pANTLR3_INPUT_STREAM     antlr3FileStreamNew                         (pANTLR3_UINT8 fileName, ANTLR3_UINT32 encoding);
-ANTLR3_API pANTLR3_INPUT_STREAM     antlr3StringStreamNew                       (pANTLR3_UINT8 data, ANTLR3_UINT32 encoding, ANTLR3_UINT32 size, pANTLR3_UINT8 name);
-
-ANTLR3_API pANTLR3_INT_STREAM	    antlr3IntStreamNew                          (void);
-
-ANTLR3_API pANTLR3_STRING_FACTORY   antlr3StringFactoryNew                      (ANTLR3_UINT32 encoding);
-
-ANTLR3_API pANTLR3_COMMON_TOKEN	    antlr3CommonTokenNew                        (ANTLR3_UINT32 ttype);
-ANTLR3_API pANTLR3_TOKEN_FACTORY    antlr3TokenFactoryNew                       (pANTLR3_INPUT_STREAM input);
-ANTLR3_API void			    antlr3SetTokenAPI                           (pANTLR3_COMMON_TOKEN token);
-
-ANTLR3_API pANTLR3_LEXER	    antlr3LexerNewStream                        (ANTLR3_UINT32 sizeHint, pANTLR3_INPUT_STREAM input, pANTLR3_RECOGNIZER_SHARED_STATE state);
-ANTLR3_API pANTLR3_LEXER	    antlr3LexerNew                              (ANTLR3_UINT32 sizeHint, pANTLR3_RECOGNIZER_SHARED_STATE state);
-ANTLR3_API pANTLR3_PARSER	    antlr3ParserNewStreamDbg                    (ANTLR3_UINT32 sizeHint, pANTLR3_TOKEN_STREAM tstream, pANTLR3_DEBUG_EVENT_LISTENER dbg, pANTLR3_RECOGNIZER_SHARED_STATE state);
-ANTLR3_API pANTLR3_PARSER	    antlr3ParserNewStream                       (ANTLR3_UINT32 sizeHint, pANTLR3_TOKEN_STREAM tstream, pANTLR3_RECOGNIZER_SHARED_STATE state);
-ANTLR3_API pANTLR3_PARSER           antlr3ParserNew                             (ANTLR3_UINT32 sizeHint, pANTLR3_RECOGNIZER_SHARED_STATE state);
-
-ANTLR3_API pANTLR3_COMMON_TOKEN_STREAM  antlr3CommonTokenStreamSourceNew        (ANTLR3_UINT32 hint, pANTLR3_TOKEN_SOURCE source);
-ANTLR3_API pANTLR3_COMMON_TOKEN_STREAM	antlr3CommonTokenStreamNew              (ANTLR3_UINT32 hint);
-ANTLR3_API pANTLR3_COMMON_TOKEN_STREAM	antlr3CommonTokenDebugStreamSourceNew   (ANTLR3_UINT32 hint, pANTLR3_TOKEN_SOURCE source, pANTLR3_DEBUG_EVENT_LISTENER debugger);
-
-ANTLR3_API pANTLR3_BASE_TREE_ADAPTOR	ANTLR3_TREE_ADAPTORNew                  (pANTLR3_STRING_FACTORY strFactory);
-ANTLR3_API pANTLR3_BASE_TREE_ADAPTOR	ANTLR3_TREE_ADAPTORDebugNew             (pANTLR3_STRING_FACTORY strFactory, pANTLR3_DEBUG_EVENT_LISTENER	debugger);
-ANTLR3_API pANTLR3_COMMON_TREE		antlr3CommonTreeNew                     (void);
-ANTLR3_API pANTLR3_COMMON_TREE		antlr3CommonTreeNewFromTree             (pANTLR3_COMMON_TREE tree);
-ANTLR3_API pANTLR3_COMMON_TREE		antlr3CommonTreeNewFromToken            (pANTLR3_COMMON_TOKEN tree);
-ANTLR3_API pANTLR3_ARBORETUM		antlr3ArboretumNew                      (pANTLR3_STRING_FACTORY factory);
-ANTLR3_API void				antlr3SetCTAPI                          (pANTLR3_COMMON_TREE tree);
-ANTLR3_API pANTLR3_BASE_TREE		antlr3BaseTreeNew                       (pANTLR3_BASE_TREE tree);
-
-ANTLR3_API void				antlr3BaseTreeAdaptorInit               (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_DEBUG_EVENT_LISTENER debugger);
-
-ANTLR3_API pANTLR3_TREE_PARSER		antlr3TreeParserNewStream               (ANTLR3_UINT32 sizeHint, pANTLR3_COMMON_TREE_NODE_STREAM ctnstream, pANTLR3_RECOGNIZER_SHARED_STATE state);
-
-ANTLR3_API ANTLR3_INT32			antlr3dfaspecialTransition              (void * ctx, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_INT_STREAM is, pANTLR3_CYCLIC_DFA dfa, ANTLR3_INT32 s);
-ANTLR3_API ANTLR3_INT32			antlr3dfaspecialStateTransition         (void * ctx, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_INT_STREAM is, pANTLR3_CYCLIC_DFA dfa, ANTLR3_INT32 s);
-ANTLR3_API ANTLR3_INT32			antlr3dfapredict                        (void * ctx, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_INT_STREAM is, pANTLR3_CYCLIC_DFA cdfa);
-
-ANTLR3_API pANTLR3_COMMON_TREE_NODE_STREAM  antlr3CommonTreeNodeStreamNewTree   (pANTLR3_BASE_TREE tree, ANTLR3_UINT32 hint);
-ANTLR3_API pANTLR3_COMMON_TREE_NODE_STREAM  antlr3CommonTreeNodeStreamNew       (pANTLR3_STRING_FACTORY strFactory, ANTLR3_UINT32 hint);
-ANTLR3_API pANTLR3_COMMON_TREE_NODE_STREAM  antlr3UnbufTreeNodeStreamNewTree    (pANTLR3_BASE_TREE tree, ANTLR3_UINT32 hint);
-ANTLR3_API pANTLR3_COMMON_TREE_NODE_STREAM  antlr3UnbufTreeNodeStreamNew        (pANTLR3_STRING_FACTORY strFactory, ANTLR3_UINT32 hint);
-ANTLR3_API pANTLR3_COMMON_TREE_NODE_STREAM  antlr3CommonTreeNodeStreamNewStream (pANTLR3_COMMON_TREE_NODE_STREAM inStream);
-ANTLR3_API pANTLR3_TREE_NODE_STREAM         antlr3TreeNodeStreamNew             ();
-ANTLR3_API void				    fillBufferExt                       (pANTLR3_COMMON_TOKEN_STREAM tokenStream);
-
-ANTLR3_API pANTLR3_REWRITE_RULE_TOKEN_STREAM 
-    antlr3RewriteRuleTOKENStreamNewAE	(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description);
-ANTLR3_API pANTLR3_REWRITE_RULE_TOKEN_STREAM 
-    antlr3RewriteRuleTOKENStreamNewAEE	(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, void * oneElement);
-ANTLR3_API pANTLR3_REWRITE_RULE_TOKEN_STREAM 
-    antlr3RewriteRuleTOKENStreamNewAEV	(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, pANTLR3_VECTOR vector);
-
-ANTLR3_API pANTLR3_REWRITE_RULE_NODE_STREAM 
-    antlr3RewriteRuleNODEStreamNewAE	(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description);
-ANTLR3_API pANTLR3_REWRITE_RULE_NODE_STREAM 
-    antlr3RewriteRuleNODEStreamNewAEE	(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, void * oneElement);
-ANTLR3_API pANTLR3_REWRITE_RULE_NODE_STREAM 
-    antlr3RewriteRuleNODEStreamNewAEV	(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, pANTLR3_VECTOR vector);
-
-ANTLR3_API pANTLR3_REWRITE_RULE_SUBTREE_STREAM 
-    antlr3RewriteRuleSubtreeStreamNewAE	(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description);
-ANTLR3_API pANTLR3_REWRITE_RULE_SUBTREE_STREAM 
-    antlr3RewriteRuleSubtreeStreamNewAEE(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, void * oneElement);
-ANTLR3_API pANTLR3_REWRITE_RULE_SUBTREE_STREAM 
-    antlr3RewriteRuleSubtreeStreamNewAEV(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, pANTLR3_VECTOR vector);
-
-ANTLR3_API pANTLR3_DEBUG_EVENT_LISTENER antlr3DebugListenerNew();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif	/* _ANTLR3DEFS_H	*/
diff --git a/antlr-3.4/runtime/C/src/antlr3baserecognizer.c b/antlr-3.4/runtime/C/src/antlr3baserecognizer.c
deleted file mode 100644
index e2eccc6..0000000
--- a/antlr-3.4/runtime/C/src/antlr3baserecognizer.c
+++ /dev/null
@@ -1,2235 +0,0 @@
-/** \file
- * Contains the base functions that all recognizers require.
- * Any function can be overridden by a lexer/parser/tree parser or by the
- * ANTLR3 programmer.
- * 
- * \addtogroup pANTLR3_BASE_RECOGNIZER
- * @{
- */
-#include    <antlr3baserecognizer.h>
-
-// [The "BSD licence"]
-// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC
-// http://www.temporal-wave.com
-// http://www.linkedin.com/in/jimidle
-//
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// 1. Redistributions of source code must retain the above copyright
-//    notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-//    notice, this list of conditions and the following disclaimer in the
-//    documentation and/or other materials provided with the distribution.
-// 3. The name of the author may not be used to endorse or promote products
-//    derived from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifdef	ANTLR3_WINDOWS
-#pragma warning( disable : 4100 )
-#endif
-
-/* Interface functions -standard implementations cover parser and treeparser
- * almost completely but are overridden by the parser or tree parser as needed. Lexer overrides
- * most of these functions.
- */
-static void					beginResync					(pANTLR3_BASE_RECOGNIZER recognizer);
-static pANTLR3_BITSET		computeErrorRecoverySet	    (pANTLR3_BASE_RECOGNIZER recognizer);
-static void					endResync					(pANTLR3_BASE_RECOGNIZER recognizer);
-static void					beginBacktrack				(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 level);
-static void					endBacktrack				(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 level, ANTLR3_BOOLEAN successful);
-
-static void *				match						(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 ttype, pANTLR3_BITSET_LIST follow);
-static void					matchAny					(pANTLR3_BASE_RECOGNIZER recognizer);
-static void					mismatch					(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 ttype, pANTLR3_BITSET_LIST follow);
-static ANTLR3_BOOLEAN		mismatchIsUnwantedToken		(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM is, ANTLR3_UINT32 ttype);
-static ANTLR3_BOOLEAN		mismatchIsMissingToken		(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM is, pANTLR3_BITSET_LIST follow);
-static void					reportError					(pANTLR3_BASE_RECOGNIZER recognizer);
-static pANTLR3_BITSET		computeCSRuleFollow			(pANTLR3_BASE_RECOGNIZER recognizer);
-static pANTLR3_BITSET		combineFollows				(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_BOOLEAN exact);
-static void					displayRecognitionError	    (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_UINT8 * tokenNames);
-static void					recover						(pANTLR3_BASE_RECOGNIZER recognizer);
-static void	*				recoverFromMismatchedToken  (pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 ttype, pANTLR3_BITSET_LIST follow);
-static void	*				recoverFromMismatchedSet    (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_BITSET_LIST follow);
-static ANTLR3_BOOLEAN		recoverFromMismatchedElement(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_BITSET_LIST follow);
-static void					consumeUntil				(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 tokenType);
-static void					consumeUntilSet				(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_BITSET set);
-static pANTLR3_STACK		getRuleInvocationStack	    (pANTLR3_BASE_RECOGNIZER recognizer);
-static pANTLR3_STACK		getRuleInvocationStackNamed (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_UINT8 name);
-static pANTLR3_HASH_TABLE	toStrings					(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_HASH_TABLE);
-static ANTLR3_MARKER		getRuleMemoization			(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_INTKEY ruleIndex, ANTLR3_MARKER ruleParseStart);
-static ANTLR3_BOOLEAN		alreadyParsedRule			(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_MARKER ruleIndex);
-static void					memoize						(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_MARKER ruleIndex, ANTLR3_MARKER ruleParseStart);
-static ANTLR3_BOOLEAN		synpred						(pANTLR3_BASE_RECOGNIZER recognizer, void * ctx, void (*predicate)(void * ctx));
-static void					reset						(pANTLR3_BASE_RECOGNIZER recognizer);
-static void					freeBR						(pANTLR3_BASE_RECOGNIZER recognizer);
-static void *				getCurrentInputSymbol		(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM istream);
-static void *				getMissingSymbol			(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM	istream, pANTLR3_EXCEPTION	e,
-															ANTLR3_UINT32 expectedTokenType, pANTLR3_BITSET_LIST follow);
-static ANTLR3_UINT32		getNumberOfSyntaxErrors		(pANTLR3_BASE_RECOGNIZER recognizer);
-
-ANTLR3_API pANTLR3_BASE_RECOGNIZER
-antlr3BaseRecognizerNew(ANTLR3_UINT32 type, ANTLR3_UINT32 sizeHint, pANTLR3_RECOGNIZER_SHARED_STATE state)
-{
-    pANTLR3_BASE_RECOGNIZER recognizer;
-
-    // Allocate memory for the structure
-    //
-    recognizer	    = (pANTLR3_BASE_RECOGNIZER) ANTLR3_MALLOC((size_t)sizeof(ANTLR3_BASE_RECOGNIZER));
-
-    if	(recognizer == NULL)
-    {
-		// Allocation failed
-		//
-		return	NULL;
-    }
-
-	
-	// If we have been supplied with a pre-existing recognizer state
-	// then we just install it, otherwise we must create one from scratch
-	//
-	if	(state == NULL)
-	{
-		recognizer->state = (pANTLR3_RECOGNIZER_SHARED_STATE) ANTLR3_CALLOC(1, (size_t)sizeof(ANTLR3_RECOGNIZER_SHARED_STATE));
-
-		if	(recognizer->state == NULL)
-		{
-			ANTLR3_FREE(recognizer);
-			return	NULL;
-		}
-
-		// Initialize any new recognizer state
-		//
-		recognizer->state->errorRecovery	= ANTLR3_FALSE;
-		recognizer->state->lastErrorIndex	= -1;
-		recognizer->state->failed		= ANTLR3_FALSE;
-		recognizer->state->errorCount		= 0;
-		recognizer->state->backtracking		= 0;
-		recognizer->state->following		= NULL;
-		recognizer->state->ruleMemo		= NULL;
-		recognizer->state->tokenNames		= NULL;
-		recognizer->state->sizeHint             = sizeHint;
-		recognizer->state->tokSource		= NULL;
-                recognizer->state->tokFactory           = NULL;
-
-		// Rather than check to see if we must initialize
-		// the stack every time we are asked for an new rewrite stream
-		// we just always create an empty stack and then just
-		// free it when the base recognizer is freed.
-		//
-		recognizer->state->rStreams		= antlr3VectorNew(0);  // We don't know the size.
-
-		if	(recognizer->state->rStreams == NULL)
-		{
-			// Out of memory
-			//
-			ANTLR3_FREE(recognizer->state);
-			ANTLR3_FREE(recognizer);
-			return	NULL;
-		}
-	}
-	else
-	{
-		// Install the one we were given, and do not reset it here
-		// as it will either already have been initialized or will
-		// be in a state that needs to be preserved.
-		//
-		recognizer->state = state;
-	}
-		
-    // Install the BR API
-    //
-    recognizer->alreadyParsedRule           = alreadyParsedRule;
-    recognizer->beginResync                 = beginResync;
-    recognizer->combineFollows              = combineFollows;
-    recognizer->beginBacktrack              = beginBacktrack;
-    recognizer->endBacktrack                = endBacktrack;
-    recognizer->computeCSRuleFollow         = computeCSRuleFollow;
-    recognizer->computeErrorRecoverySet     = computeErrorRecoverySet;
-    recognizer->consumeUntil                = consumeUntil;
-    recognizer->consumeUntilSet             = consumeUntilSet;
-    recognizer->displayRecognitionError     = displayRecognitionError;
-    recognizer->endResync                   = endResync;
-    recognizer->exConstruct                 = antlr3MTExceptionNew;
-    recognizer->getRuleInvocationStack      = getRuleInvocationStack;
-    recognizer->getRuleInvocationStackNamed = getRuleInvocationStackNamed;
-    recognizer->getRuleMemoization          = getRuleMemoization;
-    recognizer->match                       = match;
-    recognizer->matchAny                    = matchAny;
-    recognizer->memoize                     = memoize;
-    recognizer->mismatch                    = mismatch;
-    recognizer->mismatchIsUnwantedToken     = mismatchIsUnwantedToken;
-    recognizer->mismatchIsMissingToken      = mismatchIsMissingToken;
-    recognizer->recover                     = recover;
-    recognizer->recoverFromMismatchedElement= recoverFromMismatchedElement;
-    recognizer->recoverFromMismatchedSet    = recoverFromMismatchedSet;
-    recognizer->recoverFromMismatchedToken  = recoverFromMismatchedToken;
-    recognizer->getNumberOfSyntaxErrors     = getNumberOfSyntaxErrors;
-    recognizer->reportError                 = reportError;
-    recognizer->reset                       = reset;
-    recognizer->synpred                     = synpred;
-    recognizer->toStrings                   = toStrings;
-    recognizer->getCurrentInputSymbol       = getCurrentInputSymbol;
-    recognizer->getMissingSymbol            = getMissingSymbol;
-    recognizer->debugger                    = NULL;
-
-    recognizer->free = freeBR;
-
-    /* Initialize variables
-     */
-    recognizer->type			= type;
-
-
-    return  recognizer;
-}
-static void	
-freeBR	    (pANTLR3_BASE_RECOGNIZER recognizer)
-{
-    pANTLR3_EXCEPTION thisE;
-
-	// Did we have a state allocated?
-	//
-	if	(recognizer->state != NULL)
-	{
-		// Free any rule memoization we set up
-		//
-		if	(recognizer->state->ruleMemo != NULL)
-		{
-			recognizer->state->ruleMemo->free(recognizer->state->ruleMemo);
-			recognizer->state->ruleMemo = NULL;
-		}
-
-		// Free any exception space we have left around
-		//
-		thisE = recognizer->state->exception;
-		if	(thisE != NULL)
-		{
-			thisE->freeEx(thisE);
-		}
-
-		// Free any rewrite streams we have allocated
-		//
-		if	(recognizer->state->rStreams != NULL)
-		{
-			recognizer->state->rStreams->free(recognizer->state->rStreams);
-		}
-
-		// Free up any token factory we created (error recovery for instance)
-		//
-		if	(recognizer->state->tokFactory != NULL)
-		{
-			recognizer->state->tokFactory->close(recognizer->state->tokFactory);
-		}
-		// Free the shared state memory
-		//
-		ANTLR3_FREE(recognizer->state);
-	}
-
-	// Free the actual recognizer space
-	//
-    ANTLR3_FREE(recognizer);
-}
-
-/**
- * Creates a new Mismatched Token Exception and inserts in the recognizer
- * exception stack.
- * 
- * \param recognizer
- * Context pointer for this recognizer
- * 
- */
-ANTLR3_API	void
-antlr3MTExceptionNew(pANTLR3_BASE_RECOGNIZER recognizer)
-{
-    /* Create a basic recognition exception structure
-     */
-    antlr3RecognitionExceptionNew(recognizer);
-
-    /* Now update it to indicate this is a Mismatched token exception
-     */
-    recognizer->state->exception->name		= ANTLR3_MISMATCHED_EX_NAME;
-    recognizer->state->exception->type		= ANTLR3_MISMATCHED_TOKEN_EXCEPTION;
-
-    return;
-}
-
-ANTLR3_API	void
-antlr3RecognitionExceptionNew(pANTLR3_BASE_RECOGNIZER recognizer)
-{
-	pANTLR3_EXCEPTION				ex;
-	pANTLR3_LEXER					lexer;
-	pANTLR3_PARSER					parser;
-	pANTLR3_TREE_PARSER				tparser;
-
-	pANTLR3_INPUT_STREAM			ins;
-	pANTLR3_INT_STREAM				is;
-	pANTLR3_COMMON_TOKEN_STREAM	    cts;
-	pANTLR3_TREE_NODE_STREAM	    tns;
-
-	ins	    = NULL;
-	cts	    = NULL;
-	tns	    = NULL;
-	is	    = NULL;
-	lexer   = NULL;
-	parser  = NULL;
-	tparser = NULL;
-
-	switch	(recognizer->type)
-	{
-	case	ANTLR3_TYPE_LEXER:
-
-		lexer	= (pANTLR3_LEXER) (recognizer->super);
-		ins	= lexer->input;
-		is	= ins->istream;
-
-		break;
-
-	case	ANTLR3_TYPE_PARSER:
-
-		parser  = (pANTLR3_PARSER) (recognizer->super);
-		cts	= (pANTLR3_COMMON_TOKEN_STREAM)(parser->tstream->super);
-		is	= parser->tstream->istream;
-
-		break;
-
-	case	ANTLR3_TYPE_TREE_PARSER:
-
-		tparser = (pANTLR3_TREE_PARSER) (recognizer->super);
-		tns	= tparser->ctnstream->tnstream;
-		is	= tns->istream;
-
-		break;
-
-	default:
-
-		ANTLR3_FPRINTF(stderr, "Base recognizer function antlr3RecognitionExceptionNew called by unknown parser type - provide override for this function\n");
-		return;
-
-		break;
-	}
-
-	/* Create a basic exception structure
-	 */
-	ex = antlr3ExceptionNew(ANTLR3_RECOGNITION_EXCEPTION,
-		(void *)ANTLR3_RECOGNITION_EX_NAME,
-		NULL,
-		ANTLR3_FALSE);
-
-	/* Rest of information depends on the base type of the 
-	 * input stream.
-	 */
-	switch  (is->type & ANTLR3_INPUT_MASK)
-	{
-	case    ANTLR3_CHARSTREAM:
-
-		ex->c			= is->_LA		    	(is, 1);					/* Current input character			*/
-		ex->line		= ins->getLine			(ins);						/* Line number comes from stream		*/
-		ex->charPositionInLine	= ins->getCharPositionInLine	(ins);	    /* Line offset also comes from the stream   */
-		ex->index		= is->index			(is);
-		ex->streamName		= ins->fileName;
-		ex->message		= "Unexpected character";
-		break;
-
-	case    ANTLR3_TOKENSTREAM:
-
-		ex->token		= cts->tstream->_LT						(cts->tstream, 1);	    /* Current input token			    */
-		ex->line		= ((pANTLR3_COMMON_TOKEN)(ex->token))->getLine			(ex->token);
-		ex->charPositionInLine	= ((pANTLR3_COMMON_TOKEN)(ex->token))->getCharPositionInLine	(ex->token);
-		ex->index		= cts->tstream->istream->index					(cts->tstream->istream);
-		if	(((pANTLR3_COMMON_TOKEN)(ex->token))->type == ANTLR3_TOKEN_EOF)
-		{
-			ex->streamName		= NULL;
-		}
-		else
-		{
-			ex->streamName		= ((pANTLR3_COMMON_TOKEN)(ex->token))->input->fileName;
-		}
-		ex->message		= "Unexpected token";
-		break;
-
-	case    ANTLR3_COMMONTREENODE:
-
-		ex->token		= tns->_LT						    (tns, 1);	    /* Current input tree node			    */
-		ex->line		= ((pANTLR3_BASE_TREE)(ex->token))->getLine		    (ex->token);
-		ex->charPositionInLine	= ((pANTLR3_BASE_TREE)(ex->token))->getCharPositionInLine   (ex->token);
-		ex->index		= tns->istream->index					    (tns->istream);
-
-		// Are you ready for this? Deep breath now...
-		//
-		{
-			pANTLR3_COMMON_TREE tnode;
-
-			tnode		= ((pANTLR3_COMMON_TREE)(((pANTLR3_BASE_TREE)(ex->token))->super));
-
-			if	(tnode->token    == NULL)
-			{
-				ex->streamName = ((pANTLR3_BASE_TREE)(ex->token))->strFactory->newStr(((pANTLR3_BASE_TREE)(ex->token))->strFactory, (pANTLR3_UINT8)"-unknown source-");
-			}
-			else
-			{
-				if	(tnode->token->input == NULL)
-				{
-					ex->streamName		= NULL;
-				}
-				else
-				{
-					ex->streamName		= tnode->token->input->fileName;
-				}
-			}
-			ex->message		= "Unexpected node";
-		}
-		break;
-	}
-
-	ex->input						= is;
-	ex->nextException				= recognizer->state->exception;	/* So we don't leak the memory */
-	recognizer->state->exception	= ex;
-	recognizer->state->error	    = ANTLR3_TRUE;	    /* Exception is outstanding	*/
-
-	return;
-}
-
-
-/// Match current input symbol against ttype.  Upon error, do one token
-/// insertion or deletion if possible.  
-/// To turn off single token insertion or deletion error
-/// recovery, override mismatchRecover() and have it call
-/// plain mismatch(), which does not recover.  Then any error
-/// in a rule will cause an exception and immediate exit from
-/// rule.  Rule would recover by resynchronizing to the set of
-/// symbols that can follow rule ref.
-///
-static void *
-match(	pANTLR3_BASE_RECOGNIZER recognizer,
-		ANTLR3_UINT32 ttype, pANTLR3_BITSET_LIST follow)
-{
-    pANTLR3_PARSER			parser;
-    pANTLR3_TREE_PARSER	    tparser;
-    pANTLR3_INT_STREAM	    is;
-	void					* matchedSymbol;
-
-    switch	(recognizer->type)
-    {
-		case	ANTLR3_TYPE_PARSER:
-
-			parser  = (pANTLR3_PARSER) (recognizer->super);
-			tparser	= NULL;
-			is	= parser->tstream->istream;
-
-			break;
-
-		case	ANTLR3_TYPE_TREE_PARSER:
-
-			tparser = (pANTLR3_TREE_PARSER) (recognizer->super);
-			parser	= NULL;
-			is	= tparser->ctnstream->tnstream->istream;
-
-			break;
-
-		default:
-		    
-			ANTLR3_FPRINTF(stderr, "Base recognizer function 'match' called by unknown parser type - provide override for this function\n");
-			return ANTLR3_FALSE;
-
-			break;
-    }
-
-	// Pick up the current input token/node for assignment to labels
-	//
-	matchedSymbol = recognizer->getCurrentInputSymbol(recognizer, is);
-
-    if	(is->_LA(is, 1) == ttype)
-    {
-		// The token was the one we were told to expect
-		//
-		is->consume(is);									// Consume that token from the stream
-		recognizer->state->errorRecovery	= ANTLR3_FALSE;	// Not in error recovery now (if we were)
-		recognizer->state->failed			= ANTLR3_FALSE;	// The match was a success
-		return matchedSymbol;								// We are done
-    }
-
-    // We did not find the expected token type, if we are backtracking then
-    // we just set the failed flag and return.
-    //
-    if	(recognizer->state->backtracking > 0)
-    {
-		// Backtracking is going on
-		//
-		recognizer->state->failed  = ANTLR3_TRUE;
-		return matchedSymbol;
-	}
-
-    // We did not find the expected token and there is no backtracking
-    // going on, so we mismatch, which creates an exception in the recognizer exception
-    // stack.
-    //
-	matchedSymbol = recognizer->recoverFromMismatchedToken(recognizer, ttype, follow);
-    return matchedSymbol;
-}
-
-/// Consumes the next token, whatever it is, and resets the recognizer state
-/// so that it is not in error.
-///
-/// \param recognizer
-/// Recognizer context pointer
-///
-static void
-matchAny(pANTLR3_BASE_RECOGNIZER recognizer)
-{
-    pANTLR3_PARSER	    parser;
-    pANTLR3_TREE_PARSER	    tparser;
-    pANTLR3_INT_STREAM	    is;
-
-    switch	(recognizer->type)
-    {
-		case	ANTLR3_TYPE_PARSER:
-
-			parser  = (pANTLR3_PARSER) (recognizer->super);
-			tparser	= NULL;
-			is	= parser->tstream->istream;
-
-			break;
-
-		case	ANTLR3_TYPE_TREE_PARSER:
-
-			tparser = (pANTLR3_TREE_PARSER) (recognizer->super);
-			parser	= NULL;
-			is	= tparser->ctnstream->tnstream->istream;
-
-			break;
-
-		default:
-		    
-			ANTLR3_FPRINTF(stderr, "Base recognizer function 'matchAny' called by unknown parser type - provide override for this function\n");
-			return;
-
-		break;
-    }
-    recognizer->state->errorRecovery	= ANTLR3_FALSE;
-    recognizer->state->failed		    = ANTLR3_FALSE;
-    is->consume(is);
-
-    return;
-}
-///
-///
-static ANTLR3_BOOLEAN
-mismatchIsUnwantedToken(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM is, ANTLR3_UINT32 ttype)
-{
-	ANTLR3_UINT32 nextt;
-
-	nextt = is->_LA(is, 2);
-
-	if	(nextt == ttype)
-	{
-		if	(recognizer->state->exception != NULL)
-		{
-			recognizer->state->exception->expecting = nextt;
-		}
-		return ANTLR3_TRUE;		// This token is unknown, but the next one is the one we wanted
-	}
-	else
-	{
-		return ANTLR3_FALSE;	// Neither this token, nor the one following is the one we wanted
-	}
-}
-
-///
-///
-static ANTLR3_BOOLEAN
-mismatchIsMissingToken(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM is, pANTLR3_BITSET_LIST follow)
-{
-	ANTLR3_BOOLEAN	retcode;
-	pANTLR3_BITSET	followClone;
-	pANTLR3_BITSET	viableTokensFollowingThisRule;
-
-	if	(follow == NULL)
-	{
-		// There is no information about the tokens that can follow the last one
-		// hence we must say that the current one we found is not a member of the 
-		// follow set and does not indicate a missing token. We will just consume this
-		// single token and see if the parser works it out from there.
-		//
-		return	ANTLR3_FALSE;
-	}
-
-	followClone						= NULL;
-	viableTokensFollowingThisRule	= NULL;
-
-	// The C bitset maps are laid down at compile time by the
-	// C code generation. Hence we cannot remove things from them
-	// and so on. So, in order to remove EOR (if we need to) then
-	// we clone the static bitset.
-	//
-	followClone = antlr3BitsetLoad(follow);
-	if	(followClone == NULL)
-	{
-		return ANTLR3_FALSE;
-	}
-
-	// Compute what can follow this grammar reference
-	//
-	if	(followClone->isMember(followClone, ANTLR3_EOR_TOKEN_TYPE))
-	{
-		// EOR can follow, but if we are not the start symbol, we
-		// need to remove it.
-		//
-		if	(recognizer->state->following->vector->count >= 0)
-		{
-			followClone->remove(followClone, ANTLR3_EOR_TOKEN_TYPE);
-		}
-
-		// Now compute the visiable tokens that can follow this rule, according to context
-		// and make them part of the follow set.
-		//
-		viableTokensFollowingThisRule = recognizer->computeCSRuleFollow(recognizer);
-		followClone->borInPlace(followClone, viableTokensFollowingThisRule);
-	}
-
-	/// if current token is consistent with what could come after set
-	/// then we know we're missing a token; error recovery is free to
-	/// "insert" the missing token
-	///
-	/// BitSet cannot handle negative numbers like -1 (EOF) so I leave EOR
-	/// in follow set to indicate that the fall of the start symbol is
-	/// in the set (EOF can follow).
-	///
-	if	(		followClone->isMember(followClone, is->_LA(is, 1))
-			||	followClone->isMember(followClone, ANTLR3_EOR_TOKEN_TYPE)
-		)
-	{
-		retcode = ANTLR3_TRUE;
-	}
-	else
-	{
-		retcode	= ANTLR3_FALSE;
-	}
-
-	if	(viableTokensFollowingThisRule != NULL)
-	{
-		viableTokensFollowingThisRule->free(viableTokensFollowingThisRule);
-	}
-	if	(followClone != NULL)
-	{
-		followClone->free(followClone);
-	}
-
-	return retcode;
-
-}
-
-/// Factor out what to do upon token mismatch so tree parsers can behave
-/// differently.  Override and call mismatchRecover(input, ttype, follow)
-/// to get single token insertion and deletion.  Use this to turn off
-/// single token insertion and deletion. Override mismatchRecover
-/// to call this instead.
-///
-/// \remark mismatch only works for parsers and must be overridden for anything else.
-///
-static	void
-mismatch(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 ttype, pANTLR3_BITSET_LIST follow)
-{
-    pANTLR3_PARSER	    parser;
-    pANTLR3_TREE_PARSER	    tparser;
-    pANTLR3_INT_STREAM	    is;
-
-    // Install a mismatched token exception in the exception stack
-    //
-    antlr3MTExceptionNew(recognizer);
-    recognizer->state->exception->expecting    = ttype;
-
-    switch	(recognizer->type)
-    {
-		case	ANTLR3_TYPE_PARSER:
-
-			parser  = (pANTLR3_PARSER) (recognizer->super);
-			tparser	= NULL;
-			is	= parser->tstream->istream;
-
-			break;
-
-		default:
-		    
-			ANTLR3_FPRINTF(stderr, "Base recognizer function 'mismatch' called by unknown parser type - provide override for this function\n");
-			return;
-
-			break;
-    }
-
-	if	(mismatchIsUnwantedToken(recognizer, is, ttype))
-	{
-		// Create a basic recognition exception structure
-		//
-	    antlr3RecognitionExceptionNew(recognizer);
-		
-		// Now update it to indicate this is an unwanted token exception
-		//
-		recognizer->state->exception->name		= ANTLR3_UNWANTED_TOKEN_EXCEPTION_NAME;
-		recognizer->state->exception->type		= ANTLR3_UNWANTED_TOKEN_EXCEPTION;
-
-		return;
-	}
-	
-	if	(mismatchIsMissingToken(recognizer, is, follow))
-	{
-		// Create a basic recognition exception structure
-		//
-	    antlr3RecognitionExceptionNew(recognizer);
-		
-		// Now update it to indicate this is an unwanted token exception
-		//
-		recognizer->state->exception->name		= ANTLR3_MISSING_TOKEN_EXCEPTION_NAME;
-		recognizer->state->exception->type		= ANTLR3_MISSING_TOKEN_EXCEPTION;
-
-		return;
-	}
-
-	// Just a mismatched token is all we can dtermine
-	//
-	antlr3MTExceptionNew(recognizer);
-
-	return;
-}
-/// Report a recognition problem.
-///
-/// This method sets errorRecovery to indicate the parser is recovering
-/// not parsing.  Once in recovery mode, no errors are generated.
-/// To get out of recovery mode, the parser must successfully match
-/// a token (after a resync).  So it will go:
-///
-///		1. error occurs
-///		2. enter recovery mode, report error
-///		3. consume until token found in resynch set
-///		4. try to resume parsing
-///		5. next match() will reset errorRecovery mode
-///
-/// If you override, make sure to update errorCount if you care about that.
-///
-static void			
-reportError		    (pANTLR3_BASE_RECOGNIZER recognizer)
-{
-    	// Invoke the debugger event if there is a debugger listening to us
-	//
-	if	(recognizer->debugger != NULL)
-	{
-		recognizer->debugger->recognitionException(recognizer->debugger, recognizer->state->exception);
-	}
-
-    if	(recognizer->state->errorRecovery == ANTLR3_TRUE)
-    {
-		// Already in error recovery so don't display another error while doing so
-		//
-		return;
-    }
-
-    // Signal we are in error recovery now
-    //
-    recognizer->state->errorRecovery = ANTLR3_TRUE;
-	
-	// Indicate this recognizer had an error while processing.
-	//
-	recognizer->state->errorCount++;
-
-	// Call the error display routine
-	//
-    recognizer->displayRecognitionError(recognizer, recognizer->state->tokenNames);
-}
-
-static void
-beginBacktrack		(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 level)
-{
-	if	(recognizer->debugger != NULL)
-	{
-		recognizer->debugger->beginBacktrack(recognizer->debugger, level);
-	}
-}
-
-static void
-endBacktrack		(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 level, ANTLR3_BOOLEAN successful)
-{
-	if	(recognizer->debugger != NULL)
-	{
-		recognizer->debugger->endBacktrack(recognizer->debugger, level, successful);
-	}
-}
-static void			
-beginResync		    (pANTLR3_BASE_RECOGNIZER recognizer)
-{
-	if	(recognizer->debugger != NULL)
-	{
-		recognizer->debugger->beginResync(recognizer->debugger);
-	}
-}
-
-static void			
-endResync		    (pANTLR3_BASE_RECOGNIZER recognizer)
-{
-	if	(recognizer->debugger != NULL)
-	{
-		recognizer->debugger->endResync(recognizer->debugger);
-	}
-}
-
-/// Compute the error recovery set for the current rule.
-/// Documentation below is from the Java implementation.
-///
-/// During rule invocation, the parser pushes the set of tokens that can
-/// follow that rule reference on the stack; this amounts to
-/// computing FIRST of what follows the rule reference in the
-/// enclosing rule. This local follow set only includes tokens
-/// from within the rule; i.e., the FIRST computation done by
-/// ANTLR stops at the end of a rule.
-//
-/// EXAMPLE
-//
-/// When you find a "no viable alt exception", the input is not
-/// consistent with any of the alternatives for rule r.  The best
-/// thing to do is to consume tokens until you see something that
-/// can legally follow a call to r *or* any rule that called r.
-/// You don't want the exact set of viable next tokens because the
-/// input might just be missing a token--you might consume the
-/// rest of the input looking for one of the missing tokens.
-///
-/// Consider grammar:
-///
-/// a : '[' b ']'
-///   | '(' b ')'
-///   ;
-/// b : c '^' INT ;
-/// c : ID
-///   | INT
-///   ;
-///
-/// At each rule invocation, the set of tokens that could follow
-/// that rule is pushed on a stack.  Here are the various "local"
-/// follow sets:
-///
-/// FOLLOW(b1_in_a) = FIRST(']') = ']'
-/// FOLLOW(b2_in_a) = FIRST(')') = ')'
-/// FOLLOW(c_in_b) = FIRST('^') = '^'
-///
-/// Upon erroneous input "[]", the call chain is
-///
-/// a -> b -> c
-///
-/// and, hence, the follow context stack is:
-///
-/// depth  local follow set     after call to rule
-///   0         <EOF>                    a (from main())
-///   1          ']'                     b
-///   3          '^'                     c
-///
-/// Notice that ')' is not included, because b would have to have
-/// been called from a different context in rule a for ')' to be
-/// included.
-///
-/// For error recovery, we cannot consider FOLLOW(c)
-/// (context-sensitive or otherwise).  We need the combined set of
-/// all context-sensitive FOLLOW sets--the set of all tokens that
-/// could follow any reference in the call chain.  We need to
-/// resync to one of those tokens.  Note that FOLLOW(c)='^' and if
-/// we resync'd to that token, we'd consume until EOF.  We need to
-/// sync to context-sensitive FOLLOWs for a, b, and c: {']','^'}.
-/// In this case, for input "[]", LA(1) is in this set so we would
-/// not consume anything and after printing an error rule c would
-/// return normally.  It would not find the required '^' though.
-/// At this point, it gets a mismatched token error and throws an
-/// exception (since LA(1) is not in the viable following token
-/// set).  The rule exception handler tries to recover, but finds
-/// the same recovery set and doesn't consume anything.  Rule b
-/// exits normally returning to rule a.  Now it finds the ']' (and
-/// with the successful match exits errorRecovery mode).
-///
-/// So, you can see that the parser walks up call chain looking
-/// for the token that was a member of the recovery set.
-///
-/// Errors are not generated in errorRecovery mode.
-///
-/// ANTLR's error recovery mechanism is based upon original ideas:
-///
-/// "Algorithms + Data Structures = Programs" by Niklaus Wirth
-///
-/// and
-///
-/// "A note on error recovery in recursive descent parsers":
-/// http://portal.acm.org/citation.cfm?id=947902.947905
-///
-/// Later, Josef Grosch had some good ideas:
-///
-/// "Efficient and Comfortable Error Recovery in Recursive Descent
-/// Parsers":
-/// ftp://www.cocolab.com/products/cocktail/doca4.ps/ell.ps.zip
-///
-/// Like Grosch I implemented local FOLLOW sets that are combined
-/// at run-time upon error to avoid overhead during parsing.
-///
-static pANTLR3_BITSET		
-computeErrorRecoverySet	    (pANTLR3_BASE_RECOGNIZER recognizer)
-{
-    return   recognizer->combineFollows(recognizer, ANTLR3_FALSE);
-}
-
-/// Compute the context-sensitive FOLLOW set for current rule.
-/// Documentation below is from the Java runtime.
-///
-/// This is the set of token types that can follow a specific rule
-/// reference given a specific call chain.  You get the set of
-/// viable tokens that can possibly come next (look ahead depth 1)
-/// given the current call chain.  Contrast this with the
-/// definition of plain FOLLOW for rule r:
-///
-///  FOLLOW(r)={x | S=>*alpha r beta in G and x in FIRST(beta)}
-///
-/// where x in T* and alpha, beta in V*; T is set of terminals and
-/// V is the set of terminals and non terminals.  In other words,
-/// FOLLOW(r) is the set of all tokens that can possibly follow
-/// references to r in///any* sentential form (context).  At
-/// runtime, however, we know precisely which context applies as
-/// we have the call chain.  We may compute the exact (rather
-/// than covering superset) set of following tokens.
-///
-/// For example, consider grammar:
-///
-/// stat : ID '=' expr ';'      // FOLLOW(stat)=={EOF}
-///      | "return" expr '.'
-///      ;
-/// expr : atom ('+' atom)* ;   // FOLLOW(expr)=={';','.',')'}
-/// atom : INT                  // FOLLOW(atom)=={'+',')',';','.'}
-///      | '(' expr ')'
-///      ;
-///
-/// The FOLLOW sets are all inclusive whereas context-sensitive
-/// FOLLOW sets are precisely what could follow a rule reference.
-/// For input input "i=(3);", here is the derivation:
-///
-/// stat => ID '=' expr ';'
-///      => ID '=' atom ('+' atom)* ';'
-///      => ID '=' '(' expr ')' ('+' atom)* ';'
-///      => ID '=' '(' atom ')' ('+' atom)* ';'
-///      => ID '=' '(' INT ')' ('+' atom)* ';'
-///      => ID '=' '(' INT ')' ';'
-///
-/// At the "3" token, you'd have a call chain of
-///
-///   stat -> expr -> atom -> expr -> atom
-///
-/// What can follow that specific nested ref to atom?  Exactly ')'
-/// as you can see by looking at the derivation of this specific
-/// input.  Contrast this with the FOLLOW(atom)={'+',')',';','.'}.
-///
-/// You want the exact viable token set when recovering from a
-/// token mismatch.  Upon token mismatch, if LA(1) is member of
-/// the viable next token set, then you know there is most likely
-/// a missing token in the input stream.  "Insert" one by just not
-/// throwing an exception.
-///
-static pANTLR3_BITSET		
-computeCSRuleFollow	    (pANTLR3_BASE_RECOGNIZER recognizer)
-{
-    return   recognizer->combineFollows(recognizer, ANTLR3_FALSE);
-}
-
-/// Compute the current followset for the input stream.
-///
-static pANTLR3_BITSET		
-combineFollows		    (pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_BOOLEAN exact)
-{
-    pANTLR3_BITSET	followSet;
-    pANTLR3_BITSET	localFollowSet;
-    ANTLR3_UINT32	top;
-    ANTLR3_UINT32	i;
-
-    top	= recognizer->state->following->size(recognizer->state->following);
-
-    followSet	    = antlr3BitsetNew(0);
-	localFollowSet	= NULL;
-
-    for (i = top; i>0; i--)
-    {
-		localFollowSet = antlr3BitsetLoad((pANTLR3_BITSET_LIST) recognizer->state->following->get(recognizer->state->following, i-1));
-
-		if  (localFollowSet != NULL)
-		{
-			followSet->borInPlace(followSet, localFollowSet);
-
-			if	(exact == ANTLR3_TRUE)
-			{
-				if	(localFollowSet->isMember(localFollowSet, ANTLR3_EOR_TOKEN_TYPE) == ANTLR3_FALSE)
-				{
-					// Only leave EOR in the set if at top (start rule); this lets us know
-					// if we have to include the follow(start rule); I.E., EOF
-					//
-					if	(i>1)
-					{
-						followSet->remove(followSet, ANTLR3_EOR_TOKEN_TYPE);
-					}
-				}
-				else
-				{
-					break;	// Cannot see End Of Rule from here, just drop out
-				}
-			}
-			localFollowSet->free(localFollowSet);
-			localFollowSet = NULL;
-		}
-    }
-
-	if	(localFollowSet != NULL)
-	{
-		localFollowSet->free(localFollowSet);
-	}
-    return  followSet;
-}
-
-/// Standard/Example error display method.
-/// No generic error message display funciton coudl possibly do everything correctly
-/// for all possible parsers. Hence you are provided with this example routine, which
-/// you should override in your parser/tree parser to do as you will.
-///
-/// Here we depart somewhat from the Java runtime as that has now split up a lot
-/// of the error display routines into spearate units. However, ther is little advantage
-/// to this in the C version as you will probably implement all such routines as a 
-/// separate translation unit, rather than install them all as pointers to functions
-/// in the base recognizer.
-///
-static void			
-displayRecognitionError	    (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_UINT8 * tokenNames)
-{
-	pANTLR3_PARSER			parser;
-	pANTLR3_TREE_PARSER	    tparser;
-	pANTLR3_INT_STREAM	    is;
-	pANTLR3_STRING			ttext;
-	pANTLR3_STRING			ftext;
-	pANTLR3_EXCEPTION	    ex;
-	pANTLR3_COMMON_TOKEN    theToken;
-	pANTLR3_BASE_TREE	    theBaseTree;
-	pANTLR3_COMMON_TREE	    theCommonTree;
-
-	// Retrieve some info for easy reading.
-	//
-	ex	    =		recognizer->state->exception;
-	ttext   =		NULL;
-
-	// See if there is a 'filename' we can use
-	//
-	if	(ex->streamName == NULL)
-	{
-		if	(((pANTLR3_COMMON_TOKEN)(ex->token))->type == ANTLR3_TOKEN_EOF)
-		{
-			ANTLR3_FPRINTF(stderr, "-end of input-(");
-		}
-		else
-		{
-			ANTLR3_FPRINTF(stderr, "-unknown source-(");
-		}
-	}
-	else
-	{
-		ftext = ex->streamName->to8(ex->streamName);
-		ANTLR3_FPRINTF(stderr, "%s(", ftext->chars);
-	}
-
-	// Next comes the line number
-	//
-
-	ANTLR3_FPRINTF(stderr, "%d) ", recognizer->state->exception->line);
-	ANTLR3_FPRINTF(stderr, " : error %d : %s", 
-										recognizer->state->exception->type,
-					(pANTLR3_UINT8)	   (recognizer->state->exception->message));
-
-
-	// How we determine the next piece is dependent on which thing raised the
-	// error.
-	//
-	switch	(recognizer->type)
-	{
-	case	ANTLR3_TYPE_PARSER:
-
-		// Prepare the knowledge we know we have
-		//
-		parser	    = (pANTLR3_PARSER) (recognizer->super);
-		tparser	    = NULL;
-		is			= parser->tstream->istream;
-		theToken    = (pANTLR3_COMMON_TOKEN)(recognizer->state->exception->token);
-		ttext	    = theToken->toString(theToken);
-
-		ANTLR3_FPRINTF(stderr, ", at offset %d", recognizer->state->exception->charPositionInLine);
-		if  (theToken != NULL)
-		{
-			if (theToken->type == ANTLR3_TOKEN_EOF)
-			{
-				ANTLR3_FPRINTF(stderr, ", at <EOF>");
-			}
-			else
-			{
-				// Guard against null text in a token
-				//
-				ANTLR3_FPRINTF(stderr, "\n    near %s\n    ", ttext == NULL ? (pANTLR3_UINT8)"<no text for the token>" : ttext->chars);
-			}
-		}
-		break;
-
-	case	ANTLR3_TYPE_TREE_PARSER:
-
-		tparser		= (pANTLR3_TREE_PARSER) (recognizer->super);
-		parser		= NULL;
-		is			= tparser->ctnstream->tnstream->istream;
-		theBaseTree	= (pANTLR3_BASE_TREE)(recognizer->state->exception->token);
-		ttext		= theBaseTree->toStringTree(theBaseTree);
-
-		if  (theBaseTree != NULL)
-		{
-			theCommonTree	= (pANTLR3_COMMON_TREE)	    theBaseTree->super;
-
-			if	(theCommonTree != NULL)
-			{
-				theToken	= (pANTLR3_COMMON_TOKEN)    theBaseTree->getToken(theBaseTree);
-			}
-			ANTLR3_FPRINTF(stderr, ", at offset %d", theBaseTree->getCharPositionInLine(theBaseTree));
-			ANTLR3_FPRINTF(stderr, ", near %s", ttext->chars);
-		}
-		break;
-
-	default:
-
-		ANTLR3_FPRINTF(stderr, "Base recognizer function displayRecognitionError called by unknown parser type - provide override for this function\n");
-		return;
-		break;
-	}
-
-	// Although this function should generally be provided by the implementation, this one
-	// should be as helpful as possible for grammar developers and serve as an example
-	// of what you can do with each exception type. In general, when you make up your
-	// 'real' handler, you should debug the routine with all possible errors you expect
-	// which will then let you be as specific as possible about all circumstances.
-	//
-	// Note that in the general case, errors thrown by tree parsers indicate a problem
-	// with the output of the parser or with the tree grammar itself. The job of the parser
-	// is to produce a perfect (in traversal terms) syntactically correct tree, so errors
-	// at that stage should really be semantic errors that your own code determines and handles
-	// in whatever way is appropriate.
-	//
-	switch  (ex->type)
-	{
-	case	ANTLR3_UNWANTED_TOKEN_EXCEPTION:
-
-		// Indicates that the recognizer was fed a token which seesm to be
-		// spurious input. We can detect this when the token that follows
-		// this unwanted token would normally be part of the syntactically
-		// correct stream. Then we can see that the token we are looking at
-		// is just something that should not be there and throw this exception.
-		//
-		if	(tokenNames == NULL)
-		{
-			ANTLR3_FPRINTF(stderr, " : Extraneous input...");
-		}
-		else
-		{
-			if	(ex->expecting == ANTLR3_TOKEN_EOF)
-			{
-				ANTLR3_FPRINTF(stderr, " : Extraneous input - expected <EOF>\n");
-			}
-			else
-			{
-				ANTLR3_FPRINTF(stderr, " : Extraneous input - expected %s ...\n", tokenNames[ex->expecting]);
-			}
-		}
-		break;
-
-	case	ANTLR3_MISSING_TOKEN_EXCEPTION:
-
-		// Indicates that the recognizer detected that the token we just
-		// hit would be valid syntactically if preceeded by a particular 
-		// token. Perhaps a missing ';' at line end or a missing ',' in an
-		// expression list, and such like.
-		//
-		if	(tokenNames == NULL)
-		{
-			ANTLR3_FPRINTF(stderr, " : Missing token (%d)...\n", ex->expecting);
-		}
-		else
-		{
-			if	(ex->expecting == ANTLR3_TOKEN_EOF)
-			{
-				ANTLR3_FPRINTF(stderr, " : Missing <EOF>\n");
-			}
-			else
-			{
-				ANTLR3_FPRINTF(stderr, " : Missing %s \n", tokenNames[ex->expecting]);
-			}
-		}
-		break;
-
-	case	ANTLR3_RECOGNITION_EXCEPTION:
-
-		// Indicates that the recognizer received a token
-		// in the input that was not predicted. This is the basic exception type 
-		// from which all others are derived. So we assume it was a syntax error.
-		// You may get this if there are not more tokens and more are needed
-		// to complete a parse for instance.
-		//
-		ANTLR3_FPRINTF(stderr, " : syntax error...\n");    
-		break;
-
-	case    ANTLR3_MISMATCHED_TOKEN_EXCEPTION:
-
-		// We were expecting to see one thing and got another. This is the
-		// most common error if we coudl not detect a missing or unwanted token.
-		// Here you can spend your efforts to
-		// derive more useful error messages based on the expected
-		// token set and the last token and so on. The error following
-		// bitmaps do a good job of reducing the set that we were looking
-		// for down to something small. Knowing what you are parsing may be
-		// able to allow you to be even more specific about an error.
-		//
-		if	(tokenNames == NULL)
-		{
-			ANTLR3_FPRINTF(stderr, " : syntax error...\n");
-		}
-		else
-		{
-			if	(ex->expecting == ANTLR3_TOKEN_EOF)
-			{
-				ANTLR3_FPRINTF(stderr, " : expected <EOF>\n");
-			}
-			else
-			{
-				ANTLR3_FPRINTF(stderr, " : expected %s ...\n", tokenNames[ex->expecting]);
-			}
-		}
-		break;
-
-	case	ANTLR3_NO_VIABLE_ALT_EXCEPTION:
-
-		// We could not pick any alt decision from the input given
-		// so god knows what happened - however when you examine your grammar,
-		// you should. It means that at the point where the current token occurred
-		// that the DFA indicates nowhere to go from here.
-		//
-		ANTLR3_FPRINTF(stderr, " : cannot match to any predicted input...\n");
-
-		break;
-
-	case	ANTLR3_MISMATCHED_SET_EXCEPTION:
-
-		{
-			ANTLR3_UINT32	  count;
-			ANTLR3_UINT32	  bit;
-			ANTLR3_UINT32	  size;
-			ANTLR3_UINT32	  numbits;
-			pANTLR3_BITSET	  errBits;
-
-			// This means we were able to deal with one of a set of
-			// possible tokens at this point, but we did not see any
-			// member of that set.
-			//
-			ANTLR3_FPRINTF(stderr, " : unexpected input...\n  expected one of : ");
-
-			// What tokens could we have accepted at this point in the
-			// parse?
-			//
-			count   = 0;
-			errBits = antlr3BitsetLoad		(ex->expectingSet);
-			numbits = errBits->numBits		(errBits);
-			size    = errBits->size			(errBits);
-
-			if  (size > 0)
-			{
-				// However many tokens we could have dealt with here, it is usually
-				// not useful to print ALL of the set here. I arbitrarily chose 8
-				// here, but you should do whatever makes sense for you of course.
-				// No token number 0, so look for bit 1 and on.
-				//
-				for	(bit = 1; bit < numbits && count < 8 && count < size; bit++)
-				{
-					// TODO: This doesn;t look right - should be asking if the bit is set!!
-					//
-					if  (tokenNames[bit])
-					{
-						ANTLR3_FPRINTF(stderr, "%s%s", count > 0 ? ", " : "", tokenNames[bit]); 
-						count++;
-					}
-				}
-				ANTLR3_FPRINTF(stderr, "\n");
-			}
-			else
-			{
-				ANTLR3_FPRINTF(stderr, "Actually dude, we didn't seem to be expecting anything here, or at least\n");
-				ANTLR3_FPRINTF(stderr, "I could not work out what I was expecting, like so many of us these days!\n");
-			}
-		}
-		break;
-
-	case	ANTLR3_EARLY_EXIT_EXCEPTION:
-
-		// We entered a loop requiring a number of token sequences
-		// but found a token that ended that sequence earlier than
-		// we should have done.
-		//
-		ANTLR3_FPRINTF(stderr, " : missing elements...\n");
-		break;
-
-	default:
-
-		// We don't handle any other exceptions here, but you can
-		// if you wish. If we get an exception that hits this point
-		// then we are just going to report what we know about the
-		// token.
-		//
-		ANTLR3_FPRINTF(stderr, " : syntax not recognized...\n");
-		break;
-	}
-
-	// Here you have the token that was in error which if this is
-	// the standard implementation will tell you the line and offset
-	// and also record the address of the start of the line in the
-	// input stream. You could therefore print the source line and so on.
-	// Generally though, I would expect that your lexer/parser will keep
-	// its own map of lines and source pointers or whatever as there
-	// are a lot of specific things you need to know about the input
-	// to do something like that.
-	// Here is where you do it though :-).
-	//
-}
-
-/// Return how many syntax errors were detected by this recognizer
-///
-static ANTLR3_UINT32
-getNumberOfSyntaxErrors(pANTLR3_BASE_RECOGNIZER recognizer)
-{
-	return	recognizer->state->errorCount;
-}
-
-/// Recover from an error found on the input stream.  Mostly this is
-/// NoViableAlt exceptions, but could be a mismatched token that
-/// the match() routine could not recover from.
-///
-static void			
-recover			    (pANTLR3_BASE_RECOGNIZER recognizer)
-{
-    // Used to compute the follow set of tokens
-    //
-    pANTLR3_BITSET			followSet;
-    pANTLR3_PARSER			parser;
-    pANTLR3_TREE_PARSER	    tparser;
-    pANTLR3_INT_STREAM	    is;
-
-    switch	(recognizer->type)
-    {
-		case	ANTLR3_TYPE_PARSER:
-
-		parser  = (pANTLR3_PARSER) (recognizer->super);
-		tparser	= NULL;
-		is		= parser->tstream->istream;
-
-	break;
-
-    case	ANTLR3_TYPE_TREE_PARSER:
-
-		tparser = (pANTLR3_TREE_PARSER) (recognizer->super);
-		parser	= NULL;
-		is		= tparser->ctnstream->tnstream->istream;
-
-	break;
-
-    default:
-	    
-		ANTLR3_FPRINTF(stderr, "Base recognizer function recover called by unknown parser type - provide override for this function\n");
-		return;
-
-	break;
-    }
-
-	// Are we about to repeat the same error?
-	//
-    if	(recognizer->state->lastErrorIndex == is->index(is))
-    {
-		// The last error was at the same token index point. This must be a case
-		// where LT(1) is in the recovery token set so nothing is
-		// consumed. Consume a single token so at least to prevent
-		// an infinite loop; this is a failsafe.
-		//
-		is->consume(is);
-    }
-
-    // Record error index position
-    //
-    recognizer->state->lastErrorIndex	 = is->index(is);
-    
-    // Work out the follows set for error recovery
-    //
-    followSet	= recognizer->computeErrorRecoverySet(recognizer);
-
-    // Call resync hook (for debuggers and so on)
-    //
-    recognizer->beginResync(recognizer);
-
-    // Consume tokens until we have resynced to something in the follows set
-    //
-    recognizer->consumeUntilSet(recognizer, followSet);
-
-    // End resync hook 
-    //
-    recognizer->endResync(recognizer);
-
-    // Destroy the temporary bitset we produced.
-    //
-    followSet->free(followSet);
-
-    // Reset the inError flag so we don't re-report the exception
-    //
-    recognizer->state->error	= ANTLR3_FALSE;
-    recognizer->state->failed	= ANTLR3_FALSE;
-}
-
-
-/// Attempt to recover from a single missing or extra token.
-///
-/// EXTRA TOKEN
-///
-/// LA(1) is not what we are looking for.  If LA(2) has the right token,
-/// however, then assume LA(1) is some extra spurious token.  Delete it
-/// and LA(2) as if we were doing a normal match(), which advances the
-/// input.
-///
-/// MISSING TOKEN
-///
-/// If current token is consistent with what could come after
-/// ttype then it is ok to "insert" the missing token, else throw
-/// exception For example, Input "i=(3;" is clearly missing the
-/// ')'.  When the parser returns from the nested call to expr, it
-/// will have call chain:
-///
-///    stat -> expr -> atom
-///
-/// and it will be trying to match the ')' at this point in the
-/// derivation:
-///
-///       => ID '=' '(' INT ')' ('+' atom)* ';'
-///                          ^
-/// match() will see that ';' doesn't match ')' and report a
-/// mismatched token error.  To recover, it sees that LA(1)==';'
-/// is in the set of tokens that can follow the ')' token
-/// reference in rule atom.  It can assume that you forgot the ')'.
-///
-/// The exception that was passed in, in the java implementation is
-/// sorted in the recognizer exception stack in the C version. To 'throw' it we set the
-/// error flag and rules cascade back when this is set.
-///
-static void *	
-recoverFromMismatchedToken  (pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 ttype, pANTLR3_BITSET_LIST follow)
-{
-	pANTLR3_PARSER			  parser;
-	pANTLR3_TREE_PARSER	      tparser;
-	pANTLR3_INT_STREAM	      is;
-	void					* matchedSymbol;
-
-
-
-	switch	(recognizer->type)
-	{
-	case	ANTLR3_TYPE_PARSER:
-
-		parser  = (pANTLR3_PARSER) (recognizer->super);
-		tparser	= NULL;
-		is	= parser->tstream->istream;
-
-		break;
-
-	case	ANTLR3_TYPE_TREE_PARSER:
-
-		tparser = (pANTLR3_TREE_PARSER) (recognizer->super);
-		parser	= NULL;
-		is	= tparser->ctnstream->tnstream->istream;
-
-		break;
-
-	default:
-
-		ANTLR3_FPRINTF(stderr, "Base recognizer function recoverFromMismatchedToken called by unknown parser type - provide override for this function\n");
-		return NULL;
-
-		break;
-	}
-
-	// Create an exception if we need one
-	//
-	if	(recognizer->state->exception == NULL)
-	{
-		antlr3RecognitionExceptionNew(recognizer);
-	}
-
-	// If the next token after the one we are looking at in the input stream
-	// is what we are looking for then we remove the one we have discovered
-	// from the stream by consuming it, then consume this next one along too as
-	// if nothing had happened.
-	//
-	if	( recognizer->mismatchIsUnwantedToken(recognizer, is, ttype) == ANTLR3_TRUE)
-	{
-		recognizer->state->exception->type		= ANTLR3_UNWANTED_TOKEN_EXCEPTION;
-		recognizer->state->exception->message	= ANTLR3_UNWANTED_TOKEN_EXCEPTION_NAME;
-
-		// Call resync hook (for debuggers and so on)
-		//
-		if	(recognizer->debugger != NULL)
-		{
-			recognizer->debugger->beginResync(recognizer->debugger);
-		}
-
-		// "delete" the extra token
-		//
-		recognizer->beginResync(recognizer);
-		is->consume(is);
-		recognizer->endResync(recognizer);
-		// End resync hook 
-		//
-		if	(recognizer->debugger != NULL)
-		{
-			recognizer->debugger->endResync(recognizer->debugger);
-		}
-
-		// Print out the error after we consume so that ANTLRWorks sees the
-		// token in the exception.
-		//
-		recognizer->reportError(recognizer);
-
-		// Return the token we are actually matching
-		//
-		matchedSymbol = recognizer->getCurrentInputSymbol(recognizer, is);
-
-		// Consume the token that the rule actually expected to get as if everything
-		// was hunky dory.
-		//
-		is->consume(is);
-
-		recognizer->state->error  = ANTLR3_FALSE;	// Exception is not outstanding any more
-
-		return	matchedSymbol;
-	}
-
-	// Single token deletion (Unwanted above) did not work
-	// so we see if we can insert a token instead by calculating which
-	// token would be missing
-	//
-	if	(mismatchIsMissingToken(recognizer, is, follow))
-	{
-		// We can fake the missing token and proceed
-		//
-		matchedSymbol = recognizer->getMissingSymbol(recognizer, is, recognizer->state->exception, ttype, follow);
-		recognizer->state->exception->type		= ANTLR3_MISSING_TOKEN_EXCEPTION;
-		recognizer->state->exception->message	= ANTLR3_MISSING_TOKEN_EXCEPTION_NAME;
-		recognizer->state->exception->token		= matchedSymbol;
-		recognizer->state->exception->expecting	= ttype;
-
-		// Print out the error after we insert so that ANTLRWorks sees the
-		// token in the exception.
-		//
-		recognizer->reportError(recognizer);
-
-		recognizer->state->error  = ANTLR3_FALSE;	// Exception is not outstanding any more
-
-		return	matchedSymbol;
-	}
-
-
-	// Neither deleting nor inserting tokens allows recovery
-	// must just report the exception.
-	//
-	recognizer->state->error	    = ANTLR3_TRUE;
-	return NULL;
-}
-
-static void *
-recoverFromMismatchedSet	    (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_BITSET_LIST follow)
-{
-    pANTLR3_PARSER			parser;
-    pANTLR3_TREE_PARSER	    tparser;
-    pANTLR3_INT_STREAM	    is;
-	pANTLR3_COMMON_TOKEN	matchedSymbol;
-
-    switch	(recognizer->type)
-    {
-    case	ANTLR3_TYPE_PARSER:
-
-		parser  = (pANTLR3_PARSER) (recognizer->super);
-		tparser	= NULL;
-		is	= parser->tstream->istream;
-
-	break;
-
-    case	ANTLR3_TYPE_TREE_PARSER:
-
-		tparser = (pANTLR3_TREE_PARSER) (recognizer->super);
-		parser	= NULL;
-		is	= tparser->ctnstream->tnstream->istream;
-
-	break;
-
-    default:
-	    
-		ANTLR3_FPRINTF(stderr, "Base recognizer function recoverFromMismatchedSet called by unknown parser type - provide override for this function\n");
-		return NULL;
-
-	break;
-    }
-
-	if	(recognizer->mismatchIsMissingToken(recognizer, is, follow) == ANTLR3_TRUE)
-	{
-		// We can fake the missing token and proceed
-		//
-		matchedSymbol = recognizer->getMissingSymbol(recognizer, is, recognizer->state->exception, ANTLR3_TOKEN_INVALID, follow);
-		recognizer->state->exception->type	= ANTLR3_MISSING_TOKEN_EXCEPTION;
-		recognizer->state->exception->token	= matchedSymbol;
-
-		// Print out the error after we insert so that ANTLRWorks sees the
-		// token in the exception.
-		//
-		recognizer->reportError(recognizer);
-
-		recognizer->state->error  = ANTLR3_FALSE;	// Exception is not outstanding any more
-
-		return	matchedSymbol;
-	}
-
-    // TODO - Single token deletion like in recoverFromMismatchedToken()
-    //
-    recognizer->state->error	= ANTLR3_TRUE;
-	recognizer->state->failed	= ANTLR3_TRUE;
-	return NULL;
-}
-
-/// This code is factored out from mismatched token and mismatched set
-///  recovery.  It handles "single token insertion" error recovery for
-/// both.  No tokens are consumed to recover from insertions.  Return
-/// true if recovery was possible else return false.
-///
-static ANTLR3_BOOLEAN	
-recoverFromMismatchedElement	    (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_BITSET_LIST followBits)
-{
-    pANTLR3_BITSET	    viableToksFollowingRule;
-    pANTLR3_BITSET	    follow;
-    pANTLR3_PARSER	    parser;
-    pANTLR3_TREE_PARSER	    tparser;
-    pANTLR3_INT_STREAM	    is;
-
-    switch	(recognizer->type)
-    {
-    case	ANTLR3_TYPE_PARSER:
-
-		parser  = (pANTLR3_PARSER) (recognizer->super);
-		tparser	= NULL;
-		is	= parser->tstream->istream;
-
-	break;
-
-    case	ANTLR3_TYPE_TREE_PARSER:
-
-		tparser = (pANTLR3_TREE_PARSER) (recognizer->super);
-		parser	= NULL;
-		is	= tparser->ctnstream->tnstream->istream;
-
-	break;
-
-    default:
-	    
-		ANTLR3_FPRINTF(stderr, "Base recognizer function recover called by unknown parser type - provide override for this function\n");
-		return ANTLR3_FALSE;
-
-	break;
-    }
-
-    follow	= antlr3BitsetLoad(followBits);
-
-    if	(follow == NULL)
-    {
-		/* The follow set is NULL, which means we don't know what can come 
-		 * next, so we "hit and hope" by just signifying that we cannot
-		 * recover, which will just cause the next token to be consumed,
-		 * which might dig us out.
-		 */
-		return	ANTLR3_FALSE;
-    }
-
-    /* We have a bitmap for the follow set, hence we can compute 
-     * what can follow this grammar element reference.
-     */
-    if	(follow->isMember(follow, ANTLR3_EOR_TOKEN_TYPE) == ANTLR3_TRUE)
-    {
-		/* First we need to know which of the available tokens are viable
-		 * to follow this reference.
-		 */
-		viableToksFollowingRule	= recognizer->computeCSRuleFollow(recognizer);
-
-		/* Remove the EOR token, which we do not wish to compute with
-		 */
-		follow->remove(follow, ANTLR3_EOR_TOKEN_TYPE);
-		viableToksFollowingRule->free(viableToksFollowingRule);
-		/* We now have the computed set of what can follow the current token
-		 */
-    }
-
-    /* We can now see if the current token works with the set of tokens
-     * that could follow the current grammar reference. If it looks like it
-     * is consistent, then we can "insert" that token by not throwing
-     * an exception and assuming that we saw it. 
-     */
-    if	( follow->isMember(follow, is->_LA(is, 1)) == ANTLR3_TRUE)
-    {
-		/* report the error, but don't cause any rules to abort and stuff
-		 */
-		recognizer->reportError(recognizer);
-		if	(follow != NULL)
-		{
-			follow->free(follow);
-		}
-		recognizer->state->error			= ANTLR3_FALSE;
-		recognizer->state->failed			= ANTLR3_FALSE;
-		return ANTLR3_TRUE;	/* Success in recovery	*/
-    }
-
-    if	(follow != NULL)
-    {
-		follow->free(follow);
-    }
-
-    /* We could not find anything viable to do, so this is going to 
-     * cause an exception.
-     */
-    return  ANTLR3_FALSE;
-}
-
-/// Eat tokens from the input stream until we get one of JUST the right type
-///
-static void		
-consumeUntil	(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 tokenType)
-{
-    ANTLR3_UINT32			ttype;
-    pANTLR3_PARSER			parser;
-    pANTLR3_TREE_PARSER	    tparser;
-    pANTLR3_INT_STREAM	    is;
-
-    switch	(recognizer->type)
-    {
-		case	ANTLR3_TYPE_PARSER:
-
-			parser  = (pANTLR3_PARSER) (recognizer->super);
-			tparser	= NULL;
-			is	= parser->tstream->istream;
-
-			break;
-
-		case	ANTLR3_TYPE_TREE_PARSER:
-
-			tparser = (pANTLR3_TREE_PARSER) (recognizer->super);
-			parser	= NULL;
-			is	= tparser->ctnstream->tnstream->istream;
-
-			break;
-
-		default:
-		    
-			ANTLR3_FPRINTF(stderr, "Base recognizer function 'consumeUntil' called by unknown parser type - provide override for this function\n");
-			return;
-
-			break;
-    }
-
-    // What do have at the moment?
-    //
-    ttype	= is->_LA(is, 1);
-
-    // Start eating tokens until we get to the one we want.
-    //
-    while   (ttype != ANTLR3_TOKEN_EOF && ttype != tokenType)
-    {
-		is->consume(is);
-		ttype	= is->_LA(is, 1);
-    }
-}
-
-/// Eat tokens from the input stream until we find one that
-/// belongs to the supplied set.
-///
-static void		
-consumeUntilSet			    (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_BITSET set)
-{
-    ANTLR3_UINT32	    ttype;
-    pANTLR3_PARSER	    parser;
-    pANTLR3_TREE_PARSER	    tparser;
-    pANTLR3_INT_STREAM	    is;
-
-    switch	(recognizer->type)
-    {
-		case	ANTLR3_TYPE_PARSER:
-
-			parser  = (pANTLR3_PARSER) (recognizer->super);
-			tparser	= NULL;
-			is	= parser->tstream->istream;
-
-			break;
-
-		case	ANTLR3_TYPE_TREE_PARSER:
-
-			tparser = (pANTLR3_TREE_PARSER) (recognizer->super);
-			parser	= NULL;
-			is	= tparser->ctnstream->tnstream->istream;
-
-			break;
-
-		default:
-		    
-			ANTLR3_FPRINTF(stderr, "Base recognizer function 'consumeUntilSet' called by unknown parser type - provide override for this function\n");
-			return;
-
-			break;
-    }
-
-    // What do have at the moment?
-    //
-    ttype	= is->_LA(is, 1);
-
-    // Start eating tokens until we get to one we want.
-    //
-    while   (ttype != ANTLR3_TOKEN_EOF && set->isMember(set, ttype) == ANTLR3_FALSE)
-    {
-		is->consume(is);
-		ttype	= is->_LA(is, 1);
-    }
-}
-
-/** Return the rule invocation stack (how we got here in the parse.
- *  In the java version Ter just asks the JVM for all the information
- *  but in C we don't get this information, so I am going to do nothing 
- *  right now.
- */
-static pANTLR3_STACK	
-getRuleInvocationStack		    (pANTLR3_BASE_RECOGNIZER recognizer)
-{
-    return NULL;
-}
-
-static pANTLR3_STACK	
-getRuleInvocationStackNamed	    (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_UINT8 name)
-{
-    return NULL;
-}
-
-/** Convenience method for template rewrites - NYI.
- */
-static pANTLR3_HASH_TABLE	
-toStrings			    (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_HASH_TABLE tokens)
-{
-    return NULL;
-}
-
-static	void ANTLR3_CDECL
-freeIntTrie    (void * trie)
-{
-    ((pANTLR3_INT_TRIE)trie)->free((pANTLR3_INT_TRIE)trie);
-}
-
-
-/** Pointer to a function to return whether the rule has parsed input starting at the supplied 
- *  start index before. If the rule has not parsed input starting from the supplied start index,
- *  then it will return ANTLR3_MEMO_RULE_UNKNOWN. If it has parsed from the suppled start point
- *  then it will return the point where it last stopped parsing after that start point.
- *
- * \remark
- * The rule memos are an ANTLR3_LIST of ANTLR3_LISTS, however if this becomes any kind of performance
- * issue (it probably won't, the hash tables are pretty quick) then we could make a special int only
- * version of the table.
- */
-static ANTLR3_MARKER	
-getRuleMemoization		    (pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_INTKEY ruleIndex, ANTLR3_MARKER ruleParseStart)
-{
-    /* The rule memos are an ANTLR3_LIST of ANTLR3_LIST.
-     */
-    pANTLR3_INT_TRIE	ruleList;
-    ANTLR3_MARKER	stopIndex;
-    pANTLR3_TRIE_ENTRY	entry;
-
-    /* See if we have a list in the ruleMemos for this rule, and if not, then create one
-     * as we will need it eventually if we are being asked for the memo here.
-     */
-    entry	= recognizer->state->ruleMemo->get(recognizer->state->ruleMemo, (ANTLR3_INTKEY)ruleIndex);
-
-    if	(entry == NULL)
-    {
-		/* Did not find it, so create a new one for it, with a bit depth based on the 
-		 * size of the input stream. We need the bit depth to incorporate the number if
-		 * bits required to represent the largest possible stop index in the input, which is the
-		 * last character. An int stream is free to return the largest 64 bit offset if it has
-		 * no idea of the size, but you should remember that this will cause the leftmost
-		 * bit match algorithm to run to 63 bits, which will be the whole time spent in the trie ;-)
-		 */
-		ruleList    = antlr3IntTrieNew(63);	/* Depth is theoretically 64 bits, but probably not ;-)	*/
-
-		if (ruleList != NULL)
-		{
-			recognizer->state->ruleMemo->add(recognizer->state->ruleMemo, (ANTLR3_INTKEY)ruleIndex, ANTLR3_HASH_TYPE_STR, 0, ANTLR3_FUNC_PTR(ruleList), freeIntTrie);
-		}
-
-		/* We cannot have a stopIndex in a trie we have just created of course
-		 */
-		return	MEMO_RULE_UNKNOWN;
-    }
-
-    ruleList	= (pANTLR3_INT_TRIE) (entry->data.ptr);
-
-    /* See if there is a stop index associated with the supplied start index.
-     */
-    stopIndex	= 0;
-
-    entry = ruleList->get(ruleList, ruleParseStart);
-    if (entry != NULL)
-    {
-		stopIndex = (ANTLR3_MARKER)(entry->data.intVal);
-    }
-
-    if	(stopIndex == 0)
-    {
-		return MEMO_RULE_UNKNOWN;
-    }
-
-    return  stopIndex;
-}
-
-/** Has this rule already parsed input at the current index in the
- *  input stream?  Return ANTLR3_TRUE if we have and ANTLR3_FALSE
- *  if we have not.
- *
- *  This method has a side-effect: if we have seen this input for
- *  this rule and successfully parsed before, then seek ahead to
- *  1 past the stop token matched for this rule last time.
- */
-static ANTLR3_BOOLEAN	
-alreadyParsedRule		    (pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_MARKER ruleIndex)
-{
-    ANTLR3_MARKER			stopIndex;
-    pANTLR3_LEXER			lexer;
-    pANTLR3_PARSER			parser;
-    pANTLR3_TREE_PARSER	    tparser;
-    pANTLR3_INT_STREAM	    is;
-
-    switch	(recognizer->type)
-    {
-		case	ANTLR3_TYPE_PARSER:
-
-			parser  = (pANTLR3_PARSER) (recognizer->super);
-			tparser	= NULL;
-			lexer	= NULL;
-			is	= parser->tstream->istream;
-
-			break;
-
-		case	ANTLR3_TYPE_TREE_PARSER:
-
-			tparser = (pANTLR3_TREE_PARSER) (recognizer->super);
-			parser	= NULL;
-			lexer	= NULL;
-			is	= tparser->ctnstream->tnstream->istream;
-
-			break;
-
-		case	ANTLR3_TYPE_LEXER:
-
-			lexer	= (pANTLR3_LEXER)   (recognizer->super);
-			parser	= NULL;
-			tparser	= NULL;
-			is	= lexer->input->istream;
-			break;
-
-		default:
-		    
-			ANTLR3_FPRINTF(stderr, "Base recognizer function 'alreadyParsedRule' called by unknown parser type - provide override for this function\n");
-			return ANTLR3_FALSE;
-
-			break;
-    }
-
-    /* See if we have a memo marker for this.
-     */
-    stopIndex	    = recognizer->getRuleMemoization(recognizer, ruleIndex, is->index(is));
-
-    if	(stopIndex  == MEMO_RULE_UNKNOWN)
-    {
-		return ANTLR3_FALSE;
-    }
-
-    if	(stopIndex == MEMO_RULE_FAILED)
-    {
-		recognizer->state->failed = ANTLR3_TRUE;
-    }
-    else
-    {
-		is->seek(is, stopIndex+1);
-    }
-
-    /* If here then the rule was executed for this input already
-     */
-    return  ANTLR3_TRUE;
-}
-
-/** Record whether or not this rule parsed the input at this position
- *  successfully.
- */
-static void		
-memoize	(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_MARKER ruleIndex, ANTLR3_MARKER ruleParseStart)
-{
-    /* The rule memos are an ANTLR3_LIST of ANTLR3_LIST.
-     */
-    pANTLR3_INT_TRIE	    ruleList;
-    pANTLR3_TRIE_ENTRY	    entry;
-    ANTLR3_MARKER	    stopIndex;
-    pANTLR3_LEXER	    lexer;
-    pANTLR3_PARSER	    parser;
-    pANTLR3_TREE_PARSER	    tparser;
-    pANTLR3_INT_STREAM	    is;
-
-    switch	(recognizer->type)
-    {
-		case	ANTLR3_TYPE_PARSER:
-
-			parser  = (pANTLR3_PARSER) (recognizer->super);
-			tparser	= NULL;
-			is	= parser->tstream->istream;
-
-			break;
-
-		case	ANTLR3_TYPE_TREE_PARSER:
-
-			tparser = (pANTLR3_TREE_PARSER) (recognizer->super);
-			parser	= NULL;
-			is	= tparser->ctnstream->tnstream->istream;
-
-			break;
-
-		case	ANTLR3_TYPE_LEXER:
-
-			lexer	= (pANTLR3_LEXER)   (recognizer->super);
-			parser	= NULL;
-			tparser	= NULL;
-			is		= lexer->input->istream;
-			break;
-
-		default:
-		    
-			ANTLR3_FPRINTF(stderr, "Base recognizer function consumeUntilSet called by unknown parser type - provide override for this function\n");
-			return;
-
-			break;
-    }
-    
-    stopIndex	= recognizer->state->failed == ANTLR3_TRUE ? MEMO_RULE_FAILED : is->index(is) - 1;
-
-    entry	= recognizer->state->ruleMemo->get(recognizer->state->ruleMemo, (ANTLR3_INTKEY)ruleIndex);
-
-    if	(entry != NULL)
-    {
-		ruleList = (pANTLR3_INT_TRIE)(entry->data.ptr);
-
-		/* If we don't already have this entry, append it. The memoize trie does not
-		 * accept duplicates so it won't add it if already there and we just ignore the
-		 * return code as we don't care if it is there already.
-		 */
-		ruleList->add(ruleList, ruleParseStart, ANTLR3_HASH_TYPE_INT, stopIndex, NULL, NULL);
-    }
-}
-/** A syntactic predicate.  Returns true/false depending on whether
- *  the specified grammar fragment matches the current input stream.
- *  This resets the failed instance var afterwards.
- */
-static ANTLR3_BOOLEAN	
-synpred	(pANTLR3_BASE_RECOGNIZER recognizer, void * ctx, void (*predicate)(void * ctx))
-{
-    ANTLR3_MARKER   start;
-    pANTLR3_PARSER	    parser;
-    pANTLR3_TREE_PARSER	    tparser;
-    pANTLR3_INT_STREAM	    is;
-
-    switch	(recognizer->type)
-    {
-		case	ANTLR3_TYPE_PARSER:
-
-			parser  = (pANTLR3_PARSER) (recognizer->super);
-			tparser	= NULL;
-			is	= parser->tstream->istream;
-
-			break;
-
-		case	ANTLR3_TYPE_TREE_PARSER:
-
-			tparser = (pANTLR3_TREE_PARSER) (recognizer->super);
-			parser	= NULL;
-			is	= tparser->ctnstream->tnstream->istream;
-
-			break;
-
-		default:
-		    
-			ANTLR3_FPRINTF(stderr, "Base recognizer function 'synPred' called by unknown parser type - provide override for this function\n");
-			return ANTLR3_FALSE;
-
-			break;
-    }
-
-    /* Begin backtracking so we can get back to where we started after trying out
-     * the syntactic predicate.
-     */
-    start   = is->mark(is);
-    recognizer->state->backtracking++;
-
-    /* Try the syntactical predicate
-     */
-    predicate(ctx);
-
-    /* Reset
-     */
-    is->rewind(is, start);
-    recognizer->state->backtracking--;
-
-    if	(recognizer->state->failed == ANTLR3_TRUE)
-    {
-		/* Predicate failed
-		 */
-		recognizer->state->failed = ANTLR3_FALSE;
-		return	ANTLR3_FALSE;
-    }
-    else
-    {
-		/* Predicate was successful
-		 */
-		recognizer->state->failed	= ANTLR3_FALSE;
-		return	ANTLR3_TRUE;
-    }
-}
-
-static void
-reset(pANTLR3_BASE_RECOGNIZER recognizer)
-{
-    if	(recognizer->state->following != NULL)
-    {
-		recognizer->state->following->free(recognizer->state->following);
-    }
-
-	// Reset the state flags
-	//
-	recognizer->state->errorRecovery	= ANTLR3_FALSE;
-	recognizer->state->lastErrorIndex	= -1;
-	recognizer->state->failed			= ANTLR3_FALSE;
-	recognizer->state->errorCount		= 0;
-	recognizer->state->backtracking		= 0;
-	recognizer->state->following		= NULL;
-
-	if	(recognizer->state != NULL)
-	{
-		if	(recognizer->state->ruleMemo != NULL)
-		{
-			recognizer->state->ruleMemo->free(recognizer->state->ruleMemo);
-			recognizer->state->ruleMemo = antlr3IntTrieNew(15);	/* 16 bit depth is enough for 32768 rules! */
-		}
-	}
-	
-
-    // Install a new following set
-    //
-    recognizer->state->following   = antlr3StackNew(8);
-
-}
-
-// Default implementation is for parser and assumes a token stream as supplied by the runtime.
-// You MAY need override this function if the standard TOKEN_STREAM is not what you are using.
-//
-static void *				
-getCurrentInputSymbol		(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM istream)
-{
-	return ((pANTLR3_TOKEN_STREAM)istream->super)->_LT((pANTLR3_TOKEN_STREAM)istream->super, 1);
-}
-
-// Default implementation is for parser and assumes a token stream as supplied by the runtime.
-// You MAY need override this function if the standard COMMON_TOKEN_STREAM is not what you are using.
-//
-static void *				
-getMissingSymbol			(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM	istream, pANTLR3_EXCEPTION	e,
-									ANTLR3_UINT32 expectedTokenType, pANTLR3_BITSET_LIST follow)
-{
-	pANTLR3_TOKEN_STREAM			ts;
-	pANTLR3_COMMON_TOKEN_STREAM		cts;
-	pANTLR3_COMMON_TOKEN			token;
-	pANTLR3_COMMON_TOKEN			current;
-	pANTLR3_STRING					text;
-
-	// Dereference the standard pointers
-	//
-	ts		= (pANTLR3_TOKEN_STREAM)istream->super;
-	cts		= (pANTLR3_COMMON_TOKEN_STREAM)ts->super;
-	
-	// Work out what to use as the current symbol to make a line and offset etc
-	// If we are at EOF, we use the token before EOF
-	//
-	current	= ts->_LT(ts, 1);
-	if	(current->getType(current) == ANTLR3_TOKEN_EOF)
-	{
-		current = ts->_LT(ts, -1);
-	}
-
-	// Create a new empty token
-	//
-	if	(recognizer->state->tokFactory == NULL)
-	{
-		// We don't yet have a token factory for making tokens
-		// we just need a fake one using the input stream of the current
-		// token.
-		//
-		recognizer->state->tokFactory = antlr3TokenFactoryNew(current->input);
-	}
-	token	= recognizer->state->tokFactory->newToken(recognizer->state->tokFactory);
-
-	// Set some of the token properties based on the current token
-	//
-	token->setLine					(token, current->getLine(current));
-	token->setCharPositionInLine	(token, current->getCharPositionInLine(current));
-	token->setChannel				(token, ANTLR3_TOKEN_DEFAULT_CHANNEL);
-	token->setType					(token, expectedTokenType);
-    token->user1                    = current->user1;
-    token->user2                    = current->user2;
-    token->user3                    = current->user3;
-    token->custom                   = current->custom;
-    token->lineStart                = current->lineStart;
-    
-	// Create the token text that shows it has been inserted
-	//
-	token->setText8(token, (pANTLR3_UINT8)"<missing ");
-	text = token->getText(token);
-
-	if	(text != NULL)
-	{
-		text->append8(text, (const char *)recognizer->state->tokenNames[expectedTokenType]);
-		text->append8(text, (const char *)">");
-	}
-	
-	// Finally return the pointer to our new token
-	//
-	return	token;
-}
-
-
-#ifdef	ANTLR3_WINDOWS
-#pragma warning( default : 4100 )
-#endif
-
-/// @}
-///
-
diff --git a/antlr-3.4/runtime/C/src/antlr3basetree.c b/antlr-3.4/runtime/C/src/antlr3basetree.c
deleted file mode 100644
index bbc81e7..0000000
--- a/antlr-3.4/runtime/C/src/antlr3basetree.c
+++ /dev/null
@@ -1,489 +0,0 @@
-#include    <antlr3basetree.h>
-
-#ifdef	ANTLR3_WINDOWS
-#pragma warning( disable : 4100 )
-#endif
-
-// [The "BSD licence"]
-// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC
-// http://www.temporal-wave.com
-// http://www.linkedin.com/in/jimidle
-//
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// 1. Redistributions of source code must retain the above copyright
-//    notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-//    notice, this list of conditions and the following disclaimer in the
-//    documentation and/or other materials provided with the distribution.
-// 3. The name of the author may not be used to endorse or promote products
-//    derived from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-static void				*	getChild			(pANTLR3_BASE_TREE tree, ANTLR3_UINT32 i);
-static ANTLR3_UINT32		getChildCount		(pANTLR3_BASE_TREE tree);
-static ANTLR3_UINT32		getCharPositionInLine
-(pANTLR3_BASE_TREE tree);
-static ANTLR3_UINT32		getLine				(pANTLR3_BASE_TREE tree);
-static pANTLR3_BASE_TREE    
-getFirstChildWithType
-(pANTLR3_BASE_TREE tree, ANTLR3_UINT32 type);
-static void					addChild			(pANTLR3_BASE_TREE tree, pANTLR3_BASE_TREE child);
-static void					addChildren			(pANTLR3_BASE_TREE tree, pANTLR3_LIST kids);
-static void					replaceChildren		(pANTLR3_BASE_TREE parent, ANTLR3_INT32 startChildIndex, ANTLR3_INT32 stopChildIndex, pANTLR3_BASE_TREE t);
-
-static	void				freshenPACIndexesAll(pANTLR3_BASE_TREE tree);
-static	void				freshenPACIndexes	(pANTLR3_BASE_TREE tree, ANTLR3_UINT32 offset);
-
-static void					setChild			(pANTLR3_BASE_TREE tree, ANTLR3_UINT32 i, void * child);
-static void				*	deleteChild			(pANTLR3_BASE_TREE tree, ANTLR3_UINT32 i);
-static void				*	dupTree				(pANTLR3_BASE_TREE tree);
-static pANTLR3_STRING		toStringTree		(pANTLR3_BASE_TREE tree);
-
-
-ANTLR3_API pANTLR3_BASE_TREE
-antlr3BaseTreeNew(pANTLR3_BASE_TREE  tree)
-{
-	/* api */
-	tree->getChild				= getChild;
-	tree->getChildCount			= getChildCount;
-	tree->addChild				= (void (*)(pANTLR3_BASE_TREE, void *))(addChild);
-	tree->addChildren			= addChildren;
-	tree->setChild				= setChild;
-	tree->deleteChild			= deleteChild;
-	tree->dupTree				= dupTree;
-	tree->toStringTree			= toStringTree;
-	tree->getCharPositionInLine	= getCharPositionInLine;
-	tree->getLine				= getLine;
-	tree->replaceChildren		= replaceChildren;
-	tree->freshenPACIndexesAll	= freshenPACIndexesAll;
-	tree->freshenPACIndexes		= freshenPACIndexes;
-	tree->getFirstChildWithType	= (void *(*)(pANTLR3_BASE_TREE, ANTLR3_UINT32))(getFirstChildWithType);
-	tree->children				= NULL;
-	tree->strFactory			= NULL;
-
-	/* Rest must be filled in by caller.
-	*/
-	return  tree;
-}
-
-static ANTLR3_UINT32	
-getCharPositionInLine	(pANTLR3_BASE_TREE tree)
-{
-	return  0;
-}
-
-static ANTLR3_UINT32	
-getLine	(pANTLR3_BASE_TREE tree)
-{
-	return  0;
-}
-static pANTLR3_BASE_TREE
-getFirstChildWithType	(pANTLR3_BASE_TREE tree, ANTLR3_UINT32 type)
-{
-	ANTLR3_UINT32   i;
-	ANTLR3_UINT32   cs;
-
-	pANTLR3_BASE_TREE	t;
-	if	(tree->children != NULL)
-	{
-		cs	= tree->children->size(tree->children);
-		for	(i = 0; i < cs; i++)
-		{
-			t = (pANTLR3_BASE_TREE) (tree->children->get(tree->children, i));
-			if  (tree->getType(t) == type)
-			{
-				return  (pANTLR3_BASE_TREE)t;
-			}
-		}
-	}
-	return  NULL;
-}
-
-
-
-static void    *
-getChild		(pANTLR3_BASE_TREE tree, ANTLR3_UINT32 i)
-{
-	if	(      tree->children == NULL
-		|| i >= tree->children->size(tree->children))
-	{
-		return NULL;
-	}
-	return  tree->children->get(tree->children, i);
-}
-
-
-static ANTLR3_UINT32
-getChildCount	(pANTLR3_BASE_TREE tree)
-{
-	if	(tree->children == NULL)
-	{
-		return 0;
-	}
-	else
-	{
-		return	tree->children->size(tree->children);
-	}
-}
-
-void	    
-addChild (pANTLR3_BASE_TREE tree, pANTLR3_BASE_TREE child)
-{
-	ANTLR3_UINT32   n;
-	ANTLR3_UINT32   i;
-
-	if	(child == NULL)
-	{
-		return;
-	}
-
-	if	(child->isNilNode(child) == ANTLR3_TRUE)
-	{
-		if  (child->children != NULL && child->children == tree->children)
-		{
-			// TODO: Change to exception rather than ANTLR3_FPRINTF?
-			//
-			ANTLR3_FPRINTF(stderr, "ANTLR3: An attempt was made to add a child list to itself!\n");
-			return;
-		}
-
-        // Add all of the children's children to this list
-        //
-        if (child->children != NULL)
-        {
-            if (tree->children == NULL)
-            {
-                // We are build ing the tree structure here, so we need not
-                // worry about duplication of pointers as the tree node
-                // factory will only clean up each node once. So we just
-                // copy in the child's children pointer as the child is
-                // a nil node (has not root itself).
-                //
-                tree->children = child->children;
-                child->children = NULL;
-                freshenPACIndexesAll(tree);
-                
-            }
-            else
-            {
-                // Need to copy the children
-                //
-                n = child->children->size(child->children);
-
-                for (i = 0; i < n; i++)
-                {
-                    pANTLR3_BASE_TREE entry;
-                    entry = child->children->get(child->children, i);
-
-                    // ANTLR3 lists can be sparse, unlike Array Lists
-                    //
-                    if (entry != NULL)
-                    {
-                        tree->children->add(tree->children, entry, (void (ANTLR3_CDECL *) (void *))child->free);
-                    }
-                }
-            }
-		}
-	}
-	else
-	{
-		// Tree we are adding is not a Nil and might have children to copy
-		//
-		if  (tree->children == NULL)
-		{
-			// No children in the tree we are adding to, so create a new list on
-			// the fly to hold them.
-			//
-			tree->createChildrenList(tree);
-		}
-
-		tree->children->add(tree->children, child, (void (ANTLR3_CDECL *)(void *))child->free);
-		
-	}
-}
-
-/// Add all elements of the supplied list as children of this node
-///
-static void
-addChildren	(pANTLR3_BASE_TREE tree, pANTLR3_LIST kids)
-{
-	ANTLR3_UINT32    i;
-	ANTLR3_UINT32    s;
-
-	s = kids->size(kids);
-	for	(i = 0; i<s; i++)
-	{
-		tree->addChild(tree, (pANTLR3_BASE_TREE)(kids->get(kids, i+1)));
-	}
-}
-
-
-static    void
-setChild	(pANTLR3_BASE_TREE tree, ANTLR3_UINT32 i, void * child)
-{
-	if	(tree->children == NULL)
-	{
-		tree->createChildrenList(tree);
-	}
-	tree->children->set(tree->children, i, child, NULL, ANTLR3_FALSE);
-}
-
-static void    *
-deleteChild	(pANTLR3_BASE_TREE tree, ANTLR3_UINT32 i)
-{
-	if	( tree->children == NULL)
-	{
-		return	NULL;
-	}
-
-	return  tree->children->remove(tree->children, i);
-}
-
-static void    *
-dupTree		(pANTLR3_BASE_TREE tree)
-{
-	pANTLR3_BASE_TREE	newTree;
-	ANTLR3_UINT32	i;
-	ANTLR3_UINT32	s;
-
-	newTree = tree->dupNode	    (tree);
-
-	if	(tree->children != NULL)
-	{
-		s	    = tree->children->size  (tree->children);
-
-		for	(i = 0; i < s; i++)
-		{
-			pANTLR3_BASE_TREE    t;
-			pANTLR3_BASE_TREE    newNode;
-
-			t   = (pANTLR3_BASE_TREE) tree->children->get(tree->children, i);
-
-			if  (t!= NULL)
-			{
-				newNode	    = t->dupTree(t);
-				newTree->addChild(newTree, newNode);
-			}
-		}
-	}
-
-	return newTree;
-}
-
-static pANTLR3_STRING
-toStringTree	(pANTLR3_BASE_TREE tree)
-{
-	pANTLR3_STRING  string;
-	ANTLR3_UINT32   i;
-	ANTLR3_UINT32   n;
-	pANTLR3_BASE_TREE   t;
-
-	if	(tree->children == NULL || tree->children->size(tree->children) == 0)
-	{
-		return	tree->toString(tree);
-	}
-
-	/* Need a new string with nothing at all in it.
-	*/
-	string	= tree->strFactory->newRaw(tree->strFactory);
-
-	if	(tree->isNilNode(tree) == ANTLR3_FALSE)
-	{
-		string->append8	(string, "(");
-		string->appendS	(string, tree->toString(tree));
-		string->append8	(string, " ");
-	}
-	if	(tree->children != NULL)
-	{
-		n = tree->children->size(tree->children);
-
-		for	(i = 0; i < n; i++)
-		{   
-			t   = (pANTLR3_BASE_TREE) tree->children->get(tree->children, i);
-
-			if  (i > 0)
-			{
-				string->append8(string, " ");
-			}
-			string->appendS(string, t->toStringTree(t));
-		}
-	}
-	if	(tree->isNilNode(tree) == ANTLR3_FALSE)
-	{
-		string->append8(string,")");
-	}
-
-	return  string;
-}
-
-/// Delete children from start to stop and replace with t even if t is
-/// a list (nil-root tree). Num of children can increase or decrease.
-/// For huge child lists, inserting children can force walking rest of
-/// children to set their child index; could be slow.
-///
-static void					
-replaceChildren		(pANTLR3_BASE_TREE parent, ANTLR3_INT32 startChildIndex, ANTLR3_INT32 stopChildIndex, pANTLR3_BASE_TREE newTree)
-{
-	ANTLR3_INT32	replacingHowMany;		// How many nodes will go away
-	ANTLR3_INT32	replacingWithHowMany;	// How many nodes will replace them
-	ANTLR3_INT32	numNewChildren;			// Tracking variable
-	ANTLR3_INT32	delta;					// Difference in new vs existing count
-
-	ANTLR3_INT32	i;
-	ANTLR3_INT32	j;
-
-	pANTLR3_VECTOR	newChildren;			// Iterator for whatever we are going to add in
-	ANTLR3_BOOLEAN	freeNewChildren;		// Whether we created the iterator locally or reused it
-
-	if	(parent->children == NULL)
-	{
-		ANTLR3_FPRINTF(stderr, "replaceChildren call: Indexes are invalid; no children in list for %s", parent->getText(parent)->chars);
-		return;
-	}
-
-	// Either use the existing list of children in the supplied nil node, or build a vector of the
-	// tree we were given if it is not a nil node, then we treat both situations exactly the same
-	//
-	if	(newTree->isNilNode(newTree))
-	{
-		newChildren = newTree->children;
-		freeNewChildren = ANTLR3_FALSE;		// We must NO free this memory
-	}
-	else
-	{
-		newChildren = antlr3VectorNew(1);
-		if	(newChildren == NULL)
-		{
-			ANTLR3_FPRINTF(stderr, "replaceChildren: out of memory!!");
-			exit(1);
-		}
-		newChildren->add(newChildren, (void *)newTree, NULL);
-
-		freeNewChildren = ANTLR3_TRUE;		// We must free this memory
-	}
-
-	// Initialize
-	//
-	replacingHowMany		= stopChildIndex - startChildIndex + 1;
-	replacingWithHowMany	= newChildren->size(newChildren);
-	delta					= replacingHowMany - replacingWithHowMany;
-	numNewChildren			= newChildren->size(newChildren);
-
-	// If it is the same number of nodes, then do a direct replacement
-	//
-	if	(delta == 0)
-	{
-		pANTLR3_BASE_TREE	child;
-
-		// Same number of nodes
-		//
-		j	= 0;
-		for	(i = startChildIndex; i <= stopChildIndex; i++)
-		{
-			child = (pANTLR3_BASE_TREE) newChildren->get(newChildren, j);
-			parent->children->set(parent->children, i, child, NULL, ANTLR3_FALSE);
-			child->setParent(child, parent);
-			child->setChildIndex(child, i);
-		}
-	}
-	else if (delta > 0)
-	{
-		ANTLR3_UINT32	indexToDelete;
-
-		// Less nodes than there were before
-		// reuse what we have then delete the rest
-		//
-		for	(j = 0; j < numNewChildren; j++)
-		{
-			parent->children->set(parent->children, startChildIndex + j, newChildren->get(newChildren, j), NULL, ANTLR3_FALSE);
-		}
-
-		// We just delete the same index position until done
-		//
-		indexToDelete = startChildIndex + numNewChildren;
-
-		for	(j = indexToDelete; j <= (ANTLR3_INT32)stopChildIndex; j++)
-		{
-			parent->children->remove(parent->children, indexToDelete);
-		}
-
-		parent->freshenPACIndexes(parent, startChildIndex);
-	}
-	else
-	{
-		ANTLR3_UINT32 numToInsert;
-
-		// More nodes than there were before
-		// Use what we can, then start adding
-		//
-		for	(j = 0; j < replacingHowMany; j++)
-		{
-			parent->children->set(parent->children, startChildIndex + j, newChildren->get(newChildren, j), NULL, ANTLR3_FALSE);
-		}
-
-		numToInsert = replacingWithHowMany - replacingHowMany;
-
-		for	(j = replacingHowMany; j < replacingWithHowMany; j++)
-		{
-			parent->children->add(parent->children, newChildren->get(newChildren, j), NULL);
-		}
-
-		parent->freshenPACIndexes(parent, startChildIndex);
-	}
-
-	if	(freeNewChildren == ANTLR3_TRUE)
-	{
-		ANTLR3_FREE(newChildren->elements);
-		newChildren->elements = NULL;
-		newChildren->size = 0;
-		ANTLR3_FREE(newChildren);		// Will not free the nodes
-	}
-}
-
-/// Set the parent and child indexes for all children of the
-/// supplied tree.
-///
-static	void
-freshenPACIndexesAll(pANTLR3_BASE_TREE tree)
-{
-	tree->freshenPACIndexes(tree, 0);
-}
-
-/// Set the parent and child indexes for some of the children of the
-/// supplied tree, starting with the child at the supplied index.
-///
-static	void
-freshenPACIndexes	(pANTLR3_BASE_TREE tree, ANTLR3_UINT32 offset)
-{
-	ANTLR3_UINT32	count;
-	ANTLR3_UINT32	c;
-
-	count	= tree->getChildCount(tree);		// How many children do we have 
-
-	// Loop from the supplied index and set the indexes and parent
-	//
-	for	(c = offset; c < count; c++)
-	{
-		pANTLR3_BASE_TREE	child;
-
-		child = tree->getChild(tree, c);
-
-		child->setChildIndex(child, c);
-		child->setParent(child, tree);
-	}
-}
-
diff --git a/antlr-3.4/runtime/C/src/antlr3basetreeadaptor.c b/antlr-3.4/runtime/C/src/antlr3basetreeadaptor.c
deleted file mode 100644
index e35878f..0000000
--- a/antlr-3.4/runtime/C/src/antlr3basetreeadaptor.c
+++ /dev/null
@@ -1,909 +0,0 @@
-/** \file
- * Contains the base functions that all tree adaptors start with.
- * this implementation can then be overridden by any higher implementation.
- * 
- */
-
-// [The "BSD licence"]
-// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC
-// http://www.temporal-wave.com
-// http://www.linkedin.com/in/jimidle
-//
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// 1. Redistributions of source code must retain the above copyright
-//    notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-//    notice, this list of conditions and the following disclaimer in the
-//    documentation and/or other materials provided with the distribution.
-// 3. The name of the author may not be used to endorse or promote products
-//    derived from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#include    <antlr3basetreeadaptor.h>
-
-#ifdef	ANTLR3_WINDOWS
-#pragma warning( disable : 4100 )
-#endif
-
-/* Interface functions
- */
-static	pANTLR3_BASE_TREE	nilNode					(pANTLR3_BASE_TREE_ADAPTOR adaptor);
-static	pANTLR3_BASE_TREE	dbgNil					(pANTLR3_BASE_TREE_ADAPTOR adaptor);
-static	pANTLR3_BASE_TREE	dupTree					(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t);
-static	pANTLR3_BASE_TREE	dbgDupTree				(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t);
-static	pANTLR3_BASE_TREE	dupTreeTT				(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_BASE_TREE parent);
-static	void				addChild				(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_BASE_TREE child);
-static	void				dbgAddChild				(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_BASE_TREE child);
-static	pANTLR3_BASE_TREE	becomeRoot				(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE newRoot, pANTLR3_BASE_TREE oldRoot);
-static	pANTLR3_BASE_TREE	dbgBecomeRoot			(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE newRoot, pANTLR3_BASE_TREE oldRoot);
-static	pANTLR3_BASE_TREE	rulePostProcessing		(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE root);
-static	void				addChildToken			(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_COMMON_TOKEN child);
-static	void				dbgAddChildToken		(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_COMMON_TOKEN child);
-static	pANTLR3_BASE_TREE	becomeRootToken			(pANTLR3_BASE_TREE_ADAPTOR adaptor, void * newRoot, pANTLR3_BASE_TREE oldRoot);
-static	pANTLR3_BASE_TREE	dbgBecomeRootToken		(pANTLR3_BASE_TREE_ADAPTOR adaptor, void * newRoot, pANTLR3_BASE_TREE oldRoot);
-static	pANTLR3_BASE_TREE	createTypeToken			(pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_COMMON_TOKEN fromToken);
-static	pANTLR3_BASE_TREE	dbgCreateTypeToken		(pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_COMMON_TOKEN fromToken);
-static	pANTLR3_BASE_TREE	createTypeTokenText		(pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_COMMON_TOKEN fromToken, pANTLR3_UINT8 text);
-static	pANTLR3_BASE_TREE	dbgCreateTypeTokenText	(pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_COMMON_TOKEN fromToken, pANTLR3_UINT8 text);
-static	pANTLR3_BASE_TREE	createTypeText			(pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_UINT8 text);
-static	pANTLR3_BASE_TREE	dbgCreateTypeText		(pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_UINT8 text);
-static	ANTLR3_UINT32		getType					(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t);
-static	void				setType					(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, ANTLR3_UINT32 type);
-static	pANTLR3_STRING		getText					(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t);
-static	void				setText					(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_STRING t);
-static	void				setText8				(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_UINT8 t);
-static	pANTLR3_BASE_TREE	getChild				(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, ANTLR3_UINT32 i);
-static	ANTLR3_UINT32		getChildCount			(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t);
-static	ANTLR3_UINT32		getUniqueID				(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t);
-static	ANTLR3_BOOLEAN		isNilNode				(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t);
-static	pANTLR3_STRING		makeDot					(pANTLR3_BASE_TREE_ADAPTOR adaptor, void * theTree);
-
-/** Given a pointer to a base tree adaptor structure (which is usually embedded in the
- *  super class the implements the tree adaptor used in the parse), initialize its
- *  function pointers and so on.
- */
-ANTLR3_API void
-antlr3BaseTreeAdaptorInit(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_DEBUG_EVENT_LISTENER	debugger)
-{
-	// Initialize the interface
-	//
-	if	(debugger == NULL)
-	{
-		adaptor->nilNode				= (void * (*)(pANTLR3_BASE_TREE_ADAPTOR)) 								
-																				nilNode;
-		adaptor->addChild				= (void   (*)(pANTLR3_BASE_TREE_ADAPTOR, void *, void *))								
-																				addChild;
-		adaptor->becomeRoot				= (void * (*)(pANTLR3_BASE_TREE_ADAPTOR, void *, void *))				
-																				becomeRoot;
-		adaptor->addChildToken			= (void   (*)(pANTLR3_BASE_TREE_ADAPTOR, void *, pANTLR3_COMMON_TOKEN))	
-																				addChildToken;
-		adaptor->becomeRootToken		= (void * (*)(pANTLR3_BASE_TREE_ADAPTOR, void *, void *))
-																				becomeRootToken;
-		adaptor->createTypeToken		= (void * (*)(pANTLR3_BASE_TREE_ADAPTOR, ANTLR3_UINT32, pANTLR3_COMMON_TOKEN))
-																				createTypeToken;
-		adaptor->createTypeTokenText	= (void * (*)(pANTLR3_BASE_TREE_ADAPTOR, ANTLR3_UINT32, pANTLR3_COMMON_TOKEN, pANTLR3_UINT8))
-																				createTypeTokenText;
-		adaptor->createTypeText			= (void * (*)(pANTLR3_BASE_TREE_ADAPTOR, ANTLR3_UINT32, pANTLR3_UINT8))
-																				createTypeText;
-		adaptor->dupTree				= (void * (*)(pANTLR3_BASE_TREE_ADAPTOR, void *))		 				
-																				dupTree;
-	}
-	else
-	{
-		adaptor->nilNode				= (void * (*)(pANTLR3_BASE_TREE_ADAPTOR))
-                                                                                dbgNil;
-		adaptor->addChild				= (void   (*)(pANTLR3_BASE_TREE_ADAPTOR, void *, void *))
-                                                                                dbgAddChild;
-		adaptor->becomeRoot				= (void * (*)(pANTLR3_BASE_TREE_ADAPTOR, void *, void *))
-																				dbgBecomeRoot;
-		adaptor->addChildToken			= (void   (*)(pANTLR3_BASE_TREE_ADAPTOR, void *, pANTLR3_COMMON_TOKEN))
-                                                                                dbgAddChildToken;
-		adaptor->becomeRootToken		= (void * (*)(pANTLR3_BASE_TREE_ADAPTOR, void *, void *))
-                                                                                dbgBecomeRootToken;
-		adaptor->createTypeToken		= (void * (*)(pANTLR3_BASE_TREE_ADAPTOR, ANTLR3_UINT32, pANTLR3_COMMON_TOKEN))
-                                                                                dbgCreateTypeToken;
-		adaptor->createTypeTokenText	= (void * (*)(pANTLR3_BASE_TREE_ADAPTOR, ANTLR3_UINT32, pANTLR3_COMMON_TOKEN, pANTLR3_UINT8))
-                                                                                dbgCreateTypeTokenText;
-		adaptor->createTypeText			= (void * (*)(pANTLR3_BASE_TREE_ADAPTOR, ANTLR3_UINT32, pANTLR3_UINT8))
-                                                                                dbgCreateTypeText;
-		adaptor->dupTree				= (void * (*)(pANTLR3_BASE_TREE_ADAPTOR, void *))
-                                                                                dbgDupTree;
-		debugger->adaptor				= adaptor;
-	}
-
-	adaptor->dupTreeTT				=  (void * (*)(pANTLR3_BASE_TREE_ADAPTOR, void *, void *))
-                                                                                dupTreeTT;
-	adaptor->rulePostProcessing		=  (void * (*)(pANTLR3_BASE_TREE_ADAPTOR, void *))
-                                                                                rulePostProcessing;
-	adaptor->getType				=  (ANTLR3_UINT32 (*)(pANTLR3_BASE_TREE_ADAPTOR, void *))
-                                                                                getType;
-	adaptor->setType				=  (void   (*)(pANTLR3_BASE_TREE_ADAPTOR, void *, ANTLR3_UINT32))
-																				setType;
-	adaptor->getText				=  (pANTLR3_STRING (*) (pANTLR3_BASE_TREE_ADAPTOR, void *))
-                                                                                getText;
-	adaptor->setText8				=  (void   (*)(pANTLR3_BASE_TREE_ADAPTOR, pANTLR3_UINT8))
-																				setText8;
-	adaptor->setText				=  (void   (*)(pANTLR3_BASE_TREE_ADAPTOR, pANTLR3_STRING))
-                                                                                setText;
-	adaptor->getChild				=  (void * (*)(pANTLR3_BASE_TREE_ADAPTOR, void *, ANTLR3_UINT32))
-                                                                                getChild;
-	adaptor->getChildCount			=  (ANTLR3_UINT32 (*)(pANTLR3_BASE_TREE_ADAPTOR, void *))
-                                                                                getChildCount;
-	adaptor->getUniqueID			=  (ANTLR3_UINT32 (*)(pANTLR3_BASE_TREE_ADAPTOR, void *))
-                                                                                getUniqueID;
-	adaptor->isNilNode				=  (ANTLR3_BOOLEAN (*)(pANTLR3_BASE_TREE_ADAPTOR, void *))
-                                                                                isNilNode;
-
-	adaptor->makeDot				=  (pANTLR3_STRING  (*)(pANTLR3_BASE_TREE_ADAPTOR, void *))
-																				makeDot;
-	
-	/* Remaining functions filled in by the caller.
-	 */
-	return;
-}
-
-static void
-defineDotNodes(pANTLR3_BASE_TREE_ADAPTOR adaptor, void * t, pANTLR3_STRING dotSpec )
-{
-	// How many nodes are we talking about?
-	//
-	int	nCount;
-	int i;
-    pANTLR3_BASE_TREE child;
-	char	buff[64];
-	pANTLR3_STRING	text;
-	int		j;
-
-
-
-
-
-	// Count the nodes
-	//
-	nCount = adaptor->getChildCount(adaptor, t);
-
-	if	(nCount == 0)
-	{
-		// This will already have been included as a child of another node
-		// so there is nothing to add.
-		//
-		return;
-	}
-
-	// For each child of the current tree, define a node using the
-	// memory address of the node to name it
-	//
-	for	(i = 0; i<nCount; i++)
-	{
-
-		// Pick up a pointer for the child
-		//
-		child = adaptor->getChild(adaptor, t, i);
-
-		// Name the node
-		//
-		sprintf(buff, "\tn%p[label=\"", child);
-		dotSpec->append8(dotSpec, buff);
-		text = adaptor->getText(adaptor, child);
-		for (j = 0; j < (ANTLR3_INT32)(text->len); j++)
-		{
-            switch(text->charAt(text, j))
-            {
-                case '"':
-
-                    dotSpec->append8(dotSpec, "\\\"");
-                    break;
-
-                case '\n':
-
-                    dotSpec->append8(dotSpec, "\\n");
-                    break;
-
-                case '\r':
-
-                    dotSpec->append8(dotSpec, "\\r");
-                    break;
-
-                default:
-
-                    dotSpec->addc(dotSpec, text->charAt(text, j));
-                    break;
-            }
-		}
-		dotSpec->append8(dotSpec, "\"]\n");
-
-		// And now define the children of this child (if any)
-		//
-		defineDotNodes(adaptor, child, dotSpec);
-	}
-	
-	// Done
-	//
-	return;
-}
-
-static void
-defineDotEdges(pANTLR3_BASE_TREE_ADAPTOR adaptor, void * t, pANTLR3_STRING dotSpec)
-{
-	// How many nodes are we talking about?
-	//
-	int	nCount;
-	int i;
-
-	if	(t == NULL)
-	{
-		// No tree, so do nothing
-		//
-		return;
-	}
-
-	// Count the nodes
-	//
-	nCount = adaptor->getChildCount(adaptor, t);
-
-	if	(nCount == 0)
-	{
-		// This will already have been included as a child of another node
-		// so there is nothing to add.
-		//
-		return;
-	}
-
-	// For each child, define an edge from this parent, then process
-	// and children of this child in the same way
-	//
-	for	(i=0; i<nCount; i++)
-	{
-		pANTLR3_BASE_TREE child;
-		char	buff[128];
-        pANTLR3_STRING text;
-        int                 j;
-
-		// Next child
-		//
-		child	= adaptor->getChild(adaptor, t, i);
-
-		// Create the edge relation
-		//
-		sprintf(buff, "\t\tn%p -> n%p\t\t// ",  t, child);
-        
-		dotSpec->append8(dotSpec, buff);
-
-		// Document the relationship
-		//
-        text = adaptor->getText(adaptor, t);
-		for (j = 0; j < (ANTLR3_INT32)(text->len); j++)
-        {
-                switch(text->charAt(text, j))
-                {
-                    case '"':
-
-                        dotSpec->append8(dotSpec, "\\\"");
-                        break;
-
-                    case '\n':
-
-                        dotSpec->append8(dotSpec, "\\n");
-                        break;
-
-                    case '\r':
-
-                        dotSpec->append8(dotSpec, "\\r");
-                        break;
-
-                    default:
-
-                        dotSpec->addc(dotSpec, text->charAt(text, j));
-                        break;
-                }
-        }
-
-        dotSpec->append8(dotSpec, " -> ");
-
-        text = adaptor->getText(adaptor, child);
-        for (j = 0; j < (ANTLR3_INT32)(text->len); j++)
-        {
-                switch(text->charAt(text, j))
-                {
-                    case '"':
-
-                        dotSpec->append8(dotSpec, "\\\"");
-                        break;
-
-                    case '\n':
-
-                        dotSpec->append8(dotSpec, "\\n");
-                        break;
-
-                    case '\r':
-
-                        dotSpec->append8(dotSpec, "\\r");
-                        break;
-
-                    default:
-
-                        dotSpec->addc(dotSpec, text->charAt(text, j));
-                        break;
-                }
-        }
-		dotSpec->append8(dotSpec, "\n");
-
-        
-		// Define edges for this child
-		//
-		defineDotEdges(adaptor, child, dotSpec);
-	}
-
-	// Done
-	//
-	return;
-}
-
-/// Produce a DOT specification for graphviz
-//
-static pANTLR3_STRING
-makeDot	(pANTLR3_BASE_TREE_ADAPTOR adaptor, void * theTree)
-{
-	// The string we are building up
-	//
-	pANTLR3_STRING		dotSpec;
-	char                buff[64];
-	pANTLR3_STRING      text;
-	int                 j;
-
-	dotSpec = adaptor->strFactory->newStr8
-		
-		(
-			adaptor->strFactory,
-
-			// Default look and feel
-			//
-			(pANTLR3_UINT8)
-			"digraph {\n\n"
-			"\tordering=out;\n"
-			"\tranksep=.4;\n"
-			"\tbgcolor=\"lightgrey\";  node [shape=box, fixedsize=false, fontsize=12, fontname=\"Helvetica-bold\", fontcolor=\"blue\"\n"
-			"\twidth=.25, height=.25, color=\"black\", fillcolor=\"white\", style=\"filled, solid, bold\"];\n\n"
-			"\tedge [arrowsize=.5, color=\"black\", style=\"bold\"]\n\n"
-		);
-
-    if	(theTree == NULL)
-	{
-		// No tree, so create a blank spec
-		//
-		dotSpec->append8(dotSpec, "n0[label=\"EMPTY TREE\"]\n");
-		return dotSpec;
-	}
-
-    sprintf(buff, "\tn%p[label=\"", theTree);
-	dotSpec->append8(dotSpec, buff);
-    text = adaptor->getText(adaptor, theTree);
-    for (j = 0; j < (ANTLR3_INT32)(text->len); j++)
-    {
-            switch(text->charAt(text, j))
-            {
-                case '"':
-
-                    dotSpec->append8(dotSpec, "\\\"");
-                    break;
-
-                case '\n':
-
-                    dotSpec->append8(dotSpec, "\\n");
-                    break;
-
-                case '\r':
-
-                    dotSpec->append8(dotSpec, "\\r");
-                    break;
-
-                default:
-
-                    dotSpec->addc(dotSpec, text->charAt(text, j));
-                    break;
-            }
-    }
-	dotSpec->append8(dotSpec, "\"]\n");
-
-	// First produce the node defintions
-	//
-	defineDotNodes(adaptor, theTree, dotSpec);
-	dotSpec->append8(dotSpec, "\n");
-	defineDotEdges(adaptor, theTree, dotSpec);
-	
-	// Terminate the spec
-	//
-	dotSpec->append8(dotSpec, "\n}");
-
-	// Result
-	//
-	return dotSpec;
-}
-
-
-/** Create and return a nil tree node (no token payload)
- */
-static	pANTLR3_BASE_TREE	
-nilNode	    (pANTLR3_BASE_TREE_ADAPTOR adaptor)
-{
-	return	adaptor->create(adaptor, NULL);
-}
-
-static	pANTLR3_BASE_TREE	
-dbgNil	    (pANTLR3_BASE_TREE_ADAPTOR adaptor)
-{
-	pANTLR3_BASE_TREE t;
-
-	t = adaptor->create				(adaptor, NULL);
-	adaptor->debugger->createNode	(adaptor->debugger, t);
-
-	return	t;
-}
-
-/** Return a duplicate of the entire tree (implementation provided by the 
- *  BASE_TREE interface.)
- */
-static	pANTLR3_BASE_TREE	
-dupTree  (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t)
-{
-	return	adaptor->dupTreeTT(adaptor, t, NULL);
-}
-
-pANTLR3_BASE_TREE
-dupTreeTT			(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_BASE_TREE parent)
-{
-	pANTLR3_BASE_TREE	newTree;
-	pANTLR3_BASE_TREE	child;
-	pANTLR3_BASE_TREE	newSubTree;
-	ANTLR3_UINT32		n;
-	ANTLR3_UINT32		i;
-
-	if	(t == NULL)
-	{
-		return NULL;
-	}
-	newTree = t->dupNode(t);
-
-	// Ensure new subtree root has parent/child index set
-	//
-	adaptor->setChildIndex		(adaptor, newTree, t->getChildIndex(t));
-	adaptor->setParent			(adaptor, newTree, parent);
-	n = adaptor->getChildCount	(adaptor, t);
-
-	for	(i=0; i < n; i++)
-	{
-		child = adaptor->getChild		(adaptor, t, i);
-		newSubTree = adaptor->dupTreeTT	(adaptor, child, t);
-		adaptor->addChild				(adaptor, newTree, newSubTree);
-	}
-	return	newTree;
-}
-
-/// Sends the required debugging events for duplicating a tree
-/// to the debugger.
-///
-static void
-simulateTreeConstruction(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE tree)
-{
-	ANTLR3_UINT32		n;
-	ANTLR3_UINT32		i;
-	pANTLR3_BASE_TREE	child;
-
-	// Send the create node event
-	//
-	adaptor->debugger->createNode(adaptor->debugger, tree);
-
-	n = adaptor->getChildCount(adaptor, tree);
-	for	(i = 0; i < n; i++)
-	{
-		child = adaptor->getChild(adaptor, tree, i);
-		simulateTreeConstruction(adaptor, child);
-		adaptor->debugger->addChild(adaptor->debugger, tree, child);
-	}
-}
-
-pANTLR3_BASE_TREE
-dbgDupTree		(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE tree)
-{
-	pANTLR3_BASE_TREE t;
-
-	// Call the normal dup tree mechanism first
-	//
-	t = adaptor->dupTreeTT(adaptor, tree, NULL);
-
-	// In order to tell the debugger what we have just done, we now
-	// simulate the tree building mechanism. THis will fire
-	// lots of debugging events to the client and look like we
-	// duped the tree..
-	//
-	simulateTreeConstruction(adaptor, t);
-
-	return t;
-}
-
-/** Add a child to the tree t.  If child is a flat tree (a list), make all
- *  in list children of t. Warning: if t has no children, but child does
- *  and child isNilNode then it is ok to move children to t via
- *  t.children = child.children; i.e., without copying the array.  This
- *  is for construction and I'm not sure it's completely general for
- *  a tree's addChild method to work this way.  Make sure you differentiate
- *  between your tree's addChild and this parser tree construction addChild
- *  if it's not ok to move children to t with a simple assignment.
- */
-static	void	
-addChild (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_BASE_TREE child)
-{
-	if	(t != NULL && child != NULL)
-	{
-		t->addChild(t, child);
-	}
-}
-static	void	
-dbgAddChild (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_BASE_TREE child)
-{
-	if	(t != NULL && child != NULL)
-	{
-		t->addChild(t, child);
-		adaptor->debugger->addChild(adaptor->debugger, t, child);
-	}
-}
-/** Use the adaptor implementation to add a child node with the supplied token
- */
-static	void		
-addChildToken		(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_COMMON_TOKEN child)
-{
-	if	(t != NULL && child != NULL)
-	{
-		adaptor->addChild(adaptor, t, adaptor->create(adaptor, child));
-	}
-}
-static	void		
-dbgAddChildToken		(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_COMMON_TOKEN child)
-{
-	pANTLR3_BASE_TREE	tc;
-
-	if	(t != NULL && child != NULL)
-	{
-		tc = adaptor->create(adaptor, child);
-		adaptor->addChild(adaptor, t, tc);
-		adaptor->debugger->addChild(adaptor->debugger, t, tc);
-	}
-}
-
-/** If oldRoot is a nil root, just copy or move the children to newRoot.
- *  If not a nil root, make oldRoot a child of newRoot.
- *
- * \code
- *    old=^(nil a b c), new=r yields ^(r a b c)
- *    old=^(a b c), new=r yields ^(r ^(a b c))
- * \endcode
- *
- *  If newRoot is a nil-rooted single child tree, use the single
- *  child as the new root node.
- *
- * \code
- *    old=^(nil a b c), new=^(nil r) yields ^(r a b c)
- *    old=^(a b c), new=^(nil r) yields ^(r ^(a b c))
- * \endcode
- *
- *  If oldRoot was null, it's ok, just return newRoot (even if isNilNode).
- *
- * \code
- *    old=null, new=r yields r
- *    old=null, new=^(nil r) yields ^(nil r)
- * \endcode
- *
- *  Return newRoot.  Throw an exception if newRoot is not a
- *  simple node or nil root with a single child node--it must be a root
- *  node.  If newRoot is <code>^(nil x)</endcode> return x as newRoot.
- *
- *  Be advised that it's ok for newRoot to point at oldRoot's
- *  children; i.e., you don't have to copy the list.  We are
- *  constructing these nodes so we should have this control for
- *  efficiency.
- */
-static	pANTLR3_BASE_TREE	
-becomeRoot	(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE newRootTree, pANTLR3_BASE_TREE oldRootTree)
-{
-    pANTLR3_BASE_TREE saveRoot;
-
-	/* Protect against tree rewrites if we are in some sort of error
-	 * state, but have tried to recover. In C we can end up with a null pointer
-	 * for a tree that was not produced.
-	 */
-	if	(newRootTree == NULL)
-	{
-		return	oldRootTree;
-	}
-
-	/* root is just the new tree as is if there is no
-	 * current root tree.
-	 */
-	if	(oldRootTree == NULL)
-	{
-		return	newRootTree;
-	}
-
-	/* Produce ^(nil real-node)
-	 */
-	if	(newRootTree->isNilNode(newRootTree))
-	{
-		if	(newRootTree->getChildCount(newRootTree) > 1)
-		{
-			/* TODO: Handle tree exceptions 
-			 */
-			ANTLR3_FPRINTF(stderr, "More than one node as root! TODO: Create tree exception handling\n");
-			return newRootTree;
-		}
-
-		/* The new root is the first child, keep track of the original newRoot
-         * because if it was a Nil Node, then we can reuse it now.
-		 */
-        saveRoot    = newRootTree;
-		newRootTree = newRootTree->getChild(newRootTree, 0);
-
-        // Reclaim the old nilNode()
-        //
-        saveRoot->reuse(saveRoot);
-	}
-
-	/* Add old root into new root. addChild takes care of the case where oldRoot
-	 * is a flat list (nill rooted tree). All children of oldroot are added to
-	 * new root.
-	 */
-	newRootTree->addChild(newRootTree, oldRootTree);
-
-    // If the oldroot tree was a nil node, then we know at this point
-    // it has become orphaned by the rewrite logic, so we tell it to do
-    // whatever it needs to do to be reused.
-    //
-    if  (oldRootTree->isNilNode(oldRootTree))
-    {
-        // We have taken an old Root Tree and appended all its children to the new
-        // root. In addition though it was a nil node, which means the generated code
-        // will not reuse it again, so we will reclaim it here. First we want to zero out
-        // any pointers it was carrying around. We are just the baseTree handler so we
-        // don't know necessarilly know how to do this for the real node, we just ask the tree itself
-        // to do it.
-        //
-        oldRootTree->reuse(oldRootTree);
-    }
-	/* Always returns new root structure
-	 */
-	return	newRootTree;
-
-}
-static	pANTLR3_BASE_TREE	
-dbgBecomeRoot	(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE newRootTree, pANTLR3_BASE_TREE oldRootTree)
-{
-	pANTLR3_BASE_TREE t;
-	
-	t = becomeRoot(adaptor, newRootTree, oldRootTree);
-
-	adaptor->debugger->becomeRoot(adaptor->debugger, newRootTree, oldRootTree);
-
-	return t;
-}
-/** Transform ^(nil x) to x 
- */
-static	pANTLR3_BASE_TREE	
-   rulePostProcessing	(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE root)
-{
-    pANTLR3_BASE_TREE saveRoot;
-
-    // Keep track of the root we are given. If it is a nilNode, then we
-    // can reuse it rather than orphaning it!
-    //
-    saveRoot = root;
-
-	if (root != NULL && root->isNilNode(root))
-	{
-		if	(root->getChildCount(root) == 0)
-		{
-			root = NULL;
-		}
-		else if	(root->getChildCount(root) == 1)
-		{
-			root = root->getChild(root, 0);
-			root->setParent(root, NULL);
-			root->setChildIndex(root, -1);
-
-            // The root we were given was a nil node, wiht one child, which means it has
-            // been abandoned and would be lost in the node factory. However
-            // nodes can be flagged as resuable to prevent this terrible waste
-            //
-            saveRoot->reuse(saveRoot);
-		}
-	}
-
-	return root;
-}
- 
-/** Use the adaptor interface to set a new tree node with the supplied token
- *  to the root of the tree.
- */
-static	pANTLR3_BASE_TREE	
-   becomeRootToken	(pANTLR3_BASE_TREE_ADAPTOR adaptor, void * newRoot, pANTLR3_BASE_TREE oldRoot)
-{
-	return	adaptor->becomeRoot(adaptor, adaptor->create(adaptor, newRoot), oldRoot);
-}
-static	pANTLR3_BASE_TREE	
-dbgBecomeRootToken	(pANTLR3_BASE_TREE_ADAPTOR adaptor, void * newRoot, pANTLR3_BASE_TREE oldRoot)
-{
-	pANTLR3_BASE_TREE	t;
-
-	t =	adaptor->becomeRoot(adaptor, adaptor->create(adaptor, newRoot), oldRoot);
-
-	adaptor->debugger->becomeRoot(adaptor->debugger,t, oldRoot);
-
-	return t;
-}
-
-/** Use the super class supplied create() method to create a new node
- *  from the supplied token.
- */
-static	pANTLR3_BASE_TREE	
-createTypeToken	(pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_COMMON_TOKEN fromToken)
-{
-	/* Create the new token
-	 */
-	fromToken = adaptor->createTokenFromToken(adaptor, fromToken);
-
-	/* Set the type of the new token to that supplied
-	 */
-	fromToken->setType(fromToken, tokenType);
-
-	/* Return a new node based upon this token
-	 */
-	return	adaptor->create(adaptor, fromToken);
-}
-static	pANTLR3_BASE_TREE	
-dbgCreateTypeToken	(pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_COMMON_TOKEN fromToken)
-{
-	pANTLR3_BASE_TREE t;
-
-	t = createTypeToken(adaptor, tokenType, fromToken);
-
-	adaptor->debugger->createNode(adaptor->debugger, t);
-
-	return t;
-}
-
-static	pANTLR3_BASE_TREE	
-createTypeTokenText	(pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_COMMON_TOKEN fromToken, pANTLR3_UINT8 text)
-{
-	/* Create the new token
-	 */
-	fromToken = adaptor->createTokenFromToken(adaptor, fromToken);
-
-	/* Set the type of the new token to that supplied
-	 */
-	fromToken->setType(fromToken, tokenType);
-
-	/* Set the text of the token accordingly
-	 */
-	fromToken->setText8(fromToken, text);
-
-	/* Return a new node based upon this token
-	 */
-	return	adaptor->create(adaptor, fromToken);
-}
-static	pANTLR3_BASE_TREE	
-dbgCreateTypeTokenText	(pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_COMMON_TOKEN fromToken, pANTLR3_UINT8 text)
-{
-	pANTLR3_BASE_TREE t;
-
-	t = createTypeTokenText(adaptor, tokenType, fromToken, text);
-
-	adaptor->debugger->createNode(adaptor->debugger, t);
-
-	return t;
-}
-
-static	pANTLR3_BASE_TREE	
-   createTypeText	(pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_UINT8 text)
-{
-	pANTLR3_COMMON_TOKEN	fromToken;
-
-	/* Create the new token
-	 */
-	fromToken = adaptor->createToken(adaptor, tokenType, text);
-
-	/* Return a new node based upon this token
-	 */
-	return	adaptor->create(adaptor, fromToken);
-}
-static	pANTLR3_BASE_TREE	
-   dbgCreateTypeText	(pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_UINT8 text)
-{
-	pANTLR3_BASE_TREE t;
-
-	t = createTypeText(adaptor, tokenType, text);
-
-	adaptor->debugger->createNode(adaptor->debugger, t);
-
-	return t;
-
-}
-/** Dummy implementation - will be supplied by super class
- */
-static	ANTLR3_UINT32	
-   getType		(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t)
-{
-	return	0;
-}
-
-/** Dummy implementation - will be supplied by super class
- */
-static	void		
-   setType		(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, ANTLR3_UINT32 type)
-{
-	ANTLR3_FPRINTF(stderr, "Internal error - implementor of superclass containing ANTLR3_TREE_ADAPTOR did not implement setType()\n");
-}
-
-/** Dummy implementation - will be supplied by super class
- */
-static	pANTLR3_STRING	
-   getText		(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t)
-{
-	ANTLR3_FPRINTF(stderr, "Internal error - implementor of superclass containing ANTLR3_TREE_ADAPTOR did not implement getText()\n");
-	return	NULL;
-}
-
-/** Dummy implementation - will be supplied by super class
- */
-static	void		
-   setText		(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_STRING t)
-{
-	ANTLR3_FPRINTF(stderr, "Internal error - implementor of superclass containing ANTLR3_TREE_ADAPTOR did not implement setText()\n");
-}
-/** Dummy implementation - will be supplied by super class
- */
-static	void		
-setText8		(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_UINT8 t)
-{
-	ANTLR3_FPRINTF(stderr, "Internal error - implementor of superclass containing ANTLR3_TREE_ADAPTOR did not implement setText()\n");
-}
-
-static	pANTLR3_BASE_TREE	
-   getChild		(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE tree, ANTLR3_UINT32 i)
-{
-	ANTLR3_FPRINTF(stderr, "Internal error - implementor of superclass containing ANTLR3_TREE_ADAPTOR did not implement getChild()\n");
-	return NULL;
-}
-
-static	ANTLR3_UINT32	
-   getChildCount	(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE tree)
-{
-	ANTLR3_FPRINTF(stderr, "Internal error - implementor of superclass containing ANTLR3_TREE_ADAPTOR did not implement getChildCount()\n");
-	return 0;
-}
-
-/** Returns a uniqueID for the node. Because this is the C implementation
- *  we can just use its address suitably converted/cast to an integer.
- */
-static	ANTLR3_UINT32	
-   getUniqueID		(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE node)
-{
-	return	ANTLR3_UINT32_CAST(node);
-}
-
-static	ANTLR3_BOOLEAN
-isNilNode					(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t)
-{
-	return t->isNilNode(t);
-}
diff --git a/antlr-3.4/runtime/C/src/antlr3bitset.c b/antlr-3.4/runtime/C/src/antlr3bitset.c
deleted file mode 100644
index 4e63c79..0000000
--- a/antlr-3.4/runtime/C/src/antlr3bitset.c
+++ /dev/null
@@ -1,681 +0,0 @@
-///
-/// \file
-/// Contains the C implementation of ANTLR3 bitsets as adapted from Terence Parr's
-/// Java implementation.
-///
-
-// [The "BSD licence"]
-// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC
-// http://www.temporal-wave.com
-// http://www.linkedin.com/in/jimidle
-//
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// 1. Redistributions of source code must retain the above copyright
-//    notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-//    notice, this list of conditions and the following disclaimer in the
-//    documentation and/or other materials provided with the distribution.
-// 3. The name of the author may not be used to endorse or promote products
-//    derived from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#include    <antlr3bitset.h>
-
-// External interface
-//
-
-static	pANTLR3_BITSET  antlr3BitsetClone		(pANTLR3_BITSET inSet);
-static	pANTLR3_BITSET  antlr3BitsetOR			(pANTLR3_BITSET bitset1, pANTLR3_BITSET bitset2);
-static	void			antlr3BitsetORInPlace	(pANTLR3_BITSET bitset, pANTLR3_BITSET bitset2);
-static	ANTLR3_UINT32	antlr3BitsetSize		(pANTLR3_BITSET bitset);
-static	void			antlr3BitsetAdd			(pANTLR3_BITSET bitset, ANTLR3_INT32 bit);
-static	ANTLR3_BOOLEAN	antlr3BitsetEquals		(pANTLR3_BITSET bitset1, pANTLR3_BITSET bitset2);
-static	ANTLR3_BOOLEAN	antlr3BitsetMember		(pANTLR3_BITSET bitset, ANTLR3_UINT32 bit);
-static	ANTLR3_UINT32	antlr3BitsetNumBits		(pANTLR3_BITSET bitset);
-static	void			antlr3BitsetRemove		(pANTLR3_BITSET bitset, ANTLR3_UINT32 bit);
-static	ANTLR3_BOOLEAN	antlr3BitsetIsNil		(pANTLR3_BITSET bitset);
-static	pANTLR3_INT32	antlr3BitsetToIntList	(pANTLR3_BITSET bitset);
-
-// Local functions
-//
-static	void			growToInclude		(pANTLR3_BITSET bitset, ANTLR3_INT32 bit);
-static	void			grow				(pANTLR3_BITSET bitset, ANTLR3_INT32 newSize);
-static	ANTLR3_UINT64	bitMask				(ANTLR3_UINT32 bitNumber);
-static	ANTLR3_UINT32	numWordsToHold		(ANTLR3_UINT32 bit);
-static	ANTLR3_UINT32	wordNumber			(ANTLR3_UINT32 bit);
-static	void			antlr3BitsetFree	(pANTLR3_BITSET bitset);
-
-static void
-antlr3BitsetFree(pANTLR3_BITSET bitset)
-{
-    if	(bitset->blist.bits != NULL)
-    {
-		ANTLR3_FREE(bitset->blist.bits);
-		bitset->blist.bits = NULL;
-    }
-    ANTLR3_FREE(bitset);
-
-    return;
-}
-
-ANTLR3_API pANTLR3_BITSET
-antlr3BitsetNew(ANTLR3_UINT32 numBits)
-{
-	pANTLR3_BITSET  bitset;
-
-	ANTLR3_UINT32   numelements;
-
-	// Allocate memory for the bitset structure itself
-	//
-	bitset  = (pANTLR3_BITSET) ANTLR3_MALLOC((size_t)sizeof(ANTLR3_BITSET));
-
-	if	(bitset == NULL)
-	{
-		return	NULL;
-	}
-
-	// Avoid memory thrashing at the up front expense of a few bytes
-	//
-	if	(numBits < (8 * ANTLR3_BITSET_BITS))
-	{
-		numBits = 8 * ANTLR3_BITSET_BITS;
-	}
-
-	// No we need to allocate the memory for the number of bits asked for
-	// in multiples of ANTLR3_UINT64. 
-	//
-	numelements	= ((numBits -1) >> ANTLR3_BITSET_LOG_BITS) + 1;
-
-	bitset->blist.bits    = (pANTLR3_BITWORD) ANTLR3_MALLOC((size_t)(numelements * sizeof(ANTLR3_BITWORD)));
-	memset(bitset->blist.bits, 0, (size_t)(numelements * sizeof(ANTLR3_BITWORD)));
-	bitset->blist.length  = numelements;
-
-	if	(bitset->blist.bits == NULL)
-	{
-		ANTLR3_FREE(bitset);
-		return	NULL;
-	}
-
-	antlr3BitsetSetAPI(bitset);
-
-
-	// All seems good
-	//
-	return  bitset;
-}
-
-ANTLR3_API void
-antlr3BitsetSetAPI(pANTLR3_BITSET bitset)
-{
-    bitset->clone		=    antlr3BitsetClone;
-    bitset->bor			=    antlr3BitsetOR;
-    bitset->borInPlace	=    antlr3BitsetORInPlace;
-    bitset->size		=    antlr3BitsetSize;
-    bitset->add			=    antlr3BitsetAdd;
-    bitset->grow		=    grow;
-    bitset->equals		=    antlr3BitsetEquals;
-    bitset->isMember	=    antlr3BitsetMember;
-    bitset->numBits		=    antlr3BitsetNumBits;
-    bitset->remove		=    antlr3BitsetRemove;
-    bitset->isNilNode		=    antlr3BitsetIsNil;
-    bitset->toIntList	=    antlr3BitsetToIntList;
-
-    bitset->free		=    antlr3BitsetFree;
-}
-
-ANTLR3_API pANTLR3_BITSET
-antlr3BitsetCopy(pANTLR3_BITSET_LIST blist)
-{
-    pANTLR3_BITSET  bitset;
-	int				numElements;
-
-    // Allocate memory for the bitset structure itself
-    //
-    bitset  = (pANTLR3_BITSET) ANTLR3_MALLOC((size_t)sizeof(ANTLR3_BITSET));
-
-    if	(bitset == NULL)
-    {
-		return	NULL;
-    }
-
-	numElements = blist->length;
-
-    // Avoid memory thrashing at the expense of a few more bytes
-    //
-    if	(numElements < 8)
-    {
-		numElements = 8;
-    }
-
-    // Install the length in ANTLR3_UINT64 units
-    //
-    bitset->blist.length  = numElements;
-
-    bitset->blist.bits    = (pANTLR3_BITWORD)ANTLR3_MALLOC((size_t)(numElements * sizeof(ANTLR3_BITWORD)));
-
-    if	(bitset->blist.bits == NULL)
-    {
-		ANTLR3_FREE(bitset);
-		return	NULL;
-    }
-
-	ANTLR3_MEMCPY(bitset->blist.bits, blist->bits, (ANTLR3_UINT64)(numElements * sizeof(ANTLR3_BITWORD)));
-
-    // All seems good
-    //
-    return  bitset;
-}
-
-static pANTLR3_BITSET
-antlr3BitsetClone(pANTLR3_BITSET inSet)
-{
-    pANTLR3_BITSET  bitset;
-
-    // Allocate memory for the bitset structure itself
-    //
-    bitset  = antlr3BitsetNew(ANTLR3_BITSET_BITS * inSet->blist.length);
-
-    if	(bitset == NULL)
-    {
-		return	NULL;
-    }
-
-    // Install the actual bits in the source set
-    //
-    ANTLR3_MEMCPY(bitset->blist.bits, inSet->blist.bits, (ANTLR3_UINT64)(inSet->blist.length * sizeof(ANTLR3_BITWORD)));
-
-    // All seems good
-    //
-    return  bitset;
-}
-
-
-ANTLR3_API pANTLR3_BITSET
-antlr3BitsetList(pANTLR3_HASH_TABLE list)
-{
-    pANTLR3_BITSET		bitSet;
-    pANTLR3_HASH_ENUM	en;
-    pANTLR3_HASH_KEY	key;
-    ANTLR3_UINT64		bit;
-
-    // We have no idea what exactly is in the list
-    // so create a default bitset and then just add stuff
-    // as we enumerate.
-    //
-    bitSet  = antlr3BitsetNew(0);
-
-    en		= antlr3EnumNew(list);
-
-    while   (en->next(en, &key, (void **)(&bit)) == ANTLR3_SUCCESS)
-    {
-		bitSet->add(bitSet, (ANTLR3_UINT32)bit);
-    }
-    en->free(en);
-
-    return NULL;
-}
-
-///
-/// \brief
-/// Creates a new bitset with at least one 64 bit bset of bits, but as
-/// many 64 bit sets as are required.
-///
-/// \param[in] bset
-/// A variable number of bits to add to the set, ending in -1 (impossible bit).
-/// 
-/// \returns
-/// A new bit set with all of the specified bitmaps in it and the API
-/// initialized.
-/// 
-/// Call as:
-///  - pANTLR3_BITSET = antlrBitsetLoad(bset, bset11, ..., -1);
-///  - pANTLR3_BITSET = antlrBitsetOf(-1);  Create empty bitset 
-///
-/// \remarks
-/// Stdargs function - must supply -1 as last paremeter, which is NOT
-/// added to the set.
-/// 
-///
-ANTLR3_API pANTLR3_BITSET
-antlr3BitsetLoad(pANTLR3_BITSET_LIST inBits)
-{
-	pANTLR3_BITSET  bitset;
-	ANTLR3_UINT32  count;
-
-	// Allocate memory for the bitset structure itself
-	// the input parameter is the bit number (0 based)
-	// to include in the bitset, so we need at at least
-	// bit + 1 bits. If any arguments indicate a 
-	// a bit higher than the default number of bits (0 means default size)
-	// then Add() will take care
-	// of it.
-	//
-	bitset  = antlr3BitsetNew(0);
-
-	if	(bitset == NULL)
-	{
-		return	NULL;
-	}
-
-	if	(inBits != NULL)
-	{
-		// Now we can add the element bits into the set
-		//
-		count=0;
-		while (count < inBits->length)
-		{
-			if  (bitset->blist.length <= count)
-			{
-				bitset->grow(bitset, count+1);
-			}
-
-			bitset->blist.bits[count] = *((inBits->bits)+count);
-			count++;
-		}
-	}
-
-	// return the new bitset
-	//
-	return  bitset;
-}
-
-///
-/// \brief
-/// Creates a new bitset with at least one element, but as
-/// many elements are required.
-/// 
-/// \param[in] bit
-/// A variable number of bits to add to the set, ending in -1 (impossible bit).
-/// 
-/// \returns
-/// A new bit set with all of the specified elements added into it.
-/// 
-/// Call as:
-///  - pANTLR3_BITSET = antlrBitsetOf(n, n1, n2, -1);
-///  - pANTLR3_BITSET = antlrBitsetOf(-1);  Create empty bitset 
-///
-/// \remarks
-/// Stdargs function - must supply -1 as last paremeter, which is NOT
-/// added to the set.
-/// 
-///
-ANTLR3_API pANTLR3_BITSET
-antlr3BitsetOf(ANTLR3_INT32 bit, ...)
-{
-    pANTLR3_BITSET  bitset;
-
-    va_list ap;
-
-    // Allocate memory for the bitset structure itself
-    // the input parameter is the bit number (0 based)
-    // to include in the bitset, so we need at at least
-    // bit + 1 bits. If any arguments indicate a 
-    // a bit higher than the default number of bits (0 menas default size)
-    // then Add() will take care
-    // of it.
-    //
-    bitset  = antlr3BitsetNew(0);
-
-    if	(bitset == NULL)
-    {
-		return	NULL;
-    }
-
-    // Now we can add the element bits into the set
-    //
-    va_start(ap, bit);
-    while   (bit != -1)
-    {
-		antlr3BitsetAdd(bitset, bit);
-		bit = va_arg(ap, ANTLR3_UINT32);
-    }
-    va_end(ap);
-
-    // return the new bitset
-    //
-    return  bitset;
-}
-
-static pANTLR3_BITSET
-antlr3BitsetOR(pANTLR3_BITSET bitset1, pANTLR3_BITSET bitset2)
-{
-    pANTLR3_BITSET  bitset;
-
-    if	(bitset1 == NULL)
-    {
-		return antlr3BitsetClone(bitset2);
-    }
-
-    if	(bitset2 == NULL)
-    {
-		return	antlr3BitsetClone(bitset1);
-    }
-
-    // Allocate memory for the newly ordered bitset structure itself.
-    //
-    bitset  = antlr3BitsetClone(bitset1);
-    
-    antlr3BitsetORInPlace(bitset, bitset2);
-
-    return  bitset;
-
-}
-
-static void
-antlr3BitsetAdd(pANTLR3_BITSET bitset, ANTLR3_INT32 bit)
-{
-    ANTLR3_UINT32   word;
-
-    word    = wordNumber(bit);
-
-    if	(word	>= bitset->blist.length)
-    {
-		growToInclude(bitset, bit);
-    }
-
-    bitset->blist.bits[word] |= bitMask(bit);
-
-}
-
-static void
-grow(pANTLR3_BITSET bitset, ANTLR3_INT32 newSize)
-{
-    pANTLR3_BITWORD   newBits;
-
-    // Space for newly sized bitset - TODO: come back to this and use realloc?, it may
-    // be more efficient...
-    //
-    newBits = (pANTLR3_BITWORD) ANTLR3_CALLOC(1, (size_t)(newSize * sizeof(ANTLR3_BITWORD)));
-    if	(bitset->blist.bits != NULL)
-    {
-		// Copy existing bits
-		//
-		ANTLR3_MEMCPY((void *)newBits, (const void *)bitset->blist.bits, (size_t)(bitset->blist.length * sizeof(ANTLR3_BITWORD)));
-
-		// Out with the old bits... de de de derrr
-		//
-		ANTLR3_FREE(bitset->blist.bits);
-    }
-
-    // In with the new bits... keerrrang.
-    //
-    bitset->blist.bits      = newBits;
-    bitset->blist.length    = newSize;
-}
-
-static void
-growToInclude(pANTLR3_BITSET bitset, ANTLR3_INT32 bit)
-{
-	ANTLR3_UINT32	bl;
-	ANTLR3_UINT32	nw;
-
-	bl = (bitset->blist.length << 1);
-	nw = numWordsToHold(bit);
-
-	if	(bl > nw)
-	{
-		bitset->grow(bitset, bl);
-	}
-	else
-	{
-		bitset->grow(bitset, nw);
-	}
-}
-
-static void
-antlr3BitsetORInPlace(pANTLR3_BITSET bitset, pANTLR3_BITSET bitset2)
-{
-    ANTLR3_UINT32   minimum;
-    ANTLR3_UINT32   i;
-
-    if	(bitset2 == NULL)
-    {
-		return;
-    }
-
-
-    // First make sure that the target bitset is big enough
-    // for the new bits to be ored in.
-    //
-    if	(bitset->blist.length < bitset2->blist.length)
-    {
-		growToInclude(bitset, (bitset2->blist.length * sizeof(ANTLR3_BITWORD)));
-    }
-    
-    // Or the miniimum number of bits after any resizing went on
-    //
-    if	(bitset->blist.length < bitset2->blist.length)
-	{
-		minimum = bitset->blist.length;
-	}
-	else
-	{
-		minimum = bitset2->blist.length;
-	}
-
-    for	(i = minimum; i > 0; i--)
-    {
-		bitset->blist.bits[i-1] |= bitset2->blist.bits[i-1];
-    }
-}
-
-static ANTLR3_UINT64
-bitMask(ANTLR3_UINT32 bitNumber)
-{
-    return  ((ANTLR3_UINT64)1) << (bitNumber & (ANTLR3_BITSET_MOD_MASK));
-}
-
-static ANTLR3_UINT32
-antlr3BitsetSize(pANTLR3_BITSET bitset)
-{
-    ANTLR3_UINT32   degree;
-    ANTLR3_INT32   i;
-    ANTLR3_INT8    bit;
-    
-    // TODO: Come back to this, it may be faster to & with 0x01
-    // then shift right a copy of the 4 bits, than shift left a constant of 1.
-    // But then again, the optimizer might just work this out
-    // anyway.
-    //
-    degree  = 0;
-    for	(i = bitset->blist.length - 1; i>= 0; i--)
-    {
-		if  (bitset->blist.bits[i] != 0)
-		{
-			for	(bit = ANTLR3_BITSET_BITS - 1; bit >= 0; bit--)
-			{
-				if  ((bitset->blist.bits[i] & (((ANTLR3_BITWORD)1) << bit)) != 0)
-				{
-					degree++;
-				}
-			}
-		}
-    }
-    return degree;
-}
-
-static ANTLR3_BOOLEAN
-antlr3BitsetEquals(pANTLR3_BITSET bitset1, pANTLR3_BITSET bitset2)
-{
-    ANTLR3_INT32   minimum;
-    ANTLR3_INT32   i;
-
-    if	(bitset1 == NULL || bitset2 == NULL)
-    {
-	return	ANTLR3_FALSE;
-    }
-
-    // Work out the minimum comparison set
-    //
-    if	(bitset1->blist.length < bitset2->blist.length)
-    {
-		minimum = bitset1->blist.length;
-    }
-    else
-    {
-		minimum = bitset2->blist.length;
-    }
-
-    // Make sure explict in common bits are equal
-    //
-    for	(i = minimum - 1; i >=0 ; i--)
-    {
-		if  (bitset1->blist.bits[i] != bitset2->blist.bits[i])
-		{
-			return  ANTLR3_FALSE;
-		}
-    }
-
-    // Now make sure the bits of the larger set are all turned
-    // off.
-    //
-    if	(bitset1->blist.length > (ANTLR3_UINT32)minimum)
-    {
-		for (i = minimum ; (ANTLR3_UINT32)i < bitset1->blist.length; i++)
-		{
-			if	(bitset1->blist.bits[i] != 0)
-			{
-				return	ANTLR3_FALSE;
-			}
-		}
-    }
-    else if (bitset2->blist.length > (ANTLR3_UINT32)minimum)
-    {
-		for (i = minimum; (ANTLR3_UINT32)i < bitset2->blist.length; i++)
-		{
-			if	(bitset2->blist.bits[i] != 0)
-			{
-				return	ANTLR3_FALSE;
-			}
-		}
-    }
-
-    return  ANTLR3_TRUE;
-}
-
-static ANTLR3_BOOLEAN
-antlr3BitsetMember(pANTLR3_BITSET bitset, ANTLR3_UINT32 bit)
-{
-    ANTLR3_UINT32    wordNo;
-
-    wordNo  = wordNumber(bit);
-
-    if	(wordNo >= bitset->blist.length)
-    {
-		return	ANTLR3_FALSE;
-    }
-    
-    if	((bitset->blist.bits[wordNo] & bitMask(bit)) == 0)
-    {
-		return	ANTLR3_FALSE;
-    }
-    else
-    {
-		return	ANTLR3_TRUE;
-    }
-}
-
-static void
-antlr3BitsetRemove(pANTLR3_BITSET bitset, ANTLR3_UINT32 bit)
-{
-    ANTLR3_UINT32    wordNo;
-
-    wordNo  = wordNumber(bit);
-
-    if	(wordNo < bitset->blist.length)
-    {
-		bitset->blist.bits[wordNo] &= ~(bitMask(bit));
-    }
-}
-static ANTLR3_BOOLEAN
-antlr3BitsetIsNil(pANTLR3_BITSET bitset)
-{
-   ANTLR3_INT32    i;
-
-   for	(i = bitset->blist.length -1; i>= 0; i--)
-   {
-       if   (bitset->blist.bits[i] != 0)
-       {
-			return ANTLR3_FALSE;
-       }
-   }
-   
-   return   ANTLR3_TRUE;
-}
-
-static ANTLR3_UINT32
-numWordsToHold(ANTLR3_UINT32 bit)
-{
-    return  (bit >> ANTLR3_BITSET_LOG_BITS) + 1;
-}
-
-static	ANTLR3_UINT32
-wordNumber(ANTLR3_UINT32 bit)
-{
-    return  bit >> ANTLR3_BITSET_LOG_BITS;
-}
-
-static ANTLR3_UINT32
-antlr3BitsetNumBits(pANTLR3_BITSET bitset)
-{
-    return  bitset->blist.length << ANTLR3_BITSET_LOG_BITS;
-}
-
-/** Produce an integer list of all the bits that are turned on
- *  in this bitset. Used for error processing in the main as the bitset
- *  reresents a number of integer tokens which we use for follow sets
- *  and so on.
- *
- *  The first entry is the number of elements following in the list.
- */
-static	pANTLR3_INT32	
-antlr3BitsetToIntList	(pANTLR3_BITSET bitset)
-{
-    ANTLR3_UINT32   numInts;	    // How many integers we will need
-    ANTLR3_UINT32   numBits;	    // How many bits are in the set
-    ANTLR3_UINT32   i;
-    ANTLR3_UINT32   index;
-
-    pANTLR3_INT32  intList;
-
-    numInts = bitset->size(bitset) + 1;
-    numBits = bitset->numBits(bitset);
- 
-    intList = (pANTLR3_INT32)ANTLR3_MALLOC(numInts * sizeof(ANTLR3_INT32));
-
-    if	(intList == NULL)
-    {
-		return NULL;	// Out of memory
-    }
-
-    intList[0] = numInts;
-
-    // Enumerate the bits that are turned on
-    //
-    for	(i = 0, index = 1; i<numBits; i++)
-    {
-		if  (bitset->isMember(bitset, i) == ANTLR3_TRUE)
-		{
-			intList[index++]    = i;
-		}
-    }
-
-    // Result set
-    //
-    return  intList;
-}
-
diff --git a/antlr-3.4/runtime/C/src/antlr3collections.c b/antlr-3.4/runtime/C/src/antlr3collections.c
deleted file mode 100644
index d9e22e9..0000000
--- a/antlr-3.4/runtime/C/src/antlr3collections.c
+++ /dev/null
@@ -1,2741 +0,0 @@
-/// \file
-/// Provides a number of useful functions that are roughly equivalent
-/// to java HashTable and List for the purposes of Antlr 3 C runtime.
-/// Also useable by the C programmer for things like symbol tables pointers
-/// and so on.
-///
-///
-
-// [The "BSD licence"]
-// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC
-// http://www.temporal-wave.com
-// http://www.linkedin.com/in/jimidle
-//
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// 1. Redistributions of source code must retain the above copyright
-//    notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-//    notice, this list of conditions and the following disclaimer in the
-//    documentation and/or other materials provided with the distribution.
-// 3. The name of the author may not be used to endorse or promote products
-//    derived from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#include    <antlr3.h>
-
-#include "antlr3collections.h"
-
-// Interface functions for hash table
-//
-
-// String based keys
-//
-static void					antlr3HashDelete    (pANTLR3_HASH_TABLE table, void * key);
-static void *				antlr3HashGet	(pANTLR3_HASH_TABLE table, void * key);
-static pANTLR3_HASH_ENTRY   antlr3HashRemove    (pANTLR3_HASH_TABLE table, void * key);
-static ANTLR3_INT32			antlr3HashPut	(pANTLR3_HASH_TABLE table, void * key, void * element, void (ANTLR3_CDECL *freeptr)(void *));
-
-// Integer based keys (Lists and so on)
-//
-static void					antlr3HashDeleteI   (pANTLR3_HASH_TABLE table, ANTLR3_INTKEY key);
-static void *				antlr3HashGetI	(pANTLR3_HASH_TABLE table, ANTLR3_INTKEY key);
-static pANTLR3_HASH_ENTRY   antlr3HashRemoveI   (pANTLR3_HASH_TABLE table, ANTLR3_INTKEY key);
-static ANTLR3_INT32			antlr3HashPutI	(pANTLR3_HASH_TABLE table, ANTLR3_INTKEY key, void * element, void (ANTLR3_CDECL *freeptr)(void *));
-
-static void					antlr3HashFree	(pANTLR3_HASH_TABLE table);
-static ANTLR3_UINT32	    antlr3HashSize	(pANTLR3_HASH_TABLE table);
-
-// -----------
-
-// Interface functions for enumeration
-//
-static int	    antlr3EnumNext	    (pANTLR3_HASH_ENUM en, pANTLR3_HASH_KEY * key, void ** data);
-static void	    antlr3EnumFree	    (pANTLR3_HASH_ENUM en);
-
-// Interface functions for List
-//
-static void				antlr3ListFree	(pANTLR3_LIST list);
-static void				antlr3ListDelete(pANTLR3_LIST list, ANTLR3_INTKEY key);
-static void *			antlr3ListGet	(pANTLR3_LIST list, ANTLR3_INTKEY key);
-static ANTLR3_INT32		antlr3ListPut	(pANTLR3_LIST list, ANTLR3_INTKEY key, void * element, void (ANTLR3_CDECL *freeptr)(void *));
-static ANTLR3_INT32		antlr3ListAdd   (pANTLR3_LIST list, void * element, void (ANTLR3_CDECL *freeptr)(void *));
-static void *			antlr3ListRemove(pANTLR3_LIST list, ANTLR3_INTKEY key);
-static ANTLR3_UINT32	antlr3ListSize	(pANTLR3_LIST list);
-
-// Interface functions for Stack
-//
-static void				antlr3StackFree	(pANTLR3_STACK  stack);
-static void *			antlr3StackPop	(pANTLR3_STACK	stack);
-static void *			antlr3StackGet	(pANTLR3_STACK	stack, ANTLR3_INTKEY key);
-static ANTLR3_BOOLEAN	antlr3StackPush	(pANTLR3_STACK	stack, void * element, void (ANTLR3_CDECL *freeptr)(void *));
-static ANTLR3_UINT32	antlr3StackSize	(pANTLR3_STACK	stack);
-static void *			antlr3StackPeek	(pANTLR3_STACK	stack);
-
-// Interface functions for vectors
-//
-static	void ANTLR3_CDECL	antlr3VectorFree	(pANTLR3_VECTOR vector);
-static	void				antlr3VectorDel		(pANTLR3_VECTOR vector, ANTLR3_UINT32 entry);
-static	void *				antlr3VectorGet		(pANTLR3_VECTOR vector, ANTLR3_UINT32 entry);
-static	void *				antrl3VectorRemove	(pANTLR3_VECTOR vector, ANTLR3_UINT32 entry);
-static	void				antlr3VectorClear	(pANTLR3_VECTOR vector);
-static	ANTLR3_UINT32		antlr3VectorAdd		(pANTLR3_VECTOR vector, void * element, void (ANTLR3_CDECL *freeptr)(void *));
-static	ANTLR3_UINT32		antlr3VectorSet		(pANTLR3_VECTOR vector, ANTLR3_UINT32 entry, void * element, void (ANTLR3_CDECL *freeptr)(void *), ANTLR3_BOOLEAN freeExisting);
-static	ANTLR3_UINT32		antlr3VectorSize    (pANTLR3_VECTOR vector);
-static	ANTLR3_BOOLEAN      antlr3VectorSwap	(pANTLR3_VECTOR vector, ANTLR3_UINT32 entry1, ANTLR3_UINT32 entry2);
-
-static  void                newPool             (pANTLR3_VECTOR_FACTORY factory);
-static  void				closeVectorFactory  (pANTLR3_VECTOR_FACTORY factory);
-static	pANTLR3_VECTOR		newVector			(pANTLR3_VECTOR_FACTORY factory);
-static	void				returnVector		(pANTLR3_VECTOR_FACTORY factory, pANTLR3_VECTOR vector);
-
-
-// Interface functions for int TRIE
-//
-static	pANTLR3_TRIE_ENTRY	intTrieGet		(pANTLR3_INT_TRIE trie, ANTLR3_INTKEY key);
-static	ANTLR3_BOOLEAN		intTrieDel		(pANTLR3_INT_TRIE trie, ANTLR3_INTKEY key);
-static	ANTLR3_BOOLEAN		intTrieAdd		(pANTLR3_INT_TRIE trie, ANTLR3_INTKEY key, ANTLR3_UINT32 type, ANTLR3_INTKEY intType, void * data, void (ANTLR3_CDECL *freeptr)(void *));
-static	void				intTrieFree		(pANTLR3_INT_TRIE trie);
-
-
-// Interface functions for topological sorter
-//
-static  void            addEdge          (pANTLR3_TOPO topo, ANTLR3_UINT32 edge, ANTLR3_UINT32 dependency);
-static  pANTLR3_UINT32  sortToArray      (pANTLR3_TOPO topo);
-static  void            sortVector       (pANTLR3_TOPO topo, pANTLR3_VECTOR v);
-static  void            freeTopo         (pANTLR3_TOPO topo);
-
-// Local function to advance enumeration structure pointers
-//
-static void antlr3EnumNextEntry(pANTLR3_HASH_ENUM en);
-
-pANTLR3_HASH_TABLE
-antlr3HashTableNew(ANTLR3_UINT32 sizeHint)
-{
-	// All we have to do is create the hashtable tracking structure
-	// and allocate memory for the requested number of buckets.
-	//
-	pANTLR3_HASH_TABLE	table;
-
-	ANTLR3_UINT32	bucket;	// Used to traverse the buckets
-
-	table   = ANTLR3_MALLOC(sizeof(ANTLR3_HASH_TABLE));
-
-	// Error out if no memory left
-	if	(table	== NULL)
-	{
-		return	NULL;
-	}
-
-	// Allocate memory for the buckets
-	//
-	table->buckets = (pANTLR3_HASH_BUCKET) ANTLR3_MALLOC((size_t) (sizeof(ANTLR3_HASH_BUCKET) * sizeHint)); 
-
-	if	(table->buckets == NULL)
-	{
-		ANTLR3_FREE((void *)table);
-		return	NULL;
-	}
-
-	// Modulo of the table, (bucket count).
-	//
-	table->modulo   = sizeHint;
-
-	table->count    = 0;	    /* Nothing in there yet ( I hope)	*/
-
-	/* Initialize the buckets to empty
-	*/
-	for	(bucket = 0; bucket < sizeHint; bucket++)
-	{
-		table->buckets[bucket].entries = NULL;
-	}
-
-	/* Exclude duplicate entries by default
-	*/
-	table->allowDups	= ANTLR3_FALSE;
-
-    /* Assume that keys should by strduped before they are
-     * entered in the table.
-     */
-    table->doStrdup     = ANTLR3_TRUE;
-
-	/* Install the interface
-	*/
-
-	table->get		=  antlr3HashGet;
-	table->put		=  antlr3HashPut;
-	table->del		=  antlr3HashDelete;
-	table->remove	=  antlr3HashRemove;
-
-	table->getI		=  antlr3HashGetI;
-	table->putI		=  antlr3HashPutI;
-	table->delI		=  antlr3HashDeleteI;
-	table->removeI	=  antlr3HashRemoveI;
-
-	table->size		=  antlr3HashSize;
-	table->free		=  antlr3HashFree;
-
-	return  table;
-}
-
-static void
-antlr3HashFree(pANTLR3_HASH_TABLE table)
-{
-    ANTLR3_UINT32	bucket;	/* Used to traverse the buckets	*/
-
-    pANTLR3_HASH_BUCKET	thisBucket;
-    pANTLR3_HASH_ENTRY	entry;
-    pANTLR3_HASH_ENTRY	nextEntry;
-
-    /* Free the table, all buckets and all entries, and all the
-     * keys and data (if the table exists)
-     */
-    if	(table	!= NULL)
-    {
-	for	(bucket = 0; bucket < table->modulo; bucket++)
-	{
-	    thisBucket	= &(table->buckets[bucket]);
-
-	    /* Allow sparse tables, though we don't create them as such at present
-	     */
-	    if	( thisBucket != NULL)
-	    {
-		entry	= thisBucket->entries;
-
-		/* Search all entries in the bucket and free them up
-		 */
-		while	(entry != NULL)
-		{
-		    /* Save next entry - we do not want to access memory in entry after we
-		     * have freed it.
-		     */
-		    nextEntry	= entry->nextEntry;
-
-		    /* Free any data pointer, this only happens if the user supplied
-		     * a pointer to a routine that knwos how to free the structure they
-		     * added to the table.
-		     */
-		    if	(entry->free != NULL)
-		    {
-			entry->free(entry->data);
-		    }
-
-		    /* Free the key memory - we know that we allocated this
-		     */
-		    if	(entry->keybase.type == ANTLR3_HASH_TYPE_STR && entry->keybase.key.sKey != NULL)
-		    {
-			ANTLR3_FREE(entry->keybase.key.sKey);
-		    }
-
-		    /* Free this entry
-		     */
-		    ANTLR3_FREE(entry);
-		    entry   = nextEntry;    /* Load next pointer to see if we shoud free it */
-		}
-		/* Invalidate the current pointer
-		 */
-		thisBucket->entries = NULL;
-	    }
-	}
-
-	/* Now we can free the bucket memory
-	 */
-	ANTLR3_FREE(table->buckets);
-    }
-
-    /* Now we free teh memory for the table itself
-     */
-    ANTLR3_FREE(table);
-}
-
-/** return the current size of the hash table
- */
-static ANTLR3_UINT32	antlr3HashSize	    (pANTLR3_HASH_TABLE table)
-{
-    return  table->count;
-}
-
-/** Remove a numeric keyed entry from a hash table if it exists,
- *  no error if it does not exist.
- */
-static pANTLR3_HASH_ENTRY   antlr3HashRemoveI   (pANTLR3_HASH_TABLE table, ANTLR3_INTKEY key)
-{
-    ANTLR3_UINT32	    hash;
-    pANTLR3_HASH_BUCKET	    bucket;
-    pANTLR3_HASH_ENTRY	    entry;
-    pANTLR3_HASH_ENTRY	    * nextPointer;
-
-    /* First we need to know the hash of the provided key
-     */
-    hash    = (ANTLR3_UINT32)(key % (ANTLR3_INTKEY)(table->modulo));
-
-    /* Knowing the hash, we can find the bucket
-     */
-    bucket  = table->buckets + hash;
-
-    /* Now, we traverse the entries in the bucket until
-     * we find the key or the end of the entries in the bucket. 
-     * We track the element prior to the one we are examining
-     * as we need to set its next pointer to the next pointer
-     * of the entry we are deleting (if we find it).
-     */
-    entry	    =   bucket->entries;    /* Entry to examine					    */
-    nextPointer	    = & bucket->entries;    /* Where to put the next pointer of the deleted entry   */
-
-    while   (entry != NULL)
-    {
-	/* See if this is the entry we wish to delete
-	 */
-	if  (entry->keybase.key.iKey == key)
-	{
-	    /* It was the correct entry, so we set the next pointer
-	     * of the previous entry to the next pointer of this
-	     * located one, which takes it out of the chain.
-	     */
-	    (*nextPointer)		= entry->nextEntry;
-
-	    table->count--;
-
-	    return entry;
-	}
-	else
-	{
-	    /* We found an entry but it wasn't the one that was wanted, so
-	     * move to the next one, if any.
-	     */
-	    nextPointer	= & (entry->nextEntry);	    /* Address of the next pointer in the current entry	    */
-	    entry	= entry->nextEntry;	    /* Address of the next element in the bucket (if any)   */
-	}
-    }
-
-    return NULL;  /* Not found */
-}
-
-/** Remove the element in the hash table for a particular
- *  key value, if it exists - no error if it does not.
- */
-static pANTLR3_HASH_ENTRY
-antlr3HashRemove(pANTLR3_HASH_TABLE table, void * key)
-{
-    ANTLR3_UINT32	    hash;
-    pANTLR3_HASH_BUCKET	    bucket;
-    pANTLR3_HASH_ENTRY	    entry;
-    pANTLR3_HASH_ENTRY	    * nextPointer;
-
-    /* First we need to know the hash of the provided key
-     */
-    hash    = antlr3Hash(key, (ANTLR3_UINT32)strlen((const char *)key));
-
-    /* Knowing the hash, we can find the bucket
-     */
-    bucket  = table->buckets + (hash % table->modulo);
-
-    /* Now, we traverse the entries in the bucket until
-     * we find the key or the end of the entires in the bucket. 
-     * We track the element prior to the one we are exmaining
-     * as we need to set its next pointer to the next pointer
-     * of the entry we are deleting (if we find it).
-     */
-    entry	    =   bucket->entries;    /* Entry to examine					    */
-    nextPointer	    = & bucket->entries;    /* Where to put the next pointer of the deleted entry   */
-
-    while   (entry != NULL)
-    {
-	/* See if this is the entry we wish to delete
-	 */
-	if  (strcmp((const char *)key, (const char *)entry->keybase.key.sKey) == 0)
-	{
-	    /* It was the correct entry, so we set the next pointer
-	     * of the previous entry to the next pointer of this
-	     * located one, which takes it out of the chain.
-	     */
-	    (*nextPointer)		= entry->nextEntry;
-
-	    /* Release the key - if we allocated that
-	     */
-        if (table->doStrdup == ANTLR3_TRUE)
-        {
-            ANTLR3_FREE(entry->keybase.key.sKey);
-        }
-	    entry->keybase.key.sKey	= NULL;
-
-	    table->count--;
-
-	    return entry;
-	}
-	else
-	{
-	    /* We found an entry but it wasn't the one that was wanted, so
-	     * move to the next one, if any.
-	     */
-	    nextPointer	= & (entry->nextEntry);	    /* Address of the next pointer in the current entry	    */
-	    entry	= entry->nextEntry;	    /* Address of the next element in the bucket (if any)   */
-	}
-    }
-
-    return NULL;  /* Not found */
-}
-
-/** Takes the element with the supplied key out of the list, and deletes the data
- *  calling the supplied free() routine if any. 
- */
-static void
-antlr3HashDeleteI    (pANTLR3_HASH_TABLE table, ANTLR3_INTKEY key)
-{
-    pANTLR3_HASH_ENTRY	entry;
-
-    entry = antlr3HashRemoveI(table, key);
-	
-    /* Now we can free the elements and the entry in order
-     */
-    if	(entry != NULL && entry->free != NULL)
-    {
-	/* Call programmer supplied function to release this entry data
-	 */
-	entry->free(entry->data);
-	entry->data = NULL;
-    }
-    /* Finally release the space for this entry block.
-     */
-    ANTLR3_FREE(entry);
-}
-
-/** Takes the element with the supplied key out of the list, and deletes the data
- *  calling the supplied free() routine if any. 
- */
-static void
-antlr3HashDelete    (pANTLR3_HASH_TABLE table, void * key)
-{
-    pANTLR3_HASH_ENTRY	entry;
-
-    entry = antlr3HashRemove(table, key);
-	
-    /* Now we can free the elements and the entry in order
-     */
-    if	(entry != NULL && entry->free != NULL)
-    {
-	/* Call programmer supplied function to release this entry data
-	 */
-	entry->free(entry->data);
-	entry->data = NULL;
-    }
-    /* Finally release the space for this entry block.
-     */
-    ANTLR3_FREE(entry);
-}
-
-/** Return the element pointer in the hash table for a particular
- *  key value, or NULL if it don't exist (or was itself NULL).
- */
-static void *
-antlr3HashGetI(pANTLR3_HASH_TABLE table, ANTLR3_INTKEY key)
-{
-    ANTLR3_UINT32	    hash;
-    pANTLR3_HASH_BUCKET	    bucket;
-    pANTLR3_HASH_ENTRY	    entry;
-
-    /* First we need to know the hash of the provided key
-     */
-    hash    = (ANTLR3_UINT32)(key % (ANTLR3_INTKEY)(table->modulo));
-
-    /* Knowing the hash, we can find the bucket
-     */
-    bucket  = table->buckets + hash;
-
-    /* Now we can inspect the key at each entry in the bucket
-     * and see if we have a match.
-     */
-    entry   = bucket->entries;
-
-    while   (entry != NULL)
-    {
-	if  (entry->keybase.key.iKey == key)
-	{
-	    /* Match was found, return the data pointer for this entry
-	     */
-	    return  entry->data;
-	}
-	entry = entry->nextEntry;
-    }
-
-    /* If we got here, then we did not find the key
-     */
-    return  NULL;
-}
-
-/** Return the element pointer in the hash table for a particular
- *  key value, or NULL if it don't exist (or was itself NULL).
- */
-static void *
-antlr3HashGet(pANTLR3_HASH_TABLE table, void * key)
-{
-    ANTLR3_UINT32	    hash;
-    pANTLR3_HASH_BUCKET	    bucket;
-    pANTLR3_HASH_ENTRY	    entry;
-
-
-    /* First we need to know the hash of the provided key
-     */
-    hash    = antlr3Hash(key, (ANTLR3_UINT32)strlen((const char *)key));
-
-    /* Knowing the hash, we can find the bucket
-     */
-    bucket  = table->buckets + (hash % table->modulo);
-
-    /* Now we can inspect the key at each entry in the bucket
-     * and see if we have a match.
-     */
-    entry   = bucket->entries;
-
-    while   (entry != NULL)
-    {
-	if  (strcmp((const char *)key, (const char *)entry->keybase.key.sKey) == 0)
-	{
-	    /* Match was found, return the data pointer for this entry
-	     */
-	    return  entry->data;
-	}
-	entry = entry->nextEntry;
-    }
-
-    /* If we got here, then we did not find the key
-     */
-    return  NULL;
-}
-
-/** Add the element pointer in to the table, based upon the 
- *  hash of the provided key.
- */
-static	ANTLR3_INT32
-antlr3HashPutI(pANTLR3_HASH_TABLE table, ANTLR3_INTKEY key, void * element, void (ANTLR3_CDECL *freeptr)(void *))
-{
-	ANTLR3_UINT32	    hash;
-	pANTLR3_HASH_BUCKET	    bucket;
-	pANTLR3_HASH_ENTRY	    entry;
-	pANTLR3_HASH_ENTRY	    * newPointer;
-
-	/* First we need to know the hash of the provided key
-	*/
-	hash    = (ANTLR3_UINT32)(key % (ANTLR3_INTKEY)(table->modulo));
-
-	/* Knowing the hash, we can find the bucket
-	*/
-	bucket  = table->buckets + hash;
-
-	/* Knowing the bucket, we can traverse the entries until we
-	* we find a NULL pointer or we find that this is already 
-	* in the table and duplicates were not allowed.
-	*/
-	newPointer	= &bucket->entries;
-
-	while   (*newPointer !=  NULL)
-	{
-		/* The value at new pointer is pointing to an existing entry.
-		* If duplicates are allowed then we don't care what it is, but
-		* must reject this add if the key is the same as the one we are
-		* supplied with.
-		*/
-		if  (table->allowDups == ANTLR3_FALSE)
-		{
-			if	((*newPointer)->keybase.key.iKey == key)
-			{
-				return	ANTLR3_ERR_HASHDUP;
-			}
-		}
-
-		/* Point to the next entry pointer of the current entry we
-		* are traversing, if it is NULL we will create our new
-		* structure and point this to it.
-		*/
-		newPointer = &((*newPointer)->nextEntry);
-	}
-
-	/* newPointer is now pointing at the pointer where we need to
-	* add our new entry, so let's crate the entry and add it in.
-	*/
-	entry   = (pANTLR3_HASH_ENTRY)ANTLR3_MALLOC((size_t)sizeof(ANTLR3_HASH_ENTRY));
-
-	if	(entry == NULL)
-	{
-		return	ANTLR3_ERR_NOMEM;
-	}
-
-	entry->data			= element;		/* Install the data element supplied			*/
-	entry->free			= freeptr;		/* Function that knows how to release the entry		*/
-	entry->keybase.type		= ANTLR3_HASH_TYPE_INT;	/* Indicate the key type stored here for when we free	*/
-	entry->keybase.key.iKey	= key;			/* Record the key value					*/
-	entry->nextEntry		= NULL;			/* Ensure that the forward pointer ends the chain	*/
-
-	*newPointer	= entry;    /* Install the next entry in this bucket	*/
-
-	table->count++;
-
-	return  ANTLR3_SUCCESS;
-}
-
-
-/** Add the element pointer in to the table, based upon the 
- *  hash of the provided key.
- */
-static	ANTLR3_INT32
-antlr3HashPut(pANTLR3_HASH_TABLE table, void * key, void * element, void (ANTLR3_CDECL *freeptr)(void *))
-{
-	ANTLR3_UINT32	    hash;
-	pANTLR3_HASH_BUCKET	    bucket;
-	pANTLR3_HASH_ENTRY	    entry;
-	pANTLR3_HASH_ENTRY	    * newPointer;
-
-	/* First we need to know the hash of the provided key
-	*/
-	hash    = antlr3Hash(key, (ANTLR3_UINT32)strlen((const char *)key));
-
-	/* Knowing the hash, we can find the bucket
-	*/
-	bucket  = table->buckets + (hash % table->modulo);
-
-	/* Knowign the bucket, we can traverse the entries until we
-	* we find a NULL pointer ofr we find that this is already 
-	* in the table and duplicates were not allowed.
-	*/
-	newPointer	= &bucket->entries;
-
-	while   (*newPointer !=  NULL)
-	{
-		/* The value at new pointer is pointing to an existing entry.
-		* If duplicates are allowed then we don't care what it is, but
-		* must reject this add if the key is the same as the one we are
-		* supplied with.
-		*/
-		if  (table->allowDups == ANTLR3_FALSE)
-		{
-			if	(strcmp((const char*) key, (const char *)(*newPointer)->keybase.key.sKey) == 0)
-			{
-				return	ANTLR3_ERR_HASHDUP;
-			}
-		}
-
-		/* Point to the next entry pointer of the current entry we
-		* are traversing, if it is NULL we will create our new
-		* structure and point this to it.
-		*/
-		newPointer = &((*newPointer)->nextEntry);
-	}
-
-	/* newPointer is now poiting at the pointer where we need to
-	* add our new entry, so let's crate the entry and add it in.
-	*/
-	entry   = (pANTLR3_HASH_ENTRY)ANTLR3_MALLOC((size_t)sizeof(ANTLR3_HASH_ENTRY));
-
-	if	(entry == NULL)
-	{
-		return	ANTLR3_ERR_NOMEM;
-	}
-
-	entry->data			= element;					/* Install the data element supplied				*/
-	entry->free			= freeptr;					/* Function that knows how to release the entry	    */
-	entry->keybase.type	= ANTLR3_HASH_TYPE_STR;     /* Indicate the key type stored here for free()	    */
-    if  (table->doStrdup == ANTLR3_TRUE)
-    {
-        entry->keybase.key.sKey	= ANTLR3_STRDUP(key);	/* Record the key value								*/
-    }
-    else
-    {
-        entry->keybase.key.sKey	= key;                  /* Record the key value								*/
-    }
-	entry->nextEntry		= NULL;					/* Ensure that the forward pointer ends the chain   */
-
-	*newPointer	= entry;    /* Install the next entry in this bucket	*/
-
-	table->count++;
-
-	return  ANTLR3_SUCCESS;
-}
-
-/** \brief Creates an enumeration structure to traverse the hash table.
- *
- * \param table Table to enumerate
- * \return Pointer to enumeration structure.
- */
-pANTLR3_HASH_ENUM
-antlr3EnumNew	(pANTLR3_HASH_TABLE table)
-{
-    pANTLR3_HASH_ENUM	en;
-
-    /* Allocate structure memory
-     */
-    en    = (pANTLR3_HASH_ENUM) ANTLR3_MALLOC((size_t)sizeof(ANTLR3_HASH_ENUM));
-
-    /* Check that the allocation was good 
-     */
-    if	(en == NULL)
-    {
-	return	(pANTLR3_HASH_ENUM) ANTLR3_FUNC_PTR(ANTLR3_ERR_NOMEM);
-    }
-    
-    /* Initialize the start pointers
-    */
-    en->table	= table;
-    en->bucket	= 0;				/* First bucket		    */
-    en->entry	= en->table->buckets->entries;	/* First entry to return    */
-
-    /* Special case in that the first bucket may not have anything in it
-     * but the antlr3EnumNext() function expects that the en->entry is
-     * set to the next valid pointer. Hence if it is not a valid element
-     * pointer, attempt to find the next one that is, (table may be empty
-     * of course.
-     */
-    if	(en->entry == NULL)
-    {
-	antlr3EnumNextEntry(en);
-    }
-
-    /* Install the interface
-     */
-    en->free	=  antlr3EnumFree;
-    en->next	=  antlr3EnumNext;
-
-    /* All is good
-     */
-    return  en;
-}
-
-/** \brief Return the next entry in the hashtable being traversed by the supplied
- *         enumeration.
- *
- * \param[in] en Pointer to the enumeration tracking structure
- * \param key	 Pointer to void pointer, where the key pointer is returned.
- * \param data	 Pointer to void pointer where the data pointer is returned.
- * \return 
- *	- ANTLR3_SUCCESS if there was a next key
- *	- ANTLR3_FAIL	 if there were no more keys
- *
- * \remark
- *  No checking of input structure is performed!
- */
-static int
-antlr3EnumNext	(pANTLR3_HASH_ENUM en, pANTLR3_HASH_KEY * key, void ** data)
-{
-    /* If the current entry is valid, then use it
-     */
-    if  (en->bucket >= en->table->modulo)
-    {
-        /* Already exhausted the table
-         */
-        return	ANTLR3_FAIL;
-    }
-
-    /* Pointers are already set to the current entry to return, or
-     * we would not be at this point in the logic flow.
-     */
-    *key	= &(en->entry->keybase);
-    *data	= en->entry->data;
-
-    /* Return pointers are set up, so now we move the element
-     * pointer to the next in the table (if any).
-     */
-    antlr3EnumNextEntry(en);
-
-    return	ANTLR3_SUCCESS;
-}
-
-/** \brief Local function to advance the entry pointer of an enumeration 
- * structure to the next valid entry (if there is one).
- *
- * \param[in] enum Pointer to ANTLR3 enumeration structure returned by antlr3EnumNew()
- *
- * \remark
- *   - The function always leaves the pointers pointing at a valid entry if there
- *     is one, so if the entry pointer is NULL when this function exits, there were
- *     no more entries in the table.
- */
-static void
-antlr3EnumNextEntry(pANTLR3_HASH_ENUM en)
-{
-    pANTLR3_HASH_BUCKET	bucket;
-
-    /* See if the current entry pointer is valid first of all
-     */
-    if	(en->entry != NULL)
-    {
-	/* Current entry was a valid point, see if there is another
-	 * one in the chain.
-	 */
-	if  (en->entry->nextEntry != NULL)
-	{
-	    /* Next entry in the enumeration is just the next entry
-	     * in the chain.
-	     */
-	    en->entry = en->entry->nextEntry;
-	    return;
-	}
-    }
-
-    /* There were no more entries in the current bucket, if there are
-     * more buckets then chase them until we find an entry.
-     */
-    en->bucket++;
-
-    while   (en->bucket < en->table->modulo)
-    {
-	/* There was one more bucket, see if it has any elements in it
-	 */
-	bucket	= en->table->buckets + en->bucket;
-
-	if  (bucket->entries != NULL)
-	{
-	    /* There was an entry in this bucket, so we can use it
-	     * for the next entry in the enumeration.
-	     */
-	    en->entry	= bucket->entries;
-	    return;
-	}
-
-	/* There was nothing in the bucket we just examined, move to the
-	 * next one.
-	 */
-	en->bucket++;
-    }
-
-    /* Here we have exhausted all buckets and the enumeration pointer will 
-     * have its bucket count = table->modulo which signifies that we are done.
-     */
-}
-
-/** \brief Frees up the memory structures that represent a hash table
- *  enumeration.
- * \param[in] enum Pointer to ANTLR3 enumeration structure returned by antlr3EnumNew()
- */
-static void
-antlr3EnumFree	(pANTLR3_HASH_ENUM en)
-{
-    /* Nothing to check, we just free it.
-     */
-    ANTLR3_FREE(en);
-}
-
-/** Given an input key of arbitrary length, return a hash value of
- *  it. This can then be used (with suitable modulo) to index other
- *  structures.
- */
-ANTLR3_API ANTLR3_UINT32
-antlr3Hash(void * key, ANTLR3_UINT32 keylen)
-{
-    /* Accumulate the hash value of the key
-     */
-    ANTLR3_UINT32   hash;
-    pANTLR3_UINT8   keyPtr;
-    ANTLR3_UINT32   i1;
-
-    hash    = 0;
-    keyPtr  = (pANTLR3_UINT8) key;
-
-    /* Iterate the key and accumulate the hash
-     */
-    while(keylen > 0)
-    {
-	hash = (hash << 4) + (*(keyPtr++));
-
-	if ((i1=hash&0xf0000000) != 0)
-	{
-		hash = hash ^ (i1 >> 24);
-		hash = hash ^ i1;
-	}
-	keylen--;
-    }
-
-    return  hash;
-}
-
-ANTLR3_API  pANTLR3_LIST
-antlr3ListNew	(ANTLR3_UINT32 sizeHint)
-{
-    pANTLR3_LIST    list;
-
-    /* Allocate memory
-     */
-    list    = (pANTLR3_LIST)ANTLR3_MALLOC((size_t)sizeof(ANTLR3_LIST));
-
-    if	(list == NULL)
-    {
-	return	(pANTLR3_LIST)ANTLR3_FUNC_PTR(ANTLR3_ERR_NOMEM);
-    }
-
-    /* Now we need to add a new table
-     */
-    list->table	= antlr3HashTableNew(sizeHint);
-
-    if	(list->table == (pANTLR3_HASH_TABLE)ANTLR3_FUNC_PTR(ANTLR3_ERR_NOMEM))
-    {
-	return	(pANTLR3_LIST)ANTLR3_FUNC_PTR(ANTLR3_ERR_NOMEM);
-    }
-
-    /* Allocation was good, install interface
-     */
-    list->free	    =  antlr3ListFree;
-    list->del	    =  antlr3ListDelete;
-    list->get	    =  antlr3ListGet;
-    list->add	    =  antlr3ListAdd;
-    list->remove    =  antlr3ListRemove;
-    list->put	    =  antlr3ListPut;
-    list->size	    =  antlr3ListSize;
-
-    return  list;
-}
-
-static ANTLR3_UINT32	antlr3ListSize	    (pANTLR3_LIST list)
-{
-    return  list->table->size(list->table);
-}
-
-static void
-antlr3ListFree	(pANTLR3_LIST list)
-{
-    /* Free the hashtable that stores the list
-     */
-    list->table->free(list->table);
-
-    /* Free the allocation for the list itself
-     */
-    ANTLR3_FREE(list);
-}
-
-static void
-antlr3ListDelete    (pANTLR3_LIST list, ANTLR3_INTKEY key)
-{
-    list->table->delI(list->table, key);
-}
-
-static void *
-antlr3ListGet	    (pANTLR3_LIST list, ANTLR3_INTKEY key)
-{
-    return list->table->getI(list->table, key);
-}
-
-/** Add the supplied element to the list, at the next available key
- */
-static ANTLR3_INT32	antlr3ListAdd   (pANTLR3_LIST list, void * element, void (ANTLR3_CDECL *freeptr)(void *))
-{
-    ANTLR3_INTKEY   key;
-
-    key	    = list->table->size(list->table) + 1;
-    return list->put(list, key, element, freeptr);
-}
-
-/** Remove from the list, but don't free the element, just send it back to the
- *  caller.
- */
-static	void *
-antlr3ListRemove	    (pANTLR3_LIST list, ANTLR3_INTKEY key)
-{
-    pANTLR3_HASH_ENTRY	    entry;
-
-    entry = list->table->removeI(list->table, key);
-
-    if	(entry != NULL)
-    {
-        return  entry->data;
-    }
-    else
-    {
-	return	NULL;
-    }
-}
-
-static	ANTLR3_INT32
-antlr3ListPut	    (pANTLR3_LIST list, ANTLR3_INTKEY key, void * element, void (ANTLR3_CDECL *freeptr)(void *))
-{
-    return  list->table->putI(list->table, key, element, freeptr);
-}
-
-ANTLR3_API  pANTLR3_STACK
-antlr3StackNew	(ANTLR3_UINT32 sizeHint)
-{
-    pANTLR3_STACK   stack;
-
-    /* Allocate memory
-     */
-    stack    = (pANTLR3_STACK)ANTLR3_MALLOC((size_t)sizeof(ANTLR3_STACK));
-
-    if	(stack == NULL)
-    {
-	return	(pANTLR3_STACK)ANTLR3_FUNC_PTR(ANTLR3_ERR_NOMEM);
-    }
-
-    /* Now we need to add a new table
-     */
-    stack->vector   = antlr3VectorNew(sizeHint);
-    stack->top	    = NULL;
-
-    if	(stack->vector == (pANTLR3_VECTOR)ANTLR3_FUNC_PTR(ANTLR3_ERR_NOMEM))
-    {
-	return	(pANTLR3_STACK)ANTLR3_FUNC_PTR(ANTLR3_ERR_NOMEM);
-    }
-
-    /* Looks good, now add the interface
-     */
-    stack->get	=  antlr3StackGet;
-    stack->free	=  antlr3StackFree;
-    stack->pop	=  antlr3StackPop;
-    stack->push	=  antlr3StackPush;
-    stack->size	=  antlr3StackSize;
-    stack->peek	=  antlr3StackPeek;
-
-    return  stack;
-}
-
-static ANTLR3_UINT32	antlr3StackSize	    (pANTLR3_STACK stack)
-{
-    return  stack->vector->count;
-}
-
-
-static void
-antlr3StackFree	(pANTLR3_STACK  stack)
-{
-    /* Free the list that supports the stack
-     */
-    stack->vector->free(stack->vector);
-    stack->vector   = NULL;
-    stack->top	    = NULL;
-
-    ANTLR3_FREE(stack);
-}
-
-static void *
-antlr3StackPop	(pANTLR3_STACK	stack)
-{
-    // Delete the element that is currently at the top of the stack
-    //
-    stack->vector->del(stack->vector, stack->vector->count - 1);
-
-    // And get the element that is the now the top of the stack (if anything)
-    // NOTE! This is not quite like a 'real' stack, which would normally return you
-    // the current top of the stack, then remove it from the stack.
-    // TODO: Review this, it is correct for follow sets which is what this was done for
-    //       but is not as obvious when using it as a 'real'stack.
-    //
-    stack->top = stack->vector->get(stack->vector, stack->vector->count - 1);
-    return stack->top;
-}
-
-static void *
-antlr3StackGet	(pANTLR3_STACK stack, ANTLR3_INTKEY key)
-{
-    return  stack->vector->get(stack->vector, (ANTLR3_UINT32)key);
-}
-
-static void *
-antlr3StackPeek	(pANTLR3_STACK	stack)
-{
-    return  stack->top;
-}
-
-static ANTLR3_BOOLEAN 
-antlr3StackPush	(pANTLR3_STACK stack, void * element, void (ANTLR3_CDECL *freeptr)(void *))
-{
-    stack->top	= element;
-    return (ANTLR3_BOOLEAN)(stack->vector->add(stack->vector, element, freeptr));
-}
-
-ANTLR3_API  pANTLR3_VECTOR
-antlr3VectorNew	(ANTLR3_UINT32 sizeHint)
-{
-	pANTLR3_VECTOR  vector;
-
-
-	// Allocate memory for the vector structure itself
-	//
-	vector  = (pANTLR3_VECTOR) ANTLR3_MALLOC((size_t)(sizeof(ANTLR3_VECTOR)));
-
-	if	(vector == NULL)
-	{
-		return	(pANTLR3_VECTOR)ANTLR3_FUNC_PTR(ANTLR3_ERR_NOMEM);
-	}
-
-	// Now fill in the defaults
-	//
-    antlr3SetVectorApi(vector, sizeHint);
-
-	// And everything is hunky dory
-	//
-	return  vector;
-}
-
-ANTLR3_API void
-antlr3SetVectorApi  (pANTLR3_VECTOR vector, ANTLR3_UINT32 sizeHint)
-{
-    ANTLR3_UINT32   initialSize;
-
-    // Allow vectors to be guessed by ourselves, so input size can be zero
-    //
-    if	(sizeHint > ANTLR3_VECTOR_INTERNAL_SIZE)
-    {
-        initialSize = sizeHint;
-    }
-    else
-    {
-        initialSize = ANTLR3_VECTOR_INTERNAL_SIZE;
-    }
-
-    if  (sizeHint > ANTLR3_VECTOR_INTERNAL_SIZE)
-    {
-        vector->elements	= (pANTLR3_VECTOR_ELEMENT)ANTLR3_MALLOC((size_t)(sizeof(ANTLR3_VECTOR_ELEMENT) * initialSize));
-    }
-    else
-    {
-        vector->elements    = vector->internal;
-    }
-
-    if	(vector->elements == NULL)
-    {
-        ANTLR3_FREE(vector);
-        return;
-    }
-
-    // Memory allocated successfully
-    //
-    vector->count			= 0;			// No entries yet of course
-    vector->elementsSize    = initialSize;  // Available entries
-
-    // Now we can install the API
-    //
-    vector->add	    = antlr3VectorAdd;
-    vector->del	    = antlr3VectorDel;
-    vector->get	    = antlr3VectorGet;
-    vector->free    = antlr3VectorFree;
-    vector->set	    = antlr3VectorSet;
-    vector->remove  = antrl3VectorRemove;
-    vector->clear   = antlr3VectorClear;
-    vector->size    = antlr3VectorSize;
-    vector->swap    = antlr3VectorSwap;
-
-    // Assume that this is not a factory made vector
-    //
-    vector->factoryMade	= ANTLR3_FALSE;
-}
-
-// Clear the entries in a vector.
-// Clearing the vector leaves its capacity the same but
-// it walks the entries first to see if any of them
-// have a free routine that must be called.
-//
-static	void				
-antlr3VectorClear	(pANTLR3_VECTOR vector)
-{
-	ANTLR3_UINT32   entry;
-
-	// We must traverse every entry in the vector and if it has
-	// a pointer to a free function then we call it with the
-	// the entry pointer
-	//
-	for	(entry = 0; entry < vector->count; entry++)
-	{
-		if  (vector->elements[entry].freeptr != NULL)
-		{
-			vector->elements[entry].freeptr(vector->elements[entry].element);
-		}
-		vector->elements[entry].freeptr    = NULL;
-		vector->elements[entry].element    = NULL;
-	}
-
-	// Having called any free pointers, we just reset the entry count
-	// back to zero.
-	//
-	vector->count	= 0;
-}
-
-static	
-void	ANTLR3_CDECL	antlr3VectorFree    (pANTLR3_VECTOR vector)
-{
-	ANTLR3_UINT32   entry;
-
-	// We must traverse every entry in the vector and if it has
-	// a pointer to a free function then we call it with the
-	// the entry pointer
-	//
-	for	(entry = 0; entry < vector->count; entry++)
-	{
-		if  (vector->elements[entry].freeptr != NULL)
-		{
-			vector->elements[entry].freeptr(vector->elements[entry].element);
-		}
-		vector->elements[entry].freeptr    = NULL;
-		vector->elements[entry].element    = NULL;
-	}
-
-	if	(vector->factoryMade == ANTLR3_FALSE)
-	{
-		// The entries are freed, so free the element allocation
-		//
-        if  (vector->elementsSize > ANTLR3_VECTOR_INTERNAL_SIZE)
-        {
-            ANTLR3_FREE(vector->elements);
-        }
-		vector->elements = NULL;
-
-		// Finally, free the allocation for the vector itself
-		//
-		ANTLR3_FREE(vector);
-	}
-}
-
-static	void		antlr3VectorDel	    (pANTLR3_VECTOR vector, ANTLR3_UINT32 entry)
-{
-	// Check this is a valid request first
-	//
-	if	(entry >= vector->count)
-	{
-		return;
-	}
-
-	// Valid request, check for free pointer and call it if present
-	//
-	if	(vector->elements[entry].freeptr != NULL)
-	{
-		vector->elements[entry].freeptr(vector->elements[entry].element);
-		vector->elements[entry].freeptr    = NULL;
-	}
-
-	if	(entry == vector->count - 1)
-	{
-		// Ensure the pointer is never reused by accident, but otherwise just 
-		// decrement the pointer.
-		//
-		vector->elements[entry].element    = NULL;
-	}
-	else
-	{
-		// Need to shuffle trailing pointers back over the deleted entry
-		//
-		ANTLR3_MEMMOVE(vector->elements + entry, vector->elements + entry + 1, sizeof(ANTLR3_VECTOR_ELEMENT) * (vector->count - entry - 1));
-	}
-
-	// One less entry in the vector now
-	//
-	vector->count--;
-}
-
-static	void *		antlr3VectorGet     (pANTLR3_VECTOR vector, ANTLR3_UINT32 entry)
-{
-	// Ensure this is a valid request
-	//
-	if	(entry < vector->count)
-	{
-		return	vector->elements[entry].element;
-	}
-	else
-	{
-		// I know nothing, Mr. Fawlty!
-		//
-		return	NULL;
-	}
-}
-
-/// Remove the entry from the vector, but do not free any entry, even if it has
-/// a free pointer.
-///
-static	void *		antrl3VectorRemove  (pANTLR3_VECTOR vector, ANTLR3_UINT32 entry)
-{
-	void * element;
-
-	// Check this is a valid request first 
-	//
-	if	(entry >= vector->count)
-	{
-		return NULL;
-	}
-
-	// Valid request, return the sorted pointer
-	//
-
-	element				    = vector->elements[entry].element;
-
-	if	(entry == vector->count - 1)
-	{
-		// Ensure the pointer is never reused by accident, but otherwise just 
-		// decrement the pointer.
-		///
-		vector->elements[entry].element    = NULL;
-		vector->elements[entry].freeptr    = NULL;
-	}
-	else
-	{
-		// Need to shuffle trailing pointers back over the deleted entry
-		//
-		ANTLR3_MEMMOVE(vector->elements + entry, vector->elements + entry + 1, sizeof(ANTLR3_VECTOR_ELEMENT) * (vector->count - entry - 1));
-	}
-
-	// One less entry in the vector now
-	//
-	vector->count--;
-
-	return  element;
-}
-
-static  void
-antlr3VectorResize  (pANTLR3_VECTOR vector, ANTLR3_UINT32 hint)
-{
-	ANTLR3_UINT32	newSize;
-
-	// Need to resize the element pointers. We double the allocation
-	// we already have unless asked for a specific increase.
-    //
-    if (hint == 0 || hint < vector->elementsSize)
-    {
-        newSize = vector->elementsSize * 2;
-    }
-    else
-    {
-        newSize = hint * 2;
-    }
-
-    // Now we know how many we need, so we see if we have just expanded
-    // past the built in vector elements or were already past that
-    //
-    if  (vector->elementsSize > ANTLR3_VECTOR_INTERNAL_SIZE)
-    {
-        // We were already larger than the internal size, so we just
-        // use realloc so that the pointers are copied for us
-        //
-        vector->elements	= (pANTLR3_VECTOR_ELEMENT)ANTLR3_REALLOC(vector->elements, (sizeof(ANTLR3_VECTOR_ELEMENT)* newSize));
-    }
-    else
-    {
-        // The current size was less than or equal to the internal array size and as we always start
-        // with a size that is at least the maximum internal size, then we must need to allocate new memory
-        // for external pointers. We don't want to take the time to calculate if a requested element
-        // is part of the internal or external entries, so we copy the internal ones to the new space
-        //
-        vector->elements	= (pANTLR3_VECTOR_ELEMENT)ANTLR3_MALLOC((sizeof(ANTLR3_VECTOR_ELEMENT)* newSize));
-        ANTLR3_MEMCPY(vector->elements, vector->internal, ANTLR3_VECTOR_INTERNAL_SIZE * sizeof(ANTLR3_VECTOR_ELEMENT));
-    }
-
-	vector->elementsSize	= newSize;
-}
-
-/// Add the supplied pointer and freeing function pointer to the list,
-/// expanding the vector if needed.
-///
-static	ANTLR3_UINT32    antlr3VectorAdd	    (pANTLR3_VECTOR vector, void * element, void (ANTLR3_CDECL *freeptr)(void *))
-{
-	// Do we need to resize the vector table?
-	//
-	if	(vector->count == vector->elementsSize)
-	{
-		antlr3VectorResize(vector, 0);	    // Give no hint, we let it add 1024 or double it
-	}
-
-	// Insert the new entry
-	//
-	vector->elements[vector->count].element	= element;
-	vector->elements[vector->count].freeptr	= freeptr;
-
-	vector->count++;	    // One more element counted
-
-	return  (ANTLR3_UINT32)(vector->count);
-
-}
-
-/// Replace the element at the specified entry point with the supplied
-/// entry.
-///
-static	ANTLR3_UINT32    
-antlr3VectorSet	    (pANTLR3_VECTOR vector, ANTLR3_UINT32 entry, void * element, void (ANTLR3_CDECL *freeptr)(void *), ANTLR3_BOOLEAN freeExisting)
-{
-
-	// If the vector is currently not big enough, then we expand it
-	//
-	if (entry >= vector->elementsSize)
-	{
-		antlr3VectorResize(vector, entry);	// We will get at least this many 
-	}
-
-	// Valid request, replace the current one, freeing any prior entry if told to
-	//
-	if	(		entry < vector->count						// If actually replacing an element
-			&&	freeExisting								// And told to free any existing element
-			&&	vector->elements[entry].freeptr != NULL		// And the existing element has a free pointer
-		)
-	{
-		vector->elements[entry].freeptr(vector->elements[entry].element);
-	}
-
-	// Install the new pointers
-	//
-	vector->elements[entry].freeptr	= freeptr;
-	vector->elements[entry].element	= element;
-
-	if (entry >= vector->count)
-	{
-		vector->count = entry + 1;
-	}
-	return  (ANTLR3_UINT32)(entry);	    // Indicates the replacement was successful
-
-}
-
-/// Replace the element at the specified entry point with the supplied
-/// entry.
-///
-static	ANTLR3_BOOLEAN
-antlr3VectorSwap	    (pANTLR3_VECTOR vector, ANTLR3_UINT32 entry1, ANTLR3_UINT32 entry2)
-{
-
-    void               * tempEntry;
-    void (ANTLR3_CDECL *freeptr)(void *);
-
-	// If the vector is currently not big enough, then we do nothing
-	//
-	if (entry1 >= vector->elementsSize || entry2 >= vector->elementsSize)
-	{
-        return ANTLR3_FALSE;
-	}
-
-	// Valid request, swap them
-	//
-    tempEntry   = vector->elements[entry1].element;
-    freeptr     = vector->elements[entry1].freeptr;
-
-	// Install the new pointers
-	//
-    vector->elements[entry1].freeptr	= vector->elements[entry2].freeptr;
-	vector->elements[entry1].element	= vector->elements[entry2].element;
-
-	vector->elements[entry2].freeptr	= freeptr;
-	vector->elements[entry2].element	= tempEntry;
-
-	return  ANTLR3_TRUE;
-
-}
-
-static	ANTLR3_UINT32   antlr3VectorSize    (pANTLR3_VECTOR vector)
-{
-    return  vector->count;
-}
-
-#ifdef ANTLR3_WINDOWS
-#pragma warning	(push)
-#pragma warning (disable : 4100)
-#endif
-/// Vector factory creation
-///
-ANTLR3_API pANTLR3_VECTOR_FACTORY
-antlr3VectorFactoryNew	    (ANTLR3_UINT32 sizeHint)
-{
-	pANTLR3_VECTOR_FACTORY  factory;
-
-	// Allocate memory for the factory
-	//
-	factory = (pANTLR3_VECTOR_FACTORY)ANTLR3_MALLOC((size_t)(sizeof(ANTLR3_VECTOR_FACTORY)));
-
-	if	(factory == NULL)
-	{
-		return	NULL;
-	}
-
-	// Factory memory is good, so create a new vector pool
-	//
-    factory->pools      = NULL;
-    factory->thisPool   = -1;
-
-    newPool(factory);
-
-    // Initialize the API, ignore the hint as this algorithm does
-    // a better job really.
-    //
-    antlr3SetVectorApi(&(factory->unTruc), ANTLR3_VECTOR_INTERNAL_SIZE);
-    
-    factory->unTruc.factoryMade = ANTLR3_TRUE;
-
-	// Install the factory API
-	//
-	factory->close			= closeVectorFactory;
-	factory->newVector		= newVector;
-	factory->returnVector	= returnVector;
-
-	// Create a stack to accumulate reusable vectors
-	//
-	factory->freeStack		= antlr3StackNew(16);
-	return  factory;
-}
-#ifdef ANTLR3_WINDOWS
-#pragma warning	(pop)
-#endif
-
-static	void				
-returnVector		(pANTLR3_VECTOR_FACTORY factory, pANTLR3_VECTOR vector)
-{
-	// First we need to clear out anything that is still in the vector
-	//
-	vector->clear(vector);
-
-	// We have a free stack available so we can add the vector we were
-	// given into the free chain. The vector has to have come from this
-	// factory, so we already know how to release its memory when it
-	// dies by virtue of the factory being closed.
-	//
-	factory->freeStack->push(factory->freeStack, vector, NULL);
-
-	// TODO: remove this line once happy printf("Returned vector %08X to the pool, stack size is %d\n", vector, factory->freeStack->size(factory->freeStack));
-}
-
-static void
-newPool(pANTLR3_VECTOR_FACTORY factory)
-{
-    /* Increment factory count
-     */
-    factory->thisPool++;
-
-    /* Ensure we have enough pointers allocated
-     */
-    factory->pools = (pANTLR3_VECTOR *)
-		     ANTLR3_REALLOC(	(void *)factory->pools,	    /* Current pools pointer (starts at NULL)	*/
-					(ANTLR3_UINT32)((factory->thisPool + 1) * sizeof(pANTLR3_VECTOR *))	/* Memory for new pool pointers */
-					);
-
-    /* Allocate a new pool for the factory
-     */
-    factory->pools[factory->thisPool]	=
-			    (pANTLR3_VECTOR)
-				ANTLR3_MALLOC((size_t)(sizeof(ANTLR3_VECTOR) * ANTLR3_FACTORY_VPOOL_SIZE));
-
-
-    /* Reset the counters
-     */
-    factory->nextVector	= 0;
-
-    /* Done
-     */
-    return;
-}
-
-static  void		
-closeVectorFactory  (pANTLR3_VECTOR_FACTORY factory)
-{
-    pANTLR3_VECTOR      pool;
-    ANTLR3_INT32        poolCount;
-    ANTLR3_UINT32       limit;
-    ANTLR3_UINT32       vector;
-    pANTLR3_VECTOR      check;
-
-	// First see if we have a free chain stack to release?
-	//
-	if	(factory->freeStack != NULL)
-	{
-		factory->freeStack->free(factory->freeStack);
-	}
-
-    /* We iterate the vector pools one at a time
-     */
-    for (poolCount = 0; poolCount <= factory->thisPool; poolCount++)
-    {
-        /* Pointer to current pool
-         */
-        pool = factory->pools[poolCount];
-
-        /* Work out how many tokens we need to check in this pool.
-         */
-        limit = (poolCount == factory->thisPool ? factory->nextVector : ANTLR3_FACTORY_VPOOL_SIZE);
-
-        /* Marginal condition, we might be at the start of a brand new pool
-         * where the nextToken is 0 and nothing has been allocated.
-         */
-        if (limit > 0)
-        {
-            /* We have some vectors allocated from this pool
-             */
-            for (vector = 0; vector < limit; vector++)
-            {
-                /* Next one in the chain
-                 */
-                check = pool + vector;
-
-                // Call the free function on each of the vectors in the pool,
-                // which in turn will cause any elements it holds that also have a free
-                // pointer to be freed. However, because any vector may be in any other
-                // vector, we don't free the element allocations yet. We do that in a
-                // a specific pass, coming up next. The vector free function knows that
-                // this is a factory allocated pool vector and so it won't free things it
-                // should not.
-                //
-                check->free(check);
-            }
-        }
-    }
-
-    /* We iterate the vector pools one at a time once again, but this time
-     * we are going to free up any allocated element pointers. Note that we are doing this
-     * so that we do not try to release vectors twice. When building ASTs we just copy
-     * the vectors all over the place and they may be embedded in this vector pool
-     * numerous times.
-     */
-    for (poolCount = 0; poolCount <= factory->thisPool; poolCount++)
-    {
-        /* Pointer to current pool
-         */
-        pool = factory->pools[poolCount];
-
-        /* Work out how many tokens we need to check in this pool.
-         */
-        limit = (poolCount == factory->thisPool ? factory->nextVector : ANTLR3_FACTORY_VPOOL_SIZE);
-
-        /* Marginal condition, we might be at the start of a brand new pool
-         * where the nextToken is 0 and nothing has been allocated.
-         */
-        if (limit > 0)
-        {
-            /* We have some vectors allocated from this pool
-             */
-            for (vector = 0; vector < limit; vector++)
-            {
-                /* Next one in the chain
-                 */
-                check = pool + vector;
-
-                // Anything in here should be factory made, but we do this just
-                // to triple check. We just free up the elements if they were
-                // allocated beyond the internal size.
-                //
-                if (check->factoryMade == ANTLR3_TRUE && check->elementsSize > ANTLR3_VECTOR_INTERNAL_SIZE)
-                {
-                    ANTLR3_FREE(check->elements);
-                    check->elements = NULL;
-                }
-            }
-        }
-
-        // We can now free this pool allocation as we have called free on every element in every vector
-        // and freed any memory for pointers the grew beyond the internal size limit.
-        //
-        ANTLR3_FREE(factory->pools[poolCount]);
-        factory->pools[poolCount] = NULL;
-    }
-
-    /* All the pools are deallocated we can free the pointers to the pools
-     * now.
-     */
-    ANTLR3_FREE(factory->pools);
-
-    /* Finally, we can free the space for the factory itself
-     */
-    ANTLR3_FREE(factory);
-
-}
-
-static pANTLR3_VECTOR
-newVector(pANTLR3_VECTOR_FACTORY factory)
-{
-    pANTLR3_VECTOR vector;
-
-	// If we have anything on the re claim stack, reuse it
-	//
-	vector = factory->freeStack->peek(factory->freeStack);
-
-	if  (vector != NULL)
-	{
-		// Cool we got something we could reuse
-		//
-		factory->freeStack->pop(factory->freeStack);
-
-		// TODO: remove this line once happy printf("Reused vector %08X from stack, size is now %d\n", vector, factory->freeStack->size(factory->freeStack));
-		return vector;
-
-	}
-
-	// See if we need a new vector pool before allocating a new
-    // one
-    //
-    if (factory->nextVector >= ANTLR3_FACTORY_VPOOL_SIZE)
-    {
-        // We ran out of vectors in the current pool, so we need a new pool
-        //
-        newPool(factory);
-    }
-
-    // Assuming everything went well (we are trying for performance here so doing minimal
-    // error checking. Then we can work out what the pointer is to the next vector.
-    //
-    vector = factory->pools[factory->thisPool] + factory->nextVector;
-    factory->nextVector++;
-
-    // We have our token pointer now, so we can initialize it to the predefined model.
-    //
-    antlr3SetVectorApi(vector, ANTLR3_VECTOR_INTERNAL_SIZE);
-    vector->factoryMade = ANTLR3_TRUE;
-
-    // We know that the pool vectors are created at the default size, which means they
-    // will start off using their internal entry pointers. We must intialize our pool vector
-    // to point to its own internal entry table and not the pre-made one.
-    //
-    vector->elements = vector->internal;
-
-		// TODO: remove this line once happy printf("Used a new vector at %08X from the pools as nothing on the reusue stack\n", vector);
-
-    // And we are done
-    //
-    return vector;
-}
-
-/** Array of left most significant bit positions for an 8 bit
- *  element provides an efficient way to find the highest bit
- *  that is set in an n byte value (n>0). Assuming the values will all hit the data cache,
- *  coding without conditional elements should allow branch
- *  prediction to work well and of course a parallel instruction cache
- *  will whip through this. Otherwise we must loop shifting a one
- *  bit and masking. The values we tend to be placing in out integer
- *  patricia trie are usually a lot lower than the 64 bits we
- *  allow for the key allows. Hence there is a lot of redundant looping and
- *  shifting in a while loop. Whereas, the lookup table is just
- *  a few ands and indirect lookups, while testing for 0. This
- *  is likely to be done in parallel on many processors available
- *  when I wrote this. If this code survives as long as yacc, then
- *  I may already be dead by the time you read this and maybe there is
- *  a single machine instruction to perform the operation. What
- *  else are you going to do with all those transistors? Jim 2007
- *
- * The table is probably obvious but it is just the number 0..7
- * of the MSB in each integer value 0..256
- */
-static ANTLR3_UINT8 bitIndex[256] = 
-{ 
-    0,													// 0 - Just for padding
-    0,													// 1
-    1, 1,												// 2..3
-    2, 2, 2, 2,											// 4..7
-    3, 3, 3, 3, 3, 3, 3, 3,								// 8+
-    4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,	    // 16+
-    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,	    // 32+
-	5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,	    
-    6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,	    // 64+
-	6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
-	6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
-	6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 
-    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,	    // 128+
-	7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-	7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-	7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-	7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-	7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 
-	7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-	7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
-};
-
-/** Rather than use the bit index of a trie node to shift
- *  0x01 left that many times, then & with the result, it is
- *  faster to use the bit index as an index into this table
- *  which holds precomputed masks for any of the 64 bits
- *  we need to mask off singly. The data values will stay in
- *  cache while ever a trie is in heavy use, such as in
- *  memoization. It is also pretty enough to be ASCII art.
- */
-static ANTLR3_UINT64 bitMask[64] = 
-{
-    0x0000000000000001ULL, 0x0000000000000002ULL, 0x0000000000000004ULL, 0x0000000000000008ULL,
-    0x0000000000000010ULL, 0x0000000000000020ULL, 0x0000000000000040ULL, 0x0000000000000080ULL,
-    0x0000000000000100ULL, 0x0000000000000200ULL, 0x0000000000000400ULL, 0x0000000000000800ULL,
-    0x0000000000001000ULL, 0x0000000000002000ULL, 0x0000000000004000ULL, 0x0000000000008000ULL,
-    0x0000000000010000ULL, 0x0000000000020000ULL, 0x0000000000040000ULL, 0x0000000000080000ULL,
-    0x0000000000100000ULL, 0x0000000000200000ULL, 0x0000000000400000ULL, 0x0000000000800000ULL,
-    0x0000000001000000ULL, 0x0000000002000000ULL, 0x0000000004000000ULL, 0x0000000008000000ULL,
-    0x0000000010000000ULL, 0x0000000020000000ULL, 0x0000000040000000ULL, 0x0000000080000000ULL,
-    0x0000000100000000ULL, 0x0000000200000000ULL, 0x0000000400000000ULL, 0x0000000800000000ULL,
-    0x0000001000000000ULL, 0x0000002000000000ULL, 0x0000004000000000ULL, 0x0000008000000000ULL,
-    0x0000010000000000ULL, 0x0000020000000000ULL, 0x0000040000000000ULL, 0x0000080000000000ULL,
-    0x0000100000000000ULL, 0x0000200000000000ULL, 0x0000400000000000ULL, 0x0000800000000000ULL,
-    0x0001000000000000ULL, 0x0002000000000000ULL, 0x0004000000000000ULL, 0x0008000000000000ULL,