public class SelfByteCodeCompiler extends SelfCompiler
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, NOT, OF, ON, OPERATORS, 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, TYPES, UPPERCASE, VAR, VARIABLE, VERTEX, WEAK, WEAKASSOCIATE, WHILE, WITH, WORD
Constructor and Description |
---|
SelfByteCodeCompiler() |
Modifier and Type | Method and Description |
---|---|
void |
parseCaseByteCode(TextStream stream,
java.io.DataOutputStream dataStream,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
boolean debug,
Network network)
Parse the CASE condition.
|
void |
parseDoByteCode(TextStream stream,
java.io.DataOutputStream dataStream,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
boolean debug,
Network network)
Parse the DO condition.
|
void |
parseElementByteCode(TextStream stream,
java.io.DataOutputStream dataStream,
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, equation, or raw data.
|
Vertex |
parseEquation(TextStream stream,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
boolean debug,
Network network)
Parse the equation.
|
Vertex |
parseEquationForEvaluation(java.lang.String code,
Vertex speaker,
Vertex target,
boolean debug,
Network network)
Parse the code into a temporary equation so it can be evaluated.
|
void |
parseGotoByteCode(TextStream stream,
java.io.DataOutputStream dataStream,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
boolean debug,
Network network)
Parse the GOTO condition.
|
void |
parseOperatorByteCode(java.io.DataOutputStream dataStream,
TextStream stream,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
boolean debug,
Network network)
Parse the operator.
|
void |
parsePatternByteCode(TextStream stream,
java.io.DataOutputStream dataStream,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
boolean debug,
Network network)
Parse the PATTERN condition.
|
void |
parsePushByteCode(TextStream stream,
java.io.DataOutputStream dataStream,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
boolean debug,
Network network)
Parse the PUSH condition.
|
void |
parseQuotientByteCode(TextStream stream,
java.io.DataOutputStream dataStream,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
boolean debug,
Network network)
Parse the quotient.
|
void |
parseReturnByteCode(TextStream stream,
java.io.DataOutputStream dataStream,
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.
|
addGlobalVariables, buildElementsMap, ensureNext, ensureNext, ensureNext, evaluateEquation, evaluateExpression, fastLoad, fastLoadChildren, fastUnpin, getComments, getCompiler, getVersion, lower, parseCase, parseElement, parseFormula, parseFormula, parseGoto, parseOperator, parsePattern, parsePush, parseQuotient, parseReturn, parseStateMachine, parseStateMachine, parseStateMachine, parseStateMachine, parseTemplate, parseTemplate, parseVariable, pin, pin, setCompiler, toString, unpin, unpin
public Vertex parseEquationForEvaluation(java.lang.String code, Vertex speaker, Vertex target, boolean debug, Network network)
parseEquationForEvaluation
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 parseQuotientByteCode(TextStream stream, java.io.DataOutputStream dataStream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, boolean debug, Network network) throws java.io.IOException
java.io.IOException
public void parseElementByteCode(TextStream stream, java.io.DataOutputStream dataStream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, boolean debug, Network network) throws java.io.IOException
java.io.IOException
public Vertex parseEquation(TextStream stream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, boolean debug, Network network)
parseEquation
in class SelfCompiler
public void parseOperatorByteCode(java.io.DataOutputStream dataStream, TextStream stream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, boolean debug, Network network) throws java.io.IOException
java.io.IOException
public void parseCaseByteCode(TextStream stream, java.io.DataOutputStream dataStream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, boolean debug, Network network) throws java.io.IOException
java.io.IOException
public void parsePatternByteCode(TextStream stream, java.io.DataOutputStream dataStream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, boolean debug, Network network) throws java.io.IOException
java.io.IOException
public void parseReturnByteCode(TextStream stream, java.io.DataOutputStream dataStream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, boolean debug, Network network) throws java.io.IOException
java.io.IOException
public void parseGotoByteCode(TextStream stream, java.io.DataOutputStream dataStream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, boolean debug, Network network) throws java.io.IOException
java.io.IOException
public void parsePushByteCode(TextStream stream, java.io.DataOutputStream dataStream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, boolean debug, Network network) throws java.io.IOException
java.io.IOException
public void parseDoByteCode(TextStream stream, java.io.DataOutputStream dataStream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, boolean debug, Network network) throws java.io.IOException
java.io.IOException