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: 334 of 187,950
Downloads: 131,456,007
Daily
Ranking: 646 of 187,922
Downloads: 37,402
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 1,272 | 33,498,704 | html2haml |
| 1,352 | 29,961,894 | flay |
| 1,507 | 24,528,676 | flog |
| 1,695 | 18,514,231 | ruby2ruby |
| 1,895 | 14,780,846 | protocol |
| 1,917 | 14,442,858 | rubycritic |
| 2,305 | 9,000,677 | fasterer |
| 2,648 | 6,725,525 | hairtrigger |
| 3,829 | 2,714,122 | churn |
| 4,053 | 2,358,763 | roodi |
| 5,149 | 1,310,824 | debride |
| 5,976 | 898,125 | safemode |
| 6,092 | 859,652 | dawnscanner |
| 6,100 | 856,822 | i18nliner |
| 6,106 | 855,466 | sourcify |
| 7,204 | 581,922 | wrong |
| 7,321 | 565,089 | partialruby |
| 7,861 | 494,847 | quality |
| 8,451 | 419,337 | ripper_ruby_parser |
| 9,070 | 359,654 | brakeman-min |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 10 | 1,176,878,843 | rake |
| 60 | 592,199,131 | racc |
| 180 | 252,918,034 | rdoc |
| 319 | 140,014,604 | sexp_processor |
| 2,302 | 9,017,131 | hoe |
| 21,101 | 73,139 | oedipus_lex |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | zenspider |