1.2. EBNF grammar of Lojban

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.

  1. Names in lower case are grammatical constructs.

  2. Names in UPPER CASE are selma'o (lexeme) names, and are terminals.

  3. Concatenation is expressed by juxtaposition with no operator symbol.

  4. | represents alternation (choice).

  5. [] represents an optional element.

  6. & represents and/or. A & B is the same as A | B | A B but not B A. Furthermore, A & B & C & D permits one or more of A, B, C, and/or D, but only in that order.

  7. ... represents optional repetition of the construct to the left. Left-grouping is implied; right-grouping is shown by explicit self-referential recursion with no ...

  8. () serves to indicate the grouping of the other operators. Otherwise, ... binds closer than &, which binds closer than |.

  9. # is shorthand for [free ...] , a construct which appears in many places.

  10. // encloses an elidable terminator, which may be omitted (without change of meaning) if no grammatical ambiguity results.

The following rules are non-formal:

FAhO is a universal terminator and signals the end of parsable input.