mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-23 02:01:54 +03:00
[ABNF] Grammar for pre-testnet3 version.
This is obtained by removing features from the grammar currently in the testnet3 branch. The documentation comments have been removed to keep the file smaller and simpler to read, as readers of this file should be already familiar with Leo. Furthermore, that documentation material is being moved to the Leo Language Reference. This commit also folds the format string grammar (for console print strings) into (a separate section of) the same file, again for simplicity. The previous separate small file (and generated markdown) for format strings has thus been removed.
This commit is contained in:
parent
6ca9a4d870
commit
5c1efa81f7
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,50 +0,0 @@
|
||||
; Copyright (C) 2019-2022 Aleo Systems Inc.
|
||||
; This file is part of the Leo library.
|
||||
|
||||
; The Leo library is free software: you can redistribute it and/or modify
|
||||
; it under the terms of the GNU General Public License as published by
|
||||
; the Free Software Foundation, either version 3 of the License, or
|
||||
; (at your option) any later version.
|
||||
|
||||
; The Leo library is distributed in the hope that it will be useful,
|
||||
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
; GNU General Public License for more details.
|
||||
|
||||
; You should have received a copy of the GNU General Public License
|
||||
; along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
; Background on ABNF
|
||||
; ------------------
|
||||
|
||||
; ABNF is an Internet standard:
|
||||
; for more info please checkout the
|
||||
; [README](./README.md) in this directory.
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
; Format String
|
||||
; -------------------
|
||||
|
||||
; This ABNF grammar consists of one grammar:
|
||||
; that describes how a Leo string-literal is parsed
|
||||
; for formatting. Meaning in this context
|
||||
; all characters are already parsed and we don't
|
||||
; have to worry about escapes or etc.
|
||||
|
||||
not-brace = %x0-7A / %x7C / %x7E-10FFFF ; anything but { or }
|
||||
|
||||
format-string-container = "{}"
|
||||
|
||||
format-string-open-brace = "{{"
|
||||
|
||||
format-string-close-brace = "}}"
|
||||
|
||||
format-string-element = not-brace
|
||||
/ format-string-container
|
||||
/ format-string-open-brace
|
||||
/ format-string-close-brace
|
||||
|
||||
format-string = *format-string-element
|
Loading…
Reference in New Issue
Block a user