开发者

What grammar based parser-generator tools exist for ruby?

开发者 https://www.devze.com 2022-12-31 15:54 出处:网络
What open source (preferably gem-based) parser-generator options do I have in Ruby? I\'ve used (flex&bison)|(lex&yacc) from C in the past, and I\'m comfortable with BNF-style specifications.

What open source (preferably gem-based) parser-generator options do I have in Ruby?

I've used (flex&bison)|(lex&yacc) from C in the past, and I'm comfortable with BNF-style specifications.

I've he开发者_高级运维ard of treetop, but it looks a bit alien and verbose compared to yacc...

Purpose: I want to convert my text markup language to a BNF and generate the parsing code.


Have you looked at rex and racc, the gem versions of lex and yacc?


There's also parslet if you want a PEG-based processor


Citrus is an option - similar but not identical to Treetop in its grammar.

0

精彩评论

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