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: 348 of 191,296
Downloads: 135,215,401
Daily
Ranking: 589 of 191,254
Downloads: 53,281
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 1,297 | 34,157,731 | html2haml |
| 1,930 | 15,420,467 | rubycritic |
| 1,951 | 15,017,274 | protocol |
| 2,289 | 9,519,688 | fasterer |
| 2,615 | 7,456,809 | hairtrigger |
| 3,915 | 2,768,630 | churn |
| 4,150 | 2,387,251 | roodi |
| 6,114 | 912,474 | safemode |
| 6,198 | 880,477 | dawnscanner |
| 6,250 | 865,555 | sourcify |
| 7,335 | 597,722 | wrong |
| 7,570 | 568,238 | partialruby |
| 8,036 | 501,851 | quality |
| 8,667 | 423,282 | ripper_ruby_parser |
| 9,166 | 372,780 | brakeman-min |
| 9,627 | 335,942 | rufus-treechecker |
| 10,546 | 276,083 | haml2slim |
| 13,616 | 163,953 | brakeman-lib |
| 13,762 | 160,533 | excellent |
| 14,136 | 152,437 | ruby_parser-legacy |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 8 | 1,268,799,165 | rake |
| 58 | 651,264,360 | racc |
| 169 | 286,411,581 | rdoc |
| 332 | 144,453,452 | sexp_processor |
| 2,336 | 9,186,378 | hoe |
| 20,814 | 77,664 | oedipus_lex |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | zenspider |