adobe / htl-spec

HTML Template Language Specification
Apache License 2.0
281 stars 147 forks source link

The EBNF doesn't correctly describe the 'in' operator #70

Closed karollewandowski closed 5 years ago

karollewandowski commented 6 years ago

The in relational operation is defined as:

inBinaryOp = comparisonOp {, 'in', comparisonOp};

It allows creating expressions like:

${value1 in value2 in value3 in value4 in value5}

What doesn't make much practical sense as in operation results in boolean. Is it on purpose and I'm missing some practical usages or it should be:

inBinaryOp = comparisonOp
           | comparisonOp, 'in', comparisonOp;

?

raducotescu commented 6 years ago

@karollewandowski, you're right. The grammar here should have used the [ ] braces to indicate a zero or one matching.