From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: arthur miller Newsgroups: gmane.emacs.devel Subject: RE: Using incremental parsing in Emacs Date: Fri, 3 Jan 2020 15:43:31 +0000 Message-ID: References: <83blrkj1o1.fsf@gnu.org> <219378dd013891dcaba73de18c189f7e@russet.org.uk>,<835zhsipod.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_VI1P194MB04292BEEFEB55EFEC82DEEC296230VI1P194MB0429EURP_" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="239438"; mail-complaints-to="usenet@blaine.gmane.org" Cc: "emacs-devel@gnu.org" To: Eli Zaretskii , "phillip.lord@russet.org.uk" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 03 16:44:24 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1inP7f-00105w-BY for ged-emacs-devel@m.gmane.org; Fri, 03 Jan 2020 16:44:23 +0100 Original-Received: from localhost ([::1]:53674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1inP7e-0008DL-82 for ged-emacs-devel@m.gmane.org; Fri, 03 Jan 2020 10:44:22 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59884) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1inP6y-0007hk-RD for emacs-devel@gnu.org; Fri, 03 Jan 2020 10:43:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1inP6w-0004R7-9i for emacs-devel@gnu.org; Fri, 03 Jan 2020 10:43:39 -0500 Original-Received: from mail-oln040092067094.outbound.protection.outlook.com ([40.92.67.94]:19692 helo=EUR02-AM5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1inP6s-00043F-KU; Fri, 03 Jan 2020 10:43:35 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EOYpHFuaWjMfUYk2mOJHyrnugNypDQCQgVHVt/vIO6Jv2NoSTdQC1Am0+Sny8oJCAkTSBKQE2l4UCZ+rcjrb/h0yeG3/Sh0SqUOKwDTlQq/+W0yKNvlwGnW65yKNQ37G6zuJjkakPmmRN9eFacpwqyVKC8R6fAUm4E70ajay1WzWEsDTIXSgSwJ/HBB3iL6SM2MdO3H89qXUII7T68UunHOi/2Xs1QE0jEJ4TbHx8iLGdCBg5fEvvyLGTiV7eZEVd+qq9QBdYAstryPawjbQEsXDodex2dgpEIaIcuAOBNEz8oUNaUgN+KG8hH8om2pvNDuXBbZEhneSNWkaNyb90Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cyr9H1n0VMqIEv2QTOowoaRlGE0PaGklFkBpkhjBA+U=; b=II8h0RKMuJygvPK+Bnu7pKJgsX8D1LN62WD/O2EWNCTN5z93zZwVYWEqYOQ2IjgplX/IcJ1yUvzuwH9FaXMVp1Xa4Rn/3uafcvdZLQDqV2SgLjWfP3DDoZv6pOqNOKNlGGAASZU0Lt7//caAf4NqjQokHhs/u5T3yi7C/DuSBOyDzG5g+WmCYnlOAp9AkUCtY+wOl4D5akWf9FOi2yFn1Rlw87fXv5zJjH0ER+0KrRXz/pD1Esp6UTn2e7MoopJ0BunbXi6+OflTSDowfftxiRpia3hJ9LdkfYoEsx+xihlHaq4KqlulBx6UzLRNvZDm5N2jzT57mG02FLEsPYhUvQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cyr9H1n0VMqIEv2QTOowoaRlGE0PaGklFkBpkhjBA+U=; b=NswV38FafjTPSdXe9RLfNi6xMXcZdki1PvrHBnszHQSJbjbjqnT0Ok/YgGT3aOcC1dS7+8IIIGzMOOwwKwNF00tGIhfmNK/RbnU/4QQuPQ6d4aDyay5WSzJLzRKXZ/hBIm4oBWalqhPG1KNzVo0R6UZ167SxxjVCMRUXPOZJ1REUivJ5PYu9NW9BChFv1J19GX7xyxHTp/bMGRRff2nJrnUtGksJ/sXT8vkyryA3zB/r0177o7F0ve1H6x45Z97BTU5c2cifeumnby+fvt4bfEeNuFajaax4IbsxsVraUOYLFPl0t5T3m3LdRUeB0vPCOcVrm4/N12Uwb6teQPm0xA== Original-Received: from VE1EUR02FT027.eop-EUR02.prod.protection.outlook.com (10.152.12.52) by VE1EUR02HT142.eop-EUR02.prod.protection.outlook.com (10.152.13.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.11; Fri, 3 Jan 2020 15:43:31 +0000 Original-Received: from VI1P194MB0429.EURP194.PROD.OUTLOOK.COM (10.152.12.54) by VE1EUR02FT027.mail.protection.outlook.com (10.152.12.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.11 via Frontend Transport; Fri, 3 Jan 2020 15:43:31 +0000 Original-Received: from VI1P194MB0429.EURP194.PROD.OUTLOOK.COM ([fe80::35f2:9ea2:efd6:1d46]) by VI1P194MB0429.EURP194.PROD.OUTLOOK.COM ([fe80::35f2:9ea2:efd6:1d46%5]) with mapi id 15.20.2602.012; Fri, 3 Jan 2020 15:43:31 +0000 Thread-Topic: Using incremental parsing in Emacs Thread-Index: AQHVwh1Uy8tVxqoXLEaWXDDoUSKGMKfY8WyAgAAOw86AABSvBQ== In-Reply-To: <835zhsipod.fsf@gnu.org> Accept-Language: sv-SE, en-US Content-Language: sv-SE x-incomingtopheadermarker: OriginalChecksum:A0F6090E8476122BB667226875CC147A58B036BA68FCEFF1C295DBD6309D6E54; UpperCasedChecksum:F2821296C1B2D06A358E6BFB2E4CF19D241628492272832B3E47D6D39DA3BBBB; SizeAsReceived:6985; Count:46 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [GGDCLSZomp7yMt9YnFImiEpJTPxLX25x] x-ms-publictraffictype: Email x-incomingheadercount: 46 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: f8f2c8d3-b2d5-430a-22b0-08d79063afa1 x-ms-traffictypediagnostic: VE1EUR02HT142: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Hh4KkhRMR4aoE/+nIEur4S5Z5r+lGfAS0ei0RXHhu5HsPWSAqOxyioqJHJE12+DGAkQqBt/pkH6OyDruRzmcBcs9S4fMcbf5AabV1I2A/41sJth5Wlc2p6Qs70lLfFZhxqP35YJyPryDAJRqKZILEXHeFbB4MGWzTGECQ3pv2nx3CHHUNLaEIfPcbcdUpjd/T7yb/A/On2wq71FIsizZ/gJsEzAO0ktkdWmX3e8rLc4= x-ms-exchange-transport-forked: True X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: f8f2c8d3-b2d5-430a-22b0-08d79063afa1 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jan 2020 15:43:31.7830 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR02HT142 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.92.67.94 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:243895 Archived-At: --_000_VI1P194MB04292BEEFEB55EFEC82DEEC296230VI1P194MB0429EURP_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Microsoft has been doing this since 1990's and they ended up with "language= server protocol". Maybe Emacs core could implement some kind of support f= or implementing lsp:s or implement some better support to interchange data = with existing lsp:s. Personally I dislike the idea of json (or xml) as interchange format, I wou= ld prefer some binary protocol for compactness and speed, but otherwise the= ir idea if lsp is probably quite sound. Maybe GCC could export its ast as well .... Skickat fr=E5n min Samsung Galaxy-smartphone. -------- Originalmeddelande -------- Fr=E5n: Eli Zaretskii Datum: 2020-01-03 15:29 (GMT+01:00) Till: phillip.lord@russet.org.uk Kopia: emacs-devel@gnu.org =C4mne: Re: Using incremental parsing in Emacs > Date: Fri, 03 Jan 2020 13:36:39 +0000 > From: phillip.lord@russet.org.uk > Cc: emacs-devel@gnu.org, Emacs-devel > > > https://github.com/ubolonton/emacs-tree-sitter/ > > https://github.com/karlotness/tree-sitter.el > > The former uses Rust for the dynamic module support. My gut feeling is that modules are not the best way of bringing this to Emacs (and doing this via Rust on top of that makes even less sense to me), which is why I suggested to come up with a design first. > Tree sitter itself also uses Javascript and npm to define the > language grammars, although AFAICT, these compile down to C. They compile to C, and I'm quite sure that it shouldn't be too hard to allow a language grammar to be written in some other scripting language. But I think these are secondary considerations at this stage. --_000_VI1P194MB04292BEEFEB55EFEC82DEEC296230VI1P194MB0429EURP_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Microsoft has been doing this since 1990's and they ended= up with "language server protocol".  Maybe Emacs core could= implement some kind of support for implementing lsp:s or implement some be= tter support to interchange data with existing lsp:s.

