code: public void printRulesTree(State rootState) {
  		List<State> nextStates = rootState.getNextStates();
  		if (nextStates.isEmpty()) {
  			return;
  		}
  		for (int i = 0; i < rootState.getNextStates().size(); i++) {
  			State currState = nextStates.get(i);
  			String accept = "";
  			if (currState instanceof AcceptState) {
  				accept = Long.toString(((AcceptState) currState).getRule().getId());
  			}
  			System.out.printf("state[%4d], parent[%4d], rule[%4s], element[%s]\n", Integer.valueOf(currState.getName()), Integer.valueOf(rootState.getName()), accept, RuleUtils.getPatternElementAsString(currState.getElement()));
  			this.printRulesTree(nextStates.get(i));
  		}
  	}
docs: Prints the contents of a rules tree.
  
  @param rootState
  the top state of the rules DFA