Expressions


name Name ::= {Namespace}LocalName
operator Op ::= + | - | and | or
| = | != | < | <= | >= | >
name expression NameExp ::= Name
| {Exp}Exp
expression Exp ::= Const atomic constant
| NameExp name expression
| Var variable
| @Name[Exp] attribute constructor
| Name[Exp] element constructor
| *@NameExp[Exp] computed attribute
| *NameExp[Exp] computed element
| Exp, Exp sequence
| () empty sequence
| if Exp then Exp else Exp conditional
| let Var = Exp do Exp local binding
| FuncName (Exp ;...; Exp) function application
| Exp : Type explicit type
| error error
| Exp Op Exp binary operator
| attributes (Exp) attributes
| children (Exp) children
| name (Exp) element name
| for Var in Exp do Exp iteration
| match Exp match
case Var : Type do Exp
···
case Var : Type do Exp
else Exp