Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[spec] Allow explicit keyword definitions
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.
tlively authored Oct 21, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 683e402 commit 1722424
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
@@ -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.

0 comments on commit 1722424

Please sign in to comment.