aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2020-10-14 11:46:18 -0600
committerMelody Horn <melody@boringcactus.com>2020-10-14 11:46:18 -0600
commit3b468950ed988b84fbea4232ceed23d68637a266 (patch)
treedb4f882e97abdb9103e47d5b81e773fc3aca5b33
parent9e7bc38302bfbb0469073ba8ed77e1cc4c713956 (diff)
downloadspec-3b468950ed988b84fbea4232ceed23d68637a266.tar.gz
spec-3b468950ed988b84fbea4232ceed23d68637a266.zip
allow consistent bitwise and/or chains
-rw-r--r--syntax.md9
1 files changed, 5 insertions, 4 deletions
diff --git a/syntax.md b/syntax.md
index 79b92ad..0123d7e 100644
--- a/syntax.md
+++ b/syntax.md
@@ -326,9 +326,9 @@ ArithmeticSuffix ← '+' TermExpression /
BitwiseOpExpression ← ArithmeticExpression '<<' ArithmeticExpression /
ArithmeticExpression '>>' ArithmeticExpression /
- ArithmeticExpression '&' ArithmeticExpression /
ArithmeticExpression '^' ArithmeticExpression /
- ArithmeticExpression '|' ArithmeticExpression /
+ ArithmeticExpression ('&' ArithmeticExpression)+ /
+ ArithmeticExpression ('|' ArithmeticExpression)+ /
ArithmeticExpression
ComparisonExpression ← BitwiseOpExpression '==' BitwiseOpExpression /
@@ -339,8 +339,9 @@ ComparisonExpression ← BitwiseOpExpression '==' BitwiseOpExpression /
BitwiseOpExpression '>' BitwiseOpExpression /
BitwiseOpExpression
-Expression ← ComparisonExpression ('&&' ComparisonExpression)* /
- ComparisonExpression ('||' ComparisonExpression)*
+Expression ← ComparisonExpression ('&&' ComparisonExpression)+ /
+ ComparisonExpression ('||' ComparisonExpression)+ /
+ ComparisonExpression
```
[![Creative Commons BY-SA License](https://i.creativecommons.org/l/by-sa/4.0/80x15.png)](http://creativecommons.org/licenses/by-sa/4.0/)