From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: New package emacs-parser-generator Date: Sun, 28 Nov 2021 09:01:49 +0200 Message-ID: <83mtloyd9e.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19773"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Christian Johansson Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 28 08:02:35 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 1mrECn-0004vw-Uf for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Nov 2021 08:02:34 +0100 Original-Received: from localhost ([::1]:33336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrECm-0002U1-M1 for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Nov 2021 02:02:32 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57824) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrEBz-0001kM-FW for emacs-devel@gnu.org; Sun, 28 Nov 2021 02:01:43 -0500 Original-Received: from [2001:470:142:3::e] (port=54096 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrEBy-0000HW-Gs; Sun, 28 Nov 2021 02:01:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=T8lZFcb7ZTIKv+KJy9Z2Lq6a3a2JyZSknXlNWudHGZ0=; b=gziwnzLnc1WO yv6aSoFU7MGvdBEdj/llACbanPmcJpa3H647A2szYXktBIbZg6ZgeDCvC4zZ7byhHjd7YzQ+pUhJJ WrI8KjVUYg1a0E4FYey4H+fkKn4jTLUVfgKKaL/FieKWGJHlbfXcMdcCGo3+SicFzXtRfLO+2X6Gd 9vwRji1fFGCTFH6YAnp8RqqOqIK6/m3bwm0a9+F9eCvgnAmEuBjTjCTfW+P5i0bLSfsuoNeIh0cVN kqPSbDmApr/dCr+nAN7Lyk75gv6sBAA+h1F5S/Ov+Iyku9QiieKA1kjztW1D2tysWhmggApxCTiD3 sWsU6DpAYZkc+VMtYH8HhQ==; Original-Received: from [87.69.77.57] (port=2450 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrEBx-0002EI-5X; Sun, 28 Nov 2021 02:01:42 -0500 In-Reply-To: (message from Christian Johansson on Sat, 27 Nov 2021 22:40:45 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:280371 Archived-At: > Date: Sat, 27 Nov 2021 22:40:45 +0100 > From: Christian Johansson > > I have started on a parser generator library for Emacs that currently > can generate canonical LR(k) parsers as stand-alone elisp files. I'm > using it for the automatically generated PHP 8.0 parser in phps-mode. A > difference between my library and the built-in Wisent parser generator > is that it can handle e-identifiers (like %empty), context sensitive > precedence (like %prec) and global precedence rules (not sure if Wisent > does support that) > > In the future I have planned on implementing more parsing algorithms in > this library like LL(k) and LALR(k) Thanks. I believe the plan is to use Tree-sitter for the jobs for which a parser is needed. But we also want to have an API that could accommodate other parsers into the same framework. So I think it would be good if you cooperate with Yuan Fu , who is working on Tree-sitter integration, so that the API for using a parser could be a common one.