Menu
Home Explore People Places Arts History Plants & Animals Science Life & Culture Technology
On this page
Tree-sitter (parser generator)
Parser generator and library

In computing, Tree-sitter is a parser generator and incremental parsing library.

Related Image Collections Add Image
We don't have any YouTube videos related to Tree-sitter (parser generator) yet.
We don't have any PDF documents related to Tree-sitter (parser generator) yet.
We don't have any Books related to Tree-sitter (parser generator) yet.
We don't have any archived web articles related to Tree-sitter (parser generator) yet.

Details

It is used to parse source code into concrete syntax trees usable in compilers, interpreters, text editors, and static analyzers.12 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.131415

Tree-sitter was originally developed by GitHub for use in the Atom text editor, where it was first released in 2018.1617

See also

References

  1. "Introductory to Treesitter". Blog Teknologi Umum. Retrieved 2023-07-30. https://teknologiumum.com/posts/introductory-to-treesitter

  2. Petersen, Mickey. "How to Get Started with Tree-Sitter". Mastering Emacs. Retrieved 2023-10-30. https://www.masteringemacs.org/article/how-to-get-started-tree-sitter

  3. "TreeSitter - the holy grail of parsing source code". symflower.com. Retrieved 2023-07-30. https://symflower.com/en/company/blog/2023/parsing-code-with-tree-sitter/

  4. Petersen, Mickey. "Tree Sitter and the Complications of Parsing Languages". Mastering Emacs. Retrieved 2023-07-30. https://www.masteringemacs.org/article/tree-sitter-complications-of-parsing-languages

  5. Brunsfeld, Max (2018-10-31). "Atom understands your code better than ever before". The GitHub Blog. Retrieved 2023-07-30. https://github.blog/2018-10-31-atoms-new-parsing-system/

  6. "GNU Emacs NEWS -- history of user-visible changes". https://www.gnu.org/savannah-checkouts/gnu/emacs/news/NEWS.29.1

  7. "Treesitter - Neovim docs". neovim.io. Retrieved 2023-07-30. https://neovim.io/doc/user/treesitter.html

  8. "lapce/CHANGELOG.md at f4747fbd306a4b8fda6927e37593bf23f4a1584b · lapce/lapce". GitHub. Retrieved 2023-07-30. https://github.com/lapce/lapce/blob/f4747fbd306a4b8fda6927e37593bf23f4a1584b/CHANGELOG.md

  9. "Zed - Code at the speed of thought". Zed. Retrieved 2023-07-30. https://zed.dev/

  10. "Helix". helix-editor.com. Retrieved 2023-07-30. https://helix-editor.com/news/release-22-03-highlights/

  11. "Tree-sitter|Introduction". tree-sitter.github.io. Retrieved 2023-07-30. https://tree-sitter.github.io/tree-sitter/

  12. Clem, Timothy; Thomson, Patrick (2021-08-31). "Static Analysis at GitHub: An experience report". Queue. 19 (4): 42–67. doi:10.1145/3487019.3487022. ISSN 1542-7730. S2CID 238412787. https://doi.org/10.1145%2F3487019.3487022

  13. Nadeem, Ayman (2020-08-04). "CodeGen: Semantic's improved language support system". The GitHub Blog. Retrieved 2023-07-30. https://github.blog/2020-08-04-codegen-semantics-improved-language-support-system/

  14. "Tree-sitter - a new parsing system for programming tools" by Max Brunsfeld, 14 October 2018, retrieved 2023-07-30. See 22:30 for Wagner influence and 29:27 for GLR implementation. https://www.youtube.com/watch?v=Jes3bD6P0To

  15. Clem, Timothy; Thomson, Patrick (2021-08-31). "Static Analysis at GitHub: An experience report". Queue. 19 (4): 42–67. doi:10.1145/3487019.3487022. ISSN 1542-7730. S2CID 238412787. https://doi.org/10.1145%2F3487019.3487022

  16. Krill, Paul (2018-03-16). "What's new in GitHub's Atom text editor". InfoWorld. Retrieved 2023-10-30. https://www.infoworld.com/article/3263904/whats-new-in-githubs-atom-text-editor.html

  17. Brunsfeld, Max (2018-10-31). "Atom understands your code better than ever before". The GitHub Blog. Retrieved 2023-07-30. https://github.blog/2018-10-31-atoms-new-parsing-system/