Re: Error definition

Okay, that’s all fair. I’m sorry for having derailed the discussion. My only slight disagreement is that, if we’re talking specifically of an ixml grammar parser, failure to recognise the input must be an error. If the input string isn’t recognised, it isn’t a valid ixml grammar and it can’t subsequently be used as the “ixml grammar” input to an ixml input parser.

Does that make sense?
___________________________________________________ 
Dr. Bethan Tovey-Walsh 
Myfyrwraig PhD | PhD Student CorCenCC 
Prifysgol Abertawe | Swansea University 
Croeso i chi ysgrifennu ataf yn y Gymraeg.

> On 4 Feb 2022, at 17:55, Norm Tovey-Walsh <norm@saxonica.com> wrote:
> 
>> 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 Saturday, 5 February 2022 12:26:09 UTC