From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: PL support Date: Sat, 16 May 2020 15:08:48 +0300 Message-ID: <192df26a-a4d0-1377-3e7c-e8ddac6983ce@yandex.ru> References: <9mmFgzvrBwjt_n_VJyaJdXINraNi5HsGpwq-0MLeKiJA7kG2BQA4uywrzjyz7lpRS0OZDpjEi8lspOKYUA7P_QsODsDew_8nbH960G55fmY=@protonmail.com> <83zhaih0oz.fsf@gnu.org> <83pnbegsvm.fsf@gnu.org> <83imh5hby1.fsf@gnu.org> <2e4e8ce9-d857-f3e3-31cf-a40dee67bd25@yandex.ru> <83y2q1dsvh.fsf@gnu.org> <2468efa6-7dbd-8634-44cc-586bb6985f49@yandex.ru> <83pnbddrfd.fsf@gnu.org> <5bcc1b01-6000-52bc-e7e3-86e0f60dabb2@dancol.org> <6e9117c1-a05c-e6a4-0c9d-aa3ef386d371@yandex.ru> <4b15a709-8d3a-d51f-1841-3f34d87a9fbc@dancol.org> <7d5833cc-28e5-af3d-c0b1-b35b91a1e968@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="10906"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 Cc: joaotavora@gmail.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Daniel Colascione , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 16 14:09:26 2020 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 1jZvd7-0002j9-T1 for ged-emacs-devel@m.gmane-mx.org; Sat, 16 May 2020 14:09:25 +0200 Original-Received: from localhost ([::1]:56294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZvd6-0007n6-W2 for ged-emacs-devel@m.gmane-mx.org; Sat, 16 May 2020 08:09:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZvcd-0007KC-3H for emacs-devel@gnu.org; Sat, 16 May 2020 08:08:55 -0400 Original-Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:33441) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jZvcb-0002aU-5D; Sat, 16 May 2020 08:08:54 -0400 Original-Received: by mail-wr1-x433.google.com with SMTP id l11so6508980wru.0; Sat, 16 May 2020 05:08:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=fTYKv+CzzINuELSmnm8C0P2HoQubQyL75fAE440JfdA=; b=GkmVbCQVVv7uEYgnn1+khhg7/ecN4J/9nK0wTyryXePfG5TybmWPJgugt1dgjdMFyd w/GeQGnXBFXHZVFzLfdCTySl+y8Xk62kL0/frefVLCRS52FYWKY6y7cPBMdpLGIFAEbt kHdXT6pxUW44Xg/9TxXgfiL571a3rMnbvgxZV2x5C3x/o+s2htBa7z0eS7rnKRAMnW4J 90LQ1R1fnzvIXTHLKB+i3DM7z+y2ez4DO308WKpLf/wL1XrGLFoMg844oSItHUrGDHrb ku5h4PTigmzoNn+IdcBhEHH8MMfA3Iez44Bb9mqOn9pRxQuEWSPY6Gu+nQPX7Q86Z9s5 AkCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:cc:references:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=fTYKv+CzzINuELSmnm8C0P2HoQubQyL75fAE440JfdA=; b=tfIxFa2g3JqE7bJ4pJRhqe0xLZSN4k+OD1EEtYIOBcjEOtrfyoEKexiWGige7eu0fv 2UTaIHmfyNHsEse84u6OOZqb6bd1t1qliUBPV2oAQowq1ASoebioPjvsPeSHNeC0dQM6 n2Xo7QZmAO/GrKGb32Nf0YxHAGuS74VulsNrAiUscAK7fitWD+7iUxqxac43d9B36YE5 LRqxgV5aGk4mroQj3dfWEudMuNfeRypOAFH6qNW4VLiAHAdGZA9KYtaQ9qwO6gyynyxy 0tnMSKFdtHPPCqs0iH1dMKzXVQOcKSsQkWuLuhq8ye7CDjbr3yyUP+7N+OfgZZ5MmOlQ 09qQ== X-Gm-Message-State: AOAM5314gvDZyzqaeZLeGdgCtRSemcMZiDE2ImkkCswPtK/XL0E2JVOp rZibXlLLW0uPt9bkABoeoJo= X-Google-Smtp-Source: ABdhPJwOxzC+XGJJTdQGYVS2tljE96Z+rKwZE17IYNyOjO6SaxfxUhFTDbX5YAqWsK27PFKBafwq1A== X-Received: by 2002:a5d:62c7:: with SMTP id o7mr9381918wrv.212.1589630931412; Sat, 16 May 2020 05:08:51 -0700 (PDT) Original-Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id i6sm7722296wrw.97.2020.05.16.05.08.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 16 May 2020 05:08:50 -0700 (PDT) In-Reply-To: <7d5833cc-28e5-af3d-c0b1-b35b91a1e968@yandex.ru> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=raaahh@gmail.com; helo=mail-wr1-x433.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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:250478 Archived-At: On 09.05.2020 22:49, Dmitry Gutov wrote: >> Looking at TreeSitter's repository, it looks like the parser generator >> itself is written in Rust (which could be linked directly into Emacs), >> the JS-specific grammar bit is pretty small and directly translatable >> to elisp [1], and the output of the parser generator is a bunch of >> tables that could, in principle, be used directly instead of having to >> round-trip through a C compiler. > > I guess the question is how fast this is going to work, compared to the > original. Then the details of the Elisp interface. And also our ability > to keep up with the grammars and TreeSitter's development (new features, > api changes, etc). Just something I have stumbled on by chance: https://marijnhaverbeke.nl/blog/lezer.html Lezer is a parser system that compiles to JavaScript (an interpreted language closer Emacs Lisp than C), inspired by TreeSitter but making some different tradeoffs WRT performance and memory use. It uses its own grammars, however: https://github.com/lezer-parser/lezer/issues/7