docs: private void calculate() throws GrammarException {
  	addState(closure0.calc(new LR0Item(grammar.getProductions().get(0), 0)));
  	int currentSize;
  	do {
  	    currentSize = itemSetCollection.size();
  	    int currentItemSetCount = itemSetCollection.size();
  	    for (int stateId = 0; stateId < currentItemSetCount; stateId++) {
  		LR0ItemSet itemSet = itemSetCollection.get(stateId);
  		for (Construction grammarSymbol : itemSet
  			.getAllGrammarSymbols()) {
  		    LR0ItemSet gotoSet = goto0.calc(itemSet, grammarSymbol);
  		    if (gotoSet.getSize() > 0) {
  			addState(gotoSet);
  		    }
  		}
  	    }
  	} while (currentSize < itemSetCollection.size());
      }