Skip to content

YuriRDev/verbose-math-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

➕ Verbose-Math-Interpreter

Made this to practice a Rust and interpreters. Probably gonna update this regularly, there's a few things that I'd like to change


Usage

We don't want to make things simple, so 1+1 * 5 it's sooo 2020, now, it's 1 plus 1 multiply 5

$ cargo run "5 plus 10 divide 2"

You don't need to specify the query on the params, you can simply run and then type.

cargo run
5 plus 10 divide 2
7 multiply 5 multiply 2 minus 85 plus 99
...
Meaning Lexeme
+ plus
- minus
/ divide
* multiply
^ power not implemented yet
( open_bracket not implemented yet
) close_bracket not implemented yet

To-Do

  • AST It's not in it's best form (There's a few bugs to fix)
  • Add unary-expressions (It's only binary for now)
  • Add power operator, and brackets

Obs

I know, I know, the syntax tree is not great (for now).

About

➕ Verbose CLI math interpreter made in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages