Skip to content

dillonct/Math-Interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Warmup 1

A simple interpreter that recursively parses arithmetic integer expressions with operator precedence and nesting complexity. The interpreter can compute multiple computations, with each computation ending with a period. Ignores whitespace.

2*2+20 +10 *((1000/4) - 50). 100 + (10*2)+3. prints 2024 and 123

Warmup 2

An interpreter that extends upon warmup 1 with variables and separates the parsing and tokenizing operations. A computation starts with the keyword "computation" followed by variable declarations and expressions and ends with a period.

computation var x <- 1; var y <- 2; var z <- 3; (((z*100)+y*10)+x); z-y-x. prints 321 and 0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published