RE-> FSM发电机? [英] RE -> FSM generator?

查看:81
本文介绍了RE-> FSM发电机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

给定一个正则表达式,我正在寻找一个程序包,它将为实现RE的有限状态机动态生成代码.

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 ++和Python,但其他语言也很有趣.

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

推荐答案

re2c 生成C代码.我不确定动态"是什么意思-如果要在生成代码的同一运行中调用生成的代码,则必须编译并动态加载输出.

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.

这篇关于RE-> FSM发电机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