private boolean isAbstract(String source){
  int nonterminalCount=0;
  for (  String t : source.split("\\s+")) {
    if (!t.matches(NT_REGEX))     return false;
    nonterminalCount++;
  }
  return nonterminalCount != 0;
}

private boolean isAbstract ( String source ) { int nonterminalCount = 0 ; for ( String t : source . split ( "\\s+" ) ) { if ( ! t . matches ( NT_REGEX ) ) return false ; nonterminalCount ++ ; } return nonterminalCount != 0 ; }
determines whether a rule is an abstract rule . an abstract rule is one that has no terminals on its source side . if the rule is abstract , the rule ' s arity is returned . otherwise , 0 is returned .
