diff options
author | Himbeer <himbeer@disroot.org> | 2024-09-11 13:19:24 +0200 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2024-09-11 13:19:24 +0200 |
commit | 0bbcb08f81a5b904f0ba343c36a02ca80669c1c4 (patch) | |
tree | 27920969e3fbebd17adf023049dda842713bce98 /doc | |
parent | a902c1ada4653fa184b4c4162ee55b42b858fb51 (diff) |
Add boolean algebra to the grammar
Diffstat (limited to 'doc')
-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 969740c..8616eca 100644 --- a/doc/grammar.txt +++ b/doc/grammar.txt @@ -69,7 +69,10 @@ equality := comparison ( "==" | "!=" ) comparison comparison := term [ ( "<" | "<=" | ">" | ">=" ) term ] term := numeral [ ( "<<" | ">>" ) numeral ] numeral := factor ( ( "+" | "-" ) factor )* -factor := unaryprefix ( ( "*" | "/" | "%" ) unaryprefix )* +factor := binary ( ( "*" | "/" | "%" ) binary )* +binary := bitsummand ( "|" bitsummand )* +bitsummand := bitfactor ( "^" | bitfactor )* +bitfactor := unaryprefix ( "&" unaryprefix )* unaryprefix := [ "-" | "!" | "~" ] unarypostfix unarypostfix := primary [ "*" | "?" | "!" ] primary := grouping | literal | call | IDENT |