ilog.rules.brl

Class IlrBRL.DeclareVariable

  • All Implemented Interfaces:
    ilog.rules.brl.semantic.IlrBRLSemanticActionDef
    Enclosing class:
    IlrBRL


    public abstract static class IlrBRL.DeclareVariable
    extends IlrBRLSemanticAction
    This semantic action is an abstract action to declare a variable to the semantic context. To declare the variable, the semantic action needs the variable node for the name and the position of the variable and the target node for the type of the variable to declare.
    See Also:
    IlrBRLVariable
    • Constructor Detail

      • IlrBRL.DeclareVariable

        protected IlrBRL.DeclareVariable(java.lang.String[] args)
        Initializes the arguments.
        Parameters:
        args - The arguments.
    • Method Detail

      • getVariableNode

        protected abstract IlrSyntaxTree.Node getVariableNode(IlrSyntaxTree.Node node)
        Returns the node that represents the variable node. The node type must be <T-voc-variable>.
        Parameters:
        node - The node that represents the declaration.
        Returns:
        The node that represents the variable name.
      • getTargetNode

        protected abstract IlrSyntaxTree.Node getTargetNode(IlrSyntaxTree.Node node)
        Returns the node that represents the target node where concept information can be extracted to declare a variable of the concept.
        Parameters:
        node - The node that represent the declaration.
        Returns:
        The node that represents the target node.
      • declareVariable

        protected abstract IlrBRLVariable declareVariable(IlrBRLSemanticContext context,
                                     java.lang.String name,
                                     IlrConcept type,
                                     IlrCardinality cardinality,
                                     int offset,
                                     int length,
                                     int availabilityOffset)
        Declares a variable. Use the semantic context to declare a variable.
        Parameters:
        context - The semantic context.
        name - The name of the variable.
        type - The type of the variable.
        cardinality - The cardinality of the variable.
        offset - The offset of the declaration of the variable.
        length - The name length of the variable.
        availabilityOffset - The offset from where we can use a reference of the variable.
        See Also:
        IlrConcept, IlrCardinality

© Copyright IBM Corp. 1987, 2017