ubc.cs.JLog.Parser
Class pGenericOperatorEntry
java.lang.Object
ubc.cs.JLog.Parser.pOperatorEntry
ubc.cs.JLog.Parser.pGenericOperatorEntry
public class pGenericOperatorEntry
- extends pOperatorEntry
Dynamically constructs the operator jTerm
term from a description of the
operators name, type, and priority. It is suitable for operators
constructed directly from the the arguments passed into createOperator
.
- Author:
- Glendon Holst
Fields inherited from class ubc.cs.JLog.Parser.pOperatorEntry |
FX, FY, LEFT_ASSOCIATIVE, library, name, NON_ASSOCIATIVE, priority, RIGHT_ASSOCIATIVE, type, XF, XFX, XFY, YF, YFX |
Constructor Summary |
pGenericOperatorEntry(java.lang.String name,
int type,
int priority,
boolean aatom,
java.lang.Class op_class)
|
pGenericOperatorEntry(java.lang.String name,
int type,
int priority,
boolean aatom,
java.lang.String classname)
|
pGenericOperatorEntry(java.lang.String name,
int type,
int priority,
java.lang.Class op_class)
|
pGenericOperatorEntry(java.lang.String name,
int type,
int priority,
java.lang.String classname)
|
Methods inherited from class ubc.cs.JLog.Parser.pOperatorEntry |
createOperator, getAssociativity, getLibrary, getName, getPriority, getType, hasLHS, hasRHS, isNonAssociativeLeft, isNonAssociativeRight, isValidType, sameLibrary, setLibrary, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
constructor_params_arrays
protected static final java.lang.Class[][] constructor_params_arrays
operator_class
protected java.lang.Class operator_class
allow_atom
protected boolean allow_atom
pGenericOperatorEntry
public pGenericOperatorEntry(java.lang.String name,
int type,
int priority,
java.lang.String classname)
pGenericOperatorEntry
public pGenericOperatorEntry(java.lang.String name,
int type,
int priority,
boolean aatom,
java.lang.String classname)
pGenericOperatorEntry
public pGenericOperatorEntry(java.lang.String name,
int type,
int priority,
java.lang.Class op_class)
pGenericOperatorEntry
public pGenericOperatorEntry(java.lang.String name,
int type,
int priority,
boolean aatom,
java.lang.Class op_class)
isAtomPermitted
public boolean isAtomPermitted()
- Description copied from class:
pOperatorEntry
- Determine if an unbound operator is not an error, or if it could be an atom
- Overrides:
isAtomPermitted
in class pOperatorEntry
- Returns:
true
if this operator could also be an atom if it is
unbound.
createOperator
public jTerm createOperator(jTerm l,
jTerm r)
- Description copied from class:
pOperatorEntry
- The internal method for creating the
jTerm
representation of this operator
representation. Subclasses must override. The operands are provided, already created.
- Specified by:
createOperator
in class pOperatorEntry
- Parameters:
l
- The left hand jTerm
.r
- The right hand jTerm
.
- Returns:
jTerm
representing this operator and its operands.
getConstructorParamsArray
protected final java.lang.Class[] getConstructorParamsArray()
getConstructorArgsArray
protected final java.lang.Object[] getConstructorArgsArray(jTerm l,
jTerm r)