Re: Error definition

Bethan Tovey-Walsh writes:

> Okay, that’s all fair. ...
> ... 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?

I think it does.  (And I think the reasons that 'error' makes sense here
and not in the case of the input string not being a sentence are (1)
that the ixml spec does define conformance rules for input grammars, and
(2) that a user who specifies an input grammar is implicitly warranting
that it's a conforming gramar.

Note that I think point (2) has a slighty subtle consequence.  It means,
I think, that if the file "bad.ixml" contains the non-grammar

   S ::= "hi mom".

then whether it is "in error" in the narrow sense seems to depend on how
the processor is invoked. If I invoke an ixml processor asking to parse
the input "hey, bro!" against the grammar in bad.ixml, the processor
will discover that bad.ixml is not a conforming grammar, and it seems to
me to make sense tosa that it is "in error".

If on the other hand I invoke the ixml processor asking it to parse
bad.ixml against the ixml specification grammar, I am making no implicit
claims that bad.ixml is a conforming grammar and so I would be
uncomfortable saying that in that case the file bad.ixml is "in error".

Michael

-- 
C. M. Sperberg-McQueen
Black Mesa Technologies LLC
http://blackmesatech.com

Received on Saturday, 5 February 2022 13:56:20 UTC