A summary of data about the Ruby ecosystem.

https://github.com/seattlerb/ruby_parser

ruby_parser is a ruby parser written in pure ruby. It outputs s-expressions which can be manipulated and converted back to ruby via the ruby2ruby gem.
https://github.com/seattlerb/ruby_parser

Last synced: about 1 hour ago
JSON representation

Repository metadata

ruby_parser is a ruby parser written in pure ruby. It outputs s-expressions which can be manipulated and converted back to ruby via the ruby2ruby gem.

README.rdoc

          = ruby_parser

home :: https://github.com/seattlerb/ruby_parser
bugs :: https://github.com/seattlerb/ruby_parser/issues
rdoc :: http://docs.seattlerb.org/ruby_parser

== NOTICE:

With the advent of prism, and it's ruby_parser compatibility mode,
this project is EOL. I've switched all my projects that use
ruby_parser over to prism with only a minimum of fixes sent upstream.
Use prism ~> 1.7 for best results.

I'm doing one more release to get my standing changes out into the
world and might follow up with another if anything adverse is
reported... but other than that, I'm very happy to put this out to
pasture.

== DESCRIPTION:

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.

== FEATURES/PROBLEMS:

* Pure ruby, no compiles.
* Includes preceding comment data for defn/defs/class/module nodes!
* Incredibly simple interface.
* Output is 100% equivalent to ParseTree.
  * Can utilize PT's SexpProcessor and UnifiedRuby for language processing.
* Known Issue: Speed is now pretty good, but can always improve:
  * RP parses a corpus of 3702 files in 125s (avg 108 Kb/s)
  * MRI+PT parsed the same in 67.38s (avg 200.89 Kb/s)
* Known Issue: Code is much better, but still has a long way to go.
* Known Issue: Totally awesome.
* Known Issue: line number values can be slightly off. Parsing LR sucks.

== SYNOPSIS:

  RubyParser.new.parse "1+1"
  # => s(:call, s(:lit, 1), :+, s(:lit, 1))

You can also use Ruby19Parser, Ruby18Parser, or RubyParser.for_current_ruby:

  RubyParser.for_current_ruby.parse "1+1"
  # => s(:call, s(:lit, 1), :+, s(:lit, 1))

== DEVELOPER NOTES:

To add a new version:

* New parser should be generated from lib/ruby_parser[23].yy.
* Extend lib/ruby_parser[23].yy with new class name.
* Add new version number to V2/V3 in Rakefile for rule creation.
* Add new `ruby_parse "x.y.z"` line to Rakefile for rake compare (line ~300).
* Require generated parser in lib/ruby_parser.rb.
* Add new V## = ::Ruby##Parser; end to ruby_parser.rb (bottom of file).
* Add empty TestRubyParserShared##Plus module and TestRubyParserV## to test/test_ruby_parser.rb.
* Extend Manifest.txt with generated file names.
* Add new version number to sexp_processor's pt_testcase.rb in all_versions.

Until all of these are done, you won't have a clean test run.

== REQUIREMENTS:

* ruby. woot.
* sexp_processor for Sexp and SexpProcessor classes, and testing.
* racc full package for parser development (compiling .y to .rb).

== INSTALL:

* sudo gem install ruby_parser

== LICENSE:

(The MIT License)

Copyright (c) Ryan Davis, seattle.rb

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

        

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 1 day ago

Total Commits: 871
Total Committers: 2
Avg Commits per committer: 435.5
Development Distribution Score (DDS): 0.002

Commits in past year: 14
Committers in past year: 1
Avg Commits per committer in past year: 14.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
Ryan Davis r****d@z****m 869
evan e****n@f****t 2

Committer domains:


Issue and Pull Request metadata

Last synced: 27 days ago

Total issues: 76
Total pull requests: 35
Average time to close issues: over 1 year
Average time to close pull requests: about 2 months
Total issue authors: 41
Total pull request authors: 10
Average comments per issue: 2.93
Average comments per pull request: 2.37
Merged pull request: 0
Bot issues: 0
Bot pull requests: 0

Past year issues: 0
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 0
Past year average comments per issue: 0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/seattlerb/ruby_parser

Top Issue Authors

  • whitequark (23)
  • mvz (5)
  • ojab (4)
  • DamirSvrtan (3)
  • mildred (3)
  • pravi (2)
  • zenspider (2)
  • sebfie (1)
  • ofedoren (1)
  • JacobNinja (1)
  • koenrh (1)
  • swiknaba (1)
  • maisumakun (1)
  • sonalkr132 (1)
  • 331299 (1)

