Re: *which* alternative that matches nothing? (was Re: repetition)

I find this very confusing.
Empty set
Empty string
'nothing'

I doubt if I will be the only user to take this view.

I'll shut up now.

regards

On Fri, 17 Dec 2021 at 20:19, Steven Pemberton <steven.pemberton@cwi.nl> wrote:
>
> > > - An alternative that matches no sequences at all, which no thing
> > > matches. This is an expression which denotes the language with
> > > no sentences, i.e. the empty set. And this is the meaning most
> > > naturally associated with the symbol “∅”.
> >
> > Any reason why [] should not be given this definition?
>
> It does have that definition, but that is a different definition to what you require.
>
> () matches the empty string, so always succeeds.
> [] matches *nothing at all*, so always fails.
>
> Steven



-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.

Received on Saturday, 18 December 2021 08:42:42 UTC