I would advocate not parsing IRIs, but just scanning from "(" to ")" where an IRI is expected and storing the result. Throwing out the IRI grammar and handling only XDI's own syntax would simplify parsing to the point where we don't even need a parser generator.
Verifying the IRI general grammar has little value as it doesn't verify other details of each scheme or show that references are actually dereferenceable on the net. Let the HTTP libraries do URL processing including verification.
Sent from my iPhone
This looks great to me, actually the fact that on one hand,
1) XDI syntax included XRI syntax, and that on the other hand,
2) there were so many parallel rules,
... has bothered me for a while.
I will try it out in my implementation shortly.
The one fix I have right now is to change "iri" to "IRI", I just updated that on the page.
I have actually been spending some time recently on the XRI/XDI parser component of XDI2.
While doing so, I have looked at a new parser library called APG
as a potential alternative to aParse
which I had been using so far.
Will report back on this.
On Tue, Jan 29, 2013 at 7:54 AM, Drummond Reed <email@example.com>
Per last week's telecon, I have updated the XDI ABNF page
...to incorporate the InnerRoots proposal:
When I made the edits, I realized that by adding just 6 more lines, and where necessary changing the rule name prefix to "xdi-", we could eliminate any dependency on the XRI 3.0 ABNF. In other words, the entire XDI ABNF would stand on its own, with the only referenced ABNF rules being those from the IRI spec (which is exactly the same with the XRI 3.0 spec).
This has two advantages:
- It eliminates the need for anyone reviewing the spec to need to check another external spec (besides the IRI spec, which we must reference) to review the complete XDI ABNF.
- It eliminates any dependency on XRI 3.0 needing to advance (which is not necessarily an issue, but just one less dependency to worry about).
Just to clarify, this didn't involve making any changes to the ABNF, just including all the complete set of ABNF rules in one place.