parser VS elisp-tree-sitter

Compare parser vs elisp-tree-sitter and see what are their differences.

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
parser elisp-tree-sitter
5 21
1,557 803
- 0.1%
8.4 7.2
8 days ago 9 days ago
Yacc Emacs Lisp
GNU General Public License v3.0 or later MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

parser

Posts with mentions or reviews of parser. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-11-14.
  • Inko Programming Language
    4 projects | news.ycombinator.com | 14 Nov 2023
    I have mixed feelings on Rust's syntax, especially around generics, lifetimes, and the `modifier -> keyword` syntax (i.e. `async fn` or `pub fn`). For Inko, I wanted something that's easy to parse by hand, and no context specific parsing (e.g. `QUOTE -> something` being the start of a lifetime in one place, but a char literal in another place).

    Another motivator for that is that years ago I worked on Rubinius for a while (an implementation of Ruby), and helped out with a parser for Ruby (https://github.com/whitequark/parser). The Ruby developers really liked changing their already impossible syntax in even more impossible ways on a regular basis, making it a real challenge to provide syntax related tools that support multiple Ruby versions. I wanted to avoid making the same mistake with Inko, hence I'm actively trying to keep the syntax as simple as is reasonable.

    As for the specific examples:

    - `fn async` means your parser only needs to look for `A | B | fn` in a certain scope, instead of `A | B | fn | async fn`. This cuts down the amount of repetition in the parser. An example is found at https://github.com/inko-lang/inko/blob/8f5ad1e56756fe00325a3..., which parses the body of a class definition.

    - Skipping parentheses is directly lifted from Ruby, because I really like it. Older versions took this further by also letting you write `function arg1 arg2`, but I got rid of that to make parsing easier. It's especially nice so you can do things like `if foo.bar.baz? { ... }` instead of `if foo().bar().baz?()`, though I suspect opinions will differ on this :)

    - Until recently we did in fact use `::` as a namespace separator, but I changed that to `.` to keep things consistent with the call syntax, and because it removes the need for remembering "Oh for namespaces I need to use ::, but for calls .".

    - `[T]` for generics is because most editors automatically insert a closing `]` if you type `[`, but not when you type `<`. If they do, then trying to write `10<20` is annoying because you'd end up with `10<>20`. I also just like the way it looks more. The usual ambiguity issues surrounding `<>` (e.g. what leads to `foo::()` in Rust) doesn't apply to Inko, because we don't allow generics in expressions (i.e. `Array[Int].with_capacity(42)` isn't valid syntax) in the first place.

  • Marc-André Lafortune on the abstract syntax tree and rewiring Rubocop
    4 projects | dev.to | 7 Sep 2023
    So there was this really awesome gem called parser written by someone not on the core team that gives you a super clean understanding of the Ruby code. Not only does it not care if the parentheses are there or not, but there's a really well structured and precise mapping of where the information comes from and it is completely semantic. So if you've got parentheses or not, it's not gonna make any difference in the structure of your abstract syntax tree, but you can actually ask where are the locations. That is taken care of, but the understanding of the code, what's going on in the code is completely independent of if you wrote those parentheses or not.
  • Where is keyword behavior defined?
    4 projects | /r/ruby | 26 Dec 2022
    Working with those things, possibly with the help of reading books, tends to be how it's learned I'd say. I'm not the one you asked, but I personally worked with Ruby for 10 years, worked on a system to improve coverage reports, which relied on rewriting ruby code. Doing so was done using the Parser gem, which is a ruby parser that has a different abstract syntax tree (https://github.com/whitequark/parser). I'm also interested in programming languages development, so I try to read on this / develop my own language in my free time.
  • Bad Ruby: Hash Value Omission
    2 projects | /r/ruby | 20 Jan 2022
    Changes like this have been going on for years. I remember that back when I was still helping out with https://github.com/whitequark/parser, the author on a regular basis had to deal with Ruby making yet more non-trivial syntax changes. IIRC they eventually burned out on the project because of that, but my memory is a bit fuzzy.
  • Tree-sitter: an incremental parsing system for programming tools
    24 projects | news.ycombinator.com | 22 Feb 2021
    This is more a function of Ruby than of tree-sitter. The tree-sitter grammars for other languages are hopefully less inscrutable. For Ruby, we basically just ported whitequark's parser [1] over to tree-sitter's grammar DSL and scanner API.

    [1] https://github.com/whitequark/parser

