开发者

On the flow C parser

开发者 https://www.devze.com 2022-12-17 07:50 出处:网络
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开

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

精彩评论

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