Only in antlr-2.7.5+: Makefile
diff -ur antlr-2.7.5/antlr/ANTLRGrammarParseBehavior.java antlr-2.7.5+/antlr/ANTLRGrammarParseBehavior.java
--- antlr-2.7.5/antlr/ANTLRGrammarParseBehavior.java	2005-01-28 15:13:38.000000000 -0600
+++ antlr-2.7.5+/antlr/ANTLRGrammarParseBehavior.java	2005-03-23 20:22:12.000000000 -0600
@@ -26,7 +26,7 @@
     // Trees
     public void beginTree(Token tok) throws SemanticException;
 
-    public void defineRuleName(Token r, String access, boolean ruleAST, String docComment) throws SemanticException;
+    public void defineRuleName(Token r, String access, boolean ruleAST, boolean thisAST, String docComment) throws SemanticException;
 
     public void defineToken(Token tokname, Token tokliteral);
 
diff -ur antlr-2.7.5/antlr/ANTLRLexer.java antlr-2.7.5+/antlr/ANTLRLexer.java
--- antlr-2.7.5/antlr/ANTLRLexer.java	2005-01-28 15:13:38.000000000 -0600
+++ antlr-2.7.5+/antlr/ANTLRLexer.java	2005-03-23 20:34:22.000000000 -0600
@@ -1,4 +1,4 @@
-// $ANTLR 2.7.3rc3: "antlr.g" -> "ANTLRLexer.java"$
+// $ANTLR 2.7.5 (20050323): "antlr.g" -> "ANTLRLexer.java"$
 
 package antlr;
 
@@ -107,9 +107,9 @@
 	literals.put(new ANTLRHashString("public", this), new Integer(31));
 	literals.put(new ANTLRHashString("class", this), new Integer(10));
 	literals.put(new ANTLRHashString("header", this), new Integer(5));
-	literals.put(new ANTLRHashString("throws", this), new Integer(37));
+	literals.put(new ANTLRHashString("throws", this), new Integer(38));
 	literals.put(new ANTLRHashString("lexclass", this), new Integer(9));
-	literals.put(new ANTLRHashString("catch", this), new Integer(40));
+	literals.put(new ANTLRHashString("catch", this), new Integer(41));
 	literals.put(new ANTLRHashString("private", this), new Integer(32));
 	literals.put(new ANTLRHashString("options", this), new Integer(51));
 	literals.put(new ANTLRHashString("extends", this), new Integer(11));
@@ -117,10 +117,10 @@
 	literals.put(new ANTLRHashString("TreeParser", this), new Integer(13));
 	literals.put(new ANTLRHashString("Parser", this), new Integer(29));
 	literals.put(new ANTLRHashString("Lexer", this), new Integer(12));
-	literals.put(new ANTLRHashString("returns", this), new Integer(35));
+	literals.put(new ANTLRHashString("returns", this), new Integer(36));
 	literals.put(new ANTLRHashString("charVocabulary", this), new Integer(18));
 	literals.put(new ANTLRHashString("tokens", this), new Integer(4));
