Class Semantics
java.lang.Object
com.aquima.interactions.expressions.tsl.evaluator.Semantics
The Semantics class is responsible for converting a TSL parse tree to a TSL node tree. During the conversion the
expressions inside the TSL block will be parsed and validated.
- Since:
- 5.0
- Author:
- O. Kerpershoek
-
Constructor Summary
ConstructorsConstructorDescriptionSemantics
(IExprParser parser, IDefinitionSource source, MessageReporter messages, String textId) Constructs a Semantics object with an expression parser and an object holding the various definitions for the current domain. -
Method Summary
Modifier and TypeMethodDescriptionprotected IExpr
parseExpression
(IParseNode offsetNode, String expression) transform
(IParseNode node) This method will transform the parse node provided to a TSL node that can be evaluated.protected ITslNode
transformComment
(CommentDefinition definition) protected ITslNode
transformCondition
(ConditionDefinition definition) protected ITslNode
transformField
(FieldDefinition definition) protected ITslNode
transformForeach
(ForeachDefinition definition) protected ITslNode
transformList
(DefinitionList definition) protected ITslNode
transformText
(TextDefinition definition)
-
Constructor Details
-
Semantics
public Semantics(IExprParser parser, IDefinitionSource source, MessageReporter messages, String textId) Constructs a Semantics object with an expression parser and an object holding the various definitions for the current domain.- Parameters:
parser
- Expression parser that should be used to parse the conditional elements in the TSL.source
- Definitions for the objects of the current domain.messages
- Message object for reporting problems.textId
- ID for the text being parsed.
-
-
Method Details
-
transform
This method will transform the parse node provided to a TSL node that can be evaluated.- Parameters:
node
- The parse node holding the TSL definition.- Returns:
- TSL node for the parse node provided.
- Throws:
ParseException
- This exception is thrown when an unsupported parse node is encountered.
-
transformComment
-
transformText
-
transformList
-
transformField
-
transformCondition
-
transformForeach
-
parseExpression
-