ietf-tools / bap

An ABNF parser, focusing on human-friendly error messages.
41 stars 28 forks source link

/abnf Extract - bogons #37

Open becarpenter opened 2 years ago

becarpenter commented 2 years ago

I couldn't leave this alone. More FYI: I noticed that running the extraction on RFC 3986 not only collects duplicates, but also collects a few lines that are not even intended to be ABNF: result = "" $1 = http: $2 = http $3 = //www.ics.uci.edu $4 = www.ics.uci.edu $5 = /pub/ietf/uri/ $6 = $7 = $8 = #Related $9 = Related Fixing duplicates is trivial to script, but fixing these bogons looks like an AI problem. This really strengthens the argument that actual code should be embedded in and the checker applied to the xml source, going forward.

becarpenter commented 2 years ago

And there's this microtool for your amusement: https://github.com/becarpenter/misc/blob/main/dedup.py

kesara commented 2 years ago

I am transferring this to the bap. This probably needs to be addressed on bap aex or the replacement tool.

But https://github.com/becarpenter/misc/blob/main/dedup.py could be something author tools can adapt. But I'm not sure about the future of bap.