forked from jasder/antlr
rm bad error
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8865]
This commit is contained in:
parent
65396e6d7c
commit
8de1408365
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue