public interface IlrNodeTranslator
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:
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.
| Modifier and Type | Method and Description |
|---|---|
IlrStatement |
process(IlrSyntaxTree.Node node,
IlrTranslationContext context)
Processes the
node passed as argument, using the specified translation context. |
IlrStatement process(IlrSyntaxTree.Node node, IlrTranslationContext context)
node passed as argument, using the specified translation context.node - The node to process.context - the translation context.© Copyright IBM Corp. 1987, 2017