Search code examples
regexgeneratorfsm

RE -> FSM generator?


Given a regular expression, I'm looking for a package which will dynamically generate the code for a finite state machine that implements the RE.

C/C++ and Python preferred, but other languages are of interest as well.


Solution

  • re2c generates C code. I'm not sure what you mean by 'dynamically' -- AFAIK you'd have to compile and dynamic-load the output, if you want to call on the generated code during the same run that you generated it.