Class SimpleExpressionParser

java.lang.Object
com.inductiveautomation.ignition.common.expressions.parsing.SimpleExpressionParser
All Implemented Interfaces:
Parser

public class SimpleExpressionParser extends Object implements Parser
Simple recursive descent parser for simple arithmetic expressions. Scannerless parsing. Generates an AST (using Expression instances) from the given input if part of language.
  • Constructor Details

  • Method Details

    • containsMathematicalExpression

      public static boolean containsMathematicalExpression(String value)
      Returns true if the string contains any of the mathematical operators that would make this an expression according to this parser.
    • parse

      public Expression parse(String expr, ExpressionParseContext binder)
      Description copied from interface: Parser
      Parse the given string into an Expression.
      Specified by:
      parse in interface Parser
      Parameters:
      expr - the expression string to parse
      binder - the ExpressionParseContext to use during parsing
      Returns:
      the parsed Expression