Skip to content

Commit

Permalink
Merge pull request #132 from cedar-policy/khieta/reserved-keywords
Browse files Browse the repository at this point in the history
update policy grammar
  • Loading branch information
shaobo-he-aws authored Sep 24, 2024
2 parents 1536fe1 + 13504f9 commit 998db7e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions docs/collections/_policies/syntax-grammar.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Member ::= Primary {Access}
## `Annotation` {#grammar-annotation}

```
Annotation ::= '@'IDENT'('STR')'
Annotation ::= '@'ANYIDENT'('STR')'
```

## `Access` {#grammar-access}
Expand Down Expand Up @@ -214,10 +214,16 @@ RecInits ::= (IDENT | STR) ':' Expr {',' (IDENT | STR) ':' Expr}
RELOP ::= '<' | '<=' | '>=' | '>' | '!=' | '==' | 'in'
```

## `ANYIDENT` {#grammar-any-ident}

```
ANYIDENT ::= ['_''a'-'z''A'-'Z']['_''a'-'z''A'-'Z''0'-'9']*
```

## `IDENT` {#grammar-ident}

```
IDENT ::= ['_''a'-'z''A'-'Z']['_''a'-'z''A'-'Z''0'-'9']* - RESERVED
IDENT ::= ANYIDENT - RESERVED
```

## `STR` {#grammar-str}
Expand Down Expand Up @@ -253,7 +259,7 @@ INT ::= '-'? ['0'-'9']+
## `RESERVED` {#grammar-reserved}

```
RESERVED ::= BOOL | 'if' | 'then' | 'else' | 'in' | 'like' | 'has' | '__cedar'
RESERVED ::= BOOL | 'if' | 'then' | 'else' | 'in' | 'like' | 'has' | 'is' | '__cedar'
```

## `VAR` {#grammar-var}
Expand Down

0 comments on commit 998db7e

Please sign in to comment.