SaaSHub helps you find the best software and product alternatives Learn more →
Rust-sitter Alternatives
Similar projects and alternatives to rust-sitter
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
rust-sitter reviews and mentions
-
Writing a Debugger from Scratch: Breakpoints
This is a great series!
I noticed that the author was using https://github.com/hydro-project/rust-sitter as a parser. Which is based on https://tree-sitter.github.io/tree-sitter/. I've been hearing about Tree-sitter a lot recently, so I dug into it.
Tree-sitter is a tool for generating fast, incremental parsers. In particular, the algorithm is suited towards writing "language servers" for IDEs, which re-parse code incrementally as the user works. These kinds of incremental parsers have historically been a huge problem. It looks like Tree-sitter is an enormous practical advance in this area.
And discovering that there's a way to use Tree-sitter from Rust is fantastic. From the post:
#[rust_sitter::language]
-
Topiary: A code formatting engine leveraging Tree-sitter
Oh I totally agree with your sentiment about tree-sitter. That's why I want it to be extended in functionality. It makes so much sense to have a single place where one parser can be written and everybody benefits. Much like language servers.
Where I disagree is that IMO, tree-sitter already is very close to this ideal model. It has incremental parsing. It has great tree querying. Where it needs help is an AST facade over the raw syntax tree, which is very much feasible. rust-sitter[1] does it for instance. Tree-editing and tree construction is also very much doable. I don't think it'd have an impact on grammar construction at all. As for error recovery, I think it could function as a reparsing feature where you can drop down to a manual parser (or even a secondary grammar) that is more tolerant. Or an error recovery function that can be written in any language. tree-sitter already has the ability to use a manual lexer written in native code, so this is not such a stretch.
[1]: https://github.com/hydro-project/rust-sitter.
- GitHub - hydro-project/rust-sitter: Use Tree Sitter to parse your own languages in Rust
- Rust-sitter: Define your entire tree-sitter grammar in Rust code
- Rust-sitter: Define your entire tree-sitter grammar on idiomatic Rust
- Rust Sitter: create efficient parsers in Rust
-
A note from our sponsor - SaaSHub
www.saashub.com | 2 May 2024
Stats
hydro-project/rust-sitter is an open source project licensed under MIT License which is an OSI approved license.
The primary programming language of rust-sitter is Rust.
Sponsored