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