From cbmvax!uunet!bigd.cray.com!dmb Tue Apr 16 10:43:00 1991 Return-Path: From: cbmvax!uunet!bigd.cray.com!dmb Message-Id: <9104161419.AA09068@bigd.cray.com> To: lojban-list@snark.thyrsus.com Subject: Re: Elision, or: Nick rides again in jbonai In-Reply-To: Your message of "Sat, 13 Apr 91 06:20:00 EDT." Date: Tue, 16 Apr 91 09:19:20 -0500 Status: RO I've considered the use of the production to be a kludge ever since Jim Brown started it almost ten years ago. It does allow the parser to recover from an elided terminator, if you are using YACC. Of course, other errors in that position may get mistaken for elided terminators, though I'm not sure I could throw together an example that would get an error only at the place of an elided terminator. It might be fun to try. My real question is for Guy. If one wished to explore the question of including elidible terminators in the grammar, how would one go about it? My approach has been to include a rule allowing the terminator to go to an empty production and then examine the places where conflicts arise. Those places are where ambiguities may arise if a terminator is elided. Beyond that things seem to get messy. We don't have tools for hacking on grammars that make sure the language being defined doesn't change. Grammar writing seems to be an art rather than a science. My compiler theory classes were almost twenty years ago, but I do read some of the relevant journals. The emphasis seems to be on developing better error recovery techniques and on modifications to the basic LR(k) algorithms which will produce smaller parsers. I haven't seen any work on developing tools for grammar writers.