Skip to content

fr3fou/methor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

methor

A simple math parser and evaluator

Usage

$ deno run ./main.ts repl
# or
$ deno run ./main.ts 5+3

TODO

  • Precedence
    • The deeper an operator parser is in the callstack, the higher precedence it has
  • Intersperse calls with whitespace eating
  • Negative numbers
  • Grouped expressions
  • Builtin math funcs
    • sin
    • cos
    • abs
    • pow
  • REPL
  • Evaluation
  • Constants
    • PI
    • TAU
  • Fix left/right associativity
    • 50/2*2+10 should evaluate to 60, not 22.5
  • Tests
  • More operators
  • Floats
  • Unary operators

About

simple math parser and evaluator from scratch, using https://github.com/fr3fou/djena/

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published