ap.bind(vn); }
		int process_DDFP(VTDNav vn) 		throws XPathEvalException, NavException {		AutoPilot ap;		boolean b = false, b1 = false;	    int contextSize;	    Predicate t= null;		int result;						switch(state){			case START:			case FORWARD:			    if (vn.atTerminal){			        if (state == START)			            state = END;			        else {			            // no need to set_ft to true			            // no need to resetP			            state = BACKWARD;			            currentStep = currentStep.getPrevStep();			        }			        break;			    }			        	        t = currentStep.p;    	        while(t!=null){    	            if (t.requireContextSize()){    	                int i = computeContextSize(t,vn);    	                if (i==0){    	                    b1 = true;    	                    break;    	                }else    	                    t.setContextSize(i);    	            }    	            t = t.nextP;    	        }    	        if (b1){    	            if (state ==START)    	                state = END;    	            else {    	                currentStep = currentStep.getPrevStep();    	                state = BACKWARD;    	            }    	            break;    	        }    	            	            		    String helper = null;    			if (currentStep.nt.testType == NodeTest.NODE){    				helper = "*";    			}else {    				helper = currentStep.nt.nodeName;    			}    			if (currentStep.o == null)    				currentStep.o = ap = new AutoPilot(vn);    			else    				ap = (AutoPilot) currentStep.o;    			if (currentStep.get_ft() == true) {    				if (currentStep.axis_type == AxisType.DESCENDANT_OR_SELF )    					if (currentStep.nt.testType == NodeTest.NODE)    						ap.setSpecial(true);    					else    						ap.setSpecial(false);    				//currentStep.o = ap = new AutoPilot(vn);    			    if (currentStep.axis_type == AxisType.DESCENDANT_OR_SELF)    					ap.selectElement(helper);    				else if (currentStep.axis_type == AxisType.DESCENDANT)    					ap.selectElement_D(helper);    				else if (currentStep.axis_type == AxisType.PRECEDING)    					ap.selectElement_P(helper);    				else     					ap.selectElement_F(helper);    				currentStep.set_ft(false);    			}    			if ( state ==  START)    				 state =  END;    			vn.push2(); // not the most efficient. good for now    			//System.out.println("  --++ push in //");    			b = false;    			while(ap.iterate()){    				if (currentStep.evalPredicates(vn)){    					b = true;    					break;    				}    			}    			if (b == false) {    				vn.pop2();    				//System.out.println("  --++ pop in //");    				currentStep.set_ft(true);    				currentStep.resetP(vn);    				if ( state ==  FORWARD){    					state =  BACKWARD;    					currentStep = currentStep.getPrevStep();							    				}						    			} else {    				if (currentStep.getNextStep() != null){    					state =  FORWARD;    					currentStep = currentStep.getNextStep();    				}    				else {    					//vn.pop();    					state =  TERMINAL;    					result = vn.getCurrentIndex();    					if ( isUnique(result))    						return result;    				}    			}    			break;    	        			    			case END:				currentStep = null;				// reset();				return -1;			    			case BACKWARD:				//currentStep = currentStep.getPrevStep();				ap = (AutoPilot) currentStep.o;				//vn.push();				b = false;				while(ap.iterate()){					if (currentStep.evalPredicates(vn)){						b = true;						break;					}				}				if (b == false) {					vn.pop2();					currentStep.set_ft(true);					currentStep.resetP(vn);					//System.out.println("  --++ pop in //");					if (currentStep.getPrevStep() != null) {						 state =  BACKWARD;						currentStep = currentStep.getPrevStep();					} else						 state =  END;				} else {					if (currentStep.getNextStep() != null) {						//vn.push();						//System.out.println("  --++ push in //");						 state =  FORWARD;						currentStep = currentStep.getNextStep();					} else {						 state =  TERMINAL;						result = vn.getCurrentIndex();						if ( isUnique(result))							return result;					}				}				break;			    			case TERMINAL:			    ap = (AutoPilot) currentStep.o;			    b = false;			    while (ap.iterate()) {			        if (currentStep.evalPredicates(vn)) {			            b = true;			            break;			        }			    }			    if (b == true) {			        if (currentStep.evalPredicates(vn)) {			            result = vn.getCurrentIndex();			            if (isUnique(result))			                return result;			        }			    } else if (currentStep.getPrevStep() == null) {			        currentStep.resetP(vn);			        vn.pop2();			        state = END;			    } else {			        vn.pop2();			        currentStep.set_ft(true);			        currentStep.resetP(vn);			        //System.out.println(" --++ pop in //");			        state = BACKWARD;			        //currentStep.ft = true;			        currentStep = currentStep.getPrevStep();			    }            break;			default:			    throw new XPathEvalException("unknown state");        }	    return -2;	}