ilog.rules.brl.translation

Interface IlrNodeTranslator

  • All Known Implementing Classes:
    IlrBALRuleNodeTranslator


    public interface IlrNodeTranslator
    Interface for all node translators.

    A node translator is a class that is attached to a grammar node through the property translatorClass in the grammar file. It is used for the first step of BRL translation, to populate the intermediate form. The BRL translator calls the node translator for root grammar node (notice that if no node translator is found for that node, then the translation will stop).

    The only method process(IlrSyntaxTree.Node, IlrTranslationContext) must be implemented for grammar nodes of new language constructs so that:

    • It builds and returns a new statement, if needed.
    • It calls IlrTranslationContext.processNode(IlrSyntaxTree.Node) on the appropriate subnodes to forward processing to them and handles the result. This handling is generally to add the returned IlrStatement, if not null, to the appropriate place in the root rule statement.

© Copyright IBM Corp. 1987, 2017