I liked using bc
when I was on Ubuntu. I'm cloning it in Rust so that I'll be able to use it in every OS I use.
Also, learning interpreters / compilers.
- Tokenizer
- AST generation
- Parser / Compiler rewrite
- Actual interpretation (stack machine)
- Global variables
- Proper error handling.
- Big-Number Arithmetics (
scale
) - Functions (
define
)- Local environment for local variables?
- BUG: Check the arity of the called function. For example
sqrt(5, 4)
works and generates aPushConstant(4)
instruction!
- Standard Library
- UTF-8 support
- Support for econometry stuff?
- Arrays
- Statistical Functions
- What else?