History: Magic Words

Preview of version: 3

This document was originated to provide a clearing house for discussion related to the BPFK Magic Words checkpoint, as well as a place safer than /tmp to store my ongoing description of the magic word interactions, which here follows.

Magic words are all cmavo that interact directly with the nature of the speech stream, so SI SA SU ZO ZOI LOhU LEhU ZEI BU BAhE FAhO.

The two documents that were used to construct this page are grammar.300 (which is a plain text document, and really should be renamed to have .txt after it) and RefGram Chapter 19, section 16.

It is worth noting that these two documents contradict each other on many points. In particular, the order of operations is substantially different (grammar.300 handles zoi before lo'u...le'u, for example).

Outstanding Questions

  • Is nested lo'u...le'u allowed?
  • Does zoi function in lo'u...le'u?

Magic Words Handling


(based on C16 S19 of the RefGram)

In order of precedence. selma'o names used throughout. + means "a member of the selma'o to the left of the + followed immediately by a member of the selma'o to the right of the + (ignoring words taken out of the equation by previous steps)". For example, "ZO+LEhU" means a string like "zo le'u" (since both of these are currently (6 Nov 2004) single member selma'o).

  1. Y is completely ignored (i.e. considered whitespace) except before BU.
  2. ZO quotes the following word, no matter what it is, except Y. Words quoted with ZO lose their grammatical functions.
  3. FAhO terminates the word or text stream unequivocably, unless quoted with ZO.
  4. LOhU quotes all following Lojban words up to a LEhU (but not a ZO+LEhU; this is to allow nested LOhU...LEhU quotes inside a LOhU...LEhU, so you can talk about mistakes you made that include a previous error quote). Except for the ZO+LEhU case (which should be read as simply LEhU inside a LOhU...LEhU quote) all Lojban words within a LOhU...LEhU quote are read without any grammar and have no grammatical effects.
  5. LEhU is ungrammatical except at the end of a LOhU quotation and after ZO.
  6. SI erases the preceding word unless it is a ZO. Y is ignored.
  7. SA erases the preceding word and other words, unless the preceding word is a ZO. SA erases back until it sees a word of the same selma'o as the word that follows SA. The previous same-selma'o word is itself erased. Y is ignored for selma'o matching purposes.
  8. SU erases itself and all words back to the beginning of the current conversation for the speaker that says it. If spoken twice, it also erases the other speaker's words. In computer input cases SU, in general, erases itself and all words to the beginning of the input (as most computer input cases cannot distinguish between speakers).
  9. ZOI cmavo use the following word as a delimiting word, no matter what it is (except Y), but using LEhU may create difficulties (IF ZOI IS ALLOWED TO FUNCTION IN LEhU, which is still under discussion).
  10. ZEI combines the preceding and the following word into a lujvo, but does not affect SI, SA, SU, ZO, ZOI, LOhU, ZEI, Y and FAhO.
  11. BAhE marks the following word, unless it is SI, SA or SU (in which case the eraser erases the BAhE, possibly along with other things in the case of SA and SU), or unless it is preceded by ZO (in which case the BAhE itself is quoted by ZO, and loses its special effect). Multiple BAhE cmavo may be used in succession, in which case they all affect the next non-BAhE word.
  12. BU makes the preceding word into a lerfu word, except for SI, SA, SU, ZO, ZOI, LOhU, ZEI, BU, BAhE, and FAhO. Note that Y is specifically included. Multiple BU may be used in succession, in which case a new letteral is formed for each additional BU (i.e. "broda bu" is a different letteral from "broda bu bu").
  13. UI and CAI cmavo mark the previous word, except for SI, SA, SU, ZO, ZOI, LOhU, ZEI, BU, BAhE, Y and FAhO. Multiple UI cmavo may be used in succession. A following NAI is made part of the UI.
  14. DAhO, FUhE, and FUhO are the same as UI, but do not absorb a following NAI.

Special SI and SA Cases


