Re: The rewrite rules matter

Oh, okay. My bad. I guess I misremembered how the pipe works - I understood this as “f followed by either f-star or empty”, rather than  “either f followed by f-star, or empty”.  

Sent from my iPhone

> On 25 Aug 2022, at 21:22, John Lumley <john@saxonica.com> wrote:
> 
> Surely f-star will match an empty string, by its second alternative…
> 
> Sent from my iPad
> 
>>> On 25 Aug 2022, at 19:28, Bethan Tovey-Walsh <accounts@bethan.wales> wrote:
>>> 
>> 
>>> 
>>> f* ⇒ f-star
>>> -f-star= f, f-star|().
>> 
>> Maybe I’m misunderstanding something, but that would seem to require that you match at least one f? So wouldn’t this give you a rewrite of f+, not f*?
>> 
>> BTW
>> 
>>>> On 25 Aug 2022, at 15:42, John Lumley <john@saxonica.com> wrote:
>>>> 
>>> 
>>> On 21/08/2022 18:04, Norm Tovey-Walsh wrote:
>>>> f* ⇒ f-star
>>>> -f-star = f+ | ().
>>> I think there's a cheaper possibility for rewriting f*, which is self-contained and avoids an f+ rewrite. I seem to have been using for some time, without perhaps realising it:
>>> 
>>> f* ⇒ f-star
>>> -f-star= f, f-star|().
>>> -- 
>>> John Lumley MA PhD CEng FIEE
>>> john@saxonica.com

Received on Thursday, 25 August 2022 21:06:12 UTC