ExpressionParser

Implements an expression parser class.

Description

The ExpressionParser class allows you to implement an expression parser.

Properties

expression

Expression string.

String? get expression

  • returns: String? - expression string.

set expression(String? value)

  • value: String? - expression string.

initialTokens

List of original expression tokens.

List<ExpressionToken> get initialTokens

originalTokens

Gets the original tokens

List<Token> get originalTokens

  • returns: List<Token> - token list

Sets the original tokens

set originalTokens(List<Token> value)

  • value: Token - token list

resultTokens

List of parsed expression tokens.

List<ExpressionToken> get resultTokens

variableNames

List of found variable names.

List<String> get variableNames

  • returns: List<String> - list of found variable names.

Instance methods

clear

Clears parsing results.

void clear()

parseString

Sets a new expression string and parses it into internal byte code.

void parseString(String? expression)

  • expression: String? - new expression string.

parseTokens

Parses a given token.

void parseTokens(List<Token> tokens)

  • tokens: List<Token> - token to be parsed.