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: 365 of 196,106
Downloads: 140,718,081
Daily
Ranking: 691 of 196,079
Downloads: 22,689
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 1,330 | 35,089,222 | html2haml |
| 1,935 | 16,693,266 | rubycritic |
| 1,991 | 15,422,556 | protocol |
| 2,305 | 10,288,816 | fasterer |
| 2,507 | 8,658,679 | hairtrigger |
| 4,019 | 2,850,756 | churn |
| 4,273 | 2,437,938 | roodi |
| 6,485 | 917,472 | dawnscanner |
| 6,599 | 875,537 | sourcify |
| 7,681 | 623,048 | wrong |
| 8,020 | 572,200 | partialruby |
| 8,366 | 516,498 | quality |
| 9,052 | 435,002 | ripper_ruby_parser |
| 9,515 | 389,096 | brakeman-min |
| 10,039 | 344,009 | rufus-treechecker |
| 10,914 | 285,285 | haml2slim |
| 13,866 | 173,430 | brakeman-lib |
| 14,305 | 163,412 | excellent |
| 14,412 | 160,597 | ruby_parser-legacy |
| 15,374 | 142,138 | dynamic_fieldsets |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 8 | 1,393,995,228 | rake |
| 58 | 722,407,837 | racc |
| 154 | 336,079,615 | rdoc |
| 346 | 150,971,465 | sexp_processor |
| 2,380 | 9,506,771 | hoe |
| 20,457 | 85,654 | oedipus_lex |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | zenspider |