refresh patch format/headers
authorgregor herrmann <gregoa@debian.org>
Tue, 3 Aug 2010 16:57:25 +0000 (16:57 -0000)
committergregor herrmann <gregoa@debian.org>
Tue, 3 Aug 2010 16:57:25 +0000 (16:57 -0000)
debian/patches/05_antlr32.patch

index db4a29e..c9bb3bb 100644 (file)
@@ -1,18 +1,24 @@
-Index: BstParser.java
+Description: include new BstParser/Lexer classes generated by antlr 3.2
+Origin: vendor
+Bug: http://bugs.debian.org/591124
+Forwarded: not-yet
+Author: tony mancill <tmancill@debian.org>
+Last-Update: 2010-08-03
+
 ===================================================================
---- a/src/java/net/sf/jabref/bst/BstParser.java        (revision 2214)
-+++ b/src/java/net/sf/jabref/bst/BstParser.java        (working copy)
-@@ -1,52 +1,62 @@
+--- a/src/java/net/sf/jabref/bst/BstParser.java
++++ b/src/java/net/sf/jabref/bst/BstParser.java
+@@ -1,51 +1,61 @@
  package net.sf.jabref.bst;
  
 -// $ANTLR 3.0b5 Bst.g 2006-11-23 23:20:24
 +// $ANTLR 3.2 debian-4 Bst.g 2010-08-02 19:59:10
  
+-import java.util.ArrayList;
 +import org.antlr.runtime.*;
 +import java.util.Stack;
-+import java.util.List;
- import java.util.ArrayList;
--import java.util.List;
+ import java.util.List;
++import java.util.ArrayList;
  
 -import org.antlr.runtime.BitSet;
 -import org.antlr.runtime.EarlyExitException;
@@ -59,41 +65,40 @@ Index: BstParser.java
 -    public static final int EXECUTE=14;
 -    public static final int LINE_COMMENT=24;
 -    public static final int SORT=17;
-+    public static final int READ=13;
-+    public static final int IDENTIFIER=18;
-+    public static final int IDLIST=4;
-+    public static final int NUMERAL=22;
-     public static final int STACK=5;
-     public static final int REVERSE=16;
+-    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 IDENTIFIER=18;
+-    public static final int MACRO=11;
+     public static final int IDLIST=4;
+     public static final int NUMERAL=22;
 -    public static final int READ=13;
++    public static final int STACK=5;
++    public static final int REVERSE=16;
++    public static final int MACRO=11;
 +    public static final int STRING=12;
++
 +    // delegates
 +    // delegators
 +
-+
          public BstParser(TokenStream input) {
 -            super(input);
 +            this(input, new RecognizerSharedState());
-         }
++        }
 +        public BstParser(TokenStream input, RecognizerSharedState state) {
 +            super(input, state);
-+             
-+        }
++
+         }
          
      protected TreeAdaptor adaptor = new CommonTreeAdaptor();
-@@ -57,29 +67,29 @@
+@@ -57,29 +67,29 @@ public class BstParser extends Parser {
          return adaptor;
      }
  