elisp-tree-sitter

Posts with mentions or reviews of elisp-tree-sitter. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-05-28.
  • How to Get Started with Tree-Sitter
    4 projects | /r/emacs | 28 May 2023
    Look at the original integration project https://github.com/emacs-tree-sitter/elisp-tree-sitter, before it was done inside Emacs 29+.
  • function to mark all within brackets, quotes, etc
    1 project | /r/emacs | 14 Jan 2023
    When tree-sitter is available you may extend expand-region with this one one https://github.com/emacs-tree-sitter/elisp-tree-sitter/issues/20 Works very nice for me. But simple matching pairs should be handled well by expand-region alone
  • How to use Emacs 29 Tree-sitter?
    12 projects | /r/emacs | 3 Dec 2022
    That said, if you want a more complete experience with tree-sitter right now, there’s a 3rd party implementation with support for a lot more languages, and also automatically downloads all supported grammars. It’s available here: https://github.com/emacs-tree-sitter/elisp-tree-sitter
  • why is melpa still necessary for stuff that is built-in to emacs?
    1 project | /r/emacs | 24 Nov 2022
    Just like there are multiple LSP implementations for emacs (lsp-mode, eglot, lsp-bridge), there are multiple tree-sitter implementations. The one recently included in emacs was never a standalone package, I believe (correct me if that’s wrong), but was created with the purpose of being included in emacs. You will need melpa to download the linked elisp-tree-sitter package (https://github.com/emacs-tree-sitter/elisp-tree-sitter), but not the built in one.
  • tree-sitter has been merged into master
    3 projects | /r/emacs | 23 Nov 2022
    How am I going to even use the built-in one? I was using elisp-tree-sitter. I know I have to add grammar for different languages, but how? I have been searching for a while and still have no clue.
  • Ask HN: S/W development text editor have feature colorizing every iteration?
    10 projects | news.ycombinator.com | 29 Sep 2022
    from github README.rst "Emacs package that provides a standardized framework for manipulating and navigating your source code using tree sitter's concrete syntax tree " -> https://github.com/mickeynp/combobulate

    https://www.spacemacs.org/ with https://github.com/emacs-tree-sitter/elisp-tree-sitter then write a iterator/loop query for language(s) editing per https://tree-sitter.github.io/tree-sitter/syntax-highlightin...

    tad less installation heavy (sorta) but also makes use of tree-sitter syntax queries : https://www.lunarvim.org (neovim with treesitter syntax)

    blockman usage examples: https://www.youtube.com/channel/UC5539gDeAdWqeXcczWuhnBA

    Alternative examples / takes (per user interface):

    ### embedding a block of source code in a document:

      ** carrotsearch.gethub.io/apidocs/code-blocks
  • regarding feature/tree-sitter branch
    2 projects | /r/emacs | 5 Sep 2022
    However, if you want to use tree-sitter today, there is the tree-sitter package which enables tree-sitter syntax highlighting in a number of popular major modes. I’ve been using it for about six months now in all major modes it supports.
  • how to configure doom emacs (generic emacs too) with a C project
    1 project | /r/emacs | 4 Sep 2022
    Tree Sitter and lsp-mode might be of help. Looks like both take a bit of work to get going. I have personally not used them, so try out which suits you and let us know how it went.
  • Commercial-Emacs
    5 projects | news.ycombinator.com | 2 Jun 2022
    You can use tree-sitter already if you have dynamic module support: https://github.com/emacs-tree-sitter/elisp-tree-sitter
  • Are we living in the golden age of Emacs?
    5 projects | /r/emacs | 26 Apr 2022

What are some alternatives?

When comparing parser and elisp-tree-sitter you can also consider the following projects:

tree-sitter-ruby - Ruby grammar for tree-sitter

tree-sitter-go - Go grammar for tree-sitter

tree-sitter-kotlin - Kotlin grammar for Tree-sitter

tree-sitter - An incremental parsing system for programming tools

lsif-os - A (mostly) language-agnostic indexer for generating LSIF data.

typescript.el - TypeScript-support for Emacs

Moose - MOOSE - Platform for software and data analysis.

lsp-treemacs - lsp-mode :heart: treemacs

nvim-treesitter - Nvim Treesitter configurations and abstraction layer

csharp-mode - A major-mode for editing C# in emacs