Received: from mail-lb0-f186.google.com ([209.85.217.186]:32852) by stodi.digitalkingdom.org with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.80.1) (envelope-from ) id 1YfjOB-0006lf-BQ; Tue, 07 Apr 2015 23:23:09 -0700 Received: by lbio15 with SMTP id o15sf25883965lbi.0; Tue, 07 Apr 2015 23:22:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:in-reply-to:references: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=KMA56LyaXmHYRxpuSZSRezu1GMIBXfTk5z0zRoErIIU=; b=kw7oUbnHW5aEAucIr4jrhXD+kiB6wT5Bp9LePzoF1hM7yegouOUV46HG5IVMe3uL9t PoxciaukwgEIyNluUiUsppRnxm0JinLcoVKpx6UkdOgbgRRe48V2KZqwJSsCaFH5DHX7 joSRzQoslV24o+nsn4zBBCqV4f/HzmKpWT+ltAnfOjcryx0i0ujs4T0wknY93+XIiEvn MOi0a/yuACr1ZLn2l2bhGWP83iKB7iOXfAGq2loDYgsnxsvb24dPGtdqsLrnMbDuPtW+ 1mSt2sP6M5YYb89HSMRHMqFFeWCzqVdr58QVxHE5udaZe/KLkUKj4yxIuKQ1SqAx//Pa bfPw== X-Received: by 10.152.207.44 with SMTP id lt12mr264176lac.42.1428474175833; Tue, 07 Apr 2015 23:22:55 -0700 (PDT) X-BeenThere: bpfk-list@googlegroups.com Received: by 10.152.37.37 with SMTP id v5ls137666laj.31.gmail; Tue, 07 Apr 2015 23:22:55 -0700 (PDT) X-Received: by 10.112.167.131 with SMTP id zo3mr4756715lbb.7.1428474175244; Tue, 07 Apr 2015 23:22:55 -0700 (PDT) Received: from mail-wg0-x232.google.com (mail-wg0-x232.google.com. [2a00:1450:400c:c00::232]) by gmr-mx.google.com with ESMTPS id g5si571220wix.1.2015.04.07.23.22.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Apr 2015 23:22:55 -0700 (PDT) Received-SPF: pass (google.com: domain of gleki.is.my.name@gmail.com designates 2a00:1450:400c:c00::232 as permitted sender) client-ip=2a00:1450:400c:c00::232; Received: by mail-wg0-x232.google.com with SMTP id n8so77177824wgi.0 for ; Tue, 07 Apr 2015 23:22:55 -0700 (PDT) X-Received: by 10.194.21.193 with SMTP id x1mr46251866wje.144.1428474175138; Tue, 07 Apr 2015 23:22:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.240.197 with HTTP; Tue, 7 Apr 2015 23:22:33 -0700 (PDT) In-Reply-To: <1A2E049F0CB84036907C6CAAE5923EE9@gmail.com> References: <1A2E049F0CB84036907C6CAAE5923EE9@gmail.com> From: Gleki Arxokuna Date: Wed, 8 Apr 2015 09:22:33 +0300 Message-ID: Subject: Re: [bpfk] One cannot refer to inner nodes in Lojban PEG To: bpfk-list@googlegroups.com Content-Type: multipart/alternative; boundary=047d7b5d5610c7b1b00513308ff4 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::232 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: - --047d7b5d5610c7b1b00513308ff4 Content-Type: text/plain; charset=UTF-8 2015-04-07 20:18 GMT+03:00 Alex Burka : > I guess I don't follow. If string_1 doesn't want to have all of the > possible string_3 realizations inside, then why does it ask for string_3? > In this example, just use > > string_1 = string_2 / string_6 string_8 > > instead. Can you make a more concrete example? > You can't do that because then you will lose string_3 level. That's what I was talking about in the thread about sumti always having a tag. Similar constructs like BAI term, FA term and bare term must always be at the same level of hierarchy. You shouldn't remove any parent nodes. Unfortunately this is what Lojban PEG currently is in some cases. What specific "actions" differ depending on whether a term contains FA or > BAI? > This is the hierarchy for BAI: terms => terms_1 => terms_2 => abs_term => abs_term_1 => abs_tag_term => tag => tense_modal For FA it must be the same but with FA instead of tense_modal. For bare sumti it must be the same but with FA_elidible instead of tense_modal. > > mu'o mi'e durkavore > > On Tuesday, April 7, 2015 at 4:28 AM, Gleki Arxokuna wrote: > > Consider the following: > string_1 = string_2 / string_6 string_3 > string_3 = string_7 / string_8 > string_4 = !string_1 string_5 > > Now we need !string_1 to work only if string_8 matches, not when string_7 > matches. > Why we might need that? E.g. for terms that can have either FA or BAI > inside. Depending on whether we have FA or BAI inside a term our actions > may differ. > > How can we implement that? > We can just create duplicates of two strings like this: > > string_1 = string_2 / string_6 string_3 > string_1_2 = string_2 / string_6 string_3_2 > string_3 = string_7 / string_8 > string_3_2 = string_8 > string_4 = !string_1_2 string_5 > > Now string_1_2 is the same as string_1 but it is matched only if string_8 > matches (unlike string_1, otherwise they are the same). > > Now the question is how do we avoid such duplication? > > The answer from peg.js developers: > > Sorry, but there is currently no clean way to avoid the duplication. > > In the future I'm thinking about adding support for rule > templates/parametrizable rules, which would help here: > > string_1 = string_2 / string_6 T > string_3 = string_7 / string_8 > string_3_2 = string_8 > string_4 = !string_1 string_5 > > And I think it'd be nice > > > So for now our only chance is to copy paster parts of Lojban PEG if we > want such things. I.e. one would need to split terms into "terms_for_BAI", > "terms_for_FA" etc. with all their inner variables copied. > > -- > 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. > > > -- > 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. > -- 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. --047d7b5d5610c7b1b00513308ff4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


