From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?B?VHXhuqVuIEFuaCBOZ3V54buFbg==?= Newsgroups: gmane.emacs.devel Subject: Re: Using incremental parsing in Emacs (via: emacs rendering comparisson between emacs23 and emacs26.3) Date: Mon, 30 Mar 2020 20:43:08 +0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="46209"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 30 16:11:06 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 1jIv86-000BtP-48 for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Mar 2020 16:11:06 +0200 Original-Received: from localhost ([::1]:50412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIv85-0004nq-5I for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Mar 2020 10:11:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50310) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIuhN-0003Ob-48 for emacs-devel@gnu.org; Mon, 30 Mar 2020 09:43:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jIuhL-00027Y-6s for emacs-devel@gnu.org; Mon, 30 Mar 2020 09:43:28 -0400 Original-Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]:54916) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jIuhK-000225-Sh for emacs-devel@gnu.org; Mon, 30 Mar 2020 09:43:27 -0400 Original-Received: by mail-pj1-x1044.google.com with SMTP id np9so7576776pjb.4 for ; Mon, 30 Mar 2020 06:43:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc :content-transfer-encoding; bh=UjkfxIer9CRVzpkhAxM1IkQaSHBEPlGogvFl3XWZjVI=; b=P6Re5+oY2jWhcFcz+q3aSsJsUYjdWcerrq0oI71BDATIM1bHaBpU/o3YLREd4p7cJO b2XrfNqWNMiUPXFXJVWaavwdTIT8R2fYRrjXckOS+cWf0e8xtV4GDkBqOJFKMDohliuF nKOzQO10WXebkMNBuJWfX78i6FxFLczBBkWyOP6gGxdtenuKEBvGMiVT8NIq9g7Z+9kC FtRGG++IJPigGKu3LydkMblwm9ean2qkfS3VPkyCr2lSC1TjwPl7oFjLVJBz0m9/SXue ntFl74Y6uZdGR2JGqVbTGmBXNUsZa96FGjMnywBXgB5ZRM50w6gLhy6Wcc2gLUVPTPwn zcDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc :content-transfer-encoding; bh=UjkfxIer9CRVzpkhAxM1IkQaSHBEPlGogvFl3XWZjVI=; b=uBlLqCcYbaFl6k4nicm8+MPtzWPXFtOjjInrwCrvBctyd1KdmCUuRyt+qImnkYvthq u6RD1YC8ZaRLnjWcfcq8UC9Qowq561MfdurOZXAN72kbZakKfWG383YIaHwm4Y0nIMUS WzjCO/0Un1l+7+GItiy09Q0bWMyYOoFyNx2BLVzF9eQVMJirZhOR4HSHmgVcEoZIh3HA kHh7teF/MI+qIVU3YEb56HxSrdZPMAnV5oSW1DFr2i7k1/MghUARecikwjjqEtYbsJG0 sDlW68j2iFgJl9ij0yC0fY87szoajOQrMUS38AO0FttizzhGDZzgNui+kSXFBv0sRXHN xItw== X-Gm-Message-State: AGi0Pua/Vnuj0ZEpB3s/LfP8fvt1uJ2BxRhSmf7sfErHAvazp7iba5W4 r4prL+4eWIqyErUZ4r9Xii4DYkUkXhzVX4nOEKY= X-Google-Smtp-Source: APiQypJK9mtVuqz7ZzV0yhnE4Q8Wa1L6pcrcVrik/bdjgRhkKiU+TvoGr0VGS9NUU8TDEqX9V3SncGV6FYYTfNOFZik= X-Received: by 2002:a17:902:a983:: with SMTP id bh3mr1378530plb.127.1585575804761; Mon, 30 Mar 2020 06:43:24 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::1044 X-Mailman-Approved-At: Mon, 30 Mar 2020 10:10:23 -0400 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:246010 Archived-At: > The existing third party packages should be good starting points to come > up with a design. But I think an important issue is to figure out how > to make tree-sitter usable for the end users: AFAICT the main issue > being how to let end users download and install new grammars. > IIUC grammars are written in Javascript (or some subset thereof?) and > then somehow compiled to C code. Having them as C code implies either > the end-user need to have a C compiler or distributing pre-compiled > binaries with all the trouble this entails (with all the variations of > OSes, and architectures, and ABIs, ..., plus issues related to > licensing, security, ...). In the short term, I think the practical approach would be distributing pre-compiled binaries for major targets, and providing users with enough tooling to compile on other targets. Licensing and security are a different matter. > Maybe those grammars could be compiled to some other representation (I > don't know if it is made mostly of data-tables or actual code or what)? Many of those grammars have parts of the lexer in custom C code. Therefore, a common representation would require an instruction set. In principle, that can be done with something like WebAssembly. Tree-sitter already compiles to WebAssembly (both the runtime and the grammars). Its playground uses that: https://tree-sitter.github.io/tree-sitter/playground. -- Tu=E1=BA=A5n-Anh Nguy=E1=BB=85n Software Engineer