ChatDiagram
automata theory · regular expressions · compiler design

Thompson ε-NFA for Regex [0-9]+

סוג תרשים מצביםתקן OMG UML 2.5.1 §14 + Harel (1987) statechartמנוע schematex-stateעודכן 28.9.2026
Thompson ε-NFA for Regex [0-9]+
Drawing preview
התרחיש

Build the ε-NFA for the unsigned integer regex [0-9]+ using Thompson construction, showing the plus operator's epsilon back-edge.

מה מופיע בתרשים הזה

פענחו את ההחלטות שמאחוריו.

01

Introduce an ε-transition from the digit acceptor back to its start to model one-or-more repetition.

02

Use a final state reached by ε after the digit to preserve acceptance of exactly one digit.

03

Label the digit transition with the character class [0-9] rather than each individual digit.

Reusable whenever converting any `+` regex operator into an NFA; swap the base subexpression's NFA and reuse the same ε wiring.

עיון בכל תבניות ה־תרשים מצבים ←