History: Magic Words

Preview of version: 17

This pages is based on me collecting what I thought was the best options out of Magic Words Alternatives. The core is Cowan's version, which in turn uses xorxes' LTR processing idea.

Magic Words


Magic words are all cmavo that have some interaction with words as words irrespective of the function of those words. These are SI SA SU ZO ZOI LOhU LEhU ZEI BU and FAhO. (BAhE, even though it can modify any word, is not a magic word, because it doesn't affect the function of the word it modifies).

Many magic words convert the words they affect into a member of the special grammatical classes any-word and any-string. A member of one of these special grammatical classes has no selma'o for purposes of the rest of the Lojban grammar.

Meta-Rules

  1. Y+BU (i.e. ".y. bu") is considered a single word of selma'o BU. This conversion is done before any other processing of any kind.
  2. Magic words are processed left-to-right.
  3. Y is not a word (i.e. it is considered whitespace) for the purposes of these definitions.

Mini-Definitions

  1. ZO binds with the following word. The combination is considered a single word of the pseudo selma'o any-word, except for SA matching purposes, where it retains the selma'o ZO.
  2. LOhU turns all following Lojban words up to but not including a LEhU into words of the pseudo selma'o any-word.
  3. LEhU terminates a LOhU-quote. It is never elidable.
  4. ZEI binds with the preceding word and the following word. The combination is considered a single brivla (i.e. it is treated as just one word).
  5. BU binds with the preceding word. The combination is considered a single word of selma'o BY.
  6. ZOI uses the following word as a delimiting word and binds with it and further text until the same word is repeated, inclusive of both delimiters. Both delimiter words lose their grammatical function. The combination is considered a single word of the pseudo selma'o any-string, except for SA matching purposes, where it retains the selma'o ZOI.
  7. SI erases the preceding word. The construct becomes invisible to the rest of the text.
  8. SA erases the preceding text back until it sees a word of the same selma'o as the word that follows SA, which replaces it. Words whose selma'o has been changed to any-word or any-string are invisible to SA for purposes to decided what to erase; they are erased as any other word would be. If a word of the same selma'o is not found (which will always be the case with SI and SU), it erases back to the beginning of text.
  9. SU erases all words back to the beginning of text. The construct becomes invisible to the rest of the text.
  10. FAhO terminates the text, absorbing preceding words until the remaining text is grammatical.

Marking Words

  • BAhE binds with and marks the following word but does not change its nature. The construct behaves just as the morked word by itself. The two words are considered distinct for SA matching purposes, however.
  • Attitudinals (UI and CAI cmavo) mark the previous word, quoted word, LOhU-quote, ZEI-lujvo, lerfu word, or ZOI-phrase, but do not change its nature. Attitudinals do not blend into a single word with the word they modify, but remain as separate words for the purposes of magic words that come after them.
  • DAhO, FUhE, and FUhO are the same as UI, but do not absorb a following NAI.

Examples

Subject Phrase Result
broda .y. bu The letter broda
zoi si stuff si "stuff"
da zoi sa da joi de Unclosed zoi
da zei fa'o Lujvo of da and fa'o
lo'u co co zo le'u co le'u Error ("co le'u" outside of quotes)
zoi si doi do Uclosed zoi
zo da si Nothing
zo da si si Error (too many si)
da zei de bu Letter da type of de
bu zei de Error (nothing for bu to use)
zo bu zei de "bu" type-of de
broda zei brode si brodi brodi
zei zei zei Error
da zei zei da type-of zei
lo'u co co co le'u bu The letter "co co co"
lo'u co co co le'u si bo le'u Error (bare bo)
broda ba'e si nothing (but emphatically!)
broda ba'e da si da broda da
zo da bu The letter "da"
zoi zoi That letter that you use between a user id and a host name in an e-mail address zoi bu @
broda brode si bu The letter broda
zoi zoi stuff zoi si Nothing
zoi zoi lots of stuff zoi si si si si Error (too many si)
zoi zoi lots of stuff zoi sa zoi si Open zoi


Ignore everything past the bar below, please.

--

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).
  • Multiple SI erase back through more words, rather than operating on themselves or something. Duh.
  • SI is valid at the beginning of input, but only to deal with the fact computer parsing is often done line by line, and two lines can be from the same speaker (e.g. "mi broda co" followed later by "si do").
  • SA+SI == nothing.
  • SU+SI == nothing.
  • SA+any word (except ZO)+SI == nothing (assuming that the SA is valid, i.e. that there is a word of the same selma'o as the word after SA to erase back to). For ZO you need two SI.
    • Not quite true; doesn't work for ZO or (probably) ZOI.
  • 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.
  • ZOI+SI == nothing (i.e. if you haven't presented a delimiter yet, SI can still operate).
  • ZOI + SA + ZOI + SI still == nothing.

Error Cases


The following cases are explicitely defined as bad, i.e. error cases.

  • ZO + any word + BU
  • ZOI+delimiter+text+delimiter + BU
  • ZEI + ZEI
  • BAhE + end of text
  • start of text + BU

Non-Error Cases


Cases that are degenerate and strange, but not errors.

  • BU + ZEI + BU
  • BAhE + ZOI — ZOI retains its usual meaning
  • BAhE + ZO — ZO retains its usual meaning
  • DAhO (and friends) + NAI + ZEI + any word


History

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