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: 377 of 198,430
Downloads: 144,037,655
Daily
Ranking: 635 of 198,401
Downloads: 54,421
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 1,353 | 35,592,544 | html2haml |
| 1,932 | 17,508,667 | rubycritic |
| 2,027 | 15,630,587 | protocol |
| 2,304 | 10,747,544 | fasterer |
| 2,447 | 9,543,709 | hairtrigger |
| 4,068 | 2,901,558 | churn |
| 4,339 | 2,467,440 | roodi |
| 6,561 | 930,719 | dawnscanner |
| 6,698 | 881,280 | sourcify |
| 7,767 | 633,571 | wrong |
| 8,171 | 573,837 | partialruby |
| 8,480 | 526,251 | quality |
| 9,195 | 440,341 | ripper_ruby_parser |
| 9,660 | 393,580 | brakeman-min |
| 10,174 | 348,930 | rufus-treechecker |
| 11,074 | 289,004 | haml2slim |
| 13,993 | 176,981 | brakeman-lib |
| 14,514 | 165,118 | excellent |
| 14,622 | 162,951 | ruby_parser-legacy |
| 15,644 | 142,776 | dynamic_fieldsets |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 8 | 1,462,600,952 | rake |
| 58 | 765,258,535 | racc |
| 142 | 373,659,467 | rdoc |
| 353 | 155,056,779 | sexp_processor |
| 2,412 | 9,714,887 | hoe |
| 20,193 | 90,349 | oedipus_lex |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | zenspider |