Received: from mail-wg0-f60.google.com ([74.125.82.60]:33665) by stodi.digitalkingdom.org with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.80.1) (envelope-from ) id 1Yf0h6-0000DJ-Ag; Sun, 05 Apr 2015 23:39:37 -0700 Received: by wggz12 with SMTP id z12sf3814090wgg.0; Sun, 05 Apr 2015 23:39:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:from:date:message-id:subject:to:content-type :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :sender:list-subscribe:list-unsubscribe; bh=A+4QQGJ9AFLTHnMRrfdYSTwX7WU77hG1nl6cmtI/5Zc=; b=Gq+b3vNoOIcmIxxQ9bkglh7haNRlJ+OwiB44zCIaerP2TfA3x275iRIE8HvNhb/MyI l0NEyQ/172kqtPltIDCgxUEz9Sc0orvDE2bTe7ZictEI7MWvB8Sg/dArAGYn9WlbRanG qab/U3jISN4wKeGzC8DwPchQV6Veyex4KsYkIeD0B0C0489rrVHO1XbnnO1wtA56u5Q9 pKHpwh/NYbl59MO4o7kMQL1S8K0i+vkLVHvetxVo2ImiLYyGdGz/KQ76wbyCyYnFM6xN qRrxs9z5IY1iaRLj0NtbBVv5QgJfPOBnHYFrl7ttNcMk73knMRy8KWNFSwXYaVI5EyC3 TRWg== X-Received: by 10.152.30.71 with SMTP id q7mr119959lah.27.1428302369636; Sun, 05 Apr 2015 23:39:29 -0700 (PDT) X-BeenThere: bpfk-list@googlegroups.com Received: by 10.152.6.200 with SMTP id d8ls476510laa.34.gmail; Sun, 05 Apr 2015 23:39:29 -0700 (PDT) X-Received: by 10.112.142.1 with SMTP id rs1mr2744950lbb.19.1428302369148; Sun, 05 Apr 2015 23:39:29 -0700 (PDT) Received: from mail-wg0-x233.google.com (mail-wg0-x233.google.com. [2a00:1450:400c:c00::233]) by gmr-mx.google.com with ESMTPS id na10si202903wic.0.2015.04.05.23.39.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Apr 2015 23:39:29 -0700 (PDT) Received-SPF: pass (google.com: domain of gleki.is.my.name@gmail.com designates 2a00:1450:400c:c00::233 as permitted sender) client-ip=2a00:1450:400c:c00::233; Received: by mail-wg0-x233.google.com with SMTP id a20so19602521wgr.3 for ; Sun, 05 Apr 2015 23:39:29 -0700 (PDT) X-Received: by 10.194.159.105 with SMTP id xb9mr28309185wjb.156.1428302369038; Sun, 05 Apr 2015 23:39:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.240.197 with HTTP; Sun, 5 Apr 2015 23:39:06 -0700 (PDT) From: Gleki Arxokuna Date: Mon, 6 Apr 2015 09:39:06 +0300 Message-ID: Subject: [bpfk] Does Lojban PEG need a "naughty OR" operator? To: bpfk-list@googlegroups.com Content-Type: multipart/alternative; boundary=001a11c3aa5856a7eb0513088f88 X-Original-Sender: gleki.is.my.name@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of gleki.is.my.name@gmail.com designates 2a00:1450:400c:c00::233 as permitted sender) smtp.mail=gleki.is.my.name@gmail.com; dkim=pass header.i=@gmail.com; dmarc=pass (p=NONE dis=NONE) header.from=gmail.com Reply-To: bpfk-list@googlegroups.com Precedence: list Mailing-list: list bpfk-list@googlegroups.com; contact bpfk-list+owners@googlegroups.com List-ID: X-Google-Group-Id: 972099695765 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Score: -1.7 (-) X-Spam_score: -1.7 X-Spam_score_int: -16 X-Spam_bar: - Content-Length: 4850 --001a11c3aa5856a7eb0513088f88 Content-Type: text/plain; charset=UTF-8 There is a language.js PEG library that adds a new " % " operator ("naughty OR") used only if the parse completely fails. This " % " can be used to show all errors in the tree. Finding the first error doesn't stop the tree from being generated. language.js seems to be an abandonware whereas PEG.js which camxes.js is based upon is an actively developed library. The authors of PEG.js once were asked if " % "could be implemented in PEG.js. The reply was that it's not clearly understandable how it can be better than the already existing " / { ... }" in PEG.js. [ https://github.com/pegjs/pegjs/issues/145 ] I doubt too whether we really need naughty OR. " / { ... }" is what xorxes and I have been doing for the last weeks and the goal was exactly to continue parsing the tree if something is omitted. This allowed e.g. parsing "mi djica lo nu lo plise" which in the official grammar was invalid. " / " is a prioritized choice operator " { ... } " are parser actions that send desired javascript actions to the output and thus generate the syntax tree among other things. E.g. I proposed adding " / COhE_elidible" where COhE_elidible returns a " { ... } " expression. So instead of one error message we get numerous "autorestored" nodes instead of just one error message "your parse failed". So unless anyone explains why naughty OR is better than what has been done I will continue to think that PEG.js is fine and more such " / {...} " improvements are needed. -- You received this message because you are subscribed to the Google Groups "BPFK" group. To unsubscribe from this group and stop receiving emails from it, send an email to bpfk-list+unsubscribe@googlegroups.com. To post to this group, send email to bpfk-list@googlegroups.com. Visit this group at http://groups.google.com/group/bpfk-list. For more options, visit https://groups.google.com/d/optout. --001a11c3aa5856a7eb0513088f88 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
There is a language.js=C2=A0PEG library that adds a new " % " operator = ("naughty OR") used only if the parse completely fails.
This = " % " can be used to show all errors in the tree. Finding the fir= st error doesn't stop the tree from being generated.

language.js seems to be an abandonware whereas PEG.js which camxes.j= s is based upon is an actively developed library.

= The authors of PEG.js once were asked if " % "could be implemente= d in PEG.js. The reply was that it's not clearly understandable how it = can be better than the already existing " / { ... }" in PEG.js. [= =C2=A0https://github.= com/pegjs/pegjs/issues/145 ]

I doubt too wheth= er we really need naughty OR. " / { ... }" is what xorxes and I h= ave been doing for the last weeks and the goal was exactly to continue pars= ing the tree if something is omitted. This allowed e.g. parsing=C2=A0
=
"mi djica lo nu lo plise" which in the official grammar was = invalid.

" / " is a prioritized choice o= perator
" { ... } " are parser actions that send desire= d javascript actions to the output and thus generate the syntax tree among = other things.

E.g. I proposed adding " / COhE= _elidible" where=C2=A0COhE_elidible returns a " { ... } " ex= pression.

So instead of one error message we get n= umerous "autorestored" nodes instead of just one error message &q= uot;your parse failed".

So unless anyone expl= ains why naughty OR is better than what has been done I will continue to th= ink that PEG.js is fine and more such " / {...} " improvements ar= e needed.

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