From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Using incremental parsing in Emacs Date: Sat, 11 Jan 2020 04:41:53 +0300 Message-ID: References: <83blrkj1o1.fsf@gnu.org> <838smfahbx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="72365"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Cc: arthur.miller@live.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 11 02:45:13 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iq5nV-000wzk-A0 for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Jan 2020 02:42:41 +0100 Original-Received: from localhost ([::1]:53462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iq5nT-0000AG-CT for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Jan 2020 20:42:40 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39298) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iq5mn-0007h6-Rq for emacs-devel@gnu.org; Fri, 10 Jan 2020 20:41:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iq5mm-0004HD-LL for emacs-devel@gnu.org; Fri, 10 Jan 2020 20:41:57 -0500 Original-Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]:35500) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iq5mm-0004AT-Cq; Fri, 10 Jan 2020 20:41:56 -0500 Original-Received: by mail-lf1-x133.google.com with SMTP id 15so2889548lfr.2; Fri, 10 Jan 2020 17:41:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=MAqzKBc0x+fPK+DY+kahT485jxmZQ1KcRmKnj5vaBJc=; b=YOtjGxr0cNzLIbGDKsOrPeZj9px99TwI9iyde91wzCSBAzTTWBXCIU0UsPLavupusm I6zYsbfBQSjBiknrhU1gjvbjCcxfjjoXu46V3NNaOb9M8J5wAuhZKMu2vZNyPQR9QKd/ zZc4uGGhypHpn1a+MP4PSANcp+dI5iVqbHSIlKgd0UPfb2e8NmYHms6e01zYvCvxiBGk 1ytTbpgt6vtxv9uwx4ZL+QSkHjISD0cLe01jH9PAllgFXuwniRflpaYsaEU8koh9hc0R UdTGPwEryDXkdIXSfweXD2PCe98gOg3AN87ISXgYGVOzm/R27sL81ltKoM45HoGtUD8P 2e4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=MAqzKBc0x+fPK+DY+kahT485jxmZQ1KcRmKnj5vaBJc=; b=bsrLQlnk7zKY+6uVy4MK569ILnNKKaPycDjGGwmkQc/P72dwEFe5Fe5V7gmR+X9frT zY0zknlCKXykd9lqOzIF8FuaFBQEoFLhKzoVqvktSFpZnMwM0BE9wpbpagi3W+24NE1i WwTyLpW7ihs5Ew6Xjt6on0ROvrS8Aa+yJ0H2xlcMrDtKhGHshrhX9q68V15MPP/+MTWI ms/UfuukrJqZLe3n6m3ERjeouk2UK/SoRf8Yt162NvgI+Byz0Gj1VSsQSkWkpbkhv0uk FAYYfC6iVC34cZTILQPqED01QdT+DuzN+lnjs0xbro3sYF3VxMkmrOAPxrRujJQ25aHo y6Ow== X-Gm-Message-State: APjAAAWfZIakHdlEYVBwk30GKxYwY8gnkP1fIwdP6xOK8w8ogUg2L/E+ vevsOJaC+s1ZBGL6dEWNtIFF/70xGxk= X-Google-Smtp-Source: APXvYqwgQM1Qq4D5Rs6RjCTjuEYT+vQey5Q+z4h+mE8OIJG4subdsCW8jHSfdT4RZdudwL2nSdfT/Q== X-Received: by 2002:a19:f811:: with SMTP id a17mr4071338lff.182.1578706914778; Fri, 10 Jan 2020 17:41:54 -0800 (PST) Original-Received: from [192.168.1.142] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id k12sm1848363lfc.33.2020.01.10.17.41.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Jan 2020 17:41:53 -0800 (PST) In-Reply-To: <838smfahbx.fsf@gnu.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::133 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.org gmane.emacs.devel:244179 Archived-At: On 10.01.2020 9:41, Eli Zaretskii wrote: >> Cc: "emacs-devel@gnu.org" >> From: Dmitry Gutov >> 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.