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: [SPAM UNSURE] Maybe we're taking a wrong approach towards tree-sitter Date: Thu, 29 Jul 2021 19:21:39 -0400 Message-ID: References: <8735rzyzbz.fsf@163.com> <86v94v3xh9.fsf@stephe-leake.org> <87wnpargnb.fsf@elite.giraud> <87h7gey7zx.fsf@163.com> <83pmv2twrl.fsf@gnu.org> <86sfzwogsn.fsf@stephe-leake.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) 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="24677"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Andrei Kuznetsov , Eli Zaretskii , manuel@ledu-giraud.fr, emacs-devel@gnu.org To: Stephen Leake Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jul 30 01:22:29 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 1m9FMD-0006GP-4n for ged-emacs-devel@m.gmane-mx.org; Fri, 30 Jul 2021 01:22:29 +0200 Original-Received: from localhost ([::1]:40156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m9FMB-0000mA-LZ for ged-emacs-devel@m.gmane-mx.org; Thu, 29 Jul 2021 19:22:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51262) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9FLV-000051-TH for emacs-devel@gnu.org; Thu, 29 Jul 2021 19:21:45 -0400 Original-Received: from mail-qk1-x732.google.com ([2607:f8b0:4864:20::732]:35820) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m9FLT-0002CA-DT; Thu, 29 Jul 2021 19:21:45 -0400 Original-Received: by mail-qk1-x732.google.com with SMTP id c18so7696245qke.2; Thu, 29 Jul 2021 16:21:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=5IDCW9xrYpvhNsZslMh4c7kTZWMJLZVTZna+W6N3eqE=; b=fCTXhSzHFc0m6tpH6e5DTCwNupLkDAUcR4I+qUOyDioYtGrMyEcJ1ODvHn75rTvxzr YpR8M2+3VurreRzeIcaI3QZ1ZNL6ljliYHtrHsvrz/Q7hPhaoeAeoSZ+417e261ZxzP7 5v4cBRQuzjLh6DGX7W8CVfPVhJF2tY0L/GnHe15GX33TQOrAkF5d1EN0/Wu/ccOkR0rj P5FW5IKPSGiibTylwBX1OMKSGnGP933edoMLOwon2BzQhjjk+Lcw4EWhZQfITnG8jP0m n8olUChDKxq9ugfH1g5CDnztLdsFJFryOIN3YFR6caNMLkxrBIOrHQv6/ZEafGyXX1Ma IVkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=5IDCW9xrYpvhNsZslMh4c7kTZWMJLZVTZna+W6N3eqE=; b=VsGNcR8MFDxndKsQzSEWdPAQsx0xHi3Q8zDNliF7bkqfdnc0IoIW50NifmY4ROUpU6 UT9j+uOAyaaXCeBt0Nrp6XzLkW0U11d9Z/w8LL0dXVeyYejoYWmfwMIy8uC5nDYEWxvo 2jd5pspk5DpMxzt7X+83mSp8nZGyrt/a0PjLDSqjqrfmXnhbCUPHlSVRW2nxf5FqUtkT mndVWUVTKboxmOxh7ui/pQfz8eymUH10f8e105AuCFHUhU4kYntdaLAV9cy2bmi5OK/C ZhYN+YuFoGsednKcCTXuZtbOoiDe7q7VdBVvWw1Gv25qKYxyZLNSMAZkekdTmVStDJT4 mPhg== X-Gm-Message-State: AOAM533TD9jCAgP+3zz31D9yY79LYpm1ZFJZcVjZVNOT9dGlx6lr88ay xY77omLV7tcALZNQ8sL5car55FxO+kCnvvyu X-Google-Smtp-Source: ABdhPJwoFPjPRs6K2MrJxNKq2zDQJD2wG8dYqC+KvwJ55hCRrZLamFVZ/mtrklMbqm4nHWYqXMUdvA== X-Received: by 2002:a37:41c7:: with SMTP id o190mr7816160qka.201.1627600901356; Thu, 29 Jul 2021 16:21:41 -0700 (PDT) Original-Received: from 2603-7080-0302-635e-c100-4f67-0a08-f5fb.res6.spectrum.com (2603-7080-0302-635e-c100-4f67-0a08-f5fb.res6.spectrum.com. [2603:7080:302:635e:c100:4f67:a08:f5fb]) by smtp.gmail.com with ESMTPSA id n25sm2568083qkh.21.2021.07.29.16.21.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Jul 2021 16:21:41 -0700 (PDT) In-Reply-To: <86sfzwogsn.fsf@stephe-leake.org> X-Mailer: Apple Mail (2.3654.60.0.2.21) Received-SPF: pass client-ip=2607:f8b0:4864:20::732; envelope-from=casouri@gmail.com; helo=mail-qk1-x732.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.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:271807 Archived-At: > On Jul 29, 2021, at 7:12 PM, Stephen Leake = wrote: >=20 > Eli Zaretskii writes: >=20 >>> From: Andrei Kuznetsov >>> Date: Wed, 28 Jul 2021 19:48:18 +0800 >>> Cc: Stephen Leake , = emacs-devel@gnu.org >>>=20 >>> Manuel Giraud writes: >>>=20 >>>> I too did not follow the tree-sitter discussion closely. But AFAIU, >>>> tree-sitter provides tools to generate a parser (in C) from a = grammar. >>>=20 >>> If that is the case, it certainly seems grave! I don't think an = Emacs >>> that requires source modifications for extending vital editing >>> functionality is a good idea. >>=20 >> TS's code is written in plain C, and doesn't require any regeneration >> or source modifications. Anything else is misunderstanding. >=20 > That's true for the common TS runtime, which implements the parser and > error recovery, but the code for each language, that builds the LR = parse > table and some other data structures, is generated in C from a grammar > file written in javascript, and must be linked into Emacs somehow. Languages don=E2=80=99t need to be linked into Emacs. They can be in = dynamic modules. Yuan