Semantic context
You can use the IlrBRLSemanticContext class to add semantic errors and warnings, access the ruleset parameters and variables defined in the rule project, and retrieve the semantic context extension attached to the business rule language.
Support for custom business rule
languages is deprecated in V8.8.1. This feature will be removed in
a future release of the product. See Deprecated features for migration
details.
During the parsing process, an instance of the class IlrBRLSemanticContext gathers information about the current state of the parser.
You use this class to perform the following tasks:
Add semantic errors and warnings, which will be displayed after the parsing in the Problems view. See IlrBRLMarker.
Retrieve the variable provider that gives access to the ruleset parameters and variables currently defined in the project containing the rule. See IlrBRLVariableProvider.
Retrieve the semantic context extension attached to the business rule language. See IlrBRLSemanticContextExtension.
Semantic context extension
The semantic context provides generic mechanisms that are common to all languages. However, some mechanisms depend on the language definition itself. For example, retrieving the type information at a given node in the abstract syntax tree depends on the abstract syntax.
Therefore, the semantic context uses a special object for these operations, called semantic context extension. You must define a semantic context extension for any new business rule language you create.