'Converting regular expression to finite state machine

Would you have a hint at algorithm to convert any regular expression to a Finite State Machine (FSM). For instance, an algorithm parsing a regexp and adding states to the FSM appropriately? Any reference or deeper idea?

I am writting this with Python



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source