- From: Graydon <graydonish@gmail.com>
- Date: Sun, 18 Sep 2022 20:59:51 -0400
- To: Bethan Tovey-Walsh <bytheway@linguacelta.com>
- Cc: public-ixml@w3.org
This is a late reply, but I had wanted to get through the problem first in the hopes of having something vaguely sensible to say. On Fri, Sep 09, 2022 at 04:22:25PM +0100, Bethan Tovey-Walsh scripsit: > I think the problem is that your grammar is ambiguous. The input > 'delete' matches the literal 'delete' in your grammar, but also > matches your rule for word. At this point, having to through the whole of the input, I think part of the difficulty is that the input is sometimes actually ambiguous. > The ixml parser could also produce the parse you want, but it's not > required to offer you a particular parse. You might therefore never > see your preferred parse, depending on how the parser selects its > output from the possible parses. > > To make your grammar unambiguous, you'd need to find a way to say that > 'delete' doesn't match the rule for word, or do something like > specifying that you want two delBlocks, for example. Adding the comet character -- U+2604, ☄ -- in front of the deletes and the inserts has helped. The advice to avoid ambiguity in general was excellent but also difficult to do; I had been taking an approach of starting at the front and working along, while matching anything in the remaining part of the record. Matching all of all the records first and then working on the abstraction from the existing specific matches got me there, but it's a conceptually different approach to what I'm used to doing. Thank you! -- Graydon Saunders | graydonish@gmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")
Received on Monday, 19 September 2022 01:00:07 UTC