2018-06-10 09:54:59 -07:00
---
title: Introduction
---
# Introduction
2018-07-10 14:09:22 -07:00
Tree-sitter is a parser generator tool and an incremental parsing library. It can build a concrete syntax tree for a source file and efficiently update the syntax tree as the source file is edited. Tree-sitter aims to be:
2018-02-24 21:29:37 -08:00
2018-06-10 09:54:59 -07:00
* **General** enough to parse any programming language
2018-06-11 19:17:10 -07:00
* **Fast** enough to parse on every keystroke in a text editor
2018-07-10 14:09:22 -07:00
* **Robust** enough to provide useful results even in the presence of syntax errors
2023-01-27 10:15:23 +02:00
* **Dependency-free** so that the runtime library (which is written in pure [C ](https://github.com/tree-sitter/tree-sitter/tree/master/lib )) can be embedded in any application
2018-06-10 09:54:59 -07:00
### Language Bindings
There are currently bindings that allow Tree-sitter to be used from the following languages:
2024-06-30 12:02:22 +03:00
#### Official
2024-01-25 21:10:46 -05:00
* [C# ](https://github.com/tree-sitter/csharp-tree-sitter )
2024-08-24 18:58:31 -04:00
* [Go ](https://github.com/tree-sitter/go-tree-sitter )
2021-09-16 13:19:05 -07:00
* [Haskell ](https://github.com/tree-sitter/haskell-tree-sitter )
2024-06-30 12:02:22 +03:00
* [Java (JDK 22) ](https://github.com/tree-sitter/java-tree-sitter )
2019-05-07 10:27:45 -07:00
* [JavaScript (Node.js) ](https://github.com/tree-sitter/node-tree-sitter )
2021-09-16 13:19:05 -07:00
* [JavaScript (Wasm) ](https://github.com/tree-sitter/tree-sitter/tree/master/lib/binding_web )
2024-06-30 12:02:22 +03:00
* [Kotlin ](https://github.com/tree-sitter/kotlin-tree-sitter )
* [Python ](https://github.com/tree-sitter/py-tree-sitter )
* [Rust ](https://github.com/tree-sitter/tree-sitter/tree/master/lib/binding_rust )
#### Third-party
* [Delphi ](https://github.com/modersohn/delphi-tree-sitter )
* [ELisp ](https://github.com/emacs-tree-sitter/elisp-tree-sitter )
* [Go ](https://github.com/smacker/go-tree-sitter )
* [Guile ](https://github.com/Z572/guile-ts )
* [Java (Android) ](https://github.com/AndroidIDEOfficial/android-tree-sitter )
* [Java (JDK 8+) ](https://github.com/bonede/tree-sitter-ng )
* [Java (JDK 11+) ](https://github.com/seart-group/java-tree-sitter )
* [Julia ](https://github.com/MichaelHatherly/TreeSitter.jl )
2021-11-19 13:58:46 -08:00
* [Lua ](https://github.com/euclidianAce/ltreesitter )
2024-06-30 12:02:22 +03:00
* [Lua ](https://github.com/xcb-xwii/lua-tree-sitter )
* [OCaml ](https://github.com/semgrep/ocaml-tree-sitter-core )
2024-02-07 21:26:21 +01:00
* [Odin ](https://github.com/laytan/odin-tree-sitter )
2023-01-27 10:15:23 +02:00
* [Perl ](https://metacpan.org/pod/Text::Treesitter )
2024-06-30 12:02:22 +03:00
* [R ](https://github.com/DavisVaughan/r-tree-sitter )
2024-02-07 21:26:21 +01:00
* [Ruby ](https://github.com/Faveod/ruby-tree-sitter )
2021-11-17 11:30:32 -05:00
* [Swift ](https://github.com/ChimeHQ/SwiftTreeSitter )
2018-06-10 09:54:59 -07:00
2023-01-17 09:14:57 -05:00
### Parsers
2018-06-10 09:54:59 -07:00
2024-06-30 12:02:22 +03:00
A list of known parsers can be found in the [wiki ](https://github.com/tree-sitter/tree-sitter/wiki/List-of-parsers ).
2018-02-24 23:47:37 -08:00
2018-06-10 09:54:59 -07:00
### Talks on Tree-sitter
2018-02-24 23:47:37 -08:00
2019-05-07 09:23:52 -07:00
* [Strange Loop 2018 ](https://www.thestrangeloop.com/2018/tree-sitter---a-new-parsing-system-for-programming-tools.html )
2018-06-10 09:54:59 -07:00
* [FOSDEM 2018 ](https://www.youtube.com/watch?v=0CGzC_iss-8 )
* [GitHub Universe 2017 ](https://www.youtube.com/watch?v=a1rC79DHpmY )
2018-06-11 19:17:10 -07:00
### Underlying Research
The design of Tree-sitter was greatly influenced by the following research papers:
docs: update badges; fix markdown lint complains
Linter config `.vscode/settings.json`:
```json
{
"[markdown]": {
"files.trimTrailingWhitespace": false,
},
"markdownlint.config": {
"default": true,
// "ul-style": {
// "style": "asterisk"
// },
"MD001": false,
"MD024": false,
"MD025": false,
"MD033": false,
"MD041": false,
"MD053": false,
},
}
```
2023-04-16 21:14:19 +03:00
* [Practical Algorithms for Incremental Software Development Environments ](https://www2.eecs.berkeley.edu/Pubs/TechRpts/1997/CSD-97-946.pdf )
* [Context Aware Scanning for Parsing Extensible Languages ](https://www-users.cse.umn.edu/~evw/pubs/vanwyk07gpce/vanwyk07gpce.pdf )
* [Efficient and Flexible Incremental Parsing ](https://harmonia.cs.berkeley.edu/papers/twagner-parsing.pdf )
* [Incremental Analysis of Real Programming Languages ](https://harmonia.cs.berkeley.edu/papers/twagner-glr.pdf )
* [Error Detection and Recovery in LR Parsers ](https://what-when-how.com/compiler-writing/bottom-up-parsing-compiler-writing-part-13 )
* [Error Recovery for LR Parsers ](https://apps.dtic.mil/sti/pdfs/ADA043470.pdf )