Lojban Machine Grammar, EBNF Version, Final Baseline
This EBNF document is explicitly dedicated to the public domain by its author, The Logical Language Group, Inc. Contact that organization at: 2904 Beau Lane, Fairfax VA 22031 USA 703-385-0273 (intl: +1 703 385 0273)
Explanation of notation: All rules have the form:
name _{number}= bnf-expression
which means that the grammatical construct “name” is defined by “bnf-expression”. The number cross-references this grammar with the rule numbers in the YACC grammar. The names are the same as those in the YACC grammar, except that subrules are labeled with A, B, C, ... in the YACC grammar and with 1, 2, 3, ... in this grammar. In addition, rule 971 is “simple_tag” in the YACC grammar but “stag” in this grammar, because of its frequent appearance.
Names in lower case are grammatical constructs.
Names in UPPER CASE are selma'o (lexeme) names, and are terminals.
Concatenation is expressed by juxtaposition with no operator symbol.
| represents alternation (choice).
[] represents an optional element.
& represents and/or (“A & B” is the same as “A | B | A B”).
... represents optional repetition of the construct to the left. Left-grouping is implied; right-grouping is shown by explicit self-referential recursion with no “...”
() serves to indicate the grouping of the other operators. Otherwise, “...” binds closer than &, which binds closer than |.
# is shorthand for “[free ...]”, a construct which appears in many places.
// encloses an elidable terminator, which may be omitted (without change of meaning) if no grammatical ambiguity results.
[NAI ...] [CMENE ... # | (indicators & free ...)] [joik-jek] text-1
[(I [jek | joik] [[stag] BO] #) ... | NIhO ... #] [paragraphs]
ek # | gihek # | quantifier | NA # | terms /VAU#/ | prenex | relative-clauses | links | linkargs
bridi-tail-1 [gihek [stag] KE # bridi-tail /KEhE#/ tail-terms]
gek subsentence gik subsentence tail-terms | [tag] KE # gek-sentence /KEhE#/ | NA # gek-sentence
NUhI # gek terms /NUhU#/ gik terms /NUhU#/ | NUhI # terms /NUhU#/
[quantifier] sumti-6 [relative-clauses] | quantifier selbri /KU#/ [relative-clauses]
(LAhE # | NAhE BO #) [relative-clauses] sumti /LUhU#/ | KOhA # | lerfu-string /BOI#/ | LA # [relative-clauses] CMENE ... # | (LA | LE) # sumti-tail /KU#/ | LI # mex /LOhO#/ | ZO any-word # | LU text /LIhU#/ | LOhU any-word ... LEhU # | ZOI any-word anything any-word #
[sumti-6 [relative-clauses]] sumti-tail-1 | relative-clauses sumti-tail-1
selbri-5 [joik-jek selbri-5 | joik [stag] KE # selbri-3 /KEhE#/] ...
tanru-unit [BO # selbri-6] | [NAhE #] guhek selbri gik selbri-6
BRIVLA # | GOhA [RAhO] # | KE # selbri-3 /KEhE#/ | ME # sumti /MEhU#/ [MOI #] | (number | lerfu-string) MOI # | NUhA # mex-operator | SE # tanru-unit-2 | JAI # [tag] tanru-unit-2 | any-word (ZEI any-word) ... | NAhE # tanru-unit-2 | NU [NAI] # [joik-jek NU [NAI] #] ... subsentence /KEI#/
operator-1 [joik-jek operator-1 | joik [stag] KE # operator /KEhE#/] ...
operator-2 | guhek operator-1 gik operator-2 | operator-2 (jek | joik) [stag] BO # operator-1
SE # mex-operator | NAhE # mex-operator | MAhO # mex /TEhU#/ | NAhU # selbri /TEhU#/ | VUhU #
quantifier | lerfu-string /BOI#/ | NIhE # selbri /TEhU#/ | MOhE # sumti /TEhU#/ | JOhI # mex-2 ... /TEhU#/ | gek operand gik operand-3 | (LAhE # | NAhE BO #) operand /LUhU#/
[NAhE] [SE] BAI [NAI] [KI] | [NAhE] (time [space] | space [time]) & CAhA [KI] | KI | CUhE
ZI & time-offset ... & ZEhA [PU [NAI]] & interval-property ...
VA & space-offset ... & space-interval & (MOhI space-offset)
SEI # [terms [CU #]] selbri /SEhU/ | SOI # sumti [sumti] /SEhU/ | vocative [relative-clauses] selbri [relative-clauses] /DOhU/ | vocative [relative-clauses] CMENE ... # [relative-clauses] /DOhU/ | vocative [sumti] /DOhU/ | (number | lerfu-string) MAI | TO text /TOI/ | XI # (number | lerfu-string) /BOI/ | XI # VEI # mex /VEhO/
(UI | CAI) [NAI] | Y | DAhO | FUhO
The following rules are non-formal:
FAhO is a universal terminator and signals the end of parsable input.
BNF rule #802 _{802}
BNF rule #972 _{972}
BNF rule #1100 _{1100}
BNF rule #160 _{160}
BNF rule #161 _{161}
BNF rule #160 _{160}
BNF rule #311 _{311}
BNF rule #932 _{932}
BNF rule #52_{52}, BNF rule #383_{383}, BNF rule #385_{385}, BNF rule #371_{371}, BNF rule #135_{135}, BNF rule #136_{136}, BNF rule #13_{13}, BNF rule #93_{93}, BNF rule #97_{97}, BNF rule #2_{2}
BNF rule #32_{32}, BNF rule #385_{385}, BNF rule #300_{300}, BNF rule #97_{97}
BNF rule #152 _{152}
BNF rule #987 _{987}
BNF rule #987 _{987}
BNF rule #413 _{413}
BNF rule #972 _{972}
BNF rule #150 _{150}
BNF rule #82 _{82}
BNF rule #32_{32}, BNF rule #97_{97}, BNF rule #0_{0}
BNF rule #132 _{132}
BNF rule #415 _{415}
BNF rule #32_{32}, BNF rule #40_{40}
BNF rule #972 _{972}
BNF rule #413 _{413}
BNF rule #415 _{415}
BNF rule #32 _{32}
BNF rule #83 _{83}
BNF rule #1046_{1046}, BNF rule #1045_{1045}
BNF rule #1049 _{1049}
BNF rule #815 _{815}
BNF rule #815 _{815}
BNF rule #987 _{987}
BNF rule #310 _{310}
BNF rule #411 _{411}
BNF rule #413 _{413}
BNF rule #807 _{807}
BNF rule #806 _{806}
BNF rule #122 _{122}
BNF rule #807_{807}, BNF rule #816_{816}
BNF rule #818 _{818}
BNF rule #122 _{122}
BNF rule #152 _{152}
BNF rule #808 _{808}
BNF rule #10_{10}, BNF rule #12_{12}, BNF rule #13_{13}, BNF rule #2_{2}
BNF rule #805 _{805}
BNF rule #152 _{152}
BNF rule #806 _{806}
BNF rule #385 _{385}
BNF rule #50_{50}, BNF rule #54_{54}, BNF rule #381_{381}, BNF rule #372_{372}, BNF rule #370_{370}, BNF rule #134_{134}, BNF rule #91_{91}, BNF rule #152_{152}
BNF rule #152 _{152}
BNF rule #50_{50}, BNF rule #54_{54}, BNF rule #381_{381}, BNF rule #372_{372}, BNF rule #370_{370}, BNF rule #134_{134}, BNF rule #91_{91}, BNF rule #152_{152}
BNF rule #972 _{972}
BNF rule #97 _{97}
BNF rule #95_{95}, BNF rule #97_{97}, BNF rule #83_{83}
BNF rule #312 _{312}
BNF rule #122 _{122}
BNF rule #97 _{97}
BNF rule #987 _{987}
BNF rule #385_{385}, BNF rule #97_{97}
BNF rule #97 _{97}
BNF rule #97 _{97}
BNF rule #97 _{97}
BNF rule #97 _{97}
BNF rule #97 _{97}
BNF rule #97 _{97}
BNF rule #97 _{97}
BNF rule #385_{385}, BNF rule #97_{97}
BNF rule #32 _{32}
BNF rule #374 _{374}
BNF rule #152 _{152}
BNF rule #152 _{152}
BNF rule #152 _{152}
BNF rule #385 _{385}
BNF rule #1040 _{1040}
BNF rule #802_{802}, BNF rule #20_{20}, BNF rule #54_{54}, BNF rule #818_{818}, BNF rule #805_{805}, BNF rule #131_{131}, BNF rule #83_{83}
BNF rule #802_{802}, BNF rule #807_{807}, BNF rule #818_{818}, BNF rule #816_{816}, BNF rule #808_{808}, BNF rule #413_{413}, BNF rule #1051_{1051}, BNF rule #932_{932}, BNF rule #805_{805}, BNF rule #806_{806}, BNF rule #972_{972}, BNF rule #1046_{1046}, BNF rule #1045_{1045}, BNF rule #152_{152}, BNF rule #0_{0}, BNF rule #1033_{1033}, BNF rule #1030_{1030}, BNF rule #415_{415}
BNF rule #374_{374}, BNF rule #385_{385}, BNF rule #136_{136}, BNF rule #972_{972}, BNF rule #97_{97}, BNF rule #152_{152}
BNF rule #374 _{374}
BNF rule #385 _{385}
BNF rule #4_{4}, BNF rule #2_{2}
BNF rule #122 _{122}
BNF rule #152 _{152}
BNF rule #152 _{152}
BNF rule #85 _{85}
BNF rule #85 _{85}
BNF rule #817_{817}, BNF rule #812_{812}
BNF rule #81 _{81}
BNF rule #312 _{312}
BNF rule #1033_{1033}, BNF rule #1030_{1030}
BNF rule #152 _{152}
BNF rule #1051 _{1051}
BNF rule #1101 _{1101}
BNF rule #802_{802}, BNF rule #807_{807}, BNF rule #818_{818}, BNF rule #808_{808}, BNF rule #932_{932}, BNF rule #805_{805}, BNF rule #806_{806}, BNF rule #374_{374}, BNF rule #972_{972}, BNF rule #152_{152}
BNF rule #32 _{32}
BNF rule #32 _{32}
BNF rule #1101 _{1101}
BNF rule #32 _{32}
BNF rule #1101 _{1101}
BNF rule #1051 _{1051}
BNF rule #987 _{987}
BNF rule #374_{374}, BNF rule #385_{385}
BNF rule #32 _{32}
BNF rule #32 _{32}
BNF rule #14 _{14}
BNF rule #14 _{14}
BNF rule #413 _{413}
BNF rule #1045_{1045}, BNF rule #1040_{1040}
BNF rule #20_{20}, BNF rule #71_{71}
BNF rule #32_{32}, BNF rule #300_{300}
BNF rule #1046 _{1046}
BNF rule #32_{32}, BNF rule #300_{300}
BNF rule #1046 _{1046}
BNF rule #90 _{90}
BNF rule #374 _{374}
BNF rule #32 _{32}
BNF rule #413 _{413}
BNF rule #1051 _{1051}
BNF rule #152 _{152}
BNF rule #1030 _{1030}
BNF rule #1033_{1033}, BNF rule #1030_{1030}
BNF rule #121 _{121}
BNF rule #97 _{97}
BNF rule #97 _{97}
BNF rule #30 _{30}
BNF rule #987_{987}, BNF rule #1101_{1101}, BNF rule #97_{97}, BNF rule #152_{152}, BNF rule #1100_{1100}
BNF rule #97 _{97}
BNF rule #50_{50}, BNF rule #40_{40}
BNF rule #50 _{50}
BNF rule #51_{51}, BNF rule #52_{52}
BNF rule #52 _{52}
BNF rule #20_{20}, BNF rule #421_{421}, BNF rule #383_{383}, BNF rule #381_{381}, BNF rule #91_{91}, BNF rule #93_{93}
BNF rule #10 _{10}
BNF rule #0 _{0}
BNF rule #54_{54}, BNF rule #385_{385}, BNF rule #94_{94}, BNF rule #85_{85}
BNF rule #53_{53}, BNF rule #54_{54}
BNF rule #51_{51}, BNF rule #52_{52}, BNF rule #50_{50}, BNF rule #20_{20}
BNF rule #54_{54}, BNF rule #807_{807}, BNF rule #385_{385}, BNF rule #371_{371}, BNF rule #136_{136}, BNF rule #94_{94}, BNF rule #85_{85}
BNF rule #371_{371}, BNF rule #136_{136}
BNF rule #411 _{411}
BNF rule #0_{0}, BNF rule #1100_{1100}
BNF rule #806 _{806}
BNF rule #1049_{1049}, BNF rule #1030_{1030}
BNF rule #422_{422}, BNF rule #371_{371}, BNF rule #135_{135}, BNF rule #971_{971}, BNF rule #13_{13}, BNF rule #2_{2}
BNF rule #807_{807}, BNF rule #421_{421}, BNF rule #422_{422}, BNF rule #383_{383}, BNF rule #381_{381}, BNF rule #371_{371}, BNF rule #370_{370}, BNF rule #134_{134}, BNF rule #135_{135}, BNF rule #971_{971}, BNF rule #13_{13}, BNF rule #91_{91}, BNF rule #93_{93}, BNF rule #2_{2}
BNF rule #382_{382}, BNF rule #92_{92}
BNF rule #370_{370}, BNF rule #134_{134}, BNF rule #12_{12}, BNF rule #491_{491}, BNF rule #152_{152}, BNF rule #81_{81}, BNF rule #0_{0}
BNF rule #32_{32}, BNF rule #987_{987}, BNF rule #385_{385}, BNF rule #97_{97}, BNF rule #152_{152}
BNF rule #817_{817}, BNF rule #987_{987}, BNF rule #812_{812}
BNF rule #20_{20}, BNF rule #151_{151}
BNF rule #20_{20}, BNF rule #160_{160}, BNF rule #161_{161}
BNF rule #32_{32}, BNF rule #374_{374}, BNF rule #300_{300}, BNF rule #97_{97}
BNF rule #311_{311}, BNF rule #310_{310}
BNF rule #311_{311}, BNF rule #312_{312}, BNF rule #385_{385}
BNF rule #374_{374}, BNF rule #372_{372}, BNF rule #152_{152}
BNF rule #32_{32}, BNF rule #1051_{1051}, BNF rule #300_{300}, BNF rule #152_{152}
BNF rule #312_{312}, BNF rule #385_{385}, BNF rule #381_{381}, BNF rule #332_{332}
BNF rule #381 _{381}
BNF rule #382_{382}, BNF rule #383_{383}
BNF rule #383_{383}, BNF rule #385_{385}
BNF rule #311_{311}, BNF rule #312_{312}, BNF rule #310_{310}, BNF rule #372_{372}, BNF rule #370_{370}, BNF rule #330_{330}
BNF rule #371_{371}, BNF rule #370_{370}
BNF rule #371 _{371}
BNF rule #4 _{4}
BNF rule #4_{4}, BNF rule #2_{2}
BNF rule #20_{20}, BNF rule #11_{11}, BNF rule #41_{41}
BNF rule #20_{20}, BNF rule #385_{385}, BNF rule #95_{95}, BNF rule #112_{112}
BNF rule #121 _{121}
BNF rule #20_{20}, BNF rule #32_{32}, BNF rule #95_{95}, BNF rule #97_{97}, BNF rule #112_{112}, BNF rule #111_{111}, BNF rule #90_{90}
BNF rule #310_{310}, BNF rule #332_{332}
BNF rule #330 _{330}
BNF rule #53_{53}, BNF rule #32_{32}, BNF rule #374_{374}, BNF rule #385_{385}, BNF rule #131_{131}, BNF rule #136_{136}, BNF rule #95_{95}, BNF rule #112_{112}, BNF rule #815_{815}
BNF rule #130 _{130}
BNF rule #131_{131}, BNF rule #132_{132}
BNF rule #132_{132}, BNF rule #134_{134}, BNF rule #152_{152}
BNF rule #133 _{133}
BNF rule #134_{134}, BNF rule #135_{135}
BNF rule #135_{135}, BNF rule #136_{136}
BNF rule #14_{14}, BNF rule #41_{41}
BNF rule #971_{971}, BNF rule #815_{815}
BNF rule #972 _{972}
BNF rule #1046 _{1046}
BNF rule #1040 _{1040}
BNF rule #1040 _{1040}
BNF rule #52_{52}, BNF rule #50_{50}, BNF rule #807_{807}, BNF rule #383_{383}, BNF rule #381_{381}, BNF rule #371_{371}, BNF rule #370_{370}, BNF rule #134_{134}, BNF rule #135_{135}, BNF rule #13_{13}, BNF rule #91_{91}, BNF rule #93_{93}, BNF rule #2_{2}
BNF rule #10_{10}, BNF rule #11_{11}
BNF rule #11 _{11}
BNF rule #12_{12}, BNF rule #13_{13}
BNF rule #13 _{13}
BNF rule #54_{54}, BNF rule #122_{122}, BNF rule #41_{41}, BNF rule #152_{152}
BNF rule #32_{32}, BNF rule #385_{385}, BNF rule #91_{91}, BNF rule #94_{94}, BNF rule #97_{97}, BNF rule #112_{112}, BNF rule #152_{152}, BNF rule #83_{83}
BNF rule #90 _{90}
BNF rule #91 _{91}
BNF rule #92_{92}, BNF rule #93_{93}
BNF rule #93_{93}, BNF rule #94_{94}
BNF rule #94 _{94}
BNF rule #95_{95}, BNF rule #111_{111}
BNF rule #97 _{97}
BNF rule #111 _{111}
BNF rule #54_{54}, BNF rule #130_{130}, BNF rule #14_{14}, BNF rule #152_{152}, BNF rule #83_{83}
BNF rule #51_{51}, BNF rule #52_{52}, BNF rule #53_{53}, BNF rule #50_{50}, BNF rule #54_{54}
BNF rule #136 _{136}
BNF rule #150 _{150}
BNF rule #151_{151}, BNF rule #152_{152}
BNF rule #491 _{491}
BNF rule #160_{160}, BNF rule #161_{161}, BNF rule #122_{122}, BNF rule #82_{82}
BNF rule #20_{20}, BNF rule #32_{32}, BNF rule #30_{30}, BNF rule #40_{40}, BNF rule #71_{71}, BNF rule #85_{85}
BNF rule #80 _{80}
BNF rule #81 _{81}
BNF rule #83 _{83}
BNF rule #32_{32}, BNF rule #1101_{1101}, BNF rule #97_{97}
BNF rule #14_{14}, BNF rule #0_{0}
BNF rule #972 _{972}
BNF rule #1030 _{1030}
BNF rule #1101 _{1101}
BNF rule #32 _{32}