电子邮件的RFC 2282具有以下用于引用字符串的 ABNF。
quoted-string = [CFWS]
DQUOTE *([FWS] qcontent) [FWS] DQUOTE
[CFWS]
Run Code Online (Sandbox Code Playgroud)
我用谷歌搜索,发现 CFWS 是 Comments, Folding, Whitespaces。我知道空格是什么,但不知道电子邮件地址中的 ABNF 中的注释和折叠是什么。
另外 *() 里面的 [FWS] 是什么意思?双引号可以有 0 次或多次出现在折叠和空格之前的 qcontent?
这是非常令人困惑的。了解 ABNF 的参考资料将不胜感激。
我想写的,其内容可以包含字符的文件格式,语法等非US-ASCII的。由于我习惯了ABNF,所以我尝试使用它......
但是,RFC 5234和7405中没有一个对不使用 US ASCII 的人非常友好。
事实上,我正在寻找一个面向字符而不是面向字节的 ABNF 版本(可能还有一些基本规则);RFC 5234 对此唯一要说的是第 2.4 节:
2.4. External Encodings
External representations of terminal value characters will vary
according to constraints in the storage or transmission environment.
Hence, the same ABNF-based grammar may have multiple external
encodings, such as one for a 7-bit US-ASCII environment, another for
a binary octet environment, and still a different one when 16-bit
Unicode is used. Encoding details are beyond the scope of ABNF, …Run Code Online (Sandbox Code Playgroud) 增广巴科斯-诺尔范式中的替代运算符 ( /)是否可交换?
例如,与s = a / b相同吗s = b / a?