//From: https://github.com/cel-expr/cel-spec/blob/9768251bef69c35d98b9940f453f1f583c55e013/doc/langdef.md
//
// EBNF to be viewd at
// https://www.bottlecaps.de/rr/ui
//
// Copy and paste this at one url shown above in the 'Edit Grammar' tab
// then click the 'View Diagram' tab.
//
Expr ::= ConditionalOr ("?" ConditionalOr ":" Expr)?
ConditionalOr ::= (ConditionalOr "||")? ConditionalAnd
ConditionalAnd ::= (ConditionalAnd "&&")? Relation
Relation ::= (Relation Relop)? Addition
Relop ::= "<" | "<=" | ">=" | ">" | "==" | "!=" | "in"
Addition ::= (Addition ("+" | "-"))? Multiplication
Multiplication ::= (Multiplication ("*" | "/" | "%"))? Unary
Unary ::= Member
| "!"+ Member
| "-"+ Member
Member ::= Primary
| Member "." SELECTOR ("(" ExprList? ")")?
| Member "[" Expr "]"
Primary ::= "."? IDENT ("(" ExprList? ")")?
| "(" Expr ")"
| "[" ExprList? ","? "]"
| "{" MapInits? ","? "}"
| "."? SELECTOR ( "." SELECTOR )* "{" FieldInits? ","? "}"
| LITERAL
ExprList ::= Expr ("," Expr)*
FieldInits ::= SELECTOR ":" Expr ("," SELECTOR ":" Expr)*
MapInits ::= Expr ":" Expr ("," Expr ":" Expr)*
With small changes to the lang we can have a nice navigable railroad diagram to enhance the documentation (see intructions bellow at the top):