tree-sitter: parser generator tool and an incremental parsing library

Mike Brown mikey.be at gmail.com
Wed Feb 24 19:52:07 UTC 2021


On Monday, 22 February 2021 at 15:56:39 UTC, James Blachly wrote:
> https://tree-sitter.github.io/tree-sitter/
> https://github.com/tree-sitter/tree-sitter
> https://news.ycombinator.com/item?id=26225298 (currently #1 on 
> HN)
>
> Will be keeping an eye on this. If it gains traction*, it would 
> be nice (and possibly important) to have a Dlang parser. 
> Haven't looked in depth at the grammar yet -- appears to be 
> context free grammar.
>
> *Supposedly Neovim will be using this going forward

tree-sitter is a GLR parser. This makes sense for a general 
purpose text editor like Atom and Neovim.

It can handle more grammars
It can handle grammars that require fixups in the parser better 
(e.g. C++)
It can potentially give better syntax error reporting

But does come at a cost, and these benefits might not apply to an 
editor that handles just one grammar (Like a D IDE)


More information about the Digitalmars-d mailing list