All Packages Class Hierarchy This Package Previous Next Index
Class prolog.OperatorTable
java.lang.Object
|
+----prolog.OperatorTable
- public class OperatorTable
- extends Object
The table of operator precedences.
- See Also:
- Operator
-
OperatorTable()
-
-
()
-
-
delete(String, int)
- Remove an operator.
-
lookup(String)
-
-
lookup(String, int)
- Finds an operator with this symbol and that type (XFX, ...).
-
put(int, int, String)
- Add an operator.
-
put(int, int, String, String)
- Add an operator - the functor of the compound term will be
name, rather than lexeme.
-
put(int, String, String)
- Add an operator.
-
toString()
- Lists all operators in this table.
OperatorTable
OperatorTable()
static void ()
put
public void put(int p,
String type,
String lexeme) throws ArgumentException
- Add an operator.
- Parameters:
- lexeme - the string representing this operator.
- type - one of the associativity specifiers (XFX, ...) as a String.
- p - the precedence of this operator.
- Throws: ArgumentException
- on invalid precedence.
- See Also:
- Operator, op_3
put
void put(int p,
int type,
String lexeme) throws ArgumentException
- Add an operator. No translation performed - the name of this
operator is the same as it's lexical representation.
- Parameters:
- lexeme - the string representing this operator.
- type - one of the associativity specifiers (XFX, ...).
- p - the precedence of this operator.
- Throws: ArgumentException
- on invalid precedence.
- See Also:
- Operator
put
void put(int p,
int type,
String lexeme,
String name) throws ArgumentException
- Add an operator - the functor of the compound term will be
name, rather than lexeme.
- Parameters:
- lexeme - the string representing this operator.
- name - the functor of the compound built to describe this term.
- type - one of the associativity specifiers (XFX, ...).
- p - the precedence of this operator.
- Throws: ArgumentException
- on invalid precedence.
- See Also:
- Operator
lookup
Operator lookup(String lexeme,
int type)
- Finds an operator with this symbol and that type (XFX, ...).
- Parameters:
- type - one of the associativity specifiers (XFX, ...).
- See Also:
- Operator
lookup
Operator lookup(String lexeme)
delete
void delete(String lexeme,
int type)
- Remove an operator.
toString
public String toString()
- Lists all operators in this table.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index