public enum Syntax extends Enum<Syntax>
| Enum Constant and Description |
|---|
AmpersandQuotedProperty
Defines syntax for expression invoked
object.[&PROPERTY]
(a variant of Property). |
Braces
Defines syntax for expression invoked as
{ARG, ...}; that
is, the set construction operator. |
Case
Defines syntax for expression invoked as
CASE ... |
Cast
Defines syntax for a CAST expression
CAST(expression AS type). |
Empty
Defines the syntax for an empty expression.
|
Function
Defines syntax for expression invoked
FUNCTION() or
FUNCTION(args). |
Infix
Defines syntax for expression invoked as
arg OPERATOR arg
(like '+' or 'AND'). |
Internal
Defines syntax for expression generated by the Mondrian system which
cannot be specified syntactically.
|
Method
Defines syntax for expression invoked invoked as
object.METHOD() or
object.METHOD(args). |
Parentheses
Defines syntax for expression invoked as
(ARG) or
(ARG, ...); that is, parentheses for grouping
expressions, and the tuple construction operator. |
Postfix
Defines syntax for expression invoked as
arg OPERATOR
(like IS EMPTY). |
Prefix
Defines syntax for expression invoked as
OPERATOR arg
(like unary '-'). |
Property
Defines syntax for expression invoked as
object.PROPERTY. |
QuotedProperty
Defines syntax for expression invoked
object.&PROPERTY
(a variant of Property). |
| Modifier and Type | Method and Description |
|---|---|
String |
getSignature(String name,
int returnType,
int[] argTypes)
Returns a description of the signature of a function call, for
example, "CoalesceEmpty(
|
void |
unparse(String fun,
Exp[] args,
PrintWriter pw)
Converts a call to a function of this syntax into source code.
|
static Syntax |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Syntax[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Syntax Function
FUNCTION() or
FUNCTION(args).public static final Syntax Property
object.PROPERTY.public static final Syntax Method
object.METHOD() or
object.METHOD(args).public static final Syntax Infix
arg OPERATOR arg
(like '+' or 'AND').public static final Syntax Prefix
OPERATOR arg
(like unary '-').public static final Syntax Postfix
arg OPERATOR
(like IS EMPTY).public static final Syntax Braces
{ARG, ...}; that
is, the set construction operator.public static final Syntax Parentheses
(ARG) or
(ARG, ...); that is, parentheses for grouping
expressions, and the tuple construction operator.public static final Syntax Internal
public static final Syntax QuotedProperty
object.&PROPERTY
(a variant of Property).public static final Syntax AmpersandQuotedProperty
object.[&PROPERTY]
(a variant of Property).public static Syntax[] values()
for (Syntax c : Syntax.values()) System.out.println(c);
public static Syntax valueOf(String name)
IllegalArgumentException - if this enum type has no constant
with the specified nameNullPointerException - if the argument is nullname - the name of the enum constant to be returned.public void unparse(String fun, Exp[] args, PrintWriter pw)
fun - Function nameargs - Arguments to the functionpw - Writerpublic String getSignature(String name, int returnType, int[] argTypes)
name - Function namereturnType - Function's return categoryargTypes - Categories of the function's arguments