mirror of
https://github.com/ProvableHQ/leo.git
synced 2025-01-07 03:00:50 +03:00
ce2d8f8a51
This is to match the recent introduction of the `@program` annotation for external functions (i.e. functions that may be called externally, passing to them inputs through the input files). This PR adds not just that annotation, but a more general notion of annotation as a new kind of token of the form `@<identifier>`, and with the ability to precede each function declaration with zero or more such annotations. The fact that it has been added as a token to the lexical grammar, means that there cannot be any whitespace or comments between the `@` and the identifier. If that is undesired, we can add it to the syntactic grammar instead, defining an annotation as consisting of the (new) symbol token `@` followed by an identifier token. We can of course extend annotations with arguments at some point, if needed. |
||
---|---|---|
.. | ||
src | ||
.gitattributes | ||
abnf-grammar.txt | ||
Cargo.toml | ||
README.md |
# ABNF Grammar
This directory contains both the ABNF grammar for the Leo language and a Rust binary to help convert the ABNF grammar file to a markdown file.
Markdown Conversion Instructions
Assuming you are in the grammar directory,
run cargo run abnf-grammar.txt > README.md
.