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
* **Dependency-free** so that the runtime library (which is written in pure C) 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:
* [JavaScript ](https://github.com/tree-sitter/node-tree-sitter )
* [Rust ](https://github.com/tree-sitter/rust-tree-sitter )
* [Haskell ](https://github.com/tree-sitter/haskell-tree-sitter )
* [Ruby ](https://github.com/tree-sitter/ruby-tree-sitter )
### Available Parsers
2018-06-12 17:37:46 -07:00
Parsers for these languages are fairly complete:
2018-06-10 09:54:59 -07:00
* [Bash ](https://github.com/tree-sitter/tree-sitter-bash )
* [C ](https://github.com/tree-sitter/tree-sitter-c )
* [C++ ](https://github.com/tree-sitter/tree-sitter-cpp )
2018-10-30 09:36:45 -07:00
* [CSS ](https://github.com/tree-sitter/tree-sitter-css )
2018-07-05 16:45:27 -07:00
* [ERB / EJS ](https://github.com/tree-sitter/tree-sitter-embedded-template )
2018-06-10 09:54:59 -07:00
* [Go ](https://github.com/tree-sitter/tree-sitter-go )
2018-06-12 17:37:46 -07:00
* [HTML ](https://github.com/tree-sitter/tree-sitter-html )
2018-06-10 09:54:59 -07:00
* [JavaScript ](https://github.com/tree-sitter/tree-sitter-javascript )
2018-07-05 16:45:27 -07:00
* [OCaml ](https://github.com/tree-sitter/tree-sitter-ocaml )
2018-06-10 09:54:59 -07:00
* [PHP ](https://github.com/tree-sitter/tree-sitter-php )
* [Python ](https://github.com/tree-sitter/tree-sitter-python )
* [Ruby ](https://github.com/tree-sitter/tree-sitter-ruby )
* [Rust ](https://github.com/tree-sitter/tree-sitter-rust )
* [TypeScript ](https://github.com/tree-sitter/tree-sitter-typescript )
2018-06-12 17:37:46 -07:00
Parsers for these languages are in development:
2018-06-10 09:54:59 -07:00
2018-06-13 10:02:27 -07:00
* [Agda ](https://github.com/tree-sitter/tree-sitter-agda )
* [C-sharp ](https://github.com/tree-sitter/tree-sitter-c-sharp )
2018-06-10 09:54:59 -07:00
* [Haskell ](https://github.com/tree-sitter/tree-sitter-haskell )
* [Java ](https://github.com/tree-sitter/tree-sitter-java )
* [Julia ](https://github.com/tree-sitter/tree-sitter-julia )
* [Scala ](https://github.com/tree-sitter/tree-sitter-scala )
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
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:
- [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 ](http://www.umsec.umn.edu/publications/Context-Aware-Scanning-Parsing-Extensible )
- [Efficient and Flexible Incremental Parsing ](http://ftp.cs.berkeley.edu/sggs/toplas-parsing.ps )
- [Incremental Analysis of Real Programming Languages ](https://pdfs.semanticscholar.org/ca69/018c29cc415820ed207d7e1d391e2da1656f.pdf )
- [Error Detection and Recovery in LR Parsers ](http://what-when-how.com/compiler-writing/bottom-up-parsing-compiler-writing-part-13 )
- [Error Recovery for LR Parsers ](http://www.dtic.mil/dtic/tr/fulltext/u2/a043470.pdf )