ChatDiagram
automata theory · compiler design · regex

Thompson ε-NFA for Identifier Regex

النوع مخطط حالاتالمعيار OMG UML 2.5.1 §14 + Harel (1987) statechartالمحرّك schematex-stateآخر تحديث 28‏/9‏/2026
Thompson ε-NFA for Identifier Regex
Drawing preview
السيناريو

The identifier regex [a-zA-Z_][a-zA-Z0-9_]* is compiled into an ε-NFA using Thompson construction, demonstrating explicit ε transitions for concatenation and Kleene star.

ما الذي يتضمنه هذا الرسم

اقرأ القرارات الكامنة وراءه.

01

Model the initial character class as a single transition from start to first_char

02

Use a loop state with ε exits to accept and ε loop-back for the star

03

Keep the accept state final with no outgoing edges

When teaching or implementing Thompson's construction for regex-to-NFA conversion, especially for identifiers with a required first character and optional subsequent characters.

تصفّح جميع قوالب مخطط حالات ←