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,051
Downloads: 142,302,007
Daily
Ranking: 641 of 197,010
Downloads: 44,286
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 1,337 | 35,320,617 | html2haml |
| 1,935 | 17,061,952 | rubycritic |
| 1,999 | 15,527,851 | protocol |
| 2,305 | 10,522,255 | fasterer |
| 2,473 | 9,107,387 | hairtrigger |
| 4,045 | 2,877,959 | churn |
| 4,294 | 2,453,569 | roodi |
| 6,521 | 923,599 | dawnscanner |
| 6,645 | 878,460 | sourcify |
| 7,716 | 628,646 | wrong |
| 8,094 | 573,010 | partialruby |
| 8,394 | 523,601 | quality |
| 9,105 | 438,462 | ripper_ruby_parser |
| 9,581 | 391,349 | brakeman-min |
| 10,101 | 346,412 | rufus-treechecker |
| 10,990 | 287,390 | haml2slim |
| 13,920 | 175,152 | brakeman-lib |
| 14,401 | 164,281 | excellent |
| 14,500 | 162,033 | ruby_parser-legacy |
| 15,516 | 142,382 | dynamic_fieldsets |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 8 | 1,427,168,861 | rake |
| 58 | 742,885,748 | racc |
| 150 | 352,720,308 | rdoc |
| 348 | 152,873,380 | sexp_processor |
| 2,404 | 9,612,990 | hoe |
| 20,255 | 88,277 | oedipus_lex |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | zenspider |