Hacker GitHub

← All repos

tree-sitter/tree-sitter-ruby

View on GitHub ↗ ★ 228 C

Ruby grammar for tree-sitter

8 mentions on Hacker News by 6 people: 0 stories, 8 comments · first 2017-02-13 · latest 2021-02-23

Mentions per year 8 mentions · busiest year 2021 (6)
20082026
  1. @chrisseaton you are correct, the JSON file is generated. The handwritten parts are: - https://github.com/tree-sitter/tree-sitter-ruby/blob/32cd5a0... - https://github.com/tree-sitter/tree-sitter-ruby/blob/32cd5a0... So about 2k loc. The…
  2. …features to do tree queries to achieve this. Here's the query for detecting Ruby locals: https://github.com/tree-sitter/tree-sitter-ruby/blob/32cd5a0... and here's some better documentation for how the query language works:…
  3. …the Ruby grammar relies so heavily on an external scannar, which is just under 1,000 lines of C++: https://github.com/tree-sitter/tree-sitter-ruby/blob/master/...
  4. bison should be compared to https://github.com/tree-sitter/tree-sitter-ruby/blob/master/... probably?
  5. …actually an outlier from what I've seen; it has one of the largest/most complex external scanners: https://github.com/tree-sitter/tree-sitter-ruby/blob/master/... Precisely because the language is complicated and less amenable to LR…
  6. 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…
  7. …tps://github.com/tree-sitter/tree-sitter-javascript * https://github.com/tree-sitter/tree-sitter-go * https://github.com/tree-sitter/tree-sitter-ruby
    comment by maxbrunsfeld · 2017-03-20 · in Show HN: How to write a recursive descent parser
  8. …* Go - https://github.com/tree-sitter/tree-sitter-go * Ruby - https://github.com/tree-sitter/tree-sitter-ruby * Python - https://github.com/tree-sitter/tree-sitter-python
    comment by maxbrunsfeld · 2017-02-13 · in From AST to Lossless Syntax Tree