Merge tag 'upstream/2.9_beta1+ds' into experimental
authorgregor herrmann <gregoa@debian.org>
Mon, 29 Oct 2012 17:49:59 +0000 (18:49 +0100)
committergregor herrmann <gregoa@debian.org>
Mon, 29 Oct 2012 17:49:59 +0000 (18:49 +0100)
Upstream version 2.9~beta1+ds

Conflicts:
build.number
src/resource/build.properties

(removed)

33 files changed:
build.number [deleted file]
debian/README.Debian [new file with mode: 0644]
debian/README.source [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/clean [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/jabref-wrapper [new file with mode: 0644]
debian/jabref.1 [new file with mode: 0644]
debian/jabref.bug-presubj [new file with mode: 0644]
debian/jabref.desktop [new file with mode: 0644]
debian/jabref.dirs [new file with mode: 0644]
debian/jabref.docs [new file with mode: 0644]
debian/jabref.install [new file with mode: 0644]
debian/jabref.links [new file with mode: 0644]
debian/jabref.manpages [new file with mode: 0644]
debian/jabref.menu [new file with mode: 0644]
debian/jabref.mime [new file with mode: 0644]
debian/jabref.sharedmimeinfo [new file with mode: 0644]
debian/patches/02_libs.patch [new file with mode: 0644]
debian/patches/05_antlr32.patch [new file with mode: 0644]
debian/patches/06_BibtexEntry.patch [new file with mode: 0644]
debian/patches/07_pdfbox1.5.patch [new file with mode: 0644]
debian/patches/08_doubleextensions.patch [new file with mode: 0644]
debian/patches/09_looks2.5.patch [new file with mode: 0644]
debian/patches/series [new file with mode: 0644]
debian/repack.local [new file with mode: 0644]
debian/repack.stub [new file with mode: 0755]
debian/rules [new file with mode: 0755]
debian/source/format [new file with mode: 0644]
debian/watch [new file with mode: 0644]
src/resource/build.properties [deleted file]

diff --git a/build.number b/build.number
deleted file mode 100644 (file)
index 864e538..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#Build Number for ANT. Do not edit!
-#Thu Oct 25 19:21:59 CEST 2012
-build.number=395
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644 (file)
index 0000000..4d979d5
--- /dev/null
@@ -0,0 +1,15 @@
+JabRef for Debian
+-----------------
+
+Please note that JabRef needs OpenJDK (or Sun Java 6).
+
+Starting with version 2.2-01-4 /usr/bin/jabref should find and use your
+installed OpenJDK or Sun Java virtual machine.
+
+In case it doesn't find any of them it falls back to using another JVM it
+finds on your system.
+
+If you want to override this selection mechanism start JabRef with
+       JAVA_HOME=/path/to/your/JVM jabref
+
+ -- gregor herrmann <gregoa@debian.org>  Fri, 21 Nov 2008 21:27:10 +0100
diff --git a/debian/README.source b/debian/README.source
new file mode 100644 (file)
index 0000000..8e9d673
--- /dev/null
@@ -0,0 +1,13 @@
+The files ./src/java/net/sf/jabref/bst/BstLexer.java and
+./src/java/net/sf/jabref/bst/BstParser.java are generated with
+the command (also note that the Bst.g file is included in the patch
+debian/patches/05_antlrv32.patch):
+
+       antlr3 Bst.g
+
+After generation, they are hand-edited to contain the proper
+Java package name and to correct an issue with the _channel
+member field.  The maintainers are working with upstream to 
+either include the generation as part of the build process
+or to ship the upstream tarball with versions of the parser
+and lexer that operate with antlr 3.2.
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..282c850
--- /dev/null
@@ -0,0 +1,599 @@
+jabref (2.7~beta1+ds-7) UNRELEASED; urgency=low
+
+  * Update years of packaging copyright.
+
+ -- gregor herrmann <gregoa@debian.org>  Fri, 10 Feb 2012 21:43:49 +0100
+
+jabref (2.7~beta1+ds-6) unstable; urgency=low
+
+  * Update Vcs-* headers.
+  * Add patch 09_looks2.5.patch to build against libjgoodies-looks-java >=
+    2.5.0.
+  * Drop patch 01_free_javac.patch, not needed anymore. Make (build)
+    dependency on libjgoodies-looks-java versioned.
+  * Switch to "3.0 (quilt)" source format. Remove quilt framework, update
+    debian/README.source.
+  * Drop get-orig-source target, uscan and git-import-orig work fine.
+
+ -- gregor herrmann <gregoa@debian.org>  Fri, 10 Feb 2012 21:37:59 +0100
+
+jabref (2.7~beta1+ds-5) unstable; urgency=low
+
+  * New patch 08_doubleextensions.patch, kindly backported and provided by
+    upstream: improve handling of linked files with double extensions: file
+    types with a double extension are new recognized automatically when a new
+    link is added manually, or when a link is added automatically and
+    clicked-upon once, after defining the file type in the options
+    (closes: #626582).
+  * Bump debhelper compatibility level to 8.
+  * Set Standards-Version to 3.9.2 (no changes).
+  * Change order of arguments for dh in debian/rules.
+
+ -- gregor herrmann <gregoa@debian.org>  Fri, 01 Jul 2011 03:08:59 +0200
+
+jabref (2.7~beta1+ds-4) unstable; urgency=low
+
+  [ tony mancill ]
+  * Add patch to build against libpdfbox-1.5.0+dfsg.
+
+  [ gregor herrmann ]
+  * Remove version from java-wrappers dependency, already satisfied in
+    oldstable.
+  * debian/copyright: update years of packaging copyright.
+
+ -- gregor herrmann <gregoa@debian.org>  Thu, 31 Mar 2011 17:15:22 +0200
+
+jabref (2.7~beta1+ds-3) unstable; urgency=low
+
+  * Edit jabref wrapper script to resolve libjgoodies-common-java jar.
+    Add libjgoodies-common-java to Depends.  (Closes: #614506)
+  * Change "looks" in wrapper script to "jgoodies-looks" 
+
+ -- tony mancill <tmancill@debian.org>  Mon, 21 Feb 2011 20:04:55 -0800
+
+jabref (2.7~beta1+ds-2) unstable; urgency=low
+
+  * Upload to unstable.
+
+ -- gregor herrmann <gregoa@debian.org>  Mon, 07 Feb 2011 18:45:19 +0100
+
+jabref (2.7~beta1+ds-1) experimental; urgency=low
+
+  * New upstream release.
+  * debian/control: uniform spelling of BibTex; thanks to Erik Esterer for the
+    bug report and patch (closes: #596946).
+  * Refresh patches.
+  * Update name of jar file in debian/jabref.{install,links}.
+  * Update debian/copyright (year of upstream copyright, formatting).
+
+ -- gregor herrmann <gregoa@debian.org>  Tue, 18 Jan 2011 18:42:33 +0100
+
+jabref (2.6+ds-4) unstable; urgency=low
+
+  [ gregor herrmann ]
+  * 02_libs.patch: add antlr3-runtime.jar to classpath.
+  * Make build and runtime dependency on antlr3 versioned.
+  * Set Standards-Version to 3.9.1 (no changes).
+
+  [ tony mancill ]
+  * delete 05_antlr.patch 
+  * add 05_antlrv32.patch: include new BstParser/Lexer classes generated
+    by antlr 3.2.  (Closes: #591124)
+  * Update README.source with information regarding regeneration of 
+    BstParser and BstLexer classes.
+
+ -- tony mancill <tmancill@debian.org>  Tue, 03 Aug 2010 19:41:44 -0700
+
+jabref (2.6+ds-3) unstable; urgency=low
+
+  * Improve wrapper script to avoid unnecessary warnings; thanks to Martin
+    Lutz for the bug report and to Onkar Shinde for the instructions
+    (closes: #586781).
+
+ -- gregor herrmann <gregoa@debian.org>  Tue, 22 Jun 2010 20:27:14 +0200
+
+jabref (2.6+ds-2) unstable; urgency=low
+
+  * debian/control: add "Recommends: xdg-utils"; thanks to Vincent Fourmond
+    for the bug report (closes: #579346). Change xpdf to xpdf-reader in
+    Suggests.
+
+ -- gregor herrmann <gregoa@debian.org>  Tue, 27 Apr 2010 16:49:34 +0200
+
+jabref (2.6+ds-1) unstable; urgency=low
+
+  * New upstream release.
+  * Adapt name of jar file in debian/jabref.{install,links}.
+  * Remove patch 03_external_apps.patch, refresh patches 02_libs.patch and
+    06_BibtexEntry.patch.
+  * Add a debian/source/format file.
+
+ -- gregor herrmann <gregoa@debian.org>  Thu, 15 Apr 2010 20:03:46 +0200
+
+jabref (2.6~beta3+ds-1) unstable; urgency=low
+
+  * New upstream release:
+    - debian/repack.local: don't remove the three "offending" files,
+      two were removed upstream, the third was re-licensed
+    - adjust debian/copyright accordingly
+    - change version suffix to +ds since we are not repackaging for license
+      issues anymore
+    - remove patches 07_PreviewPanel.patch and 08_HighlightFilter.patch,
+      applied upstream
+    - refresh patches 03_external_apps.patch and 06_BibtexEntry.patch
+    - adapt name of jar file in debian/jabref.{install,links}
+  * Add jabref-plugin-oo to Suggests:.
+
+ -- gregor herrmann <gregoa@debian.org>  Mon, 15 Mar 2010 21:42:25 +0100
+
+jabref (2.6~beta2+dfsg-2) unstable; urgency=low
+
+  * Add back sun-java6-jre as an alternative runtime dependency.
+  * debian/control: change build dependency from default-jdk-builddep to
+    default-jdk.
+  * Set Standards-Version to 3.8.4 (no changes).
+
+ -- gregor herrmann <gregoa@debian.org>  Mon, 08 Feb 2010 21:37:58 +0100
+
+jabref (2.6~beta2+dfsg-1) unstable; urgency=low
+
+  [ gregor herrmann ]
+  * Move from contrib to main since all build and runtime dependencies are in
+    main now (closes: #548180).
+  * Remove sun-java6-jre from Depends.
+  * Repack upstream tarball to remove the sourceless pre-compiled libraries
+    and some files without (free) licenses.
+  * Add HighlightFilter patch to work without HighlightFilter.java.
+  * debian/rules: override dh_auto_clean, `ant clean' fails with an unpatched
+    build.xml after removing lib/. Move ant from B-D to B-D-I since it's not
+    used in the clean target anymore.
+  * debian/clean: remove build.number and src/resource/build.properties, they
+    get re-generated on each build.
+  * Install reportbug presubj file via dh_bugfiles.
+  * debian/copyright: update formatting and list of third-party copyright
+    holders. 
+
+  [ tony mancill ]
+  * Add PreviewPanel patch to remove dependency on DocumentPrinter class.
+
+ -- gregor herrmann <gregoa@debian.org>  Mon, 18 Jan 2010 18:35:50 +0100
+
+jabref (2.6~beta2-1) unstable; urgency=low
+
+  * Remove alternative dependency on sun-java5-jre which was removed from the
+    archive. Also adjust README.Debian and /usr/bin/jabref.
+  * New upstream beta release:
+    - fixes "allow to disable (re)storing of current tab for entries"
+      (closes: #447767)
+    - thanks again to Philip Rinn for his help with the upgrade
+  * debian/copyright: add new developer.
+  * Refresh patches 01_free_javac.patch and 06_BibtexEntry.patch.
+  * Adjust debian/jabref.links and debian/jabref.install to new jar file.
+  * Simplify debian/jabref.dirs.
+  * Add a presubj fragment for reportbug.
+
+ -- gregor herrmann <gregoa@debian.org>  Tue, 01 Dec 2009 18:52:51 +0100
+
+jabref (2.5-1) unstable; urgency=low
+
+  * New upstream release (closes: #497897, LP: #301327). This version also
+    fixes the following Debian bugs:
+    - "field data lost when switching tabs without leaving field first"
+      (closes: #498926)
+    - "jumps back to previously edited entry when clicking title field"
+      (closes: #447772)
+    - "File type detection of downloaded files should use MIME type"
+      (closes: #448028)
+    - "autocompletion for crossref fields"
+      (closes: #481503)
+    - "text selection visual bug" (closes: #527323)
+    - "auto-completion in author field wrong" (closes: #442476)
+  * Add new build and runtime dependencies: libmysql-java,
+    libcommons-logging-java, libjpf-java, libjpfcodegen-java, velocity.
+  * Switch to debhelper 7; adjust debian/{compat,control,rules}.
+  * Rename a couple of files in debian/ to debian/jabref.foo for consistency.
+  * Adjust debian/jabref.links and debian/jabref.install to new jar file.
+  * Update /usr/bin/jabref to use the new libs.
+  * Update manpage.
+  * Update package/program description in debian/control and in jabref.1
+    according to the upstream README.
+  * Update debian/copyright.
+  * Patches:
+    - update 01_free_javac.patch, 02_libs.patch, 03_external_apps.patch,
+      05_antlr.patch
+    - remove 04_HONOR_DISPLAY_PROPERTIES.patch, not needed any more
+    - remove 06_forms_groups.patch, applied upstream
+    - add new 06_BibtexEntry.patch
+  * Set Standards-Version to 3.8.3.
+  * Thanks a lot to Philip Rinn for his great help in preparing this release,
+    especially with the patches, dependencies, and the wrapper script!
+
+ -- gregor herrmann <gregoa@debian.org>  Sun, 13 Sep 2009 22:01:22 +0200
+
+jabref (2.3.1-6) unstable; urgency=low
+
+  * debian/watch: back to the redirector at qa.debian.org.
+  * Use java-wrappers instead of the hand-crafted wrapper script; thanks to
+    Vincent Fourmond for the patch (closes: #506219).
+  * Update README.Debian: mention supported Java virtual machines and
+    JAVA_HOME (cf. LP: #258198).
+  * debian/rules: set JAVA_HOME=/usr/lib/jvm/default-java.
+
+ -- gregor herrmann <gregoa@debian.org>  Fri, 21 Nov 2008 21:46:28 +0100
+
+jabref (2.3.1-5) unstable; urgency=low
+
+  * Change runtime dependency from "sun-java6-jre | sun-java5-jre" to
+    "openjdk-6-jre | sun-java6-jre | sun-java5-jre" (closes: #383006).
+    [Jabref stays in contrib because it (build) depends on libspin-java and
+    libpdfbox-java which are in contrib because they build depend on packages
+    in contrib/non-free.]
+  * debian/copyright: wrap long line.
+
+ -- gregor herrmann <gregoa@debian.org>  Wed, 16 Jul 2008 22:24:25 +0200
+
+jabref (2.3.1-4) unstable; urgency=low
+
+  * Replace /usr/lib/jvm/java-7-icedtea with /usr/lib/jvm/java-6-openjdk in
+    wrapper script. Doesn't work on Debian yet but helps Ubuntu users (cf.
+    LP: #225450 and LP: #203636).
+  * debian/watch: use sourceforge URL directly instead of the redirector
+    at qa.debian.org.
+  * Switch patch system from dpatch to quilt.
+  * debian/rules: remove configure{,-stamp} targets.
+  * Set Standards-Version to 3.8.0; add debian/README.source to document the
+    patch system.
+  * Add patch 06_forms_groups.patch to fix an exception in the groups
+    interface; thanks to Monkey D. Luffy for the bug report and to Philipp
+    Spitzer for helping me to produce a patch (closes: #487481).
+
+ -- gregor herrmann <gregoa@debian.org>  Wed, 02 Jul 2008 20:07:03 +0200
+
+jabref (2.3.1-3) unstable; urgency=low
+
+  * Build against Debian libraries instead of pre-packaged ones
+    (closes: #389068):
+    - adapt and reactivate patch 02_libs.dpatch: use libraries in
+      /usr/share/java for building and don't include them in jabref.jar
+    - add needed jars to Classpath in the wrapper script
+    - add patch 05_antlr.dpatch: antlr3 in Debian is newer than the
+      pre-packaged jar
+    - add necessary packages to Build-Depends-Indep and Depends
+    These changes are either taken directly from Gerardo Curiel's patch or
+    based on them -- thanks a lot!
+  * debian/watch: add uversionmangle to cope with upstream b(eta) releases.
+  * Move wrapper script in source package to debian/jabref-wrapper and
+    install it from debian/rules.
+  * Remove debian docs and install upstream README directly from
+    debian/rules.
+  * debian/control:
+    - change my email address
+    - replace java-gcj-compat-dev with default-jdk-builddep in
+      Build-Depends-Indep
+
+ -- gregor herrmann <gregoa@debian.org>  Tue, 22 Apr 2008 21:33:33 +0200
+
+jabref (2.3.1-2) unstable; urgency=low
+
+  * Change pdfviewer to pdf-viewer in Suggests:.
+  * Set Standards-Version to 3.7.3 (no changes required).
+  * debian/rules: explicitly set JAVA_HOME.
+  * Only set JAVA to $JAVA_HOME/jre/bin/java if JAVA_HOME is not empty;
+    thanks to Michael Piefel for the hint.
+  * Set debhelper compatibility level to 6.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Mon, 11 Feb 2008 17:00:15 +0100
+
+jabref (2.3.1-1) unstable; urgency=low
+
+  * New upstream release.
+  * Adapt referenced filename in debian/links and debian/install.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Fri, 30 Nov 2007 14:28:00 +0100
+
+jabref (2.3-2) unstable; urgency=low
+
+  * Add /usr/lib/jvm/java-7-icedtea to wrapper script. Doesn't work on
+    Debian yet but helps Ubuntu users (TODO: add dependency on
+    icedtea-java7-jre (not yet in Debian)).
+  * Reformat wrapper script.
+  * debian/rules: re-arrange targets and their dependencies.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Fri, 16 Nov 2007 18:38:18 +0100
+
+jabref (2.3-1) unstable; urgency=low
+
+  * New upstream release, closes a bunch of bugs reported in the Debian BTS:
+    - "bibtexkey auto-generation cannot deal with quotes" (closes: #448917).
+    - "File download via CGI adds QUERY_STRING to suggested filename"
+      (closes: #448027).
+    - "File download aborted on click of OK" (closes: #448060).
+    - "Improve directory/filename handling on downloading" (closes: #442475).
+    - "ctrl-g should cause record to be saved" (closes: #443078).
+    - "version 2.3 released" (closes: #450789).
+  * Change XS-Vcs-* fields to Vcs-*.
+  * Adapt referenced filename in debian/links and debian/install.
+  * Sync debian/copyright with output of Help/About and reference
+    /usr/share/common-licenses/GPL-2.
+  * Install changelog_highlights.txt as upstream changelog.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Sun, 11 Nov 2007 01:58:27 +0100
+
+jabref (2.3~beta3-1) unstable; urgency=low
+
+  * New upstream release.
+  * Remove debian/manpages.
+  * Clean up debian/rules.
+  * Move upstream URL from the description to the new Homepage field.
+  * Use ant clean instead of manually removing the build directory in
+    debian/rules. Move ant from Build-Depends-Indep to Build-Depends.
+  * Update patch 03_external_apps.
+  * Remove patch 04_logger, not needed anymore.
+  * Create new patch 04_HONOR_DISPLAY_PROPERTIES.dpatch.
+  * Adapt referenced filename in debian/links and debian/install.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Tue, 09 Oct 2007 19:12:09 +0200
+
+jabref (2.3~beta2-1) unstable; urgency=low
+
+  * New upstream release.
+  * Add liblog4j1.2-java to build dependencies (and a new patch 04_logger to
+    be able to use it).
+  * Fix Categories entry in desktop file and remove Encoding.
+  * Sync debian/copyright with output of Help/About.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Wed, 29 Aug 2007 23:38:22 +0200
+
+jabref (2.3~beta1-2) unstable; urgency=low
+
+  * Change section in menu file to "Applications/Data Management" due to
+    the new Menu Policy starting with the upload of menu 2.1.35.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Wed, 04 Jul 2007 19:10:47 +0200
+
+jabref (2.3~beta1-1) unstable; urgency=low
+
+  * New upstream release.
+  * Adapt patch 03_external_apps.
+  * Add suggests to ps- and pdfviewers.
+  * Adapt manpage to output of jabref --help.
+  * Sync debian/copyright with output of Help/About.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Sat, 30 Jun 2007 16:45:44 +0200
+
+jabref (2.2-01-6) unstable; urgency=low
+
+  * Add patch 03_external_apps to change the default settings for some
+    external applications; thanks to Cédric Augonnet (closes: #421227).
+  * Convert debian/changelog to UTF-8 (again).
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Fri, 27 Apr 2007 15:07:18 +0200
+
+jabref (2.2-01-5) unstable; urgency=low
+
+  * Exec the Java interpreter in /usr/bin/jabref; thanks to Tobias Richter
+    (closes: #415019).
+  * Adapt README.Debian to the new wrapper script.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Fri, 16 Mar 2007 02:45:21 +0100
+
+jabref (2.2-01-4) unstable; urgency=low
+
+  * Change wrapper script /usr/bin/jabref to explicitly use the Sun Java
+    5 or 6 virtual machine (closes: #383019).
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Mon, 12 Mar 2007 20:01:27 +0100
+
+jabref (2.2-01-3) unstable; urgency=low
+
+  * Add call to dh_desktop to debian/rules.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Sun, 25 Feb 2007 15:56:32 +0100
+
+jabref (2.2-01-2) unstable; urgency=low
+
+  * Add mime support.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Mon,  5 Feb 2007 16:39:03 +0100
+
+jabref (2.2-01-1) unstable; urgency=low
+
+  * New upstream release.
+  * Change wrapper script, as "-v" acts as expcted; cf. #378189 for details
+    (also closes: #408081).
+  * Remove debian/source.lintian-overrides from source package, there are no longer
+    cvs remnants in the upstream tarball.
+  * Add .desktop file for easier integration into desktop environments.
+  * Add symlink /usr/share/java/JabRef-2.2.jar -> /usr/share/java/jabref.jar.
+  * Update debian/copright to reflect the changes as shown in the About Box.
+  * Add sun-java6-jre to Depends:, thanks to Gerhard Riener for the hint.
+  * Remove obsolete j2re1.5 | sun-j2sdk1.5 from Depends:.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Sat,  3 Feb 2007 15:48:11 +0100
+
+jabref (2.2~b2-1) unstable; urgency=low
+
+  * New upstream release:
+    - undistributable fonts no longer included (closes: #393676);
+    - remove j2re1.4 from Depends, JabRef now needs Java 1.5;
+    - includes the patch to make Enter work in dialogs, therefore remove
+      patch 02_button;
+    - update patch 01_free_javac;
+    - update debian/copyright (new contributors);
+    - update debian/rules (icon file name changed).
+  * Fix typo in long description.
+  * Shorten call to ant and remove "-k" from dh_clean in debian/rules.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Sun, 26 Nov 2006 22:28:46 +0100
+
+jabref (2.1-4) unstable; urgency=low
+
+  * Apply patch from Matthias Klose to enable building with a free java compiler -
+    thanks! (Cf. #383006)
+  * Change build dependencies accordingly.
+  * Apply patch from Morten Omholt Alver (upstream author) to enable 'enter' in
+    dialogs - thanks! (Closes: #387235)
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Mon, 25 Sep 2006 00:32:40 +0200
+
+jabref (2.1-3) unstable; urgency=low
+
+  * Change menu section to "Apps/Databases" and remove lintian override.
+    "Apps/Data Management" was premature, thanks to Frank Küster and 
+    Bill Allombert for pointing this out (cf. #386320).
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Mon, 11 Sep 2006 21:12:37 +0200
+
+jabref (2.1-2) unstable; urgency=low
+
+  * Change menu section to "Apps/Data Management", thanks to Frank Küster
+    (closes: #386320).
+  * Add lintian override for this new section.
+  * Convert changelog to UTF-8.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Thu,  7 Sep 2006 16:42:27 +0200
+
+jabref (2.1-1) unstable; urgency=low
+
+  * New upstream release (closes: #382310, #379704).
+  * Change back wrapper script, as the behaviour of "-v" changed in the
+    new release (cf. #378189 for details).
+  * Menu icons now created from PNGs in upstream tarball, therefore add build
+    dependency on imagemagick.
+  * Clean up README.Debian.
+  * Update debian/copright to reflect the changes as shown in the About Box.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Fri, 11 Aug 2006 12:09:45 +0200
+
+jabref (2.0.1+2.1b2-6) unstable; urgency=low
+
+  * Update menu icons, the new ones are kindly provided by Morten Omholt Alver
+    (upstream author) - thanks!
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Tue,  1 Aug 2006 22:31:16 +0200
+
+jabref (2.0.1+2.1b2-5) unstable; urgency=low
+
+  * Now really change debian/copyright.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Mon, 31 Jul 2006 21:40:47 +0200
+
+jabref (2.0.1+2.1b2-4) unstable; urgency=low
+
+  * Add icon to menu entry, thanks to LI Daobing for the idea
+    (closes: #380604).
+  * Remove references to the libraries Commons Logging and Commons HTTP Client
+    from debian/copyright, as they are not included in the upstream tarball 
+    any more.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Mon, 31 Jul 2006 16:37:47 +0200
+
+jabref (2.0.1+2.1b2-3) unstable; urgency=low
+
+  * Convert debian/copyright to UTF-8.
+  * Mention startup options in manpage, thanks to LI Daobing (closes: #378190).
+  * Change wrapper script to always pass "-n" if called with "-v" in order
+    to make jabref only print the version number and quit afterwards with
+    "-v". Thanks to LI Daobing (closes: #378189).
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Fri, 14 Jul 2006 13:23:58 +0200
+
+jabref (2.0.1+2.1b2-2) unstable; urgency=low
+
+  * Pass command line parameters to /usr/bin/jabref and add hint about Sun
+    Java and update-alternatives to README.Debian (closes: #377316).
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Sat,  8 Jul 2006 12:51:40 +0200
+
+jabref (2.0.1+2.1b2-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Tue,  4 Jul 2006 16:42:35 +0200
+
+jabref (2.0.1+2.1b-3) unstable; urgency=low
+
+  * Changed order of Build-Depend-Indep.
+  * Cleaned up debian/rules.
+  * Moved dh_ calls in debian/rules to binary-indep target.
+  * Add lintian override (upstream tarball has .cvsignore stuff).
+  * Added Tony Mancill to Uploaders (thanks for sponsoring!).
+  * Clarified debian/copyright and fixed typo (thanks to Tony Mancill).
+  * Updated debhelper compatibility level to 5.
+  * Cleaned up debian/watch.
+  * Added menu entry.
+  * Intial upload to the Debian archive (closes: #205392).
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Wed, 14 Jun 2006 17:51:38 +0200
+
+jabref (2.0.1+2.1b-2) unstable; urgency=low
+
+  * Change dependencies to include several versions of the Sun JRE/JDK.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Tue, 30 May 2006 17:12:05 +0200
+
+jabref (2.0.1+2.1b-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Sat, 20 May 2006 17:06:49 +0200
+
+jabref (2.0.1-3) unstable; urgency=low
+
+  * Update to Standards-Version: 3.7.2 (no changes required).
+  * Change dependencies to new sun-java5-jre/jdk.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Wed, 17 May 2006 17:48:52 +0200
+
+jabref (2.0.1-2) unstable; urgency=low
+
+  * Update to Standards-Version: 3.7.0 (no changes required).
+  * Moved debhelper from Build-Depends-Indep to Build-Depends 
+    in debian/control.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Mon,  1 May 2006 14:44:02 +0200
+
+jabref (2.0.1-1) unstable; urgency=low
+
+  * New upstream release
+  * Set debhelper compatibility level to 5.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Fri,  3 Feb 2006 21:18:29 +0100
+
+jabref (1.8.1-2) unstable; urgency=low
+
+  * Added homepage to debian/control.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Sun, 25 Dec 2005 14:30:28 +0100
+
+jabref (1.8.1-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Fri,  7 Oct 2005 22:30:10 +0200
+
+jabref (1.8-4) unstable; urgency=low
+
+  * Fixed error in /usr/bin/jabref.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Tue, 13 Sep 2005 18:44:57 +0200
+
+jabref (1.8-3) unstable; urgency=low
+
+  * Trimmed Depends: to j2re1.4.
+  * Added j2sdk1 to Build-Depends-Indep.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Sun, 11 Sep 2005 01:24:05 +0200
+
+jabref (1.8-2) unstable; urgency=low
+
+  * Moved jabref.jar from /usr/share/java/jabref to ../
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Sat,  3 Sep 2005 02:45:23 +0200
+
+jabref (1.8-1) unstable; urgency=low
+
+  * Initial release Closes: #205392
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Thu,  1 Sep 2005 23:18:00 +0200
+
diff --git a/debian/clean b/debian/clean
new file mode 100644 (file)
index 0000000..14290d5
--- /dev/null
@@ -0,0 +1,2 @@
+build.number
+src/resource/build.properties
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..45a4fb7
--- /dev/null
@@ -0,0 +1 @@
+8
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..f20f829
--- /dev/null
@@ -0,0 +1,65 @@
+Source: jabref
+Section: tex
+Priority: optional
+Maintainer: gregor herrmann <gregoa@debian.org>
+Uploaders: tony mancill <tmancill@debian.org>
+Build-Depends: debhelper (>= 8)
+Build-Depends-Indep: ant,
+ antlr,
+ antlr3 (>= 3.2),
+ default-jdk,
+ imagemagick,
+ libcommons-logging-java,
+ libglazedlists-java,
+ libjempbox-java (>= 1:1.5.0),
+ libjgoodies-forms-java,
+ libjgoodies-looks-java (>= 2.4.0),
+ libjpf-java,
+ libjpfcodegen-java,
+ liblog4j1.2-java,
+ libmicroba-java,
+ libmysql-java,
+ libpdfbox-java (>= 1:1.5.0),
+ libspin-java,
+ velocity (>= 1.5)
+Standards-Version: 3.9.2
+Homepage: http://jabref.sourceforge.net/
+Vcs-Git: git://git.toastfreeware.priv.at/debian/jabref.git
+Vcs-Browser: http://git.toastfreeware.priv.at/debian/jabref.git/
+
+Package: jabref
+Architecture: all
+Depends: ${misc:Depends},
+ antlr,
+ antlr3 (>= 3.2),
+ java-wrappers,
+ libcommons-logging-java,
+ libglazedlists-java,
+ libjempbox-java (>= 1:1.5.0),
+ libjgoodies-common-java,
+ libjgoodies-forms-java,
+ libjgoodies-looks-java (>= 2.4.0),
+ libjpf-java,
+ libjpfcodegen-java,
+ libmicroba-java,
+ libmysql-java,
+ libpdfbox-java (>= 1:1.5.0),
+ libspin-java,
+ openjdk-6-jre | sun-java6-jre,
+ velocity (>=1.5)
+Recommends: xdg-utils
+Suggests: gv | postscript-viewer,
+ jabref-plugin-oo,
+ xpdf-reader | pdf-viewer
+Description: graphical frontend to manage BibTeX databases
+ JabRef is a graphical Java application for editing BibTeX (.bib) databases.
+ JabRef lets you organize your entries into overlapping logical groups, and
+ with a single click limit your view to a single group or an intersection or
+ union of several groups. You can customize the entry information shown in the
+ main window, and sort by any of the standard BibTeX fields. JabRef can
+ autogenerate BibTeX keys for your entries. JabRef also lets you easily link
+ to PDF or web sources for your reference entries.
+ .
+ JabRef can import from and export to several formats, and you can customize
+ export filters. JabRef can be run as a command line application to convert
+ from any import format to any export format.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..938c3b8
--- /dev/null
@@ -0,0 +1,916 @@
+Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
+Upstream-Contact: Morten Alver, Nizar Batada
+Source: http://jabref.sourceforge.net/
+Upstream-Name: JabRef
+Comment: The +ds version is created by removing lib/:
+ contains sourceless pre-compiled libraries which are not used anyway
+
+Files: *
+Copyright: 2011, Morten Alver <mortenalver@users.sourceforge.net>
+ 2011, Nizar Batada <nbatada@users.sourceforge.net>
+License: GPL-2
+
+Files: debian/*
+Copyright: 2005-2012, gregor herrmann <gregoa@debian.org>
+ 2005-2012, tony mancill <tmancill@debian.org>
+License: GPL-2
+
+Files: src/images/*
+Copyright: 2006-2007, Everaldo Coelho <everaldo@everaldo.com>
+License: LGPL-2.1
+Comment: The majority of icons are from the Crystal Clear icon set
+
+Files: src/java/gnu/dtools/ritopt/*
+Copyright: 2001, Damian Ryan Eads
+License: GPL-2+
+
+Files: src/help/de/JabRef-UserManual_de.tex
+Copyright: 2005-2010, Dominik Waßenhoven
+License: CC-BY-SA-3.0
+Files: src/tests/net/sf/jabref/bst/abbrv.bst
+License: 
+ % BibTeX standard bibliography style `abbrv'
+         % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+         % Copyright (C) 1985, all rights reserved.
+         % Copying of this file is authorized only if either
+         % (1) you make absolutely no changes to your copy, including name, or
+         % (2) if you do make changes, you name it something other than
+         % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+         % This restriction helps ensure that all standard styles are identical.
+         % The file btxbst.doc has the documentation for this style.
+Comment: This is the standard abbrv.bst file as also included in
+ texlive-base.
+
+Files: src/resource/layout/tablerefsabsbib/tablerefsabsbib.begin.layout,
+ src/resource/layout/tablerefs/tablerefs.begin.layout
+Copyright: 2006-2008, Mark Schenk
+License: CC-BY-3.0
+
+Files: src/java/wsi/ra/tool/ResourceLoader.java,
+ src/java/wsi/ra/tool/WSITools.java,
+ src/java/wsi/ra/tool/ExternalHelper.java,
+ src/java/wsi/ra/types/StringInt.java,
+ src/java/jalopy.format.convention.xml,
+ src/java/net/sf/jabref/export/layout/format/CreateDocBookAuthors.java,
+ src/java/net/sf/jabref/export/layout/format/XMLChars.java,
+ src/java/net/sf/jabref/export/layout/format/CreateBibORDFAuthors.java,
+ src/java/net/sf/jabref/export/layout/format/RemoveBracketsAddComma.java,
+ src/java/net/sf/jabref/export/layout/format/RemoveTilde.java,
+ src/java/net/sf/jabref/export/layout/format/RemoveWhitespace.java,
+ src/java/net/sf/jabref/export/layout/format/GetOpenOfficeType.java,
+ src/java/net/sf/jabref/export/layout/format/RemoveBrackets.java,
+ src/java/net/sf/jabref/export/layout/format/CreateDocBookEditors.java,
+ src/java/net/sf/jabref/export/layout/format/AuthorLastFirst.java
+Copyright: Dept. Computer Architecture, University of Tuebingen, Germany
+License: GPL-2
+
+Files: src/java/net/sf/jabref/KeyCollisionException.java
+Copyright: 2003, David Weitzman
+License: GPL-2+
+
+Files: src/java/net/sf/jabref/BibtexEntryType.java,
+ src/java/net/sf/jabref/BibtexDatabase.java,
+ src/java/net/sf/jabref/BibtexEntry.java
+Copyright: 2003, David Weitzman
+ 2003, Morten O. Alver
+License: GPL-2+
+
+Files: src/java/net/sf/jabref/imports/BibtexParser.java
+Copyright: 2003-06, David Weitzman
+ 2003-2006, Nizar N. Batada
+ 2003-2006, Morten O. Alver
+ 2003-2006, Christopher Oezbek
+License: GPL-2+
+
+Files: src/java/net/sf/jabref/FieldTextMenu.java,
+ src/java/net/sf/jabref/wizard/text/TagToMarkedTextStore.java,
+ src/java/net/sf/jabref/wizard/text/gui/TextInputDialog.java,
+ src/java/net/sf/jabref/wizard/text/gui/OverlayPanel.java,
+ src/java/net/sf/jabref/wizard/auximport/AuxCommandLine.java,
+ src/java/net/sf/jabref/wizard/auximport/gui/FromAuxDialog.java,
+ src/java/net/sf/jabref/wizard/auximport/AuxSubGenerator.java,
+ src/java/net/sf/jabref/wizard/integrity/IntegrityMessage.java,
+ src/java/net/sf/jabref/wizard/integrity/IntegrityCheck.java,
+ src/java/net/sf/jabref/wizard/integrity/gui/IntegrityWizard.java,
+ src/java/net/sf/jabref/wizard/integrity/gui/IntegrityMessagePanel.java
+Copyright: 2004, R. Nagel
+License: GPL-2+
+
+Files: src/java/net/sf/jabref/about/AnimationListener.java,
+ src/java/net/sf/jabref/about/AboutPanel.java,
+ src/java/net/sf/jabref/about/AboutTextLine.java,
+ src/java/net/sf/jabref/about/TextBlock.java,
+ src/java/net/sf/jabref/about/ExtendedInfoPanel.java,
+ src/java/net/sf/jabref/about/About2.java,
+ src/java/net/sf/jabref/util/TBuildInfo.java
+Copyright: 2005, Raik Nagel <kiar@users.sourceforge.net>
+License: BSD-3
+
+Files: src/java/net/sf/jabref/util/TXMLReader.java,
+ src/java/net/sf/jabref/BibtexFields.java,
+ src/java/net/sf/jabref/gui/date/DatePickerButton.java
+Copyright:  2006, Raik Nagel <kiar@users.sourceforge.net>
+License: BSD-3
+
+Files: src/java/com/jgoodies/uif_lite/component/UIFSplitPane.java,
+ src/java/com/jgoodies/uif_lite/panel/SimpleInternalFrame.java
+Copyright: 2003, 2004 JGoodies Karsten Lentzsch.
+License: BSD-3
+
+Files: src/java/net/sf/jabref/SimpleUrlDragDrop.java,
+ src/java/net/sf/jabref/UrlDragDrop.java
+Copyright: 2004, E. Putrycz
+License: GPL-2+
+
+Files: src/java/net/sf/jabref/SearchRuleSet.java,
+ src/java/net/sf/jabref/SearchRule.java
+Copyright: 2003, Nathan Dunn
+License: GPL-2+
+
+Files: src/java/net/sf/jabref/SimpleSearchRule.java,
+ src/java/net/sf/jabref/DatabaseSearch.java
+Copyright: 2003, Nathan Dunn
+ 2003, Morten O. Alver
+License: GPL-2+
+
+Files: src/java/net/sf/jabref/label/BookLabelRule.java,
+ src/java/net/sf/jabref/label/InproceedingsLabelRule.java
+Copyright: 2003, Nathan Dunn
+ 2003, Morten O. Alver
+ 2003, Nizar N. Batada
+License: GPL-2+
+
+Files: src/java/net/sf/jabref/export/layout/format/ToLowerCase.java
+Copyright: Egon Willighagen
+License: GPL-2
+
+Files: src/java/net/sf/jabref/export/layout/format/CurrentDate.java
+Copyright: 2005, Andreas Rudert
+License: GPL-2+
+
+Files: src/java/net/sf/jabref/util/CaseChangeMenu.java,
+ src/java/net/sf/jabref/util/CaseChanger.java
+Copyright: 2003, Moritz Ringler
+License: GPL-2+
+
+Files: src/java/net/sf/jabref/FontSelectorDialog.java
+Copyright: 1999-2002, Sylvain Reynal
+ 2000, 2001, Slava Pestov
+ 1999, Jason Ginchereau
+License: GPL-2+
+
+Files: src/java/net/sf/jabref/imports/ImportCustomizationDialog.java,
+ src/java/net/sf/jabref/imports/ZipFileChooser.java,
+ src/java/net/sf/jabref/imports/CustomImportList.java,
+ src/java/net/sf/jabref/imports/RepecNepImporter.java
+Copyright: 2005, Andreas Rudert
+License: GPL-2+
+
+Files: src/java/net/sf/ext/BrowserLauncher.java
+Copyright: 1999-2001, Eric Albert (ejalbert@cs.stanford.edu)
+License: 
+    This code is Copyright 1999-2001 by Eric Albert (ejalbert@cs.stanford.edu) and may be
+    redistributed or modified in any form without restrictions as long as the portion of this
+    comment from this paragraph through the end of the comment is not removed.  The author
+    requests that he be notified of any application, applet, or other binary that makes use of
+    this code, but that's more out of curiosity than anything and is not required.  This software
+    includes no warranty.  The author is not repsonsible for any loss of data or functionality
+    or any adverse or unexpected effects of using this software.
+
+Files: src/osx/osxadapter/OSXAdapter.java
+Copyright: 2003, Apple Computer, Inc
+License:
+    Disclaimer:  IMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.
+    ("Apple") in consideration of your agreement to the following terms, and your
+    use, installation, modification or redistribution of this Apple software
+    constitutes acceptance of these terms.  If you do not agree with these terms,
+    please do not use, install, modify or redistribute this Apple software.
+    .
+    In consideration of your agreement to abide by the following terms, and subject
+    to these terms, Apple grants you a personal, non-exclusive license, under Apple's
+    copyrights in this original Apple software (the "Apple Software"), to use,
+    reproduce, modify and redistribute the Apple Software, with or without
+    modifications, in source and/or binary forms; provided that if you redistribute
+    the Apple Software in its entirety and without modifications, you must retain
+    this notice and the following text and disclaimers in all such redistributions of
+    the Apple Software.  Neither the name, trademarks, service marks or logos of
+    Apple Computer, Inc. may be used to endorse or promote products derived from the
+    Apple Software without specific prior written permission from Apple.  Except as
+    expressly stated in this notice, no other rights or licenses, express or implied,
+    are granted by Apple herein, including but not limited to any patent rights that
+    may be infringed by your derivative works or by other works in which the Apple
+    Software may be incorporated.
+    .
+    The Apple Software is provided by Apple on an "AS IS" basis.  APPLE MAKES NO
+    WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+    WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+    PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
+    COMBINATION WITH YOUR PRODUCTS.
+    .
+    IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+    GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+    ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
+    OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT
+    (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
+    ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+License: GPL-2
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; version 2.
+    On Debian GNU/Linux systems, the complete text of version 2 of the
+    GNU General Public License can be found in
+    `/usr/share/common-licenses/GPL-2'
+
+License: GPL-2+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2, or (at your option) 
+    any later version.
+    On Debian GNU/Linux systems, the complete text of version 2 of the
+    GNU General Public License can be found in
+    `/usr/share/common-licenses/GPL-2'
+
+License: LGPL-2.1
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU Lesser General Public License as published by
+    the Free Software Foundation; version 2.1.
+    On Debian GNU/Linux systems, the complete text of version 2.1 of the GNU Lesser
+    General Public License can be found in `/usr/share/common-licenses/LGPL-2.1'
+
+License: BSD-3
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+    .
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * 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.
+    * Neither the name of the author nor the names of its contributors may be
+      used to endorse or promote products derived from this software without
+      specific prior written permission.
+
+License: CC-BY-3.0
+    Creative Commons Legal Code
+    .
+    Attribution 3.0 Unported
+    .
+    THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
+    COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
+    COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
+    AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
+    .
+    BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE
+    TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY
+    BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS
+    CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND
+    CONDITIONS.
+    .
+    *1. Definitions*
+    .
+       1. *"Adaptation"* means a work based upon the Work, or upon the Work
+          and other pre-existing works, such as a translation, adaptation,
+          derivative work, arrangement of music or other alterations of a
+          literary or artistic work, or phonogram or performance and
+          includes cinematographic adaptations or any other form in which
+          the Work may be recast, transformed, or adapted including in any
+          form recognizably derived from the original, except that a work
+          that constitutes a Collection will not be considered an Adaptation
+          for the purpose of this License. For the avoidance of doubt, where
+          the Work is a musical work, performance or phonogram, the
+          synchronization of the Work in timed-relation with a moving image
+          ("synching") will be considered an Adaptation for the purpose of
+          this License.
+       2. *"Collection"* means a collection of literary or artistic works,
+          such as encyclopedias and anthologies, or performances, phonograms
+          or broadcasts, or other works or subject matter other than works
+          listed in Section 1(f) below, which, by reason of the selection
+          and arrangement of their contents, constitute intellectual
+          creations, in which the Work is included in its entirety in
+          unmodified form along with one or more other contributions, each
+          constituting separate and independent works in themselves, which
+          together are assembled into a collective whole. A work that
+          constitutes a Collection will not be considered an Adaptation (as
+          defined above) for the purposes of this License.
+       3. *"Distribute"* means to make available to the public the original
+          and copies of the Work or Adaptation, as appropriate, through sale
+          or other transfer of ownership.
+       4. *"Licensor"* means the individual, individuals, entity or entities
+          that offer(s) the Work under the terms of this License.
+       5. *"Original Author"* means, in the case of a literary or artistic
+          work, the individual, individuals, entity or entities who created
+          the Work or if no individual or entity can be identified, the
+          publisher; and in addition (i) in the case of a performance the
+          actors, singers, musicians, dancers, and other persons who act,
+          sing, deliver, declaim, play in, interpret or otherwise perform
+          literary or artistic works or expressions of folklore; (ii) in the
+          case of a phonogram the producer being the person or legal entity
+          who first fixes the sounds of a performance or other sounds; and,
+          (iii) in the case of broadcasts, the organization that transmits
+          the broadcast.
+       6. *"Work"* means the literary and/or artistic work offered under the
+          terms of this License including without limitation any production
+          in the literary, scientific and artistic domain, whatever may be
+          the mode or form of its expression including digital form, such as
+          a book, pamphlet and other writing; a lecture, address, sermon or
+          other work of the same nature; a dramatic or dramatico-musical
+          work; a choreographic work or entertainment in dumb show; a
+          musical composition with or without words; a cinematographic work
+          to which are assimilated works expressed by a process analogous to
+          cinematography; a work of drawing, painting, architecture,
+          sculpture, engraving or lithography; a photographic work to which
+          are assimilated works expressed by a process analogous to
+          photography; a work of applied art; an illustration, map, plan,
+          sketch or three-dimensional work relative to geography,
+          topography, architecture or science; a performance; a broadcast; a
+          phonogram; a compilation of data to the extent it is protected as
+          a copyrightable work; or a work performed by a variety or circus
+          performer to the extent it is not otherwise considered a literary
+          or artistic work.
+       7. *"You"* means an individual or entity exercising rights under this
+          License who has not previously violated the terms of this License
+          with respect to the Work, or who has received express permission
+          from the Licensor to exercise rights under this License despite a
+          previous violation.
+       8. *"Publicly Perform"* means to perform public recitations of the
+          Work and to communicate to the public those public recitations, by
+          any means or process, including by wire or wireless means or
+          public digital performances; to make available to the public Works
+          in such a way that members of the public may access these Works
+          from a place and at a place individually chosen by them; to
+          perform the Work to the public by any means or process and the
+          communication to the public of the performances of the Work,
+          including by public digital performance; to broadcast and
+          rebroadcast the Work by any means including signs, sounds or images.
+       9. *"Reproduce"* means to make copies of the Work by any means
+          including without limitation by sound or visual recordings and the
+          right of fixation and reproducing fixations of the Work, including
+          storage of a protected performance or phonogram in digital form or
+          other electronic medium.
+    .
+    *2. Fair Dealing Rights.* Nothing in this License is intended to reduce,
+    limit, or restrict any uses free from copyright or rights arising from
+    limitations or exceptions that are provided for in connection with the
+    copyright protection under copyright law or other applicable laws.
+    .
+    *3. License Grant.* Subject to the terms and conditions of this License,
+    Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
+    perpetual (for the duration of the applicable copyright) license to
+    exercise the rights in the Work as stated below:
+    .
+       1. to Reproduce the Work, to incorporate the Work into one or more
+          Collections, and to Reproduce the Work as incorporated in the
+          Collections;
+       2. to create and Reproduce Adaptations provided that any such
+          Adaptation, including any translation in any medium, takes
+          reasonable steps to clearly label, demarcate or otherwise identify
+          that changes were made to the original Work. For example, a
+          translation could be marked "The original work was translated from
+          English to Spanish," or a modification could indicate "The
+          original work has been modified.";
+       3. to Distribute and Publicly Perform the Work including as
+          incorporated in Collections; and,
+       4. to Distribute and Publicly Perform Adaptations.
+       5.
+    .
+          For the avoidance of doubt:
+    .
+             1. *Non-waivable Compulsory License Schemes*. In those
+                jurisdictions in which the right to collect royalties
+                through any statutory or compulsory licensing scheme cannot
+                be waived, the Licensor reserves the exclusive right to
+                collect such royalties for any exercise by You of the rights
+                granted under this License;
+             2. *Waivable Compulsory License Schemes*. In those
+                jurisdictions in which the right to collect royalties
+                through any statutory or compulsory licensing scheme can be
+                waived, the Licensor waives the exclusive right to collect
+                such royalties for any exercise by You of the rights granted
+                under this License; and,
+             3. *Voluntary License Schemes*. The Licensor waives the right
+                to collect royalties, whether individually or, in the event
+                that the Licensor is a member of a collecting society that
+                administers voluntary licensing schemes, via that society,
+                from any exercise by You of the rights granted under this
+                License.
+    .
+    The above rights may be exercised in all media and formats whether now
+    known or hereafter devised. The above rights include the right to make
+    such modifications as are technically necessary to exercise the rights
+    in other media and formats. Subject to Section 8(f), all rights not
+    expressly granted by Licensor are hereby reserved.
+    .
+    *4. Restrictions.* The license granted in Section 3 above is expressly
+    made subject to and limited by the following restrictions:
+    .
+       1. You may Distribute or Publicly Perform the Work only under the
+          terms of this License. You must include a copy of, or the Uniform
+          Resource Identifier (URI) for, this License with every copy of the
+          Work You Distribute or Publicly Perform. You may not offer or
+          impose any terms on the Work that restrict the terms of this
+          License or the ability of the recipient of the Work to exercise
+          the rights granted to that recipient under the terms of the
+          License. You may not sublicense the Work. You must keep intact all
+          notices that refer to this License and to the disclaimer of
+          warranties with every copy of the Work You Distribute or Publicly
+          Perform. When You Distribute or Publicly Perform the Work, You may
+          not impose any effective technological measures on the Work that
+          restrict the ability of a recipient of the Work from You to
+          exercise the rights granted to that recipient under the terms of
+          the License. This Section 4(a) applies to the Work as incorporated
+          in a Collection, but this does not require the Collection apart
+          from the Work itself to be made subject to the terms of this
+          License. If You create a Collection, upon notice from any Licensor
+          You must, to the extent practicable, remove from the Collection
+          any credit as required by Section 4(b), as requested. If You
+          create an Adaptation, upon notice from any Licensor You must, to
+          the extent practicable, remove from the Adaptation any credit as
+          required by Section 4(b), as requested.
+       2. If You Distribute, or Publicly Perform the Work or any Adaptations
+          or Collections, You must, unless a request has been made pursuant
+          to Section 4(a), keep intact all copyright notices for the Work
+          and provide, reasonable to the medium or means You are utilizing:
+          (i) the name of the Original Author (or pseudonym, if applicable)
+          if supplied, and/or if the Original Author and/or Licensor
+          designate another party or parties (e.g., a sponsor institute,
+          publishing entity, journal) for attribution ("Attribution
+          Parties") in Licensor's copyright notice, terms of service or by
+          other reasonable means, the name of such party or parties; (ii)
+          the title of the Work if supplied; (iii) to the extent reasonably
+          practicable, the URI, if any, that Licensor specifies to be
+          associated with the Work, unless such URI does not refer to the
+          copyright notice or licensing information for the Work; and (iv) ,
+          consistent with Section 3(b), in the case of an Adaptation, a
+          credit identifying the use of the Work in the Adaptation (e.g.,
+          "French translation of the Work by Original Author," or
+          "Screenplay based on original Work by Original Author"). The
+          credit required by this Section 4 (b) may be implemented in any
+          reasonable manner; provided, however, that in the case of a
+          Adaptation or Collection, at a minimum such credit will appear, if
+          a credit for all contributing authors of the Adaptation or
+          Collection appears, then as part of these credits and in a manner
+          at least as prominent as the credits for the other contributing
+          authors. For the avoidance of doubt, You may only use the credit
+          required by this Section for the purpose of attribution in the
+          manner set out above and, by exercising Your rights under this
+          License, You may not implicitly or explicitly assert or imply any
+          connection with, sponsorship or endorsement by the Original
+          Author, Licensor and/or Attribution Parties, as appropriate, of
+          You or Your use of the Work, without the separate, express prior
+          written permission of the Original Author, Licensor and/or
+          Attribution Parties.
+       3. Except as otherwise agreed in writing by the Licensor or as may be
+          otherwise permitted by applicable law, if You Reproduce,
+          Distribute or Publicly Perform the Work either by itself or as
+          part of any Adaptations or Collections, You must not distort,
+          mutilate, modify or take other derogatory action in relation to
+          the Work which would be prejudicial to the Original Author's honor
+          or reputation. Licensor agrees that in those jurisdictions (e.g.
+          Japan), in which any exercise of the right granted in Section 3(b)
+          of this License (the right to make Adaptations) would be deemed to
+          be a distortion, mutilation, modification or other derogatory
+          action prejudicial to the Original Author's honor and reputation,
+          the Licensor will waive or not assert, as appropriate, this
+          Section, to the fullest extent permitted by the applicable
+          national law, to enable You to reasonably exercise Your right
+          under Section 3(b) of this License (right to make Adaptations) but
+          not otherwise.
+    .
+    *5. Representations, Warranties and Disclaimer*
+    .
+    UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR
+    OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
+    KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,
+    INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,
+    FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF
+    LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,
+    WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE
+    EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
+    .
+    *6. Limitation on Liability.* EXCEPT TO THE EXTENT REQUIRED BY
+    APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL
+    THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY
+    DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF
+    LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+    .
+    *7. Termination*
+    .
+       1. This License and the rights granted hereunder will terminate
+          automatically upon any breach by You of the terms of this License.
+          Individuals or entities who have received Adaptations or
+          Collections from You under this License, however, will not have
+          their licenses terminated provided such individuals or entities
+          remain in full compliance with those licenses. Sections 1, 2, 5,
+          6, 7, and 8 will survive any termination of this License.
+       2. Subject to the above terms and conditions, the license granted
+          here is perpetual (for the duration of the applicable copyright in
+          the Work). Notwithstanding the above, Licensor reserves the right
+          to release the Work under different license terms or to stop
+          distributing the Work at any time; provided, however that any such
+          election will not serve to withdraw this License (or any other
+          license that has been, or is required to be, granted under the
+          terms of this License), and this License will continue in full
+          force and effect unless terminated as stated above.
+    .
+    *8. Miscellaneous*
+    .
+       1. Each time You Distribute or Publicly Perform the Work or a
+          Collection, the Licensor offers to the recipient a license to the
+          Work on the same terms and conditions as the license granted to
+          You under this License.
+       2. Each time You Distribute or Publicly Perform an Adaptation,
+          Licensor offers to the recipient a license to the original Work on
+          the same terms and conditions as the license granted to You under
+          this License.
+       3. If any provision of this License is invalid or unenforceable under
+          applicable law, it shall not affect the validity or enforceability
+          of the remainder of the terms of this License, and without further
+          action by the parties to this agreement, such provision shall be
+          reformed to the minimum extent necessary to make such provision
+          valid and enforceable.
+       4. No term or provision of this License shall be deemed waived and no
+          breach consented to unless such waiver or consent shall be in
+          writing and signed by the party to be charged with such waiver or
+          consent.
+       5. This License constitutes the entire agreement between the parties
+          with respect to the Work licensed here. There are no
+          understandings, agreements or representations with respect to the
+          Work not specified here. Licensor shall not be bound by any
+          additional provisions that may appear in any communication from
+          You. This License may not be modified without the mutual written
+          agreement of the Licensor and You.
+       6. The rights granted under, and the subject matter referenced, in
+          this License were drafted utilizing the terminology of the Berne
+          Convention for the Protection of Literary and Artistic Works (as
+          amended on September 28, 1979), the Rome Convention of 1961, the
+          WIPO Copyright Treaty of 1996, the WIPO Performances and
+          Phonograms Treaty of 1996 and the Universal Copyright Convention
+          (as revised on July 24, 1971). These rights and subject matter
+          take effect in the relevant jurisdiction in which the License
+          terms are sought to be enforced according to the corresponding
+          provisions of the implementation of those treaty provisions in the
+          applicable national law. If the standard suite of rights granted
+          under applicable copyright law includes additional rights not
+          granted under this License, such additional rights are deemed to
+          be included in the License; this License is not intended to
+          restrict the license of any rights under applicable law.
+
+License: CC-BY-SA-3.0
+    Creative Commons Legal Code
+    .
+    Attribution-ShareAlike 3.0 Unported
+    .
+    CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
+    LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN
+    ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
+    INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO
+    WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS
+    LIABILITY FOR DAMAGES RESULTING FROM ITS USE. 
+    .
+
+      /License/
+    .
+    THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
+    COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
+    COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
+    AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
+    .
+    BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE
+    TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY
+    BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS
+    CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND
+    CONDITIONS.
+    .
+    *1. Definitions*
+    .
+    1. *"Adaptation"* means a work based upon the Work, or upon the Work
+       and other pre-existing works, such as a translation, adaptation,
+       derivative work, arrangement of music or other alterations of a
+       literary or artistic work, or phonogram or performance and
+       includes cinematographic adaptations or any other form in which
+       the Work may be recast, transformed, or adapted including in any
+       form recognizably derived from the original, except that a work
+       that constitutes a Collection will not be considered an Adaptation
+       for the purpose of this License. For the avoidance of doubt, where
+       the Work is a musical work, performance or phonogram, the
+       synchronization of the Work in timed-relation with a moving image
+       ("synching") will be considered an Adaptation for the purpose of
+       this License.
+    2. *"Collection"* means a collection of literary or artistic works,
+       such as encyclopedias and anthologies, or performances, phonograms
+       or broadcasts, or other works or subject matter other than works
+       listed in Section 1(f) below, which, by reason of the selection
+       and arrangement of their contents, constitute intellectual
+       creations, in which the Work is included in its entirety in
+       unmodified form along with one or more other contributions, each
+       constituting separate and independent works in themselves, which
+       together are assembled into a collective whole. A work that
+       constitutes a Collection will not be considered an Adaptation (as
+       defined below) for the purposes of this License.
+   3. *"Creative Commons Compatible License"* means a license that is
+       listed at http://creativecommons.org/compatiblelicenses that has
+       been approved by Creative Commons as being essentially equivalent
+       to this License, including, at a minimum, because that license:
+       (i) contains terms that have the same purpose, meaning and effect
+       as the License Elements of this License; and, (ii) explicitly
+       permits the relicensing of adaptations of works made available
+       under that license under this License or a Creative Commons
+       jurisdiction license with the same License Elements as this License.
+   4. *"Distribute"* means to make available to the public the original
+       and copies of the Work or Adaptation, as appropriate, through sale
+       or other transfer of ownership.
+   5. *"License Elements"* means the following high-level license
+       attributes as selected by Licensor and indicated in the title of
+       this License: Attribution, ShareAlike.
+   6. *"Licensor"* means the individual, individuals, entity or entities
+       that offer(s) the Work under the terms of this License.
+   7. *"Original Author"* means, in the case of a literary or artistic
+       work, the individual, individuals, entity or entities who created
+       the Work or if no individual or entity can be identified, the
+       publisher; and in addition (i) in the case of a performance the
+       actors, singers, musicians, dancers, and other persons who act,
+       sing, deliver, declaim, play in, interpret or otherwise perform
+       literary or artistic works or expressions of folklore; (ii) in the
+       case of a phonogram the producer being the person or legal entity
+       who first fixes the sounds of a performance or other sounds; and,
+       (iii) in the case of broadcasts, the organization that transmits
+       the broadcast.
+    8. *"Work"* means the literary and/or artistic work offered under the
+       terms of this License including without limitation any production
+       in the literary, scientific and artistic domain, whatever may be
+       the mode or form of its expression including digital form, such as
+       a book, pamphlet and other writing; a lecture, address, sermon or
+       other work of the same nature; a dramatic or dramatico-musical
+       work; a choreographic work or entertainment in dumb show; a
+       musical composition with or without words; a cinematographic work
+       to which are assimilated works expressed by a process analogous to
+       cinematography; a work of drawing, painting, architecture,
+       sculpture, engraving or lithography; a photographic work to which
+       are assimilated works expressed by a process analogous to
+       photography; a work of applied art; an illustration, map, plan,
+       sketch or three-dimensional work relative to geography,
+       topography, architecture or science; a performance; a broadcast; a
+       phonogram; a compilation of data to the extent it is protected as
+       a copyrightable work; or a work performed by a variety or circus
+       performer to the extent it is not otherwise considered a literary
+       or artistic work.
+    9. *"You"* means an individual or entity exercising rights under this
+       License who has not previously violated the terms of this License
+       with respect to the Work, or who has received express permission
+       from the Licensor to exercise rights under this License despite a
+       previous violation.
+   10. *"Publicly Perform"* means to perform public recitations of the
+       Work and to communicate to the public those public recitations, by
+       any means or process, including by wire or wireless means or
+       public digital performances; to make available to the public Works
+       in such a way that members of the public may access these Works
+       from a place and at a place individually chosen by them; to
+       perform the Work to the public by any means or process and the
+       communication to the public of the performances of the Work,
+       including by public digital performance; to broadcast and
+       rebroadcast the Work by any means including signs, sounds or images.
+   11. *"Reproduce"* means to make copies of the Work by any means
+       including without limitation by sound or visual recordings and the
+       right of fixation and reproducing fixations of the Work, including
+       storage of a protected performance or phonogram in digital form or
+       other electronic medium.
+    .
+    *2. Fair Dealing Rights.* Nothing in this License is intended to reduce,
+    limit, or restrict any uses free from copyright or rights arising from
+    limitations or exceptions that are provided for in connection with the
+    copyright protection under copyright law or other applicable laws.
+    .
+    *3. License Grant.* Subject to the terms and conditions of this License,
+    Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
+    perpetual (for the duration of the applicable copyright) license to
+    exercise the rights in the Work as stated below:
+    .
+    1. to Reproduce the Work, to incorporate the Work into one or more
+       Collections, and to Reproduce the Work as incorporated in the
+       Collections;
+    2. to create and Reproduce Adaptations provided that any such
+       Adaptation, including any translation in any medium, takes
+       reasonable steps to clearly label, demarcate or otherwise identify
+       that changes were made to the original Work. For example, a
+       translation could be marked "The original work was translated from
+       English to Spanish," or a modification could indicate "The
+       original work has been modified.";
+    3. to Distribute and Publicly Perform the Work including as
+       incorporated in Collections; and,
+    4. to Distribute and Publicly Perform Adaptations.
+    5.
+    .
+      For the avoidance of doubt:
+    .
+         1. *Non-waivable Compulsory License Schemes*. In those
+            jurisdictions in which the right to collect royalties
+            through any statutory or compulsory licensing scheme cannot
+            be waived, the Licensor reserves the exclusive right to
+            collect such royalties for any exercise by You of the rights
+            granted under this License;
+         2. *Waivable Compulsory License Schemes*. In those
+            jurisdictions in which the right to collect royalties
+            through any statutory or compulsory licensing scheme can be
+            waived, the Licensor waives the exclusive right to collect
+            such royalties for any exercise by You of the rights granted
+            under this License; and,
+         3. *Voluntary License Schemes*. The Licensor waives the right
+            to collect royalties, whether individually or, in the event
+            that the Licensor is a member of a collecting society that
+            administers voluntary licensing schemes, via that society,
+            from any exercise by You of the rights granted under this
+            License.
+    .
+    The above rights may be exercised in all media and formats whether now
+    known or hereafter devised. The above rights include the right to make
+    such modifications as are technically necessary to exercise the rights
+    in other media and formats. Subject to Section 8(f), all rights not
+    expressly granted by Licensor are hereby reserved.
+    .
+    *4. Restrictions.* The license granted in Section 3 above is expressly
+    made subject to and limited by the following restrictions:
+    .
+    1. You may Distribute or Publicly Perform the Work only under the
+       terms of this License. You must include a copy of, or the Uniform
+       Resource Identifier (URI) for, this License with every copy of the
+       Work You Distribute or Publicly Perform. You may not offer or
+       impose any terms on the Work that restrict the terms of this
+       License or the ability of the recipient of the Work to exercise
+       the rights granted to that recipient under the terms of the
+       License. You may not sublicense the Work. You must keep intact all
+       notices that refer to this License and to the disclaimer of
+       warranties with every copy of the Work You Distribute or Publicly
+       Perform. When You Distribute or Publicly Perform the Work, You may
+       not impose any effective technological measures on the Work that
+       restrict the ability of a recipient of the Work from You to
+       exercise the rights granted to that recipient under the terms of
+       the License. This Section 4(a) applies to the Work as incorporated
+       in a Collection, but this does not require the Collection apart
+       from the Work itself to be made subject to the terms of this
+       License. If You create a Collection, upon notice from any Licensor
+       You must, to the extent practicable, remove from the Collection
+       any credit as required by Section 4(c), as requested. If You
+       create an Adaptation, upon notice from any Licensor You must, to
+       the extent practicable, remove from the Adaptation any credit as
+       required by Section 4(c), as requested.
+    2. You may Distribute or Publicly Perform an Adaptation only under
+       the terms of: (i) this License; (ii) a later version of this
+       License with the same License Elements as this License; (iii) a
+       Creative Commons jurisdiction license (either this or a later
+       license version) that contains the same License Elements as this
+       License (e.g., Attribution-ShareAlike 3.0 US)); (iv) a Creative
+       Commons Compatible License. If you license the Adaptation under
+       one of the licenses mentioned in (iv), you must comply with the
+       terms of that license. If you license the Adaptation under the
+       terms of any of the licenses mentioned in (i), (ii) or (iii) (the
+       "Applicable License"), you must comply with the terms of the
+       Applicable License generally and the following provisions: (I) You
+       must include a copy of, or the URI for, the Applicable License
+       with every copy of each Adaptation You Distribute or Publicly
+       Perform; (II) You may not offer or impose any terms on the
+       Adaptation that restrict the terms of the Applicable License or
+       the ability of the recipient of the Adaptation to exercise the
+       rights granted to that recipient under the terms of the Applicable
+       License; (III) You must keep intact all notices that refer to the
+       Applicable License and to the disclaimer of warranties with every
+       copy of the Work as included in the Adaptation You Distribute or
+       Publicly Perform; (IV) when You Distribute or Publicly Perform the
+       Adaptation, You may not impose any effective technological
+       measures on the Adaptation that restrict the ability of a
+       recipient of the Adaptation from You to exercise the rights
+       granted to that recipient under the terms of the Applicable
+       License. This Section 4(b) applies to the Adaptation as
+       incorporated in a Collection, but this does not require the
+       Collection apart from the Adaptation itself to be made subject to
+       the terms of the Applicable License.
+    3. If You Distribute, or Publicly Perform the Work or any Adaptations
+       or Collections, You must, unless a request has been made pursuant
+       to Section 4(a), keep intact all copyright notices for the Work
+       and provide, reasonable to the medium or means You are utilizing:
+       (i) the name of the Original Author (or pseudonym, if applicable)
+       if supplied, and/or if the Original Author and/or Licensor
+       designate another party or parties (e.g., a sponsor institute,
+       publishing entity, journal) for attribution ("Attribution
+       Parties") in Licensor's copyright notice, terms of service or by
+       other reasonable means, the name of such party or parties; (ii)
+       the title of the Work if supplied; (iii) to the extent reasonably
+       practicable, the URI, if any, that Licensor specifies to be
+       associated with the Work, unless such URI does not refer to the
+       copyright notice or licensing information for the Work; and (iv) ,
+       consistent with Ssection 3(b), in the case of an Adaptation, a
+       credit identifying the use of the Work in the Adaptation (e.g.,
+       "French translation of the Work by Original Author," or
+       "Screenplay based on original Work by Original Author"). The
+       credit required by this Section 4(c) may be implemented in any
+       reasonable manner; provided, however, that in the case of a
+       Adaptation or Collection, at a minimum such credit will appear, if
+       a credit for all contributing authors of the Adaptation or
+       Collection appears, then as part of these credits and in a manner
+       at least as prominent as the credits for the other contributing
+       authors. For the avoidance of doubt, You may only use the credit
+       required by this Section for the purpose of attribution in the
+       manner set out above and, by exercising Your rights under this
+       License, You may not implicitly or explicitly assert or imply any
+       connection with, sponsorship or endorsement by the Original
+       Author, Licensor and/or Attribution Parties, as appropriate, of
+       You or Your use of the Work, without the separate, express prior
+       written permission of the Original Author, Licensor and/or
+       Attribution Parties.
+    4. Except as otherwise agreed in writing by the Licensor or as may be
+       otherwise permitted by applicable law, if You Reproduce,
+       Distribute or Publicly Perform the Work either by itself or as
+       part of any Adaptations or Collections, You must not distort,
+       mutilate, modify or take other derogatory action in relation to
+       the Work which would be prejudicial to the Original Author's honor
+       or reputation. Licensor agrees that in those jurisdictions (e.g.
+       Japan), in which any exercise of the right granted in Section 3(b)
+       of this License (the right to make Adaptations) would be deemed to
+       be a distortion, mutilation, modification or other derogatory
+       action prejudicial to the Original Author's honor and reputation,
+       the Licensor will waive or not assert, as appropriate, this
+       Section, to the fullest extent permitted by the applicable
+       national law, to enable You to reasonably exercise Your right
+       under Section 3(b) of this License (right to make Adaptations) but
+       not otherwise.
+    .
+    *5. Representations, Warranties and Disclaimer*
+    .
+    UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR
+    OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
+    KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,
+    INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,
+    FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF
+    LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,
+    WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE
+    EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
+    .
+    *6. Limitation on Liability.* EXCEPT TO THE EXTENT REQUIRED BY
+    APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL
+    THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY
+    DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF
+    LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+    .
+    *7. Termination*
+    .
+    1. This License and the rights granted hereunder will terminate
+       automatically upon any breach by You of the terms of this License.
+       Individuals or entities who have received Adaptations or
+       Collections from You under this License, however, will not have
+       their licenses terminated provided such individuals or entities
+       remain in full compliance with those licenses. Sections 1, 2, 5,
+       6, 7, and 8 will survive any termination of this License.
+    2. Subject to the above terms and conditions, the license granted
+       here is perpetual (for the duration of the applicable copyright in
+       the Work). Notwithstanding the above, Licensor reserves the right
+       to release the Work under different license terms or to stop
+       distributing the Work at any time; provided, however that any such
+       election will not serve to withdraw this License (or any other
+       license that has been, or is required to be, granted under the
+       terms of this License), and this License will continue in full
+       force and effect unless terminated as stated above.
+    .
+    *8. Miscellaneous*
+    .
+    1. Each time You Distribute or Publicly Perform the Work or a
+       Collection, the Licensor offers to the recipient a license to the
+       Work on the same terms and conditions as the license granted to
+       You under this License.
+    2. Each time You Distribute or Publicly Perform an Adaptation,
+       Licensor offers to the recipient a license to the original Work on
+       the same terms and conditions as the license granted to You under
+       this License.
+    3. If any provision of this License is invalid or unenforceable under
+       applicable law, it shall not affect the validity or enforceability
+       of the remainder of the terms of this License, and without further
+       action by the parties to this agreement, such provision shall be
+       reformed to the minimum extent necessary to make such provision
+       valid and enforceable.
+    4. No term or provision of this License shall be deemed waived and no
+       breach consented to unless such waiver or consent shall be in
+       writing and signed by the party to be charged with such waiver or
+       consent.
+    5. This License constitutes the entire agreement between the parties
+       with respect to the Work licensed here. There are no
+       understandings, agreements or representations with respect to the
+       Work not specified here. Licensor shall not be bound by any
+       additional provisions that may appear in any communication from
+       You. This License may not be modified without the mutual written
+       agreement of the Licensor and You.
+    6. The rights granted under, and the subject matter referenced, in
+       this License were drafted utilizing the terminology of the Berne
+       Convention for the Protection of Literary and Artistic Works (as
+       amended on September 28, 1979), the Rome Convention of 1961, the
+       WIPO Copyright Treaty of 1996, the WIPO Performances and
+       Phonograms Treaty of 1996 and the Universal Copyright Convention
+       (as revised on July 24, 1971). These rights and subject matter
+       take effect in the relevant jurisdiction in which the License
+       terms are sought to be enforced according to the corresponding
+       provisions of the implementation of those treaty provisions in the
+       applicable national law. If the standard suite of rights granted
+       under applicable copyright law includes additional rights not
+       granted under this License, such additional rights are deemed to
+       be included in the License; this License is not intended to
+       restrict the license of any rights under applicable law.
diff --git a/debian/jabref-wrapper b/debian/jabref-wrapper
new file mode 100644 (file)
index 0000000..6d0ecea
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# Include the wrappers utility script
+. /usr/lib/java-wrappers/java-wrappers.sh
+
+# We need openjdk6 or sun6 runtime.
+find_java_runtime openjdk6 sun6
+
+find_jars jabref antlr antlr3 jgoodies-looks forms spin glazedlists microba pdfbox jempbox mysql-connector-java JPFCodeGenerator-rt jpf jpf-boot commons-logging jgoodies-common
+
+run_java net.sf.jabref.JabRefMain "$@"
diff --git a/debian/jabref.1 b/debian/jabref.1
new file mode 100644 (file)
index 0000000..6cfd01f
--- /dev/null
@@ -0,0 +1,94 @@
+.\"                                      Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH JABREF 1 "September 12, 2009"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+jabref \- graphical frontend to manage BibTeX databases
+.SH SYNOPSIS
+.B jabref [options] [bibtex\-file]
+.SH DESCRIPTION
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
+.\" respectively.
+\fBJabRef\fP is a graphical Java application for editing bibtex (.bib)
+databases. JabRef lets you organize your entries into overlapping
+logical groups, and with a single click limit your view to a single
+group or an intersection or union of several groups. You can customize
+the entry information shown in the main window, and sort by any of the
+standard Bibtex fields. JabRef can autogenerate bibtex keys for your
+entries. JabRef also lets you easily link to PDF or web sources for your
+reference entries.
+.br
+JabRef can import from and export to several formats, and you can
+customize export filters. JabRef can be run as a command line application
+to convert from any import format to any export format.
+.SH OPTIONS
+.TP
+\fB\-o\fR, \fB\-\-output\fR=<STRING>
+Output or export file: filename[,export format]
+.TP
+\fB\-p\fR, \fB\-\-primp\fR=<STRING>
+Import preferences from file
+.TP
+\fB\-f\fR, \fB\-\-fetch\fR=<STRING>
+Run Fetcher, e.g. "\-\-fetch=Medline:cancer"
+.TP
+\fB\-n\fR, \fB\-\-nogui\fR=<BOOLEAN>
+No GUI. Only process command line options.
+.TP
+\fB\-a\fR, \fB\-\-aux\fR=<STRING>
+Subdatabase from aux: file[.aux],new[.bib]
+.TP
+\fB\-h\fR, \fB\-\-help\fR=<BOOLEAN>
+Display help on command line options
+.TP
+\fB\-b\fR, \fB\-\-blank\fR=<BOOLEAN>
+Do not open any files at startup
+.TP
+\fB\-\-importToOpen\fR=<STRING>
+Import to open tab
+.TP
+\fB\-i\fR, \fB\-\-import\fR=<STRING>
+Import file: filename[,import format]
+.TP
+\fB\-s\fR, \fB\-\-nosplash\fR=<BOOLEAN>
+Do not show splash window at startup
+.TP
+\fB\-x\fR, \fB\-\-prexp\fR=<STRING>
+Export preferences to file
+.TP
+\fB\-v\fR, \fB\-\-version\fR=<BOOLEAN>
+Display version
+.TP
+\fB\-l\fR, \fB\-\-loads\fR=<BOOLEAN>
+Load session
+.SH JAVA-WRAPPERS NOTE
+This program is a shell script wrapper based on
+.BR java-wrappers (7).
+You therefore benefit from several features; please see the 
+.BR java-wrappers (7)
+manual page for more information about them.
+.SH SEE ALSO
+the included help
+.br
+http://jabref.sourceforge.net/
+.br
+.BR java-wrappers (7)
+.SH AUTHOR
+jabref was written by Morten O. Alver and Nizar Batada.
+.PP
+This manual page was written by gregor herrmann <gregor+debian@comodo.priv.at>,
+for the Debian project (but may be used by others).
diff --git a/debian/jabref.bug-presubj b/debian/jabref.bug-presubj
new file mode 100644 (file)
index 0000000..927c7d9
--- /dev/null
@@ -0,0 +1,13 @@
+Quite some bugs reported against JabRef are actually problems with the used
+Java Virtual machine.
+
+Before filing a bug against JabRef please make sure to test with all
+installed JVMs, and provide the output of the jabref wrapper called with the
+debug parameter in the bug report, e.g.:
+
+$ DEBUG_WRAPPER=1 JAVA_HOME=/usr/lib/jvm/java-6-openjdk/ jabref
+$ DEBUG_WRAPPER=1 JAVA_HOME=/usr/lib/jvm/java-6-sun jabref
+
+Please also go through the bug reports against the JVM you're using at
+http://bugs.debian.org/ and check if similar problems are already reported
+there.
diff --git a/debian/jabref.desktop b/debian/jabref.desktop
new file mode 100644 (file)
index 0000000..c0a35da
--- /dev/null
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=JabRef
+Comment=Graphical editor for BibTex bibliographies
+Comment[de]=Grafischer Editor für BibTex-Bibliographien
+Exec=jabref %f
+Icon=/usr/share/pixmaps/jabref32.xpm
+Terminal=false
+Type=Application
+Categories=Office;Database
+MimeType=text/x-bibtex
diff --git a/debian/jabref.dirs b/debian/jabref.dirs
new file mode 100644 (file)
index 0000000..e772481
--- /dev/null
@@ -0,0 +1 @@
+usr/bin
diff --git a/debian/jabref.docs b/debian/jabref.docs
new file mode 100644 (file)
index 0000000..b77fc80
--- /dev/null
@@ -0,0 +1 @@
+src/txt/README
diff --git a/debian/jabref.install b/debian/jabref.install
new file mode 100644 (file)
index 0000000..b43efde
--- /dev/null
@@ -0,0 +1,3 @@
+build/lib/JabRef-2.7b.jar usr/share/jabref
+build/*.xpm usr/share/pixmaps
+debian/jabref.desktop usr/share/applications
diff --git a/debian/jabref.links b/debian/jabref.links
new file mode 100644 (file)
index 0000000..6e33bf8
--- /dev/null
@@ -0,0 +1 @@
+usr/share/jabref/JabRef-2.7b.jar usr/share/java/jabref.jar
diff --git a/debian/jabref.manpages b/debian/jabref.manpages
new file mode 100644 (file)
index 0000000..484e7ba
--- /dev/null
@@ -0,0 +1 @@
+debian/jabref.1
diff --git a/debian/jabref.menu b/debian/jabref.menu
new file mode 100644 (file)
index 0000000..35681a9
--- /dev/null
@@ -0,0 +1,7 @@
+?package(jabref):needs="x11"  \
+section="Applications/Data Management" \
+title="JabRef" \
+command="jabref" \
+icon="/usr/share/pixmaps/jabref32.xpm" \
+icon32x32="/usr/share/pixmaps/jabref32.xpm" \
+icon16x16="/usr/share/pixmaps/jabref16.xpm"
diff --git a/debian/jabref.mime b/debian/jabref.mime
new file mode 100644 (file)
index 0000000..05b6665
--- /dev/null
@@ -0,0 +1 @@
+text/x-bibtex; /usr/bin/jabref %s; edit=/usr/bin/jabref %s; description="BibTex document"; nametemplate=%s.bib; test=test -n "$DISPLAY"
diff --git a/debian/jabref.sharedmimeinfo b/debian/jabref.sharedmimeinfo
new file mode 100644 (file)
index 0000000..e051583
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info" >
+  <mime-type type="text/x-bibtex">
+    <sub-class-of type="text/plain"/>
+    <comment xml:lang="en">BibTeX document</comment>
+    <comment xml:lang="bg">Документ, формат BibTeX</comment>
+    <comment xml:lang="cs">Dokument BibTeX</comment>
+    <comment xml:lang="de">BibTeX-Dokument</comment>
+    <comment xml:lang="es">Documento BibTeX</comment>
+    <comment xml:lang="eu">BibTeX dokumentua</comment>
+    <comment xml:lang="hu">BibTeX dokumentum</comment>
+    <comment xml:lang="it">Documento BibTeX</comment>
+    <comment xml:lang="ko">BibTeX 문서</comment>
+    <comment xml:lang="nb">BibTeX-dokument</comment>
+    <comment xml:lang="nl">BibTeX-document</comment>
+    <comment xml:lang="nn">BibTeX-dokument</comment>
+    <comment xml:lang="sv">BibTeX-dokument</comment>
+    <comment xml:lang="uk">Документ BibTeX</comment>
+    <comment xml:lang="vi">Tài liệu BibTeX</comment>
+    <glob pattern="*.bib"/>
+  </mime-type>
+</mime-info>
diff --git a/debian/patches/02_libs.patch b/debian/patches/02_libs.patch
new file mode 100644 (file)
index 0000000..063c85e
--- /dev/null
@@ -0,0 +1,80 @@
+Author: Gerardo Curiel <gerardo@sophie.gerardo.com.ve>
+Author: Philip Rinn <rinni@gmx.net>
+Description: Use debian libraries and disable unnecesary unjarlib target,
+--- a/build.xml
++++ b/build.xml
+@@ -85,7 +85,7 @@
+       <property name="help.dir" value="${src.dir}/help" />
+       <property name="extensions.dir" value="${src.dir}/extensions" />
+       <property name="layout.dir" value="${src.dir}/resource/layout" />
+-      <property name="lib.dir" value="lib" />
++      <property name="lib.dir" value="/usr/share/java" />
+       <property name="tests.dir" value="${src.dir}/tests" />
+       <property name="nsis.executable" value="makensis.exe"/>
+@@ -107,22 +107,22 @@
+       <fileset id="jarsFileset" dir="${lib.dir}">
+               <include name="antlr.jar" />
+-              <include name="antlr-3.0b5.jar" />
+-              <include name="looks-2.3.1.jar" />
+-              <include name="forms-1.1.0.jar" />
++              <include name="antlr3.jar" />
++              <include name="antlr3-runtime.jar" />
++              <include name="looks.jar" />
++              <include name="forms.jar" />
+               <include name="spin.jar" />
+-              <include name="glazedlists-1.7.0_java15.jar" />
++              <include name="glazedlists.jar" />
+               <include name="microba.jar" />
+-              <include name="PDFBox-0.7.3-dev-reduced.jar" />
+-              <include name="JempBox-0.2.0.jar" />
+-              <include name="zoom-java.jar" />
+-      <include name="mysql-connector-java-5.0.7-bin.jar" />
++              <include name="pdfbox.jar" />
++              <include name="jempbox.jar" />
++      <include name="mysql-connector-java.jar" />
+         <!--<include name="substance-4.1.jar" />-->
+         <!-- Plugin runtime dependencies -->
+-              <include name="plugin/JPFCodeGenerator-rt.jar" />
+-              <include name="plugin/jpf.jar" />
+-              <include name="plugin/jpf-boot.jar" />
+-              <include name="plugin/commons-logging.jar" />
++              <include name="JPFCodeGenerator-rt.jar" />
++              <include name="jpf.jar" />
++              <include name="jpf-boot.jar" />
++              <include name="commons-logging.jar" />
+       </fileset>
+       <!-- Build classpath -->
+@@ -134,10 +134,10 @@
+       <!-- Classpath for running the code generator -->
+       <path id="codegenerator">
+-              <pathelement location="${lib.dir}/plugin/JPFCodeGenerator.jar" />
+-              <pathelement location="${lib.dir}/plugin/jpf.jar" />
+-              <pathelement location="${lib.dir}/plugin/jpf-boot.jar" />
+-              <pathelement location="${lib.dir}/plugin/velocity-dep-1.5.jar" />
++              <pathelement location="${lib.dir}/JPFCodeGenerator.jar" />
++              <pathelement location="${lib.dir}/jpf.jar" />
++              <pathelement location="${lib.dir}/jpf-boot.jar" />
++              <pathelement location="${lib.dir}/velocity.jar" />
+       </path>
+       <!-- Classpath for tests -->
+@@ -217,7 +217,7 @@
+       </target>
+       <!-- Jars up project -->
+-      <target name="jars" depends="build, unjarlib">
++      <target name="jars" depends="build">
+               <mkdir dir="${build.lib}" />
+               <mkdir dir="${build.tmp}" />
+               <jar destfile="${build.lib}/${build.jar}">
+@@ -623,6 +623,4 @@ Number (CCN)           maintenance
+               </jalopy>
+       </target>
+-      <taskdef name="jarbundler" classpath="${lib.dir}/jarbundler-2.1.0.jar" classname="net.sourceforge.jarbundler.JarBundler" />
+-
+ </project>
diff --git a/debian/patches/05_antlr32.patch b/debian/patches/05_antlr32.patch
new file mode 100644 (file)
index 0000000..9e0aff7
--- /dev/null
@@ -0,0 +1,3903 @@
+Description: include new BstParser/Lexer classes generated by antlr 3.2
+Origin: vendor
+Bug: http://bugs.debian.org/591124
+Forwarded: not-yet
+Author: tony mancill <tmancill@debian.org>
+Last-Update: 2010-08-03
+
+===================================================================
+--- a/src/java/net/sf/jabref/bst/BstParser.java
++++ b/src/java/net/sf/jabref/bst/BstParser.java
+@@ -1,51 +1,61 @@
+ package net.sf.jabref.bst;
+-// $ANTLR 3.0b5 Bst.g 2006-11-23 23:20:24
++// $ANTLR 3.2 debian-4 Bst.g 2010-08-02 19:59:10
+-import java.util.ArrayList;
++import org.antlr.runtime.*;
++import java.util.Stack;
+ import java.util.List;
++import java.util.ArrayList;
+-import org.antlr.runtime.BitSet;
+-import org.antlr.runtime.EarlyExitException;
+-import org.antlr.runtime.NoViableAltException;
+-import org.antlr.runtime.Parser;
+-import org.antlr.runtime.ParserRuleReturnScope;
+-import org.antlr.runtime.RecognitionException;
+-import org.antlr.runtime.Token;
+-import org.antlr.runtime.TokenStream;
+-import org.antlr.runtime.tree.CommonTreeAdaptor;
+-import org.antlr.runtime.tree.TreeAdaptor;
+-@SuppressWarnings({"unused", "unchecked"})
++import org.antlr.runtime.tree.*;
++
+ public class BstParser extends Parser {
+     public static final String[] tokenNames = new String[] {
+         "<invalid>", "<EOR>", "<DOWN>", "<UP>", "IDLIST", "STACK", "ENTRY", "COMMANDS", "STRINGS", "INTEGERS", "FUNCTION", "MACRO", "STRING", "READ", "EXECUTE", "ITERATE", "REVERSE", "SORT", "IDENTIFIER", "INTEGER", "QUOTED", "LETTER", "NUMERAL", "WS", "LINE_COMMENT", "'{'", "'}'", "'<'", "'>'", "'='", "'+'", "'-'", "':='", "'*'"
+     };
++    public static final int INTEGER=19;
++    public static final int FUNCTION=10;
++    public static final int T__29=29;
++    public static final int T__28=28;
++    public static final int T__27=27;
++    public static final int T__26=26;
++    public static final int LINE_COMMENT=24;
++    public static final int QUOTED=20;
++    public static final int T__25=25;
+     public static final int LETTER=21;
++    public static final int EXECUTE=14;
++    public static final int STRINGS=8;
++    public static final int SORT=17;
+     public static final int ENTRY=6;
++    public static final int EOF=-1;
+     public static final int INTEGERS=9;
++    public static final int T__30=30;
++    public static final int ITERATE=15;
++    public static final int T__31=31;
++    public static final int T__32=32;
+     public static final int WS=23;
++    public static final int T__33=33;
+     public static final int COMMANDS=7;
+-    public static final int STRING=12;
+-    public static final int EXECUTE=14;
+-    public static final int LINE_COMMENT=24;
+-    public static final int SORT=17;
+-    public static final int STACK=5;
+-    public static final int REVERSE=16;
+-    public static final int QUOTED=20;
+-    public static final int INTEGER=19;
+-    public static final int ITERATE=15;
+-    public static final int FUNCTION=10;
+-    public static final int EOF=-1;
+-    public static final int STRINGS=8;
++    public static final int READ=13;
+     public static final int IDENTIFIER=18;
+-    public static final int MACRO=11;
+     public static final int IDLIST=4;
+     public static final int NUMERAL=22;
+-    public static final int READ=13;
++    public static final int STACK=5;
++    public static final int REVERSE=16;
++    public static final int MACRO=11;
++    public static final int STRING=12;
++
++    // delegates
++    // delegators
++
+         public BstParser(TokenStream input) {
+-            super(input);
++            this(input, new RecognizerSharedState());
++        }
++        public BstParser(TokenStream input, RecognizerSharedState state) {
++            super(input, state);
++
+         }
+         
+     protected TreeAdaptor adaptor = new CommonTreeAdaptor();
+@@ -57,29 +67,29 @@ public class BstParser extends Parser {
+         return adaptor;
+     }
+-    public String[] getTokenNames() { return tokenNames; }
++    public String[] getTokenNames() { return BstParser.tokenNames; }
+     public String getGrammarFileName() { return "Bst.g"; }
+     public static class program_return extends ParserRuleReturnScope {
+         Object tree;
+         public Object getTree() { return tree; }
+-    }
++    };
+-    // $ANTLR start program
++    // $ANTLR start "program"
+     // Bst.g:14:1: program : ( commands )+ -> ^( COMMANDS ( commands )+ ) ;
+-    public program_return program() throws RecognitionException {   
+-        program_return retval = new program_return();
++    public final BstParser.program_return program() throws RecognitionException {
++        BstParser.program_return retval = new BstParser.program_return();
+         retval.start = input.LT(1);
+         Object root_0 = null;
+-        commands_return commands1 = null;
++        BstParser.commands_return commands1 = null;
+-        List list_commands=new ArrayList();
++        RewriteRuleSubtreeStream stream_commands=new RewriteRuleSubtreeStream(adaptor,"rule commands");
+         try {
+-            // Bst.g:14:11: ( ( commands )+ -> ^( COMMANDS ( commands )+ ) )
++            // Bst.g:14:9: ( ( commands )+ -> ^( COMMANDS ( commands )+ ) )
+             // Bst.g:14:11: ( commands )+
+             {
+             // Bst.g:14:11: ( commands )+
+@@ -88,6 +98,7 @@ public class BstParser extends Parser {
+             do {
+                 int alt1=2;
+                 int LA1_0 = input.LA(1);
++
+                 if ( (LA1_0==ENTRY||(LA1_0>=STRINGS && LA1_0<=MACRO)||(LA1_0>=READ && LA1_0<=SORT)) ) {
+                     alt1=1;
+                 }
+@@ -99,9 +110,10 @@ public class BstParser extends Parser {
+                   {
+                   pushFollow(FOLLOW_commands_in_program45);
+                   commands1=commands();
+-                  _fsp--;
+-                  list_commands.add(commands1.tree);
++                  state._fsp--;
++
++                  stream_commands.add(commands1.getTree());
+                   }
+                   break;
+@@ -116,65 +128,69 @@ public class BstParser extends Parser {
+             } while (true);
++
+             // AST REWRITE
+-            
+-                      int i_0 = 0;
++            // elements: commands
++            // token labels:
++            // rule labels: retval
++            // token list labels:
++            // rule list labels:
++            // wildcard labels:
+             retval.tree = root_0;
+-            root_0 = adaptor.nil();
++            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
++
++            root_0 = (Object)adaptor.nil();
+             // 14:21: -> ^( COMMANDS ( commands )+ )
+             {
+                 // Bst.g:14:24: ^( COMMANDS ( commands )+ )
+                 {
+-                Object root_1 = adaptor.nil();
+-                root_1 = adaptor.becomeRoot(adaptor.create(COMMANDS, "COMMANDS"), root_1);
+-
+-                // Bst.g:14:35: ( commands )+
+-                {
+-                int n_1 = list_commands == null ? 0 : list_commands.size();
+-                 
+-
+-
+-                if ( n_1==0 ) throw new RuntimeException("Must have more than one element for (...)+ loops");
+-                for (int i_1=0; i_1<n_1; i_1++) {
+-                    adaptor.addChild(root_1, list_commands.get(i_1));
++                Object root_1 = (Object)adaptor.nil();
++                root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(COMMANDS, "COMMANDS"), root_1);
++                if ( !(stream_commands.hasNext()) ) {
++                    throw new RewriteEarlyExitException();
+                 }
++                while ( stream_commands.hasNext() ) {
++                    adaptor.addChild(root_1, stream_commands.nextTree());
++
+                 }
++                stream_commands.reset();
+                 adaptor.addChild(root_0, root_1);
+                 }
+             }
++            retval.tree = root_0;
++            }
++            retval.stop = input.LT(-1);
+-            }
++            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
++            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+         }
+         catch (RecognitionException re) {
+             reportError(re);
+             recover(input,re);
++      retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
++
+         }
+         finally {
+-            retval.stop = input.LT(-1);
+-
+-                retval.tree = adaptor.rulePostProcessing(root_0);
+-                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+-
+-       }
++        }
+         return retval;
+     }
+-    // $ANTLR end program
++    // $ANTLR end "program"
+     public static class commands_return extends ParserRuleReturnScope {
+         Object tree;
+         public Object getTree() { return tree; }
+-    }
++    };
+-    // $ANTLR start commands
+-    // Bst.g:16:1: commands : ( STRINGS^^ idList | INTEGERS^^ idList | FUNCTION^^ id stack | MACRO^^ id '{'! STRING '}'! | READ^^ | EXECUTE^^ '{'! function '}'! | ITERATE^^ '{'! function '}'! | REVERSE^^ '{'! function '}'! | ENTRY^^ idList0 idList0 idList0 | SORT^^ );
+-    public commands_return commands() throws RecognitionException {   
+-        commands_return retval = new commands_return();
++    // $ANTLR start "commands"
++    // Bst.g:16:1: commands : ( STRINGS idList | INTEGERS idList | FUNCTION id stack | MACRO id '{' STRING '}' | READ | EXECUTE '{' function '}' | ITERATE '{' function '}' | REVERSE '{' function '}' | ENTRY idList0 idList0 idList0 | SORT );
++    public final BstParser.commands_return commands() throws RecognitionException {
++        BstParser.commands_return retval = new BstParser.commands_return();
+         retval.start = input.LT(1);
+         Object root_0 = null;
+@@ -198,27 +214,27 @@ public class BstParser extends Parser {
+         Token char_literal26=null;
+         Token ENTRY27=null;
+         Token SORT31=null;
+-        idList_return idList3 = null;
++        BstParser.idList_return idList3 = null;
+-        idList_return idList5 = null;
++        BstParser.idList_return idList5 = null;
+-        id_return id7 = null;
++        BstParser.id_return id7 = null;
+-        stack_return stack8 = null;
++        BstParser.stack_return stack8 = null;
+-        id_return id10 = null;
++        BstParser.id_return id10 = null;
+-        function_return function17 = null;
++        BstParser.function_return function17 = null;
+-        function_return function21 = null;
++        BstParser.function_return function21 = null;
+-        function_return function25 = null;
++        BstParser.function_return function25 = null;
+-        idList0_return idList028 = null;
++        BstParser.idList0_return idList028 = null;
+-        idList0_return idList029 = null;
++        BstParser.idList0_return idList029 = null;
+-        idList0_return idList030 = null;
++        BstParser.idList0_return idList030 = null;
+         Object STRINGS2_tree=null;
+@@ -242,280 +258,294 @@ public class BstParser extends Parser {
+         Object SORT31_tree=null;
+         try {
+-            // Bst.g:17:4: ( STRINGS^^ idList | INTEGERS^^ idList | FUNCTION^^ id stack | MACRO^^ id '{'! STRING '}'! | READ^^ | EXECUTE^^ '{'! function '}'! | ITERATE^^ '{'! function '}'! | REVERSE^^ '{'! function '}'! | ENTRY^^ idList0 idList0 idList0 | SORT^^ )
++            // Bst.g:17:2: ( STRINGS idList | INTEGERS idList | FUNCTION id stack | MACRO id '{' STRING '}' | READ | EXECUTE '{' function '}' | ITERATE '{' function '}' | REVERSE '{' function '}' | ENTRY idList0 idList0 idList0 | SORT )
+             int alt2=10;
+             switch ( input.LA(1) ) {
+             case STRINGS:
++                {
+                 alt2=1;
++                }
+                 break;
+             case INTEGERS:
++                {
+                 alt2=2;
++                }
+                 break;
+             case FUNCTION:
++                {
+                 alt2=3;
++                }
+                 break;
+             case MACRO:
++                {
+                 alt2=4;
++                }
+                 break;
+             case READ:
++                {
+                 alt2=5;
++                }
+                 break;
+             case EXECUTE:
++                {
+                 alt2=6;
++                }
+                 break;
+             case ITERATE:
++                {
+                 alt2=7;
++                }
+                 break;
+             case REVERSE:
++                {
+                 alt2=8;
++                }
+                 break;
+             case ENTRY:
++                {
+                 alt2=9;
++                }
+                 break;
+             case SORT:
++                {
+                 alt2=10;
++                }
+                 break;
+             default:
+                 NoViableAltException nvae =
+-                    new NoViableAltException("16:1: commands : ( STRINGS^^ idList | INTEGERS^^ idList | FUNCTION^^ id stack | MACRO^^ id '{'! STRING '}'! | READ^^ | EXECUTE^^ '{'! function '}'! | ITERATE^^ '{'! function '}'! | REVERSE^^ '{'! function '}'! | ENTRY^^ idList0 idList0 idList0 | SORT^^ );", 2, 0, input);
++                    new NoViableAltException("", 2, 0, input);
+                 throw nvae;
+             }
+             switch (alt2) {
+                 case 1 :
+-                    // Bst.g:17:4: STRINGS^^ idList
++                    // Bst.g:17:4: STRINGS idList
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
+-                    STRINGS2=input.LT(1);
+-                    match(input,STRINGS,FOLLOW_STRINGS_in_commands65); 
+-                    STRINGS2_tree = adaptor.create(STRINGS2);
+-                    root_0 = adaptor.becomeRoot(STRINGS2_tree, root_0);
++                    STRINGS2=(Token)match(input,STRINGS,FOLLOW_STRINGS_in_commands65);
++                    STRINGS2_tree = (Object)adaptor.create(STRINGS2);
++                    root_0 = (Object)adaptor.becomeRoot(STRINGS2_tree, root_0);
+                     pushFollow(FOLLOW_idList_in_commands68);
+                     idList3=idList();
+-                    _fsp--;
+-                    adaptor.addChild(root_0, idList3.tree);
++                    state._fsp--;
++
++                    adaptor.addChild(root_0, idList3.getTree());
+                     }
+                     break;
+                 case 2 :
+-                    // Bst.g:18:4: INTEGERS^^ idList
++                    // Bst.g:18:4: INTEGERS idList
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
+-                    INTEGERS4=input.LT(1);
+-                    match(input,INTEGERS,FOLLOW_INTEGERS_in_commands73); 
+-                    INTEGERS4_tree = adaptor.create(INTEGERS4);
+-                    root_0 = adaptor.becomeRoot(INTEGERS4_tree, root_0);
++                    INTEGERS4=(Token)match(input,INTEGERS,FOLLOW_INTEGERS_in_commands73);
++                    INTEGERS4_tree = (Object)adaptor.create(INTEGERS4);
++                    root_0 = (Object)adaptor.becomeRoot(INTEGERS4_tree, root_0);
+                     pushFollow(FOLLOW_idList_in_commands76);
+                     idList5=idList();
+-                    _fsp--;
+-                    adaptor.addChild(root_0, idList5.tree);
++                    state._fsp--;
++
++                    adaptor.addChild(root_0, idList5.getTree());
+                     }
+                     break;
+                 case 3 :
+-                    // Bst.g:19:4: FUNCTION^^ id stack
++                    // Bst.g:19:4: FUNCTION id stack
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
+-                    FUNCTION6=input.LT(1);
+-                    match(input,FUNCTION,FOLLOW_FUNCTION_in_commands81); 
+-                    FUNCTION6_tree = adaptor.create(FUNCTION6);
+-                    root_0 = adaptor.becomeRoot(FUNCTION6_tree, root_0);
++                    FUNCTION6=(Token)match(input,FUNCTION,FOLLOW_FUNCTION_in_commands81);
++                    FUNCTION6_tree = (Object)adaptor.create(FUNCTION6);
++                    root_0 = (Object)adaptor.becomeRoot(FUNCTION6_tree, root_0);
+                     pushFollow(FOLLOW_id_in_commands84);
+                     id7=id();
+-                    _fsp--;
+-                    adaptor.addChild(root_0, id7.tree);
++                    state._fsp--;
++
++                    adaptor.addChild(root_0, id7.getTree());
+                     pushFollow(FOLLOW_stack_in_commands86);
+                     stack8=stack();
+-                    _fsp--;
+-                    adaptor.addChild(root_0, stack8.tree);
++                    state._fsp--;
++
++                    adaptor.addChild(root_0, stack8.getTree());
+                     }
+                     break;
+                 case 4 :
+-                    // Bst.g:20:4: MACRO^^ id '{'! STRING '}'!
++                    // Bst.g:20:4: MACRO id '{' STRING '}'
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
+-                    MACRO9=input.LT(1);
+-                    match(input,MACRO,FOLLOW_MACRO_in_commands91); 
+-                    MACRO9_tree = adaptor.create(MACRO9);
+-                    root_0 = adaptor.becomeRoot(MACRO9_tree, root_0);
++                    MACRO9=(Token)match(input,MACRO,FOLLOW_MACRO_in_commands91);
++                    MACRO9_tree = (Object)adaptor.create(MACRO9);
++                    root_0 = (Object)adaptor.becomeRoot(MACRO9_tree, root_0);
+                     pushFollow(FOLLOW_id_in_commands94);
+                     id10=id();
+-                    _fsp--;
+-                    adaptor.addChild(root_0, id10.tree);
+-                    char_literal11=input.LT(1);
+-                    match(input,25,FOLLOW_25_in_commands96); 
+-                    STRING12=input.LT(1);
+-                    match(input,STRING,FOLLOW_STRING_in_commands99); 
+-                    STRING12_tree = adaptor.create(STRING12);
++                    state._fsp--;
++
++                    adaptor.addChild(root_0, id10.getTree());
++                    char_literal11=(Token)match(input,25,FOLLOW_25_in_commands96);
++                    STRING12=(Token)match(input,STRING,FOLLOW_STRING_in_commands99);
++                    STRING12_tree = (Object)adaptor.create(STRING12);
+                     adaptor.addChild(root_0, STRING12_tree);
+-                    char_literal13=input.LT(1);
+-                    match(input,26,FOLLOW_26_in_commands101); 
++                    char_literal13=(Token)match(input,26,FOLLOW_26_in_commands101);
+                     }
+                     break;
+                 case 5 :
+-                    // Bst.g:21:4: READ^^
++                    // Bst.g:21:4: READ
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
+-                    READ14=input.LT(1);
+-                    match(input,READ,FOLLOW_READ_in_commands107); 
+-                    READ14_tree = adaptor.create(READ14);
+-                    root_0 = adaptor.becomeRoot(READ14_tree, root_0);
++                    READ14=(Token)match(input,READ,FOLLOW_READ_in_commands107);
++                    READ14_tree = (Object)adaptor.create(READ14);
++                    root_0 = (Object)adaptor.becomeRoot(READ14_tree, root_0);
+                     }
+                     break;
+                 case 6 :
+-                    // Bst.g:22:4: EXECUTE^^ '{'! function '}'!
++                    // Bst.g:22:4: EXECUTE '{' function '}'
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
+-                    EXECUTE15=input.LT(1);
+-                    match(input,EXECUTE,FOLLOW_EXECUTE_in_commands113); 
+-                    EXECUTE15_tree = adaptor.create(EXECUTE15);
+-                    root_0 = adaptor.becomeRoot(EXECUTE15_tree, root_0);
++                    EXECUTE15=(Token)match(input,EXECUTE,FOLLOW_EXECUTE_in_commands113);
++                    EXECUTE15_tree = (Object)adaptor.create(EXECUTE15);
++                    root_0 = (Object)adaptor.becomeRoot(EXECUTE15_tree, root_0);
+-                    char_literal16=input.LT(1);
+-                    match(input,25,FOLLOW_25_in_commands116); 
++                    char_literal16=(Token)match(input,25,FOLLOW_25_in_commands116);
+                     pushFollow(FOLLOW_function_in_commands119);
+                     function17=function();
+-                    _fsp--;
+-                    adaptor.addChild(root_0, function17.tree);
+-                    char_literal18=input.LT(1);
+-                    match(input,26,FOLLOW_26_in_commands121); 
++                    state._fsp--;
++
++                    adaptor.addChild(root_0, function17.getTree());
++                    char_literal18=(Token)match(input,26,FOLLOW_26_in_commands121);
+                     }
+                     break;
+                 case 7 :
+-                    // Bst.g:23:4: ITERATE^^ '{'! function '}'!
++                    // Bst.g:23:4: ITERATE '{' function '}'
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
+-                    ITERATE19=input.LT(1);
+-                    match(input,ITERATE,FOLLOW_ITERATE_in_commands127); 
+-                    ITERATE19_tree = adaptor.create(ITERATE19);
+-                    root_0 = adaptor.becomeRoot(ITERATE19_tree, root_0);
++                    ITERATE19=(Token)match(input,ITERATE,FOLLOW_ITERATE_in_commands127);
++                    ITERATE19_tree = (Object)adaptor.create(ITERATE19);
++                    root_0 = (Object)adaptor.becomeRoot(ITERATE19_tree, root_0);
+-                    char_literal20=input.LT(1);
+-                    match(input,25,FOLLOW_25_in_commands130); 
++                    char_literal20=(Token)match(input,25,FOLLOW_25_in_commands130);
+                     pushFollow(FOLLOW_function_in_commands133);
+                     function21=function();
+-                    _fsp--;
+-                    adaptor.addChild(root_0, function21.tree);
+-                    char_literal22=input.LT(1);
+-                    match(input,26,FOLLOW_26_in_commands135); 
++                    state._fsp--;
++
++                    adaptor.addChild(root_0, function21.getTree());
++                    char_literal22=(Token)match(input,26,FOLLOW_26_in_commands135);
+                     }
+                     break;
+                 case 8 :
+-                    // Bst.g:24:4: REVERSE^^ '{'! function '}'!
++                    // Bst.g:24:4: REVERSE '{' function '}'
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
+-                    REVERSE23=input.LT(1);
+-                    match(input,REVERSE,FOLLOW_REVERSE_in_commands141); 
+-                    REVERSE23_tree = adaptor.create(REVERSE23);
+-                    root_0 = adaptor.becomeRoot(REVERSE23_tree, root_0);
++                    REVERSE23=(Token)match(input,REVERSE,FOLLOW_REVERSE_in_commands141);
++                    REVERSE23_tree = (Object)adaptor.create(REVERSE23);
++                    root_0 = (Object)adaptor.becomeRoot(REVERSE23_tree, root_0);
+-                    char_literal24=input.LT(1);
+-                    match(input,25,FOLLOW_25_in_commands144); 
++                    char_literal24=(Token)match(input,25,FOLLOW_25_in_commands144);
+                     pushFollow(FOLLOW_function_in_commands147);
+                     function25=function();
+-                    _fsp--;
+-                    adaptor.addChild(root_0, function25.tree);
+-                    char_literal26=input.LT(1);
+-                    match(input,26,FOLLOW_26_in_commands149); 
++                    state._fsp--;
++
++                    adaptor.addChild(root_0, function25.getTree());
++                    char_literal26=(Token)match(input,26,FOLLOW_26_in_commands149);
+                     }
+                     break;
+                 case 9 :
+-                    // Bst.g:25:4: ENTRY^^ idList0 idList0 idList0
++                    // Bst.g:25:4: ENTRY idList0 idList0 idList0
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
+-                    ENTRY27=input.LT(1);
+-                    match(input,ENTRY,FOLLOW_ENTRY_in_commands155); 
+-                    ENTRY27_tree = adaptor.create(ENTRY27);
+-                    root_0 = adaptor.becomeRoot(ENTRY27_tree, root_0);
++                    ENTRY27=(Token)match(input,ENTRY,FOLLOW_ENTRY_in_commands155);
++                    ENTRY27_tree = (Object)adaptor.create(ENTRY27);
++                    root_0 = (Object)adaptor.becomeRoot(ENTRY27_tree, root_0);
+                     pushFollow(FOLLOW_idList0_in_commands158);
+                     idList028=idList0();
+-                    _fsp--;
+-                    adaptor.addChild(root_0, idList028.tree);
++                    state._fsp--;
++
++                    adaptor.addChild(root_0, idList028.getTree());
+                     pushFollow(FOLLOW_idList0_in_commands160);
+                     idList029=idList0();
+-                    _fsp--;
+-                    adaptor.addChild(root_0, idList029.tree);
++                    state._fsp--;
++
++                    adaptor.addChild(root_0, idList029.getTree());
+                     pushFollow(FOLLOW_idList0_in_commands162);
+                     idList030=idList0();
+-                    _fsp--;
+-                    adaptor.addChild(root_0, idList030.tree);
++                    state._fsp--;
++
++                    adaptor.addChild(root_0, idList030.getTree());
+                     }
+                     break;
+                 case 10 :
+-                    // Bst.g:26:4: SORT^^
++                    // Bst.g:26:4: SORT
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
+-                    SORT31=input.LT(1);
+-                    match(input,SORT,FOLLOW_SORT_in_commands167); 
+-                    SORT31_tree = adaptor.create(SORT31);
+-                    root_0 = adaptor.becomeRoot(SORT31_tree, root_0);
++                    SORT31=(Token)match(input,SORT,FOLLOW_SORT_in_commands167);
++                    SORT31_tree = (Object)adaptor.create(SORT31);
++                    root_0 = (Object)adaptor.becomeRoot(SORT31_tree, root_0);
+                     }
+                     break;
+             }
++            retval.stop = input.LT(-1);
++
++            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
++            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
++
+         }
+         catch (RecognitionException re) {
+             reportError(re);
+             recover(input,re);
++      retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
++
+         }
+         finally {
+-            retval.stop = input.LT(-1);
+-
+-                retval.tree = adaptor.rulePostProcessing(root_0);
+-                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+-
+-       }
++        }
+         return retval;
+     }
+-    // $ANTLR end commands
++    // $ANTLR end "commands"
+     public static class identifier_return extends ParserRuleReturnScope {
+         Object tree;
+         public Object getTree() { return tree; }
+-    }
++    };
+-    // $ANTLR start identifier
++    // $ANTLR start "identifier"
+     // Bst.g:28:1: identifier : IDENTIFIER ;
+-    public identifier_return identifier() throws RecognitionException {   
+-        identifier_return retval = new identifier_return();
++    public final BstParser.identifier_return identifier() throws RecognitionException {
++        BstParser.identifier_return retval = new BstParser.identifier_return();
+         retval.start = input.LT(1);
+         Object root_0 = null;
+@@ -525,121 +555,121 @@ public class BstParser extends Parser {
+         Object IDENTIFIER32_tree=null;
+         try {
+-            // Bst.g:29:4: ( IDENTIFIER )
++            // Bst.g:29:2: ( IDENTIFIER )
+             // Bst.g:29:4: IDENTIFIER
+             {
+-            root_0 = adaptor.nil();
++            root_0 = (Object)adaptor.nil();
+-            IDENTIFIER32=input.LT(1);
+-            match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_identifier178); 
+-            IDENTIFIER32_tree = adaptor.create(IDENTIFIER32);
++            IDENTIFIER32=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_identifier178);
++            IDENTIFIER32_tree = (Object)adaptor.create(IDENTIFIER32);
+             adaptor.addChild(root_0, IDENTIFIER32_tree);
+             }
++            retval.stop = input.LT(-1);
++
++            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
++            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
++
+         }
+         catch (RecognitionException re) {
+             reportError(re);
+             recover(input,re);
++      retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
++
+         }
+         finally {
+-            retval.stop = input.LT(-1);
+-
+-                retval.tree = adaptor.rulePostProcessing(root_0);
+-                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+-
+-       }
++        }
+         return retval;
+     }
+-    // $ANTLR end identifier
++    // $ANTLR end "identifier"
+     public static class id_return extends ParserRuleReturnScope {
+         Object tree;
+         public Object getTree() { return tree; }
+-    }
++    };
+-    // $ANTLR start id
+-    // Bst.g:31:1: id : '{'! identifier '}'! ;
+-    public id_return id() throws RecognitionException {   
+-        id_return retval = new id_return();
++    // $ANTLR start "id"
++    // Bst.g:31:1: id : '{' identifier '}' ;
++    public final BstParser.id_return id() throws RecognitionException {
++        BstParser.id_return retval = new BstParser.id_return();
+         retval.start = input.LT(1);
+         Object root_0 = null;
+         Token char_literal33=null;
+         Token char_literal35=null;
+-        identifier_return identifier34 = null;
++        BstParser.identifier_return identifier34 = null;
+         Object char_literal33_tree=null;
+         Object char_literal35_tree=null;
+         try {
+-            // Bst.g:32:4: ( '{'! identifier '}'! )
+-            // Bst.g:32:4: '{'! identifier '}'!
++            // Bst.g:32:2: ( '{' identifier '}' )
++            // Bst.g:32:4: '{' identifier '}'
+             {
+-            root_0 = adaptor.nil();
++            root_0 = (Object)adaptor.nil();
+-            char_literal33=input.LT(1);
+-            match(input,25,FOLLOW_25_in_id188); 
++            char_literal33=(Token)match(input,25,FOLLOW_25_in_id188);
+             pushFollow(FOLLOW_identifier_in_id191);
+             identifier34=identifier();
+-            _fsp--;
+-            adaptor.addChild(root_0, identifier34.tree);
+-            char_literal35=input.LT(1);
+-            match(input,26,FOLLOW_26_in_id193); 
++            state._fsp--;
++
++            adaptor.addChild(root_0, identifier34.getTree());
++            char_literal35=(Token)match(input,26,FOLLOW_26_in_id193);
+             }
++            retval.stop = input.LT(-1);
++
++            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
++            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
++
+         }
+         catch (RecognitionException re) {
+             reportError(re);
+             recover(input,re);
++      retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
++
+         }
+         finally {
+-            retval.stop = input.LT(-1);
+-
+-                retval.tree = adaptor.rulePostProcessing(root_0);
+-                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+-
+-       }
++        }
+         return retval;
+     }
+-    // $ANTLR end id
++    // $ANTLR end "id"
+     public static class idList_return extends ParserRuleReturnScope {
+         Object tree;
+         public Object getTree() { return tree; }
+-    }
++    };
+-    // $ANTLR start idList
++    // $ANTLR start "idList"
+     // Bst.g:34:1: idList : '{' ( identifier )+ '}' -> ^( IDLIST ( identifier )+ ) ;
+-    
+-      public idList_return idList() throws RecognitionException {   
+-        idList_return retval = new idList_return();
++    public final BstParser.idList_return idList() throws RecognitionException {
++        BstParser.idList_return retval = new BstParser.idList_return();
+         retval.start = input.LT(1);
+         Object root_0 = null;
+         Token char_literal36=null;
+         Token char_literal38=null;
+-        identifier_return identifier37 = null;
++        BstParser.identifier_return identifier37 = null;
++
+-        List list_identifier=new ArrayList();
+-        List list_26=new ArrayList();
+-        List list_25=new ArrayList();
+         Object char_literal36_tree=null;
+         Object char_literal38_tree=null;
+-
++        RewriteRuleTokenStream stream_25=new RewriteRuleTokenStream(adaptor,"token 25");
++        RewriteRuleTokenStream stream_26=new RewriteRuleTokenStream(adaptor,"token 26");
++        RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
+         try {
+-            // Bst.g:35:4: ( '{' ( identifier )+ '}' -> ^( IDLIST ( identifier )+ ) )
++            // Bst.g:35:2: ( '{' ( identifier )+ '}' -> ^( IDLIST ( identifier )+ ) )
+             // Bst.g:35:4: '{' ( identifier )+ '}'
+             {
+-            char_literal36=input.LT(1);
+-            match(input,25,FOLLOW_25_in_idList205); 
+-            list_25.add(char_literal36);
++            char_literal36=(Token)match(input,25,FOLLOW_25_in_idList205);
++            stream_25.add(char_literal36);
+             // Bst.g:35:8: ( identifier )+
+             int cnt3=0;
+@@ -647,6 +677,7 @@ public class BstParser extends Parser {
+             do {
+                 int alt3=2;
+                 int LA3_0 = input.LA(1);
++
+                 if ( (LA3_0==IDENTIFIER) ) {
+                     alt3=1;
+                 }
+@@ -658,9 +689,10 @@ public class BstParser extends Parser {
+                   {
+                   pushFollow(FOLLOW_identifier_in_idList207);
+                   identifier37=identifier();
+-                  _fsp--;
+-                  list_identifier.add(identifier37.tree);
++                  state._fsp--;
++
++                  stream_identifier.add(identifier37.getTree());
+                   }
+                   break;
+@@ -674,96 +706,100 @@ public class BstParser extends Parser {
+                 cnt3++;
+             } while (true);
+-            char_literal38=input.LT(1);
+-            match(input,26,FOLLOW_26_in_idList210); 
+-            list_26.add(char_literal38);
++            char_literal38=(Token)match(input,26,FOLLOW_26_in_idList210);
++            stream_26.add(char_literal38);
++
+             // AST REWRITE
+-            int i_0 = 0;
++            // elements: identifier
++            // token labels:
++            // rule labels: retval
++            // token list labels:
++            // rule list labels:
++            // wildcard labels:
+             retval.tree = root_0;
+-            root_0 = adaptor.nil();
++            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
++
++            root_0 = (Object)adaptor.nil();
+             // 35:24: -> ^( IDLIST ( identifier )+ )
+             {
+                 // Bst.g:35:27: ^( IDLIST ( identifier )+ )
+                 {
+-                Object root_1 = adaptor.nil();
+-                root_1 = adaptor.becomeRoot(adaptor.create(IDLIST, "IDLIST"), root_1);
+-
+-                // Bst.g:35:36: ( identifier )+
+-                {
+-                int n_1 = list_identifier == null ? 0 : list_identifier.size();
+-                 
+-
+-
+-                if ( n_1==0 ) throw new RuntimeException("Must have more than one element for (...)+ loops");
+-                for (int i_1=0; i_1<n_1; i_1++) {
+-                    adaptor.addChild(root_1, list_identifier.get(i_1));
++                Object root_1 = (Object)adaptor.nil();
++                root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(IDLIST, "IDLIST"), root_1);
++                if ( !(stream_identifier.hasNext()) ) {
++                    throw new RewriteEarlyExitException();
+                 }
++                while ( stream_identifier.hasNext() ) {
++                    adaptor.addChild(root_1, stream_identifier.nextTree());
++
+                 }
++                stream_identifier.reset();
+                 adaptor.addChild(root_0, root_1);
+                 }
+             }
++            retval.tree = root_0;
++            }
++            retval.stop = input.LT(-1);
+-            }
++            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
++            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+         }
+         catch (RecognitionException re) {
+             reportError(re);
+             recover(input,re);
++      retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
++
+         }
+         finally {
+-            retval.stop = input.LT(-1);
+-
+-                retval.tree = adaptor.rulePostProcessing(root_0);
+-                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+-
+-       }
++        }
+         return retval;
+     }
+-    // $ANTLR end idList
++    // $ANTLR end "idList"
+     public static class idList0_return extends ParserRuleReturnScope {
+         Object tree;
+         public Object getTree() { return tree; }
+-    }
++    };
+-    // $ANTLR start idList0
++    // $ANTLR start "idList0"
+     // Bst.g:37:1: idList0 : '{' ( identifier )* '}' -> ^( IDLIST ( identifier )* ) ;
+-    public idList0_return idList0() throws RecognitionException {   
+-        idList0_return retval = new idList0_return();
++    public final BstParser.idList0_return idList0() throws RecognitionException {
++        BstParser.idList0_return retval = new BstParser.idList0_return();
+         retval.start = input.LT(1);
+         Object root_0 = null;
+         Token char_literal39=null;
+         Token char_literal41=null;
+-        identifier_return identifier40 = null;
++        BstParser.identifier_return identifier40 = null;
++
+-        List list_identifier=new ArrayList();
+-        List list_26=new ArrayList();
+-        List list_25=new ArrayList();
+         Object char_literal39_tree=null;
+         Object char_literal41_tree=null;
+-
++        RewriteRuleTokenStream stream_25=new RewriteRuleTokenStream(adaptor,"token 25");
++        RewriteRuleTokenStream stream_26=new RewriteRuleTokenStream(adaptor,"token 26");
++        RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
+         try {
+-            // Bst.g:38:4: ( '{' ( identifier )* '}' -> ^( IDLIST ( identifier )* ) )
++            // Bst.g:38:2: ( '{' ( identifier )* '}' -> ^( IDLIST ( identifier )* ) )
+             // Bst.g:38:4: '{' ( identifier )* '}'
+             {
+-            char_literal39=input.LT(1);
+-            match(input,25,FOLLOW_25_in_idList0230); 
+-            list_25.add(char_literal39);
++            char_literal39=(Token)match(input,25,FOLLOW_25_in_idList0230);
++            stream_25.add(char_literal39);
+             // Bst.g:38:8: ( identifier )*
+             loop4:
+             do {
+                 int alt4=2;
+                 int LA4_0 = input.LA(1);
++
+                 if ( (LA4_0==IDENTIFIER) ) {
+                     alt4=1;
+                 }
+@@ -775,9 +811,10 @@ public class BstParser extends Parser {
+                   {
+                   pushFollow(FOLLOW_identifier_in_idList0232);
+                   identifier40=identifier();
+-                  _fsp--;
+-                  list_identifier.add(identifier40.tree);
++                  state._fsp--;
++
++                  stream_identifier.add(identifier40.getTree());
+                   }
+                   break;
+@@ -787,68 +824,71 @@ public class BstParser extends Parser {
+                 }
+             } while (true);
+-            char_literal41=input.LT(1);
+-            match(input,26,FOLLOW_26_in_idList0235); 
+-            list_26.add(char_literal41);
++            char_literal41=(Token)match(input,26,FOLLOW_26_in_idList0235);
++            stream_26.add(char_literal41);
++
+             // AST REWRITE
+-            int i_0 = 0;
++            // elements: identifier
++            // token labels:
++            // rule labels: retval
++            // token list labels:
++            // rule list labels:
++            // wildcard labels:
+             retval.tree = root_0;
+-            root_0 = adaptor.nil();
++            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
++
++            root_0 = (Object)adaptor.nil();
+             // 38:24: -> ^( IDLIST ( identifier )* )
+             {
+                 // Bst.g:38:27: ^( IDLIST ( identifier )* )
+                 {
+-                Object root_1 = adaptor.nil();
+-                root_1 = adaptor.becomeRoot(adaptor.create(IDLIST, "IDLIST"), root_1);
++                Object root_1 = (Object)adaptor.nil();
++                root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(IDLIST, "IDLIST"), root_1);
+                 // Bst.g:38:36: ( identifier )*
+-                {
+-                int n_1 = list_identifier == null ? 0 : list_identifier.size();
+-                 
+-
++                while ( stream_identifier.hasNext() ) {
++                    adaptor.addChild(root_1, stream_identifier.nextTree());
+-                for (int i_1=0; i_1<n_1; i_1++) {
+-                    adaptor.addChild(root_1, list_identifier.get(i_1));
+-
+-                }
+                 }
++                stream_identifier.reset();
+                 adaptor.addChild(root_0, root_1);
+                 }
+             }
++            retval.tree = root_0;
++            }
++            retval.stop = input.LT(-1);
+-            }
++            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
++            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+         }
+         catch (RecognitionException re) {
+             reportError(re);
+             recover(input,re);
++      retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
++
+         }
+         finally {
+-            retval.stop = input.LT(-1);
+-
+-                retval.tree = adaptor.rulePostProcessing(root_0);
+-                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+-
+-       }
++        }
+         return retval;
+     }
+-    // $ANTLR end idList0
++    // $ANTLR end "idList0"
+     public static class function_return extends ParserRuleReturnScope {
+         Object tree;
+         public Object getTree() { return tree; }
+-    }
++    };
+-    // $ANTLR start function
++    // $ANTLR start "function"
+     // Bst.g:40:1: function : ( '<' | '>' | '=' | '+' | '-' | ':=' | '*' | identifier );
+-    public function_return function() throws RecognitionException {   
+-        function_return retval = new function_return();
++    public final BstParser.function_return function() throws RecognitionException {
++        BstParser.function_return retval = new BstParser.function_return();
+         retval.start = input.LT(1);
+         Object root_0 = null;
+@@ -860,7 +900,7 @@ public class BstParser extends Parser {
+         Token char_literal46=null;
+         Token string_literal47=null;
+         Token char_literal48=null;
+-        identifier_return identifier49 = null;
++        BstParser.identifier_return identifier49 = null;
+         Object char_literal42_tree=null;
+@@ -872,36 +912,52 @@ public class BstParser extends Parser {
+         Object char_literal48_tree=null;
+         try {
+-            // Bst.g:41:4: ( '<' | '>' | '=' | '+' | '-' | ':=' | '*' | identifier )
++            // Bst.g:41:2: ( '<' | '>' | '=' | '+' | '-' | ':=' | '*' | identifier )
+             int alt5=8;
+             switch ( input.LA(1) ) {
+             case 27:
++                {
+                 alt5=1;
++                }
+                 break;
+             case 28:
++                {
+                 alt5=2;
++                }
+                 break;
+             case 29:
++                {
+                 alt5=3;
++                }
+                 break;
+             case 30:
++                {
+                 alt5=4;
++                }
+                 break;
+             case 31:
++                {
+                 alt5=5;
++                }
+                 break;
+             case 32:
++                {
+                 alt5=6;
++                }
+                 break;
+             case 33:
++                {
+                 alt5=7;
++                }
+                 break;
+             case IDENTIFIER:
++                {
+                 alt5=8;
++                }
+                 break;
+             default:
+                 NoViableAltException nvae =
+-                    new NoViableAltException("40:1: function : ( '<' | '>' | '=' | '+' | '-' | ':=' | '*' | identifier );", 5, 0, input);
++                    new NoViableAltException("", 5, 0, input);
+                 throw nvae;
+             }
+@@ -910,11 +966,10 @@ public class BstParser extends Parser {
+                 case 1 :
+                     // Bst.g:41:4: '<'
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
+-                    char_literal42=input.LT(1);
+-                    match(input,27,FOLLOW_27_in_function254); 
+-                    char_literal42_tree = adaptor.create(char_literal42);
++                    char_literal42=(Token)match(input,27,FOLLOW_27_in_function254);
++                    char_literal42_tree = (Object)adaptor.create(char_literal42);
+                     adaptor.addChild(root_0, char_literal42_tree);
+@@ -923,11 +978,10 @@ public class BstParser extends Parser {
+                 case 2 :
+                     // Bst.g:41:10: '>'
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
+-                    char_literal43=input.LT(1);
+-                    match(input,28,FOLLOW_28_in_function258); 
+-                    char_literal43_tree = adaptor.create(char_literal43);
++                    char_literal43=(Token)match(input,28,FOLLOW_28_in_function258);
++                    char_literal43_tree = (Object)adaptor.create(char_literal43);
+                     adaptor.addChild(root_0, char_literal43_tree);
+@@ -936,11 +990,10 @@ public class BstParser extends Parser {
+                 case 3 :
+                     // Bst.g:41:16: '='
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
+-                    char_literal44=input.LT(1);
+-                    match(input,29,FOLLOW_29_in_function262); 
+-                    char_literal44_tree = adaptor.create(char_literal44);
++                    char_literal44=(Token)match(input,29,FOLLOW_29_in_function262);
++                    char_literal44_tree = (Object)adaptor.create(char_literal44);
+                     adaptor.addChild(root_0, char_literal44_tree);
+@@ -949,11 +1002,10 @@ public class BstParser extends Parser {
+                 case 4 :
+                     // Bst.g:41:22: '+'
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
+-                    char_literal45=input.LT(1);
+-                    match(input,30,FOLLOW_30_in_function266); 
+-                    char_literal45_tree = adaptor.create(char_literal45);
++                    char_literal45=(Token)match(input,30,FOLLOW_30_in_function266);
++                    char_literal45_tree = (Object)adaptor.create(char_literal45);
+                     adaptor.addChild(root_0, char_literal45_tree);
+@@ -962,11 +1014,10 @@ public class BstParser extends Parser {
+                 case 5 :
+                     // Bst.g:41:28: '-'
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
+-                    char_literal46=input.LT(1);
+-                    match(input,31,FOLLOW_31_in_function270); 
+-                    char_literal46_tree = adaptor.create(char_literal46);
++                    char_literal46=(Token)match(input,31,FOLLOW_31_in_function270);
++                    char_literal46_tree = (Object)adaptor.create(char_literal46);
+                     adaptor.addChild(root_0, char_literal46_tree);
+@@ -975,11 +1026,10 @@ public class BstParser extends Parser {
+                 case 6 :
+                     // Bst.g:41:34: ':='
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
+-                    string_literal47=input.LT(1);
+-                    match(input,32,FOLLOW_32_in_function274); 
+-                    string_literal47_tree = adaptor.create(string_literal47);
++                    string_literal47=(Token)match(input,32,FOLLOW_32_in_function274);
++                    string_literal47_tree = (Object)adaptor.create(string_literal47);
+                     adaptor.addChild(root_0, string_literal47_tree);
+@@ -988,11 +1038,10 @@ public class BstParser extends Parser {
+                 case 7 :
+                     // Bst.g:41:41: '*'
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
+-                    char_literal48=input.LT(1);
+-                    match(input,33,FOLLOW_33_in_function278); 
+-                    char_literal48_tree = adaptor.create(char_literal48);
++                    char_literal48=(Token)match(input,33,FOLLOW_33_in_function278);
++                    char_literal48_tree = (Object)adaptor.create(char_literal48);
+                     adaptor.addChild(root_0, char_literal48_tree);
+@@ -1001,64 +1050,66 @@ public class BstParser extends Parser {
+                 case 8 :
+                     // Bst.g:41:47: identifier
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
+                     pushFollow(FOLLOW_identifier_in_function282);
+                     identifier49=identifier();
+-                    _fsp--;
+-                    adaptor.addChild(root_0, identifier49.tree);
++                    state._fsp--;
++
++                    adaptor.addChild(root_0, identifier49.getTree());
+                     }
+                     break;
+             }
++            retval.stop = input.LT(-1);
++
++            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
++            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
++
+         }
+         catch (RecognitionException re) {
+             reportError(re);
+             recover(input,re);
++      retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
++
+         }
+         finally {
+-            retval.stop = input.LT(-1);
+-
+-                retval.tree = adaptor.rulePostProcessing(root_0);
+-                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+-
+-       }
++        }
+         return retval;
+     }
+-    // $ANTLR end function
++    // $ANTLR end "function"
+     public static class stack_return extends ParserRuleReturnScope {
+         Object tree;
+         public Object getTree() { return tree; }
+-    }
++    };
+-    // $ANTLR start stack
++    // $ANTLR start "stack"
+     // Bst.g:43:1: stack : '{' ( stackitem )+ '}' -> ^( STACK ( stackitem )+ ) ;
+-    public stack_return stack() throws RecognitionException {   
+-        stack_return retval = new stack_return();
++    public final BstParser.stack_return stack() throws RecognitionException {
++        BstParser.stack_return retval = new BstParser.stack_return();
+         retval.start = input.LT(1);
+         Object root_0 = null;
+         Token char_literal50=null;
+         Token char_literal52=null;
+-        stackitem_return stackitem51 = null;
++        BstParser.stackitem_return stackitem51 = null;
++
+-        List list_stackitem=new ArrayList();
+-        List list_26=new ArrayList();
+-        List list_25=new ArrayList();
+         Object char_literal50_tree=null;
+         Object char_literal52_tree=null;
+-
++        RewriteRuleTokenStream stream_25=new RewriteRuleTokenStream(adaptor,"token 25");
++        RewriteRuleTokenStream stream_26=new RewriteRuleTokenStream(adaptor,"token 26");
++        RewriteRuleSubtreeStream stream_stackitem=new RewriteRuleSubtreeStream(adaptor,"rule stackitem");
+         try {
+-            // Bst.g:44:4: ( '{' ( stackitem )+ '}' -> ^( STACK ( stackitem )+ ) )
++            // Bst.g:44:2: ( '{' ( stackitem )+ '}' -> ^( STACK ( stackitem )+ ) )
+             // Bst.g:44:4: '{' ( stackitem )+ '}'
+             {
+-            char_literal50=input.LT(1);
+-            match(input,25,FOLLOW_25_in_stack293); 
+-            list_25.add(char_literal50);
++            char_literal50=(Token)match(input,25,FOLLOW_25_in_stack293);
++            stream_25.add(char_literal50);
+             // Bst.g:44:8: ( stackitem )+
+             int cnt6=0;
+@@ -1066,6 +1117,7 @@ public class BstParser extends Parser {
+             do {
+                 int alt6=2;
+                 int LA6_0 = input.LA(1);
++
+                 if ( (LA6_0==STRING||(LA6_0>=IDENTIFIER && LA6_0<=QUOTED)||LA6_0==25||(LA6_0>=27 && LA6_0<=33)) ) {
+                     alt6=1;
+                 }
+@@ -1077,9 +1129,10 @@ public class BstParser extends Parser {
+                   {
+                   pushFollow(FOLLOW_stackitem_in_stack295);
+                   stackitem51=stackitem();
+-                  _fsp--;
+-                  list_stackitem.add(stackitem51.tree);
++                  state._fsp--;
++
++                  stream_stackitem.add(stackitem51.getTree());
+                   }
+                   break;
+@@ -1093,69 +1146,73 @@ public class BstParser extends Parser {
+                 cnt6++;
+             } while (true);
+-            char_literal52=input.LT(1);
+-            match(input,26,FOLLOW_26_in_stack298); 
+-            list_26.add(char_literal52);
++            char_literal52=(Token)match(input,26,FOLLOW_26_in_stack298);
++            stream_26.add(char_literal52);
++
+             // AST REWRITE
+-            int i_0 = 0;
++            // elements: stackitem
++            // token labels:
++            // rule labels: retval
++            // token list labels:
++            // rule list labels:
++            // wildcard labels:
+             retval.tree = root_0;
+-            root_0 = adaptor.nil();
++            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
++
++            root_0 = (Object)adaptor.nil();
+             // 44:23: -> ^( STACK ( stackitem )+ )
+             {
+                 // Bst.g:44:26: ^( STACK ( stackitem )+ )
+                 {
+-                Object root_1 = adaptor.nil();
+-                root_1 = adaptor.becomeRoot(adaptor.create(STACK, "STACK"), root_1);
+-
+-                // Bst.g:44:34: ( stackitem )+
+-                {
+-                int n_1 = list_stackitem == null ? 0 : list_stackitem.size();
+-                 
+-
+-
+-                if ( n_1==0 ) throw new RuntimeException("Must have more than one element for (...)+ loops");
+-                for (int i_1=0; i_1<n_1; i_1++) {
+-                    adaptor.addChild(root_1, list_stackitem.get(i_1));
++                Object root_1 = (Object)adaptor.nil();
++                root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(STACK, "STACK"), root_1);
++                if ( !(stream_stackitem.hasNext()) ) {
++                    throw new RewriteEarlyExitException();
+                 }
++                while ( stream_stackitem.hasNext() ) {
++                    adaptor.addChild(root_1, stream_stackitem.nextTree());
++
+                 }
++                stream_stackitem.reset();
+                 adaptor.addChild(root_0, root_1);
+                 }
+             }
++            retval.tree = root_0;
++            }
++            retval.stop = input.LT(-1);
+-            }
++            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
++            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+         }
+         catch (RecognitionException re) {
+             reportError(re);
+             recover(input,re);
++      retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
++
+         }
+         finally {
+-            retval.stop = input.LT(-1);
+-
+-                retval.tree = adaptor.rulePostProcessing(root_0);
+-                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+-
+-       }
++        }
+         return retval;
+     }
+-    // $ANTLR end stack
++    // $ANTLR end "stack"
+     public static class stackitem_return extends ParserRuleReturnScope {
+         Object tree;
+         public Object getTree() { return tree; }
+-    }
++    };
+-    // $ANTLR start stackitem
++    // $ANTLR start "stackitem"
+     // Bst.g:46:1: stackitem : ( function | STRING | INTEGER | QUOTED | stack );
+-    public stackitem_return stackitem() throws RecognitionException {   
+-        stackitem_return retval = new stackitem_return();
++    public final BstParser.stackitem_return stackitem() throws RecognitionException {
++        BstParser.stackitem_return retval = new BstParser.stackitem_return();
+         retval.start = input.LT(1);
+         Object root_0 = null;
+@@ -1163,9 +1220,9 @@ public class BstParser extends Parser {
+         Token STRING54=null;
+         Token INTEGER55=null;
+         Token QUOTED56=null;
+-        function_return function53 = null;
++        BstParser.function_return function53 = null;
+-        stack_return stack57 = null;
++        BstParser.stack_return stack57 = null;
+         Object STRING54_tree=null;
+@@ -1173,7 +1230,7 @@ public class BstParser extends Parser {
+         Object QUOTED56_tree=null;
+         try {
+-            // Bst.g:47:4: ( function | STRING | INTEGER | QUOTED | stack )
++            // Bst.g:47:2: ( function | STRING | INTEGER | QUOTED | stack )
+             int alt7=5;
+             switch ( input.LA(1) ) {
+             case IDENTIFIER:
+@@ -1184,23 +1241,33 @@ public class BstParser extends Parser {
+             case 31:
+             case 32:
+             case 33:
++                {
+                 alt7=1;
++                }
+                 break;
+             case STRING:
++                {
+                 alt7=2;
++                }
+                 break;
+             case INTEGER:
++                {
+                 alt7=3;
++                }
+                 break;
+             case QUOTED:
++                {
+                 alt7=4;
++                }
+                 break;
+             case 25:
++                {
+                 alt7=5;
++                }
+                 break;
+             default:
+                 NoViableAltException nvae =
+-                    new NoViableAltException("46:1: stackitem : ( function | STRING | INTEGER | QUOTED | stack );", 7, 0, input);
++                    new NoViableAltException("", 7, 0, input);
+                 throw nvae;
+             }
+@@ -1209,24 +1276,24 @@ public class BstParser extends Parser {
+                 case 1 :
+                     // Bst.g:47:4: function
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
+                     pushFollow(FOLLOW_function_in_stackitem317);
+                     function53=function();
+-                    _fsp--;
+-                    adaptor.addChild(root_0, function53.tree);
++                    state._fsp--;
++
++                    adaptor.addChild(root_0, function53.getTree());
+                     }
+                     break;
+                 case 2 :
+                     // Bst.g:48:4: STRING
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
+-                    STRING54=input.LT(1);
+-                    match(input,STRING,FOLLOW_STRING_in_stackitem322); 
+-                    STRING54_tree = adaptor.create(STRING54);
++                    STRING54=(Token)match(input,STRING,FOLLOW_STRING_in_stackitem322);
++                    STRING54_tree = (Object)adaptor.create(STRING54);
+                     adaptor.addChild(root_0, STRING54_tree);
+@@ -1235,11 +1302,10 @@ public class BstParser extends Parser {
+                 case 3 :
+                     // Bst.g:49:4: INTEGER
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
+-                    INTEGER55=input.LT(1);
+-                    match(input,INTEGER,FOLLOW_INTEGER_in_stackitem328); 
+-                    INTEGER55_tree = adaptor.create(INTEGER55);
++                    INTEGER55=(Token)match(input,INTEGER,FOLLOW_INTEGER_in_stackitem328);
++                    INTEGER55_tree = (Object)adaptor.create(INTEGER55);
+                     adaptor.addChild(root_0, INTEGER55_tree);
+@@ -1248,11 +1314,10 @@ public class BstParser extends Parser {
+                 case 4 :
+                     // Bst.g:50:4: QUOTED
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
+-                    QUOTED56=input.LT(1);
+-                    match(input,QUOTED,FOLLOW_QUOTED_in_stackitem334); 
+-                    QUOTED56_tree = adaptor.create(QUOTED56);
++                    QUOTED56=(Token)match(input,QUOTED,FOLLOW_QUOTED_in_stackitem334);
++                    QUOTED56_tree = (Object)adaptor.create(QUOTED56);
+                     adaptor.addChild(root_0, QUOTED56_tree);
+@@ -1261,33 +1326,38 @@ public class BstParser extends Parser {
+                 case 5 :
+                     // Bst.g:51:4: stack
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
+                     pushFollow(FOLLOW_stack_in_stackitem339);
+                     stack57=stack();
+-                    _fsp--;
+-                    adaptor.addChild(root_0, stack57.tree);
++                    state._fsp--;
++
++                    adaptor.addChild(root_0, stack57.getTree());
+                     }
+                     break;
+             }
++            retval.stop = input.LT(-1);
++
++            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
++            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
++
+         }
+         catch (RecognitionException re) {
+             reportError(re);
+             recover(input,re);
++      retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
++
+         }
+         finally {
+-            retval.stop = input.LT(-1);
+-
+-                retval.tree = adaptor.rulePostProcessing(root_0);
+-                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+-
+-       }
++        }
+         return retval;
+     }
+-    // $ANTLR end stackitem
++    // $ANTLR end "stackitem"
++
++    // Delegated rules
+  
+@@ -1324,14 +1394,14 @@ public class BstParser extends Parser {
+     public static final BitSet FOLLOW_idList0_in_commands162 = new BitSet(new long[]{0x0000000000000002L});
+     public static final BitSet FOLLOW_SORT_in_commands167 = new BitSet(new long[]{0x0000000000000002L});
+     public static final BitSet FOLLOW_IDENTIFIER_in_identifier178 = new BitSet(new long[]{0x0000000000000002L});
+-    public static final BitSet FOLLOW_25_in_id188 = new BitSet(new long[]{0x0000000000040000L});
++    public static final BitSet FOLLOW_25_in_id188 = new BitSet(new long[]{0x00000003F8040000L});
+     public static final BitSet FOLLOW_identifier_in_id191 = new BitSet(new long[]{0x0000000004000000L});
+     public static final BitSet FOLLOW_26_in_id193 = new BitSet(new long[]{0x0000000000000002L});
+-    public static final BitSet FOLLOW_25_in_idList205 = new BitSet(new long[]{0x0000000000040000L});
+-    public static final BitSet FOLLOW_identifier_in_idList207 = new BitSet(new long[]{0x0000000004040000L});
++    public static final BitSet FOLLOW_25_in_idList205 = new BitSet(new long[]{0x00000003F8040000L});
++    public static final BitSet FOLLOW_identifier_in_idList207 = new BitSet(new long[]{0x00000003FC040000L});
+     public static final BitSet FOLLOW_26_in_idList210 = new BitSet(new long[]{0x0000000000000002L});
+-    public static final BitSet FOLLOW_25_in_idList0230 = new BitSet(new long[]{0x0000000004040000L});
+-    public static final BitSet FOLLOW_identifier_in_idList0232 = new BitSet(new long[]{0x0000000004040000L});
++    public static final BitSet FOLLOW_25_in_idList0230 = new BitSet(new long[]{0x00000003FC040000L});
++    public static final BitSet FOLLOW_identifier_in_idList0232 = new BitSet(new long[]{0x00000003FC040000L});
+     public static final BitSet FOLLOW_26_in_idList0235 = new BitSet(new long[]{0x0000000000000002L});
+     public static final BitSet FOLLOW_27_in_function254 = new BitSet(new long[]{0x0000000000000002L});
+     public static final BitSet FOLLOW_28_in_function258 = new BitSet(new long[]{0x0000000000000002L});
+@@ -1350,4 +1420,4 @@ public class BstParser extends Parser {
+     public static final BitSet FOLLOW_QUOTED_in_stackitem334 = new BitSet(new long[]{0x0000000000000002L});
+     public static final BitSet FOLLOW_stack_in_stackitem339 = new BitSet(new long[]{0x0000000000000002L});
+-}
+\ No newline at end of file
++}
+--- a/src/java/net/sf/jabref/bst/BstLexer.java
++++ b/src/java/net/sf/jabref/bst/BstLexer.java
+@@ -1,328 +1,245 @@
+ package net.sf.jabref.bst;
+-// $ANTLR 3.0b5 Bst.g 2006-11-23 23:20:24
++// $ANTLR 3.2 debian-4 Bst.g 2010-08-02 19:59:11
+-import org.antlr.runtime.CharStream;
+-import org.antlr.runtime.EarlyExitException;
+-import org.antlr.runtime.Lexer;
+-import org.antlr.runtime.MismatchedSetException;
+-import org.antlr.runtime.NoViableAltException;
+-import org.antlr.runtime.RecognitionException;
+-import org.antlr.runtime.Token;
++import org.antlr.runtime.*;
++import java.util.Stack;
++import java.util.List;
++import java.util.ArrayList;
+ public class BstLexer extends Lexer {
++    public static final int FUNCTION=10;
++    public static final int INTEGER=19;
++    public static final int T__29=29;
++    public static final int T__28=28;
++    public static final int T__27=27;
++    public static final int T__26=26;
++    public static final int LINE_COMMENT=24;
++    public static final int QUOTED=20;
++    public static final int T__25=25;
+     public static final int LETTER=21;
+-    public static final int T29=29;
+-    public static final int T33=33;
+-    public static final int INTEGERS=9;
+-    public static final int ENTRY=6;
+-    public static final int WS=23;
+-    public static final int COMMANDS=7;
+-    public static final int STRING=12;
+-    public static final int T28=28;
+     public static final int EXECUTE=14;
+-    public static final int LINE_COMMENT=24;
++    public static final int STRINGS=8;
+     public static final int SORT=17;
+-    public static final int STACK=5;
+-    public static final int REVERSE=16;
+-    public static final int QUOTED=20;
+-    public static final int T25=25;
+-    public static final int INTEGER=19;
+-    public static final int ITERATE=15;
+-    public static final int FUNCTION=10;
+-    public static final int T26=26;
++    public static final int ENTRY=6;
+     public static final int EOF=-1;
+-    public static final int T32=32;
+-    public static final int Tokens=34;
+-    public static final int STRINGS=8;
+-    public static final int T31=31;
+-    public static final int T27=27;
++    public static final int INTEGERS=9;
++    public static final int T__30=30;
++    public static final int T__31=31;
++    public static final int ITERATE=15;
++    public static final int T__32=32;
++    public static final int T__33=33;
++    public static final int WS=23;
++    public static final int COMMANDS=7;
++    public static final int READ=13;
+     public static final int IDENTIFIER=18;
+-    public static final int MACRO=11;
+-    public static final int T30=30;
+     public static final int IDLIST=4;
+     public static final int NUMERAL=22;
+-    public static final int READ=13;
+-    public BstLexer() {
+-        
+-    } 
++    public static final int STACK=5;
++    public static final int REVERSE=16;
++    public static final int MACRO=11;
++    public static final int STRING=12;
++
++    // delegates
++    // delegators
++
++    public BstLexer() {;}
+     public BstLexer(CharStream input) {
+-        super(input);
++        this(input, new RecognizerSharedState());
++    }
++    public BstLexer(CharStream input, RecognizerSharedState state) {
++        super(input,state);
++
+     }
+     public String getGrammarFileName() { return "Bst.g"; }
+-    // $ANTLR start T25
+-    public void mT25() throws RecognitionException {
++    // $ANTLR start "T__25"
++    public final void mT__25() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+-            int _type = T25;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
++            int _type = T__25;
++            int _channel = DEFAULT_TOKEN_CHANNEL;
+             // Bst.g:3:7: ( '{' )
+-            // Bst.g:3:7: '{'
++            // Bst.g:3:9: '{'
+             {
+             match('{'); 
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end T25
++    // $ANTLR end "T__25"
+-    // $ANTLR start T26
+-    public void mT26() throws RecognitionException {
++    // $ANTLR start "T__26"
++    public final void mT__26() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+-            int _type = T26;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
++            int _type = T__26;
++            int _channel = DEFAULT_TOKEN_CHANNEL;
+             // Bst.g:4:7: ( '}' )
+-            // Bst.g:4:7: '}'
++            // Bst.g:4:9: '}'
+             {
+             match('}'); 
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end T26
++    // $ANTLR end "T__26"
+-    // $ANTLR start T27
+-    public void mT27() throws RecognitionException {
++    // $ANTLR start "T__27"
++    public final void mT__27() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+-            int _type = T27;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
++            int _type = T__27;
++            int _channel = DEFAULT_TOKEN_CHANNEL;
+             // Bst.g:5:7: ( '<' )
+-            // Bst.g:5:7: '<'
++            // Bst.g:5:9: '<'
+             {
+             match('<'); 
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end T27
++    // $ANTLR end "T__27"
+-    // $ANTLR start T28
+-    public void mT28() throws RecognitionException {
++    // $ANTLR start "T__28"
++    public final void mT__28() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+-            int _type = T28;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
++            int _type = T__28;
++            int _channel = DEFAULT_TOKEN_CHANNEL;
+             // Bst.g:6:7: ( '>' )
+-            // Bst.g:6:7: '>'
++            // Bst.g:6:9: '>'
+             {
+             match('>'); 
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end T28
++    // $ANTLR end "T__28"
+-    // $ANTLR start T29
+-    public void mT29() throws RecognitionException {
++    // $ANTLR start "T__29"
++    public final void mT__29() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+-            int _type = T29;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
++            int _type = T__29;
++            int _channel = DEFAULT_TOKEN_CHANNEL;
+             // Bst.g:7:7: ( '=' )
+-            // Bst.g:7:7: '='
++            // Bst.g:7:9: '='
+             {
+             match('='); 
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end T29
++    // $ANTLR end "T__29"
+-    // $ANTLR start T30
+-    public void mT30() throws RecognitionException {
++    // $ANTLR start "T__30"
++    public final void mT__30() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+-            int _type = T30;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
++            int _type = T__30;
++            int _channel = DEFAULT_TOKEN_CHANNEL;
+             // Bst.g:8:7: ( '+' )
+-            // Bst.g:8:7: '+'
++            // Bst.g:8:9: '+'
+             {
+             match('+'); 
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end T30
++    // $ANTLR end "T__30"
+-    // $ANTLR start T31
+-    public void mT31() throws RecognitionException {
++    // $ANTLR start "T__31"
++    public final void mT__31() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+-            int _type = T31;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
++            int _type = T__31;
++            int _channel = DEFAULT_TOKEN_CHANNEL;
+             // Bst.g:9:7: ( '-' )
+-            // Bst.g:9:7: '-'
++            // Bst.g:9:9: '-'
+             {
+             match('-'); 
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end T31
++    // $ANTLR end "T__31"
+-    // $ANTLR start T32
+-    public void mT32() throws RecognitionException {
++    // $ANTLR start "T__32"
++    public final void mT__32() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+-            int _type = T32;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
++            int _type = T__32;
++            int _channel = DEFAULT_TOKEN_CHANNEL;
+             // Bst.g:10:7: ( ':=' )
+-            // Bst.g:10:7: ':='
++            // Bst.g:10:9: ':='
+             {
+             match(":="); 
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end T32
++    // $ANTLR end "T__32"
+-    // $ANTLR start T33
+-    public void mT33() throws RecognitionException {
++    // $ANTLR start "T__33"
++    public final void mT__33() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+-            int _type = T33;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
++            int _type = T__33;
++            int _channel = DEFAULT_TOKEN_CHANNEL;
+             // Bst.g:11:7: ( '*' )
+-            // Bst.g:11:7: '*'
++            // Bst.g:11:9: '*'
+             {
+             match('*'); 
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end T33
++    // $ANTLR end "T__33"
+-    // $ANTLR start STRINGS
+-    public void mSTRINGS() throws RecognitionException {
++    // $ANTLR start "STRINGS"
++    public final void mSTRINGS() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+             int _type = STRINGS;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
+-            // Bst.g:53:11: ( 'STRINGS' )
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // Bst.g:53:9: ( 'STRINGS' )
+             // Bst.g:53:11: 'STRINGS'
+             {
+             match("STRINGS"); 
+@@ -330,29 +247,20 @@ public class BstLexer extends Lexer {
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end STRINGS
++    // $ANTLR end "STRINGS"
+-    // $ANTLR start INTEGERS
+-    public void mINTEGERS() throws RecognitionException {
++    // $ANTLR start "INTEGERS"
++    public final void mINTEGERS() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+             int _type = INTEGERS;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
+-            // Bst.g:54:12: ( 'INTEGERS' )
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // Bst.g:54:10: ( 'INTEGERS' )
+             // Bst.g:54:12: 'INTEGERS'
+             {
+             match("INTEGERS"); 
+@@ -360,29 +268,20 @@ public class BstLexer extends Lexer {
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end INTEGERS
++    // $ANTLR end "INTEGERS"
+-    // $ANTLR start FUNCTION
+-    public void mFUNCTION() throws RecognitionException {
++    // $ANTLR start "FUNCTION"
++    public final void mFUNCTION() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+             int _type = FUNCTION;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
+-            // Bst.g:55:12: ( 'FUNCTION' )
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // Bst.g:55:10: ( 'FUNCTION' )
+             // Bst.g:55:12: 'FUNCTION'
+             {
+             match("FUNCTION"); 
+@@ -390,29 +289,20 @@ public class BstLexer extends Lexer {
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end FUNCTION
++    // $ANTLR end "FUNCTION"
+-    // $ANTLR start EXECUTE
+-    public void mEXECUTE() throws RecognitionException {
++    // $ANTLR start "EXECUTE"
++    public final void mEXECUTE() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+             int _type = EXECUTE;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
+-            // Bst.g:56:11: ( 'EXECUTE' )
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // Bst.g:56:9: ( 'EXECUTE' )
+             // Bst.g:56:11: 'EXECUTE'
+             {
+             match("EXECUTE"); 
+@@ -420,29 +310,20 @@ public class BstLexer extends Lexer {
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end EXECUTE
++    // $ANTLR end "EXECUTE"
+-    // $ANTLR start SORT
+-    public void mSORT() throws RecognitionException {
++    // $ANTLR start "SORT"
++    public final void mSORT() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+             int _type = SORT;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
+-            // Bst.g:57:8: ( 'SORT' )
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // Bst.g:57:6: ( 'SORT' )
+             // Bst.g:57:8: 'SORT'
+             {
+             match("SORT"); 
+@@ -450,29 +331,20 @@ public class BstLexer extends Lexer {
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end SORT
++    // $ANTLR end "SORT"
+-    // $ANTLR start ITERATE
+-    public void mITERATE() throws RecognitionException {
++    // $ANTLR start "ITERATE"
++    public final void mITERATE() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+             int _type = ITERATE;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
+-            // Bst.g:58:11: ( 'ITERATE' )
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // Bst.g:58:9: ( 'ITERATE' )
+             // Bst.g:58:11: 'ITERATE'
+             {
+             match("ITERATE"); 
+@@ -480,29 +352,20 @@ public class BstLexer extends Lexer {
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end ITERATE
++    // $ANTLR end "ITERATE"
+-    // $ANTLR start REVERSE
+-    public void mREVERSE() throws RecognitionException {
++    // $ANTLR start "REVERSE"
++    public final void mREVERSE() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+             int _type = REVERSE;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
+-            // Bst.g:59:11: ( 'REVERSE' )
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // Bst.g:59:9: ( 'REVERSE' )
+             // Bst.g:59:11: 'REVERSE'
+             {
+             match("REVERSE"); 
+@@ -510,29 +373,20 @@ public class BstLexer extends Lexer {
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end REVERSE
++    // $ANTLR end "REVERSE"
+-    // $ANTLR start ENTRY
+-    public void mENTRY() throws RecognitionException {
++    // $ANTLR start "ENTRY"
++    public final void mENTRY() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+             int _type = ENTRY;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
+-            // Bst.g:60:9: ( 'ENTRY' )
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // Bst.g:60:7: ( 'ENTRY' )
+             // Bst.g:60:9: 'ENTRY'
+             {
+             match("ENTRY"); 
+@@ -540,29 +394,20 @@ public class BstLexer extends Lexer {
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end ENTRY
++    // $ANTLR end "ENTRY"
+-    // $ANTLR start READ
+-    public void mREAD() throws RecognitionException {
++    // $ANTLR start "READ"
++    public final void mREAD() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+             int _type = READ;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
+-            // Bst.g:61:8: ( 'READ' )
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // Bst.g:61:6: ( 'READ' )
+             // Bst.g:61:8: 'READ'
+             {
+             match("READ"); 
+@@ -570,29 +415,20 @@ public class BstLexer extends Lexer {
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end READ
++    // $ANTLR end "READ"
+-    // $ANTLR start MACRO
+-    public void mMACRO() throws RecognitionException {
++    // $ANTLR start "MACRO"
++    public final void mMACRO() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+             int _type = MACRO;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
+-            // Bst.g:62:9: ( 'MACRO' )
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // Bst.g:62:7: ( 'MACRO' )
+             // Bst.g:62:9: 'MACRO'
+             {
+             match("MACRO"); 
+@@ -600,29 +436,20 @@ public class BstLexer extends Lexer {
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end MACRO
++    // $ANTLR end "MACRO"
+-    // $ANTLR start QUOTED
+-    public void mQUOTED() throws RecognitionException {
++    // $ANTLR start "QUOTED"
++    public final void mQUOTED() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+             int _type = QUOTED;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
+-            // Bst.g:65:4: ( '\\'' IDENTIFIER )
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // Bst.g:65:2: ( '\\'' IDENTIFIER )
+             // Bst.g:65:4: '\\'' IDENTIFIER
+             {
+             match('\''); 
+@@ -630,29 +457,20 @@ public class BstLexer extends Lexer {
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end QUOTED
++    // $ANTLR end "QUOTED"
+-    // $ANTLR start IDENTIFIER
+-    public void mIDENTIFIER() throws RecognitionException {
++    // $ANTLR start "IDENTIFIER"
++    public final void mIDENTIFIER() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+             int _type = IDENTIFIER;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
+-            // Bst.g:68:4: ( LETTER ( LETTER | NUMERAL )* )
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // Bst.g:68:2: ( LETTER ( LETTER | NUMERAL )* )
+             // Bst.g:68:4: LETTER ( LETTER | NUMERAL )*
+             {
+             mLETTER(); 
+@@ -661,6 +479,7 @@ public class BstLexer extends Lexer {
+             do {
+                 int alt1=3;
+                 int LA1_0 = input.LA(1);
++
+                 if ( (LA1_0=='$'||LA1_0=='.'||(LA1_0>='A' && LA1_0<='Z')||(LA1_0>='a' && LA1_0<='z')) ) {
+                     alt1=1;
+                 }
+@@ -693,82 +512,70 @@ public class BstLexer extends Lexer {
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end IDENTIFIER
++    // $ANTLR end "IDENTIFIER"
+-    // $ANTLR start LETTER
+-    public void mLETTER() throws RecognitionException {
++    // $ANTLR start "LETTER"
++    public final void mLETTER() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+-            // Bst.g:71:4: ( ('a'..'z'|'A'..'Z'|'.'|'$'))
+-            // Bst.g:71:4: ('a'..'z'|'A'..'Z'|'.'|'$')
++            // Bst.g:71:2: ( ( 'a' .. 'z' | 'A' .. 'Z' | '.' | '$' ) )
++            // Bst.g:71:4: ( 'a' .. 'z' | 'A' .. 'Z' | '.' | '$' )
+             {
+             if ( input.LA(1)=='$'||input.LA(1)=='.'||(input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='a' && input.LA(1)<='z') ) {
+                 input.consume();
+             }
+             else {
+-                MismatchedSetException mse =
+-                    new MismatchedSetException(null,input);
+-                recover(mse);    throw mse;
+-            }
++                MismatchedSetException mse = new MismatchedSetException(null,input);
++                recover(mse);
++                throw mse;}
+             }
+         }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end LETTER
++    // $ANTLR end "LETTER"
+-    // $ANTLR start STRING
+-    public void mSTRING() throws RecognitionException {
++    // $ANTLR start "STRING"
++    public final void mSTRING() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+             int _type = STRING;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
+-            // Bst.g:74:4: ( '\"' (~ '\"' )* '\"' )
+-            // Bst.g:74:4: '\"' (~ '\"' )* '\"'
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // Bst.g:74:2: ( '\"' (~ ( '\"' ) )* '\"' )
++            // Bst.g:74:4: '\"' (~ ( '\"' ) )* '\"'
+             {
+             match('\"'); 
+-            // Bst.g:74:8: (~ '\"' )*
++            // Bst.g:74:8: (~ ( '\"' ) )*
+             loop2:
+             do {
+                 int alt2=2;
+                 int LA2_0 = input.LA(1);
+-                if ( ((LA2_0>='\u0000' && LA2_0<='!')||(LA2_0>='#' && LA2_0<='\uFFFE')) ) {
++
++                if ( ((LA2_0>='\u0000' && LA2_0<='!')||(LA2_0>='#' && LA2_0<='\uFFFF')) ) {
+                     alt2=1;
+                 }
+                 switch (alt2) {
+               case 1 :
+-                  // Bst.g:74:9: ~ '\"'
++                  // Bst.g:74:9: ~ ( '\"' )
+                   {
+-                  if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='\uFFFE') ) {
++                  if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='\uFFFF') ) {
+                       input.consume();
+                   }
+                   else {
+-                      MismatchedSetException mse =
+-                          new MismatchedSetException(null,input);
+-                      recover(mse);    throw mse;
+-                  }
++                      MismatchedSetException mse = new MismatchedSetException(null,input);
++                      recover(mse);
++                      throw mse;}
+                   }
+@@ -783,51 +590,42 @@ public class BstLexer extends Lexer {
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end STRING
++    // $ANTLR end "STRING"
+-    // $ANTLR start INTEGER
+-    public void mINTEGER() throws RecognitionException {
++    // $ANTLR start "INTEGER"
++    public final void mINTEGER() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+             int _type = INTEGER;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
+-            // Bst.g:77:4: ( '#' ( ('+'|'-'))? ( NUMERAL )+ )
+-            // Bst.g:77:4: '#' ( ('+'|'-'))? ( NUMERAL )+
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // Bst.g:77:2: ( '#' ( '+' | '-' )? ( NUMERAL )+ )
++            // Bst.g:77:4: '#' ( '+' | '-' )? ( NUMERAL )+
+             {
+             match('#'); 
+-            // Bst.g:77:8: ( ('+'|'-'))?
++            // Bst.g:77:8: ( '+' | '-' )?
+             int alt3=2;
+             int LA3_0 = input.LA(1);
++
+             if ( (LA3_0=='+'||LA3_0=='-') ) {
+                 alt3=1;
+             }
+             switch (alt3) {
+                 case 1 :
+-                    // Bst.g:77:9: ('+'|'-')
++                    // Bst.g:
+                     {
+                     if ( input.LA(1)=='+'||input.LA(1)=='-' ) {
+                         input.consume();
+                     }
+                     else {
+-                        MismatchedSetException mse =
+-                            new MismatchedSetException(null,input);
+-                        recover(mse);    throw mse;
+-                    }
++                        MismatchedSetException mse = new MismatchedSetException(null,input);
++                        recover(mse);
++                        throw mse;}
+                     }
+@@ -841,6 +639,7 @@ public class BstLexer extends Lexer {
+             do {
+                 int alt4=2;
+                 int LA4_0 = input.LA(1);
++
+                 if ( ((LA4_0>='0' && LA4_0<='9')) ) {
+                     alt4=1;
+                 }
+@@ -867,24 +666,18 @@ public class BstLexer extends Lexer {
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end INTEGER
++    // $ANTLR end "INTEGER"
+-    // $ANTLR start NUMERAL
+-    public void mNUMERAL() throws RecognitionException {
++    // $ANTLR start "NUMERAL"
++    public final void mNUMERAL() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+-            // Bst.g:80:4: ( ( '0' .. '9' ) )
++            // Bst.g:80:2: ( ( '0' .. '9' ) )
+             // Bst.g:80:4: ( '0' .. '9' )
+             {
+             // Bst.g:80:4: ( '0' .. '9' )
+@@ -899,47 +692,42 @@ public class BstLexer extends Lexer {
+         }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end NUMERAL
++    // $ANTLR end "NUMERAL"
+-    // $ANTLR start WS
+-    public void mWS() throws RecognitionException {
++    // $ANTLR start "WS"
++    public final void mWS() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+             int _type = WS;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
+-            // Bst.g:82:9: ( ( (' '|'\\t'|'\\r'|'\\n'))+ )
+-            // Bst.g:82:9: ( (' '|'\\t'|'\\r'|'\\n'))+
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // Bst.g:83:2: ( ( ' ' | '\\t' | '\\n' )+ )
++            // Bst.g:83:4: ( ' ' | '\\t' | '\\n' )+
+             {
+-            // Bst.g:82:9: ( (' '|'\\t'|'\\r'|'\\n'))+
++            // Bst.g:83:4: ( ' ' | '\\t' | '\\n' )+
+             int cnt5=0;
+             loop5:
+             do {
+                 int alt5=2;
+                 int LA5_0 = input.LA(1);
+-                if ( ((LA5_0>='\t' && LA5_0<='\n')||LA5_0=='\r'||LA5_0==' ') ) {
++
++                if ( ((LA5_0>='\t' && LA5_0<='\n')||LA5_0==' ') ) {
+                     alt5=1;
+                 }
+                 switch (alt5) {
+               case 1 :
+-                  // Bst.g:82:13: (' '|'\\t'|'\\r'|'\\n')
++                  // Bst.g:
+                   {
+-                  if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) {
++                  if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)==' ' ) {
+                       input.consume();
+                   }
+                   else {
+-                      MismatchedSetException mse =
+-                          new MismatchedSetException(null,input);
+-                      recover(mse);    throw mse;
+-                  }
++                      MismatchedSetException mse = new MismatchedSetException(null,input);
++                      recover(mse);
++                      throw mse;}
+                   }
+@@ -954,59 +742,50 @@ public class BstLexer extends Lexer {
+                 cnt5++;
+             } while (true);
+-             _channel=HIDDEN; 
++            _channel=99;
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end WS
++    // $ANTLR end "WS"
+-    // $ANTLR start LINE_COMMENT
+-    public void mLINE_COMMENT() throws RecognitionException {
++    // $ANTLR start "LINE_COMMENT"
++    public final void mLINE_COMMENT() throws RecognitionException {
+         try {
+-            ruleNestingLevel++;
+             int _type = LINE_COMMENT;
+-            int _start = getCharIndex();
+-            int _line = getLine();
+-            int _charPosition = getCharPositionInLine();
+-            int _channel = Token.DEFAULT_CHANNEL;
+-            // Bst.g:90:7: ( '%' (~ ('\\n'|'\\r'))* ( '\\r' )? '\\n' )
+-            // Bst.g:90:7: '%' (~ ('\\n'|'\\r'))* ( '\\r' )? '\\n'
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // Bst.g:86:5: ( '%' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' )
++            // Bst.g:86:7: '%' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n'
+             {
+             match('%'); 
+-            // Bst.g:90:11: (~ ('\\n'|'\\r'))*
++            // Bst.g:86:11: (~ ( '\\n' | '\\r' ) )*
+             loop6:
+             do {
+                 int alt6=2;
+                 int LA6_0 = input.LA(1);
+-                if ( ((LA6_0>='\u0000' && LA6_0<='\t')||(LA6_0>='\u000B' && LA6_0<='\f')||(LA6_0>='\u000E' && LA6_0<='\uFFFE')) ) {
++
++                if ( ((LA6_0>='\u0000' && LA6_0<='\t')||(LA6_0>='\u000B' && LA6_0<='\f')||(LA6_0>='\u000E' && LA6_0<='\uFFFF')) ) {
+                     alt6=1;
+                 }
+                 switch (alt6) {
+               case 1 :
+-                  // Bst.g:90:11: ~ ('\\n'|'\\r')
++                  // Bst.g:86:11: ~ ( '\\n' | '\\r' )
+                   {
+-                  if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
++                  if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) {
+                       input.consume();
+                   }
+                   else {
+-                      MismatchedSetException mse =
+-                          new MismatchedSetException(null,input);
+-                      recover(mse);    throw mse;
+-                  }
++                      MismatchedSetException mse = new MismatchedSetException(null,input);
++                      recover(mse);
++                      throw mse;}
+                   }
+@@ -1017,15 +796,16 @@ public class BstLexer extends Lexer {
+                 }
+             } while (true);
+-            // Bst.g:90:25: ( '\\r' )?
++            // Bst.g:86:25: ( '\\r' )?
+             int alt7=2;
+             int LA7_0 = input.LA(1);
++
+             if ( (LA7_0=='\r') ) {
+                 alt7=1;
+             }
+             switch (alt7) {
+                 case 1 :
+-                    // Bst.g:90:25: '\\r'
++                    // Bst.g:86:25: '\\r'
+                     {
+                     match('\r'); 
+@@ -1035,619 +815,193 @@ public class BstLexer extends Lexer {
+             }
+             match('\n'); 
+-             _channel=HIDDEN; 
++            _channel=99;
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
+         }
+     }
+-    // $ANTLR end LINE_COMMENT
++    // $ANTLR end "LINE_COMMENT"
+     public void mTokens() throws RecognitionException {
+-        // Bst.g:1:10: ( T25 | T26 | T27 | T28 | T29 | T30 | T31 | T32 | T33 | STRINGS | INTEGERS | FUNCTION | EXECUTE | SORT | ITERATE | REVERSE | ENTRY | READ | MACRO | QUOTED | IDENTIFIER | STRING | INTEGER | WS | LINE_COMMENT )
++        // Bst.g:1:8: ( T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | STRINGS | INTEGERS | FUNCTION | EXECUTE | SORT | ITERATE | REVERSE | ENTRY | READ | MACRO | QUOTED | IDENTIFIER | STRING | INTEGER | WS | LINE_COMMENT )
+         int alt8=25;
+-        switch ( input.LA(1) ) {
+-        case '{':
+-            alt8=1;
+-            break;
+-        case '}':
+-            alt8=2;
+-            break;
+-        case '<':
+-            alt8=3;
+-            break;
+-        case '>':
+-            alt8=4;
+-            break;
+-        case '=':
+-            alt8=5;
+-            break;
+-        case '+':
+-            alt8=6;
+-            break;
+-        case '-':
+-            alt8=7;
+-            break;
+-        case ':':
+-            alt8=8;
+-            break;
+-        case '*':
+-            alt8=9;
+-            break;
+-        case 'S':
+-            switch ( input.LA(2) ) {
+-            case 'T':
+-                int LA8_22 = input.LA(3);
+-                if ( (LA8_22=='R') ) {
+-                    int LA8_31 = input.LA(4);
+-                    if ( (LA8_31=='I') ) {
+-                        int LA8_41 = input.LA(5);
+-                        if ( (LA8_41=='N') ) {
+-                            int LA8_51 = input.LA(6);
+-                            if ( (LA8_51=='G') ) {
+-                                int LA8_61 = input.LA(7);
+-                                if ( (LA8_61=='S') ) {
+-                                    int LA8_69 = input.LA(8);
+-                                    if ( (LA8_69=='$'||LA8_69=='.'||(LA8_69>='0' && LA8_69<='9')||(LA8_69>='A' && LA8_69<='Z')||(LA8_69>='a' && LA8_69<='z')) ) {
+-                                        alt8=21;
+-                                    }
+-                                    else {
+-                                        alt8=10;}
+-                                }
+-                                else {
+-                                    alt8=21;}
+-                            }
+-                            else {
+-                                alt8=21;}
+-                        }
+-                        else {
+-                            alt8=21;}
+-                    }
+-                    else {
+-                        alt8=21;}
+-                }
+-                else {
+-                    alt8=21;}
+-                break;
+-            case 'O':
+-                int LA8_23 = input.LA(3);
+-                if ( (LA8_23=='R') ) {
+-                    int LA8_32 = input.LA(4);
+-                    if ( (LA8_32=='T') ) {
+-                        int LA8_42 = input.LA(5);
+-                        if ( (LA8_42=='$'||LA8_42=='.'||(LA8_42>='0' && LA8_42<='9')||(LA8_42>='A' && LA8_42<='Z')||(LA8_42>='a' && LA8_42<='z')) ) {
+-                            alt8=21;
+-                        }
+-                        else {
+-                            alt8=14;}
+-                    }
+-                    else {
+-                        alt8=21;}
+-                }
+-                else {
+-                    alt8=21;}
+-                break;
+-            default:
+-                alt8=21;}
+-
+-            break;
+-        case 'I':
+-            switch ( input.LA(2) ) {
+-            case 'T':
+-                int LA8_24 = input.LA(3);
+-                if ( (LA8_24=='E') ) {
+-                    int LA8_33 = input.LA(4);
+-                    if ( (LA8_33=='R') ) {
+-                        int LA8_43 = input.LA(5);
+-                        if ( (LA8_43=='A') ) {
+-                            int LA8_53 = input.LA(6);
+-                            if ( (LA8_53=='T') ) {
+-                                int LA8_62 = input.LA(7);
+-                                if ( (LA8_62=='E') ) {
+-                                    int LA8_70 = input.LA(8);
+-                                    if ( (LA8_70=='$'||LA8_70=='.'||(LA8_70>='0' && LA8_70<='9')||(LA8_70>='A' && LA8_70<='Z')||(LA8_70>='a' && LA8_70<='z')) ) {
+-                                        alt8=21;
+-                                    }
+-                                    else {
+-                                        alt8=15;}
+-                                }
+-                                else {
+-                                    alt8=21;}
+-                            }
+-                            else {
+-                                alt8=21;}
+-                        }
+-                        else {
+-                            alt8=21;}
+-                    }
+-                    else {
+-                        alt8=21;}
+-                }
+-                else {
+-                    alt8=21;}
+-                break;
+-            case 'N':
+-                int LA8_25 = input.LA(3);
+-                if ( (LA8_25=='T') ) {
+-                    int LA8_34 = input.LA(4);
+-                    if ( (LA8_34=='E') ) {
+-                        int LA8_44 = input.LA(5);
+-                        if ( (LA8_44=='G') ) {
+-                            int LA8_54 = input.LA(6);
+-                            if ( (LA8_54=='E') ) {
+-                                int LA8_63 = input.LA(7);
+-                                if ( (LA8_63=='R') ) {
+-                                    int LA8_71 = input.LA(8);
+-                                    if ( (LA8_71=='S') ) {
+-                                        int LA8_77 = input.LA(9);
+-                                        if ( (LA8_77=='$'||LA8_77=='.'||(LA8_77>='0' && LA8_77<='9')||(LA8_77>='A' && LA8_77<='Z')||(LA8_77>='a' && LA8_77<='z')) ) {
+-                                            alt8=21;
+-                                        }
+-                                        else {
+-                                            alt8=11;}
+-                                    }
+-                                    else {
+-                                        alt8=21;}
+-                                }
+-                                else {
+-                                    alt8=21;}
+-                            }
+-                            else {
+-                                alt8=21;}
+-                        }
+-                        else {
+-                            alt8=21;}
+-                    }
+-                    else {
+-                        alt8=21;}
+-                }
+-                else {
+-                    alt8=21;}
+-                break;
+-            default:
+-                alt8=21;}
+-
+-            break;
+-        case 'F':
+-            int LA8_12 = input.LA(2);
+-            if ( (LA8_12=='U') ) {
+-                int LA8_26 = input.LA(3);
+-                if ( (LA8_26=='N') ) {
+-                    int LA8_35 = input.LA(4);
+-                    if ( (LA8_35=='C') ) {
+-                        int LA8_45 = input.LA(5);
+-                        if ( (LA8_45=='T') ) {
+-                            int LA8_55 = input.LA(6);
+-                            if ( (LA8_55=='I') ) {
+-                                int LA8_64 = input.LA(7);
+-                                if ( (LA8_64=='O') ) {
+-                                    int LA8_72 = input.LA(8);
+-                                    if ( (LA8_72=='N') ) {
+-                                        int LA8_78 = input.LA(9);
+-                                        if ( (LA8_78=='$'||LA8_78=='.'||(LA8_78>='0' && LA8_78<='9')||(LA8_78>='A' && LA8_78<='Z')||(LA8_78>='a' && LA8_78<='z')) ) {
+-                                            alt8=21;
+-                                        }
+-                                        else {
+-                                            alt8=12;}
+-                                    }
+-                                    else {
+-                                        alt8=21;}
+-                                }
+-                                else {
+-                                    alt8=21;}
+-                            }
+-                            else {
+-                                alt8=21;}
+-                        }
+-                        else {
+-                            alt8=21;}
+-                    }
+-                    else {
+-                        alt8=21;}
+-                }
+-                else {
+-                    alt8=21;}
+-            }
+-            else {
+-                alt8=21;}
+-            break;
+-        case 'E':
+-            switch ( input.LA(2) ) {
+-            case 'N':
+-                int LA8_27 = input.LA(3);
+-                if ( (LA8_27=='T') ) {
+-                    int LA8_36 = input.LA(4);
+-                    if ( (LA8_36=='R') ) {
+-                        int LA8_46 = input.LA(5);
+-                        if ( (LA8_46=='Y') ) {
+-                            int LA8_56 = input.LA(6);
+-                            if ( (LA8_56=='$'||LA8_56=='.'||(LA8_56>='0' && LA8_56<='9')||(LA8_56>='A' && LA8_56<='Z')||(LA8_56>='a' && LA8_56<='z')) ) {
+-                                alt8=21;
+-                            }
+-                            else {
+-                                alt8=17;}
+-                        }
+-                        else {
+-                            alt8=21;}
+-                    }
+-                    else {
+-                        alt8=21;}
+-                }
+-                else {
+-                    alt8=21;}
+-                break;
+-            case 'X':
+-                int LA8_28 = input.LA(3);
+-                if ( (LA8_28=='E') ) {
+-                    int LA8_37 = input.LA(4);
+-                    if ( (LA8_37=='C') ) {
+-                        int LA8_47 = input.LA(5);
+-                        if ( (LA8_47=='U') ) {
+-                            int LA8_57 = input.LA(6);
+-                            if ( (LA8_57=='T') ) {
+-                                int LA8_66 = input.LA(7);
+-                                if ( (LA8_66=='E') ) {
+-                                    int LA8_73 = input.LA(8);
+-                                    if ( (LA8_73=='$'||LA8_73=='.'||(LA8_73>='0' && LA8_73<='9')||(LA8_73>='A' && LA8_73<='Z')||(LA8_73>='a' && LA8_73<='z')) ) {
+-                                        alt8=21;
+-                                    }
+-                                    else {
+-                                        alt8=13;}
+-                                }
+-                                else {
+-                                    alt8=21;}
+-                            }
+-                            else {
+-                                alt8=21;}
+-                        }
+-                        else {
+-                            alt8=21;}
+-                    }
+-                    else {
+-                        alt8=21;}
+-                }
+-                else {
+-                    alt8=21;}
+-                break;
+-            default:
+-                alt8=21;}
+-
+-            break;
+-        case 'R':
+-            int LA8_14 = input.LA(2);
+-            if ( (LA8_14=='E') ) {
+-                switch ( input.LA(3) ) {
+-                case 'A':
+-                    int LA8_38 = input.LA(4);
+-                    if ( (LA8_38=='D') ) {
+-                        int LA8_48 = input.LA(5);
+-                        if ( (LA8_48=='$'||LA8_48=='.'||(LA8_48>='0' && LA8_48<='9')||(LA8_48>='A' && LA8_48<='Z')||(LA8_48>='a' && LA8_48<='z')) ) {
+-                            alt8=21;
+-                        }
+-                        else {
+-                            alt8=18;}
+-                    }
+-                    else {
+-                        alt8=21;}
+-                    break;
+-                case 'V':
+-                    int LA8_39 = input.LA(4);
+-                    if ( (LA8_39=='E') ) {
+-                        int LA8_49 = input.LA(5);
+-                        if ( (LA8_49=='R') ) {
+-                            int LA8_59 = input.LA(6);
+-                            if ( (LA8_59=='S') ) {
+-                                int LA8_67 = input.LA(7);
+-                                if ( (LA8_67=='E') ) {
+-                                    int LA8_74 = input.LA(8);
+-                                    if ( (LA8_74=='$'||LA8_74=='.'||(LA8_74>='0' && LA8_74<='9')||(LA8_74>='A' && LA8_74<='Z')||(LA8_74>='a' && LA8_74<='z')) ) {
+-                                        alt8=21;
+-                                    }
+-                                    else {
+-                                        alt8=16;}
+-                                }
+-                                else {
+-                                    alt8=21;}
+-                            }
+-                            else {
+-                                alt8=21;}
+-                        }
+-                        else {
+-                            alt8=21;}
+-                    }
+-                    else {
+-                        alt8=21;}
+-                    break;
+-                default:
+-                    alt8=21;}
+-
+-            }
+-            else {
+-                alt8=21;}
+-            break;
+-        case 'M':
+-            int LA8_15 = input.LA(2);
+-            if ( (LA8_15=='A') ) {
+-                int LA8_30 = input.LA(3);
+-                if ( (LA8_30=='C') ) {
+-                    int LA8_40 = input.LA(4);
+-                    if ( (LA8_40=='R') ) {
+-                        int LA8_50 = input.LA(5);
+-                        if ( (LA8_50=='O') ) {
+-                            int LA8_60 = input.LA(6);
+-                            if ( (LA8_60=='$'||LA8_60=='.'||(LA8_60>='0' && LA8_60<='9')||(LA8_60>='A' && LA8_60<='Z')||(LA8_60>='a' && LA8_60<='z')) ) {
+-                                alt8=21;
+-                            }
+-                            else {
+-                                alt8=19;}
+-                        }
+-                        else {
+-                            alt8=21;}
+-                    }
+-                    else {
+-                        alt8=21;}
+-                }
+-                else {
+-                    alt8=21;}
+-            }
+-            else {
+-                alt8=21;}
+-            break;
+-        case '\'':
+-            alt8=20;
+-            break;
+-        case '$':
+-        case '.':
+-        case 'A':
+-        case 'B':
+-        case 'C':
+-        case 'D':
+-        case 'G':
+-        case 'H':
+-        case 'J':
+-        case 'K':
+-        case 'L':
+-        case 'N':
+-        case 'O':
+-        case 'P':
+-        case 'Q':
+-        case 'T':
+-        case 'U':
+-        case 'V':
+-        case 'W':
+-        case 'X':
+-        case 'Y':
+-        case 'Z':
+-        case 'a':
+-        case 'b':
+-        case 'c':
+-        case 'd':
+-        case 'e':
+-        case 'f':
+-        case 'g':
+-        case 'h':
+-        case 'i':
+-        case 'j':
+-        case 'k':
+-        case 'l':
+-        case 'm':
+-        case 'n':
+-        case 'o':
+-        case 'p':
+-        case 'q':
+-        case 'r':
+-        case 's':
+-        case 't':
+-        case 'u':
+-        case 'v':
+-        case 'w':
+-        case 'x':
+-        case 'y':
+-        case 'z':
+-            alt8=21;
+-            break;
+-        case '\"':
+-            alt8=22;
+-            break;
+-        case '#':
+-            alt8=23;
+-            break;
+-        case '\t':
+-        case '\n':
+-        case '\r':
+-        case ' ':
+-            alt8=24;
+-            break;
+-        case '%':
+-            alt8=25;
+-            break;
+-        default:
+-            NoViableAltException nvae =
+-                new NoViableAltException("1:1: Tokens : ( T25 | T26 | T27 | T28 | T29 | T30 | T31 | T32 | T33 | STRINGS | INTEGERS | FUNCTION | EXECUTE | SORT | ITERATE | REVERSE | ENTRY | READ | MACRO | QUOTED | IDENTIFIER | STRING | INTEGER | WS | LINE_COMMENT );", 8, 0, input);
+-
+-            throw nvae;
+-        }
+-
++        alt8 = dfa8.predict(input);
+         switch (alt8) {
+             case 1 :
+-                // Bst.g:1:10: T25
++                // Bst.g:1:10: T__25
+                 {
+-                mT25(); 
++                mT__25();
+                 }
+                 break;
+             case 2 :
+-                // Bst.g:1:14: T26
++                // Bst.g:1:16: T__26
+                 {
+-                mT26(); 
++                mT__26();
+                 }
+                 break;
+             case 3 :
+-                // Bst.g:1:18: T27
++                // Bst.g:1:22: T__27
+                 {
+-                mT27(); 
++                mT__27();
+                 }
+                 break;
+             case 4 :
+-                // Bst.g:1:22: T28
++                // Bst.g:1:28: T__28
+                 {
+-                mT28(); 
++                mT__28();
+                 }
+                 break;
+             case 5 :
+-                // Bst.g:1:26: T29
++                // Bst.g:1:34: T__29
+                 {
+-                mT29(); 
++                mT__29();
+                 }
+                 break;
+             case 6 :
+-                // Bst.g:1:30: T30
++                // Bst.g:1:40: T__30
+                 {
+-                mT30(); 
++                mT__30();
+                 }
+                 break;
+             case 7 :
+-                // Bst.g:1:34: T31
++                // Bst.g:1:46: T__31
+                 {
+-                mT31(); 
++                mT__31();
+                 }
+                 break;
+             case 8 :
+-                // Bst.g:1:38: T32
++                // Bst.g:1:52: T__32
+                 {
+-                mT32(); 
++                mT__32();
+                 }
+                 break;
+             case 9 :
+-                // Bst.g:1:42: T33
++                // Bst.g:1:58: T__33
+                 {
+-                mT33(); 
++                mT__33();
+                 }
+                 break;
+             case 10 :
+-                // Bst.g:1:46: STRINGS
++                // Bst.g:1:64: STRINGS
+                 {
+                 mSTRINGS(); 
+                 }
+                 break;
+             case 11 :
+-                // Bst.g:1:54: INTEGERS
++                // Bst.g:1:72: INTEGERS
+                 {
+                 mINTEGERS(); 
+                 }
+                 break;
+             case 12 :
+-                // Bst.g:1:63: FUNCTION
++                // Bst.g:1:81: FUNCTION
+                 {
+                 mFUNCTION(); 
+                 }
+                 break;
+             case 13 :
+-                // Bst.g:1:72: EXECUTE
++                // Bst.g:1:90: EXECUTE
+                 {
+                 mEXECUTE(); 
+                 }
+                 break;
+             case 14 :
+-                // Bst.g:1:80: SORT
++                // Bst.g:1:98: SORT
+                 {
+                 mSORT(); 
+                 }
+                 break;
+             case 15 :
+-                // Bst.g:1:85: ITERATE
++                // Bst.g:1:103: ITERATE
+                 {
+                 mITERATE(); 
+                 }
+                 break;
+             case 16 :
+-                // Bst.g:1:93: REVERSE
++                // Bst.g:1:111: REVERSE
+                 {
+                 mREVERSE(); 
+                 }
+                 break;
+             case 17 :
+-                // Bst.g:1:101: ENTRY
++                // Bst.g:1:119: ENTRY
+                 {
+                 mENTRY(); 
+                 }
+                 break;
+             case 18 :
+-                // Bst.g:1:107: READ
++                // Bst.g:1:125: READ
+                 {
+                 mREAD(); 
+                 }
+                 break;
+             case 19 :
+-                // Bst.g:1:112: MACRO
++                // Bst.g:1:130: MACRO
+                 {
+                 mMACRO(); 
+                 }
+                 break;
+             case 20 :
+-                // Bst.g:1:118: QUOTED
++                // Bst.g:1:136: QUOTED
+                 {
+                 mQUOTED(); 
+                 }
+                 break;
+             case 21 :
+-                // Bst.g:1:125: IDENTIFIER
++                // Bst.g:1:143: IDENTIFIER
+                 {
+                 mIDENTIFIER(); 
+                 }
+                 break;
+             case 22 :
+-                // Bst.g:1:136: STRING
++                // Bst.g:1:154: STRING
+                 {
+                 mSTRING(); 
+                 }
+                 break;
+             case 23 :
+-                // Bst.g:1:143: INTEGER
++                // Bst.g:1:161: INTEGER
+                 {
+                 mINTEGER(); 
+                 }
+                 break;
+             case 24 :
+-                // Bst.g:1:151: WS
++                // Bst.g:1:169: WS
+                 {
+                 mWS(); 
+                 }
+                 break;
+             case 25 :
+-                // Bst.g:1:154: LINE_COMMENT
++                // Bst.g:1:172: LINE_COMMENT
+                 {
+                 mLINE_COMMENT(); 
+@@ -1659,6 +1013,167 @@ public class BstLexer extends Lexer {
+     }
++    protected DFA8 dfa8 = new DFA8(this);
++    static final String DFA8_eotS =
++        "\12\uffff\6\21\6\uffff\24\21\1\64\6\21\1\73\2\21\1\uffff\4\21\1"+
++        "\102\1\21\1\uffff\1\104\5\21\1\uffff\1\21\1\uffff\1\113\1\21\1\115"+
++        "\1\21\1\117\1\120\1\uffff\1\121\1\uffff\1\122\4\uffff";
++    static final String DFA8_eofS =
++        "\123\uffff";
++    static final String DFA8_minS =
++        "\1\11\11\uffff\1\117\1\116\1\125\1\116\1\105\1\101\6\uffff\2\122"+
++        "\1\124\1\105\1\116\1\105\1\124\1\101\1\103\1\111\1\124\1\105\1\122"+
++        "\2\103\1\122\1\105\1\104\1\122\1\116\1\44\1\107\1\101\1\124\1\125"+
++        "\1\131\1\122\1\44\1\117\1\107\1\uffff\1\105\1\124\1\111\1\124\1"+
++        "\44\1\123\1\uffff\1\44\1\123\1\122\1\105\1\117\1\105\1\uffff\1\105"+
++        "\1\uffff\1\44\1\123\1\44\1\116\2\44\1\uffff\1\44\1\uffff\1\44\4"+
++        "\uffff";
++    static final String DFA8_maxS =
++        "\1\175\11\uffff\2\124\1\125\1\130\1\105\1\101\6\uffff\2\122\1\124"+
++        "\1\105\1\116\1\105\1\124\1\126\1\103\1\111\1\124\1\105\1\122\2\103"+
++        "\1\122\1\105\1\104\1\122\1\116\1\172\1\107\1\101\1\124\1\125\1\131"+
++        "\1\122\1\172\1\117\1\107\1\uffff\1\105\1\124\1\111\1\124\1\172\1"+
++        "\123\1\uffff\1\172\1\123\1\122\1\105\1\117\1\105\1\uffff\1\105\1"+
++        "\uffff\1\172\1\123\1\172\1\116\2\172\1\uffff\1\172\1\uffff\1\172"+
++        "\4\uffff";
++    static final String DFA8_acceptS =
++        "\1\uffff\1\1\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\11\6\uffff\1\24\1\25"+
++        "\1\26\1\27\1\30\1\31\36\uffff\1\16\6\uffff\1\22\6\uffff\1\21\1\uffff"+
++        "\1\23\6\uffff\1\12\1\uffff\1\17\1\uffff\1\15\1\20\1\13\1\14";
++    static final String DFA8_specialS =
++        "\123\uffff}>";
++    static final String[] DFA8_transitionS = {
++            "\2\24\25\uffff\1\24\1\uffff\1\22\1\23\1\21\1\25\1\uffff\1\20"+
++            "\2\uffff\1\11\1\6\1\uffff\1\7\1\21\13\uffff\1\10\1\uffff\1\3"+
++            "\1\5\1\4\2\uffff\4\21\1\15\1\14\2\21\1\13\3\21\1\17\4\21\1\16"+
++            "\1\12\7\21\6\uffff\32\21\1\1\1\uffff\1\2",
++            "",
++            "",
++            "",
++            "",
++            "",
++            "",
++            "",
++            "",
++            "",
++            "\1\27\4\uffff\1\26",
++            "\1\30\5\uffff\1\31",
++            "\1\32",
++            "\1\34\11\uffff\1\33",
++            "\1\35",
++            "\1\36",
++            "",
++            "",
++            "",
++            "",
++            "",
++            "",
++            "\1\37",
++            "\1\40",
++            "\1\41",
++            "\1\42",
++            "\1\43",
++            "\1\44",
++            "\1\45",
++            "\1\47\24\uffff\1\46",
++            "\1\50",
++            "\1\51",
++            "\1\52",
++            "\1\53",
++            "\1\54",
++            "\1\55",
++            "\1\56",
++            "\1\57",
++            "\1\60",
++            "\1\61",
++            "\1\62",
++            "\1\63",
++            "\1\21\11\uffff\1\21\1\uffff\12\21\7\uffff\32\21\6\uffff\32"+
++            "\21",
++            "\1\65",
++            "\1\66",
++            "\1\67",
++            "\1\70",
++            "\1\71",
++            "\1\72",
++            "\1\21\11\uffff\1\21\1\uffff\12\21\7\uffff\32\21\6\uffff\32"+
++            "\21",
++            "\1\74",
++            "\1\75",
++            "",
++            "\1\76",
++            "\1\77",
++            "\1\100",
++            "\1\101",
++            "\1\21\11\uffff\1\21\1\uffff\12\21\7\uffff\32\21\6\uffff\32"+
++            "\21",
++            "\1\103",
++            "",
++            "\1\21\11\uffff\1\21\1\uffff\12\21\7\uffff\32\21\6\uffff\32"+
++            "\21",
++            "\1\105",
++            "\1\106",
++            "\1\107",
++            "\1\110",
++            "\1\111",
++            "",
++            "\1\112",
++            "",
++            "\1\21\11\uffff\1\21\1\uffff\12\21\7\uffff\32\21\6\uffff\32"+
++            "\21",
++            "\1\114",
++            "\1\21\11\uffff\1\21\1\uffff\12\21\7\uffff\32\21\6\uffff\32"+
++            "\21",
++            "\1\116",
++            "\1\21\11\uffff\1\21\1\uffff\12\21\7\uffff\32\21\6\uffff\32"+
++            "\21",
++            "\1\21\11\uffff\1\21\1\uffff\12\21\7\uffff\32\21\6\uffff\32"+
++            "\21",
++            "",
++            "\1\21\11\uffff\1\21\1\uffff\12\21\7\uffff\32\21\6\uffff\32"+
++            "\21",
++            "",
++            "\1\21\11\uffff\1\21\1\uffff\12\21\7\uffff\32\21\6\uffff\32"+
++            "\21",
++            "",
++            "",
++            "",
++            ""
++    };
++
++    static final short[] DFA8_eot = DFA.unpackEncodedString(DFA8_eotS);
++    static final short[] DFA8_eof = DFA.unpackEncodedString(DFA8_eofS);
++    static final char[] DFA8_min = DFA.unpackEncodedStringToUnsignedChars(DFA8_minS);
++    static final char[] DFA8_max = DFA.unpackEncodedStringToUnsignedChars(DFA8_maxS);
++    static final short[] DFA8_accept = DFA.unpackEncodedString(DFA8_acceptS);
++    static final short[] DFA8_special = DFA.unpackEncodedString(DFA8_specialS);
++    static final short[][] DFA8_transition;
++
++    static {
++        int numStates = DFA8_transitionS.length;
++        DFA8_transition = new short[numStates][];
++        for (int i=0; i<numStates; i++) {
++            DFA8_transition[i] = DFA.unpackEncodedString(DFA8_transitionS[i]);
++        }
++    }
++
++    class DFA8 extends DFA {
++
++        public DFA8(BaseRecognizer recognizer) {
++            this.recognizer = recognizer;
++            this.decisionNumber = 8;
++            this.eot = DFA8_eot;
++            this.eof = DFA8_eof;
++            this.min = DFA8_min;
++            this.max = DFA8_max;
++            this.accept = DFA8_accept;
++            this.special = DFA8_special;
++            this.transition = DFA8_transition;
++        }
++        public String getDescription() {
++            return "1:1: Tokens : ( T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | STRINGS | INTEGERS | FUNCTION | EXECUTE | SORT | ITERATE | REVERSE | ENTRY | READ | MACRO | QUOTED | IDENTIFIER | STRING | INTEGER | WS | LINE_COMMENT );";
++        }
++    }
+  
+-}
+\ No newline at end of file
++}
+--- /dev/null
++++ b/src/java/net/sf/jabref/bst/Bst.g
+@@ -0,0 +1,90 @@
++grammar Bst;
++
++header { package net.sf.jabref.bst; }
++
++options {
++    output=AST;
++}
++
++tokens {
++      IDLIST;
++      STACK;
++      ENTRY;
++      COMMANDS;
++}
++
++program : commands+ -> ^(COMMANDS commands+);
++
++commands
++      : STRINGS^ idList
++      | INTEGERS^ idList
++      | FUNCTION^ id stack
++      | MACRO^ id '{'! STRING '}'!
++      | READ^
++      | EXECUTE^ '{'! function '}'!
++      | ITERATE^ '{'! function '}'!
++      | REVERSE^ '{'! function '}'!
++      | ENTRY^ idList0 idList0 idList0
++      | SORT^;
++
++identifier
++      : IDENTIFIER;
++
++id
++      : '{'! identifier '}'!;
++
++idList
++      : '{' identifier+ '}' -> ^(IDLIST identifier+);
++
++idList0
++      : '{' identifier* '}' -> ^(IDLIST identifier*);
++
++function
++      : '<' | '>' | '=' | '+' | '-' | ':=' | '*' | identifier;
++
++stack
++      : '{' stackitem+ '}' -> ^(STACK stackitem+);
++
++stackitem
++      : function
++      | STRING
++      | INTEGER
++      | QUOTED
++      | stack;
++
++STRINGS : 'STRINGS';
++INTEGERS : 'INTEGERS';
++FUNCTION : 'FUNCTION';
++EXECUTE : 'EXECUTE';
++SORT : 'SORT';
++ITERATE : 'ITERATE';
++REVERSE : 'REVERSE';
++ENTRY : 'ENTRY';
++READ : 'READ';
++MACRO : 'MACRO';
++
++QUOTED
++      : '\'' IDENTIFIER;
++
++IDENTIFIER
++      : LETTER (LETTER|NUMERAL)* ;
++
++fragment LETTER
++      : ('a'..'z'|'A'..'Z'|'.'|'$');
++
++STRING
++      : '"' (~('"'))* '"';
++
++INTEGER
++      : '#' ('+'|'-')? NUMERAL+ ;
++
++fragment NUMERAL
++      : ('0'..'9');
++
++WS
++      : (' '|'\t'|'\n')+ {channel=99;} ;
++
++LINE_COMMENT
++    : '%' ~('\n'|'\r')* '\r'? '\n' {channel=99;}
++    ;
++
diff --git a/debian/patches/06_BibtexEntry.patch b/debian/patches/06_BibtexEntry.patch
new file mode 100644 (file)
index 0000000..f7f46fd
--- /dev/null
@@ -0,0 +1,51 @@
+Author: Philip Rinn <rinni@gmx.net>
+Description: Fixing incompatible types
+--- a/src/java/net/sf/jabref/gui/ImportInspectionDialog.java
++++ b/src/java/net/sf/jabref/gui/ImportInspectionDialog.java
+@@ -1319,7 +1319,7 @@ public class ImportInspectionDialog exte
+     @SuppressWarnings("unchecked")
+     protected void setupComparatorChooser() {
+         // First column:
+-        java.util.List<Comparator<BibtexEntry>> comparators = comparatorChooser
++        java.util.List<Comparator> comparators = comparatorChooser
+             .getComparatorsForColumn(0);
+         comparators.clear();
+@@ -1478,4 +1478,4 @@ public class ImportInspectionDialog exte
+     public void toFront() {
+         super.toFront();
+     }
+-}
+\ No newline at end of file
++}
+--- a/src/java/net/sf/jabref/gui/MainTable.java
++++ b/src/java/net/sf/jabref/gui/MainTable.java
+@@ -323,7 +323,7 @@ public class MainTable extends JTable {
+     @SuppressWarnings("unchecked")
+       private void setupComparatorChooser() {
+         // First column:
+-        List<Comparator<BibtexEntry>> comparators = comparatorChooser.getComparatorsForColumn(0);
++        List<Comparator> comparators = comparatorChooser.getComparatorsForColumn(0);
+         comparators.clear();
+         comparators.add(new FirstColumnComparator(panel.database()));
+@@ -624,7 +624,7 @@ public class MainTable extends JTable {
+      */
+     @SuppressWarnings("unchecked")
+       public Comparator<BibtexEntry> getComparatorForColumn(int index) {
+-        List<Comparator<BibtexEntry>> l = comparatorChooser.getComparatorsForColumn(index);
++        List<Comparator> l = comparatorChooser.getComparatorsForColumn(index);
+         return l.size() == 0 ? null : l.get(0);
+     }
+--- a/src/java/net/sf/jabref/gui/SearchResultsDialog.java
++++ b/src/java/net/sf/jabref/gui/SearchResultsDialog.java
+@@ -176,7 +176,7 @@ public class SearchResultsDialog {
+     @SuppressWarnings("unchecked")
+     protected void setupComparatorChooser(TableComparatorChooser<BibtexEntry> comparatorChooser) {
+         // First column:
+-        java.util.List<Comparator<BibtexEntry>> comparators = comparatorChooser
++        java.util.List<Comparator> comparators = comparatorChooser
+             .getComparatorsForColumn(0);
+         comparators.clear();
diff --git a/debian/patches/07_pdfbox1.5.patch b/debian/patches/07_pdfbox1.5.patch
new file mode 100644 (file)
index 0000000..f9234ac
--- /dev/null
@@ -0,0 +1,63 @@
+Description: adjust for new upstream release of PDFBox:
+ - fix up package imports for jempbox and pdfbox
+ - adjust return type of getSequenceDateList()
+Origin: vendor
+Forwarded: no
+Author: tony mancill <tmancill@debian.org>
+Last-Update: 2011-03-28
+
+--- a/src/java/net/sf/jabref/util/XMPSchemaBibtex.java
++++ b/src/java/net/sf/jabref/util/XMPSchemaBibtex.java
+@@ -7,8 +7,8 @@
+ import net.sf.jabref.*;
+-import org.jempbox.xmp.XMPMetadata;
+-import org.jempbox.xmp.XMPSchema;
++import org.apache.jempbox.xmp.XMPMetadata;
++import org.apache.jempbox.xmp.XMPSchema;
+ import org.w3c.dom.Element;
+ import org.w3c.dom.NamedNodeMap;
+ import org.w3c.dom.Node;
+@@ -106,7 +106,7 @@
+       }
+       @SuppressWarnings("unchecked")
+-      public List<String> getSequenceDateList(String seqName) throws IOException {
++      public List<Calendar> getSequenceDateList(String seqName) throws IOException {
+               return super.getSequenceDateList(makeProperty(seqName));
+       }
+--- a/src/java/net/sf/jabref/util/XMPUtil.java
++++ b/src/java/net/sf/jabref/util/XMPUtil.java
+@@ -9,18 +9,18 @@
+ import net.sf.jabref.imports.BibtexParser;
+ import net.sf.jabref.imports.ParserResult;
+-import org.jempbox.impl.DateConverter;
+-import org.jempbox.impl.XMLUtil;
+-import org.jempbox.xmp.XMPMetadata;
+-import org.jempbox.xmp.XMPSchema;
+-import org.jempbox.xmp.XMPSchemaDublinCore;
+-import org.pdfbox.cos.COSDictionary;
+-import org.pdfbox.cos.COSName;
+-import org.pdfbox.exceptions.COSVisitorException;
+-import org.pdfbox.pdmodel.PDDocument;
+-import org.pdfbox.pdmodel.PDDocumentCatalog;
+-import org.pdfbox.pdmodel.PDDocumentInformation;
+-import org.pdfbox.pdmodel.common.PDMetadata;
++import org.apache.jempbox.impl.DateConverter;
++import org.apache.jempbox.impl.XMLUtil;
++import org.apache.jempbox.xmp.XMPMetadata;
++import org.apache.jempbox.xmp.XMPSchema;
++import org.apache.jempbox.xmp.XMPSchemaDublinCore;
++import org.apache.pdfbox.cos.COSDictionary;
++import org.apache.pdfbox.cos.COSName;
++import org.apache.pdfbox.exceptions.COSVisitorException;
++import org.apache.pdfbox.pdmodel.PDDocument;
++import org.apache.pdfbox.pdmodel.PDDocumentCatalog;
++import org.apache.pdfbox.pdmodel.PDDocumentInformation;
++import org.apache.pdfbox.pdmodel.common.PDMetadata;
+ /**
+  * XMPUtils provide support for reading and writing BibTex data as XMP-Metadata
diff --git a/debian/patches/08_doubleextensions.patch b/debian/patches/08_doubleextensions.patch
new file mode 100644 (file)
index 0000000..2f17bbb
--- /dev/null
@@ -0,0 +1,59 @@
+Description: handle double extensions better
+Origin: upstream
+Bug-Debian: http://bugs.debian.org/626582
+Forwarded: not needed, it's from them :)
+Author: Morten Omholt Alver <mortenalver@gmail.com>
+Reviewed-by: gregor herrmann <gregoa@debian.org>
+Last-Update: 2011-05-22
+Applied-Upstream: yes
+
+--- a/src/java/net/sf/jabref/gui/FileListEntryEditor.java
++++ b/src/java/net/sf/jabref/gui/FileListEntryEditor.java
+@@ -198,14 +198,9 @@
+             // Try to guess the file type:
+             String theLink = link.getText().trim();
+-            int index = theLink.lastIndexOf('.');
+-            if ((index >= 0) && (index < theLink.length()-1)) {
+-
+-                ExternalFileType type = Globals.prefs.getExternalFileTypeByExt
+-                        (theLink.substring(index+1));
+-                if (type != null)
+-                    types.setSelectedItem(type);
+-            }
++            ExternalFileType type = Globals.prefs.getExternalFileTypeForName(theLink);
++            if (type != null)
++                types.setSelectedItem(type);
+         }
+     }
+--- a/src/java/net/sf/jabref/JabRefPreferences.java
++++ b/src/java/net/sf/jabref/JabRefPreferences.java
+@@ -1065,6 +1065,27 @@
+     }
+     /**
++     * Look up the external file type registered for this filename, if any.
++     * @param filename The name of the file whose type to look up.
++     * @return The ExternalFileType registered, or null if none.
++     */
++    public ExternalFileType getExternalFileTypeForName(String filename) {
++        int longestFound = -1;
++        ExternalFileType foundType = null;
++        for (Iterator<ExternalFileType> iterator = externalFileTypes.iterator(); iterator.hasNext();) {
++            ExternalFileType type = iterator.next();
++            if ((type.getExtension() != null) && filename.toLowerCase().
++                    endsWith(type.getExtension().toLowerCase())) {
++                if (type.getExtension().length() > longestFound) {
++                    longestFound = type.getExtension().length();
++                    foundType = type;
++                }
++            }
++        }
++        return foundType;
++    }
++
++    /**
+      * Look up the external file type registered for this MIME type, if any.
+      * @param mimeType The MIME type.
+      * @return The ExternalFileType registered, or null if none. For the mime type "text/html",
diff --git a/debian/patches/09_looks2.5.patch b/debian/patches/09_looks2.5.patch
new file mode 100644 (file)
index 0000000..c1c320b
--- /dev/null
@@ -0,0 +1,24 @@
+Description: LookUtils.IS_LAF_WINDOWS_XP_ENABLED was removed in JGoodies Looks 2.5.0
+Origin: vendor
+Forwarded: no
+Author: gregor herrmann <gregoa@debian.org>
+Last-Update: 2012-02-10
+
+--- a/src/java/com/jgoodies/uif_lite/panel/SimpleInternalFrame.java
++++ b/src/java/com/jgoodies/uif_lite/panel/SimpleInternalFrame.java
+@@ -370,8 +370,6 @@
+             UIManager.getColor("SimpleInternalFrame.activeTitleBackground");
+         if (c != null)
+             return c;
+-        if (LookUtils.IS_LAF_WINDOWS_XP_ENABLED)
+-            c = UIManager.getColor("InternalFrame.activeTitleGradient");
+         return c != null
+             ? c
+             : UIManager.getColor("InternalFrame.activeTitleBackground");
+@@ -472,4 +470,4 @@
+         }
+     }
+-}
+\ No newline at end of file
++}
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644 (file)
index 0000000..db9175d
--- /dev/null
@@ -0,0 +1,6 @@
+02_libs.patch
+05_antlr32.patch
+06_BibtexEntry.patch
+07_pdfbox1.5.patch
+08_doubleextensions.patch
+09_looks2.5.patch
diff --git a/debian/repack.local b/debian/repack.local
new file mode 100644 (file)
index 0000000..f03c114
--- /dev/null
@@ -0,0 +1,3 @@
+requires_version 2
+SUFFIX=+ds
+rm lib
diff --git a/debian/repack.stub b/debian/repack.stub
new file mode 100755 (executable)
index 0000000..ac56520
--- /dev/null
@@ -0,0 +1,82 @@
+#!/bin/sh
+
+: <<=cut
+=pod
+
+=head1 NAME
+
+repack.stub - script to repack upstream tarballs from uscan
+
+=head1 INSTRUCTIONS
+
+put this in debian/repack.stub and add "debian sh debian/repack.stub" to
+the end of the line in debian/watch. you will also need to add a version
+mangle to debian/watch.
+
+then create a debian/repack.local. this is a shell script that is
+sources under "set -e", so be careful to check returns codes.
+
+=head1 FUNCTIONS
+
+=over 4
+
+=item rm
+
+rm is replaced by a function that does some magic ("rm -rv" by default), but also changes MANIFEST if $MANIFEST is 1
+
+=item mv
+
+mv is replaced by a function that just does mv (by default), but also changes MANIFEST if $MANIFEST is 1
+
+=item requires_version
+
+requires_version is there for future usage for requiring certain versions of the script
+
+=back
+
+=head1 VARIABLES
+
+=over 4
+
+=item SUFFIX
+
+defaults to +dfsg
+
+what to append to the upstream version
+
+=item RM_OPTS
+
+defaults to -vrf
+
+options to pass to rm
+
+=item MANIFEST
+
+defaults to 0, set to 1 to turn on.
+
+this will manipulate MANIFEST files in CPAN tarballs.
+
+=item UP_BASE
+
+this is the directory where the upstream source is.
+
+=back
+
+=cut
+
+if [ -z "$REPACK_SH" ]; then
+    if [ -f ../../scripts/repack.sh ]; then
+        REPACK_SH=../../scripts/repack.sh
+    fi
+    if [ -z "$REPACK_SH" ] && which repack.sh > /dev/null; then
+        REPACK_SH=$(which repack.sh)
+    fi
+fi
+
+if [ ! -f "$REPACK_SH" ]; then
+    echo "Couldn't find a repack.sh. please put it in your PATH, put it at ../../scripts/repack.sh, or put it somewhere else and set the REPACK_SH variable"
+    echo "You can get it from http://svn.debian.org/viewsvn/pkg-perl/scripts/repack.sh"
+    exit 1
+fi
+
+exec "$REPACK_SH" "$@"
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..6f31b72
--- /dev/null
@@ -0,0 +1,21 @@
+#!/usr/bin/make -f
+
+%:
+       dh $@
+
+override_dh_auto_clean:
+       # ant clean fails if build.xml is not patched
+       $(RM) -r $(CURDIR)/build
+
+override_dh_auto_build:
+       JAVA_HOME=/usr/lib/jvm/default-java ANT_OPTS=-D"file.encoding=UTF-8" \
+               dh_auto_build
+       convert -geometry 32x32 src/images/JabRef-icon-48.png build/jabref32.xpm
+       convert -geometry 16x16 src/images/JabRef-icon-48.png build/jabref16.xpm
+
+override_dh_auto_install:
+       dh_auto_install
+       install -m 755 debian/jabref-wrapper $(CURDIR)/debian/jabref/usr/bin/jabref
+
+override_dh_installchangelogs:
+       dh_installchangelogs src/txt/CHANGELOG
diff --git a/debian/source/format b/debian/source/format
new file mode 100644 (file)
index 0000000..163aaf8
--- /dev/null
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644 (file)
index 0000000..33a69ce
--- /dev/null
@@ -0,0 +1,4 @@
+version=3
+opts="dversionmangle=s/\+(dfsg|ds)$//;,uversionmangle=s/(\D)$/${1}1/;s/b(?:eta)?(\d)?$/~beta${1}/" \
+       http://sf.net/jabref/JabRef-(.+)-src\.tar\.bz2 \
+       debian sh debian/repack.stub
diff --git a/src/resource/build.properties b/src/resource/build.properties
deleted file mode 100644 (file)
index 4467879..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-builddate=October 25 2012
-build=387
-version=2.9b
\ No newline at end of file