Package org.openl.rules.tbasic.compile
Class AlgorithmCompilerTool
- java.lang.Object
-
- org.openl.rules.tbasic.compile.AlgorithmCompilerTool
-
public final class AlgorithmCompilerTool extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringFIELD_SEPARATOR
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AlgorithmTreeNodeextractOperationNode(List<AlgorithmTreeNode> candidateNodes, String instruction, IBindingContext bindingContext)static Map<String,AlgorithmTreeNode>getAllDeclaredLables(List<AlgorithmTreeNode> nodesToSearch)static StringValuegetCellContent(List<AlgorithmTreeNode> candidateNodes, String instruction, IBindingContext bindingContext)static AlgorithmTreeNodegetLastExecutableOperation(List<AlgorithmTreeNode> nodes)static intgetLinkedNodesGroupSize(List<AlgorithmTreeNode> nodesToProcess, int firstNodeIndex)static List<AlgorithmTreeNode>getNestedInstructionsBlock(List<AlgorithmTreeNode> candidateNodes, String instruction, IBindingContext bindingContext)static AlgorithmOperationSourcegetOperationSource(List<AlgorithmTreeNode> nodesToCompile, String instruction, IBindingContext bindingContext)static booleanisOperationFieldInstruction(String instruction)
-
-
-
Field Detail
-
FIELD_SEPARATOR
public static final String FIELD_SEPARATOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
extractOperationNode
public static AlgorithmTreeNode extractOperationNode(List<AlgorithmTreeNode> candidateNodes, String instruction, IBindingContext bindingContext)
- Parameters:
candidateNodes-instruction-- Returns:
- The
AlgorithmTreeNodethat suits the given instruction name - Throws:
SyntaxNodeException
-
getAllDeclaredLables
public static Map<String,AlgorithmTreeNode> getAllDeclaredLables(List<AlgorithmTreeNode> nodesToSearch)
-
getCellContent
public static StringValue getCellContent(List<AlgorithmTreeNode> candidateNodes, String instruction, IBindingContext bindingContext)
- Parameters:
candidateNodes-instruction-- Returns:
- Throws:
SyntaxNodeException
-
getLastExecutableOperation
public static AlgorithmTreeNode getLastExecutableOperation(List<AlgorithmTreeNode> nodes)
- Parameters:
nodes-- Returns:
-
getLinkedNodesGroupSize
public static int getLinkedNodesGroupSize(List<AlgorithmTreeNode> nodesToProcess, int firstNodeIndex)
- Parameters:
nodesToProcess-firstNodeIndex-- Returns:
-
getNestedInstructionsBlock
public static List<AlgorithmTreeNode> getNestedInstructionsBlock(List<AlgorithmTreeNode> candidateNodes, String instruction, IBindingContext bindingContext)
- Parameters:
candidateNodes-- Returns:
-
getOperationSource
public static AlgorithmOperationSource getOperationSource(List<AlgorithmTreeNode> nodesToCompile, String instruction, IBindingContext bindingContext)
- Parameters:
nodesToCompile-instruction-- Returns:
-
isOperationFieldInstruction
public static boolean isOperationFieldInstruction(String instruction)
- Parameters:
instruction-- Returns:
-
-