diff --git a/src/comments.md b/src/comments.md index 59442c67e..54d2cebaa 100644 --- a/src/comments.md +++ b/src/comments.md @@ -2,7 +2,7 @@ > **Lexer**\ > LINE_COMMENT :\ ->       `//` (~[`/` `!`] | `//`) ~`\n`\*\ +>       `//` (~[`/` `!` \\n] | `//`) ~\\n\*\ >    | `//` > > BLOCK_COMMENT :\ @@ -12,16 +12,16 @@ >    | `/***/` > > INNER_LINE_DOC :\ ->    `//!` ~[`\n` _IsolatedCR_]\* +>    `//!` ~[\\n _IsolatedCR_]\* > > INNER_BLOCK_DOC :\ >    `/*!` ( _BlockCommentOrDoc_ | ~[`*/` _IsolatedCR_] )\* `*/` > > OUTER_LINE_DOC :\ ->    `///` (~`/` ~[`\n` _IsolatedCR_]\*)? +>    `///` (~[`/` \\n _IsolatedCR_] ~[\\n _IsolatedCR_]\*)? > > OUTER_BLOCK_DOC :\ ->    `/**` (~`*` | _BlockCommentOrDoc_ ) +>    `/**` (~[`*` _IsolatedCR_] | _BlockCommentOrDoc_ ) > (_BlockCommentOrDoc_ | ~[`*/` _IsolatedCR_])\* `*/` > > _BlockCommentOrDoc_ :\ @@ -30,7 +30,7 @@ >    | INNER_BLOCK_DOC > > _IsolatedCR_ :\ ->    _A `\r` not followed by a `\n`_ +>    _A_ \\r _not followed by a_ \\n ## Non-doc comments diff --git a/src/identifiers.md b/src/identifiers.md index 809ff3850..68a58b5dd 100644 --- a/src/identifiers.md +++ b/src/identifiers.md @@ -5,9 +5,9 @@ >       [`a`-`z` `A`-`Z`] [`a`-`z` `A`-`Z` `0`-`9` `_`]\*\ >    | `_` [`a`-`z` `A`-`Z` `0`-`9` `_`]+ > -> RAW_IDENTIFIER : `r#` IDENTIFIER_OR_KEYWORD *Except `crate`, `self`, `super`, `Self`* +> RAW_IDENTIFIER : `r#` IDENTIFIER_OR_KEYWORD _except_ `crate`, `self`, `super`, `Self` > -> NON_KEYWORD_IDENTIFIER : IDENTIFIER_OR_KEYWORD *Except a [strict] or [reserved] keyword* +> NON_KEYWORD_IDENTIFIER : IDENTIFIER_OR_KEYWORD _except a [strict] or [reserved] keyword_ > > IDENTIFIER :\ > NON_KEYWORD_IDENTIFIER | RAW_IDENTIFIER diff --git a/src/tokens.md b/src/tokens.md index 3fda6cab7..f1f9399da 100644 --- a/src/tokens.md +++ b/src/tokens.md @@ -37,7 +37,7 @@ evaluated (primarily) at compile time. | [Byte string](#byte-string-literals) | `b"hello"` | 0 | All ASCII | [Quote](#quote-escapes) & [Byte](#byte-escapes) | | [Raw byte string](#raw-byte-string-literals) | `br#"hello"#` | 0 or more\* | All ASCII | `N/A` | -\* The number of `#`s on each side of the same literal must be equivalent +\* The number of `#`s on each side of the same literal must be equal. #### ASCII escapes @@ -231,7 +231,7 @@ r##"foo #"# bar"##; // foo #"# bar >    `b'` ( ASCII_FOR_CHAR | BYTE_ESCAPE ) `'` > > ASCII_FOR_CHAR :\ ->    _any ASCII (i.e. 0x00 to 0x7F), except_ `'`, `\`, \\n, \\r or \\t +>    _any ASCII (i.e. 0x00 to 0x7F), except_ `'`, `\`, \\n, \\r _or_ \\t > > BYTE_ESCAPE :\ >       `\x` HEX_DIGIT HEX_DIGIT\ @@ -283,7 +283,7 @@ following forms: > > RAW_BYTE_STRING_CONTENT :\ >       `"` ASCII* (non-greedy) `"`\ ->    | `#` RAW_STRING_CONTENT `#` +>    | `#` RAW_BYTE_STRING_CONTENT `#` > > ASCII :\ >    _any ASCII (i.e. 0x00 to 0x7F)_