SI gets very complicated in a few cases, so here we go. Some SA notes here too.

  • SI has no effect inside LOhU...LEhU or after ZO (or inside a ZOI quote, of course).
  • SA+any word+SI == nothing
  • ZO+any word+SI == ZO
  • ZO+any word+SI+SI == nothing
  • SI has no effect in a LOhU...LEhU even though ZO+LEhU does, so you can't do ZO+LEhU+SI+SI inside a LOhU...LEhU quote to get nothing.
  • A SI immediately after the terminating LEhU of a LOhU...LEhU quote erases the LEhU, opening up the quote again. A string of SI in that position keeps erasing through the quote, possibly destroying it entirely (although SA+LOhU+SI is normally a much better way of accomplishing this goal). As soon as a non-SI word interrupts the string of SI after the terminating LEhU, that word and all other words until the next unquoted LEhU are considered part of the quote again, and have no grammatical function.
  • SA can destroy LOhU...LEhU quotes, of course. LOhU...LEhU+SA+LOhU, in particular, is exactly equivalent to just LOhU (hence, the quote is re-opened). SA cannot erase to any other word in a LOhU...LEhU quote (because they are not considered part of any selma'o) except for ZO if a ZO+LEhU quote is used inside the LOhU...LEhU quote (because the ZO is used grammatically in this case, and hence has a selma'o in practice).
  • SI can back into a ZOI quote in the same manner as into a LOhU...LEhU quote, except that all of the quoted non-Lojban text (which is considered non-Lojban text even if it clearly is) is treated as one word. So:
    • ZOI+delimiter+text+delimiter+SI == ZOI+delimiter+text
    • ZOI+delimiter+text+delimiter+SI+SI == ZOI+delimiter
    • ZOI+delimiter+text+delimiter+SI+SI+SI == ZOI
    • ZOI+delimiter+text+delimiter+SI+SI+SI+SI == nothing
  • As a result of the above, if you really want to destroy a whole ZOI quote, SA+ZOI+SI is strongly reccomended.

grammar.300 stuff


Deleting bits as I integrate them into the list above.

Step 2 - Filtering

From start to end, performing the following filtering and lexing tasks
using the given order of precedence in case of conflict:

