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: 350 of 192,505
Downloads: 136,690,917
Daily
Ranking: 639 of 192,483
Downloads: 45,833
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 1,310 | 34,428,418 | html2haml |
| 1,937 | 15,754,681 | rubycritic |
| 1,962 | 15,131,251 | protocol |
| 2,295 | 9,715,839 | fasterer |
| 2,596 | 7,715,644 | hairtrigger |
| 3,929 | 2,790,370 | churn |
| 4,176 | 2,401,075 | roodi |
| 6,144 | 919,087 | safemode |
| 6,238 | 891,563 | dawnscanner |
| 6,309 | 868,437 | sourcify |
| 7,384 | 605,300 | wrong |
| 7,695 | 569,435 | partialruby |
| 8,098 | 504,547 | quality |
| 8,758 | 425,485 | ripper_ruby_parser |
| 9,261 | 376,132 | brakeman-min |
| 9,723 | 337,807 | rufus-treechecker |
| 10,736 | 277,961 | haml2slim |
| 13,810 | 165,876 | brakeman-lib |
| 14,028 | 161,071 | excellent |
| 14,300 | 154,928 | ruby_parser-legacy |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 8 | 1,306,403,856 | rake |
| 58 | 670,952,303 | racc |
| 165 | 299,004,962 | rdoc |
| 336 | 146,210,042 | sexp_processor |
| 2,353 | 9,250,942 | hoe |
| 20,942 | 78,850 | oedipus_lex |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | zenspider |