DFA that
accepts the type
1 lexemes
DFA that
accepts the type
2 lexemes
DFA that
accepts the type
n lexemes
Lexemes
Recognized by DFAs 2/2
2) Construction
of an FA that
accepts all lexemes:
Space,Tab, EoLn, ...
{
}
S
– }
s
p
f2
...
q2
Comments and whitespaces
are skipped before a new lexeme
...
...
Lexeme of
type 1
Lexeme of
type 2
Lexeme of
type n
fn
...
qn
f1
...
q1
Every final
state corresponds to one type of lexeme
5/35