Personally I dislike the idea of json (or xml) as interch= ange format, I would prefer some binary protocol for compactness and speed,= but otherwise their idea if lsp is probably quite sound.

Maybe GCC could export its ast as well .... 

Skickat fr=E5n min= Samsung Galaxy-smartphone.



-------- Originalmeddelande --------
Fr=E5n: Eli Zaretskii <eliz@gnu.org>
Datum: 2020-01-03 15:29 (GMT+01:00)
Till: phillip.lord@russet.org.uk
Kopia: emacs-devel@gnu.org
=C4mne: Re: Using incremental parsing in Emacs

> Date: Fri, 03 Jan 2020 13:36:39 +0000
> From: phillip.lord@russet.org.uk
> Cc: emacs-devel@gnu.org, Emacs-devel
>  <emacs-devel-bounces+phillip.lord=3Drusset.org.uk@gnu.org= >
>
> https://gi= thub.com/ubolonton/emacs-tree-sitter/
>
> https://githu= b.com/karlotness/tree-sitter.el
>
> The former uses Rust for the dynamic module support.

My gut feeling is that modules are not the best way of bringing this
to Emacs (and doing this via Rust on top of that makes even less sense
to me), which is why I suggested to come up with a design first.

> Tree sitter itself also uses Javascript and npm to define the
> language grammars, although AFAICT, these compile down to C.

They compile to C, and I'm quite sure that it shouldn't be too hard to
allow a language grammar to be written in some other scripting
language.  But I think these are secondary considerations at this
stage.

--_000_VI1P194MB04292BEEFEB55EFEC82DEEC296230VI1P194MB0429EURP_--