From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#61849: 29.0.60; Unable to use treesit-install-language-grammar because repo doesn't have parser.c Date: Tue, 21 Mar 2023 05:27:50 +0200 Message-ID: <83o7om7phl.fsf@gnu.org> References: <83jzzxatc2.fsf@gnu.org> <831qm4bws5.fsf@gnu.org> <83wn3d9onk.fsf@gnu.org> <83sfdz6x4b.fsf@gnu.org> <5b115222-e46c-fce6-3a32-94e31980c26f@yandex.ru> <83r0tj6uoz.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26359"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mishazharov1@gmail.com, casouri@gmail.com, 61849@debbugs.gnu.org, dgutov@yandex.ru To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 21 04:28:34 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1peSfp-0006dm-3h for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Mar 2023 04:28:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peSfR-0004wS-JM; Mon, 20 Mar 2023 23:28:09 -0400 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 1peSfK-0004w4-SO for bug-gnu-emacs@gnu.org; Mon, 20 Mar 2023 23:28:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peSfK-0003qx-KC for bug-gnu-emacs@gnu.org; Mon, 20 Mar 2023 23:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peSfK-0001As-2M for bug-gnu-emacs@gnu.org; Mon, 20 Mar 2023 23:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Mar 2023 03:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61849 X-GNU-PR-Package: emacs Original-Received: via spool by 61849-submit@debbugs.gnu.org id=B61849.16793692724497 (code B ref 61849); Tue, 21 Mar 2023 03:28:02 +0000 Original-Received: (at 61849) by debbugs.gnu.org; 21 Mar 2023 03:27:52 +0000 Original-Received: from localhost ([127.0.0.1]:57285 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peSf9-0001AR-VE for submit@debbugs.gnu.org; Mon, 20 Mar 2023 23:27:52 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58084) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peSf6-0001AD-7G for 61849@debbugs.gnu.org; Mon, 20 Mar 2023 23:27:50 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peSf0-0003mu-49; Mon, 20 Mar 2023 23:27:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=bd7JXBLyFvPosKEjKh5B7JFGFDDFXlifIys7J1uAg9M=; b=Bzedc9hlWRCk 6H/NXUOPxKR/XhVCLNpo+bIgD3/s/Hq17qWqXAm+oV0dOOhTh3Whky+yhkL8PGP5KS2InMtVzYLfJ U3ftDHo2TqgwltqfivnOoiUSXEWJ/6zNfwK3SNu6EAAnkQ/scn4LWLQgqrnzLaEyesUzLFwtyDTXT 8z9h5i4RqG8M5rdNc6hkaJhvLSPcjaEc8iw47mo4oYtJf02QS1AMd46wyREJwaDLabHXA6QBgMS3u hyGAPy/BxyEGo4IuCpdn0JrcSQhSR5eMuXJXVLht7h7WgE0uPx4cf4gfYg69tpxvcWzvU62kUaLCJ LMWS5FmYyzk8+WlNyiVxNw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peSez-0008D7-2n; Mon, 20 Mar 2023 23:27:41 -0400 In-Reply-To: (message from Gregory Heytings on Mon, 20 Mar 2023 22:01:15 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:258328 Archived-At: > Date: Mon, 20 Mar 2023 22:01:15 +0000 > From: Gregory Heytings > cc: Dmitry Gutov , mishazharov1@gmail.com, casouri@gmail.com, > 61849@debbugs.gnu.org > > > >> Suppose the repositories remove the generated grammar files. What would > >> be sufficient for us to regenerate them? > > > > I hope someone will write a generation tool in Emacs Lisp. > > > > That can't possibly happen, IMO. Generating the grammar.json files from > the grammar.js files with an Emacs Lisp program would amount to implement > a JavaScript interpreter in Emacs Lisp. So you are saying that generating a parser would need a JavaScript interpreter as part of the generation? Does tree-sitter-cli tool invoke it, then (I didn't study its sources)? > And generating the parser.c files from the grammar.json files would > amount to reimplement the generator, which is about 13500 lines of > non-trivial Rust code, in Emacs Lisp. That's what I hoped someone will do, yes. It's a non-trivial job, but surely isn't impossible. Reimplementing that in some other widely available language, like Python or Perl, would also do. Or maybe the Rust front-end to GCC will become available soon enough. Or something.