Explain how you would use a deterministic finite automaton to perform string pattern matching that accepts or rejects based on the input.
Write a function that builds or simulates a DFA for a given pattern and returns whether an input text is accepted. Assume the alphabet is lowercase English letters.
def dfa_match(pattern, text):