kdl-org / kdl

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

Formal grammar and spec text disagree on whether children terminate node #274

Closed bgotink closed 2 years ago

bgotink commented 2 years ago

The spec states

Finally, a node is terminated by either a Newline, a Children Block, a semicolon (;) or the end of the file/stream (an EOF).

which implies the following would be valid:

node { node {} }

The grammar disagrees:

node := ... (node-space* node-children ws*)? node-space* node-terminator
node-terminator := single-line-comment | newline | ';' | eof
zkat commented 2 years ago

oh my. Looks like the prose needs to be updated, then. Happy to take a PR for rewording that if you're willing. The grammar definitely takes precedence when there's an apparent disagreement.