From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: Make peg.el a built-in library? Date: Tue, 28 Sep 2021 11:32:58 +0200 Message-ID: References: <875yvtbbn3.fsf@ericabrahamsen.net> <87bl5k87hq.fsf@alphapapa.net> <87fsuvpod4.fsf@ericabrahamsen.net> <874ka7wqko.fsf@gmail.com> <87sfxp4ard.fsf@ericabrahamsen.net> <20210928080902.GC14380@tuxteam.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14697"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: emacs-devel@gnu.org Cancel-Lock: sha1:kxetAuSHMGhFpr6b/mE4GzQ9R4g= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 28 11:38:13 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 1mV9Yv-0003UF-Bm for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Sep 2021 11:38:09 +0200 Original-Received: from localhost ([::1]:32814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mV9Yt-0006bF-JY for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Sep 2021 05:38:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mV9U6-0008D1-0X for emacs-devel@gnu.org; Tue, 28 Sep 2021 05:33:10 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:50802) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mV9U2-0004zb-N6 for emacs-devel@gnu.org; Tue, 28 Sep 2021 05:33:08 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mV9U1-0007WJ-2C for emacs-devel@gnu.org; Tue, 28 Sep 2021 11:33:05 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:275676 Archived-At: On Tue, Sep 28 2021, tomas@tuxteam.de wrote: > I don't know at the moment whether there is a (non-constructive) > proof that CFGs be strictly more expressive than PEGs? You could ask this question on the PEG mailing list [1]. Apparently it has been proven[2] that for every CFG in LL(1) there is a corresponding PEG. This is very nice, because in practice we are mostly interested in grammars that can be parsed efficiently. Unfortunately, it seems[3] difficult/impossible to tell (statically) if a given PEG corresponds to LL(1) or how much backtracking it needs. Helmut [1] https://lists.csail.mit.edu/mailman/listinfo/peg [2] https://arxiv.org/abs/1304.3177 [3] Trying to understand PEG Fundamenta Informaticae 157, 4 (2018) 463-475. http://www.romanredz.se/papers/FI2017.pdf