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: 331 of 187,571
          Downloads: 130,917,773
        Daily
Ranking: 598 of 187,548
          Downloads: 37,972
        Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name | 
|---|---|---|
| 1,269 | 33,413,363 | html2haml | 
| 1,349 | 29,772,467 | flay | 
| 1,502 | 24,351,609 | flog | 
| 1,694 | 18,409,351 | ruby2ruby | 
| 1,887 | 14,738,354 | protocol | 
| 1,914 | 14,295,478 | rubycritic | 
| 2,307 | 8,915,433 | fasterer | 
| 2,648 | 6,646,861 | hairtrigger | 
| 3,818 | 2,703,676 | churn | 
| 4,038 | 2,353,478 | roodi | 
| 5,157 | 1,294,988 | debride | 
| 5,961 | 896,106 | safemode | 
| 6,076 | 855,690 | dawnscanner | 
| 6,081 | 853,384 | sourcify | 
| 6,083 | 853,065 | i18nliner | 
| 7,183 | 578,700 | wrong | 
| 7,270 | 564,545 | partialruby | 
| 7,837 | 493,226 | quality | 
| 8,423 | 418,744 | ripper_ruby_parser | 
| 9,050 | 357,065 | brakeman-min | 
Depends on
| Rank | Downloads | Name | 
|---|---|---|
| 10 | 1,165,196,519 | rake | 
| 62 | 582,912,236 | racc | 
| 183 | 248,062,731 | rdoc | 
| 318 | 139,384,189 | sexp_processor | 
| 2,298 | 8,985,762 | hoe | 
| 21,123 | 72,435 | oedipus_lex | 
Owners
| # | Gravatar | Handle | 
|---|---|---|
| 1 | zenspider | 
 xmisao
xmisao