Return-Path: Return-Path: Date: Wed Apr 10 15:13:39 1991 From: Guy Steele Message-Id: <9104101753.AA25793@ukko.think.com> To: cbmvax!snark.thyrsus.com!cowan Cc: lojban-list@snark.thyrsus.com In-Reply-To: John Cowan's message of Wed, 10 Apr 91 12:00:38 EDT Subject: Uncertainties in EBNF Notation Status: RO X-From-Space-Date: Wed Apr 10 15:13:39 1991 X-From-Space-Address: cbmvax!uunet!Think.COM!gls From: cbmvax!snark.thyrsus.com!cowan@uunet.UU.NET (John Cowan) Date: Wed, 10 Apr 91 12:00:38 EDT loop!dont@tessi.uucp (Don Taylor) writes: > I just received the ju'i lobypli mailing with the lojban machine grammar in > ebnf notation. It seems that the notation is ambiguous in that no precedence > is specified for the notation. > I would greatly appreciate a more precise definition of precedence, and > associativity if relevant. Woops. "..." has highest precedence, "&" intermediate, "|" lowest. Both () and [] group with respect to precedence. All operators are associative both ways. > Item 10, "// encloses an elidable terminator, which may be omitted (without > change of meaning) if no grammatical ambiguity results" disturbs me. Reading > bnf as a definition of a language, which I take as the definition of what > is grammatical and what is not, leaves me uncertain of how to interpret the > document. The elidable terminators make the language unambiguous, but may often be ^^ ???????? Did you mean "ambiguous"? omitted without loss of ambiguity, especially when there is more than one in a row. For example: le prenu ku cu klama le zarci ku vau which means The person goes to the market. may be elided to le prenu cu klama le zarci because the first "ku" may be inferred before the "cu" (since "cu" cannot be found in a sumti) and the second "ku" and the "vau" may be inferred at the end of text. Hm. It seems to me that if the "official" grammar allows such elision in practice, then it behooves the language definers to produce a more elaborate grammar that takes this into account, if it can be done using a context-free grammar. But if the resulting grammar is context-sensitive, then allowing such elision may be a bad idea in the first place. --Guy Steele Consider the following seven sentences. This sentence no verb. Has no subject. This sentence has no. Has. Object. This sentence.