Le scénario
Given an NFA for a lexer identifier pattern `[a-zA-Z][a-zA-Z0-9_]*`, subset construction generates a DFA whose states are sets of NFA states: {q0}, {q1}, and ∅.
Ce que contient ce dessin
Comprenez les décisions qui le sous-tendent.
01
Start state is epsilon-closure of q0, yielding {q0}.
02
On letter from {q0}, move to {q1} which contains accepting NFA state q1.
03
Unlisted inputs lead to dead state ∅, a non-accepting sink with a self-loop for any symbol.
04
Mark {q1} as accepting because it contains the NFA's accept state.
Use when converting any nondeterministic finite automaton to a deterministic one, especially for lexical analyzer generation.