2015-04-07 20:18 GMT+03:00 Alex Burka <durka42@gmail.com>:
I guess I don't follow. If string_1 doesn't wan= t to have all of the possible string_3 realizations inside, then why does i= t ask for string_3? In this example, just use

string_1 =3D string_2 / string_6 = string_8

instead. Can you make a more concrete exa= mple?

You can't do that because t= hen you will lose string_3 level. That's what I was talking about in th= e thread about sumti always having a tag. Similar constructs like BAI term,= FA term and bare term must always be at the same level of hierarchy. You s= houldn't remove any parent nodes. Unfortunately this is what Lojban PEG= currently is in some cases.


What specific "actions" differ depending on whether a= term contains FA or BAI?

This is the= hierarchy for BAI:
terms =3D> terms_1 =3D> terms_2 =3D>= abs_term =3D> abs_term_1 =3D> abs_tag_term =3D> tag =3D> tense= _modal

For FA it must be the same but with FA instead of tense_modal= .
For bare sumti=C2=A0=C2=A0it must be the same but with FA_elidi= ble instead of tense_modal.

=C2=A0

mu'o mi'e durkavore
=20

On Tuesday, April 7, 20= 15 at 4:28 AM, Gleki Arxokuna wrote:

Consider the following:
string_1 =3D string_2 / string_6 st= ring_3
string_3 =3D string_7 / string_8
string_4 =3D !s= tring_1 string_5=C2=A0

Now we need !string_1 to wo= rk only if string_8 matches, not when string_7 matches.
Why we mi= ght need that? E.g. for terms that can have either FA or BAI inside. Depend= ing on whether we have FA or BAI inside a term our actions may differ.

How can we implement that?
We can just creat= e duplicates of two strings like this:

string_1 = =3D string_2 / string_6 string_3
string_1_2 =3D string_2 / string= _6 string_3_2
string_3 =3D string_7 / string_8
string_3= _2 =3D string_8
string_4 =3D !string_1_2 string_5=C2=A0

Now string_1_2 is the same as string_1 but it is matched on= ly if string_8 matches (unlike string_1, otherwise they are the same).

Now the question is how do we avoid such duplication?<= /div>

The answer from peg.js developers:
<q= uote>
Sorry, but there is currently no clean way to avoid the = duplication.

In the future I'm thinking about = adding support for rule templates/parametrizable rules, which would help he= re:

string_1<T> =3D string_2 / string_6 T
string_3 =3D string_7 / string_8
string_3_2 =3D string_8<= /div>
string_4 =3D !string_1<string_3_2> string_5=C2=A0

And I think it'd be nice=C2=A0
</quote>=

So for now our only chance is to copy paster = parts of Lojban PEG if we want such things. I.e. one would need to split te= rms into "terms_for_BAI", "terms_for_FA" etc. with =C2= =A0all their inner variables copied.

--
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 http://groups.google.com/group/bpfk-list.
For more options, visit https://groups.google.com/d/optout.
=20 =20 =20 =20
=20

=20

--
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 http://groups.google.com/group/bpfk-list.
For more options, visit https://groups.google.com/d/optout.

--
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.
--047d7b5d5610c7b1b00513308ff4--