Add null check

This commit is contained in:
Sam Harwell 2012-07-18 15:42:38 -05:00
parent 84e1025801
commit 6045bd4eb5
1 changed files with 1 additions and 1 deletions

View File

@ -280,7 +280,7 @@ public class SymbolChecks {
g.fileName, ref.token, ruleName);
}
GrammarAST arg = (GrammarAST)ref.getChild(0);
if ( arg!=null && r.args==null ) {
if ( arg!=null && (r==null || r.args==null) ) {
errMgr.grammarError(ErrorType.RULE_HAS_NO_ARGS,
g.fileName, ref.token, ruleName);