private void waitIfNeeded() throws StopException{
		
		synchronized(this){
			if(breakPoint > 0 && lastLineNum<=breakPoint && lexer.getLineNum()>breakPoint){
				breakPoint = -1;
				numStepsToRun=0;
			}
			
			while(numStepsToRun==0 && !StopRun){
				try{
					wait();				
				}
				catch(InterruptedException e) {}
			}
			if(numStepsToRun>0){
				numStepsToRun--;
			}
			if(StopRun) throw new StopException(0);
		}
	}