docs: private void calculate() throws GrammarException {
  	addState(closure1.calc(new LR1Item(grammar.getProductions().get(0), 0,
  		FinishTerminal.getInstance())));
  	int run = 0;
  	int nextStartPosition = 0;
  	int currentStartPosition = 0;
  	do {
  	    run++;
  	    currentStartPosition = nextStartPosition;
  	    nextStartPosition = itemSetCollection.size();
  	    int currentItemSetCount = itemSetCollection.size();
  	    for (int stateId = currentStartPosition; stateId < currentItemSetCount; stateId++) {
  		logger.trace("state: " + stateId + "/"
  			+ itemSetCollection.size() + " run: " + run);
  		LR1ItemSet itemSet = itemSetCollection.get(stateId);
  		for (Construction grammarSymbol : itemSet
  			.getAllGrammarSymbols()) {
  		    LR1ItemSet gotoSet = goto1.calc(itemSet, grammarSymbol);
  		    if (gotoSet.getSize() > 0) {
  			addState(gotoSet);
  		    }
  		}
  	    }
  	} while (nextStartPosition < itemSetCollection.size());
      }