Return-path: Envelope-to: lojban-list-archive@lojban.org Delivery-date: Sun, 24 Jan 2021 13:35:39 -0800 Received: from mail-oi1-f185.google.com ([209.85.167.185]:40680) by stodi.digitalkingdom.org with esmtps (TLS1.3) tls TLS_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1l3n2l-00E760-O2 for lojban-list-archive@lojban.org; Sun, 24 Jan 2021 13:35:39 -0800 Received: by mail-oi1-f185.google.com with SMTP id j17sf893162oig.7 for ; Sun, 24 Jan 2021 13:35:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611524134; cv=pass; d=google.com; s=arc-20160816; b=dx9mCyMJOAQo/zTlyQSnR4p+eorhp0xmIoES9Fbfl2kIbBKeco5d3xM1NOehb6/Eok ctHqg8fAsbR6FWTacNp7QUVz6F1E+sSndtHTHWFsgXSgVraSBKqo9ErwsqsD3zDxKlic nKOmc7VbZrEeCMLetYElDJyURFovGTU3HDvqrGhLiasKoaWPRvOffhMTNO1JzdWf2qFI JewStJOe93CMKV+lkuGZyu1jwbgYT7IdFwuNwSfVb+Db0V1LuMFF87WaIMF7LQ/DSwKK Um7Eu8vVkH/Ftsv3krPe763fO7Bipw8lVt1v0FR4fHG36yFu0eJx0bEdjyNQPBOdbrLE /kZg== 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:mime-version:message-id :date:subject:to:from:sender:dkim-signature; bh=ZEkzBrcxFH9bKOJgjz4DuAjUO4zGT4Xsc28hlyF5j+Y=; b=gcYHr74swcOY5dIMvjm/UlF12q5bVA0zsiVsYUHcEB+dF5Tr0cC1m9pZwC9ouftsxi v0WQN1WFaxfpappqi1s4cX7uX9kVM5uqPhWi6Hsq0D/64O+Ubt+gAwysHOwPApUjvGAg plS1/UBX9fLUyQ3XWaCM7Lik6gndTzS5BIDz56hwofmeys1p8TVWkYsECvHezi7ohjhY tvizTC/ycla4EabK7APNXg0qQNk7+hiAcLJOcke5Ce5yD3byePxSOiNg2EeDW1927mlP /hI5TBd2ml8nBT9WJPMH9Q5vyxHSHyKRXydIStj46BX+639zp3EO5Vpd4vf2xPVmNkBG n1YA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of scope845hlang343jbo@icebubble.org designates 2607:f2f8:a1d8::b19:0:f0b as permitted sender) smtp.mailfrom=scope845hlang343jbo@icebubble.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:subject:date:message-id:mime-version :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=ZEkzBrcxFH9bKOJgjz4DuAjUO4zGT4Xsc28hlyF5j+Y=; b=XAOu8ZWJGdZQ/nI3vaMf8IfpuuOxhaRn/4MtWgd5WENR31xldMUmrUVBPZi/01HaB0 hCHwUxobDY/ZYt0dNKRf/W1B+gDbGBvoNFdLqEwYZJ1vlgcVSDe08lnH3XDykqG8SQOC r/DNfIGNzSHUwVWgLFpQE8qh+gpColwv2lOnQFFUBsElsKvkot3f5MblZHbJlk8jhQxs mELFAT0cGoX2pajkeH9wEqMxAjf2Vy2CEZJhx420JsjaMj8ShEwPLwHwCUJjylOStUtg VQn558roHVeojeaIdF4Mw3FKf+K4Ove9n6IqjvdD9K6LN9LQpT5EPTtrNka6zxaHLGOQ Ydog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:subject:date:message-id :mime-version: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=ZEkzBrcxFH9bKOJgjz4DuAjUO4zGT4Xsc28hlyF5j+Y=; b=Gu8sEBIctsCclJC/IfDtD0gmXyNUhtclPQYkegrH9Pc9zM0EQwV6nGLuhDv80m4b2K sTr5GimAb9906hMfdZgfb/aFS+LZoMR9EWcSJQq8/kYkkqeWVCLR+msZFjtQATJvDD0n itzG5M8eFUaZdVJj4r4S9wgyo5/2ycebVlB7z+9gzjvnzrxUKN1OYcWptgmLK/aSkyv8 G+IhtqHPTcCMgtah80XN31/DXq0cZPnxHHm3zvulnaiCMq39pLCaOSxE5yItBAOjTb0L FTzynzvIhjQ72d8Bf0LURqwug+zAQwxUiW6QG30ll5i0T8ah64WzweSjeGuuXt/ekAKy oEXw== Sender: lojban@googlegroups.com X-Gm-Message-State: AOAM533EG/RJdVjflCuWWx3qqIWdbDBxmTRdxIuk0qz8OsLG/8HyY4yd OyT4HVHy6oSDsABDm/NHLdo= X-Google-Smtp-Source: ABdhPJxe2KBcqcytwQBN5W2HinenbXhBt4xAtmTKEySa3UkKH4v5NeBDChFTQyBkVKe5kcmIpha1Fw== X-Received: by 2002:a9d:2c48:: with SMTP id f66mr9863671otb.239.1611524134533; Sun, 24 Jan 2021 13:35:34 -0800 (PST) X-BeenThere: lojban@googlegroups.com Received: by 2002:a05:6830:1592:: with SMTP id i18ls2181124otr.10.gmail; Sun, 24 Jan 2021 13:35:34 -0800 (PST) X-Received: by 2002:a9d:5e0f:: with SMTP id d15mr6771oti.308.1611524134141; Sun, 24 Jan 2021 13:35:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611524134; cv=none; d=google.com; s=arc-20160816; b=kSKsQH/CrACc/aG6I39h0tKEYoKzM6zw0Xu7bhlHj6j8dhWfC23W3/5lxQU57GihHx p+Lfw/Q4JGco3P/aPvUnd7GT18mqMrF2TV+NdPGnneevtvGMqDslI4U1gOcaLDcwnlOK f2gRWlLeTiQ+k42oiV4sEJtnOvghMos/UDR7jAkPv9a46NI+3zsWZqDzy/vj3mgnGahU Uh0ru5WxtsD+48A7UqXz6btz5ZSIMXurL+5hjbtQJiLWpizT1tEkAtw0xAGrbyTICVrT 1gXdWU09lwSt+5GUoBb8+5QF1TeVgnghLHcSsieQBQeqp4bS6jfn8GkX89ELx7ofK3C3 Tmgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:subject:to:from; bh=aAMya/cH/CTIcKix0yftL8ZJOLKmrCzEZIhXI7EawqQ=; b=vXkf8/uoP8Ut86NDE+NVF7v5MKH7oKRO/iuFhXRwag4Biy+KQkkuiAfz85xoZka3xw Zau5WfpGlsRnI8cK+LB/Rdn372jaCMmtJfBeoYGoOSS7nBKphGt3/0iJ+pSKkqpXqOQ+ cSQu9Ul+vGzQMCGxP9TwZ096v82LAyWxLqoMTUyOotRKJkHd+xqgXMEOhTngjk6aNu9n 4rgCCyxzifaFKbewrIou4JFQjtjDzXDyU1RiPCNtvxVfoGgVjeviCNh1YjjUh4IdavmM 7FTHL8sCVK29cXLw73BTX6tsSQVex+TuOmdTY0x+kiLRhjiQ3tsfFvYJsIc+1Z7+9z7C 150w== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of scope845hlang343jbo@icebubble.org designates 2607:f2f8:a1d8::b19:0:f0b as permitted sender) smtp.mailfrom=scope845hlang343jbo@icebubble.org Received: from icebubble.org (smtp.icebubble.org. [2607:f2f8:a1d8::b19:0:f0b]) by gmr-mx.google.com with ESMTPS id s139si1052092oih.5.2021.01.24.13.35.32 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 24 Jan 2021 13:35:33 -0800 (PST) Received-SPF: pass (google.com: domain of scope845hlang343jbo@icebubble.org designates 2607:f2f8:a1d8::b19:0:f0b as permitted sender) client-ip=2607:f2f8:a1d8::b19:0:f0b; Received: from petunia by icebubble.org with local-bsmtp (Exim 4.76) (envelope-from ) id 1l3n8q-0008Kt-RC for lojban@googlegroups.com; Sun, 24 Jan 2021 21:41:52 +0000 Received: from rusat by cmarib.ramside with local (Exim 4.72) (envelope-from ) id 1l3m77-0001Yx-QZ for lojban@googlegroups.com; Sun, 24 Jan 2021 20:36:01 +0000 From: scope845hlang343jbo@icebubble.org To: lojban@googlegroups.com Subject: [lojban] questions about camxes PEG grammar Date: Sun, 24 Jan 2021 20:36:01 +0000 Message-ID: <86h7n66pji.fsf@cmarib.ramside> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: scope845hlang343jbo@icebubble.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of scope845hlang343jbo@icebubble.org designates 2607:f2f8:a1d8::b19:0:f0b as permitted sender) smtp.mailfrom=scope845hlang343jbo@icebubble.org 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: -2.8 (--) X-Spam_score: -2.8 X-Spam_score_int: -27 X-Spam_bar: -- doi la camxes .a la masatos.xagiuaras .a la gleki .a la ilmen .e zo'e I'm looking at the PEG grammar for Lojban in the repository at https://github.com/lojban/ilmentufa and have some questions... le preti xi pa pi'e pa zo'u: {za'a} The build system is written in Javascript, and doesn't use a traditional build system, i.e. "make". {.uanai} Why? {.e'u} I think the system would be much clearer if it used standard tools like make, sed, awk, and/or diff/patch. Because PEG files are line-oriented, awk would probably be preferable to sed. Most systems that have git (the format of the repository) will already have these tools. Providing the alternative grammars as diffs would probably be ideal, because diffs are easily read and understood by human beings, and can be applied manually, without even needing any extra software at all. (Any text editor would suffice.) If I actually did use the JS script to build the alternative grammars, the next thing I'd do would be to run a diff on them, anyway, to see what changes are made in each of the grammars. So, using diff & patch would seem to be most sensible. le preti xi pa pi'e re zo'u: {za'a} The README.md is rather confusing and written in broken English. {ru'a} Without intending any offense, it appears as if English is not the author's native language. {.e'u} I would be happy to discuss the README, off-list, to figure out what the author means, and help re-work the README to make it clearer and more understandable. le preti xi pa pi'e ci zo'u: {za'a} The .peg files contain a brief description of the syntax of parsing expressions: ... # 3) Concatenation is expressed by juxtaposition with no operator symbol. # 4) / represents *ORDERED* alternation (choice). If the first # option succeeds, the others will never be checked. # 5) ? indicates that the element to the left is optional. # 6) * represents optional repetition of the construct to the left. # 7) + represents one_or_more repetition of the construct to the left. ... {.uanai} However, it does not specify the order of operations or relative precedence of each of the operators. For example, does "a <- b c / d" mean "a <- (b c) / d" or "a <- b (c / d)"? And does "x <- y / z+" mean "x <- (y / z)+" or "x <- y / (z+)"? {ja'o} One can intuit the intended order of operations by reading the file, with a knowledge of Lojban grammar, but {.e'u} more specificity would be helpful. le preti xi re pi'e pa zo'u: {za'a} I noticed that you handle elidible terminators differently in the PEG than in the EBNF. For example, in the EBNF, one of the alternatives for sumti-6_97 is: LI # mex /LOhO#/ But in the PEG, it's: li_clause <- LI_clause free* mex LOhO_elidible free* {ja'o} In the EBNF, the free* are only allowed if the terminator is present. But, in the PEG, it appears that free* can follow an elided terminator. {.uanai} What's the rationale for doing this? How do you determine to which construct the free modifiers apply when the terminator is omitted? le preti xi re pi'e re zo'u: {za'a} There is at least one place in the PEG where the PEG grammar differs from the EBNF (and the YACC). For example: #stag = simple_tense_modal ((jek / joik) simple_tense_modal)* stag <- simple_tense_modal ((jek / joik) simple_tense_modal)* / tense_modal (joik_jek tense_modal)* {ja'o} The PEG rule which would comply with the EBNF grammar is commented-out, and replaced with a rule which allows full "tag"s (i.e., full {fi'o} clauses) anywhere that only simple tags ("stag"s) used to be allowed. This changes (by expanding it) the set of utterances that would represent grammatical Lojban text. {.uanai} What's the rationale for doing this? {.e'u} If the intent is to implement an extension to Lojban's grammar, shouldn't this be split-out into a separate "experimental" PEG, like the others? le preti xi re pi'e ci zo'u: {za'a} The PEG grammar, in several places, uses constructs like: pehe_sa <- PEhE_clause (!PEhE_clause (sa_word / SA_clause !PEhE_clause))* SA_clause cehe_sa <- CEhE_clause (!CEhE_clause (sa_word / SA_clause !CEhE_clause))* SA_clause This is an idiom which appears repeatedly in the PEG, but there is no explanation for what this is doing or why. {.e'u} Some higher-level explanation of how erasure words are handled would be helpful. le preti xi re pi'e vo zo'u: {za'a} The PEG contains many non-terminals of the form "_clause", "_pre", "_post", "_sa", "pre_clause", and "post_clause", but there is no explanation of what this is doing or why. {.e'u} Some higher-level explanation of the conventions used for naming the non-terminals, and how they interact, would be helpful. .i ki'esai fa'o -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/lojban/86h7n66pji.fsf%40cmarib.ramside.