All Packages Class Hierarchy This Package Previous Next Index
Class PrologParse.Term
java.lang.Object
|
+----PrologParse.Term
- public class Term
- extends Object
A class that represents a Term in prolog.
A Term is represented by a type int, a string that represents
the name/text of the term, and a Vector of subterms.
- See Also:
- Clause
-
CUT
-
-
FUNC
-
-
LIST
-
-
NUM
-
-
OP
-
-
VAR
-
-
Term(String, int)
- Constructor for constants or variables.
-
Term(String, int, Vector, int)
- Most General constructor.
-
Term(String, Vector)
- Constructor for functions (atoms).
-
Term(Vector)
- Constructs a Term by parsing some tokens.
-
functionArity()
-
-
isList()
-
-
isVariable()
-
-
name()
-
-
subterms()
-
-
symbol()
-
-
toString()
-
FUNC
public static final int FUNC
VAR
public static final int VAR
NUM
public static final int NUM
OP
public static final int OP
LIST
public static final int LIST
CUT
public static final int CUT
Term
public Term(String name,
int type,
Vector subterms,
int precedence)
- Most General constructor.
- Parameters:
- name - The text part of the Term.
- type - The type of the Term (variable, function symbol, etc).
- subterms - The subterms of the Term.
Term
public Term(String name,
int type)
- Constructor for constants or variables.
Constructs a Term with no subterms of the specified type.
- Parameters:
- name - The text part of the Term.
- type - The type of the Term (variable, function symbol, etc).
Term
public Term(String name,
Vector Subterms)
- Constructor for functions (atoms).
Constructs a Term with specified subterms of type Term.FUNC.
- Parameters:
- name - The text part of the Term.
- subterms - The subterms of the Term.
Term
public Term(Vector ts)
- Constructs a Term by parsing some tokens.
- Parameters:
- ts - A Vector of Tokens, as produced by a PrologTokenizer.
- See Also:
- PrologTokenizer, Token
functionArity
public final int functionArity()
subterms
public final Vector subterms()
isVariable
public final boolean isVariable()
isList
public final boolean isList()
name
public final String name()
symbol
public final String symbol()
toString
public final String toString()
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index