[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lojban] any-word-SA-handling clarification
On Wed, Jan 12, 2011 at 07:44:19PM -0300, Jorge Llambías wrote:
> On Wed, Jan 12, 2011 at 3:49 PM, Robin Lee Powell
> <rlpowell@digitalkingdom.org> wrote:
> > On Wed, Jan 12, 2011 at 07:11:24AM -0700, .alyn.post. wrote:
> >> The Lojban PEG grammar has the following production:
> >>
> >> any-word-SA-handling <- BRIVLA-pre
> >> / known-cmavo-SA
> >> / !known-cmavo-pre
> >> CMAVO-pre
> >> / CMENE-pre
> >>
> >> This is the only production which uses known-cmavo-SA,
> >> known-cmavo-pre, and CMAVO-pre. I'm trying to determine how these
> >> productions interact, but these rules intersect the morphology
> >> interface in camxes, and I would appreciate help understanding
> >> them.
> >
> > Good luck. -_-
> >
> > The *goal* is to match
> > http://www.lojban.org/tiki/tiki-index.php?page=Magic+Words , IIRC.
> > It's really complicated.
> >
> > The design there is to match any word, but also to slurp SA clauses.
> > SA, as used there, only affects cmavo; [selma'o] ... SA [same
> > selma'o] == one cmavo of that selma'o.
>
> That was your original version, but then you changed it. Now SA does
> something different, it doesn't just look at the selma'o of the
> following word, but at a whole following structure. Either way it's a
> big mess. We really should think seriously about SA at some point, and
> either make something sensible with it or just drop it. It's no wonder
> that anyone will be confused by rules that have to do with SA because
> they were written for one version and then sort of adapted to
> something else. I believe Alan is correct that the current
> any-word-SA-handling rule contains unnecessary fluff for the current
> version.
>
Robin,
I've attached a patch that removes *most* of the commented-out
productions in the lojban.peg file you've checked into github.
This patch removes the commented-out rules having to do with SA
handling, and in one sense can be seen as a continuation of removing
the *-no-SA-handling in the PEG grammar.
I'm not at the point yet where I'm testing SA, so I don't really
know if these rules work better than the ones that aren't commented
out. camxes is using the not-these, however. Can they go?
-Alan
--
.i ko djuno fi le do sevzi
--
You received this message because you are subscribed to the Google Groups "lojban" group.
To post to this group, send email to lojban@googlegroups.com.
To unsubscribe from this group, send email to lojban+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/lojban?hl=en.
--- lojban.peg.orig Wed Jan 12 08:05:13 2011
+++ lojban.peg Wed Jan 12 08:10:07 2011
@@ -27,7 +27,6 @@
intro-null <- spaces? su-clause* intro-si-clause
text-part-2 <- (CMENE-clause+ / indicators?) free*
-;; SPACE intro-sa-clause <- SA-clause+ / any-word-SA-handling !(ZEI-clause SA-clause) intro-sa-clause
SPACE intro-si-clause <- si-clause? SI-clause*
SPACE faho-clause <- (FAhO-clause dot-star)?
@@ -52,8 +51,6 @@
prenex <- terms ZOhU-clause free*
-;; sentence <- (terms CU-clause? free*)? bridi-tail / bridi-tail
-
sentence <- (terms bridi-tail-sa* CU-clause? free*)? bridi-tail-sa* bridi-tail
SPACE sentence-sa <- sentence-start (!sentence-start (sa-word / SA-clause !sentence-start ) )* SA-clause &text-1
@@ -80,10 +77,6 @@
terms <- terms-1+
-;; terms-1 <- terms-2 (PEhE-clause free* joik-jek terms-2)*
-
-;; terms-2 <- term (CEhE-clause free* term)*
-
terms-1 <- terms-2 (pehe-sa* PEhE-clause free* joik-jek terms-2)*
terms-2 <- term (cehe-sa* CEhE-clause free* term)*
@@ -92,8 +85,6 @@
SPACE cehe-sa <- CEhE-clause (!CEhE-clause (sa-word / SA-clause !CEhE-clause))* SA-clause
-;;term <- sumti / ( !gek (tag / FA-clause free*) (sumti / KU-clause? free*) ) / termset / NA-clause KU-clause free*
-
term <- term-sa* term-1
term-1 <- sumti / ( !gek (tag / FA-clause free*) (sumti / KU-clause? free*) ) / termset / NA-clause KU-clause free*
@@ -130,8 +121,6 @@
relative-clauses <- relative-clause (ZIhE-clause free* relative-clause)*
-;; relative-clause <- GOI-clause free* term GEhU-clause? free* / NOI-clause free* subsentence KUhO-clause? free*
-
relative-clause <- relative-clause-sa* relative-clause-1
SPACE relative-clause-sa <- relative-clause-start (!relative-clause-start (sa-word / SA-clause !relative-clause-start ) )* SA-clause &relative-clause-1
@@ -171,8 +160,6 @@
linkargs-start <- BE-clause
-;; links <- BEI-clause free* term links?
-
links <- links-sa* links-1
links-1 <- BEI-clause free* term links?
@@ -183,8 +170,6 @@
quantifier <- number !MOI-clause BOI-clause? free* / VEI-clause free* mex VEhO-clause? free*
-;;mex <- mex-1 (operator mex-1)* / rp-clause
-
mex <- mex-sa* mex-0
mex-0 <- mex-1 (operator mex-1)* / rp-clause
@@ -213,8 +198,6 @@
rp-expression <- operand rp-expression-tail
rp-expression-tail <- rp-expression operator rp-expression-tail / ()
-;; operator <- operator-1 (joik-jek operator-1 / joik stag? KE-clause free* operator KEhE-clause? free*)*
-
operator <- operator-sa* operator-0
operator-0 <- operator-1 (joik-jek operator-1 / joik stag? KE-clause free* operator KEhE-clause? free*)*
@@ -229,8 +212,6 @@
mex-operator <- SE-clause free* mex-operator / NAhE-clause free* mex-operator / MAhO-clause free* mex TEhU-clause? free* / NAhU-clause free* selbri TEhU-clause? free* / VUhU-clause free*
-;; operand <- operand-1 (joik-ek stag? KE-clause free* operand KEhE-clause? free*)?
-
operand <- operand-sa* operand-0
operand-0 <- operand-1 (joik-ek stag? KE-clause free* operand KEhE-clause? free*)?
@@ -254,7 +235,6 @@
ek <- NA-clause? SE-clause? A-clause NAI-clause?
-;; gihek <- NA-clause? SE-clause? GIhA-clause NAI-clause?
gihek <- gihek-sa* gihek-1
gihek-1 <- NA-clause? SE-clause? GIhA-clause NAI-clause?
@@ -267,7 +247,6 @@
interval <- SE-clause? BIhI-clause NAI-clause?
-;; joik-ek <- joik free* / ek free*
joik-ek <- joik-ek-sa* joik-ek-1
joik-ek-1 <- (joik free* / ek free*)