Class Rule


  • public abstract class Rule
    extends Object
    Represents an expression plus action code that will be executed after successful parsing. This class is immutable and deriving classes should conform to this principle.
    Author:
    Tilman Kamp - Initial contribution
    • Method Detail

      • interpretAST

        public abstract InterpretationResult interpretAST​(ResourceBundle language,
                                                          ASTNode node)
        Will get called after the expression was successfully parsed.
        Parameters:
        language - a resource bundle that can be used for looking up common localized response phrases
        node - the resulting AST node of the parse run. To be used as input.
        Returns:
      • getExpression

        public Expression getExpression()
        Returns:
        the expression