开发者

possible to automatically convert ABNF into XML?

开发者 https://www.devze.com 2023-03-10 06:11 出处:网络
Is it possible to automatically convert ABNF into XML? In parti开发者_Python百科cular, I need to convert speech recognition grammars written in ABNF into XML. Thanks.Are you aware of http://www.w3.org

Is it possible to automatically convert ABNF into XML? In parti开发者_Python百科cular, I need to convert speech recognition grammars written in ABNF into XML. Thanks.


Are you aware of http://www.w3.org/TR/speech-grammar/, which seems to represent the same speech recognition grammars in both ABNF and XML? (I'm not familiar with it, I just stumbled upon it a few minutes ago.)


It should be easy to do but I'm not aware about code to do that. There are ABNF parsers for example in Sphinx4 which parse ABNF according to the grammar to the tree of rules. Then you can just dump this tree in XML form.

0

精彩评论

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

关注公众号