Simple mathematical expression evaluator (aka calculator) built using Nom, Pratt Parser, LLVM, Cranelift and Relm.
Every mathematical expression is parsed to lexical tokens using Nom. After initial parsing is complete, Pratt Parser algorithm is used to create AST (Abstract Syntax Tree) with right operator precedence.
There is simple interpreter implementation, which visits every AST node and computes result.
Alongside interpreter there is JIT compiler implementation with Cranelift and LLVM backends.
For end-user every mathematical expression is evaluated simultaneously by the interpreter and JIT compiler. JIT and Interpretator are racing to compute value first.