Module: jsoniq encoding StringLiteral version StringLiteral encoding StringLiteral ; LibraryModule MainModule Module ::= ( 'jsoniq' ( 'encoding' StringLiteral | 'version' StringLiteral ( 'encoding' StringLiteral )? ) ';' )? ( LibraryModule | MainModule ) no referencesMainModule: Prolog Expr MainModule ::= Prolog Expr referenced by: Module LibraryModule: module namespace NCName = URILiteral ; Prolog LibraryModule ::= 'module' 'namespace' NCName '=' URILiteral ';' Prolog referenced by: Module Prolog: DefaultCollationDecl OrderingModeDecl EmptyOrderDecl DecimalFormatDecl ModuleImport ; FunctionDecl VariableDecl ; Prolog ::= ( ( DefaultCollationDecl | OrderingModeDecl | EmptyOrderDecl | DecimalFormatDecl | ModuleImport ) ';' )* ( ( FunctionDecl | VariableDecl ) ';' )* referenced by: LibraryModule MainModule DefaultCollationDecl: declare default collation URILiteral DefaultCollationDecl ::= 'declare' 'default' 'collation' URILiteral referenced by: Prolog OrderingModeDecl: declare ordering ordered unordered OrderingModeDecl ::= 'declare' 'ordering' ( 'ordered' | 'unordered' ) referenced by: Prolog EmptyOrderDecl: declare default order empty greatest least EmptyOrderDecl ::= 'declare' 'default' 'order' 'empty' ( 'greatest' | 'least' ) referenced by: Prolog DecimalFormatDecl: declare decimal-format NCName : NCName default decimal-format DFPropertyName = StringLiteral DecimalFormatDecl ::= 'declare' ( 'decimal-format' ( NCName ':' )? NCName | 'default' 'decimal-format' ) ( DFPropertyName '=' StringLiteral )* referenced by: Prolog DFPropertyName: decimal-separator grouping-separator infinity minus-sign NaN percent per-mille zero-digit digit pattern-separator DFPropertyName ::= 'decimal-separator' | 'grouping-separator' | 'infinity' | 'minus-sign' | 'NaN' | 'percent' | 'per-mille' | 'zero-digit' | 'digit' | 'pattern-separator' referenced by: DecimalFormatDecl ModuleImport: import module namespace NCName = URILiteral at URILiteral , ModuleImport ::= 'import' 'module' ( 'namespace' NCName '=' )? URILiteral ( 'at' URILiteral ( ',' URILiteral )* )? referenced by: Prolog VarDecl: declare variable VarRef as SequenceType := ExprSingle external := ExprSingle VarDecl ::= 'declare' 'variable' VarRef ( 'as' SequenceType )? ( ':=' ExprSingle | 'external' ( ':=' ExprSingle )? ) no referencesFunctionDecl: declare function NCName : NCName ( ParamList ) as SequenceType { Expr } external FunctionDecl ::= 'declare' 'function' ( NCName ':' )? NCName '(' ParamList? ')' ( 'as' SequenceType )? ( '{' Expr '}' | 'external' ) referenced by: Prolog ParamList: $ NCName as SequenceType , ParamList ::= '$' NCName ( 'as' SequenceType )? ( ',' '$' NCName ( 'as' SequenceType )? )* referenced by: FunctionDecl Expr: ExprSingle , Expr ::= ExprSingle ( ',' ExprSingle )* referenced by: ArrayConstructor ArrayLookup FunctionDecl IfExpr MainModule ObjectConstructor OrderedExpr ParenthesizedExpr Predicate SwitchExpr TryCatchExpr TypeswitchExpr UnorderedExpr ExprSingle: FLWORExpr QuantifiedExpr SwitchExpr TypeswitchExpr IfExpr TryCatchExpr OrExpr ExprSingle ::= FLWORExpr | QuantifiedExpr | SwitchExpr | TypeswitchExpr | IfExpr | TryCatchExpr | OrExpr referenced by: Argument CaseClause Expr FLWORExpr ForClause GroupByClause IfExpr LetClause OrderByClause PairConstructor QuantifiedExpr SwitchCaseClause SwitchExpr TypeswitchExpr VarDecl WhereClause FLWORExpr: ForClause LetClause ForClause LetClause WhereClause GroupByClause OrderByClause CountClause return ExprSingle FLWORExpr ::= ( ForClause | LetClause ) ( ForClause | LetClause | WhereClause | GroupByClause | OrderByClause | CountClause )* 'return' ExprSingle referenced by: ExprSingle ForClause: for VarRef as SequenceType allowing empty at VarRef in ExprSingle , ForClause ::= 'for' VarRef ( 'as' SequenceType )? ( 'allowing' 'empty' )? ( 'at' VarRef )? 'in' ExprSingle ( ',' VarRef ( 'as' SequenceType )? ( 'allowing' 'empty' )? ( 'at' VarRef )? 'in' ExprSingle )* referenced by: FLWORExpr LetClause: let VarRef as SequenceType := ExprSingle , LetClause ::= 'let' VarRef ( 'as' SequenceType )? ':=' ExprSingle ( ',' VarRef ( 'as' SequenceType )? ':=' ExprSingle )* referenced by: FLWORExpr CountClause: count VarRef CountClause ::= 'count' VarRef referenced by: FLWORExpr WhereClause: where ExprSingle WhereClause ::= 'where' ExprSingle referenced by: FLWORExpr GroupByClause: group by VarRef as SequenceType := ExprSingle collation URILiteral , GroupByClause ::= 'group' 'by' VarRef ( ( 'as' SequenceType )? ':=' ExprSingle )? ( 'collation' URILiteral )? ( ',' VarRef ( ( 'as' SequenceType )? ':=' ExprSingle )? ( 'collation' URILiteral )? )* referenced by: FLWORExpr OrderByClause: order by stable order by ExprSingle ascending descending empty greatest least collation URILiteral , OrderByClause ::= ( 'order' 'by' | 'stable' 'order' 'by' ) ExprSingle ( 'ascending' | 'descending' )? ( 'empty' ( 'greatest' | 'least' ) )? ( 'collation' URILiteral )? ( ',' ExprSingle ( 'ascending' | 'descending' )? ( 'empty' ( 'greatest' | 'least' ) )? ( 'collation' URILiteral )? )* referenced by: FLWORExpr QuantifiedExpr: some every VarRef as SequenceType in ExprSingle , satisfies ExprSingle QuantifiedExpr ::= ( 'some' | 'every' ) VarRef ( 'as' SequenceType )? 'in' ExprSingle ( ',' VarRef ( 'as' SequenceType )? 'in' ExprSingle )* 'satisfies' ExprSingle referenced by: ExprSingle SwitchExpr: switch ( Expr ) SwitchCaseClause default return ExprSingle SwitchExpr ::= 'switch' '(' Expr ')' SwitchCaseClause+ 'default' 'return' ExprSingle referenced by: ExprSingle SwitchCaseClause: case ExprSingle return ExprSingle SwitchCaseClause ::= ( 'case' ExprSingle )+ 'return' ExprSingle referenced by: SwitchExpr TypeswitchExpr: typeswitch ( Expr ) CaseClause default VarRef return ExprSingle TypeswitchExpr ::= 'typeswitch' '(' Expr ')' CaseClause+ 'default' VarRef? 'return' ExprSingle referenced by: ExprSingle CaseClause: case VarRef as SequenceType | return ExprSingle CaseClause ::= 'case' ( VarRef 'as' )? SequenceType ( '|' SequenceType )* 'return' ExprSingle referenced by: TypeswitchExpr IfExpr: if ( Expr ) then ExprSingle else ExprSingle IfExpr ::= 'if' '(' Expr ')' 'then' ExprSingle 'else' ExprSingle referenced by: ExprSingle TryCatchExpr: try { Expr } catch * { Expr } TryCatchExpr ::= 'try' '{' Expr '}' 'catch' '*' '{' Expr '}' referenced by: ExprSingle OrExpr: AndExpr or OrExpr ::= AndExpr ( 'or' AndExpr )* referenced by: ExprSingle AndExpr: NotExpr and AndExpr ::= NotExpr ( 'and' NotExpr )* referenced by: OrExpr NotExpr: not ComparisonExpr NotExpr ::= 'not'? ComparisonExpr referenced by: AndExpr ComparisonExpr: StringConcatExpr eq ne lt le gt ge StringConcatExpr ComparisonExpr ::= StringConcatExpr ( ( 'eq' | 'ne' | 'lt' | 'le' | 'gt' | 'ge' ) StringConcatExpr )? referenced by: NotExpr StringConcatExpr: RangeExpr || StringConcatExpr ::= RangeExpr ( '||' RangeExpr )* referenced by: ComparisonExpr RangeExpr: AdditiveExpr to AdditiveExpr RangeExpr ::= AdditiveExpr ( 'to' AdditiveExpr )? referenced by: StringConcatExpr AdditiveExpr: MultiplicativeExpr + - AdditiveExpr ::= MultiplicativeExpr ( ( '+' | '-' ) MultiplicativeExpr )* referenced by: RangeExpr MultiplicativeExpr: InstanceofExpr * div idiv mod MultiplicativeExpr ::= InstanceofExpr ( ( '*' | 'div' | 'idiv' | 'mod' ) InstanceofExpr )* referenced by: AdditiveExpr InstanceofExpr: TreatExpr instance of SequenceType InstanceofExpr ::= TreatExpr ( 'instance' 'of' SequenceType )? referenced by: MultiplicativeExpr TreatExpr: CastableExpr treat as SequenceType TreatExpr ::= CastableExpr ( 'treat' 'as' SequenceType )? referenced by: InstanceofExpr CastableExpr: CastExpr castable as AtomicType ? CastableExpr ::= CastExpr ( 'castable' 'as' AtomicType '?'? )? referenced by: TreatExpr CastExpr: UnaryExpr cast as AtomicType ? CastExpr ::= UnaryExpr ( 'cast' 'as' AtomicType '?'? )? referenced by: CastableExpr UnaryExpr: - + SimpleMapExpr UnaryExpr ::= ( '-' | '+' )* SimpleMapExpr referenced by: CastExpr SimpleMapExpr: PostfixExpr ! SimpleMapExpr ::= PostfixExpr ( '!' PostfixExpr )* referenced by: UnaryExpr PostfixExpr: PrimaryExpr Predicate ObjectLookup ArrayLookup ArrayUnboxing PostfixExpr ::= PrimaryExpr ( Predicate | ObjectLookup | ArrayLookup | ArrayUnboxing )* referenced by: SimpleMapExpr Predicate: [ Expr ] Predicate ::= '[' Expr ']' referenced by: PostfixExpr ObjectLookup: . StringLiteral NCName ParenthesizedExpr VarRef ContextItemExpr ObjectLookup ::= '.' ( StringLiteral | NCName | ParenthesizedExpr | VarRef | ContextItemExpr ) referenced by: PostfixExpr ArrayLookup: [ [ Expr ] ] ArrayLookup ::= '[' '[' Expr ']' ']' referenced by: PostfixExpr ArrayUnboxing: [ ] ArrayUnboxing ::= '[' ']' referenced by: PostfixExpr PrimaryExpr: Literal VarRef ParenthesizedExpr ContextItemExpr FunctionCall OrderedExpr UnorderedExpr ObjectConstructor ArrayConstructor PrimaryExpr ::= Literal | VarRef | ParenthesizedExpr | ContextItemExpr | FunctionCall | OrderedExpr | UnorderedExpr | ObjectConstructor | ArrayConstructor referenced by: PostfixExpr Literal: NumericLiteral StringLiteral BooleanLiteral NullLiteral Literal ::= NumericLiteral | StringLiteral | BooleanLiteral | NullLiteral referenced by: PrimaryExpr NumericLiteral: IntegerLiteral DecimalLiteral DoubleLiteral NumericLiteral ::= IntegerLiteral | DecimalLiteral | DoubleLiteral referenced by: Literal BooleanLiteral: true false BooleanLiteral ::= 'true' | 'false' referenced by: Literal NullLiteral: null NullLiteral ::= 'null' referenced by: Literal VarRef: $ NCName : NCName VarRef ::= '$' ( NCName ':' )? NCName referenced by: CaseClause CountClause ForClause GroupByClause LetClause ObjectLookup PrimaryExpr QuantifiedExpr TypeswitchExpr VarDecl ParenthesizedExpr: ( Expr ) ParenthesizedExpr ::= '(' Expr? ')' referenced by: ObjectLookup PrimaryExpr ContextItemExpr: $$ ContextItemExpr ::= '$$' referenced by: ObjectLookup PrimaryExpr OrderedExpr: ordered { Expr } OrderedExpr ::= 'ordered' '{' Expr '}' referenced by: PrimaryExpr UnorderedExpr: unordered { Expr } UnorderedExpr ::= 'unordered' '{' Expr '}' referenced by: PrimaryExpr FunctionCall: NCName : NCName ArgumentList FunctionCall ::= ( NCName ':' )? NCName ArgumentList referenced by: PrimaryExpr Argument: ExprSingle ? Argument ::= ExprSingle | '?' no referencesObjectConstructor: { PairConstructor , } {| Expr |} ObjectConstructor ::= '{' ( PairConstructor ( ',' PairConstructor )* )? '}' | '{|' Expr '|}' referenced by: PrimaryExpr PairConstructor: ExprSingle NCName : ? ExprSingle PairConstructor ::= ( ExprSingle | NCName ) ( ':' | '?' ) ExprSingle referenced by: ObjectConstructor ArrayConstructor: [ Expr ] ArrayConstructor ::= '[' Expr? ']' referenced by: PrimaryExpr SequenceType: ( ) ItemType ? * + SequenceType ::= '(' ')' | ItemType ( '?' | '*' | '+' )? referenced by: CaseClause ForClause FunctionDecl GroupByClause InstanceofExpr LetClause ParamList QuantifiedExpr TreatExpr VarDecl ItemType: item JSONItemTest AtomicType ItemType ::= 'item' | JSONItemTest | AtomicType referenced by: SequenceType JSONItemTest: object array json-item JSONItemTest ::= 'object' | 'array' | 'json-item' referenced by: ItemType AtomicType: atomic string integer decimal double boolean null etc (other builtin atomic types) AtomicType ::= 'atomic' | 'string' | 'integer' | 'decimal' | 'double' | 'boolean' | 'null' | 'etc (other builtin atomic types)' referenced by: CastExpr CastableExpr ItemType URILiteral: StringLiteral URILiteral ::= StringLiteral referenced by: DefaultCollationDecl GroupByClause LibraryModule ModuleImport OrderByClause IntegerLiteral: Digits IntegerLiteral ::= Digits referenced by: NumericLiteral DecimalLiteral: . Digits Digits . [0-9] DecimalLiteral ::= '.' Digits | Digits '.' [0-9]* /* ws: explicit */ referenced by: NumericLiteral DoubleLiteral: . Digits Digits . [0-9] e E + - Digits DoubleLiteral ::= ( '.' Digits | Digits ( '.' [0-9]* )? ) [eE] [+#x2D]? Digits /* ws: explicit */ referenced by: NumericLiteral StringLiteral: " PredefinedCharRef CharRef [^"\] " StringLiteral ::= '"' ( PredefinedCharRef | CharRef | [^"\] )* '"' /* ws: explicit */ referenced by: DecimalFormatDecl Literal Module ObjectLookup URILiteral PredefinedCharRef: \ \ / " ' b f n r t PredefinedCharRef ::= '\' ( '\' | '/' | '"' | "'" | 'b' | 'f' | 'n' | 'r' | 't' ) /* ws: explicit */ referenced by: StringLiteral CharRef: \ u [0-9] [a-f] [A-F] [0-9] [a-f] [A-F] [0-9] [a-f] [A-F] [0-9] [a-f] [A-F] CharRef ::= '\' 'u' [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] referenced by: StringLiteral Comment: (: CommentContents Comment :) Comment ::= '(:' ( CommentContents | Comment )* ':)' /* ws: explicit */ referenced by: Comment NCName: [ http://www.w3.org/TR/REC-xml-names/#NT-NCName-w-o-dot-and-keywords ] NCName ::= [http://www.w3.org/TR/REC-xml-names/#NT-NCName-w-o-dot-and-keywords] referenced by: DecimalFormatDecl FunctionCall FunctionDecl LibraryModule ModuleImport ObjectLookup PairConstructor ParamList VarRef S: [ http://www.w3.org/TR/REC-xml#NT-S ] S ::= [http://www.w3.org/TR/REC-xml#NT-S] no referencesChar: [ http://www.w3.org/TR/REC-xml#NT-Char ] Char ::= [http://www.w3.org/TR/REC-xml#NT-Char] referenced by: CommentContents Digits: [0-9] Digits ::= [0-9]+ referenced by: DecimalLiteral DoubleLiteral IntegerLiteral CommentContents: Char + - ( Char * ( '(:' | ':)' ) Char * ) CommentContents ::= Char+ - ( Char* ( '(:' | ':)' ) Char* ) referenced by: Comment   ... generated by Railroad Diagram Generator R R