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: 296 of 183,487
Downloads: 121,596,376

Daily

Ranking: 853 of 183,477
Downloads: 15,558

Depended by

RankDownloadsName
1,03835,491,498gettext_i18n_rails
1,11531,758,645html2haml
1,25526,823,881flay
1,40121,726,080flog
1,60616,717,156ruby2ruby
1,73714,011,323protocol
1,83212,170,301rubycritic
2,2687,515,093fasterer
2,6365,398,460hairtrigger
3,6662,479,465churn
3,8132,271,594roodi
5,2141,047,414debride
5,607870,111safemode
5,792808,196sourcify
5,819798,356i18nliner
5,829796,148dawnscanner
6,809547,630partialruby
6,905528,743wrong
7,227475,958quality
7,893408,736ripper_ruby_parser

Depends on

RankDownloadsName
10969,414,103rake
83413,805,015racc
210172,618,531rdoc
282129,368,851sexp_processor
2,1058,605,313hoe
21,86062,324oedipus_lex

Owners

#GravatarHandle
1iconzenspider