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: 338 of 188,572
Downloads: 132,518,993
Daily
Ranking: 535 of 188,550
Downloads: 26,708
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 1,280 | 33,663,736 | html2haml |
| 1,915 | 14,849,673 | protocol |
| 1,918 | 14,720,847 | rubycritic |
| 2,307 | 9,146,682 | fasterer |
| 2,623 | 6,950,292 | hairtrigger |
| 3,860 | 2,730,255 | churn |
| 4,082 | 2,367,020 | roodi |
| 6,019 | 901,519 | safemode |
| 6,113 | 865,512 | dawnscanner |
| 6,122 | 863,192 | i18nliner |
| 6,139 | 859,345 | sourcify |
| 7,246 | 585,708 | wrong |
| 7,397 | 566,275 | partialruby |
| 7,910 | 497,734 | quality |
| 8,513 | 420,893 | ripper_ruby_parser |
| 9,084 | 364,873 | brakeman-min |
| 9,498 | 331,154 | rufus-treechecker |
| 10,384 | 273,913 | haml2slim |
| 12,317 | 193,139 | mvz-live_ast |
| 13,578 | 159,037 | excellent |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 10 | 1,198,049,204 | rake |
| 60 | 609,324,029 | racc |
| 176 | 262,269,964 | rdoc |
| 325 | 141,251,943 | sexp_processor |
| 2,312 | 9,075,852 | hoe |
| 20,970 | 74,895 | oedipus_lex |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | zenspider |