Tree-sitter (parser generator)
| Tree-sitter | |
|---|---|
| File:Tree-sitter-small.png | |
| Original author | Max Brunsfeld |
| Initial release | 2018 |
| Repository |
|
| Written in | Rust, C |
| Engine | |
| Platform | Cross-platform |
| Type | Parser generator |
| License | MIT License |
| Website | tree-sitter |
In computing, Tree-sitter is a parser generator and incremental parsing library.
Details
[edit | edit source]It is used to parse source code into concrete syntax trees usable in compilers, interpreters, text editors, and static analyzers.[1][2] It is specialized for use in text editors, as it supports incremental parsing for updating parse trees while code is edited in real time,[3] and provides a built-in S-expression query system for analyzing code.[4]
Text editors which have official integrations with Tree-sitter include Atom,[5] GNU Emacs,[6] Neovim,[7] Lapce,[8] Zed,[9] and Helix.[10] Language bindings allow it to be used from programming languages including Go, Haskell, Java, JavaScript (with Node.js and WASM), Kotlin, Lua, OCaml, Perl, Python, Ruby, Rust, and Swift. Tree-sitter parsers have been written for these languages and many others.[11] GitHub uses Tree-sitter to support in-browser symbolic code navigation in Git repositories.[12]
Tree-sitter uses a GLR parser, a type of LR parser.[13][14][12]
Tree-sitter was originally developed by GitHub for use in the Atom text editor, where it was first released in 2018.[15][5]
See also
[edit | edit source]References
[edit | edit source]- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).. See 22:30 for Wagner influence and 29:27 for GLR implementation.
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).