Yarp RubyRuby 解释器
Yarp (Yet Another Ruby Parser) 是一个 Ruby 解释器,目前处于早期阶段,旨在取代现有的 CRuby 解释器。
Yarp 的三个目标:
- 可移植性——支持在其他项目、实现和工具中使用这个解释器
- 容错——支持从尽可能多的语法错误中恢复
- 可维护性——成为一个长期存在的项目,具有良好的健康度。这意味着要具备教程、示例、文档、干净的代码、良好的测试覆盖率等。
目录结构
.
├── Makefile configuration to compile the shared library and native tests
├── Rakefile configuration to compile the native extension and run the Ruby tests
├── bin
│ ├── template generates code from the nodes and tokens configured by config.yml
│ └── templates directory containing all of the various templates
├── config.yml specification for tokens and nodes in the tree
├── ext
│ └── yarp
│ └── extension.c the native extension that interacts with librubyparser
├── lib
│ ├── yarp support files for the Ruby library
│ └── yarp.rb main entrypoint into the Ruby library
├── src
│ ├── yarp.c main entrypoint into the shared library
│ └── yarp.h main header file for the shared library
└── test Ruby tests for the Ruby library
评论