Top Pull Request Authors

  • mvz (19)
  • presidentbeef (7)
  • pravi (2)
  • mitsuru (1)
  • mnin (1)
  • wildmaples (1)
  • casperisfine (1)
  • torrocus (1)
  • zenspider (1)
  • gmcgibbon (1)

Top Issue Labels

Top Pull Request Labels


Package metadata

gem.coop: 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.

  • Homepage: https://github.com/seattlerb/ruby_parser
  • Documentation: http://www.rubydoc.info/gems/ruby_parser/
  • Licenses: MIT
  • Latest release: 3.22.0 (published 2 months ago)
  • Last Synced: 2026-03-02T00:33:37.802Z (2 days ago)
  • Versions: 80
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 134,256,043 Total
  • Docker Downloads: 450,495,044
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.106%
    • Downloads: 0.177%
    • Docker downloads count: 0.247%
  • Maintainers (1)
debian-13: ruby-ruby-parser

  • Homepage: https://github.com/seattlerb/ruby_parser
  • Documentation: https://packages.debian.org/trixie/ruby-ruby-parser
  • Licenses:
  • Latest release: 3.20.0-2 (published 19 days ago)
  • Last Synced: 2026-02-13T13:19:20.066Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.372%
    • Forks count: 0.713%
    • Stargazers count: 0.774%
rubygems.org: 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.

proxy.golang.org: github.com/seattlerb/ruby_parser

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/seattlerb/ruby_parser#section-documentation
  • Licenses:
  • Latest release: v3.22.0+incompatible (published 2 months ago)
  • Last Synced: 2026-02-28T20:00:38.972Z (3 days ago)
  • Versions: 67
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Forks count: 2.567%
    • Stargazers count: 2.701%
    • Average: 6.411%
    • Dependent packages count: 9.576%
    • Dependent repos count: 10.802%
ubuntu-24.04: ruby-ruby-parser

  • Homepage: https://github.com/seattlerb/ruby_parser
  • Licenses:
  • Latest release: 3.20.0-2 (published 25 days ago)
  • Last Synced: 2026-02-06T16:00:40.952Z (25 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
ubuntu-23.04: ruby-ruby-parser

  • Homepage: https://github.com/seattlerb/ruby_parser
  • Licenses:
  • Latest release: 3.15.1-1 (published 21 days ago)
  • Last Synced: 2026-02-11T06:49:04.013Z (21 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-20.04: ruby-ruby-parser

  • Homepage: https://github.com/seattlerb/ruby_parser
  • Licenses:
  • Latest release: 3.11.0-2 (published 19 days ago)
  • Last Synced: 2026-02-13T07:22:14.020Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-23.10: ruby-ruby-parser

  • Homepage: https://github.com/seattlerb/ruby_parser
  • Licenses:
  • Latest release: 3.20.0-2 (published 18 days ago)
  • Last Synced: 2026-02-13T18:32:17.004Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-24.10: ruby-ruby-parser

  • Homepage: https://github.com/seattlerb/ruby_parser
  • Licenses:
  • Latest release: 3.20.0-2 (published 22 days ago)
  • Last Synced: 2026-02-09T17:13:53.074Z (22 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
debian-11: ruby-ruby-parser

  • Homepage: https://github.com/seattlerb/ruby_parser
  • Documentation: https://packages.debian.org/bullseye/ruby-ruby-parser
  • Licenses:
  • Latest release: 3.15.1-1 (published 21 days ago)
  • Last Synced: 2026-02-13T08:24:35.048Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
debian-10: ruby-parser

  • Homepage: https://github.com/seattlerb/ruby_parser
  • Documentation: https://packages.debian.org/buster/ruby-parser
  • Licenses:
  • Latest release: 3.11.0-1 (published 20 days ago)
  • Last Synced: 2026-02-13T04:24:17.308Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
guix: ruby-ruby-parser

Ruby parser written in pure Ruby

ubuntu-20.04: ruby-parser

  • Homepage: https://github.com/seattlerb/ruby_parser
  • Licenses:
  • Latest release: 3.11.0-1 (published 19 days ago)
  • Last Synced: 2026-02-13T07:19:32.713Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
debian-12: ruby-ruby-parser

  • Homepage: https://github.com/seattlerb/ruby_parser
  • Documentation: https://packages.debian.org/bookworm/ruby-ruby-parser
  • Licenses:
  • Latest release: 3.15.1-1 (published 19 days ago)
  • Last Synced: 2026-02-12T23:40:28.934Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
ubuntu-22.04: ruby-ruby-parser

  • Homepage: https://github.com/seattlerb/ruby_parser
  • Licenses:
  • Latest release: 3.15.1-1 (published 18 days ago)
  • Last Synced: 2026-02-13T13:25:29.589Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%

Score: 27.750973580589417