CSS "escape"语法图混乱

CSS "escape" syntax diagram confusion

查看 escape 语言的语法图:

我读第二组转换如下:

The state transitioned to by the \ symbol can transition to the accepting state if the next symbol is not in the newline or hex digit languages (or in other words, is in any language but the newline or hex digit languages).

The state transitioned to by the \ symbol can transition to a different state if the next symbol is in hex digit language.

这不是自相矛盾吗?

铁路图含糊不清,并不矛盾。但请注意该部分的第一行,其中显示:

This section is non-normative.

然后继续准确解释这意味着什么:铁路图不完整,仅提供信息;它们旨在让您 直观地掌握 语法 。这些图不能用作参考 material,它们也不会尝试定义每个标记的语义。

显然,有可能不止一条穿过铁路的路径适用于给定的令牌。但由于铁路图不是语义的,所以这无关紧要。此外,许多铁路图并没有告诉您令牌在哪里结束;图中没有任何内容表明有必要接受最长可能的匹配(通常是这种情况)。

最终标记化算法是作为用英语编写的程序提供的,它不像铁路图那样容易理解。由于这些算法是规范的和语义的,因此歧义将是一个问题。但我想你会发现它们都是确定性的。例如,这里是如何 convert an escape sequence (一旦初始 \ 被消耗)。