Merge pull request #1684 from AleoHQ/abnf-numeral-is-token

[ABNF] Add numerals to tokens.
This commit is contained in:
Collin Chin 2022-03-15 14:50:56 -07:00 committed by GitHub
commit 07d03b0ff1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -63,7 +63,7 @@ e.g. `<host, see [RFC3986], Section 3.2.2>`,
usable as last resort in the definiens of a nonterminal.
While BNF allows arbitrary terminals,
ABNF uses only natural numbers as terminals,
ABNF uses only natural numbers (i.e. non-negative integers) as terminals,
and denotes them via:
(i) binary, decimal, or hexadecimal sequences,
e.g. `%b1.11.1010`, `%d1.3.10`, and `%x.1.3.A`
@ -888,11 +888,12 @@ is a token, as defined by the following rule.
token = keyword
/ identifier
/ atomic-literal
/ numeral
/ annotation-name
/ symbol
```
Go to: _[annotation-name](#user-content-annotation-name), [atomic-literal](#user-content-atomic-literal), [identifier](#user-content-identifier), [keyword](#user-content-keyword), [symbol](#user-content-symbol)_;
Go to: _[annotation-name](#user-content-annotation-name), [atomic-literal](#user-content-atomic-literal), [identifier](#user-content-identifier), [keyword](#user-content-keyword), [numeral](#user-content-numeral), [symbol](#user-content-symbol)_;
Tokens, comments, and whitespace are lexemes, i.e. lexical units.

View File

@ -588,6 +588,7 @@ symbol = "!" / "&" / "&&" / "||"
token = keyword
/ identifier
/ atomic-literal
/ numeral
/ annotation-name
/ symbol