Received: from mail-wr0-f183.google.com ([209.85.128.183]:52689) by stodi.digitalkingdom.org with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89) (envelope-from ) id 1eHTTr-00052I-Ct for lojban-list-archive@lojban.org; Wed, 22 Nov 2017 03:46:16 -0800 Received: by mail-wr0-f183.google.com with SMTP id b79sf9967260wrd.19 for ; Wed, 22 Nov 2017 03:46:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1511351168; cv=pass; d=google.com; s=arc-20160816; b=WrzF1RuLRWqyTd0dRaQfL/hWfrB+YdqOYmwO2cTmtZ33aArFmJ6QuZSYLMvnC2ekx1 1UMZLoipkErltseBKOikR0va8TB/yBi+BV1kwPKyWgGNB1PdQkC1RnuFJ2zKqOFxLqDt Fwjr+f0wRcSSZap5pTJiCcNGAwolNns4ZF6vxNszCWzdrp8c5kHfyp78xnFJQLdYiHcX QNdqdz9xgrKz41oQ3CMW+orRIluZq8FqV5x2nktoaDNGm0Yo4s2bnW37bPKb5vaH22q6 6WsWict8P4w+kfcLeQpFsZSUZSVuWG4QBoyO2cccBaiEL98fPKXP2aCdRqGVq+fXHNVM ba/A== 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=tJYx0pkpLe1uH2Q8zqxxfQKf+jTBjwjS/Ubo0b0g6bg=; b=hdV7XrUFbwWwgY1mGIcJYB3RX1Hnnk4a3I7aNSaZcYuMnA9C5GGA4wSF12GmPTtroV MOeBSoXEKWNAhFD1GO/NmQ5hN2fMntNu41wVcKiXWuiUHoeMIcrla7cai9x+1gq0jZcz ur3nmAw09Ekhw3TE20nc/x2NdtKHkM8p8UWjCniXuQ/THaaCBXU50JVvPP+v3kJl5Qrb tQtli8uq4ka26auO/yPZT99kSnHoN8XUtNyqkbmg3y3sOHTIZSgJI0GuF+b3LD9cXcK8 GtEe+0bzMVL8uj0YNl0PNJRM4MrqYZ9+orkMj9t264xP/2uy0f2I7v7npC4hael7daPu ac4Q== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O7cq3x4f; spf=pass (google.com: domain of gleki.is.my.name@gmail.com designates 2a00:1450:400c:c09::22a as permitted sender) smtp.mailfrom=gleki.is.my.name@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=tJYx0pkpLe1uH2Q8zqxxfQKf+jTBjwjS/Ubo0b0g6bg=; b=muveTk/xj6sJF7WheHThWsHthPoEm6IQCadogtLvan1vMfuCyb4VsTdXzUDiUsy3Ti /o7/vxhQyVWS0QUeV/2Z45AdvzhAYTs3rosFbpV90C7Gv8K0jZ6mrXrKlZrODP7FTcO6 VxqFDK2BRRV3AnlIzl/Nbjnse8J/BC0lD8+2W4BTir8FjF8tl0EM+yoUxm7SoN9UCPph xIyNz9TH9L8P+ImtN/+DGojNTc4M6jHrRm5u4/fzS8sfwUsFBRlPumqEU1GZeWfNYmSa wesiaNfzAHQgQKD7bsSmSpeVp9ts7m3HRRi9EAhE6Rynj4chEbUgW7k8PkFCT4WieTwx WsrA== 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=tJYx0pkpLe1uH2Q8zqxxfQKf+jTBjwjS/Ubo0b0g6bg=; b=bPaMMKI86PyVlOttpmystyVymkCh6e7PNEapvRw64mxQtWDaNvE4LU3gejstX+EK+f /eg29vMrne9mITUGgMp6M0tKLGeEb3Cf/Dv9nZemb2tafqiTbD9Nh3o1pKlJs7NRf139 fT8YXYhXjMBc3iaNJI2EHp6gLznuUYjBPy895FSXZrwZLK6XYDFW46xHTevKp4DeJwnb zOs66Qj4zZ/RP9VFZrxm8Cf5+wzvVljSv4+tKWN8ssP/2dYNLyQJfc23ZqHqG1d3eyT/ AB6jypChFMYZG0njf8hC2t4fdyCFncFpAY+RWVGqaRqgJeZ/+G4GKezNRLlRPABWGzDq Pr2g== 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=tJYx0pkpLe1uH2Q8zqxxfQKf+jTBjwjS/Ubo0b0g6bg=; b=kdHvk4jY2RXFOtUqOeFrkQxDpsgwX+DbUx+FFBCQngx+6ZiozOWshiv5OZYIT2o3eC awWc48yDDwMf8Iqlx0x5Tk7qmh1kr8t6Zsrr6wrzgheLkMWOhaKXAUnNLYO51wMm6zyA gFxs70TE6qIn8iT8NeQ+8WZ/rG+4HdYd7QMkCVt1If+hDqHuUwESivR2dPGFYuDDfemH B/gJdWGcFXiHYJZ76gqX95r0Hfe1ZKh47j6chLirDDOkWLEADxARlc9dxtpHmYtvNQBy Dq50z5Tig9pDxTOaV/MHt4BEoDi2siIQTjcKWglQnWYoHEEwgwxSZ0mvpFg9X8sjXxm4 oOVg== Sender: lojban@googlegroups.com X-Gm-Message-State: AJaThX73aTX/MyAXRydPhVfu03Ofl9dIGmXRcg2l6VTtIheDBOCaz/q0 QBpHxkEz8S93YAq0O4NtLx8= X-Google-Smtp-Source: AGs4zMZ1H1D8zSLDtU8U7pp7mTkxOt5Cxb/54o2GEEUI8CeerAp7qvCS/mMRPzXlCY7YJ75St/7K5Q== X-Received: by 10.28.184.72 with SMTP id i69mr53108wmf.3.1511351168637; Wed, 22 Nov 2017 03:46:08 -0800 (PST) X-BeenThere: lojban@googlegroups.com Received: by 10.28.125.198 with SMTP id y189ls799339wmc.11.gmail; Wed, 22 Nov 2017 03:46:08 -0800 (PST) X-Received: by 10.223.142.214 with SMTP id q80mr1649015wrb.22.1511351168113; Wed, 22 Nov 2017 03:46:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511351168; cv=none; d=google.com; s=arc-20160816; b=H0Ypcx3J85FALCSYwMio64G2+E2gGozmjb9norCjWdunpUJDDbNYwTebi8uwuriVXa TZgRY8xR7ymjipHi9Dp6uHt39FdFoRj+Ncd3T/RL83+mjSVxpNtl0d3YL1UB2Ms7+7XG iWeZqIXVrrwaxRndZriIOOHG1psPZpwhAZqMJ7sQfiROOSetxuVokWAKpeKbQjddHoov C7HGpRd6eqgk/IYD189g1RofC+6Khqbb2NIMMZEBvjMX3UXHmmfrgyAViPsZdNy9ZBH9 FvYCAy74fIh56UKxATF4FjTu52AV+Rz5RItEovhUoUzg7AlBOg80uDcXJ0ypZWHEOmW9 d2zw== 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=8wi8n/p+7tAUF6wYVnC3Z0l+HLr7OHLYbz/cQ0GQy7M=; b=ElVT8NgyOe1MdNTyKdypH9HQGPXFrqpPGXLz31s2+BRChqm8KuO3QRJ/kbVmTGYOl6 7dqJDkr5A3QZxgiAqjxz8TAlCUKUzssd66kRJPjV6HWGCdFv8x7FvKd3lpkX750Zd26L jAUGAO2pzvQ8Zab6zPMq2q/z179qBfQlU8PFB67G87E3ZkoPzqxX880I3qeGhcOe6Yb7 iaK5uy6/+TKIyyNkxo0FBUBaDgNQQBv4nJ7ktdPsRRxHcJCrIcu7urbTQirqkio83nBk O9DxFL7FWhJeN66g1XZgRWYxVxJmkell6MWhx4lpEKDmR7LBHJqfRnXx269TZSmiPWWt INGA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O7cq3x4f; spf=pass (google.com: domain of gleki.is.my.name@gmail.com designates 2a00:1450:400c:c09::22a as permitted sender) smtp.mailfrom=gleki.is.my.name@gmail.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com. [2a00:1450:400c:c09::22a]) by gmr-mx.google.com with ESMTPS id k6si643034wme.4.2017.11.22.03.46.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Nov 2017 03:46:08 -0800 (PST) Received-SPF: pass (google.com: domain of gleki.is.my.name@gmail.com designates 2a00:1450:400c:c09::22a as permitted sender) client-ip=2a00:1450:400c:c09::22a; Received: by mail-wm0-x22a.google.com with SMTP id v186so9551015wma.2 for ; Wed, 22 Nov 2017 03:46:08 -0800 (PST) X-Received: by 10.80.139.180 with SMTP id m49mr30412089edm.36.1511351167598; Wed, 22 Nov 2017 03:46:07 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.173.219 with HTTP; Wed, 22 Nov 2017 03:45:27 -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: Gleki Arxokuna Date: Wed, 22 Nov 2017 14:45:27 +0300 Message-ID: Subject: Re: [lojban] Re: CLL and modern Lojban To: "lojban@googlegroups.com" Content-Type: multipart/alternative; boundary="94eb2c19578e79c461055e90dd74" X-Original-Sender: gleki.is.my.name@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O7cq3x4f; spf=pass (google.com: domain of gleki.is.my.name@gmail.com designates 2a00:1450:400c:c09::22a as permitted sender) smtp.mailfrom=gleki.is.my.name@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: ---- --94eb2c19578e79c461055e90dd74 Content-Type: text/plain; charset="UTF-8" 2017-11-22 14:38 GMT+03:00 Remo Dentato : > On Wed, Nov 22, 2017 at 10:29 AM, Gleki Arxokuna < > gleki.is.my.name@gmail.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. >> > > > 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 > yes,that. > and have to be rewritten to eliminate them whereas PEG do not have this > problem (and hence lack a tool for checking ambiguities). > They simply don't support it since they have priority choice operator that disallows check for ambiguities and requires strict order of subrules. I already checked PEG grammars proposed by BPFK and discovered that changing this operator back to alternation operator leads to lots of ambiguities. So BPFK simply cheated by saying "only the first AST is correct". Since people here are also interested in learnability of Lojban by humans this proposed change of grammar makes it potentially much harder. Who would remember that the rule for lujvo comes after cmavo (or maybe vice versa?). CFG doesn't have this problem. That's only one drawback of PEG in general if we don't delve into specific proposed grammars. > 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 a topic in the > Google Groups "lojban" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/lojban/e94H-wdh5gc/unsubscribe. > To unsubscribe from this group and all its topics, 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. > -- 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. --94eb2c19578e79c461055e90dd74 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


