Programminga DFA
while( current != ACCEPT && (ch=fgetc(fp)) != EOF){
next = NextState(current,ch);
/* transition actions go here */
next = NextState(current,ch)
- given the current state of the DFA, current, and the current input character, ch, return the next state
- determines the next state by one of:
- indexing a Transition Table
- switch statements
- some if statements