-	literals.put(new ANTLRHashString("exception", this), new Integer(39));
+	literals.put(new ANTLRHashString("exception", this), new Integer(40));
 }
 
 public Token nextToken() throws TokenStreamException {
@@ -420,7 +420,7 @@
 		
 		match("//");
 		{
-		_loop153:
+		_loop154:
 		do {
 			if ((_tokenSet_0.member(LA(1)))) {
 				{
@@ -428,7 +428,7 @@
 				}
 			}
 			else {
-				break _loop153;
+				break _loop154;
 			}
 			
 		} while (true);
@@ -476,10 +476,10 @@
 		
 		}
 		{
-		_loop159:
+		_loop160:
 		do {
 			// nongreedy exit test
-			if ((LA(1)=='*') && (LA(2)=='/')) break _loop159;
+			if ((LA(1)=='*') && (LA(2)=='/')) break _loop160;
 			if ((LA(1)=='\r') && (LA(2)=='\n')) {
 				match('\r');
 				match('\n');
@@ -499,7 +499,7 @@
 				newline();
 			}
 			else {
-				break _loop159;
+				break _loop160;
 			}
 			
 		} while (true);
@@ -932,7 +932,7 @@
 		
 		match('"');
 		{
-		_loop184:
+		_loop185:
 		do {
 			if ((LA(1)=='\\')) {
 				mESC(false);
@@ -941,7 +941,7 @@
 				matchNot('"');
 			}
 			else {
-				break _loop184;
+				break _loop185;
 			}
 			
 		} while (true);
@@ -1010,17 +1010,17 @@
 		int _saveIndex;
 		
 		{
-		int _cnt196=0;
-		_loop196:
+		int _cnt197=0;
+		_loop197:
 		do {
 			if (((LA(1) >= '0' && LA(1) <= '9'))) {
 				matchRange('0','9');
 			}
 			else {
-				if ( _cnt196>=1 ) { break _loop196; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
+				if ( _cnt197>=1 ) { break _loop197; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
 			}
 			
-			_cnt196++;
+			_cnt197++;
 		} while (true);
 		}
 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
@@ -1051,7 +1051,7 @@
 		
 		match('[');
 		{
-		_loop200:
+		_loop201:
 		do {
 			switch ( LA(1)) {
 			case '[':
@@ -1089,7 +1089,7 @@
 					matchNot(']');
 				}
 			else {
-				break _loop200;
+				break _loop201;
 			}
 			}
 		} while (true);
@@ -1144,10 +1144,10 @@
 		
 		match('{');
 		{
-		_loop206:
+		_loop207:
 		do {
 			// nongreedy exit test
-			if ((LA(1)=='}') && (true)) break _loop206;
+			if ((LA(1)=='}') && (true)) break _loop207;
 			if ((LA(1)=='\n'||LA(1)=='\r') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
 				{
 				if ((LA(1)=='\r') && (LA(2)=='\n')) {
@@ -1185,7 +1185,7 @@
 				matchNot(EOF_CHAR);
 			}
 			else {
-				break _loop206;
+				break _loop207;
 			}
 			
 		} while (true);
@@ -1205,7 +1205,7 @@
 		
 		matchRange('A','Z');
 		{
-		_loop209:
+		_loop210:
 		do {
 			switch ( LA(1)) {
 			case 'a':  case 'b':  case 'c':  case 'd':
@@ -1244,7 +1244,7 @@
 			}
 			default:
 			{
-				break _loop209;
+				break _loop210;
 			}
 			}
 		} while (true);
@@ -1314,7 +1314,7 @@
 		
 		matchRange('a','z');
 		{
-		_loop219:
+		_loop220:
 		do {
 			switch ( LA(1)) {
 			case 'a':  case 'b':  case 'c':  case 'd':
@@ -1353,7 +1353,7 @@
 			}
 			default:
 			{
-				break _loop219;
+				break _loop220;
 			}
 			}
 		} while (true);
@@ -1373,7 +1373,7 @@
 		int _saveIndex;
 		
 		{
-		_loop216:
+		_loop217:
 		do {
 			switch ( LA(1)) {
 			case '\t':  case '\n':  case '\r':  case ' ':
@@ -1388,7 +1388,7 @@
 			}
 			default:
 			{
-				break _loop216;
+				break _loop217;
 			}
 			}
 		} while (true);
diff -ur antlr-2.7.5/antlr/ANTLRParser.java antlr-2.7.5+/antlr/ANTLRParser.java
--- antlr-2.7.5/antlr/ANTLRParser.java	2005-01-28 15:13:38.000000000 -0600
+++ antlr-2.7.5+/antlr/ANTLRParser.java	2005-03-23 20:34:22.000000000 -0600
@@ -1,4 +1,4 @@
-// $ANTLR 2.7.3rc3: "antlr.g" -> "ANTLRParser.java"$
+// $ANTLR 2.7.5 (20050323): "antlr.g" -> "ANTLRParser.java"$
 
 package antlr;
 
@@ -1037,7 +1037,7 @@
 			buf.append(a.getText());
 		}
 		{
-		_loop144:
+		_loop145:
 		do {
 			if ((LA(1)==WILDCARD)) {
 				match(WILDCARD);
@@ -1047,7 +1047,7 @@
 				}
 			}
 			else {
-				break _loop144;
+				break _loop145;
 			}
 			
 		} while (true);
@@ -1290,6 +1290,7 @@
 			String access="public";
 			Token idTok;
 			String doc=null;
+		boolean ruleThisGen = false;
 			boolean ruleAutoGen = true;
 			blockNesting = -1;	// block increments, so -1 to make rule at level 0
 		
@@ -1362,6 +1363,32 @@
 		idTok=id();
 		{
 		switch ( LA(1)) {
+		case CARET:
+		{
+			match(CARET);
+			if ( inputState.guessing==0 ) {
+				ruleThisGen = true;
+			}
+			break;
+		}
+		case ACTION:
+		case OPTIONS:
+		case BANG:
+		case ARG_ACTION:
+		case LITERAL_returns:
+		case COLON:
+		case LITERAL_throws:
+		{
+			break;
+		}
+		default:
+		{
+			throw new NoViableAltException(LT(1), getFilename());
+		}
+		}
+		}
+		{
+		switch ( LA(1)) {
 		case BANG:
 		{
 			match(BANG);
@@ -1387,7 +1414,7 @@
 		}
 		if ( inputState.guessing==0 ) {
 			
-					behavior.defineRuleName(idTok, access, ruleAutoGen, doc);
+					behavior.defineRuleName(idTok, access, ruleAutoGen, ruleThisGen, doc);
 				
 		}
 		{
@@ -1545,7 +1572,7 @@
 			t=a.getText();
 		}
 		{
-		_loop84:
+		_loop85:
 		do {
 			if ((LA(1)==COMMA)) {
 				match(COMMA);
@@ -1555,7 +1582,7 @@
 				}
 			}
 			else {
-				break _loop84;
+				break _loop85;
 			}
 			
 		} while (true);
@@ -1571,7 +1598,7 @@
 		
 		match(OPTIONS);
 		{
-		_loop81:
+		_loop82:
 		do {
 			if ((LA(1)==TOKEN_REF||LA(1)==RULE_REF)) {
 				idTok=id();
@@ -1583,7 +1610,7 @@
 				match(SEMI);
 			}
 			else {
-				break _loop81;
+				break _loop82;
 			}
 			
 		} while (true);
@@ -1599,14 +1626,14 @@
 		}
 		alternative();
 		{
-		_loop87:
+		_loop88:
 		do {
 			if ((LA(1)==OR)) {
 				match(OR);
 				alternative();
 			}
 			else {
-				break _loop87;
+				break _loop88;
 			}
 			
 		} while (true);
@@ -1623,17 +1650,17 @@
 			behavior.beginExceptionGroup();
 		}
 		{
-		int _cnt95=0;
-		_loop95:
+		int _cnt96=0;
+		_loop96:
 		do {
 			if ((LA(1)==LITERAL_exception)) {
 				exceptionSpec();
 			}
 			else {
-				if ( _cnt95>=1 ) { break _loop95; } else {throw new NoViableAltException(LT(1), getFilename());}
+				if ( _cnt96>=1 ) { break _loop96; } else {throw new NoViableAltException(LT(1), getFilename());}
 			}
 			
-			_cnt95++;
+			_cnt96++;
 		} while (true);
 		}
 		if ( inputState.guessing==0 ) {
@@ -1682,13 +1709,13 @@
 			behavior.beginAlt(altAutoGen);
 		}
 		{
-		_loop91:
+		_loop92:
 		do {
 			if ((_tokenSet_2.member(LA(1)))) {
 				element();
 			}
 			else {
-				break _loop91;
+				break _loop92;
 			}
 			
 		} while (true);
@@ -1761,13 +1788,13 @@
 			behavior.beginExceptionSpec(null);
 		}
 		{
-		_loop102:
+		_loop103:
 		do {
 			if ((LA(1)==LITERAL_catch)) {
 				exceptionHandler();
 			}
 			else {
-				break _loop102;
+				break _loop103;
 			}
 			
 		} while (true);
@@ -1819,13 +1846,13 @@
 			behavior.beginExceptionSpec(labelAction);
 		}
 		{
-		_loop99:
+		_loop100:
 		do {
 			if ((LA(1)==LITERAL_catch)) {
 				exceptionHandler();
 			}
 			else {
-				break _loop99;
+				break _loop100;
 			}
 			
 		} while (true);
@@ -2202,7 +2229,7 @@
 			behavior.refElementOption(o,v);
 		}
 		{
-		_loop108:
+		_loop109:
 		do {
 			if ((LA(1)==SEMI)) {
 				match(SEMI);
@@ -2214,7 +2241,7 @@
 				}
 			}
 			else {
-				break _loop108;
+				break _loop109;
 			}
 			
 		} while (true);
@@ -2751,17 +2778,17 @@
 			behavior.beginChildList();
 		}
 		{
-		int _cnt122=0;
-		_loop122:
+		int _cnt123=0;
+		_loop123:
 		do {
 			if ((_tokenSet_2.member(LA(1)))) {
 				element();
 			}
 			else {
-				if ( _cnt122>=1 ) { break _loop122; } else {throw new NoViableAltException(LT(1), getFilename());}
+				if ( _cnt123>=1 ) { break _loop123; } else {throw new NoViableAltException(LT(1), getFilename());}
 			}
 			
-			_cnt122++;
+			_cnt123++;
 		} while (true);
 		}
 		if ( inputState.guessing==0 ) {
@@ -2881,6 +2908,7 @@
 		"\"protected\"",
 		"\"public\"",
 		"\"private\"",
+		"CARET",
 		"BANG",
 		"ARG_ACTION",
 		"\"returns\"",
@@ -2897,7 +2925,6 @@
 		"STAR",
 		"PLUS",
 		"IMPLIES",
-		"CARET",
 		"WILDCARD",
 		"\"options\"",
 		"WS",
@@ -2915,37 +2942,37 @@
 	};
 	
 	private static final long[] mk_tokenSet_0() {
-		long[] data = { 2206556225792L, 0L};
+		long[] data = { 4405579481344L, 0L};
 		return data;
 	}
 	public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
 	private static final long[] mk_tokenSet_1() {
-		long[] data = { 2472844214400L, 0L};
+		long[] data = { 4946745376896L, 0L};
 		return data;
 	}
 	public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
 	private static final long[] mk_tokenSet_2() {
-		long[] data = { 1158885407195328L, 0L};
+		long[] data = { 1191870756028608L, 0L};
 		return data;
 	}
 	public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
 	private static final long[] mk_tokenSet_3() {
-		long[] data = { 1159461236965568L, 0L};
+		long[] data = { 1193022111416512L, 0L};
 		return data;
 	}
 	public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
 	private static final long[] mk_tokenSet_4() {
-		long[] data = { 1132497128128576L, 0L};
+		long[] data = { 1139094197895232L, 0L};
 		return data;
 	}
 	public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
 	private static final long[] mk_tokenSet_5() {
-		long[] data = { 1722479914074304L, 0L};
+		long[] data = { 1193168144515264L, 0L};
 		return data;
 	}
 	public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
 	private static final long[] mk_tokenSet_6() {
-		long[] data = { 1722411194597568L, 0L};
+		long[] data = { 1193030705561792L, 0L};
 		return data;
 	}
 	public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
@@ -2955,22 +2982,22 @@
 	}
 	public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
 	private static final long[] mk_tokenSet_8() {
-		long[] data = { 1722411190386880L, 0L};
+		long[] data = { 1193030701351104L, 0L};
 		return data;
 	}
 	public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
 	private static final long[] mk_tokenSet_9() {
-		long[] data = { 1159444023476416L, 0L};
+		long[] data = { 1192987718058176L, 0L};
 		return data;
 	}
 	public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
 	private static final long[] mk_tokenSet_10() {
-		long[] data = { 2251345007067328L, 0L};
+		long[] data = { 2250898330468544L, 0L};
 		return data;
 	}
 	public static final BitSet _tokenSet_10 = new BitSet(mk_tokenSet_10());
 	private static final long[] mk_tokenSet_11() {
-		long[] data = { 1721861130420416L, 0L};
+		long[] data = { 1191930885570752L, 0L};
 		return data;
 	}
 	public static final BitSet _tokenSet_11 = new BitSet(mk_tokenSet_11());
diff -ur antlr-2.7.5/antlr/ANTLRTokdefLexer.java antlr-2.7.5+/antlr/ANTLRTokdefLexer.java
--- antlr-2.7.5/antlr/ANTLRTokdefLexer.java	2005-01-28 15:13:38.000000000 -0600
+++ antlr-2.7.5+/antlr/ANTLRTokdefLexer.java	2005-03-23 20:05:10.000000000 -0600
@@ -1,4 +1,4 @@
-// $ANTLR : "tokdef.g" -> "ANTLRTokdefLexer.java"$
+// $ANTLR 2.7.5 (20050323): "tokdef.g" -> "ANTLRTokdefLexer.java"$
  package antlr; 
 import java.io.InputStream;
 import antlr.TokenStreamException;
@@ -200,7 +200,7 @@
 		
 		match("//");
 		{
-		_loop234:
+		_loop12:
 		do {
 			if ((_tokenSet_0.member(LA(1)))) {
 				{
@@ -208,7 +208,7 @@
 				}
 			}
 			else {
-				break _loop234;
+				break _loop12;
 			}
 			
 		} while (true);
@@ -254,7 +254,7 @@
 		
 		match("/*");
 		{
-		_loop239:
+		_loop17:
 		do {
 			if ((LA(1)=='*') && (_tokenSet_1.member(LA(2)))) {
 				match('*');
@@ -268,7 +268,7 @@
 				matchNot('*');
 			}
 			else {
-				break _loop239;
+				break _loop17;
 			}
 			
 		} while (true);
@@ -328,7 +328,7 @@
 		
 		match('"');
 		{
-		_loop245:
+		_loop23:
 		do {
 			if ((LA(1)=='\\')) {
 				mESC(false);
@@ -337,7 +337,7 @@
 				matchNot('"');
 			}
 			else {
-				break _loop245;
+				break _loop23;
 			}
 			
 		} while (true);
@@ -553,7 +553,7 @@
 		}
 		}
 		{
-		_loop258:
+		_loop36:
 		do {
 			switch ( LA(1)) {
 			case 'a':  case 'b':  case 'c':  case 'd':
@@ -592,7 +592,7 @@
 			}
 			default:
 			{
-				break _loop258;
+				break _loop36;
 			}
 			}
 		} while (true);
@@ -610,17 +610,17 @@
 		int _saveIndex;
 		
 		{
-		int _cnt261=0;
-		_loop261:
+		int _cnt39=0;
+		_loop39:
 		do {
 			if (((LA(1) >= '0' && LA(1) <= '9'))) {
 				mDIGIT(false);
 			}
 			else {
-				if ( _cnt261>=1 ) { break _loop261; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
+				if ( _cnt39>=1 ) { break _loop39; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
 			}
 			
-			_cnt261++;
+			_cnt39++;
 		} while (true);
 		}
 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
diff -ur antlr-2.7.5/antlr/ANTLRTokdefParser.java antlr-2.7.5+/antlr/ANTLRTokdefParser.java
--- antlr-2.7.5/antlr/ANTLRTokdefParser.java	2005-01-28 15:13:38.000000000 -0600
+++ antlr-2.7.5+/antlr/ANTLRTokdefParser.java	2005-03-23 20:05:10.000000000 -0600
@@ -1,4 +1,4 @@
-// $ANTLR : "tokdef.g" -> "ANTLRTokdefParser.java"$
+// $ANTLR 2.7.5 (20050323): "tokdef.g" -> "ANTLRTokdefParser.java"$
  package antlr; 
 import antlr.TokenBuffer;
 import antlr.TokenStreamException;
@@ -116,13 +116,13 @@
 			name = LT(1);
 			match(ID);
 			{
-			_loop225:
+			_loop3:
 			do {
 				if ((LA(1)==ID||LA(1)==STRING)) {
 					line(tm);
 				}
 				else {
-					break _loop225;
+					break _loop3;
 				}
 				
 			} while (true);
@@ -130,8 +130,7 @@
 		}
 		catch (RecognitionException ex) {
 			reportError(ex);
-			consume();
-			consumeUntil(_tokenSet_0);
+			recover(ex,_tokenSet_0);
 		}
 	}
 	
@@ -213,8 +212,7 @@
 		}
 		catch (RecognitionException ex) {
 			reportError(ex);
-			consume();
-			consumeUntil(_tokenSet_1);
+			recover(ex,_tokenSet_1);
 		}
 	}
 	
diff -ur antlr-2.7.5/antlr/ANTLRTokdefParserTokenTypes.java antlr-2.7.5+/antlr/ANTLRTokdefParserTokenTypes.java
--- antlr-2.7.5/antlr/ANTLRTokdefParserTokenTypes.java	2005-01-28 15:13:38.000000000 -0600
+++ antlr-2.7.5+/antlr/ANTLRTokdefParserTokenTypes.java	2005-03-23 20:05:10.000000000 -0600
@@ -1,4 +1,4 @@
-// $ANTLR : "tokdef.g" -> "ANTLRTokdefParser.java"$
+// $ANTLR 2.7.5 (20050323): "tokdef.g" -> "ANTLRTokdefParser.java"$
  package antlr; 
 public interface ANTLRTokdefParserTokenTypes {
 	int EOF = 1;
Only in antlr-2.7.5+/antlr: ANTLRTokdefParserTokenTypes.txt
diff -ur antlr-2.7.5/antlr/ANTLRTokenTypes.java antlr-2.7.5+/antlr/ANTLRTokenTypes.java
--- antlr-2.7.5/antlr/ANTLRTokenTypes.java	2005-01-28 15:13:38.000000000 -0600
+++ antlr-2.7.5+/antlr/ANTLRTokenTypes.java	2005-03-23 20:34:22.000000000 -0600
@@ -1,4 +1,4 @@
-// $ANTLR 2.7.3rc3: "antlr.g" -> "ANTLRLexer.java"$
+// $ANTLR 2.7.5 (20050323): "antlr.g" -> "ANTLRLexer.java"$
 
 package antlr;
 
@@ -34,23 +34,23 @@
 	int LITERAL_protected = 30;
 	int LITERAL_public = 31;
 	int LITERAL_private = 32;
-	int BANG = 33;
-	int ARG_ACTION = 34;
-	int LITERAL_returns = 35;
-	int COLON = 36;
-	int LITERAL_throws = 37;
-	int COMMA = 38;
-	int LITERAL_exception = 39;
-	int LITERAL_catch = 40;
-	int RULE_REF = 41;
-	int NOT_OP = 42;
-	int SEMPRED = 43;
-	int TREE_BEGIN = 44;
-	int QUESTION = 45;
-	int STAR = 46;
-	int PLUS = 47;
-	int IMPLIES = 48;
-	int CARET = 49;
+	int CARET = 33;
+	int BANG = 34;
+	int ARG_ACTION = 35;
+	int LITERAL_returns = 36;
+	int COLON = 37;
+	int LITERAL_throws = 38;
+	int COMMA = 39;
+	int LITERAL_exception = 40;
+	int LITERAL_catch = 41;
+	int RULE_REF = 42;
+	int NOT_OP = 43;
+	int SEMPRED = 44;
+	int TREE_BEGIN = 45;
+	int QUESTION = 46;
+	int STAR = 47;
+	int PLUS = 48;
+	int IMPLIES = 49;
 	int WILDCARD = 50;
 	int LITERAL_options = 51;
 	int WS = 52;
Only in antlr-2.7.5+/antlr: ANTLRTokenTypes.txt
diff -ur antlr-2.7.5/antlr/AlternativeBlock.java antlr-2.7.5+/antlr/AlternativeBlock.java
--- antlr-2.7.5/antlr/AlternativeBlock.java	2005-01-28 15:13:38.000000000 -0600
+++ antlr-2.7.5+/antlr/AlternativeBlock.java	2005-03-23 20:21:24.000000000 -0600
@@ -31,6 +31,7 @@
     boolean greedySet = false;		// but, if not explicitly greedy, warning might be generated
 
     protected boolean doAutoGen = true;	// false if no AST (or text) to be generated for block
+    protected boolean doThisGen = false;
 
     protected boolean warnWhenFollowAmbig = true; // warn when an empty path or exit path
 
@@ -77,6 +78,10 @@
         return doAutoGen;
     }
 
+    public boolean getThisGen() {
+        return doThisGen;
+    }
+
     public String getInitAction() {
         return initAction;
     }
@@ -133,6 +138,10 @@
         doAutoGen = doAutoGen_;
     }
 
+    public void setThisGen(boolean doThisGen_) {
+        doThisGen = doThisGen_;
+    }
+
     public void setInitAction(String initAction_) {
         initAction = initAction_;
     }
diff -ur antlr-2.7.5/antlr/DefineGrammarSymbols.java antlr-2.7.5+/antlr/DefineGrammarSymbols.java
--- antlr-2.7.5/antlr/DefineGrammarSymbols.java	2005-01-28 15:13:39.000000000 -0600
+++ antlr-2.7.5+/antlr/DefineGrammarSymbols.java	2005-03-23 20:18:03.000000000 -0600
@@ -119,6 +119,7 @@
     public void defineRuleName(Token r,
                                String access,
                                boolean ruleAutoGen,
+                               boolean ruleThisGen,
                                String docComment)
         throws SemanticException {
         String id = r.getText();
diff -ur antlr-2.7.5/antlr/JavaCodeGenerator.java antlr-2.7.5+/antlr/JavaCodeGenerator.java
--- antlr-2.7.5/antlr/JavaCodeGenerator.java	2005-01-28 15:13:39.000000000 -0600
+++ antlr-2.7.5+/antlr/JavaCodeGenerator.java	2005-03-23 22:01:50.000000000 -0600
@@ -1958,6 +1958,7 @@
                         break;
                     case GrammarElement.AUTO_GEN_CARET:
                         println("astFactory.makeASTRoot(currentAST, " + astName + ");");
+                        println(astName + ".setType(-1);");
                         break;
                     default:
                         break;
@@ -2604,7 +2605,12 @@
 
         // Squirrel away the AST "return" value
         if (grammar.buildAST) {
-            println("returnAST = " + s.getId() + "_AST;");
+            if (rblk.getThisGen()) {
+                println("returnAST = astFactory.create(-1, \"" + s.getId() + "\");");
+                println("returnAST.addChild(" + s.getId() + "_AST);");
+            } else {
+                println("returnAST = " + s.getId() + "_AST;");
+            }
         }
 
         // Set return tree value for tree walkers
diff -ur antlr-2.7.5/antlr/MakeGrammar.java antlr-2.7.5+/antlr/MakeGrammar.java
--- antlr-2.7.5/antlr/MakeGrammar.java	2005-01-28 15:13:39.000000000 -0600
+++ antlr-2.7.5+/antlr/MakeGrammar.java	2005-03-23 20:17:53.000000000 -0600
@@ -217,6 +217,7 @@
     public void defineRuleName(Token r,
                                String access,
                                boolean ruleAutoGen,
+                               boolean ruleThisGen,
                                String docComment)
         throws SemanticException {
         //		if ( Character.isUpperCase(r.getText().charAt(0)) ) {
@@ -237,14 +238,14 @@
             }
         }
 
-        super.defineRuleName(r, access, ruleAutoGen, docComment);
+        super.defineRuleName(r, access, ruleAutoGen, ruleThisGen, docComment);
         String id = r.getText();
         //		if ( Character.isUpperCase(id.charAt(0)) ) { // lexer rule?
         if (r.type == ANTLRTokenTypes.TOKEN_REF) { // lexer rule?
             id = CodeGenerator.encodeLexerRuleName(id);
         }
         RuleSymbol rs = (RuleSymbol)grammar.getSymbol(id);
-        RuleBlock rb = new RuleBlock(grammar, r.getText(), r.getLine(), ruleAutoGen);
+        RuleBlock rb = new RuleBlock(grammar, r.getText(), r.getLine(), ruleAutoGen, ruleThisGen);
 
         // Lexer rules do not generate default error handling
         rb.setDefaultErrorHandler(grammar.getDefaultErrorHandler());
Only in antlr-2.7.5+/antlr: Makefile
diff -ur antlr-2.7.5/antlr/RuleBlock.java antlr-2.7.5+/antlr/RuleBlock.java
--- antlr-2.7.5/antlr/RuleBlock.java	2005-01-28 15:13:39.000000000 -0600
+++ antlr-2.7.5+/antlr/RuleBlock.java	2005-03-23 20:17:29.000000000 -0600
@@ -54,10 +54,11 @@
     }
 
     /** Construct a named rule with line number information */
-    public RuleBlock(Grammar g, String r, int line, boolean doAutoGen_) {
+    public RuleBlock(Grammar g, String r, int line, boolean doAutoGen_, boolean doThisGen_) {
         this(g, r);
         this.line = line;
         setAutoGen(doAutoGen_);
+        setThisGen(doThisGen_);
     }
 
     public void addExceptionSpec(ExceptionSpec ex) {
diff -ur antlr-2.7.5/antlr/Version.java antlr-2.7.5+/antlr/Version.java
--- antlr-2.7.5/antlr/Version.java	2005-01-28 15:13:19.000000000 -0600
+++ antlr-2.7.5+/antlr/Version.java	2005-03-23 19:50:07.000000000 -0600
@@ -3,7 +3,7 @@
 public class Version {  
 	public static final String version    = "2";
 	public static final String subversion = "7";
-	public static final String patchlevel = "5rc2";
-	public static final String datestamp  = "2005-01-08";
-	public static final String project_version = "2.7.5rc2 ("+datestamp+")";
+	public static final String patchlevel = "5";
+	public static final String datestamp  = "20050323";
+	public static final String project_version = "2.7.5 (20050323)";
 }
Only in antlr-2.7.5+/antlr: antlr
diff -ur antlr-2.7.5/antlr/antlr.g antlr-2.7.5+/antlr/antlr.g
--- antlr-2.7.5/antlr/antlr.g	2005-01-28 15:13:39.000000000 -0600
+++ antlr-2.7.5+/antlr/antlr.g	2005-03-23 20:34:21.000000000 -0600
@@ -394,6 +394,7 @@
 	String access="public";
 	Token idTok;
 	String doc=null;
+        boolean ruleThisGen = false;
 	boolean ruleAutoGen = true;
 	blockNesting = -1;	// block increments, so -1 to make rule at level 0
 }
@@ -405,9 +406,10 @@
 	|	p3:"private"	{access=p3.getText();}
 	)?
 	idTok = id
+        ( CARET { ruleThisGen = true; } )?
 	( BANG { ruleAutoGen = false; } )?
 	{
-		behavior.defineRuleName(idTok, access, ruleAutoGen, doc);
+		behavior.defineRuleName(idTok, access, ruleAutoGen, ruleThisGen, doc);
 	}
 	( aa:ARG_ACTION { behavior.refArgAction(aa); }  )?
 	( "returns" rt:ARG_ACTION { behavior.refReturnAction(rt); } )?
Only in antlr-2.7.5+/antlr: antlr.jar
diff -ur antlr-2.7.5/antlr/preprocessor/Hierarchy.java antlr-2.7.5+/antlr/preprocessor/Hierarchy.java
--- antlr-2.7.5/antlr/preprocessor/Hierarchy.java	2005-01-28 15:13:39.000000000 -0600
+++ antlr-2.7.5+/antlr/preprocessor/Hierarchy.java	2005-03-23 20:43:45.000000000 -0600
@@ -107,7 +107,8 @@
             pp.grammarFile(this, file);
         }
         catch (TokenStreamException io) {
-            antlrTool.toolError("Token stream error reading grammar(s):\n" + io);
+            antlrTool.toolError("Token stream error reading grammar(s):\n");
+            io.printStackTrace();
         }
         catch (ANTLRException se) {
             antlrTool.toolError("error reading grammar(s):\n" + se);
diff -ur antlr-2.7.5/antlr/preprocessor/Preprocessor.java antlr-2.7.5+/antlr/preprocessor/Preprocessor.java
--- antlr-2.7.5/antlr/preprocessor/Preprocessor.java	2005-01-28 15:13:19.000000000 -0600
+++ antlr-2.7.5+/antlr/preprocessor/Preprocessor.java	2005-03-23 20:45:04.000000000 -0600
@@ -1,4 +1,4 @@
-// $ANTLR : "preproc.g" -> "Preprocessor.java"$
+// $ANTLR 2.7.5 (20050128): "preproc.g" -> "Preprocessor.java"$
 
 package antlr.preprocessor;
 
@@ -121,7 +121,7 @@
 		
 		try {      // for error handling
 			{
-			_loop265:
+			_loop3:
 			do {
 				if ((LA(1)==HEADER_ACTION)) {
 					hdr = LT(1);
@@ -129,7 +129,7 @@
 					hier.getFile(file).addHeaderAction(hdr.getText());
 				}
 				else {
-					break _loop265;
+					break _loop3;
 				}
 				
 			} while (true);
@@ -154,7 +154,7 @@
 			}
 			}
 			{
-			_loop268:
+			_loop6:
 			do {
 				if ((LA(1)==ACTION||LA(1)==LITERAL_class)) {
 					gr=class_def(file, hier);
@@ -169,7 +169,7 @@
 								
 				}
 				else {
-					break _loop268;
+					break _loop6;
 				}
 				
 			} while (true);
@@ -178,8 +178,7 @@
 		}
 		catch (RecognitionException ex) {
 			reportError(ex);
-			consume();
-			consumeUntil(_tokenSet_0);
+			recover(ex,_tokenSet_0);
 		}
 	}
 	
@@ -197,7 +196,7 @@
 		try {      // for error handling
 			match(OPTIONS_START);
 			{
-			_loop280:
+			_loop18:
 			do {
 				if ((LA(1)==ID)) {
 					op = LT(1);
@@ -220,7 +219,7 @@
 									
 				}
 				else {
-					break _loop280;
+					break _loop18;
 				}
 				
 			} while (true);
@@ -229,8 +228,7 @@
 		}
 		catch (RecognitionException ex) {
 			reportError(ex);
-			consume();
-			consumeUntil(_tokenSet_1);
+			recover(ex,_tokenSet_1);
 		}
 		return options;
 	}
@@ -383,24 +381,23 @@
 			}
 			}
 			{
-			int _cnt277=0;
-			_loop277:
+			int _cnt15=0;
+			_loop15:
 			do {
 				if ((_tokenSet_2.member(LA(1)))) {
 					rule(gr);
 				}
 				else {
-					if ( _cnt277>=1 ) { break _loop277; } else {throw new NoViableAltException(LT(1), getFilename());}
+					if ( _cnt15>=1 ) { break _loop15; } else {throw new NoViableAltException(LT(1), getFilename());}
 				}
 				
-				_cnt277++;
+				_cnt15++;
 			} while (true);
 			}
 		}
 		catch (RecognitionException ex) {
 			reportError(ex);
-			consume();
-			consumeUntil(_tokenSet_3);
+			recover(ex,_tokenSet_3);
 		}
 		return gr;
 	}
