Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions docs/collections/_schema/human-readable-schema-grammar.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Tokens are defined using regular expressions:
The grammar adopts the same string escaping rules as the [Cedar policy grammar](../policies/syntax-grammar.html).

```
Annotation := '@' IDENT '(' STR ')'
Annotation := '@' ANYIDENT '(' STR ')'
Annotations := {Annotations}
Schema := {Namespace}
Namespace := (Annotations 'namespace' Path '{' {Decl} '}') | Decl
Expand All @@ -57,11 +57,13 @@ Name := IDENT | STR
Names := Name {',' Name}
Idents := IDENT {',' IDENT}

IDENT := ['_''a'-'z''A'-'Z']['_''a'-'z''A'-'Z''0'-'9']*
TYPENAME := IDENT - RESERVED
ANYIDENT := ['_''a'-'z''A'-'Z']['_''a'-'z''A'-'Z''0'-'9']*
IDENT := ANYIDENT - RESERVED
RESERVED := 'true' | 'false' | 'if' | 'then' | 'else' | 'in' | 'like' | 'has' | 'is' | '__cedar'
TYPENAME := IDENT - TYPERESERVED
STR := Fully-escaped Unicode surrounded by '"'s
PRIMTYPE := 'Long' | 'String' | 'Bool'
WHITESPC := Unicode whitespace
COMMENT := '//' ~NEWLINE* NEWLINE
RESERVED := 'Bool' | 'Boolean' | 'Entity' | 'Extension' | 'Long' | 'Record' | 'Set' | 'String'
TYPERESERVED := 'Bool' | 'Boolean' | 'Entity' | 'Extension' | 'Long' | 'Record' | 'Set' | 'String'
```