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: 380 of 199,228
Downloads: 144,888,069
Daily
Ranking: 669 of 199,184
Downloads: 57,742
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 1,357 | 35,733,038 | html2haml |
| 1,928 | 17,749,326 | rubycritic |
| 2,040 | 15,680,627 | protocol |
| 2,307 | 10,862,293 | fasterer |
| 2,428 | 9,738,452 | hairtrigger |
| 4,082 | 2,916,047 | churn |
| 4,352 | 2,478,096 | roodi |
| 6,583 | 933,609 | dawnscanner |
| 6,725 | 882,536 | sourcify |
| 7,810 | 636,325 | wrong |
| 8,208 | 574,521 | partialruby |
| 8,512 | 528,292 | quality |
| 9,241 | 441,145 | ripper_ruby_parser |
| 9,694 | 395,685 | brakeman-min |
| 10,199 | 350,096 | rufus-treechecker |
| 11,118 | 290,061 | haml2slim |
| 14,002 | 178,826 | brakeman-lib |
| 14,589 | 165,637 | excellent |
| 14,667 | 163,819 | ruby_parser-legacy |
| 15,697 | 143,228 | dynamic_fieldsets |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 7 | 1,480,270,976 | rake |
| 58 | 776,907,388 | racc |
| 142 | 384,735,258 | rdoc |
| 354 | 156,212,321 | sexp_processor |
| 2,407 | 9,898,711 | hoe |
| 20,159 | 91,718 | oedipus_lex |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | zenspider |