Skip to content

Commit

Permalink
policy-reference: update EBNF to include "every" and "some x in ..."
Browse files Browse the repository at this point in the history
Fixes open-policy-agent#4216.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
  • Loading branch information
srenatus committed Feb 21, 2022
1 parent 582b274 commit b005ba3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/content/policy-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1163,10 +1163,11 @@ rule-body = [ "else" [ "=" term ] ] "{" query "}"
query = literal { ( ";" | ( [CR] LF ) ) literal }
literal = ( some-decl | expr | "not" expr ) { with-modifier }
with-modifier = "with" term "as" term
some-decl = "some" var { "," var }
expr = term | expr-call | expr-infix
expr-call = var [ "." var ] "(" [ term { "," term } ] ")"
expr-infix = [ term "=" ] term infix-operator term
some-decl = "some" term { "," term } { "in" expr }
expr = term | expr-call | expr-infix | expr-every
expr-call = var [ "." var ] "(" [ expr { "," expr } ] ")"
expr-infix = [ term "=" ] expr infix-operator expr
expr-every = "every" var { "," var } "in" ( term | expr-call | expr-infix ) "{" query "}"
term = ref | var | scalar | array | object | set | array-compr | object-compr | set-compr
array-compr = "[" term "|" rule-body "]"
set-compr = "{" term "|" rule-body "}"
Expand Down

0 comments on commit b005ba3

Please sign in to comment.