Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: A bug or incorrect logic?

From: "Michael Kay" <mike@--------.--->
To: "'Arshad Noor'" <arshad.noor@----------.--->
Date: 10/31/2008 5:58:00 PM
> 
> Given that A is optional, shouldn't the error message 
> indicate that (at a minimum) "B or C" is expected?
> 

Designing good error messages tends to involve guessing what the user's
intention was. The message that this particular processor has given you is
what comes out easily from the usual strategy of compiling the grammar into
a finite state machine, where in any given state you know what symbols are
allowed to appear to move you to the next state. 

There are strategies that do better (spelling checkers use them, essentially
by trying to work out what valid construct your invalid construct is closest
to) but they tend to involve look-ahead, which means they don't scale well
when the content is very long. And as we know from spelling checkers, they
can sometimes produce hilarious results.

Michael Kay
http://www.saxonica.com/




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent