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: Re: Tree-sitter introduction documentation Date: Thu, 29 Dec 2022 10:40:44 -0500 Message-ID: References: <831qozjob7.fsf@gnu.org> <87cz8jxoat.fsf@ledu-giraud.fr> <83wn6ri7pn.fsf@gnu.org> <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; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6005"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Philip Kaludercic , Yuan Fu , Stefan Monnier , Eli Zaretskii , Dmitry Gutov , Tim Cross , emacs-devel@gnu.org To: Gregory Heytings Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 29 16:41:12 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 1pAv1r-0001OX-EM for ged-emacs-devel@m.gmane-mx.org; Thu, 29 Dec 2022 16:41:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pAv1P-00055S-R8; Thu, 29 Dec 2022 10:40:43 -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 1pAv1O-00055E-8j for emacs-devel@gnu.org; Thu, 29 Dec 2022 10:40:42 -0500 Original-Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pAv1M-0005cM-Nn; Thu, 29 Dec 2022 10:40:42 -0500 Original-Received: by mail-pj1-x102a.google.com with SMTP id h7-20020a17090aa88700b00225f3e4c992so10620342pjq.1; Thu, 29 Dec 2022 07:40:39 -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=dcY0qO+V9ALq6zGX+BXtVT6qiP1GxTLTZYOMz9O2q8Q=; b=iMfIELAFfipAcaXBpXgSKLB5dIndd8wbe4FU9hYLywcttovA7czlJlhjoRYxzjNSwo WCGAZ3vhdmYFCZ/IgYStQFgZa+agb94yHWc3esJMV8tTNEiJlsOLiCs4Pf89KexdGJXD yRUSYfTfqTQP1l31Y9F0FRBGQjbcQeLEW+J4q7nDWmnofRjNqhY1I8Wx04EXK66mD724 e4s2UAZ30CxxxgooiK6rzEidYwU/cMGKTJiOD7x9V9Ldu4mGD5B/r+3lhigGxe8eqFpr xGXU6EGmyQMoJ5XPL3M2zwlE/xcGNvx5rro8XYbLluNzx5yHd68UwhPjFOyXGbyOWxQu eP7w== 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=dcY0qO+V9ALq6zGX+BXtVT6qiP1GxTLTZYOMz9O2q8Q=; b=jcFuhvx6NgpySA+0DEemfkshvlcfVLchOvEcJ6AWRpLJHRNBlE0RbSNflUqVw6BFL8 MnJgd65rzDhm+w7wrP4teW3kA688RROcZT8qF47WMxChaC41fqHJ7cvAK/jpfx3Polz2 fdRMsvYA7Xzb7Kn09GLuBqGmrjBWJHxngaoqDzAxvKLRDG1QnZJAUoNY1JTsU6JqYLiL ssQElsGJY8UcZDPRQOxUVnR+xtVffPDE82CIKX2dllQm1EACLuRZstU6B0gTHDxxQIEP 9ClqBqFrMfVxp6oRbcAJHjEVyGpEvbEZnziQUFscIk3e4/CxdupPSZXZ3Iq4hH2aR0yj Fx0Q== X-Gm-Message-State: AFqh2kq+oyKsBTCIdfdh41kBy5rEp8WXzEooZS0SwK1Qm6I6DoAv/TlC oFd+yPt/o6iKH7VxEAp2F/sCO2OwdaH9wqDufgM= X-Google-Smtp-Source: AMrXdXvIgZpoKxhoYgWDeQMPEWgk5Ym+tZ0VoDzmemw5WliJdRe2pjJpOoFaj5rWBoguJ01oGOsGAaLQM4Dvd+Fal2w= X-Received: by 2002:a17:902:c649:b0:189:93a5:bcc6 with SMTP id s9-20020a170902c64900b0018993a5bcc6mr2493180pls.156.1672328438848; Thu, 29 Dec 2022 07:40:38 -0800 (PST) In-Reply-To: <86ce08480352653995b8@heytings.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=owinebar@gmail.com; helo=mail-pj1-x102a.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:302035 Archived-At: 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? 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? Lynn