opa
opa copied to clipboard
Rego grammar from the documentation is out-of-date
There are a few instances where the grammar has not kept up-to-date with the parser:
1. The % operator is missing
2. data.refrules.fruit["[color.name](http://color.name/)"](fruit.apple, "green") is a valid expr-call
3. expressions in a ref-arg-brack (i.e. x[i + 1]) are allowed
- We can just add % to arith-operator
- I think expr-call should be
term "(" [ expr { "," expr } ] ")"
because even[1](2)
parses (it just fails to compile...) - I think ref-arg-brack should be
"[" (term | expr-call | expr-infix "]"
We should check the parser for 2 and 3.
This issue has been automatically marked as inactive because it has not had any activity in the last 30 days. Although currently inactive, the issue could still be considered and actively worked on in the future. More details about the use-case this issue attempts to address, the value provided by completing it or possible solutions to resolve it would help to prioritize the issue.