@@ -415,8 +412,7 @@
 		}
 		catch (RecognitionException ex) {
 			reportError(ex);
-			consume();
-			consumeUntil(_tokenSet_4);
+			recover(ex,_tokenSet_4);
 		}
 		return sup;
 	}
@@ -433,6 +429,7 @@
 		
 			IndexedVector o = null;	// options for rule
 			String vis = null;
+		boolean caret=false;
 			boolean bang=false;
 			String eg=null, thr="";
 		
@@ -472,6 +469,30 @@
 			match(ID);
 			{
 			switch ( LA(1)) {
+			case CARET:
+			{
+				match(CARET);
+				caret=true;
+				break;
+			}
+			case ACTION:
+			case OPTIONS_START:
+			case BANG:
+			case ARG_ACTION:
+			case LITERAL_returns:
+			case RULE_BLOCK:
+			case LITERAL_throws:
+			{
+				break;
+			}
+			default:
+			{
+				throw new NoViableAltException(LT(1), getFilename());
+			}
+			}
+			}
+			{
+			switch ( LA(1)) {
 			case BANG:
 			{
 				match(BANG);
@@ -619,8 +640,7 @@
 		}
 		catch (RecognitionException ex) {
 			reportError(ex);
-			consume();
-			consumeUntil(_tokenSet_5);
+			recover(ex,_tokenSet_5);
 		}
 	}
 	
@@ -637,7 +657,7 @@
 			match(ID);
 			t+=a.getText();
 			{
-			_loop291:
+			_loop30:
 			do {
 				if ((LA(1)==COMMA)) {
 					match(COMMA);
@@ -646,7 +666,7 @@
 					t+=","+b.getText();
 				}
 				else {
-					break _loop291;
+					break _loop30;
 				}
 				
 			} while (true);
@@ -654,8 +674,7 @@
 		}
 		catch (RecognitionException ex) {
 			reportError(ex);
-			consume();
-			consumeUntil(_tokenSet_6);
+			recover(ex,_tokenSet_6);
 		}
 		return t;
 	}
