Received: from mail-wr0-f192.google.com ([209.85.128.192]:42273) by stodi.digitalkingdom.org with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89) (envelope-from ) id 1eHTMU-0004dY-Uw for lojban-list-archive@lojban.org; Wed, 22 Nov 2017 03:38:39 -0800 Received: by mail-wr0-f192.google.com with SMTP id k100sf9961223wrc.9 for ; Wed, 22 Nov 2017 03:38:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1511350706; cv=pass; d=google.com; s=arc-20160816; b=ByZwEgz4OngMRkk3nJ0m0h9exUNO2iZMQphW3kQKgYYyWAhZEThLWB5zWvVD1+7Qi/ Trjz0P24qOusyXWNM2r007fqprERkP0o27H0NxVDyG6sD7VEFLPBi1c1Zz9xXOe+o9Rm Yjo6CTSRnxDkWvcuJxTOVzMq62gZPh3RmJ//92T0gnYL5C0DBe6EE4VNcUBzxFXNGc3V hJW1yhbvvx66wFuicxE8SGhhOVzUt4ZAU4eZyXxBO+/Q8smQFueKxdp658vkKkCQ2CES 6lgFExVZFs6zf9UtHKRwg6I9QDejQcP57iNQKPFp7gnY5zwarbNoQ77ZGlefsLnvZKOt P2kw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date :from:references:in-reply-to:mime-version:arc-authentication-results :arc-message-signature:sender:dkim-signature:dkim-signature :arc-authentication-results; bh=s6cgTTozoREkiwcXaPysNwxWBIrOvTo4VuYdm2dkHBw=; b=GwN/qumuYAQq48ydCGEgcdA2Z5iIq3CigS3OEuJNbDdnlKQqAdO1PKlDvzxjYxWm6L 0NLO5rDRpUt9Arl6ibOUFeGjQ5xK3Zka4V8OHxXma4r0CkN2+wW45gJx1zYX7Ro7e8Au cgIGTPqXMS+ivwGSH78hbwIa8JI0+q5MJPzlUrYi3j+vAI2+Nd/6CCN2uhGbLoFQDxKz aJZW7aYov5FrRqIebstEQWUgJqUqWQZg35LLoFIS04+uZKkvjIxK25c8fYujnU+6+kZ/ RTSC8t4A8M1yTQdLbfqe0WXw2C1f6W/WAszK3wy9ZZen3v4LVXhqZcyj4f9bV+9W5XAy Q3Aw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WYKefymF; spf=pass (google.com: domain of rdentato@gmail.com designates 2a00:1450:400c:c0c::236 as permitted sender) smtp.mailfrom=rdentato@gmail.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:in-reply-to:references:from:date:message-id :subject:to:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=s6cgTTozoREkiwcXaPysNwxWBIrOvTo4VuYdm2dkHBw=; b=Tf1CXza0m1aK9yOtsjVzg94qYQPEoSIZKpUar+YXhp8iuBUNVG/swlBXX6pBA+r5Z8 GYWaz9YJ28kY8l7kUAHfg9IJcIYADiyV6ew6sLd1UcRNyXbGSGSpKoP7Ha+fmZWPRiAk EDAZWPsL0busVX651sudDdklXGyhAlnIY2Hd3ODrwqVSVBDwLXoP18TnB9x57mJBLEl7 uWI8Z8LydjWh/t5BO90XhrGb0Gu06hsSj26fS7xYB/1wipydkBCX+fOS8wFUgvSKHoLt Af9j7TU3ZBVtkC0XTjeYXqY9lbGxAyNm7JqwOvCXWJTuLYJM8lAuFEkHBHVwsL9Q7pFO f6QA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=s6cgTTozoREkiwcXaPysNwxWBIrOvTo4VuYdm2dkHBw=; b=MEcd6LqGzuD3sx8V1TZDAq3lKpsYs1FiXz2RtQiipEOx8L/IYiasXeF2yLeOjdlM/j HPPx/+cRMOdmXzWBhWFpFd3CvkEceZCe7CLt74vgbvzuka3WOF8/DAaF/DEDYOpmyMm4 qUdhvNCppAisx96Q1Br3T9p6Ywxs6c7J7V1QgxLzCofrncikKeGLkRa4e984chghkAY1 nQgAKJw0i95iB7YAcU8MUM067u5EUD0WMwoLV7pdvQpY8WExZ8Gk5XA0BETnOZZwL79H Hw8QCCqtnEz0T7jjcaZaBi8sUHY1NVl0mrC6JKxGUZODP7824g8veW5GZ60rGX9Vx82W OwYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:in-reply-to:references:from :date:message-id:subject:to:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=s6cgTTozoREkiwcXaPysNwxWBIrOvTo4VuYdm2dkHBw=; b=A6myndeNGEoUFNEqH5QpksBsUzy6z2S6c024HKrJNnNNcAHSXMxW5aDVbDu/E2JIAH 2csovRZYh7cs6dqkgHFhK4NlvVdfDz06OU3HXCGk1DThTt4DxOb6wV9Ew38uNVeTpbBJ UPZNFB4qqv0/5um8tYbqI5H1SjobMZgTPL0ueBl2ZCc6uzIq2iCBP1YvcMWW4HsiUiL9 mcddRH/Fc8sg+QXmlYcnpDD0yAg1MXEg/DlZK1IjzM7j+6ZvH2bpMNWj0N4keylay0L8 XvlwpH4QgsWWUNjJH6kQxp/gwnle12OPL+9erIi+7QuH6lAVRaX/jtAYtZ7CwWDUd0WO 93bw== Sender: lojban@googlegroups.com X-Gm-Message-State: AJaThX6tUUQPku/XzW4TgxbTARJRHwvT7hqBXkvZv7T2u+1jYaks1rFe sSVvec8tdtNqoa8W6lY3Mrg= X-Google-Smtp-Source: AGs4zMZF7psusbzWWETpsCIidejD+kD2KRGolaUsPKXlo0csuEmuWlgf7If1Wd6r7Pi75hOuwd5Jkg== X-Received: by 10.28.31.138 with SMTP id f132mr52813wmf.2.1511350706390; Wed, 22 Nov 2017 03:38:26 -0800 (PST) X-BeenThere: lojban@googlegroups.com Received: by 10.28.125.198 with SMTP id y189ls815878wmc.8.canary-gmail; Wed, 22 Nov 2017 03:38:25 -0800 (PST) X-Received: by 10.223.163.72 with SMTP id d8mr102384wrb.32.1511350705768; Wed, 22 Nov 2017 03:38:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511350705; cv=none; d=google.com; s=arc-20160816; b=HpffnxnzKuI8C2fEaLhp988L5ZXzH0YIbZBR1Rwba3LFas89IoO98LQCqsUWOzbVgR 3Tey9/ld1HKBu1g777BztgpRPhJth9LhdvauEMTJ5lHgxeaFuUUedqAZTNdNTMIElV/p oI9D/yp5/kUssP9XlNcm75zpkojTYgRo1Cyt6ce/00TQKCs3YA3Q33xsP05o/5ZnkVDr Qijy4APRBDvZHoeSW6c8uSOQUVf7QrxxNeuzDPukmkg2Gxew4m9eN04LNrY5xWE1Hg6W GcapqFtt9I7QiKWwlxvkLNb5i7JXnnf4IpW0AIlqns7NWzeJ6Aa+vePFQ47AoTYCDubY pdNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=zcwuhiI+QipOcEXarvVroQMb6HGhmeSERkrlmdSkkks=; b=VYoz8RzAxqSWTPPlwFCgpwvTR5K/Dc3mF7m3tcDME0NQXdQAEJDj7DB7/ycgpLlste Y4frbM3M3zIn34XmSOlp0oX39RbP/5gufOBUVq7J+CJdPSyXyCO7kTcVnT/Nb3CNpyAM 1RvClP39wwX5oKJuQaF6mQ5Rg4bAUHuUL88PUfTgnOgkQn2KWweXuhJxq+OOBdIGwC2E NbgBexgWXd1dQXF3d5RxnFpMsnn+gRztdEvMa/+IAazoc7KoDxVTakl3MEr9PK3ZRPm/ CMcdjzCQKV/BxgHj+AIArqptn8g1i1BJu85yC8pr2v0y1J5FjOLdh3kcTC9TXGSyLqiK me3w== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WYKefymF; spf=pass (google.com: domain of rdentato@gmail.com designates 2a00:1450:400c:c0c::236 as permitted sender) smtp.mailfrom=rdentato@gmail.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from mail-wr0-x236.google.com (mail-wr0-x236.google.com. [2a00:1450:400c:c0c::236]) by gmr-mx.google.com with ESMTPS id e80si289178wmi.2.2017.11.22.03.38.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Nov 2017 03:38:25 -0800 (PST) Received-SPF: pass (google.com: domain of rdentato@gmail.com designates 2a00:1450:400c:c0c::236 as permitted sender) client-ip=2a00:1450:400c:c0c::236; Received: by mail-wr0-x236.google.com with SMTP id 11so10883950wrb.6 for ; Wed, 22 Nov 2017 03:38:25 -0800 (PST) X-Received: by 10.223.173.67 with SMTP id p61mr16316974wrc.226.1511350705287; Wed, 22 Nov 2017 03:38:25 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.136.149 with HTTP; Wed, 22 Nov 2017 03:38:24 -0800 (PST) In-Reply-To: References: <78156dc5-1fb3-4e9d-992c-a8f30facc4fd@googlegroups.com> <963393d6-a9f1-4232-be13-b4ee76eb69e1@googlegroups.com> <7d063690-0550-45d6-9779-3334ac8e17b5@googlegroups.com> <85ecf653-49c8-457c-8397-d80fc0c3a8ea@googlegroups.com> From: Remo Dentato Date: Wed, 22 Nov 2017 12:38:24 +0100 Message-ID: Subject: Re: [lojban] Re: CLL and modern Lojban To: lojban Content-Type: multipart/alternative; boundary="f403045cf798eb77c3055e90c167" X-Original-Sender: rdentato@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WYKefymF; spf=pass (google.com: domain of rdentato@gmail.com designates 2a00:1450:400c:c0c::236 as permitted sender) smtp.mailfrom=rdentato@gmail.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Reply-To: lojban@googlegroups.com Precedence: list Mailing-list: list lojban@googlegroups.com; contact lojban+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: lojban@googlegroups.com X-Google-Group-Id: 1004133512417 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Score: -4.1 (----) X-Spam_score: -4.1 X-Spam_score_int: -40 X-Spam_bar: ---- --f403045cf798eb77c3055e90c167 Content-Type: text/plain; charset="UTF-8" On Wed, Nov 22, 2017 at 10:29 AM, Gleki Arxokuna wrote: > PEG has no tools to check for ambiguity, it simply does not support it, > it's another grammar with its own drawbacks. It can't be compared to YACC, > it's just another class of grammars. > > If you want tools resolving ambiguity then having tools not more powerful > than PEG or CFG is not enough. > Since the absence of syntactic ambiguity is one of (my) requirement for Lojban, let me understand better. In CFG the source of ambiguity is the at any given moment in parsing one can choos which alternative path to follow. So, for example, the following CFG grammar is ambiguous: E = E '+' E | E '-' E | N N = '0' | '1' | ... | '9' because the string "4+3-9" may result in two different parse tree: E E / | \ / | \ E + E E - E | / | \ / | \ | 4 E - E E + E 9 | | | | 3 9 4 3 The corresponding PEG would be: E = E '+' E / E '-' E | N N = '0' / '1' / ... / '9' And there is only parse tree for "4+3+9" E / | \ E + E | / | \ 4 E - E | | 3 9 (note that PEG do support left recursion even if the original packrat algorithm didn't) CFG grammars need to be checked for ambiguities and have to be rewritten to eliminate them whereas PEG do not have this problem (and hence lack a tool for checking ambiguities). I do agree that ensuring that a PEG grammar does exactly what you want it to do is not easy (especially if it's a complex grammar) but "per se" the PEG itself does not introduce any ambiguity. Is this what you meant or am I missing something? -- You received this message because you are subscribed to the Google Groups "lojban" group. To unsubscribe from this group and stop receiving emails from it, send an email to lojban+unsubscribe@googlegroups.com. To post to this group, send email to lojban@googlegroups.com. Visit this group at https://groups.google.com/group/lojban. For more options, visit https://groups.google.com/d/optout. --f403045cf798eb77c3055e90c167 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On W= ed, Nov 22, 2017 at 10:29 AM, Gleki Arxokuna <gleki.is.my.name@g= mail.com> wrote:
PEG= has no tools to check for ambiguity, it simply does not support it, it'= ;s another grammar with its own drawbacks. It can't be compared to YACC= , it's just another class of grammars.

