From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lynn Winebarger Newsgroups: gmane.emacs.devel Subject: Targeting libtreesitter from wisent and other parser generators for emacs Date: Fri, 30 Dec 2022 11:25:15 -0500 Message-ID: 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> <86sfgxq3ph.fsf@stephe-leake.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7631"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Gregory Heytings , Philip Kaludercic , Yuan Fu , Stefan Monnier , Eli Zaretskii , Dmitry Gutov , Tim Cross , emacs-devel To: Stephen Leake Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 30 17:25:38 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 1pBICQ-0001nW-P6 for ged-emacs-devel@m.gmane-mx.org; Fri, 30 Dec 2022 17:25:38 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBIC5-0008Q7-FY; Fri, 30 Dec 2022 11:25: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 1pBIC4-0008PL-Ey for emacs-devel@gnu.org; Fri, 30 Dec 2022 11:25:16 -0500 Original-Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pBIC2-0002RW-J4; Fri, 30 Dec 2022 11:25:16 -0500 Original-Received: by mail-pj1-x1030.google.com with SMTP id j8-20020a17090a3e0800b00225fdd5007fso12471150pjc.2; Fri, 30 Dec 2022 08:25:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=2nr2UD4g/WCmQ0o8J/+7EgmF/2IqUVub1vboShjMgBw=; b=UxG2IM1qNkDefBYhUttamphKwW3FMwxGPkm8c1nAB5GSAkvElwsDBcCxjUJYb/VMr9 ioA2M47mQqegiU126omgLzViUGAOzEY30f5A83x6mcMdKZoHCmALOQ1RmGvzhkjIhNTT DvfkjregA8bzTZHAyYsuCG9EByw7c9HC2hsac4gITRkLD77t3w6utw6zZsXCiKjhA7m7 Wex8KBiYgAD87gdSvujTBvDJKMY6joxjGKyGhpT0hfuVGLALzERwTE6m0wtoZHLoOgo7 TN+bO4tp8WCFSiEeG3T86FPnt2+p5ugSUon8CRvcmHzfjorvhIf59yUL5PigRrBNyKYk xq7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2nr2UD4g/WCmQ0o8J/+7EgmF/2IqUVub1vboShjMgBw=; b=KeHhgkQkmdYcA820jMiYvqOmgA0NR7xvNFJD68IMJJ08rXQ1NnbuK7+KAKsRT5knsp 6h8IsnR/mYSz6t2K5KZLNTCxDqcjwWw4bhlSh0upQ7+yEZ34PdaXjTPVtzTa0+KlQX1B yaNOdCBcOX7Ry6SqIMOD6r+gh1CcYuymQPRU7MRUg47ENxR0jjkW6859qsUzqA0zW617 1DcnfleRGfevjpUi+7v574baDHaqF0VrrHrhIYtkTLdFEl0/cXKuCAzgEV3Hb4n2PMLr Bdcln94i4U4xg+IffckJEJuK2+1IiA054WoKOFCh050d4c42uoA8t6yMLYqlIT5uC1LA 8AJg== X-Gm-Message-State: AFqh2kpk6dM8UquEXHWqfbQFAH8Mechulby7m+vJWlhYvU/8MTVp81jl IMBku6medMcXsB7zZGjJYYOPAPuXUBhoOzGh+mA= X-Google-Smtp-Source: AMrXdXugwgP9jmpsJlWd/50DC0UXctTs/nNB6i50eBjD3oR0nDZid4llc/2CPH2YPuwh1B6/TxYpbdaxI0uIn9Q4EJQ= X-Received: by 2002:a17:902:728d:b0:190:c917:ab61 with SMTP id d13-20020a170902728d00b00190c917ab61mr1992055pll.93.1672417511075; Fri, 30 Dec 2022 08:25:11 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=owinebar@gmail.com; helo=mail-pj1-x1030.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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:302127 Archived-At: On Fri, Dec 30, 2022 at 9:10 AM Lynn Winebarger wrote: > > On Thu, Dec 29, 2022 at 4:50 PM Stephen Leake > wrote: > > > 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. > > Done - https://github.com/tree-sitter/tree-sitter/issues/2006 If I tried to do something quick and dirty with wisent to see if I could get something working, can anyone provide some test cases so I could tell whether the code produced behaves correctly with libtreesitter? I've never actually used tree-sitter, in emacs or otherwise, so I just don't know what I would be testing for. It's probably best to start with something simple that is easy to write equivalent grammar specifications for both tree-sitter-cli and wisent/bison. JSON is one with an existing tree-sitter grammar. A spec for EBNF type grammar spec would be straightforward to write and useful as well. Would anyone be willing to supply me with an emacs mode for one of these (or similar) that I could use to compare the behavior of tree-sitter-cli generated library to the behavior of a wisent/bison generated library? Lynn