@@ -667,14 +686,14 @@
 		
 		try {      // for error handling
 			{
-			_loop294:
+			_loop33:
 			do {
 				if ((LA(1)==LITERAL_exception)) {
 					e=exceptionSpec();
 					g += e;
 				}
 				else {
-					break _loop294;
+					break _loop33;
 				}
 				
 			} while (true);
@@ -682,8 +701,7 @@
 		}
 		catch (RecognitionException ex) {
 			reportError(ex);
-			consume();
-			consumeUntil(_tokenSet_5);
+			recover(ex,_tokenSet_5);
 		}
 		return g;
 	}
@@ -726,14 +744,14 @@
 			}
 			}
 			{
-			_loop298:
+			_loop37:
 			do {
 				if ((LA(1)==LITERAL_catch)) {
 					h=exceptionHandler();
 					es += h;
 				}
 				else {
-					break _loop298;
+					break _loop37;
 				}
 				
 			} while (true);
@@ -741,8 +759,7 @@
 		}
 		catch (RecognitionException ex) {
 			reportError(ex);
-			consume();
-			consumeUntil(_tokenSet_7);
+			recover(ex,_tokenSet_7);
 		}
 		return es;
 	}
@@ -765,8 +782,7 @@
 		}
 		catch (RecognitionException ex) {
 			reportError(ex);
-			consume();
-			consumeUntil(_tokenSet_8);
+			recover(ex,_tokenSet_8);
 		}
 		return h;
 	}
