Skip to content

Commit

Permalink
[spec] Allow explicit keyword definitions (#1553)
Browse files Browse the repository at this point in the history
Rather than describing keyword tokens as always being defined implicitly by terminal symbols in syntactic productions, describe them as being defined implicitly or explicitly. This accounts for the explicit definitions of `offset` and `align` phrases, which are lexically keywords, later in the chapter.

Fixes #1552.
  • Loading branch information
tlively authored Oct 28, 2022
1 parent 9789e17 commit 1831a38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion document/core/text/lexical.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ That is, the next token always consists of the longest possible sequence of char
Tokens can be separated by :ref:`white space <text-space>`,
but except for strings, they cannot themselves contain whitespace.

The set of *keyword* tokens is defined implicitly, by all occurrences of a :ref:`terminal symbol <text-grammar>` in literal form, such as :math:`\text{keyword}`, in a :ref:`syntactic <text-syntactic>` production of this chapter.
*Keyword* tokens are defined either implicitly by an occurrence of a :ref:`terminal symbol <text-grammar>` in literal form, such as :math:`\text{keyword}`, in a :ref:`syntactic <text-syntactic>` production of this chapter, or explicitly where they arise in this chapter.

Any token that does not fall into any of the other categories is considered *reserved*, and cannot occur in source text.

Expand Down

0 comments on commit 1831a38

Please sign in to comment.