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: 339 of 188,987
Downloads: 133,115,683
Daily
Ranking: 638 of 188,969
Downloads: 41,272
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 1,283 | 33,750,907 | html2haml |
| 1,918 | 14,883,025 | protocol |
| 1,919 | 14,877,011 | rubycritic |
| 2,305 | 9,225,454 | fasterer |
| 2,608 | 7,100,782 | hairtrigger |
| 3,871 | 2,738,049 | churn |
| 4,096 | 2,371,130 | roodi |
| 6,042 | 902,859 | safemode |
| 6,144 | 869,053 | dawnscanner |
| 6,150 | 866,339 | i18nliner |
| 6,169 | 860,747 | sourcify |
| 7,266 | 588,097 | wrong |
| 7,431 | 566,695 | partialruby |
| 7,946 | 498,448 | quality |
| 8,540 | 421,663 | ripper_ruby_parser |
| 9,099 | 367,217 | brakeman-min |
| 9,511 | 333,035 | rufus-treechecker |
| 10,427 | 274,312 | haml2slim |
| 13,625 | 159,415 | excellent |
| 13,633 | 159,292 | brakeman-lib |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 9 | 1,213,613,575 | rake |
| 60 | 617,746,907 | racc |
| 177 | 267,328,210 | rdoc |
| 325 | 141,954,938 | sexp_processor |
| 2,316 | 9,102,273 | hoe |
| 20,943 | 75,455 | oedipus_lex |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | zenspider |