@@ -792,6 +808,7 @@
 		"\"protected\"",
 		"\"private\"",
 		"\"public\"",
+		"CARET",
 		"BANG",
 		"ARG_ACTION",
 		"\"returns\"",
@@ -824,7 +841,7 @@
 	}
 	public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
 	private static final long[] mk_tokenSet_1() {
-		long[] data = { 4658050L, 0L};
+		long[] data = { 8852354L, 0L};
 		return data;
 	}
 	public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
@@ -849,17 +866,17 @@
 	}
 	public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
 	private static final long[] mk_tokenSet_6() {
-		long[] data = { 4202624L, 0L};
+		long[] data = { 8396928L, 0L};
 		return data;
 	}
 	public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
 	private static final long[] mk_tokenSet_7() {
-		long[] data = { 34014082L, 0L};
+		long[] data = { 67568514L, 0L};
 		return data;
 	}
 	public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
 	private static final long[] mk_tokenSet_8() {
-		long[] data = { 101122946L, 0L};
+		long[] data = { 201786242L, 0L};
 		return data;
 	}
 	public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
diff -ur antlr-2.7.5/antlr/preprocessor/PreprocessorLexer.java antlr-2.7.5+/antlr/preprocessor/PreprocessorLexer.java
--- antlr-2.7.5/antlr/preprocessor/PreprocessorLexer.java	2005-01-28 15:13:39.000000000 -0600
+++ antlr-2.7.5+/antlr/preprocessor/PreprocessorLexer.java	2005-03-23 20:45:04.000000000 -0600
@@ -1,4 +1,4 @@
-// $ANTLR : "preproc.g" -> "PreprocessorLexer.java"$
+// $ANTLR 2.7.5 (20050128): "preproc.g" -> "PreprocessorLexer.java"$
 
 package antlr.preprocessor;
 
@@ -44,14 +44,14 @@
 	literals = new Hashtable();
 	literals.put(new ANTLRHashString("public", this), new Integer(18));
 	literals.put(new ANTLRHashString("class", this), new Integer(8));
-	literals.put(new ANTLRHashString("throws", this), new Integer(23));
-	literals.put(new ANTLRHashString("catch", this), new Integer(26));
+	literals.put(new ANTLRHashString("throws", this), new Integer(24));
+	literals.put(new ANTLRHashString("catch", this), new Integer(27));
 	literals.put(new ANTLRHashString("private", this), new Integer(17));
 	literals.put(new ANTLRHashString("extends", this), new Integer(10));
 	literals.put(new ANTLRHashString("protected", this), new Integer(16));
