From 94071d7d82feb06445dac219a7b9cea20f68b513 Mon Sep 17 00:00:00 2001 From: Terence Parr Date: Fri, 1 Jun 2012 17:35:13 -0700 Subject: [PATCH] prevent negative indexes --- tool/src/org/antlr/v4/tool/Grammar.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tool/src/org/antlr/v4/tool/Grammar.java b/tool/src/org/antlr/v4/tool/Grammar.java index 960c71bf3..ef8b52ba0 100644 --- a/tool/src/org/antlr/v4/tool/Grammar.java +++ b/tool/src/org/antlr/v4/tool/Grammar.java @@ -51,13 +51,11 @@ import org.antlr.v4.runtime.misc.NotNull; import org.antlr.v4.runtime.misc.Nullable; import org.antlr.v4.tool.ast.ActionAST; import org.antlr.v4.tool.ast.GrammarAST; -import org.antlr.v4.tool.ast.GrammarASTErrorNode; import org.antlr.v4.tool.ast.GrammarASTWithOptions; import org.antlr.v4.tool.ast.GrammarRootAST; import org.antlr.v4.tool.ast.PredAST; import org.antlr.v4.tool.ast.TerminalAST; -import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; @@ -450,7 +448,7 @@ public class Grammar implements AttributeResolver { tokenName = "EOF"; } else { - if ( ttype0 && ttype