File: 04-backward-compatibility.patch

package info (click to toggle)
antlr3 3.5.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 7,564 kB
  • sloc: java: 92,592; xml: 942; makefile: 37; sh: 19
file content (13 lines) | stat: -rw-r--r-- 582 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
Description: Keep the Token.EOF_TOKEN field to preserve the backward compatibility
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/runtime/Java/src/main/java/org/antlr/runtime/Token.java
+++ b/runtime/Java/src/main/java/org/antlr/runtime/Token.java
@@ -38,6 +38,7 @@
 	public static final int MIN_TOKEN_TYPE = UP+1;
 
     public static final int EOF = CharStream.EOF;
+    public static final Token EOF_TOKEN = new CommonToken(EOF);
 
 	public static final int INVALID_TOKEN_TYPE = 0;
 	public static final Token INVALID_TOKEN = new CommonToken(INVALID_TOKEN_TYPE);