Skip to content

Commit 86a49fc

Browse files
committed
Introduce a new "prose" terminal
This introduces a new terminal kind that I'm calling a "prose" which describes what the terminal is. This is inspired by the IETF format which uses angle brackets to describe terminals in English.
1 parent 94acc5e commit 86a49fc

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/tokens.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ r[lex.token.byte.syntax]
262262
> &nbsp;&nbsp; `b'` ( ASCII_FOR_CHAR | BYTE_ESCAPE ) `'` SUFFIX<sup>?</sup>
263263
>
264264
> ASCII_FOR_CHAR :\
265-
> &nbsp;&nbsp; _any ASCII (i.e. 0x00 to 0x7F) except_ `'`, `\`, LF, CR, or TAB
265+
> &nbsp;&nbsp; \<any ASCII (i.e. 0x00 to 0x7F) except `'`, `\`, LF, CR, or TAB\>
266266
>
267267
> BYTE_ESCAPE :\
268268
> &nbsp;&nbsp; &nbsp;&nbsp; `\x` HEX_DIGIT HEX_DIGIT\
@@ -285,7 +285,7 @@ r[lex.token.str-byte.syntax]
285285
> &nbsp;&nbsp; `b"` ( ASCII_FOR_STRING | BYTE_ESCAPE | STRING_CONTINUE )<sup>\*</sup> `"` SUFFIX<sup>?</sup>
286286
>
287287
> ASCII_FOR_STRING :\
288-
> &nbsp;&nbsp; _any ASCII (i.e 0x00 to 0x7F) except_ `"`, `\`, _or CR_
288+
> &nbsp;&nbsp; \<any ASCII (i.e 0x00 to 0x7F) except `"`, `\`, or CR\>
289289
290290
r[lex.token.str-byte.intro]
291291
A non-raw _byte string literal_ is a sequence of ASCII characters and _escapes_,
@@ -337,7 +337,7 @@ r[lex.token.str-byte-raw.syntax]
337337
> &nbsp;&nbsp; | `#` RAW_BYTE_STRING_CONTENT `#`
338338
>
339339
> ASCII_FOR_RAW :\
340-
> &nbsp;&nbsp; _any ASCII (i.e. 0x00 to 0x7F) except CR_
340+
> &nbsp;&nbsp; \<any ASCII (i.e. 0x00 to 0x7F) except CR\>
341341
342342
r[lex.token.str-byte-raw.intro]
343343
Raw byte string literals do not process any escapes. They start with the
@@ -693,10 +693,10 @@ r[lex.token.literal.reserved.syntax]
693693
> &nbsp;&nbsp; | ( BIN_LITERAL | OCT_LITERAL | HEX_LITERAL ) `.` \
694694
> &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; _(not immediately followed by `.`, `_` or an XID_Start character)_\
695695
> &nbsp;&nbsp; | ( BIN_LITERAL | OCT_LITERAL ) (`e`|`E`)\
696-
> &nbsp;&nbsp; | `0b` `_`<sup>\*</sup> _end of input or not BIN_DIGIT_\
697-
> &nbsp;&nbsp; | `0o` `_`<sup>\*</sup> _end of input or not OCT_DIGIT_\
698-
> &nbsp;&nbsp; | `0x` `_`<sup>\*</sup> _end of input or not HEX_DIGIT_\
699-
> &nbsp;&nbsp; | DEC_LITERAL ( . DEC_LITERAL)<sup>?</sup> (`e`|`E`) (`+`|`-`)<sup>?</sup> _end of input or not DEC_DIGIT_
696+
> &nbsp;&nbsp; | `0b` `_`<sup>\*</sup> \<end of input or not BIN_DIGIT\>\
697+
> &nbsp;&nbsp; | `0o` `_`<sup>\*</sup> \<end of input or not OCT_DIGIT\>\
698+
> &nbsp;&nbsp; | `0x` `_`<sup>\*</sup> \<end of input or not HEX_DIGIT\>\
699+
> &nbsp;&nbsp; | DEC_LITERAL ( . DEC_LITERAL)<sup>?</sup> (`e`|`E`) (`+`|`-`)<sup>?</sup> \<end of input or not DEC_DIGIT\>
700700
701701
r[lex.token.literal.reserved.intro]
702702
The following lexical forms similar to number literals are _reserved forms_.

0 commit comments

Comments
 (0)