void ompl::tools::ThunderDB::debugVertex(const ompl::base::PlannerDataVertex &vertex) { debugState(vertex.getState()); }
/** * @brief Here we process the state machine * * TODO: make ready */ void cmMyBlind::stateMachine_poll(uint8_t keyCode, uint8_t keyCount, uint8_t sensorValue) { curStateCount = (curStateCount < 255) ? curStateCount++ : 255; if (l3->ACTION_TYPE != AS_CM_ACTIONTYPE_JUMP_TO_TARGET) return; // only valid for jump table if (keyCode != AS_CM_KEYCODE_NONE) { l3 = (keyCode == AS_CM_KEYCODE_SHORT) ? ((s_l3*)&lstPeer + 1) : ((s_l3*)&lstPeer); // select short or long register values fKeyCount = keyCount; // remember message counter } if ( !delayTmr.done() && (keyCode == AS_CM_KEYCODE_NONE) ) { // check if something is to do return; // else, return } /** * Go ahead only if timer not running and no key was pressed */ if ( (curState == nxtState) && (keyCode == AS_CM_KEYCODE_NONE)) { // no status change expected return; } #ifdef CM_BLIND_DBG debugActionType(l3->ACTION_TYPE); dbg << F(", curState: "); debugState(curState); dbg << F(", nxtState: "); debugState(nxtState); dbg << '\n'; #endif curState = nxtState; // remember the current status curStateCount = 0; if (nxtState == AS_CM_JT_OFF) { #ifdef CM_BLIND_DBG dbg << F("OFF, TIME: ") << l3->OFF_TIME << '\n'; #endif nxtState = l3->JT_OFF; // get the next status from jump table if ( (l3->OFF_TIME) && (l3->OFF_TIME != 0xFF) ) { // check if there is something in the duration timer, set next status accordingly delayTmr.set(byteTimeCvt(l3->OFF_TIME)); // activate the timer and set next status } } else if (nxtState == AS_CM_JT_ONDELAY) { #ifdef CM_BLIND_DBG dbg << F("ONDELAY, TIME: ") << l3->ONDELAY_TIME << '\n'; #endif nxtState = l3->JT_ONDELAY; // get the next status from jump table if (l3->ONDELAY_TIME) { // check if there is something in the duration timer, set next status accordingly delayTmr.set(byteTimeCvt(l3->ONDELAY_TIME)); // activate the timer and set next status } } else if (nxtState == AS_CM_JT_REFON) { #ifdef CM_BLIND_DBG dbg << F("REFON\n"); #endif nxtState = l3->JT_REFON; // get next status from jump table // TODO: REFON-Running-Time } else if (nxtState == AS_CM_JT_RAMPON) { #ifdef CM_BLIND_DBG dbg << F("RAMPON\n"); #endif nxtState = l3->JT_RAMPON; // get next status from jump table^ adjTmr.set( // activate the timer for driving motor calcAdjTime(motorValue, AS_MODULE_MOTOR_DIRECTION_DOWN, modReferenceTimeTopBottom) ); adjTmrStatus = AS_MODULE_TIMER_ARMED; } else if (nxtState == AS_CM_JT_ON) { #ifdef CM_BLIND_DBG dbg << F("ON, TIME: ") << l3->ON_TIME << '\n'; #endif nxtState = l3->JT_ON; // get the next status from jump table if ( (l3->ON_TIME) && (l3->ON_TIME != 0xFF) ) { // check if there is something in the duration timer, set next status accordingly delayTmr.set(byteTimeCvt(l3->ON_TIME)); // activate the timer and set next status } } else if (nxtState == AS_CM_JT_OFFDELAY) { #ifdef CM_BLIND_DBG dbg << F("OFFDELAY, TIME: ") << l3->OFFDELAY_TIME << '\n'; #endif nxtState = l3->JT_OFFDELAY; // get jump table for next state if (l3->OFFDELAY_TIME) { // check if there is something in the duration timer, set next status accordingly delayTmr.set(byteTimeCvt(l3->OFFDELAY_TIME)); // activate the timer and set next status } } else if (nxtState == AS_CM_JT_REFOFF) { #ifdef CM_BLIND_DBG dbg << F("REFOFF"); #endif nxtState = l3->JT_REFOFF; // get jump table for next state } else if (nxtState == AS_CM_JT_RAMPOFF) { #ifdef CM_BLIND_DBG dbg << F("RAMPOFF\n"); #endif nxtState = l3->JT_RAMPOFF; // get jump table for next state adjTmr.set(modReferenceTimeBottomTop); // activate the timer for driving motor adjTmr.set( calcAdjTime(motorValue, AS_MODULE_MOTOR_DIRECTION_UP, modReferenceTimeBottomTop) ); adjTmrStatus = AS_MODULE_TIMER_ARMED; } }
int Java5Lex::getNextLexeme() { int state = 0; // Current state int lastAcceptState = 0; // Most recently seen accept state int prevState; // State before lastAcceptState int nextState; // Next state unsigned int lookahead; // Lookahead character int anchor; // Anchor mode for most recently seen accepting state unTerminateLexeme(); initMore(); markStart(); for(;;) { // Check end of file. If there's an unprocessed accepting state, // lastAcceptState will be nonzero. In this case, ignore EOF for now so // that you can do the accepting action; otherwise, try to open another // file and return if you can't. for(;;) { if(((int)(lookahead = look(1))) != EOF) { assert(lookahead < 256); nextState = nextState(state, lookahead); break; } else if(lastAcceptState != 0) { // still something to do nextState = -1; break; } else if(isWrap()) { // another file? terminateLexeme(); return 0; // EOI } } if(m_debug) { debugState(_T("--------"), state, lookahead); } if(nextState != -1) { if(advance() < 0) { // Buffer full const TCHAR *tooLongMessage = _T("Lexeme too long. Discarding extra characters."); error(getPos(), tooLongMessage); flush(true); if(m_debug) { debug(tooLongMessage); debugState(_T("--------"), state, look(1)); } } if(anchor = lexAccept[nextState]) { // Is this an accept state prevState = state; lastAcceptState = nextState; markEnd(); // Mark input at current character } // A subsequent gotoMark() returns us to this position. state = nextState; } else if(lastAcceptState == 0) { // illegal input error(getPos(), _istprint(lookahead)?_T("Ignore bad input:'%c'"):_T("Ignore bad input:%#x"),lookahead); if(m_debug) { debug(_T("Ignore bad input:'%c'"), lookahead); } advance(); } else { if(m_debug) { debugState(_T("accept--"), lastAcceptState, lookahead); } gotoMark(); // Back up to previous accept state if(anchor & ANCHOR_END) { // If end anchor is active pushback(1); // Push back the CR or LF } if(anchor & ANCHOR_START) { // If start anchor is active moveStart(); // Skip the leading newline } terminateLexeme(); // Null-terminate the string switch(lastAcceptState) { case 1: #line 124 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" ; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 2: #line 87 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return NOT; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 3: #line 108 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return MOD; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 4: #line 105 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return AND; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 5: #line 75 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return LPAR; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 6: #line 76 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return RPAR; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 7: #line 103 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return STAR; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 8: #line 101 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return PLUS; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 9: #line 82 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return COMMA; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 10: #line 102 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return MINUS; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 11: #line 83 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return DOT; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 12: #line 104 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return DIV; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 13: case 58: case 61: case 64: case 66: #line 39 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return INTEGERLITERAL; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 14: #line 90 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return COLON; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 15: #line 81 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return SEMICOLON; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 16: #line 85 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return LT; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 17: #line 84 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return ASSIGN; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 18: #line 86 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return GT; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 19: #line 89 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return QUESTION; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 20: #line 92 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return AT; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 21: #line 48 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return nameOrKeyWord(getText()); #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 22: #line 79 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return LB; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 23: #line 80 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return RB; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 24: #line 107 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return XOR; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 25: #line 77 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return LC; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 26: #line 106 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return OR; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 27: #line 78 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return RC; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 28: #line 88 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return COMPLEMENT; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 29: #line 96 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return NEQ; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 30: #line 43 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return STRINGLITERAL; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 31: #line 119 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return MODASSIGN; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 32: #line 97 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return ANDAND; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 33: #line 116 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return ANDASSIGN; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 34: #line 114 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return STARASSIGN; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 35: #line 99 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return PLUSPLUS; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 36: #line 112 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return PLUSASSIGN; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 37: #line 100 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return MINUSMINUS; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 38: #line 113 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return MINUSASSIGN; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 39: case 59: case 62: #line 41 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return FLOATLITERAL; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 40: #line 50 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" { int i; SourcePosition startpos = getPos(); while(i = input()) { if(i < 0) { flushBuf(); /* Discard lexeme. */ } else if(i == '*' && look(1) == '/') { input(); break; /* Recognized comment.*/ } } if(i == 0) { error( startpos,_T("End of file in comment\n") ); } } #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 41: #line 65 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" { int i; while(i = input()) { if(i < 0) { flushBuf(); /* Discard lexeme. */ } else if(i == '\n') { break; } } } #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 42: #line 115 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return DIVASSIGN; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 43: #line 109 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return SHL; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 44: #line 94 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return LE; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 45: #line 93 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return EQ; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 46: #line 95 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return GE; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 47: #line 110 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return SSHR; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 48: #line 118 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return XORASSIGN; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 49: #line 117 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return ORASSIGN; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 50: #line 98 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return OROR; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 51: #line 45 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return CHARACTERLITERAL; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 52: #line 91 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return ELLIPSIS; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 53: #line 120 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return SHLASSIGN; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 54: #line 121 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return SSHRASSIGN; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 55: #line 111 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return USHR; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; case 56: #line 122 "C:\\mytools2015\\ParserGen\\java\\Java5.lex" return USHRASSIGN; #line 94 "C:\\mytools2015\\parsergen\\lib\\lexgencpp.par" break; default: throwException(_T("%s:Unknown accept state:%d, text=<%s>"), __TFUNCTION__, lastAcceptState,getText()); break; } unTerminateLexeme(); lastAcceptState = 0; if(isMore()) { state = prevState; // Back up initMore(); } else { state = 0; markStart(); } } } }