a. If the Lojban word "zoi" (selma'o ZOI) is identified, take the
following Lojban word (which should be end delimited with a pause for
separation from the following non-Lojban text) as an opening delimiter.
Treat all text following that delimiter, until that delimiter recurs
*after a pause*, as grammatically a single token (labelled 'anything_699'
in this grammar). There is no need for processing within this text
except as necessary to find the closing delimiter.

Please not that since this is the very first rule, grammar.300 allows ZOI quotes in LOhU...LEhU, which the Red Book seems to disagree with.

e. If the word "si" (selma'o SI) is identified, erase it and the
previous word (or token, if the previous text has been condensed into a
single token by one of the above rules).

f. If the word "sa" (selma'o SA) is identified, erase it and all
preceding text as far back as necessary to make what follows attach to
what precedes. (This rule is hard to formalize and may receive further
definition later.)

g. If the word 'su' (selma'o SU) is identified, erase it and all
preceding text back to and including the first preceding token word
which is in one of the selma'o: NIhO, LU, TUhE, and TO. However, if
speaker identification is available, a SU shall only erase to the
beginning of a speaker's discourse, unless it occurs at the beginning of
a speaker's discourse. (Thus, if the speaker has said something, two
"su"'s are required to erase the entire conversation.


Step 3 - Termination

If the text contains a FAhO, treat that as the end-of-text and ignore
everything that follows it.


Step 4 - Absorption of Grammar-Free Tokens

In a new pass, perform the following absorptions (absorption means that
the token is removed from the grammar for processing in following steps,
and optionally reinserted, grouped with the absorbing token after
parsing is completed).

a. Token sequences of the form any - (ZEI - any) ..., where there may be
any number of ZEIs, are merged into a single token of selma'o BRIVLA.

b. Absorb all selma'o BAhE tokens into the following token. If
they occur at the end of text, leave them alone (they are errors).

c. Absorb all selma'o BU tokens into the previous token. Relabel the
previous token as selma'o BY.

d. If selma'o NAI occurs immediately following any of tokens UI or CAI,
absorb the NAI into the previous token.

e. Absorb all members of selma'o DAhO, FUhO, FUhE, UI, Y, and CAI
into the previous token. All of these null grammar tokens are permitted
following any word of the grammar, without interfering with that word's
grammatical function, or causing any effect on the grammatical
interpretation of any other token in the text. Indicators at the
beginning of text are explicitly handled by the grammar.

History

Advanced
Information Version
Thu 28 of Aug, 2014 02:13 GMT durka42 from 69.249.31.89 semicolons are awesome 47
Thu 28 of Aug, 2014 02:02 GMT durka42 from 69.249.31.89 typo 46
Sun 15 of Jun, 2014 18:40 GMT durka42 from 50.77.84.234 add weasel word to BAhE note, and demote LEhU to magic word assistant 45
Sun 08 of Jun, 2014 19:18 GMT mukti from 216.194.27.154 44
Thu 05 of Jun, 2014 12:17 GMT mukti from 68.173.146.212 Ask for clarification 43
Sun 01 of Jun, 2014 21:20 GMT mukti from 68.173.146.212 SA erasure depends on following word, so "SA+brivla", not "brivla+SA" 42
Wed 09 of Feb, 2011 17:28 GMT alyn.post from 68.35.165.60 We're not savages around here, put magic words in alphabetical order. 41
Wed 09 of Feb, 2011 17:24 GMT alyn.post from 68.35.165.60 de-link controversial 40
Wed 09 of Feb, 2011 17:24 GMT alyn.post from 68.35.165.60 WTF zei. 39
Wed 09 of Feb, 2011 17:22 GMT alyn.post from 68.35.165.60 describe interesting interaction between le'u/bu and sa/si/su 38
Wed 09 of Feb, 2011 15:57 GMT alyn.post from 68.35.165.60 document unique cases. I'm not sure these behaviors are worth keeping, but here they are until then. 37
Wed 09 of Feb, 2011 14:14 GMT alyn.post from 68.35.165.60 This rule doesn't quite describe the desired behavior, remove it until I can express precedence and associativity of Magic Words. 36
Tue 08 of Feb, 2011 18:00 GMT alyn.post from 173.10.243.253 Create a main article for each magic word. 35
Mon 07 of Feb, 2011 17:52 GMT alyn.post from 173.10.243.253 Add an additional meta rule: pseudo word construction happens before right binding. 34
Mon 07 of Feb, 2011 13:24 GMT alyn.post from 69.96.208.86 .i zo bu se sreci'a .i zo by drani ki'e xorxes 33
Thu 03 of Feb, 2011 15:57 GMT alyn.post from 68.35.165.60 also describe FAhO + SU/SA/SI 32
Tue 01 of Feb, 2011 21:05 GMT alyn.post from 68.35.165.60 minor terminology corrections. 31
Tue 01 of Feb, 2011 20:55 GMT alyn.post from 68.35.165.60 note that zoi delimiters cannot be elided. 30
Tue 01 of Feb, 2011 17:50 GMT alyn.post from 68.35.165.60 A few clarifications and minor errata changes to SI, SA, and FAhO. 29
Thu 13 of Jan, 2011 20:51 GMT alyn.post from 173.10.243.253 clarify BAhE handling. 28
Fri 14 of May, 2010 06:15 GMT purpleposeidon from 99.91.40.55 fa'o notes 27
Mon 06 of Dec, 2004 19:49 GMT rlpowell from 64.241.242.18 26
Fri 26 of Nov, 2004 22:23 GMT rlpowell from 64.81.49.171 25
Thu 25 of Nov, 2004 17:57 GMT arj from 129.241.222.49 Added terminology section. rlpowell, please revert and move to another page if this is your turf. 24
Thu 25 of Nov, 2004 05:57 GMT rlpowell from 64.81.49.171 23
Mon 15 of Nov, 2004 05:09 GMT rlpowell from 64.81.49.171 22
Mon 15 of Nov, 2004 02:34 GMT rlpowell from 64.81.49.171 21
Mon 15 of Nov, 2004 00:26 GMT rlpowell from 64.81.49.171 20
Sun 14 of Nov, 2004 04:11 GMT rlpowell from 64.81.49.171 19
Sun 14 of Nov, 2004 00:26 GMT rlpowell from 64.81.49.171 18
Sun 14 of Nov, 2004 00:01 GMT rlpowell from 64.81.49.171 17
Sat 13 of Nov, 2004 23:46 GMT rlpowell from 64.81.49.171 16
Tue 09 of Nov, 2004 23:06 GMT rlpowell from 198.6.50.155 15
Tue 09 of Nov, 2004 20:58 GMT rlpowell from 198.6.50.155 14
Tue 09 of Nov, 2004 19:36 GMT xorxes from 200.49.74.2 13
Sun 07 of Nov, 2004 06:39 GMT rlpowell from 64.81.49.171 12
Sun 07 of Nov, 2004 06:10 GMT rlpowell from 64.81.49.171 11
Sun 07 of Nov, 2004 05:54 GMT rlpowell from 64.81.49.171 10
Sun 07 of Nov, 2004 05:45 GMT rlpowell from 64.81.49.171 9
Sun 07 of Nov, 2004 05:19 GMT rlpowell from 64.81.49.171 8
Sun 07 of Nov, 2004 04:51 GMT rlpowell from 64.81.49.171 7
Sun 07 of Nov, 2004 02:24 GMT rlpowell from 64.81.49.171 6
Sun 07 of Nov, 2004 02:13 GMT rlpowell from 64.81.49.171 5
Sun 07 of Nov, 2004 00:37 GMT rlpowell from 64.81.49.171 4
Sun 07 of Nov, 2004 00:04 GMT rlpowell from 64.81.49.171 3
Sat 06 of Nov, 2004 23:28 GMT rlpowell from 64.81.49.171 2
Sat 06 of Nov, 2004 22:53 GMT rlpowell from 64.81.49.171 1
Show PHP error messages