Tree-sitter: a new parsing system for programming tools - GitHub Universe 2017

Channel:GitHub · Length:43:00 · Published:2017-12-20 · Views:23707

Watch on YouTube

Summary

Max Brunsfeld of GitHub presents Tree-sitter, a parsing system for programming tools that supports incremental, error-tolerant parsing. He demos its integration into GitHub.com and Atom for syntax highlighting and code navigation.

Why HN recommends it

Recommended as the canonical introduction to tree-sitter and why fast incremental parsing enables live editor support.

There is a long (42 minutes) but worth to watch talk about tree-sitter — HN, 2022

Compilers, interpreters & program analysis · Testing, debugging & developer tools

Subtitles (excerpt)

[Music] [Music] all right hi everybody my name is max I work at github on the Adam text editor and today I'm gonna be talking about a piece of software that I've been working on for almost four years now called tree sitter I was worked on it as a side project for a long time and now I'm working on it as part of some projects at github so I'm gonna explain what it is and then I'll talk about what problem I'm trying to solve with it and then I'll show you some of the things that we're building with tree sitter today at github and finally I'll go into some of the algorithms the true center uses that I think are interesting okay so tree sitter is a library for parsing code it's written in C and C++ and it's designed to be used in applications like text editors or github comm that deal with code written in many different languages so it can parse files written in various different programming languages and produce syntax trees that all have the same format to them but the really unique thing the tree sitter does is what's called incremental parsing and what that means is that once you have parsed the file with tree sitter and you have the syntax tree for that file you can then edit the file

On Hacker News

They use tree-sitter [LINK] It's ok with errors in AST and just marks such nodes as invalid. There is a long (42 minutes) but worth to watch talk about tree-sitter [VIDEO] Or the shorter version (20 minutes) [LINK] — ris58h, 2022-04
Tree-sitter is not just for code folding, it's a full-on incremental parser that's fast enough to run on every keystroke. See their expand selection example for another really compelling use-case. If you're interested in more details, there's also this talk from the developer behind tree-sitter ( [VIDEO] ), where he showcases how they could use tree-sitter to quickly parse entire multi-megabyte m… — lewisl9029, 2018-03
`tree-sitter` has been post to the website a bunch of times so I remembered from those submissions: [LINK] Also these resources: [LINK] [VIDEO] — bhl, 2021-07
100% agree. If starting now I think you should consider targeting mlir[1]. It fixes many problems you will have with llvm, and allows you to create language specific dialects and transformations. Impressive new work by a top-notch team led by LLVM creator Chris Lattner. It has LLVM as an optional target, so you get that for free. For a parser, you should consider using tree-sitter[2]. Tree-sitter… — imoldfella, 2019-04

Related videos