From 13504f9928eb7330be78f014d754805b348cc704 Mon Sep 17 00:00:00 2001 From: Kesha Hietala Date: Mon, 23 Sep 2024 09:22:42 -0600 Subject: [PATCH] update policy grammar --- docs/collections/_policies/syntax-grammar.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/collections/_policies/syntax-grammar.md b/docs/collections/_policies/syntax-grammar.md index 804c1a4..501624d 100644 --- a/docs/collections/_policies/syntax-grammar.md +++ b/docs/collections/_policies/syntax-grammar.md @@ -151,7 +151,7 @@ Member ::= Primary {Access} ## `Annotation` {#grammar-annotation} ``` -Annotation ::= '@'IDENT'('STR')' +Annotation ::= '@'ANYIDENT'('STR')' ``` ## `Access` {#grammar-access} @@ -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} @@ -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}