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: 367 of 196,721
Downloads: 141,488,908
Daily
Ranking: 680 of 196,694
Downloads: 22,397
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 1,332 | 35,202,252 | html2haml |
| 1,933 | 16,876,597 | rubycritic |
| 1,996 | 15,482,943 | protocol |
| 2,305 | 10,393,997 | fasterer |
| 2,492 | 8,866,622 | hairtrigger |
| 4,031 | 2,865,187 | churn |
| 4,288 | 2,446,287 | roodi |
| 6,505 | 920,512 | dawnscanner |
| 6,619 | 876,754 | sourcify |
| 7,703 | 625,770 | wrong |
| 8,054 | 572,502 | partialruby |
| 8,380 | 519,836 | quality |
| 9,076 | 436,399 | ripper_ruby_parser |
| 9,543 | 389,633 | brakeman-min |
| 10,068 | 345,179 | rufus-treechecker |
| 10,954 | 285,924 | haml2slim |
| 13,903 | 173,864 | brakeman-lib |
| 14,338 | 163,885 | excellent |
| 14,443 | 161,398 | ruby_parser-legacy |
| 15,444 | 142,197 | dynamic_fieldsets |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 8 | 1,410,641,125 | rake |
| 58 | 732,616,779 | racc |
| 152 | 344,213,097 | rdoc |
| 347 | 151,885,747 | sexp_processor |
| 2,390 | 9,558,724 | hoe |
| 20,312 | 87,202 | oedipus_lex |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | zenspider |