Add 0001-Updates-BstLexer-and-BstParser-based-on-an-ANTLR-run.patch
authorgregor herrmann <gregoa@debian.org>
Mon, 29 Oct 2012 20:26:16 +0000 (21:26 +0100)
committergregor herrmann <gregoa@debian.org>
Mon, 29 Oct 2012 20:26:16 +0000 (21:26 +0100)
temporarily from upstream git.

debian/patches/0001-Updates-BstLexer-and-BstParser-based-on-an-ANTLR-run.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/0001-Updates-BstLexer-and-BstParser-based-on-an-ANTLR-run.patch b/debian/patches/0001-Updates-BstLexer-and-BstParser-based-on-an-ANTLR-run.patch
new file mode 100644 (file)
index 0000000..188b7dd
--- /dev/null
@@ -0,0 +1,4545 @@
+From a3358c3585f41dd795d8c3ba14bbd8412d7c8c57 Mon Sep 17 00:00:00 2001
+From: Oliver Kopp <olly98@users.sourceforge.net>
+Date: Sun, 28 Oct 2012 23:51:22 +0100
+Subject: [PATCH] Updates BstLexer and BstParser based on an ANTLR run on
+ Bst.g  * renames bst.g to Bst.g  * enables ANTLRv3 in the
+ gradle build. Issue "gradlew generateGrammarSource" to use
+ it.  * Adds Bst.tokens to .gitignore. It is a temporary
+ file.
+
+---
+ jabref/build.gradle                              |   25 +
+ jabref/src/java/net/sf/jabref/bst/.gitignore     |    1 +
+ jabref/src/java/net/sf/jabref/bst/Bst.g          |   96 ++
+ jabref/src/java/net/sf/jabref/bst/BstLexer.java  | 1713 ++++++++--------------
+ jabref/src/java/net/sf/jabref/bst/BstParser.java | 1396 ++++++++++--------
+ jabref/src/java/net/sf/jabref/bst/bst.g          |   94 --
+ 6 files changed, 1583 insertions(+), 1742 deletions(-)
+ create mode 100644 jabref/src/java/net/sf/jabref/bst/.gitignore
+ create mode 100644 jabref/src/java/net/sf/jabref/bst/Bst.g
+ delete mode 100644 jabref/src/java/net/sf/jabref/bst/bst.g
+
+--- /dev/null
++++ b/src/java/net/sf/jabref/bst/Bst.g
+@@ -0,0 +1,96 @@
++grammar Bst;
++
++options {
++    output=AST;
++}
++
++tokens {
++      IDLIST;
++      STACK;
++      ENTRY;
++      COMMANDS;
++}
++
++// applies only to the parser:
++@header {// Generated by ANTLR
++package net.sf.jabref.bst;}
++
++// applies only to the lexer:
++@lexer::header {// Generated by ANTLR
++package net.sf.jabref.bst;}
++
++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;}
++    ;
++
+--- a/src/java/net/sf/jabref/bst/BstLexer.java
++++ b/src/java/net/sf/jabref/bst/BstLexer.java
+@@ -1,701 +1,541 @@
+-/*  Copyright (C) 2003-2011 JabRef contributors.
+-    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 of the License, or
+-    (at your option) any later version.
+-
+-    This program is distributed in the hope that it will be useful,
+-    but WITHOUT ANY WARRANTY; without even the implied warranty of
+-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-    GNU General Public License for more details.
+-
+-    You should have received a copy of the GNU General Public License along
+-    with this program; if not, write to the Free Software Foundation, Inc.,
+-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+-*/
++// $ANTLR 3.4 C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g 2012-10-28 23:48:28
++// Generated by ANTLR
+ package net.sf.jabref.bst;
+-// $ANTLR 3.0b5 Bst.g 2006-11-23 23:20:24
+-
+-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;
++@SuppressWarnings({"all", "warnings", "unchecked"})
+ public class BstLexer extends Lexer {
+-    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 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 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 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 T__25=25;
++    public static final int T__26=26;
++    public static final int T__27=27;
++    public static final int T__28=28;
++    public static final int T__29=29;
++    public static final int T__30=30;
++    public static final int T__31=31;
++    public static final int T__32=32;
++    public static final int T__33=33;
++    public static final int COMMANDS=4;
++    public static final int ENTRY=5;
++    public static final int EXECUTE=6;
++    public static final int FUNCTION=7;
++    public static final int IDENTIFIER=8;
++    public static final int IDLIST=9;
++    public static final int INTEGER=10;
++    public static final int INTEGERS=11;
++    public static final int ITERATE=12;
++    public static final int LETTER=13;
++    public static final int LINE_COMMENT=14;
++    public static final int MACRO=15;
++    public static final int NUMERAL=16;
++    public static final int QUOTED=17;
++    public static final int READ=18;
++    public static final int REVERSE=19;
++    public static final int SORT=20;
++    public static final int STACK=21;
++    public static final int STRING=22;
++    public static final int STRINGS=23;
++    public static final int WS=24;
++
++    // delegates
++    // delegators
++    public Lexer[] getDelegates() {
++        return new Lexer[] {};
++    }
++
++    public BstLexer() {}
+     public BstLexer(CharStream input) {
+-        super(input);
++        this(input, new RecognizerSharedState());
+     }
+-    public String getGrammarFileName() { return "Bst.g"; }
++    public BstLexer(CharStream input, RecognizerSharedState state) {
++        super(input,state);
++    }
++    public String getGrammarFileName() { return "C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\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;
+-            // Bst.g:3:7: ( '{' )
+-            // Bst.g:3:7: '{'
++            int _type = T__25;
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:5:7: ( '*' )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:5:9: '*'
+             {
+-            match('{'); 
++            match('*');
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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;
+-            // Bst.g:4:7: ( '}' )
+-            // Bst.g:4:7: '}'
++            int _type = T__26;
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:6:7: ( '+' )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:6:9: '+'
+             {
+-            match('}'); 
++            match('+');
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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;
+-            // Bst.g:5:7: ( '<' )
+-            // Bst.g:5:7: '<'
++            int _type = T__27;
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:7:7: ( '-' )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:7:9: '-'
+             {
+-            match('<'); 
++            match('-');
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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;
+-            // Bst.g:6:7: ( '>' )
+-            // Bst.g:6:7: '>'
++            int _type = T__28;
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:8:7: ( ':=' )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:8:9: ':='
+             {
+-            match('>'); 
+-
+-            }
++            match(":=");
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
++            }
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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;
+-            // Bst.g:7:7: ( '=' )
+-            // Bst.g:7:7: '='
++            int _type = T__29;
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:9:7: ( '<' )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:9:9: '<'
+             {
+-            match('='); 
++            match('<');
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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;
+-            // Bst.g:8:7: ( '+' )
+-            // Bst.g:8:7: '+'
++            int _type = T__30;
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:10:7: ( '=' )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:10:9: '='
+             {
+-            match('+'); 
++            match('=');
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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;
+-            // Bst.g:9:7: ( '-' )
+-            // Bst.g:9:7: '-'
++            int _type = T__31;
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:11:7: ( '>' )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:11:9: '>'
+             {
+-            match('-'); 
++            match('>');
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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;
+-            // Bst.g:10:7: ( ':=' )
+-            // Bst.g:10:7: ':='
++            int _type = T__32;
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:12:7: ( '{' )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:12:9: '{'
+             {
+-            match(":="); 
+-
++            match('{');
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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;
+-            // Bst.g:11:7: ( '*' )
+-            // Bst.g:11:7: '*'
++            int _type = T__33;
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:13:7: ( '}' )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:13:9: '}'
+             {
+-            match('*'); 
++            match('}');
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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' )
+-            // Bst.g:53:11: 'STRINGS'
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:61:9: ( 'STRINGS' )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:61:11: 'STRINGS'
+             {
+             match("STRINGS"); 
+-            }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
++            }
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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' )
+-            // Bst.g:54:12: 'INTEGERS'
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:62:10: ( 'INTEGERS' )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:62:12: 'INTEGERS'
+             {
+             match("INTEGERS"); 
+-            }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
++            }
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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' )
+-            // Bst.g:55:12: 'FUNCTION'
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:63:10: ( 'FUNCTION' )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:63:12: 'FUNCTION'
+             {
+             match("FUNCTION"); 
+-            }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
++            }
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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' )
+-            // Bst.g:56:11: 'EXECUTE'
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:64:9: ( 'EXECUTE' )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:64:11: 'EXECUTE'
+             {
+             match("EXECUTE"); 
+-            }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
++            }
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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' )
+-            // Bst.g:57:8: 'SORT'
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:65:6: ( 'SORT' )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:65:8: 'SORT'
+             {
+             match("SORT"); 
+-            }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
++            }
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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' )
+-            // Bst.g:58:11: 'ITERATE'
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:66:9: ( 'ITERATE' )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:66:11: 'ITERATE'
+             {
+             match("ITERATE"); 
+-            }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
++            }
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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' )
+-            // Bst.g:59:11: 'REVERSE'
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:67:9: ( 'REVERSE' )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:67:11: 'REVERSE'
+             {
+             match("REVERSE"); 
+-            }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
++            }
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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' )
+-            // Bst.g:60:9: 'ENTRY'
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:68:7: ( 'ENTRY' )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:68:9: 'ENTRY'
+             {
+             match("ENTRY"); 
+-            }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
++            }
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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' )
+-            // Bst.g:61:8: 'READ'
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:69:6: ( 'READ' )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:69:8: 'READ'
+             {
+             match("READ"); 
+-            }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
++            }
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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' )
+-            // Bst.g:62:9: 'MACRO'
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:70:7: ( 'MACRO' )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:70:9: 'MACRO'
+             {
+             match("MACRO"); 
+-            }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
++            }
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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 )
+-            // Bst.g:65:4: '\\'' IDENTIFIER
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:73:2: ( '\\'' IDENTIFIER )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:73:4: '\\'' IDENTIFIER
+             {
+             match('\''); 
+-            mIDENTIFIER(); 
+-
+-            }
++            mIDENTIFIER();
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
++            }
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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 )* )
+-            // Bst.g:68:4: LETTER ( LETTER | NUMERAL )*
++            int _channel = DEFAULT_TOKEN_CHANNEL;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:76:2: ( LETTER ( LETTER | NUMERAL )* )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:76:4: LETTER ( LETTER | NUMERAL )*
+             {
+             mLETTER(); 
+-            // Bst.g:68:11: ( LETTER | NUMERAL )*
++
++
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:76:11: ( LETTER | NUMERAL )*
+             loop1:
+             do {
+-                int alt1=3;
++                int alt1=2;
+                 int LA1_0 = input.LA(1);
+-                if ( (LA1_0=='$'||LA1_0=='.'||(LA1_0>='A' && LA1_0<='Z')||(LA1_0>='a' && LA1_0<='z')) ) {
++
++                if ( (LA1_0=='$'||LA1_0=='.'||(LA1_0 >= '0' && LA1_0 <= '9')||(LA1_0 >= 'A' && LA1_0 <= 'Z')||(LA1_0 >= 'a' && LA1_0 <= 'z')) ) {
+                     alt1=1;
+                 }
+-                else if ( ((LA1_0>='0' && LA1_0<='9')) ) {
+-                    alt1=2;
+-                }
+                 switch (alt1) {
+               case 1 :
+-                  // Bst.g:68:12: LETTER
++                  // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:
+                   {
+-                  mLETTER(); 
+-
++                  if ( input.LA(1)=='$'||input.LA(1)=='.'||(input.LA(1) >= '0' && input.LA(1) <= '9')||(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;
+                   }
+-                  break;
+-              case 2 :
+-                  // Bst.g:68:19: NUMERAL
+-                  {
+-                  mNUMERAL(); 
++
+                   }
+                   break;
+@@ -708,81 +548,73 @@
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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'|'.'|'$')
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:79:2: ( ( 'a' .. 'z' | 'A' .. 'Z' | '.' | '$' ) )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:
+             {
+-            if ( input.LA(1)=='$'||input.LA(1)=='.'||(input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='a' && input.LA(1)<='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--;
++              // do for sure before leaving
+         }
+     }
+-    // $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;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:82:2: ( '\"' (~ ( '\"' ) )* '\"' )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:82:4: '\"' (~ ( '\"' ) )* '\"'
+             {
+             match('\"'); 
+-            // Bst.g:74:8: (~ '\"' )*
++
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:82: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: ~ '\"'
++                  // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:
+                   {
+-                  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;
+                   }
+@@ -794,54 +626,48 @@
+                 }
+             } while (true);
++
+             match('\"'); 
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:85:2: ( '#' ( '+' | '-' )? ( NUMERAL )+ )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:85:4: '#' ( '+' | '-' )? ( NUMERAL )+
+             {
+             match('#'); 
+-            // Bst.g:77:8: ( ('+'|'-'))?
++
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:85: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: ('+'|'-')
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\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;
+                     }
+@@ -850,22 +676,32 @@
+             }
+-            // Bst.g:77:19: ( NUMERAL )+
++
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:85:19: ( NUMERAL )+
+             int cnt4=0;
+             loop4:
+             do {
+                 int alt4=2;
+                 int LA4_0 = input.LA(1);
+-                if ( ((LA4_0>='0' && LA4_0<='9')) ) {
++
++                if ( ((LA4_0 >= '0' && LA4_0 <= '9')) ) {
+                     alt4=1;
+                 }
+                 switch (alt4) {
+               case 1 :
+-                  // Bst.g:77:19: NUMERAL
++                  // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:
+                   {
+-                  mNUMERAL(); 
++                  if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
++                      input.consume();
++                  }
++                  else {
++                      MismatchedSetException mse = new MismatchedSetException(null,input);
++                      recover(mse);
++                      throw mse;
++                  }
++
+                   }
+                   break;
+@@ -882,78 +718,72 @@
+             }
+-
+-
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
+-
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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:4: ( '0' .. '9' )
+-            {
+-            // Bst.g:80:4: ( '0' .. '9' )
+-            // Bst.g:80:5: '0' .. '9'
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:88:2: ( ( '0' .. '9' ) )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:
+             {
+-            matchRange('0','9'); 
+-
++            if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
++                input.consume();
++            }
++            else {
++                MismatchedSetException mse = new MismatchedSetException(null,input);
++                recover(mse);
++                throw mse;
+             }
+             }
++
+         }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:91:2: ( ( ' ' | '\\t' | '\\n' )+ )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:91:4: ( ' ' | '\\t' | '\\n' )+
+             {
+-            // Bst.g:82:9: ( (' '|'\\t'|'\\r'|'\\n'))+
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:91: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')
++                  // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\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;
+                   }
+@@ -969,58 +799,52 @@
+                 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--;
++              // do for sure before leaving
+         }
+     }
+-    // $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;
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:94:5: ( '%' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:94:7: '%' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n'
+             {
+             match('%'); 
+-            // Bst.g:90:11: (~ ('\\n'|'\\r'))*
++
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:94: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')
++                  // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:
+                   {
+-                  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;
+                   }
+@@ -1032,15 +856,17 @@
+                 }
+             } while (true);
+-            // Bst.g:90:25: ( '\\r' )?
++
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:94: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'
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:94:25: '\\r'
+                     {
+                     match('\r'); 
+@@ -1049,623 +875,225 @@
+             }
+-            match('\n'); 
+-             _channel=HIDDEN; 
+-
+-            }
++            match('\n');
++            _channel=99;
+-                    if ( token==null && ruleNestingLevel==1 ) {
+-                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+-                    }
++            }
+-                        }
++            state.type = _type;
++            state.channel = _channel;
++        }
+         finally {
+-            ruleNestingLevel--;
++              // do for sure before leaving
+         }
+     }
+-    // $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 )
++        // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\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
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:10: T__25
+                 {
+-                mT25(); 
++                mT__25();
++
+                 }
+                 break;
+             case 2 :
+-                // Bst.g:1:14: T26
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:16: T__26
+                 {
+-                mT26(); 
++                mT__26();
++
+                 }
+                 break;
+             case 3 :
+-                // Bst.g:1:18: T27
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:22: T__27
+                 {
+-                mT27(); 
++                mT__27();
++
+                 }
+                 break;
+             case 4 :
+-                // Bst.g:1:22: T28
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:28: T__28
+                 {
+-                mT28(); 
++                mT__28();
++
+                 }
+                 break;
+             case 5 :
+-                // Bst.g:1:26: T29
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:34: T__29
+                 {
+-                mT29(); 
++                mT__29();
++
+                 }
+                 break;
+             case 6 :
+-                // Bst.g:1:30: T30
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:40: T__30
+                 {
+-                mT30(); 
++                mT__30();
++
+                 }
+                 break;
+             case 7 :
+-                // Bst.g:1:34: T31
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:46: T__31
+                 {
+-                mT31(); 
++                mT__31();
++
+                 }
+                 break;
+             case 8 :
+-                // Bst.g:1:38: T32
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:52: T__32
+                 {
+-                mT32(); 
++                mT__32();
++
+                 }
+                 break;
+             case 9 :
+-                // Bst.g:1:42: T33
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:58: T__33
+                 {
+-                mT33(); 
++                mT__33();
++
+                 }
+                 break;
+             case 10 :
+-                // Bst.g:1:46: STRINGS
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:64: STRINGS
+                 {
+                 mSTRINGS(); 
++
+                 }
+                 break;
+             case 11 :
+-                // Bst.g:1:54: INTEGERS
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:72: INTEGERS
+                 {
+                 mINTEGERS(); 
++
+                 }
+                 break;
+             case 12 :
+-                // Bst.g:1:63: FUNCTION
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:81: FUNCTION
+                 {
+                 mFUNCTION(); 
++
+                 }
+                 break;
+             case 13 :
+-                // Bst.g:1:72: EXECUTE
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:90: EXECUTE
+                 {
+                 mEXECUTE(); 
++
+                 }
+                 break;
+             case 14 :
+-                // Bst.g:1:80: SORT
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:98: SORT
+                 {
+                 mSORT(); 
++
+                 }
+                 break;
+             case 15 :
+-                // Bst.g:1:85: ITERATE
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:103: ITERATE
+                 {
+                 mITERATE(); 
++
+                 }
+                 break;
+             case 16 :
+-                // Bst.g:1:93: REVERSE
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:111: REVERSE
+                 {
+                 mREVERSE(); 
++
+                 }
+                 break;
+             case 17 :
+-                // Bst.g:1:101: ENTRY
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:119: ENTRY
+                 {
+                 mENTRY(); 
++
+                 }
+                 break;
+             case 18 :
+-                // Bst.g:1:107: READ
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:125: READ
+                 {
+                 mREAD(); 
++
+                 }
+                 break;
+             case 19 :
+-                // Bst.g:1:112: MACRO
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:130: MACRO
+                 {
+                 mMACRO(); 
++
+                 }
+                 break;
+             case 20 :
+-                // Bst.g:1:118: QUOTED
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:136: QUOTED
+                 {
+                 mQUOTED(); 
++
+                 }
+                 break;
+             case 21 :
+-                // Bst.g:1:125: IDENTIFIER
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:143: IDENTIFIER
+                 {
+                 mIDENTIFIER(); 
++
+                 }
+                 break;
+             case 22 :
+-                // Bst.g:1:136: STRING
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:154: STRING
+                 {
+                 mSTRING(); 
++
+                 }
+                 break;
+             case 23 :
+-                // Bst.g:1:143: INTEGER
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:161: INTEGER
+                 {
+                 mINTEGER(); 
++
+                 }
+                 break;
+             case 24 :
+-                // Bst.g:1:151: WS
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:169: WS
+                 {
+                 mWS(); 
++
+                 }
+                 break;
+             case 25 :
+-                // Bst.g:1:154: LINE_COMMENT
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:1:172: LINE_COMMENT
+                 {
+                 mLINE_COMMENT(); 
++
+                 }
+                 break;
+@@ -1674,6 +1102,167 @@
+     }
++    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\1\1\2\1\uffff\1\3\1\21\13\uffff\1\4\1\uffff\1\5\1"+
++            "\6\1\7\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\10\1\uffff\1\11",
++            "",
++            "",
++            "",
++            "",
++            "",
++            "",
++            "",
++            "",
++            "",
++            "\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
+--- a/src/java/net/sf/jabref/bst/BstParser.java
++++ b/src/java/net/sf/jabref/bst/BstParser.java
+@@ -1,122 +1,125 @@
+-/*  Copyright (C) 2003-2011 JabRef contributors.
+-    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 of the License, or
+-    (at your option) any later version.
+-
+-    This program is distributed in the hope that it will be useful,
+-    but WITHOUT ANY WARRANTY; without even the implied warranty of
+-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-    GNU General Public License for more details.
+-
+-    You should have received a copy of the GNU General Public License along
+-    with this program; if not, write to the Free Software Foundation, Inc.,
+-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+-*/
++// $ANTLR 3.4 C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g 2012-10-28 23:48:28
++// Generated by ANTLR
+ package net.sf.jabref.bst;
+-// $ANTLR 3.0b5 Bst.g 2006-11-23 23:20:24
+-
+-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;
++import org.antlr.runtime.tree.*;
+-@SuppressWarnings({"unused", "unchecked"})
++
++@SuppressWarnings({"all", "warnings", "unchecked"})
+ 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", "'{'", "'}'", "'<'", "'>'", "'='", "'+'", "'-'", "':='", "'*'"
++        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "COMMANDS", "ENTRY", "EXECUTE", "FUNCTION", "IDENTIFIER", "IDLIST", "INTEGER", "INTEGERS", "ITERATE", "LETTER", "LINE_COMMENT", "MACRO", "NUMERAL", "QUOTED", "READ", "REVERSE", "SORT", "STACK", "STRING", "STRINGS", "WS", "'*'", "'+'", "'-'", "':='", "'<'", "'='", "'>'", "'{'", "'}'"
+     };
+-    public static final int LETTER=21;
+-    public static final int ENTRY=6;
+-    public static final int INTEGERS=9;
+-    public static final int WS=23;
+-    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 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 T__25=25;
++    public static final int T__26=26;
++    public static final int T__27=27;
++    public static final int T__28=28;
++    public static final int T__29=29;
++    public static final int T__30=30;
++    public static final int T__31=31;
++    public static final int T__32=32;
++    public static final int T__33=33;
++    public static final int COMMANDS=4;
++    public static final int ENTRY=5;
++    public static final int EXECUTE=6;
++    public static final int FUNCTION=7;
++    public static final int IDENTIFIER=8;
++    public static final int IDLIST=9;
++    public static final int INTEGER=10;
++    public static final int INTEGERS=11;
++    public static final int ITERATE=12;
++    public static final int LETTER=13;
++    public static final int LINE_COMMENT=14;
++    public static final int MACRO=15;
++    public static final int NUMERAL=16;
++    public static final int QUOTED=17;
++    public static final int READ=18;
++    public static final int REVERSE=19;
++    public static final int SORT=20;
++    public static final int STACK=21;
++    public static final int STRING=22;
++    public static final int STRINGS=23;
++    public static final int WS=24;
++
++    // delegates
++    public Parser[] getDelegates() {
++        return new Parser[] {};
++    }
++
++    // delegators
+-        public BstParser(TokenStream input) {
+-            super(input);
+-        }
+-        
+-    protected TreeAdaptor adaptor = new CommonTreeAdaptor();
+-    public void setTreeAdaptor(TreeAdaptor adaptor) {
+-        this.adaptor = adaptor;
++    public BstParser(TokenStream input) {
++        this(input, new RecognizerSharedState());
+     }
+-    public TreeAdaptor getTreeAdaptor() {
+-        return adaptor;
++    public BstParser(TokenStream input, RecognizerSharedState state) {
++        super(input, state);
+     }
+-    public String[] getTokenNames() { return tokenNames; }
+-    public String getGrammarFileName() { return "Bst.g"; }
++protected TreeAdaptor adaptor = new CommonTreeAdaptor();
++
++public void setTreeAdaptor(TreeAdaptor adaptor) {
++    this.adaptor = adaptor;
++}
++public TreeAdaptor getTreeAdaptor() {
++    return adaptor;
++}
++    public String[] getTokenNames() { return BstParser.tokenNames; }
++    public String getGrammarFileName() { return "C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g"; }
+     public static class program_return extends ParserRuleReturnScope {
+         Object tree;
+         public Object getTree() { return tree; }
+-    }
++    };
++
+-    // $ANTLR start program
+-    // Bst.g:14:1: program : ( commands )+ -> ^( COMMANDS ( commands )+ ) ;
+-    public program_return program() throws RecognitionException {   
+-        program_return retval = new program_return();
++    // $ANTLR start "program"
++    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:22:1: program : ( commands )+ -> ^( COMMANDS ( commands )+ ) ;
++    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:11: ( commands )+
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:22:9: ( ( commands )+ -> ^( COMMANDS ( commands )+ ) )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:22:11: ( commands )+
+             {
+-            // Bst.g:14:11: ( commands )+
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:22:11: ( commands )+
+             int cnt1=0;
+             loop1:
+             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)) ) {
++
++                if ( ((LA1_0 >= ENTRY && LA1_0 <= FUNCTION)||(LA1_0 >= INTEGERS && LA1_0 <= ITERATE)||LA1_0==MACRO||(LA1_0 >= READ && LA1_0 <= SORT)||LA1_0==STRINGS) ) {
+                     alt1=1;
+                 }
+                 switch (alt1) {
+               case 1 :
+-                  // Bst.g:14:11: commands
++                  // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:22:11: commands
+                   {
+-                  pushFollow(FOLLOW_commands_in_program45);
++                  pushFollow(FOLLOW_commands_in_program62);
+                   commands1=commands();
+-                  _fsp--;
+-                  list_commands.add(commands1.tree);
++                  state._fsp--;
++
++                  stream_commands.add(commands1.getTree());
+                   }
+                   break;
+@@ -132,29 +135,33 @@
+             // 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();
+-            // 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);
++            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
+-                // Bst.g:14:35: ( commands )+
++            root_0 = (Object)adaptor.nil();
++            // 22:21: -> ^( COMMANDS ( commands )+ )
++            {
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:22:24: ^( COMMANDS ( 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);
+                 }
+@@ -162,36 +169,45 @@
+             }
++            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);
+-        }
+-        finally {
+-            retval.stop = input.LT(-1);
++      retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+-                retval.tree = adaptor.rulePostProcessing(root_0);
+-                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
++        }
+-       }
++        finally {
++              // do for sure before leaving
++        }
+         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"
++    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:24: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;
+         Token STRINGS2=null;
+@@ -213,27 +229,27 @@
+         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;
+@@ -257,282 +273,355 @@
+         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^^ )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:25: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
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:25:4: STRINGS ^ idList
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
++
++
++                    STRINGS2=(Token)match(input,STRINGS,FOLLOW_STRINGS_in_commands82);
++                    STRINGS2_tree =
++                    (Object)adaptor.create(STRINGS2)
++                    ;
++                    root_0 = (Object)adaptor.becomeRoot(STRINGS2_tree, root_0);
+-                    STRINGS2=input.LT(1);
+-                    match(input,STRINGS,FOLLOW_STRINGS_in_commands65); 
+-                    STRINGS2_tree = adaptor.create(STRINGS2);
+-                    root_0 = adaptor.becomeRoot(STRINGS2_tree, root_0);
+-                    pushFollow(FOLLOW_idList_in_commands68);
++                    pushFollow(FOLLOW_idList_in_commands85);
+                     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
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:26:4: INTEGERS ^ idList
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
++
++
++                    INTEGERS4=(Token)match(input,INTEGERS,FOLLOW_INTEGERS_in_commands90);
++                    INTEGERS4_tree =
++                    (Object)adaptor.create(INTEGERS4)
++                    ;
++                    root_0 = (Object)adaptor.becomeRoot(INTEGERS4_tree, root_0);
+-                    INTEGERS4=input.LT(1);
+-                    match(input,INTEGERS,FOLLOW_INTEGERS_in_commands73); 
+-                    INTEGERS4_tree = adaptor.create(INTEGERS4);
+-                    root_0 = adaptor.becomeRoot(INTEGERS4_tree, root_0);
+-                    pushFollow(FOLLOW_idList_in_commands76);
++                    pushFollow(FOLLOW_idList_in_commands93);
+                     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
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:27: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_commands98);
++                    FUNCTION6_tree =
++                    (Object)adaptor.create(FUNCTION6)
++                    ;
++                    root_0 = (Object)adaptor.becomeRoot(FUNCTION6_tree, root_0);
+-                    pushFollow(FOLLOW_id_in_commands84);
++
++                    pushFollow(FOLLOW_id_in_commands101);
+                     id7=id();
+-                    _fsp--;
+-                    adaptor.addChild(root_0, id7.tree);
+-                    pushFollow(FOLLOW_stack_in_commands86);
++                    state._fsp--;
++
++                    adaptor.addChild(root_0, id7.getTree());
++
++                    pushFollow(FOLLOW_stack_in_commands103);
+                     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 '}'!
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:28: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_commands108);
++                    MACRO9_tree =
++                    (Object)adaptor.create(MACRO9)
++                    ;
++                    root_0 = (Object)adaptor.becomeRoot(MACRO9_tree, root_0);
+-                    pushFollow(FOLLOW_id_in_commands94);
++
++                    pushFollow(FOLLOW_id_in_commands111);
+                     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,32,FOLLOW_32_in_commands113);
++
++                    STRING12=(Token)match(input,STRING,FOLLOW_STRING_in_commands116);
++                    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,33,FOLLOW_33_in_commands118);
+                     }
+                     break;
+                 case 5 :
+-                    // Bst.g:21:4: READ^^
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:29: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_commands124);
++                    READ14_tree =
++                    (Object)adaptor.create(READ14)
++                    ;
++                    root_0 = (Object)adaptor.becomeRoot(READ14_tree, root_0);
+                     }
+                     break;
+                 case 6 :
+-                    // Bst.g:22:4: EXECUTE^^ '{'! function '}'!
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:30:4: EXECUTE ^ '{' ! function '}' !
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
++
++
++                    EXECUTE15=(Token)match(input,EXECUTE,FOLLOW_EXECUTE_in_commands130);
++                    EXECUTE15_tree =
++                    (Object)adaptor.create(EXECUTE15)
++                    ;
++                    root_0 = (Object)adaptor.becomeRoot(EXECUTE15_tree, root_0);
++
++
++                    char_literal16=(Token)match(input,32,FOLLOW_32_in_commands133);
+-                    EXECUTE15=input.LT(1);
+-                    match(input,EXECUTE,FOLLOW_EXECUTE_in_commands113); 
+-                    EXECUTE15_tree = adaptor.create(EXECUTE15);
+-                    root_0 = adaptor.becomeRoot(EXECUTE15_tree, root_0);
+-
+-                    char_literal16=input.LT(1);
+-                    match(input,25,FOLLOW_25_in_commands116); 
+-                    pushFollow(FOLLOW_function_in_commands119);
++                    pushFollow(FOLLOW_function_in_commands136);
+                     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,33,FOLLOW_33_in_commands138);
+                     }
+                     break;
+                 case 7 :
+-                    // Bst.g:23:4: ITERATE^^ '{'! function '}'!
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:31:4: ITERATE ^ '{' ! function '}' !
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
++
++
++                    ITERATE19=(Token)match(input,ITERATE,FOLLOW_ITERATE_in_commands144);
++                    ITERATE19_tree =
++                    (Object)adaptor.create(ITERATE19)
++                    ;
++                    root_0 = (Object)adaptor.becomeRoot(ITERATE19_tree, root_0);
++
++
++                    char_literal20=(Token)match(input,32,FOLLOW_32_in_commands147);
+-                    ITERATE19=input.LT(1);
+-                    match(input,ITERATE,FOLLOW_ITERATE_in_commands127); 
+-                    ITERATE19_tree = adaptor.create(ITERATE19);
+-                    root_0 = adaptor.becomeRoot(ITERATE19_tree, root_0);
+-
+-                    char_literal20=input.LT(1);
+-                    match(input,25,FOLLOW_25_in_commands130); 
+-                    pushFollow(FOLLOW_function_in_commands133);
++                    pushFollow(FOLLOW_function_in_commands150);
+                     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,33,FOLLOW_33_in_commands152);
+                     }
+                     break;
+                 case 8 :
+-                    // Bst.g:24:4: REVERSE^^ '{'! function '}'!
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:32:4: REVERSE ^ '{' ! function '}' !
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
++
++
++                    REVERSE23=(Token)match(input,REVERSE,FOLLOW_REVERSE_in_commands158);
++                    REVERSE23_tree =
++                    (Object)adaptor.create(REVERSE23)
++                    ;
++                    root_0 = (Object)adaptor.becomeRoot(REVERSE23_tree, root_0);
++
+-                    REVERSE23=input.LT(1);
+-                    match(input,REVERSE,FOLLOW_REVERSE_in_commands141); 
+-                    REVERSE23_tree = adaptor.create(REVERSE23);
+-                    root_0 = adaptor.becomeRoot(REVERSE23_tree, root_0);
+-
+-                    char_literal24=input.LT(1);
+-                    match(input,25,FOLLOW_25_in_commands144); 
+-                    pushFollow(FOLLOW_function_in_commands147);
++                    char_literal24=(Token)match(input,32,FOLLOW_32_in_commands161);
++
++                    pushFollow(FOLLOW_function_in_commands164);
+                     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,33,FOLLOW_33_in_commands166);
+                     }
+                     break;
+                 case 9 :
+-                    // Bst.g:25:4: ENTRY^^ idList0 idList0 idList0
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:33:4: ENTRY ^ idList0 idList0 idList0
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
++
++
++                    ENTRY27=(Token)match(input,ENTRY,FOLLOW_ENTRY_in_commands172);
++                    ENTRY27_tree =
++                    (Object)adaptor.create(ENTRY27)
++                    ;
++                    root_0 = (Object)adaptor.becomeRoot(ENTRY27_tree, root_0);
+-                    ENTRY27=input.LT(1);
+-                    match(input,ENTRY,FOLLOW_ENTRY_in_commands155); 
+-                    ENTRY27_tree = adaptor.create(ENTRY27);
+-                    root_0 = adaptor.becomeRoot(ENTRY27_tree, root_0);
+-                    pushFollow(FOLLOW_idList0_in_commands158);
++                    pushFollow(FOLLOW_idList0_in_commands175);
+                     idList028=idList0();
+-                    _fsp--;
+-                    adaptor.addChild(root_0, idList028.tree);
+-                    pushFollow(FOLLOW_idList0_in_commands160);
++                    state._fsp--;
++
++                    adaptor.addChild(root_0, idList028.getTree());
++
++                    pushFollow(FOLLOW_idList0_in_commands177);
+                     idList029=idList0();
+-                    _fsp--;
+-                    adaptor.addChild(root_0, idList029.tree);
+-                    pushFollow(FOLLOW_idList0_in_commands162);
++                    state._fsp--;
++
++                    adaptor.addChild(root_0, idList029.getTree());
++
++                    pushFollow(FOLLOW_idList0_in_commands179);
+                     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^^
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:34: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_commands184);
++                    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);
+-        }
+-        finally {
+-            retval.stop = input.LT(-1);
++      retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+-                retval.tree = adaptor.rulePostProcessing(root_0);
+-                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
++        }
+-       }
++        finally {
++              // do for sure before leaving
++        }
+         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
+-    // Bst.g:28:1: identifier : IDENTIFIER ;
+-    public identifier_return identifier() throws RecognitionException {   
+-        identifier_return retval = new identifier_return();
++    // $ANTLR start "identifier"
++    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:36:1: identifier : IDENTIFIER ;
++    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;
+         Token IDENTIFIER32=null;
+@@ -540,128 +629,148 @@
+         Object IDENTIFIER32_tree=null;
+         try {
+-            // Bst.g:29:4: ( IDENTIFIER )
+-            // Bst.g:29:4: IDENTIFIER
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:37:2: ( IDENTIFIER )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:37: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_identifier195);
++            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);
+-        }
+-        finally {
+-            retval.stop = input.LT(-1);
++      retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+-                retval.tree = adaptor.rulePostProcessing(root_0);
+-                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
++        }
+-       }
++        finally {
++              // do for sure before leaving
++        }
+         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"
++    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:39: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 '}'!
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:40:2: ( '{' ! identifier '}' !)
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:40:4: '{' ! identifier '}' !
+             {
+-            root_0 = adaptor.nil();
++            root_0 = (Object)adaptor.nil();
++
+-            char_literal33=input.LT(1);
+-            match(input,25,FOLLOW_25_in_id188); 
+-            pushFollow(FOLLOW_identifier_in_id191);
++            char_literal33=(Token)match(input,32,FOLLOW_32_in_id205);
++
++            pushFollow(FOLLOW_identifier_in_id208);
+             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,33,FOLLOW_33_in_id210);
+             }
++            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);
+-        }
+-        finally {
+-            retval.stop = input.LT(-1);
++      retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+-                retval.tree = adaptor.rulePostProcessing(root_0);
+-                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
++        }
+-       }
++        finally {
++              // do for sure before leaving
++        }
+         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
+-    // Bst.g:34:1: idList : '{' ( identifier )+ '}' -> ^( IDLIST ( identifier )+ ) ;
+-    
+-      public idList_return idList() throws RecognitionException {   
+-        idList_return retval = new idList_return();
++    // $ANTLR start "idList"
++    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:42:1: idList : '{' ( identifier )+ '}' -> ^( IDLIST ( identifier )+ ) ;
++    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_32=new RewriteRuleTokenStream(adaptor,"token 32");
++        RewriteRuleTokenStream stream_33=new RewriteRuleTokenStream(adaptor,"token 33");
++        RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
+         try {
+-            // Bst.g:35:4: ( '{' ( identifier )+ '}' -> ^( IDLIST ( identifier )+ ) )
+-            // Bst.g:35:4: '{' ( identifier )+ '}'
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:43:2: ( '{' ( identifier )+ '}' -> ^( IDLIST ( identifier )+ ) )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:43:4: '{' ( identifier )+ '}'
+             {
+-            char_literal36=input.LT(1);
+-            match(input,25,FOLLOW_25_in_idList205); 
+-            list_25.add(char_literal36);
++            char_literal36=(Token)match(input,32,FOLLOW_32_in_idList222);
++            stream_32.add(char_literal36);
+-            // Bst.g:35:8: ( identifier )+
++
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:43:8: ( identifier )+
+             int cnt3=0;
+             loop3:
+             do {
+                 int alt3=2;
+                 int LA3_0 = input.LA(1);
++
+                 if ( (LA3_0==IDENTIFIER) ) {
+                     alt3=1;
+                 }
+@@ -669,13 +778,14 @@
+                 switch (alt3) {
+               case 1 :
+-                  // Bst.g:35:8: identifier
++                  // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:43:8: identifier
+                   {
+-                  pushFollow(FOLLOW_identifier_in_idList207);
++                  pushFollow(FOLLOW_identifier_in_idList224);
+                   identifier37=identifier();
+-                  _fsp--;
+-                  list_identifier.add(identifier37.tree);
++                  state._fsp--;
++
++                  stream_identifier.add(identifier37.getTree());
+                   }
+                   break;
+@@ -689,34 +799,39 @@
+                 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,33,FOLLOW_33_in_idList227);
++            stream_33.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();
+-            // 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);
++            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
+-                // Bst.g:35:36: ( identifier )+
++            root_0 = (Object)adaptor.nil();
++            // 43:24: -> ^( IDLIST ( identifier )+ )
++            {
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:43:27: ^( IDLIST ( 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);
+                 }
+@@ -724,61 +839,71 @@
+             }
++            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);
+-        }
+-        finally {
+-            retval.stop = input.LT(-1);
++      retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+-                retval.tree = adaptor.rulePostProcessing(root_0);
+-                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
++        }
+-       }
++        finally {
++              // do for sure before leaving
++        }
+         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
+-    // Bst.g:37:1: idList0 : '{' ( identifier )* '}' -> ^( IDLIST ( identifier )* ) ;
+-    public idList0_return idList0() throws RecognitionException {   
+-        idList0_return retval = new idList0_return();
++    // $ANTLR start "idList0"
++    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:45:1: idList0 : '{' ( identifier )* '}' -> ^( IDLIST ( identifier )* ) ;
++    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_32=new RewriteRuleTokenStream(adaptor,"token 32");
++        RewriteRuleTokenStream stream_33=new RewriteRuleTokenStream(adaptor,"token 33");
++        RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
+         try {
+-            // Bst.g:38:4: ( '{' ( identifier )* '}' -> ^( IDLIST ( identifier )* ) )
+-            // Bst.g:38:4: '{' ( identifier )* '}'
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:46:2: ( '{' ( identifier )* '}' -> ^( IDLIST ( identifier )* ) )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:46:4: '{' ( identifier )* '}'
+             {
+-            char_literal39=input.LT(1);
+-            match(input,25,FOLLOW_25_in_idList0230); 
+-            list_25.add(char_literal39);
++            char_literal39=(Token)match(input,32,FOLLOW_32_in_idList0247);
++            stream_32.add(char_literal39);
+-            // Bst.g:38:8: ( identifier )*
++
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:46:8: ( identifier )*
+             loop4:
+             do {
+                 int alt4=2;
+                 int LA4_0 = input.LA(1);
++
+                 if ( (LA4_0==IDENTIFIER) ) {
+                     alt4=1;
+                 }
+@@ -786,13 +911,14 @@
+                 switch (alt4) {
+               case 1 :
+-                  // Bst.g:38:8: identifier
++                  // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:46:8: identifier
+                   {
+-                  pushFollow(FOLLOW_identifier_in_idList0232);
++                  pushFollow(FOLLOW_identifier_in_idList0249);
+                   identifier40=identifier();
+-                  _fsp--;
+-                  list_identifier.add(identifier40.tree);
++                  state._fsp--;
++
++                  stream_identifier.add(identifier40.getTree());
+                   }
+                   break;
+@@ -802,33 +928,37 @@
+                 }
+             } while (true);
+-            char_literal41=input.LT(1);
+-            match(input,26,FOLLOW_26_in_idList0235); 
+-            list_26.add(char_literal41);
++
++            char_literal41=(Token)match(input,33,FOLLOW_33_in_idList0252);
++            stream_33.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();
+-            // 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);
++            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
+-                // Bst.g:38:36: ( identifier )*
++            root_0 = (Object)adaptor.nil();
++            // 46:24: -> ^( IDLIST ( identifier )* )
++            {
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:46:27: ^( IDLIST ( identifier )* )
+                 {
+-                int n_1 = list_identifier == null ? 0 : list_identifier.size();
+-                 
+-
++                Object root_1 = (Object)adaptor.nil();
++                root_1 = (Object)adaptor.becomeRoot(
++                (Object)adaptor.create(IDLIST, "IDLIST")
++                , root_1);
++
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:46:36: ( identifier )*
++                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);
+                 }
+@@ -836,36 +966,45 @@
+             }
++            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);
+-        }
+-        finally {
+-            retval.stop = input.LT(-1);
++      retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+-                retval.tree = adaptor.rulePostProcessing(root_0);
+-                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
++        }
+-       }
++        finally {
++              // do for sure before leaving
++        }
+         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
+-    // Bst.g:40:1: function : ( '<' | '>' | '=' | '+' | '-' | ':=' | '*' | identifier );
+-    public function_return function() throws RecognitionException {   
+-        function_return retval = new function_return();
++    // $ANTLR start "function"
++    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:48:1: function : ( '<' | '>' | '=' | '+' | '-' | ':=' | '*' | identifier );
++    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;
+         Token char_literal42=null;
+@@ -875,7 +1014,7 @@
+         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;
+@@ -887,214 +1026,257 @@
+         Object char_literal48_tree=null;
+         try {
+-            // Bst.g:41:4: ( '<' | '>' | '=' | '+' | '-' | ':=' | '*' | identifier )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:49:2: ( '<' | '>' | '=' | '+' | '-' | ':=' | '*' | identifier )
+             int alt5=8;
+             switch ( input.LA(1) ) {
+-            case 27:
++            case 29:
++                {
+                 alt5=1;
++                }
+                 break;
+-            case 28:
++            case 31:
++                {
+                 alt5=2;
++                }
+                 break;
+-            case 29:
++            case 30:
++                {
+                 alt5=3;
++                }
+                 break;
+-            case 30:
++            case 26:
++                {
+                 alt5=4;
++                }
+                 break;
+-            case 31:
++            case 27:
++                {
+                 alt5=5;
++                }
+                 break;
+-            case 32:
++            case 28:
++                {
+                 alt5=6;
++                }
+                 break;
+-            case 33:
++            case 25:
++                {
+                 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;
++
+             }
+             switch (alt5) {
+                 case 1 :
+-                    // Bst.g:41:4: '<'
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:49: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,29,FOLLOW_29_in_function271);
++                    char_literal42_tree =
++                    (Object)adaptor.create(char_literal42)
++                    ;
+                     adaptor.addChild(root_0, char_literal42_tree);
+                     }
+                     break;
+                 case 2 :
+-                    // Bst.g:41:10: '>'
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:49: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,31,FOLLOW_31_in_function275);
++                    char_literal43_tree =
++                    (Object)adaptor.create(char_literal43)
++                    ;
+                     adaptor.addChild(root_0, char_literal43_tree);
+                     }
+                     break;
+                 case 3 :
+-                    // Bst.g:41:16: '='
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:49: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,30,FOLLOW_30_in_function279);
++                    char_literal44_tree =
++                    (Object)adaptor.create(char_literal44)
++                    ;
+                     adaptor.addChild(root_0, char_literal44_tree);
+                     }
+                     break;
+                 case 4 :
+-                    // Bst.g:41:22: '+'
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:49: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,26,FOLLOW_26_in_function283);
++                    char_literal45_tree =
++                    (Object)adaptor.create(char_literal45)
++                    ;
+                     adaptor.addChild(root_0, char_literal45_tree);
+                     }
+                     break;
+                 case 5 :
+-                    // Bst.g:41:28: '-'
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:49: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,27,FOLLOW_27_in_function287);
++                    char_literal46_tree =
++                    (Object)adaptor.create(char_literal46)
++                    ;
+                     adaptor.addChild(root_0, char_literal46_tree);
+                     }
+                     break;
+                 case 6 :
+-                    // Bst.g:41:34: ':='
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:49: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,28,FOLLOW_28_in_function291);
++                    string_literal47_tree =
++                    (Object)adaptor.create(string_literal47)
++                    ;
+                     adaptor.addChild(root_0, string_literal47_tree);
+                     }
+                     break;
+                 case 7 :
+-                    // Bst.g:41:41: '*'
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:49: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,25,FOLLOW_25_in_function295);
++                    char_literal48_tree =
++                    (Object)adaptor.create(char_literal48)
++                    ;
+                     adaptor.addChild(root_0, char_literal48_tree);
+                     }
+                     break;
+                 case 8 :
+-                    // Bst.g:41:47: identifier
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:49:47: identifier
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
++
+-                    pushFollow(FOLLOW_identifier_in_function282);
++                    pushFollow(FOLLOW_identifier_in_function299);
+                     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);
+-        }
+-        finally {
+-            retval.stop = input.LT(-1);
++      retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+-                retval.tree = adaptor.rulePostProcessing(root_0);
+-                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
++        }
+-       }
++        finally {
++              // do for sure before leaving
++        }
+         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
+-    // Bst.g:43:1: stack : '{' ( stackitem )+ '}' -> ^( STACK ( stackitem )+ ) ;
+-    public stack_return stack() throws RecognitionException {   
+-        stack_return retval = new stack_return();
++    // $ANTLR start "stack"
++    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:51:1: stack : '{' ( stackitem )+ '}' -> ^( STACK ( stackitem )+ ) ;
++    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_32=new RewriteRuleTokenStream(adaptor,"token 32");
++        RewriteRuleTokenStream stream_33=new RewriteRuleTokenStream(adaptor,"token 33");
++        RewriteRuleSubtreeStream stream_stackitem=new RewriteRuleSubtreeStream(adaptor,"rule stackitem");
+         try {
+-            // Bst.g:44:4: ( '{' ( stackitem )+ '}' -> ^( STACK ( stackitem )+ ) )
+-            // Bst.g:44:4: '{' ( stackitem )+ '}'
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:52:2: ( '{' ( stackitem )+ '}' -> ^( STACK ( stackitem )+ ) )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:52:4: '{' ( stackitem )+ '}'
+             {
+-            char_literal50=input.LT(1);
+-            match(input,25,FOLLOW_25_in_stack293); 
+-            list_25.add(char_literal50);
++            char_literal50=(Token)match(input,32,FOLLOW_32_in_stack310);
++            stream_32.add(char_literal50);
+-            // Bst.g:44:8: ( stackitem )+
++
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:52:8: ( stackitem )+
+             int cnt6=0;
+             loop6:
+             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)) ) {
++
++                if ( (LA6_0==IDENTIFIER||LA6_0==INTEGER||LA6_0==QUOTED||LA6_0==STRING||(LA6_0 >= 25 && LA6_0 <= 32)) ) {
+                     alt6=1;
+                 }
+                 switch (alt6) {
+               case 1 :
+-                  // Bst.g:44:8: stackitem
++                  // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:52:8: stackitem
+                   {
+-                  pushFollow(FOLLOW_stackitem_in_stack295);
++                  pushFollow(FOLLOW_stackitem_in_stack312);
+                   stackitem51=stackitem();
+-                  _fsp--;
+-                  list_stackitem.add(stackitem51.tree);
++                  state._fsp--;
++
++                  stream_stackitem.add(stackitem51.getTree());
+                   }
+                   break;
+@@ -1108,34 +1290,39 @@
+                 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,33,FOLLOW_33_in_stack315);
++            stream_33.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();
+-            // 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);
++            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
+-                // Bst.g:44:34: ( stackitem )+
++            root_0 = (Object)adaptor.nil();
++            // 52:23: -> ^( STACK ( stackitem )+ )
++            {
++                // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:52:26: ^( STACK ( 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);
+                 }
+@@ -1143,44 +1330,53 @@
+             }
++            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);
+-        }
+-        finally {
+-            retval.stop = input.LT(-1);
++      retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+-                retval.tree = adaptor.rulePostProcessing(root_0);
+-                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
++        }
+-       }
++        finally {
++              // do for sure before leaving
++        }
+         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
+-    // Bst.g:46:1: stackitem : ( function | STRING | INTEGER | QUOTED | stack );
+-    public stackitem_return stackitem() throws RecognitionException {   
+-        stackitem_return retval = new stackitem_return();
++    // $ANTLR start "stackitem"
++    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:54:1: stackitem : ( function | STRING | INTEGER | QUOTED | stack );
++    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;
+         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;
+@@ -1188,181 +1384,209 @@
+         Object QUOTED56_tree=null;
+         try {
+-            // Bst.g:47:4: ( function | STRING | INTEGER | QUOTED | stack )
++            // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:55:2: ( function | STRING | INTEGER | QUOTED | stack )
+             int alt7=5;
+             switch ( input.LA(1) ) {
+             case IDENTIFIER:
++            case 25:
++            case 26:
+             case 27:
+             case 28:
+             case 29:
+             case 30:
+             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:
++            case 32:
++                {
+                 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;
++
+             }
+             switch (alt7) {
+                 case 1 :
+-                    // Bst.g:47:4: function
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:55:4: function
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
++
+-                    pushFollow(FOLLOW_function_in_stackitem317);
++                    pushFollow(FOLLOW_function_in_stackitem334);
+                     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
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:56: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_stackitem339);
++                    STRING54_tree =
++                    (Object)adaptor.create(STRING54)
++                    ;
+                     adaptor.addChild(root_0, STRING54_tree);
+                     }
+                     break;
+                 case 3 :
+-                    // Bst.g:49:4: INTEGER
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:57: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_stackitem345);
++                    INTEGER55_tree =
++                    (Object)adaptor.create(INTEGER55)
++                    ;
+                     adaptor.addChild(root_0, INTEGER55_tree);
+                     }
+                     break;
+                 case 4 :
+-                    // Bst.g:50:4: QUOTED
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:58: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_stackitem351);
++                    QUOTED56_tree =
++                    (Object)adaptor.create(QUOTED56)
++                    ;
+                     adaptor.addChild(root_0, QUOTED56_tree);
+                     }
+                     break;
+                 case 5 :
+-                    // Bst.g:51:4: stack
++                    // C:\\git-repos\\jabref\\jabref\\src\\java\\net\\sf\\jabref\\bst\\Bst.g:59:4: stack
+                     {
+-                    root_0 = adaptor.nil();
++                    root_0 = (Object)adaptor.nil();
++
+-                    pushFollow(FOLLOW_stack_in_stackitem339);
++                    pushFollow(FOLLOW_stack_in_stackitem356);
+                     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);
+-        }
+-        finally {
+-            retval.stop = input.LT(-1);
++      retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+-                retval.tree = adaptor.rulePostProcessing(root_0);
+-                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
++        }
+-       }
++        finally {
++              // do for sure before leaving
++        }
+         return retval;
+     }
+-    // $ANTLR end stackitem
++    // $ANTLR end "stackitem"
++
++    // Delegated rules
+  
+-    public static final BitSet FOLLOW_commands_in_program45 = new BitSet(new long[]{0x000000000003EF42L});
+-    public static final BitSet FOLLOW_STRINGS_in_commands65 = new BitSet(new long[]{0x0000000002000000L});
+-    public static final BitSet FOLLOW_idList_in_commands68 = new BitSet(new long[]{0x0000000000000002L});
+-    public static final BitSet FOLLOW_INTEGERS_in_commands73 = new BitSet(new long[]{0x0000000002000000L});
+-    public static final BitSet FOLLOW_idList_in_commands76 = new BitSet(new long[]{0x0000000000000002L});
+-    public static final BitSet FOLLOW_FUNCTION_in_commands81 = new BitSet(new long[]{0x0000000002000000L});
+-    public static final BitSet FOLLOW_id_in_commands84 = new BitSet(new long[]{0x0000000002000000L});
+-    public static final BitSet FOLLOW_stack_in_commands86 = new BitSet(new long[]{0x0000000000000002L});
+-    public static final BitSet FOLLOW_MACRO_in_commands91 = new BitSet(new long[]{0x0000000002000000L});
+-    public static final BitSet FOLLOW_id_in_commands94 = new BitSet(new long[]{0x0000000002000000L});
+-    public static final BitSet FOLLOW_25_in_commands96 = new BitSet(new long[]{0x0000000000001000L});
+-    public static final BitSet FOLLOW_STRING_in_commands99 = new BitSet(new long[]{0x0000000004000000L});
+-    public static final BitSet FOLLOW_26_in_commands101 = new BitSet(new long[]{0x0000000000000002L});
+-    public static final BitSet FOLLOW_READ_in_commands107 = new BitSet(new long[]{0x0000000000000002L});
+-    public static final BitSet FOLLOW_EXECUTE_in_commands113 = new BitSet(new long[]{0x0000000002000000L});
+-    public static final BitSet FOLLOW_25_in_commands116 = new BitSet(new long[]{0x00000003F8040000L});
+-    public static final BitSet FOLLOW_function_in_commands119 = new BitSet(new long[]{0x0000000004000000L});
+-    public static final BitSet FOLLOW_26_in_commands121 = new BitSet(new long[]{0x0000000000000002L});
+-    public static final BitSet FOLLOW_ITERATE_in_commands127 = new BitSet(new long[]{0x0000000002000000L});
+-    public static final BitSet FOLLOW_25_in_commands130 = new BitSet(new long[]{0x00000003F8040000L});
+-    public static final BitSet FOLLOW_function_in_commands133 = new BitSet(new long[]{0x0000000004000000L});
+-    public static final BitSet FOLLOW_26_in_commands135 = new BitSet(new long[]{0x0000000000000002L});
+-    public static final BitSet FOLLOW_REVERSE_in_commands141 = new BitSet(new long[]{0x0000000002000000L});
+-    public static final BitSet FOLLOW_25_in_commands144 = new BitSet(new long[]{0x00000003F8040000L});
+-    public static final BitSet FOLLOW_function_in_commands147 = new BitSet(new long[]{0x0000000004000000L});
+-    public static final BitSet FOLLOW_26_in_commands149 = new BitSet(new long[]{0x0000000000000002L});
+-    public static final BitSet FOLLOW_ENTRY_in_commands155 = new BitSet(new long[]{0x0000000002000000L});
+-    public static final BitSet FOLLOW_idList0_in_commands158 = new BitSet(new long[]{0x0000000002000000L});
+-    public static final BitSet FOLLOW_idList0_in_commands160 = new BitSet(new long[]{0x0000000002000000L});
+-    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_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_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_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});
+-    public static final BitSet FOLLOW_29_in_function262 = new BitSet(new long[]{0x0000000000000002L});
+-    public static final BitSet FOLLOW_30_in_function266 = new BitSet(new long[]{0x0000000000000002L});
+-    public static final BitSet FOLLOW_31_in_function270 = new BitSet(new long[]{0x0000000000000002L});
+-    public static final BitSet FOLLOW_32_in_function274 = new BitSet(new long[]{0x0000000000000002L});
+-    public static final BitSet FOLLOW_33_in_function278 = new BitSet(new long[]{0x0000000000000002L});
+-    public static final BitSet FOLLOW_identifier_in_function282 = new BitSet(new long[]{0x0000000000000002L});
+-    public static final BitSet FOLLOW_25_in_stack293 = new BitSet(new long[]{0x00000003FA1C1000L});
+-    public static final BitSet FOLLOW_stackitem_in_stack295 = new BitSet(new long[]{0x00000003FE1C1000L});
+-    public static final BitSet FOLLOW_26_in_stack298 = new BitSet(new long[]{0x0000000000000002L});
+-    public static final BitSet FOLLOW_function_in_stackitem317 = new BitSet(new long[]{0x0000000000000002L});
+-    public static final BitSet FOLLOW_STRING_in_stackitem322 = new BitSet(new long[]{0x0000000000000002L});
+-    public static final BitSet FOLLOW_INTEGER_in_stackitem328 = new BitSet(new long[]{0x0000000000000002L});
+-    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});
++    public static final BitSet FOLLOW_commands_in_program62 = new BitSet(new long[]{0x00000000009C98E2L});
++    public static final BitSet FOLLOW_STRINGS_in_commands82 = new BitSet(new long[]{0x0000000100000000L});
++    public static final BitSet FOLLOW_idList_in_commands85 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_INTEGERS_in_commands90 = new BitSet(new long[]{0x0000000100000000L});
++    public static final BitSet FOLLOW_idList_in_commands93 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_FUNCTION_in_commands98 = new BitSet(new long[]{0x0000000100000000L});
++    public static final BitSet FOLLOW_id_in_commands101 = new BitSet(new long[]{0x0000000100000000L});
++    public static final BitSet FOLLOW_stack_in_commands103 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_MACRO_in_commands108 = new BitSet(new long[]{0x0000000100000000L});
++    public static final BitSet FOLLOW_id_in_commands111 = new BitSet(new long[]{0x0000000100000000L});
++    public static final BitSet FOLLOW_32_in_commands113 = new BitSet(new long[]{0x0000000000400000L});
++    public static final BitSet FOLLOW_STRING_in_commands116 = new BitSet(new long[]{0x0000000200000000L});
++    public static final BitSet FOLLOW_33_in_commands118 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_READ_in_commands124 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_EXECUTE_in_commands130 = new BitSet(new long[]{0x0000000100000000L});
++    public static final BitSet FOLLOW_32_in_commands133 = new BitSet(new long[]{0x00000000FE000100L});
++    public static final BitSet FOLLOW_function_in_commands136 = new BitSet(new long[]{0x0000000200000000L});
++    public static final BitSet FOLLOW_33_in_commands138 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_ITERATE_in_commands144 = new BitSet(new long[]{0x0000000100000000L});
++    public static final BitSet FOLLOW_32_in_commands147 = new BitSet(new long[]{0x00000000FE000100L});
++    public static final BitSet FOLLOW_function_in_commands150 = new BitSet(new long[]{0x0000000200000000L});
++    public static final BitSet FOLLOW_33_in_commands152 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_REVERSE_in_commands158 = new BitSet(new long[]{0x0000000100000000L});
++    public static final BitSet FOLLOW_32_in_commands161 = new BitSet(new long[]{0x00000000FE000100L});
++    public static final BitSet FOLLOW_function_in_commands164 = new BitSet(new long[]{0x0000000200000000L});
++    public static final BitSet FOLLOW_33_in_commands166 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_ENTRY_in_commands172 = new BitSet(new long[]{0x0000000100000000L});
++    public static final BitSet FOLLOW_idList0_in_commands175 = new BitSet(new long[]{0x0000000100000000L});
++    public static final BitSet FOLLOW_idList0_in_commands177 = new BitSet(new long[]{0x0000000100000000L});
++    public static final BitSet FOLLOW_idList0_in_commands179 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_SORT_in_commands184 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_IDENTIFIER_in_identifier195 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_32_in_id205 = new BitSet(new long[]{0x0000000000000100L});
++    public static final BitSet FOLLOW_identifier_in_id208 = new BitSet(new long[]{0x0000000200000000L});
++    public static final BitSet FOLLOW_33_in_id210 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_32_in_idList222 = new BitSet(new long[]{0x0000000000000100L});
++    public static final BitSet FOLLOW_identifier_in_idList224 = new BitSet(new long[]{0x0000000200000100L});
++    public static final BitSet FOLLOW_33_in_idList227 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_32_in_idList0247 = new BitSet(new long[]{0x0000000200000100L});
++    public static final BitSet FOLLOW_identifier_in_idList0249 = new BitSet(new long[]{0x0000000200000100L});
++    public static final BitSet FOLLOW_33_in_idList0252 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_29_in_function271 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_31_in_function275 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_30_in_function279 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_26_in_function283 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_27_in_function287 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_28_in_function291 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_25_in_function295 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_identifier_in_function299 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_32_in_stack310 = new BitSet(new long[]{0x00000001FE420500L});
++    public static final BitSet FOLLOW_stackitem_in_stack312 = new BitSet(new long[]{0x00000003FE420500L});
++    public static final BitSet FOLLOW_33_in_stack315 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_function_in_stackitem334 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_STRING_in_stackitem339 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_INTEGER_in_stackitem345 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_QUOTED_in_stackitem351 = new BitSet(new long[]{0x0000000000000002L});
++    public static final BitSet FOLLOW_stack_in_stackitem356 = new BitSet(new long[]{0x0000000000000002L});
+-}
++}
+\ No newline at end of file
index a9d094f..03dfcea 100644 (file)
@@ -1,2 +1,3 @@
 02_libs.patch
 mrDlib.patch
+0001-Updates-BstLexer-and-BstParser-based-on-an-ANTLR-run.patch