@@ -131,7 +136,7 @@ Index: BstParser.java
              // Bst.g:14:11: ( commands )+
              {
              // Bst.g:14:11: ( commands )+
-@@ -88,6 +98,7 @@
+@@ -88,6 +98,7 @@ public class BstParser extends Parser {
              do {
                  int alt1=2;
                  int LA1_0 = input.LA(1);
@@ -139,7 +144,7 @@ Index: BstParser.java
                  if ( (LA1_0==ENTRY||(LA1_0>=STRINGS && LA1_0<=MACRO)||(LA1_0>=READ && LA1_0<=SORT)) ) {
                      alt1=1;
                  }
-@@ -99,10 +110,11 @@
+@@ -99,9 +110,10 @@ public class BstParser extends Parser {
                    {
                    pushFollow(FOLLOW_commands_in_program45);
                    commands1=commands();
@@ -147,13 +152,12 @@ Index: BstParser.java
  
 -                  list_commands.add(commands1.tree);
 +                  state._fsp--;
-+                  stream_commands.add(commands1.getTree());
 +
++                  stream_commands.add(commands1.getTree());
                    }
                    break;
-@@ -116,65 +128,69 @@
+@@ -116,65 +128,69 @@ public class BstParser extends Parser {
              } while (true);
  
  
@@ -162,11 +166,11 @@ Index: BstParser.java
 -            
 -                      int i_0 = 0;
 +            // elements: commands
-+            // token labels: 
++            // token labels:
 +            // rule labels: retval
-+            // token list labels: 
-+            // rule list labels: 
-+            // wildcard labels: 
++            // token list labels:
++            // rule list labels:
++            // wildcard labels:
              retval.tree = root_0;
 -            root_0 = adaptor.nil();
 +            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
@@ -178,26 +182,26 @@ Index: BstParser.java
                  {
 -                Object root_1 = adaptor.nil();
 -                root_1 = adaptor.becomeRoot(adaptor.create(COMMANDS, "COMMANDS"), root_1);
-+                Object root_1 = (Object)adaptor.nil();
-+                root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(COMMANDS, "COMMANDS"), root_1);
+-
 -                // Bst.g:14:35: ( commands )+
 -                {
 -                int n_1 = list_commands == null ? 0 : list_commands.size();
 -                 
-+                if ( !(stream_commands.hasNext()) ) {
-+                    throw new RewriteEarlyExitException();
-+                }
-+                while ( stream_commands.hasNext() ) {
-+                    adaptor.addChild(root_1, stream_commands.nextTree());
+-
 -
 -                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);
@@ -251,7 +255,7 @@ Index: BstParser.java
          retval.start = input.LT(1);
  
          Object root_0 = null;
-@@ -198,27 +214,27 @@
+@@ -198,27 +214,27 @@ public class BstParser extends Parser {
          Token char_literal26=null;
          Token ENTRY27=null;
          Token SORT31=null;
@@ -290,7 +294,7 @@ Index: BstParser.java
  
  
          Object STRINGS2_tree=null;
-@@ -242,280 +258,294 @@
+@@ -242,280 +258,294 @@ public class BstParser extends Parser {
          Object SORT31_tree=null;
  
          try {
@@ -368,7 +372,7 @@ Index: BstParser.java
 -                    match(input,STRINGS,FOLLOW_STRINGS_in_commands65); 
 -                    STRINGS2_tree = adaptor.create(STRINGS2);
 -                    root_0 = adaptor.becomeRoot(STRINGS2_tree, root_0);
-+                    STRINGS2=(Token)match(input,STRINGS,FOLLOW_STRINGS_in_commands65); 
++                    STRINGS2=(Token)match(input,STRINGS,FOLLOW_STRINGS_in_commands65);
 +                    STRINGS2_tree = (Object)adaptor.create(STRINGS2);
 +                    root_0 = (Object)adaptor.becomeRoot(STRINGS2_tree, root_0);
  
@@ -378,9 +382,9 @@ Index: BstParser.java
  
 -                    adaptor.addChild(root_0, idList3.tree);
 +                    state._fsp--;
-+                    adaptor.addChild(root_0, idList3.getTree());
 +
++                    adaptor.addChild(root_0, idList3.getTree());
                      }
                      break;
                  case 2 :
@@ -394,7 +398,7 @@ Index: BstParser.java
 -                    match(input,INTEGERS,FOLLOW_INTEGERS_in_commands73); 
 -                    INTEGERS4_tree = adaptor.create(INTEGERS4);
 -                    root_0 = adaptor.becomeRoot(INTEGERS4_tree, root_0);
-+                    INTEGERS4=(Token)match(input,INTEGERS,FOLLOW_INTEGERS_in_commands73); 
++                    INTEGERS4=(Token)match(input,INTEGERS,FOLLOW_INTEGERS_in_commands73);
 +                    INTEGERS4_tree = (Object)adaptor.create(INTEGERS4);
 +                    root_0 = (Object)adaptor.becomeRoot(INTEGERS4_tree, root_0);
  
@@ -404,9 +408,9 @@ Index: BstParser.java
  
 -                    adaptor.addChild(root_0, idList5.tree);
 +                    state._fsp--;
-+                    adaptor.addChild(root_0, idList5.getTree());
 +
++                    adaptor.addChild(root_0, idList5.getTree());
                      }
                      break;
                  case 3 :
@@ -420,7 +424,7 @@ Index: BstParser.java
 -                    match(input,FUNCTION,FOLLOW_FUNCTION_in_commands81); 
 -                    FUNCTION6_tree = adaptor.create(FUNCTION6);
 -                    root_0 = adaptor.becomeRoot(FUNCTION6_tree, root_0);
-+                    FUNCTION6=(Token)match(input,FUNCTION,FOLLOW_FUNCTION_in_commands81); 
++                    FUNCTION6=(Token)match(input,FUNCTION,FOLLOW_FUNCTION_in_commands81);
 +                    FUNCTION6_tree = (Object)adaptor.create(FUNCTION6);
 +                    root_0 = (Object)adaptor.becomeRoot(FUNCTION6_tree, root_0);
  
@@ -438,9 +442,9 @@ Index: BstParser.java
  
 -                    adaptor.addChild(root_0, stack8.tree);
 +                    state._fsp--;
-+                    adaptor.addChild(root_0, stack8.getTree());
 +
++                    adaptor.addChild(root_0, stack8.getTree());
                      }
                      break;
                  case 4 :
@@ -454,7 +458,7 @@ Index: BstParser.java
 -                    match(input,MACRO,FOLLOW_MACRO_in_commands91); 
 -                    MACRO9_tree = adaptor.create(MACRO9);
 -                    root_0 = adaptor.becomeRoot(MACRO9_tree, root_0);
-+                    MACRO9=(Token)match(input,MACRO,FOLLOW_MACRO_in_commands91); 
++                    MACRO9=(Token)match(input,MACRO,FOLLOW_MACRO_in_commands91);
 +                    MACRO9_tree = (Object)adaptor.create(MACRO9);
 +                    root_0 = (Object)adaptor.becomeRoot(MACRO9_tree, root_0);
  
@@ -471,14 +475,14 @@ Index: BstParser.java
 +                    state._fsp--;
 +
 +                    adaptor.addChild(root_0, id10.getTree());
-+                    char_literal11=(Token)match(input,25,FOLLOW_25_in_commands96); 
-+                    STRING12=(Token)match(input,STRING,FOLLOW_STRING_in_commands99); 
++                    char_literal11=(Token)match(input,25,FOLLOW_25_in_commands96);
++                    STRING12=(Token)match(input,STRING,FOLLOW_STRING_in_commands99);
 +                    STRING12_tree = (Object)adaptor.create(STRING12);
                      adaptor.addChild(root_0, STRING12_tree);
  
 -                    char_literal13=input.LT(1);
 -                    match(input,26,FOLLOW_26_in_commands101); 
-+                    char_literal13=(Token)match(input,26,FOLLOW_26_in_commands101); 
++                    char_literal13=(Token)match(input,26,FOLLOW_26_in_commands101);
  
                      }
                      break;
@@ -493,7 +497,7 @@ Index: BstParser.java
 -                    match(input,READ,FOLLOW_READ_in_commands107); 
 -                    READ14_tree = adaptor.create(READ14);
 -                    root_0 = adaptor.becomeRoot(READ14_tree, root_0);
-+                    READ14=(Token)match(input,READ,FOLLOW_READ_in_commands107); 
++                    READ14=(Token)match(input,READ,FOLLOW_READ_in_commands107);
 +                    READ14_tree = (Object)adaptor.create(READ14);
 +                    root_0 = (Object)adaptor.becomeRoot(READ14_tree, root_0);
  
@@ -511,13 +515,13 @@ Index: BstParser.java
 -                    match(input,EXECUTE,FOLLOW_EXECUTE_in_commands113); 
 -                    EXECUTE15_tree = adaptor.create(EXECUTE15);
 -                    root_0 = adaptor.becomeRoot(EXECUTE15_tree, root_0);
-+                    EXECUTE15=(Token)match(input,EXECUTE,FOLLOW_EXECUTE_in_commands113); 
++                    EXECUTE15=(Token)match(input,EXECUTE,FOLLOW_EXECUTE_in_commands113);
 +                    EXECUTE15_tree = (Object)adaptor.create(EXECUTE15);
 +                    root_0 = (Object)adaptor.becomeRoot(EXECUTE15_tree, root_0);
  
 -                    char_literal16=input.LT(1);
 -                    match(input,25,FOLLOW_25_in_commands116); 
-+                    char_literal16=(Token)match(input,25,FOLLOW_25_in_commands116); 
++                    char_literal16=(Token)match(input,25,FOLLOW_25_in_commands116);
                      pushFollow(FOLLOW_function_in_commands119);
                      function17=function();
 -                    _fsp--;
@@ -526,10 +530,10 @@ Index: BstParser.java
 -                    char_literal18=input.LT(1);
 -                    match(input,26,FOLLOW_26_in_commands121); 
 +                    state._fsp--;
-+                    adaptor.addChild(root_0, function17.getTree());
-+                    char_literal18=(Token)match(input,26,FOLLOW_26_in_commands121); 
 +
++                    adaptor.addChild(root_0, function17.getTree());
++                    char_literal18=(Token)match(input,26,FOLLOW_26_in_commands121);
                      }
                      break;
                  case 7 :
@@ -543,13 +547,13 @@ Index: BstParser.java
 -                    match(input,ITERATE,FOLLOW_ITERATE_in_commands127); 
 -                    ITERATE19_tree = adaptor.create(ITERATE19);
 -                    root_0 = adaptor.becomeRoot(ITERATE19_tree, root_0);
-+                    ITERATE19=(Token)match(input,ITERATE,FOLLOW_ITERATE_in_commands127); 
++                    ITERATE19=(Token)match(input,ITERATE,FOLLOW_ITERATE_in_commands127);
 +                    ITERATE19_tree = (Object)adaptor.create(ITERATE19);
 +                    root_0 = (Object)adaptor.becomeRoot(ITERATE19_tree, root_0);
  
 -                    char_literal20=input.LT(1);
 -                    match(input,25,FOLLOW_25_in_commands130); 
-+                    char_literal20=(Token)match(input,25,FOLLOW_25_in_commands130); 
++                    char_literal20=(Token)match(input,25,FOLLOW_25_in_commands130);
                      pushFollow(FOLLOW_function_in_commands133);
                      function21=function();
 -                    _fsp--;
@@ -558,10 +562,10 @@ Index: BstParser.java
 -                    char_literal22=input.LT(1);
 -                    match(input,26,FOLLOW_26_in_commands135); 
 +                    state._fsp--;
-+                    adaptor.addChild(root_0, function21.getTree());
-+                    char_literal22=(Token)match(input,26,FOLLOW_26_in_commands135); 
 +
++                    adaptor.addChild(root_0, function21.getTree());
++                    char_literal22=(Token)match(input,26,FOLLOW_26_in_commands135);
                      }
                      break;
                  case 8 :
@@ -575,13 +579,13 @@ Index: BstParser.java
 -                    match(input,REVERSE,FOLLOW_REVERSE_in_commands141); 
 -                    REVERSE23_tree = adaptor.create(REVERSE23);
 -                    root_0 = adaptor.becomeRoot(REVERSE23_tree, root_0);
-+                    REVERSE23=(Token)match(input,REVERSE,FOLLOW_REVERSE_in_commands141); 
++                    REVERSE23=(Token)match(input,REVERSE,FOLLOW_REVERSE_in_commands141);
 +                    REVERSE23_tree = (Object)adaptor.create(REVERSE23);
 +                    root_0 = (Object)adaptor.becomeRoot(REVERSE23_tree, root_0);
  
 -                    char_literal24=input.LT(1);
 -                    match(input,25,FOLLOW_25_in_commands144); 
-+                    char_literal24=(Token)match(input,25,FOLLOW_25_in_commands144); 
++                    char_literal24=(Token)match(input,25,FOLLOW_25_in_commands144);
                      pushFollow(FOLLOW_function_in_commands147);
                      function25=function();
 -                    _fsp--;
@@ -590,10 +594,10 @@ Index: BstParser.java
 -                    char_literal26=input.LT(1);
 -                    match(input,26,FOLLOW_26_in_commands149); 
 +                    state._fsp--;
-+                    adaptor.addChild(root_0, function25.getTree());
-+                    char_literal26=(Token)match(input,26,FOLLOW_26_in_commands149); 
 +
++                    adaptor.addChild(root_0, function25.getTree());
++                    char_literal26=(Token)match(input,26,FOLLOW_26_in_commands149);
                      }
                      break;
                  case 9 :
@@ -607,7 +611,7 @@ Index: BstParser.java
 -                    match(input,ENTRY,FOLLOW_ENTRY_in_commands155); 
 -                    ENTRY27_tree = adaptor.create(ENTRY27);
 -                    root_0 = adaptor.becomeRoot(ENTRY27_tree, root_0);
-+                    ENTRY27=(Token)match(input,ENTRY,FOLLOW_ENTRY_in_commands155); 
++                    ENTRY27=(Token)match(input,ENTRY,FOLLOW_ENTRY_in_commands155);
 +                    ENTRY27_tree = (Object)adaptor.create(ENTRY27);
 +                    root_0 = (Object)adaptor.becomeRoot(ENTRY27_tree, root_0);
  
@@ -633,9 +637,9 @@ Index: BstParser.java
  
 -                    adaptor.addChild(root_0, idList030.tree);
 +                    state._fsp--;
-+                    adaptor.addChild(root_0, idList030.getTree());
 +
++                    adaptor.addChild(root_0, idList030.getTree());
                      }
                      break;
                  case 10 :
