[ABNF] Remove explicit author info, as discussed.

This commit is contained in:
Alessandro Coglio 2021-04-05 21:54:40 -07:00
parent 797e8ceffd
commit 880f2cd200
2 changed files with 30 additions and 36 deletions

View File

@ -5,10 +5,6 @@ Leo Library
Copyright (C) 2021 Aleo Systems Inc.
Author: Alessandro Coglio (acoglio on GitHub)
--------
@ -484,7 +480,7 @@ according to the extra-grammatical rule of the longest sequence.
newline = line-feed / carriage-return / carriage-return line-feed
```
Go to: _[line-feed](#user-content-line-feed), [carriage-return](#user-content-carriage-return)_;
Go to: _[carriage-return](#user-content-carriage-return), [line-feed](#user-content-line-feed)_;
Line terminators form whitespace, along with spaces and horizontal tabs.
@ -494,7 +490,7 @@ Line terminators form whitespace, along with spaces and horizontal tabs.
whitespace = space / horizontal-tab / newline
```
Go to: _[newline](#user-content-newline), [space](#user-content-space), [horizontal-tab](#user-content-horizontal-tab)_;
Go to: _[space](#user-content-space), [newline](#user-content-newline), [horizontal-tab](#user-content-horizontal-tab)_;
There are two kinds of comments in Leo, as in other languages.
@ -512,7 +508,7 @@ the ones used in the Java language specification.
comment = block-comment / end-of-line-comment
```
Go to: _[block-comment](#user-content-block-comment), [end-of-line-comment](#user-content-end-of-line-comment)_;
Go to: _[end-of-line-comment](#user-content-end-of-line-comment), [block-comment](#user-content-block-comment)_;
<a name="block-comment"></a>
@ -529,7 +525,7 @@ rest-of-block-comment = "*" rest-of-block-comment-after-star
/ not-star rest-of-block-comment
```
Go to: _[not-star](#user-content-not-star), [rest-of-block-comment](#user-content-rest-of-block-comment), [rest-of-block-comment-after-star](#user-content-rest-of-block-comment-after-star)_;
Go to: _[rest-of-block-comment](#user-content-rest-of-block-comment), [rest-of-block-comment-after-star](#user-content-rest-of-block-comment-after-star), [not-star](#user-content-not-star)_;
<a name="rest-of-block-comment-after-star"></a>
@ -539,7 +535,7 @@ rest-of-block-comment-after-star = "/"
/ not-star-or-slash rest-of-block-comment
```
Go to: _[rest-of-block-comment-after-star](#user-content-rest-of-block-comment-after-star), [not-star-or-slash](#user-content-not-star-or-slash), [rest-of-block-comment](#user-content-rest-of-block-comment)_;
Go to: _[rest-of-block-comment](#user-content-rest-of-block-comment), [rest-of-block-comment-after-star](#user-content-rest-of-block-comment-after-star), [not-star-or-slash](#user-content-not-star-or-slash)_;
<a name="end-of-line-comment"></a>
@ -614,7 +610,7 @@ lowercase-letter = %x61-7A ; a-z
letter = uppercase-letter / lowercase-letter
```
Go to: _[uppercase-letter](#user-content-uppercase-letter), [lowercase-letter](#user-content-lowercase-letter)_;
Go to: _[lowercase-letter](#user-content-lowercase-letter), [uppercase-letter](#user-content-uppercase-letter)_;
An identifier is a non-empty sequence of letters, digits, and underscores,
@ -826,7 +822,7 @@ atomic-literal = untyped-literal
/ address-literal
```
Go to: _[product-group-literal](#user-content-product-group-literal), [boolean-literal](#user-content-boolean-literal), [field-literal](#user-content-field-literal), [address-literal](#user-content-address-literal), [signed-literal](#user-content-signed-literal), [untyped-literal](#user-content-untyped-literal), [unsigned-literal](#user-content-unsigned-literal)_;
Go to: _[address-literal](#user-content-address-literal), [untyped-literal](#user-content-untyped-literal), [field-literal](#user-content-field-literal), [boolean-literal](#user-content-boolean-literal), [unsigned-literal](#user-content-unsigned-literal), [product-group-literal](#user-content-product-group-literal), [signed-literal](#user-content-signed-literal)_;
After defining the (mostly) alphanumeric tokens above,
@ -899,7 +895,7 @@ token = keyword
/ symbol
```
Go to: _[annotation-name](#user-content-annotation-name), [atomic-literal](#user-content-atomic-literal), [symbol](#user-content-symbol), [keyword](#user-content-keyword), [package-name](#user-content-package-name), [identifier](#user-content-identifier), [formatted-string](#user-content-formatted-string)_;
Go to: _[identifier](#user-content-identifier), [keyword](#user-content-keyword), [package-name](#user-content-package-name), [formatted-string](#user-content-formatted-string), [annotation-name](#user-content-annotation-name), [atomic-literal](#user-content-atomic-literal), [symbol](#user-content-symbol)_;
@ -956,7 +952,7 @@ group-type = "group"
arithmetic-type = integer-type / field-type / group-type
```
Go to: _[field-type](#user-content-field-type), [group-type](#user-content-group-type), [integer-type](#user-content-integer-type)_;
Go to: _[integer-type](#user-content-integer-type), [group-type](#user-content-group-type), [field-type](#user-content-field-type)_;
The arithmetic types, along with the boolean and address types,
@ -977,7 +973,7 @@ address-type = "address"
scalar-type = boolean-type / arithmetic-type / address-type
```
Go to: _[address-type](#user-content-address-type), [boolean-type](#user-content-boolean-type), [arithmetic-type](#user-content-arithmetic-type)_;
Go to: _[boolean-type](#user-content-boolean-type), [arithmetic-type](#user-content-arithmetic-type), [address-type](#user-content-address-type)_;
Circuit types are denoted by identifiers and the keyword 'Self'.
@ -994,7 +990,7 @@ self-type = "Self"
circuit-type = identifier / self-type
```
Go to: _[self-type](#user-content-self-type), [identifier](#user-content-identifier)_;
Go to: _[identifier](#user-content-identifier), [self-type](#user-content-self-type)_;
A tuple type consists of zero, two, or more component types.
@ -1039,7 +1035,7 @@ i.e. types whose values contain (sub)values
aggregate-type = tuple-type / array-type / circuit-type
```
Go to: _[array-type](#user-content-array-type), [circuit-type](#user-content-circuit-type), [tuple-type](#user-content-tuple-type)_;
Go to: _[tuple-type](#user-content-tuple-type), [circuit-type](#user-content-circuit-type), [array-type](#user-content-array-type)_;
Scalar and aggregate types form all the types.
@ -1130,7 +1126,7 @@ primary-expression = identifier
/ circuit-expression
```
Go to: _[identifier](#user-content-identifier), [expression](#user-content-expression), [circuit-expression](#user-content-circuit-expression), [tuple-expression](#user-content-tuple-expression), [array-expression](#user-content-array-expression), [literal](#user-content-literal)_;
Go to: _[tuple-expression](#user-content-tuple-expression), [identifier](#user-content-identifier), [literal](#user-content-literal), [array-expression](#user-content-array-expression), [circuit-expression](#user-content-circuit-expression), [expression](#user-content-expression)_;
There are tuple expressions to construct and deconstruct tuples.
@ -1199,7 +1195,7 @@ Go to: _[expression](#user-content-expression)_;
array-repeat-construction = "[" expression ";" array-dimensions "]"
```
Go to: _[array-dimensions](#user-content-array-dimensions), [expression](#user-content-expression)_;
Go to: _[expression](#user-content-expression), [array-dimensions](#user-content-array-dimensions)_;
<a name="array-construction"></a>
@ -1245,7 +1241,7 @@ Go to: _[circuit-inline-element](#user-content-circuit-inline-element), [circuit
circuit-inline-element = identifier ":" expression / identifier
```
Go to: _[identifier](#user-content-identifier), [expression](#user-content-expression)_;
Go to: _[expression](#user-content-expression), [identifier](#user-content-identifier)_;
<a name="circuit-expression"></a>
@ -1288,7 +1284,7 @@ postfix-expression = primary-expression
/ postfix-expression "[" [expression] ".." [expression] "]"
```
Go to: _[primary-expression](#user-content-primary-expression), [natural](#user-content-natural), [function-arguments](#user-content-function-arguments), [circuit-type](#user-content-circuit-type), [identifier](#user-content-identifier), [expression](#user-content-expression), [postfix-expression](#user-content-postfix-expression)_;
Go to: _[postfix-expression](#user-content-postfix-expression), [natural](#user-content-natural), [primary-expression](#user-content-primary-expression), [function-arguments](#user-content-function-arguments), [circuit-type](#user-content-circuit-type), [identifier](#user-content-identifier), [expression](#user-content-expression)_;
Unary operators have the highest operator precedence.
@ -1374,7 +1370,7 @@ equality-expression = ordering-expression
/ equality-expression "!=" ordering-expression
```
Go to: _[equality-expression](#user-content-equality-expression), [ordering-expression](#user-content-ordering-expression)_;
Go to: _[ordering-expression](#user-content-ordering-expression), [equality-expression](#user-content-equality-expression)_;
Next come conjunctive expressions, left-associative.
@ -1396,7 +1392,7 @@ disjunctive-expression = conjunctive-expression
/ disjunctive-expression "||" conjunctive-expression
```
Go to: _[disjunctive-expression](#user-content-disjunctive-expression), [conjunctive-expression](#user-content-conjunctive-expression)_;
Go to: _[conjunctive-expression](#user-content-conjunctive-expression), [disjunctive-expression](#user-content-disjunctive-expression)_;
Finally we have conditional expressions.
@ -1409,7 +1405,7 @@ conditional-expression = disjunctive-expression
":" conditional-expression
```
Go to: _[disjunctive-expression](#user-content-disjunctive-expression), [expression](#user-content-expression), [conditional-expression](#user-content-conditional-expression)_;
Go to: _[disjunctive-expression](#user-content-disjunctive-expression), [conditional-expression](#user-content-conditional-expression), [expression](#user-content-expression)_;
These are all the expressions.
@ -1442,7 +1438,7 @@ statement = expression-statement
/ block
```
Go to: _[expression-statement](#user-content-expression-statement), [return-statement](#user-content-return-statement), [console-statement](#user-content-console-statement), [loop-statement](#user-content-loop-statement), [conditional-statement](#user-content-conditional-statement), [assignment-statement](#user-content-assignment-statement), [block](#user-content-block), [variable-definition-statement](#user-content-variable-definition-statement)_;
Go to: _[expression-statement](#user-content-expression-statement), [variable-definition-statement](#user-content-variable-definition-statement), [loop-statement](#user-content-loop-statement), [return-statement](#user-content-return-statement), [conditional-statement](#user-content-conditional-statement), [block](#user-content-block), [assignment-statement](#user-content-assignment-statement), [console-statement](#user-content-console-statement)_;
<a name="block"></a>
@ -1485,7 +1481,7 @@ variable-definition-statement = ( "let" / "const" )
[ ":" type ] "=" expression ";"
```
Go to: _[type](#user-content-type), [identifier-or-identifiers](#user-content-identifier-or-identifiers), [expression](#user-content-expression)_;
Go to: _[expression](#user-content-expression), [type](#user-content-type), [identifier-or-identifiers](#user-content-identifier-or-identifiers)_;
<a name="identifier-or-identifiers"></a>
@ -1508,7 +1504,7 @@ Note that we require blocks in all branches, not merely statements.
branch = "if" expression block
```
Go to: _[expression](#user-content-expression), [block](#user-content-block)_;
Go to: _[block](#user-content-block), [expression](#user-content-expression)_;
<a name="conditional-statement"></a>
@ -1603,7 +1599,7 @@ Go to: _[formatted-string](#user-content-formatted-string)_;
print-call = print-function print-arguments
```
Go to: _[print-arguments](#user-content-print-arguments), [print-function](#user-content-print-function)_;
Go to: _[print-function](#user-content-print-function), [print-arguments](#user-content-print-arguments)_;
An annotation consists of an annotation name (which starts with '@')
@ -1616,7 +1612,7 @@ annotation = annotation-name
[ "(" identifier *( "," identifier ) ")" ]
```
Go to: _[annotation-name](#user-content-annotation-name), [identifier](#user-content-identifier)_;
Go to: _[identifier](#user-content-identifier), [annotation-name](#user-content-annotation-name)_;
A function declaration defines a function.
@ -1636,7 +1632,7 @@ function-declaration = *annotation "function" identifier
block
```
Go to: _[identifier](#user-content-identifier), [function-parameters](#user-content-function-parameters), [block](#user-content-block), [type](#user-content-type)_;
Go to: _[function-parameters](#user-content-function-parameters), [block](#user-content-block), [identifier](#user-content-identifier), [type](#user-content-type)_;
<a name="function-parameters"></a>
@ -1668,7 +1664,7 @@ Go to: _[function-input](#user-content-function-input)_;
function-input = [ "const" ] identifier ":" type
```
Go to: _[type](#user-content-type), [identifier](#user-content-identifier)_;
Go to: _[identifier](#user-content-identifier), [type](#user-content-type)_;
<a name="input-parameter"></a>
@ -1695,7 +1691,7 @@ Go to: _[member-function-declaration](#user-content-member-function-declaration)
member-variable-declaration = identifier ":" type
```
Go to: _[identifier](#user-content-identifier), [type](#user-content-type)_;
Go to: _[type](#user-content-type), [identifier](#user-content-identifier)_;
<a name="member-function-declaration"></a>
@ -1716,7 +1712,7 @@ circuit-declaration = *annotation "circuit" identifier
"{" member-declaration *( "," member-declaration ) "}"
```
Go to: _[identifier](#user-content-identifier), [member-declaration](#user-content-member-declaration)_;
Go to: _[member-declaration](#user-content-member-declaration), [identifier](#user-content-identifier)_;
An import declaration consists of the 'import' keyword
@ -1745,7 +1741,7 @@ package-path = "*"
/ "(" package-path *( "," package-path ) [","] ")"
```
Go to: _[package-path](#user-content-package-path), [identifier](#user-content-identifier), [package-name](#user-content-package-name)_;
Go to: _[package-path](#user-content-package-path), [package-name](#user-content-package-name), [identifier](#user-content-identifier)_;
Finally, we define a file as a sequence of zero or more declarations.
@ -1763,7 +1759,7 @@ declaration = import-declaration
/ circuit-declaration
```
Go to: _[function-declaration](#user-content-function-declaration), [circuit-declaration](#user-content-circuit-declaration), [import-declaration](#user-content-import-declaration)_;
Go to: _[import-declaration](#user-content-import-declaration), [function-declaration](#user-content-function-declaration), [circuit-declaration](#user-content-circuit-declaration)_;
<a name="file"></a>

View File

@ -1,8 +1,6 @@
; Leo Library
;
; Copyright (C) 2021 Aleo Systems Inc.
;
; Author: Alessandro Coglio (acoglio on GitHub)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;