public class Self4ByteCodeCompiler extends Self4Compiler
ADD, ANY, BINARY, BINARY_OPERATORS, BINARY_PRECEDENCE, BREAK, CONTINUE, DATE, DECREMENT, EQUALS, EVALCOPY, FALSE, GREATERTHAN, GREATERTHANEQUAL, INCREMENT, LESSTHAN, LESSTHANEQUAL, NONE, NOT, NOTEQUAL, NULL, NUMBER, OBJECT, OPERATORS, REMOVE, SYMBOL, TEXT, TIME, TIMESTAMP, TRUE, TYPES, UNKNOWN, 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 |
---|
Self4ByteCodeCompiler() |
Modifier and Type | Method and Description |
---|---|
void |
parseAnswerByteCode(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 |
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.
|
Vertex |
parseElement(TextStream stream,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
Primitive binary,
boolean debug,
Network network)
Override to catch expressions in templates, patterns, and other places.
|
Vertex |
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, expression, or data.
|
Vertex |
parseElementByteCode(TextStream stream,
java.io.DataOutputStream dataStream,
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 |
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 |
parseFunctionByteCode(TextStream stream,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
boolean debug,
Network network)
Parse the function.
|
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 |
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.
|
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,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements,
boolean debug,
Network network)
Parse the template.
|
buildElementsMap, evaluateExpression, getComments, getVersion, parseAnswer, parseCase, parseElement, parseElementName, parseFunction, parseGoto, parseOperator, parsePattern, parsePush, parseReturn, parseTemplate, parseVariable
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 Vertex parseExpressionForEvaluation(java.lang.String code, Vertex speaker, Vertex target, boolean debug, Network network)
parseExpressionForEvaluation
in class Self4Compiler
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 Self4Compiler
public Vertex parseStateMachine(java.lang.String code, boolean debug, Network network)
parseStateMachine
in class Self4Compiler
public void parseAnswerByteCode(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 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 parseElement(TextStream stream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, Primitive binary, boolean debug, Network network)
parseElement
in class Self4Compiler
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 Self4Compiler
public Vertex parseElementByteCode(TextStream stream, java.io.DataOutputStream dataStream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, Primitive lastBinary, boolean debug, Network network) throws java.io.IOException
java.io.IOException
public Vertex parseFunctionByteCode(TextStream stream, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Vertex>> elements, boolean debug, Network network)
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