Open Thom1729 opened 1 year ago
Yes, it's the biggest "punt" in the spec, imho...
It's probably better expressed as a negative lookahead assertion in a few productions involving separating whitespace and multi-line strings.
Shouldn't be hard to make it simple.
In the 1.2.2 spec, the
l-bare-document
production includes special language:The intent is to assert that the body of a document cannot contain a directive end indicator or a document end indicator. This is not entirely clear in the spec, it's not a proper part of the PEG model we use for the grammar, and overall it's just kind of a kludge.
In a future revision of the 1.2 spec, we may be able to eliminate the kludge with a few well-placed negative lookaheads.