leo/docs/grammar
Alessandro Coglio 64307d075c [ABNF] Add new operators.
This adds shift (`<<` `>>`) and bitwise logical (`&` `|` `^`) operators.

Their precedence is between the additive and ordering operations, in this order
(higher to lower):
- ... others, to additive
- `<<` and `>>`
- `&`
- `|`
- `^`
- ... others, from ordering

This is consistent with Rust, but not with C and Java, both of which make the
bitwise logical operators lower-precedence than equalities.

The previous ABNF rule names for `conjunctive-expression` and
`disjunctive-expression` have been renamed to be more consistent with the newly
added ones. Also, the rule names "abbreviate" 'conjunctive' and 'disjunctive'
with 'and' and 'or', otherwise the names were a bit too long.
2022-06-16 14:02:22 -07:00
..
src restructure compiler and delete unused code 2022-02-22 15:12:52 -08:00
.gitattributes [ABNF] Simplify .gitattribute file. 2022-05-28 18:35:03 -07:00
abnf-grammar.txt [ABNF] Add new operators. 2022-06-16 14:02:22 -07:00
Cargo.toml restructure compiler and delete unused code 2022-02-22 15:12:52 -08:00
README.md [ABNF] Minor README fixes and improvements. 2022-05-28 18:47:27 -07:00

# 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.