Skip to content

kaczajac/cli-arithmetic-interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Arithmetic Expressions Interpreter

A simple arithmetic expressions interpreter built in Julia that implements the Pratt parsing algorithm. Made for educational purposes.


📝 Overview

The interpreter supports the following basic math operations:

  • Addition: +
  • Subtraction: -
  • Multiplication: *
  • Division: /
  • Modulo (remainder): %
  • Exponentiation: ^

You can also define your own variables and use parentheses in expressions.

Important

The program allows for single-letter variable names only.
The same applies to numbers - expressions must consist of digit-based number operations.


⚙️ Setup

  1. Open a terminal of your choice and navigate to the project folder.

  2. Start a new Julia REPL from there:

    julia --project
  3. Import the Interpreter module:

    using Interpreter
  4. Run the interpreter:

    Interpreter.start()

To exit the program, type quit and press ENTER.

About

A simple Julia project that demonstrates parsing and evaluating arithmetic expressions using the Pratt parsing algorithm.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages