Re: [csswg-drafts] "Consume qualified rule" section in the "CSS Syntax Level 3" spec. appears to express same step _twice_, an omission? [css-syntax] (#10119)

Even the /TR version you were originally looking at [defines "next input token" in that way](https://www.w3.org/TR/css-syntax-3/#next-input-token):

> The token or [component value](https://www.w3.org/TR/css-syntax-3/#component-value) following the [current input token](https://www.w3.org/TR/css-syntax-3/#current-input-token) in the list of tokens produced by the tokenizer.

Some of the parsing algorithms do a simple run over the token stream, assembling a list of component values (which can be tokens *or* things like blocks) until they hit the ending token they're looking for, then pass that list into another parsing algorithm to actually do something useful with. So those algos need to be prepared to see a list of *unprocessed* tokens (which can contain things like a `{` token) or a list of *processed* tokens (which will instead contain a simple block holding everything between the original `{` token and the matching `}` token).

But again, this is moot now in the current text, as I no longer invoke any algorithms in that way. (I needed to do so because I couldn't tell how to parse the contents of a block without contextual knowledge, but since then we've made some changes that do allow me to unambiguously parse all blocks.)

> I'll have to start over with implementing tokenization and parsing if I am to switch to the editor's draft, no?

Yes, you should use one or the other, and by "or" I really mean "you should use the ED, it's up to date and matches what browsers are expected to do". The differences are minimal, tho - other than an editorial rewrite, the changes since the TR publication were mostly focused around getting CSS Nesting to work properly.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10119#issuecomment-2016850313 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 24 March 2024 15:48:54 UTC