|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectstory.dbcore.grammars.SCTools
public class SCTools
Back-end functions for the command grammar.
Constructor Summary | |
---|---|
SCTools()
|
Method Summary | |
---|---|
static ReturnValue |
argument_expression(DBCoreInterface dbci,
SymbolTable symbols,
ReturnValue subvalue,
ArgumentVector args)
Handle the argument (non) operator, i.e., when an expression is followed by arguments. |
static ReturnValue |
assignment_expression(DBCoreInterface dbci,
SymbolTable symbols,
ReturnValue lvalue,
ReturnValue rvalue)
Handle an assignment operator when it is followed by an expression |
static ReturnValue |
assignment_new_document(DBCoreInterface dbci,
SymbolTable symbols,
ReturnValue lvalue,
ArgumentVector new_args)
Handle an assignment operator followed by "new document" |
static ReturnValue |
assignment_new_expression(DBCoreInterface dbci,
SymbolTable symbols,
ReturnValue lvalue,
ReturnValue newrvalue)
Handle an assignment operator followed by a "new" and then an identifier |
static ReturnValue |
assignment_new_repository(DBCoreInterface dbci,
SymbolTable symbols,
ReturnValue lvalue,
ArgumentVector new_args)
Handle an assignment operator followed by "new repository" and some arguments |
static ReturnValue |
atomicID(DBCoreInterface dbci,
SymbolTable symbols,
java.lang.String id)
Handle an atomic identifier |
static ReturnValue |
colon(DBCoreInterface dbci,
ReturnValue lvalue,
ReturnValue rvalue)
Handle the colon operator. |
static ReturnValue |
dot(DBCoreInterface dbci,
SymbolTable symbols,
ReturnValue lvalue,
ReturnValue rvalue,
boolean singleDot)
Handle the dot operator |
static ReturnValue |
equality(DBCoreInterface dbci,
SymbolTable symbols,
ReturnValue lvalue,
ReturnValue rvalue,
boolean allow_indirect)
Handle the equality operator. |
static java.lang.StringBuffer |
examine(DBCoreInterface dbci,
SymbolTable symbols,
ReturnValue returnVal)
Examine an identifier in detail (i.e., call its render function) and return the StringBuffer |
static ReturnValue |
expression(DBCoreInterface dbci,
SymbolTable symbols,
ReturnValue returnValue)
Handle a completed expression. |
static ReturnValue |
idTuple(DBCoreInterface dbci,
SymbolTable symbols,
java.lang.String left,
java.lang.String right)
Handle a tuple of atomic identifiers |
static ReturnValue |
link(DBCoreInterface dbci,
ReturnValue lvalue,
ReturnValue rvalue,
boolean overrideInference)
Handle the link operator, which is used to query for all direct links to or from a node (NOT to assign a link or test for a particular relationship, which are handled by = and ==/=~ respectively). |
static void |
linkLabel(DBCoreInterface dbci,
SymbolTable symbols,
LinkLabel label,
java.lang.String className,
java.lang.String attributeName,
java.lang.String attributeValue)
Handle a LinkLabel (inside some pipes ||). |
static java.lang.Object |
parameter_arg_dot_comparison(DBCoreInterface dbci,
VariableID outreference,
ReturnValue lvalue,
ReturnValue mvalue,
ReturnValue rvalue,
boolean testGreaterThan,
boolean singleDot)
Handles an equality operator within a parameter argument when the lvalue had a dot parameter. |
static java.lang.Object |
parameter_arg_dot(DBCoreInterface dbci,
VariableID outreference,
ReturnValue lvalue,
ReturnValue rvalue)
Handles a dot operator for a parameter argument, e.g., |
static java.lang.Object |
parameter_arg_link_equals(DBCoreInterface dbci,
VariableID outreference,
ReturnValue lvalue,
ReturnValue mvalue,
ReturnValue rvalue,
boolean overrideInference)
Handle a three-term, two-operator expression within a parameter argument when the two expressions are a link operator and the == equality operator. |
static Parameter |
parameter_arg_link(DBCoreInterface dbci,
VariableID outreference,
ReturnValue lvalue,
ReturnValue mvalue,
boolean overrideInference)
Handle the link operator in a parameter argument. |
static NodeAddress |
parameter_find_node(DBCoreInterface dbci,
NodeID nodeID)
Helper function for parameter() that finds a NodeAddress from a NodeID and throws an exception if it DNE. |
static VariableID |
parameter_parse_reference(DBCoreInterface dbci,
java.lang.String reference,
SymbolTable symbols)
Handles a reference specification within a parameter. |
static java.lang.Object |
parameter_term(DBCoreInterface dbci,
VariableID outreference,
ReturnValue term)
Handles a lone term within a paramete argument, no operators. |
static Parameter |
parameter(DBCoreInterface dbci,
VariableID outreference,
ReturnValue paramType,
ArgumentVector args)
Handles a complete parameter, with type and arguments (e.g., node(arg)) |
static java.lang.Object |
parseID(java.lang.String id,
SymbolTable symbols)
Given a string identifier, determine what kind of identifier it is, and upgrade it to a more specific object if possible. |
static java.lang.StringBuffer |
renderReturnValue(DBCoreInterface dbci,
ReturnValue returnValue,
SymbolTable symbols)
Renders a return value to a StringBuffer, branching on type. |
static ArgumentVector |
stripArgs(ArgumentVector in,
SymbolTable symbols)
Given an arguments vector, which is a Vector of ReturnValues, return a vector of values themselves, suitable for passing to DBCoreInterface (which doesn't know what a ReturnValue object is). |
static boolean |
truth()
Helper function that gets around peculiar ANTLR behavior by always returning true (but in a way that is not clear at compile time) |
static ReturnValue |
unlink_expression(DBCoreInterface dbci,
SymbolTable symbols,
ReturnValue lvalue,
ReturnValue rvalue)
Handle the unlink operator when it is followed by an expression |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SCTools()
Method Detail |
---|
public static java.lang.Object parseID(java.lang.String id, SymbolTable symbols) throws Scheherexception
id
- String identifier.
Scheherexception
public static ArgumentVector stripArgs(ArgumentVector in, SymbolTable symbols) throws Scheherexception
Scheherexception
public static ReturnValue expression(DBCoreInterface dbci, SymbolTable symbols, ReturnValue returnValue) throws Scheherexception
Scheherexception
public static ReturnValue assignment_expression(DBCoreInterface dbci, SymbolTable symbols, ReturnValue lvalue, ReturnValue rvalue) throws Scheherexception
Scheherexception
public static ReturnValue assignment_new_expression(DBCoreInterface dbci, SymbolTable symbols, ReturnValue lvalue, ReturnValue newrvalue) throws Scheherexception
Scheherexception
public static ReturnValue assignment_new_repository(DBCoreInterface dbci, SymbolTable symbols, ReturnValue lvalue, ArgumentVector new_args) throws Scheherexception
Scheherexception
public static ReturnValue assignment_new_document(DBCoreInterface dbci, SymbolTable symbols, ReturnValue lvalue, ArgumentVector new_args) throws Scheherexception
Scheherexception
public static ReturnValue unlink_expression(DBCoreInterface dbci, SymbolTable symbols, ReturnValue lvalue, ReturnValue rvalue) throws Scheherexception
Scheherexception
public static ReturnValue dot(DBCoreInterface dbci, SymbolTable symbols, ReturnValue lvalue, ReturnValue rvalue, boolean singleDot) throws Scheherexception
Scheherexception
public static ReturnValue argument_expression(DBCoreInterface dbci, SymbolTable symbols, ReturnValue subvalue, ArgumentVector args) throws Scheherexception
Scheherexception
public static ReturnValue colon(DBCoreInterface dbci, ReturnValue lvalue, ReturnValue rvalue) throws Scheherexception
Scheherexception
public static ReturnValue link(DBCoreInterface dbci, ReturnValue lvalue, ReturnValue rvalue, boolean overrideInference) throws Scheherexception
Scheherexception
public static ReturnValue equality(DBCoreInterface dbci, SymbolTable symbols, ReturnValue lvalue, ReturnValue rvalue, boolean allow_indirect) throws Scheherexception
Scheherexception
public static java.lang.StringBuffer examine(DBCoreInterface dbci, SymbolTable symbols, ReturnValue returnVal) throws Scheherexception
Scheherexception
public static ReturnValue idTuple(DBCoreInterface dbci, SymbolTable symbols, java.lang.String left, java.lang.String right) throws Scheherexception
Scheherexception
public static ReturnValue atomicID(DBCoreInterface dbci, SymbolTable symbols, java.lang.String id) throws Scheherexception
Scheherexception
public static void linkLabel(DBCoreInterface dbci, SymbolTable symbols, LinkLabel label, java.lang.String className, java.lang.String attributeName, java.lang.String attributeValue) throws Scheherexception
Scheherexception
public static VariableID parameter_parse_reference(DBCoreInterface dbci, java.lang.String reference, SymbolTable symbols) throws Scheherexception
Scheherexception
public static Parameter parameter(DBCoreInterface dbci, VariableID outreference, ReturnValue paramType, ArgumentVector args) throws Scheherexception
Scheherexception
public static NodeAddress parameter_find_node(DBCoreInterface dbci, NodeID nodeID) throws Scheherexception
Scheherexception
public static java.lang.Object parameter_arg_dot(DBCoreInterface dbci, VariableID outreference, ReturnValue lvalue, ReturnValue rvalue) throws Scheherexception
Scheherexception
public static java.lang.Object parameter_arg_dot_comparison(DBCoreInterface dbci, VariableID outreference, ReturnValue lvalue, ReturnValue mvalue, ReturnValue rvalue, boolean testGreaterThan, boolean singleDot) throws Scheherexception
testGreaterThan
- True if we are parsing a > comparison
between the attribute and the constant; false if we are parsing
a ==.singleDot
- True if we parsed a single dot, e.g.,
node.attribute, indicating overriding attribute inheritance.
False if we parse the indirect attribute operator .~.
Scheherexception
public static java.lang.Object parameter_arg_link_equals(DBCoreInterface dbci, VariableID outreference, ReturnValue lvalue, ReturnValue mvalue, ReturnValue rvalue, boolean overrideInference) throws Scheherexception
Scheherexception
public static Parameter parameter_arg_link(DBCoreInterface dbci, VariableID outreference, ReturnValue lvalue, ReturnValue mvalue, boolean overrideInference) throws Scheherexception
Scheherexception
public static java.lang.Object parameter_term(DBCoreInterface dbci, VariableID outreference, ReturnValue term) throws Scheherexception
Scheherexception
public static java.lang.StringBuffer renderReturnValue(DBCoreInterface dbci, ReturnValue returnValue, SymbolTable symbols) throws Scheherexception
Scheherexception
public static boolean truth()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |