emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using incremental parsing in Emacs


From: Dmitry Gutov
Subject: Re: Using incremental parsing in Emacs
Date: Sat, 11 Jan 2020 04:41:53 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 10.01.2020 9:41, Eli Zaretskii wrote:
Cc: "address@hidden" <address@hidden>
From: Dmitry Gutov <address@hidden>
Date: Fri, 10 Jan 2020 00:56:38 +0300

(**) Which means that if we try to use Tree-Sitter as-is, our current
practice of defining the language grammar in Lisp would go our of the
window. https://github.com/ubolonton/emacs-tree-sitter demonstrates this
as well: language grammars have to be compiled into a shared library (or
libraries). We would have lots of grammars supplied by the third party,
which is kind of good, but we would lose the ease of experimenting with
them that we have now, or being able to write support for a new
up-and-coming language very quickly. Which a certain fraction of our
users enjoys, AFAIK.

If we provide infrastructure for using the likes of Tree-Sitter in
core, how long do you think it will take until someone rewrites their
JS generator of parse tables in Lisp?  And we already have machinery
in place for loading external shared objects; it can be extended if
necessary to handle loading parse tables.

It's should be easy enough to convert between the JS and Lisp syntax. But how do you compile it to a library that Tree-Sitter expects without having the user install a C compiler toolchain?

IIRC you objected against features relying on something like this in the past.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]