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

Total

Ranking: 255 of 167,976
Downloads: 60,243,020

Daily

Ranking: 297 of 167,962
Downloads: 32,239

Depended by

RankDownloadsName
82919,611,718html2haml
1,08612,594,174flay
1,14411,233,206ruby2ruby
1,16010,969,606gettext_i18n_rails
1,2209,635,018flog
1,6405,102,705rubycritic
2,4442,312,706fasterer
2,5672,046,204hairtrigger
2,6741,901,632roodi
2,7551,759,992churn
2,7831,712,854protocol
4,002768,393safemode
4,314638,927i18nliner
4,484582,726sourcify
4,950468,690debride
5,133436,168dawnscanner
5,819330,223wrong
6,057299,923ripper_ruby_parser
6,073298,470quality
7,109214,818brakeman-min

Depends on

RankDownloadsName
11503,195,986rake
147104,569,886rdoc
24064,385,660sexp_processor
36946,068,683racc
1,4057,259,174hoe
22,75631,564oedipus_lex

Owners

#GravatarHandle
1iconzenspider