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: 357 of 193,553
Downloads: 138,175,598
Daily
Ranking: 812 of 193,540
Downloads: 11,310
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 1,312 | 34,671,768 | html2haml |
| 1,943 | 16,073,968 | rubycritic |
| 1,969 | 15,243,470 | protocol |
| 2,295 | 9,938,127 | fasterer |
| 2,571 | 8,006,402 | hairtrigger |
| 3,961 | 2,810,746 | churn |
| 4,211 | 2,413,113 | roodi |
| 6,294 | 901,235 | dawnscanner |
| 6,394 | 870,755 | sourcify |
| 7,578 | 612,126 | wrong |
| 7,911 | 570,207 | partialruby |
| 8,299 | 507,313 | quality |
| 8,966 | 426,847 | ripper_ruby_parser |
| 9,426 | 380,938 | brakeman-min |
| 9,915 | 339,281 | rufus-treechecker |
| 10,820 | 279,969 | haml2slim |
| 13,849 | 168,386 | brakeman-lib |
| 14,131 | 161,741 | excellent |
| 14,325 | 157,298 | ruby_parser-legacy |
| 15,205 | 140,044 | dynamic_fieldsets |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 8 | 1,341,379,803 | rake |
| 58 | 689,441,834 | racc |
| 164 | 311,627,096 | rdoc |
| 340 | 147,984,571 | sexp_processor |
| 2,366 | 9,330,533 | hoe |
| 20,892 | 80,542 | oedipus_lex |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | zenspider |