You might want to study https://github.com/slapers/ex_sel
It implements basic math notation with nimble parsec