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: 293 of 180,416
Downloads: 108,957,790

Daily

Ranking: 349 of 180,403
Downloads: 67,446

Depended by

RankDownloadsName
1,02730,376,883html2haml
1,08927,275,025gettext_i18n_rails
1,15725,020,324flay
1,33520,044,881flog
1,51515,508,448ruby2ruby
1,74910,979,451rubycritic
2,0667,508,808protocol
2,2086,617,646fasterer
2,6634,542,292hairtrigger
3,5762,272,449churn
3,6042,217,479roodi
5,150921,686debride
5,337845,890safemode
5,527777,016sourcify
5,569763,681i18nliner
5,645739,916dawnscanner
6,581521,159partialruby
6,720494,990wrong
6,918461,639quality
7,362400,290ripper_ruby_parser

Depends on

RankDownloadsName
16849,672,215rake
102310,272,230racc
214145,830,930rdoc
269116,013,753sexp_processor
1,9498,399,356hoe
22,82754,450oedipus_lex

Owners

#GravatarHandle
1iconzenspider