@Override public Integer call(){
  printDebugMessages();
  currentState=(LR0State)stateKernel.closure(grammarInfo);
  for (  LR0Item item : currentState.getItems()) {
    if (item.isShiftable()) {
      Symbol symbol=item.getNextSymbol();
      if (symbol == EndOfInputStream) {
        dfaEdges.add(Edge.createAcceptEdge(stateKernel,symbol));
      }
 else {
        LR0State shiftedState=(LR0State)currentState.goTo(symbol);
        if (dfaStates.add(shiftedState)) {
          threadPool.submit(new WorkerTaskLR0(shiftedState,threadPool,taskCountLock));
        }
        dfaEdges.add(new Edge(stateKernel,symbol,shiftedState,item));
      }
    }
  }
  decrementTaskCount();
  return 0;
}

@ Override public Integer call ( ) { printDebugMessages ( ) ; currentState = ( LR0State ) stateKernel . closure ( grammarInfo ) ; for ( LR0Item item : currentState . getItems ( ) ) { if ( item . isShiftable ( ) ) { Symbol symbol = item . getNextSymbol ( ) ; if ( symbol == EndOfInputStream ) { dfaEdges . add ( Edge . createAcceptEdge ( stateKernel , symbol ) ) ; } else { LR0State shiftedState = ( LR0State ) currentState . goTo ( symbol ) ; if ( dfaStates . add ( shiftedState ) ) { threadPool . submit ( new WorkerTaskLR0 ( shiftedState , threadPool , taskCountLock ) ) ; } dfaEdges . add ( new Edge ( stateKernel , symbol , shiftedState , item ) ) ; } } } decrementTaskCount ( ) ; return 0 ; }
handles one state ; creates new tasks by shifting .
