Re: Error definition

> If someone can explain to me why it is incorrect or wrong to submit an
> input string and an input grammar to an ixml processor if the input
> string is not a sentence in the language described by the grammar, then
> my concerns will turn out to be groundless.

Michael is exactly correct and we’re off in the weeds here. You submit
an input string and a grammar to the processor, it reports a parse (or
perhaps more than one parse) or no parses, depending on whether or not
that string forms a sentence in the grammar.

No errors have occurred. No exceptions are going to be raised at the API
level in processors with APIs:

  InvisibleXmlParser parser = InvisibleXml.parserFromFile("dates.ixml");
  InvisibleXmlDocument doc = parser.parse("4 Febuary 2022");
  System.out.printf("%d parses found\n", doc.numberOfParses());

Yes, my command line tool will probably “signal failure”, in the sense
of returning a non-zero exit code, if the number of parses is zero, but
that’s between me and my users and has nothing to do with the
specification or “errors” as Michael described them.

                                        Be seeing you,
                                          norm

--
Norm Tovey-Walsh
Saxonica

Received on Friday, 4 February 2022 18:04:19 UTC