开发者

On the flow C parser

I am looking for a dynamic C-based parser/framework. It must be dynamic because the EBNF is constantly changing, something like bison is not applicable in this situation. And boost::spirit is practi开发者_如何转开发cally useless to me because it requires C++.

Does anyone have an idea?


If you want the grammar to change while the computation is running, then what you want is an Earley-style context free parser. You can change the rules at any time and run the Earley parsing algorithm.

If the grammar changes "slowly" (e.g., once a day), then you don't need a dynamically-augmentable parser like Earley; you can use conventional parser generators and simply run them as needed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