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.

Deprecated feature:

Deprecation icon 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:

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.