Categories: None [Edit]
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: 343 of 189,933
Downloads: 134,281,230
Daily
Ranking: 615 of 189,920
Downloads: 30,683
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 1,294 | 33,947,217 | html2haml |
| 1,924 | 15,206,715 | rubycritic |
| 1,940 | 14,957,031 | protocol |
| 2,293 | 9,396,181 | fasterer |
| 2,619 | 7,306,125 | hairtrigger |
| 3,894 | 2,756,397 | churn |
| 4,125 | 2,380,382 | roodi |
| 6,091 | 905,722 | safemode |
| 6,184 | 874,850 | dawnscanner |
| 6,192 | 873,502 | i18nliner |
| 6,234 | 863,140 | sourcify |
| 7,308 | 593,378 | wrong |
| 7,512 | 567,769 | partialruby |
| 7,999 | 500,813 | quality |
| 8,606 | 422,726 | ripper_ruby_parser |
| 9,133 | 371,042 | brakeman-min |
| 9,584 | 334,930 | rufus-treechecker |
| 10,497 | 275,259 | haml2slim |
| 13,579 | 163,124 | brakeman-lib |
| 13,705 | 160,125 | excellent |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 8 | 1,248,043,640 | rake |
| 58 | 639,616,252 | racc |
| 171 | 278,590,807 | rdoc |
| 329 | 143,351,648 | sexp_processor |
| 2,329 | 9,152,247 | hoe |
| 20,898 | 76,575 | oedipus_lex |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | zenspider |