Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bakkdoor/wood
Wood - Tree manipulation library for Ruby
https://github.com/bakkdoor/wood
Last synced: 1 day ago
JSON representation
Wood - Tree manipulation library for Ruby
- Host: GitHub
- URL: https://github.com/bakkdoor/wood
- Owner: bakkdoor
- License: bsd-3-clause
- Created: 2014-09-23T07:42:13.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-09-28T22:32:04.000Z (about 10 years ago)
- Last Synced: 2024-10-18T08:38:46.368Z (20 days ago)
- Language: Ruby
- Size: 225 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Wood - Tree manipulation library
Wood is a library for creating, manipulating & rewriting trees,
in particular Abstract Syntax Trees (ASTs).Wood was extracted from a source to source compiler I worked on for
Marft Inc. in 2013/14.
Marft has granted me the rights to this library, so I'm releasing it under the
3-clause BSD license (see LICENSE file).The compiler that was built using this library (which was then called Forest)
translated a subset of ANSI C to multiple target languages, including Java, C#
and JavaScript.Wood provides an easy to use DSL for searching & rewriting whole sub-trees
in place, which can be used for things like subsequently translating a parse tree
into a target language tree (in the compiler project's case to Java::AST,
CSharp::AST and JavaScript::AST trees).You can find some example tree node definitions & rewriting rules in the
examples directory.