Re: Ambiguity (what else!?) question

On Wednesday 29 January 2025 16:36:47 (+01:00), Graydon wrote:


 > I am interested in a negation operator, I think it's potentially useful,



David's recent example is a good example, I wanted to say


 subtitle: [Lu] - ["IVXVLCM'], -uppercasetitle;


or


 subtitle: !["IVXVLCM'], -uppercasetitle;


(which I prefer, since the not operator doesn't consume any characters), 
but was forced to write


 subtitle: ["ABDEFGHJKNOPQRSTUWYZ"], -uppercasetitle;


 > Debugging tools would to my mind be the most useful things for driving

 > iXML adoption.


I agree. The first version of my processor just said "Doesn't parse"; the 
second version said "I was expecting one of these characters at this 
point"; the third version said: "Here are the subrules currently active, 
and which characters they expect", which helps a *lot*.


   **** Parsing failed at line 9, position 4
   SUB
      ^
   **** Character: "
" (#A).
   **** Permitted at this position: 
        line: ["a"-"z"]
        punctuation: [P]
        spaces: [Zs]
        uppercase: [Lu]


 From which I can work out the context, but in the next version, I will 
display more context, such as the parents, and the grandparents of those 
rules.


 > I suspect that group could be expanded through tool support much more 
than
 > through expressiveness of the grammars.



I have added some static ambiguity tests, unreachable rules, and so on, but 
I agree, the more help-tooling the better.


Steven

Received on Thursday, 30 January 2025 14:59:04 UTC