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: 351 of 192,692
Downloads: 136,875,182
Daily
Ranking: 795 of 192,666
Downloads: 11,009
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 1,308 | 34,462,991 | html2haml |
| 1,937 | 15,792,701 | rubycritic |
| 1,964 | 15,149,946 | protocol |
| 2,294 | 9,736,524 | fasterer |
| 2,590 | 7,749,921 | hairtrigger |
| 3,929 | 2,793,187 | churn |
| 4,179 | 2,402,748 | roodi |
| 6,149 | 919,622 | safemode |
| 6,240 | 893,162 | dawnscanner |
| 6,321 | 868,723 | sourcify |
| 7,399 | 606,239 | wrong |
| 7,724 | 569,505 | partialruby |
| 8,110 | 505,130 | quality |
| 8,768 | 425,669 | ripper_ruby_parser |
| 9,315 | 376,724 | brakeman-min |
| 9,858 | 338,006 | rufus-treechecker |
| 10,761 | 278,544 | haml2slim |
| 13,817 | 166,159 | brakeman-lib |
| 14,040 | 161,141 | excellent |
| 14,302 | 155,181 | ruby_parser-legacy |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 8 | 1,311,002,349 | rake |
| 58 | 673,199,344 | racc |
| 165 | 300,498,183 | rdoc |
| 336 | 146,433,788 | sexp_processor |
| 2,354 | 9,260,232 | hoe |
| 20,941 | 79,034 | oedipus_lex |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | zenspider |