From: Edgardo Hames Date: 2004-10-07T03:25:25+09:00 Subject: Re: quality of error messages On Thu, 7 Oct 2004 01:43:52 +0900, Eivind Eklund wrote: > On Wed, 6 Oct 2004 22:48:49 +0900, Joachim Wuttke > wrote: > > Hi Ruby developers, > > > > Example 1: missing "end" in > > -> I forget to close a "class" or a "do" or a "if" block - > > but which one ? Shouldn't the system be able to name > > possible locations of unclosed block openings ? > > This is parser-technically hard to do; maybe it would be possible to > look at when indenting got wrong, but I suspect that would be hard to > add into the present lex/yacc style parser factoring. > There are Error Correcting Parsers and generators that could be used to correct the errors Joachim mentions and can log them. You can google for it and learn how to build them. For a parser library in Haskell, checkout http://research.microsoft.com/~emeijer/Papers/Parsec.pdf Regards, Ed -- " Don't relax! It's only your tension that's holding you together."