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: 354 of 193,081
Downloads: 137,444,194
Daily
Ranking: 537 of 193,053
Downloads: 32,078
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 1,310 | 34,558,082 | html2haml |
| 1,939 | 15,912,435 | rubycritic |
| 1,966 | 15,195,514 | protocol |
| 2,295 | 9,821,368 | fasterer |
| 2,583 | 7,857,815 | hairtrigger |
| 3,940 | 2,800,530 | churn |
| 4,193 | 2,407,576 | roodi |
| 6,179 | 921,579 | safemode |
| 6,266 | 896,369 | dawnscanner |
| 6,345 | 869,635 | sourcify |
| 7,434 | 608,748 | wrong |
| 7,750 | 569,755 | partialruby |
| 8,134 | 506,292 | quality |
| 8,816 | 426,139 | ripper_ruby_parser |
| 9,414 | 378,179 | brakeman-min |
| 9,882 | 338,629 | rufus-treechecker |
| 10,791 | 279,080 | haml2slim |
| 13,836 | 166,919 | brakeman-lib |
| 14,088 | 161,404 | excellent |
| 14,288 | 156,704 | ruby_parser-legacy |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 8 | 1,324,961,978 | rake |
| 58 | 680,238,296 | racc |
| 165 | 305,298,066 | rdoc |
| 337 | 147,123,150 | sexp_processor |
| 2,361 | 9,287,504 | hoe |
| 20,935 | 79,632 | oedipus_lex |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | zenspider |