Closed karollewandowski closed 5 years ago
I noticed one issue with grammar when compared it to ANTLR grammar in Sling implementation project. The comparison operation is incorrect:
comparisonOp = factor {, comparisonOperator, factor};
Such rule would allow to create expression like:
1 < 2 < 3 < 4
Implementation restricts such constructs (I simplified it for readability):
comparisonTerm : factor | factor comparisonOp factor;
@karollewandowski, you're right. The grammar here should have used the [ ] braces to indicate a zero or one matching.
[
]
I noticed one issue with grammar when compared it to ANTLR grammar in Sling implementation project. The comparison operation is incorrect:
Such rule would allow to create expression like:
Implementation restricts such constructs (I simplified it for readability):