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] Re: Tree-sitter introduction documentation Date: Thu, 29 Dec 2022 13:50:50 -0800 Message-ID: <86sfgxq3ph.fsf@stephe-leake.org> References: <5e0a3185-de82-b339-0fa2-956779e63d6f@cornell.edu> <868rj6vfep.fsf@gmail.com> <4895891b-e5ea-9c37-f51b-df2e479ee758@yandex.ru> <83y1qt11xq.fsf@gnu.org> <9eb013da-d0fc-8e17-c6e3-1e8f913aebfa@yandex.ru> <83pmc50xxc.fsf@gnu.org> <71cfe4e8-3bb8-b0a6-9be5-8c0a6d92cfab@yandex.ru> <83h6xg29z3.fsf@gnu.org> <838ris22n4.fsf@gnu.org> <8335901zz3.fsf@gnu.org> <87cz84y5le.fsf@posteo.net> <3F91FDEA-881A-49DB-BB52-5A0D81C004CE@gmail.com> <87k02aihrz.fsf@posteo.net> <86ce08480352653995b8@heytings.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="7470"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Gregory Heytings , Philip Kaludercic , Yuan Fu , Stefan Monnier , Eli Zaretskii , Dmitry Gutov , Tim Cross , emacs-devel@gnu.org To: Lynn Winebarger Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 29 22:52:03 2022 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 1pB0ok-0001ar-Kf for ged-emacs-devel@m.gmane-mx.org; Thu, 29 Dec 2022 22:52:03 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pB0o1-0004ET-RR; Thu, 29 Dec 2022 16:51:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pB0ny-0004E5-KL for emacs-devel@gnu.org; Thu, 29 Dec 2022 16:51:15 -0500 Original-Received: from outbound-ss-820.bluehost.com ([69.89.24.241]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pB0nw-0006BJ-5D for emacs-devel@gnu.org; Thu, 29 Dec 2022 16:51:13 -0500 Original-Received: from cmgw10.mail.unifiedlayer.com (unknown [10.0.90.125]) by progateway2.mail.pro1.eigbox.com (Postfix) with ESMTP id 6F8F310046FF9 for ; Thu, 29 Dec 2022 21:50:54 +0000 (UTC) Original-Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with ESMTP id B0nepjOwvCmv8B0nepGPGe; Thu, 29 Dec 2022 21:50:54 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=OtqKdwzt c=1 sm=1 tr=0 ts=63ae0bbe a=dWLzHQi6WpdymmZIwiVdBw==:117 a=Fln8i1WyhtedwaIJAdHvmw==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=sHyYjHe8cH0A:10:nop_rcvd_month_year a=vvvmwbhNdt4A:10:endurance_base64_authed_username_1 a=pGLkceISAAAA:8 a=hzMw4i43AAAA:8 a=MuC039hNosQGvroD1PAA:9 a=uAo-0t9iCIr-kg6xExmP:22 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:Date: References:In-Reply-To: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=AgJiRcFJG2UjLAFY02TlpNsuAjZ49dr1kM5eP5Sxxc0=; b=IVbQuT93yP+jTD2/VurHg56N0x AAqHoTXTlZCNXXE4MUarBKF947hCy8zDdlR9JV0xGLOrFwgB9HjmoCYk4xQFWf3nx07NZOSDeM9Sk m8DbRM80JKsWr2qkJCH5R7X4rF86hqMTmQA1S+U2oGiGVvukX6Qg2QLlhUjDsc+l12t8JljV72EDS vTOXsMKM2IEobqEQOzOTerfw9L/n0NFdKq5YBLKi5wQQ8HhKnKjp+EaGtE7sNuI70qUywRzy2tg/d zB0GmlTa7f+uJpYslIdz1lEF74h9FJQDdpcoR8P+P9LugNjLrJueqR2bcbyiBVsovuYwZwK6V5e5r k7Wzxjlg==; Original-Received: from 135-180-197-170.fiber.dynamic.sonic.net ([135.180.197.170]:53722 helo=DESKTOP-G20DCG1) by host2007.hostmonster.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pB0nc-000xiL-PE; Thu, 29 Dec 2022 14:50:52 -0700 In-Reply-To: (Lynn Winebarger's message of "Thu, 29 Dec 2022 10:40:44 -0500") 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: 135.180.197.170 X-Source-L: No X-Exim-ID: 1pB0nc-000xiL-PE X-Source-Sender: 135-180-197-170.fiber.dynamic.sonic.net (DESKTOP-G20DCG1) [135.180.197.170]:53722 X-Source-Auth: stephen_leake@stephe-leake.org X-Email-Count: 9 X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t X-Local-Domain: yes Received-SPF: pass client-ip=69.89.24.241; envelope-from=stephen_leake@stephe-leake.org; helo=outbound-ss-820.bluehost.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:302070 Archived-At: Lynn Winebarger writes: > On Thu, Dec 29, 2022 at 10:28 AM Gregory Heytings wrote: >> > Do you know how strong the dependency on node is? As I said before, it >> > seems that it is possible to evaluate the grammar files that use the DSL >> > using something like quickjs as well >> > >> >> That's not possible, no, at least not without a lot of complications that >> do not seem worth the price, compared to installing Node.js. And note >> that even if that were feasible, it would only solve the first half of the >> problem: to transform a grammar.js file into its corresponding parser.c >> file, you also need the tree-sitter command line program. > > Maybe a better question is - is it possible to adapt the semantic > parser generators (or others in emacs) to create the ".c" files for > use with libtreesitter? This is possible in principle; I've thought about doing it with the wisitoken parser generator. However, the format/struture/details of the output is not documented, and may change in future tree-sitter releases. > The functionality of libtreesitter is probably useful independent of > the tool used to create the module it loads, as long as it satisfies > the functional requirements. Would the treesitter authors be amenable > to establishing a documented ABI for that component so other > parser-generators could target it? That's worth filing an issue on the tree-sitter development site. I looked briefly, and did not see a similar issue. -- -- Stephe