@@ -649,7 +653,7 @@ Index: BstParser.java
 -                    match(input,SORT,FOLLOW_SORT_in_commands167); 
 -                    SORT31_tree = adaptor.create(SORT31);
 -                    root_0 = adaptor.becomeRoot(SORT31_tree, root_0);
-+                    SORT31=(Token)match(input,SORT,FOLLOW_SORT_in_commands167); 
++                    SORT31=(Token)match(input,SORT,FOLLOW_SORT_in_commands167);
 +                    SORT31_tree = (Object)adaptor.create(SORT31);
 +                    root_0 = (Object)adaptor.becomeRoot(SORT31_tree, root_0);
  
@@ -699,7 +703,7 @@ Index: BstParser.java
          retval.start = input.LT(1);
  
          Object root_0 = null;
-@@ -525,121 +555,121 @@
+@@ -525,121 +555,121 @@ public class BstParser extends Parser {
          Object IDENTIFIER32_tree=null;
  
          try {
@@ -713,7 +717,7 @@ Index: BstParser.java
 -            IDENTIFIER32=input.LT(1);
 -            match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_identifier178); 
 -            IDENTIFIER32_tree = adaptor.create(IDENTIFIER32);
-+            IDENTIFIER32=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_identifier178); 
++            IDENTIFIER32=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_identifier178);
 +            IDENTIFIER32_tree = (Object)adaptor.create(IDENTIFIER32);
              adaptor.addChild(root_0, IDENTIFIER32_tree);
  
@@ -783,7 +787,7 @@ Index: BstParser.java
  
 -            char_literal33=input.LT(1);
 -            match(input,25,FOLLOW_25_in_id188); 
-+            char_literal33=(Token)match(input,25,FOLLOW_25_in_id188); 
++            char_literal33=(Token)match(input,25,FOLLOW_25_in_id188);
              pushFollow(FOLLOW_identifier_in_id191);
              identifier34=identifier();
 -            _fsp--;
@@ -792,10 +796,10 @@ Index: BstParser.java
 -            char_literal35=input.LT(1);
 -            match(input,26,FOLLOW_26_in_id193); 
 +            state._fsp--;
-+            adaptor.addChild(root_0, identifier34.getTree());
-+            char_literal35=(Token)match(input,26,FOLLOW_26_in_id193); 
 +
++            adaptor.addChild(root_0, identifier34.getTree());
++            char_literal35=(Token)match(input,26,FOLLOW_26_in_id193);
              }
  
 +            retval.stop = input.LT(-1);