-	literals.put(new ANTLRHashString("returns", this), new Integer(21));
+	literals.put(new ANTLRHashString("returns", this), new Integer(22));
 	literals.put(new ANTLRHashString("tokens", this), new Integer(4));
-	literals.put(new ANTLRHashString("exception", this), new Integer(25));
+	literals.put(new ANTLRHashString("exception", this), new Integer(26));
 }
 
 public Token nextToken() throws TokenStreamException {
@@ -100,6 +100,12 @@
 					theRetToken=_returnToken;
 					break;
 				}
+				case '^':
+				{
+					mCARET(true);
+					theRetToken=_returnToken;
+					break;
+				}
 				case '!':
 				{
 					mBANG(true);
@@ -236,7 +242,7 @@
 		}
 		}
 		{
-		_loop306:
+		_loop45:
 		do {
 			if ((LA(1)=='|')) {
 				match('|');
@@ -275,7 +281,7 @@
 				}
 			}
 			else {
-				break _loop306;
+				break _loop45;
 			}
 			
 		} while (true);
@@ -294,8 +300,8 @@
 		int _saveIndex;
 		
 		{
-		int _cnt348=0;
-		_loop348:
+		int _cnt88=0;
+		_loop88:
 		do {
 			if ((LA(1)==' ') && (true)) {
 				match(' ');
@@ -307,10 +313,10 @@
 				mNEWLINE(false);
 			}
 			else {
-				if ( _cnt348>=1 ) { break _loop348; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
+				if ( _cnt88>=1 ) { break _loop88; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
 			}
 			
-			_cnt348++;
+			_cnt88++;
 		} while (true);
 		}
 		_ttype = Token.SKIP;
@@ -327,13 +333,13 @@
 		int _saveIndex;
 		
 		{
-		_loop317:
+		_loop56:
 		do {
 			if ((_tokenSet_3.member(LA(1))) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
 				mELEMENT(false);
 			}
 			else {
-				break _loop317;
+				break _loop56;
 			}
 			
 		} while (true);
@@ -364,7 +370,7 @@
 		}
 		mALT(false);
 		{
-		_loop312:
+		_loop51:
 		do {
 			if ((_tokenSet_4.member(LA(1))) && (_tokenSet_0.member(LA(2)))) {
 				{
@@ -399,7 +405,7 @@
 				mALT(false);
 			}
 			else {
-				break _loop312;
+				break _loop51;
 			}
 			
 		} while (true);
@@ -531,10 +537,10 @@
 		
 		match('{');
 		{
-		_loop378:
+		_loop118:
 		do {
 			// nongreedy exit test
-			if ((LA(1)=='}') && (true)) break _loop378;
+			if ((LA(1)=='}') && (true)) break _loop118;
 			if ((LA(1)=='\n'||LA(1)=='\r') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
 				mNEWLINE(false);
 			}
@@ -554,7 +560,7 @@
 				matchNot(EOF_CHAR);
 			}
 			else {
-				break _loop378;
+				break _loop118;
 			}
 			
 		} while (true);
@@ -574,7 +580,7 @@
 		
 		match('"');
 		{
-		_loop363:
+		_loop103:
 		do {
 			if ((LA(1)=='\\')) {
 				mESC(false);
@@ -583,7 +589,7 @@
 				matchNot('"');
 			}
 			else {
-				break _loop363;
+				break _loop103;
 			}
 			
 		} while (true);
@@ -653,6 +659,19 @@
 		_returnToken = _token;
 	}
 	
+	public final void mCARET(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+		int _ttype; Token _token=null; int _begin=text.length();
+		_ttype = CARET;
+		int _saveIndex;
+		
+		match('^');
+		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+			_token = makeToken(_ttype);
+			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+		}
+		_returnToken = _token;
+	}
+	
 	public final void mBANG(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
 		int _ttype; Token _token=null; int _begin=text.length();
 		_ttype = BANG;
@@ -779,7 +798,7 @@
 			}
 			}
 			{
-			_loop331:
+			_loop71:
 			do {
 				switch ( LA(1)) {
 				case '\t':  case '\n':  case '\r':  case ' ':
@@ -794,7 +813,7 @@
 				}
 				default:
 				{
-					break _loop331;
+					break _loop71;
 				}
 				}
 			} while (true);
@@ -804,7 +823,7 @@
 		}
 		else if (((_tokenSet_10.member(LA(1))) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')))&&(id.getText().equals("tokens"))) {
 			{
-			_loop333:
+			_loop73:
 			do {
 				switch ( LA(1)) {
 				case '\t':  case '\n':  case '\r':  case ' ':
@@ -819,7 +838,7 @@
 				}
 				default:
 				{
-					break _loop333;
+					break _loop73;
 				}
 				}
 			} while (true);
@@ -829,7 +848,7 @@
 		}
 		else if (((_tokenSet_10.member(LA(1))) && (true))&&(id.getText().equals("options"))) {
 			{
-			_loop335:
+			_loop75:
 			do {
 				switch ( LA(1)) {
 				case '\t':  case '\n':  case '\r':  case ' ':
@@ -844,7 +863,7 @@
 				}
 				default:
 				{
-					break _loop335;
+					break _loop75;
 				}
 				}
 			} while (true);
@@ -904,7 +923,7 @@
 		}
 		}
 		{
-		_loop342:
+		_loop82:
 		do {
 			switch ( LA(1)) {
 			case 'a':  case 'b':  case 'c':  case 'd':
@@ -943,7 +962,7 @@
 			}
 			default:
 			{
-				break _loop342;
+				break _loop82;
 			}
 			}
 		} while (true);
@@ -963,10 +982,10 @@
 		
 		match('{');
 		{
-		_loop338:
+		_loop78:
 		do {
 			// nongreedy exit test
-			if ((LA(1)=='}') && (true)) break _loop338;
+			if ((LA(1)=='}') && (true)) break _loop78;
 			if ((LA(1)=='\n'||LA(1)=='\r') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
 				mNEWLINE(false);
 			}
@@ -983,7 +1002,7 @@
 				matchNot(EOF_CHAR);
 			}
 			else {
-				break _loop338;
+				break _loop78;
 			}
 			
 		} while (true);
@@ -1005,10 +1024,10 @@
 		match('=');
 		text.setLength(_saveIndex);
 		{
-		_loop345:
+		_loop85:
 		do {
 			// nongreedy exit test
-			if ((LA(1)==';') && (true)) break _loop345;
+			if ((LA(1)==';') && (true)) break _loop85;
 			if ((LA(1)=='"') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
 				mSTRING_LITERAL(false);
 			}
@@ -1022,7 +1041,7 @@
 				matchNot(EOF_CHAR);
 			}
 			else {
-				break _loop345;
+				break _loop85;
 			}
 			
 		} while (true);
@@ -1042,15 +1061,15 @@
 		
 		match("//");
 		{
-		_loop355:
+		_loop95:
 		do {
 			// nongreedy exit test
-			if ((LA(1)=='\n'||LA(1)=='\r') && (true)) break _loop355;
+			if ((LA(1)=='\n'||LA(1)=='\r') && (true)) break _loop95;
 			if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
 				matchNot(EOF_CHAR);
 			}
 			else {
-				break _loop355;
+				break _loop95;
 			}
 			
 		} while (true);
@@ -1070,10 +1089,10 @@
 		
 		match("/*");
 		{
-		_loop358:
+		_loop98:
 		do {
 			// nongreedy exit test
-			if ((LA(1)=='*') && (LA(2)=='/')) break _loop358;
+			if ((LA(1)=='*') && (LA(2)=='/')) break _loop98;
 			if ((LA(1)=='\n'||LA(1)=='\r') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
 				mNEWLINE(false);
 			}
@@ -1081,7 +1100,7 @@
 				matchNot(EOF_CHAR);
 			}
 			else {
-				break _loop358;
+				break _loop98;
 			}
 			
 		} while (true);
@@ -1278,10 +1297,10 @@
 		
 		match('[');
 		{
-		_loop375:
+		_loop115:
 		do {
 			// nongreedy exit test
-			if ((LA(1)==']') && (true)) break _loop375;
+			if ((LA(1)==']') && (true)) break _loop115;
 			if ((LA(1)=='[') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
 				mARG_ACTION(false);
 			}
@@ -1298,7 +1317,7 @@
 				matchNot(EOF_CHAR);
 			}
 			else {
-				break _loop375;
+				break _loop115;
 			}
 			
 		} while (true);
diff -ur antlr-2.7.5/antlr/preprocessor/PreprocessorTokenTypes.java antlr-2.7.5+/antlr/preprocessor/PreprocessorTokenTypes.java
--- antlr-2.7.5/antlr/preprocessor/PreprocessorTokenTypes.java	2005-01-28 15:13:19.000000000 -0600
+++ antlr-2.7.5+/antlr/preprocessor/PreprocessorTokenTypes.java	2005-03-23 20:45:04.000000000 -0600
@@ -1,4 +1,4 @@
-// $ANTLR : "preproc.g" -> "Preprocessor.java"$
+// $ANTLR 2.7.5 (20050128): "preproc.g" -> "Preprocessor.java"$
 
 package antlr.preprocessor;
 
@@ -20,28 +20,29 @@
 	int LITERAL_protected = 16;
 	int LITERAL_private = 17;
 	int LITERAL_public = 18;
-	int BANG = 19;
-	int ARG_ACTION = 20;
-	int LITERAL_returns = 21;
-	int RULE_BLOCK = 22;
-	int LITERAL_throws = 23;
-	int COMMA = 24;
-	int LITERAL_exception = 25;
-	int LITERAL_catch = 26;
-	int ALT = 27;
-	int ELEMENT = 28;
-	int LPAREN = 29;
-	int RPAREN = 30;
-	int ID_OR_KEYWORD = 31;
-	int CURLY_BLOCK_SCARF = 32;
-	int WS = 33;
-	int NEWLINE = 34;
-	int COMMENT = 35;
-	int SL_COMMENT = 36;
-	int ML_COMMENT = 37;
-	int CHAR_LITERAL = 38;
-	int STRING_LITERAL = 39;
-	int ESC = 40;
-	int DIGIT = 41;
-	int XDIGIT = 42;
+	int CARET = 19;
+	int BANG = 20;
+	int ARG_ACTION = 21;
+	int LITERAL_returns = 22;
+	int RULE_BLOCK = 23;
+	int LITERAL_throws = 24;
+	int COMMA = 25;
+	int LITERAL_exception = 26;
+	int LITERAL_catch = 27;
+	int ALT = 28;
+	int ELEMENT = 29;
+	int LPAREN = 30;
+	int RPAREN = 31;
+	int ID_OR_KEYWORD = 32;
+	int CURLY_BLOCK_SCARF = 33;
+	int WS = 34;
+	int NEWLINE = 35;
+	int COMMENT = 36;
+	int SL_COMMENT = 37;
+	int ML_COMMENT = 38;
+	int CHAR_LITERAL = 39;
+	int STRING_LITERAL = 40;
+	int ESC = 41;
+	int DIGIT = 42;
+	int XDIGIT = 43;
 }