2017-11-22 14:38 GMT+03:00 Remo Dentato <rdentato@gmail.com>= :
On Wed, Nov 22, 201= 7 at 10:29 AM, Gleki Arxokuna <gleki.is.my.name@gmail.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 c= an't be compared to YACC, it's just another class of grammars.

If you want tools resolving ambiguity then having tool= s not more powerful than PEG or CFG is not enough.
<= /blockquote>


Since the absence of = syntactic ambiguity is one of (my) requirement for Lojban, let me understan= d 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 =3D E '+' E | E '-' E | N
N =3D '0' | '1' | ... | '9'
<= div class=3D"gmail_quote">
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 corresponding PEG would be:

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

And there is only parse tree f= or "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 origi= nal packrat algorithm didn't)

CFG grammars need to be checked for ambiguities=

yes,that.
=C2=A0
and have to be rewritten to eliminate them whereas PEG do not have thi= s problem (and hence lack a tool for checking ambiguities).

They simply don't suppor= t it since they have priority choice operator that disallows check for ambi= guities and requires strict order of subrules.

I a= lready checked PEG grammars proposed by BPFK and discovered that changing t= his operator back to alternation operator leads to lots of ambiguities.

So BPFK simply cheated by saying "only the first= AST is correct". Since people here are also interested in learnabilit= y of Lojban by humans this proposed change of grammar makes it potentially = much harder. Who would remember that the rule for lujvo comes after cmavo (= or maybe vice versa?). CFG doesn't have this problem.

That's only one drawback of PEG in general if we don't delv= e into specific proposed grammars.



I do agree that ensuring that a PEG grammar does exactly w= hat 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 a topic in the Goog= le Groups "lojban" group.
To unsubscribe from this topic, visit https://groups.go= ogle.com/d/topic/lojban/e94H-wdh5gc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lojban+un= subscribe@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.

--
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.
--94eb2c19578e79c461055e90dd74--