From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Perry Smith Newsgroups: gmane.emacs.devel Subject: Re: Tree-sitter introduction documentation Date: Fri, 16 Dec 2022 09:53:03 -0600 Message-ID: <950E30EC-C460-4B90-82DA-46BB2BF410F7@easesoftware.com> References: <83edszjslp.fsf@gnu.org> <83bko3jr3o.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.200.110.1.12\)) Content-Type: multipart/signed; boundary="Apple-Mail=_D1EE571F-817C-4175-8726-DCEBDE992176"; protocol="application/pgp-signature"; micalg=pgp-sha256 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18278"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 16 16:54:01 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 1p6D26-0004R1-HV for ged-emacs-devel@m.gmane-mx.org; Fri, 16 Dec 2022 16:53:58 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6D1c-0000dY-2a; Fri, 16 Dec 2022 10:53:28 -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 1p6D1b-0000d1-3R for emacs-devel@gnu.org; Fri, 16 Dec 2022 10:53:27 -0500 Original-Received: from caracal.ash.relay.mailchannels.net ([23.83.222.30]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6D1Y-0008HS-Ei; Fri, 16 Dec 2022 10:53:26 -0500 X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 73073541460; Fri, 16 Dec 2022 15:53:18 +0000 (UTC) Original-Received: from mi3-ss4.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id A9871541453; Fri, 16 Dec 2022 15:53:17 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1671205998; a=rsa-sha256; cv=none; b=fFBTodXZwCO5oIXaAFgb6VEeYxBqNENMLvEGFAa7QIA9w6qoVI8N9/r1vbxgIcnfp5HiSE SRlN3p4dAjf8twu40onFw0vWKAbrbtjnWhM1GUK94RpGLIsh3va+oQ1Lr7rYuh+ISNfjbL rvWxev60rgZK2ZIphLLhG+vwQ9GlIjwDQPCpJKO7ZTjyD23Eodu6dyWcnmhVQhDa7iWK05 iXXXqXL13LCWvf9C8o3IqdpMy+QRo97qBy6NQ5RZQznL9BAMSjVSYQxbfe6CWWQ22N9mQD NHcal5sDJzQegsIebVJgPGjwgbfON5aXrO6h6NwkpA+jTnEMNu2c+/N7m27bqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1671205997; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=nYnJtt+mOM6FRJDAWALEvvE+0fe/Jt23IaB2xWS7/cw=; b=1BjE6W55KHMDTfASTAzhSTZ63lbNGKqKcMniArR2THmfwL7fY4ilMDmKEUi9TCauKX/T8+ jKF+52MK3YhjZ2Q6B+g4bliykntlH5+gTfBVsEHLc7GhOxAMoH/xq6vdtXBNBrV85wXHOS NtLzU/CYbx5Re7WFl7WQpnltW86fdFN6jVdUFOgjKDsM3KAQkEPHhUsvbuapw6an5P3uUx GLrs1f8aeP1mqqnGU6qvjB0/RyH1wDZZnDK35g+moeAVtKExDq1w2S0u30TGvXsdOKXzyF rGrynLb1BDEdNMGT5nEUARUlUuNbXKpA0oi/AoJeVYHZHUwNgKhX/vS3S/cq1Q== ARC-Authentication-Results: i=1; rspamd-56db58bdfc-td5mb; auth=pass smtp.auth=a2hosting smtp.mailfrom=pedz@easesoftware.com X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MailChannels-Auth-Id: a2hosting X-Soft-Illegal: 5c8ad9596cee9dcf_1671205998202_429567869 X-MC-Loop-Signature: 1671205998201:2700382461 X-MC-Ingress-Time: 1671205998201 Original-Received: from mi3-ss4.a2hosting.com (mi3-ss4.a2hosting.com [68.66.200.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.109.138.37 (trex/6.7.1); Fri, 16 Dec 2022 15:53:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=easesoftware.com; s=default; h=To:References:Message-Id:Cc:Date:In-Reply-To :From:Subject:Mime-Version:Content-Type: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=nYnJtt+mOM6FRJDAWALEvvE+0fe/Jt23IaB2xWS7/cw=; b=VKIQR8jc4ajfj41KZMok2mHN2p PJPoN8MZ1z5TNq1DK5Ap9I2xo2tVwX2MJGF4F36TsTNXzUaJpkYX05bFpIGMeING0z4H/fTp2YdM1 DMEPvCnrihmgrphLDwchhsFDqMmPOlkCl6aQYLgSszt1GGR6CeJlPp+m3V2RBf4Ap8jWaQ8hvm/f9 /pX5SMrYECwyuJTP0CAk7aLh6wbNki9vqYv+iyv376G6mrDgn658h0L1EpPiJNeG+zNx7+BOjMh75 U/wLjoSfST8ucxFL+mJUgUyQSX75VS9fUgTng1XN0FIGB4R9q0dLG0Qtlo1zSqBNtJvZVJyaV/4ok hLT8weGw==; Original-Received: from cpe-70-94-128-193.satx.res.rr.com ([70.94.128.193]:58346 helo=smtpclient.apple) by mi3-ss4.a2hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1p6D1Q-0051V7-HM; Fri, 16 Dec 2022 10:53:16 -0500 In-Reply-To: X-Mailer: Apple Mail (2.3731.200.110.1.12) X-AuthUser: pedz+easesoftware.com@mi3-ss4.a2hosting.com Received-SPF: pass client-ip=23.83.222.30; envelope-from=pedz@easesoftware.com; helo=caracal.ash.relay.mailchannels.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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:301497 Archived-At: --Apple-Mail=_D1EE571F-817C-4175-8726-DCEBDE992176 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Dec 16, 2022, at 09:48, Jo=C3=A3o T=C3=A1vora = wrote: >=20 > On Fri, Dec 16, 2022 at 3:38 PM Eli Zaretskii wrote: > > From: Jo=C3=A3o T=C3=A1vora > > Date: Fri, 16 Dec 2022 15:24:59 +0000 > > Cc: Perry Smith , emacs-devel@gnu.org > > > > I agree this is a problem, especially the language specific parser > > bits. Yesterday I tried out tree sitter Emacs on my Arch system. > > Finding the tree-sitter system lib was easy enough, but finding the = C++ > > definition object wasn't so easy. Eventually I made it, but it = needed > > compilation from source and a NodeJS toolchain that I didn't know > > I needed for that. >=20 > No, you don't need a NodeJS toolchain to compile a grammar. You only > need to compile the C/C++ source files that are part of the grammar, > and then link them into a shared library. I use a simple Makefile to > build all of them, as the structure of the files and the way to > compile and link them are identical and boilerplate. And I definitely > don't have NodeJS installed here. >=20 > I used: >=20 > https://aur.archlinux.org/packages/tree-sitter-cpp-git >=20 > which builds with the makepkg tool, and am pretty sure > it used NodeJS somewhere down the line. The language > definition it seems to use is = https://github.com/tree-sitter/tree-sitter-cpp > which also contains a log of JS stuff. >=20 > Is that where you get your C++ grammar from? Or am I > looking at an alternate outlet for slightly different grammar? > If so where do you get your grammars from and can we > bundle some version of them with Emacs? This file is in the Emacs source and outlines a lot of good stuff = https://git.savannah.gnu.org/cgit/emacs.git/tree/admin/notes/tree-sitter/s= tarter-guide --Apple-Mail=_D1EE571F-817C-4175-8726-DCEBDE992176 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE5yOa/gCtQpb3oCpljxzk9yzE+MAFAmOclF8ACgkQjxzk9yzE +MAFmxAAwEVCWGO/prCUZWrJax/NG7QS6vuy19sU5S/hasLxGnutNTqbJCa1dfkd r9rsoA8PFxiTYgpVcST3DvV0CYids1hnB+GokE+cCG841zIq7oiRd4K+Z+uCwrzG Tv9W0KpGF8AQ28mO7KreJhdi5ulXeIwBthHahY+gj3WlohOCDVqH7VgleGPiPAWJ kBK6fz4BpLe2qDL6Uwv4d7qRU5QT4wv+RR8M+PuakM72H/k2zPjaQvOG7gRi/FQB Jx8mmqcBKPvz6ASUVF+6wO0nKDRtyZJjRTLnaCDapQi3RRHqiKoPaTKFZMDBiz8L c/CoFZuP5LhR+mlaFhjodSLPeQQhclHTLqyALQlWOJEXjvJenw6B/oWHjaIFa4nT rudbGEXJJnt3n6VTOcqyNOaavR9bmP9YWiIHBuo54bm0tZSXz+jTTc/M8MxY4UVz UCPplOTwniwmKd264jeXjATFxU/+adrGRjyVOZVmx6FMXskFKYW3q920g1VC1s5/ fo0e3MXWUVVoSAPRD9/WdCb/gtvGJ/milPDbm5P54sX8mJmYGr3SjqOhGfdDJZQ3 /g6k1BEf6X0mvTvgi29Mf6F+NJkSGv3KtbUT4CtEOz3las0qVNGlgtt7Ec4tYbl7 0wUqyC6mp8w328KkEwGcE7mJVE4vt8sUy8Qg7yyvkdvMA3u16uI= =FLYK -----END PGP SIGNATURE----- --Apple-Mail=_D1EE571F-817C-4175-8726-DCEBDE992176--