Comment

Comment by chrisseaton

Tree-sitter is unfathomable to me. This is the grammar for Ruby:

https://github.com/tree-sitter/tree-sitter-ruby/blob/master/...

I find it absolutely amazing that a grammar for something as complicated as Ruby can be so concise. Less than a thousand lines. The corresponding Bison grammar is 13k lines. And I think the tree-sitter one is scannerless so also includes the lexer?! How do they do it?

parent chrisseaton 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton