From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: Tree-sitter api Date: Sat, 18 Sep 2021 05:33:44 -0700 Message-ID: <86czp6ukpj.fsf@stephe-leake.org> References: <83r1f7hydn.fsf@gnu.org> <83r1dselyo.fsf@gnu.org> <6A4CE984-6ACE-4E66-8EF2-F3D351C02248@gmail.com> <83r1dscpt2.fsf@gnu.org> <83o88wcof9.fsf@gnu.org> <83lf3zdh4z.fsf@gnu.org> <8965C4A0-79D3-4D77-A6BA-D07A6C93F7FE@gmail.com> <83ilz3cs4k.fsf@gnu.org> <04D19C1A-CD64-4156-B932-1C9FEEE4EC7B@gmail.com> <83zgsebc0r.fsf@gnu.org> <1F752923-F357-4A18-B6E2-0120F1B9BD37@gmail.com> <83fsu5bzem.fsf@gnu.org> <83zgsdad5j.fsf@gnu.org> <83sfy391ni.fsf@gnu.org> <03386E3C-A975-4ECD-BF89-6AC62F751725@gmail.com> <83ilyz8xdl.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14956"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (windows-nt) Cc: Yuan Fu , theo@thornhill.no, ubolonton@gmail.com, emacs-devel@gnu.org, cpitclaudel@gmail.com, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 18 14:35:17 2021 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 1mRZYr-0003ep-Ch for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Sep 2021 14:35:17 +0200 Original-Received: from localhost ([::1]:48340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRZYp-0005aj-JV for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Sep 2021 08:35:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35858) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRZXg-0004qS-6d for emacs-devel@gnu.org; Sat, 18 Sep 2021 08:34:04 -0400 Original-Received: from gproxy1-pub.mail.unifiedlayer.com ([69.89.25.95]:58362) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRZXd-0006hi-U0 for emacs-devel@gnu.org; Sat, 18 Sep 2021 08:34:03 -0400 Original-Received: from cmgw10.mail.unifiedlayer.com (unknown [10.0.90.125]) by gproxy1.mail.unifiedlayer.com (Postfix) with ESMTP id 8E41B802BF3B for ; Sat, 18 Sep 2021 12:33:51 +0000 (UTC) Original-Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with ESMTP id RZXTmrhAUKpssRZXTm4C04; Sat, 18 Sep 2021 12:33:51 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=GIfNrsBK c=1 sm=1 tr=0 ts=6145dcaf a=dWLzHQi6WpdymmZIwiVdBw==:117 a=dWLzHQi6WpdymmZIwiVdBw==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10:nop_charset_1 a=7QKq2e-ADPsA:10:nop_rcvd_month_year a=vvvmwbhNdt4A:10:endurance_base64_authed_username_1 a=mDV3o1hIAAAA:8 a=pGLkceISAAAA:8 a=xZJL7FGIzgaP-2CM4poA:9 a=QEXdDO2ut3YA:10:nop_charset_2 a=YmVLrQmyUoEA:10:uccc_2email_address a=_efulHcpp3sA:10:hookup_email_user_1 a=xIHpHBSqFYYjWdlKNEB-:22 a=_FVE-zBwftR9WsbkzFJk:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stephe-leake.org; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From:Sender :Reply-To: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=TUwgaEJpE39SUYzFCVEsNX9CLxPAZVp3v9ys1wVraYc=; b=J2vWfCYaBLzp+x4cyf8LzAHKmQ Ue6RJWbn/VFBNRmu7aXeq+Zko6rVvxcD0HMUm0wo9lYa0+h6FjOzfnkSuapXocQxENGgXVHXiErTt nJotH6mATnQyGGWL+PKBfLLLQcjK//PbzPC260rabavE4qWhAW5UJSyF6678j7fMYe93mc2AT5Oos EeqPZnrvauav1O1NKq8rhs7lVQDyGpyWQWL9+MxPRsjojCXpN1N8vaGclU1GDek/Wftqih4A95GsK 8vtKqNW8BSpU8dtQOOyd/bYgEmv37H8QFmLLriFeBTnrDvLuW+x3vHYyRpnK4JMS22OOh7Qsh8U7S 6mkSfIAQ==; Original-Received: from [76.77.182.20] (port=49475 helo=Takver4) by host2007.hostmonster.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mRZXS-0035TC-Ra; Sat, 18 Sep 2021 06:33:50 -0600 In-Reply-To: <83ilyz8xdl.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 17 Sep 2021 10:38:46 +0300") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2007.hostmonster.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stephe-leake.org X-BWhitelist: no X-Source-IP: 76.77.182.20 X-Source-L: No X-Exim-ID: 1mRZXS-0035TC-Ra X-Source-Sender: (Takver4) [76.77.182.20]:49475 X-Source-Auth: stephen_leake@stephe-leake.org X-Email-Count: 7 X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t X-Local-Domain: yes Received-SPF: pass client-ip=69.89.25.95; envelope-from=stephen_leake@stephe-leake.org; helo=gproxy1-pub.mail.unifiedlayer.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:274989 Archived-At: Eli Zaretskii writes: >> From: Yuan Fu >>=20 >> We have documentation for all the tree-sitter features provided by >> Emacs and a bit more, but I don=E2=80=99t think it is possible to docume= nt >> the language definitions. We can think of language definitions as >> BNF grammars for each language, how do you document that? > > Why do we need to document the language definitions? When a Lisp > programmer defines font-lock and indentation for a programming > language in the current Emacs, do they necessarily need to consult the > language grammar? Yes! If you want to indent a statment in a language, you need to know the syntax of that statement; you can't define indent for a "generic if statement). Consider Ada and C: Ada: if then else end if; C: if () else The language details matter. --=20 -- Stephe