Class Op
java.lang.Object
com.igormaznitsa.prologparser.terms.PrologTerm
com.igormaznitsa.prologparser.tokenizer.Op
- All Implemented Interfaces:
Serializable, Comparable<PrologTerm>
-
Field Summary
FieldsModifier and TypeFieldDescriptionSet of operators for GNU Prolog.static final Opstatic final OpSet of Finite Domain operators for GNU Prolog.Set of operators is specific for GNU Prolog use.static final Opstatic final OpSet of operators for ISO Prolog standard.static final Opstatic final Opstatic final Opstatic final Opstatic final Opstatic final Opstatic final Opstatic final Opstatic final Opstatic final Opstatic final Opstatic final Opstatic final Opstatic final Opstatic final Opstatic final Opstatic final Opstatic final Opstatic final Opstatic final Opstatic final Opstatic final Opstatic final Opstatic final Opstatic final Opstatic final Opprivate final String[]private final OpAssocprivate final intstatic final intstatic final intprivate final intprivate static final longSet of operators for SWI Prolog.Set of Constraint Logic Programming operators for SWI Prolog.Set of operators is specific for SWI Prolog use.static final Opstatic final OpFields inherited from class PrologTerm
quotation, text -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Op[]private static StringassertOpValidOpName(String name) private static String[]assertOpValidOpName(String[] names) booleanintgetArity()Arity of element.getAssoc()intGet precedence of the term.getType()Get term type.inthashCode()booleanisCompatibleWith(PrologStruct struct) booleanstatic OpMake operator descriptor describing bunch of operators with same characteristics but differently named.static OpmakeSystem(int precedence, OpAssoc type, String... names) private ObjectstreamOp()toString()Methods inherited from class PrologTerm
assertNonEmptyString, compareTo, findQuotation, flatComma, getFunctor, getLine, getPos, getQuotation, getText, isAnyBlock, isBlock, isCurlyBlock, setLine, setPos, stream
-
Field Details
-
PRECEDENCE_MAX
public static final int PRECEDENCE_MAX- See Also:
-
PRECEDENCE_MIN
public static final int PRECEDENCE_MIN- See Also:
-
GNU_UNARY_PLUS
-
ISO_BITWISE_NEGATION
-
ISO_UNARY_MINUS
-
ISO_UNIFICATION
-
ISO_BITWISE_SHIFT
-
ISO_ORDER_TERM
-
ISO_ORDER_ARITH
-
ISO_ARITH_PLUS_MINUS
-
ISO_ARITH_MUL_DIV
-
ISO_ARITH_POWER
-
ISO_ARITH_DIVIDE
-
ISO_NEGATE
-
ISO_CLAUSES
-
ISO_DIRECTIVES
-
ISO_BITWISE_AND_OR
-
MODIFIERS
-
GNU_DIV_RDIV
-
ISO_OR
-
ISO_THEN
-
GNU_STAR_THEN
-
GNU_DOUBLE_DOT
-
SICTUS_SPECIFIC
-
ISO
-
GNU_SPECIFIC
-
SWI_SPECIFIC
-
SWI
-
GNU_FD
-
GNU
-
SWI_CPL
-
VIRTUAL_OPERATOR_BLOCK
-
VIRTUAL_OPERATOR_CURLY_BLOCK
-
METAOPERATOR_COMMA
-
METAOPERATOR_LEFT_BRACKET
-
METAOPERATOR_LEFT_CURLY_BRACKET
-
METAOPERATOR_RIGHT_BRACKET
-
METAOPERATOR_RIGHT_CURLY_BRACKET
-
METAOPERATOR_LEFT_SQUARE_BRACKET
-
METAOPERATOR_RIGHT_SQUARE_BRACKET
-
METAOPERATOR_DOT
-
METAOPERATOR_VERTICAL_BAR
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
opAssoc
-
precedence
private final int precedence -
preparedHash
private final int preparedHash -
multiNames
-
-
Constructor Details
-
Op
-
-
Method Details
-
assertOpValidOpName
-
assertOpValidOpName
-
make
Make operator descriptor describing bunch of operators with same characteristics but differently named.- Parameters:
precedence- the precedencetype- the type of operatorsnames- names of operators, must not be empty or contain null- Returns:
- generated operator descriptor
- See Also:
-
makeSystem
-
join
-
add
-
isMultiName
public boolean isMultiName() -
streamOp
-
getArity
public int getArity()Description copied from class:PrologTermArity of element.- Overrides:
getArityin classPrologTerm- Returns:
- arity of element, make sense for compound terms, for primitive terms is 1
-
getType
Description copied from class:PrologTermGet term type.- Specified by:
getTypein classPrologTerm- Returns:
- term type, must not be null
-
getAssoc
-
getPrecedence
public int getPrecedence()Description copied from class:PrologTermGet precedence of the term.- Overrides:
getPrecedencein classPrologTerm- Returns:
- precedence, must not be negative
-
isCompatibleWith
-
hashCode
-
equals
-
toString
- Overrides:
toStringin classPrologTerm
-
readResolve
-