From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: [SPAM UNSURE] Maybe we're taking a wrong approach towards tree-sitter Date: Sat, 31 Jul 2021 09:55:46 -0700 Message-ID: <86lf5ml8x9.fsf@stephe-leake.org> References: <8735rzyzbz.fsf@163.com> <86v94v3xh9.fsf@stephe-leake.org> <87wnpargnb.fsf@elite.giraud> <87h7gey7zx.fsf@163.com> <83pmv2twrl.fsf@gnu.org> <86sfzwogsn.fsf@stephe-leake.org> <83wnp8qqur.fsf@gnu.org> <867dh6n0l5.fsf@stephe-leake.org> <83czqypr6x.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9719"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (windows-nt) Cc: r12451428287@163.com, manuel@ledu-giraud.fr, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 31 18:56:42 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 1m9sHy-0002K6-6r for ged-emacs-devel@m.gmane-mx.org; Sat, 31 Jul 2021 18:56:42 +0200 Original-Received: from localhost ([::1]:35342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m9sHw-0001nG-Oc for ged-emacs-devel@m.gmane-mx.org; Sat, 31 Jul 2021 12:56:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9sHA-0000yv-M8 for emacs-devel@gnu.org; Sat, 31 Jul 2021 12:55:52 -0400 Original-Received: from gateway32.websitewelcome.com ([192.185.145.171]:39889) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9sH8-0004Ph-16 for emacs-devel@gnu.org; Sat, 31 Jul 2021 12:55:51 -0400 Original-Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway32.websitewelcome.com (Postfix) with ESMTP id 160F21D43A0 for ; Sat, 31 Jul 2021 11:55:49 -0500 (CDT) Original-Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with SMTP id 9sH6meYo5Bvjy9sH6mpsG3; Sat, 31 Jul 2021 11:55:49 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stephe-leake.org; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=GxjdPJX1BZfk5D7x/0W1jbri2rOoI8P7JLamtP9bMvk=; b=es6Hml/GLzcRSjl+K/PU0U+POe h7QLoJbzXFdFRSCJGwkuOpzrtUe89HBk3jMOhaZuOCWtTOOYb4z9x0j55feF5oPCjKxcNjyefDoBW bUPlbAmqo6wIy8M5+b81MKXomRUGGbpSwQ1cnvvKIEIfxVZOIxNeEmmbPRzXsIXawzGlw/ecbXZ2E n/G+B3mUfK5saLlrFrPRm+PUluW0HE5ShbaTJP5vHdqA0hwX8Ni84bLaF1RdkmnKCx/ztazWxX2Fp szVSFS2WYe4RrOcsO480B/5YKicb1yOlMknKgVP3MpKxFhcvBxYtWfSbHKAh15AftrlUDZU9wmTz2 EFIfYIqA==; Original-Received: from [76.77.182.20] (port=55333 helo=Takver4) by host2007.hostmonster.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1m9sH6-003lsW-CQ; Sat, 31 Jul 2021 10:55:48 -0600 In-Reply-To: <83czqypr6x.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 31 Jul 2021 16:07:34 +0300") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2007.hostmonster.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stephe-leake.org X-BWhitelist: no X-Source-IP: 76.77.182.20 X-Source-L: No X-Exim-ID: 1m9sH6-003lsW-CQ X-Source-Sender: (Takver4) [76.77.182.20]:55333 X-Source-Auth: stephen_leake@stephe-leake.org X-Email-Count: 8 X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t X-Local-Domain: yes Received-SPF: permerror client-ip=192.185.145.171; envelope-from=stephen_leake@stephe-leake.org; helo=gateway32.websitewelcome.com X-Spam_score_int: 10 X-Spam_score: 1.0 X-Spam_bar: + X-Spam_report: (1.0 / 5.0 requ) DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_NEUTRAL=0.779 autolearn=no autolearn_force=no X-Spam_action: no action 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:271901 Archived-At: Eli Zaretskii writes: >> From: Stephen Leake >> Cc: r12451428287@163.com, manuel@ledu-giraud.fr, emacs-devel@gnu.org >> Date: Sat, 31 Jul 2021 05:12:54 -0700 >> >> Eli Zaretskii writes: >> >> >> From: Stephen Leake >> >> Cc: Andrei Kuznetsov , manuel@ledu-giraud.fr, >> >> emacs-devel@gnu.org >> >> Date: Thu, 29 Jul 2021 16:12:56 -0700 >> >> >> >> > TS's code is written in plain C, and doesn't require any regeneration >> >> > or source modifications. Anything else is misunderstanding. >> >> >> >> That's true for the common TS runtime, which implements the parser and >> >> error recovery, but the code for each language, that builds the LR parse >> >> table and some other data structures, is generated in C from a grammar >> >> file written in javascript, and must be linked into Emacs somehow. >> > >> > That "linking" happens when Emacs is linked against the TS library, >> > right? >> >> I don't know what you mean by "the TS library". > > I mean libtree-sitter.a produced by building the library. > >> I'm guessing you mean the tree-sitter runtime, in which case no, that >> does not include any languages. > > "Include" in what sense? There is no code in libtree-sitter.a that provides a language; all languages are built separately, by the language developers. https://github.com/tree-sitter/tree-sitter builds libtree-sitter.a, and the command line tools to build a language. https://github.com/tree-sitter/tree-sitter-python builds the object file providing the python language. There are many other languages, each with its own repository. -- -- Stephe