If you = want tools resolving ambiguity then having tools not more powerful than PEG= or CFG is not enough.

<= div>
Since the absence of syntactic ambiguity is one of (my) = requirement for Lojban, let me understand better.

= In CFG the source of ambiguity is the at any given moment in parsing one ca= n choos which alternative path to follow.
So, for example, the f= ollowing CFG grammar is ambiguous:

E =3D E '+' = E | E '-' E | N
N =3D '0' |= '1' | ... | '9'

=
because the string "4+3-9" may result = in two different parse tree:

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 E=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 E
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 / = | \=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= / | \
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 E=C2=A0 +=C2=A0 E=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 E=C2=A0 -=C2=A0 E
=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0 / | \=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 / | \=C2=A0=C2=A0 |
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 4=C2=A0 E=C2= =A0 -=C2=A0 E=C2=A0=C2=A0=C2=A0=C2=A0 E=C2=A0 +=C2=A0 E=C2=A0 9
=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0 |=C2= =A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0 |
=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 3=C2=A0=C2=A0=C2=A0=C2=A0 9=C2=A0=C2=A0=C2=A0= =C2=A0 4=C2=A0=C2=A0=C2=A0=C2=A0 3
=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0
The corr= esponding PEG would be:

E =3D E '+' E / E = '-' E | N
N =3D '0' / '1'= / ... / '9'

And there is only parse tree for "4+3+9"
=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 E=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 / | \=C2=A0=C2=A0=C2=A0=C2=A0 =
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 E=C2=A0 +=C2=A0 E=C2=A0=C2=A0=C2=A0
= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0 / | \=C2=A0
=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 4=C2=A0 E=C2=A0 -=C2=A0 E
=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0 |
=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 3=C2=A0=C2=A0=C2=A0=C2=A0 9

(note that= PEG do support left recursion even if the original packrat algorithm didn&= #39;t)

CFG grammars need to be checked for ambiguities and have to be rewritten t= o eliminate them whereas PEG do not have this problem (and hence lack a too= l for checking ambiguities).

I do agree that ensuring that a PEG grammar does exa= ctly what you want it to do is not easy (especially if it's a complex g= rammar) but "per se" the PEG itself does not introduce any ambigu= ity.


Is this what you meant or am I missing something?

--
You received this message because you are subscribed to the Google Groups &= quot;lojban" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to lojban+unsub= scribe@googlegroups.com.
To post to this group, send email to lojban@googlegroups.com.
Visit this group at http= s://groups.google.com/group/lojban.
For more options, visit http= s://groups.google.com/d/optout.
--f403045cf798eb77c3055e90c167--