Skip to content

Latest commit

 

History

History
39 lines (31 loc) · 1.54 KB

README.md

File metadata and controls

39 lines (31 loc) · 1.54 KB

Mathematical Expression Evaluator

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.

Full Assignment (pt-br)


Overall Architecture:

Software Architecture

Lexer:

Receives the expression as input and returns an array of tokens

Lexer Architecture

Parser:

Receives an array of tokens as input and builds a syntax tree that represents the original expression

Parser Architecture

Eval Step:

Traverses the expression tree following a bottom-up approach, resolving the entire expression in parts by evaluating results inferred by subtrees

Eval Step

To String:

Traverses the tree and prints the current state of the expression

Created by: