ilog.rules.brl.semantic

Interface IlrBRLLeadingSemanticFilter



  • public interface IlrBRLLeadingSemanticFilter
    The filter that is applied when a sentence or an expression is being predicted , and that sentence or expression has a leading role or element.

    This is used when a rule is being edited in the text or the guided editor. The filter is invoked when a sentence or an expression can be predicted just after the leading role or element. For example, the sentence : <an object> is <an object> , has a leading role. So the filter is invoked when we can predict he sentence just before the 'is' : is <an object>, and a semantic check can be done on the leading role. Leading semantic filters are associated to a sentence with the property leadingSemanticFilter, and an expression is associated to the node type of the business rule language definition in the concrete syntax .properties file, with the same property.

    • Method Detail

      • acceptSentence

        boolean acceptSentence(IlrBRLSemanticContext context,
                             IlrSyntaxTree.Node leadingNode,
                             IlrSentence sentence)
        States if a sentence is accepted. This method is invoked when a sentence can be predicted.
        Parameters:
        context - The associated semantic context.
        leadingNode - The leading node.
        sentence - The predicted sentence.
        Returns:
        true if the sentence is accepted, false otherwise.
      • acceptExpression

        boolean acceptExpression(IlrBRLSemanticContext context,
                               IlrSyntaxTree.Node leadingNode,
                               IlrBRLGrammar.Node expression)
        States if an expression is accepted. This method is invoked when an expression (grammar construction) can be predicted.
        Parameters:
        context - The associated semantic context.
        leadingNode - The leading node.
        expression - The predicted expression.
        Returns:
        true if the expression is accepted, false otherwise.

© Copyright IBM Corp. 1987, 2017