From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: Tree-sitter integration in python.el Date: Mon, 3 Oct 2022 15:25:29 -0700 Message-ID: <72A63531-21A6-43BE-A302-D554A745F360@gmail.com> References: <3A68545C-2E40-4BB4-8563-8041A5452634@gmail.com> <87y1twlr0v.fsf@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17649"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Matthias Meulien Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 04 00:43:15 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 1ofU9b-0004R1-1P for ged-emacs-devel@m.gmane-mx.org; Tue, 04 Oct 2022 00:43:15 +0200 Original-Received: from localhost ([::1]:40572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ofU9a-00060k-3o for ged-emacs-devel@m.gmane-mx.org; Mon, 03 Oct 2022 18:43:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36984) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofTsU-0005CD-CR for emacs-devel@gnu.org; Mon, 03 Oct 2022 18:25:34 -0400 Original-Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]:33622) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ofTsS-0001QU-GI for emacs-devel@gnu.org; Mon, 03 Oct 2022 18:25:34 -0400 Original-Received: by mail-pf1-x433.google.com with SMTP id w2so11426092pfb.0 for ; Mon, 03 Oct 2022 15:25:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date; bh=fqU6Z0T78yy02fZ0tBigmZ7a0KsyWKjEsfHffK6nWEQ=; b=mLMqaAAf3w2TT75j1a1VAWzDuw3APNaDtWqdM6/p34j+QRlrY7ZE8soXeQ/4H8ibSv TdRNVaJCtzvmZfeUjj2/rUBsY6GQvPAGiDfEZPJ3sHWLLJcdbg9HjSq6EqIZSMD23h55 9bnx5TBgZM6HuZaukAseeiftAUVPtqxb+YYjJBADfIWV68msNwsw+GjTqFCt59lI6SqX aY3eyJHzyD0/Uc3jiC7VVvUcuRQ7tkQRO7oFgnpskTpjr2hXsDvB4V3Nho6z7n+pqWM0 68z3s28HML06Gerby0RxwRSTy65iLjHzhyoUZjNce+m1nZqc9XzqmgTT3MxzYokbj7xE 8H3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date; bh=fqU6Z0T78yy02fZ0tBigmZ7a0KsyWKjEsfHffK6nWEQ=; b=j/lxCKo6c8XxOrBV0jmvpFzTbbuBu/FYJfL3Vf3M/rDv3qW2dibJEhjf4/xjR0qAGX 4Kb/I2SxzwqqM3vmx0Q/IHsIzBiK7zF5ff2WyS50UDifAKQ1GUXwi8H9Bs6oXKDGakDK Rnbx0Fefo8H3l1vvt1zgEi0c/RtGb4CPmmfCPnhAGxx6JIpOnJhGpsD8wFQpA1Eecdtz tyZEomwMIo6ubFaadVM+4KvHwA/qNKrXrEgEw50mw5iT3fjBgzNjCeAuOn57RpGk2FOO qWsVDIzTT2OEkj4AQ8wJyZCFCF8XyWoO/RGqyYK/ohRuPe2DNpy+076eyYcyYFQbUenJ 3WHg== X-Gm-Message-State: ACrzQf2ClH5MMRpjRznDehescSot1yKjJKMLj+dsfWitcJHlL29X35Lw NBkm9a6tPL5rvRhUNJau0Ac= X-Google-Smtp-Source: AMsMyM6IpnVT+1lU7AgJcKLv6ieDS1cI1eFvDSce1T1/45xIU7iV+yk1Sjpjc3ztznbF5lKjZMK7fQ== X-Received: by 2002:a63:4626:0:b0:43b:383d:d1e with SMTP id t38-20020a634626000000b0043b383d0d1emr20984813pga.619.1664835931068; Mon, 03 Oct 2022 15:25:31 -0700 (PDT) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id m188-20020a6258c5000000b0054087e1aeb4sm7870447pfb.111.2022.10.03.15.25.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Oct 2022 15:25:30 -0700 (PDT) In-Reply-To: <87y1twlr0v.fsf@gmail.com> X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=casouri@gmail.com; helo=mail-pf1-x433.google.com 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, FREEMAIL_FROM=0.001, 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" Xref: news.gmane.io gmane.emacs.devel:296808 Archived-At: > On Oct 3, 2022, at 11:07 AM, Matthias Meulien = wrote: >=20 >=20 > I also cloned tree-sitter-python but I've no idea of what should be = done > with the grammar file. I've understood that I am suppposed to convert > the grammar to a shared object but I don't know how... >=20 > (I've tree-sitter-cli installed and in path, but "tree-sitter generate > tree-sitter-python/grammar.js" seems to generate rust and node = bindings; > Am I supposed to compile the src/parser.c file? I don't see any > Makefile...). > --=20 > Matthias Eli has pointed out how to compile the language definition. = Alternatively, you can use my script here to download and compile them: https://github.com/casouri/tree-sitter-module Yuan=