Skip to content

Continuos REPL Parser for user defined functions (using fastparse)

Notifications You must be signed in to change notification settings

lprakashv/expression-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Test Badge Coverage Badge

expression-parser

Continuous REPL Parser for user defined expression (using fastparse)

Pre requisites:

  • java - on Mac: brew cask install adoptopenjdk8
  • sbt - on Mac: brew install sbt

Example expressions:

  • 1.34 - 234.5 + 3443 ^ 2 + sqrt(69 - 5) * log(34)
  • sqrt(3 ^ 2 + 4 ^ 2)
  • sqrt(add(square(3), square(4)))
  • add(12.0, 23, -1, 030, 343,23)
  • quit or exit

Run using:

sbt run

Create a standalone jar using:

sbt assembly

Preview

demo

TODOs:

  • Add invalid arguments error for functions.
  • Add function name auto-completion.
  • Add expression color highlighting (multi-color).
  • Add expression history and ANSI console edit support.

About

Continuos REPL Parser for user defined functions (using fastparse)

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

 
 
 

Languages