Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

prism

> 编程语言
Open source

Prism Ruby parser

1.0K stars0 likes3 views
WebsiteGitHub

About

Prism Ruby parser

Prism Ruby parser

This is a parser for the Ruby programming language. It is designed to be portable, error tolerant, and maintainable. It is written in C99 and has no dependencies.

Overview

The repository contains the infrastructure for both a shared library (libprism) and a native CRuby extension. The shared library has no bindings to CRuby itself, and so can be used by other projects. The native CRuby extension links against ruby.h, and so is suitable in the context of CRuby.

…

Getting started

To compile the shared library, you will need:

  • C99 compiler
  • GNU make
  • Ruby 2.7.0 or later

Once you have these dependencies, run:

bundle install

to fetch the Ruby dependencies. Finally, run:

bundle exec rake compile

to compile the shared library. It will be built in the build directory. To test that everything is working, run:

bin/parse -e "1 + 2"

to see the syntax tree for the expression 1 + 2.

Contributing

See the CONTRIBUTING.md file for more information. We additionally have documentation about the overall design of the project as well as various subtopics.

  • Build system
  • Configuration
  • CRuby compilation
  • Design
  • Encoding
  • Fuzzing
  • Heredocs
  • JavaScript
  • Local variable depth
  • Mapping
  • Parser translation
  • Parsing rules
  • Releasing
  • Ripper translation
  • Ruby API
  • RubyParser translation
  • Serialization
  • Testing

Examples

Prism has been integrated into the majority of Ruby runtimes, many libraries, and some applications. Below is a list of some of the projects that use Prism:

Runtimes

  • CRuby (via C)
  • Garnet (via WASM)
  • JRuby (via Java)
  • MRuby (via C)
  • Natalie (via C++ and Ruby)
  • Opal (via Ruby and WASM)
  • TruffleRuby (via Java)

Libraries

  • dispersion
  • fast
  • minifyrb
  • packwerk (via parser translator)
  • rbi
  • rails
    • parsing renders
    • parsing rdoc
    • parsing tests
  • repl_type_completor
  • rubocop (via parser translator)
  • ruby-lsp
  • smart_todo
  • sorbet-eraser
  • synvert
  • typeprof
  • unparser (via parser translator)

Applications

  • gem.sh
  • Sorbet

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言