public class Self4Compiler extends SelfCompiler
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ADD |
static java.lang.String |
ANY |
static java.lang.String |
BINARY |
static java.util.Map<java.lang.String,Primitive> |
BINARY_OPERATORS |
static java.util.List<Primitive> |
BINARY_PRECEDENCE |
static java.lang.String |
BREAK |
static java.lang.String |
CONTINUE |
static java.lang.String |
DATE |
static java.lang.String |
DECREMENT |
static java.lang.String |
EQUALS |
static java.lang.String |
EVALCOPY |
static java.lang.String |
FALSE |
static java.lang.String |
GREATERTHAN |
static java.lang.String |
GREATERTHANEQUAL |
static java.lang.String |
INCREMENT |
static java.lang.String |
LESSTHAN |
static java.lang.String |
LESSTHANEQUAL |
static java.lang.String |
NONE |
static java.lang.String |
NOT |
static java.lang.String |
NOTEQUAL |
static java.lang.String |
NULL |
static java.lang.String |
NUMBER |
static java.lang.String |
OBJECT |
static java.util.List<java.lang.String> |
OPERATORS |
static java.lang.String |
REMOVE |
static java.lang.String |
SYMBOL |
static java.lang.String |
TEXT |
static java.lang.String |
TIME |
static java.lang.String |
TIMESTAMP |
static java.lang.String |
TRUE |
static java.util.List<java.lang.String> |
TYPES |
static java.lang.String |
UNKNOWN |
static java.lang.String |
VAR |
ALL, AND, ANSWER, APPEND, AS, ASSIGN, ASSOCIATE, ASSOCIATED, AT, BY, CALL, CASE, COUNT, DEBUG, DEFINE, DISSOCIATE, DO, EACH, ELSE, EQUAL, EQUATION, EVAL, EXCLUDE, FINALLY, FOR, FORMAT, FORMULA, FROM, FUNCTION, GET, GOTO, GREATER, IF, INCLUDE, INPUT, IS, LAST, LEARN, LESS, LOWERCASE, MAX_FILE_SIZE, MAX_LOAD_SIZE, META, NEW, OF, ON, OR, PART, PATTERN, PINNED, PREVIOUS, PRIMITIVE, PRIMITIVE_TOKENS, PUSH, QUOTIENT, RANDOM, REDIRECT, RELATED, RELATION, REQUEST, RETURN, SENTENCE, SERVICE, SET, SRAI, SRAIX, STATE, TEMPLATE, THAT, THEN, THINK, TO, TOPIC, UPPERCASE, VARIABLE, VERTEX, WEAK, WEAKASSOCIATE, WHILE, WITH, WORD
Constructor and Description |
---|
Self4Compiler() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> |
buildElementsMap(Network network) |
Vertex |
evaluateExpression(java.lang.String code,
Vertex speaker,
Vertex target,
boolean pin,
boolean debug,
Network network)
Parse and evaluate the code.
|
java.util.List<java.lang.String> |
getComments(TextStream stream) |
int |
getVersion() |
void |
parseAnswer(Vertex state,
TextStream stream,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
boolean debug,
Network network)
Parse the quotient.
|
Vertex |
parseCase(TextStream stream,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
boolean debug,
Network network)
Parse the CASE condition.
|
Vertex |
parseElement(TextStream stream,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
boolean debug,
Network network)
Parse the reference to either a state, variable, expression, or data.
|
Vertex |
parseElement(TextStream stream,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
Primitive lastBinary,
boolean debug,
Network network)
Parse the reference to either a state, variable, expression, or data.
|
Vertex |
parseElementName(Primitive type,
TextStream stream,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
boolean debug,
Network network)
Parse the element name (state, function, variable)
|
Vertex |
parseExpressionForEvaluation(java.lang.String code,
Vertex speaker,
Vertex target,
boolean debug,
Network network)
Parse the code into a temporary expression so it can be evaluated.
|
Vertex |
parseFunction(TextStream stream,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
boolean debug,
Network network)
Parse the function.
|
Vertex |
parseGoto(TextStream stream,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
boolean debug,
Network network)
Parse the GOTO condition.
|
Vertex |
parseOperator(TextStream stream,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
boolean debug,
Network network)
Parse the operator.
|
Vertex |
parsePattern(TextStream stream,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
boolean debug,
Network network)
Parse the PATTERN condition.
|
Vertex |
parsePush(TextStream stream,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
boolean debug,
Network network)
Parse the PUSH condition.
|
Vertex |
parseReturn(TextStream stream,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
boolean debug,
Network network)
Parse the RETURN condition.
|
Vertex |
parseState(TextStream stream,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
boolean debug,
Network network)
Parse the state and any referenced states or variables.
|
Vertex |
parseStateMachine(java.lang.String code,
boolean debug,
Network network)
Parse the code into a vertex state machine defined in the network.
|
Vertex |
parseTemplate(Vertex formula,
TextStream stream,
boolean debug,
Network network)
Parse the template.
|
Vertex |
parseTemplate(Vertex formula,
TextStream stream,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
boolean debug,
Network network)
Parse the template.
|
Vertex |
parseVariable(TextStream stream,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
boolean debug,
Network network)
Parse the variable.
|
addGlobalVariables, ensureNext, ensureNext, ensureNext, evaluateEquation, fastLoad, fastLoadChildren, fastUnpin, getCompiler, lower, parseEquation, parseEquationForEvaluation, parseFormula, parseFormula, parseQuotient, parseStateMachine, parseStateMachine, parseStateMachine, pin, pin, setCompiler, toString, unpin, unpin
public static final java.lang.String NULL
public static final java.lang.String TRUE
public static final java.lang.String FALSE
public static final java.lang.String UNKNOWN
public static final java.lang.String BREAK
public static final java.lang.String CONTINUE
public static final java.lang.String VAR
public static final java.lang.String EQUALS
public static final java.lang.String NOTEQUAL
public static final java.lang.String ADD
public static final java.lang.String REMOVE
public static final java.lang.String ANY
public static final java.lang.String NONE
public static final java.lang.String NOT
public static final java.lang.String LESSTHAN
public static final java.lang.String GREATERTHAN
public static final java.lang.String LESSTHANEQUAL
public static final java.lang.String GREATERTHANEQUAL
public static final java.lang.String SYMBOL
public static final java.lang.String OBJECT
public static final java.lang.String EVALCOPY
public static final java.lang.String DATE
public static final java.lang.String TIME
public static final java.lang.String BINARY
public static final java.lang.String TEXT
public static final java.lang.String TIMESTAMP
public static final java.lang.String NUMBER
public static final java.lang.String INCREMENT
public static final java.lang.String DECREMENT
public static java.util.List<java.lang.String> OPERATORS
public static java.util.Map<java.lang.String,Primitive> BINARY_OPERATORS
public static java.util.List<Primitive> BINARY_PRECEDENCE
public static java.util.List<java.lang.String> TYPES
public int getVersion()
getVersion
in class SelfCompiler
public Vertex parseStateMachine(java.lang.String code, boolean debug, Network network)
parseStateMachine
in class SelfCompiler
public Vertex evaluateExpression(java.lang.String code, Vertex speaker, Vertex target, boolean pin, boolean debug, Network network)
evaluateExpression
in class SelfCompiler
public Vertex parseExpressionForEvaluation(java.lang.String code, Vertex speaker, Vertex target, boolean debug, Network network)
public java.util.List<java.lang.String> getComments(TextStream stream)
getComments
in class SelfCompiler
public Vertex parseState(TextStream stream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, boolean debug, Network network)
parseState
in class SelfCompiler
public void parseAnswer(Vertex state, TextStream stream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, boolean debug, Network network)
public Vertex parseElement(TextStream stream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, boolean debug, Network network)
parseElement
in class SelfCompiler
public Vertex parseElement(TextStream stream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, Primitive lastBinary, boolean debug, Network network)
public Vertex parseElementName(Primitive type, TextStream stream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, boolean debug, Network network)
public Vertex parseVariable(TextStream stream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, boolean debug, Network network)
parseVariable
in class SelfCompiler
public Vertex parseFunction(TextStream stream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, boolean debug, Network network)
public Vertex parseTemplate(Vertex formula, TextStream stream, boolean debug, Network network)
parseTemplate
in class SelfCompiler
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> buildElementsMap(Network network)
buildElementsMap
in class SelfCompiler
public Vertex parseTemplate(Vertex formula, TextStream stream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, boolean debug, Network network)
parseTemplate
in class SelfCompiler
public Vertex parseOperator(TextStream stream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, boolean debug, Network network)
parseOperator
in class SelfCompiler
public Vertex parseCase(TextStream stream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, boolean debug, Network network)
parseCase
in class SelfCompiler
public Vertex parsePattern(TextStream stream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, boolean debug, Network network)
parsePattern
in class SelfCompiler
public Vertex parseReturn(TextStream stream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, boolean debug, Network network)
parseReturn
in class SelfCompiler
public Vertex parseGoto(TextStream stream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, boolean debug, Network network)
parseGoto
in class SelfCompiler
public Vertex parsePush(TextStream stream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, boolean debug, Network network)
parsePush
in class SelfCompiler