Categories: None [Edit]

ruby_parser

https://rubygems.org/gems/ruby_parser
https://github.com/seattlerb/ruby_parser
ruby_parser (RP) is a ruby parser written in pure ruby (utilizing racc--which does by default use a C extension). It outputs s-expressions which can be manipulated and converted back to ruby via the ruby2ruby gem. As an example: def conditional1 arg1 return 1 if arg1 == 0 return 0 end becomes: s(:defn, :conditional1, s(:args, :arg1), s(:if, s(:call, s(:lvar, :arg1), :==, s(:lit, 0)), s(:return, s(:lit, 1)), nil), s(:return, s(:lit, 0))) Tested against 801,039 files from the latest of all rubygems (as of 2013-05): * 1.8 parser is at 99.9739% accuracy, 3.651 sigma * 1.9 parser is at 99.9940% accuracy, 4.013 sigma * 2.0 parser is at 99.9939% accuracy, 4.008 sigma * 2.6 parser is at 99.9972% accuracy, 4.191 sigma * 3.0 parser has a 100% parse rate. * Tested against 2,672,412 unique ruby files across 167k gems. * As do all the others now, basically.

Total

Ranking: 330 of 186,947
Downloads: 129,704,328

Daily

Ranking: 804 of 186,938
Downloads: 16,480

Depended by

RankDownloadsName
1,02143,246,873gettext_i18n_rails
1,25933,197,947html2haml
1,34629,309,199flay
1,50223,926,869flog
1,68818,187,696ruby2ruby
1,84214,661,372protocol
1,89313,918,097rubycritic
2,2978,743,172fasterer
2,6556,481,846hairtrigger
3,7952,681,130churn
3,9982,341,681roodi
5,1761,256,686debride
5,931890,219safemode
6,046848,075sourcify
6,047847,475dawnscanner
6,061842,977i18nliner
7,150571,503wrong
7,202562,372partialruby
7,792490,053quality
8,350416,091ripper_ruby_parser

Depends on

RankDownloadsName
101,139,345,512rake
65560,193,268racc
188236,480,412rdoc
312137,997,192sexp_processor
2,2708,918,680hoe
21,29170,266oedipus_lex

Owners

#GravatarHandle
1iconzenspider