Package net.hydromatic.morel.ast
Enum Op
- java.lang.Object
-
- java.lang.Enum<Op>
-
- net.hydromatic.morel.ast.Op
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AGGREGATEANDALSOANNOTATED_EXPANNOTATED_PATAPPLYAPPLY_TYPEASSIGNATBARBEFOREBOOL_LITERALBOOL_LITERAL_PATCARETCASECHAR_LITERALCHAR_LITERAL_PATCOMPOSECOMPOSITE_TYPECON_PATCON0_PATCONSCONS_PATDATA_TYPEDATATYPE_BINDDATATYPE_DECLDIVDIVIDEEQFNFORALL_TYPEFROMFUN_BINDFUN_DECLFUN_MATCHFUNCTION_TYPEGEGTIDID_PATIFINT_LITERALINT_LITERAL_PATLELETLISTLIST_PATLTMAPMATCHMINUSMODNAMED_TYPENENEGATEORELSEPLUSREAL_LITERALREAL_LITERAL_PATRECORDRECORD_PATRECORD_SELECTORRECORD_TYPESTRING_LITERALSTRING_LITERAL_PATTEMPORARY_DATA_TYPEUsed internally, while resolving a self-referential DATA_TYPE.TIMESTUPLETUPLE_PATTUPLE_TYPETY_CONTY_VARUNIT_LITERALVAL_BINDVAL_DECLWILDCARD_PAT
-
Constructor Summary
Constructors Modifier Constructor Description privateOp()privateOp(boolean atom)privateOp(java.lang.String padded)privateOp(java.lang.String padded, int leftPrecedence)privateOp(java.lang.String padded, int precedence, boolean leftAssociative)privateOp(java.lang.String padded, int left, int right)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description OptoPat()Converts the op of a literal or tuple expression to the corresponding op of a pattern.static OpvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static Op[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ID
public static final Op ID
-
RECORD_SELECTOR
public static final Op RECORD_SELECTOR
-
BOOL_LITERAL
public static final Op BOOL_LITERAL
-
CHAR_LITERAL
public static final Op CHAR_LITERAL
-
INT_LITERAL
public static final Op INT_LITERAL
-
REAL_LITERAL
public static final Op REAL_LITERAL
-
STRING_LITERAL
public static final Op STRING_LITERAL
-
UNIT_LITERAL
public static final Op UNIT_LITERAL
-
ID_PAT
public static final Op ID_PAT
-
WILDCARD_PAT
public static final Op WILDCARD_PAT
-
CON_PAT
public static final Op CON_PAT
-
CON0_PAT
public static final Op CON0_PAT
-
TUPLE_PAT
public static final Op TUPLE_PAT
-
RECORD_PAT
public static final Op RECORD_PAT
-
LIST_PAT
public static final Op LIST_PAT
-
CONS_PAT
public static final Op CONS_PAT
-
BOOL_LITERAL_PAT
public static final Op BOOL_LITERAL_PAT
-
CHAR_LITERAL_PAT
public static final Op CHAR_LITERAL_PAT
-
INT_LITERAL_PAT
public static final Op INT_LITERAL_PAT
-
REAL_LITERAL_PAT
public static final Op REAL_LITERAL_PAT
-
STRING_LITERAL_PAT
public static final Op STRING_LITERAL_PAT
-
ANNOTATED_PAT
public static final Op ANNOTATED_PAT
-
BAR
public static final Op BAR
-
FUN_BIND
public static final Op FUN_BIND
-
FUN_MATCH
public static final Op FUN_MATCH
-
TY_CON
public static final Op TY_CON
-
DATATYPE_DECL
public static final Op DATATYPE_DECL
-
DATATYPE_BIND
public static final Op DATATYPE_BIND
-
FUN_DECL
public static final Op FUN_DECL
-
VAL_DECL
public static final Op VAL_DECL
-
TUPLE
public static final Op TUPLE
-
LIST
public static final Op LIST
-
RECORD
public static final Op RECORD
-
FN
public static final Op FN
-
TY_VAR
public static final Op TY_VAR
-
RECORD_TYPE
public static final Op RECORD_TYPE
-
DATA_TYPE
public static final Op DATA_TYPE
-
TEMPORARY_DATA_TYPE
public static final Op TEMPORARY_DATA_TYPE
Used internally, while resolving a self-referential DATA_TYPE.
-
APPLY_TYPE
public static final Op APPLY_TYPE
-
TUPLE_TYPE
public static final Op TUPLE_TYPE
-
COMPOSITE_TYPE
public static final Op COMPOSITE_TYPE
-
FUNCTION_TYPE
public static final Op FUNCTION_TYPE
-
NAMED_TYPE
public static final Op NAMED_TYPE
-
FORALL_TYPE
public static final Op FORALL_TYPE
-
ANNOTATED_EXP
public static final Op ANNOTATED_EXP
-
TIMES
public static final Op TIMES
-
DIVIDE
public static final Op DIVIDE
-
DIV
public static final Op DIV
-
MOD
public static final Op MOD
-
PLUS
public static final Op PLUS
-
MINUS
public static final Op MINUS
-
CARET
public static final Op CARET
-
NEGATE
public static final Op NEGATE
-
CONS
public static final Op CONS
-
AT
public static final Op AT
-
LE
public static final Op LE
-
LT
public static final Op LT
-
GE
public static final Op GE
-
GT
public static final Op GT
-
EQ
public static final Op EQ
-
NE
public static final Op NE
-
ASSIGN
public static final Op ASSIGN
-
COMPOSE
public static final Op COMPOSE
-
ANDALSO
public static final Op ANDALSO
-
ORELSE
public static final Op ORELSE
-
BEFORE
public static final Op BEFORE
-
LET
public static final Op LET
-
MATCH
public static final Op MATCH
-
VAL_BIND
public static final Op VAL_BIND
-
APPLY
public static final Op APPLY
-
CASE
public static final Op CASE
-
FROM
public static final Op FROM
-
AGGREGATE
public static final Op AGGREGATE
-
IF
public static final Op IF
-
MAP
public static final Op MAP
-
-
Constructor Detail
-
Op
private Op()
-
Op
private Op(boolean atom)
-
Op
private Op(java.lang.String padded)
-
Op
private Op(java.lang.String padded, int leftPrecedence)
-
Op
private Op(java.lang.String padded, int precedence, boolean leftAssociative)
-
Op
private Op(java.lang.String padded, int left, int right)
-
-
Method Detail
-
values
public static Op[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Op c : Op.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Op valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
toPat
public Op toPat()
Converts the op of a literal or tuple expression to the corresponding op of a pattern.
-
-