rm bad error

[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8865]
This commit is contained in:
parrt 2011-07-16 12:01:44 -08:00
parent 65396e6d7c
commit 8de1408365
1 changed files with 8 additions and 6 deletions

View File

@ -262,7 +262,7 @@ public class BasicSemanticChecks extends GrammarTreeVisitor {
@Override
public void wildcardRef(GrammarAST ref, GrammarAST options) {
checkWildcardRoot(ref.token);
checkWildcardRoot(ref);
}
// Routines to do the actual work of checking issues with a grammar.
@ -539,11 +539,13 @@ public class BasicSemanticChecks extends GrammarTreeVisitor {
}
}
void checkWildcardRoot(Token wild) {
String fileName = wild.getInputStream().getSourceName();
g.tool.errMgr.grammarError(ErrorType.WILDCARD_AS_ROOT,
fileName,
wild);
void checkWildcardRoot(GrammarAST wild) {
if ( wild.getParent().getType()==ANTLRParser.TREE_BEGIN ) {
String fileName = wild.token.getInputStream().getSourceName();
g.tool.errMgr.grammarError(ErrorType.WILDCARD_AS_ROOT,
fileName,
wild.token);
}
}
void checkImport(Token importID) {