Received: from mail-lb0-f186.google.com ([209.85.217.186]:33826) by stodi.digitalkingdom.org with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.80.1) (envelope-from ) id 1Yam4K-0000HM-Hd; Wed, 25 Mar 2015 07:14:11 -0700 Received: by lbdu14 with SMTP id u14sf5972429lbd.1; Wed, 25 Mar 2015 07:13:57 -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=sZqG89yDm3lgKdCKO61DSpst66l8v4h8ymPnQ1zKoaU=; b=HzsNb5bAwqdFl84sxzd4HXBIVOTiR1lwlSnD8HUA/3DfcaWmg1Ic/OgK5MZtXna/Rc 1uFw1OYlLBR/IkEdGQRjmKWWy/bkESOkSTF2fNFPThnlf2r/rSyRlL6NkfyvRMg77tkz SV1JYBPrBc3tgKeYDVKuxrGGOzf+wcQmY/+WAcVcJc9dgP27fUu+Hegab1P05nABke2i UtqaYrJUSHvaUXobfYzEVQVmCs6xlcOLRbD5k6zxP0byCN/GrnHLCvMMxtKyM7jSCKp8 Hc4X2ng9XW1SPDWBhudV4DIE1HhvcvYO/979GloSefOxg7TlAMkcTB+f6i9f89+jjWK0 fjlQ== X-Received: by 10.152.8.229 with SMTP id u5mr142518laa.12.1427292837463; Wed, 25 Mar 2015 07:13:57 -0700 (PDT) X-BeenThere: bpfk-list@googlegroups.com Received: by 10.152.7.206 with SMTP id l14ls96458laa.66.gmail; Wed, 25 Mar 2015 07:13:56 -0700 (PDT) X-Received: by 10.152.164.171 with SMTP id yr11mr2135265lab.4.1427292836964; Wed, 25 Mar 2015 07:13:56 -0700 (PDT) Received: from mail-wg0-x22d.google.com (mail-wg0-x22d.google.com. [2a00:1450:400c:c00::22d]) by gmr-mx.google.com with ESMTPS id bz6si929851wib.3.2015.03.25.07.13.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Mar 2015 07:13:56 -0700 (PDT) Received-SPF: pass (google.com: domain of gleki.is.my.name@gmail.com designates 2a00:1450:400c:c00::22d as permitted sender) client-ip=2a00:1450:400c:c00::22d; Received: by mail-wg0-x22d.google.com with SMTP id m6so29083927wgd.2 for ; Wed, 25 Mar 2015 07:13:56 -0700 (PDT) X-Received: by 10.180.89.34 with SMTP id bl2mr38840162wib.23.1427292835785; Wed, 25 Mar 2015 07:13:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.240.197 with HTTP; Wed, 25 Mar 2015 07:13:35 -0700 (PDT) From: Gleki Arxokuna Date: Wed, 25 Mar 2015 17:13:35 +0300 Message-ID: Subject: [bpfk] Fighting copy-pasting in PEG To: bpfk-list@googlegroups.com Content-Type: multipart/alternative; boundary=f46d04447e7b77b91505121d82af 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::22d 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: - --f46d04447e7b77b91505121d82af Content-Type: text/plain; charset=UTF-8 I notice that a lot of combinations are "hardcoded" in PEG. E.g. a lot of constructs are followed by "free*" several times in the grammar where the first part of the construct remains the same. Here is an experimental grammar: https://raw.githubusercontent.com/Ilmen-vodhr/ilmentufa/master/camxes-exp.js.peg And here are the stats: http://pastebin.com/raw.php?i=ADTJ0KdT Here, "KE_clause free*" is used 11 times in PEG and even when "free*" doesn't follow KE_clause it could. Why not move "free*" into KE_clause itself ? This would make the grammar easier. "free*" is used ~200 times in the grammar. I'm sure this number can be lowered significantly. Anyone is interested in joining such constructs into new variables? -- 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. --f46d04447e7b77b91505121d82af Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I notice that a lot of combinations are "hardcod= ed" in PEG.
E.g. a lot of constructs are followed by "f= ree*" several times in the grammar where the first part of the constru= ct remains the same.

Here is an experimental gramm= ar:
<= br>
And here are the stats:
http://pastebin.com/raw.php?i=3DADTJ= 0KdT

Here, "KE_clause free*" is used <= span style=3D"white-space:pre-wrap">11 times in PEG and even when "fre= e*" doesn't follow=C2=A0KE_clause it could.
Why not move "free*" into KE_clause itself ? This would make the= grammar easier.

=
"free*" is= used ~200 times in the grammar. I'm sure this number can be lowered si= gnificantly.

Anyone is interested in = joining such constructs into new variables?

--
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.
--f46d04447e7b77b91505121d82af--