@@ -845,11 +849,11 @@ Index: BstParser.java
          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;
 -
@@ -864,12 +868,12 @@ Index: BstParser.java
 -            char_literal36=input.LT(1);
 -            match(input,25,FOLLOW_25_in_idList205); 
 -            list_25.add(char_literal36);
-+            char_literal36=(Token)match(input,25,FOLLOW_25_in_idList205);  
++            char_literal36=(Token)match(input,25,FOLLOW_25_in_idList205);
 +            stream_25.add(char_literal36);
  
              // Bst.g:35:8: ( identifier )+
              int cnt3=0;
-@@ -647,6 +677,7 @@
+@@ -647,6 +677,7 @@ public class BstParser extends Parser {
              do {
                  int alt3=2;
                  int LA3_0 = input.LA(1);
@@ -877,7 +881,7 @@ Index: BstParser.java
                  if ( (LA3_0==IDENTIFIER) ) {
                      alt3=1;
                  }
-@@ -658,10 +689,11 @@
+@@ -658,9 +689,10 @@ public class BstParser extends Parser {
                    {
                    pushFollow(FOLLOW_identifier_in_idList207);
                    identifier37=identifier();
@@ -885,32 +889,31 @@ Index: BstParser.java
  
 -                  list_identifier.add(identifier37.tree);
 +                  state._fsp--;
-+                  stream_identifier.add(identifier37.getTree());
 +
++                  stream_identifier.add(identifier37.getTree());
                    }
                    break;
-@@ -674,96 +706,100 @@
+@@ -674,96 +706,100 @@ public class BstParser extends Parser {
                  cnt3++;
              } while (true);
  
 -            char_literal38=input.LT(1);
 -            match(input,26,FOLLOW_26_in_idList210); 
 -            list_26.add(char_literal38);
-+            char_literal38=(Token)match(input,26,FOLLOW_26_in_idList210);  
++            char_literal38=(Token)match(input,26,FOLLOW_26_in_idList210);
 +            stream_26.add(char_literal38);
++
  
  
-+
              // AST REWRITE
 -            int i_0 = 0;
 +            // elements: identifier
-+            // token labels: 
++            // token labels:
 +            // rule labels: retval
-+            // token list labels: 
-+            // rule list labels: 
-+            // wildcard labels: 
++            // token list labels:
++            // rule list labels:
++            // wildcard labels:
              retval.tree = root_0;
 -            root_0 = adaptor.nil();
 +            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
@@ -922,26 +925,26 @@ Index: BstParser.java
                  {
 -                Object root_1 = adaptor.nil();
 -                root_1 = adaptor.becomeRoot(adaptor.create(IDLIST, "IDLIST"), root_1);
-+                Object root_1 = (Object)adaptor.nil();
-+                root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(IDLIST, "IDLIST"), root_1);
+-
 -                // Bst.g:35:36: ( identifier )+
 -                {
 -                int n_1 = list_identifier == null ? 0 : list_identifier.size();
 -                 
-+                if ( !(stream_identifier.hasNext()) ) {
-+                    throw new RewriteEarlyExitException();
-+                }
-+                while ( stream_identifier.hasNext() ) {
-+                    adaptor.addChild(root_1, stream_identifier.nextTree());
+-
 -
 -                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);
@@ -999,11 +1002,11 @@ Index: BstParser.java
          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;
 -
@@ -1018,7 +1021,7 @@ Index: BstParser.java
 -            char_literal39=input.LT(1);
 -            match(input,25,FOLLOW_25_in_idList0230); 
 -            list_25.add(char_literal39);
-+            char_literal39=(Token)match(input,25,FOLLOW_25_in_idList0230);  
++            char_literal39=(Token)match(input,25,FOLLOW_25_in_idList0230);
 +            stream_25.add(char_literal39);
  
              // Bst.g:38:8: ( identifier )*
@@ -1030,7 +1033,7 @@ Index: BstParser.java
                  if ( (LA4_0==IDENTIFIER) ) {
                      alt4=1;
                  }
-@@ -775,10 +811,11 @@
+@@ -775,9 +811,10 @@ public class BstParser extends Parser {
                    {
                    pushFollow(FOLLOW_identifier_in_idList0232);
                    identifier40=identifier();
@@ -1038,32 +1041,31 @@ Index: BstParser.java
  
 -                  list_identifier.add(identifier40.tree);
 +                  state._fsp--;
-+                  stream_identifier.add(identifier40.getTree());
 +
++                  stream_identifier.add(identifier40.getTree());
                    }
                    break;
-@@ -787,68 +824,71 @@
+@@ -787,68 +824,71 @@ public class BstParser extends Parser {
                  }
              } while (true);
  
 -            char_literal41=input.LT(1);
 -            match(input,26,FOLLOW_26_in_idList0235); 
 -            list_26.add(char_literal41);
-+            char_literal41=(Token)match(input,26,FOLLOW_26_in_idList0235);  
++            char_literal41=(Token)match(input,26,FOLLOW_26_in_idList0235);
 +            stream_26.add(char_literal41);
++
  
  
-+
              // AST REWRITE
 -            int i_0 = 0;
 +            // elements: identifier
-+            // token labels: 
++            // token labels:
 +            // rule labels: retval
-+            // token list labels: 
-+            // rule list labels: 
-+            // wildcard labels: 
++            // token list labels:
++            // rule list labels:
++            // wildcard labels:
              retval.tree = root_0;
 -            root_0 = adaptor.nil();
 +            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
@@ -1082,13 +1084,13 @@ Index: BstParser.java
 -                {
 -                int n_1 = list_identifier == null ? 0 : list_identifier.size();
 -                 
-+                while ( stream_identifier.hasNext() ) {
-+                    adaptor.addChild(root_1, stream_identifier.nextTree());
+-
 -
 -                for (int i_1=0; i_1<n_1; i_1++) {
 -                    adaptor.addChild(root_1, list_identifier.get(i_1));
--
++                while ( stream_identifier.hasNext() ) {
++                    adaptor.addChild(root_1, stream_identifier.nextTree());
                  }
 -                }
 +                stream_identifier.reset();
@@ -1143,7 +1145,7 @@ Index: BstParser.java
          retval.start = input.LT(1);
  
          Object root_0 = null;
-@@ -860,7 +900,7 @@
+@@ -860,7 +900,7 @@ public class BstParser extends Parser {
          Token char_literal46=null;
          Token string_literal47=null;
          Token char_literal48=null;
@@ -1152,7 +1154,7 @@ Index: BstParser.java
  
  
          Object char_literal42_tree=null;
-@@ -872,36 +912,52 @@
+@@ -872,36 +912,52 @@ public class BstParser extends Parser {
          Object char_literal48_tree=null;
  
          try {
@@ -1207,7 +1209,7 @@ Index: BstParser.java
  
                  throw nvae;
              }
-@@ -910,11 +966,10 @@
+@@ -910,11 +966,10 @@ public class BstParser extends Parser {
                  case 1 :
                      // Bst.g:41:4: '<'
                      {
@@ -1217,12 +1219,12 @@ Index: BstParser.java
 -                    char_literal42=input.LT(1);
 -                    match(input,27,FOLLOW_27_in_function254); 
 -                    char_literal42_tree = adaptor.create(char_literal42);
-+                    char_literal42=(Token)match(input,27,FOLLOW_27_in_function254); 
++                    char_literal42=(Token)match(input,27,FOLLOW_27_in_function254);
 +                    char_literal42_tree = (Object)adaptor.create(char_literal42);
                      adaptor.addChild(root_0, char_literal42_tree);
  
  
-@@ -923,11 +978,10 @@
+@@ -923,11 +978,10 @@ public class BstParser extends Parser {
                  case 2 :
                      // Bst.g:41:10: '>'
                      {
@@ -1232,12 +1234,12 @@ Index: BstParser.java
 -                    char_literal43=input.LT(1);
 -                    match(input,28,FOLLOW_28_in_function258); 
 -                    char_literal43_tree = adaptor.create(char_literal43);
-+                    char_literal43=(Token)match(input,28,FOLLOW_28_in_function258); 
++                    char_literal43=(Token)match(input,28,FOLLOW_28_in_function258);
 +                    char_literal43_tree = (Object)adaptor.create(char_literal43);
                      adaptor.addChild(root_0, char_literal43_tree);
  
  
-@@ -936,11 +990,10 @@
+@@ -936,11 +990,10 @@ public class BstParser extends Parser {
                  case 3 :
                      // Bst.g:41:16: '='
                      {
@@ -1247,12 +1249,12 @@ Index: BstParser.java
 -                    char_literal44=input.LT(1);
 -                    match(input,29,FOLLOW_29_in_function262); 
 -                    char_literal44_tree = adaptor.create(char_literal44);
-+                    char_literal44=(Token)match(input,29,FOLLOW_29_in_function262); 
++                    char_literal44=(Token)match(input,29,FOLLOW_29_in_function262);
 +                    char_literal44_tree = (Object)adaptor.create(char_literal44);
                      adaptor.addChild(root_0, char_literal44_tree);
  
  
-@@ -949,11 +1002,10 @@
+@@ -949,11 +1002,10 @@ public class BstParser extends Parser {
                  case 4 :
                      // Bst.g:41:22: '+'
                      {
@@ -1262,12 +1264,12 @@ Index: BstParser.java
 -                    char_literal45=input.LT(1);
 -                    match(input,30,FOLLOW_30_in_function266); 
 -                    char_literal45_tree = adaptor.create(char_literal45);
-+                    char_literal45=(Token)match(input,30,FOLLOW_30_in_function266); 
++                    char_literal45=(Token)match(input,30,FOLLOW_30_in_function266);
 +                    char_literal45_tree = (Object)adaptor.create(char_literal45);
                      adaptor.addChild(root_0, char_literal45_tree);
  
  
-@@ -962,11 +1014,10 @@
+@@ -962,11 +1014,10 @@ public class BstParser extends Parser {
                  case 5 :
                      // Bst.g:41:28: '-'
                      {
@@ -1277,12 +1279,12 @@ Index: BstParser.java
 -                    char_literal46=input.LT(1);
 -                    match(input,31,FOLLOW_31_in_function270); 
 -                    char_literal46_tree = adaptor.create(char_literal46);
-+                    char_literal46=(Token)match(input,31,FOLLOW_31_in_function270); 
++                    char_literal46=(Token)match(input,31,FOLLOW_31_in_function270);
 +                    char_literal46_tree = (Object)adaptor.create(char_literal46);
                      adaptor.addChild(root_0, char_literal46_tree);
  
  
-@@ -975,11 +1026,10 @@
+@@ -975,11 +1026,10 @@ public class BstParser extends Parser {
                  case 6 :
                      // Bst.g:41:34: ':='
                      {
@@ -1292,12 +1294,12 @@ Index: BstParser.java
 -                    string_literal47=input.LT(1);
 -                    match(input,32,FOLLOW_32_in_function274); 
 -                    string_literal47_tree = adaptor.create(string_literal47);
-+                    string_literal47=(Token)match(input,32,FOLLOW_32_in_function274); 
++                    string_literal47=(Token)match(input,32,FOLLOW_32_in_function274);
 +                    string_literal47_tree = (Object)adaptor.create(string_literal47);
                      adaptor.addChild(root_0, string_literal47_tree);
  
  
-@@ -988,11 +1038,10 @@
+@@ -988,11 +1038,10 @@ public class BstParser extends Parser {
                  case 7 :
                      // Bst.g:41:41: '*'
                      {
@@ -1307,12 +1309,12 @@ Index: BstParser.java
 -                    char_literal48=input.LT(1);
 -                    match(input,33,FOLLOW_33_in_function278); 
 -                    char_literal48_tree = adaptor.create(char_literal48);
-+                    char_literal48=(Token)match(input,33,FOLLOW_33_in_function278); 
++                    char_literal48=(Token)match(input,33,FOLLOW_33_in_function278);
 +                    char_literal48_tree = (Object)adaptor.create(char_literal48);
                      adaptor.addChild(root_0, char_literal48_tree);
  
  
-@@ -1001,64 +1050,66 @@
+@@ -1001,64 +1050,66 @@ public class BstParser extends Parser {
                  case 8 :
                      // Bst.g:41:47: identifier
                      {
@@ -1325,9 +1327,9 @@ Index: BstParser.java
  
 -                    adaptor.addChild(root_0, identifier49.tree);
 +                    state._fsp--;
-+                    adaptor.addChild(root_0, identifier49.getTree());
 +
++                    adaptor.addChild(root_0, identifier49.getTree());
                      }
                      break;
  
@@ -1378,11 +1380,11 @@ Index: BstParser.java
          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;
 -
@@ -1397,12 +1399,12 @@ Index: BstParser.java
 -            char_literal50=input.LT(1);
 -            match(input,25,FOLLOW_25_in_stack293); 
 -            list_25.add(char_literal50);
-+            char_literal50=(Token)match(input,25,FOLLOW_25_in_stack293);  
++            char_literal50=(Token)match(input,25,FOLLOW_25_in_stack293);
 +            stream_25.add(char_literal50);
  
              // Bst.g:44:8: ( stackitem )+
              int cnt6=0;
-@@ -1066,6 +1117,7 @@
+@@ -1066,6 +1117,7 @@ public class BstParser extends Parser {
              do {
                  int alt6=2;
                  int LA6_0 = input.LA(1);
@@ -1410,7 +1412,7 @@ Index: BstParser.java
                  if ( (LA6_0==STRING||(LA6_0>=IDENTIFIER && LA6_0<=QUOTED)||LA6_0==25||(LA6_0>=27 && LA6_0<=33)) ) {
                      alt6=1;
                  }
-@@ -1077,10 +1129,11 @@
+@@ -1077,9 +1129,10 @@ public class BstParser extends Parser {
                    {
                    pushFollow(FOLLOW_stackitem_in_stack295);
                    stackitem51=stackitem();
@@ -1418,32 +1420,31 @@ Index: BstParser.java
  
 -                  list_stackitem.add(stackitem51.tree);
 +                  state._fsp--;
-+                  stream_stackitem.add(stackitem51.getTree());
 +
++                  stream_stackitem.add(stackitem51.getTree());
                    }
                    break;
-@@ -1093,69 +1146,73 @@
+@@ -1093,69 +1146,73 @@ public class BstParser extends Parser {
                  cnt6++;
              } while (true);
  
 -            char_literal52=input.LT(1);
 -            match(input,26,FOLLOW_26_in_stack298); 
 -            list_26.add(char_literal52);
-+            char_literal52=(Token)match(input,26,FOLLOW_26_in_stack298);  
++            char_literal52=(Token)match(input,26,FOLLOW_26_in_stack298);
 +            stream_26.add(char_literal52);
++
  
  
-+
              // AST REWRITE
 -            int i_0 = 0;
 +            // elements: stackitem
-+            // token labels: 
++            // token labels:
 +            // rule labels: retval
-+            // token list labels: 
-+            // rule list labels: 
-+            // wildcard labels: 
++            // token list labels:
++            // rule list labels:
++            // wildcard labels:
              retval.tree = root_0;
 -            root_0 = adaptor.nil();
 +            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
@@ -1455,26 +1456,26 @@ Index: BstParser.java
                  {
 -                Object root_1 = adaptor.nil();
 -                root_1 = adaptor.becomeRoot(adaptor.create(STACK, "STACK"), root_1);
-+                Object root_1 = (Object)adaptor.nil();
-+                root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(STACK, "STACK"), root_1);
+-
 -                // Bst.g:44:34: ( stackitem )+
 -                {
 -                int n_1 = list_stackitem == null ? 0 : list_stackitem.size();
 -                 
-+                if ( !(stream_stackitem.hasNext()) ) {
-+                    throw new RewriteEarlyExitException();
-+                }
-+                while ( stream_stackitem.hasNext() ) {
-+                    adaptor.addChild(root_1, stream_stackitem.nextTree());
+-
 -
 -                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);
@@ -1527,7 +1528,7 @@ Index: BstParser.java
          retval.start = input.LT(1);
  
          Object root_0 = null;
-@@ -1163,9 +1220,9 @@
+@@ -1163,9 +1220,9 @@ public class BstParser extends Parser {
          Token STRING54=null;
          Token INTEGER55=null;
          Token QUOTED56=null;
@@ -1539,7 +1540,7 @@ Index: BstParser.java
  
  
          Object STRING54_tree=null;
-@@ -1173,7 +1230,7 @@
+@@ -1173,7 +1230,7 @@ public class BstParser extends Parser {
          Object QUOTED56_tree=null;
  
          try {
@@ -1548,7 +1549,7 @@ Index: BstParser.java
              int alt7=5;
              switch ( input.LA(1) ) {
              case IDENTIFIER:
-@@ -1184,23 +1241,33 @@
+@@ -1184,23 +1241,33 @@ public class BstParser extends Parser {
              case 31:
              case 32:
              case 33:
@@ -1583,7 +1584,7 @@ Index: BstParser.java
  
                  throw nvae;
              }
-@@ -1209,24 +1276,24 @@
+@@ -1209,24 +1276,24 @@ public class BstParser extends Parser {
                  case 1 :
                      // Bst.g:47:4: function
                      {
@@ -1596,9 +1597,9 @@ Index: BstParser.java
  
 -                    adaptor.addChild(root_0, function53.tree);
 +                    state._fsp--;
-+                    adaptor.addChild(root_0, function53.getTree());
 +
++                    adaptor.addChild(root_0, function53.getTree());
                      }
                      break;
                  case 2 :
@@ -1610,12 +1611,12 @@ Index: BstParser.java
 -                    STRING54=input.LT(1);
 -                    match(input,STRING,FOLLOW_STRING_in_stackitem322); 
 -                    STRING54_tree = adaptor.create(STRING54);
-+                    STRING54=(Token)match(input,STRING,FOLLOW_STRING_in_stackitem322); 
++                    STRING54=(Token)match(input,STRING,FOLLOW_STRING_in_stackitem322);
 +                    STRING54_tree = (Object)adaptor.create(STRING54);
                      adaptor.addChild(root_0, STRING54_tree);
  
  
-@@ -1235,11 +1302,10 @@
+@@ -1235,11 +1302,10 @@ public class BstParser extends Parser {
                  case 3 :
                      // Bst.g:49:4: INTEGER
                      {
@@ -1625,12 +1626,12 @@ Index: BstParser.java
 -                    INTEGER55=input.LT(1);
 -                    match(input,INTEGER,FOLLOW_INTEGER_in_stackitem328); 
 -                    INTEGER55_tree = adaptor.create(INTEGER55);
-+                    INTEGER55=(Token)match(input,INTEGER,FOLLOW_INTEGER_in_stackitem328); 
++                    INTEGER55=(Token)match(input,INTEGER,FOLLOW_INTEGER_in_stackitem328);
 +                    INTEGER55_tree = (Object)adaptor.create(INTEGER55);
                      adaptor.addChild(root_0, INTEGER55_tree);
  
  
-@@ -1248,11 +1314,10 @@
+@@ -1248,11 +1314,10 @@ public class BstParser extends Parser {
                  case 4 :
                      // Bst.g:50:4: QUOTED
                      {
@@ -1640,12 +1641,12 @@ Index: BstParser.java
 -                    QUOTED56=input.LT(1);
 -                    match(input,QUOTED,FOLLOW_QUOTED_in_stackitem334); 
 -                    QUOTED56_tree = adaptor.create(QUOTED56);
-+                    QUOTED56=(Token)match(input,QUOTED,FOLLOW_QUOTED_in_stackitem334); 
++                    QUOTED56=(Token)match(input,QUOTED,FOLLOW_QUOTED_in_stackitem334);
 +                    QUOTED56_tree = (Object)adaptor.create(QUOTED56);
                      adaptor.addChild(root_0, QUOTED56_tree);
  
  
-@@ -1261,35 +1326,40 @@
+@@ -1261,33 +1326,38 @@ public class BstParser extends Parser {
                  case 5 :
                      // Bst.g:51:4: stack
                      {
@@ -1658,9 +1659,9 @@ Index: BstParser.java
  
 -                    adaptor.addChild(root_0, stack57.tree);
 +                    state._fsp--;
-+                    adaptor.addChild(root_0, stack57.getTree());
 +
++                    adaptor.addChild(root_0, stack57.getTree());
                      }
                      break;
  
@@ -1689,14 +1690,12 @@ Index: BstParser.java
      }
 -    // $ANTLR end stackitem
 +    // $ANTLR end "stackitem"
++
 +    // Delegated rules
  
-+
-  
  
-     public static final BitSet FOLLOW_commands_in_program45 = new BitSet(new long[]{0x000000000003EF42L});
-@@ -1324,14 +1394,14 @@
+  
+@@ -1324,14 +1394,14 @@ public class BstParser extends Parser {
      public static final BitSet FOLLOW_idList0_in_commands162 = new BitSet(new long[]{0x0000000000000002L});
      public static final BitSet FOLLOW_SORT_in_commands167 = new BitSet(new long[]{0x0000000000000002L});
      public static final BitSet FOLLOW_IDENTIFIER_in_identifier178 = new BitSet(new long[]{0x0000000000000002L});
@@ -1716,17 +1715,15 @@ Index: BstParser.java
      public static final BitSet FOLLOW_26_in_idList0235 = new BitSet(new long[]{0x0000000000000002L});
      public static final BitSet FOLLOW_27_in_function254 = new BitSet(new long[]{0x0000000000000002L});
      public static final BitSet FOLLOW_28_in_function258 = new BitSet(new long[]{0x0000000000000002L});
-@@ -1350,4 +1420,4 @@
+@@ -1350,4 +1420,4 @@ public class BstParser extends Parser {
      public static final BitSet FOLLOW_QUOTED_in_stackitem334 = new BitSet(new long[]{0x0000000000000002L});
      public static final BitSet FOLLOW_stack_in_stackitem339 = new BitSet(new long[]{0x0000000000000002L});
  
 -}
 \ No newline at end of file
 +}
-Index: BstLexer.java
-===================================================================
---- a/src/java/net/sf/jabref/bst/BstLexer.java (revision 2214)
-+++ b/src/java/net/sf/jabref/bst/BstLexer.java (working copy)
+--- a/src/java/net/sf/jabref/bst/BstLexer.java
++++ b/src/java/net/sf/jabref/bst/BstLexer.java
 @@ -1,328 +1,245 @@
  package net.sf.jabref.bst;
  
@@ -1809,15 +1806,15 @@ Index: BstLexer.java
 +    // delegates
 +    // delegators
 +
-+    public BstLexer() {;} 
++    public BstLexer() {;}
      public BstLexer(CharStream input) {
 -        super(input);
 +        this(input, new RecognizerSharedState());
-     }
++    }
 +    public BstLexer(CharStream input, RecognizerSharedState state) {
 +        super(input,state);
 +
-+    }
+     }
      public String getGrammarFileName() { return "Bst.g"; }
  
 -    // $ANTLR start T25
@@ -2180,7 +2177,7 @@ Index: BstLexer.java
              // Bst.g:53:11: 'STRINGS'
              {
              match("STRINGS"); 
-@@ -330,29 +247,20 @@
+@@ -330,29 +247,20 @@ public class BstLexer extends Lexer {
  
              }
  
@@ -2218,7 +2215,7 @@ Index: BstLexer.java
              // Bst.g:54:12: 'INTEGERS'
              {
              match("INTEGERS"); 
-@@ -360,29 +268,20 @@
+@@ -360,29 +268,20 @@ public class BstLexer extends Lexer {
  
              }
  
@@ -2256,7 +2253,7 @@ Index: BstLexer.java
              // Bst.g:55:12: 'FUNCTION'
              {
              match("FUNCTION"); 
-@@ -390,29 +289,20 @@
+@@ -390,29 +289,20 @@ public class BstLexer extends Lexer {
  
              }
  
@@ -2294,7 +2291,7 @@ Index: BstLexer.java
              // Bst.g:56:11: 'EXECUTE'
              {
              match("EXECUTE"); 
-@@ -420,29 +310,20 @@
+@@ -420,29 +310,20 @@ public class BstLexer extends Lexer {
  
              }
  
@@ -2332,7 +2329,7 @@ Index: BstLexer.java
              // Bst.g:57:8: 'SORT'
              {
              match("SORT"); 
-@@ -450,29 +331,20 @@
+@@ -450,29 +331,20 @@ public class BstLexer extends Lexer {
  
              }
  
@@ -2370,7 +2367,7 @@ Index: BstLexer.java
              // Bst.g:58:11: 'ITERATE'
              {
              match("ITERATE"); 
-@@ -480,29 +352,20 @@
+@@ -480,29 +352,20 @@ public class BstLexer extends Lexer {
  
              }
  
@@ -2408,7 +2405,7 @@ Index: BstLexer.java
              // Bst.g:59:11: 'REVERSE'
              {
              match("REVERSE"); 
-@@ -510,29 +373,20 @@
+@@ -510,29 +373,20 @@ public class BstLexer extends Lexer {
  
              }
  
@@ -2446,7 +2443,7 @@ Index: BstLexer.java
              // Bst.g:60:9: 'ENTRY'
              {
              match("ENTRY"); 
-@@ -540,29 +394,20 @@
+@@ -540,29 +394,20 @@ public class BstLexer extends Lexer {
  
              }
  
@@ -2484,7 +2481,7 @@ Index: BstLexer.java
              // Bst.g:61:8: 'READ'
              {
              match("READ"); 
-@@ -570,29 +415,20 @@
+@@ -570,29 +415,20 @@ public class BstLexer extends Lexer {
  
              }
  
@@ -2522,7 +2519,7 @@ Index: BstLexer.java
              // Bst.g:62:9: 'MACRO'
              {
              match("MACRO"); 
-@@ -600,29 +436,20 @@
+@@ -600,29 +436,20 @@ public class BstLexer extends Lexer {
  
              }
  
@@ -2560,7 +2557,7 @@ Index: BstLexer.java
              // Bst.g:65:4: '\\'' IDENTIFIER
              {
              match('\''); 
-@@ -630,29 +457,20 @@
+@@ -630,29 +457,20 @@ public class BstLexer extends Lexer {
  
              }
  
@@ -2598,7 +2595,7 @@ Index: BstLexer.java
              // Bst.g:68:4: LETTER ( LETTER | NUMERAL )*
              {
              mLETTER(); 
-@@ -661,6 +479,7 @@
+@@ -661,6 +479,7 @@ public class BstLexer extends Lexer {
              do {
                  int alt1=3;
                  int LA1_0 = input.LA(1);
@@ -2606,7 +2603,7 @@ Index: BstLexer.java
                  if ( (LA1_0=='$'||LA1_0=='.'||(LA1_0>='A' && LA1_0<='Z')||(LA1_0>='a' && LA1_0<='z')) ) {
                      alt1=1;
                  }
-@@ -693,82 +512,70 @@
+@@ -693,82 +512,70 @@ public class BstLexer extends Lexer {
  
              }
  
@@ -2714,7 +2711,7 @@ Index: BstLexer.java
  
  
                    }
-@@ -783,51 +590,42 @@
+@@ -783,51 +590,42 @@ public class BstLexer extends Lexer {
  
              }
  
@@ -2781,7 +2778,7 @@ Index: BstLexer.java
  
  
                      }
-@@ -841,6 +639,7 @@
+@@ -841,6 +639,7 @@ public class BstLexer extends Lexer {
              do {
                  int alt4=2;
                  int LA4_0 = input.LA(1);
@@ -2789,7 +2786,7 @@ Index: BstLexer.java
                  if ( ((LA4_0>='0' && LA4_0<='9')) ) {
                      alt4=1;
                  }
-@@ -867,24 +666,18 @@
+@@ -867,24 +666,18 @@ public class BstLexer extends Lexer {
  
              }
  
@@ -2821,7 +2818,7 @@ Index: BstLexer.java
              // Bst.g:80:4: ( '0' .. '9' )
              {
              // Bst.g:80:4: ( '0' .. '9' )
-@@ -899,47 +692,42 @@
+@@ -899,47 +692,42 @@ public class BstLexer extends Lexer {
  
          }
          finally {
@@ -2883,7 +2880,7 @@ Index: BstLexer.java
  
  
                    }
-@@ -954,59 +742,50 @@
+@@ -954,59 +742,50 @@ public class BstLexer extends Lexer {
                  cnt5++;
              } while (true);
  
@@ -2961,7 +2958,7 @@ Index: BstLexer.java
  
  
                    }
-@@ -1017,15 +796,16 @@
+@@ -1017,15 +796,16 @@ public class BstLexer extends Lexer {
                  }
              } while (true);
  
@@ -2980,7 +2977,7 @@ Index: BstLexer.java
                      {
                      match('\r'); 
  
-@@ -1035,619 +815,193 @@
+@@ -1035,619 +815,193 @@ public class BstLexer extends Lexer {
              }
  
              match('\n'); 
@@ -3439,7 +3436,7 @@ Index: BstLexer.java
 +                // Bst.g:1:10: T__25
                  {
 -                mT25(); 
-+                mT__25(); 
++                mT__25();
  
                  }
                  break;
@@ -3448,7 +3445,7 @@ Index: BstLexer.java
 +                // Bst.g:1:16: T__26
                  {
 -                mT26(); 
-+                mT__26(); 
++                mT__26();
  
                  }
                  break;
@@ -3457,7 +3454,7 @@ Index: BstLexer.java
 +                // Bst.g:1:22: T__27
                  {
 -                mT27(); 
-+                mT__27(); 
++                mT__27();
  
                  }
                  break;
@@ -3466,7 +3463,7 @@ Index: BstLexer.java
 +                // Bst.g:1:28: T__28
                  {
 -                mT28(); 
-+                mT__28(); 
++                mT__28();
  
                  }
                  break;
@@ -3475,7 +3472,7 @@ Index: BstLexer.java
 +                // Bst.g:1:34: T__29
                  {
 -                mT29(); 
-+                mT__29(); 
++                mT__29();
  
                  }
                  break;
@@ -3484,7 +3481,7 @@ Index: BstLexer.java
 +                // Bst.g:1:40: T__30
                  {
 -                mT30(); 
-+                mT__30(); 
++                mT__30();
  
                  }
                  break;
@@ -3493,7 +3490,7 @@ Index: BstLexer.java
 +                // Bst.g:1:46: T__31
                  {
 -                mT31(); 
-+                mT__31(); 
++                mT__31();
  
                  }
                  break;
@@ -3502,7 +3499,7 @@ Index: BstLexer.java
 +                // Bst.g:1:52: T__32
                  {
 -                mT32(); 
-+                mT__32(); 
++                mT__32();
  
                  }
                  break;
@@ -3511,7 +3508,7 @@ Index: BstLexer.java
 +                // Bst.g:1:58: T__33
                  {
 -                mT33(); 
-+                mT__33(); 
++                mT__33();
  
                  }
                  break;
@@ -3641,7 +3638,7 @@ Index: BstLexer.java
                  {
                  mLINE_COMMENT(); 
  
-@@ -1659,6 +1013,167 @@
+@@ -1659,6 +1013,167 @@ public class BstLexer extends Lexer {
      }
  
  
@@ -3811,9 +3808,7 @@ Index: BstLexer.java
 -}
 \ No newline at end of file
 +}
-Index: Bst.g
-===================================================================
---- a/src/java/net/sf/jabref/bst/Bst.g
+--- /dev/null
 +++ b/src/java/net/sf/jabref/bst/Bst.g
 @@ -0,0 +1,90 @@
 +grammar Bst;
@@ -3833,7 +3828,7 @@ Index: Bst.g
 +
 +program : commands+ -> ^(COMMANDS commands+);
 +
-+commands 
++commands
 +      : STRINGS^ idList
 +      | INTEGERS^ idList
 +      | FUNCTION^ id stack
@@ -3845,28 +3840,28 @@ Index: Bst.g
 +      | ENTRY^ idList0 idList0 idList0
 +      | SORT^;
 +
-+identifier 
++identifier
 +      : IDENTIFIER;
 +
-+id 
++id
 +      : '{'! identifier '}'!;
-+      
-+idList 
++
++idList
 +      : '{' identifier+ '}' -> ^(IDLIST identifier+);
-+      
-+idList0 
++
++idList0
 +      : '{' identifier* '}' -> ^(IDLIST identifier*);
 +
-+function 
++function
 +      : '<' | '>' | '=' | '+' | '-' | ':=' | '*' | identifier;
-+      
-+stack 
++
++stack
 +      : '{' stackitem+ '}' -> ^(STACK stackitem+);
-+      
++
 +stackitem
 +      : function
-+      | STRING 
-+      | INTEGER 
++      | STRING
++      | INTEGER
 +      | QUOTED
 +      | stack;
 +
@@ -3892,17 +3887,17 @@ Index: Bst.g
 +
 +STRING
 +      : '"' (~('"'))* '"';
-+      
-+INTEGER   
++
++INTEGER
 +      : '#' ('+'|'-')? NUMERAL+ ;
 +
 +fragment NUMERAL
 +      : ('0'..'9');
-+      
++
 +WS
 +      : (' '|'\t'|'\n')+ {channel=99;} ;
-+      
++
 +LINE_COMMENT
 +    : '%' ~('\n'|'\r')* '\r'? '\n' {channel=99;}
 +    ;
-+      
++