Re: Insertions

> It was an interesting challenge to implement. The description that an
> insertion is “always treated as an empty string so it always matches”
> was not at all helpful as an implementation strategy (despite a couple
> of hours of fruitlessly believing it might be).

On further reflection, it occurs to me that I was trying to shoehorn
these “empty string matches” into a new class of terminal. If I’d simply
made them a kind of magic nonterminal, I expect it would have been
relatively straightforward.

I’ll pretend I didn’t do that because I think the number of nonterminals
carried around in the state chart and the parse forest has an impact on
performance.

                                        Be seeing you,
                                          norm

--
Norm Tovey-Walsh
Saxonica

Received on Sunday, 3 April 2022 12:42:17 UTC