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: 371 of 197,085
Downloads: 142,344,168
Daily
Ranking: 573 of 197,066
Downloads: 15,480
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 1,337 | 35,327,000 | html2haml |
| 1,935 | 17,069,880 | rubycritic |
| 1,999 | 15,530,198 | protocol |
| 2,305 | 10,526,550 | fasterer |
| 2,472 | 9,123,819 | hairtrigger |
| 4,046 | 2,878,982 | churn |
| 4,295 | 2,454,074 | roodi |
| 6,522 | 923,751 | dawnscanner |
| 6,648 | 878,557 | sourcify |
| 7,717 | 628,845 | wrong |
| 8,095 | 573,024 | partialruby |
| 8,396 | 524,008 | quality |
| 9,111 | 438,609 | ripper_ruby_parser |
| 9,582 | 391,538 | brakeman-min |
| 10,101 | 346,473 | rufus-treechecker |
| 10,994 | 287,406 | haml2slim |
| 13,919 | 175,257 | brakeman-lib |
| 14,407 | 164,313 | excellent |
| 14,504 | 162,051 | ruby_parser-legacy |
| 15,521 | 142,383 | dynamic_fieldsets |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 8 | 1,428,256,062 | rake |
| 58 | 743,504,901 | racc |
| 150 | 353,290,307 | rdoc |
| 349 | 152,925,389 | sexp_processor |
| 2,405 | 9,615,266 | hoe |
| 20,255 | 88,387 | oedipus_lex |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | zenspider |