integrate patches from Gerardo Curiel
[debian/jabref.git] / debian / patches / 05_antlr.dpatch
index c8bdb9cf2b944e1b761f9a40f1b17477ad4429fe..4098f7c0befc220b48da694240f18e7669f205d0 100755 (executable)
 #! /bin/sh /usr/share/dpatch/dpatch-run
-## 05_antlr.dpatch by  <gregor+debian@comodo.priv.at>
+## 05_antlr.dpatch by  <gerardo@sophie.gerardo.com.ve>
 ##
 ## All lines beginning with `## DP:' are a description of the patch.
-## DP: antlr3 in debian is newer than the beta release used by jabref.
+## DP: Use antlr3 stable release API, missing ruleNestingLevel member on the antlr3 beta API
 
 @DPATCH@
-diff -urNad jabref-2.3~/src/java/net/sf/jabref/bst/BstLexer.java jabref-2.3/src/java/net/sf/jabref/bst/BstLexer.java
---- jabref-2.3~/src/java/net/sf/jabref/bst/BstLexer.java       2008-04-12 22:45:05.000000000 +0200
-+++ jabref-2.3/src/java/net/sf/jabref/bst/BstLexer.java        2008-04-12 22:59:37.000000000 +0200
-@@ -45,6 +45,8 @@
-         super(input);
-     }
-     public String getGrammarFileName() { return "Bst.g"; }
+diff -urNad jabref-2.3.1~/src/java/net/sf/jabref/bst/BstLexer.java jabref-2.3.1/src/java/net/sf/jabref/bst/BstLexer.java
+--- jabref-2.3.1~/src/java/net/sf/jabref/bst/BstLexer.java     2008-04-19 03:48:20.000000000 -0430
++++ jabref-2.3.1/src/java/net/sf/jabref/bst/BstLexer.java      2008-04-19 03:48:53.000000000 -0430
+@@ -3,11 +3,12 @@
+ // $ANTLR 3.0b5 Bst.g 2006-11-23 23:20:24
+ import org.antlr.runtime.*;
++import org.antlr.codegen.*;
+ import java.util.Stack;
+ import java.util.List;
+ import java.util.ArrayList;
+-public class BstLexer extends Lexer {
++public class BstLexer extends ActionTranslatorLexer {
+     public static final int LETTER=21;
+     public static final int T29=29;
+     public static final int T33=33;
+@@ -40,6 +41,9 @@
+     public static final int IDLIST=4;
+     public static final int NUMERAL=22;
+     public static final int READ=13;
 +    
 +    int ruleNestingLevel = 0;
-     // $ANTLR start T25
-     public void mT25() throws RecognitionException {
-@@ -65,7 +67,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -94,7 +96,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -123,7 +125,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -152,7 +154,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -181,7 +183,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -210,7 +212,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -239,7 +241,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -269,7 +271,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -298,7 +300,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -328,7 +330,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -358,7 +360,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -388,7 +390,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -418,7 +420,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -448,7 +450,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -478,7 +480,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -508,7 +510,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -538,7 +540,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -568,7 +570,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -598,7 +600,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -628,7 +630,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -691,7 +693,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -781,7 +783,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -865,7 +867,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -956,7 +958,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -1037,7 +1039,7 @@
-                     if ( token==null && ruleNestingLevel==1 ) {
--                        emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
-+                        emit();
-                     }
-                         }
-@@ -1656,4 +1658,4 @@
++    
+     public BstLexer() {;} 
+     public BstLexer(CharStream input) {
+         super(input);
+@@ -1656,4 +1660,4 @@