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: 342 of 189,432
Downloads: 133,669,470
Daily
Ranking: 713 of 189,408
Downloads: 36,934
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 1,288 | 33,832,474 | html2haml |
| 1,923 | 15,046,645 | rubycritic |
| 1,929 | 14,918,735 | protocol |
| 2,301 | 9,306,931 | fasterer |
| 2,621 | 7,197,969 | hairtrigger |
| 3,882 | 2,746,266 | churn |
| 4,108 | 2,375,039 | roodi |
| 6,067 | 903,770 | safemode |
| 6,158 | 872,047 | dawnscanner |
| 6,168 | 869,601 | i18nliner |
| 6,198 | 861,986 | sourcify |
| 7,285 | 589,890 | wrong |
| 7,463 | 567,287 | partialruby |
| 7,972 | 499,299 | quality |
| 8,571 | 422,038 | ripper_ruby_parser |
| 9,108 | 369,021 | brakeman-min |
| 9,545 | 334,081 | rufus-treechecker |
| 10,455 | 274,661 | haml2slim |
| 13,569 | 162,050 | brakeman-lib |
| 13,669 | 159,787 | excellent |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 9 | 1,232,715,961 | rake |
| 58 | 630,199,212 | racc |
| 176 | 272,366,605 | rdoc |
| 327 | 142,620,497 | sexp_processor |
| 2,320 | 9,127,249 | hoe |
| 20,928 | 75,958 | oedipus_lex |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | zenspider |