Previous | Table of Contents | Next |
An expression is a structured tree of symbols that denotes a (possibly empty) set of values when evaluated in a context.
Description
An expression represents a node in an expression tree, which may be non-terminal or terminal. It defines a symbol, and has
a possibly empty sequence of operands that are value specifications.
•
“ValueSpecification? on page 48
Attributes
• symbol: String [1] The symbol associated with the node in the expression tree.
Associations
• operand: ValueSpecification[*] Specifies a sequence of operands. Subsets Element::ownedElement.
Constraints
No additional constraints
Semantics
An expression represents a node in an expression tree. If there is no operand, it represents a terminal node. If there are
operands, it represents an operator applied to those operands. In either case there is a symbol associated with the node.
The interpretation of this symbol depends on the context of the expression.
Notation
By default an expression with no operands is notated simply by its symbol, with no quotes. An expression with operands is
notated by its symbol, followed by round parentheses containing its operands in order. In particular contexts special notations
may be permitted, including infix operators.
Examples
xorelseplus(x,1)x+1