From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [SPAM UNSURE] Maybe we're taking a wrong approach towards tree-sitter Date: Wed, 28 Jul 2021 16:32:45 +0300 Message-ID: <83h7getvgi.fsf@gnu.org> References: <8735rzyzbz.fsf@163.com> <86v94v3xh9.fsf@stephe-leake.org> <87o8amy88o.fsf@163.com> <20210728123612.pr2ddrf6vmynknxn@Ergus> <877dhawpr7.fsf@163.com> <83mtq6tw7v.fsf@gnu.org> <87eebish4g.fsf@163.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10157"; mail-complaints-to="usenet@ciao.gmane.io" Cc: spacibba@aol.com, stephen_leake@stephe-leake.org, emacs-devel@gnu.org To: Andrei Kuznetsov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jul 28 15:33:36 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m8jgm-0002Rh-0q for ged-emacs-devel@m.gmane-mx.org; Wed, 28 Jul 2021 15:33:36 +0200 Original-Received: from localhost ([::1]:60696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m8jgk-0006s6-Pv for ged-emacs-devel@m.gmane-mx.org; Wed, 28 Jul 2021 09:33:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m8jg1-00068g-Pk for emacs-devel@gnu.org; Wed, 28 Jul 2021 09:32:49 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54564) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m8jg0-0003nd-QN; Wed, 28 Jul 2021 09:32:48 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4999 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m8jg0-0006Hl-EU; Wed, 28 Jul 2021 09:32:48 -0400 In-Reply-To: <87eebish4g.fsf@163.com> (message from Andrei Kuznetsov on Wed, 28 Jul 2021 21:27:43 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:271741 Archived-At: > From: Andrei Kuznetsov > Cc: spacibba@aol.com, stephen_leake@stephe-leake.org, emacs-devel@gnu.org > Date: Wed, 28 Jul 2021 21:27:43 +0800 > > Eli Zaretskii writes: > > >> While tree-sitter may be nice and all, it doesn't seem to offer the > >> usual extensibility expected from Emacs. > > > Which extensibility did you have in mind that TS doesn't support? > > Let us assume that a generated TS grammar contains a (C) function akin > to `semantic-lex-unterminated-syntax-detected', and I wish to achieve > similar results to binding > `semantic-lex-unterminated-syntax-end-function' to a function of my > choice. Would that be possible? (TS doesn't generate a grammar, it comes with grammar files prepared externally.) If you are talking about affecting how TS does lexical analysis for some language, then I see no reason why we in the Emacs project would want to do that. We don't _want_ to develop parsers if we can use parsers available out there. Lexical analysis of a parser is determined by the language it parses, so you need only to change the parser when the language changes, or to fix a bug. Both are part of the job of the TS developers, so there should be no need for us to get busy with that. Exactly like we do with other libraries we use that aren't developed as part of the Emacs project.