Re: issue #24 does an ixml processor have to match everything?

> What has changed?

I wasn’t aware of the discussion from last April. I have not read all of
the archives with the care I might have liked.

I don’t think this is behavior that needs to be conformant in 1.0, so
I’m happy to leave it closed. It seems like something that could be
added later.

I implemented a version of it, partly out of curiosity and partly
because I have found various aspects of writing an ixml parser extremely
frustrating and in the moment, this wasn’t one of them.

For those interested, if I reach a point in the parse where I’ve clearly
gone off the rails never to recover, I look back at the last token that
was successfully parsed. If among the parses for that token was a
complete sentence in the grammar, then I provide a mechanism for
returning it.

I also buffer up the tokens consumed from the input iterator so that a
user who wishes can restart at the first bad character. If, for example,
you were matching a*b* and you fed the input aaaabbbbaaaabbbb, you could
extract the prefix parse “aaaabbbb” and restart the parse (or start
another parse, it’s just an iterator) with “aaaabbbb”.

                                        Be seeing you,
                                          norm

--
Norm Tovey-Walsh
Saxonica

Received on Thursday, 3 February 2022 19:08:20 UTC