Implementation of DFA 1/10
procedure get_Next_Token(var TOKEN: ....);
... {declaration, ...}
str  := ''; {read string}
state := S; {actual state}
repeat
  symbol = getchar(); {read next character}
  case state of
    s : begin {start state}
          if symbol in ['a'..'z'] then
          begin
            state := f1; {identifier}
            str := symbol;
          end else
10/35
identifier
f1
a..z
a..z,0..9
s