ilog.rules.brl.semantic

Class IlrBRLSemanticContextExtension

  • Direct Known Subclasses:
    IlrBRL


    public abstract class IlrBRLSemanticContextExtension
    extends IlrPropertyManager
    Represents the semantic context extension of a business rule language. This class contains a set of language mechanisms common to all business rule languages. Do not extend this class directly, semantic context extensions must at least extend the IlrBRL class.
    See Also:
    IlrBRL
    • Constructor Detail

      • IlrBRLSemanticContextExtension

        protected IlrBRLSemanticContextExtension(IlrBRLSemanticContext semanticContext)
        Creates a semantic context extension. That method must not called directly, semantic context extension must extends at least the IlrBRL class.
        Parameters:
        semanticContext - the associated semantic context
        See Also:
        IlrBRL
    • Method Detail

      • getSyntaxNodeTypeInfo

        public static IlrTypeInfo getSyntaxNodeTypeInfo(IlrSyntaxTree.Node node,
                                        IlrVocabulary vocabulary)
        Returns the type info that represents the node given as argument.
        Parameters:
        node - The node from which the type info are retrieved.
        vocabulary - The vocabulary associated to the Abstract Syntax Tree node.
        Returns:
        The type info that represents the node, or null if no type info is found.
        See Also:
        IlrTypeInfo
      • getSyntaxNodeTypeInfo

        public static IlrTypeInfo getSyntaxNodeTypeInfo(IlrSyntaxTree.Node node,
                                        java.lang.String subNodeName,
                                        IlrVocabulary vocabulary)
        Returns the type info that represents a subnode of the node.
        Parameters:
        node - The node from which the type info are retrieved.
        subNodeName - The subnode name to retrieve.
        vocabulary - The vocabulary associated to the Abstract Syntax Tree node.
        Returns:
        The type info that represents the node, or null if no type info is found.
        See Also:
        IlrTypeInfo
      • getSyntaxNodeTypeInfo

        public static IlrTypeInfo getSyntaxNodeTypeInfo(IlrSyntaxTree.Node node,
                                        int subNodeIndex,
                                        IlrVocabulary vocabulary)
        Returns the type info that represents a subnode of the node.
        Parameters:
        node - The node from which the type info are retrieved.
        subNodeIndex - The index of the subnode to retrieve.
        vocabulary - The vocabulary associated to the Abstract Syntax Tree node.
        Returns:
        The type info that represents the node, or null if no type info is found.
        See Also:
        IlrTypeInfo
      • getSemanticContext

        public IlrBRLSemanticContext getSemanticContext()
        Returns the semantic context that owns this extension.
        Returns:
        The semantic context that owns this extension.
      • declareGlobalVariables

        protected void declareGlobalVariables()
        This method is called by the Semantic Context to declare some global variables specific to this context extension. This method may be called each time the semantic global scope is reset.
      • getVocabularyElementProperty

        public java.lang.Object getVocabularyElementProperty(IlrBaseElement vocElement,
                                                    java.lang.String propertyName)
        By defaults, queries the vocabulary for the property. Context extensions are then given an opportunity to return the value they choose with or without querying the voc. NOTE: the parsing generator only uses this for the "groups" property so far. More widespread usage is expected.

© Copyright IBM Corp. 1987, 2017