[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lojban] questions about camxes PEG grammar
- To: lojban@googlegroups.com
- Subject: [lojban] questions about camxes PEG grammar
- From: scope845hlang343jbo@icebubble.org
- Date: Sun, 24 Jan 2021 20:36:01 +0000
- 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
- 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
- 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-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-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-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==
- Delivery-date: Sun, 24 Jan 2021 13:35:39 -0800
- 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==
- Envelope-to: lojban-list-archive@lojban.org
- List-archive: <https://groups.google.com/group/lojba>
- List-help: <https://groups.google.com/support/>, <mailto:lojban+help@googlegroups.com>
- List-id: <lojban.googlegroups.com>
- List-post: <https://groups.google.com/group/lojban/post>, <mailto:lojban@googlegroups.com>
- List-subscribe: <https://groups.google.com/group/lojban/subscribe>, <mailto:lojban+subscribe@googlegroups.com>
- List-unsubscribe: <mailto:googlegroups-manage+1004133512417+unsubscribe@googlegroups.com>, <https://groups.google.com/group/lojban/subscribe>
- Mailing-list: list lojban@googlegroups.com; contact lojban+owners@googlegroups.com
- Reply-to: lojban@googlegroups.com
- Sender: lojban@googlegroups.com
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
"<someword>_clause", "<someword>_pre", "<someword>_post",
"<someword>_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.