Implementation of an arithmetic expression evaluator. The work includes the development of a lexer, parser, and a step-by-step evaluator, focusing on readability, reliability, and execution cost.
Receives the expression as input and returns an array of tokens
Receives an array of tokens as input and builds a syntax tree that represents the original expression
Traverses the expression tree following a bottom-up approach, resolving the entire expression in parts by evaluating results inferred by subtrees
Traverses the tree and prints the current state of the expression