mirror of
https://github.com/AleoHQ/leo.git
synced 2024-12-19 23:52:02 +03:00
Merge branch 'testnet3' into improve-parser-tests
This commit is contained in:
commit
cc63b7e524
8
Cargo.lock
generated
8
Cargo.lock
generated
@ -1801,9 +1801,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "reqwest"
|
name = "reqwest"
|
||||||
version = "0.11.9"
|
version = "0.11.10"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "87f242f1488a539a79bac6dbe7c8609ae43b7914b7736210f239a37cccb32525"
|
checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64",
|
"base64",
|
||||||
"bytes",
|
"bytes",
|
||||||
@ -2665,9 +2665,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "winreg"
|
name = "winreg"
|
||||||
version = "0.7.0"
|
version = "0.10.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69"
|
checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"winapi 0.3.9",
|
"winapi 0.3.9",
|
||||||
]
|
]
|
||||||
|
@ -82,7 +82,7 @@ version = "0.8"
|
|||||||
version = "0.6.3"
|
version = "0.6.3"
|
||||||
|
|
||||||
[dependencies.reqwest]
|
[dependencies.reqwest]
|
||||||
version = "0.11.9"
|
version = "0.11.10"
|
||||||
features = [ "blocking", "json", "multipart" ]
|
features = [ "blocking", "json", "multipart" ]
|
||||||
|
|
||||||
[dependencies.self_update]
|
[dependencies.self_update]
|
||||||
|
@ -63,7 +63,7 @@ e.g. `<host, see [RFC3986], Section 3.2.2>`,
|
|||||||
usable as last resort in the definiens of a nonterminal.
|
usable as last resort in the definiens of a nonterminal.
|
||||||
|
|
||||||
While BNF allows arbitrary terminals,
|
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:
|
and denotes them via:
|
||||||
(i) binary, decimal, or hexadecimal sequences,
|
(i) binary, decimal, or hexadecimal sequences,
|
||||||
e.g. `%b1.11.1010`, `%d1.3.10`, and `%x.1.3.A`
|
e.g. `%b1.11.1010`, `%d1.3.10`, and `%x.1.3.A`
|
||||||
@ -335,15 +335,26 @@ unary-expression = postfix-expression
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
In order to allow the recursion of the rule to stop,
|
and
|
||||||
we need to regard, in the grammar, a primary expression as a unary expression
|
|
||||||
(i.e. a primary expression is also a unary expression in the grammar;
|
|
||||||
but note that the opposite is not true).
|
|
||||||
However, this is just a grammatical artifact:
|
```
|
||||||
ontologically, a primary expression is not really a unary expression,
|
postfix-expression = primary-expression
|
||||||
because a unary expression is one that consists of
|
/ postfix-expression "." natural
|
||||||
a unary operator and an operand sub-expression.
|
/ ...
|
||||||
These terminological exceptions should be easy to identify in the rules.
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
In order to allow the recursion of the rule to stop, we need to regard, in the
|
||||||
|
grammar, a postfix or primary expression as a unary expression (i.e. a postfix
|
||||||
|
or primary expression is also a unary expression in the grammar; but note that
|
||||||
|
the opposite is not true). However, this is just a grammatical artifact:
|
||||||
|
ontologically, a postfix or primary expression is not really a unary
|
||||||
|
expression, because a unary expression is one that consists of a unary
|
||||||
|
operator and an operand sub-expression. These terminological exceptions
|
||||||
|
should be easy to identify in the rules.
|
||||||
|
|
||||||
|
|
||||||
--------
|
--------
|
||||||
@ -877,11 +888,12 @@ is a token, as defined by the following rule.
|
|||||||
token = keyword
|
token = keyword
|
||||||
/ identifier
|
/ identifier
|
||||||
/ atomic-literal
|
/ atomic-literal
|
||||||
|
/ numeral
|
||||||
/ annotation-name
|
/ annotation-name
|
||||||
/ symbol
|
/ 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.
|
Tokens, comments, and whitespace are lexemes, i.e. lexical units.
|
||||||
@ -1241,7 +1253,8 @@ Go to: _[circuit-construction](#user-content-circuit-construction)_;
|
|||||||
|
|
||||||
|
|
||||||
After primary expressions, postfix expressions have highest precedence.
|
After primary expressions, postfix expressions have highest precedence.
|
||||||
They apply to primary expressions, and recursively to postfix expressions.
|
They can be primary expressions, and there are a few kinds of postfix
|
||||||
|
expressions that have postfix expression subcomponents.
|
||||||
|
|
||||||
There are postfix expressions to access parts of aggregate values.
|
There are postfix expressions to access parts of aggregate values.
|
||||||
A tuple access selects a component by index (zero-based).
|
A tuple access selects a component by index (zero-based).
|
||||||
@ -1258,7 +1271,7 @@ There are three kinds of function calls:
|
|||||||
top-level function calls,
|
top-level function calls,
|
||||||
instance (i.e. non-static) member function calls, and
|
instance (i.e. non-static) member function calls, and
|
||||||
static member function calls.
|
static member function calls.
|
||||||
What changes is the start, but they all end in an argument list.
|
They start differently, but they all end in an argument list.
|
||||||
|
|
||||||
Accesses to static constants are also postfix expressions.
|
Accesses to static constants are also postfix expressions.
|
||||||
They consist of a named type followed by the constant name,
|
They consist of a named type followed by the constant name,
|
||||||
@ -1355,8 +1368,8 @@ ordering-expression = additive-expression
|
|||||||
Go to: _[additive-expression](#user-content-additive-expression)_;
|
Go to: _[additive-expression](#user-content-additive-expression)_;
|
||||||
|
|
||||||
|
|
||||||
Equalities return booleans but may also operate on booleans;
|
Next in the precedence order are equivalence relations.
|
||||||
the rule below makes them left-associative.
|
These are not associative, since `a == b == c` could be confusing.
|
||||||
|
|
||||||
<a name="equality-expression"></a>
|
<a name="equality-expression"></a>
|
||||||
```abnf
|
```abnf
|
||||||
|
@ -267,15 +267,20 @@
|
|||||||
; / "!" unary-expression
|
; / "!" unary-expression
|
||||||
; / "-" unary-expression
|
; / "-" unary-expression
|
||||||
;
|
;
|
||||||
; In order to allow the recursion of the rule to stop,
|
; and
|
||||||
; we need to regard, in the grammar, a primary expression as a unary expression
|
;
|
||||||
; (i.e. a primary expression is also a unary expression in the grammar;
|
; postfix-expression = primary-expression
|
||||||
; but note that the opposite is not true).
|
; / postfix-expression "." natural
|
||||||
; However, this is just a grammatical artifact:
|
; / ...
|
||||||
; ontologically, a primary expression is not really a unary expression,
|
;
|
||||||
; because a unary expression is one that consists of
|
; In order to allow the recursion of the rule to stop, we need to regard, in the
|
||||||
; a unary operator and an operand sub-expression.
|
; grammar, a postfix or primary expression as a unary expression (i.e. a postfix
|
||||||
; These terminological exceptions should be easy to identify in the rules.
|
; or primary expression is also a unary expression in the grammar; but note that
|
||||||
|
; the opposite is not true). However, this is just a grammatical artifact:
|
||||||
|
; ontologically, a postfix or primary expression is not really a unary
|
||||||
|
; expression, because a unary expression is one that consists of a unary
|
||||||
|
; operator and an operand sub-expression. These terminological exceptions
|
||||||
|
; should be easy to identify in the rules.
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
@ -583,6 +588,7 @@ symbol = "!" / "&" / "&&" / "||"
|
|||||||
token = keyword
|
token = keyword
|
||||||
/ identifier
|
/ identifier
|
||||||
/ atomic-literal
|
/ atomic-literal
|
||||||
|
/ numeral
|
||||||
/ annotation-name
|
/ annotation-name
|
||||||
/ symbol
|
/ symbol
|
||||||
|
|
||||||
@ -767,7 +773,8 @@ circuit-inline-element = identifier ":" expression / identifier
|
|||||||
circuit-expression = circuit-construction
|
circuit-expression = circuit-construction
|
||||||
|
|
||||||
; After primary expressions, postfix expressions have highest precedence.
|
; After primary expressions, postfix expressions have highest precedence.
|
||||||
; They apply to primary expressions, and recursively to postfix expressions.
|
; They can be primary expressions, and there are a few kinds of postfix
|
||||||
|
; expressions that have postfix expression subcomponents.
|
||||||
|
|
||||||
; There are postfix expressions to access parts of aggregate values.
|
; There are postfix expressions to access parts of aggregate values.
|
||||||
; A tuple access selects a component by index (zero-based).
|
; A tuple access selects a component by index (zero-based).
|
||||||
@ -784,7 +791,7 @@ circuit-expression = circuit-construction
|
|||||||
; top-level function calls,
|
; top-level function calls,
|
||||||
; instance (i.e. non-static) member function calls, and
|
; instance (i.e. non-static) member function calls, and
|
||||||
; static member function calls.
|
; static member function calls.
|
||||||
; What changes is the start, but they all end in an argument list.
|
; They start differently, but they all end in an argument list.
|
||||||
|
|
||||||
; Accesses to static constants are also postfix expressions.
|
; Accesses to static constants are also postfix expressions.
|
||||||
; They consist of a named type followed by the constant name,
|
; They consist of a named type followed by the constant name,
|
||||||
@ -839,8 +846,8 @@ ordering-expression = additive-expression
|
|||||||
/ additive-expression "<=" additive-expression
|
/ additive-expression "<=" additive-expression
|
||||||
/ additive-expression ">=" additive-expression
|
/ additive-expression ">=" additive-expression
|
||||||
|
|
||||||
; Equalities return booleans but may also operate on booleans;
|
; Next in the precedence order are equivalence relations.
|
||||||
; the rule below makes them left-associative.
|
; These are not associative, since `a == b == c` could be confusing.
|
||||||
|
|
||||||
equality-expression = ordering-expression
|
equality-expression = ordering-expression
|
||||||
/ ordering-expression "==" ordering-expression
|
/ ordering-expression "==" ordering-expression
|
||||||
|
Loading…
Reference in New Issue
Block a user