Only in antlr-2.7.5+/antlr/preprocessor: PreprocessorTokenTypes.txt
diff -ur antlr-2.7.5/antlr/preprocessor/preproc.g antlr-2.7.5+/antlr/preprocessor/preproc.g
--- antlr-2.7.5/antlr/preprocessor/preproc.g	2005-01-28 15:13:39.000000000 -0600
+++ antlr-2.7.5+/antlr/preprocessor/preproc.g	2005-03-23 20:40:29.000000000 -0600
@@ -181,6 +181,7 @@
 {
 	IndexedVector o = null;	// options for rule
 	String vis = null;
+        boolean caret=false;
 	boolean bang=false;
 	String eg=null, thr="";
 }
@@ -189,6 +190,7 @@
 		|	"public"	{vis="public";}
 		)?
 		r:ID
+                ( CARET {caret=true;} )?
 		( BANG {bang=true;} )?
 		( arg:ARG_ACTION )?
 		( "returns" ret:ARG_ACTION )?
@@ -290,6 +292,10 @@
 	|	~('\n' | '\r' | '(' | ')' | '/' | '{' | '"' | '\'' | ';')
 	;
 
+CARET:
+        '^'
+        ;
+
 BANG:	'!'
 	;
 
Only in antlr-2.7.5+: config.log
Only in antlr-2.7.5+: config.status
Only in antlr-2.7.5+/doc: Makefile
Only in antlr-2.7.5+/examples: Makefile
Only in antlr-2.7.5+/examples/cpp/ASTsupport: Makefile
Only in antlr-2.7.5+/examples/cpp/HTML: Makefile
Only in antlr-2.7.5+/examples/cpp/IDL: Makefile
Only in antlr-2.7.5+/examples/cpp: Makefile
Only in antlr-2.7.5+/examples/cpp/calc: Makefile
Only in antlr-2.7.5+/examples/cpp/exprAST: Makefile
Only in antlr-2.7.5+/examples/cpp/filter: Makefile
Only in antlr-2.7.5+/examples/cpp/filterWithRule: Makefile
Only in antlr-2.7.5+/examples/cpp/flexLexer: Makefile
Only in antlr-2.7.5+/examples/cpp/imagNodeAST: Makefile
Only in antlr-2.7.5+/examples/cpp/includeFile: Makefile
Only in antlr-2.7.5+/examples/cpp/inherit.tinyc: Makefile
Only in antlr-2.7.5+/examples/cpp/java: Makefile
Only in antlr-2.7.5+/examples/cpp/lexRewrite: Makefile
Only in antlr-2.7.5+/examples/cpp/multiLexer: Makefile
Only in antlr-2.7.5+/examples/cpp/multiParser: Makefile
Only in antlr-2.7.5+/examples/cpp/parseBinary: Makefile
Only in antlr-2.7.5+/examples/cpp/preserveWhiteSpace: Makefile
Only in antlr-2.7.5+/examples/cpp/tinyc: Makefile
Only in antlr-2.7.5+/examples/cpp/tokenStreamRewrite: Makefile
Only in antlr-2.7.5+/examples/cpp/transform: Makefile
Only in antlr-2.7.5+/examples/cpp/treewalk: Makefile
Only in antlr-2.7.5+/examples/cpp/unicode: Makefile
Only in antlr-2.7.5+/examples/csharp/ASTsupport: Makefile
Only in antlr-2.7.5+/examples/csharp/HTML: Makefile
Only in antlr-2.7.5+/examples/csharp/IDL: Makefile
Only in antlr-2.7.5+/examples/csharp: Makefile
Only in antlr-2.7.5+/examples/csharp/ParseTreeDebug: Makefile
Only in antlr-2.7.5+/examples/csharp/TokenStreamRewrite: Makefile
Only in antlr-2.7.5+/examples/csharp/calc: Makefile
Only in antlr-2.7.5+/examples/csharp/columns: Makefile
Only in antlr-2.7.5+/examples/csharp/exprAST: Makefile
Only in antlr-2.7.5+/examples/csharp/filter: Makefile
Only in antlr-2.7.5+/examples/csharp/filterWithRule: Makefile
Only in antlr-2.7.5+/examples/csharp/heteroAST: Makefile
Only in antlr-2.7.5+/examples/csharp/java: Makefile
Only in antlr-2.7.5/examples/csharp/multiLexer: CommonTokenTypes.txt
Only in antlr-2.7.5+/examples/csharp/multiLexer: Makefile
Only in antlr-2.7.5+/examples/csharp/parseBinary: Makefile
Only in antlr-2.7.5+/examples/csharp/preserveWhiteSpace: Makefile
Only in antlr-2.7.5+/examples/csharp/tinyc: Makefile
Only in antlr-2.7.5+/examples/csharp/unicode: Makefile
Only in antlr-2.7.5+/examples/java/ASTsupport: Makefile
Only in antlr-2.7.5+/examples/java/HTML: Makefile
Only in antlr-2.7.5+/examples/java/IDL: Makefile
Only in antlr-2.7.5+/examples/java: Makefile
Only in antlr-2.7.5+/examples/java/calc: Makefile
Only in antlr-2.7.5+/examples/java/columns: Makefile
Only in antlr-2.7.5+/examples/java/cpp: Makefile
Only in antlr-2.7.5+/examples/java/exprAST: Makefile
Only in antlr-2.7.5+/examples/java/filter: Makefile
Only in antlr-2.7.5+/examples/java/filterWithRule: Makefile
Only in antlr-2.7.5+/examples/java/heteroAST: Makefile
Only in antlr-2.7.5+/examples/java/imagNodeAST: Makefile
Only in antlr-2.7.5+/examples/java/includeFile: Makefile
Only in antlr-2.7.5+/examples/java/inherit.tinyc: Makefile
Only in antlr-2.7.5+/examples/java/java: Makefile
Only in antlr-2.7.5+/examples/java/lexRewrite: Makefile
Only in antlr-2.7.5+/examples/java/linkChecker: Makefile
Only in antlr-2.7.5/examples/java/multiLexer: CommonTokenTypes.txt
Only in antlr-2.7.5+/examples/java/multiLexer: Makefile
Only in antlr-2.7.5+/examples/java/parseBinary: Makefile
Only in antlr-2.7.5+/examples/java/pascal: Makefile
Only in antlr-2.7.5+/examples/java/preserveWhiteSpace: Makefile
Only in antlr-2.7.5+/examples/java/tinybasic: Makefile
Only in antlr-2.7.5+/examples/java/tinyc: Makefile
Only in antlr-2.7.5+/examples/java/transform: Makefile
Only in antlr-2.7.5+/examples/java/treewalk: Makefile
Only in antlr-2.7.5+/examples/java/unicode: Makefile
Only in antlr-2.7.5+/examples/java/unicode.IDENTs: Makefile
Only in antlr-2.7.5+/examples/java/xml: Makefile
Only in antlr-2.7.5+/examples/python/ASTsupport: Makefile
Only in antlr-2.7.5+/examples/python/HTML: Makefile
Only in antlr-2.7.5+/examples/python/IDL: Makefile
Only in antlr-2.7.5+/examples/python: Makefile
Only in antlr-2.7.5+/examples/python/asn1: Makefile
Only in antlr-2.7.5+/examples/python/calc: Makefile
Only in antlr-2.7.5+/examples/python/columns: Makefile
Only in antlr-2.7.5+/examples/python/cpp: Makefile
Only in antlr-2.7.5+/examples/python/exprAST: Makefile
Only in antlr-2.7.5+/examples/python/filter: Makefile
Only in antlr-2.7.5+/examples/python/filterWithRule: Makefile
Only in antlr-2.7.5+/examples/python/heteroAST: Makefile
Only in antlr-2.7.5+/examples/python/imagNodeAST: Makefile
Only in antlr-2.7.5+/examples/python/includeFile: Makefile
Only in antlr-2.7.5+/examples/python/inherit.tinyc: Makefile
Only in antlr-2.7.5/examples/python/inherit.tinyc: tinyc_l.g
Only in antlr-2.7.5/examples/python/inherit.tinyc: tinyc_p.g
Only in antlr-2.7.5+/examples/python/java: Makefile
Only in antlr-2.7.5+/examples/python/lexRewrite: Makefile
Only in antlr-2.7.5+/examples/python/lexerTester: Makefile
Only in antlr-2.7.5+/examples/python/linkChecker: Makefile
Only in antlr-2.7.5+/examples/python/multiLexer: Makefile
Only in antlr-2.7.5+/examples/python/multiParser: Makefile
Only in antlr-2.7.5+/examples/python/parseBinary: Makefile
Only in antlr-2.7.5+/examples/python/pascal: Makefile
Only in antlr-2.7.5+/examples/python/preserveWhiteSpace: Makefile
Only in antlr-2.7.5+/examples/python/tinybasic: Makefile
Only in antlr-2.7.5+/examples/python/tinyc: Makefile
Only in antlr-2.7.5+/examples/python/transform: Makefile
Only in antlr-2.7.5+/examples/python/treewalk: Makefile
Only in antlr-2.7.5+/examples/python/unicode: Makefile
Only in antlr-2.7.5+/examples/python/unicode.IDENTs: Makefile
Only in antlr-2.7.5+/examples/python/xml: Makefile
Only in antlr-2.7.5+/lib: Makefile
Only in antlr-2.7.5+/lib: antlr.astframe.dll
Only in antlr-2.7.5+/lib: antlr.jar
Only in antlr-2.7.5+/lib: antlr.runtime.dll
Only in antlr-2.7.5+/lib/cpp: Makefile
Only in antlr-2.7.5+/lib/cpp/antlr: Makefile
Only in antlr-2.7.5+/lib/cpp/src: ANTLRUtil.o
Only in antlr-2.7.5+/lib/cpp/src: ASTFactory.o
Only in antlr-2.7.5+/lib/cpp/src: ASTNULLType.o
Only in antlr-2.7.5+/lib/cpp/src: ASTRefCount.o
Only in antlr-2.7.5+/lib/cpp/src: BaseAST.o
Only in antlr-2.7.5+/lib/cpp/src: BitSet.o
Only in antlr-2.7.5+/lib/cpp/src: CharBuffer.o
Only in antlr-2.7.5+/lib/cpp/src: CharScanner.o
Only in antlr-2.7.5+/lib/cpp/src: CommonAST.o
Only in antlr-2.7.5+/lib/cpp/src: CommonASTWithHiddenTokens.o
Only in antlr-2.7.5+/lib/cpp/src: CommonHiddenStreamToken.o
Only in antlr-2.7.5+/lib/cpp/src: CommonToken.o
Only in antlr-2.7.5+/lib/cpp/src: InputBuffer.o
Only in antlr-2.7.5+/lib/cpp/src: LLkParser.o
Only in antlr-2.7.5+/lib/cpp/src: Makefile
Only in antlr-2.7.5+/lib/cpp/src: MismatchedCharException.o
Only in antlr-2.7.5+/lib/cpp/src: MismatchedTokenException.o
Only in antlr-2.7.5+/lib/cpp/src: NoViableAltException.o
Only in antlr-2.7.5+/lib/cpp/src: NoViableAltForCharException.o
Only in antlr-2.7.5+/lib/cpp/src: Parser.o
Only in antlr-2.7.5+/lib/cpp/src: RecognitionException.o
Only in antlr-2.7.5+/lib/cpp/src: String.o
Only in antlr-2.7.5+/lib/cpp/src: Token.o
Only in antlr-2.7.5+/lib/cpp/src: TokenBuffer.o
Only in antlr-2.7.5+/lib/cpp/src: TokenRefCount.o
Only in antlr-2.7.5+/lib/cpp/src: TokenStreamBasicFilter.o
Only in antlr-2.7.5+/lib/cpp/src: TokenStreamHiddenTokenFilter.o
Only in antlr-2.7.5+/lib/cpp/src: TokenStreamRewriteEngine.o
Only in antlr-2.7.5+/lib/cpp/src: TokenStreamSelector.o
Only in antlr-2.7.5+/lib/cpp/src: TreeParser.o
Only in antlr-2.7.5+/lib/cpp/src: libantlr.a
Only in antlr-2.7.5+/lib/csharp/ASTFrame: Makefile
Only in antlr-2.7.5+/lib/csharp/ASTFrame: antlr.astframe.dll
Only in antlr-2.7.5+/lib/csharp: Makefile
Only in antlr-2.7.5+/lib/csharp/src: Makefile
Only in antlr-2.7.5+/lib/python: Makefile
Only in antlr-2.7.5+/scripts: antlr-config
Only in antlr-2.7.5+/scripts: antlr.sh
Only in antlr-2.7.5+/scripts: antlr.spec
Only in antlr-2.7.5+/scripts: c.sh
Only in antlr-2.7.5+/scripts: config.deps
Only in antlr-2.7.5+/scripts: config.make
Only in antlr-2.7.5+/scripts: config.vars
Only in antlr-2.7.5+/scripts: cpp.sh
Only in antlr-2.7.5+/scripts: csc.sh
Only in antlr-2.7.5+/scripts: cxx.sh
Only in antlr-2.7.5+/scripts: jar.sh
Only in antlr-2.7.5+/scripts: java.sh
Only in antlr-2.7.5+/scripts: javac.sh
Only in antlr-2.7.5+/scripts: lib.sh
Only in antlr-2.7.5+/scripts: link.sh
Only in antlr-2.7.5+/scripts: pyantlr.sh
Only in antlr-2.7.5+/scripts: python.sh
Only in antlr-2.7.5+/scripts: run-antlr
