mirror of
https://github.com/AleoHQ/leo.git
synced 2024-12-01 10:17:30 +03:00
[ABNF] Add some comments.
Add to the rule for package names, as a comment, the same exclusion added to the rule for identifiers. Also add a few lines to describe it. Also discuss the disambiguation of identifiers and package names.
This commit is contained in:
parent
64ad6a67f3
commit
baace61e21
@ -452,9 +452,15 @@ identifier = letter *( letter / digit / "_" ) ; but not a keyword or aleo1...
|
||||
|
||||
; A package name consists of one or more segments separated by single dashes,
|
||||
; where each segment is a non-empty sequence of lowercase letters and digits.
|
||||
; Similarly to an identifier, a package name must not be keyword
|
||||
; and must not be or start with `aleo1`.
|
||||
|
||||
package-name = lowercase-letter *( lowercase-letter / digit )
|
||||
*( "-" 1*( lowercase-letter / digit ) )
|
||||
; but not a keyword or aleo1...
|
||||
|
||||
; Note that, grammatically, identifiers are also package names.
|
||||
; They are disambiguated from context, based on the syntactic grammar.
|
||||
|
||||
; Annotations have names, which are identifiers immediately preceded by `@`.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user