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: 373 of 197,744
Downloads: 143,163,140
Daily
Ranking: 695 of 197,724
Downloads: 62,487
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 1,344 | 35,444,761 | html2haml |
| 1,931 | 17,277,353 | rubycritic |
| 2,015 | 15,577,200 | protocol |
| 2,301 | 10,630,704 | fasterer |
| 2,454 | 9,341,918 | hairtrigger |
| 4,054 | 2,890,235 | churn |
| 4,319 | 2,460,381 | roodi |
| 6,536 | 926,722 | dawnscanner |
| 6,674 | 879,921 | sourcify |
| 7,748 | 630,941 | wrong |
| 8,131 | 573,481 | partialruby |
| 8,431 | 525,205 | quality |
| 9,160 | 439,358 | ripper_ruby_parser |
| 9,622 | 392,334 | brakeman-min |
| 10,133 | 347,824 | rufus-treechecker |
| 11,030 | 288,072 | haml2slim |
| 13,945 | 176,028 | brakeman-lib |
| 14,458 | 164,642 | excellent |
| 14,564 | 162,428 | ruby_parser-legacy |
| 15,579 | 142,530 | dynamic_fieldsets |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 8 | 1,444,561,272 | rake |
| 57 | 753,562,495 | racc |
| 147 | 362,648,494 | rdoc |
| 350 | 153,936,392 | sexp_processor |
| 2,409 | 9,652,728 | hoe |
| 20,218 | 89,350 | oedipus_lex |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | zenspider |