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: 349 of 192,034
Downloads: 136,029,459
Daily
Ranking: 603 of 191,980
Downloads: 50,151
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 1,297 | 34,316,498 | html2haml |
| 1,935 | 15,608,822 | rubycritic |
| 1,956 | 15,072,063 | protocol |
| 2,291 | 9,634,238 | fasterer |
| 2,604 | 7,586,463 | hairtrigger |
| 3,918 | 2,780,605 | churn |
| 4,163 | 2,395,784 | roodi |
| 6,130 | 917,291 | safemode |
| 6,219 | 886,831 | dawnscanner |
| 6,280 | 867,284 | sourcify |
| 7,357 | 601,429 | wrong |
| 7,647 | 569,108 | partialruby |
| 8,055 | 503,262 | quality |
| 8,702 | 424,991 | ripper_ruby_parser |
| 9,210 | 374,703 | brakeman-min |
| 9,674 | 336,844 | rufus-treechecker |
| 10,595 | 277,362 | haml2slim |
| 13,655 | 164,996 | brakeman-lib |
| 13,845 | 160,768 | excellent |
| 14,189 | 153,349 | ruby_parser-legacy |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 8 | 1,288,231,282 | rake |
| 58 | 662,102,067 | racc |
| 167 | 293,315,782 | rdoc |
| 332 | 145,420,370 | sexp_processor |
| 2,343 | 9,222,992 | hoe |
| 20,843 | 78,244 | oedipus_lex |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | zenspider |