Re: Error reporting?

On Thursday 18 November 2021 09:57:55 (+01:00), Dave Pawson wrote:

> On Thu, 18 Nov 2021 at 08:50, Steven Pemberton <steven.pemberton@cwi.nl> wrote:
> >
> > The message collects together all terminal symbols (characters) that could
> > occur at that point. If there is only one, it is required. If there are
> > more than one, then there is a choice, and none is required, and all are
> > possible.
> >
> > Is there a better wording that would make this clearer?
>
> I take your point.
> "Required, one of " when it's a set?
> Even when it's 5 characters, one of them is required?
The point is that you get the message because something is required at the point of the error message that hasn't been supplied. The parser supplies the list of characters that would have been acceptable at that point, but can't say that any one of them is particularly required, only that it would have been happy to have seen any one of them at that point.
 
Steven

>
> Could be I'm used to xml parsers?
> @ndw - what wording is used in docbook? Generally 'one of' many 'required'?
>
> I.e. it is invalid without one of the following.
>
> HTH
>
>
> >
> > Steven
> >
> > On Thu, 18 Nov 2021 09:08:31 +0100, Dave Pawson <dave.pawson@gmail.com>
> > wrote:
> >
> > > On Wed, 17 Nov 2021 at 20:32, Steven Pemberton <steven.pemberton@cwi.nl>
> > > wrote:
> > >>
> > >> Do you mean a nonterminal?
> > >
> > > Not particularly. If known, tell me what is required at this point in
> > > the syntax?
> > > Or is that the same as 'permitted'?
> > > Difference between 'must have' and 'may have'?
> > >
> > > regards
> > >
> > >
> > >>
> > >> Steven
> > >>
> > >> On Wed, 17 Nov 2021 13:00:18 +0100, Dave Pawson <dave.pawson@gmail.com>
> > >> wrote:
> > >>
> > >> > ^
> > >> > *** Permitted at this position: " "; "ΒΆ"; [".;:,'?!"]; [L].
> > >> >
> > >> > Would it be more helpful (if appropriate) to report
> > >> > xxx required at this position?
> > >> >
> > >> > regards
> > >> >
> > >
> > >
>
>
>

Received on Thursday, 18 November 2021 10:43:13 UTC