code: public int getStateId(LR0ItemSet targetSet) throws GrammarException {
  	int id = itemSetCollection.indexOf(targetSet);
  	if (id >= 0) {
  	    return id;
  	}
  	throw new GrammarException("Target set '" + targetSet
  		+ "' was not found!");
      }
docs: This method looks for the state id for a given item set.
  
  @param targetSet
  is the target set to look for.
  @return The id is returned as integer.
  @throws GrammarException
  is thrown in case the grammar does not contain the target
  set.