diff options
author | Himbeer <himbeer@disroot.org> | 2024-09-11 13:11:02 +0200 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2024-09-11 13:14:03 +0200 |
commit | a902c1ada4653fa184b4c4162ee55b42b858fb51 (patch) | |
tree | 70e0c39188dbce14ad575abf3cb3d782407fe790 | |
parent | 28e03c50c70f689f1c3f1b6e10c54c335371cb21 (diff) |
Add boolean AND and OR to the grammar
-rw-r--r-- | doc/grammar.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/grammar.txt b/doc/grammar.txt index c78e2a6..969740c 100644 --- a/doc/grammar.txt +++ b/doc/grammar.txt @@ -61,7 +61,10 @@ enum := "enum" [ expression ] "{" ( NAME ), "}" union := "union" [ type ] "{" fields "}" fields := ( NAME type ), -expression := equality | comparison +expression := disjunction +disjunction := conjunction ( "||" conjunction )* +conjunction := boolean ( "&&" boolean )* +boolean := equality | comparison equality := comparison ( "==" | "!=" ) comparison comparison := term [ ( "<" | "<=" | ">" | ">=" ) term ] term := numeral [ ( "<<" | ">>" ) numeral ] |