kdl-org / kdl

the kdl document language specifications
https://kdl.dev
Other
1.09k stars 61 forks source link

Update formal grammar for KDL 2.0 #285

Closed CAD97 closed 8 months ago

CAD97 commented 1 year ago

Closes #284 by making the formal grammar match the implementation and prose, explicitly treating slashdashed nodes as line-space and slashdashed node properties, arguments, and children as node-space.

zkat commented 1 year ago

The formal grammar is actually the "authoritative" version here, rather than the prose, so this is basically a breaking change. I think it's about time we start talking about the next version of KDL, though. We have a few breaking changes in the pipeline that have just been sitting on the sidelines (mostly minor things, tho).

CAD97 commented 1 year ago

Also, it's probably worth doing a survey of existing implementations to see what exactly each of their behaviors here is. It's not unlikely there's divergence here.

zkat commented 1 year ago

Additionally, before merging this, I'd like to see a handful of updated tests in our compliance test suite that cover these corner cases.

CAD97 commented 1 year ago

I'll bring in some conformance tests for these edge cases later this week; I'm writing a bunch as part of writing my implementation anyway.

tabatkins commented 10 months ago

I merged in the "alternate formulation" that uses required-node-space and optional-node-space, as it's exactly what I was going to suggest while reading the first fix attempt. ^_^

zkat commented 8 months ago

I'm going to merge this, but I kinda want to see what it takes to allow node{} to be legal. We can do that after this, though.