Skip to content

vanilla-extracts/calc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calc

Calc: a minimalistic calculator built for educational purpose only.

Rust Test

TODO List

  • Lexing of basic operations
    • Lexing operators
    • Lexing lpar,rpar,quote
    • Lexing int
    • Lexing floats
    • Lexing identifiers
  • Parsing of basic operations
    • Parsing int,floats,identifiers
    • sum operation
    • minus operation
    • multiplication operation
    • division operation
  • Parsing advanced operations
    • Parsing lpar,rpar
    • mathematical priority
    • parenthesis support
    • Assignment
    • associativity support
  • Application REPL
    • Add the REPL
      • basic REPL
      • colour message
      • colourised prompt
    • Add colour
  • Interpreter
    • Basic operation interpreter
    • Advanced operation interpreter
    • Identifiers (variable) interpreter
  • Config
    • Config colours
    • Config prompt
  • Add support for functions
    • exp
    • ln
    • log base a
    • cos/sin/tan
    • cosh/sinh/tanh
  • For later
    • Defining your own functions
    • Add RPN mode
    • Hidden multiplication

Examples

REPL with only Lexing (verbose mode: on by default)

REPL with lexing and basic operation parsing (verbose mode: on by default)

Configuration