DFA Emulator
lexeme_beginning : pointer to the beginning of the next lexeme
forward: pointer to the current char
nextchar(): move forward to the next char
transition(s,c): lookup the transition table
case S0: c = nextchar(); state = transition(state,c); ...; break;