mirror of
https://github.com/AleoHQ/leo.git
synced 2024-11-13 08:47:17 +03:00
Merge pull request #1684 from AleoHQ/abnf-numeral-is-token
[ABNF] Add numerals to tokens.
This commit is contained in:
commit
07d03b0ff1
@ -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.
|
||||
|
@ -588,6 +588,7 @@ symbol = "!" / "&" / "&&" / "||"
|
||||
token = keyword
|
||||
/ identifier
|
||||
/ atomic-literal
|
||||
/ numeral
|
||||
/ annotation-name
|
||||
/ symbol
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user