Skip to content
/ lexer Public

Parser built in Vanilla Python that processes and makes inferences on numerical expressions.

Notifications You must be signed in to change notification settings

reidn3r/lexer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

About

Parser built in Vanilla Python that processes and makes